{"version":3,"file":"index-69d57fb7.js","sources":["../../src/navigations/Routes/MainRoute.ts","../../src/utils/localeUtils.tsx","../../src/WebApiController.ts","../../src/utils/constants/contentId.ts","../../src/utils/constants/contentIdDataMap.ts","../../src/utils/constants/formatContentId.ts","../../src/utils/constants/formatContentIdDataMap.ts","../../src/contexts/ScreenSizeContext/ScreenSizeContext.tsx","../../src/core/themes/responsiveStyle.ts","../../src/hooks/useMatchMedia.ts","../../src/utils/contentUtils.tsx","../../src/utils/stores/memoryStore.ts","../../src/utils/stores/sessionStorageStore.ts","../../src/contexts/ContentContext/ContentContext.tsx","../../src/contexts/ContentContext/Content.tsx","../../src/core/utils/constants.ts","../../src/core/utils/mergeProps.ts","../../src/core/utils/mergeRefs.ts","../../src/core/utils/styled.ts","../../src/core/ui/Button/Button.tsx","../../src/core/ui/Card/Card.tsx","../../src/core/ui/CountBadge/CountBadge.tsx","../../src/core/ui/DividerLine/DividerLine.tsx","../../src/core/ui/DropdownMenu/DropdownMenu.tsx","../../src/core/ui/Popover/Popover.tsx","../../src/core/ui/Stack/Stack.tsx","../../src/core/ui/RadioGroup/RadioGroup.tsx","../../src/core/themes/constants/colors.ts","../../src/core/themes/legacy/shared/base/media-queries.ts","../../src/core/themes/legacy/shared/base/typography-config.ts","../../src/core/themes/legacy/shared/base/typography.ts","../../src/core/themes/legacy/shared/colors.ts","../../src/core/themes/legacy/shared/palette/common-palette-light.ts","../../src/core/themes/legacy/shared/palette/stubhub-brand-palette.ts","../../src/core/themes/legacy/shared/shape.ts","../../src/core/themes/legacy/shared/spacing.ts","../../src/core/themes/legacy/base-theme.ts","../../src/core/themes/legacy/purple-theme.ts","../../src/core/themes/purpleLegacyTheme.ts","../../src/core/themes/ticketUtilLegacyTheme.ts","../../src/core/themes/index.ts","../../src/svgs/Viagogo/enums.ts","../../src/svgs/Viagogo/svg-wrapper/icon-wrapper.tsx","../../src/svgs/Viagogo/functional-svgs/Accessibility.tsx","../../src/svgs/Viagogo/functional-svgs/AisleSeat.tsx","../../src/svgs/Viagogo/functional-svgs/Artist.tsx","../../src/svgs/Viagogo/functional-svgs/Back.tsx","../../src/svgs/Viagogo/functional-svgs/Barcode.tsx","../../src/svgs/Viagogo/functional-svgs/CalendarOutline.tsx","../../src/svgs/Viagogo/functional-svgs/Chat.tsx","../../src/svgs/Viagogo/functional-svgs/Check.tsx","../../src/svgs/Viagogo/functional-svgs/Clock.tsx","../../src/svgs/Viagogo/functional-svgs/Connected.tsx","../../src/svgs/Viagogo/functional-svgs/Cross.tsx","../../src/svgs/Viagogo/functional-svgs/Delete.tsx","../../src/svgs/Viagogo/functional-svgs/Dollar.tsx","../../src/svgs/Viagogo/functional-svgs/Download.tsx","../../src/svgs/Viagogo/functional-svgs/Edit.tsx","../../src/svgs/Viagogo/functional-svgs/ErrorOutline.tsx","../../src/svgs/Viagogo/functional-svgs/ErrorSolid.tsx","../../src/svgs/Viagogo/functional-svgs/Expand.tsx","../../src/svgs/Viagogo/functional-svgs/Filter.tsx","../../src/svgs/Viagogo/functional-svgs/Fold.tsx","../../src/svgs/Viagogo/functional-svgs/Forward.tsx","../../src/svgs/Viagogo/functional-svgs/GenericDisclosures.tsx","../../src/svgs/Viagogo/functional-svgs/GenericFeature.tsx","../../src/svgs/Viagogo/functional-svgs/Hide.tsx","../../src/svgs/Viagogo/functional-svgs/History.tsx","../../src/svgs/Viagogo/functional-svgs/HomeOutline.tsx","../../src/svgs/Viagogo/functional-svgs/InfoOutline.tsx","../../src/svgs/Viagogo/functional-svgs/InfoSolid.tsx","../../src/svgs/Viagogo/functional-svgs/List.tsx","../../src/svgs/Viagogo/functional-svgs/Loading.tsx","../../src/svgs/Viagogo/functional-svgs/LocationOutline.tsx","../../src/svgs/Viagogo/functional-svgs/Lock.tsx","../../src/svgs/Viagogo/functional-svgs/Mail.tsx","../../src/svgs/Viagogo/functional-svgs/Minus.tsx","../../src/svgs/Viagogo/functional-svgs/MobileTicket.tsx","../../src/svgs/Viagogo/functional-svgs/MobileTransfer.tsx","../../src/svgs/Viagogo/functional-svgs/More.tsx","../../src/svgs/Viagogo/functional-svgs/MyTicketsOutline.tsx","../../src/svgs/Viagogo/functional-svgs/Notify.tsx","../../src/svgs/Viagogo/functional-svgs/ObstructedView.tsx","../../src/svgs/Viagogo/functional-svgs/PaperTicketOutline.tsx","../../src/svgs/Viagogo/functional-svgs/PaperTicketsOutline.tsx","../../src/svgs/Viagogo/functional-svgs/ParkingPass.tsx","../../src/svgs/Viagogo/functional-svgs/Pdf.tsx","../../src/svgs/Viagogo/functional-svgs/Plus.tsx","../../src/svgs/Viagogo/functional-svgs/PrintAtHome.tsx","../../src/svgs/Viagogo/functional-svgs/Processing.tsx","../../src/svgs/Viagogo/functional-svgs/ProfileOutline.tsx","../../src/svgs/Viagogo/functional-svgs/Reload.tsx","../../src/svgs/Viagogo/functional-svgs/Reset.tsx","../../src/svgs/Viagogo/functional-svgs/SearchOutline.tsx","../../src/svgs/Viagogo/functional-svgs/SearchSolid.tsx","../../src/svgs/Viagogo/functional-svgs/Seat.tsx","../../src/svgs/Viagogo/functional-svgs/SeatMap.tsx","../../src/svgs/Viagogo/functional-svgs/SellOutline.tsx","../../src/svgs/Viagogo/functional-svgs/Settings.tsx","../../src/svgs/Viagogo/functional-svgs/Share.tsx","../../src/svgs/Viagogo/functional-svgs/SuccessOutline.tsx","../../src/svgs/SvgWrapper.tsx","../../src/svgs/Viagogo/functional-svgs/TicketAlertOutline.tsx","../../src/svgs/Viagogo/functional-svgs/ToBeDetermined.tsx","../../src/svgs/Viagogo/functional-svgs/UnHide.tsx","../../src/svgs/Viagogo/functional-svgs/Upload.tsx","../../src/svgs/Viagogo/functional-svgs/Wallet.tsx","../../src/svgs/Viagogo/functional-svgs/WarningOutline.tsx","../../src/svgs/Viagogo/functional-svgs/WarningSolid.tsx","../../src/svgs/Viagogo/goicons/ArrowDownIcon.tsx","../../src/svgs/Viagogo/goicons/ArrowDownIcon7.tsx","../../src/svgs/Viagogo/goicons/ArrowUpIcon.tsx","../../src/svgs/Viagogo/goicons/ArrowUpIcon7.tsx","../../src/svgs/Viagogo/goicons/CalendarIcon.tsx","../../src/svgs/Viagogo/goicons/ChevronDownIcon.tsx","../../src/svgs/Viagogo/goicons/ChevronLeftIcon.tsx","../../src/svgs/Viagogo/goicons/ChevronRightIcon.tsx","../../src/svgs/Viagogo/goicons/ChevronUpIcon.tsx","../../src/svgs/Viagogo/goicons/SigninIcon.tsx","../../src/svgs/Viagogo/goicons/SignoutIcon.tsx","../../src/svgs/Viagogo/svg-wrapper/payment-wrapper.tsx","../../src/svgs/Viagogo/payment-svgs/BankAccount.tsx","../../src/svgs/Viagogo/payment-svgs/General.tsx","../../src/svgs/Viagogo/payment-svgs/Paypal.tsx","../../src/svgs/Viagogo/payment-svgs/Wallet.tsx","../../src/svgs/Viagogo/payment-svgs/Wire.tsx","../../src/core/ui/ScrollArea/useAnimateScroll.ts","../../src/core/ui/ScrollArea/useScrollEdges.ts","../../src/core/ui/ScrollArea/ScrollArea.tsx","../../src/core/ui/Select/Select.tsx","../../src/core/ui/SimpleTable/SimpleTable.tsx","../../src/core/ui/Switch/Switch.tsx","../../src/core/ui/TextArea/TextArea.tsx","../../src/core/ui/TextField/TextField.tsx","../../src/core/ui/Tooltip/Tooltip.tsx","../../src/core/ui/TooltipPopover/TooltipPopover.tsx","../../src/core/ui/UpDownComboButton/UpDownComboButton.tsx","../../src/components/Buttons/OkButton.tsx","../../src/contexts/GenericDialogContext/GenericDialogContext.tsx","../../src/hooks/useDefaultZoomOption.tsx","../../src/utils/tryExecuteUtils.ts","../../src/contexts/AppContext/AppContext.tsx","../../src/utils/constants/constants.ts","../../src/contexts/AppContext/AppTelemetryProvider.tsx","../../src/contexts/SellerUserSettingsContext/SellerUserSettingsContext.tsx","../../src/hooks/useUserSetting.ts","../../src/contexts/SiteTheme/SiteThemeContext.tsx","../../src/hooks/useKeyPress.tsx","../../src/hooks/useListenForEscapeKeyPressed.ts","../../src/core/interim/dialogs/GenericDialog/GenericDialog.styled.tsx","../../src/core/interim/dialogs/GenericDialog/GenericDialog.tsx","../../src/utils/errorUtils.tsx","../../src/dialogs/ErrorDialog/ErrorDialog.tsx","../../src/hooks/useBasicDialog.tsx","../../src/contexts/ErrorBoundaryContext/ErrorBoundaryContext.tsx","../../src/contexts/ContentContext/SiteContentProvider.tsx","../../src/utils/userPermissionUtils.ts","../../src/utils/userUtils.ts","../../src/hooks/useUserHasFeature.tsx","../../src/tables/Table/constants.ts","../../src/contexts/ActiveFocusContext/ActiveFocusContext.tsx","../../src/components/Buttons/IconButton/IconButton.styled.tsx","../../src/components/Buttons/IconButton/IconButton.tsx","../../src/components/Buttons/ButtonWithIcon.tsx","../../src/components/Buttons/CancelButton.tsx","../../src/components/Buttons/ConfirmButton.tsx","../../src/components/Buttons/ExpireHoldButton.tsx","../../src/hooks/useListExpansion.tsx","../../src/modals/MergeListings/utils.ts","../../src/contexts/CatalogDataContext/CatalogDataContext.utils.ts","../../src/utils/stringUtils.ts","../../src/contexts/SiteTimezoneContext/SiteTimezoneContext.constants.ts","../../src/modals/EditTableColumns/EditTableColumns.constants.ts","../../src/utils/dateTimeUtils.tsx","../../src/utils/numberFormatter.ts","../../src/utils/seatScoreUtils.ts","../../src/components/Events/VenueMap/shared/components/SectionDisplays/SectionDisplay.tsx","../../src/components/Events/VenueMap/shared/components/SectionDisplays/MultiSectionsDisplay.tsx","../../src/components/Events/VenueMap/GeneralAdmissionMessage.tsx","../../src/components/Events/VenueMap/shared/utils/rawFetch.ts","../../src/components/Events/VenueMap/shared/components/ColorBand/ColorBand.tsx","../../src/images/CircleArrowUp.png","../../src/components/Events/VenueMap/shared/utils/addFocalPoint.ts","../../src/components/Events/VenueMap/VenueMap.styled.tsx","../../src/utils/venueConfigUtils.ts","../../src/components/Events/VenueMap/VenueMapContent.hooks.ts","../../src/svgs/AddFileIcon.tsx","../../src/svgs/SignalStep0Icon.tsx","../../src/svgs/SignalStep1Icon.tsx","../../src/svgs/SignalStep2Icon.tsx","../../src/svgs/SignalStep3Icon.tsx","../../src/svgs/AnimatedBroadcastIcon.tsx","../../src/svgs/AnimatedUnbroadcastIcon.tsx","../../src/svgs/AxsLogo.tsx","../../src/svgs/BroadcastFailedIcon.tsx","../../src/svgs/BroadcastIcon.tsx","../../src/svgs/BroadcastIconInverted.tsx","../../src/svgs/BroadcastWithErrorIcon.tsx","../../src/svgs/CompanionIcon.tsx","../../src/svgs/ConfigureIcon.tsx","../../src/svgs/CopyIcon.tsx","../../src/svgs/DiskSaveIcon.tsx","../../src/svgs/DotIcon.tsx","../../src/svgs/DuplicateOutlinedIcon.tsx","../../src/svgs/FlattenedViewIcon.tsx","../../src/svgs/FullPageIcon.tsx","../../src/svgs/FullySoldIcon.tsx","../../src/svgs/GametimeLogo.tsx","../../src/svgs/GroupItemIcon.tsx","../../src/svgs/HamburgerMenuIcon.tsx","../../src/svgs/HistoryIcon.tsx","../../src/svgs/LayoutIcon.tsx","../../src/svgs/ListingGroupIcon.tsx","../../src/svgs/ListingIcon.tsx","../../src/svgs/MailIcon.tsx","../../src/svgs/MapIcon.tsx","../../src/svgs/MarginMetricIcon.tsx","../../src/svgs/MergeIcon.tsx","../../src/svgs/MobileQRIcon.tsx","../../src/svgs/MoneyIcon.tsx","../../src/svgs/OpenLinkIcon.tsx","../../src/svgs/PurchaseIcon.tsx","../../src/svgs/RecenterIcon.tsx","../../src/svgs/SaleAlertIcon.tsx","../../src/svgs/SalesMetricIcon.tsx","../../src/svgs/SeatGeekLogo.tsx","../../src/svgs/SeatSaverIcon.tsx","../../src/svgs/SignalIcon.tsx","../../src/svgs/SplitIcon.tsx","../../src/svgs/StubHubLogo.tsx","../../src/svgs/StubHubProLogo.tsx","../../src/svgs/TagIcon.tsx","../../src/svgs/TicketmasterLogo.tsx","../../src/svgs/TicketUtilLogo.tsx","../../src/svgs/TickPickLogo.tsx","../../src/svgs/UnbroadcastIcon.tsx","../../src/svgs/ViagogoLogo.tsx","../../src/svgs/VividSeatsLogo.tsx","../../src/components/Events/VenueMap/shared/components/ColorBand/CondensedColorBand.tsx","../../src/components/Events/VenueMap/VenueMapContentCondensed.tsx","../../src/components/Events/VenueMap/VenueMapContent.tsx","../../src/components/Events/VenueMap/VenueMap.tsx","../../src/svgs/DealUndercutIcon.tsx","../../src/svgs/ParentListingModeIcon.tsx","../../src/svgs/QualityScoreModeIcon.tsx","../../src/svgs/RowExtrapolationUndercutIcon.tsx","../../src/svgs/SameEventModeIcon.tsx","../../src/svgs/SameSectionModeIcon.tsx","../../src/svgs/SameZoneModeIcon.tsx","../../src/svgs/SimpleUndercutIcon.tsx","../../src/utils/autoPricingUtils.tsx","../../src/utils/eventWithDataUtils.tsx","../../src/hooks/api/useCustomTimeZoneSettings.tsx","../../src/contexts/SiteTimezoneContext/SiteTimezoneContext.tsx","../../src/svgs/AdminHoldIcon.tsx","../../src/components/Listings/AdminHoldBadge/AdminHoldBadge.tsx","../../src/core/POS/PosDropdown/PosDropdown.tsx","../../src/contexts/ActivePosEntityContext/ActivePosEntityContext.tsx","../../src/contexts/EventMapContext/useGetEventMapConfig.tsx","../../src/contexts/EventMapContext/useGetEventMapConfigOverrides.tsx","../../src/contexts/EventMapContext/useGetEventMapsByScoreModelConfig.tsx","../../src/hooks/useGetEventAutoPricingSettings.tsx","../../src/utils/eventQueryUtils.ts","../../src/contexts/FilterQueryContext/FilterQueryContext.tsx","../../src/core/POS/DateRangeSelector/DateRangePresets/DateRangePresets.styled.tsx","../../src/core/POS/DateRangeSelector/DateRangePresets/DateRangePresets.tsx","../../src/core/POS/DateRangeSelector/DateRangePresets/DateRangeRelativePresets.tsx","../../src/core/POS/DateRangeSelector/DateRangeSelector.styled.tsx","../../src/core/POS/DateRangeSelector/DateRangeSelector.tsx","../../src/core/POS/PosSelect/PosEnumSelect.tsx","../../src/core/POS/PosTextField/PosTextField.tsx","../../src/core/POS/PosSelect/SelectInputSearch.tsx","../../src/core/POS/PosSpinner/PosSpinner.styled.tsx","../../src/core/POS/PosSpinner/PosSpinner.tsx","../../src/hooks/useFlexSearchIndex.tsx","../../src/core/POS/PosSelect/PosSelect.tsx","../../src/components/Filters/StackedFilter/StackedFilter.tsx","../../src/components/Filters/StackedFilter/PriceUpdatedDateStackedFilter.tsx","../../src/components/Filters/StackedFilter/SaleDateStackedFilter.tsx","../../src/utils/constants/global.ts","../../src/contexts/MultiSelectionContext/useShiftKeySelection.ts","../../src/contexts/MultiSelectionContext/MultiSelectionContext.tsx","../../src/contexts/MultiSelectionContext/MultiSelectionContext.utils.ts","../../src/contexts/PurchaseDataContext/PurchaseDataContext.constants.ts","../../src/contexts/PurchaseDataContext/useGetAllPurchasesQuery.tsx","../../src/contexts/PurchaseDataContext/useGetTimePeriodPurchasesQuery.tsx","../../src/contexts/PurchaseDataContext/PurchaseDataContext.tsx","../../src/contexts/CatalogMultiSelectionContext/CatalogMultiSelectionContext.tsx","../../src/components/MainFilterBar/useFilterQueryState.ts","../../src/utils/idUtils.ts","../../src/utils/kmeans.ts","../../src/modals/GroupListings/components/groupingTypes.ts","../../src/modals/GroupListings/components/groupingUtils.ts","../../src/components/Events/EventListing/InventoryEventListing/BulkActions/InventoryEventBulkActions/useInventoryEventBulkActionsState.ts","../../src/modals/Modal/Modal.styled.tsx","../../src/modals/Modal/ModalHeader.tsx","../../src/modals/Modal/Modal.tsx","../../src/utils/deepLinkUtils.ts","../../src/contexts/ModalContext/ModalContext.tsx","../../src/contexts/DialogContext/DialogContext.tsx","../../src/contexts/DialogContext/useDialog.tsx","../../src/hooks/useUserHasAnyOfPermissions.tsx","../../src/utils/format.ts","../../src/components/Selectors/PurchaseVendorSelector/usePurchaseVendorSelector.tsx","../../src/hooks/api/useTicketTypes.tsx","../../src/svgs/CustomDeliveryIcon.tsx","../../src/utils/arrayUtils.ts","../../src/utils/ticketTypeUtils.tsx","../../src/navigations/Routes/Settings/Views/SyncCenter/SyncCenter.utils.ts","../../src/components/common/TicketTypePriorityInput/TicketTypePriorityInput.tsx","../../src/components/Purchases/PurchaseActionDropdown/PurchaseActionDropdown.constants.ts","../../src/components/Buttons/DownloadButton.tsx","../../src/core/POS/DnDFileUploader/DnDFileUploader.styled.tsx","../../src/core/POS/DnDFileUploader/SelectedFile/SelectedFile.styled.tsx","../../src/core/POS/DnDFileUploader/SelectedFile/SelectedFile.tsx","../../src/core/POS/DnDFileUploader/DnDFileUploader.tsx","../../src/hooks/useBulkEditHub.ts","../../src/utils/fileUtils.ts","../../src/dialogs/BulkEdits/common/BulkEditHeader/BulkEditHeader.tsx","../../src/dialogs/BulkEdits/BulkUploadPurchaseDialog/components/RequestEventDetailsView.tsx","../../src/dialogs/BulkEdits/BulkUploadPurchaseDialog/BulkUploadPurchaseDialog.tsx","../../src/dialogs/BulkEdits/BulkUploadPurchaseDialog/LaunchBulkUploadPurchaseDialog.tsx","../../src/components/Purchases/PurchaseActionDropdown/PurchaseGlobalActionDropdown.tsx","../../src/components/Selectors/DeliveryTypeSelector/DeliveryTypeSelector.utils.tsx","../../src/components/Selectors/DeliveryTypeSelector/DeliveryTypeSelector.tsx","../../src/components/Selectors/PurchasePaymentMethodSelector/usePurchasePaymentMethodSelector.tsx","../../src/components/Selectors/PurchasePaymentMethodSelector/PurchasePaymentMethodSelector.tsx","../../src/contexts/SellerAccountContext/SellerAccountContext.tsx","../../src/core/POS/PosMultiSelect/PosMultiSelectOptions.tsx","../../src/core/POS/PosMultiSelect/PosMultiSelect.tsx","../../src/components/Selectors/SellerAccountEmployeeSelector/SellerAccountEmployeeMultiSelector.tsx","../../src/hooks/useGetFulfillmentProviderSettings.ts","../../src/navigations/Routes/Settings/Views/FulfillmentProviders/FulfillmentProviderCard.tsx","../../src/svgs/TradedeskTransferLogo.tsx","../../src/svgs/TdcTransferLogo.tsx","../../src/svgs/TaciyonLogo.tsx","../../src/svgs/StubhubFulfillmentLogo.tsx","../../src/navigations/Routes/Settings/Views/FulfillmentProviders/FulfillmentProviders.tsx","../../src/components/Selectors/SellerAccountEmployeeSelector/SellerAccountEmployeeSelector.tsx","../../src/core/interim/Checkbox/Checkbox.tsx","../../src/core/POS/PosFormField/PosFormField.tsx","../../src/components/Events/EventInfo/EventDateDisplay/EventDateDisplay.tsx","../../src/core/POS/PosLink/PosLink.tsx","../../src/core/POS/MessageWithIcon/FailureMessage.tsx","../../src/core/POS/MessageWithIcon/SuccessMessage.tsx","../../src/core/POS/MessageWithIcon/WarningMessage.tsx","../../src/core/ui/AnimatingWrapper/BlinkingWrapper.styled.tsx","../../src/core/ui/AnimatingWrapper/RotatingWrapper.styled.tsx","../../src/core/POS/MessageWithIcon/WorkingMessage.tsx","../../src/components/Events/EventInfo/EventMappingStateDisplay.tsx","../../src/components/Events/EventInfo/EventNameDisplay/EventNameDisplay.tsx","../../src/components/Events/EventInfo/VenueNameDisplay/VenueNameDisplay.tsx","../../src/components/Events/EventInfo/EventInfo.tsx","../../src/components/Events/ConnectedEventInfo/ConnectedEventInfo.tsx","../../src/components/Events/EventItemHeader/EventItemHeader.tsx","../../src/components/Metrics/ListingMetrics.tsx","../../src/components/Metrics/MetricsDisplay/MetricsDisplay.styled.tsx","../../src/components/Metrics/MetricsDisplay/MetricsDisplay.tsx","../../src/core/POS/ContentPlaceholder/ContentPlaceholder.tsx","../../src/components/Metrics/MetricsDisplay/MetricsDisplayPlaceholder.tsx","../../src/core/POS/CircleProgressBar/CircleProgressBar.tsx","../../src/components/Metrics/MetricTile/MetricTile.tsx","../../src/components/Metrics/ListingMetricsV2.tsx","../../src/svgs/UnlistedTicketsIcon.tsx","../../src/utils/ticketMetricUtils.tsx","../../src/components/Metrics/SaleMetrics.tsx","../../src/modals/common/Purchase/PurchaseEventItemHeader/PurchaseEventItemHeader.tsx","../../src/hooks/useTagsForEntityType.tsx","../../src/core/ui/DivWithTitle/DivWithTitle.tsx","../../src/hooks/useUserGroups.ts","../../src/components/TagsFormBody/TagValueCell/TagValueDisplay.tsx","../../src/components/Selectors/PurchaseVendorSelector/PurchaseVendorSelector.tsx","../../src/components/Selectors/UserGroupSelector/UserGroupMultiSelector.tsx","../../src/components/Selectors/UserGroupSelector/UserGroupSelector.tsx","../../src/core/POS/DateSelector/DatePickerInput.tsx","../../src/core/POS/DateSelector/TimePickerInput.tsx","../../src/utils/tagUtils.ts","../../src/components/TagsFormBody/TagValueCell/TagValueInput.tsx","../../src/components/TagsFormBody/TagsFormBody.util.tsx","../../src/components/TagsFormBody/TagValueCell/TagValueInputCell.tsx","../../src/components/TagsFormBody/TagsPanelDisplayMode.tsx","../../src/core/POS/DragAndDropSort/DragAndDrop.tsx","../../src/svgs/EventIcon.tsx","../../src/utils/columns/inventory/inventoryColumnUtils.types.ts","../../src/utils/reportsUtils.tsx","../../src/hooks/useReportConfigs.ts","../../src/hooks/useGetMetricsInUse.ts","../../src/components/TagsFormBody/CreateTagMetadataForm.tsx","../../src/core/interim/dialogs/ConfirmDialog/ConfirmDialog.tsx","../../src/components/TagsFormBody/EditTagMetadataForm.tsx","../../src/components/TagsFormBody/TagsPanelEditMode.tsx","../../src/components/TagsFormBody/TagsFormBodyV2.tsx","../../src/contexts/LocalizationContext/LocalizationContext.tsx","../../src/dialogs/AddPurchasePaymentDialog/AddPurchasePaymentDialog.styled.tsx","../../src/components/Selectors/CurrencyFilterSelector/CurrencyFilterMultiSelector.tsx","../../src/components/Selectors/CurrencyFilterSelector/CurrencyFilterSelector.tsx","../../src/core/interim/Switch/Switch.tsx","../../src/core/POS/PosCurrencyField/PosCurrencyField.tsx","../../src/dialogs/AddPurchasePaymentDialog/components/AddPurchasePaymentTable.styled.tsx","../../src/dialogs/AddPurchasePaymentDialog/components/AddPurchasePaymentTable.tsx","../../src/dialogs/AddPurchasePaymentDialog/components/AddPurchasePaymentTiles.styled.tsx","../../src/dialogs/AddPurchasePaymentDialog/components/GeneratePurchasePaymentsForm.styled.tsx","../../src/dialogs/AddPurchasePaymentDialog/components/AddPurchasePaymentTiles.tsx","../../src/dialogs/AddPurchasePaymentDialog/components/GeneratePurchasePaymentsForm.tsx","../../src/dialogs/AddPurchasePaymentDialog/AddPurchasePaymentDialog.tsx","../../src/modals/common/BackToModalButton.tsx","../../src/dialogs/UnsavedChanges/UnsavedChanges.tsx","../../src/modals/common/CancellableFormFooter.tsx","../../src/modals/common/CloseModalButton.tsx","../../src/modals/common/Detail/Detail.tsx","../../src/modals/common/Detail/Detail.styled.tsx","../../src/modals/common/DetailSection/DetailSection.tsx","../../src/utils/listingNotesUtils.tsx","../../src/components/Selectors/ListingNotesSelector/useListingNotesSelector.tsx","../../src/core/ui/ScrollableToolbar/ScrollableToolbar.tsx","../../src/core/ui/PillList/PillItem.tsx","../../src/core/ui/PillList/PillList.tsx","../../src/core/POS/MultiSelectDropBoxWithPills/MultiSelectDropBoxWithPills.tsx","../../src/components/Input/ListingNoteSelectionInput/ListingNoteSelectionInput.tsx","../../src/core/POS/HorizontalTextList/HorizontalTextList.tsx","../../src/hooks/useGetEventListingConstraints.tsx","../../src/core/POS/PosTextArea/PosTextArea.tsx","../../src/modals/AddNote/AddNote.tsx","../../src/modals/common/ListingNotesSection/ListingNotesSection.tsx","../../src/modals/common/MultiDetailSection/MultiDetailSection.tsx","../../src/modals/common/NextFooter.tsx","../../src/utils/currencyUtils.ts","../../src/dialogs/ConvertCurrency/ConvertCurrencyDialog.tsx","../../src/dialogs/EditPurchasePaymentDialog/EditPurchasePaymentDialog.tsx","../../src/dialogs/PurchaseCostDialog/PurchaseCostDialog.tsx","../../src/hooks/useGetDefaultAutoGeneratedPaymentMethod.tsx","../../src/hooks/useUserHasPurchasePermissions.tsx","../../src/utils/posFieldUtils.ts","../../src/utils/ticketUtils.ts","../../src/tables/PurchaseTicketTable/PurchaseTicketTable.styled.tsx","../../src/contexts/MultiSelectionContext/useClearShiftSelectionOnSortingChange.ts","../../src/utils/dataTableUtils.ts","../../src/app/constants.ts","../../src/core/themes/darkLegacyTheme.ts","../../src/utils/clientLogUtils.ts","../../src/core/utils/createIndexDBPersister.ts","../../src/hooks/useNetworkState.tsx","../../src/views/SomethingWentWrong/SomethingWentWrong.tsx","../../src/views/SomethingWentWrong/RootErrorPage.tsx","../../src/tables/Table/hooks/usePaginationSettings.tsx","../../src/svgs/ClockTrashIcon.tsx","../../src/components/common/SeatingInfo/SeatingInfo.tsx","../../src/utils/getServerSideOnlyMetricsQuery.ts","../../src/contexts/CatalogMetricsContext/CatalogMetrics.type.ts","../../src/contexts/CatalogMetricsContext/CatalogMetrics.utils.ts","../../src/contexts/CatalogMetricsContext/CatalogMetricsContextV2.tsx","../../src/contexts/CatalogMetricsContext/CatalogMetricsContext.tsx","../../src/contexts/CatalogMetricsContext/useCatalogMetricsContext.ts","../../src/components/Filters/Filter.utils.ts","../../src/components/Filters/hooks/useFilterFiltersByPermission.ts","../../src/components/Filters/TextFilter/TextFilter.tsx","../../src/components/Filters/InternalNotesFilter/InternalNotesFilter.tsx","../../src/components/Filters/InternalNotesFilter/useMultipleInternalNotesFilter.tsx","../../src/components/Filters/InternalNotesFilter/useInternalNotesFilter.tsx","../../src/hooks/api/useCities.ts","../../src/hooks/api/useStateProvinces.ts","../../src/components/Selectors/LocationSelector/CityMultiSelector.tsx","../../src/hooks/api/useKnownCountries.ts","../../src/components/Selectors/LocationSelector/CountryMultiSelector.tsx","../../src/components/Selectors/LocationSelector/StateProvinceMultiSelector.tsx","../../src/components/Filters/LocationFilter/useLocationFilter.tsx","../../src/components/Filters/RowFilter/RowFilter.tsx","../../src/components/Filters/SectionFilter/SectionFilter.tsx","../../src/components/FilterToolbar/FilterDialog/FilterDialog.styled.tsx","../../src/components/FilterToolbar/FilterDialog/FilterDialog.tsx","../../src/components/FilterToolbar/FilterToolbar.styled.tsx","../../src/core/POS/PosSearchBox/PosSearchBox.tsx","../../src/core/POS/PosSearchBox/PosSelectableSearchBox.tsx","../../src/dialogs/RequestEventDialog/RequestEventDialog.tsx","../../src/components/Events/EventSearch/EventSearch.styled.tsx","../../src/components/Events/EventSearch/EventSearchDropdownResult/EventSearchDropdownResult.styled.tsx","../../src/components/Events/EventSearch/EventSearchDropdownResult/EventSearchResultItem.tsx","../../src/components/Events/EventSearch/EventSearchDropdownResult/PerformerSearchResultItem.tsx","../../src/components/Events/EventSearch/EventSearchDropdownResult/VenueConfigSearchResultItem.tsx","../../src/components/Events/EventSearch/EventSearchDropdownResult/VenueSearchResultItem.tsx","../../src/components/Events/EventSearch/EventSearchDropdownResult/EventSearchDropdownResult.tsx","../../src/components/Events/EventSearch/EventSearchItem.tsx","../../src/components/Events/EventSearch/EventSearch.tsx","../../src/dialogs/BulkEdits/common/BulkEditFooter/BulkEditFooter.tsx","../../src/dialogs/BulkEdits/BulkChangeEventDialog/BulkChangeEventDialog.tsx","../../src/dialogs/TicketGroupIntentionDialog/TicketGroupIntentionDialog.tsx","../../src/components/Purchases/PurchaseActionDropdown/components/BulkChangeEventAction/LaunchChangeEvent.tsx","../../src/components/Purchases/PurchaseActionDropdown/components/BulkChangeEventAction/useBulkChangeEventAction.tsx","../../src/core/ui/TableCellDiv/TableCellDiv.tsx","../../src/core/ui/TableHeaderCellDiv/TableHeaderCellDiv.tsx","../../src/hooks/useCopyToClipboard.tsx","../../src/hooks/useMapDeliveryTypesToString.ts","../../src/modals/PurchaseWizard/LaunchDownloadUserDocuments.tsx","../../src/modals/PurchaseWizard/PurchaseTicketsFlow/components/PredeliveryActionsDropdown.tsx","../../src/tables/Table/Table.styled.tsx","../../src/utils/miscUtils.ts","../../src/utils/tableUtils.ts","../../src/modals/common/Purchase/hooks/useGetListingAndSaleIds.ts","../../src/tables/PurchaseTicketTable/configs/TicketGroupStatusIndicator.tsx","../../src/tables/PurchaseTicketTable/configs/TicketGroupTableColumnsConfig.tsx","../../src/tables/PurchaseTicketTable/TicketGroupTable.tsx","../../src/tables/PurchaseTicketTable/PurchaseTicketTable.tsx","../../src/dialogs/SaleCommissionOverrideDialog/SaleCommissionOverrideDialog.constants.ts","../../src/components/common/SetCommissions/SetCommissionsForm.tsx","../../src/svgs/LockedIcon.tsx","../../src/svgs/UnlockedIcon.tsx","../../src/modals/common/Purchase/CommissionSection/LockCommissions/LockCommissions.tsx","../../src/modals/common/Purchase/CommissionSection/CommissionSection.tsx","../../src/modals/common/Purchase/PurchaseModal.styled.tsx","../../src/modals/common/Purchase/CostDetailsTable/CostDetailsTable.styled.tsx","../../src/modals/common/Purchase/CostDetailsTable/CostDetailsTable.tsx","../../src/contexts/DealContext/DealContext.tsx","../../src/core/POS/PosCollapsible/PosCollapsible.tsx","../../src/modals/common/Purchase/Deal/DealConfigHurdle/DealConfigHurdleSplitCommissions.tsx","../../src/modals/common/Purchase/Deal/DealConfigHurdle/DealConfigHurdleSplit.tsx","../../src/modals/common/Purchase/Deal/DealConfigHurdle/DealConfigFallbackHurdle.tsx","../../src/modals/common/Purchase/Deal/DealConfigHurdle/DealConfigHurdle.tsx","../../src/modals/common/Purchase/Deal/DealConfigSection.tsx","../../src/modals/common/Purchase/Deal/DealDateRangeSection.tsx","../../src/modals/common/Purchase/Deal/DealSplitTypeSection.tsx","../../src/modals/common/Purchase/Deal/DealTypeSection.tsx","../../src/modals/common/Purchase/Deal/DealSection.tsx","../../src/modals/common/Purchase/DeliverySection/DeliverySection.styled.tsx","../../src/modals/common/Purchase/DeliverySection/DeliverySection.tsx","../../src/hooks/userGetUserInfo.tsx","../../src/modals/common/Purchase/PaymentDetailsTable/PaymentDetailsTable.styled.tsx","../../src/svgs/ConvertCurrencyIcon.tsx","../../src/utils/paymentMethodUtils.tsx","../../src/modals/common/Purchase/PaymentDetailsTable/PaymentDetailsTable.tsx","../../src/modals/common/Purchase/PurchaseMainDetails.tsx","../../src/dialogs/AddPurchasePaymentMethodDialog/AddPurchasePaymentMethodDialog.tsx","../../src/modals/common/Purchase/PurchasePaymentMethodSelectionInput/PurchasePaymentMethodSelectionInput.tsx","../../src/dialogs/CancelPurchaseDialog/CancelPurchaseDialog.tsx","../../src/dialogs/RestorePurchaseDialog/RestorePurchaseDialog.tsx","../../src/hooks/api/useSyncCenterSetting.ts","../../src/hooks/useGetIsPurchaseIdsInUsedForVendorId.tsx","../../src/core/ui/Tabs/Tabs.tsx","../../src/core/ui/TabPanel/TabPanel.tsx","../../src/core/ui/TabPanel/TabPanel.util.ts","../../src/modals/common/EventEntityHeader/EventEntityHeader.styled.tsx","../../src/modals/common/EventEntityHeader/EventEntityHeader.tsx","../../src/modals/common/EventEntityHeader/ConnectedEventEntityHeader.tsx","../../src/hooks/useEventItemLoadingDisplay.tsx","../../src/modals/common/CancellableFormHeader.tsx","../../src/modals/ActivityLog/ActivityLogModal.constants.ts","../../src/modals/ActivityLog/ActivityLogModal.utils.ts","../../src/modals/ActivityLog/useGetActivityLogByFilter.tsx","../../src/modals/ActivityLog/ActivityLogModal.tsx","../../src/modals/ActivityLog/ActivityLogModal.styled.tsx","../../src/modals/ActivityLog/LaunchActivityLog.tsx","../../src/modals/common/Purchase/PurchaseCurrency/PurchaseCurrency.tsx","../../src/modals/common/Purchase/PurchaseSellerAccountSelector/PurchaseSellerAccountSelector.tsx","../../src/modals/common/ShareButton/ShareButton.tsx","../../src/components/Selectors/PurchaseVendorAccountSelector/usePurchaseVendorAccountSelector.tsx","../../src/modals/common/Purchase/PurchaseVendorAccountSelectionInput/PurchaseVendorAccountSelectionInput.tsx","../../src/svgs/ChevronAccordionIcon.tsx","../../src/core/ui/Accordion/Accordion.tsx","../../src/dialogs/PurchaseVendorDialog/PurchaseVendorDeliveryOverrideInput.tsx","../../src/dialogs/PurchaseVendorDialog/PurchaseVendorDialog.tsx","../../src/modals/common/Purchase/PurchaseVendorSelectionInput/PurchaseVendorSelectionInput.tsx","../../src/modals/common/Purchase/PurchaseVendorHeader/PurchaseVendorHeader.styled.tsx","../../src/modals/common/Purchase/PurchaseVendorHeader/PurchaseVendorHeader.tsx","../../src/modals/common/Purchase/PurchaseWizardFooter.tsx","../../src/dialogs/BulkEdits/BulkUpdateDeliveryOverrideDialog/BulkUpdateDeliveryOverrideDialog.tsx","../../src/dialogs/PurchaseVendorAccountDialog/PurchaseVendorAccountDialog.tsx","../../src/contexts/EmailPurchaseOrderContext/EmailPurchaseOrderContext.tsx","../../src/components/Messages/EmailBody/EmailRenderer.tsx","../../src/components/Messages/EmailBody/EmailBody.tsx","../../src/dialogs/AlertWithSuppressionDialog/AlertWithSuppressionDialog.tsx","../../src/dialogs/AlertWithSuppressionDialog/useAlertWithSuppressionDialog.tsx","../../src/dialogs/AlertWithSuppressionDialog/useCancelTicketGroupDialog.tsx","../../src/dialogs/AlertWithSuppressionDialog/useManualPriceDisableAutoPricingDialog.tsx","../../src/dialogs/AlertWithSuppressionDialog/useSuspiciousPriceChangeDialog.tsx","../../src/dialogs/InternationalComplianceDialog/InternationalComplianceDialog.tsx","../../src/dialogs/InternationalComplianceDialog/useInternationalComplianceDialog.tsx","../../src/dialogs/SecondaryVendorAccountDialog/SecondaryVendorAccountDialog.styled.tsx","../../src/dialogs/SecondaryVendorAccountDialog/SecondaryVendorAccountDialog.tsx","../../src/core/POS/DnDFileUploader/DndFileUploaderContext.tsx","../../src/core/POS/DnDFileUploader/components/DndGlobalFileDrop.tsx","../../src/modals/PurchaseWizard/PurchaseTicketsFlow/components/PurchaseTicketFlowTitle.tsx","../../src/modals/PurchaseWizard/PurchaseTicketsFlowV2/PurchaseTicketGroupHeader.tsx","../../src/modals/PurchaseWizard/PurchaseTicketsFlowV2/PurchaseTicketGroupPageAdditionalInput.tsx","../../src/components/Events/VenueMap/EventVenueMap.hooks.ts","../../src/components/Events/VenueMap/v3/VenueMapV3Content.utils.ts","../../src/components/Events/VenueMap/v3/VenueMapV3Content.hook.ts","../../src/components/Events/VenueMap/v3/VenueMapV3Content.tsx","../../src/components/Events/VenueMap/v3/VenueMapV3.tsx","../../src/components/Events/VenueMap/EventVenueMap.tsx","../../src/modals/PurchaseWizard/PurchaseTicketsFlowV2/PurchaseTicketGroupVenueMap.tsx","../../src/modals/PurchaseWizard/PurchaseTicketsFlowV2/TicketGroupInputTable/hooks/useTicketGroupListingNotes.tsx","../../src/hooks/api/useDeliveryOverrideForNewTicketGroup.tsx","../../src/tables/SpreadsheetTable/hooks/useSelectionPos.tsx","../../src/tables/SpreadsheetTable/utils.ts","../../src/tables/SpreadsheetTable/hooks/useSpreadsheetCopyPaste.tsx","../../src/tables/SpreadsheetTable/hooks/useSpreadsheetSelection.tsx","../../src/tables/SpreadsheetTable/SpreadsheetSelectionBox.tsx","../../src/core/ui/SortButton/SortButton.utils.ts","../../src/tables/SpreadsheetTable/SpreadsheetTableHeader.tsx","../../src/core/POS/PosFormField/PosFormFieldCell.tsx","../../src/tables/SpreadsheetTable/SpreadsheetTd.tsx","../../src/tables/SpreadsheetTable/SpreadsheetTable.tsx","../../src/contexts/ColumnResizingContext/ColumnResizingContext.types.ts","../../src/tables/SpreadsheetTable/SpreadsheetCell/CurrencyCell.tsx","../../src/tables/SpreadsheetTable/SpreadsheetCell/InputCell.tsx","../../src/tables/SpreadsheetTable/SpreadsheetCell/SpreadsheetCell.tsx","../../src/modals/PurchaseWizard/PurchaseTicketsFlowV2/TicketGroupInputTable/TableGroupInputQuantity.tsx","../../src/modals/PurchaseWizard/PurchaseTicketsFlowV2/TicketGroupInputTable/TicketGroupInputDeliveryType.tsx","../../src/components/Selectors/SectionRowSelector/RowSelector.tsx","../../src/components/Selectors/SectionRowSelector/SectionSelector.tsx","../../src/modals/PurchaseWizard/PurchaseTicketsFlowV2/TicketGroupInputTable/TicketGroupInputRowSelector.tsx","../../src/modals/PurchaseWizard/PurchaseTicketsFlowV2/TicketGroupInputTable/utils/seatRangeUtils.ts","../../src/modals/PurchaseWizard/PurchaseTicketsFlowV2/TicketGroupInputTable/TicketGroupInputSeatRange.tsx","../../src/modals/PurchaseWizard/PurchaseTicketsFlowV2/TicketGroupInputTable/TicketGroupInputSeatTrait.tsx","../../src/modals/PurchaseWizard/PurchaseTicketsFlowV2/TicketGroupInputTable/TicketGroupInputVenueInput.tsx","../../src/modals/PurchaseWizard/PurchaseTicketsFlowV2/TicketGroupInputTable/hooks/useTicketGroupDeliveryTypes.tsx","../../src/modals/PurchaseWizard/PurchaseTicketsFlowV2/TicketGroupInputTable/hooks/useTicketGroupInputTableColumns.tsx","../../src/components/Listings/ListingsCarousel/ListingsCarousel.styled.ts","../../src/modals/PurchaseWizard/PurchaseTicketsFlowV2/TicketGroupInputTable/SeatRangeInputModal.tsx","../../src/modals/PurchaseWizard/PurchaseTicketsFlowV2/TicketGroupInputTable/TicketGroupInputTableFooter.tsx","../../src/modals/PurchaseWizard/PurchaseTicketsFlowV2/TicketGroupInputTable/TicketGroupInputTableHeader.tsx","../../src/modals/PurchaseWizard/PurchaseTicketsFlowV2/TicketGroupInputTable/TicketGroupInputTable.tsx","../../src/modals/PurchaseWizard/PurchaseTicketsFlowV2/PurchaseTicketGroupPage.tsx","../../src/components/UploadArtifacts/UploadETickets/UploadETickets.utils.ts","../../src/components/UploadArtifacts/UploadETickets/UploadETicketsForm.tsx","../../src/components/UploadArtifacts/UploadETickets/UploadETickets.styled.tsx","../../src/core/POS/ErrorMessage/ErrorMessage.tsx","../../src/core/POS/ImageMagnifier/ImageMagnifier.tsx","../../src/core/POS/PosDragNDrop/PosDraggable.tsx","../../src/images/Horizontal.png","../../src/images/Vertical.png","../../src/core/POS/PosDragNDrop/PosDragNDrop.styled.tsx","../../src/core/POS/PosDragNDrop/PosDraggableIndicator.tsx","../../src/core/POS/PosDragNDrop/PosDroppable.tsx","../../src/core/POS/PosDragNDrop/PosCustomDragLayer.tsx","../../src/components/UploadArtifacts/UploadETickets/views/UploadETicketsSeatingSection.tsx","../../src/components/UploadArtifacts/UploadETickets/views/UploadETicketsFinalPreviewBody.tsx","../../src/core/POS/SingleFileUploadWithPreview/SingleFileUploadWithPreview.styled.tsx","../../src/core/POS/SingleFileUploadWithPreview/SingleFileUploadWithPreview.tsx","../../src/components/UploadArtifacts/UploadETickets/views/UploadETicketsThumbnailSection.tsx","../../src/components/UploadArtifacts/UploadETickets/views/UploadETicketsSeatAssignmentBody.tsx","../../src/modals/PurchaseWizard/PurchaseTicketsFlow/components/UploadETicketsSection.tsx","../../src/components/UploadArtifacts/UploadETicketsV2/UploadETickets.utils.ts","../../src/components/UploadArtifacts/UploadETicketsV2/UploadETicketsForm.tsx","../../src/components/UploadArtifacts/UploadETicketsV2/constants.ts","../../src/components/UploadArtifacts/UploadETicketsV2/UploadETicketsContext.tsx","../../src/components/UploadArtifacts/UploadETicketsV2/views/Draggable/constants.ts","../../src/svgs/SeatIcon.tsx","../../src/components/UploadArtifacts/UploadETicketsV2/views/Seats/SeatInfo/SeatInfo.tsx","../../src/svgs/PageIcon.tsx","../../src/svgs/PaperTicketsIcon.tsx","../../src/components/UploadArtifacts/UploadETicketsV2/views/PreviewModal/PreviewInfo/PreviewInfo.tsx","../../src/core/ui/Key/PosKey.tsx","../../src/components/UploadArtifacts/UploadETicketsV2/views/PreviewModal/PreviewModalNavigationFooter/PreviewModalNavigationFooter.tsx","../../src/components/UploadArtifacts/UploadETicketsV2/views/Tickets/Documents/UploadETicketsDraggableData.ts","../../src/components/UploadArtifacts/UploadETicketsV2/views/PreviewModal/UploadETicketsPreviewTicketModalBody/UploadETicketsPreviewTicketModalBody.tsx","../../src/components/UploadArtifacts/UploadETicketsV2/views/PreviewModal/UploadETicketsPreviewTicketModal.tsx","../../src/components/UploadArtifacts/UploadETicketsV2/views/Tickets/Documents/ClearButton/ClearButton.tsx","../../src/components/UploadArtifacts/UploadETicketsV2/views/Tickets/Documents/MappedLabel/MappedPageLabel.tsx","../../src/components/UploadArtifacts/UploadETicketsV2/views/Tickets/Documents/MultiplePageDocument/MultiplePageDocumentPage.tsx","../../src/components/UploadArtifacts/UploadETicketsV2/views/Tickets/Documents/SinglePageDocument/SinglePageDocumentPage.tsx","../../src/components/UploadArtifacts/UploadETicketsV2/views/Draggable/PageDragPreview/PageDragPreview.tsx","../../src/components/UploadArtifacts/UploadETicketsV2/views/Tickets/Documents/MultiplePageDocument/MultipleDraggableDocumentPage.tsx","../../src/components/UploadArtifacts/UploadETicketsV2/views/Tickets/Documents/MultiplePageDocument/MultiplePageDocument.tsx","../../src/components/UploadArtifacts/UploadETicketsV2/views/Tickets/Documents/SinglePageDocument/SingleDraggablePageDocument.tsx","../../src/components/UploadArtifacts/UploadETicketsV2/UploadETickets.styled.tsx","../../src/components/UploadArtifacts/UploadETicketsV2/views/UploadETicketsUploadingFile.tsx","../../src/components/UploadArtifacts/UploadETicketsV2/views/UploadETicketsTicketsSection.tsx","../../src/hooks/useOnElementResize.ts","../../src/hooks/useTimeoutFlag.ts","../../src/components/UploadArtifacts/UploadETicketsV2/views/Seats/MappedSeat/MappedSeat.tsx","../../src/components/UploadArtifacts/UploadETicketsV2/views/Seats/UnmappedSeat/UnmappedSeat.tsx","../../src/components/UploadArtifacts/UploadETicketsV2/views/UploadETicketsSeatingSection.tsx","../../src/components/UploadArtifacts/UploadETicketsV2/views/UploadETicketsSeatAssignmentBody.tsx","../../src/modals/PurchaseWizard/PurchaseTicketsFlowV2/components/UploadETicketsSectionV2.tsx","../../src/modals/PurchaseWizard/UploadETicketsSectionSelector.tsx","../../src/utils/validation/helpers.ts","../../src/utils/validation/rules.ts","../../src/components/UploadArtifacts/UploadBarcodes/UploadBarcodes.utils.ts","../../src/components/UploadArtifacts/UploadBarcodes/BulkBarcodeInput/BulkBarcodeInput.styled.tsx","../../src/components/UploadArtifacts/UploadBarcodes/BulkBarcodeInput/BulkBarcodeInput.tsx","../../src/components/UploadArtifacts/UploadBarcodes/SeatBarcodeInput/SeatBarcodeInput.tsx","../../src/components/UploadArtifacts/UploadBarcodes/ManualBarcodeEntry/BarcodeInput.tsx","../../src/components/UploadArtifacts/UploadBarcodes/ManualBarcodeEntry/ManualBarcodeEntry.tsx","../../src/components/UploadArtifacts/UploadBarcodes/UploadBarcodesBody.tsx","../../src/components/UploadArtifacts/UploadBarcodes/UploadBarcodesForm.tsx","../../src/modals/PurchaseWizard/PurchaseTicketsFlow/components/UploadBarcodesSection.tsx","../../src/components/UploadArtifacts/UploadExternalIds/UploadExternalIds.utils.ts","../../src/components/UploadArtifacts/UploadStringArtifacts/BulkStringArtifactInput/BulkExternalIdInput.tsx","../../src/components/UploadArtifacts/UploadStringArtifacts/BulkStringArtifactInput/BulkTicketUrlInput.tsx","../../src/components/UploadArtifacts/UploadStringArtifacts/ManualStringArtifactEntry/ManualExternalIdEntry.tsx","../../src/components/UploadArtifacts/UploadStringArtifacts/ManualStringArtifactEntry/ManualTicketUrlEntry.tsx","../../src/components/UploadArtifacts/UploadExternalIds/UploadExternalIdsBody.tsx","../../src/components/UploadArtifacts/UploadExternalIds/UploadExternalIdsForm.tsx","../../src/modals/PurchaseWizard/PurchaseTicketsFlow/components/UploadExternalIdsSection.tsx","../../src/components/UploadArtifacts/UploadTicketUrls/UploadTicketUrls.utils.ts","../../src/components/UploadArtifacts/UploadTicketUrls/UploadTicketUrlsBody.tsx","../../src/components/UploadArtifacts/UploadTicketUrls/UploadTicketUrlsForm.tsx","../../src/modals/PurchaseWizard/PurchaseTicketsFlow/components/UploadTicketUrlsSection.tsx","../../src/modals/PurchaseWizard/PurchaseTicketsFlow/components/PredeliverySection.tsx","../../src/modals/PurchaseWizard/PurchaseTicketsFlow/SearchPurchasedEvents.tsx","../../src/modals/PurchaseWizard/PurchaseTicketsFlow/PurchaseMultiTicketsFlow.tsx","../../src/hooks/useGetEventFullInfo.tsx","../../src/modals/common/Summary/SummaryWrapper.tsx","../../src/modals/common/EventEntityHeader/ListingInfoDisplay.tsx","../../src/hooks/features/useHasSaleDetailsMarketplaceTermsFeature.ts","../../src/hooks/useUserHasSalePermissions.tsx","../../src/modals/SaleDetails/components/CommentSection.tsx","../../src/core/POS/PosPill/PosPill.tsx","../../src/components/common/MarketplacePaymentStatePill/MarketplacePaymentStatePill.tsx","../../src/modals/SaleDetails/components/MarketplacePaymentSection/MarketplacePaymentLineDialog/MarketplacePaymentLineDialog.utils.ts","../../src/modals/SaleDetails/components/MarketplacePaymentSection/MarketplacePaymentLineDialog/MarketplacePaymentLineDialog.tsx","../../src/modals/SaleDetails/components/MarketplacePaymentSection/SetMarketplaceCharge.tsx","../../src/components/MarketplacePayments/hooks/useGetMarketplacePaymentIdQueryParam.ts","../../src/components/common/EmptySectionContent/EmptySectionContent.tsx","../../src/hooks/api/useGetMarketplacePaymentById.ts","../../src/contexts/MarketplacePaymentDataContext/MarketplacePaymentDataContext.constants.ts","../../src/contexts/MarketplacePaymentDataContext/useGetMonthMarketplacePaymentsQuery.tsx","../../src/contexts/MarketplacePaymentDataContext/MarketplacePaymentDataContext.tsx","../../src/contexts/MarketplacePaymentDataContext/useGetMarketplacePaymentLinesWithSales.tsx","../../src/contexts/MarketplacePaymentDataContext/useSingleMonthMarketplacePaymentsQuery.tsx","../../src/hooks/api/useGetCatalogBySaleIds.ts","../../src/hooks/useGetMarketplacePaymentLineTableData.ts","../../src/svgs/AutomatiqLogo.tsx","../../src/svgs/GoTicketsLogo.tsx","../../src/svgs/TicketEvolutionLogo.tsx","../../src/svgs/TicketNetworkLogo.tsx","../../src/components/common/MarketplaceLogo/MarketplaceLogo.tsx","../../src/modals/MaketplacePayments/MarketplacePaymentHeaderDetails.tsx","../../src/components/Accordions/constants.ts","../../src/components/Accordions/useSetEventsAccordionMaxHeight.ts","../../src/components/common/PageSection/PageSection.tsx","../../src/components/common/PageSection/index.ts","../../src/components/Events/EventListing/EventVirtualizedList/useSetTopListItemPosition.ts","../../src/core/ui/Virtuoso/VirtuosoTopListItemWrapper.tsx","../../src/components/Events/EventListing/EventVirtualizedList/EventVirtualizedList.tsx","../../src/components/Events/EventListing/EventVirtualizedList/EventCheckbox.tsx","../../src/components/Events/EventStatus/EventStatus.tsx","../../src/contexts/InputPriceFocusContext/InputPriceFocusContext.tsx","../../src/components/Accordions/EventsAccordion/useGetGroupingTitle.ts","../../src/components/Accordions/EventsAccordion/EventsAccordion.tsx","../../src/contexts/CollapsableViewContext/CollapsableViewContext.tsx","../../src/components/Events/EventPage/hooks/useSingleTableShortcutSelection.tsx","../../src/components/Listings/ListingDisplay/ListingNotesDisplay.tsx","../../src/components/Listings/ListingDisplay/ListingDisplay.tsx","../../src/components/Listings/constants.ts","../../src/components/Listings/listingUtils.tsx","../../src/contexts/ActiveSortTableColumnContext/ActiveSortTableColumnContext.tsx","../../src/utils/columns/purchases/purchasesColumnUtils.types.ts","../../src/utils/columns/sales/salesColumnUtils.types.ts","../../src/modals/EditTableColumns/EditTableColumns.util.ts","../../src/utils/types/sectionType.ts","../../src/modals/EditTableColumns/FormatOptionPill/FormatOptionPill.base.tsx","../../src/modals/EditTableColumns/FormatOptionPill/FormatOptionPill.select.tsx","../../src/modals/EditTableColumns/FormatOptionPill/FormatOptionPill.container.tsx","../../src/navigations/Routes/OnSaleEvent/OnSaleEventView.types.ts","../../src/utils/columns/events/eventsColumnUtils.types.ts","../../src/utils/columns/events/eventsColumnUtils.constants.ts","../../src/utils/columns/inventory/inventoryColumnUtils.constants.ts","../../src/utils/columns/marketplacePayments/marketplacePaymentsColumnsUtils.types.ts","../../src/utils/columns/payments/paymentsColumnUtils.constants.ts","../../src/utils/columns/purchases/purchasesColumnUtils.constants.ts","../../src/utils/columns/sales/salesColumnUtils.constants.ts","../../src/utils/columns/sales/salesReportColumnUtils.constants.ts","../../src/hooks/useColumnUserSetting.tsx","../../src/tables/common/hooks/useSeatingColumnSorting.tsx","../../src/hooks/useSortListingTableSeatingColumn.ts","../../src/utils/columns/customColumnUtils.ts","../../src/utils/columns/customColumnMathUtils.ts","../../src/utils/columns/inventory/inventoryCustomColumnUtils.ts","../../src/navigations/Routes/InventoryEvent/InventoryEvent.constants.ts","../../src/components/Listings/InventoryEventPage/InventoryEventPage.hooks.ts","../../src/contexts/EventHubContext/EventHubContext.tsx","../../src/dialogs/AlertWithSuppressionDialog/useManualPriceAdjustFloorOrCeilingDialog.tsx","../../src/tables/ListingTable/configs/ListingPriceForm.tsx","../../src/core/POS/PosHotkeys/PosHotkeys.tsx","../../src/components/common/MultiSelect/MultiSelectAll.tsx","../../src/components/Listings/AutoPriceResultDisplay/AutoPriceResultDisplay.tsx","../../src/svgs/CheckCircleIcon.tsx","../../src/components/Listings/ListingDeliveryTypeDisplay/ListingDeliveryTypeDisplay.tsx","../../src/svgs/CopyIcon2.tsx","../../src/core/ui/CopyToClipboard/CopyToClipboardV2.tsx","../../src/hooks/useListAndAllInPrice.ts","../../src/modals/InventoryTableColumns/CustomColumnName.tsx","../../src/components/Listings/InventoryActionDropdown/InventoryActionDropdown.constants.ts","../../src/components/common/OpenSubhubDropdownAction/OpenStubhubDropdownAction.tsx","../../src/components/Input/DeliveryTypeRadioInput/DeliveryTypeRadioInput.tsx","../../src/core/POS/DateSelector/DatePickerPresets/DatePickerPresets.tsx","../../src/core/POS/DateSelector/DateSelector.tsx","../../src/components/Input/InHandDateInput/InHandDateInput.tsx","../../src/core/POS/FormPage/FormPage.tsx","../../src/modals/SeatSaverListingWizard/components/DeliverySection.tsx","../../src/modals/SeatSaverListingWizard/components/ListingSection.tsx","../../src/components/Input/VenueRowInput/VenueRowInput.tsx","../../src/components/Input/VenueSectionInput/VenueSectionInput.tsx","../../src/modals/SeatSaverListingWizard/components/SeatingSection.tsx","../../src/modals/SeatSaverListingWizard/components/SeatSaverInput.tsx","../../src/modals/SeatSaverListingWizard/SeatSaverListingWizardBody.tsx","../../src/modals/SeatSaverListingWizard/SeatSaverListingWizard.tsx","../../src/components/Listings/InventoryActionDropdown/components/AddSeatSaverAction/LaunchAddSeatSaver.tsx","../../src/components/Listings/InventoryActionDropdown/components/EnterCompanionModeAction/EnterCompanionModeAction.tsx","../../src/hooks/api/useGetListingMergeSuggestions.utils.ts","../../src/hooks/api/useGetListingMergeSuggestionsByEvent.tsx","../../src/modals/MergeListings/MergeListings.styled.tsx","../../src/dialogs/AlertWithSuppressionDialog/useMergeGroupedListingDialog.tsx","../../src/modals/MergeListings/MergeListingsSuggestionsDisplay.tsx","../../src/modals/MergeListings/MergeListingsBody.tsx","../../src/modals/MergeListings/useMergeGroupedListingsDialog.tsx","../../src/modals/MergeListings/MergeListings.tsx","../../src/hooks/api/useGetListingMergeSuggestions.tsx","../../src/modals/MergeListings/BulkMergeListings/BulkMergeListings.utils.ts","../../src/modals/MergeListings/BulkMergeListings/MergeSuggestionsDisplay.tsx","../../src/modals/MergeListings/BulkMergeListings/EventMergeSuggestionsAccordion.tsx","../../src/modals/MergeListings/BulkMergeListings.tsx","../../src/components/Listings/InventoryActionDropdown/components/MergeListingsAction/LaunchMergeListings.tsx","../../src/components/Listings/InventoryActionDropdown/InventoryEventActionDropdown.tsx","../../src/components/common/BulkActions/BulkBroadcastActions/useBulkBroadcastActionsPermission.ts","../../src/components/Listings/InventoryActionDropdown/components/GroupListingsAction/LaunchGroupListings.tsx","../../src/components/Listings/InventoryActionDropdown/InventoryGlobalActionDropdown.tsx","../../src/hooks/api/useListingGroupPricingSettings.ts","../../src/hooks/useEventMarketplaceSettings.ts","../../src/modals/common/Summary/Summary.styled.tsx","../../src/modals/common/Summary/VenueConfigSummary.tsx","../../src/core/ui/Slider/Slider.tsx","../../src/core/ui/ToggleGroup/ToggleGroup.tsx","../../src/modals/ListingDetails/components/PricingSection/AutoPricingSection.types.ts","../../src/hooks/useAvailableAutopricingModes.tsx","../../src/hooks/useGetAccountAutoPricingSettings.tsx","../../src/utils/types/selectedSectionSettingsWithOptionals.ts","../../src/modals/GroupListings/components/AutoPricingSettings/useListingGroupAutoPricingSettings.ts","../../src/modals/GroupListings/components/AutoPricingSettings/AdvancePricingSettings.tsx","../../src/components/common/FilterPill/FilterPillList.constants.ts","../../src/components/common/FilterPill/RowIdFilterDropdown.tsx","../../src/components/common/FilterPill/FilterPillList.tsx","../../src/hooks/useUserHasListingPermissions.tsx","../../src/modals/ListingDetails/components/useHasListingPricePermissions.tsx","../../src/modals/ListingDetails/components/useListingAutoPricingSettings.tsx","../../src/components/AutoPricing/components/SectionFilterRowNudger.tsx","../../src/components/AutoPricing/components/AutoPricingSectionRowIdFilter.tsx","../../src/dialogs/SectionSelectDialog/SectionSelector.tsx","../../src/dialogs/SectionSelectDialog/SectionSelectDialog.tsx","../../src/hooks/useCompQuantitiesFilter.ts","../../src/hooks/useUndercutAmountSettings.tsx","../../src/modals/GroupListings/components/AutoPricingSettings/AutoPricingSettingsSection.tsx","../../src/modals/GroupListings/components/AutoPricingSettings/AutoPricingSettings.tsx","../../src/components/AutoPricing/useAutoPricingSettingsFormContext.ts","../../src/components/AutoPricing/AutoPricingCompFloorAndCeilingInput/AutoPricingCompFloorAndCeilingInput.tsx","../../src/components/AutoPricing/AutoPricingCompListingModeSelector/AutoPricingCompListingModeSelector.tsx","../../src/components/AutoPricing/AutoPricingCompQuantitiesSelector/AutoPricingCompQuantitiesSelector.tsx","../../src/components/AutoPricing/AutoPricingOutlierDetectionModeSelector/AutoPricingOutlierDetectionModeSelector.tsx","../../src/components/AutoPricing/AutoPricingOutlierDetectionSettingsInput/AutoPricingOutlierDetectionSettingsInput.tsx","../../src/components/AutoPricing/AutoPricingSelectedSectionSettingsInput/AutoPricingSelectedSectionSettingsInput.hooks.ts","../../src/components/AutoPricing/AutoPricingSelectedSectionSettingsInput/AutoPricingSelectedSectionSettingsInput.tsx","../../src/components/AutoPricing/AutoPricingUnderCutRelativeAndAbsoluteAmountsInput/AutoPricingUnderCutRelativeAndAbsoluteAmountsInput.tsx","../../src/components/AutoPricing/AutoPricingSettingsFormContent/AutoPricingSettingsFormContent.tsx","../../src/modals/GroupListings/components/ListingGroupAutoPricingSettingsFormContent/ListingGroupAutoPricingSettingsFormContent.tsx","../../src/modals/GroupListings/components/ListingGroupAutoPricingSettingsFormContentWrapper/ListingGroupAutoPricingSettingsFormContentWrapper.tsx","../../src/modals/GroupListings/components/MarketplaceBroadcast/MarketplaceDisplay.tsx","../../src/modals/GroupListings/components/MarketplaceBroadcast/ListingGroupMarketplaceBroadcast.tsx","../../src/modals/GroupListings/components/GroupingTemplates/GroupTemplateTable.tsx","../../src/modals/GroupListings/components/GroupingTemplates/SeatingSelectionTable.tsx","../../src/modals/GroupListings/components/GroupingTemplates/GroupingTemplates.tsx","../../src/svgs/ShuffleIcon.tsx","../../src/modals/GroupListings/components/ListingGroupInput.hook.ts","../../src/modals/GroupListings/components/ListingGroupTableColumnsConfig.tsx","../../src/modals/GroupListings/components/ListingGroupInputTable.tsx","../../src/modals/GroupListings/components/ListingGroupInput.tsx","../../src/modals/GroupListings/components/GroupingBucketOptions.tsx","../../src/modals/GroupListings/components/ListingTableForGroups.tsx","../../src/modals/GroupListings/components/EventGroupings.tsx","../../src/modals/GroupListings/GroupListingsBody.hook.ts","../../src/modals/GroupListings/GroupListingsBody.tsx","../../src/modals/GroupListings/GroupListings.tsx","../../src/modals/GroupListings/AddToGroupModal.tsx","../../src/tables/ListingTable/configs/ListingGroupActions.tsx","../../src/tables/ListingTable/configs/ListingGroupStatusSummary.tsx","../../src/tables/ListingTable/configs/ListingActionsCell.tsx","../../src/tables/Table/TableCells/DateCell.tsx","../../src/components/common/InHandDateDisplay/InHandDateDisplay.tsx","../../src/tables/Table/TableCells/InHandCell.tsx","../../src/tables/ListingTable/ListingTable.types.ts","../../src/hooks/useListingHasVenueMapInfo.tsx","../../src/tables/ListingTable/configs/AutoPricingToggleCell.tsx","../../src/tables/ListingTable/configs/CompListingBoundsCell.tsx","../../src/utils/columns/columnUtils.types.ts","../../src/utils/columns/events/eventsCustomColumnUtils.constants.ts","../../src/utils/columns/events/eventsCustomColumnUtils.ts","../../src/utils/columns/inventory/inventoryReportCustomColumnUtils.ts","../../src/utils/columns/sales/salesCustomColumnUtils.ts","../../src/utils/columns/columnPersonalizationUtils.ts","../../src/tables/ListingTable/configs/CustomNumericCell.tsx","../../src/tables/ListingTable/configs/ListingPriceCell.styled.tsx","../../src/tables/ListingTable/configs/ListingPriceCell.tsx","../../src/tables/ListingTable/configs/ListingProceedsFloorCell.tsx","../../src/tables/ListingTable/configs/PricingModeCell.tsx","../../src/tables/ListingTable/configs/PricingSettings/CircuitBreakerMinCompListingCount.tsx","../../src/tables/ListingTable/configs/PricingSettings/CircuitBreakerVelocity.tsx","../../src/tables/ListingTable/configs/PricingSettings/CircuitBreakerVelocityPeriod.tsx","../../src/tables/ListingTable/configs/PricingSettings/CompListingExcludeFanInventory.tsx","../../src/tables/ListingTable/configs/PricingSettings/CompListingMinQuantity.tsx","../../src/tables/ListingTable/configs/PricingSettings/OutlierDetectionMode.tsx","../../src/tables/ListingTable/configs/PricingSettings/OutlierFiltering.tsx","../../src/tables/ListingTable/configs/PricingSettings/OutlierLimit.tsx","../../src/tables/ListingTable/configs/PricingSettings/OutlierSpacing.tsx","../../src/tables/ListingTable/configs/UndercutAmountCell.tsx","../../src/tables/ListingTable/configs/ListingTableColumnsConfig.tsx","../../src/tables/ListingTable/ListingTable.tsx","../../src/tables/ListingTable/configs/ListingTableFlattenedColumnsConfig.tsx","../../src/tables/ListingTable/ListingTableFlattened.tsx","../../src/tiles/Tile/Tile.styled.ts","../../src/tiles/ListingTiles/ListingTile.styled.tsx","../../src/tiles/ListingTiles/ListingTiles.tsx","../../src/components/Accordions/InventoryEventsAccordion/InventoryEventsBody.tsx","../../src/components/common/MultiSelect/MultiSelectCloseButton.tsx","../../src/components/common/MultiSelect/MultiSelectActionBar.tsx","../../src/components/common/MultiSelect/MultiSelectActionsContainer.tsx","../../src/components/common/BulkActions/useBulkActionsState.ts","../../src/dialogs/AddAdminHoldDialog/AddAdminHoldInput.tsx","../../src/dialogs/BulkEdits/BulkAddListingAdminHoldDialog/BulkAddListingAdminHoldDialog.tsx","../../src/components/Listings/InventoryActionDropdown/components/BulkAddHoldAction/LaunchAddHold.tsx","../../src/components/Listings/InventoryActionDropdown/components/BulkAddHoldAction/useBulkAddHoldAction.tsx","../../src/dialogs/BulkEdits/BulkEditBroadcastSettingsDialog/MarketplaceDisplay.tsx","../../src/dialogs/BulkEdits/BulkEditBroadcastSettingsDialog/BulkEditBroadcastSettingsDialog.tsx","../../src/components/Listings/InventoryActionDropdown/components/BulkEditBroadcastSettingsAction/useBulkEditBroadcastSettingsAction.tsx","../../src/dialogs/BulkEdits/BulkRemoveHoldDialog/BulkRemoveHoldDialog.tsx","../../src/components/Listings/InventoryActionDropdown/components/BulkRemoveHoldAction/LaunchRemoveHold.tsx","../../src/components/Listings/InventoryActionDropdown/components/BulkRemoveHoldAction/useBulkRemoveHoldAction.tsx","../../src/dialogs/BulkEdits/BulkUngroupListingsDialog/BulkUngroupListingsDialog.tsx","../../src/components/Listings/InventoryActionDropdown/components/LaunchUngroupListingsAction/LaunchUngroupListings.tsx","../../src/components/Listings/InventoryActionDropdown/components/LaunchUngroupListingsAction/useBulkUngroupListings.tsx","../../src/components/Events/EventListing/InventoryEventListing/BulkActions/InventoryEventBulkActions/Actions/BroadcastActions.tsx","../../src/modals/GroupListings/components/AutoPricingSettings/BulkEditAdvancePricingSettings.tsx","../../src/modals/GroupListings/components/AutoPricingSettings/BulkEditAutoPricingSettingsSection.tsx","../../src/modals/GroupListings/components/MarketplaceBroadcast/BulkEditListingGroupSettingsMarketplaceBroadcast.tsx","../../src/dialogs/BulkEdits/BulkEditListingGroupSettingsDialog/BulkEditListingGroupSettingsDialogBody.tsx","../../src/dialogs/BulkEdits/BulkEditListingGroupSettingsDialog/BulkEditListingGroupSettingsDialog.tsx","../../src/components/Listings/InventoryActionDropdown/components/BulkEditListingGroupSettingsAction/LaunchBulkEditListingGroupSettings.tsx","../../src/components/Listings/InventoryActionDropdown/components/BulkEditListingGroupSettingsAction/useBulkEditListingGroupSettings.tsx","../../src/dialogs/AddSectionGroupDialog/AddSectionGroupDialog.tsx","../../src/core/POS/PosDropdownAnimated/PosDropdownAnimated.tsx","../../src/hooks/useAutoCompMapSectionHandler.tsx","../../src/dialogs/BulkEdits/AddToGroupDialog/AddToGroupDialog.tsx","../../src/components/Listings/InventoryActionDropdown/components/GroupListingsAction/LaunchAddToGroup.tsx","../../src/modals/GroupListingsV2/GroupListingsV2.types.ts","../../src/modals/GroupListingsV2/components/GroupsPreview/GroupListingsPreviewTable.constants.tsx","../../src/modals/GroupListingsV2/components/Broadcast/BroadcastMarketplace.tsx","../../src/modals/GroupListingsV2/components/Broadcast/Broadcast.tsx","../../src/modals/GroupListingsV2/GroupListingsV2.constants.ts","../../src/modals/GroupListingsV2/components/SettingsTitle/SettingsTitle.tsx","../../src/modals/GroupListingsV2/components/GroupingMethods/InputRowRanges.tsx","../../src/components/Listings/InventoryEventPage/utils/colorUtils.ts","../../src/modals/GroupListingsV2/components/GroupingMethods/ZoneMap.tsx","../../src/modals/GroupListingsV2/components/GroupingMethods/GroupingMethods.tsx","../../src/modals/GroupListingsV2/components/GroupListingsSetting/GroupListingsSetting.tsx","../../src/modals/GroupListingsV2/ZoneMapGroupsGenerator.ts","../../src/modals/GroupListingsV2/GroupListingsV2.hooks.ts","../../src/modals/GroupListingsV2/components/GroupsPreview/GroupsPreview.utils.ts","../../src/modals/GroupListingsV2/components/GroupsPreview/MoveListingGroupDialog.tsx","../../src/modals/GroupListingsV2/components/GroupsPreview/GroupListingsPreviewTable.tsx","../../src/modals/GroupListingsV2/components/GroupsPreview/GroupListingsPreview.tsx","../../src/modals/GroupListingsV2/components/GroupsPreview/GroupsPreview.tsx","../../src/modals/GroupListingsV2/components/OrderingMethods/OrderingMethods.tsx","../../src/modals/GroupListingsV2/components/RankPremium/RankPremium.tsx","../../src/modals/GroupListingsV2/GroupListingsBody.tsx","../../src/modals/GroupListingsV2/GroupListingsV2.tsx","../../src/components/Listings/InventoryActionDropdown/components/GroupListingsAction/LaunchGroupingWizard.tsx","../../src/components/Listings/InventoryActionDropdown/components/GroupListingsAction/LaunchMoveToGroup.tsx","../../src/components/Events/EventListing/InventoryEventListing/BulkActions/InventoryEventBulkActions/Actions/GroupActions.tsx","../../src/components/common/BulkActions/BulkPricingActions/useBulkPricingActionsPermissions.ts","../../src/dialogs/BulkEdits/BulkEditListingPriceDialog/BulkEditListingPriceDialog.styled.tsx","../../src/dialogs/BulkEdits/BulkEditListingPriceDialog/BulkEditListingPriceDialog.tsx","../../src/components/Listings/InventoryActionDropdown/components/BulkChangeListingPriceAction/LaunchChangeListingPrice.tsx","../../src/components/Listings/InventoryActionDropdown/components/BulkChangeListingPriceAction/useBulkChangeListingPriceAction.tsx","../../src/dialogs/AlertWithSuppressionDialog/useDeliveryInfoChangeDialog.tsx","../../src/hooks/useMarketplaceHandledByProcessor.ts","../../src/modals/TransferTickets/views/TransferTicketmasterBarcodes.tsx","../../src/modals/TransferTickets/ViewTransferTickets.tsx","../../src/modals/UploadBarcodes/UploadBarcodes.tsx","../../src/modals/UploadBarcodes/ViewBarcodes.tsx","../../src/components/Buttons/BackButton.tsx","../../src/modals/UploadETickets/UploadETickets.tsx","../../src/modals/UploadETickets/ViewETickets.tsx","../../src/modals/UploadExternalIds/UploadExternalIds.tsx","../../src/modals/UploadExternalIds/ViewExternalIds.tsx","../../src/modals/UploadTicketUrls/UploadTicketUrls.tsx","../../src/modals/UploadTicketUrls/ViewTicketUrls.tsx","../../src/modals/ViewTickets/ViewTickets.tsx","../../src/modals/ListingDetails/components/DeliverySection/TicketTypePrioritySection.tsx","../../src/modals/ListingDetails/components/DeliverySection/DeliverySection.tsx","../../src/components/Input/ListingPriceInput/ListingPriceInput.tsx","../../src/modals/ListingDetails/components/EconomicsSection.tsx","../../src/core/POS/ErrorIconMessage/ErrorIconMessage.tsx","../../src/dialogs/DuplicateSeatsSelectionDialog.tsx/DuplicateSeatDialogEntry.tsx","../../src/dialogs/DuplicateSeatsSelectionDialog.tsx/DuplicateSeatsSelectionDialog.tsx","../../src/dialogs/DuplicateSeatsSelectionDialog.tsx/LaunchDuplicateSeatsSelectionDialog.tsx","../../src/modals/ListingDetails/components/DuplicateListingSection/DuplicateListingSection.tsx","../../src/modals/ListingDetails/components/EnableNativeSyncSection/EnableNativeSyncSection.tsx","../../src/components/Input/UploadDocumentInput/UploadDocumentInput.tsx","../../src/dialogs/ProofOfPurchaseUploadDialog/ProofOfPurchaseUploadDialog.tsx","../../src/dialogs/ProofOfPurchaseUploadDialog/LaunchProofOfPurchaseUploadDialog.tsx","../../src/modals/ListingDetails/components/ProofOfPurchaseSection/ProofOfPurchaseSection.tsx","../../src/utils/activityLogUtils.tsx","../../src/modals/ViewSeatsListModal/ViewSeatsListBody.tsx","../../src/modals/ViewSeatsListModal/ViewSeatsListModal.tsx","../../src/modals/ListingDetails/actions/LaunchViewAllSeats.tsx","../../src/modals/ListingDetails/components/TicketsSection.tsx","../../src/dialogs/BulkEdits/BulkEditMarketplacePricesDialog/BulkEditMarketplacePricesDialog.tsx","../../src/components/Listings/InventoryActionDropdown/components/BulkChangeMarketplacePriceAction/LaunchChangeMarketplacePrice.tsx","../../src/components/Listings/InventoryActionDropdown/components/BulkChangeMarketplacePriceAction/useBulkChangeMarketplacePriceAction.tsx","../../src/hooks/useUserHasAutopricingFeature.tsx","../../src/dialogs/BulkEdits/BulkEditAutoPricingSettingsDialog/BulkEditAutoPricingSettingsDialog.utils.ts","../../src/dialogs/BulkEdits/BulkEditAutoPricingSettingsDialog/useBulkAutoPricingSettings.ts","../../src/dialogs/BulkEdits/BulkEditAutoPricingSettingsDialog/components/PricingSetting.tsx","../../src/dialogs/BulkEdits/BulkEditAutoPricingSettingsDialog/components/AutoPricingEnabled.tsx","../../src/dialogs/BulkEdits/BulkEditAutoPricingSettingsDialog/components/AutoPricingSettings.styled.ts","../../src/dialogs/BulkEdits/BulkEditAutoPricingSettingsDialog/components/PricingSubheader/SettingsSubheader.tsx","../../src/dialogs/BulkEdits/BulkEditAutoPricingSettingsDialog/components/PricingAdvancedSettings/PricingAdvancedSettings.tsx","../../src/contexts/EventMapContext/useGetVenueZoneMapConfigInfo.tsx","../../src/contexts/EventMapContext/useGetVenueZoneMapConfigInfoOverrides.tsx","../../src/dialogs/BulkEdits/BulkEditAutoPricingSettingsDialog/components/PricingAgainst/RowComp.tsx","../../src/dialogs/BulkEdits/BulkEditAutoPricingSettingsDialog/components/PricingAgainst/PricingAgainst.tsx","../../src/dialogs/BulkEdits/BulkEditAutoPricingSettingsDialog/components/PricingProtection/FloorAdjustmentInput.tsx","../../src/dialogs/BulkEdits/BulkEditAutoPricingSettingsDialog/components/PricingProtection/PricingProtection.tsx","../../src/core/interim/dialogs/ConfirmDialog/ConfirmDialogV2.tsx","../../src/core/interim/dialogs/ConfirmDialog/useConfirmDialog.tsx","../../src/hooks/api/useAutoPricingStrategies.tsx","../../src/components/AutoPricing/SimplifiedAutopricingSection/SimplifiedAutopricingGuidedPrice.tsx","../../src/modals/ListingDetails/components/PricingSection/AutoPricingStrategySection.tsx","../../src/components/AutoPricing/SimplifiedAutopricingSection/SimplifiedAutopricingSection.tsx","../../src/components/AutoPricing/SimplifiedAutopricingSectionV2/SimplifiedAutopricingSection.tsx","../../src/components/Listings/ListingNoteBadge/ListingNoteBadge.tsx","../../src/components/Listings/ComparableListingDisplay/ComparableListingDisplayTooltip/DividerLine.tsx","../../src/components/Listings/ComparableListingDisplay/ComparableListingDisplayTooltip/ComparableListingDisplayTooltip.tsx","../../src/components/Listings/ComparableListingDisplay/ComparableListingDisplay.tsx","../../src/components/Listings/ComparableListings/ComparableListingItem/ConnectedComparableListingDisplay.tsx","../../src/components/Listings/ComparableListings/ComparableListingItem/FloorCeilingBarDisplay.tsx","../../src/components/Listings/ComparableListings/ComparableListingItem/YourAutoPricerResultsDisplay.tsx","../../src/components/Listings/ComparableListings/ComparableListingItem/ComparableListingItem.tsx","../../src/components/Listings/ComparableListings/ComparableListings.tsx","../../src/components/Listings/ConnectedComparableListings/ConnectedComparableListings.tsx","../../src/components/Listings/MapWithCompListingsPreview/MapWithCompListingsPreview.hooks.ts","../../src/components/AutoPricing/QuickFloorInput/QuickFloorInput.tsx","../../src/core/ui/FloatingToolbar/FloatingToolbar.tsx","../../src/svgs/QuickAtionShieldIcon.tsx","../../src/components/Listings/MapWithCompListingsPreview/QuickFloorToolbar.tsx","../../src/components/Listings/MapWithCompListingsPreview/MapWithCompListingsPreview.tsx","../../src/hooks/useComparableListingsVenueMapColor.tsx","../../src/hooks/useCompListingDisabledSections.tsx","../../src/hooks/useGetCompListings.tsx","../../src/modals/ListingDetails/components/AutoPricePreview/useAutoPricePreview.tsx","../../src/modals/ListingDetails/components/ListingDetailsModalSidePanel/ListingDetailsModalSidePanelContext.tsx","../../src/modals/ListingDetails/components/AutoPricePreview/AutoPricePreview.tsx","../../src/modals/ListingDetails/components/listingDetailsUtils.tsx","../../src/modals/ListingDetails/components/PricingSection/AdvancePricingSection.tsx","../../src/modals/ListingDetails/components/PricingSection/AutoPricingSettingsSection.hook.tsx","../../src/modals/ListingDetails/components/PricingSection/AutoPricingSettingsSection.tsx","../../src/modals/ListingDetails/components/PricingSection/PricingProtection.tsx","../../src/modals/ListingDetails/components/PricingSection/AutoPricingSection.tsx","../../src/dialogs/AutoPricingStrategyDialog/AutoPricingStrategyDialog.tsx","../../src/dialogs/BulkEdits/BulkEditAutoPricingSettingsDialog/components/PricingStrategy.tsx","../../src/dialogs/BulkEdits/BulkEditAutoPricingSettingsDialog/components/AutoPricingSettings.tsx","../../src/hooks/useOverflowX.ts","../../src/components/Listings/ListingsCarouselCard/ListingsCarouselCard.tsx","../../src/components/Listings/ListingsCarousel/ListingsCarousel.tsx","../../src/components/Listings/CompListingsPreview/CompListingsPreview.tsx","../../src/contexts/EventMapContext/useGetActiveVenueZoneMapSectionGroups.tsx","../../src/hooks/useEventVenueMapSectionHandler.tsx","../../src/dialogs/BulkEdits/BulkEditAutoPricingSettingsDialog/components/BulkEditAutoPricingSettingsSidePanel/BulkEditAutoPricingSettingsSidePanel.hooks.ts","../../src/dialogs/BulkEdits/BulkEditAutoPricingSettingsDialog/components/BulkEditAutoPricingSettingsSidePanel/BulkEditAutoPricingSettingsSidePanel.tsx","../../src/dialogs/BulkEdits/BulkEditAutoPricingSettingsDialog/PricingSettingsPreview/PricingSettingsPreview.types.ts","../../src/dialogs/BulkEdits/BulkEditAutoPricingSettingsDialog/PricingSettingsPreview/PricingSettingsPreview.constants.tsx","../../src/dialogs/BulkEdits/BulkEditAutoPricingSettingsDialog/PricingSettingsPreview/PricingSettingsPreview.hooks.tsx","../../src/dialogs/BulkEdits/BulkEditAutoPricingSettingsDialog/PricingSettingsPreview/PricingSettingsPreview.tsx","../../src/dialogs/BulkEdits/BulkEditAutoPricingSettingsDialog/BulkEditAutoPricingSettingsDialog.tsx","../../src/hooks/api/usePricingConfigFromEventIds.ts","../../src/components/Listings/InventoryActionDropdown/components/BulkEditAutoPricingSettingsAction/LaunchEditAutoPricingSettings.tsx","../../src/components/Listings/InventoryActionDropdown/components/BulkEditAutoPricingSettingsAction/useBulkEidtAutoPricingSettings.tsx","../../src/components/common/BulkActions/BulkEditNumber/BulkEditNumber.tsx","../../src/dialogs/BulkEdits/BulkEditListingPricingFloorCeilingDialog/BulkEditListingPricingFloorCeilingDialog.constants.ts","../../src/dialogs/BulkEdits/BulkEditListingPricingFloorCeilingDialog/BulkEditListingPricingFloorCeilingDialog.styled.tsx","../../src/dialogs/BulkEdits/BulkEditListingPricingFloorCeilingDialog/BulkEditListingPricingFloorCeilingDialog.tsx","../../src/hooks/useBulkChangeFloorCeilingActions.tsx","../../src/components/Events/EventListing/InventoryEventListing/BulkActions/InventoryEventBulkActions/Actions/PricingActions.tsx","../../src/components/Listings/InventoryActionDropdown/components/BulkChangeEventAction/LaunchChangeEvent.tsx","../../src/components/Listings/InventoryActionDropdown/components/BulkChangeEventAction/useBulkChangeEventAction.tsx","../../src/core/POS/MessageWithIcon/InfoMessage.tsx","../../src/dialogs/BulkEdits/BulkChangeTicketTypeRuleDialog/BulkChangeTicketTypeRuleDialog.tsx","../../src/components/Listings/InventoryActionDropdown/components/BulkChangeTicketTypeRuleAction/LaunchChangeTicketTypeRule.tsx","../../src/components/Listings/InventoryActionDropdown/components/BulkChangeTicketTypeRuleAction/useBulkChangeTicketTypeRuleAction.tsx","../../src/components/Purchases/BulkActions/useUpdatePurchasesPermissions.ts","../../src/components/common/BulkActions/BulkEditCommissionAction/LaunchBulkEditCommission.tsx","../../src/dialogs/BulkEdits/BulkEditCommissionDialog/BulkEditCommissionDialog.tsx","../../src/components/Listings/InventoryActionDropdown/components/BulkEditCommissionAction/useBulkEditCommissionAction.tsx","../../src/dialogs/BulkEdits/BulkEditMarketplaceSeatingDialog/BulkEditMarketplaceSeatingDialog.tsx","../../src/components/Listings/InventoryActionDropdown/components/BulkEditMarketplaceSeating/LaunchEditMarketplaceSeating.tsx","../../src/components/Listings/InventoryActionDropdown/components/BulkEditMarketplaceSeating/useBulkEditMarketplaceSeatingAction.tsx","../../src/dialogs/BulkEdits/BulkRemovePredeliveryDialog/BulkRemovePredeliveryDialog.tsx","../../src/components/Listings/InventoryActionDropdown/components/BulkRemovePredeliveryAction/LaunchRemovePredelivery.tsx","../../src/components/Listings/InventoryActionDropdown/components/BulkRemovePredeliveryAction/useBulkRemovePredelivery.tsx","../../src/components/common/BulkActions/BulkUpdateAutoFulfillAction/useBulkUpdateAutoFulfillPermissions.ts","../../src/components/common/BulkActions/BulkUpdateAutoFulfillAction/LaunchBulkUpdateAutoFulfill.tsx","../../src/dialogs/BulkEdits/BulkUpdateAutoFulfillDialog/BulkUpdateAutoFulfillDialog.tsx","../../src/components/Listings/InventoryActionDropdown/components/BulkUpdateAutoFulfillAction/useBulkUpdateAutoFulfillAction.tsx","../../src/dialogs/BulkEdits/BulkEditDeliveryTypeDialog/BulkEditDeliveryTypeDialog.tsx","../../src/components/Listings/InventoryActionDropdown/components/BulkUpdateDeliveryType/LaunchBulkUpdateDeliveryType.tsx","../../src/components/Listings/InventoryActionDropdown/components/BulkUpdateDeliveryType/useBulkUpdateDeliveryType.tsx","../../src/components/common/BulkActions/BulkUpdateInternalNotesAction/useBulkUpdateInternalNotesPermissions.ts","../../src/components/common/BulkActions/BulkUpdateInternalNotesAction/LaunchBulkUpdateInternalNotes.tsx","../../src/dialogs/BulkEdits/BulkUpdateInternalNotesDialog/BulkUpdateInternalNotesDialog.tsx","../../src/components/Listings/InventoryActionDropdown/components/BulkUpdateInternalNotesAction/useBulkUpdateInternalNotesAction.tsx","../../src/dialogs/BulkEdits/BulkEditSeatTraitsDialog/BulkEditSeatTraitsDialog.tsx","../../src/components/Listings/InventoryActionDropdown/components/BulkUpdateSeatTraits/LaunchBulkUpdateSeatTraits.tsx","../../src/components/Listings/InventoryActionDropdown/components/BulkUpdateSeatTraits/useBulkUpdateSeatTraits.tsx","../../src/components/Listings/InventoryActionDropdown/components/BulkWasteTicketsAction/LaunchBulkWasteTickets.tsx","../../src/dialogs/BulkEdits/BulkWasteTicketsDialog/BulkWasteTicketsDialog.tsx","../../src/components/Listings/InventoryActionDropdown/components/BulkWasteTicketsAction/useBulkWasteTicketsAction.tsx","../../src/dialogs/BulkEdits/BulkDeleteSeatSaversDialog/BulkDeleteSeatSaversDialog.tsx","../../src/components/Listings/InventoryActionDropdown/components/LaunchDeleteSeatSaversAction/LaunchDeleteSeatSavers.tsx","../../src/components/Listings/InventoryActionDropdown/components/LaunchDeleteSeatSaversAction/useBulkDeleteSeatSavers.tsx","../../src/components/Events/EventListing/InventoryEventListing/BulkActions/InventoryEventBulkActions/Actions/SettingsActions.tsx","../../src/components/common/BulkActions/BulkEditTagsAction/useBulkEditTagsPermissions.ts","../../src/components/common/BulkActions/BulkEditTagsAction/BulkEditTagsActionPermissionsHandler.tsx","../../src/dialogs/BulkEdits/BulkEditTagDialog/BulkEditTagDialog.styled.tsx","../../src/dialogs/BulkEdits/BulkEditTagDialog/BulkEditTagDialog.tsx","../../src/components/common/BulkActions/BulkEditTagsAction/LaunchBulkEditTags.tsx","../../src/components/Listings/InventoryActionDropdown/components/BulkEditTagsAction/useBulkEditTagsAction.tsx","../../src/components/Events/EventListing/InventoryEventListing/BulkActions/InventoryEventBulkActions/Actions/TagsActions.tsx","../../src/components/Events/EventListing/InventoryEventListing/BulkActions/InventoryEventBulkActions/InventoryEventBulkActions.tsx","../../src/components/Listings/InventoryEventPage/Sections/ManualPricingSection.utils.ts","../../src/utils/groupingUtils.ts","../../src/tables/EventsTable/configs/EventDisplayCell.tsx","../../src/navigations/Routes/InventoryEvent/InventoryEvent.utils.ts","../../src/tables/EventsTable/configs/EventsActionCell.tsx","../../src/tables/EventsTable/configs/LocationDisplayCell.tsx","../../src/tables/EventsTable/configs/VenueDisplayCell.tsx","../../src/tables/EventsTable/configs/EventsTableColumnsConfig.tsx","../../src/components/Reports/ReportsExport/ReportsExport.types.ts","../../src/tables/ReportTableCommon/LinkCell.tsx","../../src/tables/ReportTableCommon/ReportTableCommon.constants.ts","../../src/tables/ReportTableCommon/TableHeader.tsx","../../src/tables/ReportTableCommon/TextCell.tsx","../../src/tables/ListingTable/configs/CustomNumericFooterCell.tsx","../../src/tables/ListingTable/configs/ListingReportTableColumnsConfig.tsx","../../src/svgs/AutomatiqSquareLogo.tsx","../../src/svgs/AxsSquareLogo.tsx","../../src/svgs/FaxExchangeSquareLogo.tsx","../../src/svgs/GametimeSquareLogo.tsx","../../src/svgs/GoTicketsSquareLogo.tsx","../../src/svgs/LyteSquareLogo.tsx","../../src/svgs/SeatGeekSquareLogo.tsx","../../src/svgs/StubHubSquareLogo.tsx","../../src/svgs/TicketEvolutionSquareLogo.tsx","../../src/svgs/TicketmasterSquareLogo.tsx","../../src/svgs/TicketNetworkSquareLogo.tsx","../../src/svgs/TickPickSquareLogo.tsx","../../src/svgs/VividSeatsSquareLogo.tsx","../../src/components/common/MarketplaceSquareLogo/MarketplaceSquareLogo.tsx","../../src/components/MarketplacePayments/ConvertPaymentAmount/ConvertPaymentAmount.tsx","../../src/tables/MarketplacePaymentsTable/Cells/MarketplacePaymentOptionsAction.tsx","../../src/tables/MarketplacePaymentsTable/Cells/MarketplacePaymentsActionsCell.tsx","../../src/tables/MarketplacePaymentsTable/MarketplacePaymentsTableCommon.constants.ts","../../src/tables/MarketplacePaymentsTable/useMarketplacePaymentsTableColumnsConfig.tsx","../../src/tables/PaymentsTable/useDefaultPaymentsColumnConfig.tsx","../../src/tables/PurchaseTable/PurchaseTable.types.ts","../../src/components/Purchases/CommissionsCell/CommissionsCell.tsx","../../src/tables/PurchaseTable/configs/PurchaseActionsCell.tsx","../../src/tables/PurchaseTable/configs/PurchaseIdCell.tsx","../../src/tables/PurchaseTable/configs/PurchaseTableColumnsConfig.tsx","../../src/tables/SalesTable/configs/SaleReportTableColumnsAccessor.tsx","../../src/tables/SalesTable/configs/SaleReportTableColumnsConfig.utils.ts","../../src/tables/SalesTable/configs/SaleReportTableColumnsConfig.tsx","../../src/components/common/MerchantDisplay/MerchantDisplay.tsx","../../src/components/Sales/SaleMarketplaceIdDisplay/SaleMarketplaceIdDisplay.tsx","../../src/tables/SalesTable/configs/ProceedsCell.tsx","../../src/tables/SalesTable/SalesTable.type.ts","../../src/tables/SalesTable/configs/SalesActionsCell.tsx","../../src/tables/SalesTable/configs/SaleTableColumnsConfig.tsx","../../src/tables/SalesTable/configs/SaleTableFlattenedColumnsConfig.tsx","../../src/modals/InventoryTableColumns/ColumnListItem/ColumnListItem.tsx","../../src/modals/InventoryTableColumns/useColumnDisplayName.tsx","../../src/modals/ColumnSettings/ColumnsSection.tsx","../../src/svgs/OperatorsIcon.tsx","../../src/modals/ColumnSettings/CustomColumnInstruction.tsx","../../src/modals/ColumnSettings/TableCustomColumnModal.tsx","../../src/modals/ColumnSettings/TableColumnsInput.tsx","../../src/modals/ColumnSettings/ColumnSettings.tsx","../../src/components/common/MultiSelect/Toggle/contants.ts","../../src/svgs/MultiEditCheckboxChecked.tsx","../../src/svgs/MultiEditCheckboxUnchecked.tsx","../../src/components/common/MultiSelect/Toggle/MultiSelectionToggle.tsx","../../src/components/common/MultiSelect/Toggle/MultiSelectionToggleGroup.tsx","../../src/components/Accordions/InventoryEventsAccordion/EventListingHeader.tsx","../../src/components/Accordions/InventoryEventsAccordion/InventoryEventsAccordion.tsx","../../src/tables/SalesTable/SalesTable.tsx","../../src/tiles/SaleTiles/SaleTiles.styled.tsx","../../src/tiles/SaleTiles/SaleTiles.tsx","../../src/components/Accordions/SalesEventsAccordion/EventSaleBody.tsx","../../src/components/Sales/BulkActions/SalesBulkActionsPermissions.tsx","../../src/components/Sales/BulkActions/useUpdateSalesSettingsPermissions.ts","../../src/components/Sales/SalesActionDropdown/SalesActionDropdown.constants.ts","../../src/components/Sales/SalesActionDropdown/components/BulkEditCommissionAction/useBulkEditCommissionAction.tsx","../../src/dialogs/BulkEdits/BulkMarkSaleAsPaidDialog/BulkMarkSaleAsPaidDialog.tsx","../../src/components/Sales/SalesActionDropdown/components/BulkMarkSaleAsPaid/LaunchBulkMarkSaleAsPaid.tsx","../../src/components/Sales/SalesActionDropdown/components/BulkMarkSaleAsPaid/useBulkMarkSaleAsPaid.tsx","../../src/components/Sales/SalesActionDropdown/components/BulkUpdateInternalNotesAction/useBulkUpdateInternalNotesAction.tsx","../../src/modals/SaleDetails/components/PaymentCurrencyConversionSection.tsx","../../src/modals/SaleDetails/components/PaymentSection/SaleLineItemModal/ChargeOrCreditReason/ChargeReasonSelector.tsx","../../src/modals/SaleDetails/components/PaymentSection/SaleLineItemModal/ChargeOrCreditReason/CreditReasonSelector.tsx","../../src/modals/SaleDetails/hooks/useHasPaymentsSectionsV2Feature.ts","../../src/modals/SaleDetails/components/PaymentSection/SaleLineItemModal/ChargeOrCreditReason/ChargeOrCreditReasonSelector.tsx","../../src/modals/SaleDetails/components/PaymentSection/SaleLineItemModal/SaleLineItemModal.tsx","../../src/hooks/features/useHasWasteSaleFeature.ts","../../src/modals/SaleDetails/hooks/useShouldHideForWastedSale.ts","../../src/modals/SaleDetailsV2/SaleDetails.constants.ts","../../src/modals/SaleDetailsV2/hooks/useGetModalGridFormat.ts","../../src/modals/SaleDetails/components/PaymentSection/PaymentSection.tsx","../../src/modals/SaleDetails/components/SaleCancellationReason.tsx","../../src/modals/SaleDetailsV2/components/DeliverySection.tsx","../../src/modals/SaleDetailsV2/components/FulfillmentSection.tsx","../../src/dialogs/BulkEdits/BulkEditSalesSettingsDialog/BulkEditSalesSettingsDialog.tsx","../../src/components/Sales/SalesActionDropdown/components/BulkUpdateSalesGeneralSettings/LaunchUpdateSaleSettings.tsx","../../src/components/Sales/SalesActionDropdown/components/BulkUpdateSalesGeneralSettings/useBulkUpdateSalesSettings.tsx","../../src/components/Sales/BulkActions/useSalesBulkActionsState.ts","../../src/components/Sales/BulkActions/SalesEventBulkActions/Actions/SettingsActions.tsx","../../src/components/Sales/SalesActionDropdown/components/BulkEditTagsAction/useBulkEditTagsAction.tsx","../../src/components/Sales/BulkActions/SalesEventBulkActions/Actions/TagsActions.tsx","../../src/components/common/BulkActions/BulkMarkAsFulfilled/LaunchBulkMarkAsFulfilled.tsx","../../src/components/Sales/SalesActionDropdown/SalesGlobalActionDropdown.tsx","../../src/dialogs/BulkEdits/BulkMarkAsFulfilledDialog/BulkMarkAsFulfilledDialog.tsx","../../src/components/Sales/SalesActionDropdown/components/BulkMarkAsFulfilled/useBulkMarkAsFulfilledAction.tsx","../../src/components/Sales/SalesActionDropdown/components/BulkUpdateAutoFulfillAction/useBulkUpdateAutoFulfillAction.tsx","../../src/components/Sales/BulkActions/SalesGlobalBulkActions/Actions/FulfillmentActions.tsx","../../src/components/Sales/BulkActions/SalesEventBulkActions/SalesEventBulkActions.tsx","../../src/components/Accordions/SalesEventsAccordion/EventSaleHeader.styled.tsx","../../src/components/Accordions/SalesEventsAccordion/FullPageEventAction.tsx","../../src/components/Accordions/SalesEventsAccordion/EventSaleHeader.tsx","../../src/components/Accordions/SalesEventsAccordion/SalesEventsAccordion.tsx","../../src/tables/MarketplacePaymentLinesTable/MarketplacePaymentLinesTableCommon.constants.ts","../../src/utils/columns/marketplacePaymentLines/marketplacePaymentLinesColumnsUtils.types.ts","../../src/dialogs/LinkMarketplacePaymentToSaleDialog/useGetRemainingBalance.ts","../../src/dialogs/LinkMarketplacePaymentToSaleDialog/SaleLineItemModalWrapper.tsx","../../src/hooks/api/useGetSaleLineItemsBySaleId.ts","../../src/dialogs/LinkMarketplacePaymentToSaleDialog/SaleChargesTable.tsx","../../src/dialogs/LinkMarketplacePaymentToSaleDialog/LinkMarketplacePaymentToSaleDialog.tsx","../../src/hooks/api/useUnlinkMarketplacePaymentLineToSale.ts","../../src/dialogs/UnlinkMarketplacePaymentLineDialog/UnlinkMarketplacePaymentLineToSaleDialog.tsx","../../src/hooks/api/useGetSaleByAmbiguousIdWithCatalogData.ts","../../src/dialogs/LinkMarketplacePaymentLineDialog/SaleEventBox/SaleEventBox.tsx","../../src/hooks/api/useLinkMarketplacePaymentLineToSale.ts","../../src/dialogs/LinkMarketplacePaymentLineDialog/LinkMarketplacePaymentLineToSaleDialog.tsx","../../src/tables/MarketplacePaymentLinesTable/Cell/LinkMarketplacePaymentLineToSale.tsx","../../src/tables/MarketplacePaymentLinesTable/Cell/MarketplacePaymentLinesActionsCell.tsx","../../src/tables/MarketplacePaymentLinesTable/useMarketplacePaymentLinesTableColumnsConfig.tsx","../../src/tables/MarketplacePaymentLinesTable/MarketplacePaymentLinesTable.tsx","../../src/modals/MaketplacePayments/MarketplacePaymentsDetailsModalBody.tsx","../../src/modals/MaketplacePayments/MarketplacePaymentsDetailsModal.tsx","../../src/modals/MaketplacePayments/MarketplacePaymentsDetails.tsx","../../src/utils/marketplacePaymentUtils.ts","../../src/modals/SaleDetails/components/MarketplacePaymentSection/MarketplacePaymentLines.tsx","../../src/modals/SaleDetails/components/MarketplacePaymentSection/MarketplacePaymentSection.tsx","../../src/modals/SaleDetails/components/MarketplacePaymentTerms/MarketplacePaymentTerms.tsx","../../src/modals/SaleDetails/components/PaymentSectionV2/PaymentSectionTable/PaymentSectionTable.tsx","../../src/modals/SaleDetails/components/PaymentSectionV2/PaymentSectionV2.tsx","../../src/modals/SaleDetails/components/PaymentSectionSelector.tsx","../../src/modals/SaleDetails/components/TagsSection.tsx","../../src/modals/SaleDetails/SaleDetails.constants.ts","../../src/modals/SaleDetails/SaleDetailsFooter.tsx","../../src/modals/SaleDetails/components/AutoSourceTickets.tsx","../../src/core/ui/CopyToClipboard/CopyToClipboard.tsx","../../src/components/common/LinkAndCopy/LinkAndCopy.tsx","../../src/modals/SaleDetails/components/ListingLinksDetail.tsx","../../src/modals/SaleDetailsV2/components/SaleTickets/AllocatedListing.tsx","../../src/modals/SaleDetailsV2/components/SaleTickets/OriginalListing.tsx","../../src/modals/SaleDetailsV2/components/SaleTickets/SaleTickets.tsx","../../src/modals/common/PurchaseInfoSection/PurchaseInfoSection.tsx","../../src/dialogs/SaleCommissionOverrideDialog/SaleCommissionOverrideFormWrapper.tsx","../../src/dialogs/SaleCommissionOverrideDialog/SaleCommissionOverrideDialog.tsx","../../src/modals/SaleDetails/components/Commissions/Commissions.constants.ts","../../src/modals/SaleDetails/components/Commissions/CommissionsOverrideTable/CommissionsOverridesTable.tsx","../../src/modals/SaleDetails/components/Commissions/CommissionsTable/CommissionsTable.tsx","../../src/modals/SaleDetails/components/Commissions/CommissionsSection.tsx","../../src/modals/SaleDetailsV2/components/YourSaleSection.tsx","../../src/modals/SaleDetailsV2/SaleDetailsModalBody.tsx","../../src/modals/SaleDetails/SaleDetails.tsx","../../src/modals/SaleDetails/components/TicketsSection.tsx","../../src/modals/ConfirmSale/SeatingAllocationInput/SeatingAllocationInput.tsx","../../src/modals/ConfirmSale/SeatingAllocationInput/SeatingAllocationInputV1.tsx","../../src/modals/ConfirmSale/SeatingAllocationInput/SeatingSingleTicketAllocationInput.tsx","../../src/modals/ConfirmSale/SeatingAllocationInput/SeatingAllocationInputV2.tsx","../../src/modals/ConfirmSale/ConfirmSale.tsx","../../src/modals/SaleDetails/actions/LaunchConfirmSale.tsx","../../src/components/Buttons/DeallocateButton.tsx","../../src/modals/SaleDetails/actions/LaunchDeallocateSale.tsx","../../src/modals/SaleDetails/actions/LaunchDownloadUserDocuments.tsx","../../src/components/Selectors/BuyerSelector/useBuyerSelector.tsx","../../src/modals/ManagedMarketplaceSale/components/BuyerSection.tsx","../../src/modals/ManagedMarketplaceSale/components/MarketplaceSaleInfoSection.tsx","../../src/modals/ManagedMarketplaceSale/components/TicketSection.tsx","../../src/modals/ManagedMarketplaceSale/ManagedMarketplaceSaleBody.tsx","../../src/modals/ManagedMarketplaceSale/ManagedMarketplaceSale.tsx","../../src/modals/SaleDetails/actions/LaunchEditOfflineSale.tsx","../../src/modals/SaleDetails/actions/LaunchExpireHold.tsx","../../src/modals/SaleDetails/actions/LaunchMarkAsFulfilled.tsx","../../src/components/Buttons/RejectButton.tsx","../../src/modals/SaleDetails/actions/LaunchRejectSale.tsx","../../src/modals/SaleDetails/actions/LaunchResetFulfillment.tsx","../../src/modals/SaleDetails/components/ResetFulfillmentDialog.tsx","../../src/modals/SaleDetails/actions/LaunchResetFulfillmentV2.tsx","../../src/modals/SaleDetails/actions/LaunchResetFulfillmentButton.tsx","../../src/dialogs/TurnOnSaleAutoFulfillDialog/TurnOnSaleAutoFulfillDialog.tsx","../../src/modals/TransferTickets/views/ImageProof.tsx","../../src/modals/TransferTickets/views/ProofTypeSelection.tsx","../../src/modals/TransferTickets/views/TransferIdProof.tsx","../../src/modals/TransferTickets/views/TransferTicketsRecipientBody.tsx","../../src/modals/TransferTickets/views/UrlProof/URLInput.tsx","../../src/modals/TransferTickets/views/UrlProof/UrlProof.tsx","../../src/modals/TransferTickets/TransferTickets.tsx","../../src/modals/SaleDetails/actions/LaunchTransferTickets.tsx","../../src/hooks/api/useUnwasteSale.ts","../../src/modals/SaleDetails/components/UnwasteTickets/UnwasteTicketsButton.tsx","../../src/modals/UploadBarcodes/LaunchUploadBarcodes.tsx","../../src/modals/UploadETickets/UploadETicketsV2.tsx","../../src/modals/PurchaseWizard/UploadETicketsSelector.tsx","../../src/modals/UploadETickets/LaunchUploadETickets.tsx","../../src/svgs/CancelledHoldIcon.tsx","../../src/svgs/FulfilledIcon.tsx","../../src/svgs/FulfillmentFailedIcon.tsx","../../src/svgs/HoldIcon.tsx","../../src/svgs/PendingAllocationIcon.tsx","../../src/svgs/PendingFulfillmentIcon.tsx","../../src/svgs/PendingRejectionIcon.tsx","../../src/svgs/ProcessingFulfillmentIcon.tsx","../../src/svgs/SaleCancelledIcon.tsx","../../src/utils/saleUtils.tsx","../../src/modals/common/EventEntityHeader/SaleInfoDisplay.tsx","../../src/modals/common/Summary/Summary.tsx","../../src/modals/PurchaseWizard/PurchaseTicketsFlow/components/PurchaseTicketFlowEventHeader.tsx","../../src/modals/PurchaseWizard/PurchaseTicketsFlow/components/CostSection.tsx","../../src/modals/PurchaseWizard/PurchaseTicketsFlow/components/DeliverySection.tsx","../../src/modals/PurchaseWizard/PurchaseTicketsFlow/components/NewListingSection.tsx","../../src/modals/common/Purchase/SeatTraitsSelectionInput/SeatTraitsSelectionInput.tsx","../../src/modals/PurchaseWizard/PurchaseTicketsFlow/components/SeatingSection.tsx","../../src/modals/PurchaseWizard/PurchaseTicketsFlow/TicketGroupInput.tsx","../../src/modals/PurchaseWizard/PurchaseTicketsFlow/PurchaseTicketsFlow.tsx","../../src/modals/PurchaseWizard/PurchaseWizard.types.tsx","../../src/modals/PurchaseWizard/PurchaseWizardBody.tsx","../../src/modals/PurchaseWizard/PurchaseWizard.tsx","../../src/modals/PurchaseWizard/PurchaseWizardModalConfig.tsx","../../src/utils/purchaseUtils.tsx","../../src/contexts/NotificationsContext/NativeNotification.tsx","../../src/contexts/NotificationsContext/NotificationsContext.tsx","../../src/contexts/BulkEditHubContext/BulkEditHubContext.tsx","../../src/components/common/BulkActions/BulkEditStatus/components/BulkEditErrorList/BulkEditErrorList.tsx","../../src/components/common/BulkActions/BulkEditStatus/components/BulkEditPreviewDisplay/BulkEditGettingPreview.tsx","../../src/components/common/BulkActions/BulkEditStatus/components/BulkEditPreviewDisplay/BulkEditPreviewListingDetails.tsx","../../src/tables/PurchaseTicketTable/useGetPurchasesTableColumns.ts","../../src/tables/PurchaseTable/usePurchaseTableData.tsx","../../src/tables/PurchaseTable/usePurchaseTableSelection.tsx","../../src/tables/PurchaseTable/PurchaseTable.tsx","../../src/components/common/BulkActions/BulkEditStatus/components/BulkEditPreviewDisplay/BulkEditPreviewPurchaseDetails.tsx","../../src/tables/SalesTable/SalesTableFlattened.tsx","../../src/components/common/BulkActions/BulkEditStatus/components/BulkEditPreviewDisplay/BulkEditPreviewSaleDetails.tsx","../../src/components/common/BulkActions/BulkEditStatus/components/BulkEditPreviewDisplay/BulkEditPreviewTicketGroupDetails.tsx","../../src/components/common/BulkActions/BulkEditStatus/components/BulkEditPreviewDisplay/BulkEditPreviewDisplay.tsx","../../src/components/common/BulkActions/BulkEditStatus/components/BulkEditProgressDisplay/CountsByEntityDisplay.tsx","../../src/components/common/BulkActions/BulkEditStatus/components/BulkEditProgressDisplay/BulkEditProgressDisplay.tsx","../../src/components/common/BulkActions/BulkEditStatus/components/BulkEditWarningList/BulkEditWarningList.tsx","../../src/components/common/BulkActions/BulkEditStatus/BulkEditStatus.tsx","../../src/components/common/BulkActions/BulkEditStatus/bulkEditUtils.ts","../../src/hooks/useGetListingAutoPricingSettings.tsx","../../src/modals/ListingDetails/ListingForms/AutoPricingForm/useAutoPricingSettings.ts","../../src/modals/ListingDetails/ListingForms/AutoPricingForm/Sections/AutoPricingStrategySection.tsx","../../src/modals/ListingDetails/ListingForms/AutoPricingForm/components/ListingAutoPricingSettingsFormContent/ListingAutoPricingSettingsFormContent.tsx","../../src/modals/ListingDetails/ListingForms/AutoPricingForm/components/ListingAutoPricingSettingsFormContentWrapper/ListingAutoPricingSettingsFormContentWrapper.tsx","../../src/dialogs/BulkEdits/BulkEditListingSettingsDialog/components/AutoPricingSettings.tsx","../../src/dialogs/BulkEdits/BulkEditListingSettingsDialog/components/GeneralSettings.tsx","../../src/dialogs/BulkEdits/BulkEditListingSettingsDialog/BulkEditListingSettingsDialog.tsx","../../src/components/Listings/InventoryActionDropdown/components/BulkUpdateListingSettingsAction/LaunchUpdateListingSettings.tsx","../../src/components/Listings/InventoryActionDropdown/components/BulkUpdateListingSettingsAction/useBulkUpdateListingSettings.tsx","../../src/components/Listings/InventoryEventPage/CommandMenu/CommandMenu.tsx","../../src/navigations/Routes/Settings/constants.ts","../../src/utils/columns/adCampaigns/adCampaignsColumnUtils.types.ts","../../src/utils/columns/adGroups/adGroupsColumnUtils.types.ts","../../src/utils/columns/commission/commissionColumnUtils.types.ts","../../src/utils/reportsFilterUtils.tsx","../../src/utils/constants/contentIdMaps.ts","../../src/contexts/EventMapContext/useVenueZoneMapIntegration.ts","../../src/contexts/EventMapContext/EventMapContext.tsx","../../src/contexts/EventMapContext/useGetSectionRowFromVenueMapConfig.tsx","../../src/hooks/api/useListingCanBeWasted.tsx","../../src/modals/ListingDetails/components/WasteUnsoldTickets/SaleWasteInfo.tsx","../../src/modals/ListingDetails/components/WasteUnsoldTickets/WasteUnsoldTickets.tsx","../../src/modals/ListingDetails/actions/LaunchWasteUnsoldTickets.tsx","../../src/modals/ListingDetails/actions/LaunchDeleteSeatSaver.tsx","../../src/modals/ViewCompsModal/ViewCompsBody.tsx","../../src/modals/ViewCompsModal/ViewCompsModal.tsx","../../src/modals/ListingDetails/actions/LaunchViewComps.tsx","../../src/modals/ListingDetails/ListingDetailsFooter.tsx","../../src/modals/ListingDetails/ListingForms/AutoPricingForm/AutoPricingForm.hooks.ts","../../src/modals/ListingDetails/ListingForms/BroadcastForm/AdminHoldNotes/AdminHoldNotes.tsx","../../src/modals/ListingDetails/ListingForms/BroadcastForm/MarketplaceBroadcastSection/MarketplaceDisplay.tsx","../../src/modals/ListingDetails/ListingForms/BroadcastForm/MarketplaceBroadcastSection/MarketplaceTable.tsx","../../src/modals/ListingDetails/ListingForms/BroadcastForm/MarketplaceBroadcastSection/useGetMarketplaceFailures.tsx","../../src/modals/ListingDetails/ListingForms/BroadcastForm/MarketplaceBroadcastSection/MarketplaceBroadcastSection.tsx","../../src/modals/ListingDetails/ListingForms/BroadcastForm/BroadcastForm.tsx","../../src/modals/ListingDetails/ListingForms/BroadcastForm/BroadcastForm.hooks.ts","../../src/utils/constants/knownVendors.ts","../../src/utils/constants/colorMaps.ts","../../src/modals/ListingDetails/components/HistoricalPricingGraph/HistoricalPricingGraph.tsx","../../src/modals/ListingDetails/components/HistoricalPricingGraphSection.tsx","../../src/modals/ListingDetails/ListingForms/AutoPricingForm/Sections/PricingProtection.tsx","../../src/modals/ListingDetails/ListingForms/PricingForm/EconomicsSection/EconomicsSection.tsx","../../src/modals/ListingDetails/ListingForms/PricingForm/PricingForm.tsx","../../src/modals/ListingDetails/ListingForms/PricingForm/PricingForm.hooks.ts","../../src/modals/ListingDetails/ListingForms/TagsForm/TagsSection/TagsSection.tsx","../../src/modals/ListingDetails/ListingForms/TagsForm/TagsForm.tsx","../../src/modals/ListingDetails/ListingForms/TagsForm/TagsForm.hooks.ts","../../src/modals/ListingDetails/components/NotesSection.tsx","../../src/modals/ListingDetails/ListingForms/TicketsForm/DeliverySection/TicketTypePrioritySection.tsx","../../src/modals/ListingDetails/ListingForms/TicketsForm/DeliverySection/DeliverySection.tsx","../../src/modals/ListingDetails/ListingForms/TicketsForm/TicketsSection.tsx","../../src/modals/ListingDetails/ListingForms/TicketsForm/TicketsForm.tsx","../../src/modals/ListingDetails/ListingForms/TicketsForm/TicketsForm.hooks.ts","../../src/modals/ListingDetails/ListingDetailsModalV2.hooks.tsx","../../src/modals/ListingDetails/ListingForms/AutoPricingSidePanel/SectionSelectionPanel/SectionSelector.tsx","../../src/modals/ListingDetails/ListingForms/AutoPricingSidePanel/SectionSelectionPanel/SectionSelectionPanel.tsx","../../src/modals/ListingDetails/ListingForms/AutoPricingSidePanel/AutoPricingSidePanel.tsx","../../src/modals/ListingDetails/ListingForms/AutoPricingSidePanel/AutoPricingSidePanelContext.tsx","../../src/modals/ListingDetails/ListingForms/AutoPricingForm/components/AutoPricePreview/useAutoPricePreview.tsx","../../src/modals/ListingDetails/ListingForms/AutoPricingForm/components/AutoPricePreview/AutoPricePreview.tsx","../../src/modals/ListingDetails/ListingForms/AutoPricingForm/components/AutoPricingSectionRowIdFilter.tsx","../../src/modals/ListingDetails/ListingForms/AutoPricingForm/components/SimplifiedAutopricingGuidedPrice.tsx","../../src/modals/ListingDetails/ListingForms/AutoPricingForm/Sections/AdvancePricingSection.tsx","../../src/modals/ListingDetails/ListingForms/AutoPricingForm/Sections/AutoPricingSection.types.ts","../../src/modals/ListingDetails/ListingForms/AutoPricingForm/Sections/AutoPricingSettingsSection.hook.tsx","../../src/modals/ListingDetails/ListingForms/AutoPricingForm/Sections/AutoPricingSettingsSection.tsx","../../src/modals/ListingDetails/ListingForms/AutoPricingForm/Sections/AutoPricingSection.tsx","../../src/modals/ListingDetails/ListingForms/AutoPricingForm/AutoPricingForm.tsx","../../src/modals/ListingDetails/ListingForms/PurchaseForm/PurchaseForm.tsx","../../src/modals/ListingDetails/ListingForms/SalesForm/SalesDetailsSection.tsx","../../src/modals/ListingDetails/ListingForms/SalesForm/SalesForm.tsx","../../src/modals/ListingDetails/ListingDetailsModalV2Context.tsx","../../src/modals/ListingDetails/ListingDetailsModalV2.tsx","../../src/modals/ListingDetails/ListingDetails.tsx","../../src/svgs/PendingQC.tsx","../../src/modals/ListingDetails/actions/LaunchBroadcastListing.tsx","../../src/modals/MarketplaceSale/components/MarketplaceSection.tsx","../../src/modals/MarketplaceSale/MarketplaceSaleBody.tsx","../../src/modals/MarketplaceSale/MarketplaceSale.tsx","../../src/modals/ListingDetails/actions/LaunchCreateMarketplaceSale.tsx","../../src/modals/ListingDetails/actions/LaunchCreateOfflineSale.tsx","../../src/modals/ListingDetails/actions/LaunchDownloadUserDocuments.tsx","../../src/modals/SplitListing/SplitListing.styled.tsx","../../src/modals/SplitListing/SplitListingBody.tsx","../../src/modals/SplitListing/SplitListing.tsx","../../src/modals/ListingDetails/actions/LaunchSplitListing.tsx","../../src/dialogs/SplitListingToOriginalDialog/SplitListingToOriginal.util.ts","../../src/dialogs/SplitListingToOriginalDialog/SplitListingToOriginalDialog.tsx","../../src/modals/ListingDetails/actions/LaunchSplitListingToOriginal.tsx","../../src/dialogs/AddAdminHoldDialog/AddAdminHoldDialog.tsx","../../src/modals/ListingDetails/actions/LaunchUpdateAdminHold.tsx","../../src/modals/UploadExternalIds/LaunchUploadExternalIds.tsx","../../src/modals/UploadTicketUrls/LaunchUploadTicketUrls.tsx","../../src/utils/inventoryUtils.tsx","../../src/contexts/CatalogDataContext/CatalogDataContext.types.ts","../../src/contexts/CatalogDataContext/CatalogDataContextV2.tsx","../../src/contexts/CatalogDataContext/CatalogDataContext.tsx","../../src/contexts/CatalogDataContext/useCatalogDataContext.ts","../../src/components/Buttons/ExportInventoryButton.tsx","../../src/components/Buttons/ExportPurchasesButton.tsx","../../src/components/Buttons/ExportSalesButton.tsx","../../src/components/Buttons/ReloadButton.tsx","../../src/components/Buttons/TransferButton.tsx","../../src/components/Buttons/UploadButton.tsx","../../src/navigations/Routes/OnSaleEvent/OnSaleEventView.constants.tsx","../../src/utils/columns/columnUtils.ts","../../src/contexts/ColumnResizingContext/ColumnResizingContext.tsx","../../src/tables/Table/Table.utils.ts","../../src/tables/Table/TableCells/PinnedCellGradient.tsx","../../src/tables/Table/components/TableTd.tsx","../../src/tables/Table/GroupedVirtuosoTable/PosGroupedVirtuosoGroup.tsx","../../src/tables/Table/PosVirtuosoTableComponent/PosVirtuosoTableRow.tsx","../../src/tables/Table/GroupedVirtuosoTable/PosGroupedVirtuosoItem.tsx","../../src/core/ui/SortButton/SortButton.tsx","../../src/svgs/TableSortingIcon.tsx","../../src/core/ui/SortButton/SortButtonV2.tsx","../../src/svgs/TableFilterIcon.tsx","../../src/core/ui/ColumnFilterButton/ColumnFilterButton.tsx","../../src/tables/Table/hooks/useColumnFilter.tsx","../../src/tables/Table/components/ColumnRangeFilterInput.tsx","../../src/tables/Table/components/ColumnHeaderFilter.tsx","../../src/tables/Table/components/ColumnHeader.tsx","../../src/tables/Table/components/PaginationFooter.tsx","../../src/tables/Table/GroupedVirtuosoTable/PosGroupedVirtuosoList.tsx","../../src/tables/Table/GroupedVirtuosoTable/PosGroupedVirtuosoScroller.tsx","../../src/tables/Table/GroupedVirtuosoTable/useGetVirtuosoGroups.ts","../../src/tables/Table/GroupedVirtuosoTable/PosGroupedVirtuosoTable.tsx","../../src/tables/Table/hooks/useColumnVirtualizer.tsx","../../src/tables/Table/PosVirtuosoTableComponent/PosVirtuosoTable.tsx","../../src/tables/Table/PosVirtuosoTableComponent/PosVirtuosoTableFooter.tsx","../../src/tables/Table/PosVirtuosoTableComponent/PosVirtuosoTableHead.tsx","../../src/tables/Table/Table.hooks.tsx","../../src/tables/Table/Table.tsx","../../src/components/ActivityLog/ActivityLogAdditionalInfo.tsx","../../src/tables/ActivityLogTable/ActivityLogTable.styled.tsx","../../src/tables/ActivityLogTable/configs/ActivityLogDateCell.tsx","../../src/tables/ActivityLogTable/configs/ActivityLogDateRangeCell.tsx","../../src/tables/ActivityLogTable/configs/ActivityLogGroupedTableColumnsConfig.tsx","../../src/tables/ActivityLogTable/configs/ActivityLogTableColumnsConfig.tsx","../../src/tables/ActivityLogTable/ActivityLogTable.tsx","../../src/components/ActivityLog/ActivityLog.styled.tsx","../../src/components/FilterToolbar/FilterDialogV2/FiltersDropdown/FiltersDropdown.tsx","../../src/components/FilterToolbar/FilterDialogV2/FiltersList/FiltersListEmbedded.tsx","../../src/components/FilterToolbar/FilterDialogV2/FiltersList/ReportFilterEditabilityDropdown.tsx","../../src/components/FilterToolbar/FilterDialogV2/FiltersList/FiltersList.tsx","../../src/components/FilterToolbar/FilterDialogV2/FilterDialogV2.tsx","../../src/core/POS/ToolbarButton/ToolbarButton.tsx","../../src/components/FilterToolbar/CustomFilterButton/CustomFilterButton.tsx","../../src/components/FilterToolbar/CustomFilterButton/CustomFilterDialog.tsx","../../src/components/FilterToolbar/MobileFilterToolbar.tsx","../../src/components/FilterToolbar/FilterToolbar.tsx","../../src/components/ActivityLog/ActivityLogFilter.tsx","../../src/components/ActivityLog/ActivityLog.tsx","../../src/components/ActivityLog/ActivityLogDisplay/ActivityLogDisplay.tsx","../../src/contexts/MenuContext/MenuContext.tsx","../../src/hooks/useFetchLoginContext.ts","../../src/hooks/useMainAccessibleRoute.tsx","../../src/contexts/ListingNotificationContext/ListingNotificationContext.tsx","../../src/hooks/useRefreshListingOnNotification.tsx","../../src/dialogs/SearchResultPickerDialog/SearchResultPickerDialog.tsx","../../src/hooks/useHasReleaseNotesUnread.ts","../../src/hooks/api/useGetReleaseNoteHtml.ts","../../src/hooks/useReleaseNotes.ts","../../src/navigations/Routes/ReleaseNotes/ReleaseNotes.tsx","../../src/images/StarburstLogo.png","../../src/components/common/ProLogo/ProLogo.tsx","../../src/components/SellerAccountBasicInfo/SellerAccountBasicInfo.style.tsx","../../src/components/SellerAccountBasicInfo/SellerAccountBasicInfo.tsx","../../src/navigations/MainNav/UserInfoDisplay/UserInfoDisplay.styled.tsx","../../src/navigations/MainNav/UserInfoDisplay/UserInfoDisplay.tsx","../../src/navigations/MainNav/MainNavTopBar/MainNavTitle.tsx","../../src/navigations/MainNav/MainNavTopBar/MainNavTopBar.styled.tsx","../../src/navigations/MainNav/MainNavTopBar/MainNavTopBar.tsx","../../src/navigations/MainNav/MainNavTopBar/MainNavTopBarEmpty.tsx","../../src/navigations/Routes/Offline/Offline.tsx","../../src/navigations/MainNav/MainNavSideBar/MenuItem/MenuItem.tsx","../../src/navigations/MainNav/MainNavSideBar/MainMenu/MainMenu.tsx","../../src/navigations/MainNav/MainNavSideBar/UserMenu/UserMenu.tsx","../../src/navigations/MainNav/MainNavSideBar/MainNavSideBar.tsx","../../src/navigations/MainNav/MobileTopBar/MobileTopBar.tsx","../../src/navigations/LayoutContent/LayoutContent.styled.tsx","../../src/components/common/BackSection/BackSection.tsx","../../src/navigations/LayoutContent/LayoutContentHeader.tsx","../../src/navigations/LayoutContent/LayoutContent.tsx","../../src/navigations/Routes/Activity/Activity.tsx","../../src/contexts/AdGroupsDataContext/AdGroupsDataContext.tsx","../../src/contexts/AdPlatformCatalogDataContext/AdPlatformCatalogDataContext.tsx","../../src/contexts/AdPlatformReportingContext/AdPlatformReportingContext.tsx","../../src/tables/AdGroupsTable/AdGroupsTable.type.ts","../../src/utils/adGroupListingsUtils.tsx","../../src/tables/AdGroupsTable/configs/AdGroupsActionsCell.tsx","../../src/tables/AdGroupsTable/configs/AdGroupsTableColumnConfig.tsx","../../src/tables/AdGroupsTable/useGetAdGroupsTableColumns.ts","../../src/tables/AdGroupsTable/AdGroupsTable.tsx","../../src/utils/adGroupUtils.tsx","../../src/components/AdGroupsFlattenedView/AdGroupsFlattenedView.tsx","../../src/contexts/AdCampaignIdContext/AdCampaignIdContext.tsx","../../src/contexts/AdCampaignsDataContext/AdCampaignsDataContext.tsx","../../src/navigations/Routes/InventoryEvent/constants.ts","../../src/components/Selectors/AdGroupEventSelector/AdGroupEventSelector.tsx","../../src/modals/AdGroupCreate/AdGroupCreate.styled.tsx","../../src/modals/AdGroupCreate/AdGroupSelectError.tsx","../../src/modals/AdGroupCreate/AdGroupSelectEventSection.tsx","../../src/components/common/PerformerCategoryIcon/PerformerCategoryIcon.tsx","../../src/components/Selectors/AdGroupGenreSelector/AdGroupGenreSelector.tsx","../../src/modals/AdGroupCreate/AdGroupSelectGenreSection.tsx","../../src/components/Selectors/AdGroupListingSelector/AdGroupListingSelector.tsx","../../src/modals/AdGroupCreate/AdGroupSelectListingSection.tsx","../../src/components/Selectors/AdGroupPerformerSelector/AdGroupPerformerSelector.tsx","../../src/modals/AdGroupCreate/AdGroupSelectPerformerSection.tsx","../../src/components/Selectors/AdGroupSectionSelector/AdGroupSectionSelector.tsx","../../src/modals/AdGroupCreate/AdGroupSelectSeatingSection.tsx","../../src/components/Selectors/AdGroupTicketClassSelector/AdGroupTicketClassSelector.tsx","../../src/modals/AdGroupCreate/AdGroupSelectTicketClassSection.tsx","../../src/modals/AdGroupCreate/AdGroupCreate.tsx","../../src/navigations/Routes/SponsoredListings/AdGroupsToolbar/AdGroupsToolbar.styled.tsx","../../src/navigations/Routes/SponsoredListings/AdGroupsToolbar/AdGroupsToolbar.tsx","../../src/navigations/Routes/AdCampaign/AdCampaign.tsx","../../src/components/common/CollapsableContent/ExpandCollapsableContentButton.tsx","../../src/components/AdGroupsFlattenedView/AdGroupListingsFlattenedView.tsx","../../src/navigations/Routes/AdGroupListings/AdGroupListings.tsx","../../src/hooks/api/useGetInboundEmailSellerGuidIds.ts","../../src/modals/MessagesAddSourceModal/MessagesAddSourceModal.tsx","../../src/core/ui/Badge/Badge.tsx","../../src/navigations/Routes/Email/EmailNavToolbar.tsx","../../src/components/common/AccountDisabledNotification/AccountDisabledNotification.tsx","../../src/components/common/MerchantColorBadge/MerchantColorBadge.tsx","../../src/contexts/ConversationDataContext/ConversationDataContext.tsx","../../src/components/Messages/ConversationSidePanel/ConversationListItem/ConversationListItem.tsx","../../src/components/Messages/EmailThread/EmailThreadItem.tsx","../../src/components/Messages/EmailThread/EmailThread.tsx","../../src/contexts/SellerSupportCaseDataContext/SellerSupportCaseDataContext.tsx","../../src/components/Messages/AttachmentsPanel/AttachmentsPanel.tsx","../../src/components/Messages/SupportCaseNoteDisplay/SupportCaseNoteDisplay.tsx","../../src/components/Messages/SupportCaseBody/SupportCaseReplyInput.tsx","../../src/components/Messages/SupportCaseBody/SupportCaseBody.tsx","../../src/hooks/api/useGetSaleWithCatalogData.ts","../../src/components/Buttons/SwiperButton.tsx","../../src/core/POS/HotkeyDisplay/HotkeyDisplay.tsx","../../src/contexts/SidePanelContext/SidePanelContext.tsx","../../src/components/common/MultiSelect/useGetNoSelectedItemsLabel.ts","../../src/components/Events/EventListing/useEventsAccordionSelectedLegend.ts","../../src/components/Events/EventListing/InventoryEventListing/SetInventoryEventAccordionSelectionCountLabel.tsx","../../src/components/Events/EventListing/InventoryEventListing/SetInventoryMetricsViewSelectionCountLabel.tsx","../../src/components/Listings/InventoryActionDropdown/components/BulkEditBroadcastSettingsAction/useBulkEditBroadcastGlobalSettingsAction.tsx","../../src/components/Events/EventListing/InventoryEventListing/BulkActions/InventoryGlobalBulkActions/Actions/BroadcastActions.tsx","../../src/components/Events/EventListing/InventoryEventListing/BulkActions/InventoryGlobalBulkActions/Actions/CatchUpAction.tsx","../../src/components/Events/EventListing/InventoryEventListing/BulkActions/InventoryGlobalBulkActions/Actions/PricingActions.tsx","../../src/components/Events/EventListing/InventoryEventListing/BulkActions/InventoryGlobalBulkActions/Actions/SettingsActions.tsx","../../src/components/Events/EventListing/InventoryEventListing/BulkActions/InventoryGlobalBulkActions/Actions/TagsActions.tsx","../../src/components/Events/EventListing/InventoryEventListing/BulkActions/InventoryGlobalBulkActions/InventoryGlobalBulkActions.tsx","../../src/tables/EventsTable/EventsTable.tsx","../../src/tables/EventsTable/EventsTableWithInnerGrouping.tsx","../../src/components/Events/EventListing/InventoryEventListing/InventoryDetailedEventView.tsx","../../src/components/common/SummaryTile/SummaryTile.tsx","../../src/components/Listings/InventorySummaryWidgets/AverageTicketPriceDisplay.tsx","../../src/components/Listings/InventorySummaryWidgets/SalesAndMarginDisplay.tsx","../../src/components/Listings/InventorySummaryWidgets/TicketsListedAndSoldDisplay.tsx","../../src/contexts/CatalogMetricsContext/useGetSummaryMetricsQuery.ts","../../src/hooks/useGetActiveAccountClientConfig.ts","../../src/tables/EventsTable/EventsTable.constants.ts","../../src/navigations/Routes/Inventory/Inventory.utils.ts","../../src/components/Events/PerformerVenueList/PerformerVenueDisplay/PerformerVenueDisplay.styled.tsx","../../src/components/Events/PerformerVenueList/PerformerVenueDisplay/PerformerVenueDisplay.tsx","../../src/components/Events/PerformerVenueList/PerformerVenueFilterBar/PerformerVenueFilterBar.styled.tsx","../../src/components/Events/PerformerVenueList/PerformerVenueFilterBar/PerformerVenueFilterBar.tsx","../../src/components/Events/PerformerVenueList/PerformerVenueList.styled.tsx","../../src/components/Events/PerformerVenueList/SelectedPerformerVenueList/SelectedPerformerVenueList.styled.tsx","../../src/components/Events/PerformerVenueList/SelectedPerformerVenueList/SelectedPerformerVenueList.tsx","../../src/components/Events/PerformerVenueList/SelectedPerformerVenueListDivider/SelectedPerformerVenueListDivider.tsx","../../src/components/Events/PerformerVenueList/PerformerVenueList.tsx","../../src/components/common/BulkActions/BulkEditStatusPopover/BulkEditStatusPopover.tsx","../../src/components/common/MultiSelect/Toggle/MultiSelectionToggleGlobal.tsx","../../src/components/FilterToolbar/useFiltersHelpers.ts","../../src/components/Events/EventDateSelector/EventDateSelector.tsx","../../src/components/MainFilterBar/useDiscoveryFilters.tsx","../../src/hooks/useQuickFilters.ts","../../src/svgs/MetricViewIcon.tsx","../../src/components/Accordions/EventEntitySearchBox/EventEntitySearchBox.tsx","../../src/components/OnSaleEvent/OnSaleEventSearchBox/OnSaleEventSearchBox.tsx","../../src/components/OnSaleEvent/OnSaleEventFilterBar/hooks/useDefaultOnSaleEventFilter.tsx","../../src/components/OnSaleEvent/OnSaleEventFilterBar/OnSaleEventFilterBar.tsx","../../src/components/MainFilterBar/Tags/useMergedTagFilters.tsx","../../src/components/Selectors/PurchaseVendorAccountSelector/StandaloneMultiplePurchaseVendorAccountSelector/useStandalonePurchaseVendorAccountSelector.ts","../../src/components/Selectors/PurchaseVendorAccountSelector/StandaloneMultiplePurchaseVendorAccountSelector/StandalonePurchaseVendorAccountsSelector.tsx","../../src/svgs/MetricsIcon.tsx","../../src/components/Selectors/VendorAccessControlProvidersSelector/useVendorAccessControlProvidersSelector.tsx","../../src/components/Selectors/VendorAccessControlProvidersSelector/VendorAccessControlProvidersSelector.tsx","../../src/components/MainFilterBar/usePurchaseInfoFilters.tsx","../../src/core/POS/PosMultiSelect/PosEnumMultiSelect.tsx","../../src/components/Selectors/EventSelector/EventSelector.tsx","../../src/components/MainFilterBar/useEventStateFilters.tsx","../../src/components/MainFilterBar/useCommonEventFilters.tsx","../../src/components/MainFilterBar/usePurchaseFilters.tsx","../../src/components/Purchases/PurchaseFilterBar/PurchaseGlobalActionsPermissionsWrapper.tsx","../../src/components/Purchases/PurchaseFilterBar/hooks/useDefaultPurchaseFilters.tsx","../../src/svgs/TileViewIcon.tsx","../../src/components/Purchases/PurchaseFilterBar/PurchaseFilterBar.types.tsx","../../src/components/Purchases/PurchaseOrderBasicInfo/PurchaseOrderBasicInfo.tsx","../../src/components/Purchases/PurchaseFilterBar/PurchaseSearchBox.tsx","../../src/components/Purchases/PurchaseFilterBar/PurchaseFilterBar.tsx","../../src/components/Sales/SaleFilterBar/hooks/useDefaultSaleFilters.tsx","../../src/components/Sales/SaleFilterBar/SaleFilterBar.types.tsx","../../src/components/Sales/SaleBasicInfo/SaleBasicInfo.styled.tsx","../../src/components/Sales/SaleBasicInfo/SaleBasicInfo.tsx","../../src/components/Sales/SaleFilterBar/SaleSearchBox.tsx","../../src/components/Sales/SaleFilterBar/SaleFilterBar.tsx","../../src/components/MainFilterBar/MainFilterBar.tsx","../../src/components/MainFilterBar/Tags/TagValueFilterInput.tsx","../../src/components/MainFilterBar/Tags/useEventTagFilters.tsx","../../src/components/MainFilterBar/Tags/useTagFilters.tsx","../../src/components/MainFilterBar/useEventLastReviewedFilter.tsx","../../src/components/MainFilterBar/useListingFilters.tsx","../../src/components/MainFilterBar/useSaleFilters.tsx","../../src/components/MainFilterBar/ViewModeSelector.tsx","../../src/core/ui/ResizablePanel/ResizablePanel.styled.tsx","../../src/core/ui/ResizablePanel/ResizablePanel.tsx","../../src/components/Buttons/SidePanelButton/SidePanelButton.tsx","../../src/components/Listings/ListingFilterBar/hooks/useDefaultListingFilter.tsx","../../src/components/Listings/ListingFilterBar/ListingFilterBar.types.tsx","../../src/components/Listings/ListingBasicInfo/ListingBasicInfo.styled.tsx","../../src/components/Listings/ListingBasicInfo/ListingBasicInfo.tsx","../../src/components/Listings/ListingFilterBar/ListingSearchBox.tsx","../../src/components/Listings/ListingFilterBar/ListingFilterBar.tsx","../../src/core/POS/FlyoverPanel/FlyoverPanel.tsx","../../src/core/layouts/ExplorerLayout/ExplorerLayout.tsx","../../src/utils/advancedSearchUtils.tsx","../../src/navigations/Routes/Inventory/InventoryEventsExplorer.tsx","../../src/navigations/Routes/Inventory/Inventory.tsx","../../src/components/Events/EventListing/InventoryEventListing/InventoryEventSummaryMetrics.tsx","../../src/components/Events/EventListing/useEventFlattedViewSelectedLegend.ts","../../src/components/Events/EventListing/InventoryEventListing/SetInventoryFlattenedViewSelectionCountLabel.tsx","../../src/components/Events/EventListing/InventoryEventListing/InventoryFlattenedView.tsx","../../src/components/Events/EventListing/InventoryEventListing/InventoryEventListing.tsx","../../src/components/Events/EventListing/SalesEventListing/SetSalesEventAccordionSelectionCountLabel.tsx","../../src/components/Events/EventListing/SalesEventListing/SetSalesFlattenedViewSelectionCountLabel.tsx","../../src/components/Sales/BulkActions/SalesGlobalBulkActions/Actions/SettingsActions.tsx","../../src/components/Sales/BulkActions/SalesGlobalBulkActions/Actions/TagsActions.tsx","../../src/components/Sales/BulkActions/SalesGlobalBulkActions/SalesGlobalBulkActions.tsx","../../src/components/SubfilterGroup/SubfilterGroup.styled.tsx","../../src/components/SubfilterGroup/SubfilterGroup.tsx","../../src/hooks/useQuickSubfilters.ts","../../src/components/Events/EventListing/SalesEventListing/SalesFlattenedView.tsx","../../src/components/Events/EventListing/SalesEventListing/SalesEventListing.tsx","../../src/components/Events/EventListing/EventListing.tsx","../../src/navigations/Routes/Sales/SalesEventsExplorer.tsx","../../src/navigations/Routes/Sales/Sales.tsx","../../src/modals/ClassifyEmail/SaleSearchAccordionList.tsx","../../src/modals/ClassifyEmail/SaleSearchBox.tsx","../../src/modals/ClassifyEmail/ClassifyEmail.tsx","../../src/modals/ClassifyEmail/index.tsx","../../src/components/Messages/ConversationMainPanel/ConversationHeaderDisplay/ConversationHeaderDisplay.tsx","../../src/components/Messages/ConversationMainPanel/ConversationMainPanel.tsx","../../src/hooks/api/useClassifiedInboundEmails.ts","../../src/components/Messages/ConversationSidePanel/ConversationFilter.tsx","../../src/components/Messages/ConversationSidePanel/ConversationSidePanel.tsx","../../src/components/Purchases/PurchaseEmailDisplay/PurchaseEmailDisplay.tsx","../../src/hooks/api/usePartialPurchaseOrderInboundEmails.ts","../../src/navigations/Routes/Email/EmailList.tsx","../../src/navigations/Routes/Email/MessagesExplorer.tsx","../../src/navigations/Routes/Email/Email.tsx","../../src/core/ui/DocumentTree/DocumentTree.tsx","../../src/navigations/Routes/HelpCenter/useGetHelpData.ts","../../src/navigations/Routes/HelpCenter/HelpCenter.tsx","../../src/dialogs/ReleaseNoteDisplayDialog/ReleaseNoteDisplayDialog.tsx","../../src/hooks/useLiveActivityLog.tsx","../../src/navigations/Routes/Home/ActivitySection/ActivitySection.tsx","../../src/navigations/Routes/Home/MetricsSection/MetricsSection.tsx","../../src/components/ConnectedNotificationDisplay/NotificationDisplay/NotificationDisplay.tsx","../../src/components/ConnectedNotificationDisplay/ConnectedNotificationDisplay.tsx","../../src/navigations/Routes/Home/NotificationsSection/NotificationsSection.tsx","../../src/navigations/Routes/Home/RecentSalesSection/RecentSalesTable.tsx","../../src/navigations/Routes/Home/RecentSalesSection/RecentSalesSection.tsx","../../src/navigations/Routes/Home/Home.tsx","../../src/components/Listings/InventoryEventPage/MarketListings/StubHubListingsManualPricingContext.tsx","../../src/hooks/api/useEventLastReviewedDateTime.ts","../../src/contexts/SellerEventLastReviewContext/SellerEventLastReviewContext.tsx","../../src/core/POS/LoadingButton/LoadingButton.tsx","../../src/hooks/api/useSellerEventNote.ts","../../src/components/Listings/InventoryEventPage/InventoryEventCatchUp/InventoryEventCatchUpBarButtons.tsx","../../src/components/Listings/InventoryEventPage/InventoryEventCatchUp/InventoryEventCatchUpCard.tsx","../../src/components/Listings/InventoryEventPage/InventoryEventCatchUp/InventoryEventCatchUpDropdown.tsx","../../src/components/Listings/InventoryEventPage/InventoryEventCatchUp/InventoryEventCatchUpBar.tsx","../../src/hooks/api/useEventMetrics.ts","../../src/contexts/EventMetricsContext/EventMetricsContext.tsx","../../src/hooks/useHeatMapColor.tsx","../../src/components/Listings/InventoryEventPage/DashboardSection/HeaderWidgetContainer.tsx","../../src/components/Listings/InventoryEventPage/DashboardSection/Widgets/EventSectionClearingPrices/EventSectionClearingPriceSectionDisplay.tsx","../../src/components/Listings/InventoryEventPage/DashboardSection/Widgets/EventSectionClearingPrices/EventSectionClearingPricesTableColumnsConfig.tsx","../../src/components/Listings/InventoryEventPage/DashboardSection/Widgets/EventSectionClearingPrices/EventSectionClearingPricesTable.tsx","../../src/components/Listings/InventoryEventPage/DashboardSection/Widgets/EventSectionClearingPrices/EventSectionClearingPricesWidgetsContainer.tsx","../../src/components/Listings/InventoryEventPage/DashboardSection/Widgets/TimeSeriesLineChart/TimeSeriesLineChart.types.ts","../../src/components/Listings/InventoryEventPage/DashboardSection/Widgets/TimeSeriesLineChart/TimeSeriesLineChart.tsx","../../src/components/Listings/InventoryEventPage/DashboardSection/Widgets/DashboardWidgetTile/DashboardWidgetTile.tsx","../../src/components/Listings/InventoryEventPage/DashboardSection/Widgets/EventSupply/EventSupplyWidget.tsx","../../src/components/Listings/InventoryEventPage/DashboardSection/Widgets/EventSupply/EventSupplyContainer.tsx","../../src/components/Listings/InventoryEventPage/DashboardSection/Widgets/EventWebsiteMetric/EventWebsiteMetricWidget.tsx","../../src/components/Listings/InventoryEventPage/DashboardSection/Widgets/EventWebsiteMetric/EventWebsiteMetricWidgetsContainer.tsx","../../src/components/Listings/InventoryEventPage/DashboardSection/Widgets/DistributionPieChart/DistributionPieChart.tsx","../../src/components/Listings/InventoryEventPage/DashboardSection/Widgets/SellerEventPerformanceMetric/SellerEventPerformanceMetricWidgetsBody.tsx","../../src/components/Listings/InventoryEventPage/DashboardSection/Widgets/SellerEventPerformanceMetric/SellerEventPerformanceMetricWidgetsContainer.tsx","../../src/components/Listings/InventoryEventPage/DashboardSection/DashboardSection.tsx","../../src/components/Listings/InventoryEventPage/Sections/InventoryEventDashboardSection.tsx","../../src/dialogs/ApplyHeatMapToAllEventsDialog/ApplyHeatMapToAllEventsDialog.tsx","../../src/components/Events/RowRelativeScoreDisplay/RowRelativeScoreDisplay.tsx","../../src/core/POS/BezierGraph/BezierGraphManager.ts","../../src/core/POS/BezierGraph/BezierGraph.tsx","../../src/dialogs/ChangeRowScoreDialog/ChangeRowScoreBody.tsx","../../src/dialogs/ChangeRowScoreDialog/ChangeRowScoreBodyMultiSection.tsx","../../src/dialogs/ChangeRowScoreDialog/ChangeRowScoreBodySingleSection.tsx","../../src/dialogs/ChangeRowScoreDialog/ChangeRowScoreDialog.tsx","../../src/dialogs/ChangeRowScoreDialog/ChangeRowScoreDialogMultiSection.tsx","../../src/dialogs/SectionRowTableDialog/components/AddSectionRowsDialog.tsx","../../src/dialogs/SectionRowTableDialog/CellItem.tsx","../../src/dialogs/SectionRowTableDialog/config/SectionRowTableConfig.tsx","../../src/dialogs/SectionRowTableDialog/components/SectionRowTableRow.tsx","../../src/dialogs/SectionRowTableDialog/components/SectionRowTable.tsx","../../src/dialogs/SectionRowTableDialog/SectionRowTableDialog.hooks.ts","../../src/dialogs/SectionRowTableDialog/SectionRowTableDialog.tsx","../../src/dialogs/ChangeMultiSectionsScoresDialog/ChangeMultiSectionsScoresDialog.tsx","../../src/dialogs/ChangeSectionScoreDialog/ChangeSectionScoreDialog.tsx","../../src/hooks/useEventHeatMapSectionHandler.tsx","../../src/modals/common/EventSeatMap/EventVenueHeatMap.tsx","../../src/components/Listings/InventoryEventPage/Sections/SeatMapCard.tsx","../../src/dialogs/DeleteHeapMapTemplateConfirmDialog/DeleteHeatMapTemplateConfirmDialog.tsx","../../src/components/Events/RelativeScoreGraph/RelativeScoreGraph.tsx","../../src/components/Events/RelativeScoreGraph/SeatScoreQuantityMultiplierGraph.tsx","../../src/modals/EventPricingSeatMap/components/EventAutoPricingSettingsFormContent/EventAutoPricingSettingsFormContent.tsx","../../src/modals/EventPricingSeatMap/components/useEventAutoPricingSettings.tsx","../../src/modals/EventPricingSeatMap/components/CompListingSameQualitySettings.tsx","../../src/modals/EventPricingSeatMap/EventAutoPricingSettings.tsx","../../src/modals/EventPricingSeatMap/EventPricingSeatMapBody.tsx","../../src/modals/EventPricingSeatMap/EventPricingSeatMap.tsx","../../src/components/Events/SeatScoreConfigCard/SeatScoreConfigCard.tsx","../../src/modals/UploadSeatScoreModal/UploadSeatScoreModal.tsx","../../src/modals/EventSeatMapConfig/EventSeatMapConfigBody.tsx","../../src/modals/EventSeatMapConfig/EventSeatMapConfig.tsx","../../src/modals/EventSeatMapSelection/GlobalConfigPayloadCard.tsx","../../src/modals/EventSeatMapSelection/GlobalConfigPayloadSelection.tsx","../../src/modals/EventSeatMapSelection/NewHeatmapAvailableNotification.tsx","../../src/modals/EventSeatMapSelection/EventSeatMapSelection.tsx","../../src/components/Listings/InventoryEventPage/Sections/InventoryEventEditMapSection.tsx","../../src/hooks/api/useSellerAccountEventSettings.tsx","../../src/components/Listings/InventoryEventPage/FulfillmentSection/AutoFulfillCell.tsx","../../src/components/Listings/InventoryEventPage/FulfillmentSection/InHandCell.tsx","../../src/components/Listings/InventoryEventPage/FulfillmentSection/TicketTypePriorityPill.tsx","../../src/components/Listings/InventoryEventPage/FulfillmentSection/TicketTypePriorityCell.tsx","../../src/components/Listings/InventoryEventPage/FulfillmentSection/VendorCell.tsx","../../src/components/Listings/InventoryEventPage/FulfillmentSection/EventSettingForm.tsx","../../src/components/Listings/InventoryEventPage/Sections/InventoryEventFulfillmentSection.utils.ts","../../src/components/Listings/InventoryEventPage/Sections/InventoryEventFulfillmentSection.tsx","../../src/components/common/TimeDistance/TimeDistance.tsx","../../src/components/Listings/InventorySummaryWidgets/LastReviewedDisplay.tsx","../../src/components/Listings/InventoryEventPage/Sections/InventoryEventInfoSection.tsx","../../src/hooks/api/useGetMarketTransactionsForEvent.tsx","../../src/tables/MarketTransactionsTable/configs/MarketTransactionsTableColumnsConfig.tsx","../../src/tables/MarketTransactionsTable/MarketTransactionsTable.tsx","../../src/components/Listings/InventoryEventPage/Sections/InventoryEventTransactionsSection.tsx","../../src/utils/listingExperimentUtils.ts","../../src/dialogs/PricingABTest/CreateExperimentDialog.tsx","../../src/hooks/api/useListingExperiments.ts","../../src/tables/ListingExperimentTable/configs/ActionCell.tsx","../../src/tables/ListingExperimentTable/configs/ListingExperimentTableColumnsConfig.tsx","../../src/tables/ListingExperimentTable/ListingExperimentTable.tsx","../../src/components/Listings/InventoryEventPage/Sections/InventoryPricingABTestSection.tsx","../../src/components/Listings/InventoryEventPage/MarketListings/StubHubListingsManualPricingContext.utils.ts","../../src/components/Listings/InventoryEventPage/Sections/ManualPricingSection.tsx","../../src/hooks/api/useEventTags.tsx","../../src/components/Listings/InventoryEventPage/Sections/TagsSection.tsx","../../src/components/Listings/InventoryEventPage/Sections/VenueZoneMap/components/SortableZoneAreaItem.tsx","../../src/components/Listings/InventoryEventPage/Sections/VenueZoneMap/components/VenueZoneSectionGroupDraggableList.tsx","../../src/components/Listings/InventoryEventPage/Sections/VenueZoneMap/components/VenueZoneSectionGroupList.tsx","../../src/components/Listings/InventoryEventPage/Sections/VenueZoneMap/components/SectionGroupPanel.tsx","../../src/components/Listings/InventoryEventPage/Sections/VenueZoneMap/components/VenueZoneSectionGroupDropdownList.tsx","../../src/dialogs/ChangeZoneMapSectionGroupDialog/ChangeZoneMapSectionGroupDialog.tsx","../../src/components/Listings/InventoryEventPage/Sections/VenueZoneMap/components/VenueZoneMap.tsx","../../src/components/Listings/InventoryEventPage/Sections/VenueZoneMap/components/VenueZoneMapFooter.tsx","../../src/components/Listings/InventoryEventPage/Sections/VenueZoneMap/hooks/useVenueSectionRow.ts","../../src/components/Listings/InventoryEventPage/Sections/VenueZoneMap/components/VenueZoneMapSubmitButton.tsx","../../src/components/Listings/InventoryEventPage/Sections/VenueZoneMap/InventoryEventVenueZoneMapSection.tsx","../../src/hooks/api/useGetEventSellThroughRates.tsx","../../src/components/Events/SellThroughRateSection/SellThroughRateGraphBody.tsx","../../src/hooks/api/useSellerEventSellThroughRateTargets.tsx","../../src/components/Events/SellThroughRateSection/SellThroughRateTargetInput.tsx","../../src/components/Listings/InventoryEventPage/SellThroughRateSection.tsx","../../src/components/Listings/InventoryEventPage/TabWithStarIcon.tsx","../../src/components/Listings/InventoryEventPage/InventoryEventPageContent.tsx","../../src/components/Listings/InventoryEventPage/InventoryEventPageHeaderCondense.tsx","../../src/dialogs/MarketplaceEventEditDialog/MarketplaceEventEditDialog.tsx","../../src/hooks/api/useEventMapConfigMetadata.ts","../../src/components/Listings/InventoryEventPage/Banners/NewEventMapBanner.tsx","../../src/components/Listings/InventoryEventPage/EventVenueMap/components/EventVenueMapContent.tsx","../../src/core/ui/CollapsibleSetting/CollapsibleSetting.tsx","../../src/components/Listings/InventoryEventPage/EventVenueMap/components/EventMapDetailSimpleActionGroup.tsx","../../src/components/Listings/InventoryEventPage/EventVenueMap/components/EventVenueMapDetailsPanelFooter.tsx","../../src/components/Listings/InventoryEventPage/EventVenueMap/components/EventVenueMapSelector.tsx","../../src/components/Listings/InventoryEventPage/EventVenueMap/components/VenueZoneSectionGroupDraggableList.tsx","../../src/components/Listings/InventoryEventPage/EventVenueMap/components/VenueZoneSectionGroupList.tsx","../../src/components/Listings/InventoryEventPage/EventVenueMap/components/SectionGroupPanel.tsx","../../src/components/Listings/InventoryEventPage/EventVenueMap/components/EventVenueMapDetailsPanel.tsx","../../src/components/Listings/InventoryEventPage/EventVenueMap/EventVenueMapModal.tsx","../../src/components/Listings/InventoryEventPage/EventVenueMap/EventVenueMapPopup.tsx","../../src/components/Listings/InventoryEventPage/InventoryEventPageHeader.tsx","../../src/components/Listings/InventoryEventPage/MarketListings/MarketListingHeader.tsx","../../src/contexts/InventoryEventDetailContext/InventoryEventDetailContext.tsx","../../src/components/Listings/InventoryEventPage/InventoryEventDetail/components/DetailPanel/Listing/PricingSetting/CompListingPrices.tsx","../../src/components/Listings/InventoryEventPage/InventoryEventDetail/components/DetailPanel/Listing/PricingSetting/OutlierSettings.tsx","../../src/components/Listings/InventoryEventPage/InventoryEventDetail/components/DetailPanel/Listing/PricingSetting/PricingSettingAutoPriceFloorSettings.tsx","../../src/components/Listings/InventoryEventPage/InventoryEventDetail/components/DetailPanel/Listing/PricingSetting/PricingSettingAutoPriceRankPremiumSettings.tsx","../../src/components/Listings/InventoryEventPage/InventoryEventDetail/components/DetailPanel/Listing/PricingSetting/PricingSettingAutoPriceBody.tsx","../../src/components/Listings/InventoryEventPage/InventoryEventDetail/components/DetailPanel/Listing/PricingSetting/PricingSettingAutoPriceGroup.tsx","../../src/components/Listings/InventoryEventPage/InventoryEventDetail/components/Map/StatLabel.tsx","../../src/components/Listings/InventoryEventPage/InventoryEventDetail/components/DetailPanel/Listing/PricingSetting/PricingSettingGroupHeader.tsx","../../src/components/Listings/InventoryEventPage/InventoryEventDetail/components/DetailPanel/Listing/ListingDetailListingGroupHeader.tsx","../../src/components/Listings/InventoryEventPage/InventoryEventDetail/components/DetailPanel/Listing/PricingSetting/PricingSettingAutoPrice.tsx","../../src/components/Listings/InventoryEventPage/InventoryEventDetail/components/DetailPanel/Listing/PricingSetting/PricingSettingAutoPriceListing.tsx","../../src/components/Listings/InventoryEventPage/InventoryEventDetail/components/DetailPanel/Listing/PricingSetting/PricingSettingHeader.tsx","../../src/components/Listings/InventoryEventPage/InventoryEventDetail/components/DetailPanel/Listing/PricingSetting/PricingSettingManualPrice.tsx","../../src/components/Listings/InventoryEventPage/InventoryEventDetail/components/DetailPanel/Listing/ListingDetailListingHeader.tsx","../../src/components/Listings/InventoryEventPage/InventoryEventDetail/components/DetailPanel/Listing/ListingDetailPanel.tsx","../../src/components/Listings/InventoryEventPage/Sections/NoteSectionV2.tsx","../../src/components/Listings/InventoryEventPage/InventoryEventDetail/components/DetailPanel/NotesDetailPanel.tsx","../../src/components/Accordions/TicketGroupsEventsAccordion/EventTicketGroupBody.tsx","../../src/components/Purchases/BulkActions/PurchasesBulkActionsPermissions.tsx","../../src/components/Purchases/BulkActions/PurchasesTileBulkActions/usePurchaseTileBulkActionsState.ts","../../src/dialogs/BulkEdits/BulkCancelPurchaseDialog/BulkCancelPurchaseDialog.tsx","../../src/components/Purchases/PurchaseActionDropdown/components/BulkCancelPurchase/LaunchBulkCancelPurchase.tsx","../../src/components/Purchases/PurchaseActionDropdown/components/BulkCancelPurchase/useBulkCancelPurchase.tsx","../../src/dialogs/BulkEdits/BulkDeleteTicketGroupDialog/BulkDeleteTicketGroupDialog.tsx","../../src/components/Purchases/PurchaseActionDropdown/components/BulkDeleteTicketGroup/LaunchBulkDeleteTicketGroup.tsx","../../src/components/Purchases/PurchaseActionDropdown/components/BulkDeleteTicketGroup/useBulkDeleteTicketGroup.tsx","../../src/components/Purchases/PurchaseActionDropdown/components/BulkEditCommissionAction/useBulkEditCommissionAction.tsx","../../src/components/Purchases/PurchaseActionDropdown/components/BulkUpdateDeliveryType/LaunchBulkUpdateDeliveryType.tsx","../../src/components/Purchases/PurchaseActionDropdown/components/BulkUpdateDeliveryType/useBulkUpdateDeliveryType.tsx","../../src/components/Purchases/PurchaseActionDropdown/components/BulkUpdateInternalNotesAction/useBulkUpdateInternalNotesAction.tsx","../../src/components/Purchases/PurchaseActionDropdown/components/BulkUpdatePurchaseCurrencyCodeAction/LaunchBulkUpdatePurchaseCurrencyCode.tsx","../../src/dialogs/BulkEdits/BulkUpdatePurchaseCurrencyCodeDialog/BulkUpdatePurchaseCurrencyCodeDialog.tsx","../../src/components/Purchases/PurchaseActionDropdown/components/BulkUpdatePurchaseCurrencyCodeAction/useBulkUpdatePurchaseCurrencyCode.tsx","../../src/dialogs/BulkEdits/BulkEditPurchaseSettingsDialog/BulkEditPurchaseSettingsDialog.tsx","../../src/components/Purchases/PurchaseActionDropdown/components/BulkUpdatePurchaseGeneralSettings/LaunchUpdatePurchaseSettings.tsx","../../src/components/Purchases/PurchaseActionDropdown/components/BulkUpdatePurchaseGeneralSettings/useBulkUpdatePurchaseSettings.tsx","../../src/components/Purchases/PurchaseActionDropdown/components/BulkUpdateSeatTraits/LaunchBulkUpdateSeatTraits.tsx","../../src/components/Purchases/PurchaseActionDropdown/components/BulkUpdateSeatTraits/useBulkUpdateSeatTraits.tsx","../../src/components/Purchases/BulkActions/PurchasesTileBulkActions/Actions/SettingsActions.tsx","../../src/components/Purchases/PurchaseActionDropdown/components/BulkEditTagsAction/useBulkEditTagsAction.tsx","../../src/components/Purchases/BulkActions/PurchasesTileBulkActions/Actions/TagsActions.tsx","../../src/dialogs/BulkEdits/BulkConvertPurchasePaymentDialog/BulkConvertPurchasePaymentDialog.tsx","../../src/components/Purchases/PurchaseActionDropdown/components/BulkConvertPurchasePaymentsAction/LaunchBulkConvertPurchasePayments.tsx","../../src/components/Purchases/PurchaseActionDropdown/components/BulkConvertPurchasePaymentsAction/useBulkConvertPurchasePaymentsAction.tsx","../../src/components/Purchases/PurchaseActionDropdown/components/BulkMarkPurchaseAsPaid/LaunchBulkMarkPurchaseAsPaid.tsx","../../src/dialogs/BulkEdits/BulkMarkPurchaseAsPaidDialog/BulkMarkPurchaseAsPaidDialog.tsx","../../src/components/Purchases/PurchaseActionDropdown/components/BulkMarkPurchaseAsPaid/useBulkMarkPurchaseAsPaid.tsx","../../src/components/Purchases/BulkActions/PurchasesGlobalBulkActions/BulkEditAccountingActionPermissionsHandler.tsx","../../src/components/Purchases/BulkActions/PurchasesTileBulkActions/Actions/AccountingActions.tsx","../../src/components/Purchases/BulkActions/PurchasesTileBulkActions/PurchasesTileBulkActions.tsx","../../src/components/Purchases/PurchaseTileActionDropdown/components/AddPurchase/AddPurchaseAction.tsx","../../src/components/Purchases/PurchaseTileActionDropdown/PurchaseTileActionDropdown.tsx","../../src/components/Accordions/PurchaseDatesAccordion/PurchaseDateAccordion.styled.tsx","../../src/components/Accordions/TicketGroupsEventsAccordion/EventTicketGroupHeader.tsx","../../src/components/Accordions/TicketGroupsEventsAccordion/TicketGroupsEventsAccordion.tsx","../../src/components/Events/EventPage/hooks/useAccordionItem.tsx","../../src/svgs/SwitchIcon.tsx","../../src/components/Events/EventPage/utils.tsx","../../src/components/Events/EventPage/SidePanel/SidePanelToolbar.tsx","../../src/components/Events/EventPage/SidePanel/SidePanelFilters.tsx","../../src/components/Purchases/PurchaseFilterBar/PurchaseSideTableFilterBar.tsx","../../src/components/Purchases/PurchaseEventPage/PurchasesSideTable.tsx","../../src/components/Listings/InventoryEventPage/InventoryEventDetail/components/DetailPanel/PurchaseDetailPanel.tsx","../../src/components/Sales/SaleFilterBar/SaleSideTableFilterBar.tsx","../../src/components/Sales/SaleEventPage/SaleSideTable.tsx","../../src/components/Listings/InventoryEventPage/InventoryEventDetail/components/DetailPanel/SaleDetailPanel.tsx","../../src/components/Listings/InventoryEventPage/InventoryEventDetail/components/DetailPanel/DetailPanelBody.tsx","../../src/components/Listings/InventoryEventPage/InventoryEventDetail/components/Map/CondensedVenueMapQtyFilter.tsx","../../src/components/Listings/InventoryEventPage/InventoryEventDetail/components/Map/MapBody.tsx","../../src/components/Listings/InventoryEventPage/InventoryEventDetail/components/PricingSettings/CompPricingSettings.tsx","../../src/components/Listings/InventoryEventPage/InventoryEventDetail/components/Map/SelectedListingMapStats.tsx","../../src/components/Listings/InventoryEventPage/InventoryEventDetail/components/Map/MapFooter.tsx","../../src/components/Listings/InventoryEventPage/InventoryEventDetail/components/Map/MapHeader.tsx","../../src/components/Listings/InventoryEventPage/InventoryEventDetail/InventoryEventDetail.tsx","../../src/components/Listings/InventoryEventPage/InventoryEventPageSeatMapV2.tsx","../../src/components/Listings/InventoryEventPage/MarketListings/VenueMapStats/VenueMapStats.tsx","../../src/components/Listings/InventoryEventPage/MarketListings/MarketListings.tsx","../../src/components/Listings/InventoryEventPage/MarketListings/ManualSectionRowIdFilter.tsx","../../src/components/Listings/InventoryEventPage/MarketListings/StubHubListingsWithManualPricing.tsx","../../src/components/Listings/InventoryEventPage/InventoryEventPageRightPanel.tsx","../../src/components/Listings/InventoryEventPage/InventoryEventPage.tsx","../../src/navigations/Routes/InventoryEvent/InventoryEvent.tsx","../../src/navigations/Routes/InventoryEvent/InventoryEventPageRedirect.tsx","../../src/hooks/api/useOnSaleEvents.ts","../../src/components/Listings/InventoryEventPage/InventoryEventPageV2.hooks.ts","../../src/components/Listings/InventoryEventPage/InventoryEventPageV2.tsx","../../src/navigations/Routes/InventoryEvent/InventoryEventV2.tsx","../../src/components/EntitySearch/EntitySearchConfigDialog/EntitySearchConfigDialog.tsx","../../src/components/EntitySearch/EntitySearchConfigActions/EntitySearchConfigActions.tsx","../../src/components/EntitySearch/EntitySearchConfigsToolbar/EntitySearchConfigsToolbar.tsx","../../src/components/FilterToolbarEmbedded/AddFilterDropdown/AddFilterDropdown.tsx","../../src/components/FilterToolbarEmbedded/FilterList/FilterList.tsx","../../src/components/FilterToolbarEmbedded/FilterToolbarEmbedded.tsx","../../src/components/EntitySearch/EntitySearchFilterBar/EntitySearchFilterBar.tsx","../../src/components/EntitySearch/EntitySearchRefetcher/EntitySearchRefetcher.tsx","../../src/components/EntitySearch/useEntitySearch.ts","../../src/navigations/Routes/InventorySearch/InventorySearchFilterBar/InventorySearchFilterBar.tsx","../../src/navigations/Routes/InventorySearch/InventorySearchToolbar/InventorySearchToolbar.tsx","../../src/navigations/Routes/InventorySearch/InventorySearch.tsx","../../src/navigations/Routes/Login/Login.tsx","../../src/navigations/Routes/Login/LoginCallback.tsx","../../src/navigations/Routes/Login/LoginFailure.tsx","../../src/navigations/Routes/Login/Logout.tsx","../../src/navigations/Routes/Notifications/Notifications.tsx","../../src/contexts/EventDiscoveryContext/EventDiscoveryContext.tsx","../../src/navigations/Routes/OnSaleEvent/OnSaleEventTable.tsx","../../src/navigations/Routes/OnSaleEvent/OnSaleEventView.tsx","../../src/navigations/Routes/OnSaleEvent/OnSaleEvent.tsx","../../src/tables/MarketplacePaymentsTable/useGetMarketplaceDefaultColumnsConfig.ts","../../src/tables/MarketplacePaymentsTable/useGetDisplayMarketplacePaymentsTableColumns.ts","../../src/tables/MarketplacePaymentsTable/MarketplacePaymentsTable.tsx","../../src/components/MarketplacePayments/Tabs/components/GroupedPaymentsAccordionBody.tsx","../../src/components/MarketplacePayments/Tabs/components/GroupedPaymentsAccordionHeader.tsx","../../src/components/MarketplacePayments/Tabs/components/GroupedPaymentsAccordion.tsx","../../src/components/MarketplacePayments/Tabs/MarketplacePaymentsTabContent.tsx","../../src/components/MarketplacePayments/Tabs/MarketplacePaymentsTab.tsx","../../src/components/MarketplacePayments/MarketplacePaymentDeeplinkListener.tsx","../../src/components/MainFilterBar/useMarketplacePaymentsFilters.tsx","../../src/components/MarketplacePayments/MarketplacePaymentsFilterBar/MarketplacePaymentsFilterBar.tsx","../../src/components/MarketplacePayments/PaymentsToolbar/MarketplacePaymentsToolbar.tsx","../../src/navigations/Routes/Payments/Payments.constants.ts","../../src/navigations/Routes/Payments/Payments.utils.ts","../../src/navigations/Routes/Payments/Payments.tsx","../../src/components/Events/EventPage/EventPageTabs.tsx","../../src/components/Listings/ListingFilterBar/ListingSideTableFilterBar.tsx","../../src/components/Listings/InventoryEventPage/InventorySideTable.tsx","../../src/components/Events/EventPage/SidePanel/SidePanelHeader.tsx","../../src/components/Events/EventPage/SidePanel/SidePanel.tsx","../../src/hooks/api/usePurchaseEventOverrides.tsx","../../src/components/Purchases/PurchaseEventPage/FulfillmentSection/VendorCell.tsx","../../src/components/Purchases/PurchaseEventPage/FulfillmentSection/OverrideSettingForm.tsx","../../src/components/Purchases/PurchaseEventPage/PurchaseEventFulfillmentSection.utils.ts","../../src/components/Purchases/PurchaseEventPage/PurchaseEventFulfillmentSection.tsx","../../src/components/Purchases/PurchaseEventPage/PurchaseEventInfoSection.tsx","../../src/components/Events/EventPage/EventPageHeader.tsx","../../src/components/Purchases/PurchaseEventPage/PurchaseEventPageHeader.tsx","../../src/components/Purchases/PurchaseEventPage/PurchaseEventPage.tsx","../../src/navigations/Routes/PurchaseEvent/PurchaseEvent.tsx","../../src/contexts/PurchaseDataContext/useSingleTimePeriodPurchaseQuery.tsx","../../src/components/Accordions/PurchaseDatesAccordion/PurchaseDateItemBody.tsx","../../src/components/Accordions/PurchaseDatesAccordion/PurchaseDateItemHeader.tsx","../../src/components/Accordions/PurchaseDatesAccordion/PurchaseDatesAccordionMonthGroupItem.tsx","../../src/components/Accordions/PurchaseDatesAccordion/PurchaseDatesAccordion.tsx","../../src/components/Purchases/BulkActions/PurchasesGlobalBulkActions/Actions/SettingsActions.tsx","../../src/components/Purchases/BulkActions/PurchasesGlobalBulkActions/Actions/TagsActions.tsx","../../src/components/Purchases/BulkActions/PurchasesGlobalBulkActions/Actions/AccountingActions.tsx","../../src/components/Purchases/BulkActions/PurchasesGlobalBulkActions/PurchasesGlobalBulkActions.tsx","../../src/components/Purchases/SelectedItemsLabel/SetPurchasesAccordionSelectionCountLabel.tsx","../../src/components/Purchases/SelectedItemsLabel/SetPurchasesFlattenedViewSelectionCountLabel.tsx","../../src/components/Purchases/SelectedItemsLabel/SetPurchasesTimeViewSelectionCountLabel.tsx","../../src/modals/ColumnSettings/hooks/useColumnServerUserSettings.tsx","../../src/core/POS/DragAndDropSort/DragAndDropGroup.tsx","../../src/modals/ColumnSettings/ColumnGroupListItem.tsx","../../src/modals/ColumnSettings/hooks/useAdaptedColumns.ts","../../src/modals/ColumnSettings/ColumnsSectionV2.tsx","../../src/modals/ColumnSettings/TableColumnsInputV2.tsx","../../src/modals/ColumnSettings/PurchaseColumnSettings.tsx","../../src/navigations/Routes/Purchases/PurchaseFlattenedView.tsx","../../src/navigations/Routes/Purchases/PurchaseToolbar/PurchaseToolbar.styled.tsx","../../src/navigations/Routes/Purchases/PurchaseToolbar/PurchaseToolbar.tsx","../../src/navigations/Routes/Purchases/Purchases.tsx","../../src/core/POS/PosNoResultsFound/NoResultsFound.tsx","../../src/navigations/Routes/PurchaseSearch/PurchaseSearchFilterBar/PurchaseSearchFilterBar.tsx","../../src/navigations/Routes/PurchaseSearch/PurchaseSearchToolbar/PurchaseSearchToolbar.tsx","../../src/navigations/Routes/PurchaseSearch/PurchaseSearch.tsx","../../src/navigations/Routes/RedirectToStubHubUk/RedirectToStubHubUk.tsx","../../src/utils/columns/inventory/inventoryColumnUtils.ts","../../src/utils/columns/sales/salesColumnUtils.ts","../../src/dialogs/ReportBuilderDialog/GroupBySelector/GroupBySelector.tsx","../../src/modals/ColumnSettings/TableColumnsDisplay.tsx","../../src/contexts/SellerRoleContext/SellerRoleContext.tsx","../../src/dialogs/ShareReportDialog/ShareReportDialog.styled.tsx","../../src/dialogs/ShareReportDialog/ShareReportBody.tsx","../../src/dialogs/ShareReportDialog/ShareReportDialog.tsx","../../src/dialogs/ReportBuilderDialog/MetricsSelectionInputModal/InventoryMetricsSelectionInputModal.tsx","../../src/dialogs/ReportBuilderDialog/MetricsSelectionInputModal/SalesMetricsSelectionInputModal.tsx","../../src/dialogs/ReportBuilderDialog/ReportBuilderFilterInput.utils.ts","../../src/dialogs/ReportBuilderDialog/ReportBuilderFilterInput.tsx","../../src/dialogs/ReportBuilderDialog/WidgetsSelectionInput/WidgetsSelectionInput.tsx","../../src/dialogs/ReportBuilderDialog/ReportBuilderDialogBody.tsx","../../src/dialogs/ReportBuilderDialog/ReportBuilderDialog.tsx","../../src/hooks/useReportConfigsV2.ts","../../src/components/MainFilterBar/useCommissionFilters.tsx","../../src/components/MainFilterBar/useListingReportFilters.tsx","../../src/components/MainFilterBar/useSaleReportFilters.tsx","../../src/dialogs/ReportBuilderDialog/ReportBuilderFilterInputV2.tsx","../../src/dialogs/ReportBuilderDialog/ReportBuilderDialogBodyV2.tsx","../../src/dialogs/ReportBuilderDialog/ReportBuilderDialogV2.tsx","../../src/dialogs/ReportHistoryDialog/ReportHistoryTable.tsx","../../src/dialogs/ReportHistoryDialog/useFetchReportSnapshotsInfo.ts","../../src/dialogs/ReportHistoryDialog/ReportHistoryDialog.tsx","../../src/components/ReportsInventoryPage/ReportsInventoryPage.utils.ts","../../src/contexts/ReportMetricsContext/ReportMetricsContext.tsx","../../src/tables/ListingTable/ListingReportTableColumnDefContext.tsx","../../src/navigations/Routes/ReportsInventory/ReportsInventoryContextProvider.tsx","../../src/components/Reports/ReportsExport/ReportsExport.utils.ts","../../src/components/Reports/ReportsExport/ReportsInventoryExport.tsx","../../src/components/ReportsSalePage/ReportsSalePage.utils.ts","../../src/tables/SalesTable/SaleReportTableColumnDefContext.tsx","../../src/navigations/Routes/ReportsSale/ReportsSaleContextProvider.tsx","../../src/components/Reports/ReportsExport/ReportsSaleExport.tsx","../../src/tables/ReportsTable/configs/ReportsTableColumnsConfig.tsx","../../src/tables/ReportsTable/ReportsTable.tsx","../../src/tables/ReportsTable/ReportsTableContainer.tsx","../../src/navigations/Routes/Reports/useReportV1Actions.ts","../../src/hooks/useReportConfigActionsV2.ts","../../src/navigations/Routes/Reports/useReportV2Actions.tsx","../../src/navigations/Routes/Reports/Reports.tsx","../../src/contexts/ReportMetricsContext/ReportMetricsContextV2.tsx","../../src/navigations/Routes/ReportsInventory/ReportsInventoryContextProviderV2.tsx","../../src/components/Reports/ReportsExport/ReportsInventoryExportV2.tsx","../../src/navigations/Routes/ReportsSale/ReportsSaleContextProviderV2.tsx","../../src/components/Reports/ReportsExport/ReportsSaleExportV2.tsx","../../src/tables/ReportsTable/configs/ReportsTableColumnsConfigV2.tsx","../../src/tables/ReportsTable/ReportsTableV2.tsx","../../src/tables/ReportsTable/ReportsTableContainerV2.tsx","../../src/navigations/Routes/Reports/ReportsV2.tsx","../../src/tables/ReportTableCommon/ReportTableCommon.utils.ts","../../src/tables/ReportTableCommon/DefaultColumnHelperAccessor.tsx","../../src/tables/SalesTable/configs/CommissionReportTableColumnsConfig.tsx","../../src/tables/SalesTable/CommissionReportTableColumnDefContextV2.tsx","../../src/tables/SalesTable/CommissionReportTableV2.tsx","../../src/hooks/useReportPermissions.tsx","../../src/components/Reports/ReportsFilterToolbar/ReportsFilterToolbarV2.tsx","../../src/svgs/ReportEditTableIcon.tsx","../../src/components/Reports/ReportsPageToolbar/ReportsPageToolbarV2.tsx","../../src/svgs/DragHandleIcon.tsx","../../src/components/Reports/ReportsTableEditor/MetricsOptionsListItem.tsx","../../src/components/Reports/ReportsTableEditor/MetricsInputDroppable.tsx","../../src/components/Reports/ReportsTableEditor/MetricsOptionsList.tsx","../../src/components/Reports/ReportsTableEditor/ReportsTableEditorForm.tsx","../../src/components/Reports/ReportsTableEditor/ReportsTableEditor.tsx","../../src/components/Reports/ReportsPageLayout/ReportsPageLayout.tsx","../../src/components/ReportsCommissionPage/ReportsCommissionPage.tsx","../../src/navigations/Routes/ReportsCommission/ReportsCommissionContextProviderV2.tsx","../../src/navigations/Routes/ReportsCommission/ReportsCommission.tsx","../../src/core/POS/PosFloatingSpinner/PosFloatingSpinner.tsx","../../src/components/Reports/ReportsMaxSizeMessage/ReportsMaxSizeMessage.tsx","../../src/core/ui/CircleIcon/CircleIcon.tsx","../../src/svgs/ReportGroupIcon.tsx","../../src/svgs/TimeoutIcon.tsx","../../src/tables/Table/TableStateWrapper.tsx","../../src/tables/ListingTable/ListingReportTable.tsx","../../src/components/Reports/ReportsFilterToolbar/ReportsFilterToolbar.tsx","../../src/components/ReportsInventoryPage/ReportsInventoryPage.tsx","../../src/components/Reports/ReportsPageToolbar/ReportsPageToolbar.tsx","../../src/navigations/Routes/ReportsInventory/ReportsInventory.tsx","../../src/tables/ListingTable/configs/ListingReportTableColumnsConfigV2.tsx","../../src/tables/ListingTable/ListingReportTableColumnDefContextV2.tsx","../../src/tables/ListingTable/ListingReportTableV2.tsx","../../src/components/ReportsInventoryPage/ReportsInventoryPageV2.tsx","../../src/navigations/Routes/ReportsInventory/ReportsInventoryV2.tsx","../../src/tables/SalesTable/SaleReportTable.tsx","../../src/components/ReportsSalePage/ReportsSalePage.tsx","../../src/navigations/Routes/ReportsSale/ReportsSale.tsx","../../src/tables/SalesTable/configs/SaleReportTableColumnsConfigV2.tsx","../../src/tables/SalesTable/SaleReportTableColumnDefContextV2.tsx","../../src/tables/SalesTable/SaleReportTableV2.tsx","../../src/components/ReportsSalePage/ReportsSalePageV2.tsx","../../src/navigations/Routes/ReportsSale/ReportsSaleV2.tsx","../../src/navigations/Routes/SaleSearch/SaleSearchFilterBar/SaleSearchFilterBar.tsx","../../src/navigations/Routes/SaleSearch/SaleSearchToolbar/SaleSearchToolbar.tsx","../../src/navigations/Routes/SaleSearch/SaleSearch.tsx","../../src/components/Sales/SaleEventPage/SaleEventInfoSection.tsx","../../src/components/Sales/SaleEventPage/SaleEventPageHeader.tsx","../../src/components/Sales/SaleEventPage/SaleEventPage.tsx","../../src/navigations/Routes/SalesEvent/SalesEvent.tsx","../../src/navigations/Routes/Settings/Settings.tsx","../../src/hooks/api/useAutoCurrencyConversionSettings.tsx","../../src/navigations/Routes/Settings/Views/MyAccount/CurrencySection.tsx","../../src/hooks/useCurrencyConversionOverrides.ts","../../src/dialogs/CurrencyConversionOverrideDialog/CurrencyConversionOverrideDialog.tsx","../../src/tables/VendorsTable/VendorsTableContainer.styled.tsx","../../src/tables/CurrencyConversionOverridesTable/configs/CurrencyConversionOverridesTableColumnsConfig.tsx","../../src/tables/CurrencyConversionOverridesTable/CurrencyConversionOverridesTable.tsx","../../src/tables/CurrencyConversionOverridesTable/CurrencyConversionOverridesTableContainer.tsx","../../src/navigations/Routes/Settings/Views/SellerAccountSetting/SellerAccountSettingCurrencyConversionOverrides/SellerAccountSettingCurrencyConversionOverrides.tsx","../../src/navigations/Routes/Settings/Views/CurrencyConversion/CurrencyConversion.tsx","../../src/navigations/Routes/Settings/Views/MyAccount/TimezoneSection.tsx","../../src/navigations/Routes/Settings/Views/MyAccount/MyAccount.tsx","../../src/hooks/api/useAutoPoRestrictionSettings.ts","../../src/navigations/Routes/Settings/Views/PurchaseOrderSetting/PurchaseOrderSetting.utils.ts","../../src/navigations/Routes/Settings/Views/PurchaseOrderSetting/AutoPoRestictionForm.tsx","../../src/navigations/Routes/Settings/Views/PurchaseOrderSetting/PurchaseOrderGeneralSettingForm.tsx","../../src/navigations/Routes/Settings/Views/PurchaseOrderSetting/PurchaseOrderSetting.tsx","../../src/navigations/Routes/Settings/Views/Accounting/AccountingSetting.tsx","../../src/hooks/api/useGetAccessiblePurchasePaymentMethodsQuery.ts","../../src/dialogs/PurchasePaymentMethodDialog/PurchasePaymentMethodDialog.tsx","../../src/tables/PurchasePaymentMethodsTable/configs/PurchasePaymentMethodsTableColumnsConfig.tsx","../../src/tables/PurchasePaymentMethodsTable/PurchasePaymentMethodsTable.tsx","../../src/tables/PurchasePaymentMethodsTable/PurchasePaymentMethodsTableContainer.tsx","../../src/navigations/Routes/Settings/Views/SellerAccountSetting/SellerAccountSettingPaymentMethods/SellerAccountSettingPaymentMethods.tsx","../../src/hooks/api/useGetAccessibleVendorAccountsQuery.ts","../../src/hooks/api/useGetAccessibleVendorsQuery.ts","../../src/navigations/Routes/Settings/Views/SellerAccountSetting/SellerAccountSettingVendorAccounts/SellerAccountSettingVendorAccounts.tsx","../../src/navigations/Routes/Settings/Views/SellerAccountSetting/SellerAccountSettingVendors/SellerAccountSettingVendors.tsx","../../src/navigations/Routes/Settings/Views/SellerAccountSetting/SellerAccountSettingBody/SellerAccountSettingBody.tsx","../../src/navigations/Routes/Settings/Views/SellerAccountSetting/SellerAccountSettingHeader/SellerAccountSettingHeader.styled.tsx","../../src/navigations/Routes/Settings/Views/SellerAccountSetting/SellerAccountSettingHeader/SellerAccountSettingHeader.tsx","../../src/navigations/Routes/Settings/Views/SellerAccountSetting/SellerAccountSetting.tsx","../../src/navigations/Routes/Settings/Views/SyncCenter/Components/ticketTypeOverrideInputForm.utils.ts","../../src/navigations/Routes/Settings/Views/SyncCenter/Components/TicketTypeOverrideInputForm.tsx","../../src/components/InstructionsList/InstructionsList.tsx","../../src/hooks/api/useTradeDeskResetPasswordMutation.ts","../../src/navigations/Routes/Settings/Views/SyncCenter/TradeDeskApiResetInstructions.tsx","../../src/navigations/Routes/Settings/Views/SyncCenter/SyncCenter.tsx","../../src/navigations/Routes/Settings/Views/UsersManagement/SellerRoleModal/SellerRoleModal.utils.ts","../../src/navigations/Routes/Settings/Views/UsersManagement/SellerRoleModal/SellerRoleModal.types.ts","../../src/navigations/Routes/Settings/Views/UsersManagement/SellerRoleModal/components/SellerPermissionDisplay.tsx","../../src/navigations/Routes/Settings/Views/UsersManagement/SellerRoleModal/components/SellerPermissionSelectionSection.tsx","../../src/navigations/Routes/Settings/Views/UsersManagement/SellerRoleModal/components/SellerUserDisplay.tsx","../../src/navigations/Routes/Settings/Views/UsersManagement/SellerRoleModal/components/SellerRoleUsersSection.tsx","../../src/navigations/Routes/Settings/Views/UsersManagement/SellerRoleModal/components/SellerRoleDetails.tsx","../../src/navigations/Routes/Settings/Views/UsersManagement/SellerRoleModal/components/LaunchDeleteRole.tsx","../../src/navigations/Routes/Settings/Views/UsersManagement/SellerRoleModal/SellerRoleModalFooter.tsx","../../src/navigations/Routes/Settings/Views/UsersManagement/SellerRoleModal/SellerRoleModalBody.tsx","../../src/navigations/Routes/Settings/Views/UsersManagement/SellerRoleModal/SellerRoleModal.tsx","../../src/navigations/Routes/Settings/Views/UsersManagement/SellerRoleModal/SellerRoleModalConfig.tsx","../../src/navigations/Routes/Settings/Views/UsersManagement/RolesTable/RolesTableColumnsConfig.tsx","../../src/navigations/Routes/Settings/Views/UsersManagement/RolesTable/RolesTable.tsx","../../src/navigations/Routes/Settings/Views/UsersManagement/Roles.tsx","../../src/components/common/SellerUserListItem/SellerUserListItem.tsx","../../src/navigations/Routes/Settings/Views/UsersManagement/EditTeam/TeamInput.tsx","../../src/navigations/Routes/Settings/Views/UsersManagement/EditTeam/AddTeamModal.tsx","../../src/navigations/Routes/Settings/Views/UsersManagement/EditTeam/EditTeamModal.tsx","../../src/navigations/Routes/Settings/Views/UsersManagement/TeamsTable/TeamsTableColumnsConfig.tsx","../../src/navigations/Routes/Settings/Views/UsersManagement/TeamsTable/TeamsTable.tsx","../../src/navigations/Routes/Settings/Views/UsersManagement/Teams.tsx","../../src/navigations/Routes/Settings/Views/VendorManagement/Vendors/components/FilterInput.tsx","../../src/navigations/Routes/Settings/Views/UsersManagement/EditUser/AddUserModal.tsx","../../src/navigations/Routes/Settings/Views/UsersManagement/UsersTable/hooks/useGetFilteredUsers.tsx","../../src/navigations/Routes/Settings/Views/UsersManagement/EditUser/EditUserModal.tsx","../../src/navigations/Routes/Settings/Views/UsersManagement/SellerPermissionDisplayModal/SellerPermissionDisplayModal.utils.ts","../../src/navigations/Routes/Settings/Views/UsersManagement/SellerPermissionDisplayModal/SellerPermissionDisplayModalBody.tsx","../../src/navigations/Routes/Settings/Views/UsersManagement/SellerPermissionDisplayModal/SellerPermissionDisplayModal.tsx","../../src/navigations/Routes/Settings/Views/UsersManagement/SellerPermissionDisplayModal/SellerPermissionDisplayModalConfig.tsx","../../src/navigations/Routes/Settings/Views/UsersManagement/UsersTable/UsersTableColumnsConfig.tsx","../../src/navigations/Routes/Settings/Views/UsersManagement/UsersTable/UsersTable.tsx","../../src/navigations/Routes/Settings/Views/UsersManagement/Users.tsx","../../src/navigations/Routes/Settings/Views/UsersManagement/UsersManagement.tsx","../../src/navigations/Routes/Settings/Views/VendorManagement/Payments/Payments.tsx","../../src/navigations/Routes/Settings/Views/VendorManagement/VendorManagement.tsx","../../src/navigations/Routes/Settings/Views/VendorManagement/Vendors/hooks/useGetVendorIdFromUrl.ts","../../src/hooks/api/useGetVendor.ts","../../src/hooks/api/useGetFilteredAccessibleVendorAccountsQuery.ts","../../src/hooks/api/useInvalidateGetVendorQuery.ts","../../src/modals/VendorDetails/components/VendorAccounts/components/FilterVendorAccountsInput.tsx","../../src/hooks/api/useInvalidateGetAccessibleVendorsQuery.ts","../../src/navigations/Routes/Settings/Views/VendorManagement/Vendors/hooks/useAddVendorAccount.ts","../../src/navigations/Routes/Settings/Views/VendorManagement/Vendors/components/VendorActions/useAddVendorAccountActions.ts","../../src/modals/VendorDetails/components/VendorAccounts/components/VendorAccountsTable/VendorAccountActions.tsx","../../src/modals/VendorDetails/components/VendorAccounts/components/VendorAccountsTable/VendorAccountsActionsCell.tsx","../../src/modals/VendorDetails/components/VendorAccounts/components/VendorAccountsTable/vendorsAccountsColumnUtils.types.ts","../../src/modals/VendorDetails/components/VendorAccounts/components/VendorAccountsTable/VendorsAccountsTableColumnsConfig.tsx","../../src/modals/VendorDetails/components/VendorAccounts/components/VendorAccountsTable/VendorAccountsTable.tsx","../../src/modals/VendorDetails/components/VendorAccounts/components/AddVendorAccount.tsx","../../src/modals/VendorDetails/components/VendorAccounts/VendorAccounts.tsx","../../src/navigations/Routes/Settings/Views/VendorManagement/Vendors/hooks/useAddVendor.ts","../../src/navigations/Routes/Settings/Views/VendorManagement/Vendors/components/VendorActions/useAddVendorActions.ts","../../src/modals/VendorDetails/VendorSummary.tsx","../../src/modals/VendorDetails/VendorDeliveryOverrideForm.tsx","../../src/modals/VendorDetails/VendorDetailsBodyContent.tsx","../../src/modals/VendorDetails/VendorDetailsModalHeader.tsx","../../src/modals/VendorDetails/VendorDetailsModalBody.tsx","../../src/modals/VendorDetails/VendorDetail.tsx","../../src/utils/vendorUtils.tsx","../../src/navigations/Routes/Settings/Views/VendorManagement/Vendors/components/VendorActions/useOpenVendorDetailsModal.ts","../../src/navigations/Routes/Settings/Views/VendorManagement/Vendors/components/VendorActions/VendorActions.tsx","../../src/navigations/Routes/Settings/Views/VendorManagement/Vendors/components/AddVendorButton.tsx","../../src/navigations/Routes/Settings/Views/VendorManagement/Vendors/components/VendorsPageHeader/VendorsPageHeader.tsx","../../src/navigations/Routes/Settings/Views/VendorManagement/Vendors/components/VendorsTable/vendorsColumnUtils.types.ts","../../src/navigations/Routes/Settings/Views/VendorManagement/Vendors/components/AccountStatus/AccountType.tsx","../../src/navigations/Routes/Settings/Views/VendorManagement/Vendors/components/VendorsTable/VendorActionsCell.tsx","../../src/navigations/Routes/Settings/Views/VendorManagement/Vendors/components/VendorsTable/VendorsTableColumnsConfig.tsx","../../src/navigations/Routes/Settings/Views/VendorManagement/Vendors/components/VendorsTable/VendorsTable.tsx","../../src/navigations/Routes/Settings/Views/VendorManagement/Vendors/hooks/useGetFilteredVendors.ts","../../src/navigations/Routes/Settings/Views/VendorManagement/Vendors/Vendors.tsx","../../src/navigations/Routes/Settings/Views/AccountAutoPricingSettings/AccountAutoPricingSettings.hooks.tsx","../../src/components/AutoPricing/AutoPricingCircuitBreakerMaxDiscountVelocityInput/AutoPricingCircuitBreakerMaxDiscountVelocityInput.tsx","../../src/components/AutoPricing/AutoPricingDefaultCompQuantitiesInput/AutoPricingDefaultCompQuantitiesInput.tsx","../../src/components/AutoPricing/AutoPricingMinCompListingsSlider/AutoPricingMinCompListingsSlider.tsx","../../src/navigations/Routes/Settings/Views/AccountAutoPricingSettings/AccountAutoPricingSettingsForm/AccountAutoPricingSettingsForm.tsx","../../src/navigations/Routes/Settings/Views/AccountAutoPricingSettings/AccountAutoPricingSettings.tsx","../../src/assets/signup.mp4","../../src/contexts/SignUpContext/SignUpContext.tsx","../../src/components/SignUp/EmailForm/Input/Input.tsx","../../src/svgs/ArrowRight.tsx","../../src/components/SignUp/EmailForm/SubmitButton/SubmitButton.tsx","../../src/components/SignUp/EmailForm/EmailForm.tsx","../../src/components/SignUp/Footer/Footer.tsx","../../src/components/SignUp/Titles/Titles.tsx","../../src/components/SignUp/InviteOnlyBanner/InviteOnlyBanner.tsx","../../src/navigations/Routes/SignUp/constants.ts","../../src/components/SignUp/SignUpRedirect.tsx","../../src/components/SignUp/SignUpValidator.tsx","../../src/navigations/Routes/SignUp/SignUp.tsx","../../src/tables/AdCampaignsTable/AdCampaignsTable.type.ts","../../src/utils/adCampaignUtils.tsx","../../src/tables/AdCampaignsTable/configs/AdCampaignsActionsCell.tsx","../../src/tables/AdCampaignsTable/configs/AdCampaignsDateCell.tsx","../../src/tables/AdCampaignsTable/configs/AdCampaignsTableColumnConfig.tsx","../../src/tables/AdCampaignsTable/useGetAdCampaignsTableColumns.ts","../../src/tables/AdCampaignsTable/AdCampaignsTable.tsx","../../src/modals/AdCampaignCreate/AdCampaignCreate.tsx","../../src/navigations/Routes/SponsoredListings/AdCampaignsToolbar/AdCampaignsToolbar.styled.tsx","../../src/navigations/Routes/SponsoredListings/AdCampaignsToolbar/AdCampaignsToolbar.tsx","../../src/navigations/Routes/SponsoredListings/SponsoredListings.tsx","../../src/svgs/PaymentsIcon.tsx","../../src/assets/icons/reach_pro/reach_pro_dark.ico","../../src/assets/icons/reach_pro/reach_pro_light.ico","../../src/components/SignUp/DocumentInfo.tsx","../../src/hooks/useMemoryTelemetry.ts","../../src/app/App.styled.tsx","../../src/app/QueryClients.tsx","../../src/app/App.tsx","../../src/app/AppRoutes.tsx","../../src/utils/sentry/sentry.ts","../../src/index.tsx"],"sourcesContent":["export enum MainRoute {\n SignUp = 'SignUp',\n Login = 'Login',\n LoginCallback = 'LoginCallback',\n Logout = 'Logout',\n LoginFailure = 'LoginFailure',\n Home = 'Home',\n Inventory = 'Inventory',\n InventorySearch = 'InventorySearch',\n Sales = 'Sales',\n SalesSearch = 'SalesSearch',\n Purchases = 'Purchases',\n PurchaseSearch = 'PurchaseSearch',\n RedirectToUK = 'RedirectToUK',\n SellerAccountSetting = 'SellerAccountSetting',\n Activity = 'Activity',\n Notifications = 'Notifications',\n ReleaseNotes = 'ReleaseNotes',\n Reports = 'Reports',\n ReportsV2 = 'ReportsV2',\n SyncCenter = 'SyncCenter',\n Email = 'Email',\n Settings = 'Settings',\n SponsoredListings = 'SponsoredListings',\n Payments = 'Payments',\n Discovery = 'Discovery',\n HelpCenter = 'HelpCenter',\n InventoryEvent = 'InventoryEvent',\n PurchasesEvent = 'PurchasesEvent',\n SalesEvent = 'SalesEvent',\n}\n","import { Locale } from 'date-fns';\nimport * as Locales from 'date-fns/locale';\n\nexport const getCurrentLocale = () => {\n return getLocaleFromLanguage(getCurrentLanguage());\n};\n\nexport const getCurrentLanguage = () => {\n const curLocaleStr =\n navigator.languages && navigator.languages.length\n ? navigator.languages[0]\n : navigator.language;\n\n return curLocaleStr;\n};\n\nexport const getCurrentLanguages = () => {\n return navigator.languages && navigator.languages.length\n ? navigator.languages\n : [navigator.language];\n};\n\nexport const generateAcceptLanguage = () => {\n return getCurrentLanguages().join(',');\n};\n\nexport const getLocaleFromLanguage = (language: string) => {\n return getDateFnsLocale(language.replaceAll('-', '') as keyof typeof Locales);\n};\n\nexport const getLocaleFromLanguageOrCurrent = (language?: string | null) => {\n language = language || getCurrentLanguage();\n return getLocaleFromLanguage(language);\n};\n\nexport const getDateFnsLocale = (locale: keyof typeof Locales): Locale => {\n return Locales[locale] ?? Locales.enUS;\n};\n\nexport const compareLocaleLowercased = (a: string, b: string) => {\n const aL = a?.toLocaleLowerCase();\n const bL = b?.toLocaleLowerCase();\n return aL < bL ? -1 : aL === bL ? 0 : 1;\n};\n\nexport const getInitialsFromText = (text: string) => {\n if (!text || text.length <= 2) {\n return (text || '').toLocaleUpperCase();\n }\n\n const firstLetter = text[0];\n const indexOfLastSpace = text.lastIndexOf(' ');\n if (indexOfLastSpace > 0 && indexOfLastSpace < text.length - 1) {\n return (firstLetter + text[indexOfLastSpace + 1]).toUpperCase();\n }\n\n return (firstLetter + text[1]).toUpperCase();\n};\n","//----------------------\n// \n// Generated using the NSwag toolchain v13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org)\n// \n//----------------------\n\n/* tslint:disable */\n/* eslint-disable */\n// ReSharper disable InconsistentNaming\n\nimport { generateAcceptLanguage } from './utils/localeUtils';\nexport class PosClientBase {\n private configuration: PosClientConfig;\n\n constructor(configuration: PosClientConfig) {\n this.configuration = configuration;\n }\n\n transformOptions = (options: RequestInit): Promise => {\n options.headers = {\n ...(options.headers || {}),\n 'Accept-Language': generateAcceptLanguage(),\n 'ActiveAccountId': this.configuration.activeAccountId ?? '',\n };\n\n return Promise.resolve(options);\n };\n}\n\nexport interface IActivityLogClient {\n\n getActivityLog(entityId: number | undefined, entityType: ActionOutboxEntityType | undefined): Promise;\n\n getActivityLogByFilter(query: ActivityLogQuery): Promise;\n\n getActivityLogWithAuditByFilter(query: ActivityLogQuery): Promise;\n\n getActivityLogTagNamesByEntityId(entityId: number | undefined, entityType: ActionOutboxEntityType | undefined): Promise;\n\n getRecentActivityLog(count: number | undefined, includeEventInfo: boolean | undefined): Promise;\n\n trackEntityView(entityId: number | undefined, entityType: ActionOutboxEntityType | undefined): Promise;\n\n trackListingCompsView(listingId: number | undefined): Promise;\n\n trackListingDocumentView(listingId: number | undefined, documentId: string | undefined, documentType: DocumentType | undefined): Promise;\n\n trackListingDocumentDownload(listingId: number | undefined, documentId: string | undefined, documentType: DocumentType | undefined): Promise;\n}\n\nexport class ActivityLogClient extends PosClientBase implements IActivityLogClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(configuration: PosClientConfig, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n super(configuration);\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"\";\n }\n\n getActivityLog(entityId: number | undefined, entityType: ActionOutboxEntityType | undefined): Promise {\n let url_ = this.baseUrl + \"/api/ActivityLog/GetActivityLog?\";\n if (entityId === null)\n throw new Error(\"The parameter 'entityId' cannot be null.\");\n else if (entityId !== undefined)\n url_ += \"entityId=\" + encodeURIComponent(\"\" + entityId) + \"&\";\n if (entityType === null)\n throw new Error(\"The parameter 'entityType' cannot be null.\");\n else if (entityType !== undefined)\n url_ += \"entityType=\" + encodeURIComponent(\"\" + entityType) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetActivityLog(_response);\n });\n }\n\n protected processGetActivityLog(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ActivityLog[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getActivityLogByFilter(query: ActivityLogQuery): Promise {\n let url_ = this.baseUrl + \"/api/ActivityLog/GetActivityLogByFilter\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetActivityLogByFilter(_response);\n });\n }\n\n protected processGetActivityLogByFilter(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ActivityLog[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getActivityLogWithAuditByFilter(query: ActivityLogQuery): Promise {\n let url_ = this.baseUrl + \"/api/ActivityLog/GetActivityLogWithAuditByFilter\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetActivityLogWithAuditByFilter(_response);\n });\n }\n\n protected processGetActivityLogWithAuditByFilter(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ActivityLog[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getActivityLogTagNamesByEntityId(entityId: number | undefined, entityType: ActionOutboxEntityType | undefined): Promise {\n let url_ = this.baseUrl + \"/api/ActivityLog/GetActivityLogTagNamesByEntityId?\";\n if (entityId === null)\n throw new Error(\"The parameter 'entityId' cannot be null.\");\n else if (entityId !== undefined)\n url_ += \"entityId=\" + encodeURIComponent(\"\" + entityId) + \"&\";\n if (entityType === null)\n throw new Error(\"The parameter 'entityType' cannot be null.\");\n else if (entityType !== undefined)\n url_ += \"entityType=\" + encodeURIComponent(\"\" + entityType) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetActivityLogTagNamesByEntityId(_response);\n });\n }\n\n protected processGetActivityLogTagNamesByEntityId(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as string[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getRecentActivityLog(count: number | undefined, includeEventInfo: boolean | undefined): Promise {\n let url_ = this.baseUrl + \"/api/ActivityLog/GetRecentActivityLog?\";\n if (count === null)\n throw new Error(\"The parameter 'count' cannot be null.\");\n else if (count !== undefined)\n url_ += \"count=\" + encodeURIComponent(\"\" + count) + \"&\";\n if (includeEventInfo === null)\n throw new Error(\"The parameter 'includeEventInfo' cannot be null.\");\n else if (includeEventInfo !== undefined)\n url_ += \"includeEventInfo=\" + encodeURIComponent(\"\" + includeEventInfo) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetRecentActivityLog(_response);\n });\n }\n\n protected processGetRecentActivityLog(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ActivityLog[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n trackEntityView(entityId: number | undefined, entityType: ActionOutboxEntityType | undefined): Promise {\n let url_ = this.baseUrl + \"/api/ActivityLog/TrackEntityView?\";\n if (entityId === null)\n throw new Error(\"The parameter 'entityId' cannot be null.\");\n else if (entityId !== undefined)\n url_ += \"entityId=\" + encodeURIComponent(\"\" + entityId) + \"&\";\n if (entityType === null)\n throw new Error(\"The parameter 'entityType' cannot be null.\");\n else if (entityType !== undefined)\n url_ += \"entityType=\" + encodeURIComponent(\"\" + entityType) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processTrackEntityView(_response);\n });\n }\n\n protected processTrackEntityView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n trackListingCompsView(listingId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/ActivityLog/TrackListingCompsView?\";\n if (listingId === null)\n throw new Error(\"The parameter 'listingId' cannot be null.\");\n else if (listingId !== undefined)\n url_ += \"listingId=\" + encodeURIComponent(\"\" + listingId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processTrackListingCompsView(_response);\n });\n }\n\n protected processTrackListingCompsView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n trackListingDocumentView(listingId: number | undefined, documentId: string | undefined, documentType: DocumentType | undefined): Promise {\n let url_ = this.baseUrl + \"/api/ActivityLog/TrackListingDocumentView?\";\n if (listingId === null)\n throw new Error(\"The parameter 'listingId' cannot be null.\");\n else if (listingId !== undefined)\n url_ += \"listingId=\" + encodeURIComponent(\"\" + listingId) + \"&\";\n if (documentId === null)\n throw new Error(\"The parameter 'documentId' cannot be null.\");\n else if (documentId !== undefined)\n url_ += \"documentId=\" + encodeURIComponent(\"\" + documentId) + \"&\";\n if (documentType === null)\n throw new Error(\"The parameter 'documentType' cannot be null.\");\n else if (documentType !== undefined)\n url_ += \"documentType=\" + encodeURIComponent(\"\" + documentType) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processTrackListingDocumentView(_response);\n });\n }\n\n protected processTrackListingDocumentView(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n trackListingDocumentDownload(listingId: number | undefined, documentId: string | undefined, documentType: DocumentType | undefined): Promise {\n let url_ = this.baseUrl + \"/api/ActivityLog/TrackListingDocumentDownload?\";\n if (listingId === null)\n throw new Error(\"The parameter 'listingId' cannot be null.\");\n else if (listingId !== undefined)\n url_ += \"listingId=\" + encodeURIComponent(\"\" + listingId) + \"&\";\n if (documentId === null)\n throw new Error(\"The parameter 'documentId' cannot be null.\");\n else if (documentId !== undefined)\n url_ += \"documentId=\" + encodeURIComponent(\"\" + documentId) + \"&\";\n if (documentType === null)\n throw new Error(\"The parameter 'documentType' cannot be null.\");\n else if (documentType !== undefined)\n url_ += \"documentType=\" + encodeURIComponent(\"\" + documentType) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processTrackListingDocumentDownload(_response);\n });\n }\n\n protected processTrackListingDocumentDownload(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface IAddressClient {\n\n getKnownCountries(): Promise<{ [key: string]: string; }>;\n\n getStateProvinces(): Promise<{ [key: string]: StateProvince[]; }>;\n\n getCitiesWithStateProvince(): Promise<{ [key: string]: City[]; }>;\n\n getCitiesWithoutStateProvince(): Promise<{ [key: string]: City[]; }>;\n}\n\nexport class AddressClient extends PosClientBase implements IAddressClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(configuration: PosClientConfig, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n super(configuration);\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"\";\n }\n\n getKnownCountries(): Promise<{ [key: string]: string; }> {\n let url_ = this.baseUrl + \"/api/Address/GetKnownCountries\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetKnownCountries(_response);\n });\n }\n\n protected processGetKnownCountries(response: Response): Promise<{ [key: string]: string; }> {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as { [key: string]: string; };\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve<{ [key: string]: string; }>(null as any);\n }\n\n getStateProvinces(): Promise<{ [key: string]: StateProvince[]; }> {\n let url_ = this.baseUrl + \"/api/Address/GetStateProvinces\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetStateProvinces(_response);\n });\n }\n\n protected processGetStateProvinces(response: Response): Promise<{ [key: string]: StateProvince[]; }> {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as { [key: string]: StateProvince[]; };\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve<{ [key: string]: StateProvince[]; }>(null as any);\n }\n\n getCitiesWithStateProvince(): Promise<{ [key: string]: City[]; }> {\n let url_ = this.baseUrl + \"/api/Address/GetCitiesWithStateProvince\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetCitiesWithStateProvince(_response);\n });\n }\n\n protected processGetCitiesWithStateProvince(response: Response): Promise<{ [key: string]: City[]; }> {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as { [key: string]: City[]; };\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve<{ [key: string]: City[]; }>(null as any);\n }\n\n getCitiesWithoutStateProvince(): Promise<{ [key: string]: City[]; }> {\n let url_ = this.baseUrl + \"/api/Address/GetCitiesWithoutStateProvince\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetCitiesWithoutStateProvince(_response);\n });\n }\n\n protected processGetCitiesWithoutStateProvince(response: Response): Promise<{ [key: string]: City[]; }> {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as { [key: string]: City[]; };\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve<{ [key: string]: City[]; }>(null as any);\n }\n}\n\nexport interface IAdminClient {\n\n getAppContext(): Promise;\n}\n\nexport class AdminClient extends PosClientBase implements IAdminClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(configuration: PosClientConfig, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n super(configuration);\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"\";\n }\n\n getAppContext(): Promise {\n let url_ = this.baseUrl + \"/api/Admin/GetAppContext\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetAppContext(_response);\n });\n }\n\n protected processGetAppContext(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReactAppContext;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface IAdPlatformCatalogClient {\n\n getCatalogForSeller(): Promise;\n}\n\nexport class AdPlatformCatalogClient extends PosClientBase implements IAdPlatformCatalogClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(configuration: PosClientConfig, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n super(configuration);\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"\";\n }\n\n getCatalogForSeller(): Promise {\n let url_ = this.baseUrl + \"/api/AdPlatformCatalog/GetCatalogForSeller\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetCatalogForSeller(_response);\n });\n }\n\n protected processGetCatalogForSeller(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AdPlatformCatalogResults;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface IAdPlatformReportingClient {\n\n getTransactionReport(currentyCode: string | undefined, aggType: TransactionAggType | undefined, adCampaignId: string | null | undefined, adGroupId: string | null | undefined): Promise;\n}\n\nexport class AdPlatformReportingClient extends PosClientBase implements IAdPlatformReportingClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(configuration: PosClientConfig, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n super(configuration);\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"\";\n }\n\n getTransactionReport(currentyCode: string | undefined, aggType: TransactionAggType | undefined, adCampaignId: string | null | undefined, adGroupId: string | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/AdPlatformReporting/GetTransactionReport?\";\n if (currentyCode === null)\n throw new Error(\"The parameter 'currentyCode' cannot be null.\");\n else if (currentyCode !== undefined)\n url_ += \"currentyCode=\" + encodeURIComponent(\"\" + currentyCode) + \"&\";\n if (aggType === null)\n throw new Error(\"The parameter 'aggType' cannot be null.\");\n else if (aggType !== undefined)\n url_ += \"aggType=\" + encodeURIComponent(\"\" + aggType) + \"&\";\n if (adCampaignId !== undefined && adCampaignId !== null)\n url_ += \"adCampaignId=\" + encodeURIComponent(\"\" + adCampaignId) + \"&\";\n if (adGroupId !== undefined && adGroupId !== null)\n url_ += \"adGroupId=\" + encodeURIComponent(\"\" + adGroupId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetTransactionReport(_response);\n });\n }\n\n protected processGetTransactionReport(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AdPlatformTransactionAgg[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface IAutoPoClient {\n\n getInboundEmails(query: AutoPoInboundEmailQuery, take: number | null | undefined, skip: number | null | undefined): Promise;\n\n getClassifiedInboundEmails(classificationTypes: AutoPoInboundEmailClassificationType[], take: number | null | undefined, skip: number | null | undefined, isSortDescending: boolean | null | undefined): Promise;\n\n getClassifiedInboundEmailsCount(classificationTypes: AutoPoInboundEmailClassificationType[]): Promise;\n\n getPartialPurchaseOrderInboundEmails(query: AutoPoInboundEmailPartialPurchaseOrderQuery, take: number | null | undefined, skip: number | null | undefined): Promise;\n\n getPartialPurchaseOrderInboundEmailsCount(query: AutoPoInboundEmailPartialPurchaseOrderQuery): Promise;\n\n getPartialPurchaseOrder(partialPurchaseOrderId: number | undefined): Promise;\n\n getSingleInboundEmailThread(inboundEmailId: number | undefined): Promise;\n\n getPurchaseInboundEmailThread(purchaseOrderId: number | undefined, isClassified: boolean | null | undefined): Promise;\n\n getSaleInboundEmailThread(saleId: number | undefined, isClassified: boolean | null | undefined): Promise;\n\n getPrivateInboundEmailThread(toEmailAddress: string | undefined, classificationType: AutoPoInboundEmailClassificationType | undefined, isClassified: boolean | null | undefined): Promise;\n\n getInboundEmailBody(inboundEmailId: number | undefined): Promise;\n\n getAutoPoClassifiedInboundEmailIdForEntity(purchaseOrderId: number | null | undefined, saleId: number | null | undefined): Promise;\n\n classifyInboundEmail(inboundEmailId: number | undefined, classificationType: AutoPoInboundEmailClassificationType | undefined, purchaseOrderId: number | null | undefined, saleId: number | null | undefined): Promise;\n\n unclassifyInboundEmail(inboundEmailId: number | undefined, purchaseOrderId: number | null | undefined): Promise;\n\n canReprocessEmail(inboundEmailId: number | undefined, purchaseOrderId: number | null | undefined): Promise;\n\n getInboundEmailSellerGuidIds(): Promise;\n\n getSellerAccountCountryRestrictions(): Promise;\n\n getSellerAccountVendorRestrictions(): Promise;\n\n upsertSellerAccountCountryRestrictions(countryRestrictions: AutoPoSellerAccountCountryRestriction[]): Promise;\n\n upsertSellerAccountVendorRestrictions(vendorRestrictions: AutoPoSellerAccountVendorRestriction[]): Promise;\n}\n\nexport class AutoPoClient extends PosClientBase implements IAutoPoClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(configuration: PosClientConfig, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n super(configuration);\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"\";\n }\n\n getInboundEmails(query: AutoPoInboundEmailQuery, take: number | null | undefined, skip: number | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/AutoPo/GetInboundEmails?\";\n if (take !== undefined && take !== null)\n url_ += \"take=\" + encodeURIComponent(\"\" + take) + \"&\";\n if (skip !== undefined && skip !== null)\n url_ += \"skip=\" + encodeURIComponent(\"\" + skip) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetInboundEmails(_response);\n });\n }\n\n protected processGetInboundEmails(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AutoPoInboundEmail[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getClassifiedInboundEmails(classificationTypes: AutoPoInboundEmailClassificationType[], take: number | null | undefined, skip: number | null | undefined, isSortDescending: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/AutoPo/GetClassifiedInboundEmails?\";\n if (take !== undefined && take !== null)\n url_ += \"take=\" + encodeURIComponent(\"\" + take) + \"&\";\n if (skip !== undefined && skip !== null)\n url_ += \"skip=\" + encodeURIComponent(\"\" + skip) + \"&\";\n if (isSortDescending !== undefined && isSortDescending !== null)\n url_ += \"isSortDescending=\" + encodeURIComponent(\"\" + isSortDescending) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(classificationTypes);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetClassifiedInboundEmails(_response);\n });\n }\n\n protected processGetClassifiedInboundEmails(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AutoPoInboundEmail[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getClassifiedInboundEmailsCount(classificationTypes: AutoPoInboundEmailClassificationType[]): Promise {\n let url_ = this.baseUrl + \"/api/AutoPo/GetClassifiedInboundEmailsCount\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(classificationTypes);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetClassifiedInboundEmailsCount(_response);\n });\n }\n\n protected processGetClassifiedInboundEmailsCount(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as number;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getPartialPurchaseOrderInboundEmails(query: AutoPoInboundEmailPartialPurchaseOrderQuery, take: number | null | undefined, skip: number | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/AutoPo/GetPartialPurchaseOrderInboundEmails?\";\n if (take !== undefined && take !== null)\n url_ += \"take=\" + encodeURIComponent(\"\" + take) + \"&\";\n if (skip !== undefined && skip !== null)\n url_ += \"skip=\" + encodeURIComponent(\"\" + skip) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetPartialPurchaseOrderInboundEmails(_response);\n });\n }\n\n protected processGetPartialPurchaseOrderInboundEmails(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AutoPoPartialPurchaseOrderInboundEmail[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getPartialPurchaseOrderInboundEmailsCount(query: AutoPoInboundEmailPartialPurchaseOrderQuery): Promise {\n let url_ = this.baseUrl + \"/api/AutoPo/GetPartialPurchaseOrderInboundEmailsCount\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetPartialPurchaseOrderInboundEmailsCount(_response);\n });\n }\n\n protected processGetPartialPurchaseOrderInboundEmailsCount(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as number;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getPartialPurchaseOrder(partialPurchaseOrderId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/AutoPo/GetPartialPurchaseOrder?\";\n if (partialPurchaseOrderId === null)\n throw new Error(\"The parameter 'partialPurchaseOrderId' cannot be null.\");\n else if (partialPurchaseOrderId !== undefined)\n url_ += \"partialPurchaseOrderId=\" + encodeURIComponent(\"\" + partialPurchaseOrderId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetPartialPurchaseOrder(_response);\n });\n }\n\n protected processGetPartialPurchaseOrder(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AutoPoPartialPurchaseOrder;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getSingleInboundEmailThread(inboundEmailId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/AutoPo/GetSingleInboundEmailThread?\";\n if (inboundEmailId === null)\n throw new Error(\"The parameter 'inboundEmailId' cannot be null.\");\n else if (inboundEmailId !== undefined)\n url_ += \"inboundEmailId=\" + encodeURIComponent(\"\" + inboundEmailId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetSingleInboundEmailThread(_response);\n });\n }\n\n protected processGetSingleInboundEmailThread(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AutoPoInboundEmailThreadEmail[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getPurchaseInboundEmailThread(purchaseOrderId: number | undefined, isClassified: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/AutoPo/GetPurchaseInboundEmailThread?\";\n if (purchaseOrderId === null)\n throw new Error(\"The parameter 'purchaseOrderId' cannot be null.\");\n else if (purchaseOrderId !== undefined)\n url_ += \"purchaseOrderId=\" + encodeURIComponent(\"\" + purchaseOrderId) + \"&\";\n if (isClassified !== undefined && isClassified !== null)\n url_ += \"isClassified=\" + encodeURIComponent(\"\" + isClassified) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetPurchaseInboundEmailThread(_response);\n });\n }\n\n protected processGetPurchaseInboundEmailThread(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AutoPoInboundEmailThreadEmail[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getSaleInboundEmailThread(saleId: number | undefined, isClassified: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/AutoPo/GetSaleInboundEmailThread?\";\n if (saleId === null)\n throw new Error(\"The parameter 'saleId' cannot be null.\");\n else if (saleId !== undefined)\n url_ += \"saleId=\" + encodeURIComponent(\"\" + saleId) + \"&\";\n if (isClassified !== undefined && isClassified !== null)\n url_ += \"isClassified=\" + encodeURIComponent(\"\" + isClassified) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetSaleInboundEmailThread(_response);\n });\n }\n\n protected processGetSaleInboundEmailThread(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AutoPoInboundEmailThreadEmail[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getPrivateInboundEmailThread(toEmailAddress: string | undefined, classificationType: AutoPoInboundEmailClassificationType | undefined, isClassified: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/AutoPo/GetPrivateInboundEmailThread?\";\n if (toEmailAddress === null)\n throw new Error(\"The parameter 'toEmailAddress' cannot be null.\");\n else if (toEmailAddress !== undefined)\n url_ += \"toEmailAddress=\" + encodeURIComponent(\"\" + toEmailAddress) + \"&\";\n if (classificationType === null)\n throw new Error(\"The parameter 'classificationType' cannot be null.\");\n else if (classificationType !== undefined)\n url_ += \"classificationType=\" + encodeURIComponent(\"\" + classificationType) + \"&\";\n if (isClassified !== undefined && isClassified !== null)\n url_ += \"isClassified=\" + encodeURIComponent(\"\" + isClassified) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetPrivateInboundEmailThread(_response);\n });\n }\n\n protected processGetPrivateInboundEmailThread(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AutoPoInboundEmailThreadEmail[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getInboundEmailBody(inboundEmailId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/AutoPo/GetInboundEmailBody?\";\n if (inboundEmailId === null)\n throw new Error(\"The parameter 'inboundEmailId' cannot be null.\");\n else if (inboundEmailId !== undefined)\n url_ += \"inboundEmailId=\" + encodeURIComponent(\"\" + inboundEmailId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetInboundEmailBody(_response);\n });\n }\n\n protected processGetInboundEmailBody(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ValueTupleOfStringAndString;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getAutoPoClassifiedInboundEmailIdForEntity(purchaseOrderId: number | null | undefined, saleId: number | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/AutoPo/GetAutoPoClassifiedInboundEmailIdForEntity?\";\n if (purchaseOrderId !== undefined && purchaseOrderId !== null)\n url_ += \"purchaseOrderId=\" + encodeURIComponent(\"\" + purchaseOrderId) + \"&\";\n if (saleId !== undefined && saleId !== null)\n url_ += \"saleId=\" + encodeURIComponent(\"\" + saleId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetAutoPoClassifiedInboundEmailIdForEntity(_response);\n });\n }\n\n protected processGetAutoPoClassifiedInboundEmailIdForEntity(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as number;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n classifyInboundEmail(inboundEmailId: number | undefined, classificationType: AutoPoInboundEmailClassificationType | undefined, purchaseOrderId: number | null | undefined, saleId: number | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/AutoPo/ClassifyInboundEmail?\";\n if (inboundEmailId === null)\n throw new Error(\"The parameter 'inboundEmailId' cannot be null.\");\n else if (inboundEmailId !== undefined)\n url_ += \"inboundEmailId=\" + encodeURIComponent(\"\" + inboundEmailId) + \"&\";\n if (classificationType === null)\n throw new Error(\"The parameter 'classificationType' cannot be null.\");\n else if (classificationType !== undefined)\n url_ += \"classificationType=\" + encodeURIComponent(\"\" + classificationType) + \"&\";\n if (purchaseOrderId !== undefined && purchaseOrderId !== null)\n url_ += \"purchaseOrderId=\" + encodeURIComponent(\"\" + purchaseOrderId) + \"&\";\n if (saleId !== undefined && saleId !== null)\n url_ += \"saleId=\" + encodeURIComponent(\"\" + saleId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processClassifyInboundEmail(_response);\n });\n }\n\n protected processClassifyInboundEmail(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n unclassifyInboundEmail(inboundEmailId: number | undefined, purchaseOrderId: number | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/AutoPo/UnclassifyInboundEmail?\";\n if (inboundEmailId === null)\n throw new Error(\"The parameter 'inboundEmailId' cannot be null.\");\n else if (inboundEmailId !== undefined)\n url_ += \"inboundEmailId=\" + encodeURIComponent(\"\" + inboundEmailId) + \"&\";\n if (purchaseOrderId !== undefined && purchaseOrderId !== null)\n url_ += \"purchaseOrderId=\" + encodeURIComponent(\"\" + purchaseOrderId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUnclassifyInboundEmail(_response);\n });\n }\n\n protected processUnclassifyInboundEmail(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n canReprocessEmail(inboundEmailId: number | undefined, purchaseOrderId: number | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/AutoPo/CanReprocessEmail?\";\n if (inboundEmailId === null)\n throw new Error(\"The parameter 'inboundEmailId' cannot be null.\");\n else if (inboundEmailId !== undefined)\n url_ += \"inboundEmailId=\" + encodeURIComponent(\"\" + inboundEmailId) + \"&\";\n if (purchaseOrderId !== undefined && purchaseOrderId !== null)\n url_ += \"purchaseOrderId=\" + encodeURIComponent(\"\" + purchaseOrderId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processCanReprocessEmail(_response);\n });\n }\n\n protected processCanReprocessEmail(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getInboundEmailSellerGuidIds(): Promise {\n let url_ = this.baseUrl + \"/api/AutoPo/GetInboundEmailSellerGuidIds\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetInboundEmailSellerGuidIds(_response);\n });\n }\n\n protected processGetInboundEmailSellerGuidIds(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as string[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getSellerAccountCountryRestrictions(): Promise {\n let url_ = this.baseUrl + \"/api/AutoPo/GetSellerAccountCountryRestrictions\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetSellerAccountCountryRestrictions(_response);\n });\n }\n\n protected processGetSellerAccountCountryRestrictions(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AutoPoSellerAccountCountryRestriction[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getSellerAccountVendorRestrictions(): Promise {\n let url_ = this.baseUrl + \"/api/AutoPo/GetSellerAccountVendorRestrictions\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetSellerAccountVendorRestrictions(_response);\n });\n }\n\n protected processGetSellerAccountVendorRestrictions(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AutoPoSellerAccountVendorRestriction[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n upsertSellerAccountCountryRestrictions(countryRestrictions: AutoPoSellerAccountCountryRestriction[]): Promise {\n let url_ = this.baseUrl + \"/api/AutoPo/UpsertSellerAccountCountryRestrictions\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(countryRestrictions);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpsertSellerAccountCountryRestrictions(_response);\n });\n }\n\n protected processUpsertSellerAccountCountryRestrictions(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n upsertSellerAccountVendorRestrictions(vendorRestrictions: AutoPoSellerAccountVendorRestriction[]): Promise {\n let url_ = this.baseUrl + \"/api/AutoPo/UpsertSellerAccountVendorRestrictions\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(vendorRestrictions);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpsertSellerAccountVendorRestrictions(_response);\n });\n }\n\n protected processUpsertSellerAccountVendorRestrictions(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface IBulkEditListingClient {\n\n cancelBackgroundTask(updateKey: string | undefined): Promise;\n\n bulkUpdateListingsPricesPreview(query: ListingQuery): Promise;\n\n bulkUpdateListingsPricesByPercent(preview: BulkEditPreview, percent: number | undefined, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n\n bulkUpdateListingsPrices(preview: BulkEditPreview, priceChange: number | undefined, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n\n bulkUpdatePriceFloorCeilingPreview(query: ListingQuery): Promise;\n\n bulkUpdatePriceFloor(preview: BulkEditPreview, amount: number | undefined, updateKey: string | undefined, isRelative: boolean | undefined, adjustmentType: PricingFloorCeilingAdjustmentType | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n\n bulkUpdatePriceCeiling(preview: BulkEditPreview, percentMarketPrice: number | undefined, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n\n bulkUngroupListingsPreview(query: ListingQuery): Promise;\n\n bulkUngroupListings(preview: BulkEditPreview, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n\n bulkRemovePredeliveryPreview(query: ListingQuery): Promise;\n\n bulkRemovePredelivery(preview: BulkEditPreview, removeBarcodes: boolean | undefined, removePdfs: boolean | undefined, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n\n bulkUpdateMarketplaceSeatingOverridesPreview(query: ListingQuery): Promise;\n\n bulkUpdateMarketplaceSeatingOverrides(input: ValueTupleOfBulkEditPreviewAndListingDetailsUpdateInput, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n\n bulkChangeEventPreview(query: ListingQuery): Promise;\n\n bulkChangeEvent(preview: BulkEditPreview, posEventId: string | undefined, viagogoEventId: number | null | undefined, eventMappingId: string | null | undefined, deallocateSales: boolean | null | undefined, reason: string | null | undefined, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n\n bulkUpdateAutoPricingSettingsPreview(query: ListingQuery): Promise;\n\n bulkUpdateAutoPricingSettings(input: ValueTupleOfBulkEditPreviewAndListingDetailsUpdateInput, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n\n bulkUpdateAutoPricingSettingsV2(input: ValueTupleOfBulkEditPreviewAndListingDetailsAutoPricingSectionUpdatesV2, viagogoEventId: number | null | undefined, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n\n bulkGetListingPriceCalculationsInEvent(viagogoEventId: number | undefined, body: ValueTupleOfInt64OfAndListingPriceCalculationsInEventInput): Promise;\n\n bulkUpdateGeneralSettingsPreview(query: ListingQuery, hasPurchaseUpdates: boolean | undefined): Promise;\n\n bulkUpdateGeneralSettings(input: ValueTupleOfBulkEditPreviewAndListingDetailsUpdateInput, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n\n bulkUpdateMarketplacePrices(input: ValueTupleOfBulkEditPreviewAndListingPricesUpdateInput, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n\n bulkUpdateMarketplacePricesPreview(query: ListingQuery): Promise;\n\n bulkBroadcastListingsPreview(query: ListingQuery): Promise;\n\n bulkBroadcastListings(input: ValueTupleOfBulkEditPreviewAndISetOfMarketplaceAndISetOfMarketplace, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n\n bulkUpdateAdminHoldPreview(query: ListingQuery): Promise;\n\n bulkUpdateAdminHold(preview: BulkEditPreview, adminHoldExpirationDate: string | null | undefined, adminHoldNotes: string | null | undefined, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n\n bulkUpdateTicketTypeRulesPreview(query: ListingQuery, updateSalesOfListings: boolean | undefined): Promise;\n\n bulkUpdateTicketTypeRules(input: ValueTupleOfBulkEditPreviewAndDeliveryTypeAndIListOfTicketTypePriority, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined, updateSalesOfListings: boolean | undefined): Promise;\n\n bulkUpdateTagsPreview(query: ListingQuery): Promise;\n\n bulkUpdateTags(preview: BulkEditPreview, tagName: string | undefined, tagValue: string | undefined, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n\n bulkRemoveTags(preview: BulkEditPreview, tagName: string | undefined, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n\n bulkCreateListingGroups(input: MergeListingGroupInputList, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n\n /**\n * Group events by event id\n * @param updateKey (optional) \n * @param supportBackgroundProgress (optional) \n */\n bulkAutoCompAndGroupListingsV2(input: AutoGroupListingV2Input, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n\n bulkUpdatePurchaseCommissionsPreview(query: ListingQuery): Promise;\n\n bulkUpdatePurchaseCommissions(input: ValueTupleOfBulkEditPreviewAndIListOfCommission, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n\n bulkDeleteSeatSaversPreview(query: ListingQuery): Promise;\n\n bulkDeleteSeatSavers(preview: BulkEditPreview, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n\n bulkUpdateInternalNotesPreview(query: ListingQuery): Promise;\n\n bulkUpdateInternalNotes(preview: BulkEditPreview, updateKey: string | undefined, isUpdate: boolean | undefined, searchString: string | null | undefined, replaceString: string | null | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n\n bulkUpdateIsNoFulfillPreview(query: ListingQuery, updateSalesOfListings: boolean | undefined): Promise;\n\n bulkUpdateIsNoFulfill(preview: BulkEditPreview, updateKey: string | undefined, isNoFulfill: boolean | undefined, updateSalesOfListings: boolean | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n\n bulkUpdateDeliveryTypePreview(query: ListingQuery): Promise;\n\n bulkUpdateDeliveryType(input: ValueTupleOfBulkEditPreviewAndDeliveryTypeAndIListOfTicketTypePriority, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n\n bulkUpdateSeatTraitsPreview(query: ListingQuery): Promise;\n\n bulkUpdateSeatTraits(input: ValueTupleOfBulkEditPreviewAndIListOfListingNote, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined, appendSeatTraits: boolean | null | undefined): Promise;\n\n bulkWasteTicketsPreview(query: ListingQuery): Promise;\n\n bulkWasteTickets(preview: BulkEditPreview, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n}\n\nexport class BulkEditListingClient extends PosClientBase implements IBulkEditListingClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(configuration: PosClientConfig, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n super(configuration);\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"\";\n }\n\n cancelBackgroundTask(updateKey: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/CancelBackgroundTask?\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processCancelBackgroundTask(_response);\n });\n }\n\n protected processCancelBackgroundTask(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateListingsPricesPreview(query: ListingQuery): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkUpdateListingsPricesPreview\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateListingsPricesPreview(_response);\n });\n }\n\n protected processBulkUpdateListingsPricesPreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditPreviewWithDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateListingsPricesByPercent(preview: BulkEditPreview, percent: number | undefined, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkUpdateListingsPricesByPercent?\";\n if (percent === null)\n throw new Error(\"The parameter 'percent' cannot be null.\");\n else if (percent !== undefined)\n url_ += \"percent=\" + encodeURIComponent(\"\" + percent) + \"&\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(preview);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateListingsPricesByPercent(_response);\n });\n }\n\n protected processBulkUpdateListingsPricesByPercent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateListingsPrices(preview: BulkEditPreview, priceChange: number | undefined, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkUpdateListingsPrices?\";\n if (priceChange === null)\n throw new Error(\"The parameter 'priceChange' cannot be null.\");\n else if (priceChange !== undefined)\n url_ += \"priceChange=\" + encodeURIComponent(\"\" + priceChange) + \"&\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(preview);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateListingsPrices(_response);\n });\n }\n\n protected processBulkUpdateListingsPrices(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdatePriceFloorCeilingPreview(query: ListingQuery): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkUpdatePriceFloorCeilingPreview\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdatePriceFloorCeilingPreview(_response);\n });\n }\n\n protected processBulkUpdatePriceFloorCeilingPreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditPreviewWithDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdatePriceFloor(preview: BulkEditPreview, amount: number | undefined, updateKey: string | undefined, isRelative: boolean | undefined, adjustmentType: PricingFloorCeilingAdjustmentType | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkUpdatePriceFloor?\";\n if (amount === null)\n throw new Error(\"The parameter 'amount' cannot be null.\");\n else if (amount !== undefined)\n url_ += \"amount=\" + encodeURIComponent(\"\" + amount) + \"&\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (isRelative === null)\n throw new Error(\"The parameter 'isRelative' cannot be null.\");\n else if (isRelative !== undefined)\n url_ += \"isRelative=\" + encodeURIComponent(\"\" + isRelative) + \"&\";\n if (adjustmentType === null)\n throw new Error(\"The parameter 'adjustmentType' cannot be null.\");\n else if (adjustmentType !== undefined)\n url_ += \"adjustmentType=\" + encodeURIComponent(\"\" + adjustmentType) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(preview);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdatePriceFloor(_response);\n });\n }\n\n protected processBulkUpdatePriceFloor(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdatePriceCeiling(preview: BulkEditPreview, percentMarketPrice: number | undefined, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkUpdatePriceCeiling?\";\n if (percentMarketPrice === null)\n throw new Error(\"The parameter 'percentMarketPrice' cannot be null.\");\n else if (percentMarketPrice !== undefined)\n url_ += \"percentMarketPrice=\" + encodeURIComponent(\"\" + percentMarketPrice) + \"&\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(preview);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdatePriceCeiling(_response);\n });\n }\n\n protected processBulkUpdatePriceCeiling(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUngroupListingsPreview(query: ListingQuery): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkUngroupListingsPreview\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUngroupListingsPreview(_response);\n });\n }\n\n protected processBulkUngroupListingsPreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditPreviewWithDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUngroupListings(preview: BulkEditPreview, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkUngroupListings?\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(preview);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUngroupListings(_response);\n });\n }\n\n protected processBulkUngroupListings(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkRemovePredeliveryPreview(query: ListingQuery): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkRemovePredeliveryPreview\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkRemovePredeliveryPreview(_response);\n });\n }\n\n protected processBulkRemovePredeliveryPreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditPreviewWithDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkRemovePredelivery(preview: BulkEditPreview, removeBarcodes: boolean | undefined, removePdfs: boolean | undefined, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkRemovePredelivery?\";\n if (removeBarcodes === null)\n throw new Error(\"The parameter 'removeBarcodes' cannot be null.\");\n else if (removeBarcodes !== undefined)\n url_ += \"removeBarcodes=\" + encodeURIComponent(\"\" + removeBarcodes) + \"&\";\n if (removePdfs === null)\n throw new Error(\"The parameter 'removePdfs' cannot be null.\");\n else if (removePdfs !== undefined)\n url_ += \"removePdfs=\" + encodeURIComponent(\"\" + removePdfs) + \"&\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(preview);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkRemovePredelivery(_response);\n });\n }\n\n protected processBulkRemovePredelivery(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateMarketplaceSeatingOverridesPreview(query: ListingQuery): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkUpdateMarketplaceSeatingOverridesPreview\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateMarketplaceSeatingOverridesPreview(_response);\n });\n }\n\n protected processBulkUpdateMarketplaceSeatingOverridesPreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditPreviewWithDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateMarketplaceSeatingOverrides(input: ValueTupleOfBulkEditPreviewAndListingDetailsUpdateInput, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkUpdateMarketplaceSeatingOverrides?\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateMarketplaceSeatingOverrides(_response);\n });\n }\n\n protected processBulkUpdateMarketplaceSeatingOverrides(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkChangeEventPreview(query: ListingQuery): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkChangeEventPreview\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkChangeEventPreview(_response);\n });\n }\n\n protected processBulkChangeEventPreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditPreviewWithDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkChangeEvent(preview: BulkEditPreview, posEventId: string | undefined, viagogoEventId: number | null | undefined, eventMappingId: string | null | undefined, deallocateSales: boolean | null | undefined, reason: string | null | undefined, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkChangeEvent?\";\n if (posEventId === null)\n throw new Error(\"The parameter 'posEventId' cannot be null.\");\n else if (posEventId !== undefined)\n url_ += \"posEventId=\" + encodeURIComponent(\"\" + posEventId) + \"&\";\n if (viagogoEventId !== undefined && viagogoEventId !== null)\n url_ += \"viagogoEventId=\" + encodeURIComponent(\"\" + viagogoEventId) + \"&\";\n if (eventMappingId !== undefined && eventMappingId !== null)\n url_ += \"eventMappingId=\" + encodeURIComponent(\"\" + eventMappingId) + \"&\";\n if (deallocateSales !== undefined && deallocateSales !== null)\n url_ += \"deallocateSales=\" + encodeURIComponent(\"\" + deallocateSales) + \"&\";\n if (reason !== undefined && reason !== null)\n url_ += \"reason=\" + encodeURIComponent(\"\" + reason) + \"&\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(preview);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkChangeEvent(_response);\n });\n }\n\n protected processBulkChangeEvent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateAutoPricingSettingsPreview(query: ListingQuery): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkUpdateAutoPricingSettingsPreview\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateAutoPricingSettingsPreview(_response);\n });\n }\n\n protected processBulkUpdateAutoPricingSettingsPreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditPreviewWithDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateAutoPricingSettings(input: ValueTupleOfBulkEditPreviewAndListingDetailsUpdateInput, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkUpdateAutoPricingSettings?\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateAutoPricingSettings(_response);\n });\n }\n\n protected processBulkUpdateAutoPricingSettings(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateAutoPricingSettingsV2(input: ValueTupleOfBulkEditPreviewAndListingDetailsAutoPricingSectionUpdatesV2, viagogoEventId: number | null | undefined, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkUpdateAutoPricingSettingsV2?\";\n if (viagogoEventId !== undefined && viagogoEventId !== null)\n url_ += \"viagogoEventId=\" + encodeURIComponent(\"\" + viagogoEventId) + \"&\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateAutoPricingSettingsV2(_response);\n });\n }\n\n protected processBulkUpdateAutoPricingSettingsV2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkGetListingPriceCalculationsInEvent(viagogoEventId: number | undefined, body: ValueTupleOfInt64OfAndListingPriceCalculationsInEventInput): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkGetListingPriceCalculationsInEvent?\";\n if (viagogoEventId === null)\n throw new Error(\"The parameter 'viagogoEventId' cannot be null.\");\n else if (viagogoEventId !== undefined)\n url_ += \"viagogoEventId=\" + encodeURIComponent(\"\" + viagogoEventId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(body);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkGetListingPriceCalculationsInEvent(_response);\n });\n }\n\n protected processBulkGetListingPriceCalculationsInEvent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkListingPriceCalculationResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateGeneralSettingsPreview(query: ListingQuery, hasPurchaseUpdates: boolean | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkUpdateGeneralSettingsPreview?\";\n if (hasPurchaseUpdates === null)\n throw new Error(\"The parameter 'hasPurchaseUpdates' cannot be null.\");\n else if (hasPurchaseUpdates !== undefined)\n url_ += \"hasPurchaseUpdates=\" + encodeURIComponent(\"\" + hasPurchaseUpdates) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateGeneralSettingsPreview(_response);\n });\n }\n\n protected processBulkUpdateGeneralSettingsPreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditPreviewWithDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateGeneralSettings(input: ValueTupleOfBulkEditPreviewAndListingDetailsUpdateInput, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkUpdateGeneralSettings?\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateGeneralSettings(_response);\n });\n }\n\n protected processBulkUpdateGeneralSettings(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateMarketplacePrices(input: ValueTupleOfBulkEditPreviewAndListingPricesUpdateInput, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkUpdateMarketplacePrices?\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateMarketplacePrices(_response);\n });\n }\n\n protected processBulkUpdateMarketplacePrices(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateMarketplacePricesPreview(query: ListingQuery): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkUpdateMarketplacePricesPreview\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateMarketplacePricesPreview(_response);\n });\n }\n\n protected processBulkUpdateMarketplacePricesPreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditPreviewWithDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkBroadcastListingsPreview(query: ListingQuery): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkBroadcastListingsPreview\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkBroadcastListingsPreview(_response);\n });\n }\n\n protected processBulkBroadcastListingsPreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditPreviewWithDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkBroadcastListings(input: ValueTupleOfBulkEditPreviewAndISetOfMarketplaceAndISetOfMarketplace, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkBroadcastListings?\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkBroadcastListings(_response);\n });\n }\n\n protected processBulkBroadcastListings(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateAdminHoldPreview(query: ListingQuery): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkUpdateAdminHoldPreview\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateAdminHoldPreview(_response);\n });\n }\n\n protected processBulkUpdateAdminHoldPreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditPreviewWithDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateAdminHold(preview: BulkEditPreview, adminHoldExpirationDate: string | null | undefined, adminHoldNotes: string | null | undefined, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkUpdateAdminHold?\";\n if (adminHoldExpirationDate !== undefined && adminHoldExpirationDate !== null)\n url_ += \"adminHoldExpirationDate=\" + encodeURIComponent(\"\" + adminHoldExpirationDate) + \"&\";\n if (adminHoldNotes !== undefined && adminHoldNotes !== null)\n url_ += \"adminHoldNotes=\" + encodeURIComponent(\"\" + adminHoldNotes) + \"&\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(preview);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateAdminHold(_response);\n });\n }\n\n protected processBulkUpdateAdminHold(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateTicketTypeRulesPreview(query: ListingQuery, updateSalesOfListings: boolean | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkUpdateTicketTypeRulesPreview?\";\n if (updateSalesOfListings === null)\n throw new Error(\"The parameter 'updateSalesOfListings' cannot be null.\");\n else if (updateSalesOfListings !== undefined)\n url_ += \"updateSalesOfListings=\" + encodeURIComponent(\"\" + updateSalesOfListings) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateTicketTypeRulesPreview(_response);\n });\n }\n\n protected processBulkUpdateTicketTypeRulesPreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditPreviewWithDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateTicketTypeRules(input: ValueTupleOfBulkEditPreviewAndDeliveryTypeAndIListOfTicketTypePriority, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined, updateSalesOfListings: boolean | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkUpdateTicketTypeRules?\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n if (updateSalesOfListings === null)\n throw new Error(\"The parameter 'updateSalesOfListings' cannot be null.\");\n else if (updateSalesOfListings !== undefined)\n url_ += \"updateSalesOfListings=\" + encodeURIComponent(\"\" + updateSalesOfListings) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateTicketTypeRules(_response);\n });\n }\n\n protected processBulkUpdateTicketTypeRules(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateTagsPreview(query: ListingQuery): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkUpdateTagsPreview\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateTagsPreview(_response);\n });\n }\n\n protected processBulkUpdateTagsPreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditPreviewWithDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateTags(preview: BulkEditPreview, tagName: string | undefined, tagValue: string | undefined, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkUpdateTags?\";\n if (tagName === null)\n throw new Error(\"The parameter 'tagName' cannot be null.\");\n else if (tagName !== undefined)\n url_ += \"tagName=\" + encodeURIComponent(\"\" + tagName) + \"&\";\n if (tagValue === null)\n throw new Error(\"The parameter 'tagValue' cannot be null.\");\n else if (tagValue !== undefined)\n url_ += \"tagValue=\" + encodeURIComponent(\"\" + tagValue) + \"&\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(preview);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateTags(_response);\n });\n }\n\n protected processBulkUpdateTags(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkRemoveTags(preview: BulkEditPreview, tagName: string | undefined, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkRemoveTags?\";\n if (tagName === null)\n throw new Error(\"The parameter 'tagName' cannot be null.\");\n else if (tagName !== undefined)\n url_ += \"tagName=\" + encodeURIComponent(\"\" + tagName) + \"&\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(preview);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkRemoveTags(_response);\n });\n }\n\n protected processBulkRemoveTags(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkCreateListingGroups(input: MergeListingGroupInputList, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkCreateListingGroups?\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkCreateListingGroups(_response);\n });\n }\n\n protected processBulkCreateListingGroups(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * Group events by event id\n * @param updateKey (optional) \n * @param supportBackgroundProgress (optional) \n */\n bulkAutoCompAndGroupListingsV2(input: AutoGroupListingV2Input, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkAutoCompAndGroupListingsV2?\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkAutoCompAndGroupListingsV2(_response);\n });\n }\n\n protected processBulkAutoCompAndGroupListingsV2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdatePurchaseCommissionsPreview(query: ListingQuery): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkUpdatePurchaseCommissionsPreview\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdatePurchaseCommissionsPreview(_response);\n });\n }\n\n protected processBulkUpdatePurchaseCommissionsPreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditPreviewWithDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdatePurchaseCommissions(input: ValueTupleOfBulkEditPreviewAndIListOfCommission, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkUpdatePurchaseCommissions?\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdatePurchaseCommissions(_response);\n });\n }\n\n protected processBulkUpdatePurchaseCommissions(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkDeleteSeatSaversPreview(query: ListingQuery): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkDeleteSeatSaversPreview\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkDeleteSeatSaversPreview(_response);\n });\n }\n\n protected processBulkDeleteSeatSaversPreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditPreviewWithDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkDeleteSeatSavers(preview: BulkEditPreview, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkDeleteSeatSavers?\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(preview);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkDeleteSeatSavers(_response);\n });\n }\n\n protected processBulkDeleteSeatSavers(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateInternalNotesPreview(query: ListingQuery): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkUpdateInternalNotesPreview\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateInternalNotesPreview(_response);\n });\n }\n\n protected processBulkUpdateInternalNotesPreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditPreviewWithDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateInternalNotes(preview: BulkEditPreview, updateKey: string | undefined, isUpdate: boolean | undefined, searchString: string | null | undefined, replaceString: string | null | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkUpdateInternalNotes?\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (isUpdate === null)\n throw new Error(\"The parameter 'isUpdate' cannot be null.\");\n else if (isUpdate !== undefined)\n url_ += \"isUpdate=\" + encodeURIComponent(\"\" + isUpdate) + \"&\";\n if (searchString !== undefined && searchString !== null)\n url_ += \"searchString=\" + encodeURIComponent(\"\" + searchString) + \"&\";\n if (replaceString !== undefined && replaceString !== null)\n url_ += \"replaceString=\" + encodeURIComponent(\"\" + replaceString) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(preview);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateInternalNotes(_response);\n });\n }\n\n protected processBulkUpdateInternalNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateIsNoFulfillPreview(query: ListingQuery, updateSalesOfListings: boolean | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkUpdateIsNoFulfillPreview?\";\n if (updateSalesOfListings === null)\n throw new Error(\"The parameter 'updateSalesOfListings' cannot be null.\");\n else if (updateSalesOfListings !== undefined)\n url_ += \"updateSalesOfListings=\" + encodeURIComponent(\"\" + updateSalesOfListings) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateIsNoFulfillPreview(_response);\n });\n }\n\n protected processBulkUpdateIsNoFulfillPreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditPreviewWithDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateIsNoFulfill(preview: BulkEditPreview, updateKey: string | undefined, isNoFulfill: boolean | undefined, updateSalesOfListings: boolean | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkUpdateIsNoFulfill?\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (isNoFulfill === null)\n throw new Error(\"The parameter 'isNoFulfill' cannot be null.\");\n else if (isNoFulfill !== undefined)\n url_ += \"isNoFulfill=\" + encodeURIComponent(\"\" + isNoFulfill) + \"&\";\n if (updateSalesOfListings === null)\n throw new Error(\"The parameter 'updateSalesOfListings' cannot be null.\");\n else if (updateSalesOfListings !== undefined)\n url_ += \"updateSalesOfListings=\" + encodeURIComponent(\"\" + updateSalesOfListings) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(preview);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateIsNoFulfill(_response);\n });\n }\n\n protected processBulkUpdateIsNoFulfill(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateDeliveryTypePreview(query: ListingQuery): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkUpdateDeliveryTypePreview\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateDeliveryTypePreview(_response);\n });\n }\n\n protected processBulkUpdateDeliveryTypePreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditPreviewWithDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateDeliveryType(input: ValueTupleOfBulkEditPreviewAndDeliveryTypeAndIListOfTicketTypePriority, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkUpdateDeliveryType?\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateDeliveryType(_response);\n });\n }\n\n protected processBulkUpdateDeliveryType(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateSeatTraitsPreview(query: ListingQuery): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkUpdateSeatTraitsPreview\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateSeatTraitsPreview(_response);\n });\n }\n\n protected processBulkUpdateSeatTraitsPreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditPreviewWithDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateSeatTraits(input: ValueTupleOfBulkEditPreviewAndIListOfListingNote, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined, appendSeatTraits: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkUpdateSeatTraits?\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n if (appendSeatTraits !== undefined && appendSeatTraits !== null)\n url_ += \"appendSeatTraits=\" + encodeURIComponent(\"\" + appendSeatTraits) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateSeatTraits(_response);\n });\n }\n\n protected processBulkUpdateSeatTraits(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkWasteTicketsPreview(query: ListingQuery): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkWasteTicketsPreview\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkWasteTicketsPreview(_response);\n });\n }\n\n protected processBulkWasteTicketsPreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditPreviewWithDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkWasteTickets(preview: BulkEditPreview, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkWasteTickets?\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(preview);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkWasteTickets(_response);\n });\n }\n\n protected processBulkWasteTickets(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface IBulkEditListingGroupClient {\n\n cancelBackgroundTask(updateKey: string | undefined): Promise;\n\n bulkEditListingsGroupSettingsPreview(query: ListingQuery): Promise;\n\n bulkEditListingGroupSettings(input: BulkEditListingGroupSettingsInput, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n}\n\nexport class BulkEditListingGroupClient extends PosClientBase implements IBulkEditListingGroupClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(configuration: PosClientConfig, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n super(configuration);\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"\";\n }\n\n cancelBackgroundTask(updateKey: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListingGroup/CancelBackgroundTask?\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processCancelBackgroundTask(_response);\n });\n }\n\n protected processCancelBackgroundTask(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkEditListingsGroupSettingsPreview(query: ListingQuery): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListingGroup/BulkEditListingsGroupSettingsPreview\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkEditListingsGroupSettingsPreview(_response);\n });\n }\n\n protected processBulkEditListingsGroupSettingsPreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditPreviewWithDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkEditListingGroupSettings(input: BulkEditListingGroupSettingsInput, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListingGroup/BulkEditListingGroupSettings?\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkEditListingGroupSettings(_response);\n });\n }\n\n protected processBulkEditListingGroupSettings(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface IBulkEditLogClient {\n\n getBulkEditLogByFilter(query: BulkEditLogQuery): Promise;\n\n getBulkEditLogPayload(entityType: ActionOutboxEntityType | undefined, bulkActionType: BulkActionType | undefined, bulkProcessingId: string | undefined): Promise;\n}\n\nexport class BulkEditLogClient extends PosClientBase implements IBulkEditLogClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(configuration: PosClientConfig, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n super(configuration);\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"\";\n }\n\n getBulkEditLogByFilter(query: BulkEditLogQuery): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditLog/GetBulkEditLogByFilter\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetBulkEditLogByFilter(_response);\n });\n }\n\n protected processGetBulkEditLogByFilter(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditLog[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getBulkEditLogPayload(entityType: ActionOutboxEntityType | undefined, bulkActionType: BulkActionType | undefined, bulkProcessingId: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditLog/GetBulkEditLogPayload?\";\n if (entityType === null)\n throw new Error(\"The parameter 'entityType' cannot be null.\");\n else if (entityType !== undefined)\n url_ += \"entityType=\" + encodeURIComponent(\"\" + entityType) + \"&\";\n if (bulkActionType === null)\n throw new Error(\"The parameter 'bulkActionType' cannot be null.\");\n else if (bulkActionType !== undefined)\n url_ += \"bulkActionType=\" + encodeURIComponent(\"\" + bulkActionType) + \"&\";\n if (bulkProcessingId === null)\n throw new Error(\"The parameter 'bulkProcessingId' cannot be null.\");\n else if (bulkProcessingId !== undefined)\n url_ += \"bulkProcessingId=\" + encodeURIComponent(\"\" + bulkProcessingId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetBulkEditLogPayload(_response);\n });\n }\n\n protected processGetBulkEditLogPayload(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditLogPayload;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface IBulkEditPurchaseClient {\n\n cancelBackgroundTask(updateKey: string | undefined): Promise;\n\n bulkUpdateGeneralSettingsPreview(query: PurchaseOrderQuery): Promise;\n\n bulkUpdateGeneralSettings(input: ValueTupleOfBulkEditPreviewAndPosFieldOfNullableGuid, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n\n bulkUpdateCurrencyCodePreview(query: PurchaseOrderQuery): Promise;\n\n bulkUpdateCurrencyCode(input: ValueTupleOfBulkEditPreviewAndString, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n\n bulkDeletePurchaseOrderPreview(query: PurchaseOrderQuery): Promise;\n\n bulkVoidPurchaseOrder(preview: BulkEditPreview, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n\n bulkCancelPurchaseOrder(input: ValueTupleOfBulkEditPreviewAndNullableSaleCancellationReason, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined, rejectSale: boolean | null | undefined): Promise;\n\n bulkUpdatePurchaseCommissionsPreview(query: PurchaseOrderQuery): Promise;\n\n bulkUpdatePurchaseCommissions(input: ValueTupleOfBulkEditPreviewAndIListOfCommission, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n\n bulkUpdateTagsPreview(query: PurchaseOrderQuery): Promise;\n\n bulkUpdateTags(preview: BulkEditPreview, tagName: string | undefined, tagValue: string | undefined, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n\n bulkRemoveTags(preview: BulkEditPreview, tagName: string | undefined, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n\n bulkUpdateInternalNotesPreview(query: PurchaseOrderQuery): Promise;\n\n bulkUpdateInternalNotes(preview: BulkEditPreview, updateKey: string | undefined, isUpdate: boolean | undefined, searchString: string | null | undefined, replaceString: string | null | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n\n bulkConvertPurchasePaymentPreview(query: PurchaseOrderQuery): Promise;\n\n bulkConvertPurchasePayment(preview: BulkEditPreview, updateKey: string | undefined, fromCurrencyCode: string | undefined, toCurrencyCode: string | undefined, conversionRate: number | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n\n bulkUpdateDeliveryTypePreview(query: PurchaseOrderQuery, updateSalesOfListings: boolean | undefined): Promise;\n\n bulkUpdateDeliveryType(input: ValueTupleOfBulkEditPreviewAndDeliveryTypeAndIListOfTicketTypePriority, updateSalesOfListings: boolean | undefined, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n\n bulkBackfillDeliverySettingsPreview(query: PurchaseOrderQuery, updateSalesOfListings: boolean | undefined, applyToAllEvents: boolean | undefined): Promise;\n\n bulkBackfillDeliverySettings(preview: BulkEditPreview, updateSalesOfListings: boolean | undefined, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n\n bulkBackfillDeliverySettingsListingOnly(preview: BulkEditPreview, updateSalesOfListings: boolean | undefined, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n\n bulkUpdateSeatTraitsPreview(query: PurchaseOrderQuery): Promise;\n\n bulkUpdateSeatTraits(input: ValueTupleOfBulkEditPreviewAndIListOfListingNote, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined, appendSeatTraits: boolean | null | undefined): Promise;\n\n importPurchaseFromFile(updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined, file: FileParameter | null | undefined): Promise;\n\n bulkMarkPurchaseAsPaidPreview(input: PurchaseOrderQuery): Promise;\n\n bulkMarkPurchaseAsPaid(input: BulkEditPreview, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n}\n\nexport class BulkEditPurchaseClient extends PosClientBase implements IBulkEditPurchaseClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(configuration: PosClientConfig, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n super(configuration);\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"\";\n }\n\n cancelBackgroundTask(updateKey: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditPurchase/CancelBackgroundTask?\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processCancelBackgroundTask(_response);\n });\n }\n\n protected processCancelBackgroundTask(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateGeneralSettingsPreview(query: PurchaseOrderQuery): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditPurchase/BulkUpdateGeneralSettingsPreview\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateGeneralSettingsPreview(_response);\n });\n }\n\n protected processBulkUpdateGeneralSettingsPreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditPreviewWithDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateGeneralSettings(input: ValueTupleOfBulkEditPreviewAndPosFieldOfNullableGuid, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditPurchase/BulkUpdateGeneralSettings?\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateGeneralSettings(_response);\n });\n }\n\n protected processBulkUpdateGeneralSettings(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateCurrencyCodePreview(query: PurchaseOrderQuery): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditPurchase/BulkUpdateCurrencyCodePreview\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateCurrencyCodePreview(_response);\n });\n }\n\n protected processBulkUpdateCurrencyCodePreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditPreviewWithDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateCurrencyCode(input: ValueTupleOfBulkEditPreviewAndString, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditPurchase/BulkUpdateCurrencyCode?\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateCurrencyCode(_response);\n });\n }\n\n protected processBulkUpdateCurrencyCode(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkDeletePurchaseOrderPreview(query: PurchaseOrderQuery): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditPurchase/BulkDeletePurchaseOrderPreview\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkDeletePurchaseOrderPreview(_response);\n });\n }\n\n protected processBulkDeletePurchaseOrderPreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditPreviewWithDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkVoidPurchaseOrder(preview: BulkEditPreview, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditPurchase/BulkVoidPurchaseOrder?\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(preview);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkVoidPurchaseOrder(_response);\n });\n }\n\n protected processBulkVoidPurchaseOrder(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkCancelPurchaseOrder(input: ValueTupleOfBulkEditPreviewAndNullableSaleCancellationReason, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined, rejectSale: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditPurchase/BulkCancelPurchaseOrder?\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n if (rejectSale !== undefined && rejectSale !== null)\n url_ += \"rejectSale=\" + encodeURIComponent(\"\" + rejectSale) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkCancelPurchaseOrder(_response);\n });\n }\n\n protected processBulkCancelPurchaseOrder(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdatePurchaseCommissionsPreview(query: PurchaseOrderQuery): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditPurchase/BulkUpdatePurchaseCommissionsPreview\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdatePurchaseCommissionsPreview(_response);\n });\n }\n\n protected processBulkUpdatePurchaseCommissionsPreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditPreviewWithDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdatePurchaseCommissions(input: ValueTupleOfBulkEditPreviewAndIListOfCommission, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditPurchase/BulkUpdatePurchaseCommissions?\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdatePurchaseCommissions(_response);\n });\n }\n\n protected processBulkUpdatePurchaseCommissions(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateTagsPreview(query: PurchaseOrderQuery): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditPurchase/BulkUpdateTagsPreview\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateTagsPreview(_response);\n });\n }\n\n protected processBulkUpdateTagsPreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditPreviewWithDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateTags(preview: BulkEditPreview, tagName: string | undefined, tagValue: string | undefined, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditPurchase/BulkUpdateTags?\";\n if (tagName === null)\n throw new Error(\"The parameter 'tagName' cannot be null.\");\n else if (tagName !== undefined)\n url_ += \"tagName=\" + encodeURIComponent(\"\" + tagName) + \"&\";\n if (tagValue === null)\n throw new Error(\"The parameter 'tagValue' cannot be null.\");\n else if (tagValue !== undefined)\n url_ += \"tagValue=\" + encodeURIComponent(\"\" + tagValue) + \"&\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(preview);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateTags(_response);\n });\n }\n\n protected processBulkUpdateTags(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkRemoveTags(preview: BulkEditPreview, tagName: string | undefined, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditPurchase/BulkRemoveTags?\";\n if (tagName === null)\n throw new Error(\"The parameter 'tagName' cannot be null.\");\n else if (tagName !== undefined)\n url_ += \"tagName=\" + encodeURIComponent(\"\" + tagName) + \"&\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(preview);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkRemoveTags(_response);\n });\n }\n\n protected processBulkRemoveTags(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateInternalNotesPreview(query: PurchaseOrderQuery): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditPurchase/BulkUpdateInternalNotesPreview\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateInternalNotesPreview(_response);\n });\n }\n\n protected processBulkUpdateInternalNotesPreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditPreviewWithDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateInternalNotes(preview: BulkEditPreview, updateKey: string | undefined, isUpdate: boolean | undefined, searchString: string | null | undefined, replaceString: string | null | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditPurchase/BulkUpdateInternalNotes?\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (isUpdate === null)\n throw new Error(\"The parameter 'isUpdate' cannot be null.\");\n else if (isUpdate !== undefined)\n url_ += \"isUpdate=\" + encodeURIComponent(\"\" + isUpdate) + \"&\";\n if (searchString !== undefined && searchString !== null)\n url_ += \"searchString=\" + encodeURIComponent(\"\" + searchString) + \"&\";\n if (replaceString !== undefined && replaceString !== null)\n url_ += \"replaceString=\" + encodeURIComponent(\"\" + replaceString) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(preview);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateInternalNotes(_response);\n });\n }\n\n protected processBulkUpdateInternalNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkConvertPurchasePaymentPreview(query: PurchaseOrderQuery): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditPurchase/BulkConvertPurchasePaymentPreview\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkConvertPurchasePaymentPreview(_response);\n });\n }\n\n protected processBulkConvertPurchasePaymentPreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditPreviewWithDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkConvertPurchasePayment(preview: BulkEditPreview, updateKey: string | undefined, fromCurrencyCode: string | undefined, toCurrencyCode: string | undefined, conversionRate: number | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditPurchase/BulkConvertPurchasePayment?\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (fromCurrencyCode === null)\n throw new Error(\"The parameter 'fromCurrencyCode' cannot be null.\");\n else if (fromCurrencyCode !== undefined)\n url_ += \"fromCurrencyCode=\" + encodeURIComponent(\"\" + fromCurrencyCode) + \"&\";\n if (toCurrencyCode === null)\n throw new Error(\"The parameter 'toCurrencyCode' cannot be null.\");\n else if (toCurrencyCode !== undefined)\n url_ += \"toCurrencyCode=\" + encodeURIComponent(\"\" + toCurrencyCode) + \"&\";\n if (conversionRate === null)\n throw new Error(\"The parameter 'conversionRate' cannot be null.\");\n else if (conversionRate !== undefined)\n url_ += \"conversionRate=\" + encodeURIComponent(\"\" + conversionRate) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(preview);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkConvertPurchasePayment(_response);\n });\n }\n\n protected processBulkConvertPurchasePayment(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateDeliveryTypePreview(query: PurchaseOrderQuery, updateSalesOfListings: boolean | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditPurchase/BulkUpdateDeliveryTypePreview?\";\n if (updateSalesOfListings === null)\n throw new Error(\"The parameter 'updateSalesOfListings' cannot be null.\");\n else if (updateSalesOfListings !== undefined)\n url_ += \"updateSalesOfListings=\" + encodeURIComponent(\"\" + updateSalesOfListings) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateDeliveryTypePreview(_response);\n });\n }\n\n protected processBulkUpdateDeliveryTypePreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditPreviewWithDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateDeliveryType(input: ValueTupleOfBulkEditPreviewAndDeliveryTypeAndIListOfTicketTypePriority, updateSalesOfListings: boolean | undefined, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditPurchase/BulkUpdateDeliveryType?\";\n if (updateSalesOfListings === null)\n throw new Error(\"The parameter 'updateSalesOfListings' cannot be null.\");\n else if (updateSalesOfListings !== undefined)\n url_ += \"updateSalesOfListings=\" + encodeURIComponent(\"\" + updateSalesOfListings) + \"&\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateDeliveryType(_response);\n });\n }\n\n protected processBulkUpdateDeliveryType(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkBackfillDeliverySettingsPreview(query: PurchaseOrderQuery, updateSalesOfListings: boolean | undefined, applyToAllEvents: boolean | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditPurchase/BulkBackfillDeliverySettingsPreview?\";\n if (updateSalesOfListings === null)\n throw new Error(\"The parameter 'updateSalesOfListings' cannot be null.\");\n else if (updateSalesOfListings !== undefined)\n url_ += \"updateSalesOfListings=\" + encodeURIComponent(\"\" + updateSalesOfListings) + \"&\";\n if (applyToAllEvents === null)\n throw new Error(\"The parameter 'applyToAllEvents' cannot be null.\");\n else if (applyToAllEvents !== undefined)\n url_ += \"applyToAllEvents=\" + encodeURIComponent(\"\" + applyToAllEvents) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkBackfillDeliverySettingsPreview(_response);\n });\n }\n\n protected processBulkBackfillDeliverySettingsPreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditPreviewWithDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkBackfillDeliverySettings(preview: BulkEditPreview, updateSalesOfListings: boolean | undefined, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditPurchase/BulkBackfillDeliverySettings?\";\n if (updateSalesOfListings === null)\n throw new Error(\"The parameter 'updateSalesOfListings' cannot be null.\");\n else if (updateSalesOfListings !== undefined)\n url_ += \"updateSalesOfListings=\" + encodeURIComponent(\"\" + updateSalesOfListings) + \"&\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(preview);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkBackfillDeliverySettings(_response);\n });\n }\n\n protected processBulkBackfillDeliverySettings(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkBackfillDeliverySettingsListingOnly(preview: BulkEditPreview, updateSalesOfListings: boolean | undefined, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditPurchase/BulkBackfillDeliverySettingsListingOnly?\";\n if (updateSalesOfListings === null)\n throw new Error(\"The parameter 'updateSalesOfListings' cannot be null.\");\n else if (updateSalesOfListings !== undefined)\n url_ += \"updateSalesOfListings=\" + encodeURIComponent(\"\" + updateSalesOfListings) + \"&\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(preview);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkBackfillDeliverySettingsListingOnly(_response);\n });\n }\n\n protected processBulkBackfillDeliverySettingsListingOnly(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateSeatTraitsPreview(query: PurchaseOrderQuery): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditPurchase/BulkUpdateSeatTraitsPreview\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateSeatTraitsPreview(_response);\n });\n }\n\n protected processBulkUpdateSeatTraitsPreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditPreviewWithDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateSeatTraits(input: ValueTupleOfBulkEditPreviewAndIListOfListingNote, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined, appendSeatTraits: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditPurchase/BulkUpdateSeatTraits?\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n if (appendSeatTraits !== undefined && appendSeatTraits !== null)\n url_ += \"appendSeatTraits=\" + encodeURIComponent(\"\" + appendSeatTraits) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateSeatTraits(_response);\n });\n }\n\n protected processBulkUpdateSeatTraits(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n importPurchaseFromFile(updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined, file: FileParameter | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditPurchase/ImportPurchaseFromFile?\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = new FormData();\n if (file !== null && file !== undefined)\n content_.append(\"File\", file.data, file.fileName ? file.fileName : \"File\");\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processImportPurchaseFromFile(_response);\n });\n }\n\n protected processImportPurchaseFromFile(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ImportFileResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkMarkPurchaseAsPaidPreview(input: PurchaseOrderQuery): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditPurchase/BulkMarkPurchaseAsPaidPreview\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkMarkPurchaseAsPaidPreview(_response);\n });\n }\n\n protected processBulkMarkPurchaseAsPaidPreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditPreviewWithDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkMarkPurchaseAsPaid(input: BulkEditPreview, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditPurchase/BulkMarkPurchaseAsPaid?\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkMarkPurchaseAsPaid(_response);\n });\n }\n\n protected processBulkMarkPurchaseAsPaid(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface IBulkEditSaleClient {\n\n cancelBackgroundTask(updateKey: string | undefined): Promise;\n\n bulkUpdateGeneralSettingsPreview(query: SaleQuery): Promise;\n\n bulkUpdateGeneralSettings(input: ValueTupleOfBulkEditPreviewAndSaleInput, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n\n bulkUpdatePurchaseCommissionsPreview(query: SaleQuery): Promise;\n\n bulkUpdatePurchaseCommissions(input: ValueTupleOfBulkEditPreviewAndIListOfCommission, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n\n bulkUpdatePaymentFieldsPreview(query: SaleQuery): Promise;\n\n bulkUpdatePaymentFields(preview: BulkEditPreview, paymentReceived: boolean | null | undefined, paymentReferenceId: string | null | undefined, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n\n bulkUpdateTagsPreview(query: SaleQuery): Promise;\n\n bulkUpdateTags(preview: BulkEditPreview, tagName: string | undefined, tagValue: string | undefined, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n\n bulkRemoveTags(preview: BulkEditPreview, tagName: string | undefined, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n\n bulkUpdateInternalNotesPreview(query: SaleQuery): Promise;\n\n bulkUpdateInternalNotes(preview: BulkEditPreview, updateKey: string | undefined, isUpdate: boolean | undefined, searchString: string | null | undefined, replaceString: string | null | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n\n bulkUpdateIsNoFulfillPreview(query: SaleQuery): Promise;\n\n bulkUpdateIsNoFulfill(preview: BulkEditPreview, updateKey: string | undefined, isNoFulfill: boolean | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n\n bulkUpdateMarkAsFulfilledPreview(query: SaleQuery): Promise;\n\n bulkUpdateMarkAsFulfilled(preview: BulkEditPreview, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n\n bulkMarkSaleAsPaidPreview(query: SaleQuery): Promise;\n\n bulkMarkSaleAsPaid(preview: BulkEditPreview, paymentRefId: string | undefined, paymentDate: string | undefined, marketplace: Marketplace | undefined, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n\n bulkCancelSalePreview(query: SaleQuery): Promise;\n\n bulkCancelSale(input: ValueTupleOfBulkEditPreviewAndNullableSaleCancellationReason, keepAllocatedTickets: boolean | null | undefined, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n}\n\nexport class BulkEditSaleClient extends PosClientBase implements IBulkEditSaleClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(configuration: PosClientConfig, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n super(configuration);\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"\";\n }\n\n cancelBackgroundTask(updateKey: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditSale/CancelBackgroundTask?\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processCancelBackgroundTask(_response);\n });\n }\n\n protected processCancelBackgroundTask(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateGeneralSettingsPreview(query: SaleQuery): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditSale/BulkUpdateGeneralSettingsPreview\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateGeneralSettingsPreview(_response);\n });\n }\n\n protected processBulkUpdateGeneralSettingsPreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditPreviewWithDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateGeneralSettings(input: ValueTupleOfBulkEditPreviewAndSaleInput, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditSale/BulkUpdateGeneralSettings?\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateGeneralSettings(_response);\n });\n }\n\n protected processBulkUpdateGeneralSettings(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdatePurchaseCommissionsPreview(query: SaleQuery): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditSale/BulkUpdatePurchaseCommissionsPreview\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdatePurchaseCommissionsPreview(_response);\n });\n }\n\n protected processBulkUpdatePurchaseCommissionsPreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditPreviewWithDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdatePurchaseCommissions(input: ValueTupleOfBulkEditPreviewAndIListOfCommission, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditSale/BulkUpdatePurchaseCommissions?\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdatePurchaseCommissions(_response);\n });\n }\n\n protected processBulkUpdatePurchaseCommissions(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdatePaymentFieldsPreview(query: SaleQuery): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditSale/BulkUpdatePaymentFieldsPreview\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdatePaymentFieldsPreview(_response);\n });\n }\n\n protected processBulkUpdatePaymentFieldsPreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditPreviewWithDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdatePaymentFields(preview: BulkEditPreview, paymentReceived: boolean | null | undefined, paymentReferenceId: string | null | undefined, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditSale/BulkUpdatePaymentFields?\";\n if (paymentReceived !== undefined && paymentReceived !== null)\n url_ += \"paymentReceived=\" + encodeURIComponent(\"\" + paymentReceived) + \"&\";\n if (paymentReferenceId !== undefined && paymentReferenceId !== null)\n url_ += \"paymentReferenceId=\" + encodeURIComponent(\"\" + paymentReferenceId) + \"&\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(preview);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdatePaymentFields(_response);\n });\n }\n\n protected processBulkUpdatePaymentFields(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateTagsPreview(query: SaleQuery): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditSale/BulkUpdateTagsPreview\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateTagsPreview(_response);\n });\n }\n\n protected processBulkUpdateTagsPreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditPreviewWithDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateTags(preview: BulkEditPreview, tagName: string | undefined, tagValue: string | undefined, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditSale/BulkUpdateTags?\";\n if (tagName === null)\n throw new Error(\"The parameter 'tagName' cannot be null.\");\n else if (tagName !== undefined)\n url_ += \"tagName=\" + encodeURIComponent(\"\" + tagName) + \"&\";\n if (tagValue === null)\n throw new Error(\"The parameter 'tagValue' cannot be null.\");\n else if (tagValue !== undefined)\n url_ += \"tagValue=\" + encodeURIComponent(\"\" + tagValue) + \"&\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(preview);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateTags(_response);\n });\n }\n\n protected processBulkUpdateTags(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkRemoveTags(preview: BulkEditPreview, tagName: string | undefined, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditSale/BulkRemoveTags?\";\n if (tagName === null)\n throw new Error(\"The parameter 'tagName' cannot be null.\");\n else if (tagName !== undefined)\n url_ += \"tagName=\" + encodeURIComponent(\"\" + tagName) + \"&\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(preview);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkRemoveTags(_response);\n });\n }\n\n protected processBulkRemoveTags(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateInternalNotesPreview(query: SaleQuery): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditSale/BulkUpdateInternalNotesPreview\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateInternalNotesPreview(_response);\n });\n }\n\n protected processBulkUpdateInternalNotesPreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditPreviewWithDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateInternalNotes(preview: BulkEditPreview, updateKey: string | undefined, isUpdate: boolean | undefined, searchString: string | null | undefined, replaceString: string | null | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditSale/BulkUpdateInternalNotes?\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (isUpdate === null)\n throw new Error(\"The parameter 'isUpdate' cannot be null.\");\n else if (isUpdate !== undefined)\n url_ += \"isUpdate=\" + encodeURIComponent(\"\" + isUpdate) + \"&\";\n if (searchString !== undefined && searchString !== null)\n url_ += \"searchString=\" + encodeURIComponent(\"\" + searchString) + \"&\";\n if (replaceString !== undefined && replaceString !== null)\n url_ += \"replaceString=\" + encodeURIComponent(\"\" + replaceString) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(preview);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateInternalNotes(_response);\n });\n }\n\n protected processBulkUpdateInternalNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateIsNoFulfillPreview(query: SaleQuery): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditSale/BulkUpdateIsNoFulfillPreview\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateIsNoFulfillPreview(_response);\n });\n }\n\n protected processBulkUpdateIsNoFulfillPreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditPreviewWithDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateIsNoFulfill(preview: BulkEditPreview, updateKey: string | undefined, isNoFulfill: boolean | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditSale/BulkUpdateIsNoFulfill?\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (isNoFulfill === null)\n throw new Error(\"The parameter 'isNoFulfill' cannot be null.\");\n else if (isNoFulfill !== undefined)\n url_ += \"isNoFulfill=\" + encodeURIComponent(\"\" + isNoFulfill) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(preview);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateIsNoFulfill(_response);\n });\n }\n\n protected processBulkUpdateIsNoFulfill(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateMarkAsFulfilledPreview(query: SaleQuery): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditSale/BulkUpdateMarkAsFulfilledPreview\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateMarkAsFulfilledPreview(_response);\n });\n }\n\n protected processBulkUpdateMarkAsFulfilledPreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditPreviewWithDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateMarkAsFulfilled(preview: BulkEditPreview, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditSale/BulkUpdateMarkAsFulfilled?\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(preview);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateMarkAsFulfilled(_response);\n });\n }\n\n protected processBulkUpdateMarkAsFulfilled(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkMarkSaleAsPaidPreview(query: SaleQuery): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditSale/BulkMarkSaleAsPaidPreview\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkMarkSaleAsPaidPreview(_response);\n });\n }\n\n protected processBulkMarkSaleAsPaidPreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditPreviewWithDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkMarkSaleAsPaid(preview: BulkEditPreview, paymentRefId: string | undefined, paymentDate: string | undefined, marketplace: Marketplace | undefined, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditSale/BulkMarkSaleAsPaid?\";\n if (paymentRefId === null)\n throw new Error(\"The parameter 'paymentRefId' cannot be null.\");\n else if (paymentRefId !== undefined)\n url_ += \"paymentRefId=\" + encodeURIComponent(\"\" + paymentRefId) + \"&\";\n if (paymentDate === null)\n throw new Error(\"The parameter 'paymentDate' cannot be null.\");\n else if (paymentDate !== undefined)\n url_ += \"paymentDate=\" + encodeURIComponent(\"\" + paymentDate) + \"&\";\n if (marketplace === null)\n throw new Error(\"The parameter 'marketplace' cannot be null.\");\n else if (marketplace !== undefined)\n url_ += \"marketplace=\" + encodeURIComponent(\"\" + marketplace) + \"&\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(preview);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkMarkSaleAsPaid(_response);\n });\n }\n\n protected processBulkMarkSaleAsPaid(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkCancelSalePreview(query: SaleQuery): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditSale/BulkCancelSalePreview\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkCancelSalePreview(_response);\n });\n }\n\n protected processBulkCancelSalePreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditPreviewWithDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkCancelSale(input: ValueTupleOfBulkEditPreviewAndNullableSaleCancellationReason, keepAllocatedTickets: boolean | null | undefined, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditSale/BulkCancelSale?\";\n if (keepAllocatedTickets !== undefined && keepAllocatedTickets !== null)\n url_ += \"keepAllocatedTickets=\" + encodeURIComponent(\"\" + keepAllocatedTickets) + \"&\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkCancelSale(_response);\n });\n }\n\n protected processBulkCancelSale(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface IBulkEditTicketGroupClient {\n\n cancelBackgroundTask(updateKey: string | undefined): Promise;\n\n bulkDeleteTicketGroupPreview(query: PurchaseOrderQuery): Promise;\n\n bulkDeleteTicketGroup(preview: BulkEditPreview, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n\n bulkUpdateDeliveryTypePreview(query: PurchaseOrderQuery, updateSalesOfListings: boolean | undefined): Promise;\n\n bulkUpdateDeliveryType(input: ValueTupleOfBulkEditPreviewAndDeliveryTypeAndIListOfTicketTypePriority, updateSalesOfListings: boolean | undefined, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n\n bulkUpdateSeatTraitsPreview(query: PurchaseOrderQuery): Promise;\n\n bulkUpdateSeatTraits(input: ValueTupleOfBulkEditPreviewAndIListOfListingNote, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined, appendSeatTraits: boolean | null | undefined): Promise;\n\n bulkChangeEventPreview(query: PurchaseOrderQuery): Promise;\n\n bulkChangeEvent(preview: BulkEditPreview, posEventId: string | undefined, viagogoEventId: number | null | undefined, eventMappingId: string | null | undefined, deallocateSales: boolean | null | undefined, reason: string | null | undefined, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise;\n}\n\nexport class BulkEditTicketGroupClient extends PosClientBase implements IBulkEditTicketGroupClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(configuration: PosClientConfig, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n super(configuration);\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"\";\n }\n\n cancelBackgroundTask(updateKey: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditTicketGroup/CancelBackgroundTask?\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processCancelBackgroundTask(_response);\n });\n }\n\n protected processCancelBackgroundTask(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkDeleteTicketGroupPreview(query: PurchaseOrderQuery): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditTicketGroup/BulkDeleteTicketGroupPreview\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkDeleteTicketGroupPreview(_response);\n });\n }\n\n protected processBulkDeleteTicketGroupPreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditPreviewWithDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkDeleteTicketGroup(preview: BulkEditPreview, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditTicketGroup/BulkDeleteTicketGroup?\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(preview);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkDeleteTicketGroup(_response);\n });\n }\n\n protected processBulkDeleteTicketGroup(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateDeliveryTypePreview(query: PurchaseOrderQuery, updateSalesOfListings: boolean | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditTicketGroup/BulkUpdateDeliveryTypePreview?\";\n if (updateSalesOfListings === null)\n throw new Error(\"The parameter 'updateSalesOfListings' cannot be null.\");\n else if (updateSalesOfListings !== undefined)\n url_ += \"updateSalesOfListings=\" + encodeURIComponent(\"\" + updateSalesOfListings) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateDeliveryTypePreview(_response);\n });\n }\n\n protected processBulkUpdateDeliveryTypePreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditPreviewWithDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateDeliveryType(input: ValueTupleOfBulkEditPreviewAndDeliveryTypeAndIListOfTicketTypePriority, updateSalesOfListings: boolean | undefined, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditTicketGroup/BulkUpdateDeliveryType?\";\n if (updateSalesOfListings === null)\n throw new Error(\"The parameter 'updateSalesOfListings' cannot be null.\");\n else if (updateSalesOfListings !== undefined)\n url_ += \"updateSalesOfListings=\" + encodeURIComponent(\"\" + updateSalesOfListings) + \"&\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateDeliveryType(_response);\n });\n }\n\n protected processBulkUpdateDeliveryType(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateSeatTraitsPreview(query: PurchaseOrderQuery): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditTicketGroup/BulkUpdateSeatTraitsPreview\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateSeatTraitsPreview(_response);\n });\n }\n\n protected processBulkUpdateSeatTraitsPreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditPreviewWithDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkUpdateSeatTraits(input: ValueTupleOfBulkEditPreviewAndIListOfListingNote, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined, appendSeatTraits: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditTicketGroup/BulkUpdateSeatTraits?\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n if (appendSeatTraits !== undefined && appendSeatTraits !== null)\n url_ += \"appendSeatTraits=\" + encodeURIComponent(\"\" + appendSeatTraits) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkUpdateSeatTraits(_response);\n });\n }\n\n protected processBulkUpdateSeatTraits(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkChangeEventPreview(query: PurchaseOrderQuery): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditTicketGroup/BulkChangeEventPreview\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkChangeEventPreview(_response);\n });\n }\n\n protected processBulkChangeEventPreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditPreviewWithDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkChangeEvent(preview: BulkEditPreview, posEventId: string | undefined, viagogoEventId: number | null | undefined, eventMappingId: string | null | undefined, deallocateSales: boolean | null | undefined, reason: string | null | undefined, updateKey: string | undefined, supportBackgroundProgress: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditTicketGroup/BulkChangeEvent?\";\n if (posEventId === null)\n throw new Error(\"The parameter 'posEventId' cannot be null.\");\n else if (posEventId !== undefined)\n url_ += \"posEventId=\" + encodeURIComponent(\"\" + posEventId) + \"&\";\n if (viagogoEventId !== undefined && viagogoEventId !== null)\n url_ += \"viagogoEventId=\" + encodeURIComponent(\"\" + viagogoEventId) + \"&\";\n if (eventMappingId !== undefined && eventMappingId !== null)\n url_ += \"eventMappingId=\" + encodeURIComponent(\"\" + eventMappingId) + \"&\";\n if (deallocateSales !== undefined && deallocateSales !== null)\n url_ += \"deallocateSales=\" + encodeURIComponent(\"\" + deallocateSales) + \"&\";\n if (reason !== undefined && reason !== null)\n url_ += \"reason=\" + encodeURIComponent(\"\" + reason) + \"&\";\n if (updateKey === null)\n throw new Error(\"The parameter 'updateKey' cannot be null.\");\n else if (updateKey !== undefined)\n url_ += \"updateKey=\" + encodeURIComponent(\"\" + updateKey) + \"&\";\n if (supportBackgroundProgress !== undefined && supportBackgroundProgress !== null)\n url_ += \"supportBackgroundProgress=\" + encodeURIComponent(\"\" + supportBackgroundProgress) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(preview);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkChangeEvent(_response);\n });\n }\n\n protected processBulkChangeEvent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BulkEditProgress;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface ICampaignManagerClient {\n\n createCampaign(name: string | undefined, state: AdCampaignState | undefined, budget: MoneyType, startDateTime: string | undefined, endDateTime: string | null | undefined, currencyCode: string | undefined): Promise;\n\n createAdGroup(request: CreateAdGroupRequest): Promise;\n\n archiveCampaign(campaignId: string | undefined): Promise;\n\n archiveAdGroup(adGroupId: string | undefined): Promise;\n\n retrieveCampaigns(campaignId: string | null | undefined): Promise;\n\n retrieveAdGroups(campaignId: string | undefined, adGroupId: string | null | undefined): Promise;\n}\n\nexport class CampaignManagerClient extends PosClientBase implements ICampaignManagerClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(configuration: PosClientConfig, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n super(configuration);\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"\";\n }\n\n createCampaign(name: string | undefined, state: AdCampaignState | undefined, budget: MoneyType, startDateTime: string | undefined, endDateTime: string | null | undefined, currencyCode: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/CampaignManager/CreateCampaign?\";\n if (name === null)\n throw new Error(\"The parameter 'name' cannot be null.\");\n else if (name !== undefined)\n url_ += \"name=\" + encodeURIComponent(\"\" + name) + \"&\";\n if (state === null)\n throw new Error(\"The parameter 'state' cannot be null.\");\n else if (state !== undefined)\n url_ += \"state=\" + encodeURIComponent(\"\" + state) + \"&\";\n if (startDateTime === null)\n throw new Error(\"The parameter 'startDateTime' cannot be null.\");\n else if (startDateTime !== undefined)\n url_ += \"startDateTime=\" + encodeURIComponent(\"\" + startDateTime) + \"&\";\n if (endDateTime !== undefined && endDateTime !== null)\n url_ += \"endDateTime=\" + encodeURIComponent(\"\" + endDateTime) + \"&\";\n if (currencyCode === null)\n throw new Error(\"The parameter 'currencyCode' cannot be null.\");\n else if (currencyCode !== undefined)\n url_ += \"currencyCode=\" + encodeURIComponent(\"\" + currencyCode) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(budget);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processCreateCampaign(_response);\n });\n }\n\n protected processCreateCampaign(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as CreateCampaignClientResponse;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n createAdGroup(request: CreateAdGroupRequest): Promise {\n let url_ = this.baseUrl + \"/api/CampaignManager/CreateAdGroup\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(request);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processCreateAdGroup(_response);\n });\n }\n\n protected processCreateAdGroup(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as CreateAdGroupClientResponse;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n archiveCampaign(campaignId: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/CampaignManager/ArchiveCampaign?\";\n if (campaignId === null)\n throw new Error(\"The parameter 'campaignId' cannot be null.\");\n else if (campaignId !== undefined)\n url_ += \"campaignId=\" + encodeURIComponent(\"\" + campaignId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processArchiveCampaign(_response);\n });\n }\n\n protected processArchiveCampaign(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ArchiveCampaignClientResponse;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n archiveAdGroup(adGroupId: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/CampaignManager/ArchiveAdGroup?\";\n if (adGroupId === null)\n throw new Error(\"The parameter 'adGroupId' cannot be null.\");\n else if (adGroupId !== undefined)\n url_ += \"adGroupId=\" + encodeURIComponent(\"\" + adGroupId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processArchiveAdGroup(_response);\n });\n }\n\n protected processArchiveAdGroup(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ArchiveAdGroupClientResponse;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n retrieveCampaigns(campaignId: string | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/CampaignManager/RetrieveCampaigns?\";\n if (campaignId !== undefined && campaignId !== null)\n url_ += \"campaignId=\" + encodeURIComponent(\"\" + campaignId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processRetrieveCampaigns(_response);\n });\n }\n\n protected processRetrieveCampaigns(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AdCampaignEntity[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n retrieveAdGroups(campaignId: string | undefined, adGroupId: string | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/CampaignManager/RetrieveAdGroups?\";\n if (campaignId === null)\n throw new Error(\"The parameter 'campaignId' cannot be null.\");\n else if (campaignId !== undefined)\n url_ += \"campaignId=\" + encodeURIComponent(\"\" + campaignId) + \"&\";\n if (adGroupId !== undefined && adGroupId !== null)\n url_ += \"adGroupId=\" + encodeURIComponent(\"\" + adGroupId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processRetrieveAdGroups(_response);\n });\n }\n\n protected processRetrieveAdGroups(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AdGroup[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface ICatalogClient {\n\n getCatalogForSales(query: SaleQuery, includeCounts: boolean | undefined): Promise;\n\n getCatalogForPurchaseOrders(query: PurchaseOrderQuery, includeCounts: boolean | undefined): Promise;\n\n getCatalogForSaleBySaleId(saleId: number): Promise;\n\n getCatalogBySaleIds(saleIds: number[]): Promise;\n\n getCatalogSaleMetrics(query: SaleQuery): Promise;\n\n getCatalogTicketGroupMetrics(query: PurchaseOrderQuery): Promise;\n\n /**\n * Not currently used, but exist to create the types in React\n */\n getDefaultEventGroupingQuery(): Promise;\n\n searchEvents(query: EventSearchQuery): Promise;\n\n getSearchEventsAutoCompleteResult(searchText: string | undefined, maxCount: number | null | undefined, timeFrame: string | undefined): Promise;\n\n getCatalogForListing(query: ListingQuery, includeCounts: boolean | undefined): Promise;\n\n getCatalogForListingByListingId(listingId: number): Promise;\n\n getCatalogListingMetrics(query: ListingQuery): Promise;\n\n getEventDetailedListingMetrics(query: ListingQuery): Promise;\n\n getSummaryMetricsForListings(allMetrics: ListingMetricsInput[]): Promise;\n\n getCatalogHomeMetrics(): Promise;\n\n requestEventMapping(request: EventMappingRequest): Promise;\n\n getCatalogForUpcomingOnSales(): Promise;\n\n getCatalogForOnSaleEvents(query: OnSaleEventQuery): Promise;\n\n getCatalogOnSaleEventMetrics(query: OnSaleEventQuery): Promise;\n\n searchOnSaleEvents(query: OnSaleEventQuery): Promise;\n\n getCatalog(viagogoVirtualIds: string[]): Promise;\n\n getCatalogCountForSales(query: SaleQuery): Promise;\n\n getCatalogCountForPurchaseOrders(query: PurchaseOrderQuery): Promise;\n\n getCatalogCountForListings(query: ListingQuery): Promise;\n\n getCatalogMetricsForTicketGroups(query: PurchaseOrderQuery, rowVersion: number | null | undefined): Promise;\n\n getCatalogMetricsForSales(query: SaleQuery, rowVersion: number | null | undefined): Promise;\n\n getCatalogMetricsForListings(query: ListingQuery, rowVersion: number | null | undefined): Promise;\n\n getCatalogDetailedMetricsForListings(query: ListingQuery, rowVersion: number | null | undefined): Promise;\n}\n\nexport class CatalogClient extends PosClientBase implements ICatalogClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(configuration: PosClientConfig, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n super(configuration);\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"\";\n }\n\n getCatalogForSales(query: SaleQuery, includeCounts: boolean | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Catalog/GetCatalogForSales?\";\n if (includeCounts === null)\n throw new Error(\"The parameter 'includeCounts' cannot be null.\");\n else if (includeCounts !== undefined)\n url_ += \"includeCounts=\" + encodeURIComponent(\"\" + includeCounts) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetCatalogForSales(_response);\n });\n }\n\n protected processGetCatalogForSales(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as CatalogResults;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getCatalogForPurchaseOrders(query: PurchaseOrderQuery, includeCounts: boolean | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Catalog/GetCatalogForPurchaseOrders?\";\n if (includeCounts === null)\n throw new Error(\"The parameter 'includeCounts' cannot be null.\");\n else if (includeCounts !== undefined)\n url_ += \"includeCounts=\" + encodeURIComponent(\"\" + includeCounts) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetCatalogForPurchaseOrders(_response);\n });\n }\n\n protected processGetCatalogForPurchaseOrders(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as CatalogResults;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getCatalogForSaleBySaleId(saleId: number): Promise {\n let url_ = this.baseUrl + \"/api/Catalog/GetCatalogForSaleBySaleId\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(saleId);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetCatalogForSaleBySaleId(_response);\n });\n }\n\n protected processGetCatalogForSaleBySaleId(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as CatalogResults;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getCatalogBySaleIds(saleIds: number[]): Promise {\n let url_ = this.baseUrl + \"/api/Catalog/GetCatalogBySaleIds\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(saleIds);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetCatalogBySaleIds(_response);\n });\n }\n\n protected processGetCatalogBySaleIds(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as CatalogResults;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getCatalogSaleMetrics(query: SaleQuery): Promise {\n let url_ = this.baseUrl + \"/api/Catalog/GetCatalogSaleMetrics\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetCatalogSaleMetrics(_response);\n });\n }\n\n protected processGetCatalogSaleMetrics(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as CatalogSaleMetricsResults;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getCatalogTicketGroupMetrics(query: PurchaseOrderQuery): Promise {\n let url_ = this.baseUrl + \"/api/Catalog/GetCatalogTicketGroupMetrics\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetCatalogTicketGroupMetrics(_response);\n });\n }\n\n protected processGetCatalogTicketGroupMetrics(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as CatalogTicketGroupMetricsResults;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * Not currently used, but exist to create the types in React\n */\n getDefaultEventGroupingQuery(): Promise {\n let url_ = this.baseUrl + \"/api/Catalog/GetDefaultEventGroupingQuery\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetDefaultEventGroupingQuery(_response);\n });\n }\n\n protected processGetDefaultEventGroupingQuery(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as EventGroupingQuery;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n searchEvents(query: EventSearchQuery): Promise {\n let url_ = this.baseUrl + \"/api/Catalog/SearchEvents\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processSearchEvents(_response);\n });\n }\n\n protected processSearchEvents(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as CatalogResults;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getSearchEventsAutoCompleteResult(searchText: string | undefined, maxCount: number | null | undefined, timeFrame: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Catalog/GetSearchEventsAutoCompleteResult?\";\n if (searchText === null)\n throw new Error(\"The parameter 'searchText' cannot be null.\");\n else if (searchText !== undefined)\n url_ += \"searchText=\" + encodeURIComponent(\"\" + searchText) + \"&\";\n if (maxCount !== undefined && maxCount !== null)\n url_ += \"maxCount=\" + encodeURIComponent(\"\" + maxCount) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(timeFrame);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetSearchEventsAutoCompleteResult(_response);\n });\n }\n\n protected processGetSearchEventsAutoCompleteResult(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as CatalogResults;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getCatalogForListing(query: ListingQuery, includeCounts: boolean | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Catalog/GetCatalogForListing?\";\n if (includeCounts === null)\n throw new Error(\"The parameter 'includeCounts' cannot be null.\");\n else if (includeCounts !== undefined)\n url_ += \"includeCounts=\" + encodeURIComponent(\"\" + includeCounts) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetCatalogForListing(_response);\n });\n }\n\n protected processGetCatalogForListing(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as CatalogResults;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getCatalogForListingByListingId(listingId: number): Promise {\n let url_ = this.baseUrl + \"/api/Catalog/GetCatalogForListingByListingId\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(listingId);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetCatalogForListingByListingId(_response);\n });\n }\n\n protected processGetCatalogForListingByListingId(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as CatalogResults;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getCatalogListingMetrics(query: ListingQuery): Promise {\n let url_ = this.baseUrl + \"/api/Catalog/GetCatalogListingMetrics\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetCatalogListingMetrics(_response);\n });\n }\n\n protected processGetCatalogListingMetrics(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as CatalogListingMetricsResults;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getEventDetailedListingMetrics(query: ListingQuery): Promise {\n let url_ = this.baseUrl + \"/api/Catalog/GetEventDetailedListingMetrics\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetEventDetailedListingMetrics(_response);\n });\n }\n\n protected processGetEventDetailedListingMetrics(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as CatalogListingMetricsResults;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getSummaryMetricsForListings(allMetrics: ListingMetricsInput[]): Promise {\n let url_ = this.baseUrl + \"/api/Catalog/GetSummaryMetricsForListings\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(allMetrics);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetSummaryMetricsForListings(_response);\n });\n }\n\n protected processGetSummaryMetricsForListings(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ListingMetrics;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getCatalogHomeMetrics(): Promise {\n let url_ = this.baseUrl + \"/api/Catalog/GetCatalogHomeMetrics\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetCatalogHomeMetrics(_response);\n });\n }\n\n protected processGetCatalogHomeMetrics(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ListingMetrics;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n requestEventMapping(request: EventMappingRequest): Promise {\n let url_ = this.baseUrl + \"/api/Catalog/RequestEventMapping\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(request);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processRequestEventMapping(_response);\n });\n }\n\n protected processRequestEventMapping(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ValueTupleOfEventAndVenueAndPerformer;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getCatalogForUpcomingOnSales(): Promise {\n let url_ = this.baseUrl + \"/api/Catalog/GetCatalogForUpcomingOnSales\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetCatalogForUpcomingOnSales(_response);\n });\n }\n\n protected processGetCatalogForUpcomingOnSales(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UpcomingOnSalesResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getCatalogForOnSaleEvents(query: OnSaleEventQuery): Promise {\n let url_ = this.baseUrl + \"/api/Catalog/GetCatalogForOnSaleEvents\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetCatalogForOnSaleEvents(_response);\n });\n }\n\n protected processGetCatalogForOnSaleEvents(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as CatalogResults;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getCatalogOnSaleEventMetrics(query: OnSaleEventQuery): Promise {\n let url_ = this.baseUrl + \"/api/Catalog/GetCatalogOnSaleEventMetrics\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetCatalogOnSaleEventMetrics(_response);\n });\n }\n\n protected processGetCatalogOnSaleEventMetrics(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as OnSaleEventMetrics[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n searchOnSaleEvents(query: OnSaleEventQuery): Promise {\n let url_ = this.baseUrl + \"/api/Catalog/SearchOnSaleEvents\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processSearchOnSaleEvents(_response);\n });\n }\n\n protected processSearchOnSaleEvents(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as CatalogResults;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getCatalog(viagogoVirtualIds: string[]): Promise {\n let url_ = this.baseUrl + \"/api/Catalog/GetCatalog\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(viagogoVirtualIds);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetCatalog(_response);\n });\n }\n\n protected processGetCatalog(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as CatalogResults;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getCatalogCountForSales(query: SaleQuery): Promise {\n let url_ = this.baseUrl + \"/api/Catalog/GetCatalogCountForSales\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetCatalogCountForSales(_response);\n });\n }\n\n protected processGetCatalogCountForSales(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as CatalogCounts;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getCatalogCountForPurchaseOrders(query: PurchaseOrderQuery): Promise {\n let url_ = this.baseUrl + \"/api/Catalog/GetCatalogCountForPurchaseOrders\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetCatalogCountForPurchaseOrders(_response);\n });\n }\n\n protected processGetCatalogCountForPurchaseOrders(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as CatalogCounts;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getCatalogCountForListings(query: ListingQuery): Promise {\n let url_ = this.baseUrl + \"/api/Catalog/GetCatalogCountForListings\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetCatalogCountForListings(_response);\n });\n }\n\n protected processGetCatalogCountForListings(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as CatalogCounts;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getCatalogMetricsForTicketGroups(query: PurchaseOrderQuery, rowVersion: number | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Catalog/GetCatalogMetricsForTicketGroups?\";\n if (rowVersion !== undefined && rowVersion !== null)\n url_ += \"rowVersion=\" + encodeURIComponent(\"\" + rowVersion) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetCatalogMetricsForTicketGroups(_response);\n });\n }\n\n protected processGetCatalogMetricsForTicketGroups(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as CatalogTicketGroupMetricsResults;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getCatalogMetricsForSales(query: SaleQuery, rowVersion: number | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Catalog/GetCatalogMetricsForSales?\";\n if (rowVersion !== undefined && rowVersion !== null)\n url_ += \"rowVersion=\" + encodeURIComponent(\"\" + rowVersion) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetCatalogMetricsForSales(_response);\n });\n }\n\n protected processGetCatalogMetricsForSales(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as CatalogSaleMetricsResults;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getCatalogMetricsForListings(query: ListingQuery, rowVersion: number | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Catalog/GetCatalogMetricsForListings?\";\n if (rowVersion !== undefined && rowVersion !== null)\n url_ += \"rowVersion=\" + encodeURIComponent(\"\" + rowVersion) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetCatalogMetricsForListings(_response);\n });\n }\n\n protected processGetCatalogMetricsForListings(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as CatalogListingMetricsResults;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getCatalogDetailedMetricsForListings(query: ListingQuery, rowVersion: number | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Catalog/GetCatalogDetailedMetricsForListings?\";\n if (rowVersion !== undefined && rowVersion !== null)\n url_ += \"rowVersion=\" + encodeURIComponent(\"\" + rowVersion) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetCatalogDetailedMetricsForListings(_response);\n });\n }\n\n protected processGetCatalogDetailedMetricsForListings(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as CatalogListingMetricsResults;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface IClientLogClient {\n\n log(logRequest: ClientLogRequest): Promise;\n}\n\nexport class ClientLogClient extends PosClientBase implements IClientLogClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(configuration: PosClientConfig, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n super(configuration);\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"\";\n }\n\n log(logRequest: ClientLogRequest): Promise {\n let url_ = this.baseUrl + \"/api/ClientLog/Log\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(logRequest);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processLog(_response);\n });\n }\n\n protected processLog(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface IContentClient {\n\n getContentDataMap(): Promise<{ [key: string]: ContentData; }>;\n}\n\nexport class ContentClient extends PosClientBase implements IContentClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(configuration: PosClientConfig, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n super(configuration);\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"\";\n }\n\n getContentDataMap(): Promise<{ [key: string]: ContentData; }> {\n let url_ = this.baseUrl + \"/api/Content/GetContentDataMap\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetContentDataMap(_response);\n });\n }\n\n protected processGetContentDataMap(response: Response): Promise<{ [key: string]: ContentData; }> {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as { [key: string]: ContentData; };\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve<{ [key: string]: ContentData; }>(null as any);\n }\n}\n\nexport interface IDocumentProcessorClient {\n\n getDocumentUploadInfo(entityId: number | undefined, documentType: DocumentType | undefined, contentType: string | undefined): Promise;\n\n uploadDocumentForSale(entityId: number | undefined, entityType: ActionOutboxEntityType | undefined, documentType: DocumentType | undefined, blobName: string | undefined, documentId: string | undefined, contentType: string | undefined, file: FileParameter | null | undefined): Promise;\n\n uploadDocumentForListing(entityId: number | undefined, entityType: ActionOutboxEntityType | undefined, documentType: DocumentType | undefined, blobName: string | undefined, documentId: string | undefined, contentType: string | undefined, file: FileParameter | null | undefined): Promise;\n\n uploadDocumentWithoutProcessing(entityId: number | undefined, entityType: ActionOutboxEntityType | undefined, documentType: DocumentType | undefined, blobName: string | undefined, documentId: string | undefined, contentType: string | undefined, file: FileParameter | null | undefined): Promise;\n\n /**\n * Status polling endpoint\n * @param entityId (optional) \n * @param entityType (optional) \n * @param documentType (optional) \n * @param blobName (optional) \n * @param documentId (optional) \n * @param contentType (optional) \n * @return 204 = not started (mapped from 404 on the function for ts client semantics/lack of NSwag extensibility)\n 202 = processing\n 200 = completed, list of eTicketPages\n All other response codes are a failure and should throw an exception\n Note: https://github.com/RicoSuter/NSwag/issues/622\n */\n getDocumentPages(entityId: number | undefined, entityType: ActionOutboxEntityType | undefined, documentType: DocumentType | undefined, blobName: string | undefined, documentId: string | undefined, contentType: string | undefined): Promise;\n}\n\nexport class DocumentProcessorClient extends PosClientBase implements IDocumentProcessorClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(configuration: PosClientConfig, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n super(configuration);\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"\";\n }\n\n getDocumentUploadInfo(entityId: number | undefined, documentType: DocumentType | undefined, contentType: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/DocumentProcessor/GetDocumentUploadInfo?\";\n if (entityId === null)\n throw new Error(\"The parameter 'entityId' cannot be null.\");\n else if (entityId !== undefined)\n url_ += \"entityId=\" + encodeURIComponent(\"\" + entityId) + \"&\";\n if (documentType === null)\n throw new Error(\"The parameter 'documentType' cannot be null.\");\n else if (documentType !== undefined)\n url_ += \"documentType=\" + encodeURIComponent(\"\" + documentType) + \"&\";\n if (contentType === null)\n throw new Error(\"The parameter 'contentType' cannot be null.\");\n else if (contentType !== undefined)\n url_ += \"contentType=\" + encodeURIComponent(\"\" + contentType) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetDocumentUploadInfo(_response);\n });\n }\n\n protected processGetDocumentUploadInfo(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DocumentUploadInfo;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n uploadDocumentForSale(entityId: number | undefined, entityType: ActionOutboxEntityType | undefined, documentType: DocumentType | undefined, blobName: string | undefined, documentId: string | undefined, contentType: string | undefined, file: FileParameter | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/DocumentProcessor/UploadDocumentForSale?\";\n if (entityId === null)\n throw new Error(\"The parameter 'entityId' cannot be null.\");\n else if (entityId !== undefined)\n url_ += \"EntityId=\" + encodeURIComponent(\"\" + entityId) + \"&\";\n if (entityType === null)\n throw new Error(\"The parameter 'entityType' cannot be null.\");\n else if (entityType !== undefined)\n url_ += \"EntityType=\" + encodeURIComponent(\"\" + entityType) + \"&\";\n if (documentType === null)\n throw new Error(\"The parameter 'documentType' cannot be null.\");\n else if (documentType !== undefined)\n url_ += \"DocumentType=\" + encodeURIComponent(\"\" + documentType) + \"&\";\n if (blobName === null)\n throw new Error(\"The parameter 'blobName' cannot be null.\");\n else if (blobName !== undefined)\n url_ += \"BlobName=\" + encodeURIComponent(\"\" + blobName) + \"&\";\n if (documentId === null)\n throw new Error(\"The parameter 'documentId' cannot be null.\");\n else if (documentId !== undefined)\n url_ += \"DocumentId=\" + encodeURIComponent(\"\" + documentId) + \"&\";\n if (contentType === null)\n throw new Error(\"The parameter 'contentType' cannot be null.\");\n else if (contentType !== undefined)\n url_ += \"ContentType=\" + encodeURIComponent(\"\" + contentType) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = new FormData();\n if (file !== null && file !== undefined)\n content_.append(\"File\", file.data, file.fileName ? file.fileName : \"File\");\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUploadDocumentForSale(_response);\n });\n }\n\n protected processUploadDocumentForSale(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n uploadDocumentForListing(entityId: number | undefined, entityType: ActionOutboxEntityType | undefined, documentType: DocumentType | undefined, blobName: string | undefined, documentId: string | undefined, contentType: string | undefined, file: FileParameter | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/DocumentProcessor/UploadDocumentForListing?\";\n if (entityId === null)\n throw new Error(\"The parameter 'entityId' cannot be null.\");\n else if (entityId !== undefined)\n url_ += \"EntityId=\" + encodeURIComponent(\"\" + entityId) + \"&\";\n if (entityType === null)\n throw new Error(\"The parameter 'entityType' cannot be null.\");\n else if (entityType !== undefined)\n url_ += \"EntityType=\" + encodeURIComponent(\"\" + entityType) + \"&\";\n if (documentType === null)\n throw new Error(\"The parameter 'documentType' cannot be null.\");\n else if (documentType !== undefined)\n url_ += \"DocumentType=\" + encodeURIComponent(\"\" + documentType) + \"&\";\n if (blobName === null)\n throw new Error(\"The parameter 'blobName' cannot be null.\");\n else if (blobName !== undefined)\n url_ += \"BlobName=\" + encodeURIComponent(\"\" + blobName) + \"&\";\n if (documentId === null)\n throw new Error(\"The parameter 'documentId' cannot be null.\");\n else if (documentId !== undefined)\n url_ += \"DocumentId=\" + encodeURIComponent(\"\" + documentId) + \"&\";\n if (contentType === null)\n throw new Error(\"The parameter 'contentType' cannot be null.\");\n else if (contentType !== undefined)\n url_ += \"ContentType=\" + encodeURIComponent(\"\" + contentType) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = new FormData();\n if (file !== null && file !== undefined)\n content_.append(\"File\", file.data, file.fileName ? file.fileName : \"File\");\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUploadDocumentForListing(_response);\n });\n }\n\n protected processUploadDocumentForListing(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n uploadDocumentWithoutProcessing(entityId: number | undefined, entityType: ActionOutboxEntityType | undefined, documentType: DocumentType | undefined, blobName: string | undefined, documentId: string | undefined, contentType: string | undefined, file: FileParameter | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/DocumentProcessor/UploadDocumentWithoutProcessing?\";\n if (entityId === null)\n throw new Error(\"The parameter 'entityId' cannot be null.\");\n else if (entityId !== undefined)\n url_ += \"EntityId=\" + encodeURIComponent(\"\" + entityId) + \"&\";\n if (entityType === null)\n throw new Error(\"The parameter 'entityType' cannot be null.\");\n else if (entityType !== undefined)\n url_ += \"EntityType=\" + encodeURIComponent(\"\" + entityType) + \"&\";\n if (documentType === null)\n throw new Error(\"The parameter 'documentType' cannot be null.\");\n else if (documentType !== undefined)\n url_ += \"DocumentType=\" + encodeURIComponent(\"\" + documentType) + \"&\";\n if (blobName === null)\n throw new Error(\"The parameter 'blobName' cannot be null.\");\n else if (blobName !== undefined)\n url_ += \"BlobName=\" + encodeURIComponent(\"\" + blobName) + \"&\";\n if (documentId === null)\n throw new Error(\"The parameter 'documentId' cannot be null.\");\n else if (documentId !== undefined)\n url_ += \"DocumentId=\" + encodeURIComponent(\"\" + documentId) + \"&\";\n if (contentType === null)\n throw new Error(\"The parameter 'contentType' cannot be null.\");\n else if (contentType !== undefined)\n url_ += \"ContentType=\" + encodeURIComponent(\"\" + contentType) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = new FormData();\n if (file !== null && file !== undefined)\n content_.append(\"File\", file.data, file.fileName ? file.fileName : \"File\");\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUploadDocumentWithoutProcessing(_response);\n });\n }\n\n protected processUploadDocumentWithoutProcessing(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResultWithDataOfUserDocumentLinks;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * Status polling endpoint\n * @param entityId (optional) \n * @param entityType (optional) \n * @param documentType (optional) \n * @param blobName (optional) \n * @param documentId (optional) \n * @param contentType (optional) \n * @return 204 = not started (mapped from 404 on the function for ts client semantics/lack of NSwag extensibility)\n 202 = processing\n 200 = completed, list of eTicketPages\n All other response codes are a failure and should throw an exception\n Note: https://github.com/RicoSuter/NSwag/issues/622\n */\n getDocumentPages(entityId: number | undefined, entityType: ActionOutboxEntityType | undefined, documentType: DocumentType | undefined, blobName: string | undefined, documentId: string | undefined, contentType: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/DocumentProcessor/GetDocumentPages?\";\n if (entityId === null)\n throw new Error(\"The parameter 'entityId' cannot be null.\");\n else if (entityId !== undefined)\n url_ += \"EntityId=\" + encodeURIComponent(\"\" + entityId) + \"&\";\n if (entityType === null)\n throw new Error(\"The parameter 'entityType' cannot be null.\");\n else if (entityType !== undefined)\n url_ += \"EntityType=\" + encodeURIComponent(\"\" + entityType) + \"&\";\n if (documentType === null)\n throw new Error(\"The parameter 'documentType' cannot be null.\");\n else if (documentType !== undefined)\n url_ += \"DocumentType=\" + encodeURIComponent(\"\" + documentType) + \"&\";\n if (blobName === null)\n throw new Error(\"The parameter 'blobName' cannot be null.\");\n else if (blobName !== undefined)\n url_ += \"BlobName=\" + encodeURIComponent(\"\" + blobName) + \"&\";\n if (documentId === null)\n throw new Error(\"The parameter 'documentId' cannot be null.\");\n else if (documentId !== undefined)\n url_ += \"DocumentId=\" + encodeURIComponent(\"\" + documentId) + \"&\";\n if (contentType === null)\n throw new Error(\"The parameter 'contentType' cannot be null.\");\n else if (contentType !== undefined)\n url_ += \"ContentType=\" + encodeURIComponent(\"\" + contentType) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetDocumentPages(_response);\n });\n }\n\n protected processGetDocumentPages(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 204) {\n return response.text().then((_responseText) => {\n let result204: any = null;\n result204 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DocumentPage[];\n return result204;\n });\n } else if (status === 202) {\n return response.text().then((_responseText) => {\n let result202: any = null;\n result202 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DocumentPage[];\n return result202;\n });\n } else if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DocumentPage[];\n return result200;\n });\n } else if (status === 400) {\n return response.text().then((_responseText) => {\n return throwException(\"A server side error occurred.\", status, _responseText, _headers);\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface IEventConfigClient {\n\n getVenueMapForEvent(eventId: number | undefined): Promise;\n\n getVenueMapsByScoreModelForEvent(eventId: number | undefined): Promise<{ [key in keyof typeof ScoreModel]?: VenueMapInfo; }>;\n\n getListingConstraintsForEvents(eventIds: number[]): Promise;\n\n getSellerEventMarketplaceEventInfo(viagogoEventId: number | null | undefined, eventMappingId: string | null | undefined): Promise;\n\n updateSellerEventMarketplaceEventInfos(marketplaceEventInfos: SellerEventMarketplaceEventInfo[]): Promise;\n\n getTagsForEvent(viagogoVirtualId: string | undefined): Promise;\n\n getMarketTransactionsForEvent(viagogoEventId: number | undefined, topN: number | undefined): Promise;\n\n updateTagsForEvent(viagogoVirtualId: string | undefined, tags: Tag[]): Promise;\n\n getInternalNotesForEvent(viagogoVirtualId: string | undefined): Promise;\n\n updateInternalNotesForEvent(viagogoVirtualId: string | undefined, internalNote: string): Promise;\n\n getLastReviewedDateTimeForEvents(viagogoVirtualIds: string[]): Promise<{ [key: string]: string; }>;\n\n updateLastReviewedDateTimeForEvent(viagogoVirtualId: string | undefined, lastReviewedDateTime: string | undefined): Promise;\n\n getSellerEventNotesByViagogoEventId(viagogoEventId: number | undefined): Promise;\n\n insertSellerEventNotes(viagogoEventId: number | undefined, content: string | undefined): Promise;\n\n updateSellerEventGroupingMethods(viagogoVirtualId: string | undefined, groupingMethods: ListingGroupingMethods): Promise;\n\n mergeSellerAccountEventSettingsForDelivery(sellerAccountEventSettings: SellerAccountEventSetting[], viagogoEventId: number | undefined): Promise;\n\n getSellerAccountEventSettings(viagogoEventId: number | undefined): Promise;\n}\n\nexport class EventConfigClient extends PosClientBase implements IEventConfigClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(configuration: PosClientConfig, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n super(configuration);\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"\";\n }\n\n getVenueMapForEvent(eventId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/EventConfig/GetVenueMapForEvent?\";\n if (eventId === null)\n throw new Error(\"The parameter 'eventId' cannot be null.\");\n else if (eventId !== undefined)\n url_ += \"eventId=\" + encodeURIComponent(\"\" + eventId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetVenueMapForEvent(_response);\n });\n }\n\n protected processGetVenueMapForEvent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as VenueMapInfo;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getVenueMapsByScoreModelForEvent(eventId: number | undefined): Promise<{ [key in keyof typeof ScoreModel]?: VenueMapInfo; }> {\n let url_ = this.baseUrl + \"/api/EventConfig/GetVenueMapsByScoreModelForEvent?\";\n if (eventId === null)\n throw new Error(\"The parameter 'eventId' cannot be null.\");\n else if (eventId !== undefined)\n url_ += \"eventId=\" + encodeURIComponent(\"\" + eventId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetVenueMapsByScoreModelForEvent(_response);\n });\n }\n\n protected processGetVenueMapsByScoreModelForEvent(response: Response): Promise<{ [key in keyof typeof ScoreModel]?: VenueMapInfo; }> {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as { [key in keyof typeof ScoreModel]?: VenueMapInfo; };\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve<{ [key in keyof typeof ScoreModel]?: VenueMapInfo; }>(null as any);\n }\n\n getListingConstraintsForEvents(eventIds: number[]): Promise {\n let url_ = this.baseUrl + \"/api/EventConfig/GetListingConstraintsForEvents\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(eventIds);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetListingConstraintsForEvents(_response);\n });\n }\n\n protected processGetListingConstraintsForEvents(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as EventListingConstraints[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getSellerEventMarketplaceEventInfo(viagogoEventId: number | null | undefined, eventMappingId: string | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/EventConfig/GetSellerEventMarketplaceEventInfo?\";\n if (viagogoEventId !== undefined && viagogoEventId !== null)\n url_ += \"viagogoEventId=\" + encodeURIComponent(\"\" + viagogoEventId) + \"&\";\n if (eventMappingId !== undefined && eventMappingId !== null)\n url_ += \"eventMappingId=\" + encodeURIComponent(\"\" + eventMappingId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetSellerEventMarketplaceEventInfo(_response);\n });\n }\n\n protected processGetSellerEventMarketplaceEventInfo(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SellerEventMarketplaceEventInfo[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n updateSellerEventMarketplaceEventInfos(marketplaceEventInfos: SellerEventMarketplaceEventInfo[]): Promise {\n let url_ = this.baseUrl + \"/api/EventConfig/UpdateSellerEventMarketplaceEventInfos\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(marketplaceEventInfos);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpdateSellerEventMarketplaceEventInfos(_response);\n });\n }\n\n protected processUpdateSellerEventMarketplaceEventInfos(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getTagsForEvent(viagogoVirtualId: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/EventConfig/GetTagsForEvent?\";\n if (viagogoVirtualId === null)\n throw new Error(\"The parameter 'viagogoVirtualId' cannot be null.\");\n else if (viagogoVirtualId !== undefined)\n url_ += \"viagogoVirtualId=\" + encodeURIComponent(\"\" + viagogoVirtualId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetTagsForEvent(_response);\n });\n }\n\n protected processGetTagsForEvent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as Tag[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getMarketTransactionsForEvent(viagogoEventId: number | undefined, topN: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/EventConfig/GetMarketTransactionsForEvent?\";\n if (viagogoEventId === null)\n throw new Error(\"The parameter 'viagogoEventId' cannot be null.\");\n else if (viagogoEventId !== undefined)\n url_ += \"viagogoEventId=\" + encodeURIComponent(\"\" + viagogoEventId) + \"&\";\n if (topN === null)\n throw new Error(\"The parameter 'topN' cannot be null.\");\n else if (topN !== undefined)\n url_ += \"topN=\" + encodeURIComponent(\"\" + topN) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetMarketTransactionsForEvent(_response);\n });\n }\n\n protected processGetMarketTransactionsForEvent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as MarketTransaction[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n updateTagsForEvent(viagogoVirtualId: string | undefined, tags: Tag[]): Promise {\n let url_ = this.baseUrl + \"/api/EventConfig/UpdateTagsForEvent?\";\n if (viagogoVirtualId === null)\n throw new Error(\"The parameter 'viagogoVirtualId' cannot be null.\");\n else if (viagogoVirtualId !== undefined)\n url_ += \"viagogoVirtualId=\" + encodeURIComponent(\"\" + viagogoVirtualId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(tags);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpdateTagsForEvent(_response);\n });\n }\n\n protected processUpdateTagsForEvent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getInternalNotesForEvent(viagogoVirtualId: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/EventConfig/GetInternalNotesForEvent?\";\n if (viagogoVirtualId === null)\n throw new Error(\"The parameter 'viagogoVirtualId' cannot be null.\");\n else if (viagogoVirtualId !== undefined)\n url_ += \"viagogoVirtualId=\" + encodeURIComponent(\"\" + viagogoVirtualId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetInternalNotesForEvent(_response);\n });\n }\n\n protected processGetInternalNotesForEvent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as string;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n updateInternalNotesForEvent(viagogoVirtualId: string | undefined, internalNote: string): Promise {\n let url_ = this.baseUrl + \"/api/EventConfig/UpdateInternalNotesForEvent?\";\n if (viagogoVirtualId === null)\n throw new Error(\"The parameter 'viagogoVirtualId' cannot be null.\");\n else if (viagogoVirtualId !== undefined)\n url_ += \"viagogoVirtualId=\" + encodeURIComponent(\"\" + viagogoVirtualId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(internalNote);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpdateInternalNotesForEvent(_response);\n });\n }\n\n protected processUpdateInternalNotesForEvent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getLastReviewedDateTimeForEvents(viagogoVirtualIds: string[]): Promise<{ [key: string]: string; }> {\n let url_ = this.baseUrl + \"/api/EventConfig/GetLastReviewedDateTimeForEvents\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(viagogoVirtualIds);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetLastReviewedDateTimeForEvents(_response);\n });\n }\n\n protected processGetLastReviewedDateTimeForEvents(response: Response): Promise<{ [key: string]: string; }> {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as { [key: string]: string; };\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve<{ [key: string]: string; }>(null as any);\n }\n\n updateLastReviewedDateTimeForEvent(viagogoVirtualId: string | undefined, lastReviewedDateTime: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/EventConfig/UpdateLastReviewedDateTimeForEvent?\";\n if (viagogoVirtualId === null)\n throw new Error(\"The parameter 'viagogoVirtualId' cannot be null.\");\n else if (viagogoVirtualId !== undefined)\n url_ += \"viagogoVirtualId=\" + encodeURIComponent(\"\" + viagogoVirtualId) + \"&\";\n if (lastReviewedDateTime === null)\n throw new Error(\"The parameter 'lastReviewedDateTime' cannot be null.\");\n else if (lastReviewedDateTime !== undefined)\n url_ += \"lastReviewedDateTime=\" + encodeURIComponent(\"\" + lastReviewedDateTime) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpdateLastReviewedDateTimeForEvent(_response);\n });\n }\n\n protected processUpdateLastReviewedDateTimeForEvent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getSellerEventNotesByViagogoEventId(viagogoEventId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/EventConfig/GetSellerEventNotesByViagogoEventId?\";\n if (viagogoEventId === null)\n throw new Error(\"The parameter 'viagogoEventId' cannot be null.\");\n else if (viagogoEventId !== undefined)\n url_ += \"viagogoEventId=\" + encodeURIComponent(\"\" + viagogoEventId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetSellerEventNotesByViagogoEventId(_response);\n });\n }\n\n protected processGetSellerEventNotesByViagogoEventId(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SellerEventNoteResult[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n insertSellerEventNotes(viagogoEventId: number | undefined, content: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/EventConfig/InsertSellerEventNotes?\";\n if (viagogoEventId === null)\n throw new Error(\"The parameter 'viagogoEventId' cannot be null.\");\n else if (viagogoEventId !== undefined)\n url_ += \"viagogoEventId=\" + encodeURIComponent(\"\" + viagogoEventId) + \"&\";\n if (content === null)\n throw new Error(\"The parameter 'content' cannot be null.\");\n else if (content !== undefined)\n url_ += \"content=\" + encodeURIComponent(\"\" + content) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processInsertSellerEventNotes(_response);\n });\n }\n\n protected processInsertSellerEventNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SellerEventNoteResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n updateSellerEventGroupingMethods(viagogoVirtualId: string | undefined, groupingMethods: ListingGroupingMethods): Promise {\n let url_ = this.baseUrl + \"/api/EventConfig/UpdateSellerEventGroupingMethods?\";\n if (viagogoVirtualId === null)\n throw new Error(\"The parameter 'viagogoVirtualId' cannot be null.\");\n else if (viagogoVirtualId !== undefined)\n url_ += \"viagogoVirtualId=\" + encodeURIComponent(\"\" + viagogoVirtualId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(groupingMethods);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpdateSellerEventGroupingMethods(_response);\n });\n }\n\n protected processUpdateSellerEventGroupingMethods(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n mergeSellerAccountEventSettingsForDelivery(sellerAccountEventSettings: SellerAccountEventSetting[], viagogoEventId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/EventConfig?\";\n if (viagogoEventId === null)\n throw new Error(\"The parameter 'viagogoEventId' cannot be null.\");\n else if (viagogoEventId !== undefined)\n url_ += \"viagogoEventId=\" + encodeURIComponent(\"\" + viagogoEventId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(sellerAccountEventSettings);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processMergeSellerAccountEventSettingsForDelivery(_response);\n });\n }\n\n protected processMergeSellerAccountEventSettingsForDelivery(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getSellerAccountEventSettings(viagogoEventId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/EventConfig/GetSellerAccountEventSettings?\";\n if (viagogoEventId === null)\n throw new Error(\"The parameter 'viagogoEventId' cannot be null.\");\n else if (viagogoEventId !== undefined)\n url_ += \"viagogoEventId=\" + encodeURIComponent(\"\" + viagogoEventId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetSellerAccountEventSettings(_response);\n });\n }\n\n protected processGetSellerAccountEventSettings(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SellerAccountEventSetting[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface IFulfillmentProviderClient {\n\n getFulfillmentProviderSettings(): Promise;\n\n toggleFulfillmentProviderSetting(fulfillmentProviderSellerUserId: string | undefined, newState: boolean | undefined): Promise;\n}\n\nexport class FulfillmentProviderClient extends PosClientBase implements IFulfillmentProviderClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(configuration: PosClientConfig, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n super(configuration);\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"\";\n }\n\n getFulfillmentProviderSettings(): Promise {\n let url_ = this.baseUrl + \"/api/FulfillmentProvider/GetFulfillmentProviderSettings\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetFulfillmentProviderSettings(_response);\n });\n }\n\n protected processGetFulfillmentProviderSettings(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as FulfillmentProvider[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n toggleFulfillmentProviderSetting(fulfillmentProviderSellerUserId: string | undefined, newState: boolean | undefined): Promise {\n let url_ = this.baseUrl + \"/api/FulfillmentProvider/ToggleFulfillmentProviderSetting?\";\n if (fulfillmentProviderSellerUserId === null)\n throw new Error(\"The parameter 'fulfillmentProviderSellerUserId' cannot be null.\");\n else if (fulfillmentProviderSellerUserId !== undefined)\n url_ += \"fulfillmentProviderSellerUserId=\" + encodeURIComponent(\"\" + fulfillmentProviderSellerUserId) + \"&\";\n if (newState === null)\n throw new Error(\"The parameter 'newState' cannot be null.\");\n else if (newState !== undefined)\n url_ += \"newState=\" + encodeURIComponent(\"\" + newState) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processToggleFulfillmentProviderSetting(_response);\n });\n }\n\n protected processToggleFulfillmentProviderSetting(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface IInventoryEventDashboardClient {\n\n getEventWebsiteMetrics(queryId: InventoryMetricsQueryId, timePeriod: EventWebsiteMetricsTimePeriod | null | undefined): Promise;\n\n getEventDemandFactors(queryId: InventoryMetricsQueryId): Promise;\n\n getSellerEventDashboardMetrics(queryId: InventoryMetricsQueryId, timePeriod: SellerEventDashboardMetricsTimePeriod | null | undefined): Promise;\n\n getBuyerEventDashboardMetrics(queryId: InventoryMetricsQueryId): Promise;\n\n getEventSectionClearingPrices(queryId: InventoryMetricsQueryId): Promise;\n\n getEventSupplyMetrics(queryId: InventoryMetricsQueryId, timePeriod: EventSupplyMetricsTimePeriod | null | undefined): Promise;\n}\n\nexport class InventoryEventDashboardClient extends PosClientBase implements IInventoryEventDashboardClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(configuration: PosClientConfig, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n super(configuration);\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"\";\n }\n\n getEventWebsiteMetrics(queryId: InventoryMetricsQueryId, timePeriod: EventWebsiteMetricsTimePeriod | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/InventoryEventDashboard/GetEventWebsiteMetrics?\";\n if (timePeriod !== undefined && timePeriod !== null)\n url_ += \"timePeriod=\" + encodeURIComponent(\"\" + timePeriod) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(queryId);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetEventWebsiteMetrics(_response);\n });\n }\n\n protected processGetEventWebsiteMetrics(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as EventMarketplaceWebsiteMetrics;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getEventDemandFactors(queryId: InventoryMetricsQueryId): Promise {\n let url_ = this.baseUrl + \"/api/InventoryEventDashboard/GetEventDemandFactors\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(queryId);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetEventDemandFactors(_response);\n });\n }\n\n protected processGetEventDemandFactors(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as EventDemandFactor[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getSellerEventDashboardMetrics(queryId: InventoryMetricsQueryId, timePeriod: SellerEventDashboardMetricsTimePeriod | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/InventoryEventDashboard/GetSellerEventDashboardMetrics?\";\n if (timePeriod !== undefined && timePeriod !== null)\n url_ += \"timePeriod=\" + encodeURIComponent(\"\" + timePeriod) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(queryId);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetSellerEventDashboardMetrics(_response);\n });\n }\n\n protected processGetSellerEventDashboardMetrics(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as InventoryEventDashboardResults;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getBuyerEventDashboardMetrics(queryId: InventoryMetricsQueryId): Promise {\n let url_ = this.baseUrl + \"/api/InventoryEventDashboard/GetBuyerEventDashboardMetrics\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(queryId);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetBuyerEventDashboardMetrics(_response);\n });\n }\n\n protected processGetBuyerEventDashboardMetrics(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as InventoryEventDashboardResults;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getEventSectionClearingPrices(queryId: InventoryMetricsQueryId): Promise {\n let url_ = this.baseUrl + \"/api/InventoryEventDashboard/GetEventSectionClearingPrices\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(queryId);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetEventSectionClearingPrices(_response);\n });\n }\n\n protected processGetEventSectionClearingPrices(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as EventSectionClearingPrices[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getEventSupplyMetrics(queryId: InventoryMetricsQueryId, timePeriod: EventSupplyMetricsTimePeriod | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/InventoryEventDashboard/GetEventSupplyMetrics?\";\n if (timePeriod !== undefined && timePeriod !== null)\n url_ += \"timePeriod=\" + encodeURIComponent(\"\" + timePeriod) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(queryId);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetEventSupplyMetrics(_response);\n });\n }\n\n protected processGetEventSupplyMetrics(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as EventSupplyMetrics[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface IListingClient {\n\n getListingByListingId(inventoryId: number | undefined, current: ListingDetails | undefined, dataToInclude: ListingDetailDataField[] | null | undefined): Promise;\n\n getListingAvailableQuantitiesByListingIds(inventoryIds: number[]): Promise;\n\n getListingByMarketplaceListingId(marketplaceListingId: string | undefined): Promise;\n\n getListingsForEvents(query: ListingQuery, useReadonlyDB: boolean | undefined, doNotProcessListingGroups: boolean | undefined): Promise<{ [key: string]: Listing[]; }>;\n\n getListingsSectionalDataForEvents(input: SectionalListingsForEventsInput, dataToInclude: ListingDetailDataField[] | undefined, processListingGroup: boolean | null | undefined): Promise<{ [key: string]: Listing[]; }>;\n\n getListingsCanBeWasted(inventoryId: number | undefined): Promise;\n\n getDuplicateListingsForListingId(inventoryId: number | undefined): Promise;\n\n getListingEnabledForAutoPricing(posEventIds: string[]): Promise;\n\n updateAutoPricingEnabledForEvent(posEventIds: string[], autoPricingState: boolean | undefined): Promise;\n\n createMarketplaceListings(listingId: number | undefined, marketplaces: Marketplace[] | undefined): Promise;\n\n deleteMarketplaceListings(listingId: number | undefined, marketplaces: Marketplace[] | undefined): Promise;\n\n updateListingAdminHold(listingId: number | undefined, adminHoldExpirationDate: string | null | undefined, adminHoldNotes: string | null | undefined): Promise;\n\n updateListingIgnoreDuplicate(listingId: number | undefined, ignoreDuplicate: boolean | undefined): Promise;\n\n updateListing(input: ListingDetailsUpdateInput): Promise;\n\n updateListingPrices(listingId: number | undefined, listPrice: number | undefined, netProceedsFloor: number | undefined): Promise;\n\n updateListingsPricingSettings(input: ValueTupleOfLongAndListingDetailsUpdateInput): Promise;\n\n mergeListings(input: MergeListingsInput): Promise;\n\n bulkMergeListings(input: BulkMergeListingsInput): Promise;\n\n getListingMergeSuggestionsByEvent(viagogoEventId: number | undefined, excludeHeldListings: boolean | null | undefined): Promise;\n\n getListingMergeSuggestions(excludeHeldListings: boolean | null | undefined): Promise;\n\n splitListings(input: SplitListingInput): Promise;\n\n updateBarcodesForListing(listingId: number | undefined, barcodes: TicketBarcode[]): Promise;\n\n updateETicketsForListing(listingId: number | undefined, etickets: UserDocument[]): Promise;\n\n updateMobileQRCodesForListing(listingId: number | undefined, mobileQRCodes: UserDocument[]): Promise;\n\n updateExternalIdsForListing(listingId: number | undefined, externalIds: TicketExternalId[]): Promise;\n\n updateTicketUrlsForListing(listingId: number | undefined, ticketUrls: TicketUrl[]): Promise;\n\n updateProofOfPurchaseForListing(listingId: number | undefined, proofDocs: UserDocument[]): Promise;\n\n getPriceHistoryByListingId(input: ValueTupleOfLongAndNullableInteger): Promise;\n\n getCompListingsByEventId(viagogoEventId: number | undefined, listingId: number | null | undefined, currency: string | null | undefined): Promise;\n\n getListingPriceCalculation(viagogoEventId: number | undefined, listingId: number | undefined, input: ListingDetailsPricingUpdates): Promise;\n\n exportListings(input: ValueTupleOfListingQueryAndListingCsvColumnSelectionConfig): Promise;\n\n createSeatSaver(inputs: SeatSaverListingDetailsInput[]): Promise;\n\n deleteSeatSaver(listingId: number | undefined): Promise;\n\n /**\n * Swap listing from one group to another\n */\n batchSwapListingGroup(input: BatchSwapListingGroupInput): Promise<{ [key: string]: Listing[]; }>;\n\n /**\n * Swap listing from one group to another\n */\n reorderListingInGroup(input: ReorderListingInGroupInput): Promise<{ [key: string]: Listing[]; }>;\n\n updateListingBroadcastSection(input: ListingDetailsBroadcastSectionUpdates): Promise;\n\n updateListingTicketSection(input: ListingDetailsTicketSectionUpdates): Promise;\n\n updateListingPricingSection(input: ListingDetailsPricingSectionUpdates): Promise;\n\n updateListingAutoPricingSection(input: ListingDetailsAutoPricingSectionUpdates): Promise;\n\n updateListingAutoPricingSectionV2(input: ListingDetailsAutoPricingSectionUpdatesV2): Promise;\n\n updateListingTagSection(input: ListingDetailsTagsSectionUpdates): Promise;\n\n downloadMergedUserDocumentsPdf(listingId: number | undefined): Promise;\n\n getListingStatusByListingId(inventoryId: number | undefined): Promise;\n}\n\nexport class ListingClient extends PosClientBase implements IListingClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(configuration: PosClientConfig, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n super(configuration);\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"\";\n }\n\n getListingByListingId(inventoryId: number | undefined, current: ListingDetails | undefined, dataToInclude: ListingDetailDataField[] | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Listing/GetListingByListingId?\";\n if (inventoryId === null)\n throw new Error(\"The parameter 'inventoryId' cannot be null.\");\n else if (inventoryId !== undefined)\n url_ += \"inventoryId=\" + encodeURIComponent(\"\" + inventoryId) + \"&\";\n if (dataToInclude !== undefined && dataToInclude !== null)\n dataToInclude && dataToInclude.forEach(item => { url_ += \"dataToInclude=\" + encodeURIComponent(\"\" + item) + \"&\"; });\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(current);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetListingByListingId(_response);\n });\n }\n\n protected processGetListingByListingId(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ListingDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getListingAvailableQuantitiesByListingIds(inventoryIds: number[]): Promise {\n let url_ = this.baseUrl + \"/api/Listing/GetListingAvailableQuantitiesByListingIds\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(inventoryIds);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetListingAvailableQuantitiesByListingIds(_response);\n });\n }\n\n protected processGetListingAvailableQuantitiesByListingIds(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as number;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getListingByMarketplaceListingId(marketplaceListingId: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Listing/GetListingByMarketplaceListingId?\";\n if (marketplaceListingId === null)\n throw new Error(\"The parameter 'marketplaceListingId' cannot be null.\");\n else if (marketplaceListingId !== undefined)\n url_ += \"marketplaceListingId=\" + encodeURIComponent(\"\" + marketplaceListingId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetListingByMarketplaceListingId(_response);\n });\n }\n\n protected processGetListingByMarketplaceListingId(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as Listing[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getListingsForEvents(query: ListingQuery, useReadonlyDB: boolean | undefined, doNotProcessListingGroups: boolean | undefined): Promise<{ [key: string]: Listing[]; }> {\n let url_ = this.baseUrl + \"/api/Listing/GetListingsForEvents?\";\n if (useReadonlyDB === null)\n throw new Error(\"The parameter 'useReadonlyDB' cannot be null.\");\n else if (useReadonlyDB !== undefined)\n url_ += \"useReadonlyDB=\" + encodeURIComponent(\"\" + useReadonlyDB) + \"&\";\n if (doNotProcessListingGroups === null)\n throw new Error(\"The parameter 'doNotProcessListingGroups' cannot be null.\");\n else if (doNotProcessListingGroups !== undefined)\n url_ += \"doNotProcessListingGroups=\" + encodeURIComponent(\"\" + doNotProcessListingGroups) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetListingsForEvents(_response);\n });\n }\n\n protected processGetListingsForEvents(response: Response): Promise<{ [key: string]: Listing[]; }> {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as { [key: string]: Listing[]; };\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve<{ [key: string]: Listing[]; }>(null as any);\n }\n\n getListingsSectionalDataForEvents(input: SectionalListingsForEventsInput, dataToInclude: ListingDetailDataField[] | undefined, processListingGroup: boolean | null | undefined): Promise<{ [key: string]: Listing[]; }> {\n let url_ = this.baseUrl + \"/api/Listing/GetListingsSectionalDataForEvents?\";\n if (dataToInclude === null)\n throw new Error(\"The parameter 'dataToInclude' cannot be null.\");\n else if (dataToInclude !== undefined)\n dataToInclude && dataToInclude.forEach(item => { url_ += \"dataToInclude=\" + encodeURIComponent(\"\" + item) + \"&\"; });\n if (processListingGroup !== undefined && processListingGroup !== null)\n url_ += \"processListingGroup=\" + encodeURIComponent(\"\" + processListingGroup) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetListingsSectionalDataForEvents(_response);\n });\n }\n\n protected processGetListingsSectionalDataForEvents(response: Response): Promise<{ [key: string]: Listing[]; }> {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as { [key: string]: Listing[]; };\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve<{ [key: string]: Listing[]; }>(null as any);\n }\n\n getListingsCanBeWasted(inventoryId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Listing/GetListingsCanBeWasted?\";\n if (inventoryId === null)\n throw new Error(\"The parameter 'inventoryId' cannot be null.\");\n else if (inventoryId !== undefined)\n url_ += \"inventoryId=\" + encodeURIComponent(\"\" + inventoryId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetListingsCanBeWasted(_response);\n });\n }\n\n protected processGetListingsCanBeWasted(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ValueTupleOfBooleanAndIListOfTicket;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getDuplicateListingsForListingId(inventoryId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Listing/GetDuplicateListingsForListingId?\";\n if (inventoryId === null)\n throw new Error(\"The parameter 'inventoryId' cannot be null.\");\n else if (inventoryId !== undefined)\n url_ += \"inventoryId=\" + encodeURIComponent(\"\" + inventoryId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetDuplicateListingsForListingId(_response);\n });\n }\n\n protected processGetDuplicateListingsForListingId(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DuplicateListingDetails[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getListingEnabledForAutoPricing(posEventIds: string[]): Promise {\n let url_ = this.baseUrl + \"/api/Listing/GetListingEnabledForAutoPricing\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(posEventIds);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetListingEnabledForAutoPricing(_response);\n });\n }\n\n protected processGetListingEnabledForAutoPricing(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n updateAutoPricingEnabledForEvent(posEventIds: string[], autoPricingState: boolean | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Listing/UpdateAutoPricingEnabledForEvent?\";\n if (autoPricingState === null)\n throw new Error(\"The parameter 'autoPricingState' cannot be null.\");\n else if (autoPricingState !== undefined)\n url_ += \"autoPricingState=\" + encodeURIComponent(\"\" + autoPricingState) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(posEventIds);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpdateAutoPricingEnabledForEvent(_response);\n });\n }\n\n protected processUpdateAutoPricingEnabledForEvent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n createMarketplaceListings(listingId: number | undefined, marketplaces: Marketplace[] | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Listing/CreateMarketplaceListings?\";\n if (listingId === null)\n throw new Error(\"The parameter 'listingId' cannot be null.\");\n else if (listingId !== undefined)\n url_ += \"listingId=\" + encodeURIComponent(\"\" + listingId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(marketplaces);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processCreateMarketplaceListings(_response);\n });\n }\n\n protected processCreateMarketplaceListings(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n deleteMarketplaceListings(listingId: number | undefined, marketplaces: Marketplace[] | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Listing/DeleteMarketplaceListings?\";\n if (listingId === null)\n throw new Error(\"The parameter 'listingId' cannot be null.\");\n else if (listingId !== undefined)\n url_ += \"listingId=\" + encodeURIComponent(\"\" + listingId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(marketplaces);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processDeleteMarketplaceListings(_response);\n });\n }\n\n protected processDeleteMarketplaceListings(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n updateListingAdminHold(listingId: number | undefined, adminHoldExpirationDate: string | null | undefined, adminHoldNotes: string | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Listing/UpdateListingAdminHold?\";\n if (listingId === null)\n throw new Error(\"The parameter 'listingId' cannot be null.\");\n else if (listingId !== undefined)\n url_ += \"listingId=\" + encodeURIComponent(\"\" + listingId) + \"&\";\n if (adminHoldExpirationDate !== undefined && adminHoldExpirationDate !== null)\n url_ += \"adminHoldExpirationDate=\" + encodeURIComponent(\"\" + adminHoldExpirationDate) + \"&\";\n if (adminHoldNotes !== undefined && adminHoldNotes !== null)\n url_ += \"adminHoldNotes=\" + encodeURIComponent(\"\" + adminHoldNotes) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpdateListingAdminHold(_response);\n });\n }\n\n protected processUpdateListingAdminHold(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n updateListingIgnoreDuplicate(listingId: number | undefined, ignoreDuplicate: boolean | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Listing/UpdateListingIgnoreDuplicate?\";\n if (listingId === null)\n throw new Error(\"The parameter 'listingId' cannot be null.\");\n else if (listingId !== undefined)\n url_ += \"listingId=\" + encodeURIComponent(\"\" + listingId) + \"&\";\n if (ignoreDuplicate === null)\n throw new Error(\"The parameter 'ignoreDuplicate' cannot be null.\");\n else if (ignoreDuplicate !== undefined)\n url_ += \"ignoreDuplicate=\" + encodeURIComponent(\"\" + ignoreDuplicate) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpdateListingIgnoreDuplicate(_response);\n });\n }\n\n protected processUpdateListingIgnoreDuplicate(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n updateListing(input: ListingDetailsUpdateInput): Promise {\n let url_ = this.baseUrl + \"/api/Listing/UpdateListing\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpdateListing(_response);\n });\n }\n\n protected processUpdateListing(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n updateListingPrices(listingId: number | undefined, listPrice: number | undefined, netProceedsFloor: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Listing/UpdateListingPrices?\";\n if (listingId === null)\n throw new Error(\"The parameter 'listingId' cannot be null.\");\n else if (listingId !== undefined)\n url_ += \"listingId=\" + encodeURIComponent(\"\" + listingId) + \"&\";\n if (listPrice === null)\n throw new Error(\"The parameter 'listPrice' cannot be null.\");\n else if (listPrice !== undefined)\n url_ += \"listPrice=\" + encodeURIComponent(\"\" + listPrice) + \"&\";\n if (netProceedsFloor === null)\n throw new Error(\"The parameter 'netProceedsFloor' cannot be null.\");\n else if (netProceedsFloor !== undefined)\n url_ += \"netProceedsFloor=\" + encodeURIComponent(\"\" + netProceedsFloor) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpdateListingPrices(_response);\n });\n }\n\n protected processUpdateListingPrices(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as Listing;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n updateListingsPricingSettings(input: ValueTupleOfLongAndListingDetailsUpdateInput): Promise {\n let url_ = this.baseUrl + \"/api/Listing/UpdateListingsPricingSettings\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpdateListingsPricingSettings(_response);\n });\n }\n\n protected processUpdateListingsPricingSettings(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as Listing;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n mergeListings(input: MergeListingsInput): Promise {\n let url_ = this.baseUrl + \"/api/Listing/MergeListings\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processMergeListings(_response);\n });\n }\n\n protected processMergeListings(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n bulkMergeListings(input: BulkMergeListingsInput): Promise {\n let url_ = this.baseUrl + \"/api/Listing/BulkMergeListings\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBulkMergeListings(_response);\n });\n }\n\n protected processBulkMergeListings(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getListingMergeSuggestionsByEvent(viagogoEventId: number | undefined, excludeHeldListings: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Listing/GetListingMergeSuggestionsByEvent?\";\n if (viagogoEventId === null)\n throw new Error(\"The parameter 'viagogoEventId' cannot be null.\");\n else if (viagogoEventId !== undefined)\n url_ += \"viagogoEventId=\" + encodeURIComponent(\"\" + viagogoEventId) + \"&\";\n if (excludeHeldListings !== undefined && excludeHeldListings !== null)\n url_ += \"excludeHeldListings=\" + encodeURIComponent(\"\" + excludeHeldListings) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetListingMergeSuggestionsByEvent(_response);\n });\n }\n\n protected processGetListingMergeSuggestionsByEvent(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ListingMergeSuggestion[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getListingMergeSuggestions(excludeHeldListings: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Listing/GetListingMergeSuggestions?\";\n if (excludeHeldListings !== undefined && excludeHeldListings !== null)\n url_ += \"excludeHeldListings=\" + encodeURIComponent(\"\" + excludeHeldListings) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetListingMergeSuggestions(_response);\n });\n }\n\n protected processGetListingMergeSuggestions(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ListingMergeSuggestion[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n splitListings(input: SplitListingInput): Promise {\n let url_ = this.baseUrl + \"/api/Listing/SplitListings\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processSplitListings(_response);\n });\n }\n\n protected processSplitListings(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n updateBarcodesForListing(listingId: number | undefined, barcodes: TicketBarcode[]): Promise {\n let url_ = this.baseUrl + \"/api/Listing/UpdateBarcodesForListing?\";\n if (listingId === null)\n throw new Error(\"The parameter 'listingId' cannot be null.\");\n else if (listingId !== undefined)\n url_ += \"listingId=\" + encodeURIComponent(\"\" + listingId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(barcodes);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpdateBarcodesForListing(_response);\n });\n }\n\n protected processUpdateBarcodesForListing(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n updateETicketsForListing(listingId: number | undefined, etickets: UserDocument[]): Promise {\n let url_ = this.baseUrl + \"/api/Listing/UpdateETicketsForListing?\";\n if (listingId === null)\n throw new Error(\"The parameter 'listingId' cannot be null.\");\n else if (listingId !== undefined)\n url_ += \"listingId=\" + encodeURIComponent(\"\" + listingId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(etickets);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpdateETicketsForListing(_response);\n });\n }\n\n protected processUpdateETicketsForListing(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n updateMobileQRCodesForListing(listingId: number | undefined, mobileQRCodes: UserDocument[]): Promise {\n let url_ = this.baseUrl + \"/api/Listing/UpdateMobileQRCodesForListing?\";\n if (listingId === null)\n throw new Error(\"The parameter 'listingId' cannot be null.\");\n else if (listingId !== undefined)\n url_ += \"listingId=\" + encodeURIComponent(\"\" + listingId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(mobileQRCodes);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpdateMobileQRCodesForListing(_response);\n });\n }\n\n protected processUpdateMobileQRCodesForListing(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n updateExternalIdsForListing(listingId: number | undefined, externalIds: TicketExternalId[]): Promise {\n let url_ = this.baseUrl + \"/api/Listing/UpdateExternalIdsForListing?\";\n if (listingId === null)\n throw new Error(\"The parameter 'listingId' cannot be null.\");\n else if (listingId !== undefined)\n url_ += \"listingId=\" + encodeURIComponent(\"\" + listingId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(externalIds);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpdateExternalIdsForListing(_response);\n });\n }\n\n protected processUpdateExternalIdsForListing(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n updateTicketUrlsForListing(listingId: number | undefined, ticketUrls: TicketUrl[]): Promise {\n let url_ = this.baseUrl + \"/api/Listing/UpdateTicketUrlsForListing?\";\n if (listingId === null)\n throw new Error(\"The parameter 'listingId' cannot be null.\");\n else if (listingId !== undefined)\n url_ += \"listingId=\" + encodeURIComponent(\"\" + listingId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(ticketUrls);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpdateTicketUrlsForListing(_response);\n });\n }\n\n protected processUpdateTicketUrlsForListing(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n updateProofOfPurchaseForListing(listingId: number | undefined, proofDocs: UserDocument[]): Promise {\n let url_ = this.baseUrl + \"/api/Listing/UpdateProofOfPurchaseForListing?\";\n if (listingId === null)\n throw new Error(\"The parameter 'listingId' cannot be null.\");\n else if (listingId !== undefined)\n url_ += \"listingId=\" + encodeURIComponent(\"\" + listingId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(proofDocs);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpdateProofOfPurchaseForListing(_response);\n });\n }\n\n protected processUpdateProofOfPurchaseForListing(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getPriceHistoryByListingId(input: ValueTupleOfLongAndNullableInteger): Promise {\n let url_ = this.baseUrl + \"/api/Listing/GetPriceHistoryByListingId\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetPriceHistoryByListingId(_response);\n });\n }\n\n protected processGetPriceHistoryByListingId(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ListingPriceHistory[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getCompListingsByEventId(viagogoEventId: number | undefined, listingId: number | null | undefined, currency: string | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Listing/GetCompListingsByEventId?\";\n if (viagogoEventId === null)\n throw new Error(\"The parameter 'viagogoEventId' cannot be null.\");\n else if (viagogoEventId !== undefined)\n url_ += \"viagogoEventId=\" + encodeURIComponent(\"\" + viagogoEventId) + \"&\";\n if (listingId !== undefined && listingId !== null)\n url_ += \"listingId=\" + encodeURIComponent(\"\" + listingId) + \"&\";\n if (currency !== undefined && currency !== null)\n url_ += \"currency=\" + encodeURIComponent(\"\" + currency) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetCompListingsByEventId(_response);\n });\n }\n\n protected processGetCompListingsByEventId(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as CompListing[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getListingPriceCalculation(viagogoEventId: number | undefined, listingId: number | undefined, input: ListingDetailsPricingUpdates): Promise {\n let url_ = this.baseUrl + \"/api/Listing/GetListingPriceCalculation?\";\n if (viagogoEventId === null)\n throw new Error(\"The parameter 'viagogoEventId' cannot be null.\");\n else if (viagogoEventId !== undefined)\n url_ += \"viagogoEventId=\" + encodeURIComponent(\"\" + viagogoEventId) + \"&\";\n if (listingId === null)\n throw new Error(\"The parameter 'listingId' cannot be null.\");\n else if (listingId !== undefined)\n url_ += \"listingId=\" + encodeURIComponent(\"\" + listingId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetListingPriceCalculation(_response);\n });\n }\n\n protected processGetListingPriceCalculation(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ListingPriceCalculation;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n exportListings(input: ValueTupleOfListingQueryAndListingCsvColumnSelectionConfig): Promise {\n let url_ = this.baseUrl + \"/api/Listing/ExportListings\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/octet-stream\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processExportListings(_response);\n });\n }\n\n protected processExportListings(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200 || status === 206) {\n const contentDisposition = response.headers ? response.headers.get(\"content-disposition\") : undefined;\n let fileNameMatch = contentDisposition ? /filename\\*=(?:(\\\\?['\"])(.*?)\\1|(?:[^\\s]+'.*?')?([^;\\n]*))/g.exec(contentDisposition) : undefined;\n let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;\n if (fileName) {\n fileName = decodeURIComponent(fileName);\n } else {\n fileNameMatch = contentDisposition ? /filename=\"?([^\"]*?)\"?(;|$)/g.exec(contentDisposition) : undefined;\n fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;\n }\n return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n createSeatSaver(inputs: SeatSaverListingDetailsInput[]): Promise {\n let url_ = this.baseUrl + \"/api/Listing/CreateSeatSaver\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(inputs);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processCreateSeatSaver(_response);\n });\n }\n\n protected processCreateSeatSaver(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n deleteSeatSaver(listingId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Listing/DeleteSeatSaver?\";\n if (listingId === null)\n throw new Error(\"The parameter 'listingId' cannot be null.\");\n else if (listingId !== undefined)\n url_ += \"listingId=\" + encodeURIComponent(\"\" + listingId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processDeleteSeatSaver(_response);\n });\n }\n\n protected processDeleteSeatSaver(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * Swap listing from one group to another\n */\n batchSwapListingGroup(input: BatchSwapListingGroupInput): Promise<{ [key: string]: Listing[]; }> {\n let url_ = this.baseUrl + \"/api/Listing/BatchSwapListingGroup\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processBatchSwapListingGroup(_response);\n });\n }\n\n protected processBatchSwapListingGroup(response: Response): Promise<{ [key: string]: Listing[]; }> {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as { [key: string]: Listing[]; };\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve<{ [key: string]: Listing[]; }>(null as any);\n }\n\n /**\n * Swap listing from one group to another\n */\n reorderListingInGroup(input: ReorderListingInGroupInput): Promise<{ [key: string]: Listing[]; }> {\n let url_ = this.baseUrl + \"/api/Listing/ReorderListingInGroup\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processReorderListingInGroup(_response);\n });\n }\n\n protected processReorderListingInGroup(response: Response): Promise<{ [key: string]: Listing[]; }> {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as { [key: string]: Listing[]; };\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve<{ [key: string]: Listing[]; }>(null as any);\n }\n\n updateListingBroadcastSection(input: ListingDetailsBroadcastSectionUpdates): Promise {\n let url_ = this.baseUrl + \"/api/Listing/UpdateListingBroadcastSection\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpdateListingBroadcastSection(_response);\n });\n }\n\n protected processUpdateListingBroadcastSection(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n updateListingTicketSection(input: ListingDetailsTicketSectionUpdates): Promise {\n let url_ = this.baseUrl + \"/api/Listing/UpdateListingTicketSection\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpdateListingTicketSection(_response);\n });\n }\n\n protected processUpdateListingTicketSection(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n updateListingPricingSection(input: ListingDetailsPricingSectionUpdates): Promise {\n let url_ = this.baseUrl + \"/api/Listing/UpdateListingPricingSection\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpdateListingPricingSection(_response);\n });\n }\n\n protected processUpdateListingPricingSection(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n updateListingAutoPricingSection(input: ListingDetailsAutoPricingSectionUpdates): Promise {\n let url_ = this.baseUrl + \"/api/Listing/UpdateListingAutoPricingSection\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpdateListingAutoPricingSection(_response);\n });\n }\n\n protected processUpdateListingAutoPricingSection(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n updateListingAutoPricingSectionV2(input: ListingDetailsAutoPricingSectionUpdatesV2): Promise {\n let url_ = this.baseUrl + \"/api/Listing/UpdateListingAutoPricingSectionV2\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpdateListingAutoPricingSectionV2(_response);\n });\n }\n\n protected processUpdateListingAutoPricingSectionV2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n updateListingTagSection(input: ListingDetailsTagsSectionUpdates): Promise {\n let url_ = this.baseUrl + \"/api/Listing/UpdateListingTagSection\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpdateListingTagSection(_response);\n });\n }\n\n protected processUpdateListingTagSection(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n downloadMergedUserDocumentsPdf(listingId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Listing/DownloadMergedUserDocumentsPdf?\";\n if (listingId === null)\n throw new Error(\"The parameter 'listingId' cannot be null.\");\n else if (listingId !== undefined)\n url_ += \"listingId=\" + encodeURIComponent(\"\" + listingId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/octet-stream\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processDownloadMergedUserDocumentsPdf(_response);\n });\n }\n\n protected processDownloadMergedUserDocumentsPdf(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200 || status === 206) {\n const contentDisposition = response.headers ? response.headers.get(\"content-disposition\") : undefined;\n let fileNameMatch = contentDisposition ? /filename\\*=(?:(\\\\?['\"])(.*?)\\1|(?:[^\\s]+'.*?')?([^;\\n]*))/g.exec(contentDisposition) : undefined;\n let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;\n if (fileName) {\n fileName = decodeURIComponent(fileName);\n } else {\n fileNameMatch = contentDisposition ? /filename=\"?([^\"]*?)\"?(;|$)/g.exec(contentDisposition) : undefined;\n fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;\n }\n return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getListingStatusByListingId(inventoryId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Listing/GetListingStatusByListingId?\";\n if (inventoryId === null)\n throw new Error(\"The parameter 'inventoryId' cannot be null.\");\n else if (inventoryId !== undefined)\n url_ += \"inventoryId=\" + encodeURIComponent(\"\" + inventoryId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetListingStatusByListingId(_response);\n });\n }\n\n protected processGetListingStatusByListingId(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ListingStatusInfo;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface IListingExperimentClient {\n\n getListingExperimentsByViagogoEventId(viagogoEventId: number | undefined): Promise;\n\n createListingExperiment(listingExperiment: ListingExperiment): Promise;\n\n updateListingExperiment(listingExperiment: ListingExperiment): Promise;\n\n restartListingExperiment(listingExperiment: ListingExperiment): Promise;\n\n stopListingExperiment(viagogoEventId: number | undefined, listingGroupId: string | null | undefined): Promise;\n}\n\nexport class ListingExperimentClient extends PosClientBase implements IListingExperimentClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(configuration: PosClientConfig, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n super(configuration);\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"\";\n }\n\n getListingExperimentsByViagogoEventId(viagogoEventId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/ListingExperiment/GetListingExperimentsByViagogoEventId?\";\n if (viagogoEventId === null)\n throw new Error(\"The parameter 'viagogoEventId' cannot be null.\");\n else if (viagogoEventId !== undefined)\n url_ += \"viagogoEventId=\" + encodeURIComponent(\"\" + viagogoEventId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetListingExperimentsByViagogoEventId(_response);\n });\n }\n\n protected processGetListingExperimentsByViagogoEventId(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ListingExperiment[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n createListingExperiment(listingExperiment: ListingExperiment): Promise {\n let url_ = this.baseUrl + \"/api/ListingExperiment/CreateListingExperiment\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(listingExperiment);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processCreateListingExperiment(_response);\n });\n }\n\n protected processCreateListingExperiment(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n updateListingExperiment(listingExperiment: ListingExperiment): Promise {\n let url_ = this.baseUrl + \"/api/ListingExperiment/UpdateListingExperiment\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(listingExperiment);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpdateListingExperiment(_response);\n });\n }\n\n protected processUpdateListingExperiment(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n restartListingExperiment(listingExperiment: ListingExperiment): Promise {\n let url_ = this.baseUrl + \"/api/ListingExperiment/RestartListingExperiment\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(listingExperiment);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processRestartListingExperiment(_response);\n });\n }\n\n protected processRestartListingExperiment(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n stopListingExperiment(viagogoEventId: number | undefined, listingGroupId: string | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/ListingExperiment/StopListingExperiment?\";\n if (viagogoEventId === null)\n throw new Error(\"The parameter 'viagogoEventId' cannot be null.\");\n else if (viagogoEventId !== undefined)\n url_ += \"viagogoEventId=\" + encodeURIComponent(\"\" + viagogoEventId) + \"&\";\n if (listingGroupId !== undefined && listingGroupId !== null)\n url_ += \"listingGroupId=\" + encodeURIComponent(\"\" + listingGroupId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processStopListingExperiment(_response);\n });\n }\n\n protected processStopListingExperiment(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface IListingGroupClient {\n\n ungroupListings(listingGroupId: string | undefined): Promise<{ [key: string]: Listing[]; }>;\n\n setListingActiveInGroup(listingGroupId: string | undefined, listingId: number | undefined, isActive: boolean | undefined): Promise;\n\n createListingGroup(input: MergeListingGroupInput): Promise<{ [key: string]: Listing[]; }>;\n\n updateListingGroup(listingGroupId: string | undefined, input: MergeListingGroupInput): Promise<{ [key: string]: Listing[]; }>;\n\n getEmptyListingGroup(): Promise;\n\n /**\n * Auto comp listings preview\n */\n autoCompSettingsPreview(input: AutoCompSettingsPreviewInput): Promise;\n\n /**\n * Auto comp listings preview\n */\n autoGroupListingsPreview(input: AutoGroupListingsPreviewInput): Promise;\n\n /**\n * Auto comp listings preview\n */\n autoGroupListingsPreviewV2(input: AutoGroupListingsPreviewInput): Promise;\n\n /**\n * Auto comp listings preview\n */\n addListingsToListingGroup(input: AddListingsToListingGroupInput): Promise;\n\n getListingGroupCompData(viagogoEventId: number | undefined, listingGroupId: string | undefined): Promise;\n}\n\nexport class ListingGroupClient extends PosClientBase implements IListingGroupClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(configuration: PosClientConfig, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n super(configuration);\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"\";\n }\n\n ungroupListings(listingGroupId: string | undefined): Promise<{ [key: string]: Listing[]; }> {\n let url_ = this.baseUrl + \"/api/ListingGroup/UngroupListings?\";\n if (listingGroupId === null)\n throw new Error(\"The parameter 'listingGroupId' cannot be null.\");\n else if (listingGroupId !== undefined)\n url_ += \"listingGroupId=\" + encodeURIComponent(\"\" + listingGroupId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUngroupListings(_response);\n });\n }\n\n protected processUngroupListings(response: Response): Promise<{ [key: string]: Listing[]; }> {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as { [key: string]: Listing[]; };\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve<{ [key: string]: Listing[]; }>(null as any);\n }\n\n setListingActiveInGroup(listingGroupId: string | undefined, listingId: number | undefined, isActive: boolean | undefined): Promise {\n let url_ = this.baseUrl + \"/api/ListingGroup/SetListingActiveInGroup?\";\n if (listingGroupId === null)\n throw new Error(\"The parameter 'listingGroupId' cannot be null.\");\n else if (listingGroupId !== undefined)\n url_ += \"listingGroupId=\" + encodeURIComponent(\"\" + listingGroupId) + \"&\";\n if (listingId === null)\n throw new Error(\"The parameter 'listingId' cannot be null.\");\n else if (listingId !== undefined)\n url_ += \"listingId=\" + encodeURIComponent(\"\" + listingId) + \"&\";\n if (isActive === null)\n throw new Error(\"The parameter 'isActive' cannot be null.\");\n else if (isActive !== undefined)\n url_ += \"isActive=\" + encodeURIComponent(\"\" + isActive) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processSetListingActiveInGroup(_response);\n });\n }\n\n protected processSetListingActiveInGroup(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n createListingGroup(input: MergeListingGroupInput): Promise<{ [key: string]: Listing[]; }> {\n let url_ = this.baseUrl + \"/api/ListingGroup/CreateListingGroup\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processCreateListingGroup(_response);\n });\n }\n\n protected processCreateListingGroup(response: Response): Promise<{ [key: string]: Listing[]; }> {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as { [key: string]: Listing[]; };\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve<{ [key: string]: Listing[]; }>(null as any);\n }\n\n updateListingGroup(listingGroupId: string | undefined, input: MergeListingGroupInput): Promise<{ [key: string]: Listing[]; }> {\n let url_ = this.baseUrl + \"/api/ListingGroup/UpdateListingGroup?\";\n if (listingGroupId === null)\n throw new Error(\"The parameter 'listingGroupId' cannot be null.\");\n else if (listingGroupId !== undefined)\n url_ += \"listingGroupId=\" + encodeURIComponent(\"\" + listingGroupId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpdateListingGroup(_response);\n });\n }\n\n protected processUpdateListingGroup(response: Response): Promise<{ [key: string]: Listing[]; }> {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as { [key: string]: Listing[]; };\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve<{ [key: string]: Listing[]; }>(null as any);\n }\n\n getEmptyListingGroup(): Promise {\n let url_ = this.baseUrl + \"/api/ListingGroup\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetEmptyListingGroup(_response);\n });\n }\n\n protected processGetEmptyListingGroup(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ListingGroup;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * Auto comp listings preview\n */\n autoCompSettingsPreview(input: AutoCompSettingsPreviewInput): Promise {\n let url_ = this.baseUrl + \"/api/ListingGroup/AutoCompSettingsPreview\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processAutoCompSettingsPreview(_response);\n });\n }\n\n protected processAutoCompSettingsPreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResultWithDataOfAutoCompListingsPreview;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * Auto comp listings preview\n */\n autoGroupListingsPreview(input: AutoGroupListingsPreviewInput): Promise {\n let url_ = this.baseUrl + \"/api/ListingGroup/AutoGroupListingsPreview\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processAutoGroupListingsPreview(_response);\n });\n }\n\n protected processAutoGroupListingsPreview(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResultWithDataOfAutoGroupListingsPreview;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * Auto comp listings preview\n */\n autoGroupListingsPreviewV2(input: AutoGroupListingsPreviewInput): Promise {\n let url_ = this.baseUrl + \"/api/ListingGroup/AutoGroupListingsPreviewV2\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processAutoGroupListingsPreviewV2(_response);\n });\n }\n\n protected processAutoGroupListingsPreviewV2(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResultWithDataOfIEnumerableOfMergeListingGroupInput;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n /**\n * Auto comp listings preview\n */\n addListingsToListingGroup(input: AddListingsToListingGroupInput): Promise {\n let url_ = this.baseUrl + \"/api/ListingGroup/AddListingsToListingGroup\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processAddListingsToListingGroup(_response);\n });\n }\n\n protected processAddListingsToListingGroup(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getListingGroupCompData(viagogoEventId: number | undefined, listingGroupId: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/ListingGroup/GetListingGroupCompData?\";\n if (viagogoEventId === null)\n throw new Error(\"The parameter 'viagogoEventId' cannot be null.\");\n else if (viagogoEventId !== undefined)\n url_ += \"viagogoEventId=\" + encodeURIComponent(\"\" + viagogoEventId) + \"&\";\n if (listingGroupId === null)\n throw new Error(\"The parameter 'listingGroupId' cannot be null.\");\n else if (listingGroupId !== undefined)\n url_ += \"listingGroupId=\" + encodeURIComponent(\"\" + listingGroupId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetListingGroupCompData(_response);\n });\n }\n\n protected processGetListingGroupCompData(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ListingGroupCompData;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface IListingNoteClient {\n\n getAccessibleListingNotes(): Promise;\n}\n\nexport class ListingNoteClient extends PosClientBase implements IListingNoteClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(configuration: PosClientConfig, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n super(configuration);\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"\";\n }\n\n getAccessibleListingNotes(): Promise {\n let url_ = this.baseUrl + \"/api/ListingNote/GetAccessibleListingNotes\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetAccessibleListingNotes(_response);\n });\n }\n\n protected processGetAccessibleListingNotes(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ListingNote[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface ILoginClient {\n\n getLoginContext(returnUrl: string | null | undefined): Promise;\n\n getLoginContextAfterAuthorization(request: LoginRequest): Promise;\n\n setActiveAccount(accountId: string | undefined, impersonatedUserId: string | null | undefined): Promise;\n\n logout(): Promise;\n}\n\nexport class LoginClient extends PosClientBase implements ILoginClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(configuration: PosClientConfig, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n super(configuration);\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"\";\n }\n\n getLoginContext(returnUrl: string | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Login/GetLoginContext?\";\n if (returnUrl !== undefined && returnUrl !== null)\n url_ += \"returnUrl=\" + encodeURIComponent(\"\" + returnUrl) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetLoginContext(_response);\n });\n }\n\n protected processGetLoginContext(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as LoginContext;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getLoginContextAfterAuthorization(request: LoginRequest): Promise {\n let url_ = this.baseUrl + \"/api/Login/GetLoginContextAfterAuthorization\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(request);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetLoginContextAfterAuthorization(_response);\n });\n }\n\n protected processGetLoginContextAfterAuthorization(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as LoginContext;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n setActiveAccount(accountId: string | undefined, impersonatedUserId: string | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Login/SetActiveAccount?\";\n if (accountId === null)\n throw new Error(\"The parameter 'accountId' cannot be null.\");\n else if (accountId !== undefined)\n url_ += \"accountId=\" + encodeURIComponent(\"\" + accountId) + \"&\";\n if (impersonatedUserId !== undefined && impersonatedUserId !== null)\n url_ += \"impersonatedUserId=\" + encodeURIComponent(\"\" + impersonatedUserId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processSetActiveAccount(_response);\n });\n }\n\n protected processSetActiveAccount(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as LoginContext;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n logout(): Promise {\n let url_ = this.baseUrl + \"/api/Login/Logout\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processLogout(_response);\n });\n }\n\n protected processLogout(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as LoginContext;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface IMarketplacePaymentClient {\n\n getMarketplacePayments(query: MarketplacePaymentQuery): Promise;\n\n getMarketplacePaymentById(marketplacePaymentId: number): Promise;\n\n getMonthsContainerMarketplacePayments(query: MarketplacePaymentQuery): Promise;\n\n getPaymentLinesWithSales(marketplacePaymentId: number | undefined): Promise;\n\n convertMarketplacePaymentAmount(marketplacePaymentId: number | undefined, convertedPaymentAmount: number | null | undefined, convertedPaymentCurrencyCode: string | null | undefined): Promise;\n\n addMarketplacePaymentLineToSaleLineItems(marketplacePaymentLineId: number | undefined, saleLineItems: SaleLineItem[]): Promise;\n\n removeMarketplacePaymentLineFromSaleLineItems(marketplacePaymentLineId: number | undefined): Promise;\n\n linkMarketplacePaymentLine(saleId: number | undefined, marketplacePaymentLineId: number | undefined): Promise;\n\n unlinkMarketplacePaymentLine(marketplacePaymentLineId: number | undefined): Promise;\n}\n\nexport class MarketplacePaymentClient extends PosClientBase implements IMarketplacePaymentClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(configuration: PosClientConfig, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n super(configuration);\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"\";\n }\n\n getMarketplacePayments(query: MarketplacePaymentQuery): Promise {\n let url_ = this.baseUrl + \"/api/MarketplacePayment/GetMarketplacePayments\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetMarketplacePayments(_response);\n });\n }\n\n protected processGetMarketplacePayments(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as MarketplaceSalePayment[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getMarketplacePaymentById(marketplacePaymentId: number): Promise {\n let url_ = this.baseUrl + \"/api/MarketplacePayment/GetMarketplacePaymentById\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(marketplacePaymentId);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetMarketplacePaymentById(_response);\n });\n }\n\n protected processGetMarketplacePaymentById(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as MarketplaceSalePayment;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getMonthsContainerMarketplacePayments(query: MarketplacePaymentQuery): Promise {\n let url_ = this.baseUrl + \"/api/MarketplacePayment/GetMonthsContainerMarketplacePayments\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetMonthsContainerMarketplacePayments(_response);\n });\n }\n\n protected processGetMonthsContainerMarketplacePayments(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as MonthContainingMarketplacePaymentsResult[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getPaymentLinesWithSales(marketplacePaymentId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/MarketplacePayment/GetPaymentLinesWithSales?\";\n if (marketplacePaymentId === null)\n throw new Error(\"The parameter 'marketplacePaymentId' cannot be null.\");\n else if (marketplacePaymentId !== undefined)\n url_ += \"marketplacePaymentId=\" + encodeURIComponent(\"\" + marketplacePaymentId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetPaymentLinesWithSales(_response);\n });\n }\n\n protected processGetPaymentLinesWithSales(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as MarketplacePaymentLineWithSaleInfo[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n convertMarketplacePaymentAmount(marketplacePaymentId: number | undefined, convertedPaymentAmount: number | null | undefined, convertedPaymentCurrencyCode: string | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/MarketplacePayment/ConvertMarketplacePaymentAmount?\";\n if (marketplacePaymentId === null)\n throw new Error(\"The parameter 'marketplacePaymentId' cannot be null.\");\n else if (marketplacePaymentId !== undefined)\n url_ += \"marketplacePaymentId=\" + encodeURIComponent(\"\" + marketplacePaymentId) + \"&\";\n if (convertedPaymentAmount !== undefined && convertedPaymentAmount !== null)\n url_ += \"convertedPaymentAmount=\" + encodeURIComponent(\"\" + convertedPaymentAmount) + \"&\";\n if (convertedPaymentCurrencyCode !== undefined && convertedPaymentCurrencyCode !== null)\n url_ += \"convertedPaymentCurrencyCode=\" + encodeURIComponent(\"\" + convertedPaymentCurrencyCode) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processConvertMarketplacePaymentAmount(_response);\n });\n }\n\n protected processConvertMarketplacePaymentAmount(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n addMarketplacePaymentLineToSaleLineItems(marketplacePaymentLineId: number | undefined, saleLineItems: SaleLineItem[]): Promise {\n let url_ = this.baseUrl + \"/api/MarketplacePayment/AddMarketplacePaymentLineToSaleLineItems?\";\n if (marketplacePaymentLineId === null)\n throw new Error(\"The parameter 'marketplacePaymentLineId' cannot be null.\");\n else if (marketplacePaymentLineId !== undefined)\n url_ += \"marketplacePaymentLineId=\" + encodeURIComponent(\"\" + marketplacePaymentLineId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(saleLineItems);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processAddMarketplacePaymentLineToSaleLineItems(_response);\n });\n }\n\n protected processAddMarketplacePaymentLineToSaleLineItems(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n removeMarketplacePaymentLineFromSaleLineItems(marketplacePaymentLineId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/MarketplacePayment/RemoveMarketplacePaymentLineFromSaleLineItems?\";\n if (marketplacePaymentLineId === null)\n throw new Error(\"The parameter 'marketplacePaymentLineId' cannot be null.\");\n else if (marketplacePaymentLineId !== undefined)\n url_ += \"marketplacePaymentLineId=\" + encodeURIComponent(\"\" + marketplacePaymentLineId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processRemoveMarketplacePaymentLineFromSaleLineItems(_response);\n });\n }\n\n protected processRemoveMarketplacePaymentLineFromSaleLineItems(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n linkMarketplacePaymentLine(saleId: number | undefined, marketplacePaymentLineId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/MarketplacePayment/LinkMarketplacePaymentLine?\";\n if (saleId === null)\n throw new Error(\"The parameter 'saleId' cannot be null.\");\n else if (saleId !== undefined)\n url_ += \"saleId=\" + encodeURIComponent(\"\" + saleId) + \"&\";\n if (marketplacePaymentLineId === null)\n throw new Error(\"The parameter 'marketplacePaymentLineId' cannot be null.\");\n else if (marketplacePaymentLineId !== undefined)\n url_ += \"marketplacePaymentLineId=\" + encodeURIComponent(\"\" + marketplacePaymentLineId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processLinkMarketplacePaymentLine(_response);\n });\n }\n\n protected processLinkMarketplacePaymentLine(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n unlinkMarketplacePaymentLine(marketplacePaymentLineId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/MarketplacePayment/UnlinkMarketplacePaymentLine?\";\n if (marketplacePaymentLineId === null)\n throw new Error(\"The parameter 'marketplacePaymentLineId' cannot be null.\");\n else if (marketplacePaymentLineId !== undefined)\n url_ += \"marketplacePaymentLineId=\" + encodeURIComponent(\"\" + marketplacePaymentLineId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUnlinkMarketplacePaymentLine(_response);\n });\n }\n\n protected processUnlinkMarketplacePaymentLine(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface IMoneyClient {\n\n getConvertedMoneyAmount(valuesToConvert: { [key: string]: number; }, toCurrencyCode: string | undefined): Promise;\n\n getAvailableCurrencies(): Promise;\n}\n\nexport class MoneyClient extends PosClientBase implements IMoneyClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(configuration: PosClientConfig, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n super(configuration);\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"\";\n }\n\n getConvertedMoneyAmount(valuesToConvert: { [key: string]: number; }, toCurrencyCode: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Money/GetConvertedMoneyAmount?\";\n if (toCurrencyCode === null)\n throw new Error(\"The parameter 'toCurrencyCode' cannot be null.\");\n else if (toCurrencyCode !== undefined)\n url_ += \"toCurrencyCode=\" + encodeURIComponent(\"\" + toCurrencyCode) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(valuesToConvert);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetConvertedMoneyAmount(_response);\n });\n }\n\n protected processGetConvertedMoneyAmount(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as number;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getAvailableCurrencies(): Promise {\n let url_ = this.baseUrl + \"/api/Money/GetAvailableCurrencies\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetAvailableCurrencies(_response);\n });\n }\n\n protected processGetAvailableCurrencies(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UiCurrency[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface INotificationClient {\n\n getActiveNotifications(): Promise;\n\n getNotification(notificationId: number | undefined): Promise;\n\n dismissNotification(notificationId: number | undefined): Promise;\n}\n\nexport class NotificationClient extends PosClientBase implements INotificationClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(configuration: PosClientConfig, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n super(configuration);\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"\";\n }\n\n getActiveNotifications(): Promise {\n let url_ = this.baseUrl + \"/api/Notification/GetActiveNotifications\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetActiveNotifications(_response);\n });\n }\n\n protected processGetActiveNotifications(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as Notification[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getNotification(notificationId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Notification/GetNotification?\";\n if (notificationId === null)\n throw new Error(\"The parameter 'notificationId' cannot be null.\");\n else if (notificationId !== undefined)\n url_ += \"notificationId=\" + encodeURIComponent(\"\" + notificationId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetNotification(_response);\n });\n }\n\n protected processGetNotification(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as Notification;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n dismissNotification(notificationId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Notification/DismissNotification?\";\n if (notificationId === null)\n throw new Error(\"The parameter 'notificationId' cannot be null.\");\n else if (notificationId !== undefined)\n url_ += \"notificationId=\" + encodeURIComponent(\"\" + notificationId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processDismissNotification(_response);\n });\n }\n\n protected processDismissNotification(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface IPricingClient {\n\n mergeListingGroupPricingSettings(listingGroupId: string | undefined, input: AutoPricingInputs): Promise;\n\n updateListingGroupPricingSettings(listingGroupId: string | undefined, input: ListingGroupAutoPriceSettings): Promise;\n\n getListingGroupAutoPricingSettings(listingGroupId: string | undefined, eventId: number | undefined): Promise;\n\n mergeEventPricingSettings(eventId: number | undefined, input: AutoPricingInputs): Promise;\n\n getEventAutoPricingSettings(eventId: number | undefined): Promise;\n\n getAccountAutoPricingSettings(): Promise;\n\n getEventSeatMapScoreOverrides(eventId: number | undefined, venueConfigId: number | undefined): Promise;\n\n getEventSeatMapScoreOverridesForSellerAccount(): Promise;\n\n getEventSellThroughRates(eventId: number | undefined): Promise;\n\n getListingGroupSellThroughRates(listingGroupId: string | undefined): Promise;\n\n getEventSellThroughRateTargets(viagogoEventId: number | null | undefined, eventMappingId: string | null | undefined): Promise;\n\n setEventSellThroughRateTargets(viagogoEventId: number | null | undefined, eventMappingId: string | null | undefined, sellThroughRateTargets: SellThroughRateHistory[]): Promise;\n\n getAutoPricingStrategies(): Promise;\n\n upsertAutoPricingStrategy(input: AutoPricingSettingsCollection): Promise;\n\n deleteAutoPricingStrategy(autoPricingSettingsCollectionId: number | undefined): Promise;\n\n setEventSeatMapScoreOverride(eventId: number | undefined, eventConfigScoreOverrideId: number | null | undefined, scoreModel: ScoreModel | null | undefined): Promise;\n\n upsertEventSeatMapScoreOverride(input: EventConfigScoreOverride): Promise;\n\n deleteEventSeatMapScoreOverride(eventConfigScoreOverrideId: number | undefined): Promise;\n\n downloadSeatScoreFile(eventId: number | undefined): Promise;\n\n uploadSeatScoreFile(eventId: number | undefined, venueConfigId: number | undefined, eventConfigScoreOverrideId: number | null | undefined, name: string | null | undefined, file: FileParameter | null | undefined): Promise;\n\n resetListingAutoPricingSettingsInGroup(listingGroupId: string | undefined): Promise;\n\n upsertAutoCompSettings(request: UpsertAutoCompSettingsInput): Promise;\n\n getAutoCompSettings(viagogoEventId: number | undefined): Promise;\n\n getListingAutoPricingSettings(listingId: number | undefined, viagogoEventId: number | undefined): Promise;\n\n getVenueMapZoneConfigInfo(viagogoEventId: number | undefined, configId: number | undefined): Promise;\n\n getPricingConfigFromEventIds(eventIds: number[]): Promise;\n\n setVenueZoneSelectedConfigType(viagogoEventId: number | undefined, venueZoneOverrideId: number | null | undefined, venueZoneConfigType: VenueZoneConfigType | null | undefined, setMapAsDefault: boolean | null | undefined): Promise;\n\n getVenueMapZoneInfoOverrides(viagogoEventId: number | undefined, configId: number | undefined): Promise<{ [key: string]: VenueZoneConfigOverride; }>;\n\n getActiveVenueZoneMapSectionGroups(viagogoEventId: number | undefined): Promise<{ [key: string]: SectionSectionGroup; }>;\n\n upsertVenueZoneSectionGroupOverrides(request: UpsertVenueZoneSectionGroupOverridesInput): Promise;\n\n getEventMapConfigMetadata(viagogoEventId: number | undefined): Promise;\n}\n\nexport class PricingClient extends PosClientBase implements IPricingClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(configuration: PosClientConfig, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n super(configuration);\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"\";\n }\n\n mergeListingGroupPricingSettings(listingGroupId: string | undefined, input: AutoPricingInputs): Promise {\n let url_ = this.baseUrl + \"/api/Pricing/MergeListingGroupPricingSettings?\";\n if (listingGroupId === null)\n throw new Error(\"The parameter 'listingGroupId' cannot be null.\");\n else if (listingGroupId !== undefined)\n url_ += \"listingGroupId=\" + encodeURIComponent(\"\" + listingGroupId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processMergeListingGroupPricingSettings(_response);\n });\n }\n\n protected processMergeListingGroupPricingSettings(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n updateListingGroupPricingSettings(listingGroupId: string | undefined, input: ListingGroupAutoPriceSettings): Promise {\n let url_ = this.baseUrl + \"/api/Pricing/UpdateListingGroupPricingSettings?\";\n if (listingGroupId === null)\n throw new Error(\"The parameter 'listingGroupId' cannot be null.\");\n else if (listingGroupId !== undefined)\n url_ += \"listingGroupId=\" + encodeURIComponent(\"\" + listingGroupId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpdateListingGroupPricingSettings(_response);\n });\n }\n\n protected processUpdateListingGroupPricingSettings(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getListingGroupAutoPricingSettings(listingGroupId: string | undefined, eventId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Pricing/GetListingGroupAutoPricingSettings?\";\n if (listingGroupId === null)\n throw new Error(\"The parameter 'listingGroupId' cannot be null.\");\n else if (listingGroupId !== undefined)\n url_ += \"listingGroupId=\" + encodeURIComponent(\"\" + listingGroupId) + \"&\";\n if (eventId === null)\n throw new Error(\"The parameter 'eventId' cannot be null.\");\n else if (eventId !== undefined)\n url_ += \"eventId=\" + encodeURIComponent(\"\" + eventId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetListingGroupAutoPricingSettings(_response);\n });\n }\n\n protected processGetListingGroupAutoPricingSettings(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AutoPricingInputs;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n mergeEventPricingSettings(eventId: number | undefined, input: AutoPricingInputs): Promise {\n let url_ = this.baseUrl + \"/api/Pricing/MergeEventPricingSettings?\";\n if (eventId === null)\n throw new Error(\"The parameter 'eventId' cannot be null.\");\n else if (eventId !== undefined)\n url_ += \"eventId=\" + encodeURIComponent(\"\" + eventId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processMergeEventPricingSettings(_response);\n });\n }\n\n protected processMergeEventPricingSettings(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getEventAutoPricingSettings(eventId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Pricing/GetEventAutoPricingSettings?\";\n if (eventId === null)\n throw new Error(\"The parameter 'eventId' cannot be null.\");\n else if (eventId !== undefined)\n url_ += \"eventId=\" + encodeURIComponent(\"\" + eventId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetEventAutoPricingSettings(_response);\n });\n }\n\n protected processGetEventAutoPricingSettings(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AutoPricingInputs;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getAccountAutoPricingSettings(): Promise {\n let url_ = this.baseUrl + \"/api/Pricing/GetAccountAutoPricingSettings\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetAccountAutoPricingSettings(_response);\n });\n }\n\n protected processGetAccountAutoPricingSettings(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AutoPricingInputs;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getEventSeatMapScoreOverrides(eventId: number | undefined, venueConfigId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Pricing/GetEventSeatMapScoreOverrides?\";\n if (eventId === null)\n throw new Error(\"The parameter 'eventId' cannot be null.\");\n else if (eventId !== undefined)\n url_ += \"eventId=\" + encodeURIComponent(\"\" + eventId) + \"&\";\n if (venueConfigId === null)\n throw new Error(\"The parameter 'venueConfigId' cannot be null.\");\n else if (venueConfigId !== undefined)\n url_ += \"venueConfigId=\" + encodeURIComponent(\"\" + venueConfigId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetEventSeatMapScoreOverrides(_response);\n });\n }\n\n protected processGetEventSeatMapScoreOverrides(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as EventConfigScoreOverride[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getEventSeatMapScoreOverridesForSellerAccount(): Promise {\n let url_ = this.baseUrl + \"/api/Pricing/GetEventSeatMapScoreOverridesForSellerAccount\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetEventSeatMapScoreOverridesForSellerAccount(_response);\n });\n }\n\n protected processGetEventSeatMapScoreOverridesForSellerAccount(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SellerAccountEventConfigScoreOverrides[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getEventSellThroughRates(eventId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Pricing/GetEventSellThroughRates?\";\n if (eventId === null)\n throw new Error(\"The parameter 'eventId' cannot be null.\");\n else if (eventId !== undefined)\n url_ += \"eventId=\" + encodeURIComponent(\"\" + eventId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetEventSellThroughRates(_response);\n });\n }\n\n protected processGetEventSellThroughRates(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SellThroughRateHistory[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getListingGroupSellThroughRates(listingGroupId: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Pricing/GetListingGroupSellThroughRates?\";\n if (listingGroupId === null)\n throw new Error(\"The parameter 'listingGroupId' cannot be null.\");\n else if (listingGroupId !== undefined)\n url_ += \"listingGroupId=\" + encodeURIComponent(\"\" + listingGroupId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetListingGroupSellThroughRates(_response);\n });\n }\n\n protected processGetListingGroupSellThroughRates(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SellThroughRateHistory[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getEventSellThroughRateTargets(viagogoEventId: number | null | undefined, eventMappingId: string | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Pricing/GetEventSellThroughRateTargets?\";\n if (viagogoEventId !== undefined && viagogoEventId !== null)\n url_ += \"viagogoEventId=\" + encodeURIComponent(\"\" + viagogoEventId) + \"&\";\n if (eventMappingId !== undefined && eventMappingId !== null)\n url_ += \"eventMappingId=\" + encodeURIComponent(\"\" + eventMappingId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetEventSellThroughRateTargets(_response);\n });\n }\n\n protected processGetEventSellThroughRateTargets(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SellThroughRateHistory[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n setEventSellThroughRateTargets(viagogoEventId: number | null | undefined, eventMappingId: string | null | undefined, sellThroughRateTargets: SellThroughRateHistory[]): Promise {\n let url_ = this.baseUrl + \"/api/Pricing/SetEventSellThroughRateTargets?\";\n if (viagogoEventId !== undefined && viagogoEventId !== null)\n url_ += \"viagogoEventId=\" + encodeURIComponent(\"\" + viagogoEventId) + \"&\";\n if (eventMappingId !== undefined && eventMappingId !== null)\n url_ += \"eventMappingId=\" + encodeURIComponent(\"\" + eventMappingId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(sellThroughRateTargets);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processSetEventSellThroughRateTargets(_response);\n });\n }\n\n protected processSetEventSellThroughRateTargets(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getAutoPricingStrategies(): Promise {\n let url_ = this.baseUrl + \"/api/Pricing/GetAutoPricingStrategies\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetAutoPricingStrategies(_response);\n });\n }\n\n protected processGetAutoPricingStrategies(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AutoPricingSettingsCollection[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n upsertAutoPricingStrategy(input: AutoPricingSettingsCollection): Promise {\n let url_ = this.baseUrl + \"/api/Pricing/UpsertAutoPricingStrategy\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpsertAutoPricingStrategy(_response);\n });\n }\n\n protected processUpsertAutoPricingStrategy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as number;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n deleteAutoPricingStrategy(autoPricingSettingsCollectionId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Pricing/DeleteAutoPricingStrategy?\";\n if (autoPricingSettingsCollectionId === null)\n throw new Error(\"The parameter 'autoPricingSettingsCollectionId' cannot be null.\");\n else if (autoPricingSettingsCollectionId !== undefined)\n url_ += \"autoPricingSettingsCollectionId=\" + encodeURIComponent(\"\" + autoPricingSettingsCollectionId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processDeleteAutoPricingStrategy(_response);\n });\n }\n\n protected processDeleteAutoPricingStrategy(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n setEventSeatMapScoreOverride(eventId: number | undefined, eventConfigScoreOverrideId: number | null | undefined, scoreModel: ScoreModel | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Pricing/SetEventSeatMapScoreOverride?\";\n if (eventId === null)\n throw new Error(\"The parameter 'eventId' cannot be null.\");\n else if (eventId !== undefined)\n url_ += \"eventId=\" + encodeURIComponent(\"\" + eventId) + \"&\";\n if (eventConfigScoreOverrideId !== undefined && eventConfigScoreOverrideId !== null)\n url_ += \"eventConfigScoreOverrideId=\" + encodeURIComponent(\"\" + eventConfigScoreOverrideId) + \"&\";\n if (scoreModel !== undefined && scoreModel !== null)\n url_ += \"scoreModel=\" + encodeURIComponent(\"\" + scoreModel) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processSetEventSeatMapScoreOverride(_response);\n });\n }\n\n protected processSetEventSeatMapScoreOverride(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n upsertEventSeatMapScoreOverride(input: EventConfigScoreOverride): Promise {\n let url_ = this.baseUrl + \"/api/Pricing/UpsertEventSeatMapScoreOverride\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpsertEventSeatMapScoreOverride(_response);\n });\n }\n\n protected processUpsertEventSeatMapScoreOverride(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as number;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n deleteEventSeatMapScoreOverride(eventConfigScoreOverrideId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Pricing/DeleteEventSeatMapScoreOverride?\";\n if (eventConfigScoreOverrideId === null)\n throw new Error(\"The parameter 'eventConfigScoreOverrideId' cannot be null.\");\n else if (eventConfigScoreOverrideId !== undefined)\n url_ += \"eventConfigScoreOverrideId=\" + encodeURIComponent(\"\" + eventConfigScoreOverrideId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processDeleteEventSeatMapScoreOverride(_response);\n });\n }\n\n protected processDeleteEventSeatMapScoreOverride(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n downloadSeatScoreFile(eventId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Pricing/DownloadSeatScoreFile?\";\n if (eventId === null)\n throw new Error(\"The parameter 'eventId' cannot be null.\");\n else if (eventId !== undefined)\n url_ += \"eventId=\" + encodeURIComponent(\"\" + eventId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/octet-stream\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processDownloadSeatScoreFile(_response);\n });\n }\n\n protected processDownloadSeatScoreFile(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200 || status === 206) {\n const contentDisposition = response.headers ? response.headers.get(\"content-disposition\") : undefined;\n let fileNameMatch = contentDisposition ? /filename\\*=(?:(\\\\?['\"])(.*?)\\1|(?:[^\\s]+'.*?')?([^;\\n]*))/g.exec(contentDisposition) : undefined;\n let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;\n if (fileName) {\n fileName = decodeURIComponent(fileName);\n } else {\n fileNameMatch = contentDisposition ? /filename=\"?([^\"]*?)\"?(;|$)/g.exec(contentDisposition) : undefined;\n fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;\n }\n return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n uploadSeatScoreFile(eventId: number | undefined, venueConfigId: number | undefined, eventConfigScoreOverrideId: number | null | undefined, name: string | null | undefined, file: FileParameter | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Pricing/UploadSeatScoreFile\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = new FormData();\n if (eventId === null || eventId === undefined)\n throw new Error(\"The parameter 'eventId' cannot be null.\");\n else\n content_.append(\"EventId\", eventId.toString());\n if (venueConfigId === null || venueConfigId === undefined)\n throw new Error(\"The parameter 'venueConfigId' cannot be null.\");\n else\n content_.append(\"VenueConfigId\", venueConfigId.toString());\n if (eventConfigScoreOverrideId !== null && eventConfigScoreOverrideId !== undefined)\n content_.append(\"EventConfigScoreOverrideId\", eventConfigScoreOverrideId.toString());\n if (name !== null && name !== undefined)\n content_.append(\"Name\", name.toString());\n if (file !== null && file !== undefined)\n content_.append(\"File\", file.data, file.fileName ? file.fileName : \"File\");\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUploadSeatScoreFile(_response);\n });\n }\n\n protected processUploadSeatScoreFile(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as EventConfigScoreOverride;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n resetListingAutoPricingSettingsInGroup(listingGroupId: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Pricing/ResetListingAutoPricingSettingsInGroup?\";\n if (listingGroupId === null)\n throw new Error(\"The parameter 'listingGroupId' cannot be null.\");\n else if (listingGroupId !== undefined)\n url_ += \"listingGroupId=\" + encodeURIComponent(\"\" + listingGroupId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processResetListingAutoPricingSettingsInGroup(_response);\n });\n }\n\n protected processResetListingAutoPricingSettingsInGroup(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n upsertAutoCompSettings(request: UpsertAutoCompSettingsInput): Promise {\n let url_ = this.baseUrl + \"/api/Pricing/UpsertAutoCompSettings\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(request);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpsertAutoCompSettings(_response);\n });\n }\n\n protected processUpsertAutoCompSettings(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getAutoCompSettings(viagogoEventId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Pricing/GetAutoCompSettings?\";\n if (viagogoEventId === null)\n throw new Error(\"The parameter 'viagogoEventId' cannot be null.\");\n else if (viagogoEventId !== undefined)\n url_ += \"viagogoEventId=\" + encodeURIComponent(\"\" + viagogoEventId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetAutoCompSettings(_response);\n });\n }\n\n protected processGetAutoCompSettings(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AutoCompSettingsResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getListingAutoPricingSettings(listingId: number | undefined, viagogoEventId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Pricing/GetListingAutoPricingSettings?\";\n if (listingId === null)\n throw new Error(\"The parameter 'listingId' cannot be null.\");\n else if (listingId !== undefined)\n url_ += \"listingId=\" + encodeURIComponent(\"\" + listingId) + \"&\";\n if (viagogoEventId === null)\n throw new Error(\"The parameter 'viagogoEventId' cannot be null.\");\n else if (viagogoEventId !== undefined)\n url_ += \"viagogoEventId=\" + encodeURIComponent(\"\" + viagogoEventId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetListingAutoPricingSettings(_response);\n });\n }\n\n protected processGetListingAutoPricingSettings(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ListingDetailsAutoPricingSectionUpdates;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getVenueMapZoneConfigInfo(viagogoEventId: number | undefined, configId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Pricing/GetVenueMapZoneConfigInfo/GetVenueMapZoneConfigInfo?\";\n if (viagogoEventId === null)\n throw new Error(\"The parameter 'viagogoEventId' cannot be null.\");\n else if (viagogoEventId !== undefined)\n url_ += \"viagogoEventId=\" + encodeURIComponent(\"\" + viagogoEventId) + \"&\";\n if (configId === null)\n throw new Error(\"The parameter 'configId' cannot be null.\");\n else if (configId !== undefined)\n url_ += \"configId=\" + encodeURIComponent(\"\" + configId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetVenueMapZoneConfigInfo(_response);\n });\n }\n\n protected processGetVenueMapZoneConfigInfo(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as VenueMapZoneConfigInfo;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getPricingConfigFromEventIds(eventIds: number[]): Promise {\n let url_ = this.baseUrl + \"/api/Pricing/GetPricingConfigFromEventIds\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(eventIds);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetPricingConfigFromEventIds(_response);\n });\n }\n\n protected processGetPricingConfigFromEventIds(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as EventsPricingConfig;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n setVenueZoneSelectedConfigType(viagogoEventId: number | undefined, venueZoneOverrideId: number | null | undefined, venueZoneConfigType: VenueZoneConfigType | null | undefined, setMapAsDefault: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Pricing/SetVenueZoneSelectedConfigType?\";\n if (viagogoEventId === null)\n throw new Error(\"The parameter 'viagogoEventId' cannot be null.\");\n else if (viagogoEventId !== undefined)\n url_ += \"viagogoEventId=\" + encodeURIComponent(\"\" + viagogoEventId) + \"&\";\n if (venueZoneOverrideId !== undefined && venueZoneOverrideId !== null)\n url_ += \"venueZoneOverrideId=\" + encodeURIComponent(\"\" + venueZoneOverrideId) + \"&\";\n if (venueZoneConfigType !== undefined && venueZoneConfigType !== null)\n url_ += \"venueZoneConfigType=\" + encodeURIComponent(\"\" + venueZoneConfigType) + \"&\";\n if (setMapAsDefault !== undefined && setMapAsDefault !== null)\n url_ += \"setMapAsDefault=\" + encodeURIComponent(\"\" + setMapAsDefault) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processSetVenueZoneSelectedConfigType(_response);\n });\n }\n\n protected processSetVenueZoneSelectedConfigType(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getVenueMapZoneInfoOverrides(viagogoEventId: number | undefined, configId: number | undefined): Promise<{ [key: string]: VenueZoneConfigOverride; }> {\n let url_ = this.baseUrl + \"/api/Pricing/GetVenueMapZoneInfoOverrides?\";\n if (viagogoEventId === null)\n throw new Error(\"The parameter 'viagogoEventId' cannot be null.\");\n else if (viagogoEventId !== undefined)\n url_ += \"viagogoEventId=\" + encodeURIComponent(\"\" + viagogoEventId) + \"&\";\n if (configId === null)\n throw new Error(\"The parameter 'configId' cannot be null.\");\n else if (configId !== undefined)\n url_ += \"configId=\" + encodeURIComponent(\"\" + configId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetVenueMapZoneInfoOverrides(_response);\n });\n }\n\n protected processGetVenueMapZoneInfoOverrides(response: Response): Promise<{ [key: string]: VenueZoneConfigOverride; }> {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as { [key: string]: VenueZoneConfigOverride; };\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve<{ [key: string]: VenueZoneConfigOverride; }>(null as any);\n }\n\n getActiveVenueZoneMapSectionGroups(viagogoEventId: number | undefined): Promise<{ [key: string]: SectionSectionGroup; }> {\n let url_ = this.baseUrl + \"/api/Pricing/GetActiveVenueZoneMapSectionGroups?\";\n if (viagogoEventId === null)\n throw new Error(\"The parameter 'viagogoEventId' cannot be null.\");\n else if (viagogoEventId !== undefined)\n url_ += \"viagogoEventId=\" + encodeURIComponent(\"\" + viagogoEventId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetActiveVenueZoneMapSectionGroups(_response);\n });\n }\n\n protected processGetActiveVenueZoneMapSectionGroups(response: Response): Promise<{ [key: string]: SectionSectionGroup; }> {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as { [key: string]: SectionSectionGroup; };\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve<{ [key: string]: SectionSectionGroup; }>(null as any);\n }\n\n upsertVenueZoneSectionGroupOverrides(request: UpsertVenueZoneSectionGroupOverridesInput): Promise {\n let url_ = this.baseUrl + \"/api/Pricing/UpsertVenueZoneSectionGroupOverrides\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(request);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpsertVenueZoneSectionGroupOverrides(_response);\n });\n }\n\n protected processUpsertVenueZoneSectionGroupOverrides(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as number;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getEventMapConfigMetadata(viagogoEventId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Pricing/GetEventMapConfigMetadata?\";\n if (viagogoEventId === null)\n throw new Error(\"The parameter 'viagogoEventId' cannot be null.\");\n else if (viagogoEventId !== undefined)\n url_ += \"viagogoEventId=\" + encodeURIComponent(\"\" + viagogoEventId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetEventMapConfigMetadata(_response);\n });\n }\n\n protected processGetEventMapConfigMetadata(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as EventMapConfigMetadata;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface IPurchaseClient {\n\n getPurchaseOrderByPurchaseOrderId(purchaseOrderId: number | undefined, getCatalog: boolean | undefined): Promise;\n\n getPurchaseOrdersByVendorOrderId(orderId: string | undefined): Promise;\n\n getPurchaseOrders(query: PurchaseOrderQuery, useReadonlyDB: boolean | undefined): Promise;\n\n getPurchaseOrdersWithTicketGroups(query: PurchaseOrderQuery): Promise;\n\n getTicketGroupsForEvents(query: PurchaseOrderQuery): Promise<{ [key: string]: PurchaseOrderTicketGroup[]; }>;\n\n getAccessibleVendors(getDeliveryOverride: boolean | undefined, getVendorAccountsCount: boolean | undefined): Promise;\n\n getAccessibleAccessControlProviders(): Promise;\n\n getAccessibleVendorAccounts(input: ValueTupleOfISetOfIntegerAndISetOfGuid, searchText: string | null | undefined, take: number | null | undefined, skip: number | null | undefined): Promise;\n\n getVendorAccountDetails(purchaseOrderVendorAccountId: string | undefined): Promise;\n\n getPurchaseOrderIdsUsingOrderId(orderId: string | undefined): Promise;\n\n getIsPurchasingIdsInUse(orderId: string | undefined, purchaseOrderVendorId: number | null | undefined): Promise;\n\n getMonthsContainerPurchaseOrders(query: PurchaseOrderQuery): Promise;\n\n getTimePeriodContainerPurchaseOrders(query: PurchaseOrderQuery, timePeriodType: TimePeriodType | undefined): Promise;\n\n insertPurchaseOrder(input: PurchaseOrderDetailsInput, isManual: boolean | undefined): Promise;\n\n downloadPurchaseFileTemplate(includeEventIdFields: boolean | undefined): Promise;\n\n updatePurchaseOrder(input: PurchaseOrderDetailsInput): Promise;\n\n updatePurchasesQualityControlState(inputs: ValueTupleOfISetOfLongAndPosFieldOfNullableQualityControlState): Promise;\n\n getVendor(vendorId: number | undefined): Promise;\n\n mergeVendor(vendor: PurchaseVendor): Promise;\n\n deleteVendor(vendorId: number | undefined): Promise;\n\n mergeVendorAccount(vendorAccount: PurchaseVendorAccountDetails): Promise;\n\n deleteVendorAccount(vendorAccountId: string | undefined): Promise;\n\n getAllCurrencyConversionOverride(): Promise;\n\n insertCurrencyConversionOverride(conversionOverrideRequest: CurrencyConversionOverrideRequest): Promise;\n\n updateCurrencyConversionOverride(conversionOverrideRequest: CurrencyConversionOverrideRequest): Promise;\n\n deleteCurrencyConversionOverride(currencyConversionOverrideId: number | undefined): Promise;\n\n getAccessiblePurchasePaymentMethods(): Promise;\n\n getPurchasePaymentMethodsByName(paymentMethodName: string | undefined): Promise;\n\n insertPurchasePaymentMethod(input: PurchasePaymentMethod): Promise;\n\n updatePurchasePaymentMethod(input: PurchasePaymentMethod): Promise;\n\n deletePurchasePaymentMethod(purchasePaymentMethodId: number): Promise;\n\n cancelPurchaseOrder(purchaseOrderId: number | undefined, rejectSale: boolean | null | undefined, saleCancellationReason: SaleCancellationReason | null | undefined): Promise;\n\n voidPurchaseOrder(purchaseOrderId: number | undefined): Promise;\n\n restorePurchaseOrder(purchaseOrderId: number | undefined): Promise;\n\n getDeliveryOverrideForNewTicketGroup(input: ValueTupleOfNullableIntegerAndNullableIntegerAndNullableGuidAndBoolean): Promise;\n\n mergePurchaseEventOverrides(purchaseEventOverrides: PurchaseEventOverride[], viagogoEventId: number | undefined): Promise;\n\n getPurchaseEventOverrides(viagogoEventId: number | undefined): Promise;\n\n exportPurchases(query: PurchaseOrderQuery, selectedTicketGroupsOnly: boolean | undefined): Promise;\n\n downloadMergedUserDocumentsPdf(ticketGroupId: number | undefined): Promise;\n}\n\nexport class PurchaseClient extends PosClientBase implements IPurchaseClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(configuration: PosClientConfig, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n super(configuration);\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"\";\n }\n\n getPurchaseOrderByPurchaseOrderId(purchaseOrderId: number | undefined, getCatalog: boolean | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Purchase/GetPurchaseOrderByPurchaseOrderId?\";\n if (purchaseOrderId === null)\n throw new Error(\"The parameter 'purchaseOrderId' cannot be null.\");\n else if (purchaseOrderId !== undefined)\n url_ += \"purchaseOrderId=\" + encodeURIComponent(\"\" + purchaseOrderId) + \"&\";\n if (getCatalog === null)\n throw new Error(\"The parameter 'getCatalog' cannot be null.\");\n else if (getCatalog !== undefined)\n url_ += \"getCatalog=\" + encodeURIComponent(\"\" + getCatalog) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetPurchaseOrderByPurchaseOrderId(_response);\n });\n }\n\n protected processGetPurchaseOrderByPurchaseOrderId(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PurchaseOrderDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getPurchaseOrdersByVendorOrderId(orderId: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Purchase/GetPurchaseOrdersByVendorOrderId?\";\n if (orderId === null)\n throw new Error(\"The parameter 'orderId' cannot be null.\");\n else if (orderId !== undefined)\n url_ += \"orderId=\" + encodeURIComponent(\"\" + orderId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetPurchaseOrdersByVendorOrderId(_response);\n });\n }\n\n protected processGetPurchaseOrdersByVendorOrderId(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PurchaseOrderDetails[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getPurchaseOrders(query: PurchaseOrderQuery, useReadonlyDB: boolean | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Purchase/GetPurchaseOrders?\";\n if (useReadonlyDB === null)\n throw new Error(\"The parameter 'useReadonlyDB' cannot be null.\");\n else if (useReadonlyDB !== undefined)\n url_ += \"useReadonlyDB=\" + encodeURIComponent(\"\" + useReadonlyDB) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetPurchaseOrders(_response);\n });\n }\n\n protected processGetPurchaseOrders(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PurchaseOrder[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getPurchaseOrdersWithTicketGroups(query: PurchaseOrderQuery): Promise {\n let url_ = this.baseUrl + \"/api/Purchase/GetPurchaseOrdersWithTicketGroups\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetPurchaseOrdersWithTicketGroups(_response);\n });\n }\n\n protected processGetPurchaseOrdersWithTicketGroups(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PurchaseOrderTicketGroup[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getTicketGroupsForEvents(query: PurchaseOrderQuery): Promise<{ [key: string]: PurchaseOrderTicketGroup[]; }> {\n let url_ = this.baseUrl + \"/api/Purchase/GetTicketGroupsForEvents\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetTicketGroupsForEvents(_response);\n });\n }\n\n protected processGetTicketGroupsForEvents(response: Response): Promise<{ [key: string]: PurchaseOrderTicketGroup[]; }> {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as { [key: string]: PurchaseOrderTicketGroup[]; };\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve<{ [key: string]: PurchaseOrderTicketGroup[]; }>(null as any);\n }\n\n getAccessibleVendors(getDeliveryOverride: boolean | undefined, getVendorAccountsCount: boolean | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Purchase/GetAccessibleVendors?\";\n if (getDeliveryOverride === null)\n throw new Error(\"The parameter 'getDeliveryOverride' cannot be null.\");\n else if (getDeliveryOverride !== undefined)\n url_ += \"getDeliveryOverride=\" + encodeURIComponent(\"\" + getDeliveryOverride) + \"&\";\n if (getVendorAccountsCount === null)\n throw new Error(\"The parameter 'getVendorAccountsCount' cannot be null.\");\n else if (getVendorAccountsCount !== undefined)\n url_ += \"getVendorAccountsCount=\" + encodeURIComponent(\"\" + getVendorAccountsCount) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetAccessibleVendors(_response);\n });\n }\n\n protected processGetAccessibleVendors(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PurchaseVendor[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getAccessibleAccessControlProviders(): Promise {\n let url_ = this.baseUrl + \"/api/Purchase/GetAccessibleAccessControlProviders\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetAccessibleAccessControlProviders(_response);\n });\n }\n\n protected processGetAccessibleAccessControlProviders(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AccessControlProvider[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getAccessibleVendorAccounts(input: ValueTupleOfISetOfIntegerAndISetOfGuid, searchText: string | null | undefined, take: number | null | undefined, skip: number | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Purchase/GetAccessibleVendorAccounts?\";\n if (searchText !== undefined && searchText !== null)\n url_ += \"searchText=\" + encodeURIComponent(\"\" + searchText) + \"&\";\n if (take !== undefined && take !== null)\n url_ += \"take=\" + encodeURIComponent(\"\" + take) + \"&\";\n if (skip !== undefined && skip !== null)\n url_ += \"skip=\" + encodeURIComponent(\"\" + skip) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetAccessibleVendorAccounts(_response);\n });\n }\n\n protected processGetAccessibleVendorAccounts(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PurchaseVendorAccount[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getVendorAccountDetails(purchaseOrderVendorAccountId: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Purchase/GetVendorAccountDetails?\";\n if (purchaseOrderVendorAccountId === null)\n throw new Error(\"The parameter 'purchaseOrderVendorAccountId' cannot be null.\");\n else if (purchaseOrderVendorAccountId !== undefined)\n url_ += \"purchaseOrderVendorAccountId=\" + encodeURIComponent(\"\" + purchaseOrderVendorAccountId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetVendorAccountDetails(_response);\n });\n }\n\n protected processGetVendorAccountDetails(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PurchaseVendorAccountDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getPurchaseOrderIdsUsingOrderId(orderId: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Purchase/GetPurchaseOrderIdsUsingOrderId?\";\n if (orderId === null)\n throw new Error(\"The parameter 'orderId' cannot be null.\");\n else if (orderId !== undefined)\n url_ += \"orderId=\" + encodeURIComponent(\"\" + orderId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetPurchaseOrderIdsUsingOrderId(_response);\n });\n }\n\n protected processGetPurchaseOrderIdsUsingOrderId(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as number[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getIsPurchasingIdsInUse(orderId: string | undefined, purchaseOrderVendorId: number | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Purchase/GetIsPurchasingIdsInUse?\";\n if (orderId === null)\n throw new Error(\"The parameter 'orderId' cannot be null.\");\n else if (orderId !== undefined)\n url_ += \"orderId=\" + encodeURIComponent(\"\" + orderId) + \"&\";\n if (purchaseOrderVendorId !== undefined && purchaseOrderVendorId !== null)\n url_ += \"purchaseOrderVendorId=\" + encodeURIComponent(\"\" + purchaseOrderVendorId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetIsPurchasingIdsInUse(_response);\n });\n }\n\n protected processGetIsPurchasingIdsInUse(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PurchasingIdInUseResultType;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getMonthsContainerPurchaseOrders(query: PurchaseOrderQuery): Promise {\n let url_ = this.baseUrl + \"/api/Purchase/GetMonthsContainerPurchaseOrders\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetMonthsContainerPurchaseOrders(_response);\n });\n }\n\n protected processGetMonthsContainerPurchaseOrders(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as MonthContainingPurchaseOrdersResult[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getTimePeriodContainerPurchaseOrders(query: PurchaseOrderQuery, timePeriodType: TimePeriodType | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Purchase/GetTimePeriodContainerPurchaseOrders?\";\n if (timePeriodType === null)\n throw new Error(\"The parameter 'timePeriodType' cannot be null.\");\n else if (timePeriodType !== undefined)\n url_ += \"timePeriodType=\" + encodeURIComponent(\"\" + timePeriodType) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetTimePeriodContainerPurchaseOrders(_response);\n });\n }\n\n protected processGetTimePeriodContainerPurchaseOrders(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as TimePeriodContainingPurchaseOrderResult[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n insertPurchaseOrder(input: PurchaseOrderDetailsInput, isManual: boolean | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Purchase/InsertPurchaseOrder?\";\n if (isManual === null)\n throw new Error(\"The parameter 'isManual' cannot be null.\");\n else if (isManual !== undefined)\n url_ += \"isManual=\" + encodeURIComponent(\"\" + isManual) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processInsertPurchaseOrder(_response);\n });\n }\n\n protected processInsertPurchaseOrder(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n downloadPurchaseFileTemplate(includeEventIdFields: boolean | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Purchase/DownloadPurchaseFileTemplate?\";\n if (includeEventIdFields === null)\n throw new Error(\"The parameter 'includeEventIdFields' cannot be null.\");\n else if (includeEventIdFields !== undefined)\n url_ += \"includeEventIdFields=\" + encodeURIComponent(\"\" + includeEventIdFields) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/octet-stream\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processDownloadPurchaseFileTemplate(_response);\n });\n }\n\n protected processDownloadPurchaseFileTemplate(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200 || status === 206) {\n const contentDisposition = response.headers ? response.headers.get(\"content-disposition\") : undefined;\n let fileNameMatch = contentDisposition ? /filename\\*=(?:(\\\\?['\"])(.*?)\\1|(?:[^\\s]+'.*?')?([^;\\n]*))/g.exec(contentDisposition) : undefined;\n let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;\n if (fileName) {\n fileName = decodeURIComponent(fileName);\n } else {\n fileNameMatch = contentDisposition ? /filename=\"?([^\"]*?)\"?(;|$)/g.exec(contentDisposition) : undefined;\n fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;\n }\n return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n updatePurchaseOrder(input: PurchaseOrderDetailsInput): Promise {\n let url_ = this.baseUrl + \"/api/Purchase/UpdatePurchaseOrder\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpdatePurchaseOrder(_response);\n });\n }\n\n protected processUpdatePurchaseOrder(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n updatePurchasesQualityControlState(inputs: ValueTupleOfISetOfLongAndPosFieldOfNullableQualityControlState): Promise {\n let url_ = this.baseUrl + \"/api/Purchase/UpdatePurchasesQualityControlState\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(inputs);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpdatePurchasesQualityControlState(_response);\n });\n }\n\n protected processUpdatePurchasesQualityControlState(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getVendor(vendorId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Purchase/GetVendor?\";\n if (vendorId === null)\n throw new Error(\"The parameter 'vendorId' cannot be null.\");\n else if (vendorId !== undefined)\n url_ += \"vendorId=\" + encodeURIComponent(\"\" + vendorId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetVendor(_response);\n });\n }\n\n protected processGetVendor(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PurchaseVendor;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n mergeVendor(vendor: PurchaseVendor): Promise {\n let url_ = this.baseUrl + \"/api/Purchase/MergeVendor\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(vendor);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processMergeVendor(_response);\n });\n }\n\n protected processMergeVendor(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as number;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n deleteVendor(vendorId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Purchase/DeleteVendor?\";\n if (vendorId === null)\n throw new Error(\"The parameter 'vendorId' cannot be null.\");\n else if (vendorId !== undefined)\n url_ += \"vendorId=\" + encodeURIComponent(\"\" + vendorId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processDeleteVendor(_response);\n });\n }\n\n protected processDeleteVendor(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n mergeVendorAccount(vendorAccount: PurchaseVendorAccountDetails): Promise {\n let url_ = this.baseUrl + \"/api/Purchase/MergeVendorAccount\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(vendorAccount);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processMergeVendorAccount(_response);\n });\n }\n\n protected processMergeVendorAccount(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as string;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n deleteVendorAccount(vendorAccountId: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Purchase/DeleteVendorAccount?\";\n if (vendorAccountId === null)\n throw new Error(\"The parameter 'vendorAccountId' cannot be null.\");\n else if (vendorAccountId !== undefined)\n url_ += \"vendorAccountId=\" + encodeURIComponent(\"\" + vendorAccountId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processDeleteVendorAccount(_response);\n });\n }\n\n protected processDeleteVendorAccount(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getAllCurrencyConversionOverride(): Promise {\n let url_ = this.baseUrl + \"/api/Purchase/GetAllCurrencyConversionOverride\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetAllCurrencyConversionOverride(_response);\n });\n }\n\n protected processGetAllCurrencyConversionOverride(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as CurrencyConversionOverride[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n insertCurrencyConversionOverride(conversionOverrideRequest: CurrencyConversionOverrideRequest): Promise {\n let url_ = this.baseUrl + \"/api/Purchase/InsertCurrencyConversionOverride\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(conversionOverrideRequest);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processInsertCurrencyConversionOverride(_response);\n });\n }\n\n protected processInsertCurrencyConversionOverride(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as number;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n updateCurrencyConversionOverride(conversionOverrideRequest: CurrencyConversionOverrideRequest): Promise {\n let url_ = this.baseUrl + \"/api/Purchase/UpdateCurrencyConversionOverride\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(conversionOverrideRequest);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpdateCurrencyConversionOverride(_response);\n });\n }\n\n protected processUpdateCurrencyConversionOverride(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n deleteCurrencyConversionOverride(currencyConversionOverrideId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Purchase/DeleteCurrencyConversionOverride?\";\n if (currencyConversionOverrideId === null)\n throw new Error(\"The parameter 'currencyConversionOverrideId' cannot be null.\");\n else if (currencyConversionOverrideId !== undefined)\n url_ += \"currencyConversionOverrideId=\" + encodeURIComponent(\"\" + currencyConversionOverrideId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processDeleteCurrencyConversionOverride(_response);\n });\n }\n\n protected processDeleteCurrencyConversionOverride(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getAccessiblePurchasePaymentMethods(): Promise {\n let url_ = this.baseUrl + \"/api/Purchase/GetAccessiblePurchasePaymentMethods\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetAccessiblePurchasePaymentMethods(_response);\n });\n }\n\n protected processGetAccessiblePurchasePaymentMethods(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PurchasePaymentMethod[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getPurchasePaymentMethodsByName(paymentMethodName: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Purchase/GetPurchasePaymentMethodsByName?\";\n if (paymentMethodName === null)\n throw new Error(\"The parameter 'paymentMethodName' cannot be null.\");\n else if (paymentMethodName !== undefined)\n url_ += \"paymentMethodName=\" + encodeURIComponent(\"\" + paymentMethodName) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetPurchasePaymentMethodsByName(_response);\n });\n }\n\n protected processGetPurchasePaymentMethodsByName(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PurchasePaymentMethod[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n insertPurchasePaymentMethod(input: PurchasePaymentMethod): Promise {\n let url_ = this.baseUrl + \"/api/Purchase/InsertPurchasePaymentMethod\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processInsertPurchasePaymentMethod(_response);\n });\n }\n\n protected processInsertPurchasePaymentMethod(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as number;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n updatePurchasePaymentMethod(input: PurchasePaymentMethod): Promise {\n let url_ = this.baseUrl + \"/api/Purchase/UpdatePurchasePaymentMethod\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpdatePurchasePaymentMethod(_response);\n });\n }\n\n protected processUpdatePurchasePaymentMethod(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n deletePurchasePaymentMethod(purchasePaymentMethodId: number): Promise {\n let url_ = this.baseUrl + \"/api/Purchase/DeletePurchasePaymentMethod\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(purchasePaymentMethodId);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processDeletePurchasePaymentMethod(_response);\n });\n }\n\n protected processDeletePurchasePaymentMethod(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n cancelPurchaseOrder(purchaseOrderId: number | undefined, rejectSale: boolean | null | undefined, saleCancellationReason: SaleCancellationReason | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Purchase/CancelPurchaseOrder?\";\n if (purchaseOrderId === null)\n throw new Error(\"The parameter 'purchaseOrderId' cannot be null.\");\n else if (purchaseOrderId !== undefined)\n url_ += \"purchaseOrderId=\" + encodeURIComponent(\"\" + purchaseOrderId) + \"&\";\n if (rejectSale !== undefined && rejectSale !== null)\n url_ += \"rejectSale=\" + encodeURIComponent(\"\" + rejectSale) + \"&\";\n if (saleCancellationReason !== undefined && saleCancellationReason !== null)\n url_ += \"saleCancellationReason=\" + encodeURIComponent(\"\" + saleCancellationReason) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processCancelPurchaseOrder(_response);\n });\n }\n\n protected processCancelPurchaseOrder(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n voidPurchaseOrder(purchaseOrderId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Purchase/VoidPurchaseOrder?\";\n if (purchaseOrderId === null)\n throw new Error(\"The parameter 'purchaseOrderId' cannot be null.\");\n else if (purchaseOrderId !== undefined)\n url_ += \"purchaseOrderId=\" + encodeURIComponent(\"\" + purchaseOrderId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processVoidPurchaseOrder(_response);\n });\n }\n\n protected processVoidPurchaseOrder(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n restorePurchaseOrder(purchaseOrderId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Purchase/RestorePurchaseOrder?\";\n if (purchaseOrderId === null)\n throw new Error(\"The parameter 'purchaseOrderId' cannot be null.\");\n else if (purchaseOrderId !== undefined)\n url_ += \"purchaseOrderId=\" + encodeURIComponent(\"\" + purchaseOrderId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processRestorePurchaseOrder(_response);\n });\n }\n\n protected processRestorePurchaseOrder(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getDeliveryOverrideForNewTicketGroup(input: ValueTupleOfNullableIntegerAndNullableIntegerAndNullableGuidAndBoolean): Promise {\n let url_ = this.baseUrl + \"/api/Purchase/GetDeliveryOverrideForNewTicketGroup\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetDeliveryOverrideForNewTicketGroup(_response);\n });\n }\n\n protected processGetDeliveryOverrideForNewTicketGroup(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DeliveryOverride;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n mergePurchaseEventOverrides(purchaseEventOverrides: PurchaseEventOverride[], viagogoEventId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Purchase?\";\n if (viagogoEventId === null)\n throw new Error(\"The parameter 'viagogoEventId' cannot be null.\");\n else if (viagogoEventId !== undefined)\n url_ += \"viagogoEventId=\" + encodeURIComponent(\"\" + viagogoEventId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(purchaseEventOverrides);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processMergePurchaseEventOverrides(_response);\n });\n }\n\n protected processMergePurchaseEventOverrides(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getPurchaseEventOverrides(viagogoEventId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Purchase/GetPurchaseEventOverrides?\";\n if (viagogoEventId === null)\n throw new Error(\"The parameter 'viagogoEventId' cannot be null.\");\n else if (viagogoEventId !== undefined)\n url_ += \"viagogoEventId=\" + encodeURIComponent(\"\" + viagogoEventId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetPurchaseEventOverrides(_response);\n });\n }\n\n protected processGetPurchaseEventOverrides(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PurchaseEventOverride[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n exportPurchases(query: PurchaseOrderQuery, selectedTicketGroupsOnly: boolean | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Purchase/ExportPurchases?\";\n if (selectedTicketGroupsOnly === null)\n throw new Error(\"The parameter 'selectedTicketGroupsOnly' cannot be null.\");\n else if (selectedTicketGroupsOnly !== undefined)\n url_ += \"selectedTicketGroupsOnly=\" + encodeURIComponent(\"\" + selectedTicketGroupsOnly) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/octet-stream\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processExportPurchases(_response);\n });\n }\n\n protected processExportPurchases(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200 || status === 206) {\n const contentDisposition = response.headers ? response.headers.get(\"content-disposition\") : undefined;\n let fileNameMatch = contentDisposition ? /filename\\*=(?:(\\\\?['\"])(.*?)\\1|(?:[^\\s]+'.*?')?([^;\\n]*))/g.exec(contentDisposition) : undefined;\n let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;\n if (fileName) {\n fileName = decodeURIComponent(fileName);\n } else {\n fileNameMatch = contentDisposition ? /filename=\"?([^\"]*?)\"?(;|$)/g.exec(contentDisposition) : undefined;\n fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;\n }\n return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n downloadMergedUserDocumentsPdf(ticketGroupId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Purchase/DownloadMergedUserDocumentsPdf?\";\n if (ticketGroupId === null)\n throw new Error(\"The parameter 'ticketGroupId' cannot be null.\");\n else if (ticketGroupId !== undefined)\n url_ += \"ticketGroupId=\" + encodeURIComponent(\"\" + ticketGroupId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/octet-stream\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processDownloadMergedUserDocumentsPdf(_response);\n });\n }\n\n protected processDownloadMergedUserDocumentsPdf(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200 || status === 206) {\n const contentDisposition = response.headers ? response.headers.get(\"content-disposition\") : undefined;\n let fileNameMatch = contentDisposition ? /filename\\*=(?:(\\\\?['\"])(.*?)\\1|(?:[^\\s]+'.*?')?([^;\\n]*))/g.exec(contentDisposition) : undefined;\n let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;\n if (fileName) {\n fileName = decodeURIComponent(fileName);\n } else {\n fileNameMatch = contentDisposition ? /filename=\"?([^\"]*?)\"?(;|$)/g.exec(contentDisposition) : undefined;\n fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;\n }\n return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface IReportClient {\n\n getAvailableInventoryReportConfig(): Promise;\n\n upsertInventoryReportConfig(reportConfig: ReportConfigOfListingQueryAndReportWidgetTypesInventory): Promise;\n\n upsertInventoryReportConfigOverride(reportConfigId: number | undefined, reportConfigOverride: ReportConfigOverrideOfListingQuery): Promise;\n\n getAvailableSaleReportConfig(): Promise;\n\n upsertSaleReportConfig(reportConfig: ReportConfigOfSaleQueryAndReportWidgetTypesSale): Promise;\n\n upsertSaleReportConfigOverride(reportConfigId: number | undefined, reportConfigOverride: ReportConfigOverrideOfSaleQuery): Promise;\n\n deleteReportConfig(reportConfigId: number | undefined): Promise;\n\n getListingReportMetrics(input: ListingReportMetricsRequest, maxResultsize: number | null | undefined): Promise;\n\n getSaleReportMetrics(input: SaleReportMetricsRequest, maxResultsize: number | null | undefined): Promise;\n\n getReportSnapshotInfos(reportConfigId: number | undefined): Promise;\n\n downloadSaleReportMetrics(input: SaleReportMetricsDownloadRequest): Promise;\n\n downloadListingReportMetrics(input: ListingReportMetricsDownloadRequest): Promise;\n}\n\nexport class ReportClient extends PosClientBase implements IReportClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(configuration: PosClientConfig, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n super(configuration);\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"\";\n }\n\n getAvailableInventoryReportConfig(): Promise {\n let url_ = this.baseUrl + \"/api/Report/GetAvailableInventoryReportConfig\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetAvailableInventoryReportConfig(_response);\n });\n }\n\n protected processGetAvailableInventoryReportConfig(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReportConfigOfListingQueryAndReportWidgetTypesInventory[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n upsertInventoryReportConfig(reportConfig: ReportConfigOfListingQueryAndReportWidgetTypesInventory): Promise {\n let url_ = this.baseUrl + \"/api/Report/UpsertInventoryReportConfig\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(reportConfig);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpsertInventoryReportConfig(_response);\n });\n }\n\n protected processUpsertInventoryReportConfig(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as number;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n upsertInventoryReportConfigOverride(reportConfigId: number | undefined, reportConfigOverride: ReportConfigOverrideOfListingQuery): Promise {\n let url_ = this.baseUrl + \"/api/Report/UpsertInventoryReportConfigOverride?\";\n if (reportConfigId === null)\n throw new Error(\"The parameter 'reportConfigId' cannot be null.\");\n else if (reportConfigId !== undefined)\n url_ += \"reportConfigId=\" + encodeURIComponent(\"\" + reportConfigId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(reportConfigOverride);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpsertInventoryReportConfigOverride(_response);\n });\n }\n\n protected processUpsertInventoryReportConfigOverride(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getAvailableSaleReportConfig(): Promise {\n let url_ = this.baseUrl + \"/api/Report/GetAvailableSaleReportConfig\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetAvailableSaleReportConfig(_response);\n });\n }\n\n protected processGetAvailableSaleReportConfig(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReportConfigOfSaleQueryAndReportWidgetTypesSale[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n upsertSaleReportConfig(reportConfig: ReportConfigOfSaleQueryAndReportWidgetTypesSale): Promise {\n let url_ = this.baseUrl + \"/api/Report/UpsertSaleReportConfig\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(reportConfig);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpsertSaleReportConfig(_response);\n });\n }\n\n protected processUpsertSaleReportConfig(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as number;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n upsertSaleReportConfigOverride(reportConfigId: number | undefined, reportConfigOverride: ReportConfigOverrideOfSaleQuery): Promise {\n let url_ = this.baseUrl + \"/api/Report/UpsertSaleReportConfigOverride?\";\n if (reportConfigId === null)\n throw new Error(\"The parameter 'reportConfigId' cannot be null.\");\n else if (reportConfigId !== undefined)\n url_ += \"reportConfigId=\" + encodeURIComponent(\"\" + reportConfigId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(reportConfigOverride);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpsertSaleReportConfigOverride(_response);\n });\n }\n\n protected processUpsertSaleReportConfigOverride(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n deleteReportConfig(reportConfigId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Report/DeleteReportConfig?\";\n if (reportConfigId === null)\n throw new Error(\"The parameter 'reportConfigId' cannot be null.\");\n else if (reportConfigId !== undefined)\n url_ += \"reportConfigId=\" + encodeURIComponent(\"\" + reportConfigId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processDeleteReportConfig(_response);\n });\n }\n\n protected processDeleteReportConfig(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getListingReportMetrics(input: ListingReportMetricsRequest, maxResultsize: number | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Report/GetListingReportMetrics?\";\n if (maxResultsize !== undefined && maxResultsize !== null)\n url_ += \"maxResultsize=\" + encodeURIComponent(\"\" + maxResultsize) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetListingReportMetrics(_response);\n });\n }\n\n protected processGetListingReportMetrics(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ListingReportMetricsResponse;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getSaleReportMetrics(input: SaleReportMetricsRequest, maxResultsize: number | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Report/GetSaleReportMetrics?\";\n if (maxResultsize !== undefined && maxResultsize !== null)\n url_ += \"maxResultsize=\" + encodeURIComponent(\"\" + maxResultsize) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetSaleReportMetrics(_response);\n });\n }\n\n protected processGetSaleReportMetrics(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SaleReportMetricsResponse;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getReportSnapshotInfos(reportConfigId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Report/GetReportSnapshotInfos?\";\n if (reportConfigId === null)\n throw new Error(\"The parameter 'reportConfigId' cannot be null.\");\n else if (reportConfigId !== undefined)\n url_ += \"reportConfigId=\" + encodeURIComponent(\"\" + reportConfigId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetReportSnapshotInfos(_response);\n });\n }\n\n protected processGetReportSnapshotInfos(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReportSnapshotInfo[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n downloadSaleReportMetrics(input: SaleReportMetricsDownloadRequest): Promise {\n let url_ = this.baseUrl + \"/api/Report/DownloadSaleReportMetrics\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/octet-stream\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processDownloadSaleReportMetrics(_response);\n });\n }\n\n protected processDownloadSaleReportMetrics(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200 || status === 206) {\n const contentDisposition = response.headers ? response.headers.get(\"content-disposition\") : undefined;\n let fileNameMatch = contentDisposition ? /filename\\*=(?:(\\\\?['\"])(.*?)\\1|(?:[^\\s]+'.*?')?([^;\\n]*))/g.exec(contentDisposition) : undefined;\n let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;\n if (fileName) {\n fileName = decodeURIComponent(fileName);\n } else {\n fileNameMatch = contentDisposition ? /filename=\"?([^\"]*?)\"?(;|$)/g.exec(contentDisposition) : undefined;\n fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;\n }\n return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n downloadListingReportMetrics(input: ListingReportMetricsDownloadRequest): Promise {\n let url_ = this.baseUrl + \"/api/Report/DownloadListingReportMetrics\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/octet-stream\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processDownloadListingReportMetrics(_response);\n });\n }\n\n protected processDownloadListingReportMetrics(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200 || status === 206) {\n const contentDisposition = response.headers ? response.headers.get(\"content-disposition\") : undefined;\n let fileNameMatch = contentDisposition ? /filename\\*=(?:(\\\\?['\"])(.*?)\\1|(?:[^\\s]+'.*?')?([^;\\n]*))/g.exec(contentDisposition) : undefined;\n let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;\n if (fileName) {\n fileName = decodeURIComponent(fileName);\n } else {\n fileNameMatch = contentDisposition ? /filename=\"?([^\"]*?)\"?(;|$)/g.exec(contentDisposition) : undefined;\n fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;\n }\n return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface IReportV2ConfigClient {\n\n getAvailableInventoryReportConfig(): Promise;\n\n upsertInventoryReportConfig(reportConfig: ReportV2ConfigOfInventoryReportV2RequestAndReportWidgetTypesInventory): Promise;\n\n getAvailableSaleReportConfig(): Promise;\n\n upsertSaleReportConfig(reportConfig: ReportV2ConfigOfSalesReportV2RequestAndReportWidgetTypesSale): Promise;\n\n deleteReportConfig(reportConfigId: number | undefined): Promise;\n\n getAvailableCommissionReportConfig(): Promise;\n\n upsertReportConfigOverride(reportConfigId: number | undefined, reportConfigOverride: ReportV2ConfigOverride): Promise;\n}\n\nexport class ReportV2ConfigClient extends PosClientBase implements IReportV2ConfigClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(configuration: PosClientConfig, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n super(configuration);\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"\";\n }\n\n getAvailableInventoryReportConfig(): Promise {\n let url_ = this.baseUrl + \"/api/ReportV2Config/GetAvailableInventoryReportConfig\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetAvailableInventoryReportConfig(_response);\n });\n }\n\n protected processGetAvailableInventoryReportConfig(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReportV2ConfigOfInventoryReportV2RequestAndReportWidgetTypesInventory[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n upsertInventoryReportConfig(reportConfig: ReportV2ConfigOfInventoryReportV2RequestAndReportWidgetTypesInventory): Promise {\n let url_ = this.baseUrl + \"/api/ReportV2Config/UpsertInventoryReportConfig\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(reportConfig);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpsertInventoryReportConfig(_response);\n });\n }\n\n protected processUpsertInventoryReportConfig(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as number;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getAvailableSaleReportConfig(): Promise {\n let url_ = this.baseUrl + \"/api/ReportV2Config/GetAvailableSaleReportConfig\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetAvailableSaleReportConfig(_response);\n });\n }\n\n protected processGetAvailableSaleReportConfig(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReportV2ConfigOfSalesReportV2RequestAndReportWidgetTypesSale[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n upsertSaleReportConfig(reportConfig: ReportV2ConfigOfSalesReportV2RequestAndReportWidgetTypesSale): Promise {\n let url_ = this.baseUrl + \"/api/ReportV2Config/UpsertSaleReportConfig\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(reportConfig);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpsertSaleReportConfig(_response);\n });\n }\n\n protected processUpsertSaleReportConfig(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as number;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n deleteReportConfig(reportConfigId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/ReportV2Config/DeleteReportConfig?\";\n if (reportConfigId === null)\n throw new Error(\"The parameter 'reportConfigId' cannot be null.\");\n else if (reportConfigId !== undefined)\n url_ += \"reportConfigId=\" + encodeURIComponent(\"\" + reportConfigId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processDeleteReportConfig(_response);\n });\n }\n\n protected processDeleteReportConfig(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getAvailableCommissionReportConfig(): Promise {\n let url_ = this.baseUrl + \"/api/ReportV2Config/GetAvailableCommissionReportConfig\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetAvailableCommissionReportConfig(_response);\n });\n }\n\n protected processGetAvailableCommissionReportConfig(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReportV2ConfigOfCommissionReportV2RequestAndReportWidgetTypesCommission[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n upsertReportConfigOverride(reportConfigId: number | undefined, reportConfigOverride: ReportV2ConfigOverride): Promise {\n let url_ = this.baseUrl + \"/api/ReportV2Config/UpsertReportConfigOverride?\";\n if (reportConfigId === null)\n throw new Error(\"The parameter 'reportConfigId' cannot be null.\");\n else if (reportConfigId !== undefined)\n url_ += \"reportConfigId=\" + encodeURIComponent(\"\" + reportConfigId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(reportConfigOverride);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpsertReportConfigOverride(_response);\n });\n }\n\n protected processUpsertReportConfigOverride(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface IReportV2Client {\n\n getInventoryReportMetrics(query: InventoryReportV2Request): Promise;\n\n getInventoryReportSummary(query: InventoryReportV2Request): Promise;\n\n getSaleReportMetrics(query: SalesReportV2Request): Promise;\n\n getSaleReportSummary(query: SalesReportV2Request): Promise;\n\n getCommissionReportMetrics(query: CommissionReportV2Request): Promise;\n\n getCommissionReportSummary(query: CommissionReportV2Request): Promise;\n\n downloadListingReportMetrics(query: InventoryReportV2Request, fileType: ReportFileType | undefined): Promise;\n\n downloadSaleReportMetrics(query: SalesReportV2Request, fileType: ReportFileType | undefined): Promise;\n\n downloadCommissionReportMetrics(query: CommissionReportV2Request, fileType: ReportFileType | undefined): Promise;\n}\n\nexport class ReportV2Client extends PosClientBase implements IReportV2Client {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(configuration: PosClientConfig, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n super(configuration);\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"\";\n }\n\n getInventoryReportMetrics(query: InventoryReportV2Request): Promise {\n let url_ = this.baseUrl + \"/api/ReportV2/GetInventoryReportMetrics\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetInventoryReportMetrics(_response);\n });\n }\n\n protected processGetInventoryReportMetrics(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReportMetricsV2;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getInventoryReportSummary(query: InventoryReportV2Request): Promise {\n let url_ = this.baseUrl + \"/api/ReportV2/GetInventoryReportSummary\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetInventoryReportSummary(_response);\n });\n }\n\n protected processGetInventoryReportSummary(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReportMetricsSummaryV2;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getSaleReportMetrics(query: SalesReportV2Request): Promise {\n let url_ = this.baseUrl + \"/api/ReportV2/GetSaleReportMetrics\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetSaleReportMetrics(_response);\n });\n }\n\n protected processGetSaleReportMetrics(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReportMetricsV2;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getSaleReportSummary(query: SalesReportV2Request): Promise {\n let url_ = this.baseUrl + \"/api/ReportV2/GetSaleReportSummary\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetSaleReportSummary(_response);\n });\n }\n\n protected processGetSaleReportSummary(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReportMetricsSummaryV2;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getCommissionReportMetrics(query: CommissionReportV2Request): Promise {\n let url_ = this.baseUrl + \"/api/ReportV2/GetCommissionReportMetrics\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetCommissionReportMetrics(_response);\n });\n }\n\n protected processGetCommissionReportMetrics(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReportMetricsV2;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getCommissionReportSummary(query: CommissionReportV2Request): Promise {\n let url_ = this.baseUrl + \"/api/ReportV2/GetCommissionReportSummary\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetCommissionReportSummary(_response);\n });\n }\n\n protected processGetCommissionReportSummary(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReportMetricsSummaryV2;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n downloadListingReportMetrics(query: InventoryReportV2Request, fileType: ReportFileType | undefined): Promise {\n let url_ = this.baseUrl + \"/api/ReportV2/DownloadListingReportMetrics?\";\n if (fileType === null)\n throw new Error(\"The parameter 'fileType' cannot be null.\");\n else if (fileType !== undefined)\n url_ += \"fileType=\" + encodeURIComponent(\"\" + fileType) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/octet-stream\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processDownloadListingReportMetrics(_response);\n });\n }\n\n protected processDownloadListingReportMetrics(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200 || status === 206) {\n const contentDisposition = response.headers ? response.headers.get(\"content-disposition\") : undefined;\n let fileNameMatch = contentDisposition ? /filename\\*=(?:(\\\\?['\"])(.*?)\\1|(?:[^\\s]+'.*?')?([^;\\n]*))/g.exec(contentDisposition) : undefined;\n let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;\n if (fileName) {\n fileName = decodeURIComponent(fileName);\n } else {\n fileNameMatch = contentDisposition ? /filename=\"?([^\"]*?)\"?(;|$)/g.exec(contentDisposition) : undefined;\n fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;\n }\n return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n downloadSaleReportMetrics(query: SalesReportV2Request, fileType: ReportFileType | undefined): Promise {\n let url_ = this.baseUrl + \"/api/ReportV2/DownloadSaleReportMetrics?\";\n if (fileType === null)\n throw new Error(\"The parameter 'fileType' cannot be null.\");\n else if (fileType !== undefined)\n url_ += \"fileType=\" + encodeURIComponent(\"\" + fileType) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/octet-stream\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processDownloadSaleReportMetrics(_response);\n });\n }\n\n protected processDownloadSaleReportMetrics(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200 || status === 206) {\n const contentDisposition = response.headers ? response.headers.get(\"content-disposition\") : undefined;\n let fileNameMatch = contentDisposition ? /filename\\*=(?:(\\\\?['\"])(.*?)\\1|(?:[^\\s]+'.*?')?([^;\\n]*))/g.exec(contentDisposition) : undefined;\n let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;\n if (fileName) {\n fileName = decodeURIComponent(fileName);\n } else {\n fileNameMatch = contentDisposition ? /filename=\"?([^\"]*?)\"?(;|$)/g.exec(contentDisposition) : undefined;\n fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;\n }\n return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n downloadCommissionReportMetrics(query: CommissionReportV2Request, fileType: ReportFileType | undefined): Promise {\n let url_ = this.baseUrl + \"/api/ReportV2/DownloadCommissionReportMetrics?\";\n if (fileType === null)\n throw new Error(\"The parameter 'fileType' cannot be null.\");\n else if (fileType !== undefined)\n url_ += \"fileType=\" + encodeURIComponent(\"\" + fileType) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/octet-stream\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processDownloadCommissionReportMetrics(_response);\n });\n }\n\n protected processDownloadCommissionReportMetrics(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200 || status === 206) {\n const contentDisposition = response.headers ? response.headers.get(\"content-disposition\") : undefined;\n let fileNameMatch = contentDisposition ? /filename\\*=(?:(\\\\?['\"])(.*?)\\1|(?:[^\\s]+'.*?')?([^;\\n]*))/g.exec(contentDisposition) : undefined;\n let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;\n if (fileName) {\n fileName = decodeURIComponent(fileName);\n } else {\n fileNameMatch = contentDisposition ? /filename=\"?([^\"]*?)\"?(;|$)/g.exec(contentDisposition) : undefined;\n fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;\n }\n return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface ISaleClient {\n\n getSalesForEvents(query: SaleQuery, requireEventIds: boolean | undefined, useReadonlyDB: boolean | undefined): Promise<{ [key: string]: Sale[]; }>;\n\n getUnableToProcessSales(): Promise<{ [key: string]: Sale[]; }>;\n\n getSalesByMarketplaceSaleId(marketplaceSaleId: string | undefined): Promise;\n\n getSaleBySaleId(saleId: number | undefined): Promise;\n\n confirmAllocationSale(saleId: number | undefined, seatingToAllocate: Seating | undefined, skipAllocationValidation: boolean | null | undefined): Promise;\n\n rejectSale(saleId: number | undefined, keepAllocatedTickets: boolean | null | undefined, cancellationReason: SaleCancellationReason | null | undefined): Promise;\n\n deallocateSale(saleId: number | undefined, adminHold: boolean | undefined): Promise;\n\n saveETicketAssignments(saleId: number | undefined, eticketImages: UserDocument[]): Promise;\n\n saveQRCodeAssignments(saleId: number | undefined, qrCodes: UserDocument[]): Promise;\n\n updateBarcodesForSale(saleId: number | undefined, ticketBarcodes: TicketBarcode[]): Promise;\n\n saveTicketTransferInfo(request: TicketTransferRequest): Promise;\n\n resetFulfillment(saleId: number | undefined, removeArtifacts: boolean | undefined, hasResetFulfillmentKeepArtifactsFeature: boolean | undefined): Promise;\n\n markAsFulfilled(saleId: number | undefined): Promise;\n\n getBarcodesAlreadyInUse(viagogoVirtualId: string | undefined, ticketBarcodes: TicketBarcode[]): Promise;\n\n getTicketExternalIdsAlreadyInUse(viagogoVirtualId: string | undefined, externalIds: TicketExternalId[]): Promise;\n\n getTicketUrlsAlreadyInUse(viagogoVirtualId: string | undefined, urls: TicketUrl[]): Promise;\n\n expireHold(saleId: number | undefined): Promise;\n\n getSeatingsForSaleAllocation(saleId: number | undefined, allPossibleSeatings: boolean | undefined, isAllocateSingleTickets: boolean | undefined): Promise;\n\n exportSales(query: SaleQuery): Promise;\n\n updateSale(saleInput: SaleInput): Promise;\n\n updateSaleIsNoFulfill(input: ValueTupleOfLongAndNullableBoolean): Promise;\n\n mergePosManagedMarketplaceSale(input: PosManagedMarketplaceSaleInput): Promise;\n\n createMarketplaceSale(input: MarketplaceSaleInput): Promise;\n\n getAllAvailableBuyers(): Promise;\n\n downloadMergedUserDocumentsPdf(saleId: number | undefined): Promise;\n\n wasteListingTickets(input: WasteListingTicketsInput): Promise;\n\n unwasteSale(input: UnwasteSaleInput): Promise;\n\n getSaleLineItemsBySaleId(saleId: number | undefined): Promise;\n}\n\nexport class SaleClient extends PosClientBase implements ISaleClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(configuration: PosClientConfig, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n super(configuration);\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"\";\n }\n\n getSalesForEvents(query: SaleQuery, requireEventIds: boolean | undefined, useReadonlyDB: boolean | undefined): Promise<{ [key: string]: Sale[]; }> {\n let url_ = this.baseUrl + \"/api/Sale/GetSalesForEvents?\";\n if (requireEventIds === null)\n throw new Error(\"The parameter 'requireEventIds' cannot be null.\");\n else if (requireEventIds !== undefined)\n url_ += \"requireEventIds=\" + encodeURIComponent(\"\" + requireEventIds) + \"&\";\n if (useReadonlyDB === null)\n throw new Error(\"The parameter 'useReadonlyDB' cannot be null.\");\n else if (useReadonlyDB !== undefined)\n url_ += \"useReadonlyDB=\" + encodeURIComponent(\"\" + useReadonlyDB) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetSalesForEvents(_response);\n });\n }\n\n protected processGetSalesForEvents(response: Response): Promise<{ [key: string]: Sale[]; }> {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as { [key: string]: Sale[]; };\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve<{ [key: string]: Sale[]; }>(null as any);\n }\n\n getUnableToProcessSales(): Promise<{ [key: string]: Sale[]; }> {\n let url_ = this.baseUrl + \"/api/Sale/GetUnableToProcessSales\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetUnableToProcessSales(_response);\n });\n }\n\n protected processGetUnableToProcessSales(response: Response): Promise<{ [key: string]: Sale[]; }> {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as { [key: string]: Sale[]; };\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve<{ [key: string]: Sale[]; }>(null as any);\n }\n\n getSalesByMarketplaceSaleId(marketplaceSaleId: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Sale/GetSalesByMarketplaceSaleId?\";\n if (marketplaceSaleId === null)\n throw new Error(\"The parameter 'marketplaceSaleId' cannot be null.\");\n else if (marketplaceSaleId !== undefined)\n url_ += \"marketplaceSaleId=\" + encodeURIComponent(\"\" + marketplaceSaleId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetSalesByMarketplaceSaleId(_response);\n });\n }\n\n protected processGetSalesByMarketplaceSaleId(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as Sale[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getSaleBySaleId(saleId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Sale/GetSaleBySaleId?\";\n if (saleId === null)\n throw new Error(\"The parameter 'saleId' cannot be null.\");\n else if (saleId !== undefined)\n url_ += \"saleId=\" + encodeURIComponent(\"\" + saleId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetSaleBySaleId(_response);\n });\n }\n\n protected processGetSaleBySaleId(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SaleDetails;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n confirmAllocationSale(saleId: number | undefined, seatingToAllocate: Seating | undefined, skipAllocationValidation: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Sale/ConfirmAllocationSale?\";\n if (saleId === null)\n throw new Error(\"The parameter 'saleId' cannot be null.\");\n else if (saleId !== undefined)\n url_ += \"saleId=\" + encodeURIComponent(\"\" + saleId) + \"&\";\n if (skipAllocationValidation !== undefined && skipAllocationValidation !== null)\n url_ += \"skipAllocationValidation=\" + encodeURIComponent(\"\" + skipAllocationValidation) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(seatingToAllocate);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processConfirmAllocationSale(_response);\n });\n }\n\n protected processConfirmAllocationSale(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n rejectSale(saleId: number | undefined, keepAllocatedTickets: boolean | null | undefined, cancellationReason: SaleCancellationReason | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Sale/RejectSale?\";\n if (saleId === null)\n throw new Error(\"The parameter 'saleId' cannot be null.\");\n else if (saleId !== undefined)\n url_ += \"saleId=\" + encodeURIComponent(\"\" + saleId) + \"&\";\n if (keepAllocatedTickets !== undefined && keepAllocatedTickets !== null)\n url_ += \"keepAllocatedTickets=\" + encodeURIComponent(\"\" + keepAllocatedTickets) + \"&\";\n if (cancellationReason !== undefined && cancellationReason !== null)\n url_ += \"cancellationReason=\" + encodeURIComponent(\"\" + cancellationReason) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processRejectSale(_response);\n });\n }\n\n protected processRejectSale(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n deallocateSale(saleId: number | undefined, adminHold: boolean | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Sale/DeallocateSale?\";\n if (saleId === null)\n throw new Error(\"The parameter 'saleId' cannot be null.\");\n else if (saleId !== undefined)\n url_ += \"saleId=\" + encodeURIComponent(\"\" + saleId) + \"&\";\n if (adminHold === null)\n throw new Error(\"The parameter 'adminHold' cannot be null.\");\n else if (adminHold !== undefined)\n url_ += \"adminHold=\" + encodeURIComponent(\"\" + adminHold) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processDeallocateSale(_response);\n });\n }\n\n protected processDeallocateSale(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n saveETicketAssignments(saleId: number | undefined, eticketImages: UserDocument[]): Promise {\n let url_ = this.baseUrl + \"/api/Sale/SaveETicketAssignments?\";\n if (saleId === null)\n throw new Error(\"The parameter 'saleId' cannot be null.\");\n else if (saleId !== undefined)\n url_ += \"saleId=\" + encodeURIComponent(\"\" + saleId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(eticketImages);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processSaveETicketAssignments(_response);\n });\n }\n\n protected processSaveETicketAssignments(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n saveQRCodeAssignments(saleId: number | undefined, qrCodes: UserDocument[]): Promise {\n let url_ = this.baseUrl + \"/api/Sale/SaveQRCodeAssignments?\";\n if (saleId === null)\n throw new Error(\"The parameter 'saleId' cannot be null.\");\n else if (saleId !== undefined)\n url_ += \"saleId=\" + encodeURIComponent(\"\" + saleId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(qrCodes);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processSaveQRCodeAssignments(_response);\n });\n }\n\n protected processSaveQRCodeAssignments(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n updateBarcodesForSale(saleId: number | undefined, ticketBarcodes: TicketBarcode[]): Promise {\n let url_ = this.baseUrl + \"/api/Sale/UpdateBarcodesForSale?\";\n if (saleId === null)\n throw new Error(\"The parameter 'saleId' cannot be null.\");\n else if (saleId !== undefined)\n url_ += \"saleId=\" + encodeURIComponent(\"\" + saleId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(ticketBarcodes);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpdateBarcodesForSale(_response);\n });\n }\n\n protected processUpdateBarcodesForSale(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n saveTicketTransferInfo(request: TicketTransferRequest): Promise {\n let url_ = this.baseUrl + \"/api/Sale/SaveTicketTransferInfo\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(request);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processSaveTicketTransferInfo(_response);\n });\n }\n\n protected processSaveTicketTransferInfo(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n resetFulfillment(saleId: number | undefined, removeArtifacts: boolean | undefined, hasResetFulfillmentKeepArtifactsFeature: boolean | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Sale/ResetFulfillment?\";\n if (saleId === null)\n throw new Error(\"The parameter 'saleId' cannot be null.\");\n else if (saleId !== undefined)\n url_ += \"saleId=\" + encodeURIComponent(\"\" + saleId) + \"&\";\n if (removeArtifacts === null)\n throw new Error(\"The parameter 'removeArtifacts' cannot be null.\");\n else if (removeArtifacts !== undefined)\n url_ += \"removeArtifacts=\" + encodeURIComponent(\"\" + removeArtifacts) + \"&\";\n if (hasResetFulfillmentKeepArtifactsFeature === null)\n throw new Error(\"The parameter 'hasResetFulfillmentKeepArtifactsFeature' cannot be null.\");\n else if (hasResetFulfillmentKeepArtifactsFeature !== undefined)\n url_ += \"hasResetFulfillmentKeepArtifactsFeature=\" + encodeURIComponent(\"\" + hasResetFulfillmentKeepArtifactsFeature) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processResetFulfillment(_response);\n });\n }\n\n protected processResetFulfillment(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n markAsFulfilled(saleId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Sale/MarkAsFulfilled?\";\n if (saleId === null)\n throw new Error(\"The parameter 'saleId' cannot be null.\");\n else if (saleId !== undefined)\n url_ += \"saleId=\" + encodeURIComponent(\"\" + saleId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processMarkAsFulfilled(_response);\n });\n }\n\n protected processMarkAsFulfilled(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getBarcodesAlreadyInUse(viagogoVirtualId: string | undefined, ticketBarcodes: TicketBarcode[]): Promise {\n let url_ = this.baseUrl + \"/api/Sale/GetBarcodesAlreadyInUse?\";\n if (viagogoVirtualId === null)\n throw new Error(\"The parameter 'viagogoVirtualId' cannot be null.\");\n else if (viagogoVirtualId !== undefined)\n url_ += \"viagogoVirtualId=\" + encodeURIComponent(\"\" + viagogoVirtualId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(ticketBarcodes);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetBarcodesAlreadyInUse(_response);\n });\n }\n\n protected processGetBarcodesAlreadyInUse(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as TicketBarcode[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getTicketExternalIdsAlreadyInUse(viagogoVirtualId: string | undefined, externalIds: TicketExternalId[]): Promise {\n let url_ = this.baseUrl + \"/api/Sale/GetTicketExternalIdsAlreadyInUse?\";\n if (viagogoVirtualId === null)\n throw new Error(\"The parameter 'viagogoVirtualId' cannot be null.\");\n else if (viagogoVirtualId !== undefined)\n url_ += \"viagogoVirtualId=\" + encodeURIComponent(\"\" + viagogoVirtualId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(externalIds);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetTicketExternalIdsAlreadyInUse(_response);\n });\n }\n\n protected processGetTicketExternalIdsAlreadyInUse(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as TicketExternalId[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getTicketUrlsAlreadyInUse(viagogoVirtualId: string | undefined, urls: TicketUrl[]): Promise {\n let url_ = this.baseUrl + \"/api/Sale/GetTicketUrlsAlreadyInUse?\";\n if (viagogoVirtualId === null)\n throw new Error(\"The parameter 'viagogoVirtualId' cannot be null.\");\n else if (viagogoVirtualId !== undefined)\n url_ += \"viagogoVirtualId=\" + encodeURIComponent(\"\" + viagogoVirtualId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(urls);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetTicketUrlsAlreadyInUse(_response);\n });\n }\n\n protected processGetTicketUrlsAlreadyInUse(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as TicketUrl[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n expireHold(saleId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Sale/ExpireHold?\";\n if (saleId === null)\n throw new Error(\"The parameter 'saleId' cannot be null.\");\n else if (saleId !== undefined)\n url_ += \"saleId=\" + encodeURIComponent(\"\" + saleId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processExpireHold(_response);\n });\n }\n\n protected processExpireHold(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getSeatingsForSaleAllocation(saleId: number | undefined, allPossibleSeatings: boolean | undefined, isAllocateSingleTickets: boolean | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Sale/GetSeatingsForSaleAllocation?\";\n if (saleId === null)\n throw new Error(\"The parameter 'saleId' cannot be null.\");\n else if (saleId !== undefined)\n url_ += \"saleId=\" + encodeURIComponent(\"\" + saleId) + \"&\";\n if (allPossibleSeatings === null)\n throw new Error(\"The parameter 'allPossibleSeatings' cannot be null.\");\n else if (allPossibleSeatings !== undefined)\n url_ += \"allPossibleSeatings=\" + encodeURIComponent(\"\" + allPossibleSeatings) + \"&\";\n if (isAllocateSingleTickets === null)\n throw new Error(\"The parameter 'isAllocateSingleTickets' cannot be null.\");\n else if (isAllocateSingleTickets !== undefined)\n url_ += \"isAllocateSingleTickets=\" + encodeURIComponent(\"\" + isAllocateSingleTickets) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetSeatingsForSaleAllocation(_response);\n });\n }\n\n protected processGetSeatingsForSaleAllocation(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SaleAvailableSeatings;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n exportSales(query: SaleQuery): Promise {\n let url_ = this.baseUrl + \"/api/Sale/ExportSales\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/octet-stream\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processExportSales(_response);\n });\n }\n\n protected processExportSales(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200 || status === 206) {\n const contentDisposition = response.headers ? response.headers.get(\"content-disposition\") : undefined;\n let fileNameMatch = contentDisposition ? /filename\\*=(?:(\\\\?['\"])(.*?)\\1|(?:[^\\s]+'.*?')?([^;\\n]*))/g.exec(contentDisposition) : undefined;\n let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;\n if (fileName) {\n fileName = decodeURIComponent(fileName);\n } else {\n fileNameMatch = contentDisposition ? /filename=\"?([^\"]*?)\"?(;|$)/g.exec(contentDisposition) : undefined;\n fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;\n }\n return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n updateSale(saleInput: SaleInput): Promise {\n let url_ = this.baseUrl + \"/api/Sale/UpdateSale\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(saleInput);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpdateSale(_response);\n });\n }\n\n protected processUpdateSale(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n updateSaleIsNoFulfill(input: ValueTupleOfLongAndNullableBoolean): Promise {\n let url_ = this.baseUrl + \"/api/Sale/UpdateSaleIsNoFulfill\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpdateSaleIsNoFulfill(_response);\n });\n }\n\n protected processUpdateSaleIsNoFulfill(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n mergePosManagedMarketplaceSale(input: PosManagedMarketplaceSaleInput): Promise {\n let url_ = this.baseUrl + \"/api/Sale/MergePosManagedMarketplaceSale\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processMergePosManagedMarketplaceSale(_response);\n });\n }\n\n protected processMergePosManagedMarketplaceSale(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n createMarketplaceSale(input: MarketplaceSaleInput): Promise {\n let url_ = this.baseUrl + \"/api/Sale/CreateMarketplaceSale\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processCreateMarketplaceSale(_response);\n });\n }\n\n protected processCreateMarketplaceSale(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getAllAvailableBuyers(): Promise {\n let url_ = this.baseUrl + \"/api/Sale/GetAllAvailableBuyers\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetAllAvailableBuyers(_response);\n });\n }\n\n protected processGetAllAvailableBuyers(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BuyerInfo[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n downloadMergedUserDocumentsPdf(saleId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Sale/DownloadMergedUserDocumentsPdf?\";\n if (saleId === null)\n throw new Error(\"The parameter 'saleId' cannot be null.\");\n else if (saleId !== undefined)\n url_ += \"saleId=\" + encodeURIComponent(\"\" + saleId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/octet-stream\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processDownloadMergedUserDocumentsPdf(_response);\n });\n }\n\n protected processDownloadMergedUserDocumentsPdf(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200 || status === 206) {\n const contentDisposition = response.headers ? response.headers.get(\"content-disposition\") : undefined;\n let fileNameMatch = contentDisposition ? /filename\\*=(?:(\\\\?['\"])(.*?)\\1|(?:[^\\s]+'.*?')?([^;\\n]*))/g.exec(contentDisposition) : undefined;\n let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;\n if (fileName) {\n fileName = decodeURIComponent(fileName);\n } else {\n fileNameMatch = contentDisposition ? /filename=\"?([^\"]*?)\"?(;|$)/g.exec(contentDisposition) : undefined;\n fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;\n }\n return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n wasteListingTickets(input: WasteListingTicketsInput): Promise {\n let url_ = this.baseUrl + \"/api/Sale/WasteListingTickets\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processWasteListingTickets(_response);\n });\n }\n\n protected processWasteListingTickets(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n unwasteSale(input: UnwasteSaleInput): Promise {\n let url_ = this.baseUrl + \"/api/Sale/UnwasteSale\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUnwasteSale(_response);\n });\n }\n\n protected processUnwasteSale(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getSaleLineItemsBySaleId(saleId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Sale/GetSaleLineItemsBySaleId?\";\n if (saleId === null)\n throw new Error(\"The parameter 'saleId' cannot be null.\");\n else if (saleId !== undefined)\n url_ += \"saleId=\" + encodeURIComponent(\"\" + saleId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetSaleLineItemsBySaleId(_response);\n });\n }\n\n protected processGetSaleLineItemsBySaleId(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SaleLineItem[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface ISearchClient {\n\n getPurchaseSearchConfigs(includeAllUsers: boolean | undefined): Promise;\n\n getPurchaseSearchResult(searchConfigId: string | undefined): Promise;\n\n savePurchaseSearchResult(r: PurchaseSearchResult): Promise;\n\n getSaleSearchConfigs(includeAllUsers: boolean | undefined): Promise;\n\n getSaleSearchResult(searchConfigId: string | undefined): Promise;\n\n saveSaleSearchResult(r: SaleSearchResult): Promise;\n\n getInventorySearchConfigs(includeAllUsers: boolean | undefined): Promise;\n\n getInventorySearchResult(searchConfigId: string | undefined): Promise;\n\n saveInventorySearchResult(r: InventorySearchResult): Promise;\n\n deleteSearchConfig(searchConfigId: string | undefined): Promise;\n}\n\nexport class SearchClient extends PosClientBase implements ISearchClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(configuration: PosClientConfig, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n super(configuration);\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"\";\n }\n\n getPurchaseSearchConfigs(includeAllUsers: boolean | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Search/GetPurchaseSearchConfigs?\";\n if (includeAllUsers === null)\n throw new Error(\"The parameter 'includeAllUsers' cannot be null.\");\n else if (includeAllUsers !== undefined)\n url_ += \"includeAllUsers=\" + encodeURIComponent(\"\" + includeAllUsers) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetPurchaseSearchConfigs(_response);\n });\n }\n\n protected processGetPurchaseSearchConfigs(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PurchaseSearchResult[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getPurchaseSearchResult(searchConfigId: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Search/GetPurchaseSearchResult?\";\n if (searchConfigId === null)\n throw new Error(\"The parameter 'searchConfigId' cannot be null.\");\n else if (searchConfigId !== undefined)\n url_ += \"searchConfigId=\" + encodeURIComponent(\"\" + searchConfigId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetPurchaseSearchResult(_response);\n });\n }\n\n protected processGetPurchaseSearchResult(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PurchaseSearchResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n savePurchaseSearchResult(r: PurchaseSearchResult): Promise {\n let url_ = this.baseUrl + \"/api/Search/SavePurchaseSearchResult\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(r);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processSavePurchaseSearchResult(_response);\n });\n }\n\n protected processSavePurchaseSearchResult(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PurchaseSearchResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getSaleSearchConfigs(includeAllUsers: boolean | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Search/GetSaleSearchConfigs?\";\n if (includeAllUsers === null)\n throw new Error(\"The parameter 'includeAllUsers' cannot be null.\");\n else if (includeAllUsers !== undefined)\n url_ += \"includeAllUsers=\" + encodeURIComponent(\"\" + includeAllUsers) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetSaleSearchConfigs(_response);\n });\n }\n\n protected processGetSaleSearchConfigs(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SaleSearchResult[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getSaleSearchResult(searchConfigId: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Search/GetSaleSearchResult?\";\n if (searchConfigId === null)\n throw new Error(\"The parameter 'searchConfigId' cannot be null.\");\n else if (searchConfigId !== undefined)\n url_ += \"searchConfigId=\" + encodeURIComponent(\"\" + searchConfigId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetSaleSearchResult(_response);\n });\n }\n\n protected processGetSaleSearchResult(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SaleSearchResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n saveSaleSearchResult(r: SaleSearchResult): Promise {\n let url_ = this.baseUrl + \"/api/Search/SaveSaleSearchResult\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(r);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processSaveSaleSearchResult(_response);\n });\n }\n\n protected processSaveSaleSearchResult(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SaleSearchResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getInventorySearchConfigs(includeAllUsers: boolean | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Search/GetInventorySearchConfigs?\";\n if (includeAllUsers === null)\n throw new Error(\"The parameter 'includeAllUsers' cannot be null.\");\n else if (includeAllUsers !== undefined)\n url_ += \"includeAllUsers=\" + encodeURIComponent(\"\" + includeAllUsers) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetInventorySearchConfigs(_response);\n });\n }\n\n protected processGetInventorySearchConfigs(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as InventorySearchResult[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getInventorySearchResult(searchConfigId: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Search/GetInventorySearchResult?\";\n if (searchConfigId === null)\n throw new Error(\"The parameter 'searchConfigId' cannot be null.\");\n else if (searchConfigId !== undefined)\n url_ += \"searchConfigId=\" + encodeURIComponent(\"\" + searchConfigId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetInventorySearchResult(_response);\n });\n }\n\n protected processGetInventorySearchResult(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as InventorySearchResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n saveInventorySearchResult(r: InventorySearchResult): Promise {\n let url_ = this.baseUrl + \"/api/Search/SaveInventorySearchResult\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(r);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processSaveInventorySearchResult(_response);\n });\n }\n\n protected processSaveInventorySearchResult(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as InventorySearchResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n deleteSearchConfig(searchConfigId: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Search/DeleteSearchConfig?\";\n if (searchConfigId === null)\n throw new Error(\"The parameter 'searchConfigId' cannot be null.\");\n else if (searchConfigId !== undefined)\n url_ += \"searchConfigId=\" + encodeURIComponent(\"\" + searchConfigId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processDeleteSearchConfig(_response);\n });\n }\n\n protected processDeleteSearchConfig(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface ISellerAccountClient {\n\n getCurrentUserSellerAccounts(): Promise;\n\n getSellerUsersForSellerAccount(): Promise;\n\n getSelleRolesForSellerAccount(): Promise;\n\n getAllSellerPermissions(): Promise;\n\n updateSellerUser(input: SellerUserInput): Promise;\n\n getSellerUser(stubHubLoginId: string | undefined): Promise;\n\n mergeRolesToSellerUser(input: SellerUserRolesInput): Promise;\n\n activateUserForSellerAccountByEmail(email: string | undefined): Promise;\n\n activateUserForSellerAccount(input: SellerUserAccountInput): Promise;\n\n deactivateUserForSellerAccount(input: SellerUserAccountInput): Promise;\n\n getSyncCenterSettings(): Promise;\n\n mergeSyncCenterSettings(settings: SyncCenterSettings): Promise;\n\n getAccountAutoPricingSettings(): Promise;\n\n mergeAccountAutoPricingSettings(input: AccountAutoPricingSettingsInputs): Promise;\n\n getAutoCurrencyConversionSettings(): Promise;\n\n mergeAutoCurrencyConversionSettings(settings: AutoCurrencyConversionSettings): Promise;\n\n getCustomTimeZoneSettings(): Promise;\n\n mergeCustomTimeZoneSettings(settings: TimezoneInfo | undefined): Promise;\n\n updateMarketplaceSellerAccountPassword(marketplace: Marketplace | undefined, password: string | undefined): Promise;\n\n createSellerRole(input: SellerRoleInput): Promise;\n\n updateSellerRole(input: SellerRoleInput): Promise;\n\n deleteSellerRole(roleId: number | undefined): Promise;\n\n initiateTradeDeskReset(username: string | undefined): Promise;\n\n resetTradeDeskPassword(input: TradeDeskPasswordResetInput): Promise;\n}\n\nexport class SellerAccountClient extends PosClientBase implements ISellerAccountClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(configuration: PosClientConfig, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n super(configuration);\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"\";\n }\n\n getCurrentUserSellerAccounts(): Promise {\n let url_ = this.baseUrl + \"/api/SellerAccount/GetCurrentUserSellerAccounts\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetCurrentUserSellerAccounts(_response);\n });\n }\n\n protected processGetCurrentUserSellerAccounts(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SellerAccount[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getSellerUsersForSellerAccount(): Promise {\n let url_ = this.baseUrl + \"/api/SellerAccount/GetSellerUsersForSellerAccount\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetSellerUsersForSellerAccount(_response);\n });\n }\n\n protected processGetSellerUsersForSellerAccount(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SellerUserAccountInfo[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getSelleRolesForSellerAccount(): Promise {\n let url_ = this.baseUrl + \"/api/SellerAccount/GetSelleRolesForSellerAccount\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetSelleRolesForSellerAccount(_response);\n });\n }\n\n protected processGetSelleRolesForSellerAccount(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SellerRoleInfo[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getAllSellerPermissions(): Promise {\n let url_ = this.baseUrl + \"/api/SellerAccount/GetAllSellerPermissions\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetAllSellerPermissions(_response);\n });\n }\n\n protected processGetAllSellerPermissions(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SellerPermissionInfo[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n updateSellerUser(input: SellerUserInput): Promise {\n let url_ = this.baseUrl + \"/api/SellerAccount/UpdateSellerUser\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpdateSellerUser(_response);\n });\n }\n\n protected processUpdateSellerUser(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getSellerUser(stubHubLoginId: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/SellerAccount/GetSellerUser?\";\n if (stubHubLoginId === null)\n throw new Error(\"The parameter 'stubHubLoginId' cannot be null.\");\n else if (stubHubLoginId !== undefined)\n url_ += \"stubHubLoginId=\" + encodeURIComponent(\"\" + stubHubLoginId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetSellerUser(_response);\n });\n }\n\n protected processGetSellerUser(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SellerUser;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n mergeRolesToSellerUser(input: SellerUserRolesInput): Promise {\n let url_ = this.baseUrl + \"/api/SellerAccount/MergeRolesToSellerUser\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processMergeRolesToSellerUser(_response);\n });\n }\n\n protected processMergeRolesToSellerUser(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n activateUserForSellerAccountByEmail(email: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/SellerAccount/ActivateUserForSellerAccountByEmail?\";\n if (email === null)\n throw new Error(\"The parameter 'email' cannot be null.\");\n else if (email !== undefined)\n url_ += \"email=\" + encodeURIComponent(\"\" + email) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processActivateUserForSellerAccountByEmail(_response);\n });\n }\n\n protected processActivateUserForSellerAccountByEmail(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n activateUserForSellerAccount(input: SellerUserAccountInput): Promise {\n let url_ = this.baseUrl + \"/api/SellerAccount/ActivateUserForSellerAccount\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processActivateUserForSellerAccount(_response);\n });\n }\n\n protected processActivateUserForSellerAccount(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n deactivateUserForSellerAccount(input: SellerUserAccountInput): Promise {\n let url_ = this.baseUrl + \"/api/SellerAccount/DeactivateUserForSellerAccount\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processDeactivateUserForSellerAccount(_response);\n });\n }\n\n protected processDeactivateUserForSellerAccount(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getSyncCenterSettings(): Promise {\n let url_ = this.baseUrl + \"/api/SellerAccount/GetSyncCenterSettings\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetSyncCenterSettings(_response);\n });\n }\n\n protected processGetSyncCenterSettings(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SyncCenterSettings;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n mergeSyncCenterSettings(settings: SyncCenterSettings): Promise {\n let url_ = this.baseUrl + \"/api/SellerAccount/MergeSyncCenterSettings\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(settings);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processMergeSyncCenterSettings(_response);\n });\n }\n\n protected processMergeSyncCenterSettings(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getAccountAutoPricingSettings(): Promise {\n let url_ = this.baseUrl + \"/api/SellerAccount/GetAccountAutoPricingSettings\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetAccountAutoPricingSettings(_response);\n });\n }\n\n protected processGetAccountAutoPricingSettings(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AccountAutoPricingSettingsInputs;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n mergeAccountAutoPricingSettings(input: AccountAutoPricingSettingsInputs): Promise {\n let url_ = this.baseUrl + \"/api/SellerAccount/MergeAccountAutoPricingSettings\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processMergeAccountAutoPricingSettings(_response);\n });\n }\n\n protected processMergeAccountAutoPricingSettings(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getAutoCurrencyConversionSettings(): Promise {\n let url_ = this.baseUrl + \"/api/SellerAccount/GetAutoCurrencyConversionSettings\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetAutoCurrencyConversionSettings(_response);\n });\n }\n\n protected processGetAutoCurrencyConversionSettings(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AutoCurrencyConversionSettings;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n mergeAutoCurrencyConversionSettings(settings: AutoCurrencyConversionSettings): Promise {\n let url_ = this.baseUrl + \"/api/SellerAccount/MergeAutoCurrencyConversionSettings\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(settings);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processMergeAutoCurrencyConversionSettings(_response);\n });\n }\n\n protected processMergeAutoCurrencyConversionSettings(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getCustomTimeZoneSettings(): Promise {\n let url_ = this.baseUrl + \"/api/SellerAccount/GetCustomTimeZoneSettings\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetCustomTimeZoneSettings(_response);\n });\n }\n\n protected processGetCustomTimeZoneSettings(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as TimezoneInfo;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n mergeCustomTimeZoneSettings(settings: TimezoneInfo | undefined): Promise {\n let url_ = this.baseUrl + \"/api/SellerAccount/MergeCustomTimeZoneSettings\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(settings);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processMergeCustomTimeZoneSettings(_response);\n });\n }\n\n protected processMergeCustomTimeZoneSettings(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n updateMarketplaceSellerAccountPassword(marketplace: Marketplace | undefined, password: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/SellerAccount/UpdateMarketplaceSellerAccountPassword?\";\n if (marketplace === null)\n throw new Error(\"The parameter 'marketplace' cannot be null.\");\n else if (marketplace !== undefined)\n url_ += \"marketplace=\" + encodeURIComponent(\"\" + marketplace) + \"&\";\n if (password === null)\n throw new Error(\"The parameter 'password' cannot be null.\");\n else if (password !== undefined)\n url_ += \"password=\" + encodeURIComponent(\"\" + password) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"PUT\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpdateMarketplaceSellerAccountPassword(_response);\n });\n }\n\n protected processUpdateMarketplaceSellerAccountPassword(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n createSellerRole(input: SellerRoleInput): Promise {\n let url_ = this.baseUrl + \"/api/SellerAccount/CreateSellerRole\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processCreateSellerRole(_response);\n });\n }\n\n protected processCreateSellerRole(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n updateSellerRole(input: SellerRoleInput): Promise {\n let url_ = this.baseUrl + \"/api/SellerAccount/UpdateSellerRole\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpdateSellerRole(_response);\n });\n }\n\n protected processUpdateSellerRole(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n deleteSellerRole(roleId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/SellerAccount/DeleteSellerRole?\";\n if (roleId === null)\n throw new Error(\"The parameter 'roleId' cannot be null.\");\n else if (roleId !== undefined)\n url_ += \"roleId=\" + encodeURIComponent(\"\" + roleId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processDeleteSellerRole(_response);\n });\n }\n\n protected processDeleteSellerRole(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n initiateTradeDeskReset(username: string | undefined): Promise {\n let url_ = this.baseUrl + \"/api/SellerAccount/InitiateTradeDeskReset?\";\n if (username === null)\n throw new Error(\"The parameter 'username' cannot be null.\");\n else if (username !== undefined)\n url_ += \"username=\" + encodeURIComponent(\"\" + username) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processInitiateTradeDeskReset(_response);\n });\n }\n\n protected processInitiateTradeDeskReset(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n resetTradeDeskPassword(input: TradeDeskPasswordResetInput): Promise {\n let url_ = this.baseUrl + \"/api/SellerAccount/ResetTradeDeskPassword\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processResetTradeDeskPassword(_response);\n });\n }\n\n protected processResetTradeDeskPassword(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PosUiActionResult;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface ISellerSupportCaseClient {\n\n getSellerSupportCaseNotesByCaseId(sellerSupportCaseId: number | undefined, take: number | null | undefined, skip: number | null | undefined, markAsRead: boolean | null | undefined): Promise;\n\n getSellerSupportCases(query: SellerSupportCaseQuery, take: number | null | undefined, skip: number | null | undefined): Promise;\n\n createSellerSupportCase(request: SellerSupportCaseRequest): Promise;\n\n createSellerSupportCaseReply(sellerSupportCaseId: number | undefined, noteContent: string | null | undefined, marketplace: string | null | undefined, attachments: FileParameter[] | null | undefined): Promise;\n\n updateSellerSupportCasesReadDate(sellerSupportCaseIds: number[], readDate: string | null | undefined): Promise;\n\n retrieveSellerSupportCaseNoteAttachments(attachmentRequests: SellerSupportCaseAttachmentRequest[], retrieveContent: boolean | undefined): Promise;\n}\n\nexport class SellerSupportCaseClient extends PosClientBase implements ISellerSupportCaseClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(configuration: PosClientConfig, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n super(configuration);\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"\";\n }\n\n getSellerSupportCaseNotesByCaseId(sellerSupportCaseId: number | undefined, take: number | null | undefined, skip: number | null | undefined, markAsRead: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/SellerSupportCase/GetSellerSupportCaseNotesByCaseId?\";\n if (sellerSupportCaseId === null)\n throw new Error(\"The parameter 'sellerSupportCaseId' cannot be null.\");\n else if (sellerSupportCaseId !== undefined)\n url_ += \"sellerSupportCaseId=\" + encodeURIComponent(\"\" + sellerSupportCaseId) + \"&\";\n if (take !== undefined && take !== null)\n url_ += \"take=\" + encodeURIComponent(\"\" + take) + \"&\";\n if (skip !== undefined && skip !== null)\n url_ += \"skip=\" + encodeURIComponent(\"\" + skip) + \"&\";\n if (markAsRead !== undefined && markAsRead !== null)\n url_ += \"markAsRead=\" + encodeURIComponent(\"\" + markAsRead) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetSellerSupportCaseNotesByCaseId(_response);\n });\n }\n\n protected processGetSellerSupportCaseNotesByCaseId(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SellerSupportCaseNote[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getSellerSupportCases(query: SellerSupportCaseQuery, take: number | null | undefined, skip: number | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/SellerSupportCase/GetSellerSupportCases?\";\n if (take !== undefined && take !== null)\n url_ += \"take=\" + encodeURIComponent(\"\" + take) + \"&\";\n if (skip !== undefined && skip !== null)\n url_ += \"skip=\" + encodeURIComponent(\"\" + skip) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(query);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetSellerSupportCases(_response);\n });\n }\n\n protected processGetSellerSupportCases(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SellerSupportCase[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n createSellerSupportCase(request: SellerSupportCaseRequest): Promise {\n let url_ = this.baseUrl + \"/api/SellerSupportCase/CreateSellerSupportCase\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(request);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processCreateSellerSupportCase(_response);\n });\n }\n\n protected processCreateSellerSupportCase(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as number;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n createSellerSupportCaseReply(sellerSupportCaseId: number | undefined, noteContent: string | null | undefined, marketplace: string | null | undefined, attachments: FileParameter[] | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/SellerSupportCase/CreateSellerSupportCaseReply?\";\n if (sellerSupportCaseId === null)\n throw new Error(\"The parameter 'sellerSupportCaseId' cannot be null.\");\n else if (sellerSupportCaseId !== undefined)\n url_ += \"sellerSupportCaseId=\" + encodeURIComponent(\"\" + sellerSupportCaseId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = new FormData();\n if (noteContent !== null && noteContent !== undefined)\n content_.append(\"NoteContent\", noteContent.toString());\n if (marketplace !== null && marketplace !== undefined)\n content_.append(\"Marketplace\", marketplace.toString());\n if (attachments !== null && attachments !== undefined)\n attachments.forEach(item_ => content_.append(\"Attachments\", item_.data, item_.fileName ? item_.fileName : \"Attachments\") );\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processCreateSellerSupportCaseReply(_response);\n });\n }\n\n protected processCreateSellerSupportCaseReply(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as number;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n updateSellerSupportCasesReadDate(sellerSupportCaseIds: number[], readDate: string | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/SellerSupportCase/UpdateSellerSupportCasesReadDate?\";\n if (readDate !== undefined && readDate !== null)\n url_ += \"readDate=\" + encodeURIComponent(\"\" + readDate) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(sellerSupportCaseIds);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpdateSellerSupportCasesReadDate(_response);\n });\n }\n\n protected processUpdateSellerSupportCasesReadDate(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n return;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n retrieveSellerSupportCaseNoteAttachments(attachmentRequests: SellerSupportCaseAttachmentRequest[], retrieveContent: boolean | undefined): Promise {\n let url_ = this.baseUrl + \"/api/SellerSupportCase/RetrieveSellerSupportCaseNoteAttachments?\";\n if (retrieveContent === null)\n throw new Error(\"The parameter 'retrieveContent' cannot be null.\");\n else if (retrieveContent !== undefined)\n url_ += \"retrieveContent=\" + encodeURIComponent(\"\" + retrieveContent) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(attachmentRequests);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processRetrieveSellerSupportCaseNoteAttachments(_response);\n });\n }\n\n protected processRetrieveSellerSupportCaseNoteAttachments(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as FileDownloadInfo[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface ISellerUserClient {\n\n getSellerUserSetting(userSetting: UserSetting | undefined, currentLoginUserOnly: boolean | undefined): Promise;\n\n getSellerUserSettings(userSettings: UserSetting[] | undefined, currentLoginUserOnly: boolean | undefined): Promise<{ [key in keyof typeof UserSetting]?: string; }>;\n\n setSellerUserSetting(userSetting: UserSetting | undefined, userSettingValue: string, currentLoginUserOnly: boolean | undefined): Promise;\n\n getCustomInventoryQuickFiltersSetting(): Promise<(CustomQuickFilterOfListingQuery | null)[]>;\n\n setCustomInventoryQuickFiltersSetting(value: CustomQuickFilterOfListingQuery[]): Promise;\n\n getCustomOnSaleEventQuickFiltersSetting(): Promise<(CustomQuickFilterOfOnSaleEventQuery | null)[]>;\n\n setCustomOnSaleEventQuickFiltersSetting(value: CustomQuickFilterOfOnSaleEventQuery[]): Promise;\n\n getCustomSalesQuickFiltersSetting(): Promise<(CustomQuickFilterOfSaleQuery | null)[]>;\n\n setCustomSalesQuickFiltersSetting(value: CustomQuickFilterOfSaleQuery[]): Promise;\n\n getCustomPurchasesQuickFiltersSetting(): Promise<(CustomQuickFilterOfPurchaseOrderQuery | null)[]>;\n\n setCustomPurchasesQuickFiltersSetting(value: CustomQuickFilterOfPurchaseOrderQuery[]): Promise;\n\n getCustomMarketplacePaymentsQuickFiltersSetting(): Promise<(CustomQuickFilterOfMarketplacePaymentQuery | null)[]>;\n\n setCustomMarketplacePaymentsQuickFiltersSetting(value: CustomQuickFilterOfMarketplacePaymentQuery[]): Promise;\n\n getAvailableReleaseNoteInfos(currentLoginUserOnly: boolean | undefined, getUnreadOnly: boolean | undefined): Promise;\n\n getHasReleaseNotesUnread(currentLoginUserOnly: boolean | undefined): Promise;\n\n getReleaseNoteHtmlByReleaseNoteIds(currentLoginUserOnly: boolean | undefined, releaseNoteIds: number[]): Promise;\n\n getAllTutorialItems(currentLoginUserOnly: boolean | undefined): Promise;\n\n getTutorialItemContents(tutorialItemIds: number[]): Promise;\n}\n\nexport class SellerUserClient extends PosClientBase implements ISellerUserClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(configuration: PosClientConfig, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n super(configuration);\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"\";\n }\n\n getSellerUserSetting(userSetting: UserSetting | undefined, currentLoginUserOnly: boolean | undefined): Promise {\n let url_ = this.baseUrl + \"/api/SellerUser/GetSellerUserSetting?\";\n if (userSetting === null)\n throw new Error(\"The parameter 'userSetting' cannot be null.\");\n else if (userSetting !== undefined)\n url_ += \"userSetting=\" + encodeURIComponent(\"\" + userSetting) + \"&\";\n if (currentLoginUserOnly === null)\n throw new Error(\"The parameter 'currentLoginUserOnly' cannot be null.\");\n else if (currentLoginUserOnly !== undefined)\n url_ += \"currentLoginUserOnly=\" + encodeURIComponent(\"\" + currentLoginUserOnly) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetSellerUserSetting(_response);\n });\n }\n\n protected processGetSellerUserSetting(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SellerUserSetting;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getSellerUserSettings(userSettings: UserSetting[] | undefined, currentLoginUserOnly: boolean | undefined): Promise<{ [key in keyof typeof UserSetting]?: string; }> {\n let url_ = this.baseUrl + \"/api/SellerUser/GetSellerUserSettings?\";\n if (userSettings === null)\n throw new Error(\"The parameter 'userSettings' cannot be null.\");\n else if (userSettings !== undefined)\n userSettings && userSettings.forEach(item => { url_ += \"userSettings=\" + encodeURIComponent(\"\" + item) + \"&\"; });\n if (currentLoginUserOnly === null)\n throw new Error(\"The parameter 'currentLoginUserOnly' cannot be null.\");\n else if (currentLoginUserOnly !== undefined)\n url_ += \"currentLoginUserOnly=\" + encodeURIComponent(\"\" + currentLoginUserOnly) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetSellerUserSettings(_response);\n });\n }\n\n protected processGetSellerUserSettings(response: Response): Promise<{ [key in keyof typeof UserSetting]?: string; }> {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as { [key in keyof typeof UserSetting]?: string; };\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve<{ [key in keyof typeof UserSetting]?: string; }>(null as any);\n }\n\n setSellerUserSetting(userSetting: UserSetting | undefined, userSettingValue: string, currentLoginUserOnly: boolean | undefined): Promise {\n let url_ = this.baseUrl + \"/api/SellerUser/SetSellerUserSetting?\";\n if (userSetting === null)\n throw new Error(\"The parameter 'userSetting' cannot be null.\");\n else if (userSetting !== undefined)\n url_ += \"userSetting=\" + encodeURIComponent(\"\" + userSetting) + \"&\";\n if (currentLoginUserOnly === null)\n throw new Error(\"The parameter 'currentLoginUserOnly' cannot be null.\");\n else if (currentLoginUserOnly !== undefined)\n url_ += \"currentLoginUserOnly=\" + encodeURIComponent(\"\" + currentLoginUserOnly) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(userSettingValue);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processSetSellerUserSetting(_response);\n });\n }\n\n protected processSetSellerUserSetting(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getCustomInventoryQuickFiltersSetting(): Promise<(CustomQuickFilterOfListingQuery | null)[]> {\n let url_ = this.baseUrl + \"/api/SellerUser/GetCustomInventoryQuickFiltersSetting\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetCustomInventoryQuickFiltersSetting(_response);\n });\n }\n\n protected processGetCustomInventoryQuickFiltersSetting(response: Response): Promise<(CustomQuickFilterOfListingQuery | null)[]> {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as (CustomQuickFilterOfListingQuery | null)[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve<(CustomQuickFilterOfListingQuery | null)[]>(null as any);\n }\n\n setCustomInventoryQuickFiltersSetting(value: CustomQuickFilterOfListingQuery[]): Promise {\n let url_ = this.baseUrl + \"/api/SellerUser/SetCustomInventoryQuickFiltersSetting\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(value);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processSetCustomInventoryQuickFiltersSetting(_response);\n });\n }\n\n protected processSetCustomInventoryQuickFiltersSetting(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getCustomOnSaleEventQuickFiltersSetting(): Promise<(CustomQuickFilterOfOnSaleEventQuery | null)[]> {\n let url_ = this.baseUrl + \"/api/SellerUser/GetCustomOnSaleEventQuickFiltersSetting\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetCustomOnSaleEventQuickFiltersSetting(_response);\n });\n }\n\n protected processGetCustomOnSaleEventQuickFiltersSetting(response: Response): Promise<(CustomQuickFilterOfOnSaleEventQuery | null)[]> {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as (CustomQuickFilterOfOnSaleEventQuery | null)[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve<(CustomQuickFilterOfOnSaleEventQuery | null)[]>(null as any);\n }\n\n setCustomOnSaleEventQuickFiltersSetting(value: CustomQuickFilterOfOnSaleEventQuery[]): Promise {\n let url_ = this.baseUrl + \"/api/SellerUser/SetCustomOnSaleEventQuickFiltersSetting\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(value);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processSetCustomOnSaleEventQuickFiltersSetting(_response);\n });\n }\n\n protected processSetCustomOnSaleEventQuickFiltersSetting(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getCustomSalesQuickFiltersSetting(): Promise<(CustomQuickFilterOfSaleQuery | null)[]> {\n let url_ = this.baseUrl + \"/api/SellerUser/GetCustomSalesQuickFiltersSetting\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetCustomSalesQuickFiltersSetting(_response);\n });\n }\n\n protected processGetCustomSalesQuickFiltersSetting(response: Response): Promise<(CustomQuickFilterOfSaleQuery | null)[]> {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as (CustomQuickFilterOfSaleQuery | null)[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve<(CustomQuickFilterOfSaleQuery | null)[]>(null as any);\n }\n\n setCustomSalesQuickFiltersSetting(value: CustomQuickFilterOfSaleQuery[]): Promise {\n let url_ = this.baseUrl + \"/api/SellerUser/SetCustomSalesQuickFiltersSetting\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(value);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processSetCustomSalesQuickFiltersSetting(_response);\n });\n }\n\n protected processSetCustomSalesQuickFiltersSetting(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getCustomPurchasesQuickFiltersSetting(): Promise<(CustomQuickFilterOfPurchaseOrderQuery | null)[]> {\n let url_ = this.baseUrl + \"/api/SellerUser/GetCustomPurchasesQuickFiltersSetting\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetCustomPurchasesQuickFiltersSetting(_response);\n });\n }\n\n protected processGetCustomPurchasesQuickFiltersSetting(response: Response): Promise<(CustomQuickFilterOfPurchaseOrderQuery | null)[]> {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as (CustomQuickFilterOfPurchaseOrderQuery | null)[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve<(CustomQuickFilterOfPurchaseOrderQuery | null)[]>(null as any);\n }\n\n setCustomPurchasesQuickFiltersSetting(value: CustomQuickFilterOfPurchaseOrderQuery[]): Promise {\n let url_ = this.baseUrl + \"/api/SellerUser/SetCustomPurchasesQuickFiltersSetting\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(value);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processSetCustomPurchasesQuickFiltersSetting(_response);\n });\n }\n\n protected processSetCustomPurchasesQuickFiltersSetting(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getCustomMarketplacePaymentsQuickFiltersSetting(): Promise<(CustomQuickFilterOfMarketplacePaymentQuery | null)[]> {\n let url_ = this.baseUrl + \"/api/SellerUser/GetCustomMarketplacePaymentsQuickFiltersSetting\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetCustomMarketplacePaymentsQuickFiltersSetting(_response);\n });\n }\n\n protected processGetCustomMarketplacePaymentsQuickFiltersSetting(response: Response): Promise<(CustomQuickFilterOfMarketplacePaymentQuery | null)[]> {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as (CustomQuickFilterOfMarketplacePaymentQuery | null)[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve<(CustomQuickFilterOfMarketplacePaymentQuery | null)[]>(null as any);\n }\n\n setCustomMarketplacePaymentsQuickFiltersSetting(value: CustomQuickFilterOfMarketplacePaymentQuery[]): Promise {\n let url_ = this.baseUrl + \"/api/SellerUser/SetCustomMarketplacePaymentsQuickFiltersSetting\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(value);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processSetCustomMarketplacePaymentsQuickFiltersSetting(_response);\n });\n }\n\n protected processSetCustomMarketplacePaymentsQuickFiltersSetting(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getAvailableReleaseNoteInfos(currentLoginUserOnly: boolean | undefined, getUnreadOnly: boolean | undefined): Promise {\n let url_ = this.baseUrl + \"/api/SellerUser/GetAvailableReleaseNoteInfos?\";\n if (currentLoginUserOnly === null)\n throw new Error(\"The parameter 'currentLoginUserOnly' cannot be null.\");\n else if (currentLoginUserOnly !== undefined)\n url_ += \"currentLoginUserOnly=\" + encodeURIComponent(\"\" + currentLoginUserOnly) + \"&\";\n if (getUnreadOnly === null)\n throw new Error(\"The parameter 'getUnreadOnly' cannot be null.\");\n else if (getUnreadOnly !== undefined)\n url_ += \"getUnreadOnly=\" + encodeURIComponent(\"\" + getUnreadOnly) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetAvailableReleaseNoteInfos(_response);\n });\n }\n\n protected processGetAvailableReleaseNoteInfos(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReleaseNote[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getHasReleaseNotesUnread(currentLoginUserOnly: boolean | undefined): Promise {\n let url_ = this.baseUrl + \"/api/SellerUser/GetHasReleaseNotesUnread?\";\n if (currentLoginUserOnly === null)\n throw new Error(\"The parameter 'currentLoginUserOnly' cannot be null.\");\n else if (currentLoginUserOnly !== undefined)\n url_ += \"currentLoginUserOnly=\" + encodeURIComponent(\"\" + currentLoginUserOnly) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetHasReleaseNotesUnread(_response);\n });\n }\n\n protected processGetHasReleaseNotesUnread(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getReleaseNoteHtmlByReleaseNoteIds(currentLoginUserOnly: boolean | undefined, releaseNoteIds: number[]): Promise {\n let url_ = this.baseUrl + \"/api/SellerUser/GetReleaseNoteHtmlByReleaseNoteIds?\";\n if (currentLoginUserOnly === null)\n throw new Error(\"The parameter 'currentLoginUserOnly' cannot be null.\");\n else if (currentLoginUserOnly !== undefined)\n url_ += \"currentLoginUserOnly=\" + encodeURIComponent(\"\" + currentLoginUserOnly) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(releaseNoteIds);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetReleaseNoteHtmlByReleaseNoteIds(_response);\n });\n }\n\n protected processGetReleaseNoteHtmlByReleaseNoteIds(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ReleaseNote[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getAllTutorialItems(currentLoginUserOnly: boolean | undefined): Promise {\n let url_ = this.baseUrl + \"/api/SellerUser/GetAllTutorialItems?\";\n if (currentLoginUserOnly === null)\n throw new Error(\"The parameter 'currentLoginUserOnly' cannot be null.\");\n else if (currentLoginUserOnly !== undefined)\n url_ += \"currentLoginUserOnly=\" + encodeURIComponent(\"\" + currentLoginUserOnly) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetAllTutorialItems(_response);\n });\n }\n\n protected processGetAllTutorialItems(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as TutorialItem[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getTutorialItemContents(tutorialItemIds: number[]): Promise {\n let url_ = this.baseUrl + \"/api/SellerUser/GetTutorialItemContents\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(tutorialItemIds);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetTutorialItemContents(_response);\n });\n }\n\n protected processGetTutorialItemContents(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as TutorialItemContent[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface ITagClient {\n\n getTagsByEntityTypeId(entityType: ActionOutboxEntityType | undefined, includeInReport: boolean | null | undefined): Promise;\n\n getTagsWithValueByEntityTypeId(entityType: ActionOutboxEntityType | undefined): Promise;\n\n upsertEntityTagsMetadata(entityType: ActionOutboxEntityType | undefined, tags: Tag[]): Promise;\n\n deleteEntityTagsMetadata(entityType: ActionOutboxEntityType | undefined, tagNames: string[]): Promise;\n}\n\nexport class TagClient extends PosClientBase implements ITagClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(configuration: PosClientConfig, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n super(configuration);\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"\";\n }\n\n getTagsByEntityTypeId(entityType: ActionOutboxEntityType | undefined, includeInReport: boolean | null | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Tag/GetTagsByEntityTypeId?\";\n if (entityType === null)\n throw new Error(\"The parameter 'entityType' cannot be null.\");\n else if (entityType !== undefined)\n url_ += \"entityType=\" + encodeURIComponent(\"\" + entityType) + \"&\";\n if (includeInReport !== undefined && includeInReport !== null)\n url_ += \"includeInReport=\" + encodeURIComponent(\"\" + includeInReport) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetTagsByEntityTypeId(_response);\n });\n }\n\n protected processGetTagsByEntityTypeId(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as Tag[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n getTagsWithValueByEntityTypeId(entityType: ActionOutboxEntityType | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Tag/GetTagsWithValueByEntityTypeId?\";\n if (entityType === null)\n throw new Error(\"The parameter 'entityType' cannot be null.\");\n else if (entityType !== undefined)\n url_ += \"entityType=\" + encodeURIComponent(\"\" + entityType) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetTagsWithValueByEntityTypeId(_response);\n });\n }\n\n protected processGetTagsWithValueByEntityTypeId(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as Tag[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n upsertEntityTagsMetadata(entityType: ActionOutboxEntityType | undefined, tags: Tag[]): Promise {\n let url_ = this.baseUrl + \"/api/Tag/UpsertEntityTagsMetadata?\";\n if (entityType === null)\n throw new Error(\"The parameter 'entityType' cannot be null.\");\n else if (entityType !== undefined)\n url_ += \"entityType=\" + encodeURIComponent(\"\" + entityType) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(tags);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpsertEntityTagsMetadata(_response);\n });\n }\n\n protected processUpsertEntityTagsMetadata(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n deleteEntityTagsMetadata(entityType: ActionOutboxEntityType | undefined, tagNames: string[]): Promise {\n let url_ = this.baseUrl + \"/api/Tag/DeleteEntityTagsMetadata?\";\n if (entityType === null)\n throw new Error(\"The parameter 'entityType' cannot be null.\");\n else if (entityType !== undefined)\n url_ += \"entityType=\" + encodeURIComponent(\"\" + entityType) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(tagNames);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processDeleteEntityTagsMetadata(_response);\n });\n }\n\n protected processDeleteEntityTagsMetadata(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface ITicketClient {\n\n getAllDeliveryTypeTicketTypeMappings(): Promise;\n\n mergeTicketGroups(input: TicketGroupMergeInput, isManual: boolean | undefined): Promise;\n}\n\nexport class TicketClient extends PosClientBase implements ITicketClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(configuration: PosClientConfig, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n super(configuration);\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"\";\n }\n\n getAllDeliveryTypeTicketTypeMappings(): Promise {\n let url_ = this.baseUrl + \"/api/Ticket/GetAllDeliveryTypeTicketTypeMappings\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetAllDeliveryTypeTicketTypeMappings(_response);\n });\n }\n\n protected processGetAllDeliveryTypeTicketTypeMappings(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as DeliveryTypeTicketTypeMapping[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n mergeTicketGroups(input: TicketGroupMergeInput, isManual: boolean | undefined): Promise {\n let url_ = this.baseUrl + \"/api/Ticket/MergeTicketGroups?\";\n if (isManual === null)\n throw new Error(\"The parameter 'isManual' cannot be null.\");\n else if (isManual !== undefined)\n url_ += \"isManual=\" + encodeURIComponent(\"\" + isManual) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(input);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processMergeTicketGroups(_response);\n });\n }\n\n protected processMergeTicketGroups(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface IUserGroupClient {\n\n getUserGroups(): Promise;\n\n insertUserGroup(userGroupName: string | undefined, userGroupDescription: string | null | undefined, sellerUserIds: string[]): Promise;\n\n updateUserGroup(userGroupId: number | undefined, userGroupName: string | undefined, userGroupDescription: string | null | undefined, sellerUserIds: string[]): Promise;\n\n deleteUserGroup(userGroupId: number | undefined): Promise;\n}\n\nexport class UserGroupClient extends PosClientBase implements IUserGroupClient {\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(configuration: PosClientConfig, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\n super(configuration);\n this.http = http ? http : window as any;\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"\";\n }\n\n getUserGroups(): Promise {\n let url_ = this.baseUrl + \"/api/UserGroup/GetUserGroups\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"GET\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processGetUserGroups(_response);\n });\n }\n\n protected processGetUserGroups(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as UserGroup[];\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n insertUserGroup(userGroupName: string | undefined, userGroupDescription: string | null | undefined, sellerUserIds: string[]): Promise {\n let url_ = this.baseUrl + \"/api/UserGroup/InsertUserGroup?\";\n if (userGroupName === null)\n throw new Error(\"The parameter 'userGroupName' cannot be null.\");\n else if (userGroupName !== undefined)\n url_ += \"userGroupName=\" + encodeURIComponent(\"\" + userGroupName) + \"&\";\n if (userGroupDescription !== undefined && userGroupDescription !== null)\n url_ += \"userGroupDescription=\" + encodeURIComponent(\"\" + userGroupDescription) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(sellerUserIds);\n\n let options_: RequestInit = {\n body: content_,\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processInsertUserGroup(_response);\n });\n }\n\n protected processInsertUserGroup(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as number;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n updateUserGroup(userGroupId: number | undefined, userGroupName: string | undefined, userGroupDescription: string | null | undefined, sellerUserIds: string[]): Promise {\n let url_ = this.baseUrl + \"/api/UserGroup/UpdateUserGroup?\";\n if (userGroupId === null)\n throw new Error(\"The parameter 'userGroupId' cannot be null.\");\n else if (userGroupId !== undefined)\n url_ += \"userGroupId=\" + encodeURIComponent(\"\" + userGroupId) + \"&\";\n if (userGroupName === null)\n throw new Error(\"The parameter 'userGroupName' cannot be null.\");\n else if (userGroupName !== undefined)\n url_ += \"userGroupName=\" + encodeURIComponent(\"\" + userGroupName) + \"&\";\n if (userGroupDescription !== undefined && userGroupDescription !== null)\n url_ += \"userGroupDescription=\" + encodeURIComponent(\"\" + userGroupDescription) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n const content_ = JSON.stringify(sellerUserIds);\n\n let options_: RequestInit = {\n body: content_,\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processUpdateUserGroup(_response);\n });\n }\n\n protected processUpdateUserGroup(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n\n deleteUserGroup(userGroupId: number | undefined): Promise {\n let url_ = this.baseUrl + \"/api/UserGroup/DeleteUserGroup?\";\n if (userGroupId === null)\n throw new Error(\"The parameter 'userGroupId' cannot be null.\");\n else if (userGroupId !== undefined)\n url_ += \"userGroupId=\" + encodeURIComponent(\"\" + userGroupId) + \"&\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_: RequestInit = {\n method: \"DELETE\",\n headers: {\n \"Accept\": \"application/json\"\n }\n };\n\n return this.transformOptions(options_).then(transformedOptions_ => {\n return this.http.fetch(url_, transformedOptions_);\n }).then((_response: Response) => {\n return this.processDeleteUserGroup(_response);\n });\n }\n\n protected processDeleteUserGroup(response: Response): Promise {\n const status = response.status;\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\n if (status === 200) {\n return response.text().then((_responseText) => {\n let result200: any = null;\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver) as boolean;\n return result200;\n });\n } else if (status !== 200 && status !== 204) {\n return response.text().then((_responseText) => {\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n });\n }\n return Promise.resolve(null as any);\n }\n}\n\nexport interface ActivityLog {\n activityLogId: number;\n entityId: number;\n entityType: ActionOutboxEntityType;\n actionDate: string;\n initiatedBy: ActivityLogInitiatedByUser;\n initiatedByImpersonated: ActivityLogInitiatedByUser | null;\n actionType: ActionType;\n auditActionType: AuditActionType | null;\n actionTypeDisplay: string;\n additionalInfo: ActivityLogAdditionalInformationDictionaryOfActivityLogValueChange;\n event: Event | null;\n performer: Performer | null;\n venue: Venue | null;\n tagName: string | null;\n}\n\nexport enum ActionOutboxEntityType {\n Sale = \"Sale\",\n Listing = \"Listing\",\n Purchase = \"Purchase\",\n SellerSupportCase = \"SellerSupportCase\",\n Document = \"Document\",\n SellerEvent = \"SellerEvent\",\n InboundEmail = \"InboundEmail\",\n TicketGroup = \"TicketGroup\",\n}\n\nexport interface ActivityLogInitiatedByUser {\n userId: string;\n username: string | null;\n}\n\nexport enum ActionType {\n SaleConfirm = \"SaleConfirm\",\n SaleReject = \"SaleReject\",\n SaleUploadBarcodes = \"SaleUploadBarcodes\",\n SaleUploadTicketUrls = \"SaleUploadTicketUrls\",\n SaleUploadProofOfTransfer = \"SaleUploadProofOfTransfer\",\n SaleUploadEtickets = \"SaleUploadEtickets\",\n SaleMarketplaceInsert = \"SaleMarketplaceInsert\",\n SaleMarketplaceUpdate = \"SaleMarketplaceUpdate\",\n SaleBroadcastConfirmSale = \"SaleBroadcastConfirmSale\",\n SaleBroadcastRejectSale = \"SaleBroadcastRejectSale\",\n SaleBroadcastUploadBarcodes = \"SaleBroadcastUploadBarcodes\",\n SaleBroadcastUploadETickets = \"SaleBroadcastUploadETickets\",\n SaleBroadcastUploadTransferProof = \"SaleBroadcastUploadTransferProof\",\n SaleBroadcastUploadTransferUrls = \"SaleBroadcastUploadTransferUrls\",\n SaleViewed = \"SaleViewed\",\n SaleDeallocate = \"SaleDeallocate\",\n SaleMarketplaceUpdateTicketType = \"SaleMarketplaceUpdateTicketType\",\n SaleHoldTickets = \"SaleHoldTickets\",\n SaleHoldExpire = \"SaleHoldExpire\",\n SaleHoldCreate = \"SaleHoldCreate\",\n SaleUploadTransferProofId = \"SaleUploadTransferProofId\",\n SaleBroadcastUploadTransferProofId = \"SaleBroadcastUploadTransferProofId\",\n SaleUpdateTicketType = \"SaleUpdateTicketType\",\n SaleTicketMasterBarcodeTransfer = \"SaleTicketMasterBarcodeTransfer\",\n SaleCostUpdate = \"SaleCostUpdate\",\n SaleCostInsert = \"SaleCostInsert\",\n SaleCostDelete = \"SaleCostDelete\",\n SaleBroadcastUpdateTicketType = \"SaleBroadcastUpdateTicketType\",\n SaleConfirmTransferWithoutProof = \"SaleConfirmTransferWithoutProof\",\n SaleResetFulfillment = \"SaleResetFulfillment\",\n SaleTotalProceedsUpdate = \"SaleTotalProceedsUpdate\",\n SaleDocumentUploadActivity = \"SaleDocumentUploadActivity\",\n SaleFulfillWithoutArtifacts = \"SaleFulfillWithoutArtifacts\",\n SaleNoFulfillUpdate = \"SaleNoFulfillUpdate\",\n SaleTicketsAllocatedAction = \"SaleTicketsAllocatedAction\",\n SaleCommissionsUpdate = \"SaleCommissionsUpdate\",\n SaleRemoveTicketUserDocuments = \"SaleRemoveTicketUserDocuments\",\n SaleUpdatePaymentState = \"SaleUpdatePaymentState\",\n ListingInsert = \"ListingInsert\",\n ListingUpdateUnitNetProceeds = \"ListingUpdateUnitNetProceeds\",\n ListingUpdateAllInPrice = \"ListingUpdateAllInPrice\",\n ListingUpdateDeliveryType = \"ListingUpdateDeliveryType\",\n ListingUpdateSplitType = \"ListingUpdateSplitType\",\n ListingUpdateInHandDate = \"ListingUpdateInHandDate\",\n ListingUpdateHideSeats = \"ListingUpdateHideSeats\",\n ListingSplit = \"ListingSplit\",\n ListingMerge = \"ListingMerge\",\n ListingBroadcast = \"ListingBroadcast\",\n ListingUnbroadcast = \"ListingUnbroadcast\",\n ListingMarketplaceInsert = \"ListingMarketplaceInsert\",\n ListingMarketplaceUpdate = \"ListingMarketplaceUpdate\",\n ListingMarketplaceDelete = \"ListingMarketplaceDelete\",\n ListingUpdatePricerUserId = \"ListingUpdatePricerUserId\",\n BroadcastMarketplaceListing = \"BroadcastMarketplaceListing\",\n UnbroadcastMarketplaceListing = \"UnbroadcastMarketplaceListing\",\n ListingBroadcastMergeListing = \"ListingBroadcastMergeListing\",\n ListingBroadcastSplitListing = \"ListingBroadcastSplitListing\",\n ListingBroadcastUpdateInHandDate = \"ListingBroadcastUpdateInHandDate\",\n ListingBroadcastUpdateAllInPrice = \"ListingBroadcastUpdateAllInPrice\",\n ListingBroadcastUpdateUnitNetProceeds = \"ListingBroadcastUpdateUnitNetProceeds\",\n ListingBroadcastUpdateSplitType = \"ListingBroadcastUpdateSplitType\",\n ListingBroadcastUpdateDeliveryType = \"ListingBroadcastUpdateDeliveryType\",\n ListingViewed = \"ListingViewed\",\n ListingDelete = \"ListingDelete\",\n ListingUpdateQuantity = \"ListingUpdateQuantity\",\n ListingBroadcastUpdateQuantity = \"ListingBroadcastUpdateQuantity\",\n ListingUpdateListingNotes = \"ListingUpdateListingNotes\",\n ListingBroadcastUpdateListingNotes = \"ListingBroadcastUpdateListingNotes\",\n ListingUpdateSeating = \"ListingUpdateSeating\",\n ListingBroadcastUpdateSeating = \"ListingBroadcastUpdateSeating\",\n ListingPreDeliverBarcodes = \"ListingPreDeliverBarcodes\",\n ListingPreDeliverETickets = \"ListingPreDeliverETickets\",\n ListingRebroadcast = \"ListingRebroadcast\",\n ListingSyncUpdate = \"ListingSyncUpdate\",\n ListingUpdateNetProceedsFloor = \"ListingUpdateNetProceedsFloor\",\n ListingAutoPricingConfig = \"ListingAutoPricingConfig\",\n ListingAutoPricingResultUpdate = \"ListingAutoPricingResultUpdate\",\n ListingPreDeliverTicketExternalIds = \"ListingPreDeliverTicketExternalIds\",\n ListingPreDeliverTicketUrls = \"ListingPreDeliverTicketUrls\",\n ListingMarketplaceSeatingOverrideUpdate = \"ListingMarketplaceSeatingOverrideUpdate\",\n ListingRemoveTicketBarcodes = \"ListingRemoveTicketBarcodes\",\n ListingRemoveTicketUserDocuments = \"ListingRemoveTicketUserDocuments\",\n ListingUploadVerificationDocumentAction = \"ListingUploadVerificationDocumentAction\",\n ListingCompsViewed = \"ListingCompsViewed\",\n ListingOfflineSaleAdded = \"ListingOfflineSaleAdded\",\n ListingDocumentViewed = \"ListingDocumentViewed\",\n ListingDocumentDownloaded = \"ListingDocumentDownloaded\",\n ListingBroadcastUploadVerificationDocument = \"ListingBroadcastUploadVerificationDocument\",\n ListingBroadcastUpdateHideSeats = \"ListingBroadcastUpdateHideSeats\",\n ListingDocumentUploadActivity = \"ListingDocumentUploadActivity\",\n ListingUpdateUnitCost = \"ListingUpdateUnitCost\",\n ListingUpdateInternalNotes = \"ListingUpdateInternalNotes\",\n ListingNoFulfillUpdate = \"ListingNoFulfillUpdate\",\n ListingUpdateAdminHold = \"ListingUpdateAdminHold\",\n ListingListingGroupUpdate = \"ListingListingGroupUpdate\",\n ListingSaleConfirm = \"ListingSaleConfirm\",\n ListingSaleDeallocate = \"ListingSaleDeallocate\",\n ListingSaleMarketplaceInsert = \"ListingSaleMarketplaceInsert\",\n ListingUpdateTopTicketType = \"ListingUpdateTopTicketType\",\n ListingUpdateDuplicateAttribute = \"ListingUpdateDuplicateAttribute\",\n SellerSupportCaseCreate = \"SellerSupportCaseCreate\",\n SellerSupportCaseReply = \"SellerSupportCaseReply\",\n PurchaseInsert = \"PurchaseInsert\",\n PurchaseTicketGroupsMerge = \"PurchaseTicketGroupsMerge\",\n PurchasePaymentsMerge = \"PurchasePaymentsMerge\",\n PurchaseCostsMerge = \"PurchaseCostsMerge\",\n PurchaseUpdate = \"PurchaseUpdate\",\n PurchaseTicketGroupUpdate = \"PurchaseTicketGroupUpdate\",\n PurchaseTicketGroupInsert = \"PurchaseTicketGroupInsert\",\n PurchaseTicketGroupDelete = \"PurchaseTicketGroupDelete\",\n PurchasePaymentUpdate = \"PurchasePaymentUpdate\",\n PurchasePaymentInsert = \"PurchasePaymentInsert\",\n PurchasePaymentDelete = \"PurchasePaymentDelete\",\n PurchaseCostUpdate = \"PurchaseCostUpdate\",\n PurchaseCostInsert = \"PurchaseCostInsert\",\n PurchaseCostDelete = \"PurchaseCostDelete\",\n PurchaseCancel = \"PurchaseCancel\",\n PurchaseVoid = \"PurchaseVoid\",\n PurchaseResetListings = \"PurchaseResetListings\",\n PurchaseOrderQualityStateUpdate = \"PurchaseOrderQualityStateUpdate\",\n SaleDocumentUpload = \"SaleDocumentUpload\",\n ListingDocumentUpload = \"ListingDocumentUpload\",\n InboundEmailReprocess = \"InboundEmailReprocess\",\n}\n\nexport enum AuditActionType {\n TagCreate = \"TagCreate\",\n TagUpdate = \"TagUpdate\",\n TagDelete = \"TagDelete\",\n TagTypeCreate = \"TagTypeCreate\",\n TagTypeUpdate = \"TagTypeUpdate\",\n SaleInternalNotesUpdate = \"SaleInternalNotesUpdate\",\n SaleInternalNotesInsert = \"SaleInternalNotesInsert\",\n ListingSellerEventUpdate = \"ListingSellerEventUpdate\",\n PurchaseCommissionUpdate = \"PurchaseCommissionUpdate\",\n PurchaseCommissionInsert = \"PurchaseCommissionInsert\",\n PurchaseInternalNotesUpdate = \"PurchaseInternalNotesUpdate\",\n PurchaseInternalNotesInsert = \"PurchaseInternalNotesInsert\",\n}\n\nexport interface ActivityLogAdditionalInformationDictionaryOfActivityLogValueChange {\n\n [key: string]: ActivityLogValueChange | any;\n}\n\nexport interface ActivityLogValueChange {\n oldValue: string | null;\n newValue: string | null;\n message: ActivityLogMessage | null;\n}\n\nexport interface ActivityLogMessage {\n errorCode: string | null;\n message: string | null;\n state: MarketplaceOperationResultState;\n}\n\nexport enum MarketplaceOperationResultState {\n Succeeded = \"Succeeded\",\n FailedWithRetryableError = \"FailedWithRetryableError\",\n FailedWithNonRetryableError = \"FailedWithNonRetryableError\",\n FailedAndRequiresSellerAction = \"FailedAndRequiresSellerAction\",\n NotImplemented = \"NotImplemented\",\n Skipped = \"Skipped\",\n}\n\nexport interface CatalogEntity {\n /** ViagogoEntityId */\n viagId: number | null;\n name: string;\n shortName: string | null;\n descr: string | null;\n}\n\nexport interface Event extends CatalogEntity {\n /** PosEventIdS */\n posIds: string[];\n viagVirtualId: string;\n mappingId: string | null;\n dates: DateTimeRange;\n datesUtc: DateTimeRange;\n onSaleDate: string | null;\n rawOnSaleDate: string | null;\n rawPreSaleDate: string | null;\n shortName: string | null;\n eventType: string | null;\n eventStatus: ApiEventStatus | null;\n /** Performer Id */\n perfId: number | null;\n venueId: number;\n venueCfgId: number | null;\n genre: TopLevelCategory;\n /** Mapping Rejection Reason Id */\n mapRejRsnId: number | null;\n /** Mapping Rejection Reason Default Text */\n mapRejDftTxt: string | null;\n}\n\nexport interface DateTimeRange {\n start: string | null;\n end: string | null;\n}\n\nexport enum ApiEventStatus {\n Normal = \"Normal\",\n Postponed = \"Postponed\",\n Cancelled = \"Cancelled\",\n Rescheduled = \"Rescheduled\",\n Relocated = \"Relocated\",\n RelocatedAndRescheduled = \"RelocatedAndRescheduled\",\n Draft = \"Draft\",\n Deleted = \"Deleted\",\n Contingent = \"Contingent\",\n}\n\nexport enum TopLevelCategory {\n Theatre = \"Theatre\",\n Sports = \"Sports\",\n Concert = \"Concert\",\n Festival = \"Festival\",\n}\n\nexport interface Performer extends CatalogEntity {\n /** Categories */\n categ: TopLevelCategory[];\n /** Genre Id */\n genreId: number | null;\n /** Genre name */\n grName: string | null;\n descr: string | null;\n}\n\nexport interface Venue extends CatalogEntity {\n descr: string | null;\n city: string | null;\n /** State/Province */\n state: string | null;\n country: Country | null;\n /** Do not include this object as first-class search-result items\nSince this obj is embedded in another object as an info-only obj */\n excludeSearch: boolean;\n}\n\nexport interface Country {\n code: string | null;\n name: string | null;\n}\n\nexport interface ActivityLogQuery {\n userId: string | null;\n includeUserOnly: boolean | null;\n impersonatedUserId: string | null;\n entityId: number | null;\n entityType: ActionOutboxEntityType | null;\n actionTypes: ActionType[] | null;\n auditActionTypes: AuditActionType[] | null;\n take: number | null;\n skip: number | null;\n /** Filter by tag name within audit data */\n tagName: string | null;\n}\n\nexport enum DocumentType {\n ETicket = \"ETicket\",\n TicketTransfer = \"TicketTransfer\",\n AirBill = \"AirBill\",\n PKPass = \"PKPass\",\n GoogleWallet = \"GoogleWallet\",\n ListingVerification = \"ListingVerification\",\n QRCode = \"QRCode\",\n}\n\nexport interface StateProvince {\n id: number;\n name: string;\n countryName: string;\n cId: number | null;\n}\n\nexport interface City {\n id: number;\n name: string;\n stateProvinceName: string | null;\n countryName: string;\n cId: number | null;\n}\n\nexport interface ReactAppContext {\n stage: string;\n appName: string;\n isNativeApp: boolean;\n cobrandId: CoBrandId;\n environment: string;\n features: FeatureDetail[];\n isDevelopment: boolean;\n version: string;\n}\n\nexport enum CoBrandId {\n Viagogo = \"Viagogo\",\n TicketUtil = \"TicketUtil\",\n Starburst = \"Starburst\",\n StubHub = \"StubHub\",\n}\n\nexport interface FeatureDetail {\n id: Feature;\n state: FeatureState;\n}\n\nexport enum Feature {\n AutoPricing = \"AutoPricing\",\n HomePageActivityLog = \"HomePageActivityLog\",\n OneTicketTransferApi = \"OneTicketTransferApi\",\n AdvanceAutopricingModes = \"AdvanceAutopricingModes\",\n CompListingMode_ParentListing = \"CompListingMode_ParentListing\",\n ExportInventory = \"ExportInventory\",\n ListingIdForCompListings = \"ListingIdForCompListings\",\n InventoryEventRecentTransactions = \"InventoryEventRecentTransactions\",\n ScaledSeatScore = \"ScaledSeatScore\",\n SaleEditChargesAndCredits = \"SaleEditChargesAndCredits\",\n SeatSaver = \"SeatSaver\",\n MarketplacePaymentTerms = \"MarketplacePaymentTerms\",\n BulkDownloadEventPrompt = \"BulkDownloadEventPrompt\",\n ConfirmTransferWithoutProof = \"ConfirmTransferWithoutProof\",\n TeamManagement = \"TeamManagement\",\n BezierGraphControlPointsManager = \"BezierGraphControlPointsManager\",\n UndercutByRankListingGroup = \"UndercutByRankListingGroup\",\n UpdatedVenueMapPrompt = \"UpdatedVenueMapPrompt\",\n ReportSnapshot = \"ReportSnapshot\",\n ReportFilterByCommissionUser = \"ReportFilterByCommissionUser\",\n DisplayBuildVersion = \"DisplayBuildVersion\",\n OverrideDailyFxRate = \"OverrideDailyFxRate\",\n PricedAtZeroFilter = \"PricedAtZeroFilter\",\n POSTimezone = \"POSTimezone\",\n PricingCatchup = \"PricingCatchup\",\n PriceByWebsitePrice = \"PriceByWebsitePrice\",\n InventoryTileMetricV2 = \"InventoryTileMetricV2\",\n ExcludeFanInventory = \"ExcludeFanInventory\",\n PurchaseSettingsTab = \"PurchaseSettingsTab\",\n CurrencyConversionSettingsTab = \"CurrencyConversionSettingsTab\",\n SalesInEventPage = \"SalesInEventPage\",\n BulkUpdateInternalNotes = \"BulkUpdateInternalNotes\",\n AutoPriceFrequency = \"AutoPriceFrequency\",\n TagTypesUserGroup = \"TagTypesUserGroup\",\n DisableAutoSourcing = \"DisableAutoSourcing\",\n FilterPOByPaymentMethodId = \"FilterPOByPaymentMethodId\",\n ArAgingReport = \"ArAgingReport\",\n MarketplacePaymentLinesDisplay = \"MarketplacePaymentLinesDisplay\",\n InventoryEventPageV2 = \"InventoryEventPageV2\",\n DynamicPricingBySTR = \"DynamicPricingBySTR\",\n GroupingDrip = \"GroupingDrip\",\n AutoPricingGroupSettings = \"AutoPricingGroupSettings\",\n ReportMaxRowLimit = \"ReportMaxRowLimit\",\n SaleSkyboxNotesSection = \"SaleSkyboxNotesSection\",\n EnableDisableMarketplaces = \"EnableDisableMarketplaces\",\n SaleMarkedAsFulfilled = \"SaleMarkedAsFulfilled\",\n AutoCompAndGroup = \"AutoCompAndGroup\",\n ExcludeFullySoldInGroup = \"ExcludeFullySoldInGroup\",\n ReportingV2 = \"ReportingV2\",\n AutoFulfillSetting = \"AutoFulfillSetting\",\n BulkCancelVoidPurchase = \"BulkCancelVoidPurchase\",\n PurchasePredelivery = \"PurchasePredelivery\",\n PricingSettingsInTable = \"PricingSettingsInTable\",\n SponsoredListings = \"SponsoredListings\",\n VenueMapCtrlPlusM = \"VenueMapCtrlPlusM\",\n ScoreSectionRowTable = \"ScoreSectionRowTable\",\n BulkEditInPurchaseEvent = \"BulkEditInPurchaseEvent\",\n HandlingListingSignalR = \"HandlingListingSignalR\",\n UpdateSalesOfListingsDeliveryInfo = \"UpdateSalesOfListingsDeliveryInfo\",\n VenueMapRectSelect = \"VenueMapRectSelect\",\n ViewListingOriginalSeating = \"ViewListingOriginalSeating\",\n BulkDeleteTicketGroup = \"BulkDeleteTicketGroup\",\n FulfillmentProviders = \"FulfillmentProviders\",\n EventDeliveryStrategy = \"EventDeliveryStrategy\",\n EventListingTableHotkeys = \"EventListingTableHotkeys\",\n AutoGroupAndCompV2 = \"AutoGroupAndCompV2\",\n ListingGroupingMethods = \"ListingGroupingMethods\",\n SidePanelWidths = \"SidePanelWidths\",\n GroupSoldListings = \"GroupSoldListings\",\n PricingV2DemandDashboard = \"PricingV2DemandDashboard\",\n TablePinActionColumn = \"TablePinActionColumn\",\n FilterEventByLocation = \"FilterEventByLocation\",\n CustomVenueRows = \"CustomVenueRows\",\n EventStatusDisplay = \"EventStatusDisplay\",\n BulkActionGroupListings = \"BulkActionGroupListings\",\n SellerAccountPurchaseVendorOverride = \"SellerAccountPurchaseVendorOverride\",\n PricingABTest = \"PricingABTest\",\n EnableNativeSyncToggle = \"EnableNativeSyncToggle\",\n BulkUpdateIndividualTicketGroup = \"BulkUpdateIndividualTicketGroup\",\n AutoCompRankOverrides = \"AutoCompRankOverrides\",\n VendorAccountV2 = \"VendorAccountV2\",\n UpgradedGroupListingView = \"UpgradedGroupListingView\",\n FullPageEventView = \"FullPageEventView\",\n SaleSeatsSoldAs = \"SaleSeatsSoldAs\",\n UpcomingOnSalesPage = \"UpcomingOnSalesPage\",\n RemoveUiGateOnUnmap = \"RemoveUiGateOnUnmap\",\n VendorAccountDeliveryStrategy = \"VendorAccountDeliveryStrategy\",\n SortListingsInGroup = \"SortListingsInGroup\",\n ReorderListingInGroup = \"ReorderListingInGroup\",\n EditMapInListingTab = \"EditMapInListingTab\",\n BackfillDeliveryStrategyInventoryEvent = \"BackfillDeliveryStrategyInventoryEvent\",\n BackfillDeliveryStrategyPurchaseEvent = \"BackfillDeliveryStrategyPurchaseEvent\",\n BackfillDeliveryStrategyVendorAccount = \"BackfillDeliveryStrategyVendorAccount\",\n BackfillDeliveryStrategyInventoryEventToSales = \"BackfillDeliveryStrategyInventoryEventToSales\",\n BackfillDeliveryStrategyPurchaseEventToSales = \"BackfillDeliveryStrategyPurchaseEventToSales\",\n BackfillDeliveryStrategyVendorAccountToSales = \"BackfillDeliveryStrategyVendorAccountToSales\",\n FullPageEventViewEntitySelection = \"FullPageEventViewEntitySelection\",\n CompQuantitiesFilter = \"CompQuantitiesFilter\",\n FullPageEventViewSideTableBulkEdit = \"FullPageEventViewSideTableBulkEdit\",\n DefaultNotToMergeHoldListings = \"DefaultNotToMergeHoldListings\",\n CustomDeliveryType = \"CustomDeliveryType\",\n ListingNotesAdditionalInfo = \"ListingNotesAdditionalInfo\",\n TicketTypeIconOverlay = \"TicketTypeIconOverlay\",\n FullPageEventViewSideTableFilters = \"FullPageEventViewSideTableFilters\",\n BulkEditsToListingGroups = \"BulkEditsToListingGroups\",\n SplitListingToOriginal = \"SplitListingToOriginal\",\n ExportPurchases = \"ExportPurchases\",\n GroupedActivityLog = \"GroupedActivityLog\",\n ExcludeDefects = \"ExcludeDefects\",\n DownloadETickets = \"DownloadETickets\",\n AllocateSingleTickets = \"AllocateSingleTickets\",\n PdfViewerToolbar = \"PdfViewerToolbar\",\n ResetFulfillmentKeepArtifacts = \"ResetFulfillmentKeepArtifacts\",\n FufillmentMismatchDisplay = \"FufillmentMismatchDisplay\",\n DisplayTicketOrderedByPriority = \"DisplayTicketOrderedByPriority\",\n ShowSeatTraitOnMerge = \"ShowSeatTraitOnMerge\",\n EventMultiScreen = \"EventMultiScreen\",\n DefaultFilterRows = \"DefaultFilterRows\",\n RowSeatColumnSalePurchase = \"RowSeatColumnSalePurchase\",\n ReconcileOrphanTickets = \"ReconcileOrphanTickets\",\n UseSelectedRowIdForMarketplaceSeatingOverride = \"UseSelectedRowIdForMarketplaceSeatingOverride\",\n SelectDeliveryStrategyInSeatSaver = \"SelectDeliveryStrategyInSeatSaver\",\n ListingGroupCompUi = \"ListingGroupCompUi\",\n YourListingsInComps = \"YourListingsInComps\",\n NewListingDefaultToSpeculativeRowId = \"NewListingDefaultToSpeculativeRowId\",\n UploadTicketFilesFlowV2 = \"UploadTicketFilesFlowV2\",\n RightNowStatsInMap = \"RightNowStatsInMap\",\n ConsignmentDeal = \"ConsignmentDeal\",\n FilterByCurrencyCodeMulti = \"FilterByCurrencyCodeMulti\",\n FilterByPaymentCurrencyCodeMulti = \"FilterByPaymentCurrencyCodeMulti\",\n AutoPricingTabInAccountSettings = \"AutoPricingTabInAccountSettings\",\n BulkConvertPaymentLines = \"BulkConvertPaymentLines\",\n AttemptFulfillWhenToggleOnAutoFulfill = \"AttemptFulfillWhenToggleOnAutoFulfill\",\n ConvertPaymentLines = \"ConvertPaymentLines\",\n SaleDetailDisplayTicketUrl = \"SaleDetailDisplayTicketUrl\",\n PreventInitialBroadcastForXDays = \"PreventInitialBroadcastForXDays\",\n AutoCompPersistAllConfigChanges = \"AutoCompPersistAllConfigChanges\",\n ManageMarketplacePayment = \"ManageMarketplacePayment\",\n PurchasePaymentColumns = \"PurchasePaymentColumns\",\n HideAutoCompOnlyBulkEditOption = \"HideAutoCompOnlyBulkEditOption\",\n PreventDraftPOinUI = \"PreventDraftPOinUI\",\n MarkPOAsPaid = \"MarkPOAsPaid\",\n MarketplacePaymentsTab = \"MarketplacePaymentsTab\",\n AllowSeatScoreCompListingMode = \"AllowSeatScoreCompListingMode\",\n IntelligiblePricePreview = \"IntelligiblePricePreview\",\n DemandDashLastDaySupplyMetrics = \"DemandDashLastDaySupplyMetrics\",\n IntelligibleAutoPricingSettings = \"IntelligibleAutoPricingSettings\",\n LinkEventName = \"LinkEventName\",\n GroupingWizard = \"GroupingWizard\",\n IntelligiblePricePreviewForListingGroup = \"IntelligiblePricePreviewForListingGroup\",\n SimplifiedAutoPricingUiV2 = \"SimplifiedAutoPricingUiV2\",\n MoveToGroup = \"MoveToGroup\",\n IgnoreDuplicate = \"IgnoreDuplicate\",\n QuickFloorToolbar = \"QuickFloorToolbar\",\n BulkUpdatePurchaseCurrency = \"BulkUpdatePurchaseCurrency\",\n BulkWasteTickets = \"BulkWasteTickets\",\n MarketplacePaymentsFilters = \"MarketplacePaymentsFilters\",\n ListingLoadBySection = \"ListingLoadBySection\",\n AutoPricingBulkEditToDrawerWithPreview = \"AutoPricingBulkEditToDrawerWithPreview\",\n PurchasePaymentMethodEdit = \"PurchasePaymentMethodEdit\",\n CancelSaleKeepTickets = \"CancelSaleKeepTickets\",\n ConvertSaleCurrency = \"ConvertSaleCurrency\",\n DisplayDeactivatedUser = \"DisplayDeactivatedUser\",\n SVGVenueMapV3 = \"SVGVenueMapV3\",\n LockCommissionsOnPo = \"LockCommissionsOnPo\",\n SearchView_Purchase = \"SearchView_Purchase\",\n SearchView_Inventory = \"SearchView_Inventory\",\n SearchView_Sale = \"SearchView_Sale\",\n SaleEarningsTableV2 = \"SaleEarningsTableV2\",\n SectionalUpdateListingInBulk = \"SectionalUpdateListingInBulk\",\n SectionalLoadInListingTable = \"SectionalLoadInListingTable\",\n SaleDetailsMarketplaceTerms = \"SaleDetailsMarketplaceTerms\",\n UserSearchBar = \"UserSearchBar\",\n CleanupWhiteSpace = \"CleanupWhiteSpace\",\n AddMarketplaceChargeCreditToSale = \"AddMarketplaceChargeCreditToSale\",\n LinkPaymentLine = \"LinkPaymentLine\",\n PricingSectionSettingsAcrossEvents = \"PricingSectionSettingsAcrossEvents\",\n PurchaseCommissionFilterInSearchView = \"PurchaseCommissionFilterInSearchView\",\n SaleCancellationReason = \"SaleCancellationReason\",\n SaleHasMarketplaceProblem = \"SaleHasMarketplaceProblem\",\n HideSalePaymentReceivedFilter = \"HideSalePaymentReceivedFilter\",\n CondensedPreviewTabsAndSingleListing = \"CondensedPreviewTabsAndSingleListing\",\n MarketplacePaymentFilterUnlinked = \"MarketplacePaymentFilterUnlinked\",\n BulkMarkSalesAsPaid = \"BulkMarkSalesAsPaid\",\n CatalogCacheStrategyV2 = \"CatalogCacheStrategyV2\",\n MultiTicketGroupTable = \"MultiTicketGroupTable\",\n TableColumnFilter = \"TableColumnFilter\",\n EventDiscoveryPage = \"EventDiscoveryPage\",\n SeatTraitsColumn = \"SeatTraitsColumn\",\n EventSelectorFilter = \"EventSelectorFilter\",\n BlockEventDiscoveryData = \"BlockEventDiscoveryData\",\n BulkUploadPurchaseV2Perf = \"BulkUploadPurchaseV2Perf\",\n ColumnFilterSearchView = \"ColumnFilterSearchView\",\n ListingTableSplitTypeColumn = \"ListingTableSplitTypeColumn\",\n BulkUploadPurchaseTags = \"BulkUploadPurchaseTags\",\n CompListingDisplayUpdate = \"CompListingDisplayUpdate\",\n CatalogMetricsV2 = \"CatalogMetricsV2\",\n HideSalePaymentConversionSection = \"HideSalePaymentConversionSection\",\n FlashSaleDiscountRestriction = \"FlashSaleDiscountRestriction\",\n EventMapRibbonYolo = \"EventMapRibbonYolo\",\n ReportV2Builder = \"ReportV2Builder\",\n ReportV2CommissionsReport = \"ReportV2CommissionsReport\",\n KnowledgePortalPage = \"KnowledgePortalPage\",\n KnowledgePortalPageTestData = \"KnowledgePortalPageTestData\",\n SearchView_ReadOnlyDB = \"SearchView_ReadOnlyDB\",\n BulkEditPricingSettingsUpdate = \"BulkEditPricingSettingsUpdate\",\n HomePageNotifications = \"HomePageNotifications\",\n EventsDetailedViewGrouping = \"EventsDetailedViewGrouping\",\n GlobalReportV1RedirectV2 = \"GlobalReportV1RedirectV2\",\n BlockInventorySummaryStats = \"BlockInventorySummaryStats\",\n GroupListingsWithRangedQuantityCost = \"GroupListingsWithRangedQuantityCost\",\n AllocateSingleTicketListingRestrictionRemoval = \"AllocateSingleTicketListingRestrictionRemoval\",\n OnePagerGroupSelectionFunctionality = \"OnePagerGroupSelectionFunctionality\",\n ConsignmentFilterPurchaseSearchView = \"ConsignmentFilterPurchaseSearchView\",\n HideNavAndFilterBars = \"HideNavAndFilterBars\",\n ReportSinglePagedV1V2 = \"ReportSinglePagedV1V2\",\n BackfillListingTicketTypeOverrideToSale = \"BackfillListingTicketTypeOverrideToSale\",\n AutomatiqUnprocessedOrdersHoldingPen = \"AutomatiqUnprocessedOrdersHoldingPen\",\n ReEvaluatePredeliveryStateAndTopTicketType = \"ReEvaluatePredeliveryStateAndTopTicketType\",\n AddPurchasePaymentRefundStates = \"AddPurchasePaymentRefundStates\",\n PurchasePaymentConversion = \"PurchasePaymentConversion\",\n EnforcePurchasePaymentCurrency = \"EnforcePurchasePaymentCurrency\",\n MarketplacePaymentConversion = \"MarketplacePaymentConversion\",\n WasteSale = \"WasteSale\",\n UseShLnLookup = \"UseShLnLookup\",\n BlockPricingCompListingEndpoint = \"BlockPricingCompListingEndpoint\",\n BlockPricingCalculationEndpoint = \"BlockPricingCalculationEndpoint\",\n BlockEventDashboardEndpoint = \"BlockEventDashboardEndpoint\",\n AlwaysGetEventLevelSettingsFromAutoPricer = \"AlwaysGetEventLevelSettingsFromAutoPricer\",\n WriteAutopriceConfigUpdateToSbt = \"WriteAutopriceConfigUpdateToSbt\",\n SetAsDefaultAllNewEvents = \"SetAsDefaultAllNewEvents\",\n AccountLevelFeatureCheck = \"AccountLevelFeatureCheck\",\n}\n\nexport enum FeatureState {\n Disabled = \"Disabled\",\n Restricted = \"Restricted\",\n GeneralAvailability = \"GeneralAvailability\",\n LimitedAvailability = \"LimitedAvailability\",\n InDevelopment = \"InDevelopment\",\n}\n\nexport interface AdPlatformCatalogResults {\n events: { [key: string]: EventWithData; };\n performers: { [key: string]: Performer; };\n venues: { [key: string]: Venue; };\n listingsByExternalId: { [key: string]: Listing; };\n venueMapByEventId: { [key: string]: VenueMapInfo; };\n}\n\nexport interface EventWithData {\n event: Event;\n counts: EventEntityCounts;\n entities: EventEntities;\n}\n\nexport interface EventEntityCounts {\n viagVirtId: string;\n perfId: number | null;\n venId: number;\n salesCnt: number | null;\n /** Listing count */\n listCnt: number | null;\n /** Priced listing count */\n pricedListCnt: number | null;\n /** Ungrouped listing count */\n ungrListCnt: number | null;\n /** Listing Group count */\n listGrpCnt: number | null;\n /** Ticket Group count */\n tktGrpsCnt: number | null;\n /** PurchaseOrderCount */\n poCnt: number | null;\n}\n\nexport interface EventEntities {\n listings: Listing[] | null;\n sales: Sale[] | null;\n ticketGroups: PurchaseOrderTicketGroup[] | null;\n getDataFail: boolean | null;\n}\n\n/** Base class to represent common info between Listing, Sale, or PurchaseOrder, which basically is an entity that contains metadata about a set of Tickets for a single Event */\nexport interface EntityWithTickets {\n /** The ID of this entity in the DB (ListingId, SaleId, or PurchaseOrderId) */\n id: number;\n /** The event of which this entity is for. */\n posEvId: string;\n viagEvId: number | null;\n viagEvMapId: string | null;\n viagVirtualId: string;\n rowVer: number;\n insertBy: string | null;\n currency: string;\n /** Given a Sale can consist of tickets purchased at different times, this should be\nthe latest date that all tickets are in hand. This is a seller-provided field\nand it does not have to coincide with listings or purchase orders. */\n inHandAt: string | null;\n seating: Seating;\n /** The number of tickets in this set.\n- For Sale, it would be the same as QuantitySold - but this is the physical number of allocated tickets.\n- For Listing for PO, it would just mean the number of tickets listed. */\n ticketCnt: number;\n seatTraits: ListingNote[] | null;\n privNotes: string | null;\n}\n\n/** Base class to represent common info between Sale and Listing (with Marketplace related info) */\nexport interface MarketplaceEntityWithTickets extends EntityWithTickets {\n /** Marketplace where these tickets were listed and sold */\n mkp: Marketplace | null;\n /** Represent either the MarketplaceListingId or MarketplaceSaleId */\n idOnMkp: string | null;\n}\n\nexport interface Listing extends MarketplaceEntityWithTickets {\n rowId: number | null;\n entityType: ActionOutboxEntityType;\n dataIsLoaded: { [key in keyof typeof ListingDetailDataField]?: boolean; };\n /** Cost per ticket (from purchase order) */\n unitCst: UiMoney | null;\n status: ListingStatus;\n isUSEvent: boolean | null;\n /** Marketplace listing broadcast status */\n brdcstStatus: ListingBroadcastStatus | null;\n isSeatSaver: boolean;\n isAdminHold: boolean;\n adminHoldExpiredOn: string | null;\n adminHoldNotes: string | null;\n /** ValidPurchaseQuantity - computed value based on Quantity, MaxDisplayQuantity, and SplitType.\nWill be an array of values that correspond to how many tickets from the listing buyers are\nable to buy in one transaction. */\n vldPurQty: number[];\n /** This the number of tickets that have not yet sold or wasted and is always less than TicketCount. */\n availQty: number;\n /** MaxDisplayQuantity */\n maxDispQty: number;\n /** ManualMaxDisplayQuantity */\n manMaxDispQty: number | null;\n /** This is the number of tickets that have been sold */\n soldQty: number | null;\n /** This is the number of tickets that have been wasted */\n wastedQty: number | null;\n /** This is the number of tickets that are not sold, which is equivalent to AvailQty + WastedQty */\n unsoldQty: number;\n /** A number from 0 to 1 that represent a %\nNull represent that the marketplace doesn't provide this info */\n preDelivState: PreDeliveryState;\n /** DeliveryType */\n delivType: DeliveryType;\n /** TopPriorityTicketType */\n topPriTktType: TicketType | null;\n isUndeliv: boolean;\n isNoFulfill: boolean | null;\n enableNativeSync: boolean | null;\n actions: ListingActionType[];\n isCurUserPo: boolean;\n poBys: string[] | null;\n poId: number | null;\n poOrderId: string | null;\n poDate: string | null;\n poVendAccEmail: string | null;\n poCreatedBys: string[] | null;\n isDeleted: boolean;\n mkpListings: MarketplaceListing[] | null;\n qcState: QualityControlState | null;\n pendProofState: PendingProofState | null;\n dupListingId: number | null;\n ignoreDup: boolean | null;\n /** MarketplaceVisibility */\n mkpVis: number | null;\n sectionType: VenueMapSectionType | null;\n /** Original Seat From for the listing, different from Seating.SeatFr which is the current seatFr available */\n orgSeatFr: string | null;\n orgSeatTo: string | null;\n ltGrpId: string | null;\n ltGrpParentId: number | null;\n ltGrpPrior: number | null;\n ltGrpActive: boolean | null;\n isLtGrp: boolean;\n isFull: boolean;\n ltGrpUndercut: ListingGroupUndercutSetting | null;\n tags: Tag[] | null;\n splitType: SplitType;\n hideSeats: boolean;\n pricerId: string | null;\n listPrice: number;\n allInPrice: number;\n faceValue: UiMoney | null;\n lastPrcUpdOn: string | null;\n isAutoPrc: boolean | null;\n procsFloor: number | null;\n procsCeil: number | null;\n /** UndercutMode */\n undMode: AutoPricingUndercutMode | null;\n /** UndercutAbsoluteAmount */\n undAbsAmt: number | null;\n /** UndercutRelativeAmount */\n undRelAmt: number | null;\n /** UndercutNewPrice */\n undNewPrice: number | null;\n /** CompListingMode */\n compMode: AutoPricingCompListingMode | null;\n /** CompListingFloor */\n compFloor: number | null;\n /** CompLIstingCeiling */\n compCeil: number | null;\n /** IsCompListingQuantityScoreAdjustmentEnabled */\n isCompQtyScrAdj: boolean | null;\n /** CompListingQuantityScoreAdjustmentJson */\n compQtyScrAdjJson: string | null;\n /** CompListingOnlyForSameZoneEnabled */\n isCompForSameZone: boolean | null;\n /** CompListingOnlyForSelectedSectionsEnabled */\n isCompSelectedSections: boolean | null;\n /** CompListingExcludeFanInventory */\n compExclFanInv: boolean | null;\n /** CompListingExcludeDefects */\n compExclDefects: boolean | null;\n /** CompListingSelectedSectionSettings */\n compSectionSettings: SelectedSectionSettings | null;\n /** CircuitBreakerRelativeCeiling */\n cirBrRelCeil: number | null;\n /** CircuitBreakerRelativeFloor */\n cirBrRelFloor: number | null;\n /** CircuitBreakerMaxDiscountVelocityPercent */\n cirBrMaxDiscVelocPercent: number | null;\n /** CircuitBreakerMaxDiscountVelocityTicksInHours */\n cirBrMaxDiscVelocTicksInHrs: number | null;\n /** CircuitBreakerMinCompListingCount */\n cirBrMinCompCount: number | null;\n /** OutlierMode */\n outMode: AutoPricingOutlierMode | null;\n /** OutlierStandardDeviations */\n outlStdDev: number | null;\n /** OutlierKthLowestLimit */\n outKthLowestLim: number | null;\n /** OutlierKthLowestLimitAbsoluteSpacing */\n outKthLowestLimRelSpc: number | null;\n /** OutlierKthLowestLimitRelativeSpacing */\n outKthLowestLimAbsSpc: number | null;\n /** AutoPricingResultState */\n autoPrcResult: AutoPricingResultType | null;\n tktTypeRules: TicketTypeOverride | null;\n}\n\nexport enum ListingDetailDataField {\n Basic = \"Basic\",\n Tickets = \"Tickets\",\n Pricing = \"Pricing\",\n AutoPricing = \"AutoPricing\",\n Sales = \"Sales\",\n Purchase = \"Purchase\",\n Tags = \"Tags\",\n}\n\nexport interface UiMoney {\n amt: number;\n disp: string | null;\n currency: string | null;\n dec: number;\n}\n\nexport enum ListingStatus {\n Disabled = \"Disabled\",\n FullySold = \"Fully Sold\",\n DelistingPending = \"Delisting Pending\",\n DelistingFailed = \"Delist Failed\",\n Delisted = \"Delisted\",\n ListingPending = \"Listing Pending\",\n ListingFailed = \"List Failed\",\n Listed = \"Listed\",\n}\n\nexport enum ListingBroadcastStatus {\n Unknown = \"Unknown\",\n Broadcast = \"Broadcast\",\n BroadcastFailed = \"BroadcastFailed\",\n BroadcastWithError = \"BroadcastWithError\",\n Unbroadcast = \"Unbroadcast\",\n UnbroadcastFailed = \"UnbroadcastFailed\",\n UnbroadcastWithError = \"UnbroadcastWithError\",\n}\n\nexport enum PreDeliveryState {\n NotPreDelivered = \"No\",\n PreDelivered = \"Yes\",\n}\n\nexport enum DeliveryType {\n InApp = \"In-app\",\n PDF = \"PDF\",\n Paper = \"Paper\",\n MemberCard = \"Member Card\",\n Wallet = \"Wallet\",\n Custom = \"Custom\",\n}\n\nexport enum TicketType {\n Custom = \"Custom\",\n Paper = \"Paper\",\n ETicket = \"ETicket\",\n ETicketUrl = \"ETicketUrl\",\n Transfer = \"Transfer\",\n Barcode = \"Barcode\",\n Season = \"Season\",\n QRCode = \"QRCode\",\n SMPWallet = \"SMPWallet\",\n}\n\nexport enum ListingActionType {\n Broadcast = \"Broadcast\",\n Unbroadcast = \"Unbroadcast\",\n Split = \"Split\",\n SplitToOriginal = \"SplitToOriginal\",\n AddOfflineSale = \"AddOfflineSale\",\n AddMarketplaceSale = \"AddMarketplaceSale\",\n PredeliverBarcodes = \"PredeliverBarcodes\",\n PredeliverETickets = \"PredeliverETickets\",\n PredeliverQRCode = \"PredeliverQRCode\",\n PredeliverExternalIds = \"PredeliverExternalIds\",\n PredeliverTicketUrls = \"PredeliverTicketUrls\",\n RedeliverBarcodes = \"RedeliverBarcodes\",\n RedeliverETickets = \"RedeliverETickets\",\n RedeliverQRCode = \"RedeliverQRCode\",\n RedeliverExternalIds = \"RedeliverExternalIds\",\n RedeliverTicketUrls = \"RedeliverTicketUrls\",\n DownloadUserDocuments = \"DownloadUserDocuments\",\n FullySoldNoAction = \"FullySoldNoAction\",\n AddAdminHold = \"AddAdminHold\",\n RemoveAdminHold = \"RemoveAdminHold\",\n Waste = \"Waste\",\n}\n\nexport interface MarketplaceListing {\n mkpListingId: string | null;\n mkp: Marketplace;\n status: ListingStatus;\n markup: number | null;\n sellerAccountDefaultMarkup: number | null;\n sellerFee: number | null;\n netProcs: number | null;\n webPrice: number | null;\n isPriceByMkp: boolean;\n overrideSection: string | null;\n overrideRow: string | null;\n overrideSeats: string | null;\n overrideRowId: number | null;\n overrideSectionId: number | null;\n isEnabled: boolean;\n availQty: number | null;\n currency: string;\n errMsgs: string[] | null;\n errCodes: BroadcastErrorCode[] | null;\n pendProofState: PendingProofState | null;\n brdcstStatus: ListingBroadcastStatus | null;\n}\n\nexport enum Marketplace {\n StubHub = \"StubHub\",\n VividSeats = \"VividSeats\",\n SeatGeek = \"SeatGeek\",\n TickPick = \"TickPick\",\n Ticketmaster = \"Ticketmaster\",\n Offline = \"Offline\",\n AXS = \"AXS\",\n FanXchange = \"FanXchange\",\n Gametime = \"Gametime\",\n TicketEvolution = \"TicketEvolution\",\n TicketNetwork = \"TicketNetwork\",\n Automatiq = \"Automatiq\",\n Lyte = \"Lyte\",\n GoTickets = \"GoTickets\",\n B2BSales = \"B2BSales\",\n TicketNetworkMercury = \"TicketNetworkMercury\",\n}\n\nexport enum BroadcastErrorCode {\n Unknown = \"Unknown\",\n UpdatePrice = \"UpdatePrice\",\n UpdateTicketType = \"UpdateTicketType\",\n UpdateSplitType = \"UpdateSplitType\",\n UpdateInHandDate = \"UpdateInHandDate\",\n SplitListing = \"SplitListing\",\n MergeListing = \"MergeListing\",\n BroadcastListing = \"BroadcastListing\",\n UnbroadcastListing = \"UnbroadcastListing\",\n UpdateQuantity = \"UpdateQuantity\",\n HideSeats = \"HideSeats\",\n UpdateListingNotes = \"UpdateListingNotes\",\n UpdateSeating = \"UpdateSeating\",\n MarketplaceResaleRestricted = \"MarketplaceResaleRestricted\",\n MarketplaceManifestMismatch = \"MarketplaceManifestMismatch\",\n MarketplacePriceBelowFloor = \"MarketplacePriceBelowFloor\",\n}\n\nexport enum PendingProofState {\n PendingProof = \"PendingProof\",\n PendingReview = \"PendingReview\",\n Approved = \"Approved\",\n}\n\nexport enum QualityControlState {\n Pending = \"Pending\",\n Approved = \"Approved\",\n Rejected = \"Rejected\",\n}\n\nexport enum VenueMapSectionType {\n ForcedRow = \"ForcedRow\",\n OptionalRow = \"OptionalRow\",\n NoRow = \"NoRow\",\n GeneralAdmission = \"GeneralAdmission\",\n NoRowPairs = \"NoRowPairs\",\n OptionalRowPairs = \"OptionalRowPairs\",\n ForcedRowPairs = \"ForcedRowPairs\",\n GeneralAdmissionWithQueueNumber = \"GeneralAdmissionWithQueueNumber\",\n GeneralAdmissionStanding = \"GeneralAdmissionStanding\",\n GeneralAdmissionSeating = \"GeneralAdmissionSeating\",\n}\n\nexport interface ListingGroupUndercutSetting {\n /** UndercutAbsoluteAmount */\n undAbsAmt: number | null;\n /** UndercutRelativeAmount */\n undRelAmt: number | null;\n /** ActiveRankUndercutAbsoluteAmount */\n actRankUndAbsAmt: number | null;\n /** ActiveRankUndercutRelativeAmount */\n actRankUndRelAmt: number | null;\n}\n\nexport interface Tag {\n /** The key of of the tag associated with an entity */\n key: string;\n /** The value of of the tag associated with an entity */\n value: string;\n valueType: TagsValueType | null;\n singleValueOnly: boolean | null;\n includeInReport: boolean | null;\n ordinal: number | null;\n}\n\nexport enum TagsValueType {\n String = \"String\",\n Decimal = \"Decimal\",\n Int = \"Int\",\n Boolean = \"Boolean\",\n Json = \"Json\",\n Url = \"Url\",\n Marketplace = \"Marketplace\",\n Date = \"Date\",\n POSUser = \"POSUser\",\n Vendor = \"Vendor\",\n UserGroup = \"UserGroup\",\n}\n\nexport enum SplitType {\n Any = \"Any\",\n None = \"None\",\n AvoidOne = \"Avoid One\",\n AvoidOneAndThree = \"Avoid One and Three\",\n Pairs = \"Pairs\",\n}\n\nexport enum AutoPricingUndercutMode {\n Simple = \"Simple\",\n RowExtrapolation = \"RowExtrapolation\",\n Deal = \"Deal\",\n}\n\nexport enum AutoPricingCompListingMode {\n QualityScore = \"QualityScore\",\n SameSection = \"SameSection\",\n SameZone = \"SameZone\",\n SameEvent = \"SameEvent\",\n ParentListing = \"ParentListing\",\n}\n\nexport interface SelectedSectionSettings {\n sectionIdFilter: number[] | null;\n rowIdFilter: number[] | null;\n sectionRowIdFilter: { [key: string]: string; } | null;\n sectionIdFilterFromZoneMap: boolean;\n includeBetterZones: boolean;\n rowOffset: number | null;\n}\n\nexport enum AutoPricingOutlierMode {\n StandardDeviations = \"StandardDeviations\",\n SkipLogic = \"SkipLogic\",\n KthLowest = \"KthLowest\",\n}\n\nexport enum AutoPricingResultType {\n None = \"None\",\n PriceSuccess = \"PriceSuccess\",\n PriceBelowFloor = \"PriceBelowFloor\",\n InsufficientComparables = \"InsufficientComparables\",\n PriceBelowMaxAllowedDrop = \"PriceBelowMaxAllowedDrop\",\n PriceAboveCeiling = \"PriceAboveCeiling\",\n MissingUnitCost = \"MissingUnitCost\",\n MissingSeatScore = \"MissingSeatScore\",\n MissingZone = \"MissingZone\",\n CannotCalculateUndercut = \"CannotCalculateUndercut\",\n EffectiveCeilingBelowFloor = \"EffectiveCeilingBelowFloor\",\n PriceHitHardFloor = \"PriceHitHardFloor\",\n PriceHitRelativeFloor = \"PriceHitRelativeFloor\",\n PriceHitMaxAllowedDrop = \"PriceHitMaxAllowedDrop\",\n ConfigRowMissing = \"ConfigRowMissing\",\n SectionUnmapped = \"SectionUnmapped\",\n}\n\nexport interface TicketTypeOverride {\n overrides: TicketTypeOverrideForDeliveryType[];\n}\n\nexport interface TicketTypeOverrideForDeliveryType {\n deliveryType: DeliveryType;\n ticketTypePriorities: TicketTypePriority[];\n}\n\nexport interface TicketTypePriority {\n priority: number;\n ticketType: TicketType;\n isBlocked: boolean;\n}\n\nexport interface Seating {\n section: string;\n sectionId: number | null;\n row: string | null;\n rowId: number | null;\n seatFr: string | null;\n seatTo: string | null;\n ticketIds: number[] | null;\n listingIds: number[] | null;\n}\n\nexport interface ListingNote {\n listingNoteId: number;\n listingNoteText: string;\n listingNoteUntranslated: string;\n sellerAccountId: string | null;\n stubhubListingNoteId: number | null;\n type: ListingNoteType | null;\n}\n\nexport enum ListingNoteType {\n Defect = \"Defect\",\n RestrictionOnUse = \"Restriction on Use\",\n Perk = \"Perk\",\n Information = \"Information\",\n ConnectedSeller = \"ConnectedSeller\",\n InternallyGenerated = \"InternallyGenerated\",\n}\n\nexport interface Sale extends MarketplaceEntityWithTickets {\n entityType: ActionOutboxEntityType;\n /** The ID of the Listing in POS that this Sale comes from. */\n listingId: number | null;\n originatedFromListingId: number | null;\n saleDate: string;\n ttlNetProcs: UiMoney | null;\n soldTktCost: UiMoney | null;\n pandL: UiMoney | null;\n /** Margin (SoldProceeds - SoldCost) / SoldProceeds */\n margin: number | null;\n charges: UiMoney | null;\n credits: UiMoney | null;\n /** The total payment amount in the original currency */\n totalPmt: UiMoney | null;\n /** The total payment amount in the converted currency */\n totalConvertedPmt: UiMoney | null;\n /** PaymentState */\n pmtState: PointOfSalePaymentState | null;\n /** MarketplacePaymentState */\n mkpPmtState: MarketplacePaymentState | null;\n /** MarketplaceFulfillmentState */\n mkpFulfState: MarketplaceFulfillmentState | null;\n fulfillState: PointOfSaleFulfillmentState;\n fulfillDate: string | null;\n actions: SaleActionType[];\n status: PointOfSaleSaleStatus;\n isSeatSaver: boolean;\n qtySold: number;\n ticketType: TicketType | null;\n fulfillerId: string | null;\n tags: Tag[] | null;\n holdExpiredOn: string | null;\n isNoFulfill: boolean | null;\n /** MarketplaceContractState */\n mkpContrState: MarketplaceContractState | null;\n /** IsFulfillmentVersionMismatched */\n isFulfillVerMis: boolean;\n owners: SaleOwnershipInfo | null;\n /** IsPaymentReceived */\n pmtRcv: boolean | null;\n /** PaymentReferenceId */\n pmtRefId: string | null;\n /** PaymentAmountReceived */\n pmtAmtRcv: number | null;\n /** LastPaymentDate */\n lastPmtDate: string | null;\n /** PaymentCurrencyCode */\n pmtCurcy: string | null;\n poDate: string | null;\n poId: number | null;\n poVendOrdId: string | null;\n poVendAccEmail: string | null;\n /** DisableAutoSourcing */\n disAutoSource: boolean;\n /** Originated By. The seller User ID that created the Listing that the sale originally comes from. */\n origBy: string | null;\n /** Comment notes */\n comNotes: SaleCommentNote[] | null;\n /** Is unprocessed order from processor */\n isUnprocessedOrdFromPro: boolean | null;\n /** IsWastageSale */\n isWastageSale: boolean | null;\n /** The quantity of tickets that were wasted */\n qtyWasted: number;\n cancellationReason: SaleCancellationReason | null;\n hasMarketplaceProblem: boolean | null;\n}\n\nexport enum PointOfSalePaymentState {\n Unpaid = \"Unpaid\",\n Queued = \"Queued\",\n Paid = \"Paid\",\n PartiallyPaid = \"PartiallyPaid\",\n PendingReversal = \"PendingReversal\",\n Reversed = \"Reversed\",\n}\n\nexport enum MarketplacePaymentState {\n Ineligible = \"Ineligible\",\n Unpaid = \"Unpaid\",\n Queued = \"Queued\",\n Paid = \"Paid\",\n PartiallyPaid = \"PartiallyPaid\",\n PendingReversal = \"PendingReversal\",\n Reversed = \"Reversed\",\n}\n\nexport enum MarketplaceFulfillmentState {\n Ineligible = \"Ineligible\",\n Pending = \"Pending\",\n Processing = \"Processing\",\n PendingPickup = \"PendingPickup\",\n InTransit = \"InTransit\",\n Fulfilled = \"Fulfilled\",\n Failed = \"Failed\",\n PendingReshipment = \"PendingReshipment\",\n}\n\nexport enum PointOfSaleFulfillmentState {\n Ineligible = \"Ineligible\",\n Pending = \"Pending\",\n Processing = \"Processing\",\n PendingPickup = \"PendingPickup\",\n InTransit = \"InTransit\",\n Fulfilled = \"Fulfilled\",\n Failed = \"Failed\",\n Resetted = \"Resetted\",\n}\n\nexport enum SaleActionType {\n Confirm = \"Confirm\",\n Fulfill = \"Fulfill\",\n Reject = \"Reject\",\n Deallocate = \"Deallocate\",\n ExpireHold = \"ExpireHold\",\n Refulfill = \"Refulfill\",\n EditOffline = \"EditOffline\",\n Allocate = \"Allocate\",\n ResetFulfillment = \"ResetFulfillment\",\n RejectAllocation = \"RejectAllocation\",\n ConfirmAllocation = \"ConfirmAllocation\",\n MarkAsFulfilled = \"MarkAsFulfilled\",\n DownloadUserDocuments = \"DownloadUserDocuments\",\n Unwaste = \"Unwaste\",\n}\n\nexport enum PointOfSaleSaleStatus {\n PendingConfirmation = \"PendingConfirmation\",\n PendingFulfillment = \"PendingFulfillment\",\n ProcessingFulfillment = \"ProcessingFulfillment\",\n Fulfilled = \"Fulfilled\",\n FulfillmentFailed = \"FulfillmentFailed\",\n PendingRejection = \"PendingRejection\",\n Rejected = \"Rejected\",\n Hold = \"Hold\",\n CancelledHold = \"CancelledHold\",\n PendingAllocation = \"PendingAllocation\",\n ProvisionalAllocation = \"ProvisionalAllocation\",\n PendingReshipment = \"PendingReshipment\",\n Wasted = \"Wasted\",\n}\n\nexport enum MarketplaceContractState {\n Provisional = \"Provisional\",\n CancelledProvisional = \"CancelledProvisional\",\n Contracted = \"Contracted\",\n MarketplaceDispute = \"MarketplaceDispute\",\n Complete = \"Complete\",\n CancelledUnknownFault = \"CancelledUnknownFault\",\n CancelledSellerFault = \"CancelledSellerFault\",\n CancelledMutual = \"CancelledMutual\",\n CancelledMarketplaceFault = \"CancelledMarketplaceFault\",\n}\n\nexport interface SaleOwnershipInfo {\n fulfillerId: string | null;\n buyerIds: string[];\n pricerIds: string[];\n poInsertBys: string[];\n poIds: number[];\n}\n\nexport interface SaleCommentNote {\n date: string | null;\n email: string | null;\n text: string | null;\n}\n\nexport enum SaleCancellationReason {\n EventCancellation = \"EventCancellation\",\n SellerFault = \"SellerFault\",\n MarketplaceFault = \"MarketplaceFault\",\n NoFault = \"NoFault\",\n Other = \"Other\",\n}\n\n/** Base class of purchase order that has common fields for both request and response. */\nexport interface PurchaseOrder {\n id: number;\n entityType: ActionOutboxEntityType;\n buyerId: string | null;\n insertBy: string | null;\n commissions: Commission[] | null;\n vendor: PurchaseVendor | null;\n secVendor: PurchaseVendor | null;\n vendAcc: PurchaseVendorAccount | null;\n secVendAcc: PurchaseVendorAccount | null;\n tags: Tag[] | null;\n /** The order number of the purchase from the PurchaseVendor */\n vendOrdId: string | null;\n poState: PurchaseOrderState;\n poDate: string | null;\n /** This is basically the number of ticket groups in this PO. */\n tktGrpCnt: number;\n /** This is for currency-input, */\n currency: string;\n pmtStat: PurchasePaymentStatus | null;\n pmtMethod: PurchasePaymentMethodType | null;\n privNotes: string | null;\n qcState: QualityControlState | null;\n isAutoPo: boolean | null;\n rowVer: number;\n isCommissionsLocked: boolean | null;\n ticketCnt: number;\n totalPmt: UiMoney | null;\n totalConvertedPmt: UiMoney | null;\n pmtConvRate: number | null;\n delivType: DeliveryType | null;\n totalCst: UiMoney | null;\n unitCst: UiMoney | null;\n viagVirtualId: string | null;\n}\n\nexport interface PurchaseOrderTicketGroup extends PurchaseOrder {\n /** This is a thin version of ticket group to show in the purchase order table. */\n ticketGroupItems: IPurchaseOrderTicketGroupItem[] | null;\n isTktGrp: boolean | null;\n /** Has user document artifacts to download */\n canGetDocArts: boolean | null;\n tgId: number | null;\n tickets: Ticket[];\n isMultEv: boolean | null;\n seating: Seating | null;\n seatTraits: ListingNote[] | null;\n perfId: number | null;\n venId: number | null;\n}\n\nexport interface IPurchaseOrderTicketGroupItem {\n /** True if this instance is a ticket group, can be under a purchase order or containing purchase order info */\n isTktGrp: boolean | null;\n /** Has user document artifacts to download */\n canGetDocArts: boolean | null;\n tgId: number | null;\n viagVirtualId: string;\n perfId: number | null;\n venId: number | null;\n /** True if this is a multi-event PO */\n isMultEv: boolean | null;\n seating: Seating | null;\n /** If this is a PO (IsTktGrp == false), this is the number of tickets in the whole PO.\nOtherwise, this is the number of tickets in this ticket group. */\n ticketCnt: number;\n tickets: Ticket[];\n seatTraits: ListingNote[] | null;\n /** The overall delivery for the PO (if there are several, the first one is listed)\nIf this is a ticket group, this is the delivery for this ticket group. */\n delivType: DeliveryType | null;\n totalCst: UiMoney | null;\n unitCst: UiMoney | null;\n}\n\nexport interface Ticket {\n id: number;\n tgId: number;\n ord: number;\n /** This is the order that considers merged listings too, safe to use anywhere\n \nNOTE - this is required to be kept Nullable as it should remains Null when setting to the server\nmaking it non-null requires you to handle it or else it will get set to 0 for all seatings and that will have bad consequences */\n lstOrd: number | null;\n row: string | null;\n seat: string;\n barcode: string | null;\n ticketUrl: string | null;\n externalTicketId: string | null;\n eTicket: UserDocumentLinks | null;\n qrCode: UserDocumentLinks | null;\n holdId: number | null;\n saleId: number | null;\n listingId: number | null;\n poId: number | null;\n unitCost: UiMoney | null;\n isWasted: boolean | null;\n}\n\nexport interface UserDocument {\n entityId: number | null;\n documentId: string;\n pageNumber: number | null;\n pageId: string | null;\n documentType: DocumentType | null;\n}\n\nexport interface UserDocumentLinks extends UserDocument {\n documentUri: string;\n pageUri: string;\n}\n\nexport interface Commission {\n /** Buyer BuyerUserId */\n buyerUserId: string;\n /** The percentage of the commission */\n commissionPercentage: number;\n}\n\nexport interface PurchaseVendor {\n id: number;\n name: string;\n isGlobal: boolean | null;\n vendAccCounts: number | null;\n delivType: DeliveryType | null;\n isNoFulfill: boolean | null;\n tktTypeRules: TicketTypeOverride | null;\n}\n\nexport interface PurchaseVendorAccount {\n id: string;\n vendorId: number;\n name: string;\n email: string;\n password: string | null;\n dftPayMethodId: number | null;\n dftBuyerId: string | null;\n}\n\nexport enum PurchaseOrderState {\n Active = \"Active\",\n Cancelled = \"Cancelled\",\n Void = \"Void\",\n Drafted = \"Drafted\",\n}\n\nexport enum PurchasePaymentStatus {\n Unpaid = \"Unpaid\",\n PartiallyPaid = \"Partially Paid\",\n Paid = \"Paid\",\n Failed = \"Failed\",\n RefundNeeded = \"RefundNeeded\",\n Refunded = \"Refunded\",\n PartiallyRefunded = \"PartiallyRefunded\",\n}\n\nexport enum PurchasePaymentMethodType {\n PayPal = \"PayPal\",\n ECheck = \"eCheck\",\n Check = \"Check\",\n MoneyOrder = \"Money Order\",\n Card = \"Credit Card\",\n Cash = \"Cash\",\n Credit = \"Credit\",\n COD = \"COD\",\n BankTransfer = \"Bank Transfer\",\n DebitCard = \"Debit Card\",\n CreditMemo = \"Credit Balance\",\n DebitNote = \"Debit Note\",\n Other = \"Other\",\n}\n\nexport interface VenueMapInfo {\n eventId: number;\n venueId: number;\n venueCfgId: number;\n svgMapVer: number | null;\n geoJsonVer: number | null;\n sections: SectionInfo[];\n sectionScores: SectionScoreOverride[];\n focalPt: FocalPointInfo | null;\n hasRow: boolean;\n}\n\nexport interface SectionInfo {\n id: number;\n name: string;\n rows: RowInfo[];\n sectionType: VenueMapSectionType;\n dist: number | null;\n angle: number | null;\n directionalAngle: number | null;\n height: number | null;\n specRow: VenueMapRow | null;\n}\n\nexport interface RowInfo {\n id: number;\n name: string | null;\n ordinal: number | null;\n tktClass: TicketClassInfo | null;\n seatQualityScore: number | null;\n isSpeculative: boolean;\n}\n\nexport interface TicketClassInfo {\n id: number;\n name: string;\n color: string;\n cssPostFix: string;\n}\n\nexport interface VenueMapRow {\n id: number;\n name: string | null;\n ordinal: number | null;\n ticketClassId: number | null;\n tktClass: VenueMapTicketClass | null;\n seatQualityScore: number | null;\n isSpeculative: boolean;\n}\n\nexport interface VenueMapTicketClass {\n ticketClassId: number;\n ticketClassName: string;\n color: string;\n cssPostFix: string;\n}\n\nexport interface SectionScoreOverride {\n sectionId: number;\n rowId: number;\n rowName: string | null;\n rowOrdinal: number | null;\n tkClsId: number | null;\n /** Score normalized to 0-100 according to max score of venue heat map */\n score: number | null;\n scoreRaw: number | null;\n isManualOverride: boolean | null;\n}\n\nexport interface FocalPointInfo {\n x: number | null;\n y: number | null;\n angleDeg: number | null;\n isDirectional: boolean;\n}\n\nexport interface AdPlatformTransactionAgg {\n sellerId: string;\n adCampaignId: string | null;\n adGroupId: string | null;\n adSpend: UiMoney;\n salesProceeds: UiMoney;\n qtySold: number;\n}\n\nexport enum TransactionAggType {\n None = \"None\",\n SellerId = \"SellerId\",\n CampaignId = \"CampaignId\",\n AdGroupId = \"AdGroupId\",\n}\n\nexport interface AutoPoInboundEmail {\n inboundEmailId: number;\n subject: string | null;\n fromEmailAddress: string | null;\n toEmailAddress: string | null;\n receiveDate: string | null;\n createDate: string;\n purchaseOrderVendorId: number | null;\n partialPurchaseOrderId: number | null;\n purchaseOrderId: number | null;\n saleId: number | null;\n classificationType: AutoPoInboundEmailClassificationType | null;\n}\n\nexport enum AutoPoInboundEmailClassificationType {\n NewPurchaseOrder = \"NewPurchaseOrder\",\n ExistingPurchaseOrder = \"ExistingPurchaseOrder\",\n Junk = \"Junk\",\n OneTimePass = \"OneTimePass\",\n Password = \"Password\",\n TicketsAvailable = \"TicketsAvailable\",\n PurchaseCancelled = \"PurchaseCancelled\",\n EventCancelled = \"EventCancelled\",\n EventPostponed = \"EventPostponed\",\n EnjoyTheEvent = \"EnjoyTheEvent\",\n TransferSent = \"TransferSent\",\n TransferAccepted = \"TransferAccepted\",\n TransferExpired = \"TransferExpired\",\n NewSale = \"NewSale\",\n ConfirmationDeadline = \"ConfirmationDeadline\",\n ShippingDeadline = \"ShippingDeadline\",\n SaleCancelled = \"SaleCancelled\",\n OtherMarketplaceContact = \"OtherMarketplaceContact\",\n}\n\nexport interface AutoPoInboundEmailQuery {\n inboundEmailIds: number[] | null;\n}\n\nexport interface AutoPoPartialPurchaseOrderInboundEmail {\n inboundEmailId: number;\n subject: string | null;\n fromEmailAddress: string | null;\n toEmailAddress: string | null;\n purchaseOrderVendorId: number | null;\n receiveDate: string | null;\n createDate: string;\n partialPurchaseOrderId: number | null;\n orderId: string | null;\n quantity: number | null;\n faceValue: number | null;\n purchaseOrderDate: string | null;\n totalCount: number;\n}\n\nexport interface AutoPoInboundEmailPartialPurchaseOrderQuery {\n classificationTypes: AutoPoInboundEmailClassificationType[] | null;\n includeUnclassified: boolean | null;\n subjectSearchText: string | null;\n fromEmailAddress: string | null;\n toEmailAddress: string | null;\n textBodySearchText: string | null;\n classificationTypeUpdateDateFrom: string | null;\n classificationTypeUpdateDateTo: string | null;\n}\n\nexport interface AutoPoPartialPurchaseOrder {\n partialPurchaseOrderId: number;\n orderId: string;\n eventName: string;\n eventDateTime: string | null;\n venueName: string;\n section: string;\n row: string;\n seatFrom: string;\n seatTo: string;\n quantity: number | null;\n faceValue: number | null;\n purchaseOrderDate: string | null;\n}\n\nexport interface AutoPoInboundEmailThreadEmail {\n inboundEmailId: number;\n classificationType: AutoPoInboundEmailClassificationType | null;\n subject: string | null;\n fromEmailAddress: string | null;\n toEmailAddress: string | null;\n receiveDate: string | null;\n htmlBody: string | null;\n textBody: string | null;\n purchaseOrderId: number | null;\n saleId: number | null;\n partialPurchaseOrderId: number | null;\n orderId: string | null;\n quantity: number | null;\n faceValue: number | null;\n purchaseOrderDate: string | null;\n purchaseOrderVendorId: number | null;\n attachments: AutoPoInboundEmailAttachment[] | null;\n}\n\nexport interface AutoPoInboundEmailAttachment {\n attachmentFileName: string;\n downloadUri: string;\n}\n\nexport interface ValueTupleOfStringAndString {\n item1: string;\n item2: string;\n}\n\nexport interface AutoPoSellerAccountCountryRestriction {\n country: string;\n isEnabled: boolean | null;\n}\n\nexport interface AutoPoSellerAccountVendorRestriction {\n vendorId: number;\n isIncluded: boolean;\n}\n\nexport interface BulkEditPreviewWithDetails {\n error: string | null;\n allItemsCount: number;\n preview: BulkEditPreview;\n sales: Sale[] | null;\n listings: Listing[] | null;\n purchases: PurchaseOrder[] | null;\n ticketGroups: PurchaseOrderTicketGroup[] | null;\n}\n\nexport interface BulkEditPreview {\n bulkEditCountPreview: { [key in keyof typeof ActionOutboxEntityType]?: BulkEditCountPreview; };\n}\n\nexport interface BulkEditCountPreview {\n entityType: ActionOutboxEntityType;\n totalCount: number;\n idsAffected: number[];\n}\n\nexport interface EntityWithTicketsQuery {\n entityIds: number[] | null;\n marketplaceEntityIds: string[] | null;\n eventOrMappingIds: string[] | null;\n oldPosEventIds: string[] | null;\n performerIds: number[] | null;\n venueIds: number[] | null;\n countryCodes: string[] | null;\n stateProvinceIds: number[] | null;\n cityIds: number[] | null;\n purchaseOrderId: number | null;\n purchaseOrderIds: number[] | null;\n saleIds: number[] | null;\n listingIds: number[] | null;\n purchaseVendorId: number | null;\n vendorAccessControlProviderId: number | null;\n purchaseVendorAccountIds: string[] | null;\n purchaseVendorOrderId: string | null;\n purchaseBuyerId: string | null;\n purchaseOrderCreatedBy: string | null;\n purchaseCommissionUserId: string | null;\n purchaseDates: DateTimeRangeWithRelative | null;\n inHandDates: DateTimeRangeWithRelative | null;\n eventTimeFrameFilter: EventTimeFrameFilter | null;\n sections: string[] | null;\n rows: string[] | null;\n sectionContains: string | null;\n sectionEquals: string | null;\n sectionNotContains: string | null;\n rowContains: string | null;\n rowEquals: string | null;\n rowNotContains: string | null;\n isSeatSaver: boolean | null;\n /** This is currently only used to filter on the frontend application. */\n eventDates: DateTimeRangeWithRelative | null;\n /** This is currently only used to filter on the frontend application. */\n eventNotReviewedSinceDate: DateTimeRangeWithRelative | null;\n isMapped: boolean | null;\n isMappingRejected: boolean | null;\n searchText: string | null;\n sortBy: EventSort | null;\n isSortDescending: boolean | null;\n tagName: string | null;\n tagValue: string | null;\n eventTagName: string | null;\n eventTagValue: string | null;\n lastSaleDates: DateTimeRangeWithRelative | null;\n noSaleDates: DateTimeRangeWithRelative | null;\n numberOfTicketsHeld: NumericRange | null;\n topLevelCategories: TopLevelCategory[] | null;\n parentCategories: number[] | null;\n internalNotes: string | null;\n internalNotesContains: string | null;\n internalNotesEquals: string | null;\n internalNotesNotContains: string | null;\n /** Output from the frontend application: `new Date().getTimezoneOffset()`\nE.g. UTC-8 => 480\nUsed for RelativeTimeRange typed properties\nCurrently only used for reporting */\n timezoneOffsetMins: number | null;\n currencyCode: string | null;\n currencyCodes: string[] | null;\n eventStatuses: ApiEventStatus[] | null;\n /** This is only used to filter on the frontend application. */\n searchConfigId: string | null;\n}\n\nexport interface ListingQuery extends EntityWithTicketsQuery {\n pricerSellerUserId: string | null;\n isPredelivered: boolean | null;\n isListed: boolean | null;\n deliveryType: DeliveryType | null;\n eventHasUnsoldTickets: boolean | null;\n hasUnsoldTickets: boolean | null;\n hasBroadcastError: boolean | null;\n isAutoPricingEnabled: boolean | null;\n isPricedAboveZero: boolean | null;\n lastPriceUpdateDates: DateTimeRangeWithRelative | null;\n lastPriceNoUpdateDates: DateTimeRangeWithRelative | null;\n autoPricingResultTypes: AutoPricingResultType[] | null;\n isSeatingUnmapped: boolean | null;\n isAdminHold: boolean | null;\n isDuplicate: boolean | null;\n isPricedByMarketplace: boolean | null;\n isPendingProof: boolean | null;\n purchaseCancellationDates: DateTimeRangeWithRelative | null;\n purchaseCancelledOnly: boolean | null;\n isNoFulfill: boolean | null;\n ticketType: TicketType | null;\n /** This is only used to filter on the frontend application. */\n viewMode: InventoryViewMode | null;\n eventUnpricedStatus: EventUnpricedStatus | null;\n}\n\nexport interface DateTimeRangeWithRelative extends DateTimeRange {\n relativeStartSecs: number | null;\n relativeEndSecs: number | null;\n roundingMode: RelativeTimeRoundingMode | null;\n}\n\nexport enum RelativeTimeRoundingMode {\n Day = \"Day\",\n Week = \"Week\",\n Month = \"Month\",\n Year = \"Year\",\n}\n\nexport enum InventoryViewMode {\n TileView = \"Tile View\",\n MetricView = \"Metric View\",\n FlattenedView = \"Flattened View\",\n}\n\nexport enum EventUnpricedStatus {\n AllUnpriced = \"All\",\n NoneUnpriced = \"None\",\n AnyUnpriced = \"Any\",\n}\n\nexport enum EventTimeFrameFilter {\n Future = \"Future Events\",\n Past = \"Past Events\",\n}\n\nexport enum EventSort {\n Date = \"Sort by Date\",\n MainDisplay = \"Sort by Title\",\n}\n\nexport interface NumericRange {\n start: number | null;\n end: number | null;\n}\n\nexport interface BulkEditProgress {\n updateKey: string;\n method: string;\n step: BulkEditStep;\n successCount: number;\n failureCount: number;\n warningCount: number;\n totalCount: number;\n status: string | null;\n error: string | null;\n warning: string | null;\n successPercent: number | null;\n failurePercent: number | null;\n warningPercent: number | null;\n countsByEntity: { [key in keyof typeof ActionOutboxEntityType]?: BulkEditCount; };\n retryableEntities: BulkEditPreview | null;\n}\n\nexport enum BulkEditStep {\n Disabled = \"Disabled\",\n Initializing = \"Initializing\",\n InProgress = \"InProgress\",\n Done = \"Done\",\n Cancelled = \"Cancelled\",\n DoneWithRetryableEntities = \"DoneWithRetryableEntities\",\n}\n\nexport interface BulkEditCount {\n totalCount: number;\n successCount: number;\n failureCount: number;\n warningCount: number;\n entityType: ActionOutboxEntityType;\n ttlCnt: number;\n succCnt: number;\n failCnt: number;\n warnCnt: number;\n}\n\nexport enum PricingFloorCeilingAdjustmentType {\n MarketPrice = \"MarketPrice\",\n UnitCost = \"UnitCost\",\n CurrentFloor = \"CurrentFloor\",\n}\n\nexport interface ValueTupleOfBulkEditPreviewAndListingDetailsUpdateInput {\n item1: BulkEditPreview;\n item2: ListingDetailsUpdateInput;\n}\n\nexport interface ListingDetailsPricingUpdates {\n netProceedsFloor: number | null;\n netProceedsCeiling: number | null;\n skipPriceProtection: boolean | null;\n skipAutoPricing: boolean | null;\n autoPricingEnabled: boolean | null;\n undercutMode: AutoPricingUndercutMode | null;\n skipUndercut: boolean | null;\n undercutAbsoluteAmount: number | null;\n undercutRelativeAmount: number | null;\n compListingMode: AutoPricingCompListingMode | null;\n skipCompListing: boolean | null;\n compListingFloor: number | null;\n compListingCeiling: number | null;\n compListingQuantityScoreAdjustmentEnabled: boolean | null;\n compListingQuantityScoreAdjustmentOverrides: { [key: string]: number; } | null;\n compListingQuantityScoreAdjustmentOverrideJson: string | null;\n compListingOnlyForSameZoneEnabled: boolean | null;\n compListingOnlyForSelectedSectionsEnabled: boolean | null;\n compListingExcludeFanInventory: boolean | null;\n compListingExcludeDefects: boolean | null;\n compListingSelectedSectionSettings: SelectedSectionSettings | null;\n compListingQuantityFilters: CompListingQuantity | null;\n skipAdvancePricing: boolean | null;\n circuitBreakerRelativeCeiling: number | null;\n circuitBreakerRelativeFloor: number | null;\n circuitBreakerMaxDiscountVelocityPercent: number | null;\n circuitBreakerMaxDiscountVelocityTicksInHours: number | null;\n circuitBreakerMinCompListingCount: number | null;\n outlierMode: AutoPricingOutlierMode | null;\n outlierStandardDeviations: number | null;\n outlierKthLowestLimit: number | null;\n outlierKthLowestLimitRelativeSpacing: number | null;\n outlierKthLowestLimitAbsoluteSpacing: number | null;\n currencyCode: string | null;\n}\n\nexport interface ListingDetailsUpdateInput extends ListingDetailsPricingUpdates {\n id: number;\n rowVersion: number | null;\n adminHoldExpirationDate: string | null;\n adminHoldNotes: string | null;\n marketplaceSeatOverrides: ListingMarketplaceSeatingOverride[];\n splitType: SplitType | null;\n hideSeatsFromMarketplace: boolean | null;\n faceValue: number | null;\n inHandDate: string | null;\n daysBeforeEvent: number | null;\n section: string | null;\n sectionId: number | null;\n row: string | null;\n rowId: number | null;\n internalNotes: string | null;\n ticketTypeRules: TicketTypeOverride | null;\n manualMaxDisplayQuantity: number | null;\n isNoFulfill: boolean | null;\n enableNativeSync: boolean | null;\n seatTraits: ListingNote[] | null;\n delivType: DeliveryType | null;\n updateSalesOfListings: boolean | null;\n pricerSellerUserId: string | null;\n listPrice: number | null;\n allInPrice: number | null;\n buyerUserId: string | null;\n marketplacePriceUpdates: ListingMarketplacePriceUpdateInput[];\n tags: Tag[] | null;\n}\n\nexport interface ListingMarketplaceSeatingOverride {\n marketplace: Marketplace;\n overrideSection: string | null;\n overrideRow: string | null;\n overrideSeats: string | null;\n overrideRowId: number | null;\n overrideSectionId: number | null;\n}\n\nexport interface ListingMarketplacePriceUpdateInput {\n listPrice: number | null;\n allInPrice: number | null;\n priceByMarketplace: boolean;\n marketplace: Marketplace;\n markup: number | null;\n}\n\nexport interface CompListingQuantity {\n exactQuantities: number[];\n greaterThanOrEqualToQuantity: number | null;\n}\n\nexport interface ValueTupleOfBulkEditPreviewAndListingDetailsAutoPricingSectionUpdatesV2 {\n item1: BulkEditPreview;\n item2: ListingDetailsAutoPricingSectionUpdatesV2;\n}\n\nexport interface ListingDetailsAutoPricingSectionUpdatesV2 {\n id: number;\n rowVersion: number | null;\n currencyCode: string | null;\n netProceedsFloor: PosFieldOfNullableDecimal | null;\n netProceedsCeiling: PosFieldOfNullableDecimal | null;\n netProceedsFloorAdjustmentType: PricingFloorCeilingAdjustmentType | null;\n netProceedsFloorAdjustmentAmount: number | null;\n netProceedsFloorAdjustmentRelative: boolean | null;\n autoPricingEnabled: PosFieldOfNullableBoolean | null;\n undercutMode: PosFieldOfNullableAutoPricingUndercutMode | null;\n undercutAbsoluteAmount: PosFieldOfNullableDecimal | null;\n undercutRelativeAmount: PosFieldOfNullableDecimal | null;\n compListingMode: PosFieldOfNullableAutoPricingCompListingMode | null;\n compListingFloor: PosFieldOfNullableDecimal | null;\n compListingCeiling: PosFieldOfNullableDecimal | null;\n compListingQuantityScoreAdjustmentEnabled: PosFieldOfNullableBoolean | null;\n compListingQuantityScoreAdjustmentOverrideJson: PosFieldOfString | null;\n compListingOnlyForSameZoneEnabled: PosFieldOfNullableBoolean | null;\n compListingOnlyForSelectedSectionsEnabled: PosFieldOfNullableBoolean | null;\n compListingExcludeFanInventory: PosFieldOfNullableBoolean | null;\n compListingExcludeDefects: PosFieldOfNullableBoolean | null;\n compListingSelectedSectionSettings: PosFieldOfSelectedSectionSettings | null;\n includeExistingSelectedSections: boolean | null;\n venueZoneMapName: string | null;\n deriveCompsFromVenueZoneConfig: boolean | null;\n includeBetterZones: boolean | null;\n rowCompOffset: number | null;\n circuitBreakerRelativeCeiling: PosFieldOfNullableDecimal | null;\n circuitBreakerRelativeFloor: PosFieldOfNullableDecimal | null;\n circuitBreakerMaxDiscountVelocityPercent: PosFieldOfNullableDecimal | null;\n circuitBreakerMaxDiscountVelocityTicksInHours: PosFieldOfNullableLong | null;\n circuitBreakerMinCompListingCount: PosFieldOfNullableInteger | null;\n outlierMode: PosFieldOfNullableAutoPricingOutlierMode | null;\n outlierStandardDeviations: PosFieldOfNullableDecimal | null;\n outlierKthLowestLimit: PosFieldOfNullableInteger | null;\n outlierKthLowestLimitRelativeSpacing: PosFieldOfNullableDecimal | null;\n outlierKthLowestLimitAbsoluteSpacing: PosFieldOfNullableDecimal | null;\n}\n\nexport interface PosFieldOfNullableDecimal {\n value: number | null;\n hasChanged: boolean;\n}\n\nexport interface PosFieldOfNullableBoolean {\n value: boolean | null;\n hasChanged: boolean;\n}\n\nexport interface PosFieldOfNullableAutoPricingUndercutMode {\n value: AutoPricingUndercutMode | null;\n hasChanged: boolean;\n}\n\nexport interface PosFieldOfNullableAutoPricingCompListingMode {\n value: AutoPricingCompListingMode | null;\n hasChanged: boolean;\n}\n\nexport interface PosFieldOfString {\n value: string | null;\n hasChanged: boolean;\n}\n\nexport interface PosFieldOfSelectedSectionSettings {\n value: SelectedSectionSettings | null;\n hasChanged: boolean;\n}\n\nexport interface PosFieldOfNullableLong {\n value: number | null;\n hasChanged: boolean;\n}\n\nexport interface PosFieldOfNullableInteger {\n value: number | null;\n hasChanged: boolean;\n}\n\nexport interface PosFieldOfNullableAutoPricingOutlierMode {\n value: AutoPricingOutlierMode | null;\n hasChanged: boolean;\n}\n\nexport interface BulkListingPriceCalculationResult {\n listingPriceCalculations: BulkListingPriceCalculation[];\n compListings: CompListing[];\n sellerCompListings: CompListing[];\n}\n\nexport interface BaseListingPriceCalculation {\n listingId: number;\n websitePrice: UiMoney | null;\n autoPricingResultType: AutoPricingResultType | null;\n errorMessage: string | null;\n underCutChosenListingId: number | null;\n /** Computed Floor, includes premiums */\n cmpFlr: UiMoney | null;\n /** Computed Ceiling, includes premiums */\n cmpCeil: UiMoney | null;\n /** UndercutAbsolute amount */\n udrAbs: number | null;\n /** UndercutRelative amount */\n udrRel: number | null;\n /** UndercutAbsolute Rank Premium */\n udrAbsPrm: number | null;\n /** UndercutRelative Rank Premium */\n udrRelPrm: number | null;\n}\n\nexport interface BulkListingPriceCalculation extends BaseListingPriceCalculation {\n compStubHubListingIds: number[];\n outlierStubHubListingIds: number[];\n sellerCompStubHubListingIds: number[];\n}\n\nexport interface CompListing {\n listingId: number;\n availableTickets: number | null;\n rowId: number | null;\n section: string | null;\n row: string | null;\n seatFrom: string | null;\n seatTo: string | null;\n sellerNetProceeds: UiMoney | null;\n sellerNetProceedsInUSD: UiMoney | null;\n sellerAllInPrice: UiMoney | null;\n currencyCode: string | null;\n listingNotes: ListingNote[] | null;\n isWithoutOutlier: boolean | null;\n isAnchor: boolean | null;\n isSellerCompListing: boolean | null;\n validPurchaseQuantities: number[];\n}\n\nexport interface ValueTupleOfInt64OfAndListingPriceCalculationsInEventInput {\n item1: number[];\n item2: ListingPriceCalculationsInEventInput;\n}\n\nexport interface ListingPriceCalculationsInEventInput {\n compListingSetting: CompListingSettingUpdate;\n underCutSetting: UnderCutSettingUpdate;\n outlierSetting: OutlierSettingUpdate;\n netProceedsFloor: PosFieldOfNetProceedsFloorAdjustment | null;\n netProceedsCeiling: PosFieldOfUiMoney | null;\n}\n\nexport interface CompListingSettingUpdate {\n mode: PosFieldOfNullableAutoPricingCompListingMode | null;\n selectedSectionSettings: PosFieldOfSelectedSectionSettings | null;\n includeExistingSelectedSectionSettings: PosFieldOfNullableBoolean | null;\n onlyForSelectedSectionsEnabled: PosFieldOfNullableBoolean | null;\n quantityFilters: PosFieldOfCompListingQuantity | null;\n excludeFanInventory: PosFieldOfNullableBoolean | null;\n excludeDefects: PosFieldOfNullableBoolean | null;\n}\n\nexport interface PosFieldOfCompListingQuantity {\n value: CompListingQuantity | null;\n hasChanged: boolean;\n}\n\nexport interface UnderCutSettingUpdate {\n underCutAbsoluteAmount: PosFieldOfUiMoney | null;\n underCutRelativeAmount: PosFieldOfNullableDecimal | null;\n}\n\nexport interface PosFieldOfUiMoney {\n value: UiMoney | null;\n hasChanged: boolean;\n}\n\nexport interface OutlierSettingUpdate {\n mode: PosFieldOfNullableAutoPricingOutlierMode | null;\n standardDeviations: PosFieldOfNullableDecimal | null;\n outlierLimit: PosFieldOfNullableInteger | null;\n absoluteOutlierSpacing: PosFieldOfUiMoney | null;\n relativeOutlierSpacing: PosFieldOfNullableDecimal | null;\n}\n\nexport interface PosFieldOfNetProceedsFloorAdjustment {\n value: NetProceedsFloorAdjustment | null;\n hasChanged: boolean;\n}\n\nexport interface NetProceedsFloorAdjustment {\n relativeAdjustmentType: PricingFloorCeilingAdjustmentType | null;\n absoluteAmount: UiMoney | null;\n relativeAmount: UiMoney | null;\n relativePercentage: number | null;\n}\n\nexport interface ValueTupleOfBulkEditPreviewAndListingPricesUpdateInput {\n item1: BulkEditPreview;\n item2: ListingPricesUpdateInput;\n}\n\nexport interface ListingPricesUpdateInput {\n id: number;\n listPrice: number | null;\n allInPrice: number | null;\n netProceedsFloor: number | null;\n netProceedsCeiling: number | null;\n autoPricingEnabled: boolean | null;\n marketplacePriceUpdates: ListingMarketplacePriceUpdateInput[];\n}\n\nexport interface ValueTupleOfBulkEditPreviewAndISetOfMarketplaceAndISetOfMarketplace {\n item1: BulkEditPreview;\n item2: Marketplace[];\n item3: Marketplace[];\n}\n\nexport interface ValueTupleOfBulkEditPreviewAndDeliveryTypeAndIListOfTicketTypePriority {\n item1: BulkEditPreview;\n item2: DeliveryType;\n item3: TicketTypePriority[];\n}\n\nexport interface MergeListingGroupInputList {\n mergeListingGroupInputs: MergeListingGroupInput[];\n}\n\nexport interface MergeListingGroupInput {\n listingGroupId: string;\n name: string;\n viagogoEventId: number | null;\n viagogoMappingId: string | null;\n desiredActiveListings: number | null;\n minActiveListings: number | null;\n maxActiveListings: number | null;\n targetPercentage: number | null;\n deprioritizedQuantities: string[] | null;\n listingGroupItems: ListingGroupItemInput[];\n groupUndercutSetting: ListingGroupUndercutSetting | null;\n marketplaceSettings: ListingGroupListingMarketplaceSettings | null;\n groupingMethods: ListingGroupingMethods | null;\n}\n\nexport interface ListingGroupItemInput {\n listingId: number;\n priority: number;\n groupId: string | null;\n undercutSetting: ListingGroupUndercutSetting | null;\n}\n\nexport interface ListingGroupListingMarketplaceSettings {\n listingMarketplaceSettings: { [key: string]: ListingMarketplaceSetting; } | null;\n}\n\nexport interface ListingMarketplaceSetting {\n listingBroadcastStateId: number;\n}\n\nexport interface ListingGroupingMethods {\n groupingMethods: ListingGroupingMethod[];\n}\n\nexport interface ListingGroupingMethod {\n groupingOrder: number;\n groupingType: GroupingType;\n groupingValue: string | null;\n numberOfBucket: number | null;\n bucketType: BucketType | null;\n}\n\nexport enum GroupingType {\n None = \"None\",\n Zone = \"Zone\",\n Section = \"Section\",\n Row = \"Row\",\n SeatScore = \"SeatScore\",\n Quantity = \"Quantity\",\n UnitCost = \"UnitCost\",\n Custom = \"Custom\",\n}\n\nexport enum BucketType {\n None = \"None\",\n Clusters = \"Clusters\",\n SameSize = \"SameSize\",\n}\n\nexport interface AutoGroupListingV2Input {\n mode: AutoCompAndAutoGroupMode;\n viagogoEventId: number;\n eventListingIds: number[];\n zoneSectionAreaGroupLookupJson: string;\n /** Determines how the row ordinal comps will be determinedjd */\n rowCompOffset: number;\n /** Determines how the RowArea names will be determined */\n rowGroupSetting: RowGroupSetting;\n venueZoneConfigType: VenueZoneConfigType;\n combineCornersAndEnds: boolean;\n rowCompOverrides: RowCompOverride[];\n useCustomRank: boolean;\n mergeListingGroupInputs: MergeListingGroupInput[] | null;\n}\n\nexport enum AutoCompAndAutoGroupMode {\n AutoComp = \"AutoComp\",\n AutoGroup = \"AutoGroup\",\n AutoCompAndAutoGroup = \"AutoCompAndAutoGroup\",\n}\n\nexport enum RowGroupSetting {\n SingleTwoToFiveSixPlus = \"SingleTwoToFiveSixPlus\",\n OneToFiveSixPlus = \"OneToFiveSixPlus\",\n OneToTenElevenPlus = \"OneToTenElevenPlus\",\n AllRows = \"AllRows\",\n OneTwoToFiveSixToTwelveThirteenPlus = \"OneTwoToFiveSixToTwelveThirteenPlus\",\n}\n\nexport enum VenueZoneConfigType {\n Amphitheater = \"Amphitheater\",\n ConcertsSectionsBehindStage = \"ConcertsSectionsBehindStage\",\n SportsOrConcertsWith360 = \"SportsOrConcertsWith360\",\n}\n\nexport interface RowCompOverride {\n rowOrdinalFrom: number;\n rowOrdinalTo: number;\n offsetOverride: number;\n}\n\nexport interface ValueTupleOfBulkEditPreviewAndIListOfCommission {\n item1: BulkEditPreview;\n item2: Commission[];\n}\n\nexport interface ValueTupleOfBulkEditPreviewAndIListOfListingNote {\n item1: BulkEditPreview;\n item2: ListingNote[];\n}\n\nexport interface BulkEditListingGroupSettingsInput {\n desiredActiveListings: number | null;\n deprioritizedQuantities: string[] | null;\n groupUndercutSetting: ListingGroupUndercutSetting | null;\n marketplaceSettings: ListingGroupListingMarketplaceSettings | null;\n autoPricingInputs: AutoPricingInputs | null;\n listingGroupListingIds: number[] | null;\n}\n\nexport interface AutoPricingInputs {\n autoPriceFrequency: number | null;\n scoreModel: ScoreModel | null;\n venueZoneConfigType: VenueZoneConfigType | null;\n venueZoneOverrideId: number | null;\n autoPricingDefaultQuantityFiltersJson: string | null;\n undercutMode: AutoPricingUndercutMode | null;\n undercutAbsoluteAmount: number | null;\n undercutRelativeAmount: number | null;\n compListingMode: AutoPricingCompListingMode | null;\n compListingFloor: number | null;\n compListingCeiling: number | null;\n compListingQuantityScoreAdjustmentEnabled: boolean | null;\n compListingQuantityScoreAdjustmentOverrides: { [key: string]: number; } | null;\n compListingQuantityScoreAdjustmentOverrideJson: string | null;\n compListingOnlyForSameZoneEnabled: boolean | null;\n compListingOnlyForSelectedSectionsEnabled: boolean | null;\n compListingExcludeFanInventory: boolean | null;\n compListingExcludeDefects: boolean | null;\n compListingSelectedSectionSettings: SelectedSectionSettings | null;\n compListingQuantityFilters: CompListingQuantity | null;\n circuitBreakerRelativeCeiling: number | null;\n circuitBreakerRelativeFloor: number | null;\n circuitBreakerMaxDiscountVelocityPercent: number | null;\n circuitBreakerMaxDiscountVelocityTicksInHours: number | null;\n circuitBreakerMinCompListingCount: number | null;\n outlierMode: AutoPricingOutlierMode | null;\n outlierStandardDeviations: number | null;\n outlierKthLowestLimit: number | null;\n outlierKthLowestLimitRelativeSpacing: number | null;\n outlierKthLowestLimitAbsoluteSpacing: number | null;\n}\n\nexport enum ScoreModel {\n Model1 = \"Model1\",\n Model2 = \"Model2\",\n Model3 = \"Model3\",\n Model4 = \"Model4\",\n VenueGeometry = \"VenueGeometry\",\n MergedVenueGeometry = \"MergedVenueGeometry\",\n Bezier = \"Bezier\",\n AdvancedVenueGeometry = \"AdvancedVenueGeometry\",\n BespokeBaseball = \"BespokeBaseball\",\n SqsClassifier = \"sqsClassifier\",\n}\n\nexport interface BulkEditLog {\n entityType: ActionOutboxEntityType;\n bulkActionType: BulkActionType;\n bulkProcessingId: string;\n payload: BulkEditLogPayload;\n sellerUserId: string | null;\n startDate: string;\n endDate: string | null;\n}\n\n/** Enum used when saving bulk action logs and then retrieving them by action type for display. */\nexport enum BulkActionType {\n GroupListings = \"GroupListings\",\n ChangeEvent = \"ChangeEvent\",\n AdminHold = \"AdminHold\",\n MarkAsFulfilled = \"MarkAsFulfilled\",\n CancelPurchase = \"CancelPurchase\",\n DeleteTicketGroup = \"DeleteTicketGroup\",\n UploadPurchaseFile = \"UploadPurchaseFile\",\n BackfillDeliverySettings = \"BackfillDeliverySettings\",\n ConvertPurchasePayment = \"ConvertPurchasePayment\",\n WasteTickets = \"WasteTickets\",\n UpdateBroadcastSettings = \"UpdateBroadcastSettings\",\n UpdatePrices = \"UpdatePrices\",\n UpdateTagValues = \"UpdateTagValues\",\n UpdatePriceFloorCeiling = \"UpdatePriceFloorCeiling\",\n UpdateAutoPricingSettings = \"UpdateAutoPricingSettings\",\n UpdateGeneralSettings = \"UpdateGeneralSettings\",\n UpdateMarketplaceSeating = \"UpdateMarketplaceSeating\",\n UpdateTicketTypeRules = \"UpdateTicketTypeRules\",\n UpdateBuyerCommissions = \"UpdateBuyerCommissions\",\n UpdateInternalNotes = \"UpdateInternalNotes\",\n UpdateIsNoFulfill = \"UpdateIsNoFulfill\",\n UpdateDeliveryType = \"UpdateDeliveryType\",\n UpdateSeatTraits = \"UpdateSeatTraits\",\n UpdateMarketplacePrices = \"UpdateMarketplacePrices\",\n UpdatePurchaseCurrency = \"UpdatePurchaseCurrency\",\n DeleteSeatSavers = \"DeleteSeatSavers\",\n RemovePredelivery = \"RemovePredelivery\",\n UngroupListings = \"UngroupListings\",\n EditListingGroupSetting = \"EditListingGroupSetting\",\n MarkPurchaseAsPaid = \"MarkPurchaseAsPaid\",\n MarkSaleAsPaid = \"MarkSaleAsPaid\",\n CancelSale = \"CancelSale\",\n}\n\nexport interface BulkEditLogPayload {\n method: string;\n latestStep: BulkEditStep;\n errors: string[];\n warnings: string[];\n entitiesByType: { [key in keyof typeof ActionOutboxEntityType]?: BulkEditCountWithId; };\n filterQuery: EntityWithTicketsQuery | null;\n /** Free form dict to save all params that we can */\n params: any | null;\n startDate: string;\n endDate: string;\n}\n\nexport interface BulkEditCountWithId extends BulkEditCount {\n skipCount: number;\n idsToBeProcessed: string[];\n idsSkipped: string[];\n idsSuccessful: string[];\n idsFailed: string[];\n idsWarning: string[];\n idsToRetry: string[];\n}\n\nexport interface BulkEditLogQuery {\n startDates: DateTimeRangeWithRelative | null;\n entityType: ActionOutboxEntityType | null;\n bulkActionTypes: BulkActionType[];\n timezoneOffsetMins: number | null;\n}\n\nexport interface PurchaseOrderQuery extends EntityWithTicketsQuery {\n ticketGroupIds: number[] | null;\n purchaseMonths: string[] | null;\n /** Payment method type */\n paymentMethod: PurchasePaymentMethodType | null;\n paymentStatus: PurchasePaymentStatus | null;\n paymentDates: DateTimeRangeWithRelative | null;\n totalCostHigh: number | null;\n totalCostLow: number | null;\n deliveryType: DeliveryType | null;\n purchaseOrderState: PurchaseOrderState | null;\n /** This is only used to filter on the frontend application. */\n viewMode: PurchaseViewMode | null;\n /** Exact payment method used */\n paymentMethodId: number | null;\n paymentCurrencyCodes: string[] | null;\n isConsignment: boolean | null;\n}\n\nexport enum PurchaseViewMode {\n TileView = \"Tile View\",\n FlattenedView = \"Flattened View\",\n EventTileView = \"Event Tile View\",\n}\n\nexport interface ValueTupleOfBulkEditPreviewAndPosFieldOfNullableGuid {\n item1: BulkEditPreview;\n item2: PosFieldOfNullableGuid;\n}\n\nexport interface PosFieldOfNullableGuid {\n value: string | null;\n hasChanged: boolean;\n}\n\nexport interface ValueTupleOfBulkEditPreviewAndString {\n item1: BulkEditPreview;\n item2: string;\n}\n\nexport interface ValueTupleOfBulkEditPreviewAndNullableSaleCancellationReason {\n item1: BulkEditPreview;\n item2: SaleCancellationReason | null;\n}\n\nexport interface ImportFileResult {\n startedInBackground: boolean;\n success: boolean;\n successCount: number;\n failureCount: number;\n totalCount: number;\n errors: string[];\n errorRows: number[];\n}\n\nexport interface SaleQuery extends EntityWithTicketsQuery {\n soldOnMarketplace: Marketplace | null;\n saleStatus: PointOfSaleSaleStatus | null;\n saleStatuses: PointOfSaleSaleStatus[] | null;\n fulfillmentStates: PointOfSaleFulfillmentState[] | null;\n paymentState: PointOfSalePaymentState | null;\n marketplacePaymentState: MarketplacePaymentState | null;\n paymentReceived: boolean | null;\n paymentReferenceId: string | null;\n paymentDates: DateTimeRangeWithRelative | null;\n fulfillmentDates: DateTimeRangeWithRelative | null;\n cancellationDates: DateTimeRangeWithRelative | null;\n saleDates: DateTimeRangeWithRelative | null;\n ticketType: TicketType | null;\n fulfillerSellerUserId: string | null;\n listingInsertBy: string | null;\n isNoFulfill: boolean | null;\n /** This is only used to filter on the frontend application. */\n viewMode: SalesViewMode | null;\n}\n\nexport enum SalesViewMode {\n TileView = \"Tile View\",\n FlattenedView = \"Flattened View\",\n}\n\nexport interface ValueTupleOfBulkEditPreviewAndSaleInput {\n item1: BulkEditPreview;\n item2: SaleInput;\n}\n\nexport interface SaleInput {\n saleId: number;\n ticketType: PosFieldOfNullableTicketType | null;\n fulfillerSellerUserId: PosFieldOfNullableGuid | null;\n internalNotes: PosFieldOfString | null;\n tags: PosFieldArrayOfTag | null;\n lineItems: PosFieldArrayOfSaleLineItem | null;\n marketplacePaymentLines: PosFieldArrayOfSiteMarketplacePaymentLineInput | null;\n paymentReceived: PosFieldOfNullableBoolean | null;\n paymentReferenceId: PosFieldOfString | null;\n lastPaymentDate: PosFieldOfNullableDateTime | null;\n paymentAmountReceived: PosFieldOfNullableDecimal | null;\n paymentCurrency: PosFieldOfString | null;\n disableAutoSourcing: PosFieldOfNullableBoolean | null;\n isNoFulfill: PosFieldOfNullableBoolean | null;\n commissions: PosFieldArrayOfCommission | null;\n cancellationReason: PosFieldOfNullableSaleCancellationReason | null;\n}\n\nexport interface PosFieldOfNullableTicketType {\n value: TicketType | null;\n hasChanged: boolean;\n}\n\n/** Note - doing PosFieldArray so it can be property generated to React TypeScript */\nexport interface PosFieldArrayOfTag {\n value: Tag[] | null;\n hasChanged: boolean;\n}\n\n/** Note - doing PosFieldArray so it can be property generated to React TypeScript */\nexport interface PosFieldArrayOfSaleLineItem {\n value: SaleLineItem[] | null;\n hasChanged: boolean;\n}\n\nexport interface SaleLineItem {\n id: number;\n saleId: number;\n status: SaleLineItemStatus;\n costType: SaleCostType;\n costDate: string | null;\n dueDate: string | null;\n cost: number;\n currencyCode: string;\n description: string | null;\n saleLineItemChargeReason: SaleLineItemChargeReason | null;\n saleLineItemCreditReason: SaleLineItemCreditReason | null;\n marketplacePaymentLineId: number | null;\n paymentReceived: boolean | null;\n paymentReferenceId: string | null;\n}\n\nexport enum SaleLineItemStatus {\n Paid = \"Paid\",\n Unpaid = \"Unpaid\",\n}\n\nexport enum SaleCostType {\n Charge = \"Charge\",\n Credit = \"Credit\",\n Proceeds = \"Proceeds\",\n Taxes = \"Taxes\",\n}\n\nexport enum SaleLineItemChargeReason {\n CancelledProceeds = \"CancelledProceeds\",\n DroppedOrderPenalty = \"DroppedOrderPenalty\",\n Compensation = \"Compensation\",\n Other = \"Other\",\n}\n\nexport enum SaleLineItemCreditReason {\n ReversedPenalty = \"ReversedPenalty\",\n ReversedCharge = \"ReversedCharge\",\n ProceedRepayment = \"ProceedRepayment\",\n Other = \"Other\",\n}\n\n/** Note - doing PosFieldArray so it can be property generated to React TypeScript */\nexport interface PosFieldArrayOfSiteMarketplacePaymentLineInput {\n value: SiteMarketplacePaymentLineInput[] | null;\n hasChanged: boolean;\n}\n\nexport interface SiteMarketplacePaymentLineInput {\n marketplacePaymentLineId: number | null;\n marketplacePaymentId: number | null;\n externalPaymentId: string;\n externalPaymentLineId: string;\n externalSaleId: string;\n saleId: number | null;\n currency: string;\n amount: number;\n isCredit: boolean;\n paymentLineType: MarketplacePaymentLineType;\n paymentState: MarketplacePaymentState;\n paymentDate: string | null;\n receivedDate: string | null;\n}\n\nexport enum MarketplacePaymentLineType {\n Credit = \"Credit\",\n Proceeds = \"Proceeds\",\n FullPrice = \"FullPrice\",\n SellerFee = \"SellerFee\",\n Penalty = \"Penalty\",\n AlternativeTickets = \"AlternativeTickets\",\n OrderNotFulfilled = \"OrderNotFulfilled\",\n CancelledEvent = \"CancelledEvent\",\n WitheldFunds = \"WitheldFunds\",\n LastMinuteSalesLateDelivery = \"LastMinuteSalesLateDelivery\",\n ExpiredShippingLabel = \"ExpiredShippingLabel\",\n DeliveryMethodChange = \"DeliveryMethodChange\",\n BuyerDeniedEntry = \"BuyerDeniedEntry\",\n WrongTicketsReturnShippingCost = \"WrongTicketsReturnShippingCost\",\n EarlyShippingLabelGeneration = \"EarlyShippingLabelGeneration\",\n WrongTrackingNumber = \"WrongTrackingNumber\",\n ExcessiveFailureRate = \"ExcessiveFailureRate\",\n SellerError = \"SellerError\",\n AlternativeTicketsBuyerCompensation = \"AlternativeTicketsBuyerCompensation\",\n RAGSellerFaultNoResponse = \"RAGSellerFaultNoResponse\",\n OverchargedSeller = \"OverchargedSeller\",\n ShippingRefund = \"ShippingRefund\",\n SellerRelationship = \"SellerRelationship\",\n RAGDeliveryDispute = \"RAGDeliveryDispute\",\n CSError = \"CSError\",\n LMSError = \"LMSError\",\n TaxRefund = \"TaxRefund\",\n Other = \"Other\",\n Charge = \"Charge\",\n}\n\nexport interface PosFieldOfNullableDateTime {\n value: string | null;\n hasChanged: boolean;\n}\n\n/** Note - doing PosFieldArray so it can be property generated to React TypeScript */\nexport interface PosFieldArrayOfCommission {\n value: Commission[] | null;\n hasChanged: boolean;\n}\n\nexport interface PosFieldOfNullableSaleCancellationReason {\n value: SaleCancellationReason | null;\n hasChanged: boolean;\n}\n\nexport interface CreateCampaignClientResponse {\n success: boolean;\n campaignId: string | null;\n}\n\nexport enum AdCampaignState {\n Active = \"Active\",\n Paused = \"Paused\",\n Archived = \"Archived\",\n}\n\nexport interface MoneyType {\n amount: number;\n currencyCode: string;\n}\n\nexport interface CreateAdGroupClientResponse {\n success: boolean;\n adGroupId: string | null;\n}\n\nexport interface CreateAdGroupRequest {\n name: string;\n state: AdGroupState;\n campaignId: string;\n baseBid: MoneyType;\n maxBid: MoneyType;\n dailyBudget: MoneyType;\n bidModifiers: KeyValuePairOfAdGroupBidModifierKeyAndCreateAdGroupBidModifierValue[];\n}\n\nexport enum AdGroupState {\n Active = \"Active\",\n Paused = \"Paused\",\n Archived = \"Archived\",\n}\n\nexport interface KeyValuePairOfAdGroupBidModifierKeyAndCreateAdGroupBidModifierValue {\n key: AdGroupBidModifierKey;\n value: CreateAdGroupBidModifierValue;\n}\n\nexport interface AdGroupBidModifierKey {\n topLevelCategoryId: number | null;\n leafCategoryId: number | null;\n venueId: number | null;\n eventId: number | null;\n ticketClassId: number | null;\n sectionId: number | null;\n rowId: number | null;\n externalId: string | null;\n}\n\nexport interface CreateAdGroupBidModifierValue {\n isManaged: boolean;\n value: number;\n}\n\nexport interface ArchiveCampaignClientResponse {\n success: boolean;\n}\n\nexport interface ArchiveAdGroupClientResponse {\n success: boolean;\n}\n\nexport interface AdCampaignEntity {\n campaignId: string;\n state: AdCampaignState;\n name: string;\n sellerId: string;\n budget: MoneyType;\n startDateTime: string;\n endDateTime: string | null;\n currencyCode: string;\n}\n\nexport interface AdGroup {\n adGroupId: string;\n state: AdGroupState;\n name: string;\n campaignId: string;\n baseBid: MoneyType;\n maxBid: MoneyType;\n dailyBudget: MoneyType;\n bidModifiers: KeyValuePairOfAdGroupBidModifierKeyAndAdGroupBidModifierValue[];\n}\n\nexport interface KeyValuePairOfAdGroupBidModifierKeyAndAdGroupBidModifierValue {\n key: AdGroupBidModifierKey;\n value: AdGroupBidModifierValue;\n}\n\nexport interface AdGroupBidModifierValue {\n adGroupBidModifierId: string;\n adGroupId: string;\n isManaged: boolean;\n value: number;\n}\n\nexport interface CatalogResults {\n events: { [key: string]: EventWithData; };\n performers: { [key: string]: Performer; };\n venues: { [key: string]: Venue; };\n venueCfgs: { [key: string]: Event[]; };\n viagIdToLatestIdLookup: { [key: string]: string; };\n posIdToViagIdLookup: { [key: string]: string; };\n purchaseCount: number;\n}\n\nexport interface CatalogSaleMetricsResults {\n maxRowVersion: number | null;\n events: { [key: string]: SaleMetrics; };\n performers: { [key: string]: SaleMetrics; };\n venues: { [key: string]: SaleMetrics; };\n}\n\nexport interface SaleMetrics {\n /** Sold Ticket Quantity */\n qtySold: number;\n /** Unfulfilled Sales */\n saleUnfilled: number;\n /** Total net proceeds of sold tickets */\n netProcs: UiMoney | null;\n /** Total cost */\n ttlCst: UiMoney | null;\n currency: string | null;\n /** Margin */\n marg: number | null;\n}\n\nexport interface CatalogTicketGroupMetricsResults {\n maxRowVersion: number | null;\n events: { [key: string]: TicketGroupMetrics; };\n performers: { [key: string]: TicketGroupMetrics; };\n venues: { [key: string]: TicketGroupMetrics; };\n}\n\nexport interface TicketGroupMetrics {\n /** Total Ticket Quantity */\n tktQty: number;\n /** Total cost */\n ttlCst: UiMoney | null;\n currency: string | null;\n}\n\nexport interface EventGroupingQuery {\n groupingType: EventGroupingType;\n searchText: string | null;\n sortBy: EventGroupingSortBy | null;\n isSortDescending: boolean | null;\n}\n\nexport enum EventGroupingType {\n Performer = \"Performers\",\n Venue = \"Venues\",\n}\n\nexport enum EventGroupingSortBy {\n Name = \"Name\",\n}\n\nexport interface EventSearchQuery {\n searchText: string | null;\n performerId: number | null;\n venueId: number | null;\n timeFrame: EventTimeFrameFilter | null;\n}\n\nexport interface CatalogListingMetricsResults {\n eventsDetailed: { [key: string]: ListingDetailedMetrics; };\n maxRowVersion: number | null;\n events: { [key: string]: ListingMetrics; };\n performers: { [key: string]: ListingMetrics; };\n venues: { [key: string]: ListingMetrics; };\n}\n\nexport interface ListingMetrics {\n /** Total Ticket Quantity */\n tktQty: number;\n /** Sold Ticket Quantity */\n soldQty: number;\n unsoldQty: number;\n listQty: number;\n /** Unlisted ticket quantity */\n unlistQty: number;\n currency: string;\n /** Total cost of all tickets */\n ttlCst: UiMoney;\n /** Total cost of sold tickets */\n soldCst: UiMoney;\n /** Total cost of unsold tickets */\n unsoldCst: UiMoney;\n /** Total list price of all tickets */\n ttlListPrc: UiMoney;\n /** Total list price of unsold tickets */\n ttlUnsoldListPrc: UiMoney;\n /** Total net proceeds of sold tickets */\n netProcs: UiMoney;\n /** Total gross profit of sold tickets, i.e. SumNetProcs - SumSoldCst */\n pandL: UiMoney;\n}\n\nexport interface ListingDetailedMetrics extends ListingMetrics {\n /** Sell through rate */\n str: number;\n /** Revenue */\n rvn: UiMoney;\n /** Lift percentage */\n liftPerc: number;\n /** Average ticket price */\n atp: UiMoney;\n listedATP: UiMoney;\n /** Last price updated date */\n priceUpdatedOn: string | null;\n tags: Tag[] | null;\n}\n\nexport interface ListingMetricsInput {\n totalTicketQuantity: number | null;\n totalSoldQuantity: number | null;\n totalUnsoldQuantity: number | null;\n totalListedQuantity: number | null;\n totalUnlistedQuantity: number | null;\n currencyCode: string | null;\n /** Total cost of all tickets */\n totalCost: Money | null;\n /** Total cost of sold tickets */\n totalSoldCost: Money | null;\n /** Total cost of unsold tickets */\n totalUnsoldCost: Money | null;\n /** Total list price of all tickets */\n totalListPrice: Money | null;\n /** Total value of all listed tickets */\n totalListedValue: Money | null;\n /** Total list price of unsold tickets */\n totalUnsoldListPrice: Money | null;\n /** Total net proceeds of sold tickets */\n totalNetProceeds: Money | null;\n /** Total gross profit of sold tickets */\n totalGrossProfit: Money | null;\n}\n\nexport interface Money {\n amount: number;\n display: string | null;\n currencyCode: string | null;\n decimalDigits: number;\n}\n\nexport interface ValueTupleOfEventAndVenueAndPerformer {\n item1: Event;\n item2: Venue;\n item3: Performer;\n}\n\nexport interface EventMappingRequest {\n eventName: string;\n eventDate: string;\n isEventDateConfirmed: boolean | null;\n eventNote: string | null;\n venueName: string;\n city: string;\n stateProvince: string;\n countryCode: string;\n}\n\nexport interface UpcomingOnSalesResult {\n catalog: CatalogResults;\n marketplaceEventInfos: { [key: string]: SellerEventMarketplaceEventInfo[]; };\n}\n\nexport interface SellerEventMarketplaceEventInfo {\n viagogoEventId: number | null;\n marketplace: Marketplace;\n mappedEventId: string | null;\n websiteEventId: string | null;\n eventIdOverride: string | null;\n eventMappingId: string | null;\n}\n\nexport interface OnSaleEventQuery {\n onSaleDates: DateTimeRangeWithRelative | null;\n timezoneOffsetMins: number | null;\n viewMode: OnSaleEventViewMode | null;\n searchText: string | null;\n eventIds: number[] | null;\n}\n\nexport enum OnSaleEventViewMode {\n MetricView = \"Metric View\",\n}\n\nexport interface OnSaleEventMetrics {\n eventId: number;\n eventVisits: OnSaleEventCountMetrics;\n eventTransactions: OnSaleEventCountMetrics;\n unitNetProceedsUsdMin: UiMoney;\n unitNetProceedsUsdP25: UiMoney;\n unitNetProceedsUsdP50: UiMoney;\n listingCount: number;\n ticketCount: number;\n}\n\nexport interface OnSaleEventCountMetrics {\n lastHour: number;\n lastDay: number;\n lastThreeDays: number;\n lastSevenDays: number;\n}\n\nexport interface CatalogCounts {\n entityCnts: { [key: string]: EventEntityCounts; };\n /** Reason for this is a Purchase can include in multiple events, while\nmultiple events can include multiple purchases, so the count is for the\nwhole catalog, not per event like listings or sales */\n purchaseCount: number;\n}\n\nexport interface ClientLogRequest {\n logLevel: LogLevel;\n applicationSource: string;\n errorId: string | null;\n error: string;\n pageUrl: string;\n componentStack: string | null;\n additionalInfo: { [key: string]: any; } | null;\n}\n\nexport enum LogLevel {\n Trace = \"Trace\",\n Verbose = \"Verbose\",\n Information = \"Information\",\n Warning = \"Warning\",\n Error = \"Error\",\n Critical = \"Critical\",\n None = \"None\",\n}\n\nexport interface ContentData {\n body: string;\n}\n\nexport interface DocumentUploadInfo {\n entityId: number;\n entityType: ActionOutboxEntityType;\n documentType: DocumentType;\n blobName: string;\n documentId: string;\n contentType: string;\n}\n\nexport interface PosUiActionResult {\n entityId: number | null;\n entityType: ActionOutboxEntityType | null;\n status: number | null;\n message: string | null;\n}\n\nexport interface PosUiActionResultWithDataOfUserDocumentLinks extends PosUiActionResult {\n data: UserDocumentLinks | null;\n}\n\nexport interface DocumentPage {\n id: string;\n documentId: string;\n pageNumber: number;\n thumbUrl: string;\n documentUrl: string;\n}\n\nexport interface EventListingConstraints {\n eventId: number;\n validListingNoteIds: number[] | null;\n validTicketTypes: number[] | null;\n isSeatRequired: boolean | null;\n validSplitTypes: number[] | null;\n}\n\nexport interface MarketTransaction {\n listingId: number;\n transactionDateTime: string;\n section: string;\n row: string;\n seatFrom: string;\n seatTo: string;\n quantityPurchased: number;\n sellerUserId: string;\n sellerNetProceeds: number;\n sellerCurrencyCode: string;\n}\n\nexport interface SellerEventNote {\n eventId: number | null;\n sellerEventNoteId: number;\n sellerUserId: string;\n content: string;\n createDate: string;\n}\n\nexport interface SellerEventNoteResult extends SellerEventNote {\n sellerDisplayName: string;\n}\n\nexport interface SellerAccountEventSetting {\n delivType: DeliveryType | null;\n isNoFulfill: boolean | null;\n tktTypeRules: TicketTypeOverride | null;\n inHandAt: string | null;\n vendorId: number | null;\n}\n\nexport interface FulfillmentProvider {\n fulfillmentProviderSellerUserId: string;\n fulfillmentProviderName: string;\n descriptionMessage: string;\n isEnabled: boolean;\n costPercentagePerTransfer: number | null;\n flatCostPerTransfer: number | null;\n}\n\nexport interface EventMarketplaceWebsiteMetrics {\n ticketsOnPlatform: EventMarketplaceWebsiteMetricOfInteger;\n eventVisitors: EventMarketplaceWebsiteMetricOfInteger;\n visitorsInCheckout: EventMarketplaceWebsiteMetricOfInteger;\n totalTicketPriceInCheckout: EventMarketplaceWebsiteMetricOfUiMoney;\n}\n\nexport interface EventMarketplaceWebsiteMetricOfInteger {\n currentValue: number;\n previousValue: number;\n}\n\nexport interface EventMarketplaceWebsiteMetricOfUiMoney {\n currentValue: UiMoney;\n previousValue: UiMoney;\n}\n\nexport interface InventoryMetricsQueryId {\n posEventId: string | null;\n viagogoEventId: number | null;\n}\n\nexport enum EventWebsiteMetricsTimePeriod {\n OneHour = \"OneHour\",\n OneDay = \"OneDay\",\n}\n\nexport interface EventDemandFactor {\n type: EventDemandFactorType;\n value: string;\n}\n\nexport enum EventDemandFactorType {\n Opponent = \"Opponent\",\n Weather = \"Weather\",\n Standing = \"Standing\",\n Stakes = \"Stakes\",\n SpotifyPopularity = \"SpotifyPopularity\",\n HomeTeamOdds = \"HomeTeamOdds\",\n}\n\n/** Represents the results for the inventory event dashboard. */\nexport interface InventoryEventDashboardResults {\n /** Gets or sets the marketplace shares as a dictionary with the marketplace as the key and the share percentage as the\nvalue\n */\n mktShares: MarketplaceMarketShare[];\n /** Gets or sets the average ticket price (ATP) value, which represents the average cost of tickets listed by the\nseller for the event\n */\n atp: TicketPricePercentiles;\n totalListings: number;\n}\n\nexport interface MarketplaceMarketShare {\n mktPlc: Marketplace;\n share: number;\n}\n\nexport interface TicketPricePercentiles {\n currency: string;\n listingCount: number;\n ticketCount: number;\n min: number;\n p25: number;\n p50: number;\n p75: number;\n max: number;\n}\n\nexport enum SellerEventDashboardMetricsTimePeriod {\n Last7Days = \"Last7Days\",\n AllTime = \"AllTime\",\n}\n\nexport interface EventSectionClearingPrices {\n sectionId: number | null;\n sectionName: string;\n p01: UiMoney;\n p25: UiMoney;\n p50: UiMoney;\n p75: UiMoney;\n p99: UiMoney;\n normalizedScore: number;\n}\n\nexport interface EventSupplyMetrics {\n dateTime: string;\n listingCount: number;\n ticketCount: number;\n min: number;\n p25: number;\n p50: number;\n p75: number;\n max: number;\n}\n\nexport enum EventSupplyMetricsTimePeriod {\n LastDay = \"LastDay\",\n LastSevenDays = \"LastSevenDays\",\n LastNinetyDays = \"LastNinetyDays\",\n}\n\nexport interface ListingDetails extends Listing {\n purchaseInfos: UiPurchaseInfo[] | null;\n tickets: Ticket[] | null;\n /** Available Artifact Types */\n availArtTypes: ArtifactType[] | null;\n saleInfos: SaleDisplayInfo[] | null;\n proofOfPurchaseDocs: UserDocumentLinks[] | null;\n no_Op: MarketplaceListing | null;\n}\n\nexport interface UiPurchaseInfo {\n purchaseOrderId: number;\n vendorOrderId: string | null;\n purchaseOrderDate: string | null;\n buyerUserId: string | null;\n vendor: UiPurchaseVendorInfo | null;\n vendorAccount: UiVendorAccountInfo | null;\n createdBy: string | null;\n internalNotes: string | null;\n}\n\nexport interface UiPurchaseVendorInfo {\n vendorId: number;\n vendorName: string;\n}\n\nexport interface UiVendorAccountInfo {\n vendorAccountId: string;\n vendorId: number;\n vendorAccountName: string | null;\n encryptedEmailAddress: string;\n}\n\nexport enum ArtifactType {\n TicketUrl = \"TicketUrl\",\n ExternalId = \"ExternalId\",\n ETicket = \"ETicket\",\n ETicketUrl = \"ETicketUrl\",\n TransferProof = \"TransferProof\",\n Barcode = \"Barcode\",\n QRCode = \"QRCode\",\n}\n\nexport interface SaleDisplayInfo {\n /** SaleId */\n id: number;\n /** MarketplaceSaleId */\n idOnMkp: string | null;\n /** Marketplace */\n mkp: Marketplace;\n /** SaleStatus */\n stat: PointOfSaleSaleStatus;\n /** ExternalId */\n externalId: string | null;\n}\n\nexport interface SectionalListingsForEventsInput {\n listingQuery: ListingQuery;\n curListings: Listing[] | null;\n}\n\nexport interface ValueTupleOfBooleanAndIListOfTicket {\n item1: boolean;\n item2: Ticket[];\n}\n\nexport interface DuplicateListingDetails {\n listingId: number;\n lastUpdateDate: string;\n duplicateListingId: number;\n duplicateListingLastUpdateDate: string;\n}\n\nexport interface ValueTupleOfLongAndListingDetailsUpdateInput {\n item1: number;\n item2: ListingDetailsUpdateInput;\n}\n\nexport interface MergeListingsInput {\n listingIds: number[];\n}\n\nexport interface BulkMergeListingsInput {\n listingIdLists: number[][];\n}\n\nexport interface ListingMergeSuggestion {\n listingIds: number[];\n eventId: number | null;\n eventMappingId: string | null;\n seatFrom: string | null;\n seatTo: string | null;\n}\n\nexport interface SplitListingInput {\n sourceListingId: number;\n numOfListings: number;\n /** Each of the sub-list will be considered 1 listing */\n ticketsByListingNumber: TicketByListingNumber[];\n alwaysUnbroadcastListing: boolean;\n useOriginalTicketGroupInfoForNewListings: boolean;\n}\n\nexport interface TicketByListingNumber {\n ticket: Ticket;\n listingNumber: number;\n}\n\nexport interface TicketBarcode {\n ticketId: number;\n barcode: string;\n section: string | null;\n row: string | null;\n seat: string | null;\n}\n\nexport interface TicketExternalId {\n ticketId: number;\n externalId: string;\n section: string | null;\n row: string | null;\n seat: string | null;\n}\n\nexport interface TicketUrl {\n ticketId: number;\n url: string;\n section: string | null;\n row: string | null;\n seat: string | null;\n}\n\nexport interface ListingPriceHistory {\n unitNetProceeds: UiMoney;\n priceDate: string;\n marketplace: Marketplace | null;\n pricerUserId: string | null;\n applicationName: string | null;\n}\n\nexport interface ValueTupleOfLongAndNullableInteger {\n item1: number;\n item2: number | null;\n}\n\nexport interface ListingPriceCalculation extends BaseListingPriceCalculation {\n compListings: CompListing[];\n}\n\nexport interface ValueTupleOfListingQueryAndListingCsvColumnSelectionConfig {\n item1: ListingQuery;\n item2: ListingCsvColumnSelectionConfig;\n}\n\nexport interface ListingCsvColumnSelectionConfig {\n hasAutoPricingFeature: boolean | null;\n}\n\nexport interface SeatSaverListingDetailsInput {\n event: Event;\n autoBroadcastCreatedListing: boolean;\n sellerOwnTickets: boolean | null;\n seatings: SeatSaverSeating[];\n deliveryType: DeliveryType;\n ticketTypeRules: TicketTypeOverride | null;\n inHandDate: string | null;\n daysBeforeEvent: number | null;\n}\n\nexport interface SeatSaverSeating {\n section: string;\n sectionId: number | null;\n row: string | null;\n rowId: number | null;\n quantity: number | null;\n maxDisplayQuantity: number | null;\n listingNotes: ListingNote[] | null;\n unitNetProceeds: number | null;\n websitePrice: number | null;\n faceValue: number | null;\n}\n\nexport interface BatchSwapListingGroupInput {\n listings: SwapListingGroupInput[];\n toListingGroupId: string;\n}\n\nexport interface SwapListingGroupInput {\n listingId: number;\n listingGroupId: string | null;\n quantity: number;\n adminHoldExpirationDate: string | null;\n}\n\nexport interface ReorderListingInGroupInput {\n listingGroupId: string;\n listingId: number;\n fromPosition: number;\n toPosition: number;\n}\n\nexport interface ListingDetailsBroadcastSectionUpdates {\n id: number;\n rowVersion: number | null;\n adminHoldNotes: string | null;\n marketplaceSeatOverrides: ListingMarketplaceSeatingOverride[];\n enableNativeSync: boolean | null;\n}\n\nexport interface ListingDetailsTicketSectionUpdates {\n id: number;\n rowVersion: number | null;\n splitType: SplitType | null;\n hideSeatsFromMarketplace: boolean | null;\n faceValue: number | null;\n inHandDate: string | null;\n daysBeforeEvent: number | null;\n section: string | null;\n sectionId: number | null;\n row: string | null;\n rowId: number | null;\n internalNotes: string | null;\n ticketTypeRules: TicketTypeOverride | null;\n manualMaxDisplayQuantity: number | null;\n isNoFulfill: boolean | null;\n seatTraits: ListingNote[] | null;\n delivType: DeliveryType | null;\n updateSalesOfListings: boolean | null;\n updatePredeliveryETicketArtifacts: boolean | null;\n}\n\nexport interface ListingDetailsPricingSectionUpdates {\n id: number;\n rowVersion: number | null;\n pricerSellerUserId: string | null;\n listPrice: number | null;\n allInPrice: number | null;\n netProceedsFloor: number | null;\n netProceedsCeiling: number | null;\n autoPricingEnabled: boolean | null;\n buyerUserId: string | null;\n marketplacePriceUpdates: ListingMarketplacePriceUpdateInput[];\n currencyCode: string | null;\n}\n\nexport interface ListingDetailsAutoPricingSectionUpdates extends AutoPricingInputs {\n id: number;\n rowVersion: number | null;\n netProceedsFloor: number | null;\n netProceedsCeiling: number | null;\n skipAutoPricing: boolean | null;\n autoPricingEnabled: boolean | null;\n skipUndercut: boolean | null;\n skipCompListing: boolean | null;\n skipAdvancePricing: boolean | null;\n currencyCode: string | null;\n}\n\nexport interface ListingDetailsTagsSectionUpdates {\n id: number;\n rowVersion: number | null;\n tags: Tag[] | null;\n}\n\nexport interface ListingStatusInfo {\n entityType: ActionOutboxEntityType;\n id: number;\n status: ListingStatus;\n /** Marketplace listing broadcast status */\n brdcstStatus: ListingBroadcastStatus | null;\n /** Marketplace where these tickets were listed and sold */\n mkp: Marketplace | null;\n /** Represent either the MarketplaceListingId or MarketplaceSaleId */\n idOnMkp: string | null;\n pendProofState: PendingProofState | null;\n mkpListings: MarketplaceListingStatusInfo[];\n}\n\nexport interface MarketplaceListingStatusInfo {\n mkpListingId: string | null;\n mkp: Marketplace;\n status: ListingStatus;\n}\n\nexport interface ListingExperiment {\n viagogoEventId: number;\n listingGroupId: string | null;\n listingGroupName: string | null;\n targetPercentage: number | null;\n discountPercentage: number | null;\n startDate: string;\n endDate: string;\n insertBy: string;\n}\n\nexport interface ListingGroup extends Listing {\n groupType: GroupType;\n groupName: string;\n deliveryTypes: ValueTupleOfDeliveryTypeAndNullableTicketType[];\n groupItems: IListingGroupItem[];\n desiredActiveListings: number | null;\n minActiveListings: number | null;\n maxActiveListings: number | null;\n targetPercentage: number | null;\n desiredAvailableQuantity: number | null;\n deprioritizedQuantities: string[] | null;\n marketplaceSettings: ListingGroupListingMarketplaceSettings | null;\n absoluteRankPremium: number | null;\n relativeRankPremium: number | null;\n /** This is for UI only - but it indicates that the entire group is locked from editing so that\nwhen you're making edits to the groups you don't accidentally modify the groups again in parallel and create conflicts */\n isLockedFromEdits: boolean | null;\n}\n\nexport enum GroupType {\n Invisible = \"Invisible\",\n FullySold = \"FullySold\",\n Inactive = \"Inactive\",\n Active = \"Active\",\n Leader = \"Leader\",\n}\n\nexport interface ValueTupleOfDeliveryTypeAndNullableTicketType {\n item1: DeliveryType;\n item2: TicketType | null;\n}\n\nexport interface IListingGroupItem {\n ltGrpId: string | null;\n isLtGrp: boolean;\n isFull: boolean;\n id: number;\n insertBy: string | null;\n rowVer: number;\n ltGrpParentId: number | null;\n ltGrpPrior: number | null;\n seating: Seating;\n delivType: DeliveryType;\n topPriTktType: TicketType | null;\n /** This the number of tickets that have not yet sold and is always less than TicketCount. */\n availQty: number;\n wastedQty: number | null;\n ticketCnt: number;\n ltGrpActive: boolean | null;\n unitCst: UiMoney | null;\n faceValue: UiMoney | null;\n currency: string;\n isDeleted: boolean;\n ltGrpUndercut: ListingGroupUndercutSetting | null;\n /** Marketplace listing broadcast status */\n brdcstStatus: ListingBroadcastStatus | null;\n}\n\nexport interface PosUiActionResultWithDataOfAutoCompListingsPreview extends PosUiActionResult {\n data: AutoCompListingsPreview | null;\n}\n\nexport interface AutoCompListingsPreview {\n zoneSectionAreaGroupLookup: ZoneSectionAreaGroupLookup;\n}\n\nexport interface ZoneSectionAreaGroupLookup {\n zoneSectionAreaRankOverrides: ZoneSectionAreaRankOverride[];\n groupIdToSectionIdMap: { [key: string]: ZoneSectionArea[]; };\n groupIdToMedianSeatScoreMap: { [key: string]: number; };\n sectionIdToGroupIdMap: { [key: string]: string; };\n zoneNameToRankMap: { [key: string]: { [key: string]: number; }; };\n customSectionGroups: string[];\n}\n\nexport interface ZoneSectionAreaRankOverride {\n zoneAreaName: string;\n rank: number;\n color: string;\n}\n\nexport interface ZoneSectionArea {\n sectId: number;\n rank: number;\n zoneAreaName: string;\n ticketClassId: number;\n ticketClassName: string;\n}\n\n/** Input settings for the auto comparison preview. */\nexport interface AutoCompSettingsPreviewInput {\n viagogoEventId: number;\n venueZoneConfigType: VenueZoneConfigType;\n combineCornersAndEnds: boolean;\n}\n\nexport interface PosUiActionResultWithDataOfAutoGroupListingsPreview extends PosUiActionResult {\n data: AutoGroupListingsPreview | null;\n}\n\nexport interface AutoGroupListingsPreview {\n listingGroups: { [key: string]: AutoGroupListingsPreviewListingUpdate[]; };\n}\n\nexport interface AutoGroupListingsPreviewListingUpdate {\n listingId: number;\n selectedSectionSettings: SelectedSectionSettings | null;\n onlyForSelectedSectionsEnabled: boolean | null;\n compListingMode: AutoPricingCompListingMode | null;\n compListingFloor: number | null;\n compListingCeiling: number | null;\n autoPricingEnabled: boolean | null;\n circuitBreakerMinCompListingCount: number | null;\n excludeFanInventory: boolean | null;\n area: RowArea;\n filteredAreas: RowArea[];\n}\n\nexport interface RowArea extends RowInfo {\n sectId: number;\n normOrd: number;\n area: ConfigArea;\n sectName: string;\n}\n\nexport interface ConfigArea {\n areaName: string;\n rank: number;\n}\n\nexport interface AutoGroupListingsPreviewInput {\n viagogoEventId: number;\n eventListingIds: number[];\n zoneSectionAreaGroupLookupJson: string;\n /** Determines how the offset ordinal for row comps */\n rowCompOffset: number;\n /** Determines how the RowArea names will be determined */\n rowGroupSetting: RowGroupSetting;\n venueZoneConfigType: VenueZoneConfigType;\n combineCornersAndEnds: boolean;\n rowCompOverrides: RowCompOverride[];\n useCustomRank: boolean;\n}\n\nexport interface PosUiActionResultWithDataOfIEnumerableOfMergeListingGroupInput extends PosUiActionResult {\n data: (MergeListingGroupInput | null)[] | null;\n}\n\nexport interface AddListingsToListingGroupInput {\n listingIds: number[];\n listingGroupId: string;\n}\n\nexport interface ListingGroupCompData {\n totalCompListingCount: number;\n compListings: CompListing[];\n}\n\nexport interface LoginContext {\n isSuccess: boolean;\n user: UserDetail | null;\n returnUrl: string | null;\n authorizationUrl: string | null;\n version: string | null;\n}\n\nexport interface UserDetail {\n userId: string;\n displayName: string;\n userName: string;\n localeLanguage: string;\n activeAccount: SellerAccount;\n features: Feature[];\n hasManyAccounts: boolean;\n impersonatorDisplayName: string | null;\n permissions: Permission[];\n}\n\nexport interface SellerAccount {\n id: string;\n accountName: string;\n impersonatedUserId: string | null;\n impersonatedUsername: string | null;\n currencyCode: string | null;\n sellerAccountSettings: SellerAccountSettings;\n marketplaceSettings: MarketplaceAccountSetting[];\n}\n\nexport interface SellerAccountSettings {\n defaultSplitType: number | null;\n ticketTypeRules: string | null;\n inHandDatePaddingInDays: number | null;\n defaultHideSeatNumbers: boolean | null;\n priceFloor: number | null;\n defaultMaxQuantityDisplay: number | null;\n saleListingPriceBoundary: number | null;\n inHandDaysBeforeEvent: number | null;\n}\n\nexport interface MarketplaceAccountSetting {\n isEnabled: boolean;\n mkp: Marketplace;\n markup: number | null;\n sellerFee: number | null;\n hasApiToken: boolean;\n hasApiRefreshToken: boolean;\n tokenExpired: boolean;\n seatSaverFee: number | null;\n isSyncHandledByProcessor: boolean;\n}\n\nexport enum Permission {\n Sales_ViewAll = \"Sales_ViewAll\",\n Sales_ViewRecent = \"Sales_ViewRecent\",\n Sales_ViewRecentFromExternalMarketplace = \"Sales_ViewRecentFromExternalMarketplace\",\n Sales_ConfirmReject = \"Sales_ConfirmReject\",\n Sales_Fulfill = \"Sales_Fulfill\",\n Sales_CreateForExternalMarketplaces = \"Sales_CreateForExternalMarketplaces\",\n Sales_ViewProceeds = \"Sales_ViewProceeds\",\n Sales_ViewRecentProceeds = \"Sales_ViewRecentProceeds\",\n Sales_ViewCostAndMargin = \"Sales_ViewCostAndMargin\",\n Sales_ViewPaymentState = \"Sales_ViewPaymentState\",\n Sales_ViewFulfillmentArtifacts = \"Sales_ViewFulfillmentArtifacts\",\n Sales_ManageHold = \"Sales_ManageHold\",\n Sales_AddTagType = \"Sales_AddTagType\",\n Sales_UpdateTags = \"Sales_UpdateTags\",\n Sales_ViewSalesOnIsPricerOf = \"Sales_ViewSalesOnIsPricerOf\",\n Sales_UpdateSalesInfo = \"Sales_UpdateSalesInfo\",\n Sales_UpdateSalesInfoOnIsPricerOf = \"Sales_UpdateSalesInfoOnIsPricerOf\",\n Sales_UpdateSalesInfoOnIsFulfillerOf = \"Sales_UpdateSalesInfoOnIsFulfillerOf\",\n Sales_FulfillOnIsFulfillerOf = \"Sales_FulfillOnIsFulfillerOf\",\n Sales_ViewSalesOnPurchasedBy = \"Sales_ViewSalesOnPurchasedBy\",\n Sales_UpdateSaleOnPurchasedBy = \"Sales_UpdateSaleOnPurchasedBy\",\n Sales_FulfillOnPurchasedBy = \"Sales_FulfillOnPurchasedBy\",\n Sales_FulfillOnPricerOf = \"Sales_FulfillOnPricerOf\",\n Sales_UpdateTagsOnPurchasedBy = \"Sales_UpdateTagsOnPurchasedBy\",\n Sales_UpdateTagsOnIsPricerOf = \"Sales_UpdateTagsOnIsPricerOf\",\n Sales_UpdateTagsOnIsFulfillerOf = \"Sales_UpdateTagsOnIsFulfillerOf\",\n Sales_ConfirmRejectOnIsPricerOf = \"Sales_ConfirmRejectOnIsPricerOf\",\n Sales_ConfirmRejectOnPurchasedBy = \"Sales_ConfirmRejectOnPurchasedBy\",\n Sales_ViewFulfillmentArtifactsOnPurchasedBy = \"Sales_ViewFulfillmentArtifactsOnPurchasedBy\",\n Sales_ViewFulfillmentArtifactsOnIsPricerOf = \"Sales_ViewFulfillmentArtifactsOnIsPricerOf\",\n Sales_ConfirmRejectOnIsFulfillerOf = \"Sales_ConfirmRejectOnIsFulfillerOf\",\n Sales_ViewSalesOnIsFulfillerOf = \"Sales_ViewSalesOnIsFulfillerOf\",\n Sales_ViewFulfillmentArtifactsOnIsFulfillerOf = \"Sales_ViewFulfillmentArtifactsOnIsFulfillerOf\",\n Sales_CreateOfflineSale = \"Sales_CreateOfflineSale\",\n Sales_ManageOfflineSale = \"Sales_ManageOfflineSale\",\n Sales_ManageOfflineSaleCreatedBy = \"Sales_ManageOfflineSaleCreatedBy\",\n Sales_ConfirmTransferWithoutProof = \"Sales_ConfirmTransferWithoutProof\",\n Sales_ResetFulfillment = \"Sales_ResetFulfillment\",\n Inventory_ViewAll = \"Inventory_ViewAll\",\n Inventory_ViewRecent = \"Inventory_ViewRecent\",\n Inventory_ViewRecentFromExternalMarketplace = \"Inventory_ViewRecentFromExternalMarketplace\",\n Inventory_ViewAllMarketplaceAttributes = \"Inventory_ViewAllMarketplaceAttributes\",\n Inventory_ViewExternalMarketplaceAttributes = \"Inventory_ViewExternalMarketplaceAttributes\",\n Inventory_ViewFulfillmentArtifacts = \"Inventory_ViewFulfillmentArtifacts\",\n Inventory_SetPrice = \"Inventory_SetPrice\",\n Inventory_SetPriceOnPurchasedBy = \"Inventory_SetPriceOnPurchasedBy\",\n Inventory_SetPriceOnIsPricerOf = \"Inventory_SetPriceOnIsPricerOf\",\n Inventory_Predelivery = \"Inventory_Predelivery\",\n Inventory_BroadcastUnbroadcast = \"Inventory_BroadcastUnbroadcast\",\n Inventory_BroadcastUnbroadcastOnPurchasedBy = \"Inventory_BroadcastUnbroadcastOnPurchasedBy\",\n Inventory_EditPricing = \"Inventory_EditPricing\",\n Inventory_UpdateListingInfo = \"Inventory_UpdateListingInfo\",\n Inventory_UpdateListingInfoOnPurchasedBy = \"Inventory_UpdateListingInfoOnPurchasedBy\",\n Inventory_AddTagType = \"Inventory_AddTagType\",\n Inventory_UpdateTags = \"Inventory_UpdateTags\",\n Inventory_UpdateTagsOnPurchasedBy = \"Inventory_UpdateTagsOnPurchasedBy\",\n Inventory_ViewListingOnIsPricerOf = \"Inventory_ViewListingOnIsPricerOf\",\n Inventory_UpdateListingInfoOnIsPricerOf = \"Inventory_UpdateListingInfoOnIsPricerOf\",\n Inventory_UpdateTagsOnIsPricerOf = \"Inventory_UpdateTagsOnIsPricerOf\",\n Inventory_PredeliveryOnPurchasedBy = \"Inventory_PredeliveryOnPurchasedBy\",\n Inventory_PredeliveryOnIsPricerOf = \"Inventory_PredeliveryOnIsPricerOf\",\n Inventory_ViewListingsOnPurchasedBy = \"Inventory_ViewListingsOnPurchasedBy\",\n Inventory_ViewFulfillmentArtifactsOnPurchasedBy = \"Inventory_ViewFulfillmentArtifactsOnPurchasedBy\",\n Inventory_ViewFulfillmentArtifactsOnIsPricerOf = \"Inventory_ViewFulfillmentArtifactsOnIsPricerOf\",\n Inventory_BroadcastUnbroadcastOnIsPricerOf = \"Inventory_BroadcastUnbroadcastOnIsPricerOf\",\n Inventory_AddSeatSaver = \"Inventory_AddSeatSaver\",\n Inventory_ManageSeatSaver = \"Inventory_ManageSeatSaver\",\n Inventory_ManageSeatSaverCreatedBy = \"Inventory_ManageSeatSaverCreatedBy\",\n Inventory_UpdateDeliveryStrategy = \"Inventory_UpdateDeliveryStrategy\",\n Inventory_UpdateDeliveryStrategyOnIsPricerOf = \"Inventory_UpdateDeliveryStrategyOnIsPricerOf\",\n Inventory_UpdateDeliveryStrategyOnPurchasedBy = \"Inventory_UpdateDeliveryStrategyOnPurchasedBy\",\n SellerAccount_Admin = \"SellerAccount_Admin\",\n SellerSupportCase_Create = \"SellerSupportCase_Create\",\n SellerSupportCase_View = \"SellerSupportCase_View\",\n Purchases_ViewAll = \"Purchases_ViewAll\",\n Purchases_ViewRecent = \"Purchases_ViewRecent\",\n Purchases_Edit = \"Purchases_Edit\",\n Purchases_EditOwned = \"Purchases_EditOwned\",\n Purchases_Create = \"Purchases_Create\",\n Purchases_AddTagType = \"Purchases_AddTagType\",\n Purchases_UpdateTags = \"Purchases_UpdateTags\",\n Purchases_UpdateTagsOwned = \"Purchases_UpdateTagsOwned\",\n Purchases_ViewOwned = \"Purchases_ViewOwned\",\n Purchases_UpdateBuyerCommission = \"Purchases_UpdateBuyerCommission\",\n Purchases_UpdateBuyerCommissionOwned = \"Purchases_UpdateBuyerCommissionOwned\",\n Purchases_UpdateDeliveryType = \"Purchases_UpdateDeliveryType\",\n Purchases_UpdateDeliveryTypeOwned = \"Purchases_UpdateDeliveryTypeOwned\",\n Purchases_UpdateCustomDeliveryType = \"Purchases_UpdateCustomDeliveryType\",\n Purchases_UpdateCustomDeliveryTypeOwned = \"Purchases_UpdateCustomDeliveryTypeOwned\",\n Purchases_UpdateSeatTraits = \"Purchases_UpdateSeatTraits\",\n Purchases_UpdateSeatTraitsOwned = \"Purchases_UpdateSeatTraitsOwned\",\n Purchases_LockUnlockCommission = \"Purchases_LockUnlockCommission\",\n Purchases_LockUnlockCommissionOwned = \"Purchases_LockUnlockCommissionOwned\",\n Purchases_EditVendor = \"Purchases_EditVendor\",\n Events_ViewAll = \"Events_ViewAll\",\n Events_AddTagType = \"Events_AddTagType\",\n Events_UpdateTags = \"Events_UpdateTags\",\n Events_SetPrice = \"Events_SetPrice\",\n Events_Edit = \"Events_Edit\",\n Accounts_ViewAll = \"Accounts_ViewAll\",\n Account_SetPrice = \"Account_SetPrice\",\n TicketGroups_ViewAll = \"TicketGroups_ViewAll\",\n Webhook_View = \"Webhook_View\",\n Webhook_Create = \"Webhook_Create\",\n Webhook_Edit = \"Webhook_Edit\",\n EventConfig_Edit = \"EventConfig_Edit\",\n EventConfig_Create = \"EventConfig_Create\",\n EventConfig_View = \"EventConfig_View\",\n Reports_CreateReports = \"Reports_CreateReports\",\n Reports_UpdateReports = \"Reports_UpdateReports\",\n Reports_UpdateReportsOwned = \"Reports_UpdateReportsOwned\",\n Reports_ViewInventoryReports = \"Reports_ViewInventoryReports\",\n Reports_ViewSalesReports = \"Reports_ViewSalesReports\",\n Reports_ViewAll = \"Reports_ViewAll\",\n Reports_ViewGlobalReports = \"Reports_ViewGlobalReports\",\n Accounting_ViewAll = \"Accounting_ViewAll\",\n Accounting_ViewPaymentsOnSale = \"Accounting_ViewPaymentsOnSale\",\n Accounting_ViewStubhubPayments = \"Accounting_ViewStubhubPayments\",\n AdPlatform_Edit = \"AdPlatform_Edit\",\n General_ViewReleaseNotes = \"General_ViewReleaseNotes\",\n General_ViewNotifications = \"General_ViewNotifications\",\n}\n\nexport interface LoginRequest {\n code: string | null;\n state: string | null;\n}\n\nexport interface MarketplaceSalePayment {\n /** MarketplacePaymentLineId */\n id: number;\n /** Marketplace */\n mkp: Marketplace | null;\n /** ExternalPaymentId */\n extPmtId: string;\n /** PaymentReferenceId */\n pmtRefId: string | null;\n pmtDate: string | null;\n recvDate: string | null;\n state: MarketplacePaymentState;\n /** PaymentAmount */\n pmtAmt: UiMoney;\n /** ProceedsAmount */\n proceedsAmt: UiMoney | null;\n credit: UiMoney | null;\n charge: UiMoney | null;\n convertedPmtAmt: UiMoney | null;\n mkpPmtTerm: MarketplacePaymentTerm | null;\n}\n\nexport enum MarketplacePaymentTerm {\n PaymentUponSaleConfirmation = \"PaymentUponSaleConfirmation\",\n PaymentUponDelivery = \"PaymentUponDelivery\",\n PaymentPostEvent = \"PaymentPostEvent\",\n}\n\nexport interface MarketplacePaymentQuery {\n marketplace: Marketplace | null;\n marketplacePaymentState: MarketplacePaymentState | null;\n paymentDates: DateTimeRangeWithRelative | null;\n sortBy: EventSort | null;\n isSortDescending: boolean | null;\n hasPaymentLineUnmappedToSale: boolean | null;\n hasPaymentLineUnmappedToSaleLineItem: boolean | null;\n currencyCodes: string[] | null;\n /** Dummy property for the UI to match the interface */\n viewMode: string | null;\n /** Output from the frontend application: `new Date().getTimezoneOffset()`\nE.g. UTC-8 => 480\nUsed for RelativeTimeRange typed properties\nCurrently only used for reporting */\n timezoneOffsetMins: number | null;\n}\n\nexport interface MonthContainingMarketplacePaymentsResult {\n firstOfMonth: string;\n totalPaymentAmount: UiMoney | null;\n}\n\nexport interface MarketplacePaymentLineWithSaleInfo {\n /** MarketplacePaymentLineId */\n id: number;\n /** Marketplace */\n marketplace: Marketplace | null;\n /** MarketplacePaymentId */\n posPmtId: number;\n /** ExternalPaymentId */\n extPmtId: string;\n /** ExternalPaymentLineId */\n extLineId: string;\n state: MarketplacePaymentState;\n date: string | null;\n recvDate: string | null;\n /** IsCredit */\n isCred: boolean;\n /** Amount */\n amt: UiMoney;\n type: MarketplacePaymentLineType;\n isAddedToSale: boolean | null;\n saleId: number | null;\n extSaleId: string;\n saleStatus: PointOfSaleSaleStatus | null;\n /** The event of which this entity is for. */\n posEvId: string | null;\n viagEvId: number | null;\n viagEvMapId: string | null;\n viagVirtualId: string | null;\n seating: Seating | null;\n convertedPmtAmt: UiMoney | null;\n}\n\nexport interface UiCurrency {\n code: string;\n dec: number;\n sym: string;\n}\n\nexport interface Notification {\n notificationId: number;\n notificationType: NotificationType;\n entityType: ActionOutboxEntityType;\n entityId: number;\n notificationState: NotificationState;\n createDateTime: string;\n expirationDateTime: string;\n posEventId: string | null;\n section: string | null;\n row: string | null;\n piggybackRow: string | null;\n seatFrom: string | null;\n seatTo: string | null;\n marketplace: Marketplace | null;\n marketplaceEntityId: string | null;\n event: Event | null;\n performer: Performer | null;\n venue: Venue | null;\n}\n\nexport enum NotificationType {\n SaleNew = \"SaleNew\",\n SaleFulfilmentFailed = \"SaleFulfilmentFailed\",\n SaleMarketplaceCancelled = \"SaleMarketplaceCancelled\",\n ListingHideSeatsFailed = \"ListingHideSeatsFailed\",\n ListingUpdateAllInPriceFailed = \"ListingUpdateAllInPriceFailed\",\n ListingUpdateInHandDateFailed = \"ListingUpdateInHandDateFailed\",\n ListingUpdateSplitTypeFailed = \"ListingUpdateSplitTypeFailed\",\n ListingUpdateDeliveryTypeFailed = \"ListingUpdateDeliveryTypeFailed\",\n ListingUpdateUnitNetProceedsFailed = \"ListingUpdateUnitNetProceedsFailed\",\n ListingBroadcastFailed = \"ListingBroadcastFailed\",\n ListingUnbroadcastFailed = \"ListingUnbroadcastFailed\",\n ListingMergeFailed = \"ListingMergeFailed\",\n ListingSplitFailed = \"ListingSplitFailed\",\n ListingPriceUpdate = \"ListingPriceUpdate\",\n AutopriceBelowFloor = \"AutopriceBelowFloor\",\n AutopriceInsufficientCompListings = \"AutopriceInsufficientCompListings\",\n AutopriceFirebrake = \"AutopriceFirebrake\",\n SellerSupportCaseNewReply = \"SellerSupportCaseNewReply\",\n}\n\nexport enum NotificationState {\n Active = \"Active\",\n Inactive = \"Inactive\",\n}\n\nexport interface ListingGroupAutoPriceSettings extends AutoPricingInputs {\n desiredActiveListings: number | null;\n deprioritizedQuantities: string[] | null;\n /** UndercutAbsoluteAmount */\n undAbsAmt: number | null;\n /** UndercutRelativeAmount */\n undRelAmt: number | null;\n}\n\nexport interface EventConfigScoreOverride {\n id: number;\n name: string;\n eventIds: number[] | null;\n cfgId: number;\n cfgPayload: string | null;\n scoreOverrides: SectionScoreOverride[];\n isActive: boolean | null;\n isTemplate: boolean | null;\n viagogoEventId: number | null;\n venueId: number | null;\n categoryId: number | null;\n}\n\nexport interface SellerAccountEventConfigScoreOverrides {\n eventConfigScoreOverrideId: number;\n configPayload: string;\n name: string;\n eventId: number | null;\n createDate: string;\n updateDate: string;\n}\n\nexport interface SellThroughRateHistory {\n sellThroughRatePercentage: number;\n timelineDate: string;\n}\n\nexport interface AutoPricingSettingsCollection extends AutoPricingInputs {\n autoPricingSettingsCollectionId: number | null;\n strategyName: string;\n}\n\nexport interface UpsertAutoCompSettingsInput {\n viagogoEventId: number;\n venueZoneConfigType: string;\n rowCompOffset: number;\n rowGroupSetting: string;\n sectionGroupCustomRankEnabled: boolean;\n rowCompOverrides: RowCompOverrideInput[];\n zoneSectionAreaGroupLookupJson: string;\n}\n\nexport interface RowCompOverrideInput {\n rowOrdinalFrom: number;\n rowOrdinalTo: number;\n offsetOverride: number;\n}\n\nexport interface AutoCompSettingsResult {\n venueZoneConfigType: VenueZoneConfigType | null;\n rowCompOffset: number;\n rowGroupSetting: RowGroupSetting | null;\n sectionGroupCustomRankEnabled: boolean;\n rowCompOverrides: RowCompOverride[] | null;\n}\n\nexport interface VenueMapZoneConfigInfo {\n defaultVenueZoneConfigType: VenueZoneConfigType;\n venueMapZoneConfigs: { [key in keyof typeof VenueZoneConfigType]?: { [key: string]: SectionSectionGroup; }; };\n}\n\nexport interface SectionSectionGroup {\n sectId: number;\n areaRank: number;\n sectionGroupRank: number;\n sectionGroupAreaType: SectionGroupAreaType | null;\n sectionGroupAreaName: string | null;\n ticketClassId: number | null;\n ticketClassName: string | null;\n sectionGroupColor: string;\n}\n\nexport enum SectionGroupAreaType {\n Unknown = \"Unknown\",\n Center = \"Center\",\n LeftRight = \"LeftRight\",\n FarLeftFarRight = \"FarLeftFarRight\",\n Front = \"Front\",\n Sides = \"Sides\",\n SideT1 = \"SideT1\",\n SideT2 = \"SideT2\",\n Ends = \"Ends\",\n Rear = \"Rear\",\n Corners = \"Corners\",\n}\n\nexport interface EventsPricingConfig {\n sharedConfigId: number | null;\n canUseZoneMap: boolean;\n}\n\nexport interface VenueZoneConfigOverride {\n name: string;\n sectionSectionGroupLookup: { [key: string]: SectionSectionGroup; };\n}\n\nexport interface UpsertVenueZoneSectionGroupOverridesInput {\n viagogoEventId: number;\n venueZoneOverrideId: number | null;\n name: string;\n sectionSectionGroupsJson: string;\n saveAsNewMap: boolean;\n}\n\nexport interface EventMapConfigMetadata {\n /** The selected or default VenueZoneConfigType */\n defaultVenueZoneConfigType: VenueZoneConfigType;\n /** The selected or default VenueZoneConfigType */\n selectedVenueMapConfigType: VenueZoneConfigType | null;\n /** The selected custom VenueZone override id. If this value is null then we will always use the DefaultVenueZoneConfigType\nas a fallback, but the override will always take precedence */\n selectedOverrideId: number | null;\n /** The selected custom VenueZone override name */\n selectedOverrideName: string | null;\n /** Data needed to render the preview of the selected config when hovering over the \"View Event Map\" button */\n selectedVenueMapConfig: { [key: string]: SectionSectionGroup; };\n}\n\nexport interface PurchaseOrderDetails extends PurchaseOrder {\n additionalCosts: CostDetail[] | null;\n ticketGroups: TicketGroup[];\n miniCatalog: CatalogResults | null;\n payments: PurchasePayment[] | null;\n transferId: string | null;\n hasMergedListings: boolean | null;\n hasSplitListings: boolean | null;\n deal: PurchaseOrderDeal | null;\n}\n\nexport interface CostDetail {\n id: number;\n cost: UiMoney | null;\n costType: PurchaseOrderCostType;\n date: string;\n description: string | null;\n}\n\nexport enum PurchaseOrderCostType {\n Tax = \"Tax\",\n Shipping = \"Shipping\",\n CreditCardFee = \"Credit Card Fee\",\n BulkDiscount = \"Bulk Discount\",\n}\n\nexport interface TicketGroup extends EntityWithTickets {\n entityType: ActionOutboxEntityType;\n tickets: Ticket[];\n unitCst: UiMoney;\n totalCst: UiMoney | null;\n expectedVal: UiMoney | null;\n webPrice: UiMoney | null;\n taxPaid: UiMoney | null;\n isFaceVal: boolean;\n faceVal: UiMoney | null;\n delivType: DeliveryType;\n delivCst: UiMoney | null;\n poId: number | null;\n vendOrdId: string | null;\n /** Available Artifact Types */\n availArtTypes: ArtifactType[];\n /** Has user document artifacts to download */\n canGetDocArts: boolean | null;\n venId: number | null;\n perfId: number | null;\n}\n\nexport interface PurchasePayment {\n paymentId: number;\n paymentStatus: PurchasePaymentStatus;\n paymentDueDate: string;\n paymentDate: string | null;\n paymentAmount: UiMoney;\n currencyCode: string;\n convertedPaymentAmount: UiMoney | null;\n convertedCurrencyCode: string | null;\n conversionRate: number | null;\n conversionDate: string | null;\n conversionUserId: string | null;\n paymentMethod: PurchasePaymentMethod;\n}\n\nexport interface PurchasePaymentMethod {\n id: number;\n display: string;\n name: string;\n type: PurchasePaymentMethodType;\n}\n\nexport interface PurchaseOrderDeal {\n dealId: string | null;\n dealType: DealType;\n dealDetails: PurchaseOrderDealDetails;\n}\n\nexport enum DealType {\n Sor = \"Sor\",\n Guaranteed = \"Guaranteed\",\n}\n\nexport interface PurchaseOrderDealDetails {\n guaranteedAmountPaid: number | null;\n dealStartDate: string | null;\n dealEndDate: string | null;\n configSplitType: DealSplitType;\n dealConfigId: string | null;\n dealFallbackConfig: PurchaseOrderDealConfig | null;\n dealConfigs: PurchaseOrderDealConfig[] | null;\n}\n\nexport enum DealSplitType {\n Quantity = \"Quantity\",\n Sales = \"Sales\",\n None = \"None\",\n}\n\nexport interface PurchaseOrderDealConfig {\n dealConfigHurdleId: string | null;\n thresholdSplitDirection: DealThresholdSplitDirection | null;\n thresholdValue: number | null;\n vendorCommission: PurchaseOrderDealCommission;\n purchaserCommissions: PurchaseOrderDealCommission[];\n priority: number | null;\n}\n\nexport enum DealThresholdSplitDirection {\n Above = \"Above\",\n Below = \"Below\",\n}\n\nexport interface PurchaseOrderDealCommission {\n userId: string;\n splitValue: number;\n}\n\nexport interface AccessControlProvider {\n id: number;\n name: string;\n}\n\nexport interface ValueTupleOfISetOfIntegerAndISetOfGuid {\n item1: number[];\n item2: string[];\n}\n\nexport interface PurchaseVendorAccountDetails extends PurchaseVendorAccount {\n delivType: DeliveryType | null;\n isNoFulfill: boolean | null;\n tktTypeRules: TicketTypeOverride | null;\n}\n\nexport enum PurchasingIdInUseResultType {\n NoneMatching = \"NoneMatching\",\n SameOrderId = \"SameOrderId\",\n SameOrderIdAndVendorId = \"SameOrderIdAndVendorId\",\n}\n\nexport interface MonthContainingPurchaseOrdersResult {\n firstOfMonth: string;\n purchaseCount: number;\n numOfTickets: number;\n totalCost: UiMoney | null;\n}\n\nexport interface TimePeriodContainingPurchaseOrderResult {\n firstOfTimePeriod: string;\n purchaseCount: number;\n numOfTickets: number;\n totalCost: UiMoney | null;\n}\n\nexport enum TimePeriodType {\n Daily = \"Daily\",\n Weekly = \"Weekly\",\n Monthly = \"Monthly\",\n}\n\nexport interface PurchaseOrderDetailsInput {\n id: number;\n vendorOrderId: PosFieldOfString | null;\n purchaseDate: PosFieldOfNullableDateTime | null;\n buyerUserId: PosFieldOfNullableGuid | null;\n currencyCode: PosFieldOfString | null;\n commissions: PosFieldArrayOfCommission | null;\n vendor: PosFieldOfPurchaseVendor | null;\n vendorAccount: PosFieldOfPurchaseVendorAccount | null;\n secondaryVendorAccount: PosFieldOfPurchaseVendorAccount | null;\n secondaryVendor: PosFieldOfPurchaseVendor | null;\n additionalCosts: PosFieldArrayOfCostDetail | null;\n payments: PosFieldArrayOfPurchasePayment | null;\n transferId: PosFieldOfString | null;\n tags: PosFieldArrayOfTag | null;\n privateNotes: PosFieldOfString | null;\n qcState: PosFieldOfNullableQualityControlState | null;\n isAutoPo: boolean;\n ticketGroups: TicketGroupInput[];\n deal: PosFieldOfPurchaseOrderDealInput | null;\n isCommissionsLocked: PosFieldOfNullableBoolean | null;\n}\n\nexport interface PosFieldOfPurchaseVendor {\n value: PurchaseVendor | null;\n hasChanged: boolean;\n}\n\nexport interface PosFieldOfPurchaseVendorAccount {\n value: PurchaseVendorAccount | null;\n hasChanged: boolean;\n}\n\n/** Note - doing PosFieldArray so it can be property generated to React TypeScript */\nexport interface PosFieldArrayOfCostDetail {\n value: CostDetail[] | null;\n hasChanged: boolean;\n}\n\n/** Note - doing PosFieldArray so it can be property generated to React TypeScript */\nexport interface PosFieldArrayOfPurchasePayment {\n value: PurchasePayment[] | null;\n hasChanged: boolean;\n}\n\nexport interface PosFieldOfNullableQualityControlState {\n value: QualityControlState | null;\n hasChanged: boolean;\n}\n\nexport interface TicketGroupInput {\n ticketGroupId: number;\n purchaseOrderId: number | null;\n /** Because the TicketGroup is used for input, this property will be used to pass back\nwhen selecting an Event and related info to create the TicketGroup for a PurchaseOrder */\n event: Event | null;\n performer: Performer | null;\n venue: Venue | null;\n /** Has user document artifacts to download */\n canGetDocArts: boolean | null;\n viagogoEventId: number | null;\n eventMappingId: string | null;\n viagogoVirtualId: string;\n posEventId: string | null;\n unitCost: PosFieldOfNullableDecimal | null;\n inHandDate: PosFieldOfNullableDateTime | null;\n expectedValue: PosFieldOfNullableDecimal | null;\n isFaceValueCost: PosFieldOfNullableBoolean | null;\n faceValueCost: PosFieldOfNullableDecimal | null;\n deliveryType: PosFieldOfNullableDeliveryType | null;\n totalCost: PosFieldOfNullableDecimal | null;\n taxPaid: PosFieldOfNullableDecimal | null;\n deliveryCost: PosFieldOfNullableDecimal | null;\n currencyCode: PosFieldOfString | null;\n section: PosFieldOfString | null;\n sectionId: PosFieldOfNullableInteger | null;\n rowId: PosFieldOfNullableInteger | null;\n row: PosFieldOfString | null;\n tickets: PosFieldArrayOfTicket | null;\n numberOfTickets: PosFieldOfNullableInteger | null;\n ticketTypeRules: TicketTypeOverride | null;\n /** Note - TicketGroup doesn't have InternalNotes as a field, but they are passed in from API to be set onto Listing */\n internalNotes: PosFieldOfString | null;\n listingNotes: PosFieldArrayOfListingNote | null;\n seatIncementType: number | null;\n allocateSeats: boolean | null;\n webPrice: number | null;\n autoBroadcastCreatedListing: boolean | null;\n}\n\nexport interface PosFieldOfNullableDeliveryType {\n value: DeliveryType | null;\n hasChanged: boolean;\n}\n\n/** Note - doing PosFieldArray so it can be property generated to React TypeScript */\nexport interface PosFieldArrayOfTicket {\n value: Ticket[] | null;\n hasChanged: boolean;\n}\n\n/** Note - doing PosFieldArray so it can be property generated to React TypeScript */\nexport interface PosFieldArrayOfListingNote {\n value: ListingNote[] | null;\n hasChanged: boolean;\n}\n\nexport interface PosFieldOfPurchaseOrderDealInput {\n value: PurchaseOrderDealInput | null;\n hasChanged: boolean;\n}\n\nexport interface PurchaseOrderDealInput {\n dealId: string | null;\n dealType: DealType;\n dealDetails: PurchaseOrderDealDetailsInput;\n}\n\nexport interface PurchaseOrderDealDetailsInput {\n guaranteedAmountPaid: number | null;\n dealStartDate: string | null;\n dealEndDate: string | null;\n configSplitType: PosFieldOfNullableDealSplitType;\n dealConfigId: string | null;\n dealFallbackConfig: PurchaseOrderDealConfig | null;\n dealConfigs: PosFieldArrayOfPurchaseOrderDealConfig | null;\n}\n\nexport interface PosFieldOfNullableDealSplitType {\n value: DealSplitType | null;\n hasChanged: boolean;\n}\n\n/** Note - doing PosFieldArray so it can be property generated to React TypeScript */\nexport interface PosFieldArrayOfPurchaseOrderDealConfig {\n value: PurchaseOrderDealConfig[] | null;\n hasChanged: boolean;\n}\n\nexport interface ValueTupleOfISetOfLongAndPosFieldOfNullableQualityControlState {\n item1: number[];\n item2: PosFieldOfNullableQualityControlState;\n}\n\nexport interface CurrencyConversionOverride {\n currencyConversionOverrideId: number;\n fromCurrencyCode: string;\n toCurrencyCode: string;\n purchasePaymentMethodId: number | null;\n /** Ignored if `PaymentMethodNameKnownRegexId` is not null. */\n purchasePaymentMethodName: string | null;\n paymentMethodNameKnownRegexId: PaymentMethodNameKnownRegex | null;\n conversionRate: number;\n conversionRateDate: string;\n}\n\nexport enum PaymentMethodNameKnownRegex {\n All = \"All\",\n AllAmex = \"AllAmex\",\n AllVisa = \"AllVisa\",\n AllMastercard = \"AllMastercard\",\n}\n\nexport interface CurrencyConversionOverrideRequest {\n currencyConversionOverrideId: number | null;\n conversionRateDate: string;\n fromCurrencyCode: string;\n toCurrencyCode: string;\n purchasePaymentMethodId: number | null;\n paymentMethodNameKnownRegexId: PaymentMethodNameKnownRegex | null;\n conversionRate: number;\n}\n\nexport interface DeliveryOverride {\n delivType: DeliveryType | null;\n tktTypeRules: TicketTypeOverride | null;\n inHandAt: string | null;\n}\n\nexport interface ValueTupleOfNullableIntegerAndNullableIntegerAndNullableGuidAndBoolean {\n item1: number | null;\n item2: number | null;\n item3: string | null;\n item4: boolean;\n}\n\nexport interface PurchaseEventOverride {\n delivType: DeliveryType;\n vendorId: number | null;\n}\n\nexport interface ReportConfigOfListingQueryAndReportWidgetTypesInventory {\n /** Used for disambugating serialized versions of this class. */\n schemaVersion: string;\n reportName: string;\n groupBy: ReportGroupBy;\n widgets: ReportWidgetTypesInventory[] | null;\n metrics: string[];\n filter: ListingQuery | null;\n /** Controls whether consumer of the report can edit the filters when viewing the report. */\n hiddenFilterItemIds: string[] | null;\n viewableFilterItemIds: string[] | null;\n editableFilterItemIds: string[] | null;\n numberOfItemsPerPage: number | null;\n sortBy: string | null;\n isSortDescending: boolean | null;\n arAgingTimeBuckets: DateTimeRangeWithRelative[] | null;\n reportId: number | null;\n /** If specified, open this report instead when the user clicks on a report link. */\n reportIdRedirect: number | null;\n ownerDisplayName: string | null;\n isOwner: boolean;\n globalReportTypeId: number | null;\n allowReaderEditMetrics: boolean;\n roleIdsToShare: number[];\n sellerUserIdsToShare: string[];\n hasMetricsOverride: boolean | null;\n hasFilterOverride: boolean | null;\n}\n\nexport enum ReportGroupBy {\n Performer = \"Performer\",\n Event = \"Event\",\n Venue = \"Venue\",\n EventGenre = \"EventGenre\",\n EventCountry = \"EventCountry\",\n EventCity = \"EventCity\",\n SeatingSection = \"SeatingSection\",\n SeatingRow = \"SeatingRow\",\n SaleMarketplace = \"SaleMarketplace\",\n SaleMonth = \"SaleMonth\",\n SaleWeek = \"SaleWeek\",\n SaleDay = \"SaleDay\",\n SaleId = \"SaleId\",\n ListingId = \"ListingId\",\n PurchaseId = \"PurchaseId\",\n PurchasedBy = \"PurchasedBy\",\n PricedBy = \"PricedBy\",\n FulfilledBy = \"FulfilledBy\",\n Vendor = \"Vendor\",\n SaleIdTicketIdCommissionUser = \"SaleIdTicketIdCommissionUser\",\n ArAgingMarketplace = \"ArAgingMarketplace\",\n}\n\n/** Available widgets to show in inventory reports */\nexport enum ReportWidgetTypesInventory {\n TicketsListedAndSold = \"TicketsListedAndSold\",\n SalesAndMargin = \"SalesAndMargin\",\n AverageTicketPrice = \"AverageTicketPrice\",\n}\n\nexport interface ReportConfigOverrideOfListingQuery {\n /** Used for disambugating serialized versions of this class. */\n schemaVersion: string;\n metrics: string[] | null;\n filter: ListingQuery | null;\n}\n\nexport interface ReportConfigOfSaleQueryAndReportWidgetTypesSale {\n /** Used for disambugating serialized versions of this class. */\n schemaVersion: string;\n reportName: string;\n groupBy: ReportGroupBy;\n widgets: ReportWidgetTypesSale[] | null;\n metrics: string[];\n filter: SaleQuery | null;\n /** Controls whether consumer of the report can edit the filters when viewing the report. */\n hiddenFilterItemIds: string[] | null;\n viewableFilterItemIds: string[] | null;\n editableFilterItemIds: string[] | null;\n numberOfItemsPerPage: number | null;\n sortBy: string | null;\n isSortDescending: boolean | null;\n arAgingTimeBuckets: DateTimeRangeWithRelative[] | null;\n reportId: number | null;\n /** If specified, open this report instead when the user clicks on a report link. */\n reportIdRedirect: number | null;\n ownerDisplayName: string | null;\n isOwner: boolean;\n globalReportTypeId: number | null;\n allowReaderEditMetrics: boolean;\n roleIdsToShare: number[];\n sellerUserIdsToShare: string[];\n hasMetricsOverride: boolean | null;\n hasFilterOverride: boolean | null;\n}\n\n/** Widgets to show in sale reports. There are currently no available widgets, so this `None` serves as a placeholder and new widgets can be added in the future */\nexport enum ReportWidgetTypesSale {\n None = \"None\",\n}\n\nexport interface ReportConfigOverrideOfSaleQuery {\n /** Used for disambugating serialized versions of this class. */\n schemaVersion: string;\n metrics: string[] | null;\n filter: SaleQuery | null;\n}\n\nexport interface ListingReportMetricsResponse {\n metrics: ListingReportMetrics[];\n summary: ListingReportMetrics;\n totalCount: number;\n hasTimeout: boolean;\n hasUnknownError: boolean;\n}\n\nexport interface ReportMetricsBase {\n /** Peformer id */\n perfId: number | null;\n venueId: number | null;\n /** This is viagogoEventId.toString() ?? viagogoEventMappingId.toString() */\n eventId: string | null;\n genre: TopLevelCategory | null;\n country: Country | null;\n city: string | null;\n section: string | null;\n row: string | null;\n /** Seating seat from */\n seatFr: string | null;\n /** Seating seat to */\n seatTo: string | null;\n /** Aggregated value of tags\nCurrently only support numerical value types (TagsValueType.Int, TagsValueType.Decimal) */\n tags: ReportTag[];\n /** Value of event tags\nCurrently only support numerical value types (TagsValueType.Int, TagsValueType.Decimal) */\n eventTags: ReportTag[];\n posEventIds: string[];\n}\n\nexport interface ListingReportMetrics extends ReportMetricsBase {\n listId: number | null;\n tktQty: number;\n availQty: number;\n soldQty: number;\n currency: string;\n /** Total cost of all tickets */\n ttlCst: UiMoney;\n /** Total list price of all tickets */\n ttlListPrc: UiMoney;\n /** Total all-in price of all tickets */\n ttlWebPrc: UiMoney;\n soldCst: UiMoney;\n soldProcs: UiMoney;\n unsoldCst: UiMoney;\n pandL: UiMoney;\n /** Margin (SoldProceeds - SoldCost) / SoldProceeds */\n marg: number | null;\n delivType: DeliveryType | null;\n inHandDate: string | null;\n poInfos: PurchaseInfosReport;\n zone: string | null;\n pricerId: string | null;\n sales: SaleInfoReport[];\n holds: SaleInfoReport[];\n privNotes: string | null;\n}\n\nexport interface PurchaseInfosReportBase {\n createdBys: string[];\n /** Purchase order ids */\n poIds: number[];\n /** Ticket group ids */\n tktGrIds: number[];\n buyers: PurchaseBuyerInfo[];\n vendors: PurchaseVendorInfo[];\n vendorAccs: PurchaseVendorAccountInfo[];\n}\n\nexport interface PurchaseInfosReport extends PurchaseInfosReportBase {\n poDates: string[];\n pmtStatuses: PurchasePaymentStatus[];\n pmtMethods: PurchasePaymentMethodType[];\n privNotes: string[];\n vendOrdIds: string[];\n cancDates: string[];\n}\n\nexport interface PurchaseBuyerInfo {\n buyerUserId: string;\n averageBuyerCommissionPercent: number | null;\n}\n\nexport interface PurchaseVendorInfo {\n vendorId: number;\n vendorName: string;\n}\n\nexport interface PurchaseVendorAccountInfo {\n vendorAccountId: string;\n vendorId: number;\n vendorAccountName: string;\n encryptedEmailAddress: string;\n}\n\nexport interface SaleInfoReport {\n saleId: number;\n pmtState: PointOfSalePaymentState | null;\n mkpPmtState: MarketplacePaymentState | null;\n chargs: UiMoney | null;\n creds: UiMoney | null;\n fulfillerId: string | null;\n ttlNetProcs: UiMoney;\n qtySold: number;\n soldCst: UiMoney | null;\n status: PointOfSaleSaleStatus;\n}\n\nexport interface ReportTag {\n key: string;\n value: string;\n valueType: TagsValueType | null;\n}\n\nexport interface ListingReportMetricsRequest {\n query: ListingQuery;\n groupBy: ReportGroupBy;\n globalReportTypeId: number | null;\n isUsingFilterOverride: boolean | null;\n listingReportMetricsRequested: ListingReportMetricColumn[];\n}\n\n/** Enum to determine the metric to calculate/get report for */\nexport enum ListingReportMetricColumn {\n Zone = \"Zone\",\n}\n\nexport interface SaleReportMetricsResponse {\n metrics: SaleReportMetrics[];\n summary: SaleReportMetrics;\n totalCount: number;\n hasTimeout: boolean;\n hasUnknownError: boolean;\n}\n\nexport interface SaleReportMetrics extends ReportMetricsBase {\n saleDate: string | null;\n mkp: Marketplace | null;\n saleId: number | null;\n ticketId: number | null;\n tktGrId: number | null;\n mkpSaleId: string | null;\n /** Ar Aging Time Bucket\n \nIf group by is set to ArAging*, then this will be set\nOnly TtlOutsBal (TotalOutstandingBalance) among the metrics will be set */\n timeBkt: DateTimeRangeWithRelative | null;\n mkpPmtTerm: MarketplacePaymentTerm | null;\n qtySold: number;\n currency: string;\n netProcs: UiMoney;\n /** Total outstanding balance */\n ttlOutsBal: UiMoney;\n soldCst: UiMoney;\n /** Commision share */\n commssionShr: UiMoney | null;\n commission: BuyerCommission | null;\n pandL: UiMoney;\n /** Margin (TotalNetProceeds - SoldCost) / TotalNetProceeds */\n marg: number | null;\n chargs: UiMoney;\n creds: UiMoney;\n saleStatus: PointOfSaleSaleStatus | null;\n ticketType: TicketType | null;\n inHandDate: string | null;\n pmtState: PointOfSalePaymentState | null;\n mkpPmtState: MarketplacePaymentState | null;\n /** Payment received */\n pmtRcv: boolean | null;\n pmtRefId: string | null;\n lastPmtOn: string | null;\n cancelDate: string | null;\n allocState: PointOfSaleAllocationState | null;\n fulfillerId: string | null;\n fulfillDate: string | null;\n pricerId: string | null;\n poInfos: PurchaseInfosReport;\n privNotes: string | null;\n}\n\nexport interface BuyerCommission {\n buyerUserId: string;\n commissionPercentage: number | null;\n}\n\nexport enum PointOfSaleAllocationState {\n Pending = \"Pending\",\n Allocated = \"Allocated\",\n TicketsUnavailable = \"TicketsUnavailable\",\n AlternativeTicketsOffered = \"AlternativeTicketsOffered\",\n BlockingAllocation = \"BlockingAllocation\",\n AutoSourced = \"AutoSourced\",\n}\n\nexport interface SaleReportMetricsRequest {\n query: SaleQuery;\n groupBy: ReportGroupBy;\n globalReportTypeId: number | null;\n isUsingFilterOverride: boolean | null;\n arAgingTimeBuckets: DateTimeRangeWithRelative[] | null;\n}\n\nexport interface ReportSnapshotInfo {\n name: string;\n createdDate: string;\n documentId: string;\n downloadUri: string;\n}\n\nexport interface SaleReportMetricsDownloadRequest extends SaleReportMetricsRequest {\n metrics: string[] | null;\n fileType: ReportFileType;\n}\n\nexport enum ReportFileType {\n CSV = \"CSV\",\n XLSX = \"XLSX\",\n PDF = \"PDF\",\n}\n\nexport interface ListingReportMetricsDownloadRequest extends ListingReportMetricsRequest {\n metrics: string[] | null;\n fileType: ReportFileType;\n}\n\nexport interface ReportV2ConfigOfInventoryReportV2RequestAndReportWidgetTypesInventory {\n /** Used for disambugating serialized versions of this class. */\n schemaVersion: string;\n reportName: string;\n widgets: ReportWidgetTypesInventory[] | null;\n request: InventoryReportV2Request;\n reportId: number | null;\n ownerDisplayName: string | null;\n isOwner: boolean;\n globalReportTypeId: number | null;\n roleIdsToShare: number[];\n sellerUserIdsToShare: string[];\n hasMetricsOverride: boolean | null;\n /** Controls whether consumer of the report can edit the filters when viewing the report. */\n hiddenFilterItemIds: string[] | null;\n viewableFilterItemIds: string[] | null;\n editableFilterItemIds: string[] | null;\n}\n\nexport interface ReportBaseRequestOfUIReportV2ListingQuery {\n rowGroupings: ReportColumn[] | null;\n columnGroupings: ReportColumn[] | null;\n aggregations: ReportColumn[] | null;\n orderBy: string | null;\n orderByAsc: boolean;\n pageNumber: number;\n filters: UIReportV2ListingQuery;\n}\n\nexport interface InventoryReportV2Request extends ReportBaseRequestOfUIReportV2ListingQuery {\n}\n\nexport interface ReportColumn {\n /** Identifier of column, used for displaying in the UI and rendering the table, defined in the ListingReportTableGroupingColumnId / ListingReportTableValueColumnId enum */\n columnName: string;\n /** Expressions of columnId, format is ready for ReportingService to parse and transform into raw sql expressions */\n columnValue: string;\n}\n\nexport interface ReportEntityWithTicketsQuery {\n performerIds: number[] | null;\n venueIds: number[] | null;\n countryCodes: string[] | null;\n stateProvinceIds: number[] | null;\n cityIds: number[] | null;\n purchaseOrderId: number | null;\n purchaseVendorId: number | null;\n vendorAccessControlProviderId: number | null;\n purchaseVendorAccountIds: string[] | null;\n purchaseVendorOrderId: string | null;\n purchaseBuyerId: string | null;\n purchaseOrderCreatedBy: string | null;\n purchaseCommissionUserId: string | null;\n purchaseDates: DateTimeRangeWithRelative | null;\n inHandDates: DateTimeRangeWithRelative | null;\n eventTimeFrameFilter: EventTimeFrameFilter | null;\n sections: string[] | null;\n rows: string[] | null;\n sectionContains: string | null;\n sectionEquals: string | null;\n sectionNotContains: string | null;\n rowContains: string | null;\n rowEquals: string | null;\n rowNotContains: string | null;\n isSeatSaver: boolean | null;\n eventDates: DateTimeRangeWithRelative | null;\n noSaleDates: DateTimeRangeWithRelative | null;\n tagName: string | null;\n tagValue: string | null;\n eventTagName: string | null;\n eventTagValue: string | null;\n lastSaleDates: DateTimeRangeWithRelative | null;\n numberOfTicketsHeld: NumericRange | null;\n topLevelCategories: TopLevelCategory[] | null;\n parentCategories: number[] | null;\n internalNotes: string | null;\n internalNotesContains: string | null;\n internalNotesEquals: string | null;\n internalNotesNotContains: string | null;\n timezoneOffsetMins: number | null;\n currencyCode: string | null;\n currencyCodes: string[] | null;\n eventStatuses: ApiEventStatus[] | null;\n}\n\nexport interface ReportV2ListingQuery extends ReportEntityWithTicketsQuery {\n isPredelivered: boolean | null;\n isNoFulfill: boolean | null;\n lastPriceUpdateDates: DateTimeRangeWithRelative | null;\n isPricedByMarketplace: boolean | null;\n isAutoPricingEnabled: boolean | null;\n isListed: boolean | null;\n isMapped: boolean | null;\n isDuplicate: boolean | null;\n isSeatingUnmapped: boolean | null;\n isAdminHold: boolean | null;\n}\n\nexport interface UIReportV2ListingQuery extends ReportV2ListingQuery {\n /** This is only used to filter on the frontend application. */\n viewMode: InventoryViewMode | null;\n isSortDescending: boolean | null;\n}\n\nexport interface ReportV2ConfigOfSalesReportV2RequestAndReportWidgetTypesSale {\n /** Used for disambugating serialized versions of this class. */\n schemaVersion: string;\n reportName: string;\n widgets: ReportWidgetTypesSale[] | null;\n request: SalesReportV2Request;\n reportId: number | null;\n ownerDisplayName: string | null;\n isOwner: boolean;\n globalReportTypeId: number | null;\n roleIdsToShare: number[];\n sellerUserIdsToShare: string[];\n hasMetricsOverride: boolean | null;\n /** Controls whether consumer of the report can edit the filters when viewing the report. */\n hiddenFilterItemIds: string[] | null;\n viewableFilterItemIds: string[] | null;\n editableFilterItemIds: string[] | null;\n}\n\nexport interface ReportBaseRequestOfUIReportV2SaleQuery {\n rowGroupings: ReportColumn[] | null;\n columnGroupings: ReportColumn[] | null;\n aggregations: ReportColumn[] | null;\n orderBy: string | null;\n orderByAsc: boolean;\n pageNumber: number;\n filters: UIReportV2SaleQuery;\n}\n\nexport interface SalesReportV2Request extends ReportBaseRequestOfUIReportV2SaleQuery {\n}\n\nexport interface ReportV2SaleQuery extends ReportEntityWithTicketsQuery {\n isNoFulfill: boolean | null;\n saleDates: DateTimeRangeWithRelative | null;\n saleStatuses: PointOfSaleSaleStatus[] | null;\n soldOnMarketplace: Marketplace | null;\n cancellationDates: DateTimeRangeWithRelative | null;\n fulfillerSellerUserId: string | null;\n fulfillmentDates: DateTimeRangeWithRelative | null;\n paymentDates: DateTimeRangeWithRelative | null;\n marketplacePaymentState: MarketplacePaymentState | null;\n}\n\nexport interface UIReportV2SaleQuery extends ReportV2SaleQuery {\n /** This is only used to filter on the frontend application. */\n viewMode: InventoryViewMode | null;\n isSortDescending: boolean | null;\n}\n\nexport interface ReportV2ConfigOfCommissionReportV2RequestAndReportWidgetTypesCommission {\n /** Used for disambugating serialized versions of this class. */\n schemaVersion: string;\n reportName: string;\n widgets: ReportWidgetTypesCommission[] | null;\n request: CommissionReportV2Request;\n reportId: number | null;\n ownerDisplayName: string | null;\n isOwner: boolean;\n globalReportTypeId: number | null;\n roleIdsToShare: number[];\n sellerUserIdsToShare: string[];\n hasMetricsOverride: boolean | null;\n /** Controls whether consumer of the report can edit the filters when viewing the report. */\n hiddenFilterItemIds: string[] | null;\n viewableFilterItemIds: string[] | null;\n editableFilterItemIds: string[] | null;\n}\n\n/** Widgets to show in commission reports. There are currently no available widgets, so this `None` serves as a placeholder and new widgets can be added in the future */\nexport enum ReportWidgetTypesCommission {\n None = \"None\",\n}\n\nexport interface ReportBaseRequestOfUIReportCommissionQuery {\n rowGroupings: ReportColumn[] | null;\n columnGroupings: ReportColumn[] | null;\n aggregations: ReportColumn[] | null;\n orderBy: string | null;\n orderByAsc: boolean;\n pageNumber: number;\n filters: UIReportCommissionQuery;\n}\n\nexport interface CommissionReportV2Request extends ReportBaseRequestOfUIReportCommissionQuery {\n}\n\nexport interface ReportCommissionQuery {\n eventDates: DateTimeRangeWithRelative | null;\n eventTimeFrameFilter: EventTimeFrameFilter | null;\n saleDates: DateTimeRangeWithRelative | null;\n saleStatuses: PointOfSaleSaleStatus[] | null;\n soldOnMarketplace: Marketplace | null;\n paymentDates: DateTimeRangeWithRelative | null;\n fulfillmentDates: DateTimeRangeWithRelative | null;\n purchaseCommissionUserId: string | null;\n isCommissionEligible: boolean | null;\n commissionEligibilityDates: DateTimeRangeWithRelative | null;\n timezoneOffsetMins: number | null;\n}\n\nexport interface UIReportCommissionQuery extends ReportCommissionQuery {\n /** This is only used to filter on the frontend application. */\n viewMode: InventoryViewMode | null;\n isSortDescending: boolean | null;\n}\n\nexport interface ReportV2ConfigOverride {\n schemaVersion: string;\n request: ReportOverrideRequest;\n}\n\nexport interface ReportOverrideRequest {\n rowGroupings: ReportColumn[] | null;\n columnGroupings: ReportColumn[] | null;\n aggregations: ReportColumn[] | null;\n}\n\nexport interface ReportMetricsV2 {\n rows: { [key: string]: any; }[];\n valueTypes: { [key: string]: ReportValueType; };\n}\n\nexport enum ReportValueType {\n None = \"None\",\n Guid = \"Guid\",\n Integer = \"Integer\",\n Money = \"Money\",\n DateTime = \"DateTime\",\n String = \"String\",\n User = \"User\",\n Decimal = \"Decimal\",\n Boolean = \"Boolean\",\n DateTimeList = \"DateTimeList\",\n IntegerList = \"IntegerList\",\n GuidList = \"GuidList\",\n UserList = \"UserList\",\n StringList = \"StringList\",\n BooleanList = \"BooleanList\",\n}\n\nexport interface ReportMetricsSummaryV2 {\n row: { [key: string]: any; };\n valueTypes: { [key: string]: ReportValueType; };\n}\n\nexport interface SaleDetails extends Sale {\n tickets: Ticket[];\n ticketGroupInfos: SaleTicketGroupInfo[];\n poInfos: UiPurchaseInfo[];\n /** Transfer Source */\n transSrc: TicketTransferInfo[] | null;\n /** Transfer Destination */\n transDest: TicketTransferInfo | null;\n transferUrls: string[] | null;\n transferProofDocs: UserDocumentLinks[] | null;\n transferProofId: string | null;\n /** AvailabileArtifactTypes */\n availArtTypes: ArtifactType[];\n lineItems: SaleLineItem[];\n mkpLines: MarketplaceSaleLineItem[];\n mkpLinesTotal: UiMoney;\n mkpSeating: Seating | null;\n mkpSaleTtlNetProcs: UiMoney | null;\n /** commissions got override at sale level */\n commissionOverride: Commission[] | null;\n /** the original commissions percentage set on the purchase order, which the allocated tickets are linked to */\n purchaseOrderCommissions: PurchaseOrderCommissions[] | null;\n mkpPmtTerm: MarketplacePaymentTerm | null;\n}\n\nexport interface PurchaseOrderInfo {\n purchaseOrderId: number;\n purchaseOrderDate: string | null;\n ticketGroupId: number;\n buyerCommissionPercent: number | null;\n ticketCount: number;\n buyerUserId: string | null;\n vendor: PurchaseVendorInfo | null;\n vendorAccount: PurchaseVendorAccountInfo | null;\n createdBy: string | null;\n internalNotes: string | null;\n}\n\nexport interface SaleTicketGroupInfo extends PurchaseOrderInfo {\n seating: Seating;\n vendorOrderId: string | null;\n}\n\nexport interface TicketTransferInfo {\n name: string;\n email: string;\n app: string | null;\n appId: number;\n phoneNumber: string | null;\n}\n\nexport interface MarketplaceSaleLineItem {\n /** MarketplacePaymentId */\n posPmtId: number;\n /** MarketplacePaymentLineId */\n id: number;\n /** ExternalPaymentId */\n extPmtId: string;\n /** ExternalPaymentLineId */\n extLineId: string;\n extSaleId: string;\n saleId: number | null;\n state: MarketplacePaymentState;\n date: string | null;\n recvDate: string | null;\n /** IsCredit */\n isCred: boolean;\n /** Amount */\n amt: UiMoney;\n type: MarketplacePaymentLineType;\n}\n\nexport interface PurchaseOrderCommissions {\n purchaseOrderId: number;\n orderId: string;\n commissions: Commission[];\n}\n\nexport interface TicketTransferRequest {\n saleId: number;\n transferType: TransferTicketType;\n acceptanceUrls: string[] | null;\n uploadProofDocuments: UserDocument[] | null;\n transferProofId: string | null;\n barcodes: TicketBarcode[] | null;\n}\n\nexport enum TransferTicketType {\n None = \"None\",\n ImageProof = \"ImageProof\",\n URL = \"URL\",\n IdProof = \"IdProof\",\n ApiTransferTicketmaster = \"ApiTransferTicketmaster\",\n ApiTransfer1Ticket = \"ApiTransfer1Ticket\",\n}\n\nexport interface SaleAvailableSeatings {\n hasMoreAllocations: boolean;\n possibleSeatings: SeatingForAlloc[];\n}\n\nexport interface SeatingForAlloc extends Seating {\n tktsForAlloc: TicketInfoForAllocation[];\n recAlloc: boolean | null;\n nonConsecSeats: boolean | null;\n}\n\nexport interface TicketInfoForAllocation {\n id: number;\n row: string | null;\n seat: string;\n listingId: number | null;\n listingOrd: number | null;\n ticketOrd: number;\n purchasedBy: string | null;\n vendorId: number | null;\n vendorName: string | null;\n vendorAccId: string | null;\n vendorAccEmail: string | null;\n vendorAccName: string | null;\n}\n\nexport interface ValueTupleOfLongAndNullableBoolean {\n item1: number;\n item2: boolean | null;\n}\n\n/** A marketplace sale that originated from (and is managed by) the POS (Marketplace = Offline/Direct) Unlike other marketplace sales which are synced from that Marketplace (e.g. StubHub, Ticketmaster, VividSeat, etc.) */\nexport interface PosManagedMarketplaceSaleInput {\n listingId: number;\n saleId: number | null;\n marketplaceSaleId: string | null;\n posEventId: string;\n viagogoEventId: number | null;\n eventMappingId: string | null;\n venueId: number | null;\n saleDate: PosFieldOfNullableDateTime | null;\n currencyCode: PosFieldOfString | null;\n totalNetProceeds: PosFieldOfNullableDecimal | null;\n inHandDate: PosFieldOfNullableDateTime | null;\n quantitySold: PosFieldOfNullableInteger | null;\n section: PosFieldOfString | null;\n row: PosFieldOfString | null;\n seatFrom: PosFieldOfString | null;\n seatTo: PosFieldOfString | null;\n ticketType: PosFieldOfNullableTicketType | null;\n buyerName: PosFieldOfString | null;\n buyerEmail: PosFieldOfString | null;\n buyerPhone: PosFieldOfString | null;\n listingNotes: PosFieldArrayOfListingNote | null;\n saleStatus: PosFieldOfNullablePointOfSaleSaleStatus | null;\n paymentState: PosFieldOfNullablePointOfSalePaymentState | null;\n fulfillerSellerUserId: PosFieldOfNullableGuid | null;\n internalNotes: PosFieldOfString | null;\n}\n\nexport interface PosFieldOfNullablePointOfSaleSaleStatus {\n value: PointOfSaleSaleStatus | null;\n hasChanged: boolean;\n}\n\nexport interface PosFieldOfNullablePointOfSalePaymentState {\n value: PointOfSalePaymentState | null;\n hasChanged: boolean;\n}\n\nexport interface MarketplaceSaleInput {\n listingId: number;\n saleId: number | null;\n marketplace: Marketplace;\n marketplaceSaleId: string | null;\n posEventId: string;\n viagogoEventId: number | null;\n eventMappingId: string | null;\n venueId: number | null;\n saleDate: PosFieldOfNullableDateTime | null;\n currencyCode: PosFieldOfString | null;\n totalNetProceeds: PosFieldOfNullableDecimal | null;\n inHandDate: PosFieldOfNullableDateTime | null;\n quantitySold: PosFieldOfNullableInteger | null;\n section: PosFieldOfString | null;\n row: PosFieldOfString | null;\n seatFrom: PosFieldOfString | null;\n seatTo: PosFieldOfString | null;\n ticketType: PosFieldOfNullableTicketType | null;\n buyerName: PosFieldOfString | null;\n buyerEmail: PosFieldOfString | null;\n buyerPhone: PosFieldOfString | null;\n listingNotes: PosFieldArrayOfListingNote | null;\n saleStatus: PosFieldOfNullablePointOfSaleSaleStatus | null;\n paymentState: PosFieldOfNullablePointOfSalePaymentState | null;\n fulfillerSellerUserId: PosFieldOfNullableGuid | null;\n internalNotes: PosFieldOfString | null;\n}\n\nexport interface BuyerInfo {\n email: string;\n name: string;\n phone: string;\n}\n\nexport interface WasteListingTicketsInput {\n listingId: number;\n}\n\nexport interface UnwasteSaleInput {\n saleId: number;\n}\n\nexport interface SearchResult {\n name: string | null;\n id: string | null;\n ownerUserId: string | null;\n count: number | null;\n entityIds: number[] | null;\n /** Note we call this fetch (instead of refresh) because this refers to the EntityIds that is obtained by running the query\nNot the data for each of the entity which is obtained via another method */\n lastFetchDate: string | null;\n}\n\nexport interface PurchaseSearchResult extends SearchResult {\n query: PurchaseOrderQuery | null;\n}\n\nexport interface SaleSearchResult extends SearchResult {\n query: SaleQuery | null;\n}\n\nexport interface InventorySearchResult extends SearchResult {\n query: ListingQuery | null;\n}\n\nexport interface SellerUserAccountInfo {\n userId: string;\n displayName: string;\n email: string;\n isDeactivated: boolean;\n roles: number[];\n userGroupIds: number[];\n}\n\nexport interface SellerRoleInfo {\n id: number;\n prefinedRole: Role | null;\n name: string;\n details: string | null;\n isDeleted: boolean;\n permissions: Permission[];\n}\n\nexport enum Role {\n Owner = \"Owner\",\n Buyer = \"Buyer\",\n FinanceAPI = \"FinanceAPI\",\n Fulfillment = \"Fulfillment\",\n Pricer = \"Pricer\",\n Processor = \"Processor\",\n AutoPO = \"AutoPO\",\n AutoFulfill = \"AutoFulfill\",\n AutoPricer = \"AutoPricer\",\n Reporter = \"Reporter\",\n Finance = \"Finance\",\n}\n\nexport interface SellerPermissionInfo {\n name: string;\n permission: Permission;\n area: PermissionAccessArea;\n details: string;\n}\n\nexport enum PermissionAccessArea {\n General = \"General\",\n Inventory = \"Inventory\",\n Sales = \"Sales\",\n Purchases = \"Purchases\",\n Events = \"Events\",\n Account = \"Account\",\n Reporting = \"Reporting\",\n Messages = \"Messages\",\n Accounting = \"Accounting\",\n AdPlatform = \"AdPlatform\",\n}\n\nexport interface SellerUserInput {\n sellerUserId: string;\n displayName: string;\n roles: number[];\n userGroupIds: number[];\n}\n\nexport interface SellerUser {\n sellerUserId: string;\n stubHubLoginId: string;\n sellerDisplayName: string;\n sellerUserName: string;\n email: string;\n deleteDate: string | null;\n}\n\nexport interface SellerUserRolesInput {\n sellerUserId: string;\n roles: number[];\n}\n\nexport interface SellerUserAccountInput {\n sellerUserId: string;\n}\n\nexport interface SyncCenterSettings {\n defaultSplitType: SplitType | null;\n defaultSplitTypeForSeatSaver: SplitType | null;\n ticketTypeRules: TicketTypeRule[] | null;\n inHandDatePaddingInDays: number | null;\n defaultHideSeatNumbers: boolean | null;\n priceFloor: number | null;\n defaultMaxQuantityDisplay: number | null;\n marketplaceSettings: MarketplaceAccountSettingInput[] | null;\n inHandDaysBeforeEvent: number | null;\n isAutoPoQualityControlled: boolean | null;\n isAutoAddCancelledProceedsEnabled: boolean | null;\n}\n\nexport interface TicketTypeRule {\n deliveryType: DeliveryType;\n ticketTypePriorityOrders: TicketTypePriorityOrder[];\n}\n\nexport interface TicketTypePriorityOrder {\n ticketType: TicketType;\n priorityOrder: number | null;\n /** Whether this ticket type shouldn't be used */\n blocked: boolean | null;\n}\n\nexport interface MarketplaceAccountSettingInput {\n marketplace: Marketplace;\n isEnabled: boolean;\n markup: number | null;\n sellerFee: number | null;\n /** This field is currently only used for read and does not need to be sent in the update request. */\n userName: string | null;\n /** This field is currently only used for read and does not need to be sent in the update request. */\n tokenVersion: number | null;\n paymentTerm: MarketplacePaymentTerm;\n broadcastHoldDurationInDays: number | null;\n maxHoldDurationInHours: number | null;\n}\n\nexport interface AccountAutoPricingSettingsInputs extends AutoPricingInputs {\n defaultCompListingQuantityFilters: CompListingQuantityFiltersCollection | null;\n}\n\nexport interface CompListingQuantityFiltersCollection {\n exactMatchQuantityFilters: CompListingQuantityFilters[] | null;\n greaterThanOrEqualToQuantityFilter: CompListingQuantityFilters | null;\n}\n\nexport interface CompListingQuantityFilters {\n posListingQuantity: number;\n compQuantityFilters: CompListingQuantity;\n}\n\nexport interface AutoCurrencyConversionSettings {\n enabled: boolean;\n defaultCurrencyCode: string | null;\n ignoredCurrencyCodes: string[] | null;\n}\n\nexport interface TimezoneInfo {\n value: string;\n timezoneOffsetMins: number;\n}\n\nexport interface SellerRoleInput {\n id: number;\n name: string | null;\n details: string | null;\n permissions: Permission[] | null;\n userIds: string[] | null;\n}\n\nexport interface TradeDeskPasswordResetInput {\n username: string;\n oldPassword: string | null;\n newPassword: string;\n code: string;\n}\n\nexport interface SellerSupportCaseNote {\n sellerSupportCaseNoteId: number;\n createByUserId: string | null;\n impersonatedUserId: string | null;\n createDate: string;\n workItemNoteId: number | null;\n noteContent: string | null;\n readDate: string | null;\n attachments: AttachmentResource[] | null;\n}\n\nexport interface AttachmentResource {\n id: string;\n name: string;\n content_type: string;\n content: string | null;\n}\n\nexport interface SellerSupportCase {\n createByUserId: string;\n impersonatedUserId: string | null;\n marketplace: Marketplace;\n sellerSupportCaseId: number;\n entityId: number | null;\n entityType: ActionOutboxEntityType | null;\n marketplaceEntityId: string | null;\n workItemId: number | null;\n readDate: string | null;\n createDate: string;\n lastNoteDate: string;\n unreadNoteCount: number;\n}\n\nexport interface SellerSupportCaseQuery {\n isMostRecent: boolean | null;\n sellerSupportCaseIds: number[] | null;\n}\n\nexport interface SellerSupportCaseRequest {\n marketplace: Marketplace;\n entityId: number | null;\n entityType: ActionOutboxEntityType | null;\n marketplaceEntityId: string | null;\n noteContent: string | null;\n attachments: string[] | null;\n}\n\nexport interface FileDownloadInfo {\n contentType: string;\n contentDisposition: string;\n length: number;\n name: string;\n fileName: string;\n content: string | null;\n}\n\nexport interface SellerSupportCaseAttachmentRequest {\n id: string;\n name: string;\n contentType: string;\n}\n\nexport interface SellerUserSetting {\n userSetting: UserSetting;\n /** JSON string of setting */\n userSettingValue: string;\n}\n\nexport enum UserSetting {\n QuickFiltersStateInventory = \"QuickFiltersStateInventory\",\n QuickFiltersCustomInventory = \"QuickFiltersCustomInventory\",\n QuickFiltersStateSales = \"QuickFiltersStateSales\",\n QuickFiltersCustomSales = \"QuickFiltersCustomSales\",\n QuickFiltersStatePurchases = \"QuickFiltersStatePurchases\",\n QuickFiltersCustomPurchases = \"QuickFiltersCustomPurchases\",\n SalesViewSelected = \"SalesViewSelected\",\n SuspiciousPriceChange = \"SuspiciousPriceChange\",\n InternationalCompliance = \"InternationalCompliance\",\n InventoryPageViewMode = \"InventoryPageViewMode\",\n InventoryColumnOrder = \"InventoryColumnOrder\",\n InventoryColumnNumberPrecision = \"InventoryColumnNumberPrecision\",\n InventoryColumnWidths = \"InventoryColumnWidths\",\n InventoryCustomColumns = \"InventoryCustomColumns\",\n InventoryColumnEditability = \"InventoryColumnEditability\",\n SaleColumnOrder = \"SaleColumnOrder\",\n SaleCustomColumns = \"SaleCustomColumns\",\n SaleColumnEditability = \"SaleColumnEditability\",\n SaleColumnNumberPrecision = \"SaleColumnNumberPrecision\",\n ReportConfigInventory = \"ReportConfigInventory\",\n ReportConfigSale = \"ReportConfigSale\",\n EventsColumnOrder = \"EventsColumnOrder\",\n EventsCustomColumns = \"EventsCustomColumns\",\n EventsColumnEditability = \"EventsColumnEditability\",\n EventsColumnNumberPrecision = \"EventsColumnNumberPrecision\",\n SiteTheme = \"SiteTheme\",\n ReportingColumnLimit = \"ReportingColumnLimit\",\n PriceFloorCeilingMode = \"PriceFloorCeilingMode\",\n ReleaseNoteIdsRead = \"ReleaseNoteIdsRead\",\n EventsColumnsEnabled = \"EventsColumnsEnabled\",\n InventoryColumnsEnabled = \"InventoryColumnsEnabled\",\n SaleColumnsEnabled = \"SaleColumnsEnabled\",\n SiteZoom = \"SiteZoom\",\n InventoryDefaultTab = \"InventoryDefaultTab\",\n PurchaseColumnOrder = \"PurchaseColumnOrder\",\n PurchaseCustomColumns = \"PurchaseCustomColumns\",\n PurchaseColumnEditability = \"PurchaseColumnEditability\",\n PurchaseColumnNumberPrecision = \"PurchaseColumnNumberPrecision\",\n PurchaseColumnsEnabled = \"PurchaseColumnsEnabled\",\n InventoryFlattenedColumnOrder = \"InventoryFlattenedColumnOrder\",\n InventoryFlattenedColumnsEnabled = \"InventoryFlattenedColumnsEnabled\",\n InventoryFlattenedColumnEditability = \"InventoryFlattenedColumnEditability\",\n InventoryFlattenedColumnNumberPrecision = \"InventoryFlattenedColumnNumberPrecision\",\n SaleFlattenedColumnOrder = \"SaleFlattenedColumnOrder\",\n SaleFlattenedColumnsEnabled = \"SaleFlattenedColumnsEnabled\",\n SaleFlattenedColumnEditability = \"SaleFlattenedColumnEditability\",\n SaleFlattenedColumnNumberPrecision = \"SaleFlattenedColumnNumberPrecision\",\n SaleColumnWidths = \"SaleColumnWidths\",\n PurchaseColumnWidths = \"PurchaseColumnWidths\",\n InventoryV2DefaultTab = \"InventoryV2DefaultTab\",\n SalePageViewMode = \"SalePageViewMode\",\n PurchasePageViewMode = \"PurchasePageViewMode\",\n InventoryReportColumnWidths = \"InventoryReportColumnWidths\",\n SaleReportColumnWidths = \"SaleReportColumnWidths\",\n EventsColumnWidths = \"EventsColumnWidths\",\n PurchaseEventColumnOrder = \"PurchaseEventColumnOrder\",\n PurchaseEventColumnsEnabled = \"PurchaseEventColumnsEnabled\",\n PurchaseEventColumnEditability = \"PurchaseEventColumnEditability\",\n PurchaseEventColumnNumberPrecision = \"PurchaseEventColumnNumberPrecision\",\n PurchaseEventColumnWidths = \"PurchaseEventColumnWidths\",\n SidePanelWidths = \"SidePanelWidths\",\n SalesDefaultTab = \"SalesDefaultTab\",\n PurchasesDefaultTab = \"PurchasesDefaultTab\",\n SalesSideTableColumnOrder = \"SalesSideTableColumnOrder\",\n SalesSideTableColumnsEnabled = \"SalesSideTableColumnsEnabled\",\n SalesSideTableColumnEditability = \"SalesSideTableColumnEditability\",\n SalesSideTableColumnNumberPrecision = \"SalesSideTableColumnNumberPrecision\",\n PurchaseSideTableColumnOrder = \"PurchaseSideTableColumnOrder\",\n PurchaseSideTableColumnsEnabled = \"PurchaseSideTableColumnsEnabled\",\n PurchaseSideTableColumnEditability = \"PurchaseSideTableColumnEditability\",\n PurchaseSideTableColumnNumberPrecision = \"PurchaseSideTableColumnNumberPrecision\",\n InventorySideTableColumnOrder = \"InventorySideTableColumnOrder\",\n InventorySideTableColumnsEnabled = \"InventorySideTableColumnsEnabled\",\n InventorySideTableColumnEditability = \"InventorySideTableColumnEditability\",\n InventorySideTableColumnNumberPrecision = \"InventorySideTableColumnNumberPrecision\",\n MarketplacePaymentsTableColumnOrder = \"MarketplacePaymentsTableColumnOrder\",\n MarketplacePaymentsCustomColumns = \"MarketplacePaymentsCustomColumns\",\n MarketplacePaymentsTableColumnsEnabled = \"MarketplacePaymentsTableColumnsEnabled\",\n MarketplacePaymentsColumnNumberPrecision = \"MarketplacePaymentsColumnNumberPrecision\",\n MarketplacePaymentsColumnEditability = \"MarketplacePaymentsColumnEditability\",\n MarketplacePaymentsColumnsWidth = \"MarketplacePaymentsColumnsWidth\",\n QuickFloorPromptDismissal = \"QuickFloorPromptDismissal\",\n QuickFiltersCustomMarketplacePayments = \"QuickFiltersCustomMarketplacePayments\",\n QuickFiltersStateMarketplacePayments = \"QuickFiltersStateMarketplacePayments\",\n QuickFiltersStateOnSaleEvent = \"QuickFiltersStateOnSaleEvent\",\n QuickFiltersCustomOnSaleEvent = \"QuickFiltersCustomOnSaleEvent\",\n OnSaleEventColumnsOrder = \"OnSaleEventColumnsOrder\",\n OnSaleEventColumnsWidths = \"OnSaleEventColumnsWidths\",\n OnSaleEventColumnNumberPrecision = \"OnSaleEventColumnNumberPrecision\",\n OnSaleEventCustomColumns = \"OnSaleEventCustomColumns\",\n OnSaleEventColumnEditability = \"OnSaleEventColumnEditability\",\n OnSaleEventColumnsEnabled = \"OnSaleEventColumnsEnabled\",\n FirstTimeFeaturesViewed = \"FirstTimeFeaturesViewed\",\n}\n\nexport interface CustomQuickFilterOfListingQuery {\n /** Used for disambugating serialized versions of this class. */\n schemaVersion: string;\n id: string;\n name: string;\n data: ListingQuery;\n}\n\nexport interface CustomQuickFilterOfOnSaleEventQuery {\n /** Used for disambugating serialized versions of this class. */\n schemaVersion: string;\n id: string;\n name: string;\n data: OnSaleEventQuery;\n}\n\nexport interface CustomQuickFilterOfSaleQuery {\n /** Used for disambugating serialized versions of this class. */\n schemaVersion: string;\n id: string;\n name: string;\n data: SaleQuery;\n}\n\nexport interface CustomQuickFilterOfPurchaseOrderQuery {\n /** Used for disambugating serialized versions of this class. */\n schemaVersion: string;\n id: string;\n name: string;\n data: PurchaseOrderQuery;\n}\n\nexport interface CustomQuickFilterOfMarketplacePaymentQuery {\n /** Used for disambugating serialized versions of this class. */\n schemaVersion: string;\n id: string;\n name: string;\n data: MarketplacePaymentQuery;\n}\n\nexport interface ReleaseNote {\n id: number;\n title: string;\n releaseNoteType: ReleaseNoteType;\n descriptionHtml: string | null;\n /** Date when user gets access to this release note. For \"NewFeature\" type,\nthis is `FeatureInsertDate` from ReleaseNoteDto, date when user is granted access.\nOtherwise (e.g. BugFix), it is the date the release note itself is created */\n releaseNoteGetAccessDate: string;\n}\n\nexport enum ReleaseNoteType {\n NewFeature = \"NewFeature\",\n BugFix = \"BugFix\",\n}\n\nexport interface TutorialItem {\n tutorialItemId: number;\n title: string;\n titleContentId: number | null;\n parentTutorialItemId: number | null;\n tutorialItemType: TutorialItemType;\n}\n\nexport enum TutorialItemType {\n Folder = \"Folder\",\n Document = \"Document\",\n}\n\nexport interface TutorialItemContent {\n tutorialItemId: number;\n tutorialItemContentId: number | null;\n contentHtml: string;\n}\n\nexport interface DeliveryTypeTicketTypeMapping {\n deliveryType: DeliveryType;\n ticketTypes: { [key in keyof typeof TicketType]?: number[]; };\n}\n\nexport interface TicketGroupMergeInput {\n intentions: TicketGroupIntention[];\n purchaseOrderId: number;\n ticketGroups: TicketGroupInput[];\n updateSalesOfListings: boolean | null;\n deallocateSales: boolean | null;\n updatePredeliveryETicketArtifacts: boolean | null;\n}\n\nexport interface TicketGroupIntention {\n ticketGroupId: number;\n reason: TicketGroupEditReason;\n additionalInfo: string;\n}\n\nexport enum TicketGroupEditReason {\n AmendTickets = \"Amend Tickets\",\n CancelTickets = \"Cancel Tickets\",\n AddTickets = \"Add Tickets\",\n ExchangeTickets = \"Exchange Tickets\",\n EditEvent = \"Edit Event\",\n}\n\nexport interface UserGroup {\n userGroupId: number;\n userGroupName: string;\n userGroupDescription: string | null;\n sellerUserIds: string[];\n}\n\nexport interface FileParameter {\n data: any;\n fileName: string;\n}\n\nexport interface FileResponse {\n data: Blob;\n status: number;\n fileName?: string;\n headers?: { [name: string]: any };\n}\n\nexport class ApiException extends Error {\n override message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isApiException = true;\n\n static isApiException(obj: any): obj is ApiException {\n return obj.isApiException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new ApiException(message, status, response, headers, null);\n}\n\nexport type PosClientConfig = {\n activeAccountId?: string;\n};","// Please keep this enum in alphabetical order\nexport enum ContentId {\n Above = 'cid$#3432318#',\n AbsoluteAmount = 'cid$#3511647#',\n AbsoluteDollarValue = 'cid$#3811309#',\n AbsoluteRankPremium = 'cid$#3543036#',\n ABTest = 'cid$#3811310#',\n Access = 'cid$#3511648#',\n AccessToViewUnauthorized = 'cid$#3005805#',\n AccordianToggle = 'cid$#3678429#',\n Account = 'cid$#3172431#',\n Account_SetPrice_Details = 'cid$#3511649#',\n AccountEmail = 'cid$#3811311#',\n AccountInformation = 'cid$#3408136#',\n Accounting = 'cid$#3811312#',\n Accounting_ViewAll_Details = 'cid$#3811313#',\n Accounting_ViewPaymentsOnSale_Details = 'cid$#3811314#',\n Accounting_ViewStubhubPayments_Details = 'cid$#____Accounting_ViewStubhubPayments_Details#',\n AccountName = 'cid$#3811315#',\n AccountNotSetupForAnyMarketplace = 'cid$#3221219#',\n Accounts = 'cid$#3811316#',\n Accounts_ViewAll_Details = 'cid$#3511650#',\n Actions = 'cid$#2971938#',\n ActivateRole = 'cid$#3511651#',\n ActivateUser = 'cid$#3408137#',\n Active = 'cid$#3372981#',\n ActiveListingsHeader = 'cid$#3811317#',\n ActiveListingsDescription = 'cid$#3811318#',\n Activity = 'cid$#3172432#',\n ActivityLogActionType = 'cid$#3070960#',\n ActivityLogAdditionalInfo = 'cid$#3070962#',\n ActivityLogDate = 'cid$#3070959#',\n ActivityLogInitiatedBy = 'cid$#3070961#',\n ActivityLogLaunchButtonText = 'cid$#3070954#',\n Actual = 'cid$#3453392#',\n ActualSellThroughRate = 'cid$#3389312#',\n ActualSTR = 'cid$#3261229#',\n AdCampaigns = 'cid$#3678430#',\n AddABTest = 'cid$#3811319#',\n AddAnotherSplit = 'cid$#3811320#',\n AddedToSale = 'cid$#____AddedToSale#',\n AddFilterToShowResult = 'cid$#____AddFilterToShowResult#',\n AddHurdle = 'cid$#3811321#',\n AddNameToCreateGroup = 'cid$#3811322#',\n AddNewDeal = 'cid$#3811323#',\n AddNewSection = 'cid$#3811324#',\n AddOverride = 'cid$#3678431#',\n AddRow = 'cid$#3811325#',\n AddRule = 'cid$#3811326#',\n AddSplit = 'cid$#3811327#',\n AddToGroup = 'cid$#3811328#',\n AddToSale = 'cid$#____AddToSale#',\n AddValues = 'cid$#____AddValues#',\n AdGroups = 'cid$#3811329#',\n Add = 'cid$#3408138#',\n AddAccountAction = 'cid$#3054229#',\n AddChargeOrCredit = 'cid$#3453393#',\n AddColumns = 'cid$#3344369#',\n AddCommission = 'cid$#3543037#',\n AddCostAction = 'cid$#3034800#',\n AddCostCredit = 'cid$#3043873#',\n AddCustomColumn = 'cid$#3361762#',\n AddFilter = 'cid$#3577955#',\n AddGroup = 'cid$#3396816#',\n AddInventoryReport = 'cid$#3408139#',\n AddLineItem = 'cid$#3195376#',\n AddMarketplaceSale = 'cid$#3511657#',\n AddMembersToThisTeam = 'cid$#3543038#',\n AddMessagingSource = 'cid$#3432319#',\n AddMessagingSourceDescription = 'cid$#3432320#',\n AddMessagingSourceStep1 = 'cid$#3432321#',\n AddMessagingSourceStep2 = 'cid$#3432322#',\n AddMessagingSourceStep3 = 'cid$#3432323#',\n AddNewBuyer = 'cid$#3269683#',\n AddNewOverrideFxRate = 'cid$#3577956#',\n AddNewTeam = 'cid$#3511658#',\n AddNote = 'cid$#3389313#',\n AddOfflineSale = 'cid$#3237711#',\n AddOrUpdateFxOverrideWarning = 'cid$#3577958#',\n AddOverrideFxRate = 'cid$#3577957#',\n AddPayment = 'cid$#3037601#',\n AddPaymentMethodAction = 'cid$#3054230#',\n AddPlaceholder = 'cid$#3511659#',\n AddPlaceholderAdditionalInfoMessage = 'cid$#3511660#',\n AddPurchase = 'cid$#3034668#',\n AddPurchasePaymentMethod = 'cid$#3054231#',\n AddPurchaseVendor = 'cid$#3054232#',\n AddPurchaseVendorAccount = 'cid$#3054233#',\n AddReport = 'cid$#3389314#',\n AddSalesReport = 'cid$#3408140#',\n AddSeatSaver = 'cid$#3453394#',\n AddSeatSaveEventSearchMessage = 'cid$#3453395#',\n AddSeatSaverAdditionalInfoMessage = 'cid$#3453396#',\n AddSection = 'cid$#3453397#',\n AddSource = 'cid$#3432324#',\n AddTag = 'cid$#3372982#',\n AddTagValues = 'cid$#3432325#',\n AddTagValuesSelected = 'cid$#3432326#',\n AddTagValuesAllVisible = 'cid$#3432327#',\n AddTarget = 'cid$#3453398#',\n AddTickets = 'cid$#3034801#',\n AddTicketsForAnotherEvent = 'cid$#3040948#',\n AddTicketsForThisEvent = 'cid$#3261233#',\n AddUrl = 'cid$#2972050#',\n AddUser = 'cid$#3408141#',\n AddUsersAndGroups = 'cid$#3432329#',\n AddUserToRole = 'cid$#3511661#',\n AddValue = 'cid$#3432330#',\n AddVendorAction = 'cid$#3054234#',\n AdjustFiltersSuggestion = 'cid$#3811330#',\n AdjustFloor = 'cid$#3811331#',\n AdjustMyPrice = 'cid$#____AdjustMyPrice#',\n AdjustPrice = 'cid$#____AdjustPrice#',\n AdjustPricesBy = 'cid$#3511662#',\n AdjustPricingCeilingAllVisible = 'cid$#3432331#',\n AdjustPricingFloorAllVisible = 'cid$#3432332#',\n AdjustPricingFloorSelected = 'cid$#3432333#',\n AdjustPricingCeilingSelected = 'cid$#3432334#',\n AdjustPricingFloor = 'cid$#3432335#',\n AdjustPricingCeiling = 'cid$#3432336#',\n AdjustProceedsFloor = 'cid$#3543039#',\n AdjustProceedsCeiling = 'cid$#3543040#',\n Advanced = 'cid$#____Advanced#',\n AdPlatform_Edit_Details = 'cid$#____AdPlatform_Edit_Details#',\n AdvancedAutopricingSettings = 'cid$#3389315#',\n AdvancedSearch = 'cid$#____AdvancedSearch#',\n AdvancedSettings = 'cid$#3511663#',\n AggressiveOption = 'cid$#3317868#',\n Ago = 'cid$#3396817#',\n AISuggestion = 'cid$#3408142#',\n All = 'cid$#3038730#',\n AllAmex = 'cid$#3577960#',\n AllAvailableMerges = 'cid$#3453399#',\n AllDeliveryOptions = 'cid$#3054235#',\n AllEvents = 'cid$#2978864#',\n AllFulfillmentStates = 'cid$#3543041#',\n AllGenres = 'cid$#3511664#',\n AllIn = 'cid$#3034670#',\n /**\n * @deprecated Unused\n */\n AllInPriceAutoCalculationInfo = 'cid$#3180429#',\n AllListings = 'cid$#3361763#',\n AllMarketplaces = 'cid$#3214273#',\n AllMastercard = 'cid$#3577961#',\n AllMerchants = 'cid$#2975360#',\n AllMessages = 'cid$#3344370#',\n AllocatedListing = 'cid$#3811332#',\n AllocateToAnyAvailableSeats = 'cid$#3543042#',\n Allocation = 'cid$#3678433#',\n AllowBroadcast = 'cid$#3811333#',\n AllowMutipleValues = 'cid$#3389316#',\n AllPaymentMethods = 'cid$#3054236#',\n AllPayments = 'cid$#3811334#',\n AllPaymentStates = 'cid$#2971993#',\n AllPaymentTypes = 'cid$#3577962#',\n AllSaleStatuses = 'cid$#2975361#',\n AllSubGenres = 'cid$#3511665#',\n AllTicketTypes = 'cid$#3042150#',\n AllTime = 'cid$#3678434#',\n AllVendorAccounts = 'cid$#3054238#',\n AllVendors = 'cid$#3054237#',\n Allocate = 'cid$#3089836#',\n AllocateTickets = 'cid$#2975367#',\n AllocateToDifferentTickets = 'cid$#3089837#',\n AllocateToListingTickets = 'cid$#3089838#',\n AllocatedSeats = 'cid$#3042157#',\n AllVisa = 'cid$#3577963#',\n AlreadyInHand = 'cid$#3013278#',\n AlternativeTickets = 'cid$#3577964#',\n AlternativeTicketsBuyerCompensation = 'cid$#3577965#',\n AmendTickets = 'cid$#3059981#',\n Amount = 'cid$#3034802#',\n AmountPaid = 'cid$#3042370#',\n AmountType = 'cid$#3185865#',\n Amphitheater = 'cid$#3811335#',\n Ampitheater = 'cid$#3678435#',\n And = 'cid$#3577968#',\n Angle = 'cid$#3288913#',\n AnUploadedDocumentIsRequired = 'cid$#3042154#',\n Any = 'cid$#3047492#',\n App = 'cid$#3110492#',\n AppendSeatTraits = 'cid$#3811336#',\n ApplicationTempData = 'cid$#3511666#',\n Apply = 'cid$#3577969#',\n ApplyCompListingSettings = 'cid$#3432337#',\n ApplyAdvancedPricingSettings = 'cid$#3432338#',\n ApplyFilter = 'cid$#3237712#',\n ApplyGroupingTemplatesToAllEventsPrompt = 'cid$#3396818#',\n ApplyAutoPricingSettings = 'cid$#3432339#',\n ApplyPricingProtectionSettings = 'cid$#3432340#',\n ApplyToAll = 'cid$#3577970#',\n ApplyToAllEvents = 'cid$#3361764#',\n ApplyUndercutSettings = 'cid$#3432341#',\n Approved = 'cid$#3408143#',\n ApprovedForQualityControl = 'cid$#3408144#',\n AppVersion = 'cid$#3543043#',\n Area = 'cid$#3811337#',\n AreYouSure = 'cid$#3089839#',\n AreYouSureEditRowsMultipleSections = 'cid$#3432342#',\n AreYouSureYouWantToRestoreThisPurchase = 'cid$#3453400#',\n AscendingAbbreviated = 'cid$#3811338#',\n AutopricingInfo = 'cid$#3811339#',\n AutoPricingResult = 'cid$#3811340#',\n BelowThe = 'cid$#____BelowThe#',\n BetterZonesDetail = 'cid$#3811341#',\n BuildReport = 'cid$#____BuildReport#',\n BulkAppendSeatTraitInfoMessage = 'cid$#3811342#',\n BulkEditGettingPreview = 'cid$#3811343#',\n BulkEditListingGroupSettings = 'cid$#3811344#',\n BulkEditListingGroupSettingsWarning = 'cid$#3811345#',\n BulkEditNoCommissionProvidedWarning = 'cid$#3811346#',\n BulkEditNoSeatTraitsProvidedWarning = 'cid$#3811347#',\n AutoComp = 'cid$#3678436#',\n AutoFulfillWithSpace = 'cid$#3678437#',\n AutoGroup = 'cid$#3678438#',\n BulkEditDeliveryTypePurchaseMessage = 'cid$#3678439#',\n BulkEditSuccessWithWarnings = 'cid$#3678440#',\n BulkEditTicketTypePriorityInstruction = 'cid$#3678441#',\n BulkMarkPurchaseAsPaid = 'cid$#3811348#',\n BulkMarkPurchaseAsPaidMessage = 'cid$#3811349#',\n BulkMarkPurchaseAsPaidWarning = 'cid$#3811350#',\n BulkReplaceAndOverrideSeatTraitInfoMessage = 'cid$#3811351#',\n BulkUpdatePlaceholdersMessage = 'cid$#3811352#',\n BulkUpdatePurchaseCurrency = 'cid$#3811353#',\n BulkUpdatePurchaseCurrencyActionText = 'cid$#3811354#',\n BulkUpdatePurchaseCurrencyInfoText = 'cid$#3811355#',\n BulkUpdateSeatTraitInfoMessage = 'cid$#3811356#',\n BulkWasteTicketsConfirmation = 'cid$#3811357#',\n BuyerAccount = 'cid$#3811359#',\n BuyerDelivery = 'cid$#3678442#',\n CancelBulkTicketGroupWarning = 'cid$#3678443#',\n CancelBulkPurchaseWarning = 'cid$#3678444#',\n CancellationReason = 'cid$#____CancellationReason#',\n CancelledOrders = 'cid$#____CancelledOrders#',\n CancelledProceeds = 'cid$#____CancelledProceeds#',\n CancelledProceedsSettingDescription = 'cid$#____CancelledProceedsSettingDescription#',\n CancelledProceedsSettingToggle = 'cid$#____CancelledProceedsSettingToggle#',\n CancelPurchases = 'cid$#3678445#',\n CancelSingleTicketGroupWarning = 'cid$#3678446#',\n CancelTicketGroupsParenth = 'cid$#3678447#',\n CancelPurchasesParenth = 'cid$#3678448#',\n CantAllocateMore100Commission = 'cid$#____CantAllocateMore100Commission#',\n Carts = 'cid$#3811360#',\n Ceiling = 'cid$#3811361#',\n Center = 'cid$#3811362#',\n ChargeAmount = 'cid$#3811363#',\n ChargeReasons = 'cid$#____ChargeReasons#',\n Cheaper = 'cid$#3811364#',\n ChooseListing = 'cid$#3811365#',\n ChooseSpecificSections = 'cid$#3811366#',\n ChooseTickets = 'cid$#3811367#',\n Clear = 'cid$#3811368#',\n CombineCornersAndEnds = 'cid$#3811369#',\n Commands = 'cid$#3811370#',\n CommissionEligibilityDate = 'cid$#____CommissionEligibilityDate#',\n CommissionEligible = 'cid$#____CommissionEligible#',\n CommissionerCostsAndCharges = 'cid$#____CommissionerCostsAndCharges#',\n CommissionerProceedsAndCredits = 'cid$#____CommissionerProceedsAndCredits#',\n CommissionerProfitAndLoss = 'cid$#____CommissionerProfitAndLoss#',\n Commissions = 'cid$#3811371#',\n Compensation = 'cid$#____Compensation#',\n CompletedOn = 'cid$#____CompletedOn#',\n ConfirmRemovePaymentReference = 'cid$#____ConfirmRemovePaymentReference#',\n ConfirmResetOverride = 'cid$#3811372#',\n ConfirmUnLinkPaymentAndSaleTitle = 'cid$#____ConfirmUnLinkPaymentAndSaleTitle#',\n ConfirmUnLinkPaymentAndSaleBody = 'cid$#____ConfirmUnLinkPaymentAndSaleBody#',\n ConfirmWaste = 'cid$#3811373#',\n Conflict = 'cid$#3811374#',\n CommissionPayments = 'cid$#3811375#',\n ConnectedSeller = 'cid$#3811376#',\n Consignment = 'cid$#____Consignment#',\n Converted = 'cid$#3811377#',\n ConvertedPaymentsAmount = 'cid$#3811378#',\n ConvertPayment = 'cid$#3811379#',\n ConvertPurchasePayment = 'cid$#3811380#',\n ConvertCurrency = 'cid$#3811381#',\n ConvertedPayment = 'cid$#3811382#',\n ConvertedPaymentAmountMustBeGreaterThanZero = 'cid$#3811383#',\n ConvertedTo = 'cid$#3811384#',\n ConvPmtAmt = 'cid$#3811385#',\n Corners = 'cid$#3811386#',\n CreateNewGroup = 'cid$#3811387#',\n CreditAmount = 'cid$#3811388#',\n CreditReasons = 'cid$#____CreditReasons#',\n CustomRanks = 'cid$#3811389#',\n DateAdded = 'cid$#3811390#',\n DateRange = 'cid$#3811391#',\n DeallocateSalesOfAffectedTicketsWarning = 'cid$#3811392#',\n ChangeGroup = 'cid$#3678449#',\n ChangeZone = 'cid$#3678450#',\n CheckVenueRows = 'cid$#3678451#',\n CompListingMinCount = 'cid$#3678452#',\n CompListingMinQuantity = 'cid$#3678453#',\n CopiedWithExclamationMark = 'cid$#3678454#',\n DefaultDelivery = 'cid$#3811393#',\n Defect = 'cid$#3811395#',\n DefaultDeliveryConfigurations = 'cid$#3811396#',\n DefaultDeliveryConfigurationsDescription = 'cid$#3811397#',\n DelayBroadcastAfterInitialCreation = 'cid$#3754647#',\n DeletePlaceholders = 'cid$#3811398#',\n DeleteSearchResultConfirm = 'cid$#____DeleteSearchResultConfirm#',\n DeliveryInfoChangePropagateToSalesConfirmation = 'cid$#3678455#',\n DeliveryInfoChangePropagateToUnfulfilledSalesConfirmation = 'cid$#____DeliveryInfoChangePropagateToUnfulfilledSalesConfirmation#',\n DeliveryOverrideInfo = 'cid$#3811399#',\n DeliveryStrategy = 'cid$#3678456#',\n DeprecatingHeatMaps = 'cid$#3811400#',\n Deprioritize = 'cid$#3811401#',\n DeprioritizeQuantitiesHeader = 'cid$#3811402#',\n DeprioritizeQuantitiesDescription = 'cid$#3811403#',\n DescendingAbbreviated = 'cid$#3811404#',\n Details = 'cid$#3811405#',\n DetectionMode = 'cid$#____DetectionMode#',\n DeterminePrice = 'cid$#____DeterminePrice#',\n DiscountApplied = 'cid$#3811406#',\n DonotDropMoreThan = 'cid$#3811407#',\n DontUpdateExistingListings = 'cid$#3811408#',\n DontUpdateExistingListingsOrSales = 'cid$#3678457#',\n DownloadETickets = 'cid$#3811409#',\n Drafted = 'cid$#3811410#',\n DontUpdateExistingPurchasesOrListings = 'cid$#3811411#',\n DroppedOrderPenalty = 'cid$#____DroppedOrderPenalty#',\n DropYourFileAnywhereToUpload = 'cid$#3811413#',\n Edited = 'cid$#3811414#',\n EditEventWarning3 = 'cid$#____EditEventWarning3#',\n EditMap = 'cid$#3811415#',\n EditTable = 'cid$#____EditTable#',\n EditZone = 'cid$#3678459#',\n EmptyPurchaseCommissions = 'cid$#3811416#',\n EnableAutoAddCancelledProceeds = 'cid$#____EnableAutoAddCancelledProceeds#',\n EnableAutoFulfillOverride = 'cid$#3811417#',\n EnableDeliveryOverride = 'cid$#3811418#',\n EnableNativeSyncLabel = 'cid$#3811419#',\n EnableNativeSyncExplanation = 'cid$#3811420#',\n Ends = 'cid$#3811421#',\n EnterCompanionMode = 'cid$#3811422#',\n EventCancellation = 'cid$#____EventCancellation#',\n EventConfig_Create_Details = 'cid$#3678460#',\n EventConfig_Edit_Details = 'cid$#3678461#',\n EventConfig_View_Details = 'cid$#3678462#',\n EventDiscovery = 'cid$#____EventDiscovery#',\n EventMap = 'cid$#3811423#',\n EventNotReviewedSince = 'cid$#3678463#',\n EventState = 'cid$#3678464#',\n ExcludeFanInventoryInfo = 'cid$#____ExcludeFanInventoryInfo#',\n ExcludeDefectsInfo = 'cid$#____ExcludeDefectsInfo#',\n ExistingSections = 'cid$#3811424#',\n ExitCompanionMode = 'cid$#3811425#',\n ExperimentName = 'cid$#3811426#',\n Experiments = 'cid$#3811427#',\n ExportPurchases = 'cid$#3811428#',\n ExternalPaymentId = 'cid$#3811429#',\n ExternalPurchaseIdAbbreviated = 'cid$#3678465#',\n FallbackSplit = 'cid$#3811430#',\n FallbackSplitInfo = 'cid$#3811431#',\n FarLeftAndFarRight = 'cid$#3811432#',\n Filled = 'cid$#3811434#',\n FilterQty = 'cid$#____FilterQty#',\n FilterReportOptional = 'cid$#____FilterReportOptional#',\n FinanceAPI = 'cid$#____FinanceAPI#',\n FlashSales = 'cid$#____FlashSales#',\n FlashSale = 'cid$#____FlashSale#',\n Front = 'cid$#3811435#',\n FuturePayments = 'cid$#3811436#',\n FX = 'cid$#3811437#',\n FXRate = 'cid$#3811438#',\n General_ViewNotifications_Details = 'cid$#____General_ViewNotifications_Details#',\n General_ViewReleaseNotes_Details = 'cid$#____General_ViewReleaseNotes_Details#',\n GeneratingPreview = 'cid$#3811439#',\n GroupInventory = 'cid$#3811440#',\n GroupListingsSettingRankPremium = 'cid$#3811441#',\n GroupListingsSettingQueuingLogic = 'cid$#3811442#',\n GroupListingsSettingBroadcasting = 'cid$#3811443#',\n HasUnmappedSales = 'cid$#____HasUnmappedSales#',\n HasUnlinkedChargesCredits = 'cid$#____HasUnlinkedChargesCredits#',\n HasUnpricedListings = 'cid$#3811444#',\n GUR = 'cid$#3811445#',\n Help = 'cid$#____Help#',\n HelpCenter = 'cid$#____HelpCenter#',\n HideZoneMap = 'cid$#3811446#',\n Hour = 'cid$#3811447#',\n Hours = 'cid$#3811448#',\n IfPurchaseIsCreatedWith = 'cid$#3811449#',\n IncludeBetterZones = 'cid$#3811450#',\n IncludeDefects = 'cid$#3811451#',\n IncludeHeldListings = 'cid$#3811452#',\n IncompatiblePricingMode = 'cid$#3811453#',\n Inferred = 'cid$#3678466#',\n Inventory_UpdateDeliveryStrategy_Details = 'cid$#3811454#',\n Inventory_UpdateDeliveryStrategyOnIsPricerOf_Details = 'cid$#3811455#',\n Inventory_UpdateDeliveryStrategyOnPurchasedBy_Details = 'cid$#3811456#',\n Information = 'cid$#3811457#',\n InternallyGenerated = 'cid$#3811458#',\n InventoryReportDescription = 'cid$#____InventoryReportDescription#',\n InventoryStatus = 'cid$#3811459#',\n ItemsWillBeUpdatedIfApplicable = 'cid$#3811460#',\n KeepExistingTicketsOption = 'cid$#3811461#',\n KeepPaymentReference = 'cid$#____KeepPaymentReference#',\n Last3Days = 'cid$#3678467#',\n Last2Weeks = 'cid$#3678468#',\n LeftAndRight = 'cid$#3811462#',\n LinkSale = 'cid$#____LinkSale#',\n ListingHasNoCurrentFloor = 'cid$#3811463#',\n ListingHasNoMarketprice = 'cid$#3811464#',\n ListingHasNoUnitCost = 'cid$#3811465#',\n ListingQty = 'cid$#____ListingQty#',\n ListingQuantity = 'cid$#3811466#',\n ListingsSortByHeader = 'cid$#3811467#',\n ListingsGroupSortByDescription = 'cid$#3811468#',\n ListingUpdateConfirmation = 'cid$#3678469#',\n ListingWillBeSplitInto = 'cid$#3811469#',\n LockCommission = 'cid$#3811470#',\n MappingError = 'cid$#3678471#',\n MapTitle = 'cid$#3811471#',\n MarkAsPaid = 'cid$#____MarkAsPaid#',\n MarkAsUnpaid = 'cid$#____MarkAsUnpaid#',\n MarkedAsReviewed = 'cid$#3678472#',\n MarketplaceDelivery = 'cid$#3678473#',\n MarketplaceFault = 'cid$#____MarketplaceFault#',\n MarketplacePaymentId = 'cid$#3811472#',\n MarketplacePayments = 'cid$#3811473#',\n MarketplacePaymentTerm = 'cid$#____MarketplacePaymentTerm#',\n MarketplaceTerms = 'cid$#____MarketplaceTerms#',\n MarketShare = 'cid$#3678474#',\n MarkAsFulfilledWarning = 'cid$#3678475#',\n MarkLineItemAsUnpaidConfirmation = 'cid$#____MarkLineItemAsUnpaidConfirmation#',\n MarkProceedsAsUnpaidConfirmation = 'cid$#____MarkProceedsAsUnpaidConfirmation#',\n MarkSalesAsPaid = 'cid$#____MarkSalesAsPaid#',\n MergedGroupListingWarning = 'cid$#3811475#',\n MergeListingGroupTooltip = 'cid$#3811476#',\n MinCommissionValue = 'cid$#____MinCommissionValue#',\n MinListingsRequired = 'cid$#3772104#',\n MoreExpensive = 'cid$#3811477#',\n MovePrice = 'cid$#____MovePrice#',\n MoveTo = 'cid$#3811478#',\n MoveToExistingGroup = 'cid$#3811479#',\n Multiple = 'cid$#3678476#',\n Empty = 'cid$#3678477#',\n NetCommissionRate = 'cid$#____NetCommissionRate#',\n NetCommissionRateOverride = 'cid$#____NetCommissionRateOverride#',\n New = 'cid$#____New#',\n NewCustomReport = 'cid$#____NewCustomReport#',\n NewFlashSale = 'cid$#____NewFlashSale#',\n NextTicket = 'cid$#3811480#',\n NoFault = 'cid$#____NoFault#',\n NoHurdle = 'cid$#3811481#',\n NoItemsWereEligibleForUpdate = 'cid$#3811482#',\n NoResults = 'cid$#3811483#',\n Normal = 'cid$#3678478#',\n Draft = 'cid$#3678479#',\n Contingent = 'cid$#3678480#',\n NoTicketsToWaste = 'cid$#____NoTicketsToWaste#',\n NotificationTypeListingPriceUpdate = 'cid$#3678481#',\n NotMapped = 'cid$#3811484#',\n Of = 'cid$#____Of#',\n OnSaleDate = 'cid$#____OnSaleDate#',\n OpenEventPageV2InDevelopment = 'cid$#3678482#',\n OriginalProceeds = 'cid$#____OriginalProceeds#',\n OriginalSeating = 'cid$#3678483#',\n OriginatedListing = 'cid$#3811485#',\n OtherZoneMap = 'cid$#3811486#',\n OutlierLimit = 'cid$#3678484#',\n OutlierSettingsIngoreListings = 'cid$#____OutlierSettingsIngoreListings#',\n OutlierSpacing = 'cid$#3678485#',\n P25 = 'cid$#3811487#',\n P50 = 'cid$#3811488#',\n PartiallyRefunded = 'cid$#3811489#',\n Page = 'cid$#3811490#',\n PastPayments = 'cid$#3811491#',\n PaymentAmount = 'cid$#3811492#',\n PaymentDetails = 'cid$#3811493#',\n PaymentLine = 'cid$#3811494#',\n PaymentLineId = 'cid$#3811495#',\n PaymentReferenceID = 'cid$#3811496#',\n PaymentsAmount = 'cid$#3811497#',\n PayRef = 'cid$#3678486#',\n PayRec = 'cid$#3678487#',\n PayState = 'cid$#3678488#',\n PendingReshipment = 'cid$#3678489#',\n PendingReversal = 'cid$#3832351#',\n PerformerVenueSpecific = 'cid$#3678490#',\n AssignETicketsIns = 'cid$#2975353#',\n AssignQRCodesIns = 'cid$#3511667#',\n AssignToDefaultPurchaser = 'cid$#3543044#',\n at = 'cid$#3396819#',\n AtLeastOneUrlRequired = 'cid$#3042153#',\n AtoZ = 'cid$#3172433#',\n AtoZArrow = 'cid$#3214274#',\n ATP = 'cid$#3261234#',\n Attachment = 'cid$#3317869#',\n AutoBroadcastNewListing = 'cid$#3180430#',\n AutoBroadcastRequiredFaceValue = 'cid$#3261235#',\n AutoCompAndGroupListings = 'cid$#3678491#',\n AutoConversion = 'cid$#3511668#',\n AutoConversionSubtitle = 'cid$#3577998#',\n AutoFulfill = 'cid$#3408145#',\n Automations = 'cid$#3408146#',\n AutoPO = 'cid$#3408147#',\n AutoPoConfiguration = 'cid$#3577973#',\n AutoPoConfigurationDescription = 'cid$#3578043#',\n AutoPoVendorConfigutationDescription = 'cid$#3578089#',\n AutoPriceFrequency = 'cid$#3577971#',\n AutoPricePreview = 'cid$#3396820#',\n AutoPricePreviewSubTitle = 'cid$#3396821#',\n AutoPricer = 'cid$#3408148#',\n Autopricing = 'cid$#3214275#',\n AutoPricingAllListingsForEvent = 'cid$#3344371#',\n AutoPricingAllResultTypeOption = 'cid$#3291912#',\n AutoPricingDisclaimer = 'cid$#3543045#',\n AutoPricingEnabled = 'cid$#3291911#',\n AutopricingNotAvailableForGA = 'cid$#3288914#',\n AutopricingNotAvailableMissingMap = 'cid$#3288915#',\n AutopricingNotAvailableNoScoresGeneral = 'cid$#3288916#',\n AutopricingNotAvailableNoScores = 'cid$#3317870#',\n AutoPricingResultType = 'cid$#3408149#',\n AutopricingSettings = 'cid$#3344372#',\n AutopricingSettingsAll = 'cid$#3344373#',\n AutopricingSettingsAllVisible = 'cid$#3389317#',\n AutopricingSettingsSelected = 'cid$#3344374#',\n AutopricingStrategy = 'cid$#3511670#',\n AutoSetup = 'cid$#3453401#',\n AutoSourceTickets = 'cid$#3577974#',\n Available = 'cid$#3261236#',\n AvailableInstruction = 'cid$#3243223#',\n AvailableSeats = 'cid$#3261237#',\n AverageTicketPrice = 'cid$#3221220#',\n AvoidOne = 'cid$#3047493#',\n AvoidOneAndThree = 'cid$#3047494#',\n Back = 'cid$#2973464#',\n BankTransfer = 'cid$#3054239#',\n Barcode = 'cid$#2976482#',\n BarcodeAlreadyInUsed = 'cid$#3004076#',\n BarcodeRequired = 'cid$#2972955#',\n Below = 'cid$#3432343#',\n BelowTheNextCheapest = 'cid$#3752872#',\n BestRowExtrapolation = 'cid$#3361765#',\n BestDealScore = 'cid$#3361766#',\n Between = 'cid$#3372983#',\n Better = 'cid$#3389318#',\n BestDealScorePrompt = 'cid$#3361767#',\n Blocked = 'cid$#3243231#',\n Boolean = 'cid$#3372984#',\n Broadcast = 'cid$#3038731#',\n BroadcastAll = 'cid$#3180431#',\n BroadcastAllVisible = 'cid$#3389319#',\n BroadcastByDefault = 'cid$#3214276#',\n BroadcastDisabled = 'cid$#3221221#',\n Broadcasted = 'cid$#3038732#',\n BroadcastError = 'cid$#3172434#',\n BroadcastErrorCode_BroadcastListing = 'cid$#3578079#',\n BroadcastErrorCode_Unknown = 'cid$#3577966#',\n BroadcastErrorCode_UpdatePrice = 'cid$#3578011#',\n BroadcastErrorCode_UpdateTicketType = 'cid$#3578016#',\n BroadcastErrorCode_UpdateSplitType = 'cid$#3578015#',\n BroadcastErrorCode_UpdateInHandDate = 'cid$#3578008#',\n BroadcastErrorCode_SplitListing = 'cid$#3578014#',\n BroadcastErrorCode_MergeListing = 'cid$#3578010#',\n BroadcastErrorCode_UnbroadcastListing = 'cid$#3578080#',\n BroadcastErrorCode_UpdateQuantity = 'cid$#3578012#',\n BroadcastErrorCode_HideSeats = 'cid$#3578007#',\n BroadcastErrorCode_UpdateListingNotes = 'cid$#3578009#',\n BroadcastErrorCode_UpdateSeating = 'cid$#3578013#',\n BroadcastErrorCode_MarketplaceResaleRestricted = 'cid$#3578036#',\n BroadcastErrorCode_MarketplaceManifestMismatch = 'cid$#3578034#',\n BroadcastErrorCode_MarketplacePriceBelowFloor = 'cid$#3578035#',\n BroadcastSelected = 'cid$#3344375#',\n BroadcastSettings = 'cid$#3372985#',\n BroadcastSettingsAllVisible = 'cid$#3389320#',\n BroadcastSettingsForAll = 'cid$#3372986#',\n BroadcastSettingsForSelected = 'cid$#3372987#',\n BrowseFile = 'cid$#3389321#',\n BrowseFiles = 'cid$#2972052#',\n BucketOptions = 'cid$#3577975#',\n Budget = 'cid$#3678492#',\n BugFixes = 'cid$#3432344#',\n BuildACustomRole = 'cid$#3511671#',\n BulkActions = 'cid$#3543046#',\n BulkDeleteSelectedPlaceholderWarning = 'cid$#3678493#',\n BulkDiscount = 'cid$#3043869#',\n BulkEditCancelled = 'cid$#3372988#',\n BulkEditDone = 'cid$#3372989#',\n BulkEditFailed = 'cid$#3389322#',\n BulkEditFloorCeilingCurrentFloorWarning = 'cid$#3543047#',\n BulkEditFloorCeilingUnitCostWarning = 'cid$#3543048#',\n BulkEditFloorCeilingWarning = 'cid$#3432345#',\n BulkEditInProgress = 'cid$#3372990#',\n BulkEditListPriceAdjustingFloorCeilingWarning = 'cid$#3453403#',\n BulkEditPartialFailure = 'cid$#3389323#',\n BulkEditPriceFloorCeilingWarning = 'cid$#3372991#',\n BulkEditPricesWarning = 'cid$#3372992#',\n BulkEditStarting = 'cid$#3396822#',\n BulkEditSuccess = 'cid$#3389324#',\n BulkEntry = 'cid$#2972949#',\n BulkUpload = 'cid$#3389325#',\n Buyer = 'cid$#3408150#',\n BuyerAccounts = 'cid$#3396823#',\n BuyerCommission = 'cid$#3317871#',\n BuyerDeniedEntry = 'cid$#3577976#',\n By = 'cid$#3389326#',\n BypassLimit = 'cid$#3678494#',\n CalculatePrice = 'cid$#3753195#',\n CancellationDate = 'cid$#3511674#',\n Cancellations = 'cid$#3214277#',\n Cancelled = 'cid$#3201692#',\n CancelledEvent = 'cid$#3511675#',\n CancelledHold = 'cid$#3180432#',\n CancelledHoldOnMarketplace = 'cid$#3577977#',\n CancelSelectMultiple = 'cid$#3344376#',\n CannotCalculateUndercut = 'cid$#3361768#',\n Catchup = 'cid$#3577978#',\n Category = 'cid$#3453404#',\n Category1007 = 'cid$#3511676#',\n Category1009 = 'cid$#3511677#',\n Category4286 = 'cid$#3511678#',\n Category5099 = 'cid$#3511679#',\n Category6401 = 'cid$#3511680#',\n Category6404 = 'cid$#3511681#',\n Category6451 = 'cid$#3511682#',\n Category6452 = 'cid$#3511684#',\n Category12567 = 'cid$#3511685#',\n Category263024 = 'cid$#3511686#',\n Category272988 = 'cid$#3511687#',\n Category272989 = 'cid$#3511688#',\n Category273013 = 'cid$#3511689#',\n Category273026 = 'cid$#3511690#',\n Category273031 = 'cid$#3511691#',\n Category273034 = 'cid$#3511692#',\n Category273055 = 'cid$#3511693#',\n Category273057 = 'cid$#3511694#',\n Category273089 = 'cid$#3511695#',\n Category273137 = 'cid$#3511696#',\n Category273138 = 'cid$#3511697#',\n Category273164 = 'cid$#3511698#',\n Category273171 = 'cid$#3511699#',\n Category273393 = 'cid$#3511700#',\n Category273409 = 'cid$#3511701#',\n Category273431 = 'cid$#3511702#',\n Category273485 = 'cid$#3511703#',\n Category273529 = 'cid$#3511704#',\n Category273657 = 'cid$#3511705#',\n Category274164 = 'cid$#3511706#',\n Category274701 = 'cid$#3511707#',\n Category274794 = 'cid$#3511708#',\n Category275344 = 'cid$#3511709#',\n Category275641 = 'cid$#3511710#',\n Category276077 = 'cid$#3511711#',\n Category276281 = 'cid$#3511712#',\n Category276306 = 'cid$#3511713#',\n Category276308 = 'cid$#3511714#',\n Category276311 = 'cid$#3511715#',\n Category276861 = 'cid$#3511716#',\n Category278221 = 'cid$#3511717#',\n Category278837 = 'cid$#3511718#',\n Category279267 = 'cid$#3511719#',\n Category279563 = 'cid$#3511720#',\n Category289352 = 'cid$#3511721#',\n Category150012246 = 'cid$#3511722#',\n Category1013 = 'cid$#3511723#',\n Category1015 = 'cid$#3511724#',\n Category1017 = 'cid$#3511725#',\n Category2294 = 'cid$#3511726#',\n Category4551 = 'cid$#3511727#',\n Category6403 = 'cid$#3511728#',\n Category55548 = 'cid$#3511729#',\n Category259716 = 'cid$#3511730#',\n Category356361 = 'cid$#3511731#',\n Category356453 = 'cid$#3511733#',\n Category356499 = 'cid$#3511734#',\n Category356585 = 'cid$#3511735#',\n Category357019 = 'cid$#3511736#',\n Category357036 = 'cid$#3511737#',\n Category358121 = 'cid$#3511738#',\n Category358959 = 'cid$#3511739#',\n Category366262 = 'cid$#3511740#',\n Category366288 = 'cid$#3511741#',\n Category366529 = 'cid$#3511742#',\n Category366888 = 'cid$#3511743#',\n Category375100 = 'cid$#3511744#',\n Category379731 = 'cid$#3511745#',\n Category379991 = 'cid$#3511746#',\n Category380480 = 'cid$#3511747#',\n Category381561 = 'cid$#3511748#',\n Category150002820 = 'cid$#3511749#',\n Category1014 = 'cid$#3511750#',\n Category1022 = 'cid$#3511751#',\n Category1023 = 'cid$#3511752#',\n Category1026 = 'cid$#3511753#',\n Category1027 = 'cid$#3511754#',\n Category1059 = 'cid$#3511755#',\n Category1205 = 'cid$#3511756#',\n Category14858 = 'cid$#3511757#',\n Category259810 = 'cid$#3511758#',\n Category259815 = 'cid$#3511759#',\n Category259819 = 'cid$#3511760#',\n Category259820 = 'cid$#3511761#',\n Category259822 = 'cid$#3511762#',\n Category259823 = 'cid$#3511763#',\n Category259824 = 'cid$#3511764#',\n Category259827 = 'cid$#3511765#',\n Category259828 = 'cid$#3511766#',\n Category259829 = 'cid$#3511767#',\n Category259833 = 'cid$#3511768#',\n Category259921 = 'cid$#3511769#',\n Category259922 = 'cid$#3511770#',\n Category260261 = 'cid$#3511771#',\n Category260263 = 'cid$#3511772#',\n Category260264 = 'cid$#3511773#',\n Category260265 = 'cid$#3511774#',\n Category260266 = 'cid$#3511775#',\n Category260267 = 'cid$#3511776#',\n Category260268 = 'cid$#3511777#',\n Category260270 = 'cid$#3511779#',\n Category260271 = 'cid$#3511780#',\n Category260275 = 'cid$#3511781#',\n Category260347 = 'cid$#3511782#',\n Category260357 = 'cid$#3511783#',\n Category260385 = 'cid$#3511784#',\n Category260389 = 'cid$#3511785#',\n Category260392 = 'cid$#3511786#',\n Category260421 = 'cid$#3511787#',\n Category260478 = 'cid$#3511788#',\n Category260483 = 'cid$#3511789#',\n Category260492 = 'cid$#3511790#',\n Category260530 = 'cid$#3511791#',\n Category260539 = 'cid$#3511792#',\n Category260542 = 'cid$#3511793#',\n Category260601 = 'cid$#3511794#',\n Category260624 = 'cid$#3511795#',\n Category260628 = 'cid$#3511796#',\n Category260637 = 'cid$#3511797#',\n Category260644 = 'cid$#3511798#',\n Category261289 = 'cid$#3511799#',\n Category261291 = 'cid$#3511800#',\n Category308335 = 'cid$#3511801#',\n Category308336 = 'cid$#3511802#',\n Category308341 = 'cid$#3511803#',\n Category308342 = 'cid$#3511804#',\n Category308344 = 'cid$#3511805#',\n Category308345 = 'cid$#3511806#',\n Category308350 = 'cid$#3511807#',\n Category308351 = 'cid$#3511808#',\n Category308352 = 'cid$#3511809#',\n Category308353 = 'cid$#3511810#',\n Category308355 = 'cid$#3511811#',\n Category308357 = 'cid$#3511812#',\n Category308358 = 'cid$#3511813#',\n Category308363 = 'cid$#3511814#',\n Category308364 = 'cid$#3511815#',\n Category308365 = 'cid$#3511816#',\n Category308385 = 'cid$#3511817#',\n Category321834 = 'cid$#3511818#',\n Category1024 = 'cid$#3511819#',\n CeilingRelativeToUnitCost = 'cid$#3317872#',\n ChangeEventAll = 'cid$#3453405#',\n ChangeEventSelected = 'cid$#3453406#',\n ChangeGroupBy = 'cid$#3453407#',\n ChangeGroupByWarning = 'cid$#3453408#',\n ChangePassword = 'cid$#3408151#',\n ChangeSectionScore = 'cid$#3288917#',\n ChangeTagValueTypeWarning = 'cid$#3372993#',\n ChangeValueType = 'cid$#3372994#',\n ChangeVendorAccount = 'cid$#3543049#',\n Charge = 'cid$#3453409#',\n Charges = 'cid$#3408152#',\n CharityEvent = 'cid$#3511820#',\n Cheapest = 'cid$#3361769#',\n Checkbox = 'cid$#3344377#',\n ChooseBuyer = 'cid$#3269684#',\n ChooseSection = 'cid$#3317873#',\n ChooseRow = 'cid$#3317874#',\n ChooseWidgets = 'cid$#3389327#',\n ChooseYourDisplaySettings = 'cid$#3408153#',\n ChooseZone = 'cid$#3543050#',\n ClassifyMessage = 'cid$#3344378#',\n ClearAll = 'cid$#3453410#',\n ClearAndOverwrite = 'cid$#3577981#',\n ClearBrowsingData = 'cid$#3543051#',\n ClearBrowsingDataHelp = 'cid$#3543052#',\n ClearData = 'cid$#3543053#',\n ClearListingAutoPricingSettings = 'cid$#3678495#',\n Clusters = 'cid$#3577982#',\n Columns = 'cid$#3344379#',\n ColumnSettings = 'cid$#3344380#',\n ColumnWithSameNameExists = 'cid$#3361770#',\n CombinedPermissionViewDescription = 'cid$#3578076#',\n CommaSeparatedValuesExt = 'cid$#3511821#',\n Comments = 'cid$#3678496#',\n Commission = 'cid$#3317875#',\n Commissioner = 'cid$#3543054#',\n Comparables = 'cid$#3396824#',\n CompCeiling = 'cid$#3389328#',\n CompFloor = 'cid$#3361771#',\n CompListingCeiling = 'cid$#3361772#',\n CompListingFloorMustLessThanCeiling = 'cid$#3361773#',\n CompListingModePrompt = 'cid$#3361774#',\n CompListingOnlyForSameZone = 'cid$#3396825#',\n CompListingQuantityScoreAdjustment = 'cid$#3396826#',\n CompMode = 'cid$#3361775#',\n Concert = 'cid$#3511822#',\n ConcertsSectionsBehindStage = 'cid$#3678497#',\n Configure = 'cid$#3269685#',\n ConfigureColumnTags = 'cid$#3408154#',\n ConfigureColumnVariables = 'cid$#3408155#',\n ConfigureHeatMap = 'cid$#3317876#',\n ConfiguringYourHeatMap = 'cid$#3269686#',\n ConfiguringHeatMapInstruction1 = 'cid$#3269687#',\n ConfiguringHeatMapInstruction2 = 'cid$#3269688#',\n Confirm = 'cid$#3453411#',\n ConfirmAllocation = 'cid$#3453412#',\n ConfirmationDeadline = 'cid$#3344381#',\n ConfirmDeletion = 'cid$#3543055#',\n ConfirmTransferWithoutProof = 'cid$#3511823#',\n ConfirmVendorAccountChange = 'cid$#3543056#',\n ConfirmWithoutAllocation = 'cid$#3453413#',\n Contains = 'cid$#3678498#',\n ConversionRate = 'cid$#3577983#',\n ConversionRateMustBeGreaterThanZero = 'cid$#3577984#',\n CopyEmailAddress = 'cid$#3432346#',\n CopyExternalId = 'cid$#3432347#',\n Create = 'cid$#3408156#',\n CreateACustomColumn = 'cid$#3361776#',\n CreateAHeatMap = 'cid$#3317877#',\n CreateANewTeam = 'cid$#3511824#',\n CreatedBy = 'cid$#3543057#',\n CreatedOn = 'cid$#3543058#',\n CreateNew = 'cid$#3288918#',\n CreateNewField = 'cid$#3408157#',\n CreateNewFromTemplateConfigPayload = 'cid$#3543059#',\n CreateNewInventoryReport = 'cid$#3408158#',\n CreateNewOrder = 'cid$#3372995#',\n CreateNewReport = 'cid$#3408159#',\n CreateNewSaleReport = 'cid$#3408160#',\n CreateNewTag = 'cid$#3432348#',\n CreatePricingStrategy = 'cid$#3511825#',\n Credits = 'cid$#3408161#',\n CSError = 'cid$#3577986#',\n CurrencyConversion = 'cid$#3577987#',\n CurrencySectionSubtitle = 'cid$#3511826#',\n Current = 'cid$#3543060#',\n CurrentColumns = 'cid$#3344382#',\n CurrentFloor = 'cid$#3543061#',\n CustomEventId = 'cid$#3361777#',\n CustomReports = 'cid$#3543062#',\n DailyOverrideFxRates = 'cid$#3577988#',\n Dark = 'cid$#3408162#',\n DarkMode = 'cid$#3396827#',\n Dashboard = 'cid$#3678499#',\n DataIsRefreshing = 'cid$#3678500#',\n Date = 'cid$#3344383#',\n Day = 'cid$#3396828#',\n Days = 'cid$#3577989#',\n DeactivateUser = 'cid$#3408163#',\n DealScore = 'cid$#3361778#',\n Decimal = 'cid$#3372996#',\n DecimalNumber = 'cid$#3408164#',\n Decrease = 'cid$#3577990#',\n DecreasePrice = 'cid$#3511827#',\n DecreasePriceByPercentAllVisible = 'cid$#3389329#',\n DecreasePriceForAll = 'cid$#3511828#',\n DecreasePriceForSelected = 'cid$#3511829#',\n DefaultBuyer = 'cid$#3543063#',\n DefaultCurrency = 'cid$#3511830#',\n DefaultPaymentMethod = 'cid$#3543064#',\n DefaultQuantity = 'cid$#3543065#',\n DefaultQuantityFilters = 'cid$#3543066#',\n DefaultReports = 'cid$#3543067#',\n DefaultSplitTypeForSeatSaver = 'cid$#3543068#',\n DefineTargets = 'cid$#3453414#',\n DefineTargetsSubtitle = 'cid$#3453415#',\n Delete = 'cid$#3511831#',\n DeleteAllTemplates = 'cid$#3543069#',\n DeleteCustomColumn = 'cid$#3372997#',\n DeleteFxOverrideWarning = 'cid$#3577992#',\n DeleteOverrideFxRate = 'cid$#3577991#',\n DeletePlaceholder = 'cid$#3511832#',\n DeletePlaceholderAll = 'cid$#3511833#',\n DeletePlaceholderAllVisible = 'cid$#3511834#',\n DeletePlaceholderListing = 'cid$#3543070#',\n DeletePlaceholderSelected = 'cid$#3511835#',\n DeletePricingStrategy = 'cid$#3511836#',\n DeleteReport = 'cid$#3389330#',\n DeleteRole = 'cid$#3511837#',\n DeleteSeatSaver = 'cid$#3453416#',\n DeleteSeatSaverAll = 'cid$#3453417#',\n DeleteSeatSaverAllVisible = 'cid$#3453418#',\n DeleteSeatSaverSelected = 'cid$#3453419#',\n DeleteTag = 'cid$#3543071#',\n DeleteTagConfirmation1 = 'cid$#3543072#',\n DeleteTagConfirmation2 = 'cid$#3543073#',\n DeleteTeam = 'cid$#3511838#',\n DeleteUser = 'cid$#3372998#',\n DelistedClickToList = 'cid$#3678501#',\n DelistedSyncFailed = 'cid$#3577993#',\n DeliveryDocuments = 'cid$#3453420#',\n DeliveryMethodChange = 'cid$#3577994#',\n DeliveryType = 'cid$#3453421#',\n DemandFactors = 'cid$#3678502#',\n Description = 'cid$#3511839#',\n DescriptionOfPurpose = 'cid$#3511840#',\n DeselectAll = 'cid$#3453422#',\n DesiredActiveListings = 'cid$#3344384#',\n DecreasePriceByPercentAll = 'cid$#3344385#',\n DecreasePriceByPercentSelected = 'cid$#3344386#',\n DesiredNumberOfGroups = 'cid$#3389331#',\n DigitalWallet = 'cid$#3689886#',\n DirectToStubHubInternationalMessage = 'cid$#3543074#',\n DirectToStubHubInternationalTitle = 'cid$#3543075#',\n DifferentCurrencyCodesRequired = 'cid$#3577995#',\n Disabled = 'cid$#3678503#',\n DisableDarkMode = 'cid$#3396829#',\n Discount = 'cid$#3344387#',\n Display = 'cid$#3408165#',\n DisplayName = 'cid$#3372999#',\n Distance = 'cid$#3288919#',\n Done = 'cid$#3408166#',\n DontChange = 'cid$#3373000#',\n DontPriceBelow = 'cid$#3389332#',\n Download = 'cid$#3389333#',\n DownloadTemplate = 'cid$#3389334#',\n DoYouWantToContinue = 'cid$#3678504#',\n Duplicate = 'cid$#3511841#',\n DuplicatedListing = 'cid$#3511842#',\n DuplicatedReportName = 'cid$#3389335#',\n DuplicateEventNeedsToBeRescheduled = 'cid$#3511844#',\n DuplicateEventPerformerVenueDateAndTimeMatch = 'cid$#3511845#',\n Duplicates = 'cid$#3543076#',\n DuplicateTicketId = 'cid$#3389336#',\n each = 'cid$#3361779#',\n EachTicketUrlOnNewLine = 'cid$#3389337#',\n EachTicketIdOnNewLine = 'cid$#3389338#',\n EarlyShippingLabelGeneration = 'cid$#3577996#',\n Earnings = 'cid$#3453423#',\n Editable = 'cid$#3389339#',\n EditATeam = 'cid$#3511846#',\n EditColumns = 'cid$#3453424#',\n EditEditabilityDescription = 'cid$#3678505#',\n EditEventWarning = 'cid$#3432349#',\n EditEventWarning2 = 'cid$#3811498#',\n EditGeneralSettings = 'cid$#3543077#',\n EditMarketplaceEvent = 'cid$#3361780#',\n EditACustomColumn = 'cid$#3361781#',\n EditMetrics = 'cid$#3389340#',\n EditNote = 'cid$#3453425#',\n EditOverrideFxRate = 'cid$#3577997#',\n EditPricing = 'cid$#3269689#',\n EditPricingStrategy = 'cid$#3511847#',\n EditReport = 'cid$#3389341#',\n EditRowScore = 'cid$#3317878#',\n EditRowScores = 'cid$#3432350#',\n EditScores = 'cid$#3389342#',\n EditSections = 'cid$#3453426#',\n EditTagTypes = 'cid$#3408167#',\n EditUser = 'cid$#3373002#',\n EffectiveCeilingBelowFloor = 'cid$#3361782#',\n EmailPreview = 'cid$#3288920#',\n EnableAll = 'cid$#3511848#',\n EnableAndDisableExperimentalFeatures = 'cid$#3408168#',\n EnableAutoPricing = 'cid$#3408169#',\n Enabled = 'cid$#3678506#',\n EnableDarkMode = 'cid$#3396830#',\n EnableQualityControlForAutoPo = 'cid$#3408170#',\n EnjoyTheEvent = 'cid$#3344388#',\n EnterBarcodesForTransferIns = 'cid$#3361783#',\n EnterResetCodeFromEmail = 'cid$#3432351#',\n EnterStubHubEmailPrompt = 'cid$#3408171#',\n EnterTicketUrlsIns = 'cid$#3389343#',\n EnterTicketIdsIns = 'cid$#3389344#',\n EnterValuesFor = 'cid$#3408172#',\n Equals = 'cid$#3678507#',\n EventCancelled = 'cid$#3344390#',\n EventHasPassed = 'cid$#3511849#',\n EventId = 'cid$#3453427#',\n EventMapped = 'cid$#3678508#',\n EventPostponed = 'cid$#3344391#',\n Events_AddTagType_Details = 'cid$#3511850#',\n Events_Edit_Details = 'cid$#3543078#',\n Events_SetPrice_Details = 'cid$#3511851#',\n Events_UpdateTags_Details = 'cid$#3511852#',\n Events_ViewAll_Details = 'cid$#3511853#',\n EventTag = 'cid$#3678509#',\n EventTags = 'cid$#3453428#',\n EventView = 'cid$#3678510#',\n Example = 'cid$#3408174#',\n ExcessiveFailureRate = 'cid$#3577999#',\n Exclude = 'cid$#3578000#',\n ExcludeFanInventory = 'cid$#3578001#',\n ExcludeFullySoldListings = 'cid$#3678511#',\n ExclusionCurrencies = 'cid$#3511854#',\n ExclusionCurrenciesSubtitle = 'cid$#3511855#',\n ExistingOrder = 'cid$#3317879#',\n ExistingTagName = 'cid$#3432352#',\n ExistingTagValue = 'cid$#3373003#',\n Exit = 'cid$#3578002#',\n ExpectedProceeds = 'cid$#3511856#',\n ExpectedProfit = 'cid$#3578003#',\n ExpectedSTR = 'cid$#3389345#',\n ExperimentalFeatures = 'cid$#3408175#',\n ExperimentalFeaturesComingSoon = 'cid$#3432353#',\n ExpiredShippingLabel = 'cid$#3578004#',\n ExploreComparables = 'cid$#3408176#',\n ExportListings = 'cid$#3578005#',\n ExportSales = 'cid$#3578006#',\n ExternalPurchaseId = 'cid$#3453429#',\n ExternalSaleId = 'cid$#3453430#',\n Far = 'cid$#3288921#',\n Festival = 'cid$#3511857#',\n FindThe = 'cid$#3373004#',\n FulfillmentProviders = 'cid$#3409273#',\n FulfillmentProvidersSubText = 'cid$#3409272#',\n FullPrice = 'cid$#3578019#',\n HasUnsoldListings = 'cid$#3678512#',\n Hidden = 'cid$#3678513#',\n HiddenEditabilityDescription = 'cid$#3678514#',\n HowToDeterminePrice = 'cid$#3771815#',\n Include = 'cid$#3578020#',\n IncludeAllCountries = 'cid$#3578021#',\n IncludeAllVendors = 'cid$#3578022#',\n IncludedCountries = 'cid$#3577985#',\n InventoryTag = 'cid$#3678515#',\n GlobalReportFilterChangeCopyMessage = 'cid$#3577980#',\n GlobalReportFilterChangeMessage = 'cid$#3577979#',\n LastMinuteSalesLateDelivery = 'cid$#3578026#',\n LastReviewed = 'cid$#3578027#',\n ListedDelistFailed = 'cid$#3578029#',\n ListedSyncFailed = 'cid$#3578030#',\n ListingGroupSummaryActiveAndActive = 'cid$#3678516#',\n ListingGroupSummaryActiveButNotListed = 'cid$#3678517#',\n ListingGroupSummaryQueued = 'cid$#3678518#',\n LMSError = 'cid$#3578031#',\n Mappings = 'cid$#3678519#',\n MarkAsFulfilled = 'cid$#3678520#',\n MarkAsReviewed = 'cid$#3578032#',\n MarketplaceEnableDisableConfirm = 'cid$#3678521#',\n MarketplaceFulfillmentState = 'cid$#3578033#',\n MaxReportSizeWarningLabel = 'cid$#3678522#',\n MaxActiveListings = 'cid$#3678523#',\n MergedVenueGeometry = 'cid$#3678524#',\n NoGroupsAvailableForVenueConfig = 'cid$#3678525#',\n MinActiveListings = 'cid$#3678526#',\n NoFulfillmentProviders = 'cid$#3409274#',\n NoItemsWereChanged = 'cid$#3578037#',\n NotContains = 'cid$#3678527#',\n NumberOfUnsoldTickets = 'cid$#3578040#',\n NumberOfListedTicketsDescription = 'cid$#3578038#',\n NumberOfUnlistedTicketsDescription = 'cid$#3578039#',\n OnlyThis = 'cid$#3578042#',\n OrderNotFulfilled = 'cid$#3578044#',\n OriginatedBy = 'cid$#3578045#',\n OverchargedSeller = 'cid$#3578046#',\n PandLTitle = 'cid$#3578056#',\n PaymentId = 'cid$#3678528#',\n Penalty = 'cid$#3578052#',\n Perk = 'cid$#3811500#',\n Permission_AdPlatformEdit = 'cid$#____Permission_AdPlatformEdit#',\n Permission_EditVendor = 'cid$#____Permission_EditVendor#',\n Permission_EventConfig_Create = 'cid$#3678529#',\n Permission_EventConfig_Edit = 'cid$#3678530#',\n Permission_EventConfig_View = 'cid$#3678531#',\n Permission_LockUnlockCommission = 'cid$#____Permission_LockUnlockCommission#',\n Permission_LockUnlockCommissionOwned = 'cid$#____Permission_LockUnlockCommissionOwned#',\n Permission_UpdateDeliveryStrategyOnPurchasedListings = 'cid$#3811501#',\n Permission_UpdateDeliveryStrategyOnPricedListings = 'cid$#3811502#',\n Permission_UpdateDeliveryStrategy = 'cid$#3811503#',\n Permission_UpdateDeliveryType = 'cid$#3811504#',\n Permission_UpdateDeliveryTypeOwned = 'cid$#3811505#',\n Permission_UpdateSeatTraits = 'cid$#3811506#',\n Permission_UpdateSeatTraitsOwned = 'cid$#3811507#',\n Permission_UpdateCustomDeliveryType = 'cid$#3811508#',\n Permission_UpdateCustomDeliveryTypeOwned = 'cid$#3811509#',\n Permission_ViewNotifications = 'cid$#____Permission_ViewNotifications#',\n Permission_ViewPaymentsOnSale = 'cid$#3811510#',\n Permission_ViewStubhubPayments = 'cid$#____Permission_ViewStubhubPayments#',\n Permission_ViewReleaseNotes = 'cid$#____Permission_ViewReleaseNotes#',\n PmtAmount = 'cid$#3811511#',\n PmtLineId = 'cid$#3811512#',\n PmtMethod = 'cid$#3811513#',\n PmtState = 'cid$#3811520#',\n PmtType = 'cid$#3811521#',\n PmtStatus = 'cid$#3811522#',\n PoId = 'cid$#3678532#',\n PoDate = 'cid$#3678533#',\n POPaymentState = 'cid$#3678534#',\n Postponed = 'cid$#3678535#',\n PreSaleDate = 'cid$#____PreSaleDate#',\n Prev = 'cid$#3811523#',\n PreviousTicket = 'cid$#3811524#',\n PriceAgainst = 'cid$#3753190#',\n PriceDateFilterTitle = 'cid$#3678536#',\n PriceDateFilterChanged = 'cid$#3678537#',\n PriceDateFilterUnchanged = 'cid$#3678538#',\n PriceHitHardFloor = 'cid$#3578053#',\n PriceHitRelativeFloor = 'cid$#3578055#',\n PriceHitMaxAllowedDrop = 'cid$#3578054#',\n PriceMin = 'cid$#____PriceMin#',\n PriceP25 = 'cid$#____PriceP25#',\n PriceP50 = 'cid$#____PriceP50#',\n PriceToMarket = 'cid$#3811525#',\n PricingAgainst = 'cid$#3811526#',\n PricingSettingsListingsConflictWarning = 'cid$#3811527#',\n PrivateInventoryNotes = 'cid$#3678539#',\n PrivateSaleNotes = 'cid$#3678540#',\n PrivatePurchaseNotes = 'cid$#3678541#',\n ProceedRepayment = 'cid$#____ProceedRepayment#',\n ProceedsAmount = 'cid$#3811528#',\n Purchases_EditVendor_Details = 'cid$#____Purchases_EditVendor_Details#',\n Purchases_LockUnlockCommission_Details = 'cid$#____Purchases_LockUnlockCommission_Details#',\n Purchases_LockUnlockCommissionOwned_Details = 'cid$#____Purchases_LockUnlockCommissionOwned_Details#',\n Purchases_UpdateDeliveryType_Details = 'cid$#3811529#',\n Purchases_UpdateDeliveryTypeOwned_Details = 'cid$#3811530#',\n Purchases_UpdateCustomDeliveryType_Details = 'cid$#3811531#',\n Purchases_UpdateCustomDeliveryTypeOwned_Details = 'cid$#3811532#',\n Purchases_UpdateSeatTraits_Details = 'cid$#3811533#',\n Purchases_UpdateSeatTraitsOwned_Details = 'cid$#3811534#',\n Proceed = 'cid$#____Proceed#',\n PurchaseTag = 'cid$#3678542#',\n PutSaleListingOnHold = 'cid$#3578058#',\n Quantities = 'cid$#3752103#',\n QuantitiesFilter = 'cid$#3811535#',\n QuantitiesForcedToBottom = 'cid$#3578059#',\n Queued = 'cid$#3678543#',\n RAGDeliveryDispute = 'cid$#3578061#',\n RAGSellerFaultNoResponse = 'cid$#3578060#',\n RankPremiumTips = 'cid$#3811536#',\n RawVenueCatData = 'cid$#3811537#',\n Rear = 'cid$#3811538#',\n ReceivedDate = 'cid$#3811539#',\n Received = 'cid$#____Received#',\n Relocated = 'cid$#3678544#',\n RelocatedAndRescheduled = 'cid$#3678545#',\n RemainingSeatingOnly = 'cid$#3678546#',\n RemoveExistingTicketsOption = 'cid$#3811543#',\n RemoveFromGroup = 'cid$#3811544#',\n RemoveFromSale = 'cid$#____RemoveFromSale#',\n RemoveHoldConfirmation = 'cid$#3811545#',\n RemovePaymentReference = 'cid$#____RemovePaymentReference#',\n ReplaceAndOverrideSeatTraits = 'cid$#3811546#',\n ReplaceWith = 'cid$#3578062#',\n ReportNotAvailable = 'cid$#3811547#',\n Rescheduled = 'cid$#3678547#',\n ResetFilters = 'cid$#3678548#',\n ResetFulfillmentWarningV2 = 'cid$#3678549#',\n ResetOverride = 'cid$#3811548#',\n ResetToOriginal = 'cid$#3811549#',\n RestartExperiment = 'cid$#____RestartExperiment#',\n RestrictionOnUse = 'cid$#3811550#',\n Restrictions = 'cid$#3811551#',\n ResumeExperiment = 'cid$#3811552#',\n ResultTimeout = 'cid$#3811553#',\n ResultTimeoutDescription = 'cid$#3811554#',\n RetrySkipped = 'cid$#3811555#',\n ReuploadDocumentWarning = 'cid$#3678550#',\n RevenueSplitHurdle = 'cid$#3811556#',\n Reversed = 'cid$#3832352#',\n ReversedPenalty = 'cid$#____ReversedPenalty#',\n ReversedCharge = 'cid$#____ReversedCharge#',\n Role_FinanceAPI_Details = 'cid$#____Role_FinanceAPI_Details#',\n RowCompOverrides = 'cid$#3811557#',\n RowComps = 'cid$#3678551#',\n RowCompSettingExactMatch = 'cid$#3678552#',\n RowGroups = 'cid$#3678553#',\n RowRanges = 'cid$#3811558#',\n RowRangesInputTip = 'cid$#3811559#',\n RowsAscToDesc = 'cid$#3811560#',\n RowsDescToAsc = 'cid$#3811561#',\n RowsGroupBy = 'cid$#____RowsGroupBy#',\n SaleBasisShare = 'cid$#____SaleBasisShare#',\n SaleCharges = 'cid$#____SaleCharges#',\n SaleCredits = 'cid$#____SaleCredits#',\n SaleDateFilterTitle = 'cid$#3678554#',\n SaleDateFilterOccured = 'cid$#3678555#',\n SaleDateFilterNotOccured = 'cid$#3678556#',\n SaleDay = 'cid$#____SaleDay#',\n SaleForEditTickets = 'cid$#3678557#',\n SaleForRemovedTickets = 'cid$#3678558#',\n SaleHasMarketplaceProblemHoverText = 'cid$#____SaleHasMarketplaceProblemHoverText#',\n SaleIsFulfilledOnMarketplace = 'cid$#3578018#',\n SaleMonth = 'cid$#____SaleMonth#',\n SalePaymentConversionWarning = 'cid$#3811562#',\n SaleIsFulfilledOnMarketplace2 = 'cid$#3678559#',\n SaleReportDescription = 'cid$#____SaleReportDescription#',\n SaleTag = 'cid$#3678560#',\n SaleWeek = 'cid$#____SaleWeek#',\n SameEventsShareSameVenueConfigTitle = 'cid$#3678561#',\n SameEventsShareSameVenueConfigHeader = 'cid$#3678562#',\n SameEventsShareSameVenueConfigMessage1 = 'cid$#3678563#',\n SameEventsShareSameVenueConfigMessage2 = 'cid$#3678564#',\n SameSize = 'cid$#3578064#',\n FlatView = 'cid$#3543079#',\n Floor = 'cid$#3432354#',\n FloorMustBeLessThanCeiling = 'cid$#3261244#',\n Change = 'cid$#3172435#',\n ChangeEvent = 'cid$#3432355#',\n Classify = 'cid$#3261245#',\n ClickToViewCompsInstruction = 'cid$#3243225#',\n COD = 'cid$#3054240#',\n Calculate = 'cid$#3045422#',\n Cancel = 'cid$#2973473#',\n CancelPurchase = 'cid$#3067696#',\n CancelPurchaseDescription = 'cid$#3067697#',\n CancelTickets = 'cid$#3059982#',\n CancelVoidPurchase = 'cid$#3067698#',\n Cash = 'cid$#3054241#',\n Check = 'cid$#3054242#',\n ChooseAccount = 'cid$#3054243#',\n ChooseIncrementType = 'cid$#3172436#',\n ChoosePaymentMethodPlaceholder = 'cid$#3054244#',\n ChoosePaymentMethodTypePlaceholder = 'cid$#3054245#',\n ChooseSeatingNotes = 'cid$#3067699#',\n ChooseVendor = 'cid$#3054246#',\n City = 'cid$#3067700#',\n ClickToTakeAction = 'cid$#2992156#',\n Close = 'cid$#2988459#',\n CompListingMode = 'cid$#3261246#',\n CompListingFloor = 'cid$#3261247#',\n CompListingFloorMustBeSetError = 'cid$#3285807#',\n ConfirmETicketsIns = 'cid$#2972054#',\n ConfirmSale = 'cid$#2971947#',\n Contact = 'cid$#2971950#',\n ContentView = 'cid$#3261248#',\n Copied = 'cid$#3082869#',\n Cost = 'cid$#3037580#',\n CostAndCredits = 'cid$#3034803#',\n CostBasis = 'cid$#2981285#',\n CostPerTicket = 'cid$#3195377#',\n Country = 'cid$#3067701#',\n CreateCustomFilter = 'cid$#3110493#',\n Credit = 'cid$#3054247#',\n CreditBalance = 'cid$#3054248#',\n CreditCard = 'cid$#3054249#',\n CreditCardFee = 'cid$#3043868#',\n Currency = 'cid$#3042158#',\n CurrencyCode = 'cid$#3678565#',\n Custom = 'cid$#3042151#',\n CustomDate = 'cid$#3195378#',\n CustomDateRange = 'cid$#3013279#',\n CustomFilter = 'cid$#3110494#',\n DateAscArrow = 'cid$#3214279#',\n DateDescArrow = 'cid$#3214278#',\n DateDue = 'cid$#3034804#',\n DateIncurred = 'cid$#3043874#',\n DatePaid = 'cid$#3042371#',\n DateRangeDisplayText = 'cid$#3005344#',\n DateRangeSuggestionsTitle = 'cid$#3005345#',\n DaysPostfix = 'cid$#3214280#',\n Deactivated = 'cid$#3175841#',\n Deal = 'cid$#3285447#',\n DeallocateSale = 'cid$#3084137#',\n DeallocateSaleWarning = 'cid$#3084138#',\n DebitCard = 'cid$#3054250#',\n DebitNote = 'cid$#3054251#',\n DecreasePriceByPercent = 'cid$#3180433#',\n Default = 'cid$#3261249#',\n DefaultHideSeatNumbers = 'cid$#3214281#',\n DefaultInHandDateOffset = 'cid$#3214282#',\n DefaultSplitType = 'cid$#3214283#',\n Deleted = 'cid$#3172437#',\n DeletePurchasePaymentMethod = 'cid$#3172438#',\n DeletePurchasePaymentMethodWarning = 'cid$#3172439#',\n DeletePurchaseVendor = 'cid$#3172440#',\n DeletePurchaseVendorWarning = 'cid$#3172441#',\n DeletePurchaseVendorAccount = 'cid$#3172442#',\n DeletePurchaseVendorAccountWarning = 'cid$#3172443#',\n Delisted = 'cid$#3172444#',\n DelistedClickToRelist = 'cid$#3180434#',\n DelistingClickToCancel = 'cid$#3180435#',\n DelistingFailedClickToTryAgain = 'cid$#3180436#',\n DelistingPending = 'cid$#3172445#',\n DelistingFailed = 'cid$#3172446#',\n DeliverTicket = 'cid$#3172447#',\n DeliverToAlternativeAccount = 'cid$#3172448#',\n Delivery = 'cid$#2971940#',\n DeliveryAccount = 'cid$#3237713#',\n DeliveryCost = 'cid$#3042160#',\n DeliveryWebsite = 'cid$#3237714#',\n DetailView = 'cid$#3261250#',\n DirectOffline = 'cid$#2980716#',\n DisableThisMarketplace = 'cid$#3214284#',\n Dismiss = 'cid$#3082870#',\n Document = 'cid$#3172449#',\n DollarsInBasket = 'cid$#3678566#',\n DoTheseTicketsHaveAnyRestrictions = 'cid$#3180437#',\n DoYouWorkForEventOrganizerOrViagogo = 'cid$#3180438#',\n DragNAssignToSeats = 'cid$#2975414#',\n DragNDropFiles = 'cid$#2972051#',\n Due = 'cid$#3041862#',\n DuplicateBarcode = 'cid$#2972952#',\n DuplicateSeat = 'cid$#3042159#',\n DuplicateUrl = 'cid$#2972957#',\n ECheck = 'cid$#3054252#',\n EditOfflineSale = 'cid$#3237715#',\n EmailDetails = 'cid$#3261251#',\n EndDateTime = 'cid$#3678567#',\n Entity = 'cid$#3180439#',\n ETicket = 'cid$#2976483#',\n ETicketUrl = 'cid$#3042152#',\n EachBarcodeOnNewLine = 'cid$#2975371#',\n Economics = 'cid$#2972019#',\n Edit = 'cid$#3043870#',\n EditCostCredit = 'cid$#3054253#',\n EditCustomFilter = 'cid$#3110495#',\n EditPayment = 'cid$#3041863#',\n EditPaymentMethod = 'cid$#3054254#',\n EditPurchaseDetails = 'cid$#3067702#',\n EditPurchaseVendor = 'cid$#3054255#',\n EditPurchaseVendorAccount = 'cid$#3054256#',\n EditTicketNotes = 'cid$#3059983#',\n Email = 'cid$#3037596#',\n Employee = 'cid$#3054257#',\n EmployeeManagement = 'cid$#3014677#',\n EmptyContent = '' /* Used for useContent with an optional content-id */,\n EndDateBeforeStartDate = 'cid$#3004077#',\n EnterBarcodesIns = 'cid$#2972950#',\n EnterTransferIdForPurchase = 'cid$#3268818#',\n EnterPurchaseOrderIdFromVendor = 'cid$#3042156#',\n Error_BadGatewayError_GenericMessage = 'cid$#3084140#',\n Error_BadGatewayError_Header = 'cid$#3084139#',\n Error_BadRequest_GenericMessage = 'cid$#3082872#',\n Error_BadRequest_Header = 'cid$#3082871#',\n Error_Forbidden_GenericMessage = 'cid$#3082874#',\n Error_Forbidden_Header = 'cid$#3082873#',\n Error_InternalServerError_GenericMessage = 'cid$#3082876#',\n Error_InternalServerError_Header = 'cid$#3082875#',\n Error_NotFound_GenericMessage = 'cid$#3082882#',\n Error_NotFound_Header = 'cid$#3082881#',\n Error_NotImplemented_GenericMessage = 'cid$#3089841#',\n Error_NotImplemented_Header = 'cid$#3089840#',\n Error_RequestTimeout_GenericMessage = 'cid$#3082880#',\n Error_RequestTimeout_Header = 'cid$#3082879#',\n Error_Unauthorized_GenericMessage = 'cid$#3082878#',\n Error_Unauthorized_Header = 'cid$#3082877#',\n Event = 'cid$#3172450#',\n EventDate = 'cid$#3067703#',\n EventDateAsc = 'cid$#3185866#',\n EventDateDesc = 'cid$#3185867#',\n EventName = 'cid$#3067704#',\n Events = 'cid$#2975379#',\n EventTime = 'cid$#3180440#',\n EventVisitors = 'cid$#3678568#',\n Everyone = 'cid$#3038733#',\n ExchangeTickets = 'cid$#3059984#',\n ExpectedValue = 'cid$#3040231#',\n ExpectedValuePerTicket = 'cid$#3195379#',\n ExpireHold = 'cid$#3172451#',\n ExpireHoldWarning = 'cid$#3172452#',\n Export = 'cid$#3214285#',\n FaceValue = 'cid$#3172453#',\n FailedAndRequiresSellerAction = 'cid$#3201693#',\n FailedWithNonRetryableError = 'cid$#3201694#',\n FailedWithRetryableError = 'cid$#3201695#',\n FailToLoadListContent = 'cid$#2987014#',\n Failed = 'cid$#3041864#',\n FailedToStartupTheApp = 'cid$#2987015#',\n Failures = 'cid$#3214286#',\n FarthestEvent = 'cid$#3185868#',\n Filters = 'cid$#3110496#',\n FinalQuestionsOnYourTickets = 'cid$#3180441#',\n Finance = 'cid$#3110497#',\n Finish = 'cid$#3180442#',\n FloorRelativeToUnitCost = 'cid$#3317880#',\n Format = 'cid$#3408177#',\n FormulaBuilder = 'cid$#3361784#',\n FormulaBuilderInfoLine1 = 'cid$#3511858#',\n FormulaBuilderInfoLine2 = 'cid$#3511859#',\n FormulaBuilderInfoLine3 = 'cid$#3511860#',\n FormulaBuilderInfoLine4 = 'cid$#3511861#',\n FormulaBuilderInfoLine5 = 'cid$#3511862#',\n FormulaBuilderInfoLine6 = 'cid$#3511863#',\n ForTheEvent = 'cid$#3361786#',\n FreeEvent = 'cid$#3511864#',\n From = 'cid$#3172454#',\n FromDate = 'cid$#2973456#',\n Fulfill = 'cid$#2988323#',\n FulfillActionNotAvailable = 'cid$#2988324#',\n FulfilledBy = 'cid$#3453431#',\n Fulfiller = 'cid$#3344392#',\n FulfillmentDate = 'cid$#3511866#',\n FulfillmentRestrictions = 'cid$#3511867#',\n FulfillmentState = 'cid$#3453432#',\n FullEventInfo = 'cid$#3543080#',\n History = 'cid$#3543081#',\n IgnoreTheFirst = 'cid$#3511868#',\n InCheckout = 'cid$#3678569#',\n IncorrectPerfomerOrGrouping = 'cid$#3511869#',\n IncreaseDecreasePrice = 'cid$#3578023#',\n IncreasePrice = 'cid$#3543082#',\n InsightsView = 'cid$#3578024#',\n InvalidBaseRow = 'cid$#3543083#',\n IsDuplicate = 'cid$#3543084#',\n IsPricedByMarketplace = 'cid$#3578025#',\n ListedAndSold = 'cid$#3543086#',\n ListView = 'cid$#3578028#',\n KeepCurrentPurchaser = 'cid$#3543087#',\n MembersOnThisTeam = 'cid$#3543088#',\n MergeListings_ListingMismatchWarning = 'cid$#3543090#',\n MinQty = 'cid$#3543091#',\n MinQuantity = 'cid$#3543092#',\n MoreThan = 'cid$#3511870#',\n NewAppVersion = 'cid$#3543093#',\n NewHeatMap = 'cid$#3543094#',\n NotEnoughInformationToCreate = 'cid$#3511871#',\n NotFoundOnPrimary = 'cid$#3511872#',\n NotMappedYet = 'cid$#3543095#',\n NumberOfBuckets = 'cid$#3543096#',\n OfMyListingQuality = 'cid$#3578041#',\n OnHoldBroadcastDisabled = 'cid$#3543097#',\n PandL = 'cid$#3543098#',\n PaymentAmountReceived = 'cid$#3578049#',\n PaymentCurrency = 'cid$#3578050#',\n PaymentReceived = 'cid$#3543099#',\n PaymentReference = 'cid$#3543100#',\n Override = 'cid$#3578047#',\n OverrideDate = 'cid$#3578048#',\n PendingPartnerIntegrations = 'cid$#3511873#',\n IncorrectCountryCode = 'cid$#3511874#',\n Members = 'cid$#3511875#',\n Permission_UpdateBuyerCommission = 'cid$#3543101#',\n Permission_UpdateBuyerCommissionOwned = 'cid$#3543102#',\n Permission_ConfirmRejectOnAssignedSales = 'cid$#3543103#',\n Permission_ConfirmRejectSale = 'cid$#3543104#',\n Permission_ConfirmRejectSaleOnPricedListings = 'cid$#3543105#',\n Permission_ConfirmRejectSalesFromPurchasedListings = 'cid$#3543106#',\n Permission_CreatePO = 'cid$#3543107#',\n Permission_FulfillSale = 'cid$#3543108#',\n Permission_FulfillSaleOnPricedListings = 'cid$#3543109#',\n Permission_FulfillSalesFromPurchasedListings = 'cid$#3543110#',\n Permission_ManageCreatedPlaceholderListings = 'cid$#3543111#',\n Permission_ManageOfflineSalesOnPurchasedListings = 'cid$#3543112#',\n Permission_ManagePlaceholderListings = 'cid$#3543113#',\n Permission_Predeliver = 'cid$#3543114#',\n Permission_PredeliverOnAssignedListings = 'cid$#3543115#',\n Permission_BroadcastUnbroadcastOnAssignedListings = 'cid$#3543116#',\n Permission_PredeliverPurchasedListings = 'cid$#3543117#',\n Permission_SetPriceOnAssignedListings = 'cid$#3543118#',\n Permission_UpdateCreatedReports = 'cid$#3543119#',\n Permission_UpdateInfoFromPurchasedListings = 'cid$#3543120#',\n Permission_UpdateInfoOnAssignedListings = 'cid$#3543121#',\n Permission_UpdateInfoOnAssignedSales = 'cid$#3543122#',\n Permission_UpdateInfoOnPricedListings = 'cid$#3543123#',\n Permission_UpdateInfoOnPurchasedListings = 'cid$#3543124#',\n Permission_UpdateTagsFromPricedListings = 'cid$#3543125#',\n Permission_UpdateTagsFromPurchasedListings = 'cid$#3543126#',\n Permission_UpdateTagsOnAssignedListings = 'cid$#3543127#',\n Permission_SetPriceOnPurchasedListings = 'cid$#3543128#',\n Permission_UpdateTagsOnAssignedSales = 'cid$#3543129#',\n Permission_UpdateTagsOnOwnedPurchasedOrder = 'cid$#3543130#',\n Permission_UpdateTagsOnPurchasedListings = 'cid$#3543132#',\n Permission_FulfillSalesOnAssignedSales = 'cid$#3543133#',\n Permission_ViewAssignedListings = 'cid$#3543134#',\n Permission_ViewAssignedSales = 'cid$#3543138#',\n Permission_ViewFulfillmentArtifactsOnAssignedListings = 'cid$#3543139#',\n Permission_ViewFulfillmentArtifactsOnAssignedSales = 'cid$#3543140#',\n Permission_ViewFulfillmentArtifactsOnPricedListings = 'cid$#3543141#',\n Permission_ViewFulfillmentArtifactsOnPurchasedListings = 'cid$#3543142#',\n Permission_ViewFulfillmentArtifactsOnSaleFromPricedListings = 'cid$#3543143#',\n Permission_ViewFulfillmentArtifactsOnSaleFromPurchasedListings = 'cid$#3543144#',\n Permission_ViewGlobalReports = 'cid$#3578091#',\n Permission_ViewOwnedPurchasedOrders = 'cid$#3543145#',\n Permission_ViewSaleFromPricedListings = 'cid$#3543146#',\n Permission_ViewPurchasedListings = 'cid$#3543147#',\n Permission_ViewRecentListings = 'cid$#3543148#',\n Permission_ViewRecentSales = 'cid$#3543149#',\n Permission_ViewSaleOnPurchasedListings = 'cid$#3543150#',\n Permission_Webhook_View = 'cid$#3543151#',\n Permission_Webhook_Create = 'cid$#3543152#',\n Permission_Webhook_Edit = 'cid$#3543153#',\n Placeholder = 'cid$#3511876#',\n PlaceholderPurchaseMessage = 'cid$#3511877#',\n POCreatedBy = 'cid$#3543154#',\n Priced = 'cid$#3543155#',\n ProvisionallySourced = 'cid$#3543156#',\n Purchases_UpdateBuyerCommissionOwned_Details = 'cid$#3543157#',\n Purchases_UpdateBuyerCommission_Details = 'cid$#3543158#',\n PutOnHold = 'cid$#3543159#',\n PutOnHoldAll = 'cid$#3543160#',\n PutOnHoldSelected = 'cid$#3543161#',\n RankPremium = 'cid$#3543162#',\n Reason = 'cid$#3543163#',\n RefreshNow = 'cid$#3543164#',\n RejectAllocation = 'cid$#3543165#',\n RejectAllocationWarning = 'cid$#3543166#',\n RejectionReasonInfoText1 = 'cid$#3543167#',\n RejectionReasonInfoText2 = 'cid$#3543168#',\n RelativeRankPremium = 'cid$#3543169#',\n RelativeTo = 'cid$#3543170#',\n RemoveHold = 'cid$#3543171#',\n RemovePredelivery = 'cid$#3543172#',\n RemoveTagValue = 'cid$#3543173#',\n RemoveTagValues = 'cid$#3543174#',\n ReportHistory = 'cid$#3543175#',\n SameOverrideExists = 'cid$#3578063#',\n Reports_ViewGlobalReports_Details = 'cid$#3578092#',\n SameSection = 'cid$#3543176#',\n SameZoneOrBetter = 'cid$#3811563#',\n SaveCopy = 'cid$#____SaveCopy#',\n Saved = 'cid$#____Saved#',\n SaveMapAs = 'cid$#3811564#',\n SaveSearch = 'cid$#____SaveSearch#',\n SaveSettingsToViewUpdatedComps = 'cid$#3543177#',\n SearchAndReplace = 'cid$#3578066#',\n SearchEventOrLookupId = 'cid$#3811565#',\n SearchFor = 'cid$#3578067#',\n SearchPurchases = 'cid$#____SearchPurchases#',\n SearchInventory = 'cid$#____SearchInventory#',\n SearchSales = 'cid$#____SearchSales#',\n SeatingMapped = 'cid$#3678570#',\n SeatRange = 'cid$#____SeatRange#',\n SectionClearingPrices = 'cid$#3678571#',\n SectionGroups = 'cid$#3678572#',\n SectionsAscToDesc = 'cid$#3811566#',\n SectionsDescToAsc = 'cid$#3811567#',\n SectionUnmapped = 'cid$#3811568#',\n SelectCountry = 'cid$#3811569#',\n SelectCity = 'cid$#3811570#',\n SelectedFrom = 'cid$#3811571#',\n SelectGroupToMoveTo = 'cid$#3811572#',\n SelectItemsForBulkEdit = 'cid$#3543178#',\n SelectQuantities = 'cid$#3811573#',\n SelectStateProvince = 'cid$#3811574#',\n SelectTag = 'cid$#3543179#',\n SellerError = 'cid$#3578068#',\n SellerFault = 'cid$#____SellerFault#',\n SellerRelationship = 'cid$#3578069#',\n SetActiveInGroup = 'cid$#3678573#',\n SetAFloor = 'cid$#3811575#',\n SetAPriceFloor = 'cid$#3811576#',\n SetDefaultDeliveryForNewPurchases = 'cid$#3811577#',\n SetDeliveryStrategy = 'cid$#3678574#',\n SetMapAsDefault = 'cid$#3811578#',\n SetMinimumGroupSize = 'cid$#3811579#',\n SetPriceFloor = 'cid$#____SetPriceFloor#',\n SetTicketTypePriority = 'cid$#3543180#',\n ShippingRefund = 'cid$#3578070#',\n ShowDetailedSettings = 'cid$#3543181#',\n Shown = 'cid$#____Shown#',\n ShownQty = 'cid$#3678575#',\n ShowSections = 'cid$#3811580#',\n ShowSectionsInfo = 'cid$#3811581#',\n ShuffleRanks = 'cid$#3543182#',\n SearchEvent = 'cid$#3543183#',\n SaveFilter = 'cid$#3578065#',\n SelectFilterValue = 'cid$#3578017#',\n Sides = 'cid$#3811582#',\n SideTier1 = 'cid$#3811583#',\n SideTier2 = 'cid$#3811584#',\n SignUpBannerTitle = 'cid$#3678576#',\n SignUpBannerSubTitle = 'cid$#3678577#',\n SignUpWelcomeSubtitle = 'cid$#3678578#',\n SimilarEventsDefaults = 'cid$#3811585#',\n SimulateWebsiteDiscount = 'cid$#3578071#',\n Skipped = 'cid$#3578072#',\n SOR = 'cid$#3811586#',\n Spacing = 'cid$#3511878#',\n SplitListing_AllowSplitSoldTickets = 'cid$#3811587#',\n SplitListing_DoNotAllowSplittingSoldTickets = 'cid$#3811588#',\n SplitZonesBy = 'cid$#3811589#',\n SportsOrConcertsWith360 = 'cid$#3678579#',\n SponsoredListings = 'cid$#3678580#',\n StopExperiment = 'cid$#3811590#',\n StubHubListings = 'cid$#3543184#',\n StubhubRecommended = 'cid$#3543185#',\n Submit = 'cid$#3678581#',\n Supply = 'cid$#3811591#',\n SuppressFor1HourV2 = 'cid$#3678582#',\n SyncFailedClickToRelist = 'cid$#3578074#',\n SyncFailedClickToDelist = 'cid$#3578073#',\n TableEditor = 'cid$#____TableEditor#',\n TagNameNotAllowed = 'cid$#3678583#',\n TargetPercentage = 'cid$#3678584#',\n TaxRefund = 'cid$#3578075#',\n Team = 'cid$#3543186#',\n TeamName = 'cid$#3511879#',\n Teams = 'cid$#3511880#',\n ProvisionalAllocation = 'cid$#3511881#',\n ThenBy = 'cid$#3543187#',\n ThenDefaultListingsTo = 'cid$#3811592#',\n ThenDefaultThePurchaseTo = 'cid$#3811593#',\n TheNextCheapest = 'cid$#3511882#',\n ThenSplitGroupsBy = 'cid$#3811594#',\n ThisFilterWillChangeMetrics = 'cid$#____ThisFilterWillChangeMetrics#',\n TicketCost = 'cid$#____TicketCost#',\n TicketDelivery = 'cid$#3678585#',\n TicketGroupBulkEditPurchaseWarning = 'cid$#3678586#',\n TicketId = 'cid$#3543188#',\n TicketGroupId = 'cid$#3543189#',\n TicketPrices = 'cid$#3811595#',\n TicketQty = 'cid$#____TicketQty#',\n TicketQuantity = 'cid$#3811596#',\n TicketsAllocated = 'cid$#3811597#',\n TicketsSoldAs = 'cid$#3811598#',\n TimeView = 'cid$#3678587#',\n Timezone = 'cid$#3578077#',\n TimezoneDefaultOption = 'cid$#3577972#',\n TimezoneDescription = 'cid$#3577959#',\n ToggleSelectionMode = 'cid$#3811599#',\n TooManyResultPerformanceWarning = 'cid$#3543190#',\n TotalCostOfUnsoldTickets = 'cid$#3578078#',\n TotalSplitInfo = 'cid$#3811600#',\n TurnOnAutoFulfillPrompt = 'cid$#3811601#',\n TypeYourNoteHere = 'cid$#3678588#',\n UnableToFindSale = 'cid$#____UnableToFindSale#',\n UndoCancel = 'cid$#3578081#',\n Ungrouped = 'cid$#3811602#',\n Unknown = 'cid$#3811603#',\n UnknownError = 'cid$#3811604#',\n UnexpectedErrorOccured = 'cid$#3811605#',\n UnlinkSale = 'cid$#____UnlinkSale#',\n UnlinkSaleAndPayment = 'cid$#____UnlinkSaleAndPayment#',\n UnlockCommission = 'cid$#3811606#',\n Unordered = 'cid$#3678589#',\n Unsold = 'cid$#3578083#',\n UnsoldEvents = 'cid$#3678590#',\n UnsoldProceeds = 'cid$#3578084#',\n UngroupListings = 'cid$#3543191#',\n UnsoldQuantitiesLowToHigh = 'cid$#3811607#',\n UnsoldQuantitiesHighToLow = 'cid$#3811608#',\n UnwasteTickets = 'cid$#____UnwasteTickets#',\n UnwasteTicketsConfirmation = 'cid$#____UnwasteTicketsConfirmation#',\n Update = 'cid$#3543192#',\n UpdateAllTicketGroupsUnderAssociatedPurchaseOrders = 'cid$#3811609#',\n UpdateAutoFulfill = 'cid$#3678591#',\n UpdateBuyerCommission = 'cid$#3543193#',\n UpdatedBy = 'cid$#3811610#',\n UpdateDeal = 'cid$#3811611#',\n UpdateDeliveryType = 'cid$#3678592#',\n UpdateDeliveryTypeForPlaceholders = 'cid$#3811612#',\n UpdateEventIdWarning = 'cid$#3543194#',\n UpdateExistingListings = 'cid$#3811613#',\n UpdateExistingPurchasesAndListings = 'cid$#3811614#',\n UpdateFulfillmentSettings = 'cid$#3678593#',\n UpdateFulfillmentSettingsMessage = 'cid$#3678594#',\n UpdateExistingListingsAndAssociatedSales = 'cid$#3678595#',\n UpdateFulfillmentSettingsMessagePurchase = 'cid$#3811615#',\n UpdateMarketplacePrices = 'cid$#3678605#',\n UpdateMarketplaceSeating = 'cid$#3543195#',\n UpdateMode = 'cid$#3578085#',\n UpdatePriceEvery = 'cid$#3578086#',\n UpdatePriceFloorCeiling = 'cid$#3578087#',\n UpdatePrivateNotes = 'cid$#3578088#',\n UpdatePurchaseCurrency = 'cid$#3811616#',\n UpdatePurchasedBy = 'cid$#3811617#',\n UpdatePurchaseWithMergedListing = 'cid$#3678606#',\n UpdatePurchaseWithMergedListingWarning = 'cid$#3409266#',\n UpdateAssociatedSales = 'cid$#3678607#',\n UpdateSeatTraits = 'cid$#3678608#',\n UpdateSeatTraitsForPlaceholders = 'cid$#3811618#',\n UpdateSelectedTicketGroupsOnly = 'cid$#3811619#',\n UpdateTagValue = 'cid$#3543196#',\n UpdateTagValues = 'cid$#3543197#',\n UpdateTagValuesSelected = 'cid$#3543198#',\n UpdateTagValueWarning = 'cid$#3543199#',\n UploadPredelivery = 'cid$#3678609#',\n UploadSeatScoreModelInfo = 'cid$#3543200#',\n UseAbsoluteFloors = 'cid$#3811620#',\n UseAsTemplate = 'cid$#3543201#',\n UserAlreadySelected = 'cid$#____UserAlreadySelected#',\n UseZoneMap = 'cid$#3811621#',\n UseZoneMapDisabledTip = 'cid$#____UseZoneMapDisabledTip#',\n Values = 'cid$#____Values#',\n Velocity = 'cid$#3678610#',\n VelocityHours = 'cid$#3678611#',\n VendorGroup = 'cid$#3811622#',\n VendorManagement = 'cid$#3811623#',\n VendorPayments = 'cid$#3811624#',\n VenueConfiguration = 'cid$#3678612#',\n VenueGeometry = 'cid$#3678613#',\n VenueRowData = 'cid$#3811625#',\n VenueSpecific = 'cid$#3678614#',\n VersionMismatch = 'cid$#3511883#',\n VersionMismatchExplanation = 'cid$#3511884#',\n HideAdvancedSettings = 'cid$#3543202#',\n MissingHeightData = 'cid$#3543203#',\n MissingDistanceData = 'cid$#3543204#',\n MissingAngleData = 'cid$#3543205#',\n RequestState = 'cid$#3512118#',\n SeeAdvancedSettings = 'cid$#3543206#',\n FulfillOnStubHub = 'cid$#3110498#',\n FulfillOnViagogo = 'cid$#3110499#',\n FulfilledExternalMarketplace = 'cid$#2985799#',\n Fulfillment = 'cid$#3678615#',\n FulfillmentFailed = 'cid$#2975365#',\n Fulfilled = 'cid$#3453433#',\n FullSeating = 'cid$#3373005#',\n FullySold = 'cid$#3180443#',\n FutureEvents = 'cid$#2978865#',\n General = 'cid$#3511885#',\n GeneralAdmissionEvent = 'cid$#3243220#',\n GeneralAdmissionMessage = 'cid$#3243221#',\n GeneralMessage = 'cid$#3344393#',\n GeneralSettingsAll = 'cid$#3453434#',\n GeneralSettingsSelected = 'cid$#3453435#',\n GenericActionFailure = 'cid$#2987016#',\n Genre = 'cid$#3396831#',\n GoBack = 'cid$#3261252#',\n GoTo = 'cid$#3082883#',\n GoToMessageThread = 'cid$#3389347#',\n Group = 'cid$#3396832#',\n GroupBy = 'cid$#3389348#',\n GroupingDefault = 'cid$#3361787#',\n GroupingTemplate = 'cid$#3396833#',\n GroupListings = 'cid$#3317881#',\n HasBroadcastError = 'cid$#3172455#',\n HasUnsoldTickets = 'cid$#3172456#',\n HeatMap = 'cid$#3269690#',\n HeatMapInstruction1 = 'cid$#3269691#',\n HeatMapInstruction2 = 'cid$#3269692#',\n Height = 'cid$#3288922#',\n HeldUntil = 'cid$#3511886#',\n HeldUntilDate = 'cid$#3511887#',\n HiddenDueToFilter = 'cid$#3317882#',\n HideSeats = 'cid$#3038741#',\n High = 'cid$#3288923#',\n Highest = 'cid$#3389349#',\n HistoricalPricing = 'cid$#3389350#',\n Hold = 'cid$#3110500#',\n HoldExpiration = 'cid$#3172457#',\n HoldId = 'cid$#3453436#',\n HoldNote = 'cid$#3511888#',\n Home = 'cid$#2983461#',\n HoverZoomETicketIns = 'cid$#2975352#',\n HoverZoomQRCodeIns = 'cid$#3511889#',\n HowDidYouPay = 'cid$#3042372#',\n HowItWorks = 'cid$#3269693#',\n Hyperlink = 'cid$#3432356#',\n Icon = 'cid$#3389351#',\n Id = 'cid$#3172458#',\n Importance = 'cid$#3288924#',\n In = 'cid$#3396834#',\n InactiveListings = 'cid$#3344394#',\n Inbox = 'cid$#3317883#',\n IncludeInColumns = 'cid$#3396835#',\n IncludeInReport = 'cid$#3396836#',\n InclusiveOption = 'cid$#3317884#',\n InComparableZones = 'cid$#3772730#',\n Increase = 'cid$#3361788#',\n IncreaseDecreasePriceByPercentAllVisible = 'cid$#3408179#',\n IncreasePriceByPercent = 'cid$#3180444#',\n IncreasePriceByPercentAll = 'cid$#3344395#',\n IncreasePriceByPercentAllVisible = 'cid$#3389352#',\n IncreasePriceByPercentSelected = 'cid$#3344396#',\n IncreasePriceForAll = 'cid$#3511891#',\n IncreasePriceForSelected = 'cid$#3511892#',\n Ineligible = 'cid$#3453437#',\n Info = 'cid$#3408180#',\n InHandDate = 'cid$#3195380#',\n InHandDateMustBeBeforeEventDate = 'cid$#3237716#',\n Inherit = 'cid$#3361789#',\n InSection = 'cid$#3361790#',\n InMyGroup = 'cid$#3361791#',\n Insert = 'cid$#3361792#',\n InsufficientComparables = 'cid$#3291918#',\n Integer = 'cid$#3373006#',\n InTransit = 'cid$#3453438#',\n InUse = 'cid$#3408181#',\n InvalidFormula = 'cid$#3361793#',\n Inventory_AddSeatSaver_Details = 'cid$#3511893#',\n Inventory_AddTagType_Details = 'cid$#3511894#',\n Inventory_BroadcastUnbroadcast_Details = 'cid$#3511895#',\n Inventory_BroadcastUnbroadcastOnIsPricerOf_Details = 'cid$#3511896#',\n Inventory_BroadcastUnbroadcastOnPurchasedBy_Details = 'cid$#3511897#',\n Inventory_EditPricing_Details = 'cid$#3511898#',\n Inventory_ManageSeatSaver_Details = 'cid$#3511899#',\n Inventory_ManageSeatSaverCreatedBy_Details = 'cid$#3511900#',\n Inventory_Predelivery_Details = 'cid$#3511901#',\n Inventory_PredeliveryOnIsPricerOf_Details = 'cid$#3511902#',\n Inventory_PredeliveryOnPurchasedBy_Details = 'cid$#3511903#',\n Inventory_SetPrice_Details = 'cid$#3511904#',\n Inventory_SetPriceOnIsPricerOf_Details = 'cid$#3511905#',\n Inventory_SetPriceOnPurchasedBy_Details = 'cid$#3511906#',\n Inventory_UpdateListingInfo_Details = 'cid$#3511907#',\n Inventory_UpdateListingInfoOnIsPricerOf_Details = 'cid$#3511908#',\n Inventory_UpdateListingInfoOnPurchasedBy_Details = 'cid$#3511909#',\n Inventory_UpdateTags_Details = 'cid$#3511910#',\n Inventory_UpdateTagsOnIsPricerOf_Details = 'cid$#3511911#',\n Inventory_UpdateTagsOnPurchasedBy_Details = 'cid$#3511912#',\n Inventory_ViewAll_Details = 'cid$#3511913#',\n Inventory_ViewAllMarketplaceAttributes_Details = 'cid$#3511914#',\n Inventory_ViewExternalMarketplaceAttributes_Details = 'cid$#3511915#',\n Inventory_ViewFulfillmentArtifacts_Details = 'cid$#3511916#',\n Inventory_ViewFulfillmentArtifactsOnIsPricerOf_Details = 'cid$#3511917#',\n Inventory_ViewFulfillmentArtifactsOnPurchasedBy_Details = 'cid$#3511918#',\n Inventory_ViewListingOnIsPricerOf_Details = 'cid$#3511919#',\n Inventory_ViewListingsOnPurchasedBy_Details = 'cid$#3511920#',\n Inventory_ViewRecent_Details = 'cid$#3511921#',\n Inventory_ViewRecentFromExternalMarketplace_Details = 'cid$#3511922#',\n Invited = 'cid$#3373007#',\n InZone = 'cid$#3361794#',\n IPaidFace = 'cid$#3037581#',\n IgnoreSoldTickets = 'cid$#3059985#',\n ImPricing = 'cid$#3089842#',\n Impersonate = 'cid$#3024378#',\n InApp = 'cid$#3054265#',\n InHand = 'cid$#2971933#',\n InHandDaysBeforeEvent = 'cid$#3263674#',\n InOneDay = 'cid$#2993454#',\n IncompatibleForMergingWithSelectedListings = 'cid$#3067705#',\n InvalidEndDate = 'cid$#3004079#',\n InvalidStartDate = 'cid$#3004078#',\n InvalidUrl = 'cid$#2972956#',\n Inventory = 'cid$#2972941#',\n IsGlobal = 'cid$#3172459#',\n ItemName = 'cid$#3453439#',\n ItemsPerPage = 'cid$#3396837#',\n IWorkForViagogo = 'cid$#3180445#',\n IWorkForEventOrganizer = 'cid$#3180446#',\n IsThisASpeculativeListing = 'cid$#3180447#',\n Json = 'cid$#3373008#',\n Junk = 'cid$#3261253#',\n JustNow = 'cid$#3396838#',\n Key = 'cid$#3373009#',\n Language = 'cid$#3408182#',\n Last1Hour = 'cid$#3678616#',\n Last30Days = 'cid$#3110502#',\n LastPriceUpdatedDate = 'cid$#3361795#',\n LastSaleDates = 'cid$#3511923#',\n LastUpdatedOn = 'cid$#3511924#',\n LastWeek = 'cid$#3110501#',\n LastYear = 'cid$#3037592#',\n LeastRecent = 'cid$#3172460#',\n LeftToSell = 'cid$#3185871#',\n LessSales = 'cid$#3701362#',\n LiftPercentage = 'cid$#3261254#',\n Light = 'cid$#3408183#',\n Link = 'cid$#3344397#',\n LinkCopied = 'cid$#3172461#',\n LinkHasBeenCopiedToClipboard = 'cid$#3172462#',\n List = 'cid$#3034669#',\n /**\n * @deprecated Unused\n */\n ListAndAllInPriceError = 'cid$#3050639#',\n Listed = 'cid$#3172463#',\n ListedAverageTicketPrice = 'cid$#3389353#',\n ListedQty = 'cid$#3261255#',\n ListedATP = 'cid$#3261256#',\n ListedQuantity = 'cid$#3453440#',\n ListedToViagogoSuccessfully = 'cid$#3172464#',\n Listing = 'cid$#3041868#',\n ListingConfirmation = 'cid$#3172465#',\n ListedClickToDelist = 'cid$#3180448#',\n ListingClickToCancel = 'cid$#3180450#',\n ListingFailed = 'cid$#3172466#',\n ListingFailedClickToTryAgain = 'cid$#3180449#',\n ListingFullSoldNoActionAvailable = 'cid$#3180451#',\n ListingId = 'cid$#3038734#',\n ListingNumberUsedRequired = 'cid$#3059986#',\n ListingPending = 'cid$#3172467#',\n Listings = 'cid$#3037582#',\n ListingSettings = 'cid$#3453441#',\n ListingSettingsAllVisible = 'cid$#3453442#',\n /**\n * @deprecated Use `ContentId.Proceeds`\n */\n ListPrice = 'cid$#3389354#',\n /**\n * @deprecated Unused\n */\n ListPriceAutoCalculationInfo = 'cid$#3180452#',\n ListPriceLessThanPriceFloorWarning = 'cid$#3217859#',\n /**\n * @deprecated Use `ContentId.ProceedsPerTicket`\n */\n ListPricePerTicket = 'cid$#3389355#',\n Location = 'cid$#3511925#',\n Login = 'cid$#2972942#',\n Logout = 'cid$#2972943#',\n LookupByListingId = 'cid$#3037588#',\n LookupByOrderId = 'cid$#3037589#',\n LookupBySaleId = 'cid$#2971992#',\n Low = 'cid$#3288925#',\n Lowest = 'cid$#3389356#',\n ManualPriceWarning = 'cid$#3373010#',\n ManualPriceDisableAutoPricingWarning = 'cid$#3373011#',\n ManualPriceAdjustFloorWarning = 'cid$#3373012#',\n ManualPriceAdjustCeilingWarning = 'cid$#3373013#',\n Mapped = 'cid$#3038735#',\n MappedEventId = 'cid$#3361796#',\n MappedTo = 'cid$#2975417#',\n MapUnavailable = 'cid$#3261257#',\n Margin = 'cid$#2973459#',\n MarkAsPurchase = 'cid$#3344398#',\n MarkAsPrivate = 'cid$#3344399#',\n MarkAsJunk = 'cid$#3344400#',\n MarkAsSale = 'cid$#3344401#',\n MarkAsTransfer = 'cid$#3361797#',\n MarketListings = 'cid$#3269694#',\n Marketplace = 'cid$#3389357#',\n MarketplaceEnableConfirmMessage = 'cid$#3678617#',\n MarketplaceDisableConfirmMessage = 'cid$#3678618#',\n MarketplacePaymentTerms = 'cid$#3511926#',\n MarketplaceSeatingForAll = 'cid$#3389358#',\n MarketplaceInhandDate = 'cid$#3172468#',\n MarketplaceSeatingForAllVisible = 'cid$#3432357#',\n MarketplaceSeatingForSelected = 'cid$#3396839#',\n MarketplaceVisibility = 'cid$#3511927#',\n MarketPrice = 'cid$#3389359#',\n Markup = 'cid$#3214287#',\n Max = 'cid$#3678619#',\n MaxDiscountInputPrompt1 = 'cid$#3288926#',\n MaxDiscountInputPrompt2 = 'cid$#3288927#',\n MaxDiscountInputPrompt3 = 'cid$#3288928#',\n MaxHoldDuration = 'cid$#3689889#',\n MaxHoldDurationUnit = 'cid$#3689890#',\n MaxValueLengthExceeded = 'cid$#3373014#',\n Median = 'cid$#3389360#',\n MemberCard = 'cid$#3054267#',\n Merchant = 'cid$#2972947#',\n Merge = 'cid$#3038742#',\n MergeListings = 'cid$#3067706#',\n MergeListings_DeliveryDifference = 'cid$#3067709#',\n MergeListings_GroupedListings = 'cid$#3317885#',\n MergeListings_RowDifference = 'cid$#3067708#',\n MergeListings_SectionDifference = 'cid$#3067707#',\n Merges = 'cid$#3453443#',\n MergeSelected = 'cid$#3453444#',\n MergeSuggested = 'cid$#3453445#',\n Messages = 'cid$#3172469#',\n Metrics = 'cid$#3389361#',\n MetricView = 'cid$#3269695#',\n MicrosoftExcelExt = 'cid$#3511928#',\n Min = 'cid$#3678620#',\n MinCompListingCount = 'cid$#3389362#',\n MissingRowDataWarning = 'cid$#3453447#',\n MissingSeatScore = 'cid$#3361798#',\n MissingSectionFilter = 'cid$#3453448#',\n MissingUnitCost = 'cid$#3361799#',\n MissingZone = 'cid$#3361800#',\n MLB = 'cid$#3511929#',\n MoneyOrder = 'cid$#3054258#',\n Month = 'cid$#3396840#',\n MoreSales = 'cid$#3701363#',\n MostRecent = 'cid$#3172470#',\n MultiplePayments = 'cid$#3034805#',\n MultipleSelections = 'cid$#3067720#',\n MyAccount = 'cid$#2972944#',\n MyListings = 'cid$#3802263#',\n MyTicketsHaveRowsAndSeats = 'cid$#2972044#',\n NA = 'cid$#2975887#',\n NameColumnPlaceholder = 'cid$#3361801#',\n Near = 'cid$#3288929#',\n NearestEvent = 'cid$#3185869#',\n NeverShareYourPasswordWithAnyone = 'cid$#3408184#',\n NewFeature = 'cid$#3432358#',\n NewGroup = 'cid$#3361802#',\n NewModel = 'cid$#3317886#',\n NewOrder = 'cid$#3261258#',\n NewRole = 'cid$#3511930#',\n NewRow = 'cid$#3317887#',\n NewSale = 'cid$#3344402#',\n NewSales = 'cid$#3214289#',\n NewUser = 'cid$#3373015#',\n NewVendor = 'cid$#3396841#',\n Next2Weeks = 'cid$#3172471#',\n NextWeek = 'cid$#3172472#',\n NextMonth = 'cid$#3172473#',\n NextYear = 'cid$#3172474#',\n Name = 'cid$#3054259#',\n NeedFulfillment = 'cid$#3110503#',\n NeedToMergeToTwoOrMoreListings = 'cid$#3067710#',\n NeedToSplitToTwoOrMoreListings = 'cid$#3059987#',\n Next = 'cid$#2971948#',\n No = 'cid$#3038736#',\n NoActiveAccountsForLogin = 'cid$#3511931#',\n NoActivityLog = 'cid$#3172475#',\n NoAutoPricing_MissingPermission = 'cid$#3408185#',\n NoAutoPricing_MissingRowId = 'cid$#3408186#',\n NoAutoPricing_NoVenueConfig = 'cid$#3408187#',\n NoConversation = 'cid$#3317888#',\n NoEventsMatching = 'cid$#3269696#',\n NoFilteredNotifications = 'cid$#3214290#',\n NoGroupingAvailableForDefault = 'cid$#3361803#',\n NoMergesAvailable = 'cid$#3453449#',\n NoneSelected = 'cid$#3389363#',\n NoNotifications = 'cid$#3172476#',\n NoPerformersMatching = 'cid$#3110504#',\n NoReportText = 'cid$#3511933#',\n NoResultFound = 'cid$#3110505#',\n NormalOption = 'cid$#3317889#',\n NoSeatingsAvailableForAllocation = 'cid$#3237717#',\n NoTagsExist = 'cid$#3389364#',\n NoTaxes = 'cid$#3037583#',\n NotificationTypeAutopriceBelowFloor = 'cid$#3180459#',\n NotificationTypeAutopriceInsufficientCompListings = 'cid$#3180460#',\n NotificationTypeAutopriceFirebrake = 'cid$#3180461#',\n NotImplemented = 'cid$#3201696#',\n NoToAll = 'cid$#3180458#',\n NoVenueMetadataForAutopricing = 'cid$#3288930#',\n NoVenuesMatching = 'cid$#3110506#',\n None = 'cid$#3043872#',\n NotBroadcastOnAnyMarketplace = 'cid$#3050640#',\n Notes = 'cid$#2982701#',\n Notifications = 'cid$#3082884#',\n NotificationTypeListingHideSeatsFailed = 'cid$#3180453#',\n NotificationTypeListingMergeFailed = 'cid$#3180455#',\n NotificationTypeListingSplitFailed = 'cid$#3180456#',\n NotificationTypeListingUpdateDeliveryTypeFailed = 'cid$#3180454#',\n NotificationTypeSaleFulfilmentFailed = 'cid$#3180462#',\n NotificationTypeSaleMarketplaceCancelled = 'cid$#3180463#',\n NotificationTypeSaleNew = 'cid$#3180457#',\n Now = 'cid$#3008679#',\n NumberFormat = 'cid$#3361804#',\n NumberOfItemsPerPage = 'cid$#3396842#',\n NumberOfTicketsHeld = 'cid$#3511934#',\n NumOfListingsToCreate = 'cid$#3059988#',\n Odds = 'cid$#3678621#',\n Off = 'cid$#3344403#',\n OfSimilarQuality = 'cid$#3361805#',\n OfSimilarQualityInZone = 'cid$#3389365#',\n OfSimilarQualityQuantityAdjusted = 'cid$#3389366#',\n OfTheComparableListings = 'cid$#3389367#',\n OK = 'cid$#2973471#',\n OlderThanLastYear = 'cid$#3037593#',\n On = 'cid$#3344404#',\n OneDayBeforeEvent = 'cid$#3082886#',\n OnePayment = 'cid$#3034806#',\n OneTimePass = 'cid$#3344405#',\n OneWeekBeforeEvent = 'cid$#3082887#',\n OnlySingleValueIsAllowed = 'cid$#3389368#',\n Oops = 'cid$#2973468#',\n OpenEventPage = 'cid$#3261259#',\n OpenReport = 'cid$#3408188#',\n Opponent = 'cid$#3678622#',\n Or = 'cid$#2971951#',\n OrAbove = 'cid$#3389369#',\n OrderDate = 'cid$#2971932#',\n OrderId = 'cid$#3037595#',\n OrderIdDoesNotExist = 'cid$#3344406#',\n OrderIdDoesNotExistForVendor = 'cid$#3373016#',\n OrderIdInUse = 'cid$#3175911#',\n OrderIdInUseSameVendor = 'cid$#3361806#',\n Orders = 'cid$#3037598#',\n Original = 'cid$#3034666#',\n Other = 'cid$#2976486#',\n OtherMarketplaceContact = 'cid$#3344408#',\n Outlier = 'cid$#3373017#',\n OutlierFiltering = 'cid$#3317890#',\n OutlierMode = 'cid$#3317891#',\n OutstandingBalance = 'cid$#3511936#',\n Overview = 'cid$#3453450#',\n Owner = 'cid$#3389370#',\n Pagination = 'cid$#3408189#',\n Paid = 'cid$#2977304#',\n PaidOffline = 'cid$#2977305#',\n Pairs = 'cid$#3047495#',\n Paper = 'cid$#2976485#',\n ParentListing = 'cid$#3344409#',\n PartiallyPaid = 'cid$#3037600#',\n Password = 'cid$#3344410#',\n PastEvents = 'cid$#2978866#',\n PastWeek = 'cid$#3172477#',\n PastMonth = 'cid$#3172478#',\n PastYear = 'cid$#3172479#',\n Payment = 'cid$#2973460#',\n PaymentAccount = 'cid$#3054260#',\n PaymentDate = 'cid$#3037594#',\n PaymentMethod = 'cid$#3172480#',\n PaymentMethodUsed = 'cid$#3034807#',\n PaymentMethods = 'cid$#3054261#',\n PaymentPostEvent = 'cid$#3511937#',\n PaymentState = 'cid$#3037597#',\n Payments = 'cid$#3034862#',\n PaymentType = 'cid$#3578051#',\n PaymentUponSaleConfirmation = 'cid$#3511938#',\n PaymentUponDelivery = 'cid$#3511939#',\n PdfExt = 'cid$#3511940#',\n Pending = 'cid$#3408190#',\n PendingConfirmation = 'cid$#2975362#',\n PendingFulfillment = 'cid$#2975363#',\n PendingRejection = 'ckd$#2988325#',\n PaymentPending = 'cid$#3172481#',\n PendingPickup = 'cid$#3453451#',\n PendingQC = 'cid$#3432359#',\n PendingRefulfillment = 'cid$#3511941#',\n PendingReview = 'cid$#3511942#',\n PendingSourcing = 'cid$#3453452#',\n PeopleWithAccess = 'cid$#3432360#',\n Percentage = 'cid$#3180464#',\n Performer = 'cid$#3389371#',\n PerformerAndVenue = 'cid$#3396843#',\n PerformerAtVenue = 'cid$#3396844#',\n Permission = 'cid$#3511943#',\n Permission_AddSeatSaver = 'cid$#3511944#',\n Permission_AddTagType = 'cid$#3511945#',\n Permission_CreateOfflineSale = 'cid$#3511946#',\n Permission_ManageOfflineSale = 'cid$#3511947#',\n Permission_ConfirmTransferWithoutProof = 'cid$#3511949#',\n Permission_ResetFulfillment = 'cid$#3511950#',\n Permission_ConfigurePricing = 'cid$#3511953#',\n Permission_UpdateTags = 'cid$#3511954#',\n Permission_CreateReports = 'cid$#3511969#',\n Permission_UpdateReports = 'cid$#3511970#',\n Permission_UpdateReportsOwned = 'cid$#3511971#',\n Permission_ViewAll = 'cid$#3511972#',\n Permission_ViewExternalMarketplaceAttributes = 'cid$#3511973#',\n Permission_ViewInventoryReports = 'cid$#3511980#',\n Permission_ViewRecent = 'cid$#3511981#',\n Permission_ViewRecentFromExternalMarketplace = 'cid$#3511982#',\n Permission_CreateForExternalMarketplaces = 'cid$#3511985#',\n Permission_ViewProceeds = 'cid$#3511986#',\n Permission_ViewRecentProceeds = 'cid$#3511987#',\n Permission_ViewCostAndMargin = 'cid$#3511988#',\n Permission_ViewPaymentState = 'cid$#3511989#',\n Permission_ViewFulfillmentArtifacts = 'cid$#3511990#',\n Permission_ViewAllMarketplaceAttributes = 'cid$#3511991#',\n Permission_SetPrice = 'cid$#3511992#',\n Permission_BroadcastUnbroadcast = 'cid$#3511996#',\n Permission_BroadcastUnbroadcastOnPurchasedBy = 'cid$#3511997#',\n Permission_UpdateInfo = 'cid$#3511998#',\n Permission_Administration = 'cid$#3512000#',\n Permission_Create = 'cid$#3512001#',\n Permission_ManageHolds = 'cid$#3512002#',\n Permission_ViewSalesReports = 'cid$#3512003#',\n Permissions = 'cid$#3512004#',\n PermissionsRequiredMessage = 'cid$#3512005#',\n PerPayment = 'cid$#3084141#',\n Performers = 'cid$#2971928#',\n Phone = 'cid$#3237718#',\n PreDelivered = 'cid$#3038737#',\n Premium = 'cid$#3344411#',\n Preview = 'cid$#2975373#',\n Price = 'cid$#3453453#',\n PriceAboveCeiling = 'cid$#3291915#',\n PriceBelowFloor = 'cid$#3291914#',\n PriceBelowMaxAllowedDrop = 'cid$#3291916#',\n PriceBy = 'cid$#3389372#',\n PriceByMarketplace = 'cid$#3361807#',\n PricedBy = 'cid$#3453454#',\n PriceMustBeBetweenFloorAndCeiling = 'cid$#3361808#',\n PriceCeiling = 'cid$#3261260#',\n PriceEqualsLastPrice = 'cid$#3291917#',\n PriceFloor = 'cid$#3214291#',\n Pricer = 'cid$#3038738#',\n Prices = 'cid$#3082888',\n PriceZeroUnbroadcastWarning = 'cid$#3172491#',\n Pricing = 'cid$#3034667#',\n PricingDetails = 'cid$#3269705#',\n PricingHistory = 'cid$#3389373#',\n PricingProtection = 'cid$#3361809#',\n Private = 'cid$#3317892#',\n PrivateNote = 'cid$#3389374#',\n Proceeds = 'cid$#2971936#',\n ProceedsFloor = 'cid$#3408191#',\n ProceedsCeiling = 'cid$#3408192#',\n ProceedsPerTicket = 'cid$#3389375#',\n Processing = 'cid$#3453455#',\n ProcessingFulfillment = 'cid$#2988326#',\n Processor = 'cid$#3408193#',\n Profit = 'cid$#3261261#',\n ProofOfPurchase = 'cid$#3512006#',\n ProofOfPurchasedInstruction = 'cid$#3512007#',\n ProofOfPurchasedRequired = 'cid$#3578057#',\n ProofOfPurchasedRequiredMessage = 'cid$#3512009#',\n ProvideTransferImageProofInstruction = 'cid$#2972048#',\n ProvideTransferProofIdInstruction = 'cid$#3221222#',\n ProvideTransferUrlInstruction = 'cid$#2972049#',\n Purchase = 'cid$#3034661#',\n PurchaseCancelled = 'cid$#3344412#',\n PurchaseDate = 'cid$#3037591#',\n PurchaseDates = 'cid$#3034662#',\n PurchasedBy = 'cid$#3175836#',\n PurchaseDetails = 'cid$#3512010#',\n PurchaseHaveNoListings = 'cid$#3070956#',\n PurchaseHaveNoSales = 'cid$#3070955#',\n PurchaseId = 'cid$#3453456#',\n Purchases = 'cid$#2971926#',\n Purchases_AddTagType_Details = 'cid$#3512011#',\n Purchases_Create_Details = 'cid$#3512012#',\n Purchases_Edit_Details = 'cid$#3512013#',\n Purchases_EditOwned_Details = 'cid$#3512014#',\n Purchases_UpdateTags_Details = 'cid$#3512015#',\n Purchases_UpdateTagsOwned_Details = 'cid$#3512016#',\n Purchases_ViewAll_Details = 'cid$#3512017#',\n Purchases_ViewOwned_Details = 'cid$#3512018#',\n Purchases_ViewRecent_Details = 'cid$#3512019#',\n PurchaseSettings = 'cid$#3453457#',\n PurchaseSettingsAllVisible = 'cid$#3453458#',\n QRCode = 'cid$#3512020#',\n QualityControl = 'cid$#3408194#',\n QualityControlState = 'cid$#3408195#',\n QualityOfComparableListings = 'cid$#3361810#',\n Quantity = 'cid$#2971931#',\n QuantityAbbreviated = 'cid$#2988327#',\n QuantityAdjustedVenueWideQualityScore = 'cid$#3389376#',\n QuantityAvailablePremiums = 'cid$#3408196#',\n QuantityScore = 'cid$#3396845#',\n QueuedForPayment = 'cid$#2977306#',\n QuickFilters = 'cid$#3110507#',\n RandomizeRankForEachEvents = 'cid$#3396846#',\n Rank = 'cid$#3217858#',\n Readonly = 'cid$#3389377#',\n RecentlyCategorized = 'cid$#3344413#',\n RecentlySold = 'cid$#3110508#',\n RecentSales = 'cid$#3361811#',\n Recommended = 'cid$#3201697#',\n Reduce = 'cid$#3361812#',\n Reference = 'cid$#3432361#',\n RefundNeeded = 'cid$#3082889#',\n Refunded = 'cid$#3041865#',\n RejectSale = 'cid$#2972037#',\n RejectSaleWarning = 'cid$#2973463#',\n Rejected = 'cid$#2977036#',\n ReleaseNotes = 'cid$#3432362#',\n Reload = 'cid$#2973472#',\n Remaining = 'cid$#3034663#',\n Remove = 'cid$#2988328#',\n RemoveAccess = 'cid$#3432363#',\n RemoveBarcodes = 'cid$#3453459#',\n RemoveHoldAll = 'cid$#3512022#',\n RemoveHoldSelected = 'cid$#3512023#',\n RemoveHoldVisible = 'cid$#3512024#',\n RemovePayment = 'cid$#3041866#',\n RemovePredeliveredArtifacts = 'cid$#3453460#',\n RemovePdfs = 'cid$#3453461#',\n RemovePredeliveredArtifactsAll = 'cid$#3453462#',\n RemovePredeliveredArtifactsAllVisible = 'cid$#3453463#',\n RemovePredeliveredArtifactsSelected = 'cid$#3453464#',\n RemovePredeliveredArtifactsWarning = 'cid$#3453465#',\n RemoveTag = 'cid$#3432364#',\n RemoveTagValuesAllVisible = 'cid$#3432366#',\n RemoveTagValuesSelected = 'cid$#3432367#',\n RenewAccessToken = 'cid$#3432368#',\n Reply = 'cid$#3317893#',\n Reporter = 'cid$#3512025#',\n Reporting = 'cid$#3396847#',\n ReportName = 'cid$#3432369#',\n Reports = 'cid$#2971927#',\n Reports_CreateReports_Details = 'cid$#3512026#',\n Reports_UpdateReports_Details = 'cid$#3512027#',\n Reports_UpdateReportsOwned_Details = 'cid$#3512028#',\n Reports_ViewAll_Details = 'cid$#3512029#',\n Reports_ViewInventoryReports_Details = 'cid$#3512030#',\n Reports_ViewSalesReports_Details = 'cid$#3512031#',\n ReprocessEmail = 'cid$#3389378#',\n RequestEvent = 'cid$#3067711#',\n RequestPasswordResetEmail = 'cid$#3432370#',\n Required = 'cid$#2972951#',\n RequiredFieldsError = 'cid$#3067712#',\n Reset = 'cid$#3084142#',\n ResetAll = 'cid$#2988460#',\n ResetFulfillment = 'cid$#3512032#',\n ResetFulfillmentWarning = 'cid$#3512033#',\n ResetListings = 'cid$#3070957#',\n ResetListingsDeleteWarning = 'cid$#3070958#',\n ResetSettings = 'cid$#3408197#',\n RestorePurchase = 'cid$#3453466#',\n RestrictTo = 'cid$#3512034#',\n RestrictSelection = 'cid$#3512035#',\n RestrictToSameZone = 'cid$#3772208#',\n RestrictPriceDropVelocity = 'cid$#3796803#',\n RetrievingBuyersInfo = 'cid$#3082890#',\n Retry = 'cid$#3344414#',\n ReuploadBarcodes = 'cid$#3201698#',\n ReuploadETickets = 'cid$#3201699#',\n ReuploadProof = 'cid$#3512036#',\n ReuploadQRCodes = 'cid$#3512037#',\n ReuploadTicketUrls = 'cid$#3389379#',\n ReuploadTicketIds = 'cid$#3389380#',\n Revenue = 'cid$#3261262#',\n ReviewAllocation = 'cid$#3453467#',\n RightNow = 'cid$#3678623#',\n Role = 'cid$#3373018#',\n Role_AutoFulfill_Details = 'cid$#3512038#',\n Role_AutoPO_Details = 'cid$#3512039#',\n Role_AutoPricer_Details = 'cid$#3512040#',\n Role_Buyer_Details = 'cid$#3512041#',\n Role_Finance_Details = 'cid$#3512042#',\n Role_Fulfillment_Details = 'cid$#3512043#',\n Role_Owner_Details = 'cid$#3512044#',\n Role_Pricer_Details = 'cid$#3512045#',\n Role_Processor_Details = 'cid$#3512046#',\n Role_Reporter_Details = 'cid$#3512047#',\n Roles = 'cid$#3512048#',\n RoleWithUsersCannotBeDeleted = 'cid$#3512049#',\n Row = 'cid$#2971943#',\n RowExtrapolation = 'cid$#3261263#',\n RowScore = 'cid$#3317894#',\n Sale = 'cid$#2980585#',\n SaleCancelled = 'cid$#3344415#',\n SaleConflictWarning = 'cid$#2973470#',\n SaleDate = 'cid$#3453468#',\n SaleId = 'cid$#2972945#',\n Sales = 'cid$#2971925#',\n Sales_AddTagType_Details = 'cid$#3512050#',\n Sales_ConfirmReject_Details = 'cid$#3512051#',\n Sales_ConfirmRejectOnIsFulfillerOf_Details = 'cid$#3512052#',\n Sales_ConfirmRejectOnIsPricerOf_Details = 'cid$#3512053#',\n Sales_ConfirmRejectOnPurchasedBy_Details = 'cid$#3512054#',\n Sales_ConfirmTransferWithoutProof_Details = 'cid$#3512055#',\n Sales_CreateForExternalMarketplaces_Details = 'cid$#3512056#',\n Sales_CreateOfflineSale_Details = 'cid$#3512057#',\n Sales_Fulfill_Details = 'cid$#3512058#',\n Sales_FulfillOnIsFulfillerOf_Details = 'cid$#3512059#',\n Sales_FulfillOnPricerOf_Details = 'cid$#3512060#',\n Sales_FulfillOnPurchasedBy_Details = 'cid$#3512061#',\n Sales_ManageHold_Details = 'cid$#3512062#',\n Sales_ManageOfflineSaleCreatedBy_Details = 'cid$#3512063#',\n Sales_ManageOfflineSale_Details = 'cid$#3512064#',\n Sales_ResetFulfillment_Details = 'cid$#3512065#',\n Sales_UpdateSaleOnPurchasedBy_Details = 'cid$#3512066#',\n Sales_UpdateSalesInfo_Details = 'cid$#3512067#',\n Sales_UpdateSalesInfoOnIsFulfillerOf_Details = 'cid$#3512068#',\n Sales_UpdateSalesInfoOnIsPricerOf_Details = 'cid$#3512069#',\n Sales_UpdateTags_Details = 'cid$#3512070#',\n Sales_UpdateTagsOnIsFulfillerOf_Details = 'cid$#3512071#',\n Sales_UpdateTagsOnIsPricerOf_Details = 'cid$#3512072#',\n Sales_UpdateTagsOnPurchasedBy_Details = 'cid$#3512073#',\n Sales_ViewAll_Details = 'cid$#3512074#',\n Sales_ViewCostAndMargin_Details = 'cid$#3512075#',\n Sales_ViewFulfillmentArtifacts_Details = 'cid$#3512076#',\n Sales_ViewFulfillmentArtifactsOnIsFulfillerOf_Details = 'cid$#3512077#',\n Sales_ViewFulfillmentArtifactsOnIsPricerOf_Details = 'cid$#3512078#',\n Sales_ViewFulfillmentArtifactsOnPurchasedBy_Details = 'cid$#3512079#',\n Sales_ViewPaymentState_Details = 'cid$#3512080#',\n Sales_ViewProceeds_Details = 'cid$#3512081#',\n Sales_ViewRecent_Details = 'cid$#3512082#',\n Sales_ViewRecentFromExternalMarketplace_Details = 'cid$#3512083#',\n Sales_ViewRecentProceeds_Details = 'cid$#3512084#',\n Sales_ViewSalesOnIsFulfillerOf_Details = 'cid$#3512085#',\n Sales_ViewSalesOnIsPricerOf_Details = 'cid$#3512086#',\n Sales_ViewSalesOnPurchasedBy_Details = 'cid$#3512087#',\n SalesAndLift = 'cid$#3678624#',\n SalesAndMargin = 'cid$#3221223#',\n SaleSettings = 'cid$#3453469#',\n SaleSettingsAllVisible = 'cid$#3453470#',\n SalesReports = 'cid$#3110509#',\n SalesSummary = 'cid$#2992153#',\n SaleStatus = 'cid$#3453471#',\n SaleTicketTypeBulkEditWarning = 'cid$#3453472#',\n SaleTicketTypeWarning = 'cid$#3453473#',\n SameTicketsForAllEventsTitle = 'cid$#3195382#',\n SameTicketsForAllEventsHeader = 'cid$#3195383#',\n SameTicketsForAllEventsMessage1 = 'cid$#3195384#',\n SameTicketsForAllEventsMessage2 = 'cid$#3195385#',\n SameZone = 'cid$#3512088#',\n Save = 'cid$#2975359#',\n SaveBarcodes = 'cid$#2972043#',\n SavePricingStrategyInfo = 'cid$#3512089#',\n SaveThisFilter = 'cid$#3237719#',\n SaveTicketIds = 'cid$#3389381#',\n SaveTicketUrls = 'cid$#3389382#',\n Score = 'cid$#3288931#',\n ScreenshotsOfTransfer = 'cid$#2977938#',\n Search = 'cid$#2987600#',\n SearchAndSelectAnEvent = 'cid$#3042155#',\n SearchEmptyResult = 'cid$#3026534#',\n SearchEventPlaceholderText = 'cid$#3026533#',\n SearchForMessagePlaceholder = 'cid$#3344416#',\n SearchOrEnter = 'cid$#3317895#',\n SearchVenueConfigOrEvent = 'cid$#3396848#',\n Season = 'cid$#3054268#',\n Seat = 'cid$#2973461#',\n SeatAllocationChangeWarning = 'cid$#3089847#',\n SeatFrom = 'cid$#3237720#',\n SeatHeatmap = 'cid$#3288932#',\n SeatIncrementType = 'cid$#3172482#',\n SeatingInfoNotMatchStubHub = 'cid$#3408198#',\n SeatingUnmapped = 'cid$#3453474#',\n SeatSaver = 'cid$#3453475#',\n SeatSaverPurchaseMessage = 'cid$#3453476#',\n SeatScore = 'cid$#3389383#',\n SeatTo = 'cid$#3237721#',\n SeatTraits = 'cid$#3037585#',\n Seating = 'cid$#3037584#',\n Seats = 'cid$#2971930#',\n Section = 'cid$#2971942#',\n Sections = 'cid$#3678625#',\n SectionOnly = 'cid$#3373019#',\n SeeAll = 'cid$#3172483#',\n SeeAllResultsFor = 'cid$#3036194#',\n SeeMoreEllipses = 'cid$#3214292#',\n Select = 'cid$#3389384#',\n SelectAccountToSignIn = 'cid$#3024377#',\n SelectAccountToSwitch = 'cid$#3024375#',\n SelectAll = 'cid$#3361813#',\n SelectDatePlaceholder = 'cid$#3344417#',\n SelectedListing = 'cid$#3344418#',\n SelectedSection = 'cid$#3453477#',\n SelectedSections = 'cid$#3453483#',\n SelectFilter = 'cid$#3172484#',\n SelectInboxPlaceholder = 'cid$#3344419#',\n SelectListingsToMerge = 'cid$#3453484#',\n SelectMultiple = 'cid$#3344420#',\n SelectNone = 'cid$#3512090#',\n SelectSeatFrom = 'cid$#3261311#',\n SelectSections = 'cid$#3453485#',\n SelectSectionsToPriceAgainst = 'cid$#3453486#',\n SelectSortPlaceholder = 'cid$#3344421#',\n SelectSplitType = 'cid$#3214293#',\n SelectSubjectPlaceholder = 'cid$#3344422#',\n SelectTags = 'cid$#3408199#',\n SelectTemplate = 'cid$#3512091#',\n SelectUsersAndGroups = 'cid$#3432371#',\n SelectValueType = 'cid$#3373020#',\n SelectVariables = 'cid$#3408200#',\n SelectVendor = 'cid$#3172485#',\n SelectVendorShowAccounts = 'cid$#3172486#',\n SelectYourFilters = 'cid$#2988458#',\n Selected = 'cid$#2987601#',\n SellAsTicketTypePriority = 'cid$#3214294#',\n SellerAccount = 'cid$#3024379#',\n SellerAccount_Admin_Details = 'cid$#3512092#',\n SellerFee = 'cid$#3344423#',\n SellerId = 'cid$#3678626#',\n SellerOwnTickets = 'cid$#3512093#',\n SellerSupportCase = 'cid$#3084143#',\n SellerSupportCase_Create_Details = 'cid$#3512094#',\n SellerSupportCase_View_Details = 'cid$#3512095#',\n SellThroughRate = 'cid$#3453487#',\n SellThroughRateLowercase = 'cid$#3453488#',\n SellThroughRateSubtitle = 'cid$#3453489#',\n SendInhandDateToMarketplace = 'cid$#3172487#',\n SetAsPaid = 'cid$#3041867#',\n SetPriority = 'cid$#3214295#',\n Settings = 'cid$#3408201#',\n Share = 'cid$#3172488#',\n ShareReport = 'cid$#3453490#',\n Sharing = 'cid$#3432372#',\n SharingReportDescription = 'cid$#3432373#',\n Shipment = 'cid$#3037599#',\n Shipping = 'cid$#3043867#',\n ShippingDeadline = 'cid$#3344424#',\n ShowAdvancedSettings = 'cid$#3432374#',\n ShowAllListings = 'cid$#3344425#',\n ShownQuantity = 'cid$#3512096#',\n ShowParkingTickets = 'cid$#3408202#',\n ShowRelatedListings = 'cid$#3344426#',\n ShowSimpleSettings = 'cid$#3269698#',\n ShowVoidCancelledPurchases = 'cid$#3269699#',\n SignIn = 'cid$#3024381#',\n SignInAgain = 'cid$#3024380#',\n SignOut = 'cid$#3024382#',\n SignupDate = 'cid$#3373021#',\n Simple = 'cid$#3261264#',\n SinglePayment = 'cid$#3046243#',\n SingleValueOnly = 'cid$#3408203#',\n SiteTheme = 'cid$#3396849#',\n SkipLogic = 'cid$#3317896#',\n SMPWallet = 'cid$#3689888#',\n Sold = 'cid$#2981284#',\n SoldATP = 'cid$#3453491#',\n SoldAverageTicketPrice = 'cid$#3453492#',\n SoldCost = 'cid$#3261265#',\n SoldAs = 'cid$#3089843#',\n SoldLast7Days = 'cid$#3089845#',\n SoldProceeds = 'cid$#3396850#',\n SoldProfit = 'cid$#3453493#',\n SoldQty = 'cid$#3261266#',\n SoldQuantity = 'cid$#3453494#',\n SoldSeats = 'cid$#3261267#',\n SoldTicketCost = 'cid$#3408204#',\n SoldTickets = 'cid$#3396851#',\n SoldToday = 'cid$#3089844#',\n SomethingWentWrong = 'cid$#2971952#',\n SomethingWentWrongTryAgain = 'cid$#2973469#',\n Sort = 'cid$#3344427#',\n SortAtoZ = 'cid$#3004425#',\n SortBy = 'cid$#3432375#',\n SortByDate = 'cid$#2975374#',\n SortByTitle = 'cid$#2975375#',\n SortNewToOld = 'cid$#3004422#',\n SortOldToNew = 'cid$#3004424#',\n SortZtoA = 'cid$#3004426#',\n SpecialCharactersNotAllowed = 'cid$#3396852#',\n SpecificSections = 'cid$#3453495#',\n Split = 'cid$#3038743#',\n SplitListing = 'cid$#3059989#',\n SplitType = 'cid$#3047496#',\n Sports = 'cid$#3512097#',\n SpotifyPopularity = 'cid$#3678627#',\n StandardDeviations = 'cid$#3317897#',\n Standing = 'cid$#3678628#',\n Stakes = 'cid$#3678629#',\n StartDateTime = 'cid$#3678630#',\n StateProvince = 'cid$#3067713#',\n State = 'cid$#3678631#',\n Status = 'cid$#2971934#',\n Stop = 'cid$#3373022#',\n STR = 'cid$#3453496#',\n StrategyName = 'cid$#3512098#',\n String = 'cid$#3373023#',\n StubhubEventIdKnown = 'cid$#3512099#',\n StubHubLoginRequired = 'cid$#3408205#',\n SubGenre = 'cid$#3512100#',\n Subject = 'cid$#3317898#',\n Succeeded = 'cid$#3201700#',\n Success = 'cid$#3291913#',\n Suggestions = 'cid$#3453497#',\n Support = 'cid$#3317899#',\n SupportCaseId = 'cid$#3344428#',\n SuppressFor1Hour = 'cid$#3185872#',\n SimilarSections = 'cid$#3288933#',\n SuspiciousPriceChange = 'cid$#3185873#',\n SuspiciousPriceChangeWarning = 'cid$#3185874#',\n Summary = 'cid$#3185875#',\n SwapTag = 'cid$#3432376#',\n SwapTagValues = 'cid$#3432377#',\n SwapTagValuesAllVisible = 'cid$#3432378#',\n SwapTagValuesSelected = 'cid$#3432379#',\n SwitchAccount = 'cid$#3024376#',\n SyncCenter = 'cid$#3214296#',\n SyncWithSystemSettings = 'cid$#3408206#',\n System = 'cid$#3512101#',\n Tag = 'cid$#3396853#',\n Tags = 'cid$#3373024#',\n TagsToIncludeInColumns = 'cid$#3408207#',\n TakeMyParentListingAnd = 'cid$#3361814#',\n Target = 'cid$#3453498#',\n TaxExempt = 'cid$#3110510#',\n TaxPaid = 'cid$#3037586#',\n Text = 'cid$#3389385#',\n ThanMineAnd = 'cid$#3389386#',\n Theatre = 'cid$#3512102#',\n Theme = 'cid$#3408208#',\n Then = 'cid$#3389387#',\n ThisEvent = 'cid$#3361815#',\n ThisMonth = 'cid$#3013276#',\n ThisWasTaxExempt = 'cid$#3195386#',\n ThisWeek = 'cid$#3013275#',\n ThisYear = 'cid$#3013277#',\n Ticket = 'cid$#3059990#',\n TicketGroup = 'cid$#2972948#',\n TicketGroupHasErrors = 'cid$#3043871#',\n TicketGroups = 'cid$#3453499#',\n TicketGroups_ViewAll_Details = 'cid$#3512103#',\n TicketIdAlreadyInUsed = 'cid$#3389388#',\n TicketmasterBarcodeTransferInstruction = 'cid$#3269700#',\n TicketmasterBarcodeTransferViaOneTicketInstruction = 'cid$#3269701#',\n TicketmasterBarcodeTransferViaTradeDeskInstruction = 'cid$#3261268#',\n TicketmasterTradeDeskApi = 'cid$#3432380#',\n TicketsAvailable = 'cid$#3344429#',\n TicketsListedAndSold = 'cid$#3221224#',\n TicketType = 'cid$#2971935#',\n TicketTypePriority = 'cid$#3243232#',\n Tickets = 'cid$#2971924#',\n TicketsOnPlatform = 'cid$#3678632#',\n TicketsPurchased = 'cid$#3034808#',\n TicketTypePriorityForSelected = 'cid$#3512104#',\n TicketTypePriorityForAll = 'cid$#3512105#',\n TicketUrlAlreadyInUsed = 'cid$#3389389#',\n TileView = 'cid$#3269702#',\n Time = 'cid$#3512106#',\n TitleName = 'cid$#3512107#',\n To = 'cid$#3172489#',\n ToBeListed = 'cid$#3373025#',\n ToBeDelisted = 'cid$#3373026#',\n ToDate = 'cid$#2973457#',\n Today = 'cid$#3013274#',\n Total = 'cid$#2981286#',\n /**\n * @deprecated Use `ContentId.TotalWebsitePrice`\n */\n TotalAllInPrice = 'cid$#3389390#',\n TotalATP = 'cid$#3389391#',\n TotalCost = 'cid$#3054262#',\n TotalDeliveryCharge = 'cid$#3195387#',\n TotalDue = 'cid$#3034809#',\n TotalGrossProfit = 'cid$#3389392#',\n TotalListedQuantity = 'cid$#3389393#',\n /**\n * @deprecated Use `ContentId.TotalProceeds`\n */\n TotalListPrice = 'cid$#3389394#',\n TotalNetProceeds = 'cid$#3261312#',\n TotalOriginal = 'cid$#3389395#',\n TotalPerTicketCost = 'cid$#3037587#',\n TotalProceeds = 'cid$#3389396#',\n TotalProfit = 'cid$#3453500#',\n TotalPurchaseCost = 'cid$#3034811#',\n TotalQty = 'cid$#3261269#',\n TotalQuantity = 'cid$#3453501#',\n TotalRemaining = 'cid$#3389397#',\n TotalSoldCost = 'cid$#3389398#',\n TotalSoldQuantity = 'cid$#3389399#',\n TotalTicketCost = 'cid$#3034810#',\n TotalTicketEarnings = 'cid$#3453502#',\n TotalTicketQuantity = 'cid$#3389400#',\n TotalTickets = 'cid$#3185876#',\n TotalUnitCost = 'cid$#3389401#',\n /**\n * @deprecated Use `ContentId.TotalUnsoldProceeds`\n */\n TotalUnsoldListPrice = 'cid$#3389402#',\n TotalUnsoldProceeds = 'cid$#3389403#',\n TotalUnsoldQuantity = 'cid$#3389404#',\n TotalValueListed = 'cid$#3221225#',\n TotalWebsitePrice = 'cid$#3389405#',\n TradeDeskResetSummaryTitle = 'cid$#3432381#',\n TradeDeskResetSummaryBody = 'cid$#3432382#',\n TradeDeskResetInstructionsStep1 = 'cid$#3432383#',\n TradeDeskResetInstructionsStep2 = 'cid$#3432384#',\n TradeDeskResetInstructionsStep3 = 'cid$#3432385#',\n TradeDeskResetInstructionsStep4 = 'cid$#3432386#',\n Transactions = 'cid$#3432387#',\n Transfer = 'cid$#2976484#',\n TransferAccepted = 'cid$#3344430#',\n TransferExpired = 'cid$#3344431#',\n TransferFrom = 'cid$#3110511#',\n TransferId = 'cid$#3268814#',\n TransferIdNote = 'cid$#3268815#',\n TransferProofId = 'cid$#3221226#',\n TransferSent = 'cid$#3344432#',\n TransferTicketsChoice = 'cid$#2972047#',\n TransferTicketsIns = 'cid$#2972046#',\n TransferTo = 'cid$#2973467#',\n TrueFalse = 'cid$#3408209#',\n TurnOffReporting = 'cid$#3396854#',\n TurnOffReportingWarning = 'cid$#3408210#',\n Type = 'cid$#3034812#',\n UnableToProcess = 'cid$#3811626#',\n UnableToRetrieveBuyersInfo = 'cid$#3082891#',\n Unbroadcast = 'cid$#3046244#',\n UnbroadcastAll = 'cid$#3180465#',\n UnbroadcastAllVisible = 'cid$#3389406#',\n Unbroadcasted = 'cid$#3172490#',\n Uncategorized = 'cid$#3344433#',\n Undeliverable = 'cid$#3237722#',\n UndercutAmount = 'cid$#3361816#',\n UndercutMode = 'cid$#3261270#',\n UndercutAbsoluteAmount = 'cid$#3261271#',\n UndercutAbsoluteOrRelativeAmountMustBeSetError = 'cid$#3285806#',\n UnderCutModePrompt = 'cid$#3361817#',\n UndercutRelativeAmount = 'cid$#3261272#',\n Ungroup = 'cid$#3317900#',\n UngroupListingsAll = 'cid$#3432388#',\n UngroupListingsAllVisible = 'cid$#3453503#',\n UngroupListingsConfirmation = 'cid$#3432389#',\n UngroupListingsSelected = 'cid$#3432390#',\n UniqueId = 'cid$#2972022#',\n UnitCost = 'cid$#2972021#',\n Unpaid = 'cid$#2977307#',\n Unread = 'cid$#3317901#',\n UnbroadcastSelected = 'cid$#3344434#',\n UnsavedChanges = 'cid$#2973475#',\n UnsavedChangesWarning = 'cid$#2973476#',\n Unset = 'cid$#3408211#',\n UnsoldCost = 'cid$#3396856#',\n UnsoldQty = 'cid$#3261273#',\n UnsoldQuantity = 'cid$#3453504#',\n UnsoldTickets = 'cid$#3172492#',\n UpdateCurrency = 'cid$#3453505#',\n UpdatePurchaseCurrencyWarning = 'cid$#3453506#',\n UpdateSeatingInformation = 'cid$#3408212#',\n Upload = 'cid$#2988329#',\n UploadBarcodes = 'cid$#2972035#',\n UploadETickets = 'cid$#2971946#',\n UploadFailureMessage = 'cid$#3237723#',\n UploadProof = 'cid$#3512108#',\n UploadProofOfPurchase = 'cid$#3512109#',\n UploadQRCodes = 'cid$#3512110#',\n UploadSeatScoreFile = 'cid$#3389407#',\n UploadPurchaseFile = 'cid$#3389408#',\n UploadTicketUrls = 'cid$#3389409#',\n UploadTicketIds = 'cid$#3389410#',\n UrlsToAcceptTickets = 'cid$#2977939#',\n UseExistingRoleAsTemplateTitle = 'cid$#3512111#',\n UseExistingRoleAsTemplateExplanation = 'cid$#3512112#',\n UserManagement = 'cid$#3408213#',\n UserNotFound = 'cid$#3408214#',\n Users = 'cid$#3373027#',\n UsersWithAccess = 'cid$#3512113#',\n UseThisAnswerForNext24Hours = 'cid$#3180466#',\n Value = 'cid$#3373028#',\n ValueDoesNotSatisfyType = 'cid$#3373029#',\n ValueType = 'cid$#3373030#',\n Variables = 'cid$#3408215#',\n VariablesToIncludeInColumns = 'cid$#3408216#',\n Vendor = 'cid$#3054263#',\n VendorAccount = 'cid$#3054264#',\n VendorAccounts = 'cid$#3172493#',\n Vendors = 'cid$#3172494#',\n Venue = 'cid$#3389411#',\n VenueConfigs = 'cid$#3389412#',\n VenueMapWelcomeMessage = 'cid$#3243222#',\n VenueName = 'cid$#3067715#',\n Venues = 'cid$#2971929#',\n VenueWideQualityScore = 'cid$#3261274#',\n VenueWideInSectionPriority = 'cid$#3261275#',\n VenueWideQualityScoreSameZone = 'cid$#3389413#',\n VerifyBuyerInfo = 'cid$#2975355#',\n VeryAggressive = 'cid$#3512114#',\n View = 'cid$#2973474#',\n ViewAllAccessiblePermissions = 'cid$#3578090#',\n ViewBarcodes = 'cid$#2972039#',\n ViewComps = 'cid$#3261276#',\n ViewDetails = 'cid$#2988330#',\n ViewDuplicates = 'cid$#3512115#',\n ViewEditabilityDescription = 'cid$#3678633#',\n ViewEmailDetails = 'cid$#3344435#',\n ViewETickets = 'cid$#1910708#',\n ViewETicketUrls = 'cid$#3373031#',\n ViewEventMap = 'cid$#3811627#',\n ViewInventory = 'cid$#3067716#',\n ViewPurchase = 'cid$#3344436#',\n ViewQRCodes = 'cid$#3512116#',\n ViewSale = 'cid$#3317902#',\n ViewSales = 'cid$#3067717#',\n ViewTicketIds = 'cid$#3389414#',\n ViewTransferProof = 'cid$#2972038#',\n ViewTransferTicket = 'cid$#3172495#',\n ViewWallet = 'cid$#3678634#',\n ViewZoneMap = 'cid$#3811628#',\n Visibility = 'cid$#3038739#',\n Visible = 'cid$#3811629#',\n Void = 'cid$#3811630#',\n VoidBulkPurchaseWarning = 'cid$#3678635#',\n VoidPurchase = 'cid$#3067718#',\n VoidPurchaseDescription = 'cid$#3067719#',\n VoidSinglePurchaseWarning = 'cid$#3678636#',\n Wallet = 'cid$#3678637#',\n WasTaxExempt = 'cid$#3172496#',\n Wasted = 'cid$#3811631#',\n WastedCost = 'cid$#3389415#',\n WastedQty = 'cid$#3678638#',\n WastedTickets = 'cid$#3389416#',\n WasteSale = 'cid$#3811632#',\n WasteTickets = 'cid$#3811633#',\n WasteUnsoldTickets = 'cid$#3811634#',\n Weather = 'cid$#3678639#',\n Webhook_View_Details = 'cid$#3543207#',\n Webhook_Create_Details = 'cid$#3543208#',\n Webhook_Edit_Details = 'cid$#3543209#',\n Website = 'cid$#3237724#',\n WebsiteFloor = 'cid$#3408217#',\n WebsiteCeiling = 'cid$#3408218#',\n WebsitePrice = 'cid$#3389417#',\n Week = 'cid$#3396857#',\n WeekOfYear = 'cid$#3396858#',\n Weeks = 'cid$#3811635#',\n WhatIsAPlacholder = 'cid$#3512117#',\n WhatIsASeatSaver = 'cid$#3453507#',\n WhatSeatToFulfill = 'cid$#2973465#',\n WhatsNew = 'cid$#3408219#',\n WhatTicketsDidYouBuy = 'cid$#3034664#',\n WhenAndWhere = 'cid$#3005803#',\n WhenWhereWho = 'cid$#3037590#',\n WhereTicketsWerePurchased = 'cid$#3034665#',\n WholeNumber = 'cid$#3408220#',\n Widgets = 'cid$#3389418#',\n WillCall = 'cid$#3054266#',\n WitheldFunds = 'cid$#3578093#',\n Worse = 'cid$#3389419#',\n WrongTicketsReturnShippingCost = 'cid$#3578094#',\n WrongTrackingNumber = 'cid$#3578095#',\n Yes = 'cid$#3034813#',\n YesToSome = 'cid$#3180467#',\n YourAutoPriceResults = 'cid$#3432391#',\n YourBuyer = 'cid$#2973466#',\n YourListing = 'cid$#3361818#',\n YoureCheaper = 'cid$#3269703#',\n YoureMoreExpensive = 'cid$#3269704#',\n YourSale = 'cid$#2972018#',\n YourSaleMetricsPart1 = 'cid$#2992154#',\n YourStats = 'cid$#3678640#',\n YourSummaryMessage = 'cid$#2992152#',\n YourTickets = 'cid$#3110512#',\n Zone = 'cid$#3361819#',\n ZoneMap = 'cid$#3811636#',\n ZoneMapDescription = 'cid$#3811637#',\n Zones = 'cid$#3261277#',\n Zoom = 'cid$#3543210#',\n ZoomInstruction = 'cid$#3243224#',\n ZtoA = 'cid$#3172503#',\n ZtoAArrow = 'cid$#3214297#',\n\n // TODO: SponsoredListings - Clean up & sort alphabetically\n BaseBid = 'cid$#3678641#',\n MaxBid = 'cid$#3678642#',\n DailyBudget = 'cid$#3678643#',\n AddAdCampaign = 'cid$#3678651#',\n AddAdGroup = 'cid$#3678652#',\n EnterAdCampaignName = 'cid$#3678653#',\n EnterAdGroupName = 'cid$#3678654#',\n ManageAdGroups = 'cid$#3678655#',\n BidModifierDimension = 'cid$#3678656#',\n EventBidModifierValue = 'cid$#3678657#',\n TicketClass = 'cid$#3678658#',\n BidModifier = 'cid$#3678659#',\n ViewApplicableListings = 'cid$#3678660#',\n AdSpend = 'cid$#3678661#',\n AddGenre = 'cid$#3678662#',\n AddPerformer = 'cid$#3678663#',\n AddEvent = 'cid$#3678664#',\n AddTicketClass = 'cid$#3678667#',\n AddListings = 'cid$#3678668#',\n AddVenue = 'cid$#3678669#',\n MaxBidLessThanBaseBidMsg = 'cid$#3678670#',\n DailyBudgetLessThanMaxBidMsg = 'cid$#3678671#',\n}\n","import { ContentIdAndDefaultValue } from 'src/contexts/ContentContext';\nimport { MainRoute } from 'src/navigations/Routes/MainRoute';\nimport {\n EventGroupingType,\n EventSort,\n EventTimeFrameFilter,\n PointOfSalePaymentState,\n PointOfSaleSaleStatus,\n} from 'src/WebApiController';\n\nimport { ContentId } from './contentId';\n\n// Please keep this map in alphabetical order\nexport const ContentIds: Record = {\n [ContentId.Above]: {\n id: ContentId.Above,\n defaultValue: 'Above',\n },\n [ContentId.AbsoluteAmount]: {\n id: ContentId.AbsoluteAmount,\n defaultValue: 'Absolute Amount',\n },\n [ContentId.AbsoluteDollarValue]: {\n id: ContentId.AbsoluteDollarValue,\n defaultValue: 'Absolute Dollar Value',\n },\n [ContentId.AbsoluteRankPremium]: {\n id: ContentId.AbsoluteRankPremium,\n defaultValue: 'Absolute Rank Premium',\n },\n [ContentId.ABTest]: {\n id: ContentId.ABTest,\n defaultValue: 'AB Test',\n },\n [ContentId.Access]: {\n id: ContentId.Access,\n defaultValue: 'Access',\n },\n [ContentId.AccessToViewUnauthorized]: {\n id: ContentId.AccessToViewUnauthorized,\n defaultValue: 'You are not authorized to access this view.',\n },\n [ContentId.AccordianToggle]: {\n id: ContentId.AccordianToggle,\n defaultValue: 'Toggle',\n },\n [ContentId.Account]: {\n id: ContentId.Account,\n defaultValue: 'Account',\n },\n [ContentId.Account_SetPrice_Details]: {\n id: ContentId.Account_SetPrice_Details,\n defaultValue: 'Configure pricing settings for the account',\n },\n [ContentId.AccountEmail]: {\n id: ContentId.AccountEmail,\n defaultValue: 'Account email',\n },\n [ContentId.AccountInformation]: {\n id: ContentId.AccountInformation,\n defaultValue: 'Account information',\n },\n [ContentId.Accounting]: {\n id: ContentId.Accounting,\n defaultValue: 'Accounting',\n },\n [ContentId.Accounting_ViewAll_Details]: {\n id: ContentId.Accounting_ViewAll_Details,\n defaultValue: 'View all sellers accounting details',\n },\n [ContentId.Accounting_ViewPaymentsOnSale_Details]: {\n id: ContentId.Accounting_ViewPaymentsOnSale_Details,\n defaultValue: 'View marketplace payments on each sale',\n },\n [ContentId.Accounting_ViewStubhubPayments_Details]: {\n id: ContentId.Accounting_ViewStubhubPayments_Details,\n defaultValue: 'View existing payments on StubHub',\n },\n [ContentId.AccountName]: {\n id: ContentId.AccountName,\n defaultValue: 'Account name',\n },\n [ContentId.AccountNotSetupForAnyMarketplace]: {\n id: ContentId.AccountNotSetupForAnyMarketplace,\n defaultValue:\n 'Your account is not setup to broadcast or sync with any marketplace. All listing and sale actions are not available. Please contact us to finish setting up the account.',\n },\n [ContentId.Accounts]: {\n id: ContentId.Accounts,\n defaultValue: 'Accounts',\n },\n [ContentId.Accounts_ViewAll_Details]: {\n id: ContentId.Accounts_ViewAll_Details,\n defaultValue: 'View all available accounts for the seller',\n },\n [ContentId.Actions]: {\n id: ContentId.Actions,\n defaultValue: 'Actions',\n },\n [ContentId.ActivateRole]: {\n id: ContentId.ActivateRole,\n defaultValue: 'Activate Role',\n },\n [ContentId.ActivateUser]: {\n id: ContentId.ActivateUser,\n defaultValue: 'Activate User',\n },\n [ContentId.Active]: {\n id: ContentId.Active,\n defaultValue: 'Active',\n },\n [ContentId.ActiveListingsHeader]: {\n id: ContentId.ActiveListingsHeader,\n defaultValue: 'Set number of active listings',\n },\n [ContentId.ActiveListingsDescription]: {\n id: ContentId.ActiveListingsDescription,\n defaultValue: 'Limit your active listings within any group',\n },\n [ContentId.Activity]: {\n id: ContentId.Activity,\n defaultValue: 'Activity',\n },\n [ContentId.ActivityLogDate]: {\n id: ContentId.ActivityLogDate,\n defaultValue: 'Activity Date',\n },\n [ContentId.ActivityLogActionType]: {\n id: ContentId.ActivityLogActionType,\n defaultValue: 'Activity Type',\n },\n [ContentId.ActivityLogInitiatedBy]: {\n id: ContentId.ActivityLogInitiatedBy,\n defaultValue: 'Initiated By',\n },\n [ContentId.ActivityLogAdditionalInfo]: {\n id: ContentId.ActivityLogAdditionalInfo,\n defaultValue: 'Additional Info',\n },\n [ContentId.ActivityLogLaunchButtonText]: {\n id: ContentId.ActivityLogLaunchButtonText,\n defaultValue: 'History',\n },\n [ContentId.Actual]: {\n id: ContentId.Actual,\n defaultValue: 'Actual',\n },\n [ContentId.ActualSellThroughRate]: {\n id: ContentId.ActualSellThroughRate,\n defaultValue: 'Actual Sell-Through Rate',\n },\n [ContentId.ActualSTR]: {\n id: ContentId.ActualSTR,\n defaultValue: 'Act. STR',\n },\n [ContentId.AdCampaigns]: {\n id: ContentId.AdCampaigns,\n defaultValue: 'Ad Campaigns',\n },\n [ContentId.AddABTest]: {\n id: ContentId.AddABTest,\n defaultValue: 'Add AB Test',\n },\n [ContentId.AddAnotherSplit]: {\n id: ContentId.AddAnotherSplit,\n defaultValue: 'Add Another Split',\n },\n [ContentId.AddedToSale]: {\n id: ContentId.AddedToSale,\n defaultValue: 'Added to Sale',\n },\n [ContentId.AddFilterToShowResult]: {\n id: ContentId.AddFilterToShowResult,\n defaultValue: 'Add a filter to show results',\n },\n [ContentId.AddHurdle]: {\n id: ContentId.AddHurdle,\n defaultValue: 'Add Hurdle',\n },\n [ContentId.AddNameToCreateGroup]: {\n id: ContentId.AddNameToCreateGroup,\n defaultValue: 'Add a name to create a new group',\n },\n [ContentId.AddNewDeal]: {\n id: ContentId.AddNewDeal,\n defaultValue: 'Add New Deal',\n },\n [ContentId.AddNewSection]: {\n id: ContentId.AddNewSection,\n defaultValue: 'Add new section',\n },\n [ContentId.AddOverride]: {\n id: ContentId.AddOverride,\n defaultValue: 'Add Override',\n },\n [ContentId.AddRow]: {\n id: ContentId.AddRow,\n defaultValue: 'Add Row',\n },\n [ContentId.AddRule]: {\n id: ContentId.AddRule,\n defaultValue: '+ Add Rule',\n },\n [ContentId.AddSplit]: {\n id: ContentId.AddSplit,\n defaultValue: 'Add Split',\n },\n [ContentId.AddToGroup]: {\n id: ContentId.AddToGroup,\n defaultValue: 'Add to Group',\n },\n [ContentId.AddToSale]: {\n id: ContentId.AddToSale,\n defaultValue: 'Add to Sale',\n },\n [ContentId.AddValues]: {\n id: ContentId.AddValues,\n defaultValue: 'Add Values',\n },\n [ContentId.AdGroups]: {\n id: ContentId.AdGroups,\n defaultValue: 'Ad Groups',\n },\n [ContentId.Add]: {\n id: ContentId.Add,\n defaultValue: 'Add',\n },\n [ContentId.AddAccountAction]: {\n id: ContentId.AddAccountAction,\n defaultValue: 'Add new account',\n },\n [ContentId.AddChargeOrCredit]: {\n id: ContentId.AddChargeOrCredit,\n defaultValue: 'Add charge or credit',\n },\n [ContentId.AddColumns]: {\n id: ContentId.AddColumns,\n defaultValue: 'Add columns',\n },\n [ContentId.AddCommission]: {\n id: ContentId.AddCommission,\n defaultValue: 'Add Commission',\n },\n [ContentId.AddCostAction]: {\n id: ContentId.AddCostAction,\n defaultValue: 'Add Cost',\n },\n [ContentId.AddCostCredit]: {\n id: ContentId.AddCostCredit,\n defaultValue: 'Add Cost/Credit',\n },\n [ContentId.AddCustomColumn]: {\n id: ContentId.AddCustomColumn,\n defaultValue: 'Add custom column',\n },\n [ContentId.AddFilter]: {\n id: ContentId.AddFilter,\n defaultValue: 'Add Filter',\n },\n [ContentId.AddGroup]: {\n id: ContentId.AddGroup,\n defaultValue: 'Add Group',\n },\n [ContentId.AddInventoryReport]: {\n id: ContentId.AddInventoryReport,\n defaultValue: 'Add Inventory Report',\n },\n [ContentId.AddLineItem]: {\n id: ContentId.AddLineItem,\n defaultValue: 'Add line item',\n },\n [ContentId.AddMarketplaceSale]: {\n id: ContentId.AddMarketplaceSale,\n defaultValue: 'Add Marketplace Sale',\n },\n [ContentId.AddMembersToThisTeam]: {\n id: ContentId.AddMembersToThisTeam,\n defaultValue: 'Add members to this team',\n },\n [ContentId.AddMessagingSource]: {\n id: ContentId.AddMessagingSource,\n defaultValue: 'Add messaging source',\n },\n [ContentId.AddMessagingSourceDescription]: {\n id: ContentId.AddMessagingSourceDescription,\n defaultValue:\n 'Forward your email messages into your account to manage your purchases, transfers, and more.',\n },\n [ContentId.AddMessagingSourceStep1]: {\n id: ContentId.AddMessagingSourceStep1,\n defaultValue: 'Go to your email provider.',\n },\n [ContentId.AddMessagingSourceStep2]: {\n id: ContentId.AddMessagingSourceStep2,\n defaultValue: 'Set up forwarding to address below:',\n },\n [ContentId.AddMessagingSourceStep3]: {\n id: ContentId.AddMessagingSourceStep3,\n defaultValue: 'Start managing your messages.',\n },\n [ContentId.AddNewBuyer]: {\n id: ContentId.AddNewBuyer,\n defaultValue: 'Add New Buyer...',\n },\n [ContentId.AddNewOverrideFxRate]: {\n id: ContentId.AddNewOverrideFxRate,\n defaultValue: 'Add New Override Fx Rate',\n },\n [ContentId.AddNewTeam]: {\n id: ContentId.AddNewTeam,\n defaultValue: 'Add New Team',\n },\n [ContentId.AddNote]: {\n id: ContentId.AddNote,\n defaultValue: 'Add Note',\n },\n [ContentId.AddOfflineSale]: {\n id: ContentId.AddOfflineSale,\n defaultValue: 'Add Offline Sale',\n },\n [ContentId.AddOrUpdateFxOverrideWarning]: {\n id: ContentId.AddOrUpdateFxOverrideWarning,\n defaultValue:\n 'Adding or updating an FX rate override will adjust the unit cost on the affected listings.',\n },\n [ContentId.AddOverrideFxRate]: {\n id: ContentId.AddOverrideFxRate,\n defaultValue: 'Add Override Fx Rate',\n },\n [ContentId.AddPaymentMethodAction]: {\n id: ContentId.AddPaymentMethodAction,\n defaultValue: 'Add new payment method',\n },\n [ContentId.AddPayment]: {\n id: ContentId.AddPayment,\n defaultValue: 'Add Payment',\n },\n [ContentId.AddPlaceholder]: {\n id: ContentId.AddPlaceholder,\n defaultValue: 'Add Placeholder',\n },\n [ContentId.AddPlaceholderAdditionalInfoMessage]: {\n id: ContentId.AddPlaceholderAdditionalInfoMessage,\n defaultValue: 'Tell use more about your placeholder inventory',\n },\n [ContentId.AddPurchase]: {\n id: ContentId.AddPurchase,\n defaultValue: 'Add Purchase',\n },\n [ContentId.AddPurchasePaymentMethod]: {\n id: ContentId.AddPurchasePaymentMethod,\n defaultValue: 'Add Purchase Payment Method',\n },\n [ContentId.AddPurchaseVendor]: {\n id: ContentId.AddPurchaseVendor,\n defaultValue: 'Add Purchase Vendor',\n },\n [ContentId.AddPurchaseVendorAccount]: {\n id: ContentId.AddPurchaseVendorAccount,\n defaultValue: 'Add Purchase Vendor Account',\n },\n [ContentId.AddReport]: {\n id: ContentId.AddReport,\n defaultValue: 'Add Report',\n },\n [ContentId.AddSalesReport]: {\n id: ContentId.AddSalesReport,\n defaultValue: 'Add Sales Report',\n },\n [ContentId.AddSeatSaver]: {\n id: ContentId.AddSeatSaver,\n defaultValue: 'Add Seat Saver',\n },\n [ContentId.AddSeatSaveEventSearchMessage]: {\n id: ContentId.AddSeatSaveEventSearchMessage,\n defaultValue: 'What events are your seat saver for?',\n },\n [ContentId.AddSeatSaverAdditionalInfoMessage]: {\n id: ContentId.AddSeatSaverAdditionalInfoMessage,\n defaultValue: 'Tell us more about your seat saver',\n },\n [ContentId.AddSection]: {\n id: ContentId.AddSection,\n defaultValue: 'Add Section',\n },\n [ContentId.AddSource]: {\n id: ContentId.AddSource,\n defaultValue: 'Add source',\n },\n [ContentId.AddTag]: {\n id: ContentId.AddTag,\n defaultValue: 'Add Tag',\n },\n [ContentId.AddTagValues]: {\n id: ContentId.AddTagValues,\n defaultValue: 'Add Tag Values',\n },\n [ContentId.AddTagValuesSelected]: {\n id: ContentId.AddTagValuesSelected,\n defaultValue: 'Add Tag Values for Selected',\n },\n [ContentId.AddTagValuesAllVisible]: {\n id: ContentId.AddTagValuesAllVisible,\n defaultValue: 'Add Tag Values for All Visible Listings',\n },\n [ContentId.AddTarget]: {\n id: ContentId.AddTarget,\n defaultValue: 'Add target',\n },\n [ContentId.AddTickets]: {\n id: ContentId.AddTickets,\n defaultValue: 'Add Tickets',\n },\n [ContentId.AddTicketsForThisEvent]: {\n id: ContentId.AddTicketsForThisEvent,\n defaultValue: 'Add Tickets for This Event',\n },\n [ContentId.AddUser]: {\n id: ContentId.AddUser,\n defaultValue: 'Add User',\n },\n [ContentId.AddUsersAndGroups]: {\n id: ContentId.AddUsersAndGroups,\n defaultValue: 'Add users and groups',\n },\n [ContentId.AddUserToRole]: {\n id: ContentId.AddUserToRole,\n defaultValue: 'Add users to this role',\n },\n [ContentId.AddValue]: {\n id: ContentId.AddValue,\n defaultValue: 'Add Value',\n },\n [ContentId.AdjustFiltersSuggestion]: {\n id: ContentId.AdjustFiltersSuggestion,\n defaultValue: 'Try adjusting your filters to broaden the search criteria.',\n },\n [ContentId.AdjustFloor]: {\n id: ContentId.AdjustFloor,\n defaultValue: 'Adjust Floor',\n },\n [ContentId.AdjustMyPrice]: {\n id: ContentId.AdjustMyPrice,\n defaultValue: 'Adjust my price',\n },\n [ContentId.AdjustPrice]: {\n id: ContentId.AdjustPrice,\n defaultValue: 'Adjust Price',\n },\n [ContentId.AdjustPricesBy]: {\n id: ContentId.AdjustPricesBy,\n defaultValue: 'Adjust prices by',\n },\n [ContentId.AdjustPricingCeilingAllVisible]: {\n id: ContentId.AdjustPricingCeilingAllVisible,\n defaultValue: 'Adjust Proceeds Ceiling for All Visible Listings',\n },\n [ContentId.AdjustPricingFloorAllVisible]: {\n id: ContentId.AdjustPricingFloorAllVisible,\n defaultValue: 'Adjust Proceeds Floor for All Visible Listings',\n },\n [ContentId.AdjustPricingFloorSelected]: {\n id: ContentId.AdjustPricingFloorSelected,\n defaultValue: 'Adjust Proceeds Floor for Selected',\n },\n [ContentId.AdjustPricingCeilingSelected]: {\n id: ContentId.AdjustPricingCeilingSelected,\n defaultValue: 'Adjust Proceeds Ceiling for Selected',\n },\n [ContentId.AdjustPricingFloor]: {\n id: ContentId.AdjustPricingFloor,\n defaultValue: 'Adjust Proceeds Floor',\n },\n [ContentId.AdjustPricingCeiling]: {\n id: ContentId.AdjustPricingCeiling,\n defaultValue: 'Adjust Proceeds Ceiling',\n },\n [ContentId.AdjustProceedsFloor]: {\n id: ContentId.AdjustProceedsFloor,\n defaultValue: 'Adjust Proceeds Floor',\n },\n [ContentId.AdjustProceedsCeiling]: {\n id: ContentId.AdjustProceedsCeiling,\n defaultValue: 'Adjust Proceeds Ceiling',\n },\n [ContentId.Advanced]: {\n id: ContentId.Advanced,\n defaultValue: 'Advanced',\n },\n [ContentId.AdPlatform_Edit_Details]: {\n id: ContentId.AdPlatform_Edit_Details,\n defaultValue: 'Read/Write access to Sponsored Listings Page',\n },\n [ContentId.AdvancedAutopricingSettings]: {\n id: ContentId.AdvancedAutopricingSettings,\n defaultValue: 'Advanced Autopricing Settings',\n },\n [ContentId.AdvancedSearch]: {\n id: ContentId.AdvancedSearch,\n defaultValue: 'Advanced Search',\n },\n [ContentId.AdvancedSettings]: {\n id: ContentId.AdvancedSettings,\n defaultValue: 'Advanced settings',\n },\n [ContentId.AggressiveOption]: {\n id: ContentId.AggressiveOption,\n defaultValue: 'Aggressive (2sd)',\n },\n /**\n * @deprecated Unused\n */\n [ContentId.Ago]: {\n id: ContentId.Ago,\n defaultValue: 'ago',\n },\n [ContentId.AISuggestion]: {\n id: ContentId.AISuggestion,\n defaultValue: 'AI suggestion',\n },\n [ContentId.AllAmex]: {\n id: ContentId.AllAmex,\n defaultValue: 'All Amex',\n },\n [ContentId.AllAvailableMerges]: {\n id: ContentId.AllAvailableMerges,\n defaultValue: 'All available merges',\n },\n [ContentId.AllFulfillmentStates]: {\n id: ContentId.AllFulfillmentStates,\n defaultValue: 'All Fulfillment States',\n },\n [ContentId.AllGenres]: {\n id: ContentId.AllGenres,\n defaultValue: 'All Genres',\n },\n [ContentId.AllInPriceAutoCalculationInfo]: {\n id: ContentId.AllInPriceAutoCalculationInfo,\n defaultValue:\n 'All-in price is estimated from your list price plus fees (if any).',\n },\n [ContentId.AllListings]: {\n id: ContentId.AllListings,\n defaultValue: 'All listings',\n },\n [ContentId.AllMarketplaces]: {\n id: ContentId.AllMarketplaces,\n defaultValue: 'All Marketplaces',\n },\n [ContentId.AllMastercard]: {\n id: ContentId.AllMastercard,\n defaultValue: 'All MasterCard',\n },\n [ContentId.AllMessages]: {\n id: ContentId.AllMessages,\n defaultValue: 'All messages',\n },\n [ContentId.Allocate]: {\n id: ContentId.Allocate,\n defaultValue: 'Allocate',\n },\n [ContentId.AllocatedListing]: {\n id: ContentId.AllocatedListing,\n defaultValue: 'Allocated Listing',\n },\n [ContentId.AllocateToAnyAvailableSeats]: {\n id: ContentId.AllocateToAnyAvailableSeats,\n defaultValue: 'Allocate to any available seats',\n },\n [ContentId.AllocateToDifferentTickets]: {\n id: ContentId.AllocateToDifferentTickets,\n defaultValue: 'Allocate to different tickets',\n },\n [ContentId.AllocateToListingTickets]: {\n id: ContentId.AllocateToListingTickets,\n defaultValue: 'Allocate to listing tickets',\n },\n [ContentId.Allocation]: {\n id: ContentId.Allocation,\n defaultValue: 'Allocation',\n },\n [ContentId.AllowBroadcast]: {\n id: ContentId.AllowBroadcast,\n defaultValue: 'Allow Broadcast',\n },\n [ContentId.AllowMutipleValues]: {\n id: ContentId.AllowMutipleValues,\n defaultValue: 'Allow Mutiple Values',\n },\n [ContentId.AllPayments]: {\n id: ContentId.AllPayments,\n defaultValue: 'All Payments',\n },\n [ContentId.AllPaymentTypes]: {\n id: ContentId.AllPaymentTypes,\n defaultValue: 'All Payment Types',\n },\n [ContentId.AllSubGenres]: {\n id: ContentId.AllSubGenres,\n defaultValue: 'All sub-genres',\n },\n [ContentId.AllVisa]: {\n id: ContentId.AllVisa,\n defaultValue: 'All Visa',\n },\n [ContentId.AlternativeTickets]: {\n id: ContentId.AlternativeTickets,\n defaultValue: 'Alternative Tickets',\n },\n [ContentId.AlternativeTicketsBuyerCompensation]: {\n id: ContentId.AlternativeTicketsBuyerCompensation,\n defaultValue: 'Alternative Tickets - Buyer Compensation',\n },\n [ContentId.AmountType]: {\n id: ContentId.AmountType,\n defaultValue: 'Amount Type',\n },\n [ContentId.Amphitheater]: {\n id: ContentId.Amphitheater,\n defaultValue: 'Amphitheater',\n },\n [ContentId.Ampitheater]: {\n id: ContentId.Ampitheater,\n defaultValue: 'Ampitheater',\n },\n [ContentId.And]: {\n id: ContentId.And,\n defaultValue: 'And',\n },\n [ContentId.Angle]: {\n id: ContentId.Angle,\n defaultValue: 'Angle',\n },\n [ContentId.App]: {\n id: ContentId.App,\n defaultValue: 'App',\n },\n [ContentId.AppendSeatTraits]: {\n id: ContentId.AppendSeatTraits,\n defaultValue: 'Append Seat Trait',\n },\n [ContentId.ApplicationTempData]: {\n id: ContentId.ApplicationTempData,\n defaultValue: 'Application Temp Data',\n },\n [ContentId.Apply]: {\n id: ContentId.Apply,\n defaultValue: 'Apply',\n },\n [ContentId.ApplyCompListingSettings]: {\n id: ContentId.ApplyCompListingSettings,\n defaultValue: 'Apply Comp Listing Settings',\n },\n [ContentId.ApplyAdvancedPricingSettings]: {\n id: ContentId.ApplyAdvancedPricingSettings,\n defaultValue: 'Apply Advanced Pricing Settings',\n },\n [ContentId.ApplyFilter]: {\n id: ContentId.ApplyFilter,\n defaultValue: 'Apply filter',\n },\n [ContentId.ApplyGroupingTemplatesToAllEventsPrompt]: {\n id: ContentId.ApplyGroupingTemplatesToAllEventsPrompt,\n defaultValue:\n 'Applying the grouping templates to all your events will override your current edits. Are you sure?',\n },\n [ContentId.ApplyAutoPricingSettings]: {\n id: ContentId.ApplyAutoPricingSettings,\n defaultValue: 'Apply Autopricing Settings',\n },\n [ContentId.ApplyPricingProtectionSettings]: {\n id: ContentId.ApplyPricingProtectionSettings,\n defaultValue: 'Apply Pricing Protection Settings',\n },\n [ContentId.ApplyToAll]: {\n id: ContentId.ApplyToAll,\n defaultValue: 'Apply to all',\n },\n [ContentId.ApplyToAllEvents]: {\n id: ContentId.ApplyToAllEvents,\n defaultValue: 'Apply to All Events',\n },\n [ContentId.ApplyUndercutSettings]: {\n id: ContentId.ApplyUndercutSettings,\n defaultValue: 'Apply Undercut Settings',\n },\n [ContentId.Approved]: {\n id: ContentId.Approved,\n defaultValue: 'Approved',\n },\n [ContentId.ApprovedForQualityControl]: {\n id: ContentId.ApprovedForQualityControl,\n defaultValue: 'Approved for Quality Control',\n },\n [ContentId.AppVersion]: {\n id: ContentId.AppVersion,\n defaultValue: 'Application Version',\n },\n [ContentId.Area]: {\n id: ContentId.Area,\n defaultValue: 'Area',\n },\n [ContentId.AreYouSure]: {\n id: ContentId.AreYouSure,\n defaultValue: 'Are you sure?',\n },\n [ContentId.AreYouSureEditRowsMultipleSections]: {\n id: ContentId.AreYouSureEditRowsMultipleSections,\n defaultValue:\n 'Are you sure you want to edit rows across multiple sections?',\n },\n [ContentId.AreYouSureYouWantToRestoreThisPurchase]: {\n id: ContentId.AreYouSureYouWantToRestoreThisPurchase,\n defaultValue: 'Are you sure you want to restore this purchase?',\n },\n [ContentId.AscendingAbbreviated]: {\n id: ContentId.AscendingAbbreviated,\n defaultValue: 'Asc',\n },\n [ContentId.AutoComp]: {\n id: ContentId.AutoComp,\n defaultValue: 'Auto Comp',\n },\n [ContentId.AutoFulfillWithSpace]: {\n id: ContentId.AutoFulfillWithSpace,\n defaultValue: 'Auto Fulfill',\n },\n [ContentId.AutoGroup]: {\n id: ContentId.AutoGroup,\n defaultValue: 'Auto Group',\n },\n [ContentId.AutopricingInfo]: {\n id: ContentId.AutopricingInfo,\n defaultValue: 'Protect and adjust your listing as the market moves.',\n },\n [ContentId.AutoPricingResult]: {\n id: ContentId.AutoPricingResult,\n defaultValue: 'Autopricing Result',\n },\n [ContentId.BelowThe]: {\n id: ContentId.BelowThe,\n defaultValue: 'Below the',\n },\n [ContentId.BetterZonesDetail]: {\n id: ContentId.BetterZonesDetail,\n defaultValue:\n 'Compare to all sections in your zone, and zones ranked above yours on the Edit Map tab',\n },\n [ContentId.BuildReport]: {\n id: ContentId.BuildReport,\n defaultValue: 'Build Report',\n },\n [ContentId.BulkAppendSeatTraitInfoMessage]: {\n id: ContentId.BulkAppendSeatTraitInfoMessage,\n defaultValue: 'Add new seat traits without removing existing ones.',\n },\n [ContentId.BulkEditDeliveryTypePurchaseMessage]: {\n id: ContentId.BulkEditDeliveryTypePurchaseMessage,\n defaultValue:\n 'Updating delivery on the purchase order will also update the corresponding listings.',\n },\n [ContentId.BulkEditGettingPreview]: {\n id: ContentId.BulkEditGettingPreview,\n defaultValue: \"We're generating a preview of your bulk edit.\",\n },\n [ContentId.BulkEditListingGroupSettings]: {\n id: ContentId.BulkEditListingGroupSettings,\n defaultValue: 'Bulk Edit Listing Group Settings',\n },\n [ContentId.BulkEditListingGroupSettingsWarning]: {\n id: ContentId.BulkEditListingGroupSettingsWarning,\n defaultValue:\n 'The changes will apply exclusively to listing groups. The preview will display all listings that belong to any impacted listing group.',\n },\n [ContentId.BulkEditNoCommissionProvidedWarning]: {\n id: ContentId.BulkEditNoCommissionProvidedWarning,\n defaultValue:\n 'Providing no commissions will clear commissions for all selected purchases.',\n },\n [ContentId.BulkEditNoSeatTraitsProvidedWarning]: {\n id: ContentId.BulkEditNoSeatTraitsProvidedWarning,\n defaultValue:\n 'Providing no seat traits will clear seat traits for all selected items.',\n },\n [ContentId.BulkEditSuccessWithWarnings]: {\n id: ContentId.BulkEditSuccessWithWarnings,\n defaultValue: 'The process completed with some warnings.',\n },\n [ContentId.BulkEditTicketTypePriorityInstruction]: {\n id: ContentId.BulkEditTicketTypePriorityInstruction,\n defaultValue:\n 'Select the delivery type to update the delivery strategy. Only listings that match the selected delivery type will be updated.',\n },\n [ContentId.BulkMarkPurchaseAsPaid]: {\n id: ContentId.BulkMarkPurchaseAsPaid,\n defaultValue: 'Mark Purchase As Paid',\n },\n [ContentId.BulkMarkPurchaseAsPaidMessage]: {\n id: ContentId.BulkMarkPurchaseAsPaidMessage,\n defaultValue:\n 'You are about to mark all the selected purchase order as paid. Continue?',\n },\n [ContentId.BulkMarkPurchaseAsPaidWarning]: {\n id: ContentId.BulkMarkPurchaseAsPaidWarning,\n defaultValue:\n 'If there is any vendor account of the select purchase order does not have a default payment method, the system will auto create one for your account.',\n },\n [ContentId.BulkReplaceAndOverrideSeatTraitInfoMessage]: {\n id: ContentId.BulkReplaceAndOverrideSeatTraitInfoMessage,\n defaultValue:\n 'Overwrite all existing seat traits with new ones. Providing no seat traits will clear traits for all selected items.',\n },\n [ContentId.BulkUpdatePlaceholdersMessage]: {\n id: ContentId.BulkUpdatePlaceholdersMessage,\n defaultValue:\n 'Bulk action will apply only to the selected placeholder listing(s).',\n },\n [ContentId.BulkUpdatePurchaseCurrency]: {\n id: ContentId.BulkUpdatePurchaseCurrency,\n defaultValue: 'Update Purchase Currency',\n },\n [ContentId.BulkUpdatePurchaseCurrencyActionText]: {\n id: ContentId.BulkUpdatePurchaseCurrencyActionText,\n defaultValue:\n 'This action updates the currency on the selected purchases without changing the purchase cost. Continue?',\n },\n [ContentId.BulkUpdatePurchaseCurrencyInfoText]: {\n id: ContentId.BulkUpdatePurchaseCurrencyInfoText,\n defaultValue:\n 'Updating currency on the purchase will trigger a re-computation of costs for associated listings and sales based on the updated currency.',\n },\n [ContentId.BulkUpdateSeatTraitInfoMessage]: {\n id: ContentId.BulkUpdateSeatTraitInfoMessage,\n defaultValue:\n 'Updating will override the current seat traits with the selected traits.',\n },\n [ContentId.BulkWasteTicketsConfirmation]: {\n id: ContentId.BulkWasteTicketsConfirmation,\n defaultValue:\n 'Are you sure you want to create a Waste Sale for the selected listings? This action will create a record of a sale with $0 proceeds for the unsold tickets.',\n },\n [ContentId.BuyerAccount]: {\n id: ContentId.BuyerAccount,\n defaultValue: 'Buyer Account',\n },\n [ContentId.BuyerDelivery]: {\n id: ContentId.BuyerDelivery,\n defaultValue: 'Buyer Delivery',\n },\n [ContentId.CancelBulkTicketGroupWarning]: {\n id: ContentId.CancelBulkTicketGroupWarning,\n defaultValue:\n 'Are you sure you want to cancel the selected ticket group(s)? This action is irreversible. Associated sales will be deallocated and moved to Pending Confirmation.',\n },\n [ContentId.CancelBulkPurchaseWarning]: {\n id: ContentId.CancelBulkPurchaseWarning,\n defaultValue:\n 'Are you sure you want to cancel the selected purchase order(s)? This action is reversible. Associated sales will be deallocated and moved to Pending Confirmation.',\n },\n [ContentId.CancellationReason]: {\n id: ContentId.CancellationReason,\n defaultValue: 'Cancellation Reason',\n },\n [ContentId.CancelledOrders]: {\n id: ContentId.CancelledOrders,\n defaultValue: 'Cancelled Orders',\n },\n [ContentId.CancelledProceeds]: {\n id: ContentId.CancelledProceeds,\n defaultValue: 'Cancelled Proceeds',\n },\n [ContentId.CancelledProceedsSettingDescription]: {\n id: ContentId.CancelledProceedsSettingDescription,\n defaultValue:\n 'Automatically add \"Cancelled Proceeds\" charges to cancelled orders',\n },\n [ContentId.CancelledProceedsSettingToggle]: {\n id: ContentId.CancelledProceedsSettingToggle,\n defaultValue: 'Add Charges Automatically',\n },\n [ContentId.CancelPurchases]: {\n id: ContentId.CancelPurchases,\n defaultValue: 'Cancel Purchases',\n },\n [ContentId.CancelSingleTicketGroupWarning]: {\n id: ContentId.CancelSingleTicketGroupWarning,\n defaultValue:\n 'Are you sure you want to cancel this ticket group? This action is irreversible. Associated sales will be deallocated and moved to Pending Confirmation.',\n },\n [ContentId.CancelTicketGroupsParenth]: {\n id: ContentId.CancelTicketGroupsParenth,\n defaultValue: 'Cancel Ticket Group(s)',\n },\n [ContentId.CancelPurchasesParenth]: {\n id: ContentId.CancelPurchasesParenth,\n defaultValue: 'Cancel Purchase(s)',\n },\n [ContentId.CantAllocateMore100Commission]: {\n id: ContentId.CantAllocateMore100Commission,\n defaultValue: 'You cannot allocate more than 100% commission.',\n },\n [ContentId.Carts]: {\n id: ContentId.Carts,\n defaultValue: 'Carts',\n },\n [ContentId.Ceiling]: {\n id: ContentId.Ceiling,\n defaultValue: 'Ceiling',\n },\n [ContentId.Center]: {\n id: ContentId.Center,\n defaultValue: 'Center',\n },\n [ContentId.ChargeAmount]: {\n id: ContentId.ChargeAmount,\n defaultValue: 'Charge Amount',\n },\n [ContentId.ChargeReasons]: {\n id: ContentId.ChargeReasons,\n defaultValue: 'Charge Reasons',\n },\n [ContentId.Cheaper]: {\n id: ContentId.Cheaper,\n defaultValue: 'Cheaper',\n },\n [ContentId.ChooseListing]: {\n id: ContentId.ChooseListing,\n defaultValue: 'Choose Listing',\n },\n [ContentId.ChooseSpecificSections]: {\n id: ContentId.ChooseSpecificSections,\n defaultValue: 'Choose specific sections',\n },\n [ContentId.ChooseTickets]: {\n id: ContentId.ChooseTickets,\n defaultValue: 'Choose Tickets',\n },\n [ContentId.Clear]: {\n id: ContentId.Clear,\n defaultValue: 'Clear',\n },\n [ContentId.CombineCornersAndEnds]: {\n id: ContentId.CombineCornersAndEnds,\n defaultValue: 'Combine corners and ends',\n },\n [ContentId.Commands]: {\n id: ContentId.Commands,\n defaultValue: 'Commands',\n },\n [ContentId.CommissionEligibilityDate]: {\n id: ContentId.CommissionEligibilityDate,\n defaultValue: 'Commission Eligibility Date',\n },\n [ContentId.CommissionEligible]: {\n id: ContentId.CommissionEligible,\n defaultValue: 'Commission Eligible',\n },\n [ContentId.CommissionerCostsAndCharges]: {\n id: ContentId.CommissionerCostsAndCharges,\n defaultValue: 'Commissioner Costs And Charges',\n },\n [ContentId.CommissionerProceedsAndCredits]: {\n id: ContentId.CommissionerProceedsAndCredits,\n defaultValue: 'Commissioner Proceeds And Credits',\n },\n [ContentId.CommissionerProfitAndLoss]: {\n id: ContentId.CommissionerProfitAndLoss,\n defaultValue: 'Commissioner Profit And Loss',\n },\n [ContentId.Commissions]: {\n id: ContentId.Commissions,\n defaultValue: 'Commissions',\n },\n [ContentId.Compensation]: {\n id: ContentId.Compensation,\n defaultValue: 'Compensation',\n },\n [ContentId.CompletedOn]: {\n id: ContentId.CompletedOn,\n defaultValue: 'Completed on',\n },\n [ContentId.ConfirmRemovePaymentReference]: {\n id: ContentId.ConfirmRemovePaymentReference,\n defaultValue:\n 'You are about to mark this sale as Unpaid. This action will remove the payment reference from the sale and unlink the payment. Continue?',\n },\n [ContentId.ConfirmResetOverride]: {\n id: ContentId.ConfirmResetOverride,\n defaultValue: 'You are about to reset the override on this sale. Continue?',\n },\n [ContentId.ConfirmUnLinkPaymentAndSaleTitle]: {\n id: ContentId.ConfirmUnLinkPaymentAndSaleTitle,\n defaultValue: 'Are you sure you want to unlink payment and sale?',\n },\n [ContentId.ConfirmUnLinkPaymentAndSaleBody]: {\n id: ContentId.ConfirmUnLinkPaymentAndSaleBody,\n defaultValue:\n 'The payment reference will be removed, and the sale will be marked as unpaid.',\n },\n [ContentId.ConfirmWaste]: {\n id: ContentId.ConfirmWaste,\n defaultValue: 'Confirm Waste',\n },\n [ContentId.Conflict]: {\n id: ContentId.Conflict,\n defaultValue: 'Conflict',\n },\n [ContentId.CommissionPayments]: {\n id: ContentId.CommissionPayments,\n defaultValue: 'Commission Payments',\n },\n [ContentId.ConnectedSeller]: {\n id: ContentId.ConnectedSeller,\n defaultValue: 'Connected Seller',\n },\n [ContentId.Consignment]: {\n id: ContentId.Consignment,\n defaultValue: 'Consignment',\n },\n [ContentId.Converted]: {\n id: ContentId.Converted,\n defaultValue: 'Converted',\n },\n [ContentId.ConvertedPaymentsAmount]: {\n id: ContentId.ConvertedPaymentsAmount,\n defaultValue: 'Converted Payments Amount',\n },\n [ContentId.ConvertPayment]: {\n id: ContentId.ConvertPayment,\n defaultValue: 'Convert Payment',\n },\n [ContentId.ConvertPurchasePayment]: {\n id: ContentId.ConvertPurchasePayment,\n defaultValue: 'Convert Purchase Payment',\n },\n [ContentId.ConvertCurrency]: {\n id: ContentId.ConvertCurrency,\n defaultValue: 'Convert Currency',\n },\n [ContentId.ConvertedPayment]: {\n id: ContentId.ConvertedPayment,\n defaultValue: 'Converted Payment',\n },\n [ContentId.ConvertedPaymentAmountMustBeGreaterThanZero]: {\n id: ContentId.ConvertedPaymentAmountMustBeGreaterThanZero,\n defaultValue: 'Converted payment amount must be greater than zero',\n },\n [ContentId.ConvertedTo]: {\n id: ContentId.ConvertedTo,\n defaultValue: 'Converted to',\n },\n [ContentId.ConvPmtAmt]: {\n id: ContentId.ConvPmtAmt,\n defaultValue: 'Conv. Pmt Amt',\n },\n [ContentId.Corners]: {\n id: ContentId.Corners,\n defaultValue: 'Corners',\n },\n [ContentId.CreateNewGroup]: {\n id: ContentId.CreateNewGroup,\n defaultValue: 'Create a new group',\n },\n [ContentId.CreditAmount]: {\n id: ContentId.CreditAmount,\n defaultValue: 'Credit Amount',\n },\n [ContentId.CreditReasons]: {\n id: ContentId.CreditReasons,\n defaultValue: 'Credit Reasons',\n },\n [ContentId.CustomRanks]: {\n id: ContentId.CustomRanks,\n defaultValue: 'Custom Ranks',\n },\n [ContentId.DateAdded]: {\n id: ContentId.DateAdded,\n defaultValue: 'Date Added',\n },\n [ContentId.DateRange]: {\n id: ContentId.DateRange,\n defaultValue: 'Date Range',\n },\n [ContentId.DeallocateSalesOfAffectedTicketsWarning]: {\n id: ContentId.DeallocateSalesOfAffectedTicketsWarning,\n defaultValue: 'Deallocate all associated sales of the affected tickets.',\n },\n [ContentId.ChangeGroup]: {\n id: ContentId.ChangeGroup,\n defaultValue: 'Change Group',\n },\n [ContentId.ChangeZone]: {\n id: ContentId.ChangeZone,\n defaultValue: 'Change Zone',\n },\n [ContentId.CheckVenueRows]: {\n id: ContentId.CheckVenueRows,\n defaultValue: 'Check Venue Rows',\n },\n [ContentId.CompListingMinCount]: {\n id: ContentId.CompListingMinCount,\n defaultValue: 'Comp. Listing Min Count',\n },\n [ContentId.CompListingMinQuantity]: {\n id: ContentId.CompListingMinQuantity,\n defaultValue: 'Comp. Listing Min Quantity',\n },\n [ContentId.CopiedWithExclamationMark]: {\n id: ContentId.CopiedWithExclamationMark,\n defaultValue: 'Copied!',\n },\n [ContentId.DefaultDelivery]: {\n id: ContentId.DefaultDelivery,\n defaultValue: 'Default Delivery',\n },\n [ContentId.Defect]: {\n id: ContentId.Defect,\n defaultValue: 'Defect',\n },\n [ContentId.DefaultDeliveryConfigurations]: {\n id: ContentId.DefaultDeliveryConfigurations,\n defaultValue: 'Default Delivery Configurations',\n },\n [ContentId.DefaultDeliveryConfigurationsDescription]: {\n id: ContentId.DefaultDeliveryConfigurationsDescription,\n defaultValue: 'Set default settings for new purchases with this vendor',\n },\n [ContentId.DelayBroadcastAfterInitialCreation]: {\n id: ContentId.DelayBroadcastAfterInitialCreation,\n defaultValue: 'Delay Broadcast After Initial Creation (Days)',\n },\n [ContentId.DeletePlaceholders]: {\n id: ContentId.DeletePlaceholders,\n defaultValue: 'Delete Placeholders',\n },\n [ContentId.DeleteSearchResultConfirm]: {\n id: ContentId.DeleteSearchResultConfirm,\n defaultValue: 'Delete this search result?',\n },\n [ContentId.DeliveryInfoChangePropagateToSalesConfirmation]: {\n id: ContentId.DeliveryInfoChangePropagateToSalesConfirmation,\n defaultValue:\n 'You are about to update the delivery information. Would you also like to update the delivery information for associated sales?',\n },\n [ContentId.DeliveryInfoChangePropagateToUnfulfilledSalesConfirmation]: {\n id: ContentId.DeliveryInfoChangePropagateToUnfulfilledSalesConfirmation,\n defaultValue: 'You are about to update the delivery information. Would you also like to update the delivery information for associated unfulfilled sales?',\n },\n [ContentId.DeliveryOverrideInfo]: {\n id: ContentId.DeliveryOverrideInfo,\n defaultValue:\n 'Default values are provided by delivery overrides from the corresponding event or vendor.',\n },\n [ContentId.DeliveryStrategy]: {\n id: ContentId.DeliveryStrategy,\n defaultValue: 'Delivery Strategy',\n },\n [ContentId.DeprecatingHeatMaps]: {\n id: ContentId.DeprecatingHeatMaps,\n defaultValue:\n 'Venue Geometry and Merged Venue Geometry heat maps are being deprecated. Please update to the latest recommended model.',\n },\n [ContentId.Deprioritize]: {\n id: ContentId.Deprioritize,\n defaultValue: 'Deprioritize',\n },\n [ContentId.DeprioritizeQuantitiesHeader]: {\n id: ContentId.DeprioritizeQuantitiesHeader,\n defaultValue: 'Deprioritize specific quantities',\n },\n [ContentId.DeprioritizeQuantitiesDescription]: {\n id: ContentId.DeprioritizeQuantitiesDescription,\n defaultValue: 'Rerank listings to push specific quantities to the bottom ',\n },\n [ContentId.DescendingAbbreviated]: {\n id: ContentId.DescendingAbbreviated,\n defaultValue: 'Desc',\n },\n [ContentId.Details]: {\n id: ContentId.Details,\n defaultValue: 'Details',\n },\n [ContentId.DetectionMode]: {\n id: ContentId.DetectionMode,\n defaultValue: 'Detection Mode',\n },\n [ContentId.DeterminePrice]: {\n id: ContentId.DeterminePrice,\n defaultValue: 'Determine Price',\n },\n [ContentId.DiscountApplied]: {\n id: ContentId.DiscountApplied,\n defaultValue: 'Discount Applied',\n },\n [ContentId.DonotDropMoreThan]: {\n id: ContentId.DonotDropMoreThan,\n defaultValue: \"Don't drop more than\",\n },\n [ContentId.DontUpdateExistingListings]: {\n id: ContentId.DontUpdateExistingListings,\n defaultValue: \"Don't update existing listings\",\n },\n [ContentId.DontUpdateExistingListingsOrSales]: {\n id: ContentId.DontUpdateExistingListingsOrSales,\n defaultValue: \"Don't update existing listings or sales\",\n },\n [ContentId.DownloadETickets]: {\n id: ContentId.DownloadETickets,\n defaultValue: 'Download E-Tickets',\n },\n [ContentId.Drafted]: {\n id: ContentId.Drafted,\n defaultValue: 'Drafted',\n },\n [ContentId.DontUpdateExistingPurchasesOrListings]: {\n id: ContentId.DontUpdateExistingPurchasesOrListings,\n defaultValue: \"Don't update existing purchases or listings\",\n },\n [ContentId.DroppedOrderPenalty]: {\n id: ContentId.DroppedOrderPenalty,\n defaultValue: 'Dropped Order Penalty',\n },\n [ContentId.DropYourFileAnywhereToUpload]: {\n id: ContentId.DropYourFileAnywhereToUpload,\n defaultValue: 'Drop your file anywhere to upload',\n },\n [ContentId.Edited]: {\n id: ContentId.Edited,\n defaultValue: 'Edited',\n },\n [ContentId.EditEventWarning3]: {\n id: ContentId.EditEventWarning3,\n defaultValue:\n 'Changing the event for the selected listings will reset listing details, including price settings, and update the event for associated sales. This action cannot be undone. Continue?',\n },\n [ContentId.EditMap]: {\n id: ContentId.EditMap,\n defaultValue: 'Edit Map',\n },\n [ContentId.EditTable]: {\n id: ContentId.EditTable,\n defaultValue: 'Edit Table',\n },\n [ContentId.EditZone]: {\n id: ContentId.EditZone,\n defaultValue: 'Edit Zone',\n },\n [ContentId.EmptyPurchaseCommissions]: {\n id: ContentId.EmptyPurchaseCommissions,\n defaultValue:\n 'There are no commissions set from the purchase for the tickets on this sale. You can either add a commission directly to the sale or update it from the purchase.',\n },\n [ContentId.EnableAutoAddCancelledProceeds]: {\n id: ContentId.EnableAutoAddCancelledProceeds,\n defaultValue:\n 'Enable automatically add cancelled proceeds when rejecting a sale',\n },\n [ContentId.EnableAutoFulfillOverride]: {\n id: ContentId.EnableAutoFulfillOverride,\n defaultValue: 'Enable AutoFulfill Override',\n },\n [ContentId.EnableDeliveryOverride]: {\n id: ContentId.EnableDeliveryOverride,\n defaultValue: 'Enable Delivery Override',\n },\n [ContentId.EnableNativeSyncLabel]: {\n id: ContentId.EnableNativeSyncLabel,\n defaultValue: 'Process via native system',\n },\n [ContentId.EnableNativeSyncExplanation]: {\n id: ContentId.EnableNativeSyncExplanation,\n defaultValue:\n 'Remove the listing from the external processor to handle it natively in our system',\n },\n [ContentId.Ends]: {\n id: ContentId.Ends,\n defaultValue: 'Ends',\n },\n [ContentId.EnterCompanionMode]: {\n id: ContentId.EnterCompanionMode,\n defaultValue: 'Enter Companion Mode',\n },\n [ContentId.EventCancellation]: {\n id: ContentId.EventCancellation,\n defaultValue: 'Event Cancellation',\n },\n [ContentId.EventConfig_Create_Details]: {\n id: ContentId.EventConfig_Create_Details,\n defaultValue: 'Ability to create event settings',\n },\n [ContentId.EventConfig_Edit_Details]: {\n id: ContentId.EventConfig_Edit_Details,\n defaultValue: 'Ability to edit event settings',\n },\n [ContentId.EventConfig_View_Details]: {\n id: ContentId.EventConfig_View_Details,\n defaultValue: 'Ability to view event settings',\n },\n [ContentId.EventDiscovery]: {\n id: ContentId.EventDiscovery,\n defaultValue: 'Event Discovery',\n },\n [ContentId.EventMap]: {\n id: ContentId.EventMap,\n defaultValue: 'Event Map',\n },\n [ContentId.EventNotReviewedSince]: {\n id: ContentId.EventNotReviewedSince,\n defaultValue: 'Event Not Reviewed Since',\n },\n [ContentId.EventState]: {\n id: ContentId.EventState,\n defaultValue: 'Event State',\n },\n [ContentId.ExcludeFanInventoryInfo]: {\n id: ContentId.ExcludeFanInventoryInfo,\n defaultValue:\n 'When enabled, only auto prices against broker inventory, excluding fan-to-fan marketplace listings',\n },\n [ContentId.ExcludeDefectsInfo]: {\n id: ContentId.ExcludeDefectsInfo,\n defaultValue:\n 'When enabled, will auto price against inventory with matching defects',\n },\n [ContentId.ExistingSections]: {\n id: ContentId.ExistingSections,\n defaultValue: 'Existing Sections',\n },\n [ContentId.ExitCompanionMode]: {\n id: ContentId.ExitCompanionMode,\n defaultValue: 'Exit Companion Mode',\n },\n [ContentId.ExperimentName]: {\n id: ContentId.ExperimentName,\n defaultValue: 'Experiment Name',\n },\n [ContentId.Experiments]: {\n id: ContentId.Experiments,\n defaultValue: 'Experiments',\n },\n [ContentId.ExportPurchases]: {\n id: ContentId.ExportPurchases,\n defaultValue: 'Export Purchases',\n },\n [ContentId.ExternalPaymentId]: {\n id: ContentId.ExternalPaymentId,\n defaultValue: 'External Payment ID',\n },\n [ContentId.ExternalPurchaseIdAbbreviated]: {\n id: ContentId.ExternalPurchaseIdAbbreviated,\n defaultValue: 'External PO Id',\n },\n [ContentId.FallbackSplit]: {\n id: ContentId.FallbackSplit,\n defaultValue: 'Fallback Split',\n },\n [ContentId.FallbackSplitInfo]: {\n id: ContentId.FallbackSplitInfo,\n defaultValue:\n 'In case your hurdle rules overlapped, you can setup a fallback hurdle to make sure what should be assigned.',\n },\n [ContentId.FarLeftAndFarRight]: {\n id: ContentId.FarLeftAndFarRight,\n defaultValue: 'Far Left and Far Right',\n },\n [ContentId.Filled]: {\n id: ContentId.Filled,\n defaultValue: 'Filled',\n },\n [ContentId.FilterQty]: {\n id: ContentId.FilterQty,\n defaultValue: 'Filter Qty',\n },\n [ContentId.FilterReportOptional]: {\n id: ContentId.FilterReportOptional,\n defaultValue: 'Filter report (optional)',\n },\n [ContentId.FinanceAPI]: {\n id: ContentId.FinanceAPI,\n defaultValue: 'Finance API',\n },\n [ContentId.FlashSales]: {\n id: ContentId.FlashSales,\n defaultValue: 'Flash Sales',\n },\n [ContentId.FlashSale]: {\n id: ContentId.FlashSale,\n defaultValue: 'Flash Sale',\n },\n [ContentId.Front]: {\n id: ContentId.Front,\n defaultValue: 'Front',\n },\n [ContentId.FuturePayments]: {\n id: ContentId.FuturePayments,\n defaultValue: 'Future Payments',\n },\n [ContentId.FX]: {\n id: ContentId.FX,\n defaultValue: 'FX',\n },\n [ContentId.FXRate]: {\n id: ContentId.FXRate,\n defaultValue: 'FX Rate',\n },\n [ContentId.General_ViewNotifications_Details]: {\n id: ContentId.General_ViewNotifications_Details,\n defaultValue: 'View all notifications',\n },\n [ContentId.General_ViewReleaseNotes_Details]: {\n id: ContentId.General_ViewReleaseNotes_Details,\n defaultValue: \"View all notes on the What's New page\",\n },\n [ContentId.GeneratingPreview]: {\n id: ContentId.GeneratingPreview,\n defaultValue: 'Generating Preview',\n },\n [ContentId.GroupInventory]: {\n id: ContentId.GroupInventory,\n defaultValue: 'Group inventory',\n },\n [ContentId.GroupListingsSettingRankPremium]: {\n id: ContentId.GroupListingsSettingRankPremium,\n defaultValue: 'Add a rank premium',\n },\n [ContentId.GroupListingsSettingQueuingLogic]: {\n id: ContentId.GroupListingsSettingQueuingLogic,\n defaultValue: 'Add queuing logic (optional)',\n },\n [ContentId.GroupListingsSettingBroadcasting]: {\n id: ContentId.GroupListingsSettingBroadcasting,\n defaultValue: 'Add broadcast settings (optional)',\n },\n [ContentId.HasUnmappedSales]: {\n id: ContentId.HasUnmappedSales,\n defaultValue: 'Has Unmapped Sales',\n },\n [ContentId.HasUnlinkedChargesCredits]: {\n id: ContentId.HasUnlinkedChargesCredits,\n defaultValue: 'Has Unlinked Charges/Credits',\n },\n [ContentId.HasUnpricedListings]: {\n id: ContentId.HasUnpricedListings,\n defaultValue: 'Has Unpriced Listings',\n },\n [ContentId.GUR]: {\n id: ContentId.GUR,\n defaultValue: 'GUR (Guaranteed)',\n },\n [ContentId.Help]: {\n id: ContentId.Help,\n defaultValue: 'Help',\n },\n [ContentId.HelpCenter]: {\n id: ContentId.HelpCenter,\n defaultValue: 'Help Center',\n },\n [ContentId.HideZoneMap]: {\n id: ContentId.HideZoneMap,\n defaultValue: 'Hide zone map',\n },\n [ContentId.Hour]: {\n id: ContentId.Hour,\n defaultValue: 'Hour',\n },\n [ContentId.Hours]: {\n id: ContentId.Hours,\n defaultValue: 'Hours',\n },\n [ContentId.IfPurchaseIsCreatedWith]: {\n id: ContentId.IfPurchaseIsCreatedWith,\n defaultValue: 'If purchase is created with',\n },\n [ContentId.IncludeBetterZones]: {\n id: ContentId.IncludeBetterZones,\n defaultValue: 'Include better zones',\n },\n [ContentId.IncludeDefects]: {\n id: ContentId.IncludeDefects,\n defaultValue: 'Include Defects',\n },\n [ContentId.IncludeHeldListings]: {\n id: ContentId.IncludeHeldListings,\n defaultValue: 'Include Held Listings',\n },\n [ContentId.IncompatiblePricingMode]: {\n id: ContentId.IncompatiblePricingMode,\n defaultValue: 'Incompatible AutoPricing Mode',\n },\n [ContentId.Inferred]: {\n id: ContentId.Inferred,\n defaultValue: 'Inferred',\n },\n [ContentId.Inventory_UpdateDeliveryStrategy_Details]: {\n id: ContentId.Inventory_UpdateDeliveryStrategy_Details,\n defaultValue: 'Permits updating delivery strategy of inventory',\n },\n [ContentId.Inventory_UpdateDeliveryStrategyOnIsPricerOf_Details]: {\n id: ContentId.Inventory_UpdateDeliveryStrategyOnIsPricerOf_Details,\n defaultValue:\n 'Permits updating delivery strategy of inventory where the user is the pricer',\n },\n [ContentId.Inventory_UpdateDeliveryStrategyOnPurchasedBy_Details]: {\n id: ContentId.Inventory_UpdateDeliveryStrategyOnPurchasedBy_Details,\n defaultValue:\n 'Permits updating delivery strategy of inventory that are purchased by the current user',\n },\n [ContentId.Information]: {\n id: ContentId.Information,\n defaultValue: 'Information',\n },\n [ContentId.InternallyGenerated]: {\n id: ContentId.InternallyGenerated,\n defaultValue: 'Internally Generated',\n },\n [ContentId.InventoryReportDescription]: {\n id: ContentId.InventoryReportDescription,\n defaultValue: 'All inventory on the POS',\n },\n [ContentId.InventoryStatus]: {\n id: ContentId.InventoryStatus,\n defaultValue: 'Inventory Status',\n },\n [ContentId.ItemsWillBeUpdatedIfApplicable]: {\n id: ContentId.ItemsWillBeUpdatedIfApplicable,\n defaultValue: 'items will be updated if applicable',\n },\n [ContentId.KeepExistingTicketsOption]: {\n id: ContentId.KeepExistingTicketsOption,\n defaultValue:\n 'Keep existing tickets: Retain the tickets already associated with the sale.',\n },\n [ContentId.KeepPaymentReference]: {\n id: ContentId.KeepPaymentReference,\n defaultValue: 'No, keep the payment reference',\n },\n [ContentId.Last3Days]: {\n id: ContentId.Last3Days,\n defaultValue: 'Last 3 Days',\n },\n [ContentId.Last2Weeks]: {\n id: ContentId.Last2Weeks,\n defaultValue: 'Last 2 Weeks',\n },\n [ContentId.LeftAndRight]: {\n id: ContentId.LeftAndRight,\n defaultValue: 'Left and Right',\n },\n [ContentId.LinkSale]: {\n id: ContentId.LinkSale,\n defaultValue: 'Link Sale',\n },\n [ContentId.ListingHasNoCurrentFloor]: {\n id: ContentId.ListingHasNoCurrentFloor,\n defaultValue: 'Listing has no current floor.',\n },\n [ContentId.ListingHasNoMarketprice]: {\n id: ContentId.ListingHasNoMarketprice,\n defaultValue: 'Listing has no market price.',\n },\n [ContentId.ListingHasNoUnitCost]: {\n id: ContentId.ListingHasNoUnitCost,\n defaultValue: 'Listing has no unit cost.',\n },\n [ContentId.ListingQty]: {\n id: ContentId.ListingQty,\n defaultValue: 'Listing Qty',\n },\n [ContentId.ListingQuantity]: {\n id: ContentId.ListingQuantity,\n defaultValue: 'Listing Quantity',\n },\n [ContentId.ListingsSortByHeader]: {\n id: ContentId.ListingsSortByHeader,\n defaultValue: 'Sort groups by',\n },\n [ContentId.ListingsGroupSortByDescription]: {\n id: ContentId.ListingsGroupSortByDescription,\n defaultValue: 'Add a custom sorting order within groups',\n },\n [ContentId.ListingUpdateConfirmation]: {\n id: ContentId.ListingUpdateConfirmation,\n defaultValue: 'Listing Updates Confirmation',\n },\n [ContentId.ListingWillBeSplitInto]: {\n id: ContentId.ListingWillBeSplitInto,\n defaultValue: 'Listing will be split into the following:',\n },\n [ContentId.LockCommission]: {\n id: ContentId.LockCommission,\n defaultValue: 'Lock Commission',\n },\n [ContentId.MappingError]: {\n id: ContentId.MappingError,\n defaultValue: 'Mapping Error',\n },\n [ContentId.MapTitle]: {\n id: ContentId.MapTitle,\n defaultValue: 'Map title',\n },\n [ContentId.MarkAsFulfilledWarning]: {\n id: ContentId.MarkAsFulfilledWarning,\n defaultValue:\n 'This action will mark the selected sales as Fulfilled without uploading fulfillment artifacts. Sales not handled by the processor or those that cannot be fulfilled will not be changed. Continue?',\n },\n [ContentId.MarkAsPaid]: {\n id: ContentId.MarkAsPaid,\n defaultValue: 'Mark As Paid',\n },\n [ContentId.MarkAsUnpaid]: {\n id: ContentId.MarkAsUnpaid,\n defaultValue: 'Mark as Unpaid',\n },\n [ContentId.MarkedAsReviewed]: {\n id: ContentId.MarkedAsReviewed,\n defaultValue: 'Marked as Reviewed',\n },\n [ContentId.MarketplaceDelivery]: {\n id: ContentId.MarketplaceDelivery,\n defaultValue: 'Marketplace Delivery',\n },\n [ContentId.MarketplaceFault]: {\n id: ContentId.MarketplaceFault,\n defaultValue: 'Marketplace Fault',\n },\n [ContentId.MarketplacePaymentId]: {\n id: ContentId.MarketplacePaymentId,\n defaultValue: 'Marketplace Payment Id',\n },\n [ContentId.MarketplacePayments]: {\n id: ContentId.MarketplacePayments,\n defaultValue: 'Marketplace Payments',\n },\n [ContentId.MarketplacePaymentTerm]: {\n id: ContentId.MarketplacePaymentTerm,\n defaultValue: 'Marketplace Payment Term',\n },\n [ContentId.MarketplaceTerms]: {\n id: ContentId.MarketplaceTerms,\n defaultValue: 'Marketplace Terms',\n },\n [ContentId.MarketShare]: {\n id: ContentId.MarketShare,\n defaultValue: 'Market Share',\n },\n [ContentId.MarkLineItemAsUnpaidConfirmation]: {\n id: ContentId.MarkLineItemAsUnpaidConfirmation,\n defaultValue:\n 'This action will remove the payment reference from the line item. Continue?',\n },\n [ContentId.MarkProceedsAsUnpaidConfirmation]: {\n id: ContentId.MarkProceedsAsUnpaidConfirmation,\n defaultValue:\n 'You are about to mark this sale as Unpaid. This action will remove the payment reference from the sale. Continue?',\n },\n [ContentId.MarkSalesAsPaid]: {\n id: ContentId.MarkSalesAsPaid,\n defaultValue: 'Mark Sales As Paid',\n },\n [ContentId.MergedGroupListingWarning]: {\n id: ContentId.MergedGroupListingWarning,\n defaultValue:\n 'One or more selected listings are part of a group. Merging them will ungroup and unbroadcast the newly merged listing. Continue',\n },\n [ContentId.MergeListingGroupTooltip]: {\n id: ContentId.MergeListingGroupTooltip,\n defaultValue: 'This listing is part of a group:',\n },\n [ContentId.MinCommissionValue]: {\n id: ContentId.MinCommissionValue,\n defaultValue: 'Min value is 0.01%',\n },\n [ContentId.MinListingsRequired]: {\n id: ContentId.MinListingsRequired,\n defaultValue: 'Minimum Listings Required',\n },\n [ContentId.MoreExpensive]: {\n id: ContentId.MoreExpensive,\n defaultValue: 'More Expensive',\n },\n [ContentId.MovePrice]: {\n id: ContentId.MovePrice,\n defaultValue: 'Move price',\n },\n [ContentId.MoveTo]: {\n id: ContentId.MoveTo,\n defaultValue: 'Move to ...',\n },\n [ContentId.MoveToExistingGroup]: {\n id: ContentId.MoveToExistingGroup,\n defaultValue: 'Move to an existing group',\n },\n [ContentId.Multiple]: {\n id: ContentId.Multiple,\n defaultValue: 'Multiple',\n },\n [ContentId.Empty]: {\n id: ContentId.Empty,\n defaultValue: '(Empty)',\n },\n [ContentId.NetCommissionRate]: {\n id: ContentId.NetCommissionRate,\n defaultValue: 'Net Commission Rate',\n },\n [ContentId.NetCommissionRateOverride]: {\n id: ContentId.NetCommissionRateOverride,\n defaultValue: 'Net Commission Rate Override',\n },\n [ContentId.New]: {\n id: ContentId.New,\n defaultValue: 'New',\n },\n [ContentId.NewCustomReport]: {\n id: ContentId.NewCustomReport,\n defaultValue: 'New custom report',\n },\n [ContentId.NewFlashSale]: {\n id: ContentId.NewFlashSale,\n defaultValue: 'Create a new flash sale',\n },\n [ContentId.NextTicket]: {\n id: ContentId.NextTicket,\n defaultValue: 'Next Ticket',\n },\n [ContentId.NoFault]: {\n id: ContentId.NoFault,\n defaultValue: 'No Fault',\n },\n [ContentId.NoHurdle]: {\n id: ContentId.NoHurdle,\n defaultValue: 'No Hurdle',\n },\n [ContentId.NoItemsWereEligibleForUpdate]: {\n id: ContentId.NoItemsWereEligibleForUpdate,\n defaultValue:\n 'There are no items applicable for this edit. Please check your selection.',\n },\n [ContentId.NoResults]: {\n id: ContentId.NoResults,\n defaultValue: 'No Results',\n },\n [ContentId.Normal]: {\n id: ContentId.Normal,\n defaultValue: 'Normal',\n },\n [ContentId.Draft]: {\n id: ContentId.Draft,\n defaultValue: 'Draft',\n },\n [ContentId.Contingent]: {\n id: ContentId.Contingent,\n defaultValue: 'Contingent',\n },\n [ContentId.NoTicketsToWaste]: {\n id: ContentId.NoTicketsToWaste,\n defaultValue:\n 'Waste action cannot be performed for this listing because there are no unsold tickets.',\n },\n [ContentId.NotificationTypeListingPriceUpdate]: {\n id: ContentId.NotificationTypeListingPriceUpdate,\n defaultValue: 'Listing Price Update',\n },\n [ContentId.NotMapped]: {\n id: ContentId.NotMapped,\n defaultValue: 'Not mapped',\n },\n [ContentId.Of]: {\n id: ContentId.Of,\n defaultValue: 'Of',\n },\n [ContentId.OnSaleDate]: {\n id: ContentId.OnSaleDate,\n defaultValue: 'On Sale Date',\n },\n [ContentId.OpenEventPageV2InDevelopment]: {\n id: ContentId.OpenEventPageV2InDevelopment,\n defaultValue: 'Open Event Page v2 (In Development)',\n },\n [ContentId.OriginalProceeds]: {\n id: ContentId.OriginalProceeds,\n defaultValue: 'Original Proceeds',\n },\n [ContentId.OriginalSeating]: {\n id: ContentId.OriginalSeating,\n defaultValue: 'Original Seating',\n },\n [ContentId.OriginatedListing]: {\n id: ContentId.OriginatedListing,\n defaultValue: 'Originated Listing',\n },\n [ContentId.OtherZoneMap]: {\n id: ContentId.OtherZoneMap,\n defaultValue: 'Other Zone Maps',\n },\n [ContentId.OutlierLimit]: {\n id: ContentId.OutlierLimit,\n defaultValue: 'Outlier Limit',\n },\n [ContentId.OutlierSettingsIngoreListings]: {\n id: ContentId.OutlierSettingsIngoreListings,\n defaultValue: 'Ignore all listings more than',\n },\n [ContentId.OutlierSpacing]: {\n id: ContentId.OutlierSpacing,\n defaultValue: 'Outlier Spacing',\n },\n [ContentId.P25]: {\n id: ContentId.P25,\n defaultValue: 'P25',\n },\n [ContentId.P50]: {\n id: ContentId.P50,\n defaultValue: 'P50',\n },\n [ContentId.PartiallyRefunded]: {\n id: ContentId.PartiallyRefunded,\n defaultValue: 'Partially Refunded',\n },\n [ContentId.Page]: {\n id: ContentId.Page,\n defaultValue: 'Page',\n },\n [ContentId.PastPayments]: {\n id: ContentId.PastPayments,\n defaultValue: 'Past Payments',\n },\n [ContentId.PaymentAmount]: {\n id: ContentId.PaymentAmount,\n defaultValue: 'Payment Amount',\n },\n [ContentId.PaymentDetails]: {\n id: ContentId.PaymentDetails,\n defaultValue: 'Payment Details',\n },\n [ContentId.PaymentLine]: {\n id: ContentId.PaymentLine,\n defaultValue: 'Payment Line',\n },\n [ContentId.PaymentLineId]: {\n id: ContentId.PaymentLineId,\n defaultValue: 'Payment Line Id',\n },\n [ContentId.PaymentReferenceID]: {\n id: ContentId.PaymentReferenceID,\n defaultValue: 'Payment Reference ID',\n },\n [ContentId.PaymentsAmount]: {\n id: ContentId.PaymentsAmount,\n defaultValue: 'Payments Amount',\n },\n [ContentId.PayRef]: {\n id: ContentId.PayRef,\n defaultValue: 'Pay Ref',\n },\n [ContentId.PayRec]: {\n id: ContentId.PayRec,\n defaultValue: 'Pay Rec',\n },\n [ContentId.PayState]: {\n id: ContentId.PayState,\n defaultValue: 'Pay State',\n },\n [ContentId.PendingReshipment]: {\n id: ContentId.PendingReshipment,\n defaultValue: 'Pending Reshipment',\n },\n [ContentId.PerformerVenueSpecific]: {\n id: ContentId.PerformerVenueSpecific,\n defaultValue: 'Performer and Venue Specific',\n },\n [ContentId.AssignQRCodesIns]: {\n id: ContentId.AssignQRCodesIns,\n defaultValue: 'Assign an QR code for each seat',\n },\n [ContentId.AssignToDefaultPurchaser]: {\n id: ContentId.AssignToDefaultPurchaser,\n defaultValue: 'Assign to Default',\n },\n [ContentId.at]: {\n id: ContentId.at,\n defaultValue: 'at',\n },\n [ContentId.AtoZ]: {\n id: ContentId.AtoZ,\n defaultValue: 'A to Z',\n },\n [ContentId.AddTicketsForAnotherEvent]: {\n id: ContentId.AddTicketsForAnotherEvent,\n defaultValue: 'Add Tickets for Another Event',\n },\n [ContentId.AddUrl]: {\n id: ContentId.AddUrl,\n defaultValue: 'Add Url',\n },\n [ContentId.AddVendorAction]: {\n id: ContentId.AddVendorAction,\n defaultValue: 'Add new vendor',\n },\n [ContentId.All]: {\n id: ContentId.All,\n defaultValue: 'All',\n },\n [ContentId.AllDeliveryOptions]: {\n id: ContentId.AllDeliveryOptions,\n defaultValue: 'All Delivery Types',\n },\n [ContentId.AllEvents]: {\n id: ContentId.AllEvents,\n defaultValue: 'All Events',\n },\n /**\n * @deprecated Use `ContentId.WebsitePrice`\n */\n [ContentId.AllIn]: {\n id: ContentId.AllIn,\n defaultValue: 'All In',\n },\n [ContentId.AllMerchants]: {\n id: ContentId.AllMerchants,\n defaultValue: 'All Merchants',\n },\n [ContentId.AllocatedSeats]: {\n id: ContentId.AllocatedSeats,\n defaultValue: 'Allocated Seats',\n },\n [ContentId.AllocateTickets]: {\n id: ContentId.AllocateTickets,\n defaultValue: 'Allocate Tickets',\n },\n [ContentId.AllPaymentMethods]: {\n id: ContentId.AllPaymentMethods,\n defaultValue: 'All Payment Methods',\n },\n [ContentId.AllPaymentStates]: {\n id: ContentId.AllPaymentStates,\n defaultValue: 'All Payment States',\n },\n [ContentId.AllSaleStatuses]: {\n id: ContentId.AllSaleStatuses,\n defaultValue: 'All Sale Statuses',\n },\n [ContentId.AllTicketTypes]: {\n id: ContentId.AllTicketTypes,\n defaultValue: 'All Ticket Types',\n },\n [ContentId.AllTime]: {\n id: ContentId.AllTime,\n defaultValue: 'All time',\n },\n [ContentId.AllVendors]: {\n id: ContentId.AllVendors,\n defaultValue: 'All Vendors',\n },\n [ContentId.AllVendorAccounts]: {\n id: ContentId.AllVendorAccounts,\n defaultValue: 'All Vendor Accounts',\n },\n [ContentId.AlreadyInHand]: {\n id: ContentId.AlreadyInHand,\n defaultValue: 'Already in hand',\n },\n [ContentId.AmendTickets]: {\n id: '',\n defaultValue: 'Amend Tickets',\n },\n [ContentId.Amount]: {\n id: ContentId.Amount,\n defaultValue: 'Amount',\n },\n [ContentId.AmountPaid]: {\n id: ContentId.AmountPaid,\n defaultValue: 'Amount Paid',\n },\n [ContentId.AnUploadedDocumentIsRequired]: {\n id: ContentId.AnUploadedDocumentIsRequired,\n defaultValue: 'An uploaded image or document is required.',\n },\n [ContentId.Any]: {\n id: ContentId.Any,\n defaultValue: 'Any',\n },\n [ContentId.AssignETicketsIns]: {\n id: ContentId.AssignETicketsIns,\n defaultValue: 'Assign an e-Ticket for each seat.',\n },\n [ContentId.AtLeastOneUrlRequired]: {\n id: ContentId.AtLeastOneUrlRequired,\n defaultValue: 'At least one URL is required.',\n },\n [ContentId.AtoZArrow]: {\n id: ContentId.AtoZArrow,\n defaultValue: 'AZ ↑',\n },\n [ContentId.ATP]: {\n id: ContentId.ATP,\n defaultValue: 'ATP',\n },\n [ContentId.Attachment]: {\n id: ContentId.Attachment,\n defaultValue: 'Attachment',\n },\n [ContentId.AutoBroadcastNewListing]: {\n id: ContentId.AutoBroadcastNewListing,\n defaultValue: 'Auto-broadcast new listing',\n },\n [ContentId.AutoBroadcastRequiredFaceValue]: {\n id: ContentId.AutoBroadcastRequiredFaceValue,\n defaultValue:\n 'Auto-broadcast listing requires Face Value to be greater than 0.',\n },\n [ContentId.AutoCompAndGroupListings]: {\n id: ContentId.AutoCompAndGroupListings,\n defaultValue: 'Auto-Comp and Group Listings',\n },\n [ContentId.AutoConversion]: {\n id: ContentId.AutoConversion,\n defaultValue: 'Auto Conversion',\n },\n [ContentId.AutoConversionSubtitle]: {\n id: ContentId.AutoConversionSubtitle,\n defaultValue:\n \"Enabling auto-currency will automatically adjust listing costs from non-local currencies to your preferred currency, using the FX rate applicable on the purchase date. Please note that this won't impact your previous listings and will only start converting listings for newly created purchase orders.\",\n },\n [ContentId.AutoFulfill]: {\n id: ContentId.AutoFulfill,\n defaultValue: 'AutoFulfill',\n },\n [ContentId.Automations]: {\n id: ContentId.Automations,\n defaultValue: 'Automations',\n },\n [ContentId.AutoPO]: {\n id: ContentId.AutoPO,\n defaultValue: 'AutoPO',\n },\n [ContentId.AutoPoConfiguration]: {\n id: ContentId.AutoPoConfiguration,\n defaultValue: 'Auto-Po Configurations',\n },\n [ContentId.AutoPoConfigurationDescription]: {\n id: ContentId.AutoPoConfigurationDescription,\n defaultValue:\n 'Only vendors and countries specified here will be considered in our automatic PO generation.',\n },\n [ContentId.AutoPoVendorConfigutationDescription]: {\n id: ContentId.AutoPoVendorConfigutationDescription,\n defaultValue: \"Vendors can be either 'Included' or 'Excluded' - not both.\",\n },\n [ContentId.AutoPriceFrequency]: {\n id: ContentId.AutoPriceFrequency,\n defaultValue: 'Auto Pricing Frequency',\n },\n [ContentId.AutoPricePreview]: {\n id: ContentId.AutoPricePreview,\n defaultValue: 'Auto-pricing Preview',\n },\n [ContentId.AutoPricePreviewSubTitle]: {\n id: ContentId.AutoPricePreviewSubTitle,\n defaultValue: 'Based on the selections below.',\n },\n [ContentId.AutoPricer]: {\n id: ContentId.AutoPricer,\n defaultValue: 'AutoPricer',\n },\n [ContentId.Autopricing]: {\n id: ContentId.Autopricing,\n defaultValue: 'Autopricing',\n },\n [ContentId.AutoPricingAllListingsForEvent]: {\n id: ContentId.AutoPricingAllListingsForEvent,\n defaultValue: 'Event-wide Autopricing',\n },\n [ContentId.AutoPricingAllResultTypeOption]: {\n id: ContentId.AutoPricingAllResultTypeOption,\n defaultValue: 'All Result Types',\n },\n [ContentId.AutoPricingDisclaimer]: {\n id: ContentId.AutoPricingDisclaimer,\n defaultValue:\n 'We aim to provide an estimated price for the website that most buyers are likely to encounter. However, please be aware that we cannot guarantee this price will be consistent for all buyers in every situation.',\n },\n [ContentId.AutoPricingEnabled]: {\n id: ContentId.AutoPricingEnabled,\n defaultValue: 'AutoPrice Enabled',\n },\n [ContentId.AutopricingNotAvailableForGA]: {\n id: ContentId.AutopricingNotAvailableForGA,\n defaultValue: 'Autopricing is not available for GA-only event',\n },\n [ContentId.AutopricingNotAvailableMissingMap]: {\n id: ContentId.AutopricingNotAvailableMissingMap,\n defaultValue: 'Autopricing is not available - seat map unavailable',\n },\n [ContentId.AutopricingNotAvailableNoScoresGeneral]: {\n id: ContentId.AutopricingNotAvailableNoScoresGeneral,\n defaultValue:\n 'This model has no section scores. Section scores are required for the Deal Undercut Mode and Venue Wide Comp. Listing Modes.',\n },\n [ContentId.AutopricingNotAvailableNoScores]: {\n id: ContentId.AutopricingNotAvailableNoScores,\n defaultValue:\n 'This mode is only available when there are section scores in your heat map.',\n },\n [ContentId.AutoPricingResultType]: {\n id: ContentId.AutoPricingResultType,\n defaultValue: 'Autopricing Result',\n },\n [ContentId.AutopricingSettings]: {\n id: ContentId.AutopricingSettings,\n defaultValue: 'Autopricing Settings',\n },\n [ContentId.AutopricingSettingsAll]: {\n id: ContentId.AutopricingSettingsAll,\n defaultValue: 'Autopricing Settings for All',\n },\n [ContentId.AutopricingSettingsAllVisible]: {\n id: ContentId.AutopricingSettingsAllVisible,\n defaultValue: 'Autopricing Settings for All Visible Listings',\n },\n [ContentId.AutopricingSettingsSelected]: {\n id: ContentId.AutopricingSettingsSelected,\n defaultValue: 'Autopricing Settings for Selected',\n },\n [ContentId.AutopricingStrategy]: {\n id: ContentId.AutopricingStrategy,\n defaultValue: 'Autopricing Strategy',\n },\n [ContentId.AutoSetup]: {\n id: ContentId.AutoSetup,\n defaultValue: 'Auto setup',\n },\n [ContentId.Available]: {\n id: ContentId.Available,\n defaultValue: 'Available',\n },\n [ContentId.AvailableInstruction]: {\n id: ContentId.AvailableInstruction,\n defaultValue: 'Tap section to see price and availability',\n },\n [ContentId.AvailableSeats]: {\n id: ContentId.AvailableSeats,\n defaultValue: 'Available Seats',\n },\n [ContentId.AverageTicketPrice]: {\n id: ContentId.AverageTicketPrice,\n defaultValue: 'Average Ticket Price',\n },\n [ContentId.AvoidOne]: {\n id: ContentId.AvoidOne,\n defaultValue: 'Avoid One',\n },\n [ContentId.AvoidOneAndThree]: {\n id: ContentId.AvoidOneAndThree,\n defaultValue: 'Avoid One and Three',\n },\n [ContentId.Back]: {\n id: ContentId.Back,\n defaultValue: 'Back',\n },\n [ContentId.BankTransfer]: {\n id: ContentId.BankTransfer,\n defaultValue: 'Bank Transfer',\n },\n [ContentId.Barcode]: {\n id: ContentId.Barcode,\n defaultValue: 'Barcode',\n },\n [ContentId.BarcodeAlreadyInUsed]: {\n id: ContentId.BarcodeAlreadyInUsed,\n defaultValue: 'Warning - barcode is already used by another ticket.',\n },\n [ContentId.BarcodeRequired]: {\n id: ContentId.BarcodeRequired,\n defaultValue: 'Barcode required.',\n },\n [ContentId.Below]: {\n id: ContentId.Below,\n defaultValue: 'Below',\n },\n [ContentId.BelowTheNextCheapest]: {\n id: ContentId.BelowTheNextCheapest,\n defaultValue: 'below the next cheapest',\n },\n [ContentId.BestRowExtrapolation]: {\n id: ContentId.BestRowExtrapolation,\n defaultValue: 'Best Row Extrapolation',\n },\n [ContentId.BestDealScore]: {\n id: ContentId.BestDealScore,\n defaultValue: 'Best Deal Score',\n },\n [ContentId.Between]: {\n id: ContentId.Between,\n defaultValue: 'Between',\n },\n [ContentId.Better]: {\n id: ContentId.Better,\n defaultValue: 'better',\n },\n [ContentId.BestDealScorePrompt]: {\n id: ContentId.BestDealScorePrompt,\n defaultValue:\n 'Calculate what to price at to have the same Deal Score, then: ',\n },\n [ContentId.Blocked]: {\n id: ContentId.Blocked,\n defaultValue: 'Blocked',\n },\n [ContentId.Boolean]: {\n id: ContentId.Boolean,\n defaultValue: 'Boolean',\n },\n [ContentId.Broadcast]: {\n id: ContentId.Broadcast,\n defaultValue: 'Broadcast',\n },\n [ContentId.BroadcastAll]: {\n id: ContentId.BroadcastAll,\n defaultValue: 'Broadcast All',\n },\n [ContentId.BroadcastAllVisible]: {\n id: ContentId.BroadcastAllVisible,\n defaultValue: 'Broadcast All Visible Listings',\n },\n [ContentId.BroadcastByDefault]: {\n id: ContentId.BroadcastByDefault,\n defaultValue: 'Broadcast by default',\n },\n [ContentId.BroadcastDisabled]: {\n id: ContentId.BroadcastDisabled,\n defaultValue: 'Broadcast disabled',\n },\n [ContentId.Broadcasted]: {\n id: ContentId.Broadcasted,\n defaultValue: 'Broadcasted',\n },\n [ContentId.BroadcastError]: {\n id: ContentId.BroadcastError,\n defaultValue: 'Broadcast Error',\n },\n [ContentId.BroadcastErrorCode_BroadcastListing]: {\n id: ContentId.BroadcastErrorCode_BroadcastListing,\n defaultValue: 'Unable to broadcast the listing due to an unknown reason.',\n },\n [ContentId.BroadcastErrorCode_Unknown]: {\n id: ContentId.BroadcastErrorCode_Unknown,\n defaultValue:\n 'An unkown error has occurred while trying to broadcast the listing.',\n },\n [ContentId.BroadcastErrorCode_UpdatePrice]: {\n id: ContentId.BroadcastErrorCode_UpdatePrice,\n defaultValue:\n 'Failed to update price on the marketplace due to an unknown reason.',\n },\n [ContentId.BroadcastErrorCode_UpdateTicketType]: {\n id: ContentId.BroadcastErrorCode_UpdateTicketType,\n defaultValue:\n 'Failed to update ticket type on the marketplace due to an unknown reason.',\n },\n [ContentId.BroadcastErrorCode_UpdateSplitType]: {\n id: ContentId.BroadcastErrorCode_UpdateSplitType,\n defaultValue:\n 'Failed to update split type on the marketplace due to an unknown reason.',\n },\n [ContentId.BroadcastErrorCode_UpdateInHandDate]: {\n id: ContentId.BroadcastErrorCode_UpdateInHandDate,\n defaultValue:\n 'Failed to update in-hand date on the marketplace due to an unknown reason.',\n },\n [ContentId.BroadcastErrorCode_SplitListing]: {\n id: ContentId.BroadcastErrorCode_SplitListing,\n defaultValue:\n 'Failed to update split listing on the marketplace due to an unknown reason.',\n },\n [ContentId.BroadcastErrorCode_MergeListing]: {\n id: ContentId.BroadcastErrorCode_MergeListing,\n defaultValue:\n 'Failed to update merged listings on the marketplace due to an unknown reason.',\n },\n [ContentId.BroadcastErrorCode_UnbroadcastListing]: {\n id: ContentId.BroadcastErrorCode_UnbroadcastListing,\n defaultValue:\n 'Unable to unbroadcast the listing due to an unknown reason due to an unknown reason.',\n },\n [ContentId.BroadcastErrorCode_UpdateQuantity]: {\n id: ContentId.BroadcastErrorCode_UpdateQuantity,\n defaultValue:\n 'Failed to update quantity on the marketplace due to an unknown reason.',\n },\n [ContentId.BroadcastErrorCode_HideSeats]: {\n id: ContentId.BroadcastErrorCode_HideSeats,\n defaultValue:\n 'Failed to update hide-seats on the marketplace due to an unknown reason.',\n },\n [ContentId.BroadcastErrorCode_UpdateListingNotes]: {\n id: ContentId.BroadcastErrorCode_UpdateListingNotes,\n defaultValue:\n 'Failed to update listing notes on the marketplace due to an unknown reason.',\n },\n [ContentId.BroadcastErrorCode_UpdateSeating]: {\n id: ContentId.BroadcastErrorCode_UpdateSeating,\n defaultValue:\n 'Failed to update seating on the marketplace due to an unknown reason.',\n },\n [ContentId.BroadcastErrorCode_MarketplaceResaleRestricted]: {\n id: ContentId.BroadcastErrorCode_MarketplaceResaleRestricted,\n defaultValue: 'Marketplace restricts resale.',\n },\n [ContentId.BroadcastErrorCode_MarketplaceManifestMismatch]: {\n id: ContentId.BroadcastErrorCode_MarketplaceManifestMismatch,\n defaultValue: 'Marketplace manifest mismatched.',\n },\n [ContentId.BroadcastErrorCode_MarketplacePriceBelowFloor]: {\n id: ContentId.BroadcastErrorCode_MarketplacePriceBelowFloor,\n defaultValue: 'Marketplace price is below the floor.',\n },\n [ContentId.BroadcastSelected]: {\n id: ContentId.BroadcastSelected,\n defaultValue: 'Broadcast Selected',\n },\n [ContentId.BroadcastSettings]: {\n id: ContentId.BroadcastSettings,\n defaultValue: 'Broadcast Settings',\n },\n [ContentId.BroadcastSettingsAllVisible]: {\n id: ContentId.BroadcastSettingsAllVisible,\n defaultValue: 'Broadcast Settings for All Visible Listings',\n },\n [ContentId.BroadcastSettingsForAll]: {\n id: ContentId.BroadcastSettingsForAll,\n defaultValue: 'Broadcast Settings for All',\n },\n [ContentId.BroadcastSettingsForSelected]: {\n id: ContentId.BroadcastSettingsForSelected,\n defaultValue: 'Broadcast Settings for Selected',\n },\n [ContentId.BrowseFile]: {\n id: ContentId.BrowseFile,\n defaultValue: 'Browse File',\n },\n [ContentId.BrowseFiles]: {\n id: ContentId.BrowseFiles,\n defaultValue: 'Browse Files',\n },\n [ContentId.BucketOptions]: {\n id: ContentId.BucketOptions,\n defaultValue: 'Bucket Options',\n },\n [ContentId.BugFixes]: {\n id: ContentId.BugFixes,\n defaultValue: 'Bug Fixes',\n },\n [ContentId.BuildACustomRole]: {\n id: ContentId.BuildACustomRole,\n defaultValue: 'Build a custom role',\n },\n [ContentId.BulkActions]: {\n id: ContentId.BulkActions,\n defaultValue: 'Bulk Actions',\n },\n [ContentId.BulkDeleteSelectedPlaceholderWarning]: {\n id: ContentId.BulkDeleteSelectedPlaceholderWarning,\n defaultValue:\n 'You are about to delete the selected placeholder inventory. Continue?',\n },\n [ContentId.BulkDiscount]: {\n id: ContentId.BulkDiscount,\n defaultValue: 'Bulk Discount',\n },\n [ContentId.BulkEditCancelled]: {\n id: ContentId.BulkEditCancelled,\n defaultValue: 'Bulk edit is cancelled',\n },\n [ContentId.BulkEditDone]: {\n id: ContentId.BulkEditDone,\n defaultValue: 'Bulk edit is done',\n },\n [ContentId.BulkEditFailed]: {\n id: ContentId.BulkEditFailed,\n defaultValue: 'The process failed.',\n },\n [ContentId.BulkEditFloorCeilingCurrentFloorWarning]: {\n id: ContentId.BulkEditFloorCeilingCurrentFloorWarning,\n defaultValue:\n 'Only listings with a current floor will be updated. Listings with price below the floor or above the ceiling will be adjusted to match the new floor or ceiling.',\n },\n [ContentId.BulkEditFloorCeilingUnitCostWarning]: {\n id: ContentId.BulkEditFloorCeilingUnitCostWarning,\n defaultValue:\n 'Only listings with a unit cost will be updated. Listings with price below the floor or above the ceiling will be adjusted to match the new floor or ceiling.',\n },\n [ContentId.BulkEditFloorCeilingWarning]: {\n id: ContentId.BulkEditFloorCeilingWarning,\n defaultValue:\n 'Only listings with a market price will be updated. Listings with price below the floor or above the ceiling will be adjusted to match the new floor or ceiling.',\n },\n [ContentId.BulkEditInProgress]: {\n id: ContentId.BulkEditInProgress,\n defaultValue: 'Bulk edit is in progress',\n },\n [ContentId.BulkEditListPriceAdjustingFloorCeilingWarning]: {\n id: ContentId.BulkEditListPriceAdjustingFloorCeilingWarning,\n defaultValue:\n 'Adjusting any price below the floor or above the ceiling of a listing will auto-adjust the floor or ceiling of that listing.',\n },\n [ContentId.BulkEditPartialFailure]: {\n id: ContentId.BulkEditPartialFailure,\n defaultValue: 'The process completed with some failures.',\n },\n [ContentId.BulkEditPriceFloorCeilingWarning]: {\n id: ContentId.BulkEditPriceFloorCeilingWarning,\n defaultValue:\n 'Changing price floor or ceiling will automatically change any listing price that is outside the boundary.',\n },\n [ContentId.BulkEditPricesWarning]: {\n id: ContentId.BulkEditPricesWarning,\n defaultValue:\n 'Listings with price updates below the floor or above the ceiling will have their floor or ceiling be adjusted to match the new prices.',\n },\n [ContentId.BulkEditStarting]: {\n id: ContentId.BulkEditStarting,\n defaultValue: 'Bulk edit is starting',\n },\n [ContentId.BulkEditSuccess]: {\n id: ContentId.BulkEditSuccess,\n defaultValue: 'The process completed successfully.',\n },\n [ContentId.BulkEntry]: {\n id: ContentId.BulkEntry,\n defaultValue: 'Bulk Entry',\n },\n\n [ContentId.BulkUpload]: {\n id: ContentId.BulkUpload,\n defaultValue: 'Bulk Upload',\n },\n [ContentId.Buyer]: {\n id: ContentId.Buyer,\n defaultValue: 'Buyer',\n },\n [ContentId.BuyerAccounts]: {\n id: ContentId.BuyerAccounts,\n defaultValue: 'Buyer Accounts',\n },\n [ContentId.BuyerCommission]: {\n id: ContentId.BuyerCommission,\n defaultValue: 'Buyer Commission',\n },\n [ContentId.BuyerDeniedEntry]: {\n id: ContentId.BuyerDeniedEntry,\n defaultValue: 'Buyer Denied Entry',\n },\n [ContentId.By]: {\n id: ContentId.By,\n defaultValue: 'by ',\n },\n [ContentId.BypassLimit]: {\n id: ContentId.BypassLimit,\n defaultValue: 'Bypass Limit',\n },\n [ContentId.Calculate]: {\n id: ContentId.Calculate,\n defaultValue: 'Calculate',\n },\n [ContentId.CalculatePrice]: {\n id: ContentId.CalculatePrice,\n defaultValue: 'Calculate Price',\n },\n [ContentId.Cancel]: { id: ContentId.Cancel, defaultValue: 'Cancel' },\n [ContentId.CancellationDate]: {\n id: ContentId.CancellationDate,\n defaultValue: 'Cancellation Date',\n },\n [ContentId.Cancellations]: {\n id: ContentId.Cancellations,\n defaultValue: 'Cancellations',\n },\n [ContentId.Cancelled]: {\n id: ContentId.Cancelled,\n defaultValue: 'Cancelled',\n },\n [ContentId.CancelledEvent]: {\n id: ContentId.CancelledEvent,\n defaultValue: 'Cancelled Event',\n },\n [ContentId.CancelledHold]: {\n id: ContentId.CancelledHold,\n defaultValue: 'Cancelled Hold',\n },\n [ContentId.CancelledHoldOnMarketplace]: {\n id: ContentId.CancelledHoldOnMarketplace,\n defaultValue: 'Cancelled Hold on Marketplace',\n },\n [ContentId.CancelSelectMultiple]: {\n id: ContentId.CancelSelectMultiple,\n defaultValue: 'Cancel Select Multiple',\n },\n [ContentId.CancelTickets]: {\n id: '',\n defaultValue: 'Cancel Tickets',\n },\n [ContentId.CancelPurchase]: {\n id: ContentId.CancelPurchase,\n defaultValue: 'Cancel Purchase',\n },\n [ContentId.CancelPurchaseDescription]: {\n id: ContentId.CancelPurchaseDescription,\n defaultValue: 'Use if the Primary recently cancelled your purchase.',\n },\n [ContentId.CancelVoidPurchase]: {\n id: ContentId.CancelVoidPurchase,\n defaultValue: 'Cancel/Void Purchase',\n },\n\n [ContentId.CannotCalculateUndercut]: {\n id: ContentId.CannotCalculateUndercut,\n defaultValue: 'Cannot Calculate Undercut',\n },\n [ContentId.Cash]: {\n id: ContentId.Cash,\n defaultValue: 'Cash',\n },\n [ContentId.Catchup]: {\n id: ContentId.Catchup,\n defaultValue: 'Catchup',\n },\n [ContentId.Category]: {\n id: ContentId.Category,\n defaultValue: 'Category',\n },\n [ContentId.Category1007]: {\n id: ContentId.Category1007,\n defaultValue: 'Football',\n },\n [ContentId.Category1009]: {\n id: ContentId.Category1009,\n defaultValue: 'Golf',\n },\n [ContentId.Category4286]: {\n id: ContentId.Category4286,\n defaultValue: 'Ice hockey',\n },\n [ContentId.Category5099]: {\n id: ContentId.Category5099,\n defaultValue: 'Rodeo',\n },\n [ContentId.Category6401]: {\n id: ContentId.Category6401,\n defaultValue: 'American Football',\n },\n [ContentId.Category6404]: {\n id: ContentId.Category6404,\n defaultValue: 'Basketball',\n },\n [ContentId.Category6451]: {\n id: ContentId.Category6451,\n defaultValue: 'Motorsport',\n },\n [ContentId.Category6452]: {\n id: ContentId.Category6452,\n defaultValue: 'Baseball',\n },\n [ContentId.Category12567]: {\n id: ContentId.Category12567,\n defaultValue: 'Rowing',\n },\n [ContentId.Category263024]: {\n id: ContentId.Category263024,\n defaultValue: 'College Sports',\n },\n [ContentId.Category272988]: {\n id: ContentId.Category272988,\n defaultValue: 'Gymnastics',\n },\n [ContentId.Category272989]: {\n id: ContentId.Category272989,\n defaultValue: 'Wrestling',\n },\n [ContentId.Category273013]: {\n id: ContentId.Category273013,\n defaultValue: 'Curling',\n },\n [ContentId.Category273026]: {\n id: ContentId.Category273026,\n defaultValue: 'Fight',\n },\n [ContentId.Category273031]: {\n id: ContentId.Category273031,\n defaultValue: 'Tennis',\n },\n [ContentId.Category273034]: {\n id: ContentId.Category273034,\n defaultValue: 'Horse Racing',\n },\n [ContentId.Category273055]: {\n id: ContentId.Category273055,\n defaultValue: 'Extreme Sports',\n },\n [ContentId.Category273057]: {\n id: ContentId.Category273057,\n defaultValue: 'Figure Skating',\n },\n [ContentId.Category273089]: {\n id: ContentId.Category273089,\n defaultValue: '[All Other Sports]',\n },\n [ContentId.Category273137]: {\n id: ContentId.Category273137,\n defaultValue: 'Swimming',\n },\n [ContentId.Category273138]: {\n id: ContentId.Category273138,\n defaultValue: 'Bodybuilding',\n },\n [ContentId.Category273164]: {\n id: ContentId.Category273164,\n defaultValue: 'Lacrosse',\n },\n [ContentId.Category273171]: {\n id: ContentId.Category273171,\n defaultValue: 'Track and Field',\n },\n [ContentId.Category273393]: {\n id: ContentId.Category273393,\n defaultValue: 'Softball',\n },\n [ContentId.Category273409]: {\n id: ContentId.Category273409,\n defaultValue: 'Equestrian',\n },\n [ContentId.Category273431]: {\n id: ContentId.Category273431,\n defaultValue: 'Rugby',\n },\n [ContentId.Category273485]: {\n id: ContentId.Category273485,\n defaultValue: 'Volleyball',\n },\n [ContentId.Category273529]: {\n id: ContentId.Category273529,\n defaultValue: 'Exhibition Sports',\n },\n [ContentId.Category273657]: {\n id: ContentId.Category273657,\n defaultValue: 'Marching Band',\n },\n [ContentId.Category274164]: {\n id: ContentId.Category274164,\n defaultValue: 'Cricket',\n },\n [ContentId.Category274701]: {\n id: ContentId.Category274701,\n defaultValue: 'Darts',\n },\n [ContentId.Category274794]: {\n id: ContentId.Category274794,\n defaultValue: 'Dance and Cheer Competition',\n },\n [ContentId.Category275344]: {\n id: ContentId.Category275344,\n defaultValue: 'Snooker',\n },\n [ContentId.Category275641]: {\n id: ContentId.Category275641,\n defaultValue: 'Handball',\n },\n [ContentId.Category276077]: {\n id: ContentId.Category276077,\n defaultValue: 'Polo',\n },\n [ContentId.Category276281]: {\n id: ContentId.Category276281,\n defaultValue: 'Sports and Outdoors',\n },\n [ContentId.Category276306]: {\n id: ContentId.Category276306,\n defaultValue: 'Aviation',\n },\n [ContentId.Category276308]: {\n id: ContentId.Category276308,\n defaultValue: 'Hunting',\n },\n [ContentId.Category276311]: {\n id: ContentId.Category276311,\n defaultValue: 'Amateur Sports',\n },\n [ContentId.Category276861]: {\n id: ContentId.Category276861,\n defaultValue: 'eSports',\n },\n [ContentId.Category278221]: {\n id: ContentId.Category278221,\n defaultValue: 'Bullfighting',\n },\n [ContentId.Category278837]: {\n id: ContentId.Category278837,\n defaultValue: 'Sumo Wrestling',\n },\n [ContentId.Category279267]: {\n id: ContentId.Category279267,\n defaultValue: 'Strongman Sports',\n },\n [ContentId.Category279563]: {\n id: ContentId.Category279563,\n defaultValue: 'Sports Competition',\n },\n [ContentId.Category289352]: {\n id: ContentId.Category289352,\n defaultValue: 'Australian Football',\n },\n [ContentId.Category150012246]: {\n id: ContentId.Category150012246,\n defaultValue: 'Sports Parking',\n },\n [ContentId.Category1013]: {\n id: ContentId.Category1013,\n defaultValue: 'Ballet and Dance',\n },\n [ContentId.Category1015]: {\n id: ContentId.Category1015,\n defaultValue: 'Comedy',\n },\n [ContentId.Category1017]: {\n id: ContentId.Category1017,\n defaultValue: 'Musicals',\n },\n [ContentId.Category2294]: {\n id: ContentId.Category2294,\n defaultValue: 'Family',\n },\n [ContentId.Category4551]: {\n id: ContentId.Category4551,\n defaultValue: 'Cirque du Soleil',\n },\n [ContentId.Category6403]: {\n id: ContentId.Category6403,\n defaultValue: 'Conferences and Speaking Tours',\n },\n [ContentId.Category55548]: {\n id: ContentId.Category55548,\n defaultValue: 'Story of 60s & Woodstock',\n },\n [ContentId.Category259716]: {\n id: ContentId.Category259716,\n defaultValue: 'Classical Music and Opera',\n },\n [ContentId.Category356361]: {\n id: ContentId.Category356361,\n defaultValue: 'Las Vegas Show',\n },\n [ContentId.Category356453]: {\n id: ContentId.Category356453,\n defaultValue: 'Film Festival',\n },\n [ContentId.Category356499]: {\n id: ContentId.Category356499,\n defaultValue: 'Festivals and Fairs',\n },\n [ContentId.Category356585]: {\n id: ContentId.Category356585,\n defaultValue: 'Other Theater and Misc',\n },\n [ContentId.Category357019]: {\n id: ContentId.Category357019,\n defaultValue: 'VIP Event and Party',\n },\n [ContentId.Category357036]: {\n id: ContentId.Category357036,\n defaultValue: 'Movie Event',\n },\n [ContentId.Category358121]: {\n id: ContentId.Category358121,\n defaultValue: 'Broadway',\n },\n [ContentId.Category358959]: {\n id: ContentId.Category358959,\n defaultValue: 'Plays',\n },\n [ContentId.Category366262]: {\n id: ContentId.Category366262,\n defaultValue: 'Arts & Crafts',\n },\n [ContentId.Category366288]: {\n id: ContentId.Category366288,\n defaultValue: 'Performing Arts',\n },\n [ContentId.Category366529]: {\n id: ContentId.Category366529,\n defaultValue: 'Food and Dining',\n },\n [ContentId.Category366888]: {\n id: ContentId.Category366888,\n defaultValue: 'Tourist Attraction',\n },\n [ContentId.Category375100]: {\n id: ContentId.Category375100,\n defaultValue: 'Horse Show',\n },\n [ContentId.Category379731]: {\n id: ContentId.Category379731,\n defaultValue: 'LGBT',\n },\n [ContentId.Category379991]: {\n id: ContentId.Category379991,\n defaultValue: 'Encore Primary',\n },\n [ContentId.Category380480]: {\n id: ContentId.Category380480,\n defaultValue: 'Home',\n },\n [ContentId.Category381561]: {\n id: ContentId.Category381561,\n defaultValue: 'Sex n the City, a Musical Parody',\n },\n [ContentId.Category150002820]: {\n id: ContentId.Category150002820,\n defaultValue: 'TV-Show',\n },\n [ContentId.Category1014]: {\n id: ContentId.Category1014,\n defaultValue: 'Classical',\n },\n [ContentId.Category1022]: {\n id: ContentId.Category1022,\n defaultValue: 'Club and dance',\n },\n [ContentId.Category1023]: {\n id: ContentId.Category1023,\n defaultValue: 'Festival Tickets',\n },\n [ContentId.Category1026]: {\n id: ContentId.Category1026,\n defaultValue: 'Rap/Hip-Hop/Reggae',\n },\n [ContentId.Category1027]: {\n id: ContentId.Category1027,\n defaultValue: 'R&B/Urban Soul',\n },\n [ContentId.Category1059]: {\n id: ContentId.Category1059,\n defaultValue: 'Alternative and Indie',\n },\n [ContentId.Category1205]: {\n id: ContentId.Category1205,\n defaultValue: 'Country and Folk',\n },\n [ContentId.Category14858]: {\n id: ContentId.Category14858,\n defaultValue: 'Gospel Concert',\n },\n [ContentId.Category259810]: {\n id: ContentId.Category259810,\n defaultValue: 'Classical and Vocal Music',\n },\n [ContentId.Category259815]: {\n id: ContentId.Category259815,\n defaultValue: 'Latin Music',\n },\n [ContentId.Category259819]: {\n id: ContentId.Category259819,\n defaultValue: 'Jazz Music',\n },\n [ContentId.Category259820]: {\n id: ContentId.Category259820,\n defaultValue: 'New Age and Spiritual Music',\n },\n [ContentId.Category259822]: {\n id: ContentId.Category259822,\n defaultValue: 'RB and Soul Music',\n },\n [ContentId.Category259823]: {\n id: ContentId.Category259823,\n defaultValue: 'Pop Music',\n },\n [ContentId.Category259824]: {\n id: ContentId.Category259824,\n defaultValue: 'World Music',\n },\n [ContentId.Category259827]: {\n id: ContentId.Category259827,\n defaultValue: 'Rock Music',\n },\n [ContentId.Category259828]: {\n id: ContentId.Category259828,\n defaultValue: 'Reggae Music',\n },\n [ContentId.Category259829]: {\n id: ContentId.Category259829,\n defaultValue: 'Blues Music',\n },\n [ContentId.Category259833]: {\n id: ContentId.Category259833,\n defaultValue: 'Vocal Performance Music',\n },\n [ContentId.Category259921]: {\n id: ContentId.Category259921,\n defaultValue: 'Rock, Pop and Hip-Hop',\n },\n [ContentId.Category259922]: {\n id: ContentId.Category259922,\n defaultValue: 'Jazz, Blues and RnB Music',\n },\n [ContentId.Category260261]: {\n id: ContentId.Category260261,\n defaultValue: 'Bluegrass',\n },\n [ContentId.Category260263]: {\n id: ContentId.Category260263,\n defaultValue: 'Christian',\n },\n [ContentId.Category260264]: {\n id: ContentId.Category260264,\n defaultValue: 'Cover / Tribute',\n },\n [ContentId.Category260265]: {\n id: ContentId.Category260265,\n defaultValue: 'Flamenco',\n },\n [ContentId.Category260266]: {\n id: ContentId.Category260266,\n defaultValue: 'Funk',\n },\n [ContentId.Category260267]: {\n id: ContentId.Category260267,\n defaultValue: 'Indie',\n },\n [ContentId.Category260268]: {\n id: ContentId.Category260268,\n defaultValue: 'Progressive Rock',\n },\n [ContentId.Category260270]: {\n id: ContentId.Category260270,\n defaultValue: 'Electronic',\n },\n [ContentId.Category260271]: {\n id: ContentId.Category260271,\n defaultValue: 'Childrens',\n },\n [ContentId.Category260275]: {\n id: ContentId.Category260275,\n defaultValue: 'Miscellaneous Music',\n },\n [ContentId.Category260347]: {\n id: ContentId.Category260347,\n defaultValue: 'Country Tickets',\n },\n [ContentId.Category260357]: {\n id: ContentId.Category260357,\n defaultValue: 'Blues',\n },\n [ContentId.Category260385]: {\n id: ContentId.Category260385,\n defaultValue: 'Easy Listening Tickets',\n },\n [ContentId.Category260389]: {\n id: ContentId.Category260389,\n defaultValue: 'Reggae Tickets',\n },\n [ContentId.Category260392]: {\n id: ContentId.Category260392,\n defaultValue: \"Children's Tickets\",\n },\n [ContentId.Category260421]: {\n id: ContentId.Category260421,\n defaultValue: 'Jazz',\n },\n [ContentId.Category260478]: {\n id: ContentId.Category260478,\n defaultValue: 'Rap Tickets',\n },\n [ContentId.Category260483]: {\n id: ContentId.Category260483,\n defaultValue: 'Stage & Screen',\n },\n [ContentId.Category260492]: {\n id: ContentId.Category260492,\n defaultValue: 'International Tickets',\n },\n [ContentId.Category260530]: {\n id: ContentId.Category260530,\n defaultValue: 'Vocal Tickets',\n },\n [ContentId.Category260539]: {\n id: ContentId.Category260539,\n defaultValue: 'Avant-Garde Tickets',\n },\n [ContentId.Category260542]: {\n id: ContentId.Category260542,\n defaultValue: 'Pop/Rock',\n },\n [ContentId.Category260601]: {\n id: ContentId.Category260601,\n defaultValue: 'Electronic Tickets',\n },\n [ContentId.Category260624]: {\n id: ContentId.Category260624,\n defaultValue: 'New Age Tickets',\n },\n [ContentId.Category260628]: {\n id: ContentId.Category260628,\n defaultValue: 'Folk Tickets',\n },\n [ContentId.Category260637]: {\n id: ContentId.Category260637,\n defaultValue: 'Latin Tickets',\n },\n [ContentId.Category260644]: {\n id: ContentId.Category260644,\n defaultValue: 'Religious Tickets',\n },\n [ContentId.Category261289]: {\n id: ContentId.Category261289,\n defaultValue: 'Holiday Tickets',\n },\n [ContentId.Category261291]: {\n id: ContentId.Category261291,\n defaultValue: 'Comedy/Spoken Tickets',\n },\n [ContentId.Category308335]: {\n id: ContentId.Category308335,\n defaultValue: 'Acoustic',\n },\n [ContentId.Category308336]: {\n id: ContentId.Category308336,\n defaultValue: 'Ambient',\n },\n [ContentId.Category308341]: {\n id: ContentId.Category308341,\n defaultValue: 'Celtic',\n },\n [ContentId.Category308342]: {\n id: ContentId.Category308342,\n defaultValue: 'Disco',\n },\n [ContentId.Category308344]: {\n id: ContentId.Category308344,\n defaultValue: 'Doo Wop',\n },\n [ContentId.Category308345]: {\n id: ContentId.Category308345,\n defaultValue: 'Easy Listening',\n },\n [ContentId.Category308350]: {\n id: ContentId.Category308350,\n defaultValue: 'Hardcore',\n },\n [ContentId.Category308351]: {\n id: ContentId.Category308351,\n defaultValue: 'House',\n },\n [ContentId.Category308352]: {\n id: ContentId.Category308352,\n defaultValue: 'Industrial',\n },\n [ContentId.Category308353]: {\n id: ContentId.Category308353,\n defaultValue: 'Karaoke / Open Mic',\n },\n [ContentId.Category308355]: {\n id: ContentId.Category308355,\n defaultValue: 'Mariachi',\n },\n [ContentId.Category308357]: {\n id: ContentId.Category308357,\n defaultValue: 'Punk',\n },\n [ContentId.Category308358]: {\n id: ContentId.Category308358,\n defaultValue: 'Rockabilly',\n },\n [ContentId.Category308363]: {\n id: ContentId.Category308363,\n defaultValue: 'Ska',\n },\n [ContentId.Category308364]: {\n id: ContentId.Category308364,\n defaultValue: 'Surf Rock',\n },\n [ContentId.Category308365]: {\n id: ContentId.Category308365,\n defaultValue: 'Tejano',\n },\n [ContentId.Category308385]: {\n id: ContentId.Category308385,\n defaultValue: 'Trance',\n },\n [ContentId.Category321834]: {\n id: ContentId.Category321834,\n defaultValue: 'K-pop',\n },\n [ContentId.Category1024]: {\n id: ContentId.Category1024,\n defaultValue: 'Hard Rock and Metal Music',\n },\n [ContentId.CeilingRelativeToUnitCost]: {\n id: ContentId.CeilingRelativeToUnitCost,\n defaultValue: 'Ceiling Relative to Unit Cost',\n },\n [ContentId.ChangeEvent]: {\n id: ContentId.ChangeEvent,\n defaultValue: 'Change Event',\n },\n [ContentId.ChangeEventAll]: {\n id: ContentId.ChangeEventAll,\n defaultValue: 'Change Event for All',\n },\n [ContentId.ChangeEventSelected]: {\n id: ContentId.ChangeEventSelected,\n defaultValue: 'Change Event for Selected',\n },\n [ContentId.ChangeGroupBy]: {\n id: ContentId.ChangeGroupBy,\n defaultValue: 'Change Group By',\n },\n [ContentId.ChangeGroupByWarning]: {\n id: ContentId.ChangeGroupByWarning,\n defaultValue:\n 'Changing from the current grouping type will make some of the existing columns disappear. Are you sure?',\n },\n [ContentId.ChangePassword]: {\n id: ContentId.ChangePassword,\n defaultValue: 'Change password',\n },\n [ContentId.ChangeSectionScore]: {\n id: ContentId.ChangeSectionScore,\n defaultValue: 'Change Score for Section',\n },\n [ContentId.ChangeTagValueTypeWarning]: {\n id: ContentId.ChangeTagValueTypeWarning,\n defaultValue:\n 'Changing the value type will clear the existing values for this tag that are not of the new type. Are you sure?',\n },\n [ContentId.ChangeValueType]: {\n id: ContentId.ChangeValueType,\n defaultValue: 'Change Value Type for Key',\n },\n [ContentId.ChangeVendorAccount]: {\n id: ContentId.ChangeVendorAccount,\n defaultValue: 'Change Vendor Account',\n },\n [ContentId.Charge]: {\n id: ContentId.Charge,\n defaultValue: 'Charge',\n },\n [ContentId.Charges]: {\n id: ContentId.Charges,\n defaultValue: 'Charges',\n },\n [ContentId.CharityEvent]: {\n id: ContentId.CharityEvent,\n defaultValue: 'Charity Event',\n },\n [ContentId.Cheapest]: {\n id: ContentId.Cheapest,\n defaultValue: 'Cheapest',\n },\n [ContentId.Checkbox]: {\n id: ContentId.Checkbox,\n defaultValue: 'Checkbox',\n },\n [ContentId.ChooseBuyer]: {\n id: ContentId.ChooseBuyer,\n defaultValue: 'Choose Buyer',\n },\n [ContentId.ChooseSection]: {\n id: ContentId.ChooseSection,\n defaultValue: 'Choose Section',\n },\n [ContentId.ChooseRow]: {\n id: ContentId.ChooseRow,\n defaultValue: 'Choose Row',\n },\n [ContentId.ChooseWidgets]: {\n id: ContentId.ChooseWidgets,\n defaultValue: 'Choose Widgets to Display',\n },\n [ContentId.ChooseYourDisplaySettings]: {\n id: ContentId.ChooseYourDisplaySettings,\n defaultValue: 'Choose your display settings',\n },\n [ContentId.ChooseZone]: {\n id: ContentId.ChooseZone,\n defaultValue: 'Choose Zone',\n },\n [ContentId.ClassifyMessage]: {\n id: ContentId.ClassifyMessage,\n defaultValue: 'Classify Message',\n },\n [ContentId.ClearAll]: {\n id: ContentId.ClearAll,\n defaultValue: 'Clear all',\n },\n [ContentId.ClearAndOverwrite]: {\n id: ContentId.ClearAndOverwrite,\n defaultValue: 'Clear and Overwrite',\n },\n [ContentId.ClearBrowsingData]: {\n id: ContentId.ClearBrowsingData,\n defaultValue: 'Clear Browsing Data',\n },\n [ContentId.ClearBrowsingDataHelp]: {\n id: ContentId.ClearBrowsingDataHelp,\n defaultValue:\n 'Clearing browsing data removes stored local information such as cached files and cookies from your session. This action does not affect your inventory data.',\n },\n [ContentId.ClearData]: {\n id: ContentId.ClearData,\n defaultValue: 'Clear Data',\n },\n [ContentId.ClearListingAutoPricingSettings]: {\n id: ContentId.ClearListingAutoPricingSettings,\n defaultValue: 'Clear Listing Auto Pricing Settings',\n },\n [ContentId.Clusters]: {\n id: ContentId.Clusters,\n defaultValue: 'Clusters',\n },\n [ContentId.Columns]: {\n id: ContentId.Columns,\n defaultValue: 'Columns',\n },\n [ContentId.ColumnSettings]: {\n id: ContentId.ColumnSettings,\n defaultValue: 'Column Settings',\n },\n [ContentId.ColumnWithSameNameExists]: {\n id: ContentId.ColumnWithSameNameExists,\n defaultValue: 'Column with the same name exists',\n },\n [ContentId.CombinedPermissionViewDescription]: {\n id: ContentId.CombinedPermissionViewDescription,\n defaultValue:\n 'This is a combined and read-only view of all the permissions based on all the roles the user has.',\n },\n [ContentId.CommaSeparatedValuesExt]: {\n id: ContentId.CommaSeparatedValuesExt,\n defaultValue: 'Comma Separated Values (.csv)',\n },\n [ContentId.Comments]: {\n id: ContentId.Comments,\n defaultValue: 'Comments',\n },\n [ContentId.Commission]: {\n id: ContentId.Commission,\n defaultValue: 'Commission',\n },\n [ContentId.Commissioner]: {\n id: ContentId.Commissioner,\n defaultValue: 'Commissioner',\n },\n [ContentId.Comparables]: {\n id: ContentId.Comparables,\n defaultValue: 'Comparables',\n },\n [ContentId.CompCeiling]: {\n id: ContentId.CompCeiling,\n defaultValue: 'Comp. Ceiling',\n },\n [ContentId.CompFloor]: {\n id: ContentId.CompFloor,\n defaultValue: 'Comp. Floor',\n },\n [ContentId.CompListingCeiling]: {\n id: ContentId.CompListingCeiling,\n defaultValue: 'Comp. Listing Ceiling',\n },\n [ContentId.CompListingFloorMustLessThanCeiling]: {\n id: ContentId.CompListingFloorMustLessThanCeiling,\n defaultValue: 'Comp. Listing Floor must be less than Ceiling.',\n },\n [ContentId.CompListingModePrompt]: {\n id: ContentId.CompListingModePrompt,\n defaultValue: 'Which listings to price against?',\n },\n [ContentId.CompListingOnlyForSameZone]: {\n id: ContentId.CompListingOnlyForSameZone,\n defaultValue: 'Restrict to Same Zone',\n },\n // TODO: SponsoredListings - Clean up & sort alphabetically\n [ContentId.Perk]: {\n id: ContentId.Perk,\n defaultValue: 'Perk',\n },\n [ContentId.Permission_AdPlatformEdit]: {\n id: ContentId.Permission_AdPlatformEdit,\n defaultValue: 'Access to Sponsored Listings',\n },\n [ContentId.Permission_EditVendor]: {\n id: ContentId.Permission_EditVendor,\n defaultValue: 'Manage Vendors',\n },\n [ContentId.Permission_EventConfig_Create]: {\n id: ContentId.Permission_EventConfig_Create,\n defaultValue: 'Create Event Settings',\n },\n [ContentId.Permission_EventConfig_Edit]: {\n id: ContentId.Permission_EventConfig_Edit,\n defaultValue: 'Edit Event Settings',\n },\n [ContentId.Permission_EventConfig_View]: {\n id: ContentId.Permission_EventConfig_View,\n defaultValue: 'View Event Settings',\n },\n [ContentId.Permission_LockUnlockCommission]: {\n id: ContentId.Permission_LockUnlockCommission,\n defaultValue: 'Lock/Unlock commission',\n },\n [ContentId.Permission_LockUnlockCommissionOwned]: {\n id: ContentId.Permission_LockUnlockCommissionOwned,\n defaultValue: 'Lock/Unlock commission on created purchase',\n },\n [ContentId.Permission_UpdateDeliveryStrategyOnPurchasedListings]: {\n id: ContentId.Permission_UpdateDeliveryStrategyOnPurchasedListings,\n defaultValue: 'Update delivery strategy on purchased listings (Purchaser)',\n },\n [ContentId.Permission_UpdateDeliveryStrategyOnPricedListings]: {\n id: ContentId.Permission_UpdateDeliveryStrategyOnPricedListings,\n defaultValue: 'Update delivery strategy on priced listings (Pricer)',\n },\n [ContentId.Permission_UpdateDeliveryStrategy]: {\n id: ContentId.Permission_UpdateDeliveryStrategy,\n defaultValue: 'Update delivery strategy',\n },\n [ContentId.Permission_UpdateDeliveryType]: {\n id: ContentId.Permission_UpdateDeliveryType,\n defaultValue: 'Update delivery type',\n },\n [ContentId.Permission_UpdateDeliveryTypeOwned]: {\n id: ContentId.Permission_UpdateDeliveryTypeOwned,\n defaultValue: 'Update delivery type on created purchase',\n },\n [ContentId.Permission_UpdateSeatTraits]: {\n id: ContentId.Permission_UpdateSeatTraits,\n defaultValue: 'Update seat traits',\n },\n [ContentId.Permission_UpdateSeatTraitsOwned]: {\n id: ContentId.Permission_UpdateSeatTraitsOwned,\n defaultValue: 'Update seat traits on created purchase',\n },\n [ContentId.Permission_UpdateCustomDeliveryType]: {\n id: ContentId.Permission_UpdateCustomDeliveryType,\n defaultValue: 'Set Custom delivery type',\n },\n [ContentId.Permission_UpdateCustomDeliveryTypeOwned]: {\n id: ContentId.Permission_UpdateCustomDeliveryTypeOwned,\n defaultValue: 'Set Custom delivery type on created purchase',\n },\n [ContentId.Permission_ViewNotifications]: {\n id: ContentId.Permission_ViewNotifications,\n defaultValue: 'View Notifications',\n },\n [ContentId.Permission_ViewPaymentsOnSale]: {\n id: ContentId.Permission_ViewPaymentsOnSale,\n defaultValue: 'View payments on sale',\n },\n [ContentId.Permission_ViewReleaseNotes]: {\n id: ContentId.Permission_ViewReleaseNotes,\n defaultValue: \"View What's New\",\n },\n [ContentId.Permission_ViewStubhubPayments]: {\n id: ContentId.Permission_ViewStubhubPayments,\n defaultValue: 'View Payments on StubHub',\n },\n [ContentId.PmtAmount]: {\n id: ContentId.PmtAmount,\n defaultValue: 'Pmt Amount',\n },\n [ContentId.PmtLineId]: {\n id: ContentId.PmtLineId,\n defaultValue: 'Pmt Line Id',\n },\n [ContentId.PmtMethod]: {\n id: ContentId.PmtMethod,\n defaultValue: 'Pmt Method',\n },\n [ContentId.PmtState]: {\n id: ContentId.PmtState,\n defaultValue: 'Pmt State',\n },\n [ContentId.PmtType]: {\n id: ContentId.PmtType,\n defaultValue: 'Pmt Type',\n },\n [ContentId.PmtStatus]: {\n id: ContentId.PmtStatus,\n defaultValue: 'Pmt Status',\n },\n [ContentId.PreSaleDate]: {\n id: ContentId.PreSaleDate,\n defaultValue: 'Pre-sale Date',\n },\n [ContentId.Prev]: {\n id: ContentId.Prev,\n defaultValue: 'Prev',\n },\n [ContentId.PreviousTicket]: {\n id: ContentId.PreviousTicket,\n defaultValue: 'Previous Ticket',\n },\n [ContentId.PriceAgainst]: {\n id: ContentId.PriceAgainst,\n defaultValue: 'Price against',\n },\n [ContentId.PriceMin]: {\n id: ContentId.PriceMin,\n defaultValue: 'Price Min',\n },\n [ContentId.PriceP25]: {\n id: ContentId.PriceP25,\n defaultValue: 'Price P25',\n },\n [ContentId.PriceP50]: {\n id: ContentId.PriceP50,\n defaultValue: 'Price P50',\n },\n [ContentId.PriceToMarket]: {\n id: ContentId.PriceToMarket,\n defaultValue: 'Price to Market',\n },\n [ContentId.PricingAgainst]: {\n id: ContentId.PricingAgainst,\n defaultValue: 'Pricing Against',\n },\n [ContentId.PricingSettingsListingsConflictWarning]: {\n id: ContentId.PricingSettingsListingsConflictWarning,\n defaultValue:\n 'Selected listings have conflicting settings. Only edited settings will be updated when applied.',\n },\n [ContentId.Proceed]: {\n id: ContentId.Proceed,\n defaultValue: 'Proceed',\n },\n [ContentId.ProceedRepayment]: {\n id: ContentId.ProceedRepayment,\n defaultValue: 'Proceed Repayment',\n },\n [ContentId.ProceedsAmount]: {\n id: ContentId.ProceedsAmount,\n defaultValue: 'Proceeds Amount',\n },\n [ContentId.Purchases_EditVendor_Details]: {\n id: ContentId.Purchases_EditVendor_Details,\n defaultValue: 'Add/Edit Vendors and Vendor Accounts',\n },\n [ContentId.Purchases_LockUnlockCommission_Details]: {\n id: ContentId.Purchases_LockUnlockCommission_Details,\n defaultValue: 'Lock/Unlock commission on purchases',\n },\n [ContentId.Purchases_LockUnlockCommissionOwned_Details]: {\n id: ContentId.Purchases_LockUnlockCommissionOwned_Details,\n defaultValue: 'Lock/Unlock commission on owned purchases',\n },\n [ContentId.Purchases_UpdateDeliveryType_Details]: {\n id: ContentId.Purchases_UpdateDeliveryType_Details,\n defaultValue: 'Add/Edit delivery type on purchases',\n },\n [ContentId.Purchases_UpdateDeliveryTypeOwned_Details]: {\n id: ContentId.Purchases_UpdateDeliveryTypeOwned_Details,\n defaultValue: 'Add/Edit delivery type on owned purchases',\n },\n [ContentId.Purchases_UpdateCustomDeliveryType_Details]: {\n id: ContentId.Purchases_UpdateCustomDeliveryType_Details,\n defaultValue:\n 'Add/Edit Custom delivery type on purchases in addition to normal delivery types',\n },\n [ContentId.Purchases_UpdateCustomDeliveryTypeOwned_Details]: {\n id: ContentId.Purchases_UpdateCustomDeliveryTypeOwned_Details,\n defaultValue:\n 'Add/Edit Custom delivery type on owned purchases in addition to normal delivery types',\n },\n [ContentId.Purchases_UpdateSeatTraits_Details]: {\n id: ContentId.Purchases_UpdateSeatTraits_Details,\n defaultValue: 'Edit seat traits on purchases',\n },\n [ContentId.Purchases_UpdateSeatTraitsOwned_Details]: {\n id: ContentId.Purchases_UpdateSeatTraitsOwned_Details,\n defaultValue: 'Edit seat traits on owned purchases',\n },\n [ContentId.Quantities]: {\n id: ContentId.Quantities,\n defaultValue: 'Quantities',\n },\n [ContentId.QuantitiesFilter]: {\n id: ContentId.QuantitiesFilter,\n defaultValue: 'Quantities Filter',\n },\n [ContentId.RankPremiumTips]: {\n id: ContentId.RankPremiumTips,\n defaultValue: 'Separate out your listings by a certain amount',\n },\n [ContentId.RawVenueCatData]: {\n id: ContentId.RawVenueCatData,\n defaultValue: 'Raw venue catalog data',\n },\n [ContentId.Rear]: {\n id: ContentId.Rear,\n defaultValue: 'Rear',\n },\n [ContentId.Received]: {\n id: ContentId.Received,\n defaultValue: 'Received',\n },\n [ContentId.ReceivedDate]: {\n id: ContentId.ReceivedDate,\n defaultValue: 'Received Date',\n },\n [ContentId.RemainingSeatingOnly]: {\n id: ContentId.RemainingSeatingOnly,\n defaultValue: 'Remaining Seating Only',\n },\n [ContentId.RemoveExistingTicketsOption]: {\n id: ContentId.RemoveExistingTicketsOption,\n defaultValue:\n 'Remove existing tickets: Delete previously used tickets and re-fulfill with new ones.',\n },\n [ContentId.RemoveFromGroup]: {\n id: ContentId.RemoveFromGroup,\n defaultValue: 'Remove from group',\n },\n [ContentId.RemoveFromSale]: {\n id: ContentId.RemoveFromSale,\n defaultValue: 'Remove from Sale',\n },\n [ContentId.RemoveHoldConfirmation]: {\n id: ContentId.RemoveHoldConfirmation,\n defaultValue:\n 'This action will remove holds on applicable selected listings. Are you sure?',\n },\n [ContentId.RemovePaymentReference]: {\n id: ContentId.RemovePaymentReference,\n defaultValue: 'Yes, remove the payment reference',\n },\n [ContentId.ReplaceAndOverrideSeatTraits]: {\n id: ContentId.ReplaceAndOverrideSeatTraits,\n defaultValue: 'Replace and Override Seat Traits',\n },\n [ContentId.ReportNotAvailable]: {\n id: ContentId.ReportNotAvailable,\n defaultValue:\n \"The report doesn't exist or you do not have permission to view it.\",\n },\n [ContentId.ResetFulfillmentWarningV2]: {\n id: ContentId.ResetFulfillmentWarningV2,\n defaultValue:\n \"You're about to Reset Fulfillment. This action will put the sale back to Pending Re-fulfillment and remove all existing tickets that were originally used to fulfill the sale. Continue?\",\n },\n [ContentId.ResetOverride]: {\n id: ContentId.ResetOverride,\n defaultValue: 'Reset Override',\n },\n [ContentId.ResetToOriginal]: {\n id: ContentId.ResetToOriginal,\n defaultValue: 'Reset to Original',\n },\n [ContentId.RestartExperiment]: {\n id: ContentId.RestartExperiment,\n defaultValue: 'Restart Experiment',\n },\n [ContentId.RestrictionOnUse]: {\n id: ContentId.RestrictionOnUse,\n defaultValue: 'Restriction on Use',\n },\n [ContentId.Restrictions]: {\n id: ContentId.Restrictions,\n defaultValue: 'Restrictions',\n },\n [ContentId.ResumeExperiment]: {\n id: ContentId.ResumeExperiment,\n defaultValue: 'Resume Experiment',\n },\n [ContentId.ResultTimeout]: {\n id: ContentId.ResultTimeout,\n defaultValue: 'Result Timeout',\n },\n [ContentId.ResultTimeoutDescription]: {\n id: ContentId.ResultTimeoutDescription,\n defaultValue:\n 'The request timed out due to a large number of results. Please adjust your filters to narrow the search and try again.',\n },\n [ContentId.RetrySkipped]: {\n id: ContentId.RetrySkipped,\n defaultValue: 'Retry Skipped',\n },\n [ContentId.ReuploadDocumentWarning]: {\n id: ContentId.ReuploadDocumentWarning,\n defaultValue:\n \"You're about to Re-upload Tickets. This action will replace the existing tickets with the new upload. The current tickets will be removed. Continue?\",\n },\n [ContentId.RevenueSplitHurdle]: {\n id: ContentId.RevenueSplitHurdle,\n defaultValue: 'Revenue Split Hurdle',\n },\n [ContentId.ReversedPenalty]: {\n id: ContentId.ReversedPenalty,\n defaultValue: 'Reversed Penalty',\n },\n [ContentId.ReversedCharge]: {\n id: ContentId.ReversedCharge,\n defaultValue: 'Reversed Charge',\n },\n [ContentId.Role_FinanceAPI_Details]: {\n id: ContentId.Role_FinanceAPI_Details,\n defaultValue: 'API that handles finance',\n },\n [ContentId.RowCompOverrides]: {\n id: ContentId.RowCompOverrides,\n defaultValue: 'Row Comp Overrides',\n },\n [ContentId.RowComps]: {\n id: ContentId.RowComps,\n defaultValue: 'Row Comps',\n },\n [ContentId.RowCompSettingExactMatch]: {\n id: ContentId.RowCompSettingExactMatch,\n defaultValue: 'MY ROW',\n },\n [ContentId.RowGroups]: {\n id: ContentId.RowGroups,\n defaultValue: 'Row Groups',\n },\n [ContentId.RowRanges]: {\n id: ContentId.RowRanges,\n defaultValue: 'Row ranges',\n },\n [ContentId.RowRangesInputTip]: {\n id: ContentId.RowRangesInputTip,\n defaultValue: 'Tap enter to confirm a range',\n },\n [ContentId.RowsAscToDesc]: {\n id: ContentId.RowsAscToDesc,\n defaultValue: 'Rows: asc to desc',\n },\n [ContentId.RowsDescToAsc]: {\n id: ContentId.RowsDescToAsc,\n defaultValue: 'Rows: desc to asc',\n },\n [ContentId.RowsGroupBy]: {\n id: ContentId.RowsGroupBy,\n defaultValue: 'Rows (Group by)',\n },\n [ContentId.SaleBasisShare]: {\n id: ContentId.SaleBasisShare,\n defaultValue: 'Sale Basis Share',\n },\n [ContentId.SaleCharges]: {\n id: ContentId.SaleCharges,\n defaultValue: 'Sale Charges',\n },\n [ContentId.SaleCredits]: {\n id: ContentId.SaleCredits,\n defaultValue: 'Sale Credits',\n },\n [ContentId.SaleDateFilterTitle]: {\n id: ContentId.SaleDateFilterTitle,\n defaultValue: 'Sale Activity Date Range',\n },\n [ContentId.PriceDateFilterTitle]: {\n id: ContentId.PriceDateFilterTitle,\n defaultValue: 'Price Activity Date Range',\n },\n [ContentId.PriceDateFilterChanged]: {\n id: ContentId.PriceDateFilterChanged,\n defaultValue: 'Price Changed Since',\n },\n [ContentId.PriceDateFilterUnchanged]: {\n id: ContentId.PriceDateFilterUnchanged,\n defaultValue: 'Price Not Changed Since',\n },\n [ContentId.SaleDateFilterOccured]: {\n id: ContentId.SaleDateFilterOccured,\n defaultValue: 'Event Had Sales Since',\n },\n [ContentId.SaleDateFilterNotOccured]: {\n id: ContentId.SaleDateFilterNotOccured,\n defaultValue: 'Event Not Had Sales Since',\n },\n [ContentId.PoId]: {\n id: ContentId.PoId,\n defaultValue: 'PO Id',\n },\n [ContentId.PoDate]: {\n id: ContentId.PoDate,\n defaultValue: 'PO Date',\n },\n [ContentId.SaleDay]: {\n id: ContentId.SaleDay,\n defaultValue: 'Sale Day',\n },\n [ContentId.SaleForEditTickets]: {\n id: ContentId.SaleForEditTickets,\n defaultValue:\n 'If your edits result in one or more tickets removed, your 1 sale for the removed tickets will be deallocated and put back to Pending Confirmation, where you can either source new tickets or reject the order.',\n },\n [ContentId.SaleForRemovedTickets]: {\n id: ContentId.SaleForRemovedTickets,\n defaultValue:\n 'Your 1 sale for the removed tickets will be deallocated and put back to Pending Confirmation, where you can either source new tickets or reject the order.',\n },\n [ContentId.SaleHasMarketplaceProblemHoverText]: {\n id: ContentId.SaleHasMarketplaceProblemHoverText,\n defaultValue:\n 'There is a problem with this order. Please check the marketplace directly for the most up-to-date information.',\n },\n [ContentId.SaleMonth]: {\n id: ContentId.SaleMonth,\n defaultValue: 'Sale Month',\n },\n [ContentId.SalePaymentConversionWarning]: {\n id: ContentId.SalePaymentConversionWarning,\n defaultValue:\n 'Payment conversion and payment amount received will only applied to unrejected and uncancelled sales.',\n },\n [ContentId.SaleReportDescription]: {\n id: ContentId.SaleReportDescription,\n defaultValue: 'All sales recorded on the POS',\n },\n [ContentId.SaleWeek]: {\n id: ContentId.SaleWeek,\n defaultValue: 'Sale Week',\n },\n [ContentId.SameEventsShareSameVenueConfigTitle]: {\n id: ContentId.SameEventsShareSameVenueConfigTitle,\n defaultValue: 'Some of your events share the same venue configuration',\n },\n [ContentId.SameEventsShareSameVenueConfigHeader]: {\n id: ContentId.SameEventsShareSameVenueConfigHeader,\n defaultValue:\n 'Would you like to apply the same ticket information to these events?',\n },\n [ContentId.SameEventsShareSameVenueConfigMessage1]: {\n id: ContentId.SameEventsShareSameVenueConfigMessage1,\n defaultValue:\n \"Click 'Yes' to apply the same ticket details to all events with the same venue configuration.\",\n },\n [ContentId.SameEventsShareSameVenueConfigMessage2]: {\n id: ContentId.SameEventsShareSameVenueConfigMessage2,\n defaultValue:\n \"Click 'No' to enter ticket details separately for each event.\",\n },\n [ContentId.SameZoneOrBetter]: {\n id: ContentId.SameZoneOrBetter,\n defaultValue: 'same zone or better',\n },\n [ContentId.SaveCopy]: {\n id: ContentId.SaveCopy,\n defaultValue: 'Save Copy',\n },\n [ContentId.Saved]: {\n id: ContentId.Saved,\n defaultValue: 'Saved',\n },\n [ContentId.SaveMapAs]: {\n id: ContentId.SaveMapAs,\n defaultValue: 'Save as a new map',\n },\n [ContentId.SaveSearch]: {\n id: ContentId.SaveSearch,\n defaultValue: 'Save Search',\n },\n [ContentId.SearchEventOrLookupId]: {\n id: ContentId.SearchEventOrLookupId,\n defaultValue: 'Search Event or Lookup ID',\n },\n [ContentId.SearchPurchases]: {\n id: ContentId.SearchPurchases,\n defaultValue: 'Search Purchases',\n },\n [ContentId.SearchInventory]: {\n id: ContentId.SearchInventory,\n defaultValue: 'Search Inventory',\n },\n [ContentId.SearchSales]: {\n id: ContentId.SearchSales,\n defaultValue: 'Search Sales',\n },\n [ContentId.SeatRange]: {\n id: ContentId.SeatRange,\n defaultValue: 'Seat range',\n },\n [ContentId.SectionGroups]: {\n id: ContentId.SectionGroups,\n defaultValue: 'Section Groups',\n },\n [ContentId.SectionsAscToDesc]: {\n id: ContentId.SectionsAscToDesc,\n defaultValue: 'Sections: asc to desc',\n },\n [ContentId.SectionsDescToAsc]: {\n id: ContentId.SectionsDescToAsc,\n defaultValue: 'Sections: desc to asc',\n },\n [ContentId.SectionUnmapped]: {\n id: ContentId.SectionUnmapped,\n defaultValue: 'Section Unmapped',\n },\n [ContentId.SelectCountry]: {\n id: ContentId.SelectCountry,\n defaultValue: 'Select Country',\n },\n [ContentId.SelectedFrom]: {\n id: ContentId.SelectedFrom,\n defaultValue: 'Selected from',\n },\n [ContentId.SelectGroupToMoveTo]: {\n id: ContentId.SelectGroupToMoveTo,\n defaultValue: 'Select a group to move to',\n },\n [ContentId.SelectQuantities]: {\n id: ContentId.SelectQuantities,\n defaultValue: 'Select Quantities',\n },\n [ContentId.SelectStateProvince]: {\n id: ContentId.SelectStateProvince,\n defaultValue: 'Select State/Province',\n },\n [ContentId.SelectCity]: {\n id: ContentId.SelectCity,\n defaultValue: 'Select City',\n },\n [ContentId.SellerFault]: {\n id: ContentId.SellerFault,\n defaultValue: 'Seller Fault',\n },\n [ContentId.SetAFloor]: {\n id: ContentId.SetAFloor,\n defaultValue: 'Add a floor',\n },\n [ContentId.SetAPriceFloor]: {\n id: ContentId.SetAPriceFloor,\n defaultValue: 'Add a price floor',\n },\n [ContentId.SetDefaultDeliveryForNewPurchases]: {\n id: ContentId.SetDefaultDeliveryForNewPurchases,\n defaultValue:\n 'Set default vendor-level delivery settings for all new purchases',\n },\n [ContentId.SetDeliveryStrategy]: {\n id: ContentId.SetDeliveryStrategy,\n defaultValue: 'Set Delivery Strategy',\n },\n [ContentId.SetMapAsDefault]: {\n id: ContentId.SetMapAsDefault,\n defaultValue: 'Set this event map as default',\n },\n [ContentId.SetPriceFloor]: {\n id: ContentId.SetPriceFloor,\n defaultValue: 'Set price floor',\n },\n [ContentId.Shown]: {\n id: ContentId.Shown,\n defaultValue: 'Shown',\n },\n [ContentId.ShowSections]: {\n id: ContentId.ShowSections,\n defaultValue: 'Show Sections',\n },\n [ContentId.ShowSectionsInfo]: {\n id: ContentId.ShowSectionsInfo,\n defaultValue: \"View all the sections you're pricing against.\",\n },\n [ContentId.SetMinimumGroupSize]: {\n id: ContentId.SetMinimumGroupSize,\n defaultValue: 'Set a minimum group size',\n },\n [ContentId.Sides]: {\n id: ContentId.Sides,\n defaultValue: 'Sides',\n },\n [ContentId.SideTier1]: {\n id: ContentId.SideTier1,\n defaultValue: 'Side Tier 1',\n },\n [ContentId.SideTier2]: {\n id: ContentId.SideTier2,\n defaultValue: 'Side Tier 2',\n },\n [ContentId.SimilarEventsDefaults]: {\n id: ContentId.SimilarEventsDefaults,\n defaultValue: 'For similar events and venue config at this venue',\n },\n [ContentId.SOR]: {\n id: ContentId.SOR,\n defaultValue: 'SOR (Sale or Return)',\n },\n [ContentId.SplitListing_AllowSplitSoldTickets]: {\n id: ContentId.SplitListing_AllowSplitSoldTickets,\n defaultValue: 'On: Allow splitting of sold tickets into new listings.',\n },\n [ContentId.SplitListing_DoNotAllowSplittingSoldTickets]: {\n id: ContentId.SplitListing_DoNotAllowSplittingSoldTickets,\n defaultValue:\n 'Off: Do not allow splitting of sold tickets into new listings.',\n },\n [ContentId.SplitZonesBy]: {\n id: ContentId.SplitZonesBy,\n defaultValue: 'Split zones by',\n },\n [ContentId.State]: {\n id: ContentId.State,\n defaultValue: 'State',\n },\n [ContentId.SellerId]: {\n id: ContentId.SellerId,\n defaultValue: 'Seller Id',\n },\n [ContentId.Budget]: {\n id: ContentId.Budget,\n defaultValue: 'Budget',\n },\n\n [ContentId.StartDateTime]: {\n id: ContentId.StartDateTime,\n defaultValue: 'Start Date',\n },\n\n [ContentId.EndDateTime]: {\n id: ContentId.EndDateTime,\n defaultValue: 'End Date',\n },\n\n [ContentId.CurrencyCode]: {\n id: ContentId.CurrencyCode,\n defaultValue: 'Currency Code',\n },\n\n [ContentId.BaseBid]: {\n id: ContentId.BaseBid,\n defaultValue: 'Base Bid',\n },\n [ContentId.MaxBid]: {\n id: ContentId.MaxBid,\n defaultValue: 'Max Bid',\n },\n [ContentId.DailyBudget]: {\n id: ContentId.DailyBudget,\n defaultValue: 'Daily Budget',\n },\n [ContentId.StopExperiment]: {\n id: ContentId.StopExperiment,\n defaultValue: 'Stop Experiment',\n },\n [ContentId.Supply]: {\n id: ContentId.Supply,\n defaultValue: 'Supply',\n },\n [ContentId.SuppressFor1HourV2]: {\n id: ContentId.SuppressFor1HourV2,\n defaultValue: 'Save my preference for one hour',\n },\n [ContentId.TableEditor]: {\n id: ContentId.TableEditor,\n defaultValue: 'Table Editor',\n },\n [ContentId.ThenDefaultListingsTo]: {\n id: ContentId.ThenDefaultListingsTo,\n defaultValue: 'Then default listings to',\n },\n [ContentId.ThenDefaultThePurchaseTo]: {\n id: ContentId.ThenDefaultThePurchaseTo,\n defaultValue: 'Then default the purchase to',\n },\n [ContentId.ThenSplitGroupsBy]: {\n id: ContentId.ThenSplitGroupsBy,\n defaultValue: 'Then split groups by',\n },\n [ContentId.ThisFilterWillChangeMetrics]: {\n id: ContentId.ThisFilterWillChangeMetrics,\n defaultValue: 'This filter impacts the metrics displayed on the page.',\n },\n [ContentId.TicketCost]: {\n id: ContentId.TicketCost,\n defaultValue: 'Ticket cost',\n },\n [ContentId.TicketDelivery]: {\n id: ContentId.TicketDelivery,\n defaultValue: 'Ticket Delivery',\n },\n [ContentId.TicketGroupBulkEditPurchaseWarning]: {\n id: ContentId.TicketGroupBulkEditPurchaseWarning,\n defaultValue:\n 'Performing a bulk action on the selected purchase lines will affect the entire purchase order. Continue?',\n },\n [ContentId.TicketPrices]: {\n id: ContentId.TicketPrices,\n defaultValue: 'Ticket Prices',\n },\n [ContentId.TicketQty]: {\n id: ContentId.TicketQty,\n defaultValue: 'Ticket Qty',\n },\n [ContentId.TicketQuantity]: {\n id: ContentId.TicketQuantity,\n defaultValue: 'Ticket Quantity',\n },\n [ContentId.TicketsAllocated]: {\n id: ContentId.TicketsAllocated,\n defaultValue: 'Tickets allocated',\n },\n [ContentId.TicketsSoldAs]: {\n id: ContentId.TicketsSoldAs,\n defaultValue: 'Tickets sold as',\n },\n [ContentId.ToggleSelectionMode]: {\n id: ContentId.ToggleSelectionMode,\n defaultValue: 'Toggle Selection Mode',\n },\n [ContentId.TotalSplitInfo]: {\n id: ContentId.TotalSplitInfo,\n defaultValue: 'The total split percentage must be equal to 100%',\n },\n [ContentId.TurnOnAutoFulfillPrompt]: {\n id: ContentId.TurnOnAutoFulfillPrompt,\n defaultValue:\n 'Do you want to send the fulfillment to the Marketplace? If you select No, you can do it later using the same action.',\n },\n [ContentId.UnableToFindSale]: {\n id: ContentId.UnableToFindSale,\n defaultValue: 'Unable to find sale',\n },\n [ContentId.Ungrouped]: {\n id: ContentId.Ungrouped,\n defaultValue: 'Ungrouped',\n },\n [ContentId.Unknown]: {\n id: ContentId.Unknown,\n defaultValue: 'Unknown',\n },\n [ContentId.UnknownError]: {\n id: ContentId.UnknownError,\n defaultValue: 'Unknown Error',\n },\n [ContentId.UnexpectedErrorOccured]: {\n id: ContentId.UnexpectedErrorOccured,\n defaultValue:\n 'An unexpected error occurred. Please reload the page or report the issue for further assistance.',\n },\n [ContentId.UnlinkSale]: {\n id: ContentId.UnlinkSale,\n defaultValue: 'Unlink Sale',\n },\n [ContentId.UnlinkSaleAndPayment]: {\n id: ContentId.UnlinkSaleAndPayment,\n defaultValue: 'Unlink sale and payment',\n },\n [ContentId.UnlockCommission]: {\n id: ContentId.UnlockCommission,\n defaultValue: 'Unlock Commission',\n },\n [ContentId.Unordered]: {\n id: ContentId.Unordered,\n defaultValue: 'Unordered',\n },\n [ContentId.TypeYourNoteHere]: {\n id: ContentId.TypeYourNoteHere,\n defaultValue: 'Type your note here',\n },\n [ContentId.UnsoldQuantitiesLowToHigh]: {\n id: ContentId.UnsoldQuantitiesLowToHigh,\n defaultValue: 'Unsold quantities: low to high',\n },\n [ContentId.UnsoldQuantitiesHighToLow]: {\n id: ContentId.UnsoldQuantitiesHighToLow,\n defaultValue: 'Unsold quantities: high to low',\n },\n [ContentId.UnwasteTickets]: {\n id: ContentId.UnwasteTickets,\n defaultValue: 'Unwaste Tickets',\n },\n [ContentId.UnwasteTicketsConfirmation]: {\n id: ContentId.UnwasteTicketsConfirmation,\n defaultValue:\n 'This action will cancel the sale and deallocate the tickets. Continue?',\n },\n [ContentId.UpdateAllTicketGroupsUnderAssociatedPurchaseOrders]: {\n id: ContentId.UpdateAllTicketGroupsUnderAssociatedPurchaseOrders,\n defaultValue: 'Update all ticket groups under associated purchase order(s)',\n },\n [ContentId.UpdatedBy]: {\n id: ContentId.UpdatedBy,\n defaultValue: 'Updated By',\n },\n [ContentId.UpdateDeal]: {\n id: ContentId.UpdateDeal,\n defaultValue: 'Update Deal',\n },\n [ContentId.UpdateDeliveryType]: {\n id: ContentId.UpdateDeliveryType,\n defaultValue: 'Update Delivery Type',\n },\n [ContentId.UpdateDeliveryTypeForPlaceholders]: {\n id: ContentId.UpdateDeliveryTypeForPlaceholders,\n defaultValue: 'Update Delivery Type for Placeholders',\n },\n [ContentId.UpdateExistingListings]: {\n id: ContentId.UpdateExistingListings,\n defaultValue: 'Update Existing Listings',\n },\n [ContentId.UpdateExistingPurchasesAndListings]: {\n id: ContentId.UpdateExistingPurchasesAndListings,\n defaultValue: 'Update Existing Purchases and Listings',\n },\n [ContentId.UpdateFulfillmentSettings]: {\n id: ContentId.UpdateFulfillmentSettings,\n defaultValue: 'Update Fulfillment Settings',\n },\n [ContentId.UpdateFulfillmentSettingsMessage]: {\n id: ContentId.UpdateFulfillmentSettingsMessage,\n defaultValue:\n 'Newly created listings will inherit the updated fulfillment properties.',\n },\n [ContentId.UpdateExistingListingsAndAssociatedSales]: {\n id: ContentId.UpdateExistingListingsAndAssociatedSales,\n defaultValue: 'Update Existing Listings and Associated Unfulfilled Sales',\n },\n [ContentId.UpdateFulfillmentSettingsMessagePurchase]: {\n id: ContentId.UpdateFulfillmentSettingsMessagePurchase,\n defaultValue:\n 'Newly created purchases will inherit the updated delivery properties.',\n },\n [ContentId.UpdatePurchaseCurrency]: {\n id: ContentId.UpdatePurchaseCurrency,\n defaultValue: 'Update Purchase Currency',\n },\n [ContentId.UpdatePurchasedBy]: {\n id: ContentId.UpdatePurchasedBy,\n defaultValue: 'Update Purchased By',\n },\n [ContentId.UpdatePurchaseWithMergedListing]: {\n id: ContentId.UpdatePurchaseWithMergedListing,\n defaultValue: 'Update Purchase With Merged Listing',\n },\n [ContentId.UpdateAssociatedSales]: {\n id: ContentId.UpdateAssociatedSales,\n defaultValue: 'Also update associated unfulfilled sales',\n },\n [ContentId.UpdateSeatTraits]: {\n id: ContentId.UpdateSeatTraits,\n defaultValue: 'Update Seat Traits',\n },\n [ContentId.UpdateSeatTraitsForPlaceholders]: {\n id: ContentId.UpdateSeatTraitsForPlaceholders,\n defaultValue: 'Update Seat Traits for Placeholders',\n },\n [ContentId.UpdateSelectedTicketGroupsOnly]: {\n id: ContentId.UpdateSelectedTicketGroupsOnly,\n defaultValue: 'Update selected ticket group(s) only',\n },\n [ContentId.UseAbsoluteFloors]: {\n id: ContentId.UseAbsoluteFloors,\n defaultValue: 'Use Absolute Floors',\n },\n [ContentId.UserAlreadySelected]: {\n id: ContentId.UserAlreadySelected,\n defaultValue: 'User Already Selected',\n },\n [ContentId.UseZoneMap]: {\n id: ContentId.UseZoneMap,\n defaultValue: 'Use zone map',\n },\n [ContentId.UseZoneMapDisabledTip]: {\n id: ContentId.UseZoneMapDisabledTip,\n defaultValue:\n 'Please apply the same zone map across selected events to use this feature',\n },\n [ContentId.Values]: {\n id: ContentId.Values,\n defaultValue: 'Values',\n },\n [ContentId.VendorGroup]: {\n id: ContentId.VendorGroup,\n defaultValue: 'Vendor Group',\n },\n [ContentId.VendorManagement]: {\n id: ContentId.VendorManagement,\n defaultValue: 'Vendor Management',\n },\n [ContentId.AddAdCampaign]: {\n id: ContentId.AddAdCampaign,\n defaultValue: 'Add Campaign',\n },\n [ContentId.AddAdGroup]: {\n id: ContentId.AddAdGroup,\n defaultValue: 'Add Ad Group',\n },\n [ContentId.EnterAdCampaignName]: {\n id: ContentId.EnterAdCampaignName,\n defaultValue: 'Enter Ad Campaign Name',\n },\n [ContentId.EnterAdGroupName]: {\n id: ContentId.EnterAdGroupName,\n defaultValue: 'Enter Ad Group Name',\n },\n [ContentId.ManageAdGroups]: {\n id: ContentId.ManageAdGroups,\n defaultValue: 'Manage Ad Groups',\n },\n [ContentId.BidModifierDimension]: {\n id: ContentId.BidModifierDimension,\n defaultValue: 'Bid Modifier Type',\n },\n [ContentId.EventBidModifierValue]: {\n id: ContentId.EventBidModifierValue,\n defaultValue: 'Bid Modifier Value',\n },\n [ContentId.TicketClass]: {\n id: ContentId.TicketClass,\n defaultValue: 'Ticket Class',\n },\n [ContentId.BidModifier]: {\n id: ContentId.BidModifier,\n defaultValue: 'Bid Modifier',\n },\n [ContentId.VendorPayments]: {\n id: ContentId.VendorPayments,\n defaultValue: 'Vendor Payments',\n },\n [ContentId.VenueRowData]: {\n id: ContentId.VenueRowData,\n defaultValue: 'Venue row data',\n },\n [ContentId.ViewApplicableListings]: {\n id: ContentId.ViewApplicableListings,\n defaultValue: 'View Applicable Listings',\n },\n [ContentId.AdSpend]: {\n id: ContentId.AdSpend,\n defaultValue: 'Ad Spend',\n },\n [ContentId.AddGenre]: {\n id: ContentId.AddGenre,\n defaultValue: 'Add Genre',\n },\n [ContentId.AddPerformer]: {\n id: ContentId.AddPerformer,\n defaultValue: 'Add Peformer',\n },\n [ContentId.AddEvent]: {\n id: ContentId.AddEvent,\n defaultValue: 'Add Event',\n },\n [ContentId.AddTicketClass]: {\n id: ContentId.AddTicketClass,\n defaultValue: 'Add Ticket Class',\n },\n [ContentId.AddListings]: {\n id: ContentId.AddListings,\n defaultValue: 'Add Listings',\n },\n [ContentId.AddVenue]: {\n id: ContentId.AddVenue,\n defaultValue: 'Add Venue',\n },\n [ContentId.MaxBidLessThanBaseBidMsg]: {\n id: ContentId.MaxBidLessThanBaseBidMsg,\n defaultValue: 'Max bid must be greater than or equal to base bid',\n },\n [ContentId.DailyBudgetLessThanMaxBidMsg]: {\n id: ContentId.MaxBidLessThanBaseBidMsg,\n defaultValue: 'Daily budget must be greater than or equal to max bid',\n },\n\n [ContentId.CompListingQuantityScoreAdjustment]: {\n id: ContentId.CompListingQuantityScoreAdjustment,\n defaultValue: 'Adjust Seat Score for Quantity',\n },\n [ContentId.CompMode]: {\n id: ContentId.CompMode,\n defaultValue: 'Comp. Mode',\n },\n [ContentId.Concert]: {\n id: ContentId.Concert,\n defaultValue: 'Concert',\n },\n [ContentId.ConcertsSectionsBehindStage]: {\n id: ContentId.ConcertsSectionsBehindStage,\n defaultValue: 'Concerts Sections Behind Stage',\n },\n [ContentId.Configure]: {\n id: ContentId.Configure,\n defaultValue: 'Configure',\n },\n [ContentId.ConfigureColumnTags]: {\n id: ContentId.ConfigureColumnTags,\n defaultValue: 'Configure Column Tags',\n },\n [ContentId.ConfigureColumnVariables]: {\n id: ContentId.ConfigureColumnVariables,\n defaultValue: 'Configure column variables',\n },\n [ContentId.ConfigureHeatMap]: {\n id: ContentId.ConfigureHeatMap,\n defaultValue: 'Configure Heat Map',\n },\n [ContentId.ConfiguringYourHeatMap]: {\n id: ContentId.ConfiguringYourHeatMap,\n defaultValue: 'Configuring your Heat Map',\n },\n [ContentId.ConfiguringHeatMapInstruction1]: {\n id: ContentId.ConfiguringHeatMapInstruction1,\n defaultValue:\n 'Get the heat map looking right by setting the relationship between value, and DISTANCE, HEIGHT and ANGLE.',\n },\n [ContentId.ConfiguringHeatMapInstruction2]: {\n id: ContentId.ConfiguringHeatMapInstruction2,\n defaultValue:\n 'Fine tune your heat map by clicking on a section, and adjusting its value.',\n },\n [ContentId.Confirm]: {\n id: ContentId.Confirm,\n defaultValue: 'Confirm',\n },\n [ContentId.ConfirmAllocation]: {\n id: ContentId.ConfirmAllocation,\n defaultValue: 'Confirm Allocation',\n },\n [ContentId.ConfirmationDeadline]: {\n id: ContentId.ConfirmationDeadline,\n defaultValue: 'Confirmation Deadline',\n },\n [ContentId.ConfirmDeletion]: {\n id: ContentId.ConfirmDeletion,\n defaultValue: 'Confirm Deletion',\n },\n [ContentId.ConfirmTransferWithoutProof]: {\n id: ContentId.ConfirmTransferWithoutProof,\n defaultValue: 'Confirm without Proof',\n },\n [ContentId.ConfirmVendorAccountChange]: {\n id: ContentId.ConfirmVendorAccountChange,\n defaultValue:\n \"You're about to change the vendor account, which will auto-assign the purchaser to the default purchaser associated with the new vendor account.\",\n },\n [ContentId.ConfirmWithoutAllocation]: {\n id: ContentId.ConfirmWithoutAllocation,\n defaultValue: 'Confirm without Allocation',\n },\n [ContentId.Contains]: {\n id: ContentId.Contains,\n defaultValue: 'Contains',\n },\n [ContentId.ConversionRate]: {\n id: ContentId.ConversionRate,\n defaultValue: 'Conversion Rate',\n },\n [ContentId.ConversionRateMustBeGreaterThanZero]: {\n id: ContentId.ConversionRateMustBeGreaterThanZero,\n defaultValue: 'Conversion Rate must be greater than zero',\n },\n [ContentId.CopyEmailAddress]: {\n id: ContentId.CopyEmailAddress,\n defaultValue: 'Copy email address',\n },\n [ContentId.CopyExternalId]: {\n id: ContentId.CopyExternalId,\n defaultValue: 'Copy external ID to clipboard',\n },\n [ContentId.Create]: {\n id: ContentId.Create,\n defaultValue: 'Create',\n },\n [ContentId.CreateACustomColumn]: {\n id: ContentId.CreateACustomColumn,\n defaultValue: 'Create a Custom Column',\n },\n [ContentId.CreateAHeatMap]: {\n id: ContentId.CreateAHeatMap,\n defaultValue: 'Create a Heat Map',\n },\n [ContentId.CreateANewTeam]: {\n id: ContentId.CreateANewTeam,\n defaultValue: 'Create a new team',\n },\n [ContentId.CreatedBy]: {\n id: ContentId.CreatedBy,\n defaultValue: 'Created By',\n },\n [ContentId.CreatedOn]: {\n id: ContentId.CreatedOn,\n defaultValue: 'Created On',\n },\n [ContentId.CreateNew]: {\n id: ContentId.CreateNew,\n defaultValue: 'Create New',\n },\n [ContentId.CreateNewField]: {\n id: ContentId.CreateNewField,\n defaultValue: 'Create new field',\n },\n [ContentId.CreateNewFromTemplateConfigPayload]: {\n id: ContentId.CreateNewFromTemplateConfigPayload,\n defaultValue: 'Or, create a new model from an existing configuration',\n },\n [ContentId.CreateNewInventoryReport]: {\n id: ContentId.CreateNewInventoryReport,\n defaultValue: 'Create new inventory report',\n },\n [ContentId.CreateNewOrder]: {\n id: ContentId.CreateNewOrder,\n defaultValue: 'Create New Order',\n },\n [ContentId.CreateNewReport]: {\n id: ContentId.CreateNewReport,\n defaultValue: 'Create new report',\n },\n [ContentId.CreateNewSaleReport]: {\n id: ContentId.CreateNewSaleReport,\n defaultValue: 'Create new sale report',\n },\n [ContentId.CreateNewTag]: {\n id: ContentId.CreateNewTag,\n defaultValue: 'Create New Tag',\n },\n [ContentId.CreatePricingStrategy]: {\n id: ContentId.CreatePricingStrategy,\n defaultValue: 'Create pricing strategy',\n },\n [ContentId.Credits]: {\n id: ContentId.Credits,\n defaultValue: 'Credits',\n },\n [ContentId.CSError]: {\n id: ContentId.CSError,\n defaultValue: 'CS Error',\n },\n [ContentId.CurrencyConversion]: {\n id: ContentId.CurrencyConversion,\n defaultValue: 'Currency Conversion',\n },\n [ContentId.CurrencySectionSubtitle]: {\n id: ContentId.CurrencySectionSubtitle,\n defaultValue:\n 'Select your preferred default currency and auto-conversion settings',\n },\n [ContentId.Current]: {\n id: ContentId.Current,\n defaultValue: 'Current',\n },\n [ContentId.CurrentColumns]: {\n id: ContentId.CurrentColumns,\n defaultValue: 'Current columns',\n },\n [ContentId.CurrentFloor]: {\n id: ContentId.CurrentFloor,\n defaultValue: 'Current Floor',\n },\n [ContentId.Custom]: {\n id: ContentId.Custom,\n defaultValue: 'Custom',\n },\n [ContentId.CustomEventId]: {\n id: ContentId.CustomEventId,\n defaultValue: 'Custom Event ID',\n },\n [ContentId.CustomReports]: {\n id: ContentId.CustomReports,\n defaultValue: 'Custom Reports',\n },\n [ContentId.DailyOverrideFxRates]: {\n id: ContentId.DailyOverrideFxRates,\n defaultValue: 'Daily Override Fx Rates',\n },\n [ContentId.Dark]: {\n id: ContentId.Dark,\n defaultValue: 'Dark',\n },\n [ContentId.DarkMode]: {\n id: ContentId.DarkMode,\n defaultValue: 'Dark Mode',\n },\n [ContentId.Dashboard]: {\n id: ContentId.Dashboard,\n defaultValue: 'Dashboard',\n },\n [ContentId.DataIsRefreshing]: {\n id: ContentId.DataIsRefreshing,\n defaultValue: 'Data is refreshing...',\n },\n [ContentId.Date]: {\n id: ContentId.Date,\n defaultValue: 'Date',\n },\n [ContentId.Day]: {\n id: ContentId.Day,\n defaultValue: 'Day',\n },\n [ContentId.Days]: {\n id: ContentId.Days,\n defaultValue: 'Days',\n },\n [ContentId.DeactivateUser]: {\n id: ContentId.DeactivateUser,\n defaultValue: 'Deactivate User',\n },\n [ContentId.DealScore]: {\n id: ContentId.DealScore,\n defaultValue: 'Deal Score',\n },\n [ContentId.Decimal]: {\n id: ContentId.Decimal,\n defaultValue: 'Decimal',\n },\n [ContentId.DecimalNumber]: {\n id: ContentId.DecimalNumber,\n defaultValue: 'Decimal Number',\n },\n [ContentId.Decrease]: {\n id: ContentId.Decrease,\n defaultValue: 'Decrease',\n },\n [ContentId.DecreasePrice]: {\n id: ContentId.DecreasePrice,\n defaultValue: 'Decrease Price',\n },\n [ContentId.DecreasePriceByPercentAllVisible]: {\n id: ContentId.DecreasePriceByPercentAllVisible,\n defaultValue: 'Decrease Price of All Visible Listings By X%',\n },\n [ContentId.DecreasePriceForAll]: {\n id: ContentId.DecreasePriceForAll,\n defaultValue: 'Decrease Price for All',\n },\n [ContentId.DecreasePriceForSelected]: {\n id: ContentId.DecreasePriceForSelected,\n defaultValue: 'Decrease Price for Selected',\n },\n [ContentId.DefaultBuyer]: {\n id: ContentId.DefaultBuyer,\n defaultValue: 'Default Buyer',\n },\n [ContentId.DefaultCurrency]: {\n id: ContentId.DefaultCurrency,\n defaultValue: 'Default Currency',\n },\n [ContentId.DefaultPaymentMethod]: {\n id: ContentId.DefaultPaymentMethod,\n defaultValue: 'Default Payment Method',\n },\n [ContentId.DefaultQuantity]: {\n id: ContentId.DefaultQuantity,\n defaultValue: 'Default Quantity',\n },\n [ContentId.DefaultQuantityFilters]: {\n id: ContentId.DefaultQuantityFilters,\n defaultValue: 'Default Quantity Filters',\n },\n [ContentId.DefaultReports]: {\n id: ContentId.DefaultReports,\n defaultValue: 'Default Reports',\n },\n [ContentId.DefaultSplitTypeForSeatSaver]: {\n id: ContentId.DefaultSplitTypeForSeatSaver,\n defaultValue: 'Default Split Type for Placeholder',\n },\n [ContentId.DefineTargets]: {\n id: ContentId.DefineTargets,\n defaultValue: 'Define targets',\n },\n [ContentId.DefineTargetsSubtitle]: {\n id: ContentId.DefineTargetsSubtitle,\n defaultValue: 'Set target sell-through rates for specific dates.',\n },\n [ContentId.Delete]: {\n id: ContentId.Delete,\n defaultValue: 'Delete',\n },\n [ContentId.DeleteAllTemplates]: {\n id: ContentId.DeleteAllTemplates,\n defaultValue:\n 'Are you sure you want to delete this template for all events?',\n },\n [ContentId.DeleteCustomColumn]: {\n id: ContentId.DeleteCustomColumn,\n defaultValue: 'Delete Custom Column',\n },\n [ContentId.DeleteFxOverrideWarning]: {\n id: ContentId.DeleteFxOverrideWarning,\n defaultValue:\n 'Deleting an FX rate override will adjust the unit cost on the affected listings. Are you sure?',\n },\n [ContentId.DeleteOverrideFxRate]: {\n id: ContentId.DeleteOverrideFxRate,\n defaultValue: 'Delete Override Fx Rate',\n },\n [ContentId.DeletePlaceholder]: {\n id: ContentId.DeletePlaceholder,\n defaultValue: 'Delete Placeholder',\n },\n [ContentId.DeletePlaceholderAll]: {\n id: ContentId.DeletePlaceholderAll,\n defaultValue: 'Delete All Placeholder Inventory',\n },\n [ContentId.DeletePlaceholderAllVisible]: {\n id: ContentId.DeletePlaceholderAllVisible,\n defaultValue: 'Delete All Visible Placeholder Inventory',\n },\n [ContentId.DeletePlaceholderListing]: {\n id: ContentId.DeletePlaceholderListing,\n defaultValue: 'Delete Placeholder Listing',\n },\n [ContentId.DeletePlaceholderSelected]: {\n id: ContentId.DeletePlaceholderSelected,\n defaultValue: 'Delete All Selected Placeholder Inventory',\n },\n [ContentId.DeletePricingStrategy]: {\n id: ContentId.DeletePricingStrategy,\n defaultValue: 'Delete pricing strategy',\n },\n [ContentId.DeleteReport]: {\n id: ContentId.DeleteReport,\n defaultValue: 'Delete Report',\n },\n [ContentId.DeleteRole]: {\n id: ContentId.DeleteRole,\n defaultValue: 'Delete Role',\n },\n [ContentId.DeleteSeatSaver]: {\n id: ContentId.DeleteSeatSaver,\n defaultValue: 'Delete Seat Saver',\n },\n [ContentId.DeleteSeatSaverAll]: {\n id: ContentId.DeleteSeatSaverAll,\n defaultValue: 'Delete Seat Saver for All',\n },\n [ContentId.DeleteSeatSaverAllVisible]: {\n id: ContentId.DeleteSeatSaverAllVisible,\n defaultValue: 'Delete Seat Saver for All Visible Listings',\n },\n [ContentId.DeleteSeatSaverSelected]: {\n id: ContentId.DeleteSeatSaverSelected,\n defaultValue: 'Delete Seat Saver for Selected',\n },\n [ContentId.DeleteTag]: {\n id: ContentId.DeleteTag,\n defaultValue: 'Delete Tag',\n },\n [ContentId.DeleteTagConfirmation1]: {\n id: ContentId.DeleteTagConfirmation1,\n defaultValue: 'Are you sure you want to delete this tag definition?',\n },\n [ContentId.DeleteTagConfirmation2]: {\n id: ContentId.DeleteTagConfirmation2,\n defaultValue:\n 'This action will remove all associated tag values and columns from reports.',\n },\n [ContentId.DeleteTeam]: {\n id: ContentId.DeleteTeam,\n defaultValue: 'Delete Team',\n },\n [ContentId.DeleteUser]: {\n id: ContentId.DeleteUser,\n defaultValue: 'Delete user',\n },\n [ContentId.DelistedClickToList]: {\n id: ContentId.DelistedClickToList,\n defaultValue: 'Delisted - click to list',\n },\n [ContentId.DelistedSyncFailed]: {\n id: ContentId.DelistedSyncFailed,\n defaultValue: 'Delisted, Sync Failed',\n },\n [ContentId.DeliveryDocuments]: {\n id: ContentId.DeliveryDocuments,\n defaultValue: 'Delivery Documents',\n },\n [ContentId.DeliveryMethodChange]: {\n id: ContentId.DeliveryMethodChange,\n defaultValue: 'Delivery Method Change',\n },\n [ContentId.DeliveryType]: {\n id: ContentId.DeliveryType,\n defaultValue: 'Delivery Type',\n },\n [ContentId.DemandFactors]: {\n id: ContentId.DemandFactors,\n defaultValue: 'Demand Factor',\n },\n [ContentId.Description]: {\n id: ContentId.Description,\n defaultValue: 'Description',\n },\n [ContentId.DescriptionOfPurpose]: {\n id: ContentId.DescriptionOfPurpose,\n defaultValue: 'Description of purpose',\n },\n [ContentId.DeselectAll]: {\n id: ContentId.DeselectAll,\n defaultValue: 'Deselect all',\n },\n [ContentId.DesiredActiveListings]: {\n id: ContentId.DesiredActiveListings,\n defaultValue: 'Desired Active Listings',\n },\n [ContentId.DecreasePriceByPercentAll]: {\n id: ContentId.DecreasePriceByPercentAll,\n defaultValue: 'Decrease All Price By X%',\n },\n [ContentId.DecreasePriceByPercentSelected]: {\n id: ContentId.DecreasePriceByPercentSelected,\n defaultValue: 'Decrease Selected Price By X%',\n },\n [ContentId.DesiredNumberOfGroups]: {\n id: ContentId.DesiredNumberOfGroups,\n defaultValue: 'Desired Number of Groups',\n },\n [ContentId.DigitalWallet]: {\n id: ContentId.DigitalWallet,\n defaultValue: 'Digital Wallet',\n },\n [ContentId.DirectToStubHubInternationalMessage]: {\n id: ContentId.DirectToStubHubInternationalMessage,\n defaultValue:\n 'StubHub International is a different company. We will be unable to help you with your order once you leave this site. You will be responsible for reviewing their terms and conditions, guarantee and working directly with their customer service.',\n },\n [ContentId.DirectToStubHubInternationalTitle]: {\n id: ContentId.DirectToStubHubInternationalTitle,\n defaultValue:\n 'You are being redirected to another business: StubHub International',\n },\n [ContentId.DifferentCurrencyCodesRequired]: {\n id: ContentId.DifferentCurrencyCodesRequired,\n defaultValue: 'Different currency codes are required',\n },\n [ContentId.AutoSourceTickets]: {\n id: ContentId.AutoSourceTickets,\n defaultValue: 'Auto-Source Tickets',\n },\n [ContentId.Disabled]: {\n id: ContentId.Disabled,\n defaultValue: 'Disabled',\n },\n [ContentId.DisableDarkMode]: {\n id: ContentId.DisableDarkMode,\n defaultValue: 'Disable Dark Mode',\n },\n [ContentId.Discount]: {\n id: ContentId.Discount,\n defaultValue: 'Discount',\n },\n [ContentId.Display]: {\n id: ContentId.Display,\n defaultValue: 'Display',\n },\n [ContentId.DisplayName]: {\n id: ContentId.DisplayName,\n defaultValue: 'Display name',\n },\n [ContentId.Distance]: {\n id: ContentId.Distance,\n defaultValue: 'Distance',\n },\n [ContentId.DollarsInBasket]: {\n id: ContentId.DollarsInBasket,\n defaultValue: '$ in Basket',\n },\n [ContentId.Done]: {\n id: ContentId.Done,\n defaultValue: 'Done',\n },\n [ContentId.DontChange]: {\n id: ContentId.DontChange,\n defaultValue: \"Don't Change\",\n },\n [ContentId.DontPriceBelow]: {\n id: ContentId.DontPriceBelow,\n defaultValue: \"Don't price below\",\n },\n [ContentId.Download]: {\n id: ContentId.Download,\n defaultValue: 'Download',\n },\n [ContentId.DownloadTemplate]: {\n id: ContentId.DownloadTemplate,\n defaultValue: 'Download Template',\n },\n [ContentId.DoYouWantToContinue]: {\n id: ContentId.DoYouWantToContinue,\n defaultValue: 'Do you want to continue?',\n },\n [ContentId.Duplicate]: {\n id: ContentId.Duplicate,\n defaultValue: 'Duplicate',\n },\n [ContentId.DuplicatedListing]: {\n id: ContentId.DuplicatedListing,\n defaultValue: 'Duplicated Listing',\n },\n [ContentId.DuplicatedReportName]: {\n id: ContentId.DuplicatedReportName,\n defaultValue: 'A report with the same name already exists.',\n },\n [ContentId.DuplicateEventNeedsToBeRescheduled]: {\n id: ContentId.DuplicateEventNeedsToBeRescheduled,\n defaultValue: 'Duplicate Event - Needs to be rescheduled',\n },\n [ContentId.DuplicateEventPerformerVenueDateAndTimeMatch]: {\n id: ContentId.DuplicateEventPerformerVenueDateAndTimeMatch,\n defaultValue: 'Duplicate Event - Performer, venue, date, and time match',\n },\n [ContentId.Duplicates]: {\n id: ContentId.Duplicates,\n defaultValue: 'Duplicates',\n },\n [ContentId.DuplicateTicketId]: {\n id: ContentId.DuplicateTicketId,\n defaultValue: 'Duplicate Ticket ID.',\n },\n [ContentId.each]: {\n id: ContentId.each,\n defaultValue: 'each',\n },\n [ContentId.EachTicketUrlOnNewLine]: {\n id: ContentId.EachTicketUrlOnNewLine,\n defaultValue: 'Each url should be on a new line.',\n },\n [ContentId.EachTicketIdOnNewLine]: {\n id: ContentId.EachTicketIdOnNewLine,\n defaultValue: 'Each ticket ID should be on a new line.',\n },\n [ContentId.EarlyShippingLabelGeneration]: {\n id: ContentId.EarlyShippingLabelGeneration,\n defaultValue: 'Early Shipping Label Generation',\n },\n [ContentId.Earnings]: {\n id: ContentId.Earnings,\n defaultValue: 'Earnings',\n },\n [ContentId.Editable]: {\n id: ContentId.Editable,\n defaultValue: 'Editable',\n },\n [ContentId.EditATeam]: {\n id: ContentId.EditATeam,\n defaultValue: 'Edit a team',\n },\n [ContentId.EditColumns]: {\n id: ContentId.EditColumns,\n defaultValue: 'Edit Columns',\n },\n [ContentId.EditEditabilityDescription]: {\n id: ContentId.EditEditabilityDescription,\n defaultValue: 'User can edit the value set for this filter',\n },\n [ContentId.EditEventWarning]: {\n id: ContentId.EditEventWarning,\n defaultValue:\n 'Warning! Changing event of a ticket group will delete it and all associated listings and deallocate all associated sales and recreate the ticket group and listings.',\n },\n [ContentId.EditEventWarning2]: {\n id: ContentId.EditEventWarning2,\n defaultValue:\n 'Warning! Changing event of a ticket group will delete it and all associated listings and recreate the ticket group and listings. You may chose to deallocate the associated sales below.',\n },\n [ContentId.EditGeneralSettings]: {\n id: ContentId.EditGeneralSettings,\n defaultValue: 'Edit General Settings',\n },\n [ContentId.EditMarketplaceEvent]: {\n id: ContentId.EditMarketplaceEvent,\n defaultValue: 'Edit Marketplace Event Info',\n },\n [ContentId.EditACustomColumn]: {\n id: ContentId.EditACustomColumn,\n defaultValue: 'Edit a Custom Column',\n },\n [ContentId.EditMetrics]: {\n id: ContentId.EditMetrics,\n defaultValue: 'Edit Metrics',\n },\n [ContentId.EditNote]: {\n id: ContentId.EditNote,\n defaultValue: 'Edit Note',\n },\n [ContentId.EditOverrideFxRate]: {\n id: ContentId.EditOverrideFxRate,\n defaultValue: 'Edit Override Fx Rate',\n },\n [ContentId.EditPricing]: {\n id: ContentId.EditPricing,\n defaultValue: 'Edit Pricing',\n },\n [ContentId.EditPricingStrategy]: {\n id: ContentId.EditPricingStrategy,\n defaultValue: 'Edit pricing strategy',\n },\n [ContentId.EditReport]: {\n id: ContentId.EditReport,\n defaultValue: 'Edit Report',\n },\n [ContentId.EditRowScore]: {\n id: ContentId.EditRowScore,\n defaultValue: 'Edit Row Score',\n },\n [ContentId.EditRowScores]: {\n id: ContentId.EditRowScores,\n defaultValue: 'Edit Row Scores',\n },\n [ContentId.EditScores]: {\n id: ContentId.EditScores,\n defaultValue: 'Edit Scores',\n },\n [ContentId.EditSections]: {\n id: ContentId.EditSections,\n defaultValue: 'Edit Sections',\n },\n [ContentId.EditTagTypes]: {\n id: ContentId.EditTagTypes,\n defaultValue: 'Edit Tag Types',\n },\n [ContentId.EditUser]: {\n id: ContentId.EditUser,\n defaultValue: 'Edit User',\n },\n [ContentId.EffectiveCeilingBelowFloor]: {\n id: ContentId.EffectiveCeilingBelowFloor,\n defaultValue: 'Effective Ceiling Below Floor',\n },\n [ContentId.EmailPreview]: {\n id: ContentId.EmailPreview,\n defaultValue: 'Email Preview',\n },\n [ContentId.EnableAll]: {\n id: ContentId.EnableAll,\n defaultValue: 'Enable All',\n },\n [ContentId.EnableAndDisableExperimentalFeatures]: {\n id: ContentId.EnableAndDisableExperimentalFeatures,\n defaultValue:\n 'Enable and disable experimental features of StubHub platform',\n },\n [ContentId.EnableAutoPricing]: {\n id: ContentId.EnableAutoPricing,\n defaultValue: 'Enable auto pricing',\n },\n [ContentId.Enabled]: {\n id: ContentId.Enabled,\n defaultValue: 'Enabled',\n },\n [ContentId.EnableDarkMode]: {\n id: ContentId.EnableDarkMode,\n defaultValue: 'Enable Dark Mode',\n },\n [ContentId.EnableQualityControlForAutoPo]: {\n id: ContentId.EnableQualityControlForAutoPo,\n defaultValue: 'Enable quality control for Auto-PO',\n },\n [ContentId.EnjoyTheEvent]: {\n id: ContentId.EnjoyTheEvent,\n defaultValue: 'Enjoy the Event',\n },\n [ContentId.EnterBarcodesForTransferIns]: {\n id: ContentId.EnterBarcodesForTransferIns,\n defaultValue:\n 'Review the barcode for each seat. Update or fill-in any one necessary. You can copy & paste an ordered list from excel in the bulk entry view to auto-populate the seats.',\n },\n [ContentId.EnterResetCodeFromEmail]: {\n id: ContentId.EnterResetCodeFromEmail,\n defaultValue: 'Enter reset code from email',\n },\n [ContentId.EnterStubHubEmailPrompt]: {\n id: ContentId.EnterStubHubEmailPrompt,\n defaultValue: \"Enter the user's StubHub account email\",\n },\n [ContentId.EnterTicketUrlsIns]: {\n id: ContentId.EnterTicketUrlsIns,\n defaultValue:\n 'Review the ticket URL for each seat. Update or fill-in any one necessary. You can copy & paste an ordered list from excel in the bulk entry view to auto-populate the seats.',\n },\n [ContentId.EnterTicketIdsIns]: {\n id: ContentId.EnterTicketIdsIns,\n defaultValue:\n 'Review the ticket ID for each seat. Update or fill-in any one necessary. You can copy & paste an ordered list from excel in the bulk entry view to auto-populate the seats.',\n },\n [ContentId.EnterValuesFor]: {\n id: ContentId.EnterValuesFor,\n defaultValue: 'Enter values for',\n },\n [ContentId.Equals]: {\n id: ContentId.Equals,\n defaultValue: 'Equals',\n },\n [ContentId.EventCancelled]: {\n id: ContentId.EventCancelled,\n defaultValue: 'Event Cancelled',\n },\n [ContentId.EventHasPassed]: {\n id: ContentId.EventHasPassed,\n defaultValue: 'Event has Passed',\n },\n [ContentId.EventId]: {\n id: ContentId.EventId,\n defaultValue: 'Event ID',\n },\n [ContentId.EventMapped]: {\n id: ContentId.EventMapped,\n defaultValue: 'Event Mapped',\n },\n [ContentId.EventPostponed]: {\n id: ContentId.EventPostponed,\n defaultValue: 'Event Postponed',\n },\n [ContentId.Events_AddTagType_Details]: {\n id: ContentId.Events_AddTagType_Details,\n defaultValue: 'Permits adding new tag types to events',\n },\n [ContentId.Events_Edit_Details]: {\n id: ContentId.Events_Edit_Details,\n defaultValue: 'Allows updating event details',\n },\n [ContentId.Events_SetPrice_Details]: {\n id: ContentId.Events_SetPrice_Details,\n defaultValue: 'Configure pricing settings for indvidual events',\n },\n [ContentId.Events_UpdateTags_Details]: {\n id: ContentId.Events_UpdateTags_Details,\n defaultValue: 'Permits updating of tags on event records',\n },\n [ContentId.Events_ViewAll_Details]: {\n id: ContentId.Events_ViewAll_Details,\n defaultValue:\n 'Ability to query any event using ViagogoEventId or ViagogoEventMappingId',\n },\n [ContentId.EventTag]: {\n id: ContentId.EventTag,\n defaultValue: 'Event Tag',\n },\n [ContentId.EventTags]: {\n id: ContentId.EventTags,\n defaultValue: 'Event Tags',\n },\n [ContentId.EventView]: {\n id: ContentId.EventView,\n defaultValue: 'Event View',\n },\n [ContentId.Example]: {\n id: ContentId.Example,\n defaultValue: 'Example',\n },\n [ContentId.ExcessiveFailureRate]: {\n id: ContentId.ExcessiveFailureRate,\n defaultValue: 'Excessive Failure Rate',\n },\n [ContentId.Exclude]: {\n id: ContentId.Exclude,\n defaultValue: 'Exclude',\n },\n [ContentId.ExcludeFanInventory]: {\n id: ContentId.ExcludeFanInventory,\n defaultValue: 'Exclude Fan Inventory',\n },\n [ContentId.ExcludeFullySoldListings]: {\n id: ContentId.ExcludeFullySoldListings,\n defaultValue: 'Exclude fully sold listings',\n },\n [ContentId.ExclusionCurrencies]: {\n id: ContentId.ExclusionCurrencies,\n defaultValue: 'Exclusion Currencies',\n },\n [ContentId.ExclusionCurrenciesSubtitle]: {\n id: ContentId.ExclusionCurrenciesSubtitle,\n defaultValue: 'Exclude currencies that should not be auto-converted',\n },\n [ContentId.ExistingOrder]: {\n id: ContentId.ExistingOrder,\n defaultValue: 'Existing Order',\n },\n [ContentId.ExistingTagName]: {\n id: ContentId.ExistingTagName,\n defaultValue: 'Tag with the same name already exists',\n },\n [ContentId.ExistingTagValue]: {\n id: ContentId.ExistingTagValue,\n defaultValue: 'Tag with same key/value pair already exists',\n },\n [ContentId.Exit]: {\n id: ContentId.Exit,\n defaultValue: 'Exit',\n },\n [ContentId.ExpectedProceeds]: {\n id: ContentId.ExpectedProceeds,\n defaultValue: 'Expected Proceeds',\n },\n [ContentId.ExpectedProfit]: {\n id: ContentId.ExpectedProfit,\n defaultValue: 'Expected Profit',\n },\n [ContentId.ExpectedSTR]: {\n id: ContentId.ExpectedSTR,\n defaultValue: 'Expected STR',\n },\n [ContentId.ExperimentalFeatures]: {\n id: ContentId.ExperimentalFeatures,\n defaultValue: 'Experimental features',\n },\n [ContentId.ExperimentalFeaturesComingSoon]: {\n id: ContentId.ExperimentalFeaturesComingSoon,\n defaultValue: 'Experimental Features Coming Soon',\n },\n [ContentId.ExpiredShippingLabel]: {\n id: ContentId.ExpiredShippingLabel,\n defaultValue: 'Expired Shipping Label',\n },\n [ContentId.ExploreComparables]: {\n id: ContentId.ExploreComparables,\n defaultValue: 'Explore Comparables',\n },\n [ContentId.ExportListings]: {\n id: ContentId.ExportListings,\n defaultValue: 'Export Listings',\n },\n [ContentId.ExportSales]: {\n id: ContentId.ExportSales,\n defaultValue: 'Export Sales',\n },\n [ContentId.ExternalPurchaseId]: {\n id: ContentId.ExternalPurchaseId,\n defaultValue: 'External Purchase Id',\n },\n [ContentId.ExternalSaleId]: {\n id: ContentId.ExternalSaleId,\n defaultValue: 'External Sale Id',\n },\n [ContentId.Far]: {\n id: ContentId.Far,\n defaultValue: 'Far',\n },\n [ContentId.Festival]: {\n id: ContentId.Festival,\n defaultValue: 'Festival',\n },\n [ContentId.FindThe]: {\n id: ContentId.FindThe,\n defaultValue: 'Find the',\n },\n [ContentId.FulfillmentProviders]: {\n id: ContentId.FulfillmentProviders,\n defaultValue: 'Fulfillment Providers',\n },\n [ContentId.FulfillmentProvidersSubText]: {\n id: ContentId.FulfillmentProvidersSubText,\n defaultValue: 'Choose which channels you want to distribute to',\n },\n [ContentId.FullPrice]: {\n id: ContentId.FullPrice,\n defaultValue: 'Full Price',\n },\n [ContentId.GlobalReportFilterChangeCopyMessage]: {\n id: ContentId.GlobalReportFilterChangeCopyMessage,\n defaultValue:\n 'Changes to the filter will not be persisted. Make a copy to save the changes.',\n },\n [ContentId.HasUnsoldListings]: {\n id: ContentId.HasUnsoldListings,\n defaultValue: 'Has Unsold Listings',\n },\n [ContentId.Hidden]: {\n id: ContentId.Hidden,\n defaultValue: 'Hidden',\n },\n [ContentId.HiddenEditabilityDescription]: {\n id: ContentId.HiddenEditabilityDescription,\n defaultValue: 'User cannot see this filter has been set',\n },\n [ContentId.HowToDeterminePrice]: {\n id: ContentId.HowToDeterminePrice,\n defaultValue: 'How to determine price',\n },\n [ContentId.LastMinuteSalesLateDelivery]: {\n id: ContentId.LastMinuteSalesLateDelivery,\n defaultValue: 'Last Minute Sales Late Delivery',\n },\n [ContentId.LastReviewed]: {\n id: ContentId.LastReviewed,\n defaultValue: 'Last Reviewed',\n },\n [ContentId.InventoryTag]: {\n id: ContentId.InventoryTag,\n defaultValue: 'Inventory Tag',\n },\n [ContentId.GlobalReportFilterChangeMessage]: {\n id: ContentId.GlobalReportFilterChangeMessage,\n defaultValue: 'Changes to the filter will not be persisted.',\n },\n [ContentId.Include]: {\n id: ContentId.Include,\n defaultValue: 'Include',\n },\n [ContentId.IncludeAllCountries]: {\n id: ContentId.IncludeAllCountries,\n defaultValue: 'Include All Countries',\n },\n [ContentId.IncludeAllVendors]: {\n id: ContentId.IncludeAllVendors,\n defaultValue: 'Include All Vendors',\n },\n [ContentId.IncludedCountries]: {\n id: ContentId.IncludedCountries,\n defaultValue: 'Countries Included for Processing',\n },\n [ContentId.ListedDelistFailed]: {\n id: ContentId.ListedDelistFailed,\n defaultValue: 'Listed, Delist Failed',\n },\n [ContentId.ListedSyncFailed]: {\n id: ContentId.ListedSyncFailed,\n defaultValue: 'Listed, Sync Failed',\n },\n [ContentId.ListingGroupSummaryActiveAndActive]: {\n id: ContentId.ListingGroupSummaryActiveAndActive,\n defaultValue: 'Active in group and listed',\n },\n [ContentId.ListingGroupSummaryActiveButNotListed]: {\n id: ContentId.ListingGroupSummaryActiveButNotListed,\n defaultValue: 'Active in group but not listed',\n },\n [ContentId.ListingGroupSummaryQueued]: {\n id: ContentId.ListingGroupSummaryQueued,\n defaultValue: 'Queued',\n },\n [ContentId.LMSError]: {\n id: ContentId.LMSError,\n defaultValue: 'LMS Error',\n },\n [ContentId.MarkAsFulfilled]: {\n id: ContentId.MarkAsFulfilled,\n defaultValue: 'Mark as Fulfilled',\n },\n [ContentId.MarkAsReviewed]: {\n id: ContentId.MarkAsReviewed,\n defaultValue: 'Mark as Reviewed',\n },\n [ContentId.MarketplaceEnableDisableConfirm]: {\n id: ContentId.MarketplaceEnableDisableConfirm,\n defaultValue: 'Enable/disable Marketplaces Confirmation',\n },\n [ContentId.MarketplaceFulfillmentState]: {\n id: ContentId.MarketplaceFulfillmentState,\n defaultValue: 'Marketplace Fulfillment State',\n },\n [ContentId.MaxReportSizeWarningLabel]: {\n id: ContentId.MaxReportSizeWarningLabel,\n defaultValue: 'Max rows exceeded',\n },\n [ContentId.MaxActiveListings]: {\n id: ContentId.MaxActiveListings,\n defaultValue: 'Max Active Listings',\n },\n [ContentId.MergedVenueGeometry]: {\n id: ContentId.MergedVenueGeometry,\n defaultValue: 'Merged Venue Geometry',\n },\n [ContentId.NoGroupsAvailableForVenueConfig]: {\n id: ContentId.NoGroupsAvailableForVenueConfig,\n defaultValue: 'No groupings available for this venue configuration.',\n },\n [ContentId.MinActiveListings]: {\n id: ContentId.MinActiveListings,\n defaultValue: 'Min Active Listings',\n },\n [ContentId.NoItemsWereChanged]: {\n id: ContentId.NoItemsWereChanged,\n defaultValue: 'No items matched the criteria for change.',\n },\n [ContentId.Mappings]: {\n id: ContentId.Mappings,\n defaultValue: 'Mappings',\n },\n [ContentId.NoFulfillmentProviders]: {\n id: ContentId.NoFulfillmentProviders,\n defaultValue: 'No fulfillment providers available.',\n },\n [ContentId.NotContains]: {\n id: ContentId.NotContains,\n defaultValue: 'Not Contains',\n },\n [ContentId.NumberOfUnsoldTickets]: {\n id: ContentId.NumberOfUnsoldTickets,\n defaultValue: 'Number of unsold tickets.',\n },\n [ContentId.NumberOfListedTicketsDescription]: {\n id: ContentId.NumberOfListedTicketsDescription,\n defaultValue: 'Number of unsold tickets that are priced and broadcasted.',\n },\n [ContentId.NumberOfUnlistedTicketsDescription]: {\n id: ContentId.NumberOfUnlistedTicketsDescription,\n defaultValue:\n 'Number of unsold tickets that need action (either to be priced or broadcasted).',\n },\n [ContentId.OnlyThis]: {\n id: ContentId.OnlyThis,\n defaultValue: 'Only This',\n },\n [ContentId.OrderNotFulfilled]: {\n id: ContentId.OrderNotFulfilled,\n defaultValue: 'Order not Fulfilled',\n },\n [ContentId.OriginatedBy]: {\n id: ContentId.OriginatedBy,\n defaultValue: 'Originated By',\n },\n [ContentId.OverchargedSeller]: {\n id: ContentId.OverchargedSeller,\n defaultValue: 'Overcharged Seller',\n },\n [ContentId.PandLTitle]: {\n id: ContentId.PandLTitle,\n defaultValue: 'Profit & Loss from sold tickets.',\n },\n [ContentId.PaymentId]: {\n id: ContentId.PaymentId,\n defaultValue: 'Payment ID',\n },\n [ContentId.Penalty]: {\n id: ContentId.Penalty,\n defaultValue: 'Penalty',\n },\n [ContentId.POPaymentState]: {\n id: ContentId.POPaymentState,\n defaultValue: 'PO Payment State',\n },\n [ContentId.Postponed]: {\n id: ContentId.Postponed,\n defaultValue: 'Postponed',\n },\n [ContentId.PriceHitHardFloor]: {\n id: ContentId.PriceHitHardFloor,\n defaultValue: 'Price Hit Hard Floor',\n },\n [ContentId.PriceHitRelativeFloor]: {\n id: ContentId.PriceHitRelativeFloor,\n defaultValue: 'Price Hit Relative Floor',\n },\n [ContentId.PriceHitMaxAllowedDrop]: {\n id: ContentId.PriceHitMaxAllowedDrop,\n defaultValue: 'Price Hit Max Allowed Drop',\n },\n [ContentId.PrivateInventoryNotes]: {\n id: ContentId.PrivateInventoryNotes,\n defaultValue: 'Private Inventory Notes',\n },\n [ContentId.PrivateSaleNotes]: {\n id: ContentId.PrivateSaleNotes,\n defaultValue: 'Private Sale Notes',\n },\n [ContentId.PrivatePurchaseNotes]: {\n id: ContentId.PrivatePurchaseNotes,\n defaultValue: 'Private Purchase Notes',\n },\n [ContentId.PurchaseTag]: {\n id: ContentId.PurchaseTag,\n defaultValue: 'Purchase Tag',\n },\n [ContentId.PutSaleListingOnHold]: {\n id: ContentId.PutSaleListingOnHold,\n defaultValue: 'Put sale listing on hold',\n },\n [ContentId.QuantitiesForcedToBottom]: {\n id: ContentId.QuantitiesForcedToBottom,\n defaultValue: 'Quantities Forced to Bottom',\n },\n [ContentId.Queued]: {\n id: ContentId.Queued,\n defaultValue: 'Queued',\n },\n [ContentId.RAGDeliveryDispute]: {\n id: ContentId.RAGDeliveryDispute,\n defaultValue: 'RAG / Delivery Dispute',\n },\n [ContentId.RAGSellerFaultNoResponse]: {\n id: ContentId.RAGSellerFaultNoResponse,\n defaultValue: 'RAG - Seller fault No Response',\n },\n [ContentId.Relocated]: {\n id: ContentId.Relocated,\n defaultValue: 'Relocated',\n },\n [ContentId.RelocatedAndRescheduled]: {\n id: ContentId.RelocatedAndRescheduled,\n defaultValue: 'Relocated and rescheduled',\n },\n [ContentId.ReplaceWith]: {\n id: ContentId.ReplaceWith,\n defaultValue: 'Replace with',\n },\n [ContentId.Rescheduled]: {\n id: ContentId.Rescheduled,\n defaultValue: 'Rescheduled',\n },\n [ContentId.SaleTag]: {\n id: ContentId.SaleTag,\n defaultValue: 'Sale Tag',\n },\n [ContentId.ResetFilters]: {\n id: ContentId.ResetFilters,\n defaultValue: 'Reset Filters',\n },\n [ContentId.SaleIsFulfilledOnMarketplace]: {\n id: ContentId.SaleIsFulfilledOnMarketplace,\n defaultValue:\n 'Fulfillment was reset within the platform but is still fulfilled on the marketplace.',\n },\n [ContentId.SaleIsFulfilledOnMarketplace2]: {\n id: ContentId.SaleIsFulfilledOnMarketplace2,\n defaultValue:\n 'The fulfillment status was reset on the platform, but the order is still fulfilled on the marketplace.',\n },\n [ContentId.SameSize]: {\n id: ContentId.SameSize,\n defaultValue: 'Same Size',\n },\n [ContentId.FlatView]: {\n id: ContentId.FlatView,\n defaultValue: 'Flat View',\n },\n [ContentId.Floor]: {\n id: ContentId.Floor,\n defaultValue: 'Floor',\n },\n [ContentId.FloorMustBeLessThanCeiling]: {\n id: ContentId.FloorMustBeLessThanCeiling,\n defaultValue: 'Price floor must be less than ceiling.',\n },\n [ContentId.Change]: {\n id: ContentId.Change,\n defaultValue: 'Change',\n },\n [ContentId.Check]: {\n id: ContentId.Check,\n defaultValue: 'Check',\n },\n [ContentId.ChooseAccount]: {\n id: ContentId.ChooseAccount,\n defaultValue: 'Choose Account',\n },\n [ContentId.ChoosePaymentMethodPlaceholder]: {\n id: ContentId.ChoosePaymentMethodPlaceholder,\n defaultValue: 'Choose payment method',\n },\n [ContentId.ChoosePaymentMethodTypePlaceholder]: {\n id: ContentId.ChoosePaymentMethodTypePlaceholder,\n defaultValue: 'Choose payment type',\n },\n [ContentId.ChooseVendor]: {\n id: ContentId.ChooseVendor,\n defaultValue: 'Choose Vendor',\n },\n [ContentId.ChooseIncrementType]: {\n id: ContentId.ChooseIncrementType,\n defaultValue: 'Choose increment type',\n },\n [ContentId.ChooseSeatingNotes]: {\n id: ContentId.ChooseSeatingNotes,\n defaultValue: 'Choose seat traits',\n },\n [ContentId.City]: {\n id: ContentId.City,\n defaultValue: 'City',\n },\n [ContentId.Classify]: {\n id: ContentId.Classify,\n defaultValue: 'Classify',\n },\n [ContentId.ClickToViewCompsInstruction]: {\n id: ContentId.ClickToViewCompsInstruction,\n defaultValue: 'Click to see available tickets and prices on the left.',\n },\n [ContentId.CompListingMode]: {\n id: ContentId.CompListingMode,\n defaultValue: 'Comp. Listing Mode',\n },\n [ContentId.CompListingFloor]: {\n id: ContentId.CompListingFloor,\n defaultValue: 'Comp. Listing Floor',\n },\n [ContentId.CompListingFloorMustBeSetError]: {\n id: ContentId.CompListingFloorMustBeSetError,\n defaultValue: 'Comp. Listing Floor must be set',\n },\n [ContentId.ContentView]: {\n id: ContentId.ContentView,\n defaultValue: 'Content View',\n },\n [ContentId.Copied]: {\n id: ContentId.Copied,\n defaultValue: 'Copied!',\n },\n [ContentId.CostPerTicket]: {\n id: ContentId.CostPerTicket,\n defaultValue: 'Cost Per Ticket',\n },\n [ContentId.Country]: {\n id: ContentId.Country,\n defaultValue: 'Country',\n },\n\n [ContentId.ConfirmETicketsIns]: {\n id: ContentId.ConfirmETicketsIns,\n defaultValue: \"Confirm the tickets you're providing\",\n },\n [ContentId.ClickToTakeAction]: {\n id: ContentId.ClickToTakeAction,\n defaultValue: 'Click here to take action.',\n },\n [ContentId.Close]: {\n id: ContentId.Close,\n defaultValue: 'Close',\n },\n [ContentId.COD]: {\n id: ContentId.COD,\n defaultValue: 'COD',\n },\n [ContentId.ConfirmSale]: {\n id: ContentId.ConfirmSale,\n defaultValue: 'Confirm Sale',\n },\n [ContentId.Contact]: { id: ContentId.Contact, defaultValue: 'Contact' },\n [ContentId.CostAndCredits]: {\n id: ContentId.CostAndCredits,\n defaultValue: 'Cost & Credits',\n },\n [ContentId.Cost]: {\n id: ContentId.Cost,\n defaultValue: 'Cost',\n },\n [ContentId.CostBasis]: {\n id: ContentId.CostBasis,\n defaultValue: 'Cost Basis',\n },\n [ContentId.CreateCustomFilter]: {\n id: ContentId.CreateCustomFilter,\n defaultValue: 'Create custom filter',\n },\n [ContentId.Credit]: {\n id: ContentId.Credit,\n defaultValue: 'Credit',\n },\n [ContentId.CreditBalance]: {\n id: ContentId.CreditBalance,\n defaultValue: 'Credit Balance',\n },\n [ContentId.CreditCard]: {\n id: ContentId.CreditCard,\n defaultValue: 'Credit Card',\n },\n [ContentId.CreditCardFee]: {\n id: ContentId.CreditCardFee,\n defaultValue: 'Credit Card Fee',\n },\n [ContentId.CustomDate]: {\n id: ContentId.CustomDate,\n defaultValue: 'Custom Date',\n },\n [ContentId.CustomDateRange]: {\n id: ContentId.CustomDateRange,\n defaultValue: 'Custom Date Range',\n },\n [ContentId.CustomFilter]: {\n id: ContentId.CustomFilter,\n defaultValue: 'Custom Filter',\n },\n [ContentId.Currency]: {\n id: ContentId.Currency,\n defaultValue: 'Currency',\n },\n [ContentId.DateAscArrow]: {\n id: ContentId.DateAscArrow,\n defaultValue: 'Date ↓',\n },\n [ContentId.DateDescArrow]: {\n id: ContentId.DateDescArrow,\n defaultValue: 'Date ↑',\n },\n [ContentId.DateDue]: {\n id: ContentId.DateDue,\n defaultValue: 'Date Due',\n },\n [ContentId.DateIncurred]: {\n id: ContentId.DateIncurred,\n defaultValue: 'Date Incurred',\n },\n [ContentId.DatePaid]: {\n id: ContentId.DatePaid,\n defaultValue: 'Date Paid',\n },\n [ContentId.DateRangeDisplayText]: {\n id: ContentId.DateRangeDisplayText,\n defaultValue: 'Select Date',\n },\n [ContentId.DateRangeSuggestionsTitle]: {\n id: ContentId.DateRangeSuggestionsTitle,\n defaultValue: 'Suggestions',\n },\n [ContentId.DaysPostfix]: {\n id: ContentId.DaysPostfix,\n defaultValue: 'day(s)',\n },\n [ContentId.Deactivated]: {\n id: ContentId.Deactivated,\n defaultValue: 'Deactivated',\n },\n [ContentId.Deal]: {\n id: ContentId.Deal,\n defaultValue: 'Deal',\n },\n [ContentId.DeallocateSale]: {\n id: ContentId.DeallocateSale,\n defaultValue: 'Deallocate',\n },\n [ContentId.DeallocateSaleWarning]: {\n id: ContentId.DeallocateSaleWarning,\n defaultValue:\n 'You are about to put this sale back to Pending Confirmation. Continue?',\n },\n [ContentId.DecreasePriceByPercent]: {\n id: ContentId.DecreasePriceByPercent,\n defaultValue: 'Decrease Price By X%',\n },\n [ContentId.Default]: {\n id: ContentId.Default,\n defaultValue: 'Default',\n },\n [ContentId.DefaultHideSeatNumbers]: {\n id: ContentId.DefaultHideSeatNumbers,\n defaultValue: 'Default Hide Seat Numbers',\n },\n [ContentId.DefaultInHandDateOffset]: {\n id: ContentId.DefaultInHandDateOffset,\n defaultValue: 'Default In Hand Date Offset',\n },\n [ContentId.DefaultSplitType]: {\n id: ContentId.DefaultSplitType,\n defaultValue: 'Default Split Type',\n },\n [ContentId.Deleted]: {\n id: ContentId.Deleted,\n defaultValue: 'Deleted',\n },\n [ContentId.DeletePurchasePaymentMethod]: {\n id: ContentId.DeletePurchasePaymentMethod,\n defaultValue: 'Delete Purchase Payment Method',\n },\n [ContentId.DeletePurchasePaymentMethodWarning]: {\n id: ContentId.DeletePurchasePaymentMethodWarning,\n defaultValue: 'You are about to delete this payment method. Continue?',\n },\n [ContentId.DeletePurchaseVendor]: {\n id: ContentId.DeletePurchaseVendor,\n defaultValue: 'Delete Purchase Vendor',\n },\n [ContentId.DeletePurchaseVendorWarning]: {\n id: ContentId.DeletePurchaseVendorWarning,\n defaultValue: 'You are about to delete this vendor. Continue?',\n },\n [ContentId.DeletePurchaseVendorAccount]: {\n id: ContentId.DeletePurchaseVendorAccount,\n defaultValue: 'Delete Purchase Vendor Account',\n },\n [ContentId.DeletePurchaseVendorAccountWarning]: {\n id: ContentId.DeletePurchaseVendorAccountWarning,\n defaultValue: 'You are about to delete this vendor account. Continue?',\n },\n [ContentId.Delisted]: {\n id: ContentId.Delisted,\n defaultValue: 'Delisted',\n },\n [ContentId.DelistingPending]: {\n id: ContentId.DelistingPending,\n defaultValue: 'Delisting...',\n },\n [ContentId.DelistingFailed]: {\n id: ContentId.DelistingFailed,\n defaultValue: 'Delist Failed',\n },\n [ContentId.DelistedClickToRelist]: {\n id: ContentId.DelistedClickToRelist,\n defaultValue: 'Delisted - click to relist',\n },\n [ContentId.DelistingClickToCancel]: {\n id: ContentId.DelistingClickToCancel,\n defaultValue: 'Delisting... - click to cancel',\n },\n [ContentId.DelistingFailedClickToTryAgain]: {\n id: ContentId.DelistingFailedClickToTryAgain,\n defaultValue: 'Delist Failed - click to try again',\n },\n [ContentId.DeliverTicket]: {\n id: ContentId.DeliverTicket,\n defaultValue: 'Deliver Ticket',\n },\n [ContentId.DeliverToAlternativeAccount]: {\n id: ContentId.DeliverToAlternativeAccount,\n defaultValue: 'Deliver to alternative account',\n },\n [ContentId.DebitCard]: {\n id: ContentId.DebitCard,\n defaultValue: 'Debit Card',\n },\n [ContentId.DebitNote]: {\n id: ContentId.DebitNote,\n defaultValue: 'Debit Note',\n },\n [ContentId.Delivery]: {\n id: ContentId.Delivery,\n defaultValue: 'Delivery',\n },\n [ContentId.DeliveryAccount]: {\n id: ContentId.DeliveryAccount,\n defaultValue: 'Delivery Account',\n },\n [ContentId.DeliveryCost]: {\n id: ContentId.DeliveryCost,\n defaultValue: 'Delivery Cost',\n },\n [ContentId.DeliveryWebsite]: {\n id: ContentId.DeliveryWebsite,\n defaultValue: 'Delivery Website',\n },\n [ContentId.DetailView]: {\n id: ContentId.DetailView,\n defaultValue: 'Detail View',\n },\n [ContentId.DirectOffline]: {\n id: ContentId.DirectOffline,\n defaultValue: 'Direct/Offline',\n },\n [ContentId.DisableThisMarketplace]: {\n id: ContentId.DisableThisMarketplace,\n defaultValue: 'Disable this marketplace',\n },\n [ContentId.Dismiss]: {\n id: ContentId.Dismiss,\n defaultValue: 'Dismiss',\n },\n [ContentId.Document]: {\n id: ContentId.Document,\n defaultValue: 'Document',\n },\n [ContentId.DoTheseTicketsHaveAnyRestrictions]: {\n id: ContentId.DoTheseTicketsHaveAnyRestrictions,\n defaultValue: 'Do these tickets have any restrictions on use?',\n },\n [ContentId.DoYouWorkForEventOrganizerOrViagogo]: {\n id: ContentId.DoYouWorkForEventOrganizerOrViagogo,\n defaultValue: 'Do you work for the Event Organizer or Viagogo?',\n },\n [ContentId.DragNAssignToSeats]: {\n id: ContentId.DragNAssignToSeats,\n defaultValue: 'Drag an e-Ticket to assign to seat',\n },\n [ContentId.DragNDropFiles]: {\n id: ContentId.DragNDropFiles,\n defaultValue: 'Drag & Drop file(s)',\n },\n [ContentId.Due]: {\n id: ContentId.Due,\n defaultValue: 'Due',\n },\n [ContentId.DuplicateBarcode]: {\n id: ContentId.DuplicateBarcode,\n defaultValue: 'Duplicate Barcode.',\n },\n [ContentId.DuplicateSeat]: {\n id: ContentId.DuplicateSeat,\n defaultValue: 'Duplicate seat.',\n },\n [ContentId.DuplicateUrl]: {\n id: ContentId.DuplicateUrl,\n defaultValue: 'Duplicate URL',\n },\n [ContentId.EachBarcodeOnNewLine]: {\n id: ContentId.EachBarcodeOnNewLine,\n defaultValue: 'Each barcode should be on a new line.',\n },\n [ContentId.ECheck]: {\n id: ContentId.ECheck,\n defaultValue: 'E-Check',\n },\n [ContentId.Economics]: {\n id: ContentId.Economics,\n defaultValue: 'Economics',\n },\n [ContentId.Edit]: {\n id: ContentId.Edit,\n defaultValue: 'Edit',\n },\n [ContentId.EditCostCredit]: {\n id: ContentId.EditCostCredit,\n defaultValue: 'Edit Cost/Credit',\n },\n [ContentId.EditOfflineSale]: {\n id: ContentId.EditOfflineSale,\n defaultValue: 'Edit Offline Sale',\n },\n [ContentId.EditPayment]: {\n id: ContentId.EditPayment,\n defaultValue: 'Edit Payment',\n },\n [ContentId.EditPaymentMethod]: {\n id: ContentId.EditPaymentMethod,\n defaultValue: 'Edit Purchase Payment Method',\n },\n [ContentId.EditPurchaseVendor]: {\n id: ContentId.EditPurchaseVendor,\n defaultValue: 'Edit Purchase Vendor',\n },\n [ContentId.EditPurchaseVendorAccount]: {\n id: ContentId.EditPurchaseVendorAccount,\n defaultValue: 'Edit Purchase Vendor Account',\n },\n [ContentId.EditCustomFilter]: {\n id: ContentId.EditCustomFilter,\n defaultValue: 'Edit custom filter',\n },\n [ContentId.EditPurchaseDetails]: {\n id: ContentId.EditPurchaseDetails,\n defaultValue: 'Edit Purchase Details',\n },\n [ContentId.EditTicketNotes]: {\n id: ContentId.EditTicketNotes,\n defaultValue: 'Provide additional information for your edits.',\n },\n [ContentId.Email]: {\n id: ContentId.Email,\n defaultValue: 'Email',\n },\n [ContentId.EmailDetails]: {\n id: ContentId.EmailDetails,\n defaultValue: 'Email Details',\n },\n [ContentId.Employee]: {\n id: ContentId.Employee,\n defaultValue: 'Employee',\n },\n [ContentId.EmployeeManagement]: {\n id: ContentId.EmployeeManagement,\n defaultValue: 'Employee Management',\n },\n [ContentId.EmptyContent]: {\n id: ContentId.EmptyContent,\n defaultValue: '',\n },\n [ContentId.EndDateBeforeStartDate]: {\n id: ContentId.EndDateBeforeStartDate,\n defaultValue: 'End date cannot be before start date',\n },\n [ContentId.EnterBarcodesIns]: {\n id: ContentId.EnterBarcodesIns,\n defaultValue:\n 'Enter the barcodes associated with each seat. You can copy & paste an ordered list from excel in the bulk entry view to autopopulate the seats.',\n },\n [ContentId.EnterTransferIdForPurchase]: {\n id: ContentId.EnterTransferIdForPurchase,\n defaultValue: 'Enter the Transfer ID',\n },\n [ContentId.EnterPurchaseOrderIdFromVendor]: {\n id: ContentId.EnterPurchaseOrderIdFromVendor,\n defaultValue: 'Enter the purchase order ID',\n },\n [ContentId.Entity]: {\n id: ContentId.Entity,\n defaultValue: 'Entity',\n },\n [ContentId.Error_BadGatewayError_Header]: {\n id: ContentId.Error_BadGatewayError_Header,\n defaultValue: 'Internet Unavailable',\n },\n [ContentId.Error_BadGatewayError_GenericMessage]: {\n id: ContentId.Error_BadGatewayError_GenericMessage,\n defaultValue:\n 'Internet Unavailable. Please check your connection and try again.',\n },\n [ContentId.Error_BadRequest_Header]: {\n id: ContentId.Error_BadRequest_Header,\n defaultValue: 'Bad Request',\n },\n [ContentId.Error_BadRequest_GenericMessage]: {\n id: ContentId.Error_BadRequest_GenericMessage,\n defaultValue: 'Some of your inputs are not valid. Please try again.',\n },\n [ContentId.Error_Forbidden_Header]: {\n id: ContentId.Error_Forbidden_Header,\n defaultValue: 'Forbidden',\n },\n [ContentId.Error_Forbidden_GenericMessage]: {\n id: ContentId.Error_Forbidden_GenericMessage,\n defaultValue:\n 'You are not allowed to view this page or access this resource.',\n },\n [ContentId.Error_InternalServerError_Header]: {\n id: ContentId.Error_InternalServerError_Header,\n defaultValue: 'Unexpected Error',\n },\n [ContentId.Error_InternalServerError_GenericMessage]: {\n id: ContentId.Error_InternalServerError_GenericMessage,\n defaultValue:\n 'An unexpected error occurred. Please try again or contact technical support if the problem perists.',\n },\n [ContentId.Error_NotImplemented_Header]: {\n id: ContentId.Error_NotImplemented_Header,\n defaultValue: 'Not Implemented',\n },\n [ContentId.Error_NotImplemented_GenericMessage]: {\n id: ContentId.Error_NotImplemented_GenericMessage,\n defaultValue:\n 'This feature is not yet implemented. Please try again later.',\n },\n [ContentId.Error_Unauthorized_Header]: {\n id: ContentId.Error_Unauthorized_Header,\n defaultValue: 'Unauthorized',\n },\n [ContentId.Error_Unauthorized_GenericMessage]: {\n id: ContentId.Error_Unauthorized_GenericMessage,\n defaultValue:\n 'You are not authorized to view this page or your login is expired. Please log-in again.',\n },\n [ContentId.Error_RequestTimeout_Header]: {\n id: ContentId.Error_RequestTimeout_Header,\n defaultValue: 'Request Timed Out',\n },\n [ContentId.Error_RequestTimeout_GenericMessage]: {\n id: ContentId.Error_RequestTimeout_GenericMessage,\n defaultValue:\n 'Your action cannot be completed in the allowable length of time. Please try again later.',\n },\n [ContentId.Error_NotFound_Header]: {\n id: ContentId.Error_NotFound_Header,\n defaultValue: 'Action Not Found',\n },\n [ContentId.Error_NotFound_GenericMessage]: {\n id: ContentId.Error_NotFound_GenericMessage,\n defaultValue:\n 'The action you are attempting does not exists. Please try again later.',\n },\n [ContentId.ETicket]: {\n id: ContentId.ETicket,\n defaultValue: 'E-Ticket',\n },\n [ContentId.ETicketUrl]: {\n id: ContentId.ETicketUrl,\n defaultValue: 'E-Ticket URL',\n },\n [ContentId.Event]: {\n id: ContentId.Event,\n defaultValue: 'Event',\n },\n [ContentId.EventDate]: {\n id: ContentId.EventDate,\n defaultValue: 'Event Date',\n },\n [ContentId.EventDateAsc]: {\n id: ContentId.EventDateAsc,\n defaultValue: 'Event Date Asc',\n },\n [ContentId.EventDateDesc]: {\n id: ContentId.EventDateDesc,\n defaultValue: 'Event Date Desc',\n },\n [ContentId.EventName]: {\n id: ContentId.EventName,\n defaultValue: 'Event Name',\n },\n [ContentId.EventTime]: {\n id: ContentId.EventTime,\n defaultValue: 'Event Time',\n },\n [ContentId.EventVisitors]: {\n id: ContentId.EventVisitors,\n defaultValue: 'Event Visitors',\n },\n [ContentId.ExpectedValue]: {\n id: ContentId.ExpectedValue,\n defaultValue: 'Expected Value',\n },\n [ContentId.Events]: {\n id: ContentId.Events,\n defaultValue: 'Events',\n },\n [ContentId.Everyone]: {\n id: ContentId.Everyone,\n defaultValue: 'Everyone',\n },\n [ContentId.ExchangeTickets]: {\n id: '',\n defaultValue: 'Exchange Tickets',\n },\n [ContentId.ExpectedValuePerTicket]: {\n id: ContentId.ExpectedValuePerTicket,\n defaultValue: 'Expected Value Per Ticket',\n },\n [ContentId.ExpireHold]: {\n id: ContentId.ExpireHold,\n defaultValue: 'Expire Hold',\n },\n [ContentId.ExpireHoldWarning]: {\n id: ContentId.ExpireHoldWarning,\n defaultValue: 'You are about to expire this hold. Continue?',\n },\n [ContentId.Export]: {\n id: ContentId.Export,\n defaultValue: 'Export',\n },\n [ContentId.FaceValue]: {\n id: ContentId.FaceValue,\n defaultValue: 'Face Value',\n },\n [ContentId.Failed]: {\n id: ContentId.Failed,\n defaultValue: 'Failed',\n },\n [ContentId.FailedAndRequiresSellerAction]: {\n id: ContentId.FailedAndRequiresSellerAction,\n defaultValue: 'Failed and requires user action',\n },\n [ContentId.FailedWithNonRetryableError]: {\n id: ContentId.FailedWithNonRetryableError,\n defaultValue: 'Failed',\n },\n [ContentId.FailedWithRetryableError]: {\n id: ContentId.FailedWithRetryableError,\n defaultValue: 'Failed and retried',\n },\n [ContentId.FailToLoadListContent]: {\n id: ContentId.FailToLoadListContent,\n defaultValue:\n 'An unexpected occurred trying to load this list. Please reload the page or contact us if the problem persists.',\n },\n [ContentId.FailedToStartupTheApp]: {\n id: ContentId.FailedToStartupTheApp,\n defaultValue:\n 'The app failed to start due to an unexpected error. Please reload the page or contact us if the problem persists.',\n },\n [ContentId.Failures]: {\n id: ContentId.Failures,\n defaultValue: 'Failures',\n },\n [ContentId.FarthestEvent]: {\n id: ContentId.FarthestEvent,\n defaultValue: 'Farthest Event',\n },\n [ContentId.Filters]: {\n id: ContentId.Filters,\n defaultValue: 'Filters',\n },\n [ContentId.FinalQuestionsOnYourTickets]: {\n id: ContentId.FinalQuestionsOnYourTickets,\n defaultValue: 'Final Questions on Your Tickets',\n },\n [ContentId.Finance]: {\n id: ContentId.Finance,\n defaultValue: 'Finance',\n },\n [ContentId.Finish]: {\n id: ContentId.Finish,\n defaultValue: 'Finish',\n },\n [ContentId.FloorRelativeToUnitCost]: {\n id: ContentId.FloorRelativeToUnitCost,\n defaultValue: 'Floor Relative to Unit Cost',\n },\n [ContentId.Format]: {\n id: ContentId.Format,\n defaultValue: 'Format',\n },\n [ContentId.FormulaBuilder]: {\n id: ContentId.FormulaBuilder,\n defaultValue: 'Formula Builder',\n },\n [ContentId.FormulaBuilderInfoLine1]: {\n id: ContentId.FormulaBuilderInfoLine1,\n defaultValue: '@ Opens variables',\n },\n [ContentId.FormulaBuilderInfoLine2]: {\n id: ContentId.FormulaBuilderInfoLine2,\n defaultValue: '/ Divide',\n },\n [ContentId.FormulaBuilderInfoLine3]: {\n id: ContentId.FormulaBuilderInfoLine3,\n defaultValue: '- Subtract',\n },\n [ContentId.FormulaBuilderInfoLine4]: {\n id: ContentId.FormulaBuilderInfoLine4,\n defaultValue: '+ Add',\n },\n [ContentId.FormulaBuilderInfoLine5]: {\n id: ContentId.FormulaBuilderInfoLine5,\n defaultValue: '* Multiply',\n },\n [ContentId.FormulaBuilderInfoLine6]: {\n id: ContentId.FormulaBuilderInfoLine6,\n defaultValue: '() Brackets',\n },\n [ContentId.ForTheEvent]: {\n id: ContentId.ForTheEvent,\n defaultValue: 'for the Event',\n },\n [ContentId.FreeEvent]: {\n id: ContentId.FreeEvent,\n defaultValue: 'Free Event',\n },\n [ContentId.From]: {\n id: ContentId.From,\n defaultValue: 'From',\n },\n [ContentId.FromDate]: {\n id: ContentId.FromDate,\n defaultValue: 'From Date',\n },\n [ContentId.Fulfill]: {\n id: ContentId.Fulfill,\n defaultValue: 'Fulfill',\n },\n [ContentId.FulfilledBy]: {\n id: ContentId.FulfilledBy,\n defaultValue: 'Fulfilled By',\n },\n [ContentId.Fulfiller]: {\n id: ContentId.Fulfiller,\n defaultValue: 'Fulfiller',\n },\n [ContentId.Fulfillment]: {\n id: ContentId.Fulfillment,\n defaultValue: 'Fulfillment',\n },\n [ContentId.FulfillActionNotAvailable]: {\n id: ContentId.FulfillActionNotAvailable,\n defaultValue:\n 'Fulfillment action for this type of sale is not yet supported.',\n },\n [ContentId.Fulfilled]: {\n id: ContentId.Fulfilled,\n defaultValue: PointOfSaleSaleStatus.Fulfilled,\n },\n [ContentId.FulfilledExternalMarketplace]: {\n id: ContentId.FulfilledExternalMarketplace,\n defaultValue: 'Fulfilled in external marketplace',\n },\n [ContentId.FulfillmentDate]: {\n id: ContentId.FulfillmentDate,\n defaultValue: 'Fulfillment Date',\n },\n [ContentId.FulfillmentFailed]: {\n id: ContentId.FulfillmentFailed,\n defaultValue: PointOfSaleSaleStatus.FulfillmentFailed,\n },\n [ContentId.FulfillmentRestrictions]: {\n id: ContentId.FulfillmentRestrictions,\n defaultValue: 'Fulfillment Restrictions',\n },\n [ContentId.FulfillmentState]: {\n id: ContentId.FulfillmentState,\n defaultValue: 'Fulfillment State',\n },\n [ContentId.FullEventInfo]: {\n id: ContentId.FullEventInfo,\n defaultValue: 'Full Event Info',\n },\n [ContentId.HideAdvancedSettings]: {\n id: ContentId.HideAdvancedSettings,\n defaultValue: 'Hide Advanced Settings',\n },\n [ContentId.History]: {\n id: ContentId.History,\n defaultValue: 'History',\n },\n [ContentId.IgnoreTheFirst]: {\n id: ContentId.IgnoreTheFirst,\n defaultValue: 'Ignore the first',\n },\n [ContentId.IncorrectPerfomerOrGrouping]: {\n id: ContentId.IncorrectPerfomerOrGrouping,\n defaultValue: 'Incorrect perfomer or grouping',\n },\n [ContentId.InsightsView]: {\n id: ContentId.InsightsView,\n defaultValue: 'Insights View',\n },\n [ContentId.IncreaseDecreasePrice]: {\n id: ContentId.IncreaseDecreasePrice,\n defaultValue: 'Increase/Decrease Price',\n },\n [ContentId.InCheckout]: {\n id: ContentId.InCheckout,\n defaultValue: 'In Checkout',\n },\n [ContentId.InvalidBaseRow]: {\n id: ContentId.InvalidBaseRow,\n defaultValue: 'Invalid base row',\n },\n [ContentId.IsDuplicate]: {\n id: ContentId.IsDuplicate,\n defaultValue: 'Is Duplicate',\n },\n [ContentId.IsPricedByMarketplace]: {\n id: ContentId.IsPricedByMarketplace,\n defaultValue: 'Is Priced By Marketplace',\n },\n [ContentId.ListedAndSold]: {\n id: ContentId.ListedAndSold,\n defaultValue: 'Listed & Sold',\n },\n [ContentId.KeepCurrentPurchaser]: {\n id: ContentId.KeepCurrentPurchaser,\n defaultValue: 'Keep Current',\n },\n [ContentId.ListView]: {\n id: ContentId.ListView,\n defaultValue: 'List View',\n },\n [ContentId.MembersOnThisTeam]: {\n id: ContentId.MembersOnThisTeam,\n defaultValue: 'Members on this team',\n },\n [ContentId.MergeListings_ListingMismatchWarning]: {\n id: ContentId.MergeListings_ListingMismatchWarning,\n defaultValue:\n 'The selected listings have different sections/rows. Merging will assign the same section/row to all seats.',\n },\n [ContentId.MinQty]: {\n id: ContentId.MinQty,\n defaultValue: 'Min Qty',\n },\n [ContentId.MinQuantity]: {\n id: ContentId.MinQuantity,\n defaultValue: 'Minimum Quantity',\n },\n [ContentId.MissingHeightData]: {\n id: ContentId.MissingHeightData,\n defaultValue:\n 'Seat map is missing height data. Adjusting the curve will have no effect.',\n },\n [ContentId.MissingDistanceData]: {\n id: ContentId.MissingDistanceData,\n defaultValue:\n 'Seat map is missing distance data. Adjusting the curve will have no effect.',\n },\n [ContentId.MissingAngleData]: {\n id: ContentId.MissingAngleData,\n defaultValue:\n 'Seat map is missing angle data. Adjusting the curve will have no effect.',\n },\n [ContentId.MoreThan]: {\n id: ContentId.MoreThan,\n defaultValue: 'more than',\n },\n [ContentId.NewAppVersion]: {\n id: ContentId.NewAppVersion,\n defaultValue: 'A new and improved version of the application is available.',\n },\n [ContentId.NewHeatMap]: {\n id: ContentId.NewHeatMap,\n defaultValue:\n 'A new recommended heatmap is available. Select it below to set it as your active heatmap.',\n },\n [ContentId.NotEnoughInformationToCreate]: {\n id: ContentId.NotEnoughInformationToCreate,\n defaultValue: 'Not enough information to create',\n },\n [ContentId.NotFoundOnPrimary]: {\n id: ContentId.NotFoundOnPrimary,\n defaultValue: 'Not found on primary',\n },\n [ContentId.NotMappedYet]: {\n id: ContentId.NotMappedYet,\n defaultValue: 'Not Mapped Yet',\n },\n [ContentId.NumberOfBuckets]: {\n id: ContentId.NumberOfBuckets,\n defaultValue: 'Number of Buckets',\n },\n\n [ContentId.OfMyListingQuality]: {\n id: ContentId.OfMyListingQuality,\n defaultValue: \"of my listing's quality\",\n },\n [ContentId.OnHoldBroadcastDisabled]: {\n id: ContentId.OnHoldBroadcastDisabled,\n defaultValue: 'On Hold (Broadcast Disabled)',\n },\n [ContentId.Override]: {\n id: ContentId.Override,\n defaultValue: 'Override',\n },\n [ContentId.OverrideDate]: {\n id: ContentId.OverrideDate,\n defaultValue: 'Override Date',\n },\n [ContentId.PandL]: {\n id: ContentId.PandL,\n defaultValue: 'P&L',\n },\n [ContentId.PaymentAmountReceived]: {\n id: ContentId.PaymentAmountReceived,\n defaultValue: 'Payment Amount Received',\n },\n [ContentId.PaymentCurrency]: {\n id: ContentId.PaymentCurrency,\n defaultValue: 'Payment Currency',\n },\n [ContentId.PaymentReceived]: {\n id: ContentId.PaymentReceived,\n defaultValue: 'Payment Received',\n },\n [ContentId.PaymentReference]: {\n id: ContentId.PaymentReference,\n defaultValue: 'Payment Reference',\n },\n [ContentId.PendingPartnerIntegrations]: {\n id: ContentId.PendingPartnerIntegrations,\n defaultValue: 'Pending Partner Integrations',\n },\n [ContentId.IncorrectCountryCode]: {\n id: ContentId.IncorrectCountryCode,\n defaultValue: 'Incorrect Country Code',\n },\n [ContentId.Members]: {\n id: ContentId.Members,\n defaultValue: 'Members',\n },\n [ContentId.Permission_UpdateBuyerCommission]: {\n id: ContentId.Permission_UpdateBuyerCommission,\n defaultValue: 'Update buyer commission',\n },\n [ContentId.Permission_UpdateBuyerCommissionOwned]: {\n id: ContentId.Permission_UpdateBuyerCommissionOwned,\n defaultValue: 'Update buyer commission on created purchase',\n },\n [ContentId.Permission_ConfirmRejectOnAssignedSales]: {\n id: ContentId.Permission_ConfirmRejectOnAssignedSales,\n defaultValue: 'Confirm/reject assigned sales (Fulfiller)',\n },\n [ContentId.Permission_ConfirmRejectSale]: {\n id: ContentId.Permission_ConfirmRejectSale,\n defaultValue: 'Confirm/reject sale',\n },\n [ContentId.Permission_ConfirmRejectSaleOnPricedListings]: {\n id: ContentId.Permission_ConfirmRejectSaleOnPricedListings,\n defaultValue: 'Confirm/reject sale from priced listings (Pricer)',\n },\n [ContentId.Permission_ConfirmRejectSalesFromPurchasedListings]: {\n id: ContentId.Permission_ConfirmRejectSalesFromPurchasedListings,\n defaultValue: 'Confirm/reject sales from purchased listings (Purchaser)',\n },\n [ContentId.Permission_CreatePO]: {\n id: ContentId.Permission_CreatePO,\n defaultValue: 'Create PO',\n },\n [ContentId.Permission_FulfillSale]: {\n id: ContentId.Permission_FulfillSale,\n defaultValue: 'Fulfill sale',\n },\n [ContentId.Permission_FulfillSaleOnPricedListings]: {\n id: ContentId.Permission_FulfillSaleOnPricedListings,\n defaultValue: 'Fulfill sale from priced listings (Pricer)',\n },\n [ContentId.Permission_FulfillSalesFromPurchasedListings]: {\n id: ContentId.Permission_FulfillSalesFromPurchasedListings,\n defaultValue: 'Fulfill sale from purchased listings (Purchaser)',\n },\n [ContentId.Permission_ManageCreatedPlaceholderListings]: {\n id: ContentId.Permission_ManageCreatedPlaceholderListings,\n defaultValue: 'Manage created placeholder listings',\n },\n [ContentId.Permission_ManageOfflineSalesOnPurchasedListings]: {\n id: ContentId.Permission_ManageOfflineSalesOnPurchasedListings,\n defaultValue: 'Manage offline sales from purchased listings (Purchaser)',\n },\n [ContentId.Permission_ManagePlaceholderListings]: {\n id: ContentId.Permission_ManagePlaceholderListings,\n defaultValue: 'Manage placeholder listings',\n },\n [ContentId.Permission_Predeliver]: {\n id: ContentId.Permission_Predeliver,\n defaultValue: 'Predeliver',\n },\n [ContentId.Permission_PredeliverOnAssignedListings]: {\n id: ContentId.Permission_PredeliverOnAssignedListings,\n defaultValue: 'Predeliver assigned listings (Pricer)',\n },\n [ContentId.Permission_BroadcastUnbroadcastOnAssignedListings]: {\n id: ContentId.Permission_BroadcastUnbroadcastOnAssignedListings,\n defaultValue: 'Broadcast/unbroadcast assigned listings (Pricer)',\n },\n [ContentId.Permission_PredeliverPurchasedListings]: {\n id: ContentId.Permission_PredeliverPurchasedListings,\n defaultValue: 'Predeliver purchased listings (Purchaser)',\n },\n [ContentId.Permission_SetPriceOnAssignedListings]: {\n id: ContentId.Permission_SetPriceOnAssignedListings,\n defaultValue: 'Set price on assigned listings (Pricer)',\n },\n [ContentId.Permission_UpdateCreatedReports]: {\n id: ContentId.Permission_UpdateCreatedReports,\n defaultValue: 'Update created reports',\n },\n [ContentId.Permission_UpdateInfoFromPurchasedListings]: {\n id: ContentId.Permission_UpdateInfoFromPurchasedListings,\n defaultValue: 'Update info on sale from purchased listings (Purchaser)',\n },\n [ContentId.Permission_UpdateInfoOnAssignedListings]: {\n id: ContentId.Permission_UpdateInfoOnAssignedListings,\n defaultValue: 'Update info on assigned listings (Pricer)',\n },\n [ContentId.Permission_UpdateInfoOnAssignedSales]: {\n id: ContentId.Permission_UpdateInfoOnAssignedSales,\n defaultValue: 'Update info on assigned sales (Fulfiller)',\n },\n [ContentId.Permission_UpdateInfoOnPricedListings]: {\n id: ContentId.Permission_UpdateInfoOnPricedListings,\n defaultValue: 'Update info on sale from priced listings (Pricer)',\n },\n [ContentId.Permission_UpdateInfoOnPurchasedListings]: {\n id: ContentId.Permission_UpdateInfoOnPurchasedListings,\n defaultValue: 'Update info on purchased listings (Purchaser)',\n },\n [ContentId.Permission_UpdateTagsFromPricedListings]: {\n id: ContentId.Permission_UpdateTagsFromPricedListings,\n defaultValue: 'Update tags on sale from priced listings (Pricer)',\n },\n [ContentId.Permission_UpdateTagsFromPurchasedListings]: {\n id: ContentId.Permission_UpdateTagsFromPurchasedListings,\n defaultValue: 'Update tags on sale from purchased listings (Purchaser)',\n },\n [ContentId.Permission_UpdateTagsOnAssignedListings]: {\n id: ContentId.Permission_UpdateTagsOnAssignedListings,\n defaultValue: 'Update tags on assigned listings (Pricer)',\n },\n [ContentId.Permission_SetPriceOnPurchasedListings]: {\n id: ContentId.Permission_SetPriceOnPurchasedListings,\n defaultValue: 'Set price on purchased listings (Purchaser)',\n },\n [ContentId.Permission_UpdateTagsOnAssignedSales]: {\n id: ContentId.Permission_UpdateTagsOnAssignedSales,\n defaultValue: 'Update tags on assigned sales (Fulfiller)',\n },\n [ContentId.Permission_UpdateTagsOnOwnedPurchasedOrder]: {\n id: ContentId.Permission_UpdateTagsOnOwnedPurchasedOrder,\n defaultValue: 'Update tags on created purchase',\n },\n [ContentId.Permission_UpdateTagsOnPurchasedListings]: {\n id: ContentId.Permission_UpdateTagsOnPurchasedListings,\n defaultValue: 'Update tags on purchased listings (Purchaser)',\n },\n [ContentId.Permission_FulfillSalesOnAssignedSales]: {\n id: ContentId.Permission_FulfillSalesOnAssignedSales,\n defaultValue: 'Fulfill assigned sales (Fulfiller)',\n },\n [ContentId.Permission_ViewAssignedListings]: {\n id: ContentId.Permission_ViewAssignedListings,\n defaultValue: 'View priced listings (Pricer)',\n },\n [ContentId.Permission_ViewAssignedSales]: {\n id: ContentId.Permission_ViewAssignedSales,\n defaultValue: 'View assigned sales (Fulfiller)',\n },\n [ContentId.Permission_ViewFulfillmentArtifactsOnAssignedListings]: {\n id: ContentId.Permission_ViewFulfillmentArtifactsOnAssignedListings,\n defaultValue: 'View fulfillment artifacts on assigned listings (Pricer)',\n },\n [ContentId.Permission_ViewFulfillmentArtifactsOnAssignedSales]: {\n id: ContentId.Permission_ViewFulfillmentArtifactsOnAssignedSales,\n defaultValue: 'View fulfillment artifacts on assigned sales (Fulfiller)',\n },\n [ContentId.Permission_ViewFulfillmentArtifactsOnPricedListings]: {\n id: ContentId.Permission_ViewFulfillmentArtifactsOnPricedListings,\n defaultValue: 'View fulfillment artifacts on priced listings (Pricer)',\n },\n [ContentId.Permission_ViewFulfillmentArtifactsOnPurchasedListings]: {\n id: ContentId.Permission_ViewFulfillmentArtifactsOnPurchasedListings,\n defaultValue:\n 'View fulfillment artifacts on purchased listings (Purchaser)',\n },\n [ContentId.Permission_ViewFulfillmentArtifactsOnSaleFromPricedListings]: {\n id: ContentId.Permission_ViewFulfillmentArtifactsOnSaleFromPricedListings,\n defaultValue:\n 'View fulfillment artifacts on sale from priced listings (Pricer)',\n },\n [ContentId.Permission_ViewFulfillmentArtifactsOnSaleFromPurchasedListings]: {\n id: ContentId.Permission_ViewFulfillmentArtifactsOnSaleFromPurchasedListings,\n defaultValue:\n 'View fulfillment artifacts on sale from purchased listings (Purchaser)',\n },\n [ContentId.Permission_ViewGlobalReports]: {\n id: ContentId.Permission_ViewGlobalReports,\n defaultValue: 'View Global Reports',\n },\n [ContentId.Permission_ViewOwnedPurchasedOrders]: {\n id: ContentId.Permission_ViewOwnedPurchasedOrders,\n defaultValue: 'View owned purchased orders',\n },\n [ContentId.Permission_ViewSaleFromPricedListings]: {\n id: ContentId.Permission_ViewSaleFromPricedListings,\n defaultValue: 'View sale from priced listings (Pricer)',\n },\n [ContentId.Permission_ViewPurchasedListings]: {\n id: ContentId.Permission_ViewPurchasedListings,\n defaultValue: 'View purchased listings (Purchaser)',\n },\n [ContentId.Permission_ViewRecentListings]: {\n id: ContentId.Permission_ViewRecentListings,\n defaultValue: 'View recent listings',\n },\n [ContentId.Permission_ViewRecentSales]: {\n id: ContentId.Permission_ViewRecentSales,\n defaultValue: 'View recent sales',\n },\n [ContentId.Permission_ViewSaleOnPurchasedListings]: {\n id: ContentId.Permission_ViewSaleOnPurchasedListings,\n defaultValue: 'View sale from purchased listings (Purchaser)',\n },\n [ContentId.Permission_Webhook_View]: {\n id: ContentId.Permission_Webhook_View,\n defaultValue: 'View Webhook',\n },\n [ContentId.Permission_Webhook_Create]: {\n id: ContentId.Permission_Webhook_Create,\n defaultValue: 'Create Webhook',\n },\n [ContentId.Permission_Webhook_Edit]: {\n id: ContentId.Permission_Webhook_Edit,\n defaultValue: 'Edit Webhook',\n },\n [ContentId.Placeholder]: {\n id: ContentId.Placeholder,\n defaultValue: 'Placeholder',\n },\n [ContentId.PlaceholderPurchaseMessage]: {\n id: ContentId.PlaceholderPurchaseMessage,\n defaultValue:\n 'Placeholder inventory have no purchases until a purchase is automatically or manually allocated.',\n },\n [ContentId.POCreatedBy]: {\n id: ContentId.POCreatedBy,\n defaultValue: 'PO Created By',\n },\n [ContentId.Priced]: {\n id: ContentId.Priced,\n defaultValue: 'Priced',\n },\n [ContentId.ProvisionallySourced]: {\n id: ContentId.ProvisionallySourced,\n defaultValue: 'Provisionally Sourced',\n },\n [ContentId.Purchases_UpdateBuyerCommissionOwned_Details]: {\n id: ContentId.Purchases_UpdateBuyerCommissionOwned_Details,\n defaultValue: 'Add/Edit commission for purchases owned by user',\n },\n [ContentId.Purchases_UpdateBuyerCommission_Details]: {\n id: ContentId.Purchases_UpdateBuyerCommission_Details,\n defaultValue: 'Add/Edit commission for purchases',\n },\n [ContentId.PutOnHold]: {\n id: ContentId.PutOnHold,\n defaultValue: 'Put on Hold',\n },\n [ContentId.PutOnHoldAll]: {\n id: ContentId.PutOnHoldAll,\n defaultValue: 'Put on Hold for All',\n },\n [ContentId.PutOnHoldSelected]: {\n id: ContentId.PutOnHoldSelected,\n defaultValue: 'Put on Hold for Selected',\n },\n [ContentId.RankPremium]: {\n id: ContentId.RankPremium,\n defaultValue: 'Rank Premium',\n },\n [ContentId.Reason]: {\n id: ContentId.Reason,\n defaultValue: 'Reason',\n },\n [ContentId.RefreshNow]: {\n id: ContentId.RefreshNow,\n defaultValue: 'Refresh Now',\n },\n [ContentId.RejectAllocation]: {\n id: ContentId.RejectAllocation,\n defaultValue: 'Reject Allocation',\n },\n [ContentId.RejectAllocationWarning]: {\n id: ContentId.RejectAllocationWarning,\n defaultValue:\n 'You are about to reject the tickets allocated for this sale. Continue?',\n },\n [ContentId.RejectionReasonInfoText1]: {\n id: ContentId.RejectionReasonInfoText1,\n defaultValue: 'Your event was rejected due to the following reason: ',\n },\n [ContentId.RejectionReasonInfoText2]: {\n id: ContentId.RejectionReasonInfoText2,\n defaultValue:\n 'If you believe this decision was an error, please contact an account manager for further assistance.',\n },\n [ContentId.RelativeRankPremium]: {\n id: ContentId.RelativeRankPremium,\n defaultValue: 'Relative Rank Premium',\n },\n [ContentId.RelativeTo]: {\n id: ContentId.RelativeTo,\n defaultValue: 'Relative to',\n },\n [ContentId.RemovePredelivery]: {\n id: ContentId.RemovePredelivery,\n defaultValue: 'Remove Predelivery',\n },\n [ContentId.RemoveTagValue]: {\n id: ContentId.RemoveTagValue,\n defaultValue: 'Remove Tag Value',\n },\n [ContentId.ReportHistory]: {\n id: ContentId.ReportHistory,\n defaultValue: 'Report History',\n },\n [ContentId.Reports_ViewGlobalReports_Details]: {\n id: ContentId.Reports_ViewGlobalReports_Details,\n defaultValue: 'View global reports, across all modules',\n },\n [ContentId.RequestState]: {\n id: ContentId.RequestState,\n defaultValue: 'Request State',\n },\n [ContentId.SameOverrideExists]: {\n id: ContentId.SameOverrideExists,\n defaultValue: 'Same Override with the same settings already exists',\n },\n [ContentId.SameSection]: {\n id: ContentId.SameSection,\n defaultValue: 'Same Section',\n },\n [ContentId.SaveFilter]: {\n id: ContentId.SaveFilter,\n defaultValue: 'Save Filter',\n },\n [ContentId.SaveSettingsToViewUpdatedComps]: {\n id: ContentId.SaveSettingsToViewUpdatedComps,\n defaultValue: 'Save settings to view refreshed related listings',\n },\n [ContentId.SearchAndReplace]: {\n id: ContentId.SearchAndReplace,\n defaultValue: 'Search and Replace',\n },\n [ContentId.SearchEvent]: {\n id: ContentId.SearchEvent,\n defaultValue: 'Search Event',\n },\n [ContentId.SearchFor]: {\n id: ContentId.SearchFor,\n defaultValue: 'Search for',\n },\n [ContentId.SeatingMapped]: {\n id: ContentId.SeatingMapped,\n defaultValue: 'Seating Mapped',\n },\n [ContentId.SectionClearingPrices]: {\n id: ContentId.SectionClearingPrices,\n defaultValue: 'Section Clearing Prices',\n },\n [ContentId.SeeAdvancedSettings]: {\n id: ContentId.SeeAdvancedSettings,\n defaultValue: 'See Advanced Settings',\n },\n [ContentId.SelectFilterValue]: {\n id: ContentId.SelectFilterValue,\n defaultValue:\n 'Filter has default value and will not save nor affect the result',\n },\n [ContentId.SelectItemsForBulkEdit]: {\n id: ContentId.SelectItemsForBulkEdit,\n defaultValue: 'Select items for bulk edit',\n },\n [ContentId.SelectTag]: {\n id: ContentId.SelectTag,\n defaultValue: 'Select Tag',\n },\n [ContentId.SellerError]: {\n id: ContentId.SellerError,\n defaultValue: 'Seller Error',\n },\n [ContentId.SellerRelationship]: {\n id: ContentId.SellerRelationship,\n defaultValue: 'Seller Relationship',\n },\n [ContentId.SetActiveInGroup]: {\n id: ContentId.SetActiveInGroup,\n defaultValue: 'Set active in group',\n },\n [ContentId.SetTicketTypePriority]: {\n id: ContentId.SetTicketTypePriority,\n defaultValue: 'Set Ticket Type Priority',\n },\n [ContentId.ShippingRefund]: {\n id: ContentId.ShippingRefund,\n defaultValue: 'Shipping Refund',\n },\n [ContentId.ShowDetailedSettings]: {\n id: ContentId.ShowDetailedSettings,\n defaultValue: 'Show Detailed Settings',\n },\n [ContentId.ShownQty]: {\n id: ContentId.ShownQty,\n defaultValue: 'Shown Qty',\n },\n [ContentId.ShuffleRanks]: {\n id: ContentId.ShuffleRanks,\n defaultValue: 'Shuffle Ranks',\n },\n [ContentId.SignUpBannerTitle]: {\n id: ContentId.SignUpBannerTitle,\n defaultValue: 'Reach Pro is invite only for now.',\n },\n [ContentId.SignUpBannerSubTitle]: {\n id: ContentId.SignUpBannerSubTitle,\n defaultValue: 'Comeback for more details at a later date',\n },\n [ContentId.SignUpWelcomeSubtitle]: {\n id: ContentId.SignUpWelcomeSubtitle,\n defaultValue: 'Welcome to the future of tickets',\n },\n [ContentId.SimulateWebsiteDiscount]: {\n id: ContentId.SimulateWebsiteDiscount,\n defaultValue: 'Simulate Website Discounts',\n },\n [ContentId.Skipped]: {\n id: ContentId.Skipped,\n defaultValue: 'Skipped',\n },\n [ContentId.Spacing]: {\n id: ContentId.Spacing,\n defaultValue: 'Spacing',\n },\n [ContentId.SportsOrConcertsWith360]: {\n id: ContentId.SportsOrConcertsWith360,\n defaultValue: 'Sports or Concerts with 360',\n },\n [ContentId.StubHubListings]: {\n id: ContentId.StubHubListings,\n defaultValue: 'StubHub Listings',\n },\n [ContentId.StubhubRecommended]: {\n id: ContentId.StubhubRecommended,\n defaultValue: 'StubHub Recommended',\n },\n [ContentId.Submit]: {\n id: ContentId.Submit,\n defaultValue: 'Submit',\n },\n [ContentId.SyncFailedClickToRelist]: {\n id: ContentId.SyncFailedClickToRelist,\n defaultValue: 'Sync failed - click to relist',\n },\n [ContentId.SyncFailedClickToDelist]: {\n id: ContentId.SyncFailedClickToDelist,\n defaultValue: 'Sync failed - click to delist',\n },\n [ContentId.TagNameNotAllowed]: {\n id: ContentId.TagNameNotAllowed,\n defaultValue: 'Tag name not allowed.',\n },\n [ContentId.TargetPercentage]: {\n id: ContentId.TargetPercentage,\n defaultValue: 'Target Percentage',\n },\n [ContentId.TaxRefund]: {\n id: ContentId.TaxRefund,\n defaultValue: 'Tax Refund',\n },\n [ContentId.Team]: {\n id: ContentId.Team,\n defaultValue: 'Team',\n },\n [ContentId.TeamName]: {\n id: ContentId.TeamName,\n defaultValue: 'Team name',\n },\n [ContentId.Teams]: {\n id: ContentId.Teams,\n defaultValue: 'Teams',\n },\n [ContentId.ProvisionalAllocation]: {\n id: ContentId.ProvisionalAllocation,\n defaultValue: 'Provisional Allocation',\n },\n [ContentId.ThenBy]: {\n id: ContentId.ThenBy,\n defaultValue: 'Then By',\n },\n [ContentId.TheNextCheapest]: {\n id: ContentId.TheNextCheapest,\n defaultValue: 'the next cheapest',\n },\n [ContentId.TicketId]: {\n id: ContentId.TicketId,\n defaultValue: 'Ticket ID',\n },\n [ContentId.TicketGroupId]: {\n id: ContentId.TicketGroupId,\n defaultValue: 'Ticket Group ID',\n },\n [ContentId.TimeView]: {\n id: ContentId.TimeView,\n defaultValue: 'Time View',\n },\n [ContentId.Timezone]: {\n id: ContentId.Timezone,\n defaultValue: 'Timezone',\n },\n [ContentId.TimezoneDefaultOption]: {\n id: ContentId.TimezoneDefaultOption,\n defaultValue: 'Automatic (current location)',\n },\n [ContentId.TimezoneDescription]: {\n id: ContentId.TimezoneDescription,\n defaultValue:\n \"Adjusting the timezone settings will automatically update the dates and times associated with purchase, listing and sale dates in the POS. Event dates will remain relative to the venue's location.\",\n },\n [ContentId.TooManyResultPerformanceWarning]: {\n id: ContentId.TooManyResultPerformanceWarning,\n defaultValue:\n 'This filter option can return a lot of items and cause performance degradation.',\n },\n [ContentId.TotalCostOfUnsoldTickets]: {\n id: ContentId.TotalCostOfUnsoldTickets,\n defaultValue: 'Total cost of unsold tickets.',\n },\n [ContentId.UndoCancel]: {\n id: ContentId.UndoCancel,\n defaultValue: 'Undo Cancel',\n },\n [ContentId.UngroupListings]: {\n id: ContentId.UngroupListings,\n defaultValue: 'Ungroup Listings',\n },\n [ContentId.Unsold]: {\n id: ContentId.Unsold,\n defaultValue: 'Unsold',\n },\n [ContentId.UnsoldEvents]: {\n id: ContentId.UnsoldEvents,\n defaultValue: 'Unsold Events',\n },\n [ContentId.UnsoldProceeds]: {\n id: ContentId.UnsoldProceeds,\n defaultValue: 'Unsold Proceeds',\n },\n [ContentId.Update]: {\n id: ContentId.Update,\n defaultValue: 'Update',\n },\n [ContentId.UpdateAutoFulfill]: {\n id: ContentId.UpdateAutoFulfill,\n defaultValue: 'Update AutoFulfill',\n },\n [ContentId.UpdateBuyerCommission]: {\n id: ContentId.UpdateBuyerCommission,\n defaultValue: 'Update Buyer Commission',\n },\n [ContentId.UpdateEventIdWarning]: {\n id: ContentId.UpdateEventIdWarning,\n defaultValue:\n 'Updating the Event ID may affect IDs across multiple marketplaces.',\n },\n [ContentId.UpdateMarketplacePrices]: {\n id: ContentId.UpdateMarketplacePrices,\n defaultValue: 'Update Marketplace Prices',\n },\n [ContentId.UpdateMarketplaceSeating]: {\n id: ContentId.UpdateMarketplaceSeating,\n defaultValue: 'Update Marketplace Seating',\n },\n [ContentId.UpdateMode]: {\n id: ContentId.UpdateMode,\n defaultValue: 'Update Mode',\n },\n [ContentId.UpdatePriceEvery]: {\n id: ContentId.UpdatePriceEvery,\n defaultValue: 'Update price every',\n },\n [ContentId.UpdatePriceFloorCeiling]: {\n id: ContentId.UpdatePriceFloorCeiling,\n defaultValue: 'Update Price Floor/Ceiling',\n },\n [ContentId.UpdatePrivateNotes]: {\n id: ContentId.UpdatePrivateNotes,\n defaultValue: 'Update Private Notes',\n },\n [ContentId.UpdatePurchaseWithMergedListingWarning]: {\n id: ContentId.UpdatePurchaseWithMergedListingWarning,\n defaultValue:\n 'This purchase contains ticket groups that have been merged. This update may result in the listings being split.',\n },\n [ContentId.UpdateTagValue]: {\n id: ContentId.UpdateTagValue,\n defaultValue: 'Update Tag Value',\n },\n [ContentId.UpdateTagValues]: {\n id: ContentId.UpdateTagValues,\n defaultValue: 'Update Tag Values',\n },\n [ContentId.UpdateTagValuesSelected]: {\n id: ContentId.UpdateTagValuesSelected,\n defaultValue: 'Update Tag Values for Selected',\n },\n [ContentId.UpdateTagValueWarning]: {\n id: ContentId.UpdateTagValueWarning,\n defaultValue: 'If no existing value is found, a new value will be added.',\n },\n [ContentId.UploadPredelivery]: {\n id: ContentId.UploadPredelivery,\n defaultValue: 'Upload Predelivery',\n },\n [ContentId.UploadSeatScoreModelInfo]: {\n id: ContentId.UploadSeatScoreModelInfo,\n defaultValue:\n 'New model created from CSV upload will use the value in the Name field from the Seat Heapmap config form as the model name.',\n },\n [ContentId.UseAsTemplate]: {\n id: ContentId.UseAsTemplate,\n defaultValue: 'Use as template',\n },\n [ContentId.Velocity]: {\n id: ContentId.Velocity,\n defaultValue: 'Velocity',\n },\n [ContentId.VelocityHours]: {\n id: ContentId.VelocityHours,\n defaultValue: 'Velocity Hours',\n },\n [ContentId.VenueConfiguration]: {\n id: ContentId.VenueConfiguration,\n defaultValue: 'Venue Configuration',\n },\n [ContentId.VenueGeometry]: {\n id: ContentId.VenueGeometry,\n defaultValue: 'Venue Geometry',\n },\n [ContentId.VenueSpecific]: {\n id: ContentId.VenueSpecific,\n defaultValue: 'Venue Specific',\n },\n [ContentId.VersionMismatch]: {\n id: ContentId.VersionMismatch,\n defaultValue: 'Version Mismatch',\n },\n [ContentId.VersionMismatchExplanation]: {\n id: ContentId.VersionMismatchExplanation,\n defaultValue:\n 'The fulfillment artifacts in POS and on the marketplace does not match. Please contact the marketplace.',\n },\n [ContentId.FulfillOnStubHub]: {\n id: ContentId.FulfillOnStubHub,\n defaultValue: 'Fulfill on StubHub',\n },\n [ContentId.FulfillOnViagogo]: {\n id: ContentId.FulfillOnViagogo,\n defaultValue: 'Fulfill on Viagogo',\n },\n [ContentId.FullSeating]: {\n id: ContentId.FullSeating,\n defaultValue: 'Full Seating',\n },\n [ContentId.FullySold]: {\n id: ContentId.FullySold,\n defaultValue: 'Fully Sold',\n },\n [ContentId.FutureEvents]: {\n id: ContentId.FutureEvents,\n defaultValue: EventTimeFrameFilter.Future,\n },\n [ContentId.General]: {\n id: ContentId.General,\n defaultValue: 'General',\n },\n [ContentId.GeneralAdmissionEvent]: {\n id: ContentId.GeneralAdmissionEvent,\n defaultValue: 'General Admission event',\n },\n [ContentId.GeneralAdmissionMessage]: {\n id: ContentId.GeneralAdmissionMessage,\n defaultValue:\n 'All tickets give you access to any available seating or standing areas. There is no assigned seating.',\n },\n [ContentId.GeneralMessage]: {\n id: ContentId.GeneralMessage,\n defaultValue: 'General Message',\n },\n [ContentId.GeneralSettingsAll]: {\n id: ContentId.GeneralSettingsAll,\n defaultValue: 'Edit General Settings for All',\n },\n [ContentId.GeneralSettingsSelected]: {\n id: ContentId.GeneralSettingsSelected,\n defaultValue: 'Edit General Settings for Selected',\n },\n [ContentId.GenericActionFailure]: {\n id: ContentId.GenericActionFailure,\n defaultValue:\n 'An unexpected error occurred. Please try again or contact technical support if the problem perists.',\n },\n [ContentId.Genre]: {\n id: ContentId.Genre,\n defaultValue: 'Genre',\n },\n [ContentId.GoBack]: {\n id: ContentId.GoBack,\n defaultValue: 'Go back',\n },\n [ContentId.GoTo]: {\n id: ContentId.GoTo,\n defaultValue: 'Go To',\n },\n [ContentId.GoToMessageThread]: {\n id: ContentId.GoToMessageThread,\n defaultValue: 'Go to message thread',\n },\n [ContentId.Group]: {\n id: ContentId.Group,\n defaultValue: 'Group',\n },\n [ContentId.GroupBy]: {\n id: ContentId.GroupBy,\n defaultValue: 'Group By',\n },\n [ContentId.GroupingDefault]: {\n id: ContentId.GroupingDefault,\n defaultValue: 'Grouping Default',\n },\n [ContentId.GroupingTemplate]: {\n id: ContentId.GroupingTemplate,\n defaultValue: 'Grouping Template',\n },\n [ContentId.GroupListings]: {\n id: ContentId.GroupListings,\n defaultValue: 'Group Listings',\n },\n [ContentId.HasBroadcastError]: {\n id: ContentId.HasBroadcastError,\n defaultValue: 'Has Broadcast Error',\n },\n [ContentId.HasUnsoldTickets]: {\n id: ContentId.HasUnsoldTickets,\n defaultValue: 'Has Unsold Tickets',\n },\n [ContentId.HeatMap]: {\n id: ContentId.HeatMap,\n defaultValue: 'Heat Map',\n },\n [ContentId.HeatMapInstruction1]: {\n id: ContentId.HeatMapInstruction1,\n defaultValue:\n 'Set a heat map for this event - the more valuable seats, the hotter the color.',\n },\n [ContentId.HeatMapInstruction2]: {\n id: ContentId.HeatMapInstruction2,\n defaultValue:\n \"When pricing your tickets, you'll be shown the prices of tickets as valuable as yours or better.\",\n },\n [ContentId.Height]: {\n id: ContentId.Height,\n defaultValue: 'Height',\n },\n [ContentId.HeldUntil]: {\n id: ContentId.HeldUntil,\n defaultValue: 'Held Until',\n },\n [ContentId.HeldUntilDate]: {\n id: ContentId.HeldUntilDate,\n defaultValue: 'Held Until Date',\n },\n [ContentId.HiddenDueToFilter]: {\n id: ContentId.HiddenDueToFilter,\n defaultValue: 'Hidden by current filter.',\n },\n [ContentId.HideSeats]: {\n id: ContentId.HideSeats,\n defaultValue: 'Hide Seats',\n },\n [ContentId.High]: {\n id: ContentId.High,\n defaultValue: 'High',\n },\n [ContentId.Highest]: {\n id: ContentId.Highest,\n defaultValue: 'Highest',\n },\n [ContentId.HistoricalPricing]: {\n id: ContentId.HistoricalPricing,\n defaultValue: 'Historical Pricing',\n },\n [ContentId.Hold]: {\n id: ContentId.Hold,\n defaultValue: 'Hold',\n },\n [ContentId.HoldExpiration]: {\n id: ContentId.HoldExpiration,\n defaultValue: 'Hold Expiration',\n },\n [ContentId.HoldId]: {\n id: ContentId.HoldId,\n defaultValue: 'Hold Id',\n },\n [ContentId.HoldNote]: {\n id: ContentId.HoldNote,\n defaultValue: 'Hold Note',\n },\n [ContentId.Home]: {\n id: ContentId.Home,\n defaultValue: MainRoute.Home,\n },\n [ContentId.HoverZoomETicketIns]: {\n id: ContentId.HoverZoomETicketIns,\n defaultValue:\n 'Hover over the images to zoom in. For each seat, drag and drop the appropriate E-Ticket image or select the image from the dropdown.',\n },\n [ContentId.HoverZoomQRCodeIns]: {\n id: ContentId.HoverZoomQRCodeIns,\n defaultValue:\n 'Hover over the images to zoom in. For each seat, drag and drop the appropriate QR code or select one from the dropdown.',\n },\n [ContentId.HowDidYouPay]: {\n id: ContentId.HowDidYouPay,\n defaultValue: 'How did you pay?',\n },\n [ContentId.HowItWorks]: {\n id: ContentId.HowItWorks,\n defaultValue: 'How it works?',\n },\n [ContentId.Hyperlink]: {\n id: ContentId.Hyperlink,\n defaultValue: 'Hyperlink',\n },\n [ContentId.Icon]: {\n id: ContentId.Icon,\n defaultValue: 'Icon',\n },\n [ContentId.Id]: {\n id: ContentId.Id,\n defaultValue: 'ID',\n },\n [ContentId.IgnoreSoldTickets]: {\n id: ContentId.IgnoreSoldTickets,\n defaultValue: 'Ignore sold tickets',\n },\n [ContentId.Impersonate]: {\n id: ContentId.Impersonate,\n defaultValue: 'Impersonate',\n },\n [ContentId.Importance]: {\n id: ContentId.Importance,\n defaultValue: 'Importance',\n },\n [ContentId.ImPricing]: {\n id: ContentId.ImPricing,\n defaultValue: \"I'm Pricing\",\n },\n [ContentId.In]: {\n id: ContentId.In,\n defaultValue: 'in',\n },\n [ContentId.InactiveListings]: {\n id: ContentId.InactiveListings,\n defaultValue: 'Inactive Listings',\n },\n [ContentId.InApp]: {\n id: ContentId.InApp,\n defaultValue: 'In-App',\n },\n [ContentId.Inbox]: {\n id: ContentId.Inbox,\n defaultValue: 'Inbox',\n },\n [ContentId.IncludeInColumns]: {\n id: ContentId.IncludeInColumns,\n defaultValue: 'Include in Columns',\n },\n [ContentId.IncludeInReport]: {\n id: ContentId.IncludeInReport,\n defaultValue: 'Include in Report',\n },\n [ContentId.InclusiveOption]: {\n id: ContentId.InclusiveOption,\n defaultValue: 'Inclusive (4sd)',\n },\n [ContentId.InComparableZones]: {\n id: ContentId.InComparableZones,\n defaultValue: 'in Comparable Zones',\n },\n [ContentId.IncompatibleForMergingWithSelectedListings]: {\n id: ContentId.IncompatibleForMergingWithSelectedListings,\n defaultValue:\n 'The following listings are not eligible for merging with the selected listings.',\n },\n [ContentId.Increase]: {\n id: ContentId.Increase,\n defaultValue: 'Increase',\n },\n [ContentId.IncreaseDecreasePriceByPercentAllVisible]: {\n id: ContentId.IncreaseDecreasePriceByPercentAllVisible,\n defaultValue: 'Increase/Decrease Price of All Visible Listings By X%',\n },\n [ContentId.IncreasePrice]: {\n id: ContentId.IncreasePrice,\n defaultValue: 'Increase Price',\n },\n [ContentId.IncreasePriceByPercent]: {\n id: ContentId.IncreasePriceByPercent,\n defaultValue: 'Increase Price By X%',\n },\n [ContentId.IncreasePriceByPercentAll]: {\n id: ContentId.IncreasePriceByPercentAll,\n defaultValue: 'Increase All Price By X%',\n },\n [ContentId.IncreasePriceByPercentAllVisible]: {\n id: ContentId.IncreasePriceByPercentAllVisible,\n defaultValue: 'Increase Price of All Visible Listings By X%',\n },\n [ContentId.IncreasePriceByPercentSelected]: {\n id: ContentId.IncreasePriceByPercentSelected,\n defaultValue: 'Increase Selected Price By X%',\n },\n [ContentId.IncreasePriceForAll]: {\n id: ContentId.IncreasePriceForAll,\n defaultValue: 'Increase Price for All',\n },\n [ContentId.IncreasePriceForSelected]: {\n id: ContentId.IncreasePriceForSelected,\n defaultValue: 'Increase Price for Selected',\n },\n [ContentId.Ineligible]: {\n id: ContentId.Ineligible,\n defaultValue: 'Ineligible',\n },\n [ContentId.Info]: {\n id: ContentId.Info,\n defaultValue: 'Info',\n },\n [ContentId.InHand]: { id: ContentId.InHand, defaultValue: 'In Hand' },\n [ContentId.InHandDate]: {\n id: ContentId.InHandDate,\n defaultValue: 'In Hand Date',\n },\n [ContentId.InHandDateMustBeBeforeEventDate]: {\n id: ContentId.InHandDateMustBeBeforeEventDate,\n defaultValue: \"In-hand date needs to be before the event's start date.\",\n },\n [ContentId.InHandDaysBeforeEvent]: {\n id: ContentId.InHandDaysBeforeEvent,\n defaultValue: 'In-Hand Days Before Event',\n },\n [ContentId.Inherit]: {\n id: ContentId.Inherit,\n defaultValue: 'Inherit',\n },\n [ContentId.InSection]: {\n id: ContentId.InSection,\n defaultValue: 'in Section',\n },\n [ContentId.InMyGroup]: {\n id: ContentId.InMyGroup,\n defaultValue: 'in My Group',\n },\n [ContentId.Insert]: {\n id: ContentId.Insert,\n defaultValue: 'Insert',\n },\n [ContentId.InsufficientComparables]: {\n id: ContentId.InsufficientComparables,\n defaultValue: 'Insufficient Comparables',\n },\n [ContentId.InOneDay]: { id: ContentId.InHand, defaultValue: 'In 1 day' },\n [ContentId.Integer]: {\n id: ContentId.Integer,\n defaultValue: 'Integer',\n },\n [ContentId.InTransit]: {\n id: ContentId.InTransit,\n defaultValue: 'In Transit',\n },\n [ContentId.InUse]: {\n id: ContentId.InUse,\n defaultValue: 'In Use',\n },\n [ContentId.InvalidFormula]: {\n id: ContentId.InvalidFormula,\n defaultValue: 'Invalid Formula',\n },\n [ContentId.InvalidUrl]: {\n id: ContentId.InvalidUrl,\n defaultValue: 'Invalid URL',\n },\n [ContentId.InvalidEndDate]: {\n id: ContentId.InvalidEndDate,\n defaultValue: 'Invalid end date',\n },\n [ContentId.InvalidStartDate]: {\n id: ContentId.InvalidStartDate,\n defaultValue: 'Invalid start date',\n },\n [ContentId.Inventory]: {\n id: ContentId.Inventory,\n defaultValue: MainRoute.Inventory,\n },\n [ContentId.Inventory_AddSeatSaver_Details]: {\n id: ContentId.Inventory_AddSeatSaver_Details,\n defaultValue: 'Add placeholder inventory',\n },\n [ContentId.Inventory_AddTagType_Details]: {\n id: ContentId.Inventory_AddTagType_Details,\n defaultValue: 'Permits adding new tag types to inventory',\n },\n [ContentId.Inventory_BroadcastUnbroadcast_Details]: {\n id: ContentId.Inventory_BroadcastUnbroadcast_Details,\n defaultValue: 'Broadcast / Unbroadcast inventory',\n },\n [ContentId.Inventory_BroadcastUnbroadcastOnIsPricerOf_Details]: {\n id: ContentId.Inventory_BroadcastUnbroadcastOnIsPricerOf_Details,\n defaultValue:\n 'Broadcast / Unbroadcast inventory where the user is the pricer',\n },\n [ContentId.Inventory_BroadcastUnbroadcastOnPurchasedBy_Details]: {\n id: ContentId.Inventory_BroadcastUnbroadcastOnPurchasedBy_Details,\n defaultValue: 'Broadcast / Unbroadcast inventory that the user purchased',\n },\n [ContentId.Inventory_EditPricing_Details]: {\n id: ContentId.Inventory_EditPricing_Details,\n defaultValue:\n 'Edit AllInPrice, ListPrice, CurrencyCode, or (TicketId, Barcode)',\n },\n [ContentId.Inventory_ManageSeatSaverCreatedBy_Details]: {\n id: ContentId.Inventory_ManageSeatSaverCreatedBy_Details,\n defaultValue: 'Update/delete placeholder inventory that the user created',\n },\n [ContentId.Inventory_ManageSeatSaver_Details]: {\n id: ContentId.Inventory_ManageSeatSaver_Details,\n defaultValue: 'Update/remove placeholder inventory',\n },\n [ContentId.Inventory_Predelivery_Details]: {\n id: ContentId.Inventory_Predelivery_Details,\n defaultValue: 'Predeliver inventory fulfillment artifacts',\n },\n [ContentId.Inventory_PredeliveryOnIsPricerOf_Details]: {\n id: ContentId.Inventory_PredeliveryOnIsPricerOf_Details,\n defaultValue: 'Predeliver inventory where the user is the pricer',\n },\n [ContentId.Inventory_PredeliveryOnPurchasedBy_Details]: {\n id: ContentId.Inventory_PredeliveryOnPurchasedBy_Details,\n defaultValue: 'Predeliver inventory that the user purchased',\n },\n [ContentId.Inventory_SetPrice_Details]: {\n id: ContentId.Inventory_SetPrice_Details,\n defaultValue: 'Edit prices of all accessible inventory',\n },\n [ContentId.Inventory_SetPriceOnIsPricerOf_Details]: {\n id: ContentId.Inventory_SetPriceOnIsPricerOf_Details,\n defaultValue:\n 'Edit prices of all accessible inventory that the current user is pricer of ',\n },\n [ContentId.Inventory_SetPriceOnPurchasedBy_Details]: {\n id: ContentId.Inventory_SetPriceOnPurchasedBy_Details,\n defaultValue:\n 'Edit prices of all accessible inventory and are purchased by current user',\n },\n [ContentId.Inventory_UpdateListingInfo_Details]: {\n id: ContentId.Inventory_UpdateListingInfo_Details,\n defaultValue: 'Edit SplitType, HideSeat, etc',\n },\n [ContentId.Inventory_UpdateListingInfoOnIsPricerOf_Details]: {\n id: ContentId.Inventory_UpdateListingInfoOnIsPricerOf_Details,\n defaultValue:\n 'Allows updating inventory information where the user is the pricer',\n },\n [ContentId.Inventory_UpdateListingInfoOnPurchasedBy_Details]: {\n id: ContentId.Inventory_UpdateListingInfoOnPurchasedBy_Details,\n defaultValue:\n 'Edit SplitType, HideSeat, etc. that are purchased by the current user',\n },\n [ContentId.Inventory_UpdateTags_Details]: {\n id: ContentId.Inventory_UpdateTags_Details,\n defaultValue: 'Permits updating of tags on inventory items',\n },\n [ContentId.Inventory_UpdateTagsOnIsPricerOf_Details]: {\n id: ContentId.Inventory_UpdateTagsOnIsPricerOf_Details,\n defaultValue:\n 'Permits updating tags of inventory where the user is the pricer',\n },\n [ContentId.Inventory_UpdateTagsOnPurchasedBy_Details]: {\n id: ContentId.Inventory_UpdateTagsOnPurchasedBy_Details,\n defaultValue:\n 'Permits updating tags related to purchaser information on inventory items',\n },\n [ContentId.Inventory_ViewAll_Details]: {\n id: ContentId.Inventory_ViewAll_Details,\n defaultValue: 'See all inventory including historical ones',\n },\n [ContentId.Inventory_ViewAllMarketplaceAttributes_Details]: {\n id: ContentId.Inventory_ViewAllMarketplaceAttributes_Details,\n defaultValue:\n \"See inventory's marketplace attributes (broadcasting, price, etc.)\",\n },\n [ContentId.Inventory_ViewExternalMarketplaceAttributes_Details]: {\n id: ContentId.Inventory_ViewExternalMarketplaceAttributes_Details,\n defaultValue:\n \"See inventory's external marketplace attributes (broadcasting, price, etc.)\",\n },\n [ContentId.Inventory_ViewFulfillmentArtifacts_Details]: {\n id: ContentId.Inventory_ViewFulfillmentArtifacts_Details,\n defaultValue: \"See inventory's predelivered fulfillment artifacts\",\n },\n [ContentId.Inventory_ViewFulfillmentArtifactsOnIsPricerOf_Details]: {\n id: ContentId.Inventory_ViewFulfillmentArtifactsOnIsPricerOf_Details,\n defaultValue:\n 'View fulfillment artifacts on inventory where the user is the pricer',\n },\n [ContentId.Inventory_ViewFulfillmentArtifactsOnPurchasedBy_Details]: {\n id: ContentId.Inventory_ViewFulfillmentArtifactsOnPurchasedBy_Details,\n defaultValue:\n 'View fulfillment artifacts on inventory that the user purchased',\n },\n [ContentId.Inventory_ViewListingOnIsPricerOf_Details]: {\n id: ContentId.Inventory_ViewListingOnIsPricerOf_Details,\n defaultValue: 'Permits viewing inventory where the user is the pricer',\n },\n [ContentId.Inventory_ViewListingsOnPurchasedBy_Details]: {\n id: ContentId.Inventory_ViewListingsOnPurchasedBy_Details,\n defaultValue: 'View inventory that the user purchased',\n },\n [ContentId.Inventory_ViewRecent_Details]: {\n id: ContentId.Inventory_ViewRecent_Details,\n defaultValue:\n 'See all inventory for future events or events less than 3 months old',\n },\n [ContentId.Inventory_ViewRecentFromExternalMarketplace_Details]: {\n id: ContentId.Inventory_ViewRecentFromExternalMarketplace_Details,\n defaultValue:\n 'See only inventory for future events or events less than 3 months old that are not StubHub sales',\n },\n [ContentId.Invited]: {\n id: ContentId.Invited,\n defaultValue: 'Invited',\n },\n [ContentId.InZone]: {\n id: ContentId.InZone,\n defaultValue: 'in Zone',\n },\n [ContentId.IPaidFace]: {\n id: ContentId.IPaidFace,\n defaultValue: 'I Paid Face',\n },\n [ContentId.IsGlobal]: {\n id: ContentId.IsGlobal,\n defaultValue: 'Is Global',\n },\n [ContentId.ItemName]: {\n id: ContentId.ItemName,\n defaultValue: 'Item name',\n },\n [ContentId.ItemsPerPage]: {\n id: ContentId.ItemsPerPage,\n defaultValue: 'Items per page',\n },\n [ContentId.IWorkForViagogo]: {\n id: ContentId.IWorkForViagogo,\n defaultValue: 'I work for Viagogo',\n },\n [ContentId.IWorkForEventOrganizer]: {\n id: ContentId.IWorkForEventOrganizer,\n defaultValue: 'I work for the Event Organizer',\n },\n [ContentId.IsThisASpeculativeListing]: {\n id: ContentId.IsThisASpeculativeListing,\n defaultValue: 'Is this a speculative listing?',\n },\n [ContentId.Json]: {\n id: ContentId.Json,\n defaultValue: 'Json',\n },\n [ContentId.Junk]: {\n id: ContentId.Junk,\n defaultValue: 'Junk',\n },\n [ContentId.JustNow]: {\n id: ContentId.JustNow,\n defaultValue: 'just now',\n },\n [ContentId.Key]: {\n id: ContentId.Key,\n defaultValue: 'Key',\n },\n [ContentId.Language]: {\n id: ContentId.Language,\n defaultValue: 'Language',\n },\n [ContentId.LastPriceUpdatedDate]: {\n id: ContentId.LastPriceUpdatedDate,\n defaultValue: 'Last Price Updated',\n },\n [ContentId.LastSaleDates]: {\n id: ContentId.LastSaleDates,\n defaultValue: 'Last Sale Dates',\n },\n [ContentId.LastUpdatedOn]: {\n id: ContentId.LastUpdatedOn,\n defaultValue: 'Last updated on',\n },\n [ContentId.LastWeek]: {\n id: ContentId.LastWeek,\n defaultValue: 'Last Week',\n },\n [ContentId.Last1Hour]: {\n id: ContentId.Last1Hour,\n defaultValue: 'Last 1 hour',\n },\n [ContentId.Last30Days]: {\n id: ContentId.Last30Days,\n defaultValue: 'Last 30 Days',\n },\n [ContentId.LastYear]: {\n id: ContentId.LastYear,\n defaultValue: 'Last Year',\n },\n [ContentId.LeastRecent]: {\n id: ContentId.LeastRecent,\n defaultValue: 'Least Recent',\n },\n [ContentId.LeftToSell]: {\n id: ContentId.LeftToSell,\n defaultValue: 'Left to Sell',\n },\n [ContentId.LessSales]: {\n id: ContentId.LessSales,\n defaultValue: 'Less Sales',\n },\n [ContentId.LiftPercentage]: {\n id: ContentId.LiftPercentage,\n defaultValue: '% Lift',\n },\n [ContentId.Light]: {\n id: ContentId.Light,\n defaultValue: 'Light',\n },\n [ContentId.Link]: {\n id: ContentId.Link,\n defaultValue: 'Link',\n },\n [ContentId.LinkCopied]: {\n id: ContentId.LinkCopied,\n defaultValue: 'Link Copied',\n },\n [ContentId.LinkHasBeenCopiedToClipboard]: {\n id: ContentId.LinkHasBeenCopiedToClipboard,\n defaultValue: 'Link has been copied to the clipboard.',\n },\n [ContentId.List]: {\n id: ContentId.List,\n defaultValue: 'List',\n },\n /**\n * @deprecated Unused\n */\n [ContentId.ListAndAllInPriceError]: {\n id: ContentId.ListAndAllInPriceError,\n defaultValue:\n \"Either 'List' or 'All In' price must be greater than zero, but not both.\",\n },\n [ContentId.Listed]: {\n id: ContentId.Listed,\n defaultValue: 'Listed',\n },\n [ContentId.ListedATP]: {\n id: ContentId.ListedATP,\n defaultValue: 'Listed ATP',\n },\n [ContentId.ListedAverageTicketPrice]: {\n id: ContentId.ListedAverageTicketPrice,\n defaultValue: 'Listed Average Ticket Price',\n },\n [ContentId.ListedClickToDelist]: {\n id: ContentId.ListedClickToDelist,\n defaultValue: 'Listed - click to delist',\n },\n [ContentId.ListedQty]: {\n id: ContentId.ListedQty,\n defaultValue: 'Listed Qty',\n },\n [ContentId.ListedQuantity]: {\n id: ContentId.ListedQuantity,\n defaultValue: 'Listed Quantity',\n },\n [ContentId.ListingConfirmation]: {\n id: ContentId.ListingConfirmation,\n defaultValue: 'Listing Confirmation',\n },\n [ContentId.ListedToViagogoSuccessfully]: {\n id: ContentId.ListedToViagogoSuccessfully,\n defaultValue: 'Listed to Viagogo successfully.',\n },\n [ContentId.ListingFailed]: {\n id: ContentId.ListingFailed,\n defaultValue: 'List Failed',\n },\n [ContentId.ListingFailedClickToTryAgain]: {\n id: ContentId.ListingFailedClickToTryAgain,\n defaultValue: 'List Failed - click to try again',\n },\n [ContentId.ListingFullSoldNoActionAvailable]: {\n id: ContentId.ListingFullSoldNoActionAvailable,\n defaultValue: 'Fully Sold - no actions available',\n },\n [ContentId.ListingId]: {\n id: ContentId.ListingId,\n defaultValue: 'Listing Id',\n },\n [ContentId.Listing]: {\n id: ContentId.Listing,\n defaultValue: 'Listing',\n },\n [ContentId.ListingPending]: {\n id: ContentId.ListingPending,\n defaultValue: 'Listing...',\n },\n [ContentId.ListingClickToCancel]: {\n id: ContentId.ListingClickToCancel,\n defaultValue: 'Listing... - click to cancel',\n },\n [ContentId.Listings]: {\n id: ContentId.Listings,\n defaultValue: 'Listings',\n },\n [ContentId.ListingNumberUsedRequired]: {\n id: ContentId.ListingNumberUsedRequired,\n defaultValue:\n 'At least one ticket is needed per listing number. These listing numbers have no tickets assigned:',\n },\n /**\n * @deprecated Use `ContentId.Proceeds`\n */\n [ContentId.ListingSettings]: {\n id: ContentId.ListingSettings,\n defaultValue: 'Listing Settings',\n },\n [ContentId.ListingSettingsAllVisible]: {\n id: ContentId.ListingSettingsAllVisible,\n defaultValue: 'Edit General Settings for All Visible Listings',\n },\n [ContentId.ListPrice]: {\n id: ContentId.ListPrice,\n defaultValue: 'List Price',\n },\n /**\n * @deprecated Unused\n */\n [ContentId.ListPriceAutoCalculationInfo]: {\n id: ContentId.ListPriceAutoCalculationInfo,\n defaultValue:\n 'List price is estimated from your all-in price minus fees (if any).',\n },\n [ContentId.ListPriceLessThanPriceFloorWarning]: {\n id: ContentId.ListPriceLessThanPriceFloorWarning,\n defaultValue:\n \"You've made a price change that below the price floor. Are you sure?\",\n },\n /**\n * @deprecated Use `ContentId.ProceedsPerTicket`\n */\n [ContentId.ListPricePerTicket]: {\n id: ContentId.ListPricePerTicket,\n defaultValue: 'List Price Per Ticket',\n },\n [ContentId.Location]: {\n id: ContentId.Location,\n defaultValue: 'Location',\n },\n [ContentId.Login]: {\n id: ContentId.Login,\n defaultValue: 'Login',\n },\n [ContentId.Logout]: {\n id: ContentId.Logout,\n defaultValue: 'Logout',\n },\n [ContentId.LookupByListingId]: {\n id: ContentId.LookupByListingId,\n defaultValue: 'Lookup By Listing Id',\n },\n [ContentId.LookupByOrderId]: {\n id: ContentId.LookupByOrderId,\n defaultValue: 'Lookup By Order Id',\n },\n [ContentId.LookupBySaleId]: {\n id: ContentId.LookupBySaleId,\n defaultValue: 'Lookup By Sale Id',\n },\n [ContentId.Low]: {\n id: ContentId.Low,\n defaultValue: 'Low',\n },\n [ContentId.Lowest]: {\n id: ContentId.Lowest,\n defaultValue: 'Lowest',\n },\n [ContentId.ManualPriceWarning]: {\n id: ContentId.ManualPriceWarning,\n defaultValue: 'Manual Price Warning',\n },\n [ContentId.ManualPriceDisableAutoPricingWarning]: {\n id: ContentId.ManualPriceDisableAutoPricingWarning,\n defaultValue:\n 'Manually editing price will disable Auto-Pricing. Click Cancel to keep Auto-Pricing on.',\n },\n [ContentId.ManualPriceAdjustFloorWarning]: {\n id: ContentId.ManualPriceAdjustFloorWarning,\n defaultValue:\n 'The price you entered is below your price floor. Click OK to adjust the floor to accomodate your new price, or Cancel to cap your price at the floor.',\n },\n [ContentId.ManualPriceAdjustCeilingWarning]: {\n id: ContentId.ManualPriceAdjustCeilingWarning,\n defaultValue:\n 'The price you entered is above your price ceiling. Click OK to adjust the ceiling to accomodate your new price, or Cancel to cap your price at the ceiling.',\n },\n [ContentId.Mapped]: {\n id: ContentId.Mapped,\n defaultValue: 'Mapped',\n },\n [ContentId.MappedEventId]: {\n id: ContentId.MappedEventId,\n defaultValue: 'Mapped Event ID',\n },\n [ContentId.MappedTo]: {\n id: ContentId.MappedTo,\n defaultValue: 'Mapped To',\n },\n [ContentId.MapUnavailable]: {\n id: ContentId.MapUnavailable,\n defaultValue: 'Venue map not available',\n },\n [ContentId.Margin]: {\n id: ContentId.Margin,\n defaultValue: 'Margin',\n },\n [ContentId.MarkAsPurchase]: {\n id: ContentId.MarkAsPurchase,\n defaultValue: 'Mark as purchase',\n },\n [ContentId.MarkAsPrivate]: {\n id: ContentId.MarkAsPrivate,\n defaultValue: 'Mark as private',\n },\n [ContentId.MarkAsJunk]: {\n id: ContentId.MarkAsJunk,\n defaultValue: 'Mark as junk',\n },\n [ContentId.MarkAsSale]: {\n id: ContentId.MarkAsSale,\n defaultValue: 'Mark as sale',\n },\n [ContentId.MarkAsTransfer]: {\n id: ContentId.MarkAsTransfer,\n defaultValue: 'Mark as transfer',\n },\n [ContentId.MarketListings]: {\n id: ContentId.MarketListings,\n defaultValue: 'Market Listings',\n },\n [ContentId.Marketplace]: {\n id: ContentId.Marketplace,\n defaultValue: 'Marketplace',\n },\n [ContentId.MarketplaceEnableConfirmMessage]: {\n id: ContentId.MarketplaceEnableConfirmMessage,\n defaultValue: 'The following marketplaces will be enabled:',\n },\n [ContentId.MarketplaceDisableConfirmMessage]: {\n id: ContentId.MarketplaceDisableConfirmMessage,\n defaultValue: 'The following marketplaces will be disabled:',\n },\n [ContentId.MarketplacePaymentTerms]: {\n id: ContentId.MarketplacePaymentTerms,\n defaultValue: 'Marketplace Payment Terms',\n },\n [ContentId.MarketplaceSeatingForAll]: {\n id: ContentId.MarketplaceSeatingForAll,\n defaultValue: 'Marketplace Seating for All',\n },\n [ContentId.MarketplaceInhandDate]: {\n id: ContentId.MarketplaceInhandDate,\n defaultValue: 'Marketplace In hand Date',\n },\n [ContentId.MarketplaceSeatingForAllVisible]: {\n id: ContentId.MarketplaceSeatingForAllVisible,\n defaultValue: 'Marketplace Seating for All Visible Listings',\n },\n [ContentId.MarketplaceSeatingForSelected]: {\n id: ContentId.MarketplaceSeatingForSelected,\n defaultValue: 'Marketplace Seating for Selected',\n },\n [ContentId.MarketplaceVisibility]: {\n id: ContentId.MarketplaceVisibility,\n defaultValue: 'Marketplace Visibility',\n },\n [ContentId.MarketPrice]: {\n id: ContentId.MarketPrice,\n defaultValue: 'Market Price',\n },\n [ContentId.Markup]: {\n id: ContentId.Markup,\n defaultValue: 'Markup',\n },\n [ContentId.Max]: {\n id: ContentId.Max,\n defaultValue: 'Max',\n },\n [ContentId.MaxDiscountInputPrompt1]: {\n id: ContentId.MaxDiscountInputPrompt1,\n defaultValue: \"Don't allow price drop of more than \",\n },\n [ContentId.MaxDiscountInputPrompt2]: {\n id: ContentId.MaxDiscountInputPrompt2,\n defaultValue: ' over a ',\n },\n [ContentId.MaxDiscountInputPrompt3]: {\n id: ContentId.MaxDiscountInputPrompt3,\n defaultValue: ' hour period.',\n },\n [ContentId.MaxHoldDuration]: {\n id: ContentId.MaxHoldDuration,\n defaultValue: 'Max Hold Duration',\n },\n [ContentId.MaxHoldDurationUnit]: {\n id: ContentId.MaxHoldDurationUnit,\n defaultValue: 'Hour(s)',\n },\n [ContentId.MaxValueLengthExceeded]: {\n id: ContentId.MaxValueLengthExceeded,\n defaultValue: 'Max value length for this tag exceeded',\n },\n [ContentId.Median]: {\n id: ContentId.Median,\n defaultValue: 'Median',\n },\n [ContentId.MemberCard]: {\n id: ContentId.MemberCard,\n defaultValue: 'Member Card',\n },\n [ContentId.Merchant]: {\n id: ContentId.Merchant,\n defaultValue: 'Merchant',\n },\n [ContentId.Merge]: {\n id: ContentId.Merge,\n defaultValue: 'Merge',\n },\n [ContentId.MergeListings]: {\n id: ContentId.MergeListings,\n defaultValue: 'Merge Listings',\n },\n [ContentId.MergeListings_GroupedListings]: {\n id: ContentId.MergeListings_GroupedListings,\n defaultValue:\n 'This listing already belongs to a listing group and cannot be merged.',\n },\n [ContentId.MergeListings_SectionDifference]: {\n id: ContentId.MergeListings_SectionDifference,\n defaultValue:\n 'The section of this listing is different from your selected listings.',\n },\n [ContentId.MergeListings_RowDifference]: {\n id: ContentId.MergeListings_RowDifference,\n defaultValue:\n 'The row of this listing is different from your selected listings.',\n },\n [ContentId.MergeListings_DeliveryDifference]: {\n id: ContentId.MergeListings_DeliveryDifference,\n defaultValue:\n 'The delivery type of this listing is different from your selected listings.',\n },\n [ContentId.Merges]: {\n id: ContentId.Merges,\n defaultValue: 'merges',\n },\n [ContentId.MergeSelected]: {\n id: ContentId.MergeSelected,\n defaultValue: 'Merge Selected',\n },\n [ContentId.MergeSuggested]: {\n id: ContentId.MergeSuggested,\n defaultValue: 'Merge Suggested',\n },\n [ContentId.Messages]: {\n id: ContentId.Messages,\n defaultValue: 'Messages',\n },\n [ContentId.Metrics]: {\n id: ContentId.Metrics,\n defaultValue: 'Metrics',\n },\n [ContentId.MetricView]: {\n id: ContentId.MetricView,\n defaultValue: 'Metric View',\n },\n [ContentId.MicrosoftExcelExt]: {\n id: ContentId.MicrosoftExcelExt,\n defaultValue: 'Microsoft Excel (.xlsx)',\n },\n [ContentId.Min]: {\n id: ContentId.Min,\n defaultValue: 'Min',\n },\n [ContentId.MinCompListingCount]: {\n id: ContentId.MinCompListingCount,\n defaultValue: 'Minimum Required Listings to Price Against',\n },\n [ContentId.MissingRowDataWarning]: {\n id: ContentId.MissingRowDataWarning,\n defaultValue:\n 'Stadium missing row data. Pricing will be at the section level.',\n },\n [ContentId.MissingSeatScore]: {\n id: ContentId.MissingSeatScore,\n defaultValue: 'Missing Seat Score',\n },\n [ContentId.MissingSectionFilter]: {\n id: ContentId.MissingSectionFilter,\n defaultValue: 'Missing Section Filter',\n },\n [ContentId.MissingUnitCost]: {\n id: ContentId.MissingUnitCost,\n defaultValue: 'Missing Unit Cost',\n },\n [ContentId.MissingZone]: {\n id: ContentId.MissingZone,\n defaultValue: 'Missing Zone',\n },\n [ContentId.MLB]: {\n id: ContentId.MLB,\n defaultValue: 'MLB',\n },\n [ContentId.MoneyOrder]: {\n id: ContentId.MoneyOrder,\n defaultValue: 'UiMoney Order',\n },\n [ContentId.Month]: {\n id: ContentId.Month,\n defaultValue: 'Month',\n },\n [ContentId.MoreSales]: {\n id: ContentId.MoreSales,\n defaultValue: 'More Sales',\n },\n [ContentId.MostRecent]: {\n id: ContentId.MostRecent,\n defaultValue: 'Most Recent',\n },\n [ContentId.MultiplePayments]: {\n id: ContentId.MultiplePayments,\n defaultValue: 'Multiple Payments',\n },\n [ContentId.MultipleSelections]: {\n id: '',\n defaultValue: 'Multiple selections',\n },\n [ContentId.MyTicketsHaveRowsAndSeats]: {\n id: ContentId.MyTicketsHaveRowsAndSeats,\n defaultValue: 'My tickets have rows and seats',\n },\n [ContentId.MyAccount]: {\n id: ContentId.MyAccount,\n defaultValue: 'My Account',\n },\n [ContentId.MyListings]: {\n id: ContentId.MyListings,\n defaultValue: 'My Listings',\n },\n [ContentId.NA]: {\n id: ContentId.NA,\n defaultValue: 'N/A',\n },\n [ContentId.Name]: {\n id: ContentId.Name,\n defaultValue: 'Name',\n },\n [ContentId.NameColumnPlaceholder]: {\n id: ContentId.NameColumnPlaceholder,\n defaultValue: 'Name the column',\n },\n [ContentId.Near]: {\n id: ContentId.Near,\n defaultValue: 'Near',\n },\n [ContentId.NearestEvent]: {\n id: ContentId.NearestEvent,\n defaultValue: 'Nearest Event',\n },\n [ContentId.NeedFulfillment]: {\n id: ContentId.NeedFulfillment,\n defaultValue: 'Needs Fulfillment',\n },\n [ContentId.NeedToMergeToTwoOrMoreListings]: {\n id: ContentId.NeedToMergeToTwoOrMoreListings,\n defaultValue: 'You need at least 2 listings to merge.',\n },\n [ContentId.NeedToSplitToTwoOrMoreListings]: {\n id: ContentId.NeedToSplitToTwoOrMoreListings,\n defaultValue: 'You need to split to 2 or more listings.',\n },\n [ContentId.NeverShareYourPasswordWithAnyone]: {\n id: ContentId.NeverShareYourPasswordWithAnyone,\n defaultValue: 'Never share your password with anyone',\n },\n [ContentId.NewFeature]: {\n id: ContentId.NewFeature,\n defaultValue: 'New Feature',\n },\n [ContentId.NewGroup]: {\n id: ContentId.NewGroup,\n defaultValue: 'New Group',\n },\n [ContentId.NewModel]: {\n id: ContentId.NewModel,\n defaultValue: 'New Model',\n },\n [ContentId.NewOrder]: {\n id: ContentId.NewOrder,\n defaultValue: 'New order',\n },\n [ContentId.NewRole]: {\n id: ContentId.NewRole,\n defaultValue: 'New Role',\n },\n [ContentId.NewRow]: {\n id: ContentId.NewRow,\n defaultValue: 'New row',\n },\n [ContentId.NewSale]: {\n id: ContentId.NewSale,\n defaultValue: 'New Sale',\n },\n [ContentId.NewSales]: {\n id: ContentId.NewSales,\n defaultValue: 'New Sales',\n },\n [ContentId.NewUser]: {\n id: ContentId.NewUser,\n defaultValue: 'New user',\n },\n [ContentId.NewVendor]: {\n id: ContentId.NewVendor,\n defaultValue: 'New vendor',\n },\n [ContentId.Next]: {\n id: ContentId.Next,\n defaultValue: 'Next',\n },\n [ContentId.Next2Weeks]: {\n id: ContentId.Next2Weeks,\n defaultValue: 'Next 2 Weeks',\n },\n [ContentId.NextWeek]: {\n id: ContentId.NextWeek,\n defaultValue: 'Next Week',\n },\n [ContentId.NextMonth]: {\n id: ContentId.NextMonth,\n defaultValue: 'Next Month',\n },\n [ContentId.NextYear]: {\n id: ContentId.NextYear,\n defaultValue: 'Next Year',\n },\n [ContentId.No]: {\n id: ContentId.No,\n defaultValue: 'No',\n },\n [ContentId.NoActiveAccountsForLogin]: {\n id: ContentId.NoActiveAccountsForLogin,\n defaultValue:\n 'You do not have any available seller account to log into. Please contact us to setup one.',\n },\n [ContentId.NoActivityLog]: {\n id: ContentId.NoActivityLog,\n defaultValue: 'There is currently no activity log data to display.',\n },\n [ContentId.NoAutoPricing_MissingPermission]: {\n id: ContentId.NoAutoPricing_MissingPermission,\n defaultValue: 'You do not have permission to set auto pricing.',\n },\n [ContentId.NoAutoPricing_MissingRowId]: {\n id: ContentId.NoAutoPricing_MissingRowId,\n defaultValue:\n \"Enable auto pricing by updating seating information using StubHub's event map.\",\n },\n [ContentId.NoAutoPricing_NoVenueConfig]: {\n id: ContentId.NoAutoPricing_NoVenueConfig,\n defaultValue:\n 'This event does not have mapping information for auto pricing.',\n },\n [ContentId.NoConversation]: {\n id: ContentId.NoConversation,\n defaultValue: 'There is currently no conversation to display.',\n },\n [ContentId.NoEventsMatching]: {\n id: ContentId.NoEventsMatching,\n defaultValue: 'There are no events matching your search',\n },\n [ContentId.NoFilteredNotifications]: {\n id: ContentId.NoFilteredNotifications,\n defaultValue: \"There aren't any results for this filter.\",\n },\n [ContentId.NoGroupingAvailableForDefault]: {\n id: ContentId.NoGroupingAvailableForDefault,\n defaultValue: 'No groups matched this grouping default',\n },\n [ContentId.NoMergesAvailable]: {\n id: ContentId.NoMergesAvailable,\n defaultValue: 'No merges available',\n },\n [ContentId.None]: { id: ContentId.None, defaultValue: 'None' },\n [ContentId.NoneSelected]: {\n id: ContentId.NoneSelected,\n defaultValue: 'None Selected',\n },\n [ContentId.NoNotifications]: {\n id: ContentId.NoNotifications,\n defaultValue: \"You're all caught up on alerts.\",\n },\n [ContentId.NoPerformersMatching]: {\n id: ContentId.NoPerformersMatching,\n defaultValue: 'There are no performers matching your search',\n },\n [ContentId.NoReportText]: {\n id: ContentId.NoReportText,\n defaultValue:\n 'The report could not be loaded. Please check your filters and try again. If the issue persists, contact support for assistance.',\n },\n [ContentId.NoResultFound]: {\n id: ContentId.NoResultFound,\n defaultValue: 'No results found',\n },\n [ContentId.NormalOption]: {\n id: ContentId.NormalOption,\n defaultValue: 'Normal (3sd)',\n },\n [ContentId.NoSeatingsAvailableForAllocation]: {\n id: ContentId.NoSeatingsAvailableForAllocation,\n defaultValue:\n 'There are no tickets available for this event to allocate. Click below to add new tickets.',\n },\n [ContentId.NoTagsExist]: {\n id: ContentId.NoTagsExist,\n defaultValue: 'No tags exist',\n },\n [ContentId.NotBroadcastOnAnyMarketplace]: {\n id: ContentId.NotBroadcastOnAnyMarketplace,\n defaultValue:\n \"Not being broadcasted anywhere. Click 'Broadcast' to start broadcasting to all available marketplaces.\",\n },\n [ContentId.Notes]: {\n id: ContentId.Notes,\n defaultValue: 'Notes',\n },\n [ContentId.NoTaxes]: { id: ContentId.NoTaxes, defaultValue: 'No Taxes' },\n [ContentId.Notifications]: {\n id: ContentId.Notifications,\n defaultValue: 'Notifications',\n },\n [ContentId.NotificationTypeAutopriceBelowFloor]: {\n id: ContentId.NotificationTypeAutopriceBelowFloor,\n defaultValue: 'Autoprice below floor',\n },\n [ContentId.NotificationTypeAutopriceInsufficientCompListings]: {\n id: ContentId.NotificationTypeAutopriceInsufficientCompListings,\n defaultValue: 'Autoprice insufficient comp listings',\n },\n [ContentId.NotificationTypeAutopriceFirebrake]: {\n id: ContentId.NotificationTypeAutopriceFirebrake,\n defaultValue: 'Autoprice Firebrake',\n },\n [ContentId.NotificationTypeSaleFulfilmentFailed]: {\n id: ContentId.NotificationTypeSaleFulfilmentFailed,\n defaultValue: 'Sale Fulfilment Failed',\n },\n [ContentId.NotificationTypeSaleMarketplaceCancelled]: {\n id: ContentId.NotificationTypeSaleMarketplaceCancelled,\n defaultValue: 'Marketplace Cancelled Sale',\n },\n [ContentId.NotificationTypeListingHideSeatsFailed]: {\n id: ContentId.NotificationTypeListingHideSeatsFailed,\n defaultValue: \"Could not update 'Hide Seats'\",\n },\n [ContentId.NotificationTypeListingUpdateDeliveryTypeFailed]: {\n id: ContentId.NotificationTypeListingUpdateDeliveryTypeFailed,\n defaultValue: \"Listing update 'Delivery Type' failed\",\n },\n [ContentId.NotificationTypeListingMergeFailed]: {\n id: ContentId.NotificationTypeListingMergeFailed,\n defaultValue: 'Failed to merge listings',\n },\n [ContentId.NotificationTypeListingSplitFailed]: {\n id: ContentId.NotificationTypeListingSplitFailed,\n defaultValue: 'Failed to split listing',\n },\n [ContentId.NotificationTypeSaleNew]: {\n id: ContentId.NotificationTypeSaleNew,\n defaultValue: 'New Sale',\n },\n [ContentId.NotImplemented]: {\n id: ContentId.NotImplemented,\n defaultValue: 'Not implemented',\n },\n [ContentId.NoToAll]: {\n id: ContentId.NoToAll,\n defaultValue: 'No to All',\n },\n [ContentId.NoVenueMetadataForAutopricing]: {\n id: ContentId.NoVenueMetadataForAutopricing,\n defaultValue:\n 'Seat map requires at least one metadata (angle, distance, height) to auto-configure section scores. You can still manually score sections by clicking on them.',\n },\n [ContentId.NoVenuesMatching]: {\n id: ContentId.NoVenuesMatching,\n defaultValue: 'There are no venues matching your search',\n },\n [ContentId.Now]: { id: ContentId.Now, defaultValue: 'Now' },\n [ContentId.NumberFormat]: {\n id: ContentId.NumberFormat,\n defaultValue: 'Number format',\n },\n [ContentId.NumberOfItemsPerPage]: {\n id: ContentId.NumberOfItemsPerPage,\n defaultValue: 'Number of items per page (Leave empty to disable paging)',\n },\n [ContentId.NumberOfTicketsHeld]: {\n id: ContentId.NumberOfTicketsHeld,\n defaultValue: 'Number of Tickets Held',\n },\n [ContentId.NumOfListingsToCreate]: {\n id: ContentId.NumOfListingsToCreate,\n defaultValue: 'Number of listings to create',\n },\n [ContentId.Odds]: {\n id: ContentId.Odds,\n defaultValue: 'Odds',\n },\n [ContentId.Off]: {\n id: ContentId.Off,\n defaultValue: 'Off',\n },\n [ContentId.OfSimilarQuality]: {\n id: ContentId.OfSimilarQuality,\n defaultValue: 'of Similar Quality',\n },\n [ContentId.OfSimilarQualityInZone]: {\n id: ContentId.OfSimilarQualityInZone,\n defaultValue: 'of Similar Quality and in Zone',\n },\n [ContentId.OfSimilarQualityQuantityAdjusted]: {\n id: ContentId.OfSimilarQualityQuantityAdjusted,\n defaultValue: 'of Similar Quality (Quantity Adjusted)',\n },\n [ContentId.OfTheComparableListings]: {\n id: ContentId.OfTheComparableListings,\n defaultValue: 'of the comparable listings',\n },\n [ContentId.OK]: { id: ContentId.OK, defaultValue: 'OK' },\n [ContentId.OlderThanLastYear]: {\n id: ContentId.OlderThanLastYear,\n defaultValue: 'Older',\n },\n [ContentId.On]: {\n id: ContentId.On,\n defaultValue: 'On',\n },\n [ContentId.OnePayment]: {\n id: ContentId.OnePayment,\n defaultValue: 'One Payment',\n },\n [ContentId.OneTimePass]: {\n id: ContentId.OneTimePass,\n defaultValue: 'One Time Pass',\n },\n [ContentId.OnlySingleValueIsAllowed]: {\n id: ContentId.OnlySingleValueIsAllowed,\n defaultValue: 'Only single value is allowed.',\n },\n [ContentId.Oops]: { id: ContentId.Oops, defaultValue: 'Oops!' },\n [ContentId.OpenEventPage]: {\n id: ContentId.OpenEventPage,\n defaultValue: 'Open Event Page',\n },\n [ContentId.OpenReport]: {\n id: ContentId.OpenReport,\n defaultValue: 'Open report',\n },\n [ContentId.Opponent]: {\n id: ContentId.Opponent,\n defaultValue: 'Opponent',\n },\n [ContentId.Or]: { id: ContentId.Or, defaultValue: 'or' },\n [ContentId.OrAbove]: {\n id: ContentId.OrAbove,\n defaultValue: 'or above',\n },\n [ContentId.OrderDate]: {\n id: ContentId.OrderDate,\n defaultValue: 'Order date',\n },\n [ContentId.OrderId]: {\n id: ContentId.OrderId,\n defaultValue: 'Order Id',\n },\n [ContentId.OrderIdDoesNotExist]: {\n id: ContentId.OrderIdDoesNotExist,\n defaultValue: 'Warning: this order ID does not exist.',\n },\n [ContentId.OrderIdDoesNotExistForVendor]: {\n id: ContentId.OrderIdDoesNotExistForVendor,\n defaultValue: 'Order ID does not exist for this vendor.',\n },\n [ContentId.OrderIdInUse]: {\n id: ContentId.OrderIdInUse,\n defaultValue:\n 'Warning: this order ID is already used by another purchase order.',\n },\n [ContentId.OrderIdInUseSameVendor]: {\n id: ContentId.OrderIdInUseSameVendor,\n defaultValue:\n 'Order ID is used by another purchase order under same vendor.',\n },\n [ContentId.Orders]: {\n id: ContentId.Orders,\n defaultValue: 'Orders',\n },\n [ContentId.Original]: { id: ContentId.Original, defaultValue: 'Original' },\n [ContentId.Other]: { id: ContentId.Other, defaultValue: 'Other' },\n [ContentId.OtherMarketplaceContact]: {\n id: ContentId.OtherMarketplaceContact,\n defaultValue: 'Other Marketplace Contact',\n },\n [ContentId.Outlier]: {\n id: ContentId.Outlier,\n defaultValue: 'Outlier',\n },\n [ContentId.OutlierFiltering]: {\n id: ContentId.OutlierFiltering,\n defaultValue: 'Outlier Filtering',\n },\n [ContentId.OutlierMode]: {\n id: ContentId.OutlierMode,\n defaultValue: 'Outlier Detection Mode',\n },\n [ContentId.OutstandingBalance]: {\n id: ContentId.OutstandingBalance,\n defaultValue: 'Outstanding Balance',\n },\n [ContentId.Overview]: {\n id: ContentId.Overview,\n defaultValue: 'Overview',\n },\n [ContentId.Owner]: {\n id: ContentId.Owner,\n defaultValue: 'Owner',\n },\n [ContentId.Pagination]: {\n id: ContentId.Pagination,\n defaultValue: 'Pagination',\n },\n [ContentId.Paid]: {\n id: ContentId.Paid,\n defaultValue: PointOfSalePaymentState.Paid,\n },\n [ContentId.PaidOffline]: {\n id: ContentId.PaidOffline,\n defaultValue: 'Paid Offline',\n },\n [ContentId.Pairs]: {\n id: ContentId.Pairs,\n defaultValue: 'Pairs',\n },\n [ContentId.Paper]: { id: ContentId.Paper, defaultValue: 'Paper' },\n [ContentId.ParentListing]: {\n id: ContentId.ParentListing,\n defaultValue: 'Parent Listing',\n },\n [ContentId.PartiallyPaid]: {\n id: ContentId.PartiallyPaid,\n defaultValue: 'Partially Paid',\n },\n [ContentId.Password]: {\n id: ContentId.Password,\n defaultValue: 'Password',\n },\n [ContentId.PastWeek]: {\n id: ContentId.PastWeek,\n defaultValue: 'Past Week',\n },\n [ContentId.PastMonth]: {\n id: ContentId.PastMonth,\n defaultValue: 'Past Month',\n },\n [ContentId.PastYear]: {\n id: ContentId.PastYear,\n defaultValue: 'Past Year',\n },\n [ContentId.Payment]: { id: ContentId.Payment, defaultValue: 'Payment' },\n [ContentId.PaymentMethod]: {\n id: ContentId.PaymentMethod,\n defaultValue: 'Payment Method',\n },\n [ContentId.PaymentPending]: {\n id: ContentId.PaymentPending,\n defaultValue: 'Payment Pending',\n },\n [ContentId.PaymentPostEvent]: {\n id: ContentId.PaymentPostEvent,\n defaultValue: 'Payment Post Event',\n },\n [ContentId.Payments]: { id: ContentId.Payments, defaultValue: 'Payments' },\n [ContentId.PaymentDate]: {\n id: ContentId.PaymentDate,\n defaultValue: 'Payment Date',\n },\n [ContentId.PaymentAccount]: {\n id: ContentId.PaymentAccount,\n defaultValue: 'Payment Account',\n },\n [ContentId.PaymentMethods]: {\n id: ContentId.PaymentMethods,\n defaultValue: 'Payment Methods',\n },\n [ContentId.PaymentMethodUsed]: {\n id: ContentId.PaymentMethodUsed,\n defaultValue: 'Payment Method Used',\n },\n [ContentId.PaymentState]: {\n id: ContentId.PaymentState,\n defaultValue: 'Payment State',\n },\n [ContentId.PastEvents]: {\n id: ContentId.PastEvents,\n defaultValue: EventTimeFrameFilter.Past,\n },\n [ContentId.PaymentType]: {\n id: ContentId.PaymentType,\n defaultValue: 'Payment Type',\n },\n [ContentId.PaymentUponSaleConfirmation]: {\n id: ContentId.PaymentUponSaleConfirmation,\n defaultValue: 'Payment Upon Sale Confirmation',\n },\n [ContentId.PaymentUponDelivery]: {\n id: ContentId.PaymentUponDelivery,\n defaultValue: 'Payment Upon Delivery',\n },\n [ContentId.PdfExt]: {\n id: ContentId.PdfExt,\n defaultValue: 'PDF (.pdf)',\n },\n [ContentId.Pending]: {\n id: ContentId.Pending,\n defaultValue: 'Pending',\n },\n [ContentId.PendingConfirmation]: {\n id: ContentId.PendingConfirmation,\n defaultValue: PointOfSaleSaleStatus.PendingConfirmation,\n },\n [ContentId.PendingFulfillment]: {\n id: ContentId.PendingFulfillment,\n defaultValue: PointOfSaleSaleStatus.PendingFulfillment,\n },\n [ContentId.PendingPickup]: {\n id: ContentId.PendingPickup,\n defaultValue: 'Pending Pickup',\n },\n [ContentId.PendingQC]: {\n id: ContentId.PendingQC,\n defaultValue: 'Pending Quality Control',\n },\n [ContentId.PendingRefulfillment]: {\n id: ContentId.PendingRefulfillment,\n defaultValue: 'Pending Re-fulfillment',\n },\n [ContentId.PendingRejection]: {\n id: ContentId.PendingRejection,\n defaultValue: PointOfSaleSaleStatus.PendingRejection,\n },\n [ContentId.PendingReversal]: {\n id: ContentId.PendingReversal,\n defaultValue: 'Pending Reversal',\n },\n [ContentId.PendingReview]: {\n id: ContentId.PendingReview,\n defaultValue: 'Pending Review',\n },\n [ContentId.PendingSourcing]: {\n id: ContentId.PendingSourcing,\n defaultValue: 'Pending Sourcing',\n },\n [ContentId.PeopleWithAccess]: {\n id: ContentId.PeopleWithAccess,\n defaultValue: 'People with access',\n },\n [ContentId.Percentage]: {\n id: ContentId.Percentage,\n defaultValue: 'Percentage',\n },\n [ContentId.Performer]: {\n id: ContentId.Performer,\n defaultValue: 'Performer',\n },\n [ContentId.PerformerAndVenue]: {\n id: ContentId.PerformerAndVenue,\n defaultValue: 'Performer/Venue',\n },\n [ContentId.PerformerAtVenue]: {\n id: ContentId.PerformerAtVenue,\n defaultValue: 'Performer at Venue',\n },\n [ContentId.Performers]: {\n id: ContentId.Performers,\n defaultValue: EventGroupingType.Performer,\n },\n [ContentId.Permission]: {\n id: ContentId.Permission,\n defaultValue: 'Permission',\n },\n [ContentId.Permission_AddSeatSaver]: {\n id: ContentId.Permission_AddSeatSaver,\n defaultValue: 'Add Placeholder Inventory',\n },\n [ContentId.Permission_AddTagType]: {\n id: ContentId.Permission_AddTagType,\n defaultValue: 'Add Tag Type',\n },\n [ContentId.Permission_ConfirmTransferWithoutProof]: {\n id: ContentId.Permission_ConfirmTransferWithoutProof,\n defaultValue: 'Confirm Transfer without Proof',\n },\n [ContentId.Permission_ConfigurePricing]: {\n id: ContentId.Permission_ConfigurePricing,\n defaultValue: 'Configure Price Settings',\n },\n [ContentId.Permission_CreateOfflineSale]: {\n id: ContentId.Permission_CreateOfflineSale,\n defaultValue: 'Add Offline Sales',\n },\n [ContentId.Permission_ManageOfflineSale]: {\n id: ContentId.Permission_ManageOfflineSale,\n defaultValue: 'Manage Offline Sales',\n },\n [ContentId.Permission_ResetFulfillment]: {\n id: ContentId.Permission_ResetFulfillment,\n defaultValue: 'Reset Fulfillment',\n },\n [ContentId.Permission_UpdateTags]: {\n id: ContentId.Permission_UpdateTags,\n defaultValue: 'Update Tags',\n },\n [ContentId.Permission_CreateReports]: {\n id: ContentId.Permission_CreateReports,\n defaultValue: 'Create Reports',\n },\n [ContentId.Permission_UpdateReports]: {\n id: ContentId.Permission_UpdateReports,\n defaultValue: 'Update Reports',\n },\n [ContentId.Permission_UpdateReportsOwned]: {\n id: ContentId.Permission_UpdateReportsOwned,\n defaultValue: 'Update Own Reports',\n },\n [ContentId.Permission_ViewAll]: {\n id: ContentId.Permission_ViewAll,\n defaultValue: 'View All',\n },\n [ContentId.Permission_ViewExternalMarketplaceAttributes]: {\n id: ContentId.Permission_ViewExternalMarketplaceAttributes,\n defaultValue: 'View External Marketplace Attributes',\n },\n [ContentId.Permission_ViewInventoryReports]: {\n id: ContentId.Permission_ViewInventoryReports,\n defaultValue: 'View Inventory Reports',\n },\n [ContentId.Permission_ViewRecent]: {\n id: ContentId.Permission_ViewRecent,\n defaultValue: 'View Recent',\n },\n [ContentId.Permission_ViewRecentFromExternalMarketplace]: {\n id: ContentId.Permission_ViewRecentFromExternalMarketplace,\n defaultValue: 'View Recent from External Marketplaces',\n },\n [ContentId.Permission_CreateForExternalMarketplaces]: {\n id: ContentId.Permission_CreateForExternalMarketplaces,\n defaultValue: 'Create for External Marketplaces',\n },\n [ContentId.Permission_ManageHolds]: {\n id: ContentId.Permission_ManageHolds,\n defaultValue: 'Manage Holds',\n },\n [ContentId.Permission_ViewProceeds]: {\n id: ContentId.Permission_ViewProceeds,\n defaultValue: 'View Proceeds',\n },\n [ContentId.Permission_ViewRecentProceeds]: {\n id: ContentId.Permission_ViewRecentProceeds,\n defaultValue: 'View Proceeds for Recent Sales',\n },\n [ContentId.Permission_ViewCostAndMargin]: {\n id: ContentId.Permission_ViewCostAndMargin,\n defaultValue: 'View Cost and Margin',\n },\n [ContentId.Permission_ViewPaymentState]: {\n id: ContentId.Permission_ViewPaymentState,\n defaultValue: 'View Payment State',\n },\n [ContentId.Permission_ViewFulfillmentArtifacts]: {\n id: ContentId.Permission_ViewFulfillmentArtifacts,\n defaultValue: 'View Fulfillment Artifacts',\n },\n [ContentId.Permission_ViewAllMarketplaceAttributes]: {\n id: ContentId.Permission_ViewAllMarketplaceAttributes,\n defaultValue: 'View All Marketplace Attributes',\n },\n [ContentId.Permission_SetPrice]: {\n id: ContentId.Permission_SetPrice,\n defaultValue: 'Set Price',\n },\n [ContentId.Permission_BroadcastUnbroadcast]: {\n id: ContentId.Permission_BroadcastUnbroadcast,\n defaultValue: 'Broadcast/Unbroadcast',\n },\n [ContentId.Permission_BroadcastUnbroadcastOnPurchasedBy]: {\n id: ContentId.Permission_BroadcastUnbroadcastOnPurchasedBy,\n defaultValue: 'Broadcast/Unbroadcast purchased listings (Purchaser)',\n },\n [ContentId.Permission_UpdateInfo]: {\n id: ContentId.Permission_UpdateInfo,\n defaultValue: 'Update Info',\n },\n [ContentId.Permission_Administration]: {\n id: ContentId.Permission_Administration,\n defaultValue: 'Administration',\n },\n [ContentId.Permission_Create]: {\n id: ContentId.Permission_Create,\n defaultValue: 'Create',\n },\n [ContentId.Permission_ViewSalesReports]: {\n id: ContentId.Permission_ViewSalesReports,\n defaultValue: 'View Sales Reports',\n },\n [ContentId.Permissions]: {\n id: ContentId.Permissions,\n defaultValue: 'Permissions',\n },\n [ContentId.PermissionsRequiredMessage]: {\n id: ContentId.PermissionsRequiredMessage,\n defaultValue: 'At least one permission is required.',\n },\n [ContentId.PerPayment]: {\n id: ContentId.PerPayment,\n defaultValue: 'Per payment',\n },\n [ContentId.Phone]: {\n id: ContentId.Phone,\n defaultValue: 'Phone',\n },\n [ContentId.PreDelivered]: {\n id: ContentId.PreDelivered,\n defaultValue: 'Pre-Delivered',\n },\n [ContentId.Premium]: {\n id: ContentId.Premium,\n defaultValue: 'Premium',\n },\n [ContentId.Preview]: {\n id: ContentId.Preview,\n defaultValue: 'Preview',\n },\n [ContentId.Price]: {\n id: ContentId.Price,\n defaultValue: 'Price',\n },\n [ContentId.PriceAboveCeiling]: {\n id: ContentId.PriceAboveCeiling,\n defaultValue: 'Price Above Ceiling',\n },\n [ContentId.PriceBelowFloor]: {\n id: ContentId.PriceBelowFloor,\n defaultValue: 'Price Below Floor',\n },\n [ContentId.PriceBelowMaxAllowedDrop]: {\n id: ContentId.PriceBelowMaxAllowedDrop,\n defaultValue: 'Price Below Max Allowed Drop',\n },\n [ContentId.OneDayBeforeEvent]: {\n id: ContentId.OneDayBeforeEvent,\n defaultValue: '24 hours before event',\n },\n [ContentId.OneWeekBeforeEvent]: {\n id: ContentId.OneWeekBeforeEvent,\n defaultValue: '1 week before event',\n },\n [ContentId.PriceBy]: {\n id: ContentId.PriceBy,\n defaultValue: 'price by ',\n },\n [ContentId.PriceByMarketplace]: {\n id: ContentId.PriceByMarketplace,\n defaultValue: 'Price by Marketplace',\n },\n [ContentId.PricedBy]: {\n id: ContentId.PricedBy,\n defaultValue: 'Priced By',\n },\n [ContentId.PriceMustBeBetweenFloorAndCeiling]: {\n id: ContentId.PriceMustBeBetweenFloorAndCeiling,\n defaultValue: 'Price must be between Price Floor and Ceiling.',\n },\n [ContentId.PriceCeiling]: {\n id: ContentId.PriceCeiling,\n defaultValue: 'Price Ceiling',\n },\n [ContentId.PriceEqualsLastPrice]: {\n id: ContentId.PriceEqualsLastPrice,\n defaultValue: 'Price Equals Last Price',\n },\n [ContentId.PriceFloor]: {\n id: ContentId.PriceFloor,\n defaultValue: 'Price Floor',\n },\n [ContentId.Pricer]: {\n id: ContentId.Pricer,\n defaultValue: 'Pricer',\n },\n [ContentId.Prices]: {\n id: ContentId.Prices,\n defaultValue: 'Prices',\n },\n [ContentId.PriceZeroUnbroadcastWarning]: {\n id: ContentId.PriceZeroUnbroadcastWarning,\n defaultValue:\n 'Setting the price to zero will unbroadcast the listing. Continue?',\n },\n [ContentId.Pricing]: {\n id: ContentId.Pricing,\n defaultValue: 'Pricing',\n },\n [ContentId.PricingDetails]: {\n id: ContentId.PricingDetails,\n defaultValue: 'Pricing Details',\n },\n [ContentId.PricingHistory]: {\n id: ContentId.PricingHistory,\n defaultValue: 'Pricing History',\n },\n [ContentId.PricingProtection]: {\n id: ContentId.PricingProtection,\n defaultValue: 'Pricing Protection',\n },\n [ContentId.Private]: {\n id: ContentId.Private,\n defaultValue: 'Private',\n },\n [ContentId.PrivateNote]: {\n id: ContentId.PrivateNote,\n defaultValue: 'Private note',\n },\n [ContentId.Proceeds]: {\n id: ContentId.Proceeds,\n defaultValue: 'Proceeds',\n },\n [ContentId.ProceedsFloor]: {\n id: ContentId.ProceedsFloor,\n defaultValue: 'Proceeds Floor',\n },\n [ContentId.ProceedsCeiling]: {\n id: ContentId.ProceedsCeiling,\n defaultValue: 'Proceeds Ceiling',\n },\n [ContentId.ProceedsPerTicket]: {\n id: ContentId.ProceedsPerTicket,\n defaultValue: 'Proceeds Per Ticket',\n },\n [ContentId.Processing]: {\n id: ContentId.Processing,\n defaultValue: 'Processing',\n },\n [ContentId.ProcessingFulfillment]: {\n id: ContentId.ProcessingFulfillment,\n defaultValue: PointOfSaleSaleStatus.ProcessingFulfillment,\n },\n [ContentId.Processor]: {\n id: ContentId.Processor,\n defaultValue: 'Processor',\n },\n [ContentId.Profit]: {\n id: ContentId.Profit,\n defaultValue: 'Profit',\n },\n [ContentId.ProofOfPurchase]: {\n id: ContentId.ProofOfPurchase,\n defaultValue: 'Proof of Purchase',\n },\n [ContentId.ProofOfPurchasedInstruction]: {\n id: ContentId.ProofOfPurchasedInstruction,\n defaultValue: 'Please upload receipts or email for proof of purchase',\n },\n [ContentId.ProofOfPurchasedRequired]: {\n id: ContentId.ProofOfPurchasedRequired,\n defaultValue: 'Proof of Purchase Required',\n },\n [ContentId.ProofOfPurchasedRequiredMessage]: {\n id: ContentId.ProofOfPurchasedRequiredMessage,\n defaultValue:\n 'Upload proof that you have neither row nor seat information available to you',\n },\n [ContentId.ProvideTransferImageProofInstruction]: {\n id: ContentId.ProvideTransferImageProofInstruction,\n defaultValue: 'Upload Screenshot of Transfer Confirmation',\n },\n [ContentId.ProvideTransferProofIdInstruction]: {\n id: ContentId.ProvideTransferProofIdInstruction,\n defaultValue: 'Provide proof of transfer ID or invoice ID (e.g. AXS)',\n },\n [ContentId.ProvideTransferUrlInstruction]: {\n id: ContentId.ProvideTransferUrlInstruction,\n defaultValue: 'Provide URLs where the buyer can accept the tickets.',\n },\n [ContentId.Purchase]: {\n id: ContentId.Purchase,\n defaultValue: 'Purchase',\n },\n [ContentId.PurchaseCancelled]: {\n id: ContentId.PurchaseCancelled,\n defaultValue: 'Purchase Cancelled',\n },\n [ContentId.PurchasedBy]: {\n id: ContentId.PurchasedBy,\n defaultValue: 'Purchased By',\n },\n [ContentId.PurchaseDetails]: {\n id: ContentId.PurchaseDetails,\n defaultValue: 'Purchase Details',\n },\n [ContentId.PurchaseHaveNoSales]: {\n id: ContentId.PurchaseHaveNoSales,\n defaultValue: 'This purchase has no sales.',\n },\n [ContentId.PurchaseHaveNoListings]: {\n id: ContentId.PurchaseHaveNoListings,\n defaultValue: 'This purchase has no listings.',\n },\n [ContentId.PurchaseId]: {\n id: ContentId.PurchaseId,\n defaultValue: 'Purchase Id',\n },\n [ContentId.Purchases]: {\n id: ContentId.Purchases,\n defaultValue: MainRoute.Purchases,\n },\n [ContentId.PurchaseDate]: {\n id: ContentId.PurchaseDate,\n defaultValue: 'Purchase Date',\n },\n [ContentId.PurchaseDates]: {\n id: ContentId.PurchaseDates,\n defaultValue: 'Purchase Dates',\n },\n [ContentId.Purchases_AddTagType_Details]: {\n id: ContentId.Purchases_AddTagType_Details,\n defaultValue: 'Permits adding new tag types to purchase orders',\n },\n [ContentId.Purchases_Create_Details]: {\n id: ContentId.Purchases_Create_Details,\n defaultValue: 'Create a new purchase',\n },\n [ContentId.Purchases_Edit_Details]: {\n id: ContentId.Purchases_Edit_Details,\n defaultValue: 'Edit any accessible purchase',\n },\n [ContentId.Purchases_EditOwned_Details]: {\n id: ContentId.Purchases_EditOwned_Details,\n defaultValue: 'Edit purchases made by the user',\n },\n [ContentId.Purchases_UpdateTags_Details]: {\n id: ContentId.Purchases_UpdateTags_Details,\n defaultValue: 'Permits updating of tags on purchase orders',\n },\n [ContentId.Purchases_UpdateTagsOwned_Details]: {\n id: ContentId.Purchases_UpdateTagsOwned_Details,\n defaultValue: 'Permits updateing tags on purchase made by the user',\n },\n [ContentId.Purchases_ViewAll_Details]: {\n id: ContentId.Purchases_ViewAll_Details,\n defaultValue: 'See all purchases including historical ones',\n },\n [ContentId.Purchases_ViewOwned_Details]: {\n id: ContentId.Purchases_ViewOwned_Details,\n defaultValue: 'View purchases made by the user',\n },\n [ContentId.Purchases_ViewRecent_Details]: {\n id: ContentId.Purchases_ViewRecent_Details,\n defaultValue:\n 'See only purchases for future events or events less than 3 months old',\n },\n [ContentId.PurchaseSettings]: {\n id: ContentId.PurchaseSettings,\n defaultValue: 'Purchase Settings',\n },\n [ContentId.PurchaseSettingsAllVisible]: {\n id: ContentId.PurchaseSettingsAllVisible,\n defaultValue: 'Edit Settings for All Visible Purchases',\n },\n [ContentId.QRCode]: {\n id: ContentId.QRCode,\n defaultValue: 'QR Code',\n },\n [ContentId.QualityControl]: {\n id: ContentId.QualityControl,\n defaultValue: 'Quality Control',\n },\n [ContentId.QualityControlState]: {\n id: ContentId.QualityControlState,\n defaultValue: 'Quality Control State',\n },\n [ContentId.QualityOfComparableListings]: {\n id: ContentId.QualityOfComparableListings,\n defaultValue: 'Quality of Comparable Listings',\n },\n [ContentId.Quantity]: {\n id: ContentId.Quantity,\n defaultValue: 'Quantity',\n },\n [ContentId.QuantityAbbreviated]: {\n id: ContentId.QuantityAbbreviated,\n defaultValue: 'Qty',\n },\n [ContentId.QuantityAdjustedVenueWideQualityScore]: {\n id: ContentId.QuantityAdjustedVenueWideQualityScore,\n defaultValue: 'Quantity Adjusted Venue-wide Quality Score',\n },\n [ContentId.QuantityAvailablePremiums]: {\n id: ContentId.QuantityAvailablePremiums,\n defaultValue: 'Quantity Available Premiums',\n },\n [ContentId.QuantityScore]: {\n id: ContentId.QuantityScore,\n defaultValue: 'Quantity Score',\n },\n [ContentId.QueuedForPayment]: {\n id: ContentId.QueuedForPayment,\n defaultValue: PointOfSalePaymentState.Queued,\n },\n [ContentId.QuickFilters]: {\n id: ContentId.QuickFilters,\n defaultValue: 'Quick Filters',\n },\n [ContentId.RandomizeRankForEachEvents]: {\n id: ContentId.RandomizeRankForEachEvents,\n defaultValue: 'Randomize ranks for each event',\n },\n [ContentId.Rank]: {\n id: ContentId.Rank,\n defaultValue: 'Rank',\n },\n [ContentId.Readonly]: {\n id: ContentId.Readonly,\n defaultValue: 'Readonly',\n },\n [ContentId.RecentlyCategorized]: {\n id: ContentId.RecentlyCategorized,\n defaultValue: 'Recently Categorized',\n },\n [ContentId.RecentlySold]: {\n id: ContentId.RecentlySold,\n defaultValue: 'Recently Sold',\n },\n [ContentId.RecentSales]: {\n id: ContentId.RecentSales,\n defaultValue: 'Recent Sales',\n },\n [ContentId.Recommended]: {\n id: ContentId.Recommended,\n defaultValue: 'Recommended',\n },\n [ContentId.Reduce]: {\n id: ContentId.Reduce,\n defaultValue: 'Reduce',\n },\n [ContentId.Reference]: {\n id: ContentId.Reference,\n defaultValue: 'Reference',\n },\n [ContentId.Refunded]: {\n id: ContentId.Refunded,\n defaultValue: 'Refunded',\n },\n [ContentId.RefundNeeded]: {\n id: ContentId.RefundNeeded,\n defaultValue: 'Refund Needed',\n },\n [ContentId.Rejected]: {\n id: ContentId.Rejected,\n defaultValue: 'Rejected',\n },\n [ContentId.RejectSale]: {\n id: ContentId.RejectSale,\n defaultValue: 'Reject Sale',\n },\n [ContentId.RejectSaleWarning]: {\n id: ContentId.RejectSaleWarning,\n defaultValue: 'You are about to reject this sale. Continue?',\n },\n [ContentId.ReleaseNotes]: {\n id: ContentId.ReleaseNotes,\n defaultValue: 'Release Notes',\n },\n [ContentId.Reload]: {\n id: ContentId.Reload,\n defaultValue: 'Reload',\n },\n [ContentId.Remaining]: {\n id: '',\n defaultValue: 'Remaining',\n },\n [ContentId.Remove]: {\n id: ContentId.Remove,\n defaultValue: 'Remove',\n },\n [ContentId.RemoveAccess]: {\n id: ContentId.RemoveAccess,\n defaultValue: 'Remove Access',\n },\n [ContentId.RemoveBarcodes]: {\n id: ContentId.RemoveBarcodes,\n defaultValue: 'Remove Barcodes',\n },\n [ContentId.RemoveHold]: {\n id: ContentId.RemoveHold,\n defaultValue: 'Remove Hold',\n },\n [ContentId.RemoveHoldAll]: {\n id: ContentId.RemoveHoldAll,\n defaultValue: 'Remove Hold for All',\n },\n [ContentId.RemoveHoldSelected]: {\n id: ContentId.RemoveHoldSelected,\n defaultValue: 'Remove Hold for Selected',\n },\n [ContentId.RemoveHoldVisible]: {\n id: ContentId.RemoveHoldVisible,\n defaultValue: 'Remove Hold for All Visible Listings',\n },\n [ContentId.RemovePayment]: {\n id: ContentId.RemovePayment,\n defaultValue: 'Remove Payment',\n },\n [ContentId.RemovePredeliveredArtifacts]: {\n id: ContentId.RemovePredeliveredArtifacts,\n defaultValue: 'Remove Predelivered Artifacts',\n },\n [ContentId.RemovePdfs]: {\n id: ContentId.RemovePdfs,\n defaultValue: 'Remove e-Ticket Documents',\n },\n [ContentId.RemovePredeliveredArtifactsAll]: {\n id: ContentId.RemovePredeliveredArtifactsAll,\n defaultValue: 'Remove Predelivery for All',\n },\n [ContentId.RemovePredeliveredArtifactsAllVisible]: {\n id: ContentId.RemovePredeliveredArtifactsAllVisible,\n defaultValue: 'Remove Predelivery for All Visible Listings',\n },\n [ContentId.RemovePredeliveredArtifactsSelected]: {\n id: ContentId.RemovePredeliveredArtifactsSelected,\n defaultValue: 'Remove Predelivery for Selected',\n },\n [ContentId.RemovePredeliveredArtifactsWarning]: {\n id: ContentId.RemovePredeliveredArtifactsWarning,\n defaultValue:\n 'Removing pre-delivered artifacts applies only to unsold tickets.',\n },\n [ContentId.RemoveTag]: {\n id: ContentId.RemoveTag,\n defaultValue: 'Remove Tag',\n },\n [ContentId.RemoveTagValues]: {\n id: ContentId.RemoveTagValues,\n defaultValue: 'Remove Tag Values',\n },\n [ContentId.RemoveTagValuesAllVisible]: {\n id: ContentId.RemoveTagValuesAllVisible,\n defaultValue: 'Remove Tag Values for All Visible Listings',\n },\n [ContentId.RemoveTagValuesSelected]: {\n id: ContentId.RemoveTagValuesSelected,\n defaultValue: 'Remove Tag Values for Selected',\n },\n [ContentId.RenewAccessToken]: {\n id: ContentId.RenewAccessToken,\n defaultValue: 'Renew access token',\n },\n [ContentId.Reply]: {\n id: ContentId.Reply,\n defaultValue: 'Reply',\n },\n [ContentId.Reporter]: {\n id: ContentId.Reporter,\n defaultValue: 'Reporter',\n },\n [ContentId.Reporting]: {\n id: ContentId.Reporting,\n defaultValue: 'Reporting',\n },\n [ContentId.ReportName]: {\n id: ContentId.ReportName,\n defaultValue: 'Report Name',\n },\n [ContentId.Reports]: {\n id: ContentId.Reports,\n defaultValue: 'Reports',\n },\n [ContentId.Reports_CreateReports_Details]: {\n id: ContentId.Reports_CreateReports_Details,\n defaultValue: 'Create new reports across various modules',\n },\n [ContentId.Reports_UpdateReports_Details]: {\n id: ContentId.Reports_UpdateReports_Details,\n defaultValue: 'Edit existing reports',\n },\n [ContentId.Reports_UpdateReportsOwned_Details]: {\n id: ContentId.Reports_UpdateReportsOwned_Details,\n defaultValue: 'Edit reports created or owned by the user',\n },\n [ContentId.Reports_ViewAll_Details]: {\n id: ContentId.Reports_ViewAll_Details,\n defaultValue: 'View all reports, across all modules',\n },\n [ContentId.Reports_ViewInventoryReports_Details]: {\n id: ContentId.Reports_ViewInventoryReports_Details,\n defaultValue: 'View inventory-related reports',\n },\n [ContentId.Reports_ViewSalesReports_Details]: {\n id: ContentId.Reports_ViewSalesReports_Details,\n defaultValue: 'View sales-related reports',\n },\n [ContentId.ReprocessEmail]: {\n id: ContentId.ReprocessEmail,\n defaultValue: 'Reprocess email',\n },\n [ContentId.RequestEvent]: {\n id: ContentId.RequestEvent,\n defaultValue: 'Request Event',\n },\n [ContentId.RequestPasswordResetEmail]: {\n id: ContentId.RequestPasswordResetEmail,\n defaultValue: 'Request password reset email',\n },\n [ContentId.Required]: {\n id: ContentId.Required,\n defaultValue: 'Required',\n },\n [ContentId.RequiredFieldsError]: {\n id: ContentId.RequiredFieldsError,\n defaultValue: 'Some required fields are empty.',\n },\n [ContentId.Reset]: {\n id: ContentId.Reset,\n defaultValue: 'Reset',\n },\n [ContentId.ResetAll]: {\n id: ContentId.ResetAll,\n defaultValue: 'Reset All',\n },\n [ContentId.ResetFulfillment]: {\n id: ContentId.ResetFulfillment,\n defaultValue: 'Reset Fulfillment',\n },\n [ContentId.ResetFulfillmentWarning]: {\n id: ContentId.ResetFulfillmentWarning,\n defaultValue:\n 'You are about to put this sale back to Pending Re-fulfillment. Continue?',\n },\n [ContentId.ResetListings]: {\n id: ContentId.ResetListings,\n defaultValue: 'Reset Listings',\n },\n [ContentId.ResetListingsDeleteWarning]: {\n id: ContentId.ResetListingsDeleteWarning,\n defaultValue:\n 'This action will delete the all listings that were merged or split (unless those listings were merged with other tickets from other purchases, then they will be changed to no longer contain tickets from this purchase) and new listings will be created from the original ticket groups. All listings that are created from the original ticket groups will remain unchanged.',\n },\n [ContentId.ResetSettings]: {\n id: ContentId.ResetSettings,\n defaultValue: 'Reset Settings',\n },\n [ContentId.RestorePurchase]: {\n id: ContentId.RestorePurchase,\n defaultValue: 'Restore Purchase',\n },\n [ContentId.RestrictTo]: {\n id: ContentId.RestrictTo,\n defaultValue: 'Restrict to',\n },\n [ContentId.RestrictToSameZone]: {\n id: ContentId.RestrictToSameZone,\n defaultValue: 'Restrict to Same Zone',\n },\n [ContentId.RestrictSelection]: {\n id: ContentId.RestrictSelection,\n defaultValue: 'Restrict selection',\n },\n [ContentId.RestrictPriceDropVelocity]: {\n id: ContentId.RestrictPriceDropVelocity,\n defaultValue: 'Restrict Price Drop Velocity',\n },\n [ContentId.RetrievingBuyersInfo]: {\n id: ContentId.RetrievingBuyersInfo,\n defaultValue: \"Retrieving buyer's information...\",\n },\n [ContentId.Retry]: {\n id: ContentId.Retry,\n defaultValue: 'Retry',\n },\n [ContentId.ReuploadBarcodes]: {\n id: ContentId.ReuploadBarcodes,\n defaultValue: 'Re-upload Barcodes',\n },\n [ContentId.ReuploadETickets]: {\n id: ContentId.ReuploadETickets,\n defaultValue: 'Re-upload E-Tickets',\n },\n [ContentId.ReuploadProof]: {\n id: ContentId.ReuploadProof,\n defaultValue: 'Re-upload Proof',\n },\n [ContentId.ReuploadQRCodes]: {\n id: ContentId.ReuploadQRCodes,\n defaultValue: 'Re-upload QR Codes',\n },\n [ContentId.ReuploadTicketUrls]: {\n id: ContentId.ReuploadTicketUrls,\n defaultValue: 'Re-upload Ticket URLs',\n },\n [ContentId.ReuploadTicketIds]: {\n id: ContentId.ReuploadTicketIds,\n defaultValue: 'Re-upload Ticket IDs',\n },\n [ContentId.Revenue]: {\n id: ContentId.Revenue,\n defaultValue: 'Revenue',\n },\n [ContentId.Reversed]: {\n id: ContentId.Reversed,\n defaultValue: 'Reversed',\n },\n [ContentId.ReviewAllocation]: {\n id: ContentId.ReviewAllocation,\n defaultValue: 'Review Allocation',\n },\n [ContentId.RightNow]: {\n id: ContentId.RightNow,\n defaultValue: 'Right Now',\n },\n [ContentId.Role]: {\n id: ContentId.Role,\n defaultValue: 'Role',\n },\n [ContentId.Role_AutoFulfill_Details]: {\n id: ContentId.Role_AutoFulfill_Details,\n defaultValue: 'Auto process that handles fulfilling sales',\n },\n [ContentId.Role_AutoPO_Details]: {\n id: ContentId.Role_AutoPO_Details,\n defaultValue: 'Auto process that handles purchase',\n },\n [ContentId.Role_AutoPricer_Details]: {\n id: ContentId.Role_AutoPricer_Details,\n defaultValue: 'Auto process that handles pricing',\n },\n [ContentId.Role_Buyer_Details]: {\n id: ContentId.Role_Buyer_Details,\n defaultValue: 'One who handles buying tickets and creating purchases',\n },\n [ContentId.Role_Finance_Details]: {\n id: ContentId.Role_Finance_Details,\n defaultValue: 'One who handles finance',\n },\n [ContentId.Role_Fulfillment_Details]: {\n id: ContentId.Role_Fulfillment_Details,\n defaultValue: 'One who fulfills sales',\n },\n [ContentId.Role_Owner_Details]: {\n id: ContentId.Role_Owner_Details,\n defaultValue: ' Owner/CEO of a seller account',\n },\n [ContentId.Role_Pricer_Details]: {\n id: ContentId.Role_Pricer_Details,\n defaultValue: 'One who handles pricing on inventory',\n },\n [ContentId.Role_Processor_Details]: {\n id: ContentId.Role_Processor_Details,\n defaultValue:\n 'One who handles inventory and sales for an API seller account',\n },\n [ContentId.Role_Reporter_Details]: {\n id: ContentId.Role_Reporter_Details,\n defaultValue: 'One who handles reporting',\n },\n [ContentId.Roles]: {\n id: ContentId.Roles,\n defaultValue: 'Roles',\n },\n [ContentId.RoleWithUsersCannotBeDeleted]: {\n id: ContentId.RoleWithUsersCannotBeDeleted,\n defaultValue:\n 'This role cannot be deleted as there are users currently assigned to it. Reassign users before attempting deletion.',\n },\n [ContentId.Row]: {\n id: ContentId.Row,\n defaultValue: 'Row',\n },\n [ContentId.RowExtrapolation]: {\n id: ContentId.RowExtrapolation,\n defaultValue: 'Row Extrapolation',\n },\n [ContentId.RowScore]: {\n id: ContentId.RowScore,\n defaultValue: 'Row Score',\n },\n [ContentId.Sale]: {\n id: ContentId.Sale,\n defaultValue: 'Sale',\n },\n [ContentId.SaleCancelled]: {\n id: ContentId.SaleCancelled,\n defaultValue: 'Sale Cancelled',\n },\n [ContentId.SaleConflictWarning]: {\n id: ContentId.SaleConflictWarning,\n defaultValue:\n 'This sale was recently updated. Please reload to see the lastest sale information and make any necessary changes.',\n },\n\n [ContentId.SaleDate]: {\n id: ContentId.SaleDate,\n defaultValue: 'Sale Date',\n },\n [ContentId.SaleId]: {\n id: ContentId.SaleId,\n defaultValue: 'Sale Id',\n },\n [ContentId.Sales]: { id: ContentId.Sales, defaultValue: 'Sales' },\n [ContentId.Sales_AddTagType_Details]: {\n id: ContentId.Sales_AddTagType_Details,\n defaultValue: 'Permits adding new tag types to sales',\n },\n [ContentId.Sales_ConfirmReject_Details]: {\n id: ContentId.Sales_ConfirmReject_Details,\n defaultValue: 'Can confirm (allocate) or reject all accessible sales',\n },\n [ContentId.Sales_ConfirmRejectOnIsFulfillerOf_Details]: {\n id: ContentId.Sales_ConfirmRejectOnIsFulfillerOf_Details,\n defaultValue: 'Confirm/Reject sales where the user is the fulfiller',\n },\n [ContentId.Sales_ConfirmRejectOnIsPricerOf_Details]: {\n id: ContentId.Sales_ConfirmRejectOnIsPricerOf_Details,\n defaultValue:\n 'Confirm/Reject sales of inventory where the user is the pricer',\n },\n [ContentId.Sales_ConfirmRejectOnPurchasedBy_Details]: {\n id: ContentId.Sales_ConfirmRejectOnPurchasedBy_Details,\n defaultValue: 'Confirm/Reject sales of inventory that the user purchased',\n },\n [ContentId.Sales_ConfirmTransferWithoutProof_Details]: {\n id: ContentId.Sales_ConfirmTransferWithoutProof_Details,\n defaultValue: 'Confirm transfer without proof for accessible sales',\n },\n [ContentId.Sales_CreateForExternalMarketplaces_Details]: {\n id: ContentId.Sales_CreateForExternalMarketplaces_Details,\n defaultValue: 'Can create sales in POS for any non-StubHub marketplace',\n },\n [ContentId.Sales_CreateOfflineSale_Details]: {\n id: ContentId.Sales_CreateOfflineSale_Details,\n defaultValue: 'Create offline sales',\n },\n [ContentId.Sales_Fulfill_Details]: {\n id: ContentId.Sales_Fulfill_Details,\n defaultValue: 'Can fulfill all accessible sales',\n },\n [ContentId.Sales_FulfillOnIsFulfillerOf_Details]: {\n id: ContentId.Sales_FulfillOnIsFulfillerOf_Details,\n defaultValue:\n 'Enables fulfilling sales actions where the user is the fulfiller',\n },\n [ContentId.Sales_FulfillOnPricerOf_Details]: {\n id: ContentId.Sales_FulfillOnPricerOf_Details,\n defaultValue:\n 'Fulfill sales of inventory where the user priced the inventory',\n },\n [ContentId.Sales_FulfillOnPurchasedBy_Details]: {\n id: ContentId.Sales_FulfillOnPurchasedBy_Details,\n defaultValue: 'Fulfill sales of inventory that the user purchased',\n },\n [ContentId.Sales_ManageHold_Details]: {\n id: ContentId.Sales_ManageHold_Details,\n defaultValue: 'Create/edit/delete holds of sales',\n },\n [ContentId.Sales_ManageOfflineSale_Details]: {\n id: ContentId.Sales_ManageOfflineSale_Details,\n defaultValue: 'Update/delete offline sales',\n },\n [ContentId.Sales_ManageOfflineSaleCreatedBy_Details]: {\n id: ContentId.Sales_ManageOfflineSaleCreatedBy_Details,\n defaultValue: 'Update/delete offline sales that the user created',\n },\n [ContentId.Sales_ResetFulfillment_Details]: {\n id: ContentId.Sales_ResetFulfillment_Details,\n defaultValue: 'Reset fulfillment on accessible fulfilled sales',\n },\n [ContentId.Sales_UpdateSaleOnPurchasedBy_Details]: {\n id: ContentId.Sales_UpdateSaleOnPurchasedBy_Details,\n defaultValue: 'Update sales of inventory that the user purchased',\n },\n [ContentId.Sales_UpdateSalesInfo_Details]: {\n id: ContentId.Sales_UpdateSalesInfo_Details,\n defaultValue: 'Allows updating sales information',\n },\n [ContentId.Sales_UpdateSalesInfoOnIsFulfillerOf_Details]: {\n id: ContentId.Sales_UpdateSalesInfoOnIsFulfillerOf_Details,\n defaultValue:\n 'Allows updating sales information where the user is the fulfiller',\n },\n [ContentId.Sales_UpdateSalesInfoOnIsPricerOf_Details]: {\n id: ContentId.Sales_UpdateSalesInfoOnIsPricerOf_Details,\n defaultValue:\n 'Allows updating sales information where the user priced the inventory',\n },\n [ContentId.Sales_UpdateTags_Details]: {\n id: ContentId.Sales_UpdateTags_Details,\n defaultValue: 'Permits updating of tags on sales',\n },\n [ContentId.Sales_UpdateTagsOnIsFulfillerOf_Details]: {\n id: ContentId.Sales_UpdateTagsOnIsFulfillerOf_Details,\n defaultValue: 'Update tags of sales where the user is the fulfiller',\n },\n [ContentId.Sales_UpdateTagsOnIsPricerOf_Details]: {\n id: ContentId.Sales_UpdateTagsOnIsPricerOf_Details,\n defaultValue:\n 'Update tags of sales of inventory where the user is the pricer',\n },\n [ContentId.Sales_UpdateTagsOnPurchasedBy_Details]: {\n id: ContentId.Sales_UpdateTagsOnPurchasedBy_Details,\n defaultValue: 'Update tags of sales of inventory that the user purchased',\n },\n [ContentId.Sales_ViewAll_Details]: {\n id: ContentId.Sales_ViewAll_Details,\n defaultValue: 'See all sales including historical ones',\n },\n [ContentId.Sales_ViewCostAndMargin_Details]: {\n id: ContentId.Sales_ViewCostAndMargin_Details,\n defaultValue: 'See cost and margins on all accessible sales',\n },\n [ContentId.Sales_ViewFulfillmentArtifacts_Details]: {\n id: ContentId.Sales_ViewFulfillmentArtifacts_Details,\n defaultValue: 'See fulfillment artifacts from a sale',\n },\n [ContentId.Sales_ViewFulfillmentArtifactsOnIsFulfillerOf_Details]: {\n id: ContentId.Sales_ViewFulfillmentArtifactsOnIsFulfillerOf_Details,\n defaultValue: 'View fulfillment artifacts on sales that the user fufilled',\n },\n [ContentId.Sales_ViewFulfillmentArtifactsOnIsPricerOf_Details]: {\n id: ContentId.Sales_ViewFulfillmentArtifactsOnIsPricerOf_Details,\n defaultValue:\n 'View fulfillment artifacts on sales of inventory where the user is the pricer',\n },\n [ContentId.Sales_ViewFulfillmentArtifactsOnPurchasedBy_Details]: {\n id: ContentId.Sales_ViewFulfillmentArtifactsOnPurchasedBy_Details,\n defaultValue:\n 'View fulfillment artifacts on sales of inventory that the user purchased',\n },\n [ContentId.Sales_ViewPaymentState_Details]: {\n id: ContentId.Sales_ViewPaymentState_Details,\n defaultValue: 'See payment state on all accessible sales',\n },\n [ContentId.Sales_ViewProceeds_Details]: {\n id: ContentId.Sales_ViewProceeds_Details,\n defaultValue: 'See proceeds of all accessible sales',\n },\n [ContentId.Sales_ViewRecent_Details]: {\n id: ContentId.Sales_ViewRecent_Details,\n defaultValue:\n 'See only sales for future events or events less than 3 months old',\n },\n [ContentId.Sales_ViewRecentFromExternalMarketplace_Details]: {\n id: ContentId.Sales_ViewRecentFromExternalMarketplace_Details,\n defaultValue:\n 'See only sales for future events or events less than 3 months old that are not StubHub sales',\n },\n [ContentId.Sales_ViewRecentProceeds_Details]: {\n id: ContentId.Sales_ViewRecentProceeds_Details,\n defaultValue: 'See proceeds of all accessible sales within the last 7 days',\n },\n [ContentId.Sales_ViewSalesOnIsFulfillerOf_Details]: {\n id: ContentId.Sales_ViewSalesOnIsFulfillerOf_Details,\n defaultValue: 'View sales where the user is the fulfiller',\n },\n [ContentId.Sales_ViewSalesOnIsPricerOf_Details]: {\n id: ContentId.Sales_ViewSalesOnIsPricerOf_Details,\n defaultValue: 'Permits viewing sales where the user is the pricer',\n },\n [ContentId.Sales_ViewSalesOnPurchasedBy_Details]: {\n id: ContentId.Sales_ViewSalesOnPurchasedBy_Details,\n defaultValue: 'View sales of inventory that the user purchased',\n },\n [ContentId.SalesAndLift]: {\n id: ContentId.SalesAndLift,\n defaultValue: 'Sales & Lift',\n },\n [ContentId.SalesAndMargin]: {\n id: ContentId.SalesAndMargin,\n defaultValue: 'Sales & Margin',\n },\n [ContentId.SaleSettings]: {\n id: ContentId.SaleSettings,\n defaultValue: 'Sale Settings',\n },\n [ContentId.SaleSettingsAllVisible]: {\n id: ContentId.SaleSettingsAllVisible,\n defaultValue: 'Edit General Settings for All Visible Sales',\n },\n [ContentId.SalesReports]: {\n id: ContentId.SalesReports,\n defaultValue: MainRoute.Sales,\n },\n [ContentId.SalesSummary]: {\n id: ContentId.SalesSummary,\n defaultValue: 'Sales Summary',\n },\n [ContentId.SaleStatus]: {\n id: ContentId.SaleStatus,\n defaultValue: 'Sale Status',\n },\n [ContentId.SaleTicketTypeBulkEditWarning]: {\n id: ContentId.SaleTicketTypeBulkEditWarning,\n defaultValue:\n 'Ticket type change will only apply to sales that happened on StubHub and have not been fulfilled or rejected.',\n },\n [ContentId.SaleTicketTypeWarning]: {\n id: ContentId.SaleTicketTypeWarning,\n defaultValue:\n 'You can only change the ticket type if your sale happened on StubHub and has not been fulfilled or rejected',\n },\n [ContentId.SameTicketsForAllEventsTitle]: {\n id: ContentId.SameTicketsForAllEventsTitle,\n defaultValue: 'Multiple Events Selected',\n },\n [ContentId.SameTicketsForAllEventsHeader]: {\n id: ContentId.SameTicketsForAllEventsHeader,\n defaultValue:\n 'Do all your selected events share the same ticket information?',\n },\n [ContentId.SameTicketsForAllEventsMessage1]: {\n id: ContentId.SameTicketsForAllEventsMessage1,\n defaultValue: \"Click 'Yes' to enter the same tickets for all the events.\",\n },\n [ContentId.SameTicketsForAllEventsMessage2]: {\n id: ContentId.SameTicketsForAllEventsMessage2,\n defaultValue: \"Click 'No' to enter the tickets for each event separately.\",\n },\n [ContentId.SameZone]: {\n id: ContentId.SameZone,\n defaultValue: 'Same zone',\n },\n [ContentId.Save]: {\n id: ContentId.Save,\n defaultValue: 'Save',\n },\n [ContentId.SaveBarcodes]: {\n id: ContentId.SaveBarcodes,\n defaultValue: 'Save Barcodes',\n },\n [ContentId.SavePricingStrategyInfo]: {\n id: ContentId.SavePricingStrategyInfo,\n defaultValue:\n 'Save your pricing settings as a strategy to easily reuse it.',\n },\n [ContentId.SaveThisFilter]: {\n id: ContentId.SaveThisFilter,\n defaultValue: 'Save this filter',\n },\n [ContentId.SaveTicketIds]: {\n id: ContentId.SaveTicketIds,\n defaultValue: 'Save Ticket IDs',\n },\n [ContentId.SaveTicketUrls]: {\n id: ContentId.SaveTicketUrls,\n defaultValue: 'Save Ticket URLs',\n },\n [ContentId.Score]: {\n id: ContentId.Score,\n defaultValue: 'Score',\n },\n [ContentId.ScreenshotsOfTransfer]: {\n id: ContentId.ScreenshotsOfTransfer,\n defaultValue: 'Screenshots of the transfer confirmation.',\n },\n [ContentId.Search]: { id: ContentId.Search, defaultValue: 'Search' },\n [ContentId.SearchEmptyResult]: {\n id: ContentId.SearchEmptyResult,\n defaultValue: 'No events were found based on your query.',\n },\n [ContentId.SearchEventPlaceholderText]: {\n id: ContentId.SearchEventPlaceholderText,\n defaultValue: 'Search for event, venue, or performer',\n },\n [ContentId.SearchForMessagePlaceholder]: {\n id: ContentId.SearchForMessagePlaceholder,\n defaultValue: 'Search for message',\n },\n [ContentId.SearchOrEnter]: {\n id: ContentId.SearchOrEnter,\n defaultValue: 'Search or Enter',\n },\n [ContentId.SearchVenueConfigOrEvent]: {\n id: ContentId.SearchVenueConfigOrEvent,\n defaultValue: 'Search performer at venue or event',\n },\n [ContentId.Season]: { id: ContentId.Season, defaultValue: 'Season' },\n [ContentId.Seat]: { id: ContentId.Seat, defaultValue: 'Seat' },\n [ContentId.SeatFrom]: {\n id: ContentId.SeatFrom,\n defaultValue: 'Seat From',\n },\n [ContentId.SeatHeatmap]: {\n id: ContentId.SeatHeatmap,\n defaultValue: 'Seat Heatmap',\n },\n [ContentId.Seating]: { id: ContentId.Seating, defaultValue: 'Seating' },\n [ContentId.SeatingInfoNotMatchStubHub]: {\n id: ContentId.SeatingInfoNotMatchStubHub,\n defaultValue: \"Seating information not found in StubHub's event map.\",\n },\n [ContentId.SeatingUnmapped]: {\n id: ContentId.SeatingUnmapped,\n defaultValue: 'Seating Unmapped',\n },\n [ContentId.Seats]: { id: ContentId.Seats, defaultValue: 'Seats' },\n [ContentId.SeatSaver]: {\n id: ContentId.SeatSaver,\n defaultValue: 'Seat Saver',\n },\n [ContentId.SeatSaverPurchaseMessage]: {\n id: ContentId.SeatSaverPurchaseMessage,\n defaultValue:\n 'Seat Saver have no purchases until a purchase is automatically or manually allocated.',\n },\n [ContentId.SeatScore]: {\n id: ContentId.SeatScore,\n defaultValue: 'Seat Score',\n },\n [ContentId.SeatTo]: {\n id: ContentId.SeatTo,\n defaultValue: 'Seat To',\n },\n [ContentId.SeatTraits]: {\n id: ContentId.SeatTraits,\n defaultValue: 'Seat Traits',\n },\n [ContentId.SeatAllocationChangeWarning]: {\n id: ContentId.SeatAllocationChangeWarning,\n defaultValue:\n 'If you change section or row, you might need to confirm the change with the marketplace first.',\n },\n [ContentId.SeatIncrementType]: {\n id: ContentId.SeatIncrementType,\n defaultValue: 'Seat Increment Type',\n },\n [ContentId.SectionOnly]: {\n id: ContentId.SectionOnly,\n defaultValue: 'Section Only',\n },\n [ContentId.SeeAll]: {\n id: ContentId.SeeAll,\n defaultValue: 'See All',\n },\n [ContentId.SeeMoreEllipses]: {\n id: ContentId.SeeMoreEllipses,\n defaultValue: 'See More...',\n },\n [ContentId.Select]: {\n id: ContentId.Select,\n defaultValue: 'Select',\n },\n [ContentId.SelectAll]: {\n id: ContentId.SelectAll,\n defaultValue: 'Select All',\n },\n [ContentId.SelectDatePlaceholder]: {\n id: ContentId.SelectDatePlaceholder,\n defaultValue: 'Select date',\n },\n [ContentId.SelectedListing]: {\n id: ContentId.SelectedListing,\n defaultValue: 'Selected Listing',\n },\n [ContentId.SelectedSection]: {\n id: ContentId.SelectedSection,\n defaultValue: 'Selected Sections',\n },\n [ContentId.SelectedSections]: {\n id: ContentId.SelectedSections,\n defaultValue: 'Selected Sections',\n },\n [ContentId.SelectFilter]: {\n id: ContentId.SelectFilter,\n defaultValue: 'Select filter',\n },\n [ContentId.SelectInboxPlaceholder]: {\n id: ContentId.SelectInboxPlaceholder,\n defaultValue: 'Select inbox',\n },\n [ContentId.SelectListingsToMerge]: {\n id: ContentId.SelectListingsToMerge,\n defaultValue: 'Select Listings to Merge',\n },\n [ContentId.SelectMultiple]: {\n id: ContentId.SelectMultiple,\n defaultValue: 'Select Multiple',\n },\n [ContentId.SelectNone]: {\n id: ContentId.SelectNone,\n defaultValue: 'Select None',\n },\n [ContentId.SelectSeatFrom]: {\n id: ContentId.SelectSeatFrom,\n defaultValue: 'Select Seat From',\n },\n [ContentId.SelectSections]: {\n id: ContentId.SelectSections,\n defaultValue: 'Select Sections',\n },\n [ContentId.SelectSectionsToPriceAgainst]: {\n id: ContentId.SelectSectionsToPriceAgainst,\n defaultValue: 'Select sections to price against',\n },\n [ContentId.SelectSortPlaceholder]: {\n id: ContentId.SelectSortPlaceholder,\n defaultValue: 'Select sort',\n },\n [ContentId.SelectSplitType]: {\n id: ContentId.SelectSplitType,\n defaultValue: 'Select split type',\n },\n [ContentId.SelectSubjectPlaceholder]: {\n id: ContentId.SelectSubjectPlaceholder,\n defaultValue: 'Select subject',\n },\n [ContentId.SelectTags]: {\n id: ContentId.SelectTags,\n defaultValue: 'Select Tags',\n },\n [ContentId.SelectTemplate]: {\n id: ContentId.SelectTemplate,\n defaultValue: 'Select Template',\n },\n [ContentId.SelectUsersAndGroups]: {\n id: ContentId.SelectUsersAndGroups,\n defaultValue: 'Select Users and Groups',\n },\n [ContentId.SelectValueType]: {\n id: ContentId.SelectValueType,\n defaultValue: 'Select Value Type',\n },\n [ContentId.SelectVariables]: {\n id: ContentId.SelectVariables,\n defaultValue: 'Select Variables',\n },\n [ContentId.SelectVendor]: {\n id: ContentId.SelectVendor,\n defaultValue: 'Select Vendor',\n },\n [ContentId.SelectVendorShowAccounts]: {\n id: ContentId.SelectVendorShowAccounts,\n defaultValue: 'Select a vendor to show the accounts',\n },\n [ContentId.SellAsTicketTypePriority]: {\n id: ContentId.SellAsTicketTypePriority,\n defaultValue: 'Sell as Ticket Type Priority',\n },\n [ContentId.SellerAccount]: {\n id: ContentId.SellerAccount,\n defaultValue: 'Seller Account',\n },\n [ContentId.Section]: {\n id: ContentId.Section,\n defaultValue: 'Section',\n },\n [ContentId.Sections]: {\n id: ContentId.Sections,\n defaultValue: 'Sections',\n },\n [ContentId.SeeAllResultsFor]: {\n id: ContentId.SeeAllResultsFor,\n defaultValue: 'See all results for',\n },\n [ContentId.SelectAccountToSignIn]: {\n id: ContentId.SelectAccountToSignIn,\n defaultValue: 'Select the account to sign-in',\n },\n [ContentId.SelectAccountToSwitch]: {\n id: ContentId.SelectAccountToSwitch,\n defaultValue: 'Select the account to switch to',\n },\n [ContentId.Selected]: {\n id: ContentId.Selected,\n defaultValue: 'Selected',\n },\n [ContentId.SelectYourFilters]: {\n id: ContentId.SelectYourFilters,\n defaultValue: 'Select your filters',\n },\n [ContentId.SearchAndSelectAnEvent]: {\n id: ContentId.SearchAndSelectAnEvent,\n defaultValue: 'Find and select an event.',\n },\n [ContentId.SellerAccount_Admin_Details]: {\n id: ContentId.SellerAccount_Admin_Details,\n defaultValue:\n 'Able to perform account managements (add/remove users and roles, edit marketplace syncs, etc)',\n },\n [ContentId.SellerFee]: {\n id: ContentId.SellerFee,\n defaultValue: 'Seller Fee',\n },\n [ContentId.SellerOwnTickets]: {\n id: ContentId.SellerOwnTickets,\n defaultValue: 'I own these tickets',\n },\n [ContentId.SellerSupportCase]: {\n id: ContentId.SellerSupportCase,\n defaultValue: 'Seller Support Case',\n },\n [ContentId.SellerSupportCase_Create_Details]: {\n id: ContentId.SellerSupportCase_Create_Details,\n defaultValue:\n 'Create a new seller support case and create a new reply for a support case',\n },\n [ContentId.SellerSupportCase_View_Details]: {\n id: ContentId.SellerSupportCase_View_Details,\n defaultValue: 'View existing seller support cases and all the replies',\n },\n [ContentId.SellThroughRate]: {\n id: ContentId.SellThroughRate,\n defaultValue: 'Sell-Through Rate',\n },\n [ContentId.SellThroughRateLowercase]: {\n id: ContentId.SellThroughRateLowercase,\n defaultValue: 'Sell-through rate',\n },\n [ContentId.SellThroughRateSubtitle]: {\n id: ContentId.SellThroughRateSubtitle,\n defaultValue: 'Price and broadcast to meet your targets.',\n },\n [ContentId.SendInhandDateToMarketplace]: {\n id: ContentId.SendInhandDateToMarketplace,\n defaultValue: 'Send In hand Date to Marketplace',\n },\n [ContentId.SetAsPaid]: {\n id: ContentId.SetAsPaid,\n defaultValue: 'Set as Paid',\n },\n [ContentId.SetPriority]: {\n id: ContentId.SetPriority,\n defaultValue: 'Set Priority',\n },\n [ContentId.Settings]: {\n id: ContentId.Settings,\n defaultValue: 'Settings',\n },\n [ContentId.Share]: {\n id: ContentId.Share,\n defaultValue: 'Share',\n },\n [ContentId.ShareReport]: {\n id: ContentId.ShareReport,\n defaultValue: 'Share report',\n },\n [ContentId.Sharing]: {\n id: ContentId.Sharing,\n defaultValue: 'Sharing',\n },\n [ContentId.SharingReportDescription]: {\n id: ContentId.SharingReportDescription,\n defaultValue: 'Add people or groups to share access to this report',\n },\n [ContentId.Shipment]: {\n id: ContentId.Shipment,\n defaultValue: 'Shipment',\n },\n [ContentId.Shipping]: {\n id: ContentId.Shipping,\n defaultValue: 'Shipping',\n },\n [ContentId.ShippingDeadline]: {\n id: ContentId.ShippingDeadline,\n defaultValue: 'Shipping Deadline',\n },\n [ContentId.ShowAdvancedSettings]: {\n id: ContentId.ShowAdvancedSettings,\n defaultValue: 'Show advanced settings',\n },\n [ContentId.ShowAllListings]: {\n id: ContentId.ShowAllListings,\n defaultValue: 'Show All Listings',\n },\n [ContentId.ShownQuantity]: {\n id: ContentId.ShownQuantity,\n defaultValue: 'Shown Quantity',\n },\n [ContentId.ShowParkingTickets]: {\n id: ContentId.ShowParkingTickets,\n defaultValue: 'Show Parking Tickets',\n },\n [ContentId.ShowRelatedListings]: {\n id: ContentId.ShowRelatedListings,\n defaultValue: 'Show Related Listings',\n },\n [ContentId.ShowSimpleSettings]: {\n id: ContentId.ShowSimpleSettings,\n defaultValue: 'Show simple settings...',\n },\n [ContentId.ShowVoidCancelledPurchases]: {\n id: ContentId.ShowVoidCancelledPurchases,\n defaultValue: 'Show Void/Cancelled Purchases',\n },\n [ContentId.SignIn]: {\n id: ContentId.SignIn,\n defaultValue: 'Sign in',\n },\n [ContentId.SignInAgain]: {\n id: ContentId.SignInAgain,\n defaultValue: 'Sign in again',\n },\n [ContentId.SignOut]: {\n id: ContentId.SignOut,\n defaultValue: 'Sign out',\n },\n [ContentId.SignupDate]: {\n id: ContentId.SignupDate,\n defaultValue: 'Signup date',\n },\n [ContentId.Simple]: {\n id: ContentId.Simple,\n defaultValue: 'Simple',\n },\n [ContentId.SinglePayment]: {\n id: ContentId.SinglePayment,\n defaultValue: 'Single Payment',\n },\n [ContentId.SingleValueOnly]: {\n id: ContentId.SingleValueOnly,\n defaultValue: 'Single Value Only',\n },\n [ContentId.SiteTheme]: {\n id: ContentId.SiteTheme,\n defaultValue: 'Site Theme',\n },\n [ContentId.SkipLogic]: {\n id: ContentId.SkipLogic,\n defaultValue: 'Skip Step',\n },\n [ContentId.SMPWallet]: {\n id: ContentId.SMPWallet,\n defaultValue: 'SMPWallet',\n },\n [ContentId.Sold]: {\n id: ContentId.Sold,\n defaultValue: 'Sold',\n },\n [ContentId.SoldATP]: {\n id: ContentId.SoldATP,\n defaultValue: 'Sold ATP',\n },\n [ContentId.SoldAverageTicketPrice]: {\n id: ContentId.SoldAverageTicketPrice,\n defaultValue: 'Sold Average Ticket Price',\n },\n [ContentId.SoldCost]: {\n id: ContentId.SoldCost,\n defaultValue: 'Sold Cost',\n },\n [ContentId.SoldAs]: {\n id: ContentId.SoldAs,\n defaultValue: 'Sold As',\n },\n [ContentId.SoldProceeds]: {\n id: ContentId.SoldProceeds,\n defaultValue: 'Sold Proceeds',\n },\n [ContentId.SoldProfit]: {\n id: ContentId.SoldProfit,\n defaultValue: 'Sold Profit',\n },\n [ContentId.SoldQty]: {\n id: ContentId.SoldQty,\n defaultValue: 'Sold Qty',\n },\n [ContentId.SoldQuantity]: {\n id: ContentId.SoldQuantity,\n defaultValue: 'Sold Quantity',\n },\n [ContentId.SoldSeats]: {\n id: ContentId.SoldSeats,\n defaultValue: 'Sold Seats',\n },\n [ContentId.SoldTicketCost]: {\n id: ContentId.SoldTicketCost,\n defaultValue: 'Sold Ticket Cost',\n },\n [ContentId.SoldTickets]: {\n id: ContentId.SoldTickets,\n defaultValue: 'Sold Tickets',\n },\n [ContentId.SoldToday]: {\n id: ContentId.SoldToday,\n defaultValue: 'Sold Today',\n },\n [ContentId.SoldLast7Days]: {\n id: ContentId.SoldLast7Days,\n defaultValue: 'Sold Last 7 Days',\n },\n [ContentId.SomethingWentWrong]: {\n id: ContentId.SomethingWentWrong,\n defaultValue: 'Something Went Wrong',\n },\n [ContentId.SomethingWentWrongTryAgain]: {\n id: ContentId.SomethingWentWrongTryAgain,\n defaultValue: 'Something went wrong. Please try again!',\n },\n [ContentId.Sort]: {\n id: ContentId.Sort,\n defaultValue: 'Sort',\n },\n [ContentId.SortBy]: {\n id: ContentId.SortBy,\n defaultValue: 'Sort By',\n },\n [ContentId.SortByDate]: {\n id: ContentId.SortByDate,\n defaultValue: EventSort.Date,\n },\n [ContentId.SortByTitle]: {\n id: ContentId.SortByTitle,\n defaultValue: EventSort.MainDisplay,\n },\n [ContentId.SortAtoZ]: {\n id: ContentId.SortAtoZ,\n defaultValue: 'Sort by: A to Z',\n },\n [ContentId.SortZtoA]: {\n id: ContentId.SortZtoA,\n defaultValue: 'Sort by: Z to A',\n },\n [ContentId.SortOldToNew]: {\n id: ContentId.SortOldToNew,\n defaultValue: 'Sort by: Oldest to Newest',\n },\n [ContentId.SortNewToOld]: {\n id: ContentId.SortNewToOld,\n defaultValue: 'Sort by: Newest to Oldest',\n },\n [ContentId.SpecialCharactersNotAllowed]: {\n id: ContentId.SpecialCharactersNotAllowed,\n defaultValue:\n 'Special characters (quotes, brackets) are not allowed for reporting tags',\n },\n [ContentId.SpecificSections]: {\n id: ContentId.SpecificSections,\n defaultValue: 'Specific sections',\n },\n [ContentId.Split]: {\n id: ContentId.Split,\n defaultValue: 'Split',\n },\n [ContentId.SplitListing]: {\n id: ContentId.SplitListing,\n defaultValue: 'Split Listings',\n },\n [ContentId.SplitType]: {\n id: ContentId.SplitType,\n defaultValue: 'Split Type',\n },\n [ContentId.SponsoredListings]: {\n id: ContentId.SponsoredListings,\n defaultValue: 'Sponsored Listings',\n },\n [ContentId.Sports]: {\n id: ContentId.Sports,\n defaultValue: 'Sports',\n },\n [ContentId.SpotifyPopularity]: {\n id: ContentId.SpotifyPopularity,\n defaultValue: 'Spotify Popularity',\n },\n [ContentId.Stakes]: {\n id: ContentId.Stakes,\n defaultValue: 'Stakes',\n },\n [ContentId.Standing]: {\n id: ContentId.Standing,\n defaultValue: 'Standing',\n },\n [ContentId.StandardDeviations]: {\n id: ContentId.StandardDeviations,\n defaultValue: 'Standard Deviations',\n },\n [ContentId.StateProvince]: {\n id: ContentId.StateProvince,\n defaultValue: 'State/Province',\n },\n [ContentId.Status]: {\n id: ContentId.Status,\n defaultValue: 'Status',\n },\n [ContentId.Stop]: {\n id: ContentId.Stop,\n defaultValue: 'Stop',\n },\n [ContentId.STR]: {\n id: ContentId.STR,\n defaultValue: 'STR',\n },\n [ContentId.StrategyName]: {\n id: ContentId.StrategyName,\n defaultValue: 'Strategy name',\n },\n [ContentId.String]: {\n id: ContentId.String,\n defaultValue: 'String',\n },\n [ContentId.StubhubEventIdKnown]: {\n id: ContentId.StubhubEventIdKnown,\n defaultValue: 'Is the Stubhub Event Id Known?',\n },\n [ContentId.StubHubLoginRequired]: {\n id: ContentId.StubHubLoginRequired,\n defaultValue:\n 'The user you entered needs a StubHub login to use this application.',\n },\n [ContentId.SubGenre]: {\n id: ContentId.SubGenre,\n defaultValue: 'Sub-Genre',\n },\n [ContentId.Subject]: {\n id: ContentId.Subject,\n defaultValue: 'Subject',\n },\n [ContentId.Succeeded]: {\n id: ContentId.Succeeded,\n defaultValue: 'Succeeded',\n },\n [ContentId.Success]: {\n id: ContentId.Success,\n defaultValue: 'Success',\n },\n [ContentId.Suggestions]: {\n id: ContentId.Suggestions,\n defaultValue: 'Suggestions',\n },\n [ContentId.Support]: {\n id: ContentId.Support,\n defaultValue: 'Support',\n },\n [ContentId.SupportCaseId]: {\n id: ContentId.SupportCaseId,\n defaultValue: 'Support Case Id',\n },\n [ContentId.SuppressFor1Hour]: {\n id: ContentId.SuppressFor1Hour,\n defaultValue: 'Suppress for one hour',\n },\n [ContentId.SimilarSections]: {\n id: ContentId.SimilarSections,\n defaultValue: 'Similar Sections',\n },\n [ContentId.SuspiciousPriceChange]: {\n id: ContentId.SuspiciousPriceChange,\n defaultValue: 'Suspicious Price Change',\n },\n [ContentId.SuspiciousPriceChangeWarning]: {\n id: ContentId.SuspiciousPriceChangeWarning,\n defaultValue:\n \"You've made a price change that differs more than 25% from the original price. Are you sure?\",\n },\n [ContentId.Summary]: {\n id: ContentId.Summary,\n defaultValue: 'Summary',\n },\n [ContentId.SwapTag]: {\n id: ContentId.SwapTag,\n defaultValue: 'Swap Tag',\n },\n [ContentId.SwapTagValues]: {\n id: ContentId.SwapTagValues,\n defaultValue: 'Swap Tag Values',\n },\n [ContentId.SwapTagValuesAllVisible]: {\n id: ContentId.SwapTagValuesAllVisible,\n defaultValue: 'Swap Tag Values for All Visible Listings',\n },\n [ContentId.SwapTagValuesSelected]: {\n id: ContentId.SwapTagValuesSelected,\n defaultValue: 'Swap Tag Values for Selected',\n },\n [ContentId.SwitchAccount]: {\n id: ContentId.SwitchAccount,\n defaultValue: 'Switch account',\n },\n [ContentId.SyncCenter]: {\n id: ContentId.SyncCenter,\n defaultValue: 'Sync Center',\n },\n [ContentId.SyncWithSystemSettings]: {\n id: ContentId.SyncWithSystemSettings,\n defaultValue: 'Sync with system settings',\n },\n [ContentId.System]: {\n id: ContentId.System,\n defaultValue: 'System',\n },\n [ContentId.Tag]: {\n id: ContentId.Tag,\n defaultValue: 'Tag',\n },\n [ContentId.Tags]: {\n id: ContentId.Tags,\n defaultValue: 'Tags',\n },\n [ContentId.TagsToIncludeInColumns]: {\n id: ContentId.TagsToIncludeInColumns,\n defaultValue: 'Tags to include in columns',\n },\n [ContentId.TakeMyParentListingAnd]: {\n id: ContentId.TakeMyParentListingAnd,\n defaultValue: 'Take my parent listing and:',\n },\n [ContentId.Target]: {\n id: ContentId.Target,\n defaultValue: 'Target',\n },\n [ContentId.TaxExempt]: {\n id: ContentId.TaxExempt,\n defaultValue: 'Tax Exempt',\n },\n [ContentId.TaxPaid]: {\n id: ContentId.TaxPaid,\n defaultValue: 'Tax Paid',\n },\n [ContentId.Text]: {\n id: ContentId.Text,\n defaultValue: 'Text',\n },\n [ContentId.ThanMineAnd]: {\n id: ContentId.ThanMineAnd,\n defaultValue: 'than mine, and',\n },\n [ContentId.Theatre]: {\n id: ContentId.Theatre,\n defaultValue: 'Theatre',\n },\n [ContentId.Theme]: {\n id: ContentId.Theme,\n defaultValue: 'Theme',\n },\n [ContentId.Then]: {\n id: ContentId.Then,\n defaultValue: 'then ',\n },\n [ContentId.ThisEvent]: {\n id: ContentId.ThisEvent,\n defaultValue: 'This Event',\n },\n [ContentId.ThisMonth]: {\n id: ContentId.ThisMonth,\n defaultValue: 'This Month',\n },\n [ContentId.ThisWasTaxExempt]: {\n id: ContentId.ThisWasTaxExempt,\n defaultValue: 'This was tax exempt',\n },\n [ContentId.ThisWeek]: {\n id: ContentId.ThisWeek,\n defaultValue: 'This Week',\n },\n [ContentId.ThisYear]: {\n id: ContentId.ThisYear,\n defaultValue: 'This Year',\n },\n [ContentId.Ticket]: {\n id: ContentId.Ticket,\n defaultValue: 'Ticket',\n },\n [ContentId.TicketGroup]: {\n id: ContentId.TicketGroup,\n defaultValue: 'Ticket Group',\n },\n [ContentId.TicketGroupHasErrors]: {\n id: ContentId.TicketGroupHasErrors,\n defaultValue: 'Ticket Group has one or more invalid inputs.',\n },\n [ContentId.TicketGroups]: {\n id: ContentId.TicketGroups,\n defaultValue: 'Ticket Groups',\n },\n [ContentId.TicketGroups_ViewAll_Details]: {\n id: ContentId.TicketGroups_ViewAll_Details,\n defaultValue: \"View all seller's ticket groups\",\n },\n [ContentId.TicketIdAlreadyInUsed]: {\n id: ContentId.TicketIdAlreadyInUsed,\n defaultValue: 'Warning - ticket ID is already used by another ticket.',\n },\n [ContentId.TicketmasterBarcodeTransferInstruction]: {\n id: ContentId.TicketmasterBarcodeTransferInstruction,\n defaultValue: 'Transfered via API',\n },\n [ContentId.TicketmasterBarcodeTransferViaOneTicketInstruction]: {\n id: ContentId.TicketmasterBarcodeTransferViaOneTicketInstruction,\n defaultValue: \"Transfer using 1Ticket's API ($1 per transfer)\",\n },\n [ContentId.TicketmasterBarcodeTransferViaTradeDeskInstruction]: {\n id: ContentId.TicketmasterBarcodeTransferViaTradeDeskInstruction,\n defaultValue: \"Transfer using Ticketmaster's API ($1 per transfer)\",\n },\n [ContentId.TicketmasterTradeDeskApi]: {\n id: ContentId.TicketmasterTradeDeskApi,\n defaultValue: 'Ticketmaster TradeDesk API',\n },\n [ContentId.Tickets]: {\n id: ContentId.Tickets,\n defaultValue: 'Tickets',\n },\n [ContentId.TicketsAvailable]: {\n id: ContentId.TicketsAvailable,\n defaultValue: 'Tickets Available',\n },\n [ContentId.TicketsListedAndSold]: {\n id: ContentId.TicketsListedAndSold,\n defaultValue: 'Tickets Listed & Sold',\n },\n [ContentId.TicketsOnPlatform]: {\n id: ContentId.TicketsOnPlatform,\n defaultValue: 'Tickets on Platform',\n },\n [ContentId.TicketsPurchased]: {\n id: ContentId.TicketsPurchased,\n defaultValue: 'Tickets Purchased',\n },\n [ContentId.TicketType]: {\n id: ContentId.TicketType,\n defaultValue: 'Ticket Type',\n },\n [ContentId.TicketTypePriority]: {\n id: ContentId.TicketTypePriority,\n defaultValue: 'Ticket Type Priority',\n },\n [ContentId.TicketTypePriorityForSelected]: {\n id: ContentId.TicketTypePriorityForSelected,\n defaultValue: 'Ticket Type Priority for Selected',\n },\n [ContentId.TicketTypePriorityForAll]: {\n id: ContentId.TicketTypePriorityForAll,\n defaultValue: 'Ticket Type Priority for All',\n },\n [ContentId.TicketUrlAlreadyInUsed]: {\n id: ContentId.TicketUrlAlreadyInUsed,\n defaultValue: 'Warning - URL is already used by another ticket.',\n },\n [ContentId.TileView]: {\n id: ContentId.TileView,\n defaultValue: 'Tile View',\n },\n [ContentId.Time]: {\n id: ContentId.Time,\n defaultValue: 'Time',\n },\n [ContentId.TitleName]: {\n id: ContentId.TitleName,\n defaultValue: 'Title/Name',\n },\n [ContentId.To]: {\n id: ContentId.To,\n defaultValue: 'To',\n },\n [ContentId.ToBeListed]: {\n id: ContentId.ToBeListed,\n defaultValue: 'To be listed',\n },\n [ContentId.ToBeDelisted]: {\n id: ContentId.ToBeDelisted,\n defaultValue: 'To be delisted',\n },\n [ContentId.ToDate]: {\n id: ContentId.ToDate,\n defaultValue: 'To Date',\n },\n [ContentId.Today]: {\n id: ContentId.Today,\n defaultValue: 'Today',\n },\n [ContentId.Total]: {\n id: ContentId.Total,\n defaultValue: 'Total',\n },\n /**\n * @deprecated Use `ContentId.TotalWebsitePrice`\n */\n [ContentId.TotalAllInPrice]: {\n id: ContentId.TotalAllInPrice,\n defaultValue: 'Total All In',\n },\n [ContentId.TotalATP]: {\n id: ContentId.TotalATP,\n defaultValue: 'Total ATP',\n },\n [ContentId.TotalCost]: {\n id: ContentId.TotalCost,\n defaultValue: 'Total Cost',\n },\n [ContentId.TotalDeliveryCharge]: {\n id: ContentId.TotalDeliveryCharge,\n defaultValue: 'Total Delivery Charge',\n },\n [ContentId.TotalDue]: {\n id: ContentId.TotalDue,\n defaultValue: 'Total Due',\n },\n [ContentId.TotalGrossProfit]: {\n id: ContentId.TotalGrossProfit,\n defaultValue: 'Total Gross Profit',\n },\n [ContentId.TotalListedQuantity]: {\n id: ContentId.TotalListedQuantity,\n defaultValue: 'Total Listed Quantity',\n },\n /**\n * @deprecated Use `ContentId.TotalProceeds`\n */\n [ContentId.TotalListPrice]: {\n id: ContentId.TotalListPrice,\n defaultValue: 'Total List Price',\n },\n [ContentId.TotalNetProceeds]: {\n id: ContentId.TotalNetProceeds,\n defaultValue: 'Total Net Proceeds',\n },\n [ContentId.TotalOriginal]: {\n id: ContentId.TotalOriginal,\n defaultValue: 'Total Original',\n },\n [ContentId.TotalPerTicketCost]: {\n id: ContentId.TotalPerTicketCost,\n defaultValue: 'Total Per-Ticket Cost',\n },\n [ContentId.TotalProceeds]: {\n id: ContentId.TotalProceeds,\n defaultValue: 'Total Proceeds',\n },\n [ContentId.TotalProfit]: {\n id: ContentId.TotalProfit,\n defaultValue: 'Total profit',\n },\n [ContentId.TotalQty]: {\n id: ContentId.TotalQty,\n defaultValue: 'Total Qty',\n },\n [ContentId.TotalQuantity]: {\n id: ContentId.TotalQuantity,\n defaultValue: 'Total Quantity',\n },\n [ContentId.TotalRemaining]: {\n id: ContentId.TotalRemaining,\n defaultValue: 'Total Remaining',\n },\n [ContentId.TotalSoldCost]: {\n id: ContentId.TotalSoldCost,\n defaultValue: 'Total Sold Cost',\n },\n [ContentId.TotalSoldQuantity]: {\n id: ContentId.TotalSoldQuantity,\n defaultValue: 'Total Sold Quantity',\n },\n [ContentId.TotalTicketCost]: {\n id: ContentId.TotalTicketCost,\n defaultValue: 'Total Ticket Cost',\n },\n [ContentId.TotalPurchaseCost]: {\n id: ContentId.TotalPurchaseCost,\n defaultValue: 'Total Purchase Cost',\n },\n [ContentId.TotalTicketEarnings]: {\n id: ContentId.TotalTicketEarnings,\n defaultValue: 'Total ticket earnings',\n },\n [ContentId.TotalTicketQuantity]: {\n id: ContentId.TotalTicketQuantity,\n defaultValue: 'Total Ticket Quantity',\n },\n [ContentId.TotalTickets]: {\n id: ContentId.TotalTickets,\n defaultValue: 'Total Tickets',\n },\n [ContentId.TotalUnitCost]: {\n id: ContentId.TotalUnitCost,\n defaultValue: 'Total Cost',\n },\n /**\n * @deprecated Use `ContentId.TotalUnsoldProceeds`\n */\n [ContentId.TotalUnsoldListPrice]: {\n id: ContentId.TotalUnsoldListPrice,\n defaultValue: 'Total Unsold List Price',\n },\n [ContentId.TotalUnsoldProceeds]: {\n id: ContentId.TotalUnsoldProceeds,\n defaultValue: 'Total Unsold Proceeds',\n },\n [ContentId.TotalUnsoldQuantity]: {\n id: ContentId.TotalUnsoldQuantity,\n defaultValue: 'Total Unsold Quantity',\n },\n [ContentId.TotalValueListed]: {\n id: ContentId.TotalValueListed,\n defaultValue: 'Total Value Listed',\n },\n [ContentId.TotalWebsitePrice]: {\n id: ContentId.TotalWebsitePrice,\n defaultValue: 'Total Website Price',\n },\n [ContentId.TradeDeskResetSummaryTitle]: {\n id: ContentId.TradeDeskResetSummaryTitle,\n defaultValue: 'Your Ticketmaster integration needs to be updated.',\n },\n [ContentId.TradeDeskResetSummaryBody]: {\n id: ContentId.TradeDeskResetSummaryBody,\n defaultValue:\n 'Ticketmaster recently changed their account management and token generation process for the TradeDesk API. Take the following steps to ensure your Ticketmaster integration continues to work.',\n },\n [ContentId.TradeDeskResetInstructionsStep1]: {\n id: ContentId.TradeDeskResetInstructionsStep1,\n defaultValue: 'Request password reset code for your TradeDesk account:',\n },\n [ContentId.TradeDeskResetInstructionsStep2]: {\n id: ContentId.TradeDeskResetInstructionsStep2,\n defaultValue: 'Enter reset code received via your email:',\n },\n [ContentId.TradeDeskResetInstructionsStep3]: {\n id: ContentId.TradeDeskResetInstructionsStep3,\n defaultValue: 'Renew your TradeDesk API access token:',\n },\n [ContentId.TradeDeskResetInstructionsStep4]: {\n id: ContentId.TradeDeskResetInstructionsStep4,\n defaultValue: \"Done! We'll handle the rest.\",\n },\n [ContentId.Transactions]: {\n id: ContentId.Transactions,\n defaultValue: 'Transactions',\n },\n [ContentId.Transfer]: {\n id: ContentId.Transfer,\n defaultValue: 'Transfer',\n },\n [ContentId.TransferAccepted]: {\n id: ContentId.TransferAccepted,\n defaultValue: 'Transfer Accepted',\n },\n [ContentId.TransferExpired]: {\n id: ContentId.TransferExpired,\n defaultValue: 'Transfer Expired',\n },\n [ContentId.TransferId]: {\n id: ContentId.TransferId,\n defaultValue: 'Transfer Id',\n },\n [ContentId.TransferIdNote]: {\n id: ContentId.TransferIdNote,\n defaultValue:\n 'Use if you purchased resale tickets. Specify where the tickets will get delivered to so you can find them later. Note: you might not know your Transfer Id until the transfer has happened.',\n },\n [ContentId.TransferFrom]: {\n id: ContentId.TransferFrom,\n defaultValue: 'Transfer From',\n },\n [ContentId.TransferProofId]: {\n id: ContentId.TransferProofId,\n defaultValue: 'Transfer or Invoice ID',\n },\n [ContentId.TransferSent]: {\n id: ContentId.TransferSent,\n defaultValue: 'Transfer Sent',\n },\n [ContentId.TransferTicketsIns]: {\n id: ContentId.TransferTicketsIns,\n defaultValue:\n 'Transfer tickets to your buyer & take a screenshot of the confirmation',\n },\n [ContentId.TransferTicketsChoice]: {\n id: ContentId.TransferTicketsChoice,\n defaultValue:\n 'How do you want to prove that you have transferred tickets to the buyer?',\n },\n [ContentId.TransferTo]: {\n id: ContentId.TransferTo,\n defaultValue: 'Transfer To',\n },\n [ContentId.TrueFalse]: {\n id: ContentId.TrueFalse,\n defaultValue: 'True/False',\n },\n [ContentId.TurnOffReporting]: {\n id: ContentId.TurnOffReporting,\n defaultValue: 'Turn off reporting',\n },\n [ContentId.TurnOffReportingWarning]: {\n id: ContentId.TurnOffReportingWarning,\n defaultValue:\n 'One or more tags are displayed in some of the tables but being turned off. Are you sure?',\n },\n [ContentId.Type]: {\n id: ContentId.Type,\n defaultValue: 'Type',\n },\n [ContentId.UnableToRetrieveBuyersInfo]: {\n id: ContentId.UnableToRetrieveBuyersInfo,\n defaultValue: \"Unable to retrieve buyer's information\",\n },\n [ContentId.Unbroadcast]: {\n id: ContentId.Unbroadcast,\n defaultValue: 'Unbroadcast',\n },\n [ContentId.UnbroadcastAll]: {\n id: ContentId.UnbroadcastAll,\n defaultValue: 'Unbroadcast All',\n },\n [ContentId.UnbroadcastAllVisible]: {\n id: ContentId.UnbroadcastAllVisible,\n defaultValue: 'Unbroadcast All Visible Listings',\n },\n [ContentId.Unbroadcasted]: {\n id: ContentId.Unbroadcasted,\n defaultValue: 'Unbroadcasted',\n },\n [ContentId.Uncategorized]: {\n id: ContentId.Uncategorized,\n defaultValue: 'Uncategorized',\n },\n [ContentId.Undeliverable]: {\n id: ContentId.Undeliverable,\n defaultValue: 'Undeliverable',\n },\n [ContentId.UndercutAmount]: {\n id: ContentId.UndercutAmount,\n defaultValue: 'Undercut Amount',\n },\n [ContentId.UndercutMode]: {\n id: ContentId.UndercutMode,\n defaultValue: 'Undercut Mode',\n },\n [ContentId.UndercutAbsoluteAmount]: {\n id: ContentId.UndercutAbsoluteAmount,\n defaultValue: 'Undercut Absolute Amount',\n },\n [ContentId.UndercutAbsoluteOrRelativeAmountMustBeSetError]: {\n id: ContentId.UndercutAbsoluteOrRelativeAmountMustBeSetError,\n defaultValue: 'Absolute or Relative Amount must be set',\n },\n [ContentId.UnderCutModePrompt]: {\n id: ContentId.UnderCutModePrompt,\n defaultValue: 'How to determine price?',\n },\n [ContentId.UndercutRelativeAmount]: {\n id: ContentId.UndercutRelativeAmount,\n defaultValue: 'Undercut Relative Amount',\n },\n [ContentId.Ungroup]: {\n id: ContentId.Ungroup,\n defaultValue: 'Ungroup',\n },\n [ContentId.UngroupListingsAll]: {\n id: ContentId.UngroupListingsAll,\n defaultValue: 'Ungroup All Listings',\n },\n [ContentId.UngroupListingsAllVisible]: {\n id: ContentId.UngroupListingsAllVisible,\n defaultValue: 'Ungroup All Visible Listings',\n },\n [ContentId.UngroupListingsConfirmation]: {\n id: ContentId.UngroupListingsConfirmation,\n defaultValue:\n 'This action will remove all grouped listings from their groups and any resulting empty group will be deleted. Are you sure?',\n },\n [ContentId.UngroupListingsSelected]: {\n id: ContentId.UngroupListingsSelected,\n defaultValue: 'Ungroup Selected Listings',\n },\n [ContentId.UniqueId]: {\n id: ContentId.UniqueId,\n defaultValue: 'Unique Id',\n },\n [ContentId.UnitCost]: {\n id: ContentId.UnitCost,\n defaultValue: 'Unit Cost',\n },\n [ContentId.Unpaid]: {\n id: ContentId.Unpaid,\n defaultValue: PointOfSalePaymentState.Unpaid,\n },\n [ContentId.UnableToProcess]: {\n id: ContentId.UnableToProcess,\n defaultValue: 'Unable To Process',\n },\n [ContentId.Unread]: {\n id: ContentId.Unread,\n defaultValue: 'Unread',\n },\n [ContentId.UnbroadcastSelected]: {\n id: ContentId.UnbroadcastSelected,\n defaultValue: 'Unbroadcast Selected',\n },\n [ContentId.UnsavedChanges]: {\n id: ContentId.UnsavedChanges,\n defaultValue: 'Unsaved Changes',\n },\n [ContentId.UnsavedChangesWarning]: {\n id: ContentId.UnsavedChangesWarning,\n defaultValue: 'Leaving now will lose your progress. Continue?',\n },\n [ContentId.Unset]: {\n id: ContentId.Unset,\n defaultValue: 'Unset',\n },\n [ContentId.UnsoldCost]: {\n id: ContentId.UnsoldCost,\n defaultValue: 'Unsold Cost',\n },\n [ContentId.UnsoldQty]: {\n id: ContentId.UnsoldQty,\n defaultValue: 'Unsold Qty',\n },\n [ContentId.UnsoldQuantity]: {\n id: ContentId.UnsoldQuantity,\n defaultValue: 'Unsold Quantity',\n },\n [ContentId.UnsoldTickets]: {\n id: ContentId.UnsoldTickets,\n defaultValue: 'Unsold Tickets',\n },\n [ContentId.UpdateCurrency]: {\n id: ContentId.UpdateCurrency,\n defaultValue: 'Update Currency',\n },\n [ContentId.UpdatePurchaseCurrencyWarning]: {\n id: ContentId.UpdatePurchaseCurrencyWarning,\n defaultValue:\n \"Updating currency won't trigger automatic conversion. Please adjust amounts manually if needed. Continue?\",\n },\n [ContentId.UpdateSeatingInformation]: {\n id: ContentId.UpdateSeatingInformation,\n defaultValue: 'Update seating information',\n },\n [ContentId.Upload]: {\n id: ContentId.Upload,\n defaultValue: 'Upload',\n },\n [ContentId.UploadBarcodes]: {\n id: ContentId.UploadBarcodes,\n defaultValue: 'Upload Barcodes',\n },\n [ContentId.UploadETickets]: {\n id: ContentId.UploadETickets,\n defaultValue: 'Upload E-Tickets',\n },\n [ContentId.UploadFailureMessage]: {\n id: ContentId.UploadFailureMessage,\n defaultValue: 'Upload failed',\n },\n [ContentId.UploadProof]: {\n id: ContentId.UploadProof,\n defaultValue: 'Upload Proof',\n },\n [ContentId.UploadProofOfPurchase]: {\n id: ContentId.UploadProofOfPurchase,\n defaultValue: 'Upload Proof of Purchase',\n },\n [ContentId.UploadQRCodes]: {\n id: ContentId.UploadQRCodes,\n defaultValue: 'Upload QR Codes',\n },\n [ContentId.UploadSeatScoreFile]: {\n id: ContentId.UploadSeatScoreFile,\n defaultValue: 'Upload Seat Score File',\n },\n [ContentId.UploadPurchaseFile]: {\n id: ContentId.UploadPurchaseFile,\n defaultValue: 'Upload Purchase File',\n },\n [ContentId.UploadTicketUrls]: {\n id: ContentId.UploadTicketUrls,\n defaultValue: 'Upload Ticket URLs',\n },\n [ContentId.UploadTicketIds]: {\n id: ContentId.UploadTicketIds,\n defaultValue: 'Upload Ticket IDs',\n },\n [ContentId.UrlsToAcceptTickets]: {\n id: ContentId.UrlsToAcceptTickets,\n defaultValue: 'URLs where the buyer accepts the tickets.',\n },\n [ContentId.UseExistingRoleAsTemplateTitle]: {\n id: ContentId.UseExistingRoleAsTemplateTitle,\n defaultValue: 'Use existing role as template',\n },\n [ContentId.UseExistingRoleAsTemplateExplanation]: {\n id: ContentId.UseExistingRoleAsTemplateExplanation,\n defaultValue:\n 'Use an existing role as a template for your new role. Customerize and modify after',\n },\n [ContentId.UserManagement]: {\n id: ContentId.UserManagement,\n defaultValue: 'User Management',\n },\n [ContentId.UserNotFound]: {\n id: ContentId.UserNotFound,\n defaultValue: 'User not found',\n },\n [ContentId.Users]: {\n id: ContentId.Users,\n defaultValue: 'Users',\n },\n [ContentId.UsersWithAccess]: {\n id: ContentId.UsersWithAccess,\n defaultValue: 'Users with access',\n },\n [ContentId.UseThisAnswerForNext24Hours]: {\n id: ContentId.UseThisAnswerForNext24Hours,\n defaultValue: 'Use this answer for the next 24 hours',\n },\n [ContentId.Value]: {\n id: ContentId.Value,\n defaultValue: 'Value',\n },\n [ContentId.ValueDoesNotSatisfyType]: {\n id: ContentId.ValueDoesNotSatisfyType,\n defaultValue: 'Value does not satisfy type.',\n },\n [ContentId.ValueType]: {\n id: ContentId.ValueType,\n defaultValue: 'Value Type',\n },\n [ContentId.Variables]: {\n id: ContentId.Variables,\n defaultValue: 'Variables',\n },\n [ContentId.VariablesToIncludeInColumns]: {\n id: ContentId.VariablesToIncludeInColumns,\n defaultValue: 'Variables to include in columns',\n },\n [ContentId.Vendor]: {\n id: ContentId.Vendor,\n defaultValue: 'Vendor',\n },\n [ContentId.VendorAccount]: {\n id: ContentId.VendorAccount,\n defaultValue: 'Vendor Account',\n },\n [ContentId.VendorAccounts]: {\n id: ContentId.VendorAccounts,\n defaultValue: 'Vendor Accounts',\n },\n [ContentId.Vendors]: {\n id: ContentId.Vendors,\n defaultValue: 'Vendors',\n },\n [ContentId.Venue]: {\n id: ContentId.Venue,\n defaultValue: 'Venue',\n },\n [ContentId.VenueConfigs]: {\n id: ContentId.VenueConfigs,\n defaultValue: 'Venue Configurations',\n },\n [ContentId.VenueMapWelcomeMessage]: {\n id: ContentId.VenueMapWelcomeMessage,\n defaultValue: 'Welcome to StubHub Active Maps',\n },\n [ContentId.VenueName]: {\n id: ContentId.VenueName,\n defaultValue: 'Venue Name',\n },\n [ContentId.Venues]: {\n id: ContentId.Venues,\n defaultValue: EventGroupingType.Venue,\n },\n [ContentId.VenueWideQualityScore]: {\n id: ContentId.VenueWideQualityScore,\n defaultValue: 'Venue Wide - Quality Score',\n },\n [ContentId.VenueWideInSectionPriority]: {\n id: ContentId.VenueWideInSectionPriority,\n defaultValue: 'Venue Wide - In-section Priority',\n },\n [ContentId.VenueWideQualityScoreSameZone]: {\n id: ContentId.VenueWideQualityScoreSameZone,\n defaultValue: 'Venue Wide - Quality Score (Same Zone)',\n },\n [ContentId.VerifyBuyerInfo]: {\n id: ContentId.VerifyBuyerInfo,\n defaultValue:\n 'Verify the name and email of the buyer you will transfer the tickets to.',\n },\n [ContentId.VeryAggressive]: {\n id: ContentId.VeryAggressive,\n defaultValue: 'Very Aggressive (1sd)',\n },\n [ContentId.View]: {\n id: ContentId.View,\n defaultValue: 'View',\n },\n [ContentId.ViewAllAccessiblePermissions]: {\n id: ContentId.ViewAllAccessiblePermissions,\n defaultValue: 'View all accessible permissions',\n },\n [ContentId.ViewComps]: {\n id: ContentId.ViewComps,\n defaultValue: 'View Comps',\n },\n [ContentId.ViewDetails]: {\n id: ContentId.ViewDetails,\n defaultValue: 'View Details',\n },\n [ContentId.ViewBarcodes]: {\n id: ContentId.ViewBarcodes,\n defaultValue: 'View Barcodes',\n },\n [ContentId.ViewDuplicates]: {\n id: ContentId.ViewDuplicates,\n defaultValue: 'View Duplicates',\n },\n [ContentId.ViewEditabilityDescription]: {\n id: ContentId.ViewEditabilityDescription,\n defaultValue: 'User can see the filter has been set, but cannot edit',\n },\n [ContentId.ViewEmailDetails]: {\n id: ContentId.ViewEmailDetails,\n defaultValue: 'View email details',\n },\n [ContentId.ViewETickets]: {\n id: ContentId.ViewETickets,\n defaultValue: 'View E-Tickets',\n },\n [ContentId.ViewETicketUrls]: {\n id: ContentId.ViewETicketUrls,\n defaultValue: 'View E-Ticket URLs',\n },\n [ContentId.ViewEventMap]: {\n id: ContentId.ViewEventMap,\n defaultValue: 'View event map',\n },\n [ContentId.ViewInventory]: {\n id: ContentId.ViewInventory,\n defaultValue: 'View Inventory',\n },\n [ContentId.ViewPurchase]: {\n id: ContentId.ViewPurchase,\n defaultValue: 'View Purchase',\n },\n [ContentId.ViewQRCodes]: {\n id: ContentId.ViewQRCodes,\n defaultValue: 'View QR Codes',\n },\n [ContentId.ViewSale]: {\n id: ContentId.ViewSale,\n defaultValue: 'View Sale',\n },\n [ContentId.ViewSales]: {\n id: ContentId.ViewSales,\n defaultValue: 'View Sales',\n },\n [ContentId.ViewTicketIds]: {\n id: ContentId.ViewTicketIds,\n defaultValue: 'View Ticket IDs',\n },\n [ContentId.ViewTransferProof]: {\n id: ContentId.ViewTransferProof,\n defaultValue: 'View Transfer Proof',\n },\n [ContentId.ViewTransferTicket]: {\n id: ContentId.ViewTransferTicket,\n defaultValue: 'View Transfer Ticket',\n },\n [ContentId.ViewWallet]: {\n id: ContentId.ViewWallet,\n defaultValue: 'View Wallet',\n },\n [ContentId.ViewZoneMap]: {\n id: ContentId.ViewZoneMap,\n defaultValue: 'View zone map',\n },\n [ContentId.Visibility]: {\n id: ContentId.Visibility,\n defaultValue: 'Visibility',\n },\n [ContentId.Visible]: {\n id: ContentId.Visible,\n defaultValue: 'Visible',\n },\n [ContentId.Void]: {\n id: ContentId.Void,\n defaultValue: 'Void',\n },\n [ContentId.VoidBulkPurchaseWarning]: {\n id: ContentId.VoidBulkPurchaseWarning,\n defaultValue:\n 'Are you sure you want to void the selected purchase order(s)? This action is reversible. Associated sales will be deallocated and moved to Pending Confirmation.',\n },\n [ContentId.VoidPurchase]: {\n id: ContentId.VoidPurchase,\n defaultValue: 'Void Purchase',\n },\n [ContentId.VoidPurchaseDescription]: {\n id: ContentId.VoidPurchaseDescription,\n defaultValue:\n 'Use if the purchase was created in error. Related tickets and payments will be removed.',\n },\n [ContentId.VoidSinglePurchaseWarning]: {\n id: ContentId.VoidSinglePurchaseWarning,\n defaultValue:\n 'Are you sure you want to void this purchase order? This action is reversible. Associated sales will be deallocated and moved to Pending Confirmation.',\n },\n [ContentId.Wallet]: {\n id: ContentId.Wallet,\n defaultValue: 'Wallet',\n },\n [ContentId.WasTaxExempt]: {\n id: ContentId.WasTaxExempt,\n defaultValue: 'Was Tax Exempt',\n },\n [ContentId.Wasted]: {\n id: ContentId.Wasted,\n defaultValue: 'Wasted',\n },\n [ContentId.WastedCost]: {\n id: ContentId.WastedCost,\n defaultValue: 'Wasted Cost',\n },\n [ContentId.WastedQty]: {\n id: ContentId.WastedQty,\n defaultValue: 'Wasted Qty',\n },\n [ContentId.WastedTickets]: {\n id: ContentId.WastedTickets,\n defaultValue: 'Wasted Tickets',\n },\n [ContentId.WasteSale]: {\n id: ContentId.WasteSale,\n defaultValue: 'Waste Sale',\n },\n [ContentId.WasteTickets]: {\n id: ContentId.WasteTickets,\n defaultValue: 'Waste Tickets',\n },\n [ContentId.WasteUnsoldTickets]: {\n id: ContentId.WasteUnsoldTickets,\n defaultValue: 'Waste unsold tickets',\n },\n [ContentId.Weather]: {\n id: ContentId.Weather,\n defaultValue: 'Wasted Tickets',\n },\n [ContentId.Webhook_View_Details]: {\n id: ContentId.Webhook_View_Details,\n defaultValue: 'Ability to view Webhook',\n },\n [ContentId.Webhook_Create_Details]: {\n id: ContentId.Webhook_Create_Details,\n defaultValue: 'Ability to create Webhook',\n },\n [ContentId.Webhook_Edit_Details]: {\n id: ContentId.Webhook_Edit_Details,\n defaultValue: 'Ability to edit Webhook',\n },\n [ContentId.Website]: {\n id: ContentId.Website,\n defaultValue: 'Website',\n },\n [ContentId.WebsiteFloor]: {\n id: ContentId.WebsiteFloor,\n defaultValue: 'Website Price Floor',\n },\n [ContentId.WebsiteCeiling]: {\n id: ContentId.WebsiteCeiling,\n defaultValue: 'Website Price Ceiling',\n },\n [ContentId.WebsitePrice]: {\n id: ContentId.WebsitePrice,\n defaultValue: 'Website Price',\n },\n [ContentId.Week]: {\n id: ContentId.Week,\n defaultValue: 'Week',\n },\n [ContentId.WeekOfYear]: {\n id: ContentId.WeekOfYear,\n defaultValue: 'Week of Year',\n },\n [ContentId.Weeks]: {\n id: ContentId.Weeks,\n defaultValue: 'Weeks',\n },\n [ContentId.WhatIsAPlacholder]: {\n id: ContentId.WhatIsAPlacholder,\n defaultValue: 'What is a Placeholder.',\n },\n [ContentId.WhatIsASeatSaver]: {\n id: ContentId.WhatIsASeatSaver,\n defaultValue: 'What is a Seat Saver?',\n },\n [ContentId.WhatSeatToFulfill]: {\n id: ContentId.WhatSeatToFulfill,\n defaultValue: 'What seats do you want to fulfill with this order?',\n },\n [ContentId.WhatsNew]: {\n id: ContentId.WhatsNew,\n defaultValue: \"What's New\",\n },\n [ContentId.WhatTicketsDidYouBuy]: {\n id: ContentId.WhatTicketsDidYouBuy,\n defaultValue: 'What tickets did you buy?',\n },\n [ContentId.WhenAndWhere]: {\n id: ContentId.WhenAndWhere,\n defaultValue: 'When & Where',\n },\n [ContentId.WhereTicketsWerePurchased]: {\n id: ContentId.WhereTicketsWerePurchased,\n defaultValue: 'Where did you buy your tickets?',\n },\n [ContentId.WhenWhereWho]: {\n id: ContentId.WhenWhereWho,\n defaultValue: 'When, Where, Who',\n },\n [ContentId.WholeNumber]: {\n id: ContentId.WholeNumber,\n defaultValue: 'Whole Number',\n },\n [ContentId.Widgets]: {\n id: ContentId.Widgets,\n defaultValue: 'Widgets',\n },\n [ContentId.WillCall]: {\n id: ContentId.WillCall,\n defaultValue: 'Will Call',\n },\n [ContentId.WitheldFunds]: {\n id: ContentId.WitheldFunds,\n defaultValue: 'Witheld Funds',\n },\n [ContentId.Worse]: {\n id: ContentId.Worse,\n defaultValue: 'worse',\n },\n [ContentId.WrongTicketsReturnShippingCost]: {\n id: ContentId.WrongTicketsReturnShippingCost,\n defaultValue: 'Wrong Tickets Return Shipping Cost',\n },\n [ContentId.WrongTrackingNumber]: {\n id: ContentId.WrongTrackingNumber,\n defaultValue: 'Wrong Tracking Number',\n },\n [ContentId.Yes]: {\n id: ContentId.Yes,\n defaultValue: 'Yes',\n },\n [ContentId.YesToSome]: {\n id: ContentId.YesToSome,\n defaultValue: 'Yes to Some',\n },\n [ContentId.YourAutoPriceResults]: {\n id: ContentId.YourAutoPriceResults,\n defaultValue: 'Your auto price results',\n },\n [ContentId.YourBuyer]: {\n id: ContentId.YourBuyer,\n defaultValue: 'Your Buyer',\n },\n [ContentId.YoureCheaper]: {\n id: ContentId.YoureCheaper,\n defaultValue: \"You're cheaper\",\n },\n [ContentId.YoureMoreExpensive]: {\n id: ContentId.YoureMoreExpensive,\n defaultValue: \"You're more expensive\",\n },\n [ContentId.YourListing]: {\n id: ContentId.YourListing,\n defaultValue: 'Your Listing',\n },\n [ContentId.YourSale]: {\n id: ContentId.YourSale,\n defaultValue: 'Your Sale',\n },\n [ContentId.YourSaleMetricsPart1]: {\n id: ContentId.YourSaleMetricsPart1,\n defaultValue: 'Your sales stats for',\n },\n [ContentId.YourStats]: {\n id: ContentId.YourStats,\n defaultValue: 'Your Stats',\n },\n [ContentId.YourSummaryMessage]: {\n id: ContentId.YourSummaryMessage,\n defaultValue: 'Below is your summary for today',\n },\n [ContentId.YourTickets]: {\n id: ContentId.YourTickets,\n defaultValue: 'Your Tickets',\n },\n [ContentId.Zone]: {\n id: ContentId.Zone,\n defaultValue: 'Zone',\n },\n [ContentId.ZoneMap]: {\n id: ContentId.ZoneMap,\n defaultValue: 'Zone Map',\n },\n [ContentId.ZoneMapDescription]: {\n id: ContentId.ZoneMapDescription,\n defaultValue:\n \"The Zone map is used when comping and grouping listings. Use StubHub's default or configure your own zone map below\",\n },\n [ContentId.Zones]: {\n id: ContentId.Zones,\n defaultValue: 'Zones',\n },\n [ContentId.Zoom]: {\n id: ContentId.Zoom,\n defaultValue: 'Zoom',\n },\n [ContentId.ZoomInstruction]: {\n id: ContentId.ZoomInstruction,\n defaultValue: 'Pinch or double tap to zoom.',\n },\n [ContentId.ZtoA]: {\n id: ContentId.ZtoA,\n defaultValue: 'Z to A',\n },\n [ContentId.ZtoAArrow]: {\n id: ContentId.ZtoAArrow,\n defaultValue: 'ZA ↓',\n },\n};\n","// Please keep this enum in alphabetical order\nexport enum FormatContentId {\n ActivityLogChangeFromTo = 'cid$#3070963#',\n ActivityLogChangeFrom = 'cid$#3201701#',\n ActivityLogChangeTo = 'cid$#3201702#',\n AddAnother = 'cid$#3408221#',\n AndXMore = 'cid$#2982718#',\n ApplyFilterToReduceCountsToSeeData = 'cid$#3543237#',\n ApplyToAllEventsConfirmation = 'cid$#3361820#',\n BulkEditMaxItemPreviewDisplayMessage = 'cid$#3811638#',\n BulkEditSkippedItemsPrompt = 'cid$#3811639#',\n ClassifyAs = 'cid$#3373032#',\n CompletedNSecondsAgo = 'cid$#____CompletedNSecondsAgo#',\n CompletedNMinutesAgo = 'cid$#____CompletedNMinutesAgo#',\n CompletedNHoursAgo = 'cid$#____CompletedNHoursAgo#',\n CopyOf = 'cid$#3512120#',\n CouldNotFindListingId = 'cid$#3037606#',\n CouldNotFindOrderId = 'cid$#3037607#',\n CouldNotFindSaleId = 'cid$#2977369#',\n DaysBeforeEvent = 'cid$#3266231#',\n DuplicateListingDetails = 'cid$#3543238#',\n DuplicatingSeats = 'cid$#2975370#',\n EmailAddressFrom = 'cid$#3261278#',\n EmailAddressTo = 'cid$#3261279#',\n EmptyContent = '' /* Used for useContent with an optional content-id */,\n EventsSelected = 'cid$#3361821#',\n ExtraBarcodes = 'cid$#2972953#',\n ExtraTicketIds = 'cid$#3389420#',\n ExtraTicketUrls = 'cid$#3389421#',\n Filled = 'cid$#2971998#',\n FirstTimeVenueEventSetup = 'cid$#3811640#',\n FulfilledExternalMarketplace = 'cid$#3070964#',\n GoTo = 'cid$#3172497#',\n HurdleN = 'cid$#3811641#',\n InNDays = 'cid$#2993455#',\n InNHours = 'cid$#3008672#',\n InNMinutes = 'cid$#3008673#',\n InvalidTagCharacter = 'cid$#3373033#',\n ItemsSelected = 'cid$#3195388#',\n LastNDays = 'cid$#2992158#',\n LastNHours = 'cid$#3008674#',\n LastNMinutes = 'cid$#3008675#',\n LastNMonths = 'cid$#3578114#',\n ListingInUKNotification = 'cid$#3172498',\n LoadingListingId = 'cid$#3037602#',\n LoadingOrderId = 'cid$#3037604#',\n LoadingSaleId = 'cid$#2983916#',\n Margin = 'cid$#2971997#',\n MarketplaceListings = 'cid$#_____MarketplaceListings#',\n MaxAllowedFileSizeMb = 'cid$#3678672#',\n MaxReportSizeWarningMessage = 'cid$#3678673#',\n MedianPriceWarning = 'cid$#____MedianPriceWarning#',\n MinDiscountContent = 'cid$#____MinDiscountContent#',\n MissingBarcodes = 'cid$#2972954#',\n MissingTicketIds = 'cid$#3389422#',\n MissingTicketUrls = 'cid$#3389423#',\n NCharactersRemaining = 'cid$#3512121#',\n NCompleted = 'cid$#3373034#',\n NFailed = 'cid$#3373035#',\n NIncreaseBy = 'cid$#3172500#',\n NDays = 'cid$#3008676#',\n NDaysBefore = 'cid$#3008669#',\n NHours = 'cid$#3008677#',\n NHoursBefore = 'cid$#3008670#',\n NMinutes = 'cid$#3008678#',\n NMinutesBefore = 'cid$#3008671#',\n NoDataAvailable = 'cid$#3045423#',\n NotificationTypeListingBroadcastFailed = 'cid$#3180468#',\n NotificationTypeListingUnbroadcastFailed = 'cid$#3180475#',\n NotificationTypeListingUpdateAllInPriceFailed = 'cid$#3180469#',\n NotificationTypeListingUpdateInHandDateFailed = 'cid$#3180470#',\n NotificationTypeListingUpdateSplitTypeFailed = 'cid$#3180471#',\n NotificationTypeListingUpdateTicketTypeFailed = 'cid$#3180472#',\n NotificationTypeListingUpdateUnitNetProceedsFailed = 'cid$#3180474#',\n NotificationTypeSellerSupportCaseNewReply = 'cid$#3180476#',\n NotUnique = 'cid$#3110513#',\n NSelected = 'cid$#____NSelected#',\n NSelectedSections = 'cid$#3389424#',\n NUpdated = 'cid$#3811642#',\n NWarnings = 'cid$#3678674#',\n OnlyForMarketplaces = 'cid$#3811643#',\n PacksOf = 'cid$#3543239#',\n PageNum = 'cid$#2975357#',\n PercentageRelativeTo = 'cid$#3432394#',\n ProofOfPurchasedRequiredDetailMessage = 'cid$#3512122#',\n RequestState = 'cid$#3512123#',\n Row = 'cid$#3261280#',\n RowRangeInputError = 'cid$#3811644#',\n SalesForEditTickets = 'cid$#3678675#',\n SalesForRemovedTickets = 'cid$#3678676#',\n SearchingForListingId = 'cid$#3037603#',\n SearchingForOrderId = 'cid$#3037605#',\n SearchingForSaleId = 'cid$#2977368#',\n SearchItem = 'cid$#2973458#',\n SearchResultPick = 'cid$#2983917#',\n SeatAllocationChangeWarning = 'cid$#3089846#',\n SeatNumber = 'cid$#2972034#',\n Section = 'cid$#3261281#',\n ShareQuoted = 'cid$#3432395#',\n SwitchTo = 'cid$#3811645#',\n TakeMeThereInSeconds = 'cid$#3543240#',\n TheseAreThePastSalesOnTheWebsiteAndApp = 'cid$#3432396#',\n TicketCount = 'cid$#3261282#',\n TicketNumber = 'cid$#2975378#',\n TicketPricePercentile = 'cid$#3811646#',\n TicketTypePriority = 'cid$#3243235#',\n TransactionsLastNHour = 'cid$#____TransactionsLastNHour#',\n TransactionsLastNDay = 'cid$#____TransactionsLastNDay#',\n Uploading = 'cid$#2975358#',\n UpToXTagsCanBeIncluded = 'cid$#3408222#',\n UrlNumber = 'cid$#2973462#',\n VisitsLastNHour = 'cid$#____VisitsLastNHour#',\n VisitsLastNDay = 'cid$#____VisitsLastNDay#',\n WelcomeUserMessage = 'cid$#2992157#',\n WillDeliverToSecondaryAccount = 'cid$#3261283#',\n YourSaleMetricsPart2 = 'cid$#2992159#',\n YourSaleWithStatus = 'cid$#2992160#',\n}\n","import { ContentIdAndDefaultValue } from 'src/contexts/ContentContext';\n\nimport { FormatContentId } from './formatContentId';\n\n// Please keep this map in alphabetical order\nexport const FormatContentIds: Record<\n FormatContentId,\n ContentIdAndDefaultValue\n> = {\n [FormatContentId.ActivityLogChangeFromTo]: {\n id: FormatContentId.ActivityLogChangeFromTo,\n defaultValue: '{0} changed from {1} to {2}',\n },\n [FormatContentId.ActivityLogChangeFrom]: {\n id: FormatContentId.ActivityLogChangeFrom,\n defaultValue: '{0} changed from {1} to nothing.',\n },\n [FormatContentId.ActivityLogChangeTo]: {\n id: FormatContentId.ActivityLogChangeTo,\n defaultValue: '{0} changed to {1}',\n },\n [FormatContentId.AddAnother]: {\n id: FormatContentId.AddAnother,\n defaultValue: 'Add Another {0}',\n },\n [FormatContentId.AndXMore]: {\n id: FormatContentId.AndXMore,\n defaultValue: '& {0} more',\n },\n [FormatContentId.ApplyFilterToReduceCountsToSeeData]: {\n id: FormatContentId.ApplyFilterToReduceCountsToSeeData,\n defaultValue:\n 'Your current filter returns more than {0} items. Please select additional filters to view your data.',\n },\n [FormatContentId.ApplyToAllEventsConfirmation]: {\n id: FormatContentId.ApplyToAllEventsConfirmation,\n defaultValue:\n 'Do you want to apply the heat map to all {0} {1} events at {2} or only to this event?',\n },\n [FormatContentId.BulkEditMaxItemPreviewDisplayMessage]: {\n id: FormatContentId.BulkEditMaxItemPreviewDisplayMessage,\n defaultValue: 'Only a maximum of {0} of {1} is displayed for preview.',\n },\n [FormatContentId.BulkEditSkippedItemsPrompt]: {\n id: FormatContentId.BulkEditSkippedItemsPrompt,\n defaultValue:\n '{0} items were skipped because their associated entities were changed. Click Retry to try editing them again.',\n },\n [FormatContentId.ClassifyAs]: {\n id: FormatContentId.ClassifyAs,\n defaultValue: 'Classify as {0}',\n },\n [FormatContentId.CompletedNSecondsAgo]: {\n id: FormatContentId.CompletedNSecondsAgo,\n defaultValue: 'Completed {0} seconds ago.',\n },\n [FormatContentId.CompletedNMinutesAgo]: {\n id: FormatContentId.CompletedNMinutesAgo,\n defaultValue: 'Completed {0} minutes ago.',\n },\n [FormatContentId.CompletedNHoursAgo]: {\n id: FormatContentId.CompletedNHoursAgo,\n defaultValue: 'Completed {0} hours ago.',\n },\n [FormatContentId.CopyOf]: {\n id: FormatContentId.CopyOf,\n defaultValue: 'Copy of {0}',\n },\n [FormatContentId.CouldNotFindListingId]: {\n id: FormatContentId.CouldNotFindListingId,\n defaultValue: \"Could not find Listing Id: '{0}'\",\n },\n [FormatContentId.CouldNotFindOrderId]: {\n id: FormatContentId.CouldNotFindOrderId,\n defaultValue: \"Could not find Order Id: '{0}'\",\n },\n [FormatContentId.CouldNotFindSaleId]: {\n id: FormatContentId.CouldNotFindSaleId,\n defaultValue: \"Could not find Sale Id: '{0}'\",\n },\n [FormatContentId.DaysBeforeEvent]: {\n id: FormatContentId.DaysBeforeEvent,\n defaultValue: '{0} Days Before Event',\n },\n [FormatContentId.DuplicateListingDetails]: {\n id: FormatContentId.DuplicateListingDetails,\n defaultValue:\n 'This listing appears to be a duplicate of listing {0}. We suggest removing it.',\n },\n [FormatContentId.DuplicatingSeats]: {\n id: FormatContentId.DuplicatingSeats,\n defaultValue: 'Duplicating seat found for Seat {0}',\n },\n [FormatContentId.EmailAddressFrom]: {\n id: FormatContentId.EmailAddressFrom,\n defaultValue: 'From: {0}',\n },\n [FormatContentId.EmailAddressTo]: {\n id: FormatContentId.EmailAddressTo,\n defaultValue: 'To: {0}',\n },\n [FormatContentId.EmptyContent]: {\n id: FormatContentId.EmptyContent,\n defaultValue: '',\n },\n [FormatContentId.EventsSelected]: {\n id: FormatContentId.EventsSelected,\n defaultValue: '{0} event(s) selected',\n },\n [FormatContentId.ExtraBarcodes]: {\n id: FormatContentId.ExtraBarcodes,\n defaultValue: '{0} extra barcode(s).',\n },\n [FormatContentId.ExtraTicketIds]: {\n id: FormatContentId.ExtraTicketIds,\n defaultValue: '{0} extra ticket id(s).',\n },\n [FormatContentId.ExtraTicketUrls]: {\n id: FormatContentId.ExtraTicketUrls,\n defaultValue: '{0} extra URL(s).',\n },\n [FormatContentId.Filled]: {\n id: FormatContentId.Filled,\n defaultValue: '{0} Filled',\n },\n [FormatContentId.FirstTimeVenueEventSetup]: {\n id: FormatContentId.FirstTimeVenueEventSetup,\n defaultValue: 'The venue for this event is setup as {0}',\n },\n [FormatContentId.FulfilledExternalMarketplace]: {\n id: FormatContentId.FulfilledExternalMarketplace,\n defaultValue:\n 'This order is fulfilled on {0}. To fulfill with new tickets, you will need to get {0} to reset the fulfilment state of the order.',\n },\n [FormatContentId.GoTo]: {\n id: FormatContentId.GoTo,\n defaultValue: 'Go to {0}',\n },\n [FormatContentId.HurdleN]: {\n id: FormatContentId.HurdleN,\n defaultValue: 'Hurdle {0}',\n },\n [FormatContentId.InNDays]: {\n id: FormatContentId.InNDays,\n defaultValue: 'In {0} days',\n },\n [FormatContentId.InNHours]: {\n id: FormatContentId.InNHours,\n defaultValue: 'In {0} hours',\n },\n [FormatContentId.InNMinutes]: {\n id: FormatContentId.InNMinutes,\n defaultValue: 'In {0} minutes',\n },\n [FormatContentId.InvalidTagCharacter]: {\n id: FormatContentId.InvalidTagCharacter,\n defaultValue: 'Special characters not allowed: {0}',\n },\n [FormatContentId.ItemsSelected]: {\n id: FormatContentId.ItemsSelected,\n defaultValue: '{0} items selected',\n },\n [FormatContentId.LastNDays]: {\n id: FormatContentId.LastNDays,\n defaultValue: 'last {0} days',\n },\n [FormatContentId.LastNHours]: {\n id: FormatContentId.LastNHours,\n defaultValue: 'last {0} hours',\n },\n [FormatContentId.LastNMinutes]: {\n id: FormatContentId.LastNMinutes,\n defaultValue: 'last {0} minutes',\n },\n [FormatContentId.LastNMonths]: {\n id: FormatContentId.LastNMonths,\n defaultValue: 'last {0} months',\n },\n [FormatContentId.ListingInUKNotification]: {\n id: FormatContentId.ListingInUKNotification,\n defaultValue:\n 'Direct listing on {0} not supported. Redirecting to {0} in {1} seconds...',\n },\n [FormatContentId.LoadingListingId]: {\n id: FormatContentId.LoadingListingId,\n defaultValue: \"Loading Listing Id '{0}'\",\n },\n [FormatContentId.LoadingOrderId]: {\n id: FormatContentId.LoadingOrderId,\n defaultValue: \"Loading Order Id '{0}'\",\n },\n [FormatContentId.LoadingSaleId]: {\n id: FormatContentId.LoadingSaleId,\n defaultValue: \"Loading Sale Id '{0}'\",\n },\n [FormatContentId.Margin]: {\n id: FormatContentId.Margin,\n defaultValue: '{0} Margin',\n },\n [FormatContentId.MarketplaceListings]: {\n id: FormatContentId.MarketplaceListings,\n defaultValue: '{0} Marketplace listings',\n },\n [FormatContentId.MaxAllowedFileSizeMb]: {\n id: FormatContentId.MaxAllowedFileSizeMb,\n defaultValue: 'File maximum size allowed is {0} MB',\n },\n [FormatContentId.MaxReportSizeWarningMessage]: {\n id: FormatContentId.MaxReportSizeWarningMessage,\n defaultValue:\n 'Your report has {0} rows but only {1} is returned per maximum recommended. To view your entire report, either download it or bypass the recommended limit.',\n },\n [FormatContentId.MedianPriceWarning]: {\n id: FormatContentId.MedianPriceWarning,\n defaultValue: 'This is {0}% {1} the current median listing price.',\n },\n [FormatContentId.MinDiscountContent]: {\n id: FormatContentId.MinDiscountContent,\n defaultValue: 'Discount must be at least {0}',\n },\n [FormatContentId.MissingBarcodes]: {\n id: FormatContentId.MissingBarcodes,\n defaultValue: '{0} missing barcode(s).',\n },\n [FormatContentId.MissingTicketIds]: {\n id: FormatContentId.MissingTicketIds,\n defaultValue: '{0} missing ticket id(s).',\n },\n [FormatContentId.MissingTicketUrls]: {\n id: FormatContentId.MissingTicketUrls,\n defaultValue: '{0} missing URL(s).',\n },\n [FormatContentId.NCharactersRemaining]: {\n id: FormatContentId.NCharactersRemaining,\n defaultValue: '{0} characters remaining',\n },\n [FormatContentId.NCompleted]: {\n id: FormatContentId.NCompleted,\n defaultValue: '{0} completed',\n },\n [FormatContentId.NDays]: {\n id: FormatContentId.NDays,\n defaultValue: '{0} days',\n },\n [FormatContentId.NFailed]: {\n id: FormatContentId.NFailed,\n defaultValue: '{0} failed',\n },\n [FormatContentId.NHours]: {\n id: FormatContentId.NHours,\n defaultValue: '{0} hours',\n },\n [FormatContentId.NIncreaseBy]: {\n id: FormatContentId.NIncreaseBy,\n defaultValue: 'Increase by {0}',\n },\n [FormatContentId.NMinutes]: {\n id: FormatContentId.NMinutes,\n defaultValue: '{0} minutes',\n },\n [FormatContentId.NDaysBefore]: {\n id: FormatContentId.NDaysBefore,\n defaultValue: '{0} days before event',\n },\n [FormatContentId.NHoursBefore]: {\n id: FormatContentId.NHoursBefore,\n defaultValue: '{0} hours before event',\n },\n [FormatContentId.NMinutesBefore]: {\n id: FormatContentId.NMinutesBefore,\n defaultValue: '{0} minutes before event',\n },\n [FormatContentId.NoDataAvailable]: {\n id: FormatContentId.NoDataAvailable,\n defaultValue: 'No {0} Available',\n },\n [FormatContentId.NotificationTypeListingBroadcastFailed]: {\n id: FormatContentId.NotificationTypeListingBroadcastFailed,\n defaultValue: 'Failed to broadcast listing to {0}',\n },\n [FormatContentId.NotificationTypeListingUpdateAllInPriceFailed]: {\n id: FormatContentId.NotificationTypeListingUpdateAllInPriceFailed,\n defaultValue: '{0} price broadcast failed',\n },\n [FormatContentId.NotificationTypeListingUpdateInHandDateFailed]: {\n id: FormatContentId.NotificationTypeListingUpdateInHandDateFailed,\n defaultValue: '{0} In Hand Date broadcast failed',\n },\n [FormatContentId.NotificationTypeListingUpdateSplitTypeFailed]: {\n id: FormatContentId.NotificationTypeListingUpdateSplitTypeFailed,\n defaultValue: '{0} Split Type update broadcast failed',\n },\n [FormatContentId.NotificationTypeListingUpdateTicketTypeFailed]: {\n id: FormatContentId.NotificationTypeListingUpdateTicketTypeFailed,\n defaultValue: '{0} Ticket Type update broadcast failed',\n },\n [FormatContentId.NotificationTypeListingUpdateUnitNetProceedsFailed]: {\n id: FormatContentId.NotificationTypeListingUpdateUnitNetProceedsFailed,\n defaultValue: '{0} price broadcast failed',\n },\n [FormatContentId.NotificationTypeListingUnbroadcastFailed]: {\n id: FormatContentId.NotificationTypeListingUnbroadcastFailed,\n defaultValue: 'Failed to unbroadcast listing from {0}',\n },\n [FormatContentId.NotificationTypeSellerSupportCaseNewReply]: {\n id: FormatContentId.NotificationTypeSellerSupportCaseNewReply,\n defaultValue: 'New message from {0}',\n },\n [FormatContentId.NotUnique]: {\n id: FormatContentId.NotUnique,\n defaultValue: '{0} is not unique',\n },\n [FormatContentId.NSelected]: {\n id: FormatContentId.NSelected,\n defaultValue: '{0} Selected',\n },\n [FormatContentId.NSelectedSections]: {\n id: FormatContentId.NSelectedSections,\n defaultValue: '{0} selected sections',\n },\n [FormatContentId.NUpdated]: {\n id: FormatContentId.NUpdated,\n defaultValue: '{0} updated',\n },\n [FormatContentId.NWarnings]: {\n id: FormatContentId.NWarnings,\n defaultValue: '{0} warnings',\n },\n [FormatContentId.OnlyForMarketplaces]: {\n id: FormatContentId.OnlyForMarketplaces,\n defaultValue: '(for {0} only)',\n },\n [FormatContentId.PacksOf]: {\n id: FormatContentId.PacksOf,\n defaultValue: 'Packs of {0}',\n },\n [FormatContentId.PageNum]: {\n id: FormatContentId.PageNum,\n defaultValue: 'Page {0}',\n },\n [FormatContentId.PercentageRelativeTo]: {\n id: FormatContentId.PercentageRelativeTo,\n defaultValue: 'Percentage Relative to {0}',\n },\n [FormatContentId.ProofOfPurchasedRequiredDetailMessage]: {\n id: FormatContentId.ProofOfPurchasedRequiredDetailMessage,\n defaultValue:\n 'Seated tickets must either have row or seat information, or proof submitted that you do not have this information available to you, before they can appear on {0}.',\n },\n [FormatContentId.RequestState]: {\n id: FormatContentId.RequestState,\n defaultValue: 'Request State: {0}',\n },\n [FormatContentId.Row]: {\n id: FormatContentId.Row,\n defaultValue: 'Row {0}',\n },\n [FormatContentId.RowRangeInputError]: {\n id: FormatContentId.RowRangeInputError,\n defaultValue: 'Upper bond of the row range must be no less than {0}.',\n },\n [FormatContentId.SalesForEditTickets]: {\n id: FormatContentId.SalesForEditTickets,\n defaultValue:\n 'If your edits result in one or more tickets removed, your {0} sales for the removed tickets will be deallocated and put back to Pending Confirmation, where you can either source new tickets or reject the orders.',\n },\n [FormatContentId.SalesForRemovedTickets]: {\n id: FormatContentId.SalesForRemovedTickets,\n defaultValue:\n 'Your {0} sales for the removed tickets will be deallocated and put back to Pending Confirmation, where you can either source new tickets or reject the orders.',\n },\n [FormatContentId.SearchItem]: {\n id: FormatContentId.SearchItem,\n defaultValue: 'Search {0}',\n },\n [FormatContentId.SearchingForListingId]: {\n id: FormatContentId.SearchingForListingId,\n defaultValue: \"Searching for Listing Id: '{0}'\",\n },\n [FormatContentId.SearchingForOrderId]: {\n id: FormatContentId.SearchingForOrderId,\n defaultValue: \"Searching for Order Id: '{0}'\",\n },\n [FormatContentId.SearchingForSaleId]: {\n id: FormatContentId.SearchingForSaleId,\n defaultValue: \"Searching for Sale Id: '{0}'\",\n },\n [FormatContentId.SearchResultPick]: {\n id: FormatContentId.SearchResultPick,\n defaultValue:\n \"Searching for '{0}' found {1} results. Click on an item to open it.\",\n },\n [FormatContentId.SeatAllocationChangeWarning]: {\n id: FormatContentId.SeatAllocationChangeWarning,\n defaultValue:\n 'If you change section by {0} or more, or row by {1} or more, you might need to confirm the change with the marketplace first.',\n },\n [FormatContentId.SeatNumber]: {\n id: FormatContentId.SeatNumber,\n defaultValue: 'Seat {0}',\n },\n [FormatContentId.Section]: {\n id: FormatContentId.Section,\n defaultValue: 'Section {0}',\n },\n [FormatContentId.ShareQuoted]: {\n id: FormatContentId.ShareQuoted,\n defaultValue: 'Share \"{0}\"',\n },\n [FormatContentId.SwitchTo]: {\n id: FormatContentId.SwitchTo,\n defaultValue: 'Switch To {0}',\n },\n [FormatContentId.TakeMeThereInSeconds]: {\n id: FormatContentId.TakeMeThereInSeconds,\n defaultValue: 'Take me there in {0} seconds...',\n },\n [FormatContentId.TheseAreThePastSalesOnTheWebsiteAndApp]: {\n id: FormatContentId.TheseAreThePastSalesOnTheWebsiteAndApp,\n defaultValue: 'These are the past {0} sales on the website and app',\n },\n [FormatContentId.TicketCount]: {\n id: FormatContentId.TicketCount,\n defaultValue: '{0} ticket(s)',\n },\n [FormatContentId.TicketNumber]: {\n id: FormatContentId.TicketNumber,\n defaultValue: 'Ticket {0}',\n },\n [FormatContentId.TicketPricePercentile]: {\n id: FormatContentId.TicketPricePercentile,\n defaultValue: 'Ticket Price {0}',\n },\n [FormatContentId.TicketTypePriority]: {\n id: FormatContentId.TicketTypePriority,\n defaultValue: '{0} Ticket Type Priority',\n },\n [FormatContentId.TransactionsLastNHour]: {\n id: FormatContentId.TransactionsLastNHour,\n defaultValue: 'Trans. L{0}H',\n },\n [FormatContentId.TransactionsLastNDay]: {\n id: FormatContentId.TransactionsLastNDay,\n defaultValue: 'Trans. L{0}D',\n },\n [FormatContentId.Uploading]: {\n id: FormatContentId.Uploading,\n defaultValue: 'Uploading {0}...',\n },\n [FormatContentId.UpToXTagsCanBeIncluded]: {\n id: FormatContentId.UpToXTagsCanBeIncluded,\n defaultValue: 'Up to {0} tags can be included in columns.',\n },\n [FormatContentId.UrlNumber]: {\n id: FormatContentId.UrlNumber,\n defaultValue: 'URL {0}',\n },\n [FormatContentId.VisitsLastNHour]: {\n id: FormatContentId.VisitsLastNHour,\n defaultValue: 'Visits L{0}H',\n },\n [FormatContentId.VisitsLastNDay]: {\n id: FormatContentId.VisitsLastNDay,\n defaultValue: 'Visits L{0}D',\n },\n [FormatContentId.WelcomeUserMessage]: {\n id: FormatContentId.WelcomeUserMessage,\n defaultValue: 'Hello, {0}',\n },\n [FormatContentId.WillDeliverToSecondaryAccount]: {\n id: FormatContentId.WillDeliverToSecondaryAccount,\n defaultValue: 'Tickets will be delivered to my {0} account',\n },\n [FormatContentId.YourSaleMetricsPart2]: {\n id: FormatContentId.YourSaleMetricsPart2,\n defaultValue:\n 'are {0} tickets sold with {1} net proceeds and {2} sales margin.',\n },\n [FormatContentId.YourSaleWithStatus]: {\n id: FormatContentId.YourSaleWithStatus,\n defaultValue: 'You have {0} sales {1} for upcoming events.',\n },\n};\n","import {\n createContext,\n ReactNode,\n useContext,\n useEffect,\n useState,\n} from 'react';\nimport {\n mediaQuery,\n MediaQueryType,\n useMatchMediaQuery,\n} from 'src/hooks/useMatchMedia';\n\ntype ScreenSizeState = Record;\n\nconst screenSizeState: ScreenSizeState = {\n mobile: false,\n tablet: false,\n desktop: false,\n largeDesktop: false,\n};\n\nexport const ScreenSizeContext =\n createContext(screenSizeState);\n\nexport const useScreenSizeContent = () => useContext(ScreenSizeContext);\n\nexport const ScreenSizeProvider = ({ children }: { children: ReactNode }) => {\n const [screenSiseState, setScreenSiseState] =\n useState(screenSizeState);\n\n const isMobile = useMatchMediaQuery(mediaQuery.mobile);\n const isTablet = useMatchMediaQuery(mediaQuery.tablet);\n const isDesktop = useMatchMediaQuery(mediaQuery.desktop);\n const isLargeDesktop = useMatchMediaQuery(mediaQuery.largeDesktop);\n\n useEffect(() => {\n setScreenSiseState({\n mobile: isMobile,\n tablet: isTablet,\n desktop: isDesktop,\n largeDesktop: isLargeDesktop,\n });\n }, [isMobile, isTablet, isDesktop, isLargeDesktop]);\n\n return (\n \n {children}\n \n );\n};\n","/*\nMIT License\n\nCopyright (c) 2021 SEEK\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n// Copied from https://github.com/vanilla-extract-css/vanilla-extract/blob/%40vanilla-extract/css%401.11.0/site/src/themeUtils.ts\nimport { StyleRule } from '@vanilla-extract/css';\nimport isEqual from 'lodash-es/isEqual';\nimport mapValues from 'lodash-es/mapValues';\nimport omit from 'lodash-es/omit';\n\n// Referenced from https://viagogo.visualstudio.com/Packages/_git/Viagogo.Npm.Core?path=/src/themes/shared/base/media-queries.ts\nexport const breakpoints = {\n mobile: 0,\n tablet: 960,\n desktop: 1200,\n largeDesktop: 1600,\n};\n\ntype CSSProps = Omit;\n\nconst queries = mapValues(\n omit(breakpoints, 'mobile'),\n (bp) => `screen and (min-width: ${bp}px)`\n);\n\nconst makeMediaQuery =\n (breakpoint: keyof typeof queries) => (styles: CSSProps) =>\n !styles || Object.keys(styles).length === 0\n ? {}\n : {\n [queries[breakpoint]]: styles,\n };\n\nconst mediaQuery = {\n tablet: makeMediaQuery('tablet'),\n desktop: makeMediaQuery('desktop'),\n largeDesktop: makeMediaQuery('largeDesktop'),\n};\n\ninterface ResponsiveStyle {\n mobile?: CSSProps;\n tablet?: CSSProps;\n desktop?: CSSProps;\n largeDesktop?: CSSProps;\n}\n\n/**\n * This function sets the styles for the minimum width, where mobile is 0 (and default)\n * Mobile first helper function for responsive styles.\n *\n * Set mobile styles, then override with larger screen sizes.\n * @param styles\n * @returns\n */\nexport const responsiveStyle = ({\n mobile,\n tablet,\n desktop,\n largeDesktop,\n}: ResponsiveStyle): StyleRule => {\n const mobileStyles = omit(mobile, '@media');\n\n const tabletStyles = !tablet || isEqual(tablet, mobileStyles) ? null : tablet;\n\n const stylesBelowDesktop = tabletStyles || mobileStyles;\n\n const desktopStyles =\n !desktop || isEqual(desktop, stylesBelowDesktop) ? null : desktop;\n\n const stylesBelowLargeDesktop = desktopStyles || tabletStyles || mobileStyles;\n\n const largeDesktopStyles =\n !largeDesktop || isEqual(largeDesktop, stylesBelowLargeDesktop)\n ? null\n : largeDesktop;\n\n const hasMediaQueries = tabletStyles || desktopStyles || largeDesktopStyles;\n\n return {\n ...mobileStyles,\n ...(hasMediaQueries\n ? {\n '@media': {\n ...(tabletStyles ? mediaQuery.tablet(tabletStyles) : {}),\n ...(desktopStyles ? mediaQuery.desktop(desktopStyles) : {}),\n ...(largeDesktopStyles\n ? mediaQuery.largeDesktop(largeDesktopStyles)\n : {}),\n },\n }\n : {}),\n };\n};\n","// Copied from Viagogo\nimport { useEffect, useRef, useState } from 'react';\nimport { useScreenSizeContent } from 'src/contexts/ScreenSizeContext/ScreenSizeContext';\nimport { breakpoints } from 'src/core/themes/responsiveStyle';\n\nexport const makeMediaQuery = (min: number, max?: number): string =>\n `only screen and (min-width: ${min}px)${\n max ? ` and (max-width: ${max}px)` : ''\n }`;\n\nexport const mediaQuery = {\n mobile: makeMediaQuery(0, breakpoints.tablet - 1),\n tablet: makeMediaQuery(0, breakpoints.desktop - 1), // include mobile\n desktop: makeMediaQuery(breakpoints.desktop), // include large desktop\n largeDesktop: makeMediaQuery(breakpoints.largeDesktop),\n} as const;\n\nexport type MediaQueryType = keyof typeof mediaQuery;\n\n/**\n * Returns a bool indicating if a media query matches the screen size or not.\n * Don't use this for defined queries in ScreenSizeContent.\n * Use directly useMatchMedia for better performance.\n * @param query\n */\nexport const useMatchMediaQuery = (query: string) => {\n const mqlRef = useRef(window.matchMedia(query));\n const [match, setMatching] = useState(mqlRef.current.matches);\n\n useEffect(() => {\n let mql = mqlRef.current;\n if (query !== mqlRef.current.media) {\n mqlRef.current = window.matchMedia(query);\n mql = mqlRef.current;\n }\n\n const listenerFunc = (e: {\n matches: boolean | ((prevState: boolean) => boolean);\n }) => setMatching(e.matches);\n\n // should not split this by build but feature detect\n if ('addEventListener' in mql) {\n mql.addEventListener('change', listenerFunc);\n } else if ('addListener' in mql) {\n (mql as MediaQueryList).addListener(listenerFunc);\n }\n\n return () => {\n if ('removeEventListener' in mql) {\n mql.removeEventListener('change', listenerFunc);\n } else if ('removeListener' in mql) {\n (mql as MediaQueryList).removeListener(listenerFunc);\n }\n };\n }, [query]);\n\n return match;\n};\n\nexport const useMatchMedia = (media: MediaQueryType): boolean => {\n const screenSizeState = useScreenSizeContent();\n return screenSizeState[media];\n};\n","import { Content } from 'src/contexts/ContentContext';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\n\nimport { ContentId } from './constants/contentId';\n\nexport const DeviceAwareContentWrapper = ({\n defaultId,\n mobileId,\n}: {\n defaultId: ContentId;\n mobileId: ContentId;\n}) => {\n const isMobile = useMatchMedia('mobile');\n return ;\n};\n\nexport const splitFormatContent = (s: string) => {\n const replacer = /\\{\\d\\}/;\n const result = [];\n let curS = '';\n for (let i = 0; i < s.length; i++) {\n let foundPlaceholder = false;\n if (s[i] === '{') {\n const placeholder = s.substring(i, i + 3);\n if (placeholder.match(replacer)) {\n if (curS) {\n result.push(curS);\n curS = '';\n }\n result.push(placeholder);\n i = i + 2; // skip to the }\n foundPlaceholder = true;\n }\n }\n\n if (!foundPlaceholder) {\n curS += s[i];\n }\n }\n\n if (curS) {\n result.push(curS);\n }\n\n return result;\n};\n","import { Store } from './Store';\n\nconst memObj: Record = {};\n\nexport const buildKey = (key: string, entityName: string) =>\n `${entityName}_${key}`;\n\nconst set = (key: string, entityName: string, value: T) => {\n memObj[buildKey(key, entityName)] = value;\n};\n\nconst get = (key: string, entityName: string): T | null =>\n memObj[buildKey(key, entityName)] as T;\n\nconst contains = (key: string, entityName: string): boolean =>\n buildKey(key, entityName) in memObj;\n\nconst truncate = (key: string, entityName: string, initVal?: T) => {\n memObj[buildKey(key, entityName)] = initVal;\n};\n\nconst isEnabled = () => true;\n\nexport const memoryStore: Store = { get, set, truncate, contains, isEnabled };\n","import { Store } from './Store';\n\nconst set = (key: string, entityName: string, value: unknown) => {\n try {\n window.sessionStorage.setItem(\n buildKey(key, entityName),\n JSON.stringify(value)\n );\n } catch (e) {\n // serialize error possible\n console.log(e);\n }\n};\n\nconst get = (key: string, entityName: string) => {\n const str = window.sessionStorage.getItem(buildKey(key, entityName));\n try {\n return JSON.parse(str || 'null');\n } catch (e) {\n // serialize error possible\n console.log(e);\n }\n return null;\n};\n\nconst truncate = (key: string, entityName: string, initVal: unknown = '') => {\n try {\n window.sessionStorage.setItem(\n buildKey(key, entityName),\n JSON.stringify(initVal)\n );\n } catch (e) {\n console.log(e);\n }\n};\n\nconst contains = (key: string, entityName: string) => {\n const value = get(key, entityName);\n return value && value != null;\n};\n\nconst buildKey = (key: string, entityName: string) => {\n return `${entityName}_${key}`;\n};\n\nconst isEnabled = () => {\n return (\n window.sessionStorage &&\n typeof window.sessionStorage.getItem === 'function' &&\n typeof window.sessionStorage.setItem === 'function' &&\n typeof window.sessionStorage.removeItem === 'function'\n );\n};\n\nexport const sessionStorageStore: Store = {\n contains,\n get,\n isEnabled,\n set,\n truncate,\n};\n","import React, {\n createContext,\n Fragment,\n PropsWithChildren,\n useCallback,\n useContext,\n} from 'react';\nimport { splitFormatContent } from 'src/utils/contentUtils';\nimport { memoryStore, sessionStorageStore } from 'src/utils/stores';\n\nconst CONTENT_NOT_FOUND_ENTITY = '__CONTENT_NOT_FOUND__';\n\nexport type ContentIdAndDefaultValue = { id: string; defaultValue?: string };\nexport type ContentResolverParams =\n | ContentIdAndDefaultValue\n | ContentIdAndDefaultValue[];\n\nexport interface IContentContext {\n contentCache: {\n hasValue: (id: string) => boolean;\n get: (id: string) => string | undefined;\n };\n contentResolver: (\n args: ContentResolverParams\n ) => string | string[] | undefined;\n formattedContentResolver: (\n id: string,\n params?: string | React.ReactNode | string[] | React.ReactNode[],\n defaultValue?: string\n ) => string | React.ReactNode | undefined;\n isLoading?: boolean;\n}\n\nexport type IContentProvider = Pick<\n IContentContext,\n 'contentCache' | 'isLoading'\n> & {\n contentResolver: (args: ContentResolverParams) => string | string[];\n};\n\nconst emptyContentResolver = (args: ContentResolverParams) => {\n const { defaultValue, id } = Array.isArray(args) ? args[0] : args;\n return defaultValue || id;\n};\n\nconst emptyAppContext: IContentContext = {\n isLoading: false,\n contentCache: {\n hasValue: () => false,\n get: (id: string) => id || undefined,\n },\n contentResolver: emptyContentResolver,\n formattedContentResolver: (_, params, defaultValue) =>\n format(defaultValue || _, params),\n};\n\nconst ContentContext = createContext(emptyAppContext);\n\nconst store = sessionStorageStore.isEnabled()\n ? sessionStorageStore\n : memoryStore;\n\nexport const useContentContext = () => useContext(ContentContext);\n\nexport const ContentProvider = ({\n isLoading,\n contentCache,\n children,\n}: PropsWithChildren) => {\n // TODO - hook-up with TelemetryProvider\n //const logger = useTelemetryLogger();\n const cacheResolver = useCallback(\n (args: ContentResolverParams) => {\n const isArray = Array.isArray(args);\n const contentsArray = isArray ? args : [args];\n const allCached = contentsArray.every(({ id }) =>\n contentCache.hasValue(id)\n );\n if (!allCached) {\n //log info on uncached content ids to telemetry\n const invalidContentIDs =\n store.get('invalidContentIDs', CONTENT_NOT_FOUND_ENTITY) ||\n [];\n contentsArray.forEach(({ id }) => {\n if (!contentCache.hasValue(id)) {\n if (!invalidContentIDs.includes(id)) {\n //logger.log('Content not found in cache for content ID: ' + id);\n invalidContentIDs.push(id);\n }\n }\n });\n store.set(\n 'invalidContentIDs',\n CONTENT_NOT_FOUND_ENTITY,\n invalidContentIDs\n );\n }\n\n return isArray\n ? contentsArray.map(\n ({ id, defaultValue }) => contentCache.get(id) || defaultValue || id\n )\n : // comment out the first 2 conditions locally to find ids that have yet to be translated\n contentCache.get(args.id) || args.defaultValue || args.id;\n },\n [contentCache]\n );\n\n return (\n {\n const value = cacheResolver({ id, defaultValue }) as string;\n return format(value, params);\n },\n }}\n >\n {children}\n \n );\n};\n\nconst format = (\n rawValue: string | undefined,\n args: string | React.ReactNode | string[] | React.ReactNode[] | undefined\n): string | React.ReactNode | undefined => {\n try {\n let formattedValue = rawValue;\n if (formattedValue === undefined) {\n return formattedValue;\n }\n\n const params =\n args === undefined ? [] : Array.isArray(args) ? args : [args];\n\n const hasReactElement = params.some((p) => React.isValidElement(p));\n if (hasReactElement) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let parts = splitFormatContent(formattedValue) as any[];\n for (let i = 0; i < params.length; i++) {\n parts = parts.map((p) => (p === `{${i}}` ? params[i] : p));\n }\n\n return (\n \n {parts.map((p, i) => (\n {p} \n ))}\n \n );\n } else {\n for (let i = 0; i < params.length; i++) {\n formattedValue = formattedValue?.replaceAll(\n `{${i}}`,\n params[i] as string\n );\n }\n\n return formattedValue;\n }\n } catch (e) {\n return '';\n }\n};\n","import DOMPurify from 'dompurify';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ContentIds } from 'src/utils/constants/contentIdDataMap';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { FormatContentIds } from 'src/utils/constants/formatContentIdDataMap';\n\nimport {\n ContentIdAndDefaultValue,\n IContentContext,\n useContentContext,\n} from './ContentContext';\n\nexport type BaseContentProps = {\n id: string;\n formatted: boolean;\n params?: string | React.ReactElement | string[] | React.ReactElement[];\n raw?: boolean;\n defaultValue?: string;\n};\n\ntype ContentProps = {\n id: ContentId | string | undefined;\n raw?: boolean;\n};\n\nexport const Content = ({ id, raw = false }: ContentProps) => {\n if (!id) {\n return null;\n }\n\n const content = ContentIds[id as ContentId];\n if (!content) {\n return id;\n }\n return (\n \n );\n};\n\nexport const FormatContent = ({\n id,\n raw = false,\n params,\n}: { id: FormatContentId } & Omit) => {\n const content = FormatContentIds[id];\n if (!content) {\n return id;\n }\n\n return (\n \n );\n};\n\nconst BaseContent = ({\n id,\n formatted,\n params,\n raw = false,\n defaultValue,\n}: BaseContentProps) => {\n const { contentResolver, formattedContentResolver } = useContentContext();\n let resolved = formatted\n ? formattedContentResolver(id, params, defaultValue)\n : contentResolver({ id, defaultValue });\n\n const isString = typeof resolved === 'string';\n if (isString) resolved = (resolved as string)?.replaceAll('\\u00a0', ' '); // this replaces the   with normal space, else long lines won't break\n return raw && resolved !== undefined && isString ? (\n \n ) : (\n <>{resolved}\n );\n};\n\nexport const useContent = (id: ContentId | string | undefined) => {\n const contentContext = useContentContext();\n return getContent(id, contentContext);\n};\n\nexport const useContents = (ids: ContentId[]) => {\n const contentContext = useContentContext();\n\n return getContents(ids, contentContext);\n};\n\nexport const getContent = (\n id: ContentId | string | undefined,\n contentContext: IContentContext\n) => {\n if (!id) {\n return '';\n }\n const content = ContentIds[id as ContentId];\n return content ? (contentContext.contentResolver(content) as string) : id;\n};\n\nexport const getContents = (\n ids: (ContentId | string)[],\n contentContext: IContentContext\n) => {\n const results: string[] = [];\n const contents: ContentIdAndDefaultValue[] = [];\n ids.forEach((i) => {\n const c = ContentIds[i as ContentId];\n if (c) {\n contents.push(c);\n } else {\n results.push(i);\n }\n });\n\n return results.concat(\n ...(contentContext.contentResolver(contents) as string[])\n );\n};\n\nexport const useFormattedContent = (\n contentId: FormatContentId,\n params: BaseContentProps['params']\n) => {\n const contentContext = useContentContext();\n\n return getFormattedContent(contentId, params, contentContext);\n};\n\nexport const getFormattedContent = (\n contentId: FormatContentId,\n params: BaseContentProps['params'],\n contentContext: IContentContext\n) => {\n const { id, defaultValue } = FormatContentIds[contentId];\n return contentContext.formattedContentResolver(id, params, defaultValue);\n};\n\nexport const isContentId = (value: string | ContentId): value is ContentId => {\n return ContentIds[value as ContentId] != null;\n};\n\nexport const isFormatContentId = (\n value: string | FormatContentId\n): value is FormatContentId => {\n return FormatContentIds[value as FormatContentId] != null;\n};\n\n/**\n * Compares 2 contentId to be used when sorting\n * @param contentContext\n * @param contentA\n * @param contentB\n */\nexport const contentComparator = (\n contentContext: IContentContext,\n contentA: ContentId | string | undefined,\n contentB: ContentId | string | undefined\n): number => {\n return getContent(contentA, contentContext)\n .toLocaleUpperCase()\n .localeCompare(getContent(contentB, contentContext).toLocaleUpperCase());\n};\n","export const RADIX_SIDE_OFFSET = 8;\nexport const RADIX_COLLISION_PADDING = 8;\n\n// This matches Startup.cs in the backend\nexport const MAX_ALLOWED_UPLOAD_FILE_SIZE = 50 * 1024 * 1024; // 50MB\n","import clsx from 'clsx';\n\n/**\n * Merges props according to the following rules:\n * 1. Classnames will be concatenated\n * 2. Callbacks will be called in order, and the result of the final callback will be returned\n * 3. All other props will be overwritten if the value is not `undefined`\n *\n * NOTE: Do **NOT** pass refs into this function. If you need to merge refs use `mergeRefs`\n * separately instead.\n * @param defaultProps\n * @param props\n * @returns Merged props.\n */\nexport function mergeProps

(\n defaultProps: Pick,\n props: P\n): P {\n const resultProps = { ...props };\n for (const key in defaultProps) {\n const defaultProp = defaultProps[key];\n const resultProp = resultProps[key];\n if (\n key === 'className' &&\n typeof defaultProp === 'string' &&\n typeof resultProp === 'string'\n ) {\n resultProps[key] = clsx(defaultProp, resultProp) as typeof resultProp;\n } else if (\n typeof defaultProp === 'function' &&\n typeof resultProp === 'function' &&\n key[0] === 'o' &&\n key[1] === 'n' &&\n key.charCodeAt(2) >= 'A'.charCodeAt(0) &&\n key.charCodeAt(2) <= 'Z'.charCodeAt(0)\n ) {\n resultProps[key] = ((...args: unknown[]) => {\n defaultProp(...args);\n return resultProp(...args);\n }) as typeof resultProp;\n } else if (resultProp === undefined) {\n resultProps[key] = defaultProps[key];\n }\n }\n return resultProps;\n}\n","import type { ForwardedRef } from 'react';\n\n/**\n * @param refs\n * @returns Given refs merged into a single ref.\n */\nexport function mergeRefs(\n ...refs: [ForwardedRef, ForwardedRef, ...ForwardedRef[]]\n): ForwardedRef {\n return (val) => {\n for (const ref of refs) {\n if (typeof ref === 'function') {\n ref(val);\n } else if (ref) {\n ref.current = val;\n }\n }\n };\n}\n","import { clsx } from 'clsx';\nimport {\n ClassAttributes,\n ComponentProps,\n ComponentRef,\n createElement,\n forwardRef,\n FunctionComponent,\n NamedExoticComponent,\n} from 'react';\n\ntype HTMLElementType =\n JSX.IntrinsicElements[T] extends ClassAttributes ? E : never;\n\n/**\n * Use this to add a `className` to intrinsic jsx components like `div`.\n * @param type\n * @param className\n * @returns\n */\nexport function styled(\n type: T,\n className: string\n) {\n return Object.assign(\n // eslint-disable-next-line react/display-name\n forwardRef, ComponentProps>(function (props, ref) {\n return createElement(type, {\n ref,\n ...props,\n className: clsx(className, props.className),\n });\n }),\n { displayName: `VanillaExtractStyled(${type})` }\n );\n}\n\n/**\n * Use this to add a `className` to react components.\n * @param Component\n * @param className\n * @returns\n */\nexport function styledComponent

(\n Component: FunctionComponent

| NamedExoticComponent

,\n className: string\n) {\n const displayName = `VanillaExtractStyled(${\n Component?.displayName ?? Component.name\n })`;\n const addClassNameToProps = (props: P) => ({\n ...props,\n className: clsx(className, props.className),\n });\n return Object.assign(\n '$$typeof' in Component\n ? // eslint-disable-next-line react/display-name\n forwardRef<\n ComponentRef,\n ComponentProps\n >((props, ref) =>\n createElement(\n Component,\n Object.assign(addClassNameToProps(props), { ref })\n )\n )\n : (props: P) => createElement(Component, addClassNameToProps(props)),\n { displayName }\n );\n}\n","import { RecipeVariants } from '@vanilla-extract/recipes';\nimport { ComponentPropsWithoutRef, forwardRef, ReactElement } from 'react';\nimport { mergeProps } from 'src/core/utils';\n\nimport * as styles from './Button.css';\n\nexport type ButtonProps = ComponentPropsWithoutRef<'button'> &\n RecipeVariants & {\n justifyContent?: 'start' | 'center' | 'space-between';\n fontWeight?: number;\n };\n\nexport const Button = forwardRef(\n function Button(\n {\n variant,\n textColor,\n shape,\n size,\n children,\n justifyContent = 'center',\n fontWeight = 500,\n ...props\n },\n ref\n ): ReactElement {\n return (\n \n \n {children}\n \n \n );\n }\n);\n","import { ComponentPropsWithoutRef, forwardRef } from 'react';\nimport { mergeProps } from 'src/core/utils';\n\nimport * as styles from './Card.css';\n\nexport const Card = forwardRef>(\n function Card({ children, ...props }, ref) {\n return (\n

\n {children}\n
\n );\n }\n);\n","import { RecipeVariants } from '@vanilla-extract/recipes';\nimport { ComponentPropsWithoutRef, forwardRef, ReactElement } from 'react';\nimport { mergeProps } from 'src/core/utils';\n\nimport * as styles from './CountBadge.css';\n\nexport const CountBadge = forwardRef<\n HTMLDivElement,\n Omit<\n ComponentPropsWithoutRef<'div'>,\n 'onChange' | 'onKeyDown' | 'onKeyUp' | 'children'\n > &\n RecipeVariants & {\n count: number;\n color?: 'green' | 'red' | 'gray' | 'brand' | 'brandLight';\n }\n>(function Root({ count, color = 'brand', ...props }, ref): ReactElement {\n return (\n \n {count}\n \n );\n});\n","import { ComponentPropsWithoutRef, forwardRef, ReactElement } from 'react';\n\nimport * as styles from './DividerLine.css';\n\nexport const DividerLine = forwardRef<\n HTMLDivElement,\n Omit, 'onChange' | 'onKeyDown' | 'onKeyUp'>\n>(function Root(props, ref): ReactElement {\n return
;\n});\n","import * as DropdownMenu from '@radix-ui/react-dropdown-menu';\nimport { clsx } from 'clsx';\nimport { ComponentPropsWithoutRef, forwardRef } from 'react';\nimport {\n mergeProps,\n RADIX_COLLISION_PADDING,\n RADIX_SIDE_OFFSET,\n styledComponent,\n} from 'src/core/utils';\n\nimport * as styles from './DropdownMenu.css';\nimport { label, separator } from './DropdownMenu.css';\n\nexport const Root = DropdownMenu.Root;\n\nexport const Trigger = DropdownMenu.Trigger;\n\nexport const Portal = DropdownMenu.Portal;\n\nexport const Group = DropdownMenu.Group;\n\n// DON'T use it until this works with zoom. Radix-ui issue.\nexport const SubContent = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef\n>(function Content({ children, ...props }, ref) {\n return (\n \n \n {children}\n \n \n );\n});\n\nexport const Content = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef\n>(function Content({ children, ...props }, ref) {\n return (\n \n \n {children}\n \n \n );\n});\n\nexport const Item = styledComponent(DropdownMenu.Item, styles.item);\n\nexport const Separator = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef\n>(function Separator({ className, ...props }, ref) {\n return (\n \n );\n});\n\nexport const Label = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef\n>(function Label({ className, ...props }, ref) {\n return (\n \n );\n});\n","import * as Popover from '@radix-ui/react-popover';\nimport { ComponentPropsWithoutRef, forwardRef } from 'react';\nimport {\n mergeProps,\n RADIX_COLLISION_PADDING,\n RADIX_SIDE_OFFSET,\n styledComponent,\n} from 'src/core/utils';\n\nimport * as styles from './Popover.css';\n\nexport const Root = Popover.Root;\n\nexport const Trigger = Popover.Trigger;\n\nexport const Content = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef\n>(function Content({ children, ...props }, ref) {\n return (\n \n \n {children}\n \n \n );\n});\n\nexport const Arrow = styledComponent(Popover.Arrow, styles.arrow);\n\nexport const Close = Popover.Close;\n","import { RecipeVariants } from '@vanilla-extract/recipes';\nimport { ComponentPropsWithoutRef, forwardRef, PropsWithChildren } from 'react';\nimport { mergeProps } from 'src/core/utils';\n\nimport * as styles from './Stack.css';\n\nexport type StackProps = ComponentPropsWithoutRef<'div'> &\n PropsWithChildren>;\n\n/**\n * Basically a wrapper around flexbox. Styling with flex is very common, so this component allows\n * for flexbox without a new style.\n * @param props\n */\nexport const Stack = forwardRef(function Stack(\n {\n direction,\n gap,\n justifyContent,\n flexWrap,\n alignItems,\n width,\n height,\n children,\n flexShrink,\n alignSelf,\n ...props\n },\n ref\n) {\n return (\n \n {children}\n
\n );\n});\n","import * as RadixRadioGroup from '@radix-ui/react-radio-group';\nimport clsx from 'clsx';\nimport { ComponentPropsWithoutRef, forwardRef, ReactNode } from 'react';\nimport { mergeProps } from 'src/core/utils';\n\nimport { Stack } from '../Stack';\nimport * as styles from './RadioGroup.css';\n\nexport const RadioGroup = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef\n>(function Root({ ...props }, ref) {\n return ;\n});\n\nexport const Radio = forwardRef<\n HTMLButtonElement,\n ComponentPropsWithoutRef & {\n label: ReactNode;\n variant?: 'regular' | 'outline';\n containerClassName?: string;\n }\n>(function Root(\n { label, value, disabled, variant = 'regular', containerClassName, ...props },\n ref\n) {\n return (\n \n \n \n \n \n {label}\n \n \n );\n});\n","/**\n * Copied from https://viagogo.visualstudio.com/Packages/_git/Viagogo.Npm.Core?path=/src/themes/shared/colors.ts\n * because the package doesn't export these values.\n *\n * This should **NOT** be used outside of the `themes/` directory.\n */\nexport const Colors = {\n // viagogo\n green075: '#71a230',\n green100: '#6fb229',\n green150: '#8ac53b',\n green200: '#8cc63f',\n green300: '#a3d165',\n green400: '#badd8c',\n green450: '#cee7ae',\n green500: '#d1e8b2',\n green600: '#e8f4d9',\n green700: '#f3f9eb',\n gray100: '#37383a',\n gray200: '#5f6062',\n gray250: '#87909a',\n gray300: '#7f8081',\n gray400: '#9fa0a1',\n gray450: '#bfc0c0',\n gray500: '#bfc0c0',\n gray600: '#dfdfe0',\n gray700: '#efefef',\n gray800: '#f2f2f2',\n gray900: '#f9f9f9',\n gray1000: '#f6f8f9',\n blue075: '#0094dc',\n blue075Light: '#0075c4',\n blue100: '#1eb0ee',\n blue200: '#22afee',\n blue300: '#47BEF0', // this is the categories sports color\n blue500: '#b0e3f8',\n blue600: '#e1f3fd',\n blue700: '#e1f3fd',\n\n magenta300: '#f4538d',\n yellow100: '#ffb900',\n red100: '#B71C1C',\n red200: '#D32F2F',\n red300: '#da4f49',\n red400: 'e53935',\n red500: '#EF5350',\n red600: '#E57373',\n black: '#000',\n white: '#fff',\n darkBlue250: '#0f5b99',\n darkBlue300: '#0c709a',\n darkBlue700: '#0f5b99',\n dark060: '#212428',\n\n // Stubhub\n indigo025: '#15032E',\n indigo050: '#1E093A',\n indigo060: '#29134C',\n indigo070: '#2D0F54',\n indigo075: '#260354',\n indigo100: '#3F1D75',\n indigo200: '#643CA2',\n indigo300: '#55279E',\n indigo500: '#825ABF',\n indigo600: '#D4B9FF',\n indigo700: '#F1EBFA',\n\n // TicketUtil\n tuBlue025: '#2A3944',\n tuBlue100: '#0084EA',\n tuBlue200: '#339CEE',\n tuBlue300: '#66B5F2',\n tuBlue400: '#99CEF6',\n tuBlue500: '#CCE6FB',\n tuBlue600: '#E6F3FD',\n\n fuchsia075: '#AF346B',\n fuchsia100: '#DB2C7B',\n fuchsia200: '#ED2E80',\n fuchsia500: '#F56AA8',\n fuchsia600: '#FBBBD6',\n fuchsia700: '#FBEAF1',\n\n aqua075: '#0D8282',\n aqua100: '#29B2B2',\n aqua200: '#49D4D4',\n aqua500: '#72C8C9',\n aqua600: '#ABDDDE',\n aqua700: '#DAFAFC',\n\n neutral000: '#000000',\n neutral025: '#121212',\n neutral050: '#191C1F',\n neutral075: '#2F343B',\n neutral100: '#677383',\n neutral200: '#87909A',\n neutral300: '#B1BAC2',\n neutral400: '#CFD4D9',\n neutral500: '#E6E9EB',\n neutral600: '#F6F8F9',\n neutral700: '#FBFCFC',\n neutral1000: '#FFFFFF',\n\n negative075: '#9F2B18',\n negative100: '#D91A1A',\n negative200: '#FF3939',\n negative500: '#FCEFED',\n\n success075: '#198620',\n success100: '#00A645',\n success500: '#E5FFF0',\n warning075: '#996E00',\n warning100: '#F2B824',\n warning500: '#FEF7E7',\n\n info075: '#0F5894',\n info100: '#1475C4',\n info200: '#218FE8',\n info500: '#DAECFB',\n info700: '#E0ECFF',\n\n darkInfo: '#1A2A44',\n\n // Brand-specific color that don't have regular color naming\n brandAxs: '#0055A0',\n brandVivid: '#0E1963',\n brandSeatgeek: '#FF5B49',\n brandTickPick: '#3399FF',\n brandTicketmaster: '#026BDE',\n brandFanXchange: '#006099',\n brandTicketEvolution: '#9A362C',\n brandTicketNetwork: '#3A519D',\n brandTelecharge: '#000B6F',\n brandTicketon: '#202867',\n brandSeetickets: '#009C9B',\n brandMgmResorts: '#16057D',\n brandSmithCenterImport: '#63948E',\n brandComputicket: '#B50D90',\n brandLyte: '#ffffff',\n brandGoTickets: '#ffffff',\n brandB2BSales: '#ffffff',\n\n textSeatgeek: '#181818',\n textFanXchange: '#15F2D3',\n textEventbrite: '#FF5B49',\n textTicketon: '#FECA27',\n textEtix: '#00579B',\n textMgmResorts: '#FFF9BE',\n\n backgroundStubhubSeatmap: '#C2B5E0',\n\n seatCardBackgroundColor: '#1A2426',\n} as const;\n","import type { ThemeMediaQuery } from '../../theme-types';\n\nconst makeMediaQuery = (size: number, args: string): string => `\n @media only screen and (min-width: ${size}px) {\n ${args}\n }\n`;\n\nconst breakpoints = {\n xs: 0,\n sm: 360,\n md: 600, // px 1: Small (phone) 600-919 medium , 920-1199 medium large\n ml: 920, // px 2: Medium (tablet)\n lg: 1200, // px 3: Large (laptop/desktop)/4: Extra-Large (Widescreen)\n xl: 2100,\n};\n\nconst phone = `\n only screen and (min-width: ${0}px) and (max-width: ${breakpoints.md - 1}px)\n`;\n\nconst tablet = `\n only screen and (min-width: ${breakpoints.md}px) and (max-width: ${\n breakpoints.ml - 1\n }px)\n`;\n\nconst desktop = `\n only screen and (min-width: ${breakpoints.ml}px) \n`;\n\nconst xlDesktop = `\n only screen and (min-width: ${breakpoints.xl}px) \n`;\n\nexport const media: ThemeMediaQuery = {\n breakpoints,\n makeMediaQuery,\n phone,\n tablet,\n desktop,\n xlDesktop,\n};\n","import { sizing } from 'src/core/themes/themeContract.css';\n\nimport { TypographyVariantType } from '../../theme-types';\n\nexport enum ScreenVariant {\n sm = 'sm',\n lg = 'lg',\n}\n\nexport const fontWeightConfig = {\n regular: 400,\n medium: 500,\n semiBold: 600,\n bold: 700,\n};\n\nexport type TypographyStyling = {\n fontSize: string;\n defaultfontWeight: string | number;\n lineHeight: string;\n letterSpacing?: string;\n};\n\nexport const VariantConfig: Record<\n TypographyVariantType,\n Record\n> = {\n title1: {\n [ScreenVariant.lg]: {\n fontSize: sizing.typography.fontSize['5xl'],\n defaultfontWeight: fontWeightConfig.bold,\n lineHeight: '56px',\n },\n [ScreenVariant.sm]: {\n fontSize: sizing.typography.fontSize['4xl'],\n defaultfontWeight: fontWeightConfig.bold,\n lineHeight: '48px',\n },\n },\n title2: {\n [ScreenVariant.lg]: {\n fontSize: sizing.typography.fontSize['4xl'],\n defaultfontWeight: fontWeightConfig.bold,\n lineHeight: '48px',\n },\n [ScreenVariant.sm]: {\n fontSize: sizing.typography.fontSize['3xl'],\n defaultfontWeight: fontWeightConfig.bold,\n lineHeight: '40px',\n },\n },\n title3: {\n [ScreenVariant.lg]: {\n fontSize: sizing.typography.fontSize['3xl'],\n defaultfontWeight: fontWeightConfig.bold,\n lineHeight: '40px',\n },\n [ScreenVariant.sm]: {\n fontSize: sizing.typography.fontSize['2xl'],\n defaultfontWeight: fontWeightConfig.bold,\n lineHeight: '40px',\n },\n },\n title4: {\n [ScreenVariant.lg]: {\n fontSize: sizing.typography.fontSize['2xl'],\n defaultfontWeight: fontWeightConfig.bold,\n lineHeight: '32px',\n },\n [ScreenVariant.sm]: {\n fontSize: sizing.typography.fontSize['xl'],\n defaultfontWeight: fontWeightConfig.bold,\n lineHeight: '32px',\n },\n },\n title5: {\n [ScreenVariant.lg]: {\n fontSize: sizing.typography.fontSize['xl'],\n defaultfontWeight: fontWeightConfig.bold,\n lineHeight: '28px',\n },\n [ScreenVariant.sm]: {\n fontSize: sizing.typography.fontSize['lg'],\n defaultfontWeight: fontWeightConfig.bold,\n lineHeight: '24px',\n },\n },\n title6: {\n [ScreenVariant.lg]: {\n fontSize: sizing.typography.fontSize['lg'],\n defaultfontWeight: fontWeightConfig.bold,\n lineHeight: '24px',\n },\n [ScreenVariant.sm]: {\n fontSize: sizing.typography.fontSize['base'],\n defaultfontWeight: fontWeightConfig.bold,\n lineHeight: '24px',\n },\n },\n subtitle1: {\n [ScreenVariant.lg]: {\n fontSize: sizing.typography.fontSize['base'],\n defaultfontWeight: fontWeightConfig.medium,\n lineHeight: '24px',\n },\n [ScreenVariant.sm]: {\n fontSize: sizing.typography.fontSize['base'],\n defaultfontWeight: fontWeightConfig.medium,\n lineHeight: '24px',\n },\n },\n subtitle2: {\n [ScreenVariant.lg]: {\n fontSize: sizing.typography.fontSize['sm'],\n defaultfontWeight: fontWeightConfig.medium,\n lineHeight: '20px',\n },\n [ScreenVariant.sm]: {\n fontSize: sizing.typography.fontSize['lg'],\n defaultfontWeight: fontWeightConfig.medium,\n lineHeight: '20px',\n },\n },\n body1: {\n [ScreenVariant.lg]: {\n fontSize: sizing.typography.fontSize['base'],\n defaultfontWeight: fontWeightConfig.regular,\n lineHeight: '24px',\n },\n [ScreenVariant.sm]: {\n fontSize: sizing.typography.fontSize['base'],\n defaultfontWeight: fontWeightConfig.regular,\n lineHeight: '24px',\n },\n },\n body2: {\n [ScreenVariant.lg]: {\n fontSize: sizing.typography.fontSize['sm'],\n defaultfontWeight: fontWeightConfig.regular,\n lineHeight: '20px',\n },\n [ScreenVariant.sm]: {\n fontSize: sizing.typography.fontSize['sm'],\n defaultfontWeight: fontWeightConfig.regular,\n lineHeight: '20px',\n },\n },\n caption1: {\n [ScreenVariant.lg]: {\n fontSize: sizing.typography.fontSize['xs'],\n defaultfontWeight: fontWeightConfig.medium,\n lineHeight: '16px',\n },\n [ScreenVariant.sm]: {\n fontSize: sizing.typography.fontSize['xs'],\n defaultfontWeight: fontWeightConfig.medium,\n lineHeight: '16px',\n },\n },\n caption2: {\n [ScreenVariant.lg]: {\n fontSize: sizing.typography.fontSize['xxs'],\n defaultfontWeight: fontWeightConfig.medium,\n lineHeight: '16px',\n },\n [ScreenVariant.sm]: {\n fontSize: sizing.typography.fontSize['xxs'],\n defaultfontWeight: fontWeightConfig.medium,\n lineHeight: '16px',\n },\n },\n};\n","import { FontWeightType, TypographyVariantType } from '../../theme-types';\nimport { media } from './media-queries';\nimport { fontWeightConfig, VariantConfig } from './typography-config';\n\ntype TypographySize = {\n 'font-size': string;\n 'line-height': string;\n 'letter-spacing': string;\n};\n\nexport const size = (multiplier: number): TypographySize => ({\n 'font-size': `${multiplier * 2 + 10}px`,\n 'line-height': 'regular',\n 'letter-spacing': 'regular',\n});\n\nexport const getStyles = (\n variant: TypographyVariantType,\n weight?: FontWeightType\n): string =>\n `\n font-size: ${VariantConfig[variant].sm.fontSize};\n font-weight: ${\n weight\n ? fontWeightConfig[weight]\n : VariantConfig[variant].sm.defaultfontWeight\n };\n line-height: ${VariantConfig[variant].sm.lineHeight};\n ${\n VariantConfig[variant].sm.letterSpacing !== undefined\n ? `letter-spacing: ${VariantConfig[variant].sm.letterSpacing}`\n : ''\n };\n\n ${media.makeMediaQuery(\n media.breakpoints.md,\n `\n font-size: ${VariantConfig[variant].lg.fontSize};\n font-weight: ${\n weight\n ? fontWeightConfig[weight]\n : VariantConfig[variant].lg.defaultfontWeight\n };\n line-height: ${VariantConfig[variant].lg.lineHeight};\n ${\n VariantConfig[variant].lg.letterSpacing !== undefined\n ? `letter-spacing: ${VariantConfig[variant].lg.letterSpacing}`\n : ''\n };\n `\n )}\n `;\n","export function addTransparencyToHexColor(\n color: string,\n transparency0To100: number\n) {\n if (\n !color.startsWith('#') ||\n // Supported formats here are #RRGGBB or #RGB\n ![4, 7].includes(color.length) ||\n transparency0To100 < 0 ||\n transparency0To100 > 100\n ) {\n console.warn(\n '[addTransparencyToHexColor] color or transparency0To100 is not valid',\n { color, transparency0To100 }\n );\n return color;\n }\n\n // Convert #RGB to #RRGGBB\n const baseColor =\n color.length === 4\n ? `#${color\n .substring(1)\n .split('')\n .map((c) => c + c)\n .join('')}`\n : color;\n\n const hexTransparency = Math.round((transparency0To100 * 255) / 100)\n .toString(16)\n .substring(0, 2);\n\n return `${baseColor}${hexTransparency}`;\n}\n\nexport const Colors = {\n // viagogo\n green025: '#406718',\n green050: '#567D21',\n green075: '#71a230',\n green100: '#6fb229',\n green150: '#8ac53b',\n green200: '#8cc63f',\n green300: '#a3d165',\n green400: '#badd8c',\n green450: '#cee7ae',\n green500: '#d1e8b2',\n green600: '#e8f4d9',\n green700: '#f3f9eb',\n gray100: '#37383a',\n gray200: '#5f6062',\n gray250: '#87909a',\n gray300: '#7f8081',\n gray400: '#9fa0a1',\n gray450: '#bfc0c0',\n gray500: '#bfc0c0',\n gray600: '#dfdfe0',\n gray700: '#efefef',\n gray800: '#f2f2f2',\n gray900: '#f9f9f9',\n gray1000: '#f6f8f9',\n blue075: '#0094dc',\n blue100: '#1eb0ee',\n blue200: '#22afee',\n blue300: '#47BEF0', // this is the categories sports color\n blue500: '#b0e3f8',\n blue600: '#e1f3fd',\n blue700: '#e1f3fd',\n\n magenta300: '#f4538d',\n yellow100: '#ffb900',\n red100: '#B71C1C',\n red200: '#D32F2F',\n red300: '#da4f49',\n red400: 'e53935',\n red500: '#EF5350',\n red600: '#E57373',\n black: '#000',\n white: '#fff',\n darkBlue250: '#0f5b99',\n darkBlue300: '#0c709a',\n darkBlue700: '#0f5b99',\n\n // Stubhub\n indigo025: '#15032E',\n indigo050: '#1E093A',\n indigo060: '#29134C',\n indigo070: '#2D0F54',\n indigo075: '#260354',\n indigo100: '#3F1D75',\n indigo200: '#643CA2',\n indigo300: '#55279E',\n indigo500: '#825ABF',\n indigo600: '#D4B9FF',\n indigo700: '#F1EBFA',\n\n fuchsia075: '#AF346B',\n fuchsia100: '#DB2C7B',\n fuchsia200: '#ED2E80',\n fuchsia500: '#F56AA8',\n fuchsia600: '#FBBBD6',\n fuchsia700: '#FBEAF1',\n\n aqua075: '#0D8282',\n aqua100: '#29B2B2',\n aqua200: '#49D4D4',\n aqua500: '#72C8C9',\n aqua600: '#ABDDDE',\n aqua700: '#DAFAFC',\n\n neutral000: '#000000',\n neutral025: '#121212',\n neutral050: '#191C1F',\n neutral075: '#2F343B',\n neutral100: '#677383',\n neutral200: '#87909A',\n neutral300: '#B1BAC2',\n neutral400: '#CFD4D9',\n neutral500: '#E6E9EB',\n neutral600: '#F6F8F9',\n neutral700: '#FBFCFC',\n neutral1000: '#FFFFFF',\n\n negative075: '#9F2B18',\n negative100: '#D91A1A',\n negative200: '#FF3939',\n negative500: '#FCEFED',\n\n success075: '#198620',\n success100: '#00A645',\n success500: '#E5FFF0',\n warning075: '#996E00',\n warning100: '#F2B824',\n warning500: '#FEF7E7',\n\n info075: '#0F5894',\n info100: '#1475C4',\n info200: '#218FE8',\n info500: '#DAECFB',\n};\n","import { CommonBasePalette } from './palette.types';\n\nexport const BASE_LIGHT_PALETTE: CommonBasePalette = {\n // Start: Neutral\n neutralPrimary: '#1A2329', // neutral13\n neutralPrimaryHover: '#2B343A', // neutral21\n neutralPrimaryActive: '#141D23', // neutral10\n textOnNeutralPrimary: '#FFFFFF', // neutral100\n borderNeutralPrimary: '#B1BAC2', // neutral75\n\n neutralSecondary: '#F8FAFB', // neutral98\n neutralSecondaryHover: '#EFF1F2', // neutral95\n neutralSecondaryActive: '#DFE3E5', // neutral90\n textOnNeutralSecondary: '#091218', // neutral5\n // End: Neutral\n\n // Start: Disabled\n disabled: '#DFE3E5', // neutral90\n textOnDisabled: '#B1BAC2', // neutral75\n\n borderDisabled: '#B1BAC2', // neutral75\n\n textDisabledOnSurface: '#B1BAC2', // neutral75\n // End: Disabled\n\n // Start: Accent\n accentPrimary: '#E12277', // fuchsia50\n textOnAccentPrimary: '#FFFFFF', // fuc\n borderAccentPrimary: '#FF649B', // fuchsia64\n\n accentSecondary: '#FFE8EC', // fuchsia94\n textOnAccentSecondary: '#C30063', // fuchsia42\n\n textAccentOnSurface: '#C30063', // fuchsia42\n // End: Accent\n\n // Start: Error\n errorPrimary: '#D81819', // error46\n errorPrimaryHover: '#FF3E34', // error57\n errorPrimaryActive: '#AE000A', // error36\n textOnErrorPrimary: '#FFFFFF', // error100\n borderErrorPrimary: '#D81819', // error46\n\n errorSecondary: '#FFE9E6', // error94\n errorSecondaryHover: '#FFDAD5', // error90\n errorSecondaryActive: '#FFCFC8', // error87\n textOnErrorSecondary: '#D81819', // error46\n\n textErrorOnSurface: '#D81819', // error46\n // End: Error\n\n // Start: Success\n successPrimary: '#00A645', // success60\n textOnSuccessPrimary: '#FFFFFF', // success100\n borderSuccessPrimary: '#39C35E', // success70\n\n successSecondary: '#EBFFE7', // success98\n textOnSuccessSecondary: '#006E2B', // success40\n\n textSuccessOnSurface: '#006E2B', // success40\n // End: Success\n\n // Start: Warning\n warningPrimary: '#F2B824', // warning78\n textOnWarningPrimary: '#5C4300', // warning30\n borderWarningPrimary: '#F2B824', // warning78\n\n warningSecondary: '#FFECCA', // warning94\n textOnWarningSecondary: '#5C4300', // warning30\n // End: Warning\n\n // Start: Info\n infoPrimary: '#0075C4', // info48\n textOnInfoPrimary: '#FFFFFF', // info100\n borderInfoPrimary: '#8EC2FF', // info77\n\n infoSecondary: '#E0ECFF', // info93\n textOnInfoSecondary: '#000F20', // info4\n\n textInfoOnSurface: '#0075C4', // info48\n // End: Info\n\n // Start: Surface\n surfacePrimary: '#FFFFFF', // neutral100\n surfaceSecondary: '#F5F7F8', // neutral97\n\n textPrimaryOnSurface: '#091218', // neutral5\n textSecondaryOnSurface: '#606970', // neutral44\n\n textLinkOnSurface: '#5E29BA', // indigo33\n textLinkHoverOnSurface: '#3E008E', // indigo20\n textLinkActiveOnSurface: '#835CCD', // indigo48\n textLinkVisitedOnSurface: '#6535BE', // indigo36\n // End: Surface\n\n // Start: Border\n borderPrimary: '#141D23', // neutral13\n borderSecondary: '#B1BAC2', // neutral75\n // End: Border\n\n // Start: Elevated\n elevated: '#2F343B', // neutral10\n textPrimaryOnElevated: '#FFFFFF', // neutral100\n textSecondaryOnElevated: '#B1BAC2', // neutral75\n // End: Elevated\n\n scrim: '#00000060',\n};\n","import { BrandSemanticColors } from './palette.types';\n\nexport const STUBHUB_LIGHT: BrandSemanticColors = {\n brandPrimary: '#5E29BA', // indigo33\n brandPrimaryHover: '#6535BE', // indigo36\n brandPrimaryActive: '#3F1D75', // indigo20\n textOnBrandPrimary: '#FFFFFF', // indigo100\n borderBrandPrimary: '#5E29BA', // indigo33\n\n brandSecondary: '#F1EBFA', // indigo94\n brandSecondaryHover: '#EEE0FF', // indigo91\n brandSecondaryActive: '#E5D2FF', // indigo87\n textOnBrandSecondary: '#5E29BA', // indigo33\n\n textBrandOnSurface: '#5E29BA', // indigo33\n\n textBrandOnElevated: '#9471D7', // indigo55\n};\n\nexport const STUBHUB_DARK: BrandSemanticColors = {\n brandPrimary: '#6535BE', // indigo36\n brandPrimaryHover: '#835CCD', // indigo48\n brandPrimaryActive: '#5E29BA', // indigo33\n textOnBrandPrimary: '#FFFFFF', // indigo100\n borderBrandPrimary: '#6535BE', // indigo36\n\n brandSecondary: '#1B0045', // indigo6\n brandSecondaryHover: '#2C0069', // indigo13\n brandSecondaryActive: '#1B0045', // indigo6\n textOnBrandSecondary: '#E5D2FF', // indigo87\n\n textBrandOnSurface: '#9471D7', // indigo55\n\n textBrandOnElevated: '#9C79DB', // indigo58\n};\n","export type BorderRadiusOption =\n | 's'\n | 'm'\n | 'l'\n | 'xl'\n | 'xxl'\n | 'circle'\n | 'squared';\nexport const borderRadius = {\n s: '4px',\n m: '8px',\n l: '12px',\n xl: '16px',\n xxl: '24px',\n circle: '50%',\n squared: '0',\n};\nexport const shadowConfig = {\n color: '#2f343b25', // neutral075, 25% percentage\n};\nexport type ShadowPosition = 't' | 'c' | 'b';\n\nexport const shadow = (\n level: 0 | 1 | 2 | 3 | 4 | 5 = 0,\n shadowPosition: ShadowPosition = 'c'\n): string => {\n const shadowBlur = level === 0 ? 0 : 2 ** level;\n let offset = level === 0 ? 0 : shadowBlur / 2;\n if (shadowPosition === 'c') {\n offset = 0;\n }\n if (shadowPosition === 't') {\n offset = 0 - offset;\n }\n return `0 ${offset}px ${shadowBlur}px 0 ${shadowConfig.color}`;\n};\n","export const spacing = (...multipliers: number[]): string =>\n multipliers\n .map((v) => ` ${v * 4}px`)\n .join('')\n .substring(1);\n","import { DefaultTheme } from 'styled-components';\n\nimport { media } from './shared/base/media-queries';\nimport { getStyles, size } from './shared/base/typography';\nimport { Colors } from './shared/colors';\nimport { BASE_LIGHT_PALETTE } from './shared/palette/common-palette-light';\nimport { STUBHUB_LIGHT } from './shared/palette/stubhub-brand-palette';\nimport { borderRadius, shadow } from './shared/shape';\nimport { spacing } from './shared/spacing';\n\nconst purpleBranding = {\n primary100: Colors.indigo100,\n primary200: Colors.indigo200,\n primary700: Colors.indigo700,\n secondary075: Colors.fuchsia075,\n secondary100: Colors.fuchsia100,\n};\n\nexport const BaseTheme: DefaultTheme = {\n name: 'base',\n rounded: true,\n floatingInputLabel: true,\n filledInLoading: true,\n logoPath:\n '/images/Assets/Icons/bfx/stubhub-logo-merch-purple-mweb.440b3765.svg',\n colors: {\n primary025: Colors.indigo025,\n primary050: Colors.indigo050,\n primary060: Colors.indigo060,\n primary070: Colors.indigo070,\n primary075: Colors.indigo075,\n primary100: purpleBranding.primary100,\n primary150: purpleBranding.primary100, // need to be retired\n primary200: purpleBranding.primary200,\n primary300: Colors.indigo300,\n primary400: Colors.indigo300, // need to be retired\n primary500: Colors.indigo500,\n primary600: Colors.indigo600,\n primary700: Colors.indigo700,\n secondary: Colors.gray100, // we need to retire secondaryxx in phase3 and use newSecondary instead\n secondary100: Colors.gray100,\n secondary200: Colors.gray200,\n secondary300: Colors.gray300,\n secondary400: Colors.gray400,\n secondary450: Colors.gray450,\n secondary500: Colors.gray500,\n secondary600: Colors.gray600,\n secondary700: Colors.gray700,\n secondary800: Colors.gray800,\n secondary900: Colors.gray900,\n secondary1000: Colors.gray1000,\n secondary1200: Colors.gray250,\n newSecondary075: purpleBranding.secondary075, // need to rename to secondaryxx after we retire the above secondaryxx\n newSecondary100: purpleBranding.secondary100,\n newSecondary200: Colors.fuchsia200,\n newSecondary500: Colors.fuchsia500,\n newSecondary600: Colors.fuchsia600,\n newSecondary700: Colors.fuchsia700,\n accent075: Colors.aqua075,\n accent100: Colors.aqua100,\n accent200: Colors.aqua200,\n accent500: Colors.aqua500,\n accent600: Colors.aqua600,\n accent700: Colors.aqua700,\n // Please only use functional colors defined below, exclude the 'need to be retired'\n negative075: Colors.negative075,\n negative100: Colors.negative100,\n negative200: Colors.negative200,\n negative500: Colors.negative500,\n success075: Colors.success075,\n success100: Colors.success100,\n success500: Colors.success500,\n warning075: Colors.warning075,\n warning100: Colors.warning100,\n warning500: Colors.warning500,\n info075: Colors.info075,\n info100: Colors.info100,\n info200: Colors.info200,\n info300: Colors.info200, // need to be retired\n info500: Colors.info500,\n info1000: Colors.info075, // need to be retired\n\n textPrimary: Colors.neutral100, // this is the default text color\n textPrimaryHover: Colors.neutral200,\n textSecondary: purpleBranding.secondary100, // this is the fuchsia\n textBrand: purpleBranding.primary100, // this is primary branding color for each theme\n textBrandHover: purpleBranding.primary200,\n textDisabled: Colors.neutral300,\n textInverted: Colors.neutral1000,\n textStrong: Colors.neutral050,\n textDarker: Colors.neutral075,\n textDarkest: Colors.neutral025,\n textHighlight: purpleBranding.secondary100, // this is fuchsia\n textLinkPrimary: purpleBranding.primary200,\n textLinkActive: Colors.indigo500,\n textLinkHover: purpleBranding.primary100,\n textLinkVisited: Colors.indigo300,\n textLinksGroupPrimary: Colors.neutral100,\n textOnBrandBg: Colors.neutral1000, // this is text with brand color background, white for purple, black for vgg\n textOnBrandBgLink: Colors.indigo600, // this is navi with brand color background, white for purple, black for vgg\n textOnBrandBgHover: Colors.neutral1000,\n textNavPrimary: Colors.neutral100,\n textNavActive: Colors.indigo500,\n textNavHover: purpleBranding.primary100,\n textNavVisited: Colors.indigo300,\n textNegative: Colors.negative100,\n textSuccess: Colors.success100,\n textInfo: Colors.info100,\n textWarning: Colors.warning100,\n textLogoVggGray: Colors.gray200,\n textLogoVggGreen: Colors.green100,\n\n backgroundNegative: Colors.negative500,\n backgroundNegativeDark: Colors.negative100,\n backgroundNegativeHover: Colors.negative200,\n backgroundSuccess: Colors.success500,\n backgroundWarning: Colors.warning500,\n backgroundInfo: Colors.info500,\n backgroundPrimary: Colors.neutral1000, // this is default background color which is white\n backgroundSecondary: Colors.neutral600,\n backgroundInteraction: Colors.neutral600,\n backgroundHover: Colors.neutral200,\n backgroundDark: Colors.neutral075,\n backgroundNeutral: Colors.neutral100,\n backgroundDisabled: Colors.neutral300,\n backgroundActiveDisabled: Colors.neutral700,\n backgroundAccent100: Colors.aqua100, // this is background color of date picker\n backgroundAccent700: Colors.aqua700, // this is lighter background of date picker\n overlayPrimary: Colors.neutral000, // need to use with opacity 25%\n backgroundBrandActive: purpleBranding.primary100, // this is brand color as background\n backgroundBrandHover: purpleBranding.primary200,\n backgroundBrandLight: purpleBranding.primary700,\n iconPrimary: Colors.neutral100,\n iconHover: Colors.neutral200,\n iconDisabled: Colors.neutral300,\n\n borderPrimary: Colors.neutral400, // this is default border color\n borderActive: purpleBranding.primary100, // this is primary brand color as border color\n borderInverted: Colors.neutral1000, // white\n borderDark: Colors.neutral075,\n borderNeutral: Colors.neutral100,\n borderActiveDisabled: Colors.neutral300,\n borderDisabled: Colors.neutral500,\n borderNegative: Colors.negative100, // this is for error border\n\n link100: Colors.darkBlue250, // need to be retired\n highlight100: Colors.aqua100, // need to be retired\n highlight200: Colors.aqua200, // need to be retired\n highlight300: Colors.aqua200, // need to be retired\n highlight400: Colors.aqua200, // need to be retired\n highlight450: Colors.aqua500, // need to be retired\n highlight500: Colors.aqua500, // need to be retired\n highlight600: Colors.aqua500, // need to be retired\n highlight700: Colors.info075, // need to be retired\n urgency100: Colors.negative100, // need to be retired\n urgency200: Colors.negative200, // need to be retired\n urgency250: Colors.negative200, // need to be retired\n urgency300: Colors.negative200, // need to be retired\n urgency500: Colors.negative500, // need to be retired\n warning: Colors.warning100, // need to be retired\n danger200: Colors.warning100, // need to be retired\n error100: Colors.negative100, // need to be retired\n white: Colors.neutral1000, // need to be retired\n black: Colors.neutral000, // need to be retired\n },\n palette: {\n ...BASE_LIGHT_PALETTE,\n ...STUBHUB_LIGHT,\n },\n typography: {\n size,\n getStyles,\n },\n spacing,\n borderRadius,\n shadow,\n media,\n};\n","import { DefaultTheme } from 'styled-components';\n\nimport { BaseTheme } from './base-theme';\nimport { BASE_LIGHT_PALETTE } from './shared/palette/common-palette-light';\nimport { STUBHUB_LIGHT } from './shared/palette/stubhub-brand-palette';\n\nexport const PurpleTheme: DefaultTheme = {\n ...BaseTheme,\n name: 'purple',\n colors: { ...BaseTheme.colors }, // exactly the same as BaseTheme colors\n palette: {\n ...BASE_LIGHT_PALETTE,\n ...STUBHUB_LIGHT,\n },\n};\n","import { DefaultTheme } from 'styled-components/macro';\n\nimport { Colors } from './constants/colors';\nimport { PurpleTheme } from './legacy';\nimport {\n ThemeColors,\n ThemeMediaQuery,\n ThemeTypography,\n} from './legacy/theme-types';\n\ntype CustomDefaultTheme = DefaultTheme & {\n name: string;\n rounded: boolean;\n floatingInputLabel: boolean;\n filledInLoading: boolean;\n colors: ThemeColors;\n typography: ThemeTypography;\n spacing: (...multipliers: number[]) => string;\n media: ThemeMediaQuery;\n logoPath: string;\n};\n\nconst OldTheme = PurpleTheme as CustomDefaultTheme;\n\nexport const PurpleLegacyTheme: CustomDefaultTheme = {\n ...OldTheme /* We will slowly remove this as will fill in all the blanks */,\n colors: {\n ...OldTheme.colors,\n borderPrimary: Colors.neutral500,\n borderActive: Colors.indigo500,\n borderDark: Colors.neutral400,\n backgroundSecondary: Colors.neutral600,\n backgroundBrandLight: Colors.indigo700,\n },\n};\n","import { DefaultTheme } from 'styled-components/macro';\n\nimport { Colors } from './constants/colors';\nimport { PurpleTheme } from './legacy';\nimport {\n ThemeColors,\n ThemeMediaQuery,\n ThemeTypography,\n} from './legacy/theme-types';\n\ntype CustomDefaultTheme = DefaultTheme & {\n name: string;\n rounded: boolean;\n floatingInputLabel: boolean;\n filledInLoading: boolean;\n colors: ThemeColors;\n typography: ThemeTypography;\n spacing: (...multipliers: number[]) => string;\n media: ThemeMediaQuery;\n logoPath: string;\n};\n\nconst OldTheme = PurpleTheme as CustomDefaultTheme;\n\nexport const TicketUtilLegacyTheme: CustomDefaultTheme = {\n ...OldTheme /* We will slowly remove this as will fill in all the blanks */,\n colors: {\n ...OldTheme.colors,\n primary100: Colors.tuBlue100,\n primary200: Colors.tuBlue200,\n primary300: Colors.tuBlue300,\n primary400: Colors.tuBlue400,\n primary500: Colors.tuBlue500,\n primary600: Colors.tuBlue600,\n borderPrimary: Colors.neutral500,\n borderActive: Colors.tuBlue100,\n borderDark: Colors.neutral400,\n backgroundSecondary: Colors.neutral600,\n backgroundBrandActive: Colors.tuBlue100,\n backgroundBrandLight: Colors.tuBlue600,\n backgroundBrandHover: Colors.tuBlue200,\n backgroundDark: Colors.tuBlue025,\n textBrand: Colors.tuBlue100,\n textBrandHover: Colors.tuBlue200,\n textOnBrandBgLink: Colors.tuBlue600,\n },\n};\n","import { color, sizing } from './themeContract.css';\n\n/**\n * Theme for vanilla-extract\n */\nexport { purpleTheme } from './purpleTheme.css';\nexport { responsiveStyle } from './responsiveStyle';\nexport * as shared from './shared.css';\nexport { ticketUtilTheme } from './ticketUtilTheme.css';\n\nexport const vars = { ...sizing, color };\n/**\n * Theme for styled-components\n */\nexport { PurpleLegacyTheme } from './purpleLegacyTheme';\nexport { TicketUtilLegacyTheme } from './ticketUtilLegacyTheme';\n","export enum IconsFill {\n textPrimary = 'textPrimary',\n textStrong = 'textStrong',\n textBrand = 'textBrand',\n textDisabled = 'textDisabled',\n textSuccess = 'textSuccess',\n textNegative = 'textNegative',\n textInfo = 'textInfo',\n textWarning = 'textWarning',\n currentColor = 'currentColor',\n textInverted = 'textInverted',\n}\n\nexport enum PaymentSize {\n s = 's',\n l = 'l',\n}\n\nexport enum PaymentViewbox {\n square = '0 0 24 24',\n rect = '0 0 36 24',\n}\n","import clsx from 'clsx';\nimport { uniqueId } from 'lodash-es';\nimport React from 'react';\nimport { vars } from 'src/core/themes';\nimport { ThemeColors } from 'src/core/themes/legacy/theme-types';\nimport styled from 'styled-components';\n\nimport { IconsFill } from '../enums';\n\ntype WrapperPropType = {\n size?: string;\n fill?: IconsFill | string;\n title?: string;\n disabled?: boolean;\n align?: 'initial' | 'top' | 'bottom' | 'middle';\n withHoverEffect?: boolean;\n children: JSX.Element | JSX.Element[];\n onClick?: React.MouseEventHandler;\n onMouseDown?: React.MouseEventHandler;\n onMouseEnter?: React.MouseEventHandler;\n onMouseLeave?: React.MouseEventHandler;\n role?: React.AriaRole;\n ariaHidden?: React.AriaAttributes['aria-hidden'];\n className?: string;\n color?: string;\n stroke?: string;\n} & Pick, 'aria-label'>;\n\nexport const SvgWrapper = ({\n children,\n size = vars.iconSize.l,\n fill = IconsFill.textPrimary,\n title,\n disabled = false,\n align = 'initial',\n withHoverEffect = false,\n onClick,\n onMouseDown,\n onMouseEnter,\n onMouseLeave,\n role,\n ariaHidden,\n className,\n color,\n stroke,\n ...props\n}: WrapperPropType) => {\n const newUniqueId = uniqueId();\n\n return (\n \n {size && (\n \n \n \n )}\n {children}\n {title && {title}}\n \n );\n};\n\nconst StyledSvg = styled.svg<{\n withHoverEffect: boolean;\n disabled: boolean;\n align: string;\n}>`\n fill: ${(props) => {\n if (props.disabled) {\n return props.theme.colors.textDisabled;\n }\n if (props.fill === 'currentColor') {\n return 'currentColor';\n }\n return props.theme.colors[props.fill as keyof ThemeColors];\n }};\n cursor: ${(props) => (props.withHoverEffect ? 'pointer' : 'default')};\n pointer-events: ${(props) => (props.disabled ? 'none' : 'inherit')};\n\n &:hover {\n fill: ${(props) => {\n if (props.withHoverEffect && props.fill === 'textPrimary') {\n return props.theme.colors.textPrimaryHover;\n }\n if (props.withHoverEffect && props.fill === 'textBrand') {\n return props.theme.colors.textBrandHover;\n }\n return props.theme.colors[props.fill as keyof ThemeColors];\n }};\n }\n\n vertical-align: ${(props) => props.align};\n`;\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function AccessibilityIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function AisleSeatIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function ArtistIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function BackIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function BarcodeIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function CalendarOutlineIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function ChatIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function CheckIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\ntype ClockIconProps = Omit & { noOutline?: boolean };\n\nexport function ClockIcon({ noOutline, ...props }: ClockIconProps) {\n const fillColor = props.fill || '#9471D7';\n return (\n \n <>\n {!noOutline && (\n \n )}\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function ConnectedIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function CrossIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function DeleteIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport const DollarIcon = (props: IconsProps) => (\n \n \n \n);\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function DownloadIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function EditIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function ErrorOutlineIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function ErrorSolidIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function ExpandIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function FilterIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function FoldIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function ForwardIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function GenericDisclosuresIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function GenericFeatureIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function HideIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport const HistoryIcon = (props: IconsProps): React.ReactNode => (\n \n \n \n);\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function HomeOutlineIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function InfoOutlineIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function InfoSolidIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function ListIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function LoadingIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function LocationOutlineIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function LockIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function MailIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function MinusIcon(props: IconsProps) {\n return (\n \n \n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function MobileTicketIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function MobileTransferIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function MoreIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function MyTicketsOutlineIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function NotifyIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function ObstructedViewIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function PaperTicketOutlineIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function PaperTicketsOutlineIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function ParkingPassIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function PdfIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function PlusIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function PrintAtHomeIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function ProcessingIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function ProfileOutlineIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function ReloadIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function ResetIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function SearchOutlineIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function SearchSolidIcon(props: IconsProps) {\n return (\n \n \n \n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function SeatIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function SeatMapIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function SellOutlineIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function SettingsIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function ShareIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function SuccessOutlineIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import clsx from 'clsx';\nimport { uniqueId } from 'lodash-es';\nimport { ComponentPropsWithoutRef, forwardRef } from 'react';\nimport { vars } from 'src/core/themes';\nimport { mergeProps } from 'src/core/utils';\n\nimport { hoverEffect } from './SvgWrapper.css';\n\nexport type PosIconProps = ComponentPropsWithoutRef<'svg'> & {\n size?: string;\n withHoverEffect?: boolean;\n title?: string;\n disabled?: boolean;\n};\n\ntype ViewBoxProp = {\n /**\n * Custom viewbox definition should be defined specific to the SVG you're pulling from\n */\n viewBox: string;\n};\n\nexport const SvgWrapper = forwardRef(\n function SvgWrapper(\n {\n withHoverEffect,\n size = vars.iconSize.l,\n children,\n height,\n width,\n title,\n fill,\n stroke,\n disabled,\n ...props\n },\n ref\n ) {\n fill = disabled ? vars.color.textDisabled : fill;\n\n const [parsedWidth, parsedHeight] = [width, height].map((attr) =>\n attr != null ? parseInt(attr.toString(), 10) : attr\n );\n\n const inheritedWidth = parsedWidth ?? parsedHeight ?? 24;\n const inheritedHeight = parsedHeight ?? parsedWidth ?? 24;\n const newUniqueId = uniqueId();\n\n return (\n \n {size && (\n \n \n \n )}\n {children}\n {title && {title}}\n \n );\n }\n);\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function TicketAlertOutlineIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function ToBeDeterminedIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function UnHideIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function UploadIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function WalletOutlineIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function WarningOutlineIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { IconsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/icon-wrapper';\n\nexport function WarningSolidIcon(props: IconsProps) {\n return (\n \n \n \n );\n}\n","import { PosIconProps, SvgWrapper } from 'src/svgs/SvgWrapper';\n\nexport function ArrowDownIcon(props: PosIconProps) {\n return (\n \n \n \n );\n}\n","import { PosIconProps, SvgWrapper } from 'src/svgs/SvgWrapper';\n\nexport function ArrowDownIcon7(props: PosIconProps) {\n return (\n \n \n \n );\n}\n","import { PosIconProps, SvgWrapper } from 'src/svgs/SvgWrapper';\n\nexport function ArrowUpIcon(props: PosIconProps) {\n return (\n \n \n \n );\n}\n","import { PosIconProps, SvgWrapper } from 'src/svgs/SvgWrapper';\n\nexport function ArrowUpIcon7(props: PosIconProps) {\n return (\n \n \n \n );\n}\n","import { PosIconProps, SvgWrapper } from 'src/svgs/SvgWrapper';\n\nexport function CalendarIcon(props: PosIconProps) {\n return (\n \n \n \n );\n}\n","import { PosIconProps, SvgWrapper } from 'src/svgs/SvgWrapper';\n\nexport function ChevronDownIcon(props: PosIconProps) {\n return (\n \n \n \n );\n}\n","import { PosIconProps, SvgWrapper } from 'src/svgs/SvgWrapper';\n\nexport function ChevronLeftIcon(props: PosIconProps) {\n return (\n \n \n \n );\n}\n","import { PosIconProps, SvgWrapper } from 'src/svgs/SvgWrapper';\n\nexport function ChevronRightIcon(props: PosIconProps) {\n return (\n \n \n \n );\n}\n","import { PosIconProps, SvgWrapper } from 'src/svgs/SvgWrapper';\n\nexport function ChevronUpIcon(props: PosIconProps) {\n return (\n \n \n \n );\n}\n","import { PosIconProps, SvgWrapper } from 'src/svgs/SvgWrapper';\n\nexport function SigninIcon(props: PosIconProps) {\n return (\n \n \n \n );\n}\n","import { PosIconProps, SvgWrapper } from 'src/svgs/SvgWrapper';\n\nexport function SignoutIcon(props: PosIconProps) {\n return (\n \n \n \n );\n}\n","import React from 'react';\n\nimport { PaymentSize, PaymentViewbox } from '../enums';\n\ntype WrapperPropType = {\n isSquare?: boolean;\n size?: PaymentSize;\n title?: string;\n disabled?: boolean;\n children: JSX.Element | JSX.Element[];\n onClick?: React.MouseEventHandler;\n onMouseDown?: React.MouseEventHandler;\n onMouseEnter?: React.MouseEventHandler;\n onMouseLeave?: React.MouseEventHandler;\n};\n\nconst sizes = {\n [PaymentSize.s]: {\n width: '24px',\n height: '16px',\n },\n [PaymentSize.l]: {\n width: '36px',\n height: '24px',\n },\n};\n\nexport const SvgWrapper = ({\n children,\n isSquare,\n size = PaymentSize.l,\n title,\n disabled = false,\n onClick,\n onMouseDown,\n onMouseEnter,\n onMouseLeave,\n}: WrapperPropType) => (\n \n {children}\n \n);\n","import { PaymentsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/payment-wrapper';\n\nexport function BankAccountIcon(props: PaymentsProps) {\n return (\n \n \n \n \n \n \n );\n}\n","import { PaymentsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/payment-wrapper';\n\nexport function GeneralIcon(props: PaymentsProps) {\n return (\n \n \n \n \n \n \n );\n}\n","import { PaymentsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/payment-wrapper';\n\nexport function PaypalIcon(props: PaymentsProps) {\n return (\n \n \n \n \n \n \n \n );\n}\n","import { PaymentsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/payment-wrapper';\n\nexport function WalletIcon(props: PaymentsProps) {\n return (\n \n \n \n );\n}\n","import { PaymentsProps } from '../icon-types';\nimport { SvgWrapper } from '../svg-wrapper/payment-wrapper';\n\nexport function WireIcon(props: PaymentsProps) {\n return (\n \n \n \n );\n}\n","import { RefObject, useRef } from 'react';\n\nexport type AnimateScrollDirection = 'up' | 'down' | 'left' | 'right';\n\nexport type AnimateScrollTimingFn = (elapsed: number) => number;\n\n/**\n * Timing function that slightly speeds up the scroll as time goes on.\n * @param elapsed\n * @returns `elapsed^1.05`\n */\nexport const defaultTimingFn: AnimateScrollTimingFn = (elapsed: number) =>\n Math.pow(elapsed, 1.05);\n\n/**\n * Hook for animating scrolling in a given direction.\n * @param ref\n * @param options\n * @returns\n */\nexport function useAnimateScroll(\n ref: RefObject,\n options?: {\n /**\n * Pixels per second.\n */\n pxPerSecond?: number;\n /**\n * This is used to modify the speed of the scroll.\n *\n * eg. If you return `Math.pow(elapsed, 1.1)`, this speeds up the scroll as you continue\n * scrolling.\n * @param elapsed Time elapsed in milliseconds\n * @returns Modified time elapsed in milliseconds\n */\n timingFn?: (elapsed: number) => number;\n }\n) {\n const { pxPerSecond = 500, timingFn = defaultTimingFn } = options ?? {};\n\n const scrollDirection = useRef();\n const rafHandle = useRef();\n const startScrollState = useRef<{ scrollTop: number; scrollLeft: number }>();\n const startTimestamp = useRef();\n const prevTimestamp = useRef();\n\n const animateScroll = (timestamp: number) => {\n if (ref.current) {\n const { scrollTop: startScrollTop, scrollLeft: startScrollLeft } =\n startScrollState.current ??\n (startScrollState.current = {\n scrollTop: ref.current.scrollTop,\n scrollLeft: ref.current.scrollLeft,\n });\n\n if (prevTimestamp.current !== timestamp) {\n const elapsed =\n timestamp -\n (startTimestamp.current ?? (startTimestamp.current = timestamp));\n const offset = pxPerSecond * (timingFn(elapsed) / 1000);\n switch (scrollDirection.current) {\n case 'up':\n ref.current.scrollTop = Math.max(startScrollTop - offset, 0);\n break;\n case 'down':\n {\n const maxScrollTop =\n ref.current.scrollHeight - ref.current.clientHeight;\n ref.current.scrollTop = Math.min(\n startScrollTop + offset,\n maxScrollTop\n );\n }\n break;\n case 'left':\n ref.current.scrollLeft = Math.max(startScrollLeft - offset, 0);\n break;\n case 'right':\n {\n const maxScrollLeft =\n ref.current.scrollWidth - ref.current.clientWidth;\n ref.current.scrollLeft = Math.min(\n startScrollLeft + offset,\n maxScrollLeft\n );\n }\n break;\n }\n prevTimestamp.current = timestamp;\n }\n }\n\n if (scrollDirection.current !== undefined) {\n rafHandle.current = requestAnimationFrame(animateScroll);\n }\n };\n\n return {\n scrollDirection,\n startScroll(direction: AnimateScrollDirection) {\n scrollDirection.current = direction;\n rafHandle.current = requestAnimationFrame(animateScroll);\n },\n endScroll() {\n if (rafHandle.current !== undefined) {\n cancelAnimationFrame(rafHandle.current);\n }\n scrollDirection.current = undefined;\n rafHandle.current = undefined;\n startScrollState.current = undefined;\n startTimestamp.current = undefined;\n prevTimestamp.current = undefined;\n },\n };\n}\n","import { isEqual } from 'lodash-es';\nimport { RefObject, useEffect, useState } from 'react';\n\nexport type ScrollEdgesState = {\n /**\n * `true` if scrolled to the very top of the scroll container\n */\n atTop: boolean;\n /**\n * `true` if scrolled to the very bottom of the scroll container\n */\n atBottom: boolean;\n /**\n * `true` if scrolled to the very left of the scroll container\n */\n atLeft: boolean;\n /**\n * `true` if scrolled to the very right of the scroll container.\n */\n atRight: boolean;\n};\n\n/**\n * Since the calculation for `atBottom` and `atRight` might have rounding errors due to the scroll\n * position, use a threshold to check whether we are at the bottom or right edge.\n */\nconst EDGE_THRESHOLD = 1;\n\nconst getScrollEdgesState = (el: HTMLElement): ScrollEdgesState => {\n return {\n atTop: el.scrollTop === 0,\n atBottom:\n Math.abs(el.scrollHeight - el.scrollTop - el.clientHeight) <=\n EDGE_THRESHOLD,\n atLeft: el.scrollLeft === 0,\n atRight:\n Math.abs(el.scrollWidth - el.scrollLeft - el.clientWidth) <=\n EDGE_THRESHOLD,\n };\n};\n\n/**\n * Hook for tracking whether user has scrolled to the edge of the given scroll container.\n * @param ref\n * @returns `ScrollEdgesState` with a boolean for whether scroll container is at each edge.\n */\nexport function useScrollEdges(ref: RefObject) {\n const [scrollEdgesState, _setScrollEdgesState] = useState({\n // since this is the most likely case, we start with top and left as true by default\n atTop: true,\n atBottom: false,\n atLeft: true,\n atRight: false,\n });\n const setScrollEdgesState = (val: ScrollEdgesState) =>\n _setScrollEdgesState((prev) => (isEqual(prev, val) ? prev : val));\n\n useEffect(() => {\n const el = ref.current;\n const resizeObserver = new ResizeObserver(() => {\n if (el) {\n setScrollEdgesState(getScrollEdgesState(el));\n }\n });\n if (el) {\n resizeObserver.observe(el);\n }\n return () => resizeObserver.disconnect();\n }, [ref]);\n\n useEffect(() => {\n const el = ref.current;\n const handleScroll = () => {\n if (el) {\n setScrollEdgesState(getScrollEdgesState(el));\n }\n };\n if (el) {\n setScrollEdgesState(getScrollEdgesState(el));\n el.addEventListener('scroll', handleScroll, {\n capture: false,\n passive: true,\n });\n }\n return () => {\n if (el) {\n el.removeEventListener('scroll', handleScroll);\n }\n };\n }, [ref]);\n\n return scrollEdgesState;\n}\n","import * as RadixScrollArea from '@radix-ui/react-scroll-area';\nimport clsx from 'clsx';\nimport {\n ComponentPropsWithoutRef,\n createContext,\n forwardRef,\n MutableRefObject,\n RefObject,\n useContext,\n useEffect,\n useImperativeHandle,\n useRef,\n} from 'react';\nimport { vars } from 'src/core/themes';\nimport { styledComponent } from 'src/core/utils';\nimport {\n BackIcon,\n ExpandIcon,\n FoldIcon,\n ForwardIcon,\n IconsFill,\n} from 'src/svgs/Viagogo';\n\nimport * as styles from './ScrollArea.css';\nimport { AnimateScrollDirection, useAnimateScroll } from './useAnimateScroll';\nimport { useScrollEdges } from './useScrollEdges';\n\nconst ScrollAreaContext = createContext<{\n viewportRef: RefObject;\n}>({\n viewportRef: {\n current: null,\n },\n});\n\nconst Root = styledComponent(RadixScrollArea.Root, styles.root);\n\nconst Viewport = styledComponent(RadixScrollArea.Viewport, styles.viewport);\n\nconst Scrollbar = styledComponent(RadixScrollArea.Scrollbar, styles.scrollbar);\n\nconst Thumb = styledComponent(RadixScrollArea.Thumb, styles.thumb);\n\nconst Corner = RadixScrollArea.Corner;\n\nexport interface ScrollAreaActions {\n startScroll: (direction: AnimateScrollDirection) => void;\n}\n\nexport interface ScrollAreaRefActions {\n scrollAreaRefActions?: MutableRefObject;\n scrollButtonClassName?: Record<'up' | 'down' | 'left' | 'right', string>;\n}\n\n/**\n * Use for a scrolling area that overlays the scrollbar on top of the content instead of offsetting\n * the content to the side.\n */\nexport const ScrollArea = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef & {\n /**\n * Whether to show arrows at the edge of the scroll container that can be hovered to scroll.\n */\n showScrollEdges?: boolean;\n } & ScrollAreaRefActions\n>(function ScrollArea(\n {\n children,\n showScrollEdges = false,\n scrollAreaRefActions,\n scrollButtonClassName,\n ...props\n },\n ref\n) {\n const viewportRef = useRef(null);\n return (\n \n \n {children}\n {showScrollEdges && (\n \n )}\n \n \n \n \n \n \n \n \n \n );\n});\n\ntype ScrollEdgesProps = ScrollAreaRefActions;\n\nfunction ScrollEdges({\n scrollAreaRefActions,\n scrollButtonClassName,\n}: ScrollEdgesProps) {\n const { viewportRef } = useContext(ScrollAreaContext);\n const { scrollDirection, startScroll, endScroll } =\n useAnimateScroll(viewportRef);\n const edges = useScrollEdges(viewportRef);\n\n useEffect(() => {\n if (\n (scrollDirection.current === 'up' && edges.atTop) ||\n (scrollDirection.current === 'down' && edges.atBottom) ||\n (scrollDirection.current === 'left' && edges.atLeft) ||\n (scrollDirection.current === 'right' && edges.atRight)\n ) {\n endScroll();\n }\n }, [edges, scrollDirection, endScroll]);\n\n useImperativeHandle(\n scrollAreaRefActions,\n () => ({\n startScroll: startScroll,\n }),\n [startScroll]\n );\n\n return (\n <>\n {!edges.atTop && (\n startScroll('up')}\n onMouseLeave={() => endScroll()}\n >\n \n \n )}\n {!edges.atBottom && (\n startScroll('down')}\n onMouseLeave={() => endScroll()}\n >\n \n \n )}\n {!edges.atLeft && (\n startScroll('left')}\n onMouseLeave={() => endScroll()}\n >\n \n \n )}\n {!edges.atRight && (\n startScroll('right')}\n onMouseLeave={() => endScroll()}\n >\n \n \n )}\n \n );\n}\n","import * as Select from '@radix-ui/react-select';\nimport { clsx } from 'clsx';\nimport {\n ComponentPropsWithoutRef,\n createContext,\n forwardRef,\n ReactNode,\n useContext,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport { vars } from 'src/core/themes';\nimport {\n mergeProps,\n RADIX_COLLISION_PADDING,\n RADIX_SIDE_OFFSET,\n} from 'src/core/utils';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { CheckIcon, ExpandIcon, FoldIcon, IconsFill } from 'src/svgs/Viagogo';\n\nimport { Button } from '../Button';\nimport * as styles from './Select.css';\n\nconst SelectContext = createContext<{\n isDefaultValueSelected: boolean;\n}>({\n /**\n * Whether the default value is selected.\n */\n isDefaultValueSelected: true,\n});\n\nexport function Root(props: ComponentPropsWithoutRef) {\n const [isDefaultValueSelected, setIsDefaultValueSelected] = useState(\n (props.value ?? props.defaultValue) === props.defaultValue\n );\n return (\n \n {\n setIsDefaultValueSelected(value === props.defaultValue);\n },\n },\n props\n )}\n />\n \n );\n}\n\nexport const Trigger = forwardRef<\n HTMLButtonElement,\n ComponentPropsWithoutRef & { hideFoldButton?: boolean }\n>(function Trigger(\n {\n children,\n variant = 'outlineGray',\n textColor = 'strong',\n shape = 'rect',\n hideFoldButton,\n ...props\n },\n ref\n) {\n const { isDefaultValueSelected } = useContext(SelectContext);\n return (\n \n \n {children}\n {!hideFoldButton && (\n <>\n \n \n \n \n \n \n \n )}\n \n \n );\n});\n\nexport const Value = forwardRef<\n HTMLSpanElement,\n ComponentPropsWithoutRef\n>(({ className, style, ...props }, ref) => {\n return (\n \n \n \n );\n});\nValue.displayName = 'Value';\n\nexport const Content = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef\n>(function Content({ children, ...props }, ref) {\n // This is for known issue:\n // Selecting an option triggers a touch event on elements positioned behind\n // https://github.com/radix-ui/primitives/issues/1658\n // It only happens on mobile and has no official solution yet\n // This is a workaround adapted from https://github.com/radix-ui/primitives/issues/1658#issuecomment-1695494301\n const isMobile = useMatchMedia('mobile');\n const contentRef = useRef(null);\n const onTouchEnd = (e: TouchEvent) => e.preventDefault();\n useEffect(() => {\n return () => {\n if (isMobile)\n contentRef.current?.removeEventListener('touchend', onTouchEnd);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return (\n \n {\n if (ref != null) {\n if (typeof ref === 'function') {\n ref(elem);\n } else {\n ref.current = elem;\n }\n }\n if (isMobile) {\n elem?.addEventListener('touchend', onTouchEnd);\n contentRef.current = elem;\n }\n }}\n position=\"popper\"\n sideOffset={RADIX_SIDE_OFFSET}\n collisionPadding={RADIX_COLLISION_PADDING}\n {...mergeProps({ className: styles.content }, props)}\n >\n \n \n \n {children}\n \n \n \n \n \n );\n});\n\nexport const Item = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef & { prefixIcon?: ReactNode }\n>(function Item({ children, prefixIcon, disabled, ...props }, ref) {\n return (\n \n {prefixIcon ? (\n
\n {prefixIcon}\n {children}\n
\n ) : (\n {children}\n )}\n \n \n \n \n );\n});\n","import { clsx } from 'clsx';\nimport { ReactNode } from 'react';\nimport { styled } from 'src/core/utils';\nimport * as styles from './SimpleTable.css';\n\nexport const Table = styled('table', styles.table);\n\ninterface TheadProps {\n children?: ReactNode;\n showBottomBorder?: boolean;\n}\nexport const Thead = ({ showBottomBorder = true, children }: TheadProps) => {\n return (\n \n {children}\n \n );\n};\n\nexport const Tbody = styled('tbody', styles.tbody);\n\nexport const Tr = styled('tr', styles.tr);\n\nexport const Th = styled('th', styles.th);\n\nexport const Td = styled('td', styles.td);\n","import * as RadixSwitch from '@radix-ui/react-switch';\nimport { mergeProps } from 'src/core/utils';\n\nimport * as styles from './Switch.css';\n\nexport const Switch = (props: RadixSwitch.SwitchProps) => (\n \n \n \n);\n","import { RecipeVariants } from '@vanilla-extract/recipes';\nimport { ComponentPropsWithoutRef, forwardRef, ReactElement } from 'react';\nimport { mergeProps } from 'src/core/utils';\n\nimport * as styles from './TextArea.css';\n\nexport const Root = forwardRef<\n HTMLDivElement,\n Omit, 'onChange' | 'onKeyDown' | 'onKeyUp'> &\n RecipeVariants & { disabled?: boolean }\n>(function Root(\n { variant = 'regular', shape = 'square', state, children, ...props },\n ref\n): ReactElement {\n return (\n \n {children}\n \n );\n});\n\nexport const Area = forwardRef<\n HTMLTextAreaElement,\n Omit, 'type' | 'children'> &\n RecipeVariants\n>(function Area({ alignment = 'left', ...props }, ref): ReactElement {\n return (\n \n );\n});\n","import { RecipeVariants } from '@vanilla-extract/recipes';\nimport { ComponentPropsWithoutRef, forwardRef, ReactElement } from 'react';\nimport { mergeProps } from 'src/core/utils';\n\nimport * as styles from './TextField.css';\n\nexport const Root = forwardRef<\n HTMLDivElement,\n Omit, 'onChange' | 'onKeyDown' | 'onKeyUp'> &\n RecipeVariants & { disabled?: boolean }\n>(function Root(\n { variant = 'regular', shape = 'square', state, children, ...props },\n ref\n): ReactElement {\n return (\n \n {children}\n \n );\n});\n\nexport const Input = forwardRef<\n HTMLInputElement,\n Omit, 'type' | 'children'> &\n RecipeVariants & {\n // We want to restrict the type prop to only textual type\n // Other input types will be handled with another control\n type?:\n | 'date'\n | 'datetime-local'\n | 'email'\n | 'file'\n | 'month'\n | 'number'\n | 'password'\n | 'search'\n | 'tel'\n | 'text'\n | 'time'\n | 'url'\n | 'week';\n }\n>(function Input(\n { type = 'text', alignment = 'left', onKeyDown, ...props },\n ref\n): ReactElement {\n return (\n {\n if (e.key === 'ArrowLeft' || e.key === 'ArrowRight') {\n // if the key presss is left or right arrow, we want to keep it from affecting outside controls\n e.stopPropagation();\n }\n\n onKeyDown?.(e);\n }}\n />\n );\n});\n\nexport const Area = forwardRef<\n HTMLTextAreaElement,\n Omit, 'type' | 'children'> &\n RecipeVariants\n>(function Area({ alignment = 'left', ...props }, ref): ReactElement {\n return (\n \n );\n});\n","import * as RadixTooltip from '@radix-ui/react-tooltip';\nimport clsx from 'clsx';\nimport {\n ComponentPropsWithoutRef,\n CSSProperties,\n forwardRef,\n ReactNode,\n} from 'react';\nimport { mergeProps, RADIX_COLLISION_PADDING } from 'src/core/utils';\n\nimport * as styles from './Tooltip.css';\n\nexport const Provider = RadixTooltip.Provider;\n\nexport const Root = RadixTooltip.Root;\n\nexport const Trigger = RadixTooltip.Trigger;\n\nexport const Content = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef & {\n contentVariant?: 'theme' | 'light' | 'dark' | 'darkGray';\n }\n>(function Content({ children, contentVariant, ...props }, ref) {\n return (\n \n \n {children}\n \n \n \n );\n});\n\nexport const Tooltip = ({\n triggerContent,\n children,\n delayDuration = 300,\n align = 'start',\n contentVariant,\n contentStyle,\n open,\n ...rest\n}: RadixTooltip.TooltipTriggerProps & {\n triggerContent: ReactNode;\n delayDuration?: RadixTooltip.TooltipProps['delayDuration'];\n onOpenChange?: RadixTooltip.TooltipProps['onOpenChange'];\n open?: RadixTooltip.TooltipProps['open'];\n align?: RadixTooltip.TooltipContentProps['align'];\n contentVariant?: 'theme' | 'light' | 'dark' | 'darkGray';\n contentStyle?: CSSProperties;\n}) => {\n return (\n \n \n \n {triggerContent}\n \n \n {children}\n
\n \n \n );\n};\n","import clsx from 'clsx';\nimport { ComponentPropsWithoutRef, CSSProperties, ReactNode } from 'react';\n\nimport { Button } from '../Button';\nimport { Popover } from '../Popover';\nimport * as styles from './TooltipPopover.css';\n\nexport const TooltipPopover = ({\n triggerContent,\n children,\n onClosed,\n contentVariant,\n contentStyle,\n ...rest\n}: ComponentPropsWithoutRef & {\n triggerContent: ReactNode;\n title?: string;\n onClosed?: () => void;\n contentVariant?: 'theme' | 'light' | 'dark' | 'darkGray';\n contentStyle?: CSSProperties;\n}) => {\n return (\n {\n if (!open) {\n onClosed?.();\n }\n }}\n >\n \n {\n e.stopPropagation();\n }}\n >\n {triggerContent}\n \n \n \n {children}\n \n \n \n );\n};\n","import clsx from 'clsx';\nimport { FormEvent } from 'react';\nimport { vars } from 'src/core/themes';\nimport { ArrowDownIcon, ArrowUpIcon } from 'src/svgs/Viagogo';\n\nimport { Button } from '../Button';\nimport { Stack } from '../Stack';\nimport * as styles from './UpDownComboButton.css';\n\nexport const UpDownComboButton = ({\n disabled,\n onUpClick,\n onDownClick,\n isCondensedView,\n}: {\n disabled?: boolean;\n onUpClick: (e: FormEvent) => void;\n onDownClick: (e: FormEvent) => void;\n isCondensedView?: boolean;\n}) => {\n return (\n \n \n \n \n \n \n \n \n );\n};\n","import { ComponentProps } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Button } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nexport const OkButton = ({\n textContentId = ContentId.OK,\n variant = 'regular',\n ...rest\n}: { textContentId?: ContentId } & Omit<\n ComponentProps,\n 'children'\n>) => {\n return (\n \n );\n};\n","import { createContext, ReactNode, useContext, useState } from 'react';\n\nexport type IGenericDialogContext = {\n isDialogOpen: boolean;\n setIsDialogOpen: (isOpen: boolean) => void;\n};\n\nexport const GenericDialogContext = createContext({\n isDialogOpen: false,\n setIsDialogOpen: () => undefined,\n});\n\nexport const useGenericDialogContext = () => useContext(GenericDialogContext);\n\nexport function GenericDialogProvider({ children }: { children: ReactNode }) {\n const [isDialogOpen, setIsDialogOpen] = useState(false);\n\n return (\n \n {children}\n \n );\n}\n","import { SiteZoomOption } from 'src/contexts/SiteTheme/SiteThemeContext';\n\nimport { useMatchMedia } from './useMatchMedia';\n\nexport const useDefaultZoomOption = () => {\n const isMobile = useMatchMedia('mobile');\n const isTablet = useMatchMedia('tablet');\n const isDesktop = useMatchMedia('desktop');\n const isLargeDesktop = useMatchMedia('largeDesktop');\n\n const defaultZoomOption = isMobile\n ? SiteZoomOption['100%']\n : isTablet\n ? SiteZoomOption['65%']\n : isLargeDesktop\n ? SiteZoomOption['100%']\n : isDesktop\n ? SiteZoomOption['75%']\n : SiteZoomOption['100%'];\n\n return defaultZoomOption;\n};\n","import * as Sentry from '@sentry/react';\nimport { ErrorTypes } from 'src/contexts/ErrorBoundaryContext';\n\n/*\nThis is meant for handling errors for any api calls, default to logging in console\nIf unauthorized, will redirect to the /unauthorized route\nCan supply a generic onError which can perform any custom action\n*/\nexport const tryInvokeApi = async (\n f: () => Promise,\n onError?: (error: ErrorTypes) => void,\n onFinally?: () => void\n) => {\n try {\n return await f();\n } catch (error: unknown) {\n console.error(error);\n if (!onError) {\n try {\n Sentry.captureException(error);\n } catch (err) {\n console.warn('Sentry log request failed', err);\n }\n }\n onError?.(error as ErrorTypes);\n } finally {\n onFinally?.();\n }\n\n return null;\n};\n","import * as Sentry from '@sentry/react';\nimport React, {\n createContext,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { MainRoute } from 'src/navigations/Routes/MainRoute';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n AdminClient,\n CoBrandId,\n LoginContext,\n PosClientConfig,\n ReactAppContext,\n} from 'src/WebApiController';\n\nexport interface IAppContext {\n appContext?: ReactAppContext;\n mainRoute: MainRoute;\n setMainRoute: (view: MainRoute) => void;\n loginContext?: LoginContext | null;\n activeAccountUserId?: string | null;\n activeAccountWebClientConfig: PosClientConfig;\n setLoginContext: (context?: LoginContext | null) => void;\n cobrandId?: CoBrandId;\n overrideCoBrandId: (cobrandId: CoBrandId) => void;\n}\n\nconst emptyAppContext: IAppContext = {\n appContext: undefined,\n mainRoute: MainRoute.Home,\n loginContext: undefined,\n activeAccountWebClientConfig: {},\n setLoginContext: () => {},\n setMainRoute: () => {},\n cobrandId: undefined,\n overrideCoBrandId: () => {},\n};\n\nexport const AppContext = createContext(emptyAppContext);\n\nexport const useAppContext = () => useContext(AppContext);\n\nexport const AppContextProvider = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const [loadingAppContext, setLoadingAppContext] = useState(false);\n const [reactAppContext, setReactAppContext] = useState();\n const [loginContext, setLoginContext] = useState<\n LoginContext | null | undefined\n >();\n const [mainRoute, setMainRoute] = useState(MainRoute.Home);\n\n const [cobrandIdOverride, setCobrandIdOverride] = useState<\n CoBrandId | undefined\n >(undefined);\n\n const initAppContextIfNeeded = useCallback(async () => {\n setLoadingAppContext(true);\n tryInvokeApi(\n async () => {\n setReactAppContext(await new AdminClient({}).getAppContext());\n setLoadingAppContext(false);\n },\n (error) => {\n showErrorDialog('AdminClient.getAppContext', error);\n }\n );\n }, [showErrorDialog]);\n\n useEffect(() => {\n if (!loadingAppContext && reactAppContext === undefined) {\n initAppContextIfNeeded();\n }\n }, [\n initAppContextIfNeeded,\n loginContext,\n loadingAppContext,\n reactAppContext,\n ]);\n\n const setLoginContextWrapper = useCallback((newLC?: LoginContext | null) => {\n if (newLC?.isSuccess && newLC?.user?.activeAccount.id != null) {\n // Add logging info of user context\n Sentry.setTag('seller-account-id', newLC.user.activeAccount.id);\n Sentry.setTag('seller-account', newLC.user.activeAccount.accountName);\n Sentry.setTag('user-id', newLC.user.userId);\n Sentry.setTag('user-name', newLC.user.userName);\n Sentry.setTag(\n 'impersonated-user-id',\n newLC.user.activeAccount?.impersonatedUserId\n );\n Sentry.setTag(\n 'impersonated-user',\n newLC.user.activeAccount?.impersonatedUsername\n );\n\n setLoginContext(newLC);\n }\n }, []);\n\n const activeAccountWebClientConfig = useMemo(\n () => ({\n activeAccountId: loginContext?.user?.activeAccount?.id,\n }),\n [loginContext?.user?.activeAccount?.id]\n );\n\n return (\n \n {children}\n \n );\n};\n","import { parseInt } from 'lodash-es';\nimport { Marketplace } from 'src/WebApiController';\n\nexport const STUBHUB_LOGO_IMAGE =\n 'https://img.vggcdn.net/images/Assets/Icons/bfx/stubhub-logo-merch-purple-mweb.440b3765.svg';\n\n// Regex for URL validation, basically any printable ASCII characters followed by a dot and then more printable ASCII characters\n// Intentionally not using a more complex regex to avoid false negatives\n// This is enough to filter out barcodes and other non-URL strings\nexport const URL_REGEX = /^([ -~])+\\.([ -~])+$/;\nexport const SEAT_RANGE_REGEX = /(\\w+)\\s*-\\s*(\\w+)/;\n\nexport const SaleDeeplinkQueryParam = 'uniqueSaleId';\nexport const InventoryDeeplinkQueryParam = 'uniqueInventoryId';\nexport const PurchaseDeeplinkQueryParam = 'uniquePurchaseId';\nexport const AdCampaignQueryParam = 'adCampaignId';\nexport const AdGroupListingsQueryParam = 'adGroupId';\nexport const PurchaseFromEmailPoQueryParam = 'fromEmailPo';\nexport const EventIdQueryParam = 'eventId';\nexport const SearchResultIdQueryParam = 'searchResultId';\nexport const VendorIdQueryParam = 'vendorId';\nexport const MarketplacePaymentIdDeeplinkQueryParam =\n 'uniqueMarketplacePaymentId';\n\nexport const EventSessionIdQueryParam = 'sessionId';\nexport const EventSessionRoleQueryParam = 'sessionRole';\n\nexport const DemandDashboardIsOnSaleEventQueryParam = 'isOnSaleEvent';\nexport const DemandDashboardEventIdQueryParam = 'eventId';\n\nexport const TICKETMASTER_APP_ID = 2;\nexport const EMPTY_SELLER_USER_ID = '00000000-0000-0000-0000-000000000000';\n\nexport const FULFILLMENT_PROVIDER_SELLER_USER_IDS = new Set(['']); // TODO: populate this after fulfillment providers are created\n\nexport const REACT_QUERY_PERSIST_TO_STORAGE_INTERVAL_IN_MS = 30000; // 30 sec\nexport const REACT_QUERY_CACHE_MAX_AGE_IN_MS = 1000 * 60 * 60 * 24; // 1 day\n\n// http://ecma-international.org/ecma-262/5.1/#sec-15.9.1.1\nexport const MAX_DATE = new Date(8640000000000000);\nexport const MIN_DATE = new Date(-8640000000000000);\n\nexport const DATA_REFRESH_RATE_IN_MILLIS_FAST = 5000; // 5 sec\nexport const DATA_REFRESH_RATE_IN_MILLIS_SHORT = 2 * 60 * 1000; // 2 min;\nexport const DATA_REFRESH_RATE_IN_MILLIS_LONG = 5 * 60 * 5000; // 5 min;\n\nexport const UK_COUNTRY_CODES = ['GB', 'GBR']; // the 2 and 3 letter codes for Great Britain\nexport const US_COUNTRY_CODES = ['US', 'USA', 'CA', 'PR'];\n\nexport const SuspiciousPriceChangeThreshold = 25;\n\nexport const MAX_NUM_OF_ITEMS_FOR_FLATTENED_VIEWS =\n parseInt(process.env.MAX_NUM_OF_ITEMS_IN_TABLES ?? '') || 10000; // This seems to be a good thredshold where bulk-edit and other operations would still perform\nexport const MAX_NUM_OF_ITEMS_FOR_REPORT_VIEWS =\n parseInt(process.env.MAX_NUM_OF_ITEMS_IN_REPORTS ?? '') || 10000;\n\nexport const VenueMapConfigPlaceholder = 'VENUE_MAP_CONFIG';\nexport const VenueMapVersionPlaceholder = 'VENUE_MAP_VERSION';\nexport const VenueMapUrl = `https://img.vggcdn.net/svgv2/${VenueMapConfigPlaceholder}.svg?v=${VenueMapVersionPlaceholder}`;\nexport const VenueMapV3Url = `https://img.vggcdn.net/svgv3/${VenueMapConfigPlaceholder}.svg?v=${VenueMapVersionPlaceholder}`;\n\n// process.env.**constants** go here\nexport const REACT_APP_STUBHUB_BASE_URL =\n process.env.REACT_APP_STUBHUB_BASE_URL;\nexport const REACT_APP_VIAGOGO_BASE_URL =\n process.env.REACT_APP_VIAGOGO_BASE_URL;\nexport const REACT_APP_CLOUDINARY_BASE_ADDRESS =\n process.env.REACT_APP_CLOUDINARY_BASE_ADDRESS;\nexport const REACT_APP_ASSETS_URL = process.env.REACT_APP_ASSETS_URL;\nexport const REACT_APP_APP_INSIGHTS = process.env.REACT_APP_APP_INSIGHTS;\nexport const REACT_APP_NAME =\n process.env.REACT_APP_NAME ?? 'StubHub.PointOfSale.Site';\nexport const REACT_APP_STUBHUB_MY_HUB_BASE_URL =\n process.env.REACT_APP_STUBHUB_MY_HUB_BASE_URL;\nexport const REACT_APP_STUBHUB_UK_URL = process.env.REACT_APP_STUBHUB_UK_URL;\nexport const REACT_APP_MESSAGES_BRIDGE_URL =\n process.env.REACT_APP_MESSAGES_BRIDGE_URL;\nexport const REACT_APP_REPORTS_BRIDGE_URL =\n process.env.REACT_APP_REPORTS_BRIDGE_URL;\n\nexport const DEFAULT_AUTO_GENERATED_PAYMENT_METHOD =\n 'Unknown_Payment_Auto_Generated';\n\n// Marketplace Event URL\nexport const MarketplaceEventIdPlaceholder = 'MKP_EVENT_ID';\nexport const MarketplaceEventUrlTemplate = {\n [Marketplace.Ticketmaster]: `https://www.ticketmaster.com/event/${MarketplaceEventIdPlaceholder}`,\n [Marketplace.VividSeats]: `https://www.vividseats.com/e/production/${MarketplaceEventIdPlaceholder}`,\n [Marketplace.SeatGeek]: `https://seatgeek.com/e/events/${MarketplaceEventIdPlaceholder}`,\n [Marketplace.Gametime]: `https://gametime.co/events/${MarketplaceEventIdPlaceholder}`,\n} as Record;\n","import { TelemetryProvider } from '@viagogo/telemetry-react';\nimport { PropsWithChildren } from 'react';\nimport {\n REACT_APP_APP_INSIGHTS,\n REACT_APP_NAME,\n} from 'src/utils/constants/constants';\n\nexport const AppTelemetryProvider = ({\n children,\n}: PropsWithChildren) => {\n if (REACT_APP_APP_INSIGHTS && REACT_APP_NAME) {\n return (\n \n {children}\n \n );\n }\n return <>{children};\n};\n","import { useQuery, UseQueryResult } from '@tanstack/react-query';\nimport { createContext, PropsWithChildren, useMemo } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { SellerUserClient, UserSetting } from 'src/WebApiController';\n\ntype UserSettingsMap = {\n [key in keyof typeof UserSetting]?: string;\n};\n\ntype ISellerUserSettingsContext = {\n queryResult: UseQueryResult;\n contextSettingIds: UserSetting[];\n contextQueryKey: (string | boolean | UserSetting[] | undefined)[];\n} | null;\n\nexport const SellerUserSettingsContext =\n createContext(null);\n\ntype SellerUserSettingsProviderProps = PropsWithChildren<{\n initialUserSettingIds: UserSetting[];\n currentLoginUserOnly: boolean;\n}>;\n\nexport const SellerUserSettingsProvider = ({\n initialUserSettingIds,\n currentLoginUserOnly,\n children,\n}: SellerUserSettingsProviderProps) => {\n const { trackError } = useErrorBoundaryContext();\n\n const { activeAccountWebClientConfig } = useAppContext();\n const sellerUserClient = useMemo(\n () => new SellerUserClient(activeAccountWebClientConfig),\n [activeAccountWebClientConfig]\n );\n\n const queryKey = [\n 'userSettings',\n activeAccountWebClientConfig.activeAccountId,\n currentLoginUserOnly,\n ...initialUserSettingIds,\n ];\n\n const queryResult = useQuery({\n queryKey,\n queryFn: async () => {\n return await sellerUserClient.getSellerUserSettings(\n initialUserSettingIds,\n currentLoginUserOnly ?? true\n );\n },\n\n meta: {\n persist: false,\n onError: (error: ErrorTypes) => {\n trackError('SellerUserClient.getSellerUserSettings', error, {\n trackErrorData: { initialUserSettingIds },\n });\n },\n },\n enabled: activeAccountWebClientConfig?.activeAccountId != null,\n staleTime: Infinity,\n refetchOnWindowFocus: false,\n });\n\n return (\n \n {children}\n \n );\n};\n","import { useQuery, useQueryClient } from '@tanstack/react-query';\nimport { useCallback, useContext, useMemo } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { SellerUserSettingsContext } from 'src/contexts/SellerUserSettingsContext';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n CustomQuickFilterOfListingQuery,\n CustomQuickFilterOfMarketplacePaymentQuery,\n CustomQuickFilterOfOnSaleEventQuery,\n CustomQuickFilterOfPurchaseOrderQuery,\n CustomQuickFilterOfSaleQuery,\n SellerUserClient,\n UserSetting,\n} from 'src/WebApiController';\n\n/**\n * Feature that is visible to the user for the first time.\n */\nexport enum FirstTimeFeature {\n EventMapBanner = 'EventMapBanner',\n}\n\n/**\n * Generic type for a `useUserSetting` hook.\n *\n * This can be implemented with different storage solutions.\n */\nexport type UseUserSettingHook = (options: {\n id?: UserSetting;\n currentLoginUserOnly?: boolean;\n}) => {\n value: T | undefined;\n setUserSetting: (value: T) => Promise;\n isLoading: boolean;\n};\n\n/**\n * An implementation of an `useUserSetting` hook using backend apis for storage.\n *\n * **NOTE**: Any getters and setters for settings with enum values from the backend should implement\n * custom overrides. These should be added in the sections marked with `ADD OVERRIDES HERE` in the\n * implementation.\n * @param option\n * @returns\n */\nexport const useServerUserSetting: UseUserSettingHook = ({\n id,\n currentLoginUserOnly = true,\n}: {\n id?: UserSetting;\n /* whether to use the active account's user or the login user (which includes impersonating user) Id */\n currentLoginUserOnly?: boolean;\n}) => {\n const { showErrorDialog, trackError } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const sellerUserClient = useMemo(\n () => new SellerUserClient(activeAccountWebClientConfig),\n [activeAccountWebClientConfig]\n );\n\n // Try to use the seller user settings context if possible\n const sellerUserSettingsContext = useContext(SellerUserSettingsContext);\n const userSettingsContextQueryResult = sellerUserSettingsContext?.queryResult;\n const contextIsReady =\n userSettingsContextQueryResult != null &&\n userSettingsContextQueryResult?.isFetched &&\n !userSettingsContextQueryResult.isRefetching &&\n !userSettingsContextQueryResult?.isPending;\n\n const queryKey = useMemo(\n () => [\n 'userSetting',\n activeAccountWebClientConfig.activeAccountId,\n currentLoginUserOnly,\n id,\n contextIsReady,\n ],\n [\n activeAccountWebClientConfig.activeAccountId,\n contextIsReady,\n currentLoginUserOnly,\n id,\n ]\n );\n\n const result = useQuery({\n queryKey,\n queryFn: async () => {\n if (activeAccountWebClientConfig.activeAccountId == null) return null;\n\n // ADD OVERRIDES HERE FOR SETTINGS WITH ENUMS VALUES\n switch (id) {\n case UserSetting.QuickFiltersCustomInventory:\n return (await sellerUserClient.getCustomInventoryQuickFiltersSetting()) as T;\n case UserSetting.QuickFiltersCustomSales:\n return (await sellerUserClient.getCustomSalesQuickFiltersSetting()) as T;\n case UserSetting.QuickFiltersCustomPurchases:\n return (await sellerUserClient.getCustomPurchasesQuickFiltersSetting()) as T;\n case UserSetting.QuickFiltersStateMarketplacePayments:\n return (await sellerUserClient.getCustomMarketplacePaymentsQuickFiltersSetting()) as T;\n case UserSetting.QuickFiltersCustomOnSaleEvent:\n return (await sellerUserClient.getCustomOnSaleEventQuickFiltersSetting()) as T;\n }\n return defaultGetSellerUserSetting(currentLoginUserOnly);\n },\n\n enabled: activeAccountWebClientConfig?.activeAccountId != null,\n staleTime: Infinity, // We invalidate on user settings changed, so we don't need to make this stale\n refetchOnWindowFocus: false,\n meta: {\n persist: false,\n onError: (error: ErrorTypes) => {\n trackError('SellerUserClient.getSellerUserSetting', error, {\n trackErrorData: { id },\n });\n },\n },\n });\n\n const defaultGetSellerUserSetting = useCallback(\n async (currentLoginUserOnly?: boolean) => {\n if (!id) {\n return null;\n }\n\n if (sellerUserSettingsContext?.contextSettingIds?.includes(id)) {\n return null;\n }\n\n const resp = await sellerUserClient.getSellerUserSettings(\n [id],\n currentLoginUserOnly ?? false\n );\n\n const userSettingValue = resp[id];\n\n return userSettingValue == null\n ? null\n : (JSON.parse(userSettingValue) satisfies T);\n },\n [id, sellerUserClient, sellerUserSettingsContext?.contextSettingIds]\n );\n\n const defaultSetSellerUserSetting = useCallback(\n async (value: T, currentLoginUserOnly?: boolean) => {\n return await sellerUserClient.setSellerUserSetting(\n id,\n JSON.stringify(value),\n currentLoginUserOnly ?? true\n );\n },\n [id, sellerUserClient]\n );\n\n const queryClient = useQueryClient();\n const setUserSetting = useCallback(\n (value: T) => {\n if (!id) {\n return Promise.resolve(false);\n }\n\n if (sellerUserSettingsContext?.contextSettingIds.includes(id)) {\n const newData = {\n ...(sellerUserSettingsContext.queryResult.data ?? {}),\n [id]: JSON.stringify(value),\n };\n queryClient.setQueryData(\n sellerUserSettingsContext.contextQueryKey,\n newData\n );\n } else {\n queryClient.setQueryData(queryKey, value);\n }\n\n return tryInvokeApi(\n async () => {\n if (activeAccountWebClientConfig.activeAccountId == null) return;\n\n let success = false;\n // ADD OVERRIDES HERE FOR SETTINGS WITH ENUMS VALUES\n switch (id) {\n case UserSetting.QuickFiltersCustomInventory:\n success =\n await sellerUserClient.setCustomInventoryQuickFiltersSetting(\n value as CustomQuickFilterOfListingQuery[]\n );\n break;\n case UserSetting.QuickFiltersCustomSales:\n success =\n await sellerUserClient.setCustomSalesQuickFiltersSetting(\n value as CustomQuickFilterOfSaleQuery[]\n );\n break;\n case UserSetting.QuickFiltersCustomPurchases:\n success =\n await sellerUserClient.setCustomPurchasesQuickFiltersSetting(\n value as CustomQuickFilterOfPurchaseOrderQuery[]\n );\n break;\n case UserSetting.QuickFiltersCustomMarketplacePayments:\n success =\n await sellerUserClient.setCustomMarketplacePaymentsQuickFiltersSetting(\n value as CustomQuickFilterOfMarketplacePaymentQuery[]\n );\n break;\n case UserSetting.QuickFiltersCustomOnSaleEvent:\n success =\n await sellerUserClient.setCustomOnSaleEventQuickFiltersSetting(\n value as CustomQuickFilterOfOnSaleEventQuery[]\n );\n break;\n default:\n success = await defaultSetSellerUserSetting(\n value,\n currentLoginUserOnly\n );\n break;\n }\n\n if (success) {\n if (sellerUserSettingsContext?.contextSettingIds.includes(id)) {\n queryClient.invalidateQueries({\n queryKey: sellerUserSettingsContext.contextQueryKey,\n });\n } else {\n queryClient.invalidateQueries({ queryKey });\n }\n }\n },\n (error) => {\n showErrorDialog('onSubmitChangePrice', error, {\n trackErrorData: {\n userSettings: queryKey,\n },\n });\n }\n );\n },\n [\n activeAccountWebClientConfig.activeAccountId,\n currentLoginUserOnly,\n defaultSetSellerUserSetting,\n id,\n queryClient,\n queryKey,\n sellerUserClient,\n sellerUserSettingsContext?.contextQueryKey,\n sellerUserSettingsContext?.contextSettingIds,\n sellerUserSettingsContext?.queryResult,\n showErrorDialog,\n ]\n );\n\n const getValue = useCallback(() => {\n if (id && sellerUserSettingsContext?.contextSettingIds?.includes(id)) {\n const userSettingValue = userSettingsContextQueryResult?.data?.[id];\n\n return userSettingValue == null\n ? null\n : (JSON.parse(userSettingValue) satisfies T);\n }\n\n return result.data;\n }, [\n id,\n result.data,\n sellerUserSettingsContext?.contextSettingIds,\n userSettingsContextQueryResult?.data,\n ]);\n\n return {\n value: getValue() ?? undefined,\n setUserSetting: setUserSetting,\n isLoading: result.isLoading,\n };\n};\n","import {\n createContext,\n ReactNode,\n useContext,\n useEffect,\n useState,\n} from 'react';\nimport { useDefaultZoomOption } from 'src/hooks/useDefaultZoomOption';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport { UserSetting } from 'src/WebApiController';\n\nexport enum SiteZoomOption {\n '65%' = '65%',\n '75%' = '75%',\n '90%' = '90%',\n '100%' = '100%',\n}\n\nexport const DEFAULT_ZOOM_OPTION = SiteZoomOption['75%'];\n\nexport enum SiteTheme {\n Light = 'light',\n Dark = 'dark',\n}\n\nexport enum SiteThemeOption {\n Light = 'light',\n Dark = 'dark',\n System = 'system',\n}\n\nexport const SITE_THEME_MODE_STORAGE_KEY = 'userSetting_siteThemeMode';\nexport const SITE_ZOOM_STORAGE_KEY = 'userSetting_siteZoom';\n\ntype SiteThemeContextType = {\n isDarkMode: boolean;\n theme: SiteTheme;\n setSiteMode: (mode: SiteThemeOption) => void;\n setSiteZoom: (zoom: SiteZoomOption) => void;\n selectedMode: SiteThemeOption;\n selectedZoom: SiteZoomOption;\n isZoomSupported: boolean;\n hasFeature?: boolean;\n};\n\nconst siteThemeContextDefaults = {\n isDarkMode: false,\n theme: SiteTheme.Light,\n setSiteMode: () => void 0,\n setSiteZoom: () => void 0,\n selectedMode: SiteThemeOption.System,\n selectedZoom: DEFAULT_ZOOM_OPTION,\n isZoomSupported: false,\n};\n\nconst SiteThemeContext = createContext(\n siteThemeContextDefaults\n);\n\ntype SiteThemeContextProviderType = {\n children: ReactNode;\n};\n\nexport const SiteThemeContextProvider = ({\n children,\n}: SiteThemeContextProviderType) => {\n const systemSetting =\n window.matchMedia &&\n window.matchMedia('(prefers-color-scheme: dark)').matches\n ? SiteTheme.Dark\n : SiteTheme.Light;\n const modeToThemeMap = {\n [SiteThemeOption.System]: systemSetting,\n [SiteThemeOption.Dark]: SiteTheme.Dark,\n [SiteThemeOption.Light]: SiteTheme.Light,\n };\n\n const [isZoomSupported, setIsZoomSupported] = useState(false);\n const defaultZoomOption = useDefaultZoomOption();\n\n const [selectedZoom, setSelectedZoom] =\n useState(defaultZoomOption);\n const [selectedMode, setSelectedMode] = useState(\n SiteThemeOption.System\n );\n const theme = modeToThemeMap[selectedMode];\n const { value: serverSiteThemeValue, setUserSetting: setThemeUserSetting } =\n useServerUserSetting({\n id: UserSetting.SiteTheme,\n currentLoginUserOnly: true,\n });\n const { value: serverSiteZoomValue, setUserSetting: setZoomUserSetting } =\n useServerUserSetting({\n id: UserSetting.SiteZoom,\n currentLoginUserOnly: true,\n });\n\n const setSiteMode = (mode: SiteThemeOption) => {\n setThemeUserSetting(mode);\n localStorage.setItem(SITE_THEME_MODE_STORAGE_KEY, mode);\n setSelectedMode(mode);\n };\n\n const applyZoom = (zoom: SiteZoomOption) => {\n // TODO - all the zoom stuff is to be removed\n // We no longer use document style zoom\n // (document.body.style as CSSStyleDeclaration & { zoom: string }).zoom = zoom;\n };\n\n const setSiteZoom = (zoom: SiteZoomOption) => {\n setZoomUserSetting(zoom);\n localStorage.setItem(SITE_ZOOM_STORAGE_KEY, zoom);\n setSelectedZoom(zoom);\n applyZoom(zoom);\n };\n\n useEffect(() => {\n const lsScheme = localStorage.getItem(SITE_THEME_MODE_STORAGE_KEY) as\n | SiteThemeOption\n | undefined;\n const persistedSiteThemeMode =\n serverSiteThemeValue ?? lsScheme ?? SiteThemeOption.System;\n setSelectedMode(persistedSiteThemeMode);\n }, [serverSiteThemeValue]);\n\n useEffect(() => {\n const lsZoom = localStorage.getItem(SITE_ZOOM_STORAGE_KEY) as\n | SiteZoomOption\n | undefined;\n const persistedSiteZoom =\n serverSiteZoomValue ?? lsZoom ?? defaultZoomOption;\n setSelectedZoom(persistedSiteZoom);\n applyZoom(persistedSiteZoom);\n }, [defaultZoomOption, serverSiteZoomValue]);\n\n return (\n \n {children}\n \n );\n};\n\nexport const useSiteTheme = () => useContext(SiteThemeContext);\n","import { useCallback, useEffect, useState } from 'react';\n\n/**\n * Custom useKeyPress hook to only return whether a key is pressed or not\n * This is an alternative to the useKeyPress hook from react-use - it keeps re-rendering the component as long as the key is pressed\n */\nexport const useKeyPress = (targetKey: string) => {\n const [isPressed, setPressed] = useState(false);\n\n const downHandler = useCallback(\n ({ key }: KeyboardEvent) => {\n if (key === targetKey) {\n setPressed(true);\n }\n },\n [targetKey]\n );\n\n const upHandler = useCallback(\n ({ key }: KeyboardEvent) => {\n if (key === targetKey) {\n setPressed(false);\n }\n },\n [targetKey]\n );\n useEffect(() => {\n window.addEventListener('keydown', downHandler);\n window.addEventListener('keyup', upHandler);\n\n return () => {\n window.removeEventListener('keydown', downHandler);\n window.removeEventListener('keyup', upHandler);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return isPressed;\n};\n","import { useKeyPress } from 'src/hooks/useKeyPress';\n\nexport const useListenForEscapeKeyPressed = (): boolean => {\n return useKeyPress('Escape');\n};\n","import { ModalBody, ModalFooter, ModalHeader } from 'reactstrap';\nimport { vars } from 'src/core/themes';\nimport styled from 'styled-components';\n\nexport const DialogHeader = styled(ModalHeader)`\n justify-content: center;\n .modal-title {\n display: flex;\n flex-direction: row;\n align-items: center;\n }\n svg {\n vertical-align: text-bottom;\n }\n`;\n\nexport const DialogFooter = styled(ModalFooter)`\n border: none;\n padding-top: 0;\n`;\n\nexport const DialogBody = styled(ModalBody)`\n padding: ${() => `${vars.spacing.xl}`};\n max-height: 100%;\n overflow: hidden;\n`;\n\nexport const CrossIconContainer = styled.span`\n position: absolute;\n right: ${() => `${vars.spacing.xl}`};\n`;\n","import clsx from 'clsx';\nimport { ComponentProps, PropsWithChildren, useEffect } from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { darkModeRoot } from 'src/app/App.css';\nimport { useGenericDialogContext } from 'src/contexts/GenericDialogContext/GenericDialogContext';\nimport { useSiteTheme } from 'src/contexts/SiteTheme/SiteThemeContext';\nimport { vars } from 'src/core/themes';\nimport { useListenForEscapeKeyPressed } from 'src/hooks/useListenForEscapeKeyPressed';\nimport { CrossIcon } from 'src/svgs/Viagogo';\n\nimport * as styles from './GenericDialog.css';\nimport {\n CrossIconContainer,\n DialogBody,\n DialogFooter,\n DialogHeader,\n} from './GenericDialog.styled';\n\nexport type GenericDialogProps = {\n header: React.ReactNode;\n footer: React.ReactNode;\n includeCloseButton?: boolean;\n isFullHeight?: boolean;\n onCancel?: () => void;\n} & ComponentProps;\n\nexport const GenericDialog = ({\n header,\n footer,\n children,\n className,\n isFullHeight,\n contentClassName,\n includeCloseButton = true,\n scrollable = true,\n ...rest\n}: PropsWithChildren) => {\n const { isOpen, onCancel } = rest;\n const isEscapeKeyPressed = useListenForEscapeKeyPressed();\n const { setIsDialogOpen } = useGenericDialogContext();\n\n useEffect(() => {\n if (isEscapeKeyPressed && isOpen && onCancel) {\n onCancel();\n }\n }, [isEscapeKeyPressed, isOpen, onCancel]);\n\n useEffect(() => {\n if (isOpen) {\n setIsDialogOpen(true);\n } else {\n // Give time to run on next render so calling onCancel when Escape key\n // is pressed doesn't collide with dialog closed\n // (Escape key should run with dialog open).\n setTimeout(() => setIsDialogOpen(false), 100);\n }\n }, [isOpen, setIsDialogOpen]);\n\n const { isDarkMode } = useSiteTheme();\n return (\n \n \n {header}\n {includeCloseButton && rest.onCancel && (\n \n \n \n )}\n \n {children}\n {footer}\n \n );\n};\n","import { StatusCodes } from 'http-status-codes';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosUiActionResult } from 'src/WebApiController';\n\nimport { ContentId } from './constants/contentId';\n\nexport const getErrorInfoFromStatusCode = (\n statusCode?: number | null,\n messageText?: string | React.ReactNode | null\n) => {\n let header = ContentId.Error_InternalServerError_Header;\n let message = ContentId.Error_InternalServerError_GenericMessage;\n\n switch (statusCode) {\n case 400:\n header = ContentId.Error_BadRequest_Header;\n message = ContentId.Error_BadRequest_GenericMessage;\n break;\n\n case 401:\n header = ContentId.Error_Unauthorized_Header;\n message = ContentId.Error_Unauthorized_GenericMessage;\n break;\n\n case 403:\n header = ContentId.Error_Forbidden_Header;\n message = ContentId.Error_Forbidden_GenericMessage;\n break;\n\n case 404:\n header = ContentId.Error_NotFound_Header;\n message = ContentId.Error_NotFound_GenericMessage;\n break;\n\n case 408:\n header = ContentId.Error_RequestTimeout_Header;\n message = ContentId.Error_RequestTimeout_GenericMessage;\n break;\n\n case 501:\n header = ContentId.Error_NotImplemented_Header;\n message = ContentId.Error_NotImplemented_GenericMessage;\n break;\n\n case 502:\n header = ContentId.Error_BadGatewayError_Header;\n message = ContentId.Error_BadGatewayError_GenericMessage;\n break;\n\n default:\n if (messageText === 'Failed to fetch') {\n // These kinds of errors is when ajax couldn't hit the internet - there is no status\n // code returned with this error so that's why we can't catch it with status-code\n header = ContentId.Error_BadGatewayError_Header;\n message = ContentId.Error_BadGatewayError_GenericMessage;\n }\n break;\n }\n\n const headerDisplay = ;\n const messageDisplay =\n !messageText ||\n (typeof messageText === 'string' &&\n KnownGenericErrors.includes(messageText))\n ? message\n : undefined;\n\n return {\n headerDisplay: headerDisplay,\n messageDisplay: messageDisplay ? (\n \n ) : (\n messageText\n ),\n };\n};\n\nconst KnownGenericErrors = [\n 'An unexpected server error occurred.',\n 'Failed to fetch',\n];\n\nexport const isSuccess = (uiResult?: PosUiActionResult | null) => {\n return uiResult?.status === StatusCodes.OK;\n};\n","import React, { ComponentProps } from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { OkButton } from 'src/components/Buttons/OkButton';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { vars } from 'src/core/themes';\nimport { ErrorSolidIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getErrorInfoFromStatusCode } from 'src/utils/errorUtils';\n\nimport * as styles from './ErrorDialog.css';\n\nexport type ErrorDialogProps = {\n statusCode?: number | null;\n messageText?: string | React.ReactNode | null;\n onOkay?: () => void;\n headerText?: React.ReactNode;\n} & ComponentProps;\n\nexport function ErrorDialog({\n statusCode,\n messageText,\n headerText,\n onOkay,\n ...rest\n}: ErrorDialogProps) {\n const { headerDisplay, messageDisplay } = getErrorInfoFromStatusCode(\n statusCode,\n messageText\n );\n const header = headerText ?? headerDisplay;\n\n return (\n \n \n \n }\n {...rest}\n includeCloseButton={false}\n >\n
\n \n {messageDisplay}\n
\n \n );\n}\n","import { useCallback, useState } from 'react';\n\nexport type BasicDialogProps = {\n closeDialog: () => void;\n launchDialog: () => void;\n dialogProps: {\n isOpen: boolean;\n onOkay: () => void;\n onCancel: () => void;\n };\n};\n\nexport const useBasicDialog = (\n options: {\n onOkay?: () => void;\n onCancel?: () => void;\n openByDefault?: boolean;\n } = {}\n): BasicDialogProps => {\n const [showDialog, setShowDialog] = useState(!!options.openByDefault);\n\n const launchDialog = useCallback(() => setShowDialog(true), [setShowDialog]);\n const closeDialog = useCallback(() => setShowDialog(false), [setShowDialog]);\n\n const handleOkay = useCallback(() => {\n closeDialog();\n options.onOkay?.();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [options.onOkay, closeDialog]);\n\n const handleCancel = useCallback(() => {\n closeDialog();\n options.onCancel?.();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [options.onCancel, closeDialog]);\n\n return {\n closeDialog,\n launchDialog,\n dialogProps: {\n isOpen: showDialog,\n onOkay: handleOkay,\n onCancel: handleCancel,\n },\n };\n};\n","import * as Sentry from '@sentry/react';\nimport { ObjectLiteral, useErrorTracker } from '@viagogo/telemetry-react';\nimport React, { useCallback, useContext, useMemo, useState } from 'react';\nimport { ErrorDialog } from 'src/dialogs/ErrorDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { REACT_APP_NAME } from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { ApiException, LoginClient } from 'src/WebApiController';\nimport {\n ClientLogClient,\n ClientLogRequest,\n LogLevel,\n} from 'src/WebApiController';\n\nimport { useAppContext } from '../AppContext';\nimport { useContent } from '../ContentContext';\n\nexport type ErrorTypes =\n | ApiException\n | null\n | undefined\n | {\n status?: number | null;\n message?: string | null;\n response?: string | null;\n };\n\nexport type IErrorBoundaryContext = {\n trackError: (\n errorId: string,\n error: ErrorTypes,\n data?: ObjectLiteral\n ) => void;\n showErrorDialog: (\n errorId: string,\n error:\n | ApiException\n | null\n | undefined\n | {\n status?: number | null;\n message?: string | null;\n response?: string | null;\n },\n additionalOptions?: {\n onDismissError?: () => void;\n customerHeader?: React.ReactNode;\n trackErrorData?: ObjectLiteral;\n }\n ) => void;\n genericError: string;\n};\n\nexport const ErrorBoundaryContext = React.createContext({\n trackError: () => {},\n showErrorDialog: () => {},\n genericError: '',\n});\n\nexport const useErrorBoundaryContext = () => useContext(ErrorBoundaryContext);\n\n/**\n * Adds a modal to the page where the provider is added\n * Provides utils to set all or update part of the modal\n * The modal is assumed to be open when it contains content\n */\nexport const ErrorBoundaryContextProvider = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\n const [trackError] = useErrorTracker();\n\n const { activeAccountWebClientConfig } = useAppContext();\n\n const genericError = useContent(\n ContentId.Error_InternalServerError_GenericMessage\n );\n\n const { dialogProps, closeDialog, launchDialog } = useBasicDialog();\n\n const [message, setMessage] = useState();\n const [statusCode, setStatusCode] = useState();\n const [customerHeader, setCustomerHeader] = useState();\n const [onDismissError, setOnDismissError] = useState<() => void>();\n\n const logClient = useMemo(\n () => new ClientLogClient(activeAccountWebClientConfig),\n [activeAccountWebClientConfig]\n );\n\n const trackErrorWrapper = useCallback(\n async (\n errorId: string,\n error:\n | ApiException\n | null\n | undefined\n | {\n status?: number | null;\n message?: string | null;\n response?: string | null;\n },\n data?: ObjectLiteral\n ) => {\n if (error?.status === 401) {\n // If we get an unauthorized, reload the page which will cause the login change to either\n // pull the updated login, or redirect to login page\n window.location.assign('/login');\n }\n\n const getLogLevel = (\n status: number | null | undefined,\n message: string\n ) => {\n // Uncomment this to break here to debug when we have errors\n // that we want to convert to a warning\n // debugger;\n if (status === 401) {\n return LogLevel.Warning;\n }\n\n if (\n message === 'Failed to fetch' ||\n message == 'NetworkError when attempting to fetch resource.'\n ) {\n return LogLevel.Warning;\n }\n\n return LogLevel.Error;\n };\n\n try {\n Sentry.captureException(error);\n } catch (e) {\n console.warn('Sentry log request failed', e);\n }\n\n const message = error?.response ?? error?.message ?? genericError;\n const statusStr = error?.status ? `[StatusCode]: ${error.status}` : '';\n\n data = { ...(data ?? {}), response: error?.response };\n\n const dataSerialized = JSON.stringify(data);\n\n console.error(`[${errorId}] - ${message}\n[Details]:\n${statusStr}\n${dataSerialized}\n`);\n\n trackError(errorId, message, {\n data: dataSerialized,\n status: error?.status,\n response: error?.response,\n });\n\n const logRequest: ClientLogRequest = {\n logLevel: getLogLevel(error?.status, message),\n applicationSource: REACT_APP_NAME,\n errorId: errorId,\n error: message,\n pageUrl: window.location.href,\n componentStack: null,\n additionalInfo: {\n responseStatus: error?.status,\n data: dataSerialized,\n },\n };\n\n tryInvokeApi(\n async () => {\n logClient.log(logRequest);\n },\n () => {\n console.warn('Failed to log error to server');\n }\n );\n\n if (error?.status === 401) {\n // Check to see if the login-context is still good\n new LoginClient({}).getLoginContext('/').then((newLoginContext) => {\n if (\n !newLoginContext?.isSuccess ||\n newLoginContext?.user?.activeAccount?.id !==\n activeAccountWebClientConfig.activeAccountId\n ) {\n // Getting latest login unsuccessful, redirect to login to force re-sign-in\n window.location.assign('/login');\n }\n });\n }\n },\n [\n genericError,\n trackError,\n logClient,\n activeAccountWebClientConfig.activeAccountId,\n ]\n );\n\n const showErrorDialog = useCallback(\n (\n errorId: string,\n error:\n | ApiException\n | null\n | undefined\n | {\n status?: number | null;\n message?: string | null;\n response?: string | null;\n },\n additionalOptions?: {\n onDismissError?: () => void;\n customerHeader?: React.ReactNode;\n trackErrorData?: ObjectLiteral;\n }\n ) => {\n const { onDismissError, customerHeader, trackErrorData } =\n additionalOptions || {};\n\n const message = error?.response ?? error?.message ?? genericError;\n\n setMessage(message);\n setStatusCode(error?.status);\n setCustomerHeader(customerHeader);\n setOnDismissError(onDismissError);\n\n trackErrorWrapper(errorId ?? 'Generic Error', error, trackErrorData);\n\n launchDialog();\n },\n [genericError, launchDialog, trackErrorWrapper]\n );\n\n const onErrorOk = useCallback(() => {\n closeDialog();\n\n onDismissError?.();\n\n // Clear all the error dialog props after dismiss\n setMessage('');\n setStatusCode(undefined);\n setCustomerHeader(undefined);\n setOnDismissError(undefined);\n }, [closeDialog, onDismissError]);\n\n return (\n \n {children}\n \n \n );\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { ReactNode } from 'react';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { ContentClient } from 'src/WebApiController';\n\nimport { ContentProvider, ContentResolverParams } from './ContentContext';\n\nexport function SiteContentProvider({ children }: { children?: ReactNode }) {\n const { trackError } = useErrorBoundaryContext();\n\n const contentQuery = useQuery({\n queryKey: ['ContentClient.getContentDataMap'],\n queryFn: () =>\n tryInvokeApi(\n async () => {\n const client = new ContentClient({});\n return await client.getContentDataMap();\n },\n (error) => {\n trackError('ContentClient.getContentDataMap', error);\n }\n ),\n\n staleTime: Infinity, // site content don't change unless re-compile, and we already invalidate on reload\n refetchOnWindowFocus: false,\n networkMode: 'offlineFirst',\n });\n\n return (\n contentQuery.data?.[id] != null,\n get: (id: string) => contentQuery.data?.[id]?.body || undefined,\n }}\n contentResolver={contentResolver}\n >\n {children}\n \n );\n}\n\n// TODO: Website had this as a fetch to their content api route\n// in order to pull more content, we currently don't need this.\n// For ref: https://dev.azure.com/viagogo/Website/_git/Viagogo.Site?path=/Viagogo.Site.Script/Scripts/react/website-apps/shared/components/content/SiteContentProvider.js&version=GBmain&line=25&lineEnd=26&lineStartColumn=1&lineEndColumn=1&lineStyle=plain&_a=contents\nconst contentResolver = (content: ContentResolverParams) =>\n Array.isArray(content)\n ? content.map(({ id, defaultValue }) => defaultValue || id)\n : content.defaultValue || content.id;\n","import {\n Listing,\n Permission,\n PurchaseOrder,\n Sale,\n UserDetail,\n} from 'src/WebApiController';\n\nexport const hasPermission = (\n userDetail: UserDetail | null | undefined,\n permission: Permission\n): boolean => {\n const { permissions: userPermissions } = userDetail || {};\n\n if (!userPermissions) {\n return false;\n }\n\n return userPermissions.filter((p) => p === permission).length > 0;\n};\n\nexport const hasAnyOfPermissions = (\n userDetail: UserDetail | null | undefined,\n permissions: Permission[]\n): boolean => {\n const { permissions: userPermissions } = userDetail || {};\n\n if (!userPermissions) {\n return false;\n }\n\n return userPermissions.filter((p) => permissions.includes(p)).length > 0;\n};\n\n// --- All permission-base actions --- //\n\nexport const canPriceInventory = (\n userDetail: UserDetail | null | undefined,\n pricerId: string | null\n) => {\n // If user is only a pricer, then they can only price inventory where they're set to be the pricer\n if (\n hasPermission(userDetail, Permission.Inventory_SetPriceOnIsPricerOf) &&\n userDetail?.userId === pricerId\n ) {\n return;\n }\n\n // TODO - POS-865 - handle Permission.Inventory_SetPriceOnPurchasedBy\n\n return hasPermission(userDetail, Permission.Inventory_SetPrice);\n};\n\nexport const hasPermissionForListing = (\n userDetail: UserDetail | null | undefined,\n listing: Listing | null | undefined,\n forBulkEdit: boolean | undefined,\n root: Permission,\n isPricerOf?: Permission,\n isPurchasedBy?: Permission\n) => {\n if (userDetail == null) {\n return false;\n }\n if (\n hasAnyOfPermissions(userDetail, [root]) ||\n (listing != null && listing.id <= 0) // new create should always allow for current user\n ) {\n return true;\n }\n\n if (isPricerOf && hasAnyOfPermissions(userDetail, [isPricerOf])) {\n if (forBulkEdit) {\n return true; // for bulk-edit, we don't need to check against listing here\n }\n if (\n listing != null &&\n (listing.pricerId == null || // not priced by anyone means priced by everyone\n listing.pricerId ==\n (userDetail.activeAccount.impersonatedUserId ?? userDetail.userId))\n ) {\n return true;\n }\n }\n\n if (isPurchasedBy && hasAnyOfPermissions(userDetail, [isPurchasedBy])) {\n if (forBulkEdit) {\n return true; // for bulk-edit, we don't need to check against listing here\n }\n if (\n listing != null &&\n (listing.isCurUserPo ||\n !listing.poBys?.length || // not bought by anyone means bought by everyone\n listing.poBys.includes(\n userDetail.activeAccount.impersonatedUserId ?? userDetail.userId\n ))\n ) {\n return true;\n }\n }\n\n return false;\n};\n\nexport const hasPermissionForSale = (\n userDetail: UserDetail | null | undefined,\n sale: Sale | null | undefined,\n root: Permission,\n isFulfillerOf?: Permission,\n isPricerOf?: Permission,\n isPurchasedBy?: Permission\n) => {\n if (userDetail == null || sale == null) {\n return false;\n }\n if (\n hasAnyOfPermissions(userDetail, [root]) ||\n sale.id <= 0 // new create should always allow for current user)\n ) {\n return true;\n }\n\n if (isFulfillerOf && hasAnyOfPermissions(userDetail, [isFulfillerOf])) {\n if (\n sale.fulfillerId == null || // not fulfill by anyone means fulfill by everyone\n sale.fulfillerId ==\n (userDetail.activeAccount.impersonatedUserId ?? userDetail.userId)\n ) {\n return true;\n }\n }\n\n if (isPricerOf && hasAnyOfPermissions(userDetail, [isPricerOf])) {\n if (\n !sale.owners?.pricerIds?.length || // not priced by anyone means priced by everyone\n sale.owners.pricerIds.includes(\n userDetail.activeAccount.impersonatedUserId ?? userDetail.userId\n )\n ) {\n return true;\n }\n }\n\n if (isPurchasedBy && hasAnyOfPermissions(userDetail, [isPurchasedBy])) {\n if (\n !sale.owners?.buyerIds?.length || // not bought by anyone means bought by everyones\n sale.owners.buyerIds.includes(\n userDetail.activeAccount.impersonatedUserId ?? userDetail.userId\n )\n ) {\n return true;\n }\n }\n\n return false;\n};\n\nexport type PurchaseInfoForPermission = Pick;\n\nexport const hasPermissionForPurchase = (\n userDetail: UserDetail | null | undefined,\n purchase: PurchaseInfoForPermission | null | undefined,\n root: Permission,\n isPurchasedBy?: Permission,\n allowForNewCreate = true\n) => {\n if (userDetail == null) {\n return false;\n }\n const perms = [root];\n if (isPurchasedBy) {\n perms.push(isPurchasedBy);\n }\n if (\n hasAnyOfPermissions(userDetail, perms) ||\n (allowForNewCreate && (purchase == null || purchase.id <= 0))\n ) {\n return true;\n }\n\n return false;\n};\n","import { MainRoute } from 'src/navigations/Routes/MainRoute';\nimport {\n Feature,\n FeatureDetail,\n FeatureState,\n MarketplaceAccountSetting,\n Permission,\n SellerAccount,\n UserDetail,\n} from 'src/WebApiController';\n\nimport { hasAnyOfPermissions } from './userPermissionUtils';\n\nexport const ALL_INVENTORY_VIEW_PERMISSIONS = [\n Permission.Inventory_ViewAll,\n Permission.Inventory_ViewRecent,\n Permission.Inventory_ViewRecentFromExternalMarketplace,\n Permission.Inventory_ViewListingOnIsPricerOf,\n Permission.Inventory_ViewListingsOnPurchasedBy,\n Permission.Inventory_ViewFulfillmentArtifactsOnPurchasedBy,\n Permission.Inventory_ViewFulfillmentArtifactsOnIsPricerOf,\n];\n\nexport const ALL_SALES_VIEW_PERMISSIONS = [\n Permission.Sales_ViewAll,\n Permission.Sales_ViewRecent,\n Permission.Sales_ViewSalesOnIsFulfillerOf,\n Permission.Sales_ViewSalesOnIsPricerOf,\n Permission.Sales_ViewSalesOnIsPricerOf,\n];\n\nconst checkFeatureState = (\n feature: Feature,\n featureDetails: FeatureDetail[] | null | undefined\n) => {\n const fDetails = featureDetails?.find((fd) => fd.id === feature);\n if (fDetails) {\n if (fDetails.state === FeatureState.Disabled) return false;\n else if (fDetails.state === FeatureState.GeneralAvailability) return true;\n else {\n return undefined;\n }\n }\n};\n\nexport const isMarketplaceActive = (\n marketplaceSetting: MarketplaceAccountSetting | null | undefined\n) => {\n if (marketplaceSetting == null) {\n return false;\n }\n\n return (\n marketplaceSetting.isEnabled &&\n (marketplaceSetting.hasApiToken || marketplaceSetting.hasApiRefreshToken) &&\n !marketplaceSetting.tokenExpired\n );\n};\n\nexport const hasAccessToRoute = (\n userDetail: UserDetail | null | undefined,\n featureDetails: FeatureDetail[] | null | undefined,\n route: MainRoute\n): boolean => {\n let state = undefined;\n switch (route) {\n case MainRoute.Discovery:\n return hasFeature(userDetail, featureDetails, Feature.EventDiscoveryPage);\n case MainRoute.Inventory:\n case MainRoute.InventoryEvent:\n case MainRoute.InventorySearch:\n if (\n !hasAnyOfPermissions(userDetail, [\n Permission.Inventory_ViewAll,\n Permission.Inventory_ViewRecent,\n Permission.Inventory_ViewRecentFromExternalMarketplace,\n Permission.Inventory_ViewListingOnIsPricerOf,\n Permission.Inventory_ViewListingsOnPurchasedBy,\n ])\n ) {\n return false;\n }\n if (route === MainRoute.InventorySearch) {\n return hasFeature(\n userDetail,\n featureDetails,\n Feature.SearchView_Inventory\n );\n }\n return true;\n\n case MainRoute.Sales:\n case MainRoute.SalesEvent:\n case MainRoute.SalesSearch:\n if (\n !hasAnyOfPermissions(userDetail, [\n Permission.Sales_ViewAll,\n Permission.Sales_ViewRecent,\n Permission.Sales_ViewRecentFromExternalMarketplace,\n Permission.Sales_ViewSalesOnIsFulfillerOf,\n Permission.Sales_ViewSalesOnIsPricerOf,\n Permission.Sales_ViewSalesOnPurchasedBy,\n ])\n ) {\n return false;\n }\n\n if (route === MainRoute.SalesSearch) {\n return hasFeature(userDetail, featureDetails, Feature.SearchView_Sale);\n }\n return true;\n\n case MainRoute.Purchases:\n case MainRoute.PurchasesEvent:\n case MainRoute.PurchaseSearch:\n if (\n !hasAnyOfPermissions(userDetail, [\n Permission.Purchases_ViewAll,\n Permission.Purchases_ViewOwned,\n Permission.Purchases_ViewRecent,\n ])\n ) {\n return false;\n }\n if (route === MainRoute.PurchaseSearch) {\n return hasFeature(\n userDetail,\n featureDetails,\n Feature.SearchView_Purchase\n );\n }\n return true;\n\n case MainRoute.SyncCenter:\n if (!hasAnyOfPermissions(userDetail, [Permission.SellerAccount_Admin])) {\n return false;\n }\n return true;\n\n case MainRoute.Reports:\n if (\n !hasAnyOfPermissions(userDetail, [\n Permission.Reports_ViewAll,\n Permission.Reports_ViewGlobalReports,\n Permission.Reports_ViewInventoryReports,\n Permission.Reports_ViewSalesReports,\n ])\n ) {\n return false;\n }\n return true;\n\n case MainRoute.Email: {\n if (\n !hasAnyOfPermissions(userDetail, [\n Permission.Purchases_ViewAll,\n Permission.Purchases_ViewOwned,\n Permission.Purchases_ViewRecent,\n Permission.SellerSupportCase_View,\n ])\n ) {\n return false;\n }\n\n return true;\n }\n\n case MainRoute.Home: {\n const hasInventoryView = hasAnyOfPermissions(\n userDetail,\n ALL_INVENTORY_VIEW_PERMISSIONS\n );\n const hasSalesView = hasAnyOfPermissions(\n userDetail,\n ALL_SALES_VIEW_PERMISSIONS\n );\n\n return hasInventoryView || hasSalesView;\n }\n case MainRoute.Notifications: {\n const hasInventoryView = hasAnyOfPermissions(\n userDetail,\n ALL_INVENTORY_VIEW_PERMISSIONS\n );\n const hasSalesView = hasAnyOfPermissions(\n userDetail,\n ALL_SALES_VIEW_PERMISSIONS\n );\n\n const hasHomePageNotifFeature = hasFeature(\n userDetail,\n featureDetails,\n Feature.HomePageNotifications\n );\n const canViewNotifications = hasAnyOfPermissions(userDetail, [\n Permission.General_ViewNotifications,\n ]);\n\n // Notifications only show changes to any Inv, Sales so only show if has access to both (until we fix ticket below)\n // https://thestubhub.atlassian.net/browse/POS-4047\n return (\n hasInventoryView &&\n hasSalesView &&\n hasHomePageNotifFeature &&\n canViewNotifications\n );\n }\n case MainRoute.SponsoredListings: {\n if (!hasAnyOfPermissions(userDetail, [Permission.AdPlatform_Edit])) {\n return false;\n }\n\n return hasFeature(userDetail, featureDetails, Feature.SponsoredListings);\n }\n case MainRoute.Payments: {\n if (!hasAnyOfPermissions(userDetail, [Permission.Accounting_ViewAll])) {\n return false;\n }\n\n return hasFeature(\n userDetail,\n featureDetails,\n Feature.MarketplacePaymentsTab\n );\n }\n case MainRoute.SellerAccountSetting:\n case MainRoute.Login:\n case MainRoute.SignUp:\n case MainRoute.LoginCallback:\n case MainRoute.LoginFailure:\n case MainRoute.Logout:\n case MainRoute.RedirectToUK:\n case MainRoute.Activity:\n case MainRoute.Settings:\n return true;\n\n case MainRoute.ReleaseNotes:\n if (\n !hasAnyOfPermissions(userDetail, [Permission.General_ViewReleaseNotes])\n ) {\n return false;\n }\n return true;\n\n case MainRoute.HelpCenter: {\n state = checkFeatureState(Feature.KnowledgePortalPage, featureDetails);\n const kbFEatureAvailable =\n state === undefined\n ? Boolean(userDetail?.features?.includes(Feature.KnowledgePortalPage))\n : Boolean(state);\n return kbFEatureAvailable;\n }\n\n case MainRoute.ReportsV2: {\n if (\n !hasAnyOfPermissions(userDetail, [\n Permission.Reports_ViewAll,\n Permission.Reports_ViewGlobalReports,\n Permission.Reports_ViewInventoryReports,\n Permission.Reports_ViewSalesReports,\n ])\n ) {\n return false;\n }\n\n state = checkFeatureState(Feature.ReportingV2, featureDetails);\n const reportingV2FeatureAvailable =\n state === undefined\n ? Boolean(userDetail?.features?.includes(Feature.ReportingV2))\n : Boolean(state);\n\n state = checkFeatureState(Feature.ReportSinglePagedV1V2, featureDetails);\n const reportSinglePagedV1V2FeatureAvailable =\n state === undefined\n ? Boolean(\n userDetail?.features?.includes(Feature.ReportSinglePagedV1V2)\n )\n : Boolean(state);\n return (\n reportingV2FeatureAvailable && !reportSinglePagedV1V2FeatureAvailable\n );\n }\n\n default:\n console.log(`Unhandled MainRoute: ${route}`);\n return false;\n }\n};\n\nexport const getHasAccessToRoutes = (\n userDetail?: UserDetail | null,\n featureDetails?: FeatureDetail[] | null\n) => {\n const possibleRoutes = [\n MainRoute.Home,\n MainRoute.Inventory,\n MainRoute.Sales,\n MainRoute.Purchases,\n MainRoute.Payments,\n MainRoute.Reports,\n MainRoute.Email,\n MainRoute.Settings,\n MainRoute.SponsoredListings,\n MainRoute.ReleaseNotes,\n ];\n return possibleRoutes.filter((r) =>\n hasAccessToRoute(userDetail, featureDetails, r)\n );\n};\n\nexport const hasFeature = (\n userDetail: UserDetail | null | undefined,\n featureDetails: FeatureDetail[] | null | undefined,\n feature: Feature\n): boolean => {\n const state = checkFeatureState(feature, featureDetails);\n\n const featuresOverride: Feature[] = [];\n\n // Comment this out to enable these features locally\n // *** NOTE - always comment out this line before check-in ***\n // featuresOverride.push(...[Feature.PosUiVersion2]);\n\n if (featuresOverride.includes(feature)) {\n return true;\n }\n\n return state === undefined\n ? Boolean(userDetail?.features?.includes(feature))\n : Boolean(state);\n};\n\nexport const sortSellerAccount = (accounts: SellerAccount[]) => {\n return accounts.toSorted((a, b) => {\n const aTag = `${a.impersonatedUsername ? '2' : '1'} - ${a.accountName}`;\n const bTag = `${b.impersonatedUsername ? '2' : '1'} - ${b.accountName}`;\n\n return aTag.localeCompare(bTag);\n });\n};\n\nexport const hasFeatures = (\n userDetail: UserDetail | null | undefined,\n featureDetails: FeatureDetail[] | null | undefined,\n features: Readonly\n): boolean => {\n return features.every((f) => hasFeature(userDetail, featureDetails, f));\n};\n","import { useMemo } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { hasFeature } from 'src/utils/userUtils';\nimport { Feature } from 'src/WebApiController';\n\nexport const useUserHasFeature = (feature: Feature) => {\n const { appContext, loginContext } = useAppContext();\n\n const hasFeatureResult = useMemo(\n () => hasFeature(loginContext?.user, appContext?.features, feature),\n [appContext?.features, feature, loginContext?.user]\n );\n\n return hasFeatureResult;\n};\n","export const PosTablePaginationFooterHeight =\n '--pos-table-pagination-footer-height';\n","import { Row } from '@tanstack/react-table';\nimport {\n createContext,\n KeyboardEvent,\n ReactNode,\n useContext,\n useState,\n} from 'react';\n\ntype OnKeyDownHandler = (\n e: KeyboardEvent,\n index: number,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n rows?: Row[]\n) => void;\n\ntype ActiveFocusContextType = {\n activeItem?: ActiveItem | null;\n setActiveItem: (activeItem: ActiveItem | undefined) => void;\n onKeyDownHandler: OnKeyDownHandler;\n};\n\nconst ActiveFocusContext = createContext({\n activeItem: null,\n setActiveItem: () => void 0,\n onKeyDownHandler: () => void 0,\n});\n\ntype ActiveFocusContextProviderProps = {\n children: ReactNode;\n};\n\ntype ActiveItem = {\n id: string;\n index: number;\n};\n\n/**\n * TODO: add jsdoc description\n */\nexport const ActiveFocusContextProvider = ({\n children,\n}: ActiveFocusContextProviderProps) => {\n const [activeItem, setActiveItem] = useState();\n const [rows, setRows] = useState[]>([]);\n\n // We have to take in rows as a parameter to track row order\n const onKeyDownHandler: OnKeyDownHandler = (e, index, inputRows) => {\n const { key } = e;\n const isArrowDown = key === 'ArrowDown';\n const isArrowUp = key === 'ArrowUp';\n const effectiveRows = inputRows ?? rows;\n\n if (!isArrowDown && !isArrowUp) return;\n e.preventDefault();\n\n const newIndex = isArrowUp\n ? index - 1 < 0\n ? effectiveRows.length - 1\n : index - 1\n : index + 1 > effectiveRows.length - 1\n ? 0\n : index + 1;\n\n if (inputRows) setRows(inputRows);\n setActiveItem({ id: effectiveRows[newIndex].id, index: newIndex });\n };\n\n return (\n \n {children}\n \n );\n};\n\nexport const useActiveFocusContext = () => useContext(ActiveFocusContext);\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport const IconButtonContainer = styled.div<{ disabled?: boolean }>`\n all: unset;\n cursor: ${(props) => (props.disabled ? 'default' : 'pointer')};\n opacity: ${(props) => (props.disabled ? 0.5 : 1)};\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: ${() => vars.borderRadius.s};\n padding: 2px ${() => vars.spacing.sm};\n transition: all 0.3s ease;\n max-width: fit-content;\n svg {\n cursor: pointer;\n }\n\n :hover {\n background: ${(props) => props.theme.colors.backgroundBrandLight};\n }\n`;\n","import { MouseEventHandler, ReactNode } from 'react';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { IconButtonContainer } from './IconButton.styled';\n\nexport const IconButton = ({\n icon,\n titleContentId,\n onClick,\n disabled,\n style,\n className,\n}: {\n icon: ReactNode;\n titleContentId?: ContentId | string;\n onClick?: MouseEventHandler;\n disabled?: boolean;\n style?: React.CSSProperties;\n className?: string;\n}) => {\n const title = useContent(titleContentId || ContentId.EmptyContent);\n\n return (\n \n {icon}\n \n );\n};\n","import { ReactNode } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Button, ButtonProps, Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { IconButton } from './IconButton';\n\nexport const ButtonWithIcon = ({\n textContentId,\n titleContentId,\n icon,\n iconOnlyMode,\n onClick,\n disabled,\n variant,\n justifyContent,\n style,\n startWithText,\n ...rest\n}: {\n textContentId?: ContentId | string;\n titleContentId?: ContentId | string;\n icon?: ReactNode;\n iconOnlyMode?: boolean;\n onClick?: React.MouseEventHandler;\n startWithText?: boolean;\n} & Omit) => {\n const defaultStyle = variant === 'text' ? { width: '100%' } : {};\n return (\n <>\n {icon && iconOnlyMode ? (\n \n ) : (\n \n \n {startWithText ? (\n <>\n \n {icon}\n \n ) : (\n <>\n {icon}\n \n \n )}\n \n \n )}\n \n );\n};\n","import { ComponentProps } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useSiteTheme } from 'src/contexts/SiteTheme/SiteThemeContext';\nimport { Button } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nexport const CancelButton = ({\n textContentId = ContentId.Cancel,\n variant,\n ...props\n}: { textContentId?: ContentId } & Omit<\n ComponentProps,\n 'children'\n>) => {\n const { isDarkMode } = useSiteTheme();\n const effectiveVariant = variant ?? (isDarkMode ? 'outlineGray' : 'outline');\n return (\n \n );\n};\n","import { ComponentProps } from 'react';\nimport { vars } from 'src/core/themes';\nimport { IconsFill, SuccessOutlineIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { ButtonWithIcon } from './ButtonWithIcon';\n\nexport const ConfirmButton = ({\n textContentId,\n iconOnlyMode,\n variant,\n icon,\n ...props\n}: ComponentProps) => {\n return (\n \n )\n }\n iconOnlyMode={iconOnlyMode}\n variant={variant}\n textContentId={textContentId || ContentId.ConfirmSale}\n />\n );\n};\n","import { ComponentProps } from 'react';\nimport { vars } from 'src/core/themes';\nimport { ErrorOutlineIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { ButtonWithIcon } from './ButtonWithIcon';\n\nexport const ExpireHoldButton = ({\n textContentId,\n iconOnlyMode,\n variant,\n ...props\n}: Omit, 'icon'>) => {\n return (\n \n }\n iconOnlyMode={iconOnlyMode}\n variant={variant}\n textContentId={textContentId || ContentId.ExpireHold}\n />\n );\n};\n","import { useCallback, useState } from 'react';\n\nexport type IListExpansion = {\n expandedListItems: TItemId[];\n setExpandedListItems: (items: TItemId[]) => void;\n toggleListItemExpansion: (items: TItemId[]) => boolean;\n setListItemExpansion: (open: boolean, items: TItemId[]) => void;\n refreshExpandedListItems: (refetchAll?: boolean) => Promise;\n};\n\nexport function useListExpansion(\n initialExpandedItems?: TItemId[]\n): IListExpansion {\n const [expandedListItems, setExpandedListItems] = useState(\n initialExpandedItems || []\n );\n\n const isListItemExpanded = useCallback(\n (itemId: TItemId) => {\n const indexOf = expandedListItems.indexOf(itemId);\n return indexOf >= 0;\n },\n [expandedListItems]\n );\n\n const toggleListItemExpansion = useCallback(\n (itemIds: TItemId[]) => {\n const curCount = expandedListItems.length;\n let newLists = [...expandedListItems];\n itemIds.forEach((itemId) => {\n const isItemExpanded = isListItemExpanded(itemId);\n if (isItemExpanded) {\n // If expanded, un-expanded it by removing it from the array\n newLists = newLists.filter((id) => id !== itemId);\n } else {\n // If not expanded, add it to the array\n newLists.push(itemId);\n }\n });\n\n setExpandedListItems(newLists);\n\n return newLists.length > curCount;\n },\n [expandedListItems, isListItemExpanded]\n );\n\n const setListItemExpansion = useCallback(\n (open: boolean, items: TItemId[]) => {\n let newLists = [...expandedListItems];\n let hasChanged = false;\n items.forEach((itemId) => {\n const isItemExpanded = isListItemExpanded(itemId);\n if (isItemExpanded !== open) {\n if (!open) {\n // If we want to not open, un-expanded it by removing it from the array\n newLists = newLists.filter((id) => id !== itemId);\n } else {\n // If we want to open, add it to the array\n newLists.push(itemId);\n }\n hasChanged = true;\n }\n });\n\n if (hasChanged) {\n setExpandedListItems(newLists);\n }\n },\n [expandedListItems, isListItemExpanded]\n );\n\n return {\n expandedListItems: expandedListItems,\n setExpandedListItems: setExpandedListItems,\n toggleListItemExpansion: toggleListItemExpansion,\n setListItemExpansion: setListItemExpansion,\n refreshExpandedListItems: () => Promise.resolve(),\n };\n}\n","import { IListingGroupItem, Listing, ListingGroup } from 'src/WebApiController';\n\nexport type GroupIdNameMap = Record;\n// Recursively flatten group items\nexport const getFlattenedListings = (\n listings?: Listing[] | null\n): [Listing[], Record] => {\n if (!listings) {\n return [[], {}];\n }\n const groupIdNameMap: GroupIdNameMap = {};\n\n // Recursively flatten group items\n const flattenGroupItems = (item: IListingGroupItem): Listing[] => {\n if (item.isLtGrp) {\n if (\n (item as ListingGroup).groupType === 'Leader' &&\n (item as ListingGroup).ltGrpId !== null\n ) {\n // Keep track of group id to group name mapping for display use\n groupIdNameMap[(item as ListingGroup).ltGrpId as string] = (\n item as ListingGroup\n ).groupName;\n }\n return [...(item as ListingGroup).groupItems.flatMap(flattenGroupItems)];\n }\n return [item as Listing];\n };\n\n const flattenedListings = listings.flatMap(flattenGroupItems);\n return [flattenedListings, groupIdNameMap];\n};\n","import { getFlattenedListings } from 'src/modals/MergeListings/utils';\nimport {\n ActionOutboxEntityType,\n CatalogResults,\n EventEntities,\n EventEntityCounts,\n EventWithData,\n Listing,\n} from 'src/WebApiController';\n\nimport { ExpandedEventData } from './CatalogDataContext.types';\n\nexport const updateCatalogResults = (\n catalogResults: CatalogResults,\n expandedEventsData: ExpandedEventData[]\n): CatalogResults => {\n if (!expandedEventsData || !expandedEventsData?.length) {\n return catalogResults;\n }\n\n const finalCatalogResults: CatalogResults = {\n ...catalogResults,\n events: { ...catalogResults.events },\n };\n\n for (const expandedEventData of expandedEventsData) {\n for (const eventId in expandedEventData) {\n const curEvent = finalCatalogResults.events[eventId];\n if (curEvent) {\n // Update listings\n const listings = expandedEventData[eventId].listings;\n let listGrpCnt = 0;\n let ungrListCnt = 0;\n listings?.forEach((listing: Listing) => {\n listing.isLtGrp ? listGrpCnt++ : ungrListCnt++;\n });\n\n const listCnt =\n listGrpCnt > 0\n ? getFlattenedListings(listings)[0].length // if has groups, get flattened listings\n : listings?.length; // else just use the item count\n\n const sales = expandedEventData[eventId].sales;\n const salesCnt = sales?.length;\n\n const ticketGroups = expandedEventData[eventId].ticketGroups;\n const tktGrpsCnt = ticketGroups?.length;\n\n if (listings || sales || ticketGroups) {\n finalCatalogResults.events[eventId] = {\n ...curEvent,\n entities: {\n ...(curEvent.entities ?? {}),\n listings,\n sales,\n ticketGroups,\n } as EventEntities,\n counts: {\n ...(curEvent.counts ?? {}),\n listCnt,\n listGrpCnt,\n ungrListCnt,\n salesCnt,\n tktGrpsCnt,\n } as EventEntityCounts,\n };\n }\n }\n }\n }\n\n return finalCatalogResults;\n};\n\nexport const getEventsWithNonZeroCounts = (\n entityType: ActionOutboxEntityType,\n data?: EventWithData[] | null,\n requireEventNotNull?: boolean\n) => {\n if (!data) {\n return [];\n }\n const filteredEvents = data.filter((ev) => {\n if (ev.counts == null) {\n return false;\n }\n\n if (requireEventNotNull && ev.event == null) {\n return false;\n }\n\n const count =\n entityType === ActionOutboxEntityType.Listing\n ? ev.counts.listCnt\n : entityType === ActionOutboxEntityType.Sale\n ? ev.counts.salesCnt\n : ev.counts.tktGrpsCnt || ev.counts.poCnt;\n\n return Boolean(count);\n });\n\n return filteredEvents;\n};\n\nexport const hasEventsWithFullLoadedData = (\n entityType: ActionOutboxEntityType,\n data?: EventWithData[] | null\n) => {\n if (!data) {\n return [];\n }\n const hasEventFullyLoaded = data.some((ev) => {\n if (ev.counts == null) {\n return false;\n }\n\n if (ev.event == null) {\n return false;\n }\n\n // The difference between this and the previous getEventsWithNonZeroCounts is that we check if the count is not null instead of checking if it is not 0.\n const count =\n entityType === ActionOutboxEntityType.Listing\n ? ev.counts.listCnt != null\n : entityType === ActionOutboxEntityType.Sale\n ? ev.counts.salesCnt != null\n : ev.counts.tktGrpsCnt != null || ev.counts.poCnt != null;\n\n return Boolean(count);\n });\n\n return hasEventFullyLoaded;\n};\n","import removeAccents from 'remove-accents';\n\n/**\n * Removes all non-alpha-numeric chars\n * using ~`!@#$%^&*()_-+={[}]|\\:;'\",<.>/?\n * @param str\n */\nexport const removeSpecialChars = (str: string): string => {\n return removeAccents(str).replace(\n /[\\/\\[\\^~`\\!@\\#\\$%\\^&\\*\\(\\)_\\-\\+\\=\\{\\[\\}\\]\\|\\\\\\:;\\\\'\\\\\",\\<\\.\\>\\\\\\/\\?\\]\\/g]/g,\n ''\n );\n};\n","export const DEFAULT_TIMEZONE_LOCAL =\n Intl.DateTimeFormat().resolvedOptions().timeZone;\n","/**\n * Standard\n */\nexport enum FormatOption_Standard {\n Millions = 'millions',\n Thousands = 'thousands',\n Whole = 'whole',\n Precise = 'precise',\n}\n\nexport enum FormatOption_Seating {\n // Used by listing only\n Seating_OriginalSeating = 'originalSeating',\n // For listing this is the remaining seating available\n Seating_FullSeating = 'fullSeating',\n Seating_SectionOnly = 'sectionOnly',\n}\n\nexport enum FormatOption_Event {\n Event_FullInfo = 'fullEventInfo',\n Event_EventName = 'eventName',\n}\n\nexport enum FormatOption_DateTime {\n DateTime_MMDD = 'MM/DD',\n DateTime_MMDD_Time = 'MM/DD Time',\n DateTime_MMDD_Time_Day = 'MM/DD Time, Day',\n DateTime_MMDDYY = 'MM/DD/YY',\n DateTime_MonthDD = 'Month DD',\n DateTime_MonthDD_Time = 'Month DD Time',\n DateTime_MonthDD_Time_Day = 'Month DD Time, Day',\n DateTime_Month_DD_YY = 'Month DD YY',\n DateTime_Month_DD_YY_Time = 'Month DD YY, Time',\n DateTime_Month_DD_YY_Time_Day = 'Month DD YY, Time, Day',\n}\n\nexport enum FormatOption_EnumDisplay {\n EnumDisplay_Icon = 'icon',\n EnumDisplay_Text = 'text',\n}\n\n/**\n * Percentage options\n */\nexport enum FormatOption_Percent {\n Percent_RoundToTwo = 'per_2dp',\n Percent_RoundToOne = 'per_1dp',\n Percent_RoundToWhole = 'per_0dp', // (Whole)\n Percent_AsDecimal_RoundToOne = 'dec_1dp',\n Percent_AsDecimal_RoundToTwo = 'dec_2dp',\n Percent_AsDecimal_RoundToThree = 'dec_3dp',\n}\n\nexport enum FormatOption_HiddenCustomFormat {\n // This is a hack to show action column - link only\n Actions_LinkOnly = 'Actions_LinkOnly',\n // This is a hack to show external ID column (ID only, no marketplace or metadata)\n Id_RawIdOnly = 'Id_RawIdOnly',\n}\n\nexport const FormatOption = {\n ...FormatOption_Standard,\n ...FormatOption_Seating,\n ...FormatOption_Event,\n ...FormatOption_DateTime,\n ...FormatOption_EnumDisplay,\n ...FormatOption_Percent,\n ...FormatOption_HiddenCustomFormat,\n} as const;\nexport type FormatOption = (typeof FormatOption)[keyof typeof FormatOption];\n\nexport const enum FormatOptionType {\n Standard = 'standard',\n Seating = 'seating',\n Event = 'event',\n DateTime = 'dateTime',\n EnumDisplay = 'enumDisplay',\n Percentage = 'percentage',\n}\n","import { Temporal, toTemporalInstant } from '@js-temporal/polyfill';\nimport {\n add,\n addDays,\n differenceInDays,\n differenceInHours,\n Duration,\n endOfDay,\n endOfMonth,\n endOfWeek,\n endOfYear,\n format,\n formatDistance,\n intlFormat,\n isEqual,\n isValid,\n parse,\n parseISO,\n startOfDay,\n startOfMonth,\n startOfWeek,\n startOfYear,\n sub,\n subDays,\n subWeeks,\n subYears,\n} from 'date-fns';\nimport { ReactNode } from 'react';\nimport {\n Content,\n FormatContent,\n useFormattedContent,\n} from 'src/contexts/ContentContext';\nimport {\n DateTimeRange,\n DateTimeRangeWithRelative,\n EventTimeFrameFilter,\n RelativeTimeRoundingMode,\n} from 'src/WebApiController';\n\nimport { ContentId } from './constants/contentId';\nimport { FormatContentId } from './constants/formatContentId';\n\nexport type DateRangePreset = {\n name: DateRangePresetName;\n label: JSX.Element;\n range: DateRangeType;\n};\n\nexport type DateRangeRelativePreset = {\n name: DateRangePresetName;\n label: JSX.Element;\n range: DateTimeRangeWithRelative;\n};\n\ntype DateRangeType = {\n start: Date;\n end: Date;\n};\n\nexport const getLastDateRange = (\n duration: Duration,\n end: Date\n): DateRangeType => ({\n start: startOfDay(sub(end, duration)),\n end: endOfDay(end),\n});\n\nexport const getNextDateRange = (\n duration: Duration,\n start: Date\n): DateRangeType => ({\n start: startOfDay(start),\n end: endOfDay(add(start, duration)),\n});\n\nexport const getLastDateRangeRelative = (\n duration: Duration,\n roundingMode?: RelativeTimeRoundingMode\n): DateTimeRangeWithRelative => {\n const now = new Date();\n return {\n relativeStartSecs: (sub(now, duration).getTime() - now.getTime()) / 1000,\n relativeEndSecs: 0,\n roundingMode,\n } as DateTimeRangeWithRelative;\n};\n\nexport const getNextDateRangeRelative = (\n duration: Duration,\n roundingMode?: RelativeTimeRoundingMode\n): DateTimeRangeWithRelative => {\n const now = new Date();\n return {\n relativeStartSecs: 0,\n relativeEndSecs: (add(now, duration).getTime() - now.getTime()) / 1000,\n roundingMode,\n } as DateTimeRangeWithRelative;\n};\n\nexport enum DateRangePresetName {\n Today = 'Today',\n Last3Days = 'Last3Days',\n Last7Days = 'Last7Days',\n Last30Days = 'Last30Days',\n Last90Days = 'Last90Days',\n\n ThisWeek = 'ThisWeek',\n ThisMonth = 'ThisMonth',\n ThisYear = 'ThisYear',\n AlreadyInHand = 'AlreadyInHand',\n\n NextWeek = 'NextWeek',\n NextMonth = 'NextMonth',\n NextYear = 'NextYear',\n\n PastYear = 'PastYear',\n\n LastYear = 'LastYear',\n OlderThanLastYear = 'OlderThanLastYear',\n}\n\nexport const StandardDateRangePresetNames = [\n DateRangePresetName.Today,\n DateRangePresetName.Last3Days,\n DateRangePresetName.Last7Days,\n DateRangePresetName.Last30Days,\n DateRangePresetName.Last90Days,\n];\n\nexport const SaleDateRangeRelativePresetNames = [\n DateRangePresetName.Today,\n DateRangePresetName.Last3Days,\n DateRangePresetName.Last7Days,\n DateRangePresetName.Last30Days,\n DateRangePresetName.Last90Days,\n DateRangePresetName.PastYear,\n];\n\nexport const InhandDateRangePresetNames = [\n DateRangePresetName.Today,\n DateRangePresetName.ThisWeek,\n DateRangePresetName.ThisMonth,\n DateRangePresetName.ThisYear,\n DateRangePresetName.AlreadyInHand,\n];\n\nexport const EventDateRangePresetNames = [\n DateRangePresetName.Today,\n DateRangePresetName.ThisWeek,\n DateRangePresetName.ThisMonth,\n DateRangePresetName.ThisYear,\n];\n\nexport const NextDateRangePresetNames = [\n DateRangePresetName.Today,\n DateRangePresetName.NextWeek,\n DateRangePresetName.NextMonth,\n DateRangePresetName.NextYear,\n];\n\nexport const PastDateRangePresetNames = [\n DateRangePresetName.Last7Days,\n DateRangePresetName.Last30Days,\n DateRangePresetName.PastYear,\n];\n\nexport const PurchaseDateRangePresetNames = [\n DateRangePresetName.Today,\n DateRangePresetName.Last3Days,\n DateRangePresetName.Last7Days,\n DateRangePresetName.Last30Days,\n DateRangePresetName.Last90Days,\n DateRangePresetName.ThisYear,\n DateRangePresetName.LastYear,\n DateRangePresetName.OlderThanLastYear,\n];\n\nconst DateRangePresetsMap = {\n [DateRangePresetName.Today]: {\n name: DateRangePresetName.Today,\n label: ,\n range: (now: Date) => getLastDateRange({ days: 0 }, now),\n },\n [DateRangePresetName.Last3Days]: {\n name: DateRangePresetName.Last3Days,\n label: ,\n range: (now: Date) => getLastDateRange({ days: 3 }, now),\n },\n [DateRangePresetName.Last7Days]: {\n name: DateRangePresetName.Last7Days,\n label: ,\n range: (now: Date) => getLastDateRange({ days: 7 }, now),\n },\n [DateRangePresetName.Last30Days]: {\n name: DateRangePresetName.Last30Days,\n label: ,\n range: (now: Date) => getLastDateRange({ days: 30 }, now),\n },\n [DateRangePresetName.Last90Days]: {\n name: DateRangePresetName.Last90Days,\n label: ,\n range: (now: Date) => getLastDateRange({ days: 90 }, now),\n },\n [DateRangePresetName.ThisWeek]: {\n name: DateRangePresetName.ThisWeek,\n label: ,\n range: (now: Date) => ({\n start: startOfWeek(now),\n end: endOfWeek(now),\n }),\n },\n [DateRangePresetName.ThisMonth]: {\n name: DateRangePresetName.ThisMonth,\n label: ,\n range: (now: Date) => ({\n start: startOfMonth(now),\n end: endOfMonth(now),\n }),\n },\n [DateRangePresetName.ThisYear]: {\n name: DateRangePresetName.ThisYear,\n label: ,\n range: (now: Date) => ({\n start: startOfYear(now),\n end: endOfYear(now),\n }),\n },\n [DateRangePresetName.AlreadyInHand]: {\n name: DateRangePresetName.AlreadyInHand,\n label: ,\n range: (now: Date) => ({\n start: new Date('01/01/1970'),\n end: endOfDay(now),\n }),\n },\n [DateRangePresetName.NextWeek]: {\n name: DateRangePresetName.NextWeek,\n label: ,\n range: (now: Date) => getNextDateRange({ weeks: 1 }, now),\n },\n [DateRangePresetName.NextMonth]: {\n name: DateRangePresetName.NextMonth,\n label: ,\n range: (now: Date) => getNextDateRange({ months: 1 }, now),\n },\n [DateRangePresetName.NextYear]: {\n name: DateRangePresetName.NextYear,\n label: ,\n range: (now: Date) => getNextDateRange({ years: 1 }, now),\n },\n [DateRangePresetName.PastYear]: {\n name: DateRangePresetName.PastYear,\n label: ,\n range: (now: Date) => getLastDateRange({ years: 1 }, now),\n },\n [DateRangePresetName.LastYear]: {\n name: DateRangePresetName.LastYear,\n label: ,\n range: (now: Date) => ({\n start: subYears(startOfYear(now), 1),\n end: endOfDay(subDays(startOfYear(now), 1)),\n }),\n },\n [DateRangePresetName.OlderThanLastYear]: {\n name: DateRangePresetName.OlderThanLastYear,\n label: ,\n range: (now: Date) => ({\n start: new Date('01/01/1970'),\n end: endOfDay(subDays(subYears(startOfYear(now), 1), 1)),\n }),\n },\n} satisfies {\n [key in DateRangePresetName]: {\n name: key /* eslint-disable-line no-restricted-globals */;\n label: ReactNode;\n range: (now: Date) => { start: Date; end: Date };\n };\n};\nconst DateRangePresets = Object.values(DateRangePresetsMap);\n\nexport const getDateRangePresets = (\n presetNames: DateRangePresetName[],\n now: Date = new Date()\n): DateRangePreset[] => {\n return DateRangePresets.filter((drp) => presetNames.includes(drp.name)).map(\n (drp) => ({\n name: drp.name,\n label: drp.label,\n range: drp.range(now),\n })\n );\n};\n\nconst DateRangeRelativePresetsMap = {\n [DateRangePresetName.Today]: {\n name: DateRangePresetName.Today,\n label: ,\n range: () => getLastDateRangeRelative({ days: 0 }),\n },\n [DateRangePresetName.Last3Days]: {\n name: DateRangePresetName.Last3Days,\n label: ,\n range: () => getLastDateRangeRelative({ days: 3 }),\n },\n [DateRangePresetName.Last7Days]: {\n name: DateRangePresetName.Last7Days,\n label: ,\n range: () => getLastDateRangeRelative({ days: 7 }),\n },\n [DateRangePresetName.Last30Days]: {\n name: DateRangePresetName.Last30Days,\n label: ,\n range: () => getLastDateRangeRelative({ days: 30 }),\n },\n [DateRangePresetName.Last90Days]: {\n name: DateRangePresetName.Last90Days,\n label: ,\n range: () => getLastDateRangeRelative({ days: 90 }),\n },\n [DateRangePresetName.PastYear]: {\n name: DateRangePresetName.PastYear,\n label: ,\n range: () => getLastDateRangeRelative({ months: 12 }),\n },\n [DateRangePresetName.ThisWeek]: {\n name: DateRangePresetName.ThisWeek,\n label: ,\n range: () =>\n getLastDateRangeRelative({ days: 0 }, RelativeTimeRoundingMode.Week),\n },\n [DateRangePresetName.ThisMonth]: {\n name: DateRangePresetName.ThisMonth,\n label: ,\n range: () =>\n getLastDateRangeRelative({ days: 0 }, RelativeTimeRoundingMode.Month),\n },\n [DateRangePresetName.ThisYear]: {\n name: DateRangePresetName.ThisYear,\n label: ,\n range: () =>\n getLastDateRangeRelative({ days: 0 }, RelativeTimeRoundingMode.Year),\n },\n [DateRangePresetName.AlreadyInHand]: {\n name: DateRangePresetName.AlreadyInHand,\n label: ,\n range: () => {\n return {\n relativeStartSecs: null,\n relativeEndSecs: 0,\n } as DateTimeRangeWithRelative;\n },\n },\n [DateRangePresetName.NextWeek]: {\n name: DateRangePresetName.NextWeek,\n label: ,\n range: () => getNextDateRangeRelative({ weeks: 1 }),\n },\n [DateRangePresetName.NextMonth]: {\n name: DateRangePresetName.NextMonth,\n label: ,\n range: () => getNextDateRangeRelative({ months: 1 }),\n },\n [DateRangePresetName.NextYear]: {\n name: DateRangePresetName.NextYear,\n label: ,\n range: () => getNextDateRangeRelative({ years: 1 }),\n },\n [DateRangePresetName.LastYear]: {\n name: DateRangePresetName.LastYear,\n label: ,\n range: () => {\n const now = new Date();\n return {\n relativeEndSecs:\n (sub(now, { years: 1 }).getTime() - now.getTime()) / 1000,\n relativeStartSecs:\n (sub(now, { years: 1 }).getTime() - now.getTime()) / 1000,\n roundingMode: RelativeTimeRoundingMode.Year,\n } as DateTimeRangeWithRelative;\n },\n },\n [DateRangePresetName.OlderThanLastYear]: {\n name: DateRangePresetName.OlderThanLastYear,\n label: ,\n range: () => {\n const now = new Date();\n return {\n relativeEndSecs:\n (sub(now, { years: 2 }).getTime() - now.getTime()) / 1000,\n relativeStartSecs: null,\n roundingMode: RelativeTimeRoundingMode.Year,\n } as DateTimeRangeWithRelative;\n },\n },\n} satisfies {\n [key: string]: {\n name: string /* eslint-disable-line no-restricted-globals */;\n label: ReactNode;\n range: () => DateTimeRangeWithRelative;\n };\n};\nconst DateRangeRelativePresets = Object.values(DateRangeRelativePresetsMap);\n\nexport const getDateRangeRelativePresets = (\n presetNames: DateRangePresetName[]\n): DateRangeRelativePreset[] => {\n return DateRangeRelativePresets.filter((drp) =>\n presetNames.includes(drp.name)\n ).map((drp) => ({\n name: drp.name,\n label: drp.label,\n range: drp.range(),\n }));\n};\n\nexport enum DatePresetName {\n Now = 'Now',\n OneDayBeforeEvent = 'OneDayBeforeEvent',\n OneWeekBeforeEvent = 'OneWeekBeforeEvent',\n DaysBeforeEvent = 'DaysBeforeEvent',\n}\n\nexport const getDatePresets = (\n presetNames: DatePresetName[],\n targetDate: Date,\n inHandDaysBeforeEvent?: number\n): DatePreset[] => {\n return DatePresets.filter((dp) => presetNames.includes(dp.name)).map(\n (dp) => ({\n name: dp.name,\n label: dp.label,\n value: dp.value(\n targetDate,\n dp.name === DatePresetName.DaysBeforeEvent\n ? inHandDaysBeforeEvent\n : undefined\n ),\n })\n );\n};\n\nexport type DatePreset = {\n name: DatePresetName;\n label: JSX.Element;\n value: Date;\n};\n\nexport const StandardDatePresetNames = [\n DatePresetName.Now,\n DatePresetName.OneDayBeforeEvent,\n DatePresetName.OneWeekBeforeEvent,\n];\n\nexport const DatePresets = [\n {\n name: DatePresetName.Now,\n label: ,\n value: () => new Date(),\n },\n {\n name: DatePresetName.OneDayBeforeEvent,\n label: ,\n value: (event: Date) => subDays(event, 1),\n },\n {\n name: DatePresetName.OneWeekBeforeEvent,\n label: ,\n value: (event: Date) => subWeeks(event, 1),\n },\n {\n name: DatePresetName.DaysBeforeEvent,\n label: ,\n value: (event: Date, inHandDaysBeforeEvent?: number) =>\n subDays(event, inHandDaysBeforeEvent ?? 0),\n },\n];\n\nexport function formatDate(\n dateString: string,\n locale?: string,\n timeZone?: string\n): string {\n return dateString\n ? intlFormat(\n new Date(dateString),\n { month: '2-digit', day: '2-digit', year: 'numeric', timeZone },\n { locale }\n )\n : '';\n}\n\nexport const formatDateRange = ({ start, end }: DateRangeType): string => {\n if (start && end && differenceInDays(start, end) === 0) {\n return formatDate(start.toISOString());\n }\n\n const from = formatDate(start.toISOString());\n const to = formatDate(end.toISOString());\n\n return `${from}-${to}`;\n};\n\nexport const toDateTimeRange = (date?: DateTimeRangeWithRelative | null) => {\n const { start, end, relativeStartSecs, relativeEndSecs } = date ?? {};\n if (relativeStartSecs == null && relativeEndSecs == null) {\n return {\n start: start ? new Date(start) : null,\n end: end ? new Date(end) : null,\n };\n }\n const startRel =\n relativeStartSecs != null\n ? new Date(new Date().getTime() + relativeStartSecs * 1000)\n : null;\n const endRel =\n relativeEndSecs != null\n ? new Date(new Date().getTime() + relativeEndSecs * 1000)\n : null;\n\n return { start: startRel, end: endRel };\n};\n\nexport const formatRelativeDateRange = (\n date?: DateTimeRangeWithRelative | null\n): string => {\n const dateRage = toDateTimeRange(date);\n let startDate = dateRage.start;\n let endDate = dateRage.end;\n\n const roundingMode = date?.roundingMode;\n if (roundingMode === RelativeTimeRoundingMode.Year) {\n startDate = startDate ? startOfYear(startDate) : null;\n endDate = endDate ? endOfYear(endDate) : null;\n } else if (roundingMode === RelativeTimeRoundingMode.Month) {\n startDate = startDate ? startOfMonth(startDate) : null;\n endDate = endDate ? endOfMonth(endDate) : null;\n } else if (roundingMode === RelativeTimeRoundingMode.Week) {\n startDate = startDate ? startOfWeek(startDate) : null;\n endDate = endDate ? endOfWeek(endDate) : null;\n } else {\n startDate = startDate ? startOfDay(startDate) : null;\n endDate = endDate ? endOfDay(endDate) : null;\n }\n if (\n startDate != null &&\n endDate != null &&\n differenceInDays(startDate, endDate) === 0\n ) {\n return formatDate(startDate.toISOString());\n }\n\n const from = formatDate((startDate ?? new Date(0)).toISOString());\n const to = endDate ? formatDate(endDate.toISOString()) : '';\n\n return `${from}-${to}`;\n};\n\nexport const getDateRangeRelativePresetDisplayText = (\n preset: DateRangeRelativePreset,\n style?: React.CSSProperties\n) => {\n const { label, range } = preset;\n return (\n \n {label}{' '}\n {`(${formatRelativeDateRange(\n range\n )})`}\n \n );\n};\n\nexport const getDateRangePresetDisplayText = (\n preset: DateRangePreset,\n style?: React.CSSProperties\n) => {\n const { label, range } = preset;\n return (\n \n {label}{' '}\n {`(${formatDateRange(range)})`}\n \n );\n};\nexport const getDatePresetDisplayText = (\n preset: DatePreset,\n inHandDaysBeforeEvent?: number,\n toZonedTime?: (date: Date) => Date\n) => {\n const { label, value } = preset;\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const daysBeforeEventLabel = useFormattedContent(\n FormatContentId.DaysBeforeEvent,\n `${inHandDaysBeforeEvent ?? 0}`\n );\n\n return (\n
\n {preset.name === DatePresetName.DaysBeforeEvent\n ? daysBeforeEventLabel\n : label}{' '}\n {`(${formatDate(\n (toZonedTime ? toZonedTime(value) : value).toISOString()\n )})`}\n
\n );\n};\n\nexport const getPresetFromUiDateTimeRange = (\n value?: DateTimeRange | null,\n toZonedTime?: (date: Date) => Date\n): DateRangePreset | undefined => {\n if (!value || !value.start || !value.end) {\n return undefined;\n }\n\n const now = toZonedTime ? toZonedTime(new Date()) : new Date();\n const start = startOfDay(\n toZonedTime ? toZonedTime(new Date(value.start)) : new Date(value.start)\n );\n const end = endOfDay(\n toZonedTime ? toZonedTime(new Date(value.end)) : new Date(value.end)\n );\n\n const preset = DateRangePresets.find((p) => {\n const range = p.range(now);\n return isEqual(start, range.start) && isEqual(end, range.end);\n });\n\n return preset ? { ...preset, range: preset.range(now) } : undefined;\n};\n\nexport const getRelativePresetFromUiDateTimeRange = (\n value?: DateTimeRangeWithRelative | null\n): DateRangeRelativePreset | undefined => {\n if (\n !value ||\n (value.relativeStartSecs == null && value.relativeEndSecs == null)\n ) {\n return undefined;\n }\n\n const preset = DateRangeRelativePresets.find((p) => {\n const range = p.range();\n return (\n value.relativeEndSecs === range.relativeEndSecs &&\n value.relativeStartSecs === range.relativeStartSecs &&\n value.roundingMode === range.roundingMode\n );\n });\n\n return preset ? { ...preset, range: preset.range() } : undefined;\n};\n\nexport const getPresetFromDate = (\n selectedDate: Date | null | undefined,\n targetDate: Date,\n inHandDaysBeforeEvent?: number\n): DatePreset | undefined => {\n if (!selectedDate) {\n return undefined;\n }\n\n const preset = DatePresets.find((p) => {\n const value = p.value(targetDate, inHandDaysBeforeEvent);\n\n return isEqual(startOfDay(value), startOfDay(selectedDate));\n });\n\n return preset\n ? {\n ...preset,\n value: preset.value(targetDate || new Date(), inHandDaysBeforeEvent),\n }\n : undefined;\n};\n\nexport const getUiDateTimeRangeFromPreset = (\n value: string,\n onlyIncludes: DateRangePresetName[]\n): DateTimeRange | undefined => {\n const name = value as keyof typeof DateRangePresetName;\n const presetEnum = DateRangePresetName[name];\n if (onlyIncludes.includes(presetEnum)) {\n const preset = getDateRangePresets([presetEnum]);\n if (preset.length >= 1) {\n return {\n start: preset[0].range.start.toISOString(),\n end: preset[0].range.end.toISOString(),\n };\n }\n }\n\n return undefined;\n};\n\nexport const tryGetDateRangePresetSuggestionText = (\n value?: DateTimeRange | null,\n toZonedTime?: (date: Date) => Date,\n style?: React.CSSProperties\n) => {\n const preset = getPresetFromUiDateTimeRange(value, toZonedTime);\n if (preset) {\n return getDateRangePresetDisplayText(preset, style);\n }\n\n return '';\n};\n\nexport const tryGetDateRangeRelativePresetSuggestionText = (\n value?: DateTimeRangeWithRelative | null\n) => {\n const preset = getRelativePresetFromUiDateTimeRange(value);\n if (preset) {\n return getDateRangeRelativePresetDisplayText(preset);\n }\n\n return '';\n};\n\nexport const tryGetDatePresetSuggestionText = (\n value: Date | null | undefined,\n targetDate: Date,\n inHandDaysBeforeEvent?: number,\n // If provided, the date will be converted to the site's timezone before formatting\n toZonedTime?: (date: Date) => Date\n) => {\n const preset = getPresetFromDate(value, targetDate, inHandDaysBeforeEvent);\n if (preset) {\n return getDatePresetDisplayText(preset, inHandDaysBeforeEvent, toZonedTime);\n }\n\n return '';\n};\n\nexport const stringToUtcDate = (dateString: string) => {\n const inputStringWithTimeZone = isValid(parseISO(dateString))\n ? dateString.split('').at(-1) !== 'Z' // Add Z for GMT if no timeZone specified\n ? dateString.concat('Z')\n : dateString\n : dateString;\n return new Date(inputStringWithTimeZone);\n};\n\nexport const formatFromUtcDateString = (utcDate: string, formatStr: string) => {\n const date = stringToUtcDate(utcDate);\n const dateDisplay = format(date, formatStr);\n\n return dateDisplay;\n};\n\n/**\n * Divides a date interval into `n` number of dates.\n *\n * If the interval is cleanly divisible into months, it will use months as the period.\n * Otherwise, days will be used for the period. If days are not evenly divisible, the period will be\n * rounded down. The last date will still be the `toDate`, so the last period will be the longest in\n * this case.\n *\n * Note: Since 1 weeks is always equal to 7 days, a period of 2 weeks will also be calculated using\n * days.\n *\n * @param interval Date interval\n * @param n Number of dates we want to end up with\n * @returns The date interval split into `n` number of dates.\n */\nexport function divideDateInterval(\n interval: {\n fromDate: Date;\n toDate: Date;\n },\n n: number\n): Date[] {\n const from = toTemporalInstant\n .call(interval.fromDate)\n .toZonedDateTimeISO(Temporal.Now.timeZoneId());\n const to = toTemporalInstant\n .call(interval.toDate)\n .toZonedDateTimeISO(Temporal.Now.timeZoneId());\n const durationUntil = from.until(to);\n const durationMonths = durationUntil.round({\n largestUnit: 'months',\n smallestUnit: 'months',\n roundingMode: 'trunc',\n relativeTo: from,\n });\n const isWholeNumberOfMonths =\n Temporal.Duration.compare(durationUntil, durationMonths, {\n relativeTo: from,\n }) === 0 && durationMonths.months % (n - 1) === 0;\n const period = isWholeNumberOfMonths\n ? { months: durationMonths.months / (n - 1) }\n : { days: Math.floor(durationUntil.total('days') / (n - 1)) };\n const dates: Date[] = [];\n for (let i = 0, curr = from; i < n - 1; i++, curr = curr.add(period)) {\n dates.push(new Date(curr.epochMilliseconds));\n }\n dates.push(interval.toDate);\n return dates;\n}\n\n/**\n * Used for restricting the date picker selectable dates based on the selected\n * `EventTimeFrameFilter`.\n * @param timeFrameFilter\n * @returns\n */\nexport function getDisabledDatesForTimeFrameFilter(\n date: Date,\n timeFrameFilter: EventTimeFrameFilter | null\n) {\n if (!timeFrameFilter) {\n return false;\n }\n switch (timeFrameFilter) {\n case EventTimeFrameFilter.Future:\n return date < subDays(new Date(), 1); // If we do < Date on the dote it will disable today due to the time\n case EventTimeFrameFilter.Past:\n return date > addDays(new Date(), 1); // If we do > Date on the dote it will disable today due to the time\n }\n}\n\n/**\n * Used for restricting the date picker presets based on the selected `EventTimeFrameFilter`.\n * @param timeFrameFilter\n * @returns\n */\nexport function getPresetNamesForTimeFrameFilter(\n timeFrameFilter: EventTimeFrameFilter | null\n) {\n if (!timeFrameFilter) {\n return EventDateRangePresetNames;\n }\n switch (timeFrameFilter) {\n case EventTimeFrameFilter.Future:\n return NextDateRangePresetNames;\n case EventTimeFrameFilter.Past:\n return PastDateRangePresetNames;\n }\n}\n\n/* Check whether if the given date is passed some hours from now. A null/undefined date is considered a min date and will always returns true */\nexport const isDatePassedHours = (\n dateTime: Date | null | undefined,\n hours: number\n) => {\n // NOTE - dateTime from UserSettings will not parsed as a Date, and so\n // here we need to do toString() and the convert to a Date to be sure\n // or else the comparison will not work\n return !(\n dateTime &&\n differenceInHours(new Date(), new Date(dateTime.toString())) <= hours\n );\n};\n\nexport const getTimeAgoString = (date: Date) => {\n return formatDistance(date, new Date(), {\n addSuffix: true,\n });\n};\n\nexport function convertDateToTemporalPlainDateTime(date: Date) {\n return toTemporalInstant\n .call(date)\n .toZonedDateTimeISO(Temporal.Now.timeZoneId())\n .toPlainDateTime();\n}\n\n/**\n * `dateString` might be either a plain datetime without a timezone or a utc datetime.\n * For events we want to assume that even if the datetime is UTC, it is still a datetime in the\n * local timezone of the event.\n *\n * DO NOT pass in an offset date time into this function.\n * @param dateString UTC or plain datetime string\n * @param options\n * @returns\n */\nexport function getEventDateDisplayStrings(\n dateString: string,\n {\n dateFormat,\n subDateFormat,\n }: {\n dateFormat?: string;\n subDateFormat?: string;\n } = {}\n) {\n return {\n formattedEventDate: format(new Date(dateString), dateFormat ?? 'MMM d'),\n formattedEventSubDate: format(\n new Date(dateString),\n subDateFormat ?? ' - h:mm aaa, eeee'\n ),\n };\n}\n\nexport const SQL_MAX_DATEITME = new Date('9999-12-31T23:59:59.99Z');\n\nexport const isSqlMaxDate = (date: Date) => {\n return (\n date.getFullYear() === 9999 &&\n date.getMonth() === 11 &&\n date.getDate() === 31\n );\n};\n\nexport type DateConfig = {\n start: string;\n end: string;\n};\n\nexport type DateErrorsConfig = {\n endDateBeforeStartDate: string;\n invalidEndDate: string;\n invalidStartDate: string;\n};\n\nexport const validateDate = (\n dateObj: DateConfig,\n locale: Locale,\n errorConfig: DateErrorsConfig\n): string[] => {\n const { end, start } = dateObj;\n const errors = [];\n const parsedStartDate = parse(start, 'P', new Date(), { locale });\n const parsedEndDate = parse(end, 'P', new Date(), { locale });\n\n if (start && !isValid(parsedStartDate))\n errors.push(errorConfig.invalidStartDate);\n if (end && !isValid(parsedEndDate)) errors.push(errorConfig.invalidEndDate);\n\n try {\n if (start && end && parsedEndDate < parsedStartDate) {\n errors.push(errorConfig.endDateBeforeStartDate);\n }\n } catch (error) {\n /* empty */\n }\n\n return errors;\n};\n\nexport const getEventTimeFrameFromDateTimeRange = (\n start?: Date,\n end?: Date\n) => {\n if (start && start > new Date()) {\n return EventTimeFrameFilter.Future;\n }\n if (end && end < new Date()) {\n return EventTimeFrameFilter.Past;\n }\n\n return null;\n};\n\nexport const roundRelativeDateUp = (\n date: Date,\n roundingMode: RelativeTimeRoundingMode | null | undefined\n) => {\n if (roundingMode === RelativeTimeRoundingMode.Week) {\n return startOfWeek(date);\n }\n if (roundingMode === RelativeTimeRoundingMode.Month) {\n return startOfMonth(date);\n }\n if (roundingMode === RelativeTimeRoundingMode.Year) {\n return startOfYear(date);\n }\n return startOfDay(date);\n};\n\nexport const roundRelativeDateDown = (\n date: Date,\n roundingMode: RelativeTimeRoundingMode | null | undefined\n) => {\n if (roundingMode === RelativeTimeRoundingMode.Week) {\n return endOfWeek(date);\n }\n if (roundingMode === RelativeTimeRoundingMode.Month) {\n return endOfMonth(date);\n }\n if (roundingMode === RelativeTimeRoundingMode.Year) {\n return endOfYear(date);\n }\n return endOfDay(date);\n};\n","import { formatInTimeZone } from 'date-fns-tz';\nimport { DEFAULT_TIMEZONE_LOCAL } from 'src/contexts/SiteTimezoneContext/SiteTimezoneContext.constants';\nimport {\n FormatOption,\n FormatOption_Percent,\n} from 'src/modals/EditTableColumns/EditTableColumns.constants';\n\nimport { stringToUtcDate } from './dateTimeUtils';\nimport { getCurrentLanguage } from './localeUtils';\n\n// From .NET\nexport const INT_MAX_VALUE = 2147483647;\n\n/**\n * @param n Number to round\n * @param decimalPlaces number of decimal places to keep\n * @returns\n */\nexport const roundToPrecision = (n: number, decimalPlaces: number) => {\n const factor = Math.pow(10, decimalPlaces);\n return Math.round(n * factor) / factor;\n};\n\nexport const formatNumber = (\n n: number,\n decimal = 0,\n locale: string = getCurrentLanguage(),\n isUnbounded?: boolean\n) => {\n return n.toLocaleString(locale, {\n minimumFractionDigits: decimal,\n maximumFractionDigits: !isUnbounded ? decimal : undefined,\n style: 'decimal',\n });\n};\n\nexport const formatPercent = (\n n: number,\n decimal = 0,\n locale: string = getCurrentLanguage(),\n isUnbounded?: boolean\n) => {\n return n.toLocaleString(locale, {\n minimumFractionDigits: decimal,\n maximumFractionDigits: !isUnbounded ? decimal : undefined,\n style: 'percent',\n });\n};\n\nexport const formatCurrency = (\n n: number | null | undefined,\n currencyCode?: string | null,\n decimal?: number | null,\n locale?: string | null,\n isUnbounded?: boolean\n) => {\n n = n ?? 0;\n const result = n.toLocaleString(locale ?? getCurrentLanguage(), {\n minimumFractionDigits: decimal ?? 2,\n maximumFractionDigits: !isUnbounded ? decimal ?? 2 : undefined,\n style: 'currency',\n currency: currencyCode ?? 'USD',\n });\n\n return result;\n};\n\nconst precisionOptionMappings: Partial<\n Record<\n FormatOption,\n { suffix?: string; value?: number; roundToDigits?: number }\n >\n> = {\n [FormatOption.Millions]: {\n suffix: 'M',\n value: 1_000_000,\n roundToDigits: 1,\n },\n [FormatOption.Thousands]: {\n suffix: 'k',\n value: 1_000,\n roundToDigits: 1,\n },\n [FormatOption.Whole]: { roundToDigits: 0 },\n [FormatOption.Precise]: { roundToDigits: 2 },\n};\n\ntype DecimalOption = {\n displayAsDecimal?: boolean;\n roundToDigits: number;\n};\n\nconst DECIMAL_OPTION_MAPPINGS: Record = {\n [FormatOption.Percent_RoundToTwo]: { roundToDigits: 2 },\n [FormatOption.Percent_RoundToOne]: { roundToDigits: 1 },\n [FormatOption.Percent_RoundToWhole]: { roundToDigits: 0 },\n [FormatOption.Percent_AsDecimal_RoundToOne]: {\n displayAsDecimal: true,\n roundToDigits: 1,\n },\n [FormatOption.Percent_AsDecimal_RoundToTwo]: {\n displayAsDecimal: true,\n roundToDigits: 2,\n },\n [FormatOption.Percent_AsDecimal_RoundToThree]: {\n displayAsDecimal: true,\n roundToDigits: 3,\n },\n};\n\n/**\n * Supported options types: `DateTime`, `Percent`, `Standard`\n * Note: using NumericalPrecisionOption.DateTime_RelativeDateTime will result in unlocalized text,\n * currently hardcoded as English translations. Invoke getTimeDateDifferenceAsShorthand directly in this case.\n */\nexport const applyNumberFormatting = ({\n inputNumber,\n isDateTime,\n currencyCode,\n currencyDecimalDigits,\n isPercent,\n enableUtcFallback,\n localeText,\n precision = isDateTime\n ? FormatOption.DateTime_MonthDD_Time\n : isPercent\n ? FormatOption.Percent_RoundToTwo\n : FormatOption.Precise,\n timeZone,\n}: {\n inputNumber?: number | string | null;\n precision?: FormatOption;\n currencyCode?: string | null;\n currencyDecimalDigits?: number | null;\n isPercent?: boolean;\n isDateTime?: boolean;\n enableUtcFallback?: boolean;\n localeText?: {\n /**\n * `Ago` text\n */\n ago: string;\n /**\n * `In` text\n */\n in: string;\n /**\n * `Now` text\n */\n now: string;\n };\n timeZone?: string;\n}) => {\n if (inputNumber == null) return inputNumber;\n\n if (isDateTime) {\n const inputDate = enableUtcFallback\n ? stringToUtcDate(String(inputNumber))\n : new Date(String(inputNumber));\n\n let formatStr = '';\n\n switch (precision) {\n case FormatOption.DateTime_MMDD:\n formatStr = 'MM/dd';\n break;\n case FormatOption.DateTime_MMDD_Time:\n formatStr = 'MM/dd h:mma';\n break;\n case FormatOption.DateTime_MMDD_Time_Day:\n formatStr = 'MM/dd h:mma, EEE';\n break;\n case FormatOption.DateTime_MonthDD:\n formatStr = 'MMM d';\n break;\n case FormatOption.DateTime_MonthDD_Time:\n formatStr = 'MMM d, h:mma';\n break;\n case FormatOption.DateTime_MonthDD_Time_Day:\n formatStr = 'MMM d, h:mma, EEE';\n break;\n case FormatOption.DateTime_MMDDYY:\n formatStr = 'MM/dd/yy';\n break;\n case FormatOption.DateTime_Month_DD_YY:\n formatStr = \"MMM d ''yy\";\n break;\n case FormatOption.DateTime_Month_DD_YY_Time:\n formatStr = \"MMM d ''yy, h:mma\";\n break;\n case FormatOption.DateTime_Month_DD_YY_Time_Day:\n formatStr = \"MMM d ''yy, h:mma, EEE\";\n break;\n default:\n formatStr = 'MM/dd';\n }\n\n return formatInTimeZone(\n inputDate,\n timeZone ?? DEFAULT_TIMEZONE_LOCAL,\n formatStr\n );\n }\n\n if (isPercent) {\n const defaultDecimalOption: DecimalOption = {\n displayAsDecimal: true,\n roundToDigits: 1,\n };\n const { displayAsDecimal = false, roundToDigits } =\n DECIMAL_OPTION_MAPPINGS[precision as FormatOption_Percent] ??\n defaultDecimalOption;\n\n // Display as decimal means to not interpret as a percentage\n const value = displayAsDecimal ? +inputNumber : +inputNumber * 100;\n const formattedNumber = formatNumber(value, roundToDigits);\n const suffix = displayAsDecimal ? '' : '%';\n\n return `${formattedNumber}${suffix}`;\n }\n\n const {\n suffix = '',\n value: precisionValue = 1,\n roundToDigits,\n } = precisionOptionMappings[precision] ?? {};\n\n const value = +inputNumber / precisionValue;\n\n if (currencyCode && precision === FormatOption.Precise) {\n return (\n formatCurrency(\n value,\n currencyCode,\n precision === FormatOption.Precise\n ? currencyDecimalDigits ?? undefined\n : roundToDigits\n ) + suffix\n );\n }\n\n // TODO: currently covers whole + thousands + millions, logic to be extended once product provides more info\n if (currencyCode && precision) {\n return formatCurrency(value, currencyCode, roundToDigits) + suffix;\n }\n\n // TODO: apply number modifications based on input\n return formatNumber(value, roundToDigits, undefined) + suffix;\n};\n\n/**\n * Returns a shorthand version of the difference between two dates (or one date and now)\n */\ntype GetTimeDateDifferenceAsShorthand = (arg: {\n /**\n * Input UTC Date\n */\n inputDate?: Date | null;\n /**\n * Date to compare to- defaults as now\n */\n dateToCompareTo?: Date;\n /**\n * Whether to display just the number and time unit vs relative term (ago/in)\n *\n * @example\n * `false` would show `1m ago`, `true` would show just `1m`\n */\n hideRelativeTerms?: boolean;\n /**\n * When showRelativeTerms is true or undefined, localeText must be provided\n */\n localeText?: {\n /**\n * `Ago` text\n */\n ago: string;\n /**\n * `In` text\n */\n in: string;\n /**\n * `Now` text\n */\n now: string;\n };\n}) => string | null;\n\nconst MILLISECONDS_IN_SECOND = 1_000;\nconst SECONDS_IN_MINUTE = 60;\nconst MINUTES_IN_HOUR = 60;\nconst HOURS_IN_DAY = 24;\nconst DAYS_IN_WEEK = 7;\n\nexport const getTimeDateDifferenceAsShorthand: GetTimeDateDifferenceAsShorthand =\n ({\n inputDate,\n dateToCompareTo = new Date(),\n hideRelativeTerms = false,\n localeText = { ago: 'ago', in: 'in', now: 'just now' },\n }) => {\n if (!inputDate) return null;\n const { ago: agoText, in: inText, now: nowText } = localeText;\n const difference = inputDate.getTime() - dateToCompareTo.getTime();\n const isDateInFuture = difference > 0;\n const relativeSeconds = Math.abs(difference) / MILLISECONDS_IN_SECOND;\n const relativeMinutes = relativeSeconds / SECONDS_IN_MINUTE;\n const relativeHours = relativeMinutes / MINUTES_IN_HOUR;\n const relativeDays = relativeHours / HOURS_IN_DAY;\n const relativeWeeks = relativeDays / DAYS_IN_WEEK;\n // TODO: add months by doing month + year calculations\n\n const returnWrapper = (value: string) => {\n if (hideRelativeTerms) return value;\n if (isDateInFuture) return `${inText} `.concat(value);\n return value.concat(` ${agoText}`);\n };\n\n // 0-60 seconds (now)\n if (relativeSeconds < 60) return nowText;\n // 1-120 minutes (1m-120m) - note that it's rounded and not floored\n if (relativeMinutes < 120)\n return returnWrapper(`${Math.round(relativeMinutes)}m`);\n // 1-47 hours (1h-48h)\n if (relativeHours < 48)\n return returnWrapper(`${Math.round(relativeHours)}h`);\n // 1-13 days (1d-14d)\n if (relativeDays < 14) return returnWrapper(`${Math.round(relativeDays)}d`);\n // weeks (2w-_unboundedw)\n return returnWrapper(`${Math.round(relativeWeeks)}w`);\n };\n\nexport const numberToOrdinal = (n: number) => {\n const s = ['th', 'st', 'nd', 'rd'];\n const v = n % 100;\n return n + (s[(v - 20) % 10] || s[v] || s[0]);\n};\n","import {\n CompListing,\n EventConfigScoreOverride,\n Seating,\n SectionInfo,\n SectionScoreOverride,\n VenueMapInfo,\n} from 'src/WebApiController';\n\nexport function calcSeatScore(\n values: {\n /**\n * Should be a normalized value between 0 and 100.\n */\n value?: number | null;\n /**\n * The weight (importance) of the value from 0 to 10.\n */\n weight: number;\n }[]\n) {\n let sum = 0;\n let count = 0;\n for (const { value, weight } of values) {\n if (value != null) {\n sum += weight * (value / 100);\n count++;\n }\n }\n return count > 0 ? sum / (count * 10) : 0;\n}\n\n/**\n *\n * @param defaultScoreOverrides\n * @param scoreOverrides\n * @param defaultAllScoresToZero\n * @param scaleScoreRaw Calculate scoreRaw from scaled score which is 0-100\n * @returns\n */\nexport const getCompleteEventConfigScoreOverrides = (\n defaultScoreOverrides?: SectionScoreOverride[] | null,\n scoreOverrides?: SectionScoreOverride[] | null,\n defaultAllScoresToZero?: boolean,\n scaleScoreRaw?: boolean\n) => {\n // There's no max score from venue map, so we should just use the score as is\n if (!defaultScoreOverrides?.length) {\n return scoreOverrides?.map((so) => ({\n ...so,\n\n scoreRaw: so.score,\n }));\n }\n\n if (!scoreOverrides?.length) {\n return defaultScoreOverrides.map((so) => ({\n ...so,\n score: defaultAllScoresToZero ? 0 : so.score,\n }));\n }\n\n const maxDefaultScoreRaw = defaultScoreOverrides?.reduce(\n (max, score) => Math.max(max, score.scoreRaw ?? 0),\n 0\n );\n\n const curOverridesMap = (scoreOverrides ?? []).reduce(\n (cur, score) => {\n const key = `${score.sectionId}-${score.rowId}`;\n cur[key] = score;\n\n return cur;\n },\n {} as Record\n );\n\n const result = [\n ...(scoreOverrides?.map((so) => {\n let scoreRaw = so.score;\n if (scaleScoreRaw && so.score != null && maxDefaultScoreRaw) {\n scoreRaw = so.score * 0.01 * maxDefaultScoreRaw;\n }\n\n return { ...so, scoreRaw };\n }) ?? []),\n ];\n (defaultScoreOverrides || []).forEach((dfScore) => {\n const key = `${dfScore.sectionId}-${dfScore.rowId}`;\n\n if (!curOverridesMap[key]) {\n result.push({\n ...dfScore,\n score: defaultAllScoresToZero ? 0 : dfScore.score,\n scoreRaw: defaultAllScoresToZero ? 0 : dfScore.score,\n });\n }\n });\n\n return result;\n};\n\nexport const getEventConfigScoreOverride = (\n viagogoEventId: number,\n venueMapConfig: VenueMapInfo,\n newName: string,\n eventConfigScoreOverride?: EventConfigScoreOverride | null,\n defaultAllScoresToZero?: boolean,\n scaleScoreRaw?: boolean,\n defaultConfigPayload?: string | null,\n isOverrideTemplate?: boolean\n) => {\n return {\n viagogoEventId: viagogoEventId,\n id: isOverrideTemplate ? -1 : (eventConfigScoreOverride?.id ?? -1),\n name: isOverrideTemplate\n ? newName\n : (eventConfigScoreOverride?.name ?? newName),\n eventIds: eventConfigScoreOverride?.eventIds,\n cfgId: isOverrideTemplate\n ? venueMapConfig!.venueCfgId\n : (eventConfigScoreOverride?.cfgId ?? venueMapConfig!.venueCfgId),\n cfgPayload: isOverrideTemplate\n ? defaultConfigPayload\n : (defaultConfigPayload ?? eventConfigScoreOverride?.cfgPayload),\n isActive: isOverrideTemplate ? null : eventConfigScoreOverride?.isActive,\n scoreOverrides: isOverrideTemplate\n ? eventConfigScoreOverride?.scoreOverrides\n : (getCompleteEventConfigScoreOverrides(\n venueMapConfig?.sectionScores,\n eventConfigScoreOverride?.scoreOverrides,\n defaultAllScoresToZero,\n scaleScoreRaw\n ) ?? []),\n\n // TODO: old field for global template configs feature. Determine what the plan is\n // for this feature and remove if we do not plan on releasing it so we can reduce\n // the confusing naming\n isTemplate: eventConfigScoreOverride?.isTemplate,\n } as EventConfigScoreOverride;\n};\n\nexport const getRowRepresentingSectionMedianScore = (\n sectionId: number,\n seatScores: SectionScoreOverride[]\n): SectionScoreOverride | undefined => {\n const sectionScores = seatScores!.filter(\n (s) => s.sectionId === sectionId && s.score\n );\n\n return sectionScores.toSorted((s1, s2) => s1.rowId - s2.rowId)[\n Math.round(sectionScores.length / 2)\n ];\n};\n\nexport const getMedianScoreForSection = (\n sectionId: number,\n seatScores: SectionScoreOverride[]\n) => {\n const sectionScores = seatScores!.filter((s) => s.sectionId === sectionId);\n const values = sectionScores.map((s) => s.score ?? -1);\n return median(values);\n};\n\nexport const getMatchingSectionRow = (\n l: Seating | CompListing,\n sections?: SectionInfo[] | null\n) => {\n const rowId = l.rowId;\n const sectionName = l.section?.trim().toLocaleUpperCase();\n const rowName = l.row?.trim().toLocaleUpperCase();\n\n if (rowId) {\n const section = sections?.find((s) => s.rows.some((r) => r.id === rowId));\n\n if (section) {\n const row = section?.rows.find((r) => r.id === rowId) ?? section?.specRow;\n\n const ticketClassId =\n section?.rows.find((r) => r.id === rowId) != null\n ? section?.rows.find((r) => r.id === rowId)?.tktClass?.id\n : section?.specRow?.ticketClassId;\n\n return { section, row, ticketClassId };\n }\n }\n\n const section = sections?.find(\n (s) =>\n s.name.toLocaleUpperCase() === sectionName &&\n (!rowName ||\n s.rows.some((r) => r.name?.trim().toLocaleUpperCase() === rowName))\n );\n\n const row =\n section?.rows.find((r) => !!r.name && r.name === rowName) ??\n section?.specRow;\n\n const ticketClassId =\n section?.rows.find((r) => !!r.name && r.name === rowName) != null\n ? section?.rows.find((r) => !!r.name && r.name === rowName)?.tktClass?.id\n : section?.specRow?.ticketClassId;\n\n return { section, row, ticketClassId };\n};\n\nexport const getSectionsSameZone = (\n l: Seating | CompListing,\n sections: SectionInfo[] | undefined\n) => {\n const { ticketClassId } = getMatchingSectionRow(l, sections);\n\n if (!ticketClassId) return [];\n\n return sections?.filter((s) =>\n s.rows.some((r) => r.tktClass?.id === ticketClassId)\n );\n};\n\nexport const getSeatScore = (\n l: Seating | CompListing | null | undefined,\n scoreOverrides?: SectionScoreOverride[] | null,\n sections?: SectionInfo[] | null\n) => {\n if (!l) return undefined;\n\n let seatScore = scoreOverrides?.find(\n (sso) => l.rowId != null && l.rowId === sso.rowId\n )?.score;\n if (seatScore != null) return seatScore;\n\n const { row } = getMatchingSectionRow(l, sections);\n if (!row) return undefined;\n\n seatScore = scoreOverrides?.find((sso) => row?.id === sso.rowId)?.score;\n return seatScore;\n};\n\nexport const updateScoreForSectionMaintainingRowScoreRatio = (\n newScore: number,\n sectionId: number,\n scoreOverrides?: SectionScoreOverride[] | null\n) => {\n const newScoreOverrides = [...(scoreOverrides ?? [])];\n const overridesToEdit = newScoreOverrides?.filter(\n (so) => so.sectionId === sectionId\n );\n\n if (overridesToEdit.length) {\n updateScoreMaintainingRowScoreRatio(newScore, overridesToEdit);\n\n return newScoreOverrides;\n } else {\n return null;\n }\n};\n\nexport const updateScoreMaintainingRowScoreRatio = (\n newScore: number,\n overridesToEdit: SectionScoreOverride[]\n) => {\n const firstNonZeroRow = overridesToEdit.find((r) => r.score);\n if (!firstNonZeroRow) {\n // if there's no row with score > 0, then we just set all row to be the same score\n overridesToEdit.forEach((so) => (so.score = newScore));\n } else {\n // Find the median row score\n const scores: number[] = overridesToEdit\n .map((r) => r.score)\n .filter(\n (score): score is number => score !== null && score !== undefined\n );\n\n // If the median is somehow 0 just set it to 1 so the ratio doesn't change\n let med = median(scores);\n if (med == 0) {\n med = 1;\n }\n\n const ratio = newScore / med;\n overridesToEdit.forEach((so) => (so.score = (so.score ?? 0) * ratio));\n }\n};\n\nexport const median = (values: number[]) => {\n if (values.length === 0) return 0;\n\n values = values.toSorted((a, b) => a - b);\n\n const half = Math.floor(values.length / 2);\n\n if (values.length % 2) {\n return values[half];\n }\n\n return (values[half - 1] + values[half]) / 2.0;\n};\n","import { useMemo } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { roundToPrecision } from 'src/utils/numberFormatter';\nimport { median } from 'src/utils/seatScoreUtils';\nimport { SectionInfo, SectionScoreOverride } from 'src/WebApiController';\n\nimport * as styles from './SectionDisplays.css';\n\nexport const SectionDisplay = ({\n section,\n scoreOverrides,\n lowestPrice,\n medianPrice,\n highestPrice,\n sectionAreaName,\n}: {\n section: SectionInfo;\n scoreOverrides?: SectionScoreOverride[] | null;\n lowestPrice?: string | null;\n medianPrice?: string | null;\n highestPrice?: string | null;\n sectionAreaName?: string | null;\n}) => {\n const score = useMemo(() => {\n const scores =\n scoreOverrides\n ?.filter((s) => s.sectionId === section.id)\n .map((s) => s.score ?? 0) ?? [];\n\n // If we do not have any scores just show the spec row score.\n // Otherwise, return the median\n if (scores.length == 0) {\n return section.specRow?.seatQualityScore;\n }\n\n return median(scores);\n }, [scoreOverrides, section.id, section.specRow?.seatQualityScore]);\n\n return (\n \n \n
\n \n
\n
\n {section.name}\n
\n
\n {score != null && (\n \n
\n \n
\n \n {roundToPrecision(score, 4)}\n \n
\n )}\n {lowestPrice != null && (\n \n
\n \n
\n
{lowestPrice}
\n \n )}\n {medianPrice != null && (\n \n
\n \n
\n
{medianPrice}
\n \n )}\n {highestPrice != null && (\n \n
\n \n
\n
{highestPrice}
\n \n )}\n {sectionAreaName != null && (\n \n
\n \n
\n
{sectionAreaName}
\n \n )}\n \n );\n};\n","import { FormatContent } from 'src/contexts/ContentContext';\nimport { Stack } from 'src/core/ui';\nimport { CrossIcon } from 'src/svgs/Viagogo';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { SectionInfo, SectionScoreOverride } from 'src/WebApiController';\n\nimport { SectionDisplay } from './SectionDisplay';\nimport * as styles from './SectionDisplays.css';\n\nexport const MultiSectionsDisplay = ({\n sections,\n scoreOverrides,\n onClearSelection,\n}: {\n sections: SectionInfo[];\n scoreOverrides?: SectionScoreOverride[] | null;\n onClearSelection?: () => void;\n}) => {\n return sections.length === 1 ? (\n \n ) : (\n \n \n
\n \n
\n {onClearSelection && (\n onClearSelection()} />\n )}\n
\n \n );\n};\n","import { Content } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport styled from 'styled-components/macro';\n\nconst GeneralAdmissionContainer = styled.div`\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: 100%;\n margin: ${() => `${vars.spacing.sm} ${vars.spacing.lg}`};\n`;\n\nconst GeneralAdmissionHeader = styled.div`\n color: ${(props) => props.theme.colors.textBrand};\n ${({\n theme: {\n typography: { getStyles },\n },\n }) => getStyles('title6')};\n`;\nconst GeneralAdmissionText = styled.div`\n ${({\n theme: {\n typography: { getStyles },\n },\n }) => getStyles('body2')};\n`;\n\nconst GeneralAdmissionMessage = () => {\n return (\n \n \n \n \n \n \n \n \n );\n};\n\nexport { GeneralAdmissionMessage };\n","export const rawFetch = async (url: string, options?: RequestInit) => {\n const a = await fetch(url, options);\n\n if (a.ok) {\n let b;\n const headers = [...a.headers.entries()];\n\n const contentTypeHeader = headers.find(([key]) => key === 'content-type');\n\n const contentType = contentTypeHeader?.[1] ?? null;\n\n if (contentType && contentType.includes('application/json')) {\n b = await a.json();\n } else {\n b = await a.text();\n }\n return b;\n }\n throw new Error(\n `send request error - ${JSON.stringify({\n status: a.status,\n message: a.statusText,\n })}`\n );\n};\n","import Rainbow from 'rainbowvis.js';\nimport { useMemo } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport * as styles from './ColorBand.css';\n\nexport type ColorBandProps = {\n numOfSteps: number;\n spectrum: string[];\n labels?: ContentId[] | string[];\n};\n\nexport const ColorBand = ({ numOfSteps, spectrum, labels }: ColorBandProps) => {\n const colorSteps = useMemo(() => {\n const rainbow = new Rainbow();\n rainbow.setNumberRange(1, numOfSteps);\n rainbow.setSpectrumByArray(spectrum);\n\n const colorSteps = [];\n for (let i = 0; i < numOfSteps; i++) {\n const color = rainbow.colorAt(i + 1);\n colorSteps.push();\n }\n return colorSteps;\n }, [numOfSteps, spectrum]);\n\n return (\n
\n
{colorSteps}
\n
\n {labels?.map((l, i) => (\n {}\n ))}\n
\n
\n );\n};\n\nconst ColorStep = ({ color }: { color: string }) => {\n return (\n
\n );\n};\n","export default \"__VITE_ASSET__12f8602d__\"","import { vars } from 'src/core/themes';\nimport CircleArrowUp from 'src/images/CircleArrowUp.png';\nimport { FocalPointInfo } from 'src/WebApiController';\n\nexport const addFocalPoint = (\n svgElement: SVGSVGElement,\n focalPoint?: FocalPointInfo | null\n) => {\n if (\n focalPoint &&\n focalPoint.x &&\n focalPoint.y &&\n svgElement.getElementById('focal-point-cir') == null\n ) {\n const circle = document.createElementNS(\n 'http://www.w3.org/2000/svg',\n 'circle'\n );\n circle.setAttribute('id', 'focal-point-cir');\n circle.setAttribute('cx', focalPoint.x.toString());\n circle.setAttribute('cy', focalPoint.y.toString());\n circle.setAttribute('r', '50');\n circle.setAttribute('fill', vars.color.backgroundBrandActive);\n svgElement.appendChild(circle);\n\n const image = document.createElementNS(\n 'http://www.w3.org/2000/svg',\n 'image'\n );\n\n // TODO - There seems to be a bug from Catalog that focal point Type is always Point - even though they should be PointAndDir when angle > 0\n // So IsDirectional is always false even for maps that clearly has a direction (and the angle shows it)\n // So we'll render the arrow whenever there is a non-zero angle\n if ((focalPoint.angleDeg ?? 0) > 0 || focalPoint.isDirectional) {\n image.setAttribute('id', 'focal-point-img');\n image.setAttribute('x', (focalPoint.x - 40).toString());\n image.setAttribute('y', (focalPoint.y - 40).toString());\n image.setAttribute(\n 'transform',\n `rotate(${focalPoint.angleDeg ?? 0}, ${focalPoint.x}, ${focalPoint.y})`\n );\n image.setAttribute('href', CircleArrowUp);\n image.setAttribute('width', '80');\n image.setAttribute('height', '80');\n\n svgElement.appendChild(image);\n } else {\n const circle2 = document.createElementNS(\n 'http://www.w3.org/2000/svg',\n 'circle'\n );\n circle2.setAttribute('id', 'focal-point-cir-2');\n circle2.setAttribute('cx', focalPoint.x.toString());\n circle2.setAttribute('cy', focalPoint.y.toString());\n circle2.setAttribute('r', '30');\n circle2.setAttribute('fill', vars.color.backgroundBrandActive);\n circle2.setAttribute('stroke', vars.color.textInverted);\n circle2.setAttribute('stroke-width', '10');\n svgElement.appendChild(circle2);\n }\n }\n};\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport type VenueMapContentContainerProps = {\n isWhiteBackground?: boolean;\n};\n\nexport const VenueMapContentContainer = styled.div`\n display: flex;\n flex-direction: column;\n height: 100%;\n width: 100%;\n background-color: ${(props) =>\n props.isWhiteBackground\n ? props.theme.colors.white\n : props.theme.colors.backgroundSecondary};\n padding: ${() => vars.spacing.lg};\n border-radius: ${() => vars.spacing.lg};\n`;\n\nexport const StyledDiv = styled.div<{\n removePinchZoom?: boolean;\n setTransitionAnimation?: boolean;\n blurMap?: boolean;\n hideMap?: boolean;\n isRelocatedStaticInfo?: boolean;\n}>`\n & svg {\n height: ${({ isRelocatedStaticInfo }) =>\n isRelocatedStaticInfo ? `90%` : `100%`};\n width: 100%;\n }\n & * {\n text-anchor: middle;\n font-weight: bold;\n }\n & .svg-pan-zoom_viewport {\n transition: ${(props) =>\n props.removePinchZoom\n ? `none`\n : `transform 0.5s cubic-bezier(0, 0.8, 0.5, 1)`};\n }\n height: 100%;\n cursor: move;\n transition: ${({ setTransitionAnimation }) =>\n setTransitionAnimation ? '0.2s filter linear, 0.2s opacity ease-in' : ''};\n filter: ${({ blurMap }) => (blurMap ? 'blur(5px)' : '')};\n opacity: ${({ hideMap }) => (hideMap ? 0 : 1)};\n`;\n\nexport const StyledResetVariant = styled.span<{\n showFiltersOnTop?: boolean;\n}>`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n overflow-anchor: none;\n position: absolute;\n bottom: 0;\n right: 0;\n z-index: ${(props) => (props.showFiltersOnTop ? 1 : 100)};\n padding: ${() => vars.spacing.sm};\n`;\n\nexport const IconParent = styled.button`\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n outline: none;\n`;\n\nexport const StyledIconParentVariant = styled(IconParent)`\n height: ${() => vars.spacing.xl};\n width: ${() => vars.spacing.xl};\n border: 1px solid ${(props) => props.theme.colors.borderPrimary};\n border-radius: 50%;\n background-color: ${(props) => props.theme.colors.backgroundPrimary};\n`;\n\nexport const StyledBorderDiv = styled.div`\n display: none;\n margin-top: ${() => vars.spacing.sm};\n width: 40px;\n @media ${({ theme: { media } }) => `${media.tablet}, ${media.desktop}`} {\n display: block;\n }\n`;\n\nexport const StyledHoverDiv = styled.div`\n display: none;\n\n &:nth-of-type(1) {\n border-width: 1px 1px 0 1px;\n border-style: solid;\n border-color: ${(props) => props.theme.colors.borderPrimary};\n border-radius: ${({ theme }) =>\n `${theme.borderRadius.s}, ${theme.borderRadius.s}, 0, 0`};\n }\n\n &:nth-of-type(2) {\n border-width: 1px 1px 1px 1px;\n border-style: solid;\n border-color: ${(props) => props.theme.colors.borderPrimary};\n border-radius: ${({ theme }) =>\n `0, 0, ${theme.borderRadius.s}, ${theme.borderRadius.s}`};\n }\n\n @media ${({ theme: { media } }) => `${media.tablet}, ${media.desktop}`} {\n display: flex;\n background-color: ${(props) => props.theme.colors.backgroundPrimary};\n justify-content: center;\n align-items: center;\n height: 30px;\n :hover {\n background-color: ${(props) => props.theme.colors.backgroundInteraction};\n cursor: pointer;\n }\n }\n`;\n\nexport const SellerListingDiv = styled.span`\n ${({\n theme: {\n typography: { getStyles },\n },\n }) => getStyles('body2')};\n border-radius: ${({ theme: { borderRadius } }) => borderRadius.s};\n line-height: ${() => vars.typography.lineHeight.sm};\n padding: 0 ${() => vars.spacing.sm};\n height: ${() => vars.typography.lineHeight.sm};\n display: inline-block;\n background-color: ${(props) => props.theme.colors.backgroundInfo};\n color: ${(props) => props.theme.colors.textStrong};\n text-align: center;\n`;\n","import {\n Seating,\n SectionInfo,\n VenueMapInfo,\n VenueMapSectionType,\n} from 'src/WebApiController';\n\nexport const isSeatingMatchSectionInfo = (\n section: SectionInfo,\n sectionText?: string | null,\n rowId?: number | null\n) => {\n return (\n sectionText?.toLocaleUpperCase() === section.name.toLocaleUpperCase() ||\n section.rows.some((r) => r.id === rowId)\n );\n};\n\nexport const SECTION_TYPES_WITH_ROWS = [\n VenueMapSectionType.ForcedRow,\n VenueMapSectionType.OptionalRow,\n VenueMapSectionType.OptionalRowPairs,\n VenueMapSectionType.ForcedRowPairs,\n];\n\n/**\n * Indicates if the venue map has sections with rows and if these rows only contain speculative data\n * @param venueMap\n * @returns\n */\nexport const isMissingRowData = (venueMap: VenueMapInfo | null | undefined) => {\n if (!venueMap) {\n // If we don't have a venue map, we can't determine if it's missing row data\n return false;\n }\n\n const sectionsWithRow = venueMap.sections.filter((s) =>\n SECTION_TYPES_WITH_ROWS.includes(s.sectionType)\n );\n const hasNonSpeculativeRows = sectionsWithRow.some(\n (s) => s.rows.filter((r) => r.isSpeculative === false).length > 0\n );\n\n return sectionsWithRow.length > 0 && !hasNonSpeculativeRows;\n};\n\nexport const findTicketClass = (\n seating: Seating,\n sectionInfo?: SectionInfo[] | null\n) => {\n if (!sectionInfo?.length) {\n return;\n }\n\n if (seating.rowId != null) {\n return sectionInfo\n .find((s) => s.rows.some((r) => r.id === seating.rowId))\n ?.rows.find((r) => r.id === seating.rowId)?.tktClass;\n }\n\n if (seating.row) {\n return sectionInfo\n .find(\n (s) =>\n s.name.toLocaleUpperCase() === seating.section.toLocaleUpperCase() &&\n s.rows.some(\n (r) =>\n r.name?.toLocaleUpperCase() === seating.row?.toLocaleUpperCase()\n )\n )\n ?.rows.find(\n (r) => r.name?.toLocaleUpperCase() === seating.row?.toLocaleUpperCase()\n )?.tktClass;\n }\n};\n\nexport const filterSectionByZone =\n (classId: number | undefined) =>\n ({ rows }: SectionInfo) =>\n rows?.some(({ tktClass: ticketClass }) => ticketClass?.id === classId);\n\nexport const filterSectionByZoneRestrict =\n (classId: number | undefined) =>\n ({ rows, sectionType }: SectionInfo) =>\n SECTION_TYPES_WITH_ROWS.includes(sectionType) &&\n rows?.filter((r) => r.isSpeculative === false).length > 0 &&\n rows?.some(({ tktClass: ticketClass }) => ticketClass?.id === classId);\n\nexport const filterSectionByRowType = ({ rows, sectionType }: SectionInfo) =>\n SECTION_TYPES_WITH_ROWS.includes(sectionType) &&\n rows?.filter((r) => r.isSpeculative === false).length > 0;\n","import { MutableRefObject } from 'react';\nimport { vars } from 'src/core/themes';\nimport { SECTION_TYPES_WITH_ROWS } from 'src/utils/venueConfigUtils';\nimport { SectionInfo } from 'src/WebApiController';\n\nexport const isMissiongSectionData = ({ rows, sectionType }: SectionInfo) => {\n // Only check on sections with rows, others are considered valid always\n if (!SECTION_TYPES_WITH_ROWS.includes(sectionType)) {\n return false;\n }\n\n // If all rows are speculative, we consider it missing data\n if (rows.every((r) => r.isSpeculative)) {\n return true;\n }\n\n // If any row is not speculative and has no ordinal, we consider it missing data\n if (\n rows.some(({ isSpeculative, ordinal }) => !isSpeculative && ordinal == null)\n ) {\n return true;\n }\n\n return false;\n};\n\nexport type DrawingPoint = { x: number; y: number };\n\nconst checkIntersection = (\n rect: DOMRect,\n pointA: DrawingPoint,\n pointB: DrawingPoint\n) => {\n // Get the corners of the bounding box\n const topLeft = { x: rect.left, y: rect.top };\n const topRight = { x: rect.right, y: rect.top };\n const bottomLeft = { x: rect.left, y: rect.bottom };\n const bottomRight = { x: rect.right, y: rect.bottom };\n\n // Check if the line intersects any of the four sides of the box\n return (\n lineIntersects(pointA, pointB, topLeft, topRight) || // Top side\n lineIntersects(pointA, pointB, topRight, bottomRight) || // Right side\n lineIntersects(pointA, pointB, bottomRight, bottomLeft) || // Bottom side\n lineIntersects(pointA, pointB, bottomLeft, topLeft) // Left side\n );\n};\n\n// Helper function to check if two line segments intersect\nconst lineIntersects = (\n pointA: DrawingPoint,\n pointB: DrawingPoint,\n compareA: DrawingPoint,\n compareB: DrawingPoint\n) => {\n // Calculate the direction of the lines\n const denominator =\n (pointA.x - pointB.x) * (compareA.y - compareB.y) -\n (pointA.y - pointB.y) * (compareA.x - compareB.x);\n if (denominator === 0) return false; // Lines are parallel\n\n const t =\n ((pointA.x - compareA.x) * (compareA.y - compareB.y) -\n (pointA.y - compareA.y) * (compareA.x - compareB.x)) /\n denominator;\n const u =\n -(\n (pointA.x - pointB.x) * (pointA.y - compareA.y) -\n (pointA.y - pointB.y) * (pointA.x - compareA.x)\n ) / denominator;\n\n // Check if the intersection point is within both line segments\n return t >= 0 && t <= 1 && u >= 0 && u <= 1;\n};\n\n// Check if the DOM rect crosses any of the lines\nexport const crossesPoints = (points: DrawingPoint[], rect: DOMRect) => {\n if (points.length < 2) {\n return false;\n }\n for (let index = 1; index < points.length; index++) {\n if (checkIntersection(rect, points[index - 1], points[index])) {\n return true;\n }\n }\n return false;\n};\n\n// Draw the lines in the canvas\nconst drawLines = (\n context: CanvasRenderingContext2D,\n points: DrawingPoint[]\n) => {\n if (points.length < 2) {\n return;\n }\n context.clearRect(0, 0, context.canvas.width, context.canvas.height);\n context.strokeStyle = vars.color.backgroundBrandActive;\n context.beginPath();\n context.moveTo(points[0].x, points[0].y);\n for (let index = 1; index < points.length; index++) {\n context.lineTo(points[index].x, points[index].y);\n }\n context.stroke();\n context.closePath();\n};\n\nexport const registerDrawLine = (\n svgElementRef: MutableRefObject,\n onDoubleClickStart: MutableRefObject<() => void>,\n onDoubleClickDone: MutableRefObject<(points: DrawingPoint[]) => void>,\n allowDrawLine = true\n) => {\n if (\n svgElementRef.current == null ||\n svgElementRef.current.parentElement === null ||\n !allowDrawLine\n ) {\n return () => {};\n }\n\n let element: HTMLCanvasElement | null = null;\n let context: CanvasRenderingContext2D | null = null;\n // Points in the canvas to draw\n const points: DrawingPoint[] = [];\n // Points in the screen to report\n const rectPoints: DrawingPoint[] = [];\n\n const resetCanvas = () => {\n if (\n svgElementRef.current == null ||\n svgElementRef.current.parentElement === null\n ) {\n return;\n }\n const curreParent = svgElementRef.current.parentElement as HTMLDivElement;\n if (curreParent != null && element !== null) {\n curreParent.removeChild(element);\n curreParent.style.cursor = 'default';\n element = null;\n points.length = 0;\n rectPoints.length = 0;\n }\n if (context !== null) {\n context.clearRect(0, 0, context.canvas.width, context.canvas.height);\n context = null;\n }\n };\n\n const onDoubleClick = (event: MouseEvent) => {\n if (\n svgElementRef.current == null ||\n svgElementRef.current.parentElement === null\n ) {\n return;\n }\n if (event.shiftKey || event.ctrlKey || event.altKey || event.metaKey) {\n return;\n }\n\n // Double click not started, start it\n if (element == null && onDoubleClickStart.current) {\n const curreParent = svgElementRef.current.parentElement as HTMLDivElement;\n const { left: offsetX, top: offsetY } =\n svgElementRef.current.getBoundingClientRect();\n onDoubleClickStart.current();\n points.push({ x: event.clientX - offsetX, y: event.clientY - offsetY });\n rectPoints.push({ x: event.clientX, y: event.clientY });\n element = document.createElement('canvas');\n element.width = curreParent.clientWidth;\n element.height = curreParent.clientHeight;\n element.style.position = 'absolute';\n element.style.left = `0px`;\n element.style.top = `0px`;\n context = element.getContext('2d');\n curreParent.appendChild(element);\n curreParent.style.cursor = 'crosshair';\n return;\n }\n\n onDoubleClickDone.current && onDoubleClickDone.current(rectPoints);\n resetCanvas();\n };\n const onClick = (event: MouseEvent) => {\n if (\n svgElementRef.current == null ||\n svgElementRef.current.parentElement === null ||\n element === null ||\n context === null\n ) {\n return;\n }\n const { left: offsetX, top: offsetY } =\n svgElementRef.current.getBoundingClientRect();\n points.push({ x: event.clientX - offsetX, y: event.clientY - offsetY });\n rectPoints.push({ x: event.clientX, y: event.clientY });\n if (points.length > 1) {\n drawLines(context, points);\n }\n };\n\n const onMouseMove = (event: MouseEvent) => {\n if (\n svgElementRef.current == null ||\n svgElementRef.current.parentElement === null ||\n element === null ||\n context === null\n ) {\n return;\n }\n\n const { left: offsetX, top: offsetY } =\n svgElementRef.current.getBoundingClientRect();\n const currentPoint = {\n x: event.clientX - offsetX,\n y: event.clientY - offsetY,\n };\n drawLines(context, [...points, currentPoint]);\n };\n const onMouseLeave = (_: MouseEvent) => {\n if (element !== null && context !== null) {\n onDoubleClickDone.current && onDoubleClickDone.current(rectPoints);\n }\n resetCanvas();\n };\n\n const parentElement = svgElementRef.current.parentElement as HTMLDivElement;\n // Trick to make the parent focusable so that it can receive keyboard events\n parentElement.setAttribute('tabindex', '0');\n // Remove the outline when the parent is focused\n parentElement.addEventListener('focus', () => {\n parentElement.style.outline = 'none';\n });\n\n parentElement.addEventListener('dblclick', onDoubleClick);\n parentElement.addEventListener('click', onClick);\n parentElement.addEventListener('mousemove', onMouseMove);\n parentElement.addEventListener('mouseleave', onMouseLeave);\n\n // Escape key to cancel the drawing\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n onDoubleClickDone.current && onDoubleClickDone.current(rectPoints);\n resetCanvas();\n }\n };\n parentElement.addEventListener('keydown', onKeyDown);\n\n return () => {\n parentElement?.removeEventListener('dblclick', onDoubleClick);\n parentElement?.removeEventListener('click', onClick);\n parentElement?.removeEventListener('mousemove', onMouseMove);\n parentElement?.removeEventListener('mouseleave', onMouseLeave);\n parentElement?.removeEventListener('keydown', onKeyDown);\n\n resetCanvas();\n };\n};\n\n// Relax the panning detection, panning when moved at least 1 pixel\nconst moved = (a: MouseEvent | null, b: MouseEvent | null): boolean => {\n if (a === null || b === null) {\n return false;\n }\n return Math.sqrt(Math.pow(a.x - b.x, 2) + Math.pow(a.y - b.y, 2)) > 1;\n};\n\nexport const registerPanningListners = (\n svgElement: HTMLElement | undefined | null,\n isPanning: React.MutableRefObject\n) => {\n // This is a hack to check if user is panning or clicking\n let willClick = false;\n let downEvent: MouseEvent | null = null;\n\n const panningHandlers = {\n mousedown: (event: Event) => {\n willClick = true;\n downEvent = event as MouseEvent;\n },\n mousemove: (event: Event) => {\n if (\n willClick &&\n !isPanning.current &&\n moved(downEvent as MouseEvent, event as MouseEvent)\n ) {\n isPanning.current = true;\n }\n },\n mouseup: (_: Event) => {\n downEvent = null;\n if (willClick) {\n // Click event is always fired after mouseup,\n // reserve a small time on the panning flag to avoid click and pan at the same time\n setTimeout(() => {\n isPanning.current = false;\n willClick = false;\n }, 50);\n }\n },\n } as Record void>;\n\n for (const eventName in panningHandlers) {\n svgElement?.addEventListener(eventName, panningHandlers[eventName]);\n }\n\n return () => {\n for (const eventName in panningHandlers) {\n svgElement?.removeEventListener(eventName, panningHandlers[eventName]);\n }\n };\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const AddFileIcon = (props: PosIconProps) => {\n return (\n \n \n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport function SignalStep0Icon(props: Omit) {\n return (\n \n \n \n );\n}\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport function SignalStep1Icon(props: Omit) {\n return (\n \n \n \n \n );\n}\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport function SignalStep2Icon(props: Omit) {\n return (\n \n \n \n \n \n );\n}\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport function SignalStep3Icon(props: Omit) {\n return (\n \n \n \n \n \n \n );\n}\n","import { useEffect, useState } from 'react';\n\nimport { SignalStep0Icon } from './SignalStep0Icon';\nimport { SignalStep1Icon } from './SignalStep1Icon';\nimport { SignalStep2Icon } from './SignalStep2Icon';\nimport { SignalStep3Icon } from './SignalStep3Icon';\nimport { PosIconProps } from './SvgWrapper';\n\nexport function AnimatedBroadcastIcon({\n ...props\n}: Omit) {\n const [step, setStep] = useState(0);\n\n useEffect(() => {\n const timer = setInterval(() => {\n setStep((step + 1) % 4);\n }, 200);\n return () => clearInterval(timer);\n });\n\n return (\n <>\n {step === 0 && }\n {step === 1 && }\n {step === 2 && }\n {step === 3 && }\n \n );\n}\n","import { useEffect, useState } from 'react';\n\nimport { SignalStep0Icon } from './SignalStep0Icon';\nimport { SignalStep1Icon } from './SignalStep1Icon';\nimport { SignalStep2Icon } from './SignalStep2Icon';\nimport { SignalStep3Icon } from './SignalStep3Icon';\nimport { PosIconProps } from './SvgWrapper';\n\nexport function AnimatedUnbroadcastIcon({\n ...props\n}: Omit) {\n const [step, setStep] = useState(0);\n\n useEffect(() => {\n const timer = setInterval(() => {\n setStep((step + 1) % 4);\n }, 200);\n return () => clearInterval(timer);\n });\n\n return (\n <>\n {step === 0 && }\n {step === 1 && }\n {step === 2 && }\n {step === 3 && }\n \n );\n}\n","export const AxsLogo = ({\n width,\n height,\n}: {\n width?: string | number;\n height?: string | number;\n}) => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport function BroadcastFailedIcon(props: Omit) {\n return (\n \n \n \n \n \n );\n}\n","import { Colors } from 'src/core/themes/constants/colors';\n\nimport { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport function BroadcastIcon(props: Omit) {\n return (\n \n \n \n \n \n \n );\n}\n","import { Colors } from 'src/core/themes/constants/colors';\n\nimport { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport function BroadcastIconInverted(props: Omit) {\n return (\n \n \n \n \n \n );\n}\n","import { Colors } from 'src/core/themes/constants/colors';\n\nimport { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const BroadcastWithErrorIcon = ({\n noOutline,\n ...props\n}: Omit & { noOutline?: boolean }) => {\n return (\n \n \n \n \n \n \n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const CompanionIcon = (props: Omit) => {\n return (\n \n \n \n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const ConfigureIcon = (props: Omit) => {\n return (\n \n \n \n );\n};\n","import { vars } from 'src/core/themes';\n\nimport { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const CopyIcon = ({ size, fill, stroke, ...props }: PosIconProps) => {\n const s = size ?? vars.iconSize.l;\n\n return (\n \n \n \n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const DiskSaveIcon = (props: PosIconProps) => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport function DotIcon({\n fill,\n stroke,\n ...props\n}: Omit) {\n return (\n \n \n \n );\n}\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport function DuplicateOutlinedIcon(props: Omit) {\n return (\n \n \n \n \n \n );\n}\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const FlattenedViewIcon = (props: PosIconProps) => {\n return (\n \n \n \n \n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport function FullPageIcon({\n fill,\n stroke,\n ...props\n}: Omit) {\n return (\n \n \n \n \n \n \n \n \n \n \n );\n}\n","import { Colors } from 'src/core/themes/constants/colors';\n\nimport { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport function FullySoldIcon(props: Omit) {\n return (\n \n \n \n \n \n );\n}\n","import { darkLogo } from 'src/components/common/MarketplaceLogo/MarketplaceLogo.css';\n\nexport const GametimeLogo = ({\n width,\n height,\n}: {\n width?: string | number;\n height?: string | number;\n}) => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n","import { vars } from 'src/core/themes';\n\nimport { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const GroupItemIcon = (props: PosIconProps) => {\n return (\n \n \n \n \n \n \n \n \n \n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const HamburgerMenuIcon = (props: PosIconProps) => {\n return (\n \n \n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const HistoryIcon = (props: PosIconProps) => {\n return (\n \n \n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const LayoutIcon = (props: PosIconProps) => {\n return (\n \n \n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const ListingGroupIcon = (props: PosIconProps) => {\n return (\n \n \n \n \n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const ListingIcon = (props: PosIconProps) => {\n return (\n \n \n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport function MailIcon({\n fill,\n stroke,\n ...props\n}: Omit) {\n return (\n \n \n \n );\n}\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const MapIcon = (props: Omit) => {\n return (\n \n \n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport function MarginMetricIcon(props: PosIconProps) {\n return (\n \n \n \n \n \n );\n}\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const MergeIcon = (props: PosIconProps) => {\n return (\n \n \n \n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const MobileQRIcon = (props: PosIconProps) => {\n return (\n \n \n \n \n \n \n \n \n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const MoneyIcon = (props: PosIconProps) => {\n return (\n \n \n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const OpenLinkIcon = ({ fill, stroke, ...props }: PosIconProps) => {\n return (\n \n \n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport function PurchaseIcon({\n fill,\n stroke,\n ...props\n}: Omit) {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const RecenterIcon = (props: PosIconProps) => {\n return (\n \n \n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const SaleAlertIcon = (props: PosIconProps) => {\n return (\n \n \n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport function SalesMetricIcon(props: PosIconProps) {\n return (\n \n \n \n \n );\n}\n","import { Colors } from 'src/core/themes/constants/colors';\n\nexport const SeatGeekLogo = ({\n width,\n height,\n}: {\n width?: string | number;\n height?: string | number;\n}) => {\n return (\n \n \n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport function SeatSaverIcon(props: Omit) {\n return (\n \n \n \n );\n}\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport function SignalIcon(props: Omit) {\n return (\n \n \n \n \n );\n}\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const SplitIcon = (props: PosIconProps) => {\n return (\n \n \n \n \n \n \n );\n};\n","export const StubHubLogo = ({\n width,\n height,\n colorMode = 'lightBackground',\n}: {\n width?: string | number;\n height?: string | number;\n colorMode?: 'lightBackground' | 'darkBackground' | 'white';\n}) => {\n const letterColor = colorMode === 'white' ? '#333333' : 'white';\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n","export const StubHubProLogo = ({\n width,\n height,\n colorMode,\n}: {\n width?: string | number;\n height?: string | number;\n colorMode?: 'lightBackground' | 'darkBackground';\n}) => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const TagIcon = (props: PosIconProps) => {\n return (\n // It's import for the viewbox fo this SVG to stay 20 else it won't resize properly\n \n \n \n );\n};\n","export const TicketmasterLogo = ({\n width,\n height,\n}: {\n width?: string | number;\n height?: string | number;\n}) => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n","export const TicketUtilLogo = ({\n width,\n height,\n}: {\n width?: string | number;\n height?: string | number;\n}) => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n","import { darkLogo } from 'src/components/common/MarketplaceLogo/MarketplaceLogo.css';\n\nexport const TickPickLogo = ({\n width,\n height,\n}: {\n width?: string | number;\n height?: string | number;\n}) => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport function UnbroadcastIcon({\n noOutline,\n ...props\n}: Omit & { noOutline?: boolean }) {\n return (\n \n {!noOutline && (\n \n )}\n \n \n \n \n );\n}\n","import { Stack } from 'src/core/ui';\n\nexport const ViagogoLogo = ({ height }: { height?: number | string }) => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n );\n};\n","import { darkLogo } from 'src/components/common/MarketplaceLogo/MarketplaceLogo.css';\n\nexport const VividSeatsLogo = ({\n width,\n height,\n}: {\n width?: string | number;\n height?: string | number;\n}) => {\n return (\n \n h\n \n \n \n \n \n \n \n );\n};\n","import Rainbow from 'rainbowvis.js';\nimport { useMemo } from 'react';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport * as styles from './CondensedColorBand.css';\n\nexport type CondensedColorBandProps = {\n numOfSteps: number;\n spectrum: string[];\n labels?: ContentId[] | string[];\n};\n\nexport const CondensedColorBand = ({\n numOfSteps,\n spectrum,\n labels,\n}: CondensedColorBandProps) => {\n const colorSteps = useMemo(() => {\n const rainbow = new Rainbow();\n rainbow.setNumberRange(1, numOfSteps);\n rainbow.setSpectrumByArray(spectrum);\n\n const colorSteps = [];\n for (let i = 0; i < numOfSteps; i++) {\n const color = rainbow.colorAt(i + 1);\n colorSteps.push();\n }\n return colorSteps;\n }, [numOfSteps, spectrum]);\n\n const startLabelContentId = useMemo(() => {\n if (labels?.length == 0 || labels == null) {\n return '';\n }\n\n return labels.at(0);\n }, [labels]);\n\n const endLabelContentId = useMemo(() => {\n if (labels?.length == 0 || labels == null) {\n return '';\n }\n return labels.at(-1);\n }, [labels]);\n\n const startText = useContent(startLabelContentId);\n const endText = useContent(endLabelContentId);\n\n return (\n
\n {startText}\n
{colorSteps}
\n {endText}\n
\n );\n};\n\nconst ColorStep = ({ color }: { color: string }) => {\n return (\n
\n );\n};\n","import React from 'react';\nimport { useDebounce, useMeasure } from 'react-use';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { mergeRefs } from 'src/core/utils';\nimport { RecenterIcon } from 'src/svgs';\nimport { MinusIcon, PlusIcon } from 'src/svgs/Viagogo';\n\nimport { ColorBandProps } from './shared/components/ColorBand';\nimport { CondensedColorBand } from './shared/components/ColorBand/CondensedColorBand';\nimport { StyledDiv } from './VenueMap.styled';\nimport * as styles from './VenueMapContentCondensed.css';\n\nexport const VenueMapContentCondensed = ({\n localRef,\n ref,\n svg,\n blurMap,\n hideMap,\n colorBandProps,\n statsContent,\n mapActionContainerClassname,\n v3,\n onZoom,\n onReset,\n}: {\n localRef:\n | React.RefObject\n | React.Dispatch>;\n ref: React.Ref;\n svg: string | TrustedHTML;\n blurMap: boolean;\n hideMap?: boolean;\n colorBandProps: ColorBandProps | undefined;\n compQuantityFilters?: string[];\n statsContent: React.ReactNode;\n mapActionContainerClassname?: string;\n v3?: boolean;\n onZoom: (zoomIn?: boolean) => void;\n onReset: () => void;\n}) => {\n const [containerRef, { width }] = useMeasure();\n useDebounce(() => onReset(), 100, [width]);\n\n return (\n \n \n\n \n \n
\n {\n e.stopPropagation();\n e.preventDefault();\n onZoom(true);\n }}\n />\n {\n e.stopPropagation();\n e.preventDefault();\n onZoom(false);\n }}\n />\n
\n
\n {\n e.stopPropagation();\n e.preventDefault();\n onReset();\n }}\n />\n
\n\n
{statsContent}
\n
\n \n {colorBandProps && (\n
\n \n
\n )}\n
\n \n \n );\n};\n","import { debounce, isEmpty, uniqBy } from 'lodash-es';\nimport React, {\n ReactNode,\n Ref,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { vars } from 'src/core/themes';\nimport { TooltipPopover } from 'src/core/ui';\nimport { mergeRefs } from 'src/core/utils';\nimport {\n IconsFill,\n InfoSolidIcon,\n MinusIcon,\n PlusIcon,\n ResetIcon,\n} from 'src/svgs/Viagogo';\nimport { FocalPointInfo, SectionInfo } from 'src/WebApiController';\nimport svgPanZoom from 'svg-pan-zoom';\n\nimport { ColorBand, ColorBandProps } from './shared/components/ColorBand';\nimport { addFocalPoint } from './shared/utils/addFocalPoint';\nimport { VenueMapMouseEvent } from './shared/utils/VenueMapMouseEvent';\nimport * as styles from './VenueMap.css';\nimport {\n IconParent,\n StyledBorderDiv,\n StyledDiv,\n StyledHoverDiv,\n StyledIconParentVariant,\n StyledResetVariant,\n VenueMapContentContainer,\n} from './VenueMap.styled';\nimport { VenueMapColorSelector, VenueMapColorStyles } from './VenueMap.types';\nimport {\n crossesPoints,\n DrawingPoint,\n isMissiongSectionData,\n registerDrawLine,\n registerPanningListners,\n} from './VenueMapContent.hooks';\nimport { VenueMapContentCondensed } from './VenueMapContentCondensed';\n\nconst clickEvents = ['click'];\n\nconst MaxSimilarSectionsToGetForSelectedSections = 10;\nconst ZOOM_SCALE_SENSITIVITY = 0.2;\n\nexport type VenueMapContentProps = {\n selectedSections?: SectionInfo[];\n markedSectionIds?: number[];\n onSectionClicked?: (\n e: MouseEvent,\n selectedSection: SectionInfo,\n surroundingSections?: SectionInfo[]\n ) => void;\n onSectionHovered?: (hoveredSection: SectionInfo) => ReactNode;\n setSelectedSections?: (sections: SectionInfo[]) => void;\n staticInfoContent?: React.ReactNode;\n infoIconContent?: React.ReactNode;\n availableSections: SectionInfo[];\n svg: string | TrustedHTML;\n isZoomEnabled: boolean;\n isPanEnabled?: boolean;\n svgMapUrl: string; // what to use this for?\n venueConfigId: number; // what to use this for?\n showDefaultMapColors?: boolean;\n colorBandProps?: ColorBandProps;\n /* Callback to get color for a section/ticketClass pair to provide dynamic\n * colorization of sections in the map\n */\n focalPoint?: FocalPointInfo | null;\n getColor?: (info: VenueMapColorSelector) => VenueMapColorStyles | void;\n isHeatMap?: boolean;\n statsContent?: React.ReactNode;\n isWhiteBackground?: boolean;\n isRelocatedStaticInfo?: boolean;\n allowDrawLine?: boolean;\n isCondensedView?: boolean;\n shouldRepaint?: boolean;\n disableHoverEffect?: boolean;\n mapActionContainerClassname?: string;\n};\n\nconst colors = {\n defaultBackground: vars.color.backgroundPrimary,\n defaultForeground: vars.color.textPrimary,\n defaultHoverBackground: vars.color.backgroundPrimaryHover,\n defaultHoverForeground: vars.color.textPrimaryHover,\n selectedBackground: vars.color.backgroundHighlight,\n selectedForeground: vars.color.textBrand,\n selectedHoverBackground: vars.color.backgroundHighlightHover,\n selectedHoverForeground: vars.color.textBrandHover,\n};\n\nconst VenueMapContent = React.forwardRef(\n (\n {\n selectedSections,\n markedSectionIds,\n onSectionClicked,\n onSectionHovered,\n setSelectedSections,\n staticInfoContent,\n infoIconContent,\n availableSections,\n svg,\n focalPoint,\n isZoomEnabled = true,\n isPanEnabled = true,\n showDefaultMapColors,\n colorBandProps,\n getColor,\n isHeatMap = false,\n statsContent,\n isWhiteBackground = false,\n isRelocatedStaticInfo = false,\n allowDrawLine = true,\n isCondensedView = false,\n mapActionContainerClassname,\n shouldRepaint = false,\n disableHoverEffect = false,\n }: VenueMapContentProps,\n ref: Ref\n ) => {\n const localRef = useRef(null);\n\n const isPanning = useRef(false);\n\n const onRemoveEventListenersRef = useRef<() => void>(() => void 0);\n const onDoulbeClickDoneRef = useRef<(points: DrawingPoint[]) => void>(\n () => void 0\n );\n const [mapLoaded, setMapLoaded] = useState(false);\n\n useEffect(() => {\n if (!mapLoaded) return;\n const deregisterDrawLine = registerDrawLine(\n localRef,\n onRemoveEventListenersRef,\n onDoulbeClickDoneRef,\n allowDrawLine\n );\n return () => {\n deregisterDrawLine();\n };\n }, [mapLoaded, allowDrawLine]);\n\n const [hoveredContent, setHoverContent] = useState();\n const [zoomFlag, setZoomFlag] = useState(false);\n const [blurMap, setBlurMap] = useState(true);\n\n // Hide map if there is a color override, and show it after color is initialized\n const [hideMap, setHideMap] = useState(!!getColor || showDefaultMapColors);\n\n const sectionIdsMissingRowOrder = useMemo(\n () => availableSections.filter(isMissiongSectionData).map(({ id }) => id),\n [availableSections]\n );\n\n useEffect(() => {\n if (!shouldRepaint) return;\n\n const timer = setTimeout(() => {\n if (!localRef.current) return;\n const svgElement = localRef.current.getElementsByTagName('svg')[0];\n const { width, height } = svgElement.getBoundingClientRect();\n // There seems a bug where initialize svgPanZoom with 0 width/height element will make it always 0*0 dimension\n if (width * height === 0) return;\n\n const venueMapSvg = svgPanZoom(svgElement, {\n fit: true,\n contain: true,\n zoomScaleSensitivity: ZOOM_SCALE_SENSITIVITY,\n });\n\n venueMapSvg.resize();\n venueMapSvg.fit();\n venueMapSvg.center();\n setZoomFlag(false);\n }, 50);\n\n return () => {\n clearTimeout(timer);\n };\n }, [localRef, setZoomFlag, shouldRepaint]);\n\n useEffect(() => {\n if (availableSections.length) setBlurMap(false);\n }, [availableSections.length]);\n\n useEffect(() => {\n if (!localRef.current) return;\n\n const svgElement = localRef.current.getElementsByTagName('svg')[0];\n addFocalPoint(svgElement, focalPoint);\n\n const sprites = (\n [\n ...svgElement.querySelectorAll('g[sprite-identifier] path'),\n ] as HTMLElement[]\n ).filter((p) => getSpriteIdentifier(p));\n\n if (isEmpty(sprites)) return;\n\n const { width, height } = svgElement.getBoundingClientRect();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let venueMapSvg: any = null;\n if (width * height > 0) {\n venueMapSvg = svgPanZoom(svgElement, {\n zoomScaleSensitivity: ZOOM_SCALE_SENSITIVITY,\n zoomEnabled: isZoomEnabled,\n panEnabled: isPanEnabled,\n dblClickZoomEnabled: false,\n onZoom: () => setZoomFlag(true),\n onPan: () => setZoomFlag(true),\n });\n }\n\n const onResize = () => {\n if (localRef.current) {\n if (!isCondensedView) {\n svgElement.setAttribute(\n 'width',\n localRef.current.clientWidth.toString()\n );\n svgElement.setAttribute(\n 'height',\n localRef.current.clientHeight.toString()\n );\n }\n if (!venueMapSvg) return;\n venueMapSvg.resize(); // update SVG cached size and controls positions\n venueMapSvg.fit();\n venueMapSvg.center();\n }\n };\n\n const debounceOnResize = debounce(onResize, 200);\n\n const mouseEnter = ({ target }: MouseEvent) => {\n if (disableHoverEffect) return;\n let htmlTarget = target as HTMLElement;\n if (htmlTarget.localName === 'text') {\n htmlTarget = Array.from(\n htmlTarget.parentElement?.children ?? []\n ).filter(\n (child) =>\n child.getAttribute('eid') === htmlTarget.getAttribute('eid') &&\n child.tagName === 'path'\n )[0] as HTMLElement;\n }\n\n const selectedSectionId = parseInt(getSpriteIdentifier(htmlTarget)!);\n\n const sectionIndex = availableSections?.findIndex(\n (s) => s.id === selectedSectionId\n );\n if (sectionIndex >= 0) {\n const section = availableSections[sectionIndex];\n if (section) {\n const hoveredContent = onSectionHovered?.(section);\n setHoverContent(hoveredContent);\n }\n }\n\n htmlTarget.setAttribute('fill-opacity', '0.25');\n };\n\n const mouseLeave = ({ target }: MouseEvent) => {\n if (disableHoverEffect) return;\n let htmlTarget = target as HTMLElement;\n if (htmlTarget.localName === 'text') {\n htmlTarget = Array.from(htmlTarget.parentElement!.children).filter(\n (child) =>\n child.getAttribute('eid') === htmlTarget.getAttribute('eid') &&\n child.tagName === 'path'\n )[0] as HTMLElement;\n }\n\n htmlTarget.setAttribute('fill-opacity', '1');\n };\n\n const setSelectedHandler = (e: Event) => {\n if (isPanning.current) {\n return;\n }\n const mouseEvent = e as MouseEvent;\n\n let htmlTarget = e.target as HTMLElement;\n if (htmlTarget.localName === 'text') {\n htmlTarget = Array.from(htmlTarget.parentElement!.children).filter(\n (child) =>\n child.getAttribute('eid') === htmlTarget.getAttribute('eid') &&\n child.tagName === 'path'\n )[0] as HTMLElement;\n }\n const selectedTicketClassId = parseInt(\n htmlTarget.getAttribute('eid') ?? '0'\n );\n\n const selectedSectionId = parseInt(getSpriteIdentifier(htmlTarget)!);\n\n const selectedSection = availableSections.find(\n (x) =>\n x.id === selectedSectionId &&\n (selectedTicketClassId === 0 ||\n x.specRow?.ticketClassId === selectedTicketClassId ||\n !x.rows?.length ||\n !selectedTicketClassId ||\n x.rows?.find((r) => r.tktClass?.id === selectedTicketClassId))\n );\n\n const selectedSectionIndex = filteredSprites.findIndex(\n (g) =>\n g.sectionId === selectedSectionId &&\n (selectedTicketClassId === 0 ||\n g.ticketClassId === selectedTicketClassId)\n );\n\n const lookDistance = MaxSimilarSectionsToGetForSelectedSections / 2;\n\n // Get the 10 sections surrounding the clicked section\n const surroundingSections = [];\n for (\n let i = Math.max(selectedSectionIndex - lookDistance, 0);\n i <=\n Math.min(\n selectedSectionIndex + lookDistance,\n filteredSprites.length - 1\n );\n i++\n ) {\n const fs = filteredSprites[i];\n const s = availableSections.find(\n (s) =>\n s.id === fs.sectionId &&\n (s.specRow?.ticketClassId === fs.ticketClassId ||\n s.rows.some((r) => r.tktClass?.id === fs.ticketClassId) ||\n fs.ticketClassId === 0)\n );\n\n if (s) {\n if (surroundingSections.findIndex((ss) => ss.id === s.id) < 0) {\n surroundingSections.push(s);\n }\n }\n }\n\n selectedSection &&\n onSectionClicked?.(mouseEvent, selectedSection, surroundingSections);\n };\n\n sprites.forEach((path) => {\n const spriteIdentifier = getSpriteIdentifier(path);\n\n const sectionId = parseInt(spriteIdentifier!);\n const ticketClassId = parseInt(path.getAttribute('eid') ?? '0');\n\n const missingRowOrder = sectionIdsMissingRowOrder.includes(sectionId);\n\n const textSiblings = (Array.from(path.parentElement!.children).filter(\n (child) =>\n child.getAttribute('eid') === path.getAttribute('eid') &&\n child.tagName === 'text'\n ) || []) as HTMLElement[];\n\n const sectionName =\n textSiblings\n .map((sibling) => sibling.textContent)\n .find((text) => !!text) ?? undefined;\n\n const isSelected =\n selectedSections?.some(({ id }) => id === sectionId) ?? false;\n const isMarked = markedSectionIds?.some((id) => id === sectionId);\n\n const knownSection = availableSections.find((x) => x.id === sectionId);\n const knownRow =\n knownSection?.rows?.find((r) => r.tktClass?.id === ticketClassId) ??\n knownSection?.specRow;\n\n const { fill, stroke, textColor, strokeWidth } = getColor?.({\n sectionId,\n rowId: knownRow?.id,\n sectionName,\n ticketClassId,\n isSelected,\n isMarked,\n }) ?? {\n fill: '',\n stroke: '',\n };\n\n if (fill && stroke) {\n // If we have dynamic coloring from the function, use it and quit\n path.setAttribute('fill', fill);\n path.setAttribute('fill-opacity', '1');\n path.setAttribute('stroke', stroke);\n } else {\n const selectedSection = selectedSections?.find(\n (x) => x.id === sectionId\n );\n if (selectedSection) {\n path.setAttribute('fill', colors.selectedBackground);\n path.setAttribute('fill-opacity', '1');\n path.setAttribute('stroke', colors.selectedForeground);\n } else {\n if (knownSection) {\n path.setAttribute(\n 'fill',\n showDefaultMapColors\n ? (knownRow?.tktClass?.color ?? colors.defaultBackground)\n : colors.defaultBackground\n );\n path.setAttribute('fill-opacity', '1');\n path.setAttribute('stroke', colors.defaultForeground);\n } else {\n path.setAttribute('fill', colors.defaultBackground);\n path.setAttribute('fill-opacity', '1');\n path.setAttribute('stroke', colors.defaultForeground);\n }\n }\n }\n\n path.style.cursor = 'pointer';\n if (!isEmpty(textSiblings)) {\n textSiblings.forEach((sibling) => {\n sibling.style.cursor = 'pointer';\n if (isSelected) {\n sibling.setAttribute('fill', vars.color.textBrand);\n } else if (textColor) {\n sibling.setAttribute('fill', textColor);\n } else {\n sibling.setAttribute('fill', 'black');\n }\n });\n }\n\n if (isSelected) {\n path.setAttribute('stroke', vars.color.textBrand);\n path.setAttribute('stroke-width', strokeWidth ?? '10px');\n } else if (isMarked) {\n path.setAttribute('stroke', vars.color.textBrand);\n path.setAttribute('stroke-width', strokeWidth ?? '6px');\n } else {\n path.setAttribute('stroke-width', strokeWidth ?? '2px');\n }\n\n if (missingRowOrder && isHeatMap) {\n textSiblings.forEach((sibling) => {\n if (sibling.textContent && sibling.textContent.slice(-1) != '!') {\n sibling.textContent = `${sibling.textContent}!`;\n }\n });\n path.setAttribute('stroke', vars.color.borderWarning);\n path.setAttribute('stroke-width', '4px');\n }\n });\n\n const filteredSprites = sprites.map((element) => {\n const ticketClassId = parseInt(element.getAttribute('eid') ?? '0');\n const sectionId = parseInt(getSpriteIdentifier(element)!);\n\n const textSiblings = (Array.from(\n element.parentElement!.children\n ).filter(\n (child) =>\n child.getAttribute('eid') === element.getAttribute('eid') &&\n child.tagName === 'text'\n ) || []) as HTMLElement[];\n\n const sectionName =\n textSiblings\n .map((sibling) => sibling.textContent)\n .find((text) => !!text) ?? undefined;\n\n return {\n element,\n textSiblings,\n sectionId,\n ticketClassId,\n sectionName,\n mouseEnter: (e: MouseEvent) => mouseEnter(e),\n mouseLeave: (e: MouseEvent) => mouseLeave(e),\n clickFunc: setSelectedHandler,\n };\n });\n\n const filteredSpritesByTicketClass = sprites\n .filter((element) => {\n const ticketClassId = parseInt(element.getAttribute('eid') ?? '0');\n return (\n availableSections.filter(\n (x) =>\n x.rows?.find((r) => r.tktClass?.id === ticketClassId) &&\n !filteredSprites.find((e) => e.element === element)\n ).length === 1\n );\n })\n .map((element) => {\n return {\n element,\n mouseEnter: (e: MouseEvent) => mouseEnter(e),\n mouseLeave: (e: MouseEvent) => mouseLeave(e),\n };\n });\n\n // add eventListeners\n const onAddingEventListeners = () => {\n filteredSprites.forEach(\n ({ element, textSiblings, mouseEnter, mouseLeave, clickFunc }) => {\n element.addEventListener('mouseenter', mouseEnter);\n element.addEventListener('mouseleave', mouseLeave);\n textSiblings.forEach((sibling) =>\n sibling.addEventListener('mouseenter', mouseEnter)\n );\n textSiblings.forEach((sibling) =>\n sibling.addEventListener('mouseleave', mouseLeave)\n );\n clickEvents.forEach((e) => {\n element.addEventListener(e, clickFunc);\n textSiblings.forEach((sibling) =>\n sibling.addEventListener(e, clickFunc)\n );\n });\n }\n );\n filteredSpritesByTicketClass.forEach(\n ({ element, mouseEnter, mouseLeave }) => {\n element.addEventListener('mouseenter', mouseEnter);\n element.addEventListener('mouseleave', mouseLeave);\n }\n );\n window.addEventListener('resize', debounceOnResize);\n };\n\n // remove eventListeners\n const onRemoveEventListeners = () => {\n filteredSprites.forEach(\n ({ element, textSiblings, mouseEnter, mouseLeave, clickFunc }) => {\n element.removeEventListener('mouseenter', mouseEnter);\n element.removeEventListener('mouseleave', mouseLeave);\n textSiblings.forEach((sibling) =>\n sibling.removeEventListener('mouseenter', mouseEnter)\n );\n textSiblings.forEach((sibling) =>\n sibling.removeEventListener('mouseleave', mouseLeave)\n );\n clickEvents.forEach((e) => {\n element.removeEventListener(e, clickFunc);\n textSiblings.forEach((sibling) =>\n sibling.removeEventListener(e, clickFunc)\n );\n });\n }\n );\n filteredSpritesByTicketClass.forEach(\n ({ element, mouseEnter, mouseLeave }) => {\n element.removeEventListener('mouseenter', mouseEnter);\n element.removeEventListener('mouseleave', mouseLeave);\n }\n );\n window.removeEventListener('resize', debounceOnResize);\n };\n onRemoveEventListenersRef.current = onRemoveEventListeners;\n\n onDoulbeClickDoneRef.current = (points: DrawingPoint[]) => {\n onAddingEventListeners();\n const selectedIds = new Set();\n filteredSprites.forEach(({ element }) => {\n if (crossesPoints(points, element.getBoundingClientRect())) {\n selectedIds.add(parseInt(getSpriteIdentifier(element) ?? '-1'));\n }\n });\n const updatedSections = availableSections\n .filter(\n ({ id }) => selectedIds.has(id) || markedSectionIds?.includes(id)\n )\n .toSorted((a, b) => a.name?.localeCompare(b.name));\n\n if (!isEmpty(updatedSections)) {\n setSelectedSections?.(\n uniqBy(updatedSections.concat(selectedSections ?? []), 'id')\n );\n }\n };\n\n const deregisterPanEvents = registerPanningListners(\n localRef.current,\n isPanning\n );\n\n onAddingEventListeners();\n\n // Show the map when color initialization is done when there is color override\n if (getColor || showDefaultMapColors) {\n setHideMap(false);\n }\n\n if (!mapLoaded) {\n setMapLoaded(true);\n }\n\n return () => {\n onRemoveEventListeners();\n deregisterPanEvents();\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n availableSections,\n getColor,\n isZoomEnabled,\n onSectionClicked,\n onSectionHovered,\n selectedSections,\n markedSectionIds,\n zoomFlag,\n focalPoint,\n showDefaultMapColors,\n setSelectedSections,\n sectionIdsMissingRowOrder,\n isHeatMap,\n isPanEnabled,\n disableHoverEffect,\n ]);\n\n const onZoom = (zoomIn = true) => {\n if (localRef.current) {\n const svgElement = localRef.current.getElementsByTagName('svg')[0];\n const venueMapSvg = svgPanZoom(svgElement, {\n fit: true,\n contain: true,\n zoomScaleSensitivity: ZOOM_SCALE_SENSITIVITY,\n });\n zoomIn ? venueMapSvg.zoomIn() : venueMapSvg.zoomOut();\n setZoomFlag(true);\n }\n };\n\n const onReset = () => {\n if (localRef.current) {\n const svgElement = localRef.current.getElementsByTagName('svg')[0];\n const { width, height } = svgElement.getBoundingClientRect();\n // There seems a bug where initialize svgPanZoom with 0 width/height element will make it always 0*0 dimension\n if (width * height === 0) return;\n\n const venueMapSvg = svgPanZoom(svgElement, {\n fit: true,\n contain: true,\n zoomScaleSensitivity: ZOOM_SCALE_SENSITIVITY,\n });\n\n venueMapSvg.resize(); // update SVG cached size and controls positions\n venueMapSvg.fit();\n venueMapSvg.center();\n setZoomFlag(false);\n }\n };\n\n return isCondensedView ? (\n \n ) : (\n \n <>\n \n \n\n \n {isZoomEnabled && (\n <>\n {(Boolean(selectedSections?.length) || zoomFlag) && (\n
\n \n \n \n
\n )}\n \n \n onZoom(true)}>\n \n \n \n \n onZoom(false)}>\n \n \n \n \n \n )}\n {infoIconContent && (\n \n }\n >\n {infoIconContent}\n \n )}\n
\n\n {!statsContent && staticInfoContent && (\n \n {staticInfoContent}\n \n )}\n {!statsContent && hoveredContent && (\n
{hoveredContent}
\n )}\n {statsContent}\n \n {colorBandProps && (\n
\n \n
\n )}\n \n
\n );\n }\n);\n\nconst getSpriteIdentifier = (path: HTMLElement | null): string | null => {\n if (!path || !path.parentElement || path.parentElement.localName !== 'g') {\n return null;\n }\n\n const spriteIdentifier =\n path!.parentElement!.getAttribute('sprite-identifier');\n\n if (!spriteIdentifier) {\n return getSpriteIdentifier(path!.parentElement);\n }\n\n return spriteIdentifier!.slice(1);\n};\n\nexport const hoverFuncSeatType = (ticketClasses: number[], type: string) => {\n const event = new MouseEvent(type, {\n view: window,\n bubbles: true,\n cancelable: true,\n }) as VenueMapMouseEvent;\n ticketClasses.forEach((t: number) => {\n const paths = Array.from(\n document.querySelectorAll(`#event-detail-map svg g path[eid=\"${t}\"]`)\n );\n event.sectionIdAvailable = false;\n paths.forEach((path) => {\n path.dispatchEvent(event);\n });\n });\n};\n\nVenueMapContent.displayName = 'VenueMapContent';\nexport default VenueMapContent;\n","import { useQuery } from '@tanstack/react-query';\nimport { useRef } from 'react';\n\nimport { GeneralAdmissionMessage } from './GeneralAdmissionMessage';\nimport { rawFetch } from './shared/utils/rawFetch';\nimport VenueMapContent, { VenueMapContentProps } from './VenueMapContent';\n\nconst domParser = new DOMParser();\nconst placeholder = ``;\n\nexport const VenueMap = ({\n isGeneralAdmissionOnly,\n svgMapUrl,\n ...rest\n}: Omit & {\n isGeneralAdmissionOnly?: boolean;\n}) => {\n if (!svgMapUrl) {\n throw new Error('svgMapUrl not available');\n }\n\n const mapQuery = useQuery({\n queryKey: [svgMapUrl],\n queryFn: () =>\n rawFetch(svgMapUrl, {}).then((text: string) => {\n const s = domParser.parseFromString(text, 'image/svg+xml');\n let isNewMap = false;\n if (s.querySelectorAll('path[eid]').length) isNewMap = true;\n\n if (text) {\n s\n .querySelectorAll('path[obs]')\n ?.forEach((el) => el.setAttribute('style', 'display: none'));\n s\n .querySelectorAll('path[eid]')\n ?.forEach((el) => el.setAttribute('style', 'display: block'));\n const svgElement = s.children[0];\n svgElement.setAttribute(\n 'width',\n ref?.current?.clientWidth?.toString() ?? '0'\n );\n svgElement.setAttribute(\n 'height',\n ref?.current?.clientHeight?.toString() ?? '0'\n );\n const serializer = new XMLSerializer();\n return {\n svg: serializer.serializeToString(svgElement),\n isNewMap,\n };\n }\n\n throw Error('Failed to get venue map : ' + svgMapUrl);\n }),\n\n staleTime: Infinity,\n refetchOnWindowFocus: false,\n });\n\n const ref = useRef(null);\n\n const { svg } = mapQuery.data ?? { svg: placeholder, isNewMap: false };\n\n if (isGeneralAdmissionOnly) {\n return ;\n }\n\n if (!svg || mapQuery.isLoading) {\n return
;\n }\n\n return (\n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const DealUndercutIcon = (props: PosIconProps) => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const ParentListingModeIcon = (props: PosIconProps) => {\n return (\n \n \n \n \n \n \n \n \n \n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const QualityScoreModeIcon = (props: PosIconProps) => {\n return (\n \n \n \n \n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const RowExtrapolationUndercutIcon = (props: PosIconProps) => {\n return (\n \n \n \n \n \n \n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const SameEventModeIcon = (props: PosIconProps) => {\n return (\n \n \n \n \n \n \n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const SameSectionModeIcon = (props: PosIconProps) => {\n return (\n \n \n \n \n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const SameZoneModeIcon = (props: PosIconProps) => {\n return (\n \n \n \n \n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const SimpleUndercutIcon = (props: PosIconProps) => {\n return (\n \n \n \n \n \n );\n};\n","import {\n UseFormClearErrors,\n UseFormSetError,\n UseFormSetValue,\n} from 'react-hook-form';\nimport { SectionDisplay } from 'src/components/Events/VenueMap';\nimport { Content } from 'src/contexts/ContentContext';\nimport { DealUndercutIcon } from 'src/svgs/DealUndercutIcon';\nimport { ParentListingModeIcon } from 'src/svgs/ParentListingModeIcon';\nimport { QualityScoreModeIcon } from 'src/svgs/QualityScoreModeIcon';\nimport { RowExtrapolationUndercutIcon } from 'src/svgs/RowExtrapolationUndercutIcon';\nimport { SameEventModeIcon } from 'src/svgs/SameEventModeIcon';\nimport { SameSectionModeIcon } from 'src/svgs/SameSectionModeIcon';\nimport { SameZoneModeIcon } from 'src/svgs/SameZoneModeIcon';\nimport { SimpleUndercutIcon } from 'src/svgs/SimpleUndercutIcon';\nimport {\n AutoPricingCompListingMode,\n AutoPricingUndercutMode,\n CompListing,\n CompListingQuantity,\n ListingDetailsUpdateInput,\n SectionInfo,\n SectionScoreOverride,\n} from 'src/WebApiController';\n\nimport { ContentId } from './constants/contentId';\nimport { formatCurrency, roundToPrecision } from './numberFormatter';\nimport { isSeatingMatchSectionInfo } from './venueConfigUtils';\n\nexport enum UndercutPriceSettingsMode {\n Discount = 'Discount',\n Premium = 'Premium',\n}\n\nexport const UNDERCUT_PRICE_MODE_OPTIONS = [\n {\n value: UndercutPriceSettingsMode.Discount,\n children: ,\n },\n {\n value: UndercutPriceSettingsMode.Premium,\n children: ,\n },\n];\n\nexport enum PriceFloorCeilingMode {\n Proceeds = 'Proceeds',\n Website = 'Website',\n}\n\nexport const PRICE_FLOOR_CEILING_MODE_OPTIONS = [\n {\n value: PriceFloorCeilingMode.Proceeds,\n children: ,\n },\n {\n value: PriceFloorCeilingMode.Website,\n children: ,\n },\n];\n\nexport enum OutlierModeKthLowestStrategy {\n Relative = 'Relative',\n Absolute = 'Absolute',\n}\n\nexport const OUTLIER_MODE_KTH_LOWEST_STRATEGY = [\n {\n value: OutlierModeKthLowestStrategy.Relative,\n children: (\n
\n %\n
\n ),\n },\n {\n value: OutlierModeKthLowestStrategy.Absolute,\n children: (\n
\n $\n
\n ),\n },\n];\n\nexport type PricingSettingsFieldNumeric =\n | 'compListingFloor'\n | 'compListingCeiling'\n | 'undercutAbsoluteAmount'\n | 'undercutRelativeAmount'\n | 'netProceedsCeiling'\n | 'netProceedsFloor';\n\nexport type PricingSettingsField =\n | PricingSettingsFieldNumeric\n | 'undercutMode'\n | 'compListingMode';\n\nexport const validateCompListingSettings = (\n clearErrors: UseFormClearErrors,\n setError: UseFormSetError,\n setValue: UseFormSetValue,\n listForm: ListingDetailsUpdateInput,\n compListingFloorCeilingError: string,\n requiredMsg: string,\n errorField?: PricingSettingsField,\n isStrategy?: boolean\n) => {\n let hasErrors = false;\n\n if (errorField) {\n clearErrors(errorField);\n } else {\n clearErrors('compListingFloor');\n clearErrors('compListingSelectedSectionSettings');\n }\n\n const {\n compListingMode,\n compListingFloor,\n compListingCeiling,\n compListingOnlyForSelectedSectionsEnabled,\n compListingSelectedSectionSettings,\n autoPricingEnabled,\n skipCompListing,\n } = listForm;\n\n if (!autoPricingEnabled || skipCompListing) {\n return true;\n }\n\n if (\n compListingMode === AutoPricingCompListingMode.QualityScore ||\n compListingMode === AutoPricingCompListingMode.SameSection\n ) {\n if (!compListingFloor) {\n listForm.compListingFloor = compListingFloor;\n setValue('compListingFloor', DEFAULT_COMP_LISTING_FLOOR);\n } else if (compListingCeiling && compListingFloor >= compListingCeiling) {\n setError(\n errorField ?? 'compListingFloor',\n {\n message: compListingFloorCeilingError,\n },\n { shouldFocus: true }\n );\n\n hasErrors = true;\n }\n }\n\n if (\n compListingMode === AutoPricingCompListingMode.QualityScore ||\n compListingMode === AutoPricingCompListingMode.SameEvent ||\n compListingMode === AutoPricingCompListingMode.SameZone\n ) {\n if (\n compListingOnlyForSelectedSectionsEnabled &&\n !isStrategy &&\n !compListingSelectedSectionSettings?.sectionIdFilter?.length\n ) {\n setError(\n errorField ?? 'compListingSelectedSectionSettings',\n {\n message: requiredMsg,\n },\n { shouldFocus: true }\n );\n\n hasErrors = true;\n }\n }\n\n return !hasErrors;\n};\n\nexport const validateUndercutSettings = (\n clearErrors: UseFormClearErrors,\n setValue: UseFormSetValue,\n listForm: ListingDetailsUpdateInput,\n errorField?: PricingSettingsField\n) => {\n if (errorField) {\n clearErrors(errorField);\n } else {\n clearErrors('undercutAbsoluteAmount');\n clearErrors('undercutRelativeAmount');\n }\n\n const {\n undercutMode,\n undercutAbsoluteAmount,\n undercutRelativeAmount,\n autoPricingEnabled,\n skipUndercut,\n } = listForm;\n\n if (!autoPricingEnabled || skipUndercut) {\n return true;\n }\n\n if (undercutMode) {\n if (undercutAbsoluteAmount == null) {\n listForm.undercutAbsoluteAmount = DEFAULT_UNDERCUT_ABSOLUTE_AMT;\n setValue('undercutAbsoluteAmount', DEFAULT_UNDERCUT_ABSOLUTE_AMT);\n }\n\n if (undercutRelativeAmount == null) {\n listForm.undercutRelativeAmount = DEFAULT_UNDERCUT_RELATIVE_AMT;\n setValue('undercutRelativeAmount', DEFAULT_UNDERCUT_RELATIVE_AMT);\n }\n }\n\n return true;\n};\n\nexport const validateNetProceedsSettings = (\n clearErrors: UseFormClearErrors,\n setError: UseFormSetError,\n listForm: ListingDetailsUpdateInput,\n floorMustBeLessThanCeilingError: string,\n errorField?: PricingSettingsField\n) => {\n let hasErrors = false;\n\n if (errorField) {\n clearErrors(errorField);\n } else {\n clearErrors('netProceedsCeiling');\n clearErrors('netProceedsFloor');\n }\n\n const { netProceedsFloor, netProceedsCeiling } = listForm;\n\n if ((netProceedsFloor ?? 0) > 0 && (netProceedsCeiling ?? 0) > 0) {\n if (netProceedsFloor! >= netProceedsCeiling!) {\n setError(errorField ?? 'netProceedsFloor', {\n message: floorMustBeLessThanCeilingError,\n });\n hasErrors = true;\n }\n }\n\n return !hasErrors;\n};\n\nexport const validateAutoPricingSettings = (\n clearErrors: UseFormClearErrors,\n setError: UseFormSetError,\n setValue: UseFormSetValue,\n listForm: ListingDetailsUpdateInput,\n floorMustBeLessThanCeilingError: string,\n compListingFloorCeilingError: string,\n requiredMsg: string,\n isStrategy?: boolean\n) => {\n let hasErrors = false;\n\n if (\n !validateCompListingSettings(\n clearErrors,\n setError,\n setValue,\n listForm,\n compListingFloorCeilingError,\n requiredMsg,\n undefined,\n isStrategy\n )\n ) {\n hasErrors = true;\n }\n\n if (!validateUndercutSettings(clearErrors, setValue, listForm)) {\n hasErrors = true;\n }\n\n if (\n !isStrategy &&\n !validateNetProceedsSettings(\n clearErrors,\n setError,\n listForm,\n floorMustBeLessThanCeilingError\n )\n ) {\n hasErrors = true;\n }\n\n return !hasErrors;\n};\n\nexport const getUndercutPriceSettingMode = (value?: number | null) => {\n return !value || value >= 0\n ? UndercutPriceSettingsMode.Discount\n : UndercutPriceSettingsMode.Premium;\n};\n\nexport const getUndercutPriceRepresentingMode = (\n absValue: number,\n mode?: UndercutPriceSettingsMode\n) => {\n return mode === UndercutPriceSettingsMode.Premium ? -absValue : absValue;\n};\n\nexport const DEFAULT_COMP_LISTING_FLOOR = 1;\nexport const DEFAULT_COMP_LISTING_CEIL_MORE_THAN_FLOOR = 5;\n\nexport const DEFAULT_UNDERCUT_ABSOLUTE_AMT = 0.01;\nexport const DEFAULT_UNDERCUT_RELATIVE_AMT = 0;\n\nexport const SLIDER_MIN = -1;\nexport const SLIDER_MAX = 5;\n\nexport const convertSliderValueToServer = (val: number) =>\n roundToPrecision(val / 100 + 1, 2);\nexport const convertSliderValueFromServer = (val: number) => (val - 1) * 100;\n\nexport const getCompListingModeIcon = (\n mode?: AutoPricingCompListingMode | null\n) => {\n switch (mode) {\n case AutoPricingCompListingMode.QualityScore:\n return QualityScoreModeIcon;\n case AutoPricingCompListingMode.SameSection:\n return SameSectionModeIcon;\n case AutoPricingCompListingMode.SameZone:\n return SameZoneModeIcon;\n case AutoPricingCompListingMode.SameEvent:\n return SameEventModeIcon;\n default:\n return ParentListingModeIcon;\n }\n};\n\nexport const getUndercutModeIcon = (mode?: AutoPricingUndercutMode | null) => {\n switch (mode) {\n case AutoPricingUndercutMode.Simple:\n return SimpleUndercutIcon;\n case AutoPricingUndercutMode.RowExtrapolation:\n return RowExtrapolationUndercutIcon;\n default:\n return DealUndercutIcon;\n }\n};\n\nexport const getSectionInfoDisplay = (\n hoveredSection: SectionInfo,\n compListings: CompListing[],\n scoreOverrides?: SectionScoreOverride[] | null\n) => {\n let lowestPrice: string | undefined | null = undefined;\n let medianPrice: string | undefined | null = undefined;\n let highestPrice: string | undefined | null = undefined;\n\n // If we have no selected listing or owned listings, show comp-listings\n const filteredCompListings = compListings\n .filter(\n (l) =>\n isSeatingMatchSectionInfo(hoveredSection, l.section, l.rowId) &&\n l.sellerAllInPrice?.amt\n )\n .toSorted(\n (l1, l2) =>\n (l1.sellerNetProceeds?.amt ?? 0) - (l2.sellerNetProceeds?.amt ?? 0)\n );\n\n if (filteredCompListings.length > 0) {\n if (filteredCompListings.length === 1) {\n medianPrice = filteredCompListings[0].sellerNetProceeds?.disp;\n } else {\n const medianIndex = Math.floor(filteredCompListings.length / 2);\n medianPrice = filteredCompListings[medianIndex].sellerNetProceeds?.disp;\n if (filteredCompListings.length % 2 === 0) {\n // even, need to get the avg of the 2 medians\n // This assume all the comp listings are displayed using the same currency code\n const median1 = filteredCompListings[medianIndex - 1].sellerNetProceeds;\n const median2 = filteredCompListings[medianIndex].sellerNetProceeds;\n if (median1 != null || median2 != null) {\n const avgMedian = ((median1?.amt ?? 0) + (median2?.amt ?? 0)) / 2;\n\n medianPrice = formatCurrency(\n avgMedian,\n median1?.currency ?? median2?.currency,\n median1?.dec ?? median2?.dec\n );\n }\n }\n\n lowestPrice = filteredCompListings[0].sellerNetProceeds?.disp;\n\n highestPrice =\n filteredCompListings[filteredCompListings.length - 1].sellerNetProceeds\n ?.disp;\n }\n }\n\n return (\n \n );\n};\n\nexport const quantityFiltersFromJson = (\n quantitiesFilterJson: string | null | undefined\n): CompListingQuantity | null => {\n if (!quantitiesFilterJson) {\n return null;\n }\n\n const { quantitiesFilter } = JSON.parse(quantitiesFilterJson);\n\n return {\n exactQuantities: quantitiesFilter?.exact ?? null,\n greaterThanOrEqualToQuantity: quantitiesFilter?.gte ?? null,\n };\n};\n","import { Row } from '@tanstack/react-table';\nimport {\n UseFormClearErrors,\n UseFormSetError,\n UseFormSetValue,\n} from 'react-hook-form';\nimport countryList from 'react-select-country-list';\nimport { ExpandedEventData } from 'src/contexts/CatalogDataContext';\nimport { getEventsWithNonZeroCounts } from 'src/contexts/CatalogDataContext/CatalogDataContext.utils';\nimport { removeSpecialChars } from 'src/utils/stringUtils';\nimport {\n ActionOutboxEntityType,\n AutoPricingCompListingMode,\n AutoPricingInputs,\n CatalogResults,\n DateTimeRange,\n Event,\n EventConfigScoreOverride,\n EventSort,\n EventTimeFrameFilter,\n EventWithData,\n GroupType,\n IListingGroupItem,\n Listing,\n ListingGroup,\n Marketplace,\n Performer,\n TopLevelCategory,\n Venue,\n} from 'src/WebApiController';\n\nimport {\n DEFAULT_COMP_LISTING_FLOOR,\n DEFAULT_UNDERCUT_ABSOLUTE_AMT,\n DEFAULT_UNDERCUT_RELATIVE_AMT,\n} from './autoPricingUtils';\nimport { US_COUNTRY_CODES } from './constants/constants';\nimport { getEventDateDisplayStrings } from './dateTimeUtils';\nimport { compareLocaleLowercased } from './localeUtils';\n\nexport const EVENT_TYPE_PARKING = 'Parking';\n\nexport const getEventPerformerVenue = (\n viagVirtId?: string | null,\n catalog?: Pick<\n CatalogResults,\n | 'events'\n | 'performers'\n | 'venues'\n | 'viagIdToLatestIdLookup'\n | 'posIdToViagIdLookup'\n > | null\n) => {\n if (!catalog || !viagVirtId) {\n return { event: undefined, performer: undefined, venue: undefined } as {\n event?: EventWithData | null;\n performer?: Performer | null;\n venue?: Venue | null;\n };\n }\n\n const event = lookupEventInCatalog(catalog, viagVirtId);\n const { performer, venue } = getPerformerAndVenueForEvent(\n event?.event,\n catalog\n );\n\n return { event, performer, venue };\n};\n\nexport function getPerformerAndVenueForEvent(\n event?: Event | null,\n catalog?: Pick | null\n) {\n if (!event) {\n return { performer: undefined, venue: undefined };\n }\n\n const performer = event.perfId && catalog?.performers[event.perfId];\n const venue = catalog?.venues[event.venueId];\n\n return { performer: performer || undefined, venue };\n}\n\nexport const getIsInternationalEvent = (countryCode?: string | null) => {\n if (!countryCode) {\n return false;\n }\n\n const countryName = countryList().getLabel(countryCode);\n if (!countryName) {\n return false;\n }\n\n // Only say it's international if it is not null/empty, a valid country, and is not US/CA\n return !US_COUNTRY_CODES.includes(countryCode.toUpperCase());\n};\n\nexport const getFormattedEventName = ({\n event,\n performer,\n venue,\n slimMode,\n useShortName,\n}: {\n event?: Event | null;\n performer?: Performer | null;\n venue?: Venue | null;\n slimMode?: boolean;\n useShortName?: boolean;\n}) => {\n if (!event) {\n return ['', '', ''];\n }\n\n const eventName = useShortName ? event?.shortName || event.name : event.name;\n let boldText = eventName;\n let dimText = '';\n let normalText = '';\n const vsText = ' vs ';\n const atText = ' at ';\n\n if (performer) {\n const cat = event.genre;\n const lowerCasedEventName = eventName.toLocaleLowerCase();\n const lowerCasedPerformer = performer.name.toLocaleLowerCase();\n\n if (slimMode) {\n if (\n cat === TopLevelCategory.Concert ||\n cat === TopLevelCategory.Theatre\n ) {\n if (\n venue?.name &&\n venue?.descr &&\n lowerCasedEventName === lowerCasedPerformer\n ) {\n // If the event name just repeat the performer, skip it and just display the venue\n return [venue.name, ' - ', venue.descr];\n } else {\n return [eventName.replace(performer.name, '')];\n }\n }\n }\n\n if (cat === TopLevelCategory.Sports) {\n // Legacy display of VS\n let indexOfVs = lowerCasedEventName.indexOf(vsText);\n if (indexOfVs >= 0) {\n const team1 = lowerCasedEventName.slice(0, indexOfVs);\n const team2 = lowerCasedEventName.slice(indexOfVs + vsText.length);\n\n if (team1 === lowerCasedPerformer || team2 === lowerCasedPerformer) {\n const team1Text = eventName.slice(0, indexOfVs);\n const team2Text = eventName.slice(indexOfVs + vsText.length);\n const homeTeam =\n team1 === lowerCasedPerformer ? team1Text : team2Text;\n const awayTeam =\n team1 === lowerCasedPerformer ? team2Text : team1Text;\n\n boldText = awayTeam;\n dimText = atText;\n normalText = homeTeam;\n }\n } else {\n indexOfVs = lowerCasedEventName.indexOf(atText);\n if (indexOfVs >= 0) {\n const awayTeam = eventName.slice(0, indexOfVs);\n const homeTeam = eventName.slice(indexOfVs + vsText.length);\n\n boldText = awayTeam;\n dimText = slimMode ? vsText : atText;\n normalText = homeTeam;\n }\n }\n }\n }\n\n return [boldText, dimText, normalText];\n};\n\nexport const getEventDisplayText = (\n event: Event,\n venue?: Venue,\n performer?: Performer,\n useShortName?: boolean\n): string => {\n let eventName: string | null = null;\n let eventNameConnector: string | null = null;\n let eventSubName: string | null = null;\n let eventDisplayName = '';\n\n [eventName, eventNameConnector, eventSubName] = getFormattedEventName({\n event,\n venue,\n performer,\n useShortName,\n });\n\n if (venue) {\n eventDisplayName += `${venue.name} `;\n }\n\n eventDisplayName += `${eventName} ${eventNameConnector} ${eventSubName}`;\n\n if (event.dates?.start) {\n const { formattedEventDate, formattedEventSubDate } =\n getEventDateDisplayStrings(event.dates?.start, {\n dateFormat: undefined,\n subDateFormat: ' - h:mm aaa, eee',\n });\n\n eventDisplayName += ` - ${formattedEventDate}${formattedEventSubDate}`;\n }\n return eventDisplayName;\n};\n\nexport function searchEvents(\n data: CatalogResults,\n searchText?: string | null,\n performerIds?: number[] | null,\n venueIds?: number[] | null,\n eventTimeFrameFilter?: EventTimeFrameFilter | null\n) {\n let filteredData = Object.values(data.events).filter((e) => e.event != null);\n\n if (eventTimeFrameFilter) {\n const now = new Date();\n filteredData = filteredData.filter((e) => {\n const { start, end } = e.event.dates;\n if (start) {\n let startDateObj = new Date(start);\n startDateObj = new Date(\n startDateObj.setHours(startDateObj.getHours() + 2)\n );\n const endDateObj = end ? new Date(end) : null;\n\n if (eventTimeFrameFilter === EventTimeFrameFilter.Future) {\n return (endDateObj || startDateObj) >= now;\n } else if (eventTimeFrameFilter === EventTimeFrameFilter.Past) {\n return (endDateObj || startDateObj) < now;\n }\n }\n\n return false;\n });\n }\n\n if (performerIds && performerIds.length > 0) {\n filteredData = filteredData.filter(\n (e) => e.event.perfId && performerIds.includes(e.event.perfId)\n );\n }\n\n if (venueIds && venueIds.length > 0) {\n filteredData = filteredData.filter((e) =>\n venueIds.includes(e.event.venueId)\n );\n }\n\n if (searchText && searchText.length > 0) {\n const formattedSearchText = removeSpecialChars(searchText).toUpperCase();\n const searchTerms = formattedSearchText.split(/\\s/); // any whitespace\n const formattedVenuesNames: Record = {};\n\n filteredData = filteredData.filter((e) => {\n const { performer } = getPerformerAndVenueForEvent(e.event, data);\n\n const formattedEventName = removeSpecialChars(\n getFormattedEventName({\n event: e.event,\n performer,\n }).join(' ')\n ).toUpperCase();\n\n const { venueId } = e.event;\n let formattedVenueName = formattedVenuesNames[venueId];\n if (!formattedVenueName) {\n formattedVenueName = removeSpecialChars(\n data.venues[e.event.venueId]?.name ?? ''\n ).toUpperCase();\n formattedVenuesNames[venueId] = formattedVenueName;\n }\n\n return searchTerms.every(\n (term) =>\n formattedEventName.includes(term) || formattedVenueName.includes(term)\n );\n });\n }\n\n return filteredData;\n}\n\nexport const sortEvents = (\n data: CatalogResults,\n filteredData: EventWithData[],\n sortBy?: EventSort | null,\n isSortDescending?: boolean | null\n) => {\n if (sortBy === EventSort.MainDisplay) {\n // NOTE - For main-grouping, we will sort in-memory because the list is not paged,\n // but if it is paged, we will need to sort server side\n return filteredData.toSorted((a, b) => {\n const { performer: ap } = getPerformerAndVenueForEvent(a.event, data);\n const { performer: bp } = getPerformerAndVenueForEvent(b.event, data);\n const aText = getFormattedEventName({\n event: a.event,\n performer: ap,\n }).join(' ');\n const bText = getFormattedEventName({\n event: b.event,\n performer: bp,\n }).join(' ');\n const result = compareLocaleLowercased(aText, bText);\n return isSortDescending ? -1 * result : result;\n });\n } else {\n return sortEventsByDate(filteredData, isSortDescending);\n }\n};\n\nexport const sortEventsByDate = (\n events: EventWithData[],\n isSortDescending?: boolean | null\n) => {\n return events.toSorted((a, b) => {\n const aStart = a.event.dates.start\n ? new Date(a.event.dates.start)\n : new Date();\n const bStart = b.event.dates.start\n ? new Date(b.event.dates.start)\n : new Date();\n const result = aStart < bStart ? -1 : aStart === bStart ? 0 : 1;\n return isSortDescending ? -1 * result : result;\n });\n};\n\nexport const sortEventsByName = (\n events: EventWithData[],\n isSortDescending?: boolean | null\n) => {\n return events.toSorted((a, b) => {\n const result = compareLocaleLowercased(a.event.name, b.event.name);\n return isSortDescending ? -1 * result : result;\n });\n};\n\nexport const transformData = (\n entityType:\n | ActionOutboxEntityType.Listing\n | ActionOutboxEntityType.Sale\n | ActionOutboxEntityType.TicketGroup\n | ActionOutboxEntityType.Purchase,\n data: EventWithData[],\n expandedEventData?: ExpandedEventData | null,\n isExpandedDataLoading?: boolean,\n filterZeroCounts?: boolean\n) => {\n const translatedData = (\n filterZeroCounts ? getEventsWithNonZeroCounts(entityType, data, true) : data\n ).map((e) =>\n setExpandedEventData(expandedEventData, e, isExpandedDataLoading)\n );\n\n return translatedData;\n};\n\nconst setExpandedEventData = (\n expandedEventData: ExpandedEventData | undefined | null,\n e: EventWithData,\n isExpandedDataLoading?: boolean\n) => {\n const id = e.counts?.viagVirtId ?? e.event?.viagVirtualId;\n const eventData = expandedEventData?.[id];\n if (eventData) {\n e.entities = {\n sales: eventData.sales,\n listings: eventData.listings,\n ticketGroups: eventData.ticketGroups,\n getDataFail: eventData.failedToRetrieveData,\n };\n } else {\n e.entities = {\n sales: isExpandedDataLoading\n ? e.entities.sales?.length\n ? e.entities.sales\n : null\n : [],\n listings: isExpandedDataLoading\n ? e.entities.listings?.length\n ? e.entities.listings\n : null\n : [],\n ticketGroups: isExpandedDataLoading\n ? e.entities.ticketGroups?.length\n ? e.entities.ticketGroups\n : null\n : [],\n getDataFail: false,\n };\n }\n\n return { ...e };\n};\n\nexport const lookupEventInCatalog = (\n data:\n | Pick<\n CatalogResults,\n | 'events'\n | 'performers'\n | 'venues'\n | 'viagIdToLatestIdLookup'\n | 'posIdToViagIdLookup'\n >\n | undefined,\n viagVirtualId: string | null | undefined,\n ...posEvIds: (string | null | undefined)[]\n) => {\n if (!viagVirtualId) {\n return null;\n }\n\n let realId = data?.viagIdToLatestIdLookup?.[viagVirtualId];\n if (!realId && posEvIds?.length) {\n realId = posEvIds\n .filter((id) => id != null)\n .map((id) => data?.posIdToViagIdLookup?.[id!])\n .filter((id) => id != null)[0];\n }\n return realId ? data?.events?.[realId] : null;\n};\n\nexport const removeDuplicateListings = (listings: Listing[] | null) => {\n if (!listings?.length) {\n return null;\n }\n\n const result = listings.reduce(\n (r, l) => {\n if (l.isLtGrp && r[l.id]) {\n // We need to handle listing-group differently\n // The same listing group will appear multiple times each carrying different listings\n // from different events, and so we need to merge them together\n const curGroup = r[l.id] as ListingGroup;\n const newGroup = l as ListingGroup;\n\n mergeListingGroup(curGroup, newGroup);\n } else {\n r[l.id] = l; // last one wins\n }\n\n return r;\n },\n {} as Record\n );\n\n return Object.values(result);\n};\n\nconst mergeListingGroup = (\n targetGroup: ListingGroup,\n newGroup: ListingGroup\n) => {\n let activeSubgroup: ListingGroup | undefined;\n let queuedSubgroup: ListingGroup | undefined;\n let soldSubgroup: ListingGroup | undefined;\n let invisibleSubgroup: ListingGroup | undefined;\n let activeSubgroupItems = {} as Record;\n let queuedSubgroupItems = {} as Record;\n let soldSubgroupItems = {} as Record;\n let invisibleSubgroupItems = {} as Record;\n\n const groupItems = targetGroup.groupItems.reduce(\n (r, l) => {\n r[l.id] = l;\n\n if (l.isLtGrp) {\n const subGroup = l as ListingGroup;\n if (subGroup.groupType === GroupType.Active) {\n activeSubgroupItems = subGroup.groupItems.reduce(\n (r, l) => {\n r[l.id] = l;\n return r;\n },\n {} as Record\n );\n activeSubgroup = subGroup;\n } else if (subGroup.groupType === GroupType.Inactive) {\n queuedSubgroupItems = subGroup.groupItems.reduce(\n (r, l) => {\n r[l.id] = l;\n return r;\n },\n {} as Record\n );\n queuedSubgroup = subGroup;\n } else if (subGroup.groupType === GroupType.FullySold) {\n soldSubgroupItems = subGroup.groupItems.reduce(\n (r, l) => {\n r[l.id] = l;\n return r;\n },\n {} as Record\n );\n soldSubgroup = subGroup;\n } else if (subGroup.groupType === GroupType.Invisible) {\n invisibleSubgroupItems = subGroup.groupItems.reduce(\n (r, l) => {\n r[l.id] = l;\n return r;\n },\n {} as Record\n );\n invisibleSubgroup = subGroup;\n }\n\n r[subGroup.id] = l;\n }\n return r;\n },\n {} as Record\n );\n newGroup.groupItems.forEach((i) => {\n if (i.isLtGrp) {\n // This is either the inactive or invisible sub-group\n const subGroup = i as ListingGroup;\n if (subGroup.groupType === GroupType.Active) {\n if (activeSubgroup == null) {\n // If target doesn't have this subGroup, then just copy it over\n activeSubgroup = subGroup;\n groupItems[subGroup.id] = subGroup;\n }\n\n subGroup.groupItems.forEach((j) => {\n if (!activeSubgroupItems[j.id]) {\n // If i doesn't exists in the group yet, just add/replace it\n activeSubgroupItems[j.id] = j;\n\n if (invisibleSubgroupItems[j.id]) {\n // If the targetGroup has this item j as an invisible item, delete it because it's already in the inactive item\n delete invisibleSubgroupItems[j.id];\n }\n }\n });\n } else if (subGroup.groupType === GroupType.Inactive) {\n if (queuedSubgroup == null) {\n // If target doesn't have this subGroup, then just copy it over\n queuedSubgroup = subGroup;\n groupItems[subGroup.id] = subGroup;\n }\n\n subGroup.groupItems.forEach((j) => {\n if (!queuedSubgroupItems[j.id]) {\n // If i doesn't exists in the group yet, just add/replace it\n queuedSubgroupItems[j.id] = j;\n\n if (invisibleSubgroupItems[j.id]) {\n // If the targetGroup has this item j as an invisible item, delete it because it's already in the inactive item\n delete invisibleSubgroupItems[j.id];\n }\n }\n });\n } else if (subGroup.groupType === GroupType.FullySold) {\n if (soldSubgroup == null) {\n // If target doesn't have this subGroup, then just copy it over\n soldSubgroup = subGroup;\n groupItems[subGroup.id] = subGroup;\n }\n\n subGroup.groupItems.forEach((j) => {\n if (!soldSubgroupItems[j.id]) {\n // If i doesn't exists in the group yet, just add/replace it\n soldSubgroupItems[j.id] = j;\n\n if (invisibleSubgroupItems[j.id]) {\n // If the targetGroup has this item j as an invisible item, delete it because it's already in the inactive item\n delete invisibleSubgroupItems[j.id];\n }\n }\n });\n } else if (subGroup.groupType === GroupType.Invisible) {\n if (invisibleSubgroup == null) {\n // If target doesn't have this subGroup, then just copy it over\n invisibleSubgroup = subGroup;\n groupItems[subGroup.id] = subGroup;\n }\n\n subGroup.groupItems.forEach((k) => {\n if (\n !groupItems[k.id] &&\n !activeSubgroupItems[k.id] &&\n !queuedSubgroupItems[k.id] &&\n !soldSubgroupItems[k.id] &&\n !invisibleSubgroupItems[k.id]\n ) {\n // If i doesn't exists in any of the group yet, just add/replace it\n invisibleSubgroupItems[k.id] = k;\n }\n });\n }\n } else if (!groupItems[i.id]) {\n // If i doesn't exists in the group yet, just add/replace it\n groupItems[i.id] = i;\n\n if (invisibleSubgroupItems[i.id]) {\n // If the targetGroup has this item i as an invisible item, delete it because it's already in the inactive item\n delete invisibleSubgroupItems[i.id];\n }\n }\n });\n\n // now that we have the updated active, queued, sold, and invisible group, set it back\n const activeItems = Object.values(activeSubgroupItems);\n if (activeSubgroup != null) {\n activeSubgroup.groupItems = activeItems;\n }\n\n const queuedItems = Object.values(queuedSubgroupItems);\n if (queuedSubgroup != null) {\n queuedSubgroup.groupItems = queuedItems;\n }\n\n const soldItems = Object.values(soldSubgroupItems);\n if (soldSubgroup != null) {\n soldSubgroup.groupItems = soldItems;\n }\n\n const invisibleItems = Object.values(invisibleSubgroupItems);\n if (invisibleSubgroup != null) {\n invisibleSubgroup.groupItems = invisibleItems;\n }\n\n targetGroup.groupItems = Object.values(groupItems).filter((i) =>\n // We only want Listing or non-empty sub-groups\n i.isLtGrp ? (i as ListingGroup).groupItems.length > 0 : true\n );\n};\n\nexport const compareEventsByDateStr = (\n e1: Row,\n e2: Row,\n colId: string\n) => {\n const d1 = e1.getValue(colId) as string;\n const d2 = e2.getValue(colId) as string;\n\n if (!d1 || !d2) {\n return 0;\n }\n\n const aStart = new Date(d1);\n const bStart = new Date(d2);\n return aStart < bStart ? -1 : aStart === bStart ? 0 : 1;\n};\n\nexport const compareEventsByDate = (\n e1: Row,\n e2: Row,\n colId: string\n) => {\n const d1 = e1.getValue(colId) as DateTimeRange;\n const d2 = e2.getValue(colId) as DateTimeRange;\n\n if (!d1 || !d2) {\n return 0;\n }\n\n const aStart = d1.start ? new Date(d1.start) : new Date();\n const bStart = d2.start ? new Date(d2.start) : new Date();\n return aStart < bStart ? -1 : aStart === bStart ? 0 : 1;\n};\n\ntype EventWithPerformerAndVenue = {\n event?: Event | null;\n performer?: Performer | null;\n venue?: Venue | null;\n};\n\nexport function compareEventsByName(\n e1: Row,\n e2: Row,\n colId: string\n) {\n const data1 = e1.getValue(colId) as EventWithPerformerAndVenue;\n const data2 = e2.getValue(colId) as EventWithPerformerAndVenue;\n\n const name1 = getFormattedEventName({\n event: data1.event,\n performer: data1.performer,\n venue: data1.venue,\n useShortName: true,\n });\n const name2 = getFormattedEventName({\n event: data2.event,\n performer: data2.performer,\n venue: data2.venue,\n useShortName: true,\n });\n\n return name1.join(' ').localeCompare(name2.join(' '));\n}\n\nexport function compareEventsByVenue(\n e1: Row,\n e2: Row,\n colId: string\n) {\n const data1 = e1.getValue(colId) as EventWithPerformerAndVenue;\n const data2 = e2.getValue(colId) as EventWithPerformerAndVenue;\n\n const venueName1 = data1.venue?.name ?? '';\n const venueName2 = data2.venue?.name ?? '';\n\n return venueName1.localeCompare(venueName2);\n}\n\nexport function compareEventsByLocation(\n e1: Row,\n e2: Row,\n colId: string\n) {\n const data1 = e1.getValue(colId) as EventWithPerformerAndVenue;\n const data2 = e2.getValue(colId) as EventWithPerformerAndVenue;\n\n const locationName1 = data1.venue?.descr ?? '';\n const locationName2 = data2.venue?.descr ?? '';\n\n return locationName1.localeCompare(locationName2);\n}\n\nexport const getInHandDateBasedOnEvent = (\n event?: Event | null,\n daysBeforeEvent?: number\n) => {\n if (!event?.dates?.start) {\n return new Date().toISOString();\n }\n\n const eventStartDate = new Date(event.dates.start); // get the current date\n const threeDaysAgo = new Date(eventStartDate); // create a new date object with the current date\n threeDaysAgo.setDate(eventStartDate.getDate() - (daysBeforeEvent ?? 3)); // subtract days (default 3) from the current date\n\n return threeDaysAgo.toISOString();\n};\n\nexport type EventPricingSeatMapForm = {\n eventAutoPricing?: AutoPricingInputs | null;\n eventScoreOverride?: EventConfigScoreOverride | null;\n eventWideAutoPricing?: boolean | null;\n};\n\nexport const validateAutoPricingSettings = (\n clearErrors: UseFormClearErrors,\n setError: UseFormSetError,\n setValue: UseFormSetValue,\n eventForm: EventPricingSeatMapForm,\n compListingFloorCeilingError: string,\n requiredMsg: string\n) => {\n let hasErrors = false;\n\n clearErrors('eventAutoPricing.compListingFloor');\n clearErrors('eventAutoPricing.undercutAbsoluteAmount');\n clearErrors('eventAutoPricing.undercutRelativeAmount');\n clearErrors('eventAutoPricing.compListingSelectedSectionSettings');\n\n const eventAutoPricing = eventForm.eventAutoPricing;\n\n if (eventAutoPricing == null) return true;\n\n const {\n compListingMode,\n compListingFloor,\n compListingCeiling,\n compListingSelectedSectionSettings,\n compListingOnlyForSelectedSectionsEnabled,\n undercutMode,\n undercutAbsoluteAmount,\n undercutRelativeAmount,\n } = eventAutoPricing;\n\n if (\n compListingMode === AutoPricingCompListingMode.QualityScore ||\n compListingMode === AutoPricingCompListingMode.SameSection\n ) {\n if (!compListingFloor) {\n eventAutoPricing.compListingFloor = compListingFloor;\n setValue('eventAutoPricing.compListingFloor', DEFAULT_COMP_LISTING_FLOOR);\n } else if (compListingCeiling && compListingFloor >= compListingCeiling) {\n setError('eventAutoPricing.compListingFloor', {\n message: compListingFloorCeilingError,\n });\n\n hasErrors = true;\n }\n\n if (compListingMode === AutoPricingCompListingMode.QualityScore) {\n if (\n compListingOnlyForSelectedSectionsEnabled &&\n !compListingSelectedSectionSettings?.sectionIdFilter?.length\n ) {\n setError(\n 'eventAutoPricing.compListingSelectedSectionSettings',\n {\n message: requiredMsg,\n },\n { shouldFocus: true }\n );\n\n hasErrors = true;\n }\n }\n }\n\n if (undercutMode) {\n if (undercutAbsoluteAmount == null) {\n eventAutoPricing.undercutAbsoluteAmount = DEFAULT_UNDERCUT_ABSOLUTE_AMT;\n setValue(\n 'eventAutoPricing.undercutAbsoluteAmount',\n DEFAULT_UNDERCUT_ABSOLUTE_AMT\n );\n }\n\n if (undercutRelativeAmount == null) {\n eventAutoPricing.undercutRelativeAmount = DEFAULT_UNDERCUT_RELATIVE_AMT;\n setValue(\n 'eventAutoPricing.undercutRelativeAmount',\n DEFAULT_UNDERCUT_RELATIVE_AMT\n );\n }\n }\n\n return !hasErrors;\n};\n\nexport const compareMarketplace = (\n a?: Marketplace | null,\n b?: Marketplace | null\n) => {\n if (a === Marketplace.StubHub && b === Marketplace.StubHub) {\n return 0; // always sort first\n }\n\n if (a === Marketplace.StubHub) {\n return -1; // always sort first\n }\n\n if (b === Marketplace.StubHub) {\n return 1;\n }\n\n return (a ?? '').localeCompare(b ?? '');\n};\n","import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport {\n Feature,\n SellerAccountClient,\n TimezoneInfo,\n} from 'src/WebApiController';\n\nimport { useUserHasFeature } from '../useUserHasFeature';\n\nexport const useCustomTimeZoneSettings = () => {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const { trackError, showErrorDialog } = useErrorBoundaryContext();\n\n const hasTimeZoneFeature = useUserHasFeature(Feature.POSTimezone);\n\n const queryClient = useQueryClient();\n const queryKey = [\n 'getCustomTimeZoneSettings',\n activeAccountWebClientConfig.activeAccountId,\n ];\n\n const shouldQuery =\n hasTimeZoneFeature && activeAccountWebClientConfig.activeAccountId != null;\n const query = useQuery({\n queryKey,\n queryFn: () => {\n if (!shouldQuery) {\n return null;\n }\n return new SellerAccountClient(\n activeAccountWebClientConfig\n ).getCustomTimeZoneSettings();\n },\n\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError('SellerAccountClient.getCustomTimeZoneSettings', error);\n },\n },\n });\n\n const mutation = useMutation({\n mutationFn: async ({ input }: { input: TimezoneInfo | undefined }) => {\n return await new SellerAccountClient(\n activeAccountWebClientConfig\n ).mergeCustomTimeZoneSettings(input);\n },\n // optimistic ui\n onMutate: ({ input }) => {\n queryClient.cancelQueries({ queryKey });\n const prevValue = queryClient.getQueryData(queryKey);\n queryClient.setQueryData(queryKey, input);\n return { prevValue };\n },\n onError: (err: ErrorTypes, { input }, context) => {\n queryClient.setQueryData(queryKey, context?.prevValue);\n showErrorDialog('SellerAccountClient.mergeCustomTimeZoneSettings', err, {\n trackErrorData: { input },\n });\n },\n onSettled: () => {\n queryClient.invalidateQueries({ queryKey });\n },\n });\n\n return {\n customTimeZoneSettings: query.data,\n isLoading: query.isLoading,\n mergeCustomTimeZoneSettings: mutation.mutateAsync,\n };\n};\n","import { fromZonedTime, toZonedTime } from 'date-fns-tz';\nimport { createContext, ReactNode, useCallback, useContext } from 'react';\nimport { useCustomTimeZoneSettings } from 'src/hooks/api/useCustomTimeZoneSettings';\n\nimport { DEFAULT_TIMEZONE_LOCAL } from './SiteTimezoneContext.constants';\n\ntype SiteTimezoneContextType = {\n timeZone: string;\n timezoneOffsetMins: number;\n toZonedTime: (date: Date) => Date;\n fromZonedTime: (date: Date) => Date;\n};\n\nconst SiteTimezoneContextDefaults = {\n timeZone: DEFAULT_TIMEZONE_LOCAL,\n timezoneOffsetMins: new Date().getTimezoneOffset(),\n toZonedTime: (date: Date) => date,\n fromZonedTime: (date: Date) => date,\n};\n\nconst SiteTimezoneContext = createContext(\n SiteTimezoneContextDefaults\n);\n\ntype SiteTimezoneContextProviderType = {\n children: ReactNode;\n};\n\nexport const SiteTimezoneContextProvider = ({\n children,\n}: SiteTimezoneContextProviderType) => {\n const { customTimeZoneSettings } = useCustomTimeZoneSettings();\n\n const toZonedTimeWrapper = useCallback(\n (date: Date) => {\n return toZonedTime(\n date,\n customTimeZoneSettings?.value ?? DEFAULT_TIMEZONE_LOCAL\n );\n },\n [customTimeZoneSettings]\n );\n\n const fromZonedTimeWrapper = useCallback(\n (date: Date) => {\n return fromZonedTime(\n date,\n customTimeZoneSettings?.value ?? DEFAULT_TIMEZONE_LOCAL\n );\n },\n [customTimeZoneSettings]\n );\n\n return (\n \n {children}\n \n );\n};\n\nexport const useSiteTimezoneContext = () => useContext(SiteTimezoneContext);\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const AdminHoldIcon = (props: PosIconProps) => {\n return (\n \n \n \n \n );\n};\n","import { formatInTimeZone } from 'date-fns-tz';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useSiteTimezoneContext } from 'src/contexts/SiteTimezoneContext/SiteTimezoneContext';\nimport { vars } from 'src/core/themes';\nimport { Stack, Tooltip } from 'src/core/ui';\nimport { AdminHoldIcon } from 'src/svgs/AdminHoldIcon';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { isSqlMaxDate, stringToUtcDate } from 'src/utils/dateTimeUtils';\n\nimport * as styles from './AdminHoldBadge.css';\n\nexport const AdminHoldBadge = ({\n adminHoldExpirationDate,\n adminHoldNotes,\n showDetailOnHover,\n iconOnlyMode,\n}: {\n adminHoldExpirationDate: string | null;\n adminHoldNotes: string | null;\n showDetailOnHover?: boolean;\n iconOnlyMode?: boolean;\n}) => {\n const holdTxt = useContent(ContentId.Hold);\n const { timeZone } = useSiteTimezoneContext();\n\n adminHoldExpirationDate =\n adminHoldExpirationDate == null ||\n isSqlMaxDate(stringToUtcDate(adminHoldExpirationDate))\n ? null\n : adminHoldExpirationDate;\n\n const content = iconOnlyMode ? (\n
\n \n
\n ) : (\n
\n \n \n \n
\n );\n\n return showDetailOnHover ? (\n \n {adminHoldExpirationDate || adminHoldNotes ? (\n \n {adminHoldExpirationDate && (\n \n \n \n {': '}\n \n {formatInTimeZone(\n stringToUtcDate(adminHoldExpirationDate),\n timeZone,\n 'dd MMM yyyy, hh:mm a'\n )}\n \n )}\n {adminHoldNotes && (\n \n \n \n {': '}\n \n {adminHoldNotes}\n \n )}\n \n ) : (\n holdTxt\n )}\n \n ) : (\n content\n );\n};\n","import {\n cloneElement,\n ComponentPropsWithoutRef,\n ComponentPropsWithRef,\n forwardRef,\n isValidElement,\n PropsWithChildren,\n ReactElement,\n ReactNode,\n useRef,\n} from 'react';\nimport { Button, Popover } from 'src/core/ui';\n\nimport * as styles from './PosDropdown.css';\n\nexport type PosDropdownProps = {\n trigger?: ReactNode;\n rootProps?: ComponentPropsWithRef;\n triggerProps?: ComponentPropsWithRef;\n};\n\nexport const PosDropdown = forwardRef<\n HTMLDivElement,\n PropsWithChildren<\n ComponentPropsWithoutRef & PosDropdownProps\n >\n>(function PosDropdown(\n { rootProps, triggerProps, trigger, children, id, ...rest },\n ref\n): ReactElement {\n return (\n \n {\n // This is to prevent the click from passing through to the container (which maybe a clickable tile)\n e.stopPropagation();\n }}\n >\n \n {isValidElement(trigger)\n ? cloneElement(trigger as ReactElement<{ disabled: boolean }>, {\n disabled: !!triggerProps?.disabled,\n })\n : trigger}\n \n \n \n {children}\n \n \n );\n});\n\nexport const PosDropdownItem = forwardRef<\n HTMLButtonElement,\n PropsWithChildren> & {\n noPadding?: boolean;\n keepOpenAfterSelection?: boolean;\n }\n>(function PosDropdownItem(\n { onClick, keepOpenAfterSelection, children, id, ...props },\n ref\n): ReactElement {\n const closeRef = useRef(null);\n\n return (\n <>\n {\n onClick?.(e);\n if (!keepOpenAfterSelection) {\n closeRef.current?.click?.();\n }\n }}\n justifyContent=\"space-between\"\n >\n {children}\n \n {\n // We want the default behavior of the onClick event here.\n // We only don't want the click event to propagate to other elements, e.g. eventAccordion that will cause the collapsible to fold\n e.stopPropagation();\n }}\n />\n \n );\n});\n","import { once } from 'lodash-es';\nimport React, { useCallback, useContext, useState } from 'react';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getErrorInfoFromStatusCode } from 'src/utils/errorUtils';\nimport { lookupEventInCatalog } from 'src/utils/eventWithDataUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n CatalogClient,\n EntityWithTickets,\n Event,\n Listing,\n Sale,\n} from 'src/WebApiController';\n\nimport { useAppContext } from '../AppContext';\nimport { useCatalogDataContext } from '../CatalogDataContext';\nimport { Content } from '../ContentContext';\n\nexport type IPosEntity = {\n id: EntityWithTickets['id'];\n posEvId?: EntityWithTickets['posEvId'];\n viagVirtualId: EntityWithTickets['viagVirtualId'] | null;\n entityType: ActionOutboxEntityType;\n};\n\nexport type IActivePosEntityContext = {\n entityType: ActionOutboxEntityType;\n posEntityId?: number | null;\n /* Null means a value was not able to be obtained. Undefined means the item was never retrieved or being retrieved. */\n posEntity?: TDataItem | null;\n /* Null means a value was not able to be obtained. Undefined means the item was never retrieved or being retrieved. */\n event?: Event | null;\n /* Whether the current active event item is being searched or just loading */\n posEntityDisplayId?: string | null;\n setActivePosEntity: (\n posEntityId: number,\n posEntityDisplayId?: string | null,\n forceRefresh?: boolean,\n dataToGet?: string[],\n resetData?: boolean\n ) => Promise;\n updateActivePosEntityInfo: (\n posEntity: Pick<\n IActivePosEntityContext,\n 'posEntityId' | 'event' | 'posEntity' | 'posEntityDisplayId'\n >\n ) => void;\n isLoading: boolean;\n errorInfo?: { errorHeader: React.ReactNode; errorMessage: React.ReactNode };\n};\n\nexport const createActivePosEntityContext = once(<\n TDataItem extends IPosEntity,\n>() => React.createContext({} as IActivePosEntityContext));\nexport const useActivePosEntityContext = () =>\n useContext(createActivePosEntityContext());\n\nexport const ActivePosEntityProvider = ({\n entityType,\n getActivePosEntity,\n onSetActiveItemCompleteCallback,\n children,\n}: {\n entityType: ActionOutboxEntityType;\n getActivePosEntity: (\n posEntityId: number,\n curEntity?: TDataItem | null,\n dataToGet?: string[] | null\n ) => Promise<\n Pick<\n IActivePosEntityContext,\n 'posEntityId' | 'event' | 'posEntity' | 'posEntityDisplayId'\n >\n >;\n\n /* Callback when item is successfully set active */\n onSetActiveItemCompleteCallback?: (\n item: TDataItem,\n forceRefresh?: boolean\n ) => void;\n children: React.ReactNode;\n}) => {\n const { trackError } = useErrorBoundaryContext();\n\n const [errorInfo, setErrorInfo] = useState<{\n errorHeader: React.ReactNode;\n errorMessage: React.ReactNode;\n }>();\n const [isLoading, setIsLoading] = useState(false);\n const ActivePosEntityContext = createActivePosEntityContext();\n const [posEntityInfo, setPosEntityInfo] = useState<\n Pick<\n IActivePosEntityContext,\n 'posEntityId' | 'posEntity' | 'event' | 'posEntityDisplayId'\n >\n >({});\n\n const { data, updateItemInEvent } = useCatalogDataContext();\n const { activeAccountWebClientConfig } = useAppContext();\n\n const getAndUpdateCatalogDataForEntity = useCallback(\n async (item: TDataItem) => {\n if (\n !item?.viagVirtualId ||\n (entityType !== ActionOutboxEntityType.Listing &&\n entityType !== ActionOutboxEntityType.Sale)\n ) {\n return null;\n }\n // Now that we got the listing details, try to get the Event from existing data\n let event = lookupEventInCatalog(data, item.viagVirtualId, item.posEvId);\n\n // If we can't find it, go fetch it\n if (event == null) {\n const client = new CatalogClient(activeAccountWebClientConfig);\n\n const results =\n entityType === ActionOutboxEntityType.Listing\n ? await client.getCatalogForListingByListingId(item.id!)\n : await client.getCatalogForSaleBySaleId(item.id!);\n if (results?.events) {\n event = lookupEventInCatalog(\n results,\n item.viagVirtualId,\n item.posEvId\n );\n }\n } else {\n // The event exists in the catalog, update the entity in that event\n if (entityType === ActionOutboxEntityType.Listing) {\n updateItemInEvent(item as unknown as Listing, entityType);\n } else {\n updateItemInEvent(item as unknown as Sale, entityType);\n }\n }\n\n return event;\n },\n [activeAccountWebClientConfig, data, entityType, updateItemInEvent]\n );\n\n const updateActivePosEntityInfo = useCallback(\n async (\n item: Pick<\n IActivePosEntityContext,\n 'posEntityId' | 'event' | 'posEntity' | 'posEntityDisplayId'\n >\n ) => {\n const event = item.posEntity\n ? await getAndUpdateCatalogDataForEntity(item.posEntity)\n : undefined;\n\n if (\n posEntityInfo.posEntityId == null ||\n posEntityInfo.posEntityId === item.posEntityId\n ) {\n // Only update the entity info if it's the active one\n setPosEntityInfo({ ...item, event: event?.event });\n }\n },\n [getAndUpdateCatalogDataForEntity, posEntityInfo.posEntityId]\n );\n\n const setActivePosEntity = useCallback(\n async (\n posEntityId: number,\n posEntityDisplayId?: string | null,\n forceRefresh?: boolean,\n dataToGet?: string[],\n resetData?: boolean\n ) => {\n if (isLoading) {\n // NOTE: This is already a request pending, any new call - will either likely replace the old one or being replaced by the old one\n // depending on which ones finish first - so we just quit here as there's nothing really to do correctly\n // Importantly - the dev calling setActivePosEntity should know when to call this (and when not)\n return;\n }\n\n if (posEntityId === 0) {\n // Clearing the active item\n setPosEntityInfo({\n posEntityId: posEntityId,\n posEntityDisplayId: posEntityDisplayId,\n });\n return;\n }\n\n const isSameEntity = posEntityInfo?.posEntityId === posEntityId;\n if (forceRefresh || !isSameEntity) {\n // If we are getting a different item, clear the existing ones so it shows a loading state\n setPosEntityInfo({\n posEntityId: posEntityId,\n posEntityDisplayId: posEntityDisplayId,\n });\n }\n\n return tryInvokeApi(\n async () => {\n setErrorInfo(undefined);\n setIsLoading(true);\n\n const item = await getActivePosEntity(\n posEntityId,\n // if we want to reset data or the entity we want is not the same, pass in null for current entity\n resetData || !isSameEntity ? undefined : posEntityInfo?.posEntity,\n dataToGet\n );\n\n // null item return means it was not found (204 status)\n if (item == null) {\n setErrorInfo({\n errorHeader: ,\n errorMessage: (\n \n ),\n });\n }\n\n // Once we found it, set the item as active\n const event = item.posEntity\n ? await getAndUpdateCatalogDataForEntity(item.posEntity)\n : undefined;\n\n setPosEntityInfo({ ...item, event: event?.event });\n\n if (item.posEntity) {\n onSetActiveItemCompleteCallback?.(item.posEntity, forceRefresh);\n }\n },\n (error) => {\n // Clear the active ids so on retry it will reget\n setPosEntityInfo({\n posEntityId: undefined,\n posEntityDisplayId: undefined,\n });\n const { headerDisplay, messageDisplay } = getErrorInfoFromStatusCode(\n error?.status,\n error?.message\n );\n setErrorInfo({\n errorHeader: headerDisplay,\n errorMessage: messageDisplay,\n });\n trackError('ActivePosEntityContext.getActivePosEntity', error, {\n posEntityId,\n posEntityDisplayId,\n });\n },\n () => {\n setIsLoading(false);\n }\n );\n },\n [\n isLoading,\n posEntityInfo?.posEntityId,\n posEntityInfo?.posEntity,\n getActivePosEntity,\n getAndUpdateCatalogDataForEntity,\n onSetActiveItemCompleteCallback,\n trackError,\n ]\n );\n\n return (\n \n {children}\n \n );\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { EventConfigClient } from 'src/WebApiController';\n\nimport { useAppContext } from '../AppContext';\nimport { ErrorTypes, useErrorBoundaryContext } from '../ErrorBoundaryContext';\n\nexport const useGetEventMapConfig = (\n eventId?: number | null,\n disabled?: boolean\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const { trackError } = useErrorBoundaryContext();\n\n const shouldQuery =\n !disabled &&\n activeAccountWebClientConfig.activeAccountId != null &&\n eventId != null;\n const venueMapQuery = useQuery({\n queryKey: [\n 'EventConfigClient.getVenueMapForEvent',\n activeAccountWebClientConfig.activeAccountId,\n eventId,\n disabled,\n ],\n queryFn: async () => {\n if (!shouldQuery) {\n return null;\n }\n\n const map = await new EventConfigClient(\n activeAccountWebClientConfig\n ).getVenueMapForEvent(eventId!);\n\n return map;\n },\n\n enabled: shouldQuery,\n staleTime: Infinity, // this data hardly, and we already invalidate on reload\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError('EventConfigClient.getVenueMapForEvent', error, { eventId });\n },\n },\n });\n\n return venueMapQuery;\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { PricingClient } from 'src/WebApiController';\n\nimport { useAppContext } from '../AppContext';\nimport { ErrorTypes, useErrorBoundaryContext } from '../ErrorBoundaryContext';\n\nexport const useGetEventMapConfigOverrides = (\n viagogoEventId?: number | null,\n venueConfigId?: number | null,\n disabled?: boolean\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const { trackError } = useErrorBoundaryContext();\n\n const shouldQuery =\n !disabled &&\n Boolean(\n activeAccountWebClientConfig.activeAccountId &&\n viagogoEventId &&\n venueConfigId\n );\n const seatScoreOverridesQuery = useQuery({\n queryKey: [\n 'getEventSeatMapScoreOverrides',\n activeAccountWebClientConfig.activeAccountId,\n viagogoEventId,\n venueConfigId,\n ],\n queryFn: () => {\n if (!shouldQuery) {\n return null;\n }\n\n return new PricingClient(\n activeAccountWebClientConfig\n ).getEventSeatMapScoreOverrides(viagogoEventId!, venueConfigId!);\n },\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError('PricingClient.getEventSeatMapScoreOverrides', error, {\n viagogoEventId,\n venueConfigId,\n });\n },\n },\n });\n\n const shouldQuery2 =\n !disabled && activeAccountWebClientConfig.activeAccountId != null;\n const sellerAccountScoreOverridesQuery = useQuery({\n queryKey: [\n 'GetEventSeatMapScoreOverridesForSellerAccount',\n activeAccountWebClientConfig.activeAccountId,\n ],\n queryFn: () => {\n if (!shouldQuery2) {\n return null;\n }\n\n return new PricingClient(\n activeAccountWebClientConfig\n ).getEventSeatMapScoreOverridesForSellerAccount();\n },\n\n enabled: shouldQuery2,\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError(\n 'PricingClient.GetEventSeatMapScoreOverridesForSellerAccount',\n error\n );\n },\n },\n });\n\n return { seatScoreOverridesQuery, sellerAccountScoreOverridesQuery };\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { EventConfigClient } from 'src/WebApiController';\n\nimport { useAppContext } from '../AppContext';\nimport { ErrorTypes, useErrorBoundaryContext } from '../ErrorBoundaryContext';\n\nexport const useGetEventMapsByScoreModelConfig = (\n eventId?: number | null,\n disabled?: boolean\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const { trackError } = useErrorBoundaryContext();\n\n const shouldQuery =\n !disabled &&\n activeAccountWebClientConfig.activeAccountId != null &&\n eventId != null;\n const venueMapsByScoreModelQuery = useQuery({\n queryKey: [\n 'EventConfigClient.getVenueMapsByScoreModelForEvent',\n activeAccountWebClientConfig.activeAccountId,\n eventId,\n disabled,\n ],\n queryFn: async () => {\n if (!shouldQuery) {\n return null;\n }\n\n const map = await new EventConfigClient(\n activeAccountWebClientConfig\n ).getVenueMapsByScoreModelForEvent(eventId!);\n\n return map;\n },\n\n enabled: shouldQuery,\n staleTime: Infinity,\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError(\n 'EventConfigClient.getVenueMapsByScoreModelForEvent',\n error,\n {\n eventId,\n }\n );\n },\n },\n });\n\n return venueMapsByScoreModelQuery;\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport {\n Event,\n Feature,\n ListingClient,\n PricingClient,\n} from 'src/WebApiController';\n\nimport { useUserHasFeature } from './useUserHasFeature';\n\nexport const useGetEventAutoPricingSettings = (\n event: Event | null,\n getIsAllListingEnabledForAutoPricing: boolean\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const hasAutoPricingFeature = useUserHasFeature(Feature.AutoPricing);\n\n const shouldQuery = !(\n !activeAccountWebClientConfig.activeAccountId ||\n !event?.viagId ||\n !hasAutoPricingFeature\n );\n\n const pricingSettingsQuery = useQuery({\n queryKey: ['PricingClient.getEventAutoPricingSettings', event?.viagId],\n queryFn: async () => {\n if (!shouldQuery) {\n return null;\n }\n\n const pricingSettings = await new PricingClient(\n activeAccountWebClientConfig\n ).getEventAutoPricingSettings(event!.viagId!);\n\n return pricingSettings;\n },\n\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n retry: 3,\n retryDelay: (attemptIndex) => Math.min(500 ** attemptIndex, 3000),\n meta: {\n // TODO: temporally hide the error for now, enable this after https://stubhub.enterprise.slack.com/archives/C08D76X6M0S is fixed.\n // onError: (error: ErrorTypes) => {\n // showErrorDialog('PricingClient.getEventAutoPricingSettings', error, {\n // trackErrorData: { event },\n // });\n // },\n },\n });\n\n const shouldQuery2 =\n getIsAllListingEnabledForAutoPricing &&\n activeAccountWebClientConfig.activeAccountId != null &&\n event?.viagId != null;\n\n const allListingEnabledPricingQuery = useQuery({\n queryKey: ['PricingClient.getListingEnabledForAutoPricing', event?.viagId],\n queryFn: async () => {\n if (!shouldQuery2) {\n return null;\n }\n const allListingEnabledPricing = await new ListingClient(\n activeAccountWebClientConfig\n ).getListingEnabledForAutoPricing(event.posIds);\n\n return allListingEnabledPricing;\n },\n\n refetchOnWindowFocus: false,\n enabled: shouldQuery2,\n meta: {\n onError: (error: ErrorTypes) => {\n showErrorDialog(\n 'PricingClient.getListingEnabledForAutoPricing',\n error,\n {\n trackErrorData: { event },\n }\n );\n },\n },\n });\n\n return {\n pricingSettings: pricingSettingsQuery.data,\n allListingEnabledPricing: allListingEnabledPricingQuery.data,\n pricingSettingsQuery,\n allListingEnabledPricingQuery,\n };\n};\n","import { isEqual } from 'lodash-es';\nimport {\n FilterToolbarGroup,\n FilterToolbarItem,\n FilterToolbarItemId,\n} from 'src/components/Filters';\nimport {\n CatalogResults,\n DateTimeRange,\n DateTimeRangeWithRelative,\n EntityWithTicketsQuery,\n EventGroupingQuery,\n EventGroupingSortBy,\n EventGroupingType,\n EventSort,\n EventTimeFrameFilter,\n EventWithData,\n InventoryViewMode,\n ListingQuery,\n OnSaleEventQuery,\n OnSaleEventViewMode,\n PointOfSaleSaleStatus,\n PurchaseOrderQuery,\n PurchaseOrderState,\n PurchaseViewMode,\n ReportEntityWithTicketsQuery,\n SaleQuery,\n SalesViewMode,\n UIReportCommissionQuery,\n UIReportV2ListingQuery,\n UIReportV2SaleQuery,\n UserSetting,\n} from 'src/WebApiController';\n\nimport {\n DateRangePresetName,\n getNextDateRange,\n getUiDateTimeRangeFromPreset,\n PurchaseDateRangePresetNames,\n} from './dateTimeUtils';\n\nexport enum EventMappingStateFilter {\n All = 'All',\n Mapped = 'Mapped',\n Pending = 'Pending',\n Rejected = 'Rejected',\n}\n\nexport const DefaultEventGroupingQuery = {\n searchText: '',\n groupingType: EventGroupingType.Performer,\n sortBy: EventGroupingSortBy.Name,\n isSortDescending: false,\n} satisfies EventGroupingQuery;\n\nexport type QueryWithViewMode = {\n timezoneOffsetMins: number | null;\n viewMode?: string | null;\n};\n\nexport const VIEW_MODE_SETTING_ID_TO_DEFAULT = {\n [UserSetting.InventoryPageViewMode]: InventoryViewMode.TileView,\n [UserSetting.SalePageViewMode]: SalesViewMode.TileView,\n [UserSetting.PurchasePageViewMode]: PurchaseViewMode.EventTileView,\n};\n\nexport const EmptyEntityWithTicketsQuery = {\n entityIds: null,\n eventOrMappingIds: null,\n oldPosEventIds: null,\n marketplaceEntityIds: null,\n performerIds: null,\n venueIds: null,\n countryCodes: null,\n stateProvinceIds: null,\n cityIds: null,\n purchaseOrderId: null,\n purchaseOrderIds: null,\n saleIds: null,\n listingIds: null,\n purchaseVendorId: null,\n vendorAccessControlProviderId: null,\n purchaseVendorOrderId: null,\n purchaseVendorAccountIds: null,\n purchaseBuyerId: null,\n inHandDates: null,\n eventTimeFrameFilter: null,\n searchText: null,\n sortBy: null,\n isSortDescending: false,\n eventDates: null,\n eventNotReviewedSinceDate: null,\n sectionContains: null,\n sections: null,\n rows: null,\n sectionEquals: null,\n rowContains: null,\n rowEquals: null,\n sectionNotContains: null,\n rowNotContains: null,\n tagName: null,\n tagValue: null,\n eventTagName: null,\n eventTagValue: null,\n topLevelCategories: null,\n parentCategories: null,\n numberOfTicketsHeld: null,\n lastSaleDates: null,\n noSaleDates: null,\n isSeatSaver: null,\n timezoneOffsetMins: new Date().getTimezoneOffset(),\n purchaseDates: null,\n purchaseOrderCreatedBy: null,\n purchaseCommissionUserId: null,\n internalNotes: null,\n internalNotesContains: null,\n internalNotesEquals: null,\n internalNotesNotContains: null,\n currencyCode: null,\n eventStatuses: null,\n currencyCodes: null,\n searchConfigId: null,\n isMapped: null,\n isMappingRejected: null,\n} satisfies EntityWithTicketsQuery;\n\nexport const EmptySaleQuery = {\n ...EmptyEntityWithTicketsQuery,\n saleStatus: null,\n saleStatuses: null,\n paymentState: null,\n marketplacePaymentState: null,\n saleDates: null,\n ticketType: null,\n soldOnMarketplace: null,\n fulfillerSellerUserId: null,\n lastSaleDates: null,\n noSaleDates: null,\n numberOfTicketsHeld: null,\n topLevelCategories: null,\n parentCategories: null,\n paymentDates: null,\n fulfillmentDates: null,\n cancellationDates: null,\n fulfillmentStates: null,\n paymentReceived: null,\n paymentReferenceId: null,\n listingInsertBy: null,\n isNoFulfill: null,\n viewMode: null,\n} satisfies SaleQuery;\n\nexport const DefaultSaleQuery = {\n ...EmptySaleQuery,\n saleStatuses: [\n PointOfSaleSaleStatus.PendingConfirmation,\n PointOfSaleSaleStatus.PendingAllocation,\n PointOfSaleSaleStatus.PendingFulfillment,\n PointOfSaleSaleStatus.ProcessingFulfillment,\n PointOfSaleSaleStatus.Fulfilled,\n PointOfSaleSaleStatus.FulfillmentFailed,\n PointOfSaleSaleStatus.Hold,\n PointOfSaleSaleStatus.ProvisionalAllocation,\n ],\n sortBy: EventSort.Date,\n isSortDescending: false, // We want the nearest future event first\n eventTimeFrameFilter: EventTimeFrameFilter.Future,\n} satisfies SaleQuery;\n\nexport const EmptyListingQuery = {\n ...EmptyEntityWithTicketsQuery,\n pricerSellerUserId: null,\n isPredelivered: null,\n isListed: null,\n deliveryType: null,\n hasUnsoldTickets: null,\n eventHasUnsoldTickets: null,\n hasBroadcastError: null,\n isAutoPricingEnabled: null,\n isPricedAboveZero: null,\n eventUnpricedStatus: null,\n autoPricingResultTypes: null,\n isSeatingUnmapped: null,\n lastSaleDates: null,\n numberOfTicketsHeld: null,\n topLevelCategories: null,\n parentCategories: null,\n isAdminHold: null,\n isDuplicate: null,\n lastPriceUpdateDates: null,\n lastPriceNoUpdateDates: null,\n isPricedByMarketplace: null,\n isPendingProof: null,\n purchaseCancellationDates: null,\n purchaseCancelledOnly: null,\n isNoFulfill: null,\n ticketType: null,\n viewMode: null,\n} satisfies ListingQuery;\n\nexport const DefaultListingQuery = {\n ...EmptyListingQuery,\n sortBy: EventSort.Date,\n isSortDescending: false, // We want the nearest future event first\n eventTimeFrameFilter: EventTimeFrameFilter.Future,\n} satisfies ListingQuery;\n\nexport const EmptyOnSaleEventQuery = {\n viewMode: null,\n onSaleDates: null,\n timezoneOffsetMins: null,\n searchText: null,\n eventIds: null,\n} satisfies OnSaleEventQuery;\n\nexport const DefaultOnSaleEventQuery = {\n ...EmptyOnSaleEventQuery,\n viewMode: OnSaleEventViewMode.MetricView,\n onSaleDates: {\n start: getNextDateRange({ weeks: 2 }, new Date()).start.toISOString(),\n end: getNextDateRange({ weeks: 2 }, new Date()).end.toISOString(),\n } as DateTimeRangeWithRelative,\n searchText: null,\n eventIds: null,\n} satisfies OnSaleEventQuery;\n\nexport const EmptyPurchaseQuery = {\n ...EmptyEntityWithTicketsQuery,\n ticketGroupIds: null,\n purchaseMonths: null,\n paymentDates: null,\n paymentMethod: null,\n paymentStatus: null,\n totalCostHigh: null,\n totalCostLow: null,\n deliveryType: null,\n purchaseOrderState: null,\n isSortDescending: null,\n tagName: null,\n tagValue: null,\n entityIds: null,\n purchaseOrderCreatedBy: null,\n purchaseCommissionUserId: null,\n viewMode: null,\n currencyCode: null,\n paymentMethodId: null,\n internalNotesContains: null,\n internalNotesEquals: null,\n internalNotesNotContains: null,\n paymentCurrencyCodes: null,\n isConsignment: null,\n} satisfies PurchaseOrderQuery;\n\nexport const DefaultPurchaseQuery = {\n ...EmptyPurchaseQuery,\n purchaseDates:\n (getUiDateTimeRangeFromPreset(\n DateRangePresetName.ThisYear,\n PurchaseDateRangePresetNames\n ) as DateTimeRangeWithRelative) ?? null,\n sortBy: EventSort.Date,\n purchaseOrderState: PurchaseOrderState.Active,\n isSortDescending: true,\n} satisfies PurchaseOrderQuery;\n\nexport const EmptyCommissionQuery = {\n eventTimeFrameFilter: null,\n eventDates: null,\n saleDates: null,\n saleStatuses: null,\n soldOnMarketplace: null,\n paymentDates: null,\n fulfillmentDates: null,\n purchaseCommissionUserId: null,\n isCommissionEligible: null,\n commissionEligibilityDates: null,\n timezoneOffsetMins: null,\n viewMode: null,\n isSortDescending: null,\n} satisfies UIReportCommissionQuery;\n\nexport const DefaultCommissionQuery = {\n ...EmptyCommissionQuery,\n eventTimeFrameFilter: EventTimeFrameFilter.Future,\n isSortDescending: true,\n} satisfies UIReportCommissionQuery;\n\nconst EmptyReportEntityWithTicketsQuery = {\n performerIds: null,\n venueIds: null,\n countryCodes: null,\n stateProvinceIds: null,\n cityIds: null,\n purchaseOrderId: null,\n purchaseVendorId: null,\n vendorAccessControlProviderId: null,\n purchaseVendorAccountIds: null,\n purchaseVendorOrderId: null,\n purchaseBuyerId: null,\n purchaseOrderCreatedBy: null,\n purchaseCommissionUserId: null,\n purchaseDates: null,\n inHandDates: null,\n eventTimeFrameFilter: null,\n sections: null,\n rows: null,\n sectionContains: null,\n sectionEquals: null,\n sectionNotContains: null,\n rowContains: null,\n rowEquals: null,\n rowNotContains: null,\n isSeatSaver: null,\n eventDates: null,\n noSaleDates: null,\n tagName: null,\n tagValue: null,\n eventTagName: null,\n eventTagValue: null,\n lastSaleDates: null,\n numberOfTicketsHeld: null,\n topLevelCategories: null,\n parentCategories: null,\n internalNotes: null,\n internalNotesContains: null,\n internalNotesEquals: null,\n internalNotesNotContains: null,\n timezoneOffsetMins: null,\n currencyCode: null,\n currencyCodes: null,\n eventStatuses: null,\n} satisfies ReportEntityWithTicketsQuery;\n\nexport const EmptyReportV2SaleQuery = {\n ...EmptyReportEntityWithTicketsQuery,\n isNoFulfill: null,\n saleDates: null,\n saleStatuses: null,\n soldOnMarketplace: null,\n cancellationDates: null,\n fulfillerSellerUserId: null,\n fulfillmentDates: null,\n paymentDates: null,\n marketplacePaymentState: null,\n viewMode: null,\n isSortDescending: null,\n} satisfies UIReportV2SaleQuery;\n\nexport const DefaultReportV2SaleQuery = {\n ...EmptyReportV2SaleQuery,\n eventTimeFrameFilter: EventTimeFrameFilter.Future,\n isSortDescending: true,\n} satisfies UIReportV2SaleQuery;\n\nexport const EmptyReportV2ListingQuery = {\n ...EmptyReportEntityWithTicketsQuery,\n isPredelivered: null,\n isNoFulfill: null,\n lastPriceUpdateDates: null,\n isPricedByMarketplace: null,\n isAutoPricingEnabled: null,\n isListed: null,\n isMapped: null,\n isDuplicate: null,\n isSeatingUnmapped: null,\n isAdminHold: null,\n viewMode: null,\n isSortDescending: null,\n} satisfies UIReportV2ListingQuery;\n\nexport const DefaultReportV2ListingQuery = {\n ...EmptyReportV2ListingQuery,\n eventTimeFrameFilter: EventTimeFrameFilter.Future,\n isSortDescending: true,\n} satisfies UIReportV2ListingQuery;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype FilterQueryType = Record;\n\nexport enum EventUiSort {\n DateDesc = 'Sort By: Newest to Oldest',\n DateAsc = 'Sort By: Oldest to Newest',\n SortAtoZ = 'Sort By: A to Z',\n SortZtoA = 'Sort By: Z to A',\n}\n\nexport const getEventUiSort = (\n sortBy: EventSort | null,\n isSortDescending: boolean | null\n) => {\n switch (sortBy) {\n case EventSort.MainDisplay:\n return isSortDescending ? EventUiSort.SortZtoA : EventUiSort.SortAtoZ;\n case EventSort.Date:\n default:\n return isSortDescending ? EventUiSort.DateDesc : EventUiSort.DateAsc;\n }\n};\n\nexport const getEventSort = (\n sort: EventUiSort | null\n): [EventSort, boolean] => {\n switch (sort) {\n case EventUiSort.SortAtoZ:\n return [EventSort.MainDisplay, false];\n case EventUiSort.SortZtoA:\n return [EventSort.MainDisplay, true];\n case EventUiSort.DateAsc:\n return [EventSort.Date, false];\n case EventUiSort.DateDesc:\n default:\n return [EventSort.Date, true];\n }\n};\n\nexport const getAppliedFilterCounts = (\n currentFilter: FilterQueryType,\n initialFilter: FilterQueryType,\n ignoreKeys: string[] = []\n) => {\n const initKeys = Object.keys(initialFilter);\n\n let count = 0;\n for (let i = 0; i < initKeys.length; i++) {\n if (ignoreKeys.includes(initKeys[i])) {\n continue;\n }\n const initValue = initialFilter[initKeys[i]];\n const curValue = currentFilter[initKeys[i]];\n if (!isEqual(curValue, initValue) && initValue !== undefined) {\n count++;\n }\n }\n\n return count;\n};\n\nconst isFilterApplied = (\n currentValue: unknown,\n initialValue: unknown\n): boolean => {\n // No need to differentiate between null and undefined\n if (currentValue == null && initialValue == null) {\n return false;\n }\n return !isEqual(currentValue, initialValue);\n};\n\n/**\n * Returns the filters that match with:\n * * not undefined (null is a valid value)\n * * not in initial/default query\n * * values is different from initial/default query\n * * not in ignored Ids list\n * @param currentFilterQuery\n * @param initialFilterQuery\n * @param ignoreFilterIds Not shown in the UI\n * @param filtersGroups\n */\nexport const getAppliedFilters = (\n currentFilterQuery: FilterQueryType,\n initialFilterQuery: FilterQueryType,\n ignoreFilterIds: string[] = [],\n filtersGroups: FilterToolbarGroup[]\n): FilterToolbarItemId[] => {\n // Sometimes, initialQuery has only default values, not the full query,\n // and the current query has more keys, so merge all together to make\n // the comparisons\n const initialKeys = [\n ...new Set([\n ...Object.keys(initialFilterQuery),\n ...Object.keys(currentFilterQuery),\n ]),\n ];\n\n const filtersMap: Partial> =\n {};\n\n filtersGroups.forEach((filterGroup) => {\n filterGroup.items.forEach((filterItem) => {\n filtersMap[filterItem.filterId] = filterItem;\n });\n });\n\n const appliedFilters = new Set();\n for (let i = 0; i < initialKeys.length; i++) {\n if (ignoreFilterIds.includes(initialKeys[i])) {\n continue;\n }\n const filterId = initialKeys[i] as FilterToolbarItemId;\n\n // Some filters rely on more than one key of the filterQuery, so check if\n // the declared keys in the filter are used.\n const filterKeys = filtersMap[filterId]?.filterQueryKeys ?? [];\n const someApplied = filterKeys.some((fId) => {\n const initialValue = initialFilterQuery[fId];\n const currentValue = currentFilterQuery[fId];\n return isFilterApplied(currentValue, initialValue);\n });\n if (someApplied) {\n appliedFilters.add(filterId);\n }\n }\n\n return [...appliedFilters] as FilterToolbarItemId[];\n};\n\nexport const MainFilterQueryParam = 'mainFilter';\n\nconst removeEntityIdsIfHasSearchId = (copy: FilterQueryType) => {\n const entityQuery = copy as EntityWithTicketsQuery;\n if (entityQuery.searchConfigId) {\n // If we have the search id, then we clear-out everything since only the search config id matter\n return {\n ...entityQuery,\n entityIds: null,\n } as EntityWithTicketsQuery;\n }\n\n return copy;\n};\n\nexport const deleteDefaultFields = (\n baseQuery: FilterQueryType,\n query: FilterQueryType | null,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n queryValueTransformToUrl?: (key: FilterToolbarItemId, value: any) => any\n) => {\n if (!query) {\n return null;\n }\n\n let copy = Object.entries(baseQuery).reduce((result, baseEntry) => {\n const curValue = query[baseEntry[0]];\n if (!isEqual(baseEntry[1], curValue)) {\n result[baseEntry[0]] = queryValueTransformToUrl\n ? queryValueTransformToUrl(\n baseEntry[0] as FilterToolbarItemId,\n curValue\n )\n : curValue;\n }\n\n return result;\n }, {} as FilterQueryType);\n\n copy = removeEntityIdsIfHasSearchId(copy);\n\n return copy;\n};\n\nexport const queryValueTransformFromUrlBase = (\n key: string,\n value: string | object\n) => {\n if (!value) {\n return value;\n }\n\n if (typeof value === 'object') {\n const obj = value as DateTimeRangeWithRelative;\n if (obj.relativeEndSecs || obj.relativeStartSecs) {\n return { ...obj, roundingMode: obj.roundingMode };\n }\n }\n\n return value;\n};\n\nexport const mapToBaseQuery = (\n baseQuery: TQuery,\n query: TQuery | null,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n queryValueTransformFromUrl?: (key: string, value: any) => any\n) => {\n if (!query) {\n return null;\n }\n\n let copy = Object.entries(baseQuery).reduce((result, baseEntry) => {\n const filterId = baseEntry[0];\n const queryValue = query?.[filterId];\n result[filterId] = queryValueTransformFromUrlBase(\n filterId,\n queryValue === undefined\n ? baseEntry[1] // Only use baseEntry's value if the queryValue is undefined (null is a valid value)\n : queryValueTransformFromUrl\n ? queryValueTransformFromUrl(filterId, queryValue)\n : queryValue\n );\n return result;\n }, {} as FilterQueryType);\n\n copy = removeEntityIdsIfHasSearchId(copy);\n\n return copy as TQuery;\n};\n\nexport const isQueryEqual = (\n baseQuery: TQuery,\n query1: TQuery | null,\n query2: TQuery | null\n) => {\n const baseKeys = Object.keys(baseQuery);\n\n for (const i in baseKeys) {\n const v1 = query1?.[baseKeys[i]];\n const v2 = query2?.[baseKeys[i]];\n\n if (!isEqual(v1, v2)) {\n return false;\n }\n }\n\n return true;\n};\nexport const getQueryFromUrl = (\n baseQuery: TQuery,\n urlSearchString: string,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n queryValueTransformFromUrl?: (key: string, value: any) => any\n): TQuery | null => {\n if (urlSearchString) {\n const searchParams = new URLSearchParams(urlSearchString);\n const filterQueryParam = searchParams.get(MainFilterQueryParam);\n if (filterQueryParam) {\n try {\n const obj = JSON.parse(filterQueryParam);\n if (obj) {\n return mapToBaseQuery(baseQuery, obj, queryValueTransformFromUrl);\n }\n } catch (e) {\n console.warn(`Unable to parse as a filter obj: ${filterQueryParam}`);\n return null;\n }\n }\n }\n\n return baseQuery;\n};\n\nexport const getUrlFilterQueryParam = (\n baseQuery: TQuery,\n query: TQuery | null,\n baseSearchParams?: URLSearchParams,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n queryValueTransformToUrl?: (key: FilterToolbarItemId, value: any) => any\n) => {\n const searchParams = baseSearchParams || new URLSearchParams();\n searchParams.set(\n MainFilterQueryParam,\n JSON.stringify(\n deleteDefaultFields(baseQuery, query, queryValueTransformToUrl)\n )\n );\n\n return `?${searchParams}`;\n};\n\nexport const isFilterQueryParamEmpty = (searchParams?: string): boolean => {\n if (!searchParams) {\n return true;\n }\n try {\n const urlSearchParams = new URLSearchParams(searchParams);\n const mainFilters = urlSearchParams.get(MainFilterQueryParam);\n return !mainFilters || mainFilters === '{}';\n } catch (e) {\n return false;\n }\n};\n\nexport const removeFilters = (\n urlSearchParams: string | undefined,\n filtersKeyToRemove: (keyof TQuery)[]\n): string => {\n if (!urlSearchParams || isFilterQueryParamEmpty(urlSearchParams)) {\n return urlSearchParams ?? '';\n }\n\n try {\n const searchFilterParams = new URLSearchParams(urlSearchParams);\n const mainFilter = searchFilterParams.get(MainFilterQueryParam)!;\n const filters = JSON.parse(mainFilter) as TQuery;\n filtersKeyToRemove.forEach((filterKey) => {\n delete filters[filterKey];\n });\n\n searchFilterParams.set(MainFilterQueryParam, JSON.stringify(filters));\n return searchFilterParams.toString();\n } catch (e) {\n return urlSearchParams ?? '';\n }\n};\n\nexport const getLastNDaysSaleQuery = (days: number): SaleQuery => {\n const today = new Date();\n const lastNDays = new Date();\n lastNDays.setDate(today.getDate() - days);\n return {\n ...DefaultSaleQuery,\n eventTimeFrameFilter: null, // all\n // cap the event time filter to filter with N look-back instead of all - which is perf hit\n eventDates: {\n start: lastNDays.toISOString(),\n end: null,\n } as DateTimeRangeWithRelative,\n saleDates: {\n start: lastNDays.toISOString(),\n end: today.toISOString(),\n } as DateTimeRangeWithRelative,\n };\n};\n\nexport const getPurchaseOrderIdSaleQuery = (\n purchaseOrderId: number\n): SaleQuery => {\n return {\n ...DefaultSaleQuery,\n purchaseOrderId,\n eventTimeFrameFilter: null, // we want all\n };\n};\n\nexport const getPurchaseOrderIdListingQuery = (\n purchaseOrderId: number\n): ListingQuery => {\n return {\n ...DefaultListingQuery,\n purchaseOrderId,\n eventTimeFrameFilter: null, // we want all\n };\n};\n\nexport const getSaleStatusesSaleQuery = (\n saleStatuses: PointOfSaleSaleStatus[]\n): SaleQuery => {\n return {\n ...DefaultSaleQuery,\n saleStatuses,\n };\n};\n\nexport enum YesNoEnum {\n Yes = 'Yes',\n No = 'No',\n}\n\nexport enum LastReviewedSinceDate {\n LastThreeDays = 'Last 3 Days',\n LastSevenDays = 'Last 7 Days',\n LastTwoWeeks = 'Last 2 weeks',\n LastThirtyDays = 'Last 30 Days',\n}\n\nexport enum TextFilterEnum {\n Contains = 'Contains',\n Equals = 'Equals',\n NotContains = 'NotContains',\n}\n\nexport const ToEventMappingStateFilter = (\n isMapped: boolean | null | undefined,\n isMappingRejected: boolean | null | undefined\n) => {\n if (isMapped == null) {\n return EventMappingStateFilter.All;\n }\n if (isMapped === true) {\n return EventMappingStateFilter.Mapped;\n }\n\n // isMapped === false\n return isMappingRejected === true\n ? EventMappingStateFilter.Rejected\n : EventMappingStateFilter.Pending;\n};\n\nexport const FromEventMappingStateFilter = (\n eventMappingStateFilter: EventMappingStateFilter\n): [boolean | null, boolean | null] => {\n // [isMapped, isMappingRejected]\n switch (eventMappingStateFilter) {\n case EventMappingStateFilter.All:\n return [null, null];\n case EventMappingStateFilter.Mapped:\n return [true, null];\n case EventMappingStateFilter.Pending:\n return [false, false];\n case EventMappingStateFilter.Rejected:\n return [false, true];\n }\n};\n\nexport const ToYesNoEnum = (value: boolean | null | undefined) => {\n return value == null ? null : value ? YesNoEnum.Yes : YesNoEnum.No;\n};\n\nexport const FromYesNoEnum = (yesNoEnumValue: YesNoEnum | null) => {\n return yesNoEnumValue === YesNoEnum.Yes\n ? true\n : yesNoEnumValue === YesNoEnum.No\n ? false\n : null;\n};\n\n/**\n * Filters the `catalogResults` using the given date range.\n *\n * This mutates the original `catalogResults`.\n * @param catalogResults\n * @param dateRangeStrings\n * @returns\n */\nexport function filterCatalogResultsByEventDate(\n catalogResults: CatalogResults,\n dateRangeStrings: DateTimeRange\n) {\n const dateRange = {\n start: dateRangeStrings?.start ? new Date(dateRangeStrings.start) : null,\n end: dateRangeStrings?.end ? new Date(dateRangeStrings.end) : null,\n };\n\n const filteredEvents: { [key: string]: EventWithData } = {};\n for (const id in catalogResults.events) {\n const { event } = catalogResults.events[id];\n if (event.dates.start != null) {\n const eventDate = new Date(event.dates.start);\n if (\n (dateRange.start == null || eventDate >= dateRange.start) &&\n (dateRange.end == null || eventDate <= dateRange.end)\n ) {\n filteredEvents[id] = catalogResults.events[id];\n }\n }\n }\n catalogResults.events = filteredEvents;\n return catalogResults;\n}\n\nexport const isFilterUnchanged = <\n T extends ListingQuery | SaleQuery | PurchaseOrderQuery,\n>(\n query: T,\n emptyQuery: T\n) => {\n const {\n entityIds,\n performerIds,\n venueIds,\n searchText,\n sortBy,\n isSortDescending,\n searchConfigId,\n viewMode,\n ...rest1\n } = query;\n\n const {\n entityIds: x1,\n performerIds: x2,\n venueIds: x3,\n searchText: x4,\n sortBy: x5,\n isSortDescending: x6,\n searchConfigId: x7,\n viewMode: x8,\n ...rest2\n } = emptyQuery;\n\n return Object.entries(rest1).length === 0 || isEqual(rest1, rest2);\n};\n","import type { Location } from '@remix-run/router';\nimport { isEqual, once } from 'lodash-es';\nimport React, {\n PropsWithChildren,\n useCallback,\n useContext,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport { useLocation, useSearchParams } from 'react-router-dom';\nimport { FilterToolbarItemId } from 'src/components/Filters';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport {\n getQueryFromUrl,\n getUrlFilterQueryParam,\n isFilterQueryParamEmpty,\n MainFilterQueryParam,\n QueryWithViewMode,\n VIEW_MODE_SETTING_ID_TO_DEFAULT,\n} from 'src/utils/eventQueryUtils';\nimport { UserSetting } from 'src/WebApiController';\n\nimport { useSiteTimezoneContext } from '../SiteTimezoneContext/SiteTimezoneContext';\n\nexport type IFilterQueryContext = {\n initialQuery: TQuery;\n filterQuery: TQuery;\n emptyQuery: TQuery;\n tempQuery: TQuery;\n setFilterQuery: (newQuery: TQuery) => void;\n setTempQuery: (newQuery: TQuery) => void;\n resetTempQuery: () => void;\n isQueryInitialized: boolean;\n};\n\ninterface ConstState {\n initialQuery: TQuery;\n filterQuery: TQuery;\n queryFromUrl: TQuery;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n queryValueTransformToUrl?: (key: FilterToolbarItemId, value: any) => any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n queryValueTransformFromUrl?: (key: string, value: any) => any;\n searchParams: URLSearchParams;\n saveQueryInUrl: boolean;\n readQueryFromUrl: boolean;\n handleFilterChange: (query: TQuery) => void;\n location: Location;\n}\n\nexport const createFilterQueryContext = once(<\n TQuery extends QueryWithViewMode,\n>() => React.createContext({} as IFilterQueryContext));\n\nexport function useFilterQueryContext() {\n return useContext(createFilterQueryContext());\n}\n\nexport function FilterQueryContextProvider({\n initialQuery,\n emptyQuery,\n saveQueryInUrl = false,\n loadQueryFromUrl = true,\n viewModeSettingId,\n queryValueTransformToUrl,\n queryValueTransformFromUrl,\n children,\n}: PropsWithChildren<{\n initialQuery: TQuery;\n emptyQuery: TQuery;\n saveQueryInUrl?: boolean;\n loadQueryFromUrl?: boolean;\n viewModeSettingId?:\n | UserSetting.InventoryPageViewMode\n | UserSetting.SalePageViewMode\n | UserSetting.PurchasePageViewMode;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n queryValueTransformToUrl?: (key: FilterToolbarItemId, value: any) => any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n queryValueTransformFromUrl?: (key: string, value: any) => any;\n}>) {\n const FilterQueryContext = createFilterQueryContext();\n\n const location = useLocation();\n const [searchParams, setSearchParams] = useSearchParams();\n\n const [isQueryInitialized, setIsQueryInitialized] = useState(false);\n\n const [readQueryFromUrl, setReadQueryFromUrl] =\n useState(loadQueryFromUrl);\n\n /**\n * This is used to not generate a new query from the url every time filterQuery changes.\n */\n const [queryFromUrl, setQueryFromUrl] = useState(initialQuery);\n\n // Source of truth query\n const [filterQuery, setFilterQuery] = useState(initialQuery);\n\n // Used in filters\n const [tempQuery, setTempQuery] = useState(initialQuery);\n\n const handleFilterChange = useCallback((f: TQuery) => {\n setFilterQuery(f);\n }, []);\n\n const constState: ConstState = {\n initialQuery,\n filterQuery,\n queryFromUrl,\n queryValueTransformToUrl,\n queryValueTransformFromUrl,\n searchParams,\n saveQueryInUrl,\n handleFilterChange,\n readQueryFromUrl,\n location,\n };\n const refConstState = useRef>(constState);\n refConstState.current = constState;\n\n // Effect when location changes => update filterQuery\n useEffect(() => {\n const {\n handleFilterChange,\n readQueryFromUrl,\n initialQuery,\n queryFromUrl,\n queryValueTransformFromUrl,\n } = refConstState.current;\n\n // if !loadQueryFromUrl then skip first render effect\n if (!readQueryFromUrl) {\n setReadQueryFromUrl(true);\n setIsQueryInitialized(true);\n return;\n }\n\n const tempQueryFromUrl = getQueryFromUrl(\n initialQuery,\n searchParams.toString(),\n queryValueTransformFromUrl\n );\n\n if (!tempQueryFromUrl) {\n setIsQueryInitialized(true);\n return;\n }\n\n if (isEqual(tempQueryFromUrl, queryFromUrl)) {\n setIsQueryInitialized(true);\n return;\n }\n\n setQueryFromUrl(tempQueryFromUrl);\n handleFilterChange(tempQueryFromUrl);\n setIsQueryInitialized(true);\n // Don't add any other deps than searchParams.\n // This needs to run only when search params changes\n }, [searchParams]);\n\n // filterQuery Change => Set in URL\n useEffect(() => {\n const {\n filterQuery,\n queryFromUrl,\n initialQuery,\n searchParams,\n queryValueTransformToUrl,\n saveQueryInUrl,\n } = refConstState.current;\n\n if (!queryFromUrl || !filterQuery || !initialQuery) {\n return;\n }\n\n if (isEqual(filterQuery, queryFromUrl)) {\n return;\n }\n\n if (saveQueryInUrl) {\n const searchQuery = getUrlFilterQueryParam(\n initialQuery,\n filterQuery,\n searchParams,\n queryValueTransformToUrl\n );\n const queryParamsToSet = new URLSearchParams(searchParams);\n if (isFilterQueryParamEmpty(searchQuery)) {\n queryParamsToSet.delete(MainFilterQueryParam);\n }\n setSearchParams(queryParamsToSet, {\n state: refConstState.current.location.state, // keep state as it is\n });\n setQueryFromUrl(filterQuery);\n }\n // DO NOT add more deps here.\n // This effect must run only when the filterQuery changes\n }, [filterQuery]); // eslint-disable-line react-hooks/exhaustive-deps\n\n const {\n value: defaultViewModeUserSetting = viewModeSettingId\n ? VIEW_MODE_SETTING_ID_TO_DEFAULT[viewModeSettingId]\n : undefined,\n isLoading: isViewModeSettingLoading,\n } = useServerUserSetting({\n id: viewModeSettingId,\n currentLoginUserOnly: true,\n });\n\n const { timezoneOffsetMins: timezoneOffsetMinsAccount } =\n useSiteTimezoneContext();\n\n useEffect(() => {\n if (\n isQueryInitialized &&\n ((defaultViewModeUserSetting &&\n defaultViewModeUserSetting !== filterQuery?.viewMode) ||\n (timezoneOffsetMinsAccount != null &&\n timezoneOffsetMinsAccount !== filterQuery?.timezoneOffsetMins))\n ) {\n setFilterQuery((prev) => ({\n ...prev,\n viewMode: defaultViewModeUserSetting,\n timezoneOffsetMins: timezoneOffsetMinsAccount,\n }));\n // We need to update initialQuery, otherwise the quick filter \"All\"\n // may change the current fields\n initialQuery.viewMode = defaultViewModeUserSetting;\n initialQuery.timezoneOffsetMins = timezoneOffsetMinsAccount;\n emptyQuery.timezoneOffsetMins = timezoneOffsetMinsAccount;\n }\n // Only want to run this use-effect when the user settings changed\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n defaultViewModeUserSetting,\n isQueryInitialized,\n timezoneOffsetMinsAccount,\n ]);\n\n const resetTempQuery = useCallback(\n (queryKeys?: (keyof TQuery)[]) => {\n if (queryKeys) {\n const newTempQuery = { ...tempQuery };\n queryKeys.forEach((key) => (newTempQuery[key] = emptyQuery[key]));\n setTempQuery(newTempQuery);\n } else {\n setTempQuery(filterQuery);\n }\n },\n [emptyQuery, filterQuery, tempQuery]\n );\n\n return (\n \n {children}\n \n );\n}\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport const SuggestionsContainer = styled.div`\n display: block;\n`;\n\nexport const SuggestionsHeading = styled.header`\n color: ${(props) => props.theme.colors.textPrimary};\n padding-bottom: ${() => vars.spacing.xxs};\n ${({\n theme: {\n typography: { getStyles },\n },\n }) => getStyles('caption1')};\n`;\nexport const SuggestionContainer = styled.div`\n padding: ${() => `${vars.spacing.sm} ${vars.spacing.lg}`};\n margin: ${() => `0 -${vars.spacing.lg}`};\n :hover {\n background-color: ${(props) => props.theme.colors.backgroundBrandLight};\n }\n`;\n\nexport const Suggestion = styled.button`\n text-align: left;\n text-transform: capitalize;\n padding: 0;\n border: none;\n background: none;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n ${({\n theme: {\n typography: { getStyles },\n },\n }) => getStyles('body1')};\n`;\n","import clsx from 'clsx';\nimport { useMemo } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useSiteTimezoneContext } from 'src/contexts/SiteTimezoneContext/SiteTimezoneContext';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n DateRangePreset,\n DateRangePresetName,\n formatDateRange,\n getDateRangePresets,\n getPresetFromUiDateTimeRange,\n} from 'src/utils/dateTimeUtils';\nimport { DateTimeRange } from 'src/WebApiController';\n\nimport * as styles from './DateRangePresets.css';\nimport {\n Suggestion,\n SuggestionContainer,\n SuggestionsContainer,\n SuggestionsHeading,\n} from './DateRangePresets.styled';\n\nexport type DateRange = {\n from: Date;\n to: Date;\n};\n\nexport type DateRangePresetsProp = {\n presetNames: DateRangePresetName[];\n selectedDateRange?: DateTimeRange | null;\n onClick: (dateRange: DateRange) => void;\n disabled?: boolean;\n /**\n * If true, the site's timezone will be applied to the date being displayed.\n * the underlying date value (value, data, onDateChange) will not be changed.\n */\n useSiteTimeZone?: boolean;\n hideSuggestionTitle?: boolean;\n};\n\nexport function DateRangePresets({\n selectedDateRange,\n presetNames,\n onClick,\n disabled,\n useSiteTimeZone = true,\n hideSuggestionTitle,\n}: DateRangePresetsProp) {\n const { toZonedTime, fromZonedTime } = useSiteTimezoneContext();\n\n const handleClick = (preset: DateRangePreset) => {\n const dateRange = {\n from: useSiteTimeZone\n ? fromZonedTime(preset.range.start)\n : preset.range.start,\n to: useSiteTimeZone ? fromZonedTime(preset.range.end) : preset.range.end,\n };\n onClick(dateRange);\n };\n\n const presets = useMemo(() => {\n let now = new Date();\n if (useSiteTimeZone) {\n now = toZonedTime(now);\n }\n const presets = getDateRangePresets(presetNames, now);\n\n return presets;\n }, [useSiteTimeZone, presetNames, toZonedTime]);\n\n const presetName = getPresetFromUiDateTimeRange(\n selectedDateRange,\n useSiteTimeZone ? toZonedTime : undefined\n )?.name;\n\n return (\n \n {!hideSuggestionTitle && (\n \n \n \n )}\n {presets.map((preset, index) => (\n handleClick(preset)}>\n \n {preset.label}{' '}\n ({formatDateRange(preset.range)})\n \n \n ))}\n \n );\n}\n","import clsx from 'clsx';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n DateRangePresetName,\n DateRangeRelativePreset,\n formatRelativeDateRange,\n getDateRangeRelativePresets,\n getRelativePresetFromUiDateTimeRange,\n} from 'src/utils/dateTimeUtils';\nimport { DateTimeRangeWithRelative } from 'src/WebApiController';\n\nimport * as styles from './DateRangePresets.css';\nimport {\n Suggestion,\n SuggestionContainer,\n SuggestionsContainer,\n SuggestionsHeading,\n} from './DateRangePresets.styled';\n\nexport type DateRangeRelativePresetsProp = {\n presetNames: DateRangePresetName[];\n selectedDateRange?: DateTimeRangeWithRelative | null;\n onClick: (dateRange: DateTimeRangeWithRelative) => void;\n disabled?: boolean;\n hideSuggestionTitle?: boolean;\n};\n\nexport function DateRangeRelativePresets({\n selectedDateRange,\n presetNames,\n onClick,\n disabled,\n hideSuggestionTitle,\n}: DateRangeRelativePresetsProp) {\n const handleClick = (preset: DateRangeRelativePreset) => {\n onClick(preset.range);\n };\n\n const presets = getDateRangeRelativePresets(presetNames);\n const presetName =\n getRelativePresetFromUiDateTimeRange(selectedDateRange)?.name;\n return (\n \n {!hideSuggestionTitle && (\n \n \n \n )}\n {presets.map((preset, index) => (\n handleClick(preset)}>\n \n {preset.label}{' '}\n ({formatRelativeDateRange(preset.range)})\n \n \n ))}\n \n );\n}\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport const DateRangeTriggerContent = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n text-transform: capitalize;\n width: 100%;\n\n > *:first-child {\n padding-right: ${() => vars.spacing.lg};\n }\n > *:last-child {\n padding-right: 0;\n }\n`;\n\nexport const DateRangeTrigger = styled.button<{\n isActive: boolean;\n}>`\n ${({\n theme: {\n typography: { getStyles },\n },\n }) => getStyles('body1')};\n background-color: ${vars.color.backgroundPrimaryActive};\n color: ${(props) =>\n props.isActive\n ? props.theme.colors.textStrong\n : props.theme.colors.textPrimary};\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: ${() => `${vars.spacing.xs} ${vars.spacing.lg}`};\n width: 100%;\n white-space: nowrap;\n border-radius: ${() => vars.spacing.xxs};\n border: 1px solid ${(props) => props.theme.colors.borderDark};\n z-index: 3;\n cursor: pointer;\n outline: none;\n transition: border 0.2s;\n\n &:hover:not([disabled]) {\n border-color: ${(props) => props.theme.colors.borderActive};\n }\n`;\n\nexport const IconContainer = styled.div`\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n border-right: 1px solid ${(props) => props.theme.colors.borderActive};\n margin-right: ${() => vars.spacing.sm};\n padding-right: ${() => vars.spacing.sm};\n\n svg {\n height: 18px;\n cursor: pointer;\n }\n\n svg > path {\n fill: ${(props) => props.theme.colors.textBrand};\n }\n`;\n\nexport const DateRangeInputContainer = styled.div`\n display: grid;\n grid-template-columns: 1fr 1fr;\n grid-gap: ${() => vars.spacing.sm};\n padding-top: ${() => vars.spacing.xl};\n border-top: 1px solid ${(props) => props.theme.colors.borderPrimary};\n`;\n\nexport const DateInputLabel = styled.label`\n display: flex;\n flex-direction: column;\n height: ${() => `${vars.spacing['5xl']}`};\n padding: ${() =>\n `${vars.spacing.xxs} ${vars.spacing.lg} ${vars.spacing.m} ${vars.spacing.lg}`};\n width: 140px;\n ${({\n theme: {\n typography: { getStyles },\n },\n }) => getStyles('caption2')};\n color: ${(props) => props.theme.colors.textPrimary};\n border: 1px solid ${(props) => props.theme.colors.borderPrimary};\n border-radius: ${() => vars.spacing.xxs};\n background-color: ${(props) => props.theme.colors.backgroundSecondary};\n\n &:focus-within {\n border-color: ${(props) => props.theme.colors.borderActive};\n box-shadow: ${(props) => props.theme.shadow(2, 'b')};\n background-color: ${(props) => props.theme.colors.white};\n }\n`;\n\nexport const DateInput = styled.input`\n border: none;\n outline: none;\n ${({\n theme: {\n typography: { getStyles },\n },\n }) => getStyles('body2')};\n color: ${(props) => props.theme.colors.textStrong};\n background-color: transparent;\n`;\n\nexport const CustomDateRangeButton = styled.button`\n display: inline-flex;\n align-items: center;\n gap: ${() => vars.spacing.sm};\n padding: ${() => `${vars.spacing.sm} ${vars.spacing.lg}`};\n margin: ${() =>\n `${vars.spacing.sm} -${vars.spacing.lg} -${vars.spacing.lg} -${vars.spacing.lg}`};\n width: calc(100% + 32px);\n font-weight: 500;\n text-align: left;\n :hover {\n background-color: ${(props) => props.theme.colors.backgroundBrandLight};\n }\n border: none;\n background: none;\n ${({\n theme: {\n typography: { getStyles },\n },\n }) => getStyles('body1')};\n`;\n\nexport const DateErrorContainer = styled.ul`\n display: block;\n width: 100%;\n margin-left: 0;\n padding-left: 0;\n list-style-type: none;\n ${({\n theme: {\n typography: { getStyles },\n },\n }) => getStyles('caption2')};\n color: ${(props) =>\n props.color /* partner */ ?? props.theme.colors.textNegative};\n`;\n\nexport const DateRangePickerContainer = styled.div`\n ${({\n theme: {\n typography: { getStyles },\n },\n }) => getStyles('body1')};\n padding: ${() => vars.spacing.lg};\n width: 100%;\n`;\n","import 'react-date-range/dist/styles.css'; // main css file\nimport 'react-date-range/dist/theme/default.css'; // theme css file\n\nimport clsx from 'clsx';\nimport endOfDay from 'date-fns/endOfDay';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport {\n DateRange as ReactDateRange,\n DateRangePickerProps,\n} from 'react-date-range';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useSiteTimezoneContext } from 'src/contexts/SiteTimezoneContext/SiteTimezoneContext';\nimport { vars } from 'src/core/themes';\nimport { DividerLine, Popover } from 'src/core/ui';\nimport { CalendarIcon, CrossIcon, ExpandIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n formatDate,\n tryGetDateRangePresetSuggestionText,\n tryGetDateRangeRelativePresetSuggestionText,\n validateDate,\n} from 'src/utils/dateTimeUtils';\nimport { getLocaleFromLanguageOrCurrent } from 'src/utils/localeUtils';\nimport { DateTimeRange, DateTimeRangeWithRelative } from 'src/WebApiController';\n\nimport {\n DateRange,\n DateRangePresets,\n DateRangePresetsProp,\n} from './DateRangePresets/DateRangePresets';\nimport { DateRangeRelativePresets } from './DateRangePresets/DateRangeRelativePresets';\nimport * as styles from './DateRangeSelector.css';\nimport {\n CustomDateRangeButton,\n DateErrorContainer,\n DateRangePickerContainer,\n DateRangeTrigger,\n DateRangeTriggerContent,\n IconContainer,\n} from './DateRangeSelector.styled';\n\nexport type DateRangeSelectorProps = Omit<\n DateRangePresetsProp,\n 'onClick' | 'selectedDateRange'\n> & {\n value?: DateTimeRangeWithRelative | DateTimeRange | null;\n defaultValue?: DateTimeRangeWithRelative | DateTimeRange | null;\n onChange?: (value: DateTimeRangeWithRelative | null) => void;\n onBlur?: (value: DateTimeRangeWithRelative | null) => void;\n useRelativePresets?: boolean;\n /**\n * If true, the site's timezone will be applied to the date being displayed.\n * the underlying date value (value, data, onDateChange) will not be changed.\n */\n useSiteTimeZone?: boolean;\n isEndDateFixed?: boolean; // New flag for controlling end date behavior\n displayTextStyle?: React.CSSProperties;\n} & Omit;\n\nexport function DateRangeSelector({\n value,\n startDatePlaceholder,\n endDatePlaceholder,\n className,\n dateDisplayFormat = 'MM/dd/yyyy',\n retainEndDateOnFirstSelection = true,\n rangeColors = [vars.color.backgroundHighlight],\n locale = getLocaleFromLanguageOrCurrent(),\n onChange,\n onBlur,\n disabled,\n useRelativePresets,\n useSiteTimeZone = true,\n onPreviewChange,\n isEndDateFixed = false,\n displayTextStyle,\n ...presetProps\n}: DateRangeSelectorProps) {\n const { toZonedTime, fromZonedTime } = useSiteTimezoneContext();\n const currentLocale = getLocaleFromLanguageOrCurrent();\n const [showDatePicker, setShowDatePicker] = useState(false);\n const [isOpen, setIsOpen] = useState(false);\n const [dateValue, setDateValue] = useState({\n start: formatDate(value?.start || '', currentLocale.code),\n end: formatDate(value?.end || '', currentLocale.code),\n });\n const [dateErrors, setDateErrors] = useState([]);\n\n const defaultDateRangeDisplayText = useContent(\n ContentId.DateRangeDisplayText\n );\n const defaultFromlabel = useContent(ContentId.FromDate);\n const defaultToLabel = useContent(ContentId.ToDate);\n const endDateBeforeStartDate = useContent(ContentId.EndDateBeforeStartDate);\n const invalidEndDate = useContent(ContentId.InvalidEndDate);\n const invalidStartDate = useContent(ContentId.InvalidStartDate);\n const dateErrorConfig = useMemo(\n () => ({\n endDateBeforeStartDate,\n invalidEndDate,\n invalidStartDate,\n }),\n [endDateBeforeStartDate, invalidEndDate, invalidStartDate]\n );\n\n const getFormattedDate = useCallback(\n (time: string | null | undefined) => {\n return useSiteTimeZone\n ? toZonedTime(time ? new Date(time) : new Date())\n : time\n ? new Date(time)\n : new Date();\n },\n [useSiteTimeZone, toZonedTime]\n );\n\n const onDateRangePickerChange = useCallback(\n (from: Date | undefined, to: Date | undefined) => {\n const newValue: DateTimeRangeWithRelative = value\n ? {\n relativeEndSecs: null,\n relativeStartSecs: null,\n roundingMode: null,\n ...value,\n }\n : {\n start: null,\n end: null,\n relativeStartSecs: null,\n relativeEndSecs: null,\n roundingMode: null,\n };\n\n if (from == null) {\n newValue.start = null;\n } else {\n newValue.start = from.toISOString();\n }\n if (to == null) {\n newValue.end = null;\n } else {\n newValue.end = to.toISOString();\n }\n newValue.relativeStartSecs = null;\n newValue.relativeEndSecs = null;\n\n onChange?.(newValue);\n onBlur?.(newValue);\n setDateValue({\n start: formatDate(newValue.start || '', currentLocale.code),\n end: formatDate(newValue.end || '', currentLocale.code),\n });\n },\n [value, onChange, onBlur, currentLocale.code]\n );\n\n const onClear = useCallback(() => {\n onDateRangePickerChange(undefined, undefined);\n }, [onDateRangePickerChange]);\n\n const onSuggestionClick = useCallback(\n (range: DateRange) => {\n onDateRangePickerChange(range.from, range.to);\n setIsOpen(false);\n },\n [onDateRangePickerChange]\n );\n\n const onSuggestionRelativeClick = useCallback(\n (range: DateTimeRangeWithRelative) => {\n onChange?.(range);\n onBlur?.(range);\n setDateValue({\n start: formatDate('', currentLocale.code),\n end: formatDate('', currentLocale.code),\n });\n setIsOpen(false);\n },\n [onChange, onBlur, currentLocale.code]\n );\n\n useEffect(() => {\n const dateErrors = validateDate(dateValue, currentLocale, dateErrorConfig);\n setDateErrors(dateErrors);\n }, [dateValue, dateErrorConfig, currentLocale]);\n\n const getDisplayText = useCallback(() => {\n const suggestionText = tryGetDateRangePresetSuggestionText(\n value,\n useSiteTimeZone ? toZonedTime : undefined,\n displayTextStyle\n );\n\n if (suggestionText) {\n return suggestionText;\n }\n\n const suggestionTextRelative = tryGetDateRangeRelativePresetSuggestionText(\n value as DateTimeRangeWithRelative | null | undefined\n );\n\n if (suggestionTextRelative) {\n return suggestionTextRelative;\n }\n\n const { end, start } = dateValue;\n if (value && start) {\n if (useSiteTimeZone && value.start && value.end) {\n const startZoned = formatDate(\n toZonedTime(new Date(value.start)).toISOString(),\n currentLocale.code\n );\n const endZoned = formatDate(\n toZonedTime(new Date(value.end)).toISOString(),\n currentLocale.code\n );\n\n return `${startZoned} - ${endZoned}`;\n }\n return `${start} - ${end}`;\n }\n\n return defaultDateRangeDisplayText;\n }, [\n currentLocale.code,\n dateValue,\n defaultDateRangeDisplayText,\n displayTextStyle,\n toZonedTime,\n useSiteTimeZone,\n value,\n ]);\n\n const highlightDropBox = !(\n value?.start == null &&\n value?.end == null &&\n (value as DateTimeRangeWithRelative)?.relativeEndSecs == null &&\n (value as DateTimeRangeWithRelative)?.relativeStartSecs == null\n );\n\n return (\n {\n setIsOpen(isOpen);\n if (!isOpen) {\n setShowDatePicker(false);\n }\n }}\n >\n \n \n \n
{getDisplayText()}
\n
\n {!disabled &&\n (!!dateValue.start ||\n (value as DateTimeRangeWithRelative)?.relativeEndSecs !=\n null ||\n (value as DateTimeRangeWithRelative)?.relativeStartSecs !=\n null) &&\n highlightDropBox && (\n \n \n \n )}\n \n
\n
\n
\n
\n \n \n {useRelativePresets ? (\n \n ) : (\n \n )}\n
\n \n
\n setShowDatePicker((val) => !val)}\n >\n
\n \n
{' '}\n \n \n {showDatePicker && (\n <>\n
\n \n {dateErrors.map((err) => (\n
  • {err}
  • \n ))}\n
    \n {\n const startDate =\n range.range.startDate && useSiteTimeZone\n ? fromZonedTime(range.range.startDate)\n : range.range.startDate;\n const rangeSelectorEndDate = range.range.endDate\n ? useSiteTimeZone\n ? fromZonedTime(endOfDay(range.range.endDate))\n : endOfDay(range.range.endDate)\n : undefined;\n\n const endDate = isEndDateFixed\n ? value?.end\n ? new Date(value.end)\n : new Date()\n : rangeSelectorEndDate;\n\n onDateRangePickerChange(startDate, endDate);\n }}\n rangeColors={rangeColors}\n locale={locale}\n />\n \n )}\n \n \n \n );\n}\n","import { ComponentPropsWithRef, useMemo } from 'react';\nimport {\n contentComparator,\n useContentContext,\n} from 'src/contexts/ContentContext';\nimport { PosSelect } from 'src/core/POS/PosSelect';\n\nexport type PosEnumSelectProps = {\n value?: EnumType | null;\n defaultValue?: EnumType | null;\n valueOptionsContent: Record;\n onChange: (option: EnumType | null) => void;\n} & Omit<\n ComponentPropsWithRef,\n 'value' | 'valueOptionsContent' | 'onChange' | 'defaultValue'\n>;\n\nexport function PosEnumSelect({\n value,\n defaultValue,\n onChange,\n valueOptionsContent,\n ...rest\n}: PosEnumSelectProps) {\n const contentContext = useContentContext();\n const s = useMemo(() => {\n return contentComparator.bind(undefined, contentContext);\n }, [contentContext]);\n\n return (\n {\n onChange(o as EnumType);\n }}\n valueOptionsContent={valueOptionsContent}\n {...rest}\n sortFn={s}\n />\n );\n}\n","import {\n ComponentProps,\n FocusEvent,\n forwardRef,\n ReactElement,\n ReactNode,\n useCallback,\n} from 'react';\nimport { FieldError, FieldErrorsImpl, Merge } from 'react-hook-form';\nimport { TextField } from 'src/core/ui';\n\nexport type PosTextFieldProps = ComponentProps & {\n trimOnBlur?: boolean;\n prefixDisplay?: ReactNode;\n postfixDisplay?: ReactNode;\n rootProps?: Omit, 'children'>;\n};\n\nexport const PosTextField = forwardRef(\n function PosTextField(\n {\n onBlur,\n onKeyUp,\n trimOnBlur,\n prefixDisplay,\n postfixDisplay,\n rootProps,\n ...props\n },\n ref\n ): ReactElement {\n const customOnBlur = useCallback(\n (params: FocusEvent) => {\n if (trimOnBlur) {\n params.target.value = params.target.value.trim();\n }\n if (onBlur) {\n onBlur(params);\n }\n },\n [trimOnBlur, onBlur]\n );\n\n return (\n \n {prefixDisplay}\n \n {postfixDisplay}\n \n );\n }\n);\n\nexport const getTextFieldState = (\n error?:\n | string\n | string[]\n | FieldError\n | FieldError[]\n | Merge\n): ComponentProps['state'] | undefined => {\n if (!error) return undefined;\n\n const isArray = Array.isArray(error);\n\n return (isArray ? error.length : error) ? 'error' : undefined;\n};\n","import { useRef } from 'react';\nimport { useDebounce } from 'react-use';\nimport * as styles from 'src/core/POS/PosSelect/PosSelect.css';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { CheckIcon, CrossIcon, IconsFill } from 'src/svgs/Viagogo';\n\ninterface InputSearchTestProps {\n searchPlaceholder: string;\n onChange: (value: string) => void;\n onSearchTextApplied: (value: string) => void;\n disabled: boolean;\n allowSearchAsInput: boolean;\n searchInput: string;\n}\n\nexport const SelectInputSearch = ({\n searchPlaceholder,\n onChange,\n onSearchTextApplied,\n searchInput,\n allowSearchAsInput,\n disabled,\n}: InputSearchTestProps) => {\n const refInput = useRef(null);\n\n useDebounce(\n () => {\n onChange(searchInput);\n setTimeout(() => refInput.current?.focus(), 10);\n },\n 200,\n [searchInput, onChange]\n );\n return (\n
    \n {\n refInput.current = input;\n setTimeout(() => refInput.current?.focus(), 0);\n }}\n value={searchInput}\n placeholder={searchPlaceholder}\n onChange={(e) => {\n e.stopPropagation();\n e.preventDefault();\n onChange(e.target.value);\n }}\n onTouchEnd={(e) => {\n // Note: This event is mobile only to explicitly trap focus on click\n // onClick won't work properly on mobile with Radix UI\n //\n // see more in `src\\core\\ui\\Select\\Select.tsx :: Select.Content`\n // and https://github.com/radix-ui/primitives/issues/1658\n e.currentTarget.focus();\n }}\n onKeyDown={(e) => {\n if (!disabled) {\n const key = e.key;\n if (key === 'Enter') {\n e.stopPropagation();\n\n // See if search-text matches any option, return it as a selection, else return searchText\n if (searchInput) {\n onSearchTextApplied(searchInput);\n }\n }\n }\n }}\n postfixDisplay={\n searchInput && (\n <>\n {allowSearchAsInput && (\n {\n // Note: This event is mobile only to explicitly handle event on click\n // onClick won't work properly on mobile with Radix UI\n //\n // see more in `src\\core\\ui\\Select\\Select.tsx :: Select.Content`\n // and https://github.com/radix-ui/primitives/issues/1658\n e.stopPropagation();\n e.preventDefault();\n onSearchTextApplied(searchInput);\n }}\n >\n {\n e.stopPropagation();\n e.preventDefault();\n onSearchTextApplied(searchInput);\n }}\n />\n
    \n )}\n {\n // Note: This event is mobile only to explicitly handle event on click\n // onClick won't work properly on mobile with Radix UI\n //\n // see more in `src\\core\\ui\\Select\\Select.tsx :: Select.Content`\n // and https://github.com/radix-ui/primitives/issues/1658\n e.stopPropagation();\n e.preventDefault();\n onChange('');\n }}\n >\n {\n e.stopPropagation();\n e.preventDefault();\n onChange('');\n }}\n />\n
    \n \n )\n }\n />\n \n );\n};\n","import { vars } from 'src/core/themes';\nimport styled, { keyframes } from 'styled-components/macro';\n\nexport const SpinnerWrapper = styled.div<{ centered?: boolean }>`\n display: flex;\n align-items: center;\n justify-content: center;\n width: ${(props) => (props.centered ? '100%' : undefined)};\n padding: ${(props) => (props.centered ? vars.spacing.lg : undefined)};\n`;\n\nexport const SpinnerContainer = styled.div<{ size?: string }>`\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n width: calc(4 * ${(props) => props.size});\n height: calc(4 * ${(props) => props.size});\n`;\n\nSpinnerContainer.defaultProps = { size: vars.iconSize.s };\n\nexport const SpinnerSVG = styled.svg`\n width: 60%;\n position: absolute;\n`;\n\nconst circleAnimation = keyframes`\n 0% {\n stroke-dasharray: 0%, 300%;\n }\n\n 100% {\n stroke-dasharray: 300%, 300%;\n }\n`;\n\nconst circleWrapperAnimation = keyframes`\n 0% {\n transform: rotate(0);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n`;\n\nexport const SpinnerCircleWrapper = styled.div`\n width: 100%;\n position: absolute;\n animation: ${circleWrapperAnimation} 0.6s linear infinite;\n`;\n\nexport const SpinnerCircleSVG = styled.svg`\n width: 100%;\n stroke-width: 2px;\n animation: ${circleAnimation} 1s linear infinite alternate;\n`;\n","import { useEffect, useState } from 'react';\n\nimport {\n SpinnerCircleSVG,\n SpinnerCircleWrapper,\n SpinnerContainer,\n SpinnerSVG,\n SpinnerWrapper,\n} from './PosSpinner.styled';\n\nenum SpinnerLogos {\n Sports,\n Concerts,\n Theatre,\n}\n\nexport function PosSpinner({\n size,\n centered = true,\n}: {\n size?: string;\n centered?: boolean;\n}) {\n const [counter, setCounter] = useState(0);\n\n useEffect(() => {\n const interval = setInterval(() => {\n setCounter((c) => c + 1);\n }, 2000);\n return () => clearInterval(interval);\n }, []);\n\n const stroke = colors[counter % colors.length];\n const currentShape = shapes[counter % shapes.length];\n\n return (\n \n \n \n {spinnerLogos[currentShape]}\n \n \n \n \n \n \n \n \n );\n}\n\nconst colors = ['#db2c7b', '#29b2b2', '#3f1375'];\nconst shapes = [\n SpinnerLogos.Sports,\n SpinnerLogos.Concerts,\n SpinnerLogos.Theatre,\n];\n\nconst spinnerLogos = {\n [SpinnerLogos.Concerts]: (\n \n ),\n [SpinnerLogos.Sports]: (\n \n ),\n [SpinnerLogos.Theatre]: (\n \n ),\n};\n","import Flexsearch from 'flexsearch';\nimport { debounce } from 'lodash-es';\nimport { useCallback, useEffect, useState } from 'react';\nimport {\n getContent,\n IContentContext,\n isContentId,\n useContentContext,\n} from 'src/contexts/ContentContext';\n\n/**\n * Building index for FlexSearch is expensive (5-10s for 1M entries), so we defer building index until the select expands\n *\n * If number of items is greater than this threshold, we will defer building index until the select expands (see onOpenChange)\n * to avoid blocking the UI. Otherwise we will build the index immediately (see useEffect hook).\n */\nconst DEFER_BUILD_INDEX_ITEMS_THRESHOLD = 100_000;\n\nconst REVERSE_TOKENIZE_ITEM_THRESHOLD = 100_000;\nconst FULL_TOKENIZE_ITEM_THRESHOLD = 10_000;\n\nconst buildFlexSearchIndex = (\n valueOptionsContent: Record,\n contentContext: IContentContext\n) => {\n const itemCount = Object.keys(valueOptionsContent).length;\n\n const index = new Flexsearch.Index({\n preset: 'performance',\n tokenize:\n itemCount < FULL_TOKENIZE_ITEM_THRESHOLD\n ? 'full'\n : itemCount < REVERSE_TOKENIZE_ITEM_THRESHOLD\n ? 'reverse'\n : 'forward',\n });\n\n Object.entries(valueOptionsContent).forEach(([key, val]) => {\n const value = isContentId(val) ? getContent(val, contentContext) : val;\n index.add(key, value);\n });\n return index;\n};\n\n/**\n *\n * @param valueOptionsContent\n * @param enabled\n * @param isOpen is true when the select is expanded (ready to use)\n */\nexport function useFlexSearchIndex(\n valueOptionsContent: Record,\n enabled?: boolean,\n isOpen?: boolean\n) {\n const contentContext = useContentContext();\n\n const [flexSearchIndex, setFlexSearchIndex] =\n useState(null);\n\n useEffect(() => {\n setFlexSearchIndex(null);\n // If the number of items is less than the threshold, build the index immediately\n if (\n Object.keys(valueOptionsContent).length <=\n DEFER_BUILD_INDEX_ITEMS_THRESHOLD ||\n isOpen\n ) {\n if (enabled) {\n const index = buildFlexSearchIndex(valueOptionsContent, contentContext);\n setFlexSearchIndex(index);\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [enabled, valueOptionsContent, contentContext]);\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const debouncedBuildSearchIndex = useCallback(\n debounce(() => {\n const index = buildFlexSearchIndex(valueOptionsContent, contentContext);\n setFlexSearchIndex(index);\n }, 300),\n [valueOptionsContent, contentContext]\n );\n\n useEffect(() => {\n // If the number of items is greater than the threshold, build the index when the select expands\n if (\n Object.keys(valueOptionsContent).length >\n DEFER_BUILD_INDEX_ITEMS_THRESHOLD\n ) {\n if (isOpen) {\n if (enabled && !flexSearchIndex) {\n debouncedBuildSearchIndex(); // debounce to avoid blocking the UI\n }\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isOpen, valueOptionsContent]);\n\n return {\n flexSearchIndex,\n };\n}\n","import { clsx } from 'clsx';\nimport { nanoid } from 'nanoid';\nimport {\n ComponentPropsWithoutRef,\n ComponentPropsWithRef,\n ReactNode,\n useCallback,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { Virtuoso } from 'react-virtuoso';\nimport {\n Content,\n getContent,\n useContent,\n useContentContext,\n} from 'src/contexts/ContentContext';\nimport { SelectInputSearch } from 'src/core/POS/PosSelect/SelectInputSearch';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { vars } from 'src/core/themes';\nimport { Select, Stack } from 'src/core/ui';\nimport { mergeProps } from 'src/core/utils';\nimport { useFlexSearchIndex } from 'src/hooks/useFlexSearchIndex';\nimport { CrossIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport * as styles from './PosSelect.css';\n\nconst EMPTY_CONTENT_DESIGNATOR = '____empty_content_____';\n\nexport type PosSelectProps = {\n value?: string;\n defaultValue?: string;\n placeholderText?: string | ContentId;\n displayText?: string | ContentId;\n enableEmptySelection?: boolean;\n hasErrors?: boolean;\n onChange: (value: string, searchText?: string) => void;\n prefixDisplay?: ReactNode;\n postfixDisplay?: ReactNode;\n showClearButton?: boolean;\n useVirtualWindow?: boolean;\n expectedItemSizeForVirtualWindow?: number;\n valueOptionsContent: Record;\n valueOptionsAlwaysShow?: Record;\n valueOptionsIcon?: Record;\n valueOptionsContentOverride?: Record;\n /* These are disabled and with reasoning why */\n valueOptionsDisabled?: Record<\n string,\n ContentId | string | boolean | undefined\n >;\n triggerContentClassName?: string;\n loading?: boolean;\n sortMode?: 'ascending' | 'descending' | 'none';\n sortFn?: (a: string, b: string) => number;\n sortBy?: 'key' | 'value';\n searchable?: boolean;\n /* this needs searchable to be true */\n allowSearchAsInput?: boolean;\n fetchNextPage?: () => void;\n hasNextPage?: boolean;\n isFetchingNextPage?: boolean;\n searchInput?: string;\n showFullWidth?: boolean;\n onSearchInputChange?: (searchText: string) => void;\n displayComponent?: (value: string) => ReactNode;\n rootProps?: Omit<\n ComponentPropsWithRef,\n 'defaultValue' | 'value' | 'children' | 'onValueChange'\n >;\n contentProps?: Omit<\n ComponentPropsWithRef,\n 'defaultValue' | 'children' | 'onChange'\n > & { 'data-testid'?: string };\n} & Omit<\n ComponentPropsWithRef,\n 'value' | 'defaultValue' | 'children' | 'onChange'\n>;\n\nexport const PosSelect = ({\n value,\n defaultValue,\n placeholderText,\n displayText,\n enableEmptySelection,\n prefixDisplay,\n postfixDisplay,\n hasErrors,\n rootProps,\n contentProps,\n triggerContentClassName,\n valueOptionsContent,\n useVirtualWindow,\n expectedItemSizeForVirtualWindow = 40,\n valueOptionsAlwaysShow,\n valueOptionsDisabled,\n valueOptionsIcon,\n valueOptionsContentOverride,\n onChange,\n showClearButton,\n loading,\n sortMode = 'ascending',\n sortFn,\n sortBy = 'value',\n searchable,\n allowSearchAsInput,\n disabled,\n fetchNextPage,\n hasNextPage,\n isFetchingNextPage,\n onSearchInputChange,\n showFullWidth,\n displayComponent,\n ...props\n}: PosSelectProps) => {\n const inputSearchRefKey = useRef(nanoid());\n const scrollerRef = useRef(null);\n const [searchText, setSearchText] = useState('');\n const [isOpen, setIsOpen] = useState(rootProps?.defaultOpen ?? false);\n\n const { flexSearchIndex } = useFlexSearchIndex(\n valueOptionsContent,\n searchable,\n isOpen\n );\n\n const isBuildingSearchIndex = searchable && !flexSearchIndex;\n\n const onOpenChange = useCallback(\n (open: boolean) => {\n setIsOpen(open);\n rootProps?.onOpenChange?.(open);\n },\n [rootProps]\n );\n\n placeholderText = placeholderText ?? ContentId.Select;\n const placeholderTextContent = useContent(placeholderText);\n\n const displayTextContent = useContent(\n displayText ?? valueOptionsContent[value ?? defaultValue ?? '']\n );\n\n const searchPlaceholder = useContent(\n allowSearchAsInput ? ContentId.SearchOrEnter : ContentId.Search\n );\n\n const handleScrollerRef = (ref: HTMLElement | Window | null) => {\n scrollerRef.current = ref;\n };\n\n const onSearchTextApplied = useCallback(\n (searchText: string) => {\n const existingValue = Object.keys(valueOptionsContent).find(\n (k) =>\n valueOptionsContent[k]?.toLocaleUpperCase() ===\n searchText.toLocaleUpperCase()\n );\n if (existingValue || allowSearchAsInput) {\n onChange(existingValue ?? searchText);\n setIsOpen(false);\n }\n },\n [allowSearchAsInput, onChange, valueOptionsContent]\n );\n\n const keysOfValueOptionsAlwaysShow = useMemo(() => {\n return valueOptionsAlwaysShow ? Object.keys(valueOptionsAlwaysShow) : [];\n }, [valueOptionsAlwaysShow]);\n\n const keysOfValueOptionsContent = useMemo(() => {\n return Object.keys(valueOptionsContent);\n }, [valueOptionsContent]);\n\n const useVirtuoso = useMemo(() => {\n if (useVirtualWindow === null || useVirtualWindow === undefined) {\n return keysOfValueOptionsContent.length > 50;\n }\n return useVirtualWindow;\n }, [keysOfValueOptionsContent, useVirtualWindow]);\n\n const selectItems = useMemo(() => {\n let keysToRender = keysOfValueOptionsContent;\n\n if (searchable && searchText.trim().length > 0) {\n keysToRender = flexSearchIndex?.search(searchText) as string[];\n }\n\n let selectItemKeys =\n enableEmptySelection && searchText.length === 0\n ? [EMPTY_CONTENT_DESIGNATOR]\n : [];\n\n if (!sortMode || sortMode === 'none') {\n selectItemKeys = selectItemKeys.concat(keysToRender);\n } else {\n selectItemKeys = selectItemKeys.concat(\n (keysToRender ?? []).toSorted((keyA: string, keyB: string) => {\n const textA = sortBy === 'value' ? valueOptionsContent[keyA] : keyA;\n const textB = sortBy === 'value' ? valueOptionsContent[keyB] : keyB;\n\n let sortResult = textA\n .toLocaleUpperCase()\n .localeCompare(textB.toLocaleUpperCase());\n\n if (sortFn != null) {\n sortResult = sortFn(textA, textB);\n } else {\n const numberA = parseFloat(textA);\n const numberB = parseFloat(textB);\n if (!isNaN(numberA) && !isNaN(numberB)) {\n sortResult = numberA - numberB;\n }\n }\n\n return (sortMode === 'ascending' ? 1 : -1) * sortResult;\n })\n );\n }\n\n // Add selected value if exists to not break the Select\n if (value && !selectItemKeys.includes(value)) {\n selectItemKeys.push(value);\n }\n\n // Add keys that must be always shown\n if (valueOptionsAlwaysShow) {\n keysOfValueOptionsAlwaysShow.forEach((key) => {\n if (valueOptionsAlwaysShow[key] && !selectItemKeys.includes(key)) {\n selectItemKeys.push(key);\n }\n });\n }\n\n return selectItemKeys;\n }, [\n keysOfValueOptionsContent,\n keysOfValueOptionsAlwaysShow,\n valueOptionsContent,\n searchable,\n searchText,\n enableEmptySelection,\n value,\n valueOptionsAlwaysShow,\n flexSearchIndex,\n sortMode,\n sortFn,\n sortBy,\n ]);\n\n const renderItem = useCallback(\n (key: string) => {\n if (key === EMPTY_CONTENT_DESIGNATOR) {\n return (\n \n );\n }\n return (\n \n );\n },\n [\n placeholderText,\n valueOptionsContent,\n valueOptionsContentOverride,\n valueOptionsDisabled,\n valueOptionsIcon,\n ]\n );\n\n return (\n onChange(value, searchText)}\n >\n \n \n {prefixDisplay ?? valueOptionsIcon?.[value ?? '']}\n\n \n }\n >\n {(displayComponent && value && displayComponent(value)) ||\n displayTextContent ||\n placeholderTextContent}\n \n \n {showClearButton && value !== defaultValue && (\n {\n e.stopPropagation();\n onChange(defaultValue ?? '', '');\n }}\n />\n )}\n {postfixDisplay}\n \n \n {loading || isBuildingSearchIndex ? (\n \n ) : (\n <>\n {searchable && (\n {\n setSearchText(value);\n if (hasNextPage) {\n onSearchInputChange?.(value);\n }\n }}\n searchInput={searchText}\n disabled={!!disabled}\n onSearchTextApplied={onSearchTextApplied}\n allowSearchAsInput={!!allowSearchAsInput}\n />\n )}\n {useVirtuoso ? (\n renderItem(key)}\n endReached={() => {\n if (scrollerRef.current instanceof HTMLElement) {\n const { scrollHeight, clientHeight } = scrollerRef.current;\n if (scrollHeight > clientHeight) {\n !isFetchingNextPage && hasNextPage && fetchNextPage?.();\n }\n }\n }}\n scrollerRef={handleScrollerRef}\n />\n ) : (\n selectItems.map((key) => renderItem(key))\n )}\n \n )}\n \n \n );\n};\n\nexport const FilteredSelectItem = ({\n contentId,\n prefixIcon,\n disabledReason,\n optionContent,\n ...props\n}: ComponentPropsWithoutRef & {\n disabledReason?: ContentId | string | boolean;\n contentId: string | ContentId;\n searchText?: string;\n prefixIcon?: ReactNode;\n optionContent?: ReactNode;\n}) => {\n const contentContext = useContentContext();\n const targetText = useContent(contentId);\n const disabledReasonText =\n !disabledReason || typeof disabledReason === 'boolean'\n ? undefined\n : getContent(disabledReason, contentContext);\n\n return (\n \n {optionContent ? optionContent : targetText}\n \n );\n};\n","import { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\n\nimport { connector } from './StackedFilter.css';\n\nexport const StackedFilter = ({\n FilterComponents,\n isHorizontalLayout,\n}: {\n FilterComponents: React.ReactElement[];\n isHorizontalLayout?: boolean;\n}) => {\n return (\n \n {FilterComponents.map((FilterComponent, index) => (\n \n {!isHorizontalLayout && index > 0 && (\n 1 ? vars.spacing['lg'] : 0 }}\n />\n )}\n {FilterComponent}\n \n ))}\n \n );\n};\n","import { useCallback, useState } from 'react';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { DateRangeSelector } from 'src/core/POS/DateRangeSelector';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { PRICE_UPDATED_DATE_FILTER_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport {\n getDisabledDatesForTimeFrameFilter,\n StandardDateRangePresetNames,\n} from 'src/utils/dateTimeUtils';\nimport {\n DateTimeRangeWithRelative,\n Feature,\n ListingQuery,\n} from 'src/WebApiController';\n\nimport { StackedFilter } from './StackedFilter';\n\nexport enum PriceUpdatedFilterEnum {\n PriceUpdatedDate = 'PriceUpdatedDate',\n PriceNotUpdatedDate = 'PriceNotUpdatedDate',\n}\n\nexport const PriceUpdatedDateStackedFilter = () => {\n const { tempQuery, setTempQuery } = useFilterQueryContext();\n const [mode, setMode] = useState(() => {\n // Set the initial mode based on tempQuery\n return tempQuery.lastPriceUpdateDates\n ? PriceUpdatedFilterEnum.PriceUpdatedDate\n : tempQuery.lastPriceNoUpdateDates\n ? PriceUpdatedFilterEnum.PriceNotUpdatedDate\n : PriceUpdatedFilterEnum.PriceUpdatedDate;\n });\n\n const setDateFilter = useCallback(\n (mode: PriceUpdatedFilterEnum, date: DateTimeRangeWithRelative | null) => {\n const newQuery: ListingQuery = {\n ...tempQuery,\n lastPriceUpdateDates:\n mode === PriceUpdatedFilterEnum.PriceUpdatedDate ? date : null,\n lastPriceNoUpdateDates:\n mode === PriceUpdatedFilterEnum.PriceNotUpdatedDate ? date : null,\n };\n\n setTempQuery(newQuery);\n setMode(mode);\n },\n [tempQuery, setTempQuery]\n );\n\n return (\n {\n if (mode === PriceUpdatedFilterEnum.PriceUpdatedDate) {\n setDateFilter(mode, tempQuery['lastPriceUpdateDates']);\n } else if (mode === PriceUpdatedFilterEnum.PriceNotUpdatedDate) {\n setDateFilter(mode, tempQuery['lastPriceNoUpdateDates']);\n }\n }}\n />,\n {\n setDateFilter(mode, value);\n }}\n disabledDay={(d) =>\n getDisabledDatesForTimeFrameFilter(\n d,\n tempQuery.eventTimeFrameFilter\n )\n }\n isEndDateFixed\n displayTextStyle={{ maxWidth: '260px' }}\n />,\n ]}\n />\n );\n};\n","import { useCallback, useState } from 'react';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { DateRangeSelector } from 'src/core/POS/DateRangeSelector';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { SALES_DATE_FILTER_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport {\n getDisabledDatesForTimeFrameFilter,\n StandardDateRangePresetNames,\n} from 'src/utils/dateTimeUtils';\nimport {\n DateTimeRangeWithRelative,\n Feature,\n ListingQuery,\n} from 'src/WebApiController';\n\nimport { StackedFilter } from './StackedFilter';\n\nexport enum SaleDateFilterEnum {\n HasSaleDate = 'HasSaleDate',\n NoSaleDate = 'NoSaleDate',\n}\n\nexport const SaleDateStackedFilter = () => {\n const { tempQuery, setTempQuery } = useFilterQueryContext();\n\n const [mode, setMode] = useState(() => {\n // Set the initial mode based on tempQuery\n return tempQuery.lastSaleDates\n ? SaleDateFilterEnum.HasSaleDate\n : tempQuery.noSaleDates\n ? SaleDateFilterEnum.NoSaleDate\n : SaleDateFilterEnum.HasSaleDate;\n });\n\n const setDateFilter = useCallback(\n (mode: SaleDateFilterEnum, date: DateTimeRangeWithRelative | null) => {\n const newQuery: ListingQuery = {\n ...tempQuery,\n lastSaleDates: mode === SaleDateFilterEnum.HasSaleDate ? date : null,\n noSaleDates: mode === SaleDateFilterEnum.NoSaleDate ? date : null,\n };\n\n setTempQuery(newQuery);\n setMode(mode);\n },\n [tempQuery, setTempQuery]\n );\n\n return (\n {\n if (mode === SaleDateFilterEnum.HasSaleDate) {\n setDateFilter(mode, tempQuery['lastSaleDates']);\n } else if (mode === SaleDateFilterEnum.NoSaleDate) {\n setDateFilter(mode, tempQuery['noSaleDates']);\n }\n }}\n />,\n {\n setDateFilter(mode, value);\n }}\n disabledDay={(d) =>\n getDisabledDatesForTimeFrameFilter(\n d,\n tempQuery.eventTimeFrameFilter\n )\n }\n isEndDateFixed\n displayTextStyle={{ maxWidth: '260px' }}\n />,\n ]}\n />\n );\n};\n","export const NOT_FOUND_INDEX = -1;\n","import { isEqual } from 'lodash-es';\nimport {\n MutableRefObject,\n useCallback,\n useEffect,\n useImperativeHandle,\n useRef,\n useState,\n} from 'react';\nimport { NO_GROUP_ID } from 'src/contexts/MultiSelectionContext/MultiSelectionContext';\nimport {\n GroupStateInput,\n InputId,\n MultiSelectionContextType,\n SelectionMode,\n TableRow,\n} from 'src/contexts/MultiSelectionContext/MultiSelectionContext.types';\nimport { useKeyPress } from 'src/hooks/useKeyPress';\nimport { NOT_FOUND_INDEX } from 'src/utils/constants/global';\n\nexport interface IShiftKeySelection {\n setShiftKeyRowSelectionState: (\n rowId: InputId, // Row ID clicked\n rows: TableRow[], // Table rows\n groupId: InputId // Group ID the row belongs to\n ) => void;\n setShiftKeyGroupSelectionState: (groupId: InputId) => void;\n clearShiftKeySelection: () => void;\n\n // All groups IDs of the tables\n allGroupsIds: string[];\n\n // Checks if NoGroupId is present in all groups arrays\n isNoGroupIdSet: () => boolean;\n}\n\ninterface ShiftKeySelectionProps {\n allGroupsIds: string[];\n shiftKeySelectionRef: MutableRefObject;\n selectionMode?: SelectionMode;\n getGroupToggleState: MultiSelectionContextType['getGroupToggleState'];\n setGroupItems: MultiSelectionContextType['setGroupItems'];\n toggleGroup: MultiSelectionContextType['toggleGroup'];\n}\n\nexport interface ShiftKeyImperativeRef {\n clearShiftKeySelection: () => void;\n setShiftKeyGroupSelectionState: IShiftKeySelection['setShiftKeyGroupSelectionState'];\n}\n\nexport const NO_ROW_SELECTED_INDEX = -1;\n\ntype RowIndexSelection = {\n groupIndex: number;\n rowIndex: number;\n tableRows: TableRow[];\n};\n\ntype ShiftKeySelection = {\n lastRow: RowIndexSelection; // Last row the use clicked without shift key\n shiftRow: RowIndexSelection; // Row selected with shift key\n};\n\nexport const defaultShiftSelection: ShiftKeySelection = {\n lastRow: {\n rowIndex: NO_ROW_SELECTED_INDEX,\n groupIndex: NO_ROW_SELECTED_INDEX,\n tableRows: [],\n },\n shiftRow: {\n rowIndex: NO_ROW_SELECTED_INDEX,\n groupIndex: NO_ROW_SELECTED_INDEX,\n tableRows: [],\n },\n};\n\ntype PerfRefProps = Pick<\n ShiftKeySelectionProps,\n | 'getGroupToggleState'\n | 'setGroupItems'\n | 'selectionMode'\n | 'allGroupsIds'\n | 'toggleGroup'\n> & {\n isShiftKeyPressed: boolean;\n shiftKeySelection: ShiftKeySelection;\n clearShiftKeySelection: () => void;\n};\n\nconst isCleanState = (shiftKeySelection: ShiftKeySelection) => {\n return isEqual(shiftKeySelection, defaultShiftSelection);\n};\n\n/**\n * ShiftKey selection rows\n *\n * How to use it:\n * * When clicking a checkbox in a row, call \"setShiftKeyRowSelectionState\" with\n * the rowID, groupId and all rows of the table.\n * * When clicking a checkbox that represents an entire group, call\n * \"setShiftKeyGroupSelectionState\" with the groupId.\n *\n * How it works:\n * For selecting rows from one table to another and all in between, we need to\n * know the overall structure of how this is rendered. Usually, a table belongs\n * to a group, so the UI is rendering a group with a table inside.\n * The internal state is conformed by 2 objects with the same structure\n * (selected rowId, groupId the row belongs to, table Rows) and a list of all\n * groups Ids with the same order they are rendered. So, to go\n * from table 1 row 2 to table 4 row 4, we need to select from table1.row2\n * to the end of that table, then groups 2 & 3 and then from table4.row0 to\n * table4.row4.\n * If the user selects (with or without pressing shift Key) an entire group,\n * this is stored with `rowIndex` with `NO_ROW_SELECTED_INDEX` value\n * (this means, select entire group).\n */\nexport const useShiftKeySelection = ({\n allGroupsIds,\n shiftKeySelectionRef,\n selectionMode,\n setGroupItems,\n getGroupToggleState,\n toggleGroup,\n}: ShiftKeySelectionProps) => {\n const isShiftKeyPressed = useKeyPress('Shift');\n const [shiftKeySelection, setShiftKeySelection] = useState(\n defaultShiftSelection\n );\n\n const clearShiftKeySelection = useCallback(() => {\n setShiftKeySelection({ ...defaultShiftSelection });\n }, []);\n\n const perPropsRef: PerfRefProps = {\n shiftKeySelection,\n getGroupToggleState,\n setGroupItems,\n isShiftKeyPressed,\n selectionMode,\n allGroupsIds,\n toggleGroup,\n clearShiftKeySelection,\n };\n const refPerfProps = useRef(perPropsRef);\n refPerfProps.current = perPropsRef;\n\n const setShiftKeyRowSelectionState = useCallback(\n (rowId: InputId, tableRows: TableRow[], groupId: InputId) => {\n const { allGroupsIds, isShiftKeyPressed, shiftKeySelection } =\n refPerfProps.current;\n const rowIndex = tableRows.findIndex((row) => row.id === String(rowId));\n\n if (rowIndex === NOT_FOUND_INDEX) {\n return;\n }\n\n let groupIndex = allGroupsIds.findIndex((gId) => gId === groupId);\n\n groupIndex =\n groupIndex === NOT_FOUND_INDEX ? NO_ROW_SELECTED_INDEX : groupIndex;\n\n if (\n !isShiftKeyPressed ||\n // if the user is pressing shift, and it hasn't selected any row yet,\n // then assume it's the first row selected\n (isShiftKeyPressed && isCleanState(shiftKeySelection))\n ) {\n setShiftKeySelection({\n ...shiftKeySelection,\n lastRow: {\n rowIndex,\n groupIndex,\n tableRows,\n },\n });\n } else {\n setShiftKeySelection({\n ...shiftKeySelection,\n shiftRow: {\n rowIndex,\n groupIndex,\n tableRows,\n },\n });\n }\n },\n []\n );\n\n const setShiftKeyGroupSelectionState = useCallback((groupId: InputId) => {\n const {\n allGroupsIds,\n isShiftKeyPressed,\n shiftKeySelection,\n selectionMode,\n clearShiftKeySelection,\n } = refPerfProps.current;\n const groupIndex = allGroupsIds.findIndex((gId) => gId === groupId);\n\n // When clicking a toggle all checkbox inside an accordion,\n // (single table) shift selection should be ignored and just do\n // the toggle all action.\n if (selectionMode?.mode === 'singleGroup') {\n clearShiftKeySelection();\n return;\n }\n\n if (groupIndex === NOT_FOUND_INDEX) {\n return;\n }\n\n if (\n !isShiftKeyPressed ||\n // if the user is pressing shift, and it hasn't selected any row yet,\n // then assume it's the first row selected\n (isShiftKeyPressed && isCleanState(shiftKeySelection))\n ) {\n setShiftKeySelection({\n ...shiftKeySelection,\n lastRow: {\n rowIndex: NO_ROW_SELECTED_INDEX,\n groupIndex,\n tableRows: [],\n },\n });\n } else {\n setShiftKeySelection({\n ...shiftKeySelection,\n shiftRow: {\n rowIndex: NO_ROW_SELECTED_INDEX,\n groupIndex,\n tableRows: [],\n },\n });\n }\n }, []);\n\n // Make row range selection if conditions are met\n useEffect(() => {\n const { lastRow, shiftRow } = shiftKeySelection;\n const {\n getGroupToggleState,\n setGroupItems,\n isShiftKeyPressed,\n selectionMode,\n allGroupsIds,\n toggleGroup,\n clearShiftKeySelection,\n } = refPerfProps.current;\n if (\n lastRow.groupIndex === NO_ROW_SELECTED_INDEX ||\n shiftRow.groupIndex === NO_ROW_SELECTED_INDEX ||\n !selectionMode?.mode ||\n !isShiftKeyPressed\n ) {\n return;\n }\n\n // Select start with the lowest group index\n const minIndex = Math.min(lastRow.groupIndex, shiftRow.groupIndex);\n const maxIndex = Math.max(lastRow.groupIndex, shiftRow.groupIndex);\n\n // How to the use did the selection on the table\n const isTopToBottomUserSelection =\n lastRow.groupIndex <= shiftRow.groupIndex;\n const isSameGroupSelection = lastRow.groupIndex === shiftRow.groupIndex;\n\n for (let groupIndex = minIndex; groupIndex <= maxIndex; groupIndex++) {\n const currentRowIndexSelection: RowIndexSelection = {\n groupIndex: groupIndex,\n rowIndex: NO_ROW_SELECTED_INDEX,\n tableRows: [],\n };\n\n if (lastRow.groupIndex === groupIndex) {\n currentRowIndexSelection.rowIndex = lastRow.rowIndex;\n currentRowIndexSelection.tableRows = lastRow.tableRows;\n } else if (shiftRow.groupIndex === groupIndex) {\n currentRowIndexSelection.rowIndex = shiftRow.rowIndex;\n currentRowIndexSelection.tableRows = shiftRow.tableRows;\n }\n\n const { tableRows } = currentRowIndexSelection;\n const activeGroupId = allGroupsIds[groupIndex];\n const shouldSelectAllGroup =\n currentRowIndexSelection.rowIndex === NO_ROW_SELECTED_INDEX;\n const groupState = getGroupToggleState(activeGroupId);\n\n // Select full group\n if (shouldSelectAllGroup) {\n if (!groupState.isGroupSelected) {\n toggleGroup(activeGroupId);\n }\n continue;\n }\n\n // Select remaining rows on the group\n let fromIndex = NO_ROW_SELECTED_INDEX;\n let toIndex = NO_ROW_SELECTED_INDEX;\n\n // Always select table rows from top to bottom\n if (isSameGroupSelection) {\n // Normal selection from-to row indexes\n fromIndex = Math.min(lastRow.rowIndex, shiftRow.rowIndex);\n toIndex = Math.max(lastRow.rowIndex, shiftRow.rowIndex);\n } else if (isTopToBottomUserSelection) {\n // TopToBottom user selection\n if (groupIndex === lastRow.groupIndex) {\n // From table\n fromIndex = currentRowIndexSelection.rowIndex;\n toIndex = tableRows.length - 1;\n } else if (groupIndex === shiftRow.groupIndex) {\n // To table\n fromIndex = 0;\n toIndex = currentRowIndexSelection.rowIndex;\n }\n } else {\n // BottomToTop Selection\n if (groupIndex === lastRow.groupIndex) {\n fromIndex = 0;\n toIndex = currentRowIndexSelection.rowIndex;\n } else if (groupIndex === shiftRow.groupIndex) {\n fromIndex = currentRowIndexSelection.rowIndex;\n toIndex = tableRows.length - 1;\n }\n }\n\n if (\n fromIndex === NO_ROW_SELECTED_INDEX ||\n toIndex === NO_ROW_SELECTED_INDEX\n ) {\n // Reset everything in case of an error\n clearShiftKeySelection();\n return;\n }\n\n const groupStateInput = tableRows\n .slice(fromIndex, toIndex + 1) // +1 because slice end index is not included\n .map((row) => row.id)\n .concat(groupState.items) // Current selected items\n .reduce((result, rowId) => {\n result[String(rowId)] = true;\n return result;\n }, {});\n setGroupItems(activeGroupId, groupStateInput);\n }\n\n // Reset and set last shift selection to lastRow\n // to continue selecting with shiftKey\n setShiftKeySelection({\n ...shiftKeySelection,\n lastRow: {\n ...shiftRow,\n },\n shiftRow: {\n ...defaultShiftSelection.shiftRow,\n },\n });\n }, [shiftKeySelection]);\n\n useImperativeHandle(\n shiftKeySelectionRef,\n () => {\n return {\n clearShiftKeySelection,\n setShiftKeyGroupSelectionState,\n };\n },\n [clearShiftKeySelection, setShiftKeyGroupSelectionState]\n );\n\n const isNoGroupIdSet = useCallback(() => {\n const { allGroupsIds } = refPerfProps.current;\n return allGroupsIds.includes(NO_GROUP_ID);\n }, []);\n\n return {\n clearShiftKeySelection,\n setShiftKeyRowSelectionState,\n setShiftKeyGroupSelectionState,\n isNoGroupIdSet,\n };\n};\n","import {\n createContext,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport {\n ShiftKeyImperativeRef,\n useShiftKeySelection,\n} from 'src/contexts/MultiSelectionContext/useShiftKeySelection';\n\nimport {\n type SelectableGroupMetadata,\n useCatalogMultiSelectionContext,\n} from '../CatalogMultiSelectionContext';\nimport {\n GroupStateInput,\n InputId,\n ItemSelection,\n ItemSelectionValue,\n MultiSelectionContextProviderType,\n MultiSelectionContextType,\n SelectionItems,\n SelectionMode,\n} from './MultiSelectionContext.types';\n\n/**\n * Scope:\n * - AllGroups (all events or all months) - can select across groups\n * - SingleGroup - can select multiple items (listings, sales or purchases) for a single group\n * - SingleItem - can select a single item\n * - undefined (value, not enum) - inactive (no selection)\n */\nexport const enum MultiSelectScope {\n AllGroups = 'allGroups',\n SingleGroup = 'singleGroup',\n SingleItem = 'singleItem',\n}\n\nexport const NO_GROUP_ID = 'NoGroupId';\n\nconst defaultValues: MultiSelectionContextType = {\n allGroupsIds: [],\n selectionMode: undefined,\n setSelectionMode: () => void 0,\n isAllSelected: false,\n\n // ShiftKey Selection\n clearShiftKeySelection: () => undefined,\n setShiftKeyRowSelectionState: () => void 0,\n setShiftKeyGroupSelectionState: (groupId: InputId) => void 0,\n isNoGroupIdSet: () => false,\n\n setAllGroupsIds: () => void 0,\n toggleGroup: () => void 0,\n getSelection: () => ({\n groupIds: [],\n items: {\n itemIds: [],\n groupIds: [],\n },\n isSingleGroupMultiSelect: false,\n }),\n getGroupToggleState: () => ({\n isGroupSelected: false,\n items: [],\n }),\n getItemToggleState: () => false,\n getGroupSelectableGroupMetadata: (groupId: string) => undefined,\n setGroupItems: () => void 0,\n setGroupStates: () => void 0,\n toggleSelectAll: () => void 0,\n totalItemsSelected: 0,\n itemSelection: {},\n\n // Selected count label\n setSelectedCountLabel: (label: string | undefined) => undefined,\n selectedCountLabel: undefined,\n usingCustomSelectedCountLabel: false,\n setUsingCustomSelectedCountLabel: (usingCustomSelectedCountLabel: boolean) =>\n undefined,\n\n updateGroupFilteredIds: () => void 0,\n isHiddenCheckboxesFeatureEnabled: false,\n shouldHideCheckboxes: false,\n};\n\nconst MultiSelectionContext =\n createContext(defaultValues);\n\nconst defaultMultiSelection: ItemSelectionValue = {\n items: [],\n isGroupSelected: false,\n};\n\nexport const useMultiSelectionContext = () => useContext(MultiSelectionContext);\n\n/**\n * Context that handles multiselects for Item table/inventory view\n */\nexport const MultiSelectionContextProvider = ({\n children,\n initialSelectionMode,\n forceSelectionMode,\n isFlattenedView,\n isHiddenCheckboxesFeatureEnabled = false,\n}: MultiSelectionContextProviderType) => {\n // This state is used to handle visible checkboxes if there's\n // at least one selected. Otherwise, they are not visible unless on hover.\n const [shouldHideCheckboxes, setShouldHideCheckboxes] = useState(\n isHiddenCheckboxesFeatureEnabled\n );\n\n const [selectedCountLabel, setSelectedCountLabel] = useState<\n string | undefined\n >(undefined);\n const [usingCustomSelectedCountLabel, setUsingCustomSelectedCountLabel] =\n useState(false);\n\n const [allGroupsIds, setAllGroupsIds] = useState([]);\n const shiftKeySelectionRef = useRef(null);\n const [itemSelection, setMultiSelection] = useState({});\n\n const [selectionMode, setSelectionMode] = useState(\n forceSelectionMode ?? initialSelectionMode\n );\n const { flattenedIds, groupsArray, updateGroupFilteredIds } =\n useCatalogMultiSelectionContext();\n\n const getGroupSelectableGroupMetadata = useCallback(\n (groupId: string): SelectableGroupMetadata | undefined => {\n return groupsArray.find((group) => group.id === groupId);\n },\n [groupsArray]\n );\n\n const isMultiSelectActive =\n selectionMode?.mode === MultiSelectScope.AllGroups;\n\n const consolidatedSelectionMode = isMultiSelectActive\n ? { mode: MultiSelectScope.AllGroups }\n : selectionMode;\n\n const clearShiftKeySelection = useCallback(() => {\n shiftKeySelectionRef.current?.clearShiftKeySelection();\n }, []);\n\n const [totalItemsSelectedCount, totalItemsCount] = useMemo(() => {\n const itemCountsResult = groupsArray.reduce(\n ([selectionCount, totalCount], group) => {\n const groupId = group.id;\n const groupItemCount = group.itemCount;\n const selection = itemSelection[groupId];\n let selectedCount = selectionCount;\n if (isFlattenedView) {\n if (Array.isArray(flattenedIds) && flattenedIds.length > 0) {\n selectedCount =\n itemSelection[NO_GROUP_ID]?.items?.filter(\n (item) =>\n flattenedIds.includes(parseInt(item)) ||\n flattenedIds.includes(item)\n ).length ?? 0;\n } else {\n selectedCount = itemSelection[NO_GROUP_ID]?.items?.length;\n }\n } else {\n if (selection) {\n selectedCount = selectionCount += selection.isGroupSelected\n ? groupItemCount\n : selection.items.length;\n }\n }\n return [selectedCount, (totalCount += groupItemCount)];\n },\n [0, 0]\n );\n\n if (\n isFlattenedView &&\n Array.isArray(flattenedIds) &&\n flattenedIds.length > 0\n ) {\n // Assuming we DO NOT return any result when it's > max (flattenedIds.length > MAX_NUM_OF_ITEMS_IN_TABLES)\n return [itemCountsResult[0], flattenedIds.length];\n }\n\n return itemCountsResult;\n }, [flattenedIds, groupsArray, isFlattenedView, itemSelection]);\n\n const isAllSelected =\n totalItemsSelectedCount > 0 && totalItemsCount === totalItemsSelectedCount;\n\n const toggleGroupInternal = useCallback(\n (groupId: InputId) => {\n const strGroupId = String(groupId);\n const group = getGroupSelectableGroupMetadata(strGroupId);\n\n setMultiSelection((prev) => {\n const prevItem = prev[strGroupId] ?? defaultMultiSelection;\n\n const newIsGroupSelected = !prevItem.isGroupSelected;\n return {\n ...prev,\n [strGroupId]: {\n items: newIsGroupSelected\n ? (group?.filteredIds?.map((id) => String(id)) ?? [])\n : [],\n isGroupSelected: !prevItem.isGroupSelected,\n },\n };\n });\n },\n [getGroupSelectableGroupMetadata]\n );\n\n const toggleGroup = (groupId: InputId) => {\n shiftKeySelectionRef.current?.setShiftKeyGroupSelectionState(groupId);\n toggleGroupInternal(groupId);\n };\n\n const setGroupItems = useCallback(\n (groupId: InputId, items: GroupStateInput) => {\n const strGroupId = String(groupId);\n const toggledItems = Object.entries(items).reduce(\n (acc, [itemId, value]) => {\n if (value) acc.push(String(String(itemId)));\n return acc;\n },\n []\n );\n const toggledWOGroupsCount =\n Array.isArray(flattenedIds) && flattenedIds.length > 0\n ? toggledItems.filter(\n (item) =>\n flattenedIds.includes(parseInt(item)) ||\n flattenedIds.includes(item)\n ).length\n : toggledItems.length;\n let groupData = groupsArray.find((g) => g.id === groupId);\n if (!groupData) {\n groupData = {\n id: NO_GROUP_ID,\n itemCount:\n flattenedIds?.length ??\n groupsArray.reduce(\n (total, current) => total + current.itemCount,\n 0\n ),\n } as SelectableGroupMetadata;\n }\n const { comboId } = groupData;\n let totalItemCount: number;\n if (comboId) {\n const relatedGroups = groupsArray.filter(\n (group) => group.comboId === comboId\n );\n totalItemCount = relatedGroups.reduce(\n (total, current) => total + current.itemCount,\n 0\n );\n } else {\n totalItemCount = groupData.itemCount;\n }\n\n setMultiSelection((prev) => ({\n ...prev,\n [strGroupId]: {\n items: toggledItems,\n isGroupSelected: toggledWOGroupsCount === totalItemCount,\n },\n }));\n },\n [flattenedIds, groupsArray]\n );\n\n const setGroupStates = useCallback((groups: GroupStateInput) => {\n const state = Object.entries(groups).reduce(\n (acc, [key, value]) => {\n acc[key] = { isGroupSelected: value, items: [] };\n return acc;\n },\n {}\n );\n setMultiSelection(state);\n }, []);\n\n const toggleSelectAll = useCallback(() => {\n clearShiftKeySelection();\n const newSelections = isAllSelected\n ? {}\n : isFlattenedView\n ? {\n [NO_GROUP_ID]: {\n items: flattenedIds?.map((id) => String(id)) ?? [],\n isGroupSelected: true,\n },\n }\n : groupsArray.reduce((acc, group) => {\n acc[group.id] = {\n items: group.filteredIds?.map((id) => String(id)) ?? [],\n isGroupSelected: true,\n };\n return acc;\n }, {});\n\n setMultiSelection(newSelections);\n }, [\n clearShiftKeySelection,\n flattenedIds,\n groupsArray,\n isAllSelected,\n isFlattenedView,\n ]);\n\n const getGroupToggleState = useCallback(\n (groupId: InputId): ItemSelectionValue =>\n itemSelection[String(groupId)] || {\n isGroupSelected: false,\n items: [],\n },\n [itemSelection]\n );\n\n const getItemToggleState = useCallback(\n (itemId: InputId, groupId: InputId) => {\n const strGroupId = String(groupId);\n return (\n (!!itemSelection[strGroupId]?.isGroupSelected &&\n !itemSelection[strGroupId]?.items.length) ||\n !!itemSelection[strGroupId]?.items.includes(String(itemId))\n );\n },\n [itemSelection]\n );\n\n const getSelection = useCallback(\n (groupId?: InputId) => {\n const strGroupId = String(groupId);\n // Group wide\n const groupIds: string[] = [];\n // Partial selections\n const items: SelectionItems = {\n itemIds: [],\n groupIds: [],\n };\n if (!groupId) {\n // Calculate all\n Object.entries(itemSelection).forEach(([strGroupId, item]) => {\n if (item.isGroupSelected && !item.items.length)\n return groupIds.push(strGroupId);\n if (item.items.length) {\n items.groupIds.push(strGroupId);\n items.itemIds.push(...item.items);\n }\n });\n return {\n isSingleGroupMultiSelect: false,\n groupIds,\n items,\n };\n }\n\n // Calculate Group-wide\n const selection = itemSelection[strGroupId];\n if (!selection)\n return {\n isSingleGroupMultiSelect:\n selectionMode?.groupId === groupId &&\n selectionMode?.mode === MultiSelectScope.SingleGroup,\n groupIds,\n items,\n };\n\n if (selection.isGroupSelected && !selection.items.length) {\n groupIds.push(strGroupId);\n } else if (selection.items.length) {\n items.groupIds.push(strGroupId);\n items.itemIds.push(...selection.items);\n }\n\n return {\n isSingleGroupMultiSelect:\n selectionMode?.mode === MultiSelectScope.SingleGroup,\n groupIds,\n items,\n };\n },\n [itemSelection, selectionMode]\n );\n\n const onSetSelectionMode = useCallback(\n (mode?: SelectionMode) => {\n // Changing the mode should clear all selections\n setMultiSelection({});\n setSelectionMode(forceSelectionMode ?? mode);\n clearShiftKeySelection();\n },\n [clearShiftKeySelection, forceSelectionMode]\n );\n\n /* ShiftKey Selection */\n const shiftKeySelection = useShiftKeySelection({\n shiftKeySelectionRef,\n selectionMode,\n getGroupToggleState,\n setGroupItems,\n toggleGroup: toggleGroupInternal,\n allGroupsIds,\n });\n\n useEffect(() => {\n if (!isHiddenCheckboxesFeatureEnabled) {\n return;\n }\n\n // using hover\n setShouldHideCheckboxes(totalItemsSelectedCount <= 0);\n }, [isHiddenCheckboxesFeatureEnabled, totalItemsSelectedCount]);\n\n return (\n \n {children}\n \n );\n};\n","export const packNumericIds = (ids: number[]) => ids.join(',');\n\nexport const unpackNumericIds = (ids: string) => ids.split(',').map(Number);\n","export const PURCHASE_MONTHLY_CONTAINER_QUERY_KEY =\n 'PurchaseClient.getMonthsContainerPurchaseOrders';\nexport const PURCHASE_SINGLE_MONTH_QUERY_KEY =\n 'PurchaseClient.getPurchaseOrders';\n\nexport const PURCHASE_SINGLE_TIME_PERIOD_QUERY_KEY =\n 'PurchaseClient.getPurchaseOrders';\n\nexport const PURCHASE_TIME_PERIOD_CONTAINER_QUERY_KEY =\n 'PurchaseClient.getTimePeriodsContainerPurchaseOrders';\n","import { useQuery } from '@tanstack/react-query';\nimport { useCallback, useMemo } from 'react';\nimport {\n DATA_REFRESH_RATE_IN_MILLIS_LONG,\n MAX_NUM_OF_ITEMS_FOR_FLATTENED_VIEWS,\n} from 'src/utils/constants/constants';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n PurchaseClient,\n PurchaseOrder,\n PurchaseOrderQuery,\n PurchaseViewMode,\n} from 'src/WebApiController';\n\nimport { useAppContext } from '../AppContext';\nimport { useCatalogDataContext } from '../CatalogDataContext';\nimport { useErrorBoundaryContext } from '../ErrorBoundaryContext';\nimport { useFilterQueryContext } from '../FilterQueryContext';\nimport { PURCHASE_SINGLE_TIME_PERIOD_QUERY_KEY } from './PurchaseDataContext.constants';\n\nexport const useGetAllPurchasesQuery = (\n useReadonlyDB?: boolean,\n viewModeOverride?: PurchaseViewMode,\n ignoreMaxCount?: boolean,\n doNotQueryForPurchases?: boolean\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const { filterQuery } = useFilterQueryContext();\n const { trackError } = useErrorBoundaryContext();\n const { allEventIds, totalPurchaseCount } = useCatalogDataContext();\n\n const moddedFilterQuery = useMemo(\n () => ({\n ...filterQuery,\n // This is not used by server\n searchText: null,\n sortBy: null,\n isSortDescending: null,\n viewMode: null,\n }),\n [filterQuery]\n );\n\n const filterPurchaseOrders = useCallback(\n (purchaseOrders: PurchaseOrder[] | null | undefined) => {\n if (purchaseOrders && filterQuery.purchaseOrderState) {\n return purchaseOrders.filter(\n (po) => po.poState === filterQuery.purchaseOrderState\n );\n }\n\n return purchaseOrders;\n },\n [filterQuery.purchaseOrderState]\n );\n\n const shouldQuery =\n !doNotQueryForPurchases &&\n !(\n viewModeOverride !== PurchaseViewMode.FlattenedView ||\n (viewModeOverride === PurchaseViewMode.FlattenedView &&\n !ignoreMaxCount &&\n (!totalPurchaseCount ||\n totalPurchaseCount > MAX_NUM_OF_ITEMS_FOR_FLATTENED_VIEWS)) ||\n activeAccountWebClientConfig.activeAccountId == null\n );\n\n const allPurchasesQuery = useQuery({\n queryKey: [\n PURCHASE_SINGLE_TIME_PERIOD_QUERY_KEY,\n moddedFilterQuery,\n allEventIds,\n ],\n queryFn: async () => {\n if (!shouldQuery) {\n return null;\n }\n\n // XXX Workaround for the backend\n // because backend treats empty arrays as \"no filter\" (get all) for backwards compatibility\n // so we require either eventIds, entityIds, or marketplaceEntityIds\n // as a minimum\n if (\n !allEventIds?.length &&\n !moddedFilterQuery.entityIds?.length &&\n !moddedFilterQuery.marketplaceEntityIds\n ) {\n return [];\n }\n\n const filterQueryWithEventIds = {\n ...moddedFilterQuery,\n eventOrMappingIds: (allEventIds ?? []).map((ev) => ev.viagVirtualId),\n performerIds: (allEventIds ?? [])\n .filter((ev) => ev.performerId != null)\n .map((ev) => ev.performerId!),\n venueIds: (allEventIds ?? []).map((ev) => ev.venueId),\n };\n\n return tryInvokeApi(\n async () => {\n const client = new PurchaseClient(activeAccountWebClientConfig);\n const data = await client.getPurchaseOrders(\n filterQueryWithEventIds,\n useReadonlyDB\n );\n return data;\n },\n (error) => {\n trackError(\n PURCHASE_SINGLE_TIME_PERIOD_QUERY_KEY,\n error,\n filterQueryWithEventIds\n );\n }\n );\n },\n enabled: shouldQuery,\n staleTime: Infinity, // Since we're always refetching on an interval, we don't want query to calculate whether the data is stale\n refetchOnWindowFocus: false,\n networkMode: 'offlineFirst',\n refetchInterval: DATA_REFRESH_RATE_IN_MILLIS_LONG,\n });\n\n return {\n allPurchasesQuery,\n allPurchasesFiltered: filterPurchaseOrders(allPurchasesQuery.data),\n };\n};\n","// useGetPurchasesQuery.js\nimport { useQuery } from '@tanstack/react-query';\nimport { differenceInCalendarDays } from 'date-fns';\nimport { useMemo } from 'react';\nimport { DATA_REFRESH_RATE_IN_MILLIS_LONG } from 'src/utils/constants/constants';\nimport { getErrorInfoFromStatusCode } from 'src/utils/errorUtils';\nimport {\n MonthContainingPurchaseOrdersResult,\n PurchaseClient,\n PurchaseOrderQuery,\n PurchaseViewMode,\n TimePeriodContainingPurchaseOrderResult,\n TimePeriodType,\n} from 'src/WebApiController';\n\nimport { useAppContext } from '../AppContext';\nimport { useCatalogDataContext } from '../CatalogDataContext';\nimport { ErrorTypes, useErrorBoundaryContext } from '../ErrorBoundaryContext';\nimport { useFilterQueryContext } from '../FilterQueryContext';\nimport { PURCHASE_TIME_PERIOD_CONTAINER_QUERY_KEY } from './PurchaseDataContext.constants';\n\nexport const useGetTimePeriodPurchasesQuery = (\n selectedIds: string[],\n setSelectedIds: (value: React.SetStateAction) => void,\n setErrorInfo: (\n value: React.SetStateAction<\n | {\n errorHeader: React.ReactNode;\n errorMessage: React.ReactNode;\n }\n | undefined\n >\n ) => void,\n timePeriodType: TimePeriodType,\n disabled?: boolean\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { filterQuery, isQueryInitialized } =\n useFilterQueryContext();\n const { trackError } = useErrorBoundaryContext();\n const { allEventIds } = useCatalogDataContext();\n\n const queryKey = useMemo(\n () => [\n PURCHASE_TIME_PERIOD_CONTAINER_QUERY_KEY,\n activeAccountWebClientConfig?.activeAccountId,\n filterQuery,\n allEventIds,\n timePeriodType,\n ],\n [\n activeAccountWebClientConfig?.activeAccountId,\n allEventIds,\n filterQuery,\n timePeriodType,\n ]\n );\n\n const shouldQuery = Boolean(\n filterQuery &&\n activeAccountWebClientConfig?.activeAccountId &&\n isQueryInitialized &&\n allEventIds != null &&\n filterQuery.viewMode === PurchaseViewMode.TileView &&\n !disabled\n );\n\n function getDateValue(\n item:\n | TimePeriodContainingPurchaseOrderResult\n | MonthContainingPurchaseOrdersResult\n ): string {\n if ('firstOfTimePeriod' in item) {\n return item.firstOfTimePeriod;\n } else if ('firstOfMonth' in item) {\n return item.firstOfMonth;\n } else {\n throw new Error('Unexpected item type');\n }\n }\n\n const purchasesQuery = useQuery({\n queryKey,\n queryFn: async () => {\n setErrorInfo(undefined);\n\n if (!shouldQuery) {\n return null;\n }\n\n const client = new PurchaseClient(activeAccountWebClientConfig);\n\n const filterQueryWithEventIds = {\n ...filterQuery,\n eventOrMappingIds: (allEventIds ?? []).map((ev) => ev.viagVirtualId),\n performerIds: (allEventIds ?? [])\n .filter((ev) => ev.performerId != null)\n .map((ev) => ev.performerId!),\n venueIds: (allEventIds ?? []).map((ev) => ev.venueId),\n };\n\n // XXX Workaround for the backend\n // because backend treats empty arrays as \"no filter\" for backwards compatibility\n if (allEventIds?.length === 0) {\n return [];\n }\n\n const data = await client.getTimePeriodContainerPurchaseOrders(\n filterQueryWithEventIds,\n timePeriodType\n );\n\n const sortedData = data.toSorted((a, b) => {\n const dateA = new Date(getDateValue(a));\n const dateB = new Date(getDateValue(b));\n return filterQuery.isSortDescending\n ? differenceInCalendarDays(dateB, dateA)\n : differenceInCalendarDays(dateA, dateB);\n });\n\n let newSelectedIds = selectedIds;\n // Always expanding the first item if none selected and we just got data\n if (!selectedIds.length && sortedData.length) {\n const firstItem = sortedData[0];\n const dateValue = getDateValue(firstItem);\n newSelectedIds = [dateValue];\n setSelectedIds(newSelectedIds);\n }\n\n const mappedData = sortedData.map((item) => {\n const dateValue = getDateValue(item);\n return {\n ...item,\n firstOfTimePeriod: dateValue, // Use 'firstOfTimePeriod' as a consistent key\n } as TimePeriodContainingPurchaseOrderResult;\n });\n\n return mappedData;\n },\n\n enabled: shouldQuery,\n staleTime: Infinity,\n refetchOnWindowFocus: false,\n networkMode: 'offlineFirst',\n meta: {\n onError: (error: ErrorTypes) => {\n const { headerDisplay, messageDisplay } = getErrorInfoFromStatusCode(\n error?.status,\n error?.message\n );\n setErrorInfo({\n errorHeader: headerDisplay,\n errorMessage: messageDisplay,\n });\n trackError(\n PURCHASE_TIME_PERIOD_CONTAINER_QUERY_KEY,\n error,\n filterQuery\n );\n },\n },\n refetchInterval: DATA_REFRESH_RATE_IN_MILLIS_LONG,\n });\n\n return purchasesQuery;\n};\n","import {\n QueryObserverResult,\n useQueryClient,\n UseQueryResult,\n} from '@tanstack/react-query';\nimport {\n createContext,\n useCallback,\n useContext,\n useMemo,\n useState,\n} from 'react';\nimport { getErrorInfoFromStatusCode } from 'src/utils/errorUtils';\nimport {\n PurchaseOrder,\n PurchaseOrderDetails,\n PurchaseOrderQuery,\n PurchaseViewMode,\n TimePeriodContainingPurchaseOrderResult,\n TimePeriodType,\n} from 'src/WebApiController';\n\nimport { useAppContext } from '../AppContext';\nimport { useCatalogDataContext } from '../CatalogDataContext';\nimport { ErrorTypes } from '../ErrorBoundaryContext';\nimport { useFilterQueryContext } from '../FilterQueryContext';\nimport {\n PURCHASE_SINGLE_TIME_PERIOD_QUERY_KEY,\n PURCHASE_TIME_PERIOD_CONTAINER_QUERY_KEY,\n} from './PurchaseDataContext.constants';\nimport { useGetAllPurchasesQuery } from './useGetAllPurchasesQuery';\nimport { useGetTimePeriodPurchasesQuery } from './useGetTimePeriodPurchasesQuery';\n\nexport type IPurchaseDataContext = {\n timePeriodPurchasesQuery: UseQueryResult<\n TimePeriodContainingPurchaseOrderResult[] | null,\n ErrorTypes\n >;\n allPurchasesQuery: UseQueryResult;\n allPurchasesFiltered: PurchaseOrder[] | null | undefined;\n purchaseCount: number;\n refreshData: (\n refetchAll?: boolean\n ) => Promise>;\n errorInfo?: { errorHeader: React.ReactNode; errorMessage: React.ReactNode };\n onSelect: (targetId: string, forceSelect?: boolean) => void;\n selectedIds: string[];\n onSetActivePurchaseOrderCallback: (\n item: PurchaseOrderDetails,\n forceRefresh?: boolean\n ) => Promise;\n scrollToId?: string;\n setScrollToId: (id?: string) => void;\n isFlattenedView: boolean;\n purchaseGroupTimePeriod: Exclude;\n setPurchaseGroupTimePeriod: (\n timePeriod: Exclude\n ) => void;\n};\n\nexport const PurchaseDataContext = createContext({\n timePeriodPurchasesQuery: {} as UseQueryResult<\n TimePeriodContainingPurchaseOrderResult[] | null\n >,\n allPurchasesQuery: {} as UseQueryResult,\n allPurchasesFiltered: [],\n purchaseCount: 0,\n refreshData: () =>\n Promise.resolve({} as QueryObserverResult),\n selectedIds: [],\n onSelect: () => {},\n onSetActivePurchaseOrderCallback: () => Promise.resolve(),\n setScrollToId: () => {},\n isFlattenedView: false,\n purchaseGroupTimePeriod: TimePeriodType.Weekly,\n setPurchaseGroupTimePeriod: () => {},\n});\n\nexport const usePurchaseDataContext = () => useContext(PurchaseDataContext);\n\nexport const PurchaseDataContextProvider = ({\n useReadonlyDB,\n viewModeOverride,\n ignoreMaxCount,\n children,\n doNotQueryForPurchases,\n}: {\n children: React.ReactNode;\n useReadonlyDB?: boolean;\n viewModeOverride?: PurchaseViewMode;\n ignoreMaxCount?: boolean;\n doNotQueryForPurchases?: boolean;\n}) => {\n const queryClient = useQueryClient();\n const { filterQuery } = useFilterQueryContext();\n const activeViewMode = useMemo(\n () => viewModeOverride ?? filterQuery.viewMode ?? PurchaseViewMode.TileView,\n [filterQuery.viewMode, viewModeOverride]\n );\n\n const { totalPurchaseCount } = useCatalogDataContext();\n\n const { activeAccountWebClientConfig } = useAppContext();\n const [errorInfo, setErrorInfo] = useState<{\n errorHeader: React.ReactNode;\n errorMessage: React.ReactNode;\n }>();\n const [selectedIds, setSelectedIds] = useState([]);\n\n const [scrollToId, setScrollToId] = useState();\n const [purchaseGroupTimePeriod, setPurchaseGroupTimePeriod] = useState<\n Exclude\n >(TimePeriodType.Weekly);\n\n const onSelect = useCallback(\n (targetId: string, forceSelect?: boolean) => {\n const indexOf = selectedIds.indexOf(targetId);\n\n if (indexOf >= 0) {\n // if force-select, we won't de-select if it's already selected\n if (forceSelect) {\n setScrollToId(targetId);\n } else {\n setSelectedIds(selectedIds.filter((id) => id !== targetId));\n }\n } else {\n setSelectedIds([...selectedIds, targetId]);\n setScrollToId(targetId);\n }\n },\n [selectedIds]\n );\n\n const timePeriodPurchasesQuery = useGetTimePeriodPurchasesQuery(\n selectedIds,\n setSelectedIds,\n setErrorInfo,\n purchaseGroupTimePeriod,\n activeViewMode !== PurchaseViewMode.TileView // disabled\n );\n\n const purchaseCount = useMemo(() => {\n let purchaseCount = 0;\n\n if (activeViewMode === PurchaseViewMode.TileView) {\n (timePeriodPurchasesQuery.data ?? []).forEach((ev) => {\n purchaseCount += ev.purchaseCount;\n });\n } else if (activeViewMode === PurchaseViewMode.FlattenedView) {\n purchaseCount = totalPurchaseCount ?? 0;\n }\n\n return purchaseCount;\n }, [activeViewMode, timePeriodPurchasesQuery.data, totalPurchaseCount]);\n\n const { allPurchasesQuery, allPurchasesFiltered } = useGetAllPurchasesQuery(\n useReadonlyDB,\n activeViewMode,\n ignoreMaxCount,\n doNotQueryForPurchases\n );\n\n const onSetActivePurchaseOrderCallback = useCallback(\n async (item: PurchaseOrderDetails, forceRefresh?: boolean) => {\n if (item.poDate) {\n if (forceRefresh) {\n // Refetch the month accordions\n const refetchQuery = await timePeriodPurchasesQuery.refetch();\n\n const targetTimePeriodIds = refetchQuery.data\n ?.filter((d) => d.firstOfTimePeriod <= item.poDate!)\n .map((d) => d.firstOfTimePeriod)\n .toSorted();\n if (targetTimePeriodIds?.length) {\n const targetTimePeriodId =\n targetTimePeriodIds[targetTimePeriodIds.length - 1];\n onSelect(targetTimePeriodId, true);\n }\n }\n }\n },\n [timePeriodPurchasesQuery, onSelect]\n );\n\n const refreshData = useCallback(\n async (refetchAll?: boolean) => {\n if (refetchAll) {\n queryClient.invalidateQueries({\n queryKey: [\n PURCHASE_TIME_PERIOD_CONTAINER_QUERY_KEY,\n activeAccountWebClientConfig.activeAccountId,\n ],\n });\n // For the months one we want to just query all - since this is each month ()\n queryClient.invalidateQueries({\n queryKey: [PURCHASE_SINGLE_TIME_PERIOD_QUERY_KEY, true],\n type: 'all',\n });\n }\n\n await allPurchasesQuery.refetch();\n return timePeriodPurchasesQuery.refetch();\n },\n [\n activeAccountWebClientConfig.activeAccountId,\n allPurchasesQuery,\n timePeriodPurchasesQuery,\n queryClient,\n ]\n );\n\n if (timePeriodPurchasesQuery.failureReason) {\n const { headerDisplay, messageDisplay } = getErrorInfoFromStatusCode(\n null,\n timePeriodPurchasesQuery.failureReason.message\n );\n setErrorInfo({\n errorHeader: headerDisplay,\n errorMessage: messageDisplay,\n });\n }\n\n return (\n \n {children}\n \n );\n};\n","import { fromPairs, isEqual } from 'lodash-es';\nimport {\n createContext,\n ReactNode,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { getFlattenedListingIds } from 'src/utils/inventoryUtils';\nimport {\n EventWithData,\n Listing,\n PurchaseOrderTicketGroup,\n Sale,\n TimePeriodContainingPurchaseOrderResult,\n} from 'src/WebApiController';\n\nimport { NO_GROUP_ID } from '../MultiSelectionContext';\nimport { packNumericIds } from '../MultiSelectionContext/MultiSelectionContext.utils';\nimport { usePurchaseDataContext } from '../PurchaseDataContext';\n\nexport type MultiSelectionType =\n | 'listing'\n | 'sale'\n | 'purchase'\n | 'ticketGroup';\n\n/** Metadata of the selectable group\n * @prop id - ID of the group (Event ID or month)\n * @prop comboId - Combo ID for related items (ViagogoVirtualId for combined events)\n * @prop itemCount - count of total items in the group - used to 1) add to total selected count when group is selected and 2) determine if group is fully selected\n * @prop unfilteredItemCount - count of total items in the group - used to restore itemCount when column filter is removed\n * @prop filteredIds - list of filtered IDs in the group - if undefined, all items are considered selected. If defined, represents full list of ids available for selection\n */\nexport type SelectableGroupMetadata = {\n id: string;\n comboId?: string;\n itemCount: number;\n unfilteredItemCount: number;\n filteredIds?: (number | string)[];\n};\n\nexport type ICatalogMultiSelectionContext = {\n flattenedIds: (number | string)[] | undefined;\n unfilteredFlattenedIds: (number | string)[] | undefined;\n groupsArray: SelectableGroupMetadata[];\n updateGroupFilteredIds: (\n groupId: string,\n filteredIds: (number | string)[] | undefined\n ) => void;\n};\n\nconst emptyContext: ICatalogMultiSelectionContext = {\n flattenedIds: undefined,\n unfilteredFlattenedIds: undefined,\n groupsArray: [],\n updateGroupFilteredIds: () => {},\n};\n\nexport const CatalogMultiSelectionContext =\n createContext(emptyContext);\n\nexport const useCatalogMultiSelectionContext = () =>\n useContext(CatalogMultiSelectionContext);\n\nfunction transformGroupsArray(\n data: EventWithData[] | TimePeriodContainingPurchaseOrderResult[] | undefined,\n type: MultiSelectionType,\n isPurchaseFlattenedView?: boolean\n): SelectableGroupMetadata[] {\n if (type === 'purchase' && !isPurchaseFlattenedView) {\n return ((data ?? []) as TimePeriodContainingPurchaseOrderResult[]).map(\n (monthData) => ({\n id: monthData.firstOfTimePeriod,\n itemCount: monthData.purchaseCount,\n unfilteredItemCount: monthData.purchaseCount,\n })\n );\n }\n return ((data ?? []) as EventWithData[]).map((event) => {\n const unfilteredItemCount =\n type === 'listing'\n ? event.counts.listCnt ?? 0\n : type === 'ticketGroup'\n ? event.counts.tktGrpsCnt ?? 0\n : type === 'purchase'\n ? event.counts.poCnt ?? 0\n : event.counts.salesCnt ?? 0;\n return {\n id: event.event.viagVirtualId,\n comboId: event.event.viagVirtualId,\n itemCount: unfilteredItemCount,\n unfilteredItemCount,\n };\n });\n}\n\nexport function CatalogMultiSelectionContextProvider({\n children,\n type,\n}: {\n children: ReactNode;\n type: MultiSelectionType;\n}) {\n const { data, eventsTransformed } = useCatalogDataContext();\n const {\n timePeriodPurchasesQuery,\n allPurchasesFiltered,\n isFlattenedView: isPurchaseFlattenedView,\n } = usePurchaseDataContext();\n const inputArray = useMemo(\n () =>\n type === 'purchase' && !isPurchaseFlattenedView\n ? timePeriodPurchasesQuery?.data ?? []\n : eventsTransformed,\n [\n eventsTransformed,\n isPurchaseFlattenedView,\n timePeriodPurchasesQuery?.data,\n type,\n ]\n );\n const inputObject = useMemo(\n () =>\n type === 'purchase' && !isPurchaseFlattenedView\n ? fromPairs(\n (timePeriodPurchasesQuery?.data ?? []).map((monthData) => [\n monthData.firstOfTimePeriod,\n monthData,\n ])\n )\n : data?.events,\n [\n data?.events,\n isPurchaseFlattenedView,\n timePeriodPurchasesQuery?.data,\n type,\n ]\n );\n\n const [flattenedIds, setFlattenedIDs] = useState<\n (number | string)[] | undefined\n >();\n const [unfilteredFlattenedIds, setUnfilteredFlattenedIDs] = useState<\n (number | string)[] | undefined\n >();\n\n const [groupsArray, setGroupsArray] = useState(\n transformGroupsArray(inputArray, type, isPurchaseFlattenedView)\n );\n\n useEffect(() => {\n const allItems =\n type === 'purchase' && allPurchasesFiltered\n ? allPurchasesFiltered\n : ((inputArray ?? []) as EventWithData[]).reduce(\n (all, current: EventWithData) => [\n ...all,\n ...(current?.entities?.listings ??\n current?.entities?.sales ??\n current?.entities?.ticketGroups ??\n []),\n ],\n [] as (Listing | Sale | PurchaseOrderTicketGroup)[]\n );\n const flattened =\n allItems.length > 0 && (allItems[0] as Listing).entityType === 'Listing'\n ? getFlattenedListingIds(allItems as Listing[])\n : type === 'ticketGroup'\n ? allItems.map((item) =>\n packNumericIds([\n item.id,\n (item as PurchaseOrderTicketGroup).tgId ?? 0,\n ])\n )\n : allItems.map((item) => item.id);\n setFlattenedIDs(flattened.length > 0 ? flattened : undefined);\n setUnfilteredFlattenedIDs(flattened.length > 0 ? flattened : undefined);\n setGroupsArray(\n transformGroupsArray(inputArray, type, isPurchaseFlattenedView)\n );\n }, [\n inputObject,\n inputArray,\n type,\n allPurchasesFiltered,\n isPurchaseFlattenedView,\n ]);\n\n const updateGroupFilteredIds = useCallback(\n (groupId: string, filteredIds: (number | string)[] | undefined) => {\n // Important - avoid calling set state if no change otherwise table can re-render unnecessarily\n if (groupId === NO_GROUP_ID) {\n if (filteredIds === undefined) {\n if (!isEqual(flattenedIds, unfilteredFlattenedIds)) {\n setFlattenedIDs(unfilteredFlattenedIds);\n }\n } else {\n if (!isEqual(flattenedIds, filteredIds)) {\n setFlattenedIDs(filteredIds);\n }\n }\n }\n\n const groupIndex = groupsArray.findIndex((group) => group.id === groupId);\n if (groupIndex === -1) {\n return;\n }\n\n if (filteredIds === undefined) {\n if (\n groupsArray[groupIndex].filteredIds === undefined &&\n groupsArray[groupIndex].itemCount ===\n groupsArray[groupIndex].unfilteredItemCount\n ) {\n return;\n }\n } else {\n if (isEqual(groupsArray[groupIndex].filteredIds, filteredIds)) {\n return;\n }\n }\n\n setGroupsArray((prev) => {\n const newGroupsArray = [...prev];\n\n if (filteredIds === undefined) {\n newGroupsArray[groupIndex] = {\n ...newGroupsArray[groupIndex],\n filteredIds: undefined,\n itemCount: newGroupsArray[groupIndex]?.unfilteredItemCount,\n };\n } else {\n newGroupsArray[groupIndex] = {\n ...newGroupsArray[groupIndex],\n filteredIds,\n itemCount: filteredIds.length,\n };\n }\n\n return newGroupsArray;\n });\n },\n [flattenedIds, groupsArray, unfilteredFlattenedIds]\n );\n\n return (\n \n {children}\n \n );\n}\n","import { useMemo } from 'react';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { useCatalogMultiSelectionContext } from 'src/contexts/CatalogMultiSelectionContext';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport {\n NO_GROUP_ID,\n useMultiSelectionContext,\n} from 'src/contexts/MultiSelectionContext';\nimport { unpackNumericIds } from 'src/contexts/MultiSelectionContext/MultiSelectionContext.utils';\nimport { usePurchaseDataContext } from 'src/contexts/PurchaseDataContext';\nimport {\n ActionOutboxEntityType,\n InventoryViewMode,\n ListingQuery,\n PurchaseOrderQuery,\n SaleQuery,\n} from 'src/WebApiController';\n\nexport type FilterQueryType = ListingQuery | SaleQuery | PurchaseOrderQuery;\n\nexport type UseFilterQueryStateType = T & {\n eventOrMappingIds?: string[] | null;\n purchaseMonths?: string[];\n};\n\ntype UseFilterQueryState = {\n filterQueryWithEventIds: UseFilterQueryStateType;\n /**\n * Returns a list of selected viagogoIds grouped by event\n */\n selectedViagogoVirtualIds: string[] | undefined;\n};\n\nexport const useFilterQueryState = (\n entityType:\n | ActionOutboxEntityType.Listing\n | ActionOutboxEntityType.Sale\n | ActionOutboxEntityType.Purchase,\n // All the group ids cannot be outside of this one\n groupIdSuperSet?: string[],\n useTicketGroupIds?: boolean\n): UseFilterQueryState => {\n const { flattenedIds, unfilteredFlattenedIds } =\n useCatalogMultiSelectionContext();\n const { getSelection, isAllSelected } = useMultiSelectionContext();\n const selectionState = getSelection();\n\n const { filterQuery } = useFilterQueryContext();\n const { eventsTransformed } = useCatalogDataContext();\n const { timePeriodPurchasesQuery } = usePurchaseDataContext();\n\n const isFlattenedViewWithNoGroupId = useMemo(() => {\n const { groupIds, items } = selectionState;\n return (\n filterQuery.viewMode === InventoryViewMode.FlattenedView &&\n ((groupIds.length === 1 && groupIds[0] === NO_GROUP_ID) ||\n (items.groupIds.length === 1 && items.groupIds[0] === NO_GROUP_ID))\n );\n }, [filterQuery.viewMode, selectionState]);\n\n const filterQueryWithEventIds = useMemo>(() => {\n const { groupIds, items } = selectionState;\n\n // Clean up the oldPosEventIds for filtering, which is only used for the event inventory page\n if (entityType === ActionOutboxEntityType.Listing) {\n Object.assign(filterQuery as ListingQuery, { oldPosEventIds: null });\n }\n\n // Flattened view, have to pick events from listings\n if (isFlattenedViewWithNoGroupId) {\n if (\n isAllSelected &&\n flattenedIds?.length === unfilteredFlattenedIds?.length\n ) {\n const allEventMappingIds =\n eventsTransformed\n ?.map((ev) => ev.event.viagVirtualId)\n ?.filter(\n (id) =>\n id !== NO_GROUP_ID &&\n (!groupIdSuperSet?.length || groupIdSuperSet.includes(id))\n ) ?? [];\n\n if (entityType === ActionOutboxEntityType.Purchase) {\n return {\n ...filterQuery,\n purchaseMonths: timePeriodPurchasesQuery.data?.map(\n (m) => m.firstOfTimePeriod\n ),\n eventOrMappingIds: allEventMappingIds,\n };\n }\n\n return {\n ...filterQuery,\n eventOrMappingIds: allEventMappingIds,\n };\n } else {\n // Item selections only\n const entityIds = selectionState.items.itemIds;\n return {\n ...filterQuery,\n eventOrMappingIds: [],\n entityIds: entityIds,\n };\n }\n }\n\n // Non-flattened view\n\n // Filter the group ids to the super-set so we don't accidentally include more items than this was meant for\n const filteredGroupIds = !groupIdSuperSet?.length\n ? groupIds\n : groupIds.filter((id) => groupIdSuperSet.includes(id));\n\n if (entityType === ActionOutboxEntityType.Purchase) {\n const unpackedPurchaseIds = new Set();\n const unpackedTicketGroupIds = new Set();\n if (useTicketGroupIds) {\n items.itemIds.forEach((packedId) => {\n const unpackedIds = unpackNumericIds(packedId);\n if (unpackedIds[0]) {\n unpackedPurchaseIds.add(unpackedIds[0]);\n }\n if (unpackedIds[1]) {\n unpackedTicketGroupIds.add(unpackedIds[1]);\n }\n });\n }\n\n const entityIds: number[] | null = useTicketGroupIds\n ? Array.from(unpackedPurchaseIds)\n : items.itemIds.map((id) => parseInt(id, 10));\n\n const ticketGroupIds: number[] | null = useTicketGroupIds\n ? Array.from(unpackedTicketGroupIds)\n : null;\n\n const allEventMappingIds =\n eventsTransformed\n ?.map((ev) => ev.event.viagVirtualId)\n ?.filter(\n (id) =>\n id !== NO_GROUP_ID &&\n (!groupIdSuperSet?.length ||\n !useTicketGroupIds ||\n groupIdSuperSet.includes(id))\n ) ?? [];\n\n return {\n ...filterQuery,\n // If it's a purchase query, use the purchase months\n purchaseMonths: useTicketGroupIds ? undefined : filteredGroupIds,\n eventOrMappingIds: useTicketGroupIds\n ? filteredGroupIds\n : allEventMappingIds,\n entityIds: entityIds,\n ticketGroupIds: ticketGroupIds,\n };\n }\n\n if (eventsTransformed == null) {\n return {\n ...filterQuery,\n eventOrMappingIds: filteredGroupIds,\n entityIds: items.itemIds.map((id) => parseInt(id, 10)),\n };\n }\n\n // We want to make sure we get all the events sharing the same group ids because a single gropu id can be part of a merged event\n const normalizedGroupIdsByMergedEvents = eventsTransformed\n ?.filter((ev) => groupIds.includes(ev.event.viagVirtualId))\n ?.map((ev) => ev.event.viagVirtualId)\n ?.filter((id) => id.length && !id.includes(NO_GROUP_ID));\n\n return {\n ...filterQuery,\n // Get all the event ids that matches the viagogo ids in groupIdsAsViagogoIds\n eventOrMappingIds: normalizedGroupIdsByMergedEvents,\n entityIds: items.itemIds.map((id) => parseInt(id, 10)),\n };\n }, [\n selectionState,\n entityType,\n isFlattenedViewWithNoGroupId,\n groupIdSuperSet,\n eventsTransformed,\n filterQuery,\n isAllSelected,\n flattenedIds?.length,\n unfilteredFlattenedIds?.length,\n timePeriodPurchasesQuery.data,\n useTicketGroupIds,\n ]);\n\n // This is used for the Catchup\n const selectedViagogoVirtualIds = useMemo(() => {\n const { groupIds, items } = selectionState;\n\n // Flattened view, have to pick events from listings\n if (isFlattenedViewWithNoGroupId) {\n if (isAllSelected) {\n return eventsTransformed?.map((ev) => ev.event.viagVirtualId);\n } else {\n const entityIds = items.itemIds;\n return eventsTransformed\n ?.filter((ev) =>\n entityType === ActionOutboxEntityType.Listing\n ? ev.entities.listings?.some((l) =>\n entityIds.includes(l.id.toString())\n )\n : ev.entities.sales?.some((s) =>\n entityIds.includes(s.id.toString())\n )\n )\n ?.map((ev) => ev.event.viagVirtualId)\n ?.filter((id) => id.length && !id.includes(NO_GROUP_ID));\n }\n }\n\n // If the selection has events, use it\n if (groupIds?.length) {\n if (entityType === ActionOutboxEntityType.Purchase) {\n return;\n }\n\n return eventsTransformed\n ?.filter((ev) => groupIds.includes(ev.event.viagVirtualId))\n ?.map((ev) => ev.event.viagVirtualId)\n ?.filter((id) => id.length && !id.includes(NO_GROUP_ID));\n }\n\n return;\n }, [\n entityType,\n eventsTransformed,\n isAllSelected,\n isFlattenedViewWithNoGroupId,\n selectionState,\n ]);\n\n return { filterQueryWithEventIds, selectedViagogoVirtualIds };\n};\n","export const newIntId = () => -new Date().getTime() % 2147483647;\nexport const newBigIntId = () => -new Date().getTime();\nexport const newGuidId = () => crypto.randomUUID();\n","import { isEqual, sampleSize } from 'lodash-es';\n\nfunction getRandomCentroids(dataset: VectorWithData[], k: number) {\n return sampleSize(dataset, k).map((v) => v.vector);\n}\n\nfunction squaredEuclideanDistance(a: Vector, b: Vector) {\n return a.map((_, i) => a[i] - b[i]).reduce((r, e) => r + e * e, 0);\n}\n\nexport type Vector = number[];\n\nexport type VectorWithData = {\n vector: Vector;\n data: T;\n value?: string | null;\n};\n\nexport type KmeansClusteringResults = {\n clusters: Cluster[];\n centroids: Vector[];\n iterations: number;\n converged: boolean;\n};\n\n/**\n * @param dataset\n * @param k Number of clusters\n * @param options\n * @returns\n */\nexport function kmeans(\n dataset: VectorWithData[],\n k: number,\n options: {\n maxIterations?: number;\n initializeCentroids?: (dataset: VectorWithData[], k: number) => Vector[];\n } = {}\n): KmeansClusteringResults {\n if (dataset.length < k) {\n throw new Error(`Invalid dataset length ${dataset.length} < k = ${k}`);\n }\n\n const { maxIterations = 50, initializeCentroids = getRandomCentroids } =\n options;\n\n let prevCentroids: Vector[] | undefined,\n centroids = initializeCentroids(dataset, k);\n let clusters: Cluster[] = [];\n\n let iterations = 0;\n for (\n ;\n iterations < maxIterations && !isEqual(prevCentroids, centroids);\n iterations++\n ) {\n prevCentroids = centroids.slice(0);\n clusters = clusterVectors(dataset, centroids);\n centroids = updateCentroids(dataset, clusters);\n }\n\n return {\n clusters,\n centroids,\n iterations,\n converged: iterations < maxIterations,\n };\n}\n\ntype Cluster = {\n centroid: Vector;\n vectors: VectorWithData[];\n value?: string | null;\n};\n\n/**\n * Assign each vector to a centroid.\n * @param dataset\n * @param centroids\n * @returns\n */\nfunction clusterVectors(dataset: VectorWithData[], centroids: Vector[]) {\n const clusters = centroids.map>((centroid) => ({\n centroid,\n vectors: [],\n }));\n for (const vectorWithData of dataset) {\n let closestCentroidIndex = 0;\n let closestCentroid = centroids[closestCentroidIndex];\n let prevDistance = squaredEuclideanDistance(\n vectorWithData.vector,\n closestCentroid\n );\n for (let i = 1; i < centroids.length; i++) {\n const centroid = centroids[i];\n const distance = squaredEuclideanDistance(\n vectorWithData.vector,\n centroid\n );\n if (distance < prevDistance) {\n prevDistance = distance;\n closestCentroid = centroid;\n closestCentroidIndex = i;\n }\n }\n clusters[closestCentroidIndex].vectors.push(vectorWithData);\n if (vectorWithData.value !== undefined) {\n clusters[closestCentroidIndex].value = vectorWithData.value;\n }\n }\n return clusters;\n}\n\n/**\n * Update centroids to the mean vector of the clusters.\n * @param dataset\n * @param clusters\n * @returns\n */\nfunction updateCentroids(\n dataset: VectorWithData[],\n clusters: Cluster[]\n) {\n return clusters.map((cluster) =>\n cluster.vectors.length > 0\n ? getMeanVector(cluster.vectors)\n : getRandomCentroids(dataset, 1)[0]\n );\n}\n\nfunction getMeanVector(vectors: VectorWithData[]) {\n const meanVector = new Array(vectors[0].vector.length).fill(0);\n for (const vectorWithData of vectors) {\n const { vector } = vectorWithData;\n for (let i = 0; i < vector.length; i++) {\n meanVector[i] = meanVector[i] + vector[i] / vectors.length;\n }\n }\n return meanVector;\n}\n","import {\n AutoPricingInputs,\n BucketType,\n EventWithData,\n GroupingType,\n ListingGroup,\n ListingGroupListingMarketplaceSettings,\n MergeListingGroupInputList,\n RowCompOverride,\n RowGroupSetting,\n Seating,\n UiMoney,\n VenueZoneConfigType,\n ZoneSectionAreaGroupLookup,\n} from 'src/WebApiController';\n\nexport type GroupListingsBodyProps = {\n events: EventWithData[];\n listingGroup?: ListingGroup;\n onEventSelected: (event?: EventWithData) => void;\n isViewingTemplate: boolean;\n};\n\nexport type GroupingTemplateSeating = {\n id: string | number;\n seating: Seating;\n availQty: number | null;\n unitCst: UiMoney | null;\n faceValue: UiMoney | null; // this is just to match the IListingGroupItem interface\n ticketClassId?: number | null;\n priority?: number;\n};\n\nexport type GroupingTemplate = {\n groupId: string;\n groupName: string;\n desiredActiveListings: number;\n deprioritizedQuantities: string[];\n seatings: GroupingTemplateSeating[];\n // This is for when applying to events\n // it's gonna be more efficient to check if a listing matches the group\n seatingsMap?: {\n sectionRowKeys: Record;\n rowIdKeys: Record;\n };\n};\n\nexport type MergeListingGroupInputListFields = MergeListingGroupInputList & {\n templateSettings: {\n groupBy: ListingGroupBy;\n desiredActiveListings: number;\n deprioritizedQuantities: string[];\n groupTemplates: GroupingTemplate[];\n randomizePriority: boolean;\n templateRankPremiums: {\n undercutAbsoluteAmount: number | null;\n undercutRelativeAmount: number | null;\n } | null;\n minActiveListings: number | null;\n maxActiveListings: number | null;\n targetPercentage: number | null;\n };\n eventSettings: {\n groupBys: ListingGroupBy[];\n desiredActiveListings: number;\n minActiveListings: number | null;\n maxActiveListings: number | null;\n targetPercentage: number | null;\n deprioritizedQuantities: string[];\n }[];\n pricingSettingsInputs?: AutoPricingInputs;\n resetListingAutoPricingSettings?: boolean; // Toggle to reset the auto pricing settings within group\n venueZoneConfigType: VenueZoneConfigType;\n combineCornersAndEnds: boolean;\n zoneSectionAreaGroupLookup: ZoneSectionAreaGroupLookup;\n rowCompOffset: number;\n rowGroupSetting: RowGroupSetting;\n sectionGroupCustomRankEnabled: boolean;\n rowCompOverrides: RowCompOverride[];\n};\n\n/**\n * If this is null, the backend will do nothing\n * If it's undefined or empty array, the backend will clear out the values to be null in the db\n * If it has a value, then we will have a value\n */\nexport type BulkEditListingGroupSettingsFields = {\n // pricingSettingsInputs?: AutoPricingInputs | null;\n desiredActiveListings?: number | null;\n deprioritizedQuantities?: string[] | null;\n rankPremiums?: {\n undercutAbsoluteAmount: number | null;\n undercutRelativeAmount: number | null;\n } | null;\n marketplaceSettings?: ListingGroupListingMarketplaceSettings | null;\n pricingSettingsInputs?: AutoPricingInputs;\n};\n\nexport type ListingGroupBy = {\n groupingType: GroupingType;\n numOfClusters?: number;\n bucketOption?: BucketType;\n groupingValue?: string;\n};\n\nexport const ListingGroupingTypesWithClusteringOptions = [\n GroupingType.Row,\n GroupingType.Quantity,\n GroupingType.UnitCost,\n GroupingType.SeatScore,\n];\nexport const ListingGroupingTypesNotSupportingAdditionalGroupBys = [\n GroupingType.Custom,\n GroupingType.None,\n];\n\nexport type GroupListingSortingCriteria = {\n isAdminHold: boolean;\n availableQuantity: number;\n};\n","import { isEmpty } from 'lodash-es';\nimport { getContent, IContentContext } from 'src/contexts/ContentContext';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { LISTING_GROUPING_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { newGuidId } from 'src/utils/idUtils';\nimport { kmeans } from 'src/utils/kmeans';\nimport { getSeatScore } from 'src/utils/seatScoreUtils';\nimport { findTicketClass } from 'src/utils/venueConfigUtils';\nimport { BucketType, EventWithData, GroupingType } from 'src/WebApiController';\nimport {\n Event,\n GroupType,\n IListingGroupItem,\n Listing,\n ListingGroup,\n ListingMarketplaceSetting,\n MergeListingGroupInput,\n SectionInfo,\n SectionScoreOverride,\n} from 'src/WebApiController';\n\nimport {\n GroupingTemplateSeating,\n ListingGroupBy,\n ListingGroupingTypesWithClusteringOptions,\n} from './groupingTypes';\n\nexport const getGroupByData = (\n listing: IListingGroupItem | GroupingTemplateSeating,\n groupingType: GroupingType,\n listingToGroupKey: Record,\n contentContext: IContentContext,\n scoreOverrides?: SectionScoreOverride[] | null,\n sections?: SectionInfo[] | null\n) => {\n const prevKey = listingToGroupKey[listing.id];\n const prevKeyPrefix = prevKey ? `${prevKey.key}|` : '';\n const prevNamePrefix = prevKey ? `${prevKey.name} - ` : '';\n const nameContent = getNameContent(groupingType, contentContext);\n\n switch (groupingType) {\n case GroupingType.Section:\n return {\n key: prevKeyPrefix + listing.seating.section,\n name: prevNamePrefix + `${nameContent} ${listing.seating.section}`,\n value: listing.seating.section,\n };\n case GroupingType.Row:\n return {\n key: listing.seating.rowId\n ? prevKeyPrefix + listing.seating.rowId\n : prevKeyPrefix +\n `${listing.seating.section}__${listing.seating.row}`,\n name: prevNamePrefix + `${nameContent} ${listing.seating.row}`,\n value: listing.seating.row,\n };\n\n case GroupingType.Zone: {\n const tc = findTicketClass(listing.seating, sections);\n return {\n key: prevKeyPrefix + (tc?.id ?? 0),\n name: prevNamePrefix + `${nameContent} ${tc?.name || ''}`,\n value: tc?.name || '',\n };\n }\n case GroupingType.Quantity:\n return {\n key: prevKeyPrefix + listing.availQty,\n name: prevNamePrefix + `${nameContent} ${listing.availQty}`,\n value: listing.availQty + '',\n };\n case GroupingType.UnitCost:\n return {\n key:\n prevKeyPrefix +\n (listing.unitCst?.amt || listing?.faceValue?.amt || 0),\n name:\n prevNamePrefix +\n `${nameContent} ${\n listing.unitCst?.disp ??\n listing?.faceValue?.disp ??\n (listing.unitCst?.amt || listing?.faceValue?.amt)\n }`,\n value: (listing.unitCst?.amt || listing?.faceValue?.amt || 0) + '',\n };\n case GroupingType.SeatScore: {\n const score =\n getSeatScore(listing.seating, scoreOverrides, sections) ?? 0;\n return {\n key: prevKeyPrefix + score,\n name: prevNamePrefix + `${nameContent} ${score}`,\n value: score + '',\n };\n }\n }\n\n return {\n key: prevKeyPrefix + 0,\n name: prevNamePrefix + nameContent,\n value: nameContent,\n };\n};\n\nexport const getNameContent = (\n groupingType: GroupingType,\n contentContext: IContentContext\n) => {\n switch (groupingType) {\n case GroupingType.Section:\n return getContent(ContentId.Section, contentContext);\n case GroupingType.Row:\n return getContent(ContentId.Row, contentContext);\n case GroupingType.Zone:\n return getContent(ContentId.Zone, contentContext);\n case GroupingType.Quantity:\n return getContent(ContentId.UnsoldQty, contentContext);\n case GroupingType.UnitCost:\n return getContent(ContentId.UnitCost, contentContext);\n case GroupingType.SeatScore:\n return getContent(ContentId.SeatScore, contentContext);\n }\n\n return '';\n};\n\nexport const getClusteringData = (\n listing: IListingGroupItem | GroupingTemplateSeating,\n groupingType: GroupingType,\n scoreOverrides?: SectionScoreOverride[] | null,\n sections?: SectionInfo[] | null,\n rowIdToRowOrdinalMap?: Record | undefined\n) => {\n switch (groupingType) {\n case GroupingType.Quantity:\n return listing.availQty;\n case GroupingType.UnitCost:\n return listing.unitCst?.amt ?? 0;\n case GroupingType.SeatScore: {\n const score =\n getSeatScore(listing.seating, scoreOverrides, sections) ?? 0;\n return score;\n }\n case GroupingType.Row:\n // At this point, we should never have a case where listing.seating.rowId is null or\n // a null rowIdToRowOrdinalMap. However, we should have the safety guards in place in case\n return rowIdToRowOrdinalMap?.[listing.seating.rowId ?? 0] ?? 0;\n }\n};\n\nexport const flattenListingGroup = (l?: Listing | null) =>\n l == null\n ? []\n : [\n l,\n ...((l as ListingGroup).groupItems ?? []),\n ...((l as ListingGroup)?.groupItems ?? []).flatMap(\n (l2) => (l2 as ListingGroup)?.groupItems ?? []\n ),\n ].filter((l) => !l.isLtGrp);\n\nexport const filterAndflattenListingGroup =\n (groupFilter = (l: IListingGroupItem) => true) =>\n (l?: Listing | null) =>\n l == null\n ? []\n : [\n l,\n ...((l as ListingGroup).groupItems ?? []),\n ...((l as ListingGroup)?.groupItems ?? [])\n .filter(groupFilter)\n .flatMap((l2) => (l2 as ListingGroup)?.groupItems ?? [])\n .filter(groupFilter),\n ].filter((l) => !l.isLtGrp);\n\nexport const getListingsForMergeListingGroupInput = (\n x: MergeListingGroupInput | null | undefined,\n events: EventWithData[]\n) => {\n const ev = events.find(\n (ev) =>\n ev.event.viagVirtualId ===\n (x?.viagogoEventId?.toString() ?? x?.viagogoMappingId)\n );\n\n return ev?.entities?.listings ?? [];\n};\n\nexport const generateMergeListingGroupInputsForEvents = (\n events: Event[] | null | undefined,\n namePrefix: string,\n listingMarketplaceSettings?: {\n [key: string]: ListingMarketplaceSetting;\n } | null\n) => {\n return (\n events?.map(\n (ev, i) =>\n ({\n listingGroupId: newGuidId(),\n name: `${namePrefix} ${i + 1}`,\n listingGroupItems: [],\n viagogoEventId: ev.viagId,\n viagogoMappingId: ev.mappingId,\n desiredActiveListings: 0,\n minActiveListings: null,\n maxActiveListings: null,\n targetPercentage: null,\n deprioritizedQuantities: null,\n marketplaceSettings: listingMarketplaceSettings\n ? { listingMarketplaceSettings }\n : null,\n groupUndercutSetting: {\n undAbsAmt: null,\n undRelAmt: null,\n actRankUndAbsAmt: null,\n actRankUndRelAmt: null,\n },\n groupingMethods: {\n groupingMethods: [],\n },\n }) as MergeListingGroupInput\n ) ?? []\n );\n};\n\nexport const getAvailableGroupingTypes = (\n prevGroupingTypes: GroupingType[]\n) => {\n const listingGroupTypes = {\n ...LISTING_GROUPING_TO_CID,\n } as Record;\n\n // Do not allow duplicate group-bys\n if (prevGroupingTypes.length) {\n prevGroupingTypes.forEach((t) => {\n delete listingGroupTypes[t];\n });\n\n // Custom is not allowed as follow-up group-bys\n delete listingGroupTypes[GroupingType.Custom];\n } else {\n // None is not allowed as the top group-by\n delete listingGroupTypes[GroupingType.None];\n }\n\n return listingGroupTypes;\n};\n\nexport const getListingGroupsMap = (\n groupBys: ListingGroupBy[],\n contentContext: IContentContext,\n listingsForGrouping: T[],\n scoreOverrides?: SectionScoreOverride[] | null,\n sections?: SectionInfo[] | null,\n rowIdToRowOrdinalMap?: Record | undefined,\n canClusterByRows = false\n) => {\n const result: Record<\n string,\n { name: string; data: T[]; values: (string | null)[] }\n > = {};\n\n if (listingsForGrouping == null || !listingsForGrouping.length) {\n return result;\n }\n\n const listingToGroupKey: Record<\n string,\n { key: string; name: string; values: (string | null)[] }\n > = {};\n const listingGroupState: Record<\n string,\n {\n listingsInBucket: number;\n bucketCounter: number;\n data: GroupingTemplateSeating[];\n }\n > = {};\n\n const nonKmeansGrouping = (groupBy: ListingGroupBy) => {\n return listingsForGrouping.map((l) => {\n const key = getGroupByData(\n l,\n groupBy.groupingType,\n listingToGroupKey,\n contentContext,\n scoreOverrides,\n sections\n );\n return {\n data: [l],\n ...key,\n };\n });\n };\n\n const kmeansGrouping = (groupBy: ListingGroupBy) => {\n const dataset = listingsForGrouping.map((l) => {\n const value =\n getClusteringData(\n l,\n groupBy.groupingType,\n scoreOverrides,\n sections,\n rowIdToRowOrdinalMap\n ) ?? 0;\n return {\n vector: [value],\n data: l,\n value: value + '',\n };\n });\n return kmeans(\n dataset,\n groupBy.numOfClusters ?? 1 // defaults to 1\n ).clusters.flatMap((c, i) => {\n const data = c.vectors.map((d) => d.data);\n if (Object.keys(listingToGroupKey).length === 0) {\n return [\n {\n data: data,\n key: i.toString(),\n name:\n getNameContent(groupBy.groupingType, contentContext) + ' ' + i,\n value: c.value + '',\n },\n ];\n }\n\n // Each cluster needs to permutate with the previous key\n // ie, if the prev group is A, B, C and the new clustering has 1,2, then you will end up with\n // A1, A2, B1, B2, and C1, C2 and then which ones are empty - ignore\n const resultMap = data.reduce(\n (r, l) => {\n const prevKey = listingToGroupKey[l.id];\n const prevKeyPrefix = prevKey ? `${prevKey.key}|` : '';\n const key = prevKeyPrefix + i.toString();\n const name = (prevKey ? `${prevKey.name} - ` : '') + i;\n\n if (!r[key]) {\n r[key] = { name: name, data: [l] };\n } else {\n r[key].data.push(l);\n }\n\n return r;\n },\n {} as Record<\n string,\n {\n name: string;\n data: (IListingGroupItem | GroupingTemplateSeating)[];\n }\n >\n );\n\n return Object.keys(resultMap).map((k) => ({\n data: resultMap[k].data,\n key: k,\n name: resultMap[k].name,\n value: c.value + '',\n }));\n });\n };\n\n const sameSizeGrouping = (groupBy: ListingGroupBy) => {\n // The UI has a guard against this, but adding a check here to ensure no division by zero\n let numberOfBuckets = groupBy.numOfClusters ?? 1;\n if (numberOfBuckets < 1) {\n numberOfBuckets = 1;\n }\n\n // We take ceiling because we want the last bucket to have the remainder\n // i.e. 9 listings, 2 buckets. Bucket 1 should have 5, bucket 2 should have 4\n let listingsPerBucket = Math.ceil(\n listingsForGrouping.length / numberOfBuckets\n );\n\n let bucketCounter = 0;\n return listingsForGrouping.map((l, i) => {\n const prevKey = listingToGroupKey[l.id];\n const prevKeyPrefix = prevKey ? `${prevKey.key}|` : '';\n const prevNamePrefix = prevKey ? `${prevKey.name} - ` : '';\n\n // If prevKey is set then we are in \"ThenBy\" cluase. We should operate on the subset\n // of listings, and not the entire group. This means that we need to keep track of the\n // following values on a per group basis:\n // 1. The number of listings in the group\n // 2. The number of listings we've added to our group sub-bucket so far\n // 3. The group specific bucket counter\n if (prevKey) {\n const listingsInGroupCount = listingGroupState[prevKey.key].data.length;\n listingsPerBucket = Math.ceil(listingsInGroupCount / numberOfBuckets);\n const listingsInBucket =\n listingGroupState[prevKey.key].listingsInBucket;\n\n // Make sure we increment the right bucket counter\n if (listingsInBucket % listingsPerBucket === 0) {\n listingGroupState[prevKey.key].bucketCounter++;\n }\n\n // Increment the number of listings in the bucket\n listingGroupState[prevKey.key].listingsInBucket++;\n\n // Bucket counter state should be maintained per group\n bucketCounter = listingGroupState[prevKey.key].bucketCounter;\n } else {\n // Top level fixed size bucketing scenario. A lot less information we need to keep track of\n if (i % listingsPerBucket === 0) {\n bucketCounter++;\n }\n }\n return {\n key: prevKeyPrefix + bucketCounter,\n name: prevNamePrefix + `Bucket ${bucketCounter}`,\n data: [l],\n value: `${numberOfBuckets}`,\n };\n });\n };\n\n groupBys.forEach((groupBy) => {\n if (groupBy.groupingType === GroupingType.None) return;\n\n const bucketOption = groupBy.bucketOption;\n\n const shouldUseNormalCluster =\n !ListingGroupingTypesWithClusteringOptions.includes(\n groupBy.groupingType\n ) ||\n (groupBy.groupingType === GroupingType.Row && !canClusterByRows);\n\n const clusters = shouldUseNormalCluster\n ? nonKmeansGrouping(groupBy)\n : bucketOption == BucketType.SameSize\n ? sameSizeGrouping(groupBy)\n : kmeansGrouping(groupBy);\n\n clusters.forEach((c) => {\n c.data.forEach((l) => {\n if (!listingToGroupKey[l.id]) {\n listingToGroupKey[l.id] = {\n key: c.key.toString(),\n name: c.name,\n values: [c.value],\n };\n } else {\n listingToGroupKey[l.id].values.push(c.value);\n }\n\n if (!listingGroupState[c.key]) {\n listingGroupState[c.key] = {\n listingsInBucket: 0,\n bucketCounter: 0,\n data: [l],\n };\n } else {\n listingGroupState[c.key].data.push(l);\n }\n });\n });\n });\n\n const listingGroupsMap = listingsForGrouping.reduce(\n (acc, l) => {\n const key = listingToGroupKey[l.id];\n\n if (key) {\n if (!acc[key.key]) {\n acc[key.key] = { name: key.name, data: [l], values: key.values };\n } else {\n acc[key.key].data.push(l);\n }\n }\n return acc;\n },\n {} as Record\n );\n\n return listingGroupsMap;\n};\n\nexport const quantityMatches = (\n quantity: number,\n desiredQuantities: string[] | null\n): boolean => {\n if (isEmpty(desiredQuantities)) return false;\n\n return (\n desiredQuantities?.some((temp) => {\n if (temp.includes('+')) {\n return quantity >= parseInt(temp.replace('+', ''));\n }\n return quantity === parseInt(temp);\n }) ?? false\n );\n};\n\nexport const getQuantitiesOptions = () =>\n ['1', '2', '3', '4', '5', '6', '7', '8+'].reduce(\n (acc, q) => ({\n ...acc,\n [q]: q,\n }),\n {} as Record\n );\n\nexport const sortGroupType = (a: GroupType, b: GroupType) => {\n const order = {\n Invisible: 1,\n FullySold: 2,\n Inactive: 3,\n Active: 4,\n Leader: 5,\n };\n\n // Sort as the reverse order\n return order[b] - order[a];\n};\n","import { useMemo } from 'react';\nimport {\n useFilterQueryState,\n UseFilterQueryStateType,\n} from 'src/components/MainFilterBar/useFilterQueryState';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { flattenListingGroup } from 'src/modals/GroupListings/components/groupingUtils';\nimport { EventWithData } from 'src/WebApiController';\nimport {\n ActionOutboxEntityType,\n Listing,\n ListingQuery,\n} from 'src/WebApiController';\n\ninterface UseInventoryEventBulkActionsState {\n /**\n * Whether all **visible** listings are selected.\n * Even if set to true, some listings can be hidden by table column filters.\n */\n isAllListingsSelected: boolean;\n affectedVisibleListingIds: number[];\n filterQueryWithEventIds: UseFilterQueryStateType;\n}\n\nexport const useInventoryEventBulkActionsState = (\n event?: EventWithData['event']\n): UseInventoryEventBulkActionsState => {\n const { isAllSelected } = useMultiSelectionContext();\n\n const { filterQueryWithEventIds } = useFilterQueryState(\n ActionOutboxEntityType.Listing,\n event?.viagVirtualId ? [event.viagVirtualId] : []\n );\n\n const { eventsTransformed } = useCatalogDataContext();\n\n const listings = useMemo(() => {\n return (eventsTransformed ?? [])\n .flatMap((ev) => ev.entities.listings)\n .flatMap(flattenListingGroup)\n .filter(({ id, isLtGrp }) => id > 0 && !isLtGrp) as Listing[];\n }, [eventsTransformed]);\n\n const affectedVisibleListingIds = useMemo(() => {\n // Else we must respect only the entity Ids and event Ids\n const ids = [...(filterQueryWithEventIds.entityIds ?? [])];\n ids.push(\n ...listings\n .filter((l) =>\n filterQueryWithEventIds.eventOrMappingIds?.includes(l.viagVirtualId)\n )\n .map((l) => l.id)\n );\n return ids;\n }, [\n filterQueryWithEventIds.entityIds,\n filterQueryWithEventIds.eventOrMappingIds,\n listings,\n ]);\n\n return {\n isAllListingsSelected: isAllSelected,\n affectedVisibleListingIds,\n filterQueryWithEventIds,\n };\n};\n","import {\n Modal,\n ModalBody as RSModalBody,\n ModalFooter as RSModalFooter,\n ModalHeader as RSModalHeader,\n} from 'reactstrap';\nimport { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\n// See this PR for information about \"-fake\" classes https://github.com/stubhub/StubHub.PointOfSale/pull/3041\n// .modal-dialog\nexport const StyledModal = styled(Modal)<{\n size?:\n | 'sm'\n | 'm'\n | 'lg'\n | 'xl'\n | 'fullscreen'\n | 'slide-in'\n | 'slide-in-lg'\n | 'slide-left'\n | 'slide-left-sm'\n | 'slide-in-full';\n}>`\n .modal-content {\n border: none;\n }\n\n ${({ size, theme: { media } }) =>\n media.makeMediaQuery(\n media.breakpoints.md,\n `max-width: ${size === 'sm' ? '500px' : '650px'};`\n )}\n\n ${({ size, theme: { media } }) =>\n size !== 'sm' &&\n size !== 'm' &&\n media.makeMediaQuery(media.breakpoints.md, `max-width: 750px;`)}\n\n ${({ size, theme: { media } }) =>\n size !== 'sm' &&\n size !== 'm' &&\n media.makeMediaQuery(media.breakpoints.lg, `max-width: 850px;`)}\n\n ${({ size, theme: { media } }) =>\n size === 'fullscreen' &&\n media.makeMediaQuery(\n media.breakpoints.sm,\n `\n min-width: 100%;\n width: 100%;\n max-width: 100%;\n `\n )}\n \n // See this PR for information about \"-fake\" classes https://github.com/stubhub/StubHub.PointOfSale/pull/3041\n ${({ size }) =>\n (size === 'slide-in' ||\n size === 'slide-in-lg' ||\n size === 'slide-left' ||\n size === 'slide-left-sm' ||\n size === 'slide-in-full') &&\n `\n .modal.fade > &.modal-slide-fake,\n .modal.fade > &.modal-slide-in,\n .modal.fade > &.modal-slide-in-lg,\n .modal.fade > &.modal-slide-in-full,\n .modal.fade > &.modal-slide-left,\n .modal.fade > &.modal-slide-left-sm {\n transition: transform 0.3s ease-out !important;\n min-width: calc(100vw - 16px);\n max-width: calc(100vw - 16px);\n height: calc(100vh - 32px);\n max-height: calc(100vh - 32px);\n margin: 16px auto;\n }\n\n @supports (-webkit-touch-callout: none) {\n .modal.fade > &.modal-slide-fake,\n .modal.fade > &.modal-slide-in,\n .modal.fade > &.modal-slide-in-lg,\n .modal.fade > &.modal-slide-in-full,\n .modal.fade > &.modal-slide-left,\n .modal.fade > &.modal-slide-left-sm {\n max-height: -webkit-fill-available;\n padding-bottom: 16px;\n }\n }\n `}\n\n ${({ size }) =>\n (size === 'slide-in' ||\n size === 'slide-left' ||\n size === 'slide-left-sm' ||\n size === 'slide-in-full') &&\n `\n .modal-body {\n width: 1000px;\n max-width: 100%;\n }\n `}\n\n ${({ size }) =>\n size === 'slide-in-lg' &&\n `\n .modal-body {\n width: 1500px;\n max-width: 100%;\n }\n `}\n\n // Modal type: slide-in, size: sm and above\n ${({ size, theme }) =>\n (size === 'slide-in' ||\n size === 'slide-in-lg' ||\n size === 'slide-in-full' ||\n size === 'slide-left' ||\n size === 'slide-left-sm') &&\n `\n .modal.fade > &.modal-slide-fake > .modal-content,\n .modal.fade > &.modal-slide-in > .modal-content,\n .modal.fade > &.modal-slide-in-lg > .modal-content,\n .modal.fade > &.modal-slide-in-full > .modal-content,\n .modal.fade > &.modal-slide-left > .modal-content,\n .modal.fade > &.modal-slide-left-sm > .modal-content {\n border-radius: 16px;\n height: 100%;\n }\n\n ${ModalHeader} {\n padding: 0 ${vars.spacing.xl};\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n\n ${ModalBody} {\n border-bottom: none;\n }\n\n ${CloseButton} {\n position: relative;\n top: 0;\n right: 0;\n }\n `}\n\n // Modal type: slide-in, size: md and above\n ${({ size, theme: { media } }) =>\n (size === 'slide-in' ||\n size === 'slide-left' ||\n size === 'slide-left-sm') &&\n media.makeMediaQuery(\n media.breakpoints.md,\n `\n .modal.fade > &.modal-slide-fake > .modal-content,\n .modal.fade > &.modal-slide-in > .modal-content,\n .modal.fade > &.modal-slide-left > .modal-content,\n .modal.fade > &.modal-slide-left-sm > .modal-content {\n --bs-modal-inner-border-radius: 0;\n border-radius: 0;\n }\n\n .modal.fade > &.modal-slide-fake,\n .modal.fade > &.modal-slide-in,\n .modal.fade > &.modal-slide-left,\n .modal.fade > &.modal-slide-left-sm {\n margin: 0;\n min-width: 600px; // This is the smallest screen-width supported\n max-width: 95%; // Make the slide-in occupies at most 95% of the screen unless it's smaller than min-width which then becomes full-screen\n min-height: 100%;\n }\n\n .modal.fade.show > &.modal-slide-fake,\n .modal.fade.show > &.modal-slide-in,\n .modal.fade.show > &.modal-slide-left,\n .modal.fade.show > &.modal-slide-left-sm {\n transform: translate(0, 0);\n transition: transform 0.3s ease-in-out;\n display: flex;\n align-items: stretch;\n height: 100%;\n }\n `\n )}\n\n${({ size, theme: { media } }) =>\n size === 'slide-in-full' &&\n media.makeMediaQuery(\n media.breakpoints.md,\n `\n .modal.fade > &.modal-slide-fake > .modal-content,\n .modal.fade > &.modal-slide-in-full > .modal-content {\n --bs-modal-inner-border-radius: 0;\n border-radius: 0;\n }\n\n .modal.fade > &.modal-slide-fake,\n .modal.fade > &.modal-slide-in-full {\n margin: 0;\n min-width: 600px; // This is the smallest screen-width supported\n max-width: 100%; // Make the slide-in occupies at most 100% of the screen unless it's smaller than min-width which then becomes full-screen\n min-height: 100%;\n }\n\n .modal.fade.show > &.modal-slide-fake,\n .modal.fade.show > &.modal-slide-in-full {\n transform: translate(0, 0);\n transition: transform 0.3s ease-in-out;\n display: flex;\n align-items: stretch;\n height: 100%;\n }\n `\n )}\n\n // Modal type: slide-in-lg, size: md and above\n ${({ size, theme: { media } }) =>\n size === 'slide-in-lg' &&\n media.makeMediaQuery(\n media.breakpoints.md,\n `\n .modal.fade > &.modal-slide-fake > .modal-content,\n .modal.fade > &.modal-slide-in-lg > .modal-content {\n --bs-modal-inner-border-radius: 0;\n border-radius: 0;\n }\n\n .modal.fade > &.modal-slide-fake,\n .modal.fade > &.modal-slide-in-lg {\n margin: 0;\n min-width: 1500px; // This is the smallest screen-width supported\n max-width: 95%; // Make the slide-in occupies at most 95% of the screen unless it's smaller than min-width which then becomes full-screen\n min-height: 100%;\n }\n\n .modal.fade.show > &.modal-slide-fake,\n .modal.fade.show > &.modal-slide-in-lg {\n transform: translate(0, 0);\n transition: transform 0.3s ease-in-out;\n display: flex;\n align-items: stretch;\n height: 100%;\n }\n `\n )}\n\n ${({ size, theme: { media } }) =>\n (size === 'slide-in' ||\n size === 'slide-in-lg' ||\n size === 'slide-in-full') &&\n media.makeMediaQuery(\n media.breakpoints.md,\n `\n .modal.fade > &.modal-slide-fake,\n .modal.fade > &.modal-slide-in,\n .modal.fade > &.modal-slide-in-full,\n .modal.fade > &.modal-slide-in-lg {\n position: absolute;\n top: 0;\n right: 0;\n\n transform: translate(50%, 0) scale(1); // Note: translate(100%, 0) is not used because it will cause the modal to be pushed out of the screen and cause jittering when sliding back in\n transition: transform 0.3s ease-in-out;\n }\n `\n )}\n\n ${({ size, theme: { media } }) =>\n (size === 'slide-left' || size === 'slide-left-sm') &&\n media.makeMediaQuery(\n media.breakpoints.md,\n `\n .modal.fade > &.modal-slide-fake,\n .modal.fade > &.modal-slide-left,\n .modal.fade > &.modal-slide-left-sm {\n position: absolute;\n top: 0;\n left: 0;\n\n transform: translate(-50%, 0) scale(1); // Note: translate(-100%, 0) is not used because it will cause the modal to be pushed out of the screen and cause jittering when sliding back in\n transition: transform 0.3s ease-in-out;\n }\n `\n )}\n\n ${({ size, theme: { media } }) =>\n size === 'slide-in' &&\n media.makeMediaQuery(\n media.breakpoints.lg,\n `\n .modal.fade > &.modal-slide-fake,\n .modal.fade > &.modal-slide-in {\n min-width: 1000px;\n max-width: 95%; // Make the slide-in occupies at most 95% of the screen unless it's smaller than min-width which then becomes full-screen\n }\n `\n )}\n\n${({ size, theme: { media } }) =>\n size === 'slide-in-full' &&\n media.makeMediaQuery(\n media.breakpoints.lg,\n `\n .modal.fade > &.modal-slide-in-fake,\n .modal.fade > &.modal-slide-in-full {\n min-width: 1000px;\n max-width: 100%; // Make the slide-in occupies at most 100% of the screen unless it's smaller than min-width which then becomes full-screen\n }\n `\n )}\n\n ${({ size, theme: { media } }) =>\n size === 'slide-in-lg' &&\n media.makeMediaQuery(\n media.breakpoints.lg,\n `\n .modal.fade > &.modal-slide-fake,\n .modal.fade > &.modal-slide-in-lg {\n min-width: 1500px;\n max-width: 95%; // Make the slide-in occupies at most 95% of the screen unless it's smaller than min-width which then becomes full-screen\n }\n `\n )}\n\n ${({ size, theme: { media } }) =>\n size === 'slide-left' &&\n media.makeMediaQuery(\n media.breakpoints.lg,\n `\n .modal.fade > &.modal-slide-fake,\n .modal.fade > &.modal-slide-left {\n min-width: 1000px;\n max-width: 95%; // Make the slide-left occupies at most 95% of the screen unless it's smaller than min-width which then becomes full-screen\n }\n `\n )}\n\n ${({ size, theme: { media } }) =>\n size === 'slide-left-sm' &&\n media.makeMediaQuery(\n media.breakpoints.lg,\n `\n .modal.fade > &.modal-slide-fake,\n .modal.fade > &.modal-slide-left-sm {\n min-width: 200px;\n max-width: 95%; // Make the slide-left-sm occupies at most 95% of the screen unless it's smaller than min-width which then becomes full-screen\n }\n `\n )}\n\n height: -moz-available; /* WebKit-based browsers will ignore this. */\n height: -webkit-fill-available; /* Mozilla-based browsers will ignore this. */\n height: fill-available;\n`;\n\nexport const ModalHeader = styled(RSModalHeader)`\n border-color: ${(props) => props.theme.colors.borderPrimary};\n padding: 0 ${() => vars.spacing.lg};\n\n .modal-title {\n width: 100%;\n }\n`;\n\nexport const CloseButton = styled.div`\n z-index: 1;\n line-height: 1;\n\n @media ${({ theme: { media } }) => `${media.tablet}`} {\n top: ${() => `${vars.spacing.sm}`};\n right: ${() => `${vars.spacing.sm}`};\n }\n\n @media ${({ theme: { media } }) => `${media.desktop}`} {\n top: ${() => `${vars.spacing.m}`};\n right: ${() => `${vars.spacing.m}`};\n }\n`;\n\nexport const ModalBody = styled(RSModalBody)`\n padding: 0;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n`;\n\nexport const ModalBodyHeaderContainer = styled.div`\n padding: ${() => vars.spacing.lg};\n padding-bottom: 0;\n width: 100%;\n\n ${({ theme: { media } }) =>\n media.makeMediaQuery(\n media.breakpoints.md,\n `\n padding: ${vars.spacing.xl};\n padding-bottom: 0;\n `\n )}\n`;\n\nexport const ModalBodyDataContainer = styled.div`\n padding: ${() => vars.spacing.lg};\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n overflow-x: auto;\n\n ${({ theme: { media } }) =>\n media.makeMediaQuery(\n media.breakpoints.md,\n `\n padding: ${vars.spacing.xl};\n `\n )}\n`;\n\nexport const ModalFooter = styled(RSModalFooter)`\n padding: ${() => `${vars.spacing.lg} ${vars.spacing.xl}`};\n border: none;\n`;\n\nexport const Spacer = styled.div`\n width: 10px;\n height: 100%;\n margin: auto;\n background: ${({ theme }) => theme.colors.backgroundPrimary};\n`;\n","import React from 'react';\nimport { vars } from 'src/core/themes';\nimport { CrossIcon } from 'src/svgs/Viagogo';\n\nimport { CloseButton, ModalHeader as StyledModalHeader } from './Modal.styled';\n\nexport const ModalHeader = ({\n onClose,\n children,\n disabled,\n}: {\n onClose?: () => void;\n children: React.ReactNode;\n disabled?: boolean;\n}) => {\n return (\n \n \n \n }\n >\n {children}\n \n );\n};\n","import clsx from 'clsx';\nimport React, { ComponentProps } from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { darkModeRoot } from 'src/app/App.css';\nimport { ErrorBoundaryContextProvider } from 'src/contexts/ErrorBoundaryContext';\nimport { useSiteTheme } from 'src/contexts/SiteTheme/SiteThemeContext';\nimport { ActionOutboxEntityType } from 'src/WebApiController';\n\nimport * as styles from './Modal.css';\nimport { ModalBody, ModalFooter, StyledModal } from './Modal.styled';\nimport { ModalHeader } from './ModalHeader';\n\nexport type FullControlModalProps = Omit<\n ComponentProps,\n 'Body' | 'Header' | 'Footer' | 'ContentWrapper'\n> & { children: React.ReactNode };\n\nexport type ModalProps =\n | ({\n Body: React.ComponentType | JSX.Element;\n Header?: React.ComponentType | JSX.Element;\n Footer?: React.ComponentType | JSX.Element;\n ContentWrapper?: React.FC;\n size?:\n | 'sm'\n | 'lg'\n | 'xl'\n | 'fullscreen'\n | 'slide-in'\n | 'slide-in-lg'\n | 'slide-left'\n | 'slide-left-sm';\n /**\n * Whether to dismiss the dialog when clicking outside of its boundary\n * For message box, setting this to true is the norm.\n * For wizards, we do not want user to accidentally dismiss the entire dialog by clicking elsewhere.\n * Therefore, set this to true with care.\n */\n clickOutsideToClose?: boolean;\n /* When set, the url is appended with a query param = to allow a deep link visible on the browser's address bar */\n deepLinkKey?: string;\n deepLinkValue?: string | number;\n trackViewEntityType?: ActionOutboxEntityType;\n onCloseOverride?: () => void;\n onExit?: () => void;\n } & ComponentProps)\n | FullControlModalProps;\n\nexport const Modal = ({\n Header,\n Body,\n Footer,\n isOpen,\n onClose,\n children,\n clickOutsideToClose,\n backdrop,\n scrollable = true,\n size = 'lg',\n className,\n ...rest\n}: ModalProps) => {\n const hasChildren = React.Children.count(children) > 0;\n const commonModalProps = {\n isOpen: isOpen,\n toggle: onClose,\n fullscreen: 'sm',\n };\n const { isDarkMode } = useSiteTheme();\n\n return (\n \n \n {hasChildren ? (\n children\n ) : (\n <>\n {Header ? (\n \n {asJsxElement(Header)}\n \n ) : null}\n {asJsxElement(Body)}\n {Footer ? {asJsxElement(Footer)} : null}\n \n )}\n \n \n );\n};\n\nconst asJsxElement = (Element: React.ComponentType | JSX.Element) =>\n typeof Element === 'function' ? : Element;\n","import { Path } from '@remix-run/router/history';\nimport { useCallback } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { AppRouteConfigs, MenuItems } from 'src/app/AppRoutes';\nimport { MainRoute } from 'src/navigations/Routes/MainRoute';\n\nimport { EventIdQueryParam } from './constants/constants';\n\nconst QUERIES_TO_KEEP_FOR_DEEPLINK = [EventIdQueryParam];\n\nexport const getDeepLinkUrlPart = (\n queryParamName: string,\n id?: string | number\n): [string, string] | undefined => {\n return id ? [queryParamName, id.toString()] : undefined;\n};\n\nexport const getDeepLinkIdFromUrl = (queryParamName: string, url?: string) => {\n if (url) {\n const urlObj = new URL(url);\n const queryParam = urlObj.searchParams.get(queryParamName);\n if (queryParam) {\n return queryParam;\n }\n }\n\n return '';\n};\n\n/**\n *\n * @param deepLinkKey\n * @param deepLinkValue\n * @param navigate react-router-dom navigate function. Used to update useSearchParams values\n * * when needed.\n */\nexport const addDeepLinkUrlPart = (\n deepLinkKey: string,\n deepLinkValue: string,\n navigate?: (fullPathname: string) => void\n) => {\n const url = new URL(window.location.href);\n // If we have a deep link for this modal, and the url currently doesn't already include it,\n if (\n deepLinkKey &&\n deepLinkValue &&\n url.searchParams.get(deepLinkKey) !== deepLinkValue\n ) {\n url.searchParams.set(deepLinkKey, deepLinkValue);\n if (navigate) {\n navigate(url.href.substring(location.origin.length));\n } else {\n window.history.pushState('', '', url.toString());\n }\n }\n};\n\nexport const getUrlWithDeepLink = (deepLinkKey: string) => {\n const url = new URL(window.location.href);\n if (deepLinkKey) {\n const deepLinkValue = url.searchParams.get(deepLinkKey);\n const queriesToKeep: [string, string][] = [];\n QUERIES_TO_KEEP_FOR_DEEPLINK.forEach((k) => {\n const val = url.searchParams.get(k);\n if (val) {\n queriesToKeep.push([k, val]);\n }\n });\n if (deepLinkValue) {\n //Get href without Query Params\n url.search = '';\n url.searchParams.set(deepLinkKey, deepLinkValue);\n queriesToKeep.forEach(([k, v]) => {\n url.searchParams.set(k, v);\n });\n }\n }\n return url;\n};\n\nexport const useRemoveDeepLinkUrlPart = () => {\n const navigate = useNavigate();\n\n return useCallback(\n (deepLinkKey: string) => {\n if (deepLinkKey) {\n const url = new URL(window.location.href);\n url.searchParams.delete(deepLinkKey);\n const path: Path = {\n hash: url.hash,\n search: url.search,\n pathname: url.pathname,\n };\n navigate(path);\n }\n },\n [navigate]\n );\n};\n\nexport const removeDeepLinkUrlPartsFromRelativeUrl = (\n relativeUrl: string,\n deepLinkKeys: string[]\n) => {\n if (relativeUrl && deepLinkKeys.length) {\n const url = new URL(\n window.location.protocol + '//' + window.location.host + relativeUrl\n );\n deepLinkKeys.forEach((key) => {\n url.searchParams.delete(key);\n });\n return url.pathname + url.search + url.hash;\n }\n\n return undefined;\n};\n\nexport const removeDeepLinkUrlPartFromRelativeUrl = (\n relativeUrl?: string,\n deepLinkKey?: string\n) => {\n if (relativeUrl && deepLinkKey) {\n const url = new URL(\n window.location.protocol + '//' + window.location.host + relativeUrl\n );\n url.searchParams.delete(deepLinkKey);\n return url.pathname + url.search + url.hash;\n }\n\n return undefined;\n};\n\nexport const getPathFromMainRoute = (mainRoute: MainRoute) => {\n return Object.values(AppRouteConfigs).find((r) => r.view === mainRoute)!\n .path!;\n};\n\nexport const getFullUrl = (\n mainRoute: MainRoute,\n deepLinkKey?: string,\n deepLinkValue?: string | number\n) => {\n let relativeUrl = getPathFromMainRoute(mainRoute);\n relativeUrl =\n relativeUrl?.length > 0 && relativeUrl[0] !== '/'\n ? '/' + relativeUrl\n : relativeUrl;\n\n const returnUrl = new URL(\n window.location.protocol + '//' + window.location.host + relativeUrl\n );\n\n if (deepLinkKey && deepLinkValue) {\n returnUrl.searchParams.set(deepLinkKey, deepLinkValue.toString());\n }\n\n return returnUrl;\n};\n\nexport const getCurrentViewPath = (route: MainRoute) => {\n let result = Object.values(AppRouteConfigs).find((r) => r.view === route);\n if (result) {\n return result.path!;\n }\n\n result = Object.values(MenuItems).find((r) => r.view === route);\n if (result) {\n return result.path!;\n }\n\n return null;\n};\n\nexport const navigateToMainRoute = (\n mainRouteAccess: MainRoute,\n navigate: (url: string) => void\n) => {\n const url = getCurrentViewPath(mainRouteAccess);\n if (url) {\n if (url.startsWith('https://')) {\n // to be safe we should only redirect to full HTTPS\n window.location.assign(url);\n } else {\n navigate(url);\n }\n }\n};\n\n// Check if the current page is in full event view\nexport const isInFullPageEventView = (mainRoute: MainRoute) => {\n return (\n mainRoute === MainRoute.SalesEvent ||\n mainRoute === MainRoute.PurchasesEvent ||\n mainRoute === MainRoute.InventoryEvent\n );\n};\n","import { createContext, useCallback, useEffect, useState } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { Modal, ModalProps } from 'src/modals/Modal';\nimport {\n addDeepLinkUrlPart,\n useRemoveDeepLinkUrlPart,\n} from 'src/utils/deepLinkUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { ActivityLogClient } from 'src/WebApiController';\n\nimport { useAppContext } from '../AppContext';\nimport { useErrorBoundaryContext } from '../ErrorBoundaryContext';\n\ntype ModalContextType = {\n isModalOpen: boolean;\n closeModal: (forceClose?: boolean | React.SyntheticEvent) => void;\n setModal: (props: ModalProps) => void;\n updateModal: (props: Partial) => void;\n};\n\nexport const ModalContext = createContext({\n isModalOpen: false,\n setModal: () => {},\n updateModal: () => {},\n closeModal: () => {},\n});\n\n/**\n * Adds a modal to the page where the provider is added\n * Provides utils to set all or update part of the modal\n * The modal is assumed to be open when it contains content\n */\nexport const ModalProvider = ({ children }: { children: React.ReactNode }) => {\n const [modalProps, setModalProps] = useState(null);\n const { deepLinkKey, deepLinkValue } = modalProps ?? {};\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n const removeDeepLinkUrlPart = useRemoveDeepLinkUrlPart();\n const navigate = useNavigate();\n\n useEffect(() => {\n if (deepLinkKey && deepLinkValue) {\n addDeepLinkUrlPart(deepLinkKey, deepLinkValue, navigate);\n }\n }, [deepLinkKey, deepLinkValue, navigate]);\n\n const handleCloseModal = (forceClose?: boolean | React.SyntheticEvent) => {\n if (forceClose !== true && modalProps?.onCloseOverride) {\n modalProps.onCloseOverride();\n } else {\n closeModal();\n }\n };\n\n const setModal = useCallback(\n (modal: ModalProps) => {\n if (modal.deepLinkValue && modal.trackViewEntityType) {\n tryInvokeApi(\n async () => {\n await new ActivityLogClient(\n activeAccountWebClientConfig\n ).trackEntityView(modal.deepLinkValue, modal.trackViewEntityType);\n },\n (error) => {\n trackError('ActivityLogClient.trackEntityView', error, {\n deepLinkValue: modal.deepLinkValue,\n trackViewEntityType: modal.trackViewEntityType,\n });\n }\n );\n }\n setModalProps(modal);\n },\n [activeAccountWebClientConfig, trackError]\n );\n\n const closeModal = useCallback(() => {\n // TODO: refactor deeplink to a hook and pass as onClose where used\n removeDeepLinkUrlPart(deepLinkKey);\n setModalProps(null);\n }, [deepLinkKey, removeDeepLinkUrlPart]);\n\n const updateModal = useCallback(\n (partial) => {\n if (modalProps) {\n setModalProps({ ...modalProps, ...partial });\n }\n },\n [modalProps]\n );\n\n const isModalOpen = !!modalProps;\n\n return (\n \n {children}\n {modalProps && (\n \n )}\n \n );\n};\n","import React, { createContext, useContext, useState } from 'react';\n\nimport { ModalProvider } from '../ModalContext';\n\n// DialogId is an enum that stores the unique DialogIds to pre\nexport enum DialogId {\n AddToGroup = 'add-to-group-dialog',\n AutoPricingStrategy = 'auto-pricing-strategy',\n Confirm = 'confirm',\n BulkEditListingSettings = 'bulk-edit-listing-settings-dialog',\n BulkUpdateAutoFulfill = 'bulk-update-auto-fulfill-dialog',\n BulkEditTags = 'bulk-edit-tags-dialog',\n BulkChangeFloorCeilingActions = 'bulk-change-floor-ceiling-actions',\n BulkAddListingAdminHold = 'bulk-add-listing-admin-hold-dialog',\n BulkEditMarketplacePrices = 'bulk-edit-marketplace-prices-dialog',\n BulkEditListingPrice = 'bulk-edit-listing-price-dialog',\n BulkDeleteSeatSeavers = 'bulk-delete-seat-savers-dialog',\n BulkEditSeatTraits = 'bulk-edit-seat-traits-dialog',\n BulkEditBroadcastSettings = 'bulk-edit-broadcast-settings-dialog',\n BulkRemoveHold = 'bulk-remove-hold-dialog',\n BulkChangeTicketTypeRule = 'bulk-change-ticket-type-rule-dialog',\n BulkMarkAsFulfilled = 'bulk-mark-as-fulfilled-dialog',\n BulkEditPurchaseSettings = 'bulk-edit-purchase-settings-dialog',\n BulkEditCommission = 'bulk-edit-commission-dialog',\n BulkChangeEvent = 'bulk-change-event-dialog',\n BulkEditMarketplaceSeating = 'bulk-edit-marketplace-seating-dialog',\n BulkEditDeliveryType = 'bulk-edit-delivery-type-dialog',\n BulkDeleteTicketGroup = 'bulk-delete-ticket-group-dialog',\n BulkEditSalesSettings = 'bulk-edit-sales-settings-dialog',\n BulkCancelPurchase = 'bulk-cancel-purchase-dialog',\n BulkUpdateInternalNotes = 'bulk-update-internal-notes-dialog',\n BulkRemovePredilivery = 'bulk-remove-predelivery-dialog',\n BulkUngroupListings = 'bulk-ungroup-listings-dialog',\n BulkBackfillDeliverySettings = 'bulk-backfill-delivery-settings-dialog',\n BulkConvertPurchasePayments = 'bulk-convert-purchase-payments-dialog',\n ResetFulfillment = 'reset-fulfillment-dialog',\n BulkUpdateListingGroupSettings = 'bulk-update-listing-group-settings-dialog',\n BulkMarkPurchaseAsPaid = 'bulk-mark-purchase-as-paid-dialog',\n BulkEditAutoPricingSettings = 'bulk-edit-auto-pricing-settings-dialog',\n BulkUpdatePurchaseCurrencyCode = 'bulk-update-purchase-currency-code-dialog',\n BulkWasteTickets = 'bulk-waste-tickets-dialog',\n AddMarketplacePaymentLineToSale = 'add-marketplace-payment-line-to-sale',\n BulkMarkSaleAsPaid = 'bulk-mark-sale-as-paid',\n}\n\ntype DialogStore = {\n id: DialogId;\n content: React.ReactNode;\n};\n\ninterface DialogContextType {\n openDialog: (id: DialogId, options: Omit) => void;\n closeDialog: (id: DialogId) => void;\n}\n\nconst DialogContext = createContext({\n openDialog: () => {},\n closeDialog: () => {},\n});\n\nexport const useDialogContext = () => useContext(DialogContext);\n\n// DialogProvider is a context provider that manages the state of the dialogs\nexport const DialogProvider = ({ children }: { children: React.ReactNode }) => {\n const [dialogs, setDialogs] = useState([]);\n\n const openDialog = (id: DialogId, options: Omit) => {\n setDialogs((prevDialogs) => [...prevDialogs, { ...options, id }]);\n };\n\n const closeDialog = (id: DialogId) => {\n setDialogs((prevDialogs) =>\n prevDialogs.filter((dialog) => dialog.id !== id)\n );\n };\n\n return (\n \n {/* ModalProvider needs to be inside DialogProvider, as modals can launch dialogs, but not the other way around */}\n \n {children}\n {dialogs.map(({ id, content }) => (\n
    {content}
    \n ))}\n
    \n
    \n );\n};\n\nexport default DialogContext;\n","import { DialogId, useDialogContext } from './DialogContext';\n\ntype DialogPropsWithCallbacks = PropsType & {\n onClosed?: () => void;\n onCancel?: () => void;\n};\n\nexport function useDialog(\n dialogId: DialogId,\n DialogComponent: React.ComponentType>\n) {\n const { openDialog, closeDialog } = useDialogContext();\n\n const openDialogWithProps = (props: DialogPropsWithCallbacks) => {\n openDialog(dialogId, {\n content: (\n {\n if (props.onClosed) {\n props.onClosed();\n } else {\n closeDialog(dialogId);\n }\n }}\n onCancel={() => {\n if (props.onCancel) {\n props.onCancel();\n } else {\n closeDialog(dialogId);\n }\n }}\n />\n ),\n });\n };\n\n return {\n openDialog: openDialogWithProps,\n closeDialog: () => closeDialog(dialogId),\n };\n}\n","import { useAppContext } from 'src/contexts/AppContext';\nimport { hasAnyOfPermissions } from 'src/utils/userPermissionUtils';\nimport { Permission } from 'src/WebApiController';\n\nexport const useUserHasAnyOfPermissions = (...permissions: Permission[]) => {\n const { loginContext } = useAppContext();\n\n return hasAnyOfPermissions(loginContext?.user, permissions);\n};\n","import { Venue } from 'src/WebApiController';\n\nexport const getFormattedLocation = (venue: Venue): string => {\n const { city, state: stateProvince, country } = venue;\n return `${city ? `${city}, ` : ''}${\n stateProvince ? `${stateProvince}, ` : ''\n }${country?.code || ''}`;\n};\n\n/**\n * Convert size in bytes (number) to human readable string with units.\n * E.g. 1024 -> '1 KB'\n * @param numBytes number of bytes\n * @param precision precision in the formatted string\n * @param addSpace whether to add space between number and unit in the output string\n * @returns\n */\nexport const getFormattedBytesSize = (\n numBytes: number,\n precision = 3,\n addSpace = true\n) => {\n const UNITS = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];\n if (Math.abs(numBytes) < 1)\n return numBytes + (addSpace ? ' ' : '') + UNITS[0];\n\n const exponent = Math.min(\n Math.floor(Math.log10(numBytes < 0 ? -numBytes : numBytes) / 3),\n UNITS.length - 1\n );\n\n const n = Number(\n ((numBytes < 0 ? -numBytes : numBytes) / 1000 ** exponent).toPrecision(\n precision\n )\n );\n\n return (\n (numBytes < 0 ? '-' : '') + n + (addSpace ? ' ' : '') + UNITS[exponent]\n );\n};\n\n/**\n * Decodes base64 encoded string and returns a byte array.\n * @param base64String\n * @returns\n */\nexport function decodeBase64(base64String: string): Uint8Array {\n const byteCharacters = atob(base64String);\n const byteNumbers = new Array(byteCharacters.length);\n\n for (let i = 0; i < byteCharacters.length; i++) {\n byteNumbers[i] = byteCharacters.charCodeAt(i);\n }\n\n const byteArray = new Uint8Array(byteNumbers);\n return byteArray;\n}\n","import { useQuery, UseQueryResult } from '@tanstack/react-query';\nimport { useMemo } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { PosSelectProps } from 'src/core/POS/PosSelect';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { PurchaseClient, PurchaseVendor } from 'src/WebApiController';\n\nexport type UsePurchaseVendorSelectorOptions = {\n disabled?: boolean;\n additionalOptions?: Record;\n additionalOptionsPosition?: 'top' | 'bottom';\n placeholderText?: string | ContentId;\n};\n\nexport const usePurchaseVendorSelector = ({\n disabled,\n additionalOptions,\n additionalOptionsPosition = 'bottom',\n placeholderText,\n}: UsePurchaseVendorSelectorOptions): {\n query: UseQueryResult;\n availableVendors: Record;\n posSelectProps: Pick<\n PosSelectProps,\n | 'placeholderText'\n | 'valueOptionsContent'\n | 'sortMode'\n | 'searchable'\n | 'sortFn'\n | 'loading'\n >;\n} => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n\n const shouldQuery =\n !disabled && activeAccountWebClientConfig.activeAccountId != null;\n const query = useQuery({\n queryKey: [\n 'getAccessibleVendors',\n activeAccountWebClientConfig.activeAccountId,\n ],\n queryFn: () => {\n if (!shouldQuery) {\n return null;\n }\n return tryInvokeApi(\n () => {\n return new PurchaseClient(\n activeAccountWebClientConfig\n ).getAccessibleVendors(false, false);\n },\n (error) => {\n trackError('PurchaseClient.getAccessibleVendors', error);\n }\n );\n },\n\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n staleTime: Infinity,\n networkMode: 'offlineFirst',\n });\n\n const availableVendors = useMemo(() => {\n const dataSorted = query.data?.toSorted(\n (a: PurchaseVendor, b: PurchaseVendor) => a.name.localeCompare(b.name)\n );\n\n const results = dataSorted?.reduce(\n (r, cur) => {\n r[cur.id] = cur;\n return r;\n },\n {} as Record\n );\n\n return results ?? {};\n }, [query.data]);\n\n const availableVendorsOptions = useMemo(() => {\n const dataSorted = query.data?.toSorted(\n (a: PurchaseVendor, b: PurchaseVendor) => a.name.localeCompare(b.name)\n );\n\n const results = dataSorted?.reduce(\n (r, cur) => {\n r[cur.id] = cur.name;\n return r;\n },\n (additionalOptions && additionalOptionsPosition === 'top'\n ? additionalOptions\n : {}) as Record\n );\n\n return {\n ...(additionalOptionsPosition === 'top' ? additionalOptions : {}),\n ...(results ?? {}),\n ...(additionalOptionsPosition === 'bottom' ? additionalOptions : {}),\n };\n }, [query.data, additionalOptions, additionalOptionsPosition]);\n\n return {\n query,\n availableVendors,\n posSelectProps: {\n loading: query.isLoading,\n placeholderText: placeholderText ?? ContentId.ChooseVendor,\n valueOptionsContent: availableVendorsOptions,\n sortMode: 'ascending',\n searchable: true,\n sortFn: (a: string, b: string) => {\n const addOptionTexts = Object.values(additionalOptions ?? {});\n if (addOptionTexts.includes(a)) {\n return additionalOptionsPosition === 'top' ? -1 : 1;\n }\n if (addOptionTexts.includes(b)) {\n return additionalOptionsPosition === 'top' ? 1 : -1;\n }\n return a.localeCompare(b);\n },\n },\n };\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { useMemo } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { REACT_QUERY_CACHE_MAX_AGE_IN_MS } from 'src/utils/constants/constants';\nimport { DeliveryType, TicketClient, TicketType } from 'src/WebApiController';\n\nexport function useTicketTypes(deliveryType?: DeliveryType | null) {\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n const mappingsQuery = useQuery({\n queryKey: [\n 'getAllDeliveryTypeTicketTypeMappings',\n activeAccountWebClientConfig.activeAccountId,\n ],\n queryFn: () =>\n new TicketClient(\n activeAccountWebClientConfig\n ).getAllDeliveryTypeTicketTypeMappings(),\n refetchOnWindowFocus: false,\n staleTime: REACT_QUERY_CACHE_MAX_AGE_IN_MS,\n meta: {\n onError: (error: ErrorTypes) => {\n showErrorDialog(\n 'TicketClient.getAllDeliveryTypeTicketTypeMappings',\n error\n );\n },\n },\n });\n\n const ticketTypes = useMemo(() => {\n if (mappingsQuery.isLoading) return [];\n\n const mapping =\n deliveryType == null\n ? null\n : mappingsQuery.data?.find((m) => m.deliveryType === deliveryType)\n ?.ticketTypes;\n\n return mapping\n ? Object.entries(mapping)\n .toSorted((a, b) => a[1][0] - b[1][0])\n .map((a) => a[0] as TicketType)\n : Object.values(TicketType);\n }, [deliveryType, mappingsQuery.data, mappingsQuery.isLoading]);\n\n return { ticketTypes };\n}\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const CustomDeliveryIcon = (props: PosIconProps) => {\n return (\n \n \n \n \n \n \n \n \n \n );\n};\n","export const splitIntoGroups = (array: T[], itemsPerGroup: number) => {\n array = array.slice();\n const result = [];\n while (array.length) {\n result.push(array.splice(0, itemsPerGroup));\n }\n return result;\n};\n\nexport const randomizeInPlace = (values: unknown[]) => {\n if (values.length <= 1) {\n return values;\n }\n if (values.length === 2) {\n // when there's only 2, guarantee to randomize by swapping\n [values[0], values[1]] = [values[1], values[0]];\n return values;\n }\n\n for (let i = values.length - 1; i > 0; i--) {\n const j = Math.floor(Math.random() * (i + 1));\n [values[i], values[j]] = [values[j], values[i]];\n }\n\n return values;\n};\n\nexport const moveElements = (\n array: T[],\n fromIndex: number,\n toIndex: number\n): T[] => {\n // Ensure the indices are within array bounds\n if (\n fromIndex < 0 ||\n fromIndex >= array.length ||\n toIndex < 0 ||\n toIndex >= array.length\n ) {\n return array;\n }\n if (fromIndex === toIndex) {\n return array;\n }\n\n // Remove the element from the fromIndex position\n const element = array.splice(fromIndex, 1)[0];\n\n // Insert the element at the toIndex position\n array.splice(toIndex, 0, element);\n\n return [...array];\n};\n\nexport const calculatePercentile = (\n values: number[],\n percentile: number\n): number => {\n if (values.length === 0) {\n return 0;\n }\n\n // Calculate the rank (N * (p / 100)) - adjust for 0-based index\n const rank = (values.length * percentile) / 100.0 - 0.5;\n if (rank <= 0) {\n // If rank is less than or equal to 0, take the first element\n return values[0];\n }\n\n if (rank >= values.length - 1) {\n // If rank is greater than or equal to the last index, take the last element\n return values[values.length - 1];\n }\n\n // Interpolate between the two surrounding elements\n const lowerIndex = Math.floor(rank);\n const upperIndex = Math.ceil(rank);\n const fraction = rank - lowerIndex;\n const lowerValue = values[lowerIndex];\n const upperValue = values[upperIndex];\n\n const percentileValue = lowerValue + fraction * (upperValue - lowerValue);\n return percentileValue;\n};\n","import { ReactNode } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { MobileQRIcon } from 'src/svgs';\nimport { CustomDeliveryIcon } from 'src/svgs/CustomDeliveryIcon';\nimport {\n BarcodeIcon,\n IconsFill,\n IconsProps,\n MobileTransferIcon,\n PaperTicketOutlineIcon,\n PdfIcon,\n PrintAtHomeIcon,\n TicketAlertOutlineIcon,\n WalletOutlineIcon,\n} from 'src/svgs/Viagogo';\nimport {\n DeliveryType,\n TicketType,\n TicketTypePriority,\n} from 'src/WebApiController';\n\nimport { moveElements } from './arrayUtils';\nimport { ContentId } from './constants/contentId';\nimport { TICKET_TYPE_TO_CID } from './constants/contentIdMaps';\n\nexport const getTicketTypeIcon = (\n type: TicketType | null,\n fill: IconsFill,\n showIconTitle = true\n) => {\n const props = {\n title: showIconTitle ? (type ?? TicketType.Custom) : undefined,\n fill: fill,\n size: vars.iconSize.m,\n align: 'middle',\n } as IconsProps;\n\n switch (type) {\n case TicketType.Barcode:\n return ;\n case TicketType.ETicket:\n return ;\n case TicketType.QRCode:\n return ;\n case TicketType.Paper:\n return ;\n case TicketType.Transfer:\n return ;\n case TicketType.Season:\n return ;\n case TicketType.ETicketUrl:\n case TicketType.SMPWallet:\n return ;\n case TicketType.Custom:\n default:\n return ;\n }\n};\n\nexport const getTicketTypeIcons = (fill: IconsFill) => {\n return Object.keys(typeof TicketType).reduce(\n (r, t) => {\n r[t as TicketType] = getTicketTypeIcon(t as TicketType, fill);\n return r;\n },\n {} as Record\n );\n};\n\nexport const isPriorityBlocked = (p: TicketTypePriority) => {\n return p.isBlocked || p.priority == null;\n};\n\nexport const getTicketTypeLabel = (type: TicketType | null) => {\n if (!type) {\n return ;\n }\n\n return ;\n};\n\nexport const getDefaultTicketType = (\n deliveryType: DeliveryType\n): TicketType => {\n switch (deliveryType) {\n case DeliveryType.InApp:\n return TicketType.Transfer;\n\n case DeliveryType.PDF:\n return TicketType.ETicket;\n\n case DeliveryType.Paper:\n return TicketType.Paper;\n\n case DeliveryType.MemberCard:\n return TicketType.Season;\n case DeliveryType.Wallet:\n return TicketType.ETicketUrl;\n default:\n return TicketType.Custom;\n }\n};\n\nexport const getDeliveryTypeIcon = (\n deliveryType?: DeliveryType | null,\n topPriTicketType?: TicketType | null,\n fill?: IconsFill,\n showIconTitle = true\n) => {\n if (topPriTicketType) {\n return getTicketTypeIcon(\n topPriTicketType,\n fill ?? IconsFill.currentColor,\n showIconTitle\n );\n }\n\n const props = {\n title: showIconTitle ? deliveryType : undefined,\n fill: fill ?? IconsFill.currentColor,\n size: vars.iconSize.m,\n align: 'middle',\n } as IconsProps;\n\n switch (deliveryType) {\n case DeliveryType.InApp:\n return ;\n\n case DeliveryType.PDF:\n return ;\n\n case DeliveryType.Paper:\n return ;\n\n case DeliveryType.MemberCard:\n return ;\n\n case DeliveryType.Wallet:\n return ;\n\n case DeliveryType.Custom:\n return ;\n\n default:\n return ;\n }\n};\n\nexport const sortPriorityOrders = (\n a: TicketTypePriority,\n b: TicketTypePriority\n) => {\n // blocked always go last\n if (a.isBlocked && !b.isBlocked) {\n return 1;\n }\n if (!a.isBlocked && b.isBlocked) {\n return -1;\n }\n return a.priority - b.priority;\n};\n\n// Normally we don't need this, but just in case existing data from DB is already corrupted\nexport const backfillTicketTypePriorityOrders = (\n ticketTypes: TicketType[],\n ticketTypePriorities: TicketTypePriority[]\n) => {\n ticketTypes.forEach((tt) => {\n if (!ticketTypePriorities.find((to) => to.ticketType === tt)) {\n ticketTypePriorities.push({\n ticketType: tt,\n priority: null,\n } as unknown as TicketTypePriority);\n }\n });\n\n ticketTypePriorities.forEach((to, i) => {\n if (!to.priority && !to.isBlocked) {\n // For those missing value we put to the end\n to.priority = i + ticketTypePriorities.length;\n }\n });\n};\n\nexport const BLOCKED_PRIORITY = -1;\n\nexport const shiftTicketTypePriority = (\n priorityOrderBefore: TicketTypePriority[],\n ticketType: TicketType,\n priority: number // starting from one\n): TicketTypePriority[] => {\n priorityOrderBefore = priorityOrderBefore.toSorted(sortPriorityOrders);\n\n const fromIndex = priorityOrderBefore.findIndex(\n (p) => p.ticketType === ticketType\n );\n\n const isBlocked = priority === BLOCKED_PRIORITY;\n const toIndex = isBlocked ? priorityOrderBefore.length - 1 : priority - 1;\n\n priorityOrderBefore[fromIndex].isBlocked = isBlocked;\n priorityOrderBefore[fromIndex].priority = isBlocked ? 0 : priority;\n\n const priorityOrderAfter = moveElements(\n priorityOrderBefore,\n fromIndex,\n toIndex\n ).map((to, i) => {\n if (to.isBlocked) {\n return to;\n }\n return {\n ...to,\n isBlocked: false,\n priority: i + 1,\n };\n });\n\n return priorityOrderAfter;\n};\n","import { isEmpty } from 'lodash-es';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { roundToPrecision } from 'src/utils/numberFormatter';\nimport { BLOCKED_PRIORITY } from 'src/utils/ticketTypeUtils';\nimport {\n DeliveryType,\n SyncCenterSettings,\n TicketType,\n TicketTypePriorityOrder,\n TicketTypeRule,\n} from 'src/WebApiController';\n\nimport { SyncCenterFieldValues } from './SyncCenter.types';\n\nexport const getTicketTypePriorityOptions = (len: number) => {\n const options: { [key: string]: string } = {\n [ContentId.ResetAll]: ContentId.ResetAll,\n [ContentId.OnlyThis]: ContentId.OnlyThis,\n [`${BLOCKED_PRIORITY}`]: ContentId.Blocked,\n };\n for (let i = 1; i <= len; i++) {\n const order = i.toString();\n options[order] = order;\n }\n return options;\n};\n\nexport const getListingPackQuantityOptions = (len: number) => {\n const options: { [key: string]: string } = {};\n for (let i = 1; i <= len; i++) {\n options[i] = `${i}+`;\n }\n return options;\n};\n\nexport function toSyncCenterFieldValues({\n ticketTypeRules,\n ...settings\n}: SyncCenterSettings): SyncCenterFieldValues {\n const fieldValues: SyncCenterFieldValues = { ...settings };\n fieldValues.ticketTypeRules = {};\n if (ticketTypeRules) {\n for (const { deliveryType, ticketTypePriorityOrders } of ticketTypeRules) {\n if (deliveryType != null) {\n const ticketTypePriorityOrderMap: {\n [key in TicketType]?: number;\n } = {};\n for (const {\n ticketType,\n priorityOrder,\n blocked = false,\n } of ticketTypePriorityOrders) {\n if (blocked) {\n ticketTypePriorityOrderMap[ticketType] = BLOCKED_PRIORITY;\n } else if (priorityOrder != null) {\n ticketTypePriorityOrderMap[ticketType] = priorityOrder;\n }\n }\n fieldValues.ticketTypeRules[deliveryType] = ticketTypePriorityOrderMap;\n }\n }\n }\n /* JavaScript has a bug where 0.07 * 100 = 7.00000000001 (and various similar problems exists)\n The way is to realize how many maximum decimals we need and just round about that out\n */\n if (fieldValues.priceFloor) {\n fieldValues.priceFloor = roundToPrecision(fieldValues.priceFloor! * 100, 2);\n }\n if (fieldValues.marketplaceSettings) {\n for (let i = 0; i < fieldValues.marketplaceSettings.length; i++) {\n if (fieldValues.marketplaceSettings[i].markup) {\n fieldValues.marketplaceSettings[i].markup = roundToPrecision(\n fieldValues.marketplaceSettings[i].markup! * 100,\n 3\n );\n }\n\n if (fieldValues.marketplaceSettings[i].sellerFee) {\n fieldValues.marketplaceSettings[i].sellerFee = roundToPrecision(\n fieldValues.marketplaceSettings[i].sellerFee! * 100,\n 3\n );\n }\n }\n }\n\n return fieldValues;\n}\n\nexport function toSyncCenterSettings({\n ticketTypeRules,\n ...fieldValues\n}: SyncCenterFieldValues): SyncCenterSettings {\n const settingsTicketTypeRules: TicketTypeRule[] = [];\n if (ticketTypeRules) {\n for (const [key, ticketTypePriorityOrderMap] of Object.entries(\n ticketTypeRules\n )) {\n if (ticketTypePriorityOrderMap) {\n const ticketTypePriorityOrders: TicketTypePriorityOrder[] = [];\n for (const [key, value] of Object.entries(ticketTypePriorityOrderMap)) {\n if (value) {\n ticketTypePriorityOrders.push({\n ticketType: key as TicketType,\n priorityOrder: value === -1 ? null : value,\n blocked: value === -1 ? true : null,\n });\n }\n }\n if (ticketTypePriorityOrders.length > 0) {\n settingsTicketTypeRules.push({\n deliveryType: key as DeliveryType,\n ticketTypePriorityOrders,\n });\n }\n }\n }\n }\n /* Again, JavaScript has a bug where 0.7 * 0.01 = 0.006999999999999999 (and various similar problems exists)\n The way is to realize how many maximum decimals we need (e.g. check in DB) and just round about that out\n */\n if (fieldValues.priceFloor) {\n fieldValues.priceFloor = roundToPrecision(\n fieldValues.priceFloor! * 0.01,\n 4\n );\n }\n if (fieldValues.marketplaceSettings) {\n for (let i = 0; i < fieldValues.marketplaceSettings.length; i++) {\n if (fieldValues.marketplaceSettings[i].markup) {\n fieldValues.marketplaceSettings[i].markup = roundToPrecision(\n fieldValues.marketplaceSettings[i].markup! * 0.01,\n 5\n );\n }\n if (fieldValues.marketplaceSettings[i].sellerFee) {\n fieldValues.marketplaceSettings[i].sellerFee = roundToPrecision(\n fieldValues.marketplaceSettings[i].sellerFee! * 0.01,\n 5\n );\n }\n }\n }\n\n const settings: SyncCenterSettings = {\n ...fieldValues,\n ticketTypeRules: settingsTicketTypeRules,\n };\n return settings;\n}\n\nexport const setValueAsNumber = (value: string) =>\n value === '' || value == null ? null : Number(value);\n\nexport const setValueAsDecimalNumber = (value: string) =>\n value === '' || value == null ? null : Number(value) / 100;\n","import { Fragment, useCallback, useMemo } from 'react';\nimport {\n Content,\n getContent,\n useContentContext,\n} from 'src/contexts/ContentContext';\nimport { PosSelect } from 'src/core/POS/PosSelect';\nimport { useTicketTypes } from 'src/hooks/api/useTicketTypes';\nimport { getTicketTypePriorityOptions } from 'src/navigations/Routes/Settings/Views/SyncCenter/SyncCenter.utils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { TICKET_TYPE_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport {\n backfillTicketTypePriorityOrders,\n BLOCKED_PRIORITY,\n shiftTicketTypePriority,\n sortPriorityOrders,\n isPriorityBlocked,\n} from 'src/utils/ticketTypeUtils';\nimport {\n DeliveryType,\n TicketType,\n TicketTypeOverride,\n TicketTypePriority,\n} from 'src/WebApiController';\n\nimport * as styles from './TicketTypePriorityInput.css';\n\nexport const TicketTypePriorityInput = ({\n deliveryType,\n ticketTypeRules,\n onTicketTypeRulesChange,\n disabled,\n}: {\n deliveryType: DeliveryType | null;\n ticketTypeRules?: TicketTypeOverride | null;\n onTicketTypeRulesChange: (ticketTypeRules: TicketTypeOverride | null) => void;\n disabled?: boolean;\n}) => {\n const { ticketTypes } = useTicketTypes(deliveryType);\n const contentContext = useContentContext();\n\n const onOnlyThisChange = useCallback(\n (ticketType: TicketType) => {\n const ticketTypePriorityOrdersNew: TicketTypePriority[] = ticketTypes.map(\n (tt) => {\n if (tt === ticketType) {\n return {\n ticketType,\n priority: 1,\n isBlocked: false,\n };\n }\n return {\n ticketType: tt,\n priority: 0,\n isBlocked: true,\n };\n }\n );\n\n onTicketTypeRulesChange({\n overrides: [\n {\n deliveryType: deliveryType ?? DeliveryType.InApp,\n ticketTypePriorities: ticketTypePriorityOrdersNew,\n },\n ],\n });\n },\n [deliveryType, onTicketTypeRulesChange, ticketTypes]\n );\n\n const onResetAll = useCallback(() => {\n onTicketTypeRulesChange(null);\n }, [onTicketTypeRulesChange]);\n\n const defaultTicketTypePriorityOrders: TicketTypePriority[] = useMemo(\n () =>\n ticketTypes.map((tt, i) => ({\n ticketType: tt,\n priority: i + 1,\n isBlocked: false,\n })),\n [ticketTypes]\n );\n\n const overridesForDeliveryType = ticketTypeRules?.overrides?.find(\n (o) => o.deliveryType === deliveryType\n );\n\n const onPriorityChange = useCallback(\n (val: string, ticketType: TicketType) => {\n if (val === ContentId.OnlyThis) {\n onOnlyThisChange(ticketType);\n return;\n }\n if (val === ContentId.ResetAll) {\n onResetAll();\n return;\n }\n\n const priorityOrderBefore =\n overridesForDeliveryType?.ticketTypePriorities ??\n defaultTicketTypePriorityOrders;\n backfillTicketTypePriorityOrders(ticketTypes, priorityOrderBefore);\n\n const priorityOrderAfter = shiftTicketTypePriority(\n priorityOrderBefore,\n ticketType,\n Number(val)\n );\n\n const ticketTypePriorityOrdersNew = ticketTypes.map((tt, ii) => {\n const to = priorityOrderAfter.find((to) => to.ticketType === tt);\n\n if (to) {\n return { ...to };\n }\n\n // This should never happen, but just in case\n return {\n ticketType: tt,\n priority: ii + ticketTypes.length,\n isBlocked: false,\n };\n });\n\n onTicketTypeRulesChange({\n overrides: [\n {\n deliveryType: deliveryType ?? DeliveryType.InApp,\n ticketTypePriorities: ticketTypePriorityOrdersNew,\n },\n ],\n });\n },\n [\n defaultTicketTypePriorityOrders,\n deliveryType,\n onOnlyThisChange,\n onResetAll,\n onTicketTypeRulesChange,\n overridesForDeliveryType?.ticketTypePriorities,\n ticketTypes,\n ]\n );\n\n // This is used for display only - the ticketTypes variable is ordered by default priority\n // so we don't want to alter that\n const {\n ticketTypesOrderedByPriority,\n numBlockedTicketTypes,\n isEmptyTicketTypesOverridesFromResponse,\n } = useMemo(() => {\n const ticketTypePriorityOverrides = [\n ...(overridesForDeliveryType?.ticketTypePriorities ?? []),\n ]\n .filter((to) => to.ticketType != null)\n .map((to) => ({\n ...to,\n // If the priority is null (which is actually broken data), it is effectively blocked\n isBlocked: isPriorityBlocked(to),\n }));\n\n let numBlockedTicketTypes =\n ticketTypePriorityOverrides.filter((to) => to.isBlocked).length ?? 0;\n\n const orderedTicketTypePriority = ticketTypePriorityOverrides\n .toSorted(sortPriorityOrders)\n .map((to) => to.ticketType);\n\n // this need to happen when data is corrupted or overrides only got partially returned from backend\n // or emtpy overrides returned from backedn\n const missingTicketTypePriority = ticketTypes.filter(\n (tt) => !orderedTicketTypePriority.includes(tt)\n );\n\n // if overrides are partially returned, treat the missing ones as Blocked if any\n if (ticketTypePriorityOverrides.length > 0) {\n numBlockedTicketTypes += missingTicketTypePriority.length ?? 0;\n }\n\n return {\n ticketTypesOrderedByPriority: orderedTicketTypePriority.concat(\n missingTicketTypePriority\n ),\n numBlockedTicketTypes,\n isEmptyTicketTypesOverridesFromResponse:\n ticketTypePriorityOverrides.length == 0,\n };\n }, [overridesForDeliveryType?.ticketTypePriorities, ticketTypes]);\n\n return (\n
    \n {ticketTypesOrderedByPriority.map((ticketType, i) => {\n const priorityOrder =\n overridesForDeliveryType?.ticketTypePriorities.find(\n (to) => to.ticketType === ticketType\n );\n\n const isBlocked = isEmptyTicketTypesOverridesFromResponse\n ? false // if the backend responded with empty, then the priority will be default and not blocked\n : priorityOrder == null || isPriorityBlocked(priorityOrder);\n\n /**\n * UI will make the ticket type priorty contiguous, changing and saving the priority from website\n * will change the priority value on the backend (also when it map to multiple backend ticket type),\n * but the order of the priority would still retain.\n * */\n const uiTicketPriority =\n ticketTypesOrderedByPriority.indexOf(ticketType) + 1;\n return (\n \n
    \n \n
    \n
    \n onPriorityChange(val, ticketType)}\n />\n
    \n
    \n );\n })}\n
    \n );\n};\n","/* IMPORTANT - whenever you add a new one here\n You need to add a handling for it in the BulkEditStatusPurchasePopover.tsx\n */\nexport const PURCHASE_BULK_UPDATE_GENERAL_SETTINGS_UPDATE_KEY =\n 'general-settings-event-purchases';\nexport const PURCHASE_BULK_UPDATE_COMMISSION_UPDATE_KEY =\n 'commission-event-purchases';\nexport const PURCHASE_BULK_UPDATE_TAGS_UPDATE_KEY = 'tags-event-purchases';\nexport const PURCHASE_BULK_UPDATE_INTERNAL_NOTES_UPDATE_KEY =\n 'update-internal-notes-purchases';\nexport const PURCHASE_BULK_UPLOAD_PURCHASE_KEY = `upload-csv-puchases`;\nexport const PURCHASE_BULK_CANCEL_UPDATE_KEY = `cancel-puchases`;\nexport const PURCHASE_BULK_UPDATE_DELIVERY_TYPE_UPDATE_KEY =\n 'update-delivery-type-purchases';\nexport const PURCHASE_BULK_UPDATE_SEAT_TRAITS_UPDATE_KEY =\n 'update-seat-traits-purchases';\nexport const TICKET_GROUP_BULK_DELETE_UPDATE_KEY = `delete-ticket-groups`;\nexport const PURCHASE_BULK_BACKFILL_DELIVERY_SETTINGS_KEY = `backfill-delivery-settings-purchases`;\nexport const PURCHASE_BULK_CONVERT_PAYMENTS_KEY = 'convert-payments-purchases';\n\nexport const PURCHASE_BULK_MARK_AS_PAID_KEY = 'bulk-mark-as-paid-purchases';\nexport const PURCHASE_BULK_UPDATE_PURCHASE_CURRENCY_CODE_KEY =\n 'bulk-update-purchase-currency-code';\n\n// There's a very similar contentId: TicketGroupBulkEditPurchaseWarning\n// and this one is not worthy to be a content\n// This is a temporary message that lives with BulkUpdateIndividualTicketGroup feature flag\n// for a temporary fix. Can be removed once BulkUpdateIndividualTicketGroup is GA\nexport const TicketGroupBulkEditPurchaseWarningTemporaryMessage =\n 'Performing a bulk action on the selected purchase lines will affect the entire purchase order.';\n","import { ComponentProps } from 'react';\nimport { vars } from 'src/core/themes';\nimport { DownloadIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { ButtonWithIcon } from './ButtonWithIcon';\n\nexport const DownloadButton = ({\n textContentId,\n iconOnlyMode,\n variant,\n ...props\n}: Omit, 'icon'>) => {\n return (\n \n }\n iconOnlyMode={iconOnlyMode}\n variant={variant}\n textContentId={textContentId || ContentId.Download}\n />\n );\n};\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport const DnDFileUploaderLabel = styled.label`\n ${({ theme: { media } }) =>\n `${media.makeMediaQuery(\n media.breakpoints.md,\n `padding: ${vars.spacing.xl};`\n )}`}\n`;\n\nexport const SVGWrapper = styled.div`\n margin-bottom: ${() => `${vars.spacing.m}`};\n`;\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport const SelectedFileWrapper = styled.div`\n display: flex;\n flex-direction: row;\n margin-top: ${() => `${vars.spacing.m}`};\n align-items: center;\n`;\n\nexport const FileName = styled.div`\n ${(props) => props.theme.typography.getStyles('subtitle2')}\n`;\n\nexport const IconWrapper = styled.div`\n padding: ${() =>\n `0 ${vars.spacing.sm} ${vars.spacing.xs} ${vars.spacing.sm}`};\n`;\n","import React from 'react';\nimport { IconButton } from 'src/components/Buttons';\nimport { CrossIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport {\n FileName,\n IconWrapper,\n SelectedFileWrapper,\n} from './SelectedFile.styled';\n\nexport const SelectedFile = ({\n children,\n onRemove,\n}: {\n children: React.ReactNode;\n onRemove: () => void;\n}) => {\n return (\n \n {children}\n \n }\n />\n \n \n );\n};\n","import clsx from 'clsx';\nimport React, {\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { Content, useContentContext } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { AddFileIcon } from 'src/svgs/AddFileIcon';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { FormatContentIds } from 'src/utils/constants/formatContentIdDataMap';\n\nimport * as styles from './DnDFileUploader.css';\nimport { DnDFileUploaderLabel, SVGWrapper } from './DnDFileUploader.styled';\nimport { SelectedFile } from './SelectedFile';\n\nfunction preventDefaults(e: React.SyntheticEvent) {\n e.preventDefault();\n e.stopPropagation();\n}\n\nexport interface DnDFileUploaderExternalContext {\n selectFiles: () => void; // Opens HTML file picker\n isDragging: boolean;\n handleDrag: (e: React.DragEvent) => void;\n handleDrop: (e: React.DragEvent) => void;\n}\n\ninterface DnDFileUploaderProps {\n onChange?: (files: File[]) => void; // called with all selected files\n onNewFilesSelected?: (files: File[]) => void; // called only with new selected files\n acceptedFileTypes?: string[];\n multiple?: boolean;\n disabled?: boolean;\n maxFileSize?: number;\n showSelectedFiles?: boolean;\n useLabelV2Styles?: boolean;\n setExternalContext?: (context: DnDFileUploaderExternalContext) => void;\n highlightDropBoxOnDragging?: boolean;\n}\n\nexport const DnDFileUploader = ({\n onChange,\n multiple,\n disabled,\n acceptedFileTypes = [],\n maxFileSize,\n showSelectedFiles = true,\n useLabelV2Styles = false,\n onNewFilesSelected,\n setExternalContext,\n highlightDropBoxOnDragging = true,\n}: DnDFileUploaderProps) => {\n const { formattedContentResolver } = useContentContext();\n\n const isMobile = useMatchMedia('mobile');\n const inputRef = useRef(null);\n const [errorMsg, setErrorMsg] = useState(null);\n const [isDragging, setIsDragging] = useState(false);\n const [files, setFiles] = useState([]);\n const acceptProp =\n acceptedFileTypes?.length > 0\n ? {\n accept: acceptedFileTypes.join(', '),\n }\n : {};\n\n const callbacksRef = useRef<\n Pick\n >({\n onChange,\n onNewFilesSelected,\n });\n\n callbacksRef.current = {\n onChange,\n onNewFilesSelected,\n };\n\n const maxFileSizeErrorMsg = useMemo(() => {\n if (maxFileSize == null) return null;\n\n return formattedContentResolver(\n FormatContentId.MaxAllowedFileSizeMb,\n [(maxFileSize / 1024 / 1024).toFixed(0)],\n FormatContentIds[FormatContentId.MaxAllowedFileSizeMb].defaultValue\n ) as string;\n }, [formattedContentResolver, maxFileSize]);\n\n useEffect(() => {\n callbacksRef.current.onChange?.(files);\n }, [files]);\n\n const onBtnClick = useCallback(() => {\n // trigger the hidden input\n inputRef?.current?.click();\n }, []);\n\n const handleDrag = useCallback(\n (e: React.DragEvent) => {\n preventDefaults(e);\n\n const { type } = e;\n\n if (type === 'dragenter' || type === 'dragover') {\n setIsDragging(true);\n } else if (type === 'dragleave') {\n setIsDragging(false);\n }\n },\n [setIsDragging]\n );\n\n const updateSelectedFiles = useCallback(\n (newFiles: FileList | null) => {\n if (newFiles?.length) {\n callbacksRef.current.onNewFilesSelected?.(Array.from(newFiles));\n if (multiple) {\n // If multiple, add on to already selected files\n setFiles((prevFiles) => [...prevFiles, ...Array.from(newFiles)]);\n } else {\n // Else, replace existing files with the new selected file\n setFiles([newFiles[0]]);\n }\n }\n },\n [multiple]\n );\n\n const handleDrop = useCallback(\n (e: React.DragEvent) => {\n preventDefaults(e);\n\n setIsDragging(false);\n const newFiles = e.dataTransfer?.files;\n\n if (maxFileSize != null) {\n const files = Array.from(newFiles || []);\n if (files.some((f) => f.size > maxFileSize)) {\n setErrorMsg(maxFileSizeErrorMsg);\n return;\n }\n }\n\n setErrorMsg(null);\n\n updateSelectedFiles(newFiles);\n },\n [maxFileSize, maxFileSizeErrorMsg, updateSelectedFiles]\n );\n\n const handleChange = (e: React.SyntheticEvent) => {\n preventDefaults(e);\n const target = e.target as HTMLInputElement;\n\n setIsDragging(false);\n\n const newFiles = target?.files;\n\n if (maxFileSize != null) {\n const files = Array.from(newFiles || []);\n if (files.some((f) => f.size > maxFileSize)) {\n setErrorMsg(maxFileSizeErrorMsg);\n return;\n }\n }\n\n setErrorMsg(null);\n updateSelectedFiles(newFiles);\n };\n\n const onRemoveFile = (index: number) => {\n const newFiles = [...files];\n newFiles.splice(index, 1);\n setFiles(newFiles);\n\n inputRef!.current!.value = newFiles.map((f) => f.name).join(',');\n };\n\n // Set external context if needed\n useEffect(() => {\n setExternalContext?.({\n isDragging,\n handleDrag,\n handleDrop,\n selectFiles: () => {\n inputRef.current?.click();\n },\n });\n }, [handleDrag, handleDrop, isDragging, setExternalContext]);\n\n return (\n
    \n \n \n \n \n \n \n {!isMobile && (\n <>\n
    \n \n
    \n
    \n \n
    \n \n )}\n\n \n \n \n \n
    \n \n {showSelectedFiles &&\n files.map((file: File, i: number) => (\n onRemoveFile(i)}>\n {file.name}\n \n ))}\n {errorMsg ? (\n {errorMsg}\n ) : null}\n \n );\n};\n","import { useCallback } from 'react';\nimport {\n BulkEditStage,\n useBulkEditHubContext,\n} from 'src/contexts/BulkEditHubContext';\nimport {\n ActionOutboxEntityType,\n BulkActionType,\n BulkEditProgress,\n} from 'src/WebApiController';\n\n/**\n * Needs to be in sync with the method in C#\n * GetMethodName in BackgroundActionService.cs\n */\nexport const parseBulkEditMethodName = (methodName: string) => {\n const parts = methodName.split('-');\n return {\n entityType: parts[0] as ActionOutboxEntityType,\n bulkActionType: parts[1] as BulkActionType,\n };\n};\n\nexport function useBulkEditHub(\n entityType: ActionOutboxEntityType,\n bulkEditAction: BulkActionType,\n updateKey: string,\n onBulkEditDone?: (\n progress: BulkEditProgress,\n errors: string[]\n ) => Promise\n) {\n const {\n bulkEditHub,\n progress,\n errors,\n warnings,\n mainDialogOpened,\n stage,\n setStage,\n preview,\n setPreview,\n setCurJob,\n setProgress,\n setErrors,\n setWarnings,\n setMainDialogOpened,\n retryableEntities,\n progressBeforeRetry,\n clearRetryStates,\n } = useBulkEditHubContext();\n\n const initJob = useCallback(() => {\n setProgress(undefined);\n setErrors([]);\n setWarnings([]);\n setMainDialogOpened(true);\n setPreview(undefined);\n setStage(BulkEditStage.Idle);\n clearRetryStates();\n setCurJob({\n entityType,\n action: bulkEditAction,\n updateKey,\n onBulkEditDone,\n });\n }, [\n bulkEditAction,\n clearRetryStates,\n entityType,\n onBulkEditDone,\n setCurJob,\n setErrors,\n setMainDialogOpened,\n setPreview,\n setProgress,\n setStage,\n setWarnings,\n updateKey,\n ]);\n\n return {\n bulkEditHub,\n progress,\n errors,\n warnings,\n mainDialogOpened,\n stage,\n preview,\n initJob,\n retryableEntities,\n progressBeforeRetry,\n clearRetryStates,\n };\n}\n","import md5 from 'md5';\n\nimport { decodeBase64 } from './format';\n\nexport const downloadFile = (\n fileName: string,\n content: string,\n contentType: string | undefined,\n isBase64 = false\n) => {\n const blob = new Blob([isBase64 ? decodeBase64(content) : content], {\n type: contentType,\n });\n downloadFileFromBlob(fileName, blob);\n};\n\nexport const downloadFileFromUrl = (fileName: string, url: string) => {\n const a = document.createElement('a');\n a.href = url;\n a.download = fileName;\n document.body.appendChild(a);\n a.click();\n window.URL.revokeObjectURL(url);\n document.body.removeChild(a);\n};\n\nexport const downloadFileFromBlob = (fileName: string, data: Blob) => {\n const url = window.URL.createObjectURL(data);\n const a = document.createElement('a');\n a.href = url;\n a.download = fileName;\n document.body.appendChild(a);\n a.click();\n window.URL.revokeObjectURL(url);\n document.body.removeChild(a);\n};\n\nexport const getFileHash = async (file: File): Promise => {\n return md5(new Uint8Array(await file.arrayBuffer()));\n};\n","import { ReactNode } from 'react';\nimport {\n BulkEditStage,\n useBulkEditHubContext,\n} from 'src/contexts/BulkEditHubContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nexport type BulkEditHeaderProps = {\n headerText: ReactNode;\n};\n\nexport const BulkEditHeader = ({ headerText }: BulkEditHeaderProps) => {\n const { stage } = useBulkEditHubContext();\n return (\n \n {headerText}{' '}\n {stage === BulkEditStage.GettingPreview ? (\n <>\n {' - '}\n \n \n ) : stage === BulkEditStage.Preview ? (\n <>\n {' - '}\n \n \n ) : (\n <>\n )}\n \n );\n};\n","import { useCallback } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { Button, Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { downloadFileFromBlob } from 'src/utils/fileUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { PurchaseClient } from 'src/WebApiController';\n\nexport type RequestEventDetailsViewProps = {\n isRequestingEventDetails: boolean;\n setIsRequestingEventDetails: (isOpen: boolean) => void;\n setIsLoading: (isLoading: boolean) => void;\n};\n\nexport function RequestEventDetailsView({\n isRequestingEventDetails,\n setIsRequestingEventDetails,\n setIsLoading,\n}: RequestEventDetailsViewProps) {\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const onAnswer = useCallback(\n (hasEventId: boolean) => {\n setIsLoading(true);\n tryInvokeApi(\n async () => {\n const file = await new PurchaseClient(\n activeAccountWebClientConfig\n ).downloadPurchaseFileTemplate(hasEventId);\n\n if (file) {\n downloadFileFromBlob(\n file.fileName ?? 'purchase-creation-template.csv',\n file.data\n );\n }\n },\n (error) => {\n showErrorDialog('PurchaseClient.downloadPurchaseFileTemplate', error);\n },\n () => {\n setIsLoading(false);\n setIsRequestingEventDetails(false);\n }\n );\n },\n [\n activeAccountWebClientConfig,\n setIsRequestingEventDetails,\n setIsLoading,\n showErrorDialog,\n ]\n );\n\n return (\n isRequestingEventDetails && (\n <>\n \n \n {\n onAnswer(false);\n }}\n >\n \n \n {\n onAnswer(true);\n }}\n >\n \n \n \n \n )\n );\n}\n","import { HubConnectionState } from '@microsoft/signalr';\nimport { useQueryClient } from '@tanstack/react-query';\nimport { ComponentProps, useCallback, useState } from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { CancelButton } from 'src/components/Buttons';\nimport { DownloadButton } from 'src/components/Buttons/DownloadButton';\nimport {\n bulkEditInProgress,\n BulkEditStatus,\n} from 'src/components/common/BulkActions/BulkEditStatus';\nimport { PURCHASE_BULK_UPLOAD_PURCHASE_KEY } from 'src/components/Purchases/PurchaseActionDropdown';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useBulkEditHubContext } from 'src/contexts/BulkEditHubContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { usePurchaseDataContext } from 'src/contexts/PurchaseDataContext';\nimport { PURCHASE_TIME_PERIOD_CONTAINER_QUERY_KEY } from 'src/contexts/PurchaseDataContext/PurchaseDataContext.constants';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { DnDFileUploader } from 'src/core/POS/DnDFileUploader';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { Button, Stack } from 'src/core/ui';\nimport { useBulkEditHub } from 'src/hooks/useBulkEditHub';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { downloadFileFromBlob } from 'src/utils/fileUtils';\nimport {\n ListingCatalogMetricsQueryKey,\n ListingCatalogQueryKey,\n} from 'src/utils/inventoryUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n BulkActionType,\n BulkEditProgress,\n BulkEditPurchaseClient,\n BulkEditStep,\n Feature,\n PurchaseClient,\n} from 'src/WebApiController';\n\nimport { BulkEditHeader } from '../common/BulkEditHeader';\nimport { RequestEventDetailsView } from './components/RequestEventDetailsView';\n\nexport type BulkUploadPurchaseDialogProps = ComponentProps & {\n onCancel: () => void;\n};\n\nexport function BulkUploadPurchaseDialog({\n onCancel,\n ...rest\n}: BulkUploadPurchaseDialogProps) {\n const queryClient = useQueryClient();\n\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n const [isLoading, setIsLoading] = useState(false);\n const [uploadedFile, setUploadeFile] = useState();\n const [isRequestingEventDetails, setIsRequestingEventDetails] =\n useState(false);\n const { setActivePosEntity } = useActivePosEntityContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n refreshCatalog,\n } = useCatalogDataContext();\n const { refreshData } = usePurchaseDataContext();\n const { setSelectionMode } = useMultiSelectionContext();\n const { setProgress, setPreview, setMainDialogOpened } =\n useBulkEditHubContext();\n\n const onBulkEditProgressDone = useCallback(async () => {\n setActivePosEntity(0);\n queryClient.refetchQueries({\n queryKey: [ListingCatalogQueryKey],\n type: 'all',\n });\n queryClient.refetchQueries({\n queryKey: [ListingCatalogQueryKey],\n type: 'all',\n });\n queryClient.refetchQueries({\n queryKey: [ListingCatalogMetricsQueryKey],\n type: 'all',\n });\n queryClient.refetchQueries({\n queryKey: [\n PURCHASE_TIME_PERIOD_CONTAINER_QUERY_KEY,\n activeAccountWebClientConfig.activeAccountId,\n ],\n type: 'all',\n });\n\n if (refreshData) {\n await refreshData(true);\n }\n if (refreshExpandedListItems) {\n await refreshCatalog();\n await refreshExpandedListItems();\n }\n }, [\n activeAccountWebClientConfig.activeAccountId,\n queryClient,\n refreshCatalog,\n refreshData,\n refreshExpandedListItems,\n setActivePosEntity,\n ]);\n\n const onCancelDialog = useCallback(async () => {\n setIsRequestingEventDetails(false);\n\n setIsRefreshing(true);\n setActivePosEntity(0);\n if (refreshData) {\n await refreshData(true);\n }\n if (refreshExpandedListItems) {\n await refreshCatalog();\n await refreshExpandedListItems();\n }\n setIsRefreshing(false);\n // progress kept to allow the BulkEditStatusPopover to show the result\n\n onCancel();\n }, [\n onCancel,\n refreshCatalog,\n refreshData,\n refreshExpandedListItems,\n setActivePosEntity,\n ]);\n\n const onClose = useCallback(\n async (\n newProgress?: BulkEditProgress,\n closeMainDialogForPopover?: boolean\n ) => {\n if (newProgress?.step === BulkEditStep.Done) {\n setSelectionMode(undefined);\n if (closeMainDialogForPopover) {\n setMainDialogOpened(false);\n } else {\n setProgress(undefined);\n setPreview(undefined);\n }\n onCancelDialog();\n }\n },\n [\n onCancelDialog,\n setMainDialogOpened,\n setPreview,\n setProgress,\n setSelectionMode,\n ]\n );\n\n const onBulkEditDone = useCallback(\n async (doneProgress: BulkEditProgress, finalErrors: string[]) => {\n if (finalErrors.length === 0 && doneProgress.step === BulkEditStep.Done) {\n await onBulkEditProgressDone();\n onClose(doneProgress, true);\n }\n },\n [onBulkEditProgressDone, onClose]\n );\n\n const { bulkEditHub, progress, errors, warnings, initJob } = useBulkEditHub(\n ActionOutboxEntityType.Purchase,\n BulkActionType.UploadPurchaseFile,\n PURCHASE_BULK_UPLOAD_PURCHASE_KEY,\n onBulkEditDone\n );\n\n const hasBackgroundBulkEditFeature =\n bulkEditHub?.state === HubConnectionState.Connected;\n const hasBulkDownloadEventPromptFeature = useUserHasFeature(\n Feature.BulkDownloadEventPrompt\n );\n\n const [isRefreshing, setIsRefreshing] = useState(false);\n\n const onUploadPurchaseFile = useCallback(() => {\n if (!uploadedFile) {\n return;\n }\n\n setIsLoading(true);\n tryInvokeApi(\n async () => {\n const result = await new BulkEditPurchaseClient(\n activeAccountWebClientConfig\n ).importPurchaseFromFile(\n PURCHASE_BULK_UPLOAD_PURCHASE_KEY,\n hasBackgroundBulkEditFeature,\n {\n data: uploadedFile,\n fileName: uploadedFile!.name,\n }\n );\n\n if (!hasBackgroundBulkEditFeature) {\n if (result.success) {\n onCancel();\n } else {\n showErrorDialog(\n 'PurchaseClient.importPurchaseFromFile',\n {\n message: result.errors.join('\\n'),\n },\n {\n trackErrorData: { uploadedFile },\n }\n );\n }\n }\n },\n (error) => {\n showErrorDialog('PurchaseClient.importPurchaseFromFile', error, {\n trackErrorData: { uploadedFile },\n });\n },\n () => {\n setIsLoading(false);\n }\n );\n }, [\n activeAccountWebClientConfig,\n hasBackgroundBulkEditFeature,\n onCancel,\n showErrorDialog,\n uploadedFile,\n ]);\n\n const onDownloadTemplateClick = useCallback(() => {\n setIsRequestingEventDetails(true);\n }, []);\n\n const onDownloadTemplateClickNoPrompt = useCallback(() => {\n setIsLoading(true);\n tryInvokeApi(\n async () => {\n const file = await new PurchaseClient(\n activeAccountWebClientConfig\n ).downloadPurchaseFileTemplate(true);\n\n if (file) {\n downloadFileFromBlob(\n file.fileName ?? 'purchase-creation-template.csv',\n file.data\n );\n }\n },\n (error) => {\n showErrorDialog('PurchaseClient.downloadPurchaseFileTemplate', error);\n },\n () => setIsLoading(false)\n );\n }, [activeAccountWebClientConfig, showErrorDialog]);\n\n return (\n <>\n {\n initJob();\n }}\n onClosed={() => {\n setMainDialogOpened(false);\n if (progress) {\n setSelectionMode(undefined);\n }\n // Call the outside one if there is one\n rest.onClosed?.();\n }}\n header={\n }\n />\n }\n footer={\n <>\n \n {(progress?.step !== BulkEditStep.Done ||\n Boolean(progress?.failureCount)) && (\n {\n onUploadPurchaseFile();\n }}\n >\n {progress?.failureCount ? (\n \n ) : (\n \n )}\n \n )}\n \n }\n onCancel={isLoading ? undefined : onCancelDialog}\n >\n {hasBulkDownloadEventPromptFeature ? (\n \n {isLoading && !isRequestingEventDetails ? (\n \n ) : (\n \n {isRequestingEventDetails ? (\n \n ) : (\n \n )}\n files[0] && setUploadeFile(files[0])}\n multiple={false}\n acceptedFileTypes={['.csv']}\n />\n \n )}\n \n ) : (\n \n {isLoading ? (\n \n ) : (\n \n \n files[0] && setUploadeFile(files[0])}\n multiple={false}\n acceptedFileTypes={['.csv']}\n />\n \n )}\n \n )}\n \n \n );\n}\n","import { ComponentProps } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { IconsFill, UploadIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { BulkUploadPurchaseDialog } from './BulkUploadPurchaseDialog';\n\nexport type LaunchBulkUploadPurchaseDialogProps = ComponentProps<\n typeof Button\n> & { className?: string };\n\nexport const LaunchBulkUploadPurchaseDialog = ({\n variant = 'link',\n ...props\n}: LaunchBulkUploadPurchaseDialogProps) => {\n const bulkUploadPurchaseDialog = useBasicDialog();\n\n const onBulkUploadPurchase = () => {\n bulkUploadPurchaseDialog.launchDialog();\n };\n\n return (\n <>\n \n \n \n );\n};\n","import { useContent } from 'src/contexts/ContentContext';\nimport { PosDropdown } from 'src/core/POS/PosDropdown';\nimport { vars } from 'src/core/themes';\nimport { LaunchBulkUploadPurchaseDialog } from 'src/dialogs/BulkEdits/BulkUploadPurchaseDialog';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { IconsFill, MoreIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Permission } from 'src/WebApiController';\n\nexport const PurchaseGlobalActionDropdown = ({\n showBulkUpload,\n}: {\n showBulkUpload?: boolean;\n}) => {\n const actionsMsg = useContent(ContentId.Actions);\n\n const hasPurchaseUpdatePermission = useUserHasAnyOfPermissions(\n Permission.Purchases_Edit,\n Permission.Purchases_EditOwned\n );\n\n if (!showBulkUpload && !hasPurchaseUpdatePermission) {\n return null;\n }\n\n return (\n <>\n \n \n \n }\n align=\"end\"\n triggerProps={{ disabled: false }}\n >\n {showBulkUpload && (\n \n )}\n \n \n );\n};\n","import { ReactNode } from 'react';\nimport { getDeliveryTypeIcon } from 'src/utils/ticketTypeUtils';\nimport { DeliveryType } from 'src/WebApiController';\n\nexport const getDeliveryTypeIcons = () => {\n const InApp = getDeliveryTypeIcon(DeliveryType.InApp);\n const MemberCard = getDeliveryTypeIcon(DeliveryType.MemberCard);\n const PDF = getDeliveryTypeIcon(DeliveryType.PDF);\n const Paper = getDeliveryTypeIcon(DeliveryType.Paper);\n const Wallet = getDeliveryTypeIcon(DeliveryType.Wallet);\n const Custom = getDeliveryTypeIcon(DeliveryType.Custom);\n\n return {\n [DeliveryType.InApp]: InApp,\n [DeliveryType.MemberCard]: MemberCard,\n [DeliveryType.PDF]: PDF,\n [DeliveryType.Paper]: Paper,\n [DeliveryType.Wallet]: Wallet,\n [DeliveryType.Custom]: Custom,\n } as Record;\n};\n","import { PosEnumSelect, PosEnumSelectProps } from 'src/core/POS/PosSelect';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { DELIVERY_OPTIONS_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { DeliveryType, Feature, Permission } from 'src/WebApiController';\n\nimport { getDeliveryTypeIcons } from './DeliveryTypeSelector.utils';\n\nexport type DeliveryTypeSelectorProps = Omit<\n PosEnumSelectProps,\n 'valueOptionsContent' | 'valueOptionsIcon'\n> & {\n valueOptionsContent?: Record;\n // Use this when the delivery type is used for read only purposes (filter, etc)\n allowCustomDeliveryType?: boolean;\n};\n\nexport const DeliveryTypeSelector = ({\n allowCustomDeliveryType,\n placeholderText = ContentId.AllDeliveryOptions,\n valueOptionsContent,\n ...rest\n}: DeliveryTypeSelectorProps) => {\n const hasCustomDeliveryTypeFeature = useUserHasFeature(\n Feature.CustomDeliveryType\n );\n\n const canSetCustomDeliveryType = useUserHasAnyOfPermissions(\n Permission.Purchases_UpdateCustomDeliveryType,\n Permission.Purchases_UpdateCustomDeliveryTypeOwned\n );\n\n const moderatedOptionsContent = Object.entries(\n valueOptionsContent ?? DELIVERY_OPTIONS_TO_CID\n ).reduce(\n (acc, [key, val]) => {\n if (\n key === DeliveryType.Custom &&\n ((!allowCustomDeliveryType && !canSetCustomDeliveryType) ||\n !hasCustomDeliveryTypeFeature)\n ) {\n return acc;\n }\n\n if (key === DeliveryType.Wallet) {\n return acc;\n }\n\n return { ...acc, [key]: val };\n },\n {} as Record\n );\n\n return (\n \n );\n};\n","import { useQuery, UseQueryResult } from '@tanstack/react-query';\nimport { useMemo } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { PosSelectProps } from 'src/core/POS/PosSelect';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { PurchaseClient, PurchasePaymentMethod } from 'src/WebApiController';\n\nexport type UsePurchasePaymentMethodSelectorOptions = {\n disabled?: boolean;\n additionalOptions?: Record;\n additionalOptionsPosition?: 'top' | 'bottom';\n};\n\nconst SEARCHABLE_OPTIONS_THRESHOLD = 10;\n\nexport function usePurchasePaymentMethodSelector({\n disabled,\n additionalOptions,\n additionalOptionsPosition = 'bottom',\n}: UsePurchasePaymentMethodSelectorOptions): {\n query: UseQueryResult;\n posSelectProps: Pick<\n PosSelectProps,\n 'placeholderText' | 'valueOptionsContent' | 'searchable' | 'loading'\n >;\n} {\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n\n const shouldQuery =\n !disabled && activeAccountWebClientConfig.activeAccountId != null;\n const query = useQuery({\n queryKey: [\n 'PurchaseClient.getAccessiblePurchasePaymentMethods',\n activeAccountWebClientConfig.activeAccountId,\n ],\n queryFn: () => {\n if (!shouldQuery) {\n return null;\n }\n return tryInvokeApi(\n () => {\n return new PurchaseClient(\n activeAccountWebClientConfig\n ).getAccessiblePurchasePaymentMethods();\n },\n (error) => {\n trackError(\n 'PurchaseClient.getAccessiblePurchasePaymentMethods',\n error\n );\n }\n );\n },\n\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n staleTime: Infinity,\n networkMode: 'offlineFirst',\n meta: {\n persist: false, // we do not want this thing persisted between sessions\n },\n });\n\n const paymentMethodOptions = useMemo(() => {\n const paymentMethods =\n query.data?.toSorted((a, b) => {\n return a.display.localeCompare(b.display);\n }) ?? [];\n\n const options: Record = {};\n for (const { id, name, display } of paymentMethods) {\n options[id] = `${name} (${display})`;\n }\n return {\n ...(additionalOptionsPosition === 'top' ? additionalOptions : {}),\n ...options,\n ...(additionalOptionsPosition === 'bottom' ? additionalOptions : {}),\n };\n }, [query.data, additionalOptions, additionalOptionsPosition]);\n return {\n query,\n posSelectProps: {\n placeholderText: ContentId.ChoosePaymentMethodPlaceholder,\n valueOptionsContent: paymentMethodOptions,\n searchable:\n Object.keys(paymentMethodOptions).length > SEARCHABLE_OPTIONS_THRESHOLD,\n loading: query.isLoading,\n },\n };\n}\n","import { PosSelect, PosSelectProps } from 'src/core/POS/PosSelect';\n\nimport {\n usePurchasePaymentMethodSelector,\n UsePurchasePaymentMethodSelectorOptions,\n} from './usePurchasePaymentMethodSelector';\n\nexport type PurchasePaymentMethodSelectorProps = Omit<\n PosSelectProps,\n 'valueOptionsContent'\n> &\n UsePurchasePaymentMethodSelectorOptions;\n\nexport function PurchasePaymentMethodSelector({\n disabled,\n additionalOptions,\n additionalOptionsPosition,\n ...props\n}: PurchasePaymentMethodSelectorProps) {\n const { posSelectProps } = usePurchasePaymentMethodSelector({\n disabled,\n additionalOptions,\n additionalOptionsPosition,\n });\n return ;\n}\n","import { useQuery } from '@tanstack/react-query';\nimport {\n createContext,\n ReactNode,\n useCallback,\n useContext,\n useMemo,\n} from 'react';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n Feature,\n SellerAccountClient,\n SellerUserAccountInfo,\n} from 'src/WebApiController';\n\nimport { useAppContext } from '../AppContext';\nimport { useContent } from '../ContentContext';\n\ntype ISellerAccountContext = {\n allUserInfos: Record | null; // List of all user-infos for the seller account (including deleted ones so they can be displayed on entity's ownership)\n allActiveUserInfos: Record | null; // List of all active user-infos for the seller account\n isLoading?: boolean;\n getUserInfo: (id: string) => SellerUserAccountInfo | null;\n refetchUserInfos: () => void;\n};\n\nexport const SellerAccountContext = createContext({\n allUserInfos: {},\n allActiveUserInfos: {},\n isLoading: false,\n getUserInfo: () => null,\n refetchUserInfos: () => {},\n});\n\nexport const useSellerAccountContext = () => useContext(SellerAccountContext);\n\nexport const SELLER_ACCOUNT_SELLER_USERS_QUERY_KEY =\n 'SellerAccountClient.getSellerUsersForSellerAccount';\n\n/**\n * Adds a modal to the page where the provider is added\n * Provides utils to set all or update part of the modal\n * The modal is assumed to be open when it contains content\n */\nexport const SellerAccountContextProvider = ({\n children,\n}: {\n children: ReactNode;\n}) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n const deactivatedText = useContent(ContentId.Deactivated);\n const hasDisplayDeactivatedUser = useUserHasFeature(\n Feature.DisplayDeactivatedUser\n );\n\n const getQuery = useQuery({\n queryKey: [\n SELLER_ACCOUNT_SELLER_USERS_QUERY_KEY,\n activeAccountWebClientConfig.activeAccountId,\n ],\n queryFn: async () => {\n if (activeAccountWebClientConfig.activeAccountId == null) {\n return null;\n }\n const results = await new SellerAccountClient(\n activeAccountWebClientConfig\n ).getSellerUsersForSellerAccount();\n\n const resultsMap = results?.reduce>(\n (r, cur) => {\n r[cur.userId] = cur;\n return r;\n },\n {}\n );\n\n return resultsMap;\n },\n\n enabled: activeAccountWebClientConfig.activeAccountId != null,\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError('SellerAccountClient.getSellerUsersForSellerAccount', error);\n },\n },\n });\n\n const getUserInfo = useCallback(\n (userId: string) => {\n if (!userId || !getQuery.data) {\n return null;\n }\n\n return getQuery.data[userId];\n },\n [getQuery.data]\n );\n\n const allUserInfos = useMemo(() => {\n if (!getQuery.data) return null;\n\n return Object.values(getQuery.data).reduce<\n Record\n >((r, cur) => {\n if (cur.isDeactivated) {\n cur.displayName = `${cur.displayName} (${deactivatedText})`;\n }\n r[cur.userId] = cur;\n return r;\n }, {});\n }, [deactivatedText, getQuery.data]);\n\n const allActiveUserInfos = useMemo(() => {\n if (!getQuery.data) return null;\n\n return Object.values(getQuery.data)\n .filter((u) => !u.isDeactivated)\n .reduce>((r, cur) => {\n r[cur.userId] = cur;\n return r;\n }, {});\n }, [getQuery.data]);\n\n return (\n \n {children}\n \n );\n};\n","import Flexsearch from 'flexsearch';\nimport { ReactNode, useCallback, useMemo } from 'react';\nimport { Virtuoso } from 'react-virtuoso';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { CheckIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport {\n Content,\n getContent,\n isContentId,\n useContent,\n useContentContext,\n} from '../../../contexts/ContentContext';\nimport { PosDropdownItem } from '../PosDropdown';\nimport * as styles from './PosMultiSelect.css';\n\nconst EMPTY_CONTENT_DESIGNATOR = '____empty_content_____';\nconst USE_VIRTUOSO_MIN_OPTIONS_COUNT = 50;\n\nexport enum ToggleAllKeys {\n SelectAll = ContentId.SelectAll,\n ClearAll = ContentId.ClearAll,\n}\n\nexport const isToggleAllValue = (value: string | ContentId | null): boolean => {\n return (\n !!value &&\n (value === ToggleAllKeys.SelectAll || value === ToggleAllKeys.ClearAll)\n );\n};\n\nexport const PosMultiSelectOptions = ({\n contentHeight,\n selectedOptions,\n onChange,\n valueOptionsContent,\n valueOptionsIcon,\n emptySelectionText,\n searchText,\n sortMode = 'ascending',\n sortFn,\n useVirtualWindow: useVirtualWindowProp,\n expectedItemSizeForVirtualWindow = 40,\n flexSearchIndex,\n showSelectedOptionsFirst = true,\n showSelectAllOption,\n fetchNextPage,\n hasNextPage,\n isFetchingNextPage,\n includeSelectedInSearch,\n}: {\n contentHeight: string;\n selectedOptions: string[];\n onChange: (o: string | null) => void;\n emptySelectionText?: string | ContentId;\n valueOptionsContent: Record;\n valueOptionsIcon?: Record;\n searchText?: string | null;\n sortMode?: 'ascending' | 'descending' | 'none';\n sortFn?: (a: string, b: string) => number;\n useVirtualWindow?: boolean;\n expectedItemSizeForVirtualWindow?: number;\n flexSearchIndex?: Flexsearch.Index | null;\n showSelectedOptionsFirst?: boolean;\n showSelectAllOption: boolean;\n fetchNextPage?: () => void;\n hasNextPage?: boolean;\n isFetchingNextPage?: boolean;\n includeSelectedInSearch?: boolean;\n}) => {\n const contentContext = useContentContext();\n const valueOptionsKeys = Object.keys(valueOptionsContent);\n const hasOptions = valueOptionsKeys.length > 0;\n\n const useVirtualWindow = useMemo(() => {\n if (typeof useVirtualWindowProp === 'boolean') {\n return useVirtualWindowProp;\n }\n return (\n Object.keys(valueOptionsContent).length > USE_VIRTUOSO_MIN_OPTIONS_COUNT\n );\n }, [useVirtualWindowProp, valueOptionsContent]);\n\n const toggleKey = useMemo(() => {\n if (showSelectAllOption) {\n const allOptionsSelected =\n valueOptionsKeys.length === selectedOptions.length;\n return allOptionsSelected\n ? ToggleAllKeys.ClearAll\n : ToggleAllKeys.SelectAll;\n }\n\n // Hide SelectAll option\n return selectedOptions.length > 0 ? ToggleAllKeys.ClearAll : undefined;\n }, [selectedOptions, valueOptionsKeys, showSelectAllOption]);\n\n const selectItems = useMemo(() => {\n const topOptions: string[] = [];\n if (emptySelectionText) {\n topOptions.push(EMPTY_CONTENT_DESIGNATOR);\n } else if (hasOptions && toggleKey) {\n topOptions.push(toggleKey);\n }\n\n let keysToRender = Object.keys(valueOptionsContent);\n\n if (searchText && searchText.trim().length > 0) {\n keysToRender = flexSearchIndex?.search(searchText, {\n limit: keysToRender.length,\n }) as string[];\n }\n\n if (includeSelectedInSearch) {\n selectedOptions.forEach((item) => {\n if (!keysToRender.includes(item)) {\n keysToRender.push(item);\n }\n });\n }\n\n let selectItems = (keysToRender ?? []).toSorted((a: string, b: string) => {\n if (!sortMode || sortMode === 'none') {\n return 0;\n }\n\n const textA = getContent(valueOptionsContent[a], contentContext);\n const textB = getContent(valueOptionsContent[b], contentContext);\n\n let sortResult = textA\n .toLocaleUpperCase()\n .localeCompare(textB.toLocaleUpperCase());\n\n if (sortFn != null) {\n sortResult = sortFn(textA, textB);\n } else {\n const numberA = parseFloat(textA);\n const numberB = parseFloat(textB);\n if (!isNaN(numberA) && !isNaN(numberB)) {\n sortResult = numberA - numberB;\n }\n }\n\n return (sortMode === 'ascending' ? 1 : -1) * sortResult;\n });\n\n if (showSelectedOptionsFirst) {\n selectItems = [\n ...selectItems.filter((key) => selectedOptions.includes(key)),\n ...selectItems.filter((key) => !selectedOptions.includes(key)),\n ];\n }\n\n return topOptions.concat(selectItems);\n }, [\n contentContext,\n emptySelectionText,\n flexSearchIndex,\n hasOptions,\n includeSelectedInSearch,\n searchText,\n selectedOptions,\n showSelectedOptionsFirst,\n sortFn,\n sortMode,\n toggleKey,\n valueOptionsContent,\n ]);\n\n const renderItem = useCallback(\n (key: string) => {\n if (key === EMPTY_CONTENT_DESIGNATOR) {\n return (\n {\n onChange(null);\n }}\n keepOpenAfterSelection={true}\n >\n \n \n \n \n\n {selectedOptions.length === 0 && (\n \n )}\n \n \n );\n }\n\n if (isToggleAllValue(key) && toggleKey) {\n return (\n onChange(toggleKey)}\n selectedOptions={selectedOptions}\n includeSelectedInSearch={includeSelectedInSearch}\n />\n );\n }\n\n return (\n onChange(o)}\n filterText={searchText}\n selectedOptions={selectedOptions}\n includeSelectedInSearch={includeSelectedInSearch}\n />\n );\n },\n [\n emptySelectionText,\n includeSelectedInSearch,\n onChange,\n searchText,\n selectedOptions,\n toggleKey,\n valueOptionsContent,\n valueOptionsIcon,\n ]\n );\n\n return (\n
    \n {useVirtualWindow ? (\n renderItem(key)}\n endReached={() => {\n !isFetchingNextPage && hasNextPage && fetchNextPage?.();\n }}\n />\n ) : (\n \n {selectItems.map((key) => renderItem(key))}\n
    \n )}\n \n );\n};\n\nexport const FilteredOptionItem = ({\n optionKey,\n optionValue,\n prefixIcon,\n filterText,\n selectedOptions,\n onChange,\n includeSelectedInSearch,\n}: {\n optionKey: string;\n optionValue: string | ContentId;\n prefixIcon?: ReactNode;\n filterText?: string | null;\n selectedOptions: string[];\n onChange: (o: string | null) => void;\n includeSelectedInSearch?: boolean;\n}) => {\n const isSelected = selectedOptions.includes(optionKey);\n\n const contentWrapper = useCallback(\n (\n key: string | ContentId,\n content: string | JSX.Element,\n isSelected: boolean\n ) => {\n return (\n {\n onChange(key);\n }}\n onKeyUp={(k) => {\n if (k.key === 'Enter') {\n onChange(key);\n }\n }}\n keepOpenAfterSelection={true}\n >\n \n \n
    {prefixIcon}
    \n
    \n {content}\n
    \n
    \n {isSelected && (\n \n )}\n \n \n );\n },\n [onChange, prefixIcon]\n );\n\n if (filterText) {\n if (isContentId(optionValue)) {\n return (\n \n );\n } else if (\n optionValue?.toUpperCase()?.includes(filterText?.toUpperCase()) ||\n includeSelectedInSearch\n ) {\n return contentWrapper(optionKey, optionValue, isSelected);\n }\n return null;\n }\n\n return contentWrapper(optionKey, , isSelected);\n};\n\nexport const FilteredContent = ({\n optionKey,\n id,\n filterText,\n contentWrapper,\n isSelected,\n}: {\n optionKey: string | ContentId;\n id: ContentId;\n filterText: string;\n isSelected: boolean;\n contentWrapper: (\n key: string | ContentId,\n content: string | JSX.Element,\n isSelected: boolean\n ) => JSX.Element;\n}) => {\n const text = useContent(id);\n if (!text.toUpperCase().includes(filterText.toUpperCase())) {\n return null;\n }\n\n return contentWrapper(optionKey, , isSelected);\n};\n","import clsx from 'clsx';\nimport {\n ComponentPropsWithoutRef,\n forwardRef,\n ReactElement,\n ReactNode,\n useCallback,\n useMemo,\n useState,\n} from 'react';\nimport {\n isFormatContentId,\n useContent,\n useFormattedContent,\n} from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { useFlexSearchIndex } from 'src/hooks/useFlexSearchIndex';\nimport {\n CheckIcon,\n CrossIcon,\n ExpandIcon,\n FoldIcon,\n IconsFill,\n} from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\n\nimport { PosDropdown } from '../PosDropdown';\nimport { PosSpinner } from '../PosSpinner';\nimport { PosTextField } from '../PosTextField';\nimport * as styles from './PosMultiSelect.css';\nimport {\n isToggleAllValue,\n PosMultiSelectOptions,\n} from './PosMultiSelectOptions';\n\nconst MIN_ITEMS_COUNT_TO_HIDE_SELECT_ALL = 50;\n\nexport type PosMultiSelectProps = Omit<\n ComponentPropsWithoutRef,\n 'onChange'\n> & {\n values: string[];\n placeholderText?: string | ContentId;\n enableEmptySelection?: boolean;\n hasErrors?: boolean;\n onChange: (values: string[], searchText?: string | null) => void;\n leftIcon?: ReactNode;\n showClearButton?: boolean;\n closeAfterToggleAll?: boolean;\n valueOptionsContent: Record;\n valueOptionsIcon?: Record;\n disabled?: boolean;\n loading?: boolean;\n searchable?: boolean;\n /* this needs searchable to be true */\n allowSearchAsInput?: boolean;\n sortMode?: 'ascending' | 'descending' | 'none';\n sortFn?: (a: string, b: string) => number;\n useVirtualWindow?: boolean;\n expectedItemSizeForVirtualWindow?: number;\n contentHeight?: string;\n fullWidth?: boolean;\n showSelectedOptionsFirst?: boolean;\n showSelectAllOption?: boolean;\n fetchNextPage?: () => void;\n hasNextPage?: boolean;\n isFetchingNextPage?: boolean;\n onSearchTextChange?: (searchText: string) => void;\n includeSelectedInSearch?: boolean;\n valuesDisplayText?: string | null;\n prefixDisplay?: React.ReactNode;\n childrenAsTrigger?: boolean;\n pluralDisplayFormatContentId?: FormatContentId;\n};\n\nexport const PosMultiSelect = forwardRef(\n function PosMultiSelect(\n {\n values,\n placeholderText,\n enableEmptySelection,\n hasErrors,\n onChange,\n leftIcon,\n valueOptionsContent,\n valueOptionsIcon,\n disabled,\n loading,\n showClearButton,\n closeAfterToggleAll,\n searchable,\n allowSearchAsInput,\n rootProps,\n sortMode,\n sortFn,\n useVirtualWindow,\n expectedItemSizeForVirtualWindow,\n contentHeight,\n fullWidth,\n showSelectedOptionsFirst,\n showSelectAllOption: showSelectAllOptionProp,\n fetchNextPage,\n hasNextPage,\n isFetchingNextPage,\n onSearchTextChange,\n includeSelectedInSearch,\n valuesDisplayText,\n prefixDisplay,\n childrenAsTrigger,\n pluralDisplayFormatContentId,\n ...rest\n },\n ref\n ): ReactElement {\n const [searchText, setSearchText] = useState('');\n const [isOpen, setIsOpen] = useState(false);\n\n const showSelectAllOption = useMemo(() => {\n if (typeof showSelectAllOptionProp === 'boolean') {\n return showSelectAllOptionProp;\n }\n return (\n Object.keys(valueOptionsContent).length <\n MIN_ITEMS_COUNT_TO_HIDE_SELECT_ALL\n );\n }, [showSelectAllOptionProp, valueOptionsContent]);\n\n const { flexSearchIndex } = useFlexSearchIndex(\n valueOptionsContent,\n searchable,\n isOpen\n );\n\n const isBuildingSearchIndex = searchable && !flexSearchIndex;\n\n const onOpenChange = useCallback(\n (open: boolean) => {\n setIsOpen(open);\n rootProps?.onOpenChange?.(open);\n },\n [rootProps]\n );\n\n const valueDisplay =\n values.length === 1\n ? valueOptionsContent[values[0]]\n : values.length > 1\n ? pluralDisplayFormatContentId\n ? pluralDisplayFormatContentId\n : FormatContentId.ItemsSelected\n : null; // we only display value when we have only 1 value selected\n\n const singleValueContentDisplay = useContent(valueDisplay ?? undefined);\n const valueContentDisplay =\n useFormattedContent(\n valueDisplay && isFormatContentId(valueDisplay)\n ? valueDisplay\n : FormatContentId.EmptyContent,\n `${values.length}`\n ) || singleValueContentDisplay;\n\n placeholderText = placeholderText ?? ContentId.Select;\n const placeholderTextContent = useContent(placeholderText);\n\n const mergeSelectedValue = useCallback(\n (newValue: string | null) => {\n const isToggleAll = isToggleAllValue(newValue);\n const allValuesKeys = Object.keys(valueOptionsContent);\n const areValuesSelected = values.length === allValuesKeys.length;\n\n if (isToggleAll) {\n if (showSelectAllOption) {\n return areValuesSelected ? [] : allValuesKeys;\n } else {\n // It's clear all option, then clear all\n return [];\n }\n }\n\n if (newValue && values.includes(newValue)) {\n // Unselect\n return values.filter((v) => v !== newValue);\n }\n\n // If we allow empty selections, just clear the selected values\n if (enableEmptySelection && !newValue) {\n return [];\n }\n\n return newValue ? [...values, newValue] : [...values];\n },\n [valueOptionsContent, values, showSelectAllOption, enableEmptySelection]\n );\n\n const searchPlaceholder = useContent(\n allowSearchAsInput ? ContentId.SearchOrEnter : ContentId.Search\n );\n\n const onSearchTextApplied = useCallback(\n (searchText: string) => {\n const existingValue = Object.keys(valueOptionsContent).find(\n (k) =>\n valueOptionsContent[k]?.toLocaleUpperCase() ===\n searchText.toLocaleUpperCase()\n );\n\n if (existingValue) {\n onChange(mergeSelectedValue(existingValue));\n if (isToggleAllValue(existingValue) && closeAfterToggleAll) {\n setIsOpen(false);\n }\n } else if (allowSearchAsInput) {\n onChange(values, searchText);\n setIsOpen(false);\n }\n },\n [\n allowSearchAsInput,\n closeAfterToggleAll,\n mergeSelectedValue,\n onChange,\n valueOptionsContent,\n values,\n ]\n );\n\n const searchBox = useMemo(\n () => (\n
    \n input?.focus()}\n value={searchText}\n placeholder={searchPlaceholder}\n onChange={(e) => {\n setSearchText(e.target.value);\n onSearchTextChange?.(e.target.value);\n }}\n onKeyDown={(e) => {\n if (!disabled) {\n const key = e.key;\n if (key === 'Enter') {\n e.stopPropagation();\n\n // See if search-text matches any option, return it as a selection, else return searchText\n if (searchText) {\n onSearchTextApplied(searchText);\n }\n }\n }\n }}\n postfixDisplay={\n searchText && (\n <>\n {allowSearchAsInput && (\n {\n e.stopPropagation();\n e.preventDefault();\n onSearchTextApplied(searchText);\n }}\n />\n )}\n {\n e.stopPropagation();\n e.preventDefault();\n setSearchText('');\n onSearchTextChange?.('');\n }}\n />\n \n )\n }\n />\n
    \n ),\n [\n allowSearchAsInput,\n disabled,\n onSearchTextApplied,\n onSearchTextChange,\n searchPlaceholder,\n searchText,\n ]\n );\n\n return (\n \n {childrenAsTrigger ? (\n <>{rest.children}\n ) : (\n \n \n {prefixDisplay}\n {leftIcon}\n
    \n {valuesDisplayText\n ? valuesDisplayText\n : !valueDisplay\n ? placeholderTextContent || placeholderText\n : valueContentDisplay}\n
    \n \n \n {showClearButton && values.length > 0 && (\n {\n e.stopPropagation();\n onChange([], null);\n }}\n />\n )}\n {isOpen ? (\n \n ) : (\n \n )}\n \n \n )}\n \n }\n >\n {loading || isBuildingSearchIndex ? (\n \n ) : (\n <>\n {searchable && searchBox}\n {\n onChange(mergeSelectedValue(v), null);\n if (isToggleAllValue(v) && closeAfterToggleAll) {\n setIsOpen(false);\n }\n }}\n valueOptionsContent={valueOptionsContent}\n valueOptionsIcon={valueOptionsIcon}\n searchText={searchText}\n emptySelectionText={\n enableEmptySelection ? placeholderText : undefined\n }\n sortMode={sortMode}\n sortFn={sortFn}\n useVirtualWindow={useVirtualWindow}\n expectedItemSizeForVirtualWindow={\n expectedItemSizeForVirtualWindow\n }\n contentHeight={\n contentHeight\n ? contentHeight\n : searchable\n ? 'calc(var(--radix-popper-available-height) - 60px - 16px)'\n : 'calc(var(--radix-popper-available-height) - 16px)'\n }\n flexSearchIndex={flexSearchIndex}\n showSelectedOptionsFirst={showSelectedOptionsFirst}\n showSelectAllOption={showSelectAllOption}\n fetchNextPage={fetchNextPage}\n hasNextPage={hasNextPage}\n isFetchingNextPage={isFetchingNextPage}\n includeSelectedInSearch={includeSelectedInSearch}\n />\n \n )}\n \n );\n }\n);\n","import { useMemo } from 'react';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { useSellerAccountContext } from 'src/contexts/SellerAccountContext';\nimport {\n PosMultiSelect,\n PosMultiSelectProps,\n} from 'src/core/POS/PosMultiSelect';\nimport { EMPTY_SELLER_USER_ID } from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nexport const SellerAccountEmployeeMultiSelector = ({\n placeholderText,\n ...props\n}: Omit & {\n showEmail?: boolean;\n allowUnchanged?: boolean;\n}) => {\n const { allActiveUserInfos } = useSellerAccountContext();\n\n const unchanged = useContent(ContentId.DontChange);\n\n const allActiveUserOptions = useMemo(() => {\n if (!allActiveUserInfos) return {};\n\n const results = {} as Record;\n if (props.allowUnchanged) {\n results[EMPTY_SELLER_USER_ID] = unchanged;\n }\n\n Object.values(allActiveUserInfos).reduce((r, cur) => {\n r[cur.userId] = props.showEmail\n ? `${cur.displayName} (${cur.email})`\n : cur.displayName;\n return r;\n }, results);\n\n return results;\n }, [allActiveUserInfos, props.allowUnchanged, props.showEmail, unchanged]);\n\n return (\n \n );\n};\n","import {useQuery} from '@tanstack/react-query';\nimport {useAppContext} from 'src/contexts/AppContext';\nimport {ErrorTypes, useErrorBoundaryContext,} from 'src/contexts/ErrorBoundaryContext';\nimport {FulfillmentProviderClient} from 'src/WebApiController';\n\nexport const useGetFulfillmentProviderSettings = () => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const shouldQuery =\n activeAccountWebClientConfig.activeAccountId != null;\n const fulfillmentProviderSettingsQuery = useQuery({\n queryKey: [\n 'FulfillmentProviderClient.getFulfillmentProviderSettings',\n activeAccountWebClientConfig.activeAccountId,\n ],\n queryFn: async () => {\n if (!shouldQuery) {\n return null;\n }\n return await new FulfillmentProviderClient(\n activeAccountWebClientConfig\n ).getFulfillmentProviderSettings();\n },\n\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n showErrorDialog('FulfillmentProviderClient.getFulfillmentProviderSettings', error, {\n trackErrorData: {\n activeAccountId: activeAccountWebClientConfig.activeAccountId,\n },\n });\n },\n },\n });\n\n return {\n fulfillmentProviderSettings: fulfillmentProviderSettingsQuery.data,\n fulfillmentProviderSettingsQuery\n };\n};\n","import * as styles from './FulfillmentProviders.css';\nimport { Card } from \"reactstrap\";\nimport { Switch } from \"src/core/ui\";\nimport { useCallback, useState } from \"react\";\nimport { FulfillmentProviderClient } from \"src/WebApiController\";\nimport { tryInvokeApi } from \"src/utils/tryExecuteUtils\";\nimport { useAppContext } from \"src/contexts/AppContext\";\nimport {useErrorBoundaryContext} from \"src/contexts/ErrorBoundaryContext\";\n\ninterface FulfillmentProviderCardProps {\n logo: JSX.Element | null;\n fulfillmentProviderSellerUserId: string;\n name: string;\n description: string;\n enabled: boolean;\n}\n\nexport const FulfillmentProviderCard: React.FC = ({ logo, fulfillmentProviderSellerUserId, name, description, enabled }) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const [isSwitchChecked, setIsSwitchChecked] = useState(enabled);\n const { trackError } = useErrorBoundaryContext();\n\n const toggleFulfillmentProviderSetting = useCallback(\n async (isChecked: boolean) => {\n const originalState = isSwitchChecked;\n setIsSwitchChecked(isChecked);\n\n await tryInvokeApi(\n async () => {\n const fulfillmentProviderClient = new FulfillmentProviderClient(\n activeAccountWebClientConfig\n );\n\n const succeeded = await fulfillmentProviderClient.toggleFulfillmentProviderSetting(\n fulfillmentProviderSellerUserId,\n isChecked\n );\n\n if (!succeeded) {\n setIsSwitchChecked(originalState);\n }\n },\n (error) => {\n setIsSwitchChecked(originalState);\n trackError('FulfillmentProviderClient.ToggleFulfillmentProviderSetting', error);\n }\n );\n },\n [activeAccountWebClientConfig, fulfillmentProviderSellerUserId, isSwitchChecked]\n );\n\n return (\n \n
    \n
    \n \n {logo}\n \n \n {name}\n \n
    \n
    \n {description}\n
    \n
    \n
    \n e.stopPropagation()}\n onCheckedChange={(isChecked) => {\n toggleFulfillmentProviderSetting(isChecked);\n }}\n />\n
    \n
    \n );\n};\n","import { PosIconProps } from './SvgWrapper';\n\nexport function TradedeskTransferLogo(props: Omit) {\n return (\n \n \n \n \n \n \n \n \n \n );\n}\n","import { PosIconProps } from './SvgWrapper';\n\nexport function TdcTransferLogo(props: Omit) {\n return (\n \n \n \n \n \n \n \n \n \n );\n}\n","import { PosIconProps } from './SvgWrapper';\n\nexport function TaciyonLogo(props: Omit) {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n","import { PosIconProps } from './SvgWrapper';\n\nexport function StubhubFulfillmentLogo(props: Omit) {\n return (\n \n \n \n \n );\n}\n","import * as styles from './FulfillmentProviders.css';\nimport { Content } from \"src/contexts/ContentContext\";\nimport { ContentId } from \"src/utils/constants/contentId\";\nimport {\n FulfillmentProviderCard\n} from \"src/navigations/Routes/Settings/Views/FulfillmentProviders/FulfillmentProviderCard\";\nimport { Stack } from \"src/core/ui\";\nimport { useGetFulfillmentProviderSettings } from \"src/hooks/useGetFulfillmentProviderSettings\";\nimport { TradedeskTransferLogo } from \"src/svgs/TradedeskTransferLogo\";\nimport { TdcTransferLogo } from \"src/svgs/TdcTransferLogo\";\nimport { TaciyonLogo } from \"src/svgs/TaciyonLogo\";\nimport { StubhubFulfillmentLogo } from \"src/svgs/StubhubFulfillmentLogo\";\n\nexport const MapFulfillmentProviderToIcon = (providerName: string) => {\n // TODO: switch to mapping icon to guid instead of name once they are created in the DB\n switch (providerName.toLowerCase()) {\n case \"stubhub fulfillment\":\n return ;\n case \"taciyon\":\n return ;\n case \"tradedesk transfer\":\n return ;\n case \"transfer\":\n return ;\n default:\n return null;\n }\n};\n\nexport const FulfillmentProviders = () => {\n const {\n fulfillmentProviderSettings\n } = useGetFulfillmentProviderSettings();\n\n const providers = fulfillmentProviderSettings ?? [];\n\n return (\n
    \n
    \n
    \n

    \n \n

    \n
    \n \n
    \n
    \n \n {providers.length > 0 ? (\n providers.map(provider => (\n \n ))\n ) : (\n
    \n \n
    \n )}\n
    \n
    \n
    \n
    \n
    \n );\n};\n","import { ReactNode, useMemo } from 'react';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { useSellerAccountContext } from 'src/contexts/SellerAccountContext';\nimport { PosSelect, PosSelectProps } from 'src/core/POS/PosSelect';\nimport { useGetFulfillmentProviderSettings } from 'src/hooks/useGetFulfillmentProviderSettings';\nimport { MapFulfillmentProviderToIcon } from 'src/navigations/Routes/Settings/Views/FulfillmentProviders';\nimport {\n EMPTY_SELLER_USER_ID,\n FULFILLMENT_PROVIDER_SELLER_USER_IDS,\n} from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nexport const SellerAccountEmployeeSelector = ({\n placeholderText,\n ...props\n}: Omit & {\n showEmail?: boolean;\n allowUnchanged?: boolean;\n isFulfillmentSection?: boolean;\n}) => {\n const { allActiveUserInfos } = useSellerAccountContext();\n const unchanged = useContent(ContentId.DontChange);\n const { fulfillmentProviderSettings } = useGetFulfillmentProviderSettings();\n\n const allActiveUserOptions = useMemo(() => {\n if (!allActiveUserInfos) return {};\n\n const results = {} as Record;\n if (props.allowUnchanged) {\n results[EMPTY_SELLER_USER_ID] = unchanged;\n }\n\n if (props.isFulfillmentSection) {\n if (fulfillmentProviderSettings?.length) {\n fulfillmentProviderSettings.forEach((provider) => {\n if (provider.isEnabled) {\n results[provider.fulfillmentProviderSellerUserId] =\n provider.fulfillmentProviderName;\n }\n });\n }\n }\n\n Object.values(allActiveUserInfos).reduce((r, cur) => {\n r[cur.userId] = props.showEmail\n ? `${cur.displayName} (${cur.email})`\n : cur.displayName;\n return r;\n }, results);\n\n return results;\n }, [\n allActiveUserInfos,\n fulfillmentProviderSettings,\n props.allowUnchanged,\n props.isFulfillmentSection,\n props.showEmail,\n unchanged,\n ]);\n\n const allActiveValueOptionIcons = useMemo(() => {\n if (!allActiveUserOptions) return {};\n\n const results = {} as Record;\n for (const [sellerUserId, displayName] of Object.entries(\n allActiveUserOptions\n )) {\n if (FULFILLMENT_PROVIDER_SELLER_USER_IDS.has(sellerUserId)) {\n results[sellerUserId] = MapFulfillmentProviderToIcon(displayName);\n }\n }\n\n return results;\n }, [allActiveUserOptions]);\n\n return (\n 10\n }\n sortFn={(sellerIdA, sellerIdB) => {\n if (sellerIdA === EMPTY_SELLER_USER_ID) {\n return -1;\n }\n if (sellerIdB === EMPTY_SELLER_USER_ID) {\n return 1;\n }\n const isFulfillmentA =\n FULFILLMENT_PROVIDER_SELLER_USER_IDS.has(sellerIdA);\n const isFulfillmentB =\n FULFILLMENT_PROVIDER_SELLER_USER_IDS.has(sellerIdB);\n\n if (!isFulfillmentA && !isFulfillmentB) {\n return (allActiveUserOptions[sellerIdA] ?? '').localeCompare(\n allActiveUserOptions[sellerIdB] ?? ''\n );\n }\n\n if (isFulfillmentA && !isFulfillmentB) {\n return -1;\n } else if (!isFulfillmentA && isFulfillmentB) {\n return 1;\n } else if (isFulfillmentA && isFulfillmentB) {\n const aDisplayName = allActiveUserOptions[sellerIdA];\n const bDisplayName = allActiveUserOptions[sellerIdB];\n if (aDisplayName < bDisplayName) {\n return -1;\n } else if (aDisplayName > bDisplayName) {\n return 1;\n }\n }\n return 0;\n }}\n loading={allActiveUserInfos == null}\n placeholderText={placeholderText ?? ContentId.Everyone}\n valueOptionsContent={allActiveUserOptions}\n valueOptionsIcon={allActiveValueOptionIcons}\n sortBy=\"key\"\n />\n );\n};\n","/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */\nimport clsx from 'clsx';\nimport { ChangeEvent, ComponentProps, ReactNode, useRef } from 'react';\nimport { vars } from 'src/core/themes';\nimport { CheckIcon, IconsFill, MinusIcon } from 'src/svgs/Viagogo';\n\nimport * as styles from './Checkbox.css';\n\ntype CheckboxProps = {\n onChange: (e: ChangeEvent) => void;\n checked: boolean;\n indeterminate?: boolean;\n disabled?: boolean;\n labelPosition?: 'left' | 'right';\n name?: string;\n label?: ReactNode | null;\n error?: string | (() => string | null | undefined);\n small?: boolean;\n} & Omit, 'onChange' | 'disabled'>;\n\nconst getRenderedMessage = (message: CheckboxProps['error']) =>\n typeof message === 'function' ? message() : message;\n\nexport const Checkbox = ({\n onChange,\n checked = false,\n indeterminate = false,\n disabled = false,\n labelPosition = 'left',\n name = '',\n label,\n error,\n small,\n ...props\n}: CheckboxProps) => {\n const errorMessage = getRenderedMessage(error);\n const inputRef = useRef(null);\n\n return (\n <>\n {\n if (disabled) return;\n\n if (inputRef.current) {\n inputRef.current.click();\n }\n }}\n >\n \n {labelPosition === 'left' && label != null &&
    {label}
    }\n \n {checked && !indeterminate && (\n \n )}\n {checked && indeterminate && (\n \n )}\n \n {labelPosition === 'right' && label != null && (\n \n {label}\n \n )}\n \n {error &&
    {errorMessage}
    }\n \n );\n};\n","import {\n ComponentPropsWithoutRef,\n forwardRef,\n ReactElement,\n ReactNode,\n} from 'react';\nimport { vars } from 'src/core/themes';\nimport { Tooltip } from 'src/core/ui';\nimport { mergeProps } from 'src/core/utils';\nimport { IconsFill, WarningSolidIcon } from 'src/svgs/Viagogo';\n\nimport * as styles from './PosFormField.css';\n\nexport type PosFormFieldProps = React.PropsWithChildren<{\n label?: ReactNode;\n errors?: string | string[];\n warnings?: string | string[];\n showErrorsInline?: boolean;\n doNotShowErrorDetails?: boolean;\n labelPosition?: 'top' | 'bottom' | undefined;\n}>;\n\nexport const PosFormField = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef<'div'> & PosFormFieldProps\n>(function PosFormField(\n {\n label,\n errors,\n warnings,\n showErrorsInline,\n doNotShowErrorDetails,\n children,\n labelPosition = 'top',\n ...rest\n },\n ref\n): ReactElement {\n const isArray = Array.isArray(errors);\n const errorsDiv = errors && (\n
    \n {isArray ? (\n (errors as string[]).map((er, i) => (\n
    \n {er}\n
    \n ))\n ) : (\n
    {errors}
    \n )}\n
    \n );\n const warningsDiv = warnings && (\n
    \n {isArray ? (\n (warnings as string[]).map((er, i) => (\n
    \n {er}\n
    \n ))\n ) : (\n
    {warnings}
    \n )}\n
    \n );\n\n return (\n \n {labelPosition === 'top' && label}\n
    \n {children}\n {errors && showErrorsInline && (\n \n \n
    \n }\n >\n {errorsDiv}\n \n )}\n {warnings && showErrorsInline && (\n \n \n \n }\n >\n {warningsDiv}\n \n )}\n \n {labelPosition === 'bottom' && label}\n {!showErrorsInline && !doNotShowErrorDetails && errorsDiv}\n {!showErrorsInline && !doNotShowErrorDetails && warningsDiv}\n \n );\n});\n","import clsx from 'clsx';\nimport { differenceInDays } from 'date-fns';\nimport { FormatContent } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport {\n CalendarOutlineIcon,\n IconsFill,\n ToBeDeterminedIcon,\n} from 'src/svgs/Viagogo';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { getEventDateDisplayStrings } from 'src/utils/dateTimeUtils';\n\nimport * as styles from './EventDateDisplay.css';\n\nexport type EventDateDisplayProps = {\n eventDateString?: string;\n /**\n * Optional end date that is used to calculate and show the number of dates after the date.\n *\n * eg. Feb 12 - 2:30pm, Sunday (3 days)\n */\n eventEndDateString?: string;\n /**\n * If `eventDate` is `undefined`, shows a `ToBeDeterminedIcon` instead of the event date if this\n * is set to `true`. Otherwise if `false`, event date will be fully omitted.\n */\n showEventDateTbd?: boolean;\n eventDateFormat?: string;\n eventSubDateFormat?: string;\n slimMode?: boolean;\n className?: string;\n};\n\nexport function EventDateDisplay({\n slimMode,\n eventDateString,\n eventEndDateString,\n showEventDateTbd,\n eventDateFormat,\n eventSubDateFormat,\n className,\n}: EventDateDisplayProps) {\n if (eventDateString) {\n const numDays: number =\n eventDateString && eventEndDateString\n ? differenceInDays(\n new Date(eventEndDateString),\n new Date(eventDateString)\n ) + 1\n : 0;\n\n const { formattedEventDate, formattedEventSubDate } =\n getEventDateDisplayStrings(eventDateString, {\n dateFormat: eventDateFormat,\n subDateFormat: eventSubDateFormat,\n });\n return (\n \n {!slimMode && (\n
    \n \n
    \n )}\n \n \n {formattedEventDate}\n \n \n {formattedEventSubDate}\n {numDays > 1 && (\n <>\n {' '}\n (\n \n )\n \n )}\n \n
    \n \n );\n }\n if (showEventDateTbd) {\n return (\n \n );\n }\n return null;\n}\n","import { Path } from '@remix-run/router/history';\nimport clsx from 'clsx';\nimport * as React from 'react';\nimport { MouseEvent, useCallback, useMemo } from 'react';\nimport { Link, LinkProps } from 'react-router-dom';\n\nimport * as styles from './PosLink.css';\n\ntype PosLinkProps = Omit &\n React.RefAttributes & {\n to: string | undefined | null;\n variant?: 'brand';\n };\n\n/**\n * Wrapper of react-router-dom Link component.\n * property \"to\" accepts a string | undefined |null. It can be a full URL or\n * path with query string parameters.\n * If not \"to\" is passed, then nothing happens when clicking the link.\n */\nexport const PosLink = ({\n children,\n onClick,\n to,\n className,\n variant,\n ...rest\n}: PosLinkProps) => {\n const onEventNameClick = useCallback(\n (e: MouseEvent) => {\n if (!to) {\n e.stopPropagation();\n e.preventDefault();\n }\n onClick?.(e);\n },\n [to, onClick]\n );\n\n const toProps = useMemo | string>(() => {\n if (!to) {\n return '';\n }\n try {\n const url = new URL(to, window.location.origin);\n return {\n pathname: url.pathname,\n search: url.search,\n searchParams: url.searchParams,\n };\n } catch (e) {\n return '';\n }\n }, [to]);\n\n return (\n \n {children}\n \n );\n};\n","import { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { ErrorOutlineIcon, IconsFill } from 'src/svgs/Viagogo';\n\nimport * as styles from './MessageWithIcon.css';\n\nexport const FailureMessage = ({\n message,\n}: {\n message: string | JSX.Element;\n}) => {\n return (\n \n \n
    {message}
    \n
    \n );\n};\n","import { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { IconsFill, SuccessOutlineIcon } from 'src/svgs/Viagogo';\n\nimport * as styles from './MessageWithIcon.css';\n\nexport const SuccessMessage = ({\n message,\n}: {\n message: string | JSX.Element;\n}) => {\n return (\n \n \n
    {message}
    \n
    \n );\n};\n","import { CSSProperties } from 'react';\nimport { vars } from 'src/core/themes';\nimport { Stack, StackProps } from 'src/core/ui';\nimport { IconsFill, WarningOutlineIcon } from 'src/svgs/Viagogo';\n\nimport * as styles from './MessageWithIcon.css';\n\nexport const WarningMessage = ({\n message,\n iconSize = vars.iconSize.l,\n messageStyle,\n ...rest\n}: {\n message: string | JSX.Element;\n iconSize?: string;\n messageStyle?: CSSProperties;\n} & StackProps) => {\n return (\n \n \n
    \n {message}\n
    \n \n );\n};\n","import styled from 'styled-components/macro';\n\nexport const BlinkingWrapper = styled.div`\n line-height: 0;\n &.blink-on {\n animation: blink-animation 1s steps(10, start) infinite;\n -webkit-animation: blink-animation 1s steps(10, start) infinite;\n transition: all 0.2s;\n }\n @keyframes blink-animation {\n to {\n opacity: 0.5;\n }\n }\n @-webkit-keyframes blink-animation {\n to {\n opacity: 0.5;\n }\n }\n`;\n","import styled, { keyframes } from 'styled-components/macro';\n\nconst CircleWrapperAnimation = keyframes`\n 0% {\n transform: rotate(0);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n`;\n\nexport const RotatingWrapper = styled.div`\n display: flex;\n &.blink-on {\n animation: blink-animation 1s steps(10, start) infinite;\n -webkit-animation: blink-animation 1s steps(10, start) infinite;\n transition: all 0.2s;\n }\n\n svg {\n animation: ${CircleWrapperAnimation} 1s linear infinite;\n }\n`;\n","import { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { ProcessingIcon } from 'src/svgs/Viagogo';\n\nimport { RotatingWrapper } from '../../ui/AnimatingWrapper';\nimport * as styles from './MessageWithIcon.css';\n\nexport const WorkingMessage = ({\n message,\n}: {\n message: string | JSX.Element;\n}) => {\n return (\n \n \n \n \n
    {message}
    \n
    \n );\n};\n","import {\n Content,\n FormatContent,\n isContentId,\n useContent,\n} from 'src/contexts/ContentContext';\nimport { WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n EVENT_MAPPING_STATE_FILTER_TO_CID,\n MAPPING_REJECTION_REASON_ID_TO_CID,\n} from 'src/utils/constants/contentIdMaps';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { EventMappingStateFilter } from 'src/utils/eventQueryUtils';\n\nimport * as styles from './EventInfo.css';\n\nexport type EventMappingStateDisplayProps = {\n eventMappingState?:\n | EventMappingStateFilter.Pending\n | EventMappingStateFilter.Rejected;\n mappingRejectionReasonId?: number | null;\n mappingRejectionReasonDescriptionDefault?: string | null;\n};\n\nexport function EventMappingStateDisplay({\n eventMappingState,\n mappingRejectionReasonId,\n mappingRejectionReasonDescriptionDefault,\n}: EventMappingStateDisplayProps) {\n const requestStateText = useContent(\n EVENT_MAPPING_STATE_FILTER_TO_CID[\n eventMappingState ?? EventMappingStateFilter.Pending\n ]\n );\n\n const eventMappingRejectionReason = mappingRejectionReasonId\n ? MAPPING_REJECTION_REASON_ID_TO_CID[mappingRejectionReasonId] ??\n mappingRejectionReasonDescriptionDefault\n : undefined;\n\n if (eventMappingState == null) {\n return null;\n }\n\n if (eventMappingState === EventMappingStateFilter.Rejected) {\n return (\n \n \n \n \n \n \n \n {': '}\n {eventMappingRejectionReason &&\n isContentId(eventMappingRejectionReason) ? (\n \n ) : (\n eventMappingRejectionReason\n )}\n \n \n }\n />\n \n );\n }\n\n return (\n \n \n }\n />\n \n );\n}\n","import clsx from 'clsx';\nimport { ReactNode } from 'react';\nimport { Stack } from 'src/core/ui';\n\nimport * as styles from './EventNameDisplay.css';\n\nexport type EventNameDisplayProps = {\n eventName?: ReactNode;\n /**\n * Portion of the event name to be displayed with less emphasis.\n */\n eventNameConnector?: ReactNode;\n eventSubName?: ReactNode;\n className?: string;\n slimMode?: boolean;\n showTitle?: boolean;\n boldSubName?: boolean;\n useBigStyle?: boolean;\n};\n\nexport function EventNameDisplay({\n eventName,\n eventNameConnector,\n eventSubName,\n className,\n slimMode,\n showTitle = true,\n boldSubName = false,\n useBigStyle = false,\n}: EventNameDisplayProps) {\n return (\n \n {eventNameConnector && !eventSubName && (\n <>\n \n {eventNameConnector}\n {' '}\n \n )}\n {eventName}\n {eventNameConnector && eventSubName && (\n <>\n {' '}\n \n {eventNameConnector}\n {' '}\n \n {eventSubName}\n \n \n )}\n \n );\n}\n","import clsx from 'clsx';\nimport { ReactNode } from 'react';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { IconsFill, LocationOutlineIcon } from 'src/svgs/Viagogo';\n\nimport * as styles from './VenueNameDisplay.css';\n\nexport type VenueNameDisplayProps = {\n venueName?: ReactNode;\n /**\n * The location of the venue (eg. City, State).\n */\n venueLocation?: ReactNode;\n slimMode?: boolean;\n showTitle?: boolean;\n};\n\nexport function VenueNameDisplay({\n venueName,\n venueLocation,\n slimMode,\n showTitle = true,\n}: VenueNameDisplayProps) {\n return venueName || venueLocation ? (\n \n {(venueName || venueLocation) && (\n <>\n {!slimMode && (\n
    \n \n
    \n )}\n \n {venueName && (\n \n {venueName}\n \n )}\n {venueLocation && (\n <>\n {/* TODO: create a component for joining react components */}\n {venueName && <>  }\n \n {venueLocation}\n \n \n )}\n
    \n \n )}\n \n ) : null;\n}\n","import clsx from 'clsx';\nimport { ReactNode } from 'react';\nimport { PosLink } from 'src/core/POS/PosLink/PosLink';\nimport { Stack } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ParkingPassIcon } from 'src/svgs/Viagogo';\nimport { EventPageLocationState } from 'src/utils/types/EventPageLocationState';\nimport { Feature, TopLevelCategory } from 'src/WebApiController';\n\nimport { EventDateDisplay } from './EventDateDisplay';\nimport * as styles from './EventInfo.css';\nimport {\n EventMappingStateDisplay,\n EventMappingStateDisplayProps,\n} from './EventMappingStateDisplay';\nimport { EventNameDisplay } from './EventNameDisplay';\nimport { VenueNameDisplay } from './VenueNameDisplay';\n\nexport type EventInfoProps = {\n eventName?: ReactNode;\n /**\n * Portion of the event name to be displayed with less emphasis.\n */\n eventNameConnector?: ReactNode;\n eventSubName?: ReactNode;\n eventDateString?: string;\n /**\n * Optional end date that is used to calculate and show the number of dates after the date.\n *\n * eg. Feb 12 - 2:30pm, Sunday (3 days)\n */\n eventEndDateString?: string;\n /**\n * If `eventDate` is `undefined`, shows a `ToBeDeterminedIcon` instead of the event date if this\n * is set to `true`. Otherwise if `false`, event date will be fully omitted.\n */\n showEventDateTbd?: boolean;\n /**\n * Whether to show the year in the event date\n */\n showYear?: boolean;\n venueName?: ReactNode;\n /**\n * The location of the venue (eg. City, State).\n */\n venueLocation?: ReactNode;\n /**\n * Whether to show the mapping state (pending, rejected) of the event.\n */\n showMappingState?: boolean;\n /* Show only event name\n */\n eventNameOnly?: boolean;\n /* Show venue and date in smaller/compressed style */\n slimMode?: boolean;\n showParkingPassIcon?: boolean;\n\n eventGenre?: TopLevelCategory;\n eventNameLink?: string;\n} & EventMappingStateDisplayProps;\n\n/**\n * Component that shows event info.\n * @param props\n * @returns\n */\nexport function EventInfo({\n eventName,\n eventNameConnector,\n eventSubName,\n eventDateString,\n eventEndDateString,\n showEventDateTbd,\n showMappingState,\n mappingRejectionReasonId,\n mappingRejectionReasonDescriptionDefault,\n eventMappingState,\n showYear = false,\n venueName,\n venueLocation,\n eventNameOnly,\n slimMode,\n showParkingPassIcon = false,\n eventGenre,\n eventNameLink,\n}: EventInfoProps) {\n const canLinkEventName = useUserHasFeature(Feature.LinkEventName);\n const eventDisplayName = (\n \n );\n\n return (\n \n \n {canLinkEventName ? (\n \n {eventDisplayName}\n \n ) : (\n eventDisplayName\n )}\n {showParkingPassIcon && (\n \n )}\n \n {!eventNameOnly &&\n (venueName ||\n venueLocation ||\n eventDateString ||\n eventEndDateString) && (\n \n \n \n \n )}\n {showMappingState && (\n \n )}\n \n );\n}\n","import { EventInfo, EventInfoProps } from 'src/components/Events/EventInfo';\nimport {\n EVENT_TYPE_PARKING,\n getFormattedEventName,\n} from 'src/utils/eventWithDataUtils';\nimport { getFormattedLocation } from 'src/utils/format';\nimport { Event, Performer, Venue } from 'src/WebApiController';\n\nimport * as styles from '../EventInfo/EventNameDisplay/EventNameDisplay.css';\n\nexport type ConnectedEventInfoProps = Pick<\n EventInfoProps,\n | 'showEventDateTbd'\n | 'showYear'\n | 'showMappingState'\n | 'eventMappingState'\n | 'mappingRejectionReasonId'\n | 'mappingRejectionReasonDescriptionDefault'\n | 'eventNameOnly'\n | 'slimMode'\n> & {\n event?: Event | null;\n performer?: Performer | null;\n venue?: Venue | null;\n\n useShortName?: boolean;\n eventNameLink?: string;\n};\n\nexport function ConnectedEventInfo({\n event,\n performer,\n venue,\n useShortName,\n ...eventInfoProps\n}: ConnectedEventInfoProps) {\n let eventName: string | null = null;\n let eventNameConnector: string | null = null;\n let eventSubName: string | null = null;\n\n [eventName, eventNameConnector, eventSubName] = getFormattedEventName({\n event,\n performer,\n useShortName,\n });\n\n const eventNameNode =\n eventInfoProps.slimMode && eventName ? (\n {eventName}\n ) : (\n eventName\n );\n\n const venueName = useShortName\n ? venue?.shortName || venue?.name\n : venue?.name;\n\n return (\n \n );\n}\n","import { ReactNode } from 'react';\nimport {\n ConnectedEventInfo,\n ConnectedEventInfoProps,\n} from 'src/components/Events/ConnectedEventInfo';\nimport { Stack } from 'src/core/ui';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { EventMappingStateFilter } from 'src/utils/eventQueryUtils';\nimport { Event, EventWithData, Performer, Venue } from 'src/WebApiController';\n\nimport * as styles from './EventItemHeader.css';\n\nexport const METRICS_PLACEHOLDER_DIMS = { width: '50px' };\n\nexport type EventItemHeaderType = {\n event: Event;\n entityCount: number;\n performer?: Performer | null;\n venue?: Venue | null;\n hideYearFromDate: boolean;\n mainMetrics?: string | React.ReactNode;\n subMetrics?: string[] | React.ReactNode[];\n};\n\nexport type EventItemHeaderComponentType = Pick<\n ConnectedEventInfoProps,\n 'showYear' | 'showMappingState'\n> & {\n event: Event;\n performer?: Performer | null;\n venue?: Venue | null;\n actions?: ReactNode;\n headerMetrics?: ReactNode;\n metrics?: ReactNode;\n eventNameLink?: string;\n};\n\n/**\n * Wraps `ConnectedEventInfo` and adds actions and metrics.\n * @param props\n * @returns\n */\nexport const EventItemHeader = ({\n showYear,\n event,\n performer,\n venue,\n actions,\n headerMetrics,\n metrics,\n showMappingState,\n eventNameLink,\n}: EventItemHeaderComponentType) => {\n const isMobile = useMatchMedia('mobile');\n\n const eventMappingState =\n event.viagId == null\n ? event.mapRejRsnId != null\n ? EventMappingStateFilter.Rejected\n : EventMappingStateFilter.Pending\n : undefined; // Mapped is not used for display yet\n\n const afterContent = (\n <>\n \n {actions}\n {headerMetrics}\n \n \n {metrics}\n \n \n );\n\n return (\n \n \n {isMobile ? (\n afterContent\n ) : (\n \n {afterContent}\n \n )}\n \n );\n};\n","import { ReactNode } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport * as styles from './Metrics.css';\n\nexport type ListingMainMetricsProps = {\n ticketsCount: ReactNode;\n};\n\nexport function ListingMainMetrics({ ticketsCount }: ListingMainMetricsProps) {\n return (\n
    \n {ticketsCount} \n
    \n );\n}\n\nexport type ListingSubMetricsProps = {\n totalUnsoldListPrice: ReactNode;\n totalNetProceeds: ReactNode;\n totalGrossMargin: ReactNode;\n};\n\nexport function ListingSubMetrics({\n totalUnsoldListPrice,\n totalNetProceeds,\n totalGrossMargin,\n}: ListingSubMetricsProps) {\n return (\n
    \n {totalUnsoldListPrice}\n {totalNetProceeds}\n {totalGrossMargin}\n
    \n );\n}\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport const Metrics = styled.span`\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n text-align: right;\n line-height: 18px;\n white-space: nowrap;\n ${({\n theme: {\n typography: { getStyles },\n },\n }) => getStyles('caption1')};\n`;\n\nexport const MainMetrics = styled.span`\n ${({\n theme: {\n typography: { getStyles },\n },\n }) => getStyles('subtitle1')};\n`;\n\nexport const BulletPoint = styled.span<{ addBulletPoint?: boolean }>`\n width: ${() => vars.spacing.xxs};\n height: ${() => vars.spacing.xxs};\n margin: ${() => `0 ${vars.spacing.sm}`};\n ${(props) =>\n props.addBulletPoint\n ? `background-color: ${props.theme.colors.borderPrimary}`\n : ''};\n border-radius: ${() => vars.spacing.xxs};\n display: inline-block;\n vertical-align: middle;\n`;\n","import { ReactNode } from 'react';\n\nimport { MainMetrics, Metrics } from './MetricsDisplay.styled';\n\nexport const MetricsDisplay = ({\n className,\n mainMetrics,\n subMetrics,\n subMetricBelow,\n style,\n}: {\n className?: string;\n mainMetrics: ReactNode;\n subMetrics?: ReactNode;\n subMetricBelow?: boolean;\n style?: React.CSSProperties;\n}) => {\n return (\n \n {!subMetricBelow && subMetrics}\n {mainMetrics}\n {subMetricBelow && subMetrics}\n \n );\n};\n","import clsx from 'clsx';\nimport { ComponentProps, ReactNode } from 'react';\nimport { useSiteTheme } from 'src/contexts/SiteTheme/SiteThemeContext';\n\nimport * as styles from './ContentPlaceholder.css';\n\nexport type ContentPlaceholderProps = Pick<\n ComponentProps<'div'>,\n 'className' | 'style'\n> & {\n width?: string;\n height?: string;\n isCircle?: boolean;\n children?: ReactNode;\n};\n\nexport const ContentPlaceholder = ({\n width = '100%',\n height = '100%',\n isCircle = false,\n children,\n className,\n ...rest\n}: ContentPlaceholderProps) => {\n const { isDarkMode } = useSiteTheme();\n return (\n \n {children}\n \n );\n};\n","import { ContentPlaceholder } from 'src/core/POS/ContentPlaceholder';\nimport styled from 'styled-components/macro';\n\nimport * as styles from './MetricsDisplay.css';\n\nconst SUB_HEIGHT = '10px';\nexport const MetricsDisplayPlaceholder = ({\n width = '100%',\n height = '100%',\n}: {\n width?: string;\n height?: string;\n}) => {\n return (\n \n \n \n \n );\n};\n\nconst MetricsPlaceholderWrapper = styled.div<{ width: string; height: string }>`\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n width: ${({ width }) => width};\n height: ${({ height }) => height};\n`;\n","import { calc } from '@vanilla-extract/css-utils';\nimport { assignInlineVars } from '@vanilla-extract/dynamic';\nimport { useSiteTheme } from 'src/contexts/SiteTheme/SiteThemeContext';\nimport { vars } from 'src/core/themes';\n\nimport * as styles from './CircleProgressBar.css';\n\n/**\n * Glyph widths in px for a font size of 24px.\n */\nconst GLYPH_WIDTHS = {\n '-': 11.25,\n ',': 5.09,\n '.': 4.97,\n '%': 20.63,\n '1': 11.75,\n '2': 15.13,\n '3': 15.83,\n '4': 16.28,\n '5': 15.47,\n '6': 15.84,\n '7': 13.94,\n '8': 15.88,\n '9': 15.84,\n};\n/**\n * Arbitrary default width of 13px.\n */\nconst DEFAULT_GLYPH_WIDTH = 13;\n\n/**\n * The maximum text width assuming the default props.\n */\nconst MAX_TEXT_WIDTH = 56;\n\n/**\n * @param text\n * @param maxTextWidth\n * @returns The estimated font scaling factor needed to fit within the given `maxTextWidth`.\n */\nconst calcEstimatedFontScale = (text: string, maxTextWidth: number) => {\n let textWidth = 0;\n for (const c of text) {\n textWidth +=\n GLYPH_WIDTHS[c as keyof typeof GLYPH_WIDTHS] ?? DEFAULT_GLYPH_WIDTH;\n }\n // since we set a letter spacing of `-0.0625em` which comes out to -1px with a font size of 24px,\n // we reduce by this amount between each letter\n const letterSpacingOffset = -(text.length - 1);\n return maxTextWidth / (textWidth + letterSpacingOffset);\n};\n\n/**\n * -100%\n */\nconst MIN_VALUE = -100;\n/**\n * 200%\n */\nconst MAX_VALUE = 200;\n\nexport type CircleProgressBarProps = {\n /**\n * Height and width of the bounding box.\n */\n size?: number;\n /**\n * Thickness of the progress bar.\n */\n barWidth?: number;\n /**\n * Progress percentage. This does not affect what text is displayed in the center.\n *\n * eg. `75` for 75%\n */\n value?: number;\n /**\n * Text to render in the center of the circle.\n */\n children?: string;\n};\n\nexport function CircleProgressBar({\n size = 48,\n barWidth = 6,\n value = 0,\n children,\n}: CircleProgressBarProps) {\n const { isDarkMode } = useSiteTheme();\n\n value = Math.min(Math.max(value, MIN_VALUE), MAX_VALUE);\n\n const radius = (size - barWidth) / 2;\n const center = radius + barWidth / 2;\n const circumference = 2 * Math.PI * radius;\n\n const relativePercent = (value / 100) % 1 || Math.sign(value);\n const offset = circumference * (1 - relativePercent);\n\n const foregroundColor =\n value < 0\n ? !isDarkMode\n ? vars.color.backgroundDisabled\n : vars.color.borderError\n : value <= 100\n ? !isDarkMode\n ? vars.color.backgroundBrandActive\n : vars.color.textBrand\n : !isDarkMode\n ? '#2D0F54'\n : vars.color.textBrand;\n\n const backgroundColor =\n value < 0\n ? !isDarkMode\n ? 'transparent'\n : vars.color.backgroundPrimaryActive\n : value <= 100\n ? !isDarkMode\n ? vars.color.backgroundBrandHoverLight\n : vars.color.backgroundPrimaryActive\n : vars.color.backgroundBrandActive;\n\n return (\n
    \n \n \n \n \n 4\n ? {\n fontSize: calc(vars.typography.fontSize['2xl'])\n .multiply(calcEstimatedFontScale(children, MAX_TEXT_WIDTH))\n .toString(),\n }\n : {}),\n }}\n >\n {children}\n
    \n \n );\n}\n","import clsx from 'clsx';\nimport { ComponentProps, PropsWithChildren, ReactNode } from 'react';\nimport {\n CircleProgressBar as OriginalCircleProgressBar,\n CircleProgressBarProps,\n} from 'src/core/POS/CircleProgressBar';\nimport { ContentPlaceholder } from 'src/core/POS/ContentPlaceholder';\nimport { shared, vars } from 'src/core/themes';\nimport { mergeProps } from 'src/core/utils';\n\nimport * as styles from './MetricTile.css';\nimport { ArrowDownIcon7, ArrowUpIcon7 } from 'src/svgs/Viagogo';\nimport { PosIconProps } from 'src/svgs/SvgWrapper';\nimport { getCurrentLanguage } from 'src/utils/localeUtils';\n\ntype RootProps = Pick, 'style' | 'className'> &\n PropsWithChildren;\n\nexport function Root({ children, ...props }: RootProps) {\n return (\n
    {children}
    \n );\n}\n\nexport function Title({\n isCompact,\n children,\n}: { isCompact?: boolean } & PropsWithChildren) {\n return isCompact ? (\n
    \n
    {children}
    \n
    \n ) : (\n
    {children}
    \n );\n}\n\nexport function Metric({\n isCompact: isCompact,\n showLoadingPlaceholders,\n children,\n}: PropsWithChildren<{\n isCompact?: boolean;\n /**\n * Whether to show a placeholder if the metric value is `undefined`.\n */\n showLoadingPlaceholders?: boolean;\n}>) {\n return (\n \n {showLoadingPlaceholders && children === undefined ? (\n \n ) : (\n children\n )}\n \n );\n}\n\nexport function FractionMetricText({\n numerator,\n denominator,\n}: {\n numerator: ReactNode;\n denominator: ReactNode;\n}) {\n return (\n
    \n
    {numerator}
    \n
    \n
    {denominator}
    \n
    \n );\n}\n\nexport function CircleProgressBar({\n ...props\n}: Pick) {\n return ;\n}\n\nexport function Link({ href, children }: PropsWithChildren<{ href?: string }>) {\n return (\n \n {children}\n \n );\n}\n\n/**\n * This component can be used for the \"See All\" link instead of `Link`.\n * @param props\n */\nexport function SeeAllLink({ href }: { href?: string }) {\n return See All >;\n}\n\nexport function PercentChangeMetricText({\n formattedCurrentValue,\n currentValue,\n previousValue,\n}: {\n formattedCurrentValue: string,\n currentValue: number,\n previousValue: number,\n }) {\n let percentageChangeValue: number | null = null;\n if (currentValue === previousValue) {\n percentageChangeValue = 0;\n }\n else if (currentValue !== 0 && previousValue !== 0) {\n percentageChangeValue = (currentValue - previousValue) / previousValue;\n }\n\n const percentageNumberFormatter = new Intl.NumberFormat(getCurrentLanguage(), {\n style: 'percent',\n minimumFractionDigits: 0,\n maximumFractionDigits: 0,\n });\n\n const absPercentageChange = percentageChangeValue\n ? percentageNumberFormatter.format(Math.abs(percentageChangeValue))\n : \"\";\n const PercentageChangeArrowIcon = (props: PosIconProps) => {\n if (!percentageChangeValue) {\n return <>;\n }\n\n return percentageChangeValue && percentageChangeValue < 0\n ? \n : \n };\n\n return (\n
    \n
    {formattedCurrentValue}
    \n
    \n \n
    {absPercentageChange}
    \n
    \n
    \n );\n}\n","import { ReactNode } from 'react';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport * as styles from './Metrics.css';\n\nexport type ListingMainMetricsV2Props = {\n unsoldTicketsCount: ReactNode;\n ticketsCount: ReactNode;\n};\n\nexport function ListingMainMetricsV2({\n unsoldTicketsCount,\n ticketsCount,\n}: ListingMainMetricsV2Props) {\n const unsoldTicketsCountText = useContent(ContentId.NumberOfUnsoldTickets);\n return (\n
    \n {unsoldTicketsCount}\n {'/'}\n {ticketsCount} \n
    \n );\n}\n\nexport const DividerLine = () => {\n return
    ;\n};\n\nexport type ListingSubMetricsV2Props = {\n totalPandL: ReactNode;\n totalUnsoldCost: ReactNode;\n totalUnlistedQuantity: ReactNode;\n};\n\nexport function ListingSubMetricsV2({\n totalPandL,\n totalUnsoldCost,\n totalUnlistedQuantity,\n}: ListingSubMetricsV2Props) {\n const totalUnsoldCostText = useContent(ContentId.TotalCostOfUnsoldTickets);\n const pandLText = useContent(ContentId.PandLTitle);\n const totalUnlistedQuantityText = useContent(\n ContentId.NumberOfUnlistedTicketsDescription\n );\n\n return (\n
    \n \n {totalPandL}\n \n \n \n {totalUnsoldCost}\n \n \n \n {totalUnlistedQuantity}\n \n
    \n );\n}\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const UnlistedTicketsIcon = (props: PosIconProps) => {\n return (\n // It's import for the viewbox fo this SVG to stay this value else it won't resize properly\n \n \n \n \n );\n};\n","import clsx from 'clsx';\nimport {\n ListingMainMetrics,\n ListingSubMetrics,\n SaleHeaderMetrics,\n SaleMainMetrics,\n SaleSubMetrics,\n} from 'src/components/Metrics';\nimport {\n ListingMainMetricsV2,\n ListingSubMetricsV2,\n} from 'src/components/Metrics/ListingMetricsV2';\nimport {\n BaseContentProps,\n Content,\n FormatContent,\n} from 'src/contexts/ContentContext';\nimport { ContentPlaceholder } from 'src/core/POS/ContentPlaceholder';\nimport { vars } from 'src/core/themes';\nimport { MarginMetricIcon, SalesMetricIcon, SignalIcon } from 'src/svgs';\nimport { UnlistedTicketsIcon } from 'src/svgs/UnlistedTicketsIcon';\nimport {\n ListingMetrics,\n SaleMetrics,\n TicketGroupMetrics,\n UiMoney,\n} from 'src/WebApiController';\n\nimport { ContentId } from './constants/contentId';\nimport { FormatContentId } from './constants/formatContentId';\nimport { getCurrentLanguage } from './localeUtils';\nimport * as styles from './ticketMetricUtils.css';\n\n// TODO:\n// - Unit test file\n// - Are the other untranslated parts even used/needed?\nexport const getMetricsDisplay = (\n key: keyof SaleMetrics,\n params: BaseContentProps['params']\n) => {\n switch (key) {\n case 'qtySold':\n return ;\n case 'saleUnfilled':\n return ;\n case 'netProcs':\n return ;\n case 'marg':\n return ;\n case 'ttlCst':\n return ;\n default:\n return '';\n }\n};\n\nexport type InventorySummaryListingMetricsDisplayStrings = {\n formattedTotalSoldQuantity: string;\n formattedTotalTicketQuantity: string;\n formattedTotalSoldPercentage: string;\n formattedTotalListPrice: string;\n formattedTotalNetProceeds: string;\n formattedTotalGrossMargin: string;\n formattedAverageSalePrice: string;\n totalSoldPercentage: number;\n totalGrossMargin: number;\n};\n\nexport const getInventorySummaryListingMetricsDisplayStrings = (\n {\n soldQty: totalSoldQuantity,\n tktQty: totalTicketQuantity,\n currency: currencyCode,\n ttlListPrc: totalListPrice,\n netProcs: totalNetProceeds,\n pandL: totalGrossProfit,\n }: ListingMetrics,\n currency?: string | null\n) => {\n const quantityNumberFormat = new Intl.NumberFormat(getCurrentLanguage(), {\n style: 'decimal',\n notation: 'compact',\n });\n\n const curCode = currencyCode || currency || 'USD';\n const currencyNumberFormat = new Intl.NumberFormat(getCurrentLanguage(), {\n style: 'currency',\n notation: 'compact',\n currency: curCode,\n });\n\n const totalGrossMargin =\n totalGrossProfit?.amt > 0 && totalNetProceeds?.amt > 0\n ? totalGrossProfit.amt / totalNetProceeds.amt\n : 0;\n const totalSoldPercentage =\n totalTicketQuantity > 0 ? totalSoldQuantity / totalTicketQuantity : 0;\n const averageSalePrice =\n totalNetProceeds?.amt > 0 && totalSoldQuantity > 0\n ? totalNetProceeds?.amt / totalSoldQuantity\n : 0;\n return {\n formattedTotalSoldQuantity: quantityNumberFormat.format(\n totalSoldQuantity ?? 0\n ),\n formattedTotalTicketQuantity:\n quantityNumberFormat.format(totalTicketQuantity),\n formattedTotalSoldPercentage: (totalSoldPercentage ?? 0).toLocaleString(\n undefined,\n { style: 'percent', minimumFractionDigits: 0 }\n ),\n formattedTotalListPrice: new Intl.NumberFormat(getCurrentLanguage(), {\n style: 'currency',\n currency: curCode,\n }).format(totalListPrice?.amt ?? 0),\n formattedTotalNetProceeds: currencyNumberFormat.format(\n totalNetProceeds?.amt ?? 0\n ),\n formattedTotalGrossMargin: (totalGrossMargin ?? 0).toLocaleString(\n undefined,\n {\n style: 'percent',\n minimumFractionDigits: 0,\n }\n ),\n formattedAverageSalePrice: currencyNumberFormat.format(\n averageSalePrice ?? 0\n ),\n totalSoldPercentage,\n totalGrossMargin,\n };\n};\n\nexport const getInventoryListingMetricsDisplayStrings = (\n {\n tktQty: totalTicketQuantity,\n unsoldQty: totalUnsoldQuantity,\n listQty: totalListedQuantity,\n unlistQty: totalUnlistedQuantity,\n currency: currencyCode,\n ttlCst: totalCost,\n unsoldCst: totalUnsoldCost,\n ttlUnsoldListPrc: totalUnsoldListPrice,\n netProcs: totalNetProceeds,\n pandL: totalGrossProfit,\n }: ListingMetrics,\n currency?: string | null\n) => {\n const BIG_NUMBER_THRESHOLD = 1000;\n const curCode = currencyCode || currency || 'USD';\n\n const getFractionDigits = (val: number) =>\n val >= BIG_NUMBER_THRESHOLD ? 1 : 0;\n\n const getQuantityNumberFormat = () =>\n Intl.NumberFormat(undefined, {\n style: 'decimal',\n minimumFractionDigits: 0,\n maximumFractionDigits: 0,\n });\n\n const getCurrencyNumberFormat = (val: number) =>\n Intl.NumberFormat(undefined, {\n style: 'currency',\n notation: 'compact',\n currency: curCode,\n minimumFractionDigits: getFractionDigits(val),\n maximumFractionDigits: getFractionDigits(val),\n });\n\n const totalCostAmount = totalCost?.amt ?? 0;\n const totalUnsoldCostAmount = totalUnsoldCost?.amt ?? 0;\n const totalUnsoldListPriceAmount = totalUnsoldListPrice?.amt ?? 0;\n const totalNetProceedsAmount = totalNetProceeds?.amt ?? 0;\n const totalGrossProfitAmount = totalGrossProfit?.amt ?? 0;\n const totalGrossMargin =\n totalNetProceeds?.amt > 0\n ? (totalGrossProfit?.amt ?? 0) / totalNetProceeds.amt\n : 0;\n\n return {\n formattedTotalTicketQuantity: getQuantityNumberFormat().format(\n totalTicketQuantity ?? 0\n ),\n formattedTotalUnsoldQuantity: getQuantityNumberFormat().format(\n totalUnsoldQuantity ?? 0\n ),\n formattedTotalListedQuantity: getQuantityNumberFormat().format(\n totalListedQuantity ?? 0\n ),\n formattedTotalUnlistedQuantity: getQuantityNumberFormat().format(\n totalUnlistedQuantity ?? 0\n ),\n formattedTotalCost:\n getCurrencyNumberFormat(totalCostAmount).format(totalCostAmount),\n formattedTotalUnsoldCost: getCurrencyNumberFormat(\n totalUnsoldCostAmount\n ).format(totalUnsoldCostAmount),\n formattedTotalUnsoldListPrice: getCurrencyNumberFormat(\n totalUnsoldListPriceAmount\n ).format(totalUnsoldListPriceAmount),\n formattedTotalNetProceeds: getCurrencyNumberFormat(\n totalNetProceedsAmount\n ).format(totalNetProceedsAmount),\n\n formattedTotalGrossMargin: totalGrossMargin.toLocaleString(undefined, {\n style: 'percent',\n minimumFractionDigits: 0,\n }),\n formattedTotalGrossProfit: getCurrencyNumberFormat(\n totalGrossProfitAmount\n ).format(totalGrossProfitAmount),\n };\n};\n\ntype InventoryListingMetricsDisplay = {\n mainMetrics: JSX.Element;\n subMetrics: JSX.Element;\n};\n\n/**\n * Displaying metrics for the inventory listing (v2)\n * Main Metric: UnsoldTickets / TotalTickets\n * Sub Metrics: UnsoldCost, ListedQuantity, UnlistedQuantity\n */\nexport const getInventoryListingMetricsV2 = (\n metrics: ListingMetrics | null | undefined,\n currencyCode?: string | null\n): InventoryListingMetricsDisplay => {\n if (!metrics) {\n return {\n mainMetrics: ,\n subMetrics: (\n \n \n \n }\n totalUnsoldCost={\n <>\n \n \n }\n totalUnlistedQuantity={\n <>\n \n \n \n }\n />\n ),\n };\n }\n const {\n formattedTotalTicketQuantity,\n formattedTotalUnsoldQuantity,\n formattedTotalUnsoldCost: displayTotalUnsoldCost,\n formattedTotalGrossProfit,\n formattedTotalUnlistedQuantity,\n } = getInventoryListingMetricsDisplayStrings(metrics, currencyCode);\n\n const isLoss = (metrics.pandL?.amt ?? 0) < 0;\n const isProfit = (metrics.pandL?.amt ?? 0) > 0;\n const displayTotalGrossProfit = `${\n isProfit ? '+' : ''\n }${formattedTotalGrossProfit}`;\n\n return {\n mainMetrics: (\n \n ),\n subMetrics: (\n \n \n {displayTotalGrossProfit}\n \n \n }\n totalUnsoldCost={\n <>\n {displayTotalUnsoldCost}\n \n }\n totalUnlistedQuantity={\n <>\n \n \n \n {formattedTotalUnlistedQuantity}\n \n }\n />\n ),\n };\n};\n\nexport const addMoneySameCurrency = (\n a: UiMoney | null | undefined,\n b: UiMoney | null | undefined,\n removeDecimals?: boolean,\n keepDecimalsForValuesLessThanOne?: boolean,\n skipDisplay?: boolean\n): UiMoney | null => {\n if (!a && !b) {\n return null;\n }\n if (a && !b) {\n return a;\n }\n if (!a && b) {\n return b;\n }\n\n const amt = a!.amt + b!.amt;\n if (keepDecimalsForValuesLessThanOne && amt < 1) {\n removeDecimals = false;\n }\n\n let disp: string | null = null;\n\n if (!skipDisplay) {\n const dispFormat = new Intl.NumberFormat(undefined, {\n minimumFractionDigits: removeDecimals ? 0 : a!.dec,\n maximumFractionDigits: removeDecimals ? 0 : a!.dec,\n style: 'currency',\n currency: a!.currency ?? 'USD',\n });\n\n disp = dispFormat.format(amt);\n }\n\n return {\n amt,\n disp,\n currency: a!.currency,\n dec: a!.dec,\n };\n};\n\nexport const addListingMetrics = (\n metricA: ListingMetrics,\n metricB: ListingMetrics\n): ListingMetrics => {\n const currencyCode = metricA.currency;\n\n const addListingMoney = (\n a: UiMoney | null | undefined,\n b: UiMoney | null | undefined\n ) =>\n addMoneySameCurrency(\n a,\n b,\n false, // removeDecimal\n true, // keepDecimalForValueLessThanOne\n true // skipDisplay\n );\n\n return {\n tktQty: metricA.tktQty + metricB.tktQty,\n soldQty: metricA.soldQty + metricB.soldQty,\n unsoldQty: metricA.unsoldQty + metricB.unsoldQty,\n listQty: metricA.listQty + metricB.listQty,\n unlistQty: metricA.listQty + metricB.unlistQty,\n currency: currencyCode,\n\n ttlCst: addListingMoney(metricA.ttlCst, metricB.ttlCst)!,\n soldCst: addListingMoney(metricA.soldCst, metricB.soldCst)!,\n unsoldCst: addListingMoney(metricA.unsoldCst, metricB.unsoldCst)!,\n ttlListPrc: addListingMoney(metricA.ttlListPrc, metricB.ttlListPrc)!,\n ttlUnsoldListPrc: addListingMoney(\n metricA.ttlUnsoldListPrc,\n metricB.ttlUnsoldListPrc\n )!,\n netProcs: addListingMoney(metricA.netProcs, metricB.netProcs)!,\n pandL: addListingMoney(metricA.pandL, metricB.pandL)!,\n };\n};\n\nexport const addSaleMetrics = (\n metricA: SaleMetrics,\n metricB: SaleMetrics\n): SaleMetrics => {\n const currencyCode = metricA.currency ?? metricB.currency;\n\n return {\n qtySold: metricA.qtySold + metricB.qtySold,\n saleUnfilled: metricA.saleUnfilled + metricB.saleUnfilled,\n netProcs: addMoneySameCurrency(\n metricA.netProcs,\n metricB.netProcs,\n true, // removeDecimal\n true, // keepDecimalForValueLessThanOne\n true // skipDisplay\n ),\n ttlCst: addMoneySameCurrency(\n metricA.ttlCst,\n metricB.ttlCst,\n true, // removeDecimal\n true, // keepDecimalForValueLessThanOne\n true // skipDisplay\n ),\n currency: currencyCode,\n marg:\n metricA.marg == null && metricB.marg == null\n ? null\n : (metricA.marg ?? 0) + (metricB.marg ?? 0),\n };\n};\n\nexport const addTicketGroupMetrics = (\n metricA: TicketGroupMetrics,\n metricB: TicketGroupMetrics\n): TicketGroupMetrics => {\n const currencyCode = metricA.currency ?? metricB.currency;\n\n return {\n tktQty: metricA.tktQty + metricB.tktQty,\n ttlCst: addMoneySameCurrency(\n metricA.ttlCst,\n metricB.ttlCst,\n true, // removeDecimal\n true, // keepDecimalForValueLessThanOne\n true // skipDisplay\n ),\n currency: currencyCode,\n };\n};\n\nexport const getInventoryListingMetrics = (\n metrics: ListingMetrics | null | undefined,\n currencyCode?: string | null\n): InventoryListingMetricsDisplay => {\n if (!metrics) {\n return {\n mainMetrics: ,\n subMetrics: (\n \n \n \n \n }\n totalNetProceeds={\n <>\n \n \n \n }\n totalGrossMargin={\n <>\n \n \n \n }\n />\n ),\n };\n }\n const {\n formattedTotalTicketQuantity,\n formattedTotalUnsoldListPrice,\n formattedTotalNetProceeds,\n formattedTotalGrossMargin,\n } = getInventoryListingMetricsDisplayStrings(metrics, currencyCode);\n return {\n mainMetrics: (\n \n ),\n subMetrics: (\n \n \n \n \n {formattedTotalUnsoldListPrice}\n \n }\n totalNetProceeds={\n <>\n \n \n \n {formattedTotalNetProceeds}\n \n }\n totalGrossMargin={\n <>\n \n \n \n {formattedTotalGrossMargin}\n \n }\n />\n ),\n };\n};\n\nexport const getSalesSaleMetrics = (\n metrics: SaleMetrics | null | undefined,\n addBulletPoint = true,\n firstBulletPoint = true,\n secondBulletPoint = true\n) => {\n return metrics === undefined\n ? null\n : !metrics\n ? { headerMetrics: [], mainMetrics: '', subMetrics: [] }\n : {\n headerMetrics: (\n 0} />\n ),\n mainMetrics: (\n \n ),\n subMetrics: (\n \n ),\n };\n};\n\nexport const getEmptyMetric = () =>\n ({\n ticketsTotal: 0,\n qtySold: 0,\n saleUnfilled: 0,\n netProcs: { disp: '' } as UiMoney,\n ttlCst: { disp: '' } as UiMoney,\n marg: 0,\n currency: null,\n }) as SaleMetrics;\n","import { Content } from 'src/contexts/ContentContext';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { formatPercent } from 'src/utils/numberFormatter';\nimport { getMetricsDisplay } from 'src/utils/ticketMetricUtils';\nimport { Permission } from 'src/WebApiController';\n\nimport * as styles from './Metrics.css';\nimport { BulletPoint } from './MetricsDisplay/MetricsDisplay.styled';\n\nexport type SaleMainMetricsProps = {\n totalNetProceeds: string | null;\n};\n\nexport function SaleMainMetrics({ totalNetProceeds }: SaleMainMetricsProps) {\n const hasTotalNetProceedsPermissions = useUserHasAnyOfPermissions(\n Permission.Sales_ViewProceeds,\n Permission.Sales_ViewRecentProceeds\n );\n return totalNetProceeds == null ? (\n hasTotalNetProceedsPermissions ? (\n \n ) : null\n ) : (\n {totalNetProceeds}\n );\n}\n\nexport type SaleHeaderMetricsProps = {\n needFulfillment: boolean;\n};\n\nexport function SaleHeaderMetrics({ needFulfillment }: SaleHeaderMetricsProps) {\n return needFulfillment ? (\n
    \n \n
    \n ) : null;\n}\n\nexport type SaleSubMetricsProps = {\n margin: number | null;\n ticketsFulfilled: number;\n ticketsSold: number;\n addBulletPoint?: boolean;\n firstBulletPoint?: boolean;\n secondBulletPoint?: boolean;\n};\n\nexport function SaleSubMetrics({\n margin,\n ticketsFulfilled,\n ticketsSold,\n addBulletPoint = true,\n firstBulletPoint = true,\n secondBulletPoint = true,\n}: SaleSubMetricsProps) {\n const hasCostMarginPermission = useUserHasAnyOfPermissions(\n Permission.Sales_ViewCostAndMargin\n );\n\n return (\n \n {margin == null ? (\n hasCostMarginPermission ? (\n \n ) : null\n ) : (\n {getMetricsDisplay('marg', `${formatPercent(margin)}`)}\n )}\n {firstBulletPoint && }\n \n {getMetricsDisplay(\n 'saleUnfilled',\n `${ticketsFulfilled}/${ticketsSold}`\n )}\n \n {secondBulletPoint && }\n \n );\n}\n","import { useMemo } from 'react';\nimport {\n EventItemHeader,\n EventItemHeaderType,\n} from 'src/components/Events/EventItemHeader/EventItemHeader';\nimport { MetricsDisplay } from 'src/components/Metrics';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Button } from 'src/core/ui';\nimport { PurchaseDeeplinkQueryParam } from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { createPurchaseEventPageUrl } from 'src/utils/purchaseUtils';\nimport { Event, Performer, Venue } from 'src/WebApiController';\n\nimport * as styles from './PurchaseEventItemHeader.css';\n\nexport type PurchaseEventItemHeaderProps = Pick<\n EventItemHeaderType,\n 'event' | 'performer' | 'venue' | 'hideYearFromDate'\n> & {\n cost?: string;\n numOfTicketGroups?: number;\n numOfTickets?: number;\n disabled?: boolean;\n onAddTicketsForEvent?: (\n event: Event,\n performer?: Performer | null,\n venue?: Venue | null\n ) => void;\n removeMetrics?: boolean;\n};\n\nexport const PurchaseEventItemHeader = ({\n event,\n performer,\n venue,\n numOfTicketGroups,\n numOfTickets,\n onAddTicketsForEvent,\n cost,\n disabled,\n removeMetrics,\n ...rest\n}: PurchaseEventItemHeaderProps) => {\n const purchaseEventUrl = useMemo(() => {\n const eventId = event?.viagVirtualId;\n if (eventId) {\n return createPurchaseEventPageUrl(eventId, [PurchaseDeeplinkQueryParam]);\n }\n return undefined;\n }, [event]);\n\n const actions =\n !disabled && onAddTicketsForEvent\n ? [\n \n onAddTicketsForEvent(event, performer, venue)}\n >\n \n \n ,\n ]\n : undefined;\n return (\n \n {numOfTicketGroups ? (\n
    \n {numOfTicketGroups}{' '}\n 1\n ? ContentId.TicketGroups\n : ContentId.TicketGroup\n }\n />\n
    \n ) : null}\n {numOfTickets ? (\n
    \n {numOfTickets}{' '}\n 1 ? ContentId.Tickets : ContentId.Ticket\n }\n />\n
    \n ) : null}\n
    \n }\n />\n )\n }\n />\n );\n};\n","import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\nimport { useCallback, useMemo } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport {\n ActionOutboxEntityType,\n Tag,\n TagClient,\n TagsValueType,\n} from 'src/WebApiController';\n\nexport function useTagsForEntityType(\n entityType?:\n | ActionOutboxEntityType.Listing\n | ActionOutboxEntityType.Purchase\n | ActionOutboxEntityType.Sale\n | ActionOutboxEntityType.SellerEvent,\n includeInReport?: boolean\n) {\n const enabled = entityType != null;\n\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError, showErrorDialog } = useErrorBoundaryContext();\n\n const queryClient = useQueryClient();\n const mainQueryKey = [\n 'TagClient.getTagsByEntityTypeId',\n activeAccountWebClientConfig.activeAccountId,\n entityType,\n enabled,\n ];\n\n const shouldQuery =\n activeAccountWebClientConfig.activeAccountId != null && enabled;\n\n const tagByEntityTypeQuery = useQuery({\n queryKey: [...mainQueryKey, includeInReport],\n queryFn: () => {\n if (!shouldQuery) {\n return null;\n }\n\n return new TagClient(activeAccountWebClientConfig).getTagsByEntityTypeId(\n entityType,\n includeInReport ?? null\n );\n },\n\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n staleTime: Infinity,\n networkMode: 'offlineFirst',\n meta: {\n onError: (error: ErrorTypes) => {\n trackError('TagClient.getTagsByEntityTypeId', error, {\n entityType,\n includeInReport,\n });\n },\n },\n });\n\n const tagWithValueByEntityTypeQuery = useQuery({\n queryKey: [\n 'TagClient.getTagsWithValueByEntityTypeId',\n activeAccountWebClientConfig.activeAccountId,\n entityType,\n ],\n queryFn: () => {\n if (!shouldQuery) {\n return null;\n }\n return new TagClient(\n activeAccountWebClientConfig\n ).getTagsWithValueByEntityTypeId(entityType);\n },\n\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n staleTime: Infinity,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError('TagClient.getTagsWithValueByEntityTypeId', error, {\n entityType,\n });\n },\n },\n });\n\n const isTag = useCallback(\n (name: string) => {\n return tagByEntityTypeQuery.data?.find((t) => t.key === name) != null;\n },\n [tagByEntityTypeQuery.data]\n );\n\n const mutation = useMutation({\n mutationFn: async ({ tags }: { tags: Tag[] }) => {\n return await new TagClient(\n activeAccountWebClientConfig\n ).upsertEntityTagsMetadata(entityType, tags);\n },\n // optimistic ui\n // Reference: https://tanstack.com/query/v3/docs/react/guides/optimistic-updates\n onMutate: ({ tags }) => {\n queryClient.cancelQueries({ queryKey: mainQueryKey });\n const prevValue = queryClient.getQueryData(mainQueryKey);\n queryClient.setQueryData(mainQueryKey, tags);\n return { prevValue };\n },\n onError: (err: ErrorTypes, { tags }, context) => {\n queryClient.setQueryData(mainQueryKey, context?.prevValue);\n showErrorDialog('TagClient.upsertEntityTagsMetadata', err, {\n trackErrorData: { tags },\n });\n },\n onSettled: () => {\n queryClient.invalidateQueries({ queryKey: mainQueryKey });\n },\n });\n\n const deleteMutation = useMutation({\n mutationFn: async ({ tags }: { tags: Tag[] }) => {\n return await new TagClient(\n activeAccountWebClientConfig\n ).deleteEntityTagsMetadata(\n entityType,\n tags.map((t) => t.key)\n );\n },\n // optimistic ui\n // Reference: https://tanstack.com/query/v3/docs/react/guides/optimistic-updates\n onMutate: ({ tags }) => {\n queryClient.cancelQueries({ queryKey: mainQueryKey });\n const prevValue = queryClient.getQueryData(mainQueryKey);\n queryClient.setQueryData(\n mainQueryKey,\n prevValue?.filter((t) => !tags.includes(t))\n );\n return { prevValue };\n },\n onError: (err: ErrorTypes, { tags }, context) => {\n queryClient.setQueryData(mainQueryKey, context?.prevValue);\n showErrorDialog('TagClient.deleteEntityTagsMetadata', err, {\n trackErrorData: { tags },\n });\n },\n onSettled: () => {\n queryClient.invalidateQueries({ queryKey: mainQueryKey });\n },\n });\n\n const tagsWithNoValue = useMemo(() => {\n if (\n tagByEntityTypeQuery.data == null ||\n tagWithValueByEntityTypeQuery.data == null\n ) {\n return [];\n }\n\n return tagByEntityTypeQuery.data.filter((t) => {\n const tagWithValue = tagWithValueByEntityTypeQuery.data?.find(\n (t2) => t2.key === t.key\n );\n return tagWithValue == null;\n });\n }, [tagByEntityTypeQuery.data, tagWithValueByEntityTypeQuery.data]);\n\n return {\n tagsMetadata: tagByEntityTypeQuery.data,\n isLoading: tagByEntityTypeQuery.isLoading,\n tagsMetadataNumeric: tagByEntityTypeQuery.data?.filter(\n (t) =>\n t.valueType === TagsValueType.Decimal ||\n t.valueType === TagsValueType.Int\n ),\n tagsWithNoValue,\n isError: tagByEntityTypeQuery.isError,\n refetch: tagByEntityTypeQuery.refetch,\n async mergeEntityTagsMetadata(tagsToUpdate: Tag[]) {\n await mutation.mutateAsync({ tags: tagsToUpdate });\n },\n async deleteEntityTagsMetadata(tagsToDelete: Tag[]) {\n await deleteMutation.mutateAsync({ tags: tagsToDelete });\n },\n isTag,\n };\n}\n","import { Children, ComponentProps, PropsWithChildren } from 'react';\nimport { isContentId } from 'src/contexts/ContentContext';\nimport { Tooltip } from 'src/core/ui';\n\n/**\n * Gets text value - only works for simple text elements\n * @param element\n * @returns\n */\nconst getTextValueFromSingleChild = (\n element: React.ReactNode\n): string | undefined => {\n if (element == null) {\n return undefined;\n }\n\n if (typeof element === 'string' || typeof element === 'number') {\n return element.toString();\n }\n\n const childrenArray = Children.toArray(element);\n const isSingleElement = childrenArray.length === 1;\n if (isSingleElement) {\n const childNode = (childrenArray[0] as React.ReactElement)?.props\n ?.children as React.ReactNode;\n\n if (childNode) {\n return getTextValueFromSingleChild(childNode);\n }\n }\n\n return undefined;\n};\n\n/**\n * Gets content Id recursively from single child\n * @param element\n * @returns\n */\nconst getContentIdFromSingleChild = (\n element: React.ReactNode\n): string | undefined => {\n if (element == null) {\n return undefined;\n }\n\n if (typeof element === 'string' && isContentId(element)) {\n return element;\n }\n\n const propsId = (element as React.ReactElement).props?.id;\n if (propsId != null && isContentId(propsId)) {\n return propsId;\n }\n\n const childrenArray = Children.toArray(element);\n const isSingleElement = childrenArray.length === 1;\n if (isSingleElement) {\n const childNode = (childrenArray[0] as React.ReactElement)?.props\n ?.children as React.ReactNode;\n\n if (childNode) {\n return getContentIdFromSingleChild(childNode);\n }\n }\n\n return undefined;\n};\n\nexport const DivWithTitle = ({\n children,\n showTooltip = true,\n align = 'right',\n title,\n ...props\n}: PropsWithChildren> & {\n showTooltip?: boolean;\n align?: 'center' | 'left' | 'right' | undefined;\n}) => {\n const content =
    {children}
    ;\n\n const contentUnwrapped = (\n \n {children}\n \n );\n\n if (showTooltip) {\n const mappedAligned =\n align === 'left' ? 'start' : align === 'right' ? 'end' : 'center';\n return (\n \n {title || contentUnwrapped}\n \n );\n }\n\n return <>{content};\n};\n","import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\nimport { id } from 'date-fns/locale';\nimport { useMemo } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { SELLER_ACCOUNT_SELLER_USERS_QUERY_KEY } from 'src/contexts/SellerAccountContext';\nimport { Feature, UserGroup, UserGroupClient } from 'src/WebApiController';\n\nimport { useUserHasFeature } from './useUserHasFeature';\n\nexport type UserGroupInput = Omit;\n\n/**\n * Data and functions returned by the hook to help with CRUD of user group\n */\ntype UseUserGroups = {\n userGroups: UserGroup[] | null | undefined;\n isLoading: boolean;\n deleteUserGroup: (userGroupId: number) => Promise;\n createUserGroup: (userGroupInput: UserGroupInput) => Promise;\n updateUserGroup: (\n userGroupId: number,\n userGroupInput: UserGroupInput\n ) => Promise;\n};\n/**\n * Hook to help with CRUD of user group\n * @param options\n * @returns\n */\nexport function useUserGroups(): UseUserGroups {\n const { showErrorDialog, trackError } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const userGroupClient = useMemo(\n () => new UserGroupClient(activeAccountWebClientConfig),\n [activeAccountWebClientConfig]\n );\n\n const hasTeamManagementFeature = useUserHasFeature(Feature.TeamManagement);\n\n const queryClient = useQueryClient();\n const queryKey = [\n 'useUserGroups',\n activeAccountWebClientConfig.activeAccountId,\n ];\n\n const shouldQuery =\n activeAccountWebClientConfig?.activeAccountId != null &&\n hasTeamManagementFeature;\n\n const userGroupQuery = useQuery({\n queryKey,\n queryFn: async () => {\n if (!shouldQuery) {\n return null;\n }\n\n return await userGroupClient.getUserGroups();\n },\n\n enabled: shouldQuery,\n meta: {\n onError: (err: ErrorTypes) => {\n trackError('UserGroupClient.getUserGroups', err);\n },\n },\n refetchOnWindowFocus: false,\n });\n\n const updateMutation = useMutation({\n mutationFn: async ({ value }: { value: UserGroup }) => {\n return await userGroupClient.updateUserGroup(\n value.userGroupId,\n value.userGroupName,\n value.userGroupDescription ?? undefined,\n value.sellerUserIds\n );\n },\n // optimistic ui\n // Reference: https://tanstack.com/query/v3/docs/react/guides/optimistic-updates\n onMutate: ({ value }) => {\n queryClient.cancelQueries({ queryKey });\n const prevValue = queryClient.getQueryData(queryKey);\n\n const newValue =\n value.userGroupId == null\n ? [...(prevValue ?? []), value]\n : prevValue?.map((r) =>\n r.userGroupId === value.userGroupId ? value : r\n );\n\n queryClient.setQueryData(queryKey, newValue);\n return { prevValue };\n },\n onError: (err: ErrorTypes, { value }, context) => {\n queryClient.setQueryData(queryKey, context?.prevValue);\n showErrorDialog('userGroupClient.updateUserGroup', err, {\n trackErrorData: { id, value },\n });\n },\n onSettled: () => {\n queryClient.invalidateQueries({ queryKey });\n queryClient.invalidateQueries({\n queryKey: [\n SELLER_ACCOUNT_SELLER_USERS_QUERY_KEY,\n activeAccountWebClientConfig.activeAccountId,\n ],\n });\n },\n });\n\n const updateUserGroup = async (\n userGroupId: number,\n userGroupInput: UserGroupInput\n ) => {\n return await updateMutation.mutateAsync({\n value: {\n userGroupId,\n userGroupName: userGroupInput.userGroupName,\n userGroupDescription: userGroupInput.userGroupDescription,\n sellerUserIds: userGroupInput.sellerUserIds,\n },\n });\n };\n\n const createMutation = useMutation({\n mutationFn: async ({ value }: { value: UserGroupInput }) => {\n return await userGroupClient.insertUserGroup(\n value.userGroupName,\n value.userGroupDescription ?? undefined,\n value.sellerUserIds\n );\n },\n // optimistic ui\n // Reference: https://tanstack.com/query/v3/docs/react/guides/optimistic-updates\n onMutate: ({ value }) => {\n queryClient.cancelQueries({ queryKey });\n const prevValue = queryClient.getQueryData(queryKey);\n\n const newValue = [...(prevValue ?? []), value as UserGroup];\n\n queryClient.setQueryData(queryKey, newValue);\n return { prevValue };\n },\n onError: (err: ErrorTypes, { value }, context) => {\n queryClient.setQueryData(queryKey, context?.prevValue);\n showErrorDialog('userGroupClient.createUserGroup', err, {\n trackErrorData: { id, value },\n });\n },\n onSettled: () => {\n queryClient.invalidateQueries({ queryKey });\n queryClient.invalidateQueries({\n queryKey: [\n SELLER_ACCOUNT_SELLER_USERS_QUERY_KEY,\n activeAccountWebClientConfig.activeAccountId,\n ],\n });\n },\n });\n\n const createUserGroup = async (userGroupInput: UserGroupInput) => {\n return await createMutation.mutateAsync({ value: userGroupInput });\n };\n\n const deleteMutation = useMutation({\n mutationFn: async (userGroupId: number) => {\n return await userGroupClient.deleteUserGroup(userGroupId);\n },\n // optimistic ui\n // Reference: https://tanstack.com/query/v3/docs/react/guides/optimistic-updates\n onMutate: (userGroupId: number) => {\n queryClient.cancelQueries({ queryKey });\n const prevValue = queryClient.getQueryData(queryKey);\n\n const newValue = prevValue?.filter((r) => r.userGroupId !== userGroupId);\n\n queryClient.setQueryData(queryKey, newValue);\n return { prevValue };\n },\n onError: (err: ErrorTypes, userGroupId: number, context) => {\n queryClient.setQueryData(queryKey, context?.prevValue);\n showErrorDialog('userGroupClient.deleteUserGroup', err, {\n trackErrorData: { id, userGroupId },\n });\n },\n onSettled: () => {\n queryClient.invalidateQueries({ queryKey });\n queryClient.invalidateQueries({\n queryKey: [\n SELLER_ACCOUNT_SELLER_USERS_QUERY_KEY,\n activeAccountWebClientConfig.activeAccountId,\n ],\n });\n },\n });\n\n const deleteUserGroup = (userGroupId: number) => {\n return deleteMutation.mutateAsync(userGroupId);\n };\n\n return {\n userGroups: userGroupQuery.data,\n isLoading: userGroupQuery.isLoading,\n deleteUserGroup,\n createUserGroup,\n updateUserGroup,\n };\n}\n","import { formatInTimeZone } from 'date-fns-tz';\nimport { useMemo } from 'react';\nimport { usePurchaseVendorSelector } from 'src/components/Selectors/PurchaseVendorSelector/usePurchaseVendorSelector';\nimport { useSellerAccountContext } from 'src/contexts/SellerAccountContext';\nimport { useSiteTimezoneContext } from 'src/contexts/SiteTimezoneContext/SiteTimezoneContext';\nimport { DivWithTitle } from 'src/core/ui/DivWithTitle';\nimport { useUserGroups } from 'src/hooks/useUserGroups';\nimport { Tag, TagsValueType } from 'src/WebApiController';\n\nimport * as styles from '../TagsFormBody.css';\n\nexport const TagValueDisplay = ({\n tag,\n displayMode,\n}: {\n tag: Tag;\n displayMode?: boolean;\n}) => {\n if (tag.valueType === TagsValueType.Url && displayMode) {\n return ;\n }\n\n if (tag.valueType === TagsValueType.Date) {\n return ;\n }\n\n if (tag.valueType === TagsValueType.POSUser) {\n return ;\n }\n\n if (tag.valueType === TagsValueType.UserGroup) {\n return ;\n }\n\n if (tag.valueType === TagsValueType.Vendor) {\n return ;\n }\n\n return (\n {tag.value}\n );\n};\n\nconst POSUserDisplay = ({ tag }: { tag: Tag }) => {\n const { allActiveUserInfos } = useSellerAccountContext();\n\n const sellerUserId = tag.value;\n\n const user = useMemo(() => {\n if (!sellerUserId || !allActiveUserInfos) {\n return null;\n }\n\n return allActiveUserInfos[sellerUserId];\n }, [allActiveUserInfos, sellerUserId]);\n\n return
    {user?.displayName}
    ;\n};\n\nconst UserGroupDisplay = ({ tag }: { tag: Tag }) => {\n const { userGroups } = useUserGroups();\n\n const userGroupId = tag.value;\n\n const userGroup = useMemo(() => {\n if (!userGroupId?.length || !userGroups?.length) {\n return null;\n }\n\n return userGroups.find((ug) => ug.userGroupId.toString() === userGroupId);\n }, [userGroupId, userGroups]);\n\n return
    {userGroup?.userGroupName}
    ;\n};\n\nconst VendorDisplay = ({ tag }: { tag: Tag }) => {\n const vendorId = tag.value;\n\n const { availableVendors } = usePurchaseVendorSelector({});\n const vendor = useMemo(() => {\n if (vendorId == null) {\n return null;\n }\n\n return availableVendors[vendorId];\n }, [availableVendors, vendorId]);\n\n return
    {vendor?.name}
    ;\n};\n\nconst DateDisplay = ({ tag }: { tag: Tag }) => {\n const { timeZone } = useSiteTimezoneContext();\n return (\n
    \n {tag?.value\n ? formatInTimeZone(\n new Date(tag.value),\n timeZone,\n \"MMMM d, yyyy 'at' h:mm a\"\n )\n : ''}\n
    \n );\n};\n\nconst UrlDisplay = ({ tag }: { tag: Tag }) => {\n const absoluteUrl = useMemo(() => {\n if (tag.valueType !== TagsValueType.Url || !tag.value) {\n return;\n }\n if (\n tag.value.toLocaleLowerCase().startsWith('http') ||\n tag.value.toLocaleLowerCase().startsWith('https')\n ) {\n return tag.value;\n }\n\n // Browser will automatically use https if the site supports it\n return `http://${tag.value}`;\n }, [tag.value, tag.valueType]);\n\n return (\n {\n e.stopPropagation();\n }}\n title={tag.value}\n >\n \n {tag.value}\n \n \n );\n};\n","import { PosSelect, PosSelectProps } from 'src/core/POS/PosSelect';\n\nimport {\n usePurchaseVendorSelector,\n UsePurchaseVendorSelectorOptions,\n} from './usePurchaseVendorSelector';\n\nexport type PurchaseVendorSelectorProps = Omit<\n PosSelectProps,\n 'valueOptionsContent'\n> &\n UsePurchaseVendorSelectorOptions;\n\nexport function PurchaseVendorSelector({\n disabled,\n additionalOptions,\n additionalOptionsPosition,\n placeholderText,\n ...props\n}: PurchaseVendorSelectorProps) {\n const { posSelectProps } = usePurchaseVendorSelector({\n additionalOptions,\n additionalOptionsPosition,\n placeholderText,\n });\n\n return ;\n}\n","import {\n PosMultiSelect,\n PosMultiSelectProps,\n} from 'src/core/POS/PosMultiSelect';\nimport { useUserGroups } from 'src/hooks/useUserGroups';\n\nexport const UserGroupMultiSelector = ({\n ...props\n}: Omit) => {\n const { userGroups, isLoading } = useUserGroups();\n\n const userGroupsContentSelect = (userGroups ?? []).reduce<\n Record\n >((acc, userGroup) => {\n acc[userGroup.userGroupId.toString()] = userGroup.userGroupName;\n return acc;\n }, {});\n\n return (\n \n );\n};\n","import { PosSelect, PosSelectProps } from 'src/core/POS/PosSelect';\nimport { useUserGroups } from 'src/hooks/useUserGroups';\n\nexport const UserGroupSelector = ({\n ...props\n}: Omit) => {\n const { userGroups, isLoading } = useUserGroups();\n\n const userGroupsContentSelect = (userGroups ?? []).reduce<\n Record\n >((acc, userGroup) => {\n acc[userGroup.userGroupId.toString()] = userGroup.userGroupName;\n return acc;\n }, {});\n\n return (\n \n );\n};\n","import clsx from 'clsx';\nimport { isValid, parse } from 'date-fns';\nimport { format } from 'date-fns';\nimport { Calendar, CalendarProps } from 'react-date-range';\nimport { FieldError } from 'react-hook-form';\nimport { useSiteTimezoneContext } from 'src/contexts/SiteTimezoneContext/SiteTimezoneContext';\nimport { vars } from 'src/core/themes';\nimport { Popover } from 'src/core/ui';\nimport { CalendarOutlineIcon, CrossIcon } from 'src/svgs/Viagogo';\nimport { getLocaleFromLanguageOrCurrent } from 'src/utils/localeUtils';\n\nimport { getTextFieldState, PosTextField } from '../PosTextField';\nimport * as styles from './DatePicker.css';\n\nexport const DatePickerInput = ({\n value,\n date,\n fieldError,\n disabled,\n className,\n dateDisplayFormat = 'MM/dd/yyyy',\n color = vars.color.backgroundHighlight,\n locale = getLocaleFromLanguageOrCurrent(),\n onDateChange,\n textFieldStyles,\n useSiteTimeZone = true,\n ...props\n}: Omit & {\n value?: string | null | Date;\n onDateChange?: (d: Date) => void;\n fieldError?: string | FieldError | undefined;\n disabled?: boolean;\n textFieldStyles?: React.CSSProperties;\n /**\n * If true, the site's timezone will be applied to the date being displayed.\n * the underlying date value (value, data, onDateChange) will not be changed.\n */\n useSiteTimeZone?: boolean;\n}) => {\n const { toZonedTime, fromZonedTime } = useSiteTimezoneContext();\n\n date = date ?? (value ? new Date(value) : undefined);\n if (useSiteTimeZone) {\n if (date) {\n date = toZonedTime(date);\n }\n if (props.minDate) {\n props.minDate = toZonedTime(props.minDate);\n }\n if (props.maxDate) {\n props.maxDate = toZonedTime(props.maxDate);\n }\n }\n\n return (\n \n \n
    \n }\n value={date ? format(date, dateDisplayFormat) : undefined}\n onChange={(e) => {\n const str = e.target.value;\n const newDate = parse(str, dateDisplayFormat, new Date(), {\n locale: getLocaleFromLanguageOrCurrent(),\n });\n if (isValid(newDate)) {\n onDateChange?.(\n useSiteTimeZone ? fromZonedTime(newDate) : newDate\n );\n }\n }}\n disabled={disabled}\n style={textFieldStyles}\n />\n
    \n
    \n \n \n \n \n true : undefined}\n className={clsx(className, styles.datePicker)}\n dateDisplayFormat={dateDisplayFormat}\n color={color}\n locale={locale}\n onChange={(d) =>\n onDateChange?.(useSiteTimeZone ? fromZonedTime(d) : d)\n }\n />\n \n
    \n );\n};\n","import clsx from 'clsx';\nimport { isValid, parse } from 'date-fns';\nimport { format } from 'date-fns';\nimport { CalendarProps } from 'react-date-range';\nimport { FieldError } from 'react-hook-form';\nimport TimePicker from 'react-time-picker';\nimport { useSiteTimezoneContext } from 'src/contexts/SiteTimezoneContext/SiteTimezoneContext';\nimport { Popover } from 'src/core/ui';\nimport { CalendarOutlineIcon } from 'src/svgs/Viagogo';\nimport { getLocaleFromLanguageOrCurrent } from 'src/utils/localeUtils';\n\nimport { getTextFieldState, PosTextField } from '../PosTextField';\nimport * as styles from './DatePicker.css';\n\nconst TIME_PICKER_CALLBACK_FORMAT = 'HH:mm';\n\nexport const TimePickerInput = ({\n value,\n fieldError,\n disabled,\n className,\n timeDisplayFormat = 'hh:mm a',\n locale = getLocaleFromLanguageOrCurrent(),\n onTimeChange,\n textFieldStyles,\n useSiteTimeZone = true,\n ...props\n}: Omit & {\n value?: string | null | Date;\n /**\n * the whole data object will be returned. Because if the timezone is applied,\n * the returned date can change\n */\n onTimeChange?: (t: Date | null) => void;\n fieldError?: string | FieldError | undefined;\n disabled?: boolean;\n timeDisplayFormat?: string;\n textFieldStyles?: React.CSSProperties;\n /**\n * If true, the site's timezone will be applied to the date being displayed.\n * the underlying date value (value, data, onDateChange) will not be changed.\n */\n useSiteTimeZone?: boolean;\n}) => {\n const { toZonedTime, fromZonedTime } = useSiteTimezoneContext();\n\n let date = value ? new Date(value) : undefined;\n if (useSiteTimeZone) {\n if (date) {\n date = toZonedTime(date);\n }\n if (props.minDate) {\n props.minDate = toZonedTime(props.minDate);\n }\n if (props.maxDate) {\n props.maxDate = toZonedTime(props.maxDate);\n }\n }\n\n return (\n \n \n
    \n }\n value={date ? format(date, timeDisplayFormat) : undefined}\n onChange={(e) => {\n let str = e.target.value;\n let newTime = parse(str, timeDisplayFormat, new Date(), {\n locale: getLocaleFromLanguageOrCurrent(),\n });\n if (isValid(newTime)) {\n if (useSiteTimeZone) {\n newTime = fromZonedTime(newTime);\n str = format(newTime, TIME_PICKER_CALLBACK_FORMAT);\n }\n onTimeChange?.(newTime);\n }\n }}\n disabled={disabled}\n style={textFieldStyles}\n />\n
    \n
    \n \n {\n if (t) {\n let newTime = parse(t, TIME_PICKER_CALLBACK_FORMAT, new Date());\n\n if (isValid(newTime)) {\n if (useSiteTimeZone) {\n newTime = fromZonedTime(newTime);\n }\n onTimeChange?.(newTime);\n }\n }\n }}\n disabled={disabled}\n clockIcon={null}\n clearIcon={null}\n />\n \n
    \n );\n};\n","import { Marketplace, PosFieldArrayOfTag, Tag } from 'src/WebApiController';\n\nexport const tagFieldHasChanges = (\n tags1: PosFieldArrayOfTag | null | undefined,\n tags2: PosFieldArrayOfTag | null | undefined,\n // tagsMetadata is an optional parameter\n // If it is provided, only tags that are in tagsMetadata will be compared\n tagsMetadata?: Tag[]\n): boolean => {\n if (!tags1?.hasChanged) {\n return false;\n }\n\n const _tags1 = !tags1?.value\n ? null\n : !tagsMetadata\n ? tags1.value\n : tags1.value.filter((t) => tagsMetadata.find((tm) => tm.key === t.key));\n const _tags2 = !tags2?.value\n ? null\n : !tagsMetadata\n ? tags2.value\n : tags2.value.filter((t) => tagsMetadata.find((tm) => tm.key === t.key));\n\n if ((!_tags1 || !_tags1.length) && (!_tags2 || !_tags2.length)) {\n return false;\n }\n if (!_tags1 || !_tags1.length || !_tags2 || !_tags2.length) {\n return true;\n }\n if (_tags1.length !== _tags2.length) {\n return true;\n }\n return _tags1.some((t1) => {\n return !_tags2.find(\n (t2) =>\n t1.key === t2.key &&\n t1.value === t2.value &&\n t1.includeInReport === t2.includeInReport &&\n t1.ordinal === t2.ordinal\n );\n });\n};\n\nexport const tagHasChanges = (\n tags1: Tag[] | null | undefined,\n tags2: Tag[] | null | undefined,\n // tagsMetadata is an optional parameter\n // If it is provided, only tags that are in tagsMetadata will be compared\n tagsMetadata?: Tag[]\n): boolean => {\n const _tags1 = !tags1\n ? null\n : !tagsMetadata\n ? tags1\n : tags1.filter((t) => tagsMetadata.find((tm) => tm.key === t.key));\n const _tags2 = !tags2\n ? null\n : !tagsMetadata\n ? tags2\n : tags2.filter((t) => tagsMetadata.find((tm) => tm.key === t.key));\n\n if ((!_tags1 || !_tags1.length) && (!_tags2 || !_tags2.length)) {\n return false;\n }\n if (!_tags1 || !_tags1.length || !_tags2 || !_tags2.length) {\n return true;\n }\n if (_tags1.length !== _tags2.length) {\n return true;\n }\n return _tags1.some((t1) => {\n return !_tags2.find(\n (t2) =>\n t1.key === t2.key &&\n t1.value === t2.value &&\n t1.includeInReport === t2.includeInReport &&\n t1.ordinal === t2.ordinal\n );\n });\n};\n\nexport function ToMarketplaceEnum(value: string | null | undefined) {\n if (!value) {\n return null;\n }\n\n const entry = Object.entries(Marketplace).find(([, val]) => val === value);\n return entry ? entry[1] : undefined;\n}\n","import { forwardRef, ReactElement, useCallback, useState } from 'react';\nimport { Button } from 'reactstrap';\nimport { PurchaseVendorSelector } from 'src/components/Selectors/PurchaseVendorSelector';\nimport { SellerAccountEmployeeSelector } from 'src/components/Selectors/SellerAccountEmployeeSelector';\nimport { UserGroupSelector } from 'src/components/Selectors/UserGroupSelector';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { DatePickerInput, TimePickerInput } from 'src/core/POS/DateSelector';\nimport { PosEnumSelect, PosSelect } from 'src/core/POS/PosSelect';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n BOOLEAN_OPTIONS_CONTENT,\n MARKET_PLACE_TO_CID,\n TAG_VALUE_TYPE_TO_CID,\n} from 'src/utils/constants/contentIdMaps';\nimport { ToMarketplaceEnum } from 'src/utils/tagUtils';\nimport { Marketplace, Tag, TagsValueType } from 'src/WebApiController';\n\nexport const TOTAL_VALUE_LENGTH_LIMIT = 2000;\n\ntype TagValueInputProps = {\n tag: Tag | undefined;\n newValue: string;\n isValidNewValue: boolean;\n setNewValue: (newValue: string) => void;\n onChange: (newValue: string) => void;\n onBlur?: () => void;\n disabled?: boolean;\n disableBlur?: boolean;\n inputFieldPosfix?: JSX.Element;\n style?: React.CSSProperties;\n};\n\nexport const TagValueInput = forwardRef(\n function TagValueInput(\n {\n tag,\n newValue,\n isValidNewValue,\n setNewValue,\n onChange,\n onBlur,\n disabled,\n disableBlur,\n inputFieldPosfix,\n style,\n },\n ref\n ): ReactElement {\n const tagTypeText = useContent(\n TAG_VALUE_TYPE_TO_CID[tag?.valueType ?? ContentId.EmptyContent]\n );\n\n const customOnBlurSelect = useCallback(() => {\n if (disabled) return;\n\n if (isValidNewValue) {\n onChange(newValue);\n } else {\n setNewValue(tag!.value);\n onBlur?.();\n }\n }, [\n disabled,\n isValidNewValue,\n newValue,\n onBlur,\n onChange,\n setNewValue,\n tag,\n ]);\n\n const customOnBlurInput = useCallback(() => {\n // disableBlur is used to prevent onBlur from being called when clicking on the cross icon\n if (disabled || disableBlur) return;\n\n if (isValidNewValue) {\n onChange(newValue);\n } else {\n setNewValue(tag?.value ?? '');\n onBlur?.();\n }\n }, [\n disableBlur,\n disabled,\n isValidNewValue,\n newValue,\n onBlur,\n onChange,\n setNewValue,\n tag?.value,\n ]);\n\n const onKeyDownHandler = useCallback(\n (e: React.KeyboardEvent) => {\n if (!disabled) {\n const key = e.key;\n if (key === 'Enter') {\n e.stopPropagation();\n if (isValidNewValue) {\n onChange(newValue);\n } else {\n setNewValue(tag?.value ?? '');\n onBlur?.();\n }\n }\n if (key === 'Escape') {\n e.stopPropagation();\n setNewValue(tag?.value ?? '');\n onBlur?.();\n }\n }\n },\n [\n disabled,\n isValidNewValue,\n newValue,\n onBlur,\n onChange,\n setNewValue,\n tag?.value,\n ]\n );\n\n const [tagValueDate, setTagValueDate] = useState(\n tag?.value ? new Date(tag.value) : null\n );\n\n return (\n <>\n {tag?.valueType === TagsValueType.Date ? (\n \n \n {\n const newDate = tagValueDate\n ? new Date(tagValueDate.getTime())\n : new Date();\n newDate.setFullYear(date.getFullYear());\n newDate.setMonth(date.getMonth());\n newDate.setDate(date.getDate());\n\n setTagValueDate(newDate);\n setNewValue(newDate.toISOString());\n }}\n disabled={disabled}\n textFieldStyles={{ width: '100px' }}\n />\n\n {\n const newDate = tagValueDate\n ? new Date(tagValueDate.getTime())\n : new Date();\n\n if (t) {\n newDate.setFullYear(t.getFullYear());\n newDate.setMonth(t.getMonth());\n newDate.setDate(t.getDate());\n newDate.setHours(t.getHours());\n newDate.setMinutes(t.getMinutes());\n } else {\n newDate.setHours(0);\n newDate.setMinutes(0);\n }\n\n setTagValueDate(newDate);\n setNewValue(newDate.toISOString());\n }}\n disabled={disabled}\n textFieldStyles={{ width: '100px' }}\n />\n\n {\n onChange(tagValueDate?.toISOString() ?? '');\n }}\n >\n \n \n {\n setTagValueDate(null);\n setNewValue('');\n onChange('');\n }}\n >\n \n \n \n \n ) : tag?.valueType === TagsValueType.Marketplace ? (\n {\n setNewValue(Marketplace[value as keyof typeof Marketplace]);\n onChange(Marketplace[value as keyof typeof Marketplace]);\n }}\n disabled={disabled}\n style={style}\n valueOptionsContent={MARKET_PLACE_TO_CID}\n onBlur={customOnBlurSelect}\n />\n ) : tag?.valueType === TagsValueType.POSUser ? (\n {\n setNewValue(value);\n onChange(value);\n }}\n placeholderText={ContentId.None}\n disabled={disabled}\n style={style}\n onBlur={customOnBlurSelect}\n />\n ) : tag?.valueType === TagsValueType.UserGroup ? (\n {\n setNewValue(value);\n onChange(value);\n }}\n placeholderText={ContentId.None}\n disabled={disabled}\n style={style}\n onBlur={customOnBlurSelect}\n />\n ) : tag?.valueType === TagsValueType.Vendor ? (\n {\n setNewValue(newId);\n onChange(newId);\n }}\n onBlur={customOnBlurSelect}\n />\n ) : tag?.valueType === TagsValueType.Boolean ? (\n {\n setNewValue(value);\n onChange(value);\n }}\n style={style}\n valueOptionsContent={BOOLEAN_OPTIONS_CONTENT}\n placeholderText={ContentId.None}\n onBlur={customOnBlurSelect}\n enableEmptySelection\n />\n ) : (\n // String, Decimal, Int\n {\n setNewValue(e.target.value);\n }}\n postfixDisplay={inputFieldPosfix}\n maxLength={TOTAL_VALUE_LENGTH_LIMIT}\n onBlur={customOnBlurInput}\n onKeyDown={onKeyDownHandler}\n // Need this for onBlur to work\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus\n style={style}\n />\n )}\n \n );\n }\n);\n","import { BOOLEAN_OPTIONS_CONTENT } from 'src/utils/constants/contentIdMaps';\nimport { TagsValueType } from 'src/WebApiController';\n\nexport const URL_REGEX_TAGS =\n /^((http|https):\\/\\/)?(www\\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)$/;\n\nexport const checkMatchValueType = (\n valueType: TagsValueType | null,\n value: string\n) => {\n if (valueType == null) return true;\n switch (valueType) {\n case TagsValueType.String:\n return true;\n case TagsValueType.Url:\n return Boolean(value.match(URL_REGEX_TAGS));\n case TagsValueType.Decimal:\n return !isNaN(Number(value));\n case TagsValueType.Int:\n return !isNaN(Number(value)) && Number.isInteger(Number(value));\n case TagsValueType.Boolean:\n return Object.values(BOOLEAN_OPTIONS_CONTENT).includes(\n value.toLowerCase()\n );\n default:\n return true;\n }\n};\n","import { useEffect, useMemo, useRef, useState } from 'react';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { CrossIcon, WarningOutlineIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Tag } from 'src/WebApiController';\n\nimport { checkMatchValueType } from '../TagsFormBody.util';\nimport { TagValueInput } from './TagValueInput';\n\nexport const TagValueInputCell = ({\n tag,\n tagsCurrentEntity,\n onChange,\n onBlur,\n disabled,\n}: {\n tag: Tag;\n tagsCurrentEntity: Tag[];\n onChange: (newValue: string) => void;\n onBlur?: () => void;\n disabled?: boolean;\n}) => {\n const [newValue, setNewValue] = useState(tag.value);\n const [disableBlur, setDisableBlur] = useState(false);\n const duplicateMsg = useContent(ContentId.ExistingTagValue);\n const valueTypeErrorMsg = useContent(ContentId.ValueDoesNotSatisfyType);\n const inputRef = useRef(null);\n\n useEffect(() => {\n if (tag.value !== newValue) {\n setNewValue(tag.value);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [tag.value]);\n\n const hasDuplicate = useMemo(() => {\n const existingTags = tagsCurrentEntity.filter((t) => t.key === tag.key);\n if (existingTags.length) {\n const values = existingTags.map((t) => t.value);\n return values.includes(newValue) && newValue !== tag.value;\n }\n return false;\n }, [newValue, tag.key, tag.value, tagsCurrentEntity]);\n\n const isValidNewValue = useMemo(() => {\n if (!newValue) return true;\n return checkMatchValueType(tag.valueType, newValue) && !hasDuplicate;\n }, [hasDuplicate, newValue, tag.valueType]);\n\n const errorMsg = useMemo(() => {\n if (!newValue) return null;\n if (hasDuplicate) {\n return duplicateMsg;\n }\n if (!checkMatchValueType(tag.valueType, newValue)) {\n return valueTypeErrorMsg;\n }\n return null;\n }, [duplicateMsg, hasDuplicate, newValue, tag.valueType, valueTypeErrorMsg]);\n\n const inputFieldPosfix = (\n <>\n {errorMsg && (\n \n )}\n {newValue ? (\n setDisableBlur(true)}\n onMouseLeave={() => setDisableBlur(false)}\n onClick={() => {\n setNewValue('');\n setDisableBlur(false);\n inputRef.current?.focus();\n }}\n disabled={disabled}\n />\n ) : null}\n \n );\n\n return (\n \n );\n};\n","import { useCallback, useState } from 'react';\nimport {\n Content,\n FormatContent,\n useContent,\n} from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { IconsFill, PlusIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { TAG_VALUE_TYPE_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { Tag, TagsValueType } from 'src/WebApiController';\n\nimport * as styles from './TagsFormBody.css';\nimport { TagValueDisplay, TagValueInputCell } from './TagValueCell';\n\nconst TagListItem = ({\n tag,\n tagsCurrentEntity,\n disabled,\n onClick,\n onBlur,\n isEditing,\n onRowChange,\n}: {\n tag: Tag;\n tagsCurrentEntity: Tag[];\n disabled?: boolean;\n isEditing?: boolean;\n onClick: () => void;\n onBlur: () => void;\n onRowChange: (tag: Tag, newValue: string) => void;\n}) => {\n const singleValueMsg = useContent(ContentId.SingleValueOnly);\n const dataTypeMsg = useContent(\n TAG_VALUE_TYPE_TO_CID[tag.valueType ?? TagsValueType.String]\n );\n const [hovered, setHovered] = useState(false);\n\n let metadataTitle = '';\n if (tag.singleValueOnly) {\n metadataTitle += `${singleValueMsg}, `;\n }\n if (dataTypeMsg) {\n metadataTitle += dataTypeMsg;\n }\n\n return (\n {\n if (!disabled) {\n onClick();\n }\n }}\n title={isEditing ? '' : metadataTitle}\n onMouseEnter={() => setHovered(true)}\n onMouseLeave={() => setHovered(false)}\n >\n
    {tag.key}
    \n
    \n {isEditing ? (\n {\n onRowChange(tag, newValue);\n }}\n />\n ) : (\n <>\n {tag.value || !hovered ? (\n \n ) : (\n \n \n \n )}\n \n )}\n \n );\n};\n\nexport const TagsPanelDisplayMode = ({\n tagsWithEmptyValue,\n tagsWithValue,\n onTagsUpdate,\n onTagValueChange,\n disabled,\n}: {\n tagsWithEmptyValue: Tag[];\n tagsWithValue: Tag[];\n disabled?: boolean;\n onTagsUpdate: (tagsCurrentEntity: Tag[]) => void;\n onTagValueChange: (tag: Tag, newValue: string) => void;\n}) => {\n const [tagsEditing, setTagsEditing] = useState();\n\n const onTagAdd = useCallback(\n (tag: Tag, newValue: string) => {\n if (newValue) {\n const newTags = [...tagsWithValue, { ...tag, value: newValue }]\n .toSorted((t1, t2) => (t1.ordinal ?? 0) - (t2.ordinal ?? 0))\n .map((t, i) => ({ ...t, ordinal: i }));\n onTagsUpdate(newTags);\n }\n setTagsEditing(undefined);\n },\n [onTagsUpdate, tagsWithValue]\n );\n\n return (\n
    \n {tagsWithEmptyValue.map((tag) => {\n const tagListItem = (\n {\n setTagsEditing(tag);\n }}\n tagsCurrentEntity={tagsWithValue}\n disabled={disabled}\n onBlur={() => setTagsEditing(undefined)}\n onRowChange={(tag, newValue) => {\n onTagValueChange(tag, newValue);\n setTagsEditing(undefined);\n }}\n />\n );\n\n const isLastNonEmptyMultiValueTag =\n tag.value &&\n !tag.singleValueOnly &&\n tagsWithValue.findLast((t) => t.key === tag.key && t.value) === tag;\n\n if (!isLastNonEmptyMultiValueTag) {\n return tagListItem;\n } else {\n if (tagsEditing?.key === tag.key && tagsEditing?.value === '') {\n const newTag = {\n ...tag,\n value: '',\n };\n return (\n <>\n {tagListItem}\n {\n setTagsEditing(newTag);\n }}\n tagsCurrentEntity={tagsWithValue}\n disabled={disabled}\n onBlur={() => setTagsEditing(undefined)}\n onRowChange={onTagAdd}\n />\n \n );\n }\n return (\n <>\n {tagListItem}\n {\n setTagsEditing({\n ...tag,\n value: '',\n });\n }}\n style={{ width: 'min-content', whiteSpace: 'nowrap' }}\n variant={'text'}\n disabled={disabled}\n >\n \n \n \n \n );\n }\n })}\n
    \n );\n};\n","import { UniqueIdentifier } from '@dnd-kit/core';\nimport { useSortable } from '@dnd-kit/sortable';\nimport { CSS } from '@dnd-kit/utilities';\nimport { ReactNode, useEffect } from 'react';\n\n/**\n * Extends functionality of any component to inherit sort functionality\n */\nexport const DropWrapper = ({\n children,\n id,\n disabled,\n onDragStart,\n onDragEnd,\n}: {\n children: ReactNode;\n id: UniqueIdentifier;\n disabled?: boolean;\n onDragStart?: () => void;\n onDragEnd?: () => void;\n}) => {\n const {\n attributes,\n listeners,\n setNodeRef,\n transform,\n transition,\n isDragging,\n } = useSortable({ id, disabled });\n\n useEffect(() => {\n if (isDragging) {\n onDragStart?.();\n } else {\n onDragEnd?.();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isDragging]);\n\n return (\n \n {children}\n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const EventIcon = (props: PosIconProps) => {\n const stroke = props.stroke || '#3F1D75';\n return (\n \n \n \n \n \n \n \n \n );\n};\n","/**\n * These values are associated with the available columns and tied in with the Edit Inventory Columns feature.\n */\n\nexport enum ListingTableColumnId {\n // Not Configurable\n Checkbox = 'checkbox',\n // Configurable\n TicketClassColor = 'ticketClassColor',\n Seating = 'seating',\n DeliveryType = 'deliveryType',\n ShownQuantity = 'shownQuantity',\n UnsoldQuantity = 'unsoldQuantity',\n TicketCount = 'ticketCount',\n InHandDate = 'inHandDate',\n UnitCost = 'unitCost',\n ListPrice = 'listPrice',\n AllInPrice = 'allInPrice',\n Actions = 'actions',\n // Default Visibility Off (optional columns)\n ListingId = 'listingId',\n AutoPricing = 'autoPricing',\n ProceedsFloor = 'priceFloor',\n ProceedsCeiling = 'priceCeiling',\n WebsiteFloor = 'priceWebsiteFloor',\n WebsiteCeiling = 'priceWebsiteCeiling',\n UndercutMode = 'undercutMode',\n UndercutAbsoluteAmount = 'undercutAbsoluteAmount',\n UndercutRelativeAmount = 'undercutRelativeAmount',\n UndercutNewPrice = 'undercutNewPrice',\n CompListingMode = 'compListingMode',\n CompListingCeiling = 'compListingCeiling',\n CompListingFloor = 'compListingFloor',\n CompListingMinimumQuantity = 'compListingMinimumQuantity',\n CompListingExcludeFanInventory = 'compListingExcludeFanInventory',\n OutlierMode = 'outlierMode',\n OutlierFiltering = 'outlierFiltering',\n OutlierLimit = 'outlierLimit',\n OutlierSpacing = 'outlierSpacing',\n CircuitBreakerMinCompListingCount = 'circuitBreakerMinCompListingCount',\n CircuitBreakerVelocity = 'circuitBreakerVelocity',\n CircuitBreakerVelocityHours = 'circuitBreakerVelocityHours',\n SeatingRow = 'seatingrow',\n SeatingSeats = 'seatingSeats',\n AutoPricingResultType = 'autoPricingResultType',\n LastPriceUpdatedDate = 'lastPriceUpdatedDate',\n WastedTickets = 'wastedTickets',\n WastedCost = 'wastedCost',\n PurchaseId = 'purchaseId',\n VendorAccount = 'vendor',\n AutoFulfill = 'autoFulfill',\n MarketplaceVisibility = 'marketplaceVisibility',\n PurchaseCreatedBy = 'purchaseCreatedBy',\n PurchasedBy = 'purchasedBy',\n PurchaseDate = 'purchaseDate',\n RelativeRankPremium = 'relativeRankPremium',\n AbsoluteRankPremium = 'absoluteRankPremium',\n UnsoldProceeds = 'unsoldProceeds',\n UnsoldCost = 'unsoldCost',\n SoldQty = 'soldQty',\n SoldCost = 'soldCost',\n TotalCost = 'totalCost',\n SeatTraits = 'seatTraits',\n SplitType = 'splitType',\n}\n\nexport enum ListingTableFlattenedColumnId {\n Event = 'Event',\n Venue = 'Venue',\n Location = 'Location',\n EventDate = 'Date',\n}\n\nexport enum ListingReportTableColumnId {\n // Group by types\n Performer = 'performer',\n Venue = 'venue',\n Event = 'event',\n EventGenre = 'eventGenre',\n EventCountry = 'eventCountry',\n EventCity = 'eventCity',\n SeatingSection = 'seatingSection',\n SeatingRow = 'seatingRow',\n // Configurable - shared precision with ListingTableColumnId\n UnsoldQuantity = ListingTableColumnId.UnsoldQuantity,\n TicketCount = ListingTableColumnId.TicketCount,\n SoldQuantity = 'soldQuantity',\n UnitCost = ListingTableColumnId.UnitCost,\n SoldCost = 'soldCost',\n SoldProceeds = 'soldProceeds',\n UnsoldCost = 'unsoldCost',\n ListPrice = ListingTableColumnId.ListPrice,\n AllInPrice = ListingTableColumnId.AllInPrice,\n // Auxiliary columns\n EventId = 'eventId',\n Category = 'category',\n EventDate = 'eventDate',\n EventStateProvince = 'eventStateProvince',\n ListingId = 'listingId',\n SaleId = 'saleId',\n HoldId = 'holdId',\n SeatingSeats = 'seatingSeats',\n DeliveryType = ListingTableColumnId.DeliveryType,\n InHandDate = ListingTableColumnId.InHandDate,\n PurchaseId = 'purchaseId',\n PurchasedBy = ListingTableColumnId.PurchasedBy,\n PurchaseDate = 'purchaseDate',\n PurchaseCreatedBy = ListingTableColumnId.PurchaseCreatedBy,\n Vendor = 'vendor',\n SalePaymentState = 'paymentState',\n Charges = 'charges',\n Credits = 'credits',\n Fulfiller = 'fulfiller',\n PaymentMethodType = 'paymentMethodType',\n PurchasePaymentStatus = 'purchasePaymentStatus',\n Zone = 'zone',\n PricedBy = 'pricedBy',\n InternalNotes = 'internalNotes',\n InternalNotesPurchase = 'internalNotesPurchase',\n VendorOrderId = 'vendorOrderId',\n VendorAccountEmail = 'vendorAccountEmail',\n CancellationDatePurchase = 'cancellationDatePurchase',\n PandL = 'PandL',\n Margin = 'margin',\n}\n\n// Subset of ReportInventoryColumnName from ReportingService\nexport enum ListingReportTableGroupingColumnId {\n PerformerName = 'performerName',\n VenueName = 'venueName',\n EventName = 'eventName',\n TopLevelCategoryName = 'topLevelCategoryName',\n CountryName = 'countryName',\n CityName = 'cityName',\n EventId = 'viagogoEventId',\n LocalEventDateTime = 'localEventDateTime',\n StateProvince = 'stateProvince',\n InternalNotes = 'internalNotes',\n ListingId = 'listingId',\n IsSeatSaver = 'isSeatSaver',\n IsNoFulfill = 'isNoFulfill',\n PricerSellerUserId = 'pricerSellerUserId',\n Section = 'section',\n SeatingRow = 'seatingRow',\n SeatFrom = 'seatFrom',\n SeatTo = 'seatTo',\n}\n\nexport enum ListingReportTableValueColumnId {\n UnsoldQuantity = 'unsoldQuantity',\n SoldQuantity = 'soldQuantity',\n TotalQuantity = 'totalQuantity',\n SoldCost = 'soldCost',\n UnsoldCost = 'unsoldCost',\n UnitCost = 'unitCost',\n UnitNetProceeds = 'unitNetProceeds',\n UnitAllInPrice = 'unitAllInPrice',\n PurchaseOrderId = 'purchaseOrderId',\n PurchaseOrderDate = 'purchaseOrderDate',\n BuyerUserId = 'buyerUserId',\n PurchaseOrderVendorName = 'purchaseOrderVendorName',\n VendorOrderId = 'vendorOrderId',\n VendorAccountEmail = 'encryptedEmailAddress',\n}\n\nexport const ListingReportArrayAggregateColumnIds: string[] = [\n ListingReportTableValueColumnId.PurchaseOrderId,\n ListingReportTableValueColumnId.PurchaseOrderDate,\n ListingReportTableValueColumnId.BuyerUserId,\n ListingReportTableValueColumnId.PurchaseOrderVendorName,\n ListingReportTableValueColumnId.VendorOrderId,\n ListingReportTableValueColumnId.VendorAccountEmail,\n];\n","import { isEqual } from 'lodash';\nimport { useSiteTheme } from 'src/contexts/SiteTheme/SiteThemeContext';\nimport { vars } from 'src/core/themes';\nimport { CityIcon } from 'src/svgs/CityIcon';\nimport { CountryIcon } from 'src/svgs/CountryIcon';\nimport { DayIcon } from 'src/svgs/DayIcon';\nimport { EventIcon } from 'src/svgs/EventIcon';\nimport { MonthIcon } from 'src/svgs/MonthIcon';\nimport { PerformerIcon } from 'src/svgs/PerformerIcon';\nimport { SaleIcon } from 'src/svgs/SaleIcon';\nimport { VenueIcon } from 'src/svgs/VenueIcon';\nimport {\n PaperTicketsOutlineIcon,\n ResellAnytimeIcon,\n SeatIcon,\n SellerTraderOutlineIcon,\n SellOutlineIcon,\n} from 'src/svgs/Viagogo';\nimport { WeekIcon } from 'src/svgs/WeekIcon';\nimport {\n EntityWithTicketsQuery,\n Event,\n ListingQuery,\n ListingReportMetricColumn,\n ListingReportMetrics,\n Performer,\n ReportGroupBy,\n SaleQuery,\n SaleReportMetrics,\n Venue,\n} from 'src/WebApiController';\n\nimport { ListingReportTableColumnId } from './columns/inventory/inventoryColumnUtils.types';\n\nexport enum ReportTypes {\n Inventory = 'listing',\n Sale = 'sale',\n}\n\nexport type ArTimeBucketWithData = Pick<\n SaleReportMetrics,\n 'timeBkt' | 'ttlOutsBal'\n>;\n\nexport enum ReportTypesV2 {\n InventoryV2 = 'listingV2',\n SaleV2 = 'saleV2',\n Commission = 'commission',\n}\n\nexport type SaleReportMetricsWithGroupBy = SaleReportMetrics & {\n performer?: Performer;\n venue?: Venue;\n event?: Event;\n timeBucketsWithData?: ArTimeBucketWithData[];\n};\n\nexport type ListingReportMetricsWithGroupBy = ListingReportMetrics & {\n performer?: Performer;\n venue?: Venue;\n event?: Event;\n};\n\nexport const GetIconByGroupByType = (groupByType: ReportGroupBy) => {\n const { isDarkMode } = useSiteTheme();\n\n switch (groupByType) {\n case ReportGroupBy.Performer:\n return (\n \n );\n case ReportGroupBy.Event:\n case ReportGroupBy.EventGenre:\n return (\n \n );\n case ReportGroupBy.EventCity:\n return (\n \n );\n case ReportGroupBy.EventCountry:\n return (\n \n );\n case ReportGroupBy.SeatingRow:\n case ReportGroupBy.SeatingSection:\n return ;\n case ReportGroupBy.SaleDay:\n return ;\n case ReportGroupBy.SaleWeek:\n return ;\n case ReportGroupBy.SaleMonth:\n return ;\n case ReportGroupBy.SaleId:\n return ;\n case ReportGroupBy.ListingId:\n return ;\n case ReportGroupBy.PurchaseId:\n return ;\n case ReportGroupBy.SaleMarketplace:\n case ReportGroupBy.Vendor:\n return ;\n case ReportGroupBy.PurchasedBy:\n case ReportGroupBy.PricedBy:\n case ReportGroupBy.FulfilledBy:\n return ;\n default:\n return (\n \n );\n }\n};\n\nexport const listingMetricsToReportMetricRequest = (metric: string) => {\n if (metric === ListingReportTableColumnId.Zone.toString()) {\n return ListingReportMetricColumn.Zone;\n }\n\n // TODO complete this on https://thestubhub.atlassian.net/browse/POS-3290\n return undefined;\n};\n\nexport const isReportFilterOverriden = (\n filterQuery: EntityWithTicketsQuery,\n filter: ListingQuery | SaleQuery | null | undefined\n) => {\n const filterQueryToCompare = {\n ...filterQuery,\n eventIds: null,\n eventOrMappingIds: null,\n performerIds: null,\n venueIds: null,\n isSortDescending: null,\n sortBy: null,\n searchText: null,\n viewMode: null,\n };\n const reportConfigFilterToCompare = {\n ...filter,\n eventIds: null,\n eventOrMappingIds: null,\n performerIds: null,\n venueIds: null,\n isSortDescending: null,\n searchText: null,\n sortBy: null,\n viewMode: null,\n };\n\n return !isEqual(filterQueryToCompare, reportConfigFilterToCompare);\n};\n","import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\nimport { id } from 'date-fns/locale';\nimport { castDraft, produce } from 'immer';\nimport { isEqual } from 'lodash-es';\nimport { useCallback, useMemo } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useContentContext } from 'src/contexts/ContentContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { FormatContentIds } from 'src/utils/constants/formatContentIdDataMap';\nimport { ReportTypes } from 'src/utils/reportsUtils';\nimport {\n ListingQuery,\n ReportClient,\n ReportConfigOfListingQueryAndReportWidgetTypesInventory,\n ReportConfigOfSaleQueryAndReportWidgetTypesSale,\n ReportConfigOverrideOfListingQuery,\n ReportConfigOverrideOfSaleQuery,\n SaleQuery,\n} from 'src/WebApiController';\n\n/**\n * Map report config settings to their data types.\n *\n * Add to this type if new settings are added.\n */\ntype ReportConfigMap = {\n [ReportTypes.Inventory]: ReportConfigOfListingQueryAndReportWidgetTypesInventory;\n [ReportTypes.Sale]: ReportConfigOfSaleQueryAndReportWidgetTypesSale;\n};\n\n/**\n * Internal type to unify the different report config types.\n */\ntype ReportConfigTypeBase =\n | ReportConfigOfListingQueryAndReportWidgetTypesInventory\n | ReportConfigOfSaleQueryAndReportWidgetTypesSale;\n\ntype ReportConfigType = ReportConfigMap[S];\n\n/**\n * Helper type for consumers of this hook to use for typing report configs more easily.\n */\nexport type ReportConfig = ReportConfigTypeBase & {\n reportType: ReportTypes;\n};\n\ntype UseReportConfigsOptions = {\n reportType: ReportTypes;\n};\n\ntype ReportConfigInput = Omit<\n ReportConfig,\n 'schemaVersion' | 'reportId' | 'reportType'\n>;\n\n/**\n * Data and functions returned by the hook to help with CRUD of report config with different types\n */\ntype UseReportConfigs = {\n reportConfigs: ReportConfig[];\n isLoading: boolean;\n deleteReportConfig: (reportId: number) => void;\n upsertReportConfig: (\n reportId: number | null,\n updatedConfig: Partial,\n isTemporary?: boolean\n ) => Promise;\n upsertReportOverride: (\n configOverride:\n | ReportConfigOverrideOfListingQuery\n | ReportConfigOverrideOfSaleQuery,\n originalReportConfig:\n | ReportConfigOfListingQueryAndReportWidgetTypesInventory\n | ReportConfigOfSaleQueryAndReportWidgetTypesSale\n ) => void;\n getReportConfigNameForDuplicate: (reportName: string) => string;\n};\n\nconst addTimezoneOffsetToSaleReportConfig = (\n reportNoOffset: ReportConfigOfSaleQueryAndReportWidgetTypesSale\n): ReportConfigOfSaleQueryAndReportWidgetTypesSale => {\n return {\n ...reportNoOffset,\n filter: !reportNoOffset.filter\n ? reportNoOffset.filter\n : ({\n ...reportNoOffset.filter,\n timezoneOffsetMins: new Date().getTimezoneOffset(),\n } as SaleQuery),\n };\n};\n\nconst addTimezoneOffsetToListingReportConfig = (\n reportNoOffset: ReportConfigOfListingQueryAndReportWidgetTypesInventory\n): ReportConfigOfListingQueryAndReportWidgetTypesInventory => {\n return {\n ...reportNoOffset,\n filter: !reportNoOffset.filter\n ? reportNoOffset.filter\n : ({\n ...reportNoOffset.filter,\n timezoneOffsetMins: new Date().getTimezoneOffset(),\n } as ListingQuery),\n };\n};\n\n/**\n * Hook to help with CRUD of report config with different types\n * @param options\n * @returns\n */\nexport function useReportConfigs({\n reportType,\n}: UseReportConfigsOptions): UseReportConfigs {\n const { showErrorDialog, trackError } = useErrorBoundaryContext();\n const { formattedContentResolver } = useContentContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const reportClient = useMemo(\n () => new ReportClient(activeAccountWebClientConfig),\n [activeAccountWebClientConfig]\n );\n\n const queryClient = useQueryClient();\n const queryKey = useMemo(\n () => [\n 'useReportConfigs',\n activeAccountWebClientConfig.activeAccountId,\n reportType,\n ],\n [activeAccountWebClientConfig.activeAccountId, reportType]\n );\n\n // Query to get all report configs\n const reportConfigQuery = useQuery[] | null>({\n queryKey,\n queryFn: async () => {\n if (activeAccountWebClientConfig?.activeAccountId == null) {\n return null;\n }\n\n if (reportType === ReportTypes.Inventory) {\n return (await reportClient.getAvailableInventoryReportConfig()).map(\n addTimezoneOffsetToListingReportConfig\n ) as ReportConfigType[];\n } else {\n return (await reportClient.getAvailableSaleReportConfig()).map(\n addTimezoneOffsetToSaleReportConfig\n ) as ReportConfigType[];\n }\n },\n\n enabled: activeAccountWebClientConfig?.activeAccountId != null,\n meta: {\n onError: (err: ErrorTypes) => {\n trackError('ReportClient.getAvailableReportConfig', err, {\n trackErrorData: { reportType },\n });\n },\n },\n refetchOnWindowFocus: false,\n });\n\n const _reportConfigs = useMemo(() => {\n if (reportConfigQuery.data == null) {\n return [];\n }\n return reportConfigQuery.data;\n }, [reportConfigQuery.data]);\n\n // Mutation to upsert report config\n const upsertMutation = useMutation({\n mutationFn: async ({\n value,\n isTemporary,\n }: {\n value: ReportConfigType;\n isTemporary?: boolean;\n }) => {\n if (isTemporary) {\n // Do nothing, just let onMutate handle the optimistic update\n return value.reportId!;\n }\n\n if (reportType === ReportTypes.Inventory) {\n return await reportClient.upsertInventoryReportConfig(\n value as ReportConfigOfListingQueryAndReportWidgetTypesInventory\n );\n }\n return await reportClient.upsertSaleReportConfig(\n value as ReportConfigOfSaleQueryAndReportWidgetTypesSale\n );\n },\n // optimistic ui\n // Reference: https://tanstack.com/query/v3/docs/react/guides/optimistic-updates\n\n onMutate: ({ value }) => {\n queryClient.cancelQueries({ queryKey });\n const prevValue =\n queryClient.getQueryData[]>(queryKey);\n\n const newValue =\n value.reportId == null\n ? [...(prevValue ?? []), value]\n : prevValue?.map((r) => (r.reportId === value.reportId ? value : r));\n queryClient.setQueryData[]>(queryKey, newValue);\n return { prevValue };\n },\n onError: (err: ErrorTypes, { value }, context) => {\n queryClient.setQueryData(queryKey, context?.prevValue);\n showErrorDialog('reportClient.upsertReportConfig', err, {\n trackErrorData: { id, value },\n });\n },\n onSettled: (_data, _error, { isTemporary }) => {\n if (!isTemporary) {\n queryClient.invalidateQueries({ queryKey });\n }\n },\n });\n\n const upsertOverrideMutation = useMutation({\n mutationFn: async ({\n configOverride,\n originalReportConfig,\n }: {\n configOverride:\n | ReportConfigOverrideOfListingQuery\n | ReportConfigOverrideOfSaleQuery;\n originalReportConfig:\n | ReportConfigOfListingQueryAndReportWidgetTypesInventory\n | ReportConfigOfSaleQueryAndReportWidgetTypesSale;\n }) => {\n const reportConfigId = originalReportConfig.reportId!;\n configOverride.schemaVersion = originalReportConfig.schemaVersion;\n\n // Set override to null if it is the same as the original report config\n // and the original report config does not have an override.\n if (\n !originalReportConfig.hasFilterOverride &&\n isEqual(originalReportConfig.filter, configOverride.filter)\n ) {\n configOverride.filter = null;\n }\n if (\n !originalReportConfig.hasMetricsOverride &&\n isEqual(originalReportConfig.metrics, configOverride.metrics)\n ) {\n configOverride.metrics = null;\n }\n\n if (reportType === ReportTypes.Inventory) {\n await reportClient.upsertInventoryReportConfigOverride(\n reportConfigId,\n configOverride as ReportConfigOverrideOfListingQuery\n );\n } else {\n await reportClient.upsertSaleReportConfigOverride(\n reportConfigId,\n configOverride as ReportConfigOverrideOfSaleQuery\n );\n }\n },\n // optimistic ui\n // Reference: https://tanstack.com/query/v3/docs/react/guides/optimistic-updates\n onMutate: ({ originalReportConfig, configOverride }) => {\n queryClient.cancelQueries({ queryKey });\n const prevValue =\n queryClient.getQueryData[]>(queryKey);\n\n const newReportConfig = {\n ...originalReportConfig,\n filter: configOverride.filter ?? originalReportConfig.filter,\n metrics: configOverride.metrics ?? originalReportConfig.metrics,\n } as ReportConfigType;\n\n const newValue = prevValue?.map((r) =>\n r.reportId === newReportConfig.reportId ? newReportConfig : r\n );\n queryClient.setQueryData[]>(queryKey, newValue);\n return { prevValue };\n },\n onError: (\n err: ErrorTypes,\n { originalReportConfig, configOverride },\n context\n ) => {\n queryClient.setQueryData(queryKey, context?.prevValue);\n showErrorDialog('reportClient.upsertReportConfig', err, {\n trackErrorData: { id, originalReportConfig, configOverride },\n });\n },\n onSettled: () => {\n queryClient.invalidateQueries({ queryKey });\n },\n });\n\n // Mutation to upsert report config\n const upsertReportOverride = useCallback(\n async (\n configOverride:\n | ReportConfigOverrideOfListingQuery\n | ReportConfigOverrideOfSaleQuery,\n originalReportConfig:\n | ReportConfigOfListingQueryAndReportWidgetTypesInventory\n | ReportConfigOfSaleQueryAndReportWidgetTypesSale\n ) => {\n return await upsertOverrideMutation.mutateAsync({\n configOverride,\n originalReportConfig,\n });\n },\n [upsertOverrideMutation]\n );\n\n const upsertReportConfig = (\n reportConfig: ReportConfigType,\n isTemporary?: boolean\n ) => {\n return upsertMutation.mutateAsync({ value: reportConfig, isTemporary });\n };\n\n // Mutation to delete report config\n const deleteMutation = useMutation({\n mutationFn: async ({ reportId }: { reportId: number }) => {\n return await reportClient.deleteReportConfig(reportId);\n },\n // optimistic ui\n // Reference: https://tanstack.com/query/v3/docs/react/guides/optimistic-updates\n onMutate: ({ reportId }) => {\n queryClient.cancelQueries({ queryKey });\n const prevValue =\n queryClient.getQueryData[]>(queryKey);\n\n queryClient.setQueryData[]>(\n queryKey,\n prevValue?.filter((r) => r.reportId !== reportId)\n );\n return { prevValue };\n },\n onError: (err: ErrorTypes, { reportId }, context) => {\n queryClient.setQueryData(queryKey, context?.prevValue);\n showErrorDialog('reportClient.deleteReportConfig', err, {\n trackErrorData: { id, reportId },\n });\n },\n onSettled: () => {\n queryClient.invalidateQueries({ queryKey });\n },\n });\n\n const deleteReportConfig = (reportId: number) => {\n deleteMutation.mutateAsync({ reportId });\n };\n\n // Array of report config only used within the hook that has the type\n // which can be directly set to the user setting.\n const reportConfigsInternal: ReportConfigType[] = _reportConfigs.filter(\n (r) => {\n return r.schemaVersion === '1';\n }\n );\n\n const reportConfigs: ReportConfig[] = reportConfigsInternal.map(\n (r) =>\n ({\n ...r,\n reportType,\n }) satisfies ReportConfig\n );\n\n const getReportConfigNameForDuplicate = useCallback(\n (reportName: string) => {\n const reportNames = reportConfigsInternal.map((r) => r.reportName);\n const defaultName = formattedContentResolver(\n FormatContentIds[FormatContentId.CopyOf].id,\n reportName,\n FormatContentIds[FormatContentId.CopyOf].defaultValue\n ) as string;\n if (!reportNames.includes(defaultName)) {\n return defaultName;\n }\n\n let newName = defaultName;\n let i = 2;\n while (reportNames.includes(newName)) {\n newName = `${defaultName} (${i})`;\n i++;\n }\n return newName;\n },\n [formattedContentResolver, reportConfigsInternal]\n );\n\n return {\n reportConfigs,\n isLoading: reportConfigQuery.isLoading,\n deleteReportConfig: (reportId: number) => {\n deleteReportConfig(reportId);\n },\n upsertReportConfig: (\n reportId: number | null,\n configInput: Partial,\n isTemporary?: boolean\n ) => {\n // Create new\n if (reportId == null) {\n // Force conversion is applied here because the type of the report config\n // Depends on the consumer to pass in the right set of widgets and filter types.\n const newConfig = castDraft({\n ...configInput,\n schemaVersion: '1',\n reportId: null,\n } as ReportConfigType);\n\n return upsertReportConfig(newConfig as ReportConfigType);\n }\n\n // Update existing\n const configToUpdate = reportConfigsInternal.find(\n (r) => r.reportId === reportId\n );\n if (!configToUpdate) {\n return new Promise((resolve) => resolve(null));\n }\n const initDraft = castDraft(configToUpdate as ReportConfigType);\n\n const updatedDraft = produce(initDraft, (draft) => {\n if (configInput.reportName != null) {\n draft.reportName = configInput.reportName;\n }\n\n if (configInput.groupBy != null) {\n draft.groupBy = configInput.groupBy;\n }\n if (configInput.metrics != null) {\n draft.metrics = configInput.metrics;\n }\n draft.ownerDisplayName = configInput.ownerDisplayName ?? '';\n draft.widgets = castDraft(configInput.widgets ?? null);\n draft.filter = castDraft(configInput.filter ?? null);\n draft.numberOfItemsPerPage = configInput.numberOfItemsPerPage ?? null;\n draft.sortBy = configInput.sortBy ?? null;\n draft.isSortDescending = configInput.isSortDescending ?? null;\n draft.sellerUserIdsToShare = configInput.sellerUserIdsToShare ?? [];\n draft.roleIdsToShare = configInput.roleIdsToShare ?? [];\n draft.viewableFilterItemIds = configInput.viewableFilterItemIds ?? [];\n draft.editableFilterItemIds = configInput.editableFilterItemIds ?? [];\n draft.hiddenFilterItemIds = configInput.hiddenFilterItemIds ?? [];\n });\n\n return upsertReportConfig(\n updatedDraft as ReportConfigType,\n isTemporary\n );\n },\n upsertReportOverride,\n getReportConfigNameForDuplicate,\n };\n}\n","import { useMemo } from 'react';\nimport { useReportConfigs } from 'src/hooks/useReportConfigs';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport { ReportTypes } from 'src/utils/reportsUtils';\nimport { ActionOutboxEntityType, UserSetting } from 'src/WebApiController';\n\nexport function useGetMetricsInUse({\n entityType,\n}: {\n entityType: ActionOutboxEntityType;\n}) {\n const { reportConfigs: listingReports } =\n useReportConfigs({\n reportType: ReportTypes.Inventory,\n });\n const { reportConfigs: saleReports } = useReportConfigs({\n reportType: ReportTypes.Sale,\n });\n const { value: listingColumns = [] } = useServerUserSetting({\n id: UserSetting.InventoryColumnOrder,\n });\n const { value: saleColumns = [] } = useServerUserSetting({\n id: UserSetting.SaleColumnOrder,\n });\n\n const metricsInUse = useMemo(() => {\n if (entityType === ActionOutboxEntityType.Listing) {\n return [\n ...new Set([\n ...listingColumns,\n ...listingReports.flatMap((r) => r.metrics),\n ]),\n ];\n } else if (entityType === ActionOutboxEntityType.Sale) {\n return [\n ...new Set([...saleColumns, ...saleReports.flatMap((r) => r.metrics)]),\n ];\n } else {\n return [];\n }\n }, [entityType, listingColumns, listingReports, saleColumns, saleReports]);\n\n return {\n metricsInUse,\n };\n}\n","import { useCallback, useMemo, useState } from 'react';\nimport { useForm } from 'react-hook-form';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { Button } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { TAG_VALUE_TYPE_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { Feature, Tag, TagsValueType, UserSetting } from 'src/WebApiController';\n\nimport { CancelButton } from '../Buttons';\nimport * as styles from './TagsFormBody.css';\n\n// Special characters that are not allowed in reporting column names to avoid interfering with the formula\nconst SPECIAL_CHAR_SET = [\"'\", '[', ']', '{', '}'];\nconst DEFAULT_MAX_NUM_REPORTING_COLUMN = 5;\n\n// Reserved tag names that are not allowed to be created\nconst RESERVED_NAMES = ['SkyboxNotes'];\n\nexport const CreateTagMetadataForm = ({\n mergedTagsMetadata,\n disabled,\n onSubmit,\n onClose,\n}: {\n mergedTagsMetadata: Tag[];\n disabled?: boolean;\n onSubmit: (newTagMetadata: Tag) => void;\n onClose: () => void;\n}) => {\n const {\n watch,\n setValue,\n handleSubmit,\n formState: { errors },\n setError,\n clearErrors,\n } = useForm({\n defaultValues: { key: '', value: '', valueType: TagsValueType.String },\n });\n\n const hasTagTypesUserGroupFeature = useUserHasFeature(\n Feature.TagTypesUserGroup\n );\n\n const duplicateMsg = useContent(ContentId.ExistingTagName);\n const requiredMsg = useContent(ContentId.Required);\n const specialCharsMsg = useContent(ContentId.SpecialCharactersNotAllowed);\n const notAllowedMsg = useContent(ContentId.TagNameNotAllowed);\n\n const { value: maxNumReportingColumn = DEFAULT_MAX_NUM_REPORTING_COLUMN } =\n useServerUserSetting({\n id: UserSetting.ReportingColumnLimit,\n });\n\n const key = watch('key');\n const valueType = watch('valueType');\n const singleValueOnly = watch('singleValueOnly') ?? false;\n const allowMultipleValues = !singleValueOnly;\n const includeInReport = watch('includeInReport');\n\n const [isSubmitting, setIsSubmitting] = useState(false);\n\n const validateTagInput = useCallback(\n (data: Tag) => {\n clearErrors('key');\n clearErrors('valueType');\n\n if (!data.key) {\n setError('key', { message: requiredMsg }, { shouldFocus: true });\n return false;\n }\n\n if (mergedTagsMetadata.find((t) => t.key === data.key) != null) {\n setError('key', { message: duplicateMsg }, { shouldFocus: true });\n return false;\n }\n\n if (!data.valueType) {\n setError('valueType', { message: requiredMsg }, { shouldFocus: true });\n return false;\n }\n\n if (SPECIAL_CHAR_SET.some((c) => data.key.includes(c))) {\n setError('key', { message: specialCharsMsg }, { shouldFocus: true });\n return false;\n }\n\n if (RESERVED_NAMES.includes(data.key)) {\n setError('key', { message: notAllowedMsg }, { shouldFocus: true });\n return false;\n }\n\n return true;\n },\n [\n clearErrors,\n duplicateMsg,\n mergedTagsMetadata,\n notAllowedMsg,\n requiredMsg,\n setError,\n specialCharsMsg,\n ]\n );\n\n const onSubmitHandler = useCallback(\n async (newTag: Tag) => {\n // Validation\n if (!validateTagInput(newTag)) {\n return;\n }\n\n try {\n setIsSubmitting(true);\n await onSubmit(newTag);\n setIsSubmitting(false);\n onClose();\n } catch (e) {\n // error tracking is handled in the api hook, only doing console here\n console.error('Unable to save new tag metadata:', e);\n } finally {\n setIsSubmitting(false);\n }\n },\n [onClose, onSubmit, validateTagInput]\n );\n\n const tagTypesOptionsContent = useMemo(() => {\n return Object.entries(TAG_VALUE_TYPE_TO_CID).reduce(\n (cur, [key, value]) => {\n if (!hasTagTypesUserGroupFeature && key === TagsValueType.UserGroup) {\n return cur;\n }\n cur[key] = value;\n return cur;\n },\n {} as Record\n );\n }, [hasTagTypesUserGroupFeature]);\n\n const willExceedReportingColumnLimit = useMemo(() => {\n const numReportingTags = mergedTagsMetadata.filter(\n (t) => t.includeInReport\n ).length;\n return numReportingTags >= maxNumReportingColumn;\n }, [maxNumReportingColumn, mergedTagsMetadata]);\n\n return (\n
    \n }\n errors={errors?.key?.message}\n >\n {\n clearErrors('key');\n setValue('key', e.target.value);\n }}\n disabled={disabled || isSubmitting}\n maxLength={750}\n />\n \n\n }\n errors={errors?.valueType?.message}\n >\n \n placeholderText={ContentId.SelectValueType}\n valueOptionsContent={tagTypesOptionsContent}\n value={valueType}\n onChange={(newValueType) => {\n clearErrors('valueType');\n setValue('valueType', newValueType);\n }}\n disabled={disabled || isSubmitting}\n style={{ width: '100%' }}\n />\n \n {\n // isChecked is true means allow multiple values\n const isChecked = !allowMultipleValues;\n\n setValue('singleValueOnly', !isChecked);\n if (isChecked) {\n setValue('includeInReport', false);\n }\n }}\n disabled={disabled || isSubmitting}\n label={}\n />\n\n {\n const isChecked = !includeInReport;\n setValue('includeInReport', isChecked);\n }}\n label={}\n />\n\n
    \n {\n handleSubmit(onSubmitHandler)();\n }}\n disabled={disabled || isSubmitting}\n >\n \n \n\n \n
    \n
    \n );\n};\n","import React, { ComponentProps } from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { CancelButton } from 'src/components/Buttons';\nimport { OkButton } from 'src/components/Buttons/OkButton';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nexport type ConfirmDialogProps = {\n onOkay?: () => void;\n headerText: React.ReactNode;\n bodyText: React.ReactNode;\n onCancel?: () => void;\n cancelText?: ContentId;\n okText?: ContentId;\n disabled?: boolean;\n isLoading?: boolean;\n} & ComponentProps;\n\nexport function ConfirmDialog({\n headerText,\n bodyText,\n onCancel,\n onOkay,\n okText,\n cancelText,\n isOpen,\n disabled,\n isLoading,\n ...rest\n}: ConfirmDialogProps) {\n return (\n \n {onCancel && (\n \n )}\n {onOkay && (\n \n )}\n \n }\n {...rest}\n isOpen={isOpen}\n onCancel={onCancel}\n >\n \n {bodyText}\n {isLoading && }\n \n \n );\n}\n","import { useCallback, useMemo, useState } from 'react';\nimport { useForm } from 'react-hook-form';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { ConfirmDialog } from 'src/core/interim/dialogs/ConfirmDialog';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosEnumSelect, PosSelect } from 'src/core/POS/PosSelect';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { TAG_VALUE_TYPE_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport {\n Feature,\n Permission,\n Tag,\n TagsValueType,\n UserSetting,\n} from 'src/WebApiController';\n\nimport { CancelButton } from '../Buttons';\nimport * as styles from './TagsFormBody.css';\n\n// Special characters that are not allowed in reporting column names to avoid interfering with the formula\nconst SPECIAL_CHAR_SET = [\"'\", '[', ']', '{', '}'];\nconst DEFAULT_MAX_NUM_REPORTING_COLUMN = 5;\n\nexport const EditTagMetadataForm = ({\n mergedTagsMetadata,\n mergedTagsMetadataWithNoValue,\n disabled,\n onSubmit,\n onDeleteSubmit,\n onClose,\n metricsInUse,\n}: {\n mergedTagsMetadata: Tag[];\n mergedTagsMetadataWithNoValue: Tag[];\n disabled?: boolean;\n onSubmit: (newTagMetadata: Tag) => void;\n onDeleteSubmit: (tagToDelete: Tag) => void;\n onClose: () => void;\n metricsInUse: string[];\n}) => {\n const {\n watch,\n setValue,\n handleSubmit,\n formState: { errors },\n setError,\n clearErrors,\n } = useForm({\n defaultValues: { key: '', value: '', valueType: TagsValueType.String },\n });\n\n const hasTagTypesUserGroupFeature = useUserHasFeature(\n Feature.TagTypesUserGroup\n );\n\n // TODO: Change this to correct one: https://thestubhub.atlassian.net/browse/POS-3668\n const hasDeleteTagTypePermission = useUserHasAnyOfPermissions(\n Permission.Inventory_AddTagType,\n Permission.Sales_AddTagType,\n Permission.Purchases_AddTagType,\n Permission.Events_AddTagType\n );\n\n const reportMsg = useContent(ContentId.Reporting);\n const requiredMsg = useContent(ContentId.Required);\n const specialCharsMsg = useContent(ContentId.SpecialCharactersNotAllowed);\n\n const { value: maxNumReportingColumn = DEFAULT_MAX_NUM_REPORTING_COLUMN } =\n useServerUserSetting({\n id: UserSetting.ReportingColumnLimit,\n });\n\n const key = watch('key');\n const valueType = watch('valueType');\n const singleValueOnly = watch('singleValueOnly') ?? false;\n const allowMultipleValues = !singleValueOnly;\n const includeInReport = watch('includeInReport');\n\n const [isSubmitting, setIsSubmitting] = useState(false);\n\n const unselectReportConfirmDialog = useBasicDialog();\n const deleteConfirmDialog = useBasicDialog();\n const keyOptionsContent = useMemo(() => {\n const keyOptions = mergedTagsMetadata\n .toSorted((r1, r2) => r1.key.localeCompare(r2.key))\n .reduce(\n (re, r) => {\n re[r.key] = r.includeInReport ? `${r.key} (${reportMsg})` : r.key;\n return re;\n },\n {} as Record\n );\n\n return keyOptions ?? {};\n }, [mergedTagsMetadata, reportMsg]);\n\n const isUsingTagWithNoValue = useMemo(() => {\n return mergedTagsMetadataWithNoValue.find((t) => t.key === key) != null;\n }, [mergedTagsMetadataWithNoValue, key]);\n\n const validateTagInput = useCallback(\n (data: Tag) => {\n clearErrors('key');\n clearErrors('valueType');\n\n if (!data.key) {\n setError('key', { message: requiredMsg }, { shouldFocus: true });\n return false;\n }\n\n if (!data.valueType) {\n setError('valueType', { message: requiredMsg }, { shouldFocus: true });\n return false;\n }\n\n if (SPECIAL_CHAR_SET.some((c) => data.key.includes(c))) {\n setError('key', { message: specialCharsMsg }, { shouldFocus: true });\n return false;\n }\n\n return true;\n },\n [clearErrors, requiredMsg, setError, specialCharsMsg]\n );\n\n const onSubmitHandler = useCallback(\n async (newTag: Tag) => {\n // Validation\n if (!validateTagInput(newTag)) {\n return;\n }\n\n try {\n setIsSubmitting(true);\n await onSubmit(newTag);\n setIsSubmitting(false);\n onClose();\n } catch (e) {\n // error tracking is handled in the api hook, only doing console here\n console.error('Unable to update tag metadata:', e);\n } finally {\n setIsSubmitting(false);\n }\n },\n [onClose, onSubmit, validateTagInput]\n );\n const tagTypesOptionsContent = useMemo(() => {\n return Object.entries(TAG_VALUE_TYPE_TO_CID).reduce(\n (cur, [key, value]) => {\n if (!hasTagTypesUserGroupFeature && key === TagsValueType.UserGroup) {\n return cur;\n }\n cur[key] = value;\n return cur;\n },\n {} as Record\n );\n }, [hasTagTypesUserGroupFeature]);\n\n const onDeleteSubmitHandler = useCallback(\n async (tag: Tag) => {\n // Validation\n if (!tag.key) {\n return;\n }\n\n try {\n setIsSubmitting(true);\n await onDeleteSubmit(tag);\n setIsSubmitting(false);\n onClose();\n } catch (e) {\n // error tracking is handled in the api hook, only doing console here\n console.error('Unable to delete tag metadata:', e);\n } finally {\n setIsSubmitting(false);\n }\n },\n [onClose, onDeleteSubmit]\n );\n\n const exceedsReportingColumnLimit = useMemo(() => {\n const numReportingTagsExcludingCurrent = mergedTagsMetadata.filter(\n (t) => t.includeInReport && t.key !== key\n ).length;\n\n return numReportingTagsExcludingCurrent >= maxNumReportingColumn;\n }, [key, maxNumReportingColumn, mergedTagsMetadata]);\n\n return (\n <>\n
    \n }\n errors={errors?.key?.message}\n >\n {\n clearErrors('key');\n setValue('key', key);\n\n const existingTag = mergedTagsMetadata.find((t) => t.key === key);\n if (existingTag && existingTag.valueType) {\n setValue('valueType', existingTag.valueType);\n setValue(\n 'singleValueOnly',\n existingTag.singleValueOnly ?? false\n );\n setValue(\n 'includeInReport',\n existingTag.includeInReport ?? false\n );\n } else {\n setValue('valueType', TagsValueType.String);\n setValue('singleValueOnly', false);\n setValue('includeInReport', false);\n }\n }}\n value={key}\n displayText={key}\n disabled={disabled || isSubmitting}\n style={{ width: '100%' }}\n searchable\n valueOptionsContent={keyOptionsContent}\n placeholderText={ContentId.Key}\n />\n \n\n }\n errors={errors?.valueType?.message}\n >\n \n placeholderText={ContentId.SelectValueType}\n valueOptionsContent={tagTypesOptionsContent}\n value={valueType}\n onChange={(newValueType) => {\n clearErrors('valueType');\n setValue('valueType', newValueType);\n }}\n disabled={!isUsingTagWithNoValue || disabled || isSubmitting}\n style={{ width: '100%' }}\n />\n \n {\n // isChecked is true means allow multiple values\n const isChecked = !allowMultipleValues;\n\n setValue('singleValueOnly', !isChecked);\n if (isChecked) {\n setValue('includeInReport', false);\n }\n }}\n disabled={!isUsingTagWithNoValue || disabled || isSubmitting}\n label={}\n />\n {\n const isChecked = !includeInReport;\n if (!isChecked) {\n if (metricsInUse.includes(key)) {\n unselectReportConfirmDialog.launchDialog();\n } else {\n setValue('includeInReport', isChecked);\n }\n } else {\n setValue('includeInReport', isChecked);\n }\n }}\n label={}\n />\n\n \n \n {\n handleSubmit(onSubmitHandler)();\n }}\n disabled={disabled || isSubmitting || !key}\n >\n \n \n\n \n \n
    \n {hasDeleteTagTypePermission && (\n {\n deleteConfirmDialog.launchDialog();\n }}\n disabled={disabled || isSubmitting || !key}\n >\n \n \n )}\n
    \n
    \n \n }\n bodyText={}\n onOkay={() => {\n setValue('includeInReport', false);\n unselectReportConfirmDialog.closeDialog();\n }}\n onCancel={() => unselectReportConfirmDialog.closeDialog()}\n />\n }\n bodyText={\n \n \n \n \n \n }\n onOkay={handleSubmit(onDeleteSubmitHandler)}\n disabled={disabled || isSubmitting}\n onCancel={() => deleteConfirmDialog.closeDialog()}\n />\n \n );\n};\n","import { DndContext, DragEndEvent } from '@dnd-kit/core';\nimport { arrayMove, SortableContext } from '@dnd-kit/sortable';\nimport { useCallback, useMemo, useState } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { DropWrapper } from 'src/core/POS/DragAndDropSort/DragAndDrop';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { useGetMetricsInUse } from 'src/hooks/useGetMetricsInUse';\nimport { useTagsForEntityType } from 'src/hooks/useTagsForEntityType';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { HamburgerMenuIcon } from 'src/svgs';\nimport { DeleteIcon, EditIcon, IconsFill, PlusIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ActionOutboxEntityType, Permission, Tag } from 'src/WebApiController';\n\nimport { ButtonWithIcon } from '../Buttons';\nimport { CreateTagMetadataForm } from './CreateTagMetadataForm';\nimport { EditTagMetadataForm } from './EditTagMetadataForm';\nimport * as styles from './TagsFormBody.css';\nimport { TagValueDisplay, TagValueInputCell } from './TagValueCell';\n\nconst TagDraggableListItem = ({\n tag,\n tagsCurrentEntity,\n disabled,\n onBlur,\n isEditing,\n onRowStartEdit,\n onRowChange,\n onRowDelete,\n}: {\n tag: Tag;\n tagsCurrentEntity: Tag[];\n disabled?: boolean;\n onRowDelete: (tag: Tag) => void;\n isEditing?: boolean;\n onRowStartEdit?: () => void;\n onRowChange: (tag: Tag, newValue: string) => void;\n onBlur: () => void;\n}) => {\n return (\n {\n // Disable dragging\n if (disabled) {\n e.stopPropagation();\n }\n }}\n >\n
    \n {!disabled && (\n \n )}\n
    \n {tag.key}\n
    \n
    \n
    \n {isEditing ? (\n {\n e.stopPropagation();\n }}\n >\n {\n onRowChange(tag, newValue);\n }}\n />\n
    \n ) : (\n <>\n \n {\n e.stopPropagation();\n }}\n style={{\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n gap: vars.spacing['xxs'],\n }}\n >\n {\n e.stopPropagation();\n onRowStartEdit?.();\n }}\n />\n onRowDelete(tag)}\n />\n \n \n )}\n \n \n );\n};\n\nexport const TagsPanelEditMode = ({\n tagsWithEmptyValue,\n tagsWithValue,\n onTagsUpdate,\n onTagValueChange,\n disabled,\n entityType,\n onEditDone,\n}: {\n tagsWithEmptyValue: Tag[];\n tagsWithValue: Tag[];\n disabled?: boolean;\n onTagsUpdate: (tagsCurrentEntity: Tag[]) => void;\n onTagValueChange: (tag: Tag, newValue: string) => void;\n onEditDone: () => void;\n entityType:\n | ActionOutboxEntityType.Listing\n | ActionOutboxEntityType.Purchase\n | ActionOutboxEntityType.Sale\n | ActionOutboxEntityType.SellerEvent;\n}) => {\n const [isEditingTagMetadata, setIsEditingTagMetadata] =\n useState(false);\n const [isCreatingTag, setIsCreatingTag] = useState(false);\n const [tagsEditing, setTagsEditing] = useState();\n const {\n tagsMetadata: existingTagsCurrentType = [],\n tagsWithNoValue: existingTagsCurrentTypeWithNoValue = [],\n mergeEntityTagsMetadata,\n deleteEntityTagsMetadata,\n } = useTagsForEntityType(entityType);\n const { metricsInUse } = useGetMetricsInUse({ entityType });\n\n const hasCreateTagPermission = useUserHasAnyOfPermissions(\n entityType === ActionOutboxEntityType.Listing\n ? Permission.Inventory_AddTagType\n : entityType === ActionOutboxEntityType.Sale\n ? Permission.Sales_AddTagType\n : entityType === ActionOutboxEntityType.Purchase\n ? Permission.Purchases_AddTagType\n : Permission.Events_AddTagType\n );\n\n const onDragEndHandler = useCallback(\n (event: DragEndEvent) => {\n const { active, over } = event;\n const activeIndex = active.data.current?.sortable.index;\n const overIndex = over?.data.current?.sortable.index;\n if (!over) return;\n onTagsUpdate(\n arrayMove(tagsWithEmptyValue, activeIndex, overIndex)\n .filter((t) => t.value)\n .map((t, i) => ({\n ...t,\n ordinal: i,\n }))\n );\n },\n [onTagsUpdate, tagsWithEmptyValue]\n );\n\n const onTagDelete = useCallback(\n (tag: Tag) => {\n const newTags = tagsWithEmptyValue.filter(\n (t) => !(t.key === tag.key && t.value === tag.value)\n );\n onTagsUpdate(newTags.filter((t) => t.value));\n },\n [onTagsUpdate, tagsWithEmptyValue]\n );\n\n const onTagMetadataUpdate = useCallback(\n async (tagMetadataUpdate: Tag) => {\n // Update tags metadata immediately\n await mergeEntityTagsMetadata([tagMetadataUpdate]);\n },\n [mergeEntityTagsMetadata]\n );\n\n const onTagMetadataDelete = useCallback(\n async (tag: Tag) => {\n // Delete tags metadata immediately\n await deleteEntityTagsMetadata([tag]);\n // Remove tags with the deleted key in the entity in edit mode\n onTagsUpdate(tagsWithEmptyValue.filter((t) => t.key !== tag.key));\n },\n [deleteEntityTagsMetadata, onTagsUpdate, tagsWithEmptyValue]\n );\n\n // Merge tags with no value from the entity type with the ones from the entity\n const existingTagsCurrentTypeWithNoValueMerged = useMemo(\n () =>\n existingTagsCurrentTypeWithNoValue.filter(\n (t) => tagsWithValue.find((t2) => t2.key === t.key) == null\n ),\n [existingTagsCurrentTypeWithNoValue, tagsWithValue]\n );\n\n return (\n \n
    \n \n tag.ordinal?.toString() ?? '')}\n >\n {tagsWithValue.map((tag) => (\n \n {\n setTagsEditing(tag);\n }}\n disabled={isEditingTagMetadata || disabled}\n onBlur={() => setTagsEditing(undefined)}\n onRowChange={onTagValueChange}\n onRowDelete={onTagDelete}\n />\n \n ))}\n \n \n
    \n {isEditingTagMetadata ? (\n <>\n {isCreatingTag ? (\n setIsEditingTagMetadata(false)}\n />\n ) : (\n setIsEditingTagMetadata(false)}\n metricsInUse={metricsInUse}\n />\n )}\n \n ) : (\n <>\n \n {hasCreateTagPermission ? (\n \n }\n textContentId={ContentId.CreateNewTag}\n onClick={() => {\n setIsCreatingTag(true);\n setIsEditingTagMetadata(true);\n }}\n style={{ width: 'min-content', whiteSpace: 'nowrap' }}\n variant={'text'}\n />\n ) : (\n \n )}\n {mergeEntityTagsMetadata.length > 0 ? (\n \n }\n textContentId={ContentId.EditTagTypes}\n onClick={() => {\n setIsCreatingTag(false);\n setIsEditingTagMetadata(true);\n }}\n style={{ width: 'min-content', whiteSpace: 'nowrap' }}\n variant={'text'}\n />\n ) : (\n \n )}\n \n {\n setIsEditingTagMetadata(false);\n setTagsEditing(undefined);\n onTagsUpdate(tagsWithValue.map((t, i) => ({ ...t, ordinal: i })));\n onEditDone();\n }}\n disabled={disabled}\n style={{ width: '100%', whiteSpace: 'nowrap' }}\n variant=\"outline\"\n >\n \n \n \n )}\n
    \n );\n};\n","import { useCallback, useMemo, useState } from 'react';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { useTagsForEntityType } from 'src/hooks/useTagsForEntityType';\nimport { EditIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ActionOutboxEntityType, Tag } from 'src/WebApiController';\n\nimport * as styles from './TagsFormBody.css';\nimport { TagsPanelDisplayMode } from './TagsPanelDisplayMode';\nimport { TagsPanelEditMode } from './TagsPanelEditMode';\n\nexport const TagsFormBodyV2 = ({\n disabled,\n tagsCurrentEntity,\n onTagsUpdate,\n entityType,\n canCreateTagType,\n canEditTags,\n}: {\n disabled?: boolean;\n canCreateTagType: boolean;\n canEditTags: boolean;\n tagsCurrentEntity: Tag[];\n onTagsUpdate: (tagsCurrentEntity: Tag[]) => void;\n entityType:\n | ActionOutboxEntityType.Listing\n | ActionOutboxEntityType.Purchase\n | ActionOutboxEntityType.Sale\n | ActionOutboxEntityType.SellerEvent;\n}) => {\n const { tagsMetadata: existingTagsCurrentType = [] } =\n useTagsForEntityType(entityType);\n\n const tagsWithEmptyValue = useMemo(() => {\n // Fill in the ordinal for tags that don't have it\n const hasEveryOrdinal = tagsCurrentEntity.every((t) => t.ordinal != null);\n\n let tagsOrdinalFilled: Tag[] = [...tagsCurrentEntity];\n if (!hasEveryOrdinal) {\n tagsOrdinalFilled = tagsOrdinalFilled\n .toSorted((t1, t2) => t1.key.localeCompare(t2.key))\n .map((t, i) => ({ ...t, ordinal: i }));\n }\n\n tagsOrdinalFilled = tagsOrdinalFilled.toSorted(\n (t1, t2) => (t1.ordinal ?? 0) - (t2.ordinal ?? 0)\n );\n\n // Add tags that don't have value\n (existingTagsCurrentType ?? []).forEach((t) => {\n if (!tagsOrdinalFilled.find((t2) => t2.key === t.key)) {\n tagsOrdinalFilled.push({\n ...t,\n value: '',\n ordinal: tagsOrdinalFilled.length,\n });\n }\n });\n\n return tagsOrdinalFilled;\n }, [existingTagsCurrentType, tagsCurrentEntity]);\n\n const tagsWithValue = useMemo(() => {\n return tagsWithEmptyValue.filter((t) => t.value);\n }, [tagsWithEmptyValue]);\n\n const [isEditMode, setIsEditMode] = useState(false);\n\n const onTagsUpdateHandler = useCallback(\n (newTags: Tag[]) => {\n // Filter out tags with empty value\n const tagsWithValue = newTags.filter((t) => t.value);\n // De-duplicate tags\n let tagsDeDup: Tag[] = [];\n tagsWithValue.forEach((t) => {\n if (!tagsDeDup.find((t2) => t2.key === t.key && t2.value === t.value)) {\n tagsDeDup.push(t);\n }\n });\n tagsDeDup = tagsDeDup.map((t, i) => ({ ...t, ordinal: i }));\n onTagsUpdate(tagsDeDup);\n },\n [onTagsUpdate]\n );\n\n const onTagValueChange = useCallback(\n (tag: Tag, newValue: string) => {\n const newTags = tagsWithEmptyValue.map((t) => {\n if (t.key === tag.key && t.value === tag.value) {\n return { ...t, value: newValue };\n }\n return t;\n });\n onTagsUpdateHandler(newTags);\n },\n [onTagsUpdateHandler, tagsWithEmptyValue]\n );\n\n const editTagTypesLabel = useContent(ContentId.EditTagTypes);\n\n return (\n <>\n
    \n
    \n {\n setIsEditMode(true);\n }}\n withHoverEffect\n title={editTagTypesLabel}\n />\n
    \n {isEditMode ? (\n {\n setIsEditMode(false);\n }}\n entityType={entityType}\n />\n ) : (\n \n )}\n
    \n \n );\n};\n","import { useQuery } from '@tanstack/react-query';\nimport React, { useCallback, useContext } from 'react';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { MoneyClient, UiCurrency } from 'src/WebApiController';\n\ntype ILocalizationContext = {\n currencyCache: Record;\n getUiCurrency: (currencyCode: string | null | undefined) => UiCurrency;\n};\n\nexport const LocalizationContext = React.createContext({\n currencyCache: {},\n getUiCurrency: () =>\n ({\n code: 'USD',\n sym: '$',\n dec: 2,\n }) as UiCurrency,\n});\n\nexport const useLocalizationContext = () => useContext(LocalizationContext);\n\n/**\n * Adds a modal to the page where the provider is added\n * Provides utils to set all or update part of the modal\n * The modal is assumed to be open when it contains content\n */\nexport const LocalizationContextProvider = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\n const { trackError } = useErrorBoundaryContext();\n\n const availableCurrenciesQuery = useQuery({\n queryKey: ['getAvailableCurrencies'],\n queryFn: async () => {\n const results = await new MoneyClient({}).getAvailableCurrencies();\n\n const resultsMap = results?.reduce(\n (r, cur) => {\n r[cur.code] = cur;\n return r;\n },\n {} as Record\n );\n\n return resultsMap;\n },\n\n staleTime: Infinity, // currencies don't change often and we're invalidate on reload\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError('MoneyClient.getAvailableCurrencies', error);\n },\n },\n });\n\n const getUiCurrency = useCallback(\n (currencyCode: string | null | undefined) => {\n if (!currencyCode || !availableCurrenciesQuery.data) {\n return {\n code: currencyCode ?? '',\n sym: currencyCode ?? '',\n dec: 2,\n } as UiCurrency;\n }\n\n return (\n availableCurrenciesQuery.data[currencyCode] ??\n ({\n code: currencyCode ?? '',\n sym: currencyCode ?? '',\n dec: 2,\n } as UiCurrency)\n );\n },\n [availableCurrenciesQuery.data]\n );\n\n return (\n \n {children}\n \n );\n};\n","import styled from 'styled-components/macro';\n\nexport const TableOverflowWrapper = styled.div`\n // TODO temporarily comment out until popover overflow is fixed\n /* overflow-x: auto; */\n`;\n","import { useMemo } from 'react';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport {\n PosMultiSelect,\n PosMultiSelectProps,\n} from 'src/core/POS/PosMultiSelect';\n\nexport const CurrencyFilterMultiSelector = (\n props: Omit\n) => {\n const { currencyCache } = useLocalizationContext();\n\n const availableCurrenciesOptions = useMemo(\n () =>\n Object.values(currencyCache || []).reduce(\n (result, cur) => {\n result[cur.code] = cur.code;\n return result;\n },\n {} as Record\n ),\n [currencyCache]\n );\n\n return (\n \n );\n};\n","import { useEffect, useMemo } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { PosSelect, PosSelectProps } from 'src/core/POS/PosSelect';\n\nexport const CurrencyFilterSelector = (\n props: Omit\n) => {\n const { loginContext } = useAppContext();\n const { currencyCache } = useLocalizationContext();\n\n const { value, onChange, enableEmptySelection } = props;\n\n useEffect(() => {\n if (\n loginContext?.user?.activeAccount?.currencyCode &&\n !value &&\n !enableEmptySelection\n ) {\n onChange(loginContext?.user?.activeAccount?.currencyCode);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [loginContext?.user?.activeAccount?.currencyCode, value]);\n\n const availableCurrenciesOptions = useMemo(\n () =>\n Object.values(currencyCache || []).reduce(\n (result, cur) => {\n result[cur.code] = cur.code;\n return result;\n },\n {} as Record\n ),\n [currencyCache]\n );\n\n return (\n \n );\n};\n","import { ChangeEventHandler, ComponentPropsWithRef } from 'react';\nimport { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport type SwitchProps = {\n checked: boolean;\n onChange?: ChangeEventHandler;\n disabled?: boolean;\n containerClassName?: string;\n};\nexport function Switch({\n checked,\n onChange,\n disabled,\n containerClassName,\n ...props\n}: SwitchProps &\n Omit<\n ComponentPropsWithRef,\n 'type' | 'checked' | 'onChange' | 'disabled'\n >) {\n return (\n \n \n \n \n \n );\n}\n\nconst StyledContainer = styled.div`\n display: flex;\n height: 24px;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n`;\n\nconst StyledInput = styled.input`\n border: 0;\n clip: rect(0 0 0 0);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n width: 1px;\n`;\n\nconst Styledlabel = styled.label<{ checked: boolean; disable?: boolean }>`\n width: 32px !important;\n height: ${() => `${vars.spacing.xs}`};\n position: relative;\n background-color: ${(props) => props.theme.colors.textDisabled};\n border-radius: ${() => vars.spacing.xxs};\n cursor: ${(props) => (props.disable ? 'default' : 'pointer')};\n\n &::before {\n content: '';\n top: 50%;\n left: 0;\n transform: ${(props) =>\n props.checked ? 'translate(100%, -50%)' : 'translate(0, -50%)'};\n transition: 0.3s transform;\n position: absolute;\n width: ${() => vars.spacing.lg};\n height: ${() => vars.spacing.lg};\n border-radius: 50%;\n background: ${(props) => props.theme.colors.backgroundPrimary};\n border: 2px solid\n ${(props) =>\n props.disable\n ? props.theme.colors.borderDisabled\n : props.theme.colors.borderActive};\n }\n`;\n","import {\n ChangeEvent,\n forwardRef,\n ReactElement,\n useCallback,\n useMemo,\n useState,\n} from 'react';\nimport { mergeProps } from 'src/core/utils';\nimport { UiCurrency } from 'src/WebApiController';\n\nimport { PosTextField } from '../PosTextField';\nimport * as styles from './PosCurrencyField.css';\n\nexport type PosCurrencyFieldProps = Omit<\n React.ComponentProps,\n 'step' | 'type' | 'inputMode'\n> & {\n uiCurrency: UiCurrency;\n};\n\nexport const PosCurrencyField = forwardRef<\n HTMLInputElement,\n PosCurrencyFieldProps\n>(function PosCurrencyField(\n { uiCurrency, value, onChange, onBlur, onKeyUp, rootProps, ...rest },\n ref\n): ReactElement {\n const [isInputting, setIsInputting] = useState(false);\n\n const fixedValue = useMemo(() => {\n if (value == null) {\n return '';\n }\n const numericalValue = parseFloat((value ?? 0).toString());\n return isInputting\n ? numericalValue\n : numericalValue.toFixed(uiCurrency.dec);\n }, [isInputting, uiCurrency.dec, value]);\n\n const onChangeHandler = useCallback(\n (e: ChangeEvent) => {\n setIsInputting(true);\n onChange?.(e);\n },\n [onChange]\n );\n\n const onBlurHandler = useCallback(\n (e: React.FocusEvent) => {\n setIsInputting(false);\n\n // If user type in numbers less than the current decimal digit,\n // like 0.003 when the display is 0.00, we know they meant to type from the end\n // so it should shift upward (like how the rest of money inputs are)\n if (e.target.value) {\n const newValue = parseFloat(e.target.value);\n const fixedNum = newValue.toFixed(uiCurrency.dec);\n if (fixedNum !== fixedValue) {\n e.target.value = fixedNum;\n onChange?.(e);\n }\n }\n\n onBlur?.(e);\n },\n [fixedValue, onBlur, onChange, uiCurrency.dec]\n );\n\n return (\n \n );\n});\n","import styled from 'styled-components/macro';\n\nexport const FormTable = styled.table`\n border-collapse: collapse;\n\n th {\n font-family: var(--bs-body-font-family);\n font-size: var(--bs-body-font-size);\n font-weight: var(--bs-body-font-weight);\n }\n\n td,\n th {\n border: 0px solid transparent;\n background-clip: padding-box;\n vertical-align: middle;\n }\n\n tr > td + td,\n tr > th + th {\n border-left-width: 16px;\n }\n\n tr + tr > td {\n border-top-width: 8px;\n }\n`;\n","import {\n Controller,\n UseFieldArrayReturn,\n UseFormReturn,\n} from 'react-hook-form';\nimport { CurrencyFilterSelector } from 'src/components/Selectors/CurrencyFilterSelector';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { Switch } from 'src/core/interim/Switch';\nimport { DatePickerInput } from 'src/core/POS/DateSelector';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport {\n FieldError,\n PurchasePaymentMethodSelectionInput,\n} from 'src/modals/common/Purchase';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getLocaleFromLanguageOrCurrent } from 'src/utils/localeUtils';\nimport { Feature } from 'src/WebApiController';\n\nimport { FormTable } from './AddPurchasePaymentTable.styled';\n\nexport type AddPurchasePaymentTableFieldValues = {\n payments: {\n currencyCode: string;\n paymentAmount?: number;\n isPaid: boolean;\n paymentDueDate?: Date;\n paymentDate?: Date;\n paymentMethodId?: number;\n }[];\n};\n\nexport type AddPurchasePaymentTableProps = {\n form: UseFormReturn;\n fieldArray: UseFieldArrayReturn<\n AddPurchasePaymentTableFieldValues,\n 'payments',\n 'id'\n >;\n};\n\nexport function AddPurchasePaymentTable({\n form: {\n control,\n formState,\n resetField,\n setValue,\n getValues,\n getFieldState,\n watch,\n register,\n clearErrors,\n },\n fieldArray: { fields },\n}: AddPurchasePaymentTableProps) {\n const requiredMsg = useContent(ContentId.Required);\n const { getUiCurrency } = useLocalizationContext();\n\n const hasEnforcePurchasePaymentCurrencyFeature = useUserHasFeature(\n Feature.EnforcePurchasePaymentCurrency\n );\n\n const table = (\n \n \n \n \n \n \n {!hasEnforcePurchasePaymentCurrencyFeature && }\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {fields.map((field, index) => (\n \n {!hasEnforcePurchasePaymentCurrencyFeature && (\n \n (\n \n )}\n />\n \n )}\n \n {\n return parseFloat(fieldVal?.toString() ?? '')\n ? undefined\n : requiredMsg;\n },\n },\n valueAsNumber: true,\n onChange: ({ target: { value } }) => {\n clearErrors(`payments.${index}.paymentAmount`);\n setValue(\n `payments.${index}.paymentAmount`,\n parseFloat(value)\n );\n },\n })}\n />\n \n \n (\n {\n setValue(field.name, d);\n }}\n />\n )}\n />\n \n \n (\n {\n const isPaid = e.currentTarget.checked;\n if (isPaid) {\n setValue(\n `payments.${index}.paymentDate`,\n getValues(`payments.${index}.paymentDueDate`)\n );\n } else {\n resetField(`payments.${index}.paymentDate`);\n }\n onChange(e);\n }}\n {...field}\n />\n )}\n />\n \n \n (\n {\n setValue(field.name, d);\n }}\n />\n )}\n />\n \n \n (\n \n )}\n />\n \n \n ))}\n \n \n );\n return (\n
    \n {table}\n {formState.errors.payments && (\n \n \n \n )}\n
    \n );\n}\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport const InputRowAmount = styled.div`\n flex-wrap: nowrap;\n display: flex;\n column-gap: ${() => vars.spacing.m};\n align-items: center;\n div:nth-child(2) {\n flex-grow: 1;\n }\n`;\n\nexport const Divider = styled.div`\n border-bottom: 1px solid ${(props) => props.theme.colors.borderPrimary};\n width: 100%;\n padding-bottom: ${() => vars.spacing.lg};\n`;\n\nexport const SwitchContainer = styled.span`\n label {\n width: ${() => vars.spacing.xl};\n }\n`;\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\n// XXX: Use this instead of `theme.media.tablet` because theme breakpoints are exclusive.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst tabletBreakPoint = ({ theme }: { theme: any }) =>\n `min-width: ${theme.media.breakpoints.md}px`;\n\nexport const InputGrid = styled.div`\n display: grid;\n grid-template-columns: 1fr;\n column-gap: ${() => vars.spacing.m};\n\n label {\n width: 100%;\n }\n\n .DayPickerInput input {\n // fixes overflow issue on smaller screen sizes\n width: 120px;\n }\n\n @media only screen and (${tabletBreakPoint}) {\n grid-template-columns: 1fr 1fr;\n }\n`;\n\nexport const InputRow = styled.div`\n display: flex;\n column-gap: ${() => vars.spacing.m};\n align-items: baseline;\n flex-wrap: wrap;\n`;\n\nexport const InputRowAmount = styled(InputRow)`\n flex-wrap: nowrap;\n\n div:nth-child(2) {\n flex-grow: 1;\n }\n`;\n\nexport const FullWidthSelectionInputContainer = styled.div`\n div.full-width {\n max-width: 100%;\n width: 100%;\n .value-selected {\n position: absolute;\n width: 80%;\n text-align: left;\n }\n }\n`;\n\nexport const InputRowSide = styled.div`\n width: 100%;\n @media only screen and (${tabletBreakPoint}) {\n width: initial;\n flex-grow: 1;\n }\n`;\n","import {\n Controller,\n UseFieldArrayReturn,\n UseFormReturn,\n} from 'react-hook-form';\nimport { CurrencyFilterSelector } from 'src/components/Selectors/CurrencyFilterSelector';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { Switch } from 'src/core/interim/Switch';\nimport { DatePickerInput } from 'src/core/POS/DateSelector';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport {\n FieldError,\n FieldLabel,\n FieldWrapper,\n PurchasePaymentMethodSelectionInput,\n} from 'src/modals/common/Purchase';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getLocaleFromLanguageOrCurrent } from 'src/utils/localeUtils';\nimport { Feature } from 'src/WebApiController';\n\nimport * as styles from './AddPurchasePaymentTiles.css';\nimport {\n Divider,\n InputRowAmount,\n SwitchContainer,\n} from './AddPurchasePaymentTiles.styled';\nimport { FullWidthSelectionInputContainer } from './GeneratePurchasePaymentsForm.styled';\n\nexport type AddPurchasePaymentTilesFieldValues = {\n payments: {\n currencyCode: string;\n paymentAmount?: number;\n isPaid: boolean;\n paymentDueDate?: Date;\n paymentDate?: Date;\n paymentMethodId?: number;\n }[];\n};\n\nexport type AddPurchasePaymentTilesProps = {\n form: UseFormReturn;\n fieldArray: UseFieldArrayReturn<\n AddPurchasePaymentTilesFieldValues,\n 'payments',\n 'id'\n >;\n};\n\nexport function AddPurchasePaymentTiles({\n form: {\n control,\n formState,\n resetField,\n setValue,\n getValues,\n getFieldState,\n clearErrors,\n watch,\n register,\n },\n fieldArray: { fields },\n}: AddPurchasePaymentTilesProps) {\n const requiredMsg = useContent(ContentId.Required);\n const { getUiCurrency } = useLocalizationContext();\n\n const hasEnforcePurchasePaymentCurrencyFeature = useUserHasFeature(\n Feature.EnforcePurchasePaymentCurrency\n );\n\n return (\n
    \n {fields.map((field, index) => (\n
    \n \n \n \n \n \n {!hasEnforcePurchasePaymentCurrencyFeature && (\n (\n \n )}\n />\n )}\n {\n return parseFloat(fieldVal?.toString() ?? '')\n ? undefined\n : requiredMsg;\n },\n },\n valueAsNumber: true,\n onChange: ({ target: { value } }) => {\n clearErrors(`payments.${index}.paymentAmount`);\n setValue(\n `payments.${index}.paymentAmount`,\n parseFloat(value)\n );\n },\n })}\n />\n \n \n \n \n \n \n (\n {\n setValue(field.name, d);\n }}\n />\n )}\n />\n \n \n \n \n \n (\n \n {\n const isPaid = e.currentTarget.checked;\n if (isPaid) {\n setValue(\n `payments.${index}.paymentDate`,\n getValues(`payments.${index}.paymentDueDate`)\n );\n } else {\n resetField(`payments.${index}.paymentDate`);\n }\n onChange(e);\n }}\n {...field}\n />\n \n )}\n />\n \n \n \n \n \n (\n {\n setValue(field.name, d);\n }}\n />\n )}\n />\n \n \n \n \n \n \n (\n \n )}\n />\n \n \n \n
    \n ))}\n {formState.errors.payments && (\n \n \n \n )}\n
    \n );\n}\n","import { uniq } from 'lodash-es';\nimport { Controller, useForm, UseFormReturn } from 'react-hook-form';\nimport { CurrencyFilterSelector } from 'src/components/Selectors/CurrencyFilterSelector';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { DatePickerInput } from 'src/core/POS/DateSelector';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosSelect } from 'src/core/POS/PosSelect';\nimport { getTextFieldState, PosTextField } from 'src/core/POS/PosTextField';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport {\n FieldError,\n FieldLabel,\n FieldWrapper,\n PurchasePaymentMethodSelectionInput,\n} from 'src/modals/common/Purchase';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getLocaleFromLanguageOrCurrent } from 'src/utils/localeUtils';\nimport { Feature } from 'src/WebApiController';\n\nimport {\n FullWidthSelectionInputContainer,\n InputGrid,\n InputRow,\n InputRowAmount,\n InputRowSide,\n} from './GeneratePurchasePaymentsForm.styled';\n\nexport type GeneratePurchasePaymentsFieldValues = {\n fromDate: Date;\n toDate: Date;\n paymentCount: number;\n currencyCode: string;\n paymentAmountType: 'occurrence' | 'total';\n paymentAmount: number;\n paymentMethodId: number;\n};\n\nexport type GeneratePurchasePaymentsFormProps = {\n form: UseFormReturn;\n};\n\nexport function GeneratePurchasePaymentsForm({\n form: {\n control,\n formState: { errors },\n register,\n watch,\n setValue,\n },\n}: GeneratePurchasePaymentsFormProps) {\n const hasEnforcePurchasePaymentCurrencyFeature = useUserHasFeature(\n Feature.EnforcePurchasePaymentCurrency\n );\n\n const requiredMsg = useContent(ContentId.Required);\n const occurrenceText = useContent(ContentId.PerPayment);\n const totalText = useContent(ContentId.Total);\n\n const paymentAmount = watch('paymentAmount');\n const currencyCode = watch('currencyCode');\n const { getUiCurrency } = useLocalizationContext();\n\n return (\n <>\n \n \n \n \n \n (\n {\n setValue(field.name, d);\n }}\n />\n )}\n />\n {errors.fromDate && (\n {errors.fromDate?.message}\n )}\n \n \n \n \n \n (\n {\n setValue(field.name, d);\n }}\n />\n )}\n />\n {errors.toDate && {errors.toDate?.message}}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n (\n \n )}\n />\n \n \n \n \n \n \n \n \n \n \n {!hasEnforcePurchasePaymentCurrencyFeature && (\n (\n \n )}\n />\n )}\n {\n return parseFloat(fieldVal?.toString() ?? '')\n ? undefined\n : requiredMsg;\n },\n },\n valueAsNumber: true,\n })}\n />\n \n {(errors.currencyCode || errors.paymentAmount) &&\n uniq([\n errors.currencyCode?.message,\n errors.paymentAmount?.message,\n ])\n .filter((msg) => Boolean(msg))\n .map((msg) => {\n return {msg};\n })}\n \n \n \n \n \n \n \n (\n \n )}\n />\n \n {errors.paymentMethodId && (\n {errors.paymentMethodId?.message}\n )}\n \n \n \n );\n}\n\nexport function useGeneratePurchasePaymentsForm({\n defaultCurrencyCode,\n}: {\n defaultCurrencyCode: string;\n}) {\n return useForm({\n defaultValues: {\n currencyCode: defaultCurrencyCode,\n paymentAmountType: 'occurrence',\n },\n });\n}\n","import { ComponentProps, useCallback, useState } from 'react';\nimport { useFieldArray, useForm } from 'react-hook-form';\nimport { CancelButton } from 'src/components/Buttons';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { Radio, RadioGroup, Stack } from 'src/core/ui';\nimport { Button } from 'src/core/ui';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { divideDateInterval } from 'src/utils/dateTimeUtils';\nimport { newBigIntId } from 'src/utils/idUtils';\nimport {\n PurchasePayment,\n PurchasePaymentMethodType,\n PurchasePaymentStatus,\n UiMoney,\n} from 'src/WebApiController';\n\nimport { TableOverflowWrapper } from './AddPurchasePaymentDialog.styled';\nimport {\n AddPurchasePaymentTable,\n AddPurchasePaymentTableFieldValues,\n} from './components/AddPurchasePaymentTable';\nimport { AddPurchasePaymentTiles } from './components/AddPurchasePaymentTiles';\nimport {\n GeneratePurchasePaymentsForm,\n useGeneratePurchasePaymentsForm,\n} from './components/GeneratePurchasePaymentsForm';\n\nexport type AddPurchasePaymentDialogProps = Omit<\n ComponentProps,\n 'header' | 'footer'\n> & {\n defaultCurrencyCode: string;\n onSave: (data: PurchasePayment[]) => void;\n onCancel: () => void;\n};\n\nexport function AddPurchasePaymentDialog({\n defaultCurrencyCode,\n onSave,\n onCancel,\n ...genericDialogProps\n}: AddPurchasePaymentDialogProps) {\n const { getUiCurrency } = useLocalizationContext();\n\n const requiredMsg = useContent(ContentId.Required);\n const [isSinglePayment, setIsSinglePayment] = useState(true);\n const getDefaultSinglePaymentStore = () => ({\n currencyCode: defaultCurrencyCode,\n isPaid: true,\n });\n const getDefaultMultiplePaymentsStore = () => [];\n const [singlePaymentStore, setSinglePaymentStore] = useState(\n getDefaultSinglePaymentStore()\n );\n const [multiplePaymentsStore, setMultiplePaymentsStore] = useState<\n AddPurchasePaymentTableFieldValues['payments']\n >(getDefaultMultiplePaymentsStore());\n\n const paymentsTableForm = useForm({\n defaultValues: {\n payments: [singlePaymentStore],\n },\n });\n const paymentsTableFieldArray = useFieldArray({\n control: paymentsTableForm.control,\n name: 'payments',\n });\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const paymentsTableFormOnSubmit = useCallback(\n paymentsTableForm.handleSubmit((data) => {\n const payments = [];\n for (let i = 0; i < data.payments.length; i++) {\n const payment = data.payments[i];\n if (payment.paymentDueDate === undefined) {\n paymentsTableForm.setError(`payments.${i}.paymentDueDate`, {\n message: requiredMsg,\n });\n return;\n }\n const paymentStatus = payment.isPaid\n ? payment.paymentDate && payment.paymentDate > payment.paymentDueDate\n ? PurchasePaymentStatus.RefundNeeded\n : PurchasePaymentStatus.Paid\n : PurchasePaymentStatus.Unpaid;\n\n const uiCurrency = getUiCurrency(payment.currencyCode);\n\n payments.push({\n paymentId: newBigIntId(),\n paymentStatus: paymentStatus,\n paymentDueDate: payment.paymentDueDate.toISOString(),\n paymentDate: payment.paymentDate?.toISOString() ?? null,\n paymentAmount: {\n amt: Number(payment.paymentAmount),\n disp: null,\n currency: uiCurrency.code,\n dec: uiCurrency.dec,\n } as UiMoney,\n currencyCode: payment.currencyCode,\n paymentMethod: {\n id: payment.paymentMethodId!,\n display: '',\n name: '',\n type: PurchasePaymentMethodType.Other,\n },\n convertedPaymentAmount: null,\n convertedCurrencyCode: null,\n conversionRate: null,\n conversionDate: null,\n conversionUserId: null,\n } as PurchasePayment);\n }\n onSave(payments);\n }),\n []\n );\n\n const generatePaymentsForm = useGeneratePurchasePaymentsForm({\n defaultCurrencyCode,\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const generatePaymentsFormOnSubmit = useCallback(\n generatePaymentsForm.handleSubmit(\n ({\n fromDate,\n toDate,\n paymentCount,\n currencyCode,\n paymentAmountType,\n paymentAmount,\n paymentMethodId,\n }) => {\n const dates = divideDateInterval({ fromDate, toDate }, paymentCount);\n const amounts =\n paymentAmountType === 'occurrence'\n ? []\n : dividePaymentAmount(Number(paymentAmount), paymentCount);\n const payments: AddPurchasePaymentTableFieldValues['payments'] = [];\n for (let i = 0; i < paymentCount; i++) {\n payments.push({\n currencyCode,\n paymentAmount:\n paymentAmountType === 'occurrence' ? paymentAmount : amounts[i],\n isPaid: true,\n paymentDueDate: dates[i],\n paymentDate: dates[i],\n paymentMethodId,\n });\n }\n paymentsTableForm.setValue('payments', payments);\n }\n ),\n []\n );\n\n const state = isSinglePayment\n ? 'singlePayment'\n : paymentsTableForm.getValues('payments').length === 0\n ? 'generatePaymentsForm'\n : 'multiPayment';\n const isMobile = useMatchMedia('mobile');\n return (\n }\n footer={\n <>\n {state === 'multiPayment' && (\n {\n paymentsTableForm.reset({\n payments: getDefaultMultiplePaymentsStore(),\n });\n }}\n >\n \n \n )}\n \n {\n if (state === 'generatePaymentsForm') {\n generatePaymentsFormOnSubmit(e);\n } else {\n paymentsTableFormOnSubmit(e);\n }\n }}\n >\n {state === 'generatePaymentsForm' ? (\n \n ) : (\n \n )}\n \n \n }\n onClosed={() => {\n paymentsTableForm.reset();\n }}\n {...genericDialogProps}\n onCancel={onCancel}\n >\n {\n paymentsTableForm.reset(undefined, { keepValues: true });\n\n const isSinglePayment = value == ContentId.SinglePayment;\n const values = paymentsTableForm.getValues('payments');\n if (isSinglePayment) {\n setMultiplePaymentsStore(values);\n paymentsTableForm.setValue('payments', [singlePaymentStore]);\n } else {\n setSinglePaymentStore(values[0]);\n paymentsTableForm.setValue('payments', multiplePaymentsStore);\n }\n setIsSinglePayment(isSinglePayment);\n }}\n value={\n isSinglePayment ? ContentId.SinglePayment : ContentId.MultiplePayments\n }\n >\n \n }\n />\n }\n />\n \n \n
    \n {state === 'singlePayment' ? (\n \n \n \n ) : state === 'generatePaymentsForm' ? (\n \n ) : (\n <>\n \n {isMobile ? (\n \n ) : (\n \n )}\n \n {\n const payments = paymentsTableForm.getValues('payments');\n const lastPayment = payments[payments.length - 1];\n paymentsTableFieldArray.append({\n currencyCode: lastPayment?.currencyCode ?? defaultCurrencyCode,\n isPaid: true,\n paymentMethodId: lastPayment?.paymentMethodId,\n });\n }}\n >\n \n \n \n )}\n \n );\n}\n\n/**\n * Divides the `totalAmount` into `paymentCount` number of occurrence amounts. If the amount is not\n * evenly divisible, the remainder is added onto the last amount.\n * @param totalAmount\n * @param paymentCount\n */\nfunction dividePaymentAmount(totalAmount: number, paymentCount: number) {\n const perOccurrence = Math.round((totalAmount / paymentCount) * 100) / 100;\n const amounts = [];\n for (let i = 0; i < paymentCount - 1; i++) {\n amounts.push(perOccurrence);\n totalAmount -= perOccurrence;\n }\n // floating point arithmetic issues so we round again\n // TODO would be better to use a currency math library to avoid this issue\n amounts.push(Math.round(totalAmount * 100) / 100);\n return amounts;\n}\n","import { ComponentProps, useCallback, useContext } from 'react';\nimport { CancelButton } from 'src/components/Buttons';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { ModalProps } from 'src/modals/Modal';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nexport const BackToModalButton = ({\n textContentId,\n cancelTo,\n ...rest\n}: { textContentId?: ContentId } & Omit<\n ComponentProps,\n 'onClick'\n> & {\n cancelTo?: ModalProps;\n }) => {\n const { setModal, closeModal } = useContext(ModalContext);\n /**\n * Allow a modal 'config' (`Modal` component props) to determine\n * Which modal to go back to in the workflow\n * If nothing is provided, treat as a close button\n */\n const onCancel = useCallback(() => {\n if (cancelTo) {\n setModal(cancelTo);\n } else {\n closeModal();\n }\n }, [setModal, closeModal, cancelTo]);\n\n return (\n \n );\n};\n","import { Content } from 'src/contexts/ContentContext';\nimport {\n ConfirmDialog,\n ConfirmDialogProps,\n} from 'src/core/interim/dialogs/ConfirmDialog';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nexport type UnsavedChangesProps = Omit<\n ConfirmDialogProps,\n 'headerText' | 'bodyText'\n>;\nexport const UnsavedChanges = ({\n onOkay,\n onCancel,\n ...props\n}: UnsavedChangesProps) => {\n return (\n }\n bodyText={}\n onOkay={onOkay}\n onCancel={onCancel}\n okText={ContentId.Yes}\n cancelText={ContentId.No}\n {...props}\n />\n );\n};\n","import {\n ComponentProps,\n PropsWithChildren,\n useCallback,\n useContext,\n useState,\n} from 'react';\nimport { CancelButton } from 'src/components/Buttons';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { UnsavedChanges } from 'src/dialogs/UnsavedChanges';\nimport { ModalProps } from 'src/modals/Modal';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nexport type CancellableFormFooterProps = PropsWithChildren<\n {\n cancelTo?: ModalProps;\n onBeforeClose?: () => void;\n showDialogOnCancel?: boolean;\n } & ComponentProps\n>;\n\nexport function CancellableFormFooter({\n cancelTo,\n children, // action button\n showDialogOnCancel,\n onBeforeClose,\n ...props\n}: PropsWithChildren) {\n const [showDialog, setShowDialog] = useState(false);\n const { setModal, closeModal } = useContext(ModalContext);\n\n /**\n * Allow a modal 'config' (`Modal` component props) to determine\n * Which modal to go back to in the workflow\n * If nothing is provided, treat as a close button\n */\n const goToCancelView = useCallback(() => {\n setShowDialog(false);\n\n onBeforeClose?.();\n\n if (cancelTo) {\n setModal(cancelTo);\n } else {\n closeModal(true);\n }\n }, [onBeforeClose, cancelTo, setModal, closeModal]);\n\n const onCancel = useCallback(() => {\n if (showDialogOnCancel) {\n setShowDialog(true);\n } else {\n goToCancelView();\n }\n }, [showDialogOnCancel, goToCancelView]);\n\n const closeDialog = useCallback(() => {\n setShowDialog(false);\n }, [setShowDialog]);\n\n return (\n <>\n \n {children}\n \n \n );\n}\n","import { ComponentProps, PropsWithChildren, useContext } from 'react';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { Button } from 'src/core/ui';\n\nexport function CloseModalButton({\n children,\n ...props\n}: PropsWithChildren>) {\n const { closeModal } = useContext(ModalContext);\n\n return (\n \n );\n}\n","import clsx from 'clsx';\nimport type { ReactNode } from 'react';\nimport { ComponentPropsWithoutRef } from 'react';\n\nimport * as styles from './Detail.css';\n\nexport const Detail = ({\n label,\n detail,\n isStrong,\n isRightAligned,\n ...rest\n}: {\n label: string | ReactNode;\n detail: string | ReactNode;\n isStrong?: boolean;\n isRightAligned?: boolean;\n} & ComponentPropsWithoutRef<'div'>) => {\n return (\n \n {label}\n \n {detail}\n \n \n );\n};\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport const SectionWrapper = styled.div`\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n\n > * {\n flex: 1;\n }\n`;\n\nexport const SectionContent = styled.div<{\n numOfColumns?: number;\n format?: string;\n}>`\n display: grid;\n align-items: start;\n grid-template-columns: ${({ format, numOfColumns }) =>\n format ? format : `repeat(${numOfColumns ?? 4}, auto)`};\n row-gap: ${() => vars.spacing.lg};\n column-gap: ${() => vars.spacing.m};\n & + & {\n margin-top: ${() => vars.spacing.lg};\n }\n`;\n\nexport const DetailGroup = styled.div<{ isDouble?: boolean }>`\n display: flex;\n flex-direction: column;\n gap: ${() => vars.spacing.xl};\n\n grid-column: ${({ isDouble }) => (isDouble ? 'span 2' : '')};\n\n & > div:last-child {\n padding-bottom: 0;\n }\n`;\n\nexport const AttrLabel = styled.span`\n font-weight: 400;\n font-size: ${() => vars.typography.fontSize['xs']};\n line-height: 16px;\n color: ${(props) => props.theme.colors.textPrimary};\n text-transform: capitalize;\n\n ${({ theme: { media } }) =>\n `${media.makeMediaQuery(\n media.breakpoints.md,\n `\n font-size: ${() => vars.typography.fontSize['sm']};\n line-height: 20px;\n }`\n )}`}\n`;\n\nexport const DetailText = styled.div`\n color: ${(props) => props.theme.colors.textDarker};\n ${(props) => props.theme.typography.getStyles('body2', 'regular')}\n`;\n","import clsx from 'clsx';\nimport { PropsWithChildren, ReactNode } from 'react';\nimport { Stack } from 'src/core/ui';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\n\nimport * as styles from './DetailSection.css';\n\nexport const DetailSection = ({\n name,\n children,\n extraContent,\n fullHeight,\n className,\n}: PropsWithChildren<{\n name: ReactNode;\n extraContent?: ReactNode;\n fullHeight?: boolean;\n className?: string;\n}>) => {\n const isMobile = useMatchMedia('mobile');\n return (\n \n \n \n {name}\n \n \n {children}\n \n \n {extraContent}\n \n );\n};\n","import { getContent, IContentContext } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport {\n AccessibilityIcon,\n AisleSeatIcon,\n GenericDisclosuresIcon,\n IconsFill,\n ObstructedViewIcon,\n ParkingPassIcon,\n} from 'src/svgs/Viagogo';\nimport { ListingNote, ListingNoteType } from 'src/WebApiController';\n\nimport { LISTING_NOTE_TYPE_TO_CID } from './constants/contentIdMaps';\n\nexport const getListingNoteIcon = (\n note: ListingNote,\n contentContext: IContentContext,\n showTypeInfo = false\n) => {\n const listingNoteTypeText = getContent(\n note.type ? LISTING_NOTE_TYPE_TO_CID[note.type] : '',\n contentContext\n );\n const listNoteText = (note.listingNoteUntranslated || note.listingNoteText)\n .trim()\n .toLocaleLowerCase();\n\n const fill = showTypeInfo\n ? note.type === ListingNoteType.Defect\n ? IconsFill.textNegative\n : note.type === ListingNoteType.Perk\n ? IconsFill.textSuccess\n : note.type === ListingNoteType.RestrictionOnUse\n ? IconsFill.textWarning\n : IconsFill.currentColor\n : undefined;\n\n const iconProps = {\n size: vars.iconSize.s,\n fill: fill,\n title: listingNoteTypeText,\n };\n\n if (listNoteText.includes('aisle')) {\n return ;\n }\n\n if (listNoteText.includes('parking')) {\n return ;\n }\n\n if (listNoteText.includes('wheelchair')) {\n return ;\n }\n\n if (\n listNoteText.includes('view') &&\n ['limited', 'obstructed', 'side', 'rear', 'partial'].findIndex((x) =>\n listNoteText.includes(x)\n ) > 0\n ) {\n return ;\n }\n\n return ;\n};\n","import { useQuery, UseQueryResult } from '@tanstack/react-query';\nimport { ReactNode, useMemo } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useContentContext } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getListingNoteIcon } from 'src/utils/listingNotesUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { Feature, ListingNote, ListingNoteClient } from 'src/WebApiController';\n\nimport { MultiSelectDropBoxWithPillsProps } from '../../../core/POS/MultiSelectDropBoxWithPills';\n\nexport type UseListingNotesSelectorOptions = {\n disabled?: boolean;\n additionalOptions?: Record;\n additionalOptionsPosition?: 'top' | 'bottom';\n validListingNoteIds?: number[] | null;\n placeholderText?: string;\n};\n\nexport const useListingNotesSelector = ({\n disabled,\n additionalOptions,\n additionalOptionsPosition = 'bottom',\n validListingNoteIds,\n placeholderText = ContentId.ChooseSeatingNotes,\n}: UseListingNotesSelectorOptions): {\n query: UseQueryResult;\n multiSelectorProps: Pick<\n MultiSelectDropBoxWithPillsProps,\n | 'searchable'\n | 'allowSearchAsInput'\n | 'placeholderText'\n | 'valueOptionsContent'\n | 'valueOptionsIcon'\n >;\n} => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n\n const shouldQuery =\n !disabled && activeAccountWebClientConfig.activeAccountId != null;\n\n const query = useQuery({\n queryKey: [\n 'getAccessibleListingNotes',\n activeAccountWebClientConfig.activeAccountId,\n ],\n queryFn: async () => {\n if (!shouldQuery) {\n return null;\n }\n return tryInvokeApi(\n () => {\n return new ListingNoteClient(\n activeAccountWebClientConfig\n ).getAccessibleListingNotes();\n },\n (error) => {\n trackError('ListingNoteClient.getAccessibleListingNotes', error);\n }\n );\n },\n\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n meta: {\n persist: false, // we do not want this thing persisted between sessions\n },\n });\n\n const hasAdditionalInfoFeature = useUserHasFeature(\n Feature.ListingNotesAdditionalInfo\n );\n const availableNotes = useMemo(() => {\n const dataSorted =\n query.data?.toSorted((a, b) => {\n return a.listingNoteText.localeCompare(b.listingNoteText);\n }) ?? [];\n\n const options: Record = {};\n for (const ln of dataSorted ?? []) {\n if (\n ln.listingNoteText.trim() ||\n ln.listingNoteUntranslated.trim() ||\n (ln.stubhubListingNoteId &&\n validListingNoteIds?.includes(ln.stubhubListingNoteId))\n ) {\n options[ln.listingNoteId] =\n ln.listingNoteText.trim() ||\n ln.listingNoteUntranslated.trim() ||\n ln.stubhubListingNoteId?.toString() ||\n '';\n }\n }\n return {\n ...(additionalOptionsPosition === 'top' ? additionalOptions : {}),\n ...(options ?? {}),\n ...(additionalOptionsPosition === 'bottom' ? additionalOptions : {}),\n };\n }, [\n query.data,\n additionalOptionsPosition,\n additionalOptions,\n validListingNoteIds,\n ]);\n\n const contentContext = useContentContext();\n const noteIcons = useMemo(() => {\n const optionIcons: Record = {};\n for (const ln of query.data ?? []) {\n const icon = getListingNoteIcon(ln, contentContext, true);\n\n optionIcons[ln.listingNoteId] = icon;\n }\n return optionIcons;\n }, [contentContext, query.data]);\n\n return {\n query,\n multiSelectorProps: {\n searchable: true,\n allowSearchAsInput: true,\n placeholderText: placeholderText,\n valueOptionsContent: availableNotes,\n valueOptionsIcon: hasAdditionalInfoFeature ? noteIcons : undefined,\n },\n };\n};\n","import { ScrollAreaProps } from '@radix-ui/react-scroll-area';\nimport { PropsWithChildren } from 'react';\nimport { ScrollArea } from 'src/core/ui';\nimport { ScrollAreaRefActions } from 'src/core/ui/ScrollArea/ScrollArea';\n\nimport * as styles from './ScrollableToolbar.css';\n\nexport function ScrollableToolbar({\n children,\n scrollAreaRefActions,\n ...props\n}: PropsWithChildren & ScrollAreaRefActions) {\n return (\n \n
    {children}
    \n \n );\n}\n","import clsx from 'clsx';\nimport { ReactNode } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { CrossIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { Stack } from '../Stack';\nimport * as styles from './PillList.css';\nexport type PillItemProps = {\n value: string;\n display: ReactNode | ContentId;\n icon?: React.ReactElement;\n disabled?: boolean;\n onPillHover?: (e: React.MouseEvent) => void;\n onPillLeave?: (e: React.MouseEvent) => void;\n onPillClick?: (id: number, e: React.MouseEvent) => void;\n onDelete?: () => void;\n postfixItem?: React.ReactNode;\n customPillContainer?: string;\n useCondensedBorders?: boolean;\n};\n\nexport const PillItem = ({\n value,\n display,\n icon,\n disabled,\n onPillHover,\n onPillLeave,\n onPillClick,\n onDelete,\n postfixItem,\n customPillContainer,\n useCondensedBorders,\n}: PillItemProps) => {\n return (\n onPillClick && onPillClick(parseInt(value ?? '0'), e)}\n >\n \n {icon}\n \n {postfixItem}\n \n {!disabled && (\n
    \n \n
    \n )}\n \n );\n};\n","import { ComponentProps } from 'react';\n\nimport { ScrollableToolbar } from '../ScrollableToolbar';\nimport { Stack } from '../Stack';\nimport { PillItem, PillItemProps } from './PillItem';\n\nexport const PillList = ({\n pills,\n disabled,\n condensed,\n scrollButtonClassName,\n onPillHover,\n onPillLeave,\n onPillClick,\n onPillDeleted,\n direction = 'row',\n flexWrap,\n}: {\n pills: PillItemProps[];\n condensed?: boolean;\n disabled?: boolean;\n scrollButtonClassName?: Record<'up' | 'down' | 'left' | 'right', string>;\n onPillHover?: (e: React.MouseEvent) => void;\n onPillLeave?: (e: React.MouseEvent) => void;\n onPillClick?: (id: number, e: React.MouseEvent) => void;\n onPillDeleted?: (key: string) => void;\n} & Pick, 'flexWrap' | 'direction'>) => {\n return (\n \n \n {pills.map((pill, i) => {\n return (\n {\n onPillDeleted?.(pill.value);\n pill.onDelete?.();\n }}\n />\n );\n })}\n \n \n );\n};\n","import { ComponentProps, useMemo } from 'react';\nimport { getContent, useContentContext } from 'src/contexts/ContentContext';\nimport { PosMultiSelect } from 'src/core/POS/PosMultiSelect';\nimport { Stack } from 'src/core/ui';\nimport { PillList } from 'src/core/ui/PillList';\nimport { PillItemProps } from 'src/core/ui/PillList/PillItem';\n\nimport * as styles from './MultiSelectDropBoxWithPills.css';\n\nexport type MultiSelectDropBoxWithPillsProps = ComponentProps<\n typeof PosMultiSelect\n> &\n Pick, 'flexWrap' | 'direction'> & {\n showPills?: boolean;\n };\n\nexport const MultiSelectDropBoxWithPills = ({\n values,\n valueOptionsContent,\n valueOptionsIcon,\n disabled,\n onChange,\n align,\n fullWidth,\n direction: pillsDirection = 'row',\n flexWrap: pillsFlexWrap,\n showPills = true,\n ...rest\n}: MultiSelectDropBoxWithPillsProps) => {\n const contentContext = useContentContext();\n const pills = useMemo(\n () =>\n values.map((v) => {\n const valueDisplay = valueOptionsContent[v];\n const valueContentDisplay = getContent(valueDisplay, contentContext);\n const valueIcon = valueOptionsIcon?.[v];\n\n return {\n value: v,\n display: valueContentDisplay || v,\n icon: valueIcon,\n } as PillItemProps;\n }),\n [values, valueOptionsContent, contentContext, valueOptionsIcon]\n );\n\n return (\n
    \n \n {showPills && pills.length > 0 && (\n
    \n \n onChange?.(values.filter((v) => v !== value))\n }\n direction={pillsDirection}\n flexWrap={pillsFlexWrap}\n />\n
    \n )}\n
    \n );\n};\n","import { ComponentProps, useCallback, useMemo } from 'react';\nimport { useListingNotesSelector } from 'src/components/Selectors/ListingNotesSelector/useListingNotesSelector';\nimport { MultiSelectDropBoxWithPills } from 'src/core/POS/MultiSelectDropBoxWithPills';\nimport { newIntId } from 'src/utils/idUtils';\nimport { ListingNote, ListingNoteType } from 'src/WebApiController';\n\nexport type ListingNoteSelectionInputProps = {\n listingNotes: ListingNote[] | null;\n validListingNoteIds?: number[] | null;\n onChange: (listingNotes: ListingNote[]) => void;\n} & Omit<\n ComponentProps,\n 'values' | 'onChange' | 'valueOptionsContent'\n>;\n\nexport const ListingNoteSelectionInput = ({\n disabled,\n listingNotes,\n validListingNoteIds,\n placeholderText,\n onChange,\n showPills = true,\n ...multiSelectorProps\n}: ListingNoteSelectionInputProps) => {\n const { query, multiSelectorProps: hookMultiSelectorProps } =\n useListingNotesSelector({\n disabled,\n validListingNoteIds,\n placeholderText,\n });\n\n const listingNotesMap = useMemo(\n () =>\n query.data\n ?.filter((l) => (l.listingNoteText || l.listingNoteUntranslated).trim())\n .reduce(\n (r, l) => {\n r[l.listingNoteId.toString()] = l;\n return r;\n },\n {} as Record\n ),\n [query.data]\n );\n\n const onSelectionChanged = useCallback(\n (lnIds: string[], searchText?: string | null) => {\n if (!listingNotesMap) {\n return;\n }\n\n const newListingNotes = lnIds.map((lnId) => {\n const listingNoteId = parseInt(lnId);\n return listingNotesMap[listingNoteId];\n });\n\n if (searchText) {\n newListingNotes.push({\n listingNoteId: newIntId(),\n listingNoteText: searchText,\n listingNoteUntranslated: searchText,\n sellerAccountId: null, // this gets filled in the backend\n stubhubListingNoteId: null,\n type: ListingNoteType.Information,\n });\n }\n\n onChange(newListingNotes);\n },\n [listingNotesMap, onChange]\n );\n\n return (\n l != null)\n .map((l) => {\n const listingNote = listingNotesMap?.[l.listingNoteId];\n if (listingNote) {\n return l.listingNoteId.toString();\n }\n\n return l.listingNoteText || l.listingNoteUntranslated;\n })}\n onChange={onSelectionChanged}\n />\n );\n};\n","import clsx from 'clsx';\nimport { FormatContent } from 'src/contexts/ContentContext';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\n\nimport * as styles from './HorizontalTextList.css';\n\nexport function HorizontalTextList({\n className,\n texts,\n preIcon: prefix,\n maxTextsToShow: textCountToShow = 1,\n maxTextsToShowOnHover: textCountToShowTitle = 1,\n}: {\n className?: string;\n texts: string[];\n preIcon?: JSX.Element;\n maxTextsToShow?: number;\n maxTextsToShowOnHover?: number;\n}) {\n const textToDisplay = texts.slice(0, textCountToShow).join(', ');\n const titleTextToDisplay = texts.slice(0, textCountToShowTitle).join(', ');\n return (\n \n {prefix && (\n
    \n {prefix}\n
    \n )}\n
    \n {textToDisplay}\n
    \n {texts.length > textCountToShow && (\n
    \n \n
    \n )}\n \n );\n}\n","import { useQuery } from '@tanstack/react-query';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport {\n EventConfigClient,\n EventListingConstraints,\n} from 'src/WebApiController';\n\nexport const useGetEventListingConstraints = (eventIds: number[]) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n\n const query = useQuery({\n queryKey: ['EventConfigClient.getListingConstraintsForEvents', eventIds],\n queryFn: async () => {\n if (!eventIds.length) {\n return null;\n }\n const results = await new EventConfigClient(\n activeAccountWebClientConfig\n ).getListingConstraintsForEvents(eventIds);\n\n if (results) {\n return results.reduce(\n (r, c) => {\n r[c.eventId] = c;\n return r;\n },\n {} as Record\n );\n }\n\n return null;\n },\n\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError('EventConfigClient.getListingConstraintsForEvents', error, {\n trackErrorData: {\n eventIds,\n },\n });\n },\n },\n });\n\n return {\n eventListingConstraintsQuery: query,\n };\n};\n","import { ComponentProps, forwardRef, ReactElement } from 'react';\nimport { TextArea } from 'src/core/ui';\n\nexport type PosTextAreaProps = ComponentProps & {\n rootProps?: Omit, 'children'>;\n};\n\nexport const PosTextArea = forwardRef(\n function PosTextArea({ rootProps, ...rest }, ref): ReactElement {\n return (\n \n \n \n );\n }\n);\n","import { Label } from '@radix-ui/react-label';\nimport clsx from 'clsx';\nimport { useEffect, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useToggle } from 'react-use';\nimport { CancelButton } from 'src/components/Buttons';\nimport { OkButton } from 'src/components/Buttons/OkButton';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosDropdown, PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { PosTextArea } from 'src/core/POS/PosTextArea';\nimport { typography } from 'src/core/themes/shared.css';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { Modal, ModalBody, ModalFooter, ModalHeader } from '../Modal';\nimport * as styles from './AddNote.css';\n\ntype AddNoteModalProps = {\n onClose: () => void;\n onSubmit: () => void;\n internalNotes?: string | null;\n onInternalNotesChanged?: (notes?: string | null) => void;\n};\n\nexport const AddInternalNoteModal = ({\n onSubmit,\n onClose,\n internalNotes,\n onInternalNotesChanged,\n}: AddNoteModalProps) => {\n const [isOpen, toggleIsOpen] = useToggle(true);\n\n const [note, setNote] = useState(internalNotes ?? '');\n\n const onSubmitHandler = () => {\n onInternalNotesChanged?.(note);\n onSubmit();\n };\n\n useEffect(() => {\n if (!isOpen) setTimeout(onClose, 300);\n }, [isOpen, onClose]);\n\n return (\n \n );\n};\n\nexport const AddAdminHoldNoteModal = ({\n onSubmit,\n onClose,\n}: Omit) => {\n const [isOpen, toggleIsOpen] = useToggle(true);\n const { watch, setValue } = useFormContext<{\n adminHoldNotes?: string | null;\n }>();\n const adminHoldNotes = watch('adminHoldNotes');\n const [note, setNote] = useState(adminHoldNotes ?? '');\n\n const onSubmitHandler = () => {\n setValue('adminHoldNotes', note, { shouldDirty: true });\n onSubmit();\n };\n\n useEffect(() => {\n if (!isOpen) setTimeout(onClose, 300);\n }, [isOpen, onClose]);\n\n return (\n \n );\n};\n\ntype AddNoteDisplayProps = {\n isOpen: boolean;\n toggleIsOpen: () => void;\n note: string;\n setNote: (note: string) => void;\n onSubmitHandler: () => void;\n showVisibility?: boolean;\n};\n\nconst AddNoteDisplay = ({\n isOpen,\n toggleIsOpen,\n note,\n setNote,\n onSubmitHandler,\n showVisibility,\n}: AddNoteDisplayProps) => {\n return (\n \n \n
    \n
    \n \n
    \n
    \n
    \n \n {showVisibility && (\n
    \n \n \n \n \n }\n >\n \n \n \n \n
    \n )}\n
    \n \n setNote(e.currentTarget.value)}\n value={note}\n />\n
    \n
    \n \n \n \n \n \n );\n};\n","import { useToggle } from 'react-use';\nimport { ListingNoteSelectionInput } from 'src/components/Input/ListingNoteSelectionInput';\nimport { Content, useContentContext } from 'src/contexts/ContentContext';\nimport { HorizontalTextList } from 'src/core/POS/HorizontalTextList';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { useGetEventListingConstraints } from 'src/hooks/useGetEventListingConstraints';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { AddInternalNoteModal } from 'src/modals/AddNote';\nimport { EditIcon, IconsFill, PlusIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getListingNoteIcon } from 'src/utils/listingNotesUtils';\nimport {\n Event,\n Feature,\n ListingDetailsUpdateInput,\n ListingNote,\n SaleInput,\n} from 'src/WebApiController';\n\nimport { Detail } from '../Detail';\nimport * as styles from './ListingNotesSection.css';\n\nexport type InternalNotesFormKey =\n | 'privateNotes.value'\n | keyof Pick;\n\nexport type ListingNotesFormKey = keyof Pick<\n ListingDetailsUpdateInput,\n 'seatTraits'\n>;\n\nexport const ListingNotesSection = ({\n listingNotes,\n internalNotes,\n disabled,\n event,\n allowEditListingNotes,\n onListingNotesChanged,\n onInternalNotesChanged,\n}: {\n disabled?: boolean;\n listingNotes?: ListingNote[] | null;\n internalNotes?: string | null;\n event?: Event;\n allowEditListingNotes?: boolean;\n onListingNotesChanged?: (listingNotes?: ListingNote[] | null) => void;\n onInternalNotesChanged?: (internalNotes?: string | null) => void;\n}) => {\n const [isAddNoteModalOpen, toggleAddNoteModal] = useToggle(false);\n\n const onSubmit = () => {\n toggleAddNoteModal();\n };\n const { eventListingConstraintsQuery } = useGetEventListingConstraints(\n event?.viagId ? [event.viagId] : []\n );\n const validListingNoteIds = event?.viagId\n ? eventListingConstraintsQuery.data?.[event.viagId]?.validListingNoteIds\n : null;\n\n const contentContext = useContentContext();\n const hasListingNotesAdditionalInfoFeature = useUserHasFeature(\n Feature.ListingNotesAdditionalInfo\n );\n\n return (\n <>\n {isAddNoteModalOpen && (\n \n )}\n\n \n {allowEditListingNotes ? (\n }\n detail={\n \n onListingNotesChanged?.(listingNotes)\n }\n />\n }\n />\n ) : (\n listingNotes?.map((n) => (\n \n ))\n )}\n }\n detail={\n \n {internalNotes ? (\n
    \n \n
    \n ) : null}\n \n {internalNotes ? (\n \n ) : (\n \n )}\n \n \n
    \n }\n />\n
    \n \n );\n};\n","import { Fragment, PropsWithChildren, ReactNode } from 'react';\nimport { Stack } from 'src/core/ui';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\n\nimport * as styles from './MultiDetailSection.css';\n\ntype MultiDetailSectionProps = PropsWithChildren<{\n name: ReactNode;\n extraContent: ReactNode[];\n}>;\n\nexport const MultiDetailSection = ({\n name,\n children,\n extraContent,\n}: MultiDetailSectionProps) => {\n const isMobile = useMatchMedia('mobile');\n\n return (\n \n \n \n {name}\n \n \n {children}\n \n \n {extraContent &&\n extraContent.map((content, index) => (\n {content}\n ))}\n \n );\n};\n","import { ComponentProps } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { ModalProps } from 'src/modals/Modal';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport styled from 'styled-components/macro';\n\nimport { BackToModalButton } from './BackToModalButton';\n\ntype NextFooterProps = Omit, 'children'> & {\n cancelTo?: ModalProps | null;\n};\n\nexport const NextFooter = ({ cancelTo, ...props }: NextFooterProps) => {\n return (\n
    \n {cancelTo && (\n \n \n \n )}\n \n
    \n );\n};\n\nconst Footer = styled.div`\n display: flex;\n justify-content: flex-end;\n padding: ${() => `${vars.spacing.lg} 0 0 0`};\n\n > * {\n display: inline-flex;\n align-items: center;\n }\n`;\n\nconst BackBtnWrapper = styled.div`\n margin-right: ${() => vars.spacing.sm};\n`;\n","export const getConversionRate = (numA: number, numbB: number): number => {\n return Number((numA / numbB).toFixed(4));\n};\n","import { ComponentProps, useCallback, useEffect } from 'react';\nimport { useForm } from 'react-hook-form';\nimport { CurrencyFilterSelector } from 'src/components/Selectors/CurrencyFilterSelector';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { FieldWrapper } from 'src/modals/common';\nimport { ChevronRightIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getConversionRate } from 'src/utils/currencyUtils';\nimport { formatCurrency } from 'src/utils/numberFormatter';\nimport { PurchasePayment, UiMoney } from 'src/WebApiController';\n\nimport * as styles from './ConvertCurrencyDialog.css';\n\nexport type CurrencyConversionPayment = Pick<\n PurchasePayment,\n | 'paymentAmount'\n | 'convertedPaymentAmount'\n | 'convertedCurrencyCode'\n | 'conversionRate'\n>;\n\nexport type ConvertCurrencyDialogProps = Omit<\n ComponentProps,\n 'header' | 'footer'\n> & {\n onSave: (formValues: ConvertCurrencyForm) => void;\n onCancel: () => void;\n payment: CurrencyConversionPayment;\n currentUserId: string;\n isLoading?: boolean;\n};\n\nexport type ConvertCurrencyForm = Pick<\n PurchasePayment,\n | 'convertedPaymentAmount'\n | 'convertedCurrencyCode'\n | 'conversionRate'\n | 'conversionDate'\n | 'conversionUserId'\n>;\n\nconst defaultCurrentCode = 'USD';\n\nexport const ConvertCurrencyDialog = ({\n onCancel,\n onSave,\n payment,\n currentUserId,\n isLoading,\n ...dialogProps\n}: ConvertCurrencyDialogProps) => {\n const fxText = useContent(ContentId.FX);\n const requiredMsg = useContent(ContentId.Required);\n const convertedPaymentAmountMustBeGreaterThanZeroMsg = useContent(\n ContentId.ConvertedPaymentAmountMustBeGreaterThanZero\n );\n const conversionRateMustBeGreaterThanZeroMsg = useContent(\n ContentId.ConversionRateMustBeGreaterThanZero\n );\n\n const { getUiCurrency } = useLocalizationContext();\n\n const {\n register,\n setValue,\n getValues,\n watch,\n formState,\n handleSubmit,\n trigger,\n reset,\n } = useForm({\n mode: 'all',\n defaultValues: {\n convertedCurrencyCode:\n payment.convertedPaymentAmount?.currency ??\n payment.convertedCurrencyCode ??\n defaultCurrentCode,\n conversionRate: payment.conversionRate,\n convertedPaymentAmount: payment.convertedPaymentAmount,\n conversionDate: new Date().toISOString(),\n conversionUserId: currentUserId,\n },\n });\n\n useEffect(() => {\n reset({\n convertedCurrencyCode:\n payment.convertedPaymentAmount?.currency ??\n payment.convertedCurrencyCode ??\n defaultCurrentCode,\n conversionRate: payment.conversionRate,\n convertedPaymentAmount: payment.convertedPaymentAmount,\n conversionDate: new Date().toISOString(),\n conversionUserId: currentUserId,\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [payment]);\n\n const convertedCurrencyCode =\n watch('convertedCurrencyCode') ?? defaultCurrentCode;\n const { currency, disp, amt, dec } = payment.paymentAmount;\n\n const onSubmit = useCallback(async () => {\n await trigger();\n const hasErrors = Object.keys(formState.errors).length > 0;\n if (hasErrors) {\n return;\n }\n\n onSave(getValues());\n }, [formState.errors, getValues, onSave, trigger]);\n\n return (\n
    \n }\n footer={\n \n }\n onCancel={onCancel}\n >\n {isLoading ? (\n \n ) : (\n <>\n \n \n \n \n \n \n\n
    \n \n
    \n\n \n \n {\n const v = value ? String(value) : '';\n return !v.length ? requiredMsg : undefined;\n },\n minValue: (value: number | null) => {\n return value && value <= 0\n ? convertedPaymentAmountMustBeGreaterThanZeroMsg\n : undefined;\n },\n },\n setValueAs(convertedAmount): number | null {\n if (\n !convertedAmount ||\n isNaN(Number(convertedAmount))\n ) {\n return null;\n }\n\n return Number(convertedAmount);\n },\n onChange() {\n const convertedAmount =\n getValues().convertedPaymentAmount?.amt;\n if (\n formState.errors['convertedPaymentAmount'] ||\n !convertedAmount\n ) {\n return;\n }\n\n const uiCurrency = getUiCurrency(convertedCurrencyCode);\n setValue('convertedPaymentAmount', {\n currency: convertedCurrencyCode,\n dec: uiCurrency.dec,\n amt: Number(convertedAmount),\n disp: formatCurrency(\n Number(convertedAmount),\n uiCurrency.code,\n uiCurrency.dec\n ),\n });\n\n const conversionRate = getConversionRate(\n Math.abs(convertedAmount),\n Math.abs(payment.paymentAmount.amt)\n );\n if (Number.isFinite(conversionRate)) {\n setValue('conversionRate', conversionRate, {\n shouldValidate: true,\n });\n }\n },\n })}\n type=\"number\"\n prefixDisplay={getUiCurrency(convertedCurrencyCode).sym}\n postfixDisplay={\n {\n setValue('convertedCurrencyCode', currencyCode, {\n shouldValidate: true,\n });\n }}\n />\n }\n />\n \n \n\n \n \n {\n return !value ? requiredMsg : undefined;\n },\n minValue: (value: number | null) => {\n return !value || value <= 0\n ? conversionRateMustBeGreaterThanZeroMsg\n : undefined;\n },\n },\n onChange() {\n const conversionRate = getValues().conversionRate;\n if (\n formState.errors['conversionRate'] ||\n !conversionRate\n ) {\n return;\n }\n\n const convertedAmountAmount =\n payment.paymentAmount.amt * conversionRate;\n\n if (Number.isFinite(convertedAmountAmount)) {\n const uiCurrency = getUiCurrency(\n convertedCurrencyCode\n );\n\n const convertedAmount = {\n currency: convertedCurrencyCode,\n amt: Number(convertedAmountAmount),\n disp: formatCurrency(\n convertedAmountAmount,\n uiCurrency.code,\n uiCurrency.dec\n ),\n };\n\n setValue(\n 'convertedPaymentAmount',\n convertedAmount as UiMoney,\n {\n shouldValidate: true,\n }\n );\n }\n },\n valueAsNumber: true,\n })}\n />\n \n \n
    \n \n )}\n \n \n );\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { uniq } from 'lodash-es';\nimport { ComponentProps, useMemo } from 'react';\nimport { Controller, useForm } from 'react-hook-form';\nimport { Modal as RSModal } from 'reactstrap';\nimport { CancelButton } from 'src/components/Buttons';\nimport { CurrencyFilterSelector } from 'src/components/Selectors/CurrencyFilterSelector';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { Switch } from 'src/core/interim/Switch';\nimport { DatePickerInput } from 'src/core/POS/DateSelector';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { getTextFieldState } from 'src/core/POS/PosTextField';\nimport { Button } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport {\n FieldError,\n FieldLabel,\n FieldWrapper,\n PurchasePaymentMethodSelectionInput,\n} from 'src/modals/common/Purchase';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getLocaleFromLanguageOrCurrent } from 'src/utils/localeUtils';\nimport {\n Feature,\n PurchaseClient,\n PurchasePayment,\n PurchasePaymentMethodType,\n PurchasePaymentStatus,\n} from 'src/WebApiController';\n\nimport * as styles from './EditPurchasePaymentDialog.css';\n\nexport type EditPurchasePaymentDialogFormInputs = {\n paymentDueDate: Date;\n paymentDate: Date | null;\n paymentAmount: number;\n currencyCode: string;\n paymentMethodId: number;\n isPaid: boolean;\n};\n\nexport type EditPurchasePaymentDialogProps = ComponentProps & {\n payment: PurchasePayment;\n onSave: (data: PurchasePayment) => void;\n onCancel: () => void;\n};\n\nexport function EditPurchasePaymentDialog({\n payment,\n onSave,\n onCancel,\n ...rest\n}: EditPurchasePaymentDialogProps) {\n const requiredMsg = useContent(ContentId.Required);\n\n const hasEnforcePurchasePaymentCurrencyFeature = useUserHasFeature(\n Feature.EnforcePurchasePaymentCurrency\n );\n\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n const { getUiCurrency } = useLocalizationContext();\n const paymentMethods = useQuery({\n queryKey: [\n 'PurchaseClient.getAccessiblePurchasePaymentMethods',\n activeAccountWebClientConfig.activeAccountId,\n ],\n queryFn: () => {\n if (activeAccountWebClientConfig.activeAccountId == null) {\n return null;\n }\n return new PurchaseClient(\n activeAccountWebClientConfig\n ).getAccessiblePurchasePaymentMethods();\n },\n\n enabled: activeAccountWebClientConfig.activeAccountId != null,\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError('PurchaseClient.getAccessiblePurchasePaymentMethods', error);\n },\n },\n });\n\n const {\n getValues,\n setValue,\n watch,\n register,\n handleSubmit,\n control,\n formState: { errors },\n } = useForm({\n defaultValues: {\n paymentDueDate: new Date(payment.paymentDueDate),\n paymentDate: payment.paymentDate ? new Date(payment.paymentDate) : null,\n paymentAmount: payment.paymentAmount.amt,\n currencyCode: payment.currencyCode,\n paymentMethodId: payment.paymentMethod.id,\n isPaid:\n payment.paymentStatus === PurchasePaymentStatus.Paid ||\n payment.paymentStatus === PurchasePaymentStatus.RefundNeeded,\n },\n });\n\n const paymentAmount = watch('paymentAmount');\n const currencyCode = watch('currencyCode');\n\n const uiCurrency = useMemo(\n () => getUiCurrency(currencyCode),\n [currencyCode, getUiCurrency]\n );\n\n return (\n }\n footer={\n <>\n {onCancel && }\n {\n const paymentMethod = paymentMethods.data?.find(\n ({ id }) => id === data.paymentMethodId\n );\n const paymentStatus = data.isPaid\n ? payment.paymentDate &&\n payment.paymentDate > payment.paymentDueDate\n ? PurchasePaymentStatus.RefundNeeded\n : PurchasePaymentStatus.Paid\n : PurchasePaymentStatus.Unpaid;\n onSave({\n paymentId: payment.paymentId,\n paymentStatus: paymentStatus,\n paymentDueDate: data.paymentDueDate.toISOString(),\n paymentDate: data.paymentDate?.toISOString() ?? null,\n paymentAmount: {\n amt: Number(data.paymentAmount),\n disp: null,\n currency: uiCurrency.code,\n dec: uiCurrency.dec,\n },\n currencyCode: data.currencyCode,\n paymentMethod: {\n id: data.paymentMethodId,\n display: paymentMethod?.display ?? '',\n name: paymentMethod?.name ?? '',\n type: paymentMethod?.type ?? PurchasePaymentMethodType.Other,\n },\n convertedPaymentAmount: null,\n convertedCurrencyCode: null,\n conversionRate: null,\n conversionDate: null,\n conversionUserId: null,\n });\n })}\n >\n \n \n \n }\n {...rest}\n onCancel={onCancel}\n >\n \n \n \n \n
    \n {!hasEnforcePurchasePaymentCurrencyFeature && (\n (\n \n )}\n />\n )}\n {\n return parseFloat(fieldVal?.toString() ?? '')\n ? undefined\n : requiredMsg;\n },\n },\n valueAsNumber: true,\n })}\n />\n
    \n {(errors.currencyCode || errors.paymentAmount) &&\n uniq([errors.currencyCode?.message, errors.paymentAmount?.message])\n .filter((msg) => Boolean(msg))\n .map((msg, i) => {\n return {msg};\n })}\n
    \n
    \n \n (\n }\n errors={fieldState.error?.message}\n >\n {\n setValue(field.name, d);\n }}\n />\n \n )}\n />\n \n
    \n
    \n \n {\n return (\n }\n errors={fieldState.error?.message}\n >\n {\n setValue(field.name, d);\n }}\n />\n \n );\n }}\n />\n {errors.paymentDate && (\n {errors.paymentDate?.message}\n )}\n \n \n \n \n \n (\n {\n const isPaid = e.currentTarget.checked;\n if (isPaid) {\n setValue('paymentDate', getValues('paymentDueDate'));\n } else {\n setValue('paymentDate', null);\n }\n onChange(e);\n }}\n {...field}\n />\n )}\n />\n \n
    \n \n \n \n \n (\n \n )}\n />\n {errors.paymentMethodId && (\n {errors.paymentMethodId?.message}\n )}\n \n \n );\n}\n","import { ChangeEvent, ComponentProps, useCallback } from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { Modal as RSModal } from 'reactstrap';\nimport { CancelButton } from 'src/components/Buttons';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { DatePickerInput } from 'src/core/POS/DateSelector';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { getTextFieldState, PosTextField } from 'src/core/POS/PosTextField';\nimport { Button } from 'src/core/ui';\nimport {\n FieldError,\n FieldLabel,\n FieldWrapper,\n} from 'src/modals/common/Purchase';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { PURCHASE_COST_TYPE_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { getLocaleFromLanguageOrCurrent } from 'src/utils/localeUtils';\nimport { CostDetail } from 'src/WebApiController';\n\nimport * as styles from './PurchaseCostDialog.css';\n\nexport type PurchaseCostDialogProps = ComponentProps & {\n cost: CostDetail;\n currencyCode: string;\n onSave: (data: CostDetail) => void;\n};\n\nexport function PurchaseCostDialog({ cost, ...rest }: PurchaseCostDialogProps) {\n const methods = useForm({\n defaultValues: {\n ...cost,\n cost: cost?.cost && {\n ...cost.cost,\n disp: null, // we clear the display because editing cost now will dynamically render the amount with the currency\n },\n },\n });\n\n return (\n \n \n \n );\n}\n\nconst PurchaseCostDialogBody = ({\n currencyCode,\n onSave,\n onClosed,\n getValues,\n setValue,\n register,\n formState,\n clearErrors,\n setError,\n handleSubmit,\n watch,\n ...rest\n}: Omit &\n Omit<\n ComponentProps>,\n 'children'\n >) => {\n const { date, id } = getValues();\n const costType = watch('costType');\n const costAmount = watch('cost.amt');\n const costDateError = formState.errors.date?.message;\n const costTypeError = formState.errors.costType?.message;\n const amountError = formState.errors.cost?.amt?.message;\n\n const requiredMsg = useContent(ContentId.Required);\n\n const { getUiCurrency } = useLocalizationContext();\n\n const onSubmit = useCallback(() => {\n clearErrors();\n\n let hasErrors = false;\n if (!date) {\n setError('date', { message: requiredMsg }, { shouldFocus: true });\n hasErrors = true;\n }\n if (!costAmount) {\n setError('cost.amt', { message: requiredMsg }, { shouldFocus: true });\n hasErrors = true;\n }\n if (!costType) {\n setError('costType', { message: requiredMsg }, { shouldFocus: true });\n hasErrors = true;\n }\n\n if (!hasErrors) {\n handleSubmit(onSave)();\n }\n }, [\n clearErrors,\n costAmount,\n costType,\n date,\n handleSubmit,\n onSave,\n requiredMsg,\n setError,\n ]);\n\n return (\n 0 ? ContentId.EditCostCredit : ContentId.AddCostCredit}\n />\n }\n footer={\n <>\n {onClosed && }\n \n \n \n \n }\n onCancel={onClosed}\n >\n
    \n \n \n \n \n {\n if (newCostType && newCostType !== costType) {\n setValue('costType', newCostType);\n }\n }}\n valueOptionsContent={PURCHASE_COST_TYPE_TO_CID}\n />\n {costTypeError && {costTypeError}}\n \n \n }\n >\n {\n return parseFloat(fieldVal?.toString() ?? '')\n ? undefined\n : requiredMsg;\n },\n },\n valueAsNumber: true,\n onChange: (e: ChangeEvent) => {\n const rval = parseFloat(e.target.value);\n clearErrors('cost.amt');\n setValue('cost.disp', null); // Clear the display because now th\n setValue('cost.amt', rval);\n },\n })}\n />\n \n \n \n }\n errors={costDateError}\n >\n {\n if (newDate) {\n clearErrors('date');\n const dateStr = newDate.toISOString();\n if (dateStr !== date) {\n setValue('date', dateStr);\n }\n } else {\n setValue('date', ''); // this allow setting to empty and validating\n }\n }}\n locale={getLocaleFromLanguageOrCurrent()}\n />\n \n \n \n }>\n \n \n \n
    \n \n );\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { DEFAULT_AUTO_GENERATED_PAYMENT_METHOD } from 'src/utils/constants/constants';\nimport { PurchaseClient } from 'src/WebApiController';\n\nexport const useGetDefaultAutoGeneratedPaymentMethod = () => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const shouldQuery = activeAccountWebClientConfig.activeAccountId != null;\n const defaultAutoGeneratedPaymentMethodQuery = useQuery({\n queryKey: [\n 'PurchaseClient.getPurchasePaymentMethodsByName',\n activeAccountWebClientConfig.activeAccountId,\n ],\n queryFn: async () => {\n if (!shouldQuery) {\n return null;\n }\n const response = await new PurchaseClient(\n activeAccountWebClientConfig\n ).getPurchasePaymentMethodsByName(DEFAULT_AUTO_GENERATED_PAYMENT_METHOD);\n\n if (response == null || response.length == 0) {\n return null;\n }\n\n return response[0];\n },\n\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n showErrorDialog(\n 'PurchaseClient.getPurchasePaymentMethodsByName',\n error,\n {\n trackErrorData: {\n activeAccountId: activeAccountWebClientConfig.activeAccountId,\n },\n }\n );\n },\n },\n });\n\n return {\n defaultAutoGeneratedPaymentMethod:\n defaultAutoGeneratedPaymentMethodQuery.data,\n defaultAutoGeneratedPaymentMethodQuery,\n };\n};\n","import { useAppContext } from 'src/contexts/AppContext';\nimport {\n hasPermissionForPurchase,\n PurchaseInfoForPermission,\n} from 'src/utils/userPermissionUtils';\nimport { Permission } from 'src/WebApiController';\n\nexport const useUserHasPurchasePermission = (\n purchase: PurchaseInfoForPermission | null | undefined,\n root: Permission,\n owned?: Permission,\n allowForNewCreate = true\n) => {\n const { loginContext } = useAppContext();\n\n const canUpdate = hasPermissionForPurchase(\n loginContext?.user,\n purchase,\n root,\n owned,\n allowForNewCreate\n );\n\n return canUpdate;\n};\n\nexport const useUserCanUpdatePurchase = (\n purchase: PurchaseInfoForPermission | null | undefined\n) => {\n return useUserHasPurchasePermission(\n purchase,\n Permission.Purchases_Edit,\n Permission.Purchases_EditOwned\n );\n};\n\nexport const useUserCanUpdatePurchaseTags = (\n purchase: PurchaseInfoForPermission | null | undefined\n) => {\n return useUserHasPurchasePermission(\n purchase,\n Permission.Purchases_UpdateTags,\n Permission.Purchases_UpdateTagsOwned\n );\n};\n\nexport const useUserCanUpdatePurchaseCommission = (\n purchase: PurchaseInfoForPermission | null | undefined\n) => {\n return useUserHasPurchasePermission(\n purchase,\n Permission.Purchases_UpdateBuyerCommission,\n Permission.Purchases_UpdateBuyerCommissionOwned\n );\n};\n\nexport const useUserCanLockPurchaseCommission = (\n purchase: PurchaseInfoForPermission | null | undefined\n) => {\n return useUserHasPurchasePermission(\n purchase,\n Permission.Purchases_LockUnlockCommission,\n Permission.Purchases_LockUnlockCommissionOwned\n );\n};\n\nexport const useUserCanUpdatePurchaseDeliveryType = (\n purchase: PurchaseInfoForPermission | null | undefined\n) => {\n return useUserHasPurchasePermission(\n purchase,\n Permission.Purchases_UpdateDeliveryType,\n Permission.Purchases_UpdateDeliveryTypeOwned\n );\n};\n\nexport const useUserCanUpdatePurchaseCustomDeliveryType = (\n purchase: PurchaseInfoForPermission | null | undefined\n) => {\n return useUserHasPurchasePermission(\n purchase,\n Permission.Purchases_UpdateCustomDeliveryType,\n Permission.Purchases_UpdateCustomDeliveryTypeOwned,\n false // allowForNewCreate\n );\n};\n\nexport const useUserCanUpdatePurchaseSeatTraits = (\n purchase: PurchaseInfoForPermission | null | undefined\n) => {\n return useUserHasPurchasePermission(\n purchase,\n Permission.Purchases_UpdateSeatTraits,\n Permission.Purchases_UpdateSeatTraitsOwned\n );\n};\n\nexport const useUserCanUpdateListingTicketTypePriorityFromPurchase = (\n purchase: PurchaseInfoForPermission | null | undefined\n) => {\n return useUserHasPurchasePermission(\n purchase,\n Permission.Inventory_UpdateDeliveryStrategy,\n Permission.Inventory_UpdateDeliveryStrategyOnPurchasedBy\n );\n};\n","import { isEqual } from 'lodash-es';\n\nexport type OptionalPosField = { value?: T | null; hasChanged?: boolean };\n\nexport const posField = (value: T | null, hasChanged = false) => {\n return { value, hasChanged };\n};\n\nexport const posChangedField = (value: T | null) => {\n return posField(value, true);\n};\n\nexport const hasChanged = (\n newP: OptionalPosField | null | undefined,\n oldP: OptionalPosField | null | undefined\n) => {\n if (oldP == null) {\n return newP?.hasChanged;\n }\n\n return newP?.hasChanged && !isEqual(newP.value, oldP.value);\n};\n","import { BarcodeForm } from 'src/components/UploadArtifacts/UploadBarcodes';\nimport { EntityWithRealTicketsPartial } from 'src/components/UploadArtifacts/UploadETicketsV2';\nimport {\n ActionOutboxEntityType,\n CostDetail,\n DeliveryType,\n MarketplaceEntityWithTickets,\n Ticket,\n TicketGroup,\n TicketGroupInput,\n TicketTransferRequest,\n VenueMapSectionType,\n} from 'src/WebApiController';\n\nimport { ContentId } from './constants/contentId';\nimport { ContentIds } from './constants/contentIdDataMap';\nimport { FormatContentId } from './constants/formatContentId';\nimport { FormatContentIds } from './constants/formatContentIdDataMap';\nimport { posField } from './posFieldUtils';\n\nexport type EntityWithRealTickets = MarketplaceEntityWithTickets & {\n tickets: Ticket[];\n entityType: ActionOutboxEntityType;\n};\n\nexport function initSeats(\n count: number,\n row: string | null,\n seatFr?: string | null,\n seatTo?: string | null\n) {\n const seats = [];\n const startSeat = parseInt(seatFr!);\n const initialHasRowsAndSeats = Boolean(seatFr);\n\n for (let i = 0; i < count; i++) {\n const seatNum = !isNaN(startSeat) ? `${startSeat + i}` : i + 1;\n const seat = initialHasRowsAndSeats\n ? seatFr === seatTo\n ? seatFr || seatNum\n : seatNum\n : '';\n seats.push(makeSeat(i, row, seat));\n }\n return seats;\n}\n\nexport function makeSeat(i: number, row: string | null, seat: string | number) {\n return {\n id: -i,\n ord: i,\n lstOrd: i,\n row: row,\n seat: seat,\n } as Ticket;\n}\n\n// Stringify the props because RHF lib only allows for string returns in TS\nexport const validateSeat = (\n seat: string,\n ordinal: number,\n currentSeats: Record\n) => {\n if (!seat) {\n return JSON.stringify(ContentIds[ContentId.Required]);\n }\n\n // Sometimes this comes in as a number for some reason\n seat = seat.toString().trim();\n if (currentSeats[seat] && currentSeats[seat] !== ordinal) {\n return JSON.stringify({\n ...FormatContentIds[FormatContentId.DuplicatingSeats],\n params: currentSeats[seat.trim()],\n });\n }\n};\n\nexport type TransferTicketsForm = {\n /* This is to used with react-hook-form's field-arrays, which requires these things to be an object\n The id field is basically just the ordinal number of the input.\n The values for these will get mapped to \"acceptanceUrls\" before submitting to the backend.\n */\n acceptanceUrlInputs: { id: number; url: string }[];\n} & TicketTransferRequest &\n BarcodeForm;\n\nexport const getTicketGroupTotalCost = (tg: TicketGroup) => {\n return getTicketGroupTotalTicketCost(tg) + (tg.delivCst?.amt ?? 0);\n};\n\nexport const getTicketGroupInputTotalCost = (tg: TicketGroupInput) => {\n return getTicketGroupInputTotalTicketCost(tg) + (tg.deliveryCost?.value ?? 0);\n};\n\nexport const getTicketGroupTotalTicketCost = (tg: TicketGroup) => {\n return (tg.unitCst?.amt ?? 0) * tg.ticketCnt;\n};\n\nexport const getTicketGroupInputTotalTicketCost = (tg: TicketGroupInput) => {\n return (tg.unitCost?.value ?? 0) * (tg.numberOfTickets?.value ?? 0);\n};\n\nexport const getCosts = (\n ticketGroups?: TicketGroupInput[],\n costs?: CostDetail[] | null\n) => {\n // TODO - https://thestubhub.atlassian.net/browse/POS-426\n // how do we handle these being in different currency units?\n // Perhaps when the currency code for each ticket-group is different from the main currency code, then\n // we submit all the amounts to the server to use the money service to convert prior to displaying them\n const totalTicketCost = (ticketGroups ?? []).reduce(\n (acc, tg) => acc + getTicketGroupInputTotalTicketCost(tg),\n 0\n );\n\n const totalShipping = (ticketGroups ?? []).reduce(\n (acc, tg) => acc + (tg.deliveryCost?.value ?? 0),\n 0\n );\n\n const totalCost = (costs ?? []).reduce(\n (acc, c) => acc + (c.cost?.amt ?? 0),\n totalTicketCost + totalShipping\n );\n\n return {\n totalTicketCost,\n totalShipping,\n totalCost,\n };\n};\n\nconst getLongestConsecutiveNumber = (str: string) => {\n let longestNumber = '';\n let currentNumber = '';\n\n for (let i = str.length - 1; i >= 0; i--) {\n const charCode = str.charCodeAt(i);\n\n if (charCode >= 48 && charCode <= 57) {\n currentNumber = str[i] + currentNumber;\n } else {\n if (currentNumber.length > longestNumber.length) {\n longestNumber = currentNumber;\n }\n currentNumber = '';\n }\n }\n\n // Check the last currentNumber in case the string ends with a number\n if (currentNumber.length > longestNumber.length) {\n longestNumber = currentNumber;\n }\n\n return longestNumber;\n};\n\nexport const fitsSeatIncrementType = (\n seatFr: string,\n seatTo: string,\n quantity: number,\n increment: number\n) => {\n let seatValue = seatFr;\n for (let i = 0; i < quantity - 1; i++) {\n seatValue = getNextTicketBy(seatValue, increment).toString();\n }\n\n return seatValue === seatTo;\n};\n\nexport const getNextTicketBy = (\n ticketNo: string | number,\n increment: number\n) => {\n let result = ticketNo;\n for (let i = 0; i < increment; i++) {\n result = getNextTicket(result);\n }\n\n return result;\n};\n\nexport const getNextTicket = (ticketNo: string | number) => {\n if (typeof ticketNo === 'number') {\n return ticketNo + 1;\n }\n\n const lastChar = ticketNo.slice(-1);\n\n if (lastChar === 'Z') {\n return `${ticketNo}A`;\n } else if (lastChar === 'z') {\n return `${ticketNo}a`;\n } else if (!isNaN(parseInt(lastChar))) {\n const numPart = getLongestConsecutiveNumber(ticketNo);\n\n return `${ticketNo.slice(0, ticketNo.length - numPart.length)}${\n parseInt(numPart) + 1\n }`;\n }\n\n return (\n ticketNo.slice(0, -1) + String.fromCharCode(lastChar.charCodeAt(0) + 1)\n );\n};\n\nexport const selectEventInfoFromTicketGroups = (\n ticketGroups: TicketGroupInput[]\n) => {\n return ticketGroups.map((ticketGroup) => {\n return {\n tickets: posField([] as Ticket[]),\n event: ticketGroup.event,\n posEventId: ticketGroup.posEventId,\n viagogoEventId: ticketGroup.viagogoEventId,\n eventMappingId: ticketGroup.eventMappingId,\n viagogoVirtualId:\n ticketGroup.event?.viagVirtualId ?? ticketGroup.viagogoVirtualId,\n purchaseOrderId: ticketGroup.purchaseOrderId,\n venue: ticketGroup.venue,\n currencyCode: ticketGroup.currencyCode,\n ticketGroupId: ticketGroup.ticketGroupId,\n deliveryType: posField(\n ticketGroup.deliveryType?.value ?? DeliveryType.InApp\n ),\n taxPaid: posField(1), // This is to turn off taxExempt by default\n } as unknown as TicketGroupInput;\n });\n};\n\nexport const selectDistinctListingIds = (tickets: Ticket[]) => {\n return Array.from(new Set(tickets.map((ticket) => ticket.listingId)));\n};\n\nexport const selectDistinctPurchaseOrderIds = (tickets: Ticket[]) => {\n return Array.from(new Set(tickets.map((ticket) => ticket.poId)));\n};\n\nexport const formatSeatDisplay = (\n seatFr: string | null,\n seatTo: string | null\n) => {\n let text = seatFr ?? '';\n if (seatTo && seatFr && seatTo !== seatFr) {\n text += ` - ${seatTo}`;\n }\n\n return text;\n};\n\nexport const SECTION_TYPES_GA = [\n VenueMapSectionType.GeneralAdmission,\n VenueMapSectionType.GeneralAdmissionSeating,\n VenueMapSectionType.GeneralAdmissionStanding,\n VenueMapSectionType.GeneralAdmissionWithQueueNumber,\n];\n\nexport const isSectionTypeGeneralAdmission = (\n sectionType: VenueMapSectionType | null | undefined\n) => sectionType != null && SECTION_TYPES_GA.includes(sectionType);\n\nexport const toSeating = (ticketGroup: TicketGroupInput) => {\n return {\n section: ticketGroup.section?.value ?? '',\n row: ticketGroup.row?.value ?? '',\n seatFr: ticketGroup.tickets?.value?.length\n ? ticketGroup.tickets.value[0]!.seat\n : '',\n seatTo: ticketGroup.tickets?.value?.length\n ? ticketGroup.tickets.value[ticketGroup.tickets?.value?.length - 1]!.seat\n : '',\n sectionId: ticketGroup.sectionId?.value ?? null,\n rowId: ticketGroup.rowId?.value ?? null,\n ticketIds: null,\n listingIds: null,\n };\n};\n\nexport const toEntityWithTicket = (\n ticketGroup: TicketGroupInput\n): EntityWithRealTicketsPartial => {\n return {\n id: ticketGroup.ticketGroupId,\n entityType: ActionOutboxEntityType.TicketGroup,\n viagVirtualId: ticketGroup.viagogoVirtualId,\n seating: toSeating(ticketGroup),\n ticketCnt: ticketGroup.numberOfTickets?.value ?? 0,\n tickets: ticketGroup.tickets?.value ?? [],\n };\n};\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport const PurchaseTicketTableContainer = styled.div`\n margin-bottom: ${() => vars.spacing.xl};\n border: 1px solid ${(props) => props.theme.colors.borderPrimary};\n border-radius: ${() => vars.spacing.sm};\n overflow: hidden;\n`;\n\nexport const PurchaseEventItemHeaderWrapper = styled.div`\n border-bottom: 1px solid ${(props) => props.theme.colors.borderPrimary};\n padding: ${() =>\n `${vars.spacing.lg} ${vars.spacing.lg} ${vars.spacing.sm} ${vars.spacing.lg}`};\n background-color: ${(props) => props.theme.colors.backgroundSecondary};\n`;\n\nexport const ChangesIndicator = styled.div`\n color: ${(props) => props.theme.colors.backgroundBrandActive};\n font-size: ${() => vars.typography.fontSize['2xl']};\n cursor: pointer;\n`;\n","import { SortingState } from '@tanstack/react-table';\nimport { useEffect } from 'react';\nimport {\n MultiSelectScope,\n useMultiSelectionContext,\n} from 'src/contexts/MultiSelectionContext/MultiSelectionContext';\n\ninterface UseClearShiftSelectionOnSortingChangeProps {\n sortingState: SortingState;\n}\n\nexport const useClearShiftSelectionOnSortingChange = ({\n sortingState,\n}: UseClearShiftSelectionOnSortingChangeProps) => {\n const { clearShiftKeySelection, selectionMode } = useMultiSelectionContext();\n\n useEffect(() => {\n // If selection mode is AllGroups, then don't reset the shiftKey selection state\n // because the user is selecting between different tables,\n // and when the component is mounted using an Accordion, this effect runs\n // clearing the state.\n if (!selectionMode || selectionMode.mode === MultiSelectScope.AllGroups) {\n return;\n }\n clearShiftKeySelection();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [selectionMode, sortingState]);\n};\n","import { range } from 'lodash-es';\n\nexport const generateShimmeringRows = (\n numOfRows: number,\n numOfListingGroups?: number\n) => {\n return [\n ...(numOfListingGroups\n ? range(0, numOfListingGroups, 1).map(() => ({\n listing: null,\n isLtGrp: true,\n }))\n : []),\n ...range(0, numOfRows, 1).map(() => null),\n ];\n};\n","export const dataThemeAttributeName = 'data-bs-theme';\nexport const dataDarkThemeAttribute = `[${dataThemeAttributeName}=\"dark\"]`;\n","import { DefaultTheme } from 'styled-components/macro';\n\nimport { Colors } from './constants/colors';\nimport { PurpleTheme } from './legacy';\nimport {\n ThemeColors,\n ThemeMediaQuery,\n ThemeTypography,\n} from './legacy/theme-types';\n\ntype CustomDefaultTheme = DefaultTheme & {\n name: string;\n rounded: boolean;\n floatingInputLabel: boolean;\n filledInLoading: boolean;\n colors: ThemeColors;\n typography: ThemeTypography;\n spacing: (...multipliers: number[]) => string;\n media: ThemeMediaQuery;\n logoPath: string;\n};\n\nconst OldTheme = PurpleTheme as CustomDefaultTheme;\n\nexport const DarkLegacyTheme: CustomDefaultTheme = {\n ...OldTheme /* We will slowly remove this as will fill in all the blanks */,\n colors: {\n ...OldTheme.colors,\n borderPrimary: Colors.neutral075,\n borderActive: Colors.indigo200,\n borderDark: Colors.neutral075,\n backgroundPrimary: Colors.neutral025,\n backgroundSecondary: Colors.dark060,\n backgroundBrandActive: Colors.indigo300,\n backgroundBrandLight: Colors.indigo100,\n backgroundBrandHover: Colors.indigo200,\n backgroundDark: Colors.neutral025,\n textBrand: Colors.indigo600,\n textBrandHover: Colors.indigo200,\n textOnBrandBgLink: Colors.white,\n textStrong: Colors.neutral500,\n },\n};\n","import { ClientLogClient, LogLevel } from 'src/WebApiController';\n\nimport { REACT_APP_NAME } from './constants/constants';\n\nexport const logToServer = (\n logLevel: LogLevel,\n errorId: string,\n errorMessage: string,\n additionalInfo: object\n) => {\n return new ClientLogClient({}).log({\n logLevel: logLevel,\n applicationSource: REACT_APP_NAME,\n errorId: errorId,\n error: errorMessage,\n pageUrl: window.location.href,\n componentStack: '',\n additionalInfo: additionalInfo,\n });\n};\n","import { type AsyncStorage } from '@tanstack/react-query-persist-client';\nimport { clear, del, get, set } from 'idb-keyval';\nimport { logToServer } from 'src/utils/clientLogUtils';\nimport { LogLevel } from 'src/WebApiController';\n\nexport async function clearIDBCache() {\n try {\n await clear();\n } catch (e) {\n console.warn(e);\n logToServer(\n LogLevel.Warning,\n 'QueryClient-index-db-clear',\n `Failed to clear the index-db`,\n e instanceof Object && e.constructor === Object ? e : {}\n );\n }\n}\n\nexport function createIDBAsyncStorage(): AsyncStorage {\n return {\n getItem: async (key) => {\n try {\n return await get(key);\n } catch (e) {\n console.warn(e);\n logToServer(\n LogLevel.Warning,\n 'QueryClient-index-db-get',\n `Failed to get ${key} from index-db`,\n e instanceof Object && e.constructor === Object ? e : {}\n );\n }\n },\n setItem: async (key, data) => {\n try {\n return await set(key, data);\n } catch (e) {\n console.warn(e);\n logToServer(\n LogLevel.Warning,\n 'QueryClient-index-db-set',\n `Failed to set ${key} / ${data} to index-db`,\n e instanceof Object && e.constructor === Object ? e : {}\n );\n }\n },\n removeItem: async (key: string) => {\n try {\n return await del(key);\n } catch (e) {\n console.warn(e);\n logToServer(\n LogLevel.Warning,\n 'QueryClient-index-db-del',\n `Failed to delete ${key} from index-db`,\n e instanceof Object && e.constructor === Object ? e : {}\n );\n }\n },\n };\n}\n","import { debounce } from 'lodash-es';\nimport { useCallback, useEffect, useState } from 'react';\n\nexport const useNetworkState = (offlineTimeoutMs = 0) => {\n const [isOnline, setIsOnline] = useState(navigator.onLine);\n\n const setOffline = debounce(() => {\n setIsOnline(false);\n }, offlineTimeoutMs);\n\n const setOnline = useCallback(() => {\n setOffline.cancel();\n setIsOnline(true);\n }, [setOffline]);\n\n useEffect(() => {\n const handleStatusChange = () =>\n navigator.onLine ? setOnline() : setOffline();\n\n window.addEventListener('online', handleStatusChange);\n window.addEventListener('offline', handleStatusChange);\n\n return () => {\n window.removeEventListener('online', handleStatusChange);\n window.removeEventListener('offline', handleStatusChange);\n };\n }, [isOnline, setOffline, setOnline]);\n\n return isOnline;\n};\n","import { useNavigate } from 'react-router-dom';\nimport { Content } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { clearIDBCache } from 'src/core/utils/createIndexDBPersister';\nimport { useNetworkState } from 'src/hooks/useNetworkState';\nimport { IconsFill, NotifyIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport * as styles from './SomethingWentWrong.css';\n\nexport const SomethingWentWrong = ({\n header,\n message,\n messages,\n}: {\n header?: React.ReactNode;\n message?: React.ReactNode;\n messages?: React.ReactNode[];\n}) => {\n const navigate = useNavigate();\n const isOnline = useNetworkState();\n\n const allMessages = [\n message ?? (\n \n ),\n ...(messages ?? []),\n ];\n return (\n
    \n

    \n \n {header ?? (\n \n )}\n

    \n {allMessages.map((message, i) => (\n
    \n {message}\n
    \n ))}\n
    \n {\n // Clear local-storage in case bad/empty results stored in local-storage\n clearIDBCache();\n navigate(0);\n }}\n >\n \n \n
    \n
    \n );\n};\n","import {\n QueryCache,\n QueryClient,\n QueryClientProvider,\n} from '@tanstack/react-query';\nimport { useEffect, useMemo } from 'react';\nimport { isRouteErrorResponse, useRouteError } from 'react-router-dom';\nimport { dataThemeAttributeName } from 'src/app/constants';\nimport {\n AppContextProvider,\n AppTelemetryProvider,\n useAppContext,\n} from 'src/contexts/AppContext';\nimport { SiteContentProvider } from 'src/contexts/ContentContext';\nimport { ScreenSizeProvider } from 'src/contexts/ScreenSizeContext/ScreenSizeContext';\nimport {\n SiteThemeContextProvider,\n useSiteTheme,\n} from 'src/contexts/SiteTheme/SiteThemeContext';\nimport {\n PurpleLegacyTheme,\n purpleTheme,\n TicketUtilLegacyTheme,\n ticketUtilTheme,\n} from 'src/core/themes';\nimport { DarkLegacyTheme } from 'src/core/themes/darkLegacyTheme';\nimport { darkTheme } from 'src/core/themes/darkTheme.css';\nimport { clearIDBCache } from 'src/core/utils/createIndexDBPersister';\nimport { REACT_APP_NAME } from 'src/utils/constants/constants';\nimport { getErrorInfoFromStatusCode } from 'src/utils/errorUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ApiException,\n ClientLogClient,\n ClientLogRequest,\n CoBrandId,\n LogLevel,\n} from 'src/WebApiController';\nimport { ThemeProvider } from 'styled-components/macro';\n\nimport { SomethingWentWrong } from './SomethingWentWrong';\n\nconst queryClient = new QueryClient({\n queryCache: new QueryCache({\n onError(error) {\n if (ApiException.isApiException(error) && error.status === 401) {\n clearIDBCache(); // delete the cache storage before reloading\n window.location.reload();\n }\n },\n }),\n});\n\nexport const RootErrorPage = () => {\n const error = useRouteError();\n console.log(error);\n\n const message = (error as { message?: string }).message;\n const status = isRouteErrorResponse(error) ? error.status : undefined;\n const statusText = isRouteErrorResponse(error) ? error.statusText : undefined;\n const stack = (error as { stack?: string }).stack;\n\n const { activeAccountWebClientConfig } = useAppContext();\n const logClient = useMemo(\n () => new ClientLogClient(activeAccountWebClientConfig),\n [activeAccountWebClientConfig]\n );\n\n useEffect(() => {\n const logRequest: ClientLogRequest = {\n logLevel: LogLevel.Error,\n applicationSource: REACT_APP_NAME,\n errorId: null,\n error: message ?? '',\n pageUrl: window.location.href,\n componentStack: stack ?? null,\n additionalInfo: {\n status: status,\n statusText: statusText,\n },\n };\n\n tryInvokeApi(\n async () => {\n await logClient.log(logRequest);\n\n if (message?.includes('Minified React error #301')) {\n // When this happens - the cache is corrupted and usually clearing the cache fixes it\n // So instead of forcing the user to do it automatically - we should just do it and take\n // them back to where they were before\n clearIDBCache();\n window.location.reload();\n }\n },\n () => {\n console.warn('Failed to log error to server');\n }\n );\n });\n\n const { headerDisplay, messageDisplay } = status\n ? getErrorInfoFromStatusCode(status, statusText)\n : { headerDisplay: undefined, messageDisplay: undefined };\n\n const { cobrandId } = useAppContext();\n const { isDarkMode } = useSiteTheme();\n\n useEffect(() => {\n document.body.setAttribute(dataThemeAttributeName, 'light');\n\n if (cobrandId === CoBrandId.TicketUtil) {\n document.body.classList.toggle(ticketUtilTheme, true);\n document.body.classList.remove(purpleTheme);\n document.body.classList.remove(darkTheme);\n } else if (isDarkMode) {\n document.body.classList.toggle(darkTheme, true);\n document.body.setAttribute(dataThemeAttributeName, 'dark');\n document.body.classList.remove(ticketUtilTheme);\n document.body.classList.remove(purpleTheme);\n } else {\n document.body.classList.toggle(purpleTheme, true);\n document.body.classList.remove(ticketUtilTheme);\n document.body.classList.remove(darkTheme);\n }\n }, [cobrandId, isDarkMode]);\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n","import { InitialTableState, PaginationState } from '@tanstack/react-table';\nimport { useEffect, useState } from 'react';\n\nexport const usePaginationSettings = (\n numOfItems: number,\n currentPage: number,\n pageSize: number,\n disablePagination?: boolean,\n initState?: InitialTableState\n) => {\n const [pagination, setPagination] = useState({\n pageIndex:\n currentPage >= 0 ? currentPage : initState?.pagination?.pageIndex || 0,\n pageSize: disablePagination ? numOfItems : pageSize,\n });\n\n useEffect(() => {\n if (disablePagination && pagination.pageSize !== numOfItems) {\n setPagination((prevState) => ({\n ...prevState,\n pageSize: numOfItems,\n }));\n } else {\n if (pagination.pageIndex * pagination.pageSize >= numOfItems) {\n // If the current page index is greater than the number of pages, reset to the first page\n setPagination((prevState) => ({\n ...prevState,\n pageIndex: 0,\n }));\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [numOfItems]);\n\n useEffect(() => {\n if (currentPage >= 0) {\n setPagination((prevState) => ({\n ...prevState,\n pageIndex: currentPage,\n }));\n }\n }, [currentPage]);\n\n return { pagination, setPagination };\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport function ClockTrashIcon(props: Omit) {\n const stroke = props.stroke || '#3F1D75';\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n","import clsx from 'clsx';\nimport { Content } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { Stack, StackProps, TooltipPopover } from 'src/core/ui';\nimport { SeatSaverIcon } from 'src/svgs';\nimport { AdminHoldIcon } from 'src/svgs/AdminHoldIcon';\nimport { ClockTrashIcon } from 'src/svgs/ClockTrashIcon';\nimport { IconsFill, WarningOutlineIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport * as styles from './SeatingInfo.css';\n\nexport type SeatingInfoProps = {\n section: string;\n row: string | null;\n rowId?: number | null;\n seatFr: string | null;\n seatTo: string | null;\n isSeatSaver?: boolean;\n showSectionPrefix?: boolean;\n showSeatPrefix?: boolean;\n fontSize?: string;\n isDuplicate?: boolean;\n showAdminHold?: boolean;\n isAdminHold?: boolean;\n showOrgSeat?: boolean;\n orgSeatFr?: string | null;\n orgSeatTo?: string | null;\n isSoldOut?: boolean;\n justifyIconContent?: StackProps['justifyContent'];\n showUnmappedSection?: boolean;\n darkBackground?: boolean; // force dark-background\n lightBackground?: boolean; // force light-background\n isWasted?: boolean;\n};\n\nexport const getSeatDisplayText = ({\n seatFr,\n seatTo,\n compact,\n}: {\n seatFr: string | null | undefined;\n seatTo: string | null | undefined;\n compact?: boolean;\n}) => {\n const hasSeats = !!(seatFr || seatTo);\n const isSingleSeat = hasSeats && (seatFr === seatTo || !seatTo);\n const isSeatRange = seatFr && seatTo && seatFr !== seatTo;\n\n let text = seatFr ?? '';\n if (isSeatRange) {\n text += compact ? '-' : ` - `;\n }\n if (!isSingleSeat) {\n text += seatTo ?? '';\n }\n\n return text;\n};\n\n// TODO: piggyback rows display?\nexport const SeatingInfo = ({\n seatFr,\n seatTo,\n section,\n row,\n rowId,\n isSeatSaver,\n showSectionPrefix,\n showSeatPrefix = true,\n fontSize,\n isDuplicate,\n showAdminHold,\n isAdminHold,\n showOrgSeat,\n orgSeatFr,\n orgSeatTo,\n isSoldOut,\n justifyIconContent,\n showUnmappedSection,\n darkBackground,\n lightBackground,\n isWasted,\n}: SeatingInfoProps) => {\n const hasSeats = !isSoldOut && !!(seatFr || seatTo);\n const hasOrgSeats = !!(orgSeatFr || orgSeatTo);\n const isSingleSeat = hasSeats && (seatFr === seatTo || !seatTo);\n const isOrgSingleSeat =\n hasOrgSeats && (orgSeatFr === orgSeatTo || !orgSeatTo);\n const showOrgSeatFr = showOrgSeat && orgSeatFr && seatFr !== orgSeatFr;\n const showOrgSeatTo =\n showOrgSeat && orgSeatTo && seatTo !== orgSeatTo && orgSeatTo !== seatFr;\n const isUnmappedSection = !rowId;\n\n return (\n \n \n {showSectionPrefix && (\n \n \n \n )}\n {section}\n {row && (\n <>\n
    \n \n
    \n {row}\n \n )}\n {hasSeats && (\n <>\n {showSeatPrefix && (\n
    \n \n
    \n )}\n {showOrgSeatFr && (\n {orgSeatFr}\n )}\n {getSeatDisplayText({ seatFr, seatTo })}\n {showOrgSeatTo && (\n {orgSeatTo}\n )}\n \n )}\n {isSoldOut && showOrgSeat && hasOrgSeats && (\n <>\n {showSeatPrefix && (\n
    \n \n
    \n )}\n \n {getSeatDisplayText({ seatFr: orgSeatFr, seatTo: orgSeatTo })}\n \n \n )}\n \n \n {isUnmappedSection && showUnmappedSection && (\n \n }\n >\n \n \n )}\n {isWasted && }\n {isSeatSaver && (\n \n )}\n {showAdminHold && isAdminHold && (\n \n )}\n {isDuplicate && (\n \n \n \n )}\n \n
    \n );\n};\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { EntityWithTicketsQuery } from 'src/WebApiController';\n\nimport { QueryWithViewMode } from './eventQueryUtils';\n\nexport const getServerSideOnlyMetricsQuery = <\n TQuery extends EntityWithTicketsQuery & QueryWithViewMode,\n>(\n query: TQuery\n) => {\n const {\n // IMPORTANT: pulling out all the parts that do not affect server and if we leave them in\n // they will trigger a re-get unnecessarily and cause performance issue\n searchText,\n sortBy,\n isSortDescending,\n performerIds,\n venueIds,\n viewMode,\n ...rest\n } = query;\n\n return rest as TQuery;\n};\n\nexport const getServerSideOnlyMetricsQueryV2 = <\n TQuery extends EntityWithTicketsQuery & QueryWithViewMode,\n>(\n query: TQuery\n) => {\n const {\n eventOrMappingIds,\n eventTimeFrameFilter,\n eventDates,\n purchaseDates,\n timezoneOffsetMins,\n topLevelCategories,\n parentCategories,\n eventStatuses,\n cityIds,\n stateProvinceIds,\n countryCodes,\n numberOfTicketsHeld,\n lastSaleDates,\n eventTagName,\n eventTagValue,\n purchaseBuyerId,\n purchaseOrderCreatedBy,\n isSeatSaver,\n } = query;\n\n let eventChangingFilter = {\n eventOrMappingIds,\n eventTimeFrameFilter,\n eventDates,\n purchaseDates,\n timezoneOffsetMins,\n topLevelCategories,\n parentCategories,\n eventStatuses,\n cityIds,\n stateProvinceIds,\n countryCodes,\n numberOfTicketsHeld,\n lastSaleDates,\n eventTagName,\n eventTagValue,\n } as TQuery;\n\n let dataChangingFilter = {\n purchaseBuyerId,\n purchaseOrderCreatedBy,\n isSeatSaver,\n } as TQuery;\n\n // Listing specific filters\n if (\n 'eventHasUnsoldTickets' in query &&\n 'lastPriceUpdateDates' in query &&\n 'lastPriceNoUpdateDates' in query &&\n 'pricerSellerUserId' in query\n ) {\n const {\n eventHasUnsoldTickets,\n lastPriceUpdateDates,\n lastPriceNoUpdateDates,\n pricerSellerUserId,\n } = query;\n\n eventChangingFilter = {\n ...dataChangingFilter,\n eventHasUnsoldTickets,\n lastPriceUpdateDates,\n lastPriceNoUpdateDates,\n } as TQuery;\n\n dataChangingFilter = {\n ...dataChangingFilter,\n pricerSellerUserId,\n } as TQuery;\n }\n\n // Sales specific filters\n if ('listingInsertBy' in query && 'fulfillerSellerUserId' in query) {\n const { listingInsertBy, fulfillerSellerUserId } = query;\n\n dataChangingFilter = {\n ...dataChangingFilter,\n listingInsertBy,\n fulfillerSellerUserId,\n } as TQuery;\n }\n\n return { eventChangingFilter, dataChangingFilter };\n};\n","import { once } from 'lodash-es';\nimport React, { PropsWithChildren } from 'react';\nimport {\n ActionOutboxEntityType,\n CatalogClient,\n DateTimeRange,\n EntityWithTicketsQuery,\n} from 'src/WebApiController';\n\nexport const MAX_ENTITIES_IN_GROUP_FOR_LOAD = 1000;\n\nexport type EventIdGroup = {\n viagId: number;\n viagVirtualId: string;\n performerId: string | null;\n venueId: number;\n name: string;\n date: DateTimeRange;\n};\n\nexport type ICatalogMetricsContext<\n TMetrics extends { currency: string | null },\n> = {\n isLoading: boolean;\n eventDetailedMetrics?: Record;\n eventMetrics?: Record;\n performerMetrics?: Record;\n venueMetrics?: Record;\n refreshMetrics: () => void;\n};\n\nexport type CatalogMetricsContextProviderProps<\n TMetrics extends { currency: string | null },\n TQuery extends EntityWithTicketsQuery,\n> = PropsWithChildren<{\n queryKey: string;\n entityType: ActionOutboxEntityType;\n getCatalogMetrics?: (\n client: CatalogClient,\n filterQuery: TQuery,\n rowVersion?: number | null\n ) => Promise<{\n events: Record;\n performers?: Record;\n venues?: Record;\n eventsDetailed?: Record;\n maxRowVersion?: number | null;\n }>;\n /**\n * Only for V1 (where metrics are split into batches)\n * Needs to be provided if getCatalogMetrics is provided\n */\n addCatalogMetrics?: (metricA: TMetrics, metricB: TMetrics) => TMetrics;\n disabled?: boolean;\n isDetailed?: boolean;\n}>;\n\nexport type CatalogMetricsResults<\n TMetrics extends { currency: string | null },\n TQuery extends EntityWithTicketsQuery,\n> = {\n filter: TQuery;\n eventsDetailed: Record;\n events: Record;\n performers?: Record;\n venues?: Record;\n maxRowVersion?: number | null;\n};\n\nexport const createCatalogMetricsContextV1 = once(<\n TMetrics extends { currency: string | null },\n>() => React.createContext({} as ICatalogMetricsContext));\n\nexport const createCatalogMetricsContextV2 = once(<\n TMetrics extends { currency: string | null },\n>() => React.createContext({} as ICatalogMetricsContext));\n","import { compareAsc, compareDesc } from 'date-fns';\nimport {\n ActionOutboxEntityType,\n EventSort,\n EventWithData,\n} from 'src/WebApiController';\n\nimport { getEventsWithNonZeroCounts } from '../CatalogDataContext/CatalogDataContext.utils';\nimport {\n EventIdGroup,\n MAX_ENTITIES_IN_GROUP_FOR_LOAD,\n} from './CatalogMetrics.type';\n\nexport const getEventIdsForPerformersOrVenues = (\n events?: Record,\n performerIds?: number[] | null,\n venueEventIds?: number[] | null\n) => {\n if (!events || !performerIds) {\n return [];\n }\n\n const results = Object.values(events)\n .filter(\n (ev) =>\n (ev.event.perfId && performerIds?.includes(ev.event.perfId)) ||\n (ev.event.venueId && venueEventIds?.includes(ev.event.venueId))\n )\n .map((ev) => ev.event.viagVirtualId);\n\n return results;\n};\n\n/* The goal of this method is to aggregate all the listing metrics with similar currency so we can reduce significantly the number of listing metrics\n * being sent to the server for aggregation just because of currency conversions\n * if the aggregation result in just 1 ListingMetrics - we don't need to send anything\n */\nexport const groupAndAggregateMetrics = <\n TMetrics extends { currency: string | null },\n>(\n listingMetrics: TMetrics[],\n addMetrics: (metricA: TMetrics, metricB: TMetrics) => TMetrics\n) => {\n const metricsByCurrency = {} as Record;\n\n listingMetrics.forEach((lm) => {\n const existing = metricsByCurrency[lm.currency ?? ''];\n if (!existing) {\n metricsByCurrency[lm.currency ?? ''] = lm;\n } else {\n metricsByCurrency[lm.currency ?? ''] = addMetrics(existing, lm);\n }\n });\n\n return Object.values(metricsByCurrency);\n};\n\nexport function getEventsToGetMetricsFor(\n data: EventWithData[],\n entityType: ActionOutboxEntityType,\n sortBy?: EventSort | null,\n isSortDescending?: boolean | null,\n filterZeroCounts?: boolean\n): EventIdGroup[][] {\n const events = filterZeroCounts\n ? getEventsWithNonZeroCounts(entityType, data, true)\n : data;\n\n const allEventIds = events\n .map(\n (ev) =>\n ({\n viagId: ev.event.viagId,\n viagVirtualId: ev.event.viagVirtualId,\n performerId: ev.event.perfId,\n venueId: ev.event.venueId,\n name: ev.event.name,\n date: ev.event.datesUtc,\n }) as EventIdGroup\n )\n .toSorted((ev1, ev2) => {\n if (sortBy === EventSort.MainDisplay) {\n return isSortDescending\n ? ev2.name.localeCompare(ev1.name)\n : ev1.name.localeCompare(ev2.name);\n }\n\n const date1 = ev1.date.start ? new Date(ev1.date.start) : new Date(0);\n const date2 = ev2.date.start ? new Date(ev2.date.start) : new Date(0);\n // Sort the events by dates\n // given 99% of the time the sort is date\n // If the sort is by name\n return isSortDescending\n ? compareDesc(date1, date2)\n : compareAsc(date1, date2);\n });\n\n if (allEventIds.length <= MAX_ENTITIES_IN_GROUP_FOR_LOAD) {\n return [allEventIds];\n }\n\n return [\n allEventIds.slice(0, MAX_ENTITIES_IN_GROUP_FOR_LOAD),\n allEventIds.slice(MAX_ENTITIES_IN_GROUP_FOR_LOAD),\n ];\n}\n","import { useQuery, useQueryClient } from '@tanstack/react-query';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport isEqual from 'react-fast-compare';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { DATA_REFRESH_RATE_IN_MILLIS_LONG } from 'src/utils/constants/constants';\nimport { QueryWithViewMode } from 'src/utils/eventQueryUtils';\nimport { getServerSideOnlyMetricsQueryV2 } from 'src/utils/getServerSideOnlyMetricsQuery';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n CatalogClient,\n EntityWithTicketsQuery,\n EventWithData,\n Feature,\n} from 'src/WebApiController';\n\nimport { useAppContext } from '../AppContext';\nimport { useCatalogDataContext } from '../CatalogDataContext';\nimport { getEventsWithNonZeroCounts } from '../CatalogDataContext/CatalogDataContext.utils';\nimport { useFilterQueryContext } from '../FilterQueryContext';\nimport {\n CatalogMetricsContextProviderProps,\n CatalogMetricsResults,\n createCatalogMetricsContextV2,\n ICatalogMetricsContext,\n} from './CatalogMetrics.type';\n\nexport function CatalogMetricsContextV2Provider<\n TMetrics extends { currency: string | null },\n TQuery extends EntityWithTicketsQuery & QueryWithViewMode,\n>({\n queryKey,\n entityType,\n getCatalogMetrics,\n children,\n disabled,\n isDetailed,\n}: CatalogMetricsContextProviderProps) {\n const CatalogMetricsContext = createCatalogMetricsContextV2();\n\n const { trackError } = useErrorBoundaryContext();\n\n const { data } = useCatalogDataContext();\n const { filterQuery } = useFilterQueryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const queryClient = useQueryClient();\n const transformedQuery = useMemo(\n () => getServerSideOnlyMetricsQueryV2(filterQuery),\n [filterQuery]\n );\n\n const hasCatalogV2Feature = useUserHasFeature(Feature.CatalogCacheStrategyV2);\n\n const [metrics, setMetrics] =\n useState>();\n const [lastRefetchTime, setLastRefetchTime] = useState();\n\n const getEventIdsToGetMetrics = (events: EventWithData[]) => {\n const eventIds = events\n .map((ev) => ev.counts?.viagVirtId ?? ev.event?.viagVirtualId)\n .filter((id: string | null): id is string => id != null);\n const performerIds = events\n .map((ev) => ev.counts?.perfId ?? ev.event?.perfId)\n .filter((id: number | null): id is number => id != null);\n const venueIds = events\n .map((ev) => ev.counts?.venId ?? ev.event?.venueId)\n .filter((id: number | null): id is number => id != null);\n\n return {\n eventIds,\n performerIds,\n venueIds,\n maxRowVersions: undefined,\n };\n };\n\n const eventsMissingMetrics = useMemo(() => {\n if (!data?.events) {\n return {}; // don't need any metrics\n }\n const eventsWithdata = Object.values(data.events);\n const events = hasCatalogV2Feature\n ? getEventsWithNonZeroCounts(entityType, eventsWithdata)\n : eventsWithdata;\n\n if (!events.length) {\n return {}; // don't need any metrics\n }\n\n if (\n !metrics ||\n !isEqual(metrics?.filter, transformedQuery.dataChangingFilter)\n ) {\n // no metrics, or metrics filter changed, need to re-get for all events\n return getEventIdsToGetMetrics(events);\n }\n\n // metrics filter didn't change, so just check if any event are missing metrics\n // if they are missing, go get them\n const results = events.filter((ev) =>\n isDetailed\n ? !metrics.eventsDetailed[\n ev.counts?.viagVirtId ?? ev.event?.viagVirtualId\n ]\n : !metrics.events[ev.counts?.viagVirtId ?? ev.event?.viagVirtualId]\n );\n\n if (results.length) {\n // We have some missing metrics, so we need to get them\n return getEventIdsToGetMetrics(results);\n }\n\n // We don't have any missing metrics, but we want to get all if the time has ellapsed\n if (\n lastRefetchTime &&\n new Date().getTime() - lastRefetchTime.getTime() >\n DATA_REFRESH_RATE_IN_MILLIS_LONG\n ) {\n const maxRowVersions = metrics?.maxRowVersion; // if we're refreshing, we only want to get the new ones\n const eventIds = Object.keys(metrics?.events ?? {});\n const performerIds = Object.keys(metrics?.performers ?? {});\n const venueIds = Object.keys(metrics?.venues ?? {});\n\n return {\n eventIds,\n performerIds,\n venueIds,\n maxRowVersions: maxRowVersions ?? undefined,\n };\n }\n\n return {};\n }, [\n data?.events,\n entityType,\n hasCatalogV2Feature,\n isDetailed,\n lastRefetchTime,\n metrics,\n transformedQuery.dataChangingFilter,\n ]);\n\n const shouldQuery = useMemo(\n () =>\n !disabled &&\n Boolean(eventsMissingMetrics.eventIds?.length) &&\n !(!activeAccountWebClientConfig.activeAccountId || !getCatalogMetrics),\n [\n activeAccountWebClientConfig.activeAccountId,\n disabled,\n eventsMissingMetrics?.eventIds?.length,\n getCatalogMetrics,\n ]\n );\n\n const metricsQueryKey = useMemo(\n () => [\n queryKey,\n eventsMissingMetrics.eventIds?.toSorted(),\n transformedQuery.dataChangingFilter,\n activeAccountWebClientConfig.activeAccountId,\n ],\n [\n queryKey,\n eventsMissingMetrics,\n transformedQuery.dataChangingFilter,\n activeAccountWebClientConfig.activeAccountId,\n ]\n );\n\n const metricsQuery = useQuery({\n queryKey: metricsQueryKey,\n queryFn: () => {\n if (!shouldQuery) {\n return null;\n }\n\n return tryInvokeApi(\n () => {\n return getCatalogMetrics!(\n new CatalogClient(activeAccountWebClientConfig),\n {\n ...transformedQuery.dataChangingFilter,\n // We are sending back the event ids we need metrics for - which can be a lot\n // TODO (SAPI-2030) - in the case where there's a lot of these, we should just send back\n // the event effecting filters and let the server figure out the events\n // Also - we need to send a row-version so refresh only update the changed entities\n eventOrMappingIds: eventsMissingMetrics.eventIds,\n performerIds: eventsMissingMetrics.performerIds,\n venueIds: eventsMissingMetrics.venueIds,\n },\n eventsMissingMetrics.maxRowVersions\n );\n },\n (error: ErrorTypes) => {\n trackError('CatalogClient.getCatalogMetrics', error, {\n ...transformedQuery,\n });\n // Since this is just loading metrics, we have the data so we'll just ignore that metrics error\n }\n );\n },\n enabled: shouldQuery,\n staleTime: Infinity,\n refetchInterval: DATA_REFRESH_RATE_IN_MILLIS_LONG,\n });\n\n useEffect(() => {\n if (metricsQuery.data) {\n const newMetrics = {\n filter: transformedQuery.dataChangingFilter,\n maxRowVersion: metricsQuery.data.maxRowVersion,\n eventsDetailed: {\n ...(metrics?.eventsDetailed ?? {}),\n ...metricsQuery.data.eventsDetailed,\n },\n events: {\n ...(metrics?.events ?? {}),\n ...metricsQuery.data.events,\n },\n performers: {\n ...(metrics?.performers ?? {}),\n ...metricsQuery.data.performers,\n },\n venues: {\n ...(metrics?.venues ?? {}),\n ...metricsQuery.data.venues,\n },\n };\n if (!isEqual(metrics, newMetrics)) {\n setLastRefetchTime(new Date());\n setMetrics(newMetrics);\n }\n }\n }, [\n metrics,\n metricsQuery.data,\n setMetrics,\n transformedQuery.dataChangingFilter,\n ]);\n\n const refreshMetrics = useCallback(async () => {\n setMetrics(undefined); // clear the cached metrics\n await queryClient.invalidateQueries({\n queryKey: metricsQueryKey,\n });\n }, [metricsQueryKey, queryClient, setMetrics]);\n\n const contextValues = useMemo>(() => {\n return {\n isLoading: metricsQuery.isLoading,\n eventDetailedMetrics: metrics?.eventsDetailed,\n eventMetrics: metrics?.events,\n performerMetrics: metrics?.performers,\n venueMetrics: metrics?.venues,\n refreshMetrics: refreshMetrics,\n };\n }, [\n metrics?.events,\n metrics?.eventsDetailed,\n metrics?.performers,\n metrics?.venues,\n metricsQuery.isLoading,\n refreshMetrics,\n ]);\n\n return (\n \n {children}\n \n );\n}\n","import { useQueries, useQueryClient } from '@tanstack/react-query';\nimport { isEqual } from 'lodash-es';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { DATA_REFRESH_RATE_IN_MILLIS_LONG } from 'src/utils/constants/constants';\nimport { QueryWithViewMode } from 'src/utils/eventQueryUtils';\nimport { getServerSideOnlyMetricsQuery } from 'src/utils/getServerSideOnlyMetricsQuery';\nimport {\n CatalogClient,\n EntityWithTicketsQuery,\n Feature,\n} from 'src/WebApiController';\n\nimport { useAppContext } from '../AppContext';\nimport { useCatalogDataContext } from '../CatalogDataContext';\nimport { useFilterQueryContext } from '../FilterQueryContext';\nimport {\n CatalogMetricsContextProviderProps,\n createCatalogMetricsContextV1,\n ICatalogMetricsContext,\n} from './CatalogMetrics.type';\nimport { getEventsToGetMetricsFor } from './CatalogMetrics.utils';\nimport { CatalogMetricsContextV2Provider } from './CatalogMetricsContextV2';\n\nfunction CatalogMetricsContextV1Provider<\n TMetrics extends { currency: string | null },\n TQuery extends EntityWithTicketsQuery & QueryWithViewMode,\n>({\n queryKey,\n entityType,\n getCatalogMetrics,\n addCatalogMetrics,\n children,\n disabled,\n}: CatalogMetricsContextProviderProps) {\n const CatalogMetricsContext = createCatalogMetricsContextV1();\n\n const { trackError } = useErrorBoundaryContext();\n\n const { data } = useCatalogDataContext();\n const { filterQuery } = useFilterQueryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const queryClient = useQueryClient();\n\n const hasCatalogV2Feature = useUserHasFeature(Feature.CatalogCacheStrategyV2);\n\n const groupsToGetMetricsFor = useMemo(() => {\n if (!data?.events) {\n return [];\n }\n return getEventsToGetMetricsFor(\n Object.values(data.events),\n entityType,\n filterQuery.sortBy,\n filterQuery.isSortDescending,\n hasCatalogV2Feature\n );\n }, [\n data?.events,\n entityType,\n filterQuery.sortBy,\n filterQuery.isSortDescending,\n hasCatalogV2Feature,\n ]);\n\n const queries = useMemo(() => {\n // Removing the client-side queries\n const transformedQuery = getServerSideOnlyMetricsQuery(\n filterQuery\n ) as TQuery;\n return {\n queries: groupsToGetMetricsFor.map((idGroup) => {\n const shouldQuery =\n !disabled &&\n !(\n !idGroup.length ||\n !transformedQuery ||\n !activeAccountWebClientConfig.activeAccountId ||\n !getCatalogMetrics\n );\n\n return {\n queryKey: [\n queryKey,\n transformedQuery,\n idGroup,\n activeAccountWebClientConfig.activeAccountId,\n ],\n queryFn: async () => {\n if (!shouldQuery) {\n return null;\n }\n\n return await getCatalogMetrics!(\n new CatalogClient(activeAccountWebClientConfig),\n {\n ...transformedQuery,\n eventOrMappingIds: idGroup.map((ev) => ev.viagVirtualId),\n performerIds: idGroup\n .filter((ev) => ev.performerId != null)\n .map((ev) => ev.performerId!),\n venueIds: idGroup.map((ev) => ev.venueId),\n }\n );\n },\n enabled: shouldQuery,\n staleTime: Infinity, // Since we're always refetching on an interval, we don't want query to calculate whether the data is stale\n refetchOnWindowFocus: false,\n onError: (error: ErrorTypes) => {\n trackError('CatalogClient.getCatalogMetrics', error, {\n ...transformedQuery,\n eventIds: idGroup,\n });\n // Since this is just loading metrics, we have the data so we'll just ignore that metrics error\n },\n refetchInterval: DATA_REFRESH_RATE_IN_MILLIS_LONG,\n };\n }),\n };\n }, [\n activeAccountWebClientConfig,\n disabled,\n getCatalogMetrics,\n groupsToGetMetricsFor,\n queryKey,\n trackError,\n filterQuery,\n ]);\n\n const metricsQueriesFromHook = useQueries(queries);\n const [metricsQueries, setMetricsQueries] = useState(metricsQueriesFromHook);\n\n /**\n * IMPORTANT: This is needed because event that useQueries receives a memoized object,\n * on every render it returns a new array with metrics, causing the app\n * to re-render.\n */\n useEffect(() => {\n if (!isEqual(metricsQueries, metricsQueriesFromHook)) {\n setMetricsQueries(metricsQueriesFromHook);\n return;\n }\n }, [metricsQueriesFromHook, metricsQueries]);\n\n const refreshMetrics = useCallback(() => {\n queryClient.invalidateQueries({\n queryKey: [queryKey],\n });\n metricsQueries.forEach((q) => q.refetch());\n }, [metricsQueries, queryClient, queryKey]);\n\n const getMergedMetricsRecord = useCallback(\n (metricsRecords: (Record | undefined)[]) => {\n const entries = metricsRecords.filter((m) => m != null) as Record<\n string,\n TMetrics\n >[];\n if (!entries.length) {\n return undefined;\n }\n\n return entries.reduce(\n (obj, m) => {\n Object.entries(m).forEach(([key, value]) => {\n if (addCatalogMetrics == null) {\n obj[key] = value;\n } else {\n obj[key] = obj[key] ? addCatalogMetrics(obj[key], value) : value;\n }\n });\n return obj;\n },\n {} as Record\n );\n },\n [addCatalogMetrics]\n );\n\n const contextValues = useMemo>(() => {\n return {\n isLoading: metricsQueries.every((q) => q.isLoading),\n eventDetailedMetrics: getMergedMetricsRecord(\n metricsQueries.map((q) => q.data?.eventsDetailed)\n ),\n eventMetrics: getMergedMetricsRecord(\n metricsQueries.map((q) => q.data?.events)\n ),\n performerMetrics: getMergedMetricsRecord(\n metricsQueries.map((q) => q.data?.performers)\n ),\n venueMetrics: getMergedMetricsRecord(\n metricsQueries.map((q) => q.data?.venues)\n ),\n refreshMetrics: refreshMetrics,\n };\n }, [getMergedMetricsRecord, metricsQueries, refreshMetrics]);\n\n return (\n \n {children}\n \n );\n}\n\nexport function CatalogMetricsContextProvider<\n TMetrics extends { currency: string | null },\n TQuery extends EntityWithTicketsQuery & QueryWithViewMode,\n>(props: CatalogMetricsContextProviderProps) {\n const hasMetricsV2Feature = useUserHasFeature(Feature.CatalogMetricsV2);\n\n return hasMetricsV2Feature ? (\n \n ) : (\n \n );\n}\n","import { useContext } from 'react';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { Feature } from 'src/WebApiController';\n\nimport {\n createCatalogMetricsContextV1,\n createCatalogMetricsContextV2,\n} from './CatalogMetrics.type';\n\nexport function useCatalogMetricsContext<\n TMetrics extends { currency: string | null },\n>() {\n const hasMetricsV2Feature = useUserHasFeature(Feature.CatalogMetricsV2);\n\n return useContext(\n hasMetricsV2Feature\n ? createCatalogMetricsContextV2()\n : createCatalogMetricsContextV1()\n );\n}\n","import {\n FilterToolbarGroup,\n FilterToolbarItemId,\n SelectedFilters,\n} from 'src/components/Filters';\n\ninterface UseMapFiltersToFiltersStateProps {\n filters: FilterToolbarGroup[];\n appliedFilterIds: FilterToolbarItemId[];\n mandatoryFiltersToShow: FilterToolbarItemId[];\n}\n\nexport const mapFiltersToFiltersState = ({\n filters,\n appliedFilterIds,\n mandatoryFiltersToShow,\n}: UseMapFiltersToFiltersStateProps): SelectedFilters => {\n const selectedFilters: SelectedFilters = {};\n\n filters.forEach((filterToolbarGroup) => {\n const groupId = filterToolbarGroup.titleContentId;\n if (!groupId) {\n return;\n }\n filterToolbarGroup.items.forEach((filterToolbarItem) => {\n const { filterId } = filterToolbarItem;\n if (\n appliedFilterIds.includes(filterId) ||\n mandatoryFiltersToShow.includes(filterId)\n ) {\n selectedFilters[groupId] = selectedFilters[groupId] ?? [];\n selectedFilters[groupId].push({\n filterId: filterId,\n titleContentId: filterToolbarGroup.titleContentId,\n });\n }\n });\n });\n\n return selectedFilters;\n};\n","import { useMemo } from 'react';\nimport { FilterToolbarGroup } from 'src/components/Filters';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { hasAnyOfPermissions } from 'src/utils/userPermissionUtils';\n\ninterface UseFilterFiltersByPermissionProps {\n filters: FilterToolbarGroup[];\n}\n\nexport const useFilterFiltersByPermission = ({\n filters,\n}: UseFilterFiltersByPermissionProps) => {\n const { loginContext } = useAppContext();\n\n return useMemo(\n () =>\n filters\n .map((filter) => {\n return {\n ...filter,\n items: filter.items.filter(\n (fi) =>\n fi.requiredPermissions == null ||\n hasAnyOfPermissions(loginContext?.user, fi.requiredPermissions)\n ),\n };\n })\n .filter((filter) => filter.items.length > 0),\n [filters, loginContext?.user]\n );\n};\n","import { useCallback, useMemo } from 'react';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { CONTAINS_EQUALS_ENUM_FILTER_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { TextFilterEnum } from 'src/utils/eventQueryUtils';\nimport { EntityWithTicketsQuery } from 'src/WebApiController';\n\nimport { StackedFilter } from '../StackedFilter/StackedFilter';\n\nexport type TextFilterQuery = Pick<\n EntityWithTicketsQuery,\n | 'internalNotesContains'\n | 'internalNotesEquals'\n | 'internalNotesNotContains'\n | 'rowContains'\n | 'rowNotContains'\n | 'rowEquals'\n | 'sectionEquals'\n | 'sectionNotContains'\n | 'sectionContains'\n>;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\n\nexport const TextFilter = <\n TQuery extends TextFilterQuery,\n TQueryKey extends KeysOfUnion,\n>({\n query,\n setQuery,\n keys,\n isHorizontalLayout,\n}: {\n query: TQuery;\n setQuery: (q: TQuery) => void;\n keys: {\n textContainsKey: TQueryKey;\n textEqualsKey: TQueryKey;\n textNotContainsKey: TQueryKey;\n };\n isHorizontalLayout?: boolean;\n}) => {\n const { textContainsKey, textNotContainsKey, textEqualsKey } = keys;\n\n // Contains will win over Equals for defaults\n const mode = useMemo(\n () =>\n query[textContainsKey] ||\n (query[textNotContainsKey] == null && query[textEqualsKey] == null)\n ? TextFilterEnum.Contains\n : query[textNotContainsKey] ||\n (query[textContainsKey] == null && query[textEqualsKey] == null)\n ? TextFilterEnum.NotContains\n : TextFilterEnum.Equals,\n [query, textContainsKey, textEqualsKey, textNotContainsKey]\n );\n const filterText = useMemo(\n () =>\n mode === TextFilterEnum.Contains\n ? query[textContainsKey]\n : mode === TextFilterEnum.NotContains\n ? query[textNotContainsKey]\n : query[textEqualsKey],\n [mode, query, textContainsKey, textEqualsKey, textNotContainsKey]\n );\n\n const setRowFilter = useCallback(\n (mode: TextFilterEnum, text: string) => {\n if (mode === TextFilterEnum.Contains) {\n setQuery({\n ...query,\n [textContainsKey]: text,\n [textEqualsKey]: null,\n [textNotContainsKey]: null,\n });\n } else if (mode === TextFilterEnum.NotContains) {\n setQuery({\n ...query,\n [textNotContainsKey]: text,\n [textEqualsKey]: null,\n [textContainsKey]: null,\n });\n } else {\n setQuery({\n ...query,\n [textEqualsKey]: text,\n [textContainsKey]: null,\n [textNotContainsKey]: null,\n });\n }\n },\n [query, setQuery, textContainsKey, textEqualsKey, textNotContainsKey]\n );\n\n return (\n {\n if (value) {\n const text =\n value === TextFilterEnum.Contains\n ? query[textEqualsKey] ||\n query[textNotContainsKey] ||\n query[textContainsKey] ||\n ''\n : value === TextFilterEnum.NotContains\n ? query[textEqualsKey] ||\n query[textContainsKey] ||\n query[textNotContainsKey] ||\n ''\n : query[textContainsKey] ||\n query[textNotContainsKey] ||\n query[textEqualsKey] ||\n '';\n\n setRowFilter(value, text);\n }\n }}\n shape=\"rectFull\"\n />,\n {\n setRowFilter(mode, e.target.value);\n }}\n />,\n ]}\n />\n );\n};\n","import { TextFilter } from 'src/components/Filters/TextFilter';\nimport { TextFilterQuery } from 'src/components/Filters/TextFilter/TextFilter';\n\nexport const InternalNotesFilter = ({\n query,\n setQuery,\n isHorizontalLayout,\n}: {\n query: TQuery;\n setQuery: (q: TQuery) => void;\n isHorizontalLayout?: boolean;\n}) => {\n return (\n \n );\n};\n","import { useMemo } from 'react';\nimport { FilterToolbarGroup } from 'src/components/Filters';\nimport { InternalNotesFilter } from 'src/components/Filters/InternalNotesFilter/InternalNotesFilter';\nimport { TextFilterQuery } from 'src/components/Filters/TextFilter/TextFilter';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { QueryWithViewMode } from 'src/utils/eventQueryUtils';\nimport { ActionOutboxEntityType } from 'src/WebApiController';\n\ntype EntityType =\n | ActionOutboxEntityType.Listing\n | ActionOutboxEntityType.Purchase\n | ActionOutboxEntityType.Sale;\n\nconst getInternalNotesLabel = (entity: EntityType) => {\n if (entity === ActionOutboxEntityType.Listing) {\n return ContentId.PrivateInventoryNotes;\n }\n\n if (entity === ActionOutboxEntityType.Sale) {\n return ContentId.PrivateSaleNotes;\n }\n\n if (entity === ActionOutboxEntityType.Purchase) {\n return ContentId.PrivatePurchaseNotes;\n }\n\n return ContentId.PrivateNote;\n};\n\ninterface UseMultipleInternalNotesFilterProps {\n entityType: EntityType;\n isHorizontalLayout?: boolean;\n}\n\nexport const useMultipleInternalNotesFilter = <\n TQuery extends QueryWithViewMode & TextFilterQuery,\n>({\n entityType,\n isHorizontalLayout,\n}: UseMultipleInternalNotesFilterProps): FilterToolbarGroup => {\n const { tempQuery, setTempQuery } = useFilterQueryContext();\n return useMemo(() => {\n return {\n titleContentId: ContentId.Notes,\n type: 'row',\n items: [\n {\n filterId: 'internalNotes',\n labelContentId: getInternalNotesLabel(entityType),\n filterQueryKeys: [\n 'internalNotesContains',\n 'internalNotesEquals',\n 'internalNotesNotContains',\n ],\n filterItem: (\n \n ),\n },\n ],\n };\n }, [entityType, tempQuery, setTempQuery, isHorizontalLayout]);\n};\n","import { useMultipleInternalNotesFilter } from 'src/components/Filters/InternalNotesFilter/useMultipleInternalNotesFilter';\nimport { TextFilterQuery } from 'src/components/Filters/TextFilter/TextFilter';\nimport { QueryWithViewMode } from 'src/utils/eventQueryUtils';\nimport {\n ActionOutboxEntityType,\n EntityWithTicketsQuery,\n} from 'src/WebApiController';\n\ninterface InternalNotesFilterProps {\n entityType:\n | ActionOutboxEntityType.Listing\n | ActionOutboxEntityType.Purchase\n | ActionOutboxEntityType.Sale;\n isHorizontalLayout?: boolean;\n}\n\nexport const useInternalNotesFilter = <\n TQuery extends QueryWithViewMode &\n TextFilterQuery &\n Pick,\n>({\n entityType,\n isHorizontalLayout,\n}: InternalNotesFilterProps) => {\n const multipleInternalNotesFilter = useMultipleInternalNotesFilter({\n entityType,\n isHorizontalLayout,\n });\n\n return multipleInternalNotesFilter;\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { AddressClient } from 'src/WebApiController';\n\nexport function useCities() {\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const citiesWithStateProvinceQuery = useQuery({\n queryKey: [\n 'getCitiesWithStateProvince',\n activeAccountWebClientConfig.activeAccountId,\n ],\n queryFn: async () => {\n if (activeAccountWebClientConfig.activeAccountId == null) {\n return null;\n }\n return await new AddressClient(\n activeAccountWebClientConfig\n ).getCitiesWithStateProvince();\n },\n\n enabled: activeAccountWebClientConfig.activeAccountId != null,\n refetchOnWindowFocus: false,\n staleTime: Infinity,\n meta: {\n onError: (error: ErrorTypes) => {\n showErrorDialog('AddressClient.getCitiesWithStateProvince', error);\n },\n },\n });\n\n const citiesWithoutStateProvinceQuery = useQuery({\n queryKey: [\n 'getCitiesWithoutStateProvince',\n activeAccountWebClientConfig.activeAccountId,\n ],\n queryFn: async () => {\n if (activeAccountWebClientConfig.activeAccountId == null) {\n return null;\n }\n return await new AddressClient(\n activeAccountWebClientConfig\n ).getCitiesWithoutStateProvince();\n },\n\n enabled: activeAccountWebClientConfig.activeAccountId != null,\n refetchOnWindowFocus: false,\n staleTime: Infinity,\n meta: {\n onError: (error: ErrorTypes) => {\n showErrorDialog('AddressClient.getCitiesWithoutStateProvince', error);\n },\n },\n });\n\n return { citiesWithStateProvinceQuery, citiesWithoutStateProvinceQuery };\n}\n","import { useQuery } from '@tanstack/react-query';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { AddressClient } from 'src/WebApiController';\n\nexport function useStateProvinces() {\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const query = useQuery({\n queryKey: [\n 'getStateProvinces',\n activeAccountWebClientConfig.activeAccountId,\n ],\n queryFn: async () => {\n if (activeAccountWebClientConfig.activeAccountId == null) {\n return null;\n }\n return await new AddressClient(\n activeAccountWebClientConfig\n ).getStateProvinces();\n },\n\n enabled: activeAccountWebClientConfig.activeAccountId != null,\n refetchOnWindowFocus: false,\n staleTime: Infinity,\n meta: {\n onError: (error: ErrorTypes) => {\n showErrorDialog('AddressClient.getStateProvinces', error);\n },\n },\n });\n\n return query;\n}\n","import { useMemo } from 'react';\nimport {\n PosMultiSelect,\n PosMultiSelectProps,\n} from 'src/core/POS/PosMultiSelect';\nimport { useCities } from 'src/hooks/api/useCities';\nimport { useStateProvinces } from 'src/hooks/api/useStateProvinces';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { City } from 'src/WebApiController';\n\nexport const CityMultiSelector = ({\n placeholderText,\n stateProvinceIds,\n countryCodes,\n ...props\n}: Omit & {\n countryCodes: string[] | null;\n stateProvinceIds: number[] | null;\n}) => {\n const { citiesWithStateProvinceQuery, citiesWithoutStateProvinceQuery } =\n useCities();\n const stateProvincesQuery = useStateProvinces();\n\n const citiesOptions = useMemo(() => {\n if (\n citiesWithStateProvinceQuery.data == null ||\n citiesWithoutStateProvinceQuery.data == null\n ) {\n return {};\n }\n\n const cities: City[] = [];\n\n // add cities without state/province\n if (countryCodes?.length) {\n countryCodes.forEach((countryCode) => {\n cities.push(\n ...(citiesWithoutStateProvinceQuery.data?.[countryCode] ?? [])\n );\n });\n } else {\n cities.push(\n ...Object.values(citiesWithoutStateProvinceQuery.data).flatMap(\n (cities) => cities\n )\n );\n }\n\n if (stateProvinceIds?.length) {\n // If state/province is specified, add cities associated with those state/province\n stateProvinceIds.forEach((stateProvinceId) => {\n cities.push(\n ...(citiesWithStateProvinceQuery.data?.[stateProvinceId] ?? [])\n );\n });\n } else {\n // If state/province is not specified\n if (countryCodes?.length) {\n // Case 1: Country is specified, add all cities associated with that country\n const allStateProvinceIdsForCountries = countryCodes.flatMap(\n (countryCode) =>\n stateProvincesQuery.data?.[countryCode]?.map((sp) => sp.id) ?? []\n );\n\n allStateProvinceIdsForCountries.forEach((stateProvinceId) => {\n cities.push(\n ...(citiesWithStateProvinceQuery.data?.[stateProvinceId] ?? [])\n );\n });\n } else {\n // Case 2: Country is not specified, add all cities\n cities.push(\n ...Object.values(citiesWithStateProvinceQuery.data).flatMap(\n (cities) => cities\n )\n );\n }\n }\n\n return cities.reduce(\n (r, s) => {\n let displayName = s.name;\n if (stateProvinceIds?.length !== 1 && s.stateProvinceName != null) {\n displayName = `${s.name}, ${s.stateProvinceName}`;\n }\n if (countryCodes?.length !== 1) {\n displayName = `${displayName}, ${s.countryName}`;\n }\n\n r[s.id] = displayName;\n return r;\n },\n {} as Record\n );\n }, [\n citiesWithStateProvinceQuery.data,\n citiesWithoutStateProvinceQuery.data,\n countryCodes,\n stateProvinceIds,\n stateProvincesQuery.data,\n ]);\n\n return (\n \n );\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { AddressClient } from 'src/WebApiController';\n\nexport function useKnownCountries() {\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const query = useQuery({\n queryKey: [\n 'getKnownCountries',\n activeAccountWebClientConfig.activeAccountId,\n ],\n queryFn: async () => {\n if (activeAccountWebClientConfig.activeAccountId == null) {\n return null;\n }\n return await new AddressClient(\n activeAccountWebClientConfig\n ).getKnownCountries();\n },\n\n enabled: activeAccountWebClientConfig.activeAccountId != null,\n refetchOnWindowFocus: false,\n staleTime: Infinity,\n meta: {\n onError: (error: ErrorTypes) => {\n showErrorDialog('AddressClient.getKnownCountries', error);\n },\n },\n });\n\n return query;\n}\n","import { useMemo } from 'react';\nimport {\n PosMultiSelect,\n PosMultiSelectProps,\n} from 'src/core/POS/PosMultiSelect';\nimport { useKnownCountries } from 'src/hooks/api/useKnownCountries';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nexport const CountryMultiSelector = ({\n placeholderText,\n ...props\n}: Omit) => {\n const knownCountriesQuery = useKnownCountries();\n\n const knownCountriesOptions = useMemo(() => {\n if (knownCountriesQuery.data == null) {\n return {};\n }\n\n return Object.entries(knownCountriesQuery.data).reduce(\n (r, [key, value]) => {\n r[key] = value;\n return r;\n },\n {} as Record\n );\n }, [knownCountriesQuery.data]);\n\n return (\n \n );\n};\n","import { useMemo } from 'react';\nimport {\n PosMultiSelect,\n PosMultiSelectProps,\n} from 'src/core/POS/PosMultiSelect';\nimport { useStateProvinces } from 'src/hooks/api/useStateProvinces';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { StateProvince } from 'src/WebApiController';\n\nexport const StateProvinceMultiSelector = ({\n placeholderText,\n countryCodes,\n ...props\n}: Omit & {\n countryCodes: string[] | null;\n}) => {\n const stateProvincesQuery = useStateProvinces();\n\n const stateProvincesOptions = useMemo(() => {\n if (stateProvincesQuery.data == null) {\n return {};\n }\n\n let stateProvinces: StateProvince[] = [];\n\n if (countryCodes?.length) {\n stateProvinces = countryCodes.flatMap((countryCode) => {\n return stateProvincesQuery.data?.[countryCode] ?? [];\n });\n } else {\n stateProvinces = Object.values(stateProvincesQuery.data).flatMap(\n (stateProvinces) => stateProvinces\n );\n }\n\n return stateProvinces.reduce(\n (r, s) => {\n if (!s.name) {\n return r;\n }\n r[s.id] =\n countryCodes?.length === 1\n ? s.name\n : `${s.name}${s.countryName ? ', ' : ''}${s.countryName}`;\n return r;\n },\n {} as Record\n );\n }, [countryCodes, stateProvincesQuery.data]);\n\n return (\n \n );\n};\n","import { isEqual } from 'lodash-es';\nimport { useMemo } from 'react';\nimport { FilterToolbarItem } from 'src/components/Filters';\nimport {\n CityMultiSelector,\n CountryMultiSelector,\n StateProvinceMultiSelector,\n} from 'src/components/Selectors/LocationSelector';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { QueryWithViewMode } from 'src/utils/eventQueryUtils';\nimport { EntityWithTicketsQuery, Feature } from 'src/WebApiController';\n\nexport type LocationFilterQuery = Pick<\n EntityWithTicketsQuery,\n 'countryCodes' | 'stateProvinceIds' | 'cityIds'\n>;\n\nexport const useLocationFilter = <\n TQuery extends QueryWithViewMode & LocationFilterQuery,\n>(): FilterToolbarItem[] => {\n const hasFeature = useUserHasFeature(Feature.FilterEventByLocation);\n const { tempQuery, setTempQuery } = useFilterQueryContext();\n\n const { countryCodes, stateProvinceIds, cityIds } = tempQuery;\n\n return useMemo(() => {\n return hasFeature\n ? [\n {\n filterId: 'countryCodes',\n labelContentId: ContentId.Country,\n filterQueryKeys: ['countryCodes'],\n filterItem: (\n {\n const countryCodesSorted = newCountryCodes.toSorted();\n const orgCountryCodesSorted = (countryCodes ?? []).toSorted();\n const hasChange = !isEqual(\n countryCodesSorted,\n orgCountryCodesSorted\n );\n\n if (hasChange) {\n setTempQuery({\n ...tempQuery,\n countryCodes: countryCodesSorted?.length\n ? countryCodesSorted\n : null,\n stateProvinceIds: null,\n cityIds: null,\n });\n }\n }}\n />\n ),\n },\n {\n filterId: 'stateProvinceIds',\n labelContentId: ContentId.StateProvince,\n filterQueryKeys: ['stateProvinceIds'],\n filterItem: (\n {\n const stateProvinceIdsSorted = newStateProvinceIds\n .map(Number)\n .toSorted() as number[];\n const orgStateProvinceIdsSorted = (\n stateProvinceIds ?? []\n ).toSorted();\n const hasChange = !isEqual(\n stateProvinceIdsSorted,\n orgStateProvinceIdsSorted\n );\n\n if (hasChange) {\n setTempQuery({\n ...tempQuery,\n stateProvinceIds: stateProvinceIdsSorted,\n cityIds: null,\n });\n }\n }}\n />\n ),\n },\n {\n filterId: 'cityIds',\n labelContentId: ContentId.City,\n filterQueryKeys: ['cityIds'],\n filterItem: (\n {\n const cityIdsSorted = newCityIds\n .map(Number)\n .toSorted() as number[];\n const orgCityIdsSorted = (cityIds ?? []).toSorted();\n const hasChange = !isEqual(cityIdsSorted, orgCityIdsSorted);\n\n if (hasChange) {\n setTempQuery({\n ...tempQuery,\n cityIds: cityIdsSorted,\n });\n }\n }}\n />\n ),\n },\n ]\n : [];\n }, [\n cityIds,\n countryCodes,\n hasFeature,\n setTempQuery,\n stateProvinceIds,\n tempQuery,\n ]);\n};\n","import { TextFilter } from 'src/components/Filters/TextFilter';\nimport { TextFilterQuery } from 'src/components/Filters/TextFilter/TextFilter';\n\nexport const RowFilter = ({\n query,\n setQuery,\n isHorizontalLayout,\n}: {\n query: TQuery;\n setQuery: (q: TQuery) => void;\n isHorizontalLayout?: boolean;\n}) => {\n return (\n \n );\n};\n","import {\n TextFilter,\n TextFilterQuery,\n} from 'src/components/Filters/TextFilter/TextFilter';\n\nexport const SectionFilter = ({\n query,\n setQuery,\n isHorizontalLayout,\n}: {\n query: TQuery;\n setQuery: (q: TQuery) => void;\n isHorizontalLayout?: boolean;\n}) => {\n return (\n \n );\n};\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport const FilterSectionsContainer = styled.div`\n display: flex;\n flex-direction: column;\n width: calc(100vw - 48px);\n margin: 0 auto;\n max-width: var(--radix-popover-content-available-width);\n max-height: calc(var(--radix-popover-content-available-height) - 60px);\n\n ${({ theme: { media } }) => `\n ${media.makeMediaQuery(\n media.breakpoints.md,\n `\n min-width: 490px;\n max-width: max-content;\n max-height: var(--radix-popover-content-available-height)`\n )}\n `}\n\n /* Works on Firefox */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${(props) =>\n `${props.theme.colors.secondary400} ${props.theme.colors.backgroundPrimary}`};\n }\n\n /* Works on Chrome, Edge, and Safari */\n *::-webkit-scrollbar {\n width: 12px;\n height: 12px;\n }\n\n *::-webkit-scrollbar-track {\n background: ${(props) => props.theme.colors.backgroundPrimary};\n padding: 2px;\n border-radius: 6px;\n }\n\n *::-webkit-scrollbar-thumb {\n background-color: ${(props) => props.theme.colors.secondary400};\n border-radius: 6px;\n border: 2px solid ${(props) => props.theme.colors.backgroundPrimary};\n\n &:hover {\n background-color: ${(props) => props.theme.colors.secondary500};\n }\n }\n`;\n\nexport const FilterDialogBody = styled.div`\n overflow-x: hidden;\n overflow-y: auto;\n display: flex;\n flex-direction: column;\n gap: 24px;\n padding: ${() => `${vars.spacing.sm} ${vars.spacing.lg}`};\n ${({ theme: { media } }) => `\n ${media.makeMediaQuery(\n media.breakpoints.md,\n `\n padding: ${vars.spacing.sm} ${vars.spacing.xl}`\n )}\n `}\n`;\n\nexport const FilterDialogFooter = styled.div`\n display: flex;\n justify-content: space-between;\n padding: ${() => `${vars.spacing.sm} ${vars.spacing.lg} ${vars.spacing.lg}`};\n ${({ theme: { media } }) => `\n ${media.makeMediaQuery(\n media.breakpoints.md,\n `\n padding: ${vars.spacing.sm} ${vars.spacing.xl} ${vars.spacing.lg}`\n )}\n `}\n gap: ${() => vars.spacing.sm};\n`;\n\nexport const FilterDialogFooterMessage = styled.div`\n display: flex;\n padding: ${() => `${vars.spacing.sm} ${vars.spacing.lg} ${vars.spacing.lg}`};\n ${({ theme: { media } }) => `\n ${media.makeMediaQuery(\n media.breakpoints.md,\n `\n padding: ${vars.spacing.sm} ${vars.spacing.xl} ${vars.spacing.lg}`\n )}\n `}\n align-items: center;\n gap: ${() => vars.spacing.sm};\n`;\n\nexport const FilterDialogFooterButtons = styled.div`\n display: flex;\n padding: ${() => `${vars.spacing.sm} ${vars.spacing.lg} ${vars.spacing.lg}`};\n ${({ theme: { media } }) => `\n ${media.makeMediaQuery(\n media.breakpoints.md,\n `\n padding: ${vars.spacing.sm} ${vars.spacing.xl} ${vars.spacing.lg}`\n )}\n `}\n gap: ${() => vars.spacing.sm};\n`;\n\nexport const FilterDialogDisplaySection = styled.section`\n position: relative;\n display: flex;\n flex-direction: column;\n flex-wrap: wrap;\n align-items: flex-start;\n`;\n\nexport const FilterDialogDisplaySectionHeader = styled.header`\n ${({\n theme: {\n typography: { getStyles },\n },\n }) => getStyles('caption1', 'bold')};\n text-transform: uppercase;\n padding-bottom: ${() => vars.spacing.sm};\n`;\n\nexport const FilterDialogDisplaySectionContent = styled.div<{ type?: string }>`\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n flex-direction: ${(props) => (props.type === 'row' ? 'row' : 'column')};\n flex-wrap: wrap;\n width: 100%;\n gap: ${() => vars.spacing.sm};\n\n ${({ type }) =>\n type === 'row' &&\n `\n ${FilterDialogItemContainer} {\n min-width: calc(50% - 16px);\n width: max-content;\n }\n `}\n`;\n\nexport const FilterDialogItemContainer = styled.div`\n ${({\n theme: {\n typography: { getStyles },\n },\n }) => getStyles('body1', 'medium')};\n\n width: 100%;\n`;\n\nexport const FilterDialogItemDiv = styled.div`\n margin-top: ${() => vars.spacing.xxs};\n`;\n","import { ReloadButton } from 'src/components/Buttons';\nimport { OkButton } from 'src/components/Buttons/OkButton';\nimport {\n FilterToolbarGroup,\n useFilterFiltersByPermission,\n} from 'src/components/Filters';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Button, Popover } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { hasAnyOfPermissions } from 'src/utils/userPermissionUtils';\n\nimport * as styles from './FilterDialog.css';\nimport {\n FilterDialogBody,\n FilterDialogDisplaySection,\n FilterDialogDisplaySectionContent,\n FilterDialogDisplaySectionHeader,\n FilterDialogFooter,\n FilterDialogFooterButtons,\n FilterDialogFooterMessage,\n FilterDialogItemContainer,\n FilterDialogItemDiv,\n FilterSectionsContainer,\n} from './FilterDialog.styled';\n\nexport type FilterDialogProps = {\n onResetAll: () => void;\n onSubmitFilter?: () => void;\n filters: FilterToolbarGroup[];\n hasFiltersApplied?: boolean;\n onSaveQuickFilter?: () => void;\n filterAppliedMessage?: React.ReactNode;\n};\n\nexport const FilterDialog = ({\n filters,\n onResetAll,\n onSubmitFilter,\n onSaveQuickFilter,\n filterAppliedMessage,\n hasFiltersApplied,\n}: FilterDialogProps) => {\n const { loginContext } = useAppContext();\n const disabled = !hasFiltersApplied;\n\n const filteredByPermissionsFilters = useFilterFiltersByPermission({\n filters,\n });\n\n return (\n \n
    \n \n
    \n \n {filteredByPermissionsFilters.map((g, i) => (\n \n {g.titleContentId && (\n \n \n \n )}\n \n {g.items\n ?.filter(\n (fi) =>\n fi.requiredPermissions == null ||\n hasAnyOfPermissions(\n loginContext?.user,\n fi.requiredPermissions\n )\n )\n .map((c, i) => (\n \n \n \n {c.filterItem}\n \n \n ))}\n \n \n ))}\n \n \n \n {filterAppliedMessage}\n \n \n {onSaveQuickFilter && (\n \n {\n onSaveQuickFilter();\n }}\n >\n \n \n \n )}\n \n {onSubmitFilter && (\n \n \n \n )}\n \n \n
    \n );\n};\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport const FilterToolbarContainer = styled.div`\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n column-gap: ${() => vars.spacing.sm};\n overflow-x: hidden;\n overflow-y: auto;\n height: 100%;\n width: 100%;\n\n ${({ theme: { media } }) =>\n `${media.makeMediaQuery(media.breakpoints.xs, `flex-wrap: nowrap`)}`}\n`;\n\nexport const FilterCount = styled.div`\n background-color: ${(props) => props.theme.colors.backgroundBrandActive};\n width: ${() => vars.iconSize.s};\n height: ${() => vars.iconSize.s};\n color: ${(props) => props.theme.colors.textInverted};\n align-items: center;\n font-size: ${() => vars.typography.fontSize['xs']};\n line-height: 12px;\n justify-content: center;\n border-radius: ${() => vars.spacing.sm};\n display: flex;\n`;\n\nexport const CustomFilterPopoverContainer = styled.div`\n display: flex;\n flex-direction: column;\n row-gap: ${() => vars.spacing.sm};\n padding: ${() => vars.spacing.lg};\n width: 280px;\n border-radius: ${() => vars.borderRadius.s};\n box-shadow: ${(props) => props.theme.shadow(4, 'c')};\n max-width: var(--radix-popover-content-available-width);\n`;\n\nexport const CustomFilterPopoverTitle = styled.div`\n font-weight: 600;\n`;\n\nexport const CustomFilterItem = styled.div`\n display: flex;\n justify-content: space-between;\n border: 1px solid ${(props) => props.theme.colors.borderPrimary};\n border-radius: 4px;\n padding: ${() => vars.spacing.sm};\n label {\n margin-bottom: 0;\n }\n label > div:nth-child(2) {\n margin-left: ${() => vars.spacing.sm};\n }\n svg {\n display: block;\n }\n`;\n\nexport const CustomFilterIconsContainer = styled.div`\n display: flex;\n flex-shrink: 0;\n`;\n","import {\n ChangeEvent,\n FocusEvent,\n KeyboardEvent,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { CrossIcon, IconsFill, SearchSolidIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { PosTextField, PosTextFieldProps } from '../PosTextField';\n\nexport type PosSearchBoxProps = PosTextFieldProps & {\n onSearchChange?: (value: string) => void;\n onEnterKeyPressed?: (curValue: string) => void;\n minWidth?: number | string;\n maxWidth?: number | string;\n focusOnMount?: boolean;\n};\n\nexport function PosSearchBox({\n value,\n placeholder,\n onChange,\n onSearchChange,\n onEnterKeyPressed,\n onKeyDown,\n onBlur,\n minWidth,\n maxWidth,\n disabled,\n postfixDisplay,\n focusOnMount,\n ...textFieldProps\n}: PosSearchBoxProps) {\n const inputRef = useRef(null);\n const [inputText, setInputText] = useState(value?.toString() ?? '');\n\n const onInputChanged = (e: ChangeEvent) => {\n if (!disabled) {\n onChange?.(e);\n onSearchTextChanged(e.target.value);\n }\n };\n\n const onSearchTextChanged = (value: string) => {\n if (!disabled) {\n onSearchChange?.(value);\n setInputText(value);\n }\n };\n\n const onKeyDownHandler = (e: KeyboardEvent) => {\n if (!disabled) {\n const key = e.key;\n if (key === 'Enter') {\n e.stopPropagation();\n\n // TODO - figuring out how to clear the input when Enter key is handled\n onEnterKeyPressed?.(e.currentTarget.value);\n } else if (key === 'Escape') {\n e.stopPropagation();\n onSearchTextChanged('');\n }\n\n onKeyDown?.(e);\n }\n };\n\n useEffect(() => {\n if (value !== undefined && value !== inputText) {\n setInputText(value?.toString());\n }\n }, [inputText, value]);\n\n const onBlurHandler = useCallback(\n (e: FocusEvent) => {\n if (inputText?.startsWith(' ') || inputText?.endsWith(' ')) {\n setInputText(inputText.trim());\n }\n onBlur?.(e);\n },\n [inputText, onBlur]\n );\n\n const hasText = Boolean(inputText && inputText.length > 0);\n const searchPlaceholder = useContent(ContentId.Search);\n\n useEffect(() => {\n if (focusOnMount && inputRef.current) {\n inputRef.current.focus();\n }\n }, [focusOnMount]);\n\n return (\n \n }\n postfixDisplay={\n <>\n {hasText && (\n onSearchTextChanged('')}\n />\n )}\n {postfixDisplay && postfixDisplay}\n \n }\n {...textFieldProps}\n />\n );\n}\n","import { vars } from 'src/core/themes';\n\nimport { PosEnumSelect, PosEnumSelectProps } from '../PosSelect';\nimport { PosSearchBox, PosSearchBoxProps } from './PosSearchBox';\n\nexport type PosSelectableSearchBoxProps = Omit<\n PosSearchBoxProps,\n 'postfixDisplay'\n> & {\n selectorProps:\n | Omit<\n PosEnumSelectProps,\n 'shape' | 'size' | 'variant' | 'className'\n >\n | undefined;\n};\n\nexport function PosSelectableSearchBox({\n selectorProps,\n ...props\n}: PosSelectableSearchBoxProps) {\n return (\n \n )\n }\n />\n );\n}\n","import { format } from 'date-fns';\nimport { ComponentProps, useCallback, useState } from 'react';\nimport { Controller, useForm } from 'react-hook-form';\nimport { Modal as RSModal } from 'reactstrap';\nimport { CancelButton } from 'src/components/Buttons';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { DatePickerInput } from 'src/core/POS/DateSelector';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { getTextFieldState, PosTextField } from 'src/core/POS/PosTextField';\nimport { Button, Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { convertDateToTemporalPlainDateTime } from 'src/utils/dateTimeUtils';\nimport { getLocaleFromLanguageOrCurrent } from 'src/utils/localeUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n CatalogClient,\n EventMappingRequest,\n ValueTupleOfEventAndVenueAndPerformer,\n} from 'src/WebApiController';\n\nimport { FieldWrapper } from '../../modals/common/Purchase';\n\nexport type RequestEventDialogFieldValues = Omit<\n EventMappingRequest,\n 'eventDate'\n> & {\n eventDate: Date;\n};\n\nexport type RequestEventDialogProps = ComponentProps & {\n onSave: (data: ValueTupleOfEventAndVenueAndPerformer) => void;\n onCancel: () => void;\n};\n\nexport function RequestEventDialog({\n onSave,\n onCancel,\n ...dialogProps\n}: RequestEventDialogProps) {\n const {\n control,\n formState: { errors },\n register,\n handleSubmit,\n } = useForm();\n const [isLoading, setIsLoading] = useState(false);\n const { showErrorDialog } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n\n const curLocale = getLocaleFromLanguageOrCurrent();\n const onSaveHandler = useCallback[0]>(\n async ({ eventDate, ...data }) => {\n setIsLoading(true);\n const requestedEvent = {\n ...data,\n eventDate: convertDateToTemporalPlainDateTime(eventDate).toString(),\n };\n await tryInvokeApi(\n async () => {\n const results = await new CatalogClient(\n activeAccountWebClientConfig\n ).requestEventMapping(requestedEvent);\n\n if (results) {\n // Set the search query so it set the event to be displayed\n onSave(results);\n }\n },\n (error) => {\n showErrorDialog('CatalogClient.requestEventMapping', error, {\n trackErrorData: requestedEvent,\n });\n },\n () => setIsLoading(false)\n );\n },\n [activeAccountWebClientConfig, onSave, showErrorDialog]\n );\n\n return (\n }\n footer={\n <>\n \n \n \n \n \n }\n {...dialogProps}\n onCancel={onCancel}\n >\n {isLoading && }\n {!isLoading && (\n \n }\n >\n \n \n \n \n }\n >\n (\n \n d <\n new Date() /* Event date should always be in the future */\n }\n {...field}\n onDateChange={(date) => {\n const currentDate = field.value;\n date.setHours(currentDate?.getHours() ?? 0);\n date.setMinutes(currentDate?.getMinutes() ?? 0);\n field.onChange(date);\n }}\n />\n )}\n />\n \n }\n >\n (\n {\n const date = (value && new Date(value)) || new Date();\n const time = e.target.value.split(':');\n date.setHours(parseInt(time[0]));\n date.setMinutes(parseInt(time[1]));\n field.onChange(date);\n }}\n />\n )}\n />\n \n \n \n }\n >\n \n \n }\n >\n \n \n }\n >\n \n \n }\n >\n \n \n \n )}\n \n );\n}\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport const EventSearchInputBoxContainer = styled.div`\n flex: 1;\n display: grid;\n\n ${({ theme: { media } }) =>\n `${media.makeMediaQuery(media.breakpoints.md, `min-width: 600px;`)}`}\n`;\n\nexport const EventSearchItemDiv = styled.div`\n display: flex;\n gap: ${() => vars.spacing.lg};\n align-items: center;\n overflow: hidden;\n width: 100%;\n cursor: pointer;\n border: 1px solid ${(props) => props.theme.colors.borderPrimary};\n border-radius: ${() => vars.borderRadius.m};\n padding-left: ${() => vars.spacing.lg};\n\n &:hover {\n background-color: ${(props) => props.theme.colors.backgroundSecondary};\n border-color: ${(props) => props.theme.colors.borderDark};\n }\n svg {\n cursor: pointer;\n }\n`;\n\nexport const EventSearchItemInfoContainer = styled.div`\n display: flex;\n flex-direction: column;\n width: 100%;\n overflow: hidden;\n flex-grow: 1;\n padding: ${() =>\n `${vars.spacing.lg} ${vars.spacing.lg} ${vars.spacing.lg} 0`};\n`;\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport const EventSearchDropdownResultItemHeader = styled.div`\n font-weight: 700;\n border-bottom: 1px solid ${(props) => props.theme.colors.borderPrimary};\n margin-inline-start: 0;\n margin-inline-end: 0;\n\n display: flex;\n align-items: center;\n justify-content: left;\n\n &:not(:first-child) {\n padding-top: ${() => vars.spacing.lg};\n }\n\n svg {\n padding-right: ${() => vars.spacing.sm};\n }\n`;\n","import { Content } from 'src/contexts/ContentContext';\nimport { WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Event, Venue } from 'src/WebApiController';\n\nimport {\n EventDateDisplay,\n EventNameDisplay,\n VenueNameDisplay,\n} from '../../EventInfo';\nimport * as styles from './EventSearchDropdownResult.css';\n\nexport const EventSearchResultItem = ({\n event,\n venue,\n}: {\n event: Event;\n venue?: Venue | null;\n}) => {\n let eventName = event.name;\n let eventSubName = '';\n const lastIndex = eventName.lastIndexOf(' - ');\n if (lastIndex > 0) {\n eventSubName = eventName.slice(lastIndex + 3);\n eventName = eventName.slice(0, lastIndex);\n }\n\n const subnameIsVenue =\n venue?.name &&\n eventSubName.toLocaleLowerCase().includes(venue.name.toLocaleLowerCase());\n\n return (\n
    \n \n \n \n \n \n {event.viagId == null && (\n } />\n )}\n \n \n
    \n );\n};\n","import { Performer } from 'src/WebApiController';\n\nimport * as styles from './EventSearchDropdownResult.css';\n\nexport const PerformerSearchResultItem = ({\n performer,\n}: {\n performer: Performer;\n}) => {\n return (\n
    \n
    \n {performer.name}\n
    \n
    \n );\n};\n","import { Content, useContent } from 'src/contexts/ContentContext';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Event, Performer, Venue } from 'src/WebApiController';\n\nimport * as styles from './EventSearchDropdownResult.css';\n\nexport const VenueConfigSearchResultItem = ({\n events,\n performer,\n venue,\n}: {\n events: Event[];\n performer?: Performer | null;\n venue?: Venue | null;\n}) => {\n const atText = useContent(ContentId.at);\n return (\n
    \n
    \n {performer?.name ?? events[0].name}\n {venue?.name ? ` ${atText} ${venue.name}` : ''}\n
    \n
    \n {events.length} \n
    \n
    \n );\n};\n","import { Venue } from 'src/WebApiController';\n\nimport * as styles from './EventSearchDropdownResult.css';\n\nexport const VenueSearchResultItem = ({ venue }: { venue: Venue }) => {\n return (\n
    \n
    {venue.name}
    \n
    \n {`${venue.city}, ${venue.state || ''} ${venue.country?.name || ''}`}\n
    \n
    \n );\n};\n","import { useMemo } from 'react';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ContentPlaceholder } from 'src/core/POS/ContentPlaceholder';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport {\n ArtistIcon,\n LocationOutlineIcon,\n MyTicketsOutlineIcon,\n} from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getPerformerAndVenueForEvent } from 'src/utils/eventWithDataUtils';\nimport { CatalogResults, Event, Performer, Venue } from 'src/WebApiController';\n\nimport * as styles from './EventSearchDropdownResult.css';\nimport { EventSearchDropdownResultItemHeader } from './EventSearchDropdownResult.styled';\nimport { EventSearchResultItem } from './EventSearchResultItem';\nimport { PerformerSearchResultItem } from './PerformerSearchResultItem';\nimport { VenueConfigSearchResultItem } from './VenueConfigSearchResultItem';\nimport { VenueSearchResultItem } from './VenueSearchResultItem';\n\nexport const EventSearchDropdownResult = ({\n searchText,\n isSearching,\n catalogResults,\n maxNumOfResults,\n onSearchItemSelected,\n}: {\n searchText: string;\n isSearching: boolean;\n catalogResults?: CatalogResults | null;\n maxNumOfResults?: number;\n onSearchItemSelected: (\n searchText: string | null,\n event?: Event | null,\n performer?: Performer | null,\n venue?: Venue | null,\n events?: Event[]\n ) => void;\n}) => {\n const { data } = useCatalogDataContext();\n\n maxNumOfResults = maxNumOfResults ?? 5;\n\n const events = useMemo(\n () =>\n Object.values(\n catalogResults?.events || (isSearching ? [null, null, null] : [])\n )\n .toSorted(\n (e1, e2) =>\n // Reverse sort so the mapped are top\n (e2?.event.viagId ?? 0) - (e1?.event.viagId ?? 0)\n )\n .map((e, i) => {\n const { performer, venue } = getPerformerAndVenueForEvent(\n e?.event,\n catalogResults\n );\n return (\n \n e?.event &&\n onSearchItemSelected(null, e.event, performer, venue)\n }\n >\n
    \n {e?.event ? (\n \n ) : (\n \n )}\n
    \n \n );\n }),\n [catalogResults, isSearching, onSearchItemSelected]\n );\n\n const performers = useMemo(\n () =>\n Object.values(\n catalogResults?.performers || (isSearching ? [null, null, null] : [])\n ).map((p, i) => (\n p && onSearchItemSelected(null, null, p, null)}\n disabled={!p?.name}\n >\n
    \n {p ? (\n \n ) : (\n \n )}\n
    \n \n )),\n [catalogResults?.performers, isSearching, onSearchItemSelected]\n );\n\n const venues = useMemo(\n () =>\n Object.values(\n catalogResults?.venues || (isSearching ? [null, null, null] : [])\n )\n .filter((v) => !v?.excludeSearch)\n .map((v, i) => (\n v && onSearchItemSelected(null, null, null, v)}\n disabled={!v?.name}\n >\n
    \n {v ? (\n \n ) : (\n \n )}\n
    \n \n )),\n [catalogResults?.venues, isSearching, onSearchItemSelected]\n );\n\n const venueConfigs = useMemo(\n () =>\n Object.values(catalogResults?.venueCfgs ?? []).map((v, i) => {\n const { venue, performer } = getPerformerAndVenueForEvent(v[0], data);\n return (\n v && onSearchItemSelected(null, null, null, null, v)}\n >\n
    \n {v ? (\n \n ) : (\n \n )}\n
    \n \n );\n }),\n [catalogResults?.venueCfgs, data, onSearchItemSelected]\n );\n\n const resultItemList = useMemo(() => {\n const results = [];\n if (venueConfigs.length) {\n results.push(\n \n \n \n \n \n \n );\n results.push(...venueConfigs.slice(0, maxNumOfResults));\n }\n\n if (events.length) {\n results.push(\n \n \n \n \n \n \n );\n results.push(...events.slice(0, maxNumOfResults));\n }\n if (performers.length) {\n results.push(\n \n \n \n \n \n \n );\n results.push(...performers.slice(0, maxNumOfResults));\n }\n if (venues.length) {\n results.push(\n \n \n \n \n \n \n );\n results.push(...venues.slice(0, maxNumOfResults));\n }\n\n results.push();\n results.push(\n onSearchItemSelected(searchText, null, null, null)}\n disabled={!searchText}\n >\n
    \n {searchText}\n
    \n \n );\n\n return results;\n }, [\n events,\n maxNumOfResults,\n onSearchItemSelected,\n performers,\n searchText,\n venueConfigs,\n venues,\n ]);\n\n return <>{resultItemList};\n};\n","import clsx from 'clsx';\nimport { EventItemHeader } from 'src/components/Events/EventItemHeader';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { vars } from 'src/core/themes';\nimport { ChevronRightIcon } from 'src/svgs/Viagogo';\nimport { getPerformerAndVenueForEvent } from 'src/utils/eventWithDataUtils';\nimport { CatalogResults, Event, Performer, Venue } from 'src/WebApiController';\n\nimport * as styles from './EventSearch.css';\nimport {\n EventSearchItemDiv,\n EventSearchItemInfoContainer,\n} from './EventSearch.styled';\n\nexport const EventSearchItem = ({\n event,\n isSelected,\n catalog,\n onChecked,\n isSingleSelect,\n}: {\n event: Event;\n isSelected?: boolean;\n catalog: CatalogResults;\n onChecked: (\n event: Event,\n isSelected: boolean,\n performer?: Performer | null,\n venue?: Venue | null\n ) => void;\n isSingleSelect?: boolean;\n}) => {\n const { performer, venue } = getPerformerAndVenueForEvent(event, catalog);\n return (\n {\n e.stopPropagation();\n onChecked?.(event, !isSelected, performer, venue);\n }}\n >\n \n {!isSingleSelect && (\n {\n onChecked?.(event, !isSelected, performer, venue);\n }}\n />\n )}\n\n \n \n \n {isSingleSelect && (\n
    \n \n
    \n )}\n \n \n );\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { debounce } from 'lodash-es';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport { Virtuoso } from 'react-virtuoso';\nimport removeAccents from 'remove-accents';\nimport { FilterToolbarItemId } from 'src/components/Filters';\nimport { FilterDialog } from 'src/components/FilterToolbar/FilterDialog';\nimport * as filterToolbarStyles from 'src/components/FilterToolbar/FilterToolbar.css';\nimport { FilterCount } from 'src/components/FilterToolbar/FilterToolbar.styled';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n Content,\n useContent,\n useFormattedContent,\n} from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { DateRangeSelector } from 'src/core/POS/DateRangeSelector';\nimport { PosDropdown } from 'src/core/POS/PosDropdown';\nimport { PosSearchBox } from 'src/core/POS/PosSearchBox';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { vars } from 'src/core/themes';\nimport { Button, Popover, Stack } from 'src/core/ui';\nimport { PillList } from 'src/core/ui/PillList';\nimport { PillItemProps } from 'src/core/ui/PillList/PillItem';\nimport { RequestEventDialog } from 'src/dialogs/RequestEventDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport {\n ArtistIcon,\n FilterIcon,\n IconsFill,\n LocationOutlineIcon,\n} from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n EVENT_SORT_TO_CID,\n YES_NO_ENUM_FILTER_TO_CID,\n} from 'src/utils/constants/contentIdMaps';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { EventDateRangePresetNames } from 'src/utils/dateTimeUtils';\nimport {\n FromYesNoEnum,\n getAppliedFilterCounts,\n getEventSort,\n getEventUiSort,\n ToYesNoEnum,\n} from 'src/utils/eventQueryUtils';\nimport {\n getPerformerAndVenueForEvent,\n sortEventsByDate,\n sortEventsByName,\n} from 'src/utils/eventWithDataUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n CatalogClient,\n CatalogResults,\n DateTimeRange,\n Event,\n EventSearchQuery,\n EventSort,\n EventWithData,\n Performer,\n ValueTupleOfEventAndVenueAndPerformer,\n Venue,\n} from 'src/WebApiController';\n\nimport * as styles from './EventSearch.css';\nimport { EventSearchInputBoxContainer } from './EventSearch.styled';\nimport { EventSearchFilterQuery, EventSearchProps } from './EventSearch.types';\nimport { EventSearchDropdownResult } from './EventSearchDropdownResult';\nimport { EventSearchItem } from './EventSearchItem';\n\nconst DEFAULT_EVENT_SEARCH_FILTER_QUERY: EventSearchFilterQuery = {\n showParkingTickets: true,\n};\n\nexport function EventSearch({\n selectedEvents,\n eventsToSearchFrom,\n showEventsToSearchFromOnEmptySearch,\n onEventsSelect,\n searchTextPrefill,\n numEventsSelected,\n onDeleteNumEventsSelected,\n maxNumOfResults,\n allowSearchByVenueConfig,\n searchPlaceHolder,\n isSingleSelect,\n timeFrame,\n}: EventSearchProps) {\n const [tempFilterQuery, setTempFilterQuery] =\n useState(DEFAULT_EVENT_SEARCH_FILTER_QUERY);\n const [filterQuery, setFilterQuery] = useState(\n DEFAULT_EVENT_SEARCH_FILTER_QUERY\n );\n\n const [dateFilter, setDateFilter] = useState<\n DateTimeRange | null | undefined\n >();\n\n const [isAllSelected, setIsAllSelected] = useState(false);\n\n const toggleSelectAll = () => {\n const events =\n (filteredSearchEvents?.events &&\n Object.values(filteredSearchEvents.events)) ??\n [];\n onEventsSelect(\n events.map((eventWithData) => {\n const { event } = eventWithData;\n const catalog = filteredSearchEvents;\n const { performer, venue } = getPerformerAndVenueForEvent(\n eventWithData.event,\n catalog\n );\n return {\n event,\n isSelected: isAllSelected ? false : true,\n performer,\n venue,\n };\n })\n );\n setIsAllSelected((previous) => !previous);\n };\n\n const filterAppliedCounts = getAppliedFilterCounts(\n tempFilterQuery,\n DEFAULT_EVENT_SEARCH_FILTER_QUERY\n );\n const onResetAll = () => {\n setTempFilterQuery(DEFAULT_EVENT_SEARCH_FILTER_QUERY);\n setFilterQuery(DEFAULT_EVENT_SEARCH_FILTER_QUERY);\n };\n const onSubmitFilter = () => {\n setFilterQuery(tempFilterQuery);\n };\n\n const numEventsSelectedText = useFormattedContent(\n FormatContentId.EventsSelected,\n numEventsSelected.toString()\n );\n const searchPlaceholderText = useContent(\n searchPlaceHolder ?? ContentId.SearchEventPlaceholderText\n );\n const { activeAccountWebClientConfig } = useAppContext();\n const isMobile = useMatchMedia('mobile');\n const { showErrorDialog } = useErrorBoundaryContext();\n const [searchText, setSearchText] = useState(searchTextPrefill ?? '');\n const [searchTextDebounced, setSearchTextDebounced] = useState();\n const [searchEventsQuery, setSearchEventQuery] = useState<\n EventSearchQuery & {\n performer?: Performer | null;\n venue?: Venue | null;\n event?: Event | null;\n }\n >();\n const [eventSortQuery, setEventSortQuery] = useState<{\n sortBy: EventSort | null;\n isSortDescending: boolean | null;\n }>({ sortBy: null, isSortDescending: false });\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const onSearchTextChangedDebounced = useCallback(\n debounce((s: string | undefined) => {\n s = s?.trim();\n if (s !== searchTextDebounced) {\n setSearchTextDebounced(s);\n\n if (\n searchEventsQuery &&\n (!s || searchEventsQuery.performerId || searchEventsQuery.venueId)\n ) {\n // If we have a filterQuery, and we s is null (being reset)\n // or we have either performerId or venueId set\n // we want to invoke a search-event based on s\n searchEventsQuery.searchText = s || null;\n setSearchEventQuery({ ...searchEventsQuery });\n }\n }\n }, 300),\n [searchEventsQuery]\n );\n\n useEffect(() => {\n if (searchTextPrefill) {\n onSearchTextChangedDebounced(searchTextPrefill);\n }\n }, [onSearchTextChangedDebounced, searchTextPrefill]);\n\n const getStaticResult = useCallback(\n async (searchText: string) => {\n if (eventsToSearchFrom) {\n const eventResults = eventsToSearchFrom.filter((e) =>\n removeAccents(e.event.name)\n .toLocaleUpperCase()\n .includes(removeAccents(searchText ?? '').toLocaleUpperCase())\n );\n return {\n events: eventResults.reduce>((r, e) => {\n r[e.event.viagVirtualId] = e;\n return r;\n }, {}),\n venueCfgs: allowSearchByVenueConfig\n ? eventResults\n .filter((e) => e.event.venueCfgId)\n .reduce>((r, e) => {\n const key = e.event.venueCfgId!.toString();\n if (r[key]) {\n r[key] = [...r[key], e.event];\n } else {\n r[key] = [e.event];\n }\n return r;\n }, {})\n : {},\n } as CatalogResults;\n }\n },\n [allowSearchByVenueConfig, eventsToSearchFrom]\n );\n\n const searchEvents = useQuery({\n queryKey: ['searchEvents', searchEventsQuery],\n queryFn: () => {\n if (activeAccountWebClientConfig.activeAccountId == null) {\n return null;\n }\n\n if (\n !searchEventsQuery?.searchText &&\n !searchEventsQuery?.performerId &&\n !searchEventsQuery?.venueId &&\n !searchEventsQuery?.event\n ) {\n if (eventsToSearchFrom != null && showEventsToSearchFromOnEmptySearch) {\n return getStaticResult('');\n }\n // If all of these are nulls, return nothing\n return null;\n }\n\n if (eventsToSearchFrom != null) {\n return getStaticResult(searchEventsQuery?.searchText ?? '');\n }\n\n return tryInvokeApi(\n async () => {\n if (searchEventsQuery.event) {\n return {\n events: {\n [searchEventsQuery.event.viagVirtualId]: {\n event: searchEventsQuery.event,\n counts: {},\n entities: {},\n } as EventWithData,\n },\n performers: searchEventsQuery.performer?.viagId\n ? {\n [searchEventsQuery.performer?.viagId]:\n searchEventsQuery.performer,\n }\n : {},\n venues: searchEventsQuery.venue?.viagId\n ? {\n [searchEventsQuery.venue?.viagId]: searchEventsQuery.venue,\n }\n : {},\n } as CatalogResults;\n }\n\n return new CatalogClient(activeAccountWebClientConfig).searchEvents(\n searchEventsQuery\n );\n },\n (error) => {\n showErrorDialog('CatalogClient.searchEvents', error, {\n trackErrorData: searchEventsQuery,\n });\n }\n );\n },\n refetchOnWindowFocus: false,\n meta: {\n persist: false, // we do not want this thing persisted between sessions\n },\n });\n\n const filteredSearchEvents = useMemo(() => {\n const catalog = searchEvents.data;\n if (!catalog) {\n return null;\n }\n const filteredEvents: typeof catalog.events = {};\n for (const [key, event] of Object.entries(catalog.events)) {\n if (\n dateFilter?.start &&\n (!event.event.dates.start ||\n new Date(event.event.dates.start).valueOf() <\n new Date(dateFilter?.start).valueOf())\n ) {\n continue;\n }\n if (\n dateFilter?.end &&\n (!event.event.dates.start ||\n new Date(event.event.dates.start).valueOf() >\n new Date(dateFilter?.end).valueOf())\n ) {\n continue;\n }\n // filter out parking tickets\n if (\n !filterQuery.showParkingTickets &&\n // TODO we should check the event type here instead\n // currently we don't have that data in the response\n event.event.name.toLowerCase().startsWith('parking passes only')\n ) {\n continue;\n }\n filteredEvents[key] = event;\n }\n return {\n ...catalog,\n events: filteredEvents,\n };\n }, [searchEvents.data, dateFilter, filterQuery.showParkingTickets]);\n\n const shouldQuery = Boolean(\n searchTextDebounced &&\n !(searchEventsQuery?.performerId && searchEventsQuery?.venueId)\n );\n\n const autoCompleteResultQuery = useQuery({\n queryKey: [\n 'getSearchEventsAutoCompleteResult',\n searchTextDebounced,\n timeFrame,\n maxNumOfResults ?? 10,\n ],\n queryFn: () => {\n return tryInvokeApi(\n async () => {\n if (!shouldQuery) {\n return null;\n }\n\n if (eventsToSearchFrom != null) {\n return getStaticResult(searchTextDebounced!);\n } else {\n return new CatalogClient(\n activeAccountWebClientConfig\n ).getSearchEventsAutoCompleteResult(\n searchTextDebounced,\n maxNumOfResults ?? 10, // we want 10 at least so we can get the best result up top\n timeFrame\n );\n }\n },\n (error) => {\n showErrorDialog(\n 'CatalogClient.getSearchEventsAutoCompleteResult',\n error,\n { trackErrorData: { searchTextDebounced } }\n );\n }\n );\n },\n refetchOnWindowFocus: false,\n enabled: shouldQuery,\n });\n\n const getItemsToDisplay = useCallback(() => {\n let events =\n (filteredSearchEvents?.events &&\n Object.values(filteredSearchEvents.events)) ??\n [];\n\n if (!events || events.length === 0) return [];\n const result = [] as React.ReactNode[];\n if (eventSortQuery.sortBy === EventSort.MainDisplay) {\n events = sortEventsByName(events, eventSortQuery.isSortDescending);\n } else {\n events = sortEventsByDate(events, eventSortQuery.isSortDescending);\n }\n\n events.forEach((event) => {\n const isSelected = selectedEvents?.find(\n (seid) => seid === event.event.viagVirtualId\n );\n result.push(\n {\n onEventsSelect([{ event, isSelected, performer, venue }]);\n }}\n isSingleSelect={isSingleSelect}\n />\n );\n });\n return result;\n }, [\n filteredSearchEvents,\n eventSortQuery.sortBy,\n eventSortQuery.isSortDescending,\n selectedEvents,\n isSingleSelect,\n onEventsSelect,\n ]);\n\n const eventsToDisplay = getItemsToDisplay();\n\n const onSearchItemSelected = useCallback(\n async (\n searchText: string | null,\n event?: Event | null,\n performer?: Performer | null,\n venue?: Venue | null,\n events?: Event[]\n ) => {\n setSearchText(searchText || '');\n setSearchTextDebounced(undefined);\n if (event != null) {\n setSearchEventQuery({\n searchText: null,\n performerId: null,\n venueId: null,\n performer: performer,\n venue: venue,\n event: event,\n timeFrame: timeFrame ?? null,\n });\n onEventsSelect([{ event, isSelected: true, performer, venue }]);\n } else if (events != null) {\n // venue config selected\n onEventsSelect(\n events.map((ev) => ({\n event: ev,\n isSelected: true,\n performer: null,\n venue: null,\n }))\n );\n } else {\n setSearchEventQuery({\n searchText: searchText || performer?.name || '',\n performer:\n performer ??\n (searchEventsQuery?.event ? null : searchEventsQuery?.performer),\n performerId:\n performer?.viagId ?? searchEventsQuery?.performer?.viagId ?? null,\n venue:\n venue ||\n (searchEventsQuery?.event ? null : searchEventsQuery?.venue),\n venueId: venue?.viagId ?? searchEventsQuery?.venue?.viagId ?? null,\n timeFrame: timeFrame ?? null,\n });\n }\n },\n [\n onEventsSelect,\n searchEventsQuery?.event,\n searchEventsQuery?.performer,\n searchEventsQuery?.venue,\n timeFrame,\n ]\n );\n\n const hasResult = Boolean(\n (searchEventsQuery || showEventsToSearchFromOnEmptySearch) &&\n eventsToDisplay?.length\n );\n const pills = useMemo(() => {\n const pills = [] as PillItemProps[];\n if (searchEventsQuery?.performer && searchEventsQuery.event == null) {\n pills.push({\n value: 'performer',\n display: searchEventsQuery.performer.name,\n icon: ,\n onDelete: () => {\n if (searchEventsQuery) {\n searchEventsQuery.performer = undefined;\n searchEventsQuery.performerId = null;\n setSearchEventQuery({ ...searchEventsQuery! });\n }\n },\n });\n }\n\n if (searchEventsQuery?.venue && searchEventsQuery.event == null) {\n pills.push({\n value: 'venue',\n display: searchEventsQuery.venue.name,\n icon: ,\n onDelete: () => {\n if (searchEventsQuery) {\n searchEventsQuery.venue = undefined;\n searchEventsQuery.venueId = null;\n setSearchEventQuery({ ...searchEventsQuery! });\n }\n },\n });\n }\n\n if (numEventsSelected && numEventsSelected > 0) {\n pills.push({\n value: 'numEventsSelected',\n display: numEventsSelectedText,\n onDelete: onDeleteNumEventsSelected,\n });\n }\n\n return pills;\n }, [\n searchEventsQuery,\n numEventsSelected,\n numEventsSelectedText,\n onDeleteNumEventsSelected,\n ]);\n\n const requestEventDialog = useBasicDialog();\n\n const onSaveRequestEvent = useCallback(\n async (results: ValueTupleOfEventAndVenueAndPerformer) => {\n if (!results) {\n return;\n }\n\n // Set the search query so it set the event to be displayed\n setSearchEventQuery({\n ...searchEventsQuery,\n searchText: null,\n event: results.item1,\n venueId: null,\n venue: results.item2,\n performer: results.item3,\n performerId: null,\n timeFrame: timeFrame ?? null,\n });\n\n requestEventDialog.closeDialog();\n },\n [requestEventDialog, searchEventsQuery, timeFrame]\n );\n\n const openDropdown =\n searchText &&\n searchTextDebounced &&\n !(searchEventsQuery?.performerId && searchEventsQuery?.venueId);\n\n return (\n <>\n \n \n
    \n \n \n {\n setSearchText(value);\n onSearchTextChangedDebounced(value);\n }}\n postfixDisplay={\n hasResult && (\n {\n setSearchEventQuery(undefined);\n setEventSortQuery({\n sortBy: null,\n isSortDescending: true,\n });\n setSearchText('');\n }}\n >\n \n \n )\n }\n />\n
    \n }\n onOpenAutoFocus={(e) => {\n e.preventDefault();\n e.stopPropagation();\n }}\n onCloseAutoFocus={(e) => {\n e.preventDefault();\n e.stopPropagation();\n }}\n >\n {openDropdown ? (\n \n ) : undefined}\n \n \n\n
    \n \n \n
    \n \n {Boolean(filterAppliedCounts) && (\n {filterAppliedCounts}\n )}\n
    \n
    \n \n 0}\n onResetAll={onResetAll}\n onSubmitFilter={onSubmitFilter}\n filters={[\n {\n items: [\n {\n filterId:\n 'showParkingTickets' as FilterToolbarItemId,\n labelContentId: ContentId.ShowParkingTickets,\n filterQueryKeys: [\n 'showParkingTickets',\n ] as FilterToolbarItemId[],\n filterItem: (\n {\n if (\n yesNoEnumValue !==\n ToYesNoEnum(\n tempFilterQuery.showParkingTickets\n )\n ) {\n setTempFilterQuery({\n ...tempFilterQuery,\n showParkingTickets:\n FromYesNoEnum(yesNoEnumValue),\n });\n }\n }}\n />\n ),\n },\n {\n filterId: 'eventDate' as FilterToolbarItemId,\n labelContentId: ContentId.EventDate,\n filterQueryKeys: [\n 'eventDate',\n ] as unknown as FilterToolbarItemId[],\n filterItem: (\n {\n setDateFilter(value);\n }}\n />\n ),\n },\n ],\n },\n ]}\n />\n \n
    \n
    \n \n\n \n
    \n\n
    \n {hasResult && !isSingleSelect && (\n \n )}\n {hasResult && (\n {\n const [sortBy, isSortDescending] = getEventSort(sort);\n if (\n sortBy !== eventSortQuery.sortBy ||\n isSortDescending !== eventSortQuery.isSortDescending\n ) {\n setEventSortQuery({\n ...eventSortQuery,\n sortBy,\n isSortDescending,\n });\n }\n }}\n valueOptionsContent={EVENT_SORT_TO_CID}\n />\n )}\n
    \n
    \n {!hasResult ? (\n searchEvents.isPending ? (\n \n ) : (\n <>\n
    \n \n
    \n {eventsToSearchFrom == null && (\n
    \n \n \n \n
    \n )}\n \n )\n ) : (\n d}\n />\n )}\n
    \n \n {requestEventDialog.dialogProps.isOpen && (\n \n )}\n \n );\n}\n","import { useCallback } from 'react';\nimport {\n ActionOutboxEntityTypeForBulkEdit,\n bulkEditInProgress,\n hasPrimaryAffectedIds,\n} from 'src/components/common/BulkActions/BulkEditStatus';\nimport {\n BulkEditStage,\n useBulkEditHubContext,\n} from 'src/contexts/BulkEditHubContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Button } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n BulkEditPreviewWithDetails,\n BulkEditProgress,\n BulkEditStep,\n} from 'src/WebApiController';\n\nexport const BulkEditFooter = ({\n entityType,\n primaryEntityTypesAffected,\n isLoading,\n hasBackgroundBulkEditFeature,\n onClose,\n onSubmit,\n onBeforeSubmit,\n disabled,\n submittButtonRef,\n onCloseContentIdOverride,\n onSubmitContentIdOverride,\n}: {\n entityType: ActionOutboxEntityTypeForBulkEdit;\n primaryEntityTypesAffected?: ActionOutboxEntityTypeForBulkEdit[];\n isLoading?: boolean;\n hasBackgroundBulkEditFeature: boolean;\n onBeforeSubmit?: () => boolean;\n onSubmit: (\n onPreviewCallback?: (preview: BulkEditPreviewWithDetails) => void\n ) => void;\n onClose: (\n newProgress?: BulkEditProgress,\n closeMainDialogForPopover?: boolean\n ) => void;\n disabled?: boolean;\n submittButtonRef: React.RefObject;\n onCloseContentIdOverride?: ContentId;\n onSubmitContentIdOverride?: ContentId;\n}) => {\n const {\n stage,\n progress,\n preview,\n setStage,\n setPreview,\n setProgress,\n setErrors,\n setWarnings,\n retryableEntities,\n progressBeforeRetry,\n onRetryCancel,\n clearRetryStates,\n } = useBulkEditHubContext();\n\n const onCloseHandler = useCallback(\n async (newProgress?: BulkEditProgress) => {\n // We clean the progress if we want to cancel with retries\n if (retryableEntities) {\n clearRetryStates();\n setProgress(undefined);\n }\n if (stage === BulkEditStage.Preview) {\n setPreview(undefined);\n setStage(BulkEditStage.Idle);\n } else {\n if (\n stage === BulkEditStage.Idle &&\n retryableEntities &&\n progressBeforeRetry\n ) {\n onRetryCancel();\n }\n onClose(newProgress);\n }\n },\n [\n clearRetryStates,\n onClose,\n onRetryCancel,\n progressBeforeRetry,\n retryableEntities,\n setPreview,\n setProgress,\n setStage,\n stage,\n ]\n );\n\n const onSubmitHandler = useCallback(() => {\n if (onBeforeSubmit && !onBeforeSubmit()) {\n return;\n }\n\n if (stage === BulkEditStage.Idle) {\n setStage(BulkEditStage.GettingPreview);\n onSubmit((preview) => {\n setPreview(preview);\n setStage(BulkEditStage.Preview);\n });\n } else {\n setStage(BulkEditStage.Execute);\n setErrors([]); // clear errors on start/retry\n setWarnings([]); // clear warnings on start/retry\n onSubmit();\n }\n }, [\n onBeforeSubmit,\n onSubmit,\n setErrors,\n setPreview,\n setStage,\n setWarnings,\n stage,\n ]);\n\n return (\n <>\n \n\n {(progress?.step !== BulkEditStep.Done ||\n Boolean(progress?.failureCount)) && (\n \n {onSubmitContentIdOverride ? (\n \n ) : stage === BulkEditStage.Idle &&\n retryableEntities &&\n progressBeforeRetry ? (\n \n ) : stage === BulkEditStage.Idle ||\n stage === BulkEditStage.GettingPreview ? (\n \n ) : stage === BulkEditStage.Preview ||\n stage === BulkEditStage.Execute ? (\n \n ) : progress?.failureCount ? (\n \n ) : (\n \n )}\n \n )}\n \n );\n};\n","import { HubConnectionState } from '@microsoft/signalr';\nimport { ComponentProps, useCallback, useRef, useState } from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { BulkEditStatus } from 'src/components/common/BulkActions/BulkEditStatus';\nimport { EventSearch } from 'src/components/Events/EventSearch';\nimport {\n BulkEditStage,\n useBulkEditHubContext,\n} from 'src/contexts/BulkEditHubContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { useBulkEditHub } from 'src/hooks/useBulkEditHub';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n ActionOutboxEntityType,\n BulkActionType,\n BulkEditPreviewWithDetails,\n BulkEditProgress,\n BulkEditStep,\n Event,\n} from 'src/WebApiController';\n\nimport { BulkEditFooter } from '../common/BulkEditFooter';\nimport { BulkEditHeader } from '../common/BulkEditHeader';\nimport * as styles from './BulkChangeEventDialog.css';\n\nexport type BulkChangeEventDialogProps = ComponentProps & {\n entityType:\n | ActionOutboxEntityType.Listing\n | ActionOutboxEntityType.TicketGroup;\n updateKey: string;\n onOkay: (\n event: Event | null,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => void;\n onCancel: () => void;\n doNotUseBackgroundProgress?: boolean;\n};\n\nexport function BulkChangeEventDialog({\n entityType,\n updateKey,\n onOkay,\n onCancel,\n doNotUseBackgroundProgress,\n ...rest\n}: BulkChangeEventDialogProps) {\n const {\n refreshCatalog,\n eventsExpansion: { setListItemExpansion },\n } = useCatalogDataContext();\n const { setSelectionMode } = useMultiSelectionContext();\n const { setProgress, setPreview, setMainDialogOpened } =\n useBulkEditHubContext();\n const [isLoading, setIsLoading] = useState(false);\n const [event, setEvent] = useState();\n\n const onClose = useCallback(\n async (\n newProgress?: BulkEditProgress,\n closeMainDialogForPopover?: boolean\n ) => {\n if (newProgress?.step === BulkEditStep.Done) {\n setIsRefreshing(true);\n if (event) {\n setListItemExpansion(true, [event.viagVirtualId]);\n }\n\n await refreshCatalog();\n setSelectionMode(undefined);\n if (closeMainDialogForPopover) {\n setMainDialogOpened(false);\n } else {\n setProgress(undefined);\n setPreview(undefined);\n }\n setIsRefreshing(false);\n // progress kept to allow the BulkEditStatusPopover to show the result\n }\n onCancel();\n },\n [\n event,\n onCancel,\n refreshCatalog,\n setListItemExpansion,\n setMainDialogOpened,\n setPreview,\n setProgress,\n setSelectionMode,\n ]\n );\n\n const onBulkEditDone = useCallback(\n async (doneProgress: BulkEditProgress, finalErrors: string[]) => {\n if (finalErrors.length === 0 && doneProgress.step === BulkEditStep.Done) {\n onClose(doneProgress, true);\n }\n },\n [onClose]\n );\n\n const { bulkEditHub, progress, preview, initJob, stage } = useBulkEditHub(\n entityType,\n BulkActionType.ChangeEvent,\n updateKey,\n onBulkEditDone\n );\n\n const hasBackgroundBulkEditFeature =\n !doNotUseBackgroundProgress &&\n bulkEditHub?.state === HubConnectionState.Connected;\n\n const onEventsSelect = useCallback(\n (\n data: {\n event: Event;\n }[]\n ) => {\n const events = data.map((e) => e.event);\n setEvent(events[0]);\n },\n []\n );\n\n const [isRefreshing, setIsRefreshing] = useState(false);\n\n const onSubmitHandler = useCallback(\n (onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n onOkay(null, false, onPreviewReceived);\n } else {\n onOkay(event!, hasBackgroundBulkEditFeature, undefined, preview);\n }\n setIsLoading(false);\n },\n [onOkay, event, preview, hasBackgroundBulkEditFeature]\n );\n\n const submittButtonRef = useRef(null);\n\n return (\n } />\n }\n onOpened={() => {\n setEvent(undefined);\n initJob();\n }}\n onKeyUp={(e) => {\n if (submittButtonRef.current && e.key === 'Enter' && event) {\n submittButtonRef.current.click();\n }\n }}\n onClick={(e) => {\n // This so that this dialog does not cause event to flow to the EventHeader open/close event\n e.stopPropagation();\n e.preventDefault();\n }}\n onClosed={() => {\n setMainDialogOpened(false);\n if (progress) {\n setSelectionMode(undefined);\n }\n // Call the outside one if there is one\n rest.onClosed?.();\n }}\n footer={\n \n }\n onCancel={isLoading ? undefined : onCancel}\n >\n \n \n \n \n );\n}\n","import { ComponentProps, useEffect, useState } from 'react';\nimport { Controller, FormProvider, useForm } from 'react-hook-form';\nimport { Modal as RSModal } from 'reactstrap';\nimport { CancelButton } from 'src/components/Buttons';\nimport { Content, FormatContent } from 'src/contexts/ContentContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { PosTextArea } from 'src/core/POS/PosTextArea';\nimport { Button } from 'src/core/ui';\nimport { FieldWrapper } from 'src/modals/common/Purchase';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { TICKET_GROUP_EDIT_REASON_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport {\n TicketGroupEditReason,\n TicketGroupIntention,\n} from 'src/WebApiController';\n\nimport * as styles from './TicketGroupIntentionDialog.css';\n\nexport type TicketGroupIntentionDialogProps = ComponentProps & {\n salesCount?: number;\n intention: TicketGroupIntention;\n onSave: (intention: TicketGroupIntention, deallocateSales?: boolean) => void;\n saveButtonContentId?: ContentId;\n};\n\nexport function TicketGroupIntentionDialog({\n intention,\n ...rest\n}: TicketGroupIntentionDialogProps) {\n const methods = useForm({\n defaultValues: intention,\n });\n\n useEffect(() => {\n methods.reset(intention);\n }, [intention, methods]);\n\n return (\n \n \n \n );\n}\n\nconst TicketGroupIntentionDialogBody = ({\n salesCount,\n saveButtonContentId,\n onSave,\n onClosed,\n getValues,\n control,\n handleSubmit,\n formState,\n ...rest\n}: TicketGroupIntentionDialogProps &\n Omit<\n ComponentProps>,\n 'children'\n >) => {\n const { reason } = getValues();\n\n const [deallocateSales, setDeallocateSales] = useState(true);\n\n return (\n {\n e.preventDefault();\n e.stopPropagation();\n }}\n header={}\n footer={\n <>\n {onClosed && }\n {\n handleSubmit((i) => onSave(i, deallocateSales))();\n }}\n disabled={formState.isSubmitting}\n >\n \n \n \n }\n onCancel={() => {\n onClosed?.();\n }}\n >\n
    \n \n \n \n {!!salesCount && (\n \n \n {salesCount === 1 ? (\n \n ) : (\n \n )}\n \n }\n />\n \n )}\n {reason === TicketGroupEditReason.EditEvent && (\n <>\n \n }\n />\n \n\n \n {\n setDeallocateSales(!deallocateSales);\n }}\n label={\n \n }\n labelPosition=\"right\"\n />\n \n \n )}\n \n (\n \n )}\n />\n \n
    \n \n );\n};\n","import { Content } from 'src/contexts/ContentContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { EventIcon } from 'src/svgs/EventIcon';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Permission } from 'src/WebApiController';\n\nexport const LaunchChangeEvent = ({\n onClick,\n disabled,\n showIcon,\n}: {\n onClick: (e: React.MouseEvent) => void;\n disabled?: boolean;\n showIcon?: boolean;\n}) => {\n const hasPermission = useUserHasAnyOfPermissions(\n Permission.Purchases_Edit,\n Permission.Purchases_EditOwned\n );\n\n if (!hasPermission) {\n return null;\n }\n\n return (\n <>\n \n \n {showIcon && (\n \n )}\n \n \n \n \n );\n};\n","import { useCallback, useRef, useState } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { useCatalogMetricsContext } from 'src/contexts/CatalogMetricsContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { usePurchaseDataContext } from 'src/contexts/PurchaseDataContext';\nimport { BulkChangeEventDialog } from 'src/dialogs/BulkEdits/BulkChangeEventDialog';\nimport { TicketGroupIntentionDialog } from 'src/dialogs/TicketGroupIntentionDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n BulkEditPreviewWithDetails,\n BulkEditTicketGroupClient,\n Event,\n PurchaseOrderQuery,\n TicketGroupEditReason,\n} from 'src/WebApiController';\n\nimport { LaunchChangeEvent } from './LaunchChangeEvent';\n\nexport const useBulkChangeEventAction = (\n filterQuery: PurchaseOrderQuery,\n setIsLoading: (v: boolean) => void,\n isLoading?: boolean,\n groupId?: string,\n onSuccess?: () => void,\n showIcon?: boolean\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const updateKey = `ticket-group-changeEvent-event-${groupId}`;\n\n const [changeEventNote, setChangeEventNote] = useState();\n const deallocateSalesRef = useRef(true);\n\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const ticketGroupIntentionDialog = useBasicDialog();\n const {\n openDialog: openBulkChangeEventDialog,\n closeDialog: closeBulkChangeEventDialog,\n } = useDialog(DialogId.BulkChangeEvent, BulkChangeEventDialog);\n\n const { refreshData } = usePurchaseDataContext();\n const {\n eventsExpansion: { refreshExpandedListItems, setListItemExpansion },\n refreshCatalog,\n } = useCatalogDataContext();\n const { refreshMetrics } = useCatalogMetricsContext();\n const onSubmitChangeEvent = useCallback(\n async (\n newSelectedEvent: Event | null,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => {\n setIsLoading(true);\n\n if (onPreviewReceived) {\n await tryInvokeApi(\n async () => {\n const bulkEditClient = new BulkEditTicketGroupClient(\n activeAccountWebClientConfig\n );\n\n const preview =\n await bulkEditClient.bulkChangeEventPreview(filterQuery);\n\n onPreviewReceived(preview);\n },\n (error) => {\n showErrorDialog('bulkUpdateTagsPreview', error, {\n trackErrorData: { filterQuery },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n } else if (newSelectedEvent) {\n await tryInvokeApi(\n async () => {\n const succeeded = await new BulkEditTicketGroupClient(\n activeAccountWebClientConfig\n ).bulkChangeEvent(\n preview!.preview,\n newSelectedEvent.posIds[0],\n newSelectedEvent.viagId,\n newSelectedEvent.mappingId,\n deallocateSalesRef.current,\n changeEventNote ?? '',\n updateKey,\n supportBackgroundProcess\n );\n if (!supportBackgroundProcess) {\n if (succeeded) {\n onSuccess?.();\n await refreshData(true);\n // Metrics/events may have changed with TGs being cancelled, so refresh the whole catalog\n refreshMetrics();\n await refreshCatalog();\n await refreshExpandedListItems();\n }\n\n closeBulkChangeEventDialog();\n }\n },\n (error) => {\n showErrorDialog('onSubmitChangeEvent', error, {\n trackErrorData: { preview },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n }\n },\n [\n activeAccountWebClientConfig,\n changeEventNote,\n closeBulkChangeEventDialog,\n filterQuery,\n onSuccess,\n refreshCatalog,\n refreshData,\n refreshExpandedListItems,\n refreshMetrics,\n setIsLoading,\n showErrorDialog,\n updateKey,\n ]\n );\n\n const onChangeEventClick = useCallback(\n (changeEventNote?: string) => {\n setChangeEventNote(changeEventNote);\n openBulkChangeEventDialog({\n changeEventNote,\n updateKey,\n entityType: ActionOutboxEntityType.TicketGroup,\n onOkay: onSubmitChangeEvent,\n onClosed: () => {\n setIsLoading(false);\n },\n onCancel: closeBulkChangeEventDialog,\n doNotUseBackgroundProgress: onSuccess != null,\n });\n },\n [\n closeBulkChangeEventDialog,\n onSubmitChangeEvent,\n onSuccess,\n openBulkChangeEventDialog,\n setIsLoading,\n updateKey,\n ]\n );\n\n return {\n dropDown: (\n {\n e.preventDefault();\n e.stopPropagation();\n ticketGroupIntentionDialog.launchDialog();\n }}\n disabled={isLoading}\n showIcon={showIcon}\n />\n ),\n dialog: (\n <>\n {\n deallocateSalesRef.current = deallocateSales == true;\n onChangeEventClick(i.additionalInfo);\n ticketGroupIntentionDialog.closeDialog();\n }}\n saveButtonContentId={ContentId.Save}\n />\n \n ),\n };\n};\n","import { RecipeVariants } from '@vanilla-extract/recipes';\nimport clsx from 'clsx';\nimport { ComponentPropsWithoutRef, forwardRef, PropsWithChildren } from 'react';\nimport { useColumnResizingContext } from 'src/contexts/ColumnResizingContext/ColumnResizingContext';\nimport { mergeProps } from 'src/core/utils';\n\nimport { DivWithTitle } from '../DivWithTitle';\nimport * as styles from './TableCellDiv.css';\n\nexport type TableCellDivProps = ComponentPropsWithoutRef<'div'> &\n PropsWithChildren> & {\n showTooltip?: boolean;\n wrap?: 'wrap' | 'nowrap' | undefined;\n shouldHideCheckboxes?: boolean;\n };\n\nexport const TableCellDiv = forwardRef(\n function TableCellDiv(\n {\n align = 'left',\n overflowWrap,\n children,\n showTooltip,\n title,\n wrap,\n shouldHideCheckboxes,\n ...props\n },\n ref\n ) {\n const { isResizeEnabled } = useColumnResizingContext();\n return (\n \n {children}\n \n );\n }\n);\n","import { ComponentPropsWithoutRef, forwardRef } from 'react';\nimport { TableCellDiv, TableCellDivProps } from 'src/core/ui/TableCellDiv';\n\ntype TableHeaderCellDivProps = ComponentPropsWithoutRef<'div'> &\n TableCellDivProps;\n\nexport const TableHeaderCellDiv = forwardRef<\n HTMLDivElement,\n TableHeaderCellDivProps\n>(function TableHeaderCellDiv({ children, ...props }, ref) {\n return (\n \n {children}\n \n );\n});\n","import { useState } from 'react';\n\nconst useCopyToClipboard = () => {\n const [referenceIsCopied, setReferenceIsCopied] = useState('');\n\n function copyToClipboard(\n text: string,\n referenceId?: string\n ): Promise {\n return navigator.clipboard\n .writeText(text)\n .then(() => referenceId && setReferenceIsCopied(referenceId))\n .catch((err) => {\n console.error('Failed to copy: ', err);\n setReferenceIsCopied('');\n });\n }\n\n function resetReferenceIsCopiedState() {\n setReferenceIsCopied('');\n }\n\n return { referenceIsCopied, copyToClipboard, resetReferenceIsCopiedState };\n};\n\nexport default useCopyToClipboard;\n","import { useMemo } from 'react';\nimport { getContent, useContentContext } from 'src/contexts/ContentContext';\nimport {\n DELIVERY_OPTIONS_TO_CID,\n TICKET_TYPE_TO_CID,\n} from 'src/utils/constants/contentIdMaps';\nimport {\n DeliveryType,\n TicketType,\n ValueTupleOfDeliveryTypeAndNullableTicketType,\n} from 'src/WebApiController';\n\ninterface UseMapDeliveryTypesToStringProps {\n deliveryTypesObj:\n | {\n deliveryTypes?: ValueTupleOfDeliveryTypeAndNullableTicketType[];\n delivType?: DeliveryType | null;\n topPriTktType?: TicketType | null;\n }\n | undefined\n | null;\n}\n\nexport const useMapDeliveryTypesToString = ({\n deliveryTypesObj,\n}: UseMapDeliveryTypesToStringProps): string => {\n const contentContext = useContentContext();\n\n const { deliveryTypes, delivType, topPriTktType } = deliveryTypesObj || {};\n\n return useMemo(() => {\n const delTypes = deliveryTypes\n ? deliveryTypes\n : [{ item1: delivType, item2: topPriTktType }];\n\n return delTypes\n .map((dt) =>\n dt.item2\n ? getContent(TICKET_TYPE_TO_CID[dt.item2], contentContext)\n : dt.item1\n ? getContent(DELIVERY_OPTIONS_TO_CID[dt.item1], contentContext)\n : ''\n )\n .join(', ');\n }, [contentContext, delivType, deliveryTypes, topPriTktType]);\n};\n","import { useCallback, useState } from 'react';\nimport { ButtonWithIcon } from 'src/components/Buttons';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { vars } from 'src/core/themes';\nimport { ButtonProps } from 'src/core/ui';\nimport { RotatingWrapper } from 'src/core/ui/AnimatingWrapper';\nimport { DownloadIcon, ProcessingIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { downloadFileFromBlob } from 'src/utils/fileUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { PurchaseClient } from 'src/WebApiController';\n\nexport const LaunchDownloadUserDocuments = ({\n ticketGroupId,\n variant,\n iconOnlyMode,\n disabled,\n}: {\n ticketGroupId: number;\n variant?: ButtonProps['variant'];\n iconOnlyMode?: boolean;\n disabled?: boolean;\n}) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n const [isLoading, setIsLoading] = useState(false);\n\n const onDownload = useCallback(async () => {\n setIsLoading(true);\n return await tryInvokeApi(\n async () => {\n const result = await new PurchaseClient(\n activeAccountWebClientConfig\n ).downloadMergedUserDocumentsPdf(ticketGroupId);\n if (result.data) {\n downloadFileFromBlob(result.fileName ?? 'tickets.pdf', result.data);\n }\n },\n (error) => {\n showErrorDialog('ListingClient.downloadMergedUserDocumentsPdf', error);\n },\n () => setIsLoading(false)\n );\n }, [activeAccountWebClientConfig, ticketGroupId, showErrorDialog]);\n\n const onClickHandler = useCallback(\n (e: React.MouseEvent) => {\n onDownload();\n },\n [onDownload]\n );\n\n const iconFill =\n iconOnlyMode || (variant && variant !== 'regular')\n ? vars.color.textBrand\n : vars.color.textInverted;\n\n return (\n \n \n \n ) : (\n \n )\n }\n />\n );\n};\n","import { ReactNode } from 'react';\nimport { Content } from 'src/contexts/ContentContext/Content';\nimport { PosDropdown, PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { UploadPredeliveryAction } from 'src/modals/PurchaseWizard/PurchaseTicketsFlow/purchaseTicketsFlow.utils';\nimport { ChevronUpIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ListingActionType, TicketGroupInput } from 'src/WebApiController';\n\nexport const PredeliveryActionsDropdown = ({\n ticketGroup,\n disabled,\n onPredeliveryAction,\n triggerCmp,\n}: {\n ticketGroup: Pick;\n disabled?: boolean;\n onPredeliveryAction: (action: UploadPredeliveryAction) => void;\n triggerCmp?: ReactNode;\n}) => {\n const hasBarcodes = ticketGroup.tickets?.value?.some((t) => t.barcode);\n const hasExternalIds = ticketGroup.tickets?.value?.some((t) => t.externalTicketId);\n const hasTicketUrls = ticketGroup.tickets?.value?.some((t) => t.ticketUrl);\n const hasETickets = ticketGroup.tickets?.value?.some((t) => t.eTicket);\n const hasQRcodes = ticketGroup.tickets?.value?.some((t) => t.qrCode);\n return (\n \n \n \n \n \n \n )\n }\n align=\"start\"\n triggerProps={{\n disabled: disabled,\n }}\n >\n \n onPredeliveryAction(ListingActionType.PredeliverBarcodes)\n }\n >\n \n \n \n onPredeliveryAction(ListingActionType.PredeliverTicketUrls)\n }\n >\n \n \n \n onPredeliveryAction(ListingActionType.PredeliverExternalIds)\n }\n >\n \n \n \n onPredeliveryAction(ListingActionType.PredeliverETickets)\n }\n >\n \n \n onPredeliveryAction(ListingActionType.PredeliverQRCode)}\n >\n \n \n \n );\n};\n","import { ContentPlaceholder } from 'src/core/POS/ContentPlaceholder';\nimport { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport const TableRowDiv = styled('tr')<{\n selected: boolean;\n isSubRow?: boolean;\n}>`\n ${(props) =>\n props.selected\n ? `background-color: ${props.theme.colors.backgroundAccent700};`\n : props.isSubRow\n ? `background-color: ${props.theme.colors.backgroundSecondary};`\n : ''}\n min-width: max-content;\n\n &:hover,\n &:focus,\n &:active,\n &:focus-visible,\n &:focus-within {\n background-color: ${(props) =>\n props.isSubRow\n ? props.theme.colors.backgroundActiveDisabled\n : props.selected\n ? props.theme.colors.backgroundAccent700\n : props.theme.colors.backgroundInteraction};\n }\n`;\n\nexport const SeatInfoContainer = styled.div`\n display: flex;\n flex-direction: column;\n\n max-width: 300px;\n\n .listing-notes {\n font-size: ${() => vars.typography.fontSize['xs']};\n }\n`;\n\ntype TableShimmeringDivProps = { height?: string };\nexport const TableShimmeringDiv = ({ height }: TableShimmeringDivProps) => {\n return ;\n};\n\nexport const NoData = styled.div`\n color: ${({ theme: { colors } }) => colors.textPrimary};\n text-align: center;\n padding: 1em 0;\n display: flex;\n justify-content: center;\n`;\n","export const coalesceUndefinedOnly = (\n x: T | null | undefined,\n y: T | null | undefined\n) => {\n return x === undefined ? y : x;\n};\n\nexport const removeDuplicates = (arr: T[]): T[] => {\n return [...new Set(arr)];\n};\n\nexport const compareNumber = (\n numA: number | undefined | null,\n numB: number | undefined | null\n) => {\n if (numA == null && numB != null) return 1;\n if (numA != null && numB == null) return -1;\n\n if (numA != null && numB != null) {\n if (numA !== numB) {\n return numA < numB ? -1 : 1;\n }\n }\n return 0;\n};\n","import { Row } from '@tanstack/react-table';\nimport { MarketplacePaymentLineWithSaleAndEventInfo } from 'src/hooks/useGetMarketplacePaymentLineTableData';\nimport { sortGroupType } from 'src/modals/GroupListings/components/groupingUtils';\nimport { ListingWithEvent } from 'src/tables/ListingTable/ListingTable.types';\nimport { SaleWithEvent } from 'src/tables/SalesTable/SalesTable.type';\nimport {\n IListingGroupItem,\n Listing,\n ListingGroup,\n ListingNote,\n Money,\n PurchaseOrderTicketGroup,\n ReportValueType,\n Seating,\n UiMoney,\n} from 'src/WebApiController';\n\nimport { compareNumber } from './miscUtils';\n\nexport const localeCompareNumeric = (\n rowA: Row,\n rowB: Row,\n colId: string\n) => {\n const valueA = rowA.getValue(colId);\n const valueB = rowB.getValue(colId);\n if (!valueA) return valueB ? -1 : 1;\n if (!valueB) return 1;\n\n return valueA.localeCompare(valueB, undefined, {\n numeric: true,\n });\n};\n\nexport const sortMoney = (\n rowA: Row,\n rowB: Row,\n colId: string\n) => {\n const valueA = rowA.getValue(colId) as UiMoney | Money;\n const valueB = rowB.getValue(colId) as UiMoney | Money;\n if (valueA == null) return valueB ? -1 : 1;\n if (valueB == null) return 1;\n\n const amtA =\n (valueA as UiMoney).amt != null\n ? (valueA as UiMoney).amt\n : (valueA as Money).amount;\n const amtB =\n (valueB as UiMoney).amt != null\n ? (valueB as UiMoney).amt\n : (valueB as Money).amount;\n\n return amtA - amtB;\n};\n\nconst getNumericPrefix = (str: string | null) => {\n if (!str) return null;\n\n const match = str.match(/^\\d+/);\n return match ? parseInt(match[0]) : null;\n};\n\nexport const sortByNumericPrefix = (\n rowA: Row,\n rowB: Row,\n colId: string\n) => {\n const valueA = rowA.getValue(colId) as string;\n const valueB = rowB.getValue(colId) as string;\n if (!valueA) return valueB ? -1 : 1;\n if (!valueB) return 1;\n\n return compareByNumericPrefix(valueA, valueB);\n};\n\nexport const compareByNumericPrefix = (\n strA: string | null,\n strB: string | null\n) => {\n const numA = getNumericPrefix(strA);\n const numB = getNumericPrefix(strB);\n\n const cmpNumberResult = compareNumber(numA, numB);\n if (cmpNumberResult !== 0) {\n return cmpNumberResult;\n }\n\n const postfixA = strA ? strA.slice(numA ? numA.toString().length : 0) : '';\n const postfixB = strB ? strB.slice(numB ? numB.toString().length : 0) : '';\n\n return postfixA < postfixB ? -1 : 1;\n};\n\nconst compareGeneric = (a: number | string, b: number | string) => {\n if (a === b) return 0;\n if (a === '') return 1;\n if (b === '') return -1;\n if (typeof a === 'number' && typeof b !== 'number') return -1;\n if (typeof b === 'number' && typeof a !== 'number') return 1;\n return a < b ? -1 : 1;\n};\n\nexport const sortGeneric = (\n rowA: Row,\n rowB: Row,\n colId: string\n) => {\n const convertToComparableValue = (value: unknown) => {\n const str = String(value ?? '')\n .trim()\n .toLowerCase();\n const strAsInt = parseInt(str);\n return !Number.isNaN(strAsInt) ? strAsInt : str;\n };\n\n const [a, b] = [\n convertToComparableValue(rowA.getValue(colId)),\n convertToComparableValue(rowB.getValue(colId)),\n ];\n\n return compareGeneric(a, b);\n};\n\nexport const sortListingSeating = (\n rowA: Row,\n rowB: Row,\n colId: string\n) => {\n if (rowA.original?.isLtGrp && rowB.original?.listing?.isLtGrp) {\n return sortGroupType(\n (rowA.original.listing as ListingGroup).groupType,\n (rowB.original.listing as ListingGroup).groupType\n );\n } else if (rowA.original?.isLtGrp || rowB.original?.listing?.isLtGrp) {\n return rowA.original?.isLtGrp ? 1 : -1; // listing group sort first\n }\n\n return sortSeatingForTable(rowA, rowB, colId);\n};\n\nexport const sortListingSeatingSection = (\n rowA: Row,\n rowB: Row,\n colId: string\n) => {\n if (rowA.original?.isLtGrp && rowB.original?.listing?.isLtGrp) {\n return sortGroupType(\n (rowA.original.listing as ListingGroup).groupType,\n (rowB.original.listing as ListingGroup).groupType\n );\n } else if (rowA.original?.isLtGrp || rowB.original?.listing?.isLtGrp) {\n return rowA.original?.isLtGrp ? 1 : -1; // listing group sort first\n }\n\n return sortSeatingSection(\n rowA.original?.listing?.seating,\n rowB.original?.listing?.seating\n );\n};\n\nexport const sortPurchaseOrderTicketGroupSeating = (\n rowA: Row,\n rowB: Row,\n colId: string\n) => {\n if (!rowA?.original || !rowB?.original) {\n return 0;\n }\n\n const rowATicketGroupToGetSeating = rowA.original.isTktGrp\n ? rowA.original\n : rowA.original.ticketGroupItems?.[0];\n\n const rowBTicketGroupToGetSeating = rowB.original.isTktGrp\n ? rowB.original\n : rowB.original.ticketGroupItems?.[0];\n\n if (rowATicketGroupToGetSeating?.seating == null) {\n return -1;\n }\n\n if (rowBTicketGroupToGetSeating?.seating == null) {\n return -1;\n }\n\n return sortSeating(\n rowATicketGroupToGetSeating.seating,\n rowBTicketGroupToGetSeating.seating\n );\n};\n\nexport const sortSalesSeating = (\n rowA: Row,\n rowB: Row,\n colId: string\n) => {\n if (!rowA?.original || !rowB?.original) {\n return 0;\n }\n\n return sortSeating(rowA.original.sale.seating, rowB.original.sale.seating);\n};\n\nexport const sortSalesSeatingSection = (\n rowA: Row,\n rowB: Row,\n colId: string\n) => {\n if (!rowA?.original || !rowB?.original) {\n return 0;\n }\n\n return sortSeatingSection(\n rowA.original.sale.seating,\n rowB.original.sale.seating\n );\n};\n\nexport const sortSeatingForTable = (\n rowA: Row,\n rowB: Row,\n colId: string\n) => {\n const valueA = rowA.getValue(colId);\n const valueB = rowB.getValue(colId);\n if (!valueA) return valueB ? -1 : 1;\n if (!valueB) return 1;\n\n const { seating: a } = valueA as {\n seating: Seating;\n };\n const { seating: b } = valueB as {\n seating: Seating;\n };\n\n return sortSeating(a, b);\n};\n\nexport const sortSeating = (a: Seating, b: Seating) => {\n if (a.section !== b.section) {\n return compareByNumericPrefix(a.section, b.section);\n } else {\n if (a.row !== b.row) {\n return compareByNumericPrefix(a.row, b.row);\n }\n\n return sortSeatingSeats(a, b);\n }\n};\n\nexport const sortSeatingSeatsForTable = (\n rowA: Row,\n rowB: Row,\n colId: string\n) => {\n const valueA = rowA.getValue(colId) as Seating;\n const valueB = rowB.getValue(colId) as Seating;\n if (!valueA) return valueB ? -1 : 1;\n if (!valueB) return 1;\n\n return sortSeatingSeats(valueA, valueB);\n};\n\nexport const sortSeatingSeats = (a: Seating, b: Seating) => {\n const seatFromA = a.seatFr ?? '';\n const seatFromB = b.seatFr ?? '';\n const seatFromAInt = parseInt(seatFromA);\n const seatFromBInt = parseInt(seatFromB);\n if (!isNaN(seatFromAInt) && !isNaN(seatFromBInt)) {\n return seatFromAInt < seatFromBInt ? -1 : 1;\n }\n return seatFromA < seatFromB ? -1 : 1;\n};\n\nexport const sortPurchaseOrderSeatingSection = (\n rowA: Row,\n rowB: Row,\n colId: string\n) => {\n if (!rowA?.original || !rowB?.original) {\n return 0;\n }\n\n const rowATicketGroupToGetSeating = rowA.original.isTktGrp\n ? rowA.original\n : rowA.original.ticketGroupItems?.[0];\n\n const rowBTicketGroupToGetSeating = rowB.original.isTktGrp\n ? rowB.original\n : rowB.original.ticketGroupItems?.[0];\n\n if (rowATicketGroupToGetSeating?.seating == null) {\n return -1;\n }\n\n if (rowBTicketGroupToGetSeating?.seating == null) {\n return -1;\n }\n\n return sortSeatingSection(\n rowATicketGroupToGetSeating.seating,\n rowBTicketGroupToGetSeating.seating\n );\n};\n\nexport const sortSeatingSection = (\n seatingA: Seating | undefined,\n seatingB: Seating | undefined\n) => {\n if (!seatingA) return -1;\n if (!seatingB) return 1;\n\n return compareByNumericPrefix(seatingA.section, seatingB.section);\n};\n\nexport const safeSortDateTime = (\n rowA: Row,\n rowB: Row,\n colId: string\n) => {\n // Convert both null and empty string to 0 timestamp\n const valueA = rowA.getValue(colId) || 0;\n const valueB = rowB.getValue(colId) || 0;\n\n const timestampA = new Date(valueA).getTime();\n const timestampB = new Date(valueB).getTime();\n if (!isNaN(timestampA) && !isNaN(timestampB)) {\n return timestampA - timestampB;\n }\n return isNaN(timestampA) ? 1 : -1;\n};\n\nexport enum GridActionType {\n Edit,\n Delete,\n Select,\n Share,\n Duplicate,\n History,\n}\n\nexport const getNextEditableListingRow = (\n rows: ListingWithEvent[],\n currentRow: ListingWithEvent\n): ListingWithEvent | undefined => {\n const currentIndex = rows.findIndex(\n (row) => row.listing?.id === currentRow.listing?.id\n );\n for (let index = currentIndex + 1; index < rows.length; index++) {\n const row = rows[index];\n if (!row.isCompListing && !row.isLtGrp) {\n return row;\n }\n }\n return undefined;\n};\n\nconst sortLstingInGroup = (items: IListingGroupItem[]) => {\n return items.toSorted((a, b) => {\n if (a.isLtGrp && b.isLtGrp) {\n return sortGroupType(\n (a as ListingGroup).groupType,\n (b as ListingGroup).groupType\n );\n }\n if (a.isLtGrp || b.isLtGrp) {\n return a.isLtGrp ? -1 : 1; // listing group sort first\n }\n if (a.ltGrpPrior && b.ltGrpPrior) {\n return a.ltGrpPrior - b.ltGrpPrior;\n }\n // Sold listings will have ltGrpPrior cleaned and we fallback to sortby seating\n if (a.ltGrpPrior && b.ltGrpPrior) {\n return a.ltGrpPrior ? -1 : 1;\n }\n return sortSeating(a.seating, b.seating);\n });\n};\n\nexport const sortGroupedListing = (listing: Listing) => {\n if (!listing.isLtGrp) {\n return;\n }\n (listing as ListingGroup).groupItems = sortLstingInGroup(\n (listing as ListingGroup).groupItems\n );\n for (const group of (listing as ListingGroup).groupItems) {\n sortGroupedListing(group as Listing);\n }\n};\n\nexport const sortMarketplacePaymentLineSeating = (\n rowA: Row,\n rowB: Row,\n colId: string\n) => {\n if (!rowA?.original?.seating || !rowB?.original?.seating) {\n return 0;\n }\n\n return sortSeating(rowA.original.seating, rowB.original.seating);\n};\n\n/**\n * Column filter custom function: https://tanstack.com/table/v8/docs/guide/column-filtering#custom-filter-functions\n * Assumes the column value contains a Seating object and compares by section\n * Use together with uniqueValueVariant='seatingSection' in ColumnMeta in Table.tsx\n */\nexport const filterSeatingSectionFn = (\n row: Row,\n columnId: string,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n filterValue: any\n): boolean => {\n if (!filterValue) {\n return true;\n }\n\n const filterSectionValues = filterValue as string[];\n if (filterSectionValues.length === 0) {\n return true;\n }\n\n // Skip if row has children\n if (row.getLeafRows().length > 0) {\n const leafRows = row.getLeafRows();\n for (const leafRow of leafRows) {\n if (filterSeatingSectionFn(leafRow, columnId, filterValue)) {\n return true;\n }\n }\n\n return false;\n }\n\n const value = row.getValue(columnId);\n\n if (!value) {\n return false;\n }\n\n const { seating } = value as {\n seating: Seating;\n };\n\n return filterSectionValues.includes(seating.section);\n};\n\n/**\n * Column filter custom function: https://tanstack.com/table/v8/docs/guide/column-filtering#custom-filter-functions\n * Assumes the column value returns a list of ListingNotes and compares by listingNoteId\n * Use together with uniqueValueVariant='seatTraits' in ColumnMeta in Table.tsx\n */\nexport const filterSeatTraitsFn = (\n row: Row,\n columnId: string,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n filterValue: any\n): boolean => {\n if (!filterValue) {\n return true;\n }\n\n const filterListingNoteIds = (filterValue as string[]).map((value) =>\n Number(value)\n );\n if (filterListingNoteIds.length === 0) {\n return true;\n }\n\n // Skip if row has children\n if (row.getLeafRows().length > 0) {\n const leafRows = row.getLeafRows();\n for (const leafRow of leafRows) {\n if (filterSeatTraitsFn(leafRow, columnId, filterValue)) {\n return true;\n }\n }\n\n return false;\n }\n\n const value = row.getValue(columnId) as ListingNote[] | null | undefined;\n\n return (\n value?.some((note) => filterListingNoteIds.includes(note.listingNoteId)) ??\n false\n );\n};\n\n/**\n * Column filter custom function: https://tanstack.com/table/v8/docs/guide/column-filtering#custom-filter-functions\n * If the filter value has any overlap with the seat range, return true\n * Use together with columnFilterVariant='seatRange' in ColumnMeta in Table.tsx\n */\nexport const filterSeatRangeFn = (\n row: Row,\n columnId: string,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n filterValue: any\n): boolean => {\n if (!filterValue) {\n return true;\n }\n\n const [filterMin, filterMax] = filterValue as [number, number];\n if (filterMin == null && filterMax == null) {\n return true;\n }\n\n const seating = row.getValue(columnId);\n\n if (!seating) {\n return false;\n }\n\n const seatFrNum = Number(seating.seatFr || 'NaN');\n const seatToNum = Number(seating.seatTo || 'NaN');\n\n let result = false;\n\n if (isNaN(seatFrNum) && isNaN(seatToNum)) {\n result = false;\n } else if (isNaN(seatToNum)) {\n if (filterMin == null) {\n result = seatFrNum <= filterMax;\n } else if (filterMax == null) {\n result = seatFrNum >= filterMin;\n } else {\n result = seatFrNum >= filterMin && seatFrNum <= filterMax;\n }\n } else {\n // seatFrNum and seatToNum are both numbers\n // return true if [seatFrNum, seatToNum] and [filterMin, filterMax] have any overlap\n if (filterMin == null) {\n result = seatFrNum <= filterMax;\n } else if (filterMax == null) {\n result = seatToNum >= filterMin;\n } else {\n result = seatFrNum <= filterMax && seatToNum >= filterMin;\n }\n }\n\n if (!result) {\n const leafRows = row.getLeafRows();\n for (const leafRow of leafRows) {\n if (filterSeatRangeFn(leafRow, columnId, filterValue)) {\n result = true;\n break;\n }\n }\n }\n\n return result;\n};\n\n/**\n * Column filter custom function: https://tanstack.com/table/v8/docs/guide/column-filtering#custom-filter-functions\n * Assumes the column value returns a string, compares case insensitive\n * Use together with uniqueValueVariant=undefined in ColumnMeta in Table.tsx\n */\nexport const filterStringMultiSelect = (\n row: Row,\n columnId: string,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n filterValue: any\n): boolean => {\n if (!filterValue) {\n return true;\n }\n\n const filterValues = (filterValue as string[]).map((value) =>\n value.toLowerCase()\n );\n if (filterValues.length === 0) {\n return true;\n }\n\n // Skip if row has children\n if (row.getLeafRows().length > 0) {\n const leafRows = row.getLeafRows();\n for (const leafRow of leafRows) {\n if (filterStringMultiSelect(leafRow, columnId, filterValue)) {\n return true;\n }\n }\n\n return false;\n }\n\n const value = row.getValue(columnId) as string | null | undefined;\n\n if (!value) {\n return false;\n }\n\n return filterValues.includes(value.toLowerCase());\n};\n\nexport const getReportValueTypeDisplayConfig = (\n valueType: ReportValueType | undefined\n) => {\n const isNumeric =\n valueType === ReportValueType.Integer ||\n valueType === ReportValueType.Money ||\n valueType === ReportValueType.Decimal ||\n valueType === ReportValueType.IntegerList;\n\n const isCurrency = valueType === ReportValueType.Money;\n const isPercent = valueType === ReportValueType.Money;\n const isDateTime =\n valueType === ReportValueType.DateTime ||\n valueType === ReportValueType.DateTimeList;\n\n const isBoolean =\n valueType === ReportValueType.Boolean ||\n valueType === ReportValueType.BooleanList;\n\n const isArray =\n valueType === ReportValueType.DateTimeList ||\n valueType === ReportValueType.IntegerList ||\n valueType === ReportValueType.GuidList ||\n valueType === ReportValueType.UserList ||\n valueType === ReportValueType.StringList ||\n valueType === ReportValueType.BooleanList;\n\n return {\n isNumeric,\n isCurrency,\n isPercent,\n isDateTime,\n isBoolean,\n isArray,\n };\n};\n","import { useMemo } from 'react';\nimport { Ticket } from 'src/WebApiController';\n\ninterface UseNumberOfSalesProps {\n ticketGroups?: { tickets?: Ticket[] | null }[] | null;\n}\n\nexport const useGetListingAndSaleIds = ({\n ticketGroups,\n}: UseNumberOfSalesProps) => {\n return useMemo(() => {\n const ids = ticketGroups?.flatMap((tg) => ({\n saleIds:\n tg.tickets\n ?.filter((t) => t.saleId || t.holdId)\n ?.map((t) => (t.saleId || t.holdId)!) ?? [],\n listingIds:\n tg.tickets?.filter((t) => t.listingId)?.map((t) => t.listingId!) ?? [],\n }));\n\n const result = ids?.reduce(\n (r, cur) => {\n cur.saleIds.forEach((id) => r.saleIds.add(id));\n cur.listingIds.forEach((id) => r.listingIds.add(id));\n return r;\n },\n {\n saleIds: new Set(),\n listingIds: new Set(),\n }\n );\n\n return (\n result ?? {\n saleIds: new Set(),\n listingIds: new Set(),\n }\n );\n }, [ticketGroups]);\n};\n","import { isEqual } from 'lodash-es';\nimport { useCallback, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { BlinkingWrapper } from 'src/core/ui/AnimatingWrapper';\nimport { TicketGroupIntentionDialog } from 'src/dialogs/TicketGroupIntentionDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useGetListingAndSaleIds } from 'src/modals/common/Purchase/hooks/useGetListingAndSaleIds';\nimport { IconsFill, WarningSolidIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { PurchaseOrderDetailsInput } from 'src/utils/purchaseUtils';\nimport { TicketGroupInput, TicketGroupIntention } from 'src/WebApiController';\n\nimport { ChangesIndicator } from '../PurchaseTicketTable.styled';\n\nexport const TicketGroupStatusIndicator = ({\n ticketGroup,\n}: {\n ticketGroup: TicketGroupInput;\n}) => {\n const { setValue, getFieldState, watch, formState } =\n useFormContext();\n const ticketGroups = watch('ticketGroups');\n const intentions = watch('ticketGroupIntentions');\n\n const unsavedActionText = useContent(ContentId.UnsavedChanges);\n\n const originalTicketGroup = useMemo(\n () =>\n formState.defaultValues?.ticketGroups?.find(\n (t) => t?.ticketGroupId === ticketGroup.ticketGroupId\n ),\n [formState.defaultValues?.ticketGroups, ticketGroup.ticketGroupId]\n );\n\n const index = useMemo(\n () =>\n ticketGroups.findIndex(\n (tg) => tg.ticketGroupId === ticketGroup.ticketGroupId\n ),\n [ticketGroup.ticketGroupId, ticketGroups]\n );\n const error = getFieldState(`ticketGroups.${index}`, formState).error\n ?.message;\n\n const intention = useMemo(\n () => intentions[ticketGroup.ticketGroupId],\n [intentions, ticketGroup.ticketGroupId]\n );\n\n const ticketGroupIntentionDialog = useBasicDialog();\n const hasChanges = !isEqual(ticketGroup, originalTicketGroup);\n\n const onTicketGroupIntentionSave = useCallback(\n (intention: TicketGroupIntention) => {\n intentions[intention.ticketGroupId] = intention;\n setValue('ticketGroupIntentions', { ...intentions });\n ticketGroupIntentionDialog.closeDialog();\n },\n [intentions, setValue, ticketGroupIntentionDialog]\n );\n\n const { saleIds } = useGetListingAndSaleIds({\n ticketGroups: [{ tickets: ticketGroup.tickets?.value }],\n });\n\n return (\n <>\n {error && (\n
    \n \n
    \n )}\n {hasChanges && (\n \n ticketGroupIntentionDialog.launchDialog()}\n >\n *\n \n \n )}\n \n \n );\n};\n","import { ColumnDef } from '@tanstack/react-table';\nimport { useCallback, useContext, useState } from 'react';\nimport { Link } from 'react-router-dom';\nimport { IconButton } from 'src/components/Buttons';\nimport { SeatingInfo } from 'src/components/common/SeatingInfo';\nimport { EventDateDisplay } from 'src/components/Events/EventInfo';\nimport { useBulkChangeEventAction } from 'src/components/Purchases/PurchaseActionDropdown/components/BulkChangeEventAction';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport {\n Content,\n useContent,\n useContentContext,\n} from 'src/contexts/ContentContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { HorizontalTextList } from 'src/core/POS/HorizontalTextList';\nimport { PosDropdown, PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { TableHeaderCellDiv } from 'src/core/ui/TableHeaderCellDiv';\nimport useCopyToClipboard from 'src/hooks/useCopyToClipboard';\nimport { useMapDeliveryTypesToString } from 'src/hooks/useMapDeliveryTypesToString';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { LaunchDownloadUserDocuments } from 'src/modals/PurchaseWizard/LaunchDownloadUserDocuments';\nimport { PredeliveryActionsDropdown } from 'src/modals/PurchaseWizard/PurchaseTicketsFlow/components/PredeliveryActionsDropdown';\nimport { UploadPredeliveryAction } from 'src/modals/PurchaseWizard/PurchaseTicketsFlow/purchaseTicketsFlow.utils';\nimport { AmendActionData } from 'src/modals/PurchaseWizard/PurchaseWizard.types';\nimport { CopyIcon } from 'src/svgs';\nimport { OpenLinkIcon } from 'src/svgs/OpenLinkIcon';\nimport {\n DeleteIcon,\n EditIcon,\n IconsFill,\n MoreIcon,\n ProcessingIcon,\n UploadIcon,\n} from 'src/svgs/Viagogo';\nimport {\n SeatInfoContainer,\n TableShimmeringDiv,\n} from 'src/tables/Table/Table.styled';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { EmptyPurchaseQuery } from 'src/utils/eventQueryUtils';\nimport {\n compareEventsByName,\n getEventPerformerVenue,\n} from 'src/utils/eventWithDataUtils';\nimport { getListingNoteIcon } from 'src/utils/listingNotesUtils';\nimport { formatCurrency } from 'src/utils/numberFormatter';\nimport {\n combineWithTicketGroupId,\n combineWithTicketGroupIdSimple,\n getPurchaseOrderDetailsModalConfigWithDeepLink,\n getPurchaseOrderRelativeUrl,\n} from 'src/utils/purchaseUtils';\nimport { sortMoney, sortSeatingForTable } from 'src/utils/tableUtils';\nimport { getDeliveryTypeIcon } from 'src/utils/ticketTypeUtils';\nimport { toSeating } from 'src/utils/ticketUtils';\nimport {\n DeliveryType,\n Event,\n Feature,\n ListingNote,\n Performer,\n PurchaseOrderDetails,\n Seating,\n TicketGroupEditReason,\n TicketGroupInput,\n Venue,\n} from 'src/WebApiController';\n\nimport { TicketGroupStatusIndicator } from './TicketGroupStatusIndicator';\nimport * as styles from './TicketGroupTableColumnsConfig.css';\n\nexport type TicketGroupAdditionalData = {\n event?: Event | null;\n performer?: Performer | null;\n venue?: Venue | null;\n purchaseVendorOrderId?: string | null;\n amendActionData?: AmendActionData;\n};\n\nexport type TicketGroupActionParams = {\n ticketGroupId: number;\n action: TicketGroupEditReason;\n additionalData?: TicketGroupAdditionalData;\n};\n\nexport type TicketGroupWithHandlers = {\n ticketGroup: TicketGroupInput;\n disabled?: boolean;\n additionalData?: TicketGroupAdditionalData;\n onTicketGroupAction?: (\n params: TicketGroupActionParams,\n showConfirmDialog?: boolean\n ) => void;\n /**\n * Show the ticket groups from expanding a single purchase\n */\n showFromPurchaseAccordions?: boolean;\n};\n\nexport const TICKET_GROUP_TABLE_COLUMNS_CONFIG: ColumnDef[] =\n [\n {\n id: 'event',\n header: () => (\n \n \n \n ),\n minSize: 230,\n maxSize: 600,\n accessorFn: (data) => data?.ticketGroup,\n cell: function Cell({ row: { original } }) {\n const ticketGroup = original?.ticketGroup;\n const { data } = useCatalogDataContext();\n\n if (!ticketGroup) {\n return ;\n }\n\n const { event } = getEventPerformerVenue(\n ticketGroup.viagogoVirtualId,\n data\n );\n\n return (\n \n {event?.event?.name}\n \n );\n },\n sortingFn: compareEventsByName,\n },\n {\n id: 'venue',\n header: () => (\n \n \n \n ),\n minSize: 230,\n maxSize: 600,\n accessorFn: (data) => data?.ticketGroup,\n cell: function Cell({ row: { original } }) {\n const ticketGroup = original?.ticketGroup;\n const { data } = useCatalogDataContext();\n\n if (!ticketGroup) {\n return ;\n }\n\n const { venue } = getEventPerformerVenue(\n ticketGroup.viagogoVirtualId,\n data\n );\n\n return (\n \n {venue?.name}\n \n );\n },\n },\n {\n id: 'eventDate',\n header: () => (\n \n \n \n ),\n minSize: 230,\n maxSize: 600,\n accessorFn: (data) => data?.ticketGroup,\n cell: function Cell({ row: { original } }) {\n const ticketGroup = original?.ticketGroup;\n const { data } = useCatalogDataContext();\n\n if (!ticketGroup) {\n return ;\n }\n\n const { event } = getEventPerformerVenue(\n ticketGroup.viagogoVirtualId,\n data\n );\n\n return (\n \n \n \n );\n },\n },\n {\n id: 'seating',\n header: () => (\n \n \n \n ),\n minSize: 230,\n maxSize: 400,\n accessorFn: (data) =>\n data\n ? {\n seating: toSeating(data.ticketGroup),\n listingNotes: data.ticketGroup.listingNotes?.value,\n }\n : null,\n cell: function Cell({ getValue, row: { original } }) {\n const contentContext = useContentContext();\n const hasListingNotesAdditionalInfoFeature = useUserHasFeature(\n Feature.ListingNotesAdditionalInfo\n );\n\n const value = getValue();\n if (!original) {\n return ;\n }\n\n const { seating, listingNotes } = value as {\n seating: Seating;\n listingNotes: ListingNote[] | null;\n };\n return (\n \n \n {listingNotes?.length ? (\n n.listingNoteText)}\n maxTextsToShowOnHover={listingNotes.length}\n />\n ) : null}\n \n );\n },\n sortingFn: sortSeatingForTable,\n },\n {\n id: 'quantity',\n header: () => (\n \n \n \n ),\n minSize: 80,\n maxSize: 80,\n accessorFn: (data) =>\n data ? data.ticketGroup.numberOfTickets?.value ?? 0 : null,\n cell: function Cell({ getValue, row: { original } }) {\n const value = getValue() as number;\n const quantityText = useContent(ContentId.QuantityAbbreviated);\n if (!original) {\n return ;\n }\n\n if (original.showFromPurchaseAccordions) {\n return (\n {`${quantityText}: ${value}`}\n );\n }\n\n return {value};\n },\n },\n {\n id: 'ticketType',\n header: () => (\n \n \n \n ),\n minSize: 65,\n maxSize: 65,\n accessorFn: (data) => data?.ticketGroup?.deliveryType?.value,\n cell: function Cell({ getValue, row: { original } }) {\n const delivType = getValue();\n const strDelivType = useMapDeliveryTypesToString({\n deliveryTypesObj: {\n delivType,\n },\n });\n\n if (!original) {\n return ;\n }\n const icon = getDeliveryTypeIcon(\n delivType,\n null,\n IconsFill.currentColor\n );\n return (\n \n {icon}\n \n );\n },\n },\n {\n id: 'cost',\n header: () => (\n \n \n \n ),\n minSize: 90,\n maxSize: 110,\n accessorFn: (data) =>\n formatCurrency(\n data?.ticketGroup?.unitCost?.value,\n data?.ticketGroup?.currencyCode?.value\n ),\n cell: function Cell({ getValue, row: { original } }) {\n const value = getValue() as string;\n const costText = useContent(ContentId.Cost);\n if (!original) {\n return ;\n }\n\n if (original.showFromPurchaseAccordions) {\n return (\n {`${costText}: ${value}`}\n );\n }\n\n return {value};\n },\n sortingFn: sortMoney,\n },\n {\n id: 'expectedValue',\n header: () => (\n \n \n \n ),\n minSize: 90,\n maxSize: 110,\n accessorFn: (data) =>\n formatCurrency(\n data?.ticketGroup?.expectedValue?.value,\n data?.ticketGroup?.currencyCode?.value\n ),\n cell: ({ getValue, row: { original } }) => {\n const value = getValue() as string;\n if (!original) {\n return ;\n }\n return {value};\n },\n sortingFn: sortMoney,\n },\n {\n id: 'taxPaid',\n header: () => (\n \n \n \n ),\n minSize: 90,\n maxSize: 110,\n accessorFn: (data) => Boolean(data?.ticketGroup?.taxPaid?.value),\n cell: ({ getValue, row: { original } }) => {\n const taxPaid = getValue() as boolean;\n if (!original) {\n return ;\n }\n return (\n \n {taxPaid ? (\n \n ) : (\n \n )}\n \n );\n },\n },\n {\n id: 'actions',\n enableSorting: false,\n header: () => (\n \n \n \n ),\n minSize: 100,\n maxSize: 100,\n cell: function Cell({ row: { original } }) {\n const { setActivePosEntity } =\n useActivePosEntityContext();\n const { setModal } = useContext(ModalContext);\n const hasMultiTicketGroupTableFeature = useUserHasFeature(\n Feature.MultiTicketGroupTable\n );\n const showFromAccordions = original?.showFromPurchaseAccordions;\n const [isLoading, setIsLoading] = useState(false);\n\n const bulkChangeEvent = useBulkChangeEventAction(\n {\n ...EmptyPurchaseQuery,\n ticketGroupIds: [original?.ticketGroup.ticketGroupId ?? 0],\n },\n setIsLoading,\n isLoading,\n original?.ticketGroup.viagogoVirtualId,\n // Passing onSuccess to refresh the purchase if change-Event is successful\n () =>\n setActivePosEntity(\n original!.ticketGroup.purchaseOrderId!,\n undefined,\n true\n ),\n true\n );\n\n const { copyToClipboard } = useCopyToClipboard();\n const onAmendTickets = useCallback(\n (data?: { additionalData?: TicketGroupAdditionalData }) => {\n if (showFromAccordions) {\n setActivePosEntity(\n original!.ticketGroup.purchaseOrderId!,\n undefined,\n true\n );\n setModal(\n getPurchaseOrderDetailsModalConfigWithDeepLink(\n combineWithTicketGroupId(\n (original!.additionalData?.purchaseVendorOrderId ??\n original!.ticketGroup.purchaseOrderId)!,\n {\n ticketGroupId: original!.ticketGroup.ticketGroupId,\n editIntention: TicketGroupEditReason.AmendTickets,\n }\n )\n )\n );\n } else {\n original?.onTicketGroupAction?.({\n ticketGroupId: original!.ticketGroup.ticketGroupId,\n action: TicketGroupEditReason.AmendTickets,\n additionalData: {\n ...data?.additionalData,\n },\n });\n }\n },\n [original, setActivePosEntity, setModal, showFromAccordions]\n );\n\n const onCancelTickets = useCallback(() => {\n original?.onTicketGroupAction?.(\n {\n ticketGroupId: original!.ticketGroup.ticketGroupId,\n action: TicketGroupEditReason.CancelTickets,\n },\n true // showConfirmDialog\n );\n }, [original]);\n\n const onExchangeTickets = useCallback(() => {\n original?.onTicketGroupAction?.({\n ticketGroupId: original!.ticketGroup.ticketGroupId,\n action: TicketGroupEditReason.ExchangeTickets,\n additionalData: original.additionalData,\n });\n }, [original]);\n\n const onViewTicketGroup = useCallback(() => {\n setActivePosEntity(\n original!.ticketGroup.purchaseOrderId!,\n undefined,\n true\n );\n setModal(\n getPurchaseOrderDetailsModalConfigWithDeepLink(\n combineWithTicketGroupIdSimple(\n (original!.additionalData?.purchaseVendorOrderId ??\n original!.ticketGroup.purchaseOrderId)!,\n original!.ticketGroup.ticketGroupId\n )\n )\n );\n }, [original, setActivePosEntity, setModal]);\n\n if (!original) {\n return ;\n }\n\n if (!original.additionalData && !original.onTicketGroupAction) {\n return null;\n }\n\n return (\n \n \n ) : (\n \n )\n }\n onClick={() =>\n onAmendTickets(\n hasMultiTicketGroupTableFeature ? original : undefined\n )\n }\n titleContentId={\n !original.disabled\n ? ContentId.AmendTickets\n : ContentId.ViewDetails\n }\n />\n {original.ticketGroup.canGetDocArts ? (\n \n ) : (\n \n }\n />\n }\n ticketGroup={original.ticketGroup}\n onPredeliveryAction={(\n uploadPredeliveryAction: UploadPredeliveryAction\n ) => {\n onAmendTickets({\n additionalData: {\n amendActionData: {\n uploadPredeliveryAction: uploadPredeliveryAction,\n },\n },\n });\n }}\n />\n )}\n\n {!showFromAccordions && (\n <>\n \n }\n />\n }\n align=\"end\"\n >\n {!original.disabled && (\n <>\n \n \n \n \n \n \n \n \n \n \n \n \n\n {bulkChangeEvent.dropDown}\n \n )}\n {(original.additionalData?.purchaseVendorOrderId ??\n original.ticketGroup.purchaseOrderId) && (\n {\n copyToClipboard(\n combineWithTicketGroupIdSimple(\n (original.additionalData?.purchaseVendorOrderId ??\n original.ticketGroup.purchaseOrderId)!,\n original.ticketGroup.ticketGroupId\n )\n );\n }}\n >\n \n \n \n \n \n )}\n \n {bulkChangeEvent.dialog}\n \n )}\n\n {showFromAccordions && (\n {\n if (\n e.button === 0 &&\n e.getModifierState('Control') === false\n ) {\n // Perform like a button click when it's a left-click (and no Ctrl)\n // Else the click will be whatever does\n e.preventDefault();\n e.stopPropagation();\n\n onViewTicketGroup();\n }\n }}\n >\n \n }\n titleContentId={ContentId.ViewDetails}\n />\n \n )}\n \n );\n },\n },\n {\n id: 'errors',\n enableSorting: false,\n header: () => '',\n minSize: 24,\n maxSize: 24,\n cell: ({ row: { original } }) => {\n return original ? (\n \n ) : null;\n },\n },\n ];\n","import {\n functionalUpdate,\n RowSelectionState,\n SortingState,\n TableOptions,\n Updater,\n} from '@tanstack/react-table';\nimport clsx from 'clsx';\nimport {\n ComponentType,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { EventAccordionItemBodyComponentType } from 'src/components/Accordions';\nimport {\n Content,\n FormatContent,\n useContent,\n} from 'src/contexts/ContentContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { packNumericIds } from 'src/contexts/MultiSelectionContext/MultiSelectionContext.utils';\nimport { useClearShiftSelectionOnSortingChange } from 'src/contexts/MultiSelectionContext/useClearShiftSelectionOnSortingChange';\nimport { NoData, Table, TableProps } from 'src/tables/Table';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { generateShimmeringRows } from 'src/utils/dataTableUtils';\nimport { PurchaseOrderDetailsInput } from 'src/utils/purchaseUtils';\nimport { SomethingWentWrong } from 'src/views';\nimport {\n Event,\n Performer,\n TicketGroupInput,\n Venue,\n} from 'src/WebApiController';\n\nimport { usePaginationSettings } from '../Table/hooks/usePaginationSettings';\nimport { RowComponentWithRowData } from '../Table/Table.types';\nimport {\n TICKET_GROUP_TABLE_COLUMNS_CONFIG,\n TicketGroupWithHandlers,\n} from './configs/TicketGroupTableColumnsConfig';\nimport * as styles from './TicketGroupTable.css';\n\nexport type TicketGroupTableDataProps = {\n highlightTicketGroupIds?: number[];\n} & Pick<\n EventAccordionItemBodyComponentType,\n | 'onMount'\n | 'onUnmount'\n | 'initState'\n | 'disablePagination'\n | 'entities'\n | 'entityCount'\n | 'getDataFail'\n>;\n\nexport type TicketGroupTableProps = TicketGroupTableDataProps & {\n groupId: string;\n event?: Event | null;\n performer?: Performer | null;\n venue?: Venue | null;\n disabled?: boolean;\n /**\n * Show the ticket groups from expanding a single purchase\n */\n showFromPurchaseAccordions?: boolean;\n} & Pick<\n TableProps,\n 'tableStyle' | 'tableHeadStyle' | 'tableCellStyle' | 'withOuterPadding'\n > &\n Pick;\n\nconst PAGE_SIZE = 10;\n\nconst getRowId = (\n originalRow: TicketGroupWithHandlers | null,\n index: number\n) =>\n originalRow?.ticketGroup.purchaseOrderId\n ? packNumericIds([\n originalRow.ticketGroup.purchaseOrderId,\n originalRow.ticketGroup.ticketGroupId,\n ])\n : index.toString();\n\nexport function TicketGroupTable({\n groupId,\n entities: ticketGroups,\n highlightTicketGroupIds,\n onTicketGroupAction,\n event,\n performer,\n venue,\n onMount,\n onUnmount,\n disabled,\n initState,\n showFromPurchaseAccordions = false,\n entityCount: ticketGrpsCnt,\n tableStyle,\n tableHeadStyle,\n tableCellStyle,\n getDataFail,\n disablePagination,\n withOuterPadding,\n}: TicketGroupTableProps) {\n const ticketsText = useContent(ContentId.Tickets);\n\n const { watch } = useFormContext();\n const vendorOrderId = watch('vendorOrderId');\n\n // Enable passing in table state as parameters -- we can remount with the last state the user was on\n const [sorting, setSorting] = useState(\n initState?.sorting || []\n );\n\n const { setGroupItems, getGroupToggleState, getSelection, selectionMode } =\n useMultiSelectionContext();\n\n useClearShiftSelectionOnSortingChange({ sortingState: sorting });\n\n const groupSelection = getSelection(groupId);\n\n const data = useMemo(() => {\n if (!ticketGroups || (!ticketGroups.length && showFromPurchaseAccordions)) {\n return generateShimmeringRows(ticketGrpsCnt || 1) as null[];\n }\n\n return ticketGroups?.map(\n (tg) =>\n ({\n ticketGroup: tg,\n disabled,\n onTicketGroupAction,\n additionalData: {\n purchaseVendorOrderId: vendorOrderId?.value,\n event,\n performer,\n venue,\n },\n showFromPurchaseAccordions,\n }) as TicketGroupWithHandlers\n );\n }, [\n ticketGroups,\n showFromPurchaseAccordions,\n ticketGrpsCnt,\n disabled,\n onTicketGroupAction,\n vendorOrderId?.value,\n event,\n performer,\n venue,\n ]);\n\n const { pagination, setPagination } = usePaginationSettings(\n data.length,\n -1,\n PAGE_SIZE,\n disablePagination,\n initState\n );\n\n useEffect(() => {\n onMount?.();\n });\n\n useEffect(() => {\n /**\n * Intent for `onMount` is use with 'windowing' in order to maintain user state\n * when the component is scrolled back into view.\n * Anything that needs to be persisted in `react-table` state should be added here.\n * Only update on unmount to ensure we aren't doing too many re-renders.\n */\n return () => onUnmount?.({ pagination, sorting });\n }, [pagination, sorting, onUnmount]);\n\n const rowSelection = useMemo(() => {\n // Type casting needed because of a bug in older TS versions: https://github.com/microsoft/TypeScript/issues/44373\n return (data as (TicketGroupWithHandlers | null)[]).reduce<\n Record\n >(\n (result, rowItem) => {\n if (rowItem?.ticketGroup?.purchaseOrderId) {\n const rowId = getRowId(rowItem!, -1);\n result[rowId] =\n getGroupToggleState(groupId).isGroupSelected &&\n !groupSelection.items.itemIds.length\n ? true\n : (groupSelection?.items.itemIds ?? [])?.includes(rowId) ?? false;\n }\n return result;\n },\n {} as Record\n );\n }, [data, getGroupToggleState, groupId, groupSelection.items.itemIds]);\n\n const onRowSelectionChange = useCallback(\n (updater: Updater) => {\n const newSelections =\n typeof updater === 'function' ? updater(rowSelection) : updater;\n setGroupItems(groupId, newSelections);\n },\n [groupId, rowSelection, setGroupItems]\n );\n\n const options: Partial> =\n useMemo(\n () => ({\n data,\n columns: TICKET_GROUP_TABLE_COLUMNS_CONFIG,\n state: {\n pagination,\n rowSelection,\n sorting,\n columnVisibility: {\n event: showFromPurchaseAccordions,\n venue: showFromPurchaseAccordions,\n eventDate: showFromPurchaseAccordions,\n expectedValue: !showFromPurchaseAccordions,\n taxPaid: !showFromPurchaseAccordions,\n errors: !showFromPurchaseAccordions,\n },\n },\n enableSorting: !showFromPurchaseAccordions,\n getRowId: getRowId,\n onPaginationChange: setPagination,\n onRowSelectionChange,\n onSortingChange: (sortingUpdaterFn) => {\n const newSortVal = functionalUpdate(sortingUpdaterFn, sorting);\n setSorting(newSortVal);\n },\n }),\n [\n data,\n onRowSelectionChange,\n pagination,\n rowSelection,\n setPagination,\n showFromPurchaseAccordions,\n sorting,\n ]\n );\n\n const RowComponent: ComponentType<\n RowComponentWithRowData\n > = (props) => {\n const { row, className, children, ...rest } = props;\n const highlight = highlightTicketGroupIds?.includes(\n row?.original?.ticketGroup.ticketGroupId ?? -1\n );\n return (\n \n {children}\n \n );\n };\n\n return getDataFail ? (\n }\n />\n ) : data?.length ? (\n \n ) : (\n // We should never see this - because the events are filtered to only those that has listings\n // So this is to prevent a crash - but this should be looked at\n \n \n \n );\n}\n","import { useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Content } from 'src/contexts/ContentContext';\nimport { NO_GROUP_ID } from 'src/contexts/MultiSelectionContext';\nimport { Stack } from 'src/core/ui';\nimport { FieldError } from 'src/modals/common';\nimport { PurchaseEventItemHeader } from 'src/modals/common/Purchase/PurchaseEventItemHeader';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { formatCurrency } from 'src/utils/numberFormatter';\nimport { PurchaseOrderDetailsInput } from 'src/utils/purchaseUtils';\nimport { getTicketGroupInputTotalCost } from 'src/utils/ticketUtils';\nimport {\n Event,\n Performer,\n TicketGroupEditReason,\n TicketGroupInput,\n Venue,\n} from 'src/WebApiController';\n\nimport { TicketGroupWithHandlers } from './configs/TicketGroupTableColumnsConfig';\nimport * as styles from './PurchaseTicketTable.css';\nimport {\n PurchaseEventItemHeaderWrapper,\n PurchaseTicketTableContainer,\n} from './PurchaseTicketTable.styled';\nimport { TicketGroupTable } from './TicketGroupTable';\n\nexport function PurchaseTicketTable({\n currencyCode,\n disabled,\n ticketGroups,\n highlightTicketGroupIds,\n onTicketGroupAction,\n}: {\n disabled?: boolean;\n currencyCode: string;\n ticketGroups?: TicketGroupInput[];\n highlightTicketGroupIds?: number[];\n} & Pick) {\n const { getFieldState } = useFormContext();\n const uniqueEvents = useMemo(\n () =>\n ticketGroups?.reduce(\n (events, tg) => {\n const eventId =\n tg.event?.viagVirtualId ??\n tg.viagogoEventId?.toString() ??\n tg.eventMappingId;\n if (eventId && !events[eventId]) {\n events[eventId] = {\n event: tg.event!,\n performer: tg.performer,\n venue: tg.venue,\n };\n }\n\n return events;\n },\n {} as Record<\n string,\n { event: Event; performer?: Performer | null; venue?: Venue | null }\n >\n ),\n [ticketGroups]\n );\n\n const events = Object.values(uniqueEvents || []);\n\n return (\n <>\n {events.length ? (\n events\n .filter((ev) => ev.event)\n .map((ev) => {\n const eventTicketGroups = ticketGroups\n ?.map((tg, i) => ({ tg, i }))\n .filter(\n (tg) => tg.tg.event?.viagVirtualId === ev.event.viagVirtualId\n );\n const totalCost =\n eventTicketGroups?.reduce((sum, tg) => {\n sum += getTicketGroupInputTotalCost(tg.tg);\n return sum;\n }, 0) || 0;\n\n return (\n \n \n r + (tg.tg.numberOfTickets?.value ?? 0),\n 0\n )}\n cost={formatCurrency(totalCost, currencyCode)}\n onAddTicketsForEvent={\n onTicketGroupAction\n ? (e, p, v) => {\n onTicketGroupAction({\n ticketGroupId: -1,\n action: TicketGroupEditReason.AddTickets,\n additionalData: {\n event: e,\n performer: p,\n venue: v,\n },\n });\n }\n : undefined\n }\n />\n \n
    \n tg.tg) ?? []}\n entityCount={eventTicketGroups?.length ?? 0}\n highlightTicketGroupIds={highlightTicketGroupIds}\n onTicketGroupAction={onTicketGroupAction}\n event={ev.event}\n performer={ev.performer}\n venue={ev.venue}\n getDataFail={false}\n />\n \n {eventTicketGroups?.flatMap((tg) => {\n const errors = [];\n const tgFieldState = getFieldState(\n `ticketGroups.${tg.i}`\n );\n if (tgFieldState.error?.message) {\n errors.push(\n \n {tgFieldState.error.message}\n \n );\n }\n tg.tg.tickets?.value?.forEach((t, j) => {\n const seatField = getFieldState(\n `ticketGroups.${tg.i}.tickets.value.${j}.seat`\n );\n if (seatField.error?.message) {\n errors.push(\n \n {seatField.error.message}\n \n );\n }\n });\n\n return errors;\n })}\n \n
    \n
    \n );\n })\n ) : (\n \n )}\n \n );\n}\n","export const MAX_COMMISSIONERS = 10;\n","import differenceWith from 'lodash-es/differenceWith';\nimport {\n MutableRefObject,\n ReactNode,\n useCallback,\n useImperativeHandle,\n useMemo,\n} from 'react';\nimport { Controller, useFieldArray, useFormContext } from 'react-hook-form';\nimport { SellerAccountEmployeeSelector } from 'src/components/Selectors/SellerAccountEmployeeSelector';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useSellerAccountContext } from 'src/contexts/SellerAccountContext';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { getTextFieldState, PosTextField } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { MAX_COMMISSIONERS } from 'src/dialogs/SaleCommissionOverrideDialog/SaleCommissionOverrideDialog.constants';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { FieldError, FieldWrapper } from 'src/modals/common';\nimport { PurchaseCommissionInput } from 'src/modals/common/Purchase/CommissionSection';\nimport { DeleteIcon, IconsFill, PlusIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { roundToPrecision } from 'src/utils/numberFormatter';\nimport { Commission } from 'src/WebApiController';\n\nimport * as styles from './SetCommissions.css';\n\nenum FormErrorKey {\n TotalCommissionsValueExceeded = 'totalCommissionsValueExceeded',\n UserAlreadySelected = 'userAlreadySelected',\n MinValue = 'minValue',\n}\n\nconst validateMaxCommissions = (fields: Commission[]): string | undefined => {\n const total = fields.reduce((acc, curr) => {\n return acc + curr.commissionPercentage;\n }, 0);\n return total <= 1 ? undefined : FormErrorKey.TotalCommissionsValueExceeded;\n};\n\ninterface SaleCommissionOverrideContentProps {\n onSave?: (commissions: Commission[]) => void;\n actionsRef?: MutableRefObject;\n footerActions?: ReactNode;\n disableForm?: boolean;\n}\n\nexport interface SetCommissionsRefActions {\n onSave: () => void;\n addCommissionAction: () => void;\n}\n\nexport type SetCommissionForm = Pick;\n\nexport const SetCommissionsForm = ({\n onSave,\n actionsRef,\n footerActions,\n disableForm,\n}: SaleCommissionOverrideContentProps) => {\n const isMobile = useMatchMedia('mobile');\n const methods = useFormContext();\n\n const { control, formState, trigger, watch, setValue } = methods;\n const formValues = watch();\n const formErrors = formState.errors;\n const formRootErrors = formErrors?.['commissions']?.['value']?.['root'];\n const isFormValid = formState.isValid && !formRootErrors;\n const requiredText = useContent(ContentId.Required);\n const minCommissionValueText = useContent(ContentId.MinCommissionValue);\n\n const { append, fields, remove } = useFieldArray({\n control: control,\n name: 'commissions.value',\n rules: {\n validate: {\n [FormErrorKey.TotalCommissionsValueExceeded]: validateMaxCommissions,\n },\n },\n });\n\n const maxCommissionersReached = fields.length >= MAX_COMMISSIONERS;\n\n const { allActiveUserInfos } = useSellerAccountContext();\n const activeUserIds = useMemo(\n () =>\n allActiveUserInfos\n ? Object.values(allActiveUserInfos).map((u) => u.userId)\n : [],\n [allActiveUserInfos]\n );\n\n const add = useCallback(() => {\n if (maxCommissionersReached) {\n return;\n }\n\n const firstAvailableUserId = differenceWith(\n activeUserIds,\n formValues.commissions?.value ?? [],\n (activeUserId, commission) => activeUserId === commission.buyerUserId\n )[0];\n\n if (!firstAvailableUserId) {\n return;\n }\n\n append({ buyerUserId: firstAvailableUserId, commissionPercentage: 0 });\n }, [\n activeUserIds,\n append,\n formValues.commissions?.value,\n maxCommissionersReached,\n ]);\n\n const onSubmit = useCallback(\n (value: SetCommissionForm) => {\n if (value.commissions?.value?.length === 0 || !isFormValid) {\n return;\n }\n onSave?.(value.commissions?.value!);\n },\n [isFormValid, onSave]\n );\n\n useImperativeHandle(\n actionsRef,\n () => {\n return {\n onSave: methods.handleSubmit(onSubmit),\n addCommissionAction: add,\n };\n },\n [add, methods, onSubmit]\n );\n\n return (\n \n {fields.map((field, index) => (\n \n \n {\n const otherFieldsWithSameUserId = (\n formValues.commissions?.value ?? []\n ).filter((f) => {\n return f.buyerUserId === selectedUserId;\n });\n return otherFieldsWithSameUserId.length > 1\n ? FormErrorKey.UserAlreadySelected\n : undefined;\n },\n },\n }}\n name={`commissions.value.${index}.buyerUserId`}\n render={({ field, fieldState }) => {\n return (\n
    \n {\n setValue(field.name, userId);\n setValue('commissions.hasChanged', true);\n }}\n disabled={disableForm}\n />\n {fieldState.error && (\n <>\n {fieldState.error.type === 'required' && (\n \n \n \n )}\n {fieldState.error.type ===\n FormErrorKey.UserAlreadySelected && (\n \n \n \n )}\n \n )}\n
    \n );\n }}\n />\n \n \n \n v && v > 0 ? undefined : minCommissionValueText,\n },\n }}\n name={`commissions.value.${index}.commissionPercentage`}\n render={({ field, fieldState }) => {\n const { onChange, value, ...restField } = field;\n return (\n \n {\n const changedValue = e.target.value || '0';\n const commissionValue = parseFloat(changedValue);\n\n if (isNaN(commissionValue)) {\n return;\n }\n\n const cleanValueToSet = parseFloat(\n (commissionValue / 100).toFixed(4) // 4 decimals, 0.0001\n );\n\n onChange(cleanValueToSet);\n setValue('commissions.hasChanged', true, {\n shouldDirty: true,\n });\n }}\n rootProps={{\n state:\n fieldState.isTouched && fieldState.isDirty\n ? getTextFieldState(fieldState.error)\n : undefined,\n }}\n min={0}\n max={100}\n {...restField}\n disabled={disableForm}\n ref={(e) => {\n if (e && !fieldState.isDirty) {\n /**\n * The value entered by the user is being transformed to a value\n * between 0 & 1 by diving by 100. If the user enters a comma or dot,\n * depending on the locale, it can produce null values have incorrect validations.\n * Best approach is to use an uncontrolled input and let the browser\n * handle the decimal parts, so we just set the initial value to the input\n * if the user hasn't touched it.\n * */\n e.value = roundToPrecision(value * 100, 2).toString();\n }\n restField.ref(e);\n }}\n />\n \n );\n }}\n />\n \n \n
    \n {\n remove(index);\n setTimeout(trigger, 1);\n setValue('commissions.hasChanged', true);\n }}\n />\n
    \n
    \n
    \n ))}\n {formRootErrors &&\n formRootErrors.type === FormErrorKey.TotalCommissionsValueExceeded && (\n \n \n \n )}\n\n {footerActions ? (\n footerActions\n ) : (\n \n \n \n \n )}\n \n );\n};\n","import { IconsProps } from 'src/svgs/Viagogo';\nimport { SvgWrapper } from 'src/svgs/Viagogo/svg-wrapper/icon-wrapper';\n\nexport const LockedIcon = (props: IconsProps) => {\n return (\n \n \n \n \n \n \n );\n};\n","import { IconsProps } from 'src/svgs/Viagogo';\nimport { SvgWrapper } from 'src/svgs/Viagogo/svg-wrapper/icon-wrapper';\n\nexport const UnlockedIcon = (props: IconsProps) => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n","import { useCallback } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { LockedIcon } from 'src/svgs/LockedIcon';\nimport { UnlockedIcon } from 'src/svgs/UnlockedIcon';\nimport { IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\ninterface LockCommissionsProps {\n isCommissionsLocked: boolean;\n onCommissionsLockChange: (isCommissionsLocked: boolean) => void;\n disabledLockButton?: boolean;\n disabledUnlockButton?: boolean;\n}\n\nexport const LockCommissions = ({\n isCommissionsLocked,\n onCommissionsLockChange,\n disabledLockButton,\n disabledUnlockButton,\n}: LockCommissionsProps) => {\n const onCommissionsLockClick = useCallback(() => {\n onCommissionsLockChange(!isCommissionsLocked);\n }, [isCommissionsLocked, onCommissionsLockChange]);\n\n return (\n
    \n {isCommissionsLocked ? (\n \n \n \n \n ) : (\n \n \n \n \n )}\n
    \n );\n};\n","import { useCallback, useMemo, useRef } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport {\n SetCommissionsForm,\n SetCommissionsRefActions,\n} from 'src/components/common/SetCommissions/SetCommissionsForm';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useSellerAccountContext } from 'src/contexts/SellerAccountContext';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { MAX_COMMISSIONERS } from 'src/dialogs/SaleCommissionOverrideDialog/SaleCommissionOverrideDialog.constants';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { BodySectionTitle, TicketsDetailRow } from 'src/modals/common';\nimport { LockCommissions } from 'src/modals/common/Purchase/CommissionSection/LockCommissions';\nimport { IconsFill, PlusIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport { PurchaseOrderDetailsInput } from 'src/utils/purchaseUtils';\nimport { Feature } from 'src/WebApiController';\n\nimport * as styles from '../PurchaseModal.css';\n\nexport type PurchaseCommissionInput = Pick<\n PurchaseOrderDetailsInput,\n 'commissions' | 'isCommissionsLocked'\n>;\n\nexport function CommissionSection({\n disabled: disableProp,\n readonly,\n showLockCommissionsButton = true,\n canLockUnlockCommission = true,\n}: {\n disabled?: boolean;\n readonly?: boolean;\n showLockCommissionsButton?: boolean;\n canLockUnlockCommission?: boolean;\n}) {\n const ref = useRef(null);\n const { setValue, watch, formState } =\n useFormContext();\n\n const { allActiveUserInfos } = useSellerAccountContext();\n const activeUserIds = useMemo(\n () =>\n allActiveUserInfos\n ? Object.values(allActiveUserInfos).map((u) => u.userId)\n : [],\n [allActiveUserInfos]\n );\n\n const commissions = watch('commissions');\n const isCommissionsLocked = watch('isCommissionsLocked')?.value ?? false;\n const selectedCommissionsCount = (commissions?.value ?? []).length;\n const maxCommissionersReached = selectedCommissionsCount >= MAX_COMMISSIONERS;\n\n const userHasLockCommissionsOnPoFeature = useUserHasFeature(\n Feature.LockCommissionsOnPo\n );\n const disabled =\n disableProp || (userHasLockCommissionsOnPoFeature && isCommissionsLocked);\n\n const showAddCommission = useMemo(() => {\n if (!activeUserIds) return false;\n return (commissions?.value?.length ?? 0) < activeUserIds.length;\n }, [commissions, activeUserIds]);\n\n const onCommissionsLockChange = useCallback(\n (isCommissionsLocked: boolean) => {\n setValue('isCommissionsLocked', posChangedField(isCommissionsLocked));\n },\n [setValue]\n );\n\n return (\n
    \n \n \n \n \n \n \n {showAddCommission && !readonly && (\n ref.current?.addCommissionAction()}\n disabled={\n maxCommissionersReached ||\n (userHasLockCommissionsOnPoFeature && isCommissionsLocked)\n }\n >\n \n \n \n )}\n {showLockCommissionsButton &&\n userHasLockCommissionsOnPoFeature &&\n selectedCommissionsCount > 0 && (\n \n )}\n \n \n }\n />\n \n
    \n );\n}\n","import { vars } from 'src/core/themes';\nimport { PurchasePaymentStatus } from 'src/WebApiController';\nimport styled from 'styled-components/macro';\n\nexport const Title = styled.h2<{ showOnMobile?: boolean }>`\n ${({\n theme: {\n typography: { getStyles },\n },\n }) => getStyles('title3', 'regular')};\n display: ${(props) => (props.showOnMobile ? 'flex' : 'none')};\n\n ${({ theme: { media } }) =>\n `${media.makeMediaQuery(\n media.breakpoints.md,\n `\n display: flex;\n `\n )}`}\n\n justify-content: center;\n padding-block-end: ${() => vars.spacing.xl};\n`;\n\nexport const WizardFooter = styled.footer`\n display: flex;\n flex-direction: row-reverse;\n width: 100%;\n max-width: 1440px;\n margin: 0 auto;\n margin-bottom: ${() => vars.spacing.xxl};\n justify-content: space-between;\n padding: ${() => vars.spacing.xl};\n\n ${({ theme: { media } }) =>\n `${media.makeMediaQuery(\n media.breakpoints.md,\n `\n margin-bottom: 0;\n `\n )}`}\n`;\n\nexport const EmailPreviewContainer = styled.div`\n background-color: ${(props) => props.theme.colors.backgroundSecondary};\n padding: ${() => `${vars.spacing.sm} ${vars.spacing.xl}`};\n display: flex;\n flex-direction: column;\n`;\n\nexport const EmailBodyWrapper = styled.div`\n flex: 1;\n width: 300px;\n border: 2px solid ${(props) => props.theme.colors.borderPrimary};\n overflow-y: scroll;\n\n ${({ theme: { media } }) =>\n `${media.makeMediaQuery(\n media.breakpoints.lg,\n `\n width: 500px;\n `\n )}`}\n`;\n\nexport const EmailPreviewTitle = styled.div`\n ${(props) => props.theme.typography.getStyles('subtitle1')};\n margin: 0;\n padding-block-end: ${() => vars.spacing.sm};\n`;\n\nexport const StyledPurchaseWizardBody = styled.div`\n height: 100%;\n display: grid;\n grid-template-rows: auto 1fr auto;\n\n @supports (-webkit-touch-callout: none) {\n max-height: -webkit-fill-available;\n }\n`;\n\nexport const BodySectionTitle = styled.div`\n ${(props) => props.theme.typography.getStyles('subtitle1')};\n color: ${(props) => props.theme.colors.textBrand};\n text-transform: uppercase;\n margin: 0;\n padding-block-end: ${() => vars.spacing.lg};\n`;\n\nexport const TicketsDetailRow = styled.div`\n display: flex;\n justify-content: space-between;\n width: 100%;\n padding-block-end: ${() => vars.spacing.sm};\n ${({\n theme: {\n typography: { getStyles },\n },\n }) => getStyles('subtitle1', 'regular')};\n\n ${({ theme: { media } }) =>\n `${media.makeMediaQuery(\n media.breakpoints.md,\n `\n padding-block-end: ${vars.spacing.lg};\n `\n )}`}\n`;\n\nexport const TicketDetailRowPaymentList = styled(TicketsDetailRow)`\n overflow-x: auto;\n`;\n\nexport const RadioContainer = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n margin-right: ${() => vars.spacing.lg};\n\n label {\n min-width: min-content;\n }\n`;\n\nexport const CheckboxContainer = styled.div`\n display: flex;\n flex-direction: row-reverse;\n justify-content: center;\n align-items: center;\n\n ${({ theme: { media } }) =>\n `${media.makeMediaQuery(\n media.breakpoints.md,\n `\n flex-direction: column;\n `\n )}`}\n > * {\n width: max-content !important;\n }\n\n label {\n display: flex;\n justify-content: center;\n align-items: center;\n margin-bottom: 0;\n }\n`;\n\nexport const FieldWrapper = styled.div<{\n width?: string;\n minWidth?: string;\n addFlexGrow?: boolean;\n}>`\n display: flex;\n flex-direction: column;\n gap: 4px;\n padding-block-end: ${() => vars.spacing.m};\n width: ${(props) => (props.width != null ? props.width : '100%')};\n min-width: ${(props) => (props.minWidth != null ? props.minWidth : 'auto')};\n ${({ addFlexGrow }) => (addFlexGrow ? 'flex-grow: 1;' : null)};\n\n label {\n width: 100%;\n margin-bottom: 0;\n }\n`;\nexport const FieldLabel = styled.div<{ isCheckbox?: boolean }>`\n text-transform: capitalize;\n font-size: ${() => vars.typography.fontSize['lg']};\n font-weight: 400;\n padding-left: ${(props) => (props.isCheckbox ? vars.spacing.sm : 0)};\n`;\n\nexport const HeaderFieldLabel = styled.div<{ isCheckbox?: boolean }>`\n text-transform: capitalize;\n font-size: ${() => vars.typography.fontSize['sm']};\n font-weight: 400;\n padding-left: ${(props) => (props.isCheckbox ? vars.spacing.sm : 0)};\n`;\n\nexport const FieldError = styled.div`\n color: ${(props) => props.theme.colors.textNegative};\n font-size: ${() => vars.typography.fontSize['sm']};\n margin-top: ${() => vars.spacing.xxs};\n margin-bottom: ${() => vars.spacing.xxs};\n`;\n\nexport const FormRow = styled.div<{ vertical?: boolean }>`\n display: flex;\n flex-direction: ${({ vertical }) => (vertical ? 'column' : 'row')};\n gap: ${() => vars.spacing.lg};\n`;\nexport const PurchaseDetailsDataTable = styled.table`\n border-spacing: 8px 0;\n border-collapse: separate;\n\n svg {\n display: block;\n }\n\n td {\n padding-right: ${() => vars.spacing.xl};\n }\n`;\n\nexport const PurchaseDetailsDataTableCell = styled.div<{\n align?: 'left' | 'center' | 'right';\n}>`\n border-spacing: ${() => vars.spacing.lg} 0;\n border-collapse: separate;\n vertical-align: middle;\n display: flex;\n width: 100%;\n justify-content: ${(props) =>\n props.align === 'center'\n ? 'center'\n : props.align === 'right'\n ? 'flex-end'\n : 'flex-start'};\n`;\n\nexport const PurchaseDetailsDataTableFooter = styled(\n PurchaseDetailsDataTableCell\n)`\n border-top: 2px solid ${(props) => props.theme.colors.borderDark};\n margin-top: ${() => vars.spacing.sm};\n`;\n\nexport const BodySectionTitleTicketGroup = styled(BodySectionTitle)`\n display: flex;\n align-items: center;\n\n svg {\n margin-right: ${() => vars.spacing.sm};\n }\n`;\n\nexport const PaymentStatusTextContainer = styled.span<{\n purchasePaymentStatus: PurchasePaymentStatus;\n isPaymentPastDueDate: boolean;\n isPaymentRefunded: boolean;\n}>`\n color: ${(props) => {\n switch (props.purchasePaymentStatus) {\n case PurchasePaymentStatus.Paid:\n return props.isPaymentRefunded\n ? props.theme.colors.textInfo\n : props.theme.colors.textSuccess;\n case PurchasePaymentStatus.Unpaid:\n return props.isPaymentPastDueDate\n ? props.theme.colors.textNegative\n : props.theme.colors.textPrimary;\n case PurchasePaymentStatus.Failed:\n return props.theme.colors.textNegative;\n default:\n return props.theme.colors.textPrimary;\n }\n }};\n`;\nexport const PurchasePaymentStatusTextContainer = styled.span`\n color: ${(props) => props.theme.colors.textPrimary};\n background: ${(props) => props.theme.colors.backgroundSecondary};\n font-size: ${() => vars.typography.fontSize['xs']};\n padding: ${() =>\n `${vars.spacing.xs} ${vars.spacing.sm} ${vars.spacing.xs} ${vars.spacing.sm}`};\n float: right;\n border-radius: ${() => vars.spacing.sm};\n\n &.Paid {\n color: ${(props) => props.theme.colors.textSuccess};\n background: ${(props) => props.theme.colors.backgroundSuccess};\n }\n\n &.Failed {\n color: ${(props) => props.theme.colors.textNegative};\n background: ${(props) => props.theme.colors.backgroundNegative};\n }\n`;\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nimport {\n PurchaseDetailsDataTableCell,\n PurchaseDetailsDataTableFooter,\n} from '../PurchaseModal.styled';\n\nexport const CostDetailsDataTable = styled.table`\n width: 50%;\n svg {\n display: block;\n }\n\n tr.padding-top-bottom td {\n padding-bottom: ${() => vars.spacing.m};\n }\n`;\n\nexport const PurchaseDetailsDataTableLabelCell = styled(\n PurchaseDetailsDataTableCell\n)`\n color: ${(props) => props.theme.colors.textPrimary};\n`;\n\nexport const PurchaseDetailsDataTableValueCell = styled(\n PurchaseDetailsDataTableCell\n)`\n font-weight: 600;\n`;\n\nexport const PurchaseDetailsDataTableValueFooter = styled(\n PurchaseDetailsDataTableFooter\n)`\n font-weight: 600;\n`;\n","import { useMemo } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosDropdown, PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { IconsFill, MoreIcon, PlusIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { PURCHASE_COST_TYPE_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { formatCurrency } from 'src/utils/numberFormatter';\nimport { getCosts } from 'src/utils/ticketUtils';\nimport { CostDetail, TicketGroupInput } from 'src/WebApiController';\n\nimport {\n PurchaseDetailsDataTableCell,\n PurchaseDetailsDataTableFooter,\n} from '../PurchaseModal.styled';\nimport * as styles from './CostDetailsTable.css';\nimport {\n CostDetailsDataTable,\n PurchaseDetailsDataTableLabelCell,\n PurchaseDetailsDataTableValueCell,\n PurchaseDetailsDataTableValueFooter,\n} from './CostDetailsTable.styled';\n\nexport type CostDetailsTableProps = {\n currencyCode: string;\n ticketGroups?: TicketGroupInput[];\n costs?: CostDetail[] | null;\n disabled?: boolean;\n onEditCost: (cost: CostDetail) => void;\n onAddNewCost: () => void;\n onRemoveCost: (costId: number) => void;\n};\n\nexport function CostDetailsTable({\n currencyCode,\n ticketGroups,\n costs,\n disabled,\n onEditCost,\n onAddNewCost,\n onRemoveCost,\n}: CostDetailsTableProps) {\n const { totalTicketCost, totalShipping, totalCost } = getCosts(\n ticketGroups,\n costs\n );\n\n const dividerClassName = useMemo(() => {\n return `add-divider-top padding-top-bottom\n ${\n costs !== undefined && costs != null && costs.length > 0\n ? ' add-divider-bottom'\n : ''\n }`;\n }, [costs]);\n\n return (\n \n \n \n \n \n \n \n \n \n \n {formatCurrency(totalTicketCost, currencyCode)}\n \n \n \n \n \n \n \n \n \n \n \n {formatCurrency(totalShipping, currencyCode)}\n \n \n \n {costs?.map((costDetail) => {\n const { id, cost, costType, description } = costDetail;\n return (\n \n \n \n {}\n \n \n \n \n {cost?.disp ||\n formatCurrency(\n cost?.amt,\n cost?.currency ?? currencyCode,\n cost?.dec\n )}\n \n \n {!disabled && (\n \n \n \n }\n align=\"end\"\n >\n onEditCost(costDetail)}>\n \n \n onRemoveCost(id)}>\n \n \n \n \n \n )}\n \n );\n })}\n {!disabled && (\n \n \n \n \n \n )}\n \n \n \n
    \n \n
    \n
    \n \n \n \n {formatCurrency(totalCost, currencyCode)}\n \n \n \n \n
    \n );\n}\n","import {\n createContext,\n Dispatch,\n SetStateAction,\n useCallback,\n useContext,\n useMemo,\n useState,\n} from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport {\n PurchaseOrderDealConfig,\n PurchaseOrderDealDetailsInput,\n PurchaseOrderDealInput,\n PurchaseOrderDetailsInput,\n} from 'src/WebApiController';\n\nimport { useSellerAccountContext } from '../SellerAccountContext';\n\ninterface DealContextValue {\n localDeal: PurchaseOrderDealInput | null;\n setLocalDeal: Dispatch>;\n updateLocalDealDetails: (\n value: Partial\n ) => void;\n updateLocalDealConfigHurdle: (\n index: number,\n value: Partial\n ) => void;\n updateLocalDealConfigHurdlePriority: (value: number, index: number) => void;\n deleteLocalDealConfigHurdle: (index: number) => void;\n isEditDeal: boolean;\n setIsEditDeal: Dispatch>;\n activeUserIds: string[];\n isValidDeal: boolean;\n assignedPriorities: Set;\n}\nconst DealContext = createContext(undefined);\n\nexport const DealProvider: React.FC<{\n deal?: PurchaseOrderDealInput;\n defaultEdit?: boolean;\n children?: React.ReactNode;\n}> = ({ deal, defaultEdit = false, children }) => {\n const [localDeal, setLocalDeal] = useState(\n deal || null\n );\n\n const { clearErrors, setError } = useFormContext();\n\n const [isEditDeal, setIsEditDeal] = useState(defaultEdit);\n const { allActiveUserInfos } = useSellerAccountContext();\n\n const updateLocalDealDetails = useCallback(\n (value: Partial) => {\n setLocalDeal((prev) => {\n if (!prev) return prev;\n return { ...prev, dealDetails: { ...prev.dealDetails, ...value } };\n });\n },\n []\n );\n\n const updateLocalDealConfigHurdle = useCallback(\n (index: number, value: Partial) => {\n setLocalDeal((prev) => {\n if (!prev || !prev.dealDetails.dealConfigs?.value) return prev;\n\n const updatedConfigs = prev.dealDetails.dealConfigs.value.map(\n (config, i) => (i === index ? { ...config, ...value } : config)\n );\n\n return {\n ...prev,\n dealDetails: {\n ...prev.dealDetails,\n dealConfigs: posChangedField(updatedConfigs),\n },\n };\n });\n },\n []\n );\n\n const deleteLocalDealConfigHurdle = useCallback((index: number) => {\n setLocalDeal((prev) => {\n if (!prev || !prev.dealDetails.dealConfigs?.value) return prev;\n\n const updatedConfigs = prev.dealDetails.dealConfigs.value\n .filter((_, i) => i !== index)\n .map((config) => ({ ...config }));\n\n // Recalculate config priorities to ensure contiguous and uniqueness\n const deletedPriority =\n prev.dealDetails.dealConfigs.value[index].priority;\n\n const seenPriorities = new Set();\n const expectedPriorities = new Set(\n Array.from({ length: updatedConfigs.length }, (_, i) => i + 1)\n );\n\n // Only decrement priorities > deleted priority. Ensure uniqueness by tracking decremented priority\n updatedConfigs.forEach((config) => {\n if (\n deletedPriority &&\n config.priority &&\n config.priority >= deletedPriority\n ) {\n if (!seenPriorities.has(config.priority - 1)) {\n config.priority -= 1;\n } else if (!expectedPriorities.has(config.priority)) {\n config.priority = null;\n }\n }\n seenPriorities.add(config.priority);\n });\n\n clearErrors();\n checkDealConfigHurdlePriorities(updatedConfigs);\n\n return {\n ...prev,\n dealDetails: {\n ...prev.dealDetails,\n dealConfigs: posChangedField(updatedConfigs),\n },\n };\n });\n }, []);\n\n const updateLocalDealConfigHurdlePriority = useCallback(\n (value: number, index: number) => {\n updateLocalDealConfigHurdle(index, {\n priority: Number(value),\n });\n\n const updatedConfigs = localDeal?.dealDetails?.dealConfigs?.value;\n if (!updatedConfigs) return;\n\n updatedConfigs[index].priority = value;\n\n checkDealConfigHurdlePriorities(updatedConfigs);\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [localDeal?.dealDetails?.dealConfigs?.value]\n );\n\n const checkDealConfigHurdlePriorities = useCallback(\n (configs: PurchaseOrderDealConfig[]) => {\n const priorityMap = configs.reduce(\n (map, config, i) => {\n if (config.priority !== null) {\n if (!map[config.priority]) {\n map[config.priority] = [];\n }\n map[config.priority].push(i);\n }\n return map;\n },\n {} as Record\n );\n\n Object.entries(priorityMap).forEach(([priority, indices]) => {\n if (indices.length > 1) {\n indices.forEach((i) => {\n setError(`deal.value.dealDetails.dealConfigs.value.${i}.priority`, {\n message: 'Priority must be unique',\n });\n });\n } else {\n clearErrors(\n `deal.value.dealDetails.dealConfigs.value.${indices[0]}.priority`\n );\n }\n });\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n []\n );\n\n const activeUserIds = useMemo(\n () =>\n allActiveUserInfos\n ? Object.values(allActiveUserInfos).map((u) => u.userId)\n : [],\n [allActiveUserInfos]\n );\n\n const assignedPriorities = useMemo(() => {\n return new Set(\n localDeal?.dealDetails.dealConfigs?.value\n ?.map((config) => config.priority)\n .filter((priority): priority is number => priority !== null)\n );\n }, [localDeal?.dealDetails]);\n\n const isValidDeal = useMemo(() => {\n if (\n !localDeal ||\n !localDeal.dealDetails.dealConfigs?.value ||\n !localDeal.dealDetails.dealFallbackConfig\n )\n return true;\n\n const validHurdles = localDeal.dealDetails.dealConfigs.value.every(\n (config) => {\n const vendorSplit = config.vendorCommission.splitValue;\n const totalPurchaserSplit = config.purchaserCommissions.reduce(\n (acc, split) => acc + split.splitValue,\n 0\n );\n return vendorSplit + totalPurchaserSplit === 100;\n }\n );\n\n const validFallbackHurdle =\n localDeal.dealDetails.dealFallbackConfig.vendorCommission.splitValue +\n localDeal.dealDetails.dealFallbackConfig.purchaserCommissions.reduce(\n (acc, split) => acc + split.splitValue,\n 0\n ) ===\n 100;\n\n return (\n validHurdles &&\n validFallbackHurdle &&\n assignedPriorities.size === localDeal.dealDetails.dealConfigs.value.length\n );\n }, [assignedPriorities.size, localDeal]);\n\n return (\n \n {children}\n \n );\n};\n\nexport const useDealContext = (): DealContextValue => {\n const context = useContext(DealContext);\n if (!context) {\n throw new Error('useDealContext must be used within a DealProvider');\n }\n return context;\n};\n","import clsx from 'clsx';\nimport {\n ComponentProps,\n ComponentPropsWithoutRef,\n ComponentType,\n forwardRef,\n ReactNode,\n} from 'react';\nimport { vars } from 'src/core/themes';\nimport { Collapsible } from 'src/core/ui';\nimport { mergeProps, styledComponent } from 'src/core/utils';\nimport {\n ExpandIcon as ExpandIconDefault,\n FoldIcon as FoldIconDefault,\n IconsFill,\n} from 'src/svgs/Viagogo';\n\nimport * as styles from './PosCollapsible.css';\n\nexport type PosCollapsibleProps = Pick<\n ComponentProps,\n 'open' | 'onOpenChange'\n> & {\n trigger?: ReactNode;\n children?: ReactNode;\n};\n\nexport function PosCollapsible({\n open,\n onOpenChange,\n trigger,\n children,\n}: PosCollapsibleProps) {\n return (\n \n {trigger}\n {children}\n \n );\n}\n\nexport const Root = styledComponent(Collapsible.Root, styles.root);\n\nexport const Trigger = forwardRef<\n HTMLButtonElement,\n ComponentPropsWithoutRef & {\n ExpandIcon?: ComponentType<{ size: string; fill: IconsFill }>;\n FoldIcon?: ComponentType<{ size: string; fill: IconsFill }>;\n iconSize?: string;\n }\n>(function Content({ children, ...props }, ref) {\n const ExpandIcon = props.ExpandIcon ?? ExpandIconDefault;\n const FoldIcon = props.FoldIcon ?? FoldIconDefault;\n\n return (\n \n
    \n
    {children}
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n );\n});\n\nexport const Content = styledComponent(Collapsible.Content, styles.content);\n","import { MouseEventHandler, useEffect } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { SellerAccountEmployeeSelector } from 'src/components/Selectors/SellerAccountEmployeeSelector';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { DeleteIcon, IconsFill } from 'src/svgs/Viagogo';\nimport {\n PurchaseOrderDealCommission,\n PurchaseOrderDetailsInput,\n} from 'src/WebApiController';\n\nimport { ChangeCommissionInput } from './DealConfigHurdle';\n\nexport const createDefaultDealCommission = (\n userId: string\n): PurchaseOrderDealCommission => ({\n userId,\n splitValue: 0,\n});\n\nexport const DealConfigSplitCommissionVendorAccount = ({\n vendorCommission,\n onChangeCommission,\n}: {\n vendorCommission: PurchaseOrderDealCommission;\n onChangeCommission: (input: number) => void;\n}) => {\n const { watch } = useFormContext();\n const vendorAccount = watch('vendorAccount');\n\n return (\n \n \n\n onChangeCommission(Number(e.target.value))}\n type=\"number\"\n inputMode=\"decimal\"\n postfixDisplay=\"%\"\n value={Number(vendorCommission.splitValue)}\n min={0}\n max={100}\n maxLength={200}\n />\n \n );\n};\n\nexport const DealConfigSplitCommissionPurchasedBy = ({\n index,\n commission,\n onDeleteCommission,\n onChangeCommission,\n}: {\n index: number;\n commission: PurchaseOrderDealCommission;\n onDeleteCommission: MouseEventHandler;\n onChangeCommission: (input: ChangeCommissionInput) => void;\n}) => {\n return (\n \n e.stopPropagation()}\n onChange={(value) => {\n onChangeCommission({\n changedUserId: value,\n changedValue: null,\n commissionIndex: index,\n });\n }}\n style={{ flex: 2 }}\n />\n\n {\n onChangeCommission({\n changedUserId: null,\n changedValue: Number(e.target.value),\n commissionIndex: index,\n });\n }}\n maxLength={200}\n />\n {index !== 0 && (\n \n )}\n \n );\n};\n","import { Content } from 'src/contexts/ContentContext/Content';\nimport { useDealContext } from 'src/contexts/DealContext/DealContext';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { IconsFill, InfoOutlineIcon, PlusIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n PurchaseOrderDealCommission,\n PurchaseOrderDealConfig,\n} from 'src/WebApiController';\n\nimport * as styles from '../Deals.css';\nimport { ChangeCommissionInput } from './DealConfigHurdle';\nimport {\n DealConfigSplitCommissionPurchasedBy,\n DealConfigSplitCommissionVendorAccount,\n} from './DealConfigHurdleSplitCommissions';\n\nexport const DealConfigHurdleSplit = ({\n index,\n config,\n vendorCommission,\n onChangeVendorCommission,\n onAddNewCommission,\n onDeleteCommission,\n onChangeCommission,\n}: {\n index: number;\n config: PurchaseOrderDealConfig;\n vendorCommission: PurchaseOrderDealCommission;\n onChangeVendorCommission: (input: number) => void;\n onAddNewCommission?: () => void;\n onDeleteCommission: (removeIndex: number) => void;\n onChangeCommission: ({\n changedUserId,\n changedValue,\n commissionIndex,\n }: ChangeCommissionInput) => void;\n}) => {\n const { activeUserIds } = useDealContext();\n const totalHurdlePercentage =\n config.vendorCommission.splitValue +\n config.purchaserCommissions.reduce(\n (acc, commission) => acc + commission.splitValue,\n 0\n );\n\n return (\n \n \n \n }\n errors={undefined}\n >\n \n \n \n \n \n {config.purchaserCommissions.map(\n (commission: PurchaseOrderDealCommission, index: number) => {\n return (\n onDeleteCommission(index)}\n onChangeCommission={onChangeCommission}\n />\n );\n }\n )}\n \n \n {onAddNewCommission &&\n activeUserIds.length > config.purchaserCommissions.length && (\n \n \n \n \n )}\n \n \n
    \n \n \n : {totalHurdlePercentage}/100%\n {totalHurdlePercentage !== 100 && (\n \n \n \n \n )}\n
    \n
    \n
    \n \n \n );\n};\n","import { differenceWith } from 'lodash-es';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useDealContext } from 'src/contexts/DealContext/DealContext';\nimport { useSellerAccountContext } from 'src/contexts/SellerAccountContext';\nimport * as PosCollapsible from 'src/core/POS/PosCollapsible';\nimport { Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n PurchaseOrderDealConfig,\n PurchaseOrderDetailsInput,\n} from 'src/WebApiController';\n\nimport * as styles from '../Deals.css';\nimport { ChangeCommissionInput } from './DealConfigHurdle';\nimport { DealConfigHurdleSplit } from './DealConfigHurdleSplit';\nimport { createDefaultDealCommission } from './DealConfigHurdleSplitCommissions';\n\nexport const DealFallbackSection = ({\n dealFallbackConfig,\n}: {\n dealFallbackConfig: PurchaseOrderDealConfig;\n}) => {\n const { watch } = useFormContext();\n const { updateLocalDealDetails } = useDealContext();\n const { allActiveUserInfos } = useSellerAccountContext();\n const [open, setOpen] = useState(true);\n\n const { purchaserCommissions, vendorCommission } = dealFallbackConfig;\n const activeUserIds = useMemo(\n () =>\n allActiveUserInfos\n ? Object.values(allActiveUserInfos).map((u) => u.userId)\n : [],\n [allActiveUserInfos]\n );\n\n const vendorAccount = watch('vendorAccount');\n\n useEffect(() => {\n updateLocalDealDetails({\n dealFallbackConfig: {\n ...dealFallbackConfig,\n vendorCommission: {\n ...vendorCommission,\n userId: vendorAccount?.value?.id || '',\n },\n },\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [vendorAccount]);\n\n const onChangeVendorCommission = useCallback(\n (changedValue: number) => {\n updateLocalDealDetails({\n dealFallbackConfig: {\n ...dealFallbackConfig,\n vendorCommission: {\n ...vendorCommission,\n splitValue: changedValue,\n },\n },\n });\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [vendorCommission]\n );\n\n const onAddNewCommission = useCallback(() => {\n const firstAvailableUserId = differenceWith(\n activeUserIds,\n purchaserCommissions ?? [],\n (activeUserId, commission) => activeUserId === commission.userId\n )[0];\n\n if (!firstAvailableUserId) return;\n updateLocalDealDetails({\n dealFallbackConfig: {\n ...dealFallbackConfig,\n purchaserCommissions: [\n ...purchaserCommissions,\n createDefaultDealCommission(firstAvailableUserId),\n ],\n },\n });\n }, [\n activeUserIds,\n dealFallbackConfig,\n purchaserCommissions,\n updateLocalDealDetails,\n ]);\n\n const onChangeCommission = useCallback(\n ({\n changedUserId,\n changedValue,\n commissionIndex,\n }: ChangeCommissionInput) => {\n if (changedUserId) {\n const isUserIdAlreadyUsed = purchaserCommissions?.find(\n (existingCommission) => existingCommission.userId === changedUserId\n );\n if (isUserIdAlreadyUsed) return;\n updateLocalDealDetails({\n dealFallbackConfig: {\n ...dealFallbackConfig,\n purchaserCommissions: [\n ...purchaserCommissions.map((commission, i) =>\n i === commissionIndex\n ? { ...commission, userId: changedUserId }\n : commission\n ),\n ],\n },\n });\n }\n\n if (changedValue !== null) {\n updateLocalDealDetails({\n dealFallbackConfig: {\n ...dealFallbackConfig,\n purchaserCommissions: [\n ...purchaserCommissions.map((commission, i) =>\n i === commissionIndex\n ? { ...commission, splitValue: changedValue }\n : commission\n ),\n ],\n },\n });\n }\n },\n [dealFallbackConfig, purchaserCommissions, updateLocalDealDetails]\n );\n\n const onDeleteCommission = useCallback(\n (removeIndex: number) => {\n if (dealFallbackConfig.purchaserCommissions.length <= 1) return;\n const newCommissions = [...dealFallbackConfig.purchaserCommissions];\n const updatedCommissions = newCommissions.filter(\n (_, i) => i !== removeIndex\n );\n\n updateLocalDealDetails({\n dealFallbackConfig: {\n ...dealFallbackConfig,\n purchaserCommissions: updatedCommissions,\n },\n });\n },\n [dealFallbackConfig, updateLocalDealDetails]\n );\n\n return (\n setOpen(!open)}>\n
    \n \n \n
    \n \n
    \n
    \n \n
    \n \n
    \n \n
    \n \n
    \n
    \n
    \n
    \n );\n};\n","import differenceWith from 'lodash-es/differenceWith';\nimport { useCallback, useEffect, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Content, FormatContent } from 'src/contexts/ContentContext/Content';\nimport { useDealContext } from 'src/contexts/DealContext/DealContext';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosEnumSelect, PosSelect } from 'src/core/POS/PosSelect';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { Stack } from 'src/core/ui';\nimport { DeleteIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { DEAL_CONFIG_TRESHOLD_SPLIT_DIRECTION_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { PurchaseOrderDetailsInput } from 'src/utils/purchaseUtils';\nimport {\n DealSplitType,\n PurchaseOrderDealCommission,\n PurchaseOrderDealConfig,\n} from 'src/WebApiController';\n\nimport * as styles from '../Deals.css';\nimport { DealConfigHurdleSplit } from './DealConfigHurdleSplit';\nimport { createDefaultDealCommission } from './DealConfigHurdleSplitCommissions';\n\nexport type ChangeCommissionInput = {\n changedUserId: string | null;\n changedValue: number | null;\n commissionIndex: number;\n};\n\nexport const DealConfigHurdle = ({\n config,\n index,\n}: {\n config: PurchaseOrderDealConfig;\n index: number;\n}) => {\n const {\n updateLocalDealConfigHurdle,\n activeUserIds,\n updateLocalDealConfigHurdlePriority,\n } = useDealContext();\n\n const { watch, formState, setError } =\n useFormContext();\n const configSplitType = watch('deal.value.dealDetails.configSplitType.value');\n\n const { purchaserCommissions } = config;\n\n const vendorCommission = config.vendorCommission;\n const vendorAccount = watch('vendorAccount');\n\n useEffect(() => {\n updateLocalDealConfigHurdle(index, {\n vendorCommission: {\n ...vendorCommission,\n userId: vendorAccount?.value?.id || '',\n },\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [vendorAccount]);\n\n const onChangeVendorCommission = useCallback(\n (changedValue: number) => {\n updateLocalDealConfigHurdle(index, {\n vendorCommission: {\n ...vendorCommission,\n splitValue: changedValue,\n },\n });\n },\n [index, updateLocalDealConfigHurdle, vendorCommission]\n );\n\n const onAddNewCommission = useCallback(() => {\n const firstAvailableUserId = differenceWith(\n activeUserIds,\n purchaserCommissions ?? [],\n (activeUserId, commission) => activeUserId === commission.userId\n )[0];\n if (!firstAvailableUserId) return;\n updateLocalDealConfigHurdle(index, {\n purchaserCommissions: [\n ...purchaserCommissions,\n createDefaultDealCommission(firstAvailableUserId),\n ],\n });\n }, [activeUserIds, purchaserCommissions, updateLocalDealConfigHurdle, index]);\n\n const onChangeCommission = useCallback(\n ({\n changedUserId,\n changedValue,\n commissionIndex,\n }: ChangeCommissionInput) => {\n if (changedUserId) {\n const isUserIdAlreadyUsed = purchaserCommissions?.find(\n (existingCommission) => existingCommission.userId === changedUserId\n );\n if (isUserIdAlreadyUsed) return;\n updateLocalDealConfigHurdle(index, {\n purchaserCommissions: [\n ...purchaserCommissions.map((commission, i) =>\n i === commissionIndex\n ? { ...commission, userId: changedUserId }\n : commission\n ),\n ],\n });\n }\n\n if (changedValue !== null) {\n updateLocalDealConfigHurdle(index, {\n purchaserCommissions: [\n ...purchaserCommissions.map((commission, i) =>\n i === commissionIndex\n ? { ...commission, splitValue: changedValue }\n : commission\n ),\n ],\n });\n }\n },\n [index, purchaserCommissions, updateLocalDealConfigHurdle]\n );\n\n const onDeleteCommission = useCallback(\n (removeIndex: number) => {\n if (config.purchaserCommissions.length <= 1) return;\n const newCommissions = [...config.purchaserCommissions];\n const updatedCommissions = newCommissions.filter(\n (_, i) => i !== removeIndex\n );\n updateLocalDealConfigHurdle(index, {\n purchaserCommissions: updatedCommissions,\n });\n },\n [config.purchaserCommissions, index, updateLocalDealConfigHurdle]\n );\n\n return (\n \n );\n};\n\nconst HurdleConfig = ({\n config,\n vendorCommission,\n onChangeVendorCommission,\n onAddNewCommission,\n onChangeCommission,\n onDeleteCommission,\n index,\n}: {\n config: PurchaseOrderDealConfig;\n vendorCommission: PurchaseOrderDealCommission;\n onChangeVendorCommission: (input: number) => void;\n onAddNewCommission: () => void;\n onChangeCommission: ({\n changedUserId,\n changedValue,\n commissionIndex,\n }: ChangeCommissionInput) => void;\n onDeleteCommission: (removeIndex: number) => void;\n index: number;\n}) => {\n const {\n localDeal,\n deleteLocalDealConfigHurdle,\n updateLocalDealConfigHurdle,\n updateLocalDealConfigHurdlePriority,\n } = useDealContext();\n\n const { formState } = useFormContext();\n\n const configSplitType = localDeal?.dealDetails?.configSplitType.value;\n const thresholdValue = config.thresholdValue;\n\n const numHurdles = localDeal?.dealDetails?.dealConfigs?.value?.length || 0;\n\n const priorityOptions = useMemo(() => {\n const options: Record = {};\n for (let i = 1; i <= numHurdles; i++) {\n options[i.toString()] = i.toString();\n }\n return options;\n }, [numHurdles]);\n\n return (\n <>\n \n
    \n \n
    \n {index !== 0 && (\n deleteLocalDealConfigHurdle(index)}\n />\n )}\n \n }\n errors={\n formState.errors.deal?.value?.dealDetails?.dealConfigs?.value?.[index]\n ?.priority?.message\n }\n >\n \n \n updateLocalDealConfigHurdle(index, {\n thresholdSplitDirection: value,\n })\n }\n />\n \n updateLocalDealConfigHurdle(index, {\n thresholdValue: Number(e.target.value),\n })\n }\n value={thresholdValue || 0}\n />\n {\n updateLocalDealConfigHurdlePriority(Number(value), index);\n }}\n placeholderText={ContentId.SetPriority}\n />\n \n \n\n \n \n \n \n );\n};\n\nconst NonHurdleConfig = ({\n config,\n vendorCommission,\n onChangeVendorCommission,\n onChangeCommission,\n onDeleteCommission,\n index,\n}: {\n config: PurchaseOrderDealConfig;\n vendorCommission: PurchaseOrderDealCommission;\n onChangeVendorCommission: (input: number) => void;\n onChangeCommission: ({\n changedUserId,\n changedValue,\n commissionIndex,\n }: ChangeCommissionInput) => void;\n onDeleteCommission: (removeIndex: number) => void;\n index: number;\n}) => {\n return (\n \n \n \n \n }\n >\n \n \n \n );\n};\n","import { useFormContext } from 'react-hook-form';\nimport { Content } from 'src/contexts/ContentContext/Content';\nimport { useDealContext } from 'src/contexts/DealContext/DealContext';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { IconsFill, PlusIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport { PurchaseOrderDetailsInput } from 'src/utils/purchaseUtils';\nimport {\n DealSplitType,\n DealThresholdSplitDirection,\n PurchaseOrderDealConfig,\n} from 'src/WebApiController';\n\nimport { DealConfigHurdle } from './DealConfigHurdle/DealConfigHurdle';\nimport { createDefaultDealCommission } from './DealConfigHurdle/DealConfigHurdleSplitCommissions';\nimport * as styles from './Deals.css';\n\nexport const createDefaultDealConfig = (\n userId?: string | null,\n buyerUserId?: string | null,\n priority?: number | null\n): PurchaseOrderDealConfig => {\n return {\n dealConfigHurdleId: null,\n thresholdSplitDirection: DealThresholdSplitDirection.Above,\n thresholdValue: 0,\n vendorCommission: createDefaultDealCommission(userId || ''),\n purchaserCommissions: [createDefaultDealCommission(buyerUserId || '')],\n priority: priority || 1,\n };\n};\n\nexport const DealConfigSection = ({\n dealConfigs,\n}: {\n dealConfigs: PurchaseOrderDealConfig[] | null;\n}) => {\n const { watch } = useFormContext();\n const { localDeal, updateLocalDealDetails } = useDealContext();\n const buyerUserId = watch('buyerUserId')?.value;\n\n const vendorAccount = watch('vendorAccount');\n const configSplitType = localDeal?.dealDetails?.configSplitType.value;\n\n if (!dealConfigs) {\n return null;\n }\n\n return (\n <>\n {dealConfigs.map((dealConfig: PurchaseOrderDealConfig, i: number) => {\n return (\n <>\n {i !== 0 &&
    }\n \n \n );\n })}\n {configSplitType !== DealSplitType.None && (\n {\n updateLocalDealDetails({\n dealConfigs: posChangedField([\n ...dealConfigs,\n createDefaultDealConfig(\n vendorAccount?.value?.id || null,\n buyerUserId,\n dealConfigs.length + 1\n ),\n ]),\n });\n }}\n style={{ alignSelf: 'end' }}\n >\n \n \n \n )}\n \n );\n};\n","import { endOfDay, startOfDay } from 'date-fns';\nimport { Content } from 'src/contexts/ContentContext/Content';\nimport { useDealContext } from 'src/contexts/DealContext/DealContext';\nimport { DatePickerInput } from 'src/core/POS/DateSelector';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getLocaleFromLanguageOrCurrent } from 'src/utils/localeUtils';\n\nimport * as styles from './Deals.css';\n\nexport const DealDateRangeSection = ({\n dealStartDate,\n dealEndDate,\n}: {\n dealStartDate?: string | null;\n dealEndDate?: string | null;\n}) => {\n const { updateLocalDealDetails } = useDealContext();\n\n return (\n \n \n
    \n }\n >\n {\n const startDate = startOfDay(value);\n const currentEndDate = dealEndDate ? new Date(dealEndDate) : null;\n updateLocalDealDetails({ dealStartDate: startDate.toISOString() });\n\n // Update end date only if it's less than the new start date\n if (currentEndDate && currentEndDate < startDate) {\n updateLocalDealDetails({\n dealEndDate: endOfDay(startDate).toISOString(),\n });\n }\n }}\n locale={getLocaleFromLanguageOrCurrent()}\n />\n {\n const endDate = endOfDay(value);\n const currentStartDate = dealStartDate\n ? new Date(dealStartDate)\n : null;\n updateLocalDealDetails({ dealEndDate: endDate.toISOString() });\n\n // Update start date only if it's less than the new end date\n if (currentStartDate && currentStartDate > endDate) {\n updateLocalDealDetails({\n dealStartDate: startOfDay(endDate).toISOString(),\n });\n }\n }}\n locale={getLocaleFromLanguageOrCurrent()}\n />\n \n );\n};\n","import { useFormContext } from 'react-hook-form';\nimport { Content } from 'src/contexts/ContentContext/Content';\nimport { useDealContext } from 'src/contexts/DealContext/DealContext';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { DEAL_CONFIG_SPLIT_TYPE_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport { DealSplitType, PurchaseOrderDetailsInput } from 'src/WebApiController';\n\nimport { createDefaultDealConfig } from './DealConfigSection';\nimport * as styles from './Deals.css';\n\nexport const DealSplitTypeSection = ({\n dealSplitType,\n}: {\n dealSplitType: DealSplitType | null;\n}) => {\n const { updateLocalDealDetails } = useDealContext();\n const { watch } = useFormContext();\n const buyerUserId = watch('buyerUserId')?.value;\n const vendorAccountId = watch('vendorAccount')?.value?.id;\n\n if (!dealSplitType) {\n return;\n }\n\n return (\n \n \n \n }\n errors={undefined}\n >\n {\n if (value === DealSplitType.None) {\n updateLocalDealDetails({\n configSplitType: posChangedField(value),\n dealConfigs: posChangedField([]),\n });\n } else if (\n dealSplitType === DealSplitType.None &&\n (value === DealSplitType.Quantity || value === DealSplitType.Sales)\n ) {\n updateLocalDealDetails({\n configSplitType: posChangedField(value),\n dealConfigs: posChangedField([\n createDefaultDealConfig(vendorAccountId, buyerUserId, 1),\n ]),\n });\n } else {\n updateLocalDealDetails({\n configSplitType: posChangedField(value),\n });\n }\n }}\n />\n \n );\n};\n","import { Content } from 'src/contexts/ContentContext/Content';\nimport { useDealContext } from 'src/contexts/DealContext/DealContext';\nimport { Radio, RadioGroup, Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { DealType } from 'src/WebApiController';\n\nexport const DealTypeSection = ({ dealType }: { dealType?: DealType }) => {\n const { setLocalDeal } = useDealContext();\n\n return (\n {\n setLocalDeal((prev) => {\n if (!prev) return prev;\n return { ...prev, dealType: value };\n });\n }}\n value={dealType}\n >\n \n } />\n }\n />\n \n \n );\n};\n","import { endOfDay, startOfDay } from 'date-fns';\nimport { useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Content } from 'src/contexts/ContentContext';\nimport {\n DealProvider,\n useDealContext,\n} from 'src/contexts/DealContext/DealContext';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { DeleteIcon, EditIcon, IconsFill, PlusIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { posChangedField, posField } from 'src/utils/posFieldUtils';\nimport { PurchaseOrderDetailsInput } from 'src/utils/purchaseUtils';\nimport {\n DealSplitType,\n DealType,\n Feature,\n PurchaseOrderDealDetailsInput,\n PurchaseOrderDealInput,\n} from 'src/WebApiController';\n\nimport { DealFallbackSection } from './DealConfigHurdle/DealConfigFallbackHurdle';\nimport {\n createDefaultDealConfig,\n DealConfigSection,\n} from './DealConfigSection';\nimport { DealDateRangeSection } from './DealDateRangeSection';\nimport * as styles from './Deals.css';\nimport { DealSplitTypeSection } from './DealSplitTypeSection';\nimport { DealTypeSection } from './DealTypeSection';\n\nexport const createDefaultPODeal = (\n userId: string,\n buyerUserId?: string | null\n): PurchaseOrderDealInput => ({\n dealId: null,\n dealType: DealType.Sor,\n dealDetails: {\n dealConfigId: null,\n dealFallbackConfig: createDefaultDealConfig(userId, buyerUserId),\n dealConfigs: posField([createDefaultDealConfig(userId, buyerUserId)]),\n dealStartDate: startOfDay(new Date()).toISOString(),\n dealEndDate: endOfDay(new Date()).toISOString(),\n configSplitType: posField(DealSplitType.Sales),\n guaranteedAmountPaid: 0,\n },\n});\n\nconst DealSectionInput = ({\n dealDetails,\n}: {\n dealDetails?: PurchaseOrderDealDetailsInput;\n}) => {\n if (!dealDetails) {\n return;\n }\n\n return (\n \n \n \n \n {dealDetails.dealFallbackConfig && (\n \n )}\n \n );\n};\n\nconst DealSectionContent = () => {\n const [isEditDeal, setIsEditDeal] = useState(false);\n const { watch, setValue } = useFormContext();\n const hasConsignmentDealFeature = useUserHasFeature(Feature.ConsignmentDeal);\n const dealField = watch('deal');\n const buyerUserId = watch('buyerUserId')?.value;\n const { localDeal, setLocalDeal, isValidDeal } = useDealContext();\n\n if (!hasConsignmentDealFeature) {\n return null;\n }\n\n const { value: deal } = dealField || {};\n\n // Show Collapsed Deal UI if deal is present\n if (deal && !isEditDeal) {\n return (\n \n \n
    \n \n
    \n {deal?.dealType === DealType.Sor && }\n {deal?.dealType === DealType.Guaranteed && (\n \n )}\n
    \n \n setValue('deal', posChangedField(null))}\n />\n {\n setIsEditDeal(true);\n setLocalDeal(deal);\n }}\n style={{ alignSelf: 'center' }}\n >\n \n \n \n \n
    \n );\n }\n\n return isEditDeal ? (\n \n \n \n \n {\n setIsEditDeal(false);\n }}\n style={{ alignSelf: 'end' }}\n >\n \n \n {\n setIsEditDeal(false);\n setValue('deal', posChangedField(localDeal || null));\n }}\n style={{ alignSelf: 'end' }}\n disabled={!isValidDeal}\n >\n \n \n \n \n ) : (\n \n
    \n \n
    \n {\n setIsEditDeal(true);\n setLocalDeal(createDefaultPODeal('userId', buyerUserId));\n }}\n style={{ alignSelf: 'end' }}\n >\n \n \n \n \n );\n};\n\nexport const DealSection = () => {\n const { watch } = useFormContext();\n const hasConsignmentDealFeature = useUserHasFeature(Feature.ConsignmentDeal);\n\n if (!hasConsignmentDealFeature) {\n return null;\n }\n\n const dealField = watch('deal');\n const { value: deal } = dealField || {};\n\n return (\n \n \n \n );\n};\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport const AccountSectionLabel = styled.div`\n font-size: ${() => vars.typography.fontSize.base};\n color: ${(props) => props.theme.colors.textPrimary};\n`;\n\nexport const AccountSectionEmail = styled(AccountSectionLabel)`\n color: ${(props) => props.theme.colors.textStrong};\n font-weight: 500;\n`;\n\nexport const VendorSectionLabel = styled(AccountSectionLabel)``;\n\nexport const VendorSectionName = styled.div`\n color: ${(props) => props.theme.colors.textStrong};\n font-weight: 500;\n`;\n","import { Content } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { EditIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { PurchaseVendor, PurchaseVendorAccount } from 'src/WebApiController';\n\nimport * as modalStyles from '../PurchaseModal.css';\nimport { BodySectionTitle } from '../PurchaseModal.styled';\nimport * as styles from './DeliverySection.css';\nimport {\n AccountSectionEmail,\n AccountSectionLabel,\n VendorSectionLabel,\n VendorSectionName,\n} from './DeliverySection.styled';\n\nexport type DeliverySectionProps = {\n vendor: PurchaseVendor | null;\n vendorAccount: PurchaseVendorAccount | null;\n onChangeClick?: () => void;\n disabled?: boolean;\n};\n\nexport const DeliverySection = ({\n vendor,\n vendorAccount,\n onChangeClick,\n disabled,\n}: DeliverySectionProps) => {\n return (\n
    \n \n \n \n
    \n
    \n \n \n \n {vendorAccount?.email}\n {!disabled && (\n \n )}\n
    \n
    \n \n \n \n {vendor?.name}\n
    \n
    \n
    \n );\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { useSellerAccountContext } from 'src/contexts/SellerAccountContext';\nimport { SellerAccountClient } from 'src/WebApiController';\n\nexport type UseGetUserInfo = {\n id: string;\n name: string;\n email: string;\n isDeactivated: boolean;\n};\n\nexport const getUserDisplayName = (\n userInfo: UseGetUserInfo,\n deactivatedText?: string\n) => {\n let displayString = userInfo.name ?? userInfo.email ?? userInfo.id;\n\n if (userInfo.isDeactivated && deactivatedText) {\n displayString += ` (${deactivatedText})`;\n }\n\n return displayString;\n};\n\nexport const useGetUserInfos = (userIds?: string[]) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n\n const { getUserInfo } = useSellerAccountContext();\n const getUserInfosQuery = useQuery({\n queryKey: ['GetUserInfo', userIds],\n queryFn: async () => {\n const result = {} as Record;\n\n if (!userIds?.length) return result;\n\n const userInfos = userIds.map(async (userId) => {\n const userInfo = getUserInfo(userId);\n if (userInfo) {\n return {\n id: userInfo.userId,\n name: userInfo.displayName,\n email: userInfo.email,\n isDeactivated: userInfo.isDeactivated,\n };\n }\n\n if (userId != null) {\n const sellerUser = await new SellerAccountClient(\n activeAccountWebClientConfig\n ).getSellerUser(userId);\n\n if (sellerUser) {\n return {\n id: sellerUser.sellerUserId,\n name: sellerUser.sellerDisplayName,\n email: sellerUser.email,\n isDeactivated: Boolean(sellerUser.deleteDate),\n };\n }\n }\n\n return null;\n });\n\n return (await Promise.all(userInfos)).reduce((r, c) => {\n if (c) {\n r[c.id] = c;\n }\n return r;\n }, result);\n },\n\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError('SellerAccountClient.GetUserInfo', error);\n },\n },\n });\n\n return getUserInfosQuery;\n};\n","import { ComponentType } from 'react';\nimport { vars } from 'src/core/themes';\nimport { BASE_LIGHT_PALETTE } from 'src/core/themes/legacy/shared/palette/common-palette-light';\nimport { HistoryIcon as HistoryIconOriginal } from 'src/svgs/Viagogo';\nimport styled from 'styled-components/macro';\n\n/**\n * XXX: Fix for `HistoryIcon` size and positioning.\n */\nconst HistoryIconFix = styled.div`\n path {\n scale: 1.35;\n transform: translate(-1px, -1px);\n }\n`;\n\ntype HistoryIconProps = Parameters[0];\n\n/**\n * XXX: Fix because `HistoryIcon` is typed incorrectly.\n */\nconst HistoryIconFixedType =\n HistoryIconOriginal as unknown as ComponentType;\n\nexport const HistoryIcon = (props: HistoryIconProps) => {\n return (\n \n \n \n );\n};\n\nexport const UpdatedByBannerWrapper = styled.div`\n background-color: ${BASE_LIGHT_PALETTE.surfaceSecondary};\n color: ${BASE_LIGHT_PALETTE.textSecondaryOnSurface};\n padding: ${vars.spacing.m} ${vars.spacing.lg};\n line-height: normal;\n border-radius: ${vars.borderRadius.m};\n`;\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const ConvertCurrencyIcon = (props: PosIconProps) => {\n return (\n \n \n \n );\n};\n","import {\n BankAccountIcon,\n GeneralIcon,\n PaypalIcon,\n WalletIcon,\n WireIcon,\n} from 'src/svgs/Viagogo';\nimport { PurchasePaymentMethodType } from 'src/WebApiController';\n\nexport function getPaymentMethodIcon(method: PurchasePaymentMethodType) {\n switch (method) {\n case PurchasePaymentMethodType.PayPal:\n return PaypalIcon;\n case PurchasePaymentMethodType.MoneyOrder:\n case PurchasePaymentMethodType.Cash:\n case PurchasePaymentMethodType.COD:\n return WalletIcon;\n case PurchasePaymentMethodType.BankTransfer:\n return WireIcon;\n case PurchasePaymentMethodType.Check:\n case PurchasePaymentMethodType.ECheck:\n return BankAccountIcon;\n\n case PurchasePaymentMethodType.DebitCard:\n case PurchasePaymentMethodType.DebitNote:\n case PurchasePaymentMethodType.CreditMemo:\n case PurchasePaymentMethodType.Card:\n case PurchasePaymentMethodType.Credit:\n case PurchasePaymentMethodType.Other:\n default:\n return GeneralIcon;\n }\n}\n","import { format } from 'date-fns';\nimport { useMemo } from 'react';\nimport { IconButton } from 'src/components/Buttons';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Button } from 'src/core/ui';\nimport { useGetUserInfos } from 'src/hooks/userGetUserInfo';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { UpdatedByBannerWrapper } from 'src/modals/common/Purchase/PaymentDetailsTable/PaymentDetailsTable.styled';\nimport { ConvertCurrencyIcon } from 'src/svgs/ConvertCurrencyIcon';\nimport { DeleteIcon, EditIcon, IconsFill, PaymentSize } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { formatCurrency } from 'src/utils/numberFormatter';\nimport { getPaymentMethodIcon } from 'src/utils/paymentMethodUtils';\nimport {\n Feature,\n PurchasePayment,\n PurchasePaymentMethodType,\n PurchasePaymentStatus,\n} from 'src/WebApiController';\n\nimport * as styles from '../PurchaseModal.css';\nimport {\n PaymentStatusTextContainer,\n PurchaseDetailsDataTable,\n PurchaseDetailsDataTableCell,\n} from '../PurchaseModal.styled';\n\ntype PaymentDetailsTableEventHandler = (payment: PurchasePayment) => void;\n\nexport type PaymentDetailsTableProps = {\n currencyCode: string;\n payments?: PurchasePayment[] | null;\n disabled?: boolean;\n onSetAsPaid: PaymentDetailsTableEventHandler;\n onEditPayment: PaymentDetailsTableEventHandler;\n onRemovePayment: PaymentDetailsTableEventHandler;\n onConvertCurrency: PaymentDetailsTableEventHandler;\n};\n\nexport function PaymentDetailsTable({\n currencyCode,\n payments,\n disabled,\n onSetAsPaid,\n onEditPayment,\n onRemovePayment,\n onConvertCurrency,\n}: PaymentDetailsTableProps) {\n const canConvertPaymentLines = useUserHasFeature(Feature.ConvertPaymentLines);\n const convertedByUsersIds = useMemo(() => {\n return (payments\n ?.filter((payment) => !!payment.conversionUserId)\n .map((payment) => payment.conversionUserId) ?? []) as string[];\n }, [payments]);\n const userInfos = useGetUserInfos(convertedByUsersIds);\n\n return (\n \n {payments?.length ? (\n <>\n \n \n \n \n \n \n \n \n {canConvertPaymentLines && (\n <>\n \n \n \n \n \n \n \n )}\n \n \n \n \n \n \n \n \n \n \n \n \n {payments?.map((payment) => {\n /**\n * Payment is past due date if the current date is past PaymentDueDate.\n */\n const isPaymentPastDueDate =\n payment.paymentStatus !== PurchasePaymentStatus.Paid &&\n Date.now() > new Date(payment.paymentDueDate).getTime();\n /**\n * Payment is refunded if the PaymentAmount is negative.\n */\n const isPaymentRefunded =\n payment.paymentStatus === PurchasePaymentStatus.Paid &&\n payment.paymentAmount.amt < 0;\n const {\n paymentId,\n paymentStatus,\n paymentDueDate,\n paymentDate,\n paymentAmount,\n paymentMethod,\n convertedPaymentAmount,\n convertedCurrencyCode,\n conversionRate,\n conversionDate,\n conversionUserId,\n } = payment;\n\n const updatedByBanner =\n canConvertPaymentLines && userInfos.data && conversionUserId ? (\n \n \n \n {' '}\n {userInfos.data[conversionUserId]?.name}{' '}\n {' '}\n {format(new Date(conversionDate!), 'MMM d, yyyy')}\n \n \n \n ) : null;\n\n return (\n <>\n \n \n \n \n \n \n \n \n \n \n \n -\n \n {(\n paymentAmount.disp ||\n formatCurrency(\n paymentAmount.amt,\n paymentAmount.currency ?? currencyCode,\n paymentAmount.dec\n )\n ).replace(/^-/, '')}\n \n \n {canConvertPaymentLines && (\n <>\n \n {convertedPaymentAmount?.disp != null ||\n convertedPaymentAmount?.currency != null ||\n convertedCurrencyCode != null\n ? convertedPaymentAmount?.disp ||\n formatCurrency(\n convertedPaymentAmount?.amt,\n convertedPaymentAmount?.currency ??\n convertedCurrencyCode,\n convertedPaymentAmount?.dec\n )\n : null}\n \n {conversionRate}\n \n )}\n \n \n {(paymentStatus === PurchasePaymentStatus.Paid ||\n paymentStatus ===\n PurchasePaymentStatus.RefundNeeded) &&\n paymentDate\n ? new Date(paymentDate).toISOString()\n : new Date(paymentDueDate).toISOString()}\n \n \n \n \n
    \n \n
    \n {paymentStatus === PurchasePaymentStatus.Paid ||\n paymentStatus === PurchasePaymentStatus.RefundNeeded ? (\n paymentMethod.display\n ) : (\n onSetAsPaid(payment)}\n >\n \n \n )}\n
    \n \n {!disabled && (\n \n \n {canConvertPaymentLines && (\n }\n onClick={() => onConvertCurrency(payment)}\n titleContentId={ContentId.ConvertCurrency}\n />\n )}\n \n }\n onClick={() => onEditPayment(payment)}\n titleContentId={ContentId.Edit}\n />\n \n }\n onClick={() => onRemovePayment(payment)}\n titleContentId={ContentId.Remove}\n />\n \n \n )}\n \n {updatedByBanner}\n \n );\n })}\n \n \n ) : (\n \n )}\n
    \n );\n}\n\nfunction PaymentStatusText({\n paymentStatus,\n isPaymentPastDueDate,\n isPaymentRefunded,\n}: Pick & {\n isPaymentPastDueDate: boolean;\n isPaymentRefunded: boolean;\n}) {\n switch (paymentStatus) {\n case PurchasePaymentStatus.Paid:\n return isPaymentRefunded ? (\n \n ) : (\n \n );\n case PurchasePaymentStatus.Unpaid:\n return isPaymentPastDueDate ? (\n \n ) : (\n \n );\n case PurchasePaymentStatus.Failed:\n return ;\n case PurchasePaymentStatus.RefundNeeded:\n return ;\n default:\n return null;\n }\n}\n\nfunction PurchaseMethodIcon({\n paymentMethod,\n}: {\n paymentMethod: PurchasePaymentMethodType;\n}) {\n const Icon = getPaymentMethodIcon(paymentMethod);\n return ;\n}\n","import { useQuery } from '@tanstack/react-query';\nimport { useCallback, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useNavigate } from 'react-router-dom';\nimport { TagsFormBodyV2 } from 'src/components/TagsFormBody';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { AddPurchasePaymentDialog } from 'src/dialogs/AddPurchasePaymentDialog';\nimport { ConvertCurrencyDialog } from 'src/dialogs/ConvertCurrency';\nimport { ConvertCurrencyForm } from 'src/dialogs/ConvertCurrency/ConvertCurrencyDialog';\nimport { EditPurchasePaymentDialog } from 'src/dialogs/EditPurchasePaymentDialog';\nimport { PurchaseCostDialog } from 'src/dialogs/PurchaseCostDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useGetDefaultAutoGeneratedPaymentMethod } from 'src/hooks/useGetDefaultAutoGeneratedPaymentMethod';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport {\n useUserCanLockPurchaseCommission,\n useUserCanUpdatePurchaseCommission,\n useUserCanUpdatePurchaseTags,\n} from 'src/hooks/useUserHasPurchasePermissions';\nimport {\n BodySectionTitle,\n ListingNotesSection,\n PurchasePaymentStatusTextContainer,\n PurchaseVendorHeader,\n TicketDetailRowPaymentList,\n TicketsDetailRow,\n} from 'src/modals/common';\nimport {\n ModalBodyDataContainer,\n ModalBodyHeaderContainer,\n} from 'src/modals/Modal/Modal.styled';\nimport { IconsFill, PlusIcon } from 'src/svgs/Viagogo';\nimport { TicketGroupWithHandlers } from 'src/tables/PurchaseTicketTable/configs/TicketGroupTableColumnsConfig';\nimport { PurchaseTicketTable } from 'src/tables/PurchaseTicketTable/PurchaseTicketTable';\nimport { DEFAULT_AUTO_GENERATED_PAYMENT_METHOD } from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { PURCHASE_PAYMENT_STATUS_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { newBigIntId, newIntId } from 'src/utils/idUtils';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport { PurchaseOrderDetailsInput } from 'src/utils/purchaseUtils';\nimport { getCosts } from 'src/utils/ticketUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n AutoPoClient,\n CostDetail,\n Feature,\n Permission,\n PurchaseClient,\n PurchaseOrderCostType,\n PurchaseOrderDetails,\n PurchasePayment,\n PurchasePaymentMethod,\n PurchasePaymentMethodType,\n PurchasePaymentStatus,\n TicketGroupEditReason,\n UiMoney,\n} from 'src/WebApiController';\n\nimport { CommissionSection } from './CommissionSection';\nimport { CostDetailsTable } from './CostDetailsTable';\nimport { DealSection } from './Deal/DealSection';\nimport { DeliverySection } from './DeliverySection/DeliverySection';\nimport { useGetListingAndSaleIds } from './hooks/useGetListingAndSaleIds';\nimport { PaymentDetailsTable } from './PaymentDetailsTable';\nimport * as styles from './PurchaseModal.css';\n\ntype PurchaseMainDetailsProps = {\n highlightTicketGroupIds?: number[];\n disabled?: boolean;\n allowPaymentEdits: boolean;\n onSecondaryAccountOpen: () => void;\n};\n\nexport function PurchaseMainDetails({\n disabled,\n allowPaymentEdits,\n highlightTicketGroupIds,\n onTicketGroupAction,\n onSecondaryAccountOpen,\n}: PurchaseMainDetailsProps &\n Pick) {\n const { posEntity: purchaseOrder } =\n useActivePosEntityContext();\n const { setValue, getValues, watch } =\n useFormContext();\n\n const poId = watch('id');\n const { saleIds, listingIds } = useGetListingAndSaleIds({\n ticketGroups: purchaseOrder?.ticketGroups,\n });\n\n const { posEntity: purchase } =\n useActivePosEntityContext();\n\n const { loginContext } = useAppContext();\n\n const ticketGroups = watch('ticketGroups');\n const currencyCode = watch('currencyCode');\n\n const currency =\n currencyCode?.value ??\n loginContext?.user?.activeAccount?.currencyCode ??\n 'USD';\n\n const payments = watch('payments');\n const additionalCosts = watch('additionalCosts');\n\n const [editMode, setEditMode] = useState(poId <= 0);\n\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n const { getUiCurrency } = useLocalizationContext();\n const { totalTicketCost, totalShipping, totalCost } = getCosts(\n ticketGroups,\n additionalCosts?.value\n );\n\n const totalPaymentAmount = (payments?.value ?? []).reduce((acc, payment) => {\n if (payment.paymentStatus == PurchasePaymentStatus.Paid) {\n acc += payment.paymentAmount.amt;\n }\n return acc;\n }, 0);\n\n const { trackError } = useErrorBoundaryContext();\n const hasMarkPurchaseAsPaidFeature = useUserHasFeature(Feature.MarkPOAsPaid);\n\n const inboundEmailId = useQuery({\n queryKey: [\n 'AutoPoClient.getAutoPoClassifiedInboundEmailIdForEntity',\n activeAccountWebClientConfig,\n poId,\n ],\n queryFn: async () => {\n if (activeAccountWebClientConfig.activeAccountId == null) {\n return null;\n }\n return new AutoPoClient(\n activeAccountWebClientConfig\n ).getAutoPoClassifiedInboundEmailIdForEntity(poId, null);\n },\n enabled: activeAccountWebClientConfig.activeAccountId != null,\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError(\n 'AutoPoClient.getAutoPoClassifiedInboundEmailIdForEntity',\n error,\n {\n purchaseOrderId: poId,\n }\n );\n },\n },\n });\n const navigate = useNavigate();\n\n const insertFallbackPurchasePaymentMethod = useCallback(\n async () =>\n await tryInvokeApi(\n async () => {\n return await new PurchaseClient(\n activeAccountWebClientConfig\n ).insertPurchasePaymentMethod({\n id: newIntId(), // will let backend auto generate a new one\n display: DEFAULT_AUTO_GENERATED_PAYMENT_METHOD,\n name: DEFAULT_AUTO_GENERATED_PAYMENT_METHOD,\n type: PurchasePaymentMethodType.Other,\n } as PurchasePaymentMethod);\n },\n (error) => {\n showErrorDialog('PurchaseClient.insertPurchasePaymentMethod', error, {\n trackErrorData: {\n paymentMethodName: DEFAULT_AUTO_GENERATED_PAYMENT_METHOD,\n },\n });\n }\n ),\n [activeAccountWebClientConfig, showErrorDialog]\n );\n\n const { defaultAutoGeneratedPaymentMethod } =\n useGetDefaultAutoGeneratedPaymentMethod();\n\n const onMarkPurchaseAsPaid = useCallback(async () => {\n let paymentMethodId = null;\n\n const vendorAccount = getValues('vendorAccount');\n if (vendorAccount?.value?.dftPayMethodId != null) {\n // if vendor account has default payment, use it\n paymentMethodId = vendorAccount.value?.dftPayMethodId;\n } else if (defaultAutoGeneratedPaymentMethod?.id != null) {\n // if fallback default payment already exist for that seller, use it\n paymentMethodId = defaultAutoGeneratedPaymentMethod?.id;\n } else {\n // if neither vendor account payment or fallback payment exists, create the fallback payment for seller account\n paymentMethodId = await insertFallbackPurchasePaymentMethod();\n }\n\n const existingPayments = getValues('payments');\n const newPayments = [];\n const uiCurrency = getUiCurrency(currency);\n\n newPayments.push({\n paymentId: newBigIntId(),\n paymentStatus: PurchasePaymentStatus.Paid,\n paymentDueDate: purchase?.poDate,\n paymentDate: purchase?.poDate,\n paymentAmount: {\n amt: totalCost - totalPaymentAmount,\n disp: null,\n currency: uiCurrency.code,\n dec: uiCurrency.dec,\n } as UiMoney,\n currencyCode: uiCurrency.code,\n paymentMethod: {\n id: paymentMethodId, // backend only need the id for inserting payment\n display: '',\n name: '',\n type: PurchasePaymentMethodType.Other,\n },\n convertedPaymentAmount: null,\n convertedCurrencyCode: null,\n conversionRate: null,\n conversionDate: null,\n conversionUserId: null,\n } as PurchasePayment);\n\n if (existingPayments == null) {\n setValue('payments', posChangedField(newPayments));\n } else {\n setValue(\n 'payments',\n posChangedField([...existingPayments!.value!, ...newPayments])\n );\n }\n }, [\n setValue,\n getValues,\n currency,\n defaultAutoGeneratedPaymentMethod,\n getUiCurrency,\n insertFallbackPurchasePaymentMethod,\n purchase,\n totalCost,\n totalPaymentAmount,\n ]);\n\n return (\n <>\n \n setEditMode(!editMode)}\n numOfSales={saleIds.size}\n numOfListings={listingIds.size}\n onGoToMessageThread={\n inboundEmailId.data\n ? () => {\n navigate(`/messages/${inboundEmailId.data}`);\n }\n : undefined\n }\n enableMarkAsPaid={\n hasMarkPurchaseAsPaidFeature && totalCost > totalPaymentAmount\n }\n onMarkPurchaseAsPaid={onMarkPurchaseAsPaid}\n />\n \n \n \n \n \n );\n}\n\nfunction PurchaseMainDetailsBody({\n disabled,\n allowPaymentEdits,\n highlightTicketGroupIds,\n onTicketGroupAction,\n onSecondaryAccountOpen,\n}: PurchaseMainDetailsProps &\n Pick & {\n numOfSales: number;\n }) {\n const { setValue, getValues, watch } =\n useFormContext();\n const { posEntity: purchase } =\n useActivePosEntityContext();\n\n const canConvertPaymentLines = useUserHasFeature(Feature.ConvertPaymentLines);\n\n const canCreateTagType = useUserHasAnyOfPermissions(\n Permission.Purchases_AddTagType\n );\n const canEditTags = useUserCanUpdatePurchaseTags(purchase);\n const canEditCommission = useUserCanUpdatePurchaseCommission(purchase);\n const canLockUnlockCommission = useUserCanLockPurchaseCommission(purchase);\n\n const { loginContext } = useAppContext();\n const currentUserId = loginContext?.user?.userId!;\n const costDialog = useBasicDialog();\n const addPaymentDialog = useBasicDialog();\n const editPaymentDialog = useBasicDialog();\n const convertCurrencyDialog = useBasicDialog();\n const [currentCostModel, setCurrentCostModel] = useState();\n const [currentPayment, setCurrentPayment] = useState();\n\n const ticketGroups = watch('ticketGroups');\n const currencyCode = watch('currencyCode');\n\n const currency =\n currencyCode?.value ??\n loginContext?.user?.activeAccount?.currencyCode ??\n 'USD';\n\n const payments = watch('payments');\n const secondaryVendor = watch('secondaryVendor');\n const secondaryVendorAccount = watch('secondaryVendorAccount');\n const additionalCosts = watch('additionalCosts');\n const tags = watch('tags');\n const internalNotes = watch('privateNotes');\n\n const onSetPaymentPaid = useCallback(\n ({ paymentId }: PurchasePayment) => {\n const index = payments?.value?.findIndex(\n (p) => p.paymentId === paymentId\n );\n if (index != null && index >= 0) {\n const newPaymentDate = new Date().toISOString();\n if (newPaymentDate > payments!.value![index].paymentDueDate) {\n setValue(\n `payments.value.${index}.paymentStatus`,\n PurchasePaymentStatus.RefundNeeded\n );\n } else {\n setValue(\n `payments.value.${index}.paymentStatus`,\n PurchasePaymentStatus.Paid\n );\n }\n\n setValue(`payments.value.${index}.paymentDate`, newPaymentDate);\n setValue(`payments.hasChanged`, true);\n }\n },\n [payments, setValue]\n );\n const onEditPayment = useCallback(\n (payment: PurchasePayment) => {\n setCurrentPayment(payment);\n\n editPaymentDialog.launchDialog();\n },\n [editPaymentDialog]\n );\n const onEditPaymentSave = useCallback(\n (payment: PurchasePayment) => {\n const existingPayment = payments?.value?.find(\n (p) => p.paymentId === payment.paymentId\n );\n if (existingPayment) {\n payment.paymentId = existingPayment.paymentId;\n Object.assign(existingPayment, payment);\n\n setValue('payments', posChangedField(payments!.value));\n }\n\n editPaymentDialog.closeDialog();\n },\n [payments, editPaymentDialog, setValue]\n );\n const onEditPaymentCancel = useCallback(() => {\n setCurrentPayment(undefined);\n editPaymentDialog.closeDialog();\n }, [editPaymentDialog]);\n\n const onRemovePayment = useCallback(\n ({ paymentId }: PurchasePayment) => {\n const newPayments = payments?.value?.filter(\n (p) => p.paymentId !== paymentId\n );\n if (newPayments && newPayments?.length !== payments?.value?.length) {\n setValue('payments', posChangedField(newPayments));\n }\n\n editPaymentDialog.closeDialog();\n },\n [payments?.value, editPaymentDialog, setValue]\n );\n\n const onAddNewCost = useCallback(() => {\n setCurrentCostModel({\n id: newBigIntId(),\n cost: null,\n costType: PurchaseOrderCostType.Tax,\n date: new Date().toISOString(),\n description: null,\n } as CostDetail);\n\n costDialog.launchDialog();\n }, [costDialog, setCurrentCostModel]);\n\n const onAddNewCostSave = useCallback(\n (cost: CostDetail) => {\n const existingCost = additionalCosts?.value?.find(\n (p) => p.id === cost.id\n );\n if (existingCost) {\n existingCost.cost = cost.cost;\n existingCost.costType = cost.costType;\n existingCost.date = cost.date;\n existingCost.description = cost.description;\n\n setValue('additionalCosts', posChangedField(additionalCosts!.value));\n } else {\n setValue(\n 'additionalCosts',\n posChangedField([...(additionalCosts?.value ?? []), cost])\n );\n }\n costDialog.closeDialog();\n },\n [additionalCosts, costDialog, setValue]\n );\n\n const onAddNewCostCancel = useCallback(() => {\n setCurrentCostModel(undefined);\n costDialog.closeDialog();\n }, [costDialog]);\n\n const onAddNewPayment = useCallback(() => {\n addPaymentDialog.launchDialog();\n }, [addPaymentDialog]);\n\n const onAddNewPaymentSave = useCallback(\n (payments: PurchasePayment[]) => {\n const existingPayments = getValues('payments');\n if (existingPayments == null) {\n setValue('payments', posChangedField(payments));\n } else {\n setValue(\n 'payments',\n posChangedField([...existingPayments!.value!, ...payments])\n );\n }\n addPaymentDialog.closeDialog();\n },\n [setValue, getValues, addPaymentDialog]\n );\n\n const onAddNewPaymentCancel = useCallback(() => {\n addPaymentDialog.closeDialog();\n }, [addPaymentDialog]);\n\n const onEditCost = useCallback(\n (cost: CostDetail) => {\n setCurrentCostModel(cost);\n\n costDialog.launchDialog();\n },\n [costDialog]\n );\n\n const onRemoveCost = useCallback(\n (costId: number) => {\n const newCosts = additionalCosts?.value?.filter((p) => p.id !== costId);\n if (newCosts && newCosts?.length !== additionalCosts?.value?.length) {\n setValue('additionalCosts', posChangedField(newCosts));\n }\n },\n [additionalCosts, setValue]\n );\n\n const onInternalNotesChanged = useCallback(\n (notes?: string | null) => {\n return setValue('privateNotes', posChangedField(notes ?? null));\n },\n [setValue]\n );\n\n const onConvertCurrency = useCallback(\n (payment: PurchasePayment) => {\n setCurrentPayment(payment);\n convertCurrencyDialog.launchDialog();\n },\n [convertCurrencyDialog]\n );\n\n const onCancelConvertCurrency = useCallback(() => {\n convertCurrencyDialog.closeDialog();\n setCurrentPayment(undefined);\n }, [convertCurrencyDialog]);\n\n const onSaveConvertCurrency = useCallback(\n (formValues: ConvertCurrencyForm) => {\n if (currentPayment && payments) {\n const updatedPayment = Object.assign({}, currentPayment, formValues);\n const filteredPayments = (payments.value ?? []).map((payment) =>\n payment.paymentId === currentPayment.paymentId\n ? updatedPayment\n : payment\n );\n setValue('payments', posChangedField(filteredPayments));\n }\n convertCurrencyDialog.closeDialog();\n },\n [convertCurrencyDialog, currentPayment, payments, setValue]\n );\n\n return (\n <>\n
    \n \n \n \n {purchase?.pmtStat && (\n \n \n \n )}\n \n\n \n {!disabled && onTicketGroupAction && (\n \n \n onTicketGroupAction({\n ticketGroupId: -1,\n action: TicketGroupEditReason.AddTickets,\n })\n }\n >\n \n \n \n \n )}\n
    \n {secondaryVendor && secondaryVendorAccount && (\n \n )}\n
    \n \n \n \n \n \n \n
    \n \n
    \n \n \n \n \n \n \n {allowPaymentEdits && (\n \n \n \n )}\n
    \n
    \n \n \n \n \n
    \n
    \n \n \n \n\n {\n setValue('tags', { value: tags, hasChanged: true });\n }}\n disabled={disabled}\n entityType={ActionOutboxEntityType.Purchase}\n canCreateTagType={canCreateTagType}\n canEditTags={canEditTags}\n />\n
    \n\n {costDialog.dialogProps.isOpen && (\n \n )}\n\n {addPaymentDialog.dialogProps.isOpen && (\n \n )}\n {editPaymentDialog.dialogProps.isOpen && currentPayment && (\n \n )}\n\n {canConvertPaymentLines &&\n convertCurrencyDialog.dialogProps.isOpen &&\n currentPayment && (\n \n )}\n \n );\n}\n","import { ComponentProps, ReactElement } from 'react';\nimport { Controller, useForm } from 'react-hook-form';\nimport { CancelButton } from 'src/components/Buttons';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosSelect } from 'src/core/POS/PosSelect';\nimport { getTextFieldState, PosTextField } from 'src/core/POS/PosTextField';\nimport { Button } from 'src/core/ui';\nimport {\n FieldError,\n FieldLabel,\n FieldWrapper,\n} from 'src/modals/common/Purchase';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { PAYMENT_METHOD_TYPE_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { PurchasePaymentMethod } from 'src/WebApiController';\n\nexport type AddPurchasePaymentMethodDialogProps = Omit<\n ComponentProps,\n 'header' | 'footer'\n> & {\n onSave?: (data: PurchasePaymentMethod) => void | Promise;\n onCancel?: () => void;\n};\n\nexport function AddPurchasePaymentMethodDialog({\n onSave,\n onCancel,\n ...genericDialogProps\n}: AddPurchasePaymentMethodDialogProps): ReactElement | null {\n const requiredText = useContent(ContentId.Required);\n\n const {\n control,\n register,\n reset,\n handleSubmit,\n formState: { isSubmitting, errors },\n } = useForm({\n defaultValues: {\n id: -1,\n },\n });\n\n return (\n }\n footer={\n <>\n \n \n \n \n \n }\n onClosed={() => {\n reset();\n }}\n {...genericDialogProps}\n onCancel={onCancel}\n >\n \n \n \n \n (\n \n )}\n />\n {errors.type && {errors.type?.message}}\n \n \n }\n >\n \n \n \n \n }\n >\n \n \n \n \n );\n}\n","import { useCallback, useMemo, useState } from 'react';\nimport { usePurchasePaymentMethodSelector } from 'src/components/Selectors/PurchasePaymentMethodSelector';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { PosSelect, PosSelectProps } from 'src/core/POS/PosSelect';\nimport { AddPurchasePaymentMethodDialog } from 'src/dialogs/AddPurchasePaymentMethodDialog';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { PurchaseClient, PurchasePaymentMethod } from 'src/WebApiController';\n\nexport type PurchasePaymentMethodSelectionInputProps = Omit<\n PosSelectProps,\n 'valueOptionsContent'\n> & {\n hideAdditionalOptions?: boolean;\n};\n\nexport function PurchasePaymentMethodSelectionInput({\n disabled,\n onChange,\n hideAdditionalOptions,\n ...posSelectProps\n}: PurchasePaymentMethodSelectionInputProps) {\n const addNewPaymentMethodContent = useContent(\n ContentId.AddPaymentMethodAction\n );\n const { activeAccountWebClientConfig } = useAppContext();\n const additionalOptions = useMemo(\n () => ({\n [ContentId.AddPaymentMethodAction]: addNewPaymentMethodContent + '...',\n }),\n [addNewPaymentMethodContent]\n );\n\n const { query, posSelectProps: hookPosSelectProps } =\n usePurchasePaymentMethodSelector({\n disabled,\n additionalOptions: hideAdditionalOptions ? undefined : additionalOptions,\n });\n\n const { showErrorDialog } = useErrorBoundaryContext();\n const insertPurchasePaymentMethod = useCallback(\n (paymentMethod: PurchasePaymentMethod) =>\n tryInvokeApi(\n () =>\n new PurchaseClient(\n activeAccountWebClientConfig\n ).insertPurchasePaymentMethod(paymentMethod),\n (error) => {\n showErrorDialog('PurchaseClient.insertPurchasePaymentMethod', error, {\n trackErrorData: paymentMethod,\n });\n }\n ),\n [activeAccountWebClientConfig, showErrorDialog]\n );\n\n const [isDialogOpen, setIsDialogOpen] = useState(false);\n return (\n <>\n {\n if (option && option in additionalOptions) {\n setIsDialogOpen(true);\n return;\n }\n\n onChange(option);\n }}\n />\n {\n const newId = await insertPurchasePaymentMethod(paymentMethod);\n await query.refetch();\n if (newId !== undefined) {\n onChange(String(newId));\n }\n setIsDialogOpen(false);\n }}\n onCancel={() => {\n setIsDialogOpen(false);\n }}\n />\n \n );\n}\n","import { ComponentProps, useCallback, useState } from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { CancelButton } from 'src/components/Buttons';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content, FormatContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { vars } from 'src/core/themes';\nimport { Radio, RadioGroup, Stack } from 'src/core/ui';\nimport { Button } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { PurchaseClient } from 'src/WebApiController';\nimport styled from 'styled-components/macro';\n\nconst RadioLabelDescription = styled.div`\n font-size: ${() => vars.typography.fontSize['sm']};\n`;\n\nexport type PurchaseCancellationType = 'cancel' | 'void';\n\nexport type CancelPurchaseDialogProps = ComponentProps & {\n purchaseOrderId: number;\n numOfSales: number;\n onSave: () => void;\n onCancel: () => void;\n};\n\nexport function CancelPurchaseDialog({\n purchaseOrderId,\n numOfSales,\n onSave,\n onCancel,\n ...dialogProps\n}: CancelPurchaseDialogProps) {\n const [cancellationType, setCancellationType] =\n useState('cancel');\n const [isSecondScreen, setIsSecondScreen] = useState(false);\n const [isSubmitting, setIsSubmitting] = useState(false);\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const onInternalSubmit = useCallback(async () => {\n await tryInvokeApi(\n async () => {\n setIsSubmitting(true);\n\n const results =\n cancellationType === 'cancel'\n ? await new PurchaseClient(\n activeAccountWebClientConfig\n ).cancelPurchaseOrder(purchaseOrderId, null, null)\n : await new PurchaseClient(\n activeAccountWebClientConfig\n ).voidPurchaseOrder(purchaseOrderId);\n\n if (results) {\n onSave();\n setIsSecondScreen(false);\n }\n },\n (error) => {\n showErrorDialog(\n cancellationType === 'cancel'\n ? 'PurchaseClient().cancelPurchaseOrder'\n : 'PurchaseClient().voidPurchaseOrder',\n error,\n {\n trackErrorData: { purchaseOrderId },\n }\n );\n },\n () => setIsSubmitting(false)\n );\n }, [\n activeAccountWebClientConfig,\n cancellationType,\n onSave,\n purchaseOrderId,\n showErrorDialog,\n ]);\n\n const cancelPurchase = () => {\n setIsSecondScreen(false);\n onCancel();\n };\n\n if (isSecondScreen) {\n return (\n }\n footer={\n <>\n \n onInternalSubmit()}\n >\n \n \n \n }\n {...dialogProps}\n onCancel={cancelPurchase}\n >\n {isSubmitting ? (\n \n ) : numOfSales === 1 ? (\n \n ) : (\n \n )}\n \n );\n }\n\n return (\n }\n footer={\n <>\n {onCancel && (\n \n )}\n {\n if (numOfSales > 0) {\n setIsSecondScreen(true);\n } else {\n onInternalSubmit();\n }\n }}\n >\n \n \n \n }\n {...dialogProps}\n onCancel={onCancel}\n >\n {isSubmitting ? (\n \n ) : (\n {\n if (value === 'cancel' || value === 'void') {\n setCancellationType(value);\n }\n }}\n value={cancellationType}\n />\n )}\n \n );\n}\n\nexport const CancelPurchaseDialogModeRadioGroup = ({\n onValueChange,\n value,\n disabled,\n}: {\n onValueChange?: ((value: string) => void) | undefined;\n value: PurchaseCancellationType;\n disabled?: boolean;\n}) => {\n return (\n \n \n \n \n \n \n \n \n }\n />\n \n \n \n \n \n \n }\n />\n \n \n );\n};\n","import { ComponentProps, useCallback, useState } from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { CancelButton } from 'src/components/Buttons';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { Button } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { PurchaseClient } from 'src/WebApiController';\n\nexport type RestorePurchaseDialogProps = ComponentProps & {\n purchaseOrderId: number;\n onSave: () => void;\n onCancel: () => void;\n};\n\nexport function RestorePurchaseDialog({\n purchaseOrderId,\n onSave,\n onCancel,\n ...dialogProps\n}: RestorePurchaseDialogProps) {\n const [isSubmitting, setIsSubmitting] = useState(false);\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const onInternalSubmit = useCallback(async () => {\n await tryInvokeApi(\n async () => {\n setIsSubmitting(true);\n\n const results = await new PurchaseClient(\n activeAccountWebClientConfig\n ).restorePurchaseOrder(purchaseOrderId);\n\n if (results) {\n onSave();\n }\n },\n (error) => {\n showErrorDialog('PurchaseClient.restorePurchaseOrder', error, {\n trackErrorData: { purchaseOrderId },\n });\n },\n () => setIsSubmitting(false)\n );\n }, [activeAccountWebClientConfig, onSave, purchaseOrderId, showErrorDialog]);\n\n return (\n }\n footer={\n <>\n \n onInternalSubmit()}\n >\n \n \n \n }\n {...dialogProps}\n onCancel={onCancel}\n >\n {isSubmitting ? (\n \n ) : (\n \n )}\n \n );\n}\n","import { useQuery } from '@tanstack/react-query';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { SellerAccountClient } from 'src/WebApiController';\n\nexport function useSyncCenterSettings() {\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const query = useQuery({\n queryKey: [\n 'getSyncCenterSettings',\n activeAccountWebClientConfig.activeAccountId,\n ],\n queryFn: () => {\n if (activeAccountWebClientConfig.activeAccountId == null) {\n return null;\n }\n return new SellerAccountClient(\n activeAccountWebClientConfig\n ).getSyncCenterSettings();\n },\n\n enabled: activeAccountWebClientConfig.activeAccountId != null,\n refetchOnWindowFocus: false,\n staleTime: Infinity,\n meta: {\n persist: false,\n\n onError: (error: ErrorTypes) => {\n showErrorDialog('SellerAccountClient.getSyncCenterSettings', error);\n },\n },\n });\n\n return query;\n}\n","import { useQuery } from '@tanstack/react-query';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { PurchaseClient } from 'src/WebApiController';\n\nexport const useGetIsPurchaseIdsInUsedForVendorId = (\n orderId: string | null | undefined,\n vendorId: number | null | undefined\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n\n const query = useQuery({\n queryKey: ['PurchaseClient.getIsPurchasingIdsInUse', orderId, vendorId],\n queryFn: async () => {\n if (activeAccountWebClientConfig == null || !orderId) {\n return null;\n }\n\n return await new PurchaseClient(\n activeAccountWebClientConfig\n ).getIsPurchasingIdsInUse(orderId, vendorId);\n },\n\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError('PurchaseClient.getIsPurchasingIdsInUse', error, {\n trackErrorData: {\n orderId,\n vendorId,\n },\n });\n },\n },\n });\n\n return {\n purchasingIdInUseQuery: query,\n };\n};\n","import * as Tabs from '@radix-ui/react-tabs';\nimport clsx from 'clsx';\nimport { ComponentPropsWithoutRef, forwardRef } from 'react';\nimport { mergeProps } from 'src/core/utils';\n\nimport { ScrollableToolbar } from '../ScrollableToolbar';\nimport * as styles from './Tabs.css';\n\nexport const Root = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef\n>(function Root({ ...props }, ref) {\n return (\n \n );\n});\n\nexport const Trigger = forwardRef<\n HTMLButtonElement,\n ComponentPropsWithoutRef & {\n hasErrors?: boolean;\n orientation?: 'horizontal' | 'vertical';\n }\n>(function Trigger({ hasErrors, orientation, ...props }, ref) {\n return (\n \n );\n});\n\nexport const List = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef & {\n orientation?: 'horizontal' | 'vertical';\n rootClassName?: string;\n }\n>(function List({ orientation, rootClassName, ...props }, ref) {\n return (\n \n \n \n );\n});\n\nexport const Content = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef & {\n orientation?: 'horizontal' | 'vertical';\n }\n>(function Content({ orientation, ...props }, ref) {\n return (\n \n );\n});\n","import { useEffect, useRef } from 'react';\nimport * as Tabs from 'src/core/ui/Tabs';\n\nimport * as styles from './TabPanel.css';\nimport type { TabPanelProps } from './TabPanel.types';\n\n/**\n * Component that renders tabs in a bar that allows users to swap between content\n */\nexport const TabPanel = ({\n tabs,\n activeTabIndex,\n onValueChange,\n orientation = 'horizontal',\n tabListProps,\n tabContentProps,\n ...props\n}: TabPanelProps) => {\n const activeTab = tabs[activeTabIndex];\n\n const ref = useRef(null);\n\n useEffect(() => {\n ref.current?.focus();\n }, [activeTab]);\n\n return (\n \n \n {tabs.map((tab) => (\n \n {tab.title}\n \n ))}\n \n {tabs.map((tab) => (\n \n {tab.content}\n \n ))}\n \n );\n};\n","import type { OnTabPanelKeyDown } from './TabPanel.types';\n\nexport const onTabPanelKeyDown: OnTabPanelKeyDown = (\n e,\n setActiveTab,\n optionsLength\n) => {\n const isLeftKey = e.key === 'ArrowLeft';\n const isRightKey = e.key === 'ArrowRight';\n if (!isLeftKey && !isRightKey) return;\n\n e.preventDefault();\n\n setActiveTab((current) => {\n if (isLeftKey) {\n const nextIndex = current - 1;\n return nextIndex < 0 ? optionsLength - 1 : nextIndex;\n }\n const nextIndex = current + 1;\n return nextIndex > optionsLength - 1 ? 0 : nextIndex;\n });\n};\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport const HeaderContent = styled.div`\n display: flex;\n flex-direction: row;\n align-items: center;\n width: 100%;\n padding: ${() =>\n `${vars.spacing.lg} ${vars.spacing['4xl']} ${vars.spacing.m} 0`};\n`;\n\nexport const EntityInfoDiv = styled.div`\n display: flex;\n flex-direction: column;\n gap: 2px;\n align-items: flex-end;\n ${(props) => props.theme.typography.getStyles('body2')}\n ${({ theme: { media, spacing, typography } }) =>\n `${media.makeMediaQuery(\n media.breakpoints.md,\n `\n gap: ${vars.spacing.sm};\n ${typography.getStyles('body1')}\n }`\n )}`}\n`;\n\nexport const EntityIdNumberDiv = styled.div`\n ${(props) => props.theme.typography.getStyles('subtitle1')}\n color: ${(props) => props.theme.colors.textSecondary};\n`;\nexport const EntityTextDiv = styled.div`\n color: ${(props) => props.theme.colors.textPrimary};\n ${(props) => props.theme.typography.getStyles('body2')}\n`;\n","import * as styles from './EventEntityHeader.css';\nimport { HeaderContent } from './EventEntityHeader.styled';\n\nexport const EventEntityHeader = ({ title }: { title: React.ReactNode }) => {\n return (\n
    \n \n

    {title}

    \n
    \n
    \n );\n};\n","import { EventEntityHeader } from './EventEntityHeader';\n\nexport const ConnectedEventEntityHeader = ({\n title,\n}: {\n title: React.ReactNode;\n}) => {\n return title ? : null;\n};\n","import { useContext } from 'react';\nimport {\n IPosEntity,\n useActivePosEntityContext,\n} from 'src/contexts/ActivePosEntityContext';\nimport { Content, FormatContent } from 'src/contexts/ContentContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { EventEntityHeader } from 'src/modals/common/EventEntityHeader';\nimport { ModalHeader } from 'src/modals/Modal';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { SomethingWentWrong } from 'src/views';\nimport styled from 'styled-components/macro';\n\nimport { PosSpinner } from '../core/POS/PosSpinner';\n\nexport const useEventItemLoadingDisplay = (\n loadingContentId: FormatContentId,\n searchingContentId: FormatContentId,\n errorContentId: FormatContentId,\n activeId?: string\n) => {\n const { posEntityId, posEntityDisplayId, isLoading, posEntity, errorInfo } =\n useActivePosEntityContext();\n\n const { closeModal } = useContext(ModalContext);\n\n if (isLoading) {\n return {\n isLoading,\n posEntity,\n loadingState: (\n <>\n \n } />\n \n \n \n \n \n \n ),\n };\n }\n // unknown error\n if (errorInfo) {\n return {\n isLoading,\n posEntity,\n loadingState: (\n <>\n {null}\n \n \n \n \n ),\n };\n }\n\n if (posEntity == null) {\n return {\n isLoading,\n posEntity,\n loadingState: (\n <>\n {null}\n \n \n \n \n ),\n };\n }\n\n return { isLoading, posEntity, loadingState: null };\n};\n\nconst SpinnerWrapper = styled.div`\n display: flex;\n flex-direction: column;\n height: 100%;\n justify-content: center;\n align-items: center;\n color: ${(props) => props.theme.colors.textPrimary};\n\n min-height: 300px;\n`;\n\nconst NotFoundWrapper = styled(SpinnerWrapper)`\n font-weight: bold;\n color: ${({ theme }) => theme.colors.textStrong};\n`;\n","import {\n PropsWithChildren,\n useCallback,\n useContext,\n useEffect,\n useState,\n} from 'react';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { UnsavedChanges } from 'src/dialogs/UnsavedChanges';\nimport { ModalHeader, ModalProps } from 'src/modals/Modal';\n\nexport type CancellableFormHeaderProps = PropsWithChildren<{\n onClose?: () => void;\n onBeforeClose?: () => void;\n cancelTo?: ModalProps;\n showDialogOnCancel?: boolean;\n disabled?: boolean;\n}>;\n\nexport function CancellableFormHeader({\n onClose,\n onBeforeClose,\n cancelTo,\n children, // action button\n showDialogOnCancel,\n disabled,\n}: PropsWithChildren) {\n const [showDialog, setShowDialog] = useState(false);\n const { setModal, closeModal, updateModal } = useContext(ModalContext);\n\n /**\n * Allow a modal 'config' (`Modal` component props) to determine\n * Which modal to go back to in the workflow\n * If nothing is provided, treat as a close button\n */\n const goToCancelView = useCallback(() => {\n setShowDialog(false);\n\n onBeforeClose?.();\n\n if (cancelTo) {\n setModal(cancelTo);\n } else if (onClose) {\n onClose();\n } else {\n closeModal(true);\n }\n }, [onBeforeClose, onClose, cancelTo, setModal, closeModal]);\n\n const onCancel = useCallback(() => {\n if (showDialogOnCancel) {\n setShowDialog(true);\n } else {\n goToCancelView();\n }\n }, [showDialogOnCancel, goToCancelView]);\n\n const closeDialog = useCallback(() => {\n setShowDialog(false);\n }, [setShowDialog]);\n\n useEffect(() => {\n updateModal({ onCloseOverride: onCancel });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [showDialogOnCancel]);\n\n return (\n \n {children}\n \n \n );\n}\n","import { ContentId } from 'src/utils/constants/contentId';\nimport {\n ActionType,\n ActivityLogQuery,\n AuditActionType,\n} from 'src/WebApiController';\n\nexport const EMPTY_ACTIVITY_LOG_QUERY: ActivityLogQuery = {\n userId: null,\n includeUserOnly: null,\n impersonatedUserId: null,\n entityId: null,\n entityType: null,\n actionTypes: null,\n auditActionTypes: null,\n take: null,\n skip: null,\n tagName: null,\n};\n\nexport const TAB_ALL = 'all';\n\n/*\n * Listing Entity Activity Log Constants\n */\n\nexport const enum ListingActivityLogTab {\n All = TAB_ALL,\n Price = 'price',\n Broadcast = 'broadcast',\n Delivery = 'delivery',\n DeliveryDocuments = 'deliveryDocuments',\n PrivateNotes = 'privateNotes',\n Tickets = 'tickets',\n Event = 'event',\n Allocation = 'allocation',\n}\n\nexport const TAG_AUDIT_ACTION_TYPES: AuditActionType[] = [\n AuditActionType.TagCreate,\n AuditActionType.TagDelete,\n AuditActionType.TagUpdate,\n AuditActionType.TagTypeCreate,\n AuditActionType.TagTypeUpdate,\n];\n\nexport const LISTING_ACTIVITY_LOG_TAB_TO_ACTION_TYPES: Record<\n ListingActivityLogTab,\n ActionType[] | null\n> = {\n [ListingActivityLogTab.All]: null,\n [ListingActivityLogTab.Price]: [\n ActionType.ListingUpdateUnitNetProceeds,\n ActionType.ListingUpdateAllInPrice,\n ActionType.ListingBroadcastUpdateAllInPrice,\n ActionType.ListingBroadcastUpdateUnitNetProceeds,\n ],\n [ListingActivityLogTab.Broadcast]: [\n ActionType.ListingBroadcast,\n ActionType.ListingUnbroadcast,\n ActionType.ListingMarketplaceInsert,\n ActionType.ListingMarketplaceUpdate,\n ActionType.ListingMarketplaceDelete,\n ActionType.BroadcastMarketplaceListing,\n ActionType.UnbroadcastMarketplaceListing,\n ],\n [ListingActivityLogTab.Delivery]: [\n ActionType.ListingUpdateDeliveryType,\n ActionType.ListingUpdateInHandDate,\n ActionType.ListingBroadcastUpdateInHandDate,\n ActionType.ListingBroadcastUpdateDeliveryType,\n ],\n [ListingActivityLogTab.DeliveryDocuments]: [\n ActionType.ListingPreDeliverBarcodes,\n ActionType.ListingPreDeliverETickets,\n ActionType.ListingPreDeliverTicketExternalIds,\n ActionType.ListingPreDeliverTicketUrls,\n ActionType.ListingRemoveTicketBarcodes,\n ActionType.ListingRemoveTicketUserDocuments,\n ActionType.ListingUploadVerificationDocumentAction,\n ActionType.ListingDocumentUploadActivity,\n ActionType.ListingDocumentViewed,\n ActionType.ListingDocumentDownloaded,\n ],\n [ListingActivityLogTab.PrivateNotes]: [\n ActionType.ListingUpdateListingNotes,\n ActionType.ListingBroadcastUpdateListingNotes,\n ],\n [ListingActivityLogTab.Tickets]: [\n ActionType.ListingUpdateSplitType,\n ActionType.ListingUpdateHideSeats,\n ActionType.ListingBroadcastUpdateSplitType,\n ActionType.ListingUpdateQuantity,\n ActionType.ListingBroadcastUpdateQuantity,\n ActionType.ListingUpdateSeating,\n ActionType.ListingBroadcastUpdateSeating,\n ActionType.ListingMarketplaceSeatingOverrideUpdate,\n ],\n [ListingActivityLogTab.Event]: [],\n [ListingActivityLogTab.Allocation]: [\n ActionType.ListingSaleMarketplaceInsert,\n ActionType.ListingSaleConfirm,\n ActionType.ListingSaleDeallocate,\n ],\n};\n\nexport const LISTING_ACTIVITY_LOG_TAB_TO_AUDIT_ACTION_TYPES: Record<\n ListingActivityLogTab,\n AuditActionType[] | null\n> = {\n [ListingActivityLogTab.All]: null,\n [ListingActivityLogTab.Price]: [],\n [ListingActivityLogTab.Broadcast]: [],\n [ListingActivityLogTab.Delivery]: [],\n [ListingActivityLogTab.DeliveryDocuments]: [],\n [ListingActivityLogTab.PrivateNotes]: [],\n [ListingActivityLogTab.Tickets]: [],\n [ListingActivityLogTab.Event]: [AuditActionType.ListingSellerEventUpdate],\n [ListingActivityLogTab.Allocation]: [],\n};\n\nexport const LISTING_ACTIVITY_LOG_TAB_TO_CID: Record<\n ListingActivityLogTab,\n ContentId\n> = {\n [ListingActivityLogTab.All]: ContentId.All,\n [ListingActivityLogTab.Price]: ContentId.Price,\n [ListingActivityLogTab.Broadcast]: ContentId.Broadcast,\n [ListingActivityLogTab.Delivery]: ContentId.Delivery,\n [ListingActivityLogTab.DeliveryDocuments]: ContentId.DeliveryDocuments,\n [ListingActivityLogTab.PrivateNotes]: ContentId.Notes,\n [ListingActivityLogTab.Tickets]: ContentId.Tickets,\n [ListingActivityLogTab.Event]: ContentId.Event,\n [ListingActivityLogTab.Allocation]: ContentId.Allocation,\n};\n\n/*\n * Sale Entity Activity Log Constants\n */\n\nexport const enum SaleActivityLogTab {\n All = TAB_ALL,\n Delivery = 'delivery',\n Cost = 'cost',\n PrivateNotes = 'privateNotes',\n Commission = 'commission',\n Allocation = 'allocation',\n}\n\nexport const SALE_ACTIVITY_LOG_TAB_TO_ACTION_TYPES: Record<\n SaleActivityLogTab,\n ActionType[] | null\n> = {\n [SaleActivityLogTab.All]: null,\n [SaleActivityLogTab.Delivery]: [\n ActionType.SaleUploadBarcodes,\n ActionType.SaleUploadTicketUrls,\n ActionType.SaleUploadEtickets,\n ActionType.SaleUploadProofOfTransfer,\n ActionType.SaleDocumentUploadActivity,\n ActionType.SaleUploadTransferProofId,\n ActionType.SaleBroadcastUploadBarcodes,\n ActionType.SaleBroadcastUploadETickets,\n ActionType.SaleBroadcastUploadTransferUrls,\n ActionType.SaleBroadcastUploadTransferProof,\n ActionType.SaleBroadcastUploadTransferProofId,\n ],\n [SaleActivityLogTab.Cost]: [\n ActionType.SaleCostUpdate,\n ActionType.SaleCostInsert,\n ActionType.SaleCostDelete,\n ],\n [SaleActivityLogTab.PrivateNotes]: [],\n [SaleActivityLogTab.Commission]: [ActionType.SaleCommissionsUpdate],\n [SaleActivityLogTab.Allocation]: [\n ActionType.SaleMarketplaceInsert,\n ActionType.SaleConfirm,\n ActionType.SaleDeallocate,\n ],\n};\n\nexport const SALE_ACTIVITY_LOG_TAB_TO_AUDIT_ACTION_TYPES: Record<\n SaleActivityLogTab,\n AuditActionType[] | null\n> = {\n [SaleActivityLogTab.All]: null,\n [SaleActivityLogTab.Delivery]: [],\n [SaleActivityLogTab.Cost]: [],\n [SaleActivityLogTab.PrivateNotes]: [\n AuditActionType.SaleInternalNotesInsert,\n AuditActionType.SaleInternalNotesUpdate,\n ],\n [SaleActivityLogTab.Commission]: [],\n [SaleActivityLogTab.Allocation]: [],\n};\n\nexport const SALE_ACTIVITY_LOG_TAB_TO_CID: Record<\n SaleActivityLogTab,\n ContentId\n> = {\n [SaleActivityLogTab.All]: ContentId.All,\n [SaleActivityLogTab.Delivery]: ContentId.Delivery,\n [SaleActivityLogTab.Cost]: ContentId.Cost,\n [SaleActivityLogTab.PrivateNotes]: ContentId.PrivateNote,\n [SaleActivityLogTab.Commission]: ContentId.Commission,\n [SaleActivityLogTab.Allocation]: ContentId.Allocation,\n};\n\n/*\n * Purchase order entity activity log constants\n */\nexport const enum PurchaseOrderActivityLogTab {\n All = TAB_ALL,\n Cost = 'cost',\n Payment = 'payment',\n TicketGroups = 'ticket group',\n PurchaseDetails = 'purchase detail',\n Commission = 'commission',\n PrivateNotes = 'privateNotes',\n}\n\nexport const PURCHASE_ORDER_ACTIVITY_LOG_TAB_TO_ACTION_TYPES: Record<\n PurchaseOrderActivityLogTab,\n ActionType[] | null\n> = {\n [PurchaseOrderActivityLogTab.All]: null,\n [PurchaseOrderActivityLogTab.Cost]: [\n ActionType.PurchaseCostDelete,\n ActionType.PurchaseCostInsert,\n ActionType.PurchaseCostUpdate,\n ActionType.PurchaseCostsMerge,\n ],\n [PurchaseOrderActivityLogTab.Payment]: [\n ActionType.PurchasePaymentDelete,\n ActionType.PurchasePaymentInsert,\n ActionType.PurchasePaymentUpdate,\n ActionType.PurchasePaymentsMerge,\n ],\n [PurchaseOrderActivityLogTab.TicketGroups]: [\n ActionType.PurchaseTicketGroupDelete,\n ActionType.PurchaseTicketGroupInsert,\n ActionType.PurchaseTicketGroupUpdate,\n ActionType.PurchaseTicketGroupsMerge,\n ],\n [PurchaseOrderActivityLogTab.PurchaseDetails]: [\n ActionType.PurchaseUpdate,\n ActionType.PurchaseInsert,\n ActionType.PurchaseCancel,\n ],\n [PurchaseOrderActivityLogTab.Commission]: [],\n [PurchaseOrderActivityLogTab.PrivateNotes]: [],\n};\n\nexport const PURCHASE_ORDER_ACTIVITY_LOG_TAB_TO_AUDIT_ACTION_TYPES: Record<\n PurchaseOrderActivityLogTab,\n AuditActionType[] | null\n> = {\n [PurchaseOrderActivityLogTab.All]: null,\n [PurchaseOrderActivityLogTab.Cost]: [],\n [PurchaseOrderActivityLogTab.Payment]: [],\n [PurchaseOrderActivityLogTab.TicketGroups]: [],\n [PurchaseOrderActivityLogTab.PurchaseDetails]: [],\n [PurchaseOrderActivityLogTab.Commission]: [\n AuditActionType.PurchaseCommissionInsert,\n AuditActionType.PurchaseCommissionUpdate,\n ],\n [PurchaseOrderActivityLogTab.PrivateNotes]: [\n AuditActionType.PurchaseInternalNotesInsert,\n AuditActionType.PurchaseInternalNotesUpdate,\n ],\n};\n\nexport const PURCHASE_ORDER_ACTIVITY_LOG_TO_CID: Record<\n PurchaseOrderActivityLogTab,\n ContentId\n> = {\n [PurchaseOrderActivityLogTab.All]: ContentId.All,\n [PurchaseOrderActivityLogTab.Cost]: ContentId.Cost,\n [PurchaseOrderActivityLogTab.Payment]: ContentId.Payment,\n [PurchaseOrderActivityLogTab.TicketGroups]: ContentId.TicketGroups,\n [PurchaseOrderActivityLogTab.PurchaseDetails]: ContentId.PurchaseDetails,\n [PurchaseOrderActivityLogTab.Commission]: ContentId.Commission,\n [PurchaseOrderActivityLogTab.PrivateNotes]: ContentId.PrivateNote,\n};\n","import { ContentId } from 'src/utils/constants/contentId';\nimport {\n ActionOutboxEntityType,\n ActionType,\n ActivityLogQuery,\n AuditActionType,\n} from 'src/WebApiController';\n\nimport {\n EMPTY_ACTIVITY_LOG_QUERY,\n LISTING_ACTIVITY_LOG_TAB_TO_ACTION_TYPES,\n LISTING_ACTIVITY_LOG_TAB_TO_AUDIT_ACTION_TYPES,\n LISTING_ACTIVITY_LOG_TAB_TO_CID,\n ListingActivityLogTab,\n PURCHASE_ORDER_ACTIVITY_LOG_TAB_TO_ACTION_TYPES,\n PURCHASE_ORDER_ACTIVITY_LOG_TAB_TO_AUDIT_ACTION_TYPES,\n PURCHASE_ORDER_ACTIVITY_LOG_TO_CID,\n PurchaseOrderActivityLogTab,\n SALE_ACTIVITY_LOG_TAB_TO_ACTION_TYPES,\n SALE_ACTIVITY_LOG_TAB_TO_AUDIT_ACTION_TYPES,\n SALE_ACTIVITY_LOG_TAB_TO_CID,\n SaleActivityLogTab,\n TAG_AUDIT_ACTION_TYPES,\n} from './ActivityLogModal.constants';\n\nexport const getActivityLogFilterByTab = (\n entityType: ActionOutboxEntityType | null,\n tab: string,\n isTagTab = false\n): ActivityLogQuery => {\n let actionTypes: ActionType[] | null = null;\n let auditActionTypes: AuditActionType[] | null = null;\n let tagName: string | null = null;\n if (isTagTab) {\n tagName = tab;\n actionTypes = [];\n auditActionTypes = TAG_AUDIT_ACTION_TYPES;\n } else {\n if (entityType === ActionOutboxEntityType.Listing) {\n actionTypes =\n LISTING_ACTIVITY_LOG_TAB_TO_ACTION_TYPES[tab as ListingActivityLogTab];\n auditActionTypes =\n LISTING_ACTIVITY_LOG_TAB_TO_AUDIT_ACTION_TYPES[\n tab as ListingActivityLogTab\n ];\n } else if (entityType === ActionOutboxEntityType.Sale) {\n actionTypes =\n SALE_ACTIVITY_LOG_TAB_TO_ACTION_TYPES[tab as SaleActivityLogTab];\n auditActionTypes =\n SALE_ACTIVITY_LOG_TAB_TO_AUDIT_ACTION_TYPES[tab as SaleActivityLogTab];\n } else if (entityType === ActionOutboxEntityType.Purchase) {\n actionTypes =\n PURCHASE_ORDER_ACTIVITY_LOG_TAB_TO_ACTION_TYPES[\n tab as PurchaseOrderActivityLogTab\n ];\n auditActionTypes =\n PURCHASE_ORDER_ACTIVITY_LOG_TAB_TO_AUDIT_ACTION_TYPES[\n tab as PurchaseOrderActivityLogTab\n ];\n }\n }\n\n return {\n ...EMPTY_ACTIVITY_LOG_QUERY,\n actionTypes,\n auditActionTypes,\n entityType,\n tagName,\n };\n};\n\nexport const getActivityLogTabValues = (\n entityType: ActionOutboxEntityType | null\n): {\n value: string;\n contentId: ContentId;\n}[] => {\n if (!entityType) {\n return [];\n }\n\n if (entityType === ActionOutboxEntityType.Listing) {\n return Object.entries(LISTING_ACTIVITY_LOG_TAB_TO_CID).map(\n ([tabKey, cid]) => {\n return {\n value: tabKey,\n contentId: cid,\n };\n }\n );\n } else if (entityType === ActionOutboxEntityType.Sale) {\n return Object.entries(SALE_ACTIVITY_LOG_TAB_TO_CID).map(([tabKey, cid]) => {\n return {\n value: tabKey,\n contentId: cid,\n };\n });\n } else if (entityType === ActionOutboxEntityType.Purchase) {\n return Object.entries(PURCHASE_ORDER_ACTIVITY_LOG_TO_CID).map(\n ([tabKey, cid]) => {\n return {\n value: tabKey,\n contentId: cid,\n };\n }\n );\n }\n\n return [];\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { ActivityLogClient, ActivityLogQuery } from 'src/WebApiController';\n\nexport const useGetActivityLogByFilter = (\n activityLogFilterQuery: ActivityLogQuery,\n getAuditData: boolean,\n disabled: boolean\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const { trackError } = useErrorBoundaryContext();\n\n const shouldQuery =\n !disabled && activeAccountWebClientConfig.activeAccountId != null;\n const activityLogQuery = useQuery({\n queryKey: [\n 'ActivityLogClient.getActivityLogByFilter',\n activeAccountWebClientConfig.activeAccountId,\n activityLogFilterQuery,\n getAuditData,\n ],\n queryFn: async () => {\n if (!shouldQuery) {\n return null;\n }\n if (getAuditData) {\n return await new ActivityLogClient(\n activeAccountWebClientConfig\n ).getActivityLogWithAuditByFilter(activityLogFilterQuery);\n }\n\n return await new ActivityLogClient(\n activeAccountWebClientConfig\n ).getActivityLogByFilter(activityLogFilterQuery);\n },\n\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError('ActivityLogClient.getActivityLogByFilter', error, {\n itemId: activityLogFilterQuery.entityId,\n entityType: activityLogFilterQuery.entityType,\n activityLogFilterQuery,\n });\n },\n },\n enabled: shouldQuery,\n });\n\n return { activityLogQuery };\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { useCallback, useMemo, useState } from 'react';\nimport { ActivityLog } from 'src/components/ActivityLog';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { vars } from 'src/core/themes';\nimport { TabPanel } from 'src/core/ui/TabPanel';\nimport { TabItem } from 'src/core/ui/TabPanel/TabPanel.types';\nimport { useEventItemLoadingDisplay } from 'src/hooks/useEventItemLoadingDisplay';\nimport { BackToModalButton } from 'src/modals/common';\nimport { ConnectedEventEntityHeader } from 'src/modals/common/EventEntityHeader';\nimport { ModalBody, ModalFooter, ModalProps } from 'src/modals/Modal';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { ActivityLogClient } from 'src/WebApiController';\n\nimport { CancellableFormHeader } from '../common/CancellableFormHeader';\nimport { ModalBodyDataContainer } from '../Modal/Modal.styled';\nimport { ListingActivityLogTab, TAB_ALL } from './ActivityLogModal.constants';\nimport {\n getActivityLogFilterByTab,\n getActivityLogTabValues,\n} from './ActivityLogModal.utils';\nimport { useGetActivityLogByFilter } from './useGetActivityLogByFilter';\n\nexport const ActivityLogModal = ({ cancelTo }: { cancelTo?: ModalProps }) => {\n const { loadingState } = useEventItemLoadingDisplay(\n FormatContentId.LoadingSaleId,\n FormatContentId.SearchingForSaleId,\n FormatContentId.CouldNotFindSaleId\n );\n\n return loadingState ? (\n loadingState\n ) : (\n \n );\n};\n\nconst ActivityLogModalContent = ({ cancelTo }: { cancelTo?: ModalProps }) => {\n const { trackError } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n\n const details = useActivePosEntityContext();\n\n const [activeTab, setActiveTab] = useState(TAB_ALL);\n\n const shouldQuery =\n details.posEntity?.id != null &&\n details.posEntity?.entityType != null &&\n activeAccountWebClientConfig.activeAccountId != null;\n\n const activityLogTagNameQuery = useQuery({\n queryKey: [\n 'ActivityLogClient.GetActivityLogTagNamesByEntityId',\n activeAccountWebClientConfig.activeAccountId,\n details.posEntity?.id,\n details.posEntity?.entityType,\n ],\n queryFn: async () => {\n if (!shouldQuery) {\n return null;\n }\n return await new ActivityLogClient(\n activeAccountWebClientConfig\n ).getActivityLogTagNamesByEntityId(\n details.posEntity!.id!,\n details.posEntity!.entityType\n );\n },\n\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError(\n 'ActivityLogClient.getActivityLogTagNamesByEntityId',\n error,\n {\n itemId: details.posEntity?.id,\n entityType: details.posEntity?.entityType,\n }\n );\n },\n },\n enabled: shouldQuery,\n });\n\n const tagNames = useMemo(\n () =>\n activityLogTagNameQuery.data?.toSorted((a, b) => a.localeCompare(b)) ??\n [],\n [activityLogTagNameQuery.data]\n );\n\n const activityLogTopLevelFilter = useMemo(() => {\n return {\n ...getActivityLogFilterByTab(\n details.posEntity?.entityType ?? null,\n activeTab,\n tagNames.includes(activeTab)\n ),\n entityId: details.posEntity?.id ?? null,\n };\n }, [\n activeTab,\n details.posEntity?.entityType,\n details.posEntity?.id,\n tagNames,\n ]);\n\n const { activityLogQuery } = useGetActivityLogByFilter(\n activityLogTopLevelFilter,\n true,\n // disabled\n details.posEntity?.id == null\n );\n\n const activityLogDisplay = useMemo(\n () => (\n <>\n {activityLogQuery.isLoading ? (\n \n ) : (\n \n )}\n \n ),\n [activityLogQuery.data, activityLogQuery.error, activityLogQuery.isLoading]\n );\n\n const tabs: TabItem[] = useMemo(\n () => [\n ...getActivityLogTabValues(details.posEntity?.entityType ?? null).map(\n ({ value, contentId }) => {\n return {\n value,\n title: ,\n content: activityLogDisplay,\n };\n }\n ),\n ...tagNames.map((tagName) => {\n return {\n value: tagName,\n title: {tagName},\n content: activityLogDisplay,\n };\n }),\n ],\n [activityLogDisplay, details.posEntity?.entityType, tagNames]\n );\n\n const activeTabIndex = useMemo(() => {\n return tabs.findIndex((item) => item.value === activeTab) ?? 0;\n }, [activeTab, tabs]);\n\n const onValueChange = useCallback(\n (v: string) => setActiveTab(v as ListingActivityLogTab),\n []\n );\n\n return (\n <>\n \n }\n />\n \n\n \n \n \n \n \n\n \n \n \n \n );\n};\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport const ActivityLogLaunchButtonIconSpan = styled.span`\n color: ${(props) => props.theme.colors.textBrand};\n ${(props) => props.theme.typography.getStyles('body2')}\n cursor: pointer;\n height: ${() => vars.iconSize.s};\n display: inline-block;\n`;\n","import { ComponentProps, useCallback, useContext } from 'react';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { HistoryIcon } from 'src/svgs/HistoryIcon';\nimport { IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { ActivityLogModal } from './ActivityLogModal';\nimport * as styles from './ActivityLogModal.css';\nimport { ActivityLogLaunchButtonIconSpan } from './ActivityLogModal.styled';\n\nexport const LaunchActivityLog = ({\n entityId,\n cancelTo,\n}: {\n entityId: number;\n} & ComponentProps) => {\n const { setModal } = useContext(ModalContext);\n const { setActivePosEntity } = useActivePosEntityContext();\n\n const activityLogUi = useCallback(() => {\n setModal({\n children: ,\n clickOutsideToClose: false,\n size: 'slide-in',\n });\n }, [setModal, cancelTo]);\n\n const onLaunchDialog = useCallback(() => {\n setActivePosEntity(entityId, undefined, true);\n activityLogUi();\n }, [setActivePosEntity, entityId, activityLogUi]);\n\n return (\n
    \n \n \n \n \n
    \n );\n};\n","import React, { useCallback, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { CurrencyFilterSelector } from 'src/components/Selectors/CurrencyFilterSelector';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ConfirmDialog } from 'src/core/interim/dialogs/ConfirmDialog';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { FieldWrapper } from 'src/modals/common';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport { PurchaseOrderDetailsInput } from 'src/utils/purchaseUtils';\nimport { TicketGroupEditReason } from 'src/WebApiController';\n\ninterface PurchaseCurrencyProps {\n disabled?: boolean;\n}\n\nexport const PurchaseCurrency: React.FC = ({\n disabled,\n}) => {\n const currencyChangeWarningDialog = useBasicDialog();\n const [newCurrencyCode, setNewCurrencyCode] = useState('');\n\n const { getValues, setValue, formState } =\n useFormContext();\n\n const { id, currencyCode, ticketGroups } = getValues();\n const isNewPurchase = id <= 0;\n\n // Change Currency Dialog\n const onCurrencyChangeCancel = useCallback(() => {\n setNewCurrencyCode('');\n currencyChangeWarningDialog.closeDialog();\n }, [currencyChangeWarningDialog]);\n\n const onCurrencyChangeOk = useCallback(() => {\n setValue('currencyCode', posChangedField(newCurrencyCode));\n\n if (id > 0) {\n // If this is an existing purchase\n // We need to ensure all ticket-groups have an intention of edit\n const ticketGroupIntentions = getValues('ticketGroupIntentions');\n ticketGroups.forEach(({ ticketGroupId }) => {\n if (!ticketGroupIntentions[ticketGroupId]?.reason) {\n ticketGroupIntentions[ticketGroupId] = {\n ticketGroupId: ticketGroupId,\n reason: TicketGroupEditReason.AmendTickets,\n additionalInfo: '',\n };\n }\n });\n setValue('ticketGroupIntentions', { ...ticketGroupIntentions });\n }\n\n setValue(\n 'ticketGroups',\n ticketGroups?.map((tg) => ({\n ...tg,\n currencyCode: posChangedField(newCurrencyCode),\n }))\n );\n currencyChangeWarningDialog.closeDialog();\n setNewCurrencyCode('');\n }, [\n currencyChangeWarningDialog,\n getValues,\n newCurrencyCode,\n id,\n setValue,\n ticketGroups,\n ]);\n\n return (\n <>\n \n }>\n {\n if (newCurrencyCode && newCurrencyCode !== currencyCode?.value) {\n if (isNewPurchase) {\n setValue('currencyCode', posChangedField(newCurrencyCode), {\n shouldValidate: true,\n });\n } else {\n setNewCurrencyCode(newCurrencyCode);\n currencyChangeWarningDialog.launchDialog();\n }\n }\n }}\n />\n \n \n {currencyChangeWarningDialog.dialogProps.isOpen && (\n }\n bodyText={}\n onOkay={onCurrencyChangeOk}\n onCancel={onCurrencyChangeCancel}\n okText={ContentId.Yes}\n cancelText={ContentId.Cancel}\n />\n )}\n \n );\n};\n","import { useCallback, useEffect, useRef, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { SellerAccountEmployeeSelector } from 'src/components/Selectors/SellerAccountEmployeeSelector';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ConfirmDialog } from 'src/core/interim/dialogs/ConfirmDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport { PurchaseOrderDetailsInput } from 'src/utils/purchaseUtils';\nimport { PurchaseVendorAccount } from 'src/WebApiController';\n\nexport const PurchaseSellerAccountSelector = () => {\n const confirmChangeVendorAccountDialog = useBasicDialog();\n const dialogRef = useRef(\n confirmChangeVendorAccountDialog\n );\n dialogRef.current = confirmChangeVendorAccountDialog;\n const { loginContext } = useAppContext();\n const currentUserId = loginContext?.user?.userId!;\n const { watch, setValue, getValues } =\n useFormContext();\n\n const buyerUserId = watch('buyerUserId');\n const isNewPurchase = watch('id') <= 0;\n const formPurchaseVendorAccount = watch('vendorAccount');\n\n const [localPurchaseVendorAccount, setLocalPurchaseVendorAccount] =\n useState(\n formPurchaseVendorAccount?.value ?? null\n );\n const [tempBuyerUserId, setTempBuyerUserId] = useState(null);\n\n /**\n * When the selected vendorAccount changes, set the defaultBuyerUserId\n * if exists or the current userId after confirmation\n */\n useEffect(() => {\n const vendorDefaultBuyerUserId =\n formPurchaseVendorAccount?.value?.dftBuyerId || currentUserId;\n const userBuyerId = getValues('buyerUserId');\n\n if (localPurchaseVendorAccount === formPurchaseVendorAccount) {\n return;\n }\n setLocalPurchaseVendorAccount(formPurchaseVendorAccount?.value ?? null);\n\n if (userBuyerId?.value === vendorDefaultBuyerUserId) {\n return;\n }\n\n if (isNewPurchase) {\n setValue('buyerUserId', posChangedField(vendorDefaultBuyerUserId));\n return;\n }\n\n setTempBuyerUserId(vendorDefaultBuyerUserId);\n\n // Don't use confirmChangeVendorAccountDialog in deps because\n // on re-renders, triggers the effect.\n dialogRef.current.launchDialog();\n }, [\n formPurchaseVendorAccount,\n localPurchaseVendorAccount,\n setValue,\n currentUserId,\n getValues,\n isNewPurchase,\n ]);\n\n const onConfirmChangeVendorAccount = useCallback(() => {\n setValue('buyerUserId', posChangedField(tempBuyerUserId));\n confirmChangeVendorAccountDialog.closeDialog();\n setTempBuyerUserId(null);\n }, [setValue, confirmChangeVendorAccountDialog, tempBuyerUserId]);\n\n const onCancelChangeVendorAccount = useCallback(() => {\n confirmChangeVendorAccountDialog.closeDialog();\n setTempBuyerUserId(null);\n }, [confirmChangeVendorAccountDialog]);\n\n return (\n <>\n {\n if (newId && newId !== buyerUserId?.value) {\n setValue('buyerUserId', posChangedField(newId));\n }\n }}\n style={{ width: '100%' }}\n sortBy=\"key\"\n />\n {confirmChangeVendorAccountDialog.dialogProps.isOpen && (\n }\n bodyText={}\n onOkay={onConfirmChangeVendorAccount}\n onCancel={onCancelChangeVendorAccount}\n okText={ContentId.AssignToDefaultPurchaser}\n cancelText={ContentId.KeepCurrentPurchaser}\n size={'m'}\n />\n )}\n \n );\n};\n","import { useCallback, useState } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ConfirmDialog } from 'src/core/interim/dialogs/ConfirmDialog';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport useCopyToClipboard from 'src/hooks/useCopyToClipboard';\nimport { CopyIcon } from 'src/svgs';\nimport { IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getUrlWithDeepLink } from 'src/utils/deepLinkUtils';\n\nimport { sharedButtonSpan } from './ShareButton.css';\n\nexport type ShareButtonProps = {\n deepLinkQueryParam: 'uniqueSaleId' | 'uniqueInventoryId' | 'uniquePurchaseId';\n isCopiedLocation?: 'left' | 'right';\n usePopup?: boolean;\n};\n\nexport const ShareButton = ({\n deepLinkQueryParam,\n isCopiedLocation = 'left',\n usePopup = false,\n}: ShareButtonProps) => {\n const referenceId = 'ShareButton';\n const linkCopiedDialog = useBasicDialog();\n const [isUrlCopied, setIsUrlCopied] = useState(false);\n const { copyToClipboard } = useCopyToClipboard();\n const onClick = () => {\n const url = getUrlWithDeepLink(deepLinkQueryParam);\n if (url) {\n copyToClipboard(url.toString(), referenceId);\n if (usePopup) {\n linkCopiedDialog.launchDialog();\n }\n setIsUrlCopied(true);\n setTimeout(() => {\n setIsUrlCopied(false);\n if (usePopup) {\n linkCopiedDialog.closeDialog();\n }\n }, 3000); //Message will be shown for 3 seconds\n }\n };\n\n const showCopiedLabel = useCallback(\n (copiedLocation: string) => {\n return (\n !usePopup &&\n isUrlCopied &&\n isCopiedLocation === copiedLocation && (\n \n )\n );\n },\n [usePopup, isCopiedLocation, isUrlCopied]\n );\n\n const onOkay = () => {\n linkCopiedDialog.closeDialog();\n };\n\n return (\n <>\n \n {showCopiedLabel('left')}\n \n {showCopiedLabel('right')}\n \n }\n bodyText={}\n onOkay={onOkay}\n onCancel={undefined}\n okText={ContentId.OK}\n />\n \n );\n};\n","import {\n InfiniteData,\n useInfiniteQuery,\n UseInfiniteQueryResult,\n useQuery,\n} from '@tanstack/react-query';\nimport { debounce } from 'lodash-es';\nimport {\n ComponentProps,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { PosSelect } from 'src/core/POS/PosSelect';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { PurchaseClient, PurchaseVendorAccount } from 'src/WebApiController';\n\nimport { usePurchaseVendorSelector } from '../PurchaseVendorSelector/usePurchaseVendorSelector';\n\nexport type UsePurchaseVendorAccountSelectorOptions = {\n vendorId?: number | number[] | null;\n disabled?: boolean;\n additionalOptions?: Record;\n additionalOptionsPosition?: 'top' | 'bottom';\n placeholderText?: string | ContentId;\n paginateCount?: number | null;\n searchText?: string;\n purchaseVendorAccountEmail?: string;\n vendorAccountIds?: string[];\n};\n\nexport const usePurchaseVendorAccountSelector = ({\n vendorId,\n disabled,\n additionalOptions,\n additionalOptionsPosition = 'bottom',\n placeholderText,\n paginateCount = 1000,\n searchText,\n purchaseVendorAccountEmail,\n vendorAccountIds,\n}: UsePurchaseVendorAccountSelectorOptions): {\n query: UseInfiniteQueryResult<\n InfiniteData<\n {\n results: PurchaseVendorAccount[];\n skip: number;\n },\n unknown\n >,\n Error\n >;\n sortedVendorAccounts: PurchaseVendorAccount[];\n availableVendorAccounts: Record;\n posSelectProps: Pick<\n ComponentProps,\n | 'searchable'\n | 'placeholderText'\n | 'sortMode'\n | 'valueOptionsContent'\n | 'sortFn'\n | 'loading'\n >;\n} => {\n const { trackError } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const { availableVendors } = usePurchaseVendorSelector({});\n const hasVendorId = Array.isArray(vendorId)\n ? vendorId.length > 0\n : !!vendorId;\n\n const shouldQuery =\n !disabled &&\n activeAccountWebClientConfig.activeAccountId != null &&\n hasVendorId;\n\n const [debouncedSearchText, setDebouncedSearchText] = useState<\n string | undefined\n >(searchText);\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const debouncedSetSearchText = useCallback(\n debounce((value: string | undefined) => {\n setDebouncedSearchText(value);\n }, 500),\n []\n );\n\n useEffect(() => {\n if (searchText !== debouncedSearchText) {\n debouncedSetSearchText(searchText);\n }\n }, [searchText, debouncedSetSearchText, debouncedSearchText]);\n\n const query = useInfiniteQuery({\n queryKey: [\n 'getAccessibleVendorAccounts',\n activeAccountWebClientConfig.activeAccountId,\n vendorId,\n paginateCount,\n debouncedSearchText,\n ],\n queryFn: async ({ pageParam: skip = 0 }) => {\n if (!shouldQuery || !hasVendorId) {\n return {\n results: [],\n skip,\n };\n }\n\n const vendorIds = Array.isArray(vendorId) ? vendorId : [vendorId!];\n const result = await tryInvokeApi(\n () => {\n return new PurchaseClient(\n activeAccountWebClientConfig\n ).getAccessibleVendorAccounts(\n { item1: vendorIds, item2: [] },\n searchText,\n paginateCount ? paginateCount : null,\n skip ?? 0\n );\n },\n (error) => {\n trackError('PurchaseClient.getAccessibleVendorAccounts', error, {\n vendorIds,\n });\n }\n );\n\n return {\n results: result ?? [],\n skip,\n };\n },\n getNextPageParam: (lastPage) => {\n return lastPage?.results.length\n ? lastPage.skip + lastPage.results.length\n : undefined;\n },\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n staleTime: Infinity,\n networkMode: 'offlineFirst',\n initialPageParam: 0,\n placeholderData: (previousData) => previousData, // identity function with the same behaviour as `keepPreviousData`\n });\n\n const purchaseVendorAccountQuery = useQuery({\n queryKey: [\n 'getAccessibleVendorAccounts',\n activeAccountWebClientConfig.activeAccountId,\n vendorId,\n purchaseVendorAccountEmail,\n vendorAccountIds,\n ],\n queryFn: async ({ pageParam: skip = 0 }) => {\n if (!shouldQuery || !hasVendorId) {\n return null;\n }\n\n const vendorIds = Array.isArray(vendorId) ? vendorId : [vendorId!];\n\n return tryInvokeApi(\n () => {\n return new PurchaseClient(\n activeAccountWebClientConfig\n ).getAccessibleVendorAccounts(\n { item1: vendorIds, item2: vendorAccountIds || [] },\n purchaseVendorAccountEmail,\n null,\n null\n );\n },\n (error) => {\n trackError('PurchaseClient.getAccessibleVendorAccounts', error, {\n vendorIds,\n vendorAccountIds,\n });\n }\n );\n },\n enabled: shouldQuery && !!purchaseVendorAccountEmail,\n refetchOnWindowFocus: false,\n staleTime: Infinity,\n networkMode: 'offlineFirst',\n });\n\n const sortedVendorAccounts = useMemo(() => {\n if (!query.data) {\n return [];\n }\n\n // NOTE - it is purposely to use a Map and for loops here instead of\n // using the spread operator (...) because the spread operator will\n // cause a Stack-overflow when there are too many elements\n const resultMap = new Map();\n\n query.data.pages.forEach((p) => {\n p.results.forEach((i) => resultMap.set(i.id, i));\n });\n\n purchaseVendorAccountQuery.data?.forEach((p) => {\n resultMap.set(p.id, p);\n });\n\n const unionResult: PurchaseVendorAccount[] = [];\n for (const va of resultMap.values()) {\n unionResult.push(va);\n }\n\n return unionResult;\n }, [purchaseVendorAccountQuery.data, query.data]);\n\n const availableVendorAccounts = useMemo(() => {\n const results = sortedVendorAccounts\n ?.filter((d) => d.email || d.name) // Only show those with emails\n ?.reduce(\n (r, cur) => {\n r[cur.id] = cur;\n return r;\n },\n {} as Record\n );\n\n return results ?? {};\n }, [sortedVendorAccounts]);\n\n const availableVendorAccountsOptions = useMemo(() => {\n const results = sortedVendorAccounts\n ?.filter((d) => d.email || d.name) // Only show those with emails\n ?.reduce(\n (r, cur) => {\n const vendor = availableVendors[cur.vendorId];\n r[cur.id] = `${cur.email || cur.name} ${\n Array.isArray(vendorId) && vendorId.length > 1 && vendor\n ? '(' + vendor.name + ')'\n : ''\n }`;\n return r;\n },\n (additionalOptions && additionalOptionsPosition === 'top'\n ? additionalOptions\n : {}) as Record\n );\n\n return {\n ...(additionalOptionsPosition === 'top' ? additionalOptions : {}),\n ...(results ?? {}),\n ...(additionalOptionsPosition === 'bottom' ? additionalOptions : {}),\n };\n }, [\n additionalOptions,\n additionalOptionsPosition,\n availableVendors,\n sortedVendorAccounts,\n vendorId,\n ]);\n\n const addOptionTexts = useMemo(() => {\n return Object.keys(additionalOptions ?? {});\n }, [additionalOptions]);\n\n return {\n query,\n sortedVendorAccounts,\n availableVendorAccounts,\n posSelectProps: {\n searchable: true,\n loading: query.isLoading,\n placeholderText: placeholderText ?? ContentId.ChooseAccount,\n valueOptionsContent: availableVendorAccountsOptions,\n sortMode: 'ascending',\n sortFn: (a: string, b: string) => {\n if (addOptionTexts.includes(a)) {\n return additionalOptionsPosition === 'top' ? -1 : 1;\n }\n if (addOptionTexts.includes(b)) {\n return additionalOptionsPosition === 'top' ? 1 : -1;\n }\n return availableVendorAccountsOptions[a]?.localeCompare(\n availableVendorAccountsOptions[b]\n );\n },\n },\n };\n};\n","import { useCallback, useEffect, useMemo, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { usePurchaseVendorAccountSelector } from 'src/components/Selectors/PurchaseVendorAccountSelector/usePurchaseVendorAccountSelector';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { PosSelect, PosSelectProps } from 'src/core/POS/PosSelect';\nimport { PurchaseVendorAccountDialog } from 'src/dialogs/PurchaseVendorAccountDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { VendorAccountEditInfo } from 'src/navigations/Routes/Settings/Views/VendorManagement/Vendors/hooks/useAddVendorAccount';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { posChangedField, posField } from 'src/utils/posFieldUtils';\nimport { PurchaseOrderDetailsInput } from 'src/utils/purchaseUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ApiException,\n Feature,\n PurchaseClient,\n PurchaseVendorAccount,\n PurchaseVendorAccountDetails,\n} from 'src/WebApiController';\n\nexport type PurchaseVendorAccountSelectionInputProps = Omit<\n PosSelectProps,\n 'onChange' | 'valueOptionsContent'\n> & {\n vendorFieldName: 'vendor' | 'secondaryVendor';\n fieldName: 'vendorAccount' | 'secondaryVendorAccount';\n};\n\nexport const PurchaseVendorAccountSelectionInput = ({\n disabled,\n vendorFieldName,\n fieldName,\n ...posSelectProps\n}: PurchaseVendorAccountSelectionInputProps) => {\n const hasVendorAccountDeliveryStrategyFeature = useUserHasFeature(\n Feature.VendorAccountDeliveryStrategy\n );\n\n const { setValue, clearErrors, watch, formState } =\n useFormContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const { closeDialog, launchDialog, dialogProps } = useBasicDialog();\n const [currentVendorAccount, setCurrentVendorAccount] =\n useState();\n const { showErrorDialog } = useErrorBoundaryContext();\n const [searchText, setSearchText] = useState(undefined);\n\n const vendorId = watch(`${vendorFieldName}.value.id`);\n const vendorAccount = watch(fieldName);\n\n const addVendorAccountText = useContent(ContentId.AddAccountAction);\n const additionalOptions = useMemo(\n () => ({\n [ContentId.AddAccountAction]: addVendorAccountText + '...',\n }),\n [addVendorAccountText]\n );\n const optionsAlwaysShow = useMemo(\n () => ({\n [ContentId.AddAccountAction]: true,\n }),\n []\n );\n const {\n query,\n sortedVendorAccounts,\n posSelectProps: hookPosSelectProps,\n } = usePurchaseVendorAccountSelector({\n vendorId: vendorId,\n disabled,\n additionalOptions,\n searchText,\n purchaseVendorAccountEmail: vendorAccount?.value?.email,\n });\n\n const { fetchNextPage, hasNextPage, isFetchingNextPage } = query;\n\n useEffect(() => {\n // If we don't have a selected account, auto-select the first one in the list\n if (\n vendorId &&\n (!vendorAccount || vendorAccount?.value?.vendorId !== vendorId)\n ) {\n const accounts = sortedVendorAccounts;\n if (accounts?.length) {\n clearErrors(fieldName);\n setValue(fieldName, posChangedField(accounts[0]));\n } else {\n setValue(fieldName, posField(null));\n }\n }\n }, [\n clearErrors,\n setValue,\n vendorAccount,\n vendorId,\n query.data,\n fieldName,\n sortedVendorAccounts,\n ]);\n\n const onAddNewVendorAccount = useCallback(\n (searchText?: string) => {\n if (vendorId) {\n setCurrentVendorAccount({\n vendorId: vendorId,\n id: '',\n });\n }\n\n launchDialog();\n },\n [launchDialog, vendorId]\n );\n\n const onSaveVendorAccount = useCallback(\n async (vendorAccount: PurchaseVendorAccountDetails) => {\n await tryInvokeApi(\n async () => {\n const newId = await new PurchaseClient(\n activeAccountWebClientConfig\n ).mergeVendorAccount(vendorAccount);\n\n if (newId) {\n query.refetch();\n setValue(\n fieldName,\n posChangedField({\n ...vendorAccount,\n id: newId,\n })\n );\n clearErrors(fieldName);\n\n closeDialog();\n setCurrentVendorAccount(undefined);\n } else {\n // This should never happen\n // Normal errors would have fallen to the error catch\n showErrorDialog(\n 'PurchaseClient.mergeVendorAccount',\n {\n message:\n 'Unable to create or save vendor account ' + vendorAccount.id,\n status: 500,\n } as ApiException,\n {\n trackErrorData: vendorAccount,\n }\n );\n }\n },\n (error) => {\n showErrorDialog('PurchaseClient.mergeVendorAccount', error, {\n trackErrorData: vendorAccount,\n });\n }\n );\n },\n [\n activeAccountWebClientConfig,\n clearErrors,\n closeDialog,\n fieldName,\n query,\n setValue,\n showErrorDialog,\n ]\n );\n\n const onVendorAccountCancel = useCallback(() => {\n closeDialog();\n setCurrentVendorAccount(undefined);\n }, [closeDialog]);\n\n return (\n <>\n {\n clearErrors(fieldName);\n if (value) {\n if (value === ContentId.AddAccountAction) {\n onAddNewVendorAccount(searchText);\n } else if (value !== vendorAccount?.value?.id) {\n const newAccount = sortedVendorAccounts!.find(\n (v: PurchaseVendorAccount) => v.id === value\n );\n if (newAccount) {\n setValue(fieldName, posChangedField(newAccount));\n }\n }\n }\n }}\n onSearchInputChange={setSearchText}\n fetchNextPage={fetchNextPage}\n hasNextPage={hasNextPage}\n isFetchingNextPage={isFetchingNextPage}\n useVirtualWindow={true}\n />\n {vendorId && currentVendorAccount && (\n \n )}\n \n );\n};\n","import { vars } from 'src/core/themes';\n\nimport { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const ChevronAccordionIcon = (props: PosIconProps) => {\n return (\n \n \n \n \n \n );\n};\n","import { Content, Trigger } from '@radix-ui/react-accordion';\nimport clsx from 'clsx';\nimport { ComponentPropsWithoutRef, forwardRef } from 'react';\nimport { Button } from 'src/core/ui';\nimport * as styles from 'src/core/ui/Accordion/Accordion.css';\nimport { ChevronAccordionIcon } from 'src/svgs/ChevronAccordionIcon';\n\nexport const PosAccordionTrigger = forwardRef<\n HTMLButtonElement,\n ComponentPropsWithoutRef & { chevronPos?: 'front' | 'back' }\n>(({ children, className, chevronPos = 'back', ...props }, forwardedRef) => (\n \n {chevronPos === 'front' && (\n \n )}\n {children}\n {chevronPos === 'back' && (\n \n )}\n \n));\nPosAccordionTrigger.displayName = 'PosAccordionTrigger';\n\nexport const PosAccordionContent = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef\n>(({ children, className, ...props }, forwardedRef) => (\n \n
    {children}
    \n
    \n));\nPosAccordionContent.displayName = 'AccordionContent';\n","import { useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { TicketTypePriorityInput } from 'src/components/common/TicketTypePriorityInput';\nimport { DeliveryTypeSelector } from 'src/components/Selectors/DeliveryTypeSelector';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { Stack, Switch } from 'src/core/ui';\nimport {\n PosAccordionContent,\n PosAccordionItem,\n PosAccordionRoot,\n PosAccordionTrigger,\n} from 'src/core/ui/Accordion';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { FieldWrapper } from 'src/modals/common/Purchase';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { DeliveryType, Feature, PurchaseVendor } from 'src/WebApiController';\n\nimport * as styles from './PurchaseVendorDialog.css';\n\nexport const PurchaseVendorDeliveryOverrideInput = ({\n collapsible,\n}: {\n collapsible?: boolean;\n}) => {\n const hasSellerAccountPurchaseVendorOverrideFeature = useUserHasFeature(\n Feature.SellerAccountPurchaseVendorOverride\n );\n\n if (!hasSellerAccountPurchaseVendorOverrideFeature) {\n return null;\n }\n\n if (collapsible) {\n return (\n \n \n \n
    \n \n
    \n
    \n \n \n \n
    \n
    \n );\n }\n\n return (\n \n
    \n \n
    \n\n \n
    \n );\n};\n\nconst PurchaseVendorDeliveryOverrideInputContent = () => {\n const { formState, watch, setValue } = useFormContext();\n\n const hasAutoFulfillSettingFeature = useUserHasFeature(\n Feature.AutoFulfillSetting\n );\n\n const deliveryType = watch('delivType');\n const isNoFulfill = watch('isNoFulfill');\n const ticketTypeRules = watch('tktTypeRules');\n\n const [skipAutoFulfill, setSkipAutoFulfill] = useState(isNoFulfill == null);\n const [skipDeliveryOverride, setSkipDeliveryOverride] = useState(\n deliveryType == null\n );\n\n return (\n \n
    \n \n
    \n {hasAutoFulfillSettingFeature && (\n <>\n }\n labelPosition=\"right\"\n onChange={(e) => {\n const skip = !e.target.checked;\n setSkipAutoFulfill(skip);\n if (skip) {\n setValue('isNoFulfill', null, {\n shouldDirty: true,\n });\n } else {\n // We want to default to false if the user enables the setting\n setValue('isNoFulfill', true, {\n shouldDirty: true,\n });\n }\n }}\n checked={!skipAutoFulfill}\n />\n {!skipAutoFulfill && (\n \n }>\n e.stopPropagation()}\n onCheckedChange={(isChecked) => {\n setValue('isNoFulfill', !isChecked, {\n shouldDirty: true,\n });\n }}\n />\n \n \n )}\n \n )}\n\n }\n labelPosition=\"right\"\n onChange={(e) => {\n const skip = !e.target.checked;\n setSkipDeliveryOverride(skip);\n if (skip) {\n setValue('delivType', null, {\n shouldDirty: true,\n });\n } else {\n setValue('delivType', DeliveryType.InApp, {\n shouldDirty: true,\n });\n }\n\n setValue('tktTypeRules', null, {\n shouldDirty: true,\n });\n }}\n checked={!skipDeliveryOverride}\n />\n {!skipDeliveryOverride && (\n <>\n \n }>\n {\n if (newD !== deliveryType) {\n setValue('delivType', newD, {\n shouldDirty: true,\n });\n if (!newD) {\n setValue('tktTypeRules', null, {\n shouldDirty: true,\n });\n }\n }\n }}\n />\n \n \n {deliveryType && (\n \n }>\n {\n setValue('tktTypeRules', newRules, {\n shouldDirty: true,\n });\n }}\n disabled={formState.isSubmitting}\n />\n \n \n )}\n \n )}\n
    \n );\n};\n","import { ComponentProps, useCallback } from 'react';\nimport { FormProvider, useForm, useFormContext } from 'react-hook-form';\nimport { Modal as RSModal } from 'reactstrap';\nimport { CancelButton } from 'src/components/Buttons';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { getTextFieldState, PosTextField } from 'src/core/POS/PosTextField';\nimport { Button } from 'src/core/ui';\nimport { FieldWrapper } from 'src/modals/common/Purchase';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { PurchaseVendor } from 'src/WebApiController';\n\nimport { PurchaseVendorDeliveryOverrideInput } from './PurchaseVendorDeliveryOverrideInput';\nimport * as styles from './PurchaseVendorDialog.css';\n\nexport type PurchaseVendorDialogProps = {\n vendor: PurchaseVendor;\n onSave: (data: PurchaseVendor) => void;\n useReducedEdit?: boolean;\n} & ComponentProps;\n\nexport function PurchaseVendorDialog({\n vendor,\n ...rest\n}: PurchaseVendorDialogProps) {\n const methods = useForm({\n defaultValues: vendor,\n values: vendor,\n });\n\n return (\n \n \n \n );\n}\n\ntype PurchaseVendorDialogBodyProps = Omit;\n\nexport const PurchaseVendorDialogBody = ({\n onSave,\n onClosed,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onOkay, // unused\n useReducedEdit,\n ...rest\n}: PurchaseVendorDialogBodyProps) => {\n const { register, setError, handleSubmit, formState, getValues, watch } =\n useFormContext();\n\n const requiredMsg = useContent(ContentId.Required);\n\n const { id } = getValues();\n\n const nameError = formState.errors.name?.message;\n\n const isGlobal = watch('isGlobal');\n const vendorName = watch('name');\n\n const onSubmit = useCallback(() => {\n let hasErrors = false;\n if (!vendorName) {\n setError('name', { message: requiredMsg }, { shouldFocus: true });\n hasErrors = true;\n }\n\n if (!hasErrors) {\n handleSubmit(onSave)();\n }\n }, [handleSubmit, onSave, requiredMsg, setError, vendorName]);\n\n return (\n \n }\n footer={\n <>\n {onClosed && (\n \n )}\n \n \n \n \n }\n onCancel={onClosed}\n >\n
    \n \n }\n >\n \n \n \n\n {!useReducedEdit && }\n
    \n \n );\n};\n","import { useCallback, useEffect, useMemo, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { usePurchaseVendorSelector } from 'src/components/Selectors/PurchaseVendorSelector/usePurchaseVendorSelector';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { PosSelect, PosSelectProps } from 'src/core/POS/PosSelect';\nimport { PurchaseVendorDialog } from 'src/dialogs/PurchaseVendorDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport { PurchaseOrderDetailsInput } from 'src/utils/purchaseUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ApiException,\n PurchaseClient,\n PurchaseVendor,\n} from 'src/WebApiController';\n\nexport type PurchaseVendorSelectionInputProps = Omit<\n PosSelectProps,\n 'value' | 'onChange' | 'valueOptionsContent'\n> & {\n fieldName: 'vendor' | 'secondaryVendor';\n};\n\nexport const PurchaseVendorSelectionInput = ({\n disabled,\n fieldName,\n ...posSelectProps\n}: PurchaseVendorSelectionInputProps) => {\n const addVendorText = useContent(ContentId.AddVendorAction);\n const additionalOptions = useMemo(\n () => ({\n [ContentId.AddVendorAction]: addVendorText + '...',\n }),\n [addVendorText]\n );\n\n const { query, posSelectProps: hookPosSelectProps } =\n usePurchaseVendorSelector({\n disabled,\n additionalOptions,\n });\n\n const { setValue, clearErrors, watch, formState } =\n useFormContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const { closeDialog, launchDialog, dialogProps } = useBasicDialog();\n const [currentVendor, setCurrentVendor] = useState();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const vendor = watch(fieldName);\n\n useEffect(() => {\n // If we don't have a selected account, auto-select the first one in the list\n if (!vendor) {\n const vendors = query.data;\n if (vendors?.length) {\n clearErrors(fieldName);\n setValue(fieldName, posChangedField(vendors[0]));\n }\n }\n }, [clearErrors, fieldName, query.data, setValue, vendor]);\n\n const onAddNewVendor = useCallback(() => {\n setCurrentVendor({\n id: -1,\n name: '',\n isGlobal: false,\n isNoFulfill: null,\n delivType: null,\n tktTypeRules: null,\n vendAccCounts: 0,\n });\n\n launchDialog();\n }, [launchDialog]);\n\n const onSaveVendor = useCallback(\n async (vendor: PurchaseVendor) => {\n await tryInvokeApi(\n async () => {\n const newId = await new PurchaseClient(\n activeAccountWebClientConfig\n ).mergeVendor(vendor);\n\n if (newId) {\n query.refetch();\n setValue(\n fieldName,\n posChangedField({\n ...vendor,\n id: newId,\n })\n );\n clearErrors(fieldName);\n\n closeDialog();\n setCurrentVendor(undefined);\n } else {\n // This should never happen\n // Normal errors would have fallen to the error catch\n showErrorDialog(\n 'PurchaseClient.mergeVendor',\n {\n message: 'Unable to create or save vendor ' + vendor.id,\n status: 500,\n } as ApiException,\n {\n trackErrorData: vendor,\n }\n );\n }\n },\n (error) => {\n showErrorDialog('PurchaseClient.mergeVendor', error, {\n trackErrorData: vendor,\n });\n }\n );\n },\n [\n activeAccountWebClientConfig,\n clearErrors,\n closeDialog,\n fieldName,\n query,\n setValue,\n showErrorDialog,\n ]\n );\n\n const onVendorCancel = useCallback(() => {\n closeDialog();\n setCurrentVendor(undefined);\n }, [closeDialog]);\n\n return (\n <>\n {\n clearErrors(fieldName);\n if (value) {\n const vendorId = parseInt(value);\n if (value === ContentId.AddVendorAction) {\n onAddNewVendor();\n } else if (vendorId !== vendor?.value?.id) {\n const newVendor = query.data!.find(\n (v: PurchaseVendor) => v.id === vendorId\n );\n if (newVendor) {\n setValue(fieldName, posChangedField(newVendor));\n }\n }\n }\n }}\n />\n {currentVendor && (\n \n )}\n \n );\n};\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport const HeaderRightGroup = styled.div<{ editMode?: boolean }>`\n display: flex;\n flex-direction: column;\n width: 100%;\n\n ${({ editMode, theme: { media } }) =>\n `${media.makeMediaQuery(\n media.breakpoints.md,\n `\n text-align: ${editMode ? 'left' : 'right'};\n max-width: calc(50% - ${vars.spacing.lg});\n align-items: ${editMode ? 'flex-start' : 'flex-end'};\n `\n )}`}\n`;\n\nexport const HeaderLeftGroup = styled.div`\n display: flex;\n flex-direction: column;\n width: 100%;\n\n ${({ theme: { media } }) =>\n `${media.makeMediaQuery(\n media.breakpoints.md,\n `\n max-width: calc(50% - ${vars.spacing.lg});\n `\n )}`}\n`;\n\nexport const HeaderVendorContainer = styled.div`\n ${({\n theme: {\n typography: { getStyles },\n },\n }) => getStyles('title4')};\n padding-block-end: ${() => vars.spacing.lg};\n\n width: 100%;\n white-space: nowrap;\n text-overflow: ellipsis;\n`;\n\nexport const PurchaseOrderStateContainer = styled.div`\n ${({\n theme: {\n typography: { getStyles },\n },\n }) => getStyles('title4')};\n\n color: ${(props) => props.theme.colors.textNegative};\n padding-block-end: ${() => vars.spacing.lg};\n width: min-content;\n border: 1px solid ${(props) => props.theme.colors.textNegative};\n border-radius: ${() => vars.spacing.sm};\n display: flex;\n align-items: center;\n justify-content: center;\n padding: ${() => vars.spacing.sm};\n`;\n\nexport const DeliverAlternativeAccountCheckboxWrapper = styled.span``;\n","import { formatInTimeZone } from 'date-fns-tz';\nimport { isEqual } from 'lodash-es';\nimport React, {\n ReactNode,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport { Controller, useFormContext } from 'react-hook-form';\nimport { useNavigate } from 'react-router-dom';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport {\n Content,\n FormatContent,\n useContent,\n} from 'src/contexts/ContentContext';\nimport { usePurchaseDataContext } from 'src/contexts/PurchaseDataContext';\nimport { useSiteTimezoneContext } from 'src/contexts/SiteTimezoneContext/SiteTimezoneContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { DatePickerInput } from 'src/core/POS/DateSelector';\nimport { PosDropdown, PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { getTextFieldState, PosTextField } from 'src/core/POS/PosTextField';\nimport { Button, Stack } from 'src/core/ui';\nimport { CancelPurchaseDialog } from 'src/dialogs/CancelPurchaseDialog';\nimport { RestorePurchaseDialog } from 'src/dialogs/RestorePurchaseDialog';\nimport { UnsavedChanges } from 'src/dialogs/UnsavedChanges';\nimport { useSyncCenterSettings } from 'src/hooks/api/useSyncCenterSetting';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useGetIsPurchaseIdsInUsedForVendorId } from 'src/hooks/useGetIsPurchaseIdsInUsedForVendorId';\nimport { useGetUserInfos } from 'src/hooks/userGetUserInfo';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { LaunchActivityLog } from 'src/modals/ActivityLog';\nimport { FieldWrapper, HeaderFieldLabel } from 'src/modals/common';\nimport { PurchaseCurrency } from 'src/modals/common/Purchase/PurchaseCurrency';\nimport { PurchaseSellerAccountSelector } from 'src/modals/common/Purchase/PurchaseSellerAccountSelector/PurchaseSellerAccountSelector';\nimport { MainRoute } from 'src/navigations/Routes/MainRoute';\nimport { IconsFill, MoreIcon } from 'src/svgs/Viagogo';\nimport { PurchaseDeeplinkQueryParam } from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n PURCHASE_ORDER_STATE_TO_CID,\n QUALITY_CONTROL_STATE_TO_CID,\n} from 'src/utils/constants/contentIdMaps';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { stringToUtcDate } from 'src/utils/dateTimeUtils';\nimport { getPathFromMainRoute } from 'src/utils/deepLinkUtils';\nimport {\n DefaultListingQuery,\n DefaultSaleQuery,\n getPurchaseOrderIdListingQuery,\n getPurchaseOrderIdSaleQuery,\n getUrlFilterQueryParam,\n} from 'src/utils/eventQueryUtils';\nimport { getLocaleFromLanguageOrCurrent } from 'src/utils/localeUtils';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport {\n getPurchaseOrderDetailsModalConfigWithDeepLink,\n isCancelledState,\n PurchaseOrderDetailsInput,\n} from 'src/utils/purchaseUtils';\nimport {\n Feature,\n Permission,\n PurchaseOrderDetails,\n PurchasingIdInUseResultType,\n QualityControlState,\n} from 'src/WebApiController';\n\nimport { ShareButton } from '../../ShareButton/ShareButton';\nimport { summaryWrapper } from '../../Summary/Summary.css';\nimport { fieldText } from '../Purchase.css';\nimport { PurchaseVendorAccountSelectionInput } from '../PurchaseVendorAccountSelectionInput';\nimport { PurchaseVendorSelectionInput } from '../PurchaseVendorSelectionInput';\nimport * as styles from './PurchaseVendorHeader.css';\nimport {\n DeliverAlternativeAccountCheckboxWrapper,\n HeaderLeftGroup,\n HeaderRightGroup,\n HeaderVendorContainer,\n PurchaseOrderStateContainer,\n} from './PurchaseVendorHeader.styled';\n\nexport const PurchaseVendorHeader = ({\n editMode,\n disabled,\n numOfSales,\n numOfListings,\n onToggleEditDetails,\n onGoToMessageThread,\n enableMarkAsPaid,\n onMarkPurchaseAsPaid,\n}: {\n editMode: boolean;\n disabled?: boolean;\n numOfSales: number;\n numOfListings: number;\n onToggleEditDetails?: () => void;\n onGoToMessageThread?: () => void;\n enableMarkAsPaid?: boolean;\n onMarkPurchaseAsPaid?: () => void;\n}) => {\n const { timeZone } = useSiteTimezoneContext();\n const {\n control,\n register,\n getValues,\n watch,\n setValue,\n formState,\n clearErrors,\n setError,\n } = useFormContext();\n\n const { posEntity: purchaseOrder, setActivePosEntity } =\n useActivePosEntityContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n refreshCatalog,\n } = useCatalogDataContext();\n const { refreshData } = usePurchaseDataContext();\n\n const hasCreatePermission = useUserHasAnyOfPermissions(\n Permission.Purchases_Create\n );\n const hasDisplayDeactivatedUser = useUserHasFeature(\n Feature.DisplayDeactivatedUser\n );\n\n const settings = useSyncCenterSettings();\n const { isAutoPoQualityControlled = false } = settings.data ?? {};\n\n const {\n id,\n vendor,\n vendorAccount,\n secondaryVendor,\n secondaryVendorAccount,\n vendorOrderId,\n purchaseDate,\n transferId,\n currencyCode,\n } = getValues();\n\n const purchaseOrderId = watch('id');\n const buyerUserId = watch('buyerUserId');\n\n const useGetUserInfosQuery = useGetUserInfos(\n buyerUserId?.value ? [buyerUserId.value] : []\n );\n\n const buyerUserInfo =\n buyerUserId?.value == null\n ? null\n : useGetUserInfosQuery.data?.[buyerUserId.value];\n\n const qcState = watch('qcState');\n\n const curLocale = getLocaleFromLanguageOrCurrent();\n\n const vendorOrderIdPlaceholder = useContent(\n ContentId.EnterPurchaseOrderIdFromVendor\n );\n\n const transferIdPlaceHolder = useContent(\n ContentId.EnterTransferIdForPurchase\n );\n\n const requiredMsg = useContent(ContentId.Required);\n\n const cancelVoidDialog = useBasicDialog();\n const restorePurchaseDialog = useBasicDialog();\n\n const isCancelled = isCancelledState(purchaseOrder?.poState);\n const isDisabled = disabled || isCancelled;\n\n const navigateUnsavedDialog = useBasicDialog();\n const navigate = useNavigate();\n const [navigateUrl, setNavigateUrl] = useState();\n\n const deactivatedText = useContent(ContentId.Deactivated);\n const youHaveNoSalesMsg = useContent(ContentId.PurchaseHaveNoSales);\n const youHaveNoListingsMsg = useContent(ContentId.PurchaseHaveNoListings);\n\n const [showSecondaryVendorInputs, setShowSecondaryVendorInputs] =\n useState(\n Boolean(secondaryVendor?.value || secondaryVendorAccount?.value)\n );\n\n const onViewUrlClick = useCallback(\n (e: React.MouseEvent, url: string) => {\n if (e.button === 0 || e.button === 1) {\n e.preventDefault();\n e.stopPropagation();\n\n if (e.button === 1) {\n // Middle-clicked open a new browser-tab\n window.open(url, '_blank');\n } else if (isEqual(getValues(), formState.defaultValues)) {\n navigate(url);\n } else {\n // Need to confirm unsave changes\n setNavigateUrl(url);\n navigateUnsavedDialog.launchDialog();\n }\n }\n },\n [formState.defaultValues, getValues, navigate, navigateUnsavedDialog]\n );\n\n const viewSaleOnClick = useCallback(\n (e: React.MouseEvent) => {\n const navigateUrl = `${getPathFromMainRoute(\n MainRoute.Sales\n )}${getUrlFilterQueryParam(\n DefaultSaleQuery,\n getPurchaseOrderIdSaleQuery(id)\n )}`;\n onViewUrlClick(e, navigateUrl);\n },\n [id, onViewUrlClick]\n );\n\n const viewInventoryOnClick = useCallback(\n (e: React.MouseEvent) => {\n const navigateUrl = `${getPathFromMainRoute(\n MainRoute.Inventory\n )}${getUrlFilterQueryParam(\n DefaultListingQuery,\n getPurchaseOrderIdListingQuery(id)\n )}`;\n onViewUrlClick(e, navigateUrl);\n },\n [id, onViewUrlClick]\n );\n\n const actions = useMemo(() => {\n const actions: ReactNode[] = [\n \n \n ,\n ];\n if (id > 0) {\n actions.push(\n cancelVoidDialog.launchDialog()}\n >\n \n \n );\n\n if (!isDisabled && hasCreatePermission && onGoToMessageThread) {\n actions.push(\n \n \n \n );\n }\n\n if (isCancelled) {\n actions.push(\n {\n restorePurchaseDialog.launchDialog();\n }}\n >\n \n \n );\n }\n\n if (enableMarkAsPaid) {\n actions.push(\n \n \n \n );\n }\n\n if (editMode) {\n actions.push(\n \n \n ,\n \n \n \n );\n }\n }\n return actions;\n }, [\n onToggleEditDetails,\n id,\n isDisabled,\n hasCreatePermission,\n onGoToMessageThread,\n isCancelled,\n enableMarkAsPaid,\n editMode,\n cancelVoidDialog,\n restorePurchaseDialog,\n onMarkPurchaseAsPaid,\n numOfSales,\n viewSaleOnClick,\n youHaveNoSalesMsg,\n numOfListings,\n viewInventoryOnClick,\n youHaveNoListingsMsg,\n ]);\n\n const viewEntityButtons =\n id > 0 ? (\n <>\n \n \n \n \n \n \n \n ) : null;\n\n const goToNavigation = useCallback(() => {\n if (navigateUrl) {\n navigate(navigateUrl);\n }\n navigateUnsavedDialog.closeDialog();\n }, [navigate, navigateUnsavedDialog, navigateUrl]);\n\n const orderIdUsedWarningMessage = useContent(ContentId.OrderIdInUse);\n const orderIdUsedErrorMessage = useContent(ContentId.OrderIdInUseSameVendor);\n const [orderIdBlurred, setOrderIdBlurred] = useState();\n const { purchasingIdInUseQuery } = useGetIsPurchaseIdsInUsedForVendorId(\n orderIdBlurred,\n vendor?.value?.id\n );\n\n useEffect(() => {\n if (purchaseOrderId < 0) {\n if (\n purchasingIdInUseQuery.data ===\n PurchasingIdInUseResultType.SameOrderIdAndVendorId\n ) {\n setError('vendorOrderId', { message: orderIdUsedErrorMessage });\n } else {\n if (\n formState.errors.vendorOrderId?.message === orderIdUsedErrorMessage\n ) {\n clearErrors('vendorOrderId');\n }\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [purchasingIdInUseQuery.data]);\n\n const orderIdOnBlur = (e: React.FocusEvent) => {\n setOrderIdBlurred(e.target.value);\n };\n\n return (\n <>\n {!editMode || isDisabled ? (\n
    \n
    \n
    \n \n \n {vendor?.value?.name}\n \n \n \n {isCancelled && (\n \n \n \n )}\n \n
    \n
    \n \n \n \n \n \n
    \n
    {vendorOrderId?.value}
    \n
    \n \n
    \n
    \n
    \n \n \n \n \n
    \n {purchaseDate?.value &&\n formatInTimeZone(\n stringToUtcDate(purchaseDate.value),\n timeZone,\n 'MMM d, yyyy h:mm a',\n {\n locale: curLocale,\n }\n )}\n
    \n
    \n \n \n \n \n
    {currencyCode?.value}
    \n
    \n {transferId?.value && (\n \n \n \n \n
    {transferId.value}
    \n
    \n )}\n {isAutoPoQualityControlled && qcState != null && (\n \n \n \n \n {qcState.hasChanged ||\n qcState?.value === QualityControlState.Pending ? (\n {\n return (\n }\n checked={\n value?.value === QualityControlState.Approved\n }\n onChange={(e) => {\n const isChecked = e.target.checked;\n onChange(\n posChangedField(\n isChecked\n ? QualityControlState.Approved\n : QualityControlState.Pending\n )\n );\n }}\n />\n );\n }}\n />\n ) : (\n
    \n {qcState.value && (\n \n )}\n
    \n )}\n
    \n )}\n
    \n \n \n \n \n \n
    \n {vendorAccount?.value?.email ?? vendorAccount?.value?.name}\n
    \n
    \n \n \n \n \n
    \n {`${buyerUserInfo?.name} ${\n buyerUserInfo?.isDeactivated && !hasDisplayDeactivatedUser\n ? ` (${deactivatedText})`\n : ''\n }`}\n
    \n
    {buyerUserInfo?.email}
    \n
    \n
    \n
    \n
    \n \n \n \n
    \n {purchaseOrderId > 0 ? (\n \n ) : undefined}\n {viewEntityButtons}\n {purchaseOrderId > 0 && actions.length > 0 && (\n // only show this when NOT creating new purchase\n \n }\n align=\"end\"\n >\n {actions}\n \n )}\n
    \n
    \n
    \n
    \n
    \n
    \n ) : (\n
    \n
    \n
    \n \n
    \n }\n >\n \n \n
    \n
    \n \n
    \n }\n >\n \n \n
    \n
    \n
    \n
    \n \n \n }\n >\n {\n return fieldVal?.length ? undefined : requiredMsg;\n },\n },\n\n onChange: (event) => {\n if (event.target.value) {\n clearErrors('vendorOrderId');\n }\n setValue('vendorOrderId.hasChanged', true);\n },\n })}\n onBlur={orderIdOnBlur}\n trimOnBlur={true}\n />\n \n \n \n }\n errors={formState.errors.vendor?.message}\n >\n {\n if (date) {\n clearErrors('purchaseDate');\n const dateStr = date.toISOString();\n if (dateStr !== purchaseDate?.value) {\n setValue('purchaseDate', posChangedField(dateStr));\n }\n }\n }}\n locale={getLocaleFromLanguageOrCurrent()}\n />\n \n \n \n \n \n }\n >\n \n \n \n \n \n \n \n
    \n
    \n \n \n {!isCancelled && purchaseOrderId > 0 && actions.length > 0 && (\n \n
    \n \n }\n align=\"end\"\n >\n {actions}\n \n
    \n
    \n )}\n
    \n
    \n \n {!isDisabled && !isCancelled && vendorAccount?.value && (\n \n {\n const value = e.target.checked;\n if (!value) {\n setShowSecondaryVendorInputs(true);\n } else {\n setShowSecondaryVendorInputs(false);\n setValue('secondaryVendor', null);\n setValue('secondaryVendorAccount', null);\n }\n }}\n labelPosition=\"right\"\n label={\n \n }\n />\n \n )}\n {showSecondaryVendorInputs && (\n <>\n
    \n \n }\n >\n \n \n \n \n }\n >\n \n \n \n
    \n
    \n \n }\n >\n {\n setValue('transferId.hasChanged', true);\n },\n })}\n />\n \n \n \n
    \n \n \n
    \n \n )}\n \n \n \n )}\n {\n setActivePosEntity(id, vendorOrderId?.value, true);\n if (refreshData) {\n await refreshData(true);\n }\n if (refreshExpandedListItems) {\n await refreshCatalog();\n await refreshExpandedListItems();\n }\n cancelVoidDialog.closeDialog();\n }}\n onCancel={() => cancelVoidDialog.closeDialog()}\n />\n {\n setActivePosEntity(id, vendorOrderId?.value, true);\n\n // We need to call refreshData here because setActivePosEntity only update the context data for CatalogContext (listing/sales)\n // but for purchase, it has it's own data context so we have to manually call it here\n // and since the setActivePosEntity doesn't actually update the table data, no need to await it\n if (refreshData) {\n await refreshData(true);\n }\n if (refreshExpandedListItems) {\n await refreshCatalog();\n await refreshExpandedListItems();\n }\n restorePurchaseDialog.closeDialog();\n }}\n onCancel={() => restorePurchaseDialog.closeDialog()}\n />\n navigateUnsavedDialog.closeDialog()}\n />\n \n );\n};\n","import { ReactNode, useCallback } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Button, Stack } from 'src/core/ui';\nimport { UnsavedChanges } from 'src/dialogs/UnsavedChanges';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { PurchaseOrderDetails } from 'src/WebApiController';\n\nimport { CloseModalButton } from '../CloseModalButton';\nimport { WizardFooter } from './PurchaseModal.styled';\n\nexport type PurchaseWizardFooterProps = {\n className?: string;\n purchase?: PurchaseOrderDetails | null;\n hasChanges?: boolean;\n onPreviousLabel?: ContentId;\n onPrevious?: () => void;\n onNextLabel?: ContentId;\n onNext?: () => void;\n additionalActions?: ReactNode[];\n isSubmitting?: boolean;\n disabled?: boolean;\n};\n\nexport function PurchaseWizardFooter({\n className,\n hasChanges,\n onPreviousLabel,\n onPrevious,\n onNextLabel,\n onNext,\n additionalActions,\n isSubmitting,\n disabled,\n}: PurchaseWizardFooterProps) {\n const { launchDialog, closeDialog, dialogProps } = useBasicDialog();\n\n const onPreviousWrapper = () => {\n if (hasChanges && onPrevious) {\n launchDialog();\n } else {\n onPrevious?.();\n }\n };\n\n const goToCancelView = useCallback(() => {\n closeDialog();\n onPrevious?.();\n }, [closeDialog, onPrevious]);\n\n if (!onPrevious && !onNext) {\n return null;\n }\n\n if (disabled) {\n return (\n \n \n \n \n \n );\n }\n\n return (\n \n \n {additionalActions}\n {onNext && onNextLabel && (\n \n )}\n \n {onPrevious && onPreviousLabel && (\n \n \n \n )}\n\n \n \n );\n}\n","import { HubConnectionState } from '@microsoft/signalr';\nimport { ComponentProps, useCallback, useMemo, useRef, useState } from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { BulkEditStatus } from 'src/components/common/BulkActions/BulkEditStatus';\nimport {\n IPosEntity,\n useActivePosEntityContext,\n} from 'src/contexts/ActivePosEntityContext/ActivePosEntityContext';\nimport {\n BulkEditStage,\n useBulkEditHubContext,\n} from 'src/contexts/BulkEditHubContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { Radio, RadioGroup, Stack } from 'src/core/ui';\nimport { useBulkEditHub } from 'src/hooks/useBulkEditHub';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n ActionOutboxEntityType,\n BulkActionType,\n BulkEditPreviewWithDetails,\n BulkEditProgress,\n BulkEditStep,\n Feature,\n PurchaseOrderQuery,\n} from 'src/WebApiController';\n\nimport { BulkEditFooter } from '../common/BulkEditFooter';\n\nexport type BulkUpdateDeliveryOverrideDialogProps = ComponentProps<\n typeof RSModal\n> & {\n updateKey: string;\n onBulkUpdate: (\n updateSalesOfListings: boolean,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => void;\n entityType:\n | ActionOutboxEntityType.Listing\n | ActionOutboxEntityType.TicketGroup;\n skipTicketGroups?: boolean;\n purchaseOrderQuery?: PurchaseOrderQuery;\n disabled?: boolean;\n onSaveOverrideSettings?: () => Promise;\n onCancel: () => void;\n backfillDeliveryStrategyFeature:\n | Feature.BackfillDeliveryStrategyInventoryEvent\n | Feature.BackfillDeliveryStrategyPurchaseEvent\n | Feature.BackfillDeliveryStrategyVendorAccount;\n backfillDeliveryStrategyToSaleFeature:\n | Feature.BackfillDeliveryStrategyInventoryEventToSales\n | Feature.BackfillDeliveryStrategyPurchaseEventToSales\n | Feature.BackfillDeliveryStrategyVendorAccountToSales;\n};\n\nenum UpdateFulfillmentMode {\n UpdateExistingPurchasesAndListings = 'UpdateExistingPurchasesAndListings',\n UpdateExistingListings = 'UpdateExistingListings',\n UpdateNone = 'UpdateNone',\n}\n\nexport function BulkUpdateDeliveryOverrideDialog({\n updateKey,\n entityType,\n skipTicketGroups,\n purchaseOrderQuery,\n onBulkUpdate,\n onSaveOverrideSettings,\n onCancel,\n disabled,\n backfillDeliveryStrategyFeature,\n backfillDeliveryStrategyToSaleFeature,\n ...dialogProps\n}: BulkUpdateDeliveryOverrideDialogProps) {\n const [updateFulfillmentMode, setUpdateFulfillmentMode] =\n useState(UpdateFulfillmentMode.UpdateNone);\n const [updateSalesOfListings, setUpdateSalesOfListings] =\n useState(false);\n const { setProgress, setPreview, setMainDialogOpened } =\n useBulkEditHubContext();\n const [isLoading, setIsLoading] = useState(false);\n const { setActivePosEntity } = useActivePosEntityContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n\n const hasBackfillDeliveryStrategyFeature = useUserHasFeature(\n backfillDeliveryStrategyFeature\n );\n const hasBackfillDeliveryStrategyToSaleFeature = useUserHasFeature(\n backfillDeliveryStrategyToSaleFeature\n );\n\n const onClose = useCallback(\n async (\n newProgress?: BulkEditProgress,\n closeMainDialogForPopover?: boolean\n ) => {\n if (newProgress?.step === BulkEditStep.Done) {\n setIsRefreshing(true);\n setActivePosEntity?.(0);\n await refreshExpandedListItems();\n\n if (closeMainDialogForPopover) {\n setMainDialogOpened(false);\n } else {\n setProgress(undefined);\n setPreview(undefined);\n }\n setIsRefreshing(false);\n // progress kept to allow the BulkEditStatusPopover to show the result\n }\n onCancel?.();\n },\n [\n onCancel,\n refreshExpandedListItems,\n setActivePosEntity,\n setMainDialogOpened,\n setPreview,\n setProgress,\n ]\n );\n\n const onBulkEditDone = useCallback(\n async (doneProgress: BulkEditProgress, finalErrors: string[]) => {\n if (finalErrors.length === 0 && doneProgress.step === BulkEditStep.Done) {\n onClose(doneProgress, true);\n }\n },\n [onClose]\n );\n\n const { bulkEditHub, preview, initJob, stage } = useBulkEditHub(\n entityType,\n BulkActionType.BackfillDeliverySettings,\n updateKey,\n onBulkEditDone\n );\n\n const hasBackgroundBulkEditFeature = useMemo(\n () => bulkEditHub?.state === HubConnectionState.Connected,\n [bulkEditHub?.state]\n );\n\n const onBeforeSubmit = useCallback(() => {\n if (updateFulfillmentMode === UpdateFulfillmentMode.UpdateNone) {\n onSaveOverrideSettings?.();\n onCancel?.();\n return false; // don't proceed to preview\n }\n\n return true; // proceed to preview\n }, [onCancel, onSaveOverrideSettings, updateFulfillmentMode]);\n\n const onBulkEditSubmitHandler = useCallback(\n async (\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void\n ) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n onBulkUpdate(updateSalesOfListings, false, onPreviewReceived);\n } else {\n // If we're doing update, only save settings when confirmed\n await onSaveOverrideSettings?.();\n onBulkUpdate(\n updateSalesOfListings,\n hasBackgroundBulkEditFeature,\n undefined,\n preview\n );\n }\n setIsLoading(false);\n },\n [\n onBulkUpdate,\n updateSalesOfListings,\n onSaveOverrideSettings,\n hasBackgroundBulkEditFeature,\n preview,\n ]\n );\n\n const [isRefreshing, setIsRefreshing] = useState(false);\n\n const submitButtonRef = useRef(null);\n\n return (\n }\n size={stage === BulkEditStage.Preview ? 'xl' : 'md'}\n {...dialogProps}\n onOpened={() => {\n setUpdateFulfillmentMode(UpdateFulfillmentMode.UpdateNone);\n setUpdateSalesOfListings(false);\n initJob();\n }}\n onKeyUp={(e) => {\n if (submitButtonRef.current && e.key === 'Enter') {\n submitButtonRef.current.click();\n }\n }}\n onClosed={() => {\n if (updateFulfillmentMode !== UpdateFulfillmentMode.UpdateNone) {\n setMainDialogOpened(false);\n }\n // Call the outside one if there is one\n dialogProps.onClosed?.();\n }}\n footer={\n \n }\n onCancel={isLoading ? undefined : onCancel}\n >\n \n \n {skipTicketGroups ? (\n \n ) : (\n \n )}\n \n {hasBackfillDeliveryStrategyFeature && (\n {\n setUpdateFulfillmentMode(mode);\n if (mode === UpdateFulfillmentMode.UpdateNone) {\n setUpdateSalesOfListings(false);\n }\n }}\n updateFulfillmentMode={updateFulfillmentMode}\n skipTicketGroups={skipTicketGroups}\n disabled={disabled}\n />\n )}\n {hasBackfillDeliveryStrategyFeature &&\n hasBackfillDeliveryStrategyToSaleFeature && (\n {\n setUpdateSalesOfListings((prev) => !prev);\n }}\n disabled={\n isLoading ||\n updateFulfillmentMode === UpdateFulfillmentMode.UpdateNone\n }\n label={}\n />\n )}\n \n \n );\n}\n\nexport const BulkUpdateDeliveryOverrideDialogModeRadioGroup = ({\n onValueChange,\n updateFulfillmentMode,\n skipTicketGroups,\n disabled,\n}: {\n onValueChange?: ((value: UpdateFulfillmentMode) => void) | undefined;\n updateFulfillmentMode: UpdateFulfillmentMode;\n skipTicketGroups?: boolean;\n disabled?: boolean;\n}) => {\n return (\n {\n onValueChange?.(value as UpdateFulfillmentMode);\n }}\n value={updateFulfillmentMode}\n >\n \n {skipTicketGroups ? (\n \n \n \n }\n />\n ) : (\n \n \n \n }\n />\n )}\n \n {skipTicketGroups ? (\n \n ) : (\n \n )}\n \n }\n />\n \n \n );\n};\n","import { isEqual } from 'lodash-es';\nimport {\n ComponentProps,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport { FormProvider, useForm, useFormContext } from 'react-hook-form';\nimport { Modal as RSModal } from 'reactstrap';\nimport { CancelButton } from 'src/components/Buttons';\nimport { TicketTypePriorityInput } from 'src/components/common/TicketTypePriorityInput';\nimport { PURCHASE_BULK_BACKFILL_DELIVERY_SETTINGS_KEY } from 'src/components/Purchases/PurchaseActionDropdown';\nimport { DeliveryTypeSelector } from 'src/components/Selectors/DeliveryTypeSelector';\nimport { PurchasePaymentMethodSelector } from 'src/components/Selectors/PurchasePaymentMethodSelector';\nimport { SellerAccountEmployeeSelector } from 'src/components/Selectors/SellerAccountEmployeeSelector';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { getTextFieldState, PosTextField } from 'src/core/POS/PosTextField';\nimport { Button, Stack, Switch } from 'src/core/ui';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { FieldWrapper } from 'src/modals/common/Purchase';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { EmptyPurchaseQuery } from 'src/utils/eventQueryUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n BulkEditPreviewWithDetails,\n BulkEditPurchaseClient,\n DeliveryType,\n Feature,\n PurchaseClient,\n PurchaseOrderQuery,\n PurchaseOrderState,\n PurchaseVendorAccountDetails,\n} from 'src/WebApiController';\n\nimport { BulkUpdateDeliveryOverrideDialog } from '../BulkEdits/BulkUpdateDeliveryOverrideDialog';\nimport * as styles from './PurchaseVendorAccountDialog.css';\n\nexport const EmptyVendorAccountId = '00000000-0000-0000-0000-000000000000';\n\nconst EmptyVendorAccountDetails: PurchaseVendorAccountDetails = {\n vendorId: 0, // Need to fill in as a required field\n name: '',\n id: EmptyVendorAccountId,\n email: '',\n password: null,\n dftBuyerId: '',\n dftPayMethodId: null,\n isNoFulfill: null,\n delivType: null,\n tktTypeRules: null,\n};\n\nexport type PurchaseVendorAccountDialogProps = {\n vendorAccountId: string | null;\n vendorId: number;\n onSave: (data: PurchaseVendorAccountDetails) => void;\n} & ComponentProps;\n\nexport function PurchaseVendorAccountDialog({\n vendorAccountId,\n vendorId,\n ...rest\n}: PurchaseVendorAccountDialogProps) {\n const [isLoading, setIsLoading] = useState(false);\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const methods = useForm();\n\n const getVendorAccountDetails = useCallback(() => {\n if (vendorAccountId && vendorAccountId !== EmptyVendorAccountId) {\n setIsLoading(true);\n tryInvokeApi(\n async () => {\n const details = await new PurchaseClient(\n activeAccountWebClientConfig\n ).getVendorAccountDetails(vendorAccountId);\n\n if (details?.id === vendorAccountId) {\n methods.reset(details);\n } else {\n methods.reset({\n ...EmptyVendorAccountDetails,\n vendorId,\n });\n }\n\n methods.reset(details);\n },\n (error) => {\n showErrorDialog('PurchaseClient.getVendorAccountDetails', error, {\n trackErrorData: { vendorAccountId },\n });\n }\n ).finally(() => {\n setIsLoading(false);\n });\n } else {\n methods.reset({\n ...EmptyVendorAccountDetails,\n vendorId,\n });\n }\n }, [\n activeAccountWebClientConfig,\n methods,\n showErrorDialog,\n vendorAccountId,\n vendorId,\n ]);\n\n useEffect(() => {\n if (rest.isOpen) {\n getVendorAccountDetails();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [vendorAccountId, rest.isOpen]);\n\n return (\n \n \n \n );\n}\n\nexport const PurchaseVendorAccountDialogBody = ({\n isLoading,\n onSave,\n onClosed,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onOkay, // unused\n ...rest\n}: Omit & {\n isLoading: boolean;\n}) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const updateKey = PURCHASE_BULK_BACKFILL_DELIVERY_SETTINGS_KEY;\n\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const {\n register,\n setError,\n handleSubmit,\n formState,\n getValues,\n watch,\n setValue,\n } = useFormContext();\n const requiredMsg = useContent(ContentId.Required);\n\n const hasVendorAccountDeliveryStrategyFeature = useUserHasFeature(\n Feature.VendorAccountDeliveryStrategy\n );\n const hasAutoFulfillSettingFeature = useUserHasFeature(\n Feature.AutoFulfillSetting\n );\n\n const { id } = getValues();\n\n const nameError = formState.errors.name?.message;\n const emailError = formState.errors.email?.message;\n const paymentMethodError = formState.errors.dftPayMethodId?.message;\n const buyerUserIdError = formState.errors.dftBuyerId?.message;\n\n const vendorAccountName = watch('name');\n const encryptedEmailAddress = watch('email');\n const defaultPurchasePaymentMethodId = watch('dftPayMethodId');\n const defaultBuyerUserId = watch('dftBuyerId');\n const deliveryType = watch('delivType');\n const isNoFulfill = watch('isNoFulfill');\n const ticketTypeRules = watch('tktTypeRules');\n\n const [skipAutoFulfill, setSkipAutoFulfill] = useState(isNoFulfill == null);\n const [skipDeliveryOverride, setSkipDeliveryOverride] = useState(\n deliveryType == null\n );\n\n useEffect(() => {\n if (!isLoading) {\n setSkipAutoFulfill(isNoFulfill == null);\n setSkipDeliveryOverride(deliveryType == null);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isLoading]);\n\n const updateDialog = useBasicDialog();\n\n const {\n openDialog: openBulkUpdateDialog,\n closeDialog: closeBulkUpdateDialog,\n } = useDialog(\n DialogId.BulkBackfillDeliverySettings,\n BulkUpdateDeliveryOverrideDialog\n );\n\n const purchaseQuery = useMemo(() => {\n return {\n ...EmptyPurchaseQuery,\n purchaseOrderState: PurchaseOrderState.Active,\n purchaseVendorAccountIds: [id],\n } as PurchaseOrderQuery;\n }, [id]);\n\n const onBulkUpdate = useCallback(\n async (\n updateSalesOfListings: boolean,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => {\n if (onPreviewReceived) {\n await tryInvokeApi(\n async () => {\n const preview = await new BulkEditPurchaseClient(\n activeAccountWebClientConfig\n ).bulkBackfillDeliverySettingsPreview(\n purchaseQuery,\n updateSalesOfListings,\n true\n );\n\n onPreviewReceived(preview);\n },\n (error) => {\n showErrorDialog('bulkBackfillDeliverySettingsPreview', error, {\n trackErrorData: { purchaseQuery },\n });\n }\n );\n } else {\n await tryInvokeApi(\n async () => {\n const succeeded = await new BulkEditPurchaseClient(\n activeAccountWebClientConfig\n ).bulkBackfillDeliverySettings(\n preview!.preview,\n updateSalesOfListings,\n updateKey,\n supportBackgroundProcess\n );\n if (!supportBackgroundProcess) {\n closeBulkUpdateDialog();\n }\n },\n (error) => {\n showErrorDialog('bulkBackfillDeliverySettings', error, {\n trackErrorData: {\n preview,\n },\n });\n }\n );\n }\n },\n [\n activeAccountWebClientConfig,\n closeBulkUpdateDialog,\n purchaseQuery,\n showErrorDialog,\n updateKey,\n ]\n );\n\n const onSubmit = useCallback(() => {\n let hasErrors = false;\n if (!encryptedEmailAddress) {\n setError('email', { message: requiredMsg }, { shouldFocus: true });\n hasErrors = true;\n }\n if (!vendorAccountName) {\n setError('name', { message: requiredMsg }, { shouldFocus: true });\n hasErrors = true;\n }\n\n if (!hasErrors) {\n const autoFulfillRemovedOrNotChanged =\n skipAutoFulfill || isNoFulfill === formState.defaultValues?.isNoFulfill;\n const deliverySettingsRemovedOrNotChanged =\n skipDeliveryOverride ||\n (deliveryType === formState.defaultValues?.delivType &&\n isEqual(ticketTypeRules, formState.defaultValues?.tktTypeRules));\n\n if (\n id === EmptyVendorAccountId ||\n (autoFulfillRemovedOrNotChanged && deliverySettingsRemovedOrNotChanged)\n ) {\n handleSubmit(onSave)();\n } else {\n openBulkUpdateDialog({\n updateKey: updateKey,\n entityType: ActionOutboxEntityType.TicketGroup,\n ...updateDialog.dialogProps,\n onSaveOverrideSettings: handleSubmit(onSave),\n onBulkUpdate: onBulkUpdate,\n onCancel: () => {\n closeBulkUpdateDialog();\n },\n backfillDeliveryStrategyFeature:\n Feature.BackfillDeliveryStrategyVendorAccount,\n backfillDeliveryStrategyToSaleFeature:\n Feature.BackfillDeliveryStrategyVendorAccountToSales,\n });\n }\n }\n }, [\n closeBulkUpdateDialog,\n deliveryType,\n encryptedEmailAddress,\n formState.defaultValues?.delivType,\n formState.defaultValues?.isNoFulfill,\n formState.defaultValues?.tktTypeRules,\n handleSubmit,\n id,\n isNoFulfill,\n onBulkUpdate,\n onSave,\n openBulkUpdateDialog,\n requiredMsg,\n setError,\n skipAutoFulfill,\n skipDeliveryOverride,\n ticketTypeRules,\n updateDialog.dialogProps,\n updateKey,\n vendorAccountName,\n ]);\n\n return (\n \n }\n footer={\n <>\n {onClosed && (\n \n )}\n \n \n \n \n }\n onCancel={onClosed}\n >\n {isLoading ? (\n \n ) : (\n
    \n \n }\n >\n \n \n \n\n \n }\n >\n \n \n \n\n \n }\n >\n \n \n \n\n \n }\n >\n {\n if (userId) {\n setValue('dftBuyerId', userId);\n }\n }}\n />\n \n \n\n \n }\n >\n {\n if (paymentMethodId) {\n setValue('dftPayMethodId', Number(paymentMethodId));\n }\n }}\n />\n \n \n\n {hasVendorAccountDeliveryStrategyFeature && (\n \n
    \n \n
    \n

    \n \n

    \n\n {hasAutoFulfillSettingFeature && (\n <>\n }\n labelPosition=\"right\"\n onChange={(e) => {\n const skip = !e.target.checked;\n setSkipAutoFulfill(skip);\n if (skip) {\n setValue('isNoFulfill', null, {\n shouldDirty: true,\n });\n } else {\n // We want to default to false if the user enables the setting\n setValue('isNoFulfill', true, {\n shouldDirty: true,\n });\n }\n }}\n checked={!skipAutoFulfill}\n />\n {!skipAutoFulfill && (\n \n }\n >\n e.stopPropagation()}\n onCheckedChange={(isChecked) => {\n setValue('isNoFulfill', !isChecked);\n }}\n />\n \n \n )}\n \n )}\n\n }\n labelPosition=\"right\"\n onChange={(e) => {\n const skip = !e.target.checked;\n setSkipDeliveryOverride(skip);\n if (skip) {\n setValue('delivType', null, {\n shouldDirty: true,\n });\n } else {\n setValue('delivType', DeliveryType.InApp, {\n shouldDirty: true,\n });\n }\n\n setValue('tktTypeRules', null, {\n shouldDirty: true,\n });\n }}\n checked={!skipDeliveryOverride}\n />\n {!skipDeliveryOverride && (\n <>\n \n }\n >\n {\n if (newD !== deliveryType) {\n setValue('delivType', newD);\n if (!newD) {\n setValue('tktTypeRules', null);\n }\n }\n }}\n />\n \n \n {deliveryType && (\n \n }\n >\n {\n setValue('tktTypeRules', newRules);\n }}\n disabled={formState.isSubmitting}\n />\n \n \n )}\n \n )}\n
    \n )}\n
    \n )}\n \n );\n};\n","import { useQuery } from '@tanstack/react-query';\nimport {\n createContext,\n Dispatch,\n ReactNode,\n SetStateAction,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport { usePurchaseVendorSelector } from 'src/components/Selectors/PurchaseVendorSelector/usePurchaseVendorSelector';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { EmptyVendorAccountId } from 'src/dialogs/PurchaseVendorAccountDialog';\nimport {\n AutoPoClient,\n AutoPoInboundEmail,\n AutoPoInboundEmailClassificationType,\n AutoPoPartialPurchaseOrder,\n PurchaseClient,\n PurchaseVendor,\n PurchaseVendorAccount,\n PurchaseVendorAccountDetails,\n} from 'src/WebApiController';\n\nexport type AutoPoVendorFields = {\n vendor: PurchaseVendor | null | undefined;\n vendorAccount: PurchaseVendorAccount | null | undefined;\n};\n\nexport type AutoPoPartialPurchaseOrderFields = AutoPoPartialPurchaseOrder &\n AutoPoVendorFields;\n\ntype PartialPurchaseOrderKey = {\n partialPurchaseOrderId?: number | null;\n toEmailAddress?: string | null;\n purchaseOrderVendorId?: number | null;\n};\n\ntype IEmailPurchaseOrderContext = {\n inboundEmailsClassified?: AutoPoInboundEmail[];\n isLoading?: boolean;\n isError?: boolean;\n\n inboundEmailId?: number;\n setInboundEmailId: (\n partialPurchaseOrderId: number | null | undefined\n ) => void;\n\n classificationType?: AutoPoInboundEmailClassificationType;\n setClassificationType: Dispatch<\n SetStateAction\n >;\n\n setOrderId: Dispatch>;\n\n partialPurchaseOrderKey?: PartialPurchaseOrderKey;\n setPartialPurchaseOrderKey: (\n key: PartialPurchaseOrderKey | undefined\n ) => void;\n\n partialPurchaseOrder?: AutoPoPartialPurchaseOrderFields;\n\n reset: () => void;\n};\n\nexport const EmailPurchaseOrderContext =\n createContext({\n setInboundEmailId: () => {},\n setClassificationType: () => {},\n setOrderId: () => {},\n setPartialPurchaseOrderKey: () => {},\n reset: () => {},\n });\n\nexport const EmailPurchaseOrderContextProvider = ({\n children,\n}: {\n children: ReactNode;\n}) => {\n const { availableVendors } = usePurchaseVendorSelector({});\n\n const [partialPurchaseOrderKey, setPartialPurchaseOrderKey] =\n useState();\n\n const [orderId, setOrderId] = useState();\n const [inboundEmailId, setInboundEmailId] = useState();\n const [classificationType, setClassificationType] =\n useState();\n\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n\n const [\n partialPurchaseOrderVendorFields,\n setPartialPurchaseOrderVendorFields,\n ] = useState();\n\n const getOrCreateVendorAccount = useCallback(\n async (\n toEmail: string | null | undefined,\n vendorId: number | null | undefined\n ): Promise => {\n if (vendorId == null || toEmail == null) {\n return;\n }\n\n const vendor = availableVendors[vendorId];\n if (vendor == null) {\n return;\n }\n\n let vendorAccountOverride: PurchaseVendorAccountDetails | undefined = (\n await new PurchaseClient(\n activeAccountWebClientConfig\n ).getAccessibleVendorAccounts(\n { item1: [vendorId], item2: [] },\n toEmail,\n 1,\n 0\n )\n )[0] as PurchaseVendorAccountDetails | undefined;\n\n if (vendorAccountOverride == null) {\n vendorAccountOverride = {\n id: EmptyVendorAccountId,\n name: 'autopo-' + toEmail,\n email: toEmail,\n password: null,\n vendorId: vendor.id,\n dftPayMethodId: null,\n dftBuyerId: null,\n isNoFulfill: null,\n delivType: null,\n tktTypeRules: null,\n };\n\n const newId = await new PurchaseClient(\n activeAccountWebClientConfig\n ).mergeVendorAccount(vendorAccountOverride);\n\n if (newId) {\n vendorAccountOverride.id = newId;\n } else {\n vendorAccountOverride = undefined;\n }\n }\n\n setPartialPurchaseOrderVendorFields(\n vendorAccountOverride\n ? {\n vendorAccount: vendorAccountOverride,\n vendor,\n }\n : undefined\n );\n },\n [activeAccountWebClientConfig, availableVendors]\n );\n\n const partialPurchaseOrderResult = useQuery({\n queryKey: [\n 'AutoPoClient.getPartialPurchaseOrder',\n activeAccountWebClientConfig.activeAccountId,\n partialPurchaseOrderKey,\n ],\n queryFn: async () => {\n if (activeAccountWebClientConfig.activeAccountId == null) {\n return null;\n }\n const partialPurchaseOrderId =\n partialPurchaseOrderKey?.partialPurchaseOrderId;\n const partialPurchaseOrderVendorFields = await getOrCreateVendorAccount(\n partialPurchaseOrderKey?.toEmailAddress,\n partialPurchaseOrderKey?.purchaseOrderVendorId\n );\n\n if (partialPurchaseOrderId == null) {\n if (partialPurchaseOrderVendorFields != null) {\n return {\n vendorAccount: partialPurchaseOrderVendorFields.vendorAccount,\n vendor: partialPurchaseOrderVendorFields.vendor,\n } as AutoPoPartialPurchaseOrderFields;\n }\n return null;\n }\n\n const partialPurchaseOrder = (await new AutoPoClient(\n activeAccountWebClientConfig\n ).getPartialPurchaseOrder(\n partialPurchaseOrderId\n )) as AutoPoPartialPurchaseOrderFields;\n\n if (partialPurchaseOrderVendorFields != null) {\n partialPurchaseOrder.vendorAccount =\n partialPurchaseOrderVendorFields.vendorAccount;\n partialPurchaseOrder.vendor = partialPurchaseOrderVendorFields.vendor;\n }\n return partialPurchaseOrder;\n },\n enabled: activeAccountWebClientConfig.activeAccountId != null,\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError('AutoPoClient.getPartialPurchaseOrder', error, {\n partialPurchaseOrderKey,\n });\n },\n },\n });\n\n useEffect(() => {\n getOrCreateVendorAccount(\n partialPurchaseOrderKey?.toEmailAddress,\n partialPurchaseOrderKey?.purchaseOrderVendorId\n );\n }, [getOrCreateVendorAccount, partialPurchaseOrderKey]);\n\n const partialPurchaseOrder: AutoPoPartialPurchaseOrderFields = useMemo(() => {\n const result =\n partialPurchaseOrderResult.data ??\n ({} as unknown as AutoPoPartialPurchaseOrderFields);\n\n if (orderId) {\n result.orderId = orderId;\n }\n if (partialPurchaseOrderVendorFields) {\n result.vendorAccount = partialPurchaseOrderVendorFields?.vendorAccount;\n result.vendor = partialPurchaseOrderVendorFields?.vendor;\n }\n\n return result;\n }, [\n orderId,\n partialPurchaseOrderResult.data,\n partialPurchaseOrderVendorFields,\n ]);\n\n return (\n {\n setInboundEmailId(inboundEmailId ?? undefined);\n },\n classificationType,\n setClassificationType,\n\n setOrderId,\n partialPurchaseOrderKey,\n setPartialPurchaseOrderKey: (key) => {\n setPartialPurchaseOrderVendorFields(undefined);\n setPartialPurchaseOrderKey(key);\n },\n\n partialPurchaseOrder,\n\n reset() {\n setPartialPurchaseOrderVendorFields(undefined);\n setPartialPurchaseOrderKey(undefined);\n setInboundEmailId(undefined);\n setClassificationType(undefined);\n setOrderId(undefined);\n },\n }}\n >\n {children}\n \n );\n};\n","import { useMeasure } from 'react-use';\n\n/**\n * The width that we want to scale the html emails relative to.\n */\nexport const HTML_EMAIL_MAX_WIDTH = 700;\n\nexport type EmailRendererProps = {\n htmlBody: string | null | undefined;\n textBody?: string | null | undefined;\n};\n\nexport function EmailRenderer({ htmlBody, textBody }: EmailRendererProps) {\n const [wrapperRef, { width: wrapperWidth }] = useMeasure();\n return (\n
    \n \n {htmlBody ? (\n
    \n ) : (\n
    {textBody}
    \n )}\n
    \n
    \n );\n}\n","import { useQuery } from '@tanstack/react-query';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SomethingWentWrong } from 'src/views';\nimport {\n ApiException,\n AutoPoClient,\n ValueTupleOfStringAndString,\n} from 'src/WebApiController';\n\nimport { EmailRenderer } from './EmailRenderer';\n\nexport const EmailBody = ({ inboundEmailId }: { inboundEmailId: number }) => {\n const { trackError } = useErrorBoundaryContext();\n\n const { activeAccountWebClientConfig } = useAppContext();\n const inboundEmailBodyResult = useQuery<\n ValueTupleOfStringAndString | null,\n ApiException\n >({\n queryKey: [\n 'AutoPoClient.getInboundEmailBody',\n activeAccountWebClientConfig.activeAccountId,\n inboundEmailId,\n ],\n queryFn: () => {\n if (activeAccountWebClientConfig.activeAccountId == null) {\n return null;\n }\n\n return new AutoPoClient(activeAccountWebClientConfig).getInboundEmailBody(\n inboundEmailId\n );\n },\n\n enabled: activeAccountWebClientConfig.activeAccountId != null,\n networkMode: 'offlineFirst',\n staleTime: Infinity,\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError('AutoPoClient.getInboundEmailBody', error, {\n inboundEmailId,\n });\n },\n },\n });\n\n if (inboundEmailBodyResult.isLoading) {\n if (inboundEmailBodyResult.isPaused) {\n return (\n }\n message={\n \n }\n />\n );\n } else {\n return ;\n }\n }\n\n if (!inboundEmailBodyResult.data) {\n return null;\n }\n return (\n \n );\n};\n","import { isEqual } from 'lodash-es';\nimport { useState } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport {\n ConfirmDialog,\n ConfirmDialogProps,\n} from 'src/core/interim/dialogs/ConfirmDialog';\nimport { Stack } from 'src/core/ui';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { UserSetting } from 'src/WebApiController';\n\nimport { contentWrapper } from './AlertWithSuppressionDialog.css';\n\nexport type AlertSuppressionSetting = {\n suspiciousPriceSuppressionTimestamp?: Date;\n manualPriceDisableAutoPricingTimestamp?: Date;\n manualPriceAdjustFloorOrCeilingTimestamp?: Date;\n deliveryInfoChangeSuppressionTimestamp?: Date;\n bulkUpdateTicketGroupSuppressionTimestamp?: Date;\n cancelTicketGroupSuppressionTimestamp?: Date;\n mergedGroupListingTimestamp?: Date;\n};\n\nexport type Alert = {\n bodyText: React.ReactNode;\n key: keyof AlertSuppressionSetting;\n onOkay?: () => void;\n onCancel?: () => void;\n};\n\nexport type AlertSuppressionSettingProps = Omit<\n ConfirmDialogProps,\n 'bodyText'\n> & {\n alerts?: Alert[];\n};\n\nexport type AlertDialogPropsWithTimestamp = {\n dialogProps: AlertSuppressionSettingProps;\n lastTimeStamp: Date | undefined;\n};\n\nexport const AlertWithSuppressionDialog = ({\n onOkay,\n onCancel,\n alerts,\n headerText,\n okText,\n cancelText,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n bodyText,\n ...props\n}: AlertSuppressionSettingProps) => {\n const { value, setUserSetting } =\n useServerUserSetting({\n id: UserSetting.SuspiciousPriceChange,\n });\n\n const [suppressWarning, setSuppressWarning] = useState<\n Record\n >({} as Record);\n return (\n \n {alerts?.map(({ key, bodyText }) => (\n \n {bodyText}\n {\n const s = e.target.checked;\n setSuppressWarning({ ...suppressWarning, [key]: s });\n }}\n labelPosition=\"right\"\n label={}\n />\n \n ))}\n \n }\n onOkay={() => {\n const newValue = { ...(value ?? {}) };\n alerts?.forEach((a) => {\n a.onOkay?.();\n newValue[a.key] = suppressWarning[a.key] ? new Date() : undefined;\n });\n\n if (!isEqual(newValue, value)) {\n setUserSetting(newValue);\n }\n\n onOkay?.();\n }}\n onCancel={() => {\n alerts?.forEach((a) => {\n a.onCancel?.();\n });\n onCancel?.();\n }}\n okText={okText ?? ContentId.OK}\n cancelText={cancelText ?? ContentId.Cancel}\n {...props}\n />\n );\n};\n","import { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport { UserSetting } from 'src/WebApiController';\n\nimport { AlertSuppressionSetting } from './AlertWithSuppressionDialog';\n\nexport function useAlertWithSuppressionDialog(\n key: keyof AlertSuppressionSetting,\n onOkay?: () => void,\n onCancel?: () => void\n) {\n const { value } = useServerUserSetting({\n id: UserSetting.SuspiciousPriceChange,\n });\n return {\n value,\n key,\n onOkay,\n onCancel,\n };\n}\n","import { Content } from 'src/contexts/ContentContext';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { useAlertWithSuppressionDialog } from './useAlertWithSuppressionDialog';\n\nexport function useCancelTicketGroupDialog(\n onOkay: () => void,\n onCancel: () => void\n) {\n const { value, ...rest } = useAlertWithSuppressionDialog(\n 'cancelTicketGroupSuppressionTimestamp',\n onOkay,\n onCancel\n );\n return {\n ...rest,\n lastTimeStamp: value?.cancelTicketGroupSuppressionTimestamp,\n bodyText: ,\n cancelText: ContentId.No,\n };\n}\n","import { Content } from 'src/contexts/ContentContext';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { useAlertWithSuppressionDialog } from './useAlertWithSuppressionDialog';\n\nexport function useManualPriceDisableAutoPricingDialog(onOkay: () => void) {\n const { value, ...rest } = useAlertWithSuppressionDialog(\n 'manualPriceDisableAutoPricingTimestamp',\n onOkay,\n undefined\n );\n return {\n ...rest,\n lastTimeStamp: value?.manualPriceDisableAutoPricingTimestamp,\n bodyText: ,\n };\n}\n","import { Content } from 'src/contexts/ContentContext';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { useAlertWithSuppressionDialog } from './useAlertWithSuppressionDialog';\n\nexport function useSuspiciousPriceChangeDialog(\n onOkay: () => void,\n onCancel: () => void\n) {\n const { value, ...rest } = useAlertWithSuppressionDialog(\n 'suspiciousPriceSuppressionTimestamp',\n onOkay,\n onCancel\n );\n return {\n ...rest,\n lastTimeStamp: value?.suspiciousPriceSuppressionTimestamp,\n bodyText: ,\n };\n}\n","import { ComponentProps, useState } from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { Button, Radio, RadioGroup, Stack, TextArea } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport * as styles from './InternationalComplianceDialog.css';\n\ntype WorksFor = 'viagogo' | 'eventOrganizer';\n\n/**\n * Do NOT change this object without consulting with the backend. This type is stored in the db as\n * a user setting.\n */\nexport type InternationalComplianceSetting = {\n /**\n * Timestamp of when user last submitted with \"Use this answer for the next 24 hours\".\n */\n doNotAskAgainTimestamp: Date | null;\n ticketRestrictions: string | null;\n worksFor: WorksFor | null;\n isSpeculativeListing: boolean | null;\n};\n\ntype InternationalComplianceDialogProps = Omit<\n ComponentProps,\n 'onSubmit'\n> & {\n onSubmit: (result: InternationalComplianceSetting) => void;\n};\n\nexport function InternationalComplianceDialog({\n onSubmit,\n ...dialogProps\n}: InternationalComplianceDialogProps) {\n const [reuseAnswer, setSaveAnswer] = useState(false);\n const [restrictions, setRestrictions] = useState(null);\n const [worksFor, setWorksFor] = useState(null);\n const [isSpeculativeListing, setIsSpeculativeListing] = useState<\n boolean | null\n >(null);\n const [isSecondStep, setIsSecondStep] = useState(false);\n return (\n }\n footer={\n !isSecondStep ? (\n <>\n {\n setIsSecondStep(true);\n }}\n >\n \n \n {\n onSubmit({\n doNotAskAgainTimestamp: reuseAnswer ? new Date() : null,\n ticketRestrictions: null,\n worksFor: null,\n isSpeculativeListing: null,\n });\n }}\n >\n \n \n \n ) : (\n {\n onSubmit({\n doNotAskAgainTimestamp: reuseAnswer ? new Date() : null,\n ticketRestrictions: restrictions,\n worksFor,\n isSpeculativeListing,\n });\n }}\n >\n \n \n )\n }\n includeCloseButton={false}\n {...dialogProps}\n >\n \n
    \n
    \n \n
    \n {isSecondStep && (\n \n {\n setRestrictions(e.target.value);\n }}\n >\n \n )}\n
    \n\n
    \n
    \n \n
    \n {isSecondStep && (\n {\n setWorksFor(value as WorksFor);\n }}\n value={worksFor ?? undefined}\n >\n \n }\n />\n }\n />\n \n \n )}\n
    \n
    \n
    \n {' '}\n \n
    \n {isSecondStep && (\n {\n setIsSpeculativeListing(value === 'yes');\n }}\n value={\n isSpeculativeListing === true\n ? 'yes'\n : isSpeculativeListing === false\n ? 'no'\n : undefined\n }\n >\n \n } />\n } />\n \n \n )}\n
    \n }\n onChange={(e) => {\n setSaveAnswer(e.target.checked);\n }}\n />\n
    \n \n );\n}\n","import { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport { UserSetting } from 'src/WebApiController';\n\nimport { InternationalComplianceSetting } from './InternationalComplianceDialog';\n\nexport function useInternationalComplianceDialog(\n onSubmit: (result: InternationalComplianceSetting) => void\n) {\n const { value, setUserSetting } =\n useServerUserSetting({\n id: UserSetting.InternationalCompliance,\n });\n return {\n value,\n onSubmit: (result: InternationalComplianceSetting) => {\n setUserSetting(result);\n onSubmit(result);\n },\n };\n}\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport const FieldLabelWrapper = styled.div`\n font-weight: 600;\n ${({\n theme: {\n media,\n typography: { getStyles },\n },\n }) => `\n ${getStyles('body1')}\n padding-left: 0;\n ${media.makeMediaQuery(\n media.breakpoints.md,\n `padding-left: 0px;` // reset padding for tablets and above\n )}\n`}\n`;\n\nexport const FromToLabel = styled.div`\n color: ${(props) => props.theme.colors.textPrimary};\n padding-bottom: ${() => vars.spacing.sm};\n text-transform: uppercase;\n`;\n\nexport const DividerIcon = styled.div`\n display: grid;\n place-content: center;\n border-radius: 50%;\n width: ${() => vars.spacing.xl};\n height: ${() => vars.spacing.xl};\n color: ${(props) => props.theme.colors.textBrand};\n border: 1px solid ${(props) => props.theme.colors.borderPrimary};\n background: ${(props) => props.theme.colors.backgroundPrimary};\n`;\n\nexport const DividerContainer = styled.div`\n display: flex;\n align-items: center;\n place-content: center;\n position: relative;\n min-height: 53px;\n margin-top: ${() => `-${vars.spacing.xxs}`};\n margin-bottom: ${() => `-${vars.spacing.xxs}`};\n`;\n","import { ComponentProps, useEffect, useMemo, useState } from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { CancelButton } from 'src/components/Buttons';\nimport { OkButton } from 'src/components/Buttons/OkButton';\nimport { usePurchaseVendorAccountSelector } from 'src/components/Selectors/PurchaseVendorAccountSelector/usePurchaseVendorAccountSelector';\nimport { usePurchaseVendorSelector } from 'src/components/Selectors/PurchaseVendorSelector/usePurchaseVendorSelector';\nimport { Content } from 'src/contexts/ContentContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { PosSelect } from 'src/core/POS/PosSelect';\nimport { vars } from 'src/core/themes';\nimport { DividerLine } from 'src/core/ui';\nimport { FieldWrapper } from 'src/modals/common/Purchase';\nimport { ChevronDownIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { PurchaseVendor, PurchaseVendorAccount } from 'src/WebApiController';\n\nimport * as styles from './SecondaryVendorAccountDialog.css';\nimport {\n DividerContainer,\n DividerIcon,\n FieldLabelWrapper,\n FromToLabel,\n} from './SecondaryVendorAccountDialog.styled';\n\nexport type SecondaryVendorAccountDialogProps = ComponentProps<\n typeof RSModal\n> & {\n vendorAccountFrom: PurchaseVendorAccount | null;\n vendorAccountTo: PurchaseVendorAccount | null;\n onSave: (\n alternativeVendor: PurchaseVendor | null | undefined,\n alternativeVendorAccount: PurchaseVendorAccount | null | undefined\n ) => void;\n onCancel: () => void;\n};\n\nexport function SecondaryVendorAccountDialog({\n ...rest\n}: SecondaryVendorAccountDialogProps) {\n return ;\n}\n\nconst SecondaryVendorAccountDialogBody = ({\n vendorAccountFrom,\n vendorAccountTo,\n onSave,\n onCancel,\n ...rest\n}: SecondaryVendorAccountDialogProps) => {\n const {\n query: queryVendor,\n availableVendors,\n posSelectProps: hookVendorPosSelectProps,\n } = usePurchaseVendorSelector({});\n const currentVendor = useMemo(() => {\n const vendorId = (vendorAccountTo ?? vendorAccountFrom)?.vendorId;\n return vendorId == null ? null : availableVendors[vendorId];\n }, [availableVendors, vendorAccountTo, vendorAccountFrom]);\n\n const [localVendorAccountTo, setLocalVendorAccountTo] = useState<\n PurchaseVendorAccount | null | undefined\n >(vendorAccountTo || vendorAccountFrom);\n const [localVendorTo, setLocalVendorTo] = useState<\n PurchaseVendor | null | undefined\n >(currentVendor);\n\n const { posSelectProps: hookVendorAccountFromFilterSelectorProps } =\n usePurchaseVendorAccountSelector({\n vendorId: vendorAccountFrom?.vendorId,\n });\n\n const {\n query: queryVendorAccount,\n sortedVendorAccounts,\n posSelectProps: hookVendorAccountToPosSelectProps,\n } = usePurchaseVendorAccountSelector({\n vendorId: localVendorTo?.id,\n });\n\n useEffect(() => {\n // If we don't have a selected account, auto-select the first one in the list\n if (localVendorTo) {\n return;\n }\n if (queryVendor.data) {\n const vendors = queryVendor.data;\n if (vendors?.length) {\n setLocalVendorTo(vendors[0]);\n return;\n }\n }\n setLocalVendorTo(null);\n }, [queryVendor, localVendorTo]);\n\n useEffect(() => {\n if (localVendorAccountTo) {\n return;\n }\n if (queryVendorAccount.data) {\n if (sortedVendorAccounts?.length) {\n setLocalVendorAccountTo(sortedVendorAccounts[0]);\n return;\n }\n }\n setLocalVendorAccountTo(null);\n }, [queryVendorAccount, localVendorAccountTo, sortedVendorAccounts]);\n\n return (\n }\n footer={\n <>\n {vendorAccountTo && (\n {\n onSave(null, null);\n }}\n />\n )}\n {}\n {\n onSave(localVendorTo, localVendorAccountTo);\n }}\n />\n \n }\n onCancel={onCancel}\n >\n
    \n \n \n \n \n \n \n \n {}}\n style={{ width: '100%' }}\n />\n \n \n \n \n \n {}}\n style={{ width: '100%' }}\n />\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {\n if (val) {\n const value = parseInt(val);\n const vendor = queryVendor.data!.find((v) => v.id === value);\n setLocalVendorTo(vendor);\n setLocalVendorAccountTo(null);\n }\n }}\n style={{ width: '100%' }}\n />\n \n \n \n \n \n {\n if (val && localVendorAccountTo) {\n const vendorAccount = sortedVendorAccounts!.find(\n (v) => v.id === val\n );\n setLocalVendorAccountTo(vendorAccount);\n }\n }}\n style={{ width: '100%' }}\n />\n \n
    \n \n );\n};\n","import React, {\n createContext,\n DragEvent,\n ReactNode,\n useContext,\n useState,\n} from 'react';\nimport { DnDFileUploaderExternalContext } from 'src/core/POS/DnDFileUploader/DnDFileUploader';\n\ntype DndFileUploaderContext = DnDFileUploaderExternalContext & {\n setDndFileUploaderContext: (state: DnDFileUploaderExternalContext) => void;\n};\n\nconst defaultDndFileUploaderContext: DndFileUploaderContext = {\n isDragging: false,\n handleDrag: (e: DragEvent) => undefined,\n handleDrop: (e: DragEvent) => undefined,\n selectFiles: () => undefined,\n setDndFileUploaderContext: (context: DnDFileUploaderExternalContext) =>\n undefined,\n};\n\nexport const DndFileUploaderContext = createContext(\n defaultDndFileUploaderContext\n);\n\nexport const useDndFilerUploaderContext = () =>\n useContext(DndFileUploaderContext);\n\nexport const DndFilerUploaderContextProvider = ({\n children,\n}: {\n children: ReactNode;\n}) => {\n const [dnDFileUploaderContext, setDnDFileUploaderContext] =\n useState(defaultDndFileUploaderContext);\n\n return (\n \n {children}\n \n );\n};\n","import { clsx } from 'clsx';\nimport React, { ReactNode } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useDndFilerUploaderContext } from 'src/core/POS/DnDFileUploader/DndFileUploaderContext';\nimport { Stack } from 'src/core/ui';\nimport { IconsFill, UploadIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport * as styles from './DndGlobalFileDrop.css';\n\ninterface DndGlobalFileDropProps {\n children: ReactNode;\n className?: string;\n}\n\nexport const DndGlobalFileDrop = ({\n children,\n className,\n}: DndGlobalFileDropProps) => {\n const { isDragging, handleDrag, handleDrop } = useDndFilerUploaderContext();\n\n return (\n \n {isDragging && (\n
    \n
    \n \n \n \n \n \n \n
    \n
    \n )}\n {children}\n \n );\n};\n","import { Content } from 'src/contexts/ContentContext';\nimport { ContentId } from 'src/utils/constants/contentId';\n\ninterface PurchaseTicketFlowTitleProps {\n showSearch: boolean;\n isSingleInputModeForMultiEvent: boolean;\n currentGroupIndex: number;\n currentGroupTicketsCount: number;\n}\n\nexport const PurchaseTicketFlowTitle = ({\n currentGroupTicketsCount,\n currentGroupIndex,\n isSingleInputModeForMultiEvent,\n showSearch,\n}: PurchaseTicketFlowTitleProps) => {\n if (showSearch) {\n return ;\n }\n\n if (!showSearch && !isSingleInputModeForMultiEvent) {\n return (\n <>\n {`${currentGroupIndex + 1}`}\n \n );\n }\n\n if (!showSearch && isSingleInputModeForMultiEvent) {\n const eventStrId =\n currentGroupTicketsCount == 1 ? ContentId.Event : ContentId.Events;\n\n return (\n <>\n {currentGroupTicketsCount} \n \n );\n }\n\n return '';\n};\n","import { Content } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getEventDateDisplayStrings } from 'src/utils/dateTimeUtils';\nimport { getFormattedEventName } from 'src/utils/eventWithDataUtils';\nimport { TicketGroupInput } from 'src/WebApiController';\n\nimport * as styles from './PurchaseTicketGroupPage.css';\n\nexport const PurchaseTicketGroupHeader = ({\n ticketGroups,\n isSingleInputModeForMultiEvent,\n currentGroupIndex,\n currentGroupTicketsCount,\n}: {\n ticketGroups: TicketGroupInput[];\n isSingleInputModeForMultiEvent?: boolean;\n currentGroupIndex: number;\n currentGroupTicketsCount: number;\n}) => {\n const { event, performer, venue } = ticketGroups[0];\n\n const [eventName] = getFormattedEventName({\n event,\n performer,\n venue,\n slimMode: false,\n });\n\n const { name, descr } = venue || {};\n\n const { formattedEventDate, formattedEventSubDate } =\n getEventDateDisplayStrings(event?.dates.start || '', {\n dateFormat: 'MMM d, y',\n });\n\n return (\n
    \n {isSingleInputModeForMultiEvent ? (\n
    \n {`${currentGroupIndex + 1}`}\n
    \n ) : (\n
    {eventName}
    \n )}\n
    \n {formattedEventDate && (\n
    \n <>\n \n {formattedEventDate} \n \n \n {formattedEventSubDate}\n \n \n
    \n )}\n
    \n {venue && (\n <>\n \n {name}\n \n \n  {'-'} \n {descr}\n \n \n )}\n
    \n
    \n
    \n );\n};\n","import { useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport { PurchaseTicketsInput } from 'src/utils/purchaseUtils';\n\nimport * as styles from './PurchaseTicketGroupPage.css';\nexport const PurchaseTicketGroupPageAdditionalInput = () => {\n const { setValue, getValues } = useFormContext();\n const ticketGroups = getValues('ticketGroups');\n const [isChecked, setIsChecked] = useState(\n ticketGroups?.every((tg) => !tg.taxPaid || tg.taxPaid?.value === 0)\n );\n\n return (\n
    \n }\n checked={isChecked}\n onChange={(e) => {\n const isChecked = e.target.checked;\n\n ticketGroups.forEach((_, rowIndex) =>\n setValue(\n `ticketGroups.${rowIndex}.taxPaid`,\n posChangedField(isChecked ? 0 : 1)\n )\n );\n setIsChecked(isChecked);\n }}\n />\n
    \n );\n};\n","import { first, isEqual, orderBy } from 'lodash-es';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport { useKey, useList } from 'react-use';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { Feature, SectionInfo } from 'src/WebApiController';\n\n// Mirror section is defined closest angle but opposite direction\nconst getMirrorSection = (selected: SectionInfo, candidates: SectionInfo[]) => {\n return first(\n orderBy(\n candidates,\n (s) =>\n Math.abs((selected.directionalAngle ?? 0) + (s.directionalAngle ?? 0)),\n 'asc'\n )\n );\n};\n\n// Control + M to add mirrors to selected sections\nexport const useCtrlPlusM = (\n markedSectionIds: number[],\n onToggleMirrors?: (sections: SectionInfo[], exclude?: boolean) => void\n) => {\n const { venueMapInfo } = useEventMapContext();\n const hasVenueMapCtrlPlusMFeature = useUserHasFeature(\n Feature.VenueMapCtrlPlusM\n );\n\n const [prevMarkedIds, setPrevMarkedIds] = useState>(new Set());\n const [mirrors, mirrorsMutation] = useList();\n\n useEffect(() => {\n // Reset mirrors if marked sections changed not because of the mirrors\n if (!isEqual(prevMarkedIds, new Set(markedSectionIds))) {\n mirrorsMutation.reset();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [JSON.stringify(markedSectionIds)]);\n\n const zonedSections = useMemo(() => {\n return (venueMapInfo?.sections || []).reduce(\n (map, section) => {\n const id = section.rows.find((row) => !!row.tktClass)?.tktClass?.id;\n if (id) {\n (map[id] = map[id] || []).push(section);\n }\n return map;\n },\n {} as Record\n );\n }, [venueMapInfo?.sections]);\n\n const selectedSections = useMemo(\n () =>\n (venueMapInfo?.sections ?? []).filter(({ id }) =>\n markedSectionIds.includes(id)\n ),\n [markedSectionIds, venueMapInfo?.sections]\n );\n\n const onCtrlMClicked = useCallback(() => {\n if (!hasVenueMapCtrlPlusMFeature || !onToggleMirrors) {\n return;\n }\n // Toggle mirrors when mirrors are already marked\n if (\n mirrors.length > 0 &&\n mirrors.every((id) => markedSectionIds.includes(id))\n ) {\n const mirrorSections = (venueMapInfo?.sections ?? []).filter((s) =>\n mirrors.includes(s.id)\n );\n onToggleMirrors(mirrorSections, true);\n mirrorsMutation.reset();\n return;\n }\n\n const sectionIdsToAdd: Record = {};\n for (const selected of selectedSections) {\n if (!selected.directionalAngle) {\n continue;\n }\n const classId = selected.rows.find((row) => !!row.tktClass)?.tktClass?.id;\n if (classId && classId in zonedSections) {\n const sectionCandidates = (zonedSections[classId] || []).filter(\n ({ directionalAngle }) => directionalAngle\n );\n const mirror = getMirrorSection(selected, sectionCandidates);\n if (\n mirror &&\n !markedSectionIds.includes(mirror.id) &&\n !sectionIdsToAdd[mirror.id]\n ) {\n mirrorsMutation.push(mirror.id);\n sectionIdsToAdd[mirror.id] = mirror;\n }\n }\n }\n if (Object.keys(sectionIdsToAdd).length) {\n const idsToAdd = Array.from(Object.keys(sectionIdsToAdd));\n setPrevMarkedIds(new Set([...markedSectionIds, ...idsToAdd.map(Number)]));\n onToggleMirrors(Object.values(sectionIdsToAdd));\n } else {\n console.log('No mirrors found');\n }\n }, [\n hasVenueMapCtrlPlusMFeature,\n markedSectionIds,\n mirrors,\n mirrorsMutation,\n onToggleMirrors,\n selectedSections,\n venueMapInfo?.sections,\n zonedSections,\n ]);\n\n useKey(\n (event: KeyboardEvent) => event.ctrlKey && event.key === 'm',\n onCtrlMClicked,\n { event: 'keydown' }\n );\n};\n","import { isEmpty } from 'lodash-es';\nimport { vars } from 'src/core/themes';\nimport { SectionInfo } from 'src/WebApiController';\n\nconst colors = {\n defaultBackground: vars.color.backgroundPrimary,\n defaultForeground: vars.color.textPrimary,\n defaultHoverBackground: vars.color.backgroundPrimaryHover,\n defaultHoverForeground: vars.color.textPrimaryHover,\n selectedBackground: vars.color.backgroundHighlight,\n selectedForeground: vars.color.textBrand,\n selectedHoverBackground: vars.color.backgroundHighlightHover,\n selectedHoverForeground: vars.color.textBrandHover,\n};\n\nexport type GetColor = (info: {\n sectionId: number;\n rowId?: number;\n sectionName?: string;\n ticketClassId: number;\n isSelected: boolean;\n useRowColor?: boolean;\n isMarked?: boolean;\n}) => {\n fill: string;\n stroke: string;\n textColor?: string;\n strokeWidth?: string;\n} | void;\n\n// We need both section and ticket class id to uniquely identify a section sprite in svg file\nconst toSectionKey = (sectionId: string | null, ticketClassId: string | null) =>\n `s${sectionId || ''}-t${ticketClassId || ''}`;\n\n// Get section id from the element, traverse up the parent elements if not found\nexport const getSectionId = (element: SVGElement): string | null => {\n if (!element?.tagName) {\n return null;\n }\n if (element.parentElement && element.tagName !== 'g') {\n return getSectionId(element.parentElement as unknown as SVGElement);\n }\n return (\n element.getAttribute('sectionId') ??\n element.getAttribute('sectionid') ??\n element.getAttribute('section-id')\n );\n};\n\n// Get ticket class id from the element, traverse up the parent elements if not found\nexport const getTicketClassId = (element: SVGElement): string | null => {\n if (!element?.tagName) {\n return null;\n }\n if (element.parentElement && element.tagName !== 'g') {\n return getTicketClassId(element.parentElement as unknown as SVGElement);\n }\n return (\n element.getAttribute('ticketClassId') ??\n element.getAttribute('ticketclassid') ??\n element.getAttribute('ticket-class-id')\n );\n};\n\nexport const resetSectionRowColors = (\n sectionGroups: SVGElement[],\n availableSections: SectionInfo[],\n selectedSections?: SectionInfo[],\n markedSectionIds?: number[],\n sectionIdsMissingRowOrder?: number[],\n getColor?: GetColor,\n isHeatMap?: boolean,\n showDefaultMapColors?: boolean\n) => {\n for (const sectionGroup of sectionGroups) {\n // Set row level score color\n const sectionRows = [\n ...sectionGroup.querySelectorAll('g[id=\"row\"] path'),\n ] as HTMLElement[];\n if (!isEmpty(sectionRows)) {\n sectionRows.forEach((path) => {\n const rowId = parseInt(path.getAttribute('eid') ?? '0');\n\n const { fill, stroke } = getColor?.({\n sectionId: -1,\n rowId,\n ticketClassId: -1,\n isSelected: false,\n useRowColor: true,\n }) ?? { fill: '', stroke: '' };\n\n path.setAttribute('fill', fill);\n path.setAttribute('stroke', stroke);\n });\n return;\n }\n\n // Set section level color if don't support row map\n const sectionId = parseInt(getSectionId(sectionGroup) ?? '0');\n const ticketClassId = parseInt(getTicketClassId(sectionGroup) ?? '0');\n\n const selectedSection = selectedSections?.find((x) => x.id === sectionId);\n const isMarked = markedSectionIds?.some((id) => id === sectionId);\n\n const knownSection = availableSections.find((x) => x.id === sectionId);\n const knownRow =\n knownSection?.rows?.find((r) => r.tktClass?.id === ticketClassId) ??\n knownSection?.specRow;\n\n const { fill, stroke, textColor, strokeWidth } = getColor?.({\n sectionId,\n rowId: knownRow?.id,\n sectionName: knownSection?.name,\n ticketClassId,\n isSelected: !!selectedSection,\n isMarked,\n }) ?? { fill: '', stroke: '' };\n\n const sectionLabel = sectionGroup.querySelector(\n 'text[t=\"s\"]'\n ) as SVGElement;\n if (selectedSection) {\n sectionLabel?.setAttribute('fill', vars.color.textBrand);\n } else if (textColor) {\n sectionLabel?.setAttribute('fill', textColor);\n } else {\n sectionLabel?.setAttribute('fill', 'black');\n }\n\n const sectionPath = sectionGroup.querySelector('path[t=\"s\"]') as SVGElement;\n if (sectionPath === null) {\n continue;\n }\n\n if (fill && stroke) {\n sectionPath.setAttribute('fill', fill);\n sectionPath.setAttribute('stroke', stroke);\n } else {\n if (selectedSection) {\n sectionPath.setAttribute('fill', colors.selectedBackground);\n sectionPath.setAttribute('fill-opacity', '1');\n sectionPath.setAttribute('stroke', colors.selectedForeground);\n } else {\n if (knownSection) {\n sectionPath.setAttribute(\n 'fill',\n showDefaultMapColors\n ? knownRow?.tktClass?.color ?? colors.defaultBackground\n : colors.defaultBackground\n );\n sectionPath.setAttribute('fill-opacity', '1');\n sectionPath.setAttribute('stroke', colors.defaultForeground);\n } else {\n sectionPath.setAttribute('fill', colors.defaultBackground);\n sectionPath.setAttribute('fill-opacity', '1');\n sectionPath.setAttribute('stroke', colors.defaultForeground);\n }\n }\n }\n\n if (selectedSection) {\n sectionPath.setAttribute('stroke', vars.color.textBrand);\n sectionPath.setAttribute('stroke-width', strokeWidth ?? '10px');\n } else if (isMarked) {\n sectionPath.setAttribute('stroke', vars.color.textBrand);\n sectionPath.setAttribute('stroke-width', strokeWidth ?? '6px');\n } else {\n sectionPath.setAttribute('stroke-width', strokeWidth ?? '2px');\n }\n\n const missingRowOrder = sectionIdsMissingRowOrder?.includes(sectionId);\n if (missingRowOrder && isHeatMap) {\n sectionPath?.setAttribute('stroke', vars.color.borderWarning);\n sectionPath?.setAttribute('stroke-width', '4px');\n }\n }\n};\n\n/**\n * Rework the SVG groups to limit the group number by grouping elements by section.\n * In each of the section group we want to ensure the row paths are at the bottom for\n * only displaying the row colors.\n *\n * We rebuild the group so that row paths comes first and then the section path and label.\n * This way section label will be on top of the section path, and row paths will be at the bottom.\n *\n * We will also only build the section level groups if the useRowMap is false.\n *\n * This will significantly reduce the number of groups in the SVG and improve the performance.\n *\n * @param svg the svg file\n * @returns reordered svg file\n */\nconst reworkGroups = (\n svg: SVGSVGElement,\n sectionIdsMissingRowOrder: number[],\n isHeatMap = false,\n useRowMap = false\n) => {\n const rowPaths = svg.getElementById('rowpaths') as SVGElement;\n const sectionPaths = svg.getElementById('sectionpaths') as SVGElement;\n const sectionLables = svg.getElementById('sectionlabels') as SVGElement;\n const ticketClassPaths = svg.getElementById('ticketclasspaths') as SVGElement;\n const ticketClassLables = svg.getElementById(\n 'ticketclasslabels'\n ) as SVGElement;\n const rowLablePaths = svg.getElementById('rowlabels') as SVGElement;\n\n // Required paths groups for V3 VenueMap SVG\n if ((useRowMap && !rowPaths) || !sectionPaths || !sectionLables) {\n return [];\n }\n\n // Map from section id to row paths\n const sectionToRows = (\n [...rowPaths.querySelectorAll('g')] as SVGElement[]\n ).reduce(\n (map, element) => {\n const sectionId = getSectionId(element);\n const ticketclassid = getTicketClassId(element);\n const sectionKey = toSectionKey(sectionId, ticketclassid);\n const rowPath = element.querySelector('path') as SVGElement;\n (map[sectionKey] = map[sectionKey] || ([] as HTMLElement[])).push(\n rowPath\n );\n return map;\n },\n {} as Record\n );\n\n // Map from section id to section label\n const sectionToLable = (\n [...sectionLables.querySelectorAll('g')] as SVGElement[]\n ).reduce(\n (map, element) => {\n const sectionId = getSectionId(element);\n const ticketclassid = getTicketClassId(element);\n const sectionKey = toSectionKey(sectionId, ticketclassid);\n const textElement = element.querySelector('text') as SVGElement;\n if (\n sectionIdsMissingRowOrder.includes(parseInt(sectionId ?? '0')) &&\n isHeatMap\n ) {\n if (\n textElement.textContent &&\n textElement.textContent.slice(-1) !== '!'\n ) {\n textElement.textContent = `${textElement.textContent}!`;\n }\n }\n map[sectionKey] = textElement;\n return map;\n },\n {} as Record\n );\n\n // Main logic to rework the section groups\n ([...sectionPaths.querySelectorAll('g')] as SVGElement[]).forEach(\n (section) => {\n const sectionId = getSectionId(section);\n const ticketClassId = getTicketClassId(section);\n const sectionKey = toSectionKey(sectionId, ticketClassId);\n // The original section path\n const sectionPath = section.querySelector('path') as SVGElement;\n if (!sectionPath || !sectionId) return;\n section.removeChild(sectionPath);\n\n const rowGroup = document.createElementNS(\n 'http://www.w3.org/2000/svg',\n 'g'\n );\n rowGroup.setAttribute('id', `row`);\n for (const row of sectionToRows[sectionKey] ?? []) {\n row.setAttribute('pointer-events', 'none');\n row.setAttribute('fill-opacity', '1');\n if (useRowMap) {\n rowGroup.appendChild(row);\n }\n }\n if (useRowMap) {\n section.appendChild(rowGroup);\n }\n section.appendChild(sectionPath);\n\n if (sectionToLable[sectionKey]) {\n section.appendChild(sectionToLable[sectionKey]);\n }\n }\n );\n\n // Clean up all other groups and leave only the section paths group\n const root = sectionPaths.parentElement as HTMLElement;\n rowPaths && root.removeChild(rowPaths);\n sectionLables && root.removeChild(sectionLables);\n ticketClassPaths && root.removeChild(ticketClassPaths);\n ticketClassLables && root.removeChild(ticketClassLables);\n rowLablePaths && root.removeChild(rowLablePaths);\n\n return [...sectionPaths.querySelectorAll('g')] as SVGElement[];\n};\n\nexport const initializeGroups = (\n svgElement: SVGSVGElement,\n availableSections: SectionInfo[],\n selectedSections?: SectionInfo[],\n markedSectionIds?: number[],\n getColor?: GetColor,\n showDefaultMapColors?: boolean,\n sectionIdsMissingRowOrder: number[] = [],\n isHeatMap = false,\n useRowMap = false\n) => {\n const sectionGroups = reworkGroups(\n svgElement,\n sectionIdsMissingRowOrder,\n isHeatMap,\n useRowMap\n );\n\n if (!sectionGroups) {\n return [] as SVGElement[];\n }\n if (useRowMap) {\n // Set row level score colors\n resetSectionRowColors(\n sectionGroups,\n availableSections,\n selectedSections,\n markedSectionIds,\n sectionIdsMissingRowOrder,\n getColor,\n isHeatMap,\n showDefaultMapColors\n );\n }\n return sectionGroups;\n};\n","import { debounce, isEmpty, uniqBy } from 'lodash-es';\nimport {\n ReactNode,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { vars } from 'src/core/themes';\nimport { FocalPointInfo, SectionInfo } from 'src/WebApiController';\nimport svgPanZoom from 'svg-pan-zoom';\n\nimport { addFocalPoint } from '../shared/utils/addFocalPoint';\nimport {\n crossesPoints,\n DrawingPoint,\n isMissiongSectionData,\n registerDrawLine,\n registerPanningListners,\n} from '../VenueMapContent.hooks';\nimport { StandardColorSpec } from './VenueMapV3Content';\nimport {\n GetColor,\n getSectionId,\n initializeGroups,\n resetSectionRowColors,\n} from './VenueMapV3Content.utils';\n\nconst clickEvents = ['click'];\n\nconst ZOOM_SCALE_SENSITIVITY = 0.2;\n\ntype SvgMapInitializerProps = {\n availableSections: SectionInfo[];\n selectedSections?: SectionInfo[];\n markedSectionIds?: number[];\n onSectionClicked?: (\n e: MouseEvent,\n selectedSection: SectionInfo,\n surroundingSections?: SectionInfo[]\n ) => void;\n onSectionHovered?: (hoveredSection: SectionInfo) => ReactNode;\n setSelectedSections?: (sections: SectionInfo[]) => void;\n isZoomEnabled: boolean;\n isPanEnabled?: boolean;\n showDefaultMapColors?: boolean;\n focalPoint?: FocalPointInfo | null;\n colors?: StandardColorSpec;\n getColor?: GetColor;\n isHeatMap?: boolean;\n useRowMap?: boolean;\n disableHoverEffect?: boolean;\n};\n\nexport const useSvgMap = ({\n availableSections,\n selectedSections,\n markedSectionIds,\n onSectionClicked,\n onSectionHovered,\n setSelectedSections,\n isZoomEnabled,\n isPanEnabled,\n focalPoint,\n getColor,\n showDefaultMapColors,\n isHeatMap = false,\n useRowMap = false,\n disableHoverEffect = false,\n}: SvgMapInitializerProps) => {\n const localRef = useRef();\n const isPanning = useRef(false);\n const onRemoveEventListenersRef = useRef<() => void>(() => void 0);\n const onDoulbeClickDoneRef = useRef<(points: DrawingPoint[]) => void>(\n () => void 0\n );\n\n const [hoveredContent, setHoverContent] = useState();\n const [zoomFlag, setZoomFlag] = useState(false);\n const [venueMapSvg, setVenueMapSvg] = useState();\n const [sectionGroups, setSectionGroups] = useState([]);\n\n const sectionIdsMissingRowOrder = useMemo(\n () => availableSections.filter(isMissiongSectionData).map(({ id }) => id),\n [availableSections]\n );\n\n useEffect(() => {\n if (!venueMapSvg) return;\n\n const deregisterDrawLine = registerDrawLine(\n localRef,\n onRemoveEventListenersRef,\n onDoulbeClickDoneRef\n );\n return () => {\n deregisterDrawLine();\n };\n }, [venueMapSvg]);\n\n const setSelectedHandler = useCallback(\n (e: Event) => {\n if (isPanning.current) {\n return;\n }\n const mouseEvent = e as MouseEvent;\n const target = e.target as SVGElement;\n\n const selectedSectionId = parseInt(getSectionId(target) ?? '0');\n const selectedSection = availableSections.find(\n (x) => x.id === selectedSectionId\n );\n\n selectedSection && onSectionClicked?.(mouseEvent, selectedSection);\n },\n [availableSections, onSectionClicked]\n );\n\n const mouseEnter = useCallback(\n ({ target }: MouseEvent) => {\n if (disableHoverEffect) return;\n const section = target as SVGElement;\n const sectionId = parseInt(getSectionId(section) ?? '0');\n\n const hoveredSection = availableSections.find((s) => s.id === sectionId);\n if (!hoveredSection) return;\n\n const hoveredContent = onSectionHovered?.(hoveredSection);\n setHoverContent(hoveredContent);\n const sectionPath = section.querySelector('path[t=\"s\"]') as SVGElement;\n sectionPath?.setAttribute('fill-opacity', '0.75');\n },\n [availableSections, disableHoverEffect, onSectionHovered]\n );\n\n const mouseLeave = useCallback(\n ({ target }: MouseEvent) => {\n if (disableHoverEffect) return;\n const section = target as SVGElement;\n const sectionPath = section.querySelector('path[t=\"s\"]') as SVGElement;\n\n // If there are row paths, set the section path to be transparent\n // otherwise set the section path to be opaque\n const sectionRows = [\n ...section.querySelectorAll('g[id=\"row\"] path'),\n ] as HTMLElement[];\n if (!isEmpty(sectionRows)) {\n sectionPath?.setAttribute('fill-opacity', '0');\n } else {\n sectionPath?.setAttribute('fill-opacity', '1');\n }\n },\n [disableHoverEffect]\n );\n\n const initializeSvg = useCallback(\n (svgElement: SVGSVGElement) => {\n addFocalPoint(svgElement, focalPoint);\n return svgPanZoom(svgElement, {\n zoomScaleSensitivity: ZOOM_SCALE_SENSITIVITY,\n zoomEnabled: isZoomEnabled,\n panEnabled: isPanEnabled,\n dblClickZoomEnabled: false,\n onZoom: () => setZoomFlag(true),\n onPan: () => setZoomFlag(true),\n });\n },\n [focalPoint, isPanEnabled, isZoomEnabled]\n );\n\n const onResize = useCallback(() => {\n if (localRef.current && venueMapSvg) {\n venueMapSvg.resize(); // update SVG cached size and controls positions\n venueMapSvg.fit();\n venueMapSvg.center();\n }\n }, [venueMapSvg]);\n\n useEffect(() => {\n if (!venueMapSvg) return;\n\n const debounceOnResize = debounce(onResize, 200);\n\n // add eventListeners\n const onAddingEventListeners = () => {\n sectionGroups.forEach((element) => {\n const sectionId = parseInt(getSectionId(element) ?? '0');\n const isSelected =\n selectedSections?.some(({ id }) => id === sectionId) ?? false;\n const isMarked = markedSectionIds?.some((id) => id === sectionId);\n\n const sectionPath = element.querySelector('path[t=\"s\"]') as SVGElement;\n const sectionLabel = element.querySelector('text[t=\"s\"]') as SVGElement;\n\n element.style.cursor = 'pointer';\n\n const sectionRows = [\n ...element.querySelectorAll('g[id=\"row\"] path'),\n ] as HTMLElement[];\n // If there are row paths, set the section path to be transparent\n // otherwise set the section path to be opaque\n if (!isEmpty(sectionRows)) {\n sectionPath?.setAttribute(\n 'fill',\n vars.color.backgroundHighlightHover\n );\n sectionPath?.setAttribute('fill-opacity', '0');\n } else {\n sectionPath?.setAttribute('fill-opacity', '1');\n }\n sectionPath?.setAttribute('stroke-width', '2px');\n sectionPath?.setAttribute('stroke', 'black');\n sectionLabel?.removeAttribute('fill');\n\n if (isSelected) {\n sectionPath?.setAttribute('stroke', vars.color.textBrand);\n sectionPath?.setAttribute('stroke-width', '6px');\n sectionLabel?.setAttribute('fill', vars.color.textBrand);\n } else if (isMarked) {\n sectionPath?.setAttribute('stroke', vars.color.textBrand);\n sectionPath?.setAttribute('stroke-width', '6px');\n }\n\n element.addEventListener('mouseenter', mouseEnter);\n element.addEventListener('mouseleave', mouseLeave);\n clickEvents.forEach((e) =>\n element.addEventListener(e, setSelectedHandler)\n );\n });\n\n window.addEventListener('resize', debounceOnResize);\n };\n\n // remove eventListeners\n const onRemoveEventListeners = () => {\n window.removeEventListener('resize', debounceOnResize);\n\n sectionGroups.forEach((element) => {\n element.removeEventListener('mouseenter', mouseEnter);\n element.removeEventListener('mouseleave', mouseLeave);\n clickEvents.forEach((e) =>\n element.removeEventListener(e, setSelectedHandler)\n );\n });\n };\n\n onRemoveEventListenersRef.current = onRemoveEventListeners;\n onDoulbeClickDoneRef.current = (points: DrawingPoint[]) => {\n onAddingEventListeners();\n const selectedIds = new Set();\n sectionGroups.forEach((element) => {\n if (crossesPoints(points, element.getBoundingClientRect())) {\n selectedIds.add(parseInt(getSectionId(element) ?? '-1'));\n }\n });\n const updatedSections = availableSections\n .filter(\n ({ id }) => selectedIds.has(id) || markedSectionIds?.includes(id)\n )\n .toSorted((a, b) => a.name?.localeCompare(b.name));\n\n if (!isEmpty(updatedSections)) {\n setSelectedSections?.(uniqBy(updatedSections, 'id'));\n }\n };\n\n const deregisterPanEvents = registerPanningListners(\n localRef.current,\n isPanning\n );\n\n onAddingEventListeners();\n\n return () => {\n onRemoveEventListeners();\n deregisterPanEvents();\n };\n }, [\n availableSections,\n markedSectionIds,\n mouseEnter,\n mouseLeave,\n onResize,\n sectionGroups,\n selectedSections,\n setSelectedHandler,\n setSelectedSections,\n venueMapSvg,\n ]);\n\n const onInitializeContent = useCallback(\n (element: HTMLDivElement | null) => {\n if (!element || !!venueMapSvg) return false;\n localRef.current = element;\n const svgElement = element.getElementsByTagName('svg')[0];\n\n // The initialize part will clean up the unused groups and set the row level colors\n const sectionGroups = initializeGroups(\n svgElement,\n availableSections,\n selectedSections,\n markedSectionIds,\n getColor,\n showDefaultMapColors,\n sectionIdsMissingRowOrder,\n isHeatMap,\n useRowMap\n );\n setSectionGroups(sectionGroups);\n\n // Initialize the SVG pan zoom with the cleaned up svgElement\n const svg = initializeSvg(svgElement);\n setVenueMapSvg(svg);\n return true;\n },\n [\n venueMapSvg,\n availableSections,\n selectedSections,\n markedSectionIds,\n getColor,\n showDefaultMapColors,\n sectionIdsMissingRowOrder,\n isHeatMap,\n useRowMap,\n initializeSvg,\n ]\n );\n\n // this is to refresh the row colors in regards to to selected sections changes\n useEffect(() => {\n if (localRef.current && venueMapSvg && !isEmpty(sectionGroups)) {\n resetSectionRowColors(\n sectionGroups,\n availableSections,\n selectedSections,\n markedSectionIds,\n sectionIdsMissingRowOrder,\n getColor,\n isHeatMap,\n showDefaultMapColors\n );\n }\n }, [\n availableSections,\n getColor,\n isHeatMap,\n markedSectionIds,\n sectionGroups,\n sectionIdsMissingRowOrder,\n selectedSections,\n showDefaultMapColors,\n venueMapSvg,\n ]);\n\n const onZoom = useCallback(\n (zoomIn = true) => {\n if (!venueMapSvg) return;\n zoomIn ? venueMapSvg.zoomIn() : venueMapSvg.zoomOut();\n setZoomFlag(true);\n },\n [venueMapSvg]\n );\n\n const onReset = useCallback(() => {\n if (!venueMapSvg) return;\n venueMapSvg.resize(); // update SVG cached size and controls positions\n venueMapSvg.fit();\n venueMapSvg.center();\n setZoomFlag(false);\n }, [venueMapSvg]);\n\n return {\n onInitializeContent,\n onZoom,\n onReset,\n zoomFlag,\n hoveredContent,\n };\n};\n","import React, { ReactNode, Ref, useEffect, useState } from 'react';\nimport { vars } from 'src/core/themes';\nimport { TooltipPopover } from 'src/core/ui';\nimport { mergeRefs } from 'src/core/utils';\nimport {\n IconsFill,\n InfoSolidIcon,\n MinusIcon,\n PlusIcon,\n ResetIcon,\n} from 'src/svgs/Viagogo';\nimport { FocalPointInfo, SectionInfo } from 'src/WebApiController';\n\nimport { ColorBand, ColorBandProps } from '../shared/components/ColorBand';\nimport {\n IconParent,\n StyledBorderDiv,\n StyledDiv,\n StyledHoverDiv,\n StyledIconParentVariant,\n StyledResetVariant,\n VenueMapContentContainer,\n} from '../VenueMap.styled';\nimport { VenueMapContentCondensed } from '../VenueMapContentCondensed';\nimport * as styles from './VenueMapV3.css';\nimport { useSvgMap } from './VenueMapV3Content.hook';\n\nenum SvgInitializationState {\n UNSET,\n INITIALIZING,\n INITIALIZED,\n}\n\nexport type StandardColorSpec = {\n defaultBackground: string;\n defaultForeground: string;\n defaultHoverBackground: string;\n defaultHoverForeground: string;\n selectedBackground: string;\n selectedForeground: string;\n selectedHoverBackground: string;\n selectedHoverForeground: string;\n};\n\nexport type VenueMapV3ContentProps = {\n selectedSections?: SectionInfo[];\n markedSectionIds?: number[];\n onSectionClicked?: (\n e: MouseEvent,\n selectedSection: SectionInfo,\n surroundingSections?: SectionInfo[]\n ) => void;\n onSectionHovered?: (hoveredSection: SectionInfo) => ReactNode;\n setSelectedSections?: (sections: SectionInfo[]) => void;\n staticInfoContent?: React.ReactNode;\n infoIconContent?: React.ReactNode;\n availableSections: SectionInfo[];\n svg: string | TrustedHTML;\n useRowMap?: boolean;\n isZoomEnabled: boolean;\n isPanEnabled?: boolean;\n isWhiteBackground?: boolean;\n isRelocatedStaticInfo?: boolean;\n svgMapUrl: string; // what to use this for?\n venueConfigId: number; // what to use this for?\n showDefaultMapColors?: boolean;\n colors?: StandardColorSpec;\n colorBandProps?: ColorBandProps;\n /* Callback to get color for a section/ticketClass pair to provide dynamic\n * colorization of sections in the map\n */\n focalPoint?: FocalPointInfo | null;\n getColor?: (info: {\n sectionId: number;\n rowId?: number;\n sectionName?: string;\n ticketClassId: number;\n isSelected: boolean;\n useRowColor?: boolean;\n }) => { fill: string; stroke: string; textColor?: string } | void;\n isHeatMap?: boolean;\n statsContent?: React.ReactNode;\n disableHoverEffect?: boolean;\n isCondensedView?: boolean;\n shouldRepaint?: boolean;\n mapActionContainerClassname?: string;\n};\n\nconst VenueMapV3Content = React.forwardRef(\n (\n {\n selectedSections,\n markedSectionIds,\n onSectionClicked,\n onSectionHovered,\n setSelectedSections,\n staticInfoContent,\n infoIconContent,\n statsContent,\n availableSections,\n svg,\n focalPoint,\n isZoomEnabled = true,\n isPanEnabled = true,\n isWhiteBackground = false,\n isRelocatedStaticInfo = false,\n showDefaultMapColors,\n colorBandProps,\n getColor,\n isHeatMap = false,\n useRowMap = false,\n disableHoverEffect = false,\n isCondensedView = false,\n shouldRepaint = false,\n mapActionContainerClassname,\n }: VenueMapV3ContentProps,\n ref: Ref\n ) => {\n const [blurMap, setBlurMap] = useState(true);\n const [svgState, setSvgState] = useState(\n SvgInitializationState.UNSET\n );\n const [svgNode, setSvgNode] = useState(null);\n\n const { onInitializeContent, hoveredContent, zoomFlag, onReset, onZoom } =\n useSvgMap({\n availableSections,\n selectedSections,\n markedSectionIds,\n onSectionClicked,\n onSectionHovered,\n setSelectedSections,\n focalPoint,\n isZoomEnabled,\n isPanEnabled,\n getColor,\n isHeatMap,\n showDefaultMapColors,\n useRowMap,\n disableHoverEffect,\n });\n\n useEffect(() => {\n if (availableSections.length) setBlurMap(false);\n }, [availableSections.length]);\n\n useEffect(() => {\n if (svgState === SvgInitializationState.UNSET && svgNode && svg) {\n svgNode.innerHTML = svg as string;\n setSvgState(SvgInitializationState.INITIALIZING);\n if (onInitializeContent(svgNode)) {\n setSvgState(SvgInitializationState.INITIALIZED);\n } else {\n setSvgState(SvgInitializationState.UNSET);\n }\n }\n }, [onInitializeContent, svg, svgNode, svgState]);\n\n useEffect(() => {\n if (!shouldRepaint) return;\n\n const timer = setTimeout(onReset, 50);\n return () => {\n clearTimeout(timer);\n };\n }, [onReset, shouldRepaint]);\n\n if (isCondensedView) {\n return (\n \n );\n }\n\n return (\n \n
    \n \n\n \n {isZoomEnabled && (\n <>\n {(Boolean(selectedSections?.length) || zoomFlag) && (\n
    \n \n \n \n
    \n )}\n \n \n onZoom(true)}>\n \n \n \n \n onZoom(false)}>\n \n \n \n \n \n )}\n {infoIconContent && (\n \n }\n >\n {infoIconContent}\n \n )}\n
    \n\n {!statsContent && staticInfoContent && (\n \n {staticInfoContent}\n
    \n )}\n {!statsContent && hoveredContent && (\n
    {hoveredContent}
    \n )}\n {statsContent}\n \n {colorBandProps && (\n
    \n \n
    \n )}\n
    \n );\n }\n);\n\nVenueMapV3Content.displayName = 'VenueMapV3Content';\nexport default VenueMapV3Content;\n","import { useQuery } from '@tanstack/react-query';\nimport { useRef } from 'react';\nimport { useEffectOnce } from 'react-use';\n\nimport { GeneralAdmissionMessage } from '../GeneralAdmissionMessage';\nimport { rawFetch } from '../shared/utils/rawFetch';\nimport VenueMapV3Content, { VenueMapV3ContentProps } from './VenueMapV3Content';\n\nconst domParser = new DOMParser();\n\nexport const VenueMapV3 = ({\n isGeneralAdmissionOnly,\n svgMapUrl,\n ...rest\n}: Omit & {\n isGeneralAdmissionOnly?: boolean;\n}) => {\n if (!svgMapUrl) {\n throw new Error('svgMapUrl not available');\n }\n\n const mapQuery = useQuery({\n queryKey: [svgMapUrl],\n queryFn: () =>\n rawFetch(svgMapUrl, {}).then((text: string) => {\n if (!text) {\n throw Error('Failed to get venue map : ' + svgMapUrl);\n }\n const s = domParser.parseFromString(text, 'image/svg+xml');\n\n const svgElement = s.children[0];\n svgElement.setAttribute(\n 'width',\n ref?.current?.clientWidth?.toString() ?? '0'\n );\n svgElement.setAttribute(\n 'height',\n ref?.current?.clientHeight?.toString() ?? '0'\n );\n const serializer = new XMLSerializer();\n return {\n svg: serializer.serializeToString(svgElement),\n };\n }),\n\n staleTime: Infinity,\n refetchOnWindowFocus: false,\n });\n\n const ref = useRef(null);\n\n // TODO: Remove this after SVGVenueMapV3 feature is GA'ed\n // This is just a debug log to tell the user that we are using the V3 map\n useEffectOnce(() => {\n console.log('Yes, you are using SVG V3 Map!');\n });\n\n const { svg } = mapQuery.data ?? {};\n\n if (isGeneralAdmissionOnly) {\n return ;\n }\n\n if (!svg) {\n return
    ;\n }\n\n return (\n \n );\n};\n","import { ComponentProps, ReactNode, useMemo } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport {\n VenueMapConfigPlaceholder,\n VenueMapUrl,\n VenueMapV3Url,\n VenueMapVersionPlaceholder,\n} from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Feature, SectionInfo } from 'src/WebApiController';\n\nimport { useCtrlPlusM } from './EventVenueMap.hooks';\nimport { ColorBandProps } from './shared/components/ColorBand';\nimport { VenueMapV3 } from './v3/VenueMapV3';\nimport { VenueMap } from './VenueMap';\nimport * as styles from './VenueMap.css';\n\nexport const EventVenueMap = ({\n selectedSectionIds,\n markedSectionIds,\n onSectionClicked,\n onSectionHovered,\n setSelectedSections,\n onToggleMirrors,\n staticInfoContent,\n infoIconContent,\n isZoomEnabled = true,\n isPanEnabled = true,\n showDefaultMapColors,\n colorBandProps,\n getColor,\n useRowMap = false,\n isHeatMap = false,\n isWhiteBackground = false,\n isRelocatedStaticInfo = false,\n allowDrawLine = true,\n isCondensedView = false,\n shouldRepaint = false,\n statsContent,\n disableHoverEffect = false,\n mapActionContainerClassname,\n}: {\n selectedSectionIds?: number[];\n markedSectionIds?: number[];\n onSectionClicked?: (\n e: MouseEvent,\n selectedSection: SectionInfo,\n surroundingSections?: SectionInfo[]\n ) => void;\n onSectionHovered?: (hoveredSection: SectionInfo) => ReactNode;\n setSelectedSections?: (sections: SectionInfo[]) => void;\n onToggleMirrors?: (sections: SectionInfo[], exclude?: boolean) => void;\n staticInfoContent?: React.ReactNode;\n infoIconContent?: React.ReactNode;\n isZoomEnabled?: boolean;\n isPanEnabled?: boolean;\n showDefaultMapColors?: boolean;\n colorBandProps?: ColorBandProps;\n /* Callback to get color for a section/ticketClass pair to provide dynamic\n * colorization of sections in the map\n */\n getColor?: ComponentProps['getColor'];\n useRowMap?: boolean;\n isHeatMap?: boolean;\n isWhiteBackground?: boolean;\n isRelocatedStaticInfo?: boolean;\n allowDrawLine?: boolean;\n isCondensedView?: boolean;\n shouldRepaint?: boolean;\n statsContent?: React.ReactNode;\n disableHoverEffect?: boolean;\n mapActionContainerClassname?: string;\n}) => {\n const { venueMapInfo, isMapLoading, isGeneralAdmissionOnly } =\n useEventMapContext();\n\n const hasSVGVenueMapV3Feature = useUserHasFeature(Feature.SVGVenueMapV3);\n\n useCtrlPlusM(markedSectionIds ?? selectedSectionIds ?? [], onToggleMirrors);\n\n const selectedSectionData = useMemo(() => {\n if (!venueMapInfo || !selectedSectionIds?.length) {\n return undefined;\n }\n\n return venueMapInfo.sections?.filter((s: SectionInfo) =>\n selectedSectionIds.includes(s.id)\n );\n }, [selectedSectionIds, venueMapInfo]);\n\n const shouldUseV3 = useMemo(() => {\n return hasSVGVenueMapV3Feature && venueMapInfo?.hasRow;\n }, [hasSVGVenueMapV3Feature, venueMapInfo?.hasRow]);\n\n if (isMapLoading) {\n return (\n
    \n \n
    \n );\n }\n if (!venueMapInfo) {\n return (\n
    \n \n
    \n );\n }\n\n return shouldUseV3 ? (\n \n ) : (\n \n );\n};\n","import { useMemo } from 'react';\nimport { Control, useWatch } from 'react-hook-form';\nimport { EventVenueMap } from 'src/components/Events/VenueMap/EventVenueMap';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { PurchaseTicketsInput } from 'src/utils/purchaseUtils';\nimport { SectionInfo } from 'src/WebApiController';\n\nexport const PurchaseTicketGroupVenueMap = ({\n control,\n onSectionClicked,\n}: {\n control: Control;\n onSectionClicked: (e: MouseEvent, sectionInfo: SectionInfo) => void;\n}) => {\n const { venueMapInfo } = useEventMapContext();\n\n const ticketGroups = useWatch({\n control: control,\n name: 'ticketGroups',\n });\n\n const sectionIds = useMemo(() => {\n if (!ticketGroups) return [];\n return ticketGroups.reduce((acc, data) => {\n // If sectionId is not provided, try to derive it from venueMapInfo.\n if (!data.sectionId?.value) {\n if (!venueMapInfo) return acc;\n const sectionId = venueMapInfo.sections.find(\n (section) => section.name === data.section?.value\n )?.id;\n if (sectionId) {\n acc.push(sectionId);\n }\n return acc;\n }\n if (data.sectionId.value) {\n acc.push(data.sectionId.value);\n }\n return acc;\n }, [] as number[]);\n }, [ticketGroups, venueMapInfo]);\n\n return (\n \n );\n};\n","import { useMemo } from 'react';\nimport { useListingNotesSelector } from 'src/components/Selectors/ListingNotesSelector/useListingNotesSelector';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { EventListingConstraints, ListingNote } from 'src/WebApiController';\n\nexport const useTicketGroupListingNotes = ({\n listingConstraints,\n}: {\n listingConstraints?: EventListingConstraints | null;\n}) => {\n const {\n query,\n multiSelectorProps: { valueOptionsContent },\n } = useListingNotesSelector({\n disabled: false,\n validListingNoteIds: listingConstraints?.validListingNoteIds,\n placeholderText: ContentId.ChooseSeatingNotes,\n });\n\n const listingNotesMap = useMemo(\n () =>\n query.data\n ?.filter((l) => (l.listingNoteText || l.listingNoteUntranslated).trim())\n .reduce(\n (r, l) => {\n r[l.listingNoteId.toString()] = l;\n return r;\n },\n {} as Record\n ),\n [query.data]\n );\n\n return {\n listingNotesMap,\n valueOptionsContent,\n };\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { PurchaseClient } from 'src/WebApiController';\n\nexport const useDeliveryOverrideForNewTicketGroup = (\n eventId?: number | null,\n vendorId?: number | null,\n vendorAccountId?: string | null,\n isManual?: boolean,\n disabled?: boolean\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const { trackError } = useErrorBoundaryContext();\n\n const getQueryKey = [\n 'PurchaseClient.getDeliveryOverrideForNewTicketGroup',\n eventId,\n ];\n\n const shouldQuery =\n !disabled && Boolean(activeAccountWebClientConfig.activeAccountId);\n\n const getQuery = useQuery({\n queryKey: getQueryKey,\n queryFn: async () => {\n if (!shouldQuery) {\n return null;\n }\n\n return await new PurchaseClient(\n activeAccountWebClientConfig\n ).getDeliveryOverrideForNewTicketGroup({\n item1: eventId ?? null,\n item2: vendorId ?? null,\n item3: vendorAccountId ?? null,\n item4: isManual ?? false,\n });\n },\n\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError(\n 'PurchaseClient.getDeliveryOverrideForNewTicketGroup',\n error,\n {\n eventId,\n vendorId,\n }\n );\n },\n },\n });\n\n return {\n deliveryTypeDefault: getQuery.data?.delivType,\n ticketTypeRulesDefault: getQuery.data?.tktTypeRules,\n inHandAtDefault: getQuery.data?.inHandAt,\n isLoading: getQuery.isLoading,\n hasDefaultValues: !!getQuery.data,\n };\n};\n","import { Virtualizer } from '@tanstack/react-virtual';\nimport { RefObject, useCallback, useEffect, useRef, useState } from 'react';\n\nimport { CellsSelection } from './useSpreadsheetSelection';\n\n/**\n * Represents the position and dimensions of a selection box.\n *\n * @typedef {Object} SelectionPos\n * @property {number} top - The top position in pixels.\n * @property {number} left - The left position in pixels.\n * @property {number} width - The width of the selection box in pixels.\n * @property {number} height - The height of the selection box in pixels.\n */\nexport type SelectionPos = {\n top: number;\n left: number;\n width: number;\n height: number;\n};\n\nexport const useSelectionPos = (\n scrollContainerRef: RefObject,\n selection: CellsSelection | null,\n virtualizer: Virtualizer,\n rowHeight: number\n): SelectionPos | null => {\n const [selectionPos, setSelectionPos] = useState(null);\n const prevFirstRect = useRef(null);\n const prevLastRect = useRef(null);\n\n const updatePosition = useCallback(() => {\n const container = scrollContainerRef.current;\n if (!selection || !container) {\n setSelectionPos(null);\n return;\n }\n const minRow = Math.min(selection.start.rowIndex, selection.end.rowIndex);\n const maxRow = Math.max(selection.start.rowIndex, selection.end.rowIndex);\n const minCol = Math.min(selection.start.colIndex, selection.end.colIndex);\n const maxCol = Math.max(selection.start.colIndex, selection.end.colIndex);\n\n const renderedRange = virtualizer.calculateRange();\n\n let firstCell = container.querySelector(\n `[data-row=\"${minRow}\"][data-col=\"${minCol}\"]`\n ) as HTMLElement | null;\n let lastCell = container.querySelector(\n `[data-row=\"${maxRow}\"][data-col=\"${maxCol}\"]`\n ) as HTMLElement | null;\n\n if (\n firstCell &&\n renderedRange?.startIndex &&\n (minRow < renderedRange?.startIndex || minRow > renderedRange?.endIndex)\n ) {\n firstCell = null;\n }\n const containerRect = container.getBoundingClientRect();\n\n if (\n lastCell &&\n renderedRange?.endIndex &&\n (maxRow < renderedRange?.startIndex || maxRow > renderedRange?.endIndex)\n ) {\n lastCell = null;\n }\n\n const scrollTop = container.scrollTop;\n const scrollLeft = container.scrollLeft;\n\n if (!firstCell && !lastCell) {\n setSelectionPos(null);\n return;\n }\n\n // If the first cell is not rendered, use the previous rect to calculate the position\n let firstRect: DOMRect;\n if (firstCell) {\n firstRect = firstCell.getBoundingClientRect();\n prevFirstRect.current = firstRect;\n } else if (prevFirstRect.current) {\n firstRect = {\n ...prevFirstRect.current,\n left: prevFirstRect.current.left,\n right: prevFirstRect.current.right,\n bottom: prevFirstRect.current.bottom,\n top: containerRect.top + minRow * rowHeight - scrollTop,\n };\n } else {\n firstRect = containerRect;\n }\n\n let lastRect: DOMRect;\n if (lastCell) {\n lastRect = lastCell.getBoundingClientRect();\n prevLastRect.current = lastRect;\n } else if (prevLastRect.current) {\n lastRect = {\n ...prevLastRect.current,\n left: prevLastRect.current.left,\n right: prevLastRect.current.right,\n bottom: containerRect.bottom + maxRow * rowHeight - scrollTop,\n top: prevLastRect.current.top,\n };\n } else {\n lastRect = containerRect;\n }\n\n const top = firstRect.top - containerRect.top + scrollTop;\n const left = firstRect.left - containerRect.left + scrollLeft;\n const width = lastRect.right - firstRect.left;\n const height = lastRect.bottom - firstRect.top;\n setSelectionPos({ top, left, width, height });\n }, [scrollContainerRef, selection, virtualizer, rowHeight]);\n\n useEffect(() => {\n updatePosition();\n }, [updatePosition]);\n\n useEffect(() => {\n const container = scrollContainerRef.current;\n if (!container) return;\n const handleScroll = () => {\n requestAnimationFrame(() => {\n updatePosition();\n });\n };\n\n container.addEventListener('scroll', handleScroll, { passive: true });\n return () => container.removeEventListener('scroll', handleScroll);\n }, [scrollContainerRef, updatePosition]);\n\n return selectionPos;\n};\n","import { UseFormSetValue } from 'react-hook-form';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport { PurchaseTicketsInput } from 'src/utils/purchaseUtils';\nimport { TicketGroupInput } from 'src/WebApiController';\n\nimport { CellsSelection } from './hooks/useSpreadsheetSelection';\n\nexport function isCellInRange(\n cells: CellsSelection | null,\n rowIndex: number,\n colIndex: number\n) {\n if (!cells) return false;\n\n const minRow = Math.min(cells?.start.rowIndex, cells?.end.rowIndex);\n const maxRow = Math.max(cells?.start.rowIndex, cells?.end.rowIndex);\n const minCol = Math.min(cells?.start.colIndex, cells?.end.colIndex);\n const maxCol = Math.max(cells?.start.colIndex, cells?.end.colIndex);\n\n return (\n rowIndex >= minRow &&\n rowIndex <= maxRow &&\n colIndex >= minCol &&\n colIndex <= maxCol\n );\n}\n\nexport function isPosField(\n value: unknown\n): value is { value: T; hasChanged: boolean } {\n return (\n value != null &&\n typeof value === 'object' &&\n 'value' in value &&\n 'hasChanged' in value\n );\n}\n\nexport function calculateTicketCostUnitCost(\n currentData: TicketGroupInput[],\n setValue: UseFormSetValue,\n rowIndex: number,\n colIds: (keyof TicketGroupInput)[],\n columnId: keyof TicketGroupInput\n) {\n const quantity = currentData[rowIndex]['numberOfTickets']?.value;\n const unitCost = currentData[rowIndex]['unitCost']?.value;\n const totalCost = currentData[rowIndex]['totalCost']?.value;\n\n // If the column is numberOfTickets, we need to calculate the totalCost or unitCosts\n if (columnId === 'numberOfTickets' && quantity != null) {\n if (colIds.includes('unitCost') && unitCost != null) {\n if (unitCost != null) {\n setValue(\n `ticketGroups.${rowIndex}.totalCost`,\n posChangedField(parseFloat((quantity * unitCost).toFixed(2)))\n );\n }\n } else if (colIds.includes('totalCost') && totalCost != null) {\n setValue(\n `ticketGroups.${rowIndex}.unitCost`,\n posChangedField(parseFloat((totalCost / quantity).toFixed(2)))\n );\n }\n } else {\n if (columnId === 'unitCost' && quantity != null && unitCost != null) {\n setValue(\n `ticketGroups.${rowIndex}.totalCost`,\n posChangedField(parseFloat((quantity * unitCost).toFixed(2)))\n );\n }\n\n if (columnId === 'totalCost' && quantity != null && totalCost != null) {\n setValue(\n `ticketGroups.${rowIndex}.unitCost`,\n posChangedField(parseFloat((totalCost / quantity).toFixed(2)))\n );\n }\n }\n}\n","import { ColumnDef } from '@tanstack/react-table';\nimport { useMemo, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useHotkeys } from 'react-hotkeys-hook';\nimport { PosTableData } from 'src/tables/Table';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport { PurchaseTicketsInput } from 'src/utils/purchaseUtils';\nimport { TicketGroupInput } from 'src/WebApiController';\n\nimport { calculateTicketCostUnitCost, isPosField } from '../utils';\nimport { CellsSelection } from './useSpreadsheetSelection';\n\ntype ClipboardEntry = {\n rowOffset: number;\n colOffset: number;\n value: T;\n};\n\nexport const useSpreadsheetCopyPaste = ({\n selectedCells,\n setSelectedCells,\n columns,\n}: {\n selectedCells: CellsSelection | null;\n setSelectedCells: React.Dispatch>;\n columns: (ColumnDef & { id: keyof T })[];\n}) => {\n const [clipboardData, setClipboardData] = useState<\n ClipboardEntry[]\n >([]);\n const [isCopyActive, setIsCopyActive] = useState(false);\n const [copiedCells, setCopiedCells] = useState(null);\n const { getValues, setValue } = useFormContext();\n\n useHotkeys(['mod+c'], () => handleCopy(), { enableOnFormTags: true });\n useHotkeys(['mod+v'], () => handlePaste());\n\n const handleCopy = () => {\n if (!selectedCells) return;\n\n setCopiedCells(selectedCells);\n setSelectedCells(null);\n setIsCopyActive(true);\n setClipboardData(clipboardData);\n };\n\n const handlePaste = () => {\n if (!clipboardData || !selectedCells || !copiedCells) return;\n const currentData = getValues('ticketGroups');\n\n const numColumns = columns.length;\n\n const targetRow = Math.min(\n selectedCells?.start.rowIndex,\n selectedCells?.end.rowIndex\n );\n const targetCol = Math.min(\n selectedCells?.start.colIndex,\n selectedCells?.end.colIndex\n );\n\n const minCopiedRow = Math.min(\n copiedCells.start.rowIndex,\n copiedCells.end.rowIndex\n );\n\n const maxCopiedRow = Math.max(\n copiedCells.start.rowIndex,\n copiedCells.end.rowIndex\n );\n\n const minCopiedCol = Math.min(\n copiedCells.start.colIndex,\n copiedCells.end.colIndex\n );\n\n const maxCopiedCol = Math.max(\n copiedCells.start.colIndex,\n copiedCells.end.colIndex\n );\n\n let maxUpdatedRow = targetRow;\n let maxUpdatedCol = targetCol;\n\n const colIds = columns.map((col) => col.id as keyof TicketGroupInput);\n\n for (let r = minCopiedRow; r <= maxCopiedRow; r++) {\n for (let c = minCopiedCol; c <= maxCopiedCol; c++) {\n const rowOffset = r - minCopiedRow;\n const colOffset = c - minCopiedCol;\n const columnId = columns[c].id as keyof TicketGroupInput;\n\n const value = currentData[r][columnId];\n const pasteRow = targetRow + rowOffset;\n const pasteCol = targetCol + colOffset;\n\n if (value && pasteRow < currentData.length && pasteCol < numColumns) {\n const columnId = columns[pasteCol].id as keyof TicketGroupInput;\n const pasteVerificationHandler =\n columns[pasteCol].meta?.pasteVerificationHandler;\n\n const valueIsPosField = isPosField(value);\n if (!valueIsPosField) {\n continue;\n }\n if (pasteVerificationHandler) {\n const isValidType = pasteVerificationHandler(value.value);\n if (!isValidType) {\n continue;\n }\n }\n\n // TODO: Move this logic out of this hook\n setValue(\n `ticketGroups.${pasteRow}.${columnId}`,\n posChangedField(value.value) as TicketGroupInput[typeof columnId]\n );\n\n calculateTicketCostUnitCost(\n currentData,\n setValue,\n pasteRow,\n colIds,\n columnId\n );\n\n maxUpdatedRow = Math.max(maxUpdatedRow, pasteRow);\n maxUpdatedCol = Math.max(maxUpdatedCol, pasteCol);\n }\n }\n }\n setSelectedCells({\n start: {\n rowIndex: targetRow,\n colIndex: targetCol,\n },\n end: {\n rowIndex: maxUpdatedRow,\n colIndex: maxUpdatedCol,\n },\n });\n\n setIsCopyActive(false);\n\n setCopiedCells(null);\n };\n\n return useMemo(\n () => ({\n isCopyActive,\n copiedCells,\n }),\n [isCopyActive, copiedCells]\n );\n};\n","import { ColumnDef } from '@tanstack/react-table';\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { PosTableData } from 'src/dialogs/SectionRowTableDialog/components/SectionRowTable';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport { PurchaseTicketsInput } from 'src/utils/purchaseUtils';\nimport { TicketGroupInput } from 'src/WebApiController';\n\nimport { calculateTicketCostUnitCost, isPosField } from '../utils';\n\nexport type CellPosition = {\n rowIndex: number;\n colIndex: number;\n};\n\nexport type CellsSelection = {\n start: CellPosition;\n end: CellPosition;\n};\n\nexport const useSpreadsheetSelection = ({\n columns,\n nonInteractiveColumns,\n}: {\n columns: (ColumnDef & { id: keyof T })[];\n nonInteractiveColumns?: string[];\n}) => {\n const [selectedCells, setSelectedCells] = useState(\n null\n );\n const [isAnchorSelected, setIsAnchorSelected] = useState(false);\n const [anchorDragged, setAnchorDragged] = useState(false);\n const lastEnteredCell = useRef(null);\n const { getValues, setValue } = useFormContext();\n\n const isShiftPressedRef = useRef(false);\n\n useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Shift') {\n isShiftPressedRef.current = true;\n }\n };\n const handleKeyUp = (event: KeyboardEvent) => {\n if (event.key === 'Shift') {\n isShiftPressedRef.current = false;\n }\n };\n\n document.addEventListener('keydown', handleKeyDown);\n document.addEventListener('keyup', handleKeyUp);\n\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n document.removeEventListener('keyup', handleKeyUp);\n };\n }, []);\n\n useEffect(() => {\n const handleMouseUp = () => {\n if (!isAnchorSelected || !selectedCells) {\n return;\n }\n const { rowIndex: startRow, colIndex: startCol } = selectedCells.start;\n const { rowIndex: endRow, colIndex: endCol } = selectedCells.end;\n\n if (endRow > startRow) {\n const currentData = getValues('ticketGroups');\n const colIds = columns.map((col) => col.id as keyof TicketGroupInput);\n\n for (let row = startRow + 1; row <= endRow; row++) {\n for (let col = Math.min(startCol, endCol); col <= endCol; col++) {\n const columnId = columns[col].id as keyof TicketGroupInput;\n if (nonInteractiveColumns?.includes(columnId as string)) {\n continue;\n }\n\n const value = currentData[startRow][columnId];\n const pasteVerificationHandler =\n columns[col].meta?.pasteVerificationHandler;\n const valueIsPosField = isPosField(value);\n if (!valueIsPosField) {\n continue;\n }\n if (pasteVerificationHandler) {\n const isValidType = pasteVerificationHandler(value.value);\n if (!isValidType) {\n continue;\n }\n }\n\n // TODO: Move this logic out of this hook\n setValue(\n `ticketGroups.${row}.${columnId}`,\n posChangedField(value.value) as TicketGroupInput[typeof columnId]\n );\n\n calculateTicketCostUnitCost(\n currentData,\n setValue,\n row,\n colIds,\n columnId\n );\n }\n }\n }\n setIsAnchorSelected(false);\n };\n\n document.addEventListener('mouseup', handleMouseUp);\n return () => document.removeEventListener('mouseup', handleMouseUp);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [anchorDragged, isAnchorSelected, nonInteractiveColumns, selectedCells]);\n\n const handleMouseDown = useCallback(\n (rowIndex: number, colIndex: number) => {\n const colId = columns[colIndex].id;\n if (isAnchorSelected || nonInteractiveColumns?.includes(colId)) {\n return;\n }\n setAnchorDragged(false);\n setSelectedCells({\n start: { rowIndex, colIndex },\n end: { rowIndex, colIndex },\n });\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n []\n );\n\n const handleMouseEnter = useCallback(\n (rowIndex: number, colIndex: number) => {\n if (\n (!isShiftPressedRef.current && !isAnchorSelected) ||\n (lastEnteredCell?.current?.rowIndex == rowIndex &&\n lastEnteredCell?.current?.colIndex == colIndex)\n ) {\n return;\n }\n const colId = columns[colIndex].id;\n lastEnteredCell.current = { rowIndex, colIndex };\n if (isAnchorSelected && selectedCells) {\n const minCol = Math.min(\n selectedCells?.start.colIndex,\n selectedCells?.end.colIndex\n );\n const maxCol = Math.max(\n selectedCells?.start.colIndex,\n selectedCells?.end.colIndex\n );\n\n if (colIndex < minCol || colIndex > maxCol) {\n return;\n }\n\n setSelectedCells((prev) => {\n if (!prev) return null;\n return {\n start: prev.start,\n end: { rowIndex, colIndex: maxCol },\n };\n });\n } else {\n if (nonInteractiveColumns?.includes(colId)) {\n return;\n }\n setSelectedCells((prev) => {\n if (!prev) return null;\n return {\n start: prev.start,\n end: { rowIndex, colIndex },\n };\n });\n }\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [selectedCells, isAnchorSelected]\n );\n\n const lastCellPosition: CellPosition | null = useMemo(() => {\n if (!selectedCells) return null;\n return {\n rowIndex: Math.max(\n selectedCells.start.rowIndex,\n selectedCells.end.rowIndex\n ),\n colIndex: Math.max(\n selectedCells.start.colIndex,\n selectedCells.end.colIndex\n ),\n };\n }, [selectedCells]);\n\n return {\n selectedCells,\n setSelectedCells,\n handleMouseEnter,\n handleMouseDown,\n isAnchorSelected,\n setIsAnchorSelected,\n anchorDragged,\n setAnchorDragged,\n lastCellPosition,\n };\n};\n","import clsx from 'clsx';\nimport ReactDOM from 'react-dom';\n\nimport { SelectionPos } from './hooks/useSelectionPos';\nimport * as styles from './SpreadsheetTable.css';\n\nexport const SpreadsheetSelectionBox = ({\n classNames,\n scrollerRef,\n selectionBoxPos,\n}: {\n classNames: string;\n scrollerRef: React.RefObject;\n selectionBoxPos: SelectionPos;\n}) => {\n if (!scrollerRef.current) return null;\n\n return ReactDOM.createPortal(\n ,\n scrollerRef.current\n );\n};\n","export enum SortStatus {\n 'UNSORTED',\n 'ASC',\n 'DESC',\n}\n\nexport enum ArrowType {\n 'UP',\n 'DOWN',\n}\n\nexport function getNextSortStatus(\n status: SortStatus,\n allowUnsorted: boolean\n): SortStatus {\n switch (status) {\n case SortStatus.UNSORTED:\n return SortStatus.ASC;\n case SortStatus.ASC:\n return SortStatus.DESC;\n case SortStatus.DESC:\n default: {\n if (allowUnsorted) {\n return SortStatus.UNSORTED;\n }\n\n return SortStatus.ASC;\n }\n }\n}\n\nexport type SortButtonProps = {\n sortStatus: SortStatus;\n disabled?: boolean;\n onClick?: (status: SortStatus) => void;\n allowUnsorted?: boolean;\n};\n","import { flexRender, Header } from '@tanstack/react-table';\nimport { vars } from 'src/core/themes';\nimport { SortStatus } from 'src/core/ui/SortButton/SortButton.utils';\nimport { ArrowDownIcon, ArrowUpIcon } from 'src/svgs/Viagogo';\n\nimport { PosTableData } from '../Table';\nimport * as styles from './SpreadsheetTable.css';\n\nexport const SpreadsheetTableHeader = ({\n header,\n}: {\n header: Header;\n}) => {\n const canSort = header.column.getCanSort();\n const sortOrder = header.column.getIsSorted();\n\n let sortStatus = SortStatus.UNSORTED;\n\n sortStatus =\n canSort && sortOrder === 'asc' ? SortStatus.ASC : SortStatus.DESC;\n\n return (\n \n
    \n {flexRender(header.column.columnDef.header, header.getContext())}\n {canSort && (\n {\n header.column.toggleSorting();\n }}\n >\n
    \n \n \n
    \n
    \n )}\n \n \n );\n};\n","import { ComponentPropsWithoutRef, forwardRef, ReactElement } from 'react';\nimport React from 'react';\nimport { vars } from 'src/core/themes';\nimport { Colors } from 'src/core/themes/constants/colors';\nimport { Tooltip } from 'src/core/ui';\n\nimport * as styles from './PosFormField.css';\n\nexport type PosFormFieldProps = React.PropsWithChildren<{\n errors?: string | string[];\n warnings?: string | string[];\n}>;\n\nexport const PosFormFieldCell = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef<'div'> & PosFormFieldProps\n>(function PosFormField({ errors, warnings, children }, ref): ReactElement {\n const isArray = Array.isArray(errors);\n const errorsDiv = errors && (\n
    \n {isArray ? (\n (errors as string[]).map((er, i) => (\n
    \n {er}\n
    \n ))\n ) : (\n
    {errors}
    \n )}\n
    \n );\n\n return (\n
    \n {errors ? (\n \n {React.cloneElement(children as React.ReactElement, {\n style: {\n backgroundColor: errors ? Colors.negative500 : 'transparent',\n border: errors\n ? `1px solid ${vars.color.borderError}`\n : 'none',\n },\n })}\n \n }\n >\n {errorsDiv}\n \n ) : (\n children\n )}\n
    \n );\n});\n","import { Cell, flexRender } from '@tanstack/react-table';\nimport clsx from 'clsx';\nimport React from 'react';\nimport { PosFormFieldCell } from 'src/core/POS/PosFormField/PosFormFieldCell';\n\nimport { PosTableData } from '../Table';\nimport * as styles from './SpreadsheetTable.css';\n\nfunction SpreadsheetTdComponent({\n cell,\n rowIndex,\n handleMouseDown,\n handleMouseEnter,\n isInitialSelected,\n isCellSelected,\n isCellCopied,\n isSingleCellSelected,\n showAnchor,\n setAnchorDragged,\n setIsAnchorSelected,\n fieldError,\n}: {\n cell: Cell;\n rowIndex: number;\n handleMouseDown: (rowIndex: number, colIndex: number) => void;\n handleMouseEnter: (rowIndex: number, colIndex: number) => void;\n isInitialSelected: boolean;\n isCellSelected: boolean;\n isCellCopied: boolean;\n isSingleCellSelected: boolean;\n showAnchor: boolean;\n setAnchorDragged: React.Dispatch>;\n setIsAnchorSelected: React.Dispatch>;\n fieldError: any;\n}) {\n const columnIndex = cell.column.getIndex();\n const backgroundClass = clsx(\n !isInitialSelected && isCellSelected ? styles.backgroundSelected : '',\n isCellSelected && !isSingleCellSelected ? styles.backgroundSelected : '',\n !isCellSelected && !isCellCopied ? styles.backgroundDefault : ''\n );\n\n return (\n \n handleMouseDown(cell.row.index, cell.column.getIndex())\n }\n onMouseEnter={(e) =>\n e.buttons === 1 &&\n handleMouseEnter(cell.row.index, cell.column.getIndex())\n }\n >\n \n {flexRender(cell.column.columnDef.cell, cell.getContext())}\n \n\n {showAnchor && (\n {\n e.stopPropagation();\n setAnchorDragged(true);\n setIsAnchorSelected(true);\n }}\n >\n
    \n \n )}\n \n );\n}\n\nexport const SpreadsheetTd = React.memo(SpreadsheetTdComponent) as (\n props: Parameters>[0]\n) => JSX.Element;\n","import {\n ColumnDef,\n flexRender,\n getCoreRowModel,\n getSortedRowModel,\n RowData,\n Table,\n TableOptions,\n useReactTable,\n} from '@tanstack/react-table';\nimport { notUndefined, useVirtualizer } from '@tanstack/react-virtual';\nimport clsx from 'clsx';\nimport { useMemo, useRef } from 'react';\nimport React from 'react';\nimport { FieldPath, FieldValues, Path } from 'react-hook-form';\n\nimport { PosTableData } from '../Table';\nimport { useSelectionPos } from './hooks/useSelectionPos';\nimport { useSpreadsheetCopyPaste } from './hooks/useSpreadsheetCopyPaste';\nimport { useSpreadsheetSelection } from './hooks/useSpreadsheetSelection';\nimport { SpreadsheetSelectionBox } from './SpreadsheetSelectionBox';\nimport * as styles from './SpreadsheetTable.css';\nimport { SpreadsheetTableHeader } from './SpreadsheetTableHeader';\nimport { SpreadsheetTd } from './SpreadsheetTd';\nimport { isCellInRange } from './utils';\n\ndeclare module '@tanstack/table-core' {\n interface ColumnMeta {\n pasteVerificationHandler?: (pastedValue: unknown) => boolean;\n }\n interface TableMeta {\n updateData?: (rowIndex: number, columnId: string, value: unknown) => void;\n addRow?: (rowIndex: number, row: TData) => void;\n deleteRow?: (rowIndex: number) => void;\n }\n}\n\nexport const SpreadsheetTable = ({\n options,\n nonInteractiveColumns,\n rowHeight = 40,\n fieldName,\n getFieldState,\n formState,\n}: {\n options: Partial>;\n nonInteractiveColumns?: string[];\n rowHeight?: number; // Columns that should not be interactible\n fieldName: Path;\n getFieldState: any;\n formState: any;\n}) => {\n const tableRef = useRef(null);\n const parentRef = React.useRef(null);\n\n const table: Table = useReactTable({\n ...options,\n getCoreRowModel: getCoreRowModel(),\n getSortedRowModel: getSortedRowModel(),\n sortingFns: {},\n } as TableOptions);\n\n const rows = table.getRowModel().rows;\n\n const virtualizer = useVirtualizer({\n count: rows.length,\n getScrollElement: () => parentRef.current,\n estimateSize: () => rowHeight,\n overscan: 10,\n });\n\n const items = virtualizer.getVirtualItems();\n\n // Padding for scroll to respect the height of the missing rows\n const [prePadding, afterPadding] =\n items.length > 0\n ? [\n notUndefined(items[0]).start - virtualizer.options.scrollMargin,\n virtualizer.getTotalSize() -\n notUndefined(items[items.length - 1]).end,\n ]\n : [0, 0];\n\n const typedColumns = table.getAllColumns().map((col) => ({\n ...col.columnDef,\n id: col.id as keyof T,\n })) as (ColumnDef & { id: keyof T })[];\n\n const {\n selectedCells,\n setSelectedCells,\n isAnchorSelected,\n setIsAnchorSelected,\n setAnchorDragged,\n handleMouseEnter,\n handleMouseDown,\n lastCellPosition,\n } = useSpreadsheetSelection({\n columns: typedColumns,\n nonInteractiveColumns,\n });\n const { isCopyActive, copiedCells } = useSpreadsheetCopyPaste({\n selectedCells,\n setSelectedCells,\n\n columns: typedColumns,\n });\n\n const selectionBoxPos = useSelectionPos(\n parentRef,\n selectedCells,\n virtualizer,\n rowHeight\n );\n const copiedBoxPos = useSelectionPos(\n parentRef,\n copiedCells,\n virtualizer,\n rowHeight\n );\n\n const isSingleCellSelected = useMemo(() => {\n return (\n selectedCells != null &&\n selectedCells.start.rowIndex === selectedCells.end.rowIndex &&\n selectedCells.start.colIndex === selectedCells.end.colIndex\n );\n }, [selectedCells]);\n\n const footerRow = table.getFooterGroups();\n const numCols = table.getAllColumns().length;\n return (\n \n \n \n {table.getHeaderGroups().map((headerGroup) => (\n \n {headerGroup.headers.map((header) => (\n \n ))}\n \n ))}\n \n \n {prePadding > 0 && (\n \n \n )}\n {items.map((virtualRow, rowIndex) => {\n const row = rows[virtualRow.index];\n return (\n \n {row.getVisibleCells().map((cell) => {\n const columnIndex = cell.column.getIndex();\n const isInitialSelected =\n selectedCells?.start?.colIndex === columnIndex &&\n selectedCells?.start?.rowIndex === cell.row.index;\n const isCellSelected = isCellInRange(\n selectedCells,\n cell.row.index,\n columnIndex\n );\n const isCellCopied = isCellInRange(\n copiedCells,\n cell.row.index,\n columnIndex\n );\n const showAnchor =\n lastCellPosition?.colIndex == columnIndex &&\n lastCellPosition?.rowIndex === cell.row.index &&\n !(isCopyActive && isCellCopied);\n\n const fieldError = getFieldState(\n `ticketGroups.${cell.row.index}.${cell.column.id}`,\n formState\n );\n\n return (\n \n );\n })}\n \n );\n })}\n {afterPadding > 0 && (\n \n \n )}\n \n \n {footerRow.map((row) => {\n const tableRow = () => (\n {\n e.stopPropagation();\n }}\n >\n {row.headers.map((cell) => (\n \n ))}\n \n );\n\n return tableRow();\n })}\n \n
    \n
    \n
    \n {flexRender(\n cell.column.columnDef.footer,\n cell.getContext()\n )}\n
    \n {selectionBoxPos && (\n \n )}\n {copiedBoxPos && (\n \n )}\n \n );\n};\n","import { Updater } from '@tanstack/react-table';\n\nexport type CustomColumnWidthsType = Record;\n\nexport type ColumnResizingContextType = {\n isResizeEnabled: boolean;\n customColumnWidths: CustomColumnWidthsType;\n onColumnSizingChange?: (x: Updater) => void;\n};\n\nexport const COLUMN_DEFAULT_SIZE_XS = 12;\nexport const COLUMN_DEFAULT_SIZE_ICON = 40;\nexport const COLUMN_DEFAULT_SIZE_SM = 50;\nexport const COLUMN_DEFAULT_SIZE_BASE = 70;\nexport const COLUMN_DEFAULT_SIZE_LG = 130;\nexport const COLUMN_DEFAULT_SIZE_L = 180;\nexport const COLUMN_DEFAULT_SIZE_XL = 220;\nexport const COLUMN_DEFAULT_SIZE_XXL = 300;\nexport const COLUMN_MIN_SIZE = 45;\nexport const COLUMN_MAX_SIZE = 750;\n","import clsx from 'clsx';\nimport React, { memo } from 'react';\nimport {\n Control,\n Controller,\n FieldPath,\n FieldValues,\n useWatch,\n} from 'react-hook-form';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { PosTextFieldProps } from 'src/core/POS/PosTextField';\nimport * as styles from 'src/tables/SpreadsheetTable/SpreadsheetTable.css';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport { UiCurrency } from 'src/WebApiController';\n\ntype CurrencyCellProps = PosTextFieldProps & {\n control: Control;\n fieldName: FieldPath;\n uiCurrency: UiCurrency;\n style?: React.CSSProperties;\n};\n\nconst CurrencyCellComponent = function CurrencyCell<\n T,\n TFormValues extends FieldValues,\n>({\n control,\n fieldName,\n uiCurrency,\n onChange,\n style,\n}: CurrencyCellProps) {\n const currencyField = useWatch({\n control,\n name: fieldName as FieldPath,\n });\n\n const value = currencyField?.value as number;\n return (\n {\n return (\n {\n field.onChange(posChangedField(parseFloat(e.target.value)));\n onChange?.(e);\n }}\n rootProps={{\n className: clsx(\n styles.tableCell[value != null ? 'active' : 'disabled']\n ),\n style: style,\n }}\n style={{\n textAlign: 'right',\n }}\n />\n );\n }}\n />\n );\n};\n\nexport const CurrencyCell = memo(CurrencyCellComponent) as <\n T extends FieldValues,\n>(\n props: CurrencyCellProps\n) => JSX.Element;\n","import { CellContext } from '@tanstack/react-table';\nimport { memo } from 'react';\nimport {\n FieldPath,\n FieldValues,\n Path,\n PathValue,\n useFormContext,\n UseFormRegister,\n UseFormSetValue,\n} from 'react-hook-form';\nimport { PosTextField, PosTextFieldProps } from 'src/core/POS/PosTextField';\nimport { posChangedField } from 'src/utils/posFieldUtils';\n\ninterface InputCellProps\n extends CellContext,\n PosTextFieldProps {\n fieldName: FieldPath;\n setValue: UseFormSetValue;\n register: UseFormRegister;\n}\n\nconst InputCellComponent = function InputCell<\n T,\n V,\n TFormValues extends FieldValues,\n>({\n table,\n fieldName,\n register,\n setValue,\n ...inputProps\n}: InputCellProps) {\n const { clearErrors, getFieldState, formState } =\n useFormContext();\n const inputType = inputProps.type ?? 'text';\n const hasError = getFieldState(fieldName, formState)?.error;\n\n return (\n , {\n valueAsNumber: inputProps.type === 'number',\n onChange: (e) => {\n setValue(\n fieldName,\n posChangedField(e.target.value) as PathValue<\n TFormValues,\n FieldPath\n >\n );\n inputProps.onChange?.(e);\n },\n onBlur: (e) => {\n if (hasError && e.target.value !== '') {\n clearErrors(fieldName as Path);\n }\n },\n })}\n rootProps={{\n style: {\n backgroundColor: 'transparent',\n border: 'none',\n borderRadius: '0px',\n width: '100%',\n height: '100%',\n padding: '0 4px',\n ...inputProps.style,\n },\n }}\n style={{\n textAlign: inputType === 'text' ? 'left' : 'right',\n padding: '0 4px',\n }}\n />\n );\n};\n\nexport const InputCell = memo(InputCellComponent) as <\n T,\n V,\n TFormValues extends FieldValues,\n>(\n props: InputCellProps\n) => JSX.Element;\n","import { HeaderContext } from '@tanstack/react-table';\nimport { ReactNode } from 'react';\nimport {\n Control,\n useWatch,\n} from 'react-hook-form';\nimport { PurchaseTicketsInput } from 'src/utils/purchaseUtils';\nimport { TicketGroupInput } from 'src/WebApiController';\n\nimport * as styles from '../SpreadsheetTable.css';\nimport { isPosField } from '../utils';\nimport { CurrencyCell } from './CurrencyCell';\nimport { InputCell } from './InputCell';\n\nexport const SpreadsheetCell = {\n InputCell: InputCell,\n CurrencyCell: CurrencyCell,\n FooterAggregateCell: function FooterAggregateCell({\n prefixDisplay,\n control,\n fieldName,\n type = 'number',\n }: HeaderContext & {\n prefixDisplay?: ReactNode;\n control: Control;\n fieldName: string;\n type?: 'number' | 'currency';\n }) {\n const values = useWatch({\n control,\n name: `ticketGroups`,\n });\n\n const total = values.reduce((sum, row) => {\n const value = row[fieldName as keyof TicketGroupInput];\n const isValuePosField = isPosField(value);\n if (!isValuePosField) {\n return sum;\n }\n\n if (typeof value.value === 'number') {\n return sum + (value.value || 0);\n } else if (typeof value.value === 'string') {\n return sum + parseFloat(value.value);\n }\n return sum;\n }, 0);\n\n return (\n
    \n {prefixDisplay &&
    {prefixDisplay}
    }\n
    \n {type === 'currency' ? total.toFixed(2) : total}\n
    \n
    \n );\n },\n};\n","import { CellContext } from '@tanstack/react-table';\nimport clsx from 'clsx';\nimport React from 'react';\nimport { Control, useFormContext } from 'react-hook-form';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport * as styles from 'src/tables/SpreadsheetTable/SpreadsheetTable.css';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport { PurchaseTicketsInput } from 'src/utils/purchaseUtils';\nimport { TicketGroupInput } from 'src/WebApiController';\n\nfunction TicketGroupInputQuantityComponent({\n cell,\n ...inputProps\n}: CellContext & {\n control: Control;\n style?: React.CSSProperties;\n}) {\n const {\n register,\n setValue,\n getValues,\n getFieldState,\n formState,\n clearErrors,\n } = useFormContext();\n\n const hasError = getFieldState(\n `ticketGroups.${cell.row.index}.numberOfTickets`,\n formState\n )?.error;\n\n return (\n {\n const quantity = e.target.value;\n if (hasError && quantity !== '') {\n clearErrors(`ticketGroups.${cell.row.index}.numberOfTickets`);\n }\n },\n onChange: (e) => {\n const quantity = e.target.value;\n if (quantity === '') {\n return;\n }\n\n const unitCost = getValues(\n `ticketGroups.${cell.row.index}.unitCost.value`\n );\n\n const totalCost = getValues(\n `ticketGroups.${cell.row.index}.totalCost.value`\n );\n\n if (!unitCost && totalCost) {\n const calculatedUnitCost = parseFloat(\n (totalCost / quantity).toFixed(2)\n );\n\n setValue(\n `ticketGroups.${cell.row.index}.unitCost`,\n posChangedField(calculatedUnitCost)\n );\n return;\n }\n\n if (!unitCost) {\n return;\n }\n\n const calculatedTotalCost = parseFloat(\n (unitCost * quantity).toFixed(2)\n );\n\n setValue(\n `ticketGroups.${cell.row.index}.totalCost`,\n posChangedField(calculatedTotalCost)\n );\n },\n })}\n rootProps={{\n className: clsx(styles.tableCell['active']),\n style: {\n ...inputProps.style,\n },\n }}\n style={{\n textAlign: 'right',\n }}\n />\n );\n}\n\nexport const TicketGroupInputQuantity = React.memo(\n TicketGroupInputQuantityComponent\n) as (\n props: CellContext & {\n control: Control;\n style?: React.CSSProperties;\n }\n) => JSX.Element;\n","import { CellContext } from '@tanstack/react-table';\nimport React, { ReactNode, useCallback } from 'react';\nimport { Control, Controller, useFormContext, useWatch } from 'react-hook-form';\nimport { PosSelect } from 'src/core/POS/PosSelect';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport { PurchaseTicketsInput } from 'src/utils/purchaseUtils';\nimport { DeliveryType, TicketGroupInput } from 'src/WebApiController';\n\nimport * as styles from './TicketGroupInputTable.css';\n\nfunction TicketGroupInputDeliveryTypeComponent({\n row: { index: rowIndex },\n deliveryTypeMapping,\n deliveryTypeMappingOverride,\n deliverTypeOptionsAlwaysShow,\n cell,\n control,\n}: CellContext & {\n deliveryTypeMapping: Record;\n deliveryTypeMappingOverride: Record;\n deliverTypeOptionsAlwaysShow: Record;\n control: Control;\n}) {\n const { setValue } = useFormContext();\n\n const displayComponent = useCallback(\n (value: string) => {\n return <>{deliveryTypeMapping[value as DeliveryType]};\n },\n [deliveryTypeMapping]\n );\n\n const deliveryTypeValue = useWatch({\n name: `ticketGroups.${rowIndex}.deliveryType.value`,\n });\n\n return (\n {\n return (\n }\n value={deliveryTypeValue as DeliveryType}\n valueOptionsContentOverride={deliveryTypeMappingOverride}\n valueOptionsAlwaysShow={deliverTypeOptionsAlwaysShow}\n onChange={(value) =>\n setValue(\n `ticketGroups.${rowIndex}.deliveryType`,\n posChangedField(value as DeliveryType)\n )\n }\n />\n );\n }}\n />\n );\n}\n\nexport const TicketGroupInputDeliveryType = React.memo(\n TicketGroupInputDeliveryTypeComponent\n) as (\n props: CellContext & {\n deliveryTypeMapping: Record;\n deliveryTypeMappingOverride: Record;\n deliverTypeOptionsAlwaysShow: Record;\n control: Control;\n }\n) => JSX.Element;\n","import { useMemo } from 'react';\nimport { PosSelect, PosSelectProps } from 'src/core/POS/PosSelect';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SectionInfo } from 'src/WebApiController';\n\nexport type RowSelectorProps = Omit & {\n selectedSection?: SectionInfo | null;\n};\n\nexport function RowSelector({\n disabled,\n placeholderText,\n selectedSection,\n searchable,\n ...props\n}: RowSelectorProps) {\n const filteredRows = useMemo(\n () => selectedSection?.rows.filter((r) => r.name && !r.isSpeculative) ?? [],\n [selectedSection?.rows]\n );\n const valueOptionsContent = useMemo(\n () =>\n filteredRows.reduce(\n (re, r) => {\n re[r.id.toString()] = r.name!;\n return re;\n },\n {} as Record\n ),\n [filteredRows]\n );\n\n const nameToOrdinal = useMemo(\n () =>\n filteredRows.reduce(\n (res, row) => {\n res[row.name!] = row.ordinal!;\n return res;\n },\n {} as Record\n ),\n [filteredRows]\n );\n\n return (\n (nameToOrdinal[a] ?? 0) - (nameToOrdinal[b] ?? 0)}\n sortBy=\"value\"\n />\n );\n}\n","import { useMemo } from 'react';\nimport { PosSelect, PosSelectProps } from 'src/core/POS/PosSelect';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SectionInfo } from 'src/WebApiController';\n\nexport type SectionSelectorProps = Omit<\n PosSelectProps,\n 'valueOptionsContent'\n> & { sections?: SectionInfo[] | null };\n\nexport function SectionSelector({\n disabled,\n placeholderText,\n sections,\n ...props\n}: SectionSelectorProps) {\n const valueOptionsContent = useMemo(() => {\n const sectionOptions = sections\n ?.toSorted((s1, s2) => s1.name.localeCompare(s2.name))\n .reduce(\n (r, s) => {\n r[s.id.toString()] = s.name;\n return r;\n },\n {} as Record\n );\n\n return sectionOptions ?? {};\n }, [sections]);\n\n return (\n \n );\n}\n","import { CellContext } from '@tanstack/react-table';\nimport { debounce } from 'lodash-es';\nimport React, { useCallback } from 'react';\nimport { Control, Controller, useFormContext, useWatch } from 'react-hook-form';\nimport { RowSelector } from 'src/components/Selectors/SectionRowSelector';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { vars } from 'src/core/themes';\nimport { SpreadsheetCell } from 'src/tables/SpreadsheetTable/SpreadsheetCell/SpreadsheetCell';\nimport * as styles from 'src/tables/SpreadsheetTable/SpreadsheetTable.css';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport { PurchaseTicketsInput } from 'src/utils/purchaseUtils';\n\nfunction TicketGroupInputRowSelectorComponent(\n props: CellContext & {\n control: Control;\n style?: React.CSSProperties;\n }\n) {\n const {\n register,\n setValue,\n getValues,\n getFieldState,\n formState,\n clearErrors,\n } = useFormContext();\n const { cell, control, getValue, style = {} } = props;\n const { venueMapInfo } = useEventMapContext();\n\n const [sectionId, section] = useWatch({\n name: [\n `ticketGroups.${cell.row.index}.sectionId.value`,\n `ticketGroups.${cell.row.index}.section.value`,\n ],\n });\n\n const rowValue = getValues(`ticketGroups.${cell.row.index}.row.value`);\n const hasError = getFieldState(\n `ticketGroups.${cell.row.index}.row`,\n formState\n )?.error;\n\n const selectedSection = venueMapInfo?.sections?.find((s) =>\n sectionId ? s.id === sectionId : s.name === section\n );\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const setRowForTickets = useCallback(\n debounce((row: string) => {\n const tickets = getValues(`ticketGroups.${cell.row.index}.tickets.value`);\n if (tickets) {\n setValue(\n `ticketGroups.${cell.row.index}.tickets`,\n posChangedField(tickets.map((t) => ({ ...t, row: row })) ?? null)\n );\n }\n }, 600),\n [setValue]\n );\n\n return selectedSection?.rows?.filter((r) => !r.isSpeculative)?.length ? (\n {\n const selectedRow = selectedSection?.rows?.find(\n (r) => r.name === rowValue\n );\n return (\n {\n const id = parseInt(rowId);\n\n if (hasError && id) {\n clearErrors(`ticketGroups.${cell.row.index}.row`);\n }\n const row = selectedSection?.rows?.find((r) => r.id === id);\n // If the row is not found, it means the user selected the placeholder option\n if (row == undefined) {\n field.onChange(posChangedField(rowId));\n setValue(`ticketGroups.${cell.row.index}.rowId`, null);\n return;\n }\n\n field.onChange(posChangedField(row.name));\n setValue(\n `ticketGroups.${cell.row.index}.rowId`,\n posChangedField(id)\n );\n setRowForTickets(row.name || '');\n }}\n placeholderText=\"\"\n />\n );\n }}\n />\n ) : (\n \n register={register}\n fieldName={`ticketGroups.${cell.row.index}.row`}\n {...props}\n setValue={setValue}\n />\n );\n}\n\nexport const TicketGroupInputRowSelector = React.memo(\n TicketGroupInputRowSelectorComponent\n) as (\n props: CellContext & {\n control: Control;\n style?: React.CSSProperties;\n }\n) => JSX.Element;\n","import { set } from 'date-fns';\nimport { range } from 'lodash-es';\nimport {\n ControllerFieldState,\n UseFormClearErrors,\n UseFormSetError,\n UseFormSetValue,\n} from 'react-hook-form';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport { PurchaseTicketsInput } from 'src/utils/purchaseUtils';\nimport { Ticket } from 'src/WebApiController';\n\nconst getIncrement = (\n from: number,\n to: number,\n quantity: number\n): number | null => {\n if (quantity <= 1) return null;\n return (to - from) / (quantity - 1);\n};\n\nconst generateSeats = (\n from: number,\n to: number | null,\n quantity: number,\n isNumeric: boolean\n): (string | number)[] => {\n if (!to) {\n // If only `from` is defined\n return Array.from({ length: quantity }, (_, i) =>\n i === 0 ? (isNumeric ? from : String.fromCharCode(from)) : ''\n );\n }\n\n const increment = getIncrement(from, to, quantity);\n if (increment === null) {\n return [isNumeric ? from : String.fromCharCode(from)];\n }\n\n return Array.from({ length: quantity }, (_, i) =>\n isNumeric\n ? Math.round(from + i * increment)\n : String.fromCharCode(Math.round(from + i * increment))\n );\n};\n\nexport function assignTicketGroupSeats(\n seatFrom: string | number | null,\n seatTo: string | number | null,\n quantity: number | null,\n tickets: Ticket[] | null,\n setValue: UseFormSetValue,\n setError: UseFormSetError,\n clearErrors: UseFormClearErrors,\n fieldState: ControllerFieldState,\n rowIndex: number,\n skipError?: string\n) {\n if (!quantity) return;\n\n let seats: (string | number)[] = [];\n // No seats case: No seatFrom and no seatTo\n if (!seatFrom && !seatTo) {\n clearErrors(`ticketGroups.${rowIndex}.tickets`);\n seats = Array.from({ length: quantity }, () => '');\n }\n // Numeric Case: Both seatFrom and seatTo are numbers (or numeric strings)\n else if (!isNaN(Number(seatFrom)) && !isNaN(Number(seatTo))) {\n const seatFromNum = Number(seatFrom);\n const seatToNum = Number(seatTo);\n\n if (\n !validateSeatRange(\n seatFromNum,\n seatToNum,\n tickets,\n quantity,\n rowIndex,\n setError,\n clearErrors,\n fieldState,\n skipError\n )\n ) {\n // If validation fails, adjust existing tickets if available.\n if (tickets) {\n if (quantity < tickets.length) {\n setValue(\n `ticketGroups.${rowIndex}.tickets`,\n posChangedField(tickets.slice(0, quantity))\n );\n return;\n }\n if (quantity > tickets.length && tickets[0]) {\n const startOrdinal = tickets[0].ord || 0;\n const initialTickets = tickets[0];\n const newTickets = range(tickets.length, quantity).map((i) => ({\n ...initialTickets,\n id: startOrdinal + i,\n ord: startOrdinal + i,\n lstOrd: startOrdinal + i,\n seat: '',\n }));\n setValue(\n `ticketGroups.${rowIndex}.tickets`,\n posChangedField([...tickets, ...newTickets])\n );\n return;\n }\n }\n }\n seats = generateSeats(seatFromNum, seatToNum, quantity, true);\n }\n // Character Case: Both seatFrom and seatTo are single letters\n else if (\n typeof seatFrom === 'string' &&\n typeof seatTo === 'string' &&\n seatFrom.length === 1 &&\n seatTo.length === 1\n ) {\n const fromCharCode = seatFrom.toUpperCase().charCodeAt(0);\n const toCharCode = seatTo.toUpperCase().charCodeAt(0);\n\n if (\n !validateSeatRange(\n fromCharCode,\n toCharCode,\n tickets,\n quantity,\n rowIndex,\n setError,\n clearErrors,\n fieldState,\n skipError\n )\n ) {\n return;\n }\n seats = generateSeats(fromCharCode, toCharCode, quantity, false);\n }\n // Only seatFrom provided (Numeric or Char)\n else if (seatFrom) {\n if (typeof seatFrom === 'string') {\n const fromCharCode = seatFrom.toUpperCase().charCodeAt(0);\n seats = generateSeats(fromCharCode, null, quantity, false);\n } else if (typeof seatFrom === 'number') {\n seats = generateSeats(seatFrom, null, quantity, true);\n }\n }\n // Only seatTo provided (Numeric or Char)\n else if (seatTo) {\n if (typeof seatTo === 'string') {\n const toCharCode = seatTo.toUpperCase().charCodeAt(0);\n seats = generateSeats(toCharCode, null, quantity, false);\n } else if (typeof seatTo === 'number') {\n seats = generateSeats(seatTo, null, quantity, true);\n }\n }\n\n // Assign seats to tickets. If tickets do not exist, create new ones.\n if (!tickets) {\n tickets = seats.map((seat, i) => ({\n id: i,\n ord: i,\n lstOrd: i,\n seat: seat.toString(),\n })) as Ticket[];\n }\n\n if (tickets) {\n if (tickets.length > quantity) {\n // If there are too many tickets, slice the array down.\n tickets = tickets.slice(0, quantity);\n } else if (tickets.length < quantity) {\n // If there are fewer tickets than the new quantity,\n // use the first ticket to create additional tickets.\n const origTicket = tickets[0];\n const startOrdinal = origTicket?.ord ?? 0;\n const additionalTickets = range(tickets.length, quantity).map((i) => ({\n ...origTicket, // clone the template (if available) or create a new ticket if needed\n id: startOrdinal + i,\n ord: startOrdinal + i,\n lstOrd: startOrdinal + i,\n seat: '', // initialize seat as blank\n }));\n tickets = [...tickets, ...additionalTickets];\n }\n\n seats.forEach((seat, i) => {\n if (tickets![i]) {\n tickets![i].seat = seat.toString();\n }\n });\n }\n\n setValue(`ticketGroups.${rowIndex}.tickets`, posChangedField(tickets));\n}\n\n// Validate the seat range and quantity. Set errors if necessary.\nexport function validateSeatRange(\n seatFrom: number,\n seatTo: number,\n tickets: Ticket[] | null,\n quantity: number,\n rowIndex: number,\n setError: UseFormSetError,\n clearErrors: UseFormClearErrors,\n fieldState: ControllerFieldState,\n skipError?: string\n): boolean {\n if (quantity !== tickets?.length) {\n setError(`ticketGroups.${rowIndex}.tickets`, {\n message:\n 'Quantity does not match existing tickets. Please re-enter seat range or change quantity',\n });\n return false;\n }\n\n if (quantity === 1 && seatFrom !== seatTo) {\n const hasDuplicates = false;\n if (tickets) {\n const seatSet = new Set();\n for (const t of tickets) {\n if (!t.seat) {\n setError(`ticketGroups.${rowIndex}.tickets`, {\n message: 'Seats cannot be empty',\n });\n return false;\n }\n if (seatSet.has(t.seat)) {\n setError(`ticketGroups.${rowIndex}.tickets`, {\n message: 'Duplicate seats are not allowed',\n });\n return false;\n }\n seatSet.add(t.seat);\n }\n }\n\n setError(`ticketGroups.${rowIndex}.tickets`, {\n message: 'Unable to calculate seating. Please manually allocate seats',\n });\n return false;\n }\n if (seatFrom > seatTo) {\n setError(`ticketGroups.${rowIndex}.tickets`, {\n message: 'End seat must be greater than start seat',\n });\n return false;\n }\n\n const totalRange = seatTo - seatFrom + 1;\n if (quantity > totalRange) {\n setError(`ticketGroups.${rowIndex}.tickets`, {\n message: 'Quantity not within range',\n });\n return false;\n }\n\n if (\n fieldState.error?.message &&\n // Prevent clearing the error if the error is set at the TicketGroup level\n (!skipError || !fieldState.error?.message.includes(skipError))\n ) {\n clearErrors(`ticketGroups.${rowIndex}.tickets`);\n }\n\n return true;\n}\n","import { CellContext } from '@tanstack/react-table';\nimport clsx from 'clsx';\nimport React, { useEffect, useMemo, useState } from 'react';\nimport {\n Control,\n useController,\n useFormContext,\n useWatch,\n} from 'react-hook-form';\nimport { IconButton } from 'src/components/Buttons';\nimport { useContent } from 'src/contexts/ContentContext/Content';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { SeatIcon } from 'src/svgs/Viagogo';\nimport * as styles from 'src/tables/SpreadsheetTable/SpreadsheetTable.css';\nimport { SEAT_RANGE_REGEX } from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { PurchaseTicketsInput } from 'src/utils/purchaseUtils';\nimport { Ticket, TicketGroupInput } from 'src/WebApiController';\n\nimport {\n assignTicketGroupSeats,\n validateSeatRange,\n} from './utils/seatRangeUtils';\n\nconst extractSeatRange = (\n localValue: string,\n tickets: Ticket[]\n): { seatFrom: string | number | null; seatTo: string | number | null } => {\n if (localValue) {\n const seatRangeInput = localValue.match(SEAT_RANGE_REGEX);\n return {\n seatFrom: seatRangeInput?.[1] || null,\n seatTo: seatRangeInput?.[2] || null,\n };\n }\n // Fallback: derive from existing tickets\n return {\n seatFrom: tickets?.[0]?.seat || null,\n seatTo: tickets?.[tickets.length - 1]?.seat || null,\n };\n};\n\nconst convertSeatRange = (\n seatFrom: string | number | null,\n seatTo: string | number | null\n): { seatFrom: number; seatTo: number } => {\n if (seatFrom == null || seatTo == null) {\n return { seatFrom: 0, seatTo: 0 };\n }\n if (!isNaN(Number(seatFrom)) && !isNaN(Number(seatTo))) {\n return { seatFrom: Number(seatFrom), seatTo: Number(seatTo) };\n } else if (typeof seatFrom === 'string' && typeof seatTo === 'string') {\n return {\n seatFrom: seatFrom.toUpperCase().charCodeAt(0),\n seatTo: seatTo.toUpperCase().charCodeAt(0),\n };\n }\n return { seatFrom: 0, seatTo: 0 };\n};\n\nfunction TicketGroupInputSeatRangeComponent({\n row: { index: rowIndex },\n cell,\n control,\n launchSeatRangeDialog,\n style,\n}: CellContext & {\n control: Control;\n launchSeatRangeDialog: (rowIndex: number) => void;\n style?: React.CSSProperties;\n}) {\n const { setValue, getValues, setError, clearErrors, watch } =\n useFormContext();\n const { fieldState } = useController({\n name: `ticketGroups.${rowIndex}.tickets`,\n control,\n rules: { required: true },\n });\n\n const qty = useWatch({\n control,\n name: `ticketGroups.${rowIndex}.numberOfTickets.value`,\n });\n\n const ticketsValue = watch(`ticketGroups.${rowIndex}.tickets.value`);\n\n const tickets = ticketsValue || [];\n const ticketsHasSeats = tickets?.some((t) => t.seat != '');\n\n const formattedValue = tickets\n ? ticketsHasSeats && tickets.length >= 1\n ? `${tickets[0].seat || ''} - ${tickets[tickets.length - 1].seat || ''}`\n : ''\n : '';\n\n const [localValue, setLocalValue] = useState(formattedValue || '');\n const duplicateSeatErrorMsg = useContent(ContentId.DuplicateSeat);\n\n useEffect(() => {\n if (!qty) return;\n const { seatFrom, seatTo } = extractSeatRange(localValue, tickets);\n assignTicketGroupSeats(\n seatFrom,\n seatTo,\n qty,\n tickets,\n setValue,\n setError,\n clearErrors,\n fieldState,\n rowIndex,\n duplicateSeatErrorMsg\n );\n }, [qty]);\n\n useEffect(() => {\n if (localValue === formattedValue) return;\n setLocalValue(formattedValue || '');\n }, [formattedValue]);\n\n useEffect(() => {\n // Only run updateSeatRange when tickets are updated externally\n if (ticketsHasSeats) {\n const { seatFrom: rawSeatFrom, seatTo: rawSeatTo } = extractSeatRange(\n localValue,\n tickets\n );\n const { seatFrom, seatTo } = convertSeatRange(rawSeatFrom, rawSeatTo);\n validateSeatRange(\n seatFrom,\n seatTo,\n tickets,\n qty || 0,\n rowIndex,\n setError,\n clearErrors,\n fieldState,\n duplicateSeatErrorMsg\n );\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [tickets, ticketsHasSeats]);\n\n const SeatRangeModalButton = useMemo(() => {\n return (\n }\n onClick={() => {\n launchSeatRangeDialog(rowIndex);\n }}\n />\n );\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [rowIndex]);\n\n return (\n {\n setLocalValue(e.target.value); // Only update local state\n }}\n onBlur={(e) => {\n const quantity = getValues(\n `ticketGroups.${cell.row.index}.numberOfTickets.value`\n );\n const tickets = getValues(\n `ticketGroups.${cell.row.index}.tickets.value`\n );\n\n const seatRangeInput = e.target.value.match(SEAT_RANGE_REGEX);\n const seatFrom = seatRangeInput?.[1] || null;\n const seatTo = seatRangeInput?.[2] || null;\n\n assignTicketGroupSeats(\n seatFrom,\n seatTo,\n quantity,\n tickets,\n setValue,\n setError,\n clearErrors,\n fieldState,\n rowIndex,\n duplicateSeatErrorMsg\n );\n }}\n rootProps={{\n className: clsx(\n styles.tableCell[localValue != null ? 'active' : 'disabled']\n ),\n style: style,\n }}\n postfixDisplay={SeatRangeModalButton}\n />\n );\n}\n\nexport const TicketGroupInputSeatRange = React.memo(\n TicketGroupInputSeatRangeComponent\n) as (\n props: CellContext & {\n control: Control;\n launchSeatRangeDialog: (rowIndex: number) => void;\n style?: React.CSSProperties;\n }\n) => JSX.Element;\n","import { CellContext } from '@tanstack/react-table';\nimport clsx from 'clsx';\nimport React from 'react';\nimport { Control, Controller, useFormContext, useWatch } from 'react-hook-form';\nimport { PosMultiSelect } from 'src/core/POS/PosMultiSelect';\nimport { vars } from 'src/core/themes';\nimport * as styles from 'src/tables/SpreadsheetTable/SpreadsheetTable.css';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport { PurchaseTicketsInput } from 'src/utils/purchaseUtils';\nimport { ListingNote, TicketGroupInput } from 'src/WebApiController';\n\nfunction TicketGroupInputSeatTraitComponent({\n cell,\n valueOptionsContent,\n listingNotesMap,\n control,\n}: CellContext & {\n valueOptionsContent: Record;\n listingNotesMap?: Record | null;\n control: Control;\n}) {\n const { setValue, watch } = useFormContext();\n const listingNotes = watch(`ticketGroups.${cell.row.index}.listingNotes`);\n\n return (\n ln.listingNoteId.toString()) ?? []\n }\n triggerProps={{\n className: clsx(\n styles.tableCell[\n !listingNotes?.value || listingNotes?.value?.length === 0\n ? 'disabled'\n : 'active'\n ]\n ),\n }}\n style={{\n fontSize: vars.typography.fontSize.sm,\n }}\n searchable\n onChange={(lnIds: string[]) => {\n if (!listingNotesMap) return;\n\n const listingNotes = lnIds.map((lnId) => {\n const listingNoteId = parseInt(lnId);\n return listingNotesMap[listingNoteId];\n });\n setValue(\n `ticketGroups.${cell.row.index}.listingNotes`,\n posChangedField(listingNotes)\n );\n }}\n valueOptionsContent={valueOptionsContent}\n />\n );\n}\n\nexport const TicketGroupInputSeatTrait = React.memo(\n TicketGroupInputSeatTraitComponent\n) as (\n props: CellContext & {\n valueOptionsContent?: Record;\n listingNotesMap?: Record | null;\n control: Control;\n }\n) => JSX.Element;\n","import { CellContext } from '@tanstack/react-table';\nimport clsx from 'clsx';\nimport React from 'react';\nimport { Control, Controller, useFormContext } from 'react-hook-form';\nimport { SectionSelector } from 'src/components/Selectors/SectionRowSelector';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport * as styles from 'src/tables/SpreadsheetTable/SpreadsheetTable.css';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport { PurchaseTicketsInput } from 'src/utils/purchaseUtils';\nfunction TicketGroupInputVenueInputComponent({\n cell,\n control,\n style,\n}: CellContext & {\n control: Control;\n style?: React.CSSProperties;\n}) {\n const { setValue, watch, getFieldState, clearErrors } =\n useFormContext();\n const { venueMapInfo } = useEventMapContext();\n const chooseSection = useContent(ContentId.ChooseSection);\n const section = watch(`ticketGroups.${cell.row.index}.section`);\n const hasErrors = getFieldState(\n `ticketGroups.${cell.row.index}.section`\n )?.error;\n\n return venueMapInfo?.sections?.length ? (\n {\n const value = section?.value;\n return (\n {\n if (hasErrors && selectedSectionId !== '') {\n clearErrors(`ticketGroups.${cell.row.index}.section`);\n }\n const id = parseInt(selectedSectionId);\n const section = venueMapInfo?.sections?.find((s) => s.id === id);\n const sectionName = section?.name ?? selectedSectionId;\n setValue(\n `ticketGroups.${cell.row.index}.section`,\n posChangedField(sectionName)\n );\n setValue(\n `ticketGroups.${cell.row.index}.sectionId`,\n posChangedField(id)\n );\n }}\n />\n );\n }}\n />\n ) : (\n {\n setValue(\n `ticketGroups.${cell.row.index}.section`,\n posChangedField(e.target.value)\n );\n }}\n onBlur={(e) => {\n if (hasErrors && e.target.value !== '') {\n clearErrors(`ticketGroups.${cell.row.index}.section`);\n }\n }}\n />\n );\n}\n\nexport const TicketGroupInputVenueInput = React.memo(\n TicketGroupInputVenueInputComponent\n) as (\n props: CellContext & {\n control: Control;\n style?: React.CSSProperties;\n }\n) => JSX.Element;\n","import { IconsFill } from 'src/svgs/Viagogo';\nimport { getDeliveryTypeIcon } from 'src/utils/ticketTypeUtils';\nimport { DeliveryType } from 'src/WebApiController';\n\nconst createDeliveryTypeMapping = (\n transform: (value: DeliveryType) => T\n): Record =>\n Object.entries(DeliveryType).reduce(\n (result, [_, value]) => {\n if (value === DeliveryType.Wallet) {\n return result;\n }\n result[value] = transform(value);\n return result;\n },\n {} as Record\n );\n\nexport const useTicketGroupDeliveryTypes = () => {\n const deliveryTypeMapping = createDeliveryTypeMapping((value) =>\n getDeliveryTypeIcon(value, null, IconsFill.currentColor)\n );\n\n const deliveryTypeMappingOverride = createDeliveryTypeMapping((value) => (\n
    {value}
    \n ));\n\n const deliverTypeOptionsAlwaysShow = createDeliveryTypeMapping(() => true);\n\n return {\n deliveryTypeMapping,\n deliveryTypeMappingOverride,\n deliverTypeOptionsAlwaysShow,\n };\n};\n","import { ColumnDef, createColumnHelper } from '@tanstack/react-table';\nimport { ChangeEvent, useMemo } from 'react';\nimport { UseFieldArrayReturn, useFormContext } from 'react-hook-form';\nimport { IconButton } from 'src/components/Buttons';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n COLUMN_DEFAULT_SIZE_LG,\n COLUMN_DEFAULT_SIZE_SM,\n} from 'src/contexts/ColumnResizingContext/ColumnResizingContext.types';\nimport { Content } from 'src/contexts/ContentContext/Content';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui/Button';\nimport { TableHeaderCellDiv } from 'src/core/ui/TableHeaderCellDiv';\nimport { DeleteIcon, DollarIcon, PlusIcon } from 'src/svgs/Viagogo';\nimport { SpreadsheetCell } from 'src/tables/SpreadsheetTable/SpreadsheetCell/SpreadsheetCell';\nimport { isPosField } from 'src/tables/SpreadsheetTable/utils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { newBigIntId } from 'src/utils/idUtils';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport { PurchaseTicketsInput } from 'src/utils/purchaseUtils';\nimport {\n DeliveryType,\n ListingNote,\n TicketGroupInput,\n} from 'src/WebApiController';\n\nimport { TicketGroupInputQuantity } from '../TableGroupInputQuantity';\nimport { TicketGroupInputDeliveryType } from '../TicketGroupInputDeliveryType';\nimport { TicketGroupInputRowSelector } from '../TicketGroupInputRowSelector';\nimport { TicketGroupInputSeatRange } from '../TicketGroupInputSeatRange';\nimport { TicketGroupInputSeatTrait } from '../TicketGroupInputSeatTrait';\nimport { TicketGroupInputVenueInput } from '../TicketGroupInputVenueInput';\nimport { useTicketGroupDeliveryTypes } from './useTicketGroupDeliveryTypes';\n\nexport const useTicketGroupInputTableColumns = ({\n isTotalCostChecked,\n purchaseTicketGroupInputField,\n valueOptionsContent,\n listingNotesMap,\n launchSeatRangeDialog,\n}: {\n isTotalCostChecked: boolean;\n purchaseTicketGroupInputField: UseFieldArrayReturn<\n PurchaseTicketsInput,\n 'ticketGroups',\n 'id'\n >;\n valueOptionsContent: Record;\n listingNotesMap?: Record | null;\n launchSeatRangeDialog: (rowIndex: number) => void;\n}) => {\n const { control, register, getValues, setValue } =\n useFormContext();\n\n const { loginContext } = useAppContext();\n\n const { getUiCurrency } = useLocalizationContext();\n const uiCurrency = getUiCurrency(\n loginContext?.user?.activeAccount?.currencyCode\n );\n const {\n deliveryTypeMapping,\n deliveryTypeMappingOverride,\n deliverTypeOptionsAlwaysShow,\n } = useTicketGroupDeliveryTypes();\n\n const { insert, remove } = purchaseTicketGroupInputField;\n\n const columnHelper = createColumnHelper();\n\n const costColumn = useMemo>(() => {\n if (isTotalCostChecked) {\n return {\n id: 'totalCost',\n header: () => (\n \n \n \n ),\n accessorFn: (data) => data?.totalCost?.value,\n size: 104,\n minSize: 104,\n maxSize: 104,\n cell: (context) => {\n const onChange = (e: ChangeEvent) => {\n const totalCost = parseFloat(e.target.value);\n const qty = getValues(\n `ticketGroups.${context.row.index}.numberOfTickets.value`\n );\n\n if (!qty || !totalCost) {\n return;\n }\n\n const calculatedUnitCost = parseFloat((totalCost / qty).toFixed(2));\n\n setValue(\n `ticketGroups.${context.row.index}.unitCost`,\n posChangedField(calculatedUnitCost)\n );\n };\n\n return (\n \n );\n },\n meta: {\n pasteVerificationHandler: (value: unknown) =>\n typeof value === 'number',\n },\n footer: (context) => (\n \n ),\n };\n } else {\n return {\n id: 'unitCost',\n header: () => (\n \n \n \n ),\n accessorFn: (data) => data?.unitCost?.value,\n size: 104,\n minSize: 104,\n maxSize: 104,\n cell: (context) => {\n const onChange = (e: ChangeEvent) => {\n const unitCost = parseFloat(e.target.value);\n\n const qty = getValues(\n `ticketGroups.${context.row.index}.numberOfTickets.value`\n );\n\n if (!qty || !unitCost) {\n return;\n }\n\n const calculatedTotalCost = parseFloat((unitCost * qty).toFixed(2));\n setValue(\n `ticketGroups.${context.row.index}.totalCost`,\n posChangedField(calculatedTotalCost)\n );\n };\n return (\n \n );\n },\n meta: {\n pasteVerificationHandler: (value: unknown) =>\n typeof value === 'number',\n },\n footer: (context) => (\n \n ),\n };\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isTotalCostChecked, register, control, uiCurrency.sym]);\n\n const columnConfigs = useMemo[]>(\n () => [\n columnHelper.accessor((data) => data?.section, {\n id: 'section',\n header: () => (\n \n \n \n ),\n size: 200,\n cell: (context) => (\n \n ),\n meta: {\n pasteVerificationHandler: (value: unknown) =>\n typeof value === 'string',\n },\n }) as ColumnDef,\n {\n id: 'row',\n header: () => (\n \n \n \n ),\n accessorFn: (data) => data?.row?.value,\n size: COLUMN_DEFAULT_SIZE_SM,\n minSize: COLUMN_DEFAULT_SIZE_SM,\n maxSize: COLUMN_DEFAULT_SIZE_SM,\n cell: (context) => (\n \n ),\n },\n {\n id: 'numberOfTickets',\n header: () => (\n \n \n \n ),\n accessorFn: (data) => data?.numberOfTickets?.value,\n size: 40,\n minSize: 40,\n maxSize: 40,\n cell: (context) => (\n \n ),\n meta: {\n pasteVerificationHandler: (value: unknown) =>\n typeof value === 'number',\n },\n footer: (context) => (\n \n ),\n },\n {\n id: 'tickets',\n header: () => (\n \n \n \n ),\n size: 100,\n cell: (context) => (\n \n ),\n meta: {\n pasteVerificationHandler: (value: unknown) => {\n return (\n Array.isArray(value) &&\n value.every((item) => typeof item === 'object')\n );\n },\n },\n },\n costColumn,\n {\n id: 'faceValueCost',\n header: () => (\n \n \n \n ),\n accessorFn: (data) => data?.faceValueCost?.value,\n size: 104,\n minSize: 104,\n maxSize: 104,\n cell: (context) => (\n \n ),\n meta: {\n pasteVerificationHandler: (value: unknown) =>\n typeof value === 'number',\n },\n footer: (context) => (\n \n ),\n },\n {\n id: 'expectedValue',\n header: () => (\n \n \n \n ),\n accessorFn: (data) => data?.expectedValue?.value,\n size: 104,\n minSize: 104,\n maxSize: 104,\n cell: (context) => (\n \n ),\n meta: {\n pasteVerificationHandler: (value: unknown) =>\n typeof value === 'number',\n },\n footer: (context) => (\n \n ),\n },\n {\n id: 'deliveryType',\n header: () => {},\n enableSorting: false,\n accessorFn: (data) => data?.deliveryType?.value,\n size: 48,\n cell: (context) => (\n \n ),\n meta: {\n pasteVerificationHandler: (value: unknown) => {\n return (\n typeof value === 'string' &&\n Object.values(DeliveryType).includes(value as DeliveryType)\n );\n },\n },\n },\n {\n id: 'listingNotes',\n enableSorting: false,\n header: () => (\n \n \n \n ),\n accessorFn: (data): ListingNote[] | null =>\n data?.listingNotes?.value ?? [],\n size: COLUMN_DEFAULT_SIZE_LG,\n cell: (context) => {\n return (\n \n );\n },\n meta: {\n pasteVerificationHandler: (value: unknown) => {\n return (\n Array.isArray(value) &&\n value.every((item) => typeof item === 'object')\n );\n },\n },\n },\n columnHelper.display({\n id: 'actions',\n enableSorting: false,\n size: COLUMN_DEFAULT_SIZE_SM,\n minSize: COLUMN_DEFAULT_SIZE_SM,\n maxSize: COLUMN_DEFAULT_SIZE_SM,\n cell: ({ row, column: { id: columnId }, table, cell }) => {\n const numRows = table.getRowModel().rows.length;\n return (\n \n {\n const curRowValues = getValues(\n `ticketGroups.${cell.row.index}`\n );\n const newRow: TicketGroupInput = { ...curRowValues };\n\n for (const key in curRowValues) {\n const curRowKey = key as keyof TicketGroupInput;\n\n const curRowValue = curRowValues[curRowKey];\n const newRowValue = newRow[curRowKey];\n if (\n curRowValue &&\n isPosField(curRowValue) &&\n curRowValue.value\n ) {\n // Need to mark populated fields as changed so validation can work\n if (newRowValue && isPosField(newRowValue)) {\n newRowValue.hasChanged = true;\n }\n }\n }\n\n const newTicketGroupId = newBigIntId();\n const newTickets = curRowValues.tickets?.value\n ? curRowValues.tickets.value.map((ticket) => ({\n ...ticket,\n tgId: newTicketGroupId,\n saleId: null,\n listingId: null,\n holdId: null,\n barcode: null,\n ticketUrl: null,\n eTicket: null,\n qrCode: null,\n isWasted: null,\n externalTicketId: null,\n }))\n : null;\n \n insert(cell.row.index + 1, { \n ...newRow,\n tickets: posChangedField(newTickets),\n ticketGroupId: newTicketGroupId,\n });\n }}\n >\n \n \n {numRows > 1 && (\n {\n remove(row.index);\n }}\n >\n \n \n )}\n \n );\n },\n }),\n ],\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [uiCurrency.sym, control, setValue, register, costColumn, listingNotesMap]\n );\n\n return columnConfigs;\n};\n","import styled from 'styled-components';\n\nexport const VerticalDivider = styled.div`\n border-right: 2px solid ${(props) => props.theme.colors.borderPrimary};\n width: 1px;\n height: 34px;\n`;\n","import { ComponentProps, useEffect, useMemo, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Modal as RSModal } from 'reactstrap';\nimport { VerticalDivider } from 'src/components/Listings/ListingsCarousel/ListingsCarousel.styled';\nimport { Content } from 'src/contexts/ContentContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { Button, Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport { PurchaseTicketsInput } from 'src/utils/purchaseUtils';\nimport { Ticket } from 'src/WebApiController';\n\nimport * as styles from '../TicketGroupInputTable/TicketGroupInputTable.css';\ntype SeatRangeInputModalProps = ComponentProps & {\n onOkay: () => void;\n onCancel: () => void;\n rowIndex: number | null;\n};\n\nexport const SeatRangeInputModal = ({\n rowIndex,\n onCancel,\n onClosed,\n ...rest\n}: SeatRangeInputModalProps) => {\n const { setValue, getValues, clearErrors } =\n useFormContext();\n const ticketRow = getValues(`ticketGroups.${rowIndex || 0}`);\n const qty = ticketRow?.numberOfTickets?.value;\n\n const [localTickets, setLocalTickets] = useState(\n ticketRow.tickets?.value || []\n );\n\n useEffect(() => {\n return () => {\n setLocalTickets(null);\n };\n }, []);\n\n useEffect(() => {\n if (rowIndex !== null) {\n if (ticketRow) {\n setLocalTickets(ticketRow.tickets?.value || []);\n }\n } else {\n setLocalTickets(null);\n }\n }, [rowIndex, qty, ticketRow]);\n\n const errorMessage = useMemo(() => {\n const seatSet = new Set();\n let hasFilledSeat = false;\n let hasMissingSeat = false;\n for (const t of localTickets || []) {\n if (t.seat) {\n hasFilledSeat = true;\n if (seatSet.has(t.seat)) {\n return 'Duplicate seats are not allowed';\n }\n seatSet.add(t.seat);\n } else {\n hasMissingSeat = true;\n }\n }\n\n if (hasFilledSeat && hasMissingSeat) {\n return 'Please fill in all the seats';\n }\n return null;\n }, [localTickets]);\n\n const isDisabled = Boolean(errorMessage);\n\n const handleSeatChange = (index: number, value: string) => {\n if (localTickets) {\n const updatedTickets = [...localTickets];\n updatedTickets[index].seat = value;\n setLocalTickets(updatedTickets);\n }\n };\n\n if (!localTickets || !qty) {\n return null;\n }\n\n const formattedValue = localTickets\n ? localTickets.length >= 1\n ? `${localTickets[0].seat || ''} - ${\n localTickets[localTickets.length - 1].seat || ''\n }`\n : ''\n : '';\n\n const SeatRangeInfo = (\n \n \n \n \n {ticketRow?.section?.value}\n \n
    \n \n
    \n
    \n \n \n \n {ticketRow?.row?.value}\n \n
    \n \n
    \n
    \n \n\n \n \n {ticketRow?.numberOfTickets?.value}\n \n
    \n \n
    \n
    \n \n\n \n \n {formattedValue}\n \n
    \n \n
    \n
    \n \n \n );\n\n const footer = (\n \n {\n const tempTickets = [...localTickets];\n tempTickets?.forEach((t) => {\n t.seat = '';\n });\n setLocalTickets(tempTickets);\n }}\n >\n \n \n {\n if (rowIndex == null) {\n return;\n }\n setValue(\n `ticketGroups.${rowIndex}.tickets`,\n posChangedField(localTickets)\n );\n setLocalTickets(null);\n clearErrors(`ticketGroups.${rowIndex}.tickets`);\n onCancel();\n }}\n disabled={isDisabled}\n >\n \n \n \n );\n\n return (\n }\n footer={footer}\n onCancel={() => {\n onClosed?.();\n }}\n onClosed={onClosed}\n >\n {SeatRangeInfo}\n {errorMessage && (\n
    \n {errorMessage}\n
    \n )}\n \n \n \n \n
    \n \n
    \n \n {localTickets?.map((t, i) => {\n return (\n \n
    {i + 1}
    \n handleSeatChange(i, e.target.value.trim())}\n />\n \n );\n })}\n \n );\n};\n","import { useState } from 'react';\nimport { UseFieldArrayAppend, useFormContext } from 'react-hook-form';\nimport { Content } from 'src/contexts/ContentContext/Content';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { newBigIntId } from 'src/utils/idUtils';\nimport { posChangedField, posField } from 'src/utils/posFieldUtils';\nimport { PurchaseTicketsInput } from 'src/utils/purchaseUtils';\nimport { DeliveryType } from 'src/WebApiController';\n\nimport * as styles from './TicketGroupInputTable.css';\n\nexport const TicketGroupInputTableFooter = ({\n append,\n}: {\n append: UseFieldArrayAppend;\n}) => {\n const { getValues } = useFormContext();\n\n const [numOfAddRows, setNumOfAddRows] = useState(3);\n\n return (\n
    \n setNumOfAddRows(Number(e.target.value))}\n />\n {\n const { ticketGroups } = getValues();\n const newRows = Array.from({ length: numOfAddRows }, (_, index) => {\n const id = newBigIntId() + index;\n return {\n ...ticketGroups[0],\n ticketGroupId: id,\n section: posChangedField(''),\n sectionId: posChangedField(null),\n row: posChangedField(null),\n listingNotes: posChangedField(null),\n numberOfTickets: posChangedField(null),\n tickets: posChangedField(null),\n unitCost: posChangedField(null),\n totalCost: posChangedField(null),\n faceValueCost: posField(null),\n expectedValue: posChangedField(null),\n deliveryType: posChangedField(DeliveryType.InApp),\n };\n });\n\n append(newRows);\n }}\n style={{ fontSize: vars.typography.fontSize.base }}\n >\n \n \n
    \n );\n};\n","import { Content } from 'src/contexts/ContentContext';\nimport { Checkbox } from 'src/core/interim/Checkbox/Checkbox';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport * as styles from './TicketGroupInputTable.css';\n\nexport const TicketGroupInputTableHeader = ({\n isTotalCostChecked,\n setIsTotalCostChecked,\n}: {\n isTotalCostChecked: boolean;\n setIsTotalCostChecked: (value: React.SetStateAction) => void;\n}) => {\n return (\n
    \n \n
    \n {\n setIsTotalCostChecked((prev) => !prev);\n }}\n className={styles.headerCheckbox}\n />\n Add Total Costs\n
    \n
    \n );\n};\n","import { useCallback, useEffect, useState } from 'react';\nimport { UseFieldArrayReturn, useForm, useFormContext } from 'react-hook-form';\nimport { useDeliveryOverrideForNewTicketGroup } from 'src/hooks/api/useDeliveryOverrideForNewTicketGroup';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { SpreadsheetTable } from 'src/tables/SpreadsheetTable/SpreadsheetTable';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getInHandDateBasedOnEvent } from 'src/utils/eventWithDataUtils';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport { PurchaseTicketsInput } from 'src/utils/purchaseUtils';\nimport { ListingNote } from 'src/WebApiController';\n\nimport { PurchaseOrderInfoForTicketGroupInput } from '../../PurchaseTicketsFlow/TicketGroupInput.types';\nimport { useTicketGroupInputTableColumns } from './hooks/useTicketGroupInputTableColumns';\nimport { SeatRangeInputModal } from './SeatRangeInputModal';\nimport * as styles from './TicketGroupInputTable.css';\nimport { TicketGroupInputTableFooter } from './TicketGroupInputTableFooter';\nimport { TicketGroupInputTableHeader } from './TicketGroupInputTableHeader';\n\nexport const TicketGroupInputTable = ({\n purchaseTicketGroupInputField,\n valueOptionsContent,\n listingNotesMap,\n purchaseOrderInfo,\n}: {\n purchaseTicketGroupInputField: UseFieldArrayReturn<\n PurchaseTicketsInput,\n 'ticketGroups',\n 'id'\n >;\n valueOptionsContent: Record;\n listingNotesMap?: Record | null;\n purchaseOrderInfo: PurchaseOrderInfoForTicketGroupInput | null | undefined;\n}) => {\n const [isTotalCostChecked, setIsTotalCostChecked] = useState(false);\n const [selectedSeatRangeRowIndex, setSelectedSeatRangeRowIndex] = useState<\n number | null\n >(null);\n\n const { fields, append } = purchaseTicketGroupInputField;\n const { setValue, getValues, getFieldState, formState } =\n useFormContext();\n const seatRangeDialog = useBasicDialog();\n\n const launchSeatRangeDialog = useCallback((rowIndex: number) => {\n setSelectedSeatRangeRowIndex(rowIndex);\n seatRangeDialog.launchDialog();\n }, []);\n\n const ticketGroupColumnConfigs = useTicketGroupInputTableColumns({\n isTotalCostChecked,\n purchaseTicketGroupInputField,\n valueOptionsContent,\n listingNotesMap,\n launchSeatRangeDialog: launchSeatRangeDialog,\n });\n\n const options = {\n data: fields,\n columns: ticketGroupColumnConfigs,\n };\n\n const {\n isLoading: deliveryOverrideDefaultIsLoading,\n hasDefaultValues: hasDeliveryOverrideValues,\n deliveryTypeDefault,\n ticketTypeRulesDefault,\n inHandAtDefault,\n } = useDeliveryOverrideForNewTicketGroup(\n fields[0].event?.viagId,\n purchaseOrderInfo?.vendor?.id,\n purchaseOrderInfo?.vendAcc?.id,\n true, // isManual\n fields[0].ticketGroupId > 0 /* disabled if not new ticket group */\n );\n\n // Used for setting value when the default value is loaded\n useEffect(() => {\n if (!deliveryOverrideDefaultIsLoading) {\n fields.forEach((_, number) => {\n const inHandAt = getValues(`ticketGroups.${number}.inHandDate.value`);\n const delivType = getValues(\n `ticketGroups.${number}.deliveryType.value`\n );\n const desiredDelivType = deliveryTypeDefault ?? delivType;\n const ticketTypeOverrideField = getValues(\n `ticketGroups.${number}.ticketTypeRules`\n );\n if (deliveryTypeDefault && delivType !== deliveryTypeDefault) {\n setValue(\n `ticketGroups.${number}.deliveryType`,\n posChangedField(deliveryTypeDefault)\n );\n }\n\n if (inHandAtDefault && inHandAt !== inHandAtDefault) {\n setValue(\n `ticketGroups.${number}.inHandDate`,\n posChangedField(inHandAtDefault)\n );\n }\n\n if (ticketTypeRulesDefault) {\n setValue(`ticketGroups.${number}.ticketTypeRules`, {\n overrides: ticketTypeRulesDefault.overrides.filter(\n (o) => o.deliveryType === desiredDelivType\n ),\n });\n }\n });\n }\n }, [\n fields,\n deliveryOverrideDefaultIsLoading,\n deliveryTypeDefault,\n getValues,\n inHandAtDefault,\n setValue,\n ticketTypeRulesDefault,\n ]);\n\n useEffect(() => {\n const daysBeforeEvent = getValues('daysBeforeEvent');\n fields.forEach((tg, number) => {\n const inHandAt = getValues(`ticketGroups.${number}.inHandDate.value`);\n\n if (!inHandAt && tg.event?.dates?.start) {\n const inHandDate = getInHandDateBasedOnEvent(tg.event, daysBeforeEvent);\n setValue(\n `ticketGroups.${number}.inHandDate`,\n posChangedField(inHandDate)\n );\n }\n });\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [fields]);\n\n return (\n
    \n \n \n {seatRangeDialog.dialogProps.isOpen && (\n \n )}\n \n
    \n );\n};\n","import { isEqual } from 'lodash-es';\nimport React, { useCallback, useEffect } from 'react';\nimport {\n FormProvider,\n useFieldArray,\n UseFieldArrayReturn,\n useForm,\n useFormContext,\n} from 'react-hook-form';\nimport { useContent } from 'src/contexts/ContentContext';\nimport {\n EventMapContextProvider,\n useEventMapContext,\n} from 'src/contexts/EventMapContext';\nimport { vars } from 'src/core/themes';\nimport { PurchaseWizardFooter, WizardFooter } from 'src/modals/common/Purchase';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getInHandDateBasedOnEvent } from 'src/utils/eventWithDataUtils';\nimport { newBigIntId } from 'src/utils/idUtils';\nimport { posChangedField, posField } from 'src/utils/posFieldUtils';\nimport {\n PurchaseTicketsInput,\n validateTicketGroups,\n} from 'src/utils/purchaseUtils';\nimport {\n DeliveryType,\n EventListingConstraints,\n ListingNote,\n SectionInfo,\n TicketGroupInput,\n} from 'src/WebApiController';\n\nimport { PurchaseOrderInfoForTicketGroupInput } from '../PurchaseTicketsFlow/TicketGroupInput.types';\nimport { PurchaseTicketGroupHeader } from './PurchaseTicketGroupHeader';\nimport * as styles from './PurchaseTicketGroupPage.css';\nimport { PurchaseTicketGroupPageAdditionalInput } from './PurchaseTicketGroupPageAdditionalInput';\nimport { PurchaseTicketGroupVenueMap } from './PurchaseTicketGroupVenueMap';\nimport { useTicketGroupListingNotes } from './TicketGroupInputTable/hooks/useTicketGroupListingNotes';\nimport { TicketGroupInputTable } from './TicketGroupInputTable/TicketGroupInputTable';\n\nconst PurchaseTicketGroupPage = ({\n ticketGroups,\n listingConstraints,\n purchaseOrderInfo,\n onSubmitWrapper,\n startIndex,\n onNextFromTicketGroupInputStep,\n isSingleInputModeForMultiEvent,\n currentGroupIndex,\n currentGroupTicketsCount,\n onPrevFromTicketGroupInputStep,\n showPredeliverySection,\n}: {\n ticketGroups: TicketGroupInput[];\n listingConstraints?: EventListingConstraints | null;\n onSubmitWrapper: () => void;\n purchaseOrderInfo: PurchaseOrderInfoForTicketGroupInput | null | undefined;\n startIndex: number;\n onNextFromTicketGroupInputStep: (tgs: TicketGroupInput[]) => void;\n isSingleInputModeForMultiEvent?: boolean;\n currentGroupIndex: number;\n currentGroupTicketsCount: number;\n onPrevFromTicketGroupInputStep: () => void;\n showPredeliverySection: boolean;\n}) => {\n const { valueOptionsContent, listingNotesMap } = useTicketGroupListingNotes({\n listingConstraints,\n });\n\n const methods = useForm({\n defaultValues: {\n ticketGroups,\n },\n });\n\n const purchaseTicketGroupInputField = useFieldArray({\n control: methods.control,\n name: 'ticketGroups',\n });\n\n useEffect(() => {\n methods.reset({ ticketGroups });\n }, [methods, ticketGroups]);\n\n return (\n \n \n
    \n \n
    \n
    \n \n );\n};\n\nconst PurchaseTicketGroupPageInternal = ({\n ticketGroups,\n listingNotesMap,\n valueOptionsContent,\n purchaseTicketGroupInputField,\n purchaseOrderInfo,\n onSubmitWrapper,\n startIndex,\n onNextFromTicketGroupInputStep,\n isSingleInputModeForMultiEvent,\n currentGroupIndex,\n currentGroupTicketsCount,\n onPrevFromTicketGroupInputStep,\n showPredeliverySection,\n}: {\n ticketGroups: TicketGroupInput[];\n valueOptionsContent: Record;\n listingNotesMap?: Record;\n purchaseTicketGroupInputField: UseFieldArrayReturn<\n PurchaseTicketsInput,\n 'ticketGroups',\n 'id'\n >;\n purchaseOrderInfo: PurchaseOrderInfoForTicketGroupInput | null | undefined;\n onSubmitWrapper: () => void;\n startIndex: number;\n onNextFromTicketGroupInputStep: (tgs: TicketGroupInput[]) => void;\n isSingleInputModeForMultiEvent?: boolean;\n currentGroupIndex: number;\n currentGroupTicketsCount: number;\n onPrevFromTicketGroupInputStep: () => void;\n showPredeliverySection: boolean;\n}) => {\n const { venueMapInfo } = useEventMapContext();\n const methods = useFormContext();\n const requiredMsg = useContent(ContentId.Required);\n const duplicateSeatMsg = useContent(ContentId.DuplicateSeat);\n const eventRequiredMsg = useContent(ContentId.SearchAndSelectAnEvent);\n const inHandDateMustBeforeEventDateMsg = useContent(\n ContentId.InHandDateMustBeBeforeEventDate\n );\n const autoBroadcastRequireFaceValueMsg = useContent(\n ContentId.AutoBroadcastRequiredFaceValue\n );\n\n const onNext = useCallback(() => {\n const formTicketGroups = methods.getValues().ticketGroups;\n formTicketGroups.forEach((tg, number) => {\n const inHandAt = methods.getValues(\n `ticketGroups.${number}.inHandDate.value`\n );\n const daysBeforeEvent = methods.getValues('daysBeforeEvent');\n\n if (!inHandAt && tg.event?.dates?.start) {\n const inHandDate = getInHandDateBasedOnEvent(tg.event, daysBeforeEvent);\n\n methods.setValue(\n `ticketGroups.${number}.inHandDate`,\n posChangedField(inHandDate)\n );\n }\n });\n const isValidTgs = validateTicketGroups(\n true,\n methods.clearErrors,\n methods.setError,\n formTicketGroups,\n requiredMsg,\n duplicateSeatMsg,\n inHandDateMustBeforeEventDateMsg,\n autoBroadcastRequireFaceValueMsg,\n true\n );\n if (!isValidTgs) {\n return;\n }\n onNextFromTicketGroupInputStep(formTicketGroups);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [methods, onNextFromTicketGroupInputStep]);\n\n const onSectionClicked = useCallback(\n (e: MouseEvent, sectionInfo: SectionInfo) => {\n const sectionId = sectionInfo.id;\n if (!venueMapInfo) {\n return;\n }\n const section = venueMapInfo.sections.find(\n (section) => section.id === sectionId\n );\n\n purchaseTicketGroupInputField.append({\n ...ticketGroups[0],\n tickets: posField(null),\n ticketGroupId: newBigIntId(),\n section: posField(section?.name || ''),\n sectionId: posField(sectionId),\n row: posField(null),\n listingNotes: posField(null),\n numberOfTickets: posField(null),\n unitCost: posField(null),\n totalCost: posField(null),\n faceValueCost: posField(null),\n expectedValue: posField(null),\n deliveryType: posField(DeliveryType.InApp),\n });\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [venueMapInfo, purchaseTicketGroupInputField]\n );\n\n return (\n <>\n \n
    \n \n
    \n \n \n \n \n );\n};\n\nexport default React.memo(PurchaseTicketGroupPage);\n","import {\n DocumentPage,\n DocumentUploadInfo,\n Ticket,\n UserDocument,\n UserDocumentLinks,\n} from 'src/WebApiController';\n\nexport type ETicketsForm = {\n ticketAssignments: UserDocumentLinks[];\n};\n\nexport type DocumentFileUploadInfo = {\n file?: File;\n uploadInfo?: DocumentUploadInfo;\n pages?: DocumentPage[];\n};\n\nexport const getDocumentPageUniqueId = (ep: DocumentPage) =>\n `${ep.id}-${ep.documentId}`;\nexport const getETicketDocumentPageUniqueId = (ep: UserDocument) =>\n `${ep.pageId}-${ep.documentId}`;\n\nexport const getDocumentPagesMap = (docUploadInfos: DocumentFileUploadInfo[]) =>\n docUploadInfos\n .flatMap((x) => x.pages || [])\n .filter((ep) => ep)\n .reduce(\n (prev, cur) => {\n prev[getDocumentPageUniqueId(cur)] = cur;\n return prev;\n },\n {} as { [docPageUniqueId: string]: DocumentPage }\n );\n\nexport const getDocumentPageIdToTicketMap = (\n ticketAssignments: UserDocument[],\n tickets: Ticket[]\n) =>\n ticketAssignments.reduce(\n (prev, cur) => {\n const index = tickets.findIndex((t) => t.id === cur.entityId);\n prev[getETicketDocumentPageUniqueId(cur)] = {\n ticketIndex: index,\n ticket: tickets[index],\n };\n return prev;\n },\n {} as {\n [docPageUniqueId: string]: { ticketIndex: number; ticket: Ticket };\n }\n );\n","import { useQuery } from '@tanstack/react-query';\nimport { ComponentProps, ReactNode, useCallback, useState } from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { isSuccess } from 'src/utils/errorUtils';\nimport { EntityWithRealTickets } from 'src/utils/ticketUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ApiException,\n DocumentProcessorClient,\n DocumentType,\n DocumentUploadInfo,\n FileParameter,\n PosClientConfig,\n PosUiActionResult,\n TicketType,\n UserDocument,\n UserDocumentLinks,\n} from 'src/WebApiController';\n\nimport { DocumentFileUploadInfo, ETicketsForm } from './UploadETickets.utils';\n\nexport type UploadETicketFormProps = {\n entityWithTickets: Pick<\n EntityWithRealTickets,\n 'viagVirtualId' | 'id' | 'ticketCnt' | 'tickets' | 'seating' | 'entityType'\n >;\n renderContent: (\n eTicketUploadInfos: DocumentFileUploadInfo[],\n setETicketUploadInfos: (infos: DocumentFileUploadInfo[]) => void,\n onNext: () => void,\n onCancel: () => void,\n onBack: () => void,\n isFinalPreview: boolean,\n disabled?: boolean\n ) => ReactNode;\n onComplete: (isCancelled: boolean) => void;\n onUploadDocuments: (\n client: DocumentProcessorClient,\n docUploadInfo: DocumentUploadInfo,\n file: FileParameter\n ) => Promise;\n onUploadETickets: (\n posClientConfig: PosClientConfig,\n entityId: number,\n ticketAssignments: UserDocumentLinks[]\n ) => Promise;\n ticketType: TicketType.ETicket | TicketType.QRCode;\n};\n\nexport const UploadETicketForm = (props: UploadETicketFormProps) => {\n const methods = useForm({\n defaultValues: {\n ticketAssignments: props.entityWithTickets.tickets.map(\n (t) =>\n ({\n entityId: t.id,\n pageId:\n (props.ticketType === TicketType.ETicket\n ? t.eTicket?.pageId\n : t.qrCode?.pageId) ?? '',\n documentId:\n (props.ticketType === TicketType.ETicket\n ? t.eTicket?.documentId\n : t.qrCode?.documentId) ?? '',\n pageNumber:\n (props.ticketType === TicketType.ETicket\n ? t.eTicket?.pageNumber\n : t.qrCode?.pageNumber) ?? '',\n pageUri:\n (props.ticketType === TicketType.ETicket\n ? t.eTicket?.pageUri\n : t.qrCode?.pageUri) ?? '',\n documentUri:\n (props.ticketType === TicketType.ETicket\n ? t.eTicket?.documentUri\n : t.qrCode?.documentUri) ?? '',\n documentType:\n props.ticketType === TicketType.ETicket\n ? (t.eTicket?.documentType ?? DocumentType.ETicket)\n : (t.qrCode?.documentType ?? DocumentType.QRCode),\n }) as UserDocument\n ),\n },\n });\n return (\n \n \n \n );\n};\n\nconst UploadETicketsContent = ({\n entityWithTickets,\n ticketType,\n renderContent,\n onComplete,\n onUploadDocuments,\n onUploadETickets,\n setError,\n clearErrors,\n watch,\n handleSubmit,\n}: UploadETicketFormProps &\n Omit<\n ComponentProps>,\n 'children'\n >) => {\n const [eTicketUploadInfos, setETicketUploadInfos] = useState<\n DocumentFileUploadInfo[]\n >([]);\n const [isLoading, setIsLoading] = useState(false);\n const [isFinalPreview, setIsFinalPreview] = useState(false);\n const { showErrorDialog, genericError } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n\n const watchTickets = watch('ticketAssignments'); // you can supply default value as second argument\n\n const getIncompleteUploadInfos = (infos?: DocumentFileUploadInfo[]) =>\n infos?.filter(\n (f) => f.file && f.uploadInfo && (!f.pages || f.pages.length === 0)\n ) || [];\n\n const requiredMsg = useContent(ContentId.Required);\n\n const query = useQuery({\n queryKey: [\n 'pollingForETicketUploadFiles',\n eTicketUploadInfos.map((ui) => ui.file?.name || '').toSorted(),\n ],\n queryFn: async () => {\n if (activeAccountWebClientConfig.activeAccountId == null) {\n return null;\n }\n setIsLoading(true);\n\n const client = new DocumentProcessorClient(activeAccountWebClientConfig);\n let infoChanged = false;\n\n const results = eTicketUploadInfos.map(async (f) => {\n if (f.pages && f.pages.length > 0) {\n return f; // We already gotten data for this or doesn't have upload info yet, just return\n }\n\n if (f.file) {\n // If we don't have upload info yet, get it, and upload the file\n if (!f.uploadInfo) {\n // The upload has been deleted and needing to be re-upload\n const uploadInfo = await client.getDocumentUploadInfo(\n entityWithTickets.id,\n ticketType === TicketType.ETicket\n ? DocumentType.ETicket\n : DocumentType.QRCode,\n f.file.type\n );\n\n await onUploadDocuments(client, uploadInfo, {\n data: f.file,\n fileName: f.file.name,\n });\n\n f.uploadInfo = uploadInfo;\n infoChanged = true;\n } else {\n // if we do have upload info, we want to query for the pages\n // but we do not want to do this immediately after the upload, hence, this is an else\n // meaning another refresh cycle has ran in useQuery\n const eTicketPages = await client.getDocumentPages(\n f.uploadInfo.entityId,\n f.uploadInfo.entityType,\n f.uploadInfo.documentType,\n f.uploadInfo.blobName,\n f.uploadInfo.documentId,\n f.uploadInfo.contentType\n );\n\n infoChanged = true;\n return { ...f, pages: eTicketPages } as DocumentFileUploadInfo;\n }\n }\n\n return f;\n });\n\n let allResults = await Promise.all(results);\n\n const fileWithNoPages = getIncompleteUploadInfos(allResults);\n const isAllLoaded = fileWithNoPages.length === 0;\n if (isAllLoaded) {\n setIsLoading(false);\n }\n\n const emptyEntries = allResults.filter(\n (u) =>\n u.file === undefined &&\n u.uploadInfo === undefined &&\n u.pages === undefined\n );\n if (emptyEntries.length !== 1) {\n const nonEmptyEntries = allResults.filter(\n (u) =>\n !(\n u.file === undefined &&\n u.uploadInfo === undefined &&\n u.pages === undefined\n )\n );\n // Always ensure there's an extra empty-upload-info\n // This allow the seat-assignment to add additional files\n nonEmptyEntries.push({\n file: undefined,\n uploadInfo: undefined,\n pages: undefined,\n } as DocumentFileUploadInfo);\n\n allResults = nonEmptyEntries;\n infoChanged = true;\n }\n\n if (infoChanged) {\n setETicketUploadInfos(allResults);\n }\n return allResults;\n },\n\n staleTime: Infinity, // We don't want useQuery to auto-refresh base on stale, we control our own refetch\n gcTime: 0, // we don't want to cache this data\n refetchOnWindowFocus: false,\n networkMode: 'offlineFirst',\n refetchInterval: () => {\n if (!eTicketUploadInfos) {\n return 1000;\n }\n const fileWithNoPages = getIncompleteUploadInfos(eTicketUploadInfos);\n return fileWithNoPages.length > 0 ? 1000 : false; // keep on refreshing until all files in prev (uploadInfos) has pages\n },\n meta: {\n persist: false, // we do not want this thing persisted between sessions\n },\n });\n\n if (query.failureReason) {\n showErrorDialog(\n 'DocumentProcessorClient.pollingForETicketUploadFiles',\n { message: query.failureReason.message },\n {\n trackErrorData: {\n eTicketUploadInfos,\n },\n }\n );\n }\n\n const validateTicketAssignment = useCallback(\n (t: UserDocument, index: number) => {\n if (!t.documentId || !t.pageId) {\n setError(\n `ticketAssignments.${index}`,\n {\n message: requiredMsg,\n },\n { shouldFocus: true }\n );\n\n return false;\n } else {\n clearErrors(`ticketAssignments.${index}`);\n\n return true;\n }\n },\n [clearErrors, requiredMsg, setError]\n );\n\n const onNext = useCallback(async () => {\n if (!isLoading) {\n if (!isFinalPreview) {\n // Validate first\n watchTickets.forEach((t, i) => {\n validateTicketAssignment(t, i);\n });\n\n if (watchTickets.filter((t) => t.pageId === '').length === 0) {\n // If we get to here, we're ready to preview the assigned tickets to the seats\n setIsFinalPreview(true);\n }\n }\n }\n }, [isFinalPreview, isLoading, validateTicketAssignment, watchTickets]);\n\n const onSubmit = useCallback(\n async ({ ticketAssignments }: ETicketsForm) => {\n // Validate first\n let isValid = true;\n ticketAssignments.forEach((t, i) => {\n isValid = isValid && validateTicketAssignment(t, i);\n });\n\n if (!isValid) {\n return;\n }\n\n tryInvokeApi(\n async () => {\n setIsLoading(true);\n\n const result = await onUploadETickets?.(\n activeAccountWebClientConfig,\n entityWithTickets.id,\n ticketAssignments\n );\n if (!isSuccess(result)) {\n showErrorDialog(\n 'SaleClient.saveETicketAssignments',\n {\n message: result!.message ?? genericError,\n status: result!.status!,\n } as ApiException,\n {\n onDismissError: () => onComplete(true),\n trackErrorData: {\n entityId: entityWithTickets.id,\n ticketAssignments,\n },\n }\n );\n } else {\n onComplete(false);\n }\n },\n (error) => {\n showErrorDialog('SaleClient.saveETicketAssignments', error, {\n trackErrorData: {\n entityId: entityWithTickets.id,\n ticketAssignments,\n },\n });\n },\n () => setIsLoading(false)\n );\n },\n [\n validateTicketAssignment,\n onUploadETickets,\n activeAccountWebClientConfig,\n entityWithTickets.id,\n showErrorDialog,\n genericError,\n onComplete,\n ]\n );\n\n const onUploadClick = useCallback(async () => {\n handleSubmit(onSubmit)();\n }, [handleSubmit, onSubmit]);\n\n const onCancel = () => {\n setETicketUploadInfos([]);\n setIsLoading(false);\n setIsFinalPreview(false);\n\n onComplete(true);\n };\n\n return renderContent(\n query.data || eTicketUploadInfos,\n setETicketUploadInfos,\n isFinalPreview ? onUploadClick : onNext,\n onCancel,\n () => (isFinalPreview ? setIsFinalPreview(false) : onCancel()),\n isFinalPreview,\n isLoading\n );\n};\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport const UploadETicketsInstructions = styled.p`\n color: ${(props) => props.theme.colors.textPrimary};\n`;\n\nexport const UploadETicketsSubInstructions = styled.p`\n color: ${(props) => props.theme.colors.textPrimary};\n font-size: ${() => vars.typography.fontSize['sm']};\n display: flex;\n justify-content: space-between;\n align-items: center;\n`;\n\nexport const UploadETicketsThumbnailContainer = styled.div`\n min-width: 200px;\n margin-inline-end: ${() => vars.spacing.sm};\n height: calc(100% - ${() => vars.spacing.xl});\n overflow-y: auto;\n\n .draggable-page {\n padding: ${() => vars.spacing.xl};\n &:hover {\n background-color: ${(props) => props.theme.colors.backgroundSecondary};\n }\n }\n\n ${({ theme: { media } }) =>\n `${media.makeMediaQuery(\n media.breakpoints.md,\n `\n margin-inline-end: ${vars.spacing.lg};\n `\n )}`}\n`;\n\nexport const UploadETicketsThumbnailLoader = styled.div`\n border: 1px solid ${(props) => props.theme.colors.borderPrimary};\n padding: ${() => vars.spacing.lg};\n &:not(:last-child) {\n margin-bottom: ${() => vars.spacing.lg};\n }\n`;\n\nexport const UploadETicketsThumbnailAssigned = styled.div`\n padding: ${() => vars.spacing.xl};\n &:hover {\n background-color: ${(props) => props.theme.colors.backgroundSecondary};\n }\n`;\n\nexport const UploadETicketsThumbnailAssignedMappedTo = styled.div`\n display: flex;\n div {\n margin-left: ${() => vars.spacing.sm};\n }\n`;\n\nexport const UploadETicketsSeatingContainer = styled.div`\n height: calc(100% - ${() => vars.spacing.xl});\n overflow-y: auto;\n overflow-x: hidden;\n\n .draggable-seat {\n &:hover {\n background-color: ${(props) => props.theme.colors.backgroundSecondary};\n }\n }\n`;\n\nexport const UploadETicketsSeatingPlaceholder = styled.div`\n color: ${(props) => props.theme.colors.textPrimaryHover};\n padding: ${() => vars.spacing.lg};\n\n ${({ theme: { media } }) =>\n `${media.makeMediaQuery(\n media.breakpoints.md,\n `\n padding: ${vars.spacing['3xl']};\n `\n )}`}\n`;\n\nexport const UploadETicketsSeat = styled.div`\n height: fit-content;\n overflow: hidden;\n &:not(:last-child) {\n margin-bottom: ${() => vars.spacing.lg};\n }\n`;\n\nexport const PreviewTicket = styled.div`\n width: 100%;\n margin-bottom: ${() => `${vars.spacing.lg}`};\n`;\n\nexport const Divider = styled.hr`\n border: none;\n border-bottom: 4px dotted ${(props) => props.theme.colors.borderPrimary};\n margin: ${() => `${vars.spacing.sm} 0`};\n`;\n\nexport const SeatLabel = styled.div`\n margin-bottom: ${() => `${vars.spacing.sm}`};\n`;\n","import styled from 'styled-components/macro';\n\nexport const ErrorMessage = styled.div`\n color: ${(props) => props.theme.colors.textNegative};\n`;\n","import '@react-pdf-viewer/core/lib/styles/index.css';\nimport '@react-pdf-viewer/toolbar/lib/styles/index.css';\n\nimport { Viewer } from '@react-pdf-viewer/core';\nimport { getFilePlugin, RenderDownloadProps } from '@react-pdf-viewer/get-file';\nimport { SelectionMode } from '@react-pdf-viewer/selection-mode';\nimport type {\n ToolbarSlot,\n TransformToolbarSlot,\n} from '@react-pdf-viewer/toolbar';\nimport { toolbarPlugin } from '@react-pdf-viewer/toolbar';\nimport clsx from 'clsx';\nimport {\n ComponentProps,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport { GlassMagnifier } from 'react-image-magnifiers';\nimport { IconButton } from 'src/components/Buttons';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useSiteTheme } from 'src/contexts/SiteTheme/SiteThemeContext';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { DownloadIcon } from 'src/svgs/Viagogo';\nimport {\n ActionOutboxEntityType,\n ActivityLogClient,\n DocumentType,\n Feature,\n} from 'src/WebApiController';\nimport { ThemeContext } from 'styled-components';\n\nimport * as styles from './ImageMagnifier.css';\nimport { viewerWrapper } from './ImageMagnifier.css';\n\nexport type ImageMagnifierProps = {\n trackingEntityType?: ActionOutboxEntityType;\n trackingEntityId?: number | null;\n trackingDocumentId?: string;\n trackingDocumentType?: DocumentType;\n pdfViewerClassnames?: string;\n toolbarSlot?: Partial;\n} & ComponentProps;\n\n/**\n * Documentation of all props: https://github.com/AdamRisberg/react-image-magnifiers\n * Simple wrapper to provide some defaults for PoS usage.\n * `imageSrc` is most likely the only prop that will need to be provided.\n *\n * Future:\n * - Handle mobile detection\n * - set different values (X and Y offset, mag size, etc)\n * - or diff experience leveraging `Magnifier` or to open in a new window\n */\nexport const ImageMagnifier = ({\n magnifierSize = '20%',\n magnifierBorderColor,\n allowOverflow = true,\n imageSrc,\n trackingEntityType,\n trackingEntityId,\n trackingDocumentId,\n trackingDocumentType,\n pdfViewerClassnames,\n toolbarSlot,\n ...rest\n}: ImageMagnifierProps) => {\n const isMobile = useMatchMedia('mobile');\n const theme = useContext(ThemeContext);\n const { isDarkMode } = useSiteTheme();\n const [displayAsEmbed, setDisplayAsEmbed] = useState(false);\n const { activeAccountWebClientConfig } = useAppContext();\n\n const hasPdfViewerToolbarFeature = useUserHasFeature(\n Feature.PdfViewerToolbar\n );\n\n const getFilePluginInstance = getFilePlugin();\n const { Download } = getFilePluginInstance;\n\n const toolbarPluginInstance = toolbarPlugin({\n selectionModePlugin: {\n selectionMode: SelectionMode.Hand,\n },\n });\n const { renderDefaultToolbar, Toolbar } = toolbarPluginInstance;\n\n const shouldTrackDocumentEntityAction = useMemo(() => {\n return (\n trackingEntityType === ActionOutboxEntityType.Listing &&\n trackingEntityId &&\n trackingDocumentId &&\n trackingDocumentType\n );\n }, [\n trackingDocumentId,\n trackingDocumentType,\n trackingEntityId,\n trackingEntityType,\n ]);\n\n useEffect(() => {\n if (shouldTrackDocumentEntityAction && trackingEntityId) {\n new ActivityLogClient(\n activeAccountWebClientConfig\n ).trackListingDocumentView(\n trackingEntityId,\n trackingDocumentId,\n trackingDocumentType\n );\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [shouldTrackDocumentEntityAction]);\n\n const trackDownload = useCallback(() => {\n if (shouldTrackDocumentEntityAction && trackingEntityId) {\n new ActivityLogClient(\n activeAccountWebClientConfig\n ).trackListingDocumentDownload(\n trackingEntityId,\n trackingDocumentId,\n trackingDocumentType\n );\n }\n }, [\n activeAccountWebClientConfig,\n shouldTrackDocumentEntityAction,\n trackingDocumentId,\n trackingDocumentType,\n trackingEntityId,\n ]);\n\n const transform: TransformToolbarSlot = (slot: ToolbarSlot) => ({\n ...slot,\n // These slots will be empty\n Download: () => (\n \n {(props: RenderDownloadProps) => (\n }\n onClick={() => {\n trackDownload();\n props.onClick();\n }}\n />\n )}\n \n ),\n Open: () => <>,\n Print: () => <>,\n SwitchTheme: () => <>,\n EnterFullScreen: () => <>,\n ShowPropertiesMenuItem: () => <>, // Important to hide this as it will show the file name\n ShowProperties: () => <>, // Important to hide this as it will show the file name\n ...toolbarSlot,\n });\n\n return (\n <>\n {/* due to some ticket URL is pure PDF (not images extracted from pdf) - the ImageMagnifier won't work but we have no way of knowing\n therefore we use an img to test the waters, but actually not displaying it, if we get an error, then use embed istead */}\n {\n setDisplayAsEmbed(true);\n }}\n />\n {!displayAsEmbed ? (\n \n ) : (\n \n \n {hasPdfViewerToolbarFeature ? (\n {renderDefaultToolbar(transform)}\n ) : (\n \n {(props: RenderDownloadProps) => (\n }\n onClick={() => {\n trackDownload();\n props.onClick();\n }}\n />\n )}\n \n )}\n \n
    \n \n
    \n \n )}\n \n );\n};\n","import { HTMLProps, useEffect, useRef } from 'react';\nimport { useDrag } from 'react-dnd';\nimport { getEmptyImage } from 'react-dnd-html5-backend';\n\nimport { PosCustomDragData } from './PosCustomDragLayer';\nimport * as styles from './PosDragNDrop.css';\n\nexport const DraggableSource = 'DnDDraggable';\n\nexport function PosDraggable({\n draggableData,\n previewDragData,\n children,\n hideElementWhileDragging,\n draggableSource,\n ...rest\n}: {\n draggableData: T;\n previewDragData?: PosCustomDragData;\n hideElementWhileDragging?: boolean;\n draggableSource?: string;\n} & Omit, 'ref' | 'as'>) {\n const dragContainerRef = useRef(null);\n\n const [{ isDragging }, dragRef, dragPreview] = useDrag(\n () => ({\n type: draggableSource || DraggableSource,\n item: () => {\n document.body.classList.add('dragging');\n return {\n data: { ...draggableData, pageRef: dragContainerRef },\n dragData: previewDragData,\n };\n },\n collect: (monitor) => ({\n isDragging: monitor.isDragging(),\n handlerId: monitor.getHandlerId(),\n }),\n end: () => document.body.classList.remove('dragging'),\n }),\n [draggableSource, previewDragData, draggableData, dragContainerRef]\n );\n\n useEffect(() => {\n dragPreview(getEmptyImage(), { captureDraggingState: false });\n }, [dragPreview]);\n\n dragRef(dragContainerRef);\n\n return (\n \n {children}\n \n );\n}\n","export default \"__VITE_ASSET__5595ea01__\"","export default \"__VITE_ASSET__2764187a__\"","import { PosDraggableIndicatorHandles } from 'src/core/POS/PosDragNDrop/PosDraggableIndicator';\nimport { vars } from 'src/core/themes';\nimport HorizontalDraghandles from 'src/images/Horizontal.png';\nimport VerticalDraghandles from 'src/images/Vertical.png';\nimport styled from 'styled-components/macro';\n\nexport const DroppableContainer = styled.div<{\n isOver: boolean;\n hideBorder?: boolean;\n}>`\n background-color: ${(props) =>\n props.isOver\n ? props.theme.colors.backgroundInteraction\n : props.theme.colors.backgroundPrimary};\n\n ${(props) =>\n !props.hideBorder\n ? `border: 1px solid ${\n props.isOver\n ? props.theme.colors.borderActive\n : props.theme.colors.borderPrimary\n }`\n : 'border: none'};\n\n height: 100%;\n`;\n\nexport const PosCustomDragLayerContainer = styled.div.attrs(\n (props: { currentOffsetX: number; currentOffsetY: number }) => ({\n style: {\n transform: `translate(${props.currentOffsetX}px, ${props.currentOffsetY}px)`,\n },\n })\n)<{ currentOffsetX: number; currentOffsetY: number }>`\n position: fixed;\n top: 0;\n left: 0;\n z-index: 100;\n pointer-events: none; // This is the key to be able to grab anywhere inside the draggable area to drag\n\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n background: white;\n border: 1px solid ${(props) => props.theme.colors.borderPrimary};\n`;\n\nexport const DragHandles = styled.div<\n PosDraggableIndicatorHandles & { removeHoverEffect?: boolean }\n>`\n width: 100%;\n height: 100%;\n padding: ${vars.spacing.sm} ${vars.spacing.xl} ${vars.spacing.xl};\n background-image: ${({\n rightHandle,\n bottomHandle,\n leftHandle,\n topHandle,\n }) => `\n ${topHandle ? `url(${HorizontalDraghandles})` : 'none'}, \n ${rightHandle ? `url(${VerticalDraghandles})` : 'none'},\n ${bottomHandle ? `url(${HorizontalDraghandles})` : 'none'},\n ${leftHandle ? `url(${VerticalDraghandles})` : 'none'}\n `};\n background-size:\n 20px 10px,\n 10px 20px,\n 20px 10px,\n 10px 20px;\n\n background-position:\n 50% ${vars.spacing.sm},\n calc(100% - ${vars.spacing.sm}) 50%,\n 50% calc(100% - ${vars.spacing.sm}),\n ${vars.spacing.sm} 50%;\n background-repeat: no-repeat;\n &:hover {\n background-color: ${(props) => {\n return props.removeHoverEffect\n ? 'unset'\n : `${props.theme.colors.backgroundSecondary}`;\n }};\n }\n`;\n","import { ReactNode } from 'react';\n\nimport { DragHandles } from './PosDragNDrop.styled';\n\nexport interface PosDraggableIndicatorHandles {\n topHandle?: boolean;\n rightHandle?: boolean;\n bottomHandle?: boolean;\n leftHandle?: boolean;\n}\n\ninterface PosDraggableIndicatorProps extends PosDraggableIndicatorHandles {\n children: ReactNode;\n classNames?: string;\n removeHoverEffect?: boolean;\n}\n\nexport function PosDraggableIndicator({\n children,\n topHandle = true,\n rightHandle = true,\n bottomHandle = true,\n leftHandle = true,\n classNames,\n removeHoverEffect = false,\n}: PosDraggableIndicatorProps) {\n return (\n \n {children}\n \n );\n}\n","import { clsx } from 'clsx';\nimport { HTMLProps } from 'react';\nimport { useDrop } from 'react-dnd';\n\nimport { DraggableSource } from './PosDraggable';\nimport { DroppableContainer } from './PosDragNDrop.styled';\n\nexport function PosDroppable({\n children,\n onDrop,\n hideBorder,\n className,\n onOverClassnames,\n draggableSource,\n ...rest\n}: {\n onDrop?: (item: { data: T }) => void;\n hideBorder?: boolean;\n onOverClassnames?: string;\n draggableSource?: string;\n} & Omit, 'ref' | 'as' | 'onDrop'>) {\n const [{ isOver }, dropRef] = useDrop(\n {\n accept: draggableSource || DraggableSource,\n drop: onDrop,\n collect: (monitor) => ({\n isOver: monitor.isOver(),\n canDrop: monitor.canDrop(),\n }),\n },\n [draggableSource, onDrop]\n );\n\n return (\n \n {children}\n \n );\n}\n","import { DragLayerMonitor, useDragLayer } from 'react-dnd';\n\nimport { PosCustomDragLayerContainer } from './PosDragNDrop.styled';\n\nexport type PosCustomDragData = {\n name: string | JSX.Element;\n source: string;\n width?: number;\n height?: number;\n};\n\nexport const PosCustomDragLayer = () => {\n const { item, currentOffset } = useDragLayer((monitor: DragLayerMonitor) => {\n return {\n isDragging: monitor.isDragging(),\n item: monitor.getItem() as { dragData: PosCustomDragData },\n currentOffset: monitor.getSourceClientOffset(),\n };\n });\n\n const dragData = item?.dragData;\n\n return dragData ? (\n \n
    {dragData.name}
    \n \n \n ) : null;\n};\n","import { useCallback } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { CloseButton } from 'reactstrap';\nimport { SeatingInfo } from 'src/components/common/SeatingInfo';\nimport { Content, FormatContent } from 'src/contexts/ContentContext';\nimport { ErrorMessage } from 'src/core/POS/ErrorMessage';\nimport { ImageMagnifier } from 'src/core/POS/ImageMagnifier';\nimport {\n PosDraggable,\n PosDraggableIndicator,\n PosDroppable,\n} from 'src/core/POS/PosDragNDrop';\nimport { PosCustomDragLayer } from 'src/core/POS/PosDragNDrop/PosCustomDragLayer';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { EntityWithRealTickets } from 'src/utils/ticketUtils';\nimport {\n DocumentPage,\n DocumentType,\n Ticket,\n TicketType,\n} from 'src/WebApiController';\n\nimport * as styles from '../UploadETickets.css';\nimport {\n SeatLabel,\n UploadETicketsSeat,\n UploadETicketsSeatingContainer,\n UploadETicketsSeatingPlaceholder,\n} from '../UploadETickets.styled';\nimport {\n DocumentFileUploadInfo,\n ETicketsForm,\n getDocumentPagesMap,\n getETicketDocumentPageUniqueId,\n} from '../UploadETickets.utils';\n\nexport function UploadETicketsSeatingSection({\n entityWithTickets,\n eTicketUploadInfos,\n ticketType,\n isFinalPreview,\n}: {\n entityWithTickets: Pick<\n EntityWithRealTickets,\n 'viagVirtualId' | 'id' | 'ticketCnt' | 'tickets' | 'seating' | 'entityType'\n >;\n ticketType: TicketType.ETicket | TicketType.QRCode;\n eTicketUploadInfos: DocumentFileUploadInfo[];\n isFinalPreview?: boolean;\n}) {\n const eTicketPages = getDocumentPagesMap(eTicketUploadInfos);\n const { watch, setValue, clearErrors, formState } =\n useFormContext();\n const watchTickets = watch('ticketAssignments'); // you can supply default value as second argument\n\n const onDroppingToSeat = useCallback(\n (eTicket: DocumentPage, ticket: Ticket, ticketIndex: number) => {\n setValue(`ticketAssignments.${ticketIndex}`, {\n entityId: ticket.id,\n documentId: eTicket.documentId,\n pageNumber: eTicket.pageNumber,\n pageId: eTicket.id,\n pageUri: eTicket.thumbUrl,\n documentUri: eTicket.documentUrl,\n documentType:\n ticketType === TicketType.ETicket\n ? DocumentType.ETicket\n : DocumentType.QRCode,\n });\n clearErrors(`ticketAssignments.${ticketIndex}`);\n },\n [clearErrors, setValue, ticketType]\n );\n\n const onUnmappingFromSeat = useCallback(\n (ticket: Ticket, ticketIndex: number) => {\n setValue(`ticketAssignments.${ticketIndex}`, {\n entityId: ticket.id,\n documentId: '',\n pageNumber: 0,\n pageId: '',\n pageUri: '',\n documentUri: '',\n documentType: null,\n });\n },\n [setValue]\n );\n\n return (\n
    \n
    \n \n
    \n \n {entityWithTickets.tickets.map((t, i) => {\n const assignment = watchTickets.find((wt) => wt.entityId === t.id);\n const eTicketPage =\n assignment &&\n eTicketPages[getETicketDocumentPageUniqueId(assignment)];\n\n const error = formState?.errors?.ticketAssignments?.[i]?.message;\n return (\n \n \n onDrop={(args: { data: DocumentPage }) => {\n if (eTicketPage) {\n if (\n eTicketPage.id === args.data.id &&\n eTicketPage.documentId === args.data.documentId\n ) {\n // same stuff, dont' do anything\n return;\n } else {\n // Unmap the seat first prior to setting a new one, so that the rendering can happen properly\n onUnmappingFromSeat(t, i);\n }\n }\n onDroppingToSeat(args.data, t, i);\n }}\n >\n {eTicketPage ? (\n \n ),\n source: eTicketPage.thumbUrl,\n }}\n >\n \n
    \n \n {!isFinalPreview && (\n onUnmappingFromSeat(t, i)}\n />\n )}\n
    \n \n
    \n \n ) : assignment?.pageUri ? (\n \n
    \n \n \n \n {!isFinalPreview && (\n onUnmappingFromSeat(t, i)}\n />\n )}\n
    \n \n
    \n ) : (\n <>\n \n \n \n \n \n )}\n \n {error && {error}}\n \n
    \n );\n })}\n
    \n
    \n );\n}\n","import { Content } from 'src/contexts/ContentContext';\nimport { mergeProps } from 'src/core/utils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { EntityWithRealTickets } from 'src/utils/ticketUtils';\nimport { TicketType } from 'src/WebApiController';\n\nimport * as styles from '../UploadETickets.css';\nimport { UploadETicketsInstructions } from '../UploadETickets.styled';\nimport { DocumentFileUploadInfo } from '../UploadETickets.utils';\nimport { UploadETicketsSeatingSection } from './UploadETicketsSeatingSection';\n\nexport const UploadETicketsFinalPreviewBody = ({\n ticketType,\n entityWithTickets,\n eTicketUploadInfos,\n className,\n}: {\n ticketType: TicketType.ETicket | TicketType.QRCode;\n entityWithTickets: Pick<\n EntityWithRealTickets,\n 'viagVirtualId' | 'id' | 'ticketCnt' | 'tickets' | 'seating' | 'entityType'\n >;\n eTicketUploadInfos: DocumentFileUploadInfo[];\n className?: string;\n}) => {\n return (\n \n \n \n \n\n
    \n \n
    \n \n );\n};\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport const SingleFileUploadWithPreviewContainer = styled.div`\n display: flex;\n flex-direction: column;\n width: 100%;\n padding: ${() => `${vars.spacing.lg}`};\n &:not(:last-child) {\n margin-bottom: ${() => vars.spacing.lg};\n }\n\n border: 1px solid ${(props) => props.theme.colors.borderPrimary};\n`;\n\nexport const PageContainer = styled.div`\n display: flex;\n flex-direction: column;\n &:not(:last-child) {\n margin-bottom: ${() => vars.spacing.lg};\n }\n`;\n\nexport const PageImageContainer = styled.div`\n display: flex;\n flex-direction: column;\n border: 1px solid ${(props) => props.theme.colors.borderPrimary};\n padding: ${() => vars.spacing.lg};\n\n &:not(:last-child) {\n margin-bottom: ${() => vars.spacing.lg};\n }\n`;\n\nexport const UploadFailure = styled.div`\n color: ${(props) => props.theme.colors.textNegative};\n`;\n","import { CloseButton } from 'reactstrap';\nimport { Content, FormatContent } from 'src/contexts/ContentContext';\nimport { DnDFileUploader } from 'src/core/POS/DnDFileUploader';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\n\nimport { ImageMagnifier } from '../ImageMagnifier';\nimport * as styles from './SingleFileUploadWithPreview.css';\nimport {\n PageContainer,\n PageImageContainer,\n SingleFileUploadWithPreviewContainer,\n UploadFailure,\n} from './SingleFileUploadWithPreview.styled';\n\nexport const SingleFileUploadWithPreview = <\n TPage extends { pageNumber: number; thumbUrl: string },\n>({\n fileName,\n filePages = [],\n previewWidth = 'auto',\n previewHeight = 'auto',\n onFileDeleted,\n isDeletable,\n onNewFileSelected,\n acceptedFileTypes,\n renderPreview,\n multiple = false,\n hasError,\n maxFileSize,\n}: {\n fileName?: string;\n filePages: TPage[];\n previewWidth?: string | number;\n previewHeight?: string | number;\n onFileDeleted: () => void;\n isDeletable?: boolean;\n onNewFileSelected: (files: File[]) => void;\n acceptedFileTypes?: string[];\n renderPreview?: (page: TPage) => JSX.Element;\n multiple?: boolean;\n hasError?: boolean;\n maxFileSize?: number;\n}) => {\n return (\n \n {fileName && (\n
    \n
    {fileName}
    \n {((filePages?.length > 0 && isDeletable) || hasError) && (\n onFileDeleted()} />\n )}\n
    \n )}\n {hasError ? (\n \n \n \n ) : filePages.length > 0 ? (\n filePages\n .toSorted((a, b) => a.pageNumber - b.pageNumber)\n .map((fp) =>\n renderPreview ? (\n \n {renderPreview(fp)}\n \n ) : (\n \n {filePages.length > 1 && (\n
    \n \n
    \n )}\n \n
    \n )\n )\n ) : (\n
    \n \n files[0] && onNewFileSelected(multiple ? files : [files[0]])\n }\n multiple={multiple}\n acceptedFileTypes={acceptedFileTypes}\n maxFileSize={maxFileSize}\n />\n
    \n )}\n
    \n );\n};\n","import { useCallback, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { CancelButton } from 'src/components/Buttons';\nimport { SeatingInfo } from 'src/components/common/SeatingInfo';\nimport { Content, FormatContent } from 'src/contexts/ContentContext';\nimport { ImageMagnifier } from 'src/core/POS/ImageMagnifier';\nimport {\n PosDraggable,\n PosDraggableIndicator,\n PosDroppable,\n} from 'src/core/POS/PosDragNDrop';\nimport { PosCustomDragLayer } from 'src/core/POS/PosDragNDrop/PosCustomDragLayer';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { SingleFileUploadWithPreview } from 'src/core/POS/SingleFileUploadWithPreview';\nimport { MAX_ALLOWED_UPLOAD_FILE_SIZE } from 'src/core/utils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { EntityWithRealTickets } from 'src/utils/ticketUtils';\nimport { DocumentPage, Ticket } from 'src/WebApiController';\n\nimport * as styles from '../UploadETickets.css';\nimport {\n UploadETicketsSubInstructions,\n UploadETicketsThumbnailAssigned,\n UploadETicketsThumbnailAssignedMappedTo,\n UploadETicketsThumbnailContainer,\n UploadETicketsThumbnailLoader,\n} from '../UploadETickets.styled';\nimport {\n DocumentFileUploadInfo,\n ETicketsForm,\n getDocumentPageIdToTicketMap,\n getDocumentPageUniqueId,\n} from '../UploadETickets.utils';\n\nexport function UploadETicketsThumbnailSection({\n eTicketUploadInfos,\n setETicketUploadInfos,\n entitWithTickets,\n}: {\n entitWithTickets: Pick<\n EntityWithRealTickets,\n 'viagVirtualId' | 'id' | 'ticketCnt' | 'tickets' | 'seating'\n >;\n eTicketUploadInfos: DocumentFileUploadInfo[];\n setETicketUploadInfos: (infos: DocumentFileUploadInfo[]) => void;\n}) {\n const { watch, setValue } = useFormContext();\n const watchTickets = watch('ticketAssignments'); // you can supply default value as second argument\n\n const mappedETicketIds = useMemo(\n () => getDocumentPageIdToTicketMap(watchTickets, entitWithTickets!.tickets),\n [entitWithTickets, watchTickets]\n );\n\n const onDroppingRemovingTicketFromSeat = useCallback(\n (ticket: Ticket, ticketIndex: number) => {\n setValue(`ticketAssignments.${ticketIndex}`, {\n entityId: ticket.id,\n documentId: '',\n pageNumber: 0,\n pageId: '',\n pageUri: '',\n documentUri: '',\n documentType: null,\n });\n },\n [setValue]\n );\n\n const onDroppingToThumbnails = useCallback(\n (\n sourcePage: DocumentPage,\n destinationPage: DocumentPage,\n destinationTicket: { ticket: Ticket; ticketIndex: number }\n ) => {\n if (\n sourcePage.documentId === destinationPage.documentId &&\n sourcePage.id === destinationPage.id &&\n destinationTicket\n ) {\n onDroppingRemovingTicketFromSeat(\n destinationTicket.ticket,\n destinationTicket.ticketIndex\n );\n } else {\n // Different page was dropped into this bucket - doesn't matter, we should just find\n // the ticket to remove\n const matchingPages = eTicketUploadInfos.flatMap(\n (ui) =>\n ui.pages?.filter(\n (p) =>\n p.documentId === sourcePage.documentId && p.id === sourcePage.id\n )\n );\n const matchingPage = matchingPages.filter((p) => p != null)[0];\n if (matchingPage) {\n const mappedToTicket =\n mappedETicketIds[getDocumentPageUniqueId(matchingPage)];\n if (mappedToTicket) {\n onDroppingRemovingTicketFromSeat(\n mappedToTicket.ticket,\n mappedToTicket.ticketIndex\n );\n }\n }\n }\n },\n [eTicketUploadInfos, mappedETicketIds, onDroppingRemovingTicketFromSeat]\n );\n\n const onFileDeleted = useCallback(\n (ui: DocumentFileUploadInfo) => {\n if (ui.pages) {\n // If any of the page is mapped, unmap it\n ui.pages.forEach((ep) => {\n const mappedToTicket = mappedETicketIds[getDocumentPageUniqueId(ep)];\n if (mappedToTicket) {\n onDroppingRemovingTicketFromSeat(\n mappedToTicket.ticket,\n mappedToTicket.ticketIndex\n );\n }\n });\n }\n ui.file = undefined;\n ui.uploadInfo = undefined;\n ui.pages = undefined;\n\n setETicketUploadInfos([...eTicketUploadInfos]);\n },\n [\n eTicketUploadInfos,\n mappedETicketIds,\n onDroppingRemovingTicketFromSeat,\n setETicketUploadInfos,\n ]\n );\n\n const onNewFileSelected = useCallback(\n (f: File[], ui: DocumentFileUploadInfo) => {\n // File already uploaded, do nothing/\n if (ui.pages || ui.uploadInfo) {\n return;\n }\n const newUploadUIs = f.map((file) => ({\n file,\n pages: [],\n uploadInfo: undefined,\n }));\n\n setETicketUploadInfos([...newUploadUIs, ...eTicketUploadInfos]);\n },\n [eTicketUploadInfos, setETicketUploadInfos]\n );\n\n return (\n
    \n
    \n \n
    \n \n {eTicketUploadInfos.map((ui, i) => {\n const key = `e-ticket-file-${i}`;\n // If ui has uploadInfo but no pages, it's being uploaded/processed, so just display a spinner for the file\n return ui.file?.name && !ui.pages ? (\n \n \n {ui.file?.name ? (\n \n ) : (\n ' '\n )}\n {ui.uploadInfo && (\n // Only allow cancel once the file is uploaded and is only pollling for pages\n onFileDeleted(ui)} />\n )}\n \n \n \n ) : (\n // Has no uploadInfo or has pages, display component to display thumbnail or single-file uploader\n \n \n key={key}\n fileName={ui.file?.name}\n filePages={ui.pages || []}\n isDeletable={true}\n onFileDeleted={() => onFileDeleted(ui)}\n multiple={true}\n onNewFileSelected={(f) => onNewFileSelected(f, ui)}\n maxFileSize={MAX_ALLOWED_UPLOAD_FILE_SIZE}\n renderPreview={(ep: DocumentPage) => {\n const mappedToTicket =\n mappedETicketIds[getDocumentPageUniqueId(ep)];\n return (\n \n onDroppingToThumbnails(data, ep, mappedToTicket)\n }\n >\n {mappedToTicket ? (\n \n \n \n \n \n \n \n ) : (\n \n \n
    \n ),\n source: ep.thumbUrl,\n }}\n >\n \n
    \n \n
    \n \n
    \n \n )}\n \n \n );\n }}\n />\n \n );\n })}\n \n \n );\n}\n","import { useEffect, useRef } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Content } from 'src/contexts/ContentContext';\nimport { mergeProps } from 'src/core/utils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { EntityWithRealTickets } from 'src/utils/ticketUtils';\nimport { TicketType } from 'src/WebApiController';\n\nimport * as styles from '../UploadETickets.css';\nimport {\n UploadETicketsInstructions,\n UploadETicketsSubInstructions,\n} from '../UploadETickets.styled';\nimport {\n DocumentFileUploadInfo,\n ETicketsForm,\n getDocumentPagesMap,\n} from '../UploadETickets.utils';\nimport { UploadETicketsSeatingSection } from './UploadETicketsSeatingSection';\nimport { UploadETicketsThumbnailSection } from './UploadETicketsThumbnailSection';\n\nexport const UploadETicketsSeatAssignmentBody = ({\n entitWithTickets,\n ticketType,\n eTicketUploadInfos,\n setETicketUploadInfos,\n className,\n}: {\n entitWithTickets: Pick<\n EntityWithRealTickets,\n 'viagVirtualId' | 'id' | 'ticketCnt' | 'tickets' | 'seating' | 'entityType'\n >;\n ticketType: TicketType.ETicket | TicketType.QRCode;\n eTicketUploadInfos: DocumentFileUploadInfo[];\n setETicketUploadInfos: (infos: DocumentFileUploadInfo[]) => void;\n className?: string;\n}) => {\n const allPagesAvailable =\n eTicketUploadInfos.find(\n (ui) => ui.file && ui.uploadInfo && (ui.pages?.length || 0) === 0\n ) == null; // returns false where any uploadInfo (that has file and uploadInfo) has no pages\n const eTicketPages = getDocumentPagesMap(eTicketUploadInfos);\n const { watch, setValue } = useFormContext();\n const watchTickets = watch('ticketAssignments'); // you can supply default value as second argument\n\n const autoAssignment = useRef(true);\n useEffect(() => {\n if (autoAssignment.current && allPagesAvailable) {\n // Only perform once, and perform only when all pages are available\n const allPages = eTicketUploadInfos\n .flatMap((ui) => ui.pages)\n .filter((p) => p);\n if (\n allPages.length > 0 && // if we have pages to assigne\n watchTickets.filter((t) => t.pageId !== '').length === 0 // and we have not assign any ticket to any seat\n ) {\n // Try to auto-assign seat based on order of the pages\n // Users can re-adjust if they see fit\n // TODO - we can probably use some smart-scanning features to figure out which page is for which seat\n watchTickets.forEach((t, index) => {\n if (index < allPages.length) {\n const page = allPages[index];\n t.documentId = page!.documentId;\n t.pageId = page!.id;\n t.pageNumber = page!.pageNumber;\n t.pageUri = page!.thumbUrl;\n t.documentUri = page!.documentUrl;\n }\n });\n\n setValue('ticketAssignments', [...watchTickets]);\n autoAssignment.current = false;\n }\n }\n }, [\n allPagesAvailable,\n eTicketPages,\n eTicketUploadInfos,\n setValue,\n watchTickets,\n ]);\n\n return (\n \n \n \n \n \n \n \n\n
    \n \n \n
    \n \n );\n};\n","import { useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport {\n DocumentFileUploadInfo,\n UploadETicketForm,\n UploadETicketsFinalPreviewBody,\n UploadETicketsSeatAssignmentBody,\n} from 'src/components/UploadArtifacts/UploadETickets';\nimport { Stack } from 'src/core/ui';\nimport { PurchaseWizardFooter } from 'src/modals/common';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport { PurchaseTicketsInput } from 'src/utils/purchaseUtils';\nimport { toEntityWithTicket } from 'src/utils/ticketUtils';\nimport {\n ActionOutboxEntityType,\n DocumentProcessorClient,\n DocumentUploadInfo,\n FileParameter,\n PosClientConfig,\n PosUiActionResult,\n TicketType,\n UserDocumentLinks,\n} from 'src/WebApiController';\n\nimport {\n ticketGroupInputFooter,\n ticketGroupPredeliveryBody,\n} from '../PurchaseTicketFlow.css';\n\nexport interface UploadETicketsSectionProps {\n ticketGroupIndex: number;\n ticketType: TicketType.ETicket | TicketType.QRCode;\n onCancel: () => void;\n}\n\nexport const UploadETicketsSection = ({\n ticketGroupIndex,\n ticketType,\n onCancel,\n}: UploadETicketsSectionProps) => {\n const { setValue, watch, formState } = useFormContext();\n const ticketGroup = watch(`ticketGroups.${ticketGroupIndex}`);\n\n const onUploadETickets = (\n _: PosClientConfig,\n entityId: number,\n etickets: UserDocumentLinks[]\n ) => {\n const newTickets = ticketGroup.tickets?.value?.map((t) => {\n const tb = etickets.find((b) => b.entityId === t.id);\n if (tb) {\n if (ticketType === TicketType.ETicket) {\n t.eTicket = tb;\n } else {\n t.qrCode = tb;\n }\n return { ...t };\n }\n return t;\n });\n\n setValue(\n `ticketGroups.${ticketGroupIndex}.tickets`,\n posChangedField(newTickets ?? null)\n );\n\n setValue('updatePredeliveryETicketArtifacts', true);\n\n return Promise.resolve({\n status: 200,\n entityId,\n entityType: ActionOutboxEntityType.Purchase,\n } as PosUiActionResult);\n };\n\n const onUploadDocuments = (\n client: DocumentProcessorClient,\n docUploadInfo: DocumentUploadInfo,\n file: FileParameter\n ) =>\n client.uploadDocumentForListing(\n docUploadInfo.entityId,\n ActionOutboxEntityType.Listing,\n docUploadInfo.documentType,\n docUploadInfo.blobName,\n docUploadInfo.documentId,\n docUploadInfo.contentType,\n file\n );\n\n const entityWithTickets = useMemo(\n () => toEntityWithTicket(ticketGroup),\n [ticketGroup]\n );\n\n return (\n void,\n onNext: () => void,\n onCancel: () => void,\n onBack: () => void,\n isFinalPreview: boolean,\n disabled?: boolean\n ) => (\n \n {!isFinalPreview ? (\n \n ) : (\n \n )}\n\n \n \n )}\n />\n );\n};\n","import {\n DocumentPage,\n DocumentUploadInfo,\n Ticket,\n UserDocument,\n UserDocumentLinks,\n} from 'src/WebApiController';\n\nexport type ETicketsForm = {\n ticketAssignments: UserDocumentLinks[];\n};\n\nexport type DocumentFileUploadInfo = {\n file?: File;\n uploadInfo?: DocumentUploadInfo;\n pages?: DocumentPage[];\n};\n\nexport const getDocumentPageUniqueId = (ep: DocumentPage) =>\n `${ep.id}-${ep.documentId}`;\n\nexport const getETicketDocumentPageUniqueId = (ep: UserDocument) =>\n `${ep.pageId}-${ep.documentId}`;\n\nexport type UniquePageIdToDocumentFileUploadInfoMap = Record<\n string,\n { documentFileUploadInfo: DocumentFileUploadInfo; page: DocumentPage }\n>;\n\nexport const getPageToDocumentFileUploadInfoMap = (\n docUploadInfos: DocumentFileUploadInfo[]\n): UniquePageIdToDocumentFileUploadInfoMap => {\n const documentFileUploadInfosMap: UniquePageIdToDocumentFileUploadInfoMap =\n {};\n\n docUploadInfos.forEach((doc) => {\n doc.pages\n ?.filter((page) => !!page)\n .forEach((page) => {\n documentFileUploadInfosMap[getDocumentPageUniqueId(page)] = {\n documentFileUploadInfo: doc,\n page,\n };\n });\n });\n\n return documentFileUploadInfosMap;\n};\n\nexport type MappedTicketInfo = { ticketIndex: number; ticket: Ticket };\nexport type PageUniqueIdToTicketMap = Record;\n\nexport const getDocumentPageIdToTicketMap = (\n ticketAssignments: UserDocument[],\n tickets: Ticket[]\n): PageUniqueIdToTicketMap =>\n ticketAssignments.reduce(\n (prev, cur) => {\n const index = tickets.findIndex((t) => t.id === cur.entityId);\n prev[getETicketDocumentPageUniqueId(cur)] = {\n ticketIndex: index,\n ticket: tickets[index],\n };\n return prev;\n },\n {} as {\n [docPageUniqueId: string]: { ticketIndex: number; ticket: Ticket };\n }\n );\n","import { useQuery } from '@tanstack/react-query';\nimport { ComponentProps, ReactNode, useCallback, useState } from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { EntityWithRealTicketsPartial } from 'src/components/UploadArtifacts/UploadETicketsV2/views/UploadETicketsSeatAssignmentBody';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { isSuccess } from 'src/utils/errorUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ApiException,\n DocumentProcessorClient,\n DocumentType,\n DocumentUploadInfo,\n FileParameter,\n PosClientConfig,\n PosUiActionResult,\n TicketType,\n UserDocument,\n UserDocumentLinks,\n} from 'src/WebApiController';\n\nimport { DocumentFileUploadInfo, ETicketsForm } from './UploadETickets.utils';\n\nexport type UploadETicketFormProps = {\n entityWithTickets: EntityWithRealTicketsPartial;\n renderContent: (\n eTicketUploadInfos: DocumentFileUploadInfo[],\n setETicketUploadInfos: (infos: DocumentFileUploadInfo[]) => void,\n onNext: () => void,\n onCancel: () => void,\n disabled?: boolean\n ) => ReactNode;\n onComplete: (isCancelled: boolean) => void;\n onUploadDocuments: (\n client: DocumentProcessorClient,\n docUploadInfo: DocumentUploadInfo,\n file: FileParameter\n ) => Promise;\n onUploadETickets: (\n posClientConfig: PosClientConfig,\n entityId: number,\n ticketAssignments: UserDocumentLinks[]\n ) => Promise;\n ticketType: TicketType.ETicket | TicketType.QRCode;\n};\n\nexport const UploadETicketForm = (props: UploadETicketFormProps) => {\n const methods = useForm({\n defaultValues: {\n ticketAssignments: props.entityWithTickets.tickets.map((t) => ({\n entityId: t.id,\n pageId:\n (props.ticketType === TicketType.ETicket\n ? t.eTicket?.pageId\n : t.qrCode?.pageId) ?? '',\n documentId:\n (props.ticketType === TicketType.ETicket\n ? t.eTicket?.documentId\n : t.qrCode?.documentId) ?? '',\n pageNumber:\n (props.ticketType === TicketType.ETicket\n ? t.eTicket?.pageNumber\n : t.qrCode?.pageNumber) ?? 0,\n pageUri:\n (props.ticketType === TicketType.ETicket\n ? t.eTicket?.pageUri\n : t.qrCode?.pageUri) ?? '',\n documentUri:\n (props.ticketType === TicketType.ETicket\n ? t.eTicket?.documentUri\n : t.qrCode?.documentUri) ?? '',\n documentType:\n props.ticketType === TicketType.ETicket\n ? (t.eTicket?.documentType ?? DocumentType.ETicket)\n : (t.qrCode?.documentType ?? DocumentType.QRCode),\n })),\n },\n });\n return (\n \n \n \n );\n};\n\nconst UploadETicketsContent = ({\n entityWithTickets,\n ticketType,\n renderContent,\n onComplete,\n onUploadDocuments,\n onUploadETickets,\n setError,\n clearErrors,\n watch,\n handleSubmit,\n}: UploadETicketFormProps &\n Omit<\n ComponentProps>,\n 'children'\n >) => {\n // Source of truth\n const [eTicketUploadInfos, setETicketUploadInfos] = useState<\n DocumentFileUploadInfo[]\n >([]);\n\n const [isLoading, setIsLoading] = useState(false);\n const { showErrorDialog, genericError } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n\n const getIncompleteUploadInfos = (infos?: DocumentFileUploadInfo[]) =>\n infos?.filter(\n (f) => f.file && f.uploadInfo && (!f.pages || f.pages.length === 0)\n ) || [];\n\n const requiredMsg = useContent(ContentId.Required);\n\n const query = useQuery({\n queryKey: [\n 'pollingForETicketUploadFiles',\n eTicketUploadInfos.map((ui) => ui.file?.name || '').toSorted(),\n ],\n queryFn: async () => {\n if (activeAccountWebClientConfig.activeAccountId == null) {\n return null;\n }\n setIsLoading(true);\n\n const client = new DocumentProcessorClient(activeAccountWebClientConfig);\n let infoChanged = false;\n\n const results = eTicketUploadInfos.map(async (f) => {\n if (f.pages && f.pages.length > 0) {\n return f; // We already gotten data for this or doesn't have upload info yet, just return\n }\n\n if (f.file) {\n // If we don't have upload info yet, get it, and upload the file\n if (!f.uploadInfo) {\n // The upload has been deleted and needing to be re-upload\n const uploadInfo = await client.getDocumentUploadInfo(\n entityWithTickets.id,\n ticketType === TicketType.ETicket\n ? DocumentType.ETicket\n : DocumentType.QRCode,\n f.file.type\n );\n\n await onUploadDocuments(client, uploadInfo, {\n data: f.file,\n fileName: f.file.name,\n });\n\n f.uploadInfo = uploadInfo;\n infoChanged = true;\n } else {\n try {\n // if we do have upload info, we want to query for the pages\n // but we do not want to do this immediately after the upload, hence, this is an else\n // meaning another refresh cycle has ran in useQuery\n const eTicketPages = await client.getDocumentPages(\n f.uploadInfo.entityId,\n f.uploadInfo.entityType,\n f.uploadInfo.documentType,\n f.uploadInfo.blobName,\n f.uploadInfo.documentId,\n f.uploadInfo.contentType\n );\n\n infoChanged = true;\n return { ...f, pages: eTicketPages } as DocumentFileUploadInfo;\n } catch (e) {\n // Remove the file with errors\n setETicketUploadInfos(\n eTicketUploadInfos.filter(\n (documentFileUpload) => documentFileUpload !== f\n )\n );\n showErrorDialog(\n 'DocumentProcessorClient.getDocumentPages',\n { message: (e as Error)?.message ?? '' },\n {\n trackErrorData: {\n eTicketUploadInfos,\n },\n }\n );\n }\n }\n }\n\n return f;\n });\n\n let allResults = await Promise.all(results);\n\n const fileWithNoPages = getIncompleteUploadInfos(allResults);\n const isAllLoaded = fileWithNoPages.length === 0;\n if (isAllLoaded) {\n setIsLoading(false);\n }\n\n const emptyEntries = allResults.filter(\n (u) =>\n u.file === undefined &&\n u.uploadInfo === undefined &&\n u.pages === undefined\n );\n if (emptyEntries.length !== 1) {\n const nonEmptyEntries = allResults.filter(\n (u) =>\n !(\n u.file === undefined &&\n u.uploadInfo === undefined &&\n u.pages === undefined\n )\n );\n // Always ensure there's an extra empty-upload-info\n // This allow the seat-assignment to add additional files\n nonEmptyEntries.push({\n file: undefined,\n uploadInfo: undefined,\n pages: undefined,\n } as DocumentFileUploadInfo);\n\n allResults = nonEmptyEntries;\n infoChanged = true;\n }\n\n if (infoChanged) {\n setETicketUploadInfos(allResults);\n }\n return allResults;\n },\n\n staleTime: Infinity, // We don't want useQuery to auto-refresh base on stale, we control our own refetch\n gcTime: 0, // we don't want to cache this data\n refetchOnWindowFocus: false,\n networkMode: 'always',\n refetchInterval: () => {\n if (!eTicketUploadInfos) {\n return 1000;\n }\n const fileWithNoPages = getIncompleteUploadInfos(eTicketUploadInfos);\n return fileWithNoPages.length > 0 ? 1000 : false; // keep on refreshing until all files in prev (uploadInfos) has pages\n },\n meta: {\n persist: false, // we do not want this thing persisted between sessions\n },\n });\n\n if (query.failureReason) {\n showErrorDialog(\n 'DocumentProcessorClient.pollingForETicketUploadFiles',\n { message: query.failureReason.message },\n {\n trackErrorData: {\n eTicketUploadInfos,\n },\n }\n );\n }\n\n const validateTicketAssignment = useCallback(\n (t: UserDocument, index: number) => {\n if (!t.documentId || !t.pageId) {\n setError(\n `ticketAssignments.${index}`,\n {\n message: requiredMsg,\n },\n { shouldFocus: true }\n );\n\n return false;\n } else {\n clearErrors(`ticketAssignments.${index}`);\n\n return true;\n }\n },\n [clearErrors, requiredMsg, setError]\n );\n\n const onSubmit = useCallback(\n async ({ ticketAssignments }: ETicketsForm) => {\n // Validate first\n let isValid = true;\n ticketAssignments.forEach((t, i) => {\n isValid = isValid && validateTicketAssignment(t, i);\n });\n\n if (!isValid) {\n return;\n }\n\n tryInvokeApi(\n async () => {\n setIsLoading(true);\n const result = await onUploadETickets?.(\n activeAccountWebClientConfig,\n entityWithTickets.id,\n ticketAssignments\n );\n if (!isSuccess(result)) {\n showErrorDialog(\n 'SaleClient.saveETicketAssignments',\n {\n message: result!.message ?? genericError,\n status: result!.status!,\n } as ApiException,\n {\n onDismissError: () => onComplete(true),\n trackErrorData: {\n entityId: entityWithTickets.id,\n ticketAssignments,\n },\n }\n );\n } else {\n onComplete(false);\n }\n },\n (error) => {\n showErrorDialog('SaleClient.saveETicketAssignments', error, {\n trackErrorData: {\n entityId: entityWithTickets.id,\n ticketAssignments,\n },\n });\n },\n () => setIsLoading(false)\n );\n },\n [\n validateTicketAssignment,\n onUploadETickets,\n activeAccountWebClientConfig,\n entityWithTickets.id,\n showErrorDialog,\n genericError,\n onComplete,\n ]\n );\n\n const onCancel = () => {\n setETicketUploadInfos([]);\n setIsLoading(false);\n onComplete(true);\n };\n\n const onNext = useCallback(async () => {\n if (!isLoading) {\n handleSubmit(onSubmit)();\n }\n }, [handleSubmit, isLoading, onSubmit]);\n\n return renderContent(\n eTicketUploadInfos,\n setETicketUploadInfos,\n onNext,\n onCancel,\n isLoading\n );\n};\n","// POS modal zIndex is 1501\nexport const previewModalZIndex = 1500;\nexport const ticketsAndSeatsZIndex = previewModalZIndex + 1;\nexport const draggingWrapperZIndex = previewModalZIndex + 2;\n","import React, {\n createContext,\n ReactNode,\n useCallback,\n useContext,\n useEffect,\n useState,\n} from 'react';\nimport {\n PageUniqueIdToTicketMap,\n UniquePageIdToDocumentFileUploadInfoMap,\n} from 'src/components/UploadArtifacts/UploadETicketsV2/UploadETickets.utils';\nimport { EntityWithRealTicketsPartial } from 'src/components/UploadArtifacts/UploadETicketsV2/views/UploadETicketsSeatAssignmentBody';\n\nexport type IUploadETicketsContext = {\n pageUniqueIdToTicketMap: PageUniqueIdToTicketMap; // Handles relationship between ticket and seat\n setPageUniqueIdToTicketMap: (\n pageUniqueIdToTicketMap: PageUniqueIdToTicketMap\n ) => void;\n\n uniquePageIdToDocumentFileUploadInfoMap: UniquePageIdToDocumentFileUploadInfoMap;\n setUniquePageIdToDocumentFileUploadInfoMap: (\n uniquePageIdToDocumentFileUploadInfoMap: UniquePageIdToDocumentFileUploadInfoMap\n ) => void;\n\n entityWithTickets: EntityWithRealTicketsPartial | undefined;\n\n selectedUniquePageId: string | undefined;\n setSelectedUniquePageId: (uniquePageId: string | undefined) => void;\n\n hoverUniquePageId: string | undefined;\n setHoverUniquePageId: (uniquePageId: string | undefined) => void;\n\n selectPrevUnmappedTicket: () => void;\n selectNextUnmappedTicket: (fromUniquePageId?: string) => void;\n};\n\nconst defaultUploadETicketsContext: IUploadETicketsContext = {\n entityWithTickets: undefined,\n pageUniqueIdToTicketMap: {},\n setPageUniqueIdToTicketMap: (\n pageUniqueIdToTicketMap: PageUniqueIdToTicketMap\n ) => undefined,\n selectedUniquePageId: undefined,\n setSelectedUniquePageId: (uniquePageId: string | undefined) => undefined,\n\n hoverUniquePageId: undefined,\n setHoverUniquePageId: (uniquePageId: string | undefined) => undefined,\n\n uniquePageIdToDocumentFileUploadInfoMap: {},\n setUniquePageIdToDocumentFileUploadInfoMap: (\n uniquePageIdToDocumentFileUploadInfoMap: UniquePageIdToDocumentFileUploadInfoMap\n ) => undefined,\n selectPrevUnmappedTicket: () => undefined,\n selectNextUnmappedTicket: (fromUniquePageId: string | undefined) => undefined,\n};\n\nexport const UploadETicketsContext = createContext(\n defaultUploadETicketsContext\n);\n\nexport const useUploadETicketsContext = () => useContext(UploadETicketsContext);\n\nexport const UploadETicketsContextProvider = ({\n children,\n entityWithTickets,\n}: {\n children: ReactNode;\n entityWithTickets: EntityWithRealTicketsPartial;\n}) => {\n const [pageUniqueIdToTicketMap, setPageUniqueIdToTicketMap] =\n useState(\n defaultUploadETicketsContext.pageUniqueIdToTicketMap\n );\n\n const [\n uniquePageIdToDocumentFileUploadInfoMap,\n setUniquePageIdToDocumentFileUploadInfoMap,\n ] = useState({});\n\n const [selectedUniquePageId, setSelectedUniquePageId] = useState<\n string | undefined\n >();\n\n const [hoverUniquePageId, setHoverUniquePageId] = useState<\n string | undefined\n >();\n\n useEffect(() => {\n if (selectedUniquePageId) {\n const existsPageId =\n uniquePageIdToDocumentFileUploadInfoMap[selectedUniquePageId];\n if (!existsPageId) {\n setSelectedUniquePageId(undefined);\n }\n }\n }, [\n pageUniqueIdToTicketMap,\n selectedUniquePageId,\n uniquePageIdToDocumentFileUploadInfoMap,\n ]);\n\n const selectNextTicket = useCallback(\n (direction: 'prev' | 'next') => {\n const uniquePageIds = Object.keys(\n uniquePageIdToDocumentFileUploadInfoMap\n );\n const currentIndex = selectedUniquePageId\n ? uniquePageIds.indexOf(selectedUniquePageId)\n : 0;\n\n let nextIndex = 0;\n if (direction === 'prev') {\n nextIndex =\n currentIndex - 1 < 0 ? uniquePageIds.length - 1 : currentIndex - 1;\n } else {\n // next\n nextIndex =\n currentIndex + 1 === uniquePageIds.length ? 0 : currentIndex + 1;\n }\n\n setSelectedUniquePageId(uniquePageIds[nextIndex]);\n },\n [selectedUniquePageId, uniquePageIdToDocumentFileUploadInfoMap]\n );\n\n /**\n * Select previous unmapped ticket from the current selected ticket.\n */\n const selectPrevUnmappedTicket = useCallback(() => {\n const uniquePageIds = Object.keys(uniquePageIdToDocumentFileUploadInfoMap);\n\n const selectedUniquePageIdIndex = selectedUniquePageId\n ? uniquePageIds.indexOf(selectedUniquePageId)\n : 0;\n\n const nextKeysFromBeggingToCurrentIndex = uniquePageIds\n .slice(0, selectedUniquePageIdIndex)\n .reverse();\n\n // Array of keys to search next unmapped ticket from currentIndex to the end\n const nextKeysFromCurrentIndexToEnd = uniquePageIds\n .slice(\n selectedUniquePageIdIndex + 1 // +1 to not include current uniquePageId\n )\n .reverse();\n\n const notMappedUniquePageId = [\n ...nextKeysFromBeggingToCurrentIndex, // 0 to current index\n ...nextKeysFromCurrentIndexToEnd, // current index to end\n ].find((pageIdToDocument) => !pageUniqueIdToTicketMap[pageIdToDocument]);\n\n if (notMappedUniquePageId) {\n setSelectedUniquePageId(notMappedUniquePageId);\n } else {\n // Set prev\n selectNextTicket('prev');\n }\n }, [\n pageUniqueIdToTicketMap,\n selectNextTicket,\n selectedUniquePageId,\n uniquePageIdToDocumentFileUploadInfoMap,\n ]);\n\n /**\n * Select next unmapped ticket from the current selected ticket.\n */\n const selectNextUnmappedTicket = useCallback(\n (fromUniquePageId: string | undefined) => {\n const uniquePageIds = Object.keys(\n uniquePageIdToDocumentFileUploadInfoMap\n );\n\n let selectedUniquePageIdIndex = 0;\n if (fromUniquePageId) {\n selectedUniquePageIdIndex = uniquePageIds.indexOf(fromUniquePageId);\n } else if (selectedUniquePageId) {\n selectedUniquePageIdIndex = uniquePageIds.indexOf(selectedUniquePageId);\n }\n\n // Array of keys to search next unmapped ticket from currentIndex to the end\n const nextKeysFromCurrentIndexToEnd = uniquePageIds.slice(\n selectedUniquePageIdIndex + 1 // +1 to not include current uniquePageId\n );\n\n const nextKeysFromBeggingToCurrentIndex = uniquePageIds.slice(\n 0,\n selectedUniquePageIdIndex\n );\n\n const notMappedUniquePageId = [\n ...nextKeysFromCurrentIndexToEnd, // current index to end\n ...nextKeysFromBeggingToCurrentIndex, // 0 to current index\n ].find((pageIdToDocument) => !pageUniqueIdToTicketMap[pageIdToDocument]);\n\n if (notMappedUniquePageId) {\n setSelectedUniquePageId(notMappedUniquePageId);\n } else {\n // Set first\n selectNextTicket('next');\n }\n },\n [\n pageUniqueIdToTicketMap,\n selectNextTicket,\n selectedUniquePageId,\n uniquePageIdToDocumentFileUploadInfoMap,\n ]\n );\n\n return (\n \n {children}\n \n );\n};\n","export const UploadETicketsDraggableSource = 'UploadETicketsDraggableSource';\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const SeatIcon = (props: PosIconProps) => {\n return (\n \n \n \n );\n};\n","import { clsx } from 'clsx';\nimport { ReactNode } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { SeatIcon } from 'src/svgs/SeatIcon';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport * as styles from './SeatInfo.css';\n\nexport interface SeatInfoProps {\n section: string;\n row: string | null;\n seatFr: string | undefined;\n ticketIndex: number;\n size?: 'small' | 'big';\n icon?: ReactNode;\n}\n\nexport const SeatInfo = ({\n seatFr,\n section,\n ticketIndex,\n row,\n size = 'small',\n icon,\n}: SeatInfoProps) => {\n const isSmallSize = size === 'small';\n return (\n \n {icon || }\n {section}\n {row && (\n <>\n \n \n \n {row}\n \n )}\n \n \n \n \n {seatFr || (ticketIndex + 1).toString()}\n \n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const PageIcon = (props: PosIconProps) => {\n return (\n \n \n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const PaperTicketsIcon = (props: PosIconProps) => {\n return (\n \n \n \n );\n};\n","import { clsx } from 'clsx';\nimport { MappedTicketInfo } from 'src/components/UploadArtifacts/UploadETicketsV2';\nimport { SeatInfo } from 'src/components/UploadArtifacts/UploadETicketsV2/views/Seats/SeatInfo/SeatInfo';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useSiteTheme } from 'src/contexts/SiteTheme/SiteThemeContext';\nimport { vars } from 'src/core/themes';\nimport { Colors } from 'src/core/themes/constants/colors';\nimport { Stack } from 'src/core/ui';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { PageIcon } from 'src/svgs/PageIcon';\nimport { PaperTicketsIcon } from 'src/svgs/PaperTicketsIcon';\nimport { CheckIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport * as styles from './PreviewInfo.css';\n\ninterface PreviewInfoProps {\n fileName: string;\n mappedTicketInfo: MappedTicketInfo | undefined;\n section: string | undefined;\n}\n\nexport const PreviewInfo = ({\n mappedTicketInfo,\n fileName,\n section,\n}: PreviewInfoProps) => {\n const isMobile = useMatchMedia('mobile');\n const { isDarkMode } = useSiteTheme();\n const isLargeDesktop = useMatchMedia('largeDesktop');\n const useMobileStyle = isMobile || isLargeDesktop;\n const { ticket, ticketIndex } = mappedTicketInfo || {};\n\n return (\n \n \n \n
    {fileName}
    \n \n {ticket ? (\n
    \n \n \n ) : (\n \n )\n }\n seatFr={ticket.seat}\n ticketIndex={ticketIndex!}\n row={ticket.row}\n section={section ?? ''}\n />\n \n
    \n ) : (\n \n \n \n \n )}\n \n );\n};\n","import * as styles from './PosKey.css';\n\ninterface KeyProps {\n char: string;\n}\n\nexport const PosKey = ({ char }: KeyProps) => {\n if (!char || !char.length) {\n return null;\n }\n const singleChar = char.charAt(0);\n\n return
    {singleChar}
    ;\n};\n","import { useEffect, useRef } from 'react';\nimport {\n IUploadETicketsContext,\n useUploadETicketsContext,\n} from 'src/components/UploadArtifacts/UploadETicketsV2/UploadETicketsContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { Colors } from 'src/core/themes/constants/colors';\nimport { Button, Stack } from 'src/core/ui';\nimport { PosKey } from 'src/core/ui/Key';\nimport { useKeyPress } from 'src/hooks/useKeyPress';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { ChevronLeftIcon, ChevronRightIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport * as styles from './PreviewModalNavigationFooter.css';\n\ntype KeyboardRefActions = Pick<\n IUploadETicketsContext,\n 'selectPrevUnmappedTicket' | 'selectNextUnmappedTicket'\n>;\n\nexport const PreviewModalNavigationFooter = () => {\n const isLargeDesktop = useMatchMedia('largeDesktop');\n const isMobile = useMatchMedia('mobile');\n const { selectPrevUnmappedTicket, selectNextUnmappedTicket } =\n useUploadETicketsContext();\n\n const isArrowLeftKeyPressed = useKeyPress('ArrowLeft');\n const isArrowRightKeyPressed = useKeyPress('ArrowRight');\n\n const ref = useRef({\n selectPrevUnmappedTicket,\n selectNextUnmappedTicket,\n });\n ref.current = {\n selectPrevUnmappedTicket,\n selectNextUnmappedTicket,\n };\n\n useEffect(() => {\n if (isArrowLeftKeyPressed) {\n ref.current?.selectPrevUnmappedTicket();\n }\n }, [isArrowLeftKeyPressed]);\n\n useEffect(() => {\n if (isArrowRightKeyPressed) {\n ref.current?.selectNextUnmappedTicket();\n }\n }, [isArrowRightKeyPressed]);\n\n if (isMobile) {\n return null;\n }\n\n return (\n \n \n \n \n \n \n \n {isLargeDesktop && (\n <>\n \n \n )}\n {!isLargeDesktop && !isMobile && }\n \n\n \n {isLargeDesktop && (\n <>\n \n \n \n )}\n {!isLargeDesktop && !isMobile && }\n selectNextUnmappedTicket()}\n className={styles.arrowButton}\n >\n \n \n \n \n \n \n );\n};\n","import { BasePageDocumentProps } from 'src/components/UploadArtifacts/UploadETicketsV2/views/Tickets/Documents/BasePageDocumentProps';\n\nexport enum UploadETicketsDraggableOrigin {\n PreviewModal = 'previewModal',\n TicketCard = 'TicketCard',\n}\n\nexport interface UploadETicketsDraggableData {\n isSinglePageDocument: boolean;\n componentProps: BasePageDocumentProps;\n origin: UploadETicketsDraggableOrigin;\n}\n","import type { ToolbarSlot } from '@react-pdf-viewer/toolbar';\nimport { clsx } from 'clsx';\nimport {\n DocumentFileUploadInfo,\n MappedTicketInfo,\n} from 'src/components/UploadArtifacts/UploadETicketsV2';\nimport { useUploadETicketsContext } from 'src/components/UploadArtifacts/UploadETicketsV2/UploadETicketsContext';\nimport { UploadETicketsDraggableSource } from 'src/components/UploadArtifacts/UploadETicketsV2/views/Draggable/constants';\nimport { PreviewInfo } from 'src/components/UploadArtifacts/UploadETicketsV2/views/PreviewModal/PreviewInfo/PreviewInfo';\nimport { PreviewModalNavigationFooter } from 'src/components/UploadArtifacts/UploadETicketsV2/views/PreviewModal/PreviewModalNavigationFooter/PreviewModalNavigationFooter';\nimport {\n UploadETicketsDraggableData,\n UploadETicketsDraggableOrigin,\n} from 'src/components/UploadArtifacts/UploadETicketsV2/views/Tickets/Documents/UploadETicketsDraggableData';\nimport { ImageMagnifier } from 'src/core/POS/ImageMagnifier';\nimport { PosDraggable, PosDraggableIndicator } from 'src/core/POS/PosDragNDrop';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { DocumentPage } from 'src/WebApiController';\n\nimport * as styles from './UploadETicketsPreviewTicketModalBody.css';\n\nconst toolbarSlot: Partial = {\n ShowSearchPopover: () => <>,\n NumberOfPages: () => <>,\n GoToPreviousPage: () => <>,\n GoToNextPage: () => <>,\n CurrentPageInput: () => <>,\n};\n\nconst noop = () => {};\n\nexport const UploadETicketsPreviewTicketModalBody = () => {\n const isLargeDesktop = useMatchMedia('largeDesktop');\n const isMobile = useMatchMedia('mobile');\n const {\n selectedUniquePageId,\n hoverUniquePageId,\n uniquePageIdToDocumentFileUploadInfoMap,\n pageUniqueIdToTicketMap,\n entityWithTickets,\n } = useUploadETicketsContext();\n\n let page: DocumentPage | undefined;\n let file: File | undefined;\n let mappedTicketInfo: MappedTicketInfo | undefined;\n let pageInfo:\n | {\n documentFileUploadInfo: DocumentFileUploadInfo;\n page: DocumentPage;\n }\n | undefined;\n\n const activeUniquePageId = hoverUniquePageId || selectedUniquePageId;\n\n if (activeUniquePageId) {\n pageInfo = uniquePageIdToDocumentFileUploadInfoMap[activeUniquePageId];\n if (pageInfo) {\n pageInfo = uniquePageIdToDocumentFileUploadInfoMap[activeUniquePageId];\n page = pageInfo.page;\n file = pageInfo.documentFileUploadInfo.file;\n mappedTicketInfo = pageUniqueIdToTicketMap[activeUniquePageId];\n }\n }\n\n if (!page || !file || !pageInfo) {\n return null;\n }\n const pages = pageInfo.documentFileUploadInfo.pages;\n if (!pages || pages.length === 0) {\n return null;\n }\n\n const pdfClassName = isLargeDesktop\n ? styles.pdfViewerLargeDesktop\n : !isMobile\n ? styles.pdfViewerDesktop\n : undefined;\n\n return (\n \n \n className={styles.draggable}\n draggableSource={UploadETicketsDraggableSource}\n draggableData={{\n isSinglePageDocument: pages.length === 1,\n origin: UploadETicketsDraggableOrigin.PreviewModal,\n componentProps: {\n page,\n pageIndex: pages.indexOf(page) ?? 0,\n entityWithTickets: entityWithTickets!,\n documentFileUploadInfo: pageInfo.documentFileUploadInfo,\n pageUniqueIdToTicketMap,\n selectedUniquePageId,\n onMouseEntersPage: noop,\n onMouseLeavesPage: noop,\n },\n }}\n >\n \n
    \n
    \n \n
    \n
    \n \n
    \n \n
    \n \n \n \n );\n};\n","import { clsx } from 'clsx';\nimport { createPortal } from 'react-dom';\nimport { useUploadETicketsContext } from 'src/components/UploadArtifacts/UploadETicketsV2/UploadETicketsContext';\nimport { UploadETicketsPreviewTicketModalBody } from 'src/components/UploadArtifacts/UploadETicketsV2/views/PreviewModal/UploadETicketsPreviewTicketModalBody/UploadETicketsPreviewTicketModalBody';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\n\nimport * as uploadETicketsStyles from '../../UploadETickets.css';\nimport * as styles from './UploadETicketsPreviewTicketModal.css';\n\nexport const UploadETicketsPreviewTicketModal = () => {\n const isMobile = useMatchMedia('mobile');\n const isLargeDesktop = useMatchMedia('largeDesktop');\n const { selectedUniquePageId } = useUploadETicketsContext();\n\n if (!selectedUniquePageId) {\n return null;\n }\n\n const previewModal = (\n \n \n \n );\n\n if (isLargeDesktop) {\n return <>{createPortal(previewModal, document.body)};\n }\n\n return previewModal;\n};\n","import * as styles from 'src/components/UploadArtifacts/UploadETicketsV2/views/Tickets/Documents/ClearButton/ClearButton.css';\nimport { Content } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { CrossIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\ninterface ClearButtonProps {\n onClick: (e: React.MouseEvent) => void;\n}\n\nexport const ClearButton = ({ onClick }: ClearButtonProps) => {\n return (\n \n );\n};\n","import {\n EntityWithRealTicketsPartial,\n MappedTicketInfo,\n} from 'src/components/UploadArtifacts/UploadETicketsV2';\nimport { SeatInfo } from 'src/components/UploadArtifacts/UploadETicketsV2/views/Seats/SeatInfo/SeatInfo';\nimport { vars } from 'src/core/themes';\nimport { PageIcon } from 'src/svgs/PageIcon';\n\ninterface MappedPageLabelProps {\n ticketInfo: MappedTicketInfo;\n entityWithTickets: EntityWithRealTicketsPartial;\n}\n\nexport const MappedPageLabel = ({\n ticketInfo,\n entityWithTickets,\n}: MappedPageLabelProps) => {\n return (\n }\n />\n );\n};\n","import { clsx } from 'clsx';\nimport { getDocumentPageUniqueId } from 'src/components/UploadArtifacts/UploadETicketsV2';\nimport { MultiplePageDocumentProps } from 'src/components/UploadArtifacts/UploadETicketsV2/views/Tickets/Documents';\nimport { BasePageDocumentProps } from 'src/components/UploadArtifacts/UploadETicketsV2/views/Tickets/Documents/BasePageDocumentProps';\nimport { ClearButton } from 'src/components/UploadArtifacts/UploadETicketsV2/views/Tickets/Documents/ClearButton/ClearButton';\nimport { MappedPageLabel } from 'src/components/UploadArtifacts/UploadETicketsV2/views/Tickets/Documents/MappedLabel/MappedPageLabel';\nimport * as styles from 'src/components/UploadArtifacts/UploadETicketsV2/views/Tickets/Documents/MultiplePageDocument/MultiplePageDocument.css';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosDraggableIndicator } from 'src/core/POS/PosDragNDrop';\nimport { Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nexport type MultiplePageDocumentPageProps = MultiplePageDocumentProps &\n BasePageDocumentProps;\n\nexport const MultiplePageDocumentPage = ({\n page,\n pageIndex,\n onRemoveMappedTicket,\n pageUniqueIdToTicketMap,\n entityWithTickets,\n onPageClick,\n selectedUniquePageId,\n isDragElement,\n isDragging,\n onMouseEntersPage,\n onMouseLeavesPage,\n}: MultiplePageDocumentPageProps) => {\n const uniquePageId = getDocumentPageUniqueId(page);\n const isSelected = selectedUniquePageId === uniquePageId;\n const ticketInfo = pageUniqueIdToTicketMap[uniquePageId];\n\n return (\n ) => {\n e.stopPropagation();\n e.preventDefault();\n onPageClick(uniquePageId);\n }}\n onMouseEnter={() => {\n if (isDragging) {\n return;\n }\n onMouseEntersPage(uniquePageId);\n }}\n onMouseLeave={() => {\n if (isDragging) {\n return;\n }\n onMouseLeavesPage();\n }}\n >\n \n \n \n {pageIndex + 1}\n \n {!isDragElement && ticketInfo && entityWithTickets && (\n \n \n ) => {\n e.stopPropagation();\n e.preventDefault();\n onRemoveMappedTicket(ticketInfo);\n }}\n />\n \n )}\n \n \n \n );\n};\n","import { clsx } from 'clsx';\nimport { useMemo } from 'react';\nimport { CloseButton } from 'reactstrap';\nimport {\n getDocumentPageUniqueId,\n MappedTicketInfo,\n} from 'src/components/UploadArtifacts/UploadETicketsV2';\nimport { BasePageDocumentProps } from 'src/components/UploadArtifacts/UploadETicketsV2/views/Tickets/Documents/BasePageDocumentProps';\nimport { ClearButton } from 'src/components/UploadArtifacts/UploadETicketsV2/views/Tickets/Documents/ClearButton/ClearButton';\nimport { MappedPageLabel } from 'src/components/UploadArtifacts/UploadETicketsV2/views/Tickets/Documents/MappedLabel/MappedPageLabel';\nimport * as styles from 'src/components/UploadArtifacts/UploadETicketsV2/views/Tickets/Documents/SinglePageDocument/SinglePageDocument.css';\nimport { PosDraggableIndicator } from 'src/core/POS/PosDragNDrop';\nimport { Stack } from 'src/core/ui';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { PaperTicketsIcon } from 'src/svgs/PaperTicketsIcon';\n\nexport type SinglePageDocumentPageProps = Omit<\n BasePageDocumentProps,\n 'page' | 'pageIndex'\n> & {\n onRemoveMappedTicket: (ticketInfo: MappedTicketInfo) => void;\n onPageClick: (uniquePageId: string) => void;\n onFileDeleted: () => void;\n};\n\nexport const SinglePageDocumentPage = ({\n documentFileUploadInfo,\n onFileDeleted,\n entityWithTickets,\n pageUniqueIdToTicketMap,\n isDragging,\n isDragElement,\n onRemoveMappedTicket,\n onPageClick,\n selectedUniquePageId,\n onMouseEntersPage,\n onMouseLeavesPage,\n}: SinglePageDocumentPageProps) => {\n const useMobileStyle = !useMatchMedia('largeDesktop');\n const { pages, file } = documentFileUploadInfo;\n const fileName = file!.name;\n\n const uniquePageId: string = useMemo(() => {\n const page = pages?.[0];\n if (!page) {\n return '';\n }\n return getDocumentPageUniqueId(page);\n }, [pages]);\n\n const ticketInfo = useMemo(() => {\n if (!pages?.length) {\n return undefined;\n }\n return pageUniqueIdToTicketMap[uniquePageId];\n }, [uniquePageId, pageUniqueIdToTicketMap, pages?.length]);\n\n const isSelected = selectedUniquePageId === uniquePageId;\n\n return (\n ) => {\n e.stopPropagation();\n e.preventDefault();\n onPageClick(uniquePageId);\n }}\n onMouseEnter={() => {\n if (isDragging) {\n return;\n }\n onMouseEntersPage(uniquePageId);\n }}\n onMouseLeave={() => {\n if (isDragging) {\n return;\n }\n onMouseLeavesPage();\n }}\n >\n \n
    \n \n {!useMobileStyle && }\n \n {fileName}\n
    \n \n {!isDragElement && (\n ) => {\n e.stopPropagation();\n e.preventDefault();\n onFileDeleted();\n }}\n />\n )}\n \n {!isDragElement && ticketInfo && (\n
    \n \n ) => {\n e.stopPropagation();\n e.preventDefault();\n onRemoveMappedTicket(ticketInfo);\n }}\n />\n
    \n )}\n \n \n );\n};\n","import { useDragLayer } from 'react-dnd';\nimport { draggingWrapperZIndex } from 'src/components/UploadArtifacts/UploadETicketsV2/constants';\nimport { MultiplePageDocumentPage } from 'src/components/UploadArtifacts/UploadETicketsV2/views/Tickets/Documents/MultiplePageDocument/MultiplePageDocumentPage';\nimport { SinglePageDocumentPage } from 'src/components/UploadArtifacts/UploadETicketsV2/views/Tickets/Documents/SinglePageDocument/SinglePageDocumentPage';\nimport {\n UploadETicketsDraggableData,\n UploadETicketsDraggableOrigin,\n} from 'src/components/UploadArtifacts/UploadETicketsV2/views/Tickets/Documents/UploadETicketsDraggableData';\n\nexport const PageDragPreview = () => {\n const { isDragging, item, currentOffset } = useDragLayer<\n any,\n UploadETicketsDraggableData\n >((monitor) => {\n const item = monitor.getItem() as { data: UploadETicketsDraggableData };\n const dragOrigin = item?.data?.origin;\n return {\n item,\n itemType: monitor.getItemType(),\n currentOffset:\n dragOrigin === UploadETicketsDraggableOrigin.PreviewModal\n ? monitor.getClientOffset()\n : monitor.getSourceClientOffset(),\n isDragging: monitor.isDragging(),\n };\n });\n\n if (!item || !item.data?.pageRef?.current || !isDragging || !currentOffset) {\n return null;\n }\n\n const { x: left, y: top } = currentOffset;\n const width = item.data.pageRef.current.clientWidth;\n\n const isSingleDocumentPage = item.data.isSinglePageDocument;\n return (\n \n {isSingleDocumentPage ? (\n \n ) : (\n \n )}\n \n );\n};\n","import { UploadETicketsDraggableSource } from 'src/components/UploadArtifacts/UploadETicketsV2/views/Draggable/constants';\nimport * as styles from 'src/components/UploadArtifacts/UploadETicketsV2/views/Tickets/Documents/basePageDocument.css';\nimport {\n MultiplePageDocumentPage,\n MultiplePageDocumentPageProps,\n} from 'src/components/UploadArtifacts/UploadETicketsV2/views/Tickets/Documents/MultiplePageDocument/MultiplePageDocumentPage';\nimport {\n UploadETicketsDraggableData,\n UploadETicketsDraggableOrigin,\n} from 'src/components/UploadArtifacts/UploadETicketsV2/views/Tickets/Documents/UploadETicketsDraggableData';\nimport { PosDraggable } from 'src/core/POS/PosDragNDrop';\n\nexport const MultipleDraggableDocumentPage = (\n props: MultiplePageDocumentPageProps\n) => {\n return (\n \n className={styles.dragContainer}\n draggableSource={UploadETicketsDraggableSource}\n draggableData={{\n isSinglePageDocument: false,\n origin: UploadETicketsDraggableOrigin.TicketCard,\n componentProps: props,\n }}\n >\n \n \n );\n};\n","import { clsx } from 'clsx';\nimport { CloseButton } from 'reactstrap';\nimport { MappedTicketInfo } from 'src/components/UploadArtifacts/UploadETicketsV2';\nimport { BasePageDocumentProps } from 'src/components/UploadArtifacts/UploadETicketsV2/views/Tickets/Documents/BasePageDocumentProps';\nimport { MultipleDraggableDocumentPage } from 'src/components/UploadArtifacts/UploadETicketsV2/views/Tickets/Documents/MultiplePageDocument/MultipleDraggableDocumentPage';\nimport * as styles from 'src/components/UploadArtifacts/UploadETicketsV2/views/Tickets/Documents/MultiplePageDocument/MultiplePageDocument.css';\nimport { MultiplePageDocumentPageProps } from 'src/components/UploadArtifacts/UploadETicketsV2/views/Tickets/Documents/MultiplePageDocument/MultiplePageDocumentPage';\nimport { Stack } from 'src/core/ui';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { PaperTicketsIcon } from 'src/svgs/PaperTicketsIcon';\n\nexport type MultiplePageDocumentProps = Omit<\n BasePageDocumentProps,\n 'page' | 'pageIndex'\n> & {\n onRemoveMappedTicket: (ticketInfo: MappedTicketInfo) => void;\n onPageClick: (uniquePageId: string) => void;\n onFileDeleted: () => void;\n};\n\nexport const MultiplePageDocument = (props: MultiplePageDocumentProps) => {\n const { documentFileUploadInfo, onFileDeleted } = props;\n const { pages, file } = documentFileUploadInfo;\n const fileName = file?.name || '';\n const isMobile = useMatchMedia('mobile');\n\n return (\n \n \n \n \n {!isMobile && }\n
    {fileName}
    \n
    \n ) => {\n e.stopPropagation();\n e.preventDefault();\n onFileDeleted();\n }}\n />\n \n {(pages ?? []).map((page, pageIndex) => {\n const draggableMultiplePageDocumentProps: MultiplePageDocumentPageProps =\n {\n ...props,\n page,\n pageIndex,\n };\n return (\n \n );\n })}\n \n \n );\n};\n","import { UploadETicketsDraggableSource } from 'src/components/UploadArtifacts/UploadETicketsV2/views/Draggable/constants';\nimport * as styles from 'src/components/UploadArtifacts/UploadETicketsV2/views/Tickets/Documents/SinglePageDocument/SinglePageDocument.css';\nimport {\n SinglePageDocumentPage,\n SinglePageDocumentPageProps,\n} from 'src/components/UploadArtifacts/UploadETicketsV2/views/Tickets/Documents/SinglePageDocument/SinglePageDocumentPage';\nimport {\n UploadETicketsDraggableData,\n UploadETicketsDraggableOrigin,\n} from 'src/components/UploadArtifacts/UploadETicketsV2/views/Tickets/Documents/UploadETicketsDraggableData';\nimport { PosDraggable } from 'src/core/POS/PosDragNDrop';\n\nexport const SingleDraggablePageDocument = (\n props: SinglePageDocumentPageProps\n) => {\n const { pages } = props.documentFileUploadInfo;\n const page = pages?.[0]!;\n return (\n \n className={styles.dragContainer}\n draggableSource={UploadETicketsDraggableSource}\n draggableData={{\n isSinglePageDocument: true,\n origin: UploadETicketsDraggableOrigin.TicketCard,\n componentProps: {\n ...props,\n page,\n pageIndex: 0, // zero because is a file with a single page\n },\n }}\n >\n \n \n );\n};\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport const UploadETicketsInstructions = styled.p`\n color: ${(props) => props.theme.colors.textPrimary};\n`;\n\nexport const UploadETicketsSubInstructions = styled.p`\n color: ${(props) => props.theme.colors.textPrimary};\n font-size: ${vars.typography.fontSize['sm']};\n display: flex;\n justify-content: space-between;\n align-items: center;\n`;\n\nexport const UploadETicketsThumbnailContainer = styled.div`\n min-width: 200px;\n padding-right: ${vars.spacing.sm};\n height: calc(100% - ${vars.spacing.xl});\n overflow-y: auto;\n\n .draggable-page {\n padding: ${vars.spacing.xl};\n &:hover {\n background-color: ${(props) => props.theme.colors.backgroundSecondary};\n }\n }\n`;\n\nexport const UploadETicketsThumbnailLoader = styled.div`\n border: 1px solid ${(props) => props.theme.colors.borderPrimary};\n padding: ${() => vars.spacing.lg};\n &:not(:last-child) {\n margin-bottom: ${() => vars.spacing.lg};\n }\n`;\n\nexport const UploadETicketsThumbnailAssigned = styled.div`\n padding: ${vars.spacing.lg} ${vars.spacing.lg} ${vars.spacing.lg}\n ${vars.spacing.xxl};\n &:hover {\n background-color: ${(props) => props.theme.colors.backgroundSecondary};\n }\n`;\n\nexport const UploadETicketsThumbnailAssignedMappedTo = styled.div`\n display: flex;\n div {\n margin-left: ${vars.spacing.sm};\n }\n`;\n\nexport const UploadETicketsSeatingContainer = styled.div`\n height: calc(100% - ${vars.spacing.xl});\n overflow-y: auto;\n overflow-x: hidden;\n\n .draggable-seat {\n &:hover {\n background-color: ${(props) => props.theme.colors.backgroundSecondary};\n }\n }\n`;\n\nexport const UploadETicketsSeatingPlaceholder = styled.div`\n color: ${(props) => props.theme.colors.textPrimaryHover};\n padding: ${vars.spacing.lg};\n\n ${({ theme: { media } }) =>\n `${media.makeMediaQuery(\n media.breakpoints.md,\n `\n padding: ${vars.spacing['3xl']};\n `\n )}`}\n`;\n\nexport const UploadETicketsSeat = styled.div`\n height: fit-content;\n overflow: hidden;\n &:not(:last-child) {\n margin-bottom: ${vars.spacing.lg};\n }\n`;\n\nexport const PreviewTicket = styled.div`\n width: 100%;\n margin-bottom: ${vars.spacing.lg};\n`;\n\nexport const Divider = styled.hr`\n border: none;\n border-bottom: 4px dotted ${(props) => props.theme.colors.borderPrimary};\n margin: ${vars.spacing.sm} 0;\n`;\n\nexport const SeatLabel = styled.div`\n margin-bottom: ${vars.spacing.sm};\n`;\n","import { CancelButton } from 'src/components/Buttons';\nimport { DocumentFileUploadInfo } from 'src/components/UploadArtifacts/UploadETicketsV2';\nimport {\n UploadETicketsSubInstructions,\n UploadETicketsThumbnailLoader,\n} from 'src/components/UploadArtifacts/UploadETicketsV2/UploadETickets.styled';\nimport { FormatContent } from 'src/contexts/ContentContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\n\ninterface UploadETicketsUploadingFileProps {\n onCancel: (documentFileUploadInfo: DocumentFileUploadInfo) => void;\n documentFileUploadInfo: DocumentFileUploadInfo;\n}\n\nexport const UploadETicketsUploadingFile = ({\n onCancel,\n documentFileUploadInfo,\n}: UploadETicketsUploadingFileProps) => {\n return (\n \n \n {documentFileUploadInfo.file?.name ? (\n \n ) : (\n ' '\n )}\n {documentFileUploadInfo.uploadInfo && (\n // Only allow cancel once the file is uploaded and is only pollling for pages\n onCancel(documentFileUploadInfo)} />\n )}\n \n \n \n );\n};\n","import { useCallback, useEffect, useMemo } from 'react';\nimport { useDragLayer } from 'react-dnd';\nimport { useFormContext, useWatch } from 'react-hook-form';\nimport { EntityWithRealTicketsPartial } from 'src/components/UploadArtifacts/UploadETicketsV2';\nimport { useUploadETicketsContext } from 'src/components/UploadArtifacts/UploadETicketsV2/UploadETicketsContext';\nimport { PageDragPreview } from 'src/components/UploadArtifacts/UploadETicketsV2/views/Draggable/PageDragPreview/PageDragPreview';\nimport {\n MultiplePageDocument,\n SingleDraggablePageDocument,\n} from 'src/components/UploadArtifacts/UploadETicketsV2/views/Tickets/Documents';\nimport { UploadETicketsUploadingFile } from 'src/components/UploadArtifacts/UploadETicketsV2/views/UploadETicketsUploadingFile';\nimport { Content } from 'src/contexts/ContentContext';\nimport { DnDFileUploader } from 'src/core/POS/DnDFileUploader';\nimport { useDndFilerUploaderContext } from 'src/core/POS/DnDFileUploader/DndFileUploaderContext';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { MAX_ALLOWED_UPLOAD_FILE_SIZE } from 'src/core/utils';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { IconsFill, UploadIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getFileHash } from 'src/utils/fileUtils';\n\nimport * as styles from '../UploadETickets.css';\nimport { UploadETicketsThumbnailContainer } from '../UploadETickets.styled';\nimport {\n DocumentFileUploadInfo,\n ETicketsForm,\n getDocumentPageIdToTicketMap,\n getDocumentPageUniqueId,\n MappedTicketInfo,\n PageUniqueIdToTicketMap,\n} from '../UploadETickets.utils';\n\nexport function UploadETicketsTicketsSection({\n eTicketUploadInfos,\n setETicketUploadInfos,\n entityWithTickets,\n}: {\n entityWithTickets: EntityWithRealTicketsPartial;\n eTicketUploadInfos: DocumentFileUploadInfo[];\n setETicketUploadInfos: (infos: DocumentFileUploadInfo[]) => void;\n}) {\n const isMobile = useMatchMedia('mobile');\n const { setValue } = useFormContext();\n const watchTickets = useWatch({ name: 'ticketAssignments' });\n const { setDndFileUploaderContext, selectFiles } =\n useDndFilerUploaderContext();\n\n const {\n setPageUniqueIdToTicketMap,\n setSelectedUniquePageId,\n selectedUniquePageId,\n setHoverUniquePageId,\n } = useUploadETicketsContext();\n\n const pageUniqueIdToTicketMap = useMemo(\n () =>\n getDocumentPageIdToTicketMap(watchTickets, entityWithTickets!.tickets),\n [entityWithTickets, watchTickets]\n );\n\n useEffect(() => {\n setPageUniqueIdToTicketMap(pageUniqueIdToTicketMap);\n }, [pageUniqueIdToTicketMap, setPageUniqueIdToTicketMap]);\n\n const { isDragging } = useDragLayer((monitor) => {\n return {\n isDragging: monitor.isDragging(),\n };\n });\n\n const removeTicketFromSeat = useCallback(\n ({ ticket, ticketIndex }: MappedTicketInfo) => {\n setValue(\n `ticketAssignments.${ticketIndex}`,\n {\n entityId: ticket.id,\n documentId: '',\n pageNumber: 0,\n pageId: '',\n pageUri: '',\n documentUri: '',\n documentType: null,\n },\n { shouldValidate: true }\n );\n },\n [setValue]\n );\n\n const onFileDeleted = useCallback(\n (ui: DocumentFileUploadInfo) => {\n if (ui.pages) {\n // If any of the page is mapped, unmap it\n ui.pages.forEach((ep) => {\n const mappedToTicket =\n pageUniqueIdToTicketMap[getDocumentPageUniqueId(ep)];\n if (mappedToTicket) {\n removeTicketFromSeat(mappedToTicket);\n }\n });\n }\n ui.file = undefined;\n ui.uploadInfo = undefined;\n ui.pages = undefined;\n\n setETicketUploadInfos([...eTicketUploadInfos]);\n },\n [\n eTicketUploadInfos,\n pageUniqueIdToTicketMap,\n removeTicketFromSeat,\n setETicketUploadInfos,\n ]\n );\n\n const onNewFileSelected = useCallback(\n async (files: File[]) => {\n const currentUploadedFileHashes: string[] = await Promise.all(\n eTicketUploadInfos\n .map((documentFileUploadInfo) => documentFileUploadInfo.file)\n .filter((f) => !!f)\n .map((file) => getFileHash(file!))\n );\n\n const filesToUpload: File[] = [];\n\n for await (const file of files) {\n const hash = await getFileHash(file!);\n if (!currentUploadedFileHashes.includes(hash)) {\n filesToUpload.push(file);\n\n // This function may recibe all selected files while the modal is open,\n // so, it may contain duplicated files.\n currentUploadedFileHashes.push(hash);\n }\n }\n\n if (filesToUpload.length === 0) {\n return;\n }\n\n const newUploadUIs = filesToUpload.map((file) => ({\n file,\n pages: [],\n uploadInfo: undefined,\n }));\n\n setETicketUploadInfos([...newUploadUIs, ...eTicketUploadInfos]);\n },\n [eTicketUploadInfos, setETicketUploadInfos]\n );\n\n const dropFiles = (\n
    \n \n
    \n );\n\n const onPageClick = useCallback(\n (pageId: string) => {\n if (isMobile) {\n if (selectedUniquePageId === pageId) {\n setSelectedUniquePageId(undefined);\n return;\n }\n }\n setSelectedUniquePageId(pageId);\n },\n [isMobile, selectedUniquePageId, setSelectedUniquePageId]\n );\n\n const onMouseEntersPage = useCallback(\n (uniquePageId: string) => {\n if (isMobile) {\n return;\n }\n setHoverUniquePageId(uniquePageId);\n },\n [isMobile, setHoverUniquePageId]\n );\n\n const onMouseLeavesPage = useCallback(() => {\n if (isMobile) {\n return;\n }\n setHoverUniquePageId(undefined);\n }, [isMobile, setHoverUniquePageId]);\n\n return (\n
    \n
    \n \n {!isMobile && (\n \n \n \n \n )}\n
    \n
    \n \n {isMobile && dropFiles}\n {eTicketUploadInfos\n .filter((ui) => !!ui.file)\n .map((ui, ticketDocumentIndex) => {\n const key = `e-ticket-file-${ticketDocumentIndex}`;\n const isBeingProcessed = ui.file?.name && !ui.pages?.length;\n\n // If the ui has uploadInfo but no pages, it's being uploaded/processed, so just display a spinner for the file\n if (isBeingProcessed) {\n return (\n \n );\n }\n\n // Has no uploadInfo or has pages, display component to display thumbnail or single-file uploader\n return (\n \n {ui.pages?.length === 1 ? (\n onFileDeleted(ui)}\n pageUniqueIdToTicketMap={pageUniqueIdToTicketMap}\n entityWithTickets={entityWithTickets}\n onRemoveMappedTicket={removeTicketFromSeat}\n onPageClick={onPageClick}\n selectedUniquePageId={selectedUniquePageId}\n isDragging={isDragging}\n onMouseEntersPage={onMouseEntersPage}\n onMouseLeavesPage={onMouseLeavesPage}\n />\n ) : (\n onFileDeleted(ui)}\n pageUniqueIdToTicketMap={pageUniqueIdToTicketMap}\n entityWithTickets={entityWithTickets}\n onRemoveMappedTicket={removeTicketFromSeat}\n onPageClick={onPageClick}\n selectedUniquePageId={selectedUniquePageId}\n isDragging={isDragging}\n onMouseEntersPage={onMouseEntersPage}\n onMouseLeavesPage={onMouseLeavesPage}\n />\n )}\n
    \n );\n })}\n {!isMobile && dropFiles}\n \n \n
    \n );\n}\n","import { useLayoutEffect, useState } from 'react';\n\ninterface UseOnElementResizeProps {\n element?: HTMLDivElement | null | undefined;\n callback: (entries: ResizeObserverEntry[]) => void;\n}\n\nexport const useOnElementResize = ({\n element,\n callback,\n}: UseOnElementResizeProps) => {\n const [resizeObserverEntries, setResizeObserverEntries] = useState<\n ResizeObserverEntry[]\n >([]);\n\n useLayoutEffect(() => {\n const resizeObserver = new ResizeObserver((entries) => {\n callback?.(entries);\n setResizeObserverEntries(entries);\n });\n\n if (element) {\n resizeObserver.observe(element || document.body);\n }\n\n return () => {\n resizeObserver.disconnect();\n };\n }, [callback, element]);\n\n return resizeObserverEntries;\n};\n","import { useEffect, useState } from 'react';\n\ninterface UseTimeoutFlagProps {\n msTimeout?: number;\n}\n\n/**\n * Returns true after the specified timeout time.\n */\nexport const useTimeoutFlag = ({ msTimeout }: UseTimeoutFlagProps) => {\n const [hasTimedOut, setHasTimedOut] = useState(false);\n\n useEffect(() => {\n setTimeout(() => {\n setHasTimedOut(true);\n }, msTimeout);\n }, [msTimeout]);\n\n return hasTimedOut;\n};\n","import { clsx } from 'clsx';\nimport {\n SeatInfo,\n SeatInfoProps,\n} from 'src/components/UploadArtifacts/UploadETicketsV2/views/Seats/SeatInfo/SeatInfo';\nimport { ClearButton } from 'src/components/UploadArtifacts/UploadETicketsV2/views/Tickets/Documents/ClearButton/ClearButton';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { PageIcon } from 'src/svgs/PageIcon';\n\nimport * as styles from './MappedSeat.css';\n\ninterface MappedSeatProps {\n seatInfo: SeatInfoProps;\n fileName: string;\n onUnMapSeat: () => void;\n isSelected: boolean;\n onClick: () => void;\n}\n\nexport const MappedSeat = ({\n seatInfo,\n fileName,\n onUnMapSeat,\n isSelected,\n onClick,\n}: MappedSeatProps) => {\n const useMobileStyle = !useMatchMedia('largeDesktop');\n return (\n ) => {\n e.stopPropagation();\n e.preventDefault();\n onClick();\n }}\n >\n \n \n \n \n {fileName}\n \n ) => {\n e.stopPropagation();\n e.preventDefault();\n onUnMapSeat();\n }}\n />\n \n \n );\n};\n","import { clsx } from 'clsx';\nimport {\n SeatInfo,\n SeatInfoProps,\n} from 'src/components/UploadArtifacts/UploadETicketsV2/views/Seats/SeatInfo/SeatInfo';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport * as styles from './UnMappedSeat.css';\n\ninterface UnmappedSeatProps {\n seatInfo: SeatInfoProps;\n highlightDrop: boolean;\n}\n\nexport const UnMappedSeat = ({\n seatInfo,\n highlightDrop,\n}: UnmappedSeatProps) => {\n return (\n \n \n \n \n \n \n );\n};\n","import { useCallback, useEffect, useMemo } from 'react';\nimport { useDragLayer } from 'react-dnd';\nimport { useFormContext, useWatch } from 'react-hook-form';\nimport { EntityWithRealTicketsPartial } from 'src/components/UploadArtifacts/UploadETicketsV2';\nimport { useUploadETicketsContext } from 'src/components/UploadArtifacts/UploadETicketsV2/UploadETicketsContext';\nimport { UploadETicketsDraggableSource } from 'src/components/UploadArtifacts/UploadETicketsV2/views/Draggable/constants';\nimport { droppable } from 'src/components/UploadArtifacts/UploadETicketsV2/views/Seats/droppable.css';\nimport { MappedSeat } from 'src/components/UploadArtifacts/UploadETicketsV2/views/Seats/MappedSeat/MappedSeat';\nimport { SeatInfoProps } from 'src/components/UploadArtifacts/UploadETicketsV2/views/Seats/SeatInfo/SeatInfo';\nimport { UnMappedSeat } from 'src/components/UploadArtifacts/UploadETicketsV2/views/Seats/UnmappedSeat/UnmappedSeat';\nimport { UploadETicketsDraggableData } from 'src/components/UploadArtifacts/UploadETicketsV2/views/Tickets/Documents/UploadETicketsDraggableData';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ErrorMessage } from 'src/core/POS/ErrorMessage';\nimport { PosDroppable } from 'src/core/POS/PosDragNDrop';\nimport { PosCustomDragLayer } from 'src/core/POS/PosDragNDrop/PosCustomDragLayer';\nimport { Button } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n DocumentPage,\n DocumentType,\n Ticket,\n TicketType,\n UserDocumentLinks,\n} from 'src/WebApiController';\n\nimport * as styles from '../UploadETickets.css';\nimport {\n UploadETicketsSeat,\n UploadETicketsSeatingContainer,\n} from '../UploadETickets.styled';\nimport {\n DocumentFileUploadInfo,\n ETicketsForm,\n getDocumentPageUniqueId,\n getETicketDocumentPageUniqueId,\n getPageToDocumentFileUploadInfoMap,\n UniquePageIdToDocumentFileUploadInfoMap,\n} from '../UploadETickets.utils';\n\nexport function UploadETicketsSeatingSection({\n entityWithTickets,\n eTicketUploadInfos,\n ticketType,\n}: {\n entityWithTickets: EntityWithRealTicketsPartial;\n ticketType: TicketType.ETicket | TicketType.QRCode;\n eTicketUploadInfos: DocumentFileUploadInfo[];\n}) {\n const uniquePageIdToDocumentFileUploadInfoMap: UniquePageIdToDocumentFileUploadInfoMap =\n useMemo(\n () => getPageToDocumentFileUploadInfoMap(eTicketUploadInfos),\n [eTicketUploadInfos]\n );\n const { setValue, clearErrors, formState } = useFormContext();\n const watchTickets: UserDocumentLinks[] = useWatch({\n name: 'ticketAssignments',\n });\n\n const hasMappings = useMemo(() => {\n return watchTickets.some((ticket) => ticket.documentId.length > 0);\n }, [watchTickets]);\n\n const {\n setUniquePageIdToDocumentFileUploadInfoMap,\n selectedUniquePageId,\n setSelectedUniquePageId,\n selectNextUnmappedTicket,\n } = useUploadETicketsContext();\n\n useEffect(() => {\n setUniquePageIdToDocumentFileUploadInfoMap(\n uniquePageIdToDocumentFileUploadInfoMap\n );\n }, [\n setUniquePageIdToDocumentFileUploadInfoMap,\n uniquePageIdToDocumentFileUploadInfoMap,\n ]);\n\n const onDroppingToSeat = useCallback(\n (eTicket: DocumentPage, ticket: Ticket, ticketIndex: number) => {\n setValue(`ticketAssignments.${ticketIndex}`, {\n entityId: ticket.id,\n documentId: eTicket.documentId,\n pageNumber: eTicket.pageNumber,\n pageId: eTicket.id,\n pageUri: eTicket.thumbUrl,\n documentUri: eTicket.documentUrl,\n documentType:\n ticketType === TicketType.ETicket\n ? DocumentType.ETicket\n : DocumentType.QRCode,\n });\n clearErrors(`ticketAssignments.${ticketIndex}`);\n setSelectedUniquePageId(getDocumentPageUniqueId(eTicket));\n },\n [clearErrors, setSelectedUniquePageId, setValue, ticketType]\n );\n\n const onUnmappingFromSeat = useCallback(\n (ticket: Ticket, ticketIndex: number) => {\n setValue(`ticketAssignments.${ticketIndex}`, {\n entityId: ticket.id,\n documentId: '',\n pageNumber: 0,\n pageId: '',\n pageUri: '',\n documentUri: '',\n documentType: null,\n });\n },\n [setValue]\n );\n\n const onClearAll = useCallback(() => {\n entityWithTickets.tickets.forEach((ticket, ticketIndex) => {\n onUnmappingFromSeat(ticket, ticketIndex);\n });\n }, [entityWithTickets.tickets, onUnmappingFromSeat]);\n\n const { isDragging } = useDragLayer((monitor) => {\n return {\n isDragging: monitor.isDragging(),\n };\n });\n\n return (\n
    \n
    \n \n \n \n \n
    \n
    \n \n {entityWithTickets.tickets.map((ticket, ticketIndex) => {\n const assignment = watchTickets.find(\n (wt) => wt.entityId === ticket.id\n );\n const uniquePageId =\n (assignment && getETicketDocumentPageUniqueId(assignment)) ?? '';\n const docUploadInfos =\n assignment && uniquePageIdToDocumentFileUploadInfoMap[uniquePageId];\n\n const error =\n formState?.errors?.ticketAssignments?.[ticketIndex]?.message;\n\n const eTicketPage = docUploadInfos?.page;\n const seatInfo: SeatInfoProps = {\n section: entityWithTickets.seating.section,\n row: ticket.row,\n seatFr: ticket.seat,\n ticketIndex: ticketIndex,\n };\n return (\n \n \n hideBorder={true}\n onOverClassnames={droppable}\n draggableSource={UploadETicketsDraggableSource}\n onDrop={(args: { data: UploadETicketsDraggableData }) => {\n const page = args.data.componentProps.page;\n if (eTicketPage) {\n if (\n eTicketPage.id === page.id &&\n eTicketPage.documentId === page.documentId\n ) {\n // same stuff, dont' do anything\n return;\n } else {\n // Unmap the seat first prior to setting a new one, so that the rendering can happen properly\n onUnmappingFromSeat(ticket, ticketIndex);\n }\n }\n\n // If the dropped page was already assigned before\n const assignedTicket = watchTickets.find(\n (wt) =>\n wt.documentId === page.documentId && wt.pageId === page.id\n );\n if (assignedTicket) {\n const ticketToUnassign = entityWithTickets.tickets.find(\n (wt) => wt.id === assignedTicket.entityId\n );\n if (ticketToUnassign) {\n const ticketIndexToUnassign =\n entityWithTickets.tickets.indexOf(ticketToUnassign);\n onUnmappingFromSeat(\n ticketToUnassign,\n ticketIndexToUnassign\n );\n }\n }\n onDroppingToSeat(page, ticket, ticketIndex);\n selectNextUnmappedTicket(getDocumentPageUniqueId(page));\n }}\n >\n {eTicketPage && !isDragging ? (\n onUnmappingFromSeat(ticket, ticketIndex)}\n isSelected={\n !!selectedUniquePageId &&\n uniquePageId === selectedUniquePageId\n }\n onClick={() => setSelectedUniquePageId(uniquePageId)}\n />\n ) : (\n \n )}\n \n {error && {error}}\n \n \n );\n })}\n \n
    \n );\n}\n","import { useEffect, useRef } from 'react';\nimport { createPortal } from 'react-dom';\nimport { useFormContext, useWatch } from 'react-hook-form';\nimport { ticketsAndSeatsZIndex } from 'src/components/UploadArtifacts/UploadETicketsV2/constants';\nimport { useUploadETicketsContext } from 'src/components/UploadArtifacts/UploadETicketsV2/UploadETicketsContext';\nimport { UploadETicketsPreviewTicketModal } from 'src/components/UploadArtifacts/UploadETicketsV2/views/PreviewModal/UploadETicketsPreviewTicketModal';\nimport { UploadETicketsTicketsSection } from 'src/components/UploadArtifacts/UploadETicketsV2/views/UploadETicketsTicketsSection';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useDndFilerUploaderContext } from 'src/core/POS/DnDFileUploader/DndFileUploaderContext';\nimport { vars } from 'src/core/themes';\nimport { mergeProps } from 'src/core/utils';\nimport { useOnElementResize } from 'src/hooks/useOnElementResize';\nimport { useTimeoutFlag } from 'src/hooks/useTimeoutFlag';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { EntityWithRealTickets } from 'src/utils/ticketUtils';\nimport { TicketType, UserDocumentLinks } from 'src/WebApiController';\n\nimport * as styles from '../UploadETickets.css';\nimport {\n UploadETicketsInstructions,\n UploadETicketsSubInstructions,\n} from '../UploadETickets.styled';\nimport {\n DocumentFileUploadInfo,\n ETicketsForm,\n getDocumentPageUniqueId,\n} from '../UploadETickets.utils';\nimport { UploadETicketsSeatingSection } from './UploadETicketsSeatingSection';\n\nexport type EntityWithRealTicketsPartial = Pick<\n EntityWithRealTickets,\n 'viagVirtualId' | 'id' | 'ticketCnt' | 'tickets' | 'seating' | 'entityType'\n>;\nconst onWindowResize = (entries: ResizeObserverEntry[]) => {};\n\nexport const UploadETicketsSeatAssignmentBody = ({\n entityWithTickets,\n ticketType,\n eTicketUploadInfos,\n setETicketUploadInfos,\n className,\n}: {\n entityWithTickets: EntityWithRealTicketsPartial;\n ticketType: TicketType.ETicket | TicketType.QRCode;\n eTicketUploadInfos: DocumentFileUploadInfo[];\n setETicketUploadInfos: (infos: DocumentFileUploadInfo[]) => void;\n className?: string;\n}) => {\n const { setValue } = useFormContext();\n const watchedTickets: UserDocumentLinks[] = useWatch({\n name: 'ticketAssignments',\n });\n const autoAssignment = useRef(true);\n const { isDragging } = useDndFilerUploaderContext();\n const { setSelectedUniquePageId } = useUploadETicketsContext();\n const ticketsSectionPortalRef = useRef(null);\n const hasRenderModalAnimation = useTimeoutFlag({ msTimeout: 500 });\n\n /*\n * Use to trigger window repaint on browser window change size because\n * the portal positioning element needs to know about it to recalculate\n * the width.\n */\n useOnElementResize({\n element: ticketsSectionPortalRef.current,\n callback: onWindowResize,\n });\n\n useEffect(() => {\n const allPagesAvailable =\n eTicketUploadInfos.find(\n (ui) => ui.file && ui.uploadInfo && (ui.pages?.length || 0) === 0\n ) == null; // returns false where any uploadInfo (that has file and uploadInfo) has no pages\n if (autoAssignment.current && allPagesAvailable) {\n // Only perform once, and perform only when all pages are available\n const allPages = eTicketUploadInfos\n .flatMap((ui) => ui.pages)\n .filter((p) => p);\n if (\n allPages.length > 0 && // if we have pages to assigne\n watchedTickets.filter((t) => t.pageId !== '').length === 0 // and we have not assign any ticket to any seat\n ) {\n // Try to auto-assign seat based on order of the pages\n // Users can re-adjust if they see fit\n // TODO - we can probably use some smart-scanning features to figure out which page is for which seat\n watchedTickets.forEach((t, index) => {\n if (index < allPages.length) {\n const page = allPages[index];\n t.documentId = page!.documentId;\n t.pageId = page!.id;\n t.pageNumber = page!.pageNumber;\n t.pageUri = page!.thumbUrl;\n t.documentUri = page!.documentUrl;\n }\n });\n\n setValue('ticketAssignments', [...watchedTickets]);\n autoAssignment.current = false;\n const firstPage = allPages[0];\n if (firstPage) {\n setSelectedUniquePageId(getDocumentPageUniqueId(firstPage));\n }\n }\n }\n }, [setSelectedUniquePageId, eTicketUploadInfos, setValue, watchedTickets]);\n\n return (\n \n
    \n {ticketsSectionPortalRef?.current &&\n hasRenderModalAnimation &&\n createPortal(\n \n \n \n \n \n \n \n
    \n \n \n \n
    \n
    ,\n document.body\n )}\n
    \n );\n};\n","import { useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport {\n DocumentFileUploadInfo,\n UploadETicketForm,\n UploadETicketsSeatAssignmentBody,\n} from 'src/components/UploadArtifacts/UploadETicketsV2';\nimport { UploadETicketsContextProvider } from 'src/components/UploadArtifacts/UploadETicketsV2/UploadETicketsContext';\nimport { Stack } from 'src/core/ui';\nimport { PurchaseWizardFooter } from 'src/modals/common';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport { PurchaseTicketsInput } from 'src/utils/purchaseUtils';\nimport { toEntityWithTicket } from 'src/utils/ticketUtils';\nimport {\n ActionOutboxEntityType,\n DocumentProcessorClient,\n DocumentUploadInfo,\n FileParameter,\n PosClientConfig,\n PosUiActionResult,\n TicketType,\n UserDocumentLinks,\n} from 'src/WebApiController';\n\nimport {\n ticketGroupInputFooter,\n ticketGroupPredeliveryBody,\n} from '../PurchaseTicketFlow.css';\n\nexport interface UploadETicketsSectionV2Props {\n ticketGroupIndex: number;\n ticketType: TicketType.ETicket | TicketType.QRCode;\n onCancel: () => void;\n}\n\nexport const UploadETicketsSectionV2 = ({\n ticketGroupIndex,\n ticketType,\n onCancel,\n}: UploadETicketsSectionV2Props) => {\n const { setValue, watch } = useFormContext();\n const ticketGroup = watch(`ticketGroups.${ticketGroupIndex}`);\n\n const onUploadETickets = (\n _: PosClientConfig,\n entityId: number,\n etickets: UserDocumentLinks[]\n ) => {\n const newTickets = ticketGroup.tickets?.value?.map((t) => {\n const tb = etickets.find((b) => b.entityId === t.id);\n if (tb) {\n if (ticketType === TicketType.ETicket) {\n t.eTicket = tb;\n } else {\n t.qrCode = tb;\n }\n return { ...t };\n }\n return t;\n });\n\n setValue(\n `ticketGroups.${ticketGroupIndex}.tickets`,\n posChangedField(newTickets ?? null)\n );\n\n setValue('updatePredeliveryETicketArtifacts', true);\n\n return Promise.resolve({\n status: 200,\n entityId,\n entityType: ActionOutboxEntityType.Purchase,\n } as PosUiActionResult);\n };\n\n const onUploadDocuments = (\n client: DocumentProcessorClient,\n docUploadInfo: DocumentUploadInfo,\n file: FileParameter\n ) =>\n client.uploadDocumentForListing(\n docUploadInfo.entityId,\n ActionOutboxEntityType.Listing,\n docUploadInfo.documentType,\n docUploadInfo.blobName,\n docUploadInfo.documentId,\n docUploadInfo.contentType,\n file\n );\n\n const entityWithTickets = useMemo(\n () => toEntityWithTicket(ticketGroup),\n [ticketGroup]\n );\n\n return (\n \n void,\n onNext: () => void,\n onCancel: () => void,\n disabled?: boolean\n ) => (\n \n \n\n \n \n )}\n />\n \n );\n};\n","import { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport {\n UploadETicketsSection,\n UploadETicketsSectionProps,\n} from 'src/modals/PurchaseWizard/PurchaseTicketsFlow/components/UploadETicketsSection';\nimport { UploadETicketsSectionV2 } from 'src/modals/PurchaseWizard/PurchaseTicketsFlowV2/components/UploadETicketsSectionV2';\nimport { Feature } from 'src/WebApiController';\n\ntype UploadETicketsVersionSelectorProps = UploadETicketsSectionProps;\n\nexport const UploadETicketsSectionSelector = ({\n ticketType,\n ticketGroupIndex,\n onCancel,\n}: UploadETicketsVersionSelectorProps) => {\n const hasUploadTicketFilesFlowV2 = useUserHasFeature(\n Feature.UploadTicketFilesFlowV2\n );\n\n if (hasUploadTicketFilesFlowV2) {\n return (\n \n );\n }\n\n return (\n \n );\n};\n","// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const withoutEmptyValues = (arr: any[]) => {\n return arr.filter(\n (val) =>\n val !== '' &&\n val !== null &&\n val !== undefined &&\n (Array.isArray(val)\n ? val.length !== undefined\n ? val.length > 0\n : true\n : true)\n );\n};\n","import { withoutEmptyValues } from './helpers';\n\n// Determine if all values in a collection are unique\nexport function uniqueValues(\n values: unknown[],\n accessorFn?: (val: unknown) => unknown\n) {\n // apply accessorFn if passed\n let valuesToCheck = accessorFn ? values.map(accessorFn) : values;\n\n // ignore empty type values as duplicates\n valuesToCheck = withoutEmptyValues(valuesToCheck);\n\n // sets remove dupe values since all must be unique\n const set = new Set(valuesToCheck);\n\n // if same size, nothing was removed thus all unique\n return valuesToCheck.length === set.size;\n}\n\n// Determine difference between values size and desired count\nexport function requiredCount(\n values: unknown[],\n required: number,\n accessorFn?: (val: unknown) => unknown\n) {\n // apply accessorFn if passed\n const allValues = accessorFn ? values.map(accessorFn) : values;\n\n // empty values are missing values\n const nonEmptyValues = withoutEmptyValues(allValues);\n\n if (allValues.length > required) {\n // Extra values, return positive difference\n return allValues.length - required;\n } else if (nonEmptyValues.length < required) {\n // Missing values, return negative difference\n return nonEmptyValues.length - required;\n }\n\n return 0;\n}\n\n/**\n * Determine if a value is unique within the array of values.\n * @param value: target value to look for in the array\n * @param allValues: values to search for value in\n * @param inclusive?: whether allValues should already include a single occurrence of the value\n * ie. we are asserting the value is already in the array allValues only once\n */\nexport function isUniqueWithin(value: T, allValues: T[], inclusive = true) {\n const expectedLength = inclusive ? 1 : 0;\n const filteredOutEmptyValues = withoutEmptyValues(allValues);\n return (\n !value ||\n filteredOutEmptyValues.filter((x) => x === value).length === expectedLength\n );\n}\n","import { UseFormSetError } from 'react-hook-form';\nimport { IErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { isUniqueWithin } from 'src/utils/validation';\nimport {\n PosClientConfig,\n SaleClient,\n TicketBarcode,\n} from 'src/WebApiController';\n\nexport type BarcodeForm = {\n isBulkUpload: boolean;\n barcodes: TicketBarcode[];\n};\nexport const checkDuplicateBarcodes = async (\n entityId: number,\n barcodes: TicketBarcode[],\n activeAccountWebClientConfig: PosClientConfig,\n alreadyReportedUsedBarcodes: string[],\n setAlreadyReportedUsedBarcodes: (barcodes: string[]) => void,\n onDuplicateBarcode: (index: number) => void,\n onBeforeCheck?: () => void,\n onAfterCheck?: () => void,\n showErrorDialog?: IErrorBoundaryContext['showErrorDialog'],\n viagVirtualId?: string\n): Promise => {\n return tryInvokeApi(\n async () => {\n onBeforeCheck?.();\n\n if (!barcodes) {\n return false;\n }\n\n const existingBarcodes = await new SaleClient(\n activeAccountWebClientConfig\n ).getBarcodesAlreadyInUse(viagVirtualId, barcodes);\n\n if (existingBarcodes) {\n // Get all the used barcodes that have not yet been reported\n const unreportedBarCodes = existingBarcodes.filter(\n (b) => !alreadyReportedUsedBarcodes.includes(b.barcode)\n );\n if (unreportedBarCodes.length > 0) {\n // We're reporting the dup warnings, so save it so we don't report on it again\n // We want to set all of it (not just the latest unreported barcodes)\n setAlreadyReportedUsedBarcodes(\n existingBarcodes.map((tb) => tb.barcode)\n );\n\n let hasErrors = false;\n existingBarcodes.forEach((tb) => {\n const index = barcodes.findIndex((b) => b.ticketId === tb.ticketId);\n\n if (index >= 0) {\n hasErrors = true;\n onDuplicateBarcode(index);\n }\n });\n\n return hasErrors;\n }\n }\n\n return false;\n },\n (error) => {\n showErrorDialog?.('SaleClient.getBarcodesAlreadyInUse', error, {\n trackErrorData: {\n saleId: entityId,\n barcodes,\n },\n });\n },\n () => onAfterCheck?.()\n );\n};\n\nexport const checkBarcodeErrors = (\n isBulkUpload: boolean,\n barcodes: TicketBarcode[],\n ticketCnt: number,\n setError: UseFormSetError,\n requiredMsg: string,\n missingMsg: string,\n extraMsg: string,\n duplicateMsg: string\n) => {\n let hasErrors = false;\n const barcodesProvided =\n barcodes?.map((b) => b.barcode).filter((b) => b?.length) ?? [];\n if (isBulkUpload) {\n const barcodesProvided =\n barcodes?.map((b) => b.barcode).filter((b) => b?.length) ?? [];\n if (barcodesProvided.length < ticketCnt) {\n hasErrors = true;\n setError(`barcodes`, { message: missingMsg as string }); // for the bulk-edit inputs\n } else if (barcodesProvided.length > ticketCnt) {\n hasErrors = true;\n setError(`barcodes`, { message: extraMsg as string }); // for the bulk-edit inputs\n }\n }\n\n barcodes?.forEach((b, i) => {\n if (!b.barcode) {\n hasErrors = true;\n setError(`barcodes.${i}.barcode`, { message: requiredMsg });\n } else if (!isUniqueWithin(b.barcode, barcodesProvided, true)) {\n hasErrors = true;\n if (isBulkUpload) {\n setError(`barcodes`, { message: duplicateMsg }); // for the bulk-edit inputs\n }\n setError(`barcodes.${i}.barcode`, { message: duplicateMsg });\n }\n });\n return hasErrors;\n};\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport const BulkUploadWrapper = styled.div`\n padding: ${() => `${vars.spacing.lg} 0`};\n\n textarea {\n min-height: 200px;\n\n :disabled {\n color: ${({ theme }) => theme.colors.textDisabled};\n border-color: ${({ theme }) => theme.colors.borderDisabled};\n background-color: ${(props) =>\n props.theme.colors.backgroundActiveDisabled};\n cursor: not-allowed;\n }\n }\n`;\n\nexport const InstructionsWrapper = styled.div`\n display: flex;\n flex-direction: row;\n align-items: center;\n margin-top: ${() => vars.spacing.sm};\n\n > *:first-child {\n flex: 1;\n margin-top: 0;\n }\n`;\n","import { debounce } from 'lodash-es';\nimport React, { useCallback, useEffect, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { FormText } from 'reactstrap';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosTextArea } from 'src/core/POS/PosTextArea';\nimport { getTextFieldState } from 'src/core/POS/PosTextField';\nimport { Button } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { TicketBarcode } from 'src/WebApiController';\n\nimport { BarcodeForm } from '../UploadBarcodes.utils';\nimport {\n BulkUploadWrapper,\n InstructionsWrapper,\n} from './BulkBarcodeInput.styled';\n\nexport const BulkBarcodeInput = ({\n quantity,\n readOnly = false,\n onPreview,\n}: {\n quantity: number;\n onPreview?: () => void;\n readOnly?: boolean;\n}) => {\n const {\n register,\n trigger,\n setValue,\n watch,\n formState: { errors, touchedFields },\n } = useFormContext();\n const barcodes = watch('barcodes');\n\n const initialValue = useMemo(() => {\n const barcodesArray = barcodes.map(({ barcode }: TicketBarcode) => barcode);\n return barcodesArray.join('\\n').trimEnd();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n useEffect(() => {\n /**\n * Registering this was since the dispay value differs from how it is stored\n * ie. string for text area vs TicketBarcode[]\n */\n register('barcodes');\n\n // loaded from a toggle, show errors\n if (touchedFields?.barcodes?.length) {\n trigger('barcodes');\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const handleChange = useCallback(\n (e: React.SyntheticEvent) => {\n debounce((e: React.SyntheticEvent) => {\n const newBarcodes = (e.target as HTMLInputElement).value\n .trimEnd()\n .split('\\n');\n\n if (newBarcodes.length < quantity) {\n newBarcodes.push(\n ...new Array(quantity - newBarcodes.length).fill('')\n );\n }\n\n setValue(\n 'barcodes',\n // create array of barcodes in original insert order\n newBarcodes.map((barcode, idx) => ({\n // in order to display \"Too many\" error, set null\n ...barcodes[idx],\n barcode,\n })),\n { shouldValidate: true, shouldTouch: true, shouldDirty: true }\n );\n }, 100)(e);\n },\n [setValue, barcodes, quantity]\n );\n\n const barcodesError = errors?.barcodes?.message;\n\n return (\n \n \n \n \n {!readOnly && (\n \n \n \n \n {onPreview && (\n \n )}\n \n )}\n \n );\n};\n","import React from 'react';\nimport { SeatingInfo } from 'src/components/common/SeatingInfo';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport {\n getTextFieldState,\n PosTextField,\n PosTextFieldProps,\n} from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { BarcodeIcon } from 'src/svgs/Viagogo';\nimport { TicketBarcode } from 'src/WebApiController';\n\ninterface SeatBarcodeInputProps extends PosTextFieldProps {\n ticketBarcode: TicketBarcode;\n errors?: string[];\n disabled?: boolean;\n index: number;\n}\nexport const SeatBarcodeInput = React.forwardRef(\n (\n { ticketBarcode, errors, index, ...props }: SeatBarcodeInputProps,\n ref: React.Ref\n ) => {\n const { row, section, seat } = ticketBarcode;\n return (\n \n }\n >\n }\n {...props}\n />\n \n );\n }\n);\n\nSeatBarcodeInput.displayName = 'VenueMapContent';\n","import { useFormContext } from 'react-hook-form';\nimport { SeatBarcodeInput } from 'src/components/UploadArtifacts/UploadBarcodes/SeatBarcodeInput';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { TicketBarcode } from 'src/WebApiController';\n\nimport { BarcodeForm } from '../UploadBarcodes.utils';\n\nexport const BarcodeInput = ({\n ticketBarcode,\n disabled,\n index,\n}: {\n ticketBarcode: TicketBarcode;\n disabled: boolean;\n index: number;\n forceShowErrors?: boolean;\n}) => {\n const { register, formState } = useFormContext();\n\n const field: `barcodes.${number}.barcode` = `barcodes.${index}.barcode`;\n\n const error = formState.errors.barcodes?.[index]?.barcode;\n const warning = error?.type === 'warning' ? error?.message : '';\n const errorMessage = error?.type !== 'warning' ? error?.message ?? '' : '';\n\n const requiredMsg = useContent(ContentId.Required);\n\n return (\n <>\n \n {warning && }\n \n );\n};\n","import { useEffect, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { TicketBarcode } from 'src/WebApiController';\n\nimport { BarcodeForm } from '../UploadBarcodes.utils';\nimport { BarcodeInput } from './BarcodeInput';\n\nexport const ManualBarcodeEntry = ({\n quantity,\n readOnly = false,\n}: {\n quantity: number;\n readOnly?: boolean;\n}) => {\n const {\n setValue,\n watch,\n trigger,\n formState: { isDirty },\n } = useFormContext();\n const [showErrors, setShowErrors] = useState(isDirty);\n const barcodes = watch('barcodes');\n\n useEffect(() => {\n // Handle toggle between bulk and manual where extra barcodes were entered\n if (barcodes.length > quantity) {\n setValue('barcodes', barcodes.slice(0, quantity));\n trigger();\n } else if (isDirty) {\n // loaded from a toggle, show errors\n setShowErrors(true);\n trigger();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return (\n <>\n {barcodes.map((ticketBarcode: TicketBarcode, i: number) => {\n return (\n \n );\n })}\n \n );\n};\n","import { useFormContext } from 'react-hook-form';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Switch } from 'src/core/interim/Switch';\nimport { Stack } from 'src/core/ui';\nimport { mergeProps } from 'src/core/utils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Seating } from 'src/WebApiController';\n\nimport { BulkBarcodeInput } from './BulkBarcodeInput';\nimport { ManualBarcodeEntry } from './ManualBarcodeEntry';\nimport * as styles from './UploadBarcodes.css';\nimport { BarcodeForm } from './UploadBarcodes.utils';\n\nexport type UploadBarcodesBodyProps = {\n isReadOnly?: boolean;\n ticketCnt: number;\n seating: Seating;\n instructionContentId?: ContentId;\n className?: string;\n};\nexport const UploadBarcodesBody = ({\n isReadOnly,\n seating,\n ticketCnt,\n instructionContentId,\n className,\n}: UploadBarcodesBodyProps) => {\n const { watch, setValue } = useFormContext();\n\n const bulkUpload = watch('isBulkUpload');\n\n const inputProps = {\n readOnly: isReadOnly,\n seating,\n quantity: ticketCnt,\n };\n\n return (\n \n {!isReadOnly && (\n \n )}\n \n \n setValue('isBulkUpload', !bulkUpload)}\n disabled={isReadOnly}\n />\n \n {!bulkUpload ? (\n \n ) : (\n setValue('isBulkUpload', !bulkUpload)}\n />\n )}\n \n );\n};\n","import { ComponentProps, ReactNode, useCallback, useState } from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useContent, useFormattedContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { isSuccess } from 'src/utils/errorUtils';\nimport { EntityWithRealTickets } from 'src/utils/ticketUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ApiException,\n PosClientConfig,\n PosUiActionResult,\n TicketBarcode,\n} from 'src/WebApiController';\n\nimport {\n BarcodeForm,\n checkBarcodeErrors,\n checkDuplicateBarcodes,\n} from './UploadBarcodes.utils';\n\nexport type UploadBarcodesFormProps = {\n entityWithTickets: Pick<\n EntityWithRealTickets,\n 'viagVirtualId' | 'id' | 'ticketCnt' | 'tickets' | 'seating'\n >;\n renderContent: (onUploadClick: () => void, disabled?: boolean) => ReactNode;\n onComplete: (isCancelled: boolean) => void;\n onUpload?: (\n posClientConfig: PosClientConfig,\n entityId: number,\n barcodes: TicketBarcode[]\n ) => Promise;\n defaultToBulk?: boolean;\n isReadOnly?: boolean;\n};\n\nexport const UploadBarcodesForm = (props: UploadBarcodesFormProps) => {\n const methods = useForm({\n defaultValues: {\n barcodes: props.entityWithTickets.tickets?.map(\n ({ id, barcode, row, seat }) => {\n return {\n ticketId: id,\n barcode: barcode || '',\n section: props.entityWithTickets.seating.section,\n row: row,\n seat: seat,\n };\n }\n ),\n },\n });\n return (\n \n \n \n );\n};\n\nconst UploadBarcodesContent = ({\n entityWithTickets,\n renderContent,\n onComplete,\n onUpload,\n handleSubmit,\n setError,\n watch,\n isReadOnly = false,\n}: UploadBarcodesFormProps &\n Omit<\n ComponentProps>,\n 'children'\n >) => {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const { ticketCnt } = entityWithTickets;\n const barcodes = watch('barcodes');\n const bulkUpload = watch('isBulkUpload');\n\n const [readOnly, setReadOnly] = useState(isReadOnly);\n\n const [alreadyReportedUsedBarcodes, setAlreadyReportedUsedBarcodes] =\n useState([]);\n const barcodeAlreadyUsedWarning = useContent(ContentId.BarcodeAlreadyInUsed);\n\n const { showErrorDialog, genericError } = useErrorBoundaryContext();\n\n const requiredMsg = useContent(ContentId.Required);\n const duplicateMsg = useContent(ContentId.DuplicateBarcode);\n const barcodesProvided =\n barcodes?.map((b) => b.barcode).filter((b) => b?.length) ?? [];\n const missingMsg = useFormattedContent(\n FormatContentId.MissingBarcodes,\n `${ticketCnt - barcodesProvided.length}`\n );\n\n const extraMsg = useFormattedContent(\n FormatContentId.ExtraBarcodes,\n `${barcodesProvided.length - ticketCnt}`\n );\n\n const onSubmit = useCallback(\n async ({ barcodes }: BarcodeForm) => {\n if (!onUpload) {\n console.log(\n 'Internal Error - no onUploadBarcodes provided for non-readonly mode.'\n );\n return;\n }\n\n if (!entityWithTickets) {\n console.log('Internal Error - entity (listing or sale) is null.');\n return;\n }\n\n tryInvokeApi(\n async () => {\n setReadOnly(true);\n\n const result = await onUpload(\n activeAccountWebClientConfig,\n entityWithTickets.id,\n barcodes!\n );\n if (!isSuccess(result)) {\n showErrorDialog(\n 'onUploadBarcodes',\n {\n message: result.message ?? genericError,\n status: result.status!,\n } as ApiException,\n {\n onDismissError: () => onComplete(true),\n trackErrorData: {\n saleId: entityWithTickets?.id,\n barcodes,\n },\n }\n );\n } else {\n onComplete(false);\n }\n },\n (error) => {\n showErrorDialog('onUploadBarcodes', error, {\n trackErrorData: {\n saleId: entityWithTickets?.id,\n barcodes,\n },\n });\n },\n () => setReadOnly(false)\n );\n },\n [\n onUpload,\n entityWithTickets,\n activeAccountWebClientConfig,\n showErrorDialog,\n genericError,\n onComplete,\n ]\n );\n\n const onUploadClick = useCallback(async () => {\n let hasErrors = checkBarcodeErrors(\n bulkUpload,\n barcodes,\n ticketCnt,\n setError,\n requiredMsg,\n missingMsg as string,\n extraMsg as string,\n duplicateMsg\n );\n\n if (hasErrors) {\n return;\n }\n\n hasErrors = Boolean(\n await checkDuplicateBarcodes(\n entityWithTickets!.id,\n barcodes,\n activeAccountWebClientConfig,\n alreadyReportedUsedBarcodes,\n setAlreadyReportedUsedBarcodes,\n (index: number) =>\n setError(`barcodes.${index}.barcode`, {\n type: 'warning',\n message: barcodeAlreadyUsedWarning,\n }),\n () => setReadOnly(true),\n () => setReadOnly(false),\n showErrorDialog,\n entityWithTickets!.viagVirtualId\n )\n );\n\n if (!hasErrors) {\n handleSubmit(onSubmit)();\n }\n }, [\n bulkUpload,\n barcodes,\n ticketCnt,\n setError,\n requiredMsg,\n missingMsg,\n extraMsg,\n duplicateMsg,\n entityWithTickets,\n activeAccountWebClientConfig,\n alreadyReportedUsedBarcodes,\n showErrorDialog,\n barcodeAlreadyUsedWarning,\n handleSubmit,\n onSubmit,\n ]);\n\n const reallyReadOnly = isReadOnly || readOnly;\n\n return renderContent(onUploadClick, reallyReadOnly);\n};\n","import { useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport {\n UploadBarcodesBody,\n UploadBarcodesForm,\n} from 'src/components/UploadArtifacts/UploadBarcodes';\nimport { Stack } from 'src/core/ui';\nimport { PurchaseWizardFooter } from 'src/modals/common';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport { PurchaseTicketsInput } from 'src/utils/purchaseUtils';\nimport { toEntityWithTicket } from 'src/utils/ticketUtils';\nimport {\n ActionOutboxEntityType,\n PosClientConfig,\n PosUiActionResult,\n TicketBarcode,\n} from 'src/WebApiController';\n\nimport {\n ticketGroupInputFooter,\n ticketGroupPredeliveryBody,\n} from '../PurchaseTicketFlow.css';\n\nexport const UploadBarcodesSection = ({\n ticketGroupIndex,\n onCancel,\n}: {\n ticketGroupIndex: number;\n onCancel: () => void;\n}) => {\n const { setValue, watch } = useFormContext();\n\n const ticketGroup = watch(`ticketGroups.${ticketGroupIndex}`);\n\n const onSubmit = (\n _: PosClientConfig,\n entityId: number,\n barcodes: TicketBarcode[]\n ) => {\n const newTickets = ticketGroup.tickets?.value?.map((t) => {\n const tb = barcodes.find((b) => b.ticketId === t.id);\n t.barcode = tb?.barcode ?? null;\n return { ...t };\n });\n\n setValue(\n `ticketGroups.${ticketGroupIndex}.tickets`,\n posChangedField(newTickets ?? null)\n );\n\n return Promise.resolve({\n status: 200,\n entityId,\n entityType: ActionOutboxEntityType.Purchase,\n } as PosUiActionResult);\n };\n const entityWithTickets = useMemo(\n () => toEntityWithTicket(ticketGroup),\n [ticketGroup]\n );\n\n return (\n void, disabled?: boolean) => (\n \n \n \n \n )}\n />\n );\n};\n","import { UseFormSetError } from 'react-hook-form';\nimport { IErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { isUniqueWithin } from 'src/utils/validation';\nimport {\n PosClientConfig,\n SaleClient,\n TicketExternalId,\n} from 'src/WebApiController';\n\nexport type ExternalIdForm = {\n isBulkUpload: boolean;\n externalIds: TicketExternalId[];\n};\n\nexport const checkDuplicateExternalIds = async (\n entityId: number,\n externalIds: TicketExternalId[],\n activeAccountWebClientConfig: PosClientConfig,\n alreadyReportedUsedExternalIds: string[],\n setAlreadyReportedUsedExternalIds: (externalIds: string[]) => void,\n onDuplicateExternalId: (index: number) => void,\n onBeforeCheck?: () => void,\n onAfterCheck?: () => void,\n showErrorDialog?: IErrorBoundaryContext['showErrorDialog'],\n viagVirtualId?: string\n): Promise => {\n return tryInvokeApi(\n async () => {\n onBeforeCheck?.();\n\n if (!externalIds) {\n return false;\n }\n\n const existingExternalIds = await new SaleClient(\n activeAccountWebClientConfig\n ).getTicketExternalIdsAlreadyInUse(viagVirtualId, externalIds);\n\n if (existingExternalIds) {\n // Get all the used externalIds that have not yet been reported\n const unreportedBarCodes = existingExternalIds.filter(\n (b) => !alreadyReportedUsedExternalIds.includes(b.externalId)\n );\n if (unreportedBarCodes.length > 0) {\n // We're reporting the dup warnings, so save it so we don't report on it again\n // We want to set all of it (not just the latest unreported externalIds)\n setAlreadyReportedUsedExternalIds(\n existingExternalIds.map((tb) => tb.externalId)\n );\n\n let hasErrors = false;\n existingExternalIds.forEach((tb) => {\n const index = externalIds.findIndex(\n (b) => b.ticketId === tb.ticketId\n );\n\n if (index >= 0) {\n hasErrors = true;\n onDuplicateExternalId(index);\n }\n });\n\n return hasErrors;\n }\n }\n\n return false;\n },\n (error) => {\n showErrorDialog?.('SaleClient.getExternalIdsAlreadyInUse', error, {\n trackErrorData: {\n saleId: entityId,\n externalIds,\n },\n });\n },\n () => onAfterCheck?.()\n );\n};\n\nexport const checkExternalIdErrors = (\n isBulkUpload: boolean,\n externalIds: TicketExternalId[],\n ticketCnt: number,\n setError: UseFormSetError,\n requiredMsg: string,\n missingMsg: string,\n extraMsg: string,\n duplicateMsg: string\n) => {\n let hasErrors = false;\n const externalIdsProvided =\n externalIds?.map((b) => b.externalId).filter((b) => b?.length) ?? [];\n if (isBulkUpload) {\n const externalIdsProvided =\n externalIds?.map((b) => b.externalId).filter((b) => b?.length) ?? [];\n if (externalIdsProvided.length < ticketCnt) {\n hasErrors = true;\n setError(`externalIds`, { message: missingMsg as string }); // for the bulk-edit inputs\n } else if (externalIdsProvided.length > ticketCnt) {\n hasErrors = true;\n setError(`externalIds`, { message: extraMsg as string }); // for the bulk-edit inputs\n }\n }\n\n externalIds?.forEach((b, i) => {\n if (!b.externalId) {\n hasErrors = true;\n setError(`externalIds.${i}.externalId`, { message: requiredMsg });\n } else if (!isUniqueWithin(b.externalId, externalIdsProvided, true)) {\n hasErrors = true;\n if (isBulkUpload) {\n setError(`externalIds`, { message: duplicateMsg }); // for the bulk-edit inputs\n }\n setError(`externalIds.${i}.externalId`, { message: duplicateMsg });\n }\n });\n return hasErrors;\n};\n","import { debounce } from 'lodash-es';\nimport React, { useCallback, useEffect, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { FormText } from 'reactstrap';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosTextArea } from 'src/core/POS/PosTextArea';\nimport { getTextFieldState } from 'src/core/POS/PosTextField';\nimport { Button } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { TicketExternalId } from 'src/WebApiController';\n\nimport { ExternalIdForm } from '../../UploadExternalIds';\nimport * as styles from './BulkStringArtifactInput.css';\n\nexport const BulkExternalIdInput = ({\n quantity,\n readOnly = false,\n onPreview,\n}: {\n quantity: number;\n onPreview?: () => void;\n readOnly?: boolean;\n}) => {\n const {\n register,\n trigger,\n setValue,\n watch,\n formState: { errors, touchedFields },\n } = useFormContext();\n const externalIds = watch('externalIds');\n\n const initialValue = useMemo(() => {\n const externalIdsArray = externalIds.map(\n ({ externalId }: TicketExternalId) => externalId\n );\n return externalIdsArray.join('\\n').trimEnd();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n useEffect(() => {\n /**\n * Registering this was since the dispay value differs from how it is stored\n * ie. string for text area vs TicketExternalId[]\n */\n register('externalIds');\n\n // loaded from a toggle, show errors\n if (touchedFields?.externalIds?.length) {\n trigger('externalIds');\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const handleChange = useCallback(\n (e: React.SyntheticEvent) => {\n debounce((e: React.SyntheticEvent) => {\n const newExternalIds = (e.target as HTMLInputElement).value\n .trimEnd()\n .split('\\n');\n\n if (newExternalIds.length < quantity) {\n newExternalIds.push(\n ...new Array(quantity - newExternalIds.length).fill('')\n );\n }\n\n setValue(\n 'externalIds',\n // create array of externalIds in original insert order\n newExternalIds.map((externalId, idx) => ({\n // in order to display \"Too many\" error, set null\n ...externalIds[idx],\n externalId,\n })),\n { shouldValidate: true, shouldTouch: true, shouldDirty: true }\n );\n }, 100)(e);\n },\n [setValue, externalIds, quantity]\n );\n\n const externalIdsError = errors?.externalIds?.message;\n\n return (\n
    \n \n \n \n {!readOnly && (\n
    \n \n \n \n {onPreview && (\n \n \n \n )}\n
    \n )}\n
    \n );\n};\n","import { debounce } from 'lodash-es';\nimport React, { useCallback, useEffect, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { FormText } from 'reactstrap';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosTextArea } from 'src/core/POS/PosTextArea';\nimport { getTextFieldState } from 'src/core/POS/PosTextField';\nimport { Button } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { TicketUrl } from 'src/WebApiController';\n\nimport { TicketUrlForm } from '../../UploadTicketUrls';\nimport * as styles from './BulkStringArtifactInput.css';\n\nexport const BulkTicketUrlInput = ({\n quantity,\n readOnly = false,\n onPreview,\n}: {\n quantity: number;\n onPreview?: () => void;\n readOnly?: boolean;\n}) => {\n const {\n register,\n trigger,\n setValue,\n watch,\n formState: { errors, touchedFields },\n } = useFormContext();\n const ticketUrls = watch('ticketUrls');\n\n const initialValue = useMemo(() => {\n const ticketUrlsArray = ticketUrls.map(({ url }: TicketUrl) => url);\n return ticketUrlsArray.join('\\n').trimEnd();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n useEffect(() => {\n /**\n * Registering this was since the dispay value differs from how it is stored\n * ie. string for text area vs TicketUrl[]\n */\n register('ticketUrls');\n\n // loaded from a toggle, show errors\n if (touchedFields?.ticketUrls?.length) {\n trigger('ticketUrls');\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const handleChange = useCallback(\n (e: React.SyntheticEvent) => {\n debounce((e: React.SyntheticEvent) => {\n const newTicketUrls = (e.target as HTMLInputElement).value\n .trimEnd()\n .split('\\n');\n\n if (newTicketUrls.length < quantity) {\n newTicketUrls.push(\n ...new Array(quantity - newTicketUrls.length).fill('')\n );\n }\n\n setValue(\n 'ticketUrls',\n // create array of ticketUrls in original insert order\n newTicketUrls.map((url, idx) => ({\n // in order to display \"Too many\" error, set null\n ...ticketUrls[idx],\n url,\n })),\n { shouldValidate: true, shouldTouch: true, shouldDirty: true }\n );\n }, 100)(e);\n },\n [setValue, ticketUrls, quantity]\n );\n\n const ticketUrlsError = errors?.ticketUrls?.message;\n\n return (\n
    \n \n \n \n {!readOnly && (\n
    \n \n \n \n {onPreview && (\n \n \n \n )}\n
    \n )}\n
    \n );\n};\n","import { useEffect, useState } from 'react';\nimport React from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { SeatingInfo } from 'src/components/common/SeatingInfo';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport {\n getTextFieldState,\n PosTextField,\n PosTextFieldProps,\n} from 'src/core/POS/PosTextField';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Seating, TicketExternalId } from 'src/WebApiController';\n\nimport { ExternalIdForm } from '../../UploadExternalIds';\n\nexport const ManualExternalIdEntry = ({\n seating: { section, sectionId, rowId },\n quantity,\n readOnly = false,\n}: {\n seating: Seating;\n quantity: number;\n readOnly?: boolean;\n}) => {\n const {\n setValue,\n watch,\n trigger,\n formState: { isDirty },\n } = useFormContext();\n const [showErrors, setShowErrors] = useState(isDirty);\n const externalIds = watch('externalIds');\n\n useEffect(() => {\n // Handle toggle between bulk and manual where extra externalIds were entered\n if (externalIds.length > quantity) {\n setValue('externalIds', externalIds.slice(0, quantity));\n trigger();\n } else if (isDirty) {\n // loaded from a toggle, show errors\n setShowErrors(true);\n trigger();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return (\n <>\n {externalIds.map((ticketExternalId: TicketExternalId, i: number) => {\n const { row, seat } = ticketExternalId;\n const id = `${section}-${row}-${seat}-${i}`;\n\n return (\n \n );\n })}\n \n );\n};\n\nexport const ExternalIdInput = ({\n seating,\n disabled,\n index,\n}: {\n seating: Seating;\n disabled: boolean;\n index: number;\n forceShowErrors?: boolean;\n}) => {\n const { register, formState } = useFormContext();\n\n const field: `externalIds.${number}.externalId` = `externalIds.${index}.externalId`;\n\n const error = formState.errors.externalIds?.[index]?.externalId;\n const warning = error?.type === 'warning' ? error?.message : '';\n const errorMessage = error?.type !== 'warning' ? error?.message ?? '' : '';\n\n const requiredMsg = useContent(ContentId.Required);\n\n return (\n <>\n \n {warning && }\n \n );\n};\n\ninterface SeatExternalIdInputProps extends PosTextFieldProps {\n seating: Seating;\n errors?: string[];\n disabled?: boolean;\n}\nexport const SeatExternalIdInput = React.forwardRef(\n (\n { seating, errors, ...props }: SeatExternalIdInputProps,\n ref: React.Ref\n ) => {\n return (\n }\n >\n \n \n );\n }\n);\n\nSeatExternalIdInput.displayName = 'SeatExternalIdInput';\n","import { useEffect, useState } from 'react';\nimport React from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { SeatingInfo } from 'src/components/common/SeatingInfo';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport {\n getTextFieldState,\n PosTextField,\n PosTextFieldProps,\n} from 'src/core/POS/PosTextField';\nimport { URL_REGEX } from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Seating, TicketUrl } from 'src/WebApiController';\n\nimport { TicketUrlForm } from '../../UploadTicketUrls';\n\nexport const ManualTicketUrlEntry = ({\n seating: { section, sectionId, rowId },\n quantity,\n readOnly = false,\n}: {\n seating: Seating;\n quantity: number;\n readOnly?: boolean;\n}) => {\n const {\n setValue,\n watch,\n trigger,\n formState: { isDirty },\n } = useFormContext();\n const [showErrors, setShowErrors] = useState(isDirty);\n const ticketUrls = watch('ticketUrls');\n\n useEffect(() => {\n // Handle toggle between bulk and manual where extra ticketUrls were entered\n if (ticketUrls.length > quantity) {\n setValue('ticketUrls', ticketUrls.slice(0, quantity));\n trigger();\n } else if (isDirty) {\n // loaded from a toggle, show errors\n setShowErrors(true);\n trigger();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return (\n <>\n {ticketUrls.map((ticketTicketUrl: TicketUrl, i: number) => {\n const { row, seat } = ticketTicketUrl;\n const id = `${section}-${row}-${seat}-${i}`;\n\n return (\n \n );\n })}\n \n );\n};\n\nconst TicketUrlInput = ({\n seating,\n disabled,\n index,\n}: {\n seating: Seating;\n disabled: boolean;\n index: number;\n forceShowErrors?: boolean;\n}) => {\n const { register, formState } = useFormContext();\n\n const field: `ticketUrls.${number}.url` = `ticketUrls.${index}.url`;\n\n const error = formState.errors.ticketUrls?.[index]?.url;\n const warning = error?.type === 'warning' ? error?.message : '';\n const errorMessage = error?.type !== 'warning' ? error?.message ?? '' : '';\n\n const requiredMsg = useContent(ContentId.Required);\n const invalidUrlMsg = useContent(ContentId.InvalidUrl);\n\n return (\n <>\n \n {warning && }\n \n );\n};\n\ninterface SeatTicketUrlInputProps extends PosTextFieldProps {\n seating: Seating;\n errors?: string[];\n disabled?: boolean;\n}\nexport const SeatTicketUrlInput = React.forwardRef(\n (\n { seating, errors, ...props }: SeatTicketUrlInputProps,\n ref: React.Ref\n ) => {\n return (\n }\n >\n \n \n );\n }\n);\n\nSeatTicketUrlInput.displayName = 'SeatTicketUrlInput';\n","import { useFormContext } from 'react-hook-form';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Switch } from 'src/core/interim/Switch';\nimport { Stack } from 'src/core/ui';\nimport { mergeProps } from 'src/core/utils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Seating } from 'src/WebApiController';\n\nimport { BulkExternalIdInput } from '../UploadStringArtifacts/BulkStringArtifactInput';\nimport { ManualExternalIdEntry } from '../UploadStringArtifacts/ManualStringArtifactEntry';\nimport * as styles from './UploadExternalIds.css';\nimport { ExternalIdForm } from './UploadExternalIds.utils';\n\nexport type UploadExternalIdsBodyProps = {\n isReadOnly?: boolean;\n ticketCnt: number;\n seating: Seating;\n instructionContentId?: ContentId;\n className?: string;\n};\nexport const UploadExternalIdsBody = ({\n className,\n isReadOnly,\n seating,\n ticketCnt,\n instructionContentId,\n}: UploadExternalIdsBodyProps) => {\n const { watch, setValue } = useFormContext();\n\n const bulkUpload = watch('isBulkUpload');\n\n const inputProps = {\n readOnly: isReadOnly,\n seating,\n quantity: ticketCnt,\n };\n\n return (\n \n {!isReadOnly && (\n \n )}\n \n \n setValue('isBulkUpload', !bulkUpload)}\n disabled={isReadOnly}\n />\n \n {!bulkUpload ? (\n \n ) : (\n setValue('isBulkUpload', !bulkUpload)}\n />\n )}\n \n );\n};\n","import { ComponentProps, ReactNode, useCallback, useState } from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useContent, useFormattedContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { isSuccess } from 'src/utils/errorUtils';\nimport { EntityWithRealTickets } from 'src/utils/ticketUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ApiException,\n PosClientConfig,\n PosUiActionResult,\n TicketExternalId,\n} from 'src/WebApiController';\n\nimport {\n checkDuplicateExternalIds,\n checkExternalIdErrors,\n ExternalIdForm,\n} from './UploadExternalIds.utils';\n\nexport type UploadExternalIdsFormProps = {\n entityWithTickets: Pick<\n EntityWithRealTickets,\n 'viagVirtualId' | 'id' | 'ticketCnt' | 'tickets' | 'seating'\n >;\n renderContent: (onUploadClick: () => void, disabled?: boolean) => ReactNode;\n onComplete: (isCancelled: boolean) => void;\n onUpload?: (\n posClientConfig: PosClientConfig,\n entityId: number,\n externalIds: TicketExternalId[]\n ) => Promise;\n defaultToBulk?: boolean;\n isReadOnly?: boolean;\n};\n\nexport const UploadExternalIdsForm = (props: UploadExternalIdsFormProps) => {\n const methods = useForm({\n mode: 'all',\n criteriaMode: 'all',\n defaultValues: {\n externalIds: props.entityWithTickets.tickets?.map(\n ({ id, externalTicketId, row, seat }) => {\n return {\n ticketId: id,\n externalId: externalTicketId || '',\n section: props.entityWithTickets.seating.section,\n row: row,\n seat: seat,\n };\n }\n ),\n },\n });\n\n return (\n \n \n \n );\n};\n\nconst UploadExternalIdsContent = ({\n entityWithTickets,\n renderContent,\n onComplete,\n onUpload,\n handleSubmit,\n setError,\n watch,\n isReadOnly = false,\n}: UploadExternalIdsFormProps &\n Omit<\n ComponentProps>,\n 'children'\n >) => {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const { ticketCnt } = entityWithTickets;\n const externalIds = watch('externalIds');\n const bulkUpload = watch('isBulkUpload');\n\n const [readOnly, setReadOnly] = useState(isReadOnly);\n const { showErrorDialog, genericError } = useErrorBoundaryContext();\n\n const [alreadyReportedUsedExternalIds, setAlreadyReportedUsedExternalIds] =\n useState([]);\n const externalIdAlreadyUsedWarning = useContent(\n ContentId.TicketIdAlreadyInUsed\n );\n\n const requiredMsg = useContent(ContentId.Required);\n const duplicateMsg = useContent(ContentId.DuplicateTicketId);\n const externalIdsProvided =\n externalIds?.map((b) => b.externalId).filter((b) => b?.length) ?? [];\n const missingMsg = useFormattedContent(\n FormatContentId.MissingTicketIds,\n `${ticketCnt - externalIdsProvided.length}`\n );\n\n const extraMsg = useFormattedContent(\n FormatContentId.ExtraTicketIds,\n `${externalIdsProvided.length - ticketCnt}`\n );\n\n const onSubmit = useCallback(\n async ({ externalIds }: ExternalIdForm) => {\n if (!onUpload) {\n console.log(\n 'Internal Error - no onUploadExternalIds provided for non-readonly mode.'\n );\n return;\n }\n\n if (!entityWithTickets) {\n console.log('Internal Error - entity (listing or sale) is null.');\n return;\n }\n\n tryInvokeApi(\n async () => {\n setReadOnly(true);\n\n const result = await onUpload(\n activeAccountWebClientConfig,\n entityWithTickets.id,\n externalIds!\n );\n if (!isSuccess(result)) {\n showErrorDialog(\n 'SaleClient.updateExternalIdsForSale',\n {\n message: result.message ?? genericError,\n status: result.status!,\n } as ApiException,\n {\n onDismissError: () => onComplete(true),\n trackErrorData: {\n saleId: entityWithTickets?.id,\n externalIds,\n },\n }\n );\n } else {\n onComplete(false);\n }\n },\n (error) => {\n showErrorDialog('SaleClient.updateExternalIdsForSale', error, {\n trackErrorData: {\n saleId: entityWithTickets?.id,\n externalIds,\n },\n });\n },\n () => setReadOnly(false)\n );\n },\n [\n onUpload,\n entityWithTickets,\n activeAccountWebClientConfig,\n showErrorDialog,\n genericError,\n onComplete,\n ]\n );\n\n const onUploadClick = useCallback(async () => {\n let hasErrors = checkExternalIdErrors(\n bulkUpload,\n externalIds,\n ticketCnt,\n setError,\n requiredMsg,\n missingMsg as string,\n extraMsg as string,\n duplicateMsg\n );\n\n if (hasErrors) {\n return;\n }\n\n hasErrors = Boolean(\n await checkDuplicateExternalIds(\n entityWithTickets!.id,\n externalIds,\n activeAccountWebClientConfig,\n alreadyReportedUsedExternalIds,\n setAlreadyReportedUsedExternalIds,\n (index: number) =>\n setError(`externalIds.${index}.externalId`, {\n type: 'warning',\n message: externalIdAlreadyUsedWarning,\n }),\n () => setReadOnly(true),\n () => setReadOnly(false),\n showErrorDialog,\n entityWithTickets!.viagVirtualId\n )\n );\n\n if (!hasErrors) {\n handleSubmit(onSubmit)();\n }\n }, [\n bulkUpload,\n externalIds,\n ticketCnt,\n setError,\n requiredMsg,\n missingMsg,\n extraMsg,\n duplicateMsg,\n entityWithTickets,\n activeAccountWebClientConfig,\n alreadyReportedUsedExternalIds,\n showErrorDialog,\n externalIdAlreadyUsedWarning,\n handleSubmit,\n onSubmit,\n ]);\n\n const reallyReadOnly = isReadOnly || readOnly;\n\n return renderContent(onUploadClick, reallyReadOnly);\n};\n","import { useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport {\n UploadExternalIdsBody,\n UploadExternalIdsForm,\n} from 'src/components/UploadArtifacts/UploadExternalIds';\nimport { Stack } from 'src/core/ui';\nimport { PurchaseWizardFooter } from 'src/modals/common';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport { PurchaseTicketsInput } from 'src/utils/purchaseUtils';\nimport { toEntityWithTicket } from 'src/utils/ticketUtils';\nimport {\n ActionOutboxEntityType,\n PosClientConfig,\n PosUiActionResult,\n TicketExternalId,\n} from 'src/WebApiController';\n\nimport {\n ticketGroupInputFooter,\n ticketGroupPredeliveryBody,\n} from '../PurchaseTicketFlow.css';\n\nexport const UploadExternalIdsSection = ({\n ticketGroupIndex,\n onCancel,\n}: {\n ticketGroupIndex: number;\n onCancel: () => void;\n}) => {\n const { setValue, watch } = useFormContext();\n\n const ticketGroup = watch(`ticketGroups.${ticketGroupIndex}`);\n\n const onSubmit = (\n _: PosClientConfig,\n entityId: number,\n externalIds: TicketExternalId[]\n ) => {\n const newTickets = ticketGroup.tickets?.value?.map((t) => {\n const tb = externalIds.find((b) => b.ticketId === t.id);\n t.externalTicketId = tb?.externalId ?? null;\n return { ...t };\n });\n\n setValue(\n `ticketGroups.${ticketGroupIndex}.tickets`,\n posChangedField(newTickets ?? null)\n );\n\n return Promise.resolve({\n status: 200,\n entityId,\n entityType: ActionOutboxEntityType.Purchase,\n } as PosUiActionResult);\n };\n\n const entityWithTickets = useMemo(\n () => toEntityWithTicket(ticketGroup),\n [ticketGroup]\n );\n\n return (\n void, disabled?: boolean) => (\n \n \n \n \n )}\n />\n );\n};\n","import { UseFormSetError } from 'react-hook-form';\nimport { IErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { URL_REGEX } from 'src/utils/constants/constants';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { isUniqueWithin } from 'src/utils/validation';\nimport { PosClientConfig, SaleClient, TicketUrl } from 'src/WebApiController';\n\nexport type TicketUrlForm = {\n isBulkUpload: boolean;\n ticketUrls: TicketUrl[];\n};\n\nexport const checkDuplicateTicketUrls = async (\n entityId: number,\n ticketUrls: TicketUrl[],\n activeAccountWebClientConfig: PosClientConfig,\n alreadyReportedUsedTicketUrls: string[],\n setAlreadyReportedUsedTicketUrls: (ticketUrls: string[]) => void,\n onDuplicateTicketUrl: (index: number) => void,\n onBeforeCheck?: () => void,\n onAfterCheck?: () => void,\n showErrorDialog?: IErrorBoundaryContext['showErrorDialog'],\n viagVirtualId?: string\n): Promise => {\n return tryInvokeApi(\n async () => {\n onBeforeCheck?.();\n\n if (!ticketUrls) {\n return false;\n }\n\n const existingTicketUrls = await new SaleClient(\n activeAccountWebClientConfig\n ).getTicketUrlsAlreadyInUse(viagVirtualId, ticketUrls);\n\n if (existingTicketUrls) {\n // Get all the used ticketUrls that have not yet been reported\n const unreportedBarCodes = existingTicketUrls.filter(\n (b) => !alreadyReportedUsedTicketUrls.includes(b.url)\n );\n if (unreportedBarCodes.length > 0) {\n // We're reporting the dup warnings, so save it so we don't report on it again\n // We want to set all of it (not just the latest unreported ticketUrls)\n setAlreadyReportedUsedTicketUrls(\n existingTicketUrls.map((tb) => tb.url)\n );\n\n let hasErrors = false;\n existingTicketUrls.forEach((tb) => {\n const index = ticketUrls.findIndex(\n (b) => b.ticketId === tb.ticketId\n );\n\n if (index >= 0) {\n hasErrors = true;\n onDuplicateTicketUrl(index);\n }\n });\n\n return hasErrors;\n }\n }\n\n return false;\n },\n (error) => {\n showErrorDialog?.('SaleClient.getTicketUrlsAlreadyInUse', error, {\n trackErrorData: {\n saleId: entityId,\n ticketUrls,\n },\n });\n },\n () => onAfterCheck?.()\n );\n};\n\nexport const checkTicketUrlErrors = (\n isBulkUpload: boolean,\n ticketUrls: TicketUrl[],\n ticketCnt: number,\n setError: UseFormSetError,\n requiredMsg: string,\n missingMsg: string,\n extraMsg: string,\n duplicateMsg: string,\n invalidUrlMsg: string\n) => {\n let hasErrors = false;\n const ticketUrlsProvided =\n ticketUrls?.map((b) => b.url).filter((b) => b?.length) ?? [];\n if (isBulkUpload) {\n const ticketUrlsProvided =\n ticketUrls?.map((b) => b.url).filter((b) => b?.length) ?? [];\n if (ticketUrlsProvided.length < ticketCnt) {\n hasErrors = true;\n setError(`ticketUrls`, { message: missingMsg as string }); // for the bulk-edit inputs\n } else if (ticketUrlsProvided.length > ticketCnt) {\n hasErrors = true;\n setError(`ticketUrls`, { message: extraMsg as string }); // for the bulk-edit inputs\n } else if (ticketUrlsProvided.some((b) => !b.match(URL_REGEX))) {\n hasErrors = true;\n setError(`ticketUrls`, { message: invalidUrlMsg }); // for the bulk-edit inputs\n }\n }\n\n ticketUrls?.forEach((b, i) => {\n if (!b.url) {\n hasErrors = true;\n setError(`ticketUrls.${i}.url`, { message: requiredMsg });\n } else if (!b.url.match(URL_REGEX)) {\n setError(`ticketUrls.${i}.url`, { message: invalidUrlMsg });\n } else if (!isUniqueWithin(b.url, ticketUrlsProvided, true)) {\n hasErrors = true;\n if (isBulkUpload) {\n setError(`ticketUrls`, { message: duplicateMsg }); // for the bulk-edit inputs\n }\n setError(`ticketUrls.${i}.url`, { message: duplicateMsg });\n }\n });\n return hasErrors;\n};\n","import { useFormContext } from 'react-hook-form';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Switch } from 'src/core/interim/Switch';\nimport { Stack } from 'src/core/ui';\nimport { mergeProps } from 'src/core/utils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Seating } from 'src/WebApiController';\n\nimport * as styles from '../../../modals/UploadTicketUrls/UploadTicketUrls.css';\nimport { BulkTicketUrlInput } from '../UploadStringArtifacts/BulkStringArtifactInput';\nimport { ManualTicketUrlEntry } from '../UploadStringArtifacts/ManualStringArtifactEntry';\nimport { TicketUrlForm } from './UploadTicketUrls.utils';\n\nexport type UploadTicketUrlsBodyProps = {\n isReadOnly?: boolean;\n ticketCnt: number;\n seating: Seating;\n instructionContentId?: ContentId;\n className?: string;\n};\nexport const UploadTicketUrlsBody = ({\n className,\n isReadOnly,\n seating,\n ticketCnt,\n instructionContentId,\n}: UploadTicketUrlsBodyProps) => {\n const { watch, setValue } = useFormContext();\n\n const bulkUpload = watch('isBulkUpload');\n\n const inputProps = {\n readOnly: isReadOnly,\n seating,\n quantity: ticketCnt,\n };\n\n return (\n \n {!isReadOnly && (\n \n )}\n \n \n setValue('isBulkUpload', !bulkUpload)}\n disabled={isReadOnly}\n />\n \n\n {!bulkUpload ? (\n \n ) : (\n setValue('isBulkUpload', !bulkUpload)}\n />\n )}\n \n );\n};\n","import { ComponentProps, ReactNode, useCallback, useState } from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useContent, useFormattedContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { isSuccess } from 'src/utils/errorUtils';\nimport { EntityWithRealTickets } from 'src/utils/ticketUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ApiException,\n PosClientConfig,\n PosUiActionResult,\n TicketUrl,\n} from 'src/WebApiController';\n\nimport {\n checkDuplicateTicketUrls,\n checkTicketUrlErrors,\n TicketUrlForm,\n} from './UploadTicketUrls.utils';\n\nexport type UploadTicketUrlsFormProps = {\n entityWithTickets: Pick<\n EntityWithRealTickets,\n 'viagVirtualId' | 'id' | 'ticketCnt' | 'tickets' | 'seating'\n >;\n renderContent: (onUploadClick: () => void, disabled?: boolean) => ReactNode;\n onComplete: (isCancelled: boolean) => void;\n onUpload?: (\n posClientConfig: PosClientConfig,\n entityId: number,\n ticketUrls: TicketUrl[]\n ) => Promise;\n defaultToBulk?: boolean;\n isReadOnly?: boolean;\n};\n\nexport const UploadTicketUrlsForm = (props: UploadTicketUrlsFormProps) => {\n const methods = useForm({\n mode: 'all',\n criteriaMode: 'all',\n defaultValues: {\n ticketUrls: props.entityWithTickets.tickets?.map(\n ({ id, ticketUrl, row, seat }) => {\n return {\n ticketId: id,\n url: ticketUrl || '',\n section: props.entityWithTickets.seating.section,\n row: row,\n seat: seat,\n };\n }\n ),\n },\n });\n\n return (\n \n \n \n );\n};\n\nconst UploadTicketUrlsContent = ({\n entityWithTickets,\n renderContent,\n onComplete,\n onUpload,\n handleSubmit,\n setError,\n watch,\n isReadOnly = false,\n}: UploadTicketUrlsFormProps &\n Omit<\n ComponentProps>,\n 'children'\n >) => {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const { ticketCnt } = entityWithTickets;\n const ticketUrls = watch('ticketUrls');\n const bulkUpload = watch('isBulkUpload');\n\n const [readOnly, setReadOnly] = useState(isReadOnly);\n const { showErrorDialog, genericError } = useErrorBoundaryContext();\n\n const [alreadyReportedUsedTicketUrls, setAlreadyReportedUsedTicketUrls] =\n useState([]);\n const ticketUrlAlreadyUsedWarning = useContent(\n ContentId.TicketUrlAlreadyInUsed\n );\n\n const requiredMsg = useContent(ContentId.Required);\n const duplicateMsg = useContent(ContentId.DuplicateUrl);\n const ticketUrlsProvided =\n ticketUrls?.map((b) => b.url).filter((b) => b?.length) ?? [];\n const missingMsg = useFormattedContent(\n FormatContentId.MissingTicketUrls,\n `${ticketCnt - ticketUrlsProvided.length}`\n );\n const invalidUrlMsg = useContent(ContentId.InvalidUrl);\n\n const extraMsg = useFormattedContent(\n FormatContentId.ExtraTicketUrls,\n `${ticketUrlsProvided.length - ticketCnt}`\n );\n\n const onSubmit = useCallback(\n async ({ ticketUrls }: TicketUrlForm) => {\n if (!onUpload) {\n console.log(\n 'Internal Error - no onUploadTicketUrls provided for non-readonly mode.'\n );\n return;\n }\n\n if (!entityWithTickets) {\n console.log('Internal Error - entity (listing or sale) is null.');\n return;\n }\n\n tryInvokeApi(\n async () => {\n setReadOnly(true);\n\n const result = await onUpload(\n activeAccountWebClientConfig,\n entityWithTickets.id,\n ticketUrls!\n );\n if (!isSuccess(result)) {\n showErrorDialog(\n 'uploadTicketUrls',\n {\n message: result.message ?? genericError,\n status: result.status!,\n } as ApiException,\n {\n onDismissError: () => onComplete(true),\n trackErrorData: {\n saleId: entityWithTickets?.id,\n ticketUrls,\n },\n }\n );\n } else {\n onComplete(false);\n }\n },\n (error) => {\n showErrorDialog('uploadTicketUrls', error, {\n trackErrorData: {\n saleId: entityWithTickets?.id,\n ticketUrls,\n },\n });\n },\n () => setReadOnly(false)\n );\n },\n [\n onUpload,\n entityWithTickets,\n activeAccountWebClientConfig,\n showErrorDialog,\n genericError,\n onComplete,\n ]\n );\n\n const onUploadClick = useCallback(async () => {\n let hasErrors = checkTicketUrlErrors(\n bulkUpload,\n ticketUrls,\n ticketCnt,\n setError,\n requiredMsg,\n missingMsg as string,\n extraMsg as string,\n duplicateMsg,\n invalidUrlMsg\n );\n\n if (hasErrors) {\n return;\n }\n\n hasErrors = Boolean(\n await checkDuplicateTicketUrls(\n entityWithTickets!.id,\n ticketUrls,\n activeAccountWebClientConfig,\n alreadyReportedUsedTicketUrls,\n setAlreadyReportedUsedTicketUrls,\n (index: number) =>\n setError(`ticketUrls.${index}.url`, {\n type: 'warning',\n message: ticketUrlAlreadyUsedWarning,\n }),\n () => setReadOnly(true),\n () => setReadOnly(false),\n showErrorDialog,\n entityWithTickets!.viagVirtualId\n )\n );\n\n if (!hasErrors) {\n handleSubmit(onSubmit)();\n }\n }, [\n bulkUpload,\n ticketUrls,\n ticketCnt,\n setError,\n requiredMsg,\n missingMsg,\n extraMsg,\n duplicateMsg,\n invalidUrlMsg,\n entityWithTickets,\n activeAccountWebClientConfig,\n alreadyReportedUsedTicketUrls,\n showErrorDialog,\n ticketUrlAlreadyUsedWarning,\n handleSubmit,\n onSubmit,\n ]);\n\n const reallyReadOnly = isReadOnly || readOnly;\n\n return renderContent(onUploadClick, reallyReadOnly);\n};\n","import { useFormContext } from 'react-hook-form';\nimport { UploadTicketUrlsForm } from 'src/components/UploadArtifacts/UploadTicketUrls';\nimport { UploadTicketUrlsBody } from 'src/components/UploadArtifacts/UploadTicketUrls/UploadTicketUrlsBody';\nimport { Stack } from 'src/core/ui';\nimport { PurchaseWizardFooter } from 'src/modals/common';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport { PurchaseTicketsInput } from 'src/utils/purchaseUtils';\nimport {\n ActionOutboxEntityType,\n PosClientConfig,\n PosUiActionResult,\n Ticket,\n TicketGroupInput,\n TicketUrl,\n} from 'src/WebApiController';\n\nimport {\n EntityWithRealTickets,\n toSeating,\n} from '../../../../utils/ticketUtils';\nimport {\n ticketGroupInputFooter,\n ticketGroupPredeliveryBody,\n} from '../PurchaseTicketFlow.css';\n\nexport const UploadTicketUrlsSection = ({\n ticketGroupIndex,\n onCancel,\n}: {\n ticketGroupIndex: number;\n onCancel: () => void;\n}) => {\n const { setValue, watch } = useFormContext();\n\n const ticketGroupInput = watch(`ticketGroups.${ticketGroupIndex}`);\n\n const onSubmit = (\n _: PosClientConfig,\n entityId: number,\n ticketUrls: TicketUrl[]\n ) => {\n const newTickets = posChangedField(\n ticketGroupInput.tickets!.value!.map((t) => {\n const tb = ticketUrls.find((b) => b.ticketId === t!.id);\n t!.ticketUrl = tb?.url ?? null;\n return { ...t } as Ticket;\n })\n );\n\n setValue(`ticketGroups.${ticketGroupIndex}.tickets`, newTickets);\n\n return Promise.resolve({\n status: 200,\n entityId,\n entityType: ActionOutboxEntityType.Purchase,\n } as PosUiActionResult);\n };\n\n const toEntityWithTicket = (\n ticketGroup: TicketGroupInput\n ): Pick<\n EntityWithRealTickets,\n 'tickets' | 'id' | 'viagVirtualId' | 'seating' | 'ticketCnt'\n > => {\n return {\n id: ticketGroup.ticketGroupId,\n viagVirtualId: ticketGroup.viagogoVirtualId,\n seating: toSeating(ticketGroup),\n ticketCnt: ticketGroup.numberOfTickets?.value ?? 0,\n tickets: ticketGroup.tickets?.value ?? [],\n };\n };\n\n const ticketGroup = toEntityWithTicket(ticketGroupInput);\n return (\n void, disabled?: boolean) => (\n \n \n \n \n )}\n />\n );\n};\n","import { UploadETicketsSectionSelector } from 'src/modals/PurchaseWizard/UploadETicketsSectionSelector';\nimport { ListingActionType, TicketType } from 'src/WebApiController';\n\nimport { UploadPredeliveryAction } from '../purchaseTicketsFlow.utils';\nimport { UploadBarcodesSection } from './UploadBarcodesSection';\nimport { UploadExternalIdsSection } from './UploadExternalIdsSection';\nimport { UploadTicketUrlsSection } from './UploadTicketUrlsSection';\n\nexport const PredeliverySection = ({\n ticketGroupIndex,\n action,\n onCancel,\n}: {\n ticketGroupIndex: number;\n onCancel: () => void;\n action: UploadPredeliveryAction;\n}) => {\n switch (action) {\n case ListingActionType.PredeliverBarcodes:\n return (\n \n );\n case ListingActionType.PredeliverETickets:\n return (\n \n );\n case ListingActionType.PredeliverExternalIds:\n return (\n \n );\n case ListingActionType.PredeliverQRCode:\n return (\n \n );\n case ListingActionType.PredeliverTicketUrls:\n return (\n \n );\n }\n};\n","import { useCallback, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport {\n EventSearch,\n OnEventsSelectCallback,\n} from 'src/components/Events/EventSearch';\nimport { FieldError } from 'src/modals/common/Purchase';\nimport { ModalBodyDataContainer } from 'src/modals/Modal/Modal.styled';\nimport { newBigIntId } from 'src/utils/idUtils';\nimport { posChangedField, posField } from 'src/utils/posFieldUtils';\nimport { PurchaseTicketsInput } from 'src/utils/purchaseUtils';\nimport { DeliveryType, TicketGroupInput } from 'src/WebApiController';\n\nexport function SearchPurchasedEvents({\n currencyCode,\n}: {\n currencyCode: string;\n}) {\n const { setValue, watch, formState, clearErrors } =\n useFormContext();\n const ticketGroups = watch('ticketGroups');\n\n const ticketGroupFromPartialPurchase = watch(\n 'ticketGroupFromPartialPurchaseOrder'\n );\n const searchTextPrefillForPartialPurchase = watch(\n 'eventSearchTextFromPartialPurchaseOrder'\n );\n const selectedEventIds = useMemo(\n () =>\n ticketGroups\n ?.filter((tg) => tg.event?.viagVirtualId)\n .map((tg) => tg.event!.viagVirtualId),\n [ticketGroups]\n );\n\n const onEventsSelect = useCallback(\n (data) => {\n clearErrors('ticketGroups');\n\n const selectedViagogoVirtualIds = new Set(\n ticketGroups\n .map((tg) => tg.event?.viagVirtualId)\n .filter((id): id is string => id != null)\n );\n\n const unselectedViagogoVirtualIds = new Set();\n let newTicketGroups = [...(ticketGroups || [])];\n const startId = newBigIntId();\n\n data.forEach(({ event, isSelected, performer, venue }, i) => {\n if (isSelected) {\n // skip events that are already selected\n if (!selectedViagogoVirtualIds.has(event.viagVirtualId)) {\n if (ticketGroupFromPartialPurchase == null) {\n newTicketGroups.push({\n ticketGroupId: startId - i,\n deliveryType: posChangedField(DeliveryType.InApp),\n currencyCode: posChangedField(currencyCode),\n viagogoVirtualId: event.viagVirtualId,\n eventMappingId: event.mappingId,\n viagogoEventId: event.viagId,\n posEventId: event.posIds[0],\n event: event,\n expectedValue: posChangedField(null),\n faceValueCost: posField(null),\n row: posChangedField(null),\n section: posChangedField(null),\n listingNotes: posChangedField(null),\n numberOfTickets: posChangedField(null),\n unitCost: posChangedField(null),\n totalCost: posChangedField(null),\n performer: performer,\n venue: venue,\n taxPaid: posChangedField(1), // This is to turn off taxExempt by default\n } as TicketGroupInput);\n } else {\n newTicketGroups.push({\n ...ticketGroupFromPartialPurchase,\n ticketGroupId: startId - i,\n deliveryType: posChangedField(DeliveryType.InApp),\n currencyCode: posChangedField(currencyCode),\n viagogoVirtualId: event.viagVirtualId,\n eventMappingId: event.mappingId,\n viagogoEventId: event.viagId,\n posEventId: event.posIds[0],\n event: event,\n performer: performer,\n venue: venue,\n taxPaid: posChangedField(1), // This is to turn off taxExempt by default\n } as TicketGroupInput);\n }\n }\n } else {\n unselectedViagogoVirtualIds.add(event.viagVirtualId);\n }\n });\n\n if (unselectedViagogoVirtualIds.size > 0) {\n // If we unselect an event, that just mean we don't want to add this new event\n // this time, so only remove new ticket groups with this event (eventId is null)\n newTicketGroups = newTicketGroups?.filter(\n (tg) =>\n tg.numberOfTickets?.value ||\n (tg.event?.viagVirtualId &&\n !unselectedViagogoVirtualIds.has(tg.event.viagVirtualId))\n );\n }\n\n setValue('ticketGroups', newTicketGroups);\n },\n [\n clearErrors,\n currencyCode,\n setValue,\n ticketGroups,\n ticketGroupFromPartialPurchase,\n ]\n );\n\n const onEventsSelectForEdit = useCallback(\n (data) => {\n clearErrors('ticketGroups');\n\n const newTicketGroups: TicketGroupInput[] = [];\n const startId = newBigIntId();\n\n data.forEach(({ event, performer, venue }, i) => {\n newTicketGroups.push({\n // doing this guarantee uniqueness for all these ticket-groups in this batch\n // because the loop runs so fast, newBigIntId (which returns the current time in ms) would be the same for all these\n ticketGroupId: startId - i,\n deliveryType: posChangedField(DeliveryType.InApp),\n currencyCode: posChangedField(currencyCode),\n viagogoVirtualId: event.viagVirtualId,\n eventMappingId: event.mappingId,\n viagogoEventId: event.viagId,\n posEventId: event.posIds[0],\n event: event,\n performer: performer,\n venue: venue,\n taxPaid: posChangedField(1), // This is to turn off taxExempt by default\n } as TicketGroupInput);\n });\n\n setValue('ticketGroups', newTicketGroups);\n },\n [clearErrors, currencyCode, setValue]\n );\n\n const onDeleteNumEventsSelected = useCallback(() => {\n setValue('ticketGroups', []);\n }, [setValue]);\n\n return (\n <>\n \n {formState.errors.ticketGroups && (\n {formState.errors.ticketGroups.message}\n )}\n \n \n \n );\n}\n","import { isEqual } from 'lodash-es';\nimport { ComponentProps, useCallback, useMemo, useState } from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { ConfirmDialog } from 'src/core/interim/dialogs/ConfirmDialog';\nimport { DndGlobalFileDrop } from 'src/core/POS/DnDFileUploader/components/DndGlobalFileDrop';\nimport { DndFilerUploaderContextProvider } from 'src/core/POS/DnDFileUploader/DndFileUploaderContext';\nimport { Stack } from 'src/core/ui';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useGetEventListingConstraints } from 'src/hooks/useGetEventListingConstraints';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { CancellableFormHeader } from 'src/modals/common/CancellableFormHeader';\nimport { EventEntityHeader } from 'src/modals/common/EventEntityHeader';\nimport { ModalBodyDataContainer } from 'src/modals/Modal/Modal.styled';\nimport { PurchaseTicketFlowTitle } from 'src/modals/PurchaseWizard/PurchaseTicketsFlow/components/PurchaseTicketFlowTitle';\nimport { predeliverETicketsDnd } from 'src/modals/PurchaseWizard/PurchaseTicketsFlow/PurchaseTicketFlow.css';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getInHandDateBasedOnEvent } from 'src/utils/eventWithDataUtils';\nimport { posChangedField, posField } from 'src/utils/posFieldUtils';\nimport {\n PurchaseTicketsInput,\n validateEventSelection,\n validateTicketGroups,\n} from 'src/utils/purchaseUtils';\nimport { selectEventInfoFromTicketGroups } from 'src/utils/ticketUtils';\nimport {\n Feature,\n ListingActionType,\n TicketGroupEditReason,\n TicketGroupInput,\n} from 'src/WebApiController';\n\nimport {\n PurchaseWizardFooter,\n PurchaseWizardFooterProps,\n} from '../../common/Purchase/PurchaseWizardFooter';\nimport { ModalBody } from '../../Modal';\nimport PurchaseTicketGroupPage from '../PurchaseTicketsFlowV2/PurchaseTicketGroupPage';\nimport { TicketGroupEditContext } from '../PurchaseWizard.types';\nimport { PredeliverySection } from './components/PredeliverySection';\nimport { UploadPredeliveryAction } from './purchaseTicketsFlow.utils';\nimport { SearchPurchasedEvents } from './SearchPurchasedEvents';\nimport { PurchaseOrderInfoForTicketGroupInput } from './TicketGroupInput.types';\n\nexport type PurchaseTicketsFlowProps = {\n currencyCode: string;\n purchaseOrderInfo?: PurchaseOrderInfoForTicketGroupInput | null;\n ticketGroups: TicketGroupInput[];\n ticketGroupFromPartialPurchaseOrder?: TicketGroupInput | null;\n eventSearchTextFromPartialPurchaseOrder?: string | null;\n updateSalesOfListings?: boolean | null;\n startIndex: number;\n avoidPrefill?: boolean;\n disabled?: boolean;\n onCancel: () => void;\n onSubmit: (formData: PurchaseTicketsInput) => void;\n emailPreview?: JSX.Element | null;\n uploadPredeliveryAction?: UploadPredeliveryAction | undefined;\n ticketGroupEditContext: TicketGroupEditContext;\n};\n\n/**\n * Checks if there are multiple unique event IDs in the ticket groups array.\n * @param ticketGroups - Array of ticket group objects.\n * @returns True if more than one unique eventId is found, otherwise false.\n */\nexport function hasMultipleEventIds(ticketGroups: TicketGroupInput[]): boolean {\n let firstEventId: number | string | undefined;\n\n for (const tg of ticketGroups) {\n const eventId = tg.event?.viagId;\n if (eventId) {\n if (firstEventId === undefined) {\n firstEventId = eventId;\n } else if (firstEventId !== eventId) {\n return true;\n }\n }\n }\n\n return false;\n}\n\nexport const PurchaseMultiTicketsFlow = ({\n ticketGroups,\n avoidPrefill,\n ticketGroupFromPartialPurchaseOrder,\n eventSearchTextFromPartialPurchaseOrder,\n updateSalesOfListings,\n ...rest\n}: PurchaseTicketsFlowProps) => {\n const methods = useForm({\n defaultValues: {\n ticketGroups: avoidPrefill\n ? selectEventInfoFromTicketGroups(ticketGroups)\n : ticketGroups.map((tg) => ({\n ...tg,\n tickets: posField(\n tg.tickets?.value?.toSorted((a, b) => a.ord - b.ord)\n ),\n })),\n updateSalesOfListings,\n updatePredeliveryETicketArtifacts: false,\n ticketGroupFromPartialPurchaseOrder,\n eventSearchTextFromPartialPurchaseOrder,\n },\n });\n\n return (\n \n \n \n );\n};\n\nconst EMPTY_EVENT_IDS: number[] = [];\n\nfunction PurchaseMultiTicketsFlowBody({\n disabled,\n currencyCode,\n purchaseOrderInfo,\n startIndex,\n onCancel,\n onSubmit,\n formState,\n handleSubmit,\n setError,\n getValues,\n setValue,\n clearErrors,\n watch,\n emailPreview,\n uploadPredeliveryAction,\n ticketGroupEditContext,\n}: Omit &\n Omit<\n ComponentProps>,\n 'children'\n >) {\n const formTicketGroups = getValues('ticketGroups');\n\n const daysBeforeEvent = watch('daysBeforeEvent');\n\n const requiredMsg = useContent(ContentId.Required);\n const duplicateSeatMsg = useContent(ContentId.DuplicateSeat);\n const eventRequiredMsg = useContent(ContentId.SearchAndSelectAnEvent);\n const inHandDateMustBeforeEventDateMsg = useContent(\n ContentId.InHandDateMustBeBeforeEventDate\n );\n const autoBroadcastRequireFaceValueMsg = useContent(\n ContentId.AutoBroadcastRequiredFaceValue\n );\n\n const hasUploadTicketFilesFlowV2 = useUserHasFeature(\n Feature.UploadTicketFilesFlowV2\n );\n\n const multiEventInputsDialog = useBasicDialog();\n const [singleInputModeForMultiEvent, setSingleInputModeForMultiEvent] =\n useState(true);\n\n const isMultiEvent = hasMultipleEventIds(formTicketGroups);\n\n const isSingleInputModeForMultiEvent =\n singleInputModeForMultiEvent && isMultiEvent;\n\n // Index of a Group of TicketGroupInput\n const [curGroupIndex, setCurGroupIndex] = useState(startIndex);\n\n const groupsOfTicketGroup = useMemo(() => {\n const noVenueCfgIdGroup = 'no_venue_cfg_id';\n\n if (isSingleInputModeForMultiEvent) {\n const ticketGroupsMap = new Map();\n formTicketGroups.forEach((ticketGroup) => {\n const venueCfgId = ticketGroup?.event?.venueCfgId || noVenueCfgIdGroup;\n const group = ticketGroupsMap.get(venueCfgId) || [];\n group.push(ticketGroup);\n ticketGroupsMap.set(venueCfgId, group);\n });\n\n const noCfgId = ticketGroupsMap.get(noVenueCfgIdGroup);\n ticketGroupsMap.delete(noVenueCfgIdGroup);\n\n const groupOfTicketGroups = Array.from(ticketGroupsMap.values());\n if (noCfgId && noCfgId.length > 0) {\n noCfgId.forEach((ticketGroup) => {\n groupOfTicketGroups.push([ticketGroup]);\n });\n }\n\n return groupOfTicketGroups;\n }\n\n if (isMultiEvent) {\n const noViagIdGroup = 'no_viag_id';\n const ticketGroupsMap = new Map();\n formTicketGroups.forEach((ticketGroup) => {\n const viagId = ticketGroup?.event?.viagId || noViagIdGroup;\n const group = ticketGroupsMap.get(viagId) || [];\n group.push(ticketGroup);\n ticketGroupsMap.set(viagId, group);\n });\n\n const noViagId = ticketGroupsMap.get(noViagIdGroup);\n ticketGroupsMap.delete(noViagIdGroup);\n\n const groupOfTicketGroups = Array.from(ticketGroupsMap.values());\n if (noViagId && noViagId.length > 0) {\n noViagId.forEach((ticketGroup) => {\n groupOfTicketGroups.push([ticketGroup]);\n });\n }\n return groupOfTicketGroups;\n }\n\n if (\n (ticketGroupEditContext.editIntention ===\n TicketGroupEditReason.AddTickets &&\n !ticketGroupEditContext.startWithEventSearch) ||\n ticketGroupEditContext.editIntention ===\n TicketGroupEditReason.AmendTickets\n ) {\n return [formTicketGroups];\n }\n\n return formTicketGroups.map((ticketGroup) => [ticketGroup]);\n }, [\n formTicketGroups,\n isMultiEvent,\n isSingleInputModeForMultiEvent,\n ticketGroupEditContext,\n ]);\n\n const [showPredeliverySection, setShowPredeliverySection] = useState<\n UploadPredeliveryAction | undefined\n >(uploadPredeliveryAction);\n\n const curTicketGroups = useMemo(() => {\n return curGroupIndex >= 0\n ? // Pick first ticketGroup because:\n // If inputMode is grouping: all the items in the group will have the same config\n // If input mode is one by one: Each ticketGroup is a group of one item.\n groupsOfTicketGroup[curGroupIndex]\n : groupsOfTicketGroup.flatMap((group) => group);\n }, [groupsOfTicketGroup, curGroupIndex]);\n\n const showSearch = curGroupIndex < 0 || !curTicketGroups;\n\n const ticketGroupsEventIds = useMemo(\n () =>\n formTicketGroups\n .filter((tg) => tg.event?.viagId != null)\n .map((tg) => tg.event?.viagId!),\n [formTicketGroups]\n );\n const { eventListingConstraintsQuery } = useGetEventListingConstraints(\n showSearch ? EMPTY_EVENT_IDS : ticketGroupsEventIds\n );\n\n const currentFormTicketGroupIndex = useMemo(() => {\n return formTicketGroups.findIndex(\n (tg) => tg.ticketGroupId === formTicketGroups[0]?.ticketGroupId\n );\n }, [formTicketGroups, curTicketGroups]);\n\n const onSubmitWrapper = useCallback(() => {\n const newTgs = getValues('ticketGroups');\n if (\n validateEventSelection(clearErrors, setError, newTgs, eventRequiredMsg) &&\n validateTicketGroups(\n true,\n clearErrors,\n setError,\n newTgs,\n requiredMsg,\n duplicateSeatMsg,\n inHandDateMustBeforeEventDateMsg,\n autoBroadcastRequireFaceValueMsg\n )\n ) {\n handleSubmit(onSubmit)();\n }\n }, [\n getValues,\n clearErrors,\n setError,\n eventRequiredMsg,\n requiredMsg,\n duplicateSeatMsg,\n inHandDateMustBeforeEventDateMsg,\n autoBroadcastRequireFaceValueMsg,\n handleSubmit,\n onSubmit,\n ]);\n\n const onPrevFromSearchEventsStep = useCallback(() => {\n onCancel();\n }, [onCancel]);\n\n const onNextFromSearchEventsStep = useCallback(() => {\n if (\n validateEventSelection(\n clearErrors,\n setError,\n formTicketGroups,\n eventRequiredMsg\n )\n ) {\n const hasGroupedEvents = groupsOfTicketGroup.some(\n (group) => group.length > 1\n );\n if (hasGroupedEvents) {\n // If we have more than one event selected, we need to ask whether the user\n // wants to input tickets for each of them separately for together\n multiEventInputsDialog.launchDialog();\n } else {\n setSingleInputModeForMultiEvent(false);\n setCurGroupIndex(0);\n }\n }\n }, [\n clearErrors,\n setError,\n formTicketGroups,\n eventRequiredMsg,\n groupsOfTicketGroup,\n multiEventInputsDialog,\n ]);\n\n const onPrevFromTicketGroupInputStep = useCallback(() => {\n if (showPredeliverySection) {\n setShowPredeliverySection(undefined);\n } else if (curGroupIndex === startIndex) {\n onCancel();\n } else {\n setCurGroupIndex(curGroupIndex - 1);\n\n // Generate groups again to ask for confirmation for single input\n setSingleInputModeForMultiEvent(true);\n }\n }, [curGroupIndex, onCancel, showPredeliverySection, startIndex]);\n\n const onNextFromTicketGroupInputStep = useCallback(\n (tgs: TicketGroupInput[]) => {\n const formTicketGroups = getValues('ticketGroups');\n const isLastGroup = curGroupIndex === groupsOfTicketGroup.length - 1;\n\n // Input mode: One input of ticket groups for each venue config\n if (isSingleInputModeForMultiEvent) {\n const updatedTicketGroups: TicketGroupInput[] = [];\n\n // Copy the content of the previous ticket-Group to all the ticketGroups and submit\n for (let i = 0; i < curTicketGroups.length; i++) {\n const currTg = curTicketGroups[i];\n if (!currTg.inHandDate?.value && currTg.event?.dates?.start) {\n currTg.inHandDate = posChangedField(\n getInHandDateBasedOnEvent(currTg.event, daysBeforeEvent)\n );\n }\n\n const newTgsForEvent = tgs.map((tg, newTgIndex) => {\n const newTg: TicketGroupInput = {\n ...tg,\n ticketGroupId: currTg.ticketGroupId - newTgIndex,\n viagogoEventId: currTg.event?.viagId || null,\n viagogoVirtualId: currTg.event?.viagVirtualId || '',\n eventMappingId: currTg.event?.mappingId || null,\n posEventId: currTg.event?.posIds?.[0] || null,\n event: currTg.event,\n performer: currTg.performer,\n venue: currTg.venue,\n inHandDate: currTg.inHandDate,\n };\n\n return newTg;\n });\n\n updatedTicketGroups.push(...newTgsForEvent);\n }\n\n const finalTgs = [\n ...new Map(\n [...formTicketGroups, ...updatedTicketGroups].map((tg) => [\n tg.ticketGroupId,\n tg,\n ])\n ).values(),\n ];\n\n setValue('ticketGroups', [...finalTgs]);\n\n // Input mode: One input for each event for multi event\n } else if (isMultiEvent) {\n const formTicketGroups = getValues('ticketGroups');\n const notUpdatedTgs = formTicketGroups.filter(\n (tg) => tg.viagogoVirtualId !== curTicketGroups[0].viagogoVirtualId\n );\n const updatedTicketGroups = [\n ...new Map(\n [...tgs, ...notUpdatedTgs].map((tg) => [tg.ticketGroupId, tg])\n ).values(),\n ];\n\n setValue('ticketGroups', updatedTicketGroups);\n // Input mode: Single event\n } else {\n const updatedTicketGroups = tgs;\n setValue('ticketGroups', updatedTicketGroups);\n }\n if (isLastGroup) {\n onSubmitWrapper();\n } else {\n // Just increment the group, since each ticketGroup\n // represents a ticketGroup[] of one element.\n setCurGroupIndex(curGroupIndex + 1);\n }\n },\n [\n autoBroadcastRequireFaceValueMsg,\n clearErrors,\n curGroupIndex,\n curTicketGroups,\n daysBeforeEvent,\n duplicateSeatMsg,\n getValues,\n groupsOfTicketGroup.length,\n inHandDateMustBeforeEventDateMsg,\n isSingleInputModeForMultiEvent,\n onSubmitWrapper,\n requiredMsg,\n setError,\n setValue,\n ]\n );\n\n const getFooterActions = useCallback((): PurchaseWizardFooterProps => {\n return {\n hasChanges:\n !showPredeliverySection &&\n !isEqual(formState.defaultValues?.ticketGroups, formTicketGroups),\n onPreviousLabel: ContentId.Cancel,\n onPrevious: onPrevFromSearchEventsStep,\n onNextLabel: ContentId.Next,\n onNext: onNextFromSearchEventsStep,\n };\n }, [\n formState.defaultValues?.ticketGroups,\n onNextFromSearchEventsStep,\n onPrevFromSearchEventsStep,\n showPredeliverySection,\n formTicketGroups,\n ]);\n\n const finalTicketGroups = useMemo(\n () =>\n isSingleInputModeForMultiEvent ? [curTicketGroups[0]] : curTicketGroups,\n [curTicketGroups, isSingleInputModeForMultiEvent]\n );\n\n const footerActions = getFooterActions();\n const isPredeliverETicketsAction =\n showPredeliverySection === ListingActionType.PredeliverETickets;\n\n return (\n <>\n setShowPredeliverySection(undefined)\n : onCancel\n }\n >\n \n }\n />\n \n \n \n \n {emailPreview}\n\n \n {showSearch ? (\n \n ) : showPredeliverySection ? (\n \n setShowPredeliverySection(undefined)}\n />\n \n ) : (\n \n )}\n \n \n {!showPredeliverySection && showSearch && (\n \n )}\n \n \n \n }\n bodyText={\n \n \n \n \n \n \n \n \n \n \n \n }\n onCancel={() => {\n setCurGroupIndex(0);\n setSingleInputModeForMultiEvent(false);\n multiEventInputsDialog.closeDialog();\n }}\n onOkay={() => {\n setCurGroupIndex(0);\n setSingleInputModeForMultiEvent(true);\n multiEventInputsDialog.closeDialog();\n }}\n />\n \n );\n}\n","import { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { getPerformerAndVenueForEvent } from 'src/utils/eventWithDataUtils';\nimport { Event, Performer, Venue } from 'src/WebApiController';\n\nexport const useGetEventFullInfo = (\n event?: Event | null,\n performer?: Performer | null,\n venue?: Venue | null\n) => {\n const { event: activeEvent } = useActivePosEntityContext();\n const { data } = useCatalogDataContext();\n\n const { performer: cachedPerfomer, venue: cachedVenue } =\n getPerformerAndVenueForEvent(event ?? activeEvent, data);\n\n return {\n event: event ?? activeEvent,\n performer: performer ?? cachedPerfomer,\n venue: venue ?? cachedVenue,\n };\n};\n","import { ReactNode } from 'react';\nimport * as styles from 'src/modals/common/Summary/Summary.css';\n\ninterface SummaryWrapperProps {\n children: ReactNode;\n}\nexport const SummaryWrapper = ({ children }: SummaryWrapperProps) => {\n return
    {children}
    ;\n};\n","import { Content } from 'src/contexts/ContentContext';\nimport { LaunchActivityLog } from 'src/modals/ActivityLog';\nimport { InventoryDeeplinkQueryParam } from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getListingDetailsModalConfigWithDeepLink } from 'src/utils/inventoryUtils';\n\nimport { ShareButton } from '../ShareButton/ShareButton';\nimport {\n entityInfoShareButtonIdNumberWrapper,\n entityText,\n} from './EventEntityHeader.css';\nimport { EntityIdNumberDiv, EntityInfoDiv } from './EventEntityHeader.styled';\n\nexport const ListingInfoDisplay = ({\n entityId,\n ticketCnt,\n}: {\n entityId: number;\n ticketCnt: number;\n}) => {\n return (\n \n
    \n \n #{entityId}\n
    \n
    \n {ticketCnt} \n
    \n \n
    \n );\n};\n","import { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { Feature } from 'src/WebApiController';\n\nexport const useHasSaleDetailsMarketplaceTermsFeature = () => {\n return useUserHasFeature(Feature.SaleDetailsMarketplaceTerms);\n};\n","import { useAppContext } from 'src/contexts/AppContext';\nimport { hasPermissionForSale } from 'src/utils/userPermissionUtils';\nimport { Permission, Sale } from 'src/WebApiController';\n\nexport const useUserHasSalePermission = (\n sale: Sale | null | undefined,\n root: Permission,\n isFulfillerOf?: Permission,\n isPricerOf?: Permission,\n isPurchasedBy?: Permission\n) => {\n const { loginContext } = useAppContext();\n\n const canUpdate = hasPermissionForSale(\n loginContext?.user,\n sale,\n root,\n isFulfillerOf,\n isPricerOf,\n isPurchasedBy\n );\n\n return canUpdate;\n};\n\nexport const useUserCanUpdateSale = (sale: Sale | null | undefined) => {\n return useUserHasSalePermission(\n sale,\n Permission.Sales_UpdateSalesInfo,\n Permission.Sales_UpdateSalesInfoOnIsFulfillerOf,\n Permission.Sales_UpdateSalesInfoOnIsPricerOf,\n Permission.Sales_UpdateSaleOnPurchasedBy\n );\n};\n\nexport const useUserCanUpdateSaleTags = (sale: Sale | null | undefined) => {\n const canSetPrice = useUserHasSalePermission(\n sale,\n Permission.Sales_UpdateTags,\n Permission.Sales_UpdateTagsOnIsFulfillerOf,\n Permission.Sales_UpdateTagsOnIsPricerOf,\n Permission.Sales_UpdateTagsOnPurchasedBy\n );\n return canSetPrice;\n};\n\nexport const useUserCanFulfillSale = (sale: Sale | null | undefined) => {\n return useUserHasSalePermission(\n sale,\n Permission.Sales_Fulfill,\n Permission.Sales_FulfillOnIsFulfillerOf,\n Permission.Sales_FulfillOnPricerOf,\n Permission.Sales_FulfillOnPurchasedBy\n );\n};\n\nexport const useUserCanViewFulfillmentArtifacts = (\n sale: Sale | null | undefined\n) => {\n // It is assumed if you can fulfill - then you can view fulfillment artifacts\n const canFulfill = useUserCanFulfillSale(sale);\n\n const canView = useUserHasSalePermission(\n sale,\n Permission.Sales_ViewFulfillmentArtifacts,\n Permission.Sales_ViewFulfillmentArtifactsOnIsFulfillerOf,\n Permission.Sales_ViewFulfillmentArtifactsOnIsPricerOf,\n Permission.Sales_ViewFulfillmentArtifactsOnPurchasedBy\n );\n\n return canView || canFulfill;\n};\n","import { format } from 'date-fns';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SaleCommentNote } from 'src/WebApiController';\n\nimport * as styles from './CommentSection.css';\n\nexport const CommentSection = ({\n commentNotes,\n}: {\n commentNotes?: SaleCommentNote[] | null;\n}) => {\n return (\n \n \n \n \n \n \n \n \n \n \n {commentNotes\n ?.toSorted((a, b) => {\n return a.date && b.date\n ? new Date(b.date).getTime() - new Date(a.date).getTime()\n : 0;\n })\n .map((cmt, i) => (\n \n \n \n \n \n ))}\n \n
    \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n {cmt.date\n ? format(new Date(cmt.date), 'MMMM dd, yyyy hh:mmaa')\n : ''}\n \n \n {cmt.email}\n \n {cmt.text}\n
    \n
    \n );\n};\n","import clsx from 'clsx';\nimport { ReactNode } from 'react';\nimport * as styles from './PosPill.css';\n\nexport enum PosPillVariant {\n Brand = 'Brand',\n LightGreen = 'LightGreen',\n Success = 'Success',\n Warning = 'Warning',\n Error = 'Error',\n Info = 'Info',\n Neutral = 'Neutral',\n}\n\nconst getVariantClassName = (variant?: PosPillVariant): string => {\n switch (variant) {\n case PosPillVariant.Success:\n return styles.successVariant;\n case PosPillVariant.Warning:\n return styles.warningVariant;\n case PosPillVariant.Info:\n return styles.infoVariant;\n case PosPillVariant.Neutral:\n return styles.neutralVariant;\n case PosPillVariant.Error:\n return styles.errorVariant;\n case PosPillVariant.LightGreen:\n return styles.lightGreenVariant;\n case PosPillVariant.Brand:\n default:\n return styles.brandVariant;\n }\n};\n\ninterface PosPillProps {\n className?: string;\n children?: ReactNode;\n variant?: PosPillVariant;\n}\n\nexport const PosPill = ({ children, variant }: PosPillProps) => {\n return (\n
    \n {children}\n
    \n );\n};\n","import { Content } from 'src/contexts/ContentContext';\nimport { PosPill } from 'src/core/POS/PosPill';\nimport { PosPillVariant } from 'src/core/POS/PosPill/PosPill';\nimport { MARKETPLACE_SALE_PAYMENT_STATE_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport {\n MarketplacePaymentState,\n PointOfSalePaymentState,\n} from 'src/WebApiController';\n\nconst getStateVariant = (\n state: MarketplacePaymentState | PointOfSalePaymentState\n): PosPillVariant => {\n switch (state) {\n case MarketplacePaymentState.Paid:\n return PosPillVariant.Success;\n case MarketplacePaymentState.Queued:\n return PosPillVariant.Warning;\n case MarketplacePaymentState.PartiallyPaid:\n return PosPillVariant.Info;\n case MarketplacePaymentState.Unpaid:\n case MarketplacePaymentState.Ineligible:\n default:\n return PosPillVariant.Neutral;\n }\n};\n\ninterface MarketplacePaymentStatePillProps {\n state: MarketplacePaymentState | PointOfSalePaymentState;\n}\n\nexport const MarketplacePaymentStatePill = ({\n state,\n}: MarketplacePaymentStatePillProps) => {\n return (\n \n \n \n );\n};\n","import {\n MarketplacePaymentLineType,\n MarketplacePaymentState,\n SiteMarketplacePaymentLineInput,\n} from 'src/WebApiController';\n\nexport const EMPTY_MARKETPLACE_PAYMENT_LINE: SiteMarketplacePaymentLineInput = {\n marketplacePaymentLineId: null,\n marketplacePaymentId: null,\n externalPaymentId: '',\n externalPaymentLineId: '',\n externalSaleId: '',\n saleId: null,\n currency: '',\n amount: 0,\n isCredit: false,\n paymentLineType: MarketplacePaymentLineType.Proceeds,\n paymentDate: null,\n receivedDate: null,\n paymentState: MarketplacePaymentState.Paid,\n};\n","import {\n ComponentProps,\n FocusEvent,\n useCallback,\n useEffect,\n useMemo,\n} from 'react';\nimport { Controller, useForm } from 'react-hook-form';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { DatePickerInput } from 'src/core/POS/DateSelector';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosSelect } from 'src/core/POS/PosSelect';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { Button, Radio, RadioGroup, Stack } from 'src/core/ui';\nimport { FieldWrapper } from 'src/modals/common';\nimport { setValueAsNumber } from 'src/navigations/Routes/Settings/Views/SyncCenter/SyncCenter.utils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { MARKETPLACE_PAYMENT_LINE_TYPE_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport {\n MarketplacePaymentLineType,\n SaleDetails,\n SiteMarketplacePaymentLineInput,\n} from 'src/WebApiController';\n\nimport { EMPTY_MARKETPLACE_PAYMENT_LINE } from './MarketplacePaymentLineDialog.utils';\n\nexport type AddMarketplaceChargeDialogProps = Omit<\n ComponentProps,\n 'header' | 'footer'\n> & {\n onSave: (\n siteMarketplacePaymentLineInput: SiteMarketplacePaymentLineInput\n ) => void;\n onCancel: () => void;\n siteMarketplacePaymentLineInput?: SiteMarketplacePaymentLineInput;\n canSelectProceeds: boolean;\n sale: SaleDetails;\n disabledPaymentTypeInput?: boolean;\n disabledAmountInput?: boolean;\n};\n\nexport const MarketplacePaymentLineDialog = ({\n onCancel,\n onSave,\n sale,\n siteMarketplacePaymentLineInput,\n canSelectProceeds,\n disabledPaymentTypeInput,\n disabledAmountInput,\n ...dialogProps\n}: AddMarketplaceChargeDialogProps) => {\n const isEditingPaymentLine =\n !!siteMarketplacePaymentLineInput?.marketplacePaymentId;\n const requiredText = useContent(ContentId.Required);\n const { getUiCurrency } = useLocalizationContext();\n const { register, formState, watch, setValue, handleSubmit, control } =\n useForm({\n defaultValues: siteMarketplacePaymentLineInput\n ? siteMarketplacePaymentLineInput\n : {\n ...EMPTY_MARKETPLACE_PAYMENT_LINE,\n externalPaymentLineId: `paymentline-${new Date().getTime()}`,\n externalSaleId: sale.idOnMkp ?? undefined,\n saleId: sale.id,\n currency: sale.currency,\n },\n });\n\n const paymentDateStr = watch('paymentDate');\n const isCredit = watch('isCredit');\n const paymentLineType = watch('paymentLineType');\n const currency = watch('currency');\n const isPrimaryPaymentLineType =\n paymentLineType === MarketplacePaymentLineType.Proceeds ||\n paymentLineType === MarketplacePaymentLineType.Charge ||\n paymentLineType === MarketplacePaymentLineType.Credit;\n\n const uiCurrency = getUiCurrency(currency);\n\n useEffect(() => {\n if (\n paymentLineType === MarketplacePaymentLineType.Proceeds ||\n paymentLineType === MarketplacePaymentLineType.Credit\n ) {\n setValue('isCredit', true);\n }\n if (paymentLineType === MarketplacePaymentLineType.Charge) {\n setValue('isCredit', false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [paymentLineType]);\n\n const paymentDate = useMemo(\n () => (paymentDateStr ? new Date(paymentDateStr) : undefined),\n [paymentDateStr]\n );\n\n const onSubmit = useCallback(\n (formValues: SiteMarketplacePaymentLineInput) => {\n onSave(formValues);\n },\n [onSave]\n );\n\n const valueOptionsContent = useMemo(() => {\n return Object.entries(MARKETPLACE_PAYMENT_LINE_TYPE_TO_CID).reduce(\n (acc, [key, value]) => {\n if (canSelectProceeds || key !== MarketplacePaymentLineType.Proceeds) {\n acc[key] = value;\n }\n return acc;\n },\n {} as Record\n );\n }, [canSelectProceeds]);\n\n return (\n }\n footer={\n <>\n \n \n \n }\n onCancel={onCancel}\n >\n
    \n
    \n \n }\n >\n (\n {\n setValue(\n 'paymentLineType',\n paymentLineType as MarketplacePaymentLineType,\n { shouldValidate: true }\n );\n }}\n sortBy=\"key\"\n disabled={disabledPaymentTypeInput}\n />\n )}\n />\n \n \n\n {!isPrimaryPaymentLineType && (\n \n }\n >\n (\n {\n setValue('isCredit', value === 'true', {\n shouldValidate: true,\n });\n }}\n value={String(value)}\n >\n \n }\n />\n }\n />\n \n \n )}\n />\n \n \n )}\n \n }\n >\n {\n return amount == null ? requiredText : undefined;\n },\n },\n\n setValueAs: setValueAsNumber,\n })}\n prefixDisplay={uiCurrency.sym}\n disabled={disabledAmountInput}\n />\n \n \n\n \n }\n >\n {\n return !externalPaymentId?.length\n ? requiredText\n : undefined;\n },\n },\n })}\n onBlur={(params: FocusEvent) => {\n params.target.value = params.target.value\n .trim()\n .toLocaleLowerCase();\n }}\n disabled={isEditingPaymentLine}\n />\n \n \n\n \n }\n >\n {\n return !externalPaymentLineId?.length\n ? requiredText\n : undefined;\n },\n },\n })}\n trimOnBlur={true}\n disabled={isEditingPaymentLine}\n />\n \n \n\n \n \n }\n >\n (\n {\n setValue('paymentDate', date.toISOString(), {\n shouldValidate: true,\n });\n }}\n textFieldStyles={{ width: '100px' }}\n disabled={isEditingPaymentLine}\n />\n )}\n />\n \n \n \n
    \n
    \n \n );\n};\n","import {\n MutableRefObject,\n useCallback,\n useImperativeHandle,\n useState,\n} from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport {\n MarketplacePaymentLineType,\n SaleDetails,\n SaleInput,\n SiteMarketplacePaymentLineInput,\n} from 'src/WebApiController';\n\nimport { MarketplacePaymentLineDialog } from './MarketplacePaymentLineDialog';\n\nexport interface SetMarketplaceChargeActions {\n addNewMarketplacePaymentLine: () => void;\n editNewMarketplacePaymentLine: (\n marketplacePaymentLine: SiteMarketplacePaymentLineInput\n ) => void;\n removeNewMarketplacePaymentLine: (externalPaymentId: string) => void;\n}\n\ninterface SetMarketplaceChargeProps {\n setMarketplaceActionsRef: MutableRefObject;\n sale: SaleDetails;\n}\n\nexport const SetMarketplaceCharge = ({\n setMarketplaceActionsRef,\n sale,\n}: SetMarketplaceChargeProps) => {\n const setMarketplaceChargeDialog = useBasicDialog();\n const [currentMarketplacePaymentLine, setCurrentMarketplacePaymentLine] =\n useState();\n const [canSelectProceeds, setCanSelectProceeds] = useState(false);\n\n const { setValue, watch } = useFormContext();\n\n const marketplacePaymentLines = watch('marketplacePaymentLines')?.value;\n const onSave = useCallback(\n (formMarketplacePaymentLineInput: SiteMarketplacePaymentLineInput) => {\n let updatedMktPaymentLines: SiteMarketplacePaymentLineInput[] = [];\n const isUpdating = !!currentMarketplacePaymentLine;\n if (isUpdating) {\n // Update mktPaymentLine in place\n updatedMktPaymentLines = (marketplacePaymentLines ?? []).map(\n (mktPaymentLine) =>\n mktPaymentLine.externalPaymentLineId ===\n formMarketplacePaymentLineInput.externalPaymentLineId\n ? formMarketplacePaymentLineInput\n : mktPaymentLine\n );\n } else {\n // If is new mktPaymentLine\n updatedMktPaymentLines = [\n ...(marketplacePaymentLines ?? []),\n formMarketplacePaymentLineInput,\n ];\n }\n\n setValue(\n 'marketplacePaymentLines',\n posChangedField(updatedMktPaymentLines),\n {\n shouldDirty: true,\n }\n );\n setMarketplaceChargeDialog.closeDialog();\n },\n [\n currentMarketplacePaymentLine,\n marketplacePaymentLines,\n setMarketplaceChargeDialog,\n setValue,\n ]\n );\n\n const onCancel = useCallback(() => {\n setMarketplaceChargeDialog.closeDialog();\n }, [setMarketplaceChargeDialog]);\n\n const removeNewMarketplacePaymentLine = useCallback(\n (externalPaymentId: string) => {\n const filteredMarketplacePaymentLines = marketplacePaymentLines?.filter(\n (mktPaymentLine) =>\n mktPaymentLine.externalPaymentLineId !== externalPaymentId\n );\n setValue(\n 'marketplacePaymentLines',\n posChangedField(filteredMarketplacePaymentLines ?? []),\n {\n shouldDirty: true,\n }\n );\n },\n [marketplacePaymentLines, setValue]\n );\n\n useImperativeHandle(\n setMarketplaceActionsRef,\n () => {\n return {\n addNewMarketplacePaymentLine: () => {\n setCanSelectProceeds(\n !marketplacePaymentLines?.some(\n (mktPaymentLine) =>\n mktPaymentLine.paymentLineType ===\n MarketplacePaymentLineType.Proceeds\n )\n );\n setCurrentMarketplacePaymentLine(undefined);\n setMarketplaceChargeDialog.launchDialog();\n },\n editNewMarketplacePaymentLine: (\n marketplacePaymentLine: SiteMarketplacePaymentLineInput\n ) => {\n setCanSelectProceeds(\n !marketplacePaymentLines?.some(\n (mktPaymentLine) =>\n mktPaymentLine.paymentLineType ===\n MarketplacePaymentLineType.Proceeds &&\n mktPaymentLine.marketplacePaymentLineId !==\n marketplacePaymentLine.marketplacePaymentLineId\n )\n );\n setCurrentMarketplacePaymentLine(marketplacePaymentLine);\n setMarketplaceChargeDialog.launchDialog();\n },\n removeNewMarketplacePaymentLine,\n };\n },\n [\n marketplacePaymentLines,\n removeNewMarketplacePaymentLine,\n setMarketplaceChargeDialog,\n ]\n );\n\n if (!setMarketplaceChargeDialog.dialogProps.isOpen) {\n return null;\n }\n\n return (\n \n );\n};\n","import { useMemo } from 'react';\nimport { useSearchParams } from 'react-router-dom';\nimport { MarketplacePaymentIdDeeplinkQueryParam } from 'src/utils/constants/constants';\n\nexport const useGetMarketplacePaymentIdQueryParam = (): number | undefined => {\n const [searchParams] = useSearchParams();\n\n return useMemo(() => {\n const activeMarketplacePaymentId = searchParams.get(\n MarketplacePaymentIdDeeplinkQueryParam\n );\n\n if (activeMarketplacePaymentId) {\n return Number(activeMarketplacePaymentId);\n }\n }, [searchParams]);\n};\n","import { ReactNode } from 'react';\n\nimport * as styles from './EmptySectionContent.css';\n\ntype RootProps = {\n icon?: ReactNode;\n children?: ReactNode;\n};\n\nexport function Root({ icon, children }: RootProps) {\n return (\n
    \n {icon &&
    {icon}
    }\n {children}\n
    \n );\n}\n\ntype ErrorProps = {\n children?: ReactNode;\n};\n\nexport function Error({ children }: ErrorProps) {\n return
    {children}
    ;\n}\n\nexport function Label({ children }: ErrorProps) {\n return
    {children}
    ;\n}\n\nexport function DetailMessage({ children }: ErrorProps) {\n return
    {children}
    ;\n}\n\nexport function SolidIconContainer({ children }: ErrorProps) {\n return
    {children}
    ;\n}\n","import { useQuery } from '@tanstack/react-query';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { MarketplacePaymentClient } from 'src/WebApiController';\n\nexport function useGetMarketplacePaymentById(\n marketplacePaymentId?: number | null\n) {\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n\n return useQuery({\n queryKey: ['getMarketplacePaymentById', marketplacePaymentId],\n async queryFn() {\n if (\n marketplacePaymentId == null ||\n !activeAccountWebClientConfig?.activeAccountId\n )\n return null;\n\n try {\n return await new MarketplacePaymentClient(\n activeAccountWebClientConfig\n ).getMarketplacePaymentById(marketplacePaymentId);\n } catch (err: unknown) {\n trackError(\n 'MarketplacePaymentClient.getMarketplacePaymentById',\n err as ErrorTypes,\n {\n marketplacePaymentId,\n }\n );\n throw err;\n }\n },\n enabled:\n !!activeAccountWebClientConfig?.activeAccountId && !!marketplacePaymentId,\n refetchOnWindowFocus: false,\n });\n}\n","export const PAYMENT_MONTHLY_CONTAINER_QUERY_KEY =\n 'MarketplacePaymentClient.getMonthsContainerMarketplacePayments';\nexport const PAYMENT_SINGLE_MONTH_QUERY_KEY =\n 'MarketplacePaymentClient.getMarketplacePayments';\n","import { useQuery } from '@tanstack/react-query';\nimport { differenceInCalendarDays } from 'date-fns';\nimport { useMemo } from 'react';\nimport { DATA_REFRESH_RATE_IN_MILLIS_LONG } from 'src/utils/constants/constants';\nimport { getErrorInfoFromStatusCode } from 'src/utils/errorUtils';\nimport {\n MarketplacePaymentClient,\n MarketplacePaymentQuery,\n MonthContainingMarketplacePaymentsResult,\n} from 'src/WebApiController';\n\nimport { useAppContext } from '../AppContext';\nimport { ErrorTypes, useErrorBoundaryContext } from '../ErrorBoundaryContext';\nimport { useFilterQueryContext } from '../FilterQueryContext';\nimport { PAYMENT_MONTHLY_CONTAINER_QUERY_KEY } from './MarketplacePaymentDataContext.constants';\n\nfunction getDateValue(item: MonthContainingMarketplacePaymentsResult): string {\n return item.firstOfMonth;\n}\n\nexport const useGetMonthMarketplacePaymentsQuery = (\n selectedIds: string[],\n setSelectedIds: (value: React.SetStateAction) => void,\n setErrorInfo: (\n value: React.SetStateAction<\n | {\n errorHeader: React.ReactNode;\n errorMessage: React.ReactNode;\n }\n | undefined\n >\n ) => void,\n disabled?: boolean\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { filterQuery, isQueryInitialized } =\n useFilterQueryContext();\n const { trackError } = useErrorBoundaryContext();\n\n const queryKey = useMemo(\n () => [\n PAYMENT_MONTHLY_CONTAINER_QUERY_KEY,\n activeAccountWebClientConfig?.activeAccountId,\n filterQuery,\n ],\n [activeAccountWebClientConfig?.activeAccountId, filterQuery]\n );\n\n const shouldQuery = Boolean(\n filterQuery &&\n activeAccountWebClientConfig?.activeAccountId &&\n isQueryInitialized &&\n !disabled\n );\n\n const paymentsQuery = useQuery({\n queryKey,\n queryFn: async () => {\n setErrorInfo(undefined);\n\n if (!shouldQuery) {\n return null;\n }\n\n const data = await new MarketplacePaymentClient(\n activeAccountWebClientConfig\n ).getMonthsContainerMarketplacePayments(filterQuery);\n\n const sortedData = data.toSorted((a, b) => {\n const dateA = new Date(getDateValue(a));\n const dateB = new Date(getDateValue(b));\n return filterQuery.isSortDescending\n ? differenceInCalendarDays(dateB, dateA)\n : differenceInCalendarDays(dateA, dateB);\n });\n\n let newSelectedIds = selectedIds;\n // Always expanding the first item if none selected and we just got data\n if (!selectedIds.length && sortedData.length) {\n const firstItem = sortedData[0];\n const dateValue = getDateValue(firstItem);\n newSelectedIds = [dateValue];\n setSelectedIds(newSelectedIds);\n }\n\n return sortedData;\n },\n\n enabled: shouldQuery,\n staleTime: Infinity, // Since we're always refetching on an interval, we don't want query to calculate whether the data is stale\n refetchOnWindowFocus: false,\n networkMode: 'offlineFirst',\n meta: {\n onError: (error: ErrorTypes) => {\n const { headerDisplay, messageDisplay } = getErrorInfoFromStatusCode(\n error?.status,\n error?.message\n );\n setErrorInfo({\n errorHeader: headerDisplay,\n errorMessage: messageDisplay,\n });\n trackError(PAYMENT_MONTHLY_CONTAINER_QUERY_KEY, error, filterQuery);\n },\n },\n refetchInterval: DATA_REFRESH_RATE_IN_MILLIS_LONG,\n });\n\n return paymentsQuery;\n};\n","import {\n QueryObserverResult,\n useQueryClient,\n UseQueryResult,\n} from '@tanstack/react-query';\nimport { createContext, useCallback, useContext, useState } from 'react';\nimport { getErrorInfoFromStatusCode } from 'src/utils/errorUtils';\nimport { MonthContainingMarketplacePaymentsResult } from 'src/WebApiController';\n\nimport { useAppContext } from '../AppContext';\nimport { ErrorTypes } from '../ErrorBoundaryContext';\nimport {\n PAYMENT_MONTHLY_CONTAINER_QUERY_KEY,\n PAYMENT_SINGLE_MONTH_QUERY_KEY,\n} from './MarketplacePaymentDataContext.constants';\nimport { useGetMonthMarketplacePaymentsQuery } from './useGetMonthMarketplacePaymentsQuery';\n\nexport type IMarketplacePaymentDataContext = {\n monthPaymentsQuery: UseQueryResult<\n MonthContainingMarketplacePaymentsResult[] | null,\n ErrorTypes\n >;\n refreshData: (\n refetchAll?: boolean\n ) => Promise>;\n errorInfo?: { errorHeader: React.ReactNode; errorMessage: React.ReactNode };\n onSelect: (targetId: string, forceSelect?: boolean) => void;\n selectedIds: string[];\n scrollToId?: string;\n setScrollToId: (id?: string) => void;\n};\n\nexport const MarketplacePaymentDataContext =\n createContext({\n monthPaymentsQuery: {} as UseQueryResult<\n MonthContainingMarketplacePaymentsResult[] | null\n >,\n refreshData: () =>\n Promise.resolve({} as QueryObserverResult),\n selectedIds: [],\n onSelect: () => {},\n setScrollToId: () => {},\n });\n\nexport const useMarketplacePaymentDataContext = () =>\n useContext(MarketplacePaymentDataContext);\n\nexport const MarketplacePaymentDataContextProvider = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\n const queryClient = useQueryClient();\n\n const { activeAccountWebClientConfig } = useAppContext();\n const [errorInfo, setErrorInfo] = useState<{\n errorHeader: React.ReactNode;\n errorMessage: React.ReactNode;\n }>();\n const [selectedIds, setSelectedIds] = useState([]);\n\n const [scrollToId, setScrollToId] = useState();\n\n const onSelect = useCallback(\n (targetId: string, forceSelect?: boolean) => {\n const indexOf = selectedIds.indexOf(targetId);\n\n if (indexOf >= 0) {\n // if force-select, we won't de-select if it's already selected\n if (forceSelect) {\n setScrollToId(targetId);\n } else {\n setSelectedIds(selectedIds.filter((id) => id !== targetId));\n }\n } else {\n setSelectedIds([...selectedIds, targetId]);\n setScrollToId(targetId);\n }\n },\n [selectedIds]\n );\n\n const monthPaymentsQuery = useGetMonthMarketplacePaymentsQuery(\n selectedIds,\n setSelectedIds,\n setErrorInfo\n );\n\n const refreshData = useCallback(\n async (refetchAll?: boolean) => {\n if (refetchAll) {\n queryClient.invalidateQueries({\n queryKey: [\n PAYMENT_MONTHLY_CONTAINER_QUERY_KEY,\n activeAccountWebClientConfig.activeAccountId,\n ],\n });\n // For the months one we want to just query all - since this is each month ()\n queryClient.invalidateQueries({\n queryKey: [PAYMENT_SINGLE_MONTH_QUERY_KEY, true],\n type: 'all',\n });\n }\n\n return monthPaymentsQuery.refetch();\n },\n [\n activeAccountWebClientConfig.activeAccountId,\n monthPaymentsQuery,\n queryClient,\n ]\n );\n\n if (monthPaymentsQuery.failureReason) {\n const { headerDisplay, messageDisplay } = getErrorInfoFromStatusCode(\n null,\n monthPaymentsQuery.failureReason.message\n );\n setErrorInfo({\n errorHeader: headerDisplay,\n errorMessage: messageDisplay,\n });\n }\n\n return (\n \n {children}\n \n );\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { MarketplacePaymentClient } from 'src/WebApiController';\n\nexport const GET_PAYMENT_LINES_WITH_SALES_QUERY_KEY =\n 'MarketplacePaymentClient.getPaymentLinesWithSales';\n\nexport const useGetMarketplacePaymentLinesWithSales = (\n marketplacePaymentId: number,\n disabled: boolean\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const { trackError } = useErrorBoundaryContext();\n\n const shouldQuery =\n !disabled &&\n activeAccountWebClientConfig.activeAccountId != null &&\n !!marketplacePaymentId;\n\n const paymentLineQuery = useQuery({\n queryKey: [\n GET_PAYMENT_LINES_WITH_SALES_QUERY_KEY,\n activeAccountWebClientConfig.activeAccountId,\n marketplacePaymentId,\n ],\n queryFn: async () => {\n if (!shouldQuery) {\n return null;\n }\n return await new MarketplacePaymentClient(\n activeAccountWebClientConfig\n ).getPaymentLinesWithSales(marketplacePaymentId);\n },\n\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError('MarketplacePaymentClient.getPaymentLinesWithSales', error, {\n marketplacePaymentId,\n });\n },\n },\n enabled: shouldQuery,\n });\n\n return { paymentLineQuery };\n};\n","import { Temporal } from '@js-temporal/polyfill';\nimport { useQuery } from '@tanstack/react-query';\nimport { max, min } from 'lodash-es';\nimport { useMemo } from 'react';\nimport { DATA_REFRESH_RATE_IN_MILLIS_LONG } from 'src/utils/constants/constants';\nimport {\n roundRelativeDateDown,\n roundRelativeDateUp,\n} from 'src/utils/dateTimeUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n DateTimeRangeWithRelative,\n MarketplacePaymentClient,\n MarketplacePaymentQuery,\n} from 'src/WebApiController';\n\nimport { useAppContext } from '../AppContext';\nimport { useErrorBoundaryContext } from '../ErrorBoundaryContext';\nimport { useFilterQueryContext } from '../FilterQueryContext';\nimport { PAYMENT_SINGLE_MONTH_QUERY_KEY } from './MarketplacePaymentDataContext.constants';\n\nexport const useSingleMonthMarketplacePaymentsQuery = (\n firstOfMonth: string,\n isExpanded: boolean\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const { filterQuery } = useFilterQueryContext();\n const { trackError } = useErrorBoundaryContext();\n\n const firstOfMonthPlainDateTime = Temporal.PlainDateTime.from(firstOfMonth);\n const lastOfMonthPlainDateTime = firstOfMonthPlainDateTime\n .with({\n day: firstOfMonthPlainDateTime.daysInMonth,\n hour: 23,\n minute: 59,\n second: 59,\n millisecond: 999,\n })\n .toString();\n\n const monthDateRange: DateTimeRangeWithRelative = useMemo(() => {\n let filterDateStart = '';\n let filterDateEnd = '';\n if (filterQuery.paymentDates) {\n if (filterQuery.paymentDates.start) {\n filterDateStart = filterQuery.paymentDates.start;\n }\n if (filterQuery.paymentDates.relativeStartSecs != null) {\n const relativeDateStart = new Date(\n new Date().getTime() +\n filterQuery.paymentDates.relativeStartSecs * 1000\n );\n\n filterDateStart = roundRelativeDateUp(\n relativeDateStart,\n filterQuery.paymentDates.roundingMode\n ).toISOString();\n }\n\n if (filterQuery.paymentDates.end) {\n filterDateEnd = filterQuery.paymentDates.end;\n }\n if (filterQuery.paymentDates.relativeEndSecs != null) {\n const relativeDateEnd = new Date(\n new Date().getTime() + filterQuery.paymentDates.relativeEndSecs * 1000\n );\n\n filterDateEnd = roundRelativeDateDown(\n relativeDateEnd,\n filterQuery.paymentDates.roundingMode\n ).toISOString();\n }\n }\n\n return {\n start:\n max([firstOfMonthPlainDateTime.toString(), filterDateStart]) ?? null,\n end: min([lastOfMonthPlainDateTime.toString(), filterDateEnd]) ?? null,\n } as DateTimeRangeWithRelative;\n }, [\n filterQuery.paymentDates,\n firstOfMonthPlainDateTime,\n lastOfMonthPlainDateTime,\n ]);\n\n const moddedFilterQuery = {\n ...filterQuery,\n paymentDates: monthDateRange,\n };\n\n const singleMonthPaymentQuery = useQuery({\n queryKey: [PAYMENT_SINGLE_MONTH_QUERY_KEY, isExpanded, moddedFilterQuery],\n queryFn: async () => {\n if (activeAccountWebClientConfig.activeAccountId == null) {\n return null;\n }\n\n return tryInvokeApi(\n async () => {\n return await new MarketplacePaymentClient(\n activeAccountWebClientConfig\n ).getMarketplacePayments(moddedFilterQuery);\n },\n (error) => {\n trackError(PAYMENT_SINGLE_MONTH_QUERY_KEY, error, moddedFilterQuery);\n }\n );\n },\n enabled: isExpanded && activeAccountWebClientConfig.activeAccountId != null,\n staleTime: Infinity, // Since we're always refetching on an interval, we don't want query to calculate whether the data is stale\n refetchOnWindowFocus: false,\n networkMode: 'offlineFirst',\n refetchInterval: DATA_REFRESH_RATE_IN_MILLIS_LONG,\n });\n\n return {\n singleMonthPaymentQuery,\n filterQuery: moddedFilterQuery as MarketplacePaymentQuery,\n };\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { CatalogClient, CatalogResults } from 'src/WebApiController';\n\nexport function useGetCatalogBySaleIds(saleIds?: number[] | null) {\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n\n return useQuery({\n queryKey: ['getCatalogBySaleIds', saleIds],\n async queryFn() {\n if (!saleIds) return null;\n\n if (saleIds.length === 0)\n return {\n events: {},\n performers: {},\n venues: {},\n venueCfgs: {},\n } as CatalogResults;\n\n try {\n return await new CatalogClient(\n activeAccountWebClientConfig\n ).getCatalogBySaleIds(saleIds);\n } catch (err: unknown) {\n trackError('CatalogClient.getCatalogBySaleIds', err as ErrorTypes, {\n saleIds,\n });\n throw err;\n }\n },\n refetchOnWindowFocus: false,\n });\n}\n","import { useMemo } from 'react';\nimport { useGetMarketplacePaymentLinesWithSales } from 'src/contexts/MarketplacePaymentDataContext';\nimport { useGetCatalogBySaleIds } from 'src/hooks/api/useGetCatalogBySaleIds';\nimport {\n Event,\n MarketplacePaymentLineWithSaleInfo,\n Venue,\n} from 'src/WebApiController';\n\nexport interface MarketplacePaymentLineWithSaleAndEventInfo\n extends MarketplacePaymentLineWithSaleInfo {\n event: Event | undefined;\n venue: Venue | undefined;\n}\n\ninterface MarketplacePaymentLineTableDataResponse {\n data: MarketplacePaymentLineWithSaleAndEventInfo[];\n isLoading: boolean;\n error: Error | null;\n}\n\nexport const useGetMarketplacePaymentLineTableData = (\n marketplacePaymentLineId: number | undefined\n): MarketplacePaymentLineTableDataResponse => {\n const { paymentLineQuery } = useGetMarketplacePaymentLinesWithSales(\n marketplacePaymentLineId ?? 0,\n false\n );\n\n const {\n isLoading: isLoadingMktPaymentLines,\n error: mktPaymentLinesError,\n data: marketplacePaymentData,\n } = paymentLineQuery;\n\n const saleIds = useMemo(() => {\n return (marketplacePaymentData ?? [])\n .map((mktPaymentLine) => mktPaymentLine.saleId)\n .filter((s) => s != null) as number[];\n }, [marketplacePaymentData]);\n\n const {\n isLoading: isLoadingEventCatalog,\n error: eventCatalogError,\n data: catalog,\n } = useGetCatalogBySaleIds(saleIds);\n\n const isLoading = isLoadingEventCatalog || isLoadingMktPaymentLines;\n\n const data = useMemo(() => {\n if (isLoading || !catalog) {\n return [];\n }\n\n return (marketplacePaymentData ?? []).map(\n (mktPaymentLine): MarketplacePaymentLineWithSaleAndEventInfo => {\n const event = catalog.events[mktPaymentLine.viagEvId ?? '']?.event;\n return {\n ...mktPaymentLine,\n event,\n venue: catalog.venues[event?.venueId],\n };\n }\n );\n }, [catalog, isLoading, marketplacePaymentData]);\n\n return {\n isLoading,\n error: eventCatalogError || mktPaymentLinesError,\n data,\n };\n};\n","import { vars } from 'src/core/themes';\n\nexport const AutomatiqLogo = ({\n width,\n height,\n}: {\n width?: string | number;\n height?: string | number;\n}) => {\n const color = vars.color.marketplaceBackgroundAutomatiq;\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n","export const GoTicketsLogo = ({\n width,\n height,\n}: {\n width?: string | number;\n height?: string | number;\n}) => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n );\n};\n","export function TicketEvolutionLogo({\n width,\n height,\n fillColor,\n}: {\n width?: string | number;\n height?: string | number;\n fillColor?: string;\n}) {\n const fill = fillColor || '#010101';\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n","export const TicketNetworkLogo = ({\n width,\n height,\n}: {\n width?: string | number;\n height?: string | number;\n}) => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n","import clsx from 'clsx';\nimport { useCallback } from 'react';\nimport { useSiteTheme } from 'src/contexts/SiteTheme/SiteThemeContext';\nimport { Colors } from 'src/core/themes/constants/colors';\nimport { useGetEventFullInfo } from 'src/hooks/useGetEventFullInfo';\nimport { GametimeLogo, StubHubLogo, TickPickLogo, ViagogoLogo } from 'src/svgs';\nimport { AutomatiqLogo } from 'src/svgs/AutomatiqLogo';\nimport { AxsLogo } from 'src/svgs/AxsLogo';\nimport { GoTicketsLogo } from 'src/svgs/GoTicketsLogo';\nimport { SeatGeekLogo } from 'src/svgs/SeatGeekLogo';\nimport { TicketEvolutionLogo } from 'src/svgs/TicketEvolutionLogo';\nimport { TicketmasterLogo } from 'src/svgs/TicketmasterLogo';\nimport { TicketNetworkLogo } from 'src/svgs/TicketNetworkLogo';\nimport { VividSeatsLogo } from 'src/svgs/VividSeatsLogo';\nimport {\n MarketplaceEventIdPlaceholder,\n MarketplaceEventUrlTemplate,\n} from 'src/utils/constants/constants';\nimport { getIsInternationalEvent } from 'src/utils/eventWithDataUtils';\nimport { getStubhubEventWithPricingUrl } from 'src/utils/inventoryUtils';\nimport {\n Event,\n Marketplace,\n SellerEventMarketplaceEventInfo,\n} from 'src/WebApiController';\n\nimport * as styles from './MarketplaceLogo.css';\n\nexport interface LogoDimensions {\n width: number | string;\n height: number | string;\n}\n\nexport const logoAreaDimensions = { height: '30px', width: 'auto' };\nexport const logoDimensions = {\n [Marketplace.Ticketmaster]: { height: 30, width: 80 },\n [Marketplace.VividSeats]: { height: 30, width: 80 },\n [Marketplace.SeatGeek]: { height: 30, width: 47 },\n [Marketplace.Gametime]: { height: 30, width: 80 },\n [Marketplace.TickPick]: { height: 30, width: 80 },\n [Marketplace.AXS]: { height: 30, width: 80 },\n [Marketplace.Automatiq]: { height: 30, width: 80 },\n [Marketplace.GoTickets]: { height: 30, width: 80 },\n [Marketplace.TicketNetwork]: { height: 30, width: 80 },\n [Marketplace.TicketEvolution]: { height: 30, width: 80 },\n};\n\nexport const MarketplaceLogo = ({\n marketplace,\n isViagogo,\n event,\n grayScaleColor,\n marketplaceEventInfo,\n onClick,\n logoDimensions: dimensions,\n}: {\n marketplace?: Marketplace | null;\n isViagogo?: boolean;\n event?: Event;\n grayScaleColor?: boolean;\n marketplaceEventInfo?: SellerEventMarketplaceEventInfo | null;\n /**\n * Override of the onClick event for the logo. By default, the logo will open the event in the marketplace.\n */\n onClick?: (e: React.MouseEvent) => void;\n logoDimensions?: LogoDimensions;\n}) => {\n const { isDarkMode } = useSiteTheme();\n const { venue } = useGetEventFullInfo(event);\n\n const isInternationalEvent = getIsInternationalEvent(venue?.country?.code);\n\n const onOpenInStubHubClicked = useCallback(() => {\n if (marketplace === Marketplace.StubHub) {\n window.open(\n getStubhubEventWithPricingUrl(event?.viagId, isInternationalEvent),\n '_blank'\n );\n } else if (marketplaceEventInfo?.marketplace) {\n let urlTemplate =\n MarketplaceEventUrlTemplate[marketplaceEventInfo.marketplace];\n\n let urlEventId =\n marketplaceEventInfo.eventIdOverride ??\n marketplaceEventInfo.mappedEventId ??\n '';\n if (marketplace === Marketplace.Ticketmaster) {\n urlEventId = marketplaceEventInfo.websiteEventId ?? urlEventId;\n }\n if (urlEventId) {\n urlTemplate = urlTemplate.replace(\n MarketplaceEventIdPlaceholder,\n urlEventId\n );\n window.open(urlTemplate, '_blank', 'noopener noreferrer');\n }\n }\n }, [event?.viagId, isInternationalEvent, marketplace, marketplaceEventInfo]);\n\n return (\n {\n e.preventDefault();\n e.stopPropagation();\n if (event != null) {\n onOpenInStubHubClicked();\n }\n })\n }\n >\n {marketplace === Marketplace.StubHub ? (\n isViagogo ? (\n \n ) : (\n \n )\n ) : marketplace === Marketplace.Ticketmaster ? (\n \n ) : marketplace === Marketplace.VividSeats ? (\n \n ) : marketplace === Marketplace.SeatGeek ? (\n \n ) : marketplace === Marketplace.Gametime ? (\n \n ) : marketplace === Marketplace.TickPick ? (\n \n ) : marketplace === Marketplace.AXS ? (\n \n ) : marketplace === Marketplace.GoTickets ? (\n \n ) : marketplace === Marketplace.TicketNetwork ? (\n \n ) : marketplace === Marketplace.Automatiq ? (\n \n ) : marketplace === Marketplace.TicketEvolution ? (\n \n ) : (\n
    {marketplace ?? 'Unknown Marketplace'}
    \n )}\n \n );\n};\n","import { formatInTimeZone } from 'date-fns-tz';\nimport { MarketplaceLogo } from 'src/components/common/MarketplaceLogo';\nimport { MarketplacePaymentStatePill } from 'src/components/common/MarketplacePaymentStatePill/MarketplacePaymentStatePill';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useSiteTimezoneContext } from 'src/contexts/SiteTimezoneContext/SiteTimezoneContext';\nimport { DEFAULT_TIMEZONE_LOCAL } from 'src/contexts/SiteTimezoneContext/SiteTimezoneContext.constants';\nimport { Stack } from 'src/core/ui';\nimport { useHasSaleDetailsMarketplaceTermsFeature } from 'src/hooks/features/useHasSaleDetailsMarketplaceTermsFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { MARKETPLACE_PAYMENT_TERM_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { MarketplaceSalePayment } from 'src/WebApiController';\n\nimport * as styles from './MarketplacePaymentHeaderDetails.css';\n\ninterface MarketplacePaymentHeaderDetailsProps {\n marketplaceSalePayment: MarketplaceSalePayment;\n}\n\nexport const MarketplacePaymentHeaderDetails = ({\n marketplaceSalePayment,\n}: MarketplacePaymentHeaderDetailsProps) => {\n const { timeZone } = useSiteTimezoneContext();\n const hasSaleDetailsMarketplaceTermsFeature =\n useHasSaleDetailsMarketplaceTermsFeature();\n\n return (\n \n \n
    \n \n :\n \n {marketplaceSalePayment.extPmtId}\n
    \n {marketplaceSalePayment.pmtDate && (\n
    \n \n :\n \n \n {formatInTimeZone(\n new Date(marketplaceSalePayment.pmtDate),\n timeZone ?? DEFAULT_TIMEZONE_LOCAL,\n 'do LLL yyyy'\n )}\n \n
    \n )}\n {hasSaleDetailsMarketplaceTermsFeature &&\n marketplaceSalePayment.mkpPmtTerm && (\n
    \n \n :\n \n \n \n \n
    \n )}\n
    \n \n \n \n \n \n );\n};\n","export const MinRowsForUsingVirtuoso = 20;\n","import {\n MutableRefObject,\n useCallback,\n useLayoutEffect,\n useState,\n} from 'react';\nimport useResizeObserver from 'use-resize-observer';\n\nexport const PosEventsAccordionBodyHeight =\n '--pos-events-accordion-body-height';\nconst DefaultBottomMargin = 20;\n\nconst getVirtuosoTopListItemBounding = (): DOMRect | undefined =>\n document\n .querySelector('[data-test-id=\"virtuoso-top-item-list\"]')\n ?.getBoundingClientRect();\n\ninterface UseVirtuosoAccordionSizeProps {\n accordionHeaderRef: MutableRefObject;\n accordionBodyRef: MutableRefObject;\n isExpanded: boolean;\n enabled: boolean;\n}\n\nconst MIN_HEIGHT_FOR_VIRTUOSO_ACCORDION = 500;\n\nexport const useSetEventsAccordionMaxHeight = ({\n enabled,\n accordionHeaderRef,\n accordionBodyRef,\n isExpanded,\n}: UseVirtuosoAccordionSizeProps): void => {\n const [eventsAccordionHeaderBounding, setEventsAccordionHeaderBounding] =\n useState(undefined);\n\n const setStyle = useCallback(\n (\n eventAccordionHeaderBounding: DOMRect | undefined,\n enabled: boolean,\n expanded: boolean\n ) => {\n if (!accordionBodyRef.current || !enabled || !expanded) {\n return;\n }\n const virtuosoTopListItemBottom =\n getVirtuosoTopListItemBounding()?.bottom ?? 0;\n\n const eventsAccordionHeaderHeight =\n eventAccordionHeaderBounding?.height ?? 0;\n\n const bodyMaxExpandedHeight = Math.max(\n MIN_HEIGHT_FOR_VIRTUOSO_ACCORDION,\n window.innerHeight -\n virtuosoTopListItemBottom -\n eventsAccordionHeaderHeight -\n DefaultBottomMargin\n );\n\n accordionBodyRef.current.style.setProperty(\n PosEventsAccordionBodyHeight,\n `${bodyMaxExpandedHeight}px`\n );\n },\n [accordionBodyRef]\n );\n\n // Listens for header changes, for example, screen resizing or showing bulk actions\n useResizeObserver({\n ref: accordionHeaderRef,\n onResize: () => {\n const bounding = accordionHeaderRef.current?.getBoundingClientRect();\n setStyle(bounding, enabled, isExpanded);\n setEventsAccordionHeaderBounding(bounding);\n },\n });\n\n useLayoutEffect(() => {\n setStyle(eventsAccordionHeaderBounding, enabled, isExpanded);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isExpanded, accordionBodyRef, eventsAccordionHeaderBounding, enabled]);\n};\n","import clsx from 'clsx';\nimport { ComponentProps, ReactNode } from 'react';\nimport { Stack } from 'src/core/ui';\nimport { mergeProps } from 'src/core/utils';\n\nimport * as styles from './PageSection.css';\n\ntype RootProps = {\n children: ReactNode;\n};\n\nexport function Root({ children }: RootProps) {\n return
    {children}
    ;\n}\n\ntype HeaderProps = Pick, 'className' | 'onClick'> & {\n action?: ReactNode;\n /**\n * Title of the section.\n */\n children?: ReactNode;\n headerClassName?: string;\n};\n\n/**\n * This can be used separately in places where the `PageSection` component doesn't support the\n * features required.\n * @param props\n */\nexport function Header({\n action,\n children,\n headerClassName,\n ...props\n}: HeaderProps) {\n return (\n \n {children != null && (\n

    \n {children}\n

    \n )}\n
    \n {action != null &&
    {action}
    }\n \n );\n}\n","import { Header, Root } from './PageSection';\n\nexport const PageSection = Object.assign(Root, {\n Header,\n});\n","import { MutableRefObject, useCallback, useEffect } from 'react';\nimport useResizeObserver from 'use-resize-observer';\n\ninterface UseSetTopListItemPositionProps {\n topItemListRef: MutableRefObject;\n virtuosoId: string;\n isScrollAtTop: boolean;\n virtuosoScrollY: number;\n}\n\n/**\n * Virtuoso's list wrapper (virtuoso-item-list) has paddingTop to separate\n * from sticky header. When Virtuoso component TopListItem changes its height,\n * virtuoso-item-list doesn't update it's padding.\n * This hook, maintains that paddingTop update to date.\n */\nexport const useSetTopListItemPosition = ({\n topItemListRef,\n virtuosoId,\n isScrollAtTop,\n virtuosoScrollY,\n}: UseSetTopListItemPositionProps) => {\n const virtuosoItemListSelector = `[id=\"${virtuosoId}\"] [data-test-id=\"virtuoso-item-list\"]`;\n\n const updateVirtuosoListPaddingTop = useCallback(() => {\n requestAnimationFrame(() => {\n const topItemListEl = topItemListRef.current;\n const virtuosoItemListEl = document.querySelector(\n virtuosoItemListSelector\n ) as HTMLDivElement;\n\n if (virtuosoItemListEl && topItemListEl) {\n virtuosoItemListEl.style.paddingTop = `${topItemListEl.offsetHeight}px`;\n }\n });\n }, [topItemListRef, virtuosoItemListSelector]);\n\n // Apply paddingTop to virtuoso-item-list getting it from TopItemList height.\n useResizeObserver({\n ref: topItemListRef,\n onResize: () => {\n const topItemListEl = topItemListRef.current;\n if (!topItemListEl) {\n return;\n }\n\n if (virtuosoScrollY < topItemListEl.offsetTop || isScrollAtTop) {\n updateVirtuosoListPaddingTop();\n }\n },\n });\n\n useEffect(() => {\n if (isScrollAtTop) {\n updateVirtuosoListPaddingTop();\n }\n }, [isScrollAtTop, updateVirtuosoListPaddingTop]);\n};\n","import { ComponentPropsWithRef, useRef } from 'react';\nimport { Components } from 'react-virtuoso';\nimport { useSetTopListItemPosition } from 'src/components/Events/EventListing/EventVirtualizedList/useSetTopListItemPosition';\nimport { VirtuosoContext } from 'src/core/ui/Virtuoso/VirtuosoContext';\n\nexport const VirtuosoTopListItemWrapper: Components<\n unknown,\n VirtuosoContext\n>['TopItemList'] = ({\n children,\n style,\n context,\n}: ComponentPropsWithRef<'div'> & {\n context?: VirtuosoContext;\n}) => {\n const topItemListRef = useRef(null);\n const isScrollAtTop = context?.scrollY === 0;\n\n useSetTopListItemPosition({\n topItemListRef,\n virtuosoId: context?.virtuosoId ?? '',\n isScrollAtTop,\n virtuosoScrollY: context?.scrollY ?? 0,\n });\n\n return (\n \n {context?.topListItemBefore}\n {children}\n \n );\n};\n","import { ReactNode, useEffect, useMemo, useRef } from 'react';\nimport { useScroll } from 'react-use';\nimport {\n Components,\n GroupedVirtuoso,\n GroupedVirtuosoHandle,\n} from 'react-virtuoso';\nimport { ReactElementType } from 'react-window';\nimport { PageSection } from 'src/components/common/PageSection';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport {\n VirtuosoContext,\n VirtuosoTopListItemWrapper,\n} from 'src/core/ui/Virtuoso';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { EVENT_SORT_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport {\n EventUiSort,\n getEventSort,\n getEventUiSort,\n QueryWithViewMode,\n} from 'src/utils/eventQueryUtils';\nimport { EntityWithTicketsQuery, EventSort } from 'src/WebApiController';\n\nimport * as styles from './EventVirtualizedList.css';\n\nconst EventListVirtuosoID = 'virtuoso-event-list';\n\nconst Header: Components['Header'] = ({\n context,\n}: {\n context?: VirtuosoContext;\n}) => {\n return <>{context?.before};\n};\n\ntype EventVirtualizedListProps = {\n before?: ReactNode;\n topListItemBefore?: ReactNode;\n items: T[];\n highlightedId?: string;\n scrollToItemIndex?: number;\n ItemComponent: ReactElementType;\n getDividerText: (item: T) => string;\n onSelect?: (id: string) => void;\n selectedIds?: string[];\n eventSortOptions?: Record;\n tableActions?: React.ReactElement;\n onItemsRendered?: (items: T[]) => void;\n disablePagination: boolean;\n};\n\nexport const EventVirtualizedList = ({\n before,\n topListItemBefore,\n items,\n highlightedId,\n scrollToItemIndex,\n onItemsRendered,\n selectedIds = [],\n onSelect,\n ItemComponent,\n getDividerText,\n eventSortOptions,\n tableActions,\n disablePagination,\n}: EventVirtualizedListProps) => {\n const { filterQuery, setFilterQuery } = useFilterQueryContext<\n EntityWithTicketsQuery & QueryWithViewMode\n >();\n const virtuosoRef = useRef(null);\n const scrollRef = useRef(null);\n const { y: scrollY } = useScroll(scrollRef);\n\n const { groups, groupCounts } = useMemo(() => {\n const groups: string[] = [];\n const groupCounts: number[] = [];\n for (const item of items) {\n const dividerText = getDividerText(item);\n if (groups.length === 0 || groups[groups.length - 1] !== dividerText) {\n groups.push(dividerText);\n groupCounts.push(1);\n } else {\n groupCounts[groupCounts.length - 1] += 1;\n }\n }\n return { groups, groupCounts };\n }, [items, getDividerText]);\n\n useEffect(() => {\n if (scrollToItemIndex !== undefined) {\n virtuosoRef.current?.scrollToIndex(scrollToItemIndex);\n }\n }, [scrollToItemIndex]);\n\n return (\n {\n if (el instanceof HTMLElement) scrollRef.current = el;\n }}\n className={styles.root}\n context={\n {\n before,\n scrollY,\n topListItemBefore,\n virtuosoId: EventListVirtuosoID,\n } satisfies VirtuosoContext\n }\n components={{\n Header,\n TopItemList: VirtuosoTopListItemWrapper,\n }}\n overscan={window.innerHeight}\n increaseViewportBy={window.innerHeight}\n itemsRendered={(listItems) => {\n if (onItemsRendered) {\n onItemsRendered(listItems.map((i) => items[i.index]));\n }\n }}\n groupCounts={groupCounts}\n groupContent={(index) => {\n return (\n {\n virtuosoRef.current?.scrollToIndex({ groupIndex: index });\n }}\n action={\n
    \n {\n const [sortBy, isSortDescending] = getEventSort(sort);\n if (\n sortBy !== filterQuery.sortBy ||\n isSortDescending !== filterQuery.isSortDescending\n ) {\n setFilterQuery({\n ...filterQuery,\n sortBy,\n isSortDescending,\n });\n }\n }}\n valueOptionsContent={eventSortOptions ?? EVENT_SORT_TO_CID}\n />\n {tableActions}\n
    \n }\n >\n
    \n {(() => {\n if (filterQuery.sortBy === EventSort.Date) {\n const [month, year] = groups[index].split(' ');\n return (\n <>\n {month}\n  \n {year}\n \n );\n }\n return <>{groups[index]};\n })()}\n
    \n \n );\n }}\n itemContent={(index) => {\n const item = items[index];\n return (\n
    \n
    \n \n
    \n
    \n );\n }}\n />\n );\n};\n","import { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\n\nexport const EventCheckbox = ({ eventId }: { eventId: string }) => {\n const { toggleGroup, getGroupToggleState } = useMultiSelectionContext();\n const isChecked = getGroupToggleState(eventId).isGroupSelected;\n return toggleGroup(eventId)} />;\n};\n","import { clsx } from 'clsx';\nimport {\n eventColors,\n eventStateLabel,\n eventStatusContent,\n eventStatusWrapper,\n} from 'src/components/Events/EventStatus/EventStatus.css';\nimport { Content } from 'src/contexts/ContentContext';\nimport { EVENT_STATUS_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { ApiEventStatus } from 'src/WebApiController';\n\nenum StatusColor {\n Red = 'red',\n Yellow = 'yellow',\n Gray = 'gray',\n}\n\nconst EventStatusToColor: Readonly> = {\n [ApiEventStatus.Cancelled]: StatusColor.Red,\n [ApiEventStatus.Deleted]: StatusColor.Red,\n [ApiEventStatus.Draft]: StatusColor.Gray,\n [ApiEventStatus.Normal]: StatusColor.Gray,\n [ApiEventStatus.Contingent]: StatusColor.Yellow,\n [ApiEventStatus.Postponed]: StatusColor.Yellow,\n [ApiEventStatus.Relocated]: StatusColor.Yellow,\n [ApiEventStatus.Rescheduled]: StatusColor.Yellow,\n [ApiEventStatus.RelocatedAndRescheduled]: StatusColor.Yellow,\n};\n\nexport interface EventStatusProps {\n status: ApiEventStatus | null | undefined;\n}\n\nexport const EventStatus = ({ status }: EventStatusProps) => {\n // Don't show normal state\n if (!status || status === ApiEventStatus.Normal) {\n return null;\n }\n\n return (\n
    \n \n \n \n \n
    \n \n );\n};\n","import React, { useCallback } from 'react';\n\nimport { useActiveFocusContext } from '../ActiveFocusContext/ActiveFocusContext';\nimport { FocusContext, IInputPriceFocusContext } from './FocusContext.types';\n\nexport const createInputPriceFocusContext =\n React.createContext({} as IInputPriceFocusContext);\n\nexport const useInputPriceFocusContext = () =>\n React.useContext(createInputPriceFocusContext);\n\nexport const InputPriceFocusProvider = ({\n pageSize,\n disablePagination,\n children,\n}: {\n pageSize: number;\n disablePagination: boolean;\n children: React.ReactNode;\n}) => {\n const [disabledFocusContexts, setDisabledFocusContexts] =\n React.useState();\n\n const [inputPriceFocusContext, setInputPriceFocusContext] =\n React.useState();\n\n const { setActiveItem } = useActiveFocusContext();\n\n const onSetInputPriceFocusContext = useCallback(\n (input?: FocusContext) => {\n if (input) {\n setActiveItem(undefined); // Clear active focus context or else we have conflicts\n }\n setInputPriceFocusContext(input);\n },\n [setActiveItem]\n );\n\n return (\n \n {children}\n \n );\n};\n","import { format } from 'date-fns';\nimport { useCallback } from 'react';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { QueryWithViewMode } from 'src/utils/eventQueryUtils';\nimport {\n getFormattedEventName,\n getPerformerAndVenueForEvent,\n} from 'src/utils/eventWithDataUtils';\nimport { getLocaleFromLanguageOrCurrent } from 'src/utils/localeUtils';\nimport { EntityWithTicketsQuery, Event, EventSort } from 'src/WebApiController';\n\nexport const useGetGroupingTitle = () => {\n const { filterQuery } = useFilterQueryContext<\n EntityWithTicketsQuery & QueryWithViewMode\n >();\n const { data } = useCatalogDataContext();\n const groupBy = filterQuery.sortBy;\n\n const getMainDisplayFirstChar = useCallback(\n (event: Event) => {\n const { performer } = getPerformerAndVenueForEvent(event, data);\n const [boldText] = getFormattedEventName({ event, performer });\n\n return boldText.charAt(0);\n },\n [data]\n );\n\n const getEventGroupingText = useCallback(\n (event: Event) => {\n if (!groupBy || groupBy === EventSort.Date) {\n return format(new Date(event.dates.start!), 'MMMM yyyy', {\n locale: getLocaleFromLanguageOrCurrent(),\n });\n }\n if (!filterQuery || filterQuery.sortBy === EventSort.Date) {\n return '';\n }\n return getMainDisplayFirstChar(event);\n },\n [groupBy, filterQuery, getMainDisplayFirstChar]\n );\n\n return {\n getDividerTextForSorting: getMainDisplayFirstChar,\n getEventGroupingText,\n };\n};\n","import { ReactNode, useCallback, useMemo, useRef } from 'react';\nimport {\n PosEventsAccordionBodyHeight,\n useSetEventsAccordionMaxHeight,\n} from 'src/components/Accordions/useSetEventsAccordionMaxHeight';\nimport { EventVirtualizedList } from 'src/components/Events/EventListing/EventVirtualizedList';\nimport { EventCheckbox } from 'src/components/Events/EventListing/EventVirtualizedList/EventCheckbox';\nimport { EventStatus } from 'src/components/Events/EventStatus';\nimport { InputPriceFocusProvider } from 'src/contexts/InputPriceFocusContext/InputPriceFocusContext';\nimport {\n MultiSelectScope,\n useMultiSelectionContext,\n} from 'src/contexts/MultiSelectionContext';\nimport * as PosCollapsible from 'src/core/POS/PosCollapsible';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { Feature } from 'src/WebApiController';\n\nimport { EventAccordionItemProps } from './EventAccordionItem';\nimport * as styles from './EventsAccordion.css';\nimport { eventStatus } from './EventsAccordion.css';\nimport { useGetGroupingTitle } from './useGetGroupingTitle';\n\ntype EventItemProps = {\n onSelect: (ids: string) => void;\n selectedIds?: string[];\n item: EventAccordionItemProps;\n disablePagination: boolean;\n};\n\nexport const EventItemCollapsible = ({\n item,\n disablePagination,\n selectedIds = [],\n onSelect,\n}: EventItemProps) => {\n const {\n HeaderComponent,\n BodyComponent,\n AfterHeaderComponent,\n usingVirtuoso,\n ...rest\n } = item ?? {};\n const accordionBodyRef = useRef(null);\n const accordionHeaderRef = useRef(null);\n const { selectionMode, setSelectionMode } = useMultiSelectionContext();\n const hasEventStatusDisplay = useUserHasFeature(Feature.EventStatusDisplay);\n\n const isAccordionOpen = useMemo(\n () => selectedIds.includes(item.event.viagVirtualId),\n [item.event.viagVirtualId, selectedIds]\n );\n\n const isMobile = useMatchMedia('mobile');\n\n useSetEventsAccordionMaxHeight({\n enabled: usingVirtuoso,\n isExpanded: isAccordionOpen,\n accordionBodyRef,\n accordionHeaderRef,\n });\n\n const hideBulkActions = useCallback(() => {\n if (\n selectionMode &&\n selectionMode.groupId === item.itemId &&\n selectionMode.mode === MultiSelectScope.SingleGroup\n ) {\n setSelectionMode();\n }\n }, [item.itemId, selectionMode, setSelectionMode]);\n\n return (\n
    \n {selectionMode?.mode === MultiSelectScope.AllGroups && (\n
    \n \n
    \n )}\n {\n if (!isOpen) {\n hideBulkActions();\n }\n onSelect(item?.event.viagVirtualId);\n }}\n >\n \n \n
    \n {hasEventStatusDisplay && item?.event.eventStatus && (\n
    \n \n
    \n )}\n \n
    \n
    \n {AfterHeaderComponent && }\n
    \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport type VirtualizedEventAccordionProps = {\n before?: ReactNode;\n topListItemBefore?: ReactNode;\n onSelect: (id: string) => void;\n selectedIds?: string[];\n items: EventAccordionItemProps[];\n scrollToItemIndex?: number;\n tableActions?: React.ReactElement;\n onItemsRendered?: (items: EventAccordionItemProps[]) => void;\n disablePagination: boolean;\n};\n\nexport const EventsAccordion = (\n props: VirtualizedEventAccordionProps\n) => {\n const { getEventGroupingText } = useGetGroupingTitle();\n\n const getTableDividerText = useCallback(\n (item: EventAccordionItemProps) => getEventGroupingText(item.event),\n [getEventGroupingText]\n );\n\n return (\n >\n {...props}\n getDividerText={getTableDividerText}\n ItemComponent={EventItemCollapsible}\n />\n );\n};\n","import { debounce } from 'lodash-es';\nimport {\n createContext,\n ReactNode,\n useCallback,\n useContext,\n useRef,\n useState,\n} from 'react';\nimport { State } from 'react-use/lib/useScroll';\nimport { VirtuosoScrollEvent } from 'src/tables/Table';\n\nconst MinScrollHeightToCollapse = 30;\n\ninterface ICollapsableViewContext {\n isCollapsedView: boolean;\n setIsCollapsedView: (isCollapsedView: boolean) => void;\n\n isEnabled: boolean;\n onScroll: (virtuosoScrollEvent: VirtuosoScrollEvent) => void;\n}\n\ninterface CollapsableRefProps {\n isCollapsedView: boolean;\n isEnabled: boolean;\n lastScrollState: State;\n}\n\nconst collapsableRefProps: CollapsableRefProps = {\n isCollapsedView: false,\n isEnabled: false,\n lastScrollState: {\n x: 0,\n y: 0,\n },\n};\n\nexport const CollapsableViewContext = createContext({\n isCollapsedView: false,\n setIsCollapsedView: () => void 0,\n isEnabled: false,\n onScroll: () => void 0,\n});\n\nexport const useCollapsableViewContext = () =>\n useContext(CollapsableViewContext);\n\nexport const CollapsableViewProvider = ({\n children,\n isEnabled,\n}: {\n isEnabled: boolean;\n children: ReactNode;\n}) => {\n const [isCollapsedView, setIsCollapsedView] = useState(false);\n\n const refProps = useRef(collapsableRefProps);\n refProps.current.isCollapsedView = isCollapsedView;\n refProps.current.isEnabled = isEnabled;\n\n /**\n * Only collapse when scrollY changes.\n * Don't add deps in this useCallback to avoid renders\n */\n const onScroll = useCallback(\n debounce((virtuosoScrollEvent: VirtuosoScrollEvent) => {\n const { element, scrollState } = virtuosoScrollEvent;\n const { scrollHeight, clientHeight } = element;\n const { isCollapsedView, lastScrollState, isEnabled } = refProps.current;\n\n if (!isEnabled) {\n return;\n }\n\n const lastScrollY = lastScrollState.y;\n refProps.current.lastScrollState = scrollState;\n\n // If scrollY hasn't changed, then don't do anything.\n if (lastScrollY === scrollState.y) {\n return;\n }\n\n const hasScrollDiff =\n scrollHeight - clientHeight > MinScrollHeightToCollapse;\n const isAtTop = virtuosoScrollEvent.scrollState.y === 0;\n\n if (isCollapsedView) {\n if (isAtTop && hasScrollDiff) {\n setIsCollapsedView(false);\n }\n return;\n }\n\n // NOT collapsed\n if (!hasScrollDiff) {\n return;\n }\n\n setIsCollapsedView(true);\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, 200),\n []\n );\n\n return (\n \n {children}\n \n );\n};\n","import { Row } from '@tanstack/react-table';\nimport { useRef } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useKeyPress } from 'src/hooks/useKeyPress';\nimport { isInFullPageEventView } from 'src/utils/deepLinkUtils';\n\nexport const useSingleTableShortcutSelection = ({\n isSideTable,\n}: {\n isSideTable?: boolean;\n}) => {\n const { mainRoute } = useAppContext();\n const inFullPageEventView = isInFullPageEventView(mainRoute);\n\n const lastSelectedRowRefIndex = useRef(null);\n const isShiftKeyPressed = useKeyPress('Shift');\n const isCtrlKeyPressed = useKeyPress('Control');\n const isCmdKeyPressed = useKeyPress('Meta');\n\n const isCtrlOrCmdKeyPressed = isCtrlKeyPressed || isCmdKeyPressed;\n\n function updateSelectionForRowAndSubRows({\n row,\n rowId,\n newIsSelected,\n newRowSelection,\n }: {\n row: Row;\n rowId: string;\n newIsSelected: boolean;\n newRowSelection: Record;\n }) {\n newRowSelection[rowId] = newIsSelected;\n\n if (row.subRows && row.subRows.length > 0) {\n row.subRows.forEach((subRow) => {\n updateSelectionForRowAndSubRows({\n row: subRow,\n rowId: subRow.id,\n newIsSelected,\n newRowSelection,\n });\n });\n }\n }\n\n return {\n allowShiftClickSelection: inFullPageEventView && !isSideTable,\n isShiftKeyPressed,\n isCtrlOrCmdKeyPressed,\n lastSelectedRowRefIndex,\n updateSelectionForRowAndSubRows,\n };\n};\n","import { useContentContext } from 'src/contexts/ContentContext';\nimport { HorizontalTextList } from 'src/core/POS/HorizontalTextList';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { getListingNoteIcon } from 'src/utils/listingNotesUtils';\nimport { Feature, ListingNote } from 'src/WebApiController';\n\nimport * as styles from './ListingDisplay.css';\n\nexport const ListingNotesDisplay = ({\n seatTraits,\n className,\n}: {\n seatTraits: ListingNote[] | null | undefined;\n className?: string;\n}) => {\n const contentContext = useContentContext();\n const hasListingNotesAdditionalInfoFeature = useUserHasFeature(\n Feature.ListingNotesAdditionalInfo\n );\n\n if (!seatTraits?.length) {\n return null;\n }\n\n return (\n n.listingNoteText)}\n maxTextsToShowOnHover={seatTraits.length}\n />\n );\n};\n","import {\n SeatingInfo,\n SeatingInfoProps,\n} from 'src/components/common/SeatingInfo';\nimport { Content } from 'src/contexts/ContentContext';\nimport { CountBadge, Stack, StackProps } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getListingGroupItemCount } from 'src/utils/inventoryUtils';\nimport {\n Feature,\n GroupType,\n Listing,\n ListingGroup,\n} from 'src/WebApiController';\n\nimport { ListingNotesDisplay } from './ListingNotesDisplay';\n\nexport const ListingDisplay = ({\n listing,\n hideListingNotes,\n showOrgSeat,\n width,\n justifySeatingIconContent,\n}: {\n listing: Listing;\n hideListingNotes?: boolean;\n width?: 'fit' | 'full';\n justifySeatingIconContent?: StackProps['justifyContent'];\n} & Pick) => {\n const listingGroup = listing as ListingGroup;\n\n const hasIgnoreDupFeature = useUserHasFeature(Feature.IgnoreDuplicate);\n const isDuplicate =\n !!listing?.dupListingId && (!hasIgnoreDupFeature || !listing?.ignoreDup);\n\n const { seating, seatTraits } = listing;\n\n return listingGroup.isLtGrp ? (\n \n {listingGroup.groupType === GroupType.Active ? (\n \n ) : listingGroup.groupType === GroupType.Inactive ? (\n \n ) : listingGroup.groupType === GroupType.FullySold ? (\n \n ) : listingGroup.groupType === GroupType.Invisible ? (\n \n ) : (\n {listingGroup.groupName}\n )}\n {listingGroup.groupType !== GroupType.Leader && (\n \n )}\n \n ) : (\n \n \n {!hideListingNotes && seatTraits?.length ? (\n \n ) : null}\n \n );\n};\n","export const FAKE_SOLD_GROUP_ID = 'fakeSoldGroupId';\n","import { FAKE_SOLD_GROUP_ID } from 'src/components/Listings/constants';\nimport { ListingWithEvent } from 'src/tables/ListingTable/ListingTable.types';\nimport { sortSeating } from 'src/utils/tableUtils';\nimport { addMoneySameCurrency } from 'src/utils/ticketMetricUtils';\nimport {\n ActionOutboxEntityType,\n Listing,\n ListingGroup,\n ListingStatus,\n Marketplace,\n} from 'src/WebApiController';\n\nexport const createFakeListingGroup = (\n listings: ListingWithEvent[] | undefined,\n groupName: string\n): ListingWithEvent | null => {\n const firstListingWithEvent = listings?.[0];\n const listing = firstListingWithEvent?.listing;\n\n if (!listings || !firstListingWithEvent || !listing) {\n return null;\n }\n\n const allListings: Listing[] = listings\n .map((l) => l.listing)\n .flat()\n .filter((l): l is Listing => !!l)\n .toSorted((a, b) => sortSeating(a.seating, b.seating));\n\n // @ts-ignore some fields not needed\n const listingGroup: ListingGroup = {\n id: Math.abs(listing.id) * -1,\n insertBy: '',\n rowVer: 0,\n ltGrpId: FAKE_SOLD_GROUP_ID,\n ltGrpParentId: null,\n ltGrpPrior: -1,\n ltGrpActive: false,\n poBys: [],\n isLtGrp: true,\n isFull: false,\n entityType: ActionOutboxEntityType.Listing,\n isDeleted: false,\n isUndeliv: false,\n mkp: Marketplace.StubHub,\n idOnMkp: listing.idOnMkp,\n posEvId: listing.posEvId,\n viagVirtualId: listing.viagVirtualId,\n viagEvId: listing.viagEvId,\n viagEvMapId: listing.viagEvMapId,\n availQty: 0,\n maxDispQty: 0,\n mkpListings: [],\n isSeatSaver: false,\n isNoFulfill: false,\n seating: listing.seating,\n splitType: listing.splitType,\n hideSeats: false,\n tags: [],\n seatTraits: [],\n ticketCnt: 0,\n delivType: listing.delivType,\n preDelivState: listing.preDelivState,\n unitCst: null,\n listPrice: listing.listPrice,\n allInPrice: listing.allInPrice,\n actions: [],\n status: ListingStatus.FullySold,\n currency: listing.currency,\n pricerId: '',\n isCurUserPo: listing.isCurUserPo,\n privNotes: '',\n poId: listing.poId,\n poCreatedBys: [],\n groupItems: allListings,\n groupName,\n };\n\n allListings.forEach((listing) => {\n listingGroup.ticketCnt += listing.ticketCnt;\n listingGroup.availQty += listing.availQty;\n listingGroup.maxDispQty += listing.maxDispQty;\n });\n\n const currency = allListings[0].unitCst?.currency;\n const allListingsHaveSameCurrency = allListings.every(\n (l) => l.unitCst?.currency === currency\n );\n\n if (allListingsHaveSameCurrency) {\n listingGroup.unitCst = allListings[0].unitCst;\n listingGroup.faceValue = allListings[0].faceValue;\n for (let i = 1; i < allListings.length; i++) {\n listingGroup.unitCst = addMoneySameCurrency(\n listing.unitCst,\n allListings[i].unitCst\n );\n\n listingGroup.faceValue = addMoneySameCurrency(\n listing.faceValue,\n allListings[i].faceValue\n );\n }\n }\n\n return {\n isLtGrp: true,\n event: firstListingWithEvent.event,\n listing: listingGroup,\n };\n};\n","import { SortingState } from '@tanstack/react-table';\nimport { createContext, useContext, useState } from 'react';\n\nexport type IActiveSortTableColumnContext = {\n activeSortTableColumn?: SortingState;\n setActiveSortTableColumn: (val: SortingState) => void;\n};\n\nexport const CreateActiveSortTableColumnContext =\n createContext({\n setActiveSortTableColumn: () => {},\n });\n\nexport const useActiveSortTableColumnContext = () =>\n useContext(CreateActiveSortTableColumnContext);\n\nexport const ActiveSortTableColumnProvider = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\n const [activeSortTableColumn, setActiveSortTableColumn] =\n useState();\n\n return (\n \n {children}\n \n );\n};\n","export enum PurchasesTableColumnId {\n Checkbox = 'checkbox',\n AccordianToggle = 'accordianToggle',\n Id = 'id',\n BuyerUserId = 'buyerUserId',\n VendorOrderId = 'vendorOrderId',\n PurchaseDate = 'purchaseDate',\n Cost = 'cost',\n Payment = 'payment',\n PaymentStatus = 'paymentStatus',\n QualityControlState = 'qualityControlState',\n Orders = 'orders',\n VendorAccountEmail = 'vendorAccountEmail',\n CreatedBy = 'createdBy',\n // Columns usable by single ticket group\n Event = 'event',\n Venue = 'venue',\n EventDate = 'eventDate',\n Seating = 'seating',\n Row = 'row',\n Seats = 'seats',\n SeatTraits = 'seatTraits',\n Tickets = 'tickets',\n Shipment = 'shipment',\n TotalCost = 'totalCost',\n UnitCost = 'unitCost',\n Actions = 'actions',\n TotalPayment = 'totalPayment',\n TotalConvertedPayment = 'totalConvertedPayment',\n PaymentConversionRate = 'paymentConversionRate',\n Commissions = 'commissions',\n}\n\nexport enum PurchaseTableColumnGroupId {\n TicketGroup = 'ticketGroup',\n}\n","export enum SalesTableColumnId {\n // Not Configurable\n Checkbox = 'checkbox',\n // Configurable\n Seating = 'seating',\n Row = 'row',\n Seats = 'seats',\n QuantitySold = 'quantitySold',\n OrderDate = 'orderDate',\n InHandDate = 'inHandDate',\n Status = 'status',\n TicketType = 'ticketType',\n Proceeds = 'proceeds',\n Sale = 'sale',\n Actions = 'actions',\n // Default Visibility Off (optional columns)\n SoldTicketCost = 'soldTicketCost',\n Charges = 'charges',\n Credits = 'credits',\n PandL = 'PandL',\n Margin = 'margin',\n PurchaseCreatedBy = 'purchaseCreatedBy',\n PurchasedBy = 'purchasedBy',\n PaymentState = 'paymentState',\n PaymentReceived = 'paymentReceived',\n PaymentReferenceId = 'paymentReferenceId',\n FulfillmentDate = 'fulfillmentDate',\n AutoFulfill = 'autoFulfill',\n PurchaseDate = 'purchaseDate',\n VendorOrderId = 'vendorOrderId',\n VendorAccountEmail = 'vendorAccountEmail',\n OriginatedBy = 'originatedBy',\n TotalPaymentsAmount = 'totalPaymentsAmount',\n TotalConvertedPaymentsAmount = 'totalConvertedPaymentsAmount',\n WastedQuantity = 'wastedQuantity',\n}\n\nexport enum SalesTableFlattenedColumnId {\n Event = 'Event',\n Venue = 'Venue',\n Location = 'Location',\n EventDate = 'Date',\n}\n\nexport enum SalesReportTableColumnId {\n // Group by types\n Performer = 'performer',\n Venue = 'venue',\n Event = 'event',\n EventGenre = 'eventGenre',\n EventCountry = 'eventCountry',\n EventCity = 'eventCity',\n SeatingSection = 'seatingSection',\n SeatingRow = 'seatingRow',\n SaleMarketplace = 'saleMarketplace',\n SaleMonth = 'saleMonth',\n SaleWeek = 'saleWeek',\n SaleDay = 'saleDay',\n // Configurable - shared precision with ListingTableColumnId\n QuantitySold = SalesTableColumnId.QuantitySold,\n Proceeds = SalesTableColumnId.Proceeds,\n SoldTicketCost = SalesTableColumnId.SoldTicketCost,\n Charges = SalesTableColumnId.Charges,\n Credits = SalesTableColumnId.Credits,\n // Auxiliary columns - neither metrics nor primary dimensions\n EventId = 'eventId',\n Category = 'category',\n EventDate = 'eventDate',\n EventStateProvince = 'eventStateProvince',\n SaleId = 'saleId',\n MarketplaceSaleId = 'marketplaceSaleId',\n Status = SalesTableColumnId.Status,\n TicketType = SalesTableColumnId.TicketType,\n InHandDate = SalesTableColumnId.InHandDate,\n Fulfiller = 'fulfiller',\n PurchaseId = 'purchaseId',\n PurchasedBy = 'purchasedBy',\n PurchaseDate = SalesTableColumnId.PurchaseDate,\n Vendor = 'vendor',\n SeatingSeats = 'seatingSeats',\n OrderDate = SalesTableColumnId.OrderDate,\n PricedBy = 'pricedBy',\n CurrencyCode = 'currencyCode',\n PaymentDate = 'paymentDate',\n FulfillmentDate = SalesTableColumnId.FulfillmentDate,\n PurchaseCreatedBy = SalesTableColumnId.PurchaseCreatedBy,\n PaymentState = SalesTableColumnId.PaymentState,\n PaymentReceived = SalesTableColumnId.PaymentReceived,\n PaymentReferenceId = SalesTableColumnId.PaymentReferenceId,\n VendorAccountEmail = SalesTableColumnId.VendorAccountEmail,\n InternalNotes = 'internalNotes',\n CancellationDate = 'cancellationDate',\n OutstandingBalance = 'outstandingBalance',\n PandL = SalesTableColumnId.PandL,\n Margin = SalesTableColumnId.Margin,\n TicketId = 'ticketId',\n TicketGroupId = 'ticketGroupId',\n CommissionUser = 'commissionUser',\n CommissionPercent = 'commissionPercent',\n CommissionShare = 'commissionShare',\n MarketplacePaymentTerms = 'marketplacePaymentTerms',\n}\n\n// Subset of ReportSalesColumnName from ReportingService\nexport enum SalesReportTableGroupingColumnId {\n PerformerName = 'performerName',\n VenueName = 'venueName',\n EventName = 'eventName',\n TopLevelCategoryName = 'topLevelCategoryName',\n CountryName = 'countryName',\n CityName = 'cityName',\n Section = 'section',\n SeatingRow = 'seatingRow',\n SeatFrom = 'seatFrom',\n SeatTo = 'seatTo',\n EventId = 'eventId',\n LocalEventDateTime = 'localEventDateTime',\n StateProvince = 'stateProvince',\n SaleId = 'saleId',\n InternalNotes = 'internalNotes',\n SaleDate = 'saleDate',\n SaleStatusName = 'saleStatusName',\n PaymentReferenceId = 'paymentReferenceId',\n TicketTypeName = 'ticketTypeName',\n InHandDate = 'inHandDate',\n LastPaymentDate = 'lastPaymentDate',\n CancellationDate = 'cancellationDate',\n FulfillerSellerUserId = 'fulfillerSellerUserId',\n FulfillmentDate = 'fulfillmentDate',\n MarketplacePaymentStateName = 'marketplacePaymentStateName',\n MarketplaceName = 'marketplaceName',\n MarketplaceSaleId = 'marketplaceSaleId',\n IsSeatSaver = 'isSeatSaver',\n IsNoFulfill = 'isNoFulfill',\n SaleWeek = 'saleWeek',\n SaleMonth = 'saleMonth',\n SaleDay = 'saleDay',\n}\n\nexport enum SalesReportTableValueColumnId {\n QuantitySold = 'quantitySold',\n TotalNetProceeds = 'totalNetProceeds',\n Charges = 'charges',\n Credits = 'credits',\n OutstandingBalance = 'outstandingBalance',\n PandL = 'PandL',\n TotalCost = 'totalCost',\n Margin = 'margin',\n}\n","import {\n ListingReportTableColumnId,\n ListingTableColumnId,\n ListingTableFlattenedColumnId,\n} from 'src/utils/columns/inventory/inventoryColumnUtils.types';\nimport { PurchasesTableColumnId } from 'src/utils/columns/purchases/purchasesColumnUtils.types';\nimport {\n SalesTableColumnId,\n SalesTableFlattenedColumnId,\n} from 'src/utils/columns/sales/salesColumnUtils.types';\n\nimport {\n FormatOption,\n FormatOption_DateTime,\n FormatOption_EnumDisplay,\n FormatOption_Event,\n FormatOption_HiddenCustomFormat,\n FormatOption_Percent,\n FormatOption_Seating,\n FormatOption_Standard,\n FormatOptionType,\n} from './EditTableColumns.constants';\nimport {\n GenerateFormatOptionDisplayString,\n GetDefaultFormatOption,\n} from './EditTableColumns.types';\n\nexport const getFormatOptionType = (option: FormatOption): FormatOptionType => {\n if (Object.values(FormatOption_Standard).includes(option)) {\n return FormatOptionType.Standard;\n }\n if (Object.values(FormatOption_Seating).includes(option)) {\n return FormatOptionType.Seating;\n }\n if (Object.values(FormatOption_Event).includes(option)) {\n return FormatOptionType.Event;\n }\n if (Object.values(FormatOption_DateTime).includes(option)) {\n return FormatOptionType.DateTime;\n }\n if (Object.values(FormatOption_EnumDisplay).includes(option)) {\n return FormatOptionType.EnumDisplay;\n }\n if (Object.values(FormatOption_Percent).includes(option)) {\n return FormatOptionType.Percentage;\n }\n // Default case\n return FormatOptionType.Standard;\n};\n\n/**\n * EnumDisplay and Seating are localized text, thus can't be defined here\n */\nexport const FORMAT_OPTION_TO_DISPLAY_MAP: Omit<\n Record,\n | FormatOption_EnumDisplay\n | FormatOption_Seating\n | FormatOption_Event\n | FormatOption_HiddenCustomFormat\n> = {\n [FormatOption.Millions]: '0.1M',\n [FormatOption.Thousands]: '100K',\n [FormatOption.Whole]: '100,000',\n [FormatOption.Precise]: '100,000.43',\n [FormatOption.DateTime_MMDD]: 'MM/DD',\n [FormatOption.DateTime_MMDD_Time]: 'MM/DD Time',\n [FormatOption.DateTime_MMDD_Time_Day]: 'MM/DD Time, Day',\n [FormatOption.DateTime_MonthDD]: 'Month DD',\n [FormatOption.DateTime_MonthDD_Time]: 'Month DD, Time',\n [FormatOption.DateTime_MonthDD_Time_Day]: 'Month DD, Time, Day',\n [FormatOption.DateTime_MMDDYY]: 'MM/DD/YY',\n [FormatOption.DateTime_Month_DD_YY]: 'Month DD YY',\n [FormatOption.DateTime_Month_DD_YY_Time]: 'Month DD YY, Time',\n [FormatOption.DateTime_Month_DD_YY_Time_Day]: 'Month DD YY, Time, Day',\n [FormatOption.Percent_RoundToTwo]: '43.42',\n [FormatOption.Percent_RoundToOne]: '43.2',\n [FormatOption.Percent_RoundToWhole]: '43',\n [FormatOption.Percent_AsDecimal_RoundToOne]: '0.4',\n [FormatOption.Percent_AsDecimal_RoundToTwo]: '0.43',\n [FormatOption.Percent_AsDecimal_RoundToThree]: '0.434',\n};\n\n/**\n * Takes the flags and parameters to generate the content that should be rendered on\n * a FormatOptionPill (usually)\n */\nexport const generateFormatOptionDisplayString: GenerateFormatOptionDisplayString =\n ({ localizedText, option, isPercent, isCurrency, uiCurrency }) => {\n const {\n originalSeating,\n fullSeating,\n sectionOnly,\n fullEventInfo,\n eventName,\n icon,\n text,\n } = localizedText;\n const shouldShowPercent =\n isPercent &&\n !isCurrency &&\n !(\n [\n FormatOption.Percent_AsDecimal_RoundToOne,\n FormatOption.Percent_AsDecimal_RoundToTwo,\n FormatOption.Percent_AsDecimal_RoundToThree,\n ] as string[]\n ).includes(option);\n\n const contentDisplayMap: Record = {\n ...FORMAT_OPTION_TO_DISPLAY_MAP,\n [FormatOption.Seating_OriginalSeating]: originalSeating,\n [FormatOption.Seating_FullSeating]: fullSeating,\n [FormatOption.Seating_SectionOnly]: sectionOnly,\n [FormatOption.Event_FullInfo]: fullEventInfo,\n [FormatOption.Event_EventName]: eventName,\n [FormatOption.EnumDisplay_Icon]: icon,\n [FormatOption.EnumDisplay_Text]: text,\n [FormatOption.Actions_LinkOnly]: '', // We do not expose this\n [FormatOption.Id_RawIdOnly]: '', // We do not expose this\n };\n\n // Currency will win if both isCurrency and isPercent being set\n const currencyContent = isCurrency ? uiCurrency.sym : '';\n // We add fallback in case we no longer support an enum or change its value\n const displayContent =\n contentDisplayMap[option] ?? contentDisplayMap[FormatOption.Precise];\n // Percent will only display if isCurrency is not set\n const percentContent = shouldShowPercent ? '%' : '';\n\n const textContent = `${currencyContent}${displayContent}${percentContent}`;\n\n return textContent;\n };\n\nexport const LISTING_TABLE_COLUMN_DEFAULT_PRECISION: Record<\n string,\n FormatOption\n> = {\n [ListingTableColumnId.Seating]: FormatOption.Seating_FullSeating,\n [ListingTableColumnId.SeatingSeats]: FormatOption.Seating_FullSeating,\n [ListingTableFlattenedColumnId.Event]: FormatOption.Event_FullInfo,\n [ListingTableColumnId.DeliveryType]: FormatOption.EnumDisplay_Icon,\n [ListingTableColumnId.UndercutMode]: FormatOption.EnumDisplay_Text,\n [ListingTableColumnId.CompListingMode]: FormatOption.EnumDisplay_Text,\n [ListingReportTableColumnId.PaymentMethodType]: FormatOption.EnumDisplay_Icon,\n};\n\nexport const LISTING_FLATTENED_TABLE_COLUMN_DEFAULT_PRECISION: Record<\n string,\n FormatOption\n> = {\n [ListingTableColumnId.DeliveryType]: FormatOption.EnumDisplay_Text,\n};\n\nexport const SALE_TABLE_COLUMN_DEFAULT_PRECISION: Record =\n {\n [SalesTableColumnId.Seating]: FormatOption.Seating_FullSeating,\n [SalesTableFlattenedColumnId.Event]: FormatOption.Event_FullInfo,\n [SalesTableColumnId.Status]: FormatOption.EnumDisplay_Text,\n [SalesTableColumnId.TicketType]: FormatOption.EnumDisplay_Icon,\n [SalesTableColumnId.OrderDate]: FormatOption.DateTime_MonthDD_Time,\n };\n\nexport const SALE_FLATTENED_TABLE_COLUMN_DEFAULT_PRECISION: Record<\n string,\n FormatOption\n> = {\n [SalesTableColumnId.Status]: FormatOption.EnumDisplay_Text,\n [SalesTableColumnId.TicketType]: FormatOption.EnumDisplay_Text,\n};\n\nexport const getDefaultFormatOption: GetDefaultFormatOption = ({\n isSeating,\n isEvent,\n isEnumWithIcon,\n isInteger,\n isDateTime,\n isPercent,\n}) => {\n return isSeating\n ? FormatOption.Seating_FullSeating\n : isEvent\n ? FormatOption.Event_FullInfo\n : isEnumWithIcon\n ? FormatOption.EnumDisplay_Icon\n : isDateTime\n ? FormatOption.DateTime_MonthDD_Time\n : isPercent\n ? FormatOption.Percent_AsDecimal_RoundToTwo\n : isInteger\n ? FormatOption.Whole\n : FormatOption.Precise;\n};\n\nexport const PURCHASES_EVENT_TABLE_COLUMN_DEFAULT_PRECISION: Record<\n string,\n FormatOption\n> = {\n [PurchasesTableColumnId.PurchaseDate]: FormatOption.DateTime_MonthDD_Time_Day,\n};\n","import { ActionOutboxEntityType, UserSetting } from 'src/WebApiController';\n\nexport const enum SectionType {\n Sales = 'sales',\n Listings = 'listings',\n SalesReport = 'salesReport',\n ListingsReport = 'listingsReport',\n Events = 'events',\n ListingsFlattened = 'ListingsFlattened',\n SalesFlattened = 'SalesFlattened',\n Purchases = 'purchases',\n PurchaseEvent = 'purchaseEvent',\n SalesSideTable = 'salesSideTable',\n InventorySideTable = 'inventorySideTable',\n PurchaseSideTable = 'purchaseSideTable',\n MarketplacePaymentsTable = 'marketplacePaymentsTable',\n OnSaleEvents = 'discoveryTable',\n}\n\nexport const SECTION_TYPE_TO_CUSTOM_COLUMN_SETTING: Record<\n SectionType,\n UserSetting\n> = {\n [SectionType.Listings]: UserSetting.InventoryCustomColumns,\n [SectionType.ListingsFlattened]: UserSetting.InventoryCustomColumns,\n [SectionType.ListingsReport]: UserSetting.InventoryCustomColumns,\n [SectionType.Sales]: UserSetting.SaleCustomColumns,\n [SectionType.SalesFlattened]: UserSetting.SaleCustomColumns,\n [SectionType.SalesReport]: UserSetting.SaleCustomColumns,\n [SectionType.Events]: UserSetting.EventsCustomColumns,\n [SectionType.Purchases]: UserSetting.PurchaseCustomColumns,\n [SectionType.PurchaseEvent]: UserSetting.PurchaseCustomColumns,\n [SectionType.SalesSideTable]: UserSetting.SaleCustomColumns,\n [SectionType.InventorySideTable]: UserSetting.InventoryCustomColumns,\n [SectionType.PurchaseSideTable]: UserSetting.PurchaseCustomColumns,\n [SectionType.MarketplacePaymentsTable]:\n UserSetting.MarketplacePaymentsCustomColumns,\n [SectionType.OnSaleEvents]: UserSetting.OnSaleEventCustomColumns,\n} as const;\n\nexport const SECTION_TYPE_TO_PRECISION_SETTING: Record<\n SectionType,\n UserSetting\n> = {\n [SectionType.Listings]: UserSetting.InventoryColumnNumberPrecision,\n [SectionType.ListingsFlattened]:\n UserSetting.InventoryFlattenedColumnNumberPrecision,\n [SectionType.Events]: UserSetting.EventsColumnNumberPrecision,\n [SectionType.Sales]: UserSetting.SaleColumnNumberPrecision,\n [SectionType.SalesFlattened]: UserSetting.SaleFlattenedColumnNumberPrecision,\n [SectionType.ListingsReport]: UserSetting.InventoryColumnNumberPrecision,\n [SectionType.SalesReport]: UserSetting.SaleColumnNumberPrecision,\n [SectionType.Purchases]: UserSetting.PurchaseColumnNumberPrecision,\n [SectionType.PurchaseEvent]: UserSetting.PurchaseEventColumnNumberPrecision,\n [SectionType.SalesSideTable]: UserSetting.SalesSideTableColumnNumberPrecision,\n [SectionType.InventorySideTable]:\n UserSetting.InventorySideTableColumnNumberPrecision,\n [SectionType.PurchaseSideTable]:\n UserSetting.PurchaseSideTableColumnNumberPrecision,\n [SectionType.MarketplacePaymentsTable]:\n UserSetting.MarketplacePaymentsColumnNumberPrecision,\n [SectionType.OnSaleEvents]: UserSetting.OnSaleEventColumnNumberPrecision,\n};\n\nexport const SECTION_TYPE_TO_COLUMN_EDITABILITY_SETTING: Record<\n SectionType,\n UserSetting\n> = {\n [SectionType.Listings]: UserSetting.InventoryColumnEditability,\n [SectionType.ListingsFlattened]:\n UserSetting.InventoryFlattenedColumnEditability,\n [SectionType.Events]: UserSetting.EventsColumnEditability,\n [SectionType.Sales]: UserSetting.SaleColumnEditability,\n [SectionType.SalesFlattened]: UserSetting.SaleFlattenedColumnEditability,\n [SectionType.ListingsReport]: UserSetting.InventoryFlattenedColumnEditability,\n [SectionType.SalesReport]: UserSetting.SaleColumnEditability,\n [SectionType.Purchases]: UserSetting.PurchaseColumnEditability,\n [SectionType.PurchaseEvent]: UserSetting.PurchaseEventColumnEditability,\n [SectionType.SalesSideTable]: UserSetting.SalesSideTableColumnEditability,\n [SectionType.InventorySideTable]:\n UserSetting.InventorySideTableColumnEditability,\n [SectionType.PurchaseSideTable]:\n UserSetting.PurchaseSideTableColumnEditability,\n [SectionType.MarketplacePaymentsTable]:\n UserSetting.MarketplacePaymentsColumnEditability,\n [SectionType.OnSaleEvents]: UserSetting.OnSaleEventColumnEditability,\n};\n\nexport const SECTION_TYPE_TO_ACTION_OUTBOX_ENTITY_TYPE = {\n [SectionType.Listings]: ActionOutboxEntityType.Listing,\n [SectionType.ListingsFlattened]: ActionOutboxEntityType.Listing,\n [SectionType.ListingsReport]: ActionOutboxEntityType.Listing,\n [SectionType.Events]: ActionOutboxEntityType.SellerEvent,\n [SectionType.Purchases]: ActionOutboxEntityType.Purchase,\n [SectionType.PurchaseEvent]: ActionOutboxEntityType.Purchase,\n [SectionType.Sales]: ActionOutboxEntityType.Sale,\n [SectionType.SalesFlattened]: ActionOutboxEntityType.Sale,\n [SectionType.SalesReport]: ActionOutboxEntityType.Sale,\n [SectionType.SalesSideTable]: ActionOutboxEntityType.Sale,\n [SectionType.InventorySideTable]: ActionOutboxEntityType.Listing,\n [SectionType.PurchaseSideTable]: ActionOutboxEntityType.Purchase,\n [SectionType.MarketplacePaymentsTable]: undefined,\n [SectionType.OnSaleEvents]: undefined,\n} as const;\n","import clsx from 'clsx';\nimport { Button } from 'src/core/ui';\n\nimport * as styles from './FormatOptionPill.css';\nimport { FormatOptionPillBaseProps } from './FormatOptionPill.types';\n\n/**\n * FormatOptionPill Presentational Layer\n */\nexport const FormatOptionPillBase = ({\n onClick,\n isDisabled,\n onPointerDown,\n content,\n isSelected,\n}: FormatOptionPillBaseProps) => {\n return (\n \n {content}\n \n );\n};\n","import { useCallback, useMemo, useState } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { PosDropdown, PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { vars } from 'src/core/themes';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport { CheckIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { getColumnConfigById } from 'src/utils/columns/columnUtils';\nimport {\n ListingTableColumnId,\n ListingTableFlattenedColumnId,\n} from 'src/utils/columns/inventory/inventoryColumnUtils.types';\nimport { PurchasesTableColumnId } from 'src/utils/columns/purchases/purchasesColumnUtils.types';\nimport {\n SalesTableColumnId,\n SalesTableFlattenedColumnId,\n} from 'src/utils/columns/sales/salesColumnUtils.types';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n SECTION_TYPE_TO_CUSTOM_COLUMN_SETTING,\n SectionType,\n} from 'src/utils/types/sectionType';\nimport { Feature } from 'src/WebApiController';\n\nimport {\n FormatOption,\n FormatOption_DateTime,\n FormatOption_EnumDisplay,\n FormatOption_Event,\n FormatOption_Percent,\n FormatOption_Seating,\n FormatOption_Standard,\n} from '../EditTableColumns.constants';\nimport {\n generateFormatOptionDisplayString,\n getDefaultFormatOption,\n} from '../EditTableColumns.util';\nimport {\n CustomColumn,\n FormatDisplayOption,\n FormatOptionPillSelectProps,\n} from './FormatOptionPill.types';\n\nexport const FormatOptionPillSelect = ({\n id,\n initialValue,\n onSave,\n sectionType,\n trigger,\n}: FormatOptionPillSelectProps) => {\n const hasViewListingOriginalSeatingFeature = useUserHasFeature(\n Feature.ViewListingOriginalSeating\n );\n const originalSeating = useContent(ContentId.OriginalSeating);\n const fullSeating = useContent(\n (sectionType === SectionType.Listings ||\n sectionType === SectionType.ListingsFlattened) &&\n hasViewListingOriginalSeatingFeature\n ? ContentId.RemainingSeatingOnly\n : ContentId.FullSeating\n );\n const sectionOnly = useContent(ContentId.SectionOnly);\n const fullEventInfo = useContent(ContentId.FullEventInfo);\n const eventName = useContent(ContentId.EventName);\n const icon = useContent(ContentId.Icon);\n const text = useContent(ContentId.Text);\n const { loginContext } = useAppContext();\n const { getUiCurrency } = useLocalizationContext();\n\n const uiCurrency = getUiCurrency(\n loginContext?.user?.activeAccount.currencyCode\n );\n\n const { value: customColumns = [] } = useServerUserSetting({\n id: SECTION_TYPE_TO_CUSTOM_COLUMN_SETTING[sectionType],\n });\n\n const columnConfig = getColumnConfigById({ id, customColumns, sectionType });\n const { isCurrency, isPercent, isEnumWithIcon, isDateTime, isInteger } =\n columnConfig.personalization;\n const defaultFormatOption = getDefaultFormatOption({\n isEnumWithIcon,\n isInteger,\n isSeating:\n id === ListingTableColumnId.Seating ||\n id === SalesTableColumnId.Seating ||\n id === PurchasesTableColumnId.Seating,\n isEvent:\n id === ListingTableFlattenedColumnId.Event ||\n id === SalesTableFlattenedColumnId.Event,\n isDateTime,\n isPercent,\n });\n\n const [selectedPrecision, setSelectedPrecision] = useState(\n initialValue ?? defaultFormatOption\n );\n\n const addToOptions = useCallback(\n (formatOptions: FormatOption[]) =>\n formatOptions.map((option) => ({\n option,\n isCurrency,\n isPercent,\n onClick: () => setSelectedPrecision(option),\n })),\n [isCurrency, isPercent]\n );\n\n const options: FormatDisplayOption[] = useMemo(() => {\n if (\n id === ListingTableColumnId.Seating ||\n id === SalesTableColumnId.Seating ||\n id === PurchasesTableColumnId.Seating\n ) {\n // Handle Seating\n return addToOptions(\n Object.values(FormatOption_Seating).filter(\n (v) =>\n !(\n v === FormatOption_Seating.Seating_OriginalSeating &&\n ((sectionType !== SectionType.Listings &&\n sectionType !== SectionType.ListingsFlattened) ||\n !hasViewListingOriginalSeatingFeature)\n )\n )\n );\n } else if (id === ListingTableColumnId.SeatingSeats) {\n // Handle SeatingSeats\n return addToOptions(\n Object.values(FormatOption_Seating).filter(\n (v) => !(v === FormatOption_Seating.Seating_SectionOnly)\n )\n );\n } else if (\n id === ListingTableFlattenedColumnId.Event ||\n id === SalesTableFlattenedColumnId.Event\n ) {\n // Handle Event\n return addToOptions(Object.values(FormatOption_Event));\n } else if (isDateTime) {\n // Handle DateTime\n return addToOptions(Object.values(FormatOption_DateTime));\n } else if (isEnumWithIcon) {\n // Handle EnumDisplay\n return addToOptions(Object.values(FormatOption_EnumDisplay));\n } else if (isPercent) {\n // Handle Percentage\n return addToOptions(Object.values(FormatOption_Percent));\n } else {\n // Handle Numeric\n const standardOptions = Object.values(FormatOption_Standard);\n return addToOptions(\n isInteger\n ? standardOptions.filter(\n (option) => option !== FormatOption_Standard.Precise\n )\n : standardOptions\n );\n }\n }, [\n addToOptions,\n hasViewListingOriginalSeatingFeature,\n id,\n isDateTime,\n isEnumWithIcon,\n isInteger,\n isPercent,\n sectionType,\n ]);\n\n return (\n \n {options.map((item) => {\n const { isCurrency, isPercent, option, onClick } = item;\n const isSelected = selectedPrecision === option;\n const textContent = generateFormatOptionDisplayString({\n localizedText: {\n originalSeating,\n fullSeating,\n sectionOnly,\n fullEventInfo,\n eventName,\n icon,\n text,\n },\n uiCurrency,\n isCurrency,\n isPercent,\n option,\n });\n return (\n {\n e.preventDefault();\n e.stopPropagation();\n onSave(id, option);\n if (onClick) {\n onClick();\n }\n }}\n >\n {textContent}\n {isSelected && (\n \n )}\n \n );\n })}\n \n );\n};\n","import { MouseEvent } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { vars } from 'src/core/themes';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ExpandIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport { Feature } from 'src/WebApiController';\n\nimport { FormatOption } from '../EditTableColumns.constants';\nimport { generateFormatOptionDisplayString } from '../EditTableColumns.util';\nimport { FormatOptionPillBase } from './FormatOptionPill.base';\nimport { FormatOptionPillSelect } from './FormatOptionPill.select';\nimport type {\n FormatOptionPillContainerProps,\n SelectableFormatOptionPillContainerProps,\n} from './FormatOptionPill.types';\n\nexport const FormatOptionPillContainer = (\n props:\n | FormatOptionPillContainerProps\n | SelectableFormatOptionPillContainerProps\n) => {\n const hasViewListingOriginalSeatingFeature = useUserHasFeature(\n Feature.ViewListingOriginalSeating\n );\n const {\n flags = {},\n isSelectable,\n option = flags.isDateTime\n ? FormatOption.DateTime_MonthDD_Time\n : FormatOption.Precise,\n ...rest\n } = props;\n\n let id: string | undefined;\n let onSave: ((id: string, precision: FormatOption) => void) | undefined;\n let sectionType: SectionType | undefined;\n const { isCurrency, isPercent } = flags;\n\n const originalSeating = useContent(ContentId.OriginalSeating);\n const fullSeating = useContent(\n (props.sectionType === SectionType.Listings ||\n props.sectionType === SectionType.ListingsFlattened) &&\n hasViewListingOriginalSeatingFeature\n ? ContentId.RemainingSeatingOnly\n : ContentId.FullSeating\n );\n const sectionOnly = useContent(ContentId.SectionOnly);\n const fullEventInfo = useContent(ContentId.FullEventInfo);\n const eventName = useContent(ContentId.EventName);\n const icon = useContent(ContentId.Icon);\n const text = useContent(ContentId.Text);\n const { loginContext } = useAppContext();\n const { getUiCurrency } = useLocalizationContext();\n\n const uiCurrency = getUiCurrency(\n loginContext?.user?.activeAccount.currencyCode\n );\n\n const textContent = generateFormatOptionDisplayString({\n localizedText: {\n originalSeating,\n fullSeating,\n sectionOnly,\n fullEventInfo,\n eventName,\n icon,\n text,\n },\n uiCurrency,\n isCurrency,\n isPercent,\n option,\n });\n\n const onPointerDownHandler = (e: MouseEvent) => e.stopPropagation();\n\n const formatOptionPillBase = (\n \n {textContent}\n \n \n ) : (\n textContent\n )\n }\n {...rest}\n />\n );\n\n if (isSelectable) {\n id = props.id;\n onSave = props.onSave;\n sectionType = props.sectionType;\n }\n\n if (!isSelectable || !id || !onSave || !sectionType)\n return formatOptionPillBase;\n\n return (\n \n );\n};\n","import {\n Event,\n OnSaleEventMetrics,\n Performer,\n Venue,\n} from 'src/WebApiController';\n\nexport type OnSaleEventWithMetrics = {\n event: Event;\n performer?: Performer;\n venue?: Venue;\n metrics?: OnSaleEventMetrics;\n};\n\nexport enum OnSaleEventsTableColumnId {\n Checkbox = 'checkbox',\n Event = 'event',\n Venue = 'venue',\n Location = 'location',\n OnSaleDate = 'onSaleDate',\n Date = 'date',\n RawPreSaleDate = 'rawPreSaleDate',\n ListingCount = 'listingCount',\n TicketCount = 'ticketCount',\n UnitNetProceedsMin = 'unitNetProceedsMin',\n UnitNetProceedsP25 = 'unitNetProceedsP25',\n UnitNetProceedsP50 = 'unitNetProceedsP50',\n VisitsLastHour = 'visitsLastHour',\n VisitsLastDay = 'visitsLastDay',\n VisitsLast3Days = 'visitsLast3Days',\n VisitsLast7Days = 'visitsLast7Days',\n TransactionsLastHour = 'transactionsLastHour',\n TransactionsLastDay = 'transactionsLastDay',\n TransactionsLast3Days = 'transactionsLast3Days',\n TransactionsLast7Days = 'transactionsLast7Days',\n Action = 'action',\n}\n","export enum EventsTableColumnId {\n Checkbox = 'checkbox',\n Event = 'event',\n Venue = 'venue',\n Location = 'location',\n Date = 'date',\n TotalQty = 'totalQty',\n SoldQty = 'soldQty',\n ActualSTR = 'actualSTR',\n Revenue = 'revenue',\n SoldCost = 'soldCost',\n Profit = 'profit',\n LiftPercentage = 'liftpercentage',\n ATP = 'atp',\n ListedQty = 'listedQty',\n ListedAtp = 'listedAtp',\n UnsoldQty = 'unsoldQty',\n Action = 'action',\n UnsoldProceeds = 'unsoldProceeds',\n UnsoldCost = 'unsoldCost',\n TotalCost = 'totalCost',\n LastPriceUpdatedDate = 'lastPriceUpdatedDate',\n}\n","import { OnSaleEventsTableColumnId } from 'src/navigations/Routes/OnSaleEvent/OnSaleEventView.types';\n\nimport { ColumnPersonalizationFlags } from '../columnUtils.types';\nimport { EventsTableColumnId } from './eventsColumnUtils.types';\n\nexport const EVENTS_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES: Record<\n EventsTableColumnId,\n Partial\n> = {\n [EventsTableColumnId.Checkbox]: { isConfigurable: false },\n [EventsTableColumnId.ATP]: { isNumeric: true, isCurrency: true },\n [EventsTableColumnId.Action]: { isConfigurable: false, isRequired: true },\n [EventsTableColumnId.ActualSTR]: { isNumeric: true, isPercent: true },\n [EventsTableColumnId.Date]: { isDateTime: true },\n [EventsTableColumnId.Event]: { isHiddenByDefault: false },\n [EventsTableColumnId.Venue]: { isHiddenByDefault: false },\n [EventsTableColumnId.Location]: {},\n [EventsTableColumnId.LiftPercentage]: { isNumeric: true, isPercent: true },\n [EventsTableColumnId.ListedAtp]: { isNumeric: true, isCurrency: true },\n [EventsTableColumnId.ListedQty]: { isNumeric: true, isInteger: true },\n [EventsTableColumnId.Profit]: { isNumeric: true, isCurrency: true },\n [EventsTableColumnId.Revenue]: { isNumeric: true, isCurrency: true },\n [EventsTableColumnId.SoldCost]: { isNumeric: true, isCurrency: true },\n [EventsTableColumnId.SoldQty]: { isNumeric: true, isInteger: true },\n [EventsTableColumnId.TotalQty]: { isNumeric: true, isInteger: true },\n [EventsTableColumnId.UnsoldQty]: { isNumeric: true, isInteger: true },\n [EventsTableColumnId.UnsoldProceeds]: { isNumeric: true, isCurrency: true },\n [EventsTableColumnId.UnsoldCost]: { isNumeric: true, isCurrency: true },\n [EventsTableColumnId.TotalCost]: { isNumeric: true, isCurrency: true },\n [EventsTableColumnId.LastPriceUpdatedDate]: {\n isHiddenByDefault: true,\n isDateTime: true,\n },\n};\n\nexport const ON_SALE_EVENTS_TABLE_CUSTOM_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES: Record<\n OnSaleEventsTableColumnId,\n Partial\n> = {\n [OnSaleEventsTableColumnId.Checkbox]: { isConfigurable: false },\n [OnSaleEventsTableColumnId.Event]: {\n isHiddenByDefault: false,\n isConfigurable: false,\n isRequired: true,\n },\n [OnSaleEventsTableColumnId.Venue]: {\n isHiddenByDefault: false,\n isConfigurable: false,\n isRequired: true,\n },\n [OnSaleEventsTableColumnId.Location]: {\n isConfigurable: false,\n isRequired: true,\n },\n [OnSaleEventsTableColumnId.OnSaleDate]: {\n isDateTime: true,\n isConfigurable: true,\n isRequired: true,\n },\n [OnSaleEventsTableColumnId.RawPreSaleDate]: {\n isDateTime: true,\n isConfigurable: true,\n isHiddenByDefault: true,\n },\n [OnSaleEventsTableColumnId.Date]: {\n isDateTime: true,\n isConfigurable: true,\n isRequired: true,\n },\n [OnSaleEventsTableColumnId.ListingCount]: {\n isNumeric: true,\n isInteger: true,\n isConfigurable: true,\n },\n [OnSaleEventsTableColumnId.TicketCount]: {\n isNumeric: true,\n isInteger: true,\n isConfigurable: true,\n },\n [OnSaleEventsTableColumnId.VisitsLastHour]: {\n isNumeric: true,\n isInteger: true,\n isConfigurable: true,\n },\n [OnSaleEventsTableColumnId.VisitsLastDay]: {\n isNumeric: true,\n isInteger: true,\n isConfigurable: true,\n },\n [OnSaleEventsTableColumnId.VisitsLast7Days]: {\n isNumeric: true,\n isInteger: true,\n isConfigurable: true,\n },\n [OnSaleEventsTableColumnId.VisitsLast3Days]: {\n isNumeric: true,\n isInteger: true,\n isConfigurable: true,\n },\n [OnSaleEventsTableColumnId.TransactionsLastHour]: {\n isNumeric: true,\n isInteger: true,\n isConfigurable: true,\n },\n [OnSaleEventsTableColumnId.TransactionsLastDay]: {\n isNumeric: true,\n isInteger: true,\n isConfigurable: true,\n },\n [OnSaleEventsTableColumnId.TransactionsLast7Days]: {\n isNumeric: true,\n isInteger: true,\n isConfigurable: true,\n },\n [OnSaleEventsTableColumnId.TransactionsLast3Days]: {\n isNumeric: true,\n isInteger: true,\n isConfigurable: true,\n },\n [OnSaleEventsTableColumnId.UnitNetProceedsMin]: {\n isNumeric: true,\n isCurrency: true,\n isConfigurable: true,\n },\n [OnSaleEventsTableColumnId.UnitNetProceedsP25]: {\n isNumeric: true,\n isCurrency: true,\n isConfigurable: true,\n },\n [OnSaleEventsTableColumnId.UnitNetProceedsP50]: {\n isNumeric: true,\n isCurrency: true,\n isConfigurable: true,\n },\n [OnSaleEventsTableColumnId.Action]: {\n isConfigurable: false,\n isRequired: true,\n },\n};\n","import { Feature, ReportGroupBy } from 'src/WebApiController';\n\nimport { ColumnPersonalizationFlags } from '../columnUtils.types';\nimport {\n ListingReportTableColumnId,\n ListingTableFlattenedColumnId,\n} from './inventoryColumnUtils.types';\nimport { ListingTableColumnId } from './inventoryColumnUtils.types';\n\n/**\n * List of main columns to identify a listing\n * Used for grouping listing\n */\nexport const LISTING_MAIN_COLUMNS: ListingTableColumnId[] = [\n ListingTableColumnId.Checkbox,\n ListingTableColumnId.Seating,\n ListingTableColumnId.SeatingRow,\n ListingTableColumnId.SeatingSeats,\n ListingTableColumnId.DeliveryType,\n ListingTableColumnId.ShownQuantity,\n ListingTableColumnId.UnsoldQuantity,\n ListingTableColumnId.TicketCount,\n ListingTableColumnId.UnitCost,\n];\n\nexport const LISTING_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES: Record<\n ListingTableColumnId | ListingTableFlattenedColumnId,\n Partial\n> = {\n [ListingTableColumnId.Checkbox]: { isConfigurable: false },\n\n [ListingTableFlattenedColumnId.Event]: {\n isHiddenByDefault: false,\n // Not actually numeric, but hack for numeric pills\n isNumeric: true,\n },\n [ListingTableFlattenedColumnId.Venue]: { isHiddenByDefault: true },\n [ListingTableFlattenedColumnId.Location]: { isHiddenByDefault: true },\n [ListingTableFlattenedColumnId.EventDate]: {\n isHiddenByDefault: true,\n },\n [ListingTableColumnId.Seating]: {\n isRequired: true,\n // Not actually numeric, but hack for numeric pills\n isNumeric: true,\n },\n [ListingTableColumnId.DeliveryType]: {\n // Not actually numeric, but hack for numeric pills\n isNumeric: true,\n isEnumWithIcon: true,\n },\n [ListingTableColumnId.ShownQuantity]: {\n isNumeric: true,\n isInteger: true,\n },\n [ListingTableColumnId.SplitType]: {\n isHiddenByDefault: true,\n isRequired: false,\n requiredFeatures: [Feature.ListingTableSplitTypeColumn],\n },\n [ListingTableColumnId.UnsoldQuantity]: {\n isNumeric: true,\n isInteger: true,\n },\n [ListingTableColumnId.TicketCount]: { isNumeric: true, isInteger: true },\n // InhandDate has its own custom cell. Not supported for custom date time format options\n [ListingTableColumnId.InHandDate]: {},\n [ListingTableColumnId.UnitCost]: { isNumeric: true, isCurrency: true },\n // Numeric but may affect how custom input cells render\n // We could later have abbreviated values show, and precise when clicked\n [ListingTableColumnId.ListPrice]: { isRequired: false },\n // Numeric but may affect how custom input cells render\n // We could later have abbreviated values show, and precise when clicked\n [ListingTableColumnId.AllInPrice]: { isRequired: false },\n [ListingTableColumnId.Actions]: { isConfigurable: false, isRequired: true },\n [ListingTableColumnId.ListingId]: { isHiddenByDefault: true },\n [ListingTableColumnId.AutoPricing]: {\n isHiddenByDefault: true,\n isEditabilityConfigurable: true,\n requiredFeatures: [Feature.AutoPricing],\n },\n [ListingTableColumnId.ProceedsFloor]: {\n isHiddenByDefault: true,\n isNumeric: true,\n isCurrency: true,\n requiredFeatures: [Feature.AutoPricing],\n },\n [ListingTableColumnId.ProceedsCeiling]: {\n isHiddenByDefault: true,\n isNumeric: true,\n isCurrency: true,\n requiredFeatures: [Feature.AutoPricing],\n },\n [ListingTableColumnId.WebsiteFloor]: {\n isHiddenByDefault: true,\n isNumeric: true,\n isCurrency: true,\n requiredFeatures: [Feature.AutoPricing],\n },\n [ListingTableColumnId.WebsiteCeiling]: {\n isHiddenByDefault: true,\n isNumeric: true,\n isCurrency: true,\n requiredFeatures: [Feature.AutoPricing],\n },\n [ListingTableColumnId.UndercutMode]: {\n // Not actually numeric, but hack for numeric pills\n isNumeric: true,\n isEnumWithIcon: true,\n isHiddenByDefault: true,\n isEditabilityConfigurable: true,\n requiredFeatures: [\n Feature.AutoPricing,\n Feature.AllowSeatScoreCompListingMode,\n ],\n },\n [ListingTableColumnId.UndercutAbsoluteAmount]: {\n isHiddenByDefault: true,\n isNumeric: true,\n isCurrency: true,\n isEditabilityConfigurable: true,\n requiredFeatures: [Feature.AutoPricing],\n },\n [ListingTableColumnId.UndercutRelativeAmount]: {\n isHiddenByDefault: true,\n isNumeric: true,\n isPercent: true,\n isEditabilityConfigurable: true,\n requiredFeatures: [Feature.AutoPricing],\n },\n [ListingTableColumnId.UndercutNewPrice]: {\n isHiddenByDefault: true,\n isNumeric: true,\n isCurrency: true,\n requiredFeatures: [Feature.AutoPricing],\n },\n [ListingTableColumnId.CompListingMode]: {\n // Not actually numeric, but hack for numeric pills\n isNumeric: true,\n isEnumWithIcon: true,\n isHiddenByDefault: true,\n isEditabilityConfigurable: true,\n requiredFeatures: [Feature.AutoPricing],\n },\n [ListingTableColumnId.CompListingFloor]: {\n isHiddenByDefault: true,\n isNumeric: true,\n isEditabilityConfigurable: true,\n requiredFeatures: [\n Feature.AutoPricing,\n Feature.AllowSeatScoreCompListingMode,\n ],\n },\n [ListingTableColumnId.CompListingCeiling]: {\n isHiddenByDefault: true,\n isNumeric: true,\n isEditabilityConfigurable: true,\n requiredFeatures: [\n Feature.AutoPricing,\n Feature.AllowSeatScoreCompListingMode,\n ],\n },\n [ListingTableColumnId.CompListingMinimumQuantity]: {\n isHiddenByDefault: true,\n isNumeric: true,\n isEditabilityConfigurable: true,\n requiredFeatures: [Feature.AutoPricing, Feature.PricingSettingsInTable],\n },\n [ListingTableColumnId.CompListingExcludeFanInventory]: {\n isHiddenByDefault: true,\n isEditabilityConfigurable: true,\n requiredFeatures: [\n Feature.AutoPricing,\n Feature.ExcludeFanInventory,\n Feature.PricingSettingsInTable,\n ],\n },\n [ListingTableColumnId.OutlierMode]: {\n isHiddenByDefault: true,\n isEditabilityConfigurable: true,\n requiredFeatures: [Feature.AutoPricing, Feature.PricingSettingsInTable],\n },\n [ListingTableColumnId.OutlierFiltering]: {\n isHiddenByDefault: true,\n isEditabilityConfigurable: true,\n requiredFeatures: [Feature.AutoPricing, Feature.PricingSettingsInTable],\n },\n [ListingTableColumnId.OutlierLimit]: {\n isHiddenByDefault: true,\n isEditabilityConfigurable: true,\n requiredFeatures: [Feature.AutoPricing, Feature.PricingSettingsInTable],\n },\n [ListingTableColumnId.OutlierSpacing]: {\n isHiddenByDefault: true,\n isEditabilityConfigurable: true,\n requiredFeatures: [Feature.AutoPricing, Feature.PricingSettingsInTable],\n },\n [ListingTableColumnId.CircuitBreakerMinCompListingCount]: {\n isHiddenByDefault: true,\n isNumeric: true,\n isEditabilityConfigurable: true,\n requiredFeatures: [\n Feature.AutoPricing,\n Feature.PricingSettingsInTable,\n Feature.AllowSeatScoreCompListingMode,\n ],\n },\n [ListingTableColumnId.CircuitBreakerVelocity]: {\n isHiddenByDefault: true,\n isNumeric: true,\n isEditabilityConfigurable: true,\n requiredFeatures: [\n Feature.AutoPricing,\n Feature.PricingSettingsInTable,\n Feature.AllowSeatScoreCompListingMode,\n ],\n },\n [ListingTableColumnId.CircuitBreakerVelocityHours]: {\n isHiddenByDefault: true,\n isNumeric: true,\n isEditabilityConfigurable: true,\n requiredFeatures: [\n Feature.AutoPricing,\n Feature.PricingSettingsInTable,\n Feature.AllowSeatScoreCompListingMode,\n ],\n },\n [ListingTableColumnId.SeatingRow]: { isHiddenByDefault: true },\n [ListingTableColumnId.SeatingSeats]: {\n isHiddenByDefault: true,\n // Not actually numeric, but hack for numeric pills\n isNumeric: true,\n },\n [ListingTableColumnId.AutoPricingResultType]: {\n isHiddenByDefault: true,\n requiredFeatures: [Feature.AutoPricing],\n },\n [ListingTableColumnId.LastPriceUpdatedDate]: {\n isHiddenByDefault: true,\n isDateTime: true,\n },\n [ListingTableColumnId.WastedCost]: {\n isNumeric: true,\n isCurrency: true,\n isHiddenByDefault: true,\n },\n [ListingTableColumnId.WastedTickets]: {\n isNumeric: true,\n isInteger: true,\n isHiddenByDefault: true,\n },\n [ListingTableColumnId.PurchaseId]: {\n isHiddenByDefault: true,\n isNumeric: true,\n isInteger: true,\n },\n [ListingTableColumnId.VendorAccount]: {\n isHiddenByDefault: true,\n },\n [ListingTableColumnId.AutoFulfill]: {\n isHiddenByDefault: true,\n requiredFeatures: [Feature.AutoFulfillSetting],\n },\n [ListingTableColumnId.MarketplaceVisibility]: {\n isHiddenByDefault: true,\n isNumeric: true,\n isPercent: true,\n },\n [ListingTableColumnId.PurchaseCreatedBy]: {\n isHiddenByDefault: true,\n },\n [ListingTableColumnId.PurchasedBy]: {\n isHiddenByDefault: true,\n },\n [ListingTableColumnId.PurchaseDate]: {\n isHiddenByDefault: true,\n isDateTime: true,\n },\n [ListingTableColumnId.RelativeRankPremium]: {\n isHiddenByDefault: true,\n isNumeric: true,\n isPercent: true,\n requiredFeatures: [Feature.UndercutByRankListingGroup],\n },\n [ListingTableColumnId.AbsoluteRankPremium]: {\n isHiddenByDefault: true,\n isNumeric: true,\n isCurrency: true,\n requiredFeatures: [Feature.UndercutByRankListingGroup],\n },\n [ListingTableColumnId.TicketClassColor]: {\n isHiddenByDefault: false,\n },\n [ListingTableColumnId.UnsoldProceeds]: {\n isNumeric: true,\n isCurrency: true,\n isHiddenByDefault: true,\n },\n [ListingTableColumnId.UnsoldCost]: {\n isNumeric: true,\n isCurrency: true,\n isHiddenByDefault: true,\n },\n [ListingTableColumnId.SoldQty]: {\n isNumeric: true,\n isInteger: true,\n isHiddenByDefault: true,\n },\n [ListingTableColumnId.SoldCost]: {\n isNumeric: true,\n isCurrency: true,\n isHiddenByDefault: true,\n },\n [ListingTableColumnId.TotalCost]: {\n isNumeric: true,\n isCurrency: true,\n isHiddenByDefault: true,\n },\n [ListingTableColumnId.SeatTraits]: {\n isHiddenByDefault: true,\n requiredFeatures: [Feature.SeatTraitsColumn],\n },\n} as const;\n\nexport const LISTING_REPORT_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES: Record<\n ListingReportTableColumnId,\n Partial\n> = {\n // These can be primary columns for grouping. The flag 'isRequired' will be determined at run time\n [ListingReportTableColumnId.ListingId]: { isHiddenByDefault: true },\n [ListingReportTableColumnId.Performer]: { isHiddenByDefault: true },\n [ListingReportTableColumnId.Venue]: { isHiddenByDefault: true },\n [ListingReportTableColumnId.EventGenre]: { isHiddenByDefault: true },\n [ListingReportTableColumnId.EventCity]: { isHiddenByDefault: true },\n [ListingReportTableColumnId.Event]: { isHiddenByDefault: true },\n [ListingReportTableColumnId.EventCountry]: { isHiddenByDefault: true },\n [ListingReportTableColumnId.SeatingSection]: { isHiddenByDefault: true },\n [ListingReportTableColumnId.SeatingRow]: { isHiddenByDefault: true },\n\n [ListingReportTableColumnId.UnsoldQuantity]: {\n ...LISTING_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n ListingTableColumnId.UnsoldQuantity\n ],\n isHiddenByDefault: true,\n isRequired: false,\n },\n [ListingReportTableColumnId.TicketCount]: {\n ...LISTING_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n ListingTableColumnId.TicketCount\n ],\n isHiddenByDefault: true,\n isRequired: false,\n },\n [ListingReportTableColumnId.SoldQuantity]: {\n isNumeric: true,\n isInteger: true,\n isHiddenByDefault: true,\n isRequired: false,\n },\n [ListingReportTableColumnId.UnitCost]: {\n ...LISTING_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n ListingTableColumnId.UnitCost\n ],\n isHiddenByDefault: true,\n isRequired: false,\n },\n [ListingReportTableColumnId.SoldCost]: {\n isNumeric: true,\n isCurrency: true,\n isHiddenByDefault: true,\n isRequired: false,\n },\n [ListingReportTableColumnId.UnsoldCost]: {\n isNumeric: true,\n isCurrency: true,\n isHiddenByDefault: true,\n isRequired: false,\n },\n [ListingReportTableColumnId.SoldProceeds]: {\n isNumeric: true,\n isCurrency: true,\n isHiddenByDefault: true,\n isRequired: false,\n },\n [ListingReportTableColumnId.ListPrice]: {\n isNumeric: true,\n isCurrency: true,\n isHiddenByDefault: true,\n isRequired: false,\n },\n [ListingReportTableColumnId.AllInPrice]: {\n isNumeric: true,\n isCurrency: true,\n isHiddenByDefault: true,\n isRequired: false,\n },\n [ListingReportTableColumnId.EventId]: {\n // This can be a number but shoudln't be treated as a number (precision etc.)\n isNumeric: false,\n isHiddenByDefault: true,\n },\n [ListingReportTableColumnId.Category]: {\n isHiddenByDefault: true,\n },\n [ListingReportTableColumnId.EventDate]: {\n isDateTime: true,\n isHiddenByDefault: true,\n },\n [ListingReportTableColumnId.EventStateProvince]: {\n isHiddenByDefault: true,\n },\n [ListingReportTableColumnId.SaleId]: {\n isHiddenByDefault: true,\n },\n [ListingReportTableColumnId.HoldId]: {\n isHiddenByDefault: true,\n },\n [ListingReportTableColumnId.SeatingSeats]: {\n isHiddenByDefault: true,\n },\n [ListingReportTableColumnId.DeliveryType]: {\n ...LISTING_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n ListingTableColumnId.DeliveryType\n ],\n isHiddenByDefault: true,\n isRequired: false,\n },\n [ListingReportTableColumnId.InHandDate]: {\n ...LISTING_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n ListingTableColumnId.InHandDate\n ],\n isHiddenByDefault: true,\n isRequired: false,\n },\n [ListingReportTableColumnId.PurchaseId]: {\n isHiddenByDefault: true,\n },\n [ListingReportTableColumnId.PurchasedBy]: {\n ...LISTING_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n ListingTableColumnId.PurchasedBy\n ],\n requiredFeatures: [],\n },\n [ListingReportTableColumnId.PurchaseDate]: {\n isHiddenByDefault: true,\n isDateTime: true,\n },\n [ListingReportTableColumnId.PurchaseCreatedBy]: {\n ...LISTING_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n ListingTableColumnId.PurchaseCreatedBy\n ],\n },\n [ListingReportTableColumnId.Vendor]: {\n isHiddenByDefault: true,\n },\n [ListingReportTableColumnId.SalePaymentState]: {\n isHiddenByDefault: true,\n },\n [ListingReportTableColumnId.PurchasePaymentStatus]: {\n isHiddenByDefault: true,\n },\n [ListingReportTableColumnId.Charges]: {\n isHiddenByDefault: true,\n isNumeric: true,\n isCurrency: true,\n },\n [ListingReportTableColumnId.Credits]: {\n isHiddenByDefault: true,\n isNumeric: true,\n isCurrency: true,\n },\n [ListingReportTableColumnId.Fulfiller]: {\n isHiddenByDefault: true,\n },\n [ListingReportTableColumnId.PaymentMethodType]: {\n // Not actually numeric, but hack for numeric pills\n isNumeric: true,\n isEnumWithIcon: true,\n isHiddenByDefault: true,\n isRequired: false,\n },\n [ListingReportTableColumnId.Zone]: {\n isHiddenByDefault: true,\n },\n [ListingReportTableColumnId.PricedBy]: {\n isHiddenByDefault: true,\n },\n [ListingReportTableColumnId.InternalNotes]: {\n isHiddenByDefault: true,\n },\n [ListingReportTableColumnId.InternalNotesPurchase]: {\n isHiddenByDefault: true,\n },\n [ListingReportTableColumnId.VendorOrderId]: {\n isHiddenByDefault: true,\n },\n [ListingReportTableColumnId.VendorAccountEmail]: {\n isHiddenByDefault: true,\n },\n [ListingReportTableColumnId.CancellationDatePurchase]: {\n isDateTime: true,\n isHiddenByDefault: true,\n },\n [ListingReportTableColumnId.PandL]: {\n isHiddenByDefault: true,\n isNumeric: true,\n isCurrency: true,\n },\n [ListingReportTableColumnId.Margin]: {\n isHiddenByDefault: true,\n isNumeric: true,\n isPercent: true,\n },\n} as const;\n\n/**\n * These columns must show up when a group by is applied\n */\nexport const GROUP_BY_TO_PRIMARY_COLUMN_ID: Record<\n string,\n ListingReportTableColumnId\n> = {\n [ReportGroupBy.Performer]: ListingReportTableColumnId.Performer,\n [ReportGroupBy.Venue]: ListingReportTableColumnId.Venue,\n [ReportGroupBy.Event]: ListingReportTableColumnId.Event,\n [ReportGroupBy.EventGenre]: ListingReportTableColumnId.EventGenre,\n [ReportGroupBy.EventCountry]: ListingReportTableColumnId.EventCountry,\n [ReportGroupBy.EventCity]: ListingReportTableColumnId.EventCity,\n [ReportGroupBy.SeatingSection]: ListingReportTableColumnId.SeatingSection,\n [ReportGroupBy.SeatingRow]: ListingReportTableColumnId.SeatingRow,\n [ReportGroupBy.ListingId]: ListingReportTableColumnId.ListingId,\n [ReportGroupBy.PurchaseId]: ListingReportTableColumnId.PurchaseId,\n [ReportGroupBy.PricedBy]: ListingReportTableColumnId.PricedBy,\n [ReportGroupBy.Vendor]: ListingReportTableColumnId.Vendor,\n [ReportGroupBy.PurchasedBy]: ListingReportTableColumnId.PurchasedBy,\n [ReportGroupBy.FulfilledBy]: ListingReportTableColumnId.Fulfiller,\n};\n\nexport const NON_METRIC_LISTING_REPORT_TABLE_COLUMN_IDS: ListingReportTableColumnId[] =\n [\n ListingReportTableColumnId.Event,\n ListingReportTableColumnId.EventGenre,\n ListingReportTableColumnId.EventCountry,\n ListingReportTableColumnId.EventCity,\n ListingReportTableColumnId.SeatingSection,\n ListingReportTableColumnId.SeatingRow,\n ListingReportTableColumnId.Performer,\n ListingReportTableColumnId.Venue,\n ListingReportTableColumnId.EventId,\n ListingReportTableColumnId.Category,\n ListingReportTableColumnId.EventDate,\n ListingReportTableColumnId.EventStateProvince,\n ListingReportTableColumnId.ListingId,\n ListingReportTableColumnId.SaleId,\n ListingReportTableColumnId.HoldId,\n ListingReportTableColumnId.SeatingSeats,\n ListingReportTableColumnId.DeliveryType,\n ListingReportTableColumnId.InHandDate,\n ListingReportTableColumnId.PurchaseId,\n ListingReportTableColumnId.PurchasedBy,\n ListingReportTableColumnId.PurchaseDate,\n ListingReportTableColumnId.PurchaseCreatedBy,\n ListingReportTableColumnId.PricedBy,\n ListingReportTableColumnId.Vendor,\n ListingReportTableColumnId.SalePaymentState,\n ListingReportTableColumnId.Charges,\n ListingReportTableColumnId.Credits,\n ListingReportTableColumnId.Fulfiller,\n ListingReportTableColumnId.PaymentMethodType,\n ListingReportTableColumnId.PurchasePaymentStatus,\n ListingReportTableColumnId.Zone,\n ListingReportTableColumnId.InternalNotes,\n ListingReportTableColumnId.InternalNotesPurchase,\n ListingReportTableColumnId.VendorOrderId,\n ListingReportTableColumnId.VendorAccountEmail,\n ListingReportTableColumnId.CancellationDatePurchase,\n ];\n\n/**\n * These columns from NON_METRIC_LISTING_REPORT_TABLE_COLUMN_IDS\n * can only show up when a group by is applied (but GROUP_BY_TO_PRIMARY_COLUMN_ID takes precedence)\n */\nexport const GROUP_BY_TO_VISIBLE_COLUMN_IDS: Record<\n string,\n ListingReportTableColumnId[]\n> = {\n [ReportGroupBy.Event]: [\n ListingReportTableColumnId.Performer,\n ListingReportTableColumnId.Venue,\n ListingReportTableColumnId.EventGenre,\n ListingReportTableColumnId.EventCity,\n ListingReportTableColumnId.EventId,\n ListingReportTableColumnId.Category,\n ListingReportTableColumnId.EventDate,\n ListingReportTableColumnId.EventStateProvince,\n ],\n [ReportGroupBy.Performer]: [ListingReportTableColumnId.Category],\n [ReportGroupBy.SeatingRow]: [\n // Don't make this available until we get the data right - see notes on https://thestubhub.atlassian.net/browse/POS-3430\n // ListingReportTableColumnId.Zone\n ],\n [ReportGroupBy.ListingId]: [\n ListingReportTableColumnId.Event,\n ListingReportTableColumnId.EventCountry,\n ListingReportTableColumnId.EventCity,\n ListingReportTableColumnId.SeatingSection,\n ListingReportTableColumnId.SeatingRow,\n ListingReportTableColumnId.Performer,\n ListingReportTableColumnId.Venue,\n ListingReportTableColumnId.EventId,\n ListingReportTableColumnId.Category,\n ListingReportTableColumnId.EventDate,\n ListingReportTableColumnId.EventStateProvince,\n ListingReportTableColumnId.SaleId,\n ListingReportTableColumnId.HoldId,\n ListingReportTableColumnId.SeatingSeats,\n ListingReportTableColumnId.SeatingSeats,\n ListingReportTableColumnId.DeliveryType,\n ListingReportTableColumnId.PurchaseId,\n ListingReportTableColumnId.PurchasedBy,\n ListingReportTableColumnId.PurchaseDate,\n ListingReportTableColumnId.Vendor,\n ListingReportTableColumnId.SalePaymentState,\n ListingReportTableColumnId.Charges,\n ListingReportTableColumnId.Credits,\n ListingReportTableColumnId.EventStateProvince,\n ListingReportTableColumnId.Fulfiller,\n ListingReportTableColumnId.InHandDate,\n ListingReportTableColumnId.InternalNotes,\n ListingReportTableColumnId.VendorOrderId,\n ListingReportTableColumnId.VendorAccountEmail,\n ListingReportTableColumnId.CancellationDatePurchase,\n ListingReportTableColumnId.PurchaseCreatedBy,\n // Don't make this available until we get the data right - see notes on https://thestubhub.atlassian.net/browse/POS-3430\n // ListingReportTableColumnId.Zone,\n ],\n [ReportGroupBy.PurchaseId]: [\n ListingReportTableColumnId.DeliveryType,\n ListingReportTableColumnId.PurchasedBy,\n ListingReportTableColumnId.PurchaseDate,\n ListingReportTableColumnId.Vendor,\n ListingReportTableColumnId.PurchasePaymentStatus,\n ListingReportTableColumnId.Charges,\n ListingReportTableColumnId.Credits,\n ListingReportTableColumnId.PaymentMethodType,\n ListingReportTableColumnId.InternalNotesPurchase,\n ListingReportTableColumnId.VendorOrderId,\n ListingReportTableColumnId.VendorAccountEmail,\n ListingReportTableColumnId.CancellationDatePurchase,\n ListingReportTableColumnId.PurchaseCreatedBy,\n ],\n};\n\nexport const LISTING_TABLE_CUSTOM_COLUMN_PERSONALIZATION_CONFIG: Partial =\n {\n isHiddenByDefault: true,\n isNumeric: true,\n };\n","export enum MarketplacePaymentsTableColumnId {\n PaymentDate = 'paymentDate',\n PaymentReferenceID = 'paymentReferenceID',\n State = 'state',\n PaymentAmount = 'paymentAmount',\n CreditAmount = 'creditAmount',\n ChargeAmount = 'chargeAmount',\n ProceedsAmount = 'proceedsAmount',\n Marketplace = 'marketplace',\n ConvertedPaymentsAmount = 'convertedPaymentAmount',\n Actions = 'actions',\n}\n","import { MarketplacePaymentsTableColumnId } from 'src/utils/columns/marketplacePayments/marketplacePaymentsColumnsUtils.types';\nimport { Feature } from 'src/WebApiController';\n\nimport { ColumnPersonalizationFlags } from '../columnUtils.types';\n\nexport const PAYMENTS_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES: Record<\n MarketplacePaymentsTableColumnId,\n Partial\n> = {\n [MarketplacePaymentsTableColumnId.PaymentReferenceID]: {},\n [MarketplacePaymentsTableColumnId.PaymentAmount]: {},\n [MarketplacePaymentsTableColumnId.PaymentDate]: {},\n [MarketplacePaymentsTableColumnId.State]: {},\n [MarketplacePaymentsTableColumnId.CreditAmount]: {},\n [MarketplacePaymentsTableColumnId.ProceedsAmount]: {},\n [MarketplacePaymentsTableColumnId.ChargeAmount]: {},\n [MarketplacePaymentsTableColumnId.Marketplace]: {},\n [MarketplacePaymentsTableColumnId.ConvertedPaymentsAmount]: {\n requiredFeatures: [Feature.MarketplacePaymentConversion],\n },\n [MarketplacePaymentsTableColumnId.Actions]: {\n isConfigurable: false,\n isRequired: true,\n },\n};\n\nexport const PAYMENTS_TABLE_CUSTOM_COLUMN_PERSONALIZATION_CONFIG: Partial =\n {\n isHiddenByDefault: true,\n isNumeric: true,\n };\n","import { PurchasesTableColumnId } from 'src/utils/columns/purchases/purchasesColumnUtils.types';\nimport { Feature, PurchaseViewMode } from 'src/WebApiController';\n\nimport { ColumnPersonalizationFlags } from '../columnUtils.types';\n\nexport const PURCHASES_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES: Record<\n PurchasesTableColumnId,\n Partial\n> = {\n [PurchasesTableColumnId.BuyerUserId]: {},\n [PurchasesTableColumnId.Checkbox]: {\n isHiddenByDefault: true,\n isConfigurable: false,\n },\n [PurchasesTableColumnId.AccordianToggle]: {\n visibleViewModes: [PurchaseViewMode.TileView],\n isConfigurable: false,\n },\n [PurchasesTableColumnId.PurchaseDate]: { isDateTime: true },\n [PurchasesTableColumnId.VendorOrderId]: { isRequired: true },\n [PurchasesTableColumnId.Id]: { isHiddenByDefault: true },\n [PurchasesTableColumnId.Payment]: {},\n [PurchasesTableColumnId.PaymentStatus]: {},\n [PurchasesTableColumnId.QualityControlState]: {},\n [PurchasesTableColumnId.TotalCost]: {},\n [PurchasesTableColumnId.UnitCost]: {},\n [PurchasesTableColumnId.Tickets]: {},\n [PurchasesTableColumnId.Orders]: {},\n [PurchasesTableColumnId.Shipment]: {},\n [PurchasesTableColumnId.Cost]: {},\n [PurchasesTableColumnId.Actions]: { isConfigurable: false, isRequired: true },\n [PurchasesTableColumnId.VendorAccountEmail]: { isHiddenByDefault: true },\n [PurchasesTableColumnId.CreatedBy]: { isHiddenByDefault: true },\n [PurchasesTableColumnId.Event]: {\n isHiddenByDefault: true,\n visibleViewModes: [PurchaseViewMode.TileView],\n },\n [PurchasesTableColumnId.Venue]: {\n isHiddenByDefault: true,\n visibleViewModes: [PurchaseViewMode.TileView],\n },\n [PurchasesTableColumnId.EventDate]: {\n isHiddenByDefault: true,\n visibleViewModes: [PurchaseViewMode.TileView],\n },\n [PurchasesTableColumnId.Seating]: {\n isHiddenByDefault: true,\n isNumeric: true, // Not actually numeric, but hack for numeric pills\n visibleViewModes: [\n PurchaseViewMode.TileView,\n PurchaseViewMode.EventTileView,\n ],\n },\n [PurchasesTableColumnId.Row]: {\n isHiddenByDefault: true,\n visibleViewModes: [\n PurchaseViewMode.TileView,\n PurchaseViewMode.EventTileView,\n ],\n requiredFeatures: [Feature.RowSeatColumnSalePurchase],\n },\n [PurchasesTableColumnId.Seats]: {\n isHiddenByDefault: true,\n visibleViewModes: [\n PurchaseViewMode.TileView,\n PurchaseViewMode.EventTileView,\n ],\n requiredFeatures: [Feature.RowSeatColumnSalePurchase],\n },\n [PurchasesTableColumnId.SeatTraits]: {\n isHiddenByDefault: true,\n visibleViewModes: [\n PurchaseViewMode.TileView,\n PurchaseViewMode.EventTileView,\n ],\n requiredFeatures: [Feature.SeatTraitsColumn],\n },\n [PurchasesTableColumnId.TotalPayment]: {\n isHiddenByDefault: true,\n visibleViewModes: [\n PurchaseViewMode.TileView,\n PurchaseViewMode.FlattenedView,\n ],\n requiredFeatures: [Feature.PurchasePaymentColumns],\n },\n [PurchasesTableColumnId.TotalConvertedPayment]: {\n isHiddenByDefault: true,\n visibleViewModes: [\n PurchaseViewMode.TileView,\n PurchaseViewMode.FlattenedView,\n ],\n requiredFeatures: [Feature.PurchasePaymentColumns],\n },\n [PurchasesTableColumnId.PaymentConversionRate]: {\n isHiddenByDefault: true,\n visibleViewModes: [\n PurchaseViewMode.TileView,\n PurchaseViewMode.FlattenedView,\n ],\n requiredFeatures: [Feature.PurchasePaymentColumns],\n },\n [PurchasesTableColumnId.Commissions]: {\n isHiddenByDefault: true,\n visibleViewModes: [\n PurchaseViewMode.TileView,\n PurchaseViewMode.FlattenedView,\n ],\n },\n};\n\nexport const PURCHASES_TABLE_CUSTOM_COLUMN_PERSONALIZATION_CONFIG: Partial =\n {\n isHiddenByDefault: true,\n isNumeric: true,\n };\n","import { Feature } from 'src/WebApiController';\n\nimport { ColumnPersonalizationFlags } from '../columnUtils.types';\nimport {\n SalesTableColumnId,\n SalesTableFlattenedColumnId,\n} from './salesColumnUtils.types';\n\nexport const SALE_MAIN_COLUMNS: SalesTableColumnId[] = [\n SalesTableColumnId.Checkbox,\n SalesTableColumnId.Seating,\n SalesTableColumnId.QuantitySold,\n SalesTableColumnId.OrderDate,\n SalesTableColumnId.InHandDate,\n SalesTableColumnId.Status,\n SalesTableColumnId.TicketType,\n SalesTableColumnId.Proceeds,\n SalesTableColumnId.Sale,\n];\n\nexport const SALE_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES: Record<\n SalesTableColumnId | SalesTableFlattenedColumnId,\n Partial\n> = {\n [SalesTableColumnId.Checkbox]: { isConfigurable: false },\n\n [SalesTableFlattenedColumnId.Event]: {\n isHiddenByDefault: false,\n // Not actually numeric, but hack for numeric pills\n isNumeric: true,\n },\n [SalesTableFlattenedColumnId.EventDate]: { isHiddenByDefault: true },\n [SalesTableFlattenedColumnId.Venue]: { isHiddenByDefault: true },\n [SalesTableFlattenedColumnId.Location]: { isHiddenByDefault: true },\n\n [SalesTableColumnId.Actions]: { isConfigurable: false, isRequired: true },\n [SalesTableColumnId.InHandDate]: {},\n [SalesTableColumnId.OrderDate]: { isDateTime: true },\n [SalesTableColumnId.Proceeds]: { isNumeric: true, isCurrency: true },\n [SalesTableColumnId.QuantitySold]: { isNumeric: true, isInteger: true },\n [SalesTableColumnId.Sale]: {},\n [SalesTableColumnId.Seating]: { isNumeric: true, isRequired: true },\n [SalesTableColumnId.Row]: {\n requiredFeatures: [Feature.RowSeatColumnSalePurchase],\n },\n [SalesTableColumnId.Seats]: {\n requiredFeatures: [Feature.RowSeatColumnSalePurchase],\n },\n [SalesTableColumnId.Status]: {\n // Not actually numeric, but hack for numeric pills\n isNumeric: true,\n isEnumWithIcon: true,\n },\n [SalesTableColumnId.TicketType]: {\n // Not actually numeric, but hack for numeric pills\n isNumeric: true,\n isEnumWithIcon: true,\n },\n [SalesTableColumnId.SoldTicketCost]: {\n isHiddenByDefault: true,\n isNumeric: true,\n isCurrency: true,\n },\n [SalesTableColumnId.Charges]: {\n isHiddenByDefault: true,\n isNumeric: true,\n isCurrency: true,\n },\n [SalesTableColumnId.Credits]: {\n isHiddenByDefault: true,\n isNumeric: true,\n isCurrency: true,\n },\n [SalesTableColumnId.PandL]: {\n isHiddenByDefault: true,\n isNumeric: true,\n isCurrency: true,\n },\n [SalesTableColumnId.Margin]: {\n isHiddenByDefault: true,\n isNumeric: true,\n isPercent: true,\n },\n [SalesTableColumnId.AutoFulfill]: {\n isHiddenByDefault: true,\n requiredFeatures: [Feature.AutoFulfillSetting],\n },\n [SalesTableColumnId.PaymentState]: {\n isHiddenByDefault: true,\n },\n [SalesTableColumnId.PaymentReceived]: {\n isHiddenByDefault: true,\n },\n [SalesTableColumnId.PaymentReferenceId]: {\n isHiddenByDefault: true,\n },\n [SalesTableColumnId.FulfillmentDate]: {\n isDateTime: true,\n isHiddenByDefault: true,\n },\n [SalesTableColumnId.PurchaseCreatedBy]: {\n isHiddenByDefault: true,\n },\n [SalesTableColumnId.PurchasedBy]: {\n isHiddenByDefault: true,\n },\n [SalesTableColumnId.PurchaseDate]: {\n isHiddenByDefault: true,\n isDateTime: true,\n },\n [SalesTableColumnId.VendorOrderId]: {\n isHiddenByDefault: true,\n },\n [SalesTableColumnId.VendorAccountEmail]: {\n isHiddenByDefault: true,\n },\n [SalesTableColumnId.OriginatedBy]: {\n isHiddenByDefault: true,\n },\n [SalesTableColumnId.TotalPaymentsAmount]: {\n isHiddenByDefault: true,\n requiredFeatures: [Feature.MarketplacePaymentConversion],\n },\n [SalesTableColumnId.TotalConvertedPaymentsAmount]: {\n isHiddenByDefault: true,\n requiredFeatures: [Feature.MarketplacePaymentConversion],\n },\n [SalesTableColumnId.WastedQuantity]: {\n isHiddenByDefault: true,\n requiredFeatures: [Feature.WasteSale],\n },\n} as const;\n","import { ReportGroupBy } from 'src/WebApiController';\n\nimport { ColumnPersonalizationFlags } from '../columnUtils.types';\nimport { SALE_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES } from './salesColumnUtils.constants';\nimport {\n SalesReportTableColumnId,\n SalesTableColumnId,\n} from './salesColumnUtils.types';\n\nexport const SALE_REPORT_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES: Record<\n SalesReportTableColumnId,\n Partial\n> = {\n // These can be primary columns for grouping. The flag 'isRequired' will be determined at run time\n\n [SalesReportTableColumnId.SaleMonth]: { isHiddenByDefault: true },\n [SalesReportTableColumnId.SaleWeek]: { isHiddenByDefault: true },\n [SalesReportTableColumnId.SaleDay]: { isHiddenByDefault: true },\n [SalesReportTableColumnId.Performer]: { isHiddenByDefault: true },\n [SalesReportTableColumnId.Venue]: { isHiddenByDefault: true },\n [SalesReportTableColumnId.EventGenre]: { isHiddenByDefault: true },\n [SalesReportTableColumnId.EventCity]: { isHiddenByDefault: true },\n [SalesReportTableColumnId.Event]: { isHiddenByDefault: true },\n [SalesReportTableColumnId.EventCountry]: { isHiddenByDefault: true },\n [SalesReportTableColumnId.SeatingSection]: { isHiddenByDefault: true },\n [SalesReportTableColumnId.SeatingRow]: { isHiddenByDefault: true },\n [SalesReportTableColumnId.SaleMarketplace]: { isHiddenByDefault: true },\n [SalesReportTableColumnId.MarketplacePaymentTerms]: {\n isHiddenByDefault: true,\n },\n\n [SalesReportTableColumnId.QuantitySold]: {\n ...SALE_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n SalesTableColumnId.QuantitySold\n ],\n isHiddenByDefault: true,\n isRequired: false,\n },\n [SalesReportTableColumnId.Proceeds]: {\n ...SALE_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n SalesTableColumnId.Proceeds\n ],\n isHiddenByDefault: true,\n isRequired: false,\n },\n [SalesReportTableColumnId.SoldTicketCost]: {\n ...SALE_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n SalesTableColumnId.SoldTicketCost\n ],\n },\n [SalesReportTableColumnId.Charges]: {\n ...SALE_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n SalesTableColumnId.Charges\n ],\n },\n [SalesReportTableColumnId.Credits]: {\n ...SALE_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n SalesTableColumnId.Credits\n ],\n },\n\n [SalesReportTableColumnId.EventId]: {\n // This can be a number but shoudln't be treated as a number (precision etc.)\n isNumeric: false,\n isHiddenByDefault: true,\n },\n [SalesReportTableColumnId.Category]: {\n isHiddenByDefault: true,\n },\n [SalesReportTableColumnId.EventDate]: {\n isDateTime: true,\n isHiddenByDefault: true,\n },\n [SalesReportTableColumnId.EventStateProvince]: {\n isHiddenByDefault: true,\n },\n [SalesReportTableColumnId.SaleId]: {\n // This can be a number but shoudln't be treated as a number (precision etc.)\n isNumeric: false,\n isHiddenByDefault: true,\n },\n [SalesReportTableColumnId.MarketplaceSaleId]: {\n isHiddenByDefault: true,\n },\n [SalesReportTableColumnId.Status]: {\n ...SALE_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n SalesTableColumnId.Status\n ],\n isHiddenByDefault: true,\n },\n [SalesReportTableColumnId.TicketType]: {\n ...SALE_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n SalesTableColumnId.TicketType\n ],\n isHiddenByDefault: true,\n },\n [SalesReportTableColumnId.InHandDate]: {\n ...SALE_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n SalesTableColumnId.InHandDate\n ],\n isHiddenByDefault: true,\n },\n [SalesReportTableColumnId.Fulfiller]: {\n isHiddenByDefault: true,\n },\n [SalesReportTableColumnId.PurchaseId]: {\n isHiddenByDefault: true,\n },\n [SalesReportTableColumnId.PurchasedBy]: {\n isHiddenByDefault: true,\n },\n [SalesReportTableColumnId.PurchaseDate]: {\n isHiddenByDefault: true,\n isDateTime: true,\n },\n [SalesReportTableColumnId.Vendor]: {\n isHiddenByDefault: true,\n },\n [SalesReportTableColumnId.SeatingSeats]: {\n isHiddenByDefault: true,\n },\n [SalesReportTableColumnId.PricedBy]: {\n isHiddenByDefault: true,\n },\n [SalesReportTableColumnId.OrderDate]: {\n ...SALE_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n SalesTableColumnId.OrderDate\n ],\n isHiddenByDefault: true,\n },\n [SalesReportTableColumnId.CurrencyCode]: {\n isHiddenByDefault: true,\n },\n [SalesReportTableColumnId.PaymentDate]: {\n isDateTime: true,\n isHiddenByDefault: true,\n },\n [SalesReportTableColumnId.VendorAccountEmail]: {\n ...SALE_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n SalesTableColumnId.VendorAccountEmail\n ],\n },\n [SalesReportTableColumnId.InternalNotes]: {\n isHiddenByDefault: true,\n },\n [SalesReportTableColumnId.CancellationDate]: {\n isDateTime: true,\n isHiddenByDefault: true,\n },\n [SalesReportTableColumnId.OutstandingBalance]: {\n isHiddenByDefault: true,\n isNumeric: true,\n isCurrency: true,\n },\n [SalesReportTableColumnId.PandL]: {\n ...SALE_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n SalesTableColumnId.PandL\n ],\n },\n [SalesReportTableColumnId.Margin]: {\n ...SALE_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n SalesTableColumnId.Margin\n ],\n },\n [SalesReportTableColumnId.PaymentState]: {\n ...SALE_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n SalesTableColumnId.PaymentState\n ],\n requiredFeatures: [],\n },\n [SalesReportTableColumnId.PaymentReceived]: {\n ...SALE_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n SalesTableColumnId.PaymentReceived\n ],\n },\n [SalesReportTableColumnId.PaymentReferenceId]: {\n ...SALE_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n SalesTableColumnId.PaymentReferenceId\n ],\n },\n [SalesReportTableColumnId.FulfillmentDate]: {\n ...SALE_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n SalesTableColumnId.FulfillmentDate\n ],\n requiredFeatures: [],\n },\n [SalesReportTableColumnId.PurchaseCreatedBy]: {\n ...SALE_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n SalesTableColumnId.PurchaseCreatedBy\n ],\n },\n [SalesReportTableColumnId.TicketId]: {\n isHiddenByDefault: true,\n },\n [SalesReportTableColumnId.TicketGroupId]: {\n isHiddenByDefault: true,\n },\n [SalesReportTableColumnId.CommissionUser]: {\n isHiddenByDefault: true,\n },\n [SalesReportTableColumnId.CommissionPercent]: {\n isHiddenByDefault: true,\n isPercent: true,\n },\n [SalesReportTableColumnId.CommissionShare]: {\n isHiddenByDefault: true,\n isCurrency: true,\n },\n} as const;\n\n/**\n * These columns must show up when a group by is applied\n */\nexport const GROUP_BY_TO_PRIMARY_COLUMN_ID: Record<\n string,\n SalesReportTableColumnId\n> = {\n [ReportGroupBy.Performer]: SalesReportTableColumnId.Performer,\n [ReportGroupBy.Venue]: SalesReportTableColumnId.Venue,\n [ReportGroupBy.Event]: SalesReportTableColumnId.Event,\n [ReportGroupBy.EventGenre]: SalesReportTableColumnId.EventGenre,\n [ReportGroupBy.EventCountry]: SalesReportTableColumnId.EventCountry,\n [ReportGroupBy.EventCity]: SalesReportTableColumnId.EventCity,\n [ReportGroupBy.SeatingSection]: SalesReportTableColumnId.SeatingSection,\n [ReportGroupBy.SeatingRow]: SalesReportTableColumnId.SeatingRow,\n [ReportGroupBy.SaleMarketplace]: SalesReportTableColumnId.SaleMarketplace,\n [ReportGroupBy.SaleMonth]: SalesReportTableColumnId.SaleMonth,\n [ReportGroupBy.SaleWeek]: SalesReportTableColumnId.SaleWeek,\n [ReportGroupBy.SaleDay]: SalesReportTableColumnId.SaleDay,\n [ReportGroupBy.SaleId]: SalesReportTableColumnId.SaleId,\n [ReportGroupBy.PricedBy]: SalesReportTableColumnId.PricedBy,\n [ReportGroupBy.Vendor]: SalesReportTableColumnId.Vendor,\n [ReportGroupBy.PurchasedBy]: SalesReportTableColumnId.PurchasedBy,\n [ReportGroupBy.FulfilledBy]: SalesReportTableColumnId.Fulfiller,\n [ReportGroupBy.SaleIdTicketIdCommissionUser]: SalesReportTableColumnId.SaleId,\n};\n\nexport const NON_METRIC_SALES_REPORT_TABLE_COLUMN_IDS: SalesReportTableColumnId[] =\n [\n SalesReportTableColumnId.Event,\n SalesReportTableColumnId.EventGenre,\n SalesReportTableColumnId.EventCountry,\n SalesReportTableColumnId.EventCity,\n SalesReportTableColumnId.SeatingSection,\n SalesReportTableColumnId.SeatingRow,\n SalesReportTableColumnId.Performer,\n SalesReportTableColumnId.Venue,\n SalesReportTableColumnId.EventId,\n SalesReportTableColumnId.Category,\n SalesReportTableColumnId.EventDate,\n SalesReportTableColumnId.EventStateProvince,\n SalesReportTableColumnId.SaleMarketplace,\n SalesReportTableColumnId.SaleMonth,\n SalesReportTableColumnId.SaleWeek,\n SalesReportTableColumnId.SaleDay,\n SalesReportTableColumnId.SaleId,\n SalesReportTableColumnId.MarketplaceSaleId,\n SalesReportTableColumnId.Status,\n SalesReportTableColumnId.TicketType,\n SalesReportTableColumnId.InHandDate,\n SalesReportTableColumnId.PaymentState,\n SalesReportTableColumnId.PricedBy,\n SalesReportTableColumnId.Fulfiller,\n SalesReportTableColumnId.PurchaseId,\n SalesReportTableColumnId.PurchasedBy,\n SalesReportTableColumnId.PurchaseDate,\n SalesReportTableColumnId.Vendor,\n SalesReportTableColumnId.SeatingSeats,\n SalesReportTableColumnId.OrderDate,\n SalesReportTableColumnId.CurrencyCode,\n SalesReportTableColumnId.PaymentDate,\n SalesReportTableColumnId.FulfillmentDate,\n SalesReportTableColumnId.VendorAccountEmail,\n SalesReportTableColumnId.InternalNotes,\n SalesReportTableColumnId.CancellationDate,\n SalesReportTableColumnId.PurchaseCreatedBy,\n SalesReportTableColumnId.TicketId,\n SalesReportTableColumnId.TicketGroupId,\n SalesReportTableColumnId.CommissionUser,\n SalesReportTableColumnId.CommissionPercent,\n SalesReportTableColumnId.CommissionShare,\n SalesReportTableColumnId.MarketplacePaymentTerms,\n ];\n\n/**\n * These columns from NON_METRIC_SALES_REPORT_TABLE_COLUMN_IDS\n * can only show up when a group by is applied (but GROUP_BY_TO_PRIMARY_COLUMN_ID takes precedence)\n */\nexport const GROUP_BY_TO_VISIBLE_COLUMN_IDS: Record<\n string,\n SalesReportTableColumnId[]\n> = {\n [ReportGroupBy.Event]: [\n SalesReportTableColumnId.Performer,\n SalesReportTableColumnId.Venue,\n SalesReportTableColumnId.EventGenre,\n SalesReportTableColumnId.EventCity,\n SalesReportTableColumnId.EventId,\n SalesReportTableColumnId.Category,\n SalesReportTableColumnId.EventDate,\n SalesReportTableColumnId.EventStateProvince,\n ],\n [ReportGroupBy.Performer]: [SalesReportTableColumnId.Category],\n [ReportGroupBy.ArAgingMarketplace]: [\n SalesReportTableColumnId.SaleMarketplace,\n SalesReportTableColumnId.MarketplacePaymentTerms,\n ],\n [ReportGroupBy.SeatingRow]: [SalesReportTableColumnId.SeatingSection],\n [ReportGroupBy.SaleId]: [\n SalesReportTableColumnId.Event,\n SalesReportTableColumnId.EventGenre,\n SalesReportTableColumnId.EventCountry,\n SalesReportTableColumnId.EventCity,\n SalesReportTableColumnId.SeatingSection,\n SalesReportTableColumnId.SeatingRow,\n SalesReportTableColumnId.Performer,\n SalesReportTableColumnId.Venue,\n SalesReportTableColumnId.EventId,\n SalesReportTableColumnId.Category,\n SalesReportTableColumnId.EventDate,\n SalesReportTableColumnId.EventStateProvince,\n SalesReportTableColumnId.SaleMarketplace,\n SalesReportTableColumnId.OrderDate,\n SalesReportTableColumnId.SaleId,\n SalesReportTableColumnId.MarketplaceSaleId,\n SalesReportTableColumnId.Status,\n SalesReportTableColumnId.TicketType,\n SalesReportTableColumnId.InHandDate,\n SalesReportTableColumnId.PaymentState,\n SalesReportTableColumnId.Fulfiller,\n SalesReportTableColumnId.PurchaseId,\n SalesReportTableColumnId.PurchasedBy,\n SalesReportTableColumnId.Vendor,\n SalesReportTableColumnId.SeatingSeats,\n SalesReportTableColumnId.CurrencyCode,\n SalesReportTableColumnId.PurchaseDate,\n SalesReportTableColumnId.PaymentDate,\n SalesReportTableColumnId.FulfillmentDate,\n SalesReportTableColumnId.VendorAccountEmail,\n SalesReportTableColumnId.InternalNotes,\n SalesReportTableColumnId.CancellationDate,\n SalesReportTableColumnId.PurchaseCreatedBy,\n ],\n [ReportGroupBy.SaleIdTicketIdCommissionUser]: [\n SalesReportTableColumnId.Event,\n SalesReportTableColumnId.EventGenre,\n SalesReportTableColumnId.EventCountry,\n SalesReportTableColumnId.EventCity,\n SalesReportTableColumnId.SeatingSection,\n SalesReportTableColumnId.SeatingRow,\n SalesReportTableColumnId.Performer,\n SalesReportTableColumnId.Venue,\n SalesReportTableColumnId.EventId,\n SalesReportTableColumnId.Category,\n SalesReportTableColumnId.EventDate,\n SalesReportTableColumnId.EventStateProvince,\n SalesReportTableColumnId.SaleMarketplace,\n SalesReportTableColumnId.OrderDate,\n SalesReportTableColumnId.SaleId,\n SalesReportTableColumnId.MarketplaceSaleId,\n SalesReportTableColumnId.Status,\n SalesReportTableColumnId.TicketType,\n SalesReportTableColumnId.InHandDate,\n SalesReportTableColumnId.PaymentState,\n SalesReportTableColumnId.Fulfiller,\n SalesReportTableColumnId.PurchaseId,\n SalesReportTableColumnId.PurchasedBy,\n SalesReportTableColumnId.PurchaseDate,\n SalesReportTableColumnId.Vendor,\n SalesReportTableColumnId.SeatingSeats,\n SalesReportTableColumnId.CurrencyCode,\n SalesReportTableColumnId.PaymentDate,\n SalesReportTableColumnId.FulfillmentDate,\n SalesReportTableColumnId.VendorAccountEmail,\n SalesReportTableColumnId.InternalNotes,\n SalesReportTableColumnId.CancellationDate,\n SalesReportTableColumnId.PurchaseCreatedBy,\n SalesReportTableColumnId.TicketId,\n SalesReportTableColumnId.TicketGroupId,\n SalesReportTableColumnId.CommissionUser,\n SalesReportTableColumnId.CommissionPercent,\n SalesReportTableColumnId.CommissionShare,\n ],\n};\n","import {\n FormatOption,\n FormatOptionEntries,\n LISTING_TABLE_COLUMN_DEFAULT_PRECISION,\n} from 'src/modals/EditTableColumns';\nimport {\n LISTING_FLATTENED_TABLE_COLUMN_DEFAULT_PRECISION,\n PURCHASES_EVENT_TABLE_COLUMN_DEFAULT_PRECISION,\n SALE_FLATTENED_TABLE_COLUMN_DEFAULT_PRECISION,\n SALE_TABLE_COLUMN_DEFAULT_PRECISION,\n} from 'src/modals/EditTableColumns/EditTableColumns.util';\nimport { OnSaleEventsTableColumnId } from 'src/navigations/Routes/OnSaleEvent/OnSaleEventView.types';\nimport {\n EVENTS_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES,\n ON_SALE_EVENTS_TABLE_CUSTOM_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES,\n} from 'src/utils/columns/events/eventsColumnUtils.constants';\nimport { EventsTableColumnId } from 'src/utils/columns/events/eventsColumnUtils.types';\nimport {\n LISTING_REPORT_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES,\n LISTING_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES,\n} from 'src/utils/columns/inventory/inventoryColumnUtils.constants';\nimport {\n ListingReportTableColumnId,\n ListingTableColumnId,\n} from 'src/utils/columns/inventory/inventoryColumnUtils.types';\nimport { MarketplacePaymentsTableColumnId } from 'src/utils/columns/marketplacePayments/marketplacePaymentsColumnsUtils.types';\nimport { PAYMENTS_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES } from 'src/utils/columns/payments/paymentsColumnUtils.constants';\nimport { PURCHASES_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES } from 'src/utils/columns/purchases/purchasesColumnUtils.constants';\nimport { PurchasesTableColumnId } from 'src/utils/columns/purchases/purchasesColumnUtils.types';\nimport { SALE_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES } from 'src/utils/columns/sales/salesColumnUtils.constants';\nimport {\n SalesReportTableColumnId,\n SalesTableColumnId,\n} from 'src/utils/columns/sales/salesColumnUtils.types';\nimport { SALE_REPORT_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES } from 'src/utils/columns/sales/salesReportColumnUtils.constants';\nimport {\n SECTION_TYPE_TO_COLUMN_EDITABILITY_SETTING,\n SECTION_TYPE_TO_PRECISION_SETTING,\n SectionType,\n} from 'src/utils/types/sectionType';\n\nimport { useServerUserSetting } from './useUserSetting';\n\nconst getPersonalizationConfigOverrides = (\n columnId: string,\n sectionType: SectionType\n) => {\n return {\n [SectionType.Events]:\n EVENTS_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n columnId as EventsTableColumnId\n ],\n [SectionType.Listings]:\n LISTING_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n columnId as ListingTableColumnId\n ],\n [SectionType.ListingsFlattened]:\n LISTING_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n columnId as ListingTableColumnId\n ],\n [SectionType.InventorySideTable]:\n LISTING_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n columnId as ListingTableColumnId\n ],\n [SectionType.Sales]:\n SALE_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n columnId as SalesTableColumnId\n ],\n [SectionType.SalesFlattened]:\n SALE_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n columnId as SalesTableColumnId\n ],\n [SectionType.SalesReport]:\n SALE_REPORT_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n columnId as SalesReportTableColumnId\n ],\n [SectionType.SalesSideTable]:\n SALE_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n columnId as SalesTableColumnId\n ],\n [SectionType.ListingsReport]:\n LISTING_REPORT_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n columnId as ListingReportTableColumnId\n ],\n [SectionType.Purchases]:\n PURCHASES_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n columnId as PurchasesTableColumnId\n ],\n [SectionType.PurchaseEvent]:\n PURCHASES_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n columnId as PurchasesTableColumnId\n ],\n [SectionType.PurchaseSideTable]:\n PURCHASES_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n columnId as PurchasesTableColumnId\n ],\n [SectionType.MarketplacePaymentsTable]:\n PAYMENTS_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n columnId as MarketplacePaymentsTableColumnId\n ],\n [SectionType.OnSaleEvents]:\n ON_SALE_EVENTS_TABLE_CUSTOM_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n columnId as OnSaleEventsTableColumnId\n ],\n }[sectionType];\n};\n\nexport const useColumnUserSetting = (\n columnId: string,\n sectionType: SectionType\n) => {\n const { value: storedColumnNumberPrecisions = {} } =\n useServerUserSetting({\n id: SECTION_TYPE_TO_PRECISION_SETTING[sectionType],\n });\n\n const { isInteger, isNumeric, isCurrency, isPercent } =\n getPersonalizationConfigOverrides(columnId, sectionType) ?? {};\n\n const sectionSpecificDefaultPrecision: FormatOption | undefined = {\n [SectionType.Listings]: LISTING_TABLE_COLUMN_DEFAULT_PRECISION[columnId],\n [SectionType.ListingsReport]:\n LISTING_TABLE_COLUMN_DEFAULT_PRECISION[columnId],\n [SectionType.ListingsFlattened]:\n LISTING_FLATTENED_TABLE_COLUMN_DEFAULT_PRECISION[columnId] ??\n LISTING_TABLE_COLUMN_DEFAULT_PRECISION[columnId],\n [SectionType.InventorySideTable]:\n LISTING_TABLE_COLUMN_DEFAULT_PRECISION[columnId],\n [SectionType.Sales]: SALE_TABLE_COLUMN_DEFAULT_PRECISION[columnId],\n [SectionType.SalesReport]: SALE_TABLE_COLUMN_DEFAULT_PRECISION[columnId],\n [SectionType.SalesFlattened]:\n SALE_FLATTENED_TABLE_COLUMN_DEFAULT_PRECISION[columnId],\n [SectionType.SalesSideTable]: SALE_TABLE_COLUMN_DEFAULT_PRECISION[columnId],\n [SectionType.Events]: undefined,\n [SectionType.Purchases]: undefined,\n [SectionType.PurchaseEvent]:\n PURCHASES_EVENT_TABLE_COLUMN_DEFAULT_PRECISION[columnId],\n [SectionType.PurchaseSideTable]: undefined,\n [SectionType.MarketplacePaymentsTable]: undefined,\n [SectionType.OnSaleEvents]: undefined,\n }[sectionType];\n\n const userDefinedPrecision =\n storedColumnNumberPrecisions[columnId] ??\n sectionSpecificDefaultPrecision ??\n (isPercent && !isCurrency\n ? FormatOption.Percent_RoundToTwo\n : isInteger\n ? FormatOption.Whole\n : isNumeric\n ? FormatOption.Precise\n : undefined);\n\n const { value: editableColumns = [] } = useServerUserSetting({\n id: SECTION_TYPE_TO_COLUMN_EDITABILITY_SETTING[sectionType],\n });\n const editable = editableColumns.includes(columnId);\n\n return {\n isServerSetting: storedColumnNumberPrecisions[columnId] != null,\n userDefinedPrecision,\n editable,\n };\n};\n","import { Row, SortingFns } from '@tanstack/react-table';\nimport { useMemo } from 'react';\nimport { useColumnUserSetting } from 'src/hooks/useColumnUserSetting';\nimport { FormatOption } from 'src/modals/EditTableColumns';\nimport { ListingWithEvent } from 'src/tables/ListingTable/ListingTable.types';\nimport { SaleWithEvent } from 'src/tables/SalesTable/SalesTable.type';\nimport {\n sortListingSeating,\n sortListingSeatingSection,\n sortPurchaseOrderSeatingSection,\n sortPurchaseOrderTicketGroupSeating,\n sortSalesSeating,\n sortSalesSeatingSection,\n} from 'src/utils/tableUtils';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport { PurchaseOrderTicketGroup } from 'src/WebApiController';\n\nexport const SEATING_SORTING_FN_NAME = 'seatingSortingFn';\n\nconst listingSectionTypes: Readonly = [\n SectionType.Listings,\n SectionType.ListingsFlattened,\n SectionType.ListingsReport,\n];\n\nconst purchaseSectionTypes: Readonly = [\n SectionType.Purchases,\n SectionType.PurchaseEvent,\n SectionType.PurchaseSideTable,\n];\n\nconst salesSectionTypes: Readonly = [\n SectionType.Sales,\n SectionType.SalesFlattened,\n SectionType.SalesReport,\n SectionType.SalesSideTable,\n];\n\ntype SortingEntity =\n | ListingWithEvent\n | SaleWithEvent\n | PurchaseOrderTicketGroup;\n\nexport type SeatingSortingFn = (\n rowA: Row,\n rowB: Row,\n colId: string\n) => number;\n\nexport type SortinWrapper = (\n rowA: Row,\n rowB: Row,\n columnId: string,\n sortingFn: SeatingSortingFn\n) => number;\n\nexport const useSeatingColumnSorting = (\n columnId: string,\n sectionType: SectionType,\n sortingWrapper?: SortinWrapper\n): SortingFns => {\n const { userDefinedPrecision } = useColumnUserSetting(columnId, sectionType);\n\n return useMemo(() => {\n let sortingFn: SeatingSortingFn = (\n rowA: Row,\n rowB: Row,\n colId: string\n ) => 0;\n\n const isSectionOnlyPrecision =\n userDefinedPrecision === FormatOption.Seating_SectionOnly;\n\n if (listingSectionTypes.includes(sectionType)) {\n sortingFn = (\n isSectionOnlyPrecision ? sortListingSeatingSection : sortListingSeating\n ) as SeatingSortingFn;\n } else if (purchaseSectionTypes.includes(sectionType)) {\n sortingFn = (\n isSectionOnlyPrecision\n ? sortPurchaseOrderSeatingSection\n : sortPurchaseOrderTicketGroupSeating\n ) as SeatingSortingFn;\n } else if (salesSectionTypes.includes(sectionType)) {\n sortingFn = (\n isSectionOnlyPrecision ? sortSalesSeatingSection : sortSalesSeating\n ) as SeatingSortingFn;\n }\n\n const seatingSortingFn = (rowA: Row, rowB: Row) => {\n if (sortingWrapper) {\n return sortingWrapper(rowA, rowB, columnId, sortingFn);\n }\n return sortingFn(rowA, rowB, columnId);\n };\n\n return {\n [SEATING_SORTING_FN_NAME]: seatingSortingFn,\n };\n }, [columnId, sectionType, sortingWrapper, userDefinedPrecision]);\n};\n","import { Row } from '@tanstack/react-table';\nimport { useCallback } from 'react';\nimport {\n SeatingSortingFn,\n useSeatingColumnSorting,\n} from 'src/tables/common/hooks/useSeatingColumnSorting';\nimport { ListingWithEvent } from 'src/tables/ListingTable/ListingTable.types';\nimport { ListingTableColumnId } from 'src/utils/columns/inventory/inventoryColumnUtils.types';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport { Feature } from 'src/WebApiController';\n\nimport { useUserHasFeature } from './useUserHasFeature';\n\nexport const useSortListingTableSeatingColumn = (sectionType: SectionType) => {\n const hasSortListingsInGroupFeature = useUserHasFeature(\n Feature.SortListingsInGroup\n );\n\n const sortingWrapper = useCallback(\n (\n rowA: Row,\n rowB: Row,\n columnId: string,\n sortingFn: SeatingSortingFn\n ) => {\n if (rowA.depth + rowB.depth > 0 && !hasSortListingsInGroupFeature) {\n return 0;\n }\n return sortingFn(rowA, rowB, columnId);\n },\n [hasSortListingsInGroupFeature]\n );\n\n return useSeatingColumnSorting(\n ListingTableColumnId.Seating,\n sectionType,\n sortingWrapper\n );\n};\n","import * as ts from 'typescript';\n\nexport const EDITABLE_FORMULA_EXAMPLE =\n '2 * (${ticketCount} - ${availableQuantity})';\n\n/**\n * Formula string in a format directly editable and readable.\n * Consists of: Number literals, operators +-*()/, and identifiers in the form of \"${FIELD_NAME}\",\n * where FIELD_NAME can be any string\n *\n * Example: `${undercutAbsoluteAmount} * (${ticketCount} + 20 + ${random tag name}) + 0.04`\n */\nexport type FormulaEditable = string;\n\n/**\n * Formula in an editable tokenized format.\n * Consists of: Number literals, operators +-*()/, and identifiers in the form of FIELD_NAME,\n * where FIELD_NAME can be any string\n *\n * Example: `['undercutAbsoluteAmount', '*', '(', 'ticketCount', '+', '20', '+', 'random tag name', ')', '+', '0.04']`\n */\nexport type FormulaTokenized = string[];\n\n/**\n * Formula in executable format that is ready to evaluate.\n * Consists of: Number literals, operators +-*()/, and identifiers in the form of FORMULA_DATA_ACCESSOR_PREFIX['{FIELD_NAME}'],\n *\n * Example: `data?.undercutAbsoluteAmount * (data?.['ticketCount'] + 20) + 0.04 + data?.['random Tag']`\n */\nexport type FormulaExecutable = string;\n// Changing this prefix will break the evaluation of existing formula stored in DB\nconst FORMULA_DATA_ACCESSOR_PREFIX = 'data?.';\n\n/**\n * Converts executable formula string (from user settings) to editable formula\n * string (more readable and easy to parse/edit format)\n *\n * Example: `data?.['ticketCount'] + 20` ==> `${ticketCount} + 20`\n * Or (v1 for backward compatability): `data?.ticketCount + 20` ==> `${ticketCount} + 20`\n * @param executableFormula formula from user settings\n * @returns\n */\nexport const fromExecutableFormula = (\n executableFormula: FormulaExecutable | undefined\n): FormulaEditable | undefined => {\n let editableFormula = '';\n const tokens = parseExecutableFormula(executableFormula);\n if (tokens == null) {\n return;\n }\n\n tokens.forEach((t) => {\n if (t.startsWith(FORMULA_DATA_ACCESSOR_PREFIX)) {\n const isTokenV1 = !t.includes('[') && !t.includes(']');\n const identifier = isTokenV1\n ? // data?.ticketCount => ${ticketCount}\n `$\\{${t.replace(FORMULA_DATA_ACCESSOR_PREFIX, '')}}`\n : // data?.['ticketCount'] => ${ticketCount}\n `$\\{${t.replace(FORMULA_DATA_ACCESSOR_PREFIX, '').slice(2, -2)}}`;\n editableFormula += identifier;\n } else {\n editableFormula += t;\n }\n });\n\n return editableFormula;\n};\n\n/**\n * Converts tokenized formula string (more readable and easy to parse/edit format)\n * to executable formula string that is ready for evaluation\n *\n * Example: `['ticketCount', '+', '20']` ==> `data?.['ticketCount'] + 20`\n * @param editableFormula formula being edited\n * @returns\n */\nexport const toExecutableFormula = (\n tokenizedFormula: FormulaTokenized\n): FormulaExecutable => {\n return tokenizedFormula\n .map((token) =>\n FORMULA_OPERATORS_AND_NUMBERS_REGEXP_START.test(token)\n ? token\n : `${FORMULA_DATA_ACCESSOR_PREFIX}['${token}']`\n )\n .join(' ');\n};\n\nexport const EDITABLE_FORMULA_ALLOWED_CHARSET_REGEXP = new RegExp(\n /^[0-9a-z_{}$+\\-*/(). ]+$/i\n);\n\nexport const FORMULA_DISPLAY_ALLOWED_INSERT_CHARS = [\n '@',\n '(',\n ')',\n '+',\n '-',\n '*',\n '/',\n '0',\n '1',\n '2',\n '3',\n '4',\n '5',\n '6',\n '7',\n '8',\n '9',\n '.',\n];\n\nexport const FORMULA_OPERATORS_AND_NUMBERS_REGEXP_START = /^[+\\-*/()]|[0-9.]+/;\nexport const FORMULA_OPERATORS_AND_NUMBERS_REGEXP_ALL = /[+\\-*/()]|[0-9.]+/g;\n\nexport const toTokenEditable = (fieldName: string) => {\n return `$\\{${fieldName}}`;\n};\n\nconst PLAIN_LITERAL_CHARSET_REGEXP = new RegExp(/^[0-9+\\-*/(). ]+$/i);\n/**\n * Parse executableFormula (in the form of FORMULA_DATA_ACCESSOR_PREFIX{FIELD_NAME}), transforming\n * formula into plain literals and identifier\n * Used to access identifiers and validation.\n *\n * E.g. `data?.ticketCount * (data?.AllInPrice + 3)` =>\n *\n * [\n * 'data?.ticketCount',\n * ' * (',\n * 'data?.AllInPrice',\n * ' + 3)'\n * ]\n *\n * @param executableFormula\n * @returns parsed list of tokens, or undefined if failed to parse\n */\nconst parseExecutableFormulaV1 = (\n executableFormula: FormulaExecutable | undefined\n): string[] | undefined => {\n const tokens: string[] = [];\n if (!executableFormula) {\n return;\n }\n\n let executableFormulaSliced = executableFormula;\n while (executableFormulaSliced.includes(FORMULA_DATA_ACCESSOR_PREFIX)) {\n const pos = executableFormulaSliced.indexOf(FORMULA_DATA_ACCESSOR_PREFIX);\n\n // Plain token\n if (pos > 0) {\n tokens.push(executableFormulaSliced.slice(0, pos));\n if (!tokens[tokens.length - 1].match(PLAIN_LITERAL_CHARSET_REGEXP)) {\n return;\n }\n }\n\n let posEnd = pos + FORMULA_DATA_ACCESSOR_PREFIX.length;\n for (; posEnd < executableFormulaSliced.length; posEnd++) {\n if (\n !executableFormulaSliced\n .slice(pos + FORMULA_DATA_ACCESSOR_PREFIX.length, posEnd + 1)\n .match(/^[0-9a-z_.?]+$/i)\n ) {\n break;\n }\n }\n\n tokens.push(executableFormulaSliced.slice(pos, posEnd));\n\n executableFormulaSliced = executableFormulaSliced.slice(posEnd);\n }\n\n if (executableFormulaSliced.length > 0) {\n // Plain token\n tokens.push(executableFormulaSliced);\n if (!tokens[tokens.length - 1].match(PLAIN_LITERAL_CHARSET_REGEXP)) {\n return;\n }\n }\n\n return tokens;\n};\n\n/**\n * Parse executableFormula, transforming formula into plain literals and identifier\n * Used to access identifiers and validation.\n *\n * E.g. `data?.['ticketCount'] * (data?.['AllInPrice'] + 3)` =>\n *\n * [\n * 'data?.['ticketCount']',\n * ' * (',\n * 'data?.['AllInPrice']',\n * ' + 3)'\n * ]\n *\n * @param executableFormula\n * @returns parsed list of tokens, or undefined if failed to parse\n */\nexport const parseExecutableFormula = (\n executableFormula: FormulaExecutable | undefined\n): string[] | undefined => {\n const tokens: string[] = [];\n if (!executableFormula) {\n return;\n }\n\n const isExecutableFormulaV1 =\n !executableFormula.includes('[') && !executableFormula.includes(']');\n if (isExecutableFormulaV1) {\n return parseExecutableFormulaV1(executableFormula);\n }\n\n let executableFormulaSliced = executableFormula;\n while (executableFormulaSliced.includes(FORMULA_DATA_ACCESSOR_PREFIX)) {\n const pos = executableFormulaSliced.indexOf(FORMULA_DATA_ACCESSOR_PREFIX);\n\n // Plain token\n if (pos > 0) {\n tokens.push(executableFormulaSliced.slice(0, pos));\n if (!tokens[tokens.length - 1].match(PLAIN_LITERAL_CHARSET_REGEXP)) {\n return;\n }\n }\n\n let posEnd = pos + FORMULA_DATA_ACCESSOR_PREFIX.length;\n for (; posEnd < executableFormulaSliced.length; posEnd++) {\n if (executableFormulaSliced.charAt(posEnd) === ']') {\n posEnd++;\n break;\n }\n }\n\n tokens.push(executableFormulaSliced.slice(pos, posEnd));\n\n executableFormulaSliced = executableFormulaSliced.slice(posEnd);\n }\n\n if (executableFormulaSliced.length > 0) {\n // Plain token\n tokens.push(executableFormulaSliced);\n if (!tokens[tokens.length - 1].match(PLAIN_LITERAL_CHARSET_REGEXP)) {\n return;\n }\n }\n\n return tokens;\n};\n\nconst NULL_RETURN_STATEMENT_PLACEHOLDER = 'IDENTIFIER';\nconst NULL_RETURN_STATEMENT_TEMPLATE = `if (${NULL_RETURN_STATEMENT_PLACEHOLDER} == null) return null; `;\n/**\n * Get early return statements from parsing formula, in order to return null if any\n * of identifiers is null.\n * This statement is needed otherwise the transpiled code from formula simply treats null values as 0\n *\n * E.g. `data?.['ticketCount'] * (data?.['AllInPrice'] + 3)` =>\n * \"if (data?.['ticketCount'] == null) return null; if (data?.['AllInPrice'] == null) return null; \"\n *\n * @param formula\n * @returns\n */\nexport const toNullReturnStatements = (formula: FormulaExecutable): string => {\n const tokens = parseExecutableFormula(formula);\n if (tokens == null) return '';\n\n let statements = '';\n tokens.forEach((t) => {\n if (t.startsWith(FORMULA_DATA_ACCESSOR_PREFIX)) {\n statements += NULL_RETURN_STATEMENT_TEMPLATE.replace(\n NULL_RETURN_STATEMENT_PLACEHOLDER,\n t\n );\n }\n });\n return statements;\n};\n\nexport const filterExecutableFormulaCharacters = (\n formula: FormulaExecutable\n) => {\n let filteredFormula = '';\n let isInsideString = false;\n for (let i = 0; i < formula.length; i++) {\n if (formula.charAt(i) === '[') {\n isInsideString = true;\n } else if (formula.charAt(i) === ']') {\n isInsideString = false;\n filteredFormula += formula.charAt(i);\n }\n if (isInsideString || formula.charAt(i).match(/^[0-9a-z_+\\-*/().? ]+$/i)) {\n filteredFormula += formula.charAt(i);\n }\n }\n return filteredFormula;\n};\n\n/**\n * This is to prevent the case that input formula in some cases \"6 data?.ticketCount + 20\" will be\n * transpiled to multiple statements without any error:\n * \"6 data?.ticketCount + 20\" will become \"return 6; data?.ticketCount + 20;\"\n *\n * @param formula\n * @returns\n */\nexport const validateFormulaSingleStatement = (formula: string) => {\n const code = `({\n evaluate: (data: any): number | null => {\n return (${formula});\n }});`;\n\n const transpiledCode = ts.transpile(code).trim();\n return transpiledCode.split(';').filter((t) => t.length).length === 2;\n};\n\n/**\n * Result type for parseEditableFormulaBase\n */\ntype EditableFormulaParseToken = {\n /**\n * If `isPlainToken` is true, `token` will be plain formula literals\n * If `isPlainToken` is false, `token` will be field name that is type agnostic.\n * Depends on the caller to convert it to suitable type\n */\n token: string;\n isPlainToken: boolean;\n};\n\n/**\n * Parse editableFormula, transforming formula into plain literals and fieldnames\n * E.g. `${ticketCount} + 20` ==> [{token: 'ticketCount', isPlainToken: false}, {token: ' + 20', isPlainToken: true}]\n * @param editableFormula\n * @returns parsed list of tokens, or undefined if failed to parse\n */\nexport const parseEditableFormulaBase = (\n editableFormula: FormulaEditable | undefined,\n returnFieldNameOnly?: boolean\n): EditableFormulaParseToken[] | undefined => {\n const parsedTokenResult: EditableFormulaParseToken[] = [];\n if (!editableFormula) {\n return;\n }\n\n let editableFormulaSliced = editableFormula;\n\n while (editableFormulaSliced.includes('${')) {\n const leftPos = editableFormulaSliced.indexOf('${');\n\n // Plain token\n if (leftPos > 0) {\n if (editableFormulaSliced.slice(0, leftPos).includes('}')) {\n return;\n }\n if (!returnFieldNameOnly) {\n parsedTokenResult.push({\n token: editableFormulaSliced.slice(0, leftPos),\n isPlainToken: true,\n });\n }\n }\n\n let rightPos = leftPos;\n for (; rightPos < editableFormulaSliced.length; rightPos++) {\n if (editableFormulaSliced.charAt(rightPos) === '}') {\n break;\n }\n }\n\n // Field name\n const fieldName = editableFormulaSliced.slice(leftPos + 2, rightPos);\n\n parsedTokenResult.push({\n token: fieldName,\n isPlainToken: false,\n });\n\n editableFormulaSliced = editableFormulaSliced.slice(rightPos + 1);\n }\n\n // Plain token\n if (editableFormulaSliced.length) {\n if (!returnFieldNameOnly) {\n parsedTokenResult.push({\n token: editableFormulaSliced,\n isPlainToken: true,\n });\n }\n }\n\n return parsedTokenResult;\n};\n\ntype CustomColumnFormulaEvaluator = {\n evaluate: (data: {\n [key: string]: number | null | undefined;\n }) => number | null;\n};\n\n/**\n * Evaluate formula defined in custom listing column.\n *\n * Example formula: \"data?.['ticketCount'] + 20\"\n * @param formula\n * @param listingReportMetrics\n * @returns evaluated value, undefined on syntax error\n */\nexport function evaluateFormulaBase(\n formula: FormulaExecutable,\n data?: { [key: string]: number | null | undefined }\n) {\n // Transpile and eval interpolated code can be dangerous if the code is uncontrolled\n // Filter out unwanted characters to make it more secure\n const filteredFormula = filterExecutableFormulaCharacters(formula);\n // If there's anything wrong just don't evaluate it\n if (filteredFormula !== formula) {\n return;\n }\n if (data == null) {\n return;\n }\n\n const nullReturnStatements = toNullReturnStatements(formula);\n const code = `({\n evaluate: (data: any): number | null => {\n ${nullReturnStatements}\n return (${formula});\n }})`;\n\n const transpiledCode = ts.transpile(code);\n\n let result: number | null | undefined = undefined;\n try {\n const evaluator: CustomColumnFormulaEvaluator = eval(transpiledCode);\n result = evaluator.evaluate(data);\n } catch (error) {\n // Empty - result would be undefined\n }\n return result;\n}\n\nexport const tagKeyToFieldName = (tagKey: string) => {\n return `tags.${tagKey}`;\n};\n\nexport const tagFieldNameToKey = (tagFieldName: string) => {\n return tagFieldName.replace('tags.', '');\n};\n\nexport const editableFormulaToTokens = (\n formula: string | undefined,\n fieldOptionsReverse: Record\n) => {\n if (!formula) {\n return [];\n }\n\n const tokens = [];\n const metrics = Object.values(fieldOptionsReverse);\n\n while (formula.length > 0) {\n formula = formula.trim();\n let matchingToken = null;\n for (const metric of metrics) {\n // if (formula.startsWith(token)) {\n if (new RegExp('^\\\\$\\\\{' + metric + '\\\\}').test(formula)) {\n matchingToken = metric;\n break;\n }\n }\n\n if (matchingToken) {\n tokens.push(matchingToken);\n formula = formula.slice(matchingToken.length + 3);\n } else {\n const matches = formula.match(FORMULA_OPERATORS_AND_NUMBERS_REGEXP_START);\n if (matches) {\n tokens.push(matches[0]);\n formula = formula?.slice(matches[0].length);\n }\n }\n }\n return tokens;\n};\n\n/**\n * Find the added single character in the newValue that is not present in oldValue\n * @param oldValue\n * @param newValue\n * @returns\n */\nexport const findAddedSingleChar = (oldValue: string, newValue: string) => {\n if (newValue.length !== oldValue.length + 1) {\n return undefined;\n }\n\n for (let i = 0; i < newValue.length; i++) {\n if (oldValue[i] !== newValue[i]) {\n return newValue[i];\n }\n }\n return undefined;\n};\n","import { ColumnPersonalizationFlags } from './columnUtils.types';\nimport { FormulaEditable, parseEditableFormulaBase } from './customColumnUtils';\n\nexport type MathematicalToken = {\n // This is for debug purpose\n token: string;\n isPlainToken: boolean;\n isCurrency?: boolean;\n isPercent?: boolean;\n};\n\nconst LEFT_PARENTHESIS = '(';\nconst RIGHT_PARENTHESIS = ')';\nconst PLUS = '+';\nconst MINUS = '-';\nconst MULTIPLICATION = '*';\nconst DIVISION = '/';\n\nconst isOperator = (token: string) => {\n return (\n token === PLUS ||\n token === MINUS ||\n token === MULTIPLICATION ||\n token === DIVISION\n );\n};\n\nconst isParenthesis = (token: string) => {\n return token === LEFT_PARENTHESIS || token === RIGHT_PARENTHESIS;\n};\n\n/**\n * Parse plain token into single mathematical tokens\n * E.g. ' + 20' => ['+', '20']\n * E.g. ' - 0.04))' => ['-', '0.04', ')', ')']\n * @param token\n * @returns\n */\nexport const parseMathematicalTokenFromPlainToken = (token: string) => {\n const tokens: string[] = [];\n let currentToken = '';\n for (let i = 0; i < token.length; i++) {\n const char = token[i];\n if (char === ' ') {\n if (currentToken) {\n tokens.push(currentToken);\n currentToken = '';\n }\n continue;\n }\n if (isOperator(char) || isParenthesis(char)) {\n if (currentToken) {\n tokens.push(currentToken);\n currentToken = '';\n }\n tokens.push(char);\n continue;\n }\n currentToken += char;\n }\n if (currentToken) {\n tokens.push(currentToken);\n }\n return tokens.map((t) => t.trim());\n};\n\n/**\n * Take in a list of tokens with only literals and {addition, subtraction}\n * Return the result of the evaluation (e.g. is currency or not)\n * @param tokens\n * @returns\n */\nconst evaluateMathematicalTokensAdditionSubtraction = (\n tokens: MathematicalToken[]\n): MathematicalToken => {\n const tokenStack: MathematicalToken[] = [];\n let i = 0;\n while (i < tokens.length) {\n const token = tokens[i];\n\n if (token.token === PLUS || token.token === MINUS) {\n const previousToken = tokenStack.pop();\n const nextToken = tokens[i + 1];\n\n if (previousToken && nextToken) {\n // If either previousToken or nextToken is currency, the result is currency\n const isCurrency = previousToken.isCurrency || nextToken.isCurrency;\n // If either previousToken and nextToken is percent, the result is percent\n const isPercent = previousToken.isPercent || nextToken.isPercent;\n tokenStack.push({\n token: `(${previousToken.token}) ${token.token} (${nextToken.token})`,\n isPlainToken: false,\n isCurrency,\n isPercent,\n });\n }\n i += 2;\n } else {\n tokenStack.push(token);\n i++;\n }\n }\n return tokenStack[0];\n};\n\n/**\n * Take in a list of tokens with only literals and {addition, subtraction, multiplication, division}\n * Return the result of the evaluation (e.g. is currency or not)\n * @param tokens\n * @returns\n */\nconst evaluateMathematicalTokensMultiplicationDivision = (\n tokens: MathematicalToken[]\n): MathematicalToken => {\n if (tokens.length === 1) {\n return tokens[0];\n }\n\n const tokenStack: MathematicalToken[] = [];\n let i = 0;\n // Handle multiplication and division first\n // throw them into evaluateMathematicalTokensAdditionSubtraction for addition and subtraction\n while (i < tokens.length) {\n const token = tokens[i];\n if (token.token === MULTIPLICATION || token.token === DIVISION) {\n const previousToken = tokenStack.pop();\n const nextToken = tokens[i + 1];\n\n if (!previousToken || !nextToken) {\n break;\n }\n\n if (token.token === MULTIPLICATION) {\n // If either previousToken or nextToken is currency, the result is currency\n const isCurrency = previousToken.isCurrency || nextToken.isCurrency;\n // If either previousToken and nextToken is percent, the result is percent\n const isPercent = Boolean(\n previousToken.isPercent || nextToken.isPercent\n );\n tokenStack.push({\n token: `(${previousToken.token}) * (${nextToken.token})`,\n isPlainToken: false,\n isCurrency,\n isPercent,\n });\n } else {\n // If previousToken is currency and nextToken is not currency, the result is currency\n const isCurrency = Boolean(\n previousToken.isCurrency && !nextToken.isCurrency\n );\n const isPercent = Boolean(\n previousToken.isPercent && !nextToken.isPercent\n );\n tokenStack.push({\n token: `(${previousToken.token}) / (${nextToken.token})`,\n isPlainToken: false,\n isCurrency,\n isPercent,\n });\n }\n i += 2;\n } else {\n tokenStack.push(token);\n i++;\n }\n }\n return evaluateMathematicalTokensAdditionSubtraction(tokenStack);\n};\n\n/**\n * Takes in a list of tokens with only literals and {addition, subtraction, multiplication, division, parentheses}\n * Return the result of the evaluation (e.g. is currency or not)\n *\n * Assumptions: '-' is a binary operator, not a unary operator\n * @param tokens\n * @returns\n */\nexport const evaluateMathematicalTokens = (\n tokens: MathematicalToken[]\n): MathematicalToken => {\n // Handle parentheses - get rid of them and evaluate the expression inside\n // throw them into evaluateMathematicalTokensMultiplicationDivision\n const tokenStack: MathematicalToken[] = [];\n let i = 0;\n while (i < tokens.length) {\n const token = tokens[i];\n\n if (token.token === RIGHT_PARENTHESIS) {\n const tokensWithoutParentheses: MathematicalToken[] = [];\n let poppedToken = tokenStack.pop();\n\n while (poppedToken && poppedToken.token !== LEFT_PARENTHESIS) {\n tokensWithoutParentheses.push(poppedToken);\n poppedToken = tokenStack.pop();\n }\n // tokensWithoutParentheses is in reverse order, so we need to reverse it back\n const tokensWithoutParenthesesTrimmed =\n tokensWithoutParentheses.reverse();\n\n const result = evaluateMathematicalTokensMultiplicationDivision(\n tokensWithoutParenthesesTrimmed\n );\n tokenStack.push(result);\n } else {\n tokenStack.push(token);\n }\n i++;\n }\n\n return evaluateMathematicalTokensMultiplicationDivision(tokenStack);\n};\n\nexport const getPersonalizationFlagsFromFormulaBase = (\n mathTokens: MathematicalToken[] | undefined\n): Partial => {\n if (!mathTokens?.length) {\n return {\n isCurrency: false,\n isPercent: false,\n };\n }\n\n const mergedToken = evaluateMathematicalTokens(mathTokens);\n\n return {\n isCurrency: mergedToken?.isCurrency ?? false,\n isPercent: mergedToken?.isPercent ?? false,\n };\n};\n\n/**\n * Parse editableFormula, transforming formula into plain literals and contentId tied with ColumnId and field name\n * Used for preview and validation.\n * E.g. `${ticketCount} + 20` ==> [ContentId.Original, ' + 20']\n * @param editableFormula\n * @returns parsed list of tokens, or undefined if failed to parse\n */\nexport const parseMathematicalTokensFromFormulaBase = (\n editableFormula: FormulaEditable | undefined,\n getTokenFromFieldName: (fieldName: string) => MathematicalToken\n): MathematicalToken[] | undefined => {\n const parsedTokenResult = parseEditableFormulaBase(editableFormula);\n if (!parsedTokenResult) {\n return;\n }\n\n const tokens: MathematicalToken[] = [];\n parsedTokenResult.forEach((tokenResult) => {\n if (tokenResult.isPlainToken) {\n const parsedPlainTokens = parseMathematicalTokenFromPlainToken(\n tokenResult.token\n );\n tokens.push(\n ...parsedPlainTokens.map((t) => ({ token: t, isPlainToken: true }))\n );\n } else {\n const fieldName = tokenResult.token;\n\n tokens.push(getTokenFromFieldName(fieldName));\n }\n });\n\n return tokens;\n};\n","import { FormulaExecutable } from 'src/utils/columns/customColumnUtils';\nimport { Listing, Tag, UiMoney } from 'src/WebApiController';\n\nimport {\n LISTING_FORMULA_FIELDS_TO_CID,\n ListingFormulaFieldsListing,\n} from '../../constants/contentIdMaps';\nimport { getAllInPriceFromListPrice } from '../../inventoryUtils';\nimport { ColumnPersonalizationFlags } from '../columnUtils.types';\nimport {\n getPersonalizationFlagsFromFormulaBase,\n MathematicalToken,\n parseMathematicalTokensFromFormulaBase,\n} from '../customColumnMathUtils';\nimport {\n evaluateFormulaBase,\n FormulaEditable,\n fromExecutableFormula,\n parseEditableFormulaBase,\n parseExecutableFormula,\n tagFieldNameToKey,\n tagKeyToFieldName,\n validateFormulaSingleStatement,\n} from '../customColumnUtils';\nimport { LISTING_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES } from './inventoryColumnUtils.constants';\nimport { ListingTableColumnId } from './inventoryColumnUtils.types';\nimport { CustomListingColumn } from './inventoryCustomColumnUtils.types';\n\n/**\n * Type dedicated for format evaluation to decouple dependency with `Listing` type\n * Consists of numeric fields from `Listing` supported to add into formula\n *\n * Read before changing:\n * ONLY SAFE WHEN adding fields to this type,\n * changing/removing any field may break the evaluation of existing formula stored in DB\n */\nexport enum ListingFormulaFields {\n availableQuantity = 'availableQuantity',\n soldQuantity = 'soldQuantity',\n ticketCount = 'ticketCount',\n unitCost = 'unitCost',\n soldCost = 'soldCost',\n unsoldCost = 'unsoldCost',\n soldProceeds = 'soldProceeds',\n listPrice = 'listPrice',\n allInPrice = 'allInPrice',\n netProceedsFloor = 'netProceedsFloor',\n netProceedsCeiling = 'netProceedsCeiling',\n websiteFloor = 'websiteFloor',\n websiteCeiling = 'websiteCeiling',\n undercutAbsoluteAmount = 'undercutAbsoluteAmount',\n undercutRelativeAmount = 'undercutRelativeAmount',\n compListingFloor = 'compListingFloor',\n compListingCeiling = 'compListingCeiling',\n}\n\nconst listingToFormulaFields = (listing?: Listing | null) => {\n const tagFields = listing?.tags?.reduce((acc, tag) => {\n const numericValue = parseFloat(tag.value);\n if (isNaN(numericValue)) return acc;\n\n return {\n ...acc,\n [tagKeyToFieldName(tag.key)]: numericValue,\n };\n }, {});\n\n return {\n [ListingFormulaFields.availableQuantity]: listing?.availQty,\n [ListingFormulaFields.ticketCount]: listing?.ticketCnt,\n [ListingFormulaFields.unitCost]:\n listing?.unitCst?.amt || listing?.faceValue?.amt,\n [ListingFormulaFields.listPrice]: listing?.listPrice,\n [ListingFormulaFields.allInPrice]: listing?.allInPrice,\n [ListingFormulaFields.netProceedsFloor]: listing?.procsFloor,\n [ListingFormulaFields.netProceedsCeiling]: listing?.procsCeil,\n [ListingFormulaFields.websiteFloor]: getAllInPriceFromListPrice(\n listing?.procsFloor,\n listing\n ),\n [ListingFormulaFields.websiteCeiling]: getAllInPriceFromListPrice(\n listing?.procsCeil,\n listing\n ),\n [ListingFormulaFields.undercutAbsoluteAmount]: listing?.undAbsAmt,\n [ListingFormulaFields.undercutRelativeAmount]: listing?.undRelAmt,\n [ListingFormulaFields.compListingFloor]: listing?.compFloor,\n [ListingFormulaFields.compListingCeiling]: listing?.compCeil,\n ...tagFields,\n };\n};\n\nexport const FORMULA_FIELD_TO_COLUMN_ID: Record<\n ListingFormulaFieldsListing,\n ListingTableColumnId\n> = {\n [ListingFormulaFields.availableQuantity]: ListingTableColumnId.UnsoldQuantity,\n [ListingFormulaFields.ticketCount]: ListingTableColumnId.TicketCount,\n [ListingFormulaFields.unitCost]: ListingTableColumnId.UnitCost,\n [ListingFormulaFields.listPrice]: ListingTableColumnId.ListPrice,\n [ListingFormulaFields.allInPrice]: ListingTableColumnId.AllInPrice,\n [ListingFormulaFields.netProceedsFloor]: ListingTableColumnId.ProceedsFloor,\n [ListingFormulaFields.netProceedsCeiling]:\n ListingTableColumnId.ProceedsCeiling,\n [ListingFormulaFields.websiteFloor]: ListingTableColumnId.WebsiteFloor,\n [ListingFormulaFields.websiteCeiling]: ListingTableColumnId.WebsiteCeiling,\n [ListingFormulaFields.undercutAbsoluteAmount]:\n ListingTableColumnId.UndercutAbsoluteAmount,\n [ListingFormulaFields.undercutRelativeAmount]:\n ListingTableColumnId.UndercutRelativeAmount,\n [ListingFormulaFields.compListingFloor]:\n ListingTableColumnId.CompListingFloor,\n [ListingFormulaFields.compListingCeiling]:\n ListingTableColumnId.CompListingCeiling,\n};\n\nexport const filterCustomColumnsForListing = (\n customColumns: CustomListingColumn[],\n tagsForEntityType: Tag[] | undefined\n): CustomListingColumn[] => {\n const listingFormulaFields = Object.keys(LISTING_FORMULA_FIELDS_TO_CID);\n const tagKeys = tagsForEntityType?.map((t) => tagKeyToFieldName(t.key)) ?? [];\n return customColumns.filter((column) => {\n const editableFormula = fromExecutableFormula(column.formula);\n if (!editableFormula) return false;\n\n const fieldNamesUsed =\n parseEditableFormulaBase(editableFormula, true)?.map((t) => t.token) ??\n [];\n\n return fieldNamesUsed.every(\n (f) => listingFormulaFields.includes(f) || tagKeys.includes(f)\n );\n });\n};\n\n/**\n * Mock listing data explicitly used to test-evaluate formula\n * not putting under src/mock to reduce coupling\n */\nexport const LISTING_FORMULA_TEST_DATA: Listing = {\n availQty: 1,\n ticketCnt: 1,\n unitCst: { amt: 1 } as UiMoney,\n faceValue: { amt: 2 } as UiMoney,\n listPrice: 1,\n allInPrice: 1,\n procsFloor: 1,\n procsCeil: 1,\n undAbsAmt: 1,\n undRelAmt: 1,\n compFloor: 1,\n} as Listing;\n\n/**\n * Parse editableFormula, transforming formula into plain literals and contentId tied with ColumnId and field name\n * Used for preview and validation.\n * E.g. `${ticketCount} + 20` ==> [ContentId.Original, ' + 20']\n * @param editableFormula\n * @returns parsed list of tokens, or undefined if failed to parse\n */\nexport const parseEditableFormula = (\n editableFormula: FormulaEditable | undefined\n): string[] | undefined => {\n const parsedTokenResult = parseEditableFormulaBase(editableFormula);\n if (!parsedTokenResult) {\n return;\n }\n\n const tokens: string[] = [];\n parsedTokenResult.forEach((tokenResult) => {\n if (tokenResult.isPlainToken) {\n tokens.push(tokenResult.token);\n } else {\n const fieldName = tokenResult.token;\n if (\n LISTING_FORMULA_FIELDS_TO_CID[\n fieldName as ListingFormulaFieldsListing\n ] == null\n ) {\n // Tag field\n tokens.push(tagFieldNameToKey(fieldName));\n return;\n }\n tokens.push(\n LISTING_FORMULA_FIELDS_TO_CID[fieldName as ListingFormulaFieldsListing]\n );\n }\n });\n\n return tokens;\n};\n\nexport const findDependentListingTableColumnIds = (\n editableFormula: FormulaEditable\n): ListingTableColumnId[] => {\n const fieldNames =\n parseEditableFormulaBase(editableFormula, true)?.map((t) => t.token) ?? [];\n\n return (\n Object.entries(FORMULA_FIELD_TO_COLUMN_ID)\n .filter(([key]) => fieldNames.includes(key))\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n .map(([_, value]) => value)\n );\n};\n\n/**\n * Evaluate formula defined in custom listing column.\n *\n * Example formula: \"data?.ticketCount + 20\"\n * @param formula\n * @param listing\n * @returns evaluated value, undefined on syntax error\n */\nexport const evaluateFormula = (\n formula: FormulaExecutable,\n listing?: Listing | null\n) => {\n const data = listingToFormulaFields(listing);\n\n return evaluateFormulaBase(formula, data);\n};\n\nconst createListingTestData = (\n tagsForEntityType: Tag[] | undefined\n): Listing => {\n const tagData = tagsForEntityType?.map((t) => {\n t.value = '1';\n return t;\n });\n\n return {\n ...LISTING_FORMULA_TEST_DATA,\n tags: tagData ?? [],\n };\n};\n\nexport const validateFormula = (\n formula: string,\n tagsForEntityType: Tag[] | undefined\n) => {\n return (\n parseExecutableFormula(formula) != null &&\n evaluateFormula(formula, createListingTestData(tagsForEntityType)) !=\n null &&\n validateFormulaSingleStatement(formula)\n );\n};\n\nconst getTokenFromFieldName = (fieldName: string): MathematicalToken => {\n const columnId =\n FORMULA_FIELD_TO_COLUMN_ID[fieldName as ListingFormulaFieldsListing];\n\n if (columnId == null) {\n // Tag field - here we assume it's not currency - might need to change\n return {\n token: `tag-${fieldName}`,\n isPlainToken: false,\n isCurrency: false,\n };\n }\n\n const { isCurrency, isPercent } =\n LISTING_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[columnId];\n\n return {\n token: columnId,\n isPlainToken: false,\n isCurrency,\n isPercent,\n };\n};\n\n/**\n * Parse editableFormula, transforming formula into mathematical tokens\n * to infer personalization flags\n *\n * E.g. `${ticketCount} + 20` ==> [\n * { token: 'ticketCount', isCurrency: false, isPercent: false, isPlainToken: false },\n * { token: '+', isCurrency: false, isPercent: false, isPlainToken: true },\n * { token: '20', isCurrency: false, isPercent: false, isPlainToken: true }\n * ]\n * @param editableFormula\n * @returns parsed list of tokens, or undefined if failed to parse\n */\nexport const parseMathematicalTokensFromFormula = (\n editableFormula: FormulaEditable | undefined\n): MathematicalToken[] | undefined => {\n return parseMathematicalTokensFromFormulaBase(\n editableFormula,\n getTokenFromFieldName\n );\n};\n\nexport const getPersonalizationFlagsFromFormula = (\n executableFormula: FormulaExecutable\n): Partial => {\n const editableFormula = fromExecutableFormula(executableFormula);\n const mathTokens = parseMathematicalTokensFromFormula(editableFormula);\n\n return getPersonalizationFlagsFromFormulaBase(mathTokens);\n};\n","export const ACTIVE_EVENT_IDS_QUERY_PARAM = 'activeEventIds';\nexport const ACTIVE_EVENT_IDS_2_QUERY_PARAM = 'activeEventIds2';\nexport const TAB_EVENT_IDS_QUERY_PARAM = 'tabEventIds';\nexport const TAB_EVENT_IDS_2_QUERY_PARAM = 'tabEventIds2';\nexport const TAB_EVENT_IDS_SEPARATOR = ',';\nexport const POS_EVENT_IDS_SEPARATOR = '|';\n","import { useCallback, useMemo } from 'react';\nimport { useSearchParams } from 'react-router-dom';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ACTIVE_EVENT_IDS_2_QUERY_PARAM,\n ACTIVE_EVENT_IDS_QUERY_PARAM,\n POS_EVENT_IDS_SEPARATOR,\n TAB_EVENT_IDS_2_QUERY_PARAM,\n TAB_EVENT_IDS_QUERY_PARAM,\n TAB_EVENT_IDS_SEPARATOR,\n} from 'src/navigations/Routes/InventoryEvent/InventoryEvent.constants';\nimport { MainRoute } from 'src/navigations/Routes/MainRoute';\n\nexport const useCatchUpParams = () => {\n const [searchParams, setSearchParams] = useSearchParams();\n const { mainRoute } = useAppContext();\n\n const posEventIds = searchParams\n .get(TAB_EVENT_IDS_QUERY_PARAM)\n ?.toLowerCase();\n const activeEventIds = searchParams\n .get(ACTIVE_EVENT_IDS_QUERY_PARAM)\n ?.toLowerCase();\n\n const viagVirtualIds = searchParams\n .get(TAB_EVENT_IDS_2_QUERY_PARAM)\n ?.toLowerCase();\n const activeViagVirtualId = searchParams\n .get(ACTIVE_EVENT_IDS_2_QUERY_PARAM)\n ?.toLowerCase();\n\n // [['event1', 'event2'], ['event3', 'event4'], ['event5']]\n const posEventIdsList = useMemo(\n () =>\n posEventIds\n ?.split(TAB_EVENT_IDS_SEPARATOR)\n ?.map((eid) => eid.split(POS_EVENT_IDS_SEPARATOR)),\n [posEventIds]\n );\n\n const viagVirtualIdsList = useMemo(\n () => viagVirtualIds?.split(TAB_EVENT_IDS_SEPARATOR),\n [viagVirtualIds]\n );\n\n const numberOfEvents = useMemo(\n () => viagVirtualIdsList?.length ?? posEventIdsList?.length,\n [posEventIdsList?.length, viagVirtualIdsList?.length]\n );\n\n const selectedIndex = useMemo(() => {\n if (activeEventIds && posEventIdsList) {\n const activePosEventIds = activeEventIds.split(POS_EVENT_IDS_SEPARATOR);\n return posEventIdsList.findIndex((posEventIds) =>\n activePosEventIds.some((posEventId) => posEventIds.includes(posEventId))\n );\n } else if (activeViagVirtualId && viagVirtualIdsList) {\n return viagVirtualIdsList.findIndex(\n (viagId) => activeViagVirtualId === viagId\n );\n }\n }, [\n activeEventIds,\n activeViagVirtualId,\n posEventIdsList,\n viagVirtualIdsList,\n ]);\n\n const isCatchupMode = useMemo(\n () =>\n mainRoute === MainRoute.InventoryEvent &&\n ((activeEventIds && posEventIds) ||\n (activeViagVirtualId && viagVirtualIds)),\n [\n mainRoute,\n activeEventIds,\n posEventIds,\n activeViagVirtualId,\n viagVirtualIds,\n ]\n );\n\n const onPrevClick = useCallback(() => {\n if (\n (posEventIdsList == null && viagVirtualIdsList == null) ||\n selectedIndex == null\n ) {\n return;\n }\n const index = selectedIndex - 1;\n if (index >= 0) {\n if (posEventIdsList) {\n setSearchParams((prev) => {\n prev.set(\n ACTIVE_EVENT_IDS_QUERY_PARAM,\n posEventIdsList[index].join(POS_EVENT_IDS_SEPARATOR)\n );\n return prev;\n });\n } else if (viagVirtualIdsList) {\n setSearchParams((prev) => {\n prev.set(ACTIVE_EVENT_IDS_2_QUERY_PARAM, viagVirtualIdsList[index]);\n return prev;\n });\n }\n }\n }, [posEventIdsList, selectedIndex, setSearchParams, viagVirtualIdsList]);\n\n const onNextClick = useCallback(() => {\n if (\n (posEventIdsList == null && viagVirtualIdsList == null) ||\n selectedIndex == null\n ) {\n return;\n }\n const index = selectedIndex + 1;\n if (posEventIdsList) {\n if (index < posEventIdsList.length) {\n setSearchParams((prev) => {\n prev.set(\n ACTIVE_EVENT_IDS_QUERY_PARAM,\n posEventIdsList[index].join(POS_EVENT_IDS_SEPARATOR)\n );\n return prev;\n });\n }\n } else if (viagVirtualIdsList) {\n if (index < viagVirtualIdsList.length) {\n setSearchParams((prev) => {\n prev.set(ACTIVE_EVENT_IDS_2_QUERY_PARAM, viagVirtualIdsList[index]);\n return prev;\n });\n }\n }\n }, [posEventIdsList, selectedIndex, setSearchParams, viagVirtualIdsList]);\n\n return {\n posEventIdsList,\n viagVirtualIdsList,\n activeEventIds,\n activeViagVirtualId,\n numberOfEvents,\n selectedIndex,\n onPrevClick,\n onNextClick,\n setSearchParams,\n isCatchupMode,\n };\n};\n","import signalR, {\n HubConnection,\n HubConnectionBuilder,\n HubConnectionState,\n} from '@microsoft/signalr';\nimport {\n createContext,\n ReactNode,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport { useNavigate, useSearchParams } from 'react-router-dom';\nimport { InventoryEventTabs } from 'src/components/Listings/InventoryEventPage';\nimport { useCatchUpParams } from 'src/components/Listings/InventoryEventPage/InventoryEventPage.hooks';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport {\n EventSessionIdQueryParam,\n EventSessionRoleQueryParam,\n} from 'src/utils/constants/constants';\nimport { newGuidId } from 'src/utils/idUtils';\nimport {\n ActionOutboxEntityType,\n Feature,\n ListingClient,\n} from 'src/WebApiController';\n\nimport { useAppContext } from '../AppContext';\nimport { useCatalogDataContext } from '../CatalogDataContext';\nimport { SignalRLogger } from '../NotificationsContext';\n\nexport enum EventSessionRole {\n Main = 'main',\n SidePanel = 'sidePanel',\n}\n\nexport type IEventHubContext = {\n hubConnection?: HubConnection;\n onStartSession: () => void;\n onCancelSession: () => void;\n onSelectListing: (listingId: number) => void;\n onSectionsSelected: (sectionIds: number[]) => void;\n onUpdateListing: (listingId: number) => void;\n onUpdateInventoryTab: (tab: InventoryEventTabs) => void;\n sessionRole: EventSessionRole | undefined;\n selectedListingId: number | undefined;\n selectedVenueMapSections: number[];\n inventoryTab: InventoryEventTabs | undefined;\n enabled: boolean;\n};\n\nexport const EventHubContext = createContext({\n hubConnection: undefined,\n onStartSession: () => void 0,\n onCancelSession: () => void 0,\n onSelectListing: (_) => void 0,\n onSectionsSelected: (_: number[]) => void 0,\n onUpdateListing: (_) => void 0,\n onUpdateInventoryTab: (_) => void 0,\n sessionRole: undefined,\n selectedListingId: undefined,\n selectedVenueMapSections: [],\n inventoryTab: undefined,\n enabled: false,\n});\n\nexport const useEventHubContext = () => useContext(EventHubContext);\n\nexport function EventHubContextProvider({ children }: { children: ReactNode }) {\n const { activeAccountWebClientConfig } = useAppContext();\n const hasEventMultiScreenFeature = useUserHasFeature(\n Feature.EventMultiScreen\n );\n const { updateItemInEvent } = useCatalogDataContext();\n const [hubConnection, setHubConnection] = useState();\n\n const navigate = useNavigate();\n\n const [searchParams] = useSearchParams();\n const { isCatchupMode } = useCatchUpParams();\n\n const sessionId = searchParams.get(EventSessionIdQueryParam) ?? undefined;\n const sessionRole = searchParams.get(EventSessionRoleQueryParam) ?? undefined;\n\n const [selectedListingId, setSelectedListingId] = useState();\n const [inventoryTab, setInventoryTab] = useState();\n const [selectedVenueMapSections, setSelectedVenueMapSections] = useState<\n number[]\n >([]);\n\n const reset = useCallback(() => {\n setSelectedListingId(undefined);\n setInventoryTab(undefined);\n setSelectedVenueMapSections([]);\n }, []);\n\n useEffect(() => {\n // Only attempt to connect to signal R when there is a login\n if (\n hasEventMultiScreenFeature &&\n activeAccountWebClientConfig.activeAccountId\n ) {\n if (\n !hubConnection ||\n hubConnection.state === HubConnectionState.Disconnected ||\n hubConnection.state === HubConnectionState.Disconnecting\n ) {\n const newHubConnection = new HubConnectionBuilder()\n .withUrl('/hubs/event')\n .withAutomaticReconnect()\n .configureLogging(new SignalRLogger())\n .build();\n\n setHubConnection(newHubConnection);\n\n newHubConnection\n .start()\n .then(() => {\n console.debug(\n `Event connection ready with id: ${newHubConnection.connectionId}`\n );\n })\n .catch((err) => {\n console.warn('Event could not be started at this time: ' + err);\n });\n\n newHubConnection.onclose((err) => {\n console.debug('Event connection closed', err);\n });\n }\n }\n\n return () => {\n if (\n hubConnection &&\n !(\n hubConnection.state === HubConnectionState.Disconnected ||\n hubConnection.state === HubConnectionState.Disconnecting\n )\n ) {\n console.debug(\n `Stopping ListingNotification connection (state: ${hubConnection.state}) with id: ${hubConnection.connectionId}`\n );\n hubConnection.stop();\n setHubConnection(undefined);\n reset();\n }\n };\n }, [\n activeAccountWebClientConfig.activeAccountId,\n hasEventMultiScreenFeature,\n hubConnection,\n reset,\n ]);\n\n const onStartSession = useCallback(() => {\n if (sessionRole || !hasEventMultiScreenFeature) {\n return;\n }\n const sessionId = newGuidId();\n\n searchParams.set(EventSessionIdQueryParam, sessionId);\n searchParams.set(EventSessionRoleQueryParam, EventSessionRole.Main);\n\n navigate(`/inventory/event?${searchParams.toString()}`, {\n replace: true,\n });\n\n searchParams.set(EventSessionRoleQueryParam, EventSessionRole.SidePanel);\n\n window.open(`/inventory/event?${searchParams.toString()}`, '_blank');\n }, [hasEventMultiScreenFeature, navigate, searchParams, sessionRole]);\n\n const onCancelSession = useCallback(() => {\n if (hasEventMultiScreenFeature && sessionId) {\n hubConnection?.invoke('StopSession', sessionId);\n }\n }, [hasEventMultiScreenFeature, hubConnection, sessionId]);\n\n const onSelectListing = useCallback(\n (listingId: number) => {\n if (hasEventMultiScreenFeature && sessionId) {\n hubConnection?.invoke('SelectListing', sessionId, listingId);\n }\n },\n [hasEventMultiScreenFeature, sessionId, hubConnection]\n );\n\n const onUpdateListing = useCallback(\n (listingId: number) => {\n if (hasEventMultiScreenFeature && sessionId && sessionRole && listingId) {\n hubConnection?.invoke(\n 'UpdateListing',\n sessionId,\n listingId,\n sessionRole\n );\n }\n },\n [hasEventMultiScreenFeature, hubConnection, sessionId, sessionRole]\n );\n\n // This is to broadcast the venue map section selection from side panel to main\n const onSectionsSelected = useCallback(\n (selectedSections: number[]) => {\n if (\n hasEventMultiScreenFeature &&\n sessionId &&\n sessionRole === EventSessionRole.SidePanel\n ) {\n hubConnection?.invoke(\n 'UpdateSelectedSections',\n sessionId,\n JSON.stringify(selectedSections),\n sessionRole\n );\n }\n },\n [hasEventMultiScreenFeature, hubConnection, sessionId, sessionRole]\n );\n\n // This is to broadcast the event inventory tab update from main to side panel\n const onUpdateInventoryTab = useCallback(\n (inventoryTab: InventoryEventTabs) => {\n if (\n hasEventMultiScreenFeature &&\n sessionId &&\n sessionRole === EventSessionRole.Main &&\n inventoryTab\n ) {\n hubConnection?.invoke(\n 'UpdateInventoryTab',\n sessionId,\n inventoryTab,\n sessionRole\n );\n }\n },\n [hasEventMultiScreenFeature, hubConnection, sessionId, sessionRole]\n );\n\n useEffect(() => {\n const onListingSelected = (serverSessionId: string, listingId: number) => {\n if (\n sessionId === serverSessionId &&\n sessionRole === EventSessionRole.SidePanel\n ) {\n setSelectedListingId(listingId);\n }\n };\n const onStopSession = (serverSessionId: string) => {\n if (sessionId === serverSessionId) {\n searchParams.delete(EventSessionIdQueryParam);\n searchParams.delete(EventSessionRoleQueryParam);\n\n navigate(`/inventory/event?${searchParams.toString()}`, {\n replace: true,\n });\n reset();\n }\n };\n const onListingUpdated = async (\n serverSessionId: string,\n listingId: number,\n fromRole: EventSessionRole\n ) => {\n if (\n hasEventMultiScreenFeature &&\n sessionId === serverSessionId &&\n fromRole !== sessionRole\n ) {\n // Refersh listing (whole - since we don't know which part of the listing was updated)\n const updated = await new ListingClient({\n activeAccountId: activeAccountWebClientConfig.activeAccountId,\n }).getListingByListingId(listingId, undefined, undefined);\n if (updated) {\n updateItemInEvent(updated, ActionOutboxEntityType.Listing);\n }\n }\n };\n const onInventoryTabUpdated = (\n serverSessionId: string,\n tab: InventoryEventTabs,\n _: EventSessionRole\n ) => {\n if (\n sessionId === serverSessionId &&\n sessionRole === EventSessionRole.SidePanel\n ) {\n setInventoryTab(tab);\n }\n };\n const onVenueMapSectionsUpdated = (\n serverSessionId: string,\n selectedSectionsJson: string,\n _: EventSessionRole\n ) => {\n if (\n sessionId === serverSessionId &&\n sessionRole === EventSessionRole.Main\n ) {\n setSelectedVenueMapSections(\n JSON.parse(selectedSectionsJson) as number[]\n );\n }\n };\n hubConnection?.on('OnListingSelected', onListingSelected);\n hubConnection?.on('OnListingUpdated', onListingUpdated);\n hubConnection?.on('OnInventoryTabUpdated', onInventoryTabUpdated);\n hubConnection?.on('OnVenueMapSectionsUpdated', onVenueMapSectionsUpdated);\n hubConnection?.on('OnStopSession', onStopSession);\n\n return () => {\n hubConnection?.off('OnListingSelected', onListingSelected);\n hubConnection?.off('OnListingUpdated', onListingUpdated);\n hubConnection?.off('OnInventoryTabUpdated', onInventoryTabUpdated);\n hubConnection?.off(\n 'OnVenueMapSectionsUpdated',\n onVenueMapSectionsUpdated\n );\n hubConnection?.off('OnStopSession', onStopSession);\n };\n }, [\n sessionId,\n hubConnection,\n sessionRole,\n onStartSession,\n onCancelSession,\n searchParams,\n navigate,\n reset,\n hasEventMultiScreenFeature,\n activeAccountWebClientConfig.activeAccountId,\n updateItemInEvent,\n setInventoryTab,\n ]);\n\n const enabled = useMemo(() => {\n // Disable when feature is off\n if (!hasEventMultiScreenFeature) {\n return false;\n }\n\n if (hubConnection?.state !== HubConnectionState.Connected) {\n return false;\n }\n\n // disable for catchup mode\n if (isCatchupMode) {\n return false;\n }\n\n return true;\n }, [hasEventMultiScreenFeature, hubConnection?.state, isCatchupMode]);\n\n return (\n \n {children}\n \n );\n}\n","import { Content } from 'src/contexts/ContentContext';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { useAlertWithSuppressionDialog } from './useAlertWithSuppressionDialog';\n\nexport function useManualPriceAdjustFloorOrCeilingDialog(\n listPrice: number | null,\n netProceedsFloor: number | null | undefined,\n netProceedsCeiling: number | null,\n onOkay: () => void,\n onCancel: () => void\n) {\n const { value, ...rest } = useAlertWithSuppressionDialog(\n 'manualPriceAdjustFloorOrCeilingTimestamp',\n onOkay,\n onCancel\n );\n return {\n ...rest,\n lastTimeStamp: value?.manualPriceAdjustFloorOrCeilingTimestamp,\n bodyText: (\n (netProceedsCeiling ?? Number.MAX_VALUE)\n ? ContentId.ManualPriceAdjustCeilingWarning\n : ContentId.EmptyContent\n }\n />\n ),\n };\n}\n","import { isEqual } from 'lodash-es';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport { FormProvider, useForm, UseFormSetValue } from 'react-hook-form';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { useEventHubContext } from 'src/contexts/EventHubContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport {\n Alert,\n AlertWithSuppressionDialog,\n useManualPriceDisableAutoPricingDialog,\n useSuspiciousPriceChangeDialog,\n} from 'src/dialogs/AlertWithSuppressionDialog';\nimport { useManualPriceAdjustFloorOrCeilingDialog } from 'src/dialogs/AlertWithSuppressionDialog/useManualPriceAdjustFloorOrCeilingDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport {\n validateAutoPricingSettings,\n validateCompListingSettings,\n validateUndercutSettings,\n} from 'src/utils/autoPricingUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { isDatePassedHours } from 'src/utils/dateTimeUtils';\nimport { isSuccess } from 'src/utils/errorUtils';\nimport {\n getListingDetailsUpdateInput,\n isSuspiciousPriceChange,\n} from 'src/utils/inventoryUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n Feature,\n Listing,\n ListingClient,\n ListingDetailDataField,\n ListingDetails,\n ListingDetailsAutoPricingSectionUpdates,\n ListingDetailsPricingSectionUpdates,\n ListingDetailsUpdateInput,\n} from 'src/WebApiController';\n\nimport { ListingWithEvent } from '../ListingTable.types';\nimport { ListingPricingInput } from './ListingPriceForm.types';\n\nexport function ListingPricingForm({\n rowData,\n tableRow,\n}: {\n rowData: ListingWithEvent | null;\n tableRow: React.ReactNode;\n}) {\n const { getUiCurrency } = useLocalizationContext();\n const uiCurrency = useMemo(\n () => getUiCurrency(rowData?.listing?.currency),\n [getUiCurrency, rowData?.listing?.currency]\n );\n const hasSectionalLoadDataFeature = useUserHasFeature(\n Feature.ListingLoadBySection\n );\n const hasAllowSeatScoreCompListingMode = useUserHasFeature(\n Feature.AllowSeatScoreCompListingMode\n );\n\n const createListingPricingInput = useCallback(\n (listing?: Listing | null) => ({\n ...getListingDetailsUpdateInput(\n listing as ListingDetails,\n uiCurrency,\n undefined,\n null,\n null,\n false,\n null,\n hasAllowSeatScoreCompListingMode\n ),\n isSubmitting: false,\n rowIndex: rowData?.rowIndex || 0,\n currentPageIndex: rowData?.currentPageIndex || 0,\n }),\n [\n hasAllowSeatScoreCompListingMode,\n rowData?.currentPageIndex,\n rowData?.rowIndex,\n uiCurrency,\n ]\n );\n\n const methods = useForm({\n defaultValues: createListingPricingInput(rowData?.listing),\n });\n const { activeAccountWebClientConfig } = useAppContext();\n const {\n reset,\n formState,\n watch,\n setValue,\n setError,\n clearErrors,\n getValues,\n } = methods;\n const { showErrorDialog } = useErrorBoundaryContext();\n const setPriceSettingValues =\n setValue as unknown as UseFormSetValue;\n const { updateItemInEvent } = useCatalogDataContext();\n const { onUpdateListing } = useEventHubContext();\n\n // Nuance - this is necessary so the form picks up whenever the listing changed outside the table\n // like when ListingModal made edits to the data of this listing\n useEffect(() => {\n if (\n formState.defaultValues == null ||\n (rowData?.listing &&\n (rowData.listing.rowVer === 0 || // zero means reset\n rowData.listing.rowVer > (formState.defaultValues.rowVersion ?? 0)))\n ) {\n const newForm = createListingPricingInput(rowData?.listing);\n if (!isEqual(newForm, formState.defaultValues)) {\n reset(createListingPricingInput(rowData?.listing));\n }\n }\n }, [\n methods,\n reset,\n rowData?.listing,\n rowData?.rowIndex,\n rowData?.currentPageIndex,\n uiCurrency,\n createListingPricingInput,\n formState.defaultValues,\n ]);\n\n const listPrice = watch('listPrice') ?? -1;\n const allInPrice = watch('allInPrice') ?? -1;\n const isSubmitting = watch('isSubmitting');\n const autoPricingEnabled = watch('autoPricingEnabled');\n const netProceedsFloor = watch('netProceedsFloor') ?? 0;\n const netProceedsCeiling = watch('netProceedsCeiling');\n const isSubmittingPricingSettings = watch('isSubmittingPricingSettings');\n const compListingFloor = watch('compListingFloor');\n const compListingCeiling = watch('compListingCeiling');\n const undercutAbsoluteAmount = watch('undercutAbsoluteAmount');\n const undercutRelativeAmount = watch('undercutRelativeAmount');\n const undercutMode = watch('undercutMode');\n const compListingMode = watch('compListingMode');\n const compListingQuantityScoreAdjustmentEnabled = watch(\n 'compListingQuantityScoreAdjustmentEnabled'\n );\n const compListingQuantityScoreAdjustmentOverrideJson = watch(\n 'compListingQuantityScoreAdjustmentOverrideJson'\n );\n const compListingOnlyForSameZoneEnabled = watch(\n 'compListingOnlyForSameZoneEnabled'\n );\n const compListingOnlyForSelectedSectionsEnabled = watch(\n 'compListingOnlyForSelectedSectionsEnabled'\n );\n const compListingExcludeFanInventory = watch(\n 'compListingExcludeFanInventory'\n );\n const outlierMode = watch('outlierMode');\n const outlierStandardDeviations = watch('outlierStandardDeviations');\n const outlierKthLowestLimit = watch('outlierKthLowestLimit');\n const outlierKthLowestLimitAbsoluteSpacing = watch(\n 'outlierKthLowestLimitAbsoluteSpacing'\n );\n const outlierKthLowestLimitRelativeSpacing = watch(\n 'outlierKthLowestLimitRelativeSpacing'\n );\n const circuitBreakerMinCompListingCount = watch(\n 'circuitBreakerMinCompListingCount'\n );\n const circuitBreakerMaxDiscountVelocityPercent = watch(\n 'circuitBreakerMaxDiscountVelocityPercent'\n );\n const circuitBreakerMaxDiscountVelocityTicksInHours = watch(\n 'circuitBreakerMaxDiscountVelocityTicksInHours'\n );\n\n const submitPriceChange = useCallback(() => {\n if (!rowData?.listing) return;\n\n const values = getValues();\n\n tryInvokeApi(\n async () => {\n const client = new ListingClient(activeAccountWebClientConfig);\n const listing = rowData!.listing!;\n const input: ListingDetailsPricingSectionUpdates = {\n id: listing.id,\n rowVersion: null,\n listPrice: values.listPrice ?? listPrice,\n allInPrice: null, // will be inferred from list price\n buyerUserId: null,\n marketplacePriceUpdates: [],\n netProceedsFloor: values.netProceedsFloor ?? netProceedsFloor,\n netProceedsCeiling: values.netProceedsCeiling ?? netProceedsCeiling,\n autoPricingEnabled: values.autoPricingEnabled ?? autoPricingEnabled,\n pricerSellerUserId: listing.pricerId,\n currencyCode: listing.currency,\n };\n const result = await client.updateListingPricingSection(input);\n if (isSuccess(result)) {\n // Refersh listing\n const updated = await client.getListingByListingId(\n listing.id,\n hasSectionalLoadDataFeature\n ? (listing as ListingDetails)\n : undefined,\n hasSectionalLoadDataFeature\n ? [ListingDetailDataField.Pricing]\n : null\n );\n if (updated) {\n updateItemInEvent(updated, ActionOutboxEntityType.Listing);\n onUpdateListing(updated.id);\n }\n }\n return;\n },\n (error) => {\n showErrorDialog('ListingClient.updateListing(prices)', error, {\n trackErrorData: { listingId: rowData?.listing!.id, listPrice },\n });\n }\n );\n }, [\n rowData,\n activeAccountWebClientConfig,\n listPrice,\n netProceedsFloor,\n netProceedsCeiling,\n autoPricingEnabled,\n hasSectionalLoadDataFeature,\n updateItemInEvent,\n onUpdateListing,\n showErrorDialog,\n getValues,\n ]);\n\n const warningDialog = useBasicDialog();\n\n const submitPricingSettingsChange = useCallback(\n (listForm: ListingPricingInput) => {\n if (!rowData?.listing) return;\n\n tryInvokeApi(\n async () => {\n const client = new ListingClient(activeAccountWebClientConfig);\n const listing = rowData!.listing!;\n const input: ListingDetailsAutoPricingSectionUpdates = {\n ...listForm,\n id: listing.id,\n rowVersion: null,\n autoPriceFrequency: null,\n compListingQuantityFilters: null,\n compListingQuantityScoreAdjustmentOverrides: null,\n scoreModel: null,\n autoPricingDefaultQuantityFiltersJson: null,\n venueZoneOverrideId: null,\n venueZoneConfigType: null,\n };\n await client.updateListingAutoPricingSection(input);\n\n // Refersh listing\n const updatedListing = await client.getListingByListingId(\n listing.id,\n hasSectionalLoadDataFeature\n ? (listing as ListingDetails)\n : undefined,\n hasSectionalLoadDataFeature\n ? [\n ListingDetailDataField.Pricing, // To refresh pricing related listing fields, i.e. auto pricing enabled\n ListingDetailDataField.AutoPricing,\n ]\n : null\n );\n if (updatedListing) {\n updateItemInEvent(updatedListing, ActionOutboxEntityType.Listing);\n reset(createListingPricingInput(updatedListing));\n onUpdateListing(updatedListing.id);\n }\n },\n (error) => {\n showErrorDialog(\n 'ListingClient.updateListing(pricingSettings)',\n error,\n { trackErrorData: listForm }\n );\n }\n );\n },\n [\n rowData,\n activeAccountWebClientConfig,\n hasSectionalLoadDataFeature,\n updateItemInEvent,\n reset,\n createListingPricingInput,\n onUpdateListing,\n showErrorDialog,\n ]\n );\n\n const suspiciousPriceChangeHookProps = useSuspiciousPriceChangeDialog(\n () => {\n submitPriceChange();\n },\n () => {\n // revert back\n setValue('listPrice', formState.defaultValues?.listPrice ?? null);\n setValue('allInPrice', formState.defaultValues?.allInPrice ?? null);\n setValue('isSubmitting', false);\n }\n );\n\n const manualPriceDisableAutoPricingProps =\n useManualPriceDisableAutoPricingDialog(() =>\n setValue('autoPricingEnabled', false)\n );\n\n const manualPriceAdjustFloorCeilingProps =\n useManualPriceAdjustFloorOrCeilingDialog(\n listPrice,\n netProceedsFloor,\n netProceedsCeiling,\n () => {\n if ((listPrice ?? 0) < (netProceedsFloor ?? Number.MIN_VALUE)) {\n setValue('netProceedsFloor', listPrice);\n } else if (\n (listPrice ?? 0) > (netProceedsCeiling ?? Number.MAX_VALUE)\n ) {\n setValue('netProceedsCeiling', listPrice);\n }\n },\n () => {\n if ((listPrice ?? 0) < (netProceedsFloor ?? Number.MIN_VALUE)) {\n setValue('listPrice', netProceedsFloor);\n } else if (\n (listPrice ?? 0) > (netProceedsCeiling ?? Number.MAX_VALUE)\n ) {\n setValue('listPrice', netProceedsCeiling);\n }\n }\n );\n\n const requiredMsg = useContent(ContentId.Required);\n const [alerts, setAlerts] = useState([]);\n\n const floorMustBeLessThanCeilingError = useContent(\n ContentId.FloorMustBeLessThanCeiling\n );\n const compListingFloorCeilingError = useContent(\n ContentId.CompListingFloorMustLessThanCeiling\n );\n\n useEffect(() => {\n // Input validity?\n if (isSubmittingPricingSettings) {\n if (\n autoPricingEnabled === formState.defaultValues?.autoPricingEnabled &&\n undercutAbsoluteAmount ===\n formState.defaultValues?.undercutAbsoluteAmount &&\n undercutRelativeAmount ===\n formState.defaultValues?.undercutRelativeAmount &&\n undercutMode === formState.defaultValues?.undercutMode &&\n compListingMode === formState.defaultValues?.compListingMode &&\n compListingCeiling === formState.defaultValues?.compListingCeiling &&\n compListingFloor === formState.defaultValues?.compListingFloor &&\n compListingQuantityScoreAdjustmentEnabled ===\n formState.defaultValues?.compListingQuantityScoreAdjustmentEnabled &&\n compListingOnlyForSelectedSectionsEnabled ===\n formState.defaultValues?.compListingOnlyForSelectedSectionsEnabled &&\n compListingQuantityScoreAdjustmentOverrideJson ===\n formState.defaultValues\n ?.compListingQuantityScoreAdjustmentOverrideJson &&\n compListingOnlyForSameZoneEnabled ===\n formState.defaultValues?.compListingOnlyForSameZoneEnabled &&\n compListingExcludeFanInventory ===\n formState.defaultValues?.compListingExcludeFanInventory &&\n outlierMode === formState.defaultValues?.outlierMode &&\n outlierStandardDeviations ===\n formState.defaultValues?.outlierStandardDeviations &&\n outlierKthLowestLimit ===\n formState.defaultValues?.outlierKthLowestLimit &&\n outlierKthLowestLimitAbsoluteSpacing ===\n formState.defaultValues?.outlierKthLowestLimitAbsoluteSpacing &&\n outlierKthLowestLimitRelativeSpacing ===\n formState.defaultValues?.outlierKthLowestLimitRelativeSpacing &&\n circuitBreakerMinCompListingCount ===\n formState.defaultValues?.circuitBreakerMinCompListingCount &&\n circuitBreakerMaxDiscountVelocityPercent ===\n formState.defaultValues?.circuitBreakerMaxDiscountVelocityPercent &&\n circuitBreakerMaxDiscountVelocityTicksInHours ===\n formState.defaultValues?.circuitBreakerMaxDiscountVelocityTicksInHours\n ) {\n // No change, just quit\n setValue('isSubmittingPricingSettings', false);\n return;\n }\n\n let hasErrors = false;\n const listForm = getValues();\n\n if (autoPricingEnabled !== formState.defaultValues?.autoPricingEnabled) {\n // Switching on autopricing might set all other values to default, so handle here first\n if (\n !validateAutoPricingSettings(\n clearErrors,\n setError,\n setPriceSettingValues,\n listForm,\n floorMustBeLessThanCeilingError,\n compListingFloorCeilingError,\n requiredMsg\n )\n ) {\n // Reset the field to the original values\n setValue('autoPricingEnabled', rowData?.listing?.isAutoPrc ?? false);\n }\n } else {\n // Only one of the fields should be changed within this branch\n if (\n compListingMode !== formState.defaultValues?.compListingMode ||\n compListingCeiling !== formState.defaultValues?.compListingCeiling ||\n compListingFloor !== formState.defaultValues?.compListingFloor\n ) {\n const fieldEdited =\n compListingCeiling !== formState.defaultValues?.compListingCeiling\n ? 'compListingCeiling'\n : compListingFloor !== formState.defaultValues?.compListingFloor\n ? 'compListingFloor'\n : 'compListingMode';\n if (\n !validateCompListingSettings(\n clearErrors,\n setError,\n setPriceSettingValues,\n listForm,\n compListingFloorCeilingError,\n requiredMsg,\n fieldEdited\n )\n ) {\n hasErrors = true;\n }\n }\n\n if (\n undercutAbsoluteAmount !==\n formState.defaultValues?.undercutAbsoluteAmount ||\n undercutRelativeAmount !==\n formState.defaultValues?.undercutRelativeAmount ||\n undercutMode !== formState.defaultValues?.undercutMode\n ) {\n const fieldEdited =\n undercutAbsoluteAmount !==\n formState.defaultValues?.undercutAbsoluteAmount\n ? 'undercutAbsoluteAmount'\n : undercutRelativeAmount !==\n formState.defaultValues?.undercutRelativeAmount\n ? 'undercutRelativeAmount'\n : 'undercutMode';\n if (\n !validateUndercutSettings(\n clearErrors,\n setPriceSettingValues,\n listForm,\n fieldEdited\n )\n ) {\n hasErrors = true;\n }\n }\n }\n\n if (hasErrors) {\n setValue('isSubmittingPricingSettings', false);\n return;\n }\n\n submitPricingSettingsChange(listForm);\n } else {\n setValue('isSubmittingPricingSettings', false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isSubmittingPricingSettings]);\n\n useEffect(() => {\n if (\n isSubmitting &&\n (listPrice >= 0 || allInPrice >= 0 || netProceedsFloor)\n ) {\n if (\n listPrice === formState.defaultValues?.listPrice &&\n allInPrice === formState.defaultValues?.allInPrice &&\n netProceedsFloor === formState.defaultValues?.netProceedsFloor\n ) {\n // No change, just quit\n setValue('isSubmitting', false);\n return;\n }\n\n clearErrors('listPrice');\n clearErrors('netProceedsFloor');\n\n let hasErrors = false;\n\n if (listPrice < 0) {\n setError('listPrice', { message: requiredMsg });\n hasErrors = true;\n }\n if (netProceedsFloor < 0) {\n setError('netProceedsFloor', { message: requiredMsg });\n hasErrors = true;\n }\n\n if (hasErrors) {\n setValue('isSubmitting', false);\n return;\n }\n\n const newAlerts = [];\n // Check only for updating list price\n if (listPrice > 0 && listPrice !== formState.defaultValues?.listPrice) {\n // Only validate for suspicious price change if listPrice > 0\n if (\n listPrice < (netProceedsFloor ?? Number.MIN_VALUE) ||\n listPrice > (netProceedsCeiling ?? Number.MAX_VALUE)\n ) {\n if (\n isDatePassedHours(\n manualPriceAdjustFloorCeilingProps.lastTimeStamp,\n 1\n )\n ) {\n newAlerts.push(manualPriceAdjustFloorCeilingProps);\n }\n }\n\n if (\n autoPricingEnabled &&\n isDatePassedHours(manualPriceDisableAutoPricingProps.lastTimeStamp, 1)\n ) {\n newAlerts.push(manualPriceDisableAutoPricingProps);\n }\n\n const showWarning = isSuspiciousPriceChange(\n listPrice,\n formState.defaultValues?.listPrice\n );\n if (\n showWarning &&\n isDatePassedHours(suspiciousPriceChangeHookProps.lastTimeStamp, 1)\n ) {\n newAlerts.push(suspiciousPriceChangeHookProps);\n }\n }\n\n if (newAlerts.length) {\n setAlerts(newAlerts);\n warningDialog.launchDialog();\n } else {\n submitPriceChange();\n }\n } else {\n setValue('isSubmitting', false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isSubmitting]);\n\n return (\n \n {tableRow}\n }\n size=\"md\"\n {...warningDialog.dialogProps}\n alerts={alerts}\n onOkay={() => {\n submitPriceChange();\n warningDialog.closeDialog();\n }}\n onCancel={() => {\n setValue('isSubmitting', false);\n warningDialog.closeDialog();\n }}\n />\n \n );\n}\n","import { ReactNode } from 'react';\nimport Hotkeys from 'react-hot-keys';\n\ninterface PosHotkeysProps {\n children: ReactNode;\n keyNames: string; // comma-separated hotkeys\n preventDefaultBrowserActions?: boolean;\n onHotkeyActivated: (keyName: string, event: KeyboardEvent) => void;\n disabled?: boolean;\n}\n\nexport const PosHotkeys = ({\n children,\n keyNames,\n onHotkeyActivated,\n preventDefaultBrowserActions = true,\n disabled = false,\n}: PosHotkeysProps) => {\n return (\n {\n if (preventDefaultBrowserActions) {\n // Don't call event.stopPropagation(); because sometimes,\n // events are not caught when repeating events\n event.preventDefault();\n }\n }}\n onKeyUp={(keyName, event) => {\n if (preventDefaultBrowserActions) {\n // Don't call event.stopPropagation(); because sometimes,\n // events are not caught when repeating events\n event.preventDefault();\n }\n onHotkeyActivated(keyName, event);\n }}\n >\n {children}\n \n );\n};\n","import { useCallback, useMemo } from 'react';\nimport {\n bulKActionsHighlightLetter,\n checkboxStyles,\n} from 'src/components/common/MultiSelect/MultiSelectAll.css';\nimport { useCatalogMultiSelectionContext } from 'src/contexts/CatalogMultiSelectionContext';\nimport { useContent } from 'src/contexts/ContentContext';\nimport {\n MultiSelectScope,\n NO_GROUP_ID,\n useMultiSelectionContext,\n} from 'src/contexts/MultiSelectionContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { PosHotkeys } from 'src/core/POS/PosHotkeys';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getCurrentLanguage } from 'src/utils/localeUtils';\n\nexport interface MultiSelectAllProps {\n displayMode?: 'full' | 'count-only' | 'checkbox-only';\n flattenedIdsOverride?: (number | string)[];\n}\n\nexport const MultiSelectAll = ({\n flattenedIdsOverride,\n displayMode = 'full',\n}: MultiSelectAllProps) => {\n const { flattenedIds: flattenedIdsFromContext } =\n useCatalogMultiSelectionContext();\n\n const flattenedIds = flattenedIdsOverride ?? flattenedIdsFromContext;\n\n const {\n isAllSelected,\n toggleSelectAll,\n toggleGroup,\n totalItemsSelected,\n getGroupToggleState,\n setGroupItems,\n selectionMode,\n selectedCountLabel,\n usingCustomSelectedCountLabel,\n } = useMultiSelectionContext();\n\n const isEnglishLanguage = getCurrentLanguage().startsWith('en-');\n const selectedText = useContent(ContentId.Selected);\n const selectAllText = useContent(ContentId.SelectAll);\n\n const toggleGroupWithOverride = useCallback(\n (groupId: string) => {\n if (flattenedIdsOverride) {\n if (totalItemsSelected >= flattenedIdsOverride.length) {\n setGroupItems(\n groupId,\n flattenedIdsOverride.reduce(\n (acc, id) => {\n acc[id] = false;\n return acc;\n },\n {} as Record\n )\n );\n } else {\n setGroupItems(\n groupId,\n flattenedIdsOverride.reduce(\n (acc, id) => {\n acc[id] = true;\n return acc;\n },\n {} as Record\n )\n );\n }\n }\n },\n [flattenedIdsOverride, setGroupItems, totalItemsSelected]\n );\n\n const onChange = useCallback(() => {\n if (\n selectionMode?.mode === MultiSelectScope.SingleGroup &&\n selectionMode?.groupId\n ) {\n if (flattenedIdsOverride != null) {\n toggleGroupWithOverride(selectionMode?.groupId);\n } else {\n toggleGroup(selectionMode?.groupId);\n }\n } else if (selectionMode?.mode === MultiSelectScope.AllGroups) {\n toggleSelectAll();\n }\n }, [\n flattenedIdsOverride,\n selectionMode,\n toggleGroup,\n toggleGroupWithOverride,\n toggleSelectAll,\n ]);\n\n const { isChecked, totalItemsSelectedCount } = useMemo(() => {\n let isChecked = isAllSelected;\n let totalItemsSelectedCount = totalItemsSelected;\n\n if (selectionMode?.groupId) {\n const groupToggleState = getGroupToggleState(selectionMode?.groupId);\n isChecked = groupToggleState.isGroupSelected;\n if (!groupToggleState.isGroupSelected) {\n totalItemsSelectedCount =\n Array.isArray(flattenedIds) && flattenedIds.length > 0\n ? groupToggleState.items.filter(\n (item) =>\n flattenedIds.includes(parseInt(item)) ||\n flattenedIds.includes(item)\n ).length\n : groupToggleState.items.length;\n if (flattenedIdsOverride) {\n if (\n totalItemsSelectedCount >= flattenedIdsOverride.length &&\n totalItemsSelectedCount > 0\n ) {\n isChecked = true;\n }\n }\n } else if (selectionMode?.groupId === NO_GROUP_ID) {\n totalItemsSelectedCount = flattenedIds?.length ?? 0;\n }\n }\n return { isChecked, totalItemsSelectedCount };\n }, [\n isAllSelected,\n totalItemsSelected,\n selectionMode?.groupId,\n getGroupToggleState,\n flattenedIds,\n flattenedIdsOverride,\n ]);\n\n const selectAllTextHighlighted = useMemo(() => {\n if (!isEnglishLanguage) {\n return selectAllText;\n }\n const parts = selectAllText.split(new RegExp('A', 'g'));\n return (\n \n {parts[0]}\n A\n {parts[1]}\n \n );\n }, [isEnglishLanguage, selectAllText]);\n\n if (displayMode === 'count-only') {\n return (\n \n {usingCustomSelectedCountLabel\n ? `${selectedCountLabel}`\n : `${totalItemsSelectedCount} ${selectedText}`}\n \n );\n }\n\n return (\n \n \n {selectAllTextHighlighted}\n {usingCustomSelectedCountLabel\n ? ` (${selectedCountLabel})`\n : ` (${totalItemsSelectedCount} ${selectedText})`}\n \n )\n }\n />\n \n );\n};\n","import { useContent } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { TooltipPopover } from 'src/core/ui';\nimport { WarningOutlineIcon } from 'src/svgs/Viagogo';\nimport {\n AUTO_PRICING_RESULT_TYPES_OPTIONS_TO_CID,\n AUTO_PRICING_RESULT_TYPES_OPTIONS_TO_COLOR,\n} from 'src/utils/constants/contentIdMaps';\nimport { AutoPricingResultType } from 'src/WebApiController';\n\nimport * as styles from './AutoPriceResultDisplay.css';\n\nexport const AutoPriceResultDisplay = ({\n resultType = AutoPricingResultType.None,\n useWarningIcon,\n}: {\n resultType?: AutoPricingResultType | null;\n useWarningIcon?: boolean;\n}) => {\n const autoPricingResultStateContent =\n AUTO_PRICING_RESULT_TYPES_OPTIONS_TO_CID[\n resultType ?? AutoPricingResultType.None\n ];\n\n const contentText = useContent(autoPricingResultStateContent);\n\n const autoPricingResultColor =\n AUTO_PRICING_RESULT_TYPES_OPTIONS_TO_COLOR[\n resultType ?? AutoPricingResultType.None\n ];\n\n return (\n \n ) : (\n \n )\n }\n contentVariant=\"dark\"\n title={contentText}\n >\n {contentText}\n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const CheckCircleIcon = ({ ...props }: PosIconProps) => {\n return (\n \n \n \n \n );\n};\n","import { ReactNode } from 'react';\nimport { Stack } from 'src/core/ui';\nimport { useMapDeliveryTypesToString } from 'src/hooks/useMapDeliveryTypesToString';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { FormatOption } from 'src/modals/EditTableColumns';\nimport { CheckCircleIcon } from 'src/svgs/CheckCircleIcon';\nimport { getDeliveryTypeIcon } from 'src/utils/ticketTypeUtils';\nimport {\n DeliveryType,\n Feature,\n Listing,\n ListingGroup,\n PreDeliveryState,\n TicketType,\n} from 'src/WebApiController';\n\nimport * as styles from './ListingDeliveryTypeDisplay.css';\n\ninterface DeliveryTypeIconWrapperProps {\n addCheckIcon: boolean;\n children: ReactNode;\n}\nconst DeliveryTypeIconWrapper = ({\n addCheckIcon,\n children,\n}: DeliveryTypeIconWrapperProps) => {\n return addCheckIcon ? (\n
    \n {children}\n \n
    \n ) : (\n <>{children}\n );\n};\n\nconst DeliveryTypeTextWrapper = ({\n addCheckIcon,\n children,\n}: DeliveryTypeIconWrapperProps) => {\n return addCheckIcon ? (\n \n {children}\n \n \n ) : (\n <>{children}\n );\n};\n\nexport const ListingDeliveryTypeDisplay = ({\n listing,\n userDefinedPrecision,\n showIconTitle,\n}: {\n listing:\n | Listing\n | {\n delivType: DeliveryType;\n topPriTktType?: TicketType;\n preDelivState?: PreDeliveryState;\n };\n userDefinedPrecision: FormatOption;\n showIconTitle?: boolean;\n}) => {\n const listingGroup = listing as ListingGroup;\n const hasTicketTypeIconOverlay = useUserHasFeature(\n Feature.TicketTypeIconOverlay\n );\n\n const strDeliveryTypes = useMapDeliveryTypesToString({\n deliveryTypesObj: listing,\n });\n\n const shouldAddCheckIcon =\n hasTicketTypeIconOverlay &&\n listing.preDelivState === PreDeliveryState.PreDelivered;\n\n return (\n \n {listingGroup.deliveryTypes ? (\n
    \n \n {listingGroup.deliveryTypes.map((dt) => {\n const key = `${dt.item1}-${dt.item2}`;\n if (userDefinedPrecision === FormatOption.EnumDisplay_Icon) {\n return (\n \n {getDeliveryTypeIcon(\n dt.item1,\n dt.item2,\n undefined,\n showIconTitle\n )}\n \n );\n } else {\n return (\n \n {strDeliveryTypes}\n \n );\n }\n })}\n \n
    \n ) : (\n <>\n {userDefinedPrecision === FormatOption.EnumDisplay_Icon ? (\n \n {getDeliveryTypeIcon(\n listing.delivType,\n listing.topPriTktType,\n undefined,\n showIconTitle\n )}\n \n ) : (\n \n {strDeliveryTypes}\n \n )}\n \n )}\n
    \n );\n};\n","import { vars } from 'src/core/themes';\n\nimport { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const CopyIcon2 = ({ size, stroke, ...props }: PosIconProps) => {\n const s = size ?? vars.iconSize.l;\n\n return (\n \n \n \n \n );\n};\n","import { clsx } from 'clsx';\nimport { ReactNode, useCallback, useState } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useSiteTheme } from 'src/contexts/SiteTheme/SiteThemeContext';\nimport { vars } from 'src/core/themes';\nimport { Colors } from 'src/core/themes/constants/colors';\nimport {\n copyContentWrapper,\n copyIcon,\n copyIconHover,\n copyToClipboardDisplay,\n hidden,\n showCopyIcon,\n successText,\n} from 'src/core/ui/CopyToClipboard/CopyToClipboardV2.css';\nimport useCopyToClipboard from 'src/hooks/useCopyToClipboard';\nimport { CopyIcon2 } from 'src/svgs/CopyIcon2';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nconst SHOW_COPIED_ICON_TIME = 1000;\n\ninterface CopyToClipboardPops {\n textToCopy?: string | number;\n children: ReactNode;\n}\n\nexport const CopyToClipboardV2 = ({\n textToCopy,\n children,\n}: CopyToClipboardPops) => {\n const { isDarkMode } = useSiteTheme();\n const [showingCopiedElement, setShowingCopiedElement] =\n useState(false);\n const { copyToClipboard } = useCopyToClipboard();\n\n const copy = useCallback(async () => {\n if (\n showingCopiedElement ||\n textToCopy == null ||\n String(textToCopy).length === 0\n ) {\n return;\n }\n await copyToClipboard(String(textToCopy));\n setShowingCopiedElement(true);\n const timeoutId = setTimeout(\n () => setShowingCopiedElement(false),\n SHOW_COPIED_ICON_TIME\n );\n return () => {\n clearTimeout(timeoutId);\n };\n }, [copyToClipboard, showingCopiedElement, textToCopy]);\n\n return (\n
    \n
    \n \n {showingCopiedElement && (\n \n \n \n )}\n
    \n \n
    \n );\n};\n","import { useMemo } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n getAllInPriceFromListPrice,\n getListPriceFromAllinPrice,\n} from 'src/utils/inventoryUtils';\nimport { Listing, Marketplace } from 'src/WebApiController';\n\nexport const useAllInPriceFromListPrice = (\n listPrice: number | null | undefined,\n listing?: Listing | null\n) => {\n const { loginContext } = useAppContext();\n\n return useMemo(() => {\n const stubHubMkpSettings =\n loginContext?.user?.activeAccount?.marketplaceSettings?.find(\n (m) => m.mkp === Marketplace.StubHub\n );\n if (!listPrice) {\n return null;\n }\n return getAllInPriceFromListPrice(\n listPrice,\n listing,\n stubHubMkpSettings?.sellerFee\n );\n }, [\n listPrice,\n listing,\n loginContext?.user?.activeAccount?.marketplaceSettings,\n ]);\n};\n\nexport const useListPriceFromAllInPrice = (\n allInPrice: number | null | undefined,\n listing?: Listing\n) => {\n const { loginContext } = useAppContext();\n\n return useMemo(() => {\n const stubHubMkpSettings =\n loginContext?.user?.activeAccount?.marketplaceSettings?.find(\n (m) => m.mkp === Marketplace.StubHub\n );\n if (!allInPrice) {\n return null;\n }\n return getListPriceFromAllinPrice(\n allInPrice,\n listing,\n stubHubMkpSettings?.sellerFee\n );\n }, [\n allInPrice,\n listing,\n loginContext?.user?.activeAccount?.marketplaceSettings,\n ]);\n};\n","import { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport { CustomListingColumn } from 'src/utils/columns/inventory/inventoryCustomColumnUtils.types';\nimport {\n SECTION_TYPE_TO_CUSTOM_COLUMN_SETTING,\n SectionType,\n} from 'src/utils/types/sectionType';\n\nexport const CustomColumnName = ({\n id,\n sectionType,\n}: {\n id: string;\n sectionType: SectionType;\n}) => {\n const { value: customColumns = [] } = useServerUserSetting<\n CustomListingColumn[]\n >({\n id: SECTION_TYPE_TO_CUSTOM_COLUMN_SETTING[sectionType],\n });\n\n const customColumnName = customColumns.find((c) => c.id === id)?.name ?? '';\n\n return (\n \n {customColumnName}\n \n );\n};\n","/* IMPORTANT - whenever you add a new one here\n You need to add a handling for it in the BulkEditStatusListingPopover.tsx\n */\nexport const INVENTORY_BULK_UPDATE_LISTING_PRICES_UPDATE_KEY =\n 'listingPrices-event-inventory';\nexport const INVENTORY_BULK_UPDATE_MARKETPLACE_PRICES_UPDATE_KEY =\n 'marketplacePrices-event-inventory';\nexport const INVENTORY_BULK_UPDATE_PRICE_FLOOR_CEILING_UPDATE_KEY =\n 'floorCeiling-event-inventory';\nexport const INVENTORY_BULK_UPDATE_AUTOPRICING_SETTINGS_UPDATE_KEY = `auto-pricing-settings-event-inventory`;\nexport const INVENTORY_BULK_UPDATE_LISTING_GROUP_SETTINGS_UPDATE_KEY = `listing-group-settings-event-inventory`;\nexport const INVENTORY_BULK_UPDATE_GENERAL_SETTINGS_UPDATE_KEY =\n 'general-settings-event-inventory';\nexport const INVENTORY_BULK_UPDATE_ADMIN_HOLD_UPDATE_KEY =\n 'admin-hold-event-inventory';\nexport const INVENTORY_BULK_BROADCAST_LISTINGS_KEY = `broadcast-event-inventory`;\nexport const INVENTORY_BULK_UPDATE_MARKETPLACE_SEATING_UPDATE_KEY =\n 'marketplace-seating-event-inventory';\nexport const INVENTORY_BULK_UPDATE_COMMISSION_UPDATE_KEY =\n 'commission-event-inventory';\nexport const INVENTORY_BULK_UPDATE_TAGS_UPDATE_KEY = 'tags-event-inventory';\nexport const INVENTORY_BULK_UPDATE_INTERNAL_NOTES_UPDATE_KEY =\n 'update-internal-notes-inventory';\nexport const INVENTORY_BULK_UPDATE_AUTOFULFILL_UPDATE_KEY =\n 'update-autofulfill-inventory';\nexport const INVENTORY_BULK_CREATE_LISTING_GROUPS_KEY = `create-listing-groups`;\nexport const INVENTORY_BULK_UPDATE_TICKET_TYPE_RULE_UPDATE_KEY =\n 'ticket-type-rule-event-inventory';\nexport const INVENTORY_BULK_UPDATE_DELIVERY_TYPE_UPDATE_KEY =\n 'update-delivery-type-inventory';\nexport const INVENTORY_BULK_UPDATE_SEAT_TRAITS_UPDATE_KEY =\n 'update-seat-traits-inventory';\nexport const INVENTORY_BULK_DELETE_SEAT_SAVERS_UPDATE_KEY =\n 'delete-seat-savers-inventory';\nexport const INVENTORY_BULK_REMOVE_PREDELIVERY_UPDATE_KEY =\n 'delete-predelivery-inventory';\nexport const INVENTORY_BULK_UNGROUP_LISTINGS_UPDATE_KEY =\n 'ungroup-listings-inventory';\nexport const INVENTORY_BULK_WASTE_TICKETS_KEY = 'waste-tickets';\n","import { useCallback } from 'react';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { useGetEventFullInfo } from 'src/hooks/useGetEventFullInfo';\nimport { US_COUNTRY_CODES } from 'src/utils/constants/constants';\nimport { getStubhubEventWithPricingUrl } from 'src/utils/inventoryUtils';\nimport { Event } from 'src/WebApiController';\n\ninterface OpenStubhubDropdownActionProps {\n event: Event;\n}\n\nexport const OpenStubhubDropdownAction = ({\n event,\n}: OpenStubhubDropdownActionProps) => {\n const { venue } = useGetEventFullInfo(event);\n\n const onOpenInStubHubClicked = useCallback(\n (event: Event) => {\n const eventId = event?.viagId;\n\n // null item return means it was not found (204 status)\n window.open(\n getStubhubEventWithPricingUrl(\n eventId,\n !US_COUNTRY_CODES.includes(venue?.country?.code?.toUpperCase() ?? '')\n ),\n '_blank'\n );\n },\n [venue?.country?.code]\n );\n\n return (\n {\n e.preventDefault();\n e.stopPropagation();\n onOpenInStubHubClicked(event);\n }}\n >\n {'StubHub 🡵'}\n \n );\n};\n","import clsx from 'clsx';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Stack } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { FieldError } from 'src/modals/common';\nimport { CheckIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { DELIVERY_OPTIONS_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { getDeliveryTypeIcon } from 'src/utils/ticketTypeUtils';\nimport { DeliveryType, Feature } from 'src/WebApiController';\n\nimport * as styles from './DeliveryTypeRadioInput.css';\n\nexport const DeliveryTypeRadioInput = ({\n value,\n onChange,\n error,\n disabled,\n hideCustomType,\n}: {\n value?: DeliveryType | null;\n onChange: (val: DeliveryType) => void;\n error?: string;\n disabled?: boolean;\n hideCustomType?: boolean;\n}) => {\n const hasCustomDeliveryTypeFeature = useUserHasFeature(\n Feature.CustomDeliveryType\n );\n\n return (\n \n
    \n {Object.entries(DeliveryType)\n .filter(([_, val]) => {\n if (val === DeliveryType.Custom) {\n return hasCustomDeliveryTypeFeature && !hideCustomType;\n }\n else if (val === DeliveryType.Wallet)\n {\n return false;\n }\n return true;\n })\n .map(([key, val]) => {\n const icon = getDeliveryTypeIcon(val);\n\n return (\n !disabled && onChange(val)}\n >\n
    \n {val === value && }\n
    \n \n {icon}\n \n \n \n \n \n );\n })}\n
    \n\n {error && {error}}\n
    \n );\n};\n","import clsx from 'clsx';\nimport { useMemo } from 'react';\nimport { Content, useFormattedContent } from 'src/contexts/ContentContext';\nimport { useSiteTimezoneContext } from 'src/contexts/SiteTimezoneContext/SiteTimezoneContext';\nimport * as styles from 'src/core/POS/DateRangeSelector/DateRangePresets/DateRangePresets.css';\nimport {\n Suggestion,\n SuggestionContainer,\n SuggestionsContainer,\n SuggestionsHeading,\n} from 'src/core/POS/DateRangeSelector/DateRangePresets/DateRangePresets.styled';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport {\n DatePreset,\n DatePresetName,\n formatDate,\n getDatePresets,\n getPresetFromDate,\n} from 'src/utils/dateTimeUtils';\n\nexport type DatePickerPresetsProp = {\n presetNames: DatePresetName[];\n inHandDaysBeforeEvent?: number;\n selectedDate?: Date | null;\n targetDate: Date;\n onClick: (date: Date, presetName?: string) => void;\n disabled?: boolean;\n /**\n * If true, the site's timezone will be applied to the date being displayed.\n * the underlying date value (value, data, onDateChange) will not be changed.\n */\n useSiteTimeZone?: boolean;\n};\n\nexport function DatePickerPresets({\n selectedDate = new Date(),\n presetNames,\n targetDate,\n disabled,\n onClick,\n inHandDaysBeforeEvent,\n useSiteTimeZone,\n}: DatePickerPresetsProp) {\n const { toZonedTime, fromZonedTime } = useSiteTimezoneContext();\n\n const handleClick = (preset: DatePreset) => {\n onClick(\n useSiteTimeZone ? fromZonedTime(preset.value) : preset.value,\n preset.name\n );\n };\n\n const presets = useMemo(() => {\n const presets = getDatePresets(\n presetNames,\n targetDate,\n inHandDaysBeforeEvent\n );\n\n if (useSiteTimeZone) {\n return presets.map((preset) => ({\n ...preset,\n value: toZonedTime(preset.value),\n }));\n }\n\n return presets;\n }, [\n useSiteTimeZone,\n inHandDaysBeforeEvent,\n presetNames,\n targetDate,\n toZonedTime,\n ]);\n\n const presetName = getPresetFromDate(\n selectedDate,\n targetDate,\n inHandDaysBeforeEvent\n )?.name;\n\n const daysBeforeEventLabel = useFormattedContent(\n FormatContentId.DaysBeforeEvent,\n `${inHandDaysBeforeEvent}`\n );\n\n return (\n \n \n \n \n {presets.map((preset, index) => (\n \n handleClick(preset)}\n >\n \n {preset.name === DatePresetName.DaysBeforeEvent\n ? daysBeforeEventLabel\n : preset.label}\n {' '}\n {formatDate(preset.value.toISOString())}\n \n \n ))}\n \n );\n}\n","import clsx from 'clsx';\nimport { useCallback, useState } from 'react';\nimport { CalendarProps } from 'react-date-range';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useSiteTimezoneContext } from 'src/contexts/SiteTimezoneContext/SiteTimezoneContext';\nimport * as selectorStyles from 'src/core/POS/DateRangeSelector/DateRangeSelector.css';\nimport {\n CustomDateRangeButton,\n DateRangePickerContainer,\n DateRangeTrigger,\n DateRangeTriggerContent,\n IconContainer,\n} from 'src/core/POS/DateRangeSelector/DateRangeSelector.styled';\nimport { vars } from 'src/core/themes';\nimport { Popover, Stack } from 'src/core/ui';\nimport { CalendarIcon, CrossIcon, ExpandIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n formatDate,\n tryGetDatePresetSuggestionText,\n} from 'src/utils/dateTimeUtils';\nimport { getLocaleFromLanguageOrCurrent } from 'src/utils/localeUtils';\n\nimport * as styles from './DatePicker.css';\nimport { DatePickerInput } from './DatePickerInput';\nimport {\n DatePickerPresets,\n DatePickerPresetsProp,\n} from './DatePickerPresets/DatePickerPresets';\n\nexport type DateSelectorProps = Omit &\n Omit & {\n disabled?: boolean;\n defaultDate?: Date;\n placeholderText?: string;\n onChange: (date?: Date, presetName?: string) => void;\n /**\n * If true, the site's timezone will be applied to the date being displayed.\n * the underlying date value (value, data, onDateChange) will not be changed.\n */\n useSiteTimeZone?: boolean;\n } & Omit;\n\nexport function DateSelector({\n date,\n defaultDate,\n onChange,\n placeholderText,\n disabled,\n className,\n dateDisplayFormat = 'MM/dd/yyyy',\n color = vars.color.backgroundHighlight,\n locale = getLocaleFromLanguageOrCurrent(),\n useSiteTimeZone = true,\n ...presetProps\n}: DateSelectorProps) {\n const { toZonedTime, timeZone } = useSiteTimezoneContext();\n const [isOpen, setIsOpen] = useState(false);\n const [showDatePicker, setShowDatePicker] = useState(false);\n\n const placeholderTextContent = useContent(placeholderText);\n\n const defaultDateDisplayText = useContent(ContentId.DateRangeDisplayText);\n\n const onDatePickerChange = useCallback(\n (date?: Date, presetName?: string) => {\n if (!date) {\n onChange(undefined);\n return;\n }\n onChange(date, presetName);\n },\n [onChange]\n );\n\n const onClear = useCallback(() => {\n onDatePickerChange(defaultDate ? new Date(defaultDate) : undefined);\n }, [defaultDate, onDatePickerChange]);\n\n const onSuggestionClick = (date: Date, presetName?: string) => {\n onDatePickerChange(date, presetName);\n setIsOpen(false);\n };\n\n const getDisplayText = useCallback(() => {\n const suggestionText = tryGetDatePresetSuggestionText(\n date,\n presetProps.targetDate,\n presetProps.inHandDaysBeforeEvent,\n useSiteTimeZone ? toZonedTime : undefined\n );\n\n if (suggestionText) {\n return suggestionText;\n }\n\n if (date) {\n return `${formatDate(\n (useSiteTimeZone ? toZonedTime(date) : date).toISOString(),\n undefined,\n timeZone\n )}`;\n }\n\n return placeholderText ? placeholderTextContent : defaultDateDisplayText;\n }, [\n date,\n presetProps.targetDate,\n presetProps.inHandDaysBeforeEvent,\n placeholderText,\n placeholderTextContent,\n defaultDateDisplayText,\n useSiteTimeZone,\n toZonedTime,\n timeZone,\n ]);\n\n const highlightDropBox = !(\n (date ?? undefined) === (defaultDate ?? undefined)\n );\n\n return (\n {\n setIsOpen(isOpen);\n if (!isOpen) {\n setShowDatePicker(false);\n }\n }}\n >\n \n \n \n \n {getDisplayText()}\n \n
    \n {!disabled && date && highlightDropBox && (\n \n \n \n )}\n \n
    \n
    \n
    \n
    \n \n \n \n \n setShowDatePicker((val) => !val)}\n >\n
    \n \n
    \n \n \n {showDatePicker && (\n \n )}\n
    \n
    \n
    \n \n );\n}\n","import { useAppContext } from 'src/contexts/AppContext';\nimport { DateSelector } from 'src/core/POS/DateSelector/DateSelector';\nimport {\n DatePresetName,\n StandardDatePresetNames,\n} from 'src/utils/dateTimeUtils';\nimport { getLocaleFromLanguageOrCurrent } from 'src/utils/localeUtils';\n\nexport type InHandDateInputProps = {\n value: Date | string | null;\n allowEmptySelection?: boolean;\n targetDate: Date;\n disabled?: boolean;\n onChange: (date?: Date, daysBeforeEvent?: number) => void;\n placeholderText?: string;\n daysBeforeEvent?: number;\n};\n\nexport const InHandDateInput = ({\n value,\n targetDate,\n onChange,\n disabled,\n allowEmptySelection,\n placeholderText,\n daysBeforeEvent,\n}: InHandDateInputProps) => {\n const { loginContext } = useAppContext();\n\n const inHandDate = value\n ? new Date(value)\n : allowEmptySelection\n ? null\n : new Date();\n\n const customPresetNames = [...StandardDatePresetNames];\n\n const inHandDaysBeforeEvent =\n daysBeforeEvent ??\n loginContext?.user?.activeAccount?.sellerAccountSettings\n ?.inHandDaysBeforeEvent;\n\n if (inHandDaysBeforeEvent) {\n customPresetNames.push(DatePresetName.DaysBeforeEvent);\n }\n\n const getDaysBeforeEvent = (presetName?: string): number | undefined => {\n if (presetName === undefined) {\n return undefined;\n }\n\n switch (presetName) {\n case DatePresetName.DaysBeforeEvent:\n return inHandDaysBeforeEvent ?? undefined;\n case DatePresetName.OneDayBeforeEvent:\n return 1;\n case DatePresetName.OneWeekBeforeEvent:\n return 7;\n case DatePresetName.Now:\n return 0;\n default:\n return undefined;\n }\n };\n\n return (\n {\n onChange(date, getDaysBeforeEvent(presetName));\n }}\n locale={getLocaleFromLanguageOrCurrent()}\n presetNames={customPresetNames}\n inHandDaysBeforeEvent={inHandDaysBeforeEvent ?? undefined}\n targetDate={targetDate}\n // In hand date is relative to event date\n useSiteTimeZone={false}\n />\n );\n};\n","import { PropsWithChildren, ReactNode } from 'react';\nimport { Stack } from 'src/core/ui';\n\nimport * as styles from './FormPage.css';\n\nexport const Section = ({\n children,\n icon,\n title,\n}: PropsWithChildren<{ icon: ReactNode; title: ReactNode }>) => {\n return (\n \n \n {icon}\n {title}\n \n {children}\n \n );\n};\n","import { useFormContext } from 'react-hook-form';\nimport { TicketTypePriorityInput } from 'src/components/common/TicketTypePriorityInput';\nimport { DeliveryTypeRadioInput } from 'src/components/Input/DeliveryTypeRadioInput';\nimport { InHandDateInput } from 'src/components/Input/InHandDateInput';\nimport { Content } from 'src/contexts/ContentContext';\nimport { FormPage } from 'src/core/POS/FormPage';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { vars } from 'src/core/themes';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { FieldWrapper, FormRow } from 'src/modals/common';\nimport { IconsFill, SeatMapIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n DeliveryType,\n Feature,\n Permission,\n TicketTypeOverride,\n} from 'src/WebApiController';\n\nimport { SeatSaverListingDetailsInputForm } from '../SeatSaverListingWizard.types';\n\nexport const DeliverySection = ({\n inputIndeces,\n disabled,\n}: {\n inputIndeces: number[];\n disabled?: boolean;\n}) => {\n const { watch, getValues, setValue, clearErrors, getFieldState } =\n useFormContext();\n\n const isMobile = useMatchMedia('mobile');\n const hasSelectDeliveryStrategyInSeatSaverFeature = useUserHasFeature(\n Feature.SelectDeliveryStrategyInSeatSaver\n );\n\n const event = getValues(`inputs.${inputIndeces[0]}.event`);\n\n // Of these will have same value, so we just need one\n const deliveryTypeField: `inputs.${number}.deliveryType` = `inputs.${inputIndeces[0]}.deliveryType`;\n const deliveryType = watch(deliveryTypeField);\n const deliveryTypeError = getFieldState(deliveryTypeField).error?.message;\n\n const inHandDateField: `inputs.${number}.inHandDate` = `inputs.${inputIndeces[0]}.inHandDate`;\n const inHandDate = watch(inHandDateField);\n const inHandDateError = getFieldState(inHandDateField).error?.message;\n const daysBeforeEvent = watch(`inputs.${inputIndeces[0]}.daysBeforeEvent`);\n\n const tktTypeRulesField: `inputs.${number}.ticketTypeRules` = `inputs.${inputIndeces[0]}.ticketTypeRules`;\n const ticketTypeRules = watch(tktTypeRulesField);\n\n const canSetCustomDeliveryType = useUserHasAnyOfPermissions(\n Permission.Purchases_UpdateCustomDeliveryType,\n Permission.Purchases_UpdateCustomDeliveryTypeOwned\n );\n\n const onDeliveryTypeChange = (newDelType: DeliveryType) => {\n if (!disabled && newDelType && newDelType !== deliveryType) {\n clearErrors(deliveryTypeField);\n\n inputIndeces.forEach((i) => {\n setValue(`inputs.${i}.deliveryType`, newDelType);\n });\n }\n };\n\n const onticketTypeRulesChange = (\n newTicketTypeRules: TicketTypeOverride | null\n ) => {\n if (\n hasSelectDeliveryStrategyInSeatSaverFeature &&\n !disabled &&\n newTicketTypeRules &&\n newTicketTypeRules !== ticketTypeRules\n ) {\n clearErrors(tktTypeRulesField);\n\n inputIndeces.forEach((i) => {\n setValue(`inputs.${i}.ticketTypeRules`, newTicketTypeRules);\n });\n }\n };\n\n const onInHandDateChange = (date?: Date, daysBeforeEvent?: number) => {\n if (date) {\n clearErrors(inHandDateField);\n const dateStr = date.toISOString();\n if (dateStr !== inHandDate) {\n inputIndeces.forEach((i) => {\n setValue(`inputs.${i}.inHandDate`, dateStr);\n setValue(`inputs.${i}.daysBeforeEvent`, daysBeforeEvent ?? null);\n });\n }\n }\n };\n\n return (\n \n }\n title={}\n >\n \n \n \n {hasSelectDeliveryStrategyInSeatSaverFeature && (\n \n }>\n \n \n \n )}\n \n \n }\n errors={inHandDateError}\n >\n \n \n \n \n \n );\n};\n","import { useFormContext } from 'react-hook-form';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { FormPage } from 'src/core/POS/FormPage';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { vars } from 'src/core/themes';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { CheckboxContainer, FormRow } from 'src/modals/common';\nimport { SeatSaverIcon } from 'src/svgs';\nimport { IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { SeatSaverListingDetailsInputForm } from '../SeatSaverListingWizard.types';\n\nexport const ListingSection = ({\n inputIndeces,\n disabled,\n}: {\n inputIndeces: number[];\n disabled?: boolean;\n}) => {\n const { watch, setValue } =\n useFormContext();\n\n const isMobile = useMatchMedia('mobile');\n\n // Of these will have same value, so we just need one\n const autoBroadcastCreatedListing = watch(\n `inputs.${inputIndeces[0]}.autoBroadcastCreatedListing`\n );\n\n const sellerOwnTickets = watch(`inputs.${inputIndeces[0]}.sellerOwnTickets`);\n\n return (\n \n }\n title={}\n >\n \n \n \n }\n disabled={disabled}\n checked={autoBroadcastCreatedListing ?? false}\n onChange={(e) => {\n const isChecked = e.target.checked;\n if (isChecked !== autoBroadcastCreatedListing) {\n inputIndeces.forEach((i) => {\n setValue(\n `inputs.${i}.autoBroadcastCreatedListing`,\n isChecked\n );\n });\n }\n }}\n />\n \n \n \n \n }\n disabled={disabled}\n checked={sellerOwnTickets ?? false}\n onChange={(e) => {\n const isChecked = e.target.checked;\n if (isChecked !== sellerOwnTickets) {\n inputIndeces.forEach((i) => {\n setValue(`inputs.${i}.sellerOwnTickets`, isChecked);\n });\n }\n }}\n />\n \n \n \n \n );\n};\n","import { FieldError } from 'react-hook-form';\nimport { RowSelector } from 'src/components/Selectors/SectionRowSelector';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { getTextFieldState, PosTextField } from 'src/core/POS/PosTextField';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { RowInfo, SectionInfo } from 'src/WebApiController';\n\nexport const VenueRowInput = ({\n row,\n selectedRow,\n selectedSection,\n disabled,\n fieldError,\n onChange,\n}: {\n row?: string | null;\n selectedRow?: RowInfo | null;\n selectedSection?: SectionInfo | null;\n disabled?: boolean;\n fieldError?: string | string[] | FieldError | FieldError[];\n onChange: (rowName?: string | null, row?: RowInfo | null) => void;\n}) => {\n selectedRow =\n selectedRow ?? selectedSection?.rows?.find((r) => r.name === row);\n\n const chooseRow = useContent(ContentId.ChooseRow);\n\n return selectedSection?.rows?.filter((r) => !r.isSpeculative)?.length ? (\n {\n const id = parseInt(rowId);\n const row = selectedSection?.rows?.find((r) => r.id === id);\n onChange(row?.name ?? rowId, row);\n }}\n />\n ) : (\n {\n onChange(e.target.value);\n }}\n />\n );\n};\n","import { FieldError } from 'react-hook-form';\nimport { SectionSelector } from 'src/components/Selectors/SectionRowSelector';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { getTextFieldState, PosTextField } from 'src/core/POS/PosTextField';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SectionInfo } from 'src/WebApiController';\n\nexport const VenueSectionInput = ({\n section,\n selectedSection,\n disabled,\n fieldError,\n onChange,\n selectionSelectorStyle,\n}: {\n section?: string | null;\n selectedSection?: SectionInfo | null;\n disabled?: boolean;\n fieldError?: string | string[] | FieldError | FieldError[];\n onChange: (sectionName?: string | null, section?: SectionInfo | null) => void;\n selectionSelectorStyle?: React.CSSProperties;\n}) => {\n const { venueMapInfo } = useEventMapContext();\n selectedSection =\n selectedSection ?? venueMapInfo?.sections?.find((s) => s.name === section);\n\n const chooseSection = useContent(ContentId.ChooseSection);\n\n return venueMapInfo?.sections?.length ? (\n {\n const id = parseInt(selectedSectionId);\n const section = venueMapInfo?.sections?.find((s) => s.id === id);\n onChange(section?.name ?? selectedSectionId, section);\n }}\n />\n ) : (\n {\n const v = e.target.value;\n onChange(v);\n }}\n />\n );\n};\n","import { uniqBy } from 'lodash-es';\nimport { useCallback, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { EventVenueMap } from 'src/components/Events/VenueMap/EventVenueMap';\nimport { ListingNoteSelectionInput } from 'src/components/Input/ListingNoteSelectionInput';\nimport { VenueRowInput } from 'src/components/Input/VenueRowInput';\nimport { VenueSectionInput } from 'src/components/Input/VenueSectionInput';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { FormPage } from 'src/core/POS/FormPage';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { getTextFieldState, PosTextField } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { FieldWrapper } from 'src/modals/common';\nimport {\n addSectionButton,\n column0,\n gridHeader,\n removeButton,\n seatingSection,\n} from 'src/modals/SeatSaverListingWizard/components/SeatingSection.css';\nimport { CrossIcon, IconsFill, SeatIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n getAllInPriceFromListPrice,\n getListPriceFromAllinPrice,\n} from 'src/utils/inventoryUtils';\nimport { INT_MAX_VALUE } from 'src/utils/numberFormatter';\nimport {\n EventListingConstraints,\n ListingNote,\n Marketplace,\n RowInfo,\n SeatSaverSeating,\n SectionInfo,\n} from 'src/WebApiController';\n\nimport { SeatSaverListingDetailsInputForm } from '../SeatSaverListingWizard.types';\n\nconst tableHeaderContent: (ContentId | null)[] = [\n ContentId.Section,\n ContentId.Row,\n ContentId.TotalQty,\n ContentId.ShownQty,\n ContentId.Proceeds,\n ContentId.Price,\n ContentId.FaceValue,\n ContentId.SeatTraits,\n null,\n];\n\nexport const SeatingSection = ({\n inputIndeces,\n disabled,\n eventListingConstraints,\n}: {\n inputIndeces: number[];\n disabled?: boolean;\n eventListingConstraints?: EventListingConstraints | null;\n}) => {\n const { ticketClasses, venueMapInfo } = useEventMapContext();\n const { watch, setValue, clearErrors, getFieldState } =\n useFormContext();\n\n const { loginContext } = useAppContext();\n const stubHubMarketplace =\n loginContext?.user?.activeAccount.marketplaceSettings.find(\n (mps) => mps.mkp === Marketplace.StubHub\n );\n\n const { getUiCurrency } = useLocalizationContext();\n const uiCurrency = useMemo(\n () =>\n getUiCurrency(loginContext?.user?.activeAccount?.currencyCode ?? 'USD'),\n [getUiCurrency, loginContext?.user?.activeAccount?.currencyCode]\n );\n\n const inputs = watch('inputs');\n\n const removeSection = useCallback(\n (index: number) => {\n inputIndeces.forEach((i) => {\n const input = inputs[i];\n const curSections = [...input.seatings];\n\n if (curSections.length) {\n // Existing - remove\n curSections.splice(index, 1);\n setValue(`inputs.${i}.seatings`, curSections);\n }\n });\n },\n [inputIndeces, inputs, setValue]\n );\n\n const onSectionClicked = useCallback(\n (e: MouseEvent, selectedSection: SectionInfo) => {\n inputIndeces.forEach((index) => {\n const input = inputs[index];\n const curSections = input.seatings.filter(\n (s) => s.section === selectedSection.name\n );\n clearErrors(`inputs.${index}.seatings`);\n if (curSections.length) {\n // Existing - remove\n const newSections = input.seatings.filter(\n (s) => s.section !== selectedSection.name\n );\n setValue(`inputs.${index}.seatings`, newSections);\n } else {\n // New - add\n const selectedRow = selectWorstRow(selectedSection);\n\n const newSections = [\n ...input.seatings,\n {\n section: selectedSection.name,\n sectionId: selectedSection.id,\n row: selectedRow?.isSpeculative ? '' : selectedRow?.name,\n rowId: selectedRow?.id ?? selectedSection.specRow?.id,\n } as SeatSaverSeating,\n ];\n setValue(`inputs.${index}.seatings`, newSections);\n }\n });\n },\n [clearErrors, inputIndeces, inputs, setValue]\n );\n\n const onToggleMirrors = useCallback(\n (mirrors: SectionInfo[], exclude?: boolean) => {\n if (exclude) {\n const idsToExclude = mirrors.map(({ id }) => id);\n inputIndeces.forEach((index) => {\n const input = inputs[index];\n const newSections = uniqBy(\n input.seatings.filter(\n ({ sectionId }) => sectionId && !idsToExclude.includes(sectionId)\n ),\n 'sectionId'\n );\n setValue(`inputs.${index}.seatings`, newSections);\n });\n return;\n }\n\n const seatSaverSections = mirrors.map((section) => {\n const selectedRow = selectWorstRow(section);\n return {\n section: section.name,\n sectionId: section.id,\n row: selectedRow?.isSpeculative ? '' : selectedRow?.name,\n rowId: selectedRow?.id ?? section.specRow?.id,\n } as SeatSaverSeating;\n });\n inputIndeces.forEach((index) => {\n const input = inputs[index];\n const newSections = uniqBy(\n input.seatings.concat(seatSaverSections),\n 'sectionId'\n );\n setValue(`inputs.${index}.seatings`, newSections);\n });\n },\n [inputIndeces, inputs, setValue]\n );\n\n const selectedSectionIds = useCallback(() => {\n const ids = inputIndeces\n .flatMap((index) => {\n const input = inputs[index];\n return input.seatings.map((s) => s.sectionId);\n })\n .filter((id) => id)\n .map((id) => id!);\n\n return ids;\n }, [inputIndeces, inputs]);\n\n const onAddSection = useCallback(\n (e: React.MouseEvent) => {\n e.stopPropagation();\n clearErrors();\n inputIndeces.forEach((index) => {\n const input = inputs[index];\n // New - add\n const newSections = [\n ...input.seatings,\n {\n section: '',\n sectionId: null,\n row: '',\n rowId: null,\n } as SeatSaverSeating,\n ];\n clearErrors(`inputs.${index}.seatings`);\n setValue(`inputs.${index}.seatings`, newSections);\n });\n },\n [clearErrors, inputIndeces, inputs, setValue]\n );\n const inputToDisplay = inputs[inputIndeces[0]];\n const seatingsError = getFieldState(`inputs.${inputIndeces[0]}.seatings`)\n .error?.message;\n\n const selectWorstRow = (section: SectionInfo) => {\n let selectedRow: {\n id: number;\n name: string | null;\n isSpeculative: boolean;\n } | null = section.specRow;\n const rowSorted = section?.rows\n .filter((r) => !r.isSpeculative)\n .toSorted(\n (r1, r2) => (r1.seatQualityScore ?? 0) - (r2.seatQualityScore ?? 0)\n );\n if (rowSorted?.length) {\n selectedRow = rowSorted?.[0];\n }\n\n return selectedRow;\n };\n\n const onTicketClassChange = useCallback(\n (selectedTicketClassIds: string[]) => {\n console.log('ticketclass change', selectedTicketClassIds);\n // TODO: https://thestubhub.atlassian.net/browse/POS-3548\n },\n []\n );\n\n const onSectionChange = useCallback(\n (\n seatIndex: number,\n sectionName?: string | null,\n section?: SectionInfo | null\n ) => {\n inputIndeces.forEach((i) => {\n clearErrors(`inputs.${i}.seatings.${seatIndex}.section`);\n if (section) {\n setValue(`inputs.${i}.seatings.${seatIndex}.section`, section.name);\n setValue(`inputs.${i}.seatings.${seatIndex}.sectionId`, section.id);\n\n const selectedRow = selectWorstRow(section);\n\n if (selectedRow?.id) {\n // Setting the section automatically set the speculative row id\n setValue(`inputs.${i}.seatings.${seatIndex}.rowId`, selectedRow.id);\n setValue(\n `inputs.${i}.seatings.${seatIndex}.row`,\n selectedRow?.isSpeculative ? '' : selectedRow?.name\n );\n }\n } else {\n setValue(\n `inputs.${i}.seatings.${seatIndex}.section`,\n sectionName ?? ''\n );\n\n // Free-text section do not have speculative row info\n setValue(`inputs.${i}.seatings.${seatIndex}.rowId`, null);\n setValue(`inputs.${i}.seatings.${seatIndex}.row`, '');\n }\n });\n },\n [clearErrors, inputIndeces, setValue]\n );\n\n const onRowChange = useCallback(\n (seatIndex: number, rowName?: string | null, row?: RowInfo | null) => {\n inputIndeces.forEach((i) => {\n clearErrors(`inputs.${i}.seatings.${seatIndex}.row`);\n if (row) {\n setValue(\n `inputs.${i}.seatings.${seatIndex}.row`,\n row.isSpeculative ? '' : row.name\n );\n setValue(`inputs.${i}.seatings.${seatIndex}.rowId`, row.id);\n } else {\n // If we can't find the row - that mean they typed it in\n // so just keep with they type as the row\n setValue(`inputs.${i}.seatings.${seatIndex}.row`, rowName ?? '');\n setValue(`inputs.${i}.seatings.${seatIndex}.rowId`, null);\n }\n });\n },\n [clearErrors, inputIndeces, setValue]\n );\n\n const onQuantityChange = useCallback(\n (\n e: React.ChangeEvent,\n seatIndex: number,\n maxDisplayQuantity: number | null\n ) => {\n inputIndeces.forEach((i) => {\n const v = parseInt(e.target.value) || 0;\n if (v >= 0 && v <= INT_MAX_VALUE) {\n clearErrors(`inputs.${i}.seatings.${seatIndex}.quantity`);\n setValue(`inputs.${i}.seatings.${seatIndex}.quantity`, v);\n\n if (maxDisplayQuantity != null && maxDisplayQuantity > v) {\n clearErrors(`inputs.${i}.seatings.${seatIndex}.maxDisplayQuantity`);\n setValue(`inputs.${i}.seatings.${seatIndex}.maxDisplayQuantity`, v);\n }\n } else {\n setValue(`inputs.${i}.seatings.${seatIndex}.quantity`, null);\n }\n });\n },\n [clearErrors, inputIndeces, setValue]\n );\n\n const onMaxQuantityChange = useCallback(\n (\n e: React.ChangeEvent,\n seatIndex: number,\n quantity: number | null\n ) => {\n inputIndeces.forEach((i) => {\n let v = parseInt(e.target.value) || 0;\n if (v >= 0) {\n v = Math.min(v, quantity || INT_MAX_VALUE);\n\n clearErrors(`inputs.${i}.seatings.${seatIndex}.maxDisplayQuantity`);\n setValue(`inputs.${i}.seatings.${seatIndex}.maxDisplayQuantity`, v);\n if (!quantity) {\n clearErrors(`inputs.${i}.seatings.${seatIndex}.quantity`);\n setValue(`inputs.${i}.seatings.${seatIndex}.quantity`, v);\n }\n } else {\n setValue(\n `inputs.${i}.seatings.${seatIndex}.maxDisplayQuantity`,\n null\n );\n }\n });\n },\n [clearErrors, inputIndeces, setValue]\n );\n\n const onListingNotesChange = useCallback(\n (seatIndex: number, listingNotes: ListingNote[]) => {\n inputIndeces.forEach((i) => {\n setValue(\n `inputs.${i}.seatings.${seatIndex}.listingNotes`,\n listingNotes\n );\n });\n },\n [inputIndeces, setValue]\n );\n\n const onUnitNetProceedsChange = useCallback(\n (index: number) => (e: React.ChangeEvent) => {\n e.stopPropagation();\n e.preventDefault();\n\n const v = parseFloat(e.target.value);\n if (v >= 0 && v <= Number.MAX_VALUE) {\n inputIndeces.forEach((i) => {\n clearErrors(`inputs.${i}.seatings.${index}.unitNetProceeds`);\n setValue(`inputs.${i}.seatings.${index}.unitNetProceeds`, v);\n setValue(\n `inputs.${i}.seatings.${index}.websitePrice`,\n getAllInPriceFromListPrice(\n v,\n null,\n stubHubMarketplace?.sellerFee\n ) ?? null\n );\n });\n } else {\n inputIndeces.forEach((i) => {\n setValue(`inputs.${i}.seatings.${index}.unitNetProceeds`, null);\n setValue(`inputs.${i}.seatings.${index}.websitePrice`, null);\n });\n }\n },\n [clearErrors, inputIndeces, setValue, stubHubMarketplace?.sellerFee]\n );\n\n const onWebsitePriceChange = useCallback(\n (index: number) => (e: React.ChangeEvent) => {\n e.stopPropagation();\n e.preventDefault();\n\n const v = parseFloat(e.target.value);\n if (v >= 0 && v <= Number.MAX_VALUE) {\n inputIndeces.forEach((i) => {\n clearErrors(`inputs.${i}.seatings.${index}.unitNetProceeds`);\n setValue(`inputs.${i}.seatings.${index}.websitePrice`, v);\n setValue(\n `inputs.${i}.seatings.${index}.unitNetProceeds`,\n getListPriceFromAllinPrice(\n v,\n null,\n stubHubMarketplace?.sellerFee\n ) ?? null\n );\n });\n } else {\n inputIndeces.forEach((i) => {\n setValue(`inputs.${i}.seatings.${index}.unitNetProceeds`, null);\n setValue(`inputs.${i}.seatings.${index}.websitePrice`, null);\n });\n }\n },\n [clearErrors, inputIndeces, setValue, stubHubMarketplace?.sellerFee]\n );\n\n const onFaceValueChange = useCallback(\n (index: number) => (e: React.ChangeEvent) => {\n e.stopPropagation();\n e.preventDefault();\n\n const v = parseFloat(e.target.value);\n if (v >= 0 && v <= Number.MAX_VALUE) {\n inputIndeces.forEach((i) => {\n setValue(`inputs.${i}.seatings.${index}.faceValue`, v);\n });\n } else {\n inputIndeces.forEach((i) => {\n setValue(`inputs.${i}.seatings.${index}.faceValue`, null);\n });\n }\n },\n [inputIndeces, setValue]\n );\n\n const selectedTicketClassIds = useMemo(() => {\n const result = inputToDisplay.seatings.map((s) => {\n const selectedSection = venueMapInfo?.sections.find(\n (vs) =>\n (s.sectionId != null && s.sectionId === vs.id) ||\n (s.sectionId == null && s.section === vs.name)\n );\n const selectedRow = selectedSection?.rows?.find(\n (r) =>\n (s.rowId != null && s.rowId === r.id) ||\n (s.rowId == null && s.row === r.name)\n );\n\n return (\n selectedRow?.tktClass?.id ??\n selectedSection?.specRow?.tktClass?.ticketClassId ??\n null\n );\n });\n\n return result.filter((id) => !id).map((id) => id!);\n }, [inputToDisplay.seatings, venueMapInfo?.sections]);\n\n return (\n }\n title={}\n >\n \n {Boolean(venueMapInfo?.sections?.length) && (\n \n ({\n fill: inf.isSelected\n ? vars.color.textBrandActive\n : vars.color.backgroundHighlight,\n stroke: inf.isSelected\n ? vars.color.textBrand\n : vars.color.aqua100,\n textColor: inf.isSelected\n ? vars.color.textInverted\n : vars.color.textBrand,\n })}\n />\n \n )}\n \n\n }\n errors={seatingsError}\n >\n
    \n {inputToDisplay.seatings.length > 0 && (\n <>\n {tableHeaderContent.map((headerCellContentId) => (\n
    \n {headerCellContentId && }\n
    \n ))}\n {inputToDisplay.seatings.map((s, j) => {\n const sectionError = getFieldState(\n `inputs.${inputIndeces[0]}.seatings.${j}.section`\n ).error?.message;\n const rowError = getFieldState(\n `inputs.${inputIndeces[0]}.seatings.${j}.row`\n ).error?.message;\n const quantityError = getFieldState(\n `inputs.${inputIndeces[0]}.seatings.${j}.quantity`\n ).error?.message;\n const proceedsError = getFieldState(\n `inputs.${inputIndeces[0]}.seatings.${j}.unitNetProceeds`\n ).error?.message;\n const websiteError = getFieldState(\n `inputs.${inputIndeces[0]}.seatings.${j}.websitePrice`\n ).error?.message;\n\n const selectedSection = venueMapInfo?.sections.find(\n (vs) =>\n (s.sectionId != null && s.sectionId === vs.id) ||\n (s.sectionId == null && s.section === vs.name)\n );\n const selectedRow = selectedSection?.rows?.find(\n (r) =>\n (s.rowId != null && s.rowId === r.id) ||\n (s.rowId == null && s.row === r.name)\n );\n\n return (\n <>\n
    \n \n {\n onSectionChange(j, sectionName, section);\n }}\n />\n \n
    \n \n {\n onRowChange(j, rowName, row);\n }}\n />\n \n \n \n onQuantityChange(e, j, s.maxDisplayQuantity)\n }\n />\n \n \n onMaxQuantityChange(e, j, s.quantity)}\n />\n \n\n \n \n \n \n \n \n \n \n \n\n \n \n onListingNotesChange(j, listingNotes)\n }\n />\n \n
    \n {\n removeSection(j);\n }}\n />\n
    \n \n );\n })}\n \n )}\n \n + \n \n
    \n \n \n );\n};\n","import { useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { EventMapContextProvider } from 'src/contexts/EventMapContext';\nimport { Stack } from 'src/core/ui';\nimport { useGetEventListingConstraints } from 'src/hooks/useGetEventListingConstraints';\nimport { Event } from 'src/WebApiController';\n\nimport { SeatSaverListingDetailsInputForm } from '../SeatSaverListingWizard.types';\nimport { DeliverySection } from './DeliverySection';\nimport { ListingSection } from './ListingSection';\nimport { SeatingSection } from './SeatingSection';\n\nexport const SeatSaverInput = ({\n events,\n disabled,\n}: {\n events: Event[]; // This is at least 1, but if more than one, must be of same venueConfigId\n disabled?: boolean;\n}) => {\n const { watch } = useFormContext();\n\n const viagogoEventIds = Array.from(\n new Set(events.filter((ev) => ev.viagId).map((ev) => ev.viagId!))\n );\n const inputs = watch('inputs');\n const inputIndeces = useMemo(() => {\n const eventIds = events.map((ev) => ev.viagVirtualId);\n return inputs\n .map((input, i) => {\n if (eventIds.includes(input.event.viagVirtualId)) {\n return i;\n }\n return -1;\n })\n .filter((i) => i >= 0);\n }, [events, inputs]);\n\n const { eventListingConstraintsQuery } =\n useGetEventListingConstraints(viagogoEventIds);\n\n return (\n \n \n \n \n \n \n \n );\n};\n","import {\n ComponentProps,\n useCallback,\n useContext,\n useMemo,\n useState,\n} from 'react';\nimport { FormProvider } from 'react-hook-form';\nimport { CancelButton } from 'src/components/Buttons';\nimport { OkButton } from 'src/components/Buttons/OkButton';\nimport {\n EventSearch,\n EventSearchResult,\n} from 'src/components/Events/EventSearch';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { ConfirmDialog } from 'src/core/interim/dialogs/ConfirmDialog';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { CrossIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { isSuccess } from 'src/utils/errorUtils';\nimport { getInHandDateBasedOnEvent } from 'src/utils/eventWithDataUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ApiException,\n DeliveryType,\n Event,\n EventTimeFrameFilter,\n ListingClient,\n Performer,\n Venue,\n} from 'src/WebApiController';\n\nimport { CancellableFormFooter } from '../common';\nimport { CancellableFormHeader } from '../common/CancellableFormHeader';\nimport { ConnectedEventEntityHeader } from '../common/EventEntityHeader';\nimport { Summary, VenueConfigSummary } from '../common/Summary';\nimport {\n ModalBody,\n ModalBodyDataContainer,\n ModalBodyHeaderContainer,\n ModalFooter,\n} from '../Modal/Modal.styled';\nimport { SeatSaverInput } from './components/SeatSaverInput';\nimport * as styles from './SeatSaverListingWizard.css';\nimport {\n SeatSaverListingDetailsInputForm,\n SeatSaverListingWizardProps,\n} from './SeatSaverListingWizard.types';\n\nexport const SeatSaverListingWizardBody = ({\n disabled,\n events,\n cancelTo,\n formState,\n handleSubmit,\n watch,\n setValue,\n getValues,\n setError,\n}: Omit<\n ComponentProps<\n typeof FormProvider\n >,\n 'children'\n> & { disabled?: boolean } & SeatSaverListingWizardProps) => {\n const multiEventInputsDialog = useBasicDialog();\n const { showErrorDialog, genericError } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const { closeModal, setModal } = useContext(ModalContext);\n const [isLoading, setIsLoading] = useState(false);\n const { isSubmitting } = formState;\n const [curEventGroupIndex, setCurEventGroupIndex] = useState(0);\n const [shouldGroupEventsByVenueId, setShouldGroupEventsByVenueId] =\n useState(true);\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n\n const [showEventSearch, setShowEventSearch] = useState(!events?.length);\n const [selectedEvents, setSelectedEvents] = useState(\n events\n );\n const [selectedVenues, setSelectedVenues] = useState>(\n {}\n );\n const [selectedPerformers, setSelectedPerformer] = useState<\n Record\n >({});\n\n const eventsGroups = useMemo(() => {\n // Group the events for display\n const eventsWithNoVenueConfig = selectedEvents?.filter(\n (ev) => !ev.venueCfgId\n );\n\n const eventsWithVenueConfig = (selectedEvents ?? []).filter(\n (ev) => ev.venueCfgId\n );\n\n let eventsGroups = [];\n\n if (shouldGroupEventsByVenueId) {\n const eventsGroupByVenueConfigs = eventsWithVenueConfig.reduce(\n (r, ev) => {\n const curList = r[ev.venueCfgId!];\n if (curList) {\n curList.push(ev);\n } else {\n r[ev.venueCfgId!] = [ev];\n }\n return r;\n },\n {} as Record\n );\n\n // now combine them\n eventsGroups = Object.values(eventsGroupByVenueConfigs).map(\n (events) => events\n );\n } else {\n eventsGroups = eventsWithVenueConfig.map((e) => [e]);\n }\n\n eventsWithNoVenueConfig?.forEach((ev) => {\n eventsGroups.push([ev]);\n });\n\n return eventsGroups;\n }, [shouldGroupEventsByVenueId, selectedEvents]);\n\n const onSubmit = useCallback(\n async (formValues: SeatSaverListingDetailsInputForm) => {\n setIsLoading(true);\n tryInvokeApi(\n async () => {\n const client = new ListingClient(activeAccountWebClientConfig);\n\n const result = await client.createSeatSaver(formValues.inputs);\n\n if (isSuccess(result)) {\n await refreshExpandedListItems();\n closeModal(true);\n } else {\n showErrorDialog(\n 'ListingClient.createSeatSaver',\n {\n message: result.message ?? genericError,\n status: result.status!,\n } as ApiException,\n {\n onDismissError: () => cancelTo && setModal(cancelTo),\n trackErrorData: formValues,\n }\n );\n }\n },\n (error) => {\n showErrorDialog('ListingClient.createSeatSaver', error, {\n trackErrorData: formValues,\n });\n },\n () => {\n setIsLoading(false);\n }\n );\n },\n [\n activeAccountWebClientConfig,\n cancelTo,\n closeModal,\n genericError,\n refreshExpandedListItems,\n setModal,\n showErrorDialog,\n ]\n );\n\n const hasChanges = useCallback(\n (formValues: SeatSaverListingDetailsInputForm) => {\n return formState.defaultValues !== formValues;\n },\n [formState.defaultValues]\n );\n\n const requiredMsg = useContent(ContentId.Required);\n\n const onSubmitHandler = useCallback(() => {\n const formValues = getValues();\n\n const changed = hasChanges(formValues);\n if (!changed) return;\n\n let hasErrors = false;\n\n // Validate the current group to see whether they are good to proceed\n const curGroupEvents = eventsGroups[curEventGroupIndex];\n const eventIds = curGroupEvents.map((ev) => ev.viagVirtualId);\n formValues.inputs.map((input, i) => {\n if (eventIds.includes(input.event.viagVirtualId)) {\n if (!input.seatings?.length) {\n hasErrors = true;\n setError(\n `inputs.${i}.seatings`,\n { message: requiredMsg },\n { shouldFocus: true }\n );\n } else {\n input.seatings.forEach((s, j) => {\n if (!s.section) {\n hasErrors = true;\n setError(\n `inputs.${i}.seatings.${j}.section`,\n {\n message: requiredMsg,\n },\n { shouldFocus: true }\n );\n }\n if (!s.quantity) {\n hasErrors = true;\n setError(\n `inputs.${i}.seatings.${j}.quantity`,\n {\n message: requiredMsg,\n },\n { shouldFocus: true }\n );\n }\n });\n }\n }\n });\n\n if (!hasErrors && curEventGroupIndex < eventsGroups.length - 1) {\n setCurEventGroupIndex(curEventGroupIndex + 1);\n } else {\n handleSubmit(onSubmit)();\n }\n }, [\n getValues,\n hasChanges,\n eventsGroups,\n curEventGroupIndex,\n setError,\n requiredMsg,\n handleSubmit,\n onSubmit,\n ]);\n\n const formHasChanges = hasChanges(watch());\n\n const onEventSummaryClose = useCallback(() => {\n setSelectedEvents(undefined);\n }, []);\n\n const onEventsSelect = useCallback(\n (data: EventSearchResult[]) => {\n const changedEvents = data.map((e) => e.event);\n const newEvents = data.filter((d) => d.isSelected).map((e) => e.event);\n const unchangedEvents = (selectedEvents ?? []).filter((selectedEvent) =>\n changedEvents.every(\n (changedEvent) =>\n changedEvent.viagVirtualId !== selectedEvent.viagVirtualId\n )\n );\n\n setSelectedEvents([...unchangedEvents, ...newEvents]);\n\n let venChanged = false;\n let perfChanged = false;\n data.forEach((d) => {\n if (d.venue) {\n selectedVenues[d.event.viagVirtualId] = d.venue;\n venChanged = true;\n }\n if (d.performer) {\n selectedPerformers[d.event.viagVirtualId] = d.performer;\n perfChanged = true;\n }\n });\n\n if (venChanged) {\n setSelectedVenues({ ...selectedVenues });\n }\n if (perfChanged) {\n setSelectedPerformer({ ...selectedPerformers });\n }\n },\n [selectedEvents, selectedPerformers, selectedVenues]\n );\n\n const onNextFromEventSearch = useCallback(() => {\n const curInputs = getValues().inputs;\n const newInputs = selectedEvents?.filter((ev) =>\n curInputs.every((ci) => ci.event.viagVirtualId !== ev.viagVirtualId)\n );\n\n // Modify the forms\n if (newInputs) {\n setValue('inputs', [\n ...curInputs,\n ...newInputs.map((ev) => ({\n event: ev,\n seatings: [],\n quantity: 0,\n unitNetProceeds: 0,\n websitePrice: 0,\n faceValue: null,\n deliveryType: DeliveryType.InApp,\n ticketTypeRules: null,\n inHandDate: getInHandDateBasedOnEvent(ev, 2),\n autoBroadcastCreatedListing: false,\n daysBeforeEvent: 2,\n sellerOwnTickets: true,\n })),\n ]);\n }\n\n setShowEventSearch(false);\n setCurEventGroupIndex(0);\n }, [getValues, selectedEvents, setValue]);\n\n return (\n <>\n \n \n \n \n }\n />\n \n\n \n {showEventSearch ? (\n \n ev.viagVirtualId)}\n numEventsSelected={0}\n timeFrame={EventTimeFrameFilter.Future}\n />\n \n ) : (\n <>\n \n {eventsGroups[curEventGroupIndex].length === 1 ? (\n \n \n \n )\n }\n />\n ) : (\n \n \n \n )\n }\n />\n )}\n \n \n {isLoading ? (\n \n ) : (\n \n )}\n \n \n )}\n \n\n \n \n {showEventSearch ? (\n {\n const existGroupedEvents = eventsGroups.some(\n (group) => group.length > 1\n );\n if (existGroupedEvents) {\n // Ask the user if he wants to use grouped events\n multiEventInputsDialog.launchDialog();\n } else {\n // No grouped events, then proceed to the next page\n onNextFromEventSearch();\n multiEventInputsDialog.closeDialog();\n }\n }}\n disabled={disabled || isLoading || !selectedEvents?.length}\n textContentId={ContentId.Next}\n />\n ) : (\n <>\n {!events?.length && (\n {\n if (curEventGroupIndex === 0) {\n setShowEventSearch(true);\n } else {\n setCurEventGroupIndex(curEventGroupIndex - 1);\n }\n }}\n textContentId={ContentId.Back}\n />\n )}\n \n \n )}\n \n \n \n }\n bodyText={\n \n \n \n \n \n \n \n \n \n \n \n }\n onCancel={() => {\n setShouldGroupEventsByVenueId(false);\n onNextFromEventSearch();\n multiEventInputsDialog.closeDialog();\n }}\n onOkay={() => {\n setShouldGroupEventsByVenueId(true);\n onNextFromEventSearch();\n multiEventInputsDialog.closeDialog();\n }}\n />\n \n );\n};\n","import { FormProvider, useForm } from 'react-hook-form';\nimport { getInHandDateBasedOnEvent } from 'src/utils/eventWithDataUtils';\nimport { DeliveryType } from 'src/WebApiController';\n\nimport {\n SeatSaverListingDetailsInputForm,\n SeatSaverListingWizardProps,\n} from './SeatSaverListingWizard.types';\nimport { SeatSaverListingWizardBody } from './SeatSaverListingWizardBody';\n\nexport const SeatSaverListingWizard = ({\n cancelTo,\n events,\n ...rest\n}: SeatSaverListingWizardProps) => {\n const methods = useForm({\n defaultValues: {\n inputs:\n events?.map((ev) => ({\n event: ev,\n autoBroadcastCreatedListing: false,\n seatings: [],\n quantity: 0,\n unitNetProceeds: 0,\n websitePrice: 0,\n faceValue: null,\n deliveryType: DeliveryType.InApp,\n inHandDate: getInHandDateBasedOnEvent(ev, 2),\n daysBeforeEvent: 2,\n sellerOwnTickets: true,\n })) ?? [],\n },\n });\n\n return (\n \n \n \n );\n};\n","import { ComponentProps, useCallback, useContext } from 'react';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { GroupListingsModal } from 'src/modals/GroupListings';\nimport { SeatSaverListingWizard } from 'src/modals/SeatSaverListingWizard/SeatSaverListingWizard';\nimport { SeatSaverIcon } from 'src/svgs';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Event, Feature, Permission } from 'src/WebApiController';\n\nexport const LaunchAddSeatSaver = ({\n events,\n disabled,\n}: ComponentProps & {\n event?: Event;\n disabled?: boolean;\n}) => {\n const hasPermission = useUserHasAnyOfPermissions(\n Permission.Inventory_AddSeatSaver\n );\n const hasSeatSaverFeature = useUserHasFeature(Feature.SeatSaver);\n\n const { setModal } = useContext(ModalContext);\n const {\n eventsExpansion: { setListItemExpansion },\n } = useCatalogDataContext();\n\n const addSeatSaver = useCallback(() => {\n setModal({\n children: ,\n clickOutsideToClose: true,\n size: 'slide-in',\n });\n }, [setModal, events]);\n\n const onLaunchDialog = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n\n if (events?.length) {\n setListItemExpansion(\n true,\n events.map((ev) => ev.viagVirtualId)\n );\n }\n\n addSeatSaver();\n },\n [events, addSeatSaver, setListItemExpansion]\n );\n\n if (!hasPermission || !hasSeatSaverFeature) {\n return null;\n }\n\n return (\n \n \n \n \n \n \n );\n};\n","import { ComponentProps, useCallback } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useEventHubContext } from 'src/contexts/EventHubContext/EventHubContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { GroupListingsModal } from 'src/modals/GroupListings';\nimport { SplitIcon } from 'src/svgs';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Event } from 'src/WebApiController';\n\nexport const EnterCompanionMode = ({\n event,\n disabled,\n}: ComponentProps & {\n event?: Event;\n disabled?: boolean;\n}) => {\n const { onStartSession, onCancelSession, sessionRole, enabled } =\n useEventHubContext();\n\n const onToggleComapnionMode = useCallback(() => {\n if (sessionRole) {\n onCancelSession();\n } else {\n onStartSession();\n }\n }, [onStartSession, onCancelSession, sessionRole]);\n\n if (!event?.viagId || !enabled) {\n return null;\n }\n return (\n \n \n \n \n \n \n );\n};\n","import { ListingMergeSuggestion } from 'src/WebApiController';\n\n/**\n * Clusted array of listing ids when they have overlap\n * E.g. [[1, 2], [3, 4], [2, 3], [5, 6]] => [[1, 2, 3], [5, 6]]\n * @param listingIds\n * @returns\n */\nconst clusterListingIds = (listingIds: number[][]) => {\n const clusters: number[][] = [];\n // This step is necessary - check the case of [[1, 2], [3, 4], [2, 3]]\n const sortedListingIds = listingIds.toSorted((a, b) => a[0] - b[0]);\n sortedListingIds.forEach((ids) => {\n const cluster = clusters.find((c) => ids.some((id) => c.includes(id)));\n if (cluster) {\n ids.forEach((id) => {\n if (!cluster.includes(id)) {\n cluster.push(id);\n }\n });\n } else {\n clusters.push(ids);\n }\n });\n return clusters\n .map((c) => c.toSorted((a, b) => a - b))\n .filter((c) => c.length > 1);\n};\n\nexport const clusterListingMergeSuggestionsByListingIdOverlap = (\n mergeSuggestions: ListingMergeSuggestion[] | null | undefined\n): ListingMergeSuggestion[] | null | undefined => {\n if (!mergeSuggestions) {\n return mergeSuggestions;\n }\n\n const mergeSuggestionsByEventId: Record =\n {};\n mergeSuggestions.forEach((s) => {\n const key = s.eventId ? s.eventId.toString() : (s.eventMappingId ?? '');\n if (!key) return;\n\n if (!mergeSuggestionsByEventId[key]) {\n mergeSuggestionsByEventId[key] = [];\n }\n mergeSuggestionsByEventId[key].push(s);\n });\n\n const mergedSuggestions: ListingMergeSuggestion[] = [];\n\n Object.values(mergeSuggestionsByEventId).forEach((suggestions) => {\n const listingIds = suggestions.map((s) => s.listingIds);\n const clusteredListingIds = clusterListingIds(listingIds);\n\n clusteredListingIds.forEach((ids) => {\n const mergedSuggestion: ListingMergeSuggestion = {\n eventId: suggestions[0].eventId,\n eventMappingId: suggestions[0].eventMappingId,\n listingIds: ids,\n seatFrom: null,\n seatTo: null,\n };\n mergedSuggestions.push(mergedSuggestion);\n });\n });\n\n return mergedSuggestions;\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { useMemo } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { Event, ListingClient } from 'src/WebApiController';\n\nimport { UseGetListingMergeSuggestions } from './UseGetListingMergeSuggestions.types';\nimport { clusterListingMergeSuggestionsByListingIdOverlap } from './useGetListingMergeSuggestions.utils';\n\nexport const useGetListingMergeSuggestionsByEvent = (\n event?: Event | null,\n excludeHeldListings = false\n): UseGetListingMergeSuggestions => {\n const { trackError } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n\n const shouldQuery =\n activeAccountWebClientConfig.activeAccountId != null &&\n event?.viagId != null;\n\n const mergeSuggestionsQuery = useQuery({\n queryKey: [\n 'ListingClient.getListingMergeSuggestionsByEvent',\n activeAccountWebClientConfig,\n event?.viagId,\n excludeHeldListings,\n ],\n queryFn: () => {\n if (!shouldQuery) {\n return null;\n }\n return new ListingClient(\n activeAccountWebClientConfig\n ).getListingMergeSuggestionsByEvent(event!.viagId!, excludeHeldListings);\n },\n\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n meta: {\n persist: false,\n onError: (error: ErrorTypes) => {\n trackError('ListingClient.getListingMergeSuggestionsByEvent', error, {\n trackErrorData: {\n viagogoEventId: event?.viagId,\n excludeHeldListings,\n },\n });\n },\n },\n });\n\n const mergeSuggestions = useMemo(() => {\n return clusterListingMergeSuggestionsByListingIdOverlap(\n mergeSuggestionsQuery.data\n );\n }, [mergeSuggestionsQuery.data]);\n\n return {\n mergeSuggestions,\n isLoading: mergeSuggestionsQuery.isLoading,\n };\n};\n","import styled from 'styled-components/macro';\n\nexport const MainLabel = styled.div`\n ${({\n theme: {\n typography: { getStyles },\n },\n }) => getStyles('title5')};\n display: flex;\n justify-content: space-between;\n`;\n","import { Content } from 'src/contexts/ContentContext';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { useAlertWithSuppressionDialog } from './useAlertWithSuppressionDialog';\n\nexport function useMergeGroupedListingDialog(\n onOkay: () => void,\n onCancel: () => void\n) {\n const { value, ...rest } = useAlertWithSuppressionDialog(\n 'mergedGroupListingTimestamp',\n onOkay,\n onCancel\n );\n return {\n ...rest,\n lastTimeStamp: value?.mergedGroupListingTimestamp,\n bodyText: ,\n cancelText: ,\n };\n}\n","import { useCallback, useMemo, useState } from 'react';\nimport { ConfirmButton } from 'src/components/Buttons';\nimport { Content } from 'src/contexts/ContentContext';\nimport {\n Alert,\n AlertWithSuppressionDialog,\n} from 'src/dialogs/AlertWithSuppressionDialog';\nimport { useMergeGroupedListingDialog } from 'src/dialogs/AlertWithSuppressionDialog/useMergeGroupedListingDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { ListingTable } from 'src/tables/ListingTable';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { isDatePassedHours } from 'src/utils/dateTimeUtils';\nimport { Event, Listing } from 'src/WebApiController';\n\nimport * as styles from './MergeListings.css';\nimport { GroupIdNameMap } from './utils';\n\nexport type MergeListingsSuggestionsDisplayProps = {\n event: Event;\n listings: Listing[];\n listingIds: number[];\n disabled?: boolean;\n onMergeSuggestions: (listingIds: number[]) => void;\n groupIdNameMap?: GroupIdNameMap;\n};\n\nexport const MergeListingsSuggestionsDisplay = ({\n listingIds,\n listings,\n disabled,\n onMergeSuggestions: onMerge,\n groupIdNameMap,\n ...rest\n}: MergeListingsSuggestionsDisplayProps) => {\n const listingsSelected = useMemo(() => {\n return listings.filter((l) => listingIds.includes(l.id)) ?? [];\n }, [listingIds, listings]);\n\n const warningDialog = useBasicDialog();\n const mergeSuggestionsGroupListingHookProps = useMergeGroupedListingDialog(\n () => {},\n () => {}\n );\n\n const [alerts, setAlerts] = useState([]);\n\n const onMergeHandler = useCallback(() => {\n const hasListingFromGroup = listingIds.some((listingId) => {\n return listings.find((l) => l.id === listingId)?.ltGrpId;\n });\n\n if (\n hasListingFromGroup &&\n isDatePassedHours(mergeSuggestionsGroupListingHookProps.lastTimeStamp, 1)\n ) {\n setAlerts([mergeSuggestionsGroupListingHookProps]);\n warningDialog.launchDialog();\n } else {\n onMerge(listingIds);\n }\n }, [\n listingIds,\n listings,\n mergeSuggestionsGroupListingHookProps,\n onMerge,\n warningDialog,\n ]);\n\n return (\n <>\n
    \n
    \n \n
    \n \n
    \n }\n size=\"md\"\n {...warningDialog.dialogProps}\n alerts={alerts}\n onOkay={() => {\n onMerge(listingIds);\n warningDialog.closeDialog();\n }}\n okText={ContentId.Yes}\n cancelText={ContentId.No}\n onCancel={() => warningDialog.closeDialog()}\n />\n \n );\n};\n","import { isEmpty } from 'lodash-es';\nimport { useCallback, useMemo, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { CatalogMultiSelectionContextProvider } from 'src/contexts/CatalogMultiSelectionContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { shared, vars } from 'src/core/themes';\nimport { Stack, Switch } from 'src/core/ui';\nimport { useGetListingMergeSuggestionsByEvent } from 'src/hooks/api/useGetListingMergeSuggestionsByEvent';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { FieldError } from 'src/modals/common/Purchase';\nimport { ListingTable } from 'src/tables/ListingTable';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { EventWithData, ListingGroup } from 'src/WebApiController';\nimport { Feature, Listing, MergeListingsInput } from 'src/WebApiController';\n\nimport {\n MultiSelectionContextProvider,\n MultiSelectScope,\n} from '../../contexts/MultiSelectionContext/MultiSelectionContext';\nimport * as styles from './MergeListings.css';\nimport { MainLabel } from './MergeListings.styled';\nimport { MergeListingsSuggestionsDisplay } from './MergeListingsSuggestionsDisplay';\nimport { getFlattenedListings } from './utils';\n\nexport type MergeListingsBodyProps = EventWithData & {\n disabled?: boolean;\n onMergeSuggestions: (listingIds: number[]) => void;\n footer?: React.ReactElement;\n};\n\nexport const MergeListingsBody = ({\n event,\n entities,\n footer,\n ...rest\n}: MergeListingsBodyProps) => {\n const listings = entities.listings;\n\n const { watch, setValue, clearErrors, formState } =\n useFormContext();\n\n const hasDefaultNotToMergeHoldListingsFeature = useUserHasFeature(\n Feature.DefaultNotToMergeHoldListings\n );\n\n const [excludeHeldListings, setExcludeHeldListings] = useState(\n hasDefaultNotToMergeHoldListingsFeature\n );\n\n const hasAdminHoldListings = useMemo(\n () => !isEmpty(listings?.filter((l) => l.isAdminHold)),\n [listings]\n );\n\n const eligibleListings = useMemo(\n (): (Listing | ListingGroup)[] =>\n (listings?.filter((l) => {\n let eligible = !l.isSeatSaver;\n if (excludeHeldListings) {\n eligible = eligible && !l.isAdminHold;\n }\n\n return eligible;\n }) || []) as (Listing | ListingGroup)[],\n [excludeHeldListings, listings]\n );\n\n const listingIds = watch('listingIds');\n\n const [ineligibilityCount, setIneligibilityCount] = useState(0);\n\n const onListingIdsSelected = (selectedIds: number[]) => {\n clearErrors('listingIds');\n setValue('listingIds', selectedIds);\n };\n\n const { mergeSuggestions } = useGetListingMergeSuggestionsByEvent(\n event,\n excludeHeldListings\n );\n\n const sectionDifMsg = useContent(ContentId.MergeListings_SectionDifference);\n const rowDifMsg = useContent(ContentId.MergeListings_RowDifference);\n const deliveryDifMsg = useContent(ContentId.MergeListings_DeliveryDifference);\n const groupedListingMsg = useContent(ContentId.MergeListings_GroupedListings);\n const mismatchListingMsg = useContent(\n ContentId.MergeListings_ListingMismatchWarning\n );\n\n const getListingIneiligibleReason = useCallback(\n (firstListing: Listing, l: Listing) => {\n return l.seating.section !== firstListing.seating.section\n ? sectionDifMsg\n : (l.seating.row || null) !== (firstListing.seating.row || null)\n ? rowDifMsg\n : l.delivType !== firstListing.delivType\n ? deliveryDifMsg\n : l.isLtGrp\n ? groupedListingMsg\n : undefined;\n },\n [deliveryDifMsg, groupedListingMsg, rowDifMsg, sectionDifMsg]\n );\n\n const getListingNotEligibleForSelection = useCallback(\n (listings?: Listing[] | null) => {\n const selectedListings = (listings ?? []).filter(\n (l) => listingIds?.includes(l.id)\n );\n\n if (selectedListings?.length) {\n const firstListing = selectedListings[0];\n const listingsWithIneligibleReasons = (listings ?? [])!.map((l) => ({\n listing: l,\n ineligibleReason: undefined,\n }));\n\n const newIneligibilityCount = listingsWithIneligibleReasons.filter(\n (l) => l.ineligibleReason\n ).length;\n\n if (newIneligibilityCount !== ineligibilityCount) {\n setIneligibilityCount(newIneligibilityCount);\n }\n return listingsWithIneligibleReasons;\n }\n },\n [ineligibilityCount, listingIds]\n );\n\n const mergeMismatchListingWarning = useMemo(() => {\n const selectedListings = (eligibleListings ?? []).filter(\n (l) => listingIds?.includes(l.id)\n );\n\n if (selectedListings.length) {\n const firstListing = selectedListings[0];\n const hasMismatch = selectedListings.some((l, index) => {\n return (\n index > 0 && getListingIneiligibleReason(firstListing, l) != null\n );\n });\n\n if (hasMismatch) {\n return mismatchListingMsg;\n }\n }\n\n return undefined;\n }, [\n getListingIneiligibleReason,\n\n listingIds,\n mismatchListingMsg,\n eligibleListings,\n ]);\n\n const mergeSuggestionsListingIds = useMemo(() => {\n if (!mergeSuggestions) {\n return [];\n }\n\n return mergeSuggestions.map((s) => s.listingIds);\n }, [mergeSuggestions]);\n\n const [flattenedEligibleListings, groupIdNameMap] =\n getFlattenedListings(eligibleListings);\n\n return (\n \n \n \n {hasAdminHoldListings && hasDefaultNotToMergeHoldListingsFeature && (\n \n e.stopPropagation()}\n onCheckedChange={(isChecked) => {\n if (isChecked === excludeHeldListings) {\n setExcludeHeldListings(!isChecked);\n }\n }}\n />\n \n \n )}\n \n \n \n \n \n\n {mergeMismatchListingWarning && (\n \n )}\n\n {formState.errors.listingIds?.message}\n \n \n \n {footer}\n {ineligibilityCount > 0 ? (\n \n
    \n \n
    \n
    \n \n
    \n
    \n ) : null}\n {mergeSuggestionsListingIds.length > 0 && (\n \n \n \n \n {mergeSuggestionsListingIds.map((s, i) => (\n \n ))}\n \n )}\n \n );\n};\n","import { useCallback, useState } from 'react';\nimport { FieldValues, UseFormHandleSubmit } from 'react-hook-form';\nimport { Content } from 'src/contexts/ContentContext';\nimport {\n Alert,\n AlertWithSuppressionDialog,\n} from 'src/dialogs/AlertWithSuppressionDialog';\nimport { useMergeGroupedListingDialog } from 'src/dialogs/AlertWithSuppressionDialog/useMergeGroupedListingDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nexport function useMergeGroupedListingAlertDialog(\n handleSubmit: UseFormHandleSubmit,\n mergeListings: (\n formData: TInput,\n closeModalAfterMerge?: boolean\n ) => Promise\n) {\n const [alerts, setAlerts] = useState([]);\n const warningDialog = useBasicDialog();\n\n const mergeGroupedListingHookProps = useMergeGroupedListingDialog(\n () => {\n handleSubmit(onSubmit)();\n },\n () => {}\n );\n\n const onSubmit = useCallback(\n async (formData: TInput) => {\n return await mergeListings(formData, true);\n },\n [mergeListings]\n );\n\n return {\n setAlerts,\n warningDialog,\n mergeGroupedListingHookProps,\n onSubmit,\n AlertDialog: (\n }\n size=\"md\"\n {...warningDialog.dialogProps}\n alerts={alerts}\n onOkay={() => {\n warningDialog.closeDialog();\n }}\n okText={ContentId.Yes}\n cancelText={ContentId.No}\n onCancel={() => warningDialog.closeDialog()}\n />\n ),\n };\n}\n","import {\n ComponentProps,\n useCallback,\n useContext,\n useMemo,\n useState,\n} from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { ConfirmButton } from 'src/components/Buttons';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { useCatalogMetricsContext } from 'src/contexts/CatalogMetricsContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { CancellableFormFooter } from 'src/modals/common';\nimport { CancellableFormHeader } from 'src/modals/common/CancellableFormHeader';\nimport { ConnectedEventEntityHeader } from 'src/modals/common/EventEntityHeader';\nimport { ModalBody, ModalFooter } from 'src/modals/Modal';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { isDatePassedHours } from 'src/utils/dateTimeUtils';\nimport { isSuccess } from 'src/utils/errorUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n Event,\n ListingClient,\n ListingMetrics,\n MergeListingsInput,\n} from 'src/WebApiController';\n\nimport { Summary } from '../common/Summary';\nimport {\n ModalBodyDataContainer,\n ModalBodyHeaderContainer,\n} from '../Modal/Modal.styled';\nimport * as styles from './MergeListings.css';\nimport { MergeListingsBody } from './MergeListingsBody';\nimport { useMergeGroupedListingAlertDialog } from './useMergeGroupedListingsDialog';\n\nexport const MergeListingsModal = ({ event }: { event: Event }) => {\n const methods = useForm({\n defaultValues: {\n listingIds: [],\n },\n });\n\n return (\n \n \n \n );\n};\n\nconst MergeListingsModalContent = ({\n event,\n formState,\n handleSubmit,\n setError,\n watch,\n getValues,\n}: { event: Event } & Omit<\n ComponentProps>,\n 'children'\n>) => {\n const { closeModal } = useContext(ModalContext);\n const { activeAccountWebClientConfig } = useAppContext();\n const [isLoading, setIsLoading] = useState(false);\n const { isSubmitting } = formState;\n\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const {\n eventsTransformed,\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n const { refreshMetrics } = useCatalogMetricsContext();\n\n const listingIds = watch('listingIds');\n const eventData = useMemo(\n () =>\n eventsTransformed?.find(\n (ev) => ev.event.viagVirtualId === event.viagVirtualId\n ),\n [eventsTransformed, event.viagVirtualId]\n );\n\n const needToMergeTwoOrMoreListingsError = useContent(\n ContentId.NeedToMergeToTwoOrMoreListings\n );\n\n const mergeListings = useCallback(\n async (formData: MergeListingsInput, closeModalAfterMerge?: boolean) => {\n if (formData.listingIds.length < 2) {\n setError('listingIds', {\n message: needToMergeTwoOrMoreListingsError,\n });\n return;\n }\n\n // If this is called, there are no form errors (else onSubmit is never called)\n setIsLoading(true);\n\n return await tryInvokeApi(\n async () => {\n const result = await new ListingClient(\n activeAccountWebClientConfig\n ).mergeListings(formData);\n\n if (isSuccess(result)) {\n await refreshExpandedListItems();\n refreshMetrics?.();\n if (closeModalAfterMerge) {\n closeModal(true);\n }\n } else {\n showErrorDialog('ListingClient.mergeListings', result, {\n trackErrorData: formData,\n });\n }\n },\n (error) => {\n showErrorDialog('ListingClient.mergeListings', error, {\n trackErrorData: formData,\n });\n },\n () => setIsLoading(false)\n );\n },\n [\n activeAccountWebClientConfig,\n closeModal,\n needToMergeTwoOrMoreListingsError,\n refreshExpandedListItems,\n refreshMetrics,\n setError,\n showErrorDialog,\n ]\n );\n\n const {\n setAlerts,\n warningDialog,\n mergeGroupedListingHookProps,\n onSubmit,\n AlertDialog,\n } = useMergeGroupedListingAlertDialog(handleSubmit, mergeListings);\n\n const onSubmitHandler = useCallback(() => {\n const formData = getValues();\n const hasListingFromGroup = formData.listingIds.some(\n (formDataListingId) => {\n const listing = eventData?.entities?.listings?.find(\n (listing) => listing.id === formDataListingId\n );\n\n // If no listing is found in eventData.listings then that means it's in a group\n if (!listing) {\n return true;\n }\n\n return false;\n }\n );\n\n if (\n hasListingFromGroup &&\n isDatePassedHours(mergeGroupedListingHookProps.lastTimeStamp, 1)\n ) {\n setAlerts([mergeGroupedListingHookProps]);\n warningDialog.launchDialog();\n } else {\n handleSubmit(onSubmit)();\n }\n }, [\n getValues,\n mergeGroupedListingHookProps,\n eventData?.entities?.listings,\n setAlerts,\n warningDialog,\n handleSubmit,\n onSubmit,\n ]);\n\n const onMergeSuggestions = useCallback(\n (listingIds: number[]) => {\n mergeListings({ listingIds });\n },\n [mergeListings]\n );\n\n return (\n <>\n \n }\n />\n \n \n {isLoading || eventData?.entities?.listings == null ? (\n \n ) : (\n eventData && (\n <>\n \n \n \n \n \n \n \n ) : undefined\n }\n />\n {AlertDialog}\n \n \n )\n )}\n \n \n \n \n \n );\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { useMemo } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { ListingClient } from 'src/WebApiController';\n\nimport { UseGetListingMergeSuggestions } from './UseGetListingMergeSuggestions.types';\nimport { clusterListingMergeSuggestionsByListingIdOverlap } from './useGetListingMergeSuggestions.utils';\n\nexport const useGetListingMergeSuggestions = (\n excludeHeldListings = false\n): UseGetListingMergeSuggestions => {\n const { trackError } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n\n const shouldQuery = activeAccountWebClientConfig.activeAccountId != null;\n const mergeSuggestionsQuery = useQuery({\n queryKey: [\n 'ListingClient.getListingMergeSuggestions',\n activeAccountWebClientConfig,\n excludeHeldListings,\n ],\n queryFn: () => {\n if (!shouldQuery) {\n return null;\n }\n return new ListingClient(\n activeAccountWebClientConfig\n ).getListingMergeSuggestions(excludeHeldListings);\n },\n\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError('ListingClient.getListingMergeSuggestions', error);\n },\n },\n });\n\n const mergeSuggestions = useMemo(() => {\n return clusterListingMergeSuggestionsByListingIdOverlap(\n mergeSuggestionsQuery.data\n );\n }, [mergeSuggestionsQuery.data]);\n\n return {\n mergeSuggestions,\n isLoading: mergeSuggestionsQuery.isLoading,\n };\n};\n","import { isEqual } from 'lodash-es';\n\n/**\n * Check if two arrays are equal ignoring order\n * @param a array of numbers\n * @param b array of numbers\n * @returns boolean\n */\nexport const isEqualIgnoringOrder = (a: number[], b: number[]) => {\n return isEqual(a.toSorted(), b.toSorted());\n};\n","import { SeatingInfo } from 'src/components/common/SeatingInfo';\nimport { Content, useContentContext } from 'src/contexts/ContentContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { HorizontalTextList } from 'src/core/POS/HorizontalTextList';\nimport { vars } from 'src/core/themes';\nimport { Stack, TooltipPopover } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ListingGroupIcon } from 'src/svgs';\nimport { TableShimmeringDiv } from 'src/tables/Table';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getListingNoteIcon } from 'src/utils/listingNotesUtils';\nimport { Feature, Listing } from 'src/WebApiController';\n\nimport * as styles from '../MergeListings.css';\nimport { GroupIdNameMap } from '../utils';\n\nexport const MergeSuggestionsDisplay = ({\n listings,\n listingCount,\n disabled,\n selected,\n onSelectedChange,\n listingGroupMap,\n}: {\n listings: Listing[] | undefined;\n listingCount: number;\n disabled?: boolean;\n selected?: boolean;\n onSelectedChange?: (selected: boolean) => void;\n listingGroupMap: GroupIdNameMap;\n}) => {\n return (\n
    \n {listings?.length ? (\n <>\n onSelectedChange?.(!selected)}\n />\n
    \n {listings.map((l) => (\n \n ))}\n
    \n \n ) : (\n
    \n {Array.from({ length: listingCount }).map((_, i) => (\n
    \n \n
    \n ))}\n
    \n )}\n
    \n );\n};\n\nconst MergeSuggestionListingItem = ({\n listing,\n listingGroupMap,\n}: {\n listing: Listing;\n listingGroupMap: GroupIdNameMap;\n}) => {\n const contentContext = useContentContext();\n const hasListingNotesAdditionalInfoFeature = useUserHasFeature(\n Feature.ListingNotesAdditionalInfo\n );\n const hasShowSeatTraitOnMergeFeature = useUserHasFeature(\n Feature.ShowSeatTraitOnMerge\n );\n\n return (\n \n \n \n
    \n {listing.ltGrpId && listingGroupMap[listing.ltGrpId] && (\n \n }\n >\n
    \n {' '}\n {listingGroupMap[listing.ltGrpId]}\n
    \n \n )}\n
    \n
    \n {listing.seatTraits?.length && hasShowSeatTraitOnMergeFeature && (\n n.listingNoteText)}\n maxTextsToShowOnHover={listing.seatTraits.length}\n />\n )}\n \n );\n};\n","import { useMemo } from 'react';\nimport { EventItemHeader } from 'src/components/Events/EventItemHeader';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport * as PosCollapsible from 'src/core/POS/PosCollapsible';\nimport { vars } from 'src/core/themes';\nimport { useGetEventFullInfo } from 'src/hooks/useGetEventFullInfo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Listing } from 'src/WebApiController';\n\nimport * as styles from '../MergeListings.css';\nimport { getFlattenedListings } from '../utils';\nimport { EventMergeSuggestionsAccordionProps } from './BulkMergeListings.types';\nimport { isEqualIgnoringOrder } from './BulkMergeListings.utils';\nimport { MergeSuggestionsDisplay } from './MergeSuggestionsDisplay';\n\nexport const EventMergeSuggestionsAccordion = ({\n eventWithMergeSuggestion,\n onSuggestionsSelectedChange,\n selectedListingIds,\n disabled,\n selected,\n partialSelected,\n onSelectedChange,\n}: EventMergeSuggestionsAccordionProps) => {\n const { event, mergeSuggestions } = eventWithMergeSuggestion;\n\n const mergeText = useContent(ContentId.Merge).toLowerCase();\n const mergesText = useContent(ContentId.Merges);\n\n const {\n eventsExpansion: { setListItemExpansion },\n eventsTransformed,\n } = useCatalogDataContext();\n const { venue, performer } = useGetEventFullInfo(event);\n\n const eventData = useMemo(\n () => eventsTransformed?.find((ev) => ev.event.viagId === event.viagId),\n [event, eventsTransformed]\n );\n\n const [flattenedListings, groupIdNameMap] = getFlattenedListings(\n eventData?.entities?.listings\n );\n\n const isSelected = (listingIds: number[]) => {\n return selectedListingIds.some((l) => isEqualIgnoringOrder(l, listingIds));\n };\n\n const listings = flattenedListings;\n\n return (\n {\n if (open) {\n setListItemExpansion(true, [event.viagVirtualId]);\n }\n }}\n style={{ marginBottom: vars.spacing['lg'] }}\n >\n
    \n \n
    \n \n // If partially selected, we want to select all\n onSelectedChange?.(!selected || !!partialSelected)\n }\n onClick={(e) => e.stopPropagation()}\n />\n
    \n {`${\n mergeSuggestions.length\n } ${\n mergeSuggestions.length > 1 ? mergesText : mergeText\n }`}\n }\n />\n
    \n
    \n
    \n
    \n \n
    \n {mergeSuggestions.map((ms, i) => (\n listings?.find((l) => l.id === lid))\n .filter((l) => l) as Listing[])\n : undefined\n }\n listingGroupMap={groupIdNameMap}\n listingCount={ms.listingIds.length}\n selected={isSelected(ms.listingIds)}\n onSelectedChange={(selected) =>\n onSuggestionsSelectedChange(selected, ms.listingIds)\n }\n />\n ))}\n
    \n
    \n \n );\n};\n","import {\n ComponentProps,\n useCallback,\n useContext,\n useMemo,\n useState,\n} from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { Virtuoso } from 'react-virtuoso';\nimport { ConfirmButton } from 'src/components/Buttons';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { useCatalogMetricsContext } from 'src/contexts/CatalogMetricsContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack, Switch } from 'src/core/ui';\nimport { useGetListingMergeSuggestions } from 'src/hooks/api/useGetListingMergeSuggestions';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { CancellableFormFooter } from 'src/modals/common';\nimport { CancellableFormHeader } from 'src/modals/common/CancellableFormHeader';\nimport { ConnectedEventEntityHeader } from 'src/modals/common/EventEntityHeader';\nimport { ModalBody, ModalFooter } from 'src/modals/Modal';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { EVENT_SORT_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { isDatePassedHours } from 'src/utils/dateTimeUtils';\nimport { getEventSort, getEventUiSort } from 'src/utils/eventQueryUtils';\nimport {\n sortEventsByDate,\n sortEventsByName,\n} from 'src/utils/eventWithDataUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n BulkMergeListingsInput,\n EventSort,\n Feature,\n ListingClient,\n ListingMetrics,\n} from 'src/WebApiController';\n\nimport { ModalBodyDataContainer } from '../Modal/Modal.styled';\nimport {\n EventMergeSuggestionsAccordionProps,\n UIEventWithDataAndMergeSuggestions,\n} from './BulkMergeListings/BulkMergeListings.types';\nimport { isEqualIgnoringOrder } from './BulkMergeListings/BulkMergeListings.utils';\nimport { EventMergeSuggestionsAccordion } from './BulkMergeListings/EventMergeSuggestionsAccordion';\nimport * as styles from './MergeListings.css';\nimport { MainLabel } from './MergeListings.styled';\nimport { useMergeGroupedListingAlertDialog } from './useMergeGroupedListingsDialog';\n\nexport const BulkMergeListingsModal = () => {\n const methods = useForm({\n defaultValues: {\n listingIdLists: [],\n },\n });\n\n return (\n \n \n \n );\n};\n\nconst BulkMergeListingsModalContent = ({\n formState,\n handleSubmit,\n watch,\n setValue,\n getValues,\n}: Omit<\n ComponentProps>,\n 'children'\n>) => {\n const { closeModal } = useContext(ModalContext);\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n const {\n eventsTransformed,\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n const { refreshMetrics } = useCatalogMetricsContext();\n const isMobile = useMatchMedia('mobile');\n\n const hasDefaultNotToMergeHoldListingsFeature = useUserHasFeature(\n Feature.DefaultNotToMergeHoldListings\n );\n\n const [excludeHeldListings, setExcludeHeldListings] = useState(\n hasDefaultNotToMergeHoldListingsFeature\n );\n const { mergeSuggestions, isLoading: mergeSuggestionsIsLoading } =\n useGetListingMergeSuggestions(excludeHeldListings);\n\n const selectedText = useContent(ContentId.Selected);\n const selectAllText = useContent(ContentId.SelectAll);\n const deselectAllText = useContent(ContentId.DeselectAll);\n\n const [isLoading, setIsLoading] = useState(false);\n const { isDirty, isSubmitting } = formState;\n const [eventSortQuery, setEventSortQuery] = useState<{\n sortBy: EventSort | null;\n isSortDescending: boolean | null;\n }>({ sortBy: null, isSortDescending: false });\n\n const listingIdLists = watch('listingIdLists');\n\n const eventsWithMergeSuggestions: UIEventWithDataAndMergeSuggestions[] =\n useMemo(() => {\n if (!mergeSuggestions || !eventsTransformed) return [];\n\n const viagogoEventIdsWithMergeSuggestions = mergeSuggestions.map(\n (m) => m.eventId\n );\n\n return eventsTransformed\n .filter((ev) =>\n viagogoEventIdsWithMergeSuggestions.includes(ev.event.viagId)\n )\n .map((ev) => ({\n ...ev,\n mergeSuggestions: mergeSuggestions!.filter(\n (m) => ev.event.viagId === m.eventId\n ),\n }));\n }, [eventsTransformed, mergeSuggestions]);\n\n const mergeListings = useCallback(\n async (\n formData: BulkMergeListingsInput,\n closeModalAfterMerge?: boolean\n ) => {\n // If this is called, there are no form errors (else onSubmit is never called)\n setIsLoading(true);\n\n return await tryInvokeApi(\n async () => {\n const result = await new ListingClient(\n activeAccountWebClientConfig\n ).bulkMergeListings(formData);\n\n if (result) {\n await refreshExpandedListItems();\n refreshMetrics?.();\n }\n\n if (closeModalAfterMerge) {\n closeModal(true);\n }\n },\n (error) => {\n showErrorDialog('ListingClient.bulkMergeListings', error, {\n trackErrorData: formData,\n });\n },\n () => setIsLoading(false)\n );\n },\n [\n activeAccountWebClientConfig,\n closeModal,\n refreshExpandedListItems,\n refreshMetrics,\n showErrorDialog,\n ]\n );\n\n const {\n setAlerts,\n warningDialog,\n mergeGroupedListingHookProps,\n onSubmit,\n AlertDialog,\n } = useMergeGroupedListingAlertDialog(handleSubmit, mergeListings);\n\n const onSubmitHandler = useCallback(() => {\n const formData = getValues();\n const selectedListingIds = formData.listingIdLists.flatMap((l) => l);\n\n const listingIdsSet = new Set();\n eventsTransformed?.forEach((event) => {\n event.entities.listings?.forEach((listing) => {\n listingIdsSet.add(listing.id);\n });\n });\n\n const hasListingFromGroup = selectedListingIds.some(\n (formDataListingId) => !listingIdsSet.has(formDataListingId)\n );\n\n if (\n hasListingFromGroup &&\n isDatePassedHours(mergeGroupedListingHookProps.lastTimeStamp, 1)\n ) {\n setAlerts([mergeGroupedListingHookProps]);\n warningDialog.launchDialog();\n } else {\n handleSubmit(onSubmit)();\n }\n }, [\n getValues,\n eventsTransformed,\n mergeGroupedListingHookProps,\n setAlerts,\n warningDialog,\n handleSubmit,\n onSubmit,\n ]);\n\n const allListingIds = useMemo(() => {\n return eventsWithMergeSuggestions.reduce(\n (acc, e) => acc.concat(e.mergeSuggestions.map((m) => m.listingIds)),\n []\n );\n }, [eventsWithMergeSuggestions]);\n\n const isAllSelected = useMemo(() => {\n const mergeSuggestionCount = eventsWithMergeSuggestions.reduce(\n (acc, e) => acc + e.mergeSuggestions.length,\n 0\n );\n\n return listingIdLists.length === mergeSuggestionCount;\n }, [eventsWithMergeSuggestions, listingIdLists.length]);\n\n const toggleSelectAll = useCallback(() => {\n if (isAllSelected) {\n setValue('listingIdLists', []);\n } else {\n setValue('listingIdLists', allListingIds);\n }\n }, [allListingIds, isAllSelected, setValue]);\n\n const onSingleSuggestionSelectedChange = useCallback(\n (selected: boolean, listingIds: number[]) => {\n const isSelected = listingIdLists.some((l) =>\n isEqualIgnoringOrder(l, listingIds)\n );\n if (selected) {\n if (!isSelected) {\n setValue('listingIdLists', [...listingIdLists, listingIds]);\n }\n } else {\n if (isSelected) {\n setValue(\n 'listingIdLists',\n listingIdLists.filter((l) => !isEqualIgnoringOrder(l, listingIds))\n );\n }\n }\n },\n [listingIdLists, setValue]\n );\n\n const onEventSuggestionsSelectedChange = useCallback(\n (\n selected: boolean,\n eventWithMergeSuggestion: UIEventWithDataAndMergeSuggestions\n ) => {\n const listingIds = eventWithMergeSuggestion.mergeSuggestions.map(\n (m) => m.listingIds\n );\n if (selected) {\n setValue(\n 'listingIdLists',\n listingIdLists.concat(\n listingIds.filter(\n (l) => !listingIdLists.some((s) => isEqualIgnoringOrder(l, s))\n )\n )\n );\n } else {\n setValue(\n 'listingIdLists',\n listingIdLists.filter(\n (s) => !listingIds.some((l) => isEqualIgnoringOrder(l, s))\n )\n );\n }\n },\n [listingIdLists, setValue]\n );\n\n const isEventPartialSelected = useCallback(\n (eventWithMergeSuggestion: UIEventWithDataAndMergeSuggestions) => {\n const listingIds = eventWithMergeSuggestion.mergeSuggestions.map(\n (m) => m.listingIds\n );\n return (\n listingIds.some((l) =>\n listingIdLists.some((s) => isEqualIgnoringOrder(l, s))\n ) &&\n !listingIds.every((l) =>\n listingIdLists.some((s) => isEqualIgnoringOrder(l, s))\n )\n );\n },\n [listingIdLists]\n );\n\n const isEventSelected = useCallback(\n (eventWithMergeSuggestion: UIEventWithDataAndMergeSuggestions) => {\n const listingIds = eventWithMergeSuggestion.mergeSuggestions.map(\n (m) => m.listingIds\n );\n return listingIds.some((l) =>\n listingIdLists.some((s) => isEqualIgnoringOrder(l, s))\n );\n },\n [listingIdLists]\n );\n\n const eventAccordionProps: EventMergeSuggestionsAccordionProps[] =\n useMemo(() => {\n if (\n !eventsWithMergeSuggestions ||\n eventsWithMergeSuggestions.length === 0\n )\n return [];\n\n const result = [] as EventMergeSuggestionsAccordionProps[];\n let interimResult = eventsWithMergeSuggestions;\n if (eventSortQuery.sortBy === EventSort.MainDisplay) {\n interimResult = sortEventsByName(\n interimResult,\n eventSortQuery.isSortDescending\n ) as UIEventWithDataAndMergeSuggestions[];\n } else {\n interimResult = sortEventsByDate(\n interimResult,\n eventSortQuery.isSortDescending\n ) as UIEventWithDataAndMergeSuggestions[];\n }\n\n eventsWithMergeSuggestions.forEach((eventWithMergeSuggestion) => {\n result.push({\n eventWithMergeSuggestion,\n onSuggestionsSelectedChange: onSingleSuggestionSelectedChange,\n selectedListingIds: listingIdLists,\n selected: isEventSelected(eventWithMergeSuggestion),\n partialSelected: isEventPartialSelected(eventWithMergeSuggestion),\n onSelectedChange: (selected: boolean) =>\n onEventSuggestionsSelectedChange(\n selected,\n eventWithMergeSuggestion\n ),\n });\n });\n return result;\n }, [\n eventsWithMergeSuggestions,\n eventSortQuery.sortBy,\n eventSortQuery.isSortDescending,\n onSingleSuggestionSelectedChange,\n listingIdLists,\n isEventSelected,\n isEventPartialSelected,\n onEventSuggestionsSelectedChange,\n ]);\n\n const hasSuggestions = eventAccordionProps.length > 0;\n\n return (\n <>\n \n }\n />\n \n \n \n {isLoading || mergeSuggestionsIsLoading ? (\n \n ) : hasSuggestions ? (\n \n \n \n {hasDefaultNotToMergeHoldListingsFeature && (\n \n e.stopPropagation()}\n onCheckedChange={(isChecked) => {\n if (isChecked === excludeHeldListings) {\n setExcludeHeldListings(!isChecked);\n }\n setValue('listingIdLists', []);\n }}\n />\n \n \n )}\n \n
    \n \n {`${isAllSelected ? deselectAllText : selectAllText} (${\n listingIdLists.length\n } ${selectedText})`}\n \n {\n const [sortBy, isSortDescending] = getEventSort(sort);\n if (\n sortBy !== eventSortQuery.sortBy ||\n isSortDescending !== eventSortQuery.isSortDescending\n ) {\n setEventSortQuery({\n ...eventSortQuery,\n sortBy,\n isSortDescending,\n });\n }\n }}\n valueOptionsContent={EVENT_SORT_TO_CID}\n />\n
    \n (\n \n )}\n />\n \n ) : (\n \n )}\n
    \n
    \n \n \n \n \n \n {AlertDialog}\n \n );\n};\n","import { useCallback, useContext } from 'react';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { MergeListingsModal } from 'src/modals/MergeListings';\nimport { BulkMergeListingsModal } from 'src/modals/MergeListings/BulkMergeListings';\nimport { MergeIcon } from 'src/svgs';\nimport { IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Event } from 'src/WebApiController';\n\nexport const LaunchMergeListings = ({\n event,\n disabled,\n}: {\n event?: Event | undefined;\n disabled?: boolean;\n}) => {\n const { setModal } = useContext(ModalContext);\n const {\n eventsExpansion: { setListItemExpansion },\n } = useCatalogDataContext();\n\n const mergeListings = useCallback(() => {\n setModal({\n children:\n event != null ? (\n \n ) : (\n \n ),\n clickOutsideToClose: true,\n ...{ size: 'slide-in' },\n });\n }, [setModal, event]);\n\n const onLaunchDialog = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n\n if (event) {\n setListItemExpansion(true, [event.viagVirtualId]);\n }\n\n mergeListings();\n },\n [event, mergeListings, setListItemExpansion]\n );\n\n return (\n \n \n \n \n \n \n );\n};\n","import { ReactNode } from 'react';\nimport { OpenStubhubDropdownAction } from 'src/components/common/OpenSubhubDropdownAction';\nimport { EventItemHeaderType } from 'src/components/Events/EventItemHeader/EventItemHeader';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { PosDropdown } from 'src/core/POS/PosDropdown';\nimport { vars } from 'src/core/themes';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { IconsFill, MoreIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Permission } from 'src/WebApiController';\n\nimport { LaunchAddSeatSaver } from './components/AddSeatSaverAction';\nimport { EnterCompanionMode } from './components/EnterCompanionModeAction';\nimport { LaunchMergeListings } from './components/MergeListingsAction/LaunchMergeListings';\n\nexport const InventoryEventActionDropdown = ({\n isEventPage,\n extraDropdownItems,\n ...props\n}: EventItemHeaderType & {\n isEventPage?: boolean;\n extraDropdownItems?: ReactNode;\n}) => {\n const actionsMsg = useContent(ContentId.Actions);\n const { event } = props;\n\n const hasUpdateListingInfoPermission = useUserHasAnyOfPermissions(\n Permission.Inventory_UpdateListingInfo\n );\n\n return (\n <>\n \n \n \n }\n align=\"end\"\n >\n \n \n {props.entityCount >= 2 ? (\n <>\n {hasUpdateListingInfoPermission && (\n \n )}\n \n ) : null}\n\n \n {extraDropdownItems}\n \n \n );\n};\n","import { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { Permission } from 'src/WebApiController';\n\ninterface BulkBroadcastActionsPermission {\n hasBroadcastPermission: boolean;\n hasSellerAccountAdminPermission: boolean;\n}\n\nexport const useBulkBroadcastActionsPermission =\n (): BulkBroadcastActionsPermission => {\n const hasBroadcastPermission = useUserHasAnyOfPermissions(\n Permission.Inventory_BroadcastUnbroadcast,\n Permission.Inventory_BroadcastUnbroadcastOnIsPricerOf,\n Permission.Inventory_BroadcastUnbroadcastOnPurchasedBy\n );\n\n const hasSellerAccountAdminPermission = useUserHasAnyOfPermissions(\n Permission.SellerAccount_Admin\n );\n\n return {\n hasBroadcastPermission,\n hasSellerAccountAdminPermission,\n };\n };\n","import { ComponentProps, useCallback, useContext } from 'react';\nimport { useBulkBroadcastActionsPermission } from 'src/components/common/BulkActions/BulkBroadcastActions/useBulkBroadcastActionsPermission';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { Stack } from 'src/core/ui';\nimport { GroupListingsModal } from 'src/modals/GroupListings';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Event } from 'src/WebApiController';\n\nexport const LaunchGroupListings = ({\n slideLeft,\n events,\n disabled,\n}: ComponentProps & {\n slideLeft?: boolean;\n events?: Event[];\n disabled?: boolean;\n}) => {\n const { hasBroadcastPermission } = useBulkBroadcastActionsPermission();\n\n const { setModal } = useContext(ModalContext);\n const {\n eventsExpansion: { setListItemExpansion },\n } = useCatalogDataContext();\n\n const groupListings = useCallback(() => {\n setModal({\n children: ,\n clickOutsideToClose: true,\n ...{ size: slideLeft ? 'slide-left' : 'slide-in' },\n });\n }, [setModal, events, slideLeft]);\n\n const onLaunchDialog = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n\n if (events?.length) {\n setListItemExpansion(\n true,\n events.map((ev) => ev.viagVirtualId)\n );\n }\n\n groupListings();\n },\n [events, groupListings, setListItemExpansion]\n );\n\n if (!hasBroadcastPermission) {\n return null;\n }\n\n return (\n \n \n \n \n \n );\n};\n","import { useContent } from 'src/contexts/ContentContext';\nimport { PosDropdown } from 'src/core/POS/PosDropdown';\nimport { vars } from 'src/core/themes';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { IconsFill, MoreIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Permission } from 'src/WebApiController';\n\nimport { LaunchAddSeatSaver } from './components/AddSeatSaverAction';\nimport { LaunchGroupListings } from './components/GroupListingsAction/LaunchGroupListings';\nimport { LaunchMergeListings } from './components/MergeListingsAction/LaunchMergeListings';\n\nexport const InventoryGlobalActionDropdown = () => {\n const actionsMsg = useContent(ContentId.Actions);\n const hasUpdateListingInfoPermission = useUserHasAnyOfPermissions(\n Permission.Inventory_UpdateListingInfo\n );\n\n return (\n <>\n \n \n \n }\n align=\"end\"\n >\n \n\n {hasUpdateListingInfoPermission && (\n \n )}\n\n \n \n \n );\n};\n","import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\nimport { useCallback } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { AutoPricingInputs, Event, PricingClient } from 'src/WebApiController';\n\nexport const useListingGroupPricingSettings = (\n listingGroupId: string | null | undefined,\n event: Event | null | undefined\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const { trackError, showErrorDialog } = useErrorBoundaryContext();\n\n const queryClient = useQueryClient();\n const queryKey = [\n 'PricingClient.getListingGroupAutoPricingSettings',\n listingGroupId,\n event?.viagId,\n ];\n\n const shouldQuery = Boolean(\n activeAccountWebClientConfig.activeAccountId &&\n listingGroupId &&\n event?.viagId\n );\n const listingGroupPricingSettings = useQuery({\n queryKey,\n queryFn: async () => {\n if (!shouldQuery) {\n return null;\n }\n\n return await new PricingClient(\n activeAccountWebClientConfig\n ).getListingGroupAutoPricingSettings(listingGroupId!, event!.viagId!);\n },\n\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n retry: 3,\n retryDelay: (attemptIndex) => Math.min(500 ** attemptIndex, 3000),\n meta: {\n // TODO: temporally hide the error for now, enable this after https://stubhub.enterprise.slack.com/archives/C08D76X6M0S is fixed.\n // onError: (error: ErrorTypes) => {\n // trackError('PricingClient.getListingGroupAutoPricingSettings', error, {\n // listingGroupId,\n // });\n // },\n },\n });\n\n const resetListingPricingSettingsMutation = useMutation({\n mutationFn: async () => {\n return await new PricingClient(\n activeAccountWebClientConfig\n ).resetListingAutoPricingSettingsInGroup(listingGroupId!);\n },\n onError: (err: ErrorTypes) => {\n showErrorDialog(\n 'PricingClient.resetListingAutoPricingSettingsInGroup',\n err,\n {\n trackErrorData: { listingGroupId },\n }\n );\n },\n });\n\n const mergeListingGroupPricingSettingsMutation = useMutation({\n mutationFn: async ({\n inputs,\n listingGroupId,\n }: {\n inputs: AutoPricingInputs;\n listingGroupId: string | null;\n }) => {\n return await new PricingClient(\n activeAccountWebClientConfig\n ).mergeListingGroupPricingSettings(listingGroupId ?? undefined, inputs);\n },\n onMutate: ({ inputs }) => {\n queryClient.cancelQueries({ queryKey });\n const prevValue = queryClient.getQueryData(queryKey);\n queryClient.setQueryData(queryKey, inputs);\n return { prevValue };\n },\n onError: (err: ErrorTypes, { inputs }, context) => {\n queryClient.setQueryData(queryKey, context?.prevValue);\n showErrorDialog('PricingClient.mergeListingGroupPricingSettings', err, {\n trackErrorData: { inputs },\n });\n },\n onSettled: () => {\n queryClient.invalidateQueries({ queryKey });\n },\n });\n\n const onMergeListingGroupPricingSettings = useCallback(\n async (inputs?: AutoPricingInputs) => {\n if (!listingGroupId || !inputs) {\n return;\n }\n await mergeListingGroupPricingSettingsMutation.mutateAsync({\n listingGroupId,\n inputs,\n });\n },\n [listingGroupId, mergeListingGroupPricingSettingsMutation]\n );\n\n const onResetListingPricingSettings = useCallback(async () => {\n if (!listingGroupId) {\n return;\n }\n return await resetListingPricingSettingsMutation.mutateAsync();\n }, [listingGroupId, resetListingPricingSettingsMutation]);\n\n return {\n pricingSettings: listingGroupPricingSettings.data,\n onMergeListingGroupPricingSettings,\n onResetListingPricingSettings,\n isLoading:\n listingGroupPricingSettings.isPending ||\n resetListingPricingSettingsMutation.isPending ||\n mergeListingGroupPricingSettingsMutation.isPending,\n loaded: listingGroupPricingSettings.isFetched,\n };\n};\n","import { useMemo } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { UK_COUNTRY_CODES } from 'src/utils/constants/constants';\nimport { getIsInternationalEvent } from 'src/utils/eventWithDataUtils';\nimport { isMarketplaceActive } from 'src/utils/userUtils';\nimport {\n Event,\n ListingMarketplaceSetting,\n Marketplace,\n} from 'src/WebApiController';\n\nimport { useGetEventFullInfo } from './useGetEventFullInfo';\n\n/**\n * Quick hook to provide grouping marketplace settings base off an event\n */\nexport const useEventMarketplaceSettings = (event?: Event) => {\n const { loginContext } = useAppContext();\n\n const { venue } = useGetEventFullInfo(event);\n const isUKEvent = Boolean(\n event != null &&\n venue?.country?.code &&\n UK_COUNTRY_CODES.includes(venue.country.code.toUpperCase())\n );\n const isInternationalEvent = getIsInternationalEvent(venue?.country?.code);\n\n const marketplaceSettings = useMemo(\n () => loginContext?.user?.activeAccount?.marketplaceSettings,\n [loginContext?.user?.activeAccount?.marketplaceSettings]\n );\n\n const eventMarketplaceSettings = useMemo(\n () =>\n marketplaceSettings\n ?.filter((mk) => isMarketplaceActive(mk))\n .filter(\n (mk) => !isInternationalEvent || mk.mkp === Marketplace.StubHub\n ) ?? [],\n [isInternationalEvent, marketplaceSettings]\n );\n\n const defaultListingMarketplaceSettings = useMemo(() => {\n return eventMarketplaceSettings.reduce(\n (arr, { mkp }) => {\n const marketplaceId = Object.keys(Marketplace).indexOf(mkp) ?? -1;\n if (marketplaceId >= 0) {\n arr[marketplaceId + 1 + ''] = { listingBroadcastStateId: 2 };\n }\n return arr;\n },\n {} as Record\n );\n }, [eventMarketplaceSettings]);\n\n return {\n eventMarketplaceSettings,\n defaultListingMarketplaceSettings,\n isUKEvent,\n isInternationalEvent,\n };\n};\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport const SummaryRow = styled.div`\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n width: 100%;\n padding: ${() => vars.spacing.lg};\n border-bottom: 1px solid ${(props) => props.theme.colors.borderPrimary};\n\n ${({ theme: { media } }) =>\n `${media.makeMediaQuery(\n media.breakpoints.md,\n `\n border: none;\n padding: 0px;\n `\n )}`}\n`;\n\nexport const SummaryColumn = styled.div<{ gap?: number }>`\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: ${(props) => (props.gap ? `${props.gap}px` : vars.spacing.sm)};\n`;\n\nexport const SummaryDateSection = styled.div`\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n gap: ${() => vars.spacing.sm};\n min-width: max-content;\n\n ${({ theme: { media } }) =>\n `${media.makeMediaQuery(\n media.breakpoints.md,\n `\n flex-direction: column;\n gap: 2px;\n padding: ${vars.spacing.lg};\n `\n )}`}\n`;\n\nexport const Divider = styled.div<{ height?: number }>`\n width: 1px;\n height: ${(props) => (props.height ? `${props.height}%` : '80%')};\n border-left: 1px solid ${(props) => props.theme.colors.borderDark};\n display: block;\n`;\n\nexport const SummaryDetailsSection = styled.div`\n display: flex;\n flex-direction: column;\n padding: ${() => vars.spacing.lg};\n gap: ${() => vars.spacing.m};\n width: 100%;\n ${({ theme: { media } }) =>\n `${media.makeMediaQuery(\n media.breakpoints.md,\n `\n padding: ${vars.spacing.xl};\n `\n )}`}\n`;\n\nexport const SummaryEventTitle = styled.span`\n font-weight: 700;\n font-size: ${() => vars.typography.fontSize['lg']};\n line-height: 24px;\n color: ${(props) => props.theme.colors.textStrong};\n ${({ theme: { media } }) =>\n `${media.makeMediaQuery(\n media.breakpoints.md,\n `\n font-size: ${vars.typography.fontSize['2xl']}\n `\n )}`}\n`;\n\nexport const MarketPlaceDetailsWrapper = styled.div`\n display: flex;\n flex-direction: column;\n gap: 2px;\n align-items: flex-end;\n ${({ theme: { media } }) =>\n `${media.makeMediaQuery(\n media.breakpoints.md,\n `\n gap: ${vars.spacing.sm};\n `\n )}`}\n`;\n\nexport const SummaryMainText = styled.span<{ fontWeight?: number }>`\n font-size: ${() => vars.typography.fontSize['sm']};\n line-height: 20px;\n font-weight: ${({ fontWeight }) => (fontWeight ? fontWeight : 500)};\n color: ${(props) => props.theme.colors.textStrong};\n`;\n\nexport const SummarySecondaryText = styled(SummaryMainText)`\n font-weight: 400;\n color: ${(props) => props.theme.colors.textPrimary};\n`;\n\nexport const SummaryMainTextTealAccent = styled(SummaryMainText)`\n color: ${(props) => props.theme.colors.accent075};\n padding-right: ${() => vars.spacing.xxs};\n`;\n\nexport const SummaryMainTextPinkAccent = styled(SummaryMainText)`\n font-weight: 700;\n color: #db2c7b;\n /* ${(props) => props.theme.colors.secondary100}; */\n`;\n","import { ReactNode } from 'react';\nimport { EventInfo } from 'src/components/Events/EventInfo';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { Stack } from 'src/core/ui';\nimport { useGetEventFullInfo } from 'src/hooks/useGetEventFullInfo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getFormattedEventName } from 'src/utils/eventWithDataUtils';\nimport { getFormattedLocation } from 'src/utils/format';\nimport { Event, Performer, Venue } from 'src/WebApiController';\n\nimport { summaryWrapper } from './Summary.css';\nimport {\n SummaryColumn,\n SummaryDetailsSection,\n SummaryRow,\n} from './Summary.styled';\n\nexport const VenueConfigSummary = ({\n events,\n venues,\n performers,\n eventSelected,\n actions,\n}: {\n events: Event[];\n venues?: Record;\n performers?: Record;\n eventSelected?: Event | null;\n actions?: ReactNode;\n}) => {\n const atText = useContent(ContentId.at);\n const eventsText = useContent(ContentId.Events);\n const event = eventSelected ?? events[0];\n\n const { performer: cachedPerformer, venue: cachedVenue } =\n useGetEventFullInfo(event);\n\n let venue = cachedVenue;\n if (venues?.[event.viagVirtualId]) {\n venue = venues[event.viagVirtualId];\n }\n let performer = cachedPerformer;\n if (performers?.[event.viagVirtualId]) {\n performer = performers[event.viagVirtualId];\n }\n\n const [eventName, eventNameConnector, eventSubName] = getFormattedEventName({\n event,\n performer,\n venue,\n slimMode: false,\n });\n\n const venueLocation = venue && getFormattedLocation(venue);\n\n return (\n \n \n \n \n \n \n {` (${events.length} ${eventsText})`}\n \n \n {actions}\n \n {eventSelected && (\n \n \n \n )}\n \n \n );\n};\n","import * as RadixSlider from '@radix-ui/react-slider';\nimport clsx from 'clsx';\nimport { ComponentPropsWithoutRef, forwardRef, ReactNode } from 'react';\nimport { mergeProps } from 'src/core/utils';\n\nimport * as styles from './Slider.css';\n\nexport const Handle = ({ children }: ComponentPropsWithoutRef<'div'>) => {\n return
    {children}
    ;\n};\n\nexport const Root = forwardRef<\n HTMLSpanElement,\n ComponentPropsWithoutRef & {\n renderHandle?: (value: number) => ReactNode;\n }\n>(function Slider({ renderHandle, value, disabled, ...props }, ref) {\n return (\n \n \n \n \n {value?.map((v, i) => (\n \n {renderHandle ? renderHandle(v) : {v}}\n \n ))}\n \n );\n});\n","import * as ToggleGroupRadix from '@radix-ui/react-toggle-group';\nimport clsx from 'clsx';\nimport React, { ComponentPropsWithoutRef } from 'react';\nimport { mergeProps } from 'src/core/utils';\n\nimport * as styles from './ToggleGroup.css';\n\nexport type ToggleItem = {\n value: string;\n children: React.ReactNode;\n};\n\nexport type ToggleGroupProps = Omit<\n ToggleGroupRadix.ToggleGroupSingleProps,\n 'type'\n> & {\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n options: ToggleItem[];\n disabled?: boolean;\n itemStyle?: ComponentPropsWithoutRef['style'];\n itemClassName?: string;\n rovingFocus?: boolean;\n itemTransparent?: boolean;\n};\n\nexport const ToggleGroup = ({\n value,\n defaultValue,\n onValueChange,\n options,\n disabled,\n itemStyle,\n itemClassName,\n itemTransparent,\n rovingFocus = true,\n ...props\n}: ToggleGroupProps) => {\n return (\n \n {options.map((item, i) => {\n return (\n \n {item.children}\n \n );\n })}\n \n );\n};\n","export enum RestrictSelectionType {\n SameZone = 'SameZone',\n SpecificSections = 'SpecificSections',\n SameSection = 'SameSection',\n}\n","import { RestrictSelectionType } from 'src/modals/ListingDetails/components/PricingSection/AutoPricingSection.types';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n COMP_LISTING_MODE_TO_CID,\n COMP_LISTING_MODE_TO_FLUENT_CID,\n OUTLIER_MODE_TO_CID,\n RESTRICT_SELECTION_TYPE_TO_CID,\n UNDERCUT_MODE_TO_CID,\n UNDERCUT_MODE_TO_FLUENT_CID,\n} from 'src/utils/constants/contentIdMaps';\nimport {\n AutoPricingCompListingMode,\n AutoPricingOutlierMode,\n AutoPricingUndercutMode,\n Feature,\n} from 'src/WebApiController';\n\nimport { useUserHasFeature } from './useUserHasFeature';\n\nexport const useAvailableAutopricingModes = (\n fluent: boolean,\n undercutMode: AutoPricingUndercutMode | null | undefined,\n compListingMode: AutoPricingCompListingMode | null | undefined,\n hasSeatScores: boolean,\n hasParentListing?: boolean,\n isGlobalEdit?: boolean,\n compListingOnlyForSelectedSectionsEnabled?: boolean | null,\n deriveCompsFromVenueZoneConfig?: boolean | null\n) => {\n // Feature checks\n const hasAdvanceAutopricingModes = useUserHasFeature(\n Feature.AdvanceAutopricingModes\n );\n const hasParentListingModeFeature = useUserHasFeature(\n Feature.CompListingMode_ParentListing\n );\n\n const restrictSelectionTypes = {\n ...RESTRICT_SELECTION_TYPE_TO_CID,\n } as Record;\n\n if (isGlobalEdit) {\n if (!compListingOnlyForSelectedSectionsEnabled) {\n delete restrictSelectionTypes[RestrictSelectionType.SpecificSections];\n }\n }\n\n if (compListingMode !== AutoPricingCompListingMode.QualityScore) {\n delete restrictSelectionTypes[RestrictSelectionType.SameZone];\n }\n\n const defaultRestrictSelectionType = Object.keys(restrictSelectionTypes)[0];\n\n const compListingModes = {\n ...(fluent ? COMP_LISTING_MODE_TO_FLUENT_CID : COMP_LISTING_MODE_TO_CID),\n } as Record;\n\n const undercutModes = {\n ...(fluent ? UNDERCUT_MODE_TO_FLUENT_CID : UNDERCUT_MODE_TO_CID),\n } as Record;\n\n const outlierModes = {\n ...OUTLIER_MODE_TO_CID,\n } as Record;\n\n if (!hasAdvanceAutopricingModes) {\n if (undercutMode !== AutoPricingUndercutMode.RowExtrapolation) {\n delete undercutModes[AutoPricingUndercutMode.RowExtrapolation];\n }\n if (compListingMode !== AutoPricingCompListingMode.SameSection) {\n delete compListingModes[AutoPricingCompListingMode.SameSection];\n }\n }\n\n if (!hasParentListingModeFeature || !hasParentListing) {\n delete compListingModes[AutoPricingCompListingMode.ParentListing];\n }\n\n // Determine which modes are disabled based on permissions and data availability\n // For each mode group, start them all off as enabled (i.e. all comp listing modes\n // enabled, all undercut modes enabled, etc.) and then disable them as needed\n const compListingModesDisabled: Record = {\n ...compListingModes,\n };\n Object.keys(compListingModesDisabled).forEach(\n (k) => (compListingModesDisabled[k] = undefined)\n );\n\n const undercutModesDisabled: Record = {\n ...undercutModes,\n };\n Object.keys(undercutModesDisabled).forEach(\n (k) => (undercutModesDisabled[k] = undefined)\n );\n\n const outlierModesDisabled: Record = {\n ...outlierModes,\n };\n Object.keys(outlierModesDisabled).forEach(\n (k) => (outlierModesDisabled[k] = undefined)\n );\n\n if (!hasSeatScores && !isGlobalEdit) {\n compListingModesDisabled[AutoPricingCompListingMode.QualityScore] =\n ContentId.AutopricingNotAvailableNoScores;\n compListingModesDisabled[AutoPricingCompListingMode.SameSection] =\n ContentId.AutopricingNotAvailableNoScores;\n\n undercutModesDisabled[AutoPricingUndercutMode.Deal] =\n ContentId.AutopricingNotAvailableNoScores;\n\n outlierModesDisabled[AutoPricingOutlierMode.StandardDeviations] =\n ContentId.AutopricingNotAvailableNoScores;\n }\n\n if (deriveCompsFromVenueZoneConfig) {\n compListingModesDisabled[AutoPricingCompListingMode.QualityScore] =\n ContentId.IncompatiblePricingMode;\n }\n\n return {\n undercutModes,\n undercutModesDisabled,\n compListingModes,\n compListingModesDisabled,\n outlierModes,\n outlierModesDisabled,\n defaultRestrictSelectionType,\n restrictSelectionTypes,\n };\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { PricingClient } from 'src/WebApiController';\n\nexport const useGetAccountAutoPricingSettings = () => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const shouldQuery = activeAccountWebClientConfig.activeAccountId != null;\n const pricingSettingsQuery = useQuery({\n queryKey: [\n 'PricingClient.getAccountAutoPricingSettings',\n activeAccountWebClientConfig.activeAccountId,\n ],\n queryFn: async () => {\n if (!shouldQuery) {\n return null;\n }\n const pricingSettings = await new PricingClient(\n activeAccountWebClientConfig\n ).getAccountAutoPricingSettings();\n\n return pricingSettings;\n },\n\n enabled: shouldQuery,\n retry: 3,\n retryDelay: (attemptIndex) => Math.min(500 ** attemptIndex, 3000),\n refetchOnWindowFocus: false,\n meta: {\n // TODO: temporally hide the error for now, enable this after https://stubhub.enterprise.slack.com/archives/C08D76X6M0S is fixed.\n // onError: (error: ErrorTypes) => {\n // showErrorDialog('PricingClient.getAccountAutoPricingSettings', error, {\n // trackErrorData: {\n // activeAccountId: activeAccountWebClientConfig.activeAccountId,\n // },\n // });\n // },\n },\n });\n\n return {\n pricingSettings: pricingSettingsQuery.data,\n pricingSettingsQuery,\n loaded: pricingSettingsQuery.isFetched,\n };\n};\n","import { SelectedSectionSettings } from 'src/WebApiController';\n\nexport type SelectedSectionSettingsWithOptionals = Omit<\n SelectedSectionSettings,\n 'sectionIdFilterFromZoneMap' | 'includeBetterZones' | 'rowOffset'\n> & {\n sectionIdFilterFromZoneMap?: boolean;\n includeBetterZones?: boolean;\n rowOffset?: number | null;\n};\n\nexport const mapToSelectedSectionSettings = (\n settings: SelectedSectionSettingsWithOptionals | null | undefined\n) => {\n if (!settings) {\n return settings;\n }\n\n return {\n ...settings,\n sectionIdFilterFromZoneMap: settings?.sectionIdFilterFromZoneMap ?? false,\n includeBetterZones: settings?.includeBetterZones ?? false,\n rowOffset: settings?.rowOffset ?? null,\n } as SelectedSectionSettings;\n};\n","import { isEqual } from 'lodash-es';\nimport { useCallback, useMemo } from 'react';\nimport { FieldValues, Path, useFormContext } from 'react-hook-form';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { useGetAccountAutoPricingSettings } from 'src/hooks/useGetAccountAutoPricingSettings';\nimport { useGetEventAutoPricingSettings } from 'src/hooks/useGetEventAutoPricingSettings';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport {\n DEFAULT_COMP_LISTING_CEIL_MORE_THAN_FLOOR,\n DEFAULT_COMP_LISTING_FLOOR,\n DEFAULT_UNDERCUT_ABSOLUTE_AMT,\n DEFAULT_UNDERCUT_RELATIVE_AMT,\n} from 'src/utils/autoPricingUtils';\nimport { getCurrentLanguage } from 'src/utils/localeUtils';\nimport { coalesceUndefinedOnly } from 'src/utils/miscUtils';\nimport {\n mapToSelectedSectionSettings,\n SelectedSectionSettingsWithOptionals,\n} from 'src/utils/types/selectedSectionSettingsWithOptionals';\nimport {\n AutoPricingCompListingMode,\n AutoPricingInputs,\n AutoPricingOutlierMode,\n AutoPricingUndercutMode,\n Feature,\n ListingDetailsUpdateInput,\n ListingGroup,\n SectionInfo,\n} from 'src/WebApiController';\n\ntype UpdatingKeys = keyof AutoPricingInputs;\n\nexport const useListingGroupAutoPricingSettings = (\n listingGroup?: ListingGroup\n) => {\n const { setValue: setFormValue, watch, formState } = useFormContext();\n\n const { loginContext } = useAppContext();\n const { getUiCurrency } = useLocalizationContext();\n\n const hasAllowSeatScoreCompListingModeFeature = useUserHasFeature(\n Feature.AllowSeatScoreCompListingMode\n );\n\n const defaultCompListingMode = useMemo(() => {\n if (hasAllowSeatScoreCompListingModeFeature) {\n return AutoPricingCompListingMode.QualityScore;\n }\n return AutoPricingCompListingMode.SameEvent;\n }, [hasAllowSeatScoreCompListingModeFeature]);\n\n const updateInput = watch('pricingSettingsInputs' as Path) as\n | AutoPricingInputs\n | undefined;\n\n const resetListingAutoPricingSettings = watch(\n 'resetListingAutoPricingSettings' as Path\n );\n\n const compListingFloorError = watch(\n 'pricingSettingsInputs.compListingFloor.message' as Path\n );\n const compListingSelectedSectionError = watch(\n 'pricingSettingsInputs.compListingSelectedSectionSettings.message' as Path\n );\n const undercutAbsoluteAmountError = watch(\n 'pricingSettingsInputs.undercutAbsoluteAmount.message' as Path\n );\n const undercutRelativeAmountError = watch(\n 'pricingSettingsInputs.undercutRelativeAmount.message' as Path\n );\n\n const {\n undercutMode,\n undercutAbsoluteAmount,\n undercutRelativeAmount,\n\n compListingMode,\n compListingCeiling,\n compListingFloor,\n compListingOnlyForSameZoneEnabled,\n compListingOnlyForSelectedSectionsEnabled,\n compListingQuantityScoreAdjustmentEnabled,\n compListingExcludeFanInventory,\n compListingExcludeDefects,\n compListingQuantityScoreAdjustmentOverrideJson,\n compListingSelectedSectionSettings,\n\n outlierMode,\n outlierStandardDeviations,\n outlierKthLowestLimit,\n outlierKthLowestLimitAbsoluteSpacing,\n outlierKthLowestLimitRelativeSpacing,\n\n circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerMaxDiscountVelocityTicksInHours,\n circuitBreakerMinCompListingCount,\n circuitBreakerRelativeCeiling,\n circuitBreakerRelativeFloor,\n } = updateInput || {};\n\n const setValue = useCallback(\n (key: UpdatingKeys, value: any) => {\n setFormValue(`pricingSettingsInputs.${key}` as Path, value);\n },\n [setFormValue]\n );\n\n const uiCurrency = useMemo(\n () =>\n getUiCurrency(\n listingGroup?.currency ??\n loginContext?.user?.activeAccount?.currencyCode\n ),\n [\n getUiCurrency,\n listingGroup?.currency,\n loginContext?.user?.activeAccount?.currencyCode,\n ]\n );\n const currencyNumberFormat = useMemo(\n () =>\n new Intl.NumberFormat(getCurrentLanguage(), {\n style: 'currency',\n currency: uiCurrency.code,\n }),\n [uiCurrency.code]\n );\n\n const { event } = useEventMapContext();\n const { pricingSettings: eventPricingSettings } =\n useGetEventAutoPricingSettings(event!, false);\n const { pricingSettings: accountPricingSettings } =\n useGetAccountAutoPricingSettings();\n\n const onResetSettings = useCallback(() => {\n setValue('undercutMode', null);\n setValue('undercutAbsoluteAmount', null);\n setValue('undercutRelativeAmount', null);\n\n setValue('compListingMode', null);\n setValue('compListingFloor', null);\n setValue('compListingCeiling', null);\n setValue('compListingSelectedSectionSettings', null);\n setValue('compListingQuantityScoreAdjustmentOverrideJson', null);\n setValue('compListingOnlyForSameZoneEnabled', null);\n setValue('compListingOnlyForSelectedSectionsEnabled', null);\n }, [setValue]);\n\n const onResetAdvanceSettings = useCallback(() => {\n setValue('compListingQuantityScoreAdjustmentEnabled', null);\n setValue('compListingExcludeFanInventory', null);\n setValue('compListingExcludeDefects', null);\n\n setValue('circuitBreakerRelativeCeiling', null);\n setValue('circuitBreakerRelativeFloor', null);\n setValue('circuitBreakerMaxDiscountVelocityPercent', null);\n setValue('circuitBreakerMaxDiscountVelocityTicksInHours', null);\n setValue('circuitBreakerMinCompListingCount', null);\n\n setValue('outlierMode', null);\n setValue('outlierStandardDeviations', null);\n setValue('outlierKthLowestLimit', null);\n setValue('outlierKthLowestLimitRelativeSpacing', null);\n setValue('outlierKthLowestLimitAbsoluteSpacing', null);\n }, [setValue]);\n\n const circuitBreakerSettings = useMemo(() => {\n if (\n circuitBreakerMaxDiscountVelocityPercent != null ||\n circuitBreakerMaxDiscountVelocityTicksInHours != null ||\n circuitBreakerMinCompListingCount != null ||\n circuitBreakerRelativeCeiling != null ||\n circuitBreakerRelativeFloor != null\n ) {\n // if it has any of these set - use the entire area\n return {\n circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerMaxDiscountVelocityTicksInHours,\n circuitBreakerMinCompListingCount,\n circuitBreakerRelativeCeiling,\n circuitBreakerRelativeFloor,\n };\n }\n\n if (\n eventPricingSettings?.circuitBreakerMaxDiscountVelocityPercent != null ||\n eventPricingSettings?.circuitBreakerMaxDiscountVelocityTicksInHours !=\n null ||\n eventPricingSettings?.circuitBreakerMinCompListingCount != null ||\n eventPricingSettings?.circuitBreakerRelativeCeiling != null ||\n eventPricingSettings?.circuitBreakerRelativeFloor != null\n ) {\n // if it has any of these set - use the entire area\n return {\n circuitBreakerMaxDiscountVelocityPercent:\n eventPricingSettings?.circuitBreakerMaxDiscountVelocityPercent ??\n null,\n circuitBreakerMaxDiscountVelocityTicksInHours:\n eventPricingSettings?.circuitBreakerMaxDiscountVelocityTicksInHours ??\n null,\n circuitBreakerMinCompListingCount:\n eventPricingSettings?.circuitBreakerMinCompListingCount ?? null,\n circuitBreakerRelativeCeiling:\n eventPricingSettings?.circuitBreakerRelativeCeiling ?? null,\n circuitBreakerRelativeFloor:\n eventPricingSettings?.circuitBreakerRelativeFloor ?? null,\n };\n }\n\n // if it has any of these set - use the entire area\n return {\n circuitBreakerMaxDiscountVelocityPercent:\n accountPricingSettings?.circuitBreakerMaxDiscountVelocityPercent ??\n null,\n circuitBreakerMaxDiscountVelocityTicksInHours:\n accountPricingSettings?.circuitBreakerMaxDiscountVelocityTicksInHours ??\n null,\n circuitBreakerMinCompListingCount:\n accountPricingSettings?.circuitBreakerMinCompListingCount ?? null,\n circuitBreakerRelativeCeiling:\n accountPricingSettings?.circuitBreakerRelativeCeiling ?? null,\n circuitBreakerRelativeFloor:\n accountPricingSettings?.circuitBreakerRelativeFloor ?? null,\n };\n }, [\n accountPricingSettings?.circuitBreakerMaxDiscountVelocityPercent,\n accountPricingSettings?.circuitBreakerMaxDiscountVelocityTicksInHours,\n accountPricingSettings?.circuitBreakerMinCompListingCount,\n accountPricingSettings?.circuitBreakerRelativeCeiling,\n accountPricingSettings?.circuitBreakerRelativeFloor,\n circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerMaxDiscountVelocityTicksInHours,\n circuitBreakerMinCompListingCount,\n circuitBreakerRelativeCeiling,\n circuitBreakerRelativeFloor,\n eventPricingSettings?.circuitBreakerMaxDiscountVelocityPercent,\n eventPricingSettings?.circuitBreakerMaxDiscountVelocityTicksInHours,\n eventPricingSettings?.circuitBreakerMinCompListingCount,\n eventPricingSettings?.circuitBreakerRelativeCeiling,\n eventPricingSettings?.circuitBreakerRelativeFloor,\n ]);\n\n const undercutSettings = useMemo(() => {\n if (\n undercutMode != null ||\n undercutAbsoluteAmount != null ||\n undercutRelativeAmount != null\n ) {\n // if it has any of these set - use the entire area\n return {\n undercutMode,\n undercutAbsoluteAmount,\n undercutRelativeAmount,\n };\n }\n\n if (\n eventPricingSettings?.undercutMode != null ||\n eventPricingSettings?.undercutAbsoluteAmount != null ||\n eventPricingSettings?.undercutRelativeAmount != null\n ) {\n // if it has any of these set - use the entire area\n return {\n undercutMode: eventPricingSettings?.undercutMode ?? null,\n undercutAbsoluteAmount:\n eventPricingSettings?.undercutAbsoluteAmount ?? null,\n undercutRelativeAmount:\n eventPricingSettings?.undercutRelativeAmount ?? null,\n };\n }\n\n // if it has any of these set - use the entire area\n return {\n undercutMode:\n accountPricingSettings?.undercutMode ?? AutoPricingUndercutMode.Simple,\n undercutAbsoluteAmount:\n accountPricingSettings?.undercutAbsoluteAmount ??\n DEFAULT_UNDERCUT_ABSOLUTE_AMT,\n undercutRelativeAmount:\n accountPricingSettings?.undercutRelativeAmount ??\n DEFAULT_UNDERCUT_RELATIVE_AMT,\n };\n }, [\n accountPricingSettings?.undercutAbsoluteAmount,\n accountPricingSettings?.undercutMode,\n accountPricingSettings?.undercutRelativeAmount,\n eventPricingSettings?.undercutAbsoluteAmount,\n eventPricingSettings?.undercutMode,\n eventPricingSettings?.undercutRelativeAmount,\n undercutAbsoluteAmount,\n undercutMode,\n undercutRelativeAmount,\n ]);\n\n const compListingSettings = useMemo(() => {\n if (\n compListingMode != null ||\n compListingFloor != null ||\n compListingCeiling != null ||\n compListingOnlyForSameZoneEnabled != null ||\n compListingOnlyForSelectedSectionsEnabled != null ||\n compListingExcludeFanInventory != null ||\n compListingExcludeDefects != null ||\n compListingSelectedSectionSettings != null ||\n compListingQuantityScoreAdjustmentEnabled != null ||\n compListingQuantityScoreAdjustmentOverrideJson != null\n ) {\n // if it has any of these set - use the entire area\n return {\n compListingMode,\n compListingFloor: compListingFloor ?? DEFAULT_COMP_LISTING_FLOOR,\n compListingCeiling:\n compListingCeiling ??\n (compListingFloor ?? DEFAULT_COMP_LISTING_FLOOR) +\n DEFAULT_COMP_LISTING_CEIL_MORE_THAN_FLOOR,\n compListingOnlyForSameZoneEnabled,\n compListingOnlyForSelectedSectionsEnabled,\n compListingExcludeFanInventory,\n compListingExcludeDefects,\n compListingSelectedSectionSettings,\n compListingQuantityScoreAdjustmentEnabled,\n compListingQuantityScoreAdjustmentOverrideJson,\n };\n }\n\n if (\n eventPricingSettings?.compListingMode != null ||\n eventPricingSettings?.compListingFloor != null ||\n eventPricingSettings?.compListingCeiling != null ||\n eventPricingSettings?.compListingOnlyForSameZoneEnabled != null ||\n eventPricingSettings?.compListingOnlyForSelectedSectionsEnabled != null ||\n eventPricingSettings?.compListingExcludeFanInventory != null ||\n eventPricingSettings?.compListingExcludeDefects != null ||\n eventPricingSettings?.compListingQuantityScoreAdjustmentEnabled != null ||\n eventPricingSettings?.compListingQuantityScoreAdjustmentOverrideJson !=\n null ||\n eventPricingSettings?.compListingSelectedSectionSettings != null\n ) {\n // if it has any of these set - use the entire area\n return {\n compListingMode: eventPricingSettings?.compListingMode ?? null,\n compListingFloor:\n eventPricingSettings?.compListingFloor ?? DEFAULT_COMP_LISTING_FLOOR,\n compListingCeiling:\n eventPricingSettings?.compListingCeiling ??\n (eventPricingSettings?.compListingFloor ??\n DEFAULT_COMP_LISTING_FLOOR) +\n DEFAULT_COMP_LISTING_CEIL_MORE_THAN_FLOOR,\n compListingOnlyForSameZoneEnabled:\n eventPricingSettings?.compListingOnlyForSameZoneEnabled ?? null,\n compListingOnlyForSelectedSectionsEnabled:\n eventPricingSettings?.compListingOnlyForSelectedSectionsEnabled ??\n null,\n compListingQuantityScoreAdjustmentEnabled:\n eventPricingSettings?.compListingQuantityScoreAdjustmentEnabled ??\n null,\n compListingExcludeFanInventory:\n eventPricingSettings?.compListingExcludeFanInventory ?? null,\n compListingExcludeDefects:\n eventPricingSettings?.compListingExcludeDefects ?? null,\n compListingQuantityScoreAdjustmentOverrideJson:\n eventPricingSettings?.compListingQuantityScoreAdjustmentOverrideJson ??\n null,\n compListingSelectedSectionSettings:\n eventPricingSettings?.compListingSelectedSectionSettings ?? null,\n };\n }\n\n // if it has any of these set - use the entire area\n return {\n compListingMode:\n accountPricingSettings?.compListingMode ?? defaultCompListingMode,\n compListingFloor:\n accountPricingSettings?.compListingFloor ?? DEFAULT_COMP_LISTING_FLOOR,\n compListingCeiling:\n accountPricingSettings?.compListingCeiling ??\n (accountPricingSettings?.compListingFloor ??\n DEFAULT_COMP_LISTING_FLOOR) +\n DEFAULT_COMP_LISTING_CEIL_MORE_THAN_FLOOR,\n compListingOnlyForSameZoneEnabled:\n accountPricingSettings?.compListingOnlyForSameZoneEnabled ?? null,\n compListingOnlyForSelectedSectionsEnabled:\n accountPricingSettings?.compListingOnlyForSelectedSectionsEnabled ??\n null,\n compListingQuantityScoreAdjustmentEnabled:\n accountPricingSettings?.compListingQuantityScoreAdjustmentEnabled ??\n null,\n compListingExcludeFanInventory:\n accountPricingSettings?.compListingExcludeFanInventory ?? null,\n compListingExcludeDefects:\n accountPricingSettings?.compListingExcludeDefects ?? null,\n compListingQuantityScoreAdjustmentOverrideJson:\n accountPricingSettings?.compListingQuantityScoreAdjustmentOverrideJson ??\n null,\n compListingSelectedSectionSettings:\n accountPricingSettings?.compListingSelectedSectionSettings ?? null,\n };\n }, [\n compListingMode,\n compListingFloor,\n compListingCeiling,\n compListingOnlyForSameZoneEnabled,\n compListingOnlyForSelectedSectionsEnabled,\n compListingExcludeFanInventory,\n compListingExcludeDefects,\n compListingSelectedSectionSettings,\n compListingQuantityScoreAdjustmentEnabled,\n compListingQuantityScoreAdjustmentOverrideJson,\n eventPricingSettings?.compListingMode,\n eventPricingSettings?.compListingFloor,\n eventPricingSettings?.compListingCeiling,\n eventPricingSettings?.compListingOnlyForSameZoneEnabled,\n eventPricingSettings?.compListingOnlyForSelectedSectionsEnabled,\n eventPricingSettings?.compListingExcludeFanInventory,\n eventPricingSettings?.compListingExcludeDefects,\n eventPricingSettings?.compListingQuantityScoreAdjustmentEnabled,\n eventPricingSettings?.compListingQuantityScoreAdjustmentOverrideJson,\n eventPricingSettings?.compListingSelectedSectionSettings,\n accountPricingSettings?.compListingMode,\n accountPricingSettings?.compListingFloor,\n accountPricingSettings?.compListingCeiling,\n accountPricingSettings?.compListingOnlyForSameZoneEnabled,\n accountPricingSettings?.compListingOnlyForSelectedSectionsEnabled,\n accountPricingSettings?.compListingQuantityScoreAdjustmentEnabled,\n accountPricingSettings?.compListingExcludeFanInventory,\n accountPricingSettings?.compListingExcludeDefects,\n accountPricingSettings?.compListingQuantityScoreAdjustmentOverrideJson,\n accountPricingSettings?.compListingSelectedSectionSettings,\n defaultCompListingMode,\n ]);\n\n const outlierSettings = useMemo(() => {\n if (\n outlierMode != null ||\n outlierStandardDeviations != null ||\n outlierKthLowestLimit != null\n ) {\n // if it has any of these set - use the entire area\n return {\n outlierMode,\n outlierStandardDeviations,\n outlierKthLowestLimit,\n outlierKthLowestLimitRelativeSpacing,\n outlierKthLowestLimitAbsoluteSpacing,\n };\n }\n if (\n eventPricingSettings?.outlierMode != null ||\n eventPricingSettings?.outlierStandardDeviations != null\n // TODO - add rest of settings here\n ) {\n // if it has any of these set - use the entire area\n return {\n outlierMode: eventPricingSettings?.outlierMode ?? null,\n outlierStandardDeviations:\n eventPricingSettings?.outlierStandardDeviations ?? null,\n };\n }\n\n // if it has any of these set - use the entire area\n return {\n outlierMode: accountPricingSettings?.outlierMode ?? null,\n outlierStandardDeviations:\n accountPricingSettings?.outlierStandardDeviations ?? null,\n // TODO - add rest of settings here\n };\n }, [\n accountPricingSettings?.outlierMode,\n accountPricingSettings?.outlierStandardDeviations,\n eventPricingSettings?.outlierMode,\n eventPricingSettings?.outlierStandardDeviations,\n outlierKthLowestLimit,\n outlierKthLowestLimitAbsoluteSpacing,\n outlierKthLowestLimitRelativeSpacing,\n outlierMode,\n outlierStandardDeviations,\n ]);\n\n const onUndercutChange = useCallback(\n (\n undercutModeNew?: AutoPricingUndercutMode | null,\n undercutAbsoluteAmountNew?: number | null,\n undercutRelativeAmountNew?: number | null\n ) => {\n if (\n undercutModeNew !== undefined ||\n undercutAbsoluteAmountNew !== undefined ||\n undercutRelativeAmountNew !== undefined\n ) {\n setValue(\n 'undercutMode',\n coalesceUndefinedOnly(undercutModeNew, undercutSettings.undercutMode)!\n );\n setValue(\n 'undercutAbsoluteAmount',\n coalesceUndefinedOnly(\n undercutAbsoluteAmountNew,\n undercutSettings.undercutAbsoluteAmount\n )!\n );\n setValue(\n 'undercutRelativeAmount',\n coalesceUndefinedOnly(\n undercutRelativeAmountNew,\n undercutSettings.undercutRelativeAmount\n )!\n );\n }\n },\n [\n setValue,\n undercutSettings.undercutAbsoluteAmount,\n undercutSettings.undercutMode,\n undercutSettings.undercutRelativeAmount,\n ]\n );\n\n const onCompListingChange = useCallback(\n (input: {\n compListingModeNew?: AutoPricingCompListingMode | null;\n compListingFloorNew?: number | null;\n compListingCeilingNew?: number | null;\n compListingOnlyForSameZoneEnabledNew?: boolean | null;\n compListingOnlyForSelectedSectionsEnabledNew?: boolean | null;\n compListingQuantityScoreAdjustmentEnabledNew?: boolean | null;\n compListingExcludeFanInventoryNew?: boolean | null;\n compListingExcludeDefectsNew?: boolean | null;\n compListingQuantityScoreAdjustmentOverrideJsonNew?: string | null;\n compListingSelectedSectionSettingsNew?: SelectedSectionSettingsWithOptionals | null;\n }) => {\n const {\n compListingModeNew,\n compListingFloorNew,\n compListingCeilingNew,\n compListingOnlyForSameZoneEnabledNew,\n compListingOnlyForSelectedSectionsEnabledNew,\n compListingQuantityScoreAdjustmentEnabledNew,\n compListingExcludeFanInventoryNew,\n compListingExcludeDefectsNew,\n compListingQuantityScoreAdjustmentOverrideJsonNew,\n compListingSelectedSectionSettingsNew,\n } = input;\n\n if (\n compListingModeNew !== undefined ||\n compListingFloorNew !== undefined ||\n compListingCeilingNew !== undefined ||\n compListingOnlyForSameZoneEnabledNew !== undefined ||\n compListingOnlyForSelectedSectionsEnabledNew !== undefined ||\n compListingQuantityScoreAdjustmentEnabledNew !== undefined ||\n compListingExcludeFanInventoryNew !== undefined ||\n compListingExcludeDefectsNew !== undefined ||\n compListingQuantityScoreAdjustmentOverrideJsonNew !== undefined ||\n compListingSelectedSectionSettingsNew !== undefined\n ) {\n const sanitizedCompListingOnlyForSameZoneEnabledNew =\n compListingOnlyForSelectedSectionsEnabledNew\n ? false\n : compListingOnlyForSameZoneEnabledNew;\n const sanitizedCompListingOnlyForSelectedSectionsEnabledNew =\n compListingOnlyForSameZoneEnabledNew\n ? false\n : compListingOnlyForSelectedSectionsEnabledNew;\n\n setValue(\n 'compListingMode',\n coalesceUndefinedOnly(\n compListingModeNew,\n compListingSettings.compListingMode\n )!\n );\n setValue(\n 'compListingFloor',\n coalesceUndefinedOnly(\n compListingFloorNew,\n compListingSettings.compListingFloor\n )!\n );\n setValue(\n 'compListingCeiling',\n coalesceUndefinedOnly(\n compListingCeilingNew,\n compListingSettings.compListingCeiling\n )!\n );\n setValue(\n 'compListingOnlyForSameZoneEnabled',\n coalesceUndefinedOnly(\n sanitizedCompListingOnlyForSameZoneEnabledNew,\n compListingSettings.compListingOnlyForSameZoneEnabled\n )!\n );\n setValue(\n 'compListingOnlyForSelectedSectionsEnabled',\n coalesceUndefinedOnly(\n compListingOnlyForSelectedSectionsEnabledNew,\n compListingSettings.compListingOnlyForSelectedSectionsEnabled\n )!\n );\n setValue(\n 'compListingQuantityScoreAdjustmentEnabled',\n coalesceUndefinedOnly(\n sanitizedCompListingOnlyForSelectedSectionsEnabledNew,\n compListingSettings.compListingQuantityScoreAdjustmentEnabled\n )!\n );\n setValue(\n 'compListingExcludeFanInventory',\n coalesceUndefinedOnly(\n compListingExcludeFanInventoryNew,\n compListingSettings.compListingExcludeFanInventory\n )!\n );\n setValue(\n 'compListingExcludeDefects',\n coalesceUndefinedOnly(\n compListingExcludeDefectsNew,\n compListingSettings.compListingExcludeDefects\n )!\n );\n setValue(\n 'compListingQuantityScoreAdjustmentOverrideJson',\n coalesceUndefinedOnly(\n compListingQuantityScoreAdjustmentOverrideJsonNew,\n compListingSettings.compListingQuantityScoreAdjustmentOverrideJson\n )!\n );\n setValue(\n 'compListingSelectedSectionSettings',\n coalesceUndefinedOnly(\n mapToSelectedSectionSettings(compListingSelectedSectionSettingsNew),\n compListingSettings.compListingSelectedSectionSettings\n )!\n );\n }\n },\n [\n setValue,\n compListingSettings.compListingMode,\n compListingSettings.compListingFloor,\n compListingSettings.compListingCeiling,\n compListingSettings.compListingOnlyForSameZoneEnabled,\n compListingSettings.compListingOnlyForSelectedSectionsEnabled,\n compListingSettings.compListingQuantityScoreAdjustmentEnabled,\n compListingSettings.compListingExcludeFanInventory,\n compListingSettings.compListingExcludeDefects,\n compListingSettings.compListingQuantityScoreAdjustmentOverrideJson,\n compListingSettings.compListingSelectedSectionSettings,\n ]\n );\n\n const onCircuitBreakerChange = useCallback(\n (\n circuitBreakerRelativeCeilingNew?: number | null,\n circuitBreakerRelativeFloorNew?: number | null,\n circuitBreakerMaxDiscountVelocityPercentNew?: number | null,\n circuitBreakerMaxDiscountVelocityTicksInHoursNew?: number | null,\n circuitBreakerMinCompListingCountNew?: number | null\n ) => {\n if (\n circuitBreakerRelativeCeilingNew !== undefined ||\n circuitBreakerRelativeFloorNew !== undefined ||\n circuitBreakerMaxDiscountVelocityPercentNew !== undefined ||\n circuitBreakerMaxDiscountVelocityTicksInHoursNew !== undefined ||\n circuitBreakerMinCompListingCountNew !== undefined\n ) {\n setValue(\n 'circuitBreakerRelativeCeiling',\n coalesceUndefinedOnly(\n circuitBreakerRelativeCeilingNew,\n circuitBreakerSettings.circuitBreakerRelativeCeiling\n ) ?? null\n );\n setValue(\n 'circuitBreakerRelativeFloor',\n coalesceUndefinedOnly(\n circuitBreakerRelativeFloorNew,\n circuitBreakerSettings.circuitBreakerRelativeFloor\n ) ?? null\n );\n setValue(\n 'circuitBreakerMaxDiscountVelocityPercent',\n coalesceUndefinedOnly(\n circuitBreakerMaxDiscountVelocityPercentNew,\n circuitBreakerSettings.circuitBreakerMaxDiscountVelocityPercent\n ) ?? null\n );\n setValue(\n 'circuitBreakerMaxDiscountVelocityTicksInHours',\n coalesceUndefinedOnly(\n circuitBreakerMaxDiscountVelocityTicksInHoursNew,\n circuitBreakerSettings.circuitBreakerMaxDiscountVelocityTicksInHours\n ) ?? null\n );\n setValue(\n 'circuitBreakerMinCompListingCount',\n coalesceUndefinedOnly(\n circuitBreakerMinCompListingCountNew,\n circuitBreakerSettings.circuitBreakerMinCompListingCount\n ) ?? null\n );\n }\n },\n [\n circuitBreakerSettings.circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerSettings.circuitBreakerMaxDiscountVelocityTicksInHours,\n circuitBreakerSettings.circuitBreakerMinCompListingCount,\n circuitBreakerSettings.circuitBreakerRelativeCeiling,\n circuitBreakerSettings.circuitBreakerRelativeFloor,\n setValue,\n ]\n );\n\n const onOutlierChange = useCallback(\n (input: {\n outlierModeNew?: AutoPricingOutlierMode | null;\n outlierStandardDeviationsNew?: number | null;\n outlierKthLowestLimitNew?: number | null;\n outlierKthLowestLimitRelativeSpacingNew?: number | null;\n outlierKthLowestLimitAbsoluteSpacingNew?: number | null;\n }) => {\n const {\n outlierModeNew,\n outlierStandardDeviationsNew,\n outlierKthLowestLimitNew,\n outlierKthLowestLimitRelativeSpacingNew,\n outlierKthLowestLimitAbsoluteSpacingNew,\n } = input;\n\n // Covers both null and undefined cases\n if (outlierModeNew !== undefined) {\n setValue(\n 'outlierMode',\n coalesceUndefinedOnly(outlierModeNew, outlierSettings.outlierMode) ??\n null\n );\n\n switch (outlierModeNew) {\n case AutoPricingOutlierMode.StandardDeviations:\n setValue(\n 'outlierStandardDeviations',\n coalesceUndefinedOnly(\n outlierStandardDeviationsNew,\n outlierSettings.outlierStandardDeviations\n ) ?? null\n );\n setValue('outlierKthLowestLimit', null);\n setValue('outlierKthLowestLimitRelativeSpacing', null);\n setValue('outlierKthLowestLimitAbsoluteSpacing', null);\n break;\n case AutoPricingOutlierMode.KthLowest:\n setValue('outlierStandardDeviations', null);\n setValue(\n 'outlierKthLowestLimit',\n coalesceUndefinedOnly(\n outlierKthLowestLimitNew,\n outlierSettings.outlierKthLowestLimit\n ) ?? null\n );\n\n setValue(\n 'outlierKthLowestLimitRelativeSpacing',\n coalesceUndefinedOnly(\n outlierKthLowestLimitRelativeSpacingNew,\n outlierSettings.outlierKthLowestLimitRelativeSpacing\n ) ?? null\n );\n\n setValue(\n 'outlierKthLowestLimitAbsoluteSpacing',\n coalesceUndefinedOnly(\n outlierKthLowestLimitAbsoluteSpacingNew,\n outlierSettings.outlierKthLowestLimitAbsoluteSpacing\n ) ?? null\n );\n break;\n case AutoPricingOutlierMode.SkipLogic:\n setValue('outlierStandardDeviations', null);\n setValue('outlierKthLowestLimit', null);\n setValue('outlierKthLowestLimitRelativeSpacing', null);\n setValue('outlierKthLowestLimitAbsoluteSpacing', null);\n }\n } else {\n setValue('outlierMode', null);\n setValue('outlierStandardDeviations', null);\n setValue('outlierKthLowestLimit', null);\n setValue('outlierKthLowestLimitRelativeSpacing', null);\n setValue('outlierKthLowestLimitAbsoluteSpacing', null);\n }\n },\n [\n outlierSettings.outlierKthLowestLimit,\n outlierSettings.outlierKthLowestLimitAbsoluteSpacing,\n outlierSettings.outlierKthLowestLimitRelativeSpacing,\n outlierSettings.outlierMode,\n outlierSettings.outlierStandardDeviations,\n setValue,\n ]\n );\n\n const setAutoPricingDefaults = useCallback(() => {\n // If this or any higher level don't have, set the default\n if (\n !undercutMode &&\n !eventPricingSettings?.undercutMode &&\n !accountPricingSettings?.undercutMode\n ) {\n setValue('undercutMode', undercutMode);\n setValue('undercutAbsoluteAmount', undercutAbsoluteAmount);\n setValue('undercutRelativeAmount', undercutRelativeAmount);\n }\n\n // If this or any higher level don't have, set the default\n if (\n !compListingMode &&\n !eventPricingSettings?.compListingMode &&\n !accountPricingSettings?.compListingMode\n ) {\n setValue('compListingMode', compListingMode);\n setValue('compListingFloor', compListingFloor);\n setValue('compListingCeiling', compListingCeiling);\n }\n }, [\n accountPricingSettings?.compListingMode,\n accountPricingSettings?.undercutMode,\n compListingCeiling,\n compListingFloor,\n compListingMode,\n eventPricingSettings?.compListingMode,\n eventPricingSettings?.undercutMode,\n setValue,\n undercutAbsoluteAmount,\n undercutMode,\n undercutRelativeAmount,\n ]);\n\n const applySectionRowFilterCompListingChanges = useCallback(\n (\n newSectionIdFilter: number[],\n sections: SectionInfo[],\n compListingSelectedSectionSettingsNew?:\n | SelectedSectionSettingsWithOptionals\n | null\n | undefined\n ) => {\n // If sectionIdFilter is empty, we should disable the compListingOnlyForSelectedSectionsEnabled\n // and revert back to QualitScore mode. When users add section filters, we should enable\n // compListingOnlyForSelectedSectionsEnabled and put the mode to SameEvent only on when the first\n // section is added. If the user swaps the comp mode after the first section we don't want to keep\n // forcing them back into SameEvent mode.\n if (newSectionIdFilter.length === 0 && sections.length > 0) {\n onCompListingChange({\n compListingSelectedSectionSettingsNew,\n compListingModeNew: AutoPricingCompListingMode.QualityScore,\n compListingOnlyForSelectedSectionsEnabledNew: false,\n });\n } else {\n if (newSectionIdFilter.length === 1 && sections.length === 0) {\n onCompListingChange({\n compListingSelectedSectionSettingsNew,\n compListingModeNew: AutoPricingCompListingMode.SameEvent,\n compListingOnlyForSelectedSectionsEnabledNew: true,\n });\n\n return;\n }\n\n // Otherwise, just update the section filters and ensure the selectedSections flag is true\n onCompListingChange({\n compListingSelectedSectionSettingsNew,\n compListingOnlyForSelectedSectionsEnabledNew: true,\n });\n }\n },\n [onCompListingChange]\n );\n\n const onCompListingSectionIdFilterChange = useCallback(\n (\n sectionId: number,\n selectedSections: SectionInfo[],\n section?: SectionInfo\n ) => {\n let newSectionIdFilter =\n compListingSelectedSectionSettings?.sectionIdFilter ?? [];\n\n let newRowIdFilter =\n compListingSelectedSectionSettings?.rowIdFilter ?? [];\n\n let newSectionRowIdFilter =\n compListingSelectedSectionSettings?.sectionRowIdFilter ?? {};\n\n if (newSectionIdFilter.includes(sectionId)) {\n newSectionIdFilter = newSectionIdFilter.filter(\n (id) => id !== sectionId\n );\n\n // Remove all the associated row ids for this section\n const section = selectedSections.find((s) => s.id === sectionId);\n if (section) {\n const rowIds = section.rows.map((r) => r.id);\n newRowIdFilter = newRowIdFilter.filter((id) => !rowIds.includes(id));\n }\n\n // Remove the sectionRow mapping so we don't display it in pills\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { [sectionId]: omitted, ...updatedSectionRowIdFilter } =\n compListingSelectedSectionSettings?.sectionRowIdFilter ?? {};\n\n newSectionRowIdFilter = updatedSectionRowIdFilter;\n } else {\n newSectionIdFilter.push(sectionId);\n\n // If a section is present, add all the rows associated with the newly selected section\n if (section) {\n const newRowIds = section.rows.map((r) => r.id);\n newRowIds.forEach((newRowId) => {\n if (!newRowIdFilter.includes(newRowId)) {\n newRowIdFilter.push(newRowId);\n }\n });\n }\n }\n\n const compListingSelectedSectionSettingsNew = {\n ...compListingSelectedSectionSettings,\n sectionIdFilter: newSectionIdFilter,\n rowIdFilter: newRowIdFilter,\n sectionRowIdFilter: newSectionRowIdFilter,\n };\n\n applySectionRowFilterCompListingChanges(\n newSectionIdFilter,\n selectedSections,\n compListingSelectedSectionSettingsNew\n );\n },\n [\n applySectionRowFilterCompListingChanges,\n compListingSelectedSectionSettings,\n ]\n );\n\n const onCompListingSectionZoneChange = useCallback(\n (sections: SectionInfo[]) => {\n let newSectionIdFilter =\n compListingSelectedSectionSettings?.sectionIdFilter ?? [];\n\n let newRowIdFilter =\n compListingSelectedSectionSettings?.rowIdFilter ?? [];\n\n const newSectionRowIdFilter =\n compListingSelectedSectionSettings?.sectionRowIdFilter ?? {};\n\n // If every section passed in already exists in prevSections then we should remove them entirely\n const completelyOverlap = sections.every((section) =>\n newSectionIdFilter.includes(section.id)\n );\n\n if (completelyOverlap) {\n const sectionIdsToRemove = new Set(\n sections.map((section) => section.id)\n );\n\n newSectionIdFilter = newSectionIdFilter.filter(\n (id) => !sectionIdsToRemove.has(id)\n );\n\n // Remove all associated rows as well\n const rowIdsToRemove = sections\n .map((section) => section.rows.map((r) => r.id))\n .flat();\n\n const rowIdsToRemoveSet = new Set(rowIdsToRemove);\n\n newRowIdFilter = newRowIdFilter.filter(\n (rowId) => !rowIdsToRemoveSet.has(rowId)\n );\n\n // Update sectionRowIdFilters to remove the sections that have been removed\n sections.forEach((section) => {\n if (section.id in newSectionRowIdFilter) {\n delete newSectionRowIdFilter[section.id];\n }\n });\n } else {\n // Upsert of the new sections\n sections.forEach((section) => {\n if (!(section.id in newSectionRowIdFilter)) {\n newSectionIdFilter.push(section.id);\n\n const newRowIds = section.rows.map((r) => r.id);\n newRowIds.forEach((newRowId) => {\n if (!newRowIdFilter.includes(newRowId)) {\n newRowIdFilter.push(newRowId);\n }\n });\n }\n });\n }\n\n const compListingSelectedSectionSettingsNew = {\n ...compListingSelectedSectionSettings,\n sectionIdFilter: newSectionIdFilter,\n rowIdFilter: newRowIdFilter,\n sectionRowIdFilter: newSectionRowIdFilter,\n };\n\n applySectionRowFilterCompListingChanges(\n newSectionIdFilter,\n sections,\n compListingSelectedSectionSettingsNew\n );\n },\n [\n applySectionRowFilterCompListingChanges,\n compListingSelectedSectionSettings,\n ]\n );\n\n const hasChanges = useCallback(\n (listingForm: ListingDetailsUpdateInput) => {\n // Make sure we only send back the settable props\n if (\n formState.defaultValues?.pricingSettingsInputs?.compListingMode !==\n listingForm.compListingMode ||\n formState.defaultValues?.pricingSettingsInputs?.compListingFloor !==\n listingForm.compListingFloor ||\n formState.defaultValues?.pricingSettingsInputs?.compListingCeiling !==\n listingForm.compListingCeiling ||\n formState.defaultValues?.pricingSettingsInputs\n ?.compListingQuantityScoreAdjustmentEnabled !==\n listingForm.compListingQuantityScoreAdjustmentEnabled ||\n formState.defaultValues?.pricingSettingsInputs\n ?.compListingQuantityScoreAdjustmentOverrideJson !==\n listingForm.compListingQuantityScoreAdjustmentOverrideJson ||\n formState.defaultValues?.pricingSettingsInputs\n ?.compListingOnlyForSameZoneEnabled !==\n listingForm.compListingOnlyForSameZoneEnabled ||\n formState.defaultValues?.pricingSettingsInputs\n ?.compListingOnlyForSelectedSectionsEnabled !==\n listingForm.compListingOnlyForSelectedSectionsEnabled ||\n formState.defaultValues?.pricingSettingsInputs\n ?.compListingExcludeFanInventory !==\n listingForm.compListingExcludeFanInventory ||\n formState.defaultValues?.pricingSettingsInputs\n ?.compListingExcludeDefects !==\n listingForm.compListingExcludeDefects ||\n !isEqual(\n formState.defaultValues?.pricingSettingsInputs\n ?.compListingSelectedSectionSettings,\n listingForm?.compListingSelectedSectionSettings\n ) ||\n formState.defaultValues?.pricingSettingsInputs?.undercutMode !==\n listingForm.undercutMode ||\n formState.defaultValues?.pricingSettingsInputs\n ?.undercutAbsoluteAmount !== listingForm.undercutAbsoluteAmount ||\n formState.defaultValues?.pricingSettingsInputs\n ?.undercutRelativeAmount !== listingForm.undercutRelativeAmount ||\n formState.defaultValues?.pricingSettingsInputs\n ?.circuitBreakerMaxDiscountVelocityPercent !==\n listingForm.circuitBreakerMaxDiscountVelocityPercent ||\n formState.defaultValues?.pricingSettingsInputs\n ?.circuitBreakerMaxDiscountVelocityTicksInHours !==\n listingForm.circuitBreakerMaxDiscountVelocityTicksInHours ||\n formState.defaultValues?.pricingSettingsInputs\n ?.circuitBreakerMinCompListingCount !==\n listingForm.circuitBreakerMinCompListingCount ||\n formState.defaultValues?.pricingSettingsInputs\n ?.circuitBreakerRelativeCeiling !==\n listingForm.circuitBreakerRelativeCeiling ||\n formState.defaultValues?.pricingSettingsInputs\n ?.circuitBreakerRelativeFloor !==\n listingForm.circuitBreakerRelativeFloor ||\n formState.defaultValues?.pricingSettingsInputs?.outlierMode !==\n listingForm.outlierMode ||\n formState.defaultValues?.pricingSettingsInputs\n ?.outlierStandardDeviations !== listingForm.outlierStandardDeviations\n ) {\n return true;\n }\n },\n [\n formState.defaultValues?.pricingSettingsInputs?.compListingMode,\n formState.defaultValues?.pricingSettingsInputs?.compListingFloor,\n formState.defaultValues?.pricingSettingsInputs?.compListingCeiling,\n formState.defaultValues?.pricingSettingsInputs\n ?.compListingQuantityScoreAdjustmentEnabled,\n formState.defaultValues?.pricingSettingsInputs\n ?.compListingQuantityScoreAdjustmentOverrideJson,\n formState.defaultValues?.pricingSettingsInputs\n ?.compListingOnlyForSameZoneEnabled,\n formState.defaultValues?.pricingSettingsInputs\n ?.compListingOnlyForSelectedSectionsEnabled,\n formState.defaultValues?.pricingSettingsInputs\n ?.compListingExcludeFanInventory,\n formState.defaultValues?.pricingSettingsInputs?.compListingExcludeDefects,\n formState.defaultValues?.pricingSettingsInputs\n ?.compListingSelectedSectionSettings,\n formState.defaultValues?.pricingSettingsInputs?.undercutMode,\n formState.defaultValues?.pricingSettingsInputs?.undercutAbsoluteAmount,\n formState.defaultValues?.pricingSettingsInputs?.undercutRelativeAmount,\n formState.defaultValues?.pricingSettingsInputs\n ?.circuitBreakerMaxDiscountVelocityPercent,\n formState.defaultValues?.pricingSettingsInputs\n ?.circuitBreakerMaxDiscountVelocityTicksInHours,\n formState.defaultValues?.pricingSettingsInputs\n ?.circuitBreakerMinCompListingCount,\n formState.defaultValues?.pricingSettingsInputs\n ?.circuitBreakerRelativeCeiling,\n formState.defaultValues?.pricingSettingsInputs\n ?.circuitBreakerRelativeFloor,\n formState.defaultValues?.pricingSettingsInputs?.outlierMode,\n formState.defaultValues?.pricingSettingsInputs?.outlierStandardDeviations,\n ]\n );\n\n const setResetListingAutoPricingSettings = useCallback(\n (reset: any) => {\n setFormValue('resetListingAutoPricingSettings' as Path, reset);\n },\n [setFormValue]\n );\n\n const onCompListingModeChange = useCallback(\n (mode: AutoPricingCompListingMode | null) => {\n if (!mode) {\n onCompListingChange({\n compListingModeNew: null,\n compListingFloorNew: null,\n compListingCeilingNew: null,\n });\n return;\n }\n\n onCompListingChange({\n compListingModeNew: mode,\n // Reset flag on mode change\n compListingOnlyForSameZoneEnabledNew: false,\n compListingOnlyForSelectedSectionsEnabledNew: false,\n });\n\n if (mode === AutoPricingCompListingMode.ParentListing) {\n onUndercutChange(AutoPricingUndercutMode.Simple);\n }\n },\n [onCompListingChange, onUndercutChange]\n );\n\n const canAutoPrice = useUserHasFeature(Feature.AutoPricing);\n\n return {\n canAutoPrice,\n uiCurrency,\n currencyNumberFormat,\n\n onResetSettings,\n onResetAdvanceSettings,\n setAutoPricingDefaults,\n eventPricingSettings,\n accountPricingSettings,\n event,\n\n ...circuitBreakerSettings,\n ...compListingSettings,\n ...undercutSettings,\n ...outlierSettings,\n\n onUndercutChange,\n onCompListingChange,\n onCircuitBreakerChange,\n onOutlierChange,\n onCompListingSectionIdFilterChange,\n onCompListingSectionZoneChange,\n onCompListingModeChange,\n\n compListingFloorError,\n compListingSelectedSectionError,\n undercutAbsoluteAmountError,\n undercutRelativeAmountError,\n\n resetListingAutoPricingSettings,\n setResetListingAutoPricingSettings,\n\n hasChanges,\n };\n};\n","import { ChangeEvent } from 'react';\nimport { useState } from 'react';\nimport { ButtonWithIcon } from 'src/components/Buttons';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { Switch } from 'src/core/interim/Switch';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { Stack } from 'src/core/ui';\nimport { Slider } from 'src/core/ui/Slider';\nimport { ToggleGroup } from 'src/core/ui/ToggleGroup';\nimport { useAvailableAutopricingModes } from 'src/hooks/useAvailableAutopricingModes';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { DetailGroup, DetailSection, SectionContent } from 'src/modals/common';\nimport { ResetIcon } from 'src/svgs/Viagogo';\nimport {\n OUTLIER_MODE_KTH_LOWEST_STRATEGY,\n OutlierModeKthLowestStrategy,\n} from 'src/utils/autoPricingUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { STANDARD_DEVIATIONS_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { roundToPrecision } from 'src/utils/numberFormatter';\nimport { getCompleteEventConfigScoreOverrides } from 'src/utils/seatScoreUtils';\nimport {\n AutoPricingCompListingMode,\n AutoPricingOutlierMode,\n Feature,\n ListingGroup,\n} from 'src/WebApiController';\n\nimport * as styles from './SectionRowIdFilter.css';\nimport { useListingGroupAutoPricingSettings } from './useListingGroupAutoPricingSettings';\n\nexport const AdvancePricingSettings = ({\n listingGroup,\n}: {\n listingGroup?: ListingGroup;\n}) => {\n const [outlierKthLowestStrategy, setKthLowestOutlierStrategy] = useState<\n OutlierModeKthLowestStrategy | undefined\n >(OutlierModeKthLowestStrategy.Relative);\n\n const {\n onResetAdvanceSettings,\n\n circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerMaxDiscountVelocityTicksInHours,\n circuitBreakerMinCompListingCount,\n\n compListingMode,\n compListingQuantityScoreAdjustmentEnabled,\n compListingExcludeFanInventory,\n compListingExcludeDefects,\n\n outlierMode,\n outlierStandardDeviations,\n outlierKthLowestLimit,\n outlierKthLowestLimitAbsoluteSpacing,\n outlierKthLowestLimitRelativeSpacing,\n\n onCompListingChange,\n onCircuitBreakerChange,\n onOutlierChange,\n } = useListingGroupAutoPricingSettings(listingGroup);\n\n const { activeConfigOverride, venueMapInfo } = useEventMapContext();\n const hasExcludeFanInventoryFeature = useUserHasFeature(\n Feature.ExcludeFanInventory\n );\n const hasExcludeDefectsFeature = useUserHasFeature(Feature.ExcludeDefects);\n\n const scores = getCompleteEventConfigScoreOverrides(\n venueMapInfo?.sectionScores,\n activeConfigOverride?.scoreOverrides,\n false\n );\n\n const { outlierModes, outlierModesDisabled } = useAvailableAutopricingModes(\n true,\n null,\n null,\n Boolean(scores?.some((s) => s.score))\n );\n\n return (\n }\n >\n \n <>\n {compListingMode === AutoPricingCompListingMode.QualityScore && (\n \n \n }\n >\n ) => e.stopPropagation()}\n onChange={(e) => {\n const isChecked = e.target.checked;\n if (\n isChecked !== compListingQuantityScoreAdjustmentEnabled\n ) {\n onCompListingChange({\n compListingQuantityScoreAdjustmentEnabledNew: isChecked,\n });\n }\n }}\n />\n \n \n )}\n {hasExcludeFanInventoryFeature && (\n \n }\n >\n ) => e.stopPropagation()}\n onChange={(e) => {\n const isChecked = e.target.checked;\n if (isChecked !== compListingExcludeFanInventory) {\n onCompListingChange({\n compListingExcludeFanInventoryNew: isChecked,\n });\n }\n }}\n />\n \n \n )}\n {/*\n * [NOTE]\n * Exclude defects feature was built first before product changed their mind for the\n * UI to instead show the opposite, \"Include Defects\" with a default value of false.\n * Originally, the requirement was \"Exclude Defects\" with a default value of true.\n * The DB columns and pricer backend has already been finished with logic revolving\n * around the \"Exclude Defect\" verbiage, with the logic gates predicating busisness logic\n * off of \"exclude\". The UI will now show the copy \"Include Defects\" and invert the value\n * being read/written from the database, but the rest of the backend (pricer + site) will remain\n * unchanged.\n */}\n {hasExcludeDefectsFeature && (\n \n }>\n ) => e.stopPropagation()}\n onChange={(e) => {\n const compListingExcludeDefectsNew = !e.target.checked;\n if (\n compListingExcludeDefectsNew !== compListingExcludeDefects\n ) {\n onCompListingChange({\n compListingExcludeDefectsNew:\n compListingExcludeDefectsNew,\n });\n }\n }}\n />\n \n \n )}\n \n }\n >\n {\n onCircuitBreakerChange(\n undefined,\n undefined,\n undefined,\n undefined,\n Math.round(count)\n );\n }}\n />\n \n \n \n }>\n e.stopPropagation()}\n onChange={(v) => {\n onOutlierChange({\n outlierModeNew: v as AutoPricingOutlierMode,\n });\n }}\n />\n \n \n {outlierMode == AutoPricingOutlierMode.StandardDeviations ? (\n \n }>\n e.stopPropagation()}\n onChange={(v) => {\n const value = parseInt(v ?? '');\n if (value != null && !isNaN(value)) {\n onOutlierChange({\n outlierModeNew:\n AutoPricingOutlierMode.StandardDeviations,\n outlierStandardDeviationsNew: value,\n });\n } else {\n onOutlierChange({\n outlierModeNew:\n AutoPricingOutlierMode.StandardDeviations,\n outlierStandardDeviationsNew: null,\n });\n }\n }}\n />\n \n \n ) : outlierMode == AutoPricingOutlierMode.KthLowest ? (\n \n \n \n {\n const v = parseInt(e.target.value);\n onOutlierChange({\n outlierModeNew: AutoPricingOutlierMode.KthLowest,\n outlierKthLowestLimitNew: v,\n });\n }}\n />\n \n {outlierKthLowestStrategy ==\n OutlierModeKthLowestStrategy.Relative ? (\n {\n let v = parseInt(e.target.value);\n if (v < 0) {\n v = 0;\n } else if (v > 100) {\n v = 100;\n }\n\n if (!isNaN(v)) {\n onOutlierChange({\n outlierModeNew: AutoPricingOutlierMode.KthLowest,\n outlierKthLowestLimitNew: undefined,\n outlierKthLowestLimitAbsoluteSpacingNew: null,\n outlierKthLowestLimitRelativeSpacingNew: v,\n });\n }\n }}\n />\n ) : (\n {\n const v = parseInt(e.target.value);\n onOutlierChange({\n outlierModeNew: AutoPricingOutlierMode.KthLowest,\n outlierKthLowestLimitNew: undefined,\n outlierKthLowestLimitAbsoluteSpacingNew: v,\n outlierKthLowestLimitRelativeSpacingNew: null,\n });\n }}\n />\n )}\n {\n if (!value) {\n return;\n }\n\n const strat = value as OutlierModeKthLowestStrategy;\n setKthLowestOutlierStrategy(strat);\n }}\n />\n \n \n \n ) : null}\n \n \n \n {\n const v = parseFloat(e.target.value) / 100;\n onCircuitBreakerChange(\n undefined,\n undefined,\n v,\n undefined,\n undefined\n );\n }}\n />\n \n {\n const v = parseInt(e.target.value);\n onCircuitBreakerChange(\n undefined,\n undefined,\n undefined,\n v,\n undefined\n );\n }}\n />\n \n \n \n \n }\n textContentId={ContentId.ResetSettings}\n onClick={onResetAdvanceSettings}\n />\n \n \n \n \n );\n};\n","export const ROW_FILTER_MISSING = 'MISSING';\n","import { useCallback } from 'react';\nimport { RowSelector } from 'src/components/Selectors/SectionRowSelector';\nimport { RowInfo, SectionInfo } from 'src/WebApiController';\n\nimport * as styles from './FilterPillList.css';\n\nconst PENCIL_CHAR = '\\u270E';\n\nexport const RowIdFilterDropdown = ({\n rowName,\n row,\n section,\n focusedSectionIds,\n onChange,\n disabled,\n}: {\n rowName?: string | null;\n row?: RowInfo;\n section?: SectionInfo;\n focusedSectionIds: number[];\n onChange: (row: RowInfo) => void;\n disabled: boolean;\n}) => {\n const onRowChange = useCallback(\n (rowId: string) => {\n const rowIdNum = parseInt(rowId);\n const row = section?.rows?.find((r) => r.id === rowIdNum);\n if (row) {\n onChange(row);\n }\n },\n [onChange, section?.rows]\n );\n\n if (!section?.rows?.filter((r) => !r.isSpeculative)?.length) {\n return null;\n }\n\n return (\n {\n // When clicking on the row selector, if the section is already focused\n // do not unfocus it\n if (focusedSectionIds.includes(section.id)) {\n e.preventDefault();\n e.stopPropagation();\n }\n }}\n />\n );\n};\n","import clsx from 'clsx';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { PillList } from 'src/core/ui/PillList';\nimport { RowInfo, SectionInfo } from 'src/WebApiController';\n\nimport { ROW_FILTER_MISSING } from './FilterPillList.constants';\nimport * as styles from './FilterPillList.css';\nimport { RowIdFilterDropdown } from './RowIdFilterDropdown';\n\ntype FilterPillListProps = {\n disabled?: boolean;\n selectedSections: SectionInfo[];\n rowIdFilters?: number[] | undefined;\n sectionRowIdFilters?: { [key: string]: string } | undefined;\n useCondensedBorders?: boolean;\n scrollButtonClassName?: Record<'up' | 'down' | 'left' | 'right', string>;\n applyRowFilterChanges: (\n rowIdFiltersNew: number[],\n sectionRowIdFiltersNew: {\n [key: string]: string;\n }\n ) => void;\n\n applySelectedSectionChanges: (\n sectionId: number,\n selectedSections: SectionInfo[]\n ) => void;\n};\n\ntype RowOverride = RowInfo & {\n isManualOverride: boolean;\n};\n\nexport const FilterPillList = ({\n disabled,\n selectedSections,\n rowIdFilters,\n sectionRowIdFilters,\n useCondensedBorders,\n scrollButtonClassName,\n applyRowFilterChanges,\n applySelectedSectionChanges,\n}: FilterPillListProps) => {\n const [focusedSections, setFocusedSections] = useState([]);\n\n const [keysPressed, setKeysPressed] = useState([]);\n\n const { activeConfigOverride } = useEventMapContext();\n\n // Backfill the sections with newly added rows from score override\n const backfilledSections = useMemo(() => {\n if (!activeConfigOverride?.scoreOverrides) {\n return selectedSections;\n }\n const sectionToScoredRows =\n activeConfigOverride?.scoreOverrides?.reduce(\n (acc, score) => {\n acc[score.sectionId] = acc[score.sectionId] || [];\n if (score.rowOrdinal != null && score.rowName != null) {\n acc[score.sectionId].push({\n id: score.rowId,\n name: score.rowName,\n ordinal: score.rowOrdinal,\n tktClass: score.tkClsId,\n isManualOverride: score.isManualOverride,\n } as RowOverride);\n }\n return acc;\n },\n {} as Record\n ) ?? {};\n\n const sanitized: SectionInfo[] = [];\n for (const section of selectedSections) {\n const venueRows = section.rows;\n if (sectionToScoredRows[section.id]) {\n for (const { isManualOverride, ...scoredRow } of sectionToScoredRows[\n section.id\n ]) {\n const index = venueRows.findIndex((row) => row.id === scoredRow.id);\n if (index < 0) {\n // New row from score override\n venueRows.push(scoredRow);\n } else {\n // override section rows from override\n if (isManualOverride) {\n venueRows[index] = scoredRow;\n }\n }\n }\n }\n sanitized.push({ ...section, rows: venueRows });\n }\n return sanitized;\n }, [activeConfigOverride?.scoreOverrides, selectedSections]);\n\n const updateRowFilters = useCallback(\n (rowFilter: string, row?: RowInfo) => {\n let newRowIdFilters = rowIdFilters ?? [];\n\n const newSectionRowIdFilters = {\n ...sectionRowIdFilters,\n };\n\n focusedSections.forEach((section) => {\n const matchingRow = section.rows.find(\n ({ id, name }) =>\n id === row?.id || name?.toLowerCase() === rowFilter.toLowerCase()\n );\n if (matchingRow !== undefined) {\n // Remove all the row filters associated with the section id\n const sectionRowIds = section.rows.map((r) => r.id);\n newRowIdFilters = [\n ...newRowIdFilters.filter(\n (rowId) => !sectionRowIds.includes(rowId)\n ),\n ];\n\n // Exclude all rows from section if the matching row has no ordinal\n if (matchingRow.ordinal == null) {\n newSectionRowIdFilters[section.id] = matchingRow.id.toString();\n return;\n }\n\n // Push all the row ids with an ordinal less than or equal to the matching row\n section.rows.forEach((row) => {\n if (row.ordinal == null || matchingRow.ordinal == null) return;\n if (row.ordinal <= matchingRow.ordinal) {\n newRowIdFilters.push(row.id);\n }\n });\n\n // Only store the highest ordinal row id to display in the pill\n newSectionRowIdFilters[section.id] = matchingRow.id.toString();\n } else {\n delete newSectionRowIdFilters[section.id];\n const sectionRowIds = section.rows.map(({ id }) => id);\n newRowIdFilters = newRowIdFilters.filter(\n (id) => !sectionRowIds.includes(id)\n );\n }\n });\n\n applyRowFilterChanges(newRowIdFilters, newSectionRowIdFilters);\n setKeysPressed([]);\n setFocusedSections((prev) => {\n return prev.filter((s) => !(s.id in newSectionRowIdFilters));\n });\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [rowIdFilters, sectionRowIdFilters, backfilledSections, focusedSections]\n );\n\n useEffect(() => {\n const sectionsMissingRowFilter = backfilledSections.filter(\n (s) => sectionRowIdFilters && !(s.id in sectionRowIdFilters)\n );\n\n setFocusedSections(sectionsMissingRowFilter);\n }, [backfilledSections, sectionRowIdFilters]);\n\n useEffect(() => {\n let keyPressTimeout: NodeJS.Timeout;\n\n const handleKeyDown = (event: KeyboardEvent) => {\n const ignoreElements = ['INPUT', 'TEXTAREA', 'SELECT'];\n if (\n document.activeElement &&\n ignoreElements.includes(document.activeElement.tagName)\n ) {\n return;\n }\n\n if (!backfilledSections) return;\n\n if (!event.ctrlKey && /^[a-zA-Z0-9]$/.test(event.key)) {\n setKeysPressed((prevKeys) => {\n const updatedKeys = [...prevKeys, event.key];\n\n clearTimeout(keyPressTimeout);\n\n keyPressTimeout = setTimeout(() => {\n const rowFilter = updatedKeys.join('').toLowerCase();\n updateRowFilters(rowFilter);\n }, 600);\n\n return updatedKeys;\n });\n } else if (!event.ctrlKey && event.key === 'Enter') {\n setKeysPressed((prevKeys) => {\n const rowFilter = prevKeys.join('').toLowerCase();\n updateRowFilters(rowFilter);\n clearTimeout(keyPressTimeout);\n return [];\n });\n }\n };\n\n window.addEventListener('keydown', handleKeyDown);\n\n return () => {\n window.removeEventListener('keydown', handleKeyDown);\n clearTimeout(keyPressTimeout);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [backfilledSections, focusedSections]);\n\n const onPillHover = useCallback(\n (e: React.MouseEvent) => {\n if (e.currentTarget == null) {\n return;\n }\n\n e.currentTarget.classList.add(\n clsx(styles.boldPillHover, {\n [styles.condensedBorderRadius]: useCondensedBorders,\n })\n );\n },\n [useCondensedBorders]\n );\n\n const onPillLeave = useCallback((e: React.MouseEvent) => {\n if (e.currentTarget == null) {\n return;\n }\n\n e.currentTarget.classList.remove(styles.boldPillHover);\n }, []);\n\n const onPillClick = useCallback(\n (pillId: number, e: React.MouseEvent) => {\n // If shift key is pressed, select all pills or unselect all of them if they are all selected\n if (e.shiftKey) {\n if (backfilledSections.length == focusedSections.length) {\n setFocusedSections([]);\n } else {\n setFocusedSections(backfilledSections);\n }\n } else {\n setFocusedSections((prevFocusedSections) => {\n const isActive = prevFocusedSections.some(\n (pill) => pill.id === pillId\n );\n if (isActive) {\n return prevFocusedSections.filter((pill) => pill.id !== pillId);\n } else {\n const newPill = backfilledSections.find(\n (section) => section.id === pillId\n );\n\n return newPill\n ? [...prevFocusedSections, newPill]\n : prevFocusedSections;\n }\n });\n }\n },\n [focusedSections.length, backfilledSections]\n );\n\n const filterSectionsPills = useMemo(() => {\n const rowLookup = sectionRowIdFilters ?? {};\n\n return backfilledSections\n .map((section) => {\n const rowFilter = rowLookup?.[section.id];\n const rowInfo =\n rowFilter != null && rowFilter !== ROW_FILTER_MISSING\n ? section.rows.find((r) => r.id.toString() == rowFilter)\n : undefined;\n\n const isFocusedPill = focusedSections.find((s) => s.id == section.id);\n return {\n value: section.id.toString(),\n rowFilter: rowFilter,\n display: section.name,\n customPillContainer: isFocusedPill\n ? clsx(styles.boldPill, {\n [styles.condensedBorderRadius]: useCondensedBorders,\n })\n : undefined,\n useCondensedBorders: useCondensedBorders,\n postfixItem: (\n f.id)}\n onChange={(row) => {\n updateRowFilters(row.name ?? '', row);\n }}\n disabled={false}\n />\n ),\n };\n })\n .toSorted((a, b) => {\n // Pills without a row name (rowInfo) come first\n if (!a.rowFilter && b.rowFilter) {\n return -1;\n } else if (a.rowFilter && !b.rowFilter) {\n return 1;\n }\n\n // Otherwise just sort by the section name\n return a.display.localeCompare(b.display, undefined, {\n numeric: true,\n sensitivity: 'base',\n });\n })\n .map(\n ({\n value,\n display,\n postfixItem,\n customPillContainer,\n useCondensedBorders,\n }) => ({\n value,\n display,\n postfixItem,\n customPillContainer,\n useCondensedBorders,\n })\n );\n }, [\n sectionRowIdFilters,\n backfilledSections,\n focusedSections,\n useCondensedBorders,\n keysPressed,\n updateRowFilters,\n ]);\n\n if (!filterSectionsPills.length) return null;\n\n return (\n
    \n {\n const sectionId = Number(key);\n if (!isNaN(sectionId)) {\n applySelectedSectionChanges(sectionId, backfilledSections);\n }\n }}\n />\n
    \n );\n};\n","import { useAppContext } from 'src/contexts/AppContext';\nimport { hasPermissionForListing } from 'src/utils/userPermissionUtils';\nimport { Listing, Permission } from 'src/WebApiController';\n\nexport const useUserHasListingPermission = (\n listing: Listing | null | undefined,\n forBulkEdit: boolean | undefined,\n root: Permission,\n isPricerOf?: Permission,\n isPurchasedBy?: Permission\n) => {\n const { loginContext } = useAppContext();\n\n const canUpdate = hasPermissionForListing(\n loginContext?.user,\n listing,\n forBulkEdit,\n root,\n isPricerOf,\n isPurchasedBy\n );\n\n return canUpdate;\n};\n\nexport const useUserCanUpdateListing = (\n listing: Listing | null | undefined,\n forBulkEdit: boolean | undefined\n) => {\n const canUpdate = useUserHasListingPermission(\n listing,\n forBulkEdit,\n Permission.Inventory_UpdateListingInfo,\n Permission.Inventory_UpdateListingInfoOnIsPricerOf,\n Permission.Inventory_UpdateListingInfoOnPurchasedBy\n );\n return canUpdate;\n};\n\nexport const useUserCanSetPrice = (\n listing: Listing | null | undefined,\n forBulkEdit: boolean | undefined\n) => {\n const canSetPrice = useUserHasListingPermission(\n listing,\n forBulkEdit,\n Permission.Inventory_SetPrice,\n Permission.Inventory_SetPriceOnIsPricerOf,\n Permission.Inventory_SetPriceOnPurchasedBy\n );\n return canSetPrice;\n};\n\nexport const useUserCanUpdateListingTags = (\n listing: Listing | null | undefined,\n forBulkEdit: boolean | undefined\n) => {\n const canSetPrice = useUserHasListingPermission(\n listing,\n forBulkEdit,\n Permission.Inventory_UpdateTags,\n Permission.Inventory_UpdateTagsOnIsPricerOf,\n Permission.Inventory_UpdateTagsOnPurchasedBy\n );\n return canSetPrice;\n};\n\nexport const useUserCanBroadcast = (\n listing: Listing | null | undefined,\n forBulkEdit: boolean | undefined\n) => {\n const canSetPrice = useUserHasListingPermission(\n listing,\n forBulkEdit,\n Permission.Inventory_BroadcastUnbroadcast,\n Permission.Inventory_BroadcastUnbroadcastOnIsPricerOf,\n Permission.Inventory_BroadcastUnbroadcastOnPurchasedBy\n );\n return canSetPrice;\n};\n\nexport const useUserCanPredeliver = (\n listing: Listing | null | undefined,\n forBulkEdit: boolean | undefined\n) => {\n const canUpdate = useUserHasListingPermission(\n listing,\n forBulkEdit,\n Permission.Inventory_Predelivery,\n Permission.Inventory_PredeliveryOnIsPricerOf,\n Permission.Inventory_PredeliveryOnPurchasedBy\n );\n return canUpdate;\n};\n\nexport const useUserCanViewPredelivery = (\n listing: Listing | null | undefined,\n forBulkEdit: boolean | undefined\n) => {\n // It is assumed if you can fulfill - then you can view fulfillment artifacts\n const canPredeliver = useUserCanPredeliver(listing, forBulkEdit);\n\n const canView = useUserHasListingPermission(\n listing,\n forBulkEdit,\n Permission.Inventory_ViewFulfillmentArtifacts,\n Permission.Inventory_ViewFulfillmentArtifactsOnIsPricerOf,\n Permission.Inventory_ViewFulfillmentArtifactsOnPurchasedBy\n );\n\n return canView || canPredeliver;\n};\n\nexport const useUserCanSetDeliveryStrategy = (\n listing: Listing | null | undefined,\n forBulkEdit: boolean | undefined\n) => {\n const canSetPrice = useUserHasListingPermission(\n listing,\n forBulkEdit,\n Permission.Inventory_UpdateDeliveryStrategy,\n Permission.Inventory_UpdateDeliveryStrategyOnIsPricerOf,\n Permission.Inventory_UpdateDeliveryStrategyOnPurchasedBy\n );\n return canSetPrice;\n};\n","import { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { useUserCanSetPrice } from 'src/hooks/useUserHasListingPermissions';\nimport { Feature, Listing } from 'src/WebApiController';\n\nexport const useHasListingPricePermissions = (\n listing?: Listing | null,\n isBulkEdit?: boolean\n) => {\n const canSetPrice = useUserCanSetPrice(listing, isBulkEdit);\n\n const hasAutoPricingFeature = useUserHasFeature(Feature.AutoPricing);\n const canAutoPrice = hasAutoPricingFeature && canSetPrice;\n\n return {\n canSetPrice,\n canAutoPrice,\n hasAutoPricingFeature,\n };\n};\n","import { isEmpty, isEqual, pickBy } from 'lodash-es';\nimport { useCallback, useEffect, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { useListingGroupPricingSettings } from 'src/hooks/api/useListingGroupPricingSettings';\nimport { useGetAccountAutoPricingSettings } from 'src/hooks/useGetAccountAutoPricingSettings';\nimport { useGetEventAutoPricingSettings } from 'src/hooks/useGetEventAutoPricingSettings';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport {\n DEFAULT_COMP_LISTING_CEIL_MORE_THAN_FLOOR,\n DEFAULT_COMP_LISTING_FLOOR,\n DEFAULT_UNDERCUT_ABSOLUTE_AMT,\n DEFAULT_UNDERCUT_RELATIVE_AMT,\n} from 'src/utils/autoPricingUtils';\nimport { getCurrentLanguage } from 'src/utils/localeUtils';\nimport { coalesceUndefinedOnly } from 'src/utils/miscUtils';\nimport {\n mapToSelectedSectionSettings,\n SelectedSectionSettingsWithOptionals,\n} from 'src/utils/types/selectedSectionSettingsWithOptionals';\nimport {\n AutoPricingCompListingMode,\n AutoPricingOutlierMode,\n AutoPricingUndercutMode,\n Feature,\n Listing,\n ListingDetailsUpdateInput,\n SectionInfo,\n} from 'src/WebApiController';\n\nimport { useHasListingPricePermissions } from './useHasListingPricePermissions';\n\n/**\n * @deprecated Use the `src/modals/ListingDetails/ListingForms/AutoPricingForm/useAutoPricingSettings.tsuseAutoPricingSettings`\n * instead.\n */\nexport const useListingAutoPricingSettings = (\n listing?: Listing | null,\n isBulkEdit?: boolean\n) => {\n const { setValue, watch, formState, clearErrors } =\n useFormContext();\n const { canSetPrice, canAutoPrice } = useHasListingPricePermissions(\n listing,\n isBulkEdit\n );\n\n const hasDefaultFilterRowsFeature = useUserHasFeature(\n Feature.DefaultFilterRows\n );\n const hasAllowSeatScoreCompListingModeFeature = useUserHasFeature(\n Feature.AllowSeatScoreCompListingMode\n );\n\n const defaultCompListingMode = useMemo(() => {\n if (hasAllowSeatScoreCompListingModeFeature) {\n return AutoPricingCompListingMode.QualityScore;\n }\n return AutoPricingCompListingMode.SameEvent;\n }, [hasAllowSeatScoreCompListingModeFeature]);\n\n const updateInput = watch();\n const {\n autoPricingEnabled,\n currencyCode,\n\n skipAutoPricing,\n skipAdvancePricing,\n skipCompListing,\n skipPriceProtection,\n skipUndercut,\n\n undercutMode,\n undercutAbsoluteAmount,\n undercutRelativeAmount,\n\n compListingMode,\n compListingCeiling,\n compListingFloor,\n compListingOnlyForSameZoneEnabled,\n compListingOnlyForSelectedSectionsEnabled,\n compListingQuantityScoreAdjustmentEnabled,\n compListingExcludeFanInventory,\n compListingQuantityScoreAdjustmentOverrideJson,\n compListingSelectedSectionSettings,\n compListingExcludeDefects,\n\n outlierMode,\n outlierStandardDeviations,\n outlierKthLowestLimit,\n outlierKthLowestLimitAbsoluteSpacing,\n outlierKthLowestLimitRelativeSpacing,\n\n netProceedsFloor,\n\n circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerMaxDiscountVelocityTicksInHours,\n circuitBreakerMinCompListingCount,\n circuitBreakerRelativeCeiling,\n circuitBreakerRelativeFloor,\n\n listPrice: unitNetProceeds,\n } = updateInput;\n\n const { loginContext } = useAppContext();\n\n const { getUiCurrency } = useLocalizationContext();\n\n const uiCurrency = useMemo(\n () =>\n getUiCurrency(\n listing?.currency ?? loginContext?.user?.activeAccount?.currencyCode\n ),\n [\n getUiCurrency,\n listing?.currency,\n loginContext?.user?.activeAccount?.currencyCode,\n ]\n );\n const currencyNumberFormat = useMemo(\n () =>\n new Intl.NumberFormat(getCurrentLanguage(), {\n style: 'currency',\n currency: uiCurrency.code,\n }),\n [uiCurrency.code]\n );\n\n useEffect(() => {\n // Setting this null so it will use the originalListing.Currency (for bulk-edit)\n if (isBulkEdit && currencyCode != null) {\n setValue('currencyCode', null);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isBulkEdit]);\n\n const { event } = useEventMapContext();\n const { pricingSettings: groupPricingSettings } =\n useListingGroupPricingSettings(listing?.ltGrpId, event);\n const { pricingSettings: eventPricingSettings } =\n useGetEventAutoPricingSettings(event!, false);\n const { pricingSettings: accountPricingSettings } =\n useGetAccountAutoPricingSettings();\n\n const onResetSettings = useCallback(() => {\n setValue('undercutMode', null);\n setValue('undercutAbsoluteAmount', null);\n setValue('undercutRelativeAmount', null);\n\n setValue('compListingMode', null);\n setValue('compListingFloor', null);\n setValue('compListingCeiling', null);\n setValue('compListingSelectedSectionSettings', null);\n setValue('compListingQuantityScoreAdjustmentOverrideJson', null);\n setValue('compListingOnlyForSameZoneEnabled', null);\n setValue('compListingOnlyForSelectedSectionsEnabled', null);\n }, [setValue]);\n\n const onResetAdvanceSettings = useCallback(() => {\n setValue('compListingQuantityScoreAdjustmentEnabled', null);\n setValue('compListingExcludeFanInventory', null);\n setValue('compListingExcludeDefects', null);\n\n setValue('circuitBreakerRelativeCeiling', null);\n setValue('circuitBreakerRelativeFloor', null);\n setValue('circuitBreakerMaxDiscountVelocityPercent', null);\n setValue('circuitBreakerMaxDiscountVelocityTicksInHours', null);\n setValue('circuitBreakerMinCompListingCount', null);\n\n setValue('outlierMode', null);\n setValue('outlierStandardDeviations', null);\n setValue('outlierKthLowestLimit', null);\n setValue('outlierKthLowestLimitRelativeSpacing', null);\n setValue('outlierKthLowestLimitAbsoluteSpacing', null);\n }, [setValue]);\n\n const circuitBreakerSettings = useMemo(() => {\n if (\n circuitBreakerMaxDiscountVelocityPercent != null ||\n circuitBreakerMaxDiscountVelocityTicksInHours != null ||\n circuitBreakerMinCompListingCount != null ||\n circuitBreakerRelativeCeiling != null ||\n circuitBreakerRelativeFloor != null\n ) {\n // if it has any of these set - use the entire area\n return {\n circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerMaxDiscountVelocityTicksInHours,\n circuitBreakerMinCompListingCount,\n circuitBreakerRelativeCeiling,\n circuitBreakerRelativeFloor,\n };\n }\n\n if (\n groupPricingSettings?.circuitBreakerMaxDiscountVelocityPercent != null ||\n groupPricingSettings?.circuitBreakerMaxDiscountVelocityTicksInHours !=\n null ||\n groupPricingSettings?.circuitBreakerMinCompListingCount != null ||\n groupPricingSettings?.circuitBreakerRelativeCeiling != null ||\n groupPricingSettings?.circuitBreakerRelativeFloor != null\n ) {\n // if it has any of these set - use the entire area\n return {\n circuitBreakerMaxDiscountVelocityPercent:\n groupPricingSettings?.circuitBreakerMaxDiscountVelocityPercent ??\n null,\n circuitBreakerMaxDiscountVelocityTicksInHours:\n groupPricingSettings?.circuitBreakerMaxDiscountVelocityTicksInHours ??\n null,\n circuitBreakerMinCompListingCount:\n groupPricingSettings?.circuitBreakerMinCompListingCount ?? null,\n circuitBreakerRelativeCeiling:\n groupPricingSettings?.circuitBreakerRelativeCeiling ?? null,\n circuitBreakerRelativeFloor:\n groupPricingSettings?.circuitBreakerRelativeFloor ?? null,\n };\n }\n\n if (\n eventPricingSettings?.circuitBreakerMaxDiscountVelocityPercent != null ||\n eventPricingSettings?.circuitBreakerMaxDiscountVelocityTicksInHours !=\n null ||\n eventPricingSettings?.circuitBreakerMinCompListingCount != null ||\n eventPricingSettings?.circuitBreakerRelativeCeiling != null ||\n eventPricingSettings?.circuitBreakerRelativeFloor != null\n ) {\n // if it has any of these set - use the entire area\n return {\n circuitBreakerMaxDiscountVelocityPercent:\n eventPricingSettings?.circuitBreakerMaxDiscountVelocityPercent ??\n null,\n circuitBreakerMaxDiscountVelocityTicksInHours:\n eventPricingSettings?.circuitBreakerMaxDiscountVelocityTicksInHours ??\n null,\n circuitBreakerMinCompListingCount:\n eventPricingSettings?.circuitBreakerMinCompListingCount ?? null,\n circuitBreakerRelativeCeiling:\n eventPricingSettings?.circuitBreakerRelativeCeiling ?? null,\n circuitBreakerRelativeFloor:\n eventPricingSettings?.circuitBreakerRelativeFloor ?? null,\n };\n }\n\n // if it has any of these set - use the entire area\n return {\n circuitBreakerMaxDiscountVelocityPercent:\n accountPricingSettings?.circuitBreakerMaxDiscountVelocityPercent ??\n null,\n circuitBreakerMaxDiscountVelocityTicksInHours:\n accountPricingSettings?.circuitBreakerMaxDiscountVelocityTicksInHours ??\n null,\n circuitBreakerMinCompListingCount:\n accountPricingSettings?.circuitBreakerMinCompListingCount ?? null,\n circuitBreakerRelativeCeiling:\n accountPricingSettings?.circuitBreakerRelativeCeiling ?? null,\n circuitBreakerRelativeFloor:\n accountPricingSettings?.circuitBreakerRelativeFloor ?? null,\n };\n }, [\n accountPricingSettings?.circuitBreakerMaxDiscountVelocityPercent,\n accountPricingSettings?.circuitBreakerMaxDiscountVelocityTicksInHours,\n accountPricingSettings?.circuitBreakerMinCompListingCount,\n accountPricingSettings?.circuitBreakerRelativeCeiling,\n accountPricingSettings?.circuitBreakerRelativeFloor,\n circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerMaxDiscountVelocityTicksInHours,\n circuitBreakerMinCompListingCount,\n circuitBreakerRelativeCeiling,\n circuitBreakerRelativeFloor,\n eventPricingSettings?.circuitBreakerMaxDiscountVelocityPercent,\n eventPricingSettings?.circuitBreakerMaxDiscountVelocityTicksInHours,\n eventPricingSettings?.circuitBreakerMinCompListingCount,\n eventPricingSettings?.circuitBreakerRelativeCeiling,\n eventPricingSettings?.circuitBreakerRelativeFloor,\n groupPricingSettings?.circuitBreakerMaxDiscountVelocityPercent,\n groupPricingSettings?.circuitBreakerMaxDiscountVelocityTicksInHours,\n groupPricingSettings?.circuitBreakerMinCompListingCount,\n groupPricingSettings?.circuitBreakerRelativeCeiling,\n groupPricingSettings?.circuitBreakerRelativeFloor,\n ]);\n\n const undercutSettings = useMemo(() => {\n if (\n undercutMode != null ||\n undercutAbsoluteAmount != null ||\n undercutRelativeAmount != null\n ) {\n // if it has any of these set - use the entire area\n return {\n undercutMode,\n undercutAbsoluteAmount,\n undercutRelativeAmount,\n };\n }\n\n if (\n groupPricingSettings?.undercutMode != null ||\n groupPricingSettings?.undercutAbsoluteAmount != null ||\n groupPricingSettings?.undercutRelativeAmount != null\n ) {\n // if it has any of these set - use the entire area\n return {\n undercutMode: groupPricingSettings?.undercutMode ?? null,\n undercutAbsoluteAmount:\n groupPricingSettings?.undercutAbsoluteAmount ?? null,\n undercutRelativeAmount:\n groupPricingSettings?.undercutRelativeAmount ?? null,\n };\n }\n\n if (\n eventPricingSettings?.undercutMode != null ||\n eventPricingSettings?.undercutAbsoluteAmount != null ||\n eventPricingSettings?.undercutRelativeAmount != null\n ) {\n // if it has any of these set - use the entire area\n return {\n undercutMode: eventPricingSettings?.undercutMode ?? null,\n undercutAbsoluteAmount:\n eventPricingSettings?.undercutAbsoluteAmount ?? null,\n undercutRelativeAmount:\n eventPricingSettings?.undercutRelativeAmount ?? null,\n };\n }\n\n // if it has any of these set - use the entire area\n return {\n undercutMode:\n accountPricingSettings?.undercutMode ?? AutoPricingUndercutMode.Simple,\n undercutAbsoluteAmount:\n accountPricingSettings?.undercutAbsoluteAmount ??\n DEFAULT_UNDERCUT_ABSOLUTE_AMT,\n undercutRelativeAmount:\n accountPricingSettings?.undercutRelativeAmount ??\n DEFAULT_UNDERCUT_RELATIVE_AMT,\n };\n }, [\n accountPricingSettings?.undercutAbsoluteAmount,\n accountPricingSettings?.undercutMode,\n accountPricingSettings?.undercutRelativeAmount,\n eventPricingSettings?.undercutAbsoluteAmount,\n eventPricingSettings?.undercutMode,\n eventPricingSettings?.undercutRelativeAmount,\n groupPricingSettings?.undercutAbsoluteAmount,\n groupPricingSettings?.undercutMode,\n groupPricingSettings?.undercutRelativeAmount,\n undercutAbsoluteAmount,\n undercutMode,\n undercutRelativeAmount,\n ]);\n\n const compListingSettings = useMemo(() => {\n if (\n compListingMode != null ||\n compListingFloor != null ||\n compListingCeiling != null ||\n compListingOnlyForSameZoneEnabled != null ||\n compListingOnlyForSelectedSectionsEnabled != null ||\n compListingExcludeFanInventory != null ||\n compListingExcludeDefects != null ||\n compListingSelectedSectionSettings != null ||\n compListingQuantityScoreAdjustmentEnabled != null ||\n compListingQuantityScoreAdjustmentOverrideJson != null\n ) {\n // if it has any of these set - use the entire area\n return {\n compListingMode,\n compListingFloor: compListingFloor ?? DEFAULT_COMP_LISTING_FLOOR,\n compListingCeiling:\n compListingCeiling ??\n (compListingFloor ?? DEFAULT_COMP_LISTING_FLOOR) +\n DEFAULT_COMP_LISTING_CEIL_MORE_THAN_FLOOR,\n compListingOnlyForSameZoneEnabled,\n compListingOnlyForSelectedSectionsEnabled,\n compListingExcludeFanInventory,\n compListingExcludeDefects,\n compListingSelectedSectionSettings,\n compListingQuantityScoreAdjustmentEnabled,\n compListingQuantityScoreAdjustmentOverrideJson,\n };\n }\n\n if (\n groupPricingSettings?.compListingMode != null ||\n groupPricingSettings?.compListingFloor != null ||\n groupPricingSettings?.compListingCeiling != null ||\n groupPricingSettings?.compListingOnlyForSameZoneEnabled != null ||\n groupPricingSettings?.compListingOnlyForSelectedSectionsEnabled != null ||\n groupPricingSettings?.compListingExcludeFanInventory != null ||\n groupPricingSettings?.compListingExcludeDefects != null ||\n groupPricingSettings?.compListingQuantityScoreAdjustmentEnabled != null ||\n groupPricingSettings?.compListingQuantityScoreAdjustmentOverrideJson !=\n null ||\n groupPricingSettings?.compListingSelectedSectionSettings != null\n ) {\n // if it has any of these set - use the entire area\n return {\n compListingMode: groupPricingSettings?.compListingMode ?? null,\n compListingFloor:\n groupPricingSettings?.compListingFloor ?? DEFAULT_COMP_LISTING_FLOOR,\n compListingCeiling:\n groupPricingSettings?.compListingCeiling ??\n (groupPricingSettings?.compListingFloor ??\n DEFAULT_COMP_LISTING_FLOOR) +\n DEFAULT_COMP_LISTING_CEIL_MORE_THAN_FLOOR,\n compListingOnlyForSameZoneEnabled:\n groupPricingSettings?.compListingOnlyForSameZoneEnabled ?? null,\n compListingOnlyForSelectedSectionsEnabled:\n groupPricingSettings?.compListingOnlyForSelectedSectionsEnabled ??\n null,\n compListingQuantityScoreAdjustmentEnabled:\n groupPricingSettings?.compListingQuantityScoreAdjustmentEnabled ??\n null,\n compListingExcludeFanInventory:\n groupPricingSettings?.compListingExcludeFanInventory ?? null,\n compListingExcludeDefects:\n groupPricingSettings?.compListingExcludeDefects ?? null,\n compListingQuantityScoreAdjustmentOverrideJson:\n groupPricingSettings?.compListingQuantityScoreAdjustmentOverrideJson ??\n null,\n compListingSelectedSectionSettings:\n groupPricingSettings?.compListingSelectedSectionSettings ?? null,\n };\n }\n\n if (\n eventPricingSettings?.compListingMode != null ||\n eventPricingSettings?.compListingFloor != null ||\n eventPricingSettings?.compListingCeiling != null ||\n eventPricingSettings?.compListingOnlyForSameZoneEnabled != null ||\n eventPricingSettings?.compListingOnlyForSelectedSectionsEnabled != null ||\n eventPricingSettings?.compListingExcludeFanInventory != null ||\n eventPricingSettings?.compListingExcludeDefects != null ||\n eventPricingSettings?.compListingQuantityScoreAdjustmentEnabled != null ||\n eventPricingSettings?.compListingQuantityScoreAdjustmentOverrideJson !=\n null ||\n eventPricingSettings?.compListingSelectedSectionSettings != null\n ) {\n // if it has any of these set - use the entire area\n return {\n compListingMode: eventPricingSettings?.compListingMode ?? null,\n compListingFloor:\n eventPricingSettings?.compListingFloor ?? DEFAULT_COMP_LISTING_FLOOR,\n compListingCeiling:\n eventPricingSettings?.compListingCeiling ??\n (eventPricingSettings?.compListingFloor ??\n DEFAULT_COMP_LISTING_FLOOR) +\n DEFAULT_COMP_LISTING_CEIL_MORE_THAN_FLOOR,\n compListingOnlyForSameZoneEnabled:\n eventPricingSettings?.compListingOnlyForSameZoneEnabled ?? null,\n compListingOnlyForSelectedSectionsEnabled:\n eventPricingSettings?.compListingOnlyForSelectedSectionsEnabled ??\n null,\n compListingQuantityScoreAdjustmentEnabled:\n eventPricingSettings?.compListingQuantityScoreAdjustmentEnabled ??\n null,\n compListingExcludeFanInventory:\n eventPricingSettings?.compListingExcludeFanInventory ?? null,\n compListingExcludeDefects:\n eventPricingSettings?.compListingExcludeDefects ?? null,\n compListingQuantityScoreAdjustmentOverrideJson:\n eventPricingSettings?.compListingQuantityScoreAdjustmentOverrideJson ??\n null,\n compListingSelectedSectionSettings:\n eventPricingSettings?.compListingSelectedSectionSettings ?? null,\n };\n }\n\n // if it has any of these set - use the entire area\n return {\n compListingMode:\n accountPricingSettings?.compListingMode ?? defaultCompListingMode,\n compListingFloor:\n accountPricingSettings?.compListingFloor ?? DEFAULT_COMP_LISTING_FLOOR,\n compListingCeiling:\n accountPricingSettings?.compListingCeiling ??\n (accountPricingSettings?.compListingFloor ??\n DEFAULT_COMP_LISTING_FLOOR) +\n DEFAULT_COMP_LISTING_CEIL_MORE_THAN_FLOOR,\n compListingOnlyForSameZoneEnabled:\n accountPricingSettings?.compListingOnlyForSameZoneEnabled ?? null,\n compListingOnlyForSelectedSectionsEnabled:\n accountPricingSettings?.compListingOnlyForSelectedSectionsEnabled ??\n null,\n compListingQuantityScoreAdjustmentEnabled:\n accountPricingSettings?.compListingQuantityScoreAdjustmentEnabled ??\n null,\n compListingExcludeFanInventory:\n accountPricingSettings?.compListingExcludeFanInventory ?? null,\n compListingExcludeDefects:\n accountPricingSettings?.compListingExcludeDefects ?? null,\n compListingQuantityScoreAdjustmentOverrideJson:\n accountPricingSettings?.compListingQuantityScoreAdjustmentOverrideJson ??\n null,\n compListingSelectedSectionSettings:\n accountPricingSettings?.compListingSelectedSectionSettings ?? null,\n };\n }, [\n compListingMode,\n compListingFloor,\n compListingCeiling,\n compListingOnlyForSameZoneEnabled,\n compListingOnlyForSelectedSectionsEnabled,\n compListingExcludeFanInventory,\n compListingExcludeDefects,\n compListingSelectedSectionSettings,\n compListingQuantityScoreAdjustmentEnabled,\n compListingQuantityScoreAdjustmentOverrideJson,\n groupPricingSettings?.compListingMode,\n groupPricingSettings?.compListingFloor,\n groupPricingSettings?.compListingCeiling,\n groupPricingSettings?.compListingOnlyForSameZoneEnabled,\n groupPricingSettings?.compListingOnlyForSelectedSectionsEnabled,\n groupPricingSettings?.compListingExcludeFanInventory,\n groupPricingSettings?.compListingExcludeDefects,\n groupPricingSettings?.compListingQuantityScoreAdjustmentEnabled,\n groupPricingSettings?.compListingQuantityScoreAdjustmentOverrideJson,\n groupPricingSettings?.compListingSelectedSectionSettings,\n eventPricingSettings?.compListingMode,\n eventPricingSettings?.compListingFloor,\n eventPricingSettings?.compListingCeiling,\n eventPricingSettings?.compListingOnlyForSameZoneEnabled,\n eventPricingSettings?.compListingOnlyForSelectedSectionsEnabled,\n eventPricingSettings?.compListingExcludeFanInventory,\n eventPricingSettings?.compListingExcludeDefects,\n eventPricingSettings?.compListingQuantityScoreAdjustmentEnabled,\n eventPricingSettings?.compListingQuantityScoreAdjustmentOverrideJson,\n eventPricingSettings?.compListingSelectedSectionSettings,\n accountPricingSettings?.compListingMode,\n accountPricingSettings?.compListingFloor,\n accountPricingSettings?.compListingCeiling,\n accountPricingSettings?.compListingOnlyForSameZoneEnabled,\n accountPricingSettings?.compListingOnlyForSelectedSectionsEnabled,\n accountPricingSettings?.compListingQuantityScoreAdjustmentEnabled,\n accountPricingSettings?.compListingExcludeFanInventory,\n accountPricingSettings?.compListingExcludeDefects,\n accountPricingSettings?.compListingQuantityScoreAdjustmentOverrideJson,\n accountPricingSettings?.compListingSelectedSectionSettings,\n defaultCompListingMode,\n ]);\n\n const outlierSettings = useMemo(() => {\n if (\n outlierMode != null ||\n outlierStandardDeviations != null ||\n outlierKthLowestLimit != null\n ) {\n // if it has any of these set - use the entire area\n return {\n outlierMode,\n outlierStandardDeviations,\n outlierKthLowestLimit,\n outlierKthLowestLimitRelativeSpacing,\n outlierKthLowestLimitAbsoluteSpacing,\n };\n }\n\n if (\n groupPricingSettings?.outlierMode != null ||\n groupPricingSettings?.outlierStandardDeviations != null\n // TODO - add rest of settings here\n ) {\n // if it has any of these set - use the entire area\n return {\n outlierMode: groupPricingSettings?.outlierMode ?? null,\n outlierStandardDeviations:\n groupPricingSettings?.outlierStandardDeviations ?? null,\n };\n }\n\n if (\n eventPricingSettings?.outlierMode != null ||\n eventPricingSettings?.outlierStandardDeviations != null\n // TODO - add rest of settings here\n ) {\n // if it has any of these set - use the entire area\n return {\n outlierMode: eventPricingSettings?.outlierMode ?? null,\n outlierStandardDeviations:\n eventPricingSettings?.outlierStandardDeviations ?? null,\n };\n }\n\n // if it has any of these set - use the entire area\n return {\n outlierMode: accountPricingSettings?.outlierMode ?? null,\n outlierStandardDeviations:\n accountPricingSettings?.outlierStandardDeviations ?? null,\n // TODO - add rest of settings here\n };\n }, [\n accountPricingSettings?.outlierMode,\n accountPricingSettings?.outlierStandardDeviations,\n eventPricingSettings?.outlierMode,\n eventPricingSettings?.outlierStandardDeviations,\n groupPricingSettings?.outlierMode,\n groupPricingSettings?.outlierStandardDeviations,\n outlierKthLowestLimit,\n outlierKthLowestLimitAbsoluteSpacing,\n outlierKthLowestLimitRelativeSpacing,\n outlierMode,\n outlierStandardDeviations,\n ]);\n\n const onUndercutChange = useCallback(\n (\n undercutModeNew?: AutoPricingUndercutMode | null,\n undercutAbsoluteAmountNew?: number | null,\n undercutRelativeAmountNew?: number | null\n ) => {\n if (\n undercutModeNew !== undefined ||\n undercutAbsoluteAmountNew !== undefined ||\n undercutRelativeAmountNew !== undefined\n ) {\n setValue(\n 'undercutMode',\n coalesceUndefinedOnly(undercutModeNew, undercutSettings.undercutMode)!\n );\n setValue(\n 'undercutAbsoluteAmount',\n coalesceUndefinedOnly(\n undercutAbsoluteAmountNew,\n undercutSettings.undercutAbsoluteAmount\n )!\n );\n setValue(\n 'undercutRelativeAmount',\n coalesceUndefinedOnly(\n undercutRelativeAmountNew,\n undercutSettings.undercutRelativeAmount\n )!\n );\n }\n },\n [\n setValue,\n undercutSettings.undercutAbsoluteAmount,\n undercutSettings.undercutMode,\n undercutSettings.undercutRelativeAmount,\n ]\n );\n\n const onCompListingChange = useCallback(\n (input: {\n compListingModeNew?: AutoPricingCompListingMode | null;\n compListingFloorNew?: number | null;\n compListingCeilingNew?: number | null;\n compListingOnlyForSameZoneEnabledNew?: boolean | null;\n compListingOnlyForSelectedSectionsEnabledNew?: boolean | null;\n compListingQuantityScoreAdjustmentEnabledNew?: boolean | null;\n compListingExcludeFanInventoryNew?: boolean | null;\n compListingExcludeDefectsNew?: boolean | null;\n compListingQuantityScoreAdjustmentOverrideJsonNew?: string | null;\n compListingSelectedSectionSettingsNew?: SelectedSectionSettingsWithOptionals | null;\n }) => {\n const {\n compListingModeNew,\n compListingFloorNew,\n compListingCeilingNew,\n compListingOnlyForSameZoneEnabledNew,\n compListingOnlyForSelectedSectionsEnabledNew,\n compListingQuantityScoreAdjustmentEnabledNew,\n compListingExcludeFanInventoryNew,\n compListingExcludeDefectsNew,\n compListingQuantityScoreAdjustmentOverrideJsonNew,\n compListingSelectedSectionSettingsNew,\n } = input;\n\n if (\n compListingModeNew !== undefined ||\n compListingFloorNew !== undefined ||\n compListingCeilingNew !== undefined ||\n compListingOnlyForSameZoneEnabledNew !== undefined ||\n compListingOnlyForSelectedSectionsEnabledNew !== undefined ||\n compListingQuantityScoreAdjustmentEnabledNew !== undefined ||\n compListingExcludeFanInventoryNew !== undefined ||\n compListingExcludeDefectsNew !== undefined ||\n compListingQuantityScoreAdjustmentOverrideJsonNew !== undefined ||\n compListingSelectedSectionSettingsNew !== undefined\n ) {\n const sanitizedCompListingOnlyForSameZoneEnabledNew =\n compListingOnlyForSelectedSectionsEnabledNew\n ? false\n : compListingOnlyForSameZoneEnabledNew;\n const sanitizedCompListingOnlyForSelectedSectionsEnabledNew =\n compListingOnlyForSameZoneEnabledNew\n ? false\n : compListingOnlyForSelectedSectionsEnabledNew;\n\n setValue(\n 'compListingMode',\n coalesceUndefinedOnly(\n compListingModeNew,\n compListingSettings.compListingMode\n )!\n );\n setValue(\n 'compListingFloor',\n coalesceUndefinedOnly(\n compListingFloorNew,\n compListingSettings.compListingFloor\n )!\n );\n setValue(\n 'compListingCeiling',\n coalesceUndefinedOnly(\n compListingCeilingNew,\n compListingSettings.compListingCeiling\n )!\n );\n setValue(\n 'compListingOnlyForSameZoneEnabled',\n coalesceUndefinedOnly(\n sanitizedCompListingOnlyForSameZoneEnabledNew,\n compListingSettings.compListingOnlyForSameZoneEnabled\n )!\n );\n setValue(\n 'compListingOnlyForSelectedSectionsEnabled',\n coalesceUndefinedOnly(\n sanitizedCompListingOnlyForSelectedSectionsEnabledNew,\n compListingSettings.compListingOnlyForSelectedSectionsEnabled\n )!\n );\n setValue(\n 'compListingQuantityScoreAdjustmentEnabled',\n coalesceUndefinedOnly(\n compListingQuantityScoreAdjustmentEnabledNew,\n compListingSettings.compListingQuantityScoreAdjustmentEnabled\n )!\n );\n setValue(\n 'compListingExcludeFanInventory',\n coalesceUndefinedOnly(\n compListingExcludeFanInventoryNew,\n compListingSettings.compListingExcludeFanInventory\n )!\n );\n setValue(\n 'compListingExcludeDefects',\n coalesceUndefinedOnly(\n compListingExcludeDefectsNew,\n compListingSettings.compListingExcludeDefects\n )!\n );\n setValue(\n 'compListingQuantityScoreAdjustmentOverrideJson',\n coalesceUndefinedOnly(\n compListingQuantityScoreAdjustmentOverrideJsonNew,\n compListingSettings.compListingQuantityScoreAdjustmentOverrideJson\n )!\n );\n setValue(\n 'compListingSelectedSectionSettings',\n coalesceUndefinedOnly(\n mapToSelectedSectionSettings(compListingSelectedSectionSettingsNew),\n compListingSettings.compListingSelectedSectionSettings\n )!\n );\n }\n },\n [\n compListingSettings.compListingCeiling,\n compListingSettings.compListingFloor,\n compListingSettings.compListingMode,\n compListingSettings.compListingOnlyForSameZoneEnabled,\n compListingSettings.compListingOnlyForSelectedSectionsEnabled,\n compListingSettings.compListingQuantityScoreAdjustmentEnabled,\n compListingSettings.compListingExcludeFanInventory,\n compListingSettings.compListingExcludeDefects,\n compListingSettings.compListingQuantityScoreAdjustmentOverrideJson,\n compListingSettings.compListingSelectedSectionSettings,\n setValue,\n ]\n );\n\n const onCircuitBreakerChange = useCallback(\n (\n circuitBreakerRelativeCeilingNew?: number | null,\n circuitBreakerRelativeFloorNew?: number | null,\n circuitBreakerMaxDiscountVelocityPercentNew?: number | null,\n circuitBreakerMaxDiscountVelocityTicksInHoursNew?: number | null,\n circuitBreakerMinCompListingCountNew?: number | null\n ) => {\n if (\n circuitBreakerRelativeCeilingNew !== undefined ||\n circuitBreakerRelativeFloorNew !== undefined ||\n circuitBreakerMaxDiscountVelocityPercentNew !== undefined ||\n circuitBreakerMaxDiscountVelocityTicksInHoursNew !== undefined ||\n circuitBreakerMinCompListingCountNew !== undefined\n ) {\n setValue(\n 'circuitBreakerRelativeCeiling',\n coalesceUndefinedOnly(\n circuitBreakerRelativeCeilingNew,\n circuitBreakerSettings.circuitBreakerRelativeCeiling\n ) ?? null\n );\n setValue(\n 'circuitBreakerRelativeFloor',\n coalesceUndefinedOnly(\n circuitBreakerRelativeFloorNew,\n circuitBreakerSettings.circuitBreakerRelativeFloor\n ) ?? null\n );\n setValue(\n 'circuitBreakerMaxDiscountVelocityPercent',\n coalesceUndefinedOnly(\n circuitBreakerMaxDiscountVelocityPercentNew,\n circuitBreakerSettings.circuitBreakerMaxDiscountVelocityPercent\n ) ?? null\n );\n setValue(\n 'circuitBreakerMaxDiscountVelocityTicksInHours',\n coalesceUndefinedOnly(\n circuitBreakerMaxDiscountVelocityTicksInHoursNew,\n circuitBreakerSettings.circuitBreakerMaxDiscountVelocityTicksInHours\n ) ?? null\n );\n setValue(\n 'circuitBreakerMinCompListingCount',\n coalesceUndefinedOnly(\n circuitBreakerMinCompListingCountNew,\n circuitBreakerSettings.circuitBreakerMinCompListingCount\n ) ?? null\n );\n }\n },\n [\n circuitBreakerSettings.circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerSettings.circuitBreakerMaxDiscountVelocityTicksInHours,\n circuitBreakerSettings.circuitBreakerMinCompListingCount,\n circuitBreakerSettings.circuitBreakerRelativeCeiling,\n circuitBreakerSettings.circuitBreakerRelativeFloor,\n setValue,\n ]\n );\n\n const onOutlierChange = useCallback(\n (input: {\n outlierModeNew?: AutoPricingOutlierMode | null;\n outlierStandardDeviationsNew?: number | null;\n outlierKthLowestLimitNew?: number | null;\n outlierKthLowestLimitRelativeSpacingNew?: number | null;\n outlierKthLowestLimitAbsoluteSpacingNew?: number | null;\n }) => {\n const {\n outlierModeNew,\n outlierStandardDeviationsNew,\n outlierKthLowestLimitNew,\n outlierKthLowestLimitRelativeSpacingNew,\n outlierKthLowestLimitAbsoluteSpacingNew,\n } = input;\n\n // Covers both null and undefined cases\n if (outlierModeNew !== undefined) {\n setValue(\n 'outlierMode',\n coalesceUndefinedOnly(outlierModeNew, outlierSettings.outlierMode) ??\n null\n );\n\n switch (outlierModeNew) {\n case AutoPricingOutlierMode.StandardDeviations:\n setValue(\n 'outlierStandardDeviations',\n coalesceUndefinedOnly(\n outlierStandardDeviationsNew,\n outlierSettings.outlierStandardDeviations\n ) ?? null\n );\n setValue('outlierKthLowestLimit', null);\n setValue('outlierKthLowestLimitRelativeSpacing', null);\n setValue('outlierKthLowestLimitAbsoluteSpacing', null);\n break;\n case AutoPricingOutlierMode.KthLowest:\n setValue('outlierStandardDeviations', null);\n setValue(\n 'outlierKthLowestLimit',\n coalesceUndefinedOnly(\n outlierKthLowestLimitNew,\n outlierSettings.outlierKthLowestLimit\n ) ?? null\n );\n\n setValue(\n 'outlierKthLowestLimitRelativeSpacing',\n coalesceUndefinedOnly(\n outlierKthLowestLimitRelativeSpacingNew,\n outlierSettings.outlierKthLowestLimitRelativeSpacing\n ) ?? null\n );\n\n setValue(\n 'outlierKthLowestLimitAbsoluteSpacing',\n coalesceUndefinedOnly(\n outlierKthLowestLimitAbsoluteSpacingNew,\n outlierSettings.outlierKthLowestLimitAbsoluteSpacing\n ) ?? null\n );\n break;\n case AutoPricingOutlierMode.SkipLogic:\n setValue('outlierStandardDeviations', null);\n setValue('outlierKthLowestLimit', null);\n setValue('outlierKthLowestLimitRelativeSpacing', null);\n setValue('outlierKthLowestLimitAbsoluteSpacing', null);\n }\n } else {\n setValue('outlierMode', null);\n setValue('outlierStandardDeviations', null);\n setValue('outlierKthLowestLimit', null);\n setValue('outlierKthLowestLimitRelativeSpacing', null);\n setValue('outlierKthLowestLimitAbsoluteSpacing', null);\n }\n },\n [\n outlierSettings.outlierKthLowestLimit,\n outlierSettings.outlierKthLowestLimitAbsoluteSpacing,\n outlierSettings.outlierKthLowestLimitRelativeSpacing,\n outlierSettings.outlierMode,\n outlierSettings.outlierStandardDeviations,\n setValue,\n ]\n );\n\n const setAutoPricingDefaults = useCallback(() => {\n if (!netProceedsFloor) {\n const proposedFloor = unitNetProceeds\n ? // If we have a non-zero list-price, we want the min of listprice or unitCost\n Math.min(\n unitNetProceeds,\n listing?.unitCst?.amt ??\n listing?.faceValue?.amt ??\n Number.MAX_SAFE_INTEGER\n )\n : // Else just use the unitCost\n (listing?.unitCst?.amt ?? listing?.faceValue?.amt ?? null);\n\n setValue('netProceedsFloor', proposedFloor);\n }\n\n // If this or any higher level don't have, set the default\n if (\n !undercutMode &&\n !eventPricingSettings?.undercutMode &&\n !accountPricingSettings?.undercutMode\n ) {\n setValue('undercutMode', undercutMode);\n setValue('undercutAbsoluteAmount', undercutAbsoluteAmount);\n setValue('undercutRelativeAmount', undercutRelativeAmount);\n }\n\n // If this or any higher level don't have, set the default\n if (\n !compListingMode &&\n !eventPricingSettings?.compListingMode &&\n !accountPricingSettings?.compListingMode\n ) {\n setValue('compListingMode', compListingMode);\n setValue('compListingFloor', compListingFloor);\n setValue('compListingCeiling', compListingCeiling);\n }\n }, [\n accountPricingSettings?.compListingMode,\n accountPricingSettings?.undercutMode,\n compListingCeiling,\n compListingFloor,\n compListingMode,\n eventPricingSettings?.compListingMode,\n eventPricingSettings?.undercutMode,\n listing?.faceValue?.amt,\n listing?.unitCst?.amt,\n netProceedsFloor,\n setValue,\n undercutAbsoluteAmount,\n undercutMode,\n undercutRelativeAmount,\n unitNetProceeds,\n ]);\n\n const applySectionRowFilterCompListingChanges = useCallback(\n (\n newSectionIdFilter: number[],\n sections: SectionInfo[],\n compListingSelectedSectionSettingsNew?:\n | SelectedSectionSettingsWithOptionals\n | null\n | undefined\n ) => {\n // If sectionIdFilter is empty, we should disable the compListingOnlyForSelectedSectionsEnabled\n // and revert back to QualitScore mode. When users add section filters, we should enable\n // compListingOnlyForSelectedSectionsEnabled and put the mode to SameEvent only on when the first\n // section is added. If the user swaps the comp mode after the first section we don't want to keep\n // forcing them back into SameEvent mode.\n if (newSectionIdFilter.length === 0 && sections.length > 0) {\n onCompListingChange({\n compListingSelectedSectionSettingsNew,\n compListingModeNew: defaultCompListingMode,\n compListingOnlyForSelectedSectionsEnabledNew: false,\n });\n } else {\n if (newSectionIdFilter.length === 1 && sections.length === 0) {\n onCompListingChange({\n compListingSelectedSectionSettingsNew,\n compListingModeNew: AutoPricingCompListingMode.SameEvent,\n compListingOnlyForSelectedSectionsEnabledNew: true,\n });\n\n return;\n }\n\n // Otherwise, just update the section filters and ensure the selectedSections flag is true\n onCompListingChange({\n compListingSelectedSectionSettingsNew,\n compListingOnlyForSelectedSectionsEnabledNew: true,\n });\n }\n },\n [defaultCompListingMode, onCompListingChange]\n );\n\n const onCompListingSectionIdFilterChange = useCallback(\n (\n sectionId: number,\n selectedSections: SectionInfo[],\n section?: SectionInfo,\n listing?: Listing\n ) => {\n let newSectionIdFilter =\n compListingSelectedSectionSettings?.sectionIdFilter ?? [];\n\n let newRowIdFilter =\n compListingSelectedSectionSettings?.rowIdFilter ?? [];\n\n let newSectionRowIdFilter =\n compListingSelectedSectionSettings?.sectionRowIdFilter ?? {};\n\n if (newSectionIdFilter.includes(sectionId)) {\n newSectionIdFilter = newSectionIdFilter.filter(\n (id) => id !== sectionId\n );\n\n // Remove all the associated row ids for this section\n const section = selectedSections.find((s) => s.id === sectionId);\n if (section) {\n const rowIds = section.rows.map((r) => r.id);\n newRowIdFilter = newRowIdFilter.filter((id) => !rowIds.includes(id));\n }\n\n // Remove the sectionRow mapping so we don't display it in pills\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { [sectionId]: omitted, ...updatedSectionRowIdFilter } =\n compListingSelectedSectionSettings?.sectionRowIdFilter ?? {};\n\n newSectionRowIdFilter = updatedSectionRowIdFilter;\n } else {\n newSectionIdFilter.push(sectionId);\n\n // If a section is present, add all the rows associated with the newly selected section\n if (\n hasDefaultFilterRowsFeature &&\n listing &&\n section &&\n listing.seating?.row\n ) {\n const { seating: listingSeating } = listing;\n const listingRow = listingSeating.row!;\n\n const matchingRow = section.rows.find(\n ({ id, name }) =>\n id === listingSeating.rowId ||\n name?.toLowerCase() === listingRow.toLowerCase()\n );\n\n if (matchingRow) {\n // Remove all the row filters associated with the section id\n const sectionRowIds = section.rows.map((r) => r.id);\n newRowIdFilter = [\n ...newRowIdFilter.filter(\n (rowId) => !sectionRowIds.includes(rowId)\n ),\n ];\n\n // Exclude all rows from section if the matching row has no ordinal\n if (matchingRow.ordinal == null) {\n newSectionRowIdFilter[section.id] = matchingRow.id.toString();\n return;\n }\n\n // Push all the row ids with an ordinal less than or equal to the matching row\n section.rows.forEach((row) => {\n if (row.ordinal == null || matchingRow.ordinal == null) return;\n if (row.ordinal <= matchingRow.ordinal) {\n newRowIdFilter.push(row.id);\n }\n });\n\n // Only store the highest ordinal row id to display in the pill\n newSectionRowIdFilter[section.id] = matchingRow.id.toString();\n }\n } else if (section) {\n // If listing or seating info is not present, add all the section rows as a filter\n const newRowIds = section.rows.map((r) => r.id);\n newRowIds.forEach((newRowId) => {\n if (!newRowIdFilter.includes(newRowId)) {\n newRowIdFilter.push(newRowId);\n }\n });\n }\n }\n\n const compListingSelectedSectionSettingsNew = {\n ...compListingSelectedSectionSettings,\n sectionIdFilter: newSectionIdFilter,\n rowIdFilter: newRowIdFilter,\n sectionRowIdFilter: newSectionRowIdFilter,\n };\n\n applySectionRowFilterCompListingChanges(\n newSectionIdFilter,\n selectedSections,\n compListingSelectedSectionSettingsNew\n );\n },\n [\n applySectionRowFilterCompListingChanges,\n compListingSelectedSectionSettings,\n hasDefaultFilterRowsFeature,\n ]\n );\n\n const onCompListingSectionZoneChange = useCallback(\n (sections: SectionInfo[], flipOnSameSections = true) => {\n let newSectionIdFilter =\n compListingSelectedSectionSettings?.sectionIdFilter ?? [];\n\n let newRowIdFilter =\n compListingSelectedSectionSettings?.rowIdFilter ?? [];\n\n const newSectionRowIdFilter =\n compListingSelectedSectionSettings?.sectionRowIdFilter ?? {};\n\n // If every section passed in already exists in prevSections then we should remove them entirely\n const completelyOverlap = sections.every((section) =>\n newSectionIdFilter.includes(section.id)\n );\n\n if (completelyOverlap && flipOnSameSections) {\n const sectionIdsToRemove = new Set(\n sections.map((section) => section.id)\n );\n\n newSectionIdFilter = newSectionIdFilter.filter(\n (id) => !sectionIdsToRemove.has(id)\n );\n\n // Remove all associated rows as well\n const rowIdsToRemove = sections\n .map((section) => section.rows.map((r) => r.id))\n .flat();\n\n const rowIdsToRemoveSet = new Set(rowIdsToRemove);\n\n newRowIdFilter = newRowIdFilter.filter(\n (rowId) => !rowIdsToRemoveSet.has(rowId)\n );\n\n // Update sectionRowIdFilters to remove the sections that have been removed\n sections.forEach((section) => {\n if (section.id in newSectionRowIdFilter) {\n delete newSectionRowIdFilter[section.id];\n }\n });\n } else {\n // Upsert of the new sections\n sections.forEach((section) => {\n if (section.id in newSectionRowIdFilter) {\n return;\n }\n\n newSectionIdFilter.push(section.id);\n if (hasDefaultFilterRowsFeature && listing && listing.seating?.row) {\n const { seating: listingSeating } = listing;\n const listingRow = listingSeating.row!;\n\n const matchingRow = section.rows.find(\n ({ id, name }) =>\n id === listingSeating.rowId ||\n name?.toLowerCase() === listingRow.toLowerCase()\n );\n\n if (matchingRow) {\n // Remove all the row filters associated with the section id\n const sectionRowIds = section.rows.map((r) => r.id);\n newRowIdFilter = [\n ...newRowIdFilter.filter(\n (rowId) => !sectionRowIds.includes(rowId)\n ),\n ];\n\n // Exclude all rows from section if the matching row has no ordinal\n if (matchingRow.ordinal == null) {\n newSectionRowIdFilter[section.id] = matchingRow.id.toString();\n return;\n }\n\n // Push all the row ids with an ordinal less than or equal to the matching row\n section.rows.forEach((row) => {\n if (row.ordinal == null || matchingRow.ordinal == null) return;\n if (row.ordinal <= matchingRow.ordinal) {\n newRowIdFilter.push(row.id);\n }\n });\n\n // Only store the highest ordinal row id to display in the pill\n newSectionRowIdFilter[section.id] = matchingRow.id.toString();\n }\n } else {\n // If listing or seating info is not present, add all the section rows as a filter\n const newRowIds = section.rows.map((r) => r.id);\n newRowIds.forEach((newRowId) => {\n if (!newRowIdFilter.includes(newRowId)) {\n newRowIdFilter.push(newRowId);\n }\n });\n }\n });\n }\n\n const compListingSelectedSectionSettingsNew = {\n ...compListingSelectedSectionSettings,\n sectionIdFilter: newSectionIdFilter,\n rowIdFilter: newRowIdFilter,\n sectionRowIdFilter: newSectionRowIdFilter,\n };\n\n applySectionRowFilterCompListingChanges(\n newSectionIdFilter,\n sections,\n compListingSelectedSectionSettingsNew\n );\n },\n [\n applySectionRowFilterCompListingChanges,\n compListingSelectedSectionSettings,\n hasDefaultFilterRowsFeature,\n listing,\n ]\n );\n\n const hasChanges = useCallback(\n (listingForm: ListingDetailsUpdateInput) => {\n // Make sure we only send back the settable props\n if (\n formState.defaultValues?.autoPricingEnabled !==\n listingForm.autoPricingEnabled ||\n formState.defaultValues?.netProceedsFloor !==\n listingForm.netProceedsFloor ||\n formState.defaultValues?.compListingMode !==\n listingForm.compListingMode ||\n formState.defaultValues?.compListingFloor !==\n listingForm.compListingFloor ||\n formState.defaultValues?.compListingCeiling !==\n listingForm.compListingCeiling ||\n formState.defaultValues?.compListingQuantityScoreAdjustmentEnabled !==\n listingForm.compListingQuantityScoreAdjustmentEnabled ||\n formState.defaultValues\n ?.compListingQuantityScoreAdjustmentOverrideJson !==\n listingForm.compListingQuantityScoreAdjustmentOverrideJson ||\n formState.defaultValues?.compListingOnlyForSameZoneEnabled !==\n listingForm.compListingOnlyForSameZoneEnabled ||\n formState.defaultValues?.compListingOnlyForSelectedSectionsEnabled !==\n listingForm.compListingOnlyForSelectedSectionsEnabled ||\n formState.defaultValues?.compListingExcludeFanInventory !==\n listingForm.compListingExcludeFanInventory ||\n formState.defaultValues?.compListingExcludeDefects !==\n listingForm.compListingExcludeDefects ||\n !isEqual(\n formState.defaultValues?.compListingSelectedSectionSettings,\n listingForm?.compListingSelectedSectionSettings\n ) ||\n formState.defaultValues?.undercutMode !== listingForm.undercutMode ||\n formState.defaultValues?.undercutAbsoluteAmount !==\n listingForm.undercutAbsoluteAmount ||\n formState.defaultValues?.undercutRelativeAmount !==\n listingForm.undercutRelativeAmount ||\n formState.defaultValues?.circuitBreakerMaxDiscountVelocityPercent !==\n listingForm.circuitBreakerMaxDiscountVelocityPercent ||\n formState.defaultValues\n ?.circuitBreakerMaxDiscountVelocityTicksInHours !==\n listingForm.circuitBreakerMaxDiscountVelocityTicksInHours ||\n formState.defaultValues?.circuitBreakerMinCompListingCount !==\n listingForm.circuitBreakerMinCompListingCount ||\n formState.defaultValues?.circuitBreakerRelativeCeiling !==\n listingForm.circuitBreakerRelativeCeiling ||\n formState.defaultValues?.circuitBreakerRelativeFloor !==\n listingForm.circuitBreakerRelativeFloor ||\n formState.defaultValues?.outlierMode !== listingForm.outlierMode ||\n formState.defaultValues?.outlierStandardDeviations !==\n listingForm.outlierStandardDeviations ||\n formState.defaultValues?.outlierKthLowestLimit !==\n listingForm.outlierKthLowestLimit ||\n formState.defaultValues?.outlierKthLowestLimitRelativeSpacing !==\n listingForm.outlierKthLowestLimitRelativeSpacing ||\n formState.defaultValues?.outlierKthLowestLimitAbsoluteSpacing !==\n listingForm.outlierKthLowestLimitAbsoluteSpacing\n ) {\n return true;\n }\n },\n [\n formState.defaultValues?.autoPricingEnabled,\n formState.defaultValues?.netProceedsFloor,\n formState.defaultValues?.compListingMode,\n formState.defaultValues?.compListingFloor,\n formState.defaultValues?.compListingCeiling,\n formState.defaultValues?.compListingQuantityScoreAdjustmentEnabled,\n formState.defaultValues?.compListingQuantityScoreAdjustmentOverrideJson,\n formState.defaultValues?.compListingOnlyForSameZoneEnabled,\n formState.defaultValues?.compListingOnlyForSelectedSectionsEnabled,\n formState.defaultValues?.compListingExcludeFanInventory,\n formState.defaultValues?.compListingExcludeDefects,\n formState.defaultValues?.compListingSelectedSectionSettings,\n formState.defaultValues?.undercutMode,\n formState.defaultValues?.undercutAbsoluteAmount,\n formState.defaultValues?.undercutRelativeAmount,\n formState.defaultValues?.circuitBreakerMaxDiscountVelocityPercent,\n formState.defaultValues?.circuitBreakerMaxDiscountVelocityTicksInHours,\n formState.defaultValues?.circuitBreakerMinCompListingCount,\n formState.defaultValues?.circuitBreakerRelativeCeiling,\n formState.defaultValues?.circuitBreakerRelativeFloor,\n formState.defaultValues?.outlierMode,\n formState.defaultValues?.outlierStandardDeviations,\n formState.defaultValues?.outlierKthLowestLimit,\n formState.defaultValues?.outlierKthLowestLimitRelativeSpacing,\n formState.defaultValues?.outlierKthLowestLimitAbsoluteSpacing,\n ]\n );\n\n const onCompListingModeChange = useCallback(\n (mode: AutoPricingCompListingMode | null) => {\n clearErrors('compListingFloor');\n\n if (!mode) {\n onCompListingChange({\n compListingModeNew: null,\n compListingFloorNew: null,\n compListingCeilingNew: null,\n });\n return;\n }\n\n onCompListingChange({\n compListingModeNew: mode,\n // Reset flag on mode change\n compListingOnlyForSameZoneEnabledNew: false,\n compListingOnlyForSelectedSectionsEnabledNew: false,\n });\n\n if (mode === AutoPricingCompListingMode.ParentListing) {\n onUndercutChange(AutoPricingUndercutMode.Simple);\n }\n },\n [clearErrors, onCompListingChange, onUndercutChange]\n );\n\n const onSelectedSectionsChange = useCallback(\n (selectedSections: SectionInfo[]) => {\n // Restructure the id filters.\n const sectionIdFilter = selectedSections.map((s) => s.id);\n const selectedRowIds = selectedSections\n .flatMap(({ rows }) => rows)\n .map(({ id }) => id);\n const rowIdFilter = [];\n if (isEmpty(compListingSelectedSectionSettings?.rowIdFilter)) {\n rowIdFilter.push(...selectedRowIds);\n } else {\n rowIdFilter.push(\n ...(compListingSelectedSectionSettings?.rowIdFilter?.filter((rowId) =>\n selectedRowIds.includes(rowId)\n ) ?? [])\n );\n }\n const sectionRowIdFilter = pickBy(\n Object.assign(\n {},\n compListingSelectedSectionSettings?.sectionRowIdFilter ?? {}\n ),\n (_, key) => sectionIdFilter.includes(parseInt(key))\n );\n const compListingSelectedSectionSettingsNew = {\n ...compListingSelectedSectionSettings,\n sectionIdFilter,\n rowIdFilter,\n sectionRowIdFilter,\n };\n onCompListingChange({\n compListingOnlyForSameZoneEnabledNew: false,\n compListingOnlyForSelectedSectionsEnabledNew: true,\n compListingSelectedSectionSettingsNew,\n });\n },\n [compListingSelectedSectionSettings, onCompListingChange]\n );\n\n return {\n canSetPrice,\n canAutoPrice,\n uiCurrency,\n currencyNumberFormat,\n showAutoPricingSettings: !(listing?.isDeleted || !canSetPrice),\n\n autoPricingEnabled,\n onResetSettings,\n onResetAdvanceSettings,\n setAutoPricingDefaults,\n eventPricingSettings,\n accountPricingSettings,\n event,\n\n ...circuitBreakerSettings,\n ...compListingSettings,\n ...undercutSettings,\n ...outlierSettings,\n\n onUndercutChange,\n onCompListingChange,\n onCircuitBreakerChange,\n onOutlierChange,\n onCompListingSectionIdFilterChange,\n onCompListingSectionZoneChange,\n onCompListingModeChange,\n onSelectedSectionsChange,\n\n skipAdvancePricing,\n skipAutoPricing,\n skipCompListing,\n skipPriceProtection,\n skipUndercut,\n hasChanges,\n };\n};\n","import { FormEvent, useCallback } from 'react';\nimport { UpDownComboButton } from 'src/core/ui';\nimport { SectionInfo } from 'src/WebApiController';\n\nexport type SectionFilterRowNudgerProps = {\n disabled?: boolean;\n selectedSections: SectionInfo[];\n rowIdFilters?: number[];\n sectionRowIdFilters?: { [key: string]: string };\n isCondensedView?: boolean;\n applyRowFilterChanges: (\n rowIdFiltersNew: number[],\n sectionRowIdFiltersNew: {\n [key: string]: string;\n }\n ) => void;\n};\nexport const SectionFilterRowNudger = ({\n disabled,\n selectedSections,\n rowIdFilters,\n sectionRowIdFilters,\n isCondensedView,\n applyRowFilterChanges,\n}: SectionFilterRowNudgerProps) => {\n const handleNudgeRow = useCallback(\n (isUp: boolean) => {\n let newRowIdFilters = [...(rowIdFilters ?? [])];\n const newSectionRowIdFilters = { ...(sectionRowIdFilters ?? {}) };\n\n let hasChanged = false;\n\n // for each section row id filters...\n Object.entries(newSectionRowIdFilters).map(([sectionId, rowId]) => {\n const sid = Number(sectionId);\n const rid = Number(rowId);\n\n const section = selectedSections.find((s) => s.id === sid);\n\n if (section) {\n const row = section.rows.find((r) => r.id === rid);\n if (row && row.ordinal != null) {\n const nextOrdinal = isUp ? row.ordinal + 1 : row.ordinal - 1;\n\n if (nextOrdinal >= 0) {\n // We purposely not checking for nextOrdinal < section.rows.length in case the ordinal is not 0 or 1 base\n // it's more robust to just find the row matching the next ordinal at this point\n\n // try to find the next row\n const nextRow = section.rows.find(\n (r) => r.ordinal === nextOrdinal\n );\n\n if (nextRow) {\n // Great, we found it, updating the rowIdFilters and sectionRowIdFilters\n\n if (isUp) {\n // we only need to add nextrow id if we're going up\n newRowIdFilters.push(nextRow.id);\n } else {\n // we only need to remove row ids if we're going down\n newRowIdFilters = newRowIdFilters.filter(\n (rid) => rid != row.id\n );\n }\n\n newSectionRowIdFilters[sectionId] = nextRow.id.toString();\n\n hasChanged = true;\n }\n }\n }\n }\n });\n\n if (hasChanged) {\n applyRowFilterChanges(newRowIdFilters, newSectionRowIdFilters);\n }\n },\n [applyRowFilterChanges, rowIdFilters, sectionRowIdFilters, selectedSections]\n );\n\n const handleNudgeUp = useCallback(\n (e: FormEvent) => {\n e.preventDefault();\n e.stopPropagation();\n handleNudgeRow(true);\n },\n [handleNudgeRow]\n );\n\n const handleNudgeDown = useCallback(\n (e: FormEvent) => {\n e.preventDefault();\n e.stopPropagation();\n handleNudgeRow(false);\n },\n [handleNudgeRow]\n );\n\n return (\n \n );\n};\n","import { useMemo } from 'react';\nimport { FilterPillList } from 'src/components/common/FilterPill/FilterPillList';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { Stack } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { useListingAutoPricingSettings } from 'src/modals/ListingDetails/components/useListingAutoPricingSettings';\nimport { Feature, Listing } from 'src/WebApiController';\n\nimport { SectionFilterRowNudger } from './SectionFilterRowNudger';\n\nexport const AutoPricingSectionRowIdFilter = ({\n listing,\n disabled,\n}: {\n listing?: Listing | null;\n disabled?: boolean;\n}) => {\n const { venueMapInfo } = useEventMapContext();\n const hasSimplifiedPricingV2Feature = useUserHasFeature(\n Feature.SimplifiedAutoPricingUiV2\n );\n\n const {\n onCompListingChange,\n onCompListingSectionIdFilterChange,\n compListingSelectedSectionSettings,\n } = useListingAutoPricingSettings(listing);\n\n const selectedSections = useMemo(() => {\n const formSectionFilterIds =\n compListingSelectedSectionSettings?.sectionIdFilter ?? [];\n return (\n venueMapInfo?.sections.filter((section) => {\n return formSectionFilterIds.includes(section.id);\n }) ?? []\n );\n }, [\n compListingSelectedSectionSettings?.sectionIdFilter,\n venueMapInfo?.sections,\n ]);\n\n const rowIdFilters = useMemo(() => {\n return compListingSelectedSectionSettings?.rowIdFilter ?? [];\n }, [compListingSelectedSectionSettings]);\n\n const sectionRowIdFilters = useMemo(() => {\n return compListingSelectedSectionSettings?.sectionRowIdFilter ?? {};\n }, [compListingSelectedSectionSettings]);\n\n const applyCompListingChanges = (\n rowIdFilters: number[],\n sectionRowIdFilters: { [x: string]: string }\n ) => {\n const compListingSelectedSectionSettingsNew = {\n ...compListingSelectedSectionSettings,\n sectionIdFilter:\n compListingSelectedSectionSettings?.sectionIdFilter ?? [],\n rowIdFilter: Array.from(new Set(rowIdFilters)),\n sectionRowIdFilter: sectionRowIdFilters,\n };\n\n onCompListingChange({\n compListingSelectedSectionSettingsNew,\n compListingOnlyForSelectedSectionsEnabledNew: true,\n });\n };\n\n return (\n \n \n {hasSimplifiedPricingV2Feature &&\n !!Object.entries(sectionRowIdFilters).length && (\n \n )}\n \n );\n};\n","import { head, uniqBy } from 'lodash-es';\nimport { useCallback, useMemo } from 'react';\nimport { AutoPricingSectionRowIdFilter } from 'src/components/AutoPricing/components/AutoPricingSectionRowIdFilter';\nimport { EventVenueMap } from 'src/components/Events/VenueMap/EventVenueMap';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { shared, vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { getSectionInfoDisplay } from 'src/utils/autoPricingUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { filterSectionByZone } from 'src/utils/venueConfigUtils';\nimport { ListingDetails, SectionInfo } from 'src/WebApiController';\n\nexport type SectionSelectorProps = {\n sectionIds: number[];\n disabledSectionIds?: number[];\n onSelectedSectionsChange: (selectedSections: SectionInfo[]) => void;\n};\n\nexport const SectionSelector = ({\n sectionIds,\n disabledSectionIds,\n onSelectedSectionsChange,\n}: SectionSelectorProps) => {\n const { venueMapInfo } = useEventMapContext();\n const { posEntity: listing } = useActivePosEntityContext();\n\n const selectedSections = useMemo(() => {\n if (venueMapInfo) {\n return venueMapInfo.sections\n .filter((section) => sectionIds.includes(section.id))\n .toSorted((a, b) => a.name.localeCompare(b.name));\n }\n return [];\n }, [sectionIds, venueMapInfo]);\n\n const selectedSectionIds = useMemo(() => {\n return selectedSections.map((s) => s.id);\n }, [selectedSections]);\n\n const getColor = useCallback(\n (info: {\n sectionId: number;\n rowId?: number;\n sectionName?: string;\n ticketClassId: number;\n isSelected: boolean;\n }) => {\n const isSectionDisabled = disabledSectionIds?.includes(info.sectionId);\n return {\n stroke: isSectionDisabled\n ? vars.color.backgroundDisabled\n : vars.color.textBrand,\n fill: isSectionDisabled\n ? vars.color.backgroundDisabled\n : info.isSelected\n ? vars.color.backgroundBrandSeatmap\n : vars.color.backgroundPrimary,\n textColor: isSectionDisabled\n ? vars.color.textDisabled\n : vars.color.textStrong,\n };\n },\n [disabledSectionIds]\n );\n\n const onSectionHovered = useCallback(\n (hoveredSection: SectionInfo) => {\n if (disabledSectionIds?.includes(hoveredSection.id)) {\n return null;\n }\n\n return getSectionInfoDisplay(\n hoveredSection,\n [],\n venueMapInfo?.sectionScores\n );\n },\n [disabledSectionIds, venueMapInfo?.sectionScores]\n );\n\n const onShiftSelect = useCallback(\n (section: SectionInfo) => {\n // We are using the ticketClassId to group the sections\n const selectedClassId = head(\n section?.rows\n ?.map(({ tktClass: ticketClass }) => ticketClass?.id)\n .filter((id) => !!id)\n );\n const classSections =\n venueMapInfo?.sections?.filter(filterSectionByZone(selectedClassId)) ||\n [];\n\n const classSectionIds = classSections.map(({ id }) => id);\n if (selectedSections.findIndex(({ id }) => id === section.id) > -1) {\n const updated = selectedSections.filter(\n ({ id }) => !classSectionIds.includes(id)\n );\n onSelectedSectionsChange(updated);\n } else {\n const updated = uniqBy(\n selectedSections.concat(classSections),\n 'id'\n ).toSorted((a, b) => a.name.localeCompare(b.name));\n onSelectedSectionsChange(updated);\n }\n },\n [onSelectedSectionsChange, selectedSections, venueMapInfo?.sections]\n );\n\n const onSingleSelect = useCallback(\n (section: SectionInfo) => {\n if (disabledSectionIds?.includes(section.id)) {\n return;\n }\n\n const idx = selectedSections.findIndex(({ id }) => id === section.id);\n\n const selectedSectionsNew =\n idx === -1\n ? [...selectedSections, section]\n : selectedSections.filter(({ id }) => id !== section.id);\n onSelectedSectionsChange(\n selectedSectionsNew.toSorted((a, b) => a.name.localeCompare(b.name))\n );\n },\n [disabledSectionIds, onSelectedSectionsChange, selectedSections]\n );\n\n const onSectionSelected = useCallback(\n (e: MouseEvent, section: SectionInfo) => {\n e.preventDefault();\n e.stopPropagation();\n if (e.shiftKey) {\n onShiftSelect(section);\n return;\n }\n onSingleSelect(section);\n },\n [onSingleSelect, onShiftSelect]\n );\n\n const onToggleMirrors = useCallback(\n (mirrors: SectionInfo[], exclude?: boolean) => {\n if (exclude) {\n const idsToExclude = mirrors.map(({ id }) => id);\n const updated = uniqBy(\n selectedSections.filter(({ id }) => !idsToExclude.includes(id)),\n 'id'\n ).toSorted((a, b) => a.name.localeCompare(b.name));\n onSelectedSectionsChange(updated);\n } else {\n const updated = uniqBy(selectedSections.concat(mirrors), 'id').toSorted(\n (a, b) => a.name.localeCompare(b.name)\n );\n onSelectedSectionsChange(updated);\n }\n },\n [onSelectedSectionsChange, selectedSections]\n );\n\n return (\n <>\n \n \n \n
    \n \n
    \n\n \n \n \n \n \n \n \n );\n};\n","/* eslint-disable react-hooks/exhaustive-deps */\nimport { ComponentProps, useEffect, useMemo } from 'react';\nimport { useList } from 'react-use';\nimport { Modal as RSModal } from 'reactstrap';\nimport { CancelButton } from 'src/components/Buttons';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { Button, Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SectionInfo } from 'src/WebApiController';\n\nimport * as styles from './SectionSelectDialog.css';\nimport { SectionSelector } from './SectionSelector';\n\nexport type SectionSelectDialogProps = ComponentProps & {\n initialSectionIds: number[];\n disabledSectionIds?: number[];\n onSave: (selectedSections: SectionInfo[]) => void;\n};\n\nexport const SectionSelectDialog = ({\n initialSectionIds,\n disabledSectionIds,\n onSave,\n onClosed,\n ...rest\n}: SectionSelectDialogProps) => {\n const [selectedSections, selectedSectionsMutations] = useList();\n const { venueMapInfo } = useEventMapContext();\n\n useEffect(() => {\n if (venueMapInfo?.sections) {\n const initialSections = venueMapInfo.sections.filter((section) =>\n initialSectionIds.includes(section.id)\n );\n selectedSectionsMutations.set(initialSections);\n }\n }, [\n JSON.stringify(initialSectionIds),\n JSON.stringify(venueMapInfo?.sections),\n ]);\n\n const selectedSectionIds = useMemo(() => {\n return selectedSections.map((s) => s.id);\n }, [selectedSections]);\n\n return (\n }\n footer={\n \n {selectedSections.length > 0 ? (\n selectedSectionsMutations.clear()}\n >\n \n \n ) : (\n \n )}\n \n {onClosed && }\n onSave(selectedSections)}\n >\n \n \n \n \n }\n onCancel={onClosed}\n >\n
    \n \n
    \n \n );\n};\n","import { useCallback, useMemo } from 'react';\nimport { getCompQuantitiesOptions } from 'src/utils/inventoryUtils';\nimport {\n AutoPricingCompListingMode,\n SelectedSectionSettings,\n} from 'src/WebApiController';\n\nexport const useCompQuantitiesFilter = (\n compQuantityScoreOverrideJson: string | null | undefined,\n onCompListingChange: (input: {\n compListingModeNew?: AutoPricingCompListingMode | null;\n compListingFloorNew?: number | null;\n compListingCeilingNew?: number | null;\n compListingOnlyForSameZoneEnabledNew?: boolean | null;\n compListingOnlyForSelectedSectionsEnabledNew?: boolean | null;\n compListingQuantityScoreAdjustmentEnabledNew?: boolean | null;\n compListingExcludeFanInventoryNew?: boolean | null;\n compListingQuantityScoreAdjustmentOverrideJsonNew?: string | null;\n compListingSelectedSectionSettingsNew?: SelectedSectionSettings | null;\n }) => void\n) => {\n const parsedQuantityOverridesJson = JSON.parse(\n compQuantityScoreOverrideJson || 'null'\n );\n const quantitiesFilterOptions = useMemo(() => getCompQuantitiesOptions(), []);\n const quantitiesFilterValue = useMemo(() => {\n const quantitiesFilter = parsedQuantityOverridesJson?.quantitiesFilter;\n if (!quantitiesFilter) {\n return [];\n }\n // exactMatches and greaterThanOrEqualTo\n const { exact, gte } = quantitiesFilter;\n\n const eligibleQuantities = Object.values(quantitiesFilterOptions)\n .filter((value) => !isNaN(parseInt(value)))\n .map((value) => parseInt(value));\n const selectedQuantities = eligibleQuantities.filter((quantity) => {\n if (((exact as number[]) ?? []).includes(quantity)) {\n return true;\n }\n if (gte != null && (gte as number) <= quantity) {\n return true;\n }\n return false;\n });\n return Object.values(quantitiesFilterOptions).filter((value) =>\n selectedQuantities.includes(parseInt(value))\n );\n }, [parsedQuantityOverridesJson?.quantitiesFilter, quantitiesFilterOptions]);\n\n const onUpdateQuantitiesFilter = useCallback(\n (values: string[]) => {\n const exact = [];\n let gte = null;\n for (const value of values) {\n const quantity = parseInt(value);\n if (value.indexOf('+') > -1) {\n gte = quantity;\n } else {\n if (!isNaN(quantity)) {\n exact.push(quantity);\n }\n }\n }\n\n const quantityOverrideJsonNew = {\n ...parsedQuantityOverridesJson,\n quantitiesFilter: { exact, gte },\n };\n\n onCompListingChange({\n compListingQuantityScoreAdjustmentOverrideJsonNew: JSON.stringify(\n quantityOverrideJsonNew\n ),\n });\n },\n [onCompListingChange, parsedQuantityOverridesJson]\n );\n\n return {\n quantitiesFilterValue,\n quantitiesFilterOptions,\n onUpdateQuantitiesFilter,\n };\n};\n","import { useEffect, useState } from 'react';\nimport { UndercutPriceSettingsMode } from 'src/utils/autoPricingUtils';\n\nexport const useUndercutAmountSettings = (\n undercutAbsoluteAmount?: number | null,\n undercutRelativeAmount?: number | null\n) => {\n const [undercutAbsoluteAmountMode, setUndercutAbsoluteAmountMode] = useState<\n UndercutPriceSettingsMode | undefined\n >(undefined);\n const [undercutRelativeAmountMode, setUndercutRelativeAmountMode] = useState<\n UndercutPriceSettingsMode | undefined\n >(undefined);\n\n useEffect(() => {\n const newUAMode =\n (undercutAbsoluteAmount ?? 0) >= 0\n ? UndercutPriceSettingsMode.Discount\n : UndercutPriceSettingsMode.Premium;\n if (newUAMode !== undercutAbsoluteAmountMode) {\n setUndercutAbsoluteAmountMode(newUAMode);\n }\n\n const newRAMode =\n (undercutRelativeAmount ?? 0) >= 0\n ? UndercutPriceSettingsMode.Discount\n : UndercutPriceSettingsMode.Premium;\n if (newRAMode !== undercutRelativeAmountMode) {\n setUndercutRelativeAmountMode(newRAMode);\n }\n }, [\n undercutAbsoluteAmount,\n undercutAbsoluteAmountMode,\n undercutRelativeAmount,\n undercutRelativeAmountMode,\n ]);\n\n return {\n undercutAbsoluteAmountMode,\n setUndercutAbsoluteAmountMode,\n undercutRelativeAmountMode,\n setUndercutRelativeAmountMode,\n };\n};\n","import { ChangeEvent, useMemo } from 'react';\nimport { ButtonWithIcon } from 'src/components/Buttons';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { Switch } from 'src/core/interim/Switch';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosMultiSelect } from 'src/core/POS/PosMultiSelect';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { getTextFieldState, PosTextField } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { PillList } from 'src/core/ui/PillList';\nimport { Slider } from 'src/core/ui/Slider';\nimport { Switch as CoreSwitch } from 'src/core/ui/Switch';\nimport { ToggleGroup } from 'src/core/ui/ToggleGroup';\nimport { SectionSelectDialog } from 'src/dialogs/SectionSelectDialog';\nimport { useAvailableAutopricingModes } from 'src/hooks/useAvailableAutopricingModes';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useCompQuantitiesFilter } from 'src/hooks/useCompQuantitiesFilter';\nimport { useUndercutAmountSettings } from 'src/hooks/useUndercutAmountSettings';\nimport { DetailGroup } from 'src/modals/common';\nimport { RestrictSelectionType } from 'src/modals/ListingDetails/components/PricingSection/AutoPricingSection.types';\nimport { EditIcon, IconsFill, PlusIcon, ResetIcon } from 'src/svgs/Viagogo';\nimport {\n convertSliderValueFromServer,\n convertSliderValueToServer,\n getUndercutPriceRepresentingMode,\n SLIDER_MAX,\n SLIDER_MIN,\n UNDERCUT_PRICE_MODE_OPTIONS,\n UndercutPriceSettingsMode,\n} from 'src/utils/autoPricingUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { roundToPrecision } from 'src/utils/numberFormatter';\nimport { getCompleteEventConfigScoreOverrides } from 'src/utils/seatScoreUtils';\nimport {\n AutoPricingCompListingMode,\n AutoPricingUndercutMode,\n ListingGroup,\n} from 'src/WebApiController';\n\nimport * as styles from './SectionRowIdFilter.css';\nimport { useListingGroupAutoPricingSettings } from './useListingGroupAutoPricingSettings';\n\nexport const AutoPricingSettingsSection = ({\n listingGroup,\n disabled,\n}: {\n listingGroup?: ListingGroup;\n disabled?: boolean;\n}) => {\n const sectionSelectDialog = useBasicDialog();\n const {\n uiCurrency,\n\n onResetSettings,\n eventPricingSettings,\n accountPricingSettings,\n\n undercutMode,\n undercutAbsoluteAmount,\n undercutRelativeAmount,\n\n compListingMode,\n compListingFloor,\n compListingCeiling,\n compListingSelectedSectionSettings,\n compListingOnlyForSelectedSectionsEnabled,\n compListingOnlyForSameZoneEnabled,\n compListingQuantityScoreAdjustmentOverrideJson,\n\n compListingFloorError,\n compListingSelectedSectionError,\n undercutAbsoluteAmountError,\n undercutRelativeAmountError,\n\n onUndercutChange,\n onCompListingChange,\n\n resetListingAutoPricingSettings,\n setResetListingAutoPricingSettings,\n } = useListingGroupAutoPricingSettings(listingGroup);\n\n const {\n undercutAbsoluteAmountMode,\n setUndercutAbsoluteAmountMode,\n undercutRelativeAmountMode,\n setUndercutRelativeAmountMode,\n } = useUndercutAmountSettings(undercutAbsoluteAmount, undercutRelativeAmount);\n\n const parsedQuantityOverridesJson = JSON.parse(\n compListingQuantityScoreAdjustmentOverrideJson || 'null'\n );\n const quantityFilterValue = parsedQuantityOverridesJson?.quantityFilter;\n\n const { activeConfigOverride, venueMapInfo, venueMapsByScoreModelQuery } =\n useEventMapContext();\n\n const defaultScoreOverrides = useMemo(() => {\n // In the backend, if AVG scores are missing, then we always fallback to MVG, even if AVG is explicitly selected\n return (\n venueMapsByScoreModelQuery?.data?.AdvancedVenueGeometry?.sectionScores ??\n venueMapsByScoreModelQuery?.data?.MergedVenueGeometry?.sectionScores ??\n venueMapsByScoreModelQuery?.data?.VenueGeometry?.sectionScores\n );\n }, [\n venueMapsByScoreModelQuery?.data?.AdvancedVenueGeometry?.sectionScores,\n venueMapsByScoreModelQuery?.data?.MergedVenueGeometry?.sectionScores,\n venueMapsByScoreModelQuery?.data?.VenueGeometry?.sectionScores,\n ]);\n\n const scores = getCompleteEventConfigScoreOverrides(\n defaultScoreOverrides,\n activeConfigOverride?.scoreOverrides,\n false\n );\n\n const {\n quantitiesFilterOptions,\n quantitiesFilterValue,\n onUpdateQuantitiesFilter,\n } = useCompQuantitiesFilter(\n compListingQuantityScoreAdjustmentOverrideJson,\n onCompListingChange\n );\n\n const restrictSelection = Boolean(\n compListingOnlyForSameZoneEnabled ||\n compListingOnlyForSelectedSectionsEnabled\n );\n\n const showCompListingSettingsDetails = !(\n !compListingMode ||\n compListingMode === AutoPricingCompListingMode.SameZone ||\n compListingMode === AutoPricingCompListingMode.SameEvent ||\n compListingMode === AutoPricingCompListingMode.ParentListing\n );\n const showCompListingRestictSelectionDetails =\n compListingMode != null &&\n (compListingMode === AutoPricingCompListingMode.QualityScore ||\n compListingMode === AutoPricingCompListingMode.SameEvent ||\n compListingMode === AutoPricingCompListingMode.SameZone);\n\n const {\n compListingModes,\n compListingModesDisabled,\n undercutModes,\n undercutModesDisabled,\n restrictSelectionTypes,\n } = useAvailableAutopricingModes(\n true,\n undercutMode,\n compListingMode,\n Boolean(scores?.some((s) => s.score)),\n false,\n false,\n compListingOnlyForSelectedSectionsEnabled\n );\n\n const selectedSectionsPills = useMemo(\n () =>\n compListingSelectedSectionSettings?.sectionIdFilter\n ?.map((sectionId) => {\n const section = venueMapInfo?.sections.find(\n (section) => sectionId === section.id\n );\n return {\n value: section?.id.toString() ?? '',\n display: section?.name ?? '',\n };\n })\n .filter((info) => info.value && info.display) ?? [],\n [\n compListingSelectedSectionSettings?.sectionIdFilter,\n venueMapInfo?.sections,\n ]\n );\n\n const isDealScoreMode =\n (undercutMode ??\n eventPricingSettings?.undercutMode ??\n accountPricingSettings?.undercutMode) === AutoPricingUndercutMode.Deal;\n\n return (\n <>\n \n \n
    \n \n
    \n e.stopPropagation()}\n onCheckedChange={(isChecked) => {\n if (isChecked !== resetListingAutoPricingSettings) {\n setResetListingAutoPricingSettings(isChecked);\n }\n }}\n />\n
    \n
    \n \n \n \n \n \n
    \n \n
    \n e.stopPropagation()}\n onChange={(v) => {\n if (v) {\n onCompListingChange({\n compListingModeNew: v as AutoPricingCompListingMode,\n });\n } else {\n onCompListingChange({\n compListingModeNew: null,\n compListingFloorNew: null,\n compListingCeilingNew: null,\n });\n }\n\n if (v === AutoPricingCompListingMode.ParentListing) {\n onUndercutChange(AutoPricingUndercutMode.Simple);\n }\n }}\n />\n
    \n
    \n\n {showCompListingSettingsDetails && (\n <>\n \n \n
    \n \n
    \n \n {\n const v = parseFloat(e.target.value);\n if (!isNaN(v)) {\n if (\n v >= SLIDER_MIN * 100 &&\n v <= SLIDER_MAX * 100 &&\n convertSliderValueToServer(v) < compListingCeiling\n ) {\n onCompListingChange({\n compListingFloorNew: convertSliderValueToServer(v),\n });\n }\n }\n }}\n postfixDisplay=\"%\"\n placeholder={\n compListingMode == null\n ? eventPricingSettings?.compListingFloor?.toString() ??\n accountPricingSettings?.compListingFloor?.toString() ??\n undefined\n : undefined\n }\n />\n \n
    \n \n
    \n \n {\n const v = parseFloat(e.target.value);\n if (!isNaN(v)) {\n if (\n v >= SLIDER_MIN * 100 &&\n v <= SLIDER_MAX * 100 &&\n convertSliderValueToServer(v) > compListingFloor\n ) {\n onCompListingChange({\n compListingCeilingNew: convertSliderValueToServer(v),\n });\n }\n }\n }}\n postfixDisplay=\"%\"\n placeholder={\n compListingMode == null\n ? eventPricingSettings?.compListingCeiling?.toString() ??\n accountPricingSettings?.compListingCeiling?.toString() ??\n undefined\n : undefined\n }\n />\n \n
    \n \n
    \n
    \n
    \n \n \n (\n {roundToPrecision(val, 0)}%\n )}\n onValueChange={([floor, ceil]) => {\n onCompListingChange({\n compListingFloorNew: convertSliderValueToServer(floor),\n compListingCeilingNew: convertSliderValueToServer(ceil),\n });\n }}\n />\n
    \n \n
    \n
    \n \n \n \n )}\n \n }\n style={{ width: '100%' }}\n >\n \n \n \n\n {showCompListingRestictSelectionDetails && (\n \n }>\n ) => e.stopPropagation()}\n onChange={(e) => {\n const isChecked = e.target.checked;\n if (isChecked) {\n if (\n !compListingOnlyForSameZoneEnabled &&\n !compListingOnlyForSelectedSectionsEnabled\n ) {\n // set zone by default\n onCompListingChange({\n compListingOnlyForSameZoneEnabledNew: true,\n compListingOnlyForSelectedSectionsEnabledNew: false,\n });\n }\n } else {\n onCompListingChange({\n compListingOnlyForSameZoneEnabledNew: false,\n compListingOnlyForSelectedSectionsEnabledNew: false,\n });\n }\n }}\n />\n \n {restrictSelection && (\n \n
    \n \n
    \n e.stopPropagation()}\n onChange={(v) => {\n if (v === RestrictSelectionType.SameZone) {\n onCompListingChange({\n compListingOnlyForSameZoneEnabledNew: true,\n compListingOnlyForSelectedSectionsEnabledNew: false,\n });\n } else {\n onCompListingChange({\n compListingOnlyForSameZoneEnabledNew: false,\n compListingOnlyForSelectedSectionsEnabledNew: true,\n });\n }\n }}\n />\n
    \n )}\n {compListingOnlyForSelectedSectionsEnabled && (\n \n \n {compListingSelectedSectionSettings?.sectionIdFilter?.length ? (\n <>\n \n \n \n }\n textContentId={ContentId.EditSections}\n onClick={sectionSelectDialog.launchDialog}\n disabled={disabled}\n style={{ paddingLeft: 0, paddingRight: 0 }}\n />\n \n ) : (\n \n }\n textContentId={ContentId.SelectSections}\n onClick={sectionSelectDialog.launchDialog}\n disabled={disabled}\n style={{ padding: 0 }}\n />\n )}\n \n \n )}\n
    \n )}\n \n \n \n \n \n
    \n \n
    \n e.stopPropagation()}\n onChange={(v) => {\n if (v) {\n onUndercutChange(v as AutoPricingUndercutMode);\n } else {\n onUndercutChange(null, null, null);\n }\n }}\n />\n
    \n \n
    \n
    \n
    \n {isDealScoreMode && (\n
    \n \n
    \n )}\n \n \n {\n if (!value) return;\n\n const mode = value as UndercutPriceSettingsMode;\n setUndercutRelativeAmountMode(mode);\n\n if (undercutRelativeAmount) {\n const curAmountAbs = Math.abs(undercutRelativeAmount);\n onUndercutChange(\n undefined,\n undefined,\n getUndercutPriceRepresentingMode(curAmountAbs, mode)\n );\n }\n }}\n />\n\n
    \n \n
    \n\n \n {\n const v = parseFloat(e.target.value);\n if (v >= 0 && v <= Number.MAX_VALUE) {\n const relativeValue = Math.min(v, 100) / 100;\n if (\n undercutRelativeAmountMode ===\n UndercutPriceSettingsMode.Premium\n ) {\n onUndercutChange(undefined, undefined, -relativeValue);\n } else {\n onUndercutChange(undefined, undefined, relativeValue);\n }\n } else {\n onUndercutChange(undefined, undefined, null);\n }\n }}\n />\n \n
    \n \n
    \n {\n if (!value) return;\n\n const mode = value as UndercutPriceSettingsMode;\n setUndercutAbsoluteAmountMode(mode);\n\n if (undercutAbsoluteAmount) {\n const curAmountAbs = Math.abs(undercutAbsoluteAmount);\n onUndercutChange(\n undefined,\n getUndercutPriceRepresentingMode(curAmountAbs, mode)\n );\n }\n }}\n />\n
    \n \n
    \n \n {\n const v = parseFloat(e.target.value);\n if (v >= 0 && v <= Number.MAX_VALUE) {\n if (\n undercutAbsoluteAmountMode ===\n UndercutPriceSettingsMode.Premium\n ) {\n onUndercutChange(undefined, -v);\n } else {\n onUndercutChange(undefined, v);\n }\n } else {\n onUndercutChange(undefined, null);\n }\n }}\n />\n \n
    \n
    \n \n }\n textContentId={ContentId.ResetSettings}\n onClick={onResetSettings}\n />\n \n\n {\n const compListingSelectedSectionSettingsNew = {\n ...compListingSelectedSectionSettings,\n sectionIdFilter: selectedSections.map((s) => s.id),\n rowIdFilter: compListingSelectedSectionSettings?.rowIdFilter ?? [],\n sectionRowIdFilter:\n compListingSelectedSectionSettings?.sectionRowIdFilter ?? {},\n };\n onCompListingChange({ compListingSelectedSectionSettingsNew });\n sectionSelectDialog.closeDialog();\n }}\n onClosed={sectionSelectDialog.closeDialog}\n />\n \n );\n};\n","import { Content } from 'src/contexts/ContentContext';\nimport { Stack } from 'src/core/ui';\nimport { DetailGroup, DetailSection, SectionContent } from 'src/modals/common';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ListingGroup } from 'src/WebApiController';\n\nimport { AdvancePricingSettings } from './AdvancePricingSettings';\nimport { AutoPricingSettingsSection } from './AutoPricingSettingsSection';\nimport { useListingGroupAutoPricingSettings } from './useListingGroupAutoPricingSettings';\n\nexport const AutoPricingSettings = ({\n listingGroup,\n}: {\n listingGroup?: ListingGroup;\n}) => {\n const { canAutoPrice } = useListingGroupAutoPricingSettings(listingGroup);\n\n if (!canAutoPrice) {\n return null;\n }\n\n return (\n <>\n }>\n \n {canAutoPrice ? (\n \n ) : (\n \n \n {!canAutoPrice ? (\n \n ) : (\n \n )}\n \n \n )}\n \n \n \n \n );\n};\n","import { useCallback } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { coalesceUndefinedOnly } from 'src/utils/miscUtils';\nimport {\n AutoPricingInputs,\n AutoPricingOutlierMode,\n} from 'src/WebApiController';\n\nexport interface OnOutlierSettingsChangeArgs {\n outlierModeNew: AutoPricingOutlierMode | null;\n outlierKthLowestLimitNew?: number | null;\n outlierKthLowestLimitRelativeSpacingNew?: number | null;\n outlierKthLowestLimitAbsoluteSpacingNew?: number | null;\n outlierStandardDeviationsNew?: number | null;\n}\n\nexport const useAutoPricingSettingsFormContext = () => {\n const methods = useFormContext();\n const { setValue, watch } = methods;\n\n const {\n outlierMode,\n outlierKthLowestLimit,\n outlierKthLowestLimitRelativeSpacing,\n outlierKthLowestLimitAbsoluteSpacing,\n outlierStandardDeviations,\n } = watch();\n\n const onOutlierSettingsChange = useCallback(\n (input: OnOutlierSettingsChangeArgs) => {\n const {\n outlierModeNew,\n outlierKthLowestLimitNew,\n outlierKthLowestLimitRelativeSpacingNew,\n outlierKthLowestLimitAbsoluteSpacingNew,\n outlierStandardDeviationsNew,\n } = input;\n\n // Covers both null and undefined cases\n if (outlierModeNew !== undefined) {\n setValue(\n 'outlierMode',\n coalesceUndefinedOnly(outlierModeNew, outlierMode) ?? null\n );\n\n switch (outlierModeNew) {\n case AutoPricingOutlierMode.StandardDeviations:\n setValue(\n 'outlierStandardDeviations',\n coalesceUndefinedOnly(\n outlierStandardDeviationsNew,\n outlierStandardDeviations\n ) ?? null\n );\n setValue('outlierKthLowestLimit', null);\n setValue('outlierKthLowestLimitRelativeSpacing', null);\n setValue('outlierKthLowestLimitAbsoluteSpacing', null);\n break;\n case AutoPricingOutlierMode.KthLowest:\n setValue('outlierStandardDeviations', null);\n setValue(\n 'outlierKthLowestLimit',\n coalesceUndefinedOnly(\n outlierKthLowestLimitNew,\n outlierKthLowestLimit\n ) ?? null\n );\n\n setValue(\n 'outlierKthLowestLimitRelativeSpacing',\n coalesceUndefinedOnly(\n outlierKthLowestLimitRelativeSpacingNew,\n outlierKthLowestLimitRelativeSpacing\n ) ?? null\n );\n\n setValue(\n 'outlierKthLowestLimitAbsoluteSpacing',\n coalesceUndefinedOnly(\n outlierKthLowestLimitAbsoluteSpacingNew,\n outlierKthLowestLimitAbsoluteSpacing\n ) ?? null\n );\n break;\n case AutoPricingOutlierMode.SkipLogic:\n setValue('outlierStandardDeviations', null);\n setValue('outlierKthLowestLimit', null);\n setValue('outlierKthLowestLimitRelativeSpacing', null);\n setValue('outlierKthLowestLimitAbsoluteSpacing', null);\n }\n } else {\n setValue('outlierMode', null);\n setValue('outlierStandardDeviations', null);\n setValue('outlierKthLowestLimit', null);\n setValue('outlierKthLowestLimitRelativeSpacing', null);\n setValue('outlierKthLowestLimitAbsoluteSpacing', null);\n }\n },\n [\n setValue,\n outlierMode,\n outlierKthLowestLimit,\n outlierKthLowestLimitRelativeSpacing,\n outlierKthLowestLimitAbsoluteSpacing,\n outlierStandardDeviations,\n ]\n );\n\n return {\n ...methods,\n onOutlierSettingsChange,\n };\n};\n","import { Content } from 'src/contexts/ContentContext';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { getTextFieldState, PosTextField } from 'src/core/POS/PosTextField';\nimport { Stack } from 'src/core/ui';\nimport { Slider } from 'src/core/ui/Slider';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { roundToPrecision } from 'src/utils/numberFormatter';\n\nimport * as styles from '../AutoPricing.css';\nimport { useAutoPricingSettingsFormContext } from '../useAutoPricingSettingsFormContext';\n\nconst DEFAULT_COMP_LISTING_FLOOR = 1;\nconst DEFAULT_COMP_LISTING_CEIL_MORE_THAN_FLOOR = 5;\n\nconst SLIDER_MIN = -1;\nconst SLIDER_MAX = 5;\n\nconst convertSliderValueToServer = (val: number) =>\n roundToPrecision(val / 100 + 1, 2);\nconst convertSliderValueFromServer = (val: number) => (val - 1) * 100;\n\nexport const AutoPricingCompFloorAndCeilingInput = ({\n disabled,\n}: {\n disabled: boolean;\n}) => {\n const { setValue, watch, formState } = useAutoPricingSettingsFormContext();\n\n const {\n compListingMode,\n compListingFloor: nullableCompListingFloor,\n compListingCeiling: nullableLCompListingCeiling,\n } = watch();\n\n const compListingFloor =\n nullableCompListingFloor ?? DEFAULT_COMP_LISTING_FLOOR;\n const compListingCeiling =\n nullableLCompListingCeiling ??\n DEFAULT_COMP_LISTING_FLOOR + DEFAULT_COMP_LISTING_CEIL_MORE_THAN_FLOOR;\n\n const compListingFloorError = formState.errors.compListingFloor?.message;\n\n return (\n <>\n \n
    \n \n
    \n \n {\n const v = parseFloat(e.target.value);\n if (!isNaN(v)) {\n if (\n v >= SLIDER_MIN * 100 &&\n v <= SLIDER_MAX * 100 &&\n convertSliderValueToServer(v) < compListingCeiling\n ) {\n setValue('compListingFloor', convertSliderValueToServer(v));\n }\n }\n }}\n postfixDisplay=\"%\"\n />\n \n
    \n \n
    \n \n {\n const v = parseFloat(e.target.value);\n if (!isNaN(v)) {\n if (\n v >= SLIDER_MIN * 100 &&\n v <= SLIDER_MAX * 100 &&\n convertSliderValueToServer(v) > compListingFloor\n ) {\n setValue('compListingCeiling', convertSliderValueToServer(v));\n }\n }\n }}\n postfixDisplay=\"%\"\n />\n \n
    \n \n
    \n
    \n \n (\n {roundToPrecision(val, 0)}%\n )}\n onValueChange={([floor, ceil]) => {\n setValue('compListingFloor', convertSliderValueToServer(floor));\n setValue('compListingCeiling', convertSliderValueToServer(ceil));\n }}\n />\n
    \n \n
    \n
    \n \n \n );\n};\n","import { useCallback, useEffect, useMemo } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { COMP_LISTING_MODE_TO_FLUENT_CID } from 'src/utils/constants/contentIdMaps';\nimport { AutoPricingCompListingMode } from 'src/WebApiController';\n\nimport { useAutoPricingSettingsFormContext } from '../useAutoPricingSettingsFormContext';\n\nexport const AutoPricingCompListingModeSelector = ({\n allowSeatScoreCompListingMode,\n disabled,\n hideWhenOnlyComparableZonesModeIsAvailable,\n setIsOnlyComparableZonesModeAvailable,\n}: {\n allowSeatScoreCompListingMode: boolean;\n disabled: boolean;\n hideWhenOnlyComparableZonesModeIsAvailable?: boolean;\n setIsOnlyComparableZonesModeAvailable?: (valueNew: boolean) => void;\n}) => {\n const { formState, setValue, watch } = useAutoPricingSettingsFormContext();\n\n const initialCompListingMode = formState.defaultValues?.compListingMode;\n\n const { compListingMode } = watch();\n\n const { valueOptionsContent, valueOptionsDisabled } = useMemo(() => {\n const compListingModes: Record = {\n [AutoPricingCompListingMode.SameEvent]: ContentId.InComparableZones,\n };\n if (allowSeatScoreCompListingMode) {\n compListingModes[AutoPricingCompListingMode.QualityScore] =\n COMP_LISTING_MODE_TO_FLUENT_CID[\n AutoPricingCompListingMode.QualityScore\n ];\n }\n\n let compListingModesDisabled: Record | undefined =\n undefined;\n if (initialCompListingMode && !compListingModes[initialCompListingMode]) {\n const initialModeContentId =\n COMP_LISTING_MODE_TO_FLUENT_CID[initialCompListingMode];\n compListingModesDisabled = {\n [initialCompListingMode]: initialModeContentId,\n };\n compListingModes[initialCompListingMode] = initialModeContentId;\n }\n\n return {\n valueOptionsContent: compListingModes,\n valueOptionsDisabled: compListingModesDisabled,\n };\n }, [allowSeatScoreCompListingMode, initialCompListingMode]);\n\n const onCompListingModeChange = useCallback(\n (compListingModeNew: AutoPricingCompListingMode) => {\n setValue('compListingMode', compListingModeNew);\n\n if (compListingModeNew == AutoPricingCompListingMode.SameEvent) {\n setValue('compListingOnlyForSameZoneEnabled', false);\n setValue('compListingOnlyForSelectedSectionsEnabled', true);\n }\n },\n [setValue]\n );\n\n useEffect(() => {\n if (!compListingMode) {\n onCompListingModeChange(AutoPricingCompListingMode.SameEvent);\n }\n }, [compListingMode, onCompListingModeChange]);\n\n const useSelector =\n Object.keys(valueOptionsContent).length > 1 || valueOptionsDisabled;\n\n useEffect(() => {\n setIsOnlyComparableZonesModeAvailable?.(!useSelector);\n }, [setIsOnlyComparableZonesModeAvailable, useSelector]);\n\n return useSelector ? (\n e.stopPropagation()}\n onChange={(v) => onCompListingModeChange(v as AutoPricingCompListingMode)}\n />\n ) : (\n !hideWhenOnlyComparableZonesModeIsAvailable && (\n \n )\n );\n};\n","import { CSSProperties, useCallback, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { PosMultiSelect } from 'src/core/POS/PosMultiSelect';\nimport { AutoPricingInputs, CompListingQuantity } from 'src/WebApiController';\n\nconst quantitiesOptions = [\n '1',\n '2',\n '3',\n '4',\n '5',\n '6',\n '7',\n '8',\n '9',\n '10+',\n].reduce(\n (r, c) => {\n r[c] = c;\n return r;\n },\n {} as Record\n);\n\nexport const AutoPricingCompQuantitiesSelector = ({\n disabled,\n rootStyle,\n}: {\n disabled: boolean;\n rootStyle?: CSSProperties;\n}) => {\n const { setValue, watch } = useFormContext();\n\n const {\n compListingQuantityFilters,\n compListingQuantityScoreAdjustmentOverrideJson,\n } = watch();\n\n const parsedQuantityOverridesJson = useMemo(() => {\n return compListingQuantityScoreAdjustmentOverrideJson != null\n ? JSON.parse(compListingQuantityScoreAdjustmentOverrideJson)\n : null;\n }, [compListingQuantityScoreAdjustmentOverrideJson]);\n\n const derivedCompListingQuantityFilters =\n useMemo((): CompListingQuantity | null => {\n if (compListingQuantityFilters != null) {\n return compListingQuantityFilters;\n }\n\n if (parsedQuantityOverridesJson == null) {\n return null;\n }\n\n const { exact, gte } =\n parsedQuantityOverridesJson?.quantitiesFilter ?? {};\n return {\n exactQuantities: exact ?? [],\n greaterThanOrEqualToQuantity: gte,\n };\n }, [compListingQuantityFilters, parsedQuantityOverridesJson]);\n\n const selectedQuantitiesValues = useMemo(() => {\n if (!derivedCompListingQuantityFilters) {\n return [];\n }\n\n const { exactQuantities: exact, greaterThanOrEqualToQuantity: gte } =\n derivedCompListingQuantityFilters;\n\n const eligibleQuantities = Object.values(quantitiesOptions)\n .filter((value) => !isNaN(parseInt(value)))\n .map((value) => parseInt(value));\n const selectedQuantitiesInts = eligibleQuantities.filter((quantity) => {\n if (((exact as number[]) ?? []).includes(quantity)) {\n return true;\n }\n if (gte != null && (gte as number) <= quantity) {\n return true;\n }\n return false;\n });\n return Object.values(quantitiesOptions).filter((value) =>\n selectedQuantitiesInts.includes(parseInt(value))\n );\n }, [derivedCompListingQuantityFilters]);\n\n const handleOnChange = useCallback(\n (values: string[]) => {\n const exact = [];\n let gte: number | null = null;\n for (const value of values) {\n const quantity = parseInt(value);\n if (value.indexOf('+') > -1) {\n gte = quantity;\n } else {\n if (!isNaN(quantity)) {\n exact.push(quantity);\n }\n }\n }\n\n const compListingQuantityFiltersNew = {\n exactQuantities: exact,\n greaterThanOrEqualToQuantity: gte,\n };\n const compListingQuantityScoreAdjustmentOverrideJsonNew = JSON.stringify({\n ...parsedQuantityOverridesJson,\n quantitiesFilter: { exact, gte },\n });\n\n setValue('compListingQuantityFilters', compListingQuantityFiltersNew);\n setValue(\n 'compListingQuantityScoreAdjustmentOverrideJson',\n compListingQuantityScoreAdjustmentOverrideJsonNew\n );\n },\n [parsedQuantityOverridesJson, setValue]\n );\n\n return (\n \n );\n};\n","import { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { AutoPricingOutlierMode } from 'src/WebApiController';\n\nimport { useAutoPricingSettingsFormContext } from '../useAutoPricingSettingsFormContext';\n\nexport const AutoPricingOutlierDetectionModeSelector = ({\n outlierModes,\n outlierModesDisabled,\n disabled,\n}: {\n outlierModes: Record;\n outlierModesDisabled?: Record;\n disabled: boolean;\n}) => {\n const { onOutlierSettingsChange, watch } =\n useAutoPricingSettingsFormContext();\n\n const { outlierMode } = watch();\n\n return (\n e.stopPropagation()}\n onChange={(v) => {\n onOutlierSettingsChange({\n outlierModeNew: v as AutoPricingOutlierMode,\n });\n }}\n />\n );\n};\n","import { useState } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { Stack } from 'src/core/ui';\nimport { ToggleGroup } from 'src/core/ui/ToggleGroup';\nimport {\n OUTLIER_MODE_KTH_LOWEST_STRATEGY,\n OutlierModeKthLowestStrategy,\n} from 'src/utils/autoPricingUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { STANDARD_DEVIATIONS_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { AutoPricingOutlierMode } from 'src/WebApiController';\n\nimport * as styles from '../AutoPricing.css';\nimport {\n OnOutlierSettingsChangeArgs,\n useAutoPricingSettingsFormContext,\n} from '../useAutoPricingSettingsFormContext';\n\nexport const AutoPricingOutlierDetectionSettingsInput = ({\n disabled,\n}: {\n disabled: boolean;\n}) => {\n const { onOutlierSettingsChange, watch } =\n useAutoPricingSettingsFormContext();\n\n const {\n outlierMode,\n outlierKthLowestLimit,\n outlierKthLowestLimitRelativeSpacing,\n outlierKthLowestLimitAbsoluteSpacing,\n outlierStandardDeviations,\n } = watch();\n\n return outlierMode === AutoPricingOutlierMode.KthLowest ? (\n \n ) : outlierMode === AutoPricingOutlierMode.StandardDeviations ? (\n \n ) : null;\n};\n\nconst KthLowestOutlierDetectionSettingsInput = ({\n outlierKthLowestLimit,\n outlierKthLowestLimitRelativeSpacing,\n outlierKthLowestLimitAbsoluteSpacing,\n disabled,\n onOutlierSettingsChange,\n}: {\n outlierKthLowestLimit: number | null;\n outlierKthLowestLimitRelativeSpacing: number | null;\n outlierKthLowestLimitAbsoluteSpacing: number | null;\n disabled: boolean;\n onOutlierSettingsChange: (input: OnOutlierSettingsChangeArgs) => void;\n}) => {\n const [outlierKthLowestStrategy, setKthLowestOutlierStrategy] = useState(\n OutlierModeKthLowestStrategy.Relative\n );\n\n return (\n \n
    \n \n
    \n\n {\n const v = parseInt(e.target.value);\n onOutlierSettingsChange({\n outlierModeNew: AutoPricingOutlierMode.KthLowest,\n outlierKthLowestLimitNew: v,\n });\n }}\n />\n\n
    \n \n
    \n\n {outlierKthLowestStrategy == OutlierModeKthLowestStrategy.Relative ? (\n {\n let v = parseInt(e.target.value);\n if (v < 0) {\n v = 0;\n } else if (v > 100) {\n v = 100;\n }\n\n if (!isNaN(v)) {\n onOutlierSettingsChange({\n outlierModeNew: AutoPricingOutlierMode.KthLowest,\n outlierKthLowestLimitNew: undefined,\n outlierKthLowestLimitAbsoluteSpacingNew: null,\n outlierKthLowestLimitRelativeSpacingNew: v,\n });\n }\n }}\n />\n ) : (\n {\n const v = parseInt(e.target.value);\n onOutlierSettingsChange({\n outlierModeNew: AutoPricingOutlierMode.KthLowest,\n outlierKthLowestLimitNew: undefined,\n outlierKthLowestLimitAbsoluteSpacingNew: v,\n outlierKthLowestLimitRelativeSpacingNew: null,\n });\n }}\n />\n )}\n\n {\n if (!value) {\n return;\n }\n\n const strat = value as OutlierModeKthLowestStrategy;\n setKthLowestOutlierStrategy(strat);\n\n onOutlierSettingsChange({\n outlierModeNew: AutoPricingOutlierMode.KthLowest,\n outlierKthLowestLimitAbsoluteSpacingNew: null,\n outlierKthLowestLimitRelativeSpacingNew: null,\n });\n }}\n />\n\n
    \n \n
    \n
    \n );\n};\n\nconst StandardDeviationOutlierDetectionSettingsInput = ({\n outlierStandardDeviations,\n disabled,\n onOutlierSettingsChange,\n}: {\n outlierStandardDeviations: number | null;\n disabled: boolean;\n onOutlierSettingsChange: (input: OnOutlierSettingsChangeArgs) => void;\n}) => {\n return (\n \n e.stopPropagation()}\n onChange={(v) => {\n const value = parseInt(v ?? '');\n if (value != null && !isNaN(value)) {\n onOutlierSettingsChange({\n outlierModeNew: AutoPricingOutlierMode.StandardDeviations,\n outlierStandardDeviationsNew: value,\n });\n } else {\n onOutlierSettingsChange({\n outlierModeNew: AutoPricingOutlierMode.StandardDeviations,\n outlierStandardDeviationsNew: null,\n });\n }\n }}\n />\n \n );\n};\n","import { useCallback, useMemo } from 'react';\nimport {\n mapToSelectedSectionSettings,\n SelectedSectionSettingsWithOptionals,\n} from 'src/utils/types/selectedSectionSettingsWithOptionals';\nimport { SectionInfo, SelectedSectionSettings } from 'src/WebApiController';\n\nimport { useAutoPricingSettingsFormContext } from '../useAutoPricingSettingsFormContext';\n\nexport const useAutoPricingSettingsSelectedSections = (\n venueMapSections: SectionInfo[] | null | undefined\n) => {\n const { setValue, watch } = useAutoPricingSettingsFormContext();\n\n const { compListingSelectedSectionSettings } = watch();\n\n const selectedSections = useMemo(() => {\n const formSectionFilterIds =\n compListingSelectedSectionSettings?.sectionIdFilter ?? [];\n return (\n venueMapSections?.filter((section) => {\n return formSectionFilterIds.includes(section.id);\n }) ?? []\n );\n }, [compListingSelectedSectionSettings?.sectionIdFilter, venueMapSections]);\n\n const rowIdFilters = useMemo(() => {\n return compListingSelectedSectionSettings?.rowIdFilter ?? [];\n }, [compListingSelectedSectionSettings]);\n\n const sectionRowIdFilters = useMemo(() => {\n return compListingSelectedSectionSettings?.sectionRowIdFilter ?? {};\n }, [compListingSelectedSectionSettings]);\n\n const onRowIdFiltersChange = useCallback(\n (rowIdFilters: number[], sectionRowIdFilters: { [x: string]: string }) => {\n const compListingSelectedSectionSettingsNew = {\n sectionIdFilter:\n compListingSelectedSectionSettings?.sectionIdFilter ?? [],\n rowIdFilter: Array.from(new Set(rowIdFilters)),\n sectionRowIdFilter: sectionRowIdFilters,\n };\n\n setValue(\n 'compListingSelectedSectionSettings',\n mapToSelectedSectionSettings(compListingSelectedSectionSettingsNew) ??\n null\n );\n setValue('compListingOnlyForSelectedSectionsEnabled', true);\n },\n [compListingSelectedSectionSettings?.sectionIdFilter, setValue]\n );\n\n const onSectionIdFiltersChange = useCallback(\n (\n sectionId: number,\n selectedSections: SectionInfo[],\n section?: SectionInfo\n ) => {\n let newSectionIdFilter =\n compListingSelectedSectionSettings?.sectionIdFilter ?? [];\n\n let newRowIdFilter =\n compListingSelectedSectionSettings?.rowIdFilter ?? [];\n\n let newSectionRowIdFilter =\n compListingSelectedSectionSettings?.sectionRowIdFilter ?? {};\n\n if (newSectionIdFilter.includes(sectionId)) {\n newSectionIdFilter = newSectionIdFilter.filter(\n (id) => id !== sectionId\n );\n\n // Remove all the associated row ids for this section\n const section = selectedSections.find((s) => s.id === sectionId);\n if (section) {\n const rowIds = section.rows.map((r) => r.id);\n newRowIdFilter = newRowIdFilter.filter((id) => !rowIds.includes(id));\n }\n\n // Remove the sectionRow mapping so we don't display it in pills\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { [sectionId]: omitted, ...updatedSectionRowIdFilter } =\n compListingSelectedSectionSettings?.sectionRowIdFilter ?? {};\n\n newSectionRowIdFilter = updatedSectionRowIdFilter;\n } else {\n newSectionIdFilter.push(sectionId);\n\n // If a section is present, add all the rows associated with the newly selected section\n if (section) {\n const newRowIds = section.rows.map((r) => r.id);\n newRowIds.forEach((newRowId) => {\n if (!newRowIdFilter.includes(newRowId)) {\n newRowIdFilter.push(newRowId);\n }\n });\n }\n }\n\n const compListingSelectedSectionSettingsNew = {\n ...compListingSelectedSectionSettings,\n sectionIdFilter: newSectionIdFilter,\n rowIdFilter: newRowIdFilter,\n sectionRowIdFilter: newSectionRowIdFilter,\n };\n\n setValue(\n 'compListingSelectedSectionSettings',\n mapToSelectedSectionSettings(compListingSelectedSectionSettingsNew) ??\n null\n );\n },\n [compListingSelectedSectionSettings, setValue]\n );\n\n const setCompListingSelectedSectionSettings = useCallback(\n (\n compListingSelectedSectionSettingsNew: SelectedSectionSettingsWithOptionals | null\n ) => {\n setValue(\n 'compListingSelectedSectionSettings',\n mapToSelectedSectionSettings(compListingSelectedSectionSettingsNew) ??\n null\n );\n },\n [setValue]\n );\n\n return {\n selectedSections,\n rowIdFilters,\n sectionRowIdFilters,\n onRowIdFiltersChange,\n onSectionIdFiltersChange,\n compListingSelectedSectionSettings,\n setCompListingSelectedSectionSettings,\n };\n};\n","import { ButtonWithIcon } from 'src/components/Buttons';\nimport { FilterPillList } from 'src/components/common/FilterPill';\nimport { vars } from 'src/core/themes';\nimport { SectionSelectDialog } from 'src/dialogs/SectionSelectDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { IconsFill, PlusIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SectionInfo } from 'src/WebApiController';\n\nimport { useAutoPricingSettingsSelectedSections } from './AutoPricingSelectedSectionSettingsInput.hooks';\n\nexport const AutoPricingSelectedSectionSettingsInput = ({\n venueMapSections,\n disabled,\n}: {\n venueMapSections: SectionInfo[] | null | undefined;\n disabled: boolean;\n}) => {\n const sectionSelectDialog = useBasicDialog();\n\n const {\n compListingSelectedSectionSettings,\n setCompListingSelectedSectionSettings,\n selectedSections,\n rowIdFilters,\n sectionRowIdFilters,\n onRowIdFiltersChange,\n onSectionIdFiltersChange,\n } = useAutoPricingSettingsSelectedSections(venueMapSections);\n\n return (\n <>\n {compListingSelectedSectionSettings?.sectionIdFilter?.length ? (\n <>\n
    \n \n
    \n\n \n }\n textContentId={ContentId.EditSections}\n onClick={sectionSelectDialog.launchDialog}\n disabled={disabled}\n style={{ padding: 0 }}\n />\n \n ) : (\n venueMapSections && (\n \n }\n textContentId={ContentId.SelectSections}\n onClick={sectionSelectDialog.launchDialog}\n disabled={disabled}\n style={{ padding: 0 }}\n />\n )\n )}\n\n {\n const compListingSelectedSectionSettingsNew = {\n ...compListingSelectedSectionSettings,\n sectionIdFilter: selectedSections.map((s) => s.id),\n rowIdFilter: compListingSelectedSectionSettings?.rowIdFilter ?? [],\n sectionRowIdFilter:\n compListingSelectedSectionSettings?.sectionRowIdFilter ?? {},\n };\n setCompListingSelectedSectionSettings(\n compListingSelectedSectionSettingsNew\n );\n sectionSelectDialog.closeDialog();\n }}\n onClosed={sectionSelectDialog.closeDialog}\n />\n \n );\n};\n","import { useCallback, useMemo } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { getTextFieldState, PosTextField } from 'src/core/POS/PosTextField';\nimport { Stack } from 'src/core/ui';\nimport { ToggleGroup } from 'src/core/ui/ToggleGroup';\nimport {\n getUndercutPriceRepresentingMode,\n getUndercutPriceSettingMode,\n UNDERCUT_PRICE_MODE_OPTIONS,\n UndercutPriceSettingsMode,\n} from 'src/utils/autoPricingUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { roundToPrecision } from 'src/utils/numberFormatter';\nimport { UiCurrency } from 'src/WebApiController';\n\nimport * as styles from '../AutoPricing.css';\nimport { useAutoPricingSettingsFormContext } from '../useAutoPricingSettingsFormContext';\n\ninterface OnUnderCutChangeRelativeAmountProps {\n absUnderCutRelativeAmountNew: number | null;\n currentUnderCutRelativeAmountMode: UndercutPriceSettingsMode;\n absUnderCutAbsoluteAmountNew?: never;\n currentUnderCutAbsoluteAmountMode?: never;\n}\ninterface OnUnderCutChangeAbsoluteAmountProps {\n absUnderCutRelativeAmountNew?: never;\n currentUnderCutRelativeAmountMode?: never;\n absUnderCutAbsoluteAmountNew: number | null;\n currentUnderCutAbsoluteAmountMode: UndercutPriceSettingsMode;\n}\n\nexport const AutoPricingUnderCutRelativeAndAbsoluteAmountsInput = ({\n uiCurrency,\n disabled,\n}: {\n uiCurrency: UiCurrency;\n disabled: boolean;\n}) => {\n const { setValue, clearErrors, formState, watch } =\n useAutoPricingSettingsFormContext();\n\n const { undercutMode, undercutRelativeAmount, undercutAbsoluteAmount } =\n watch();\n\n const undercutRelativeAmountError =\n formState.errors.undercutRelativeAmount?.message;\n const undercutAbsoluteAmountError =\n formState.errors.undercutAbsoluteAmount?.message;\n\n // AmountMode is an inferred field from the amount\n const undercutRelativeAmountMode = useMemo(\n () => getUndercutPriceSettingMode(undercutRelativeAmount),\n [undercutRelativeAmount]\n );\n // AmountMode is an inferred field from the amount\n const undercutAbsoluteAmountMode = useMemo(\n () => getUndercutPriceSettingMode(undercutAbsoluteAmount),\n [undercutAbsoluteAmount]\n );\n\n const onUnderCutChange = useCallback(\n ({\n absUnderCutRelativeAmountNew,\n currentUnderCutRelativeAmountMode,\n absUnderCutAbsoluteAmountNew,\n currentUnderCutAbsoluteAmountMode,\n }:\n | OnUnderCutChangeRelativeAmountProps\n | OnUnderCutChangeAbsoluteAmountProps) => {\n if (absUnderCutRelativeAmountNew !== undefined) {\n const underCutRelativeAmountNew = absUnderCutRelativeAmountNew\n ? getUndercutPriceRepresentingMode(\n absUnderCutRelativeAmountNew,\n currentUnderCutRelativeAmountMode\n )\n : null;\n setValue('undercutRelativeAmount', underCutRelativeAmountNew);\n }\n\n if (absUnderCutAbsoluteAmountNew !== undefined) {\n const underCutAbsoluteAmountNew = absUnderCutAbsoluteAmountNew\n ? getUndercutPriceRepresentingMode(\n absUnderCutAbsoluteAmountNew,\n currentUnderCutAbsoluteAmountMode\n )\n : null;\n setValue('undercutAbsoluteAmount', underCutAbsoluteAmountNew);\n }\n\n clearErrors('undercutAbsoluteAmount');\n clearErrors('undercutRelativeAmount');\n },\n [setValue, clearErrors]\n );\n\n const isDisabled = disabled || !undercutMode;\n\n return (\n \n \n\n
    \n \n
    \n\n \n
    \n );\n};\n\nconst AutoPricingUnderCutRelativeAmountInput = ({\n undercutRelativeAmount,\n undercutRelativeAmountMode,\n undercutRelativeAmountError,\n onUnderCutChange,\n disabled,\n}: {\n undercutRelativeAmount: number | null;\n undercutRelativeAmountMode: UndercutPriceSettingsMode;\n undercutRelativeAmountError?: string;\n onUnderCutChange: (arg: OnUnderCutChangeRelativeAmountProps) => void;\n disabled: boolean;\n}) => {\n return (\n \n {\n if (!value) {\n return;\n }\n\n const undercutRelativeAmountModeNew =\n value as UndercutPriceSettingsMode;\n\n if (undercutRelativeAmount) {\n const absUndercutRelativeAmountNew = Math.abs(\n undercutRelativeAmount\n );\n onUnderCutChange({\n absUnderCutRelativeAmountNew: absUndercutRelativeAmountNew,\n currentUnderCutRelativeAmountMode: undercutRelativeAmountModeNew,\n });\n }\n }}\n />\n\n
    \n \n
    \n \n {\n const v = parseFloat(e.target.value);\n const undercutRelativeAmountNew =\n v >= 0 && v <= Number.MAX_VALUE ? Math.min(v, 100) / 100 : null;\n onUnderCutChange({\n absUnderCutRelativeAmountNew: undercutRelativeAmountNew,\n currentUnderCutRelativeAmountMode: undercutRelativeAmountMode,\n });\n }}\n />\n \n
    \n );\n};\n\nconst AutoPricingUnderCutAbsoluteAmountInput = ({\n uiCurrency,\n undercutAbsoluteAmount,\n undercutAbsoluteAmountMode,\n undercutAbsoluteAmountError,\n onUnderCutChange,\n disabled,\n}: {\n uiCurrency: UiCurrency;\n undercutAbsoluteAmount: number | null;\n undercutAbsoluteAmountMode: UndercutPriceSettingsMode;\n undercutAbsoluteAmountError?: string;\n onUnderCutChange: (arg: OnUnderCutChangeAbsoluteAmountProps) => void;\n disabled: boolean;\n}) => {\n return (\n \n {\n if (!value) {\n return;\n }\n\n const undercutAbsoluteAmountModeNew =\n value as UndercutPriceSettingsMode;\n\n if (undercutAbsoluteAmount) {\n const absUndercutAbsoluteAmountNew = Math.abs(\n undercutAbsoluteAmount\n );\n onUnderCutChange({\n absUnderCutAbsoluteAmountNew: absUndercutAbsoluteAmountNew,\n currentUnderCutAbsoluteAmountMode: undercutAbsoluteAmountModeNew,\n });\n }\n }}\n />\n
    \n \n
    \n \n {\n const v = parseFloat(e.target.value);\n const absUndercutAbsoluteAmountNew =\n v >= 0 && v <= Number.MAX_VALUE ? v : null;\n onUnderCutChange({\n absUnderCutAbsoluteAmountNew: absUndercutAbsoluteAmountNew,\n currentUnderCutAbsoluteAmountMode: undercutAbsoluteAmountMode,\n });\n }}\n />\n \n
    \n );\n};\n","import React, { useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { Stack, Switch } from 'src/core/ui';\nimport { useAvailableAutopricingModes } from 'src/hooks/useAvailableAutopricingModes';\nimport { RestrictSelectionType } from 'src/modals/ListingDetails/components/PricingSection/AutoPricingSection.types';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n AutoPricingCompListingMode,\n AutoPricingInputs,\n AutoPricingOutlierMode,\n SectionInfo,\n UiCurrency,\n} from 'src/WebApiController';\n\nimport { AutoPricingCompFloorAndCeilingInput } from '../AutoPricingCompFloorAndCeilingInput/AutoPricingCompFloorAndCeilingInput';\nimport { AutoPricingCompListingModeSelector } from '../AutoPricingCompListingModeSelector/AutoPricingCompListingModeSelector';\nimport { AutoPricingCompQuantitiesSelector } from '../AutoPricingCompQuantitiesSelector/AutoPricingCompQuantitiesSelector';\nimport { AutoPricingOutlierDetectionModeSelector } from '../AutoPricingOutlierDetectionModeSelector/AutoPricingOutlierDetectionModeSelector';\nimport { AutoPricingOutlierDetectionSettingsInput } from '../AutoPricingOutlierDetectionSettingsInput/AutoPricingOutlierDetectionSettingsInput';\nimport { AutoPricingSelectedSectionSettingsInput } from '../AutoPricingSelectedSectionSettingsInput/AutoPricingSelectedSectionSettingsInput';\nimport { AutoPricingUnderCutRelativeAndAbsoluteAmountsInput } from '../AutoPricingUnderCutRelativeAndAbsoluteAmountsInput/AutoPricingUnderCutRelativeAndAbsoluteAmountsInput';\nimport * as styles from './AutoPricingSettingsFormContent.css';\n\nexport type AutoPricingSettingsFormContentCoreProps = {\n venueMapSections: SectionInfo[] | null | undefined;\n hasSeatScores: boolean;\n uiCurrency: UiCurrency;\n allowSeatScoreCompListingMode: boolean;\n disabled: boolean;\n};\n\ntype AutoPricingSettingsFormContentCoreAndOptionalProps =\n AutoPricingSettingsFormContentCoreProps & {\n isGlobalEdit?: boolean;\n hideCompListingQuantityFilters?: boolean;\n hideUnderCutAmountInput?: boolean;\n hideBaseAdvancedSettingElements?: boolean;\n autoPricingSectionChildren?: React.ReactNode;\n priceAgainstSectionChildren?: React.ReactNode;\n pricingProtectionSectionChildren?: React.ReactNode;\n advancedSettingsSectionChildren?: React.ReactNode;\n };\n\nexport const AutoPricingSettingsFormContent = ({\n venueMapSections,\n hasSeatScores,\n isGlobalEdit,\n uiCurrency,\n allowSeatScoreCompListingMode,\n hideCompListingQuantityFilters,\n hideUnderCutAmountInput,\n hideBaseAdvancedSettingElements,\n autoPricingSectionChildren,\n priceAgainstSectionChildren,\n pricingProtectionSectionChildren,\n advancedSettingsSectionChildren,\n disabled,\n}: AutoPricingSettingsFormContentCoreAndOptionalProps) => {\n const { watch } = useFormContext();\n\n const { undercutMode, compListingMode } = watch();\n\n const { outlierModes, outlierModesDisabled, restrictSelectionTypes } =\n useAvailableAutopricingModes(\n true,\n undercutMode,\n compListingMode,\n hasSeatScores,\n false,\n isGlobalEdit,\n true\n );\n\n return (\n
    \n {autoPricingSectionChildren && (\n \n {autoPricingSectionChildren}\n \n )}\n\n \n {priceAgainstSectionChildren}\n \n\n {pricingProtectionSectionChildren && (\n \n {pricingProtectionSectionChildren}\n \n )}\n\n \n {advancedSettingsSectionChildren}\n \n
    \n );\n};\n\nconst PriceAgainstSection = ({\n venueMapSections,\n allowSeatScoreCompListingMode,\n restrictSelectionTypes,\n uiCurrency,\n hideCompListingQuantityFilters,\n hideUnderCutAmountInput,\n disabled,\n children,\n}: React.PropsWithChildren & {\n venueMapSections: SectionInfo[] | null | undefined;\n allowSeatScoreCompListingMode: boolean;\n restrictSelectionTypes: Record;\n uiCurrency: UiCurrency;\n hideCompListingQuantityFilters: boolean | undefined;\n hideUnderCutAmountInput: boolean | undefined;\n disabled: boolean;\n}) => {\n const { watch, setValue } = useFormContext();\n\n const {\n compListingMode,\n compListingOnlyForSameZoneEnabled,\n compListingOnlyForSelectedSectionsEnabled,\n } = watch();\n\n const showCompListingSettingsDetails =\n compListingMode === AutoPricingCompListingMode.QualityScore;\n\n const showCompListingRestictSelectionDetails =\n compListingMode != null &&\n (compListingMode === AutoPricingCompListingMode.QualityScore ||\n compListingMode === AutoPricingCompListingMode.SameZone);\n\n const restrictSelection = Boolean(\n compListingOnlyForSameZoneEnabled ||\n compListingOnlyForSelectedSectionsEnabled\n );\n\n const [\n isOnlyComparableZonesModeAvailable,\n setIsOnlyComparableZonesModeAvailable,\n ] = useState(false);\n\n return (\n \n {!isOnlyComparableZonesModeAvailable && (\n <>\n }\n detail={\n \n }\n />\n\n {showCompListingSettingsDetails && (\n \n }\n />\n )}\n\n {showCompListingRestictSelectionDetails && (\n <>\n }\n detail={\n e.stopPropagation()}\n onCheckedChange={(isChecked) => {\n let compListingOnlyForSameZoneEnabledNew: boolean | null =\n null;\n let compListingOnlyForSelectedSectionsEnabledNew:\n | boolean\n | null = null;\n if (isChecked) {\n if (\n !compListingOnlyForSameZoneEnabled &&\n !compListingOnlyForSelectedSectionsEnabled\n ) {\n // set zone by default\n compListingOnlyForSameZoneEnabledNew = true;\n compListingOnlyForSelectedSectionsEnabledNew = false;\n }\n } else {\n compListingOnlyForSameZoneEnabledNew = false;\n compListingOnlyForSelectedSectionsEnabledNew = false;\n }\n\n if (\n compListingOnlyForSameZoneEnabledNew != null ||\n compListingOnlyForSelectedSectionsEnabledNew != null\n ) {\n setValue(\n 'compListingOnlyForSameZoneEnabled',\n compListingOnlyForSameZoneEnabledNew\n );\n setValue(\n 'compListingOnlyForSelectedSectionsEnabled',\n compListingOnlyForSelectedSectionsEnabledNew\n );\n }\n }}\n />\n }\n />\n \n )}\n {restrictSelection && (\n }\n detail={\n e.stopPropagation()}\n onChange={(v) => {\n let compListingOnlyForSameZoneEnabledNew = false;\n let compListingOnlyForSelectedSectionsEnabledNew = true;\n if (v === RestrictSelectionType.SameZone) {\n compListingOnlyForSameZoneEnabledNew = true;\n compListingOnlyForSelectedSectionsEnabledNew = false;\n }\n\n setValue(\n 'compListingOnlyForSameZoneEnabled',\n compListingOnlyForSameZoneEnabledNew\n );\n setValue(\n 'compListingOnlyForSelectedSectionsEnabled',\n compListingOnlyForSelectedSectionsEnabledNew\n );\n }}\n />\n }\n />\n )}\n \n )}\n\n {compListingOnlyForSelectedSectionsEnabled && venueMapSections && (\n }\n detail={\n \n }\n />\n )}\n\n {!hideCompListingQuantityFilters && (\n }\n detail={}\n />\n )}\n\n {!hideUnderCutAmountInput && (\n }\n detail={\n \n }\n />\n )}\n\n {children}\n \n );\n};\n\nconst AdvancedSettingsSection = ({\n outlierModes,\n outlierModesDisabled,\n disabled,\n hideBaseAdvancedSettingElements,\n children,\n}: React.PropsWithChildren & {\n outlierModes: Record;\n outlierModesDisabled: Record;\n disabled: boolean;\n hideBaseAdvancedSettingElements?: boolean;\n}) => {\n const { watch, setValue } = useFormContext();\n\n const {\n compListingExcludeFanInventory,\n compListingExcludeDefects,\n outlierMode,\n } = watch();\n\n const shouldShowAdvancedSettings =\n !hideBaseAdvancedSettingElements || !!children;\n return (\n shouldShowAdvancedSettings && (\n \n {!hideBaseAdvancedSettingElements && (\n <>\n }\n detail={\n e.stopPropagation()}\n onCheckedChange={(isChecked) => {\n const compListingExcludeFanInventoryNew = isChecked;\n if (\n compListingExcludeFanInventoryNew !==\n compListingExcludeFanInventory\n ) {\n setValue(\n 'compListingExcludeFanInventory',\n compListingExcludeFanInventoryNew\n );\n }\n }}\n />\n }\n />\n\n }\n detail={\n e.stopPropagation()}\n onCheckedChange={(isChecked) => {\n const compListingExcludeDefectsNew = !isChecked;\n if (\n compListingExcludeDefectsNew !== compListingExcludeDefects\n ) {\n setValue(\n 'compListingExcludeDefects',\n compListingExcludeDefectsNew\n );\n }\n }}\n />\n }\n />\n\n }\n detail={\n \n }\n />\n\n {outlierMode != AutoPricingOutlierMode.SkipLogic && (\n }\n detail={\n \n }\n />\n )}\n \n )}\n\n {children}\n \n )\n );\n};\n\nconst AutoPricingSettingsSection = ({\n title,\n children,\n}: React.PropsWithChildren & { title: ContentId }) => {\n return (\n \n
    \n \n
    \n\n {children}\n
    \n );\n};\n\nexport const PricingSetting = ({\n header,\n detail,\n headerStyle,\n}: {\n header: React.ReactNode;\n detail: React.ReactNode;\n headerStyle?: React.CSSProperties;\n}) => {\n return (\n \n
    \n {header}\n
    \n
    {detail}
    \n
    \n );\n};\n","import { FormProvider, useForm, useFormContext } from 'react-hook-form';\nimport {\n AutoPricingSettingsFormContent,\n AutoPricingSettingsFormContentCoreProps,\n PricingSetting,\n} from 'src/components/AutoPricing/AutoPricingSettingsFormContent/AutoPricingSettingsFormContent';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Switch } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { AutoPricingInputs } from 'src/WebApiController';\n\nimport { MergeListingGroupInputListFields } from '../groupingTypes';\n\nexport type ListingGroupAutoPricingSettingsFormContentProps =\n AutoPricingSettingsFormContentCoreProps;\n\nexport const ListingGroupAutoPricingSettingsFormContent = ({\n disabled,\n ...rest\n}: ListingGroupAutoPricingSettingsFormContentProps) => {\n const { watch: outerWatch, setValue: outerSetValue } =\n useFormContext();\n\n const { pricingSettingsInputs, resetListingAutoPricingSettings } =\n outerWatch();\n\n const innerMethods = useForm({\n defaultValues: pricingSettingsInputs,\n });\n\n const { watch: innerWatch } = innerMethods;\n\n innerWatch((pricingSettingsInputsNew) => {\n outerSetValue(\n 'pricingSettingsInputs',\n pricingSettingsInputsNew as AutoPricingInputs\n );\n });\n\n return (\n \n <>\n \n }\n detail={\n e.stopPropagation()}\n onCheckedChange={(isChecked) => {\n if (isChecked !== resetListingAutoPricingSettings) {\n outerSetValue(\n 'resetListingAutoPricingSettings',\n isChecked\n );\n }\n }}\n />\n }\n />\n }\n isGlobalEdit={false}\n disabled={disabled}\n {...rest}\n />\n \n \n );\n};\n","import { useMemo } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { getCompleteEventConfigScoreOverrides } from 'src/utils/seatScoreUtils';\nimport { Feature, ListingGroup } from 'src/WebApiController';\n\nimport { ListingGroupAutoPricingSettingsFormContent } from '../ListingGroupAutoPricingSettingsFormContent/ListingGroupAutoPricingSettingsFormContent';\n\nexport const ListingGroupAutoPricingSettingsFormContentWrapper = ({\n listingGroup,\n disabled,\n}: {\n listingGroup: ListingGroup | null | undefined;\n disabled: boolean;\n}) => {\n const { loginContext } = useAppContext();\n const { getUiCurrency } = useLocalizationContext();\n\n const uiCurrency = useMemo(\n () =>\n getUiCurrency(\n listingGroup?.currency ??\n loginContext?.user?.activeAccount?.currencyCode\n ),\n [\n getUiCurrency,\n listingGroup?.currency,\n loginContext?.user?.activeAccount?.currencyCode,\n ]\n );\n\n const { activeConfigOverride, venueMapInfo, venueMapsByScoreModelQuery } =\n useEventMapContext();\n\n const defaultScoreOverrides = useMemo(() => {\n // In the backend, if AVG scores are missing, then we always fallback to MVG, even if AVG is explicitly selected\n return (\n venueMapsByScoreModelQuery?.data?.AdvancedVenueGeometry?.sectionScores ??\n venueMapsByScoreModelQuery?.data?.MergedVenueGeometry?.sectionScores ??\n venueMapsByScoreModelQuery?.data?.VenueGeometry?.sectionScores\n );\n }, [\n venueMapsByScoreModelQuery?.data?.AdvancedVenueGeometry?.sectionScores,\n venueMapsByScoreModelQuery?.data?.MergedVenueGeometry?.sectionScores,\n venueMapsByScoreModelQuery?.data?.VenueGeometry?.sectionScores,\n ]);\n\n const scores = getCompleteEventConfigScoreOverrides(\n defaultScoreOverrides,\n activeConfigOverride?.scoreOverrides,\n false\n );\n\n const hasAllowSeatScoreCompListingModeFeature = useUserHasFeature(\n Feature.AllowSeatScoreCompListingMode\n );\n\n return (\n s.score))}\n uiCurrency={uiCurrency}\n allowSeatScoreCompListingMode={hasAllowSeatScoreCompListingModeFeature}\n disabled={disabled}\n />\n );\n};\n","import { MarketplaceLogo } from 'src/components/common/MarketplaceLogo';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { Switch } from 'src/core/interim/Switch';\nimport { vars } from 'src/core/themes';\nimport { SimpleTable } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getListingBroadcastIcon } from 'src/utils/inventoryUtils';\nimport { Event, ListingStatus, Marketplace } from 'src/WebApiController';\n\nimport * as styles from './MarketplaceDisplay.css';\n\nexport const MarketplaceDisplay = ({\n marketplace,\n marketplaceActive,\n isSelected,\n isActive,\n isLoading,\n event,\n isUKEvent,\n isViagogo,\n disabled,\n onListingBroadcastToggle,\n}: {\n marketplace: Marketplace;\n marketplaceActive: boolean;\n isSelected: boolean;\n isActive: boolean;\n isLoading: boolean;\n event?: Event;\n isUKEvent?: boolean;\n isViagogo?: boolean;\n disabled?: boolean;\n onListingBroadcastToggle: (\n isSelected: boolean,\n isBroadcasting: boolean,\n marketplace: Marketplace\n ) => void;\n}) => {\n const alwaysShowAsDelisted =\n isUKEvent && marketplace === Marketplace.StubHub && !isViagogo;\n\n const isChecked = !alwaysShowAsDelisted && isActive && isSelected;\n\n const { iconComponent: ListingBroadcastIcon } = getListingBroadcastIcon(\n alwaysShowAsDelisted || !marketplaceActive\n ? ListingStatus.Delisted // We always show Delisted for StubHub when event is in UK\n : isActive\n ? isLoading\n ? ListingStatus.ListingPending\n : ListingStatus.Listed\n : isLoading\n ? ListingStatus.DelistingPending\n : ListingStatus.Delisted\n );\n\n const listingStatusCell = (\n <>\n {isSelected && }\n \n \n \n \n );\n\n return (\n \n \n \n onListingBroadcastToggle(!isSelected, isChecked, marketplace)\n }\n />\n \n \n \n \n \n {\n onListingBroadcastToggle(isSelected, !isChecked, marketplace);\n }}\n containerClassName={styles.broadcastStatus}\n />\n \n \n
    {listingStatusCell}
    \n
    \n \n );\n};\n","import { isEqual, mergeWith } from 'lodash-es';\nimport React, { useCallback, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Content } from 'src/contexts/ContentContext';\nimport { SimpleTable } from 'src/core/ui';\nimport { useEventMarketplaceSettings } from 'src/hooks/useEventMarketplaceSettings';\nimport { MultiDetailSection } from 'src/modals/common';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { compareMarketplace } from 'src/utils/eventWithDataUtils';\nimport { isMarketplaceActive } from 'src/utils/userUtils';\nimport {\n Event,\n ListingMarketplaceSetting,\n Marketplace,\n MergeListingGroupInput,\n} from 'src/WebApiController';\n\nimport { MergeListingGroupInputListFields } from '../groupingTypes';\nimport { MarketplaceDisplay } from './MarketplaceDisplay';\nimport * as styles from './MarketplaceDisplay.css';\n\n/**\n * Get maerketplace id from marketplace enum.\n * This assumes the enum order is aligned with the Marketplace.Marketplace table\n */\nconst getMarketplaceIdFromMarketplace = (marketplace: Marketplace) => {\n let marketplaceId = 0;\n Object.values(Marketplace).forEach((mp, index) => {\n if (mp === marketplace) {\n marketplaceId = index + 1;\n }\n });\n return marketplaceId;\n};\n\n/**\n * Merge listing marketplace settings from two groups\n */\nconst mergeListingMarketplaceSettings = (\n marketplace1: { [key: string]: ListingMarketplaceSetting },\n marketplace2: { [key: string]: ListingMarketplaceSetting }\n) => {\n return mergeWith(\n { ...marketplace1 },\n marketplace2,\n (\n setting1: ListingMarketplaceSetting,\n setting2: ListingMarketplaceSetting\n ) => {\n if (\n !isEqual(\n setting1?.listingBroadcastStateId,\n setting2?.listingBroadcastStateId\n )\n ) {\n return {\n listingBroadcastStateId: Math.max(\n setting1?.listingBroadcastStateId ?? 1,\n setting2?.listingBroadcastStateId ?? 1\n ),\n };\n }\n return setting1 ?? setting2;\n }\n );\n};\n\ntype MarketplaceBroadcastProps = {\n event?: Event;\n};\n\nexport const ListingGroupMarketplaceBroadcast: React.FC<\n MarketplaceBroadcastProps\n> = ({ event }) => {\n const { watch, setValue } =\n useFormContext();\n const mergeListingGroupInputs = watch('mergeListingGroupInputs');\n const { eventMarketplaceSettings, isUKEvent, isInternationalEvent } =\n useEventMarketplaceSettings(event);\n\n const onListingBroadcastToggle = useCallback(\n (isSelected: boolean, isBroadcasting: boolean, mp: Marketplace) => {\n const updated = (mergeListingGroupInputs ?? []).map((input) => {\n const { listingMarketplaceSettings } = input?.marketplaceSettings || {\n listingMarketplaceSettings: {},\n };\n const marketplaceId = getMarketplaceIdFromMarketplace(mp);\n const copied = { ...listingMarketplaceSettings };\n if (isSelected) {\n Object.assign(copied, {\n [marketplaceId + '']: {\n listingBroadcastStateId: isBroadcasting ? 2 : 1,\n },\n });\n } else {\n delete copied[marketplaceId];\n }\n Object.assign(input, {\n marketplaceSettings: { listingMarketplaceSettings: copied },\n });\n return input;\n });\n setValue(`mergeListingGroupInputs`, updated);\n },\n [mergeListingGroupInputs, setValue]\n );\n\n const mergedSettings = useMemo(() => {\n return (mergeListingGroupInputs ?? []).reduce(\n (arr, input: MergeListingGroupInput) => {\n return mergeListingMarketplaceSettings(\n arr,\n input?.marketplaceSettings?.listingMarketplaceSettings ?? {}\n );\n },\n {} as { [key: string]: ListingMarketplaceSetting }\n );\n }, [mergeListingGroupInputs]);\n\n const marketplacesSelected = useMemo(() => {\n const selected: Marketplace[] = [];\n const includedIds = Object.keys(mergedSettings);\n Object.values(Marketplace).forEach((mp, index) => {\n if (includedIds.includes(index + 1 + '')) {\n selected.push(mp);\n }\n });\n return selected;\n }, [mergedSettings]);\n\n const marketplaceToStateId = useMemo(() => {\n const marketplaceToId = {} as Record;\n const includedIds = Object.keys(mergedSettings);\n Object.values(Marketplace).forEach((mp, index) => {\n const key = index + 1 + '';\n if (includedIds.includes(key)) {\n marketplaceToId[mp] = mergedSettings[key].listingBroadcastStateId;\n }\n });\n return marketplaceToId;\n }, [mergedSettings]);\n\n return (\n }\n extraContent={[]}\n >\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {eventMarketplaceSettings\n .toSorted((a, b) => compareMarketplace(a.mkp, b.mkp))\n .flatMap((mk) => {\n const isSelected = marketplacesSelected.includes(mk.mkp);\n const isActive = marketplaceToStateId[mk.mkp] === 2;\n\n if (mk.mkp === Marketplace.StubHub) {\n return [\n ,\n ,\n ];\n }\n\n if (!event || !isInternationalEvent) {\n return [\n ,\n ];\n }\n\n // Only support Stubhub/Viagogo for international events\n return [];\n })}\n \n \n \n );\n};\n","import { range } from 'lodash-es';\nimport { ChangeEvent, useCallback, useMemo } from 'react';\nimport { TableVirtuoso } from 'react-virtuoso';\nimport { SeatingInfo } from 'src/components/common/SeatingInfo';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosSelect } from 'src/core/POS/PosSelect';\nimport { getTextFieldState, PosTextField } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { SimpleTable, Stack } from 'src/core/ui';\nimport { CrossIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { GroupingType } from 'src/WebApiController';\n\nimport * as styles from '../../GroupListings.css';\nimport {\n GroupingTemplate,\n GroupingTemplateSeating,\n ListingGroupBy,\n} from '../groupingTypes';\n\nexport const GroupTemplateTable = ({\n groupBy,\n template,\n onTemplateChange,\n allowDelete,\n style,\n}: {\n groupBy: ListingGroupBy;\n template: GroupingTemplate;\n allowDelete: boolean;\n onTemplateChange: (\n groupTemplate: GroupingTemplate,\n removed?: boolean\n ) => void;\n style?: React.CSSProperties;\n}) => {\n const assignNewPriority = useCallback(\n (newPriority: number, key: string) => {\n // First find the element that already has this priority\n const indexOfExisting = template.seatings.findIndex(\n (l) => l.priority === newPriority\n );\n // Now find the index of item\n const indexOfItem = template.seatings.findIndex((l) => l.id === key);\n\n if (indexOfExisting < indexOfItem) {\n // Priority changed to higher (lower index), so we need to start at indexOfListing and go to up to indexOfItem\n for (let i = indexOfExisting; i < indexOfItem; i++) {\n const l = template.seatings[i];\n l.priority = l.priority! + 1; // shift 1 forward\n }\n template.seatings[indexOfItem].priority = newPriority; // set new priority on target listing\n\n // Save the new listing (ordered by priority)\n onTemplateChange({ ...template });\n } else if (indexOfExisting > indexOfItem) {\n // Priority changed to lower (higher index), so we need to start at indexOfExisting and go down to indexOfItem\n for (let i = indexOfExisting; i > indexOfItem; i--) {\n const l = template.seatings[i];\n l.priority = l.priority! - 1; // shift 1 back\n }\n\n template.seatings[indexOfItem].priority = newPriority; // set new priority on target listing\n\n // Save the new listing (ordered by priority)\n onTemplateChange({ ...template });\n } else {\n // There is no change, just return\n return;\n }\n },\n [onTemplateChange, template]\n );\n\n const priorityOptions = useMemo(\n () =>\n range(template.seatings.length).reduce(\n (r, i) => {\n r[(i + 1).toString()] = (i + 1).toString();\n return r;\n },\n {} as Record\n ),\n [template.seatings.length]\n );\n\n const requiredMsg = useContent(ContentId.Required);\n const error = template.groupName ? undefined : requiredMsg;\n\n const renderHeaderContent = useCallback(() => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n );\n }, [groupBy.groupingType]);\n\n const renderRowContent = useCallback(\n (seat: GroupingTemplateSeating) => {\n return (\n <>\n \n {\n if (newPriorityString) {\n const newPriority = parseInt(newPriorityString);\n assignNewPriority(newPriority, seat.id.toString());\n }\n }}\n valueOptionsContent={priorityOptions}\n />\n \n \n {groupBy.groupingType === GroupingType.Quantity ? (\n seat.availQty\n ) : groupBy.groupingType === GroupingType.UnitCost ? (\n (seat.unitCst?.disp ??\n seat.unitCst?.amt ??\n seat.faceValue?.disp ??\n seat.faceValue?.amt)\n ) : (\n \n )}\n \n \n {\n template.seatings = template.seatings.filter(\n (s) => s.id !== seat.id\n );\n onTemplateChange({ ...template });\n }}\n />\n \n \n );\n },\n [\n assignNewPriority,\n groupBy.groupingType,\n onTemplateChange,\n priorityOptions,\n template,\n ]\n );\n\n const templateSeatingsData = useMemo(\n () => template.seatings.toSorted((s1, s2) => s1.priority! - s2.priority!),\n [template.seatings]\n );\n\n return (\n \n \n }\n errors={error}\n style={{ flex: '1' }}\n >\n {\n if (e.target.value !== template.groupName) {\n template.groupName = e.target.value;\n onTemplateChange({ ...template });\n }\n }}\n />\n \n }\n style={{ flex: '0.5' }}\n >\n ) => {\n const v = parseInt(e.target.value);\n if (v >= 0 && v !== template.desiredActiveListings) {\n template.desiredActiveListings = v;\n onTemplateChange({ ...template });\n }\n }}\n />\n \n {allowDelete && (\n onTemplateChange(template, true)}\n withHoverEffect\n />\n )}\n \n
    \n {\n return renderRowContent(seat);\n }}\n />\n
    \n
    \n );\n};\n","import { isEqual } from 'lodash-es';\nimport { ChangeEvent, useCallback, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { TableVirtuoso } from 'react-virtuoso';\nimport { SeatingInfo } from 'src/components/common/SeatingInfo';\nimport {\n Content,\n useContent,\n useContentContext,\n} from 'src/contexts/ContentContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosEnumSelect, PosSelect } from 'src/core/POS/PosSelect';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { SimpleTable, Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { newGuidId } from 'src/utils/idUtils';\nimport { getCompleteEventConfigScoreOverrides } from 'src/utils/seatScoreUtils';\nimport { GroupingType } from 'src/WebApiController';\n\nimport * as styles from '../../GroupListings.css';\nimport {\n GroupingTemplateSeating,\n ListingGroupBy,\n ListingGroupingTypesWithClusteringOptions,\n MergeListingGroupInputListFields,\n} from '../groupingTypes';\nimport {\n getAvailableGroupingTypes,\n getListingGroupsMap,\n} from '../groupingUtils';\n\nexport const SeatingSelectionTable = ({\n uniqueSeatings,\n}: {\n uniqueSeatings: GroupingTemplateSeating[];\n}) => {\n const { watch, setValue } =\n useFormContext();\n\n const contentContext = useContentContext();\n const groupTemplates = watch('templateSettings.groupTemplates');\n const groupBy = watch('templateSettings.groupBy');\n const desiredActiveListings = watch('templateSettings.desiredActiveListings');\n const deprioritizedQuantities = watch(\n 'templateSettings.deprioritizedQuantities'\n );\n const randomizePriority = watch('templateSettings.randomizePriority');\n\n const noneStr = useContent(ContentId.None);\n const newGroupName = useContent(ContentId.NewGroup);\n\n const availableGroups = useMemo(\n () =>\n groupTemplates.reduce(\n (r, g) => {\n r[g.groupId] = g.groupName;\n return r;\n },\n { None: noneStr } as Record\n ),\n [groupTemplates, noneStr]\n );\n\n const { venueMapInfo, activeConfigOverride } = useEventMapContext();\n const scoreOverrides = useMemo(\n () =>\n getCompleteEventConfigScoreOverrides(\n venueMapInfo?.sectionScores,\n activeConfigOverride?.scoreOverrides,\n false\n ),\n [activeConfigOverride?.scoreOverrides, venueMapInfo?.sectionScores]\n );\n\n const getGroupedListings = useCallback(\n (groupBy: ListingGroupBy) => {\n const listingGroupsMap = getListingGroupsMap(\n [groupBy],\n contentContext,\n uniqueSeatings,\n scoreOverrides,\n venueMapInfo?.sections\n );\n return !listingGroupsMap\n ? []\n : Object.values(listingGroupsMap)\n .filter((group) => group.data.length)\n .toSorted((a, b) => a.name.localeCompare(b.name))\n .map((group) => {\n return {\n groupId: newGuidId(),\n groupName: group.name,\n desiredActiveListings,\n deprioritizedQuantities,\n marketplaceSettings: null,\n seatings: group.data.map((s, i) => ({\n ...(s as GroupingTemplateSeating),\n priority: i + 1,\n })),\n };\n });\n },\n [\n contentContext,\n uniqueSeatings,\n scoreOverrides,\n venueMapInfo?.sections,\n desiredActiveListings,\n deprioritizedQuantities,\n ]\n );\n\n const updateGroupedListings = useCallback(\n (localGroupBy: ListingGroupBy) => {\n if (isEqual(localGroupBy, groupBy)) {\n return;\n }\n\n setValue(`templateSettings.groupBy`, localGroupBy);\n\n if (localGroupBy.groupingType !== GroupingType.Custom) {\n const newTemplates = getGroupedListings(localGroupBy);\n setValue('templateSettings.groupTemplates', newTemplates);\n } else {\n if (groupTemplates.length === 0) {\n setValue('templateSettings.groupTemplates', [\n {\n groupId: newGuidId(),\n groupName: `${newGroupName} 1`,\n desiredActiveListings,\n deprioritizedQuantities,\n seatings: [],\n },\n ]);\n }\n }\n },\n [\n deprioritizedQuantities,\n desiredActiveListings,\n getGroupedListings,\n groupBy,\n groupTemplates.length,\n newGroupName,\n setValue,\n ]\n );\n\n const onGroupingTypeChange = useCallback(\n (newGroupType: GroupingType, newNumOfClusters?: number) => {\n updateGroupedListings({\n groupingType: newGroupType,\n numOfClusters: newNumOfClusters,\n });\n },\n [updateGroupedListings]\n );\n\n const renderHeaderContent = useCallback(() => {\n return (\n \n \n \n \n \n \n \n \n );\n }, [groupBy.groupingType]);\n\n const renderRowContent = useCallback(\n (gts: GroupingTemplateSeating, groupId: string | undefined) => {\n const { id, seating, availQty, unitCst, faceValue } = gts;\n\n return (\n <>\n \n {\n if (newGroupId) {\n const oldGroup = groupTemplates.find(\n (g) => g.groupId.toString() === groupId\n );\n if (oldGroup) {\n oldGroup.seatings = oldGroup.seatings\n .filter((s) => s.id !== id)\n .map((s, i) => ({ ...s, priority: i + 1 })); // normalize priority\n }\n\n const group = groupTemplates.find(\n (g) => g.groupId.toString() === newGroupId\n );\n\n if (group) {\n // Always push to the end\n group.seatings.push({\n id,\n seating,\n availQty,\n unitCst,\n faceValue,\n priority: group.seatings.length + 1,\n });\n\n setValue('templateSettings.groupTemplates', [\n ...groupTemplates,\n ]);\n } else {\n setValue('templateSettings.groupTemplates', [\n ...groupTemplates,\n ]);\n }\n }\n }}\n valueOptionsContent={availableGroups}\n />\n \n \n {groupBy.groupingType === GroupingType.Quantity ? (\n availQty\n ) : groupBy.groupingType === GroupingType.UnitCost ? (\n (unitCst?.disp ?? unitCst?.amt)\n ) : (\n \n )}\n \n \n );\n },\n [availableGroups, groupBy.groupingType, groupTemplates, setValue]\n );\n\n return (\n <>\n \n }\n style={{ width: 'max-content' }}\n >\n \n v && onGroupingTypeChange(v, groupBy.numOfClusters)\n }\n valueOptionsContent={getAvailableGroupingTypes([])}\n />\n \n {ListingGroupingTypesWithClusteringOptions.includes(\n groupBy.groupingType\n ) && (\n }\n style={{ width: 'max-content' }}\n >\n ) => {\n const v = parseInt(e.target.value);\n if (v >= 1) {\n if (v !== groupBy.numOfClusters) {\n onGroupingTypeChange(groupBy.groupingType, v);\n }\n }\n }}\n />\n \n )}\n }\n style={{ width: 'max-content' }}\n >\n ) => {\n const value = e.target.value;\n const v = parseInt(value);\n if (v >= 0) {\n if (v !== desiredActiveListings) {\n setValue(`templateSettings.desiredActiveListings`, v);\n }\n\n let hasChanged = false;\n groupTemplates.forEach((t) => {\n if (t.desiredActiveListings !== v) {\n t.desiredActiveListings = v;\n hasChanged = true;\n }\n });\n\n if (hasChanged) {\n setValue('templateSettings.groupTemplates', [\n ...groupTemplates,\n ]);\n }\n }\n }}\n />\n \n \n \n }\n checked={randomizePriority}\n onChange={(e) => {\n const isChecked = e.target.checked;\n if (isChecked !== randomizePriority) {\n setValue('templateSettings.randomizePriority', isChecked);\n }\n }}\n />\n \n
    \n {\n const { id } = gts;\n const groupId = groupTemplates.find((gt) =>\n gt.seatings.some((s) => s.id === gts.id)\n )?.groupId;\n return renderRowContent(gts, groupId);\n }}\n />\n
    \n \n );\n};\n","import { useCallback, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Virtuoso } from 'react-virtuoso';\nimport * as EmptySectionContent from 'src/components/common/EmptySectionContent';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { newGuidId } from 'src/utils/idUtils';\nimport { EventWithData, GroupingType } from 'src/WebApiController';\n\nimport IconBulletList from '~icons/pos/bulletList';\n\nimport {\n GroupingTemplate,\n GroupingTemplateSeating,\n MergeListingGroupInputListFields,\n} from '../groupingTypes';\nimport { flattenListingGroup } from '../groupingUtils';\nimport * as styles from './GroupingTemplates.css';\nimport { GroupTemplateTable } from './GroupTemplateTable';\nimport { SeatingSelectionTable } from './SeatingSelectionTable';\n\nexport const GroupingTemplates = ({ events }: { events: EventWithData[] }) => {\n const { watch, setValue } =\n useFormContext();\n\n const groupBy = watch('templateSettings.groupBy');\n const groupTemplates = watch('templateSettings.groupTemplates');\n const desiredActiveListings = watch('templateSettings.desiredActiveListings');\n const deprioritizedQuantities = watch(\n 'templateSettings.deprioritizedQuantities'\n );\n\n const uniqueSeatings = useMemo(\n () =>\n Object.values(\n events.reduce(\n (result, ev) => {\n ev.entities.listings?.flatMap(flattenListingGroup).forEach((l) => {\n const section = l.seating.section;\n const row = l.seating.row;\n let availQty = null;\n let unitCst = null;\n let faceValue = null;\n let key = `${section}__${row}`;\n\n if (groupBy.groupingType === GroupingType.Quantity) {\n key = `${l.availQty}`;\n availQty = l.availQty;\n } else if (groupBy.groupingType === GroupingType.UnitCost) {\n key = `${l.unitCst?.amt || l.faceValue?.amt || 0}`;\n unitCst = l.unitCst;\n faceValue = l.faceValue;\n }\n\n if (!result[key] || !result[key].seating.rowId) {\n result[key] = {\n id: key,\n seating: l.seating,\n availQty,\n unitCst,\n faceValue,\n };\n }\n });\n\n return result;\n },\n {} as Record\n )\n ),\n [events, groupBy.groupingType]\n );\n\n const onGroupTemplateChange = useCallback(\n (template: GroupingTemplate, remove?: boolean) => {\n if (remove) {\n setValue('templateSettings.groupTemplates', [\n ...groupTemplates.filter((t) => t.groupId !== template.groupId),\n ]);\n } else {\n setValue('templateSettings.groupTemplates', [\n ...groupTemplates.filter((t) => t.groupId !== template.groupId),\n template,\n ]);\n }\n },\n [setValue, groupTemplates]\n );\n\n const newGroupName = useContent(ContentId.NewGroup);\n\n const onAddNewGroupTemplate = useCallback(() => {\n groupTemplates.push({\n groupId: newGuidId(),\n groupName: `${newGroupName} ${groupTemplates.length + 1}`,\n desiredActiveListings,\n deprioritizedQuantities,\n seatings: [],\n });\n\n setValue('templateSettings.groupTemplates', [...groupTemplates]);\n }, [\n deprioritizedQuantities,\n desiredActiveListings,\n groupTemplates,\n newGroupName,\n setValue,\n ]);\n\n const groupTemplateData = useMemo(\n () =>\n groupTemplates.toSorted((g1, g2) => g1.groupId.localeCompare(g2.groupId)),\n [groupTemplates]\n );\n\n return (\n \n (\n \n \n \n ),\n Footer: () => (\n <>\n {!groupTemplateData.length && (\n }>\n \n \n )}\n
    \n \n
    \n \n ),\n }}\n itemContent={(index, grt) => (\n 1}\n style={{ marginTop: vars.spacing['xl'] }}\n />\n )}\n />\n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const ShuffleIcon = (props: PosIconProps) => {\n return (\n \n \n \n \n \n );\n};\n","import { SortingState, Updater } from '@tanstack/react-table';\nimport { isEmpty } from 'lodash-es';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport { RegisterOptions, useFormContext } from 'react-hook-form';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { moveElements, randomizeInPlace } from 'src/utils/arrayUtils';\nimport {\n IListingGroupItem,\n Listing,\n ListingGroupItemInput,\n} from 'src/WebApiController';\n\nimport {\n GroupListingSortingCriteria,\n MergeListingGroupInputListFields,\n} from './groupingTypes';\nimport { flattenListingGroup, quantityMatches } from './groupingUtils';\n\ntype FormEditableFields =\n | 'listingGroupItems'\n | 'desiredActiveListings'\n | 'minActiveListings'\n | 'maxActiveListings'\n | 'targetPercentage'\n | 'deprioritizedQuantities'\n | 'undRelAmt'\n | 'undAbsAmt';\ntype FormRegistableFields = 'name' | 'undAbsAmt';\n\nconst AllowedSortingColumns = ['Section', 'Row', 'Remaining'];\n\nexport const groupPrioritySort =\n (\n idToSortingCriteria: Record,\n deprioritizedQuantities: string[] | null\n ) =>\n (a: T, b: T): number => {\n if (isEmpty(deprioritizedQuantities)) {\n return a.priority - b.priority;\n }\n const { availableQuantity: quantityA } = idToSortingCriteria[a.listingId];\n const { availableQuantity: quantityB } = idToSortingCriteria[b.listingId];\n const deprioritizedA = quantityMatches(quantityA, deprioritizedQuantities);\n const deprioritizedB = quantityMatches(quantityB, deprioritizedQuantities);\n if (deprioritizedA === deprioritizedB) {\n return a.priority - b.priority;\n }\n return deprioritizedA ? 1 : -1;\n };\n\nconst groupColumnSort =\n (\n items: IListingGroupItem[],\n rowIdToRowOrdinalMap: Record | undefined,\n newSorting: SortingState\n ) =>\n (a: ListingGroupItemInput, b: ListingGroupItemInput): number => {\n const sortBySection = newSorting[0]?.id === 'Section';\n const sortByRow = newSorting[0]?.id === 'Row';\n const sortByUnsoldQty = newSorting[0]?.id === 'Remaining';\n\n // If we are sorting by the unsold qty (remaining) just use the number comparison\n const unsoldA = items.find((l) => l.id === a.listingId)?.availQty ?? 0;\n const unsoldB = items.find((l) => l.id === b.listingId)?.availQty ?? 0;\n if (sortByUnsoldQty) {\n if (newSorting[0].desc) {\n return unsoldB - unsoldA;\n }\n\n return unsoldA - unsoldB;\n }\n\n const seatingA = items.find((l) => l.id === a.listingId)?.seating;\n const seatingB = items.find((l) => l.id === b.listingId)?.seating;\n\n // If we are sorting by row, try to see if we can sort by the row ordinal. If that data is\n // not available, then we will fallback to the original behavior of sorting by row name\n if (sortByRow) {\n const rowOrdinalA =\n !!rowIdToRowOrdinalMap && seatingA?.rowId != null\n ? (rowIdToRowOrdinalMap[seatingA?.rowId] ?? undefined)\n : undefined;\n\n const rowOrdinalB =\n !!rowIdToRowOrdinalMap && seatingB?.rowId != null\n ? (rowIdToRowOrdinalMap[seatingB?.rowId] ?? undefined)\n : undefined;\n\n // Before we sort by row ordinal we need to ensure ordinals exist for both listings.\n // If either are missing, we cannot compare a valid row ordinal to an undefined row ordinal.\n //\n // Additionally, we cannot a default value when the ordinal is missing, as that could\n // lead to incorrect sorting. We want to avoid a scenario where all listings without\n // a valid row ordinal mapping are clustered together in the final sort. In these\n // cases, we prefer to fallback to just sorting on the string value of the row name.\n const canSortByOrdinals =\n rowOrdinalA !== undefined && rowOrdinalB !== undefined;\n\n if (canSortByOrdinals) {\n if (newSorting[0].desc) {\n return rowOrdinalB - rowOrdinalA;\n } else {\n return rowOrdinalA - rowOrdinalB;\n }\n }\n }\n\n const valueA = sortBySection ? seatingA?.section : (seatingA?.row ?? '');\n const valueB = sortBySection ? seatingB?.section : (seatingB?.row ?? '');\n\n if (valueA != null && valueB != null) {\n if (newSorting[0].desc) {\n return valueB.localeCompare(valueA, undefined, {\n numeric: true,\n });\n } else {\n return valueA.localeCompare(valueB, undefined, {\n numeric: true,\n });\n }\n }\n return 0;\n };\n\nexport const useGroupSortingCriteria = (listings: Listing[]) => {\n // This is used only for ordering of the grouped listings\n return useMemo(\n () =>\n (listings.flatMap(flattenListingGroup) as Listing[]).reduce(\n (acc, { id, isAdminHold, availQty }) => {\n acc[id] = {\n isAdminHold,\n availableQuantity: availQty,\n };\n return acc;\n },\n {} as Record\n ) ?? {},\n [listings]\n );\n};\n\n// Hook to group the group input form operations\nexport const useMergeListingGroupInputForm = (index: number) => {\n const { watch, setValue, formState, register } =\n useFormContext();\n const mergeListingGroupInputs = watch('mergeListingGroupInputs');\n const eventSettings = watch('eventSettings');\n const listingsInGroupInput = watch(`mergeListingGroupInputs.${index}`);\n\n const deprioritizedQuantities = useMemo(() => {\n if (!isEmpty(listingsInGroupInput?.deprioritizedQuantities)) {\n return listingsInGroupInput.deprioritizedQuantities;\n }\n return eventSettings?.[index]?.deprioritizedQuantities ?? [];\n }, [listingsInGroupInput?.deprioritizedQuantities, eventSettings, index]);\n\n const listingGroupNameError = useMemo(\n () => formState.errors.mergeListingGroupInputs?.[index]?.name?.message,\n [formState.errors.mergeListingGroupInputs, index]\n );\n\n const onDeleteGroup = useCallback(() => {\n mergeListingGroupInputs.splice(index, 1);\n setValue('mergeListingGroupInputs', [...mergeListingGroupInputs]);\n }, [index, mergeListingGroupInputs, setValue]);\n\n const onSetValues = useCallback(\n (\n name: FormEditableFields,\n value: ListingGroupItemInput[] | string[] | number | null\n ) => {\n switch (name) {\n case 'desiredActiveListings':\n case 'minActiveListings':\n case 'maxActiveListings':\n case 'targetPercentage':\n setValue(\n `mergeListingGroupInputs.${index}.${name}`,\n value as number | null\n );\n break;\n case 'deprioritizedQuantities':\n setValue(\n `mergeListingGroupInputs.${index}.${name}`,\n value as string[] | null\n );\n break;\n case 'listingGroupItems':\n setValue(\n `mergeListingGroupInputs.${index}.listingGroupItems`,\n value as ListingGroupItemInput[]\n );\n break;\n case 'undAbsAmt':\n case 'undRelAmt':\n setValue(\n `mergeListingGroupInputs.${index}.groupUndercutSetting.${name}`,\n value as number | null\n );\n break;\n default:\n break;\n }\n },\n [index, setValue]\n );\n\n const onRegister = useCallback(\n (name: FormRegistableFields, options: RegisterOptions) => {\n switch (name) {\n case 'name':\n return register(`mergeListingGroupInputs.${index}.name`, options);\n case 'undAbsAmt':\n return register(\n `mergeListingGroupInputs.${index}.groupUndercutSetting.undAbsAmt`,\n options\n );\n default:\n break;\n }\n },\n [index, register]\n );\n\n return {\n listingsInGroupInput,\n listingGroupNameError,\n deprioritizedQuantities,\n onDeleteGroup,\n onSetValues,\n onRegister,\n };\n};\n\n// Hook to group the group item table operations\nexport const useGroupItemTableOperations = (\n listings: Listing[],\n listingGroupItems: ListingGroupItemInput[] | null,\n deprioritizedQuantities: string[] | null,\n onSetValues: (\n name: FormEditableFields,\n value: ListingGroupItemInput[] | string[] | number | null\n ) => void\n) => {\n const [sorting, setSorting] = useState([]);\n const idToSortingCriteria = useGroupSortingCriteria(listings);\n\n useEffect(() => {\n // Reset sorting when listings change\n setSorting([]);\n }, [listingGroupItems?.length]);\n\n const { venueMapInfo } = useEventMapContext();\n const rowIdToRowOrdinalMap = useMemo(() => {\n return venueMapInfo?.sections.reduce(\n (acc, section) => {\n section.rows.forEach((row) => {\n if (row.id != null && row.ordinal != null) {\n acc[row.id] = row.ordinal;\n }\n });\n return acc;\n },\n {} as Record\n );\n }, [venueMapInfo]);\n\n const assignNewPriority = useCallback(\n (newPriority: number, listingId: number) => {\n if (listingGroupItems == null) return;\n\n // Remove sorting because we are going to change the order of listings\n // should override the existing sorting\n setSorting([]);\n const sorted = listingGroupItems\n .filter((l) => l.listingId > 0)\n .toSorted((a, b) => a.priority - b.priority);\n\n const toIndex = sorted.findIndex((l) => l.priority === newPriority);\n const fromIndex = sorted.findIndex((l) => l.listingId === listingId);\n if (fromIndex === toIndex) {\n return;\n }\n\n // Enfored order by the bottom ticket quantity\n const enforedListings = moveElements(sorted, fromIndex, toIndex)\n .map((l, i) => ({ ...l, priority: i + 1 }))\n .toSorted(\n groupPrioritySort(idToSortingCriteria, deprioritizedQuantities)\n )\n .map((l, i) => ({ ...l, priority: i + 1 }));\n\n // Save the new listing (ordered by priority)\n onSetValues(`listingGroupItems`, enforedListings);\n },\n [\n deprioritizedQuantities,\n idToSortingCriteria,\n listingGroupItems,\n onSetValues,\n ]\n );\n\n const onSortingChange = useCallback(\n (updater: Updater) => {\n if (listingGroupItems == null) return;\n\n const newSorting =\n typeof updater === 'function' ? updater(sorting) : updater;\n setSorting(newSorting);\n\n // Only allow sorting by Section, Row, and Unsold Qty (i.e. remaining)\n if (!AllowedSortingColumns.includes(newSorting[0]?.id)) {\n return;\n }\n\n const flattened = listings.flatMap(flattenListingGroup);\n\n // Sort and assign new priority to all listings based on sorting\n const listingsInGroupNew = listingGroupItems\n .filter((l) => l.listingId > 0)\n .toSorted(groupColumnSort(flattened, rowIdToRowOrdinalMap, newSorting))\n .map((l, i) => ({ ...l, priority: i + 1 }));\n\n // Enfored order by the bottom ticket quantity\n const enforedListings = listingsInGroupNew\n .toSorted(\n groupPrioritySort(idToSortingCriteria, deprioritizedQuantities)\n )\n .map((l, i) => ({ ...l, priority: i + 1 }));\n\n onSetValues(`listingGroupItems`, enforedListings);\n },\n [\n sorting,\n listings,\n listingGroupItems,\n idToSortingCriteria,\n deprioritizedQuantities,\n onSetValues,\n rowIdToRowOrdinalMap,\n ]\n );\n\n const onRandomizeRanks = useCallback(() => {\n if (listingGroupItems == null) return;\n\n setSorting([]);\n randomizeInPlace(listingGroupItems); // randomize the order and set the new order as the new priority\n\n const sortedListings = listingGroupItems\n .filter((l) => l.listingId > 0)\n .map((l, i) => ({ ...l, priority: i + 1 }))\n .toSorted(groupPrioritySort(idToSortingCriteria, deprioritizedQuantities))\n .map((l, i) => ({ ...l, priority: i + 1 }));\n\n onSetValues(`listingGroupItems`, sortedListings);\n }, [\n deprioritizedQuantities,\n idToSortingCriteria,\n listingGroupItems,\n onSetValues,\n ]);\n\n const removeListingFromInput = useCallback(\n (listingId: number) => {\n if (listingGroupItems == null) return;\n\n onSetValues(`listingGroupItems`, [\n ...listingGroupItems\n .filter((lx) => lx.listingId !== listingId)\n .map((lx, i) => ({ ...lx, priority: i + 1 })),\n ]);\n },\n [listingGroupItems, onSetValues]\n );\n\n const onUpdateDeprioritizedQuantities = useCallback(\n (value: string[]) => {\n if (listingGroupItems == null) return;\n\n const filteredItems = listingGroupItems.filter((l) => l.listingId > 0);\n if (filteredItems?.length > 0) {\n const sortedListings = listingGroupItems\n .filter((l) => l.listingId > 0)\n .map((l, i) => ({ ...l, priority: i + 1 }))\n .toSorted(groupPrioritySort(idToSortingCriteria, value))\n .map((l, i) => ({ ...l, priority: i + 1 }));\n onSetValues(`listingGroupItems`, sortedListings);\n }\n onSetValues(`deprioritizedQuantities`, value);\n },\n [idToSortingCriteria, listingGroupItems, onSetValues]\n );\n\n return {\n sorting,\n assignNewPriority,\n onSortingChange,\n onRandomizeRanks,\n onUpdateDeprioritizedQuantities,\n removeListingFromInput,\n };\n};\n","import { ColumnDef, SortingFn } from '@tanstack/react-table';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { PosSelect } from 'src/core/POS/PosSelect';\nimport { vars } from 'src/core/themes';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { TableHeaderCellDiv } from 'src/core/ui/TableHeaderCellDiv';\nimport { CrossIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { TableShimmeringDiv } from 'src/tables/Table/Table.styled';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getDeliveryTypeIcon } from 'src/utils/ticketTypeUtils';\nimport { DeliveryType, IListingGroupItem } from 'src/WebApiController';\n\nimport * as styles from '../GroupListings.css';\n\nexport type IListingGroupItemWithMeta = IListingGroupItem & {\n rank: number;\n assignNewPriority: (newPriority: number, listingId: number) => void;\n setUndercutAmount: (\n listingId: number,\n undercutAbsoluteAmount?: number | null,\n undercutRelativeAmount?: number | null\n ) => void;\n priorityOptions: Record;\n removeListingFromInput: (listingId: number) => void;\n};\n\nconst DeliveryTypeCell = ({ deliveryType }: { deliveryType: DeliveryType }) => {\n const icon = getDeliveryTypeIcon(deliveryType, null, IconsFill.textStrong);\n return icon;\n};\n\n// We don't sort the table using the built-in sorting mechanism,\n// rather we sort the data in the onSortingChange callback\nconst dummySortingFn: SortingFn = (_, b) => 0;\n\nexport const getListingGroupTableConfig =\n (): ColumnDef[] => [\n {\n id: 'Rank',\n header: () => (\n \n \n \n ),\n minSize: 80,\n maxSize: 100,\n cell: ({ row: { original, depth } }) => {\n if (!original) {\n return ;\n }\n\n const { rank, assignNewPriority, priorityOptions, id } = original;\n\n if (depth > 0) return null;\n\n return (\n \n {\n if (newPriorityString) {\n const newPriority = parseInt(newPriorityString);\n assignNewPriority(newPriority, id);\n }\n }}\n valueOptionsContent={priorityOptions}\n />\n \n );\n },\n enableSorting: false,\n },\n {\n id: 'Section',\n header: () => (\n \n \n \n ),\n minSize: 50,\n maxSize: 100,\n accessorFn: (data) => data?.seating.section,\n cell: ({ row: { original } }) => {\n if (!original) {\n return ;\n }\n\n return (\n {original.seating.section}\n );\n },\n sortingFn: dummySortingFn,\n },\n {\n id: 'Row',\n header: () => (\n \n \n \n ),\n minSize: 50,\n maxSize: 70,\n accessorFn: (data) => data?.seating.row ?? '',\n cell: ({ row: { original, depth } }) => {\n if (!original) {\n return ;\n }\n\n return (\n \n {depth === 0 ? (\n original.seating.row\n ) : (\n
    \n \n
    \n )}\n
    \n );\n },\n sortingFn: dummySortingFn,\n },\n {\n id: 'Seats',\n header: () => (\n \n \n \n ),\n minSize: 50,\n maxSize: 100,\n cell: ({ row: { original } }) => {\n if (!original) {\n return ;\n }\n\n let text = original.seating.seatFr;\n if (\n original.seating.seatTo &&\n original.seating.seatTo !== original.seating.seatFr\n ) {\n text += ` - ${original.seating.seatTo}`;\n }\n\n return {text};\n },\n enableSorting: false,\n },\n {\n id: 'TicketType',\n header: () => (\n \n \n \n ),\n minSize: 50,\n maxSize: 50,\n cell: ({ row: { original } }) => {\n if (!original) {\n return ;\n }\n\n return (\n \n {}\n \n );\n },\n enableSorting: false,\n },\n {\n id: 'Remaining',\n header: () => (\n \n \n \n ),\n minSize: 70,\n maxSize: 70,\n accessorFn: (data) => data?.availQty,\n cell: function Cell({ row: { original } }) {\n if (!original) {\n return ;\n }\n\n return (\n \n {original.availQty ?? }\n \n );\n },\n sortingFn: dummySortingFn,\n },\n {\n id: 'Original',\n header: () => (\n \n \n \n ),\n minSize: 70,\n maxSize: 70,\n cell: ({ row: { original } }) => {\n if (!original) {\n return ;\n }\n\n return {original.ticketCnt};\n },\n enableSorting: false,\n },\n {\n id: 'UnitCost',\n header: () => (\n \n \n \n ),\n minSize: 70,\n maxSize: 100,\n cell: function Cell({ row: { original } }) {\n if (!original) {\n return ;\n }\n\n return (\n \n {original.unitCst?.disp ?? original?.faceValue?.disp ?? (\n \n )}\n \n );\n },\n enableSorting: false,\n },\n {\n id: 'Action',\n header: () => (\n \n \n \n ),\n minSize: 60,\n maxSize: 60,\n cell: function Cell({ row: { original } }) {\n const deleteText = useContent(ContentId.Delete);\n\n if (!original) {\n return ;\n }\n\n return (\n \n original.removeListingFromInput(original.id)}\n size={vars.iconSize.m}\n />\n \n );\n },\n enableSorting: false,\n },\n ];\n","import {\n getExpandedRowModel,\n InitialTableState,\n PaginationState,\n SortingState,\n TableOptions,\n Updater,\n} from '@tanstack/react-table';\nimport { useEffect, useMemo, useState } from 'react';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { Table } from 'src/tables/Table';\nimport { Feature } from 'src/WebApiController';\n\nimport {\n getListingGroupTableConfig,\n IListingGroupItemWithMeta,\n} from './ListingGroupTableColumnsConfig';\n\nexport type ListingGroupInputTableDataProps = {\n data: IListingGroupItemWithMeta[];\n};\n\nexport type ListingGroupInputTableProps = ListingGroupInputTableDataProps & {\n onMount?: () => void;\n onUnmount?: (state: object) => void;\n initState?: InitialTableState;\n sorting?: SortingState;\n onSortingChange?: (sorting: Updater) => void;\n useVirtuoso?: boolean;\n};\n\nconst PAGE_SIZE = 10;\n\nexport function ListingGroupInputTable({\n data,\n onMount,\n onUnmount,\n initState,\n sorting,\n onSortingChange,\n useVirtuoso,\n}: ListingGroupInputTableProps) {\n const hasAutoPricingFeature = useUserHasFeature(Feature.AutoPricing);\n const hasUndercutByRankListingGroupFeature = useUserHasFeature(\n Feature.UndercutByRankListingGroup\n );\n const [{ pageIndex, pageSize }, setPagination] = useState({\n pageIndex: initState?.pagination?.pageIndex || 0,\n pageSize: PAGE_SIZE,\n });\n const pagination = useMemo(\n () => ({\n pageIndex,\n pageSize: Math.max(pageSize, data.length),\n }),\n [data.length, pageIndex, pageSize]\n );\n\n useEffect(() => {\n onMount?.();\n });\n\n useEffect(() => {\n /**\n * Intent for `onMount` is use with 'windowing' in order to maintain user state\n * when the component is scrolled back into view.\n * Anything that needs to be persisted in `react-table` state should be added here.\n * Only update on unmount to ensure we aren't doing too many re-renders.\n */\n return () => onUnmount?.({ pagination, sorting });\n }, [pagination, sorting, onUnmount]);\n\n const options: Partial> =\n useMemo(\n () => ({\n data,\n columns: getListingGroupTableConfig().map((c) => ({\n ...c,\n enableSorting:\n c.id === 'Section' ||\n c.id === 'Row' ||\n c.id === 'Remaining' ||\n c.enableSorting,\n })),\n state: {\n pagination,\n sorting,\n },\n onPaginationChange: setPagination,\n onSortingChange: onSortingChange,\n getRowCanExpand: () =>\n hasAutoPricingFeature && hasUndercutByRankListingGroupFeature,\n getSubRows: (originalRow) =>\n (originalRow?.id ?? 0) > 0\n ? [{ ...originalRow!, id: -originalRow!.id }]\n : [], // we just want the same row - but we'll be display separate content\n getExpandedRowModel: (table) => getExpandedRowModel()(table),\n paginateExpandedRows: false,\n }),\n [\n data,\n hasAutoPricingFeature,\n hasUndercutByRankListingGroupFeature,\n onSortingChange,\n pagination,\n sorting,\n ]\n );\n\n return ;\n}\n","import clsx from 'clsx';\nimport { isEqual, range } from 'lodash-es';\nimport { ChangeEvent, useCallback, useMemo } from 'react';\nimport { MinRowsForUsingVirtuoso } from 'src/components/Accordions';\nimport {\n Content,\n getContent,\n useContent,\n useContentContext,\n} from 'src/contexts/ContentContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosMultiSelect } from 'src/core/POS/PosMultiSelect';\nimport { getTextFieldState, PosTextField } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ShuffleIcon } from 'src/svgs/ShuffleIcon';\nimport { CrossIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { roundToPrecision } from 'src/utils/numberFormatter';\nimport {\n Listing,\n ListingGroupItemInput,\n ListingGroupUndercutSetting,\n} from 'src/WebApiController';\nimport { Feature } from 'src/WebApiController';\n\nimport * as styles from '../GroupListings.css';\nimport { flattenListingGroup, getQuantitiesOptions } from './groupingUtils';\nimport {\n useGroupItemTableOperations,\n useMergeListingGroupInputForm,\n} from './ListingGroupInput.hook';\nimport { ListingGroupInputTable } from './ListingGroupInputTable';\nimport { IListingGroupItemWithMeta } from './ListingGroupTableColumnsConfig';\n\nexport const ListingGroupInput = ({\n mergeListingGroupInputIndex,\n listings,\n style,\n}: {\n listings: Listing[];\n mergeListingGroupInputIndex: number;\n style?: React.CSSProperties;\n}) => {\n const { getUiCurrency } = useLocalizationContext();\n const firstListing = useMemo(() => {\n if (listings.length === 0) {\n return undefined;\n }\n return listings[0];\n }, [listings]);\n const currency = getUiCurrency(firstListing?.currency);\n const hasAutoPricingFeature = useUserHasFeature(Feature.AutoPricing);\n const hasGroupingDripFeature = useUserHasFeature(Feature.GroupingDrip);\n\n const contentContext = useContentContext();\n const requiredMsg = useContent(ContentId.Required);\n\n const {\n listingsInGroupInput,\n listingGroupNameError,\n deprioritizedQuantities: inferredDeprioritizedQuantities, // default to event settings value\n onDeleteGroup,\n onSetValues,\n onRegister,\n } = useMergeListingGroupInputForm(mergeListingGroupInputIndex);\n const {\n groupUndercutSetting,\n listingGroupItems,\n desiredActiveListings,\n minActiveListings,\n maxActiveListings,\n targetPercentage,\n deprioritizedQuantities,\n } = listingsInGroupInput ?? {};\n const { undAbsAmt = null, undRelAmt = null } =\n groupUndercutSetting ?? ({} as ListingGroupUndercutSetting);\n\n const {\n sorting,\n assignNewPriority,\n onSortingChange,\n onRandomizeRanks,\n onUpdateDeprioritizedQuantities,\n removeListingFromInput,\n } = useGroupItemTableOperations(\n listings,\n listingGroupItems,\n inferredDeprioritizedQuantities,\n onSetValues\n );\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const setUndercutAmount = useCallback(\n (\n listingId: number,\n undercutAbsoluteAmount?: number | null,\n undercutRelativeAmount?: number | null\n ) => {\n const item = listingGroupItems.findLast((l) => l.listingId === listingId);\n if (\n !!item &&\n (undercutAbsoluteAmount != null || undercutRelativeAmount != null)\n ) {\n item.undercutSetting = {\n undAbsAmt: undercutAbsoluteAmount ?? null,\n undRelAmt: undercutRelativeAmount ?? null,\n actRankUndAbsAmt: null,\n actRankUndRelAmt: null,\n };\n\n onSetValues(`listingGroupItems`, [...listingGroupItems]);\n }\n },\n [listingGroupItems, onSetValues]\n );\n\n const data = useMemo(() => {\n if (listingGroupItems == null) return;\n\n const itemsSize = listingGroupItems.filter((l) => l.listingId > 0).length;\n const priorityOptions = range(itemsSize).reduce(\n (r, i) => {\n r[(i + 1).toString()] = (i + 1).toString();\n return r;\n },\n {} as Record\n );\n\n const listingsInGroupMap = listingGroupItems.reduce(\n (r, l) => {\n r[l.listingId] = l;\n return r;\n },\n {} as Record\n );\n\n return listings\n ?.flatMap(flattenListingGroup)\n ?.filter((l) => listingsInGroupMap[l.id])\n ?.toSorted(\n (a, b) =>\n listingsInGroupMap[a.id].priority - listingsInGroupMap[b.id].priority\n )\n ?.map((l, i) => {\n return {\n ...l,\n rank: i,\n assignNewPriority,\n setUndercutAmount,\n priorityOptions,\n removeListingFromInput,\n ltGrpUndercut: {\n undAbsAmt: null,\n undRelAmt: null,\n actRankUndAbsAmt: null,\n actRankUndRelAmt: null,\n },\n };\n });\n }, [\n assignNewPriority,\n listings,\n listingGroupItems,\n removeListingFromInput,\n setUndercutAmount,\n ]);\n\n const useVirtuoso = data && data.length > MinRowsForUsingVirtuoso;\n\n // This only happens when the container is virtuoso and the data is not ready\n if (!listingsInGroupInput || !data) {\n return null;\n }\n\n return (\n \n \n }\n errors={listingGroupNameError}\n style={{ flex: '1' }}\n >\n \n \n\n {hasAutoPricingFeature ? (\n }\n style={{ flex: '0.5' }}\n >\n (v ? parseFloat(v) : null),\n })}\n value={undAbsAmt ?? undefined}\n />\n\n {\n const v = parseFloat(e.target.value);\n let relativeValue = null;\n if (v >= 0 && v <= Number.MAX_VALUE) {\n relativeValue = Math.min(v, 100) / 100;\n }\n onSetValues(`undRelAmt`, relativeValue);\n }}\n value={\n undRelAmt != null\n ? roundToPrecision(Math.abs(undRelAmt) * 100, 8)\n : ''\n }\n />\n \n ) : null}\n {hasGroupingDripFeature == false && (\n }\n style={{ width: '155px' }}\n >\n ) => {\n const v = parseInt(e.target.value);\n let desiredActiveListings = null;\n if (v >= 0) {\n desiredActiveListings = Math.min(v, listingGroupItems.length);\n }\n onSetValues(`desiredActiveListings`, desiredActiveListings);\n }}\n />\n \n )}\n\n }\n style={{ width: '190px' }}\n >\n {\n if (!isEqual(newValues, deprioritizedQuantities)) {\n onUpdateDeprioritizedQuantities(newValues);\n }\n }}\n valueOptionsContent={getQuantitiesOptions()}\n />\n \n\n \n \n \n \n \n \n \n {hasGroupingDripFeature && (\n \n }\n style={{ width: '155px' }}\n >\n ) => {\n const v = parseInt(e.target.value);\n if (!isNaN(v)) {\n if (v > (maxActiveListings ?? 0)) {\n onSetValues(`maxActiveListings`, v);\n }\n\n onSetValues(`minActiveListings`, v);\n }\n }}\n />\n \n }\n style={{ width: '155px' }}\n >\n ) => {\n const v = parseInt(e.target.value);\n if (!isNaN(v)) {\n if (v < (minActiveListings ?? 0)) {\n onSetValues(`minActiveListings`, v);\n }\n onSetValues(`maxActiveListings`, v);\n }\n }}\n />\n \n }\n style={{ flex: '0.5' }}\n >\n {\n const v = parseFloat(e.target.value);\n let target = null;\n if (v >= 0 && v <= Number.MAX_VALUE) {\n target = Math.min(v, 100) / 100;\n }\n onSetValues(`targetPercentage`, target);\n }}\n value={\n targetPercentage != null\n ? roundToPrecision(Math.abs(targetPercentage) * 100, 8)\n : ''\n }\n />\n \n \n )}\n \n \n \n \n );\n};\n","import { ChangeEvent, useCallback, useState } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { BUCKET_OPTIONS_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { BucketType, GroupingType } from 'src/WebApiController';\n\nimport {\n ListingGroupBy,\n ListingGroupingTypesWithClusteringOptions,\n} from './groupingTypes';\n\nexport const GroupingBucketOptions = ({\n index,\n groupBy,\n canClusterByRows,\n onGroupingTypeChange,\n}: {\n index: number;\n groupBy: ListingGroupBy;\n canClusterByRows: boolean;\n onGroupingTypeChange: (\n groupByIndex: number,\n newGroupType: GroupingType,\n newNumOfClusters?: number,\n newBucketOption?: BucketType\n ) => void;\n}) => {\n const [bucketOption, setBucketOption] = useState(\n BucketType.Clusters\n );\n\n const shouldShowBucketsOption = useCallback(\n (groupBy: ListingGroupBy) => {\n if (groupBy.groupingType === GroupingType.Row) {\n return canClusterByRows;\n }\n\n return ListingGroupingTypesWithClusteringOptions.includes(\n groupBy.groupingType\n );\n },\n [canClusterByRows]\n );\n\n const onBucketOptionChange = useCallback((option: BucketType) => {\n setBucketOption(option);\n }, []);\n\n if (!shouldShowBucketsOption(groupBy)) {\n return null;\n }\n\n return (\n \n }\n style={{ width: 'max-content' }}\n >\n ) => {\n const v = parseInt(e.target.value);\n if (v >= 1) {\n if (v !== groupBy.numOfClusters) {\n onGroupingTypeChange(\n index,\n groupBy.groupingType,\n v,\n bucketOption\n );\n }\n }\n }}\n />\n \n }\n style={{ width: 'max-content' }}\n >\n {\n if (v != null) {\n onBucketOptionChange(v);\n onGroupingTypeChange(\n index,\n groupBy.groupingType,\n groupBy.numOfClusters ?? 1,\n v\n );\n }\n }}\n />\n \n \n );\n};\n","import { isEmpty, isEqual } from 'lodash-es';\nimport { ChangeEvent, useCallback, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { TableVirtuoso } from 'react-virtuoso';\nimport { SeatingInfo } from 'src/components/common/SeatingInfo';\nimport { useInventoryEventBulkActionsState } from 'src/components/Events/EventListing/InventoryEventListing/BulkActions/InventoryEventBulkActions/useInventoryEventBulkActionsState';\nimport { ListingDeliveryTypeDisplay } from 'src/components/Listings/ListingDeliveryTypeDisplay';\nimport {\n Content,\n getContent,\n useContent,\n useContentContext,\n} from 'src/contexts/ContentContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosMultiSelect } from 'src/core/POS/PosMultiSelect';\nimport { PosEnumSelect, PosSelect } from 'src/core/POS/PosSelect';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { SimpleTable, Stack } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { FormatOption } from 'src/modals/EditTableColumns';\nimport { ListingGroupIcon } from 'src/svgs';\nimport { ShuffleIcon } from 'src/svgs/ShuffleIcon';\nimport { ResetIcon } from 'src/svgs/Viagogo';\nimport { randomizeInPlace } from 'src/utils/arrayUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { newGuidId } from 'src/utils/idUtils';\nimport { roundToPrecision } from 'src/utils/numberFormatter';\nimport { getCompleteEventConfigScoreOverrides } from 'src/utils/seatScoreUtils';\nimport { sortSeating } from 'src/utils/tableUtils';\nimport { BucketType, EventWithData, GroupingType } from 'src/WebApiController';\nimport {\n Feature,\n IListingGroupItem,\n Listing,\n ListingGroupItemInput,\n MergeListingGroupInput,\n} from 'src/WebApiController';\n\nimport * as styles from '../GroupListings.css';\nimport { GroupingBucketOptions } from './GroupingBucketOptions';\nimport {\n GroupListingSortingCriteria,\n ListingGroupBy,\n ListingGroupingTypesNotSupportingAdditionalGroupBys,\n MergeListingGroupInputListFields,\n} from './groupingTypes';\nimport {\n flattenListingGroup,\n getAvailableGroupingTypes,\n getListingGroupsMap,\n getQuantitiesOptions,\n quantityMatches,\n} from './groupingUtils';\nimport {\n groupPrioritySort,\n useGroupSortingCriteria,\n} from './ListingGroupInput.hook';\n\n/**\n * The comparator function for sorting the grouped listings.\n *\n * We first sort by the admin hold status, then by the priority.\n * And always lock the remaining ticket quantity same to bottom ticket quantity at the bottom.\n *\n * @param idToSortingCriteria\n * @param deprioritizedQuantities\n * @returns the sorting function\n */\nconst prioritySort =\n (\n idToSortingCriteria: Record,\n deprioritizedQuantities: string[] | null\n ) =>\n (a: T, b: T) => {\n const criteriaA = idToSortingCriteria[a.listingId];\n const criteriaB = idToSortingCriteria[b.listingId];\n if (!isEmpty(deprioritizedQuantities)) {\n const matchesA = quantityMatches(\n criteriaA.availableQuantity,\n deprioritizedQuantities\n );\n const matchesB = quantityMatches(\n criteriaB.availableQuantity,\n deprioritizedQuantities\n );\n if (matchesA || matchesB) {\n if (matchesA) {\n return 1;\n }\n if (matchesB) {\n return -1;\n }\n }\n }\n if (criteriaA.isAdminHold !== criteriaB.isAdminHold) {\n return criteriaA.isAdminHold ? 1 : -1;\n }\n return a.priority - b.priority;\n };\n\nexport const ListingTableForGroups = ({\n event,\n eventIndex,\n}: {\n event: EventWithData;\n eventIndex: number;\n}) => {\n const { watch, setValue, getValues } =\n useFormContext();\n\n const { filterQueryWithEventIds } = useInventoryEventBulkActionsState(\n event.event\n );\n\n const hasBulkActionGroupListingsFeature = useUserHasFeature(\n Feature.BulkActionGroupListings\n );\n\n const eventListings = useMemo(() => {\n const selectedListingIds = filterQueryWithEventIds.entityIds ?? [];\n if (\n selectedListingIds.length == 0 ||\n event.entities.listings == null ||\n !hasBulkActionGroupListingsFeature\n ) {\n return event.entities.listings;\n }\n\n return event.entities.listings.filter((l) =>\n selectedListingIds.includes(l.id)\n );\n }, [\n filterQueryWithEventIds.entityIds,\n event.entities.listings,\n hasBulkActionGroupListingsFeature,\n ]);\n\n const mergeListingGroupInputs = watch('mergeListingGroupInputs');\n const noneStr = useContent(ContentId.None);\n\n const hasAutoPricingFeature = useUserHasFeature(Feature.AutoPricing);\n const hasGroupingDripFeature = useUserHasFeature(Feature.GroupingDrip);\n const hasListingGroupingMethodsFeature = useUserHasFeature(\n Feature.ListingGroupingMethods\n );\n\n const { getUiCurrency } = useLocalizationContext();\n const firstListing = useMemo(() => {\n if (eventListings != null && eventListings.length > 0) {\n return eventListings[0] ?? undefined;\n }\n }, [eventListings]);\n const currency = getUiCurrency(firstListing?.currency ?? 'USD');\n\n // Purposely not using useMemo for these eventMergeListingGroupInputs and availableGroups\n // because the useMemo will not detect a change to mergeListingGroupInputs\n const eventMergeListingGroupInputs = mergeListingGroupInputs.filter(\n (m) =>\n event.event.viagVirtualId ===\n (m.viagogoEventId?.toString() ?? m.viagogoMappingId)\n );\n const availableGroups = eventMergeListingGroupInputs.reduce(\n (r, g) => {\n r[g.listingGroupId] = g.name;\n return r;\n },\n { None: noneStr } as Record\n );\n\n // Following the pattern above, we still want to memoize the options to\n // avoid unnecessary re-renders\n const availableGroupsSerialized = useMemo(\n () => JSON.stringify(availableGroups),\n [availableGroups]\n );\n\n const availableGroupsMemo = useMemo(\n () => availableGroups,\n // useMemo uses referential equality to determine if the value has changed\n // so we need to serialize the object to a string to ensure that it is\n // the same object\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [availableGroupsSerialized]\n );\n\n const groupBys = watch(`eventSettings.${eventIndex}.groupBys`);\n const desiredActiveListings = watch(\n `eventSettings.${eventIndex}.desiredActiveListings`\n );\n const deprioritizedQuantities = watch(\n `eventSettings.${eventIndex}.deprioritizedQuantities`\n );\n const templateUndercutAbsoluteAmount = watch(\n 'templateSettings.templateRankPremiums.undercutAbsoluteAmount'\n );\n const templateUndercutRelativeAmount = watch(\n 'templateSettings.templateRankPremiums.undercutRelativeAmount'\n );\n const templateMinActiveListings = watch('templateSettings.minActiveListings');\n const templateMaxActiveListings = watch('templateSettings.maxActiveListings');\n const templateTargetPercentage = watch('templateSettings.targetPercentage');\n\n const contentContext = useContentContext();\n\n const newGroupName = useContent(ContentId.NewGroup);\n\n // This is used only for ordering of the grouped listings\n const idToSortingCriteria = useGroupSortingCriteria(eventListings ?? []);\n\n const onSortingListing = useCallback(\n (\n groupIndex: number,\n overrideQuantities: string[] | null,\n additionalInput?: ListingGroupItemInput,\n listingIdsToRemove?: Set | null\n ) => {\n if (groupIndex >= mergeListingGroupInputs.length) {\n return;\n }\n const group = mergeListingGroupInputs[groupIndex];\n\n // Sort based on the group level deprioritizedQuantities default to event level value\n const quantities = overrideQuantities ?? deprioritizedQuantities;\n const updatedListingGroupItems = group.listingGroupItems\n .filter((gl) => !listingIdsToRemove?.has(gl.listingId))\n .concat(additionalInput || [])\n .map((gl, i) => ({ ...gl, priority: i + 1 }))\n .toSorted(prioritySort(idToSortingCriteria, quantities))\n .map((gl, i) => ({ ...gl, priority: i + 1 }));\n\n setValue(\n `mergeListingGroupInputs.${groupIndex}.listingGroupItems`,\n updatedListingGroupItems\n );\n },\n [\n mergeListingGroupInputs,\n deprioritizedQuantities,\n idToSortingCriteria,\n setValue,\n ]\n );\n\n // Sort the group listings on add the new listing to the group\n const onListingIdsSelected = useCallback(\n (listing: Listing, newGroupId: string | null) => {\n const allSelectedListings = flattenListingGroup(listing);\n\n allSelectedListings.forEach((l) => {\n const oldGroupIndex = mergeListingGroupInputs.findIndex((g) =>\n g.listingGroupItems.some((gl) => gl.listingId === l.id)\n );\n\n if (oldGroupIndex >= 0) {\n const overrideQuantities = getValues(\n `mergeListingGroupInputs.${oldGroupIndex}.deprioritizedQuantities`\n );\n\n const listingIdsToRemove = new Set(\n allSelectedListings.map((l) => l.id)\n );\n\n onSortingListing(\n oldGroupIndex,\n overrideQuantities,\n undefined,\n listingIdsToRemove\n );\n }\n\n const groupIndex = mergeListingGroupInputs.findIndex(\n (g) => g.listingGroupId === newGroupId\n );\n if (groupIndex >= 0) {\n const overrideQuantities = getValues(\n `mergeListingGroupInputs.${groupIndex}.deprioritizedQuantities`\n );\n onSortingListing(groupIndex, overrideQuantities, {\n listingId: l.id,\n priority: -1,\n groupId: l.ltGrpId,\n undercutSetting: null,\n });\n }\n });\n },\n [getValues, mergeListingGroupInputs, onSortingListing]\n );\n\n const { venueMapInfo, activeConfigOverride } = useEventMapContext();\n\n const rowIdToRowOrdinalMap = useMemo(() => {\n return venueMapInfo?.sections.reduce(\n (acc, section) => {\n section.rows.forEach((row) => {\n if (row.id != null && row.ordinal != null) {\n acc[row.id] = row.ordinal;\n }\n });\n return acc;\n },\n {} as Record\n );\n }, [venueMapInfo]);\n\n // In order to be able to cluster by rows, we need to have the row ordinals available for all listings\n const canClusterByRows = useMemo(() => {\n if (!eventListings?.length || rowIdToRowOrdinalMap == null) {\n return false;\n }\n\n const listingsForGrouping = eventListings.flatMap(flattenListingGroup);\n return listingsForGrouping.every((l) => {\n const rowOrdinal =\n rowIdToRowOrdinalMap !== undefined && l.seating?.rowId != null\n ? (rowIdToRowOrdinalMap[l.seating?.rowId] ?? undefined)\n : undefined;\n\n return rowOrdinal !== undefined;\n });\n }, [eventListings, rowIdToRowOrdinalMap]);\n\n const scoreOverrides = useMemo(\n () =>\n getCompleteEventConfigScoreOverrides(\n venueMapInfo?.sectionScores,\n activeConfigOverride?.scoreOverrides,\n false\n ),\n [activeConfigOverride?.scoreOverrides, venueMapInfo?.sectionScores]\n );\n\n const getGroupedListings = useCallback(\n (groupBys: ListingGroupBy[]) => {\n if (!eventListings?.length) {\n return [];\n }\n\n const listingsForGrouping = eventListings.flatMap(flattenListingGroup);\n\n const listingGroupsMap = getListingGroupsMap(\n groupBys,\n contentContext,\n listingsForGrouping,\n scoreOverrides,\n venueMapInfo?.sections,\n rowIdToRowOrdinalMap,\n canClusterByRows\n );\n\n return !listingGroupsMap\n ? []\n : Object.values(listingGroupsMap)\n .filter((group) => group.data.length)\n .toSorted((a, b) => a.name.localeCompare(b.name))\n .map((group) => {\n const mappedListings = group.data\n .map((l, i) => ({\n // listingId: number\n listingId: l.id,\n // priority: number\n priority: i + 1,\n groupId: (l as IListingGroupItem).ltGrpId,\n }))\n .toSorted(\n prioritySort(idToSortingCriteria, deprioritizedQuantities)\n )\n .map((l, i) => ({\n listingId: l.listingId,\n priority: i + 1,\n groupId: l.groupId,\n }));\n\n const groupingMethods = groupBys.map((groupBy, index) => {\n return {\n groupingOrder: index,\n groupingType: groupBy.groupingType,\n groupingValue: group.values?.[index] ?? null,\n numberOfBucket: groupBy.numOfClusters ?? null,\n bucketType: groupBy.bucketOption ?? null,\n };\n });\n\n return {\n groupingName: group.name,\n mappedListings,\n viagogoEventId: event.event.viagId,\n viagogoMappingId: event.event.mappingId,\n groupingMethods: hasListingGroupingMethodsFeature\n ? {\n groupingMethods,\n }\n : null,\n };\n });\n },\n [\n eventListings,\n event.event.viagId,\n event.event.mappingId,\n contentContext,\n scoreOverrides,\n venueMapInfo?.sections,\n rowIdToRowOrdinalMap,\n canClusterByRows,\n idToSortingCriteria,\n deprioritizedQuantities,\n hasListingGroupingMethodsFeature,\n ]\n );\n\n const updateGroupedListings = useCallback(\n (localGroupBys: ListingGroupBy[]) => {\n if (!localGroupBys?.length || isEqual(localGroupBys, groupBys)) {\n return;\n }\n\n setValue(`eventSettings.${eventIndex}.groupBys`, [...localGroupBys]);\n const deprioritizedQuantities = getValues(\n `eventSettings.${eventIndex}.deprioritizedQuantities`\n );\n\n switch (localGroupBys[0].groupingType) {\n case GroupingType.Custom:\n if (eventMergeListingGroupInputs.length === 0) {\n setValue('mergeListingGroupInputs', [\n ...mergeListingGroupInputs,\n {\n listingGroupId: newGuidId(),\n name: `${newGroupName} 1`,\n listingGroupItems: [],\n desiredActiveListings: 0,\n minActiveListings: 0,\n maxActiveListings: 0,\n targetPercentage: 0,\n deprioritizedQuantities,\n viagogoEventId: event.event.viagId,\n viagogoMappingId: event.event.mappingId,\n marketplaceSettings: null,\n groupUndercutSetting: {\n undAbsAmt: null,\n undRelAmt: null,\n actRankUndAbsAmt: null,\n actRankUndRelAmt: null,\n },\n groupingMethods: null,\n } as MergeListingGroupInput,\n ]);\n }\n\n break;\n default:\n {\n const nonEventGroupInputs = mergeListingGroupInputs.filter(\n (m) =>\n event.event.viagVirtualId !==\n (m.viagogoEventId?.toString() ?? m.viagogoMappingId)\n );\n const groups = getGroupedListings(localGroupBys);\n setValue('mergeListingGroupInputs', [\n ...nonEventGroupInputs,\n ...groups.map(\n ({\n groupingName,\n mappedListings,\n viagogoEventId,\n viagogoMappingId,\n groupingMethods,\n }) =>\n ({\n listingGroupId: newGuidId(),\n name: groupingName,\n listingGroupItems: mappedListings,\n desiredActiveListings: 0,\n deprioritizedQuantities,\n marketplaceSettings: null,\n viagogoEventId,\n viagogoMappingId,\n groupUndercutSetting: {\n undAbsAmt: null,\n undRelAmt: null,\n actRankUndAbsAmt: null,\n actRankUndRelAmt: null,\n },\n groupingMethods,\n }) as MergeListingGroupInput\n ),\n ]);\n }\n break;\n }\n },\n [\n event.event.mappingId,\n event.event.viagId,\n event.event.viagVirtualId,\n eventIndex,\n eventMergeListingGroupInputs.length,\n getGroupedListings,\n getValues,\n groupBys,\n mergeListingGroupInputs,\n newGroupName,\n setValue,\n ]\n );\n\n const onGroupingTypeChange = useCallback(\n (\n groupByIndex: number,\n newGroupType: GroupingType,\n newNumOfClusters?: number,\n newBucketOption?: BucketType\n ) => {\n const newGroupBys = groupBys.map((gb) => ({ ...gb }));\n if (groupByIndex >= groupBys.length) {\n newGroupBys.push({\n groupingType: newGroupType,\n numOfClusters: newNumOfClusters,\n bucketOption: newBucketOption,\n } as ListingGroupBy);\n } else {\n newGroupBys[groupByIndex].groupingType = newGroupType;\n newGroupBys[groupByIndex].numOfClusters = newNumOfClusters;\n newGroupBys[groupByIndex].bucketOption = newBucketOption;\n }\n\n updateGroupedListings(newGroupBys);\n },\n [groupBys, updateGroupedListings]\n );\n\n const onRandomizeRanks = useCallback(() => {\n const newMlgis = mergeListingGroupInputs.map((lg) => {\n randomizeInPlace(lg.listingGroupItems); // randomize the order and set the new order as the new priority\n\n const sortedListings = lg.listingGroupItems\n .toSorted(prioritySort(idToSortingCriteria, deprioritizedQuantities))\n .map((l, i) => ({ ...l, priority: i + 1 }));\n\n return { ...lg, listingGroupItems: sortedListings };\n });\n setValue('mergeListingGroupInputs', newMlgis);\n }, [\n deprioritizedQuantities,\n idToSortingCriteria,\n mergeListingGroupInputs,\n setValue,\n ]);\n\n const onResetAllGroups = useCallback(() => {\n const otherGroups = mergeListingGroupInputs.filter(\n (m) =>\n event.event.viagVirtualId !==\n (m.viagogoEventId?.toString() ?? m.viagogoMappingId)\n );\n setValue('mergeListingGroupInputs', otherGroups);\n setValue(`eventSettings.${eventIndex}`, {\n groupBys: [\n {\n groupingType: GroupingType.Custom,\n },\n {\n groupingType: GroupingType.None,\n },\n ],\n desiredActiveListings: 0,\n minActiveListings: 0,\n maxActiveListings: 0,\n targetPercentage: 0,\n deprioritizedQuantities: [],\n });\n }, [\n event.event.viagVirtualId,\n eventIndex,\n mergeListingGroupInputs,\n setValue,\n ]);\n\n const renderHeaderContent = useCallback(() => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n }, []);\n\n const renderGroupDripTemplate = useCallback(() => {\n if (!hasGroupingDripFeature) {\n return null;\n }\n\n return (\n \n }\n style={{ width: '155px' }}\n >\n ) => {\n const v = parseInt(e.target.value);\n if (!isNaN(v)) {\n setValue('templateSettings.minActiveListings', v);\n\n if (v > (templateMaxActiveListings ?? 0)) {\n setValue('templateSettings.maxActiveListings', v);\n }\n\n let hasChanged = false;\n mergeListingGroupInputs.forEach((t) => {\n if (t.minActiveListings !== v) {\n t.minActiveListings = v;\n hasChanged = true;\n }\n\n if (\n v > (templateMaxActiveListings ?? 0) &&\n t.maxActiveListings !== v\n ) {\n t.maxActiveListings = v;\n hasChanged = true;\n }\n });\n if (hasChanged) {\n setValue('mergeListingGroupInputs', [\n ...mergeListingGroupInputs,\n ]);\n }\n }\n }}\n />\n \n }\n style={{ width: '155px' }}\n >\n ) => {\n const v = parseInt(e.target.value);\n if (!isNaN(v)) {\n setValue('templateSettings.maxActiveListings', v);\n\n if (v < (templateMinActiveListings ?? 0)) {\n setValue('templateSettings.minActiveListings', v);\n }\n\n let hasChanged = false;\n mergeListingGroupInputs.forEach((t) => {\n if (\n v < (templateMinActiveListings ?? 0) &&\n t.minActiveListings !== v\n ) {\n t.minActiveListings = v;\n hasChanged = true;\n }\n\n if (t.maxActiveListings !== v) {\n t.maxActiveListings = v;\n hasChanged = true;\n }\n });\n\n if (hasChanged) {\n setValue('mergeListingGroupInputs', [\n ...mergeListingGroupInputs,\n ]);\n }\n }\n }}\n />\n \n }\n style={{ flex: '0.5' }}\n >\n {\n const v = parseFloat(e.target.value);\n let target = v;\n if (v >= 0 && v <= Number.MAX_VALUE) {\n target = Math.min(v, 100) / 100;\n }\n\n setValue('templateSettings.targetPercentage', target);\n\n let hasChanged = false;\n mergeListingGroupInputs.forEach((t) => {\n if (t.targetPercentage !== target) {\n t.targetPercentage = target;\n hasChanged = true;\n }\n });\n\n if (hasChanged) {\n setValue('mergeListingGroupInputs', [\n ...mergeListingGroupInputs,\n ]);\n }\n }}\n />\n \n \n );\n }, [\n hasGroupingDripFeature,\n mergeListingGroupInputs,\n setValue,\n templateMaxActiveListings,\n templateMinActiveListings,\n templateTargetPercentage,\n ]);\n\n const renderRowContent = useCallback(\n (l: Listing, ltGrpId: string | undefined) => {\n return (\n <>\n \n {\n onListingIdsSelected(l, newGroupId);\n }}\n valueOptionsContent={availableGroupsMemo}\n />\n \n \n \n {l.isLtGrp && (\n \n )}\n \n \n \n \n \n \n \n {l.availQty}\n \n \n {l.ticketCnt}\n \n \n {l.unitCst?.disp ?? l.faceValue?.disp}\n \n \n );\n },\n [availableGroupsMemo, onListingIdsSelected]\n );\n\n const eventListingsData = useMemo(\n () =>\n eventListings?.toSorted((l1, l2) => sortSeating(l1.seating, l2.seating)),\n [eventListings]\n );\n\n return (\n <>\n \n \n {groupBys\n .filter((_, i) =>\n i == 0\n ? true // If index 0, any is ok\n : !ListingGroupingTypesNotSupportingAdditionalGroupBys.includes(\n // else require first one to be Custom or None\n groupBys[0].groupingType\n )\n )\n .map((gb, i) => (\n \n \n }\n style={{ width: 'max-content' }}\n >\n \n v && onGroupingTypeChange(i, v, gb.numOfClusters)\n }\n valueOptionsContent={getAvailableGroupingTypes(\n i === 0\n ? []\n : groupBys\n .map((gb) => gb.groupingType)\n .filter((_, prevI) => prevI < i)\n )}\n />\n \n \n \n ))}\n \n {hasAutoPricingFeature ? (\n \n }\n style={{ flex: '0.5' }}\n >\n {\n const v = parseFloat(e.target.value);\n if (v >= 0 && v <= Number.MAX_VALUE) {\n setValue(\n `templateSettings.templateRankPremiums.undercutAbsoluteAmount`,\n v\n );\n\n let hasChanged = false;\n mergeListingGroupInputs.forEach((t) => {\n if (\n t.groupUndercutSetting != null &&\n t.groupUndercutSetting.undAbsAmt !== v\n ) {\n t.groupUndercutSetting.undAbsAmt = v;\n hasChanged = true;\n }\n });\n\n if (hasChanged) {\n setValue('mergeListingGroupInputs', [\n ...mergeListingGroupInputs,\n ]);\n }\n }\n }}\n />\n\n {\n const v = parseFloat(e.target.value);\n if (v >= 0 && v <= Number.MAX_VALUE) {\n const relativeValue = Math.min(v, 100) / 100;\n setValue(\n `templateSettings.templateRankPremiums.undercutRelativeAmount`,\n relativeValue\n );\n\n let hasChanged = false;\n mergeListingGroupInputs.forEach((t) => {\n if (\n t.groupUndercutSetting != null &&\n t.groupUndercutSetting.undRelAmt !== relativeValue\n ) {\n t.groupUndercutSetting.undRelAmt = relativeValue;\n hasChanged = true;\n }\n });\n\n if (hasChanged) {\n setValue('mergeListingGroupInputs', [\n ...mergeListingGroupInputs,\n ]);\n }\n }\n }}\n value={\n templateUndercutRelativeAmount != null\n ? roundToPrecision(\n Math.abs(templateUndercutRelativeAmount) * 100,\n 8\n )\n : ''\n }\n />\n \n {hasGroupingDripFeature == false && (\n }\n style={{ width: 'fit-content' }}\n >\n ) => {\n const value = e.target.value;\n const v = parseInt(value);\n if (v >= 0) {\n if (v !== desiredActiveListings) {\n setValue(\n `eventSettings.${eventIndex}.desiredActiveListings`,\n v\n );\n }\n\n let hasChanged = false;\n mergeListingGroupInputs.forEach((t) => {\n if (t.desiredActiveListings !== v) {\n t.desiredActiveListings = v;\n hasChanged = true;\n }\n });\n\n if (hasChanged) {\n setValue('mergeListingGroupInputs', [\n ...mergeListingGroupInputs,\n ]);\n }\n }\n }}\n />\n \n )}\n }\n style={{ width: 'fit-content' }}\n >\n {\n if (!isEqual(newValues, deprioritizedQuantities)) {\n setValue(\n `eventSettings.${eventIndex}.deprioritizedQuantities`,\n newValues\n );\n }\n mergeListingGroupInputs.forEach((t, index) => {\n if (!isEqual(t.deprioritizedQuantities, newValues)) {\n t.deprioritizedQuantities = newValues;\n const sortedListings = (t.listingGroupItems || [])\n .filter((l) => l.listingId > 0)\n .map((l, i) => ({ ...l, priority: i + 1 }))\n .toSorted(\n groupPrioritySort(idToSortingCriteria, newValues)\n )\n .map((l, i) => ({ ...l, priority: i + 1 }));\n t.listingGroupItems = [...sortedListings];\n\n setValue(`mergeListingGroupInputs.${index}`, {\n ...t,\n deprioritizedQuantities: newValues,\n listingGroupItems: sortedListings,\n });\n }\n });\n }}\n valueOptionsContent={getQuantitiesOptions()}\n />\n \n }\n style={{ width: 'fit-content' }}\n >\n \n \n \n \n \n \n ) : null}\n \n {renderGroupDripTemplate()}\n
    \n {!eventListingsData ? (\n \n ) : (\n {\n const flattendListings = flattenListingGroup(l).map(\n (fl) => fl.id\n );\n const ltGrpId = mergeListingGroupInputs.find((m) =>\n Boolean(\n m.listingGroupItems.some((ml) =>\n flattendListings.includes(ml.listingId)\n )\n )\n )?.listingGroupId;\n\n return renderRowContent(l, ltGrpId);\n }}\n />\n )}\n
    \n \n );\n};\n","import { useCallback } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Virtuoso } from 'react-virtuoso';\nimport * as EmptySectionContent from 'src/components/common/EmptySectionContent';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport * as Tabs from 'src/core/ui/Tabs';\nimport { useEventMarketplaceSettings } from 'src/hooks/useEventMarketplaceSettings';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { newGuidId } from 'src/utils/idUtils';\nimport { EventWithData } from 'src/WebApiController';\nimport { Event, MergeListingGroupInput } from 'src/WebApiController';\n\nimport IconBulletList from '~icons/pos/bulletList';\n\nimport * as styles from '../GroupListings.css';\nimport { GroupingTemplates } from './GroupingTemplates';\nimport { MergeListingGroupInputListFields } from './groupingTypes';\nimport { getListingsForMergeListingGroupInput } from './groupingUtils';\nimport { ListingGroupInput } from './ListingGroupInput';\nimport { ListingTableForGroups } from './ListingTableForGroups';\n\nconst TemplateTabKey = 'Template_Tab';\n\nexport const EventGroupings = ({\n events,\n onEventSelected,\n containerHeight,\n}: {\n events: EventWithData[];\n onEventSelected: (event?: EventWithData) => void;\n containerHeight?: number;\n}) => {\n const { watch, formState, setValue, getValues } =\n useFormContext();\n\n const mergeListingGroupInputs = watch('mergeListingGroupInputs');\n const newGroupName = useContent(ContentId.NewGroup);\n\n const { defaultListingMarketplaceSettings } = useEventMarketplaceSettings(\n events?.[0]?.event\n );\n\n const onAddNewGroup = useCallback(\n (event: Event, eventIndex: number) => {\n mergeListingGroupInputs.push({\n listingGroupId: newGuidId(),\n name: `${newGroupName} ${mergeListingGroupInputs.length + 1}`,\n desiredActiveListings: getValues(\n `eventSettings.${eventIndex}.desiredActiveListings`\n ),\n minActiveListings: getValues(\n `eventSettings.${eventIndex}.minActiveListings`\n ),\n maxActiveListings: getValues(\n `eventSettings.${eventIndex}.maxActiveListings`\n ),\n targetPercentage: getValues(\n `eventSettings.${eventIndex}.targetPercentage`\n ),\n deprioritizedQuantities: getValues(\n `eventSettings.${eventIndex}.deprioritizedQuantities`\n ),\n marketplaceSettings: {\n listingMarketplaceSettings: defaultListingMarketplaceSettings,\n },\n viagogoEventId: event.viagId,\n viagogoMappingId: event.mappingId,\n listingGroupItems: [],\n groupUndercutSetting: {\n undAbsAmt: null,\n undRelAmt: null,\n actRankUndAbsAmt: null,\n actRankUndRelAmt: null,\n },\n groupingMethods: {\n groupingMethods: [],\n },\n } as MergeListingGroupInput);\n\n setValue('mergeListingGroupInputs', [...mergeListingGroupInputs]);\n },\n [\n defaultListingMarketplaceSettings,\n getValues,\n mergeListingGroupInputs,\n newGroupName,\n setValue,\n ]\n );\n\n if (!events.length) {\n return (\n }>\n \n \n );\n }\n\n return (\n 1 ? TemplateTabKey : events[0].event.viagVirtualId\n }\n >\n {events.length > 1 && (\n <>\n \n onEventSelected(undefined)}\n >\n \n \n {events.map((ev, i) => {\n let hasErrors = false;\n mergeListingGroupInputs.forEach((m, i) => {\n const isForThisEvent =\n ev.event.viagVirtualId ===\n (m.viagogoEventId?.toString() ?? m.viagogoMappingId);\n\n if (isForThisEvent) {\n hasErrors =\n hasErrors ||\n Boolean(\n formState.errors.mergeListingGroupInputs?.[i]?.name\n ?.message\n );\n }\n });\n\n return (\n onEventSelected(ev)}\n >\n {i + 1}\n \n );\n })}\n \n \n \n \n \n )}\n\n {events.map((ev, i) => {\n const groupingInputs = mergeListingGroupInputs.filter(\n (m) =>\n ev.event.viagVirtualId ===\n (m.viagogoEventId?.toString() ?? m.viagogoMappingId)\n );\n\n return (\n \n \n 1\n ? `calc(${containerHeight}px - ${vars.spacing['3xl']} - ${vars.spacing['5xl']})`\n : `calc(${containerHeight}px - ${vars.spacing['m']})`,\n }\n : undefined\n }\n >\n (\n \n ),\n Footer: () => (\n <>\n {' '}\n {!groupingInputs.length && (\n }>\n \n \n )}\n
    \n onAddNewGroup(ev.event, i)}\n variant=\"text\"\n >\n + \n \n
    \n \n ),\n }}\n itemContent={(index, group) => (\n \n )}\n />\n \n
    \n \n );\n })}\n \n );\n};\n","import { isEmpty } from 'lodash-es';\nimport { useCallback, useMemo, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { EventWithData } from 'src/WebApiController';\nimport {\n Feature,\n ListingGroup,\n ListingGroupItemInput,\n MergeListingGroupInput,\n} from 'src/WebApiController';\n\nimport { MergeListingGroupInputListFields } from './components/groupingTypes';\nimport { flattenListingGroup } from './components/groupingUtils';\n\nexport const useFullySoldFilter = (\n events: EventWithData[],\n listingGroup?: ListingGroup\n) => {\n const [excludeFullySold, setExcludeFullySold] = useState(false);\n const hasExcludeFullySoldInGroupFeature = useUserHasFeature(\n Feature.ExcludeFullySoldInGroup\n );\n\n const { watch, setValue, formState } =\n useFormContext();\n\n const mergeListingGroupInputs = watch('mergeListingGroupInputs');\n\n const fullySoldListingIds = useMemo(\n () =>\n events\n .flatMap((ev) =>\n (ev.entities.listings ?? []).flatMap(flattenListingGroup)\n )\n .filter((l) => l.id > 0 && l.availQty <= 0)\n .map((l) => l.id),\n [events]\n );\n\n const hasFullySoldListings = useMemo(() => {\n if (listingGroup) {\n return (\n (formState?.defaultValues?.mergeListingGroupInputs?.[0]\n ?.listingGroupItems || []) as ListingGroupItemInput[]\n ).some((item) => fullySoldListingIds.includes(item!.listingId!));\n }\n return !isEmpty(fullySoldListingIds);\n }, [\n formState?.defaultValues?.mergeListingGroupInputs,\n fullySoldListingIds,\n listingGroup,\n ]);\n\n const sanitizedEvents = useMemo(() => {\n if (\n hasExcludeFullySoldInGroupFeature &&\n excludeFullySold &&\n hasFullySoldListings\n ) {\n return events.map((event) => ({\n ...event,\n listings: (event.entities.listings ?? []).filter(\n ({ id }) => !fullySoldListingIds.includes(id)\n ),\n }));\n }\n return events;\n }, [\n hasExcludeFullySoldInGroupFeature,\n excludeFullySold,\n hasFullySoldListings,\n events,\n fullySoldListingIds,\n ]);\n\n const onToggleExcludeFullySold = useCallback(\n (e: React.ChangeEvent) => {\n const isChecked = e.target.checked;\n if (isChecked) {\n const clonedInputs = [...mergeListingGroupInputs];\n for (const [index, input] of clonedInputs.entries()) {\n clonedInputs[index] = {\n ...input,\n listingGroupItems: (input.listingGroupItems || [])\n .filter(\n ({ listingId }) => !fullySoldListingIds.includes(listingId)\n )\n .map((item, idx) => ({\n ...item,\n priority: idx + 1,\n })),\n };\n }\n setValue('mergeListingGroupInputs', clonedInputs);\n } else {\n // Reset to default values\n if (listingGroup && formState?.defaultValues?.mergeListingGroupInputs) {\n setValue(\n 'mergeListingGroupInputs',\n (formState.defaultValues.mergeListingGroupInputs ||\n []) as MergeListingGroupInput[]\n );\n }\n }\n setExcludeFullySold(isChecked);\n },\n [\n formState.defaultValues?.mergeListingGroupInputs,\n fullySoldListingIds,\n listingGroup,\n mergeListingGroupInputs,\n setValue,\n ]\n );\n\n const showExcludeFullySold = useMemo(\n () => hasExcludeFullySoldInGroupFeature && hasFullySoldListings,\n [hasFullySoldListings, hasExcludeFullySoldInGroupFeature]\n );\n\n return {\n excludeFullySold,\n showExcludeFullySold,\n mergeListingGroupInputs,\n sanitizedEvents,\n onToggleExcludeFullySold,\n };\n};\n","import { useMeasure } from 'react-use';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Switch } from 'src/core/interim/Switch';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { EventGroupings } from './components/EventGroupings';\nimport { GroupListingsBodyProps } from './components/groupingTypes';\nimport { getListingsForMergeListingGroupInput } from './components/groupingUtils';\nimport { ListingGroupInput } from './components/ListingGroupInput';\nimport { useFullySoldFilter } from './GroupListingsBody.hook';\n\nexport const GroupListingsBody = ({\n events,\n listingGroup,\n onEventSelected,\n}: GroupListingsBodyProps) => {\n const {\n excludeFullySold,\n showExcludeFullySold,\n sanitizedEvents,\n mergeListingGroupInputs,\n onToggleExcludeFullySold,\n } = useFullySoldFilter(events, listingGroup);\n\n const [containerRef, { height: containerHeight }] =\n useMeasure();\n\n return (\n \n {showExcludeFullySold && (\n }\n >\n \n \n )}\n \n {listingGroup ? (\n \n ) : (\n \n )}\n \n \n );\n};\n","import { HubConnectionState } from '@microsoft/signalr';\nimport {\n ComponentProps,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { ConfirmButton } from 'src/components/Buttons';\nimport { BulkEditStatus } from 'src/components/common/BulkActions/BulkEditStatus';\nimport { EventSearch } from 'src/components/Events/EventSearch';\nimport { INVENTORY_BULK_CREATE_LISTING_GROUPS_KEY } from 'src/components/Listings/InventoryActionDropdown';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n BulkEditStage,\n useBulkEditHubContext,\n} from 'src/contexts/BulkEditHubContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { EventMapContextProvider } from 'src/contexts/EventMapContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { ConfirmDialog } from 'src/core/interim/dialogs/ConfirmDialog';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { RotatingWrapper } from 'src/core/ui/AnimatingWrapper';\nimport * as Tabs from 'src/core/ui/Tabs';\nimport { useListingGroupPricingSettings } from 'src/hooks/api/useListingGroupPricingSettings';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useBulkEditHub } from 'src/hooks/useBulkEditHub';\nimport { useEventMarketplaceSettings } from 'src/hooks/useEventMarketplaceSettings';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { CancellableFormFooter } from 'src/modals/common';\nimport { CancellableFormHeader } from 'src/modals/common/CancellableFormHeader';\nimport { ConnectedEventEntityHeader } from 'src/modals/common/EventEntityHeader';\nimport { ModalBody, ModalFooter } from 'src/modals/Modal';\nimport { CrossIcon, ProcessingIcon } from 'src/svgs/Viagogo';\nimport { randomizeInPlace } from 'src/utils/arrayUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { newGuidId } from 'src/utils/idUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n BulkActionType,\n EventConfigClient,\n EventWithData,\n GroupingType,\n Listing,\n} from 'src/WebApiController';\nimport {\n ActionOutboxEntityType,\n BulkEditListingClient,\n Event,\n Feature,\n ListingGroup,\n ListingGroupClient,\n ListingGroupItemInput,\n MergeListingGroupInput,\n} from 'src/WebApiController';\n\nimport { Summary } from '../common/Summary';\nimport { VenueConfigSummary } from '../common/Summary/VenueConfigSummary';\nimport {\n ModalBodyDataContainer,\n ModalBodyHeaderContainer,\n} from '../Modal/Modal.styled';\nimport { AutoPricingSettings } from './components/AutoPricingSettings/AutoPricingSettings';\nimport {\n GroupingTemplateSeating,\n MergeListingGroupInputListFields,\n} from './components/groupingTypes';\nimport {\n flattenListingGroup,\n generateMergeListingGroupInputsForEvents,\n} from './components/groupingUtils';\nimport { ListingGroupAutoPricingSettingsFormContentWrapper } from './components/ListingGroupAutoPricingSettingsFormContentWrapper/ListingGroupAutoPricingSettingsFormContentWrapper';\nimport { ListingGroupMarketplaceBroadcast } from './components/MarketplaceBroadcast/ListingGroupMarketplaceBroadcast';\nimport * as styles from './GroupListings.css';\nimport { GroupListingsBody } from './GroupListingsBody';\n\nenum GroupListingsTab {\n Groupings = 'groupings',\n Broadcast = 'broadcast',\n AutoPricing = 'autopricing',\n}\n\nexport const GroupListingsModal = ({\n events,\n listingGroup,\n}: {\n // Events is undefined means that we need user to search for events\n events?: Event[];\n listingGroup?: ListingGroup;\n}) => {\n const listings = [\n ...(listingGroup?.groupItems ?? []),\n ...(listingGroup?.groupItems?.flatMap((gi) =>\n gi.isLtGrp ? (gi as ListingGroup).groupItems : []\n ) ?? []),\n ];\n const { defaultListingMarketplaceSettings } = useEventMarketplaceSettings(\n events?.[0]\n );\n\n const newGroupName = useContent(ContentId.NewGroup);\n const methods = useForm({\n defaultValues: {\n mergeListingGroupInputs: listingGroup\n ? [\n {\n name: listingGroup.groupName ?? `${newGroupName} 1`,\n listingGroupItems: listings.map(\n (l) =>\n ({\n listingId: l.id,\n priority: l.ltGrpPrior!,\n groupId: l.ltGrpId,\n undercutSetting: l.ltGrpUndercut,\n }) as ListingGroupItemInput\n ),\n viagogoEventId: events![0].viagId,\n viagogoMappingId: events![0].mappingId,\n desiredActiveListings: listingGroup.desiredActiveListings ?? 1,\n minActiveListings: listingGroup.minActiveListings,\n maxActiveListings: listingGroup.maxActiveListings,\n targetPercentage: listingGroup.targetPercentage,\n deprioritizedQuantities:\n listingGroup.deprioritizedQuantities ?? [],\n marketplaceSettings: listingGroup.marketplaceSettings,\n groupUndercutSetting: {\n undAbsAmt: listingGroup.absoluteRankPremium,\n undRelAmt: listingGroup.relativeRankPremium,\n actRankUndAbsAmt: null,\n actRankUndRelAmt: null,\n },\n },\n ]\n : generateMergeListingGroupInputsForEvents(\n events,\n newGroupName,\n defaultListingMarketplaceSettings\n ),\n templateSettings: {\n groupBy: {\n groupingType: GroupingType.Custom,\n },\n desiredActiveListings: 0,\n deprioritizedQuantities: [],\n },\n eventSettings:\n events?.map(() => ({\n groupBys: [\n {\n groupingType: GroupingType.Custom,\n },\n {\n groupingType: GroupingType.None,\n },\n ],\n desiredActiveListings: 0,\n deprioritizedQuantities: [],\n })) ?? [],\n },\n });\n\n return (\n \n \n \n );\n};\n\nexport const GroupListingsModalContent = ({\n listingGroup,\n events,\n formState,\n handleSubmit,\n watch,\n reset,\n getValues,\n setValue,\n setError,\n clearErrors,\n}: { events?: Event[] } & Omit<\n ComponentProps<\n typeof FormProvider\n > & {\n listingGroup?: ListingGroup;\n },\n 'children'\n>) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const hasListingGroupingMethodsFeature = useUserHasFeature(\n Feature.ListingGroupingMethods\n );\n\n const hasIntelligibleAutoPricingSettingsFeature = useUserHasFeature(\n Feature.IntelligibleAutoPricingSettings\n );\n\n const [isLoading, setIsLoading] = useState(false);\n const { isSubmitting } = formState;\n const { setActivePosEntity } = useActivePosEntityContext();\n const { setSelectionMode } = useMultiSelectionContext();\n const { closeModal } = useContext(ModalContext);\n\n const templateSettings = watch('templateSettings');\n const mergeListingGroupInputs = watch('mergeListingGroupInputs');\n\n const {\n eventsTransformed,\n eventsExpansion: { setListItemExpansion, refreshExpandedListItems },\n updateExpandedListItems,\n } = useCatalogDataContext();\n\n const hasAutoPricingGroupSettingsFeature = useUserHasFeature(\n Feature.AutoPricingGroupSettings\n );\n\n const hasAutoPricingFeature = useUserHasFeature(Feature.AutoPricing);\n\n const { defaultListingMarketplaceSettings } = useEventMarketplaceSettings(\n events?.[0]\n );\n\n const [selectedEvents, setSelectedEvents] = useState(\n events\n );\n const [eventTabSelected, setEventTabSelected] = useState<\n EventWithData | undefined\n >();\n const [activeTab, setActiveTab] = useState(\n GroupListingsTab.Groupings\n );\n\n const newGroupName = useContent(ContentId.NewGroup);\n\n const onEventsSelect = useCallback(\n (\n data: {\n event: Event;\n }[]\n ) => {\n setListItemExpansion(\n true,\n data.map((ev) => ev.event.viagVirtualId)\n );\n\n const events = data.map((e) => e.event);\n setSelectedEvents(events);\n reset({\n mergeListingGroupInputs: generateMergeListingGroupInputsForEvents(\n events,\n newGroupName,\n defaultListingMarketplaceSettings\n ),\n templateSettings: {\n groupBy: {\n groupingType: GroupingType.Custom,\n },\n desiredActiveListings: 0,\n deprioritizedQuantities: [],\n groupTemplates: [],\n },\n eventSettings:\n events?.map(() => ({\n groupBys: [\n {\n groupingType: GroupingType.Custom,\n },\n {\n groupingType: GroupingType.None,\n },\n ],\n desiredActiveListings: 0,\n deprioritizedQuantities: [],\n })) ?? [],\n });\n },\n [\n defaultListingMarketplaceSettings,\n newGroupName,\n reset,\n setListItemExpansion,\n ]\n );\n\n const onEventSummaryClose = useCallback(() => {\n setSelectedEvents(undefined);\n }, []);\n\n const eventData = useMemo(\n () =>\n selectedEvents\n ? (eventsTransformed?.filter((ev) =>\n selectedEvents.some(\n (sev) => ev.event.viagVirtualId === sev.viagVirtualId\n )\n ) ?? [])\n : [],\n [eventsTransformed, selectedEvents]\n );\n\n const requiredMsg = useContent(ContentId.Required);\n useEffect(() => {\n mergeListingGroupInputs.forEach((m, i) => {\n if (m.listingGroupItems.length) {\n if (\n formState.errors.mergeListingGroupInputs?.[i]?.listingGroupItems\n ?.message\n ) {\n clearErrors(`mergeListingGroupInputs.${i}.listingGroupItems`);\n }\n }\n if (m.name) {\n if (formState.errors.mergeListingGroupInputs?.[i]?.name?.message) {\n clearErrors(`mergeListingGroupInputs.${i}.name`);\n }\n }\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [JSON.stringify(mergeListingGroupInputs)]);\n\n const [formIsDone, setFormIsDone] = useState(false);\n\n const { setProgress, setPreview, setStage, setMainDialogOpened } =\n useBulkEditHubContext();\n const { bulkEditHub, initJob } = useBulkEditHub(\n ActionOutboxEntityType.Listing,\n BulkActionType.GroupListings,\n INVENTORY_BULK_CREATE_LISTING_GROUPS_KEY,\n () => {\n setActivePosEntity(0);\n setFormIsDone(true);\n return refreshExpandedListItems();\n }\n );\n\n const hasBackgroundBulkEditFeature =\n bulkEditHub?.state === HubConnectionState.Connected;\n\n const {\n pricingSettings,\n onResetListingPricingSettings,\n onMergeListingGroupPricingSettings,\n } = useListingGroupPricingSettings(listingGroup?.ltGrpId, events?.[0]);\n\n useEffect(() => {\n if (pricingSettings)\n setValue('pricingSettingsInputs', { ...pricingSettings });\n }, [pricingSettings, setValue]);\n\n const onSubmit = useCallback(\n (inputFormData: MergeListingGroupInputListFields) => {\n setIsLoading(true);\n\n tryInvokeApi(\n async () => {\n if (listingGroup) {\n const listingsInGroups =\n inputFormData.mergeListingGroupInputs[0].listingGroupItems.filter(\n (x) => x.listingId > 0\n );\n if (listingsInGroups.length) {\n let updatedListings: {\n [key: string]: Listing[];\n };\n if (listingGroup.ltGrpId) {\n updatedListings = await new ListingGroupClient(\n activeAccountWebClientConfig\n ).updateListingGroup(listingGroup.ltGrpId!, {\n ...inputFormData.mergeListingGroupInputs[0],\n listingGroupItems:\n inputFormData.mergeListingGroupInputs[0].listingGroupItems\n .filter((x) => x.listingId > 0)\n .map((item, index) => ({ ...item, priority: index + 1 })),\n });\n } else {\n updatedListings = await new ListingGroupClient(\n activeAccountWebClientConfig\n ).createListingGroup({\n ...inputFormData.mergeListingGroupInputs[0],\n listingGroupId: newGuidId(),\n listingGroupItems:\n inputFormData.mergeListingGroupInputs[0].listingGroupItems\n .filter((x) => x.listingId > 0)\n .map((item, index) => ({ ...item, priority: index + 1 })),\n });\n }\n await onMergeListingGroupPricingSettings(\n inputFormData.pricingSettingsInputs\n );\n\n reset(inputFormData);\n\n // Reset listing auto pricing setting per request\n if (inputFormData.resetListingAutoPricingSettings) {\n await onResetListingPricingSettings();\n }\n updateExpandedListItems(updatedListings);\n setActivePosEntity(0);\n\n // kick off a background refresh, but not wait since we already force updateExpandedListItems\n refreshExpandedListItems();\n\n closeModal();\n setSelectionMode();\n } else {\n return false;\n }\n } else {\n initJob();\n\n const filteredListingGroupInputs =\n inputFormData.mergeListingGroupInputs\n .map((groupInput) => ({\n ...groupInput,\n listingGroupItems: groupInput.listingGroupItems.filter(\n (x) => x.listingId > 0\n ),\n }))\n .filter((m) => m.listingGroupItems.length);\n\n const succeeded = await new BulkEditListingClient(\n activeAccountWebClientConfig\n ).bulkCreateListingGroups(\n {\n mergeListingGroupInputs: filteredListingGroupInputs,\n },\n INVENTORY_BULK_CREATE_LISTING_GROUPS_KEY,\n hasBackgroundBulkEditFeature\n );\n\n reset(inputFormData);\n\n // Update event grouping methods if applied\n const eventGroupingMethodsList =\n inputFormData.mergeListingGroupInputs\n .map(({ groupingMethods }) => groupingMethods)\n .filter((value) => value != null);\n if (\n hasListingGroupingMethodsFeature &&\n eventGroupingMethodsList &&\n eventGroupingMethodsList.length > 0\n ) {\n const eventGroupingMethods = eventGroupingMethodsList[0];\n for (const method of eventGroupingMethods!.groupingMethods) {\n // event level grouping methods shouldn't care about the grouping value\n method.groupingValue = null;\n }\n try {\n for (const event of eventData) {\n if (event.event.viagVirtualId) {\n await new EventConfigClient(\n activeAccountWebClientConfig\n ).updateSellerEventGroupingMethods(\n event.event.viagVirtualId,\n eventGroupingMethods!\n );\n }\n }\n } catch (error) {\n // relax the error for updating the event group methods.\n }\n }\n\n if (!hasBackgroundBulkEditFeature) {\n if (succeeded) {\n setActivePosEntity(0);\n await refreshExpandedListItems();\n\n closeModal();\n setSelectionMode();\n }\n }\n }\n },\n (error) => {\n showErrorDialog(\n 'BulkEditListingClient.bulkCreateListingGroups',\n error,\n {\n trackErrorData: inputFormData,\n }\n );\n },\n () => {\n setIsLoading(false);\n }\n );\n },\n [\n listingGroup,\n onMergeListingGroupPricingSettings,\n reset,\n updateExpandedListItems,\n setActivePosEntity,\n refreshExpandedListItems,\n closeModal,\n setSelectionMode,\n activeAccountWebClientConfig,\n onResetListingPricingSettings,\n initJob,\n hasBackgroundBulkEditFeature,\n hasListingGroupingMethodsFeature,\n eventData,\n showErrorDialog,\n ]\n );\n\n const validateForErrors = useCallback(() => {\n let hasErrors = false;\n mergeListingGroupInputs.forEach((m, i) => {\n if (!m.name) {\n setError(`mergeListingGroupInputs.${i}.name`, {\n message: requiredMsg,\n });\n hasErrors = true;\n }\n });\n\n return !hasErrors;\n }, [mergeListingGroupInputs, requiredMsg, setError]);\n\n const applyTemplateConfirmDialog = useBasicDialog();\n const [applyThenSubmit, setApplyThenSubmit] = useState(false);\n const [isApplyingTemplate, setIsApplyingTemplate] = useState(false);\n\n const onApplyTemplateToGroupings = useCallback(\n (prompt: boolean) => {\n setIsApplyingTemplate(true);\n\n if (\n prompt &&\n mergeListingGroupInputs.some((m) => m.listingGroupItems?.length)\n ) {\n applyTemplateConfirmDialog.launchDialog();\n return false;\n }\n\n try {\n templateSettings.groupTemplates.forEach((t) => {\n // Normalize the seatings into a map for faster lookup\n t.seatingsMap = t.seatings.reduce(\n (r, s) => {\n r.sectionRowKeys[s.id] = s;\n if (s.seating.rowId) {\n r.rowIdKeys[s.seating.rowId] = s;\n }\n\n return r;\n },\n { sectionRowKeys: {}, rowIdKeys: {} } as {\n sectionRowKeys: Record;\n rowIdKeys: Record;\n }\n );\n });\n\n // For each event\n // For each template\n // Get all listings matching the template and create a new group\n const newGroups = eventData.flatMap((ev) =>\n templateSettings.groupTemplates\n .map((t) => {\n const listingsInGroup =\n ev.entities.listings\n ?.flatMap(flattenListingGroup)\n ?.map((l) => {\n if (\n l.seating.rowId &&\n t.seatingsMap?.rowIdKeys[l.seating.rowId]\n ) {\n return {\n listing: l,\n seating: t.seatingsMap?.rowIdKeys[l.seating.rowId],\n };\n }\n\n const key = `${l.seating.section}-${l.seating.row}`;\n if (t.seatingsMap?.sectionRowKeys[key]) {\n return {\n listing: l,\n seating: t.seatingsMap?.sectionRowKeys[key],\n };\n }\n\n return null;\n })\n ?.filter((x) => x != null)\n ?.map((x) => x!) ?? [];\n\n // If there are any listings - create group\n if (listingsInGroup.length) {\n let listingInputs = listingsInGroup.map((l) => ({\n listingId: l.listing.id,\n priority: l.seating.priority,\n groupId: l.listing.ltGrpId,\n // TODO - SUP-149 - template undercut settings?\n }));\n\n if (templateSettings.randomizePriority) {\n randomizeInPlace(listingInputs);\n listingInputs = listingInputs.map((x, i) => ({\n ...x,\n item2: i + 1,\n }));\n }\n return {\n listingGroupId: newGuidId(),\n name: t.groupName,\n viagogoEventId: ev.event.viagId,\n viagogoMappingId: ev.event.mappingId,\n desiredActiveListings: t.desiredActiveListings,\n deprioritizedQuantities: t.deprioritizedQuantities,\n marketplaceSettings: {\n listingMarketplaceSettings:\n defaultListingMarketplaceSettings,\n },\n listingGroupItems: listingInputs,\n } as MergeListingGroupInput;\n }\n\n return null;\n })\n .filter((x) => x != null)\n .map((x) => x!)\n );\n\n setValue('mergeListingGroupInputs', newGroups);\n } finally {\n setIsApplyingTemplate(false);\n }\n\n return true;\n },\n [\n applyTemplateConfirmDialog,\n defaultListingMarketplaceSettings,\n eventData,\n mergeListingGroupInputs,\n setValue,\n templateSettings.groupTemplates,\n templateSettings.randomizePriority,\n ]\n );\n\n return (\n <>\n {\n setProgress(undefined);\n setPreview(undefined);\n setStage(BulkEditStage.Idle);\n setMainDialogOpened(false);\n }}\n >\n }\n />\n \n\n \n {!eventData.length ? (\n \n (ev.counts.listCnt ?? 0) > 1\n )}\n isSingleSelect\n allowSearchByVenueConfig\n searchPlaceHolder={ContentId.SearchVenueConfigOrEvent}\n />\n \n ) : (\n <>\n \n {eventData.length === 1 ? (\n \n \n \n )\n }\n />\n ) : (\n ev.event)}\n eventSelected={eventTabSelected?.event}\n actions={\n events == null && (\n \n \n \n )\n }\n />\n )}\n \n \n {isLoading ||\n !eventData.some((ev) => ev.entities.listings?.length) ? (\n \n ) : (\n \n {\n // Even that we have only 1 event-map context, this is ok because it is expected // that eventData is a list of events with the same venue config\n }\n \n \n setActiveTab(value as GroupListingsTab)\n }\n style={{ height: '100%' }}\n >\n \n \n \n \n \n \n \n {listingGroup &&\n hasAutoPricingGroupSettingsFeature &&\n hasAutoPricingFeature && (\n \n \n \n )}\n \n \n 1 && !eventTabSelected?.event\n }\n />\n \n \n \n \n {listingGroup &&\n hasAutoPricingGroupSettingsFeature &&\n hasAutoPricingFeature && (\n \n {hasIntelligibleAutoPricingSettingsFeature ? (\n \n ) : (\n \n )}\n \n )}\n \n \n \n )}\n \n \n )}\n \n\n \n {\n setProgress(undefined);\n setPreview(undefined);\n setStage(BulkEditStage.Idle);\n setMainDialogOpened(false);\n }}\n >\n {eventData.length > 1 && !eventTabSelected?.event && (\n {\n setApplyThenSubmit(false);\n onApplyTemplateToGroupings(true);\n }}\n variant=\"outline\"\n disabled={\n isLoading ||\n isSubmitting ||\n templateSettings.groupTemplates\n .map((m) => m.seatings.length)\n .reduce((sum, cur) => sum + cur, 0) === 0\n }\n >\n {isApplyingTemplate && (\n \n \n \n )}\n \n \n )}\n {!formIsDone && (\n {\n setMainDialogOpened(true);\n if (eventData.length > 1 && !eventTabSelected?.event) {\n setApplyThenSubmit(true);\n\n // If on the template tab\n if (onApplyTemplateToGroupings(true)) {\n if (validateForErrors()) {\n handleSubmit(onSubmit)();\n }\n }\n } else {\n setApplyThenSubmit(false);\n if (validateForErrors()) {\n handleSubmit(onSubmit)();\n }\n }\n }}\n icon={\n isApplyingTemplate ? (\n \n \n \n ) : undefined\n }\n disabled={\n isLoading ||\n isSubmitting ||\n mergeListingGroupInputs\n .map((m) => m.listingGroupItems.length)\n .reduce((sum, cur) => sum + cur, 0) === 0\n }\n textContentId={ContentId.Save}\n />\n )}\n \n\n }\n bodyText={\n \n }\n onOkay={() => {\n onApplyTemplateToGroupings(false);\n if (applyThenSubmit) {\n if (validateForErrors()) {\n handleSubmit(onSubmit)();\n }\n }\n applyTemplateConfirmDialog.closeDialog();\n }}\n onCancel={() => applyTemplateConfirmDialog.closeDialog()}\n />\n \n \n );\n};\n","import { isEmpty } from 'lodash-es';\nimport { useEffect, useMemo } from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { GroupingType } from 'src/WebApiController';\nimport { ListingGroup, ListingGroupItemInput } from 'src/WebApiController';\n\nimport { MergeListingGroupInputListFields } from './components/groupingTypes';\nimport { flattenListingGroup } from './components/groupingUtils';\nimport { GroupListingsModalContent } from './GroupListings';\n\nexport const AddToGroupListingsModal = ({\n selectedListingIds,\n listingGroupId,\n viagVirtualId,\n newListingGroupName,\n}: {\n selectedListingIds: number[];\n listingGroupId?: string | undefined;\n viagVirtualId: string;\n newListingGroupName?: string;\n}) => {\n const { eventsTransformed } = useCatalogDataContext();\n\n const eventData = useMemo(() => {\n return eventsTransformed?.find(\n (e) => e.event.viagVirtualId === viagVirtualId\n );\n }, [eventsTransformed, viagVirtualId]);\n\n const listingsToAdd = useMemo(() => {\n return eventData?.entities?.listings\n ?.flatMap(flattenListingGroup)\n .filter((l) => selectedListingIds.includes(l.id));\n }, [eventData, selectedListingIds]);\n\n const listingGroup = useMemo(() => {\n if (!isEmpty(newListingGroupName)) {\n return {\n groupName: newListingGroupName,\n desiredActiveListings: null,\n minActiveListings: null,\n maxActiveListings: null,\n targetPercentage: null,\n deprioritizedQuantities: null,\n marketplaceSettings: null,\n absoluteRankPremium: null,\n relativeRankPremium: null,\n } as ListingGroup;\n }\n return eventData?.entities?.listings?.find(\n (l) => l.isLtGrp && l.ltGrpId === listingGroupId\n ) as ListingGroup;\n }, [eventData?.entities?.listings, listingGroupId, newListingGroupName]);\n\n const event = eventData?.event;\n\n const listings = useMemo(() => {\n return [\n ...(listingGroup?.groupItems ?? []),\n ...(listingGroup?.groupItems?.flatMap((gi) =>\n gi.isLtGrp ? (gi as ListingGroup).groupItems : []\n ) ?? []),\n ...(listingsToAdd ?? []),\n ];\n }, [listingsToAdd, listingGroup?.groupItems]);\n\n const newGroupName = useContent(ContentId.NewGroup);\n const methods = useForm({\n defaultValues: {\n mergeListingGroupInputs: [\n {\n name: listingGroup?.groupName ?? `${newGroupName} 1`,\n listingGroupItems: listings.map(\n (l, idx) =>\n ({\n listingId: l.id,\n priority: l.ltGrpPrior ?? idx + 1,\n groupId: l.ltGrpId,\n undercutSetting: l.ltGrpUndercut,\n }) as ListingGroupItemInput\n ),\n viagogoEventId: event?.viagId,\n viagogoMappingId: event?.mappingId,\n desiredActiveListings: listingGroup?.desiredActiveListings ?? 1,\n minActiveListings: listingGroup?.minActiveListings,\n maxActiveListings: listingGroup?.maxActiveListings,\n targetPercentage: listingGroup?.targetPercentage,\n deprioritizedQuantities: listingGroup?.deprioritizedQuantities ?? [],\n marketplaceSettings: listingGroup?.marketplaceSettings,\n groupUndercutSetting: {\n undAbsAmt: listingGroup?.absoluteRankPremium,\n undRelAmt: listingGroup?.relativeRankPremium,\n actRankUndAbsAmt: null,\n actRankUndRelAmt: null,\n },\n },\n ],\n templateSettings: {\n groupBy: {\n groupingType: GroupingType.Custom,\n },\n desiredActiveListings: 0,\n deprioritizedQuantities: [],\n },\n eventSettings: [],\n },\n });\n\n const { reset } = methods;\n\n useEffect(() => {\n reset({\n mergeListingGroupInputs: [\n {\n name: listingGroup?.groupName ?? `${newGroupName} 1`,\n listingGroupItems: listings.map(\n (l, idx) =>\n ({\n listingId: l.id,\n priority: l.ltGrpPrior ?? idx + 1,\n groupId: l.ltGrpId,\n undercutSetting: l.ltGrpUndercut,\n }) as ListingGroupItemInput\n ),\n viagogoEventId: event?.viagId,\n viagogoMappingId: event?.mappingId,\n desiredActiveListings: listingGroup?.desiredActiveListings ?? 1,\n minActiveListings: listingGroup?.minActiveListings,\n maxActiveListings: listingGroup?.maxActiveListings,\n targetPercentage: listingGroup?.targetPercentage,\n deprioritizedQuantities: listingGroup?.deprioritizedQuantities ?? [],\n marketplaceSettings: listingGroup?.marketplaceSettings,\n groupUndercutSetting: {\n undAbsAmt: listingGroup?.absoluteRankPremium,\n undRelAmt: listingGroup?.relativeRankPremium,\n actRankUndAbsAmt: null,\n actRankUndRelAmt: null,\n },\n },\n ],\n templateSettings: {\n groupBy: {\n groupingType: GroupingType.Custom,\n },\n desiredActiveListings: 0,\n deprioritizedQuantities: [],\n },\n eventSettings: [],\n });\n }, [listings, listingGroup, event, newGroupName, reset]);\n return (\n \n \n \n );\n};\n","import { useCallback, useContext, useState } from 'react';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { ConfirmDialog } from 'src/core/interim/dialogs/ConfirmDialog';\nimport { PosDropdown, PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { vars } from 'src/core/themes';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { GroupListingsModal } from 'src/modals/GroupListings';\nimport { IconsFill, MoreIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { Event, ListingGroup, ListingGroupClient } from 'src/WebApiController';\n\nexport const ListingGroupActions = ({\n event,\n listingGroup,\n disabled,\n setIsLoading,\n slideLeft,\n}: {\n event: Event;\n listingGroup: ListingGroup;\n disabled?: boolean;\n slideLeft?: boolean;\n setIsLoading?: (value: boolean) => void;\n}) => {\n const { setActivePosEntity } = useActivePosEntityContext();\n const { setModal } = useContext(ModalContext);\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n const {\n updateExpandedListItems,\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n const [isUngrouping, setIsUngrouping] = useState(false);\n\n const ungroupConfirmDialog = useBasicDialog();\n\n const onUngroupListings = useCallback(() => {\n tryInvokeApi(\n async () => {\n setIsLoading?.(true);\n setIsUngrouping(true);\n\n if (listingGroup.ltGrpId) {\n const ungroupedListings = await new ListingGroupClient(\n activeAccountWebClientConfig\n ).ungroupListings(listingGroup.ltGrpId);\n\n updateExpandedListItems(ungroupedListings);\n\n setActivePosEntity(0);\n\n // kick off a background refresh, but not wait since we already force updateExpandedListItems\n refreshExpandedListItems();\n }\n },\n (error) => {\n showErrorDialog('ListingGroupClient.ungroupListings', error, {\n trackErrorData: listingGroup,\n });\n },\n () => {\n setIsLoading?.(false);\n setIsUngrouping(false);\n ungroupConfirmDialog.closeDialog();\n }\n );\n }, [\n activeAccountWebClientConfig,\n listingGroup,\n refreshExpandedListItems,\n setActivePosEntity,\n setIsLoading,\n showErrorDialog,\n ungroupConfirmDialog,\n updateExpandedListItems,\n ]);\n\n return (\n <>\n \n \n \n }\n align=\"end\"\n triggerProps={{ disabled: disabled }}\n >\n {\n e.stopPropagation();\n e.preventDefault();\n setModal({\n children: (\n \n ),\n clickOutsideToClose: true,\n ...{ size: slideLeft ? 'slide-left' : 'slide-in' },\n });\n }}\n disabled={disabled}\n >\n \n \n {\n e.stopPropagation();\n e.preventDefault();\n ungroupConfirmDialog.launchDialog();\n }}\n disabled={disabled}\n >\n \n \n \n\n }\n bodyText={}\n onOkay={onUngroupListings}\n disabled={isUngrouping}\n isLoading={isUngrouping}\n onCancel={() => ungroupConfirmDialog.closeDialog()}\n />\n \n );\n};\n","import { sum } from 'lodash-es';\nimport { IconButton } from 'src/components/Buttons';\nimport { vars } from 'src/core/themes';\nimport { BroadcastIconInverted } from 'src/svgs';\nimport { ClockIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Listing, ListingGroup, ListingStatus } from 'src/WebApiController';\n\nimport * as styles from './ListingGroupStatusSummary.css';\n\nexport const ListingGroupStatusSummary = ({\n listingGroup,\n}: {\n listingGroup: ListingGroup;\n}) => {\n return (\n
    \n \n \n {sum(\n listingGroup.groupItems\n .flatMap((l) =>\n l.isLtGrp ? (l as ListingGroup).groupItems : []\n )\n .filter(\n (l) =>\n !l.isLtGrp &&\n ((l as Listing).status === ListingStatus.Listed ||\n (l as Listing).status === ListingStatus.ListingPending)\n )\n .map((l) => l.availQty)\n )}\n
    \n }\n style={{ padding: '2px 1px' }}\n titleContentId={ContentId.ListingGroupSummaryActiveAndActive}\n />\n\n \n \n {sum(\n listingGroup.groupItems\n .flatMap((l) =>\n l.isLtGrp ? (l as ListingGroup).groupItems : []\n )\n .filter(\n (l) =>\n !l.isLtGrp &&\n !(\n (l as Listing).status === ListingStatus.Listed ||\n (l as Listing).status === ListingStatus.ListingPending\n )\n )\n .map((l) => l.availQty)\n )}\n \n }\n style={{ padding: '2px' }}\n titleContentId={ContentId.ListingGroupSummaryQueued}\n />\n \n );\n};\n","import { isEmpty } from 'lodash-es';\nimport { useCallback, useContext, useMemo, useState } from 'react';\nimport { Link, useNavigate } from 'react-router-dom';\nimport { IconButton } from 'src/components/Buttons';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { ModalContext } from 'src/contexts/ModalContext/ModalContext';\nimport { useSiteTheme } from 'src/contexts/SiteTheme/SiteThemeContext';\nimport { vars } from 'src/core/themes';\nimport { Colors } from 'src/core/themes/constants/colors';\nimport { Stack } from 'src/core/ui';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { MainRoute } from 'src/navigations/Routes/MainRoute';\nimport { OpenLinkIcon } from 'src/svgs/OpenLinkIcon';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { isInFullPageEventView } from 'src/utils/deepLinkUtils';\nimport { compareMarketplace } from 'src/utils/eventWithDataUtils';\nimport {\n getListingActionButtons,\n getListingDetailsDeepLinkUrl,\n getListingDetailsModalConfigWithDeepLink,\n getListingDetailsRelativeUrl,\n getListingGroupForListing,\n} from 'src/utils/inventoryUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n Event,\n Listing,\n ListingActionType,\n ListingDetailDataField,\n ListingGroup,\n ListingGroupClient,\n ListingStatus,\n Marketplace,\n} from 'src/WebApiController';\nimport styled from 'styled-components';\n\nimport { ListingGroupActions } from './ListingGroupActions';\nimport { ListingGroupStatusSummary } from './ListingGroupStatusSummary';\n\n// Due to limited table width - certain actions are not being shown in the listing table\n// but will only show in listing-detail modal view\n// These are the actions we do not want to show in the listing table\nconst NotTableActionTypes = [\n ListingActionType.Split,\n ListingActionType.SplitToOriginal,\n ListingActionType.AddOfflineSale,\n ListingActionType.AddMarketplaceSale,\n ListingActionType.AddAdminHold,\n ListingActionType.RemoveAdminHold,\n];\n\nconst BroadcastActionTypes = [\n ListingActionType.Broadcast,\n ListingActionType.Unbroadcast,\n];\n\nexport const ListingActionsCell = ({\n event,\n listing,\n isSubRow,\n disabled,\n linkOnly,\n}: {\n event: Event;\n listing: Listing;\n isSubRow?: boolean;\n disabled?: boolean;\n linkOnly?: boolean;\n}) => {\n const [actionIsLoading, setActionIsLoading] = useState(false);\n\n const { isLoading } = useActivePosEntityContext();\n\n const allDisabled = actionIsLoading || isLoading || disabled;\n\n return (\n <>\n {listing.isLtGrp ? (\n \n \n \n ) : listing.isFull ? (\n \n \n \n ) : null}\n \n );\n};\n\nconst ActionCellForListing = ({\n listing,\n event,\n disabled,\n setIsLoading,\n linkOnly,\n}: {\n listing: Listing;\n event: Event;\n disabled?: boolean;\n setIsLoading: (state: boolean) => void;\n linkOnly?: boolean;\n}) => {\n const { mainRoute, activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const {\n updateItemInEvent,\n eventsExpansion: { refreshExpandedListItems },\n eventsTransformed,\n } = useCatalogDataContext();\n const { setActivePosEntity } = useActivePosEntityContext();\n const { setModal } = useContext(ModalContext);\n const navigate = useNavigate();\n\n const onViewClick = useCallback(\n async (newTab: boolean) => {\n const inFullPageEventView = isInFullPageEventView(mainRoute);\n if (newTab) {\n window.open(getListingDetailsDeepLinkUrl(listing.id), '_blank');\n } else if (\n mainRoute === MainRoute.Inventory ||\n mainRoute === MainRoute.InventorySearch ||\n inFullPageEventView\n ) {\n setActivePosEntity(listing.id, listing.idOnMkp, true, [\n ListingDetailDataField.Basic,\n ]);\n setModal(getListingDetailsModalConfigWithDeepLink(listing.id, true));\n } else {\n navigate(getListingDetailsRelativeUrl(listing.id));\n }\n },\n [\n mainRoute,\n setActivePosEntity,\n listing.id,\n listing.idOnMkp,\n setModal,\n navigate,\n ]\n );\n\n const lockListingGroupFromEdits = useCallback(\n (lock: boolean) => {\n const listingGroup = getListingGroupForListing(\n event.viagId,\n listing.ltGrpId,\n eventsTransformed\n );\n\n if (listingGroup) {\n listingGroup.isLockedFromEdits = lock;\n\n updateItemInEvent(listingGroup, ActionOutboxEntityType.Listing);\n }\n },\n [event.viagId, eventsTransformed, listing.ltGrpId, updateItemInEvent]\n );\n\n const onSetListingActiveInGroup = useCallback(() => {\n tryInvokeApi(\n async () => {\n setIsLoading(true);\n\n if (listing.ltGrpId) {\n lockListingGroupFromEdits(true);\n updateItemInEvent(\n {\n ...listing,\n status: ListingStatus.ListingPending,\n ltGrpActive: true,\n },\n ActionOutboxEntityType.Listing\n );\n if (\n await new ListingGroupClient(\n activeAccountWebClientConfig\n ).setListingActiveInGroup(listing.ltGrpId, listing.id, true)\n ) {\n setActivePosEntity(0);\n await refreshExpandedListItems();\n }\n }\n },\n (error) => {\n showErrorDialog('ListingGroupClient.setListingActiveInGroup', error, {\n trackErrorData: listing,\n });\n },\n () => {\n lockListingGroupFromEdits(false);\n setIsLoading(false);\n }\n );\n }, [\n activeAccountWebClientConfig,\n listing,\n lockListingGroupFromEdits,\n refreshExpandedListItems,\n setActivePosEntity,\n setIsLoading,\n showErrorDialog,\n updateItemInEvent,\n ]);\n\n return (\n \n {!linkOnly &&\n getListingActionButtons(\n true /* for table */,\n listing,\n listing.actions.filter(\n (a) =>\n // Action is not in the not-action-table\n !NotTableActionTypes.includes(a) &&\n // And either not a group, or not-a-subrow-and-is-active, or not a broadcast-action\n (listing.ltGrpId == null ||\n listing.ltGrpActive ||\n !BroadcastActionTypes.includes(a))\n ),\n event,\n undefined,\n true,\n undefined,\n disabled,\n lockListingGroupFromEdits,\n onSetListingActiveInGroup\n )}\n {\n if (e.button === 0 && e.getModifierState('Control') === false) {\n // Perform like a button click when it's a left-click (and no Ctrl)\n // Else the click will be whatever does\n e.preventDefault();\n e.stopPropagation();\n\n onViewClick(!!linkOnly);\n }\n }}\n >\n \n }\n disabled={disabled}\n titleContentId={ContentId.ViewDetails}\n />\n \n \n );\n};\n\nconst AllowedMarkeplaces: Marketplace[] = [\n Marketplace.StubHub,\n Marketplace.VividSeats,\n Marketplace.SeatGeek,\n Marketplace.Ticketmaster,\n];\nconst ActionCellForListingGroup = ({\n event,\n listingGroup,\n disabled,\n setIsLoading,\n isSubRow,\n linkOnly,\n}: {\n event: Event;\n listingGroup: ListingGroup;\n disabled?: boolean;\n setIsLoading: (state: boolean) => void;\n isSubRow?: boolean;\n linkOnly?: boolean;\n}) => {\n const { marketplaceSettings } = listingGroup;\n\n const broadcastStatuses = useMemo(() => {\n const status: { marketplace: Marketplace; disabled: boolean }[] = [];\n if (isEmpty(marketplaceSettings?.listingMarketplaceSettings)) {\n return status;\n }\n Object.values(Marketplace).forEach((marketplace, index) => {\n if (AllowedMarkeplaces.includes(marketplace)) {\n const settings =\n marketplaceSettings?.listingMarketplaceSettings?.[index + 1 + ''];\n if (settings?.listingBroadcastStateId) {\n status.push({\n marketplace,\n disabled: settings.listingBroadcastStateId === 1,\n });\n }\n }\n });\n return status;\n }, [marketplaceSettings?.listingMarketplaceSettings]);\n\n return (\n \n \n {!isSubRow && }\n {!isSubRow && (\n \n )}\n \n {!isSubRow && !isEmpty(broadcastStatuses) && (\n \n )}\n \n );\n};\n\nconst MarketplaceStyleMap: Record<\n Marketplace,\n { color: string; reverseColor?: string }\n> = {\n [Marketplace.StubHub]: { color: Colors.indigo100 },\n [Marketplace.VividSeats]: { color: Colors.brandVivid },\n [Marketplace.SeatGeek]: { color: Colors.brandSeatgeek },\n [Marketplace.TickPick]: { color: Colors.brandTickPick },\n [Marketplace.Ticketmaster]: { color: Colors.brandTicketmaster },\n [Marketplace.Offline]: { color: '#2a9ba3' },\n [Marketplace.AXS]: { color: Colors.brandAxs },\n [Marketplace.FanXchange]: { color: Colors.brandFanXchange },\n [Marketplace.Gametime]: { color: '#21cc8a' },\n [Marketplace.TicketEvolution]: { color: Colors.brandTicketEvolution },\n [Marketplace.TicketNetwork]: { color: Colors.brandTicketNetwork },\n [Marketplace.Automatiq]: { color: '#000000', reverseColor: '#ffffff' },\n [Marketplace.Lyte]: { color: Colors.brandLyte },\n [Marketplace.GoTickets]: { color: Colors.brandGoTickets },\n [Marketplace.B2BSales]: { color: Colors.brandB2BSales },\n [Marketplace.TicketNetworkMercury]: { color: Colors.brandTicketNetwork },\n};\n\ntype MarketplaceActionCellForListingGroup = {\n broadcastStatuses: { marketplace: Marketplace; disabled: boolean }[];\n};\nconst MarketplaceActionCellForListingGroup: React.FC<\n MarketplaceActionCellForListingGroup\n> = ({ broadcastStatuses }) => {\n const contentDelisted = useContent(ContentId.BroadcastDisabled);\n const contentListed = useContent(ContentId.Broadcast);\n const { isDarkMode } = useSiteTheme();\n\n return (\n \n {broadcastStatuses\n .toSorted((a, b) => compareMarketplace(a.marketplace, b.marketplace))\n .map(({ marketplace, disabled }) => {\n const style = MarketplaceStyleMap[marketplace];\n if (!style) {\n return null;\n }\n return (\n \n );\n })}\n \n );\n};\n\nconst MarketplaceDot = styled.div<{ color: string; disabled: boolean }>`\n height: 12px;\n width: 12px;\n background-color: ${({ color, disabled }) => (disabled ? '#bbb' : color)};\n border-radius: 50%;\n display: inline-block;\n\n &:hover {\n transform: scale(1.2);\n }\n`;\n","import { Content, useContent } from 'src/contexts/ContentContext';\nimport { useSiteTimezoneContext } from 'src/contexts/SiteTimezoneContext/SiteTimezoneContext';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { FormatOption } from 'src/modals/EditTableColumns';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { applyNumberFormatting } from 'src/utils/numberFormatter';\n\nexport type DateCellProps = {\n /**\n * Date as string, should be parseable by Date constructor\n */\n date: string | string[] | null;\n // TODO: handle date ranges\n dateEnd?: string | null;\n precision?: FormatOption;\n align?: 'left' | 'center' | 'right';\n enableUtcFallback?: boolean;\n /**\n * Hide \"Ago\"/\"In\" text\n */\n hideRelativeTerms?: boolean;\n /**\n * Try to use site timezone first, then fall back to local timezone\n */\n useSiteTimeZone?: boolean;\n style?: React.CSSProperties;\n};\n\nexport const DateCell = ({\n precision = FormatOption.DateTime_MonthDD_Time,\n date,\n align = 'right',\n enableUtcFallback = false,\n hideRelativeTerms = false,\n style,\n useSiteTimeZone = true,\n}: DateCellProps) => {\n const inText = useContent(ContentId.In);\n const agoText = useContent(ContentId.Ago);\n const nowText = useContent(ContentId.JustNow);\n const { timeZone } = useSiteTimezoneContext();\n if (!date)\n return (\n \n \n \n );\n\n let formattedDate: string | null | undefined;\n if (!Array.isArray(date)) {\n formattedDate = applyNumberFormatting({\n precision,\n inputNumber: date,\n isDateTime: true,\n enableUtcFallback,\n\n timeZone: useSiteTimeZone ? timeZone : undefined,\n });\n } else {\n const dates = date as string[];\n formattedDate = dates\n .map((date) =>\n applyNumberFormatting({\n precision,\n inputNumber: date,\n isDateTime: true,\n enableUtcFallback,\n localeText: {\n in: inText,\n ago: agoText,\n now: nowText,\n },\n timeZone: useSiteTimeZone ? timeZone : undefined,\n })\n )\n .join(', ');\n }\n\n return (\n \n {formattedDate}\n \n );\n};\n","import { useContent } from 'src/contexts/ContentContext';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getInHandDisplayData } from 'src/utils/saleUtils';\n\nimport { inhandDateContainer } from './InHandDateDisplay.css';\n\nexport function InHandDateDisplay({\n date,\n needsToFulfill,\n handleFulfillmentState,\n}: {\n date?: Date | null;\n needsToFulfill?: boolean;\n handleFulfillmentState?: boolean;\n}) {\n const inhand = useContent(ContentId.InHand);\n const dateLocal =\n date &&\n new Date(\n Date.UTC(\n date.getFullYear(),\n date.getMonth(),\n date.getDate(),\n date.getHours(),\n date.getMinutes(),\n date.getSeconds()\n )\n );\n\n const { displayText, displayTooltip, alertIcon } = getInHandDisplayData(\n inhand,\n dateLocal,\n new Date(),\n needsToFulfill\n );\n\n if (!needsToFulfill && handleFulfillmentState) {\n return null;\n }\n\n return (\n
    \n {handleFulfillmentState && alertIcon}\n {displayText}\n
    \n );\n}\n","import { InHandDateDisplay } from 'src/components/common/InHandDateDisplay';\n\nexport type InHandCellProps = {\n date: Date | null;\n needsToFulfill?: boolean;\n handleFulfillmentState?: boolean;\n};\n\nexport const InHandCell = ({\n date,\n needsToFulfill,\n handleFulfillmentState,\n}: InHandCellProps) => {\n return (\n \n );\n};\n","import { vars } from 'src/core/themes';\nimport { Event, Listing, Performer, Venue } from 'src/WebApiController';\n\nexport type ListingWithEvent = {\n listing?: Listing | null;\n isLtGrp?: boolean;\n ltGroupName?: string;\n isCompListing?: boolean;\n event: Event;\n performer?: Performer | null;\n venue?: Venue | null;\n selectionDisabledReason?: string;\n rowIndex?: number;\n currentPageIndex?: number;\n ticketClassColor?: string | null;\n};\n\nexport const SHIMMERING_DIV_HEIGHT_SINGLE_LISTING = vars.spacing.xxl;\nexport const SHIMMERING_DIV_HEIGHT_LISTING_GROUP = '110px';\n","import { useMemo } from 'react';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { Listing, Marketplace } from 'src/WebApiController';\n\nexport const useListingHasVenueMapInfo = (\n listing?: Listing | null,\n hasAutoPricingUiGateFeature?: boolean\n) => {\n const { venueMapInfo } = useEventMapContext();\n\n const hasVenueMapInfo = useMemo(() => {\n // If the listing has rowId - we assume it's seating came from a venue map\n if (listing?.seating?.rowId) {\n return true;\n }\n\n // Otherwise, try to find the section name in the venue map\n const foundSection = venueMapInfo?.sections.find(\n (s) => s.name === listing?.seating.section\n );\n\n if (foundSection) {\n return true;\n }\n\n // Otherwise, try to find the overridden section in the venue map\n const overrideSection = listing?.mkpListings?.find(\n (m) => m.mkp === Marketplace.StubHub && m.overrideSection\n )?.overrideSection;\n\n const foundOverrideSection = venueMapInfo?.sections.find(\n (s) => s.name === overrideSection\n );\n\n if (foundOverrideSection) {\n return true;\n }\n\n // If no section mapping is found, just make sure the listing at least has a section value\n if (hasAutoPricingUiGateFeature) {\n return listing?.seating?.section?.trim() ?? false;\n }\n\n return false;\n }, [\n hasAutoPricingUiGateFeature,\n listing?.mkpListings,\n listing?.seating?.rowId,\n listing?.seating.section,\n venueMapInfo?.sections,\n ]);\n\n return {\n mapExists: Boolean(venueMapInfo?.sections?.length),\n hasVenueMapInfo,\n };\n};\n","import { ChangeEvent, useCallback, useEffect } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Content } from 'src/contexts/ContentContext';\nimport { EventMapContextProvider } from 'src/contexts/EventMapContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { Switch } from 'src/core/interim/Switch';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { TooltipPopover } from 'src/core/ui/TooltipPopover';\nimport { useListingHasVenueMapInfo } from 'src/hooks/useListingHasVenueMapInfo';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { useListingAutoPricingSettings } from 'src/modals/ListingDetails/components/useListingAutoPricingSettings';\nimport { WarningOutlineIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Event, Feature, Listing } from 'src/WebApiController';\n\nimport { ListingPricingInput } from './ListingPriceForm.types';\n\ntype AutoPricingToggleCellProps = {\n listing: Listing;\n editable?: boolean;\n disabled?: boolean;\n event: Event;\n};\n\nexport const AutoPricingToggleCell = (props: AutoPricingToggleCellProps) => {\n return (\n \n \n \n );\n};\n\nconst AutoPricingToggleCellContent = ({\n listing,\n editable,\n disabled,\n event,\n}: AutoPricingToggleCellProps) => {\n const field = 'autoPricingEnabled';\n const { setValue, watch, getFieldState, formState } =\n useFormContext();\n\n const { getSelection } = useMultiSelectionContext();\n const listingSelection = getSelection(event.viagVirtualId);\n\n const { canSetPrice, autoPricingEnabled, setAutoPricingDefaults } =\n useListingAutoPricingSettings(listing);\n\n const isSubmittingPricingSettings = watch('isSubmittingPricingSettings');\n const isSubmittingRowIndex = watch('isSubmittingRowIndex');\n const isSubmittingPrice = watch('isSubmitting');\n const rowIndex = watch('rowIndex');\n\n const fieldValue = watch(field);\n const canAutoPrice = useUserHasFeature(Feature.AutoPricing) && canSetPrice;\n const { mapExists, hasVenueMapInfo } = useListingHasVenueMapInfo(listing);\n\n const fieldIsSubmitting =\n (isSubmittingPricingSettings || isSubmittingPrice) &&\n (isSubmittingRowIndex === undefined || isSubmittingRowIndex === rowIndex);\n\n const isDisabled =\n disabled ||\n listing.isDeleted ||\n !canSetPrice ||\n listingSelection.isSingleGroupMultiSelect ||\n fieldIsSubmitting;\n\n const fieldError = getFieldState(field, formState)?.error?.message;\n\n const fieldHasChanged =\n formState.defaultValues?.[field] !== fieldValue &&\n !isSubmittingPricingSettings;\n\n const submit = useCallback(() => {\n if (fieldError) {\n return;\n }\n if (fieldHasChanged) {\n // Only submit if Enter is hit in the box that has changes\n setValue('isSubmittingPricingSettings', true);\n setValue('isSubmittingRowIndex', rowIndex);\n }\n }, [fieldError, fieldHasChanged, setValue, rowIndex]);\n\n useEffect(() => {\n submit();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [autoPricingEnabled]);\n\n return (\n \n {editable &&\n (!canAutoPrice || !hasVenueMapInfo ? (\n \n \n }\n >\n {!canAutoPrice ? (\n \n ) : mapExists && !hasVenueMapInfo ? (\n \n ) : (\n \n )}\n \n \n \n ) : (\n \n ) => e.stopPropagation()}\n onChange={(e) => {\n const isChecked = e.target.checked;\n if (isChecked !== autoPricingEnabled) {\n if (isChecked) {\n // If enabled, set defaults where necessary\n setAutoPricingDefaults();\n }\n\n setValue('autoPricingEnabled', isChecked);\n }\n }}\n />\n \n \n ))}\n \n );\n};\n","import { ChangeEvent, useCallback } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { Popover } from 'src/core/ui';\nimport { RotatingWrapper } from 'src/core/ui/AnimatingWrapper';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { TooltipPopover } from 'src/core/ui/TooltipPopover';\nimport { useListingHasVenueMapInfo } from 'src/hooks/useListingHasVenueMapInfo';\nimport { useUserCanSetPrice } from 'src/hooks/useUserHasListingPermissions';\nimport {\n CheckIcon,\n CrossIcon,\n IconsFill,\n ProcessingIcon,\n} from 'src/svgs/Viagogo';\nimport { PricingSettingsFieldNumeric } from 'src/utils/autoPricingUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { AutoPricingCompListingMode, Listing } from 'src/WebApiController';\n\nimport { ListingPricingInput } from './ListingPriceForm.types';\n\ntype CompListingBoundsCellProps = {\n formattedNumber?: string | null;\n listing: Listing;\n editable?: boolean;\n field: PricingSettingsFieldNumeric;\n disabled?: boolean;\n viagVirtualId?: string;\n};\n\nexport const CompListingBoundsCell = ({\n formattedNumber,\n listing,\n editable,\n field,\n disabled,\n viagVirtualId,\n}: CompListingBoundsCellProps) => {\n const { setValue, watch, clearErrors, getFieldState, formState } =\n useFormContext();\n const { getSelection } = useMultiSelectionContext();\n const listingSelection = getSelection(viagVirtualId);\n const isSelectionMode = listingSelection.isSingleGroupMultiSelect;\n\n const saveMsg = useContent(ContentId.Save);\n\n const isSubmittingPricingSettings = watch('isSubmittingPricingSettings');\n const isSubmittingPrice = watch('isSubmitting');\n const isSubmittingRowIndex = watch('isSubmittingRowIndex');\n const rowIndex = watch('rowIndex');\n const autoPricingEnabled = watch('autoPricingEnabled');\n const compListingMode = watch('compListingMode');\n const fieldValue = watch(field);\n\n const canSetPrice = useUserCanSetPrice(listing, false);\n const { hasVenueMapInfo } = useListingHasVenueMapInfo(listing);\n\n const isAutoPricingDisabled = !(hasVenueMapInfo && canSetPrice);\n\n const isCompListingAmountDisabled =\n disabled ||\n listing.isDeleted ||\n !canSetPrice ||\n !autoPricingEnabled ||\n !compListingMode ||\n compListingMode === AutoPricingCompListingMode.SameZone ||\n compListingMode === AutoPricingCompListingMode.SameEvent ||\n compListingMode === AutoPricingCompListingMode.ParentListing ||\n isAutoPricingDisabled;\n\n const fieldIsSubmitting =\n (isSubmittingPricingSettings || isSubmittingPrice) &&\n (isSubmittingRowIndex === undefined || isSubmittingRowIndex === rowIndex);\n\n const fieldError = getFieldState(field, formState)?.error?.message;\n\n const fieldHasChanged =\n formState.defaultValues?.[field] !== fieldValue &&\n fieldValue &&\n fieldValue > 0 &&\n !isSubmittingPricingSettings;\n\n const submit = useCallback(() => {\n if (fieldError) {\n return;\n }\n if (fieldHasChanged) {\n // Only submit if Enter is hit in the box that has changes\n setValue('isSubmittingPricingSettings', true);\n setValue('isSubmittingRowIndex', rowIndex);\n }\n }, [fieldError, fieldHasChanged, setValue, rowIndex]);\n\n const handleKeyDown = (e: React.KeyboardEvent) => {\n if (e.key === 'Enter') {\n submit();\n }\n };\n\n const onChangeHandler = useCallback(\n (e: ChangeEvent) => {\n let newValue: number | null = parseFloat(e.target.value) ?? null;\n\n clearErrors(field);\n\n if (Number.isNaN(newValue) || newValue > Infinity) {\n newValue = null;\n }\n setValue(field, newValue);\n },\n [clearErrors, field, setValue]\n );\n\n return (\n \n \n {formattedNumber != null ? (\n formattedNumber\n ) : isCompListingAmountDisabled ? (\n ''\n ) : (\n \n )}\n \n }\n style={\n !editable || isCompListingAmountDisabled\n ? { color: vars.color.textPrimary }\n : {}\n }\n disabled={\n isCompListingAmountDisabled ||\n isSelectionMode ||\n disabled ||\n fieldIsSubmitting ||\n !editable\n }\n onClosed={() => {\n if (formState.defaultValues?.[field]) {\n setValue(field, formState.defaultValues?.[field] ?? null);\n }\n }}\n >\n \n \n {fieldIsSubmitting ? (\n \n \n \n ) : fieldHasChanged && !fieldError ? (\n {\n e.stopPropagation();\n submit();\n }}\n />\n ) : null}\n\n \n \n \n \n }\n type=\"number\"\n value={\n compListingMode == null || fieldValue == null ? '' : fieldValue\n }\n disabled={disabled || isSelectionMode || fieldIsSubmitting}\n onChange={onChangeHandler}\n onKeyDown={handleKeyDown}\n />\n \n \n \n );\n};\n","import { ColumnDef } from '@tanstack/react-table';\nimport { ListingWithEvent } from 'src/tables/ListingTable/ListingTable.types';\nimport { Feature } from 'src/WebApiController';\n\nexport type ColumnPersonalizationFlags = {\n /**\n * Determines whether user should be able to toggle visibility of a column. Still\n * allows for user to adjust ordering of column when true.\n * DEFAULT: false\n */\n isRequired: boolean;\n /**\n * Whether the setting should appear in the configuration setting\n * If false, ensure column is always enabled\n * DEFAULT: true\n */\n isConfigurable: boolean;\n /**\n * Whether the field can be toggled between editable and read-only\n * DEFAULT: false\n */\n isEditabilityConfigurable: boolean;\n /**\n * Identifies a column as numeric AND whether numeric precision should be applied to the data.\n * DEFAULT: false\n */\n isNumeric: boolean;\n /**\n * Identifies a column that can be displayed as icon or enum value\n * DEFAULT: false\n */\n isEnumWithIcon: boolean;\n /**\n * Whether a column should be hidden in lieu of a user preference set (will be used for autopricing)\n * DEFAULT: false\n */\n isHiddenByDefault: boolean;\n /* Whether the number is a currency\n * DEFAULT: false\n */\n isCurrency: boolean;\n /* Whether the number is a percent\n * DEFAULT: false\n */\n isPercent: boolean;\n /**\n * Whether should not expect decimals\n *\n * Default: `false`\n */\n isInteger: boolean;\n /**\n * Timestamp/DateTime\n */\n isDateTime: boolean;\n /**\n * Requires these Features to show and configure\n * DEFAULT: empty\n */\n requiredFeatures: Readonly;\n /**\n * List of view modes that the column is visible in, defaults to all view modes if empty\n * currently only used for PurchaseTable columns\n * DEFAULT: empty\n */\n visibleViewModes: Readonly;\n};\n\nexport const PERSONALIZATION_DEFAULTS: ColumnPersonalizationFlags = {\n isRequired: false,\n isConfigurable: true,\n isEditabilityConfigurable: false,\n isNumeric: false,\n isEnumWithIcon: false,\n isInteger: false,\n isHiddenByDefault: false,\n isCurrency: false,\n isDateTime: false,\n isPercent: false,\n requiredFeatures: [],\n visibleViewModes: [],\n};\n\nexport type GetColumnConfigById = {\n personalization: ColumnPersonalizationFlags;\n definition: ColumnDef | undefined;\n};\n\nexport type GetListingColumnConfigById = {\n personalization: ColumnPersonalizationFlags;\n definition: ColumnDef | undefined;\n};\n","import { EventsFormulaFields } from 'src/tables/EventsTable/configs/EventsTableColumnsConfig';\nimport { ListingDetailedMetrics, UiMoney } from 'src/WebApiController';\n\nimport { ColumnPersonalizationFlags } from '../columnUtils.types';\nimport { EventsTableColumnId } from './eventsColumnUtils.types';\n\nexport const EVENTS_TABLE_CUSTOM_COLUMN_PERSONALIZATION_CONFIG: Partial =\n {\n isHiddenByDefault: true,\n isNumeric: true,\n };\n\nexport const FORMULA_FIELD_TO_COLUMN_ID: Record<\n keyof EventsFormulaFields,\n EventsTableColumnId | undefined\n> = {\n ['actualStr']: EventsTableColumnId.ActualSTR,\n ['expectedStr']: undefined,\n ['liftPercentage']: EventsTableColumnId.LiftPercentage,\n ['listedAtp']: EventsTableColumnId.ListedAtp,\n ['revenue']: EventsTableColumnId.Revenue,\n ['totalAtp']: EventsTableColumnId.ATP,\n ['totalCost']: undefined,\n ['totalGrossProfit']: EventsTableColumnId.Profit,\n ['totalListPrice']: undefined,\n ['totalListedQuantity']: EventsTableColumnId.ListedQty,\n ['totalListedValue']: undefined,\n ['totalNetProceeds']: undefined,\n ['totalSoldCost']: EventsTableColumnId.SoldCost,\n ['totalSoldQuantity']: EventsTableColumnId.SoldQty,\n ['totalTicketQuantity']: EventsTableColumnId.TotalQty,\n ['totalUnsoldListPrice']: undefined,\n ['totalUnsoldQuantity']: EventsTableColumnId.UnsoldQty,\n};\n\nexport const LISTING_METRIC_TEST_DATA: ListingDetailedMetrics = {\n str: 1,\n liftPerc: 1,\n listedATP: { amt: 1 } as UiMoney,\n rvn: { amt: 1 } as UiMoney,\n atp: { amt: 1 } as UiMoney,\n ttlCst: { amt: 1 } as UiMoney,\n pandL: { amt: 1 } as UiMoney,\n ttlListPrc: { amt: 1 } as UiMoney,\n listQty: 1,\n netProcs: { amt: 1 } as UiMoney,\n soldCst: { amt: 1 } as UiMoney,\n soldQty: 1,\n tktQty: 1,\n ttlUnsoldListPrc: { amt: 1 } as UiMoney,\n unsoldQty: 1,\n} as ListingDetailedMetrics;\n","import {\n evaluateFormulaBase,\n FormulaEditable,\n FormulaExecutable,\n fromExecutableFormula,\n parseEditableFormulaBase,\n parseExecutableFormula,\n validateFormulaSingleStatement,\n} from 'src/utils/columns/customColumnUtils';\nimport { EVENTS_FORMULA_FIELDS_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { ListingDetailedMetrics } from 'src/WebApiController';\n\nimport { EventsFormulaFields } from '../../../tables/EventsTable/configs/EventsTableColumnsConfig';\nimport { ColumnPersonalizationFlags } from '../columnUtils.types';\nimport {\n getPersonalizationFlagsFromFormulaBase,\n MathematicalToken,\n parseMathematicalTokensFromFormulaBase,\n} from '../customColumnMathUtils';\nimport { EVENTS_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES } from './eventsColumnUtils.constants';\nimport { EventsTableColumnId } from './eventsColumnUtils.types';\nimport {\n FORMULA_FIELD_TO_COLUMN_ID,\n LISTING_METRIC_TEST_DATA,\n} from './eventsCustomColumnUtils.constants';\n\nexport const parseEditableFormula = (\n editableFormula: FormulaEditable | undefined\n): string[] | undefined => {\n const parsedTokenResult = parseEditableFormulaBase(editableFormula);\n if (!parsedTokenResult) {\n return;\n }\n\n let parseFailed = false;\n const tokens: string[] = [];\n parsedTokenResult.forEach((tokenResult) => {\n if (tokenResult.isPlainToken) {\n tokens.push(tokenResult.token);\n } else {\n const fieldName = tokenResult.token;\n if (\n EVENTS_FORMULA_FIELDS_TO_CID[fieldName as keyof EventsFormulaFields] ==\n null\n ) {\n parseFailed = true;\n return;\n }\n tokens.push(\n EVENTS_FORMULA_FIELDS_TO_CID[fieldName as keyof EventsFormulaFields]\n );\n }\n });\n\n if (parseFailed) return;\n\n return tokens;\n};\n\nconst mapFormulaFields = (\n metrics?: ListingDetailedMetrics\n): EventsFormulaFields => {\n return {\n actualStr: metrics?.str,\n expectedStr: undefined,\n liftPercentage: metrics?.liftPerc,\n listedAtp: metrics?.listedATP?.amt,\n revenue: metrics?.rvn?.amt,\n totalAtp: metrics?.atp?.amt,\n totalCost: metrics?.ttlCst?.amt,\n totalGrossProfit: metrics?.pandL?.amt,\n totalListPrice: metrics?.ttlListPrc?.amt,\n totalListedQuantity: metrics?.listQty,\n totalListedValue: undefined,\n totalNetProceeds: metrics?.netProcs?.amt,\n totalSoldCost: metrics?.soldCst?.amt,\n totalSoldQuantity: metrics?.soldQty,\n totalTicketQuantity: metrics?.tktQty,\n totalUnsoldListPrice: metrics?.ttlUnsoldListPrc?.amt,\n totalUnsoldQuantity: metrics?.unsoldQty,\n };\n};\n\nexport const evaluateFormula = (\n formula: FormulaExecutable,\n metrics?: ListingDetailedMetrics\n) => {\n const data = mapFormulaFields(metrics);\n\n return evaluateFormulaBase(formula, data);\n};\n\nexport const validateFormula = (formula: string) => {\n return (\n parseExecutableFormula(formula) != null &&\n evaluateFormula(formula, LISTING_METRIC_TEST_DATA) != null &&\n validateFormulaSingleStatement(formula)\n );\n};\n\nexport const findDependentEventsTableColumnIds = (\n editableFormula: FormulaEditable\n): EventsTableColumnId[] => {\n const fieldNames =\n parseEditableFormulaBase(editableFormula, true)?.map((t) => t.token) ?? [];\n\n return (\n Object.entries(FORMULA_FIELD_TO_COLUMN_ID)\n .filter(([key, value]) => fieldNames.includes(key) && value != null)\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n .map(([_, value]) => value!)\n );\n};\n\nexport function isCustomEventsColumn(columnId: string) {\n return !Object.values(EventsTableColumnId).some(\n (l) => l.toString() === columnId\n );\n}\n\nconst getTokenFromFieldName = (fieldName: string): MathematicalToken => {\n const columnId =\n FORMULA_FIELD_TO_COLUMN_ID[fieldName as keyof EventsFormulaFields];\n\n if (columnId == null) {\n // Tag field - here we assume it's not currency - might need to change\n return {\n token: `tag-${fieldName}`,\n isPlainToken: false,\n isCurrency: false,\n };\n }\n\n const { isCurrency, isPercent } =\n EVENTS_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[columnId];\n\n return {\n token: columnId,\n isPlainToken: false,\n isCurrency,\n isPercent,\n };\n};\n\n/**\n * Parse editableFormula, transforming formula into mathematical tokens\n * to infer personalization flags\n *\n * E.g. `${ticketCount} + 20` ==> [\n * { token: 'ticketCount', isCurrency: false, isPercent: false, isPlainToken: false },\n * { token: '+', isCurrency: false, isPercent: false, isPlainToken: true },\n * { token: '20', isCurrency: false, isPercent: false, isPlainToken: true }\n * ]\n * @param editableFormula\n * @returns parsed list of tokens, or undefined if failed to parse\n */\nconst parseMathematicalTokensFromFormula = (\n editableFormula: FormulaEditable | undefined\n): MathematicalToken[] | undefined => {\n return parseMathematicalTokensFromFormulaBase(\n editableFormula,\n getTokenFromFieldName\n );\n};\n\nexport const getPersonalizationFlagsFromFormula = (\n executableFormula: FormulaExecutable\n): Partial => {\n const editableFormula = fromExecutableFormula(executableFormula);\n const mathTokens = parseMathematicalTokensFromFormula(editableFormula);\n\n return getPersonalizationFlagsFromFormulaBase(mathTokens);\n};\n","import { ListingReportMetrics, Tag, UiMoney } from 'src/WebApiController';\n\nimport {\n LISTING_REPORT_FORMULA_FIELDS_TO_CID,\n ListingFormulaFieldsListingReportMetrics,\n} from '../../constants/contentIdMaps';\nimport { ColumnPersonalizationFlags } from '../columnUtils.types';\nimport {\n getPersonalizationFlagsFromFormulaBase,\n MathematicalToken,\n parseMathematicalTokensFromFormulaBase,\n} from '../customColumnMathUtils';\nimport {\n evaluateFormulaBase,\n FormulaEditable,\n FormulaExecutable,\n fromExecutableFormula,\n parseEditableFormulaBase,\n parseExecutableFormula,\n tagFieldNameToKey,\n tagKeyToFieldName,\n validateFormulaSingleStatement,\n} from '../customColumnUtils';\nimport { LISTING_REPORT_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES } from './inventoryColumnUtils.constants';\nimport { ListingReportTableColumnId } from './inventoryColumnUtils.types';\nimport { ListingFormulaFields } from './inventoryCustomColumnUtils';\nimport { CustomListingColumn } from './inventoryCustomColumnUtils.types';\n\n/**\n * Select custom columns that only refers to fields that are displayable in the listing report (e.g. ticket quantity)\n * @param customColumns\n * @returns\n */\nexport const filterCustomColumnsForListingReport = (\n customColumns: CustomListingColumn[],\n tagsForEntityType: Tag[] | undefined\n): CustomListingColumn[] => {\n const listingFormulaFields = Object.keys(\n LISTING_REPORT_FORMULA_FIELDS_TO_CID\n );\n const tagKeys = tagsForEntityType?.map((t) => tagKeyToFieldName(t.key)) ?? [];\n\n return customColumns.filter((column) => {\n const editableFormula = fromExecutableFormula(column.formula);\n if (!editableFormula) return false;\n\n const fieldNamesUsed =\n parseEditableFormulaBase(editableFormula, true)?.map((t) => t.token) ??\n [];\n\n return fieldNamesUsed.every(\n (f) => listingFormulaFields.includes(f) || tagKeys.includes(f)\n );\n });\n};\n\nconst listingReportMetricsToFormulaFields = (\n listingMetrics?: ListingReportMetrics\n) => {\n const tagFields = listingMetrics?.tags?.reduce((acc, tag) => {\n const numericValue = parseFloat(tag.value);\n if (isNaN(numericValue)) return acc;\n\n return {\n ...acc,\n [tagKeyToFieldName(tag.key)]: numericValue,\n };\n }, {});\n\n return {\n [ListingFormulaFields.availableQuantity]: listingMetrics?.availQty,\n [ListingFormulaFields.ticketCount]: listingMetrics?.tktQty,\n [ListingFormulaFields.unitCost]: listingMetrics?.ttlCst?.amt,\n [ListingFormulaFields.listPrice]: listingMetrics?.ttlListPrc?.amt,\n [ListingFormulaFields.allInPrice]: listingMetrics?.ttlWebPrc?.amt,\n [ListingFormulaFields.soldQuantity]: listingMetrics?.soldQty,\n [ListingFormulaFields.soldCost]: listingMetrics?.soldCst?.amt,\n [ListingFormulaFields.unsoldCost]: listingMetrics?.unsoldCst?.amt,\n [ListingFormulaFields.soldProceeds]: listingMetrics?.soldProcs?.amt,\n ...tagFields,\n };\n};\n\nexport const FORMULA_FIELD_TO_COLUMN_ID: Record<\n ListingFormulaFieldsListingReportMetrics,\n ListingReportTableColumnId\n> = {\n ['availableQuantity']: ListingReportTableColumnId.UnsoldQuantity,\n ['ticketCount']: ListingReportTableColumnId.TicketCount,\n ['unitCost']: ListingReportTableColumnId.UnitCost,\n ['listPrice']: ListingReportTableColumnId.ListPrice,\n ['allInPrice']: ListingReportTableColumnId.AllInPrice,\n ['soldQuantity']: ListingReportTableColumnId.SoldQuantity,\n ['soldCost']: ListingReportTableColumnId.SoldCost,\n ['unsoldCost']: ListingReportTableColumnId.UnitCost,\n ['soldProceeds']: ListingReportTableColumnId.SoldProceeds,\n};\n\nexport const parseEditableFormula = (\n editableFormula: FormulaEditable | undefined\n): string[] | undefined => {\n const parsedTokenResult = parseEditableFormulaBase(editableFormula);\n if (!parsedTokenResult) {\n return;\n }\n\n const tokens: string[] = [];\n parsedTokenResult.forEach((tokenResult) => {\n if (tokenResult.isPlainToken) {\n tokens.push(tokenResult.token);\n } else {\n const fieldName = tokenResult.token;\n if (\n LISTING_REPORT_FORMULA_FIELDS_TO_CID[\n fieldName as ListingFormulaFieldsListingReportMetrics\n ] == null\n ) {\n // Tag field\n tokens.push(tagFieldNameToKey(fieldName));\n return;\n }\n tokens.push(\n LISTING_REPORT_FORMULA_FIELDS_TO_CID[\n fieldName as ListingFormulaFieldsListingReportMetrics\n ]\n );\n }\n });\n\n return tokens;\n};\n\n/**\n * Mock listing data explicitly used to test-evaluate formula\n * not putting under src/mock to reduce coupling\n */\nexport const LISTING_FORMULA_TEST_DATA: ListingReportMetrics = {\n availQty: 1,\n tktQty: 1,\n ttlCst: { amt: 1 } as UiMoney,\n ttlListPrc: { amt: 1 } as UiMoney,\n ttlWebPrc: { amt: 1 } as UiMoney,\n soldQty: 1,\n soldCst: { amt: 1 } as UiMoney,\n unsoldCst: { amt: 1 } as UiMoney,\n soldProcs: { amt: 1 } as UiMoney,\n} as ListingReportMetrics;\n\nexport const findDependentListingTableColumnIds = (\n editableFormula: FormulaEditable\n): ListingReportTableColumnId[] => {\n const fieldNames =\n parseEditableFormulaBase(editableFormula, true)?.map((t) => t.token) ?? [];\n\n return (\n Object.entries(FORMULA_FIELD_TO_COLUMN_ID)\n .filter(([key]) => fieldNames.includes(key))\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n .map(([_, value]) => value)\n );\n};\n\n/**\n * Evaluate formula defined in custom listing column.\n *\n * Example formula: \"data?.ticketCount + 20\"\n * @param formula\n * @param listingReportMetrics\n * @returns evaluated value, undefined on syntax error\n */\nexport const evaluateFormula = (\n formula: FormulaExecutable,\n listingReportMetrics?: ListingReportMetrics\n) => {\n const data = listingReportMetricsToFormulaFields(listingReportMetrics);\n\n return evaluateFormulaBase(formula, data);\n};\n\nconst createListingTestData = (\n tagsForEntityType: Tag[] | undefined\n): ListingReportMetrics => {\n const tagData = tagsForEntityType?.map((t) => {\n t.value = '1';\n return t;\n });\n\n return {\n ...LISTING_FORMULA_TEST_DATA,\n tags: tagData ?? [],\n };\n};\n\nexport const validateFormula = (\n formula: string,\n tagsForEntityType: Tag[] | undefined\n) => {\n return (\n parseExecutableFormula(formula) != null &&\n evaluateFormula(formula, createListingTestData(tagsForEntityType)) !=\n null &&\n validateFormulaSingleStatement(formula)\n );\n};\n\nconst getTokenFromFieldName = (fieldName: string): MathematicalToken => {\n const columnId =\n FORMULA_FIELD_TO_COLUMN_ID[\n fieldName as ListingFormulaFieldsListingReportMetrics\n ];\n\n if (columnId == null) {\n // Tag field - here we assume it's not currency - might need to change\n return {\n token: `tag-${fieldName}`,\n isPlainToken: false,\n isCurrency: false,\n };\n }\n\n const { isCurrency, isPercent } =\n LISTING_REPORT_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[columnId];\n\n return {\n token: columnId,\n isPlainToken: false,\n isCurrency,\n isPercent,\n };\n};\n\n/**\n * Parse editableFormula, transforming formula into mathematical tokens\n * to infer personalization flags\n *\n * E.g. `${ticketCount} + 20` ==> [\n * { token: 'ticketCount', isCurrency: false, isPercent: false, isPlainToken: false },\n * { token: '+', isCurrency: false, isPercent: false, isPlainToken: true },\n * { token: '20', isCurrency: false, isPercent: false, isPlainToken: true }\n * ]\n * @param editableFormula\n * @returns parsed list of tokens, or undefined if failed to parse\n */\nconst parseMathematicalTokensFromFormula = (\n editableFormula: FormulaEditable | undefined\n): MathematicalToken[] | undefined => {\n return parseMathematicalTokensFromFormulaBase(\n editableFormula,\n getTokenFromFieldName\n );\n};\n\nexport const getPersonalizationFlagsFromFormula = (\n executableFormula: FormulaExecutable\n): Partial => {\n const editableFormula = fromExecutableFormula(executableFormula);\n const mathTokens = parseMathematicalTokensFromFormula(editableFormula);\n\n return getPersonalizationFlagsFromFormulaBase(mathTokens);\n};\n","import { SaleFormulaFields } from 'src/tables/SalesTable/SalesTable.type';\nimport {\n evaluateFormulaBase,\n FormulaEditable,\n FormulaExecutable,\n fromExecutableFormula,\n parseEditableFormulaBase,\n parseExecutableFormula,\n tagFieldNameToKey,\n tagKeyToFieldName,\n validateFormulaSingleStatement,\n} from 'src/utils/columns/customColumnUtils';\nimport { Sale, Tag, UiMoney } from 'src/WebApiController';\n\nimport { SALE_FORMULA_FIELDS_TO_CID } from '../../constants/contentIdMaps';\nimport { SaleReportMetricsWithGroupBy } from '../../reportsUtils';\nimport { ColumnPersonalizationFlags } from '../columnUtils.types';\nimport {\n getPersonalizationFlagsFromFormulaBase,\n MathematicalToken,\n parseMathematicalTokensFromFormulaBase,\n} from '../customColumnMathUtils';\nimport { SALE_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES } from './salesColumnUtils.constants';\nimport { SalesTableColumnId } from './salesColumnUtils.types';\nimport { CustomSalesColumn } from './salesCustomColumnUtils.types';\n\nexport const SALE_TABLE_CUSTOM_COLUMN_PERSONALIZATION_CONFIG: Partial =\n {\n isHiddenByDefault: true,\n isNumeric: true,\n };\n\nexport const FORMULA_FIELD_TO_COLUMN_ID: Record<\n keyof SaleFormulaFields,\n SalesTableColumnId\n> = {\n ['totalNetProceeds']: SalesTableColumnId.Proceeds,\n ['quantitySold']: SalesTableColumnId.QuantitySold,\n ['charges']: SalesTableColumnId.Charges,\n ['credits']: SalesTableColumnId.Credits,\n ['soldTicketCost']: SalesTableColumnId.SoldTicketCost,\n ['pandL']: SalesTableColumnId.PandL,\n ['margin']: SalesTableColumnId.Margin,\n};\n\nexport const parseEditableFormula = (\n editableFormula: FormulaEditable | undefined\n): string[] | undefined => {\n const parsedTokenResult = parseEditableFormulaBase(editableFormula);\n if (!parsedTokenResult) {\n return;\n }\n\n const tokens: string[] = [];\n parsedTokenResult.forEach((tokenResult) => {\n if (tokenResult.isPlainToken) {\n tokens.push(tokenResult.token);\n } else {\n const fieldName = tokenResult.token;\n if (\n SALE_FORMULA_FIELDS_TO_CID[fieldName as keyof SaleFormulaFields] == null\n ) {\n // Tag field\n tokens.push(tagFieldNameToKey(fieldName));\n return;\n }\n tokens.push(\n SALE_FORMULA_FIELDS_TO_CID[fieldName as keyof SaleFormulaFields]\n );\n }\n });\n\n return tokens;\n};\n\nexport const filterCustomColumnsForSale = (\n customColumns: CustomSalesColumn[],\n tagsForEntityType: Tag[] | undefined\n): CustomSalesColumn[] => {\n const saleFormulaFields = Object.keys(SALE_FORMULA_FIELDS_TO_CID);\n const tagKeys = tagsForEntityType?.map((t) => tagKeyToFieldName(t.key)) ?? [];\n return customColumns.filter((column) => {\n const editableFormula = fromExecutableFormula(column.formula);\n if (!editableFormula) return false;\n\n const fieldNamesUsed =\n parseEditableFormulaBase(editableFormula, true)?.map((t) => t.token) ??\n [];\n\n return fieldNamesUsed.every(\n (f) => saleFormulaFields.includes(f) || tagKeys.includes(f)\n );\n });\n};\n\nconst mapListingFormulaFields = (sale?: Sale): SaleFormulaFields => {\n const tagFields = sale?.tags?.reduce((acc, tag) => {\n const numericValue = parseFloat(tag.value);\n if (isNaN(numericValue)) return acc;\n\n return {\n ...acc,\n [tagKeyToFieldName(tag.key)]: numericValue,\n };\n }, {});\n\n return {\n totalNetProceeds: sale?.ttlNetProcs?.amt,\n quantitySold: sale?.qtySold,\n charges: sale?.charges?.amt,\n credits: sale?.credits?.amt,\n soldTicketCost: sale?.soldTktCost?.amt,\n pandL: sale?.pandL?.amt,\n margin: sale?.margin,\n ...tagFields,\n };\n};\n\nexport const evaluateFormula = (formula: FormulaExecutable, sale?: Sale) => {\n const data = mapListingFormulaFields(sale);\n\n return evaluateFormulaBase(formula, data);\n};\n\nexport const evaluateFormulaSaleMetrics = (\n formula: FormulaExecutable,\n sale?: SaleReportMetricsWithGroupBy\n) => {\n const tagFields = sale?.tags?.reduce((acc, tag) => {\n const numericValue = parseFloat(tag.value);\n if (isNaN(numericValue)) return acc;\n\n return {\n ...acc,\n [tagKeyToFieldName(tag.key)]: numericValue,\n };\n }, {});\n\n const data = {\n totalNetProceeds: sale?.netProcs?.amt,\n quantitySold: sale?.qtySold,\n charges: sale?.chargs?.amt,\n credits: sale?.creds?.amt,\n soldTicketCost: sale?.soldCst?.amt,\n pandL: sale?.pandL?.amt,\n margin: sale?.marg,\n ...tagFields,\n };\n\n return evaluateFormulaBase(formula, data);\n};\n\nexport const SALE_FORMULA_TEST_DATA: Sale = {\n qtySold: 1,\n ttlNetProcs: { amt: 1 } as UiMoney,\n charges: { amt: 1 } as UiMoney,\n credits: { amt: 1 } as UiMoney,\n soldTktCost: { amt: 1 } as UiMoney,\n pandL: { amt: 1 } as UiMoney,\n margin: 1,\n} as Sale;\n\nconst createSaleTestData = (tagsForEntityType: Tag[] | undefined): Sale => {\n const tagData = tagsForEntityType?.map((t) => {\n t.value = '1';\n return t;\n });\n\n return {\n ...SALE_FORMULA_TEST_DATA,\n tags: tagData ?? [],\n };\n};\n\nexport const validateFormula = (\n formula: string,\n tagsForEntityType: Tag[] | undefined\n) => {\n return (\n parseExecutableFormula(formula) != null &&\n evaluateFormula(formula, createSaleTestData(tagsForEntityType)) != null &&\n validateFormulaSingleStatement(formula)\n );\n};\n\nexport const findDependentSaleTableColumnIds = (\n editableFormula: FormulaEditable\n): SalesTableColumnId[] => {\n const fieldNames =\n parseEditableFormulaBase(editableFormula, true)?.map((t) => t.token) ?? [];\n\n return (\n Object.entries(FORMULA_FIELD_TO_COLUMN_ID)\n .filter(([key]) => fieldNames.includes(key))\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n .map(([_, value]) => value)\n );\n};\n\nconst getTokenFromFieldName = (fieldName: string): MathematicalToken => {\n const columnId =\n FORMULA_FIELD_TO_COLUMN_ID[fieldName as keyof SaleFormulaFields];\n\n if (columnId == null) {\n // Tag field - here we assume it's not currency - might need to change\n return {\n token: `tag-${fieldName}`,\n isPlainToken: false,\n isCurrency: false,\n };\n }\n\n const { isCurrency, isPercent } =\n SALE_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[columnId];\n\n return {\n token: columnId,\n isPlainToken: false,\n isCurrency,\n isPercent,\n };\n};\n\n/**\n * Parse editableFormula, transforming formula into mathematical tokens\n * to infer personalization flags\n *\n * E.g. `${ticketCount} + 20` ==> [\n * { token: 'ticketCount', isCurrency: false, isPercent: false, isPlainToken: false },\n * { token: '+', isCurrency: false, isPercent: false, isPlainToken: true },\n * { token: '20', isCurrency: false, isPercent: false, isPlainToken: true }\n * ]\n * @param editableFormula\n * @returns parsed list of tokens, or undefined if failed to parse\n */\nconst parseMathematicalTokensFromFormula = (\n editableFormula: FormulaEditable | undefined\n): MathematicalToken[] | undefined => {\n return parseMathematicalTokensFromFormulaBase(\n editableFormula,\n getTokenFromFieldName\n );\n};\n\nexport const getPersonalizationFlagsFromFormula = (\n executableFormula: FormulaExecutable\n): Partial => {\n const editableFormula = fromExecutableFormula(executableFormula);\n const mathTokens = parseMathematicalTokensFromFormula(editableFormula);\n\n return getPersonalizationFlagsFromFormulaBase(mathTokens);\n};\n","import { ON_SALE_EVENTS_TABLE_COLUMNS_CONFIG } from 'src/navigations/Routes/OnSaleEvent/OnSaleEventView.constants';\nimport { OnSaleEventsTableColumnId } from 'src/navigations/Routes/OnSaleEvent/OnSaleEventView.types';\nimport { MarketplacePaymentsTableColumnId } from 'src/utils/columns/marketplacePayments/marketplacePaymentsColumnsUtils.types';\nimport {\n PAYMENTS_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES,\n PAYMENTS_TABLE_CUSTOM_COLUMN_PERSONALIZATION_CONFIG,\n} from 'src/utils/columns/payments/paymentsColumnUtils.constants';\nimport { CustomMarketplacePaymentsColumn } from 'src/utils/columns/payments/paymentsCustomColumnUtils.types';\nimport {\n PURCHASES_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES,\n PURCHASES_TABLE_CUSTOM_COLUMN_PERSONALIZATION_CONFIG,\n} from 'src/utils/columns/purchases/purchasesColumnUtils.constants';\nimport { PurchasesTableColumnId } from 'src/utils/columns/purchases/purchasesColumnUtils.types';\nimport { CustomPurchasesColumn } from 'src/utils/columns/purchases/purchasesCustomColumnUtils.types';\nimport { ReportTag, Tag, TagsValueType } from 'src/WebApiController';\n\nimport { SectionType } from '../types/sectionType';\nimport { AdCampaignsListingsColumn } from './adCampaigns/adCampaignsCustomColumnUtils.types';\nimport { AdGroupsListingsColumn } from './adGroups/adGroupsCustomColumnUtils.types';\nimport { PERSONALIZATION_DEFAULTS } from './columnUtils.types';\nimport {\n EVENTS_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES,\n ON_SALE_EVENTS_TABLE_CUSTOM_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES,\n} from './events/eventsColumnUtils.constants';\nimport { EventsTableColumnId } from './events/eventsColumnUtils.types';\nimport { getPersonalizationFlagsFromFormula as getPersonalizationFlagsFromFormulaEvents } from './events/eventsCustomColumnUtils';\nimport { EVENTS_TABLE_CUSTOM_COLUMN_PERSONALIZATION_CONFIG } from './events/eventsCustomColumnUtils.constants';\nimport {\n CustomEventsColumn,\n CustomOnSaleEventsColumn,\n} from './events/eventsCustomColumnUtils.types';\nimport {\n LISTING_REPORT_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES,\n LISTING_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES,\n LISTING_TABLE_CUSTOM_COLUMN_PERSONALIZATION_CONFIG,\n} from './inventory/inventoryColumnUtils.constants';\nimport {\n ListingReportTableColumnId,\n ListingTableColumnId,\n ListingTableFlattenedColumnId,\n} from './inventory/inventoryColumnUtils.types';\nimport { getPersonalizationFlagsFromFormula as getPersonalizationFlagsFromFormulaListings } from './inventory/inventoryCustomColumnUtils';\nimport { CustomListingColumn } from './inventory/inventoryCustomColumnUtils.types';\nimport { getPersonalizationFlagsFromFormula as getPersonalizationFlagsFromFormulaListingsReport } from './inventory/inventoryReportCustomColumnUtils';\nimport { SALE_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES } from './sales/salesColumnUtils.constants';\nimport {\n SalesReportTableColumnId,\n SalesTableColumnId,\n SalesTableFlattenedColumnId,\n} from './sales/salesColumnUtils.types';\nimport {\n getPersonalizationFlagsFromFormula as getPersonalizationFlagsFromFormulaSales,\n SALE_TABLE_CUSTOM_COLUMN_PERSONALIZATION_CONFIG,\n} from './sales/salesCustomColumnUtils';\nimport { CustomSalesColumn } from './sales/salesCustomColumnUtils.types';\nimport { SALE_REPORT_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES } from './sales/salesReportColumnUtils.constants';\n\nexport const getColumnPersonalization = ({\n id,\n sectionType,\n matchingCustomColumn,\n matchingTag,\n}: {\n id: string;\n sectionType: SectionType;\n matchingCustomColumn?:\n | CustomListingColumn\n | CustomSalesColumn\n | CustomEventsColumn\n | CustomPurchasesColumn\n | AdCampaignsListingsColumn\n | AdGroupsListingsColumn\n | CustomMarketplacePaymentsColumn\n | CustomOnSaleEventsColumn;\n matchingTag?: Tag | ReportTag;\n}) => {\n const personalizationDefaults = { ...PERSONALIZATION_DEFAULTS };\n\n if (matchingTag) {\n personalizationDefaults.isNumeric =\n matchingTag.valueType === TagsValueType.Int ||\n matchingTag.valueType === TagsValueType.Decimal;\n personalizationDefaults.isInteger =\n matchingTag.valueType === TagsValueType.Int;\n\n return { ...personalizationDefaults };\n } else {\n const {\n customColumnPersonalizationConfig,\n personalizationOverride,\n getPersonalizationFlagsFromFormula,\n } =\n sectionType === SectionType.Listings ||\n sectionType === SectionType.ListingsFlattened\n ? {\n customColumnPersonalizationConfig:\n LISTING_TABLE_CUSTOM_COLUMN_PERSONALIZATION_CONFIG,\n personalizationOverride:\n LISTING_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n id as ListingTableColumnId | ListingTableFlattenedColumnId\n ],\n getPersonalizationFlagsFromFormula:\n getPersonalizationFlagsFromFormulaListings,\n }\n : sectionType === SectionType.InventorySideTable\n ? {\n customColumnPersonalizationConfig:\n LISTING_TABLE_CUSTOM_COLUMN_PERSONALIZATION_CONFIG,\n personalizationOverride:\n LISTING_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n id as ListingTableColumnId | ListingTableFlattenedColumnId\n ],\n getPersonalizationFlagsFromFormula:\n getPersonalizationFlagsFromFormulaListingsReport,\n }\n : sectionType === SectionType.ListingsReport\n ? {\n customColumnPersonalizationConfig:\n LISTING_TABLE_CUSTOM_COLUMN_PERSONALIZATION_CONFIG,\n personalizationOverride:\n LISTING_REPORT_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n id as ListingReportTableColumnId\n ],\n getPersonalizationFlagsFromFormula:\n getPersonalizationFlagsFromFormulaListingsReport,\n }\n : sectionType === SectionType.Sales ||\n sectionType === SectionType.SalesFlattened ||\n sectionType === SectionType.SalesSideTable\n ? {\n customColumnPersonalizationConfig:\n SALE_TABLE_CUSTOM_COLUMN_PERSONALIZATION_CONFIG,\n personalizationOverride:\n SALE_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n id as SalesTableColumnId | SalesTableFlattenedColumnId\n ],\n getPersonalizationFlagsFromFormula:\n getPersonalizationFlagsFromFormulaSales,\n }\n : sectionType === SectionType.SalesReport\n ? {\n customColumnPersonalizationConfig:\n SALE_TABLE_CUSTOM_COLUMN_PERSONALIZATION_CONFIG,\n personalizationOverride:\n SALE_REPORT_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n id as SalesReportTableColumnId\n ],\n getPersonalizationFlagsFromFormula:\n getPersonalizationFlagsFromFormulaSales,\n }\n : sectionType === SectionType.Purchases ||\n sectionType === SectionType.PurchaseEvent ||\n sectionType === SectionType.PurchaseSideTable\n ? {\n customColumnPersonalizationConfig:\n PURCHASES_TABLE_CUSTOM_COLUMN_PERSONALIZATION_CONFIG,\n personalizationOverride:\n PURCHASES_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n id as PurchasesTableColumnId\n ],\n getPersonalizationFlagsFromFormula: () => ({\n isCurrency: false,\n isPercent: false,\n }),\n }\n : sectionType === SectionType.MarketplacePaymentsTable\n ? {\n customColumnPersonalizationConfig:\n PAYMENTS_TABLE_CUSTOM_COLUMN_PERSONALIZATION_CONFIG,\n personalizationOverride:\n PAYMENTS_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n id as MarketplacePaymentsTableColumnId\n ],\n getPersonalizationFlagsFromFormula: () => ({\n isCurrency: false,\n isPercent: false,\n }),\n }\n : sectionType === SectionType.OnSaleEvents\n ? {\n customColumnPersonalizationConfig:\n ON_SALE_EVENTS_TABLE_COLUMNS_CONFIG,\n personalizationOverride:\n ON_SALE_EVENTS_TABLE_CUSTOM_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n id as OnSaleEventsTableColumnId\n ],\n getPersonalizationFlagsFromFormula:\n getPersonalizationFlagsFromFormulaEvents,\n }\n : // SectionType.Event\n {\n customColumnPersonalizationConfig:\n EVENTS_TABLE_CUSTOM_COLUMN_PERSONALIZATION_CONFIG,\n personalizationOverride:\n EVENTS_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES[\n id as EventsTableColumnId\n ],\n getPersonalizationFlagsFromFormula:\n getPersonalizationFlagsFromFormulaEvents,\n };\n\n const personalization = matchingCustomColumn\n ? customColumnPersonalizationConfig\n : personalizationOverride;\n\n if (matchingCustomColumn?.formula) {\n const personalizationFromMathToken = getPersonalizationFlagsFromFormula(\n matchingCustomColumn.formula\n );\n personalizationDefaults.isCurrency =\n personalizationFromMathToken.isCurrency ??\n personalizationDefaults.isCurrency;\n personalizationDefaults.isPercent =\n personalizationFromMathToken.isPercent ??\n personalizationDefaults.isPercent;\n }\n\n return { ...personalizationDefaults, ...personalization };\n }\n};\n","import { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { DivWithTitle } from 'src/core/ui/DivWithTitle';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { FormatOption } from 'src/modals/EditTableColumns';\nimport { TableShimmeringDiv } from 'src/tables/Table/Table.styled';\nimport { getColumnPersonalization } from 'src/utils/columns/columnPersonalizationUtils';\nimport { CustomListingColumn } from 'src/utils/columns/inventory/inventoryCustomColumnUtils.types';\nimport { CustomSalesColumn } from 'src/utils/columns/sales/salesCustomColumnUtils.types';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { applyNumberFormatting } from 'src/utils/numberFormatter';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport { ReportTag, Tag } from 'src/WebApiController';\n\nexport const CustomNumericCell = ({\n columnId,\n userDefinedPrecision,\n value,\n isLoading,\n hide,\n shimmeringDivHeight,\n sectionType,\n matchingCustomColumn,\n matchingTag,\n currencyCode,\n}: {\n columnId: string;\n userDefinedPrecision: FormatOption | undefined;\n value: number | null;\n isLoading: boolean;\n hide?: boolean;\n shimmeringDivHeight: string;\n sectionType: SectionType;\n matchingCustomColumn?: CustomListingColumn | CustomSalesColumn;\n matchingTag?: Tag | ReportTag;\n currencyCode?: string;\n}) => {\n const { loginContext } = useAppContext();\n const { getUiCurrency } = useLocalizationContext();\n const uiCurrency = getUiCurrency(\n currencyCode ?? loginContext?.user?.activeAccount.currencyCode\n );\n\n const { isCurrency, isPercent } = getColumnPersonalization({\n id: columnId,\n sectionType,\n matchingCustomColumn,\n matchingTag,\n });\n\n if (isLoading) {\n return ;\n }\n\n if (hide) {\n return null;\n }\n\n return (\n \n \n {value == null ? (\n ''\n ) : isNaN(value) || !isFinite(value) ? (\n \n ) : (\n <>\n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value,\n currencyCode: isCurrency ? uiCurrency.code : undefined,\n currencyDecimalDigits: isCurrency ? uiCurrency.dec : undefined,\n isPercent: isPercent && !isCurrency,\n })}\n \n )}\n \n \n );\n};\n","import { TableCellDiv as TableCellDivV1 } from 'src/core/ui/TableCellDiv';\nimport styled from 'styled-components/macro';\n\nexport const TableCellDiv = styled((props) => )`\n .styled-input {\n border-bottom: 0;\n display: flex;\n\n &:hover,\n &:focus,\n &:focus-within,\n &:active {\n border-bottom: 0;\n }\n }\n`;\n","import { ChangeEvent, useCallback, useEffect, useMemo, useRef } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogMetricsContext } from 'src/contexts/CatalogMetricsContext';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { useInputPriceFocusContext } from 'src/contexts/InputPriceFocusContext/InputPriceFocusContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { getTextFieldState } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { RotatingWrapper } from 'src/core/ui/AnimatingWrapper';\nimport { useUserCanSetPrice } from 'src/hooks/useUserHasListingPermissions';\nimport { CheckIcon, IconsFill, ProcessingIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { onPriceFieldChange } from 'src/utils/inventoryUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n InventoryViewMode,\n Listing,\n ListingClient,\n ListingDetailDataField,\n ListingDetails,\n ListingMetrics,\n ListingQuery,\n ListingStatus,\n} from 'src/WebApiController';\n\nimport { TableCellDiv } from './ListingPriceCell.styled';\nimport { ListingPricingInput, PriceField } from './ListingPriceForm.types';\n\ntype ListingPriceCellProps = {\n listing: Listing;\n currencyCode: string;\n nextEditableListingId?: number | undefined;\n sellerFee?: number | null;\n field: PriceField;\n otherField: PriceField;\n disabled?: boolean;\n onFocus?: React.FocusEventHandler | undefined;\n viagVirtualId?: string;\n};\n\nexport const ListingPriceCell = ({\n listing,\n currencyCode,\n sellerFee,\n field,\n otherField,\n onFocus,\n disabled,\n viagVirtualId,\n nextEditableListingId,\n}: ListingPriceCellProps) => {\n const { id: listingId, idOnMkp, status } = listing;\n const { getUiCurrency } = useLocalizationContext();\n const { setValue, watch, clearErrors, getFieldState, formState } =\n useFormContext();\n const { getSelection } = useMultiSelectionContext();\n const listingSelection = getSelection(viagVirtualId);\n const isSelectionMode = listingSelection.isSingleGroupMultiSelect;\n\n const price = watch(field) ?? 0;\n const otherPrice = watch(otherField) ?? 0;\n\n const isSubmitting = watch('isSubmitting');\n const isSubmittingPricingSettings = watch('isSubmittingPricingSettings');\n const isSubmittingRowIndex = watch('isSubmittingRowIndex');\n const rowIndex = watch('rowIndex');\n const currentPageIndex = watch('currentPageIndex');\n\n const priceIsSubmitting =\n isSubmitting &&\n (isSubmittingRowIndex === undefined || isSubmittingRowIndex === rowIndex);\n\n const uiCurrency = useMemo(\n () => getUiCurrency(currencyCode),\n [currencyCode, getUiCurrency]\n );\n const {\n pageSize,\n disablePagination,\n inputPriceFocusContext,\n setInputPriceFocusContext,\n disabledFocusContexts,\n } = useInputPriceFocusContext();\n\n const { filterQuery } = useFilterQueryContext();\n\n const fieldError = getFieldState(field, formState)?.error?.message;\n\n const priceHasChanged =\n formState.defaultValues?.[field] !== price &&\n price != null &&\n price >= 0 &&\n !isSubmitting;\n\n // ListingTable don't always have these context wrappers - remember not to assume these are NOT NULL\n const findNextFocusIndex = useCallback(() => {\n // need to skip the disabled rows from disabledFocusContexts\n let newRowIndex = rowIndex + 1;\n let nextRowIndex =\n !disablePagination && pageSize && newRowIndex >= pageSize\n ? 0\n : newRowIndex;\n let nextPageIndex = disablePagination\n ? 0\n : nextRowIndex === 0\n ? currentPageIndex + 1\n : currentPageIndex;\n\n while (\n disabledFocusContexts?.some(\n (x) =>\n x?.currentPageIndex === nextPageIndex &&\n x?.rowIndex === nextRowIndex &&\n (x?.viagVirtualId === viagVirtualId ||\n filterQuery.viewMode === InventoryViewMode.FlattenedView)\n )\n ) {\n newRowIndex = nextRowIndex + 1;\n nextRowIndex =\n !disablePagination && pageSize && newRowIndex >= pageSize\n ? 0\n : newRowIndex;\n nextPageIndex = disablePagination\n ? 0\n : nextRowIndex === 0\n ? nextPageIndex + 1\n : nextPageIndex;\n }\n\n return { nextRowIndex, nextPageIndex };\n }, [\n currentPageIndex,\n disablePagination,\n disabledFocusContexts,\n filterQuery.viewMode,\n pageSize,\n rowIndex,\n viagVirtualId,\n ]);\n\n const inputIsFocus = useMemo(() => {\n if (!inputPriceFocusContext) {\n return false;\n }\n const {\n viagVirtualId: ctxEventId,\n rowIndex: ctxRowIndex,\n listingId,\n priceField,\n } = inputPriceFocusContext;\n\n if (priceField !== field) {\n return false;\n }\n\n if (\n ctxEventId !== viagVirtualId &&\n filterQuery.viewMode === InventoryViewMode.FlattenedView\n ) {\n return false;\n }\n\n // Listing id over rowIndex\n if (listingId) {\n return listingId === listing.id;\n }\n return ctxRowIndex === rowIndex;\n }, [\n viagVirtualId,\n field,\n filterQuery.viewMode,\n inputPriceFocusContext,\n listing.id,\n rowIndex,\n ]);\n\n const saveMsg = useContent(ContentId.Save);\n\n const { showErrorDialog } = useErrorBoundaryContext();\n const { setActivePosEntity } = useActivePosEntityContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const { refreshMetrics } = useCatalogMetricsContext();\n\n const isListed =\n status === ListingStatus.Listed || status === ListingStatus.ListingPending;\n\n const onBroadcastClick = useCallback(() => {\n tryInvokeApi(\n async () => {\n const client = new ListingClient(activeAccountWebClientConfig);\n\n const result = await client.deleteMarketplaceListings(listingId, []);\n if (result) {\n refreshMetrics?.();\n\n // Refresh the active data so the SaleDetail dialog and table will have the new content\n setActivePosEntity(listingId, idOnMkp, true, [\n ListingDetailDataField.Basic,\n ]);\n }\n },\n (error) => {\n showErrorDialog('ListingClient.deleteMarketplaceListings', error, {\n trackErrorData: { listingId, idOnMkp },\n });\n }\n );\n }, [\n activeAccountWebClientConfig,\n listingId,\n idOnMkp,\n refreshMetrics,\n setActivePosEntity,\n showErrorDialog,\n ]);\n\n const onChangeHandler = useCallback(\n (e: ChangeEvent) => {\n const newValue = parseFloat(e.target.value) ?? 0;\n onPriceFieldChange(\n newValue,\n field,\n price,\n otherField,\n otherPrice,\n // This is the otherToFieldRatio, so if field is allInPrice, the ratio os All-In-to-List\n field === 'allInPrice'\n ? 1 - (sellerFee ?? 0) // all-in-to-list\n : 1 / (1 - (sellerFee ?? 0)), // list-to-all-in\n clearErrors,\n setValue\n );\n },\n [clearErrors, field, otherField, otherPrice, price, setValue, sellerFee]\n );\n\n const onBlurHandler = useCallback(() => {\n if (\n rowIndex !== undefined &&\n inputPriceFocusContext?.rowIndex === rowIndex\n ) {\n setInputPriceFocusContext(undefined);\n }\n }, [rowIndex, inputPriceFocusContext?.rowIndex, setInputPriceFocusContext]);\n\n const inputRef = useRef(null);\n\n const handlePriceSubmit = useCallback(() => {\n setValue('isSubmitting', true);\n\n if (price === 0 && otherPrice === 0 && isListed) {\n // If both price is zero and the listing is listed - ask\n // user if they want to unbroadcast\n onBroadcastClick();\n }\n }, [isListed, onBroadcastClick, otherPrice, price, setValue]);\n\n const handleKeyDown = (e: React.KeyboardEvent) => {\n if (e.key === 'Enter') {\n if (fieldError) {\n return;\n }\n if (rowIndex !== undefined) {\n if (priceHasChanged) {\n e.stopPropagation();\n // Only submit if Enter is hit in the box that has changes\n handlePriceSubmit();\n } else {\n e.stopPropagation();\n }\n\n const { nextRowIndex, nextPageIndex } = findNextFocusIndex();\n setInputPriceFocusContext({\n viagVirtualId: viagVirtualId!,\n rowIndex: nextRowIndex,\n priceField: field,\n currentPageIndex: nextPageIndex,\n listingId: nextEditableListingId,\n });\n }\n }\n };\n\n useEffect(() => {\n if (inputIsFocus && inputRef.current) {\n inputRef.current.focus();\n inputRef.current.select();\n inputRef.current.scrollIntoView({\n behavior: 'smooth',\n block: 'nearest',\n inline: 'nearest',\n });\n }\n }, [inputIsFocus]);\n\n const canSetPrice = useUserCanSetPrice(listing, false);\n\n return (\n \n \n {\n e.stopPropagation();\n e.preventDefault();\n }}\n rootProps={{\n variant: 'small',\n state: getTextFieldState(fieldError),\n disabled:\n disabled ||\n priceIsSubmitting ||\n isSelectionMode ||\n isSubmittingPricingSettings,\n }}\n uiCurrency={uiCurrency}\n alignment=\"right\"\n ref={inputRef}\n disabled={\n disabled ||\n priceIsSubmitting ||\n isSubmittingPricingSettings ||\n isSelectionMode ||\n !canSetPrice\n }\n postfixDisplay={\n !disabled && !fieldError && priceHasChanged ? (\n {\n e.stopPropagation();\n handlePriceSubmit();\n }}\n />\n ) : priceIsSubmitting ? (\n
    \n \n \n \n
    \n ) : undefined\n }\n value={price}\n onBlur={onBlurHandler}\n onChange={onChangeHandler}\n onKeyDown={handleKeyDown}\n onFocus={onFocus}\n onClick={() => inputRef?.current?.select()}\n />\n \n
    \n );\n};\n","import { ChangeEvent, useCallback, useEffect, useMemo, useRef } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { useInputPriceFocusContext } from 'src/contexts/InputPriceFocusContext/InputPriceFocusContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { getTextFieldState } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { RotatingWrapper } from 'src/core/ui/AnimatingWrapper';\nimport { useUserCanSetPrice } from 'src/hooks/useUserHasListingPermissions';\nimport {\n CheckIcon,\n CrossIcon,\n IconsFill,\n ProcessingIcon,\n} from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { InventoryViewMode, Listing, ListingQuery } from 'src/WebApiController';\n\nimport { TableCellDiv } from './ListingPriceCell.styled';\nimport {\n ListingPricingInput,\n ProceedsPriceField,\n} from './ListingPriceForm.types';\n\ntype ListingProceedsFloorCellProps = {\n listing: Listing;\n currencyCode: string;\n field: ProceedsPriceField;\n isAllInPrice?: boolean;\n sellerFee?: number | null;\n disabled?: boolean;\n onFocus?: React.FocusEventHandler | undefined;\n viagVirtualId?: string;\n};\n\nexport const ListingProceedsFloorCell: React.FC<\n ListingProceedsFloorCellProps\n> = ({\n listing,\n currencyCode,\n sellerFee,\n field,\n isAllInPrice,\n onFocus,\n disabled,\n viagVirtualId,\n}) => {\n const { getUiCurrency } = useLocalizationContext();\n const { setValue, watch, clearErrors, getFieldState, formState } =\n useFormContext();\n const { getSelection } = useMultiSelectionContext();\n const listingSelection = getSelection(viagVirtualId);\n const isSelectionMode = listingSelection.isSingleGroupMultiSelect;\n\n const price = watch(field) ?? 0;\n\n const isSubmitting = watch('isSubmitting');\n const isSubmittingPricingSettings = watch('isSubmittingPricingSettings');\n const isSubmittingRowIndex = watch('isSubmittingRowIndex');\n const rowIndex = watch('rowIndex');\n const currentPageIndex = watch('currentPageIndex');\n\n const priceIsSubmitting =\n isSubmitting &&\n (isSubmittingRowIndex === undefined || isSubmittingRowIndex === rowIndex);\n\n const uiCurrency = useMemo(\n () => getUiCurrency(currencyCode),\n [currencyCode, getUiCurrency]\n );\n const {\n pageSize,\n disablePagination,\n inputPriceFocusContext,\n setInputPriceFocusContext,\n disabledFocusContexts,\n } = useInputPriceFocusContext();\n\n const { filterQuery } = useFilterQueryContext();\n\n const fieldError = getFieldState(field, formState)?.error?.message;\n\n const priceHasChanged =\n formState.defaultValues?.[field] !== price &&\n price != null &&\n price > 0 &&\n !isSubmitting;\n\n // ListingTable don't always have these context wrappers - remember not to assume these are NOT NULL\n const findNextFocusIndex = useCallback(() => {\n // need to skip the disabled rows from disabledFocusContexts\n let newRowIndex = rowIndex + 1;\n let nextRowIndex =\n !disablePagination && pageSize && newRowIndex >= pageSize\n ? 0\n : newRowIndex;\n let nextPageIndex = disablePagination\n ? 0\n : nextRowIndex === 0\n ? currentPageIndex + 1\n : currentPageIndex;\n\n while (\n disabledFocusContexts?.some(\n (x) =>\n x?.currentPageIndex === nextPageIndex &&\n x?.rowIndex === nextRowIndex &&\n (x?.viagVirtualId === viagVirtualId ||\n filterQuery.viewMode === InventoryViewMode.FlattenedView)\n )\n ) {\n newRowIndex = nextRowIndex + 1;\n nextRowIndex =\n !disablePagination && pageSize && newRowIndex >= pageSize\n ? 0\n : newRowIndex;\n nextPageIndex = disablePagination\n ? 0\n : nextRowIndex === 0\n ? nextPageIndex + 1\n : nextPageIndex;\n }\n\n return { nextRowIndex, nextPageIndex };\n }, [\n currentPageIndex,\n disablePagination,\n disabledFocusContexts,\n filterQuery.viewMode,\n pageSize,\n rowIndex,\n viagVirtualId,\n ]);\n\n const inputIsFocus = useMemo(\n () =>\n (inputPriceFocusContext?.viagVirtualId === viagVirtualId ||\n filterQuery.viewMode === InventoryViewMode.FlattenedView) &&\n inputPriceFocusContext?.rowIndex === rowIndex &&\n inputPriceFocusContext?.priceField === field,\n [\n field,\n filterQuery.viewMode,\n inputPriceFocusContext?.viagVirtualId,\n inputPriceFocusContext?.priceField,\n inputPriceFocusContext?.rowIndex,\n rowIndex,\n viagVirtualId,\n ]\n );\n\n const saveMsg = useContent(ContentId.Save);\n const cancelMsg = useContent(ContentId.Cancel);\n\n const onChangeHandler = useCallback(\n (e: ChangeEvent) => {\n let newValue = parseFloat(e.target.value) ?? 0;\n\n if (Number.isNaN(newValue)) {\n newValue = 0;\n } else if (newValue > Infinity) {\n newValue = Number.MAX_VALUE;\n }\n\n if (newValue >= 0 && newValue <= Number.MAX_VALUE) {\n const sanitizedValue = isAllInPrice\n ? newValue * (1 - (sellerFee ?? 0))\n : newValue;\n setValue(field, Math.round(sanitizedValue * 100) / 100);\n clearErrors(field);\n }\n },\n [isAllInPrice, sellerFee, setValue, field, clearErrors]\n );\n\n const onBlurHandler = useCallback(() => {\n if (\n rowIndex !== undefined &&\n inputPriceFocusContext?.rowIndex === rowIndex\n ) {\n setInputPriceFocusContext(undefined);\n }\n }, [rowIndex, inputPriceFocusContext?.rowIndex, setInputPriceFocusContext]);\n\n const inputRef = useRef(null);\n\n const handleKeyDown = (e: React.KeyboardEvent) => {\n if (e.key === 'Enter') {\n if (fieldError) {\n return;\n }\n if (rowIndex !== undefined) {\n if (priceHasChanged) {\n e.stopPropagation();\n // Only submit if Enter is hit in the box that has changes\n setValue('isSubmitting', true);\n\n const { nextRowIndex, nextPageIndex } = findNextFocusIndex();\n setInputPriceFocusContext({\n viagVirtualId: viagVirtualId!,\n rowIndex: nextRowIndex,\n priceField: field,\n currentPageIndex: nextPageIndex,\n });\n } else {\n e.stopPropagation();\n\n const { nextRowIndex, nextPageIndex } = findNextFocusIndex();\n setInputPriceFocusContext({\n viagVirtualId: viagVirtualId!,\n rowIndex: nextRowIndex,\n priceField: field,\n currentPageIndex: nextPageIndex,\n });\n }\n }\n }\n };\n\n useEffect(() => {\n if (inputIsFocus && inputRef.current) {\n inputRef.current.focus();\n inputRef.current.select();\n inputRef.current.scrollIntoView({\n behavior: 'smooth',\n block: 'nearest',\n inline: 'nearest',\n });\n }\n }, [inputIsFocus]);\n\n const canSetPrice = useUserCanSetPrice(listing, false);\n\n const sanitizedPrice = useMemo(() => {\n if (isAllInPrice) {\n const allInPrice = price / (1 - (sellerFee ?? 0));\n return Math.round(allInPrice * 100) / 100;\n }\n return price;\n }, [isAllInPrice, price, sellerFee]);\n\n return (\n \n \n \n {\n e.stopPropagation();\n setValue('isSubmitting', true);\n }}\n />\n {\n e.stopPropagation();\n setValue(field, formState.defaultValues?.[field] ?? null);\n }}\n />\n \n ) : priceIsSubmitting ? (\n
    \n \n \n \n
    \n ) : undefined\n }\n value={sanitizedPrice}\n onBlur={onBlurHandler}\n onChange={onChangeHandler}\n onKeyDown={handleKeyDown}\n onFocus={onFocus}\n onClick={() => inputRef?.current?.select()}\n />\n \n
    \n );\n};\n","import { useCallback, useEffect, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport {\n EventMapContextProvider,\n useEventMapContext,\n} from 'src/contexts/EventMapContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { PosDropdown, PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { vars } from 'src/core/themes';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { useAvailableAutopricingModes } from 'src/hooks/useAvailableAutopricingModes';\nimport { useGetAccountAutoPricingSettings } from 'src/hooks/useGetAccountAutoPricingSettings';\nimport { useGetEventAutoPricingSettings } from 'src/hooks/useGetEventAutoPricingSettings';\nimport { useUserCanSetPrice } from 'src/hooks/useUserHasListingPermissions';\nimport { PosIconProps } from 'src/svgs/SvgWrapper';\nimport { PricingSettingsField } from 'src/utils/autoPricingUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n COMP_LISTING_MODE_TO_CID,\n UNDERCUT_MODE_TO_CID,\n} from 'src/utils/constants/contentIdMaps';\nimport { getCompleteEventConfigScoreOverrides } from 'src/utils/seatScoreUtils';\nimport {\n AutoPricingCompListingMode,\n AutoPricingUndercutMode,\n Event,\n Listing,\n} from 'src/WebApiController';\n\nimport * as styles from '../ListingTable.css';\nimport { ListingPricingInput } from './ListingPriceForm.types';\n\ntype PricingModeCellProps = {\n pricingMode?:\n | AutoPricingCompListingMode\n | AutoPricingUndercutMode\n | undefined;\n DisplayIcon?: ((props: PosIconProps) => JSX.Element) | null;\n listing: Listing;\n editable?: boolean;\n field: PricingSettingsField;\n disabled?: boolean;\n event: Event;\n};\n\nexport const PricingModeCell = ({\n pricingMode,\n DisplayIcon,\n listing,\n editable,\n field,\n disabled,\n event,\n}: PricingModeCellProps) => {\n const modeContentId =\n field === 'compListingMode'\n ? COMP_LISTING_MODE_TO_CID[pricingMode as AutoPricingCompListingMode]\n : UNDERCUT_MODE_TO_CID[pricingMode as AutoPricingUndercutMode];\n const modeContent = useContent(modeContentId ?? '');\n const { watch } = useFormContext();\n\n const { getSelection } = useMultiSelectionContext();\n const listingSelection = getSelection(event.viagVirtualId);\n const isSelectionMode = listingSelection.isSingleGroupMultiSelect;\n\n const [isExpanded, setIsExpanded] = useState(false);\n\n const isSubmittingPricingSettings = watch('isSubmittingPricingSettings');\n const isSubmittingPrice = watch('isSubmitting');\n const isSubmittingRowIndex = watch('isSubmittingRowIndex');\n const rowIndex = watch('rowIndex');\n const autoPricingEnabled = watch('autoPricingEnabled');\n\n const canSetPrice = useUserCanSetPrice(listing, false);\n\n const fieldIsSubmitting =\n (isSubmittingPricingSettings || isSubmittingPrice) &&\n (isSubmittingRowIndex === undefined || isSubmittingRowIndex === rowIndex);\n\n const isPricingModeDisabled =\n fieldIsSubmitting ||\n disabled ||\n !autoPricingEnabled ||\n !canSetPrice ||\n listing.isDeleted ||\n isSelectionMode;\n\n const canEdit = editable && !isPricingModeDisabled;\n\n return (\n \n \n \n {DisplayIcon ? (\n \n ) : (\n \n )}\n \n }\n rootProps={{\n onOpenChange: (isOpen: boolean) => {\n if (!canEdit) {\n setIsExpanded(false);\n return;\n }\n setIsExpanded(isOpen);\n },\n open: isExpanded,\n }}\n >\n \n \n \n \n );\n};\n\nconst PricingModeCellContent = ({\n listing,\n field,\n disabled,\n event,\n}: PricingModeCellProps) => {\n const { setValue, watch, getFieldState, formState } =\n useFormContext();\n const { getSelection } = useMultiSelectionContext();\n const listingSelection = getSelection(event.viagVirtualId);\n const isSelectionMode = listingSelection.isSingleGroupMultiSelect;\n\n const isSubmittingPricingSettings = watch('isSubmittingPricingSettings');\n const isSubmittingRowIndex = watch('isSubmittingRowIndex');\n const rowIndex = watch('rowIndex');\n const autoPricingEnabled = watch('autoPricingEnabled');\n const undercutMode = watch('undercutMode');\n const compListingMode = watch('compListingMode');\n const fieldValue = watch(field);\n\n const canSetPrice = useUserCanSetPrice(listing, false);\n\n const fieldIsSubmitting =\n isSubmittingPricingSettings &&\n (isSubmittingRowIndex === undefined || isSubmittingRowIndex === rowIndex);\n\n const isPricingModeDisabled =\n fieldIsSubmitting ||\n disabled ||\n !autoPricingEnabled ||\n !canSetPrice ||\n listing.isDeleted ||\n isSelectionMode;\n\n const fieldError = getFieldState(field, formState)?.error?.message;\n\n const fieldHasChanged =\n formState.defaultValues?.[field] !== fieldValue &&\n fieldValue &&\n !isSubmittingPricingSettings;\n\n const submit = useCallback(() => {\n if (fieldError) {\n return;\n }\n if (fieldHasChanged) {\n // Only submit if Enter is hit in the box that has changes\n setValue('isSubmittingPricingSettings', true);\n setValue('isSubmittingRowIndex', rowIndex);\n }\n }, [fieldError, fieldHasChanged, setValue, rowIndex]);\n\n useEffect(() => {\n submit();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [fieldValue]);\n\n const { activeConfigOverride, venueMapInfo } = useEventMapContext();\n const scores = getCompleteEventConfigScoreOverrides(\n venueMapInfo?.sectionScores,\n activeConfigOverride?.scoreOverrides,\n false\n );\n\n const {\n compListingModes,\n compListingModesDisabled,\n undercutModes,\n undercutModesDisabled,\n } = useAvailableAutopricingModes(\n false,\n undercutMode,\n compListingMode,\n Boolean(scores?.some((s) => s.score)),\n Boolean(listing?.ltGrpParentId)\n );\n\n const { pricingSettings: eventPricingSettings } =\n useGetEventAutoPricingSettings(event, false);\n const { pricingSettings: accountPricingSettings } =\n useGetAccountAutoPricingSettings();\n\n const inheritText = useContent(ContentId.Inherit);\n const inheritCompListingMode = useContent(\n compListingModes[\n eventPricingSettings?.compListingMode ??\n accountPricingSettings?.compListingMode ??\n ''\n ] ?? ''\n );\n const inheritUndercutMode = useContent(\n undercutModes[\n eventPricingSettings?.undercutMode ??\n accountPricingSettings?.undercutMode ??\n ''\n ] ?? ''\n );\n\n const compListingOptions = Object.entries(compListingModes).map(\n ([value, children]) => (\n {\n e.stopPropagation();\n setValue(field, value as AutoPricingCompListingMode);\n }}\n disabled={\n isPricingModeDisabled || compListingModesDisabled[value] != null\n }\n >\n \n \n )\n );\n if (inheritCompListingMode) {\n compListingOptions.unshift(\n {\n e.stopPropagation();\n setValue(field, null);\n }}\n disabled={isPricingModeDisabled}\n >\n {`${inheritText} (${inheritCompListingMode})`}\n \n );\n }\n\n const undercutOptions = Object.entries(undercutModes).map(\n ([value, children]) => (\n {\n e.stopPropagation();\n setValue(field, value as AutoPricingUndercutMode);\n }}\n disabled={isPricingModeDisabled || undercutModesDisabled[value] != null}\n >\n \n \n )\n );\n if (inheritUndercutMode) {\n undercutOptions.unshift(\n {\n e.stopPropagation();\n setValue(field, null);\n }}\n disabled={isPricingModeDisabled}\n >\n {`${inheritText} (${inheritUndercutMode})`}\n \n );\n }\n\n return (\n \n
    \n {field === 'compListingMode' ? compListingOptions : undercutOptions}\n
    \n \n );\n};\n","import { ChangeEvent, useCallback } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { RotatingWrapper } from 'src/core/ui/AnimatingWrapper';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { useListingAutoPricingSettings } from 'src/modals/ListingDetails/components/useListingAutoPricingSettings';\nimport {\n CheckIcon,\n CrossIcon,\n IconsFill,\n ProcessingIcon,\n} from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport {\n ListingPricingInput,\n ListingPricingSettingsCellProps,\n} from '../ListingPriceForm.types';\nimport * as styles from './Cell.css';\n\nexport const CircuitBreakerMinCompListingCountCell: React.FC<\n ListingPricingSettingsCellProps\n> = ({ listing, editable, event }) => {\n const { watch, formState, getFieldState, setValue } =\n useFormContext();\n\n const saveMsg = useContent(ContentId.Save);\n const cancelMsg = useContent(ContentId.Cancel);\n\n const { getSelection } = useMultiSelectionContext();\n const listingSelection = getSelection(event.viagVirtualId);\n\n const {\n circuitBreakerMinCompListingCount,\n canAutoPrice,\n onCircuitBreakerChange,\n } = useListingAutoPricingSettings(listing);\n\n const isSubmittingPricingSettings = watch('isSubmittingPricingSettings');\n const isSubmittingPrice = watch('isSubmitting');\n const isSubmittingRowIndex = watch('isSubmittingRowIndex');\n const rowIndex = watch('rowIndex');\n\n const fieldIsSubmitting =\n (isSubmittingPricingSettings || isSubmittingPrice) &&\n (isSubmittingRowIndex === undefined || isSubmittingRowIndex === rowIndex);\n\n const isDisabled =\n listing.isDeleted ||\n !canAutoPrice ||\n listingSelection.isSingleGroupMultiSelect ||\n fieldIsSubmitting ||\n !editable;\n\n const submittingField = watch('submittingField');\n const isSubmittingField =\n fieldIsSubmitting &&\n submittingField === 'circuitBreakerMinCompListingCount';\n\n const onUpdateMinCoumpListingCount = useCallback(\n (e: ChangeEvent) => {\n const value = parseInt(e.target.value);\n if (value < 0 || isNaN(value)) {\n return;\n }\n onCircuitBreakerChange(\n undefined,\n undefined,\n undefined,\n undefined,\n Math.round(value)\n );\n },\n [onCircuitBreakerChange]\n );\n\n return (\n \n \n \n {\n e.stopPropagation();\n setValue('isSubmittingPricingSettings', true);\n setValue('isSubmittingRowIndex', rowIndex);\n setValue(\n 'submittingField',\n 'circuitBreakerMinCompListingCount'\n );\n }}\n />\n {\n e.stopPropagation();\n setValue(\n 'circuitBreakerMinCompListingCount',\n formState.defaultValues\n ?.circuitBreakerMinCompListingCount ?? null\n );\n }}\n />\n \n ) : isSubmittingField ? (\n
    \n \n \n \n
    \n ) : undefined\n }\n />\n \n
    \n );\n};\n","import { ChangeEvent, useCallback } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { RotatingWrapper } from 'src/core/ui/AnimatingWrapper';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { useListingAutoPricingSettings } from 'src/modals/ListingDetails/components/useListingAutoPricingSettings';\nimport {\n CheckIcon,\n CrossIcon,\n IconsFill,\n ProcessingIcon,\n} from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { roundToPrecision } from 'src/utils/numberFormatter';\n\nimport {\n ListingPricingInput,\n ListingPricingSettingsCellProps,\n} from '../ListingPriceForm.types';\nimport * as styles from './Cell.css';\n\nexport const CircuitBreakerVelocityCell: React.FC<\n ListingPricingSettingsCellProps\n> = ({ listing, editable, event }) => {\n const { watch, formState, getFieldState, setValue } =\n useFormContext();\n\n const saveMsg = useContent(ContentId.Save);\n const cancelMsg = useContent(ContentId.Cancel);\n\n const { getSelection } = useMultiSelectionContext();\n const listingSelection = getSelection(event.viagVirtualId);\n\n const {\n circuitBreakerMaxDiscountVelocityPercent,\n canAutoPrice,\n onCircuitBreakerChange,\n } = useListingAutoPricingSettings(listing);\n\n const isSubmittingPricingSettings = watch('isSubmittingPricingSettings');\n const isSubmittingPrice = watch('isSubmitting');\n const isSubmittingRowIndex = watch('isSubmittingRowIndex');\n const rowIndex = watch('rowIndex');\n\n const fieldIsSubmitting =\n (isSubmittingPricingSettings || isSubmittingPrice) &&\n (isSubmittingRowIndex === undefined || isSubmittingRowIndex === rowIndex);\n\n const isDisabled =\n listing.isDeleted ||\n !canAutoPrice ||\n listingSelection.isSingleGroupMultiSelect ||\n fieldIsSubmitting ||\n !editable;\n\n const submittingField = watch('submittingField');\n const isSubmittingField =\n fieldIsSubmitting &&\n submittingField === 'circuitBreakerMaxDiscountVelocityPercent';\n\n const onUpdateVelocity = useCallback(\n (e: ChangeEvent) => {\n const value = parseInt(e.target.value);\n if (value <= 0 || value > 100 || isNaN(value)) {\n return;\n }\n onCircuitBreakerChange(undefined, undefined, value / 100);\n },\n [onCircuitBreakerChange]\n );\n\n return (\n \n \n \n
    %
    \n {!isDisabled &&\n circuitBreakerMaxDiscountVelocityPercent !==\n formState.defaultValues\n ?.circuitBreakerMaxDiscountVelocityPercent ? (\n \n {\n e.stopPropagation();\n setValue('isSubmittingPricingSettings', true);\n setValue('isSubmittingRowIndex', rowIndex);\n setValue(\n 'submittingField',\n 'circuitBreakerMaxDiscountVelocityPercent'\n );\n }}\n />\n {\n e.stopPropagation();\n setValue(\n 'circuitBreakerMaxDiscountVelocityPercent',\n formState.defaultValues\n ?.circuitBreakerMaxDiscountVelocityPercent ?? null\n );\n }}\n />\n \n ) : isSubmittingField ? (\n
    \n \n \n \n
    \n ) : undefined}\n \n }\n />\n \n
    \n );\n};\n","import { ChangeEvent, useCallback } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { RotatingWrapper } from 'src/core/ui/AnimatingWrapper';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { useListingAutoPricingSettings } from 'src/modals/ListingDetails/components/useListingAutoPricingSettings';\nimport {\n CheckIcon,\n CrossIcon,\n IconsFill,\n ProcessingIcon,\n} from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport {\n ListingPricingInput,\n ListingPricingSettingsCellProps,\n} from '../ListingPriceForm.types';\nimport * as styles from './Cell.css';\n\nexport const CircuitBreakerVelocityHoursCell: React.FC<\n ListingPricingSettingsCellProps\n> = ({ listing, editable, event }) => {\n const { watch, formState, getFieldState, setValue } =\n useFormContext();\n\n const saveMsg = useContent(ContentId.Save);\n const cancelMsg = useContent(ContentId.Cancel);\n\n const { getSelection } = useMultiSelectionContext();\n const listingSelection = getSelection(event.viagVirtualId);\n\n const {\n circuitBreakerMaxDiscountVelocityTicksInHours,\n canAutoPrice,\n onCircuitBreakerChange,\n } = useListingAutoPricingSettings(listing);\n\n const isSubmittingPricingSettings = watch('isSubmittingPricingSettings');\n const isSubmittingPrice = watch('isSubmitting');\n const isSubmittingRowIndex = watch('isSubmittingRowIndex');\n const rowIndex = watch('rowIndex');\n\n const fieldIsSubmitting =\n (isSubmittingPricingSettings || isSubmittingPrice) &&\n (isSubmittingRowIndex === undefined || isSubmittingRowIndex === rowIndex);\n\n const isDisabled =\n listing.isDeleted ||\n !canAutoPrice ||\n listingSelection.isSingleGroupMultiSelect ||\n fieldIsSubmitting ||\n !editable;\n\n const submittingField = watch('submittingField');\n const isSubmittingField =\n fieldIsSubmitting &&\n submittingField === 'circuitBreakerMaxDiscountVelocityTicksInHours';\n\n const onUpdateVelocity = useCallback(\n (e: ChangeEvent) => {\n const value = parseInt(e.target.value);\n if (isNaN(value)) {\n return;\n }\n onCircuitBreakerChange(undefined, undefined, undefined, value);\n },\n [onCircuitBreakerChange]\n );\n\n return (\n \n \n \n
    h
    \n {!isDisabled &&\n circuitBreakerMaxDiscountVelocityTicksInHours !==\n formState.defaultValues\n ?.circuitBreakerMaxDiscountVelocityTicksInHours ? (\n \n {\n e.stopPropagation();\n setValue('isSubmittingPricingSettings', true);\n setValue('isSubmittingRowIndex', rowIndex);\n setValue(\n 'submittingField',\n 'circuitBreakerMaxDiscountVelocityTicksInHours'\n );\n }}\n />\n {\n e.stopPropagation();\n setValue(\n 'circuitBreakerMaxDiscountVelocityTicksInHours',\n formState.defaultValues\n ?.circuitBreakerMaxDiscountVelocityTicksInHours ??\n null\n );\n }}\n />\n \n ) : isSubmittingField ? (\n
    \n \n \n \n
    \n ) : undefined}\n \n }\n />\n \n
    \n );\n};\n","import { ChangeEvent, useCallback } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { Switch } from 'src/core/interim/Switch';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { RotatingWrapper } from 'src/core/ui/AnimatingWrapper';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { useListingAutoPricingSettings } from 'src/modals/ListingDetails/components/useListingAutoPricingSettings';\nimport { ProcessingIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport {\n ListingPricingInput,\n ListingPricingSettingsCellProps,\n} from '../ListingPriceForm.types';\n\nexport const CompListingExcludeFanInventoryCell: React.FC<\n ListingPricingSettingsCellProps\n> = ({ listing, editable, event }) => {\n const { watch, setValue } = useFormContext();\n\n const { getSelection } = useMultiSelectionContext();\n const listingSelection = getSelection(event.viagVirtualId);\n\n const { compListingExcludeFanInventory, canAutoPrice, onCompListingChange } =\n useListingAutoPricingSettings(listing);\n\n const isSubmittingPricingSettings = watch('isSubmittingPricingSettings');\n const isSubmittingPrice = watch('isSubmitting');\n const isSubmittingRowIndex = watch('isSubmittingRowIndex');\n const rowIndex = watch('rowIndex');\n\n const fieldIsSubmitting =\n (isSubmittingPricingSettings || isSubmittingPrice) &&\n (isSubmittingRowIndex === undefined || isSubmittingRowIndex === rowIndex);\n\n const isDisabled =\n listing.isDeleted ||\n !canAutoPrice ||\n listingSelection.isSingleGroupMultiSelect ||\n fieldIsSubmitting ||\n !editable;\n\n const submittingField = watch('submittingField');\n const isSubmittingField =\n fieldIsSubmitting && submittingField === 'compListingExcludeFanInventory';\n\n const onToggleExcludeFanInventory = useCallback(\n (e: ChangeEvent) => {\n const isChecked = e.target.checked;\n if (isChecked === compListingExcludeFanInventory) {\n return;\n }\n onCompListingChange({\n compListingExcludeFanInventoryNew: isChecked,\n });\n // Only submit if Enter is hit in the box that has changes\n setValue('isSubmittingPricingSettings', true);\n setValue('isSubmittingRowIndex', rowIndex);\n setValue('submittingField', 'compListingExcludeFanInventory');\n },\n [compListingExcludeFanInventory, onCompListingChange, rowIndex, setValue]\n );\n\n return (\n \n \n {isSubmittingField ? (\n
    \n \n \n \n
    \n ) : (\n <>\n ) => e.stopPropagation()}\n onChange={onToggleExcludeFanInventory}\n />\n\n \n \n )}\n
    \n
    \n );\n};\n","import { useCallback, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosSelect } from 'src/core/POS/PosSelect';\nimport { vars } from 'src/core/themes';\nimport { RotatingWrapper } from 'src/core/ui/AnimatingWrapper';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { useListingAutoPricingSettings } from 'src/modals/ListingDetails/components/useListingAutoPricingSettings';\nimport { ProcessingIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n DefaultQuantityFilterOption,\n getMinQuantityOptions,\n safeParseJson,\n} from 'src/utils/inventoryUtils';\n\nimport {\n ListingPricingInput,\n ListingPricingSettingsCellProps,\n} from '../ListingPriceForm.types';\nimport * as styles from './Cell.css';\n\nexport const CompListingMinQuantityCell: React.FC<\n ListingPricingSettingsCellProps\n> = ({ listing, editable, event }) => {\n const { watch, formState, getFieldState, setValue } =\n useFormContext();\n\n const { getSelection } = useMultiSelectionContext();\n const listingSelection = getSelection(event.viagVirtualId);\n\n const {\n compListingQuantityScoreAdjustmentEnabled,\n compListingQuantityScoreAdjustmentOverrideJson,\n canAutoPrice,\n onCompListingChange,\n } = useListingAutoPricingSettings(listing);\n\n const isSubmittingPricingSettings = watch('isSubmittingPricingSettings');\n const isSubmittingPrice = watch('isSubmitting');\n const isSubmittingRowIndex = watch('isSubmittingRowIndex');\n const rowIndex = watch('rowIndex');\n\n const fieldIsSubmitting =\n (isSubmittingPricingSettings || isSubmittingPrice) &&\n (isSubmittingRowIndex === undefined || isSubmittingRowIndex === rowIndex);\n\n const isDisabled =\n listing.isDeleted ||\n !canAutoPrice ||\n listingSelection.isSingleGroupMultiSelect ||\n fieldIsSubmitting ||\n !compListingQuantityScoreAdjustmentEnabled ||\n !editable;\n\n const submittingField = watch('submittingField');\n const isSubmittingField =\n fieldIsSubmitting &&\n submittingField === 'compListingQuantityScoreAdjustmentOverrideJson';\n\n const quantityFilterValue = useMemo(() => {\n const parsedQuantityOverridesJson = safeParseJson(\n compListingQuantityScoreAdjustmentOverrideJson ?? 'null'\n );\n return parsedQuantityOverridesJson?.quantityFilter;\n }, [compListingQuantityScoreAdjustmentOverrideJson]);\n\n const onMinQuantityUpdate = useCallback(\n (newValue: string) => {\n const val = parseInt(newValue);\n const defaultQuantityOverridesJson = safeParseJson(\n formState.defaultValues\n ?.compListingQuantityScoreAdjustmentOverrideJson ?? 'null'\n );\n if (val === defaultQuantityOverridesJson?.quantityFilter) {\n return;\n }\n const sanitizedValue = !isNaN(val) ? val : null;\n\n const quantityOverrideJsonNew = {\n ...defaultQuantityOverridesJson,\n quantityFilter: sanitizedValue,\n };\n\n onCompListingChange({\n compListingQuantityScoreAdjustmentOverrideJsonNew: JSON.stringify(\n quantityOverrideJsonNew\n ),\n });\n\n // Only submit if Enter is hit in the box that has changes\n setValue('isSubmittingPricingSettings', true);\n setValue('isSubmittingRowIndex', rowIndex);\n setValue(\n 'submittingField',\n 'compListingQuantityScoreAdjustmentOverrideJson'\n );\n },\n [\n formState.defaultValues?.compListingQuantityScoreAdjustmentOverrideJson,\n onCompListingChange,\n rowIndex,\n setValue,\n ]\n );\n\n return (\n \n \n {isSubmittingField ? (\n
    \n \n \n \n
    \n ) : (\n \n )}\n \n
    \n );\n};\n","import { useCallback } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport {\n EventMapContextProvider,\n useEventMapContext,\n} from 'src/contexts/EventMapContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { vars } from 'src/core/themes';\nimport { RotatingWrapper } from 'src/core/ui/AnimatingWrapper';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { useAvailableAutopricingModes } from 'src/hooks/useAvailableAutopricingModes';\nimport { useListingAutoPricingSettings } from 'src/modals/ListingDetails/components/useListingAutoPricingSettings';\nimport { ProcessingIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getCompleteEventConfigScoreOverrides } from 'src/utils/seatScoreUtils';\nimport { AutoPricingOutlierMode } from 'src/WebApiController';\n\nimport {\n ListingPricingInput,\n ListingPricingSettingsCellProps,\n} from '../ListingPriceForm.types';\nimport * as styles from './Cell.css';\n\nexport const OutlierModeCell: React.FC = (\n props\n) => {\n return (\n \n \n \n );\n};\n\nconst OutlierModeCellContent: React.FC = ({\n listing,\n editable,\n event,\n}) => {\n const { watch, formState, getFieldState, setValue } =\n useFormContext();\n\n const { getSelection } = useMultiSelectionContext();\n const listingSelection = getSelection(event.viagVirtualId);\n\n const { outlierMode, canAutoPrice, onOutlierChange } =\n useListingAutoPricingSettings(listing);\n\n const isSubmittingPricingSettings = watch('isSubmittingPricingSettings');\n const isSubmittingPrice = watch('isSubmitting');\n const isSubmittingRowIndex = watch('isSubmittingRowIndex');\n const rowIndex = watch('rowIndex');\n\n const fieldIsSubmitting =\n (isSubmittingPricingSettings || isSubmittingPrice) &&\n (isSubmittingRowIndex === undefined || isSubmittingRowIndex === rowIndex);\n\n const isDisabled =\n listing.isDeleted ||\n !canAutoPrice ||\n listingSelection.isSingleGroupMultiSelect ||\n fieldIsSubmitting ||\n !editable;\n\n const submittingField = watch('submittingField');\n const isSubmittingField =\n fieldIsSubmitting && submittingField === 'outlierMode';\n\n const { activeConfigOverride, venueMapInfo } = useEventMapContext();\n\n const scores = getCompleteEventConfigScoreOverrides(\n venueMapInfo?.sectionScores,\n activeConfigOverride?.scoreOverrides,\n false\n );\n const { outlierModes, outlierModesDisabled } = useAvailableAutopricingModes(\n true,\n null,\n null,\n Boolean(scores?.some((s) => s.score))\n );\n\n const onUpdateOutlierMode = useCallback(\n (value: AutoPricingOutlierMode | null) => {\n if (!value || value === outlierMode) {\n return;\n }\n if (value === formState.defaultValues?.outlierMode) {\n // reset too preview settings\n onOutlierChange({\n outlierModeNew: value,\n outlierKthLowestLimitNew:\n formState.defaultValues?.outlierKthLowestLimit,\n outlierKthLowestLimitAbsoluteSpacingNew:\n formState.defaultValues?.outlierKthLowestLimitAbsoluteSpacing,\n outlierKthLowestLimitRelativeSpacingNew:\n formState.defaultValues?.outlierKthLowestLimitRelativeSpacing,\n outlierStandardDeviationsNew:\n formState.defaultValues?.outlierStandardDeviations,\n });\n } else {\n onOutlierChange({\n outlierModeNew: value,\n });\n }\n // Only submit if Enter is hit in the box that has changes\n setValue('isSubmittingPricingSettings', true);\n setValue('isSubmittingRowIndex', rowIndex);\n setValue('submittingField', 'outlierMode');\n },\n [\n formState.defaultValues?.outlierKthLowestLimit,\n formState.defaultValues?.outlierKthLowestLimitAbsoluteSpacing,\n formState.defaultValues?.outlierKthLowestLimitRelativeSpacing,\n formState.defaultValues?.outlierMode,\n formState.defaultValues?.outlierStandardDeviations,\n onOutlierChange,\n outlierMode,\n rowIndex,\n setValue,\n ]\n );\n\n return (\n \n \n {isSubmittingField ? (\n
    \n \n \n \n
    \n ) : (\n e.stopPropagation()}\n onChange={onUpdateOutlierMode}\n />\n )}\n \n
    \n );\n};\n","import { useCallback } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { vars } from 'src/core/themes';\nimport { RotatingWrapper } from 'src/core/ui/AnimatingWrapper';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { useListingAutoPricingSettings } from 'src/modals/ListingDetails/components/useListingAutoPricingSettings';\nimport { ProcessingIcon } from 'src/svgs/Viagogo';\nimport { STANDARD_DEVIATIONS_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { AutoPricingOutlierMode } from 'src/WebApiController';\n\nimport {\n ListingPricingInput,\n ListingPricingSettingsCellProps,\n} from '../ListingPriceForm.types';\nimport * as styles from './Cell.css';\n\nexport const OutlierFilteringCell: React.FC<\n ListingPricingSettingsCellProps\n> = ({ listing, editable, event }) => {\n const { watch, formState, getFieldState, setValue } =\n useFormContext();\n\n const { getSelection } = useMultiSelectionContext();\n const listingSelection = getSelection(event.viagVirtualId);\n\n const {\n outlierMode,\n outlierStandardDeviations,\n canAutoPrice,\n onOutlierChange,\n } = useListingAutoPricingSettings(listing);\n\n const isSubmittingPricingSettings = watch('isSubmittingPricingSettings');\n const isSubmittingPrice = watch('isSubmitting');\n const isSubmittingRowIndex = watch('isSubmittingRowIndex');\n const rowIndex = watch('rowIndex');\n\n const fieldIsSubmitting =\n (isSubmittingPricingSettings || isSubmittingPrice) &&\n (isSubmittingRowIndex === undefined || isSubmittingRowIndex === rowIndex);\n\n const isDisabled =\n listing.isDeleted ||\n !canAutoPrice ||\n listingSelection.isSingleGroupMultiSelect ||\n fieldIsSubmitting ||\n !editable ||\n outlierMode !== AutoPricingOutlierMode.StandardDeviations;\n\n const submittingField = watch('submittingField');\n const isSubmittingField =\n fieldIsSubmitting && submittingField === 'outlierStandardDeviations';\n\n const onUpdateOutlierFilter = useCallback(\n (value: string | null) => {\n const sanitized = parseInt(value ?? '');\n if (value != null && !isNaN(sanitized)) {\n onOutlierChange({\n outlierModeNew: AutoPricingOutlierMode.StandardDeviations,\n outlierStandardDeviationsNew: sanitized,\n });\n } else {\n onOutlierChange({\n outlierModeNew: AutoPricingOutlierMode.StandardDeviations,\n outlierStandardDeviationsNew: null,\n });\n }\n // Only submit if Enter is hit in the box that has changes\n setValue('isSubmittingPricingSettings', true);\n setValue('isSubmittingRowIndex', rowIndex);\n setValue('submittingField', 'outlierStandardDeviations');\n },\n [onOutlierChange, rowIndex, setValue]\n );\n\n return (\n \n \n {isSubmittingField ? (\n
    \n \n \n \n
    \n ) : (\n e.stopPropagation()}\n onChange={onUpdateOutlierFilter}\n />\n )}\n \n
    \n );\n};\n","import { ChangeEvent, useCallback } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { RotatingWrapper } from 'src/core/ui/AnimatingWrapper';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { useListingAutoPricingSettings } from 'src/modals/ListingDetails/components/useListingAutoPricingSettings';\nimport {\n CheckIcon,\n CrossIcon,\n IconsFill,\n ProcessingIcon,\n} from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { AutoPricingOutlierMode } from 'src/WebApiController';\n\nimport {\n ListingPricingInput,\n ListingPricingSettingsCellProps,\n} from '../ListingPriceForm.types';\nimport * as styles from './Cell.css';\n\nexport const OutlierLimitCell: React.FC = ({\n listing,\n editable,\n event,\n}) => {\n const { watch, formState, getFieldState, setValue } =\n useFormContext();\n\n const saveMsg = useContent(ContentId.Save);\n const cancelMsg = useContent(ContentId.Cancel);\n\n const { getSelection } = useMultiSelectionContext();\n const listingSelection = getSelection(event.viagVirtualId);\n\n const { outlierMode, outlierKthLowestLimit, canAutoPrice, onOutlierChange } =\n useListingAutoPricingSettings(listing);\n\n const isSubmittingPricingSettings = watch('isSubmittingPricingSettings');\n const isSubmittingPrice = watch('isSubmitting');\n const isSubmittingRowIndex = watch('isSubmittingRowIndex');\n const rowIndex = watch('rowIndex');\n\n const fieldIsSubmitting =\n (isSubmittingPricingSettings || isSubmittingPrice) &&\n (isSubmittingRowIndex === undefined || isSubmittingRowIndex === rowIndex);\n\n const isDisabled =\n listing.isDeleted ||\n !canAutoPrice ||\n listingSelection.isSingleGroupMultiSelect ||\n fieldIsSubmitting ||\n !editable ||\n outlierMode !== AutoPricingOutlierMode.KthLowest;\n\n const submittingField = watch('submittingField');\n const isSubmittingField =\n fieldIsSubmitting && submittingField === 'outlierKthLowestLimit';\n\n const onUpdateOutlierLimit = useCallback(\n (e: ChangeEvent) => {\n const value = parseInt(e.target.value);\n onOutlierChange({\n outlierModeNew: outlierMode,\n outlierKthLowestLimitNew: value,\n });\n },\n [onOutlierChange, outlierMode]\n );\n\n return (\n \n \n \n {\n e.stopPropagation();\n setValue('isSubmittingPricingSettings', true);\n setValue('isSubmittingRowIndex', rowIndex);\n setValue('submittingField', 'outlierKthLowestLimit');\n }}\n />\n {\n e.stopPropagation();\n setValue(\n 'outlierKthLowestLimit',\n formState.defaultValues?.outlierKthLowestLimit ?? null\n );\n }}\n />\n \n ) : isSubmittingField ? (\n
    \n \n \n \n
    \n ) : undefined\n }\n />\n \n
    \n );\n};\n","import { ChangeEvent, useCallback, useMemo, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { RotatingWrapper } from 'src/core/ui/AnimatingWrapper';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { ToggleGroup } from 'src/core/ui/ToggleGroup';\nimport { useListingAutoPricingSettings } from 'src/modals/ListingDetails/components/useListingAutoPricingSettings';\nimport {\n CheckIcon,\n CrossIcon,\n IconsFill,\n ProcessingIcon,\n} from 'src/svgs/Viagogo';\nimport {\n OUTLIER_MODE_KTH_LOWEST_STRATEGY,\n OutlierModeKthLowestStrategy,\n} from 'src/utils/autoPricingUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { AutoPricingOutlierMode } from 'src/WebApiController';\n\nimport {\n ListingPricingInput,\n ListingPricingSettingsCellProps,\n} from '../ListingPriceForm.types';\nimport * as styles from './Cell.css';\n\nexport const OutlierSpacingCell: React.FC = ({\n listing,\n editable,\n event,\n}) => {\n const { watch, formState, getFieldState, setValue } =\n useFormContext();\n\n const saveMsg = useContent(ContentId.Save);\n const cancelMsg = useContent(ContentId.Cancel);\n\n const { getSelection } = useMultiSelectionContext();\n const listingSelection = getSelection(event.viagVirtualId);\n\n const {\n outlierMode,\n outlierKthLowestLimitAbsoluteSpacing,\n outlierKthLowestLimitRelativeSpacing,\n canAutoPrice,\n onOutlierChange,\n } = useListingAutoPricingSettings(listing);\n const [outlierKthLowestStrategy, setOutlierKthLowestStrategy] =\n useState(\n OutlierModeKthLowestStrategy.Relative\n );\n\n const isSubmittingPricingSettings = watch('isSubmittingPricingSettings');\n const isSubmittingPrice = watch('isSubmitting');\n const isSubmittingRowIndex = watch('isSubmittingRowIndex');\n const rowIndex = watch('rowIndex');\n\n const fieldIsSubmitting =\n (isSubmittingPricingSettings || isSubmittingPrice) &&\n (isSubmittingRowIndex === undefined || isSubmittingRowIndex === rowIndex);\n\n const isDisabled =\n listing.isDeleted ||\n !canAutoPrice ||\n listingSelection.isSingleGroupMultiSelect ||\n fieldIsSubmitting ||\n !editable ||\n outlierMode !== AutoPricingOutlierMode.KthLowest;\n\n const submittingField = watch('submittingField');\n const isSubmittingField =\n fieldIsSubmitting &&\n submittingField === 'outlierKthLowestLimitAbsoluteSpacing';\n\n const value = useMemo(() => {\n if (outlierKthLowestStrategy === OutlierModeKthLowestStrategy.Relative) {\n return outlierKthLowestLimitRelativeSpacing;\n }\n return outlierKthLowestLimitAbsoluteSpacing;\n }, [\n outlierKthLowestLimitAbsoluteSpacing,\n outlierKthLowestLimitRelativeSpacing,\n outlierKthLowestStrategy,\n ]);\n\n const hasChange = useMemo(() => {\n if (outlierKthLowestStrategy === OutlierModeKthLowestStrategy.Relative) {\n return (\n outlierKthLowestLimitRelativeSpacing !==\n formState.defaultValues?.outlierKthLowestLimitRelativeSpacing\n );\n }\n return (\n outlierKthLowestLimitAbsoluteSpacing !==\n formState.defaultValues?.outlierKthLowestLimitAbsoluteSpacing\n );\n }, [\n formState.defaultValues?.outlierKthLowestLimitAbsoluteSpacing,\n formState.defaultValues?.outlierKthLowestLimitRelativeSpacing,\n outlierKthLowestLimitAbsoluteSpacing,\n outlierKthLowestLimitRelativeSpacing,\n outlierKthLowestStrategy,\n ]);\n\n const onUpdateOutlierSpacing = useCallback(\n (e: ChangeEvent) => {\n let value = parseInt(e.target.value);\n if (value < 0) {\n value = 0;\n } else if (value > 100) {\n value = 100;\n }\n\n if (!isNaN(value)) {\n if (\n outlierKthLowestStrategy === OutlierModeKthLowestStrategy.Relative\n ) {\n onOutlierChange({\n outlierModeNew: AutoPricingOutlierMode.KthLowest,\n outlierKthLowestLimitAbsoluteSpacingNew:\n formState.defaultValues?.outlierKthLowestLimitAbsoluteSpacing ??\n null,\n outlierKthLowestLimitRelativeSpacingNew: value,\n });\n } else {\n onOutlierChange({\n outlierModeNew: AutoPricingOutlierMode.KthLowest,\n outlierKthLowestLimitAbsoluteSpacingNew: value,\n outlierKthLowestLimitRelativeSpacingNew:\n formState.defaultValues?.outlierKthLowestLimitRelativeSpacing ??\n null,\n });\n }\n }\n },\n [\n formState.defaultValues?.outlierKthLowestLimitAbsoluteSpacing,\n formState.defaultValues?.outlierKthLowestLimitRelativeSpacing,\n onOutlierChange,\n outlierKthLowestStrategy,\n ]\n );\n\n return (\n \n \n \n {\n if (!value) {\n return;\n }\n setOutlierKthLowestStrategy(\n value as OutlierModeKthLowestStrategy\n );\n }}\n />\n {!isDisabled && hasChange ? (\n \n {\n e.stopPropagation();\n setValue('isSubmittingPricingSettings', true);\n setValue('isSubmittingRowIndex', rowIndex);\n setValue(\n 'submittingField',\n 'outlierKthLowestLimitAbsoluteSpacing'\n );\n }}\n />\n {\n e.stopPropagation();\n setValue(\n 'outlierKthLowestLimitAbsoluteSpacing',\n formState.defaultValues\n ?.outlierKthLowestLimitAbsoluteSpacing ?? null\n );\n setValue(\n 'outlierKthLowestLimitRelativeSpacing',\n formState.defaultValues\n ?.outlierKthLowestLimitRelativeSpacing ?? null\n );\n }}\n />\n \n ) : isSubmittingField ? (\n
    \n \n \n \n
    \n ) : undefined}\n \n }\n />\n \n
    \n );\n};\n","import { ChangeEvent, useCallback, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { Popover } from 'src/core/ui';\nimport { RotatingWrapper } from 'src/core/ui/AnimatingWrapper';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { ToggleGroup } from 'src/core/ui/ToggleGroup';\nimport { TooltipPopover } from 'src/core/ui/TooltipPopover';\nimport { useListingHasVenueMapInfo } from 'src/hooks/useListingHasVenueMapInfo';\nimport { useUndercutAmountSettings } from 'src/hooks/useUndercutAmountSettings';\nimport { useUserCanSetPrice } from 'src/hooks/useUserHasListingPermissions';\nimport {\n CheckIcon,\n CrossIcon,\n IconsFill,\n ProcessingIcon,\n} from 'src/svgs/Viagogo';\nimport {\n getUndercutPriceRepresentingMode,\n PricingSettingsFieldNumeric,\n UNDERCUT_PRICE_MODE_OPTIONS,\n UndercutPriceSettingsMode,\n} from 'src/utils/autoPricingUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { roundToPrecision } from 'src/utils/numberFormatter';\nimport { Listing } from 'src/WebApiController';\n\nimport { ListingPricingInput } from './ListingPriceForm.types';\n\ntype UndercutAmountCellProps = {\n formattedNumber?: string | null;\n isPremium: boolean;\n listing: Listing;\n editable?: boolean;\n field: PricingSettingsFieldNumeric;\n disabled?: boolean;\n viagVirtualId?: string;\n};\n\nexport const UndercutAmountCell = ({\n formattedNumber,\n isPremium,\n listing,\n editable,\n field,\n disabled,\n viagVirtualId,\n}: UndercutAmountCellProps) => {\n const { setValue, watch, clearErrors, getFieldState, formState } =\n useFormContext();\n const { getSelection } = useMultiSelectionContext();\n const listingSelection = getSelection(viagVirtualId);\n const isSelectionMode = listingSelection.isSingleGroupMultiSelect;\n\n const saveMsg = useContent(ContentId.Save);\n\n const isSubmittingPricingSettings = watch('isSubmittingPricingSettings');\n const isSubmittingPrice = watch('isSubmitting');\n const isSubmittingRowIndex = watch('isSubmittingRowIndex');\n const rowIndex = watch('rowIndex');\n const autoPricingEnabled = watch('autoPricingEnabled');\n const undercutMode = watch('undercutMode');\n const undercutAbsoluteAmount = watch('undercutAbsoluteAmount');\n const undercutRelativeAmount = watch('undercutRelativeAmount');\n const fieldValue = watch(field);\n\n const {\n undercutAbsoluteAmountMode,\n setUndercutAbsoluteAmountMode,\n undercutRelativeAmountMode,\n setUndercutRelativeAmountMode,\n } = useUndercutAmountSettings(undercutAbsoluteAmount, undercutRelativeAmount);\n\n const undercutAmountMode = useMemo(\n () =>\n field === 'undercutAbsoluteAmount'\n ? undercutAbsoluteAmountMode\n : undercutRelativeAmountMode,\n [field, undercutAbsoluteAmountMode, undercutRelativeAmountMode]\n );\n const setUndercutAmountMode = useMemo(\n () =>\n field === 'undercutAbsoluteAmount'\n ? setUndercutAbsoluteAmountMode\n : setUndercutRelativeAmountMode,\n [field, setUndercutAbsoluteAmountMode, setUndercutRelativeAmountMode]\n );\n\n const { loginContext } = useAppContext();\n\n const { getUiCurrency } = useLocalizationContext();\n const uiCurrency = useMemo(\n () =>\n getUiCurrency(\n listing?.currency ?? loginContext?.user?.activeAccount?.currencyCode\n ),\n [\n getUiCurrency,\n listing?.currency,\n loginContext?.user?.activeAccount?.currencyCode,\n ]\n );\n\n const canSetPrice = useUserCanSetPrice(listing, false);\n const { hasVenueMapInfo } = useListingHasVenueMapInfo(listing);\n const isAutoPricingDisabled = !(hasVenueMapInfo && canSetPrice);\n const isUnderCutAmountDisabled =\n disabled ||\n listing?.isDeleted ||\n !canSetPrice ||\n !autoPricingEnabled ||\n undercutMode == null ||\n isAutoPricingDisabled;\n\n const fieldIsSubmitting =\n (isSubmittingPricingSettings || isSubmittingPrice) &&\n (isSubmittingRowIndex === undefined || isSubmittingRowIndex === rowIndex);\n\n const fieldError = getFieldState(field, formState)?.error?.message;\n\n const fieldHasChanged =\n formState.defaultValues?.[field] !== fieldValue &&\n !isSubmittingPricingSettings;\n\n const submit = useCallback(() => {\n if (fieldError) {\n return;\n }\n if (fieldHasChanged) {\n // Only submit if Enter is hit in the box that has changes\n setValue('isSubmittingPricingSettings', true);\n setValue('isSubmittingRowIndex', rowIndex);\n }\n }, [fieldError, fieldHasChanged, setValue, rowIndex]);\n\n const handleKeyDown = (e: React.KeyboardEvent) => {\n if (e.key === 'Enter') {\n submit();\n }\n };\n\n const onChangeHandler = useCallback(\n (e: ChangeEvent) => {\n clearErrors(field);\n\n let v = parseFloat(e.target.value);\n if (v >= 0 && v <= Number.MAX_VALUE) {\n if (field === 'undercutRelativeAmount') {\n v = Math.min(v, 100) / 100;\n }\n v = getUndercutPriceRepresentingMode(\n v,\n undercutAmountMode ?? UndercutPriceSettingsMode.Discount\n );\n setValue(field, v);\n } else {\n setValue(field, null);\n }\n },\n [clearErrors, field, setValue, undercutAmountMode]\n );\n\n const postfixDisplay = (\n <>\n {field === 'undercutRelativeAmount' && '%'}{' '}\n {\n if (!value) return;\n\n const mode = value as UndercutPriceSettingsMode;\n setUndercutAmountMode(mode);\n\n if (fieldValue) {\n const curAmountAbs = Math.abs(fieldValue);\n setValue(\n field,\n mode == UndercutPriceSettingsMode.Premium\n ? -curAmountAbs\n : curAmountAbs\n );\n }\n }}\n />\n {fieldIsSubmitting ? (\n \n \n \n ) : fieldHasChanged && !fieldError ? (\n {\n e.stopPropagation();\n submit();\n }}\n />\n ) : null}\n \n \n \n \n );\n\n return (\n \n \n \n {formattedNumber != null ? (\n formattedNumber\n ) : isUnderCutAmountDisabled ? (\n ''\n ) : (\n \n )}\n \n {formattedNumber && (\n <>\n {' '}\n \n \n )}\n \n }\n style={\n !editable\n ? { color: vars.color.textPrimary }\n : isUnderCutAmountDisabled\n ? { color: vars.color.textPrimary }\n : {}\n }\n disabled={\n isUnderCutAmountDisabled ||\n isSelectionMode ||\n fieldIsSubmitting ||\n disabled ||\n !editable\n }\n onClosed={() => {\n if (formState.defaultValues?.[field]) {\n setValue(field, formState.defaultValues?.[field] ?? null);\n }\n }}\n >\n \n {field === 'undercutRelativeAmount' ? (\n \n ) : (\n \n )}\n \n \n \n );\n};\n","import { useDraggable, useDroppable } from '@dnd-kit/core';\nimport {\n ColumnDef,\n createColumnHelper,\n FilterFnOption,\n Row,\n SortingFn,\n sortingFns,\n} from '@tanstack/react-table';\nimport { range } from 'lodash-es';\nimport { useCallback, useContext, useEffect, useMemo } from 'react';\nimport { Link } from 'react-router-dom';\nimport { MultiSelectAll } from 'src/components/common/MultiSelect/MultiSelectAll';\nimport { SeatingInfo } from 'src/components/common/SeatingInfo';\nimport { AutoPriceResultDisplay } from 'src/components/Listings/AutoPriceResultDisplay';\nimport { FAKE_SOLD_GROUP_ID } from 'src/components/Listings/constants';\nimport { ListingDeliveryTypeDisplay } from 'src/components/Listings/ListingDeliveryTypeDisplay';\nimport { ListingDisplay } from 'src/components/Listings/ListingDisplay';\nimport { ListingNotesDisplay } from 'src/components/Listings/ListingDisplay/ListingNotesDisplay';\nimport { TagValueDisplay } from 'src/components/TagsFormBody/TagValueCell';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n COLUMN_DEFAULT_SIZE_BASE,\n COLUMN_DEFAULT_SIZE_ICON,\n COLUMN_DEFAULT_SIZE_LG,\n COLUMN_DEFAULT_SIZE_SM,\n COLUMN_DEFAULT_SIZE_XL,\n COLUMN_DEFAULT_SIZE_XXL,\n COLUMN_MAX_SIZE,\n COLUMN_MIN_SIZE,\n} from 'src/contexts/ColumnResizingContext/ColumnResizingContext.types';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport {\n NO_GROUP_ID,\n TableRow,\n useMultiSelectionContext,\n} from 'src/contexts/MultiSelectionContext';\nimport { useSellerAccountContext } from 'src/contexts/SellerAccountContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack, TooltipPopover } from 'src/core/ui';\nimport { CopyToClipboardV2 } from 'src/core/ui/CopyToClipboard/CopyToClipboardV2';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { TableHeaderCellDiv } from 'src/core/ui/TableHeaderCellDiv';\nimport { useColumnUserSetting } from 'src/hooks/useColumnUserSetting';\nimport { useAllInPriceFromListPrice } from 'src/hooks/useListAndAllInPrice';\nimport { useMapDeliveryTypesToString } from 'src/hooks/useMapDeliveryTypesToString';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport { FormatOption, FormatOptionEntries } from 'src/modals/EditTableColumns';\nimport { CustomColumnName } from 'src/modals/InventoryTableColumns/CustomColumnName';\nimport { ListingGroupIcon } from 'src/svgs/ListingGroupIcon';\nimport { ExpandIcon, ForwardIcon } from 'src/svgs/Viagogo';\nimport { SEATING_SORTING_FN_NAME } from 'src/tables/common/hooks/useSeatingColumnSorting';\nimport { ListingActionsCell } from 'src/tables/ListingTable/configs/ListingActionsCell';\nimport { TableShimmeringDiv } from 'src/tables/Table/Table.styled';\nimport { DateCell, InHandCell } from 'src/tables/Table/TableCells';\nimport {\n getCompListingModeIcon,\n getUndercutModeIcon,\n} from 'src/utils/autoPricingUtils';\nimport { ListingTableColumnId } from 'src/utils/columns/inventory/inventoryColumnUtils.types';\nimport { evaluateFormula } from 'src/utils/columns/inventory/inventoryCustomColumnUtils';\nimport { CustomListingColumn } from 'src/utils/columns/inventory/inventoryCustomColumnUtils.types';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { LISTING_TABLE_COLUMN_ID_TO_CONTENT_ID } from 'src/utils/constants/contentIdMaps';\nimport {\n getAllInPriceFromListPriceForListing,\n getListingDetailsModalConfigWithDeepLink,\n getListingDetailsRelativeUrl,\n isListingGroupLeader,\n} from 'src/utils/inventoryUtils';\nimport { applyNumberFormatting } from 'src/utils/numberFormatter';\nimport { getPurchaseOrderRelativeUrl } from 'src/utils/purchaseUtils';\nimport {\n filterSeatingSectionFn,\n filterSeatRangeFn,\n filterSeatTraitsFn,\n filterStringMultiSelect,\n getNextEditableListingRow,\n sortGeneric,\n sortMoney,\n sortSeatingSeatsForTable,\n} from 'src/utils/tableUtils';\nimport {\n SECTION_TYPE_TO_PRECISION_SETTING,\n SectionType,\n} from 'src/utils/types/sectionType';\nimport {\n AutoPricingCompListingMode,\n AutoPricingResultType,\n AutoPricingUndercutMode,\n Feature,\n Listing,\n ListingDetailDataField,\n ListingGroup,\n ListingGroupUndercutSetting,\n ListingNote,\n Marketplace,\n TagsValueType,\n UiMoney,\n UserSetting,\n} from 'src/WebApiController';\n\nimport * as styles from '../ListingTable.css';\nimport {\n ListingWithEvent,\n SHIMMERING_DIV_HEIGHT_LISTING_GROUP,\n SHIMMERING_DIV_HEIGHT_SINGLE_LISTING,\n} from '../ListingTable.types';\nimport { AutoPricingToggleCell } from './AutoPricingToggleCell';\nimport { CompListingBoundsCell } from './CompListingBoundsCell';\nimport { CustomNumericCell } from './CustomNumericCell';\nimport { ListingPriceCell } from './ListingPriceCell';\nimport { ListingProceedsFloorCell } from './ListingProceedsFloorCell';\nimport { PricingModeCell } from './PricingModeCell';\nimport { CircuitBreakerMinCompListingCountCell } from './PricingSettings/CircuitBreakerMinCompListingCount';\nimport { CircuitBreakerVelocityCell } from './PricingSettings/CircuitBreakerVelocity';\nimport { CircuitBreakerVelocityHoursCell } from './PricingSettings/CircuitBreakerVelocityPeriod';\nimport { CompListingExcludeFanInventoryCell } from './PricingSettings/CompListingExcludeFanInventory';\nimport { CompListingMinQuantityCell } from './PricingSettings/CompListingMinQuantity';\nimport { OutlierModeCell } from './PricingSettings/OutlierDetectionMode';\nimport { OutlierFilteringCell } from './PricingSettings/OutlierFiltering';\nimport { OutlierLimitCell } from './PricingSettings/OutlierLimit';\nimport { OutlierSpacingCell } from './PricingSettings/OutlierSpacing';\nimport { UndercutAmountCell } from './UndercutAmountCell';\n\nconst SECTION_TYPE = SectionType.Listings;\n\nconst GroupListingsSortableFields: ListingTableColumnId[] = [\n ListingTableColumnId.ListPrice,\n ListingTableColumnId.AllInPrice,\n ListingTableColumnId.ProceedsCeiling,\n ListingTableColumnId.ProceedsFloor,\n ListingTableColumnId.WebsiteCeiling,\n ListingTableColumnId.WebsiteFloor,\n ListingTableColumnId.UnsoldQuantity,\n ListingTableColumnId.ShownQuantity,\n];\n\nconst findParentRow = (element: HTMLElement | null): HTMLElement | null => {\n if (!element) {\n return null;\n }\n if (element.tagName.toLowerCase() === 'tr') {\n return element;\n }\n return findParentRow(element.parentElement);\n};\n\n/**\n * Sorting wrapper to make sure sorting will not be applied to grouped items.\n * @param desiredSortingFn\n * @returns shadowed sorting fn\n */\nconst groupSortingWrapper = (\n desiredSortingFn: SortingFn,\n columnId: ListingTableColumnId | undefined = undefined,\n hasGroupListingsSortingFeature = false\n): SortingFn => {\n return (\n rowA: Row,\n rowB: Row,\n colId: string\n ) => {\n const canSort =\n hasGroupListingsSortingFeature &&\n columnId &&\n GroupListingsSortableFields.includes(columnId);\n if (rowA.depth + rowB.depth > 0 && !canSort) return 0;\n return desiredSortingFn(rowA, rowB, colId);\n };\n};\n\nexport const tagColumnDef = (\n tagName: string,\n columnId: ListingTableColumnId | undefined = undefined,\n canSortGroup = false,\n loadedBySection = false\n): ColumnDef => ({\n id: tagName,\n header: () => (\n \n \n {tagName}\n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n accessorFn: (data) => {\n if (data?.isCompListing) return undefined;\n\n const tag = data?.listing?.tags?.find((t) => t.key === tagName);\n if (\n tag?.valueType === TagsValueType.Int ||\n tag?.valueType === TagsValueType.Decimal\n ) {\n return tag ? parseFloat(tag.value) : null;\n }\n return tag?.value;\n },\n cell: function Cell({ getValue, row: { original }, table }) {\n const { value: storedColumnNumberPrecisions = {} } =\n useServerUserSetting({\n id: SECTION_TYPE_TO_PRECISION_SETTING[\n table.options.meta?.sectionType ?? SECTION_TYPE\n ],\n });\n const tag = original?.listing?.tags?.find((t) => t.key === tagName);\n\n if (\n tag?.valueType === TagsValueType.Int ||\n tag?.valueType === TagsValueType.Decimal\n ) {\n const userDefinedPrecision = storedColumnNumberPrecisions[tagName];\n\n return (\n ()}\n isLoading={Boolean(!original || !original.listing)}\n // We do not display custom fields for listing group or comp listing\n hide={Boolean(\n original?.listing?.isLtGrp || !original?.listing?.isFull\n )}\n shimmeringDivHeight={\n original?.isLtGrp\n ? SHIMMERING_DIV_HEIGHT_LISTING_GROUP\n : SHIMMERING_DIV_HEIGHT_SINGLE_LISTING\n }\n sectionType={table.options.meta?.sectionType ?? SECTION_TYPE}\n matchingTag={tag}\n currencyCode={original?.listing?.currency}\n />\n );\n }\n\n if (\n !original ||\n !original.listing ||\n (loadedBySection &&\n !original?.isLtGrp &&\n !original?.isCompListing &&\n !original.listing?.dataIsLoaded?.[ListingDetailDataField.Tags])\n ) {\n return (\n \n );\n }\n\n if (original?.listing?.isLtGrp || !original?.listing?.isFull || !tag) {\n return null;\n }\n\n return (\n \n \n \n );\n },\n sortingFn: groupSortingWrapper(sortingFns.basic, columnId, canSortGroup),\n});\n\nexport const customColumnDef = (\n columnId: string,\n formula?: string | null,\n canSortGroup = false\n): ColumnDef => ({\n id: columnId,\n header: ({ table }) => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n accessorFn: (data) => {\n return formula && data && !data.isCompListing\n ? evaluateFormula(formula, data.listing) ?? null\n : null;\n },\n cell: function Cell({ getValue, row: { original }, table }) {\n const { value: storedInventoryColumnNumberPrecisions = {} } =\n useServerUserSetting({\n id: SECTION_TYPE_TO_PRECISION_SETTING[\n table.options.meta?.sectionType ?? SECTION_TYPE\n ],\n });\n const { value: customColumns = [] } = useServerUserSetting<\n CustomListingColumn[]\n >({\n id: UserSetting.InventoryCustomColumns,\n });\n\n const userDefinedPrecision =\n storedInventoryColumnNumberPrecisions[columnId];\n\n return (\n ()}\n isLoading={Boolean(!original || !original.listing)}\n // We do not display custom fields for listing group or comp listing\n hide={Boolean(original?.listing?.isLtGrp || !original?.listing?.isFull)}\n shimmeringDivHeight={\n original?.isLtGrp\n ? SHIMMERING_DIV_HEIGHT_LISTING_GROUP\n : SHIMMERING_DIV_HEIGHT_SINGLE_LISTING\n }\n sectionType={table.options.meta?.sectionType ?? SECTION_TYPE}\n matchingCustomColumn={customColumns.find((c) => c.id === columnId)}\n currencyCode={original?.listing?.currency}\n />\n );\n },\n sortingFn: groupSortingWrapper(\n sortingFns.basic,\n columnId as ListingTableColumnId,\n canSortGroup\n ),\n});\n\nconst columnHelper = createColumnHelper();\n\nexport const getListingTableColumnConfigs = (\n canSortGroup = false,\n hasGroup = false,\n loadedBySection = false,\n hasCleanupWhiteSpaceFeature = false\n) => {\n return {\n [ListingTableColumnId.Checkbox]: columnHelper.display({\n id: ListingTableColumnId.Checkbox,\n header: (props) => {\n return props.table.options.meta?.showSelectAllCheckbox ? (\n \n \n \n ) : (\n ''\n );\n },\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_DEFAULT_SIZE_BASE,\n maxSize: COLUMN_DEFAULT_SIZE_BASE,\n enableSorting: false,\n enableResizing: false,\n\n cell: function Cell({\n row: {\n id,\n original,\n getIsSelected,\n depth,\n getCanSelectSubRows,\n getCanSelect,\n getIsAllSubRowsSelected,\n },\n table,\n }) {\n const { setShiftKeyRowSelectionState, isNoGroupIdSet } =\n useMultiSelectionContext();\n\n const isLtGrp = original?.isLtGrp;\n\n if (!original || !original.listing) {\n return (\n \n );\n }\n\n const isListingGroupSelected = getIsAllSubRowsSelected();\n const isSelected = isListingGroupSelected || getIsSelected();\n const canSelect =\n getCanSelectSubRows() || (getCanSelect() && depth === 0);\n\n const groupId = isNoGroupIdSet()\n ? NO_GROUP_ID\n : original.event.viagVirtualId;\n\n return canSelect ? (\n \n {\n setShiftKeyRowSelectionState(\n id,\n table.getRowModel().rows as unknown as TableRow[],\n groupId\n );\n }}\n />\n \n ) : null;\n },\n }),\n [ListingTableColumnId.TicketClassColor]: columnHelper.accessor(\n (data: ListingWithEvent | null) => data?.ticketClassColor ?? '',\n {\n id: ListingTableColumnId.TicketClassColor,\n header: () => (\n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n\n cell: function Cell({ getValue, row: { original } }) {\n if (!original || !original.listing) {\n return (\n \n );\n }\n\n const ticketClassColor = getValue();\n\n return (\n \n \n \n );\n },\n sortingFn: groupSortingWrapper(\n sortingFns.basic,\n ListingTableColumnId.TicketClassColor,\n canSortGroup\n ),\n }\n ),\n [ListingTableColumnId.ListingId]: columnHelper.accessor(\n (data) => data?.listing?.id,\n {\n id: ListingTableColumnId.ListingId,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n const { setActivePosEntity } = useActivePosEntityContext();\n const { setModal } = useContext(ModalContext);\n const onViewClick = useCallback(async () => {\n if (!original || !original.listing?.id) {\n return;\n }\n setActivePosEntity(\n original.listing.id,\n original.listing.idOnMkp,\n true\n );\n setModal(\n getListingDetailsModalConfigWithDeepLink(\n original.listing.id,\n true\n )\n );\n }, [original, setActivePosEntity, setModal]);\n\n if (!original || !original.listing) {\n return (\n \n );\n }\n\n // We do not display ID for listing group or comp listing\n if (\n original.listing.isLtGrp ||\n !original.listing.isFull ||\n original.isCompListing\n )\n return null;\n\n return (\n \n \n \n {getValue() as number}\n \n \n \n );\n },\n sortingFn: groupSortingWrapper(\n sortingFns.basic,\n ListingTableColumnId.ListingId,\n canSortGroup\n ),\n }\n ),\n [ListingTableColumnId.Seating]: columnHelper.accessor(\n (data) =>\n data?.listing\n ? {\n seating: data.listing.seating,\n listingNotes: data.listing.seatTraits,\n }\n : null,\n {\n id: ListingTableColumnId.Seating,\n header: function Header({ table }) {\n const seatingText = useContent(\n LISTING_TABLE_COLUMN_ID_TO_CONTENT_ID[ListingTableColumnId.Seating]\n );\n const sectionText = useContent(ContentId.Section);\n const { value: storedInventoryColumnNumberPrecisions = {} } =\n useServerUserSetting({\n id: SECTION_TYPE_TO_PRECISION_SETTING[\n table.options.meta?.sectionType ?? SECTION_TYPE\n ],\n });\n\n const isSectionOnly =\n storedInventoryColumnNumberPrecisions[\n ListingTableColumnId.Seating\n ] === FormatOption.Seating_SectionOnly;\n\n return (\n \n \n \n {isSectionOnly\n ? `${seatingText} (${sectionText})`\n : seatingText}\n \n \n \n );\n },\n enableColumnFilter: true,\n filterFn:\n filterSeatingSectionFn as FilterFnOption,\n meta: {\n uniqueValueVariant: 'seatingSection',\n },\n size: hasCleanupWhiteSpaceFeature\n ? COLUMN_DEFAULT_SIZE_XL\n : COLUMN_DEFAULT_SIZE_XXL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n row: { original, getCanExpand, getIsExpanded, toggleExpanded, depth },\n cell: { id: cellId },\n column: { id: columnId },\n table,\n }) {\n const hasSeatTraitsColumnFeature = useUserHasFeature(\n Feature.SeatTraitsColumn\n );\n\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n const droppable = useDroppable({\n id: cellId,\n data: {\n ltGrpId: original?.listing?.ltGrpId,\n listingId: original?.listing?.id,\n listingGroupPriority: original?.listing?.ltGrpPrior,\n },\n });\n const draggable = useDraggable({\n id: cellId,\n data: {\n listingId: original?.listing?.id,\n currentListingGroupId: original?.listing?.ltGrpId,\n listingGroupPriority: original?.listing?.ltGrpPrior,\n },\n });\n\n const dndProps = useMemo(() => {\n // Disable drag-n-drop when there is no group\n if (!hasGroup) {\n return {};\n }\n const isListing = !original?.isLtGrp && !original?.listing?.isLtGrp;\n if (isListing && !original?.ltGroupName) {\n return {\n ref: (node: HTMLDivElement): void => {\n draggable.setNodeRef(node);\n droppable.setNodeRef(node);\n },\n ...draggable.listeners,\n ...draggable.attributes,\n };\n }\n if (isListingGroupLeader(original?.listing)) {\n return {\n ref: (node: HTMLDivElement): void => {\n droppable.setNodeRef(node);\n },\n };\n }\n return {};\n }, [\n draggable,\n droppable,\n original?.isLtGrp,\n original?.listing,\n original?.ltGroupName,\n ]);\n\n useEffect(() => {\n if (droppable.isOver) {\n findParentRow(droppable.node.current)?.setAttribute(\n 'style',\n `background-color: ${vars.color.backgroundHighlight}`\n );\n } else {\n findParentRow(droppable.node.current)?.setAttribute(\n 'style',\n `background-color: none`\n );\n }\n }, [droppable.isOver, droppable.node]);\n\n if (!original || !original.listing) {\n return (\n \n );\n }\n\n const adjustedListing =\n userDefinedPrecision === FormatOption.Seating_SectionOnly\n ? {\n ...original.listing,\n seating: {\n ...original.listing.seating,\n row: null,\n seatFr: null,\n seatTo: null,\n },\n }\n : original.listing;\n\n const canExpand = getCanExpand();\n const isExpanded = getIsExpanded();\n const Icon = isExpanded ? ExpandIcon : ForwardIcon;\n\n return (\n \n \n \n {range(depth).map((i) => {\n return
    ;\n })}\n \n {canExpand && (\n <>\n
    \n {\n e.stopPropagation();\n e.preventDefault();\n toggleExpanded(!isExpanded);\n }}\n />\n
    \n {isListingGroupLeader(original.listing) && (\n {\n e.stopPropagation();\n e.preventDefault();\n toggleExpanded(!isExpanded);\n }}\n >\n \n
    \n )}\n \n )}\n \n \n \n
    \n
    \n {original.ltGroupName && (\n \n }\n >\n
    \n {' '}\n {original.ltGroupName}\n
    \n \n )}\n
    \n \n \n
    \n );\n },\n sortingFn: SEATING_SORTING_FN_NAME,\n }\n ),\n [ListingTableColumnId.SeatTraits]: columnHelper.accessor(\n (data) => data?.listing?.seatTraits,\n {\n id: ListingTableColumnId.SeatTraits,\n header: () => (\n \n \n \n ),\n enableColumnFilter: true,\n filterFn: filterSeatTraitsFn as FilterFnOption,\n meta: {\n uniqueValueVariant: 'seatTraits',\n },\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n enableSorting: false,\n cell: ({ row: { original }, getValue }) => {\n const seatTraits = getValue();\n\n if (!original || (!original.listing && original?.isLtGrp)) {\n return (\n \n );\n }\n if (!original.listing) return null;\n // We do not display for listing group or comp listing\n if (original.listing.isLtGrp || original.isCompListing) return null;\n if (!seatTraits?.length) return null;\n\n return (\n \n \n \n );\n },\n }\n ),\n [ListingTableColumnId.DeliveryType]: columnHelper.accessor(\n (data) => data?.listing?.delivType,\n {\n id: ListingTableColumnId.DeliveryType,\n header: function Cell() {\n const titleText = useContent(\n LISTING_TABLE_COLUMN_ID_TO_CONTENT_ID[\n ListingTableColumnId.DeliveryType\n ]\n );\n\n return hasCleanupWhiteSpaceFeature ? (\n \n
     
    \n
    \n ) : (\n \n \n \n );\n },\n enableColumnFilter: false,\n size: hasCleanupWhiteSpaceFeature\n ? COLUMN_DEFAULT_SIZE_ICON\n : COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_DEFAULT_SIZE_ICON,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n row: { original, getCanExpand },\n column: { id: columnId },\n table,\n }) {\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n const strDeliveryTypes = useMapDeliveryTypesToString({\n deliveryTypesObj: original?.listing,\n });\n\n if (!original || !original.listing) {\n return (\n \n );\n }\n\n // We do not display for comp listing\n if (original.isCompListing) return null;\n\n // Don't show delivery type when row can be expanded\n if (getCanExpand()) {\n return null;\n }\n\n return (\n \n \n \n );\n },\n sortingFn: groupSortingWrapper(\n sortingFns.basic,\n ListingTableColumnId.DeliveryType,\n canSortGroup\n ),\n }\n ),\n [ListingTableColumnId.ShownQuantity]: columnHelper.accessor(\n (data) => data?.listing?.manMaxDispQty ?? data?.listing?.maxDispQty ?? 0,\n {\n id: ListingTableColumnId.ShownQuantity,\n header: ({ column }) => (\n COLUMN_DEFAULT_SIZE_SM &&\n hasCleanupWhiteSpaceFeature\n ? 'right'\n : 'left'\n }`}\n >\n \n \n ),\n enableColumnFilter: false,\n size: hasCleanupWhiteSpaceFeature\n ? COLUMN_DEFAULT_SIZE_SM\n : COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n table,\n }) {\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n if (!original || !original.listing) {\n return (\n \n );\n }\n\n // We do not display for comp listing\n if (original.isCompListing) return null;\n\n return (\n \n \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: getValue(),\n })}\n \n \n );\n },\n sortingFn: groupSortingWrapper(\n sortingFns.basic,\n ListingTableColumnId.ShownQuantity,\n canSortGroup\n ),\n }\n ),\n [ListingTableColumnId.SplitType]: columnHelper.accessor(\n (data) => data?.listing?.splitType,\n {\n id: ListingTableColumnId.SplitType,\n header: ({ column }) => (\n COLUMN_DEFAULT_SIZE_SM &&\n hasCleanupWhiteSpaceFeature\n ? 'right'\n : 'left'\n }`}\n >\n \n \n ),\n enableColumnFilter: false,\n size: hasCleanupWhiteSpaceFeature\n ? COLUMN_DEFAULT_SIZE_SM\n : COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n table,\n }) {\n if (!original || !original.listing) {\n return (\n \n );\n }\n\n // We do not display for comp listing\n if (original.isCompListing) return null;\n\n return (\n \n \n {getValue()}\n \n \n );\n },\n sortingFn: groupSortingWrapper(\n sortingFns.basic,\n ListingTableColumnId.SplitType,\n canSortGroup\n ),\n }\n ),\n [ListingTableColumnId.UnsoldQuantity]: columnHelper.accessor(\n (data) => data?.listing?.unsoldQty,\n {\n id: ListingTableColumnId.UnsoldQuantity,\n header: ({ column }) => (\n COLUMN_DEFAULT_SIZE_SM &&\n hasCleanupWhiteSpaceFeature\n ? 'right'\n : 'left'\n }`}\n >\n \n \n ),\n enableColumnFilter: false,\n size: hasCleanupWhiteSpaceFeature\n ? COLUMN_DEFAULT_SIZE_SM\n : COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n table,\n }) {\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n if (!original || !original.listing) {\n return (\n \n );\n }\n\n return (\n \n \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: getValue(),\n })}\n \n \n );\n },\n sortingFn: groupSortingWrapper(\n sortingFns.basic,\n ListingTableColumnId.UnsoldQuantity,\n canSortGroup\n ),\n }\n ),\n [ListingTableColumnId.TicketCount]: columnHelper.accessor(\n (data) => data?.listing?.ticketCnt ?? 0,\n {\n id: ListingTableColumnId.TicketCount,\n header: ({ column }) => (\n COLUMN_DEFAULT_SIZE_SM &&\n hasCleanupWhiteSpaceFeature\n ? 'right'\n : 'left'\n }`}\n >\n \n \n ),\n enableColumnFilter: false,\n size: hasCleanupWhiteSpaceFeature\n ? COLUMN_DEFAULT_SIZE_SM\n : COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n table,\n }) {\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n if (!original || !original.listing) {\n return (\n \n );\n }\n\n // We do not display for comp listing\n if (original.isCompListing) return null;\n\n return (\n \n \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: getValue(),\n })}\n \n \n );\n },\n sortingFn: groupSortingWrapper(\n sortingFns.basic,\n ListingTableColumnId.TicketCount,\n canSortGroup\n ),\n }\n ),\n [ListingTableColumnId.SoldQty]: columnHelper.accessor(\n (data) => data?.listing?.soldQty ?? 0,\n {\n id: ListingTableColumnId.SoldQty,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n table,\n }) {\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n if (!original || !original.listing) {\n return (\n \n );\n }\n\n // We do not display for comp listing\n if (original.isCompListing) return null;\n\n return (\n \n \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: getValue(),\n })}\n \n \n );\n },\n sortingFn: groupSortingWrapper(\n sortingFns.basic,\n ListingTableColumnId.SoldQty,\n canSortGroup\n ),\n }\n ),\n [ListingTableColumnId.InHandDate]: columnHelper.accessor(\n (data) => data?.listing?.inHandAt || '',\n {\n id: ListingTableColumnId.InHandDate,\n header: ({ column }) => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_ICON,\n minSize: COLUMN_DEFAULT_SIZE_ICON,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ getValue, row: { original } }) => {\n const value = getValue();\n if (!original || !original.listing) {\n return (\n \n );\n }\n\n // We do not display inhand for listing group or comp listing\n if (\n original.listing.isLtGrp ||\n !original.listing.isFull ||\n original.isCompListing\n )\n return null;\n\n return (\n \n \n \n );\n },\n sortingFn: groupSortingWrapper(\n sortingFns.datetime,\n ListingTableColumnId.InHandDate,\n canSortGroup\n ),\n }\n ),\n [ListingTableColumnId.UnitCost]: columnHelper.accessor(\n (data) => data?.listing?.unitCst ?? data?.listing?.faceValue,\n {\n id: ListingTableColumnId.UnitCost,\n header: ({ column }) => (\n \n \n \n ),\n enableColumnFilter: false,\n size: hasCleanupWhiteSpaceFeature\n ? COLUMN_DEFAULT_SIZE_BASE\n : COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n table,\n }) {\n const value = getValue();\n const { getUiCurrency } = useLocalizationContext();\n const currency = getUiCurrency(original?.listing?.currency);\n\n const { userDefinedPrecision, isServerSetting } =\n useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n if (!original || (!original.listing && original.isLtGrp)) {\n return (\n \n );\n }\n\n if (!original.listing || original.isCompListing) return null;\n if (!value?.disp) return ;\n\n // Hide decimals if >999 and this is a default precision\n const shouldRoundToWhole =\n hasCleanupWhiteSpaceFeature && !isServerSetting && value.amt > 999;\n\n const displayPrecision = shouldRoundToWhole\n ? FormatOption.Whole\n : userDefinedPrecision;\n\n return (\n \n {userDefinedPrecision\n ? applyNumberFormatting({\n precision: displayPrecision,\n inputNumber: value.amt,\n currencyCode: currency.code,\n currencyDecimalDigits: currency.dec,\n })\n : value.disp}\n \n );\n },\n sortingFn: groupSortingWrapper(\n sortMoney,\n ListingTableColumnId.UnitCost,\n canSortGroup\n ),\n }\n ),\n\n [ListingTableColumnId.UnsoldProceeds]: columnHelper.accessor(\n (data) =>\n data?.listing ? data.listing.listPrice * data.listing.availQty : null,\n {\n id: ListingTableColumnId.UnsoldProceeds,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n table,\n }) {\n const value = getValue();\n const { getUiCurrency } = useLocalizationContext();\n const currency = getUiCurrency(original?.listing?.currency);\n\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n if (!original || (!original.listing && original?.isLtGrp)) {\n return (\n \n );\n }\n\n if (!original.listing || original?.listing?.isLtGrp) return null;\n\n // We do not display for comp listing\n if (original.isCompListing) return null;\n\n if (value == null) return ;\n\n return (\n \n
    \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value,\n currencyCode: currency.code,\n currencyDecimalDigits: currency.dec,\n })}\n
    \n
    \n );\n },\n sortingFn: groupSortingWrapper(\n sortingFns.basic,\n ListingTableColumnId.UnsoldProceeds,\n canSortGroup\n ),\n }\n ),\n [ListingTableColumnId.UnsoldCost]: columnHelper.accessor(\n (data) =>\n data?.listing && (data.listing.unitCst || data.listing.faceValue)\n ? (data.listing.unitCst?.amt ?? data.listing.faceValue?.amt ?? 0) *\n data.listing.availQty\n : null,\n {\n id: ListingTableColumnId.UnsoldCost,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n table,\n }) {\n const value = getValue();\n const { getUiCurrency } = useLocalizationContext();\n const currency = getUiCurrency(original?.listing?.currency);\n\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n if (!original || (!original.listing && original?.isLtGrp)) {\n return (\n \n );\n }\n\n if (!original.listing) return null;\n\n // We do not display for comp listing\n if (original.isCompListing) return null;\n\n if (value == null) return ;\n\n return (\n \n \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value,\n currencyCode: currency.code,\n currencyDecimalDigits: currency.dec,\n })}\n \n \n );\n },\n sortingFn: groupSortingWrapper(\n sortingFns.basic,\n ListingTableColumnId.UnsoldCost,\n canSortGroup\n ),\n }\n ),\n [ListingTableColumnId.SoldCost]: columnHelper.accessor(\n (data) =>\n data?.listing && (data.listing.unitCst || data.listing.faceValue)\n ? (data.listing.unitCst?.amt ?? data.listing.faceValue?.amt ?? 0) *\n (data.listing.ticketCnt - data.listing.availQty)\n : null,\n {\n id: ListingTableColumnId.SoldCost,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n table,\n }) {\n const value = getValue();\n const { getUiCurrency } = useLocalizationContext();\n const currency = getUiCurrency(original?.listing?.currency);\n\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n if (!original || (!original.listing && original?.isLtGrp)) {\n return (\n \n );\n }\n\n if (!original.listing) return null;\n\n // We do not display for comp listing\n if (original.isCompListing) return null;\n\n if (value == null) {\n return (\n \n \n \n );\n }\n\n return (\n \n \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value,\n currencyCode: currency.code,\n currencyDecimalDigits: currency.dec,\n })}\n \n \n );\n },\n sortingFn: groupSortingWrapper(\n sortingFns.basic,\n ListingTableColumnId.SoldCost,\n canSortGroup\n ),\n }\n ),\n [ListingTableColumnId.TotalCost]: columnHelper.accessor(\n (data) =>\n data?.listing && (data.listing.unitCst || data.listing.faceValue)\n ? (data.listing.unitCst?.amt ?? data.listing.faceValue?.amt ?? 0) *\n data.listing.ticketCnt\n : null,\n {\n id: ListingTableColumnId.TotalCost,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n table,\n }) {\n const value = getValue();\n const { getUiCurrency } = useLocalizationContext();\n const currency = getUiCurrency(original?.listing?.currency);\n\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n if (!original || (!original.listing && original?.isLtGrp)) {\n return (\n \n );\n }\n\n if (!original.listing) return null;\n\n // We do not display for comp listing\n if (original.isCompListing) return null;\n\n if (value == null) return ;\n\n return (\n \n \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value,\n currencyCode: currency.code,\n currencyDecimalDigits: currency.dec,\n })}\n \n \n );\n },\n sortingFn: groupSortingWrapper(\n sortingFns.basic,\n ListingTableColumnId.TotalCost,\n canSortGroup\n ),\n }\n ),\n [ListingTableColumnId.ListPrice]: columnHelper.accessor(\n (data) => data?.listing?.listPrice,\n {\n id: ListingTableColumnId.ListPrice,\n header: ({ column }) => (\n COLUMN_DEFAULT_SIZE_SM &&\n hasCleanupWhiteSpaceFeature\n ? 'right'\n : 'left'\n }`}\n >\n \n \n ),\n enableColumnFilter: false,\n size: hasCleanupWhiteSpaceFeature\n ? COLUMN_DEFAULT_SIZE_LG\n : COLUMN_DEFAULT_SIZE_XL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ row: { original }, table }) => {\n if (!original || (!original.listing && original?.isLtGrp)) {\n return (\n \n );\n }\n\n if (!original.listing) return null;\n\n // We do not display pricing input for listing group or comp listing\n if (\n original.listing.isLtGrp ||\n !original.listing.isFull ||\n original.isCompListing\n )\n return null;\n\n const sellerFee = original.listing.mkpListings?.find(\n (m) => m.mkp === Marketplace.StubHub\n )?.sellerFee;\n\n const listings: ListingWithEvent[] = table\n .getSortedRowModel()\n .rows.filter((row) => row?.original != null)\n .map((row) => row.original!);\n\n const nextEditableListing = getNextEditableListingRow(\n listings,\n original\n );\n\n return (\n \n \n \n );\n },\n sortingFn: groupSortingWrapper(\n sortingFns.basic,\n ListingTableColumnId.ListPrice,\n canSortGroup\n ),\n }\n ),\n [ListingTableColumnId.AllInPrice]: columnHelper.accessor(\n (data) =>\n data?.isCompListing\n ? data.listing?.allInPrice\n : // listing all-in-price may not always have a value, so calling this function will properly handle calculating it from list-price if it's null\n getAllInPriceFromListPriceForListing(data?.listing),\n {\n id: ListingTableColumnId.AllInPrice,\n header: ({ column }) => (\n COLUMN_DEFAULT_SIZE_SM &&\n hasCleanupWhiteSpaceFeature\n ? 'right'\n : 'left'\n }`}\n >\n \n \n ),\n enableColumnFilter: false,\n size: hasCleanupWhiteSpaceFeature\n ? COLUMN_DEFAULT_SIZE_LG\n : COLUMN_DEFAULT_SIZE_XL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ row: { original }, table }) => {\n if (!original || (!original.listing && original?.isLtGrp)) {\n return (\n \n );\n }\n\n if (!original.listing) return null;\n\n if (original.isCompListing) {\n const value = original.listing.allInPrice;\n const currencyCode = original.listing.currency;\n\n return (\n \n
    \n {value != null &&\n currencyCode != null &&\n applyNumberFormatting({\n inputNumber: value,\n currencyCode: currencyCode,\n })}\n
    \n
    \n );\n }\n\n // We do not display pricing input for listing group or comp listing\n if (original.listing.isLtGrp || !original.listing.isFull) return null;\n\n const sellerFee = original.listing.mkpListings?.find(\n (m) => m.mkp === Marketplace.StubHub\n )?.sellerFee;\n\n const listings: ListingWithEvent[] = table\n .getSortedRowModel()\n .rows.filter((row) => row?.original != null)\n .map((row) => row.original!);\n\n const nextEditableListing = getNextEditableListingRow(\n listings,\n original\n );\n\n return (\n \n \n \n );\n },\n sortingFn: groupSortingWrapper(\n sortingFns.basic,\n ListingTableColumnId.AllInPrice,\n canSortGroup\n ),\n }\n ),\n [ListingTableColumnId.AutoPricing]: columnHelper.accessor(\n (data) => data?.listing?.isAutoPrc,\n {\n id: ListingTableColumnId.AutoPricing,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n row: { original },\n column: { id: columnId },\n table,\n }) {\n const { editable } = useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n if (!original || (!original.listing && original?.isLtGrp)) {\n return (\n \n );\n }\n\n if (!original.listing) return null;\n\n // We do not display pricing for listing group or comp listing\n if (\n original.listing.isLtGrp ||\n !original.listing.isFull ||\n original.isCompListing\n )\n return null;\n\n return (\n \n );\n },\n sortingFn: groupSortingWrapper(\n sortingFns.basic,\n ListingTableColumnId.AutoPricing,\n canSortGroup\n ),\n }\n ),\n [ListingTableColumnId.ProceedsFloor]: columnHelper.accessor(\n (data) => data?.listing?.procsFloor,\n {\n id: ListingTableColumnId.ProceedsFloor,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ row: { original }, getValue }) {\n const value = getValue();\n\n if (!original || (!original.listing && original?.isLtGrp)) {\n return (\n \n );\n }\n if (!original.listing) return null;\n // We do not display pricing for listing group or comp listing\n if (\n original.listing.isLtGrp ||\n !original.listing.isFull ||\n original.isCompListing\n )\n return null;\n\n const sellerFee = original.listing.mkpListings?.find(\n (m) => m.mkp === Marketplace.StubHub\n )?.sellerFee;\n\n return (\n \n );\n },\n sortingFn: groupSortingWrapper(\n sortingFns.basic,\n ListingTableColumnId.ProceedsFloor,\n canSortGroup\n ),\n }\n ),\n [ListingTableColumnId.ProceedsCeiling]: columnHelper.accessor(\n (data) => data?.listing?.procsCeil,\n {\n id: ListingTableColumnId.ProceedsCeiling,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n row: { original },\n getValue,\n column: { id: columnId },\n table,\n }) {\n const value = getValue();\n const { getUiCurrency } = useLocalizationContext();\n const currency = getUiCurrency(original?.listing?.currency);\n\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n if (!original || (!original.listing && original?.isLtGrp)) {\n return (\n \n );\n }\n if (!original.listing || value == null) return null;\n // We do not display pricing for listing group or comp listing\n if (\n original.listing.isLtGrp ||\n !original.listing.isFull ||\n original.isCompListing\n )\n return null;\n\n return (\n \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value,\n currencyCode: currency.code,\n currencyDecimalDigits: currency.dec,\n })}\n \n );\n },\n sortingFn: groupSortingWrapper(\n sortingFns.basic,\n ListingTableColumnId.ProceedsCeiling,\n canSortGroup\n ),\n }\n ),\n [ListingTableColumnId.WebsiteFloor]: columnHelper.accessor(\n (data) => data?.listing?.procsFloor,\n {\n id: ListingTableColumnId.WebsiteFloor,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ row: { original }, getValue }) {\n if (!original || (!original.listing && original?.isLtGrp)) {\n return (\n \n );\n }\n if (!original.listing) return null;\n // We do not display pricing for listing group or comp listing\n if (\n original.listing.isLtGrp ||\n !original.listing.isFull ||\n original.isCompListing\n )\n return null;\n\n const sellerFee = original.listing.mkpListings?.find(\n (m) => m.mkp === Marketplace.StubHub\n )?.sellerFee;\n\n return (\n \n );\n },\n sortingFn: groupSortingWrapper(\n sortingFns.basic,\n ListingTableColumnId.WebsiteFloor,\n canSortGroup\n ),\n }\n ),\n [ListingTableColumnId.WebsiteCeiling]: columnHelper.accessor(\n (data) => data?.listing?.procsCeil,\n {\n id: ListingTableColumnId.WebsiteCeiling,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n row: { original },\n getValue,\n column: { id: columnId },\n table,\n }) {\n const allInCeilingPrice = useAllInPriceFromListPrice(\n getValue(),\n original?.listing\n );\n const { getUiCurrency } = useLocalizationContext();\n const currency = getUiCurrency(original?.listing?.currency);\n\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n if (!original || (!original.listing && original?.isLtGrp)) {\n return (\n \n );\n }\n if (!original.listing || allInCeilingPrice == null) return null;\n // We do not display pricing for listing group or comp listing\n if (\n original.listing.isLtGrp ||\n !original.listing.isFull ||\n original.isCompListing\n )\n return null;\n\n return (\n \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: allInCeilingPrice,\n currencyCode: currency.code,\n currencyDecimalDigits: currency.dec,\n })}\n \n );\n },\n sortingFn: groupSortingWrapper(\n sortingFns.basic,\n ListingTableColumnId.WebsiteCeiling,\n canSortGroup\n ),\n }\n ),\n [ListingTableColumnId.UndercutMode]: columnHelper.accessor(\n (data) => data?.listing?.undMode,\n {\n id: ListingTableColumnId.UndercutMode,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n row: { original },\n column: { id: columnId },\n getValue,\n table,\n }) {\n const { editable, userDefinedPrecision } = useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n const undercutMode = getValue();\n\n if (!original || (!original.listing && original?.isLtGrp)) {\n return (\n \n );\n }\n\n if (!original.listing) return null;\n\n // We do not display pricing for listing group or comp listing\n if (\n original.listing.isLtGrp ||\n !original.listing.isFull ||\n original.isCompListing\n )\n return null;\n\n const UndercutModeIcon = undercutMode\n ? getUndercutModeIcon(undercutMode)\n : null;\n return (\n \n );\n },\n sortingFn: groupSortingWrapper(\n sortingFns.basic,\n ListingTableColumnId.UndercutMode,\n canSortGroup\n ),\n }\n ),\n [ListingTableColumnId.UndercutAbsoluteAmount]: columnHelper.accessor(\n (data) => data?.listing?.undAbsAmt,\n {\n id: ListingTableColumnId.UndercutAbsoluteAmount,\n header: function Cell() {\n const { getUiCurrency } = useLocalizationContext();\n const { loginContext } = useAppContext();\n const titleText = useContent(ContentId.UndercutAbsoluteAmount);\n\n const currencyCode = loginContext?.user?.activeAccount.currencyCode;\n const { sym } = getUiCurrency(currencyCode);\n\n return (\n \n \n {` (${sym})`}\n \n );\n },\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n row: { original },\n column: { id: columnId },\n getValue,\n table,\n }) {\n const value = getValue();\n const { getUiCurrency } = useLocalizationContext();\n const currency = getUiCurrency(original?.listing?.currency);\n\n const { editable, userDefinedPrecision } = useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n if (!original || (!original.listing && original?.isLtGrp)) {\n return (\n \n );\n }\n if (\n !original.listing ||\n !original.listing?.isAutoPrc ||\n original.listing?.undMode == null\n )\n return null;\n\n const isPremium = value != null && value < 0;\n const formattedNumber =\n value != null\n ? applyNumberFormatting({\n inputNumber: Math.abs(value),\n precision: userDefinedPrecision,\n currencyCode: currency.code,\n currencyDecimalDigits: currency.dec,\n })\n : null;\n\n return (\n \n );\n },\n sortingFn: groupSortingWrapper(\n sortingFns.basic,\n ListingTableColumnId.UndercutAbsoluteAmount,\n canSortGroup\n ),\n }\n ),\n [ListingTableColumnId.UndercutRelativeAmount]: columnHelper.accessor(\n (data) => data?.listing?.undRelAmt,\n {\n id: ListingTableColumnId.UndercutRelativeAmount,\n header: function Cell() {\n const titleText = useContent(ContentId.UndercutRelativeAmount);\n\n return (\n \n \n {` (%)`}\n \n );\n },\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n row: { original },\n column: { id: columnId },\n getValue,\n table,\n }) {\n const value = getValue();\n\n const { editable, userDefinedPrecision } = useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n if (!original || (!original.listing && original?.isLtGrp)) {\n return (\n \n );\n }\n\n if (\n !original.listing ||\n !original.listing?.isAutoPrc ||\n original.listing?.undMode == null\n )\n return null;\n\n // We do not display pricing for listing group or comp listing\n if (\n original.listing.isLtGrp ||\n !original.listing.isFull ||\n original.isCompListing\n )\n return null;\n\n const isPremium = value != null && value < 0;\n const formattedNumber =\n value != null\n ? applyNumberFormatting({\n inputNumber: Math.abs(value),\n precision: userDefinedPrecision,\n isPercent: true,\n })\n : null;\n\n return (\n \n );\n },\n sortingFn: groupSortingWrapper(\n sortingFns.basic,\n ListingTableColumnId.UndercutRelativeAmount,\n canSortGroup\n ),\n }\n ),\n [ListingTableColumnId.UndercutNewPrice]: columnHelper.accessor(\n (data) => data?.listing?.undNewPrice,\n {\n id: ListingTableColumnId.UndercutNewPrice,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n row: { original },\n getValue,\n column: { id: columnId },\n table,\n }) {\n const allInMarketPrice = useAllInPriceFromListPrice(\n getValue(),\n original?.listing\n );\n const { getUiCurrency } = useLocalizationContext();\n const currency = getUiCurrency(original?.listing?.currency);\n\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n if (!original || (!original.listing && original?.isLtGrp)) {\n return (\n \n );\n }\n if (!original.listing || allInMarketPrice == null) return null;\n // We do not display pricing for listing group or comp listing\n if (\n original.listing.isLtGrp ||\n !original.listing.isFull ||\n original.isCompListing\n )\n return null;\n\n return (\n \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: allInMarketPrice,\n currencyCode: currency.code,\n currencyDecimalDigits: currency.dec,\n })}\n \n );\n },\n sortingFn: groupSortingWrapper(\n sortingFns.basic,\n ListingTableColumnId.UndercutNewPrice,\n canSortGroup\n ),\n }\n ),\n [ListingTableColumnId.CompListingMode]: columnHelper.accessor(\n (data) => data?.listing?.compMode,\n {\n id: ListingTableColumnId.CompListingMode,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n row: { original },\n column: { id: columnId },\n getValue,\n table,\n }) {\n const { editable, userDefinedPrecision } = useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n const compListingMode = getValue<\n AutoPricingCompListingMode | undefined\n >();\n\n if (!original || (!original.listing && original?.isLtGrp)) {\n return (\n \n );\n }\n\n if (!original.listing) return null;\n\n // We do not display pricing for listing group or comp listing\n if (\n original.listing.isLtGrp ||\n !original.listing.isFull ||\n original.isCompListing\n )\n return null;\n\n const CompListingModeIcon = compListingMode\n ? getCompListingModeIcon(compListingMode)\n : null;\n\n return (\n \n );\n },\n sortingFn: groupSortingWrapper(\n sortingFns.basic,\n ListingTableColumnId.CompListingMode,\n canSortGroup\n ),\n }\n ),\n [ListingTableColumnId.CompListingFloor]: columnHelper.accessor(\n (data) => data?.listing?.compFloor,\n {\n id: ListingTableColumnId.CompListingFloor,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n row: { original },\n column: { id: columnId },\n getValue,\n table,\n }) {\n const value = getValue();\n\n const { editable, userDefinedPrecision } = useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n if (!original || (!original.listing && original?.isLtGrp)) {\n return (\n \n );\n }\n if (!original.listing) return null;\n\n // We do not display comp listing floor if is listing group or comp listing modes not supporting it\n if (\n original.listing.isLtGrp ||\n original.isCompListing ||\n !original.listing.isFull ||\n (original.listing.compMode !==\n AutoPricingCompListingMode.QualityScore &&\n original.listing.compMode !==\n AutoPricingCompListingMode.SameSection)\n )\n return null;\n\n const formattedNumber = applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value,\n });\n\n return (\n \n );\n },\n sortingFn: groupSortingWrapper(\n sortingFns.basic,\n ListingTableColumnId.CompListingFloor,\n canSortGroup\n ),\n }\n ),\n [ListingTableColumnId.CompListingCeiling]: columnHelper.accessor(\n (data) => data?.listing?.compCeil,\n {\n id: ListingTableColumnId.CompListingCeiling,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n row: { original },\n column: { id: columnId },\n getValue,\n table,\n }) {\n const value = getValue();\n\n const { editable, userDefinedPrecision } = useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n if (!original || (!original.listing && original?.isLtGrp)) {\n return (\n \n );\n }\n if (!original.listing) return null;\n\n // We do not display pricing for listing group or comp listing\n if (\n original.listing.isLtGrp ||\n original.isCompListing ||\n !original.listing.isFull ||\n (original.listing.compMode !==\n AutoPricingCompListingMode.QualityScore &&\n original.listing.compMode !==\n AutoPricingCompListingMode.SameSection)\n )\n return null;\n\n const formattedNumber = applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value,\n });\n\n return (\n \n );\n },\n sortingFn: groupSortingWrapper(\n sortingFns.basic,\n ListingTableColumnId.CompListingCeiling,\n canSortGroup\n ),\n }\n ),\n [ListingTableColumnId.CompListingMinimumQuantity]: columnHelper.accessor(\n (data) => data?.listing?.compQtyScrAdjJson ?? '',\n {\n id: ListingTableColumnId.CompListingMinimumQuantity,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n row: { original },\n column: { id: columnId },\n table,\n }) {\n const { editable } = useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n if (!original || (!original.listing && original?.isLtGrp)) {\n return (\n \n );\n }\n if (!original.listing) return null;\n // We do not display pricing for listing group or comp listing\n if (\n original.listing.isLtGrp ||\n !original.listing.isFull ||\n original.isCompListing\n )\n return null;\n\n return (\n \n );\n },\n sortingFn: groupSortingWrapper(\n sortGeneric,\n ListingTableColumnId.CompListingMinimumQuantity,\n canSortGroup\n ),\n }\n ),\n [ListingTableColumnId.CompListingExcludeFanInventory]:\n columnHelper.accessor((data) => data?.listing?.compExclFanInv ?? false, {\n id: ListingTableColumnId.CompListingExcludeFanInventory,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n row: { original },\n column: { id: columnId },\n table,\n }) {\n const { editable } = useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n if (!original || (!original.listing && original?.isLtGrp)) {\n return (\n \n );\n }\n if (!original.listing) return null;\n // We do not display pricing for listing group or comp listing\n if (\n original.listing.isLtGrp ||\n !original.listing.isFull ||\n original.isCompListing\n )\n return null;\n\n return (\n \n );\n },\n sortingFn: groupSortingWrapper(\n sortGeneric,\n ListingTableColumnId.CompListingExcludeFanInventory,\n canSortGroup\n ),\n }),\n [ListingTableColumnId.OutlierMode]: columnHelper.accessor(\n (data) => data?.listing?.outMode ?? '',\n {\n id: ListingTableColumnId.OutlierMode,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n row: { original },\n column: { id: columnId },\n table,\n }) {\n const { editable } = useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n if (!original || (!original.listing && original?.isLtGrp)) {\n return (\n \n );\n }\n if (!original.listing) return null;\n // We do not display pricing for listing group or comp listing\n if (\n original.listing.isLtGrp ||\n !original.listing.isFull ||\n original.isCompListing\n )\n return null;\n\n return (\n \n );\n },\n sortingFn: groupSortingWrapper(\n sortGeneric,\n ListingTableColumnId.OutlierMode,\n canSortGroup\n ),\n }\n ),\n [ListingTableColumnId.OutlierFiltering]: columnHelper.accessor(\n (data) => data?.listing?.outlStdDev ?? '',\n {\n id: ListingTableColumnId.OutlierFiltering,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n sortingFn: groupSortingWrapper(\n sortGeneric,\n ListingTableColumnId.OutlierFiltering,\n canSortGroup\n ),\n cell: function Cell({\n row: { original },\n column: { id: columnId },\n table,\n }) {\n const { editable } = useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n if (!original || (!original.listing && original?.isLtGrp)) {\n return (\n \n );\n }\n if (!original.listing) return null;\n // We do not display pricing for listing group or comp listing\n if (\n original.listing.isLtGrp ||\n !original.listing.isFull ||\n original.isCompListing\n )\n return null;\n\n return (\n \n );\n },\n }\n ),\n [ListingTableColumnId.OutlierLimit]: columnHelper.accessor(\n (data) => data?.listing?.outKthLowestLim ?? '',\n {\n id: ListingTableColumnId.OutlierLimit,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n sortingFn: groupSortingWrapper(\n sortGeneric,\n ListingTableColumnId.OutlierLimit,\n canSortGroup\n ),\n cell: function Cell({\n row: { original },\n column: { id: columnId },\n table,\n }) {\n const { editable } = useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n if (!original || (!original.listing && original?.isLtGrp)) {\n return (\n \n );\n }\n if (!original.listing) return null;\n // We do not display pricing for listing group or comp listing\n if (\n original.listing.isLtGrp ||\n !original.listing.isFull ||\n original.isCompListing\n )\n return null;\n\n return (\n \n );\n },\n }\n ),\n [ListingTableColumnId.OutlierSpacing]: columnHelper.accessor(\n (data) => data?.listing?.outKthLowestLimAbsSpc ?? '',\n {\n id: ListingTableColumnId.OutlierSpacing,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_XL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n sortingFn: groupSortingWrapper(\n sortGeneric,\n ListingTableColumnId.OutlierSpacing,\n canSortGroup\n ),\n cell: function Cell({\n row: { original },\n column: { id: columnId },\n table,\n }) {\n const { editable } = useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n if (!original || (!original.listing && original?.isLtGrp)) {\n return (\n \n );\n }\n if (!original.listing) return null;\n // We do not display pricing for listing group or comp listing\n if (\n original.listing.isLtGrp ||\n !original.listing.isFull ||\n original.isCompListing\n )\n return null;\n\n return (\n \n );\n },\n }\n ),\n [ListingTableColumnId.CircuitBreakerMinCompListingCount]:\n columnHelper.accessor((data) => data?.listing?.cirBrMinCompCount ?? '', {\n id: ListingTableColumnId.CircuitBreakerMinCompListingCount,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n sortingFn: groupSortingWrapper(\n sortGeneric,\n ListingTableColumnId.CircuitBreakerMinCompListingCount,\n canSortGroup\n ),\n cell: function Cell({\n row: { original },\n column: { id: columnId },\n table,\n }) {\n const { editable } = useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n if (!original || (!original.listing && original?.isLtGrp)) {\n return (\n \n );\n }\n if (!original.listing) return null;\n // We do not display pricing for listing group or comp listing\n if (\n original.listing.isLtGrp ||\n !original.listing.isFull ||\n original.isCompListing\n )\n return null;\n\n return (\n \n );\n },\n }),\n [ListingTableColumnId.CircuitBreakerVelocity]: columnHelper.accessor(\n (data) => data?.listing?.cirBrMinCompCount ?? '',\n {\n id: ListingTableColumnId.CircuitBreakerVelocity,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n sortingFn: groupSortingWrapper(\n sortGeneric,\n ListingTableColumnId.CircuitBreakerVelocity,\n canSortGroup\n ),\n cell: function Cell({\n row: { original },\n column: { id: columnId },\n table,\n }) {\n const { editable } = useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n if (!original || (!original.listing && original?.isLtGrp)) {\n return (\n \n );\n }\n if (!original.listing) return null;\n // We do not display pricing for listing group or comp listing\n if (\n original.listing.isLtGrp ||\n !original.listing.isFull ||\n original.isCompListing\n )\n return null;\n\n return (\n \n );\n },\n }\n ),\n [ListingTableColumnId.CircuitBreakerVelocityHours]: columnHelper.accessor(\n (data) => data?.listing?.cirBrMinCompCount ?? '',\n {\n id: ListingTableColumnId.CircuitBreakerVelocityHours,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n sortingFn: groupSortingWrapper(\n sortGeneric,\n ListingTableColumnId.CircuitBreakerVelocityHours,\n canSortGroup\n ),\n cell: function Cell({\n row: { original },\n column: { id: columnId },\n table,\n }) {\n const { editable } = useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n if (!original || (!original.listing && original?.isLtGrp)) {\n return (\n \n );\n }\n if (!original.listing) return null;\n // We do not display pricing for listing group or comp listing\n if (\n original.listing.isLtGrp ||\n !original.listing.isFull ||\n original.isCompListing\n )\n return null;\n\n return (\n \n );\n },\n }\n ),\n [ListingTableColumnId.SeatingRow]: columnHelper.accessor(\n (data) => data?.listing?.seating?.row ?? '',\n {\n id: ListingTableColumnId.SeatingRow,\n header: () => (\n \n \n \n ),\n enableColumnFilter: true,\n filterFn:\n filterStringMultiSelect as FilterFnOption,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n sortingFn: groupSortingWrapper(\n sortGeneric,\n ListingTableColumnId.SeatingRow,\n canSortGroup\n ),\n cell: ({ row: { original }, getValue }) => {\n const value = getValue();\n\n if (!original || (!original.listing && original?.isLtGrp)) {\n return (\n \n );\n }\n if (!original.listing) return null;\n // We do not display seating info for listing group\n if (original.listing.isLtGrp) return null;\n\n return {value};\n },\n }\n ),\n [ListingTableColumnId.SeatingSeats]: columnHelper.accessor(\n (data) => data?.listing?.seating,\n {\n id: ListingTableColumnId.SeatingSeats,\n header: () => (\n \n \n \n ),\n enableColumnFilter: true,\n filterFn: filterSeatRangeFn as FilterFnOption,\n meta: {\n columnFilterVariant: 'seatRange',\n },\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n sortingFn: groupSortingWrapper(\n sortSeatingSeatsForTable,\n ListingTableColumnId.SeatingSeats,\n canSortGroup\n ),\n cell: function Cell({\n row: { original },\n column: { id: columnId },\n table,\n }) {\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n if (!original || (!original.listing && original?.isLtGrp)) {\n return (\n \n );\n }\n if (!original.listing) return null;\n // We do not display seating info for listing group\n if (original.listing.isLtGrp) return null;\n\n const { orgSeatFr, orgSeatTo, seating, availQty } =\n original?.listing ?? {};\n const { seatFr, seatTo } = seating ?? {};\n\n return (\n \n \n \n );\n },\n }\n ),\n [ListingTableColumnId.AutoPricingResultType]: columnHelper.accessor(\n (data) => data?.listing?.autoPrcResult,\n {\n id: ListingTableColumnId.AutoPricingResultType,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n sortingFn: groupSortingWrapper(\n sortGeneric,\n ListingTableColumnId.AutoPricingResultType,\n canSortGroup\n ),\n cell: ({ row: { original }, getValue }) => {\n const value = getValue();\n\n if (!original || (!original.listing && original?.isLtGrp)) {\n return (\n \n );\n }\n if (!original.listing) return null;\n // We do not display pricing result type info for listing group or comp listing\n if (original.listing.isLtGrp || original.isCompListing) return null;\n\n return (\n \n \n \n );\n },\n }\n ),\n [ListingTableColumnId.LastPriceUpdatedDate]: columnHelper.accessor(\n (data) => data?.listing?.lastPrcUpdOn ?? null,\n {\n id: ListingTableColumnId.LastPriceUpdatedDate,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n sortingFn: groupSortingWrapper(\n sortGeneric,\n ListingTableColumnId.LastPriceUpdatedDate,\n canSortGroup\n ),\n cell: function Cell({\n row: { original },\n getValue,\n column: { id: columnId },\n table,\n }) {\n const value = getValue();\n const { userDefinedPrecision = FormatOption.DateTime_MonthDD_Time } =\n useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n if (!original || (!original.listing && original?.isLtGrp)) {\n return (\n \n );\n }\n if (!original.listing) return null;\n // We do not display last price update date info for listing group or comp listing\n if (original.listing.isLtGrp || original.isCompListing) return null;\n\n return (\n \n \n \n );\n },\n }\n ),\n [ListingTableColumnId.PurchaseCreatedBy]: columnHelper.accessor(\n (data) => [data?.listing?.insertBy],\n {\n id: ListingTableColumnId.PurchaseCreatedBy,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n const { allActiveUserInfos } = useSellerAccountContext();\n\n const sellerUserIds = getValue();\n\n const displayNamesFormatted = useMemo(\n () =>\n sellerUserIds\n ? [...new Set(sellerUserIds)]\n .map(\n (sellerUserId) =>\n allActiveUserInfos?.[sellerUserId]?.displayName\n )\n .filter((name) => name != null)\n .join(', ')\n : null,\n [allActiveUserInfos, sellerUserIds]\n );\n\n if (!original || (!original.listing && original?.isLtGrp)) {\n return (\n \n );\n }\n if (!original.listing) return null;\n if (original.listing.isLtGrp || original.isCompListing) return null;\n\n return (\n {displayNamesFormatted}\n );\n },\n sortingFn: groupSortingWrapper(\n sortingFns.basic,\n ListingTableColumnId.PurchaseCreatedBy,\n canSortGroup\n ),\n }\n ),\n [ListingTableColumnId.PurchasedBy]: columnHelper.accessor(\n (data) => data?.listing?.poBys,\n {\n id: ListingTableColumnId.PurchasedBy,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n const { allActiveUserInfos } = useSellerAccountContext();\n\n const sellerUserIds = getValue();\n\n const displayNamesFormatted = useMemo(\n () =>\n sellerUserIds\n ? [...new Set(sellerUserIds)]\n .map(\n (sellerUserId) =>\n allActiveUserInfos?.[sellerUserId]?.displayName\n )\n .filter((name) => name != null)\n .join(', ')\n : null,\n [allActiveUserInfos, sellerUserIds]\n );\n\n if (\n !original ||\n (!original.listing && original?.isLtGrp) ||\n (loadedBySection &&\n !original?.isLtGrp &&\n !original?.isCompListing &&\n !original.listing?.dataIsLoaded?.[\n ListingDetailDataField.Purchase\n ])\n ) {\n return (\n \n );\n }\n if (!original.listing) return null;\n if (original.listing.isLtGrp || original.isCompListing) return null;\n\n return (\n {displayNamesFormatted}\n );\n },\n sortingFn: groupSortingWrapper(\n sortingFns.basic,\n ListingTableColumnId.PurchasedBy,\n canSortGroup\n ),\n }\n ),\n [ListingTableColumnId.PurchaseDate]: columnHelper.accessor(\n (data) => {\n return data?.listing?.poDate ?? null;\n },\n {\n id: ListingTableColumnId.PurchaseDate,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n getValue,\n column: { id: columnId },\n row: { original },\n table,\n }) {\n const purchaseDates = getValue();\n const { userDefinedPrecision = FormatOption.DateTime_MonthDD_Time } =\n useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n if (\n !original ||\n (!original.listing && original?.isLtGrp) ||\n (loadedBySection &&\n !original?.isLtGrp &&\n !original?.isCompListing &&\n !original.listing?.dataIsLoaded?.[\n ListingDetailDataField.Purchase\n ])\n ) {\n return (\n \n );\n }\n if (!original.listing) return null;\n if (original.listing.isLtGrp) return null;\n\n return (\n \n );\n },\n sortingFn: groupSortingWrapper(\n sortingFns.basic,\n ListingTableColumnId.PurchaseDate,\n canSortGroup\n ),\n }\n ),\n [ListingTableColumnId.WastedCost]: columnHelper.accessor(\n (data) => {\n if (!data || !data.listing) return null;\n return (\n (data.listing.wastedQty ?? 0) *\n (data.listing.unitCst?.amt || data.listing.faceValue?.amt || 0)\n );\n },\n {\n id: ListingTableColumnId.WastedCost,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n cell: function Cell({\n row: { original },\n column: { id: columnId },\n getValue,\n table,\n }) {\n const { getUiCurrency } = useLocalizationContext();\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n if (!original || (!original.listing && original?.isLtGrp)) {\n return (\n \n );\n }\n if (!original.listing) return null;\n // We do not display pricing result type info for listing group or comp listing\n if (original.listing.isLtGrp || original.isCompListing) return null;\n\n const value = getValue();\n const currency = getUiCurrency(original.listing.currency);\n\n return (\n \n {typeof value === 'number' ? (\n applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value,\n currencyCode: currency.code,\n currencyDecimalDigits: currency.dec,\n })\n ) : (\n \n )}\n \n );\n },\n sortingFn: groupSortingWrapper(\n sortingFns.basic,\n ListingTableColumnId.WastedCost,\n canSortGroup\n ),\n }\n ),\n [ListingTableColumnId.WastedTickets]: columnHelper.accessor(\n (data) => {\n return data?.listing?.wastedQty ?? 0;\n },\n {\n id: ListingTableColumnId.WastedTickets,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n cell: function Cell({\n row: { original },\n column: { id: columnId },\n getValue,\n table,\n }) {\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n if (!original || (!original.listing && original?.isLtGrp)) {\n return (\n \n );\n }\n if (!original.listing) return null;\n\n // We do not display for comp listing\n if (original.isCompListing) return null;\n\n const value = getValue();\n\n return (\n \n {typeof value === 'number' ? (\n applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value,\n })\n ) : (\n \n )}\n \n );\n },\n sortingFn: groupSortingWrapper(\n sortingFns.basic,\n ListingTableColumnId.WastedTickets,\n canSortGroup\n ),\n }\n ),\n [ListingTableColumnId.Actions]: columnHelper.accessor(\n // We don't actually use this, but this column is to be sorted by broad-casting state and quantity\n // And we need accessorFn to get the sorting activated\n (data) => data?.listing?.availQty,\n {\n id: ListingTableColumnId.Actions,\n enableSorting: false,\n enableResizing: true,\n header: function Cell() {\n const hasTablePinActionColumnFeature = useUserHasFeature(\n Feature.TablePinActionColumn\n );\n\n if (hasTablePinActionColumnFeature) {\n return null;\n }\n\n return (\n \n \n \n );\n },\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n sortingFn: groupSortingWrapper((r1, r2) => {\n if (r1.original?.listing?.isLtGrp) {\n if (!r2.original?.listing?.isLtGrp) {\n // listing groups sort first (sort r1 before r2)\n // unless this is a sub-level which then listing-group sort last\n return r2.original?.listing?.ltGrpId ===\n r1.original?.listing?.ltGrpId\n ? 1\n : -1;\n }\n }\n\n if (r2.original?.listing?.isLtGrp) {\n // listing groups sort first (sort r1 after r2)\n // unless this is a sub-level which then listing-group sort last\n return r2.original?.listing?.ltGrpId ===\n r1.original?.listing?.ltGrpId\n ? -1\n : 1;\n }\n\n const a = r1.original?.listing;\n const b = r2.original?.listing;\n const aQuantity = a?.availQty ?? 0;\n const bQuantity = b?.availQty ?? 0;\n if (aQuantity <= 0 && bQuantity >= 0) {\n return 1;\n } else if (aQuantity >= 0 && bQuantity <= 0) {\n return -1;\n }\n return (a?.ltGrpPrior ?? -1) - (b?.ltGrpPrior ?? -1);\n }),\n cell: ({\n row: { parentId, original, depth, getParentRows },\n table,\n }) => {\n if (!original || (!original.listing && original?.isLtGrp)) {\n return (\n \n );\n }\n\n if (!original.listing || original.isCompListing) return null;\n\n const parentRows =\n depth > 0 && parentId && table.getRowModel().rowsById[parentId]\n ? getParentRows()\n : undefined;\n\n if (depth === 0 && original.listing.ltGrpId === FAKE_SOLD_GROUP_ID) {\n return null;\n }\n\n const linkOnly =\n table.options.meta?.formatOptionOverrides?.[\n ListingTableColumnId.Actions\n ] === FormatOption.Actions_LinkOnly;\n\n return (\n 0}\n disabled={parentRows?.some(\n (pr) =>\n (pr.original?.listing as ListingGroup)?.isLockedFromEdits\n )}\n />\n );\n },\n }\n ),\n [ListingTableColumnId.PurchaseId]: columnHelper.accessor(\n (data) => data?.listing?.poId,\n {\n id: ListingTableColumnId.PurchaseId,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n const onViewClick = useCallback(async () => {\n if (!original || !original.listing?.poId) {\n return;\n }\n }, [original]);\n\n if (\n !original ||\n !original.listing ||\n (loadedBySection &&\n !original?.isLtGrp &&\n !original?.isCompListing &&\n !original.listing?.dataIsLoaded?.[\n ListingDetailDataField.Purchase\n ])\n ) {\n return (\n \n );\n }\n\n // We do not display for comp listing\n if (original.isCompListing || !original.listing.poOrderId)\n return null;\n\n return (\n \n \n \n \n \n {original.listing.poOrderId}\n \n \n \n \n \n );\n },\n sortingFn: groupSortingWrapper(\n sortingFns.basic,\n ListingTableColumnId.PurchaseId,\n canSortGroup\n ),\n }\n ),\n [ListingTableColumnId.VendorAccount]: columnHelper.accessor(\n (data) => data?.listing?.poVendAccEmail ?? '',\n {\n id: ListingTableColumnId.VendorAccount,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n\n cell: function Cell({ getValue, row: { original } }) {\n if (\n !original ||\n !original.listing ||\n (loadedBySection &&\n !original?.isLtGrp &&\n !original.listing?.dataIsLoaded?.[\n ListingDetailDataField.Purchase\n ])\n ) {\n return (\n \n );\n }\n\n // We do not display for comp listing\n if (original.isCompListing) return null;\n\n return (\n {getValue() as string}\n );\n },\n sortingFn: groupSortingWrapper(\n sortingFns.basic,\n ListingTableColumnId.VendorAccount,\n canSortGroup\n ),\n }\n ),\n [ListingTableColumnId.AutoFulfill]: columnHelper.accessor(\n (data) => data?.listing?.isNoFulfill ?? '',\n {\n id: ListingTableColumnId.AutoFulfill,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n\n cell: function Cell({ getValue, row: { original } }) {\n if (!original || !original.listing) {\n return (\n \n );\n }\n\n // We do not display for comp listing or listing-group\n if (original.isLtGrp || original.isCompListing) return null;\n\n return (\n \n {/* AutoFulfill is negative of IsNoFulfill */}\n \n \n );\n },\n sortingFn: groupSortingWrapper(\n sortingFns.basic,\n ListingTableColumnId.AutoFulfill,\n canSortGroup\n ),\n }\n ),\n [ListingTableColumnId.MarketplaceVisibility]: columnHelper.accessor(\n (data) => data?.listing?.mkpVis ?? '0',\n {\n id: ListingTableColumnId.MarketplaceVisibility,\n header: function Cell() {\n const titleText = useContent(ContentId.MarketplaceVisibility);\n\n return (\n \n \n {` (%)`}\n \n );\n },\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n\n cell: function Cell({\n row: { original },\n column: { id: columnId },\n getValue,\n table,\n }) {\n const value = getValue();\n\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n if (!original || !original.listing) {\n return (\n \n );\n }\n\n // We do not display for comp listing\n if (original.isCompListing) return null;\n\n const formattedNumber =\n value != null\n ? applyNumberFormatting({\n inputNumber: Math.abs(value / 100),\n precision: userDefinedPrecision,\n isPercent: true,\n })\n : null;\n\n return {formattedNumber};\n },\n sortingFn: groupSortingWrapper(\n sortingFns.basic,\n ListingTableColumnId.MarketplaceVisibility,\n canSortGroup\n ),\n }\n ),\n [ListingTableColumnId.AbsoluteRankPremium]: columnHelper.accessor(\n (data) => data?.listing?.ltGrpUndercut,\n {\n id: ListingTableColumnId.AbsoluteRankPremium,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n\n cell: function Cell({\n row: { original },\n getValue,\n column: { id: columnId },\n table,\n }) {\n const value = getValue<\n ListingGroupUndercutSetting | null | undefined\n >();\n\n const { getUiCurrency } = useLocalizationContext();\n const currency = getUiCurrency(original?.listing?.currency);\n\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n const absoluteRankPremium = value?.actRankUndAbsAmt ?? undefined;\n\n if (!original || !original.listing) {\n return (\n \n );\n }\n\n if (\n !original.listing ||\n absoluteRankPremium === undefined ||\n original.listing.isLtGrp ||\n !original.listing.isFull\n )\n return null;\n\n return (\n \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: absoluteRankPremium,\n currencyCode: currency.code,\n currencyDecimalDigits: currency.dec,\n })}\n \n );\n },\n sortingFn: groupSortingWrapper(\n sortingFns.basic,\n ListingTableColumnId.AbsoluteRankPremium,\n canSortGroup\n ),\n }\n ),\n [ListingTableColumnId.RelativeRankPremium]: columnHelper.accessor(\n (data) => data?.listing?.ltGrpUndercut,\n {\n id: ListingTableColumnId.RelativeRankPremium,\n header: function Cell() {\n const titleText = useContent(ContentId.UndercutRelativeAmount);\n\n return (\n \n \n {` (%)`}\n \n );\n },\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n\n cell: function Cell({\n row: { original },\n getValue,\n column: { id: columnId },\n table,\n }) {\n const value = getValue<\n ListingGroupUndercutSetting | null | undefined\n >();\n\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n const relativeRankPremium = value?.actRankUndRelAmt ?? undefined;\n\n if (!original || !original.listing) {\n return (\n \n );\n }\n\n if (\n original.listing.isLtGrp ||\n !original.listing.isFull ||\n relativeRankPremium === undefined ||\n !original.listing\n ) {\n return null;\n }\n\n return (\n \n {applyNumberFormatting({\n inputNumber: relativeRankPremium,\n precision: userDefinedPrecision,\n isPercent: true,\n })}\n \n );\n },\n sortingFn: groupSortingWrapper(\n sortingFns.basic,\n ListingTableColumnId.RelativeRankPremium,\n canSortGroup\n ),\n }\n ),\n } as const;\n};\n","import {\n DndContext,\n DragEndEvent,\n DragOverlay,\n DragStartEvent,\n PointerSensor,\n useSensor,\n useSensors,\n} from '@dnd-kit/core';\nimport {\n ColumnDef,\n ExpandedState,\n functionalUpdate,\n getExpandedRowModel,\n Row,\n RowSelectionState,\n SortingState,\n TableOptions,\n Updater,\n} from '@tanstack/react-table';\nimport clsx from 'clsx';\nimport { isEmpty } from 'lodash-es';\nimport { useCallback, useContext, useEffect, useMemo, useState } from 'react';\nimport { createPortal } from 'react-dom';\nimport { EventAccordionItemBodyComponentType } from 'src/components/Accordions';\nimport { shiftSelect } from 'src/components/Events/EventPage/EventPage.css';\nimport { useSingleTableShortcutSelection } from 'src/components/Events/EventPage/hooks/useSingleTableShortcutSelection';\nimport { ListingDisplay } from 'src/components/Listings/ListingDisplay';\nimport { createFakeListingGroup } from 'src/components/Listings/listingUtils';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useActiveSortTableColumnContext } from 'src/contexts/ActiveSortTableColumnContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { useCollapsableViewContext } from 'src/contexts/CollapsableViewContext/CollapsableViewContext';\nimport { ColumnResizingContextProvider } from 'src/contexts/ColumnResizingContext/ColumnResizingContext';\nimport {\n Content,\n FormatContent,\n useContent,\n} from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { FocusContext } from 'src/contexts/InputPriceFocusContext/FocusContext.types';\nimport { useInputPriceFocusContext } from 'src/contexts/InputPriceFocusContext/InputPriceFocusContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport {\n MultiSelectScope,\n useMultiSelectionContext,\n} from 'src/contexts/MultiSelectionContext';\nimport { useClearShiftSelectionOnSortingChange } from 'src/contexts/MultiSelectionContext/useClearShiftSelectionOnSortingChange';\nimport { Stack } from 'src/core/ui';\nimport { useSortListingTableSeatingColumn } from 'src/hooks/useSortListingTableSeatingColumn';\nimport { useTagsForEntityType } from 'src/hooks/useTagsForEntityType';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport { FormatOption, FormatOptionEntries } from 'src/modals/EditTableColumns';\nimport {\n flattenListingGroup,\n sortGroupType,\n} from 'src/modals/GroupListings/components/groupingUtils';\nimport { GroupIdNameMap } from 'src/modals/MergeListings/utils';\nimport {\n inventoryEventDetailsTableCollapsed,\n listingTableNoVirtuosoWrapper,\n} from 'src/tables/ListingTable/ListingTable.css';\nimport { NoData, Table } from 'src/tables/Table';\nimport {\n defaultListingColumnsConfig,\n filterColumnsByFeatures,\n getListingColumnConfigById,\n} from 'src/utils/columns/columnUtils';\nimport { LISTING_MAIN_COLUMNS } from 'src/utils/columns/inventory/inventoryColumnUtils.constants';\nimport { ListingTableColumnId } from 'src/utils/columns/inventory/inventoryColumnUtils.types';\nimport { filterCustomColumnsForListing } from 'src/utils/columns/inventory/inventoryCustomColumnUtils';\nimport { CustomListingColumn } from 'src/utils/columns/inventory/inventoryCustomColumnUtils.types';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { generateShimmeringRows } from 'src/utils/dataTableUtils';\nimport { getListingDetailsModalConfigWithDeepLink } from 'src/utils/inventoryUtils';\nimport { sortGroupedListing } from 'src/utils/tableUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport { hasFeatures } from 'src/utils/userUtils';\nimport { SomethingWentWrong } from 'src/views';\nimport {\n ActionOutboxEntityType,\n Feature,\n GroupType,\n Listing,\n ListingClient,\n ListingDetailDataField,\n ListingGroup,\n ListingStatus,\n SwapListingGroupInput,\n UserSetting,\n} from 'src/WebApiController';\n\nimport { usePaginationSettings } from '../Table/hooks/usePaginationSettings';\nimport { RowWrapper } from '../Table/Table.types';\nimport { ListingPricingForm } from './configs/ListingPriceForm';\nimport {\n customColumnDef,\n getListingTableColumnConfigs,\n tagColumnDef,\n} from './configs/ListingTableColumnsConfig';\nimport * as styles from './ListingTable.css';\nimport { ListingWithEvent } from './ListingTable.types';\n\nexport type ListingTableProps = EventAccordionItemBodyComponentType & {\n getListingNotEligibleForSelection?: (\n listings: Listing[] | null\n ) => { listing: Listing; ineligibleReason: string | undefined }[] | undefined;\n showMainColumnsOnly?: boolean;\n hideUnselectableListings?: boolean;\n showUnselectableListingsOnly?: boolean;\n disablePagination?: boolean;\n compListings?: Listing[];\n getListingTicketClassColor?: (listing: Listing) => string | undefined;\n listingGroupMap?: GroupIdNameMap;\n isSideTable?: boolean;\n alwaysShowCheckbox?: boolean;\n showSelectAllOnHeader?: boolean;\n};\n\nexport const PAGE_SIZE = 10;\n\nexport const ListingTable = ({\n event,\n entities: listings,\n compListings,\n entityCount: listingCount,\n ungroupedListingCount,\n listingGroupCount,\n getDataFail,\n selectedIds,\n selectionMode: defaultSelectionMode,\n onItemSelectionsChanged,\n getListingNotEligibleForSelection,\n hideUnselectableListings,\n showUnselectableListingsOnly,\n showMainColumnsOnly,\n disablePagination,\n onMount,\n onUnmount,\n initState,\n useVirtuoso,\n onVirtuosoTableScroll,\n getListingTicketClassColor,\n tableWithOuterPadding,\n useTableNavKeys = false,\n listingGroupMap,\n isSideTable,\n alwaysShowCheckbox,\n showSelectAllOnHeader,\n enableColumnFilters,\n}: ListingTableProps) => {\n const groupId = event.viagVirtualId;\n const { appContext, loginContext, activeAccountWebClientConfig } =\n useAppContext();\n const listingText = useContent(ContentId.Listings);\n const isItemsLoading =\n listingCount > 0 && (listings == null || listings.length == 0);\n const hasSortListingsInGroupFeature = useUserHasFeature(\n Feature.SortListingsInGroup\n );\n const hasSectionalLoadInListingTableFeature = useUserHasFeature(\n Feature.SectionalLoadInListingTable\n );\n\n const hasCleanupWhiteSpaceFeature = useUserHasFeature(\n Feature.CleanupWhiteSpace\n );\n\n // Enable passing in table state as parameters -- we can remount with the last state the user was on\n const { activeSortTableColumn, setActiveSortTableColumn } =\n useActiveSortTableColumnContext();\n const hasTablePinActionColumnFeature = useUserHasFeature(\n Feature.TablePinActionColumn\n );\n const hasReorderListingInGroupFeature = useUserHasFeature(\n Feature.ReorderListingInGroup\n );\n\n const { setActivePosEntity } = useActivePosEntityContext();\n const { setModal } = useContext(ModalContext);\n const {\n selectionMode: selectionModeOverride,\n setGroupItems,\n getSelection,\n getGroupToggleState,\n updateGroupFilteredIds,\n } = useMultiSelectionContext();\n\n const selectionMode = selectionModeOverride ?? defaultSelectionMode;\n\n const listingSelection = getSelection(event.viagVirtualId);\n const soldGroupName = useContent(ContentId.Sold);\n const isGroupSoldListingsEnabled = useUserHasFeature(\n Feature.GroupSoldListings\n );\n\n const [sorting, setSorting] = useState(\n activeSortTableColumn ||\n initState?.sorting || [\n { id: 'actions', desc: false },\n { id: 'seating', desc: false },\n ]\n );\n useClearShiftSelectionOnSortingChange({ sortingState: sorting });\n const { showErrorDialog } = useErrorBoundaryContext();\n const { updateExpandedListItems } = useCatalogDataContext();\n const [expandedState, setExpandedState] = useState(\n initState?.expanded ?? {}\n );\n\n const { isEnabled, isCollapsedView } = useCollapsableViewContext();\n\n // This is to pre-expand all the groups on first-load\n useEffect(() => {\n if (\n Object.keys(expandedState).length === 0 &&\n listings?.some((l) => l.isLtGrp)\n ) {\n setExpandedState(\n listings?.reduce(\n (r, l) => {\n if (l.isLtGrp) {\n r[l.id.toString()] = true;\n (l as ListingGroup).groupItems.forEach((i) => {\n if ((i as ListingGroup).groupType === GroupType.Active) {\n r[i.id.toString()] = true;\n }\n });\n }\n\n return r;\n },\n {} as Record\n ) ?? {}\n );\n }\n }, [expandedState, listings]);\n\n // ListingTable don't always have these context wrappers - remember not to assume these are NOT NULL\n const {\n setDisabledFocusContexts,\n disabledFocusContexts,\n inputPriceFocusContext,\n } = useInputPriceFocusContext();\n\n const currentPage = useMemo(() => {\n return inputPriceFocusContext &&\n inputPriceFocusContext.viagVirtualId === event.viagVirtualId &&\n inputPriceFocusContext.rowIndex < listingCount\n ? inputPriceFocusContext.currentPageIndex\n : -1;\n }, [inputPriceFocusContext, event.viagVirtualId, listingCount]);\n\n const data = useMemo<(ListingWithEvent | null)[]>(() => {\n const listingsWithIneligibleReasons =\n getListingNotEligibleForSelection?.(listings) ??\n listings?.map((l) => {\n sortGroupedListing(l);\n return {\n listing: l,\n ineligibleReason: undefined,\n };\n });\n\n const listingsMapped: ListingWithEvent[] | undefined =\n listingsWithIneligibleReasons?.map((l) => ({\n event,\n listing: l.listing,\n selectionDisabledReason: l.ineligibleReason,\n ticketClassColor: getListingTicketClassColor?.(l.listing),\n isLtGrp: l.listing.isLtGrp,\n ltGroupName:\n listingGroupMap && l.listing.ltGrpId\n ? listingGroupMap[l.listing.ltGrpId]\n : undefined,\n }));\n\n // Add comp listings to the list\n if (compListings != null) {\n // Only add when own listings are done loading\n listingsMapped?.push(\n ...compListings.map((l) => ({\n event,\n listing: l,\n selectionDisabledReason: undefined,\n isCompListing: true,\n ticketClassColor: getListingTicketClassColor?.(l),\n }))\n );\n }\n let result = listingsMapped?.filter((l) =>\n showUnselectableListingsOnly\n ? Boolean(l.selectionDisabledReason)\n : hideUnselectableListings\n ? !l.selectionDisabledReason\n : true\n );\n\n if (isGroupSoldListingsEnabled) {\n const ungroupedSoldListings = result?.filter(\n (listing) =>\n !!listing &&\n !listing.isLtGrp &&\n !listing.listing?.ltGrpId &&\n listing?.listing?.status === ListingStatus.FullySold\n );\n\n if (ungroupedSoldListings?.length) {\n const fakeListingGroup = createFakeListingGroup(\n ungroupedSoldListings,\n soldGroupName\n );\n if (fakeListingGroup) {\n result = result ?? [];\n result = [\n ...result.filter((d) => !ungroupedSoldListings.includes(d)),\n fakeListingGroup,\n ];\n }\n }\n }\n\n return result?.length\n ? result\n : result == null || isItemsLoading\n ? (generateShimmeringRows(\n ungroupedListingCount ?? 1,\n listingGroupCount ?? 0\n ) as (ListingWithEvent | null)[])\n : result;\n }, [\n getListingNotEligibleForSelection,\n listings,\n compListings,\n isGroupSoldListingsEnabled,\n isItemsLoading,\n ungroupedListingCount,\n listingGroupCount,\n event,\n getListingTicketClassColor,\n listingGroupMap,\n showUnselectableListingsOnly,\n hideUnselectableListings,\n soldGroupName,\n ]);\n\n const { pagination, setPagination } = usePaginationSettings(\n data.length,\n currentPage,\n PAGE_SIZE,\n disablePagination,\n initState\n );\n\n useEffect(() => {\n onMount?.();\n });\n\n useEffect(() => {\n /**\n * Intent for `onMount` is use with 'windowing' in order to maintain user state\n * when the component is scrolled back into view.\n * Anything that needs to be persisted in `react-table` state should be added here.\n * Only update on unmount to ensure we aren't doing too many re-renders.\n */\n return () => onUnmount?.({ pagination, sorting });\n }, [pagination, sorting, onUnmount]);\n\n // Clear selections when selection mode changes\n useEffect(() => {\n onItemSelectionsChanged?.([]);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [selectionMode?.mode]);\n\n const rowSelection = useMemo(() => {\n return selectionMode == null\n ? {}\n : data\n ?.filter((d) => !d?.isCompListing)\n .flatMap((d) => [\n d?.listing,\n ...((d?.listing as ListingGroup)?.groupItems ?? []),\n ...((d?.listing as ListingGroup)?.groupItems ?? []).flatMap(\n (lg) => (lg as ListingGroup).groupItems ?? []\n ),\n ])\n ?.reduce>((result, listing) => {\n if (listing?.id) {\n result[listing.id] =\n getGroupToggleState(event.viagVirtualId).isGroupSelected &&\n !listingSelection.items.itemIds.length\n ? true\n : ((listingSelection?.items.itemIds ?? selectedIds)?.includes(\n String(listing?.id)\n ) ?? false);\n }\n return result;\n }, {});\n }, [\n data,\n event.viagVirtualId,\n getGroupToggleState,\n listingSelection.items.itemIds,\n selectedIds,\n selectionMode,\n ]);\n\n const {\n lastSelectedRowRefIndex,\n allowShiftClickSelection,\n isShiftKeyPressed,\n isCtrlOrCmdKeyPressed,\n updateSelectionForRowAndSubRows,\n } = useSingleTableShortcutSelection({ isSideTable });\n\n const onRowSelectionChange = useCallback(\n (updater: Updater) => {\n const newSelections =\n typeof updater === 'function' ? updater(rowSelection) : updater;\n const newSelectedIds = Object.keys(newSelections).filter(\n (r) => newSelections[r] === true\n );\n if (selectionMode?.mode === 'singleItem' && !allowShiftClickSelection) {\n newSelectedIds.forEach((id) => {\n if (rowSelection[id] && newSelections[id]) {\n // if both of these are the same value and is true, we need to set it to false\n newSelections[id] = false;\n }\n });\n }\n setGroupItems(groupId, newSelections);\n onItemSelectionsChanged?.(\n newSelectedIds\n .filter((id) => newSelections[id])\n .map((id) => parseInt(id))\n );\n },\n [\n rowSelection,\n selectionMode?.mode,\n allowShiftClickSelection,\n setGroupItems,\n groupId,\n onItemSelectionsChanged,\n ]\n );\n\n const {\n value: storedInventoryColumnOrderSetting = defaultListingColumnsConfig,\n } = useServerUserSetting({\n id: isSideTable\n ? UserSetting.InventorySideTableColumnOrder\n : UserSetting.InventoryColumnOrder,\n });\n const { value: storedInventoryColumnNumberPrecisions = {} } =\n useServerUserSetting({\n id: isSideTable\n ? UserSetting.InventorySideTableColumnNumberPrecision\n : UserSetting.InventoryColumnNumberPrecision,\n });\n\n const { value: storedInventoryColumnsEnabledSetting } = useServerUserSetting<\n string[]\n >({\n id: isSideTable\n ? UserSetting.InventorySideTableColumnsEnabled\n : UserSetting.InventoryColumnsEnabled,\n });\n\n const { value: customListingColumns = [] } = useServerUserSetting<\n CustomListingColumn[]\n >({\n id: UserSetting.InventoryCustomColumns,\n });\n const { tagsMetadata, tagsMetadataNumeric } = useTagsForEntityType(\n ActionOutboxEntityType.Listing,\n true\n );\n\n const customListingColumnsFiltered = filterCustomColumnsForListing(\n customListingColumns,\n tagsMetadataNumeric\n );\n\n const hasGroup = useMemo(\n () => listings?.find((l) => l.isLtGrp) != null,\n [listings]\n );\n\n const allColumnConfigs = useMemo(\n () =>\n getListingTableColumnConfigs(\n hasSortListingsInGroupFeature,\n hasGroup,\n hasSectionalLoadInListingTableFeature,\n hasCleanupWhiteSpaceFeature\n ),\n [\n hasGroup,\n hasSectionalLoadInListingTableFeature,\n hasSortListingsInGroupFeature,\n hasCleanupWhiteSpaceFeature,\n ]\n );\n\n const showCheckbox = useMemo(\n () =>\n alwaysShowCheckbox ||\n selectionMode?.mode === MultiSelectScope.AllGroups ||\n listingSelection.isSingleGroupMultiSelect,\n [\n alwaysShowCheckbox,\n listingSelection.isSingleGroupMultiSelect,\n selectionMode?.mode,\n ]\n );\n\n const displayedColumnsConfig = useMemo(() => {\n if (showMainColumnsOnly) {\n return LISTING_MAIN_COLUMNS.filter((c) => {\n if (c === ListingTableColumnId.Checkbox) {\n return showCheckbox;\n }\n // Only show Seating Row and Seats if Seating is set to Section Only\n if (\n c === ListingTableColumnId.SeatingRow ||\n c === ListingTableColumnId.SeatingSeats\n ) {\n return (\n storedInventoryColumnNumberPrecisions[\n ListingTableColumnId.Seating\n ] === FormatOption.Seating_SectionOnly\n );\n }\n return true;\n }).reduce[]>((acc, columnId) => {\n const columnConfig = Object.values(allColumnConfigs).find(\n (column) => column.id === columnId\n );\n if (columnConfig) {\n acc.push(columnConfig as ColumnDef);\n }\n return acc;\n }, []);\n }\n\n const inventoryColumnOrder = storedInventoryColumnOrderSetting.filter(\n // If storedInventoryColumnsEnabledSetting has never been set, default to true\n (c) => storedInventoryColumnsEnabledSetting?.includes(c) ?? true\n );\n\n const columns = new Set([\n // Add unconfigurable columns first\n ...Object.values(allColumnConfigs)\n .filter((column) => {\n const columnDef = getListingColumnConfigById(\n column.id as ListingTableColumnId\n ).personalization;\n\n const hasFeatureForColumn =\n columnDef.requiredFeatures.length === 0 ||\n hasFeatures(\n loginContext?.user,\n appContext?.features,\n columnDef.requiredFeatures\n );\n\n let isConfigurable = columnDef.isConfigurable;\n if (\n !hasTablePinActionColumnFeature &&\n column.id === ListingTableColumnId.Actions\n ) {\n isConfigurable = true;\n }\n\n return !isConfigurable && hasFeatureForColumn;\n })\n .map((item) => item.id as ListingTableColumnId),\n // Add user defined columns next\n ...filterColumnsByFeatures(\n inventoryColumnOrder,\n SectionType.Listings,\n customListingColumnsFiltered,\n loginContext?.user,\n appContext?.features,\n tagsMetadata ?? []\n ),\n ]);\n\n if (showCheckbox) {\n if (!alwaysShowCheckbox) {\n columns.delete(ListingTableColumnId.Actions);\n }\n } else {\n columns.delete(ListingTableColumnId.Checkbox);\n }\n\n return Array.from(columns).reduce[]>(\n (acc, columnId) => {\n if (tagsMetadata?.find((t) => t.key === columnId)) {\n acc.push(tagColumnDef(columnId));\n } else if (\n customListingColumnsFiltered.find((c) => c.id === columnId)\n ) {\n acc.push(\n customColumnDef(\n columnId,\n customListingColumnsFiltered.find((c) => c.id === columnId)\n ?.formula\n )\n );\n } else {\n const columnConfig = Object.values(allColumnConfigs).find(\n (column) => column.id === columnId\n );\n if (columnConfig) {\n acc.push(columnConfig as ColumnDef);\n }\n }\n\n return acc;\n },\n []\n );\n }, [\n showMainColumnsOnly,\n storedInventoryColumnOrderSetting,\n allColumnConfigs,\n customListingColumnsFiltered,\n loginContext?.user,\n appContext?.features,\n tagsMetadata,\n showCheckbox,\n storedInventoryColumnNumberPrecisions,\n storedInventoryColumnsEnabledSetting,\n hasTablePinActionColumnFeature,\n alwaysShowCheckbox,\n ]);\n\n const onRowShiftSelect = useCallback(\n (\n tableRows: Row[] | undefined,\n row: Row,\n index: number\n ) => {\n if (!tableRows || !allowShiftClickSelection || showCheckbox) {\n return;\n }\n\n const rowId = row.id.toString();\n const newIsSelected = !rowSelection[rowId];\n\n if (isShiftKeyPressed && lastSelectedRowRefIndex.current !== null) {\n const start = Math.min(lastSelectedRowRefIndex.current, index);\n const end = Math.max(lastSelectedRowRefIndex.current, index);\n\n const newRowSelection = { ...rowSelection };\n\n for (let i = start; i <= end; i++) {\n const row = tableRows[i];\n if (row) {\n updateSelectionForRowAndSubRows({\n row,\n rowId: row.id.toString(),\n newIsSelected,\n newRowSelection,\n });\n }\n }\n\n lastSelectedRowRefIndex.current = index;\n onRowSelectionChange(newRowSelection);\n } else if (isCtrlOrCmdKeyPressed) {\n const newRowSelection = { ...rowSelection };\n newRowSelection[rowId] = newIsSelected;\n updateSelectionForRowAndSubRows({\n row,\n rowId,\n newIsSelected,\n newRowSelection,\n });\n lastSelectedRowRefIndex.current = index;\n onRowSelectionChange(newRowSelection);\n } else {\n // No modifier key pressed, reset selection\n const newRowSelection = {};\n\n updateSelectionForRowAndSubRows({\n row,\n rowId,\n newIsSelected,\n newRowSelection,\n });\n\n lastSelectedRowRefIndex.current = index;\n onRowSelectionChange(newRowSelection);\n }\n },\n [\n allowShiftClickSelection,\n isCtrlOrCmdKeyPressed,\n isShiftKeyPressed,\n lastSelectedRowRefIndex,\n onRowSelectionChange,\n rowSelection,\n showCheckbox,\n updateSelectionForRowAndSubRows,\n ]\n );\n\n const sectionType = isSideTable\n ? SectionType.InventorySideTable\n : SectionType.Listings;\n\n const seatingColumnSorting = useSortListingTableSeatingColumn(sectionType);\n\n const options: Partial> = useMemo(\n () => ({\n data,\n columns: displayedColumnsConfig,\n state: {\n pagination,\n sorting,\n rowSelection,\n expanded: expandedState,\n columnVisibility: {\n [ListingTableColumnId.TicketClassColor]:\n getListingTicketClassColor != null,\n },\n columnPinning: {\n right: hasTablePinActionColumnFeature\n ? [ListingTableColumnId.Actions]\n : undefined,\n },\n },\n meta: {\n sectionType,\n showSelectAllCheckbox: showSelectAllOnHeader,\n },\n\n getRowId: (originalRow: ListingWithEvent | null, index: number) => {\n return (originalRow?.listing?.id ?? index).toString();\n },\n onPaginationChange: setPagination,\n onSortingChange: (sortingUpdaterFn) => {\n const newSortVal = functionalUpdate(sortingUpdaterFn, sorting);\n setSorting(newSortVal);\n setActiveSortTableColumn(newSortVal);\n },\n onExpandedChange: (newState) => {\n setExpandedState(newState);\n },\n getSubRows: (originalRow) => {\n if (!originalRow?.listing || !originalRow.listing.isLtGrp) {\n return [];\n }\n const listingGroup = originalRow.listing as ListingGroup;\n return (\n [...(listingGroup.groupItems ?? [])]\n .toSorted((a, b) => {\n if (a.isLtGrp && b.isLtGrp) {\n return sortGroupType(\n (a as ListingGroup).groupType,\n (b as ListingGroup).groupType\n );\n } else if (a.isLtGrp || b.isLtGrp) {\n return a.isLtGrp ? -1 : 1; // listing group sort first\n }\n\n return (a.ltGrpPrior ?? -1) - (b.ltGrpPrior ?? -1);\n })\n ?.map(\n (l, i) =>\n ({\n ...originalRow,\n rowIndex: i,\n listing: l,\n isLtGrp: l.isLtGrp,\n }) as ListingWithEvent\n ) ?? []\n );\n },\n getRowCanExpand: (originalRow) => {\n return Boolean(\n originalRow.original?.listing?.isLtGrp &&\n (originalRow.original?.listing as ListingGroup).groupType !==\n GroupType.Invisible\n );\n },\n getExpandedRowModel: (table) => getExpandedRowModel()(table),\n autoResetExpanded: false,\n paginateExpandedRows: false,\n enableRowSelection: (row) => !row.original?.isCompListing,\n enableMultiRowSelection: (row) => !row.original?.isCompListing,\n onRowSelectionChange,\n enableSubRowSelection: (row) => !row.original?.isCompListing,\n sortingFns: { ...seatingColumnSorting },\n }),\n [\n data,\n displayedColumnsConfig,\n pagination,\n sorting,\n rowSelection,\n expandedState,\n getListingTicketClassColor,\n hasTablePinActionColumnFeature,\n sectionType,\n showSelectAllOnHeader,\n setPagination,\n onRowSelectionChange,\n seatingColumnSorting,\n setActiveSortTableColumn,\n ]\n );\n\n const onRowWrapper: RowWrapper = useCallback(\n (rowData, tableRow, rowIndex) => {\n if (rowData?.isCompListing) {\n // If it's comp listing, put into `disabledFocusContexts`\n // We don't want to price on that\n if (\n !disabledFocusContexts?.find(\n (p) =>\n p?.currentPageIndex === pagination.pageIndex &&\n p?.rowIndex === rowIndex &&\n p?.viagVirtualId === event.viagVirtualId\n )\n ) {\n setDisabledFocusContexts((prev: FocusContext[] | undefined) => {\n return [\n ...(prev ?? []),\n {\n viagVirtualId: event.viagVirtualId,\n rowIndex,\n // can be either, we don't use it when checking for focus\n priceField: 'listPrice',\n currentPageIndex: pagination.pageIndex,\n },\n ];\n });\n }\n } else {\n if (\n disabledFocusContexts?.find(\n (p) =>\n p?.currentPageIndex === pagination.pageIndex &&\n p?.rowIndex === rowIndex &&\n p?.viagVirtualId === event.viagVirtualId\n )\n ) {\n setDisabledFocusContexts((prev: FocusContext[] | undefined) => {\n return prev?.filter(\n (p) =>\n p?.currentPageIndex !== pagination.pageIndex ||\n p?.rowIndex !== rowIndex ||\n p?.viagVirtualId !== event.viagVirtualId\n );\n });\n }\n }\n\n return (\n \n );\n },\n [\n disabledFocusContexts,\n event.viagVirtualId,\n pagination.pageIndex,\n setDisabledFocusContexts,\n ]\n );\n\n const [draggingListing, setDraggingListing] = useState();\n\n const listingsToDrop = useMemo((): Listing[] => {\n if (!draggingListing) {\n return [];\n }\n const selectedIds = Object.entries(rowSelection)\n .filter(([_, value]) => value)\n .map(([key, _]) => key)\n .map(Number);\n\n if (!isEmpty(selectedIds)) {\n if (selectedIds.includes(draggingListing.id)) {\n const selectedListings = (listings\n ?.flatMap(flattenListingGroup)\n .filter(({ id, isLtGrp }) => !isLtGrp && selectedIds.includes(id)) ??\n []) as Listing[];\n return selectedListings;\n }\n }\n return [draggingListing];\n }, [draggingListing, listings, rowSelection]);\n\n const onDragListingStart = useCallback(\n (event: DragStartEvent) => {\n const activeListing = listings\n ?.flatMap(flattenListingGroup)\n .find(({ id }) => id === event.active?.data?.current?.listingId);\n if (activeListing) {\n setDraggingListing(activeListing as Listing);\n }\n },\n [listings]\n );\n\n const onDragListingEnd = useCallback(\n async (e: DragEndEvent) => {\n const { over, active } = e;\n const fromListingGroupId = active?.data?.current\n ?.currentListingGroupId as string | null | undefined;\n const toListingGroupId = over?.data?.current?.ltGrpId as\n | string\n | null\n | undefined;\n\n const activeListingId = active?.data?.current?.listingId as\n | number\n | null\n | undefined;\n\n const onDropCompleted = () => {\n const targetListingGroup = listings?.find(\n (l) => l.isLtGrp && l.ltGrpId === toListingGroupId\n );\n if (!targetListingGroup) {\n return;\n }\n const allGroups = (targetListingGroup as ListingGroup).groupItems\n .map((item) => item.id)\n .reduce(\n (res, id) => {\n res[id.toString()] = true;\n return res;\n },\n {} as Record\n );\n setExpandedState((prev) => {\n if (typeof prev === 'boolean') {\n return prev;\n }\n return {\n ...prev,\n ...allGroups,\n [targetListingGroup.id]: true,\n };\n });\n\n if (activeListingId) {\n onRowSelectionChange({\n [activeListingId + '']: true,\n });\n }\n };\n\n // Reorder listing group\n if (\n hasReorderListingInGroupFeature &&\n fromListingGroupId != null &&\n fromListingGroupId === toListingGroupId\n ) {\n const fromPriority = active?.data?.current?.listingGroupPriority as\n | number\n | null\n | undefined;\n const toPriority = over?.data?.current?.listingGroupPriority as\n | number\n | null\n | undefined;\n\n if (\n activeListingId &&\n fromPriority &&\n toPriority &&\n fromPriority != toPriority\n ) {\n setDraggingListing(undefined);\n\n return await tryInvokeApi(\n async () => {\n const updatedListings = await new ListingClient(\n activeAccountWebClientConfig\n ).reorderListingInGroup({\n listingId: activeListingId,\n fromPosition: fromPriority,\n toPosition: toPriority,\n listingGroupId: fromListingGroupId,\n });\n updateExpandedListItems(updatedListings);\n onDropCompleted();\n },\n (error) => {\n showErrorDialog(\n 'ListingGroupClient.reorderListingInGroup',\n error,\n {\n trackErrorData: {\n listingGroupId: fromListingGroupId,\n listingId: activeListingId,\n },\n }\n );\n },\n () => {\n setDraggingListing(undefined);\n }\n );\n }\n }\n\n if (!toListingGroupId) {\n return;\n }\n\n // No point to drop listing to the same group\n const sanitizedListings = listingsToDrop.filter(\n (l) => l.ltGrpId !== toListingGroupId\n );\n\n if (isEmpty(sanitizedListings)) {\n return;\n }\n\n setDraggingListing(undefined);\n\n return await tryInvokeApi(\n async () => {\n const input: SwapListingGroupInput[] = sanitizedListings.map((l) => ({\n listingId: l.id,\n listingGroupId: l.ltGrpId,\n quantity: l.availQty,\n adminHoldExpirationDate: l.adminHoldExpiredOn,\n }));\n const updatedListings = await new ListingClient(\n activeAccountWebClientConfig\n ).batchSwapListingGroup({\n listings: input,\n toListingGroupId,\n });\n updateExpandedListItems(updatedListings);\n onDropCompleted();\n },\n (error) => {\n showErrorDialog('ListingGroupClient.batchSwapListingGroup', error, {\n trackErrorData: {\n toListingGroupId,\n },\n });\n },\n () => {\n setDraggingListing(undefined);\n }\n );\n },\n [\n activeAccountWebClientConfig,\n hasReorderListingInGroupFeature,\n listings,\n listingsToDrop,\n onRowSelectionChange,\n showErrorDialog,\n updateExpandedListItems,\n ]\n );\n\n const onRowSelect = useCallback(\n (row: Row) => {\n const listing = row.original?.listing;\n if (listing) {\n setActivePosEntity(listing.id, listing.idOnMkp, true, [\n ListingDetailDataField.Basic,\n ]);\n setModal(getListingDetailsModalConfigWithDeepLink(listing.id, true));\n }\n },\n [setActivePosEntity, setModal]\n );\n\n const onFilteredRowsChange = useCallback(\n (filteredRows: Row[] | undefined) => {\n const filteredItemIds = filteredRows\n ?.filter((r) => !r.original?.isLtGrp && !r.original?.isCompListing)\n .map((r) => r.original?.listing?.id)\n .filter((lid) => lid != null) as number[] | undefined;\n updateGroupFilteredIds(groupId, filteredItemIds);\n },\n [groupId, updateGroupFilteredIds]\n );\n\n // Apply distance on drag event, which will unblock the onClick event\n // for the elements in the draggable component\n const pointerSensor = useSensor(PointerSensor, {\n activationConstraint: { distance: 5 },\n });\n const sensors = useSensors(pointerSensor);\n\n return getDataFail ? (\n }\n />\n ) : data?.length ? (\n \n \n \n {createPortal(\n \n {!isEmpty(listingsToDrop) ? (\n
    \n \n {listingsToDrop.map((l) => (\n
    \n \n
    \n ))}\n \n
    \n ) : null}\n
    ,\n document.body\n )}\n \n \n ) : (\n // We should never see this - because the events are filtered to only those that has listings\n // So this is to prevent a crash - but this should be looked at\n \n \n \n );\n};\n\nexport default ListingTable;\n","import { createColumnHelper } from '@tanstack/react-table';\nimport { ConnectedEventInfo } from 'src/components/Events/ConnectedEventInfo';\nimport {\n EventDateDisplay,\n VenueNameDisplay,\n} from 'src/components/Events/EventInfo';\nimport {\n COLUMN_DEFAULT_SIZE_XL,\n COLUMN_DEFAULT_SIZE_XXL,\n COLUMN_MAX_SIZE,\n COLUMN_MIN_SIZE,\n} from 'src/contexts/ColumnResizingContext/ColumnResizingContext.types';\nimport { Content } from 'src/contexts/ContentContext';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { useColumnUserSetting } from 'src/hooks/useColumnUserSetting';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport { FormatOption, FormatOptionEntries } from 'src/modals/EditTableColumns';\nimport * as tableStyles from 'src/tables/Table/Table.css';\nimport { TableShimmeringDiv } from 'src/tables/Table/Table.styled';\nimport { ListingTableFlattenedColumnId } from 'src/utils/columns/inventory/inventoryColumnUtils.types';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n compareEventsByDate,\n compareEventsByName,\n} from 'src/utils/eventWithDataUtils';\nimport { applyNumberFormatting } from 'src/utils/numberFormatter';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport { DateTimeRange, UserSetting, Venue } from 'src/WebApiController';\n\nimport {\n ListingWithEvent,\n SHIMMERING_DIV_HEIGHT_LISTING_GROUP,\n SHIMMERING_DIV_HEIGHT_SINGLE_LISTING,\n} from '../ListingTable.types';\n\nconst columnHelper = createColumnHelper();\n\nexport const LISTING_TABLE_FLATTENED_COLUMNS_CONFIG = {\n [ListingTableFlattenedColumnId.Event]: columnHelper.accessor((data) => data, {\n id: ListingTableFlattenedColumnId.Event,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_XXL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original }, table }) {\n const listing = getValue();\n const { value: storedInventoryFlattenedColumnNumberPrecisions = {} } =\n useServerUserSetting({\n id: UserSetting.InventoryFlattenedColumnNumberPrecision,\n });\n\n if (!listing?.listing) {\n return (\n \n );\n }\n\n if (!listing.event) {\n return null;\n }\n\n const customPrecision =\n table.options.meta?.formatOptionOverrides?.[\n ListingTableFlattenedColumnId.Event\n ];\n\n const eventNameOnly = customPrecision\n ? customPrecision === FormatOption.Event_EventName\n : storedInventoryFlattenedColumnNumberPrecisions[\n ListingTableFlattenedColumnId.Event\n ] === FormatOption.Event_EventName;\n\n return (\n \n \n \n );\n },\n sortingFn: compareEventsByName,\n }),\n [ListingTableFlattenedColumnId.Venue]: columnHelper.accessor(\n (data) => data?.venue,\n {\n id: ListingTableFlattenedColumnId.Venue,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_XL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n const venue = getValue();\n if (!original || !original?.listing) {\n return (\n \n );\n }\n return (\n \n \n \n );\n },\n }\n ),\n [ListingTableFlattenedColumnId.Location]: columnHelper.accessor(\n (data) => data?.venue,\n {\n id: ListingTableFlattenedColumnId.Location,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_XL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n const venue = getValue();\n if (!original || !original?.listing) {\n return (\n \n );\n }\n return (\n \n \n \n );\n },\n }\n ),\n [ListingTableFlattenedColumnId.EventDate]: columnHelper.accessor(\n (data) => data?.event?.dates,\n {\n id: ListingTableFlattenedColumnId.EventDate,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_XL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original }, column, table }) {\n const columnId = column.id;\n\n const value = getValue();\n const {\n userDefinedPrecision = FormatOption.DateTime_MonthDD_Time_Day,\n } = useColumnUserSetting(columnId, SectionType.Events);\n\n if (!original || !original?.listing) {\n return (\n \n );\n }\n\n const customPrecision =\n table.options.meta?.formatOptionOverrides?.[\n ListingTableFlattenedColumnId.EventDate\n ];\n\n const date = applyNumberFormatting({\n precision: customPrecision ?? userDefinedPrecision,\n inputNumber: value?.start,\n isDateTime: true,\n }) as string;\n\n return (\n \n {userDefinedPrecision === FormatOption.DateTime_MonthDD_Time ? (\n \n ) : (\n \n {date}\n \n )}\n \n );\n },\n sortingFn: compareEventsByDate,\n }\n ),\n} as const;\n","import {\n ColumnDef,\n ExpandedState,\n functionalUpdate,\n getExpandedRowModel,\n InitialTableState,\n Row,\n RowSelectionState,\n SortingState,\n TableOptions,\n Updater,\n} from '@tanstack/react-table';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport { useActiveSortTableColumnContext } from 'src/contexts/ActiveSortTableColumnContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { useCollapsableViewContext } from 'src/contexts/CollapsableViewContext/CollapsableViewContext';\nimport { ColumnResizingContextProvider } from 'src/contexts/ColumnResizingContext/ColumnResizingContext';\nimport { Content, FormatContent } from 'src/contexts/ContentContext';\nimport { useInputPriceFocusContext } from 'src/contexts/InputPriceFocusContext/InputPriceFocusContext';\nimport {\n MultiSelectScope,\n NO_GROUP_ID,\n SelectionMode,\n useMultiSelectionContext,\n} from 'src/contexts/MultiSelectionContext';\nimport { useClearShiftSelectionOnSortingChange } from 'src/contexts/MultiSelectionContext/useClearShiftSelectionOnSortingChange';\nimport { WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { useSortListingTableSeatingColumn } from 'src/hooks/useSortListingTableSeatingColumn';\nimport { useTagsForEntityType } from 'src/hooks/useTagsForEntityType';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport { FormatOptionEntries } from 'src/modals/EditTableColumns';\nimport { NoData, Table } from 'src/tables/Table';\nimport {\n defaultListingFlattenedColumnsConfig,\n filterColumnsByFeatures,\n getListingColumnConfigById,\n} from 'src/utils/columns/columnUtils';\nimport {\n ListingTableColumnId,\n ListingTableFlattenedColumnId,\n} from 'src/utils/columns/inventory/inventoryColumnUtils.types';\nimport { filterCustomColumnsForListing } from 'src/utils/columns/inventory/inventoryCustomColumnUtils';\nimport { CustomListingColumn } from 'src/utils/columns/inventory/inventoryCustomColumnUtils.types';\nimport { MAX_NUM_OF_ITEMS_FOR_FLATTENED_VIEWS } from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { generateShimmeringRows } from 'src/utils/dataTableUtils';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport { hasFeatures } from 'src/utils/userUtils';\nimport { SomethingWentWrong } from 'src/views';\nimport {\n ActionOutboxEntityType,\n Feature,\n GroupType,\n ListingGroup,\n UserSetting,\n} from 'src/WebApiController';\n\nimport { usePaginationSettings } from '../Table/hooks/usePaginationSettings';\nimport { RowWrapper } from '../Table/Table.types';\nimport { ListingPricingForm } from './configs/ListingPriceForm';\nimport {\n customColumnDef,\n getListingTableColumnConfigs,\n tagColumnDef,\n} from './configs/ListingTableColumnsConfig';\nimport { LISTING_TABLE_FLATTENED_COLUMNS_CONFIG } from './configs/ListingTableFlattenedColumnsConfig';\nimport { ListingWithEvent } from './ListingTable.types';\n\nexport type ListingTableFlattenedProps = {\n listings?: ListingWithEvent[];\n listingCount: number;\n ungroupedListingCount: number;\n listingGroupCount: number;\n failedToRetrieveData: boolean;\n onMount?: () => void;\n onUnmount?: (state: object) => void;\n initState?: InitialTableState;\n selectionMode?: SelectionMode | null;\n selectedIds?: number[];\n onItemSelectionsChanged?: (newSelectedIds: number[]) => void;\n disablePagination?: boolean;\n useVirtuoso?: boolean;\n columnVisibilityOverride?: (\n | ListingTableColumnId\n | ListingTableFlattenedColumnId\n )[];\n formatOptionOverrides?: FormatOptionEntries;\n withOuterPadding?: boolean;\n disableSelection?: boolean;\n alwaysShowCheckbox?: boolean;\n showSelectAllOnHeader?: boolean;\n enableColumnFilters?: boolean;\n ignoreMaxCount?: boolean;\n};\n\nconst PAGE_SIZE = 100;\n\nexport const ListingTableFlattened = ({\n listings,\n listingCount,\n ungroupedListingCount,\n listingGroupCount,\n failedToRetrieveData,\n selectedIds,\n selectionMode: defaultSelectionMode,\n onItemSelectionsChanged,\n disablePagination,\n onMount,\n onUnmount,\n initState,\n useVirtuoso,\n columnVisibilityOverride,\n formatOptionOverrides,\n withOuterPadding = true,\n disableSelection,\n alwaysShowCheckbox,\n showSelectAllOnHeader,\n enableColumnFilters,\n ignoreMaxCount,\n}: ListingTableFlattenedProps) => {\n const { appContext, loginContext } = useAppContext();\n\n const { onScroll } = useCollapsableViewContext();\n\n // Enable passing in table state as parameters -- we can remount with the last state the user was on\n const { activeSortTableColumn, setActiveSortTableColumn } =\n useActiveSortTableColumnContext();\n const {\n selectionMode: selectionModeOverride,\n setGroupItems,\n getSelection,\n getGroupToggleState,\n isAllSelected,\n updateGroupFilteredIds,\n } = useMultiSelectionContext();\n\n const selectionMode = selectionModeOverride ?? defaultSelectionMode;\n\n const listingSelection = getSelection(NO_GROUP_ID);\n const hasTablePinActionColumnFeature = useUserHasFeature(\n Feature.TablePinActionColumn\n );\n const hasSortListingsInGroupFeature = useUserHasFeature(\n Feature.SortListingsInGroup\n );\n const hasSectionalLoadInListingTableFeature = useUserHasFeature(\n Feature.SectionalLoadInListingTable\n );\n\n const [sorting, setSorting] = useState(\n activeSortTableColumn ||\n initState?.sorting || [\n { id: 'actions', desc: false },\n { id: 'seating', desc: false },\n ]\n );\n\n useClearShiftSelectionOnSortingChange({ sortingState: sorting });\n\n const [expandedState, setExpandedState] = useState(\n initState?.expanded ?? {}\n );\n\n // This is to pre-expand all the groups on first-load\n useEffect(() => {\n if (\n Object.keys(expandedState).length === 0 &&\n listings?.some((l) => l.isLtGrp)\n ) {\n setExpandedState(\n listings?.reduce(\n (r, l) => {\n if (l.isLtGrp) {\n r[l.listing!.id.toString()] = true;\n }\n\n return r;\n },\n {} as Record\n ) ?? {}\n );\n }\n }, [expandedState, listings]);\n\n const { inputPriceFocusContext } = useInputPriceFocusContext();\n const { isItemsLoading } = useCatalogDataContext();\n const currentPage = useMemo(() => {\n return inputPriceFocusContext &&\n inputPriceFocusContext.rowIndex < listingCount\n ? inputPriceFocusContext.currentPageIndex\n : -1;\n }, [inputPriceFocusContext, listingCount]);\n\n const { data, hasNoDataLoad } = useMemo(() => {\n const data =\n listings == null || isItemsLoading\n ? (generateShimmeringRows(\n ungroupedListingCount,\n listingGroupCount\n ) as (ListingWithEvent | null)[])\n : listings;\n\n const hasNoDataLoad =\n !ignoreMaxCount && listingCount > MAX_NUM_OF_ITEMS_FOR_FLATTENED_VIEWS;\n return { data, hasNoDataLoad };\n }, [\n listings,\n isItemsLoading,\n ungroupedListingCount,\n listingGroupCount,\n ignoreMaxCount,\n listingCount,\n ]);\n\n const { pagination, setPagination } = usePaginationSettings(\n data.length,\n currentPage,\n PAGE_SIZE,\n disablePagination,\n initState\n );\n\n useEffect(() => {\n onMount?.();\n });\n\n useEffect(() => {\n /**\n * Intent for `onMount` is use with 'windowing' in order to maintain user state\n * when the component is scrolled back into view.\n * Anything that needs to be persisted in `react-table` state should be added here.\n * Only update on unmount to ensure we aren't doing too many re-renders.\n */\n return () => onUnmount?.({ pagination, sorting });\n }, [pagination, sorting, onUnmount]);\n\n const rowSelection = useMemo(() => {\n return data\n ?.flatMap((d) => [\n d?.listing,\n ...((d?.listing as ListingGroup)?.groupItems ?? []),\n ...((d?.listing as ListingGroup)?.groupItems ?? []).flatMap(\n (lg) => (lg as ListingGroup).groupItems ?? []\n ),\n ])\n ?.reduce>((result, listing) => {\n if (listing?.id) {\n result[listing.id] = isAllSelected\n ? true\n : ((getGroupToggleState(NO_GROUP_ID).isGroupSelected ||\n (listingSelection?.items.itemIds ?? selectedIds)?.includes(\n String(listing?.id)\n )) ??\n false);\n }\n return result;\n }, {});\n }, [\n data,\n getGroupToggleState,\n isAllSelected,\n listingSelection?.items.itemIds,\n selectedIds,\n ]);\n\n const onRowSelectionChange = useCallback(\n (updater: Updater) => {\n if (disableSelection) return;\n\n const newSelections =\n typeof updater === 'function' ? updater(rowSelection) : updater;\n const newSelectedIds = Object.keys(newSelections).filter(\n (r) => newSelections[r] === true\n );\n if (selectionMode?.mode === 'singleItem') {\n newSelectedIds.forEach((id) => {\n if (rowSelection[id] && newSelections[id]) {\n // if both of these are the same value and is true, we need to set it to false\n newSelections[id] = false;\n }\n });\n }\n setGroupItems(NO_GROUP_ID, newSelections);\n onItemSelectionsChanged?.(\n newSelectedIds\n .filter((id) => newSelections[id])\n .map((id) => parseInt(id))\n );\n },\n [\n disableSelection,\n rowSelection,\n selectionMode?.mode,\n setGroupItems,\n onItemSelectionsChanged,\n ]\n );\n\n const {\n value:\n storedInventoryFlattenedColumnOrderSetting = defaultListingFlattenedColumnsConfig,\n } = useServerUserSetting({\n id: UserSetting.InventoryFlattenedColumnOrder,\n });\n const { value: storedInventoryColumnsEnabledSetting } = useServerUserSetting<\n string[]\n >({\n id: UserSetting.InventoryFlattenedColumnsEnabled,\n });\n\n const { value: customListingColumns = [] } = useServerUserSetting<\n CustomListingColumn[]\n >({\n id: UserSetting.InventoryCustomColumns,\n });\n const { tagsMetadata, tagsMetadataNumeric } = useTagsForEntityType(\n ActionOutboxEntityType.Listing,\n true\n );\n\n const customListingColumnsFiltered = filterCustomColumnsForListing(\n customListingColumns,\n tagsMetadataNumeric\n );\n\n const showCheckbox = useMemo(\n () =>\n alwaysShowCheckbox ||\n selectionMode?.mode === MultiSelectScope.AllGroups ||\n listingSelection.isSingleGroupMultiSelect,\n [\n alwaysShowCheckbox,\n listingSelection.isSingleGroupMultiSelect,\n selectionMode?.mode,\n ]\n );\n\n const allColumnConfigs = useMemo(\n () =>\n getListingTableColumnConfigs(\n hasSortListingsInGroupFeature,\n false,\n hasSectionalLoadInListingTableFeature\n ),\n [hasSectionalLoadInListingTableFeature, hasSortListingsInGroupFeature]\n );\n\n const seatingColumnSorting = useSortListingTableSeatingColumn(\n SectionType.ListingsFlattened\n );\n\n const displayedColumnsConfig = useMemo(() => {\n const inventoryColumnOrder = columnVisibilityOverride\n ? columnVisibilityOverride\n : storedInventoryFlattenedColumnOrderSetting.filter(\n // If storedInventoryColumnsEnabledSetting has never been set, default to true\n (c) => storedInventoryColumnsEnabledSetting?.includes(c) ?? true\n );\n\n if (\n !columnVisibilityOverride &&\n !hasTablePinActionColumnFeature &&\n !inventoryColumnOrder.includes(ListingTableColumnId.Actions)\n ) {\n inventoryColumnOrder.push(ListingTableColumnId.Actions);\n }\n\n const listingTableColumnConfigs = Object.values(allColumnConfigs);\n const listingTableFlattenedColumnConfigs = Object.values(\n LISTING_TABLE_FLATTENED_COLUMNS_CONFIG\n );\n\n const columns = new Set(\n columnVisibilityOverride\n ? columnVisibilityOverride\n .map(\n (cid) =>\n listingTableColumnConfigs.find((c) => c.id === cid) ??\n listingTableFlattenedColumnConfigs.find((c) => c.id === cid)!\n )\n\n .map((item) => item.id!)\n : [\n // Add unconfigurable columns first\n ...listingTableFlattenedColumnConfigs\n .filter((column) => {\n const columnDef = getListingColumnConfigById(\n column.id as ListingTableFlattenedColumnId\n ).personalization;\n const hasFeatureForColumn =\n columnDef.requiredFeatures.length === 0 ||\n hasFeatures(\n loginContext?.user,\n appContext?.features,\n columnDef.requiredFeatures\n );\n\n return !columnDef.isConfigurable && hasFeatureForColumn;\n })\n .map((item) => item.id!),\n ...listingTableColumnConfigs\n .filter((column) => {\n const columnDef = getListingColumnConfigById(\n column.id as ListingTableColumnId\n ).personalization;\n const hasFeatureForColumn =\n columnDef.requiredFeatures.length === 0 ||\n hasFeatures(\n loginContext?.user,\n appContext?.features,\n columnDef.requiredFeatures\n );\n\n let isConfigurable = columnDef.isConfigurable;\n if (\n !hasTablePinActionColumnFeature &&\n column.id === ListingTableColumnId.Actions\n ) {\n isConfigurable = true;\n }\n\n return !isConfigurable && hasFeatureForColumn;\n })\n .map((item) => item.id!),\n // Add user defined columns next\n ...filterColumnsByFeatures(\n inventoryColumnOrder,\n SectionType.ListingsFlattened,\n customListingColumnsFiltered,\n loginContext?.user,\n appContext?.features,\n tagsMetadata ?? []\n ),\n ]\n );\n\n if (!columnVisibilityOverride) {\n if (showCheckbox) {\n if (!alwaysShowCheckbox) {\n columns.delete(ListingTableColumnId.Actions);\n }\n } else {\n columns.delete(ListingTableColumnId.Checkbox);\n }\n }\n\n return Array.from(columns).reduce[]>(\n (acc, columnId) => {\n if (\n !columnVisibilityOverride &&\n tagsMetadata?.find((t) => t.key === columnId)\n ) {\n acc.push(tagColumnDef(columnId));\n } else if (\n !columnVisibilityOverride &&\n customListingColumnsFiltered.find((c) => c.id === columnId)\n ) {\n acc.push(\n customColumnDef(\n columnId,\n customListingColumnsFiltered.find((c) => c.id === columnId)\n ?.formula\n )\n );\n } else {\n const columnConfig1 = listingTableColumnConfigs.find(\n (column) => column.id === columnId\n );\n if (columnConfig1) {\n acc.push(columnConfig1 as ColumnDef);\n }\n const columnConfig2 = listingTableFlattenedColumnConfigs.find(\n (column) => column.id === columnId\n );\n if (columnConfig2) {\n acc.push(columnConfig2 as ColumnDef);\n }\n }\n\n return acc;\n },\n []\n );\n }, [\n columnVisibilityOverride,\n storedInventoryFlattenedColumnOrderSetting,\n hasTablePinActionColumnFeature,\n allColumnConfigs,\n customListingColumnsFiltered,\n loginContext?.user,\n appContext?.features,\n tagsMetadata,\n storedInventoryColumnsEnabledSetting,\n showCheckbox,\n alwaysShowCheckbox,\n ]);\n\n const options: Partial> = useMemo(\n () => ({\n data,\n columns: displayedColumnsConfig,\n state: {\n pagination,\n sorting,\n rowSelection,\n expanded: expandedState,\n columnVisibility: {\n [ListingTableColumnId.TicketClassColor]: false,\n },\n columnPinning: {\n right: hasTablePinActionColumnFeature\n ? [ListingTableColumnId.Actions]\n : undefined,\n },\n },\n meta: {\n sectionType: SectionType.ListingsFlattened,\n formatOptionOverrides,\n showSelectAllCheckbox: showSelectAllOnHeader,\n },\n getRowId: (originalRow: ListingWithEvent | null, index: number) => {\n return (originalRow?.listing?.id ?? index).toString();\n },\n onPaginationChange: setPagination,\n onSortingChange: (sortingUpdaterFn) => {\n const newSortVal = functionalUpdate(sortingUpdaterFn, sorting);\n setSorting(newSortVal);\n setActiveSortTableColumn(newSortVal);\n },\n onExpandedChange: setExpandedState,\n getSubRows: (originalRow) => {\n if (!originalRow?.listing || !originalRow.listing.isLtGrp) {\n return [];\n }\n\n const listingGroup = originalRow.listing as ListingGroup;\n const result =\n [...(listingGroup.groupItems ?? [])]\n .toSorted((a, b) => {\n if (a.availQty <= 0 && b.availQty >= 0) {\n return 1;\n } else if (a.availQty >= 0 && b.availQty <= 0) {\n return -1;\n }\n return (a.ltGrpPrior ?? -1) - (b.ltGrpPrior ?? -1);\n })\n ?.map(\n (l, i) =>\n ({\n ...originalRow,\n rowIndex: i,\n listing: l,\n }) as ListingWithEvent\n ) ?? [];\n\n return result;\n },\n getRowCanExpand: (originalRow) => {\n return Boolean(\n originalRow.original?.listing?.isLtGrp &&\n (originalRow.original?.listing as ListingGroup).groupType !==\n GroupType.Invisible\n );\n },\n getExpandedRowModel: (table) => getExpandedRowModel()(table),\n paginateExpandedRows: false,\n enableRowSelection: showCheckbox,\n enableMultiRowSelection: showCheckbox,\n onRowSelectionChange,\n enableSubRowSelection: showCheckbox,\n sortingFns: { ...seatingColumnSorting },\n }),\n [\n data,\n displayedColumnsConfig,\n pagination,\n sorting,\n rowSelection,\n expandedState,\n hasTablePinActionColumnFeature,\n formatOptionOverrides,\n showSelectAllOnHeader,\n setPagination,\n showCheckbox,\n onRowSelectionChange,\n seatingColumnSorting,\n setActiveSortTableColumn,\n ]\n );\n\n const onRowWrapper: RowWrapper = useCallback(\n (rowData, tableRow, rowIndex) => {\n return (\n \n );\n },\n [pagination.pageIndex]\n );\n\n const onFilteredRowsChange = useCallback(\n (filteredRows: Row[] | undefined) => {\n const filteredItemIds = filteredRows\n ?.filter((r) => !r.original?.isLtGrp && !r.original?.isCompListing)\n .map((r) => r.original?.listing?.id)\n .filter((lid) => lid != null) as number[] | undefined;\n updateGroupFilteredIds(NO_GROUP_ID, filteredItemIds);\n },\n [updateGroupFilteredIds]\n );\n\n return failedToRetrieveData ? (\n }\n />\n ) : hasNoDataLoad ? (\n \n \n }\n />\n \n ) : data?.length > 0 ? (\n \n \n \n ) : null;\n};\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport const TileWrapper = styled.div`\n width: 100%;\n padding: ${() => `${vars.spacing.m} ${vars.spacing.m}`};\n background: ${({ theme }) => theme.colors.backgroundPrimary};\n border-radius: ${() => vars.spacing.sm};\n margin-bottom: ${() => vars.spacing.xxs};\n border: 1px solid ${(props) => props.theme.colors.borderPrimary};\n\n &:hover {\n background-color: ${(props) => props.theme.colors.backgroundBrandLight};\n }\n`;\n\nexport const TileWrapperIndented = styled.div`\n width: 100%;\n padding: ${() => `${vars.spacing.m} ${vars.spacing.m}`};\n background: ${({ theme }) => theme.colors.backgroundSecondary};\n border-radius: ${() => vars.spacing.sm};\n margin-bottom: ${() => vars.spacing.xxs};\n border: 1px solid ${(props) => props.theme.colors.borderPrimary};\n\n &:hover {\n background-color: ${(props) => props.theme.colors.backgroundBrandLight};\n }\n`;\n\nexport const TileHeader = styled.span`\n font-size: var(--bs-body-font-size);\n ${({ theme: { typography } }) => typography.getStyles('caption1', 'regular')}\n color: ${({ theme: { colors } }) => colors.textPrimary};\n display: flex;\n align-items: center;\n padding-bottom: ${() => vars.spacing.m};\n`;\n\nexport const TileLeftLayout = styled.div`\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n width: 100%;\n gap: 4px;\n`;\n\nexport const TileRightLayout = styled.div<{ columns?: number }>`\n display: grid;\n grid-template-columns:\n repeat(${(props) => (props.columns ?? 2) - 1}, max-content)\n auto;\n gap: 4px;\n align-items: center;\n`;\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport const ListingTilesContainer = styled.div``;\nexport const UnHideIconContainer = styled.span`\n display: flex;\n ${({ theme: { typography } }) => typography.getStyles('body1', 'medium')}\n`;\n\nexport const Divider = styled.div`\n border-bottom: 1px solid ${(props) => props.theme.colors.borderPrimary};\n`;\n\nexport const CheckboxContainer = styled.div`\n label {\n margin-bottom: 0;\n }\n`;\n\nexport const DetailLabel = styled.span<{ textAlign?: TextAlign }>`\n ${({ theme: { typography } }) => typography.getStyles('caption1', 'regular')}\n color: ${({ theme: { colors } }) => colors.textPrimary};\n text-align: ${(props) =>\n props.textAlign ? props.textAlign.toString() : 'left'};\n`;\n\nexport const GroupCountBadge = styled.div`\n width: ${() => vars.spacing.xl};\n height: ${() => vars.spacing.xl};\n background-color: ${(props) => props.theme.colors.backgroundBrandActive};\n border-radius: 12px;\n color: ${(props) => props.theme.colors.textInverted};\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n`;\n\nexport const DetailValue = styled.span<{ textAlign?: TextAlign }>`\n ${({ theme: { typography } }) => typography.getStyles('caption1', 'regular')}\n text-align: ${(props) =>\n props.textAlign ? props.textAlign.toString() : 'left'};\n padding-right: ${() => vars.spacing.xxs};\n`;\n\nexport const DetailUnitCostValue = styled.span`\n ${({ theme: { typography } }) => typography.getStyles('caption1', 'regular')}\n display: flex;\n align-items: center;\n padding-right: ${() => vars.spacing.xxs};\n`;\n\nexport enum TextAlign {\n Left = 'left',\n Center = 'center',\n Right = 'right',\n}\n","import { useCallback, useContext, useMemo, useState } from 'react';\nimport { EventAccordionItemBodyComponentType } from 'src/components/Accordions';\nimport { ListingDisplay } from 'src/components/Listings/ListingDisplay';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ModalContext } from 'src/contexts/ModalContext/ModalContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { PosDropdown, PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { vars } from 'src/core/themes';\nimport { GroupItemIcon } from 'src/svgs/GroupItemIcon';\nimport { IconsFill, MoreIcon } from 'src/svgs/Viagogo';\nimport { ListingGroupActions } from 'src/tables/ListingTable/configs/ListingGroupActions';\nimport { ListingGroupStatusSummary } from 'src/tables/ListingTable/configs/ListingGroupStatusSummary';\nimport { ListingPriceCell } from 'src/tables/ListingTable/configs/ListingPriceCell';\nimport { ListingPricingForm } from 'src/tables/ListingTable/configs/ListingPriceForm';\nimport { SeatInfoContainer } from 'src/tables/Table';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n getListingActionButtons,\n getListingDetailsModalConfigWithDeepLink,\n} from 'src/utils/inventoryUtils';\nimport { getDeliveryTypeIcon } from 'src/utils/ticketTypeUtils';\nimport {\n Event,\n Listing,\n ListingActionType,\n ListingGroup,\n Marketplace,\n} from 'src/WebApiController';\n\nimport {\n TileHeader,\n TileLeftLayout,\n TileRightLayout,\n TileWrapper,\n TileWrapperIndented,\n} from '../Tile/Tile.styled';\nimport * as styles from './ListingTile.css';\nimport {\n CheckboxContainer,\n DetailLabel,\n DetailUnitCostValue,\n DetailValue,\n Divider,\n ListingTilesContainer,\n TextAlign,\n} from './ListingTile.styled';\n\nexport type ListingTilesProps = EventAccordionItemBodyComponentType;\n\nconst ListingTile = ({\n listing,\n event,\n indentLevel,\n}: {\n listing: Listing;\n event: Event;\n indentLevel?: number;\n}) => {\n const icon = getDeliveryTypeIcon(listing.delivType, listing.topPriTktType);\n\n const listingGroup = listing as ListingGroup;\n\n const subListings = useMemo(() => {\n if (!listing.isLtGrp) {\n return [];\n }\n\n return listingGroup.groupItems as Listing[];\n }, [listing.isLtGrp, listingGroup.groupItems]);\n\n const [isExpanded, setIsExpanded] = useState(false);\n const [isInputFocused, setIsInputFocused] = useState(false);\n const { getSelection, setGroupItems } = useMultiSelectionContext();\n const listingSelection = getSelection(event.viagVirtualId);\n\n const { setActivePosEntity, isLoading } =\n useActivePosEntityContext();\n const { setModal } = useContext(ModalContext);\n\n const toggleListingSelection = useCallback(() => {\n const listingIdsToggled = [\n listing,\n ...(listingGroup.groupItems ?? []),\n ...(listingGroup.groupItems ?? []).flatMap(\n (lg) => (lg as ListingGroup).groupItems ?? []\n ),\n ].map((l) => l.id);\n\n const selectedListingIds = listingSelection.items.itemIds;\n\n // Current intended behavior: Either select all ids in listingGroup or none\n if (\n selectedListingIds.some((selected) =>\n listingIdsToggled.includes(parseInt(selected))\n )\n ) {\n // Deselect\n setGroupItems(\n event.viagVirtualId,\n selectedListingIds\n .map((id) => parseInt(id))\n .filter((id) => !listingIdsToggled.includes(id))\n .reduce(\n (r, l) => {\n r[l] = true;\n return r;\n },\n {} as Record\n )\n );\n } else {\n // Add select\n selectedListingIds.push(...listingIdsToggled.map((lId) => String(lId)));\n setGroupItems(\n event.viagVirtualId,\n selectedListingIds\n .map((id) => parseInt(id))\n .reduce(\n (r, listingId) => {\n r[listingId] = true;\n return r;\n },\n {} as Record\n )\n );\n }\n }, [\n event.viagVirtualId,\n listing,\n listingGroup.groupItems,\n listingSelection.items.itemIds,\n setGroupItems,\n ]);\n\n const isSelected = useMemo(() => {\n return listingSelection.items.itemIds.includes(String(listing.id));\n }, [listingSelection.items.itemIds, listing.id]);\n\n const onViewClick = useCallback(async () => {\n if (listingSelection.isSingleGroupMultiSelect) {\n toggleListingSelection();\n return;\n }\n if (isInputFocused) {\n setIsInputFocused(false);\n return;\n }\n\n if (!listing.isLtGrp) {\n // Only allow click when not a listing group\n setActivePosEntity(listing.id, listing.idOnMkp, true);\n setModal(getListingDetailsModalConfigWithDeepLink(listing.id, true));\n } else {\n setIsExpanded((prev) => !prev);\n }\n }, [\n listingSelection.isSingleGroupMultiSelect,\n isInputFocused,\n listing.isLtGrp,\n listing.id,\n listing.idOnMkp,\n toggleListingSelection,\n setActivePosEntity,\n setModal,\n ]);\n\n const broadcastActions = getListingActionButtons(\n true /* for table */,\n listing,\n listing.actions?.filter((a) =>\n [\n ListingActionType.Broadcast,\n ListingActionType.Unbroadcast,\n ListingActionType.FullySoldNoAction,\n ].includes(a)\n ) ?? [],\n event,\n 'text',\n true,\n undefined,\n isLoading\n );\n const otherActions =\n getListingActionButtons(\n true /* for table */,\n listing,\n listing.actions?.filter((a) =>\n [\n ListingActionType.PredeliverExternalIds,\n ListingActionType.PredeliverTicketUrls,\n ListingActionType.PredeliverBarcodes,\n ListingActionType.PredeliverETickets,\n ListingActionType.Split,\n ].includes(a)\n ) ?? [],\n event,\n 'text',\n false,\n undefined,\n isLoading\n ) ?? [];\n\n const onFocus = useCallback(() => {\n setIsInputFocused(true);\n }, [setIsInputFocused]);\n\n const sellerFee = listing.mkpListings?.find(\n (m) => m.mkp === Marketplace.StubHub\n )?.sellerFee;\n\n const TileWrapperDiv = indentLevel ? TileWrapperIndented : TileWrapper;\n\n return (\n <>\n \n \n \n
    \n {listingSelection.isSingleGroupMultiSelect && (\n {\n /* Prevent onViewClick from being called twice and interfering with selection */\n e.preventDefault();\n }}\n >\n {\n /* do nothing - as we already have the row listing to on-click */\n }}\n />\n \n )}\n {!listing.isLtGrp ? (\n icon\n ) : (\n \n )}\n \n \n \n
    \n
    \n \n {!listingSelection.isSingleGroupMultiSelect && (\n <>{broadcastActions}\n )}\n {!listingSelection.isSingleGroupMultiSelect && (\n \n {otherActions.length > 0 ? (\n \n }\n align=\"end\"\n >\n {otherActions.map((a, i) => (\n {a}\n ))}\n \n ) : listing.isLtGrp ? (\n \n ) : null}\n \n )}\n \n
    \n \n
    \n \n \n \n \n {!listing.isLtGrp && }\n \n \n {!listing.isLtGrp && }\n \n \n {listing.unitCst?.disp ?? listing.faceValue?.disp ?? (\n \n )}\n \n \n {!listing.isLtGrp && (\n \n )}\n \n \n {!listing.isLtGrp ? (\n \n ) : (\n \n )}\n \n
    \n \n {isExpanded &&\n subListings.map((subListing) => (\n \n ))}\n \n );\n};\n\nexport const ListingTiles = ({ entities, event }: ListingTilesProps) => {\n return entities ? (\n \n {entities.map((listing) => {\n const tile = (\n \n );\n return (\n \n );\n })}\n \n ) : (\n \n );\n};\n","import {\n EventAccordionItemBodyComponentType,\n MinRowsForUsingVirtuoso,\n} from 'src/components/Accordions';\nimport { useCollapsableViewContext } from 'src/contexts/CollapsableViewContext/CollapsableViewContext';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { ListingTable } from 'src/tables/ListingTable';\nimport { ListingTiles } from 'src/tiles/ListingTiles';\nimport { Listing } from 'src/WebApiController';\n\ntype InventoryEventsBodyProps = EventAccordionItemBodyComponentType;\n\nexport const InventoryEventsBody = (props: InventoryEventsBodyProps) => {\n const isMobile = useMatchMedia('mobile');\n const Body = isMobile ? ListingTiles : ListingTable;\n const hasVirtuosoMinRows = props.entityCount > MinRowsForUsingVirtuoso;\n const { isEnabled } = useCollapsableViewContext();\n return (\n \n );\n};\n","import { IconButton } from 'src/components/Buttons';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { CrossIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nexport const MultiSelectCloseButton = () => {\n const { setSelectionMode } = useMultiSelectionContext();\n\n return (\n setSelectionMode(undefined)}\n titleContentId={ContentId.Remove}\n icon={}\n />\n );\n};\n","import clsx from 'clsx';\nimport { ComponentProps, ReactNode, useMemo } from 'react';\nimport {\n MultiSelectAll,\n MultiSelectAllProps,\n} from 'src/components/common/MultiSelect/MultiSelectAll';\nimport * as styles from 'src/components/common/MultiSelect/MultiSelectAll.css';\nimport {\n childrenWrapperMobile,\n groupStyle,\n rootDesktop,\n rootMobile,\n} from 'src/components/common/MultiSelect/MultiSelectAll.css';\nimport { MultiSelectCloseButton } from 'src/components/common/MultiSelect/MultiSelectCloseButton';\nimport { Content } from 'src/contexts/ContentContext';\nimport {\n MultiSelectScope,\n useMultiSelectionContext,\n} from 'src/contexts/MultiSelectionContext';\nimport { Stack } from 'src/core/ui';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { ContentId } from 'src/utils/constants/contentId';\n\ntype MultiSelectContainerProps = {\n children: ReactNode;\n groupId?: string;\n showHideOnSelection?: boolean;\n} & Pick &\n Pick, 'style' | 'className'>;\n\nexport const MultiSelectActionBar = ({\n children,\n groupId,\n flattenedIdsOverride,\n className,\n displayMode,\n showHideOnSelection,\n style,\n}: MultiSelectContainerProps) => {\n const isMobile = useMatchMedia('mobile');\n const { selectionMode, totalItemsSelected } = useMultiSelectionContext();\n\n // IMPORTANT - it is vital that you do not return NULL in this component\n // We always need to render the children (bulk-actions) in there so that the bulk-action dialogs will always be there\n // If we do not render this bar - all the current bulk-edit actions will also be removed from the DOM and disappear before\n // they can be finished.\n const isHidden = useMemo(() => {\n if (showHideOnSelection) {\n return !totalItemsSelected;\n }\n\n let isHidden = false;\n if (!selectionMode) {\n isHidden = true;\n }\n\n if (groupId) {\n const canShowGroup =\n selectionMode?.groupId === groupId &&\n selectionMode?.mode === MultiSelectScope.SingleGroup;\n if (!canShowGroup) {\n isHidden = true;\n }\n } else {\n if (selectionMode?.mode !== MultiSelectScope.AllGroups) {\n isHidden = true;\n }\n }\n\n return isHidden;\n }, [groupId, selectionMode, showHideOnSelection, totalItemsSelected]);\n\n const bulkActionsText = (\n \n \n \n );\n\n if (isHidden) {\n return
    ;\n }\n\n const multiSelectAll = (\n \n );\n\n if (isMobile) {\n return (\n \n \n {bulkActionsText}\n {!showHideOnSelection && }\n \n
    {children}
    \n {multiSelectAll}\n \n );\n }\n\n return (\n \n \n {multiSelectAll}\n \n {bulkActionsText}\n {children}\n {!showHideOnSelection && }\n \n \n
    \n );\n};\n","import { ReactNode } from 'react';\nimport { Stack } from 'src/core/ui';\n\ninterface MultiSelectActionsContainerProps {\n children: ReactNode;\n}\n\nexport const MultiSelectActionsContainer = ({\n children,\n}: MultiSelectActionsContainerProps) => {\n return (\n \n {children}\n \n );\n};\n","import { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\n\ninterface BulkActionsState {\n areBulkActionsEnabled: boolean;\n}\n\nexport const useBulkActionsState = (): BulkActionsState => {\n const { totalItemsSelected } = useMultiSelectionContext();\n\n return {\n areBulkActionsEnabled: totalItemsSelected > 0,\n };\n};\n","import { ComponentProps } from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { Content } from 'src/contexts/ContentContext';\nimport { DatePickerInput, TimePickerInput } from 'src/core/POS/DateSelector';\nimport { PosTextArea } from 'src/core/POS/PosTextArea';\nimport { Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nexport type AddAdminHoldInputProps = ComponentProps & {\n adminHoldExpirationDate: Date | null;\n adminHoldNotes: string | null;\n onAdminHoldExpirationDateChange: (date: Date | null) => void;\n onAdminHoldNotesChange: (notes: string | null) => void;\n disabled?: boolean;\n};\n\nexport function AddAdminHoldInput({\n adminHoldExpirationDate,\n adminHoldNotes,\n onAdminHoldExpirationDateChange,\n onAdminHoldNotesChange,\n disabled,\n}: AddAdminHoldInputProps) {\n return (\n \n \n \n \n {\n const newDate = adminHoldExpirationDate\n ? new Date(adminHoldExpirationDate.getTime())\n : new Date();\n newDate.setFullYear(date.getFullYear());\n newDate.setMonth(date.getMonth());\n newDate.setDate(date.getDate());\n\n const now = new Date();\n if (newDate < now) {\n newDate.setTime(now.getTime());\n }\n\n onAdminHoldExpirationDateChange(newDate);\n }}\n disabled={disabled}\n minDate={new Date()}\n />\n \n \n \n {\n const newDate = adminHoldExpirationDate\n ? new Date(adminHoldExpirationDate.getTime())\n : new Date();\n\n if (t) {\n newDate.setFullYear(t.getFullYear());\n newDate.setMonth(t.getMonth());\n newDate.setDate(t.getDate());\n newDate.setHours(t.getHours());\n newDate.setMinutes(t.getMinutes());\n } else {\n newDate.setHours(0);\n newDate.setMinutes(0);\n }\n\n const now = new Date();\n if (newDate < now) {\n newDate.setTime(now.getTime());\n }\n\n onAdminHoldExpirationDateChange(newDate);\n }}\n disabled={disabled}\n />\n \n \n\n \n {\n onAdminHoldNotesChange(e.target.value);\n }}\n />\n \n );\n}\n","import { HubConnectionState } from '@microsoft/signalr';\nimport { ComponentProps, useCallback, useRef, useState } from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { BulkEditStatus } from 'src/components/common/BulkActions/BulkEditStatus';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport {\n BulkEditStage,\n useBulkEditHubContext,\n} from 'src/contexts/BulkEditHubContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { SelectionMode } from 'src/contexts/MultiSelectionContext/MultiSelectionContext.types';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { AddAdminHoldInput } from 'src/dialogs/AddAdminHoldDialog/AddAdminHoldInput';\nimport { useBulkEditHub } from 'src/hooks/useBulkEditHub';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n ActionOutboxEntityType,\n BulkActionType,\n BulkEditPreviewWithDetails,\n BulkEditProgress,\n BulkEditStep,\n ListingDetails,\n} from 'src/WebApiController';\n\nimport { BulkEditFooter } from '../common/BulkEditFooter';\nimport { BulkEditHeader } from '../common/BulkEditHeader';\nimport * as styles from './BulkAddListingAdminHoldDialog.css';\n\nexport type BulkAddListingAdminHoldDialogProps = ComponentProps<\n typeof RSModal\n> & {\n updateKey: string;\n onOkay: (\n adminHoldExpirationDate: Date | null,\n adminHoldNotes: string | null,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => void;\n onCancel: () => void;\n};\n\nexport function BulkAddListingAdminHoldDialog({\n updateKey,\n onOkay,\n onCancel,\n ...rest\n}: BulkAddListingAdminHoldDialogProps) {\n const [isLoading, setIsLoading] = useState(false);\n const { setActivePosEntity } = useActivePosEntityContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n const { setSelectionMode } = useMultiSelectionContext();\n const { setProgress, setPreview, setMainDialogOpened } =\n useBulkEditHubContext();\n\n const onClose = useCallback(\n async (\n newProgress?: BulkEditProgress,\n closeMainDialogForPopover?: boolean\n ) => {\n if (newProgress?.step === BulkEditStep.Done) {\n setIsRefreshing(true);\n setActivePosEntity(0);\n\n await refreshExpandedListItems();\n setSelectionMode(undefined);\n if (closeMainDialogForPopover) {\n setMainDialogOpened(false);\n } else {\n setProgress(undefined);\n setPreview(undefined);\n }\n setIsRefreshing(false);\n // progress kept to allow the BulkEditStatusPopover to show the result\n }\n onCancel();\n },\n [\n onCancel,\n refreshExpandedListItems,\n setActivePosEntity,\n setMainDialogOpened,\n setPreview,\n setProgress,\n setSelectionMode,\n ]\n );\n\n const onBulkEditDone = useCallback(\n async (doneProgress: BulkEditProgress, finalErrors: string[]) => {\n if (finalErrors.length === 0 && doneProgress.step === BulkEditStep.Done) {\n onClose(doneProgress, true);\n }\n },\n [onClose]\n );\n\n const { bulkEditHub, progress, preview, initJob, stage } = useBulkEditHub(\n ActionOutboxEntityType.Listing,\n BulkActionType.AdminHold,\n updateKey,\n onBulkEditDone\n );\n\n const hasBackgroundBulkEditFeature =\n bulkEditHub?.state === HubConnectionState.Connected;\n\n const [adminHoldExpirationDate, setAdminHoldExpirationDate] =\n useState(null);\n const [adminHoldNotes, setAdminHoldNotes] = useState(null);\n\n const [isRefreshing, setIsRefreshing] = useState(false);\n\n const onSubmitHandler = useCallback(\n (onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n onOkay(null, null, false, onPreviewReceived);\n } else {\n onOkay(\n adminHoldExpirationDate,\n adminHoldNotes,\n hasBackgroundBulkEditFeature,\n undefined,\n preview\n );\n }\n setIsLoading(false);\n },\n [\n onOkay,\n preview,\n hasBackgroundBulkEditFeature,\n adminHoldExpirationDate,\n adminHoldNotes,\n ]\n );\n const submittButtonRef = useRef(null);\n\n return (\n } />\n }\n onOpened={() => {\n setAdminHoldExpirationDate(null);\n setAdminHoldNotes(null);\n initJob();\n }}\n onKeyUp={(e) => {\n if (submittButtonRef.current && e.key === 'Enter') {\n submittButtonRef.current.click();\n }\n }}\n onClick={(e) => {\n // This so that this dialog does not cause event to flow to the EventHeader open/close event\n e.stopPropagation();\n e.preventDefault();\n }}\n onClosed={() => {\n setMainDialogOpened(false);\n if (progress) {\n setSelectionMode(undefined);\n }\n // Call the outside one if there is one\n rest.onClosed?.();\n }}\n footer={\n \n }\n onCancel={isLoading ? undefined : onCancel}\n >\n \n
    \n \n
    \n \n \n );\n}\n","import { useBulkBroadcastActionsPermission } from 'src/components/common/BulkActions/BulkBroadcastActions/useBulkBroadcastActionsPermission';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nexport const LaunchAddHold = ({\n onClick,\n disabled,\n}: {\n onClick: (e: React.MouseEvent) => void;\n disabled?: boolean;\n}) => {\n const { hasSellerAccountAdminPermission } =\n useBulkBroadcastActionsPermission();\n\n if (!hasSellerAccountAdminPermission) {\n return null;\n }\n\n return (\n \n \n \n \n \n );\n};\n","import { useCallback } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { BulkAddListingAdminHoldDialog } from 'src/dialogs/BulkEdits/BulkAddListingAdminHoldDialog';\nimport { SQL_MAX_DATEITME } from 'src/utils/dateTimeUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n BulkEditListingClient,\n BulkEditPreviewWithDetails,\n Event,\n ListingQuery,\n} from 'src/WebApiController';\n\nimport { INVENTORY_BULK_UPDATE_ADMIN_HOLD_UPDATE_KEY } from '../../InventoryActionDropdown.constants';\nimport { LaunchAddHold } from './LaunchAddHold';\n\nexport const useBulkAddHoldAction = (\n filterQueryWithEventIds: ListingQuery,\n\n setIsLoading: (v: boolean) => void,\n isLoading?: boolean,\n event?: Event\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const updateKey = event\n ? `adminHold-event-${event.viagVirtualId}`\n : INVENTORY_BULK_UPDATE_ADMIN_HOLD_UPDATE_KEY;\n const {\n refreshCatalog,\n eventsExpansion: { setListItemExpansion, refreshExpandedListItems },\n } = useCatalogDataContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const {\n openDialog: openBulkAddListingAdminHold,\n closeDialog: closeBulkAddListingAdminHold,\n } = useDialog(\n DialogId.BulkAddListingAdminHold,\n BulkAddListingAdminHoldDialog\n );\n\n const onSubmitAddHold = useCallback(\n async (\n adminHoldExpirationDate: Date | null,\n adminHoldNotes: string | null,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n await tryInvokeApi(\n async () => {\n const preview = await new BulkEditListingClient(\n activeAccountWebClientConfig\n ).bulkUpdateAdminHoldPreview(filterQueryWithEventIds);\n\n onPreviewReceived(preview);\n },\n (error) => {\n showErrorDialog('bulkUpdateAdminHoldPreview', error, {\n trackErrorData: { filterQueryWithEventIds, addHold: true },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n } else {\n await tryInvokeApi(\n async () => {\n const succeeded = await new BulkEditListingClient(\n activeAccountWebClientConfig\n ).bulkUpdateAdminHold(\n preview!.preview,\n (adminHoldExpirationDate ?? SQL_MAX_DATEITME).toISOString(),\n adminHoldNotes,\n updateKey,\n supportBackgroundProcess\n );\n if (!supportBackgroundProcess) {\n if (succeeded) {\n if (!event) {\n await refreshCatalog();\n }\n await refreshExpandedListItems();\n }\n\n closeBulkAddListingAdminHold();\n }\n },\n (error) => {\n showErrorDialog(\n 'BulkEditListingClient.bulkUpdateAdminHold',\n error,\n {\n trackErrorData: {\n adminHoldExpirationDate,\n adminHoldNotes,\n preview,\n addHold: true,\n },\n }\n );\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n }\n },\n [\n setIsLoading,\n activeAccountWebClientConfig,\n filterQueryWithEventIds,\n showErrorDialog,\n updateKey,\n closeBulkAddListingAdminHold,\n event,\n refreshExpandedListItems,\n refreshCatalog,\n ]\n );\n\n return {\n dropDown: (\n {\n e.preventDefault();\n e.stopPropagation();\n if (event) {\n setListItemExpansion(true, [event.viagVirtualId]);\n }\n openBulkAddListingAdminHold({\n event,\n updateKey,\n onOkay: onSubmitAddHold,\n onClosed: () => {\n setIsLoading(false);\n },\n onCancel: closeBulkAddListingAdminHold,\n });\n }}\n disabled={isLoading}\n />\n ),\n };\n};\n","import { MarketplaceLogo } from 'src/components/common/MarketplaceLogo';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { Switch } from 'src/core/interim/Switch';\nimport { vars } from 'src/core/themes';\nimport { SimpleTable } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getListingBroadcastIcon } from 'src/utils/inventoryUtils';\nimport { Event, ListingStatus, Marketplace } from 'src/WebApiController';\n\nimport * as styles from './MarketplaceDisplay.css';\n\nexport const MarketplaceDisplay = ({\n marketplace,\n marketplaceActive,\n isSelected,\n isActive,\n isLoading,\n event,\n isUKEvent,\n isViagogo,\n disabled,\n onListingBroadcastToggle,\n}: {\n marketplace: Marketplace;\n marketplaceActive: boolean;\n isSelected: boolean;\n isActive: boolean;\n isLoading: boolean;\n event?: Event;\n isUKEvent?: boolean;\n isViagogo?: boolean;\n disabled?: boolean;\n onListingBroadcastToggle: (\n isSelected: boolean,\n isBroadcasting: boolean,\n marketplace: Marketplace\n ) => void;\n}) => {\n const alwaysShowAsDelisted =\n isUKEvent && marketplace === Marketplace.StubHub && !isViagogo;\n\n const isChecked = !alwaysShowAsDelisted && isActive && isSelected;\n\n const { iconComponent: ListingBroadcastIcon } = getListingBroadcastIcon(\n alwaysShowAsDelisted || !marketplaceActive\n ? ListingStatus.Delisted // We always show Delisted for StubHub when event is in UK\n : isActive\n ? isLoading\n ? ListingStatus.ListingPending\n : ListingStatus.Listed\n : isLoading\n ? ListingStatus.DelistingPending\n : ListingStatus.Delisted\n );\n\n const listingStatusCell = (\n <>\n {isSelected && }\n \n \n \n \n );\n\n return (\n \n \n \n onListingBroadcastToggle(!isSelected, isChecked, marketplace)\n }\n />\n \n \n \n \n \n {\n onListingBroadcastToggle(isSelected, !isChecked, marketplace);\n }}\n />\n \n \n
    {listingStatusCell}
    \n
    \n \n );\n};\n","import { HubConnectionState } from '@microsoft/signalr';\nimport { isEqual } from 'lodash-es';\nimport {\n ComponentProps,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { BulkEditStatus } from 'src/components/common/BulkActions/BulkEditStatus';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n BulkEditStage,\n useBulkEditHubContext,\n} from 'src/contexts/BulkEditHubContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { useBulkEditHub } from 'src/hooks/useBulkEditHub';\nimport { useGetEventFullInfo } from 'src/hooks/useGetEventFullInfo';\nimport { UK_COUNTRY_CODES } from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getIsInternationalEvent } from 'src/utils/eventWithDataUtils';\nimport { isMarketplaceActive } from 'src/utils/userUtils';\nimport {\n ActionOutboxEntityType,\n BulkActionType,\n BulkEditPreview,\n BulkEditPreviewWithDetails,\n BulkEditProgress,\n BulkEditStep,\n Event,\n ListingDetails,\n Marketplace,\n} from 'src/WebApiController';\n\nimport { BulkEditFooter } from '../common/BulkEditFooter';\nimport { BulkEditHeader } from '../common/BulkEditHeader';\nimport * as styles from './BulkEditBroadcastSettingsDialog.css';\nimport { MarketplaceDisplay } from './MarketplaceDisplay';\n\nexport type MarketplaceBroadcastSelectionMode = 'all' | 'none' | 'default';\n\nexport type BulkEditBroadcastSettingsDialogProps = ComponentProps<\n typeof RSModal\n> & {\n updateKey: string;\n marketplaceBroadcastSelectionMode?: MarketplaceBroadcastSelectionMode;\n onOkay: (\n marketplacesToBroadcast: Marketplace[] | null,\n marketplacesToUnbroadcast: Marketplace[] | null,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreview\n ) => void;\n onCancel: () => void;\n event?: Event;\n};\n\nexport function BulkEditBroadcastSettingsDialog({\n updateKey,\n marketplaceBroadcastSelectionMode = 'default',\n onOkay,\n onCancel,\n event,\n ...rest\n}: BulkEditBroadcastSettingsDialogProps) {\n const { setActivePosEntity } = useActivePosEntityContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n const { setSelectionMode } = useMultiSelectionContext();\n const { setProgress, setPreview, setMainDialogOpened } =\n useBulkEditHubContext();\n const [isLoading, setIsLoading] = useState(false);\n\n const onClose = useCallback(\n async (\n newProgress?: BulkEditProgress,\n closeMainDialogForPopover?: boolean\n ) => {\n if (newProgress?.step === BulkEditStep.Done) {\n setIsRefreshing(true);\n setActivePosEntity(0);\n\n await refreshExpandedListItems();\n setSelectionMode(undefined);\n if (closeMainDialogForPopover) {\n setMainDialogOpened(false);\n } else {\n setProgress(undefined);\n setPreview(undefined);\n }\n setIsRefreshing(false);\n // progress kept to allow the BulkEditStatusPopover to show the result\n }\n onCancel();\n },\n [\n onCancel,\n refreshExpandedListItems,\n setActivePosEntity,\n setMainDialogOpened,\n setPreview,\n setProgress,\n setSelectionMode,\n ]\n );\n\n const onBulkEditDone = useCallback(\n async (doneProgress: BulkEditProgress, finalErrors: string[]) => {\n if (finalErrors.length === 0 && doneProgress.step === BulkEditStep.Done) {\n onClose(doneProgress, true);\n }\n },\n [onClose]\n );\n\n const { bulkEditHub, progress, preview, initJob, stage } = useBulkEditHub(\n ActionOutboxEntityType.Listing,\n BulkActionType.UpdateBroadcastSettings,\n updateKey,\n onBulkEditDone\n );\n\n const hasBackgroundBulkEditFeature =\n bulkEditHub?.state === HubConnectionState.Connected;\n\n const { venue } = useGetEventFullInfo(event);\n\n const isUKEvent = Boolean(\n event != null &&\n venue?.country?.code &&\n UK_COUNTRY_CODES.includes(venue.country.code.toUpperCase())\n );\n const isInternationalEvent = getIsInternationalEvent(venue?.country?.code);\n\n const { loginContext } = useAppContext();\n const marketplaceSettings =\n loginContext?.user?.activeAccount?.marketplaceSettings;\n\n const marketplacesActive = useMemo(() => {\n return (\n marketplaceSettings\n ?.filter((mk) => isMarketplaceActive(mk))\n .filter(\n (mk) =>\n event == null ||\n !isInternationalEvent ||\n mk.mkp === Marketplace.StubHub\n )\n .map((mk) => mk.mkp) ?? []\n );\n }, [event, isInternationalEvent, marketplaceSettings]);\n\n const [marketplacesSelected, setMarketplacesSelected] =\n useState(marketplacesActive);\n\n const [marketplacesToBroadcast, setMarketplacesToBroadcast] = useState<\n Marketplace[]\n >([]);\n const marketplacesToUnbroadcast = useMemo(() => {\n return (\n marketplacesSelected?.filter(\n (mk) => !marketplacesToBroadcast.includes(mk)\n ) ?? []\n );\n }, [marketplacesSelected, marketplacesToBroadcast]);\n\n useEffect(() => {\n if (marketplaceBroadcastSelectionMode === 'all') {\n if (!isEqual(marketplacesToBroadcast, marketplacesActive)) {\n setMarketplacesToBroadcast(marketplacesActive);\n }\n if (!isEqual(marketplacesSelected, marketplacesActive)) {\n setMarketplacesSelected(marketplacesActive);\n }\n }\n if (marketplaceBroadcastSelectionMode === 'none') {\n if (marketplacesToBroadcast.length !== 0) {\n setMarketplacesToBroadcast([]);\n }\n if (!isEqual(marketplacesSelected, marketplacesActive)) {\n setMarketplacesSelected(marketplacesActive);\n }\n }\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [marketplaceBroadcastSelectionMode]);\n\n const onListingBroadcastToggle = useCallback(\n (isSelected: boolean, isBroadcasting: boolean, mk: Marketplace) => {\n if (isSelected) {\n if (!marketplacesSelected.includes(mk)) {\n setMarketplacesSelected((prev) => [...prev, mk]);\n }\n } else {\n setMarketplacesToBroadcast((prev) => prev.filter((m) => m !== mk));\n setMarketplacesSelected((prev) => prev.filter((m) => m !== mk));\n }\n if (isBroadcasting) {\n if (!marketplacesToBroadcast.includes(mk)) {\n setMarketplacesToBroadcast((prev) => [...prev, mk]);\n }\n } else {\n setMarketplacesToBroadcast((prev) => prev.filter((m) => m !== mk));\n }\n },\n [marketplacesSelected, marketplacesToBroadcast]\n );\n\n const [isRefreshing, setIsRefreshing] = useState(false);\n\n const onSubmitHandler = useCallback(\n (onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n onOkay(null, null, false, onPreviewReceived);\n } else {\n onOkay(\n marketplacesToBroadcast,\n marketplacesToUnbroadcast,\n hasBackgroundBulkEditFeature,\n undefined,\n preview!.preview\n );\n }\n setIsLoading(false);\n },\n [\n onOkay,\n marketplacesToBroadcast,\n marketplacesToUnbroadcast,\n preview,\n hasBackgroundBulkEditFeature,\n ]\n );\n const submittButtonRef = useRef(null);\n\n return (\n }\n />\n }\n onOpened={() => {\n initJob();\n }}\n onKeyUp={(e) => {\n if (submittButtonRef.current && e.key === 'Enter') {\n submittButtonRef.current.click();\n }\n }}\n onClick={(e) => {\n // This so that this dialog does not cause event to flow to the EventHeader open/close event\n e.stopPropagation();\n }}\n onClosed={() => {\n setMainDialogOpened(false);\n if (progress) {\n setSelectionMode(undefined);\n }\n // Call the outside one if there is one\n rest.onClosed?.();\n }}\n footer={\n \n }\n onCancel={isLoading ? undefined : onCancel}\n >\n \n
    \n
    \n {marketplaceSettings\n ?.filter(\n (mk) =>\n event == null ||\n !isInternationalEvent ||\n mk.mkp === Marketplace.StubHub\n )\n .map((mk) => {\n const isActive = marketplacesToBroadcast.includes(mk.mkp);\n const isSelected = marketplacesSelected.includes(mk.mkp);\n const loading =\n isLoading ||\n progress?.step === BulkEditStep.Initializing ||\n progress?.step === BulkEditStep.InProgress;\n\n if (mk.mkp === Marketplace.StubHub) {\n return [\n ,\n ,\n ];\n }\n\n // event == null means we are in the \"Bulk edit for all listings\" flow\n return event == null || !isInternationalEvent\n ? [\n ,\n ]\n : [];\n })}\n
    \n
    \n \n \n );\n}\n","import { useCallback } from 'react';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { BulkEditBroadcastSettingsDialog } from 'src/dialogs/BulkEdits/BulkEditBroadcastSettingsDialog';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { lookupEventInCatalog } from 'src/utils/eventWithDataUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n BulkEditListingClient,\n BulkEditPreview,\n BulkEditPreviewWithDetails,\n EventWithData,\n Listing,\n ListingActionType,\n ListingDetails,\n ListingGroup,\n ListingQuery,\n ListingStatus,\n Marketplace,\n} from 'src/WebApiController';\n\nexport const useBulkEditBroadcastSettingsAction = ({\n affectedVisibleListingIds,\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n event,\n}: {\n affectedVisibleListingIds: number[];\n filterQueryWithEventIds: ListingQuery;\n setIsLoading: (v: boolean) => void;\n isLoading?: boolean;\n event: EventWithData['event'];\n}) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const bulkBroadcastListingsKey = `broadcast-event-${event.viagVirtualId}`;\n\n const {\n data,\n updateItemInEvent,\n eventsExpansion: { setListItemExpansion, refreshExpandedListItems },\n } = useCatalogDataContext();\n const { setActivePosEntity } = useActivePosEntityContext();\n\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const {\n openDialog: openBulkEditBroadcastSettingsDialog,\n closeDialog: closeBulkEditBroadcastSettingsDialog,\n } = useDialog(\n DialogId.BulkEditBroadcastSettings,\n BulkEditBroadcastSettingsDialog\n );\n\n const {\n openDialog: openBulkEditUnbroadcastSettingsDialog,\n closeDialog: closeBulkEditUnbroadcastSettingsDialog,\n } = useDialog(\n DialogId.BulkEditBroadcastSettings,\n BulkEditBroadcastSettingsDialog\n );\n\n const onSubmitEditBroadcastSettings = useCallback(\n async (\n marketplacesToBroadcast: Marketplace[] | null,\n marketplacesToUnbroadcast: Marketplace[] | null,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreview\n ) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n await tryInvokeApi(\n async () => {\n const client = new BulkEditListingClient(\n activeAccountWebClientConfig\n );\n\n const preview = await client.bulkBroadcastListingsPreview(\n filterQueryWithEventIds\n );\n\n onPreviewReceived(preview);\n },\n (error) => {\n showErrorDialog('bulkBroadcastListingsPreview', error, {\n trackErrorData: { filterQueryWithEventIds },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n } else if (marketplacesToBroadcast && marketplacesToUnbroadcast) {\n await tryInvokeApi(\n async () => {\n // First check if this event has listings expanded, if so, we want to update their state immediately\n const eventWithData = lookupEventInCatalog(\n data,\n event.viagVirtualId,\n ...event.posIds\n );\n if (eventWithData?.entities?.listings?.length) {\n const affectedListings = eventWithData.entities.listings\n .flatMap((l) => [l, ...((l as ListingGroup)?.groupItems ?? [])])\n .filter((l) => affectedVisibleListingIds.includes(l.id));\n\n if (marketplacesToUnbroadcast.length) {\n affectedListings\n .filter((l) =>\n (l as Listing).actions.includes(\n ListingActionType.Unbroadcast\n )\n )\n .forEach((l) =>\n updateItemInEvent(\n {\n ...(l as Listing),\n status: ListingStatus.DelistingPending,\n },\n ActionOutboxEntityType.Listing\n )\n );\n }\n if (marketplacesToBroadcast.length) {\n affectedListings\n .filter((l) =>\n (l as Listing).actions.includes(ListingActionType.Broadcast)\n )\n .forEach((l) =>\n updateItemInEvent(\n {\n ...(l as Listing),\n status: ListingStatus.ListingPending,\n },\n ActionOutboxEntityType.Listing\n )\n );\n }\n }\n\n const succeeded = await new BulkEditListingClient(\n activeAccountWebClientConfig\n ).bulkBroadcastListings(\n {\n item1: preview!,\n item2: marketplacesToBroadcast,\n item3: marketplacesToUnbroadcast,\n },\n bulkBroadcastListingsKey,\n supportBackgroundProcess\n );\n\n if (!supportBackgroundProcess) {\n // It's ok to close both, cuz only 1 can be opened anyway\n closeBulkEditBroadcastSettingsDialog();\n closeBulkEditUnbroadcastSettingsDialog();\n\n if (succeeded) {\n // Invalidate the activePosEntity, so that when clicking on listingDetails\n // we force re-loading the listing and newest broadcast state can be displayed\n setActivePosEntity(0);\n await refreshExpandedListItems();\n }\n }\n },\n (error) => {\n showErrorDialog('onSubmitEditBroadcastSettings', error, {\n trackErrorData: {\n preview,\n marketplacesToBroadcast,\n marketplacesToUnbroadcast,\n },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n }\n },\n [\n activeAccountWebClientConfig,\n affectedVisibleListingIds,\n bulkBroadcastListingsKey,\n closeBulkEditBroadcastSettingsDialog,\n closeBulkEditUnbroadcastSettingsDialog,\n data,\n event.posIds,\n event.viagVirtualId,\n filterQueryWithEventIds,\n refreshExpandedListItems,\n setActivePosEntity,\n setIsLoading,\n showErrorDialog,\n updateItemInEvent,\n ]\n );\n\n const openBulkEditBroadcastSettingsDialogWithEvent = useCallback(() => {\n openBulkEditBroadcastSettingsDialog({\n event,\n updateKey: bulkBroadcastListingsKey,\n filterQuery: filterQueryWithEventIds,\n marketplaceBroadcastSelectionMode: 'all',\n onOkay: onSubmitEditBroadcastSettings,\n onClosed: () => {\n setIsLoading(false);\n },\n onCancel: closeBulkEditBroadcastSettingsDialog,\n });\n }, [\n bulkBroadcastListingsKey,\n closeBulkEditBroadcastSettingsDialog,\n event,\n filterQueryWithEventIds,\n onSubmitEditBroadcastSettings,\n openBulkEditBroadcastSettingsDialog,\n setIsLoading,\n ]);\n\n const openBulkEditUnbroadcastSettingsDialogWithEvent = useCallback(() => {\n openBulkEditUnbroadcastSettingsDialog({\n event,\n updateKey: bulkBroadcastListingsKey,\n filterQuery: filterQueryWithEventIds,\n marketplaceBroadcastSelectionMode: 'none',\n onOkay: onSubmitEditBroadcastSettings,\n onClosed: () => {\n setIsLoading(false);\n },\n onCancel: closeBulkEditUnbroadcastSettingsDialog,\n });\n }, [\n bulkBroadcastListingsKey,\n closeBulkEditUnbroadcastSettingsDialog,\n event,\n filterQueryWithEventIds,\n onSubmitEditBroadcastSettings,\n openBulkEditUnbroadcastSettingsDialog,\n setIsLoading,\n ]);\n\n const onBroadcastAllClick = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n setListItemExpansion(true, [event.viagVirtualId]);\n openBulkEditBroadcastSettingsDialogWithEvent();\n },\n [\n event.viagVirtualId,\n openBulkEditBroadcastSettingsDialogWithEvent,\n setListItemExpansion,\n ]\n );\n\n const onUnbroadcastAllClick = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n setListItemExpansion(true, [event.viagVirtualId]);\n openBulkEditUnbroadcastSettingsDialogWithEvent();\n },\n [\n event.viagVirtualId,\n openBulkEditUnbroadcastSettingsDialogWithEvent,\n setListItemExpansion,\n ]\n );\n\n return {\n dropDown: (\n <>\n \n \n \n \n \n \n \n ),\n };\n};\n","import { HubConnectionState } from '@microsoft/signalr';\nimport { ComponentProps, useCallback, useRef, useState } from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { BulkEditStatus } from 'src/components/common/BulkActions/BulkEditStatus';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext/ActivePosEntityContext';\nimport {\n BulkEditStage,\n useBulkEditHubContext,\n} from 'src/contexts/BulkEditHubContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { useBulkEditHub } from 'src/hooks/useBulkEditHub';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n ActionOutboxEntityType,\n BulkActionType,\n BulkEditPreviewWithDetails,\n BulkEditProgress,\n BulkEditStep,\n ListingDetails,\n} from 'src/WebApiController';\n\nimport { BulkEditFooter } from '../common/BulkEditFooter';\nimport { BulkEditHeader } from '../common/BulkEditHeader';\n\nexport type BulkRemoveAdminHoldDialogProps = ComponentProps & {\n updateKey: string;\n onOkay: (\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => void;\n onCancel: () => void;\n};\n\nexport const BulkRemoveAdminHoldDialog = ({\n updateKey,\n onCancel,\n onOkay,\n ...rest\n}: BulkRemoveAdminHoldDialogProps) => {\n const { setActivePosEntity } = useActivePosEntityContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n const { setSelectionMode } = useMultiSelectionContext();\n const { setProgress, setPreview, setMainDialogOpened } =\n useBulkEditHubContext();\n const [isLoading, setIsLoading] = useState(false);\n\n const onClose = useCallback(\n async (\n newProgress?: BulkEditProgress,\n closeMainDialogForPopover?: boolean\n ) => {\n if (newProgress?.step === BulkEditStep.Done) {\n setIsRefreshing(true);\n setActivePosEntity(0);\n\n await refreshExpandedListItems();\n setSelectionMode(undefined);\n if (closeMainDialogForPopover) {\n setMainDialogOpened(false);\n } else {\n setProgress(undefined);\n setPreview(undefined);\n }\n setIsRefreshing(false);\n // progress kept to allow the BulkEditStatusPopover to show the result\n }\n onCancel();\n },\n [\n onCancel,\n refreshExpandedListItems,\n setActivePosEntity,\n setMainDialogOpened,\n setPreview,\n setProgress,\n setSelectionMode,\n ]\n );\n\n const onBulkEditDone = useCallback(\n async (doneProgress: BulkEditProgress, finalErrors: string[]) => {\n if (finalErrors.length === 0 && doneProgress.step === BulkEditStep.Done) {\n onClose(doneProgress, true);\n }\n },\n [onClose]\n );\n\n const { bulkEditHub, progress, preview, initJob, stage } = useBulkEditHub(\n ActionOutboxEntityType.Listing,\n BulkActionType.AdminHold,\n updateKey,\n onBulkEditDone\n );\n\n const hasBackgroundBulkEditFeature =\n bulkEditHub?.state === HubConnectionState.Connected;\n\n const [isRefreshing, setIsRefreshing] = useState(false);\n\n const onSubmitHandler = useCallback(\n (onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n onOkay(false, onPreviewReceived);\n } else {\n onOkay(hasBackgroundBulkEditFeature, undefined, preview);\n }\n setIsLoading(false);\n },\n [onOkay, preview, hasBackgroundBulkEditFeature]\n );\n\n const submittButtonRef = useRef(null);\n\n return (\n } />\n }\n onOpened={initJob}\n onKeyUp={(e) => {\n if (submittButtonRef.current && e.key === 'Enter') {\n submittButtonRef.current.click();\n }\n }}\n onClick={(e) => {\n // This so that this dialog does not cause event to flow to the EventHeader open/close event\n e.stopPropagation();\n e.preventDefault();\n }}\n onClosed={() => {\n setMainDialogOpened(false);\n if (progress) {\n setSelectionMode(undefined);\n }\n // Call the outside one if there is one\n rest.onClosed?.();\n }}\n footer={\n \n }\n onCancel={isLoading ? undefined : onCancel}\n {...rest}\n >\n \n \n \n \n );\n};\n","import { useBulkBroadcastActionsPermission } from 'src/components/common/BulkActions/BulkBroadcastActions/useBulkBroadcastActionsPermission';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nexport const LaunchRemoveHold = ({\n onClick,\n disabled,\n}: {\n onClick: (e: React.MouseEvent) => void;\n disabled?: boolean;\n}) => {\n const { hasSellerAccountAdminPermission } =\n useBulkBroadcastActionsPermission();\n\n if (!hasSellerAccountAdminPermission) {\n return null;\n }\n\n return (\n <>\n \n \n \n \n \n \n );\n};\n","import { useCallback } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { BulkRemoveAdminHoldDialog } from 'src/dialogs/BulkEdits/BulkRemoveHoldDialog';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n BulkEditListingClient,\n BulkEditPreviewWithDetails,\n Event,\n ListingQuery,\n} from 'src/WebApiController';\n\nimport { INVENTORY_BULK_UPDATE_ADMIN_HOLD_UPDATE_KEY } from '../../InventoryActionDropdown.constants';\nimport { LaunchRemoveHold } from './LaunchRemoveHold';\n\nexport const useBulkRemoveHoldAction = (\n filterQueryWithEventIds: ListingQuery,\n\n setIsLoading: (v: boolean) => void,\n isLoading?: boolean,\n event?: Event\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const updateKey = event\n ? `adminHold-event-${event.viagVirtualId}`\n : INVENTORY_BULK_UPDATE_ADMIN_HOLD_UPDATE_KEY;\n const {\n refreshCatalog,\n eventsExpansion: { setListItemExpansion, refreshExpandedListItems },\n } = useCatalogDataContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n const { setSelectionMode } = useMultiSelectionContext();\n\n const {\n openDialog: openBulkRemoveHoldDialog,\n closeDialog: closeBulkRemoveHoldDialog,\n } = useDialog(DialogId.BulkRemoveHold, BulkRemoveAdminHoldDialog);\n\n const onSubmit = useCallback(\n async (\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n await tryInvokeApi(\n async () => {\n const preview = await new BulkEditListingClient(\n activeAccountWebClientConfig\n ).bulkUpdateAdminHoldPreview(filterQueryWithEventIds);\n\n onPreviewReceived(preview);\n },\n (error) => {\n showErrorDialog('bulkUpdateAdminHoldPreview', error, {\n trackErrorData: { filterQueryWithEventIds, removeHold: true },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n } else {\n await tryInvokeApi(\n async () => {\n const succeeded = await new BulkEditListingClient(\n activeAccountWebClientConfig\n ).bulkUpdateAdminHold(\n preview!.preview,\n null,\n null,\n updateKey,\n supportBackgroundProcess\n );\n if (!supportBackgroundProcess) {\n if (succeeded) {\n if (!event) {\n await refreshCatalog();\n }\n setSelectionMode();\n await refreshExpandedListItems();\n }\n }\n },\n (error) => {\n showErrorDialog(\n 'BulkEditListingClient.bulkUpdateAdminHold',\n error,\n {\n trackErrorData: { preview, removeHold: true },\n }\n );\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n }\n },\n [\n activeAccountWebClientConfig,\n event,\n filterQueryWithEventIds,\n refreshCatalog,\n refreshExpandedListItems,\n setIsLoading,\n setSelectionMode,\n showErrorDialog,\n updateKey,\n ]\n );\n\n return {\n dropDown: (\n {\n e.preventDefault();\n e.stopPropagation();\n if (event) {\n setListItemExpansion(true, [event.viagVirtualId]);\n }\n openBulkRemoveHoldDialog({\n updateKey,\n onOkay: onSubmit,\n onCancel: closeBulkRemoveHoldDialog,\n onClosed: () => {\n setIsLoading(false);\n },\n });\n }}\n disabled={isLoading}\n />\n ),\n };\n};\n","/* eslint-disable react-hooks/exhaustive-deps */\nimport { HubConnectionState } from '@microsoft/signalr';\nimport { ComponentProps, useCallback, useMemo, useRef, useState } from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { BulkEditStatus } from 'src/components/common/BulkActions/BulkEditStatus';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport {\n BulkEditStage,\n useBulkEditHubContext,\n} from 'src/contexts/BulkEditHubContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { useBulkEditHub } from 'src/hooks/useBulkEditHub';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n ActionOutboxEntityType,\n BulkActionType,\n BulkEditPreviewWithDetails,\n BulkEditProgress,\n BulkEditStep,\n} from 'src/WebApiController';\n\nimport { BulkEditFooter } from '../common/BulkEditFooter';\nimport { BulkEditHeader } from '../common/BulkEditHeader';\n\nexport type BulkUngroupListingsDialogProps = ComponentProps & {\n updateKey: string;\n isLoading?: boolean;\n onOkay: (\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => void;\n onCancel: () => void;\n};\n\nexport const BulkUngroupListingsDialog = ({\n updateKey,\n isLoading,\n onOkay,\n onCancel,\n ...rest\n}: BulkUngroupListingsDialogProps) => {\n const { setActivePosEntity } = useActivePosEntityContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n const { setSelectionMode } = useMultiSelectionContext();\n const { setProgress, setPreview, setMainDialogOpened } =\n useBulkEditHubContext();\n\n const onClose = useCallback(\n async (\n newProgress?: BulkEditProgress,\n closeMainDialogForPopover?: boolean\n ) => {\n if (newProgress?.step === BulkEditStep.Done) {\n setIsRefreshing(true);\n setActivePosEntity(0);\n await refreshExpandedListItems();\n setSelectionMode(undefined);\n if (closeMainDialogForPopover) {\n setMainDialogOpened(false);\n } else {\n setProgress(undefined);\n setPreview(undefined);\n }\n setIsRefreshing(false);\n // progress kept to allow the BulkEditStatusPopover to show the result\n }\n onCancel?.();\n },\n [\n onCancel,\n refreshExpandedListItems,\n setActivePosEntity,\n setMainDialogOpened,\n setPreview,\n setProgress,\n setSelectionMode,\n ]\n );\n\n const onBulkEditDone = useCallback(\n async (doneProgress: BulkEditProgress, finalErrors: string[]) => {\n if (finalErrors.length === 0 && doneProgress.step === BulkEditStep.Done) {\n onClose(doneProgress, true);\n }\n },\n [onClose]\n );\n\n const { bulkEditHub, progress, preview, initJob, stage } = useBulkEditHub(\n ActionOutboxEntityType.Listing,\n BulkActionType.UngroupListings,\n updateKey,\n onBulkEditDone\n );\n\n const hasBackgroundBulkEditFeature = useMemo(\n () => bulkEditHub?.state === HubConnectionState.Connected,\n [bulkEditHub?.state]\n );\n\n const onSubmitHandler = useCallback(\n (onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void) => {\n if (onPreviewReceived) {\n onOkay(false, onPreviewReceived);\n } else {\n onOkay(hasBackgroundBulkEditFeature, undefined, preview);\n }\n },\n [onOkay, preview, hasBackgroundBulkEditFeature]\n );\n\n const [isRefreshing, setIsRefreshing] = useState(false);\n\n const submittButtonRef = useRef(null);\n\n return (\n } />\n }\n onOpened={initJob}\n onKeyUp={(e) => {\n if (submittButtonRef.current && e.key === 'Enter') {\n submittButtonRef.current.click();\n }\n }}\n onClick={(e) => {\n // This so that this dialog does not cause event to flow to the EventHeader open/close event\n e.stopPropagation();\n e.preventDefault();\n }}\n onClosed={() => {\n setMainDialogOpened(false);\n if (progress) {\n setSelectionMode(undefined);\n }\n // Call the outside one if there is one\n rest.onClosed?.();\n }}\n footer={\n \n }\n onCancel={isLoading ? undefined : onCancel}\n >\n \n \n \n \n );\n};\n","import { Content } from 'src/contexts/ContentContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { Stack } from 'src/core/ui';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Permission } from 'src/WebApiController';\n\nexport const LaunchUngroupListings = ({\n onClick,\n disabled,\n}: {\n onClick: (e: React.MouseEvent) => void;\n disabled?: boolean;\n}) => {\n const hasPermission = useUserHasAnyOfPermissions(\n Permission.Inventory_BroadcastUnbroadcast,\n Permission.Inventory_BroadcastUnbroadcastOnIsPricerOf,\n Permission.Inventory_BroadcastUnbroadcastOnPurchasedBy\n );\n\n if (!hasPermission) {\n return null;\n }\n\n return (\n <>\n \n \n \n \n \n \n );\n};\n","import { useCallback } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { BulkUngroupListingsDialog } from 'src/dialogs/BulkEdits/BulkUngroupListingsDialog';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n BulkEditListingClient,\n BulkEditPreviewWithDetails,\n Event,\n ListingQuery,\n} from 'src/WebApiController';\n\nimport { INVENTORY_BULK_UNGROUP_LISTINGS_UPDATE_KEY } from '../../InventoryActionDropdown.constants';\nimport { LaunchUngroupListings } from './LaunchUngroupListings';\n\nexport const useBulkUngroupListings = (\n filterQueryWithEventIds: ListingQuery,\n\n setIsLoading: (v: boolean) => void,\n isLoading?: boolean,\n event?: Event\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const updateKey = event\n ? `inventory-ungroup-listing-event-${event.viagVirtualId}`\n : INVENTORY_BULK_UNGROUP_LISTINGS_UPDATE_KEY;\n\n const {\n eventsExpansion: { setListItemExpansion, refreshExpandedListItems },\n } = useCatalogDataContext();\n\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const {\n openDialog: openBulkUngroupListingsDialog,\n closeDialog: closeBulkUngroupListingsDialog,\n } = useDialog(DialogId.BulkUngroupListings, BulkUngroupListingsDialog);\n\n const onSubmit = useCallback(\n async (\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n await tryInvokeApi(\n async () => {\n const preview = await new BulkEditListingClient(\n activeAccountWebClientConfig\n ).bulkUngroupListingsPreview(filterQueryWithEventIds);\n\n onPreviewReceived(preview);\n },\n (error) => {\n showErrorDialog('bulkUngroupListingsPreview', error, {\n trackErrorData: { filterQueryWithEventIds },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n } else {\n await tryInvokeApi(\n async () => {\n const succeeded = await new BulkEditListingClient(\n activeAccountWebClientConfig\n ).bulkUngroupListings(\n preview!.preview,\n updateKey,\n supportBackgroundProcess\n );\n\n if (!supportBackgroundProcess) {\n if (succeeded) {\n await refreshExpandedListItems();\n }\n\n closeBulkUngroupListingsDialog();\n }\n },\n (error) => {\n showErrorDialog('bulkUngroupListings', error, {\n trackErrorData: {\n preview,\n error,\n },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n }\n },\n [\n activeAccountWebClientConfig,\n closeBulkUngroupListingsDialog,\n filterQueryWithEventIds,\n refreshExpandedListItems,\n setIsLoading,\n showErrorDialog,\n updateKey,\n ]\n );\n\n const onChangeClick = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n if (event) {\n setListItemExpansion(true, [event.viagVirtualId]);\n }\n openBulkUngroupListingsDialog({\n updateKey,\n isLoading,\n onOkay: onSubmit,\n entityType: ActionOutboxEntityType.Listing,\n onClosed: () => {\n setIsLoading(false);\n },\n onCancel: closeBulkUngroupListingsDialog,\n });\n },\n [\n closeBulkUngroupListingsDialog,\n event,\n isLoading,\n onSubmit,\n openBulkUngroupListingsDialog,\n setIsLoading,\n setListItemExpansion,\n updateKey,\n ]\n );\n\n return {\n dropDown: (\n \n ),\n };\n};\n","import { useState } from 'react';\nimport { useBulkBroadcastActionsPermission } from 'src/components/common/BulkActions/BulkBroadcastActions/useBulkBroadcastActionsPermission';\nimport { useBulkActionsState } from 'src/components/common/BulkActions/useBulkActionsState';\nimport { useInventoryEventBulkActionsState } from 'src/components/Events/EventListing/InventoryEventListing/BulkActions/InventoryEventBulkActions/useInventoryEventBulkActionsState';\nimport { useBulkAddHoldAction } from 'src/components/Listings/InventoryActionDropdown/components/BulkAddHoldAction';\nimport { useBulkEditBroadcastSettingsAction } from 'src/components/Listings/InventoryActionDropdown/components/BulkEditBroadcastSettingsAction/useBulkEditBroadcastSettingsAction';\nimport { useBulkRemoveHoldAction } from 'src/components/Listings/InventoryActionDropdown/components/BulkRemoveHoldAction';\nimport { useBulkUngroupListings } from 'src/components/Listings/InventoryActionDropdown/components/LaunchUngroupListingsAction';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosDropdown } from 'src/core/POS/PosDropdown';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { ChevronDownIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { EventWithData } from 'src/WebApiController';\n\nexport interface BroadcastActionsProps {\n event: EventWithData['event'];\n isEventPage: boolean;\n listingCount: number;\n}\n\nexport const BroadcastActions = ({ event }: BroadcastActionsProps) => {\n const { areBulkActionsEnabled } = useBulkActionsState();\n const [isLoading, setIsLoading] = useState(false);\n const { affectedVisibleListingIds, filterQueryWithEventIds } =\n useInventoryEventBulkActionsState(event);\n\n const { hasBroadcastPermission } = useBulkBroadcastActionsPermission();\n\n const bulkAddHold = useBulkAddHoldAction(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n event\n );\n\n const bulkRemoveHold = useBulkRemoveHoldAction(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n event\n );\n\n const bulkUngroupListings = useBulkUngroupListings(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n event\n );\n\n const bulkEditBroadcastSettings = useBulkEditBroadcastSettingsAction({\n affectedVisibleListingIds,\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n event,\n });\n\n return (\n <>\n \n \n \n \n }\n align=\"start\"\n triggerProps={{ disabled: isLoading || !areBulkActionsEnabled }}\n >\n {hasBroadcastPermission && bulkEditBroadcastSettings.dropDown}\n {bulkAddHold.dropDown}\n {bulkRemoveHold.dropDown}\n \n \n );\n};\n","import { ChangeEvent } from 'react';\nimport { useState } from 'react';\nimport { ButtonWithIcon } from 'src/components/Buttons';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { Switch } from 'src/core/interim/Switch';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { Stack } from 'src/core/ui';\nimport { Slider } from 'src/core/ui/Slider';\nimport { ToggleGroup } from 'src/core/ui/ToggleGroup';\nimport { useAvailableAutopricingModes } from 'src/hooks/useAvailableAutopricingModes';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { DetailGroup, DetailSection, SectionContent } from 'src/modals/common';\nimport { ResetIcon } from 'src/svgs/Viagogo';\nimport {\n OUTLIER_MODE_KTH_LOWEST_STRATEGY,\n OutlierModeKthLowestStrategy,\n} from 'src/utils/autoPricingUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { STANDARD_DEVIATIONS_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { roundToPrecision } from 'src/utils/numberFormatter';\nimport { getCompleteEventConfigScoreOverrides } from 'src/utils/seatScoreUtils';\nimport {\n AutoPricingCompListingMode,\n AutoPricingOutlierMode,\n Feature,\n ListingGroup,\n} from 'src/WebApiController';\n\nimport * as styles from './SectionRowIdFilter.css';\nimport { useListingGroupAutoPricingSettings } from './useListingGroupAutoPricingSettings';\n\nexport const BulkEditAdvancePricingSettings = () => {\n const [outlierKthLowestStrategy, setKthLowestOutlierStrategy] = useState<\n OutlierModeKthLowestStrategy | undefined\n >(OutlierModeKthLowestStrategy.Relative);\n\n const {\n onResetAdvanceSettings,\n\n circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerMaxDiscountVelocityTicksInHours,\n circuitBreakerMinCompListingCount,\n\n compListingMode,\n compListingQuantityScoreAdjustmentEnabled,\n compListingExcludeFanInventory,\n\n outlierMode,\n outlierStandardDeviations,\n outlierKthLowestLimit,\n outlierKthLowestLimitAbsoluteSpacing,\n outlierKthLowestLimitRelativeSpacing,\n\n onCompListingChange,\n onCircuitBreakerChange,\n onOutlierChange,\n } = useListingGroupAutoPricingSettings();\n\n const { activeConfigOverride, venueMapInfo } = useEventMapContext();\n const hasExcludeFanInventoryFeature = useUserHasFeature(\n Feature.ExcludeFanInventory\n );\n\n const scores = getCompleteEventConfigScoreOverrides(\n venueMapInfo?.sectionScores,\n activeConfigOverride?.scoreOverrides,\n false\n );\n\n const { outlierModes, outlierModesDisabled } = useAvailableAutopricingModes(\n true,\n null,\n null,\n Boolean(scores?.some((s) => s.score))\n );\n\n return (\n }\n >\n \n <>\n {compListingMode === AutoPricingCompListingMode.QualityScore && (\n \n \n }\n >\n ) => e.stopPropagation()}\n onChange={(e) => {\n const isChecked = e.target.checked;\n if (\n isChecked !== compListingQuantityScoreAdjustmentEnabled\n ) {\n onCompListingChange({\n compListingQuantityScoreAdjustmentEnabledNew: isChecked,\n });\n }\n }}\n />\n \n \n )}\n {hasExcludeFanInventoryFeature && (\n \n }\n >\n ) => e.stopPropagation()}\n onChange={(e) => {\n const isChecked = e.target.checked;\n if (isChecked !== compListingExcludeFanInventory) {\n onCompListingChange({\n compListingExcludeFanInventoryNew: isChecked,\n });\n }\n }}\n />\n \n \n )}\n \n }\n >\n {\n onCircuitBreakerChange(\n undefined,\n undefined,\n undefined,\n undefined,\n Math.round(count)\n );\n }}\n />\n \n \n \n }>\n e.stopPropagation()}\n onChange={(v) => {\n onOutlierChange({\n outlierModeNew: v as AutoPricingOutlierMode,\n });\n }}\n />\n \n \n {outlierMode == AutoPricingOutlierMode.StandardDeviations ? (\n \n }>\n e.stopPropagation()}\n onChange={(v) => {\n const value = parseInt(v ?? '');\n if (value != null && !isNaN(value)) {\n onOutlierChange({\n outlierModeNew:\n AutoPricingOutlierMode.StandardDeviations,\n outlierStandardDeviationsNew: value,\n });\n } else {\n onOutlierChange({\n outlierModeNew:\n AutoPricingOutlierMode.StandardDeviations,\n outlierStandardDeviationsNew: null,\n });\n }\n }}\n />\n \n \n ) : outlierMode == AutoPricingOutlierMode.KthLowest ? (\n \n \n \n {\n const v = parseInt(e.target.value);\n onOutlierChange({\n outlierModeNew: AutoPricingOutlierMode.KthLowest,\n outlierKthLowestLimitNew: v,\n });\n }}\n />\n \n {outlierKthLowestStrategy ==\n OutlierModeKthLowestStrategy.Relative ? (\n {\n let v = parseInt(e.target.value);\n if (v < 0) {\n v = 0;\n } else if (v > 100) {\n v = 100;\n }\n\n if (!isNaN(v)) {\n onOutlierChange({\n outlierModeNew: AutoPricingOutlierMode.KthLowest,\n outlierKthLowestLimitNew: undefined,\n outlierKthLowestLimitAbsoluteSpacingNew: null,\n outlierKthLowestLimitRelativeSpacingNew: v,\n });\n }\n }}\n />\n ) : (\n {\n const v = parseInt(e.target.value);\n onOutlierChange({\n outlierModeNew: AutoPricingOutlierMode.KthLowest,\n outlierKthLowestLimitNew: undefined,\n outlierKthLowestLimitAbsoluteSpacingNew: v,\n outlierKthLowestLimitRelativeSpacingNew: null,\n });\n }}\n />\n )}\n {\n if (!value) {\n return;\n }\n\n const strat = value as OutlierModeKthLowestStrategy;\n setKthLowestOutlierStrategy(strat);\n }}\n />\n \n \n \n ) : null}\n \n \n \n {\n const v = parseFloat(e.target.value) / 100;\n onCircuitBreakerChange(\n undefined,\n undefined,\n v,\n undefined,\n undefined\n );\n }}\n />\n \n {\n const v = parseInt(e.target.value);\n onCircuitBreakerChange(\n undefined,\n undefined,\n undefined,\n v,\n undefined\n );\n }}\n />\n \n \n \n \n }\n textContentId={ContentId.ResetSettings}\n onClick={onResetAdvanceSettings}\n />\n \n \n \n \n );\n};\n","import { ChangeEvent, useMemo } from 'react';\nimport { ButtonWithIcon } from 'src/components/Buttons';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { Switch } from 'src/core/interim/Switch';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosMultiSelect } from 'src/core/POS/PosMultiSelect';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { getTextFieldState, PosTextField } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { PillList } from 'src/core/ui/PillList';\nimport { Slider } from 'src/core/ui/Slider';\nimport { Switch as CoreSwitch } from 'src/core/ui/Switch';\nimport { ToggleGroup } from 'src/core/ui/ToggleGroup';\nimport { SectionSelectDialog } from 'src/dialogs/SectionSelectDialog';\nimport { useAvailableAutopricingModes } from 'src/hooks/useAvailableAutopricingModes';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useCompQuantitiesFilter } from 'src/hooks/useCompQuantitiesFilter';\nimport { useUndercutAmountSettings } from 'src/hooks/useUndercutAmountSettings';\nimport { DetailGroup } from 'src/modals/common';\nimport { RestrictSelectionType } from 'src/modals/ListingDetails/components/PricingSection/AutoPricingSection.types';\nimport { EditIcon, IconsFill, PlusIcon, ResetIcon } from 'src/svgs/Viagogo';\nimport {\n convertSliderValueFromServer,\n convertSliderValueToServer,\n getUndercutPriceRepresentingMode,\n SLIDER_MAX,\n SLIDER_MIN,\n UNDERCUT_PRICE_MODE_OPTIONS,\n UndercutPriceSettingsMode,\n} from 'src/utils/autoPricingUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { roundToPrecision } from 'src/utils/numberFormatter';\nimport { getCompleteEventConfigScoreOverrides } from 'src/utils/seatScoreUtils';\nimport {\n AutoPricingCompListingMode,\n AutoPricingUndercutMode,\n} from 'src/WebApiController';\n\nimport * as styles from './SectionRowIdFilter.css';\nimport { useListingGroupAutoPricingSettings } from './useListingGroupAutoPricingSettings';\n\nexport const BulkEditAutoPricingSettingsSection = ({\n disabled,\n}: {\n disabled?: boolean;\n}) => {\n const sectionSelectDialog = useBasicDialog();\n\n const {\n uiCurrency,\n\n onResetSettings,\n eventPricingSettings,\n accountPricingSettings,\n\n undercutMode,\n undercutAbsoluteAmount,\n undercutRelativeAmount,\n\n compListingMode,\n compListingFloor,\n compListingCeiling,\n compListingSelectedSectionSettings,\n compListingOnlyForSelectedSectionsEnabled,\n compListingOnlyForSameZoneEnabled,\n compListingQuantityScoreAdjustmentOverrideJson,\n\n compListingFloorError,\n compListingSelectedSectionError,\n undercutAbsoluteAmountError,\n undercutRelativeAmountError,\n\n onUndercutChange,\n onCompListingChange,\n\n resetListingAutoPricingSettings,\n setResetListingAutoPricingSettings,\n } = useListingGroupAutoPricingSettings();\n\n const {\n undercutAbsoluteAmountMode,\n setUndercutAbsoluteAmountMode,\n undercutRelativeAmountMode,\n setUndercutRelativeAmountMode,\n } = useUndercutAmountSettings(undercutAbsoluteAmount, undercutRelativeAmount);\n\n const {\n quantitiesFilterOptions,\n quantitiesFilterValue,\n onUpdateQuantitiesFilter,\n } = useCompQuantitiesFilter(\n compListingQuantityScoreAdjustmentOverrideJson,\n onCompListingChange\n );\n\n const { activeConfigOverride, venueMapInfo } = useEventMapContext();\n\n const scores = getCompleteEventConfigScoreOverrides(\n venueMapInfo?.sectionScores,\n activeConfigOverride?.scoreOverrides,\n false\n );\n\n const restrictSelection = Boolean(\n compListingOnlyForSameZoneEnabled ||\n compListingOnlyForSelectedSectionsEnabled\n );\n\n const showCompListingSettingsDetails = !(\n !compListingMode ||\n compListingMode === AutoPricingCompListingMode.SameZone ||\n compListingMode === AutoPricingCompListingMode.SameEvent ||\n compListingMode === AutoPricingCompListingMode.ParentListing\n );\n const showCompListingRestictSelectionDetails =\n compListingMode != null &&\n (compListingMode === AutoPricingCompListingMode.QualityScore ||\n compListingMode === AutoPricingCompListingMode.SameEvent ||\n compListingMode === AutoPricingCompListingMode.SameZone);\n\n const {\n compListingModes,\n compListingModesDisabled,\n undercutModes,\n undercutModesDisabled,\n restrictSelectionTypes,\n } = useAvailableAutopricingModes(\n true,\n undercutMode,\n compListingMode,\n Boolean(scores?.some((s) => s.score)),\n false,\n false,\n compListingOnlyForSelectedSectionsEnabled\n );\n\n const selectedSectionsPills = useMemo(\n () =>\n compListingSelectedSectionSettings?.sectionIdFilter\n ?.map((sectionId) => {\n const section = venueMapInfo?.sections.find(\n (section) => sectionId === section.id\n );\n return {\n value: section?.id.toString() ?? '',\n display: section?.name ?? '',\n };\n })\n .filter((info) => info.value && info.display) ?? [],\n [\n compListingSelectedSectionSettings?.sectionIdFilter,\n venueMapInfo?.sections,\n ]\n );\n\n const isDealScoreMode =\n (undercutMode ??\n eventPricingSettings?.undercutMode ??\n accountPricingSettings?.undercutMode) === AutoPricingUndercutMode.Deal;\n\n return (\n <>\n \n \n
    \n \n
    \n e.stopPropagation()}\n onCheckedChange={(isChecked) => {\n if (isChecked !== resetListingAutoPricingSettings) {\n setResetListingAutoPricingSettings(isChecked);\n }\n }}\n />\n
    \n
    \n \n \n \n \n \n
    \n \n
    \n e.stopPropagation()}\n onChange={(v) => {\n if (v) {\n onCompListingChange({\n compListingModeNew: v as AutoPricingCompListingMode,\n });\n } else {\n onCompListingChange({\n compListingModeNew: null,\n compListingFloorNew: null,\n compListingCeilingNew: null,\n });\n }\n\n if (v === AutoPricingCompListingMode.ParentListing) {\n onUndercutChange(AutoPricingUndercutMode.Simple);\n }\n }}\n />\n
    \n
    \n\n {showCompListingSettingsDetails && (\n <>\n \n \n
    \n \n
    \n \n {\n const v = parseFloat(e.target.value);\n if (!isNaN(v)) {\n if (\n v >= SLIDER_MIN * 100 &&\n v <= SLIDER_MAX * 100 &&\n convertSliderValueToServer(v) < compListingCeiling\n ) {\n onCompListingChange({\n compListingFloorNew: convertSliderValueToServer(v),\n });\n }\n }\n }}\n postfixDisplay=\"%\"\n placeholder={\n compListingMode == null\n ? eventPricingSettings?.compListingFloor?.toString() ??\n accountPricingSettings?.compListingFloor?.toString() ??\n undefined\n : undefined\n }\n />\n \n
    \n \n
    \n \n {\n const v = parseFloat(e.target.value);\n if (!isNaN(v)) {\n if (\n v >= SLIDER_MIN * 100 &&\n v <= SLIDER_MAX * 100 &&\n convertSliderValueToServer(v) > compListingFloor\n ) {\n onCompListingChange({\n compListingCeilingNew: convertSliderValueToServer(v),\n });\n }\n }\n }}\n postfixDisplay=\"%\"\n placeholder={\n compListingMode == null\n ? eventPricingSettings?.compListingCeiling?.toString() ??\n accountPricingSettings?.compListingCeiling?.toString() ??\n undefined\n : undefined\n }\n />\n \n
    \n \n
    \n
    \n
    \n \n \n (\n {roundToPrecision(val, 0)}%\n )}\n onValueChange={([floor, ceil]) => {\n onCompListingChange({\n compListingFloorNew: convertSliderValueToServer(floor),\n compListingCeilingNew: convertSliderValueToServer(ceil),\n });\n }}\n />\n
    \n \n
    \n
    \n \n \n \n )}\n \n }\n style={{ width: '100%' }}\n >\n \n \n \n\n {showCompListingRestictSelectionDetails && (\n \n }>\n ) => e.stopPropagation()}\n onChange={(e) => {\n const isChecked = e.target.checked;\n if (isChecked) {\n if (\n !compListingOnlyForSameZoneEnabled &&\n !compListingOnlyForSelectedSectionsEnabled\n ) {\n // set zone by default\n onCompListingChange({\n compListingOnlyForSameZoneEnabledNew: true,\n compListingOnlyForSelectedSectionsEnabledNew: false,\n });\n }\n } else {\n onCompListingChange({\n compListingOnlyForSameZoneEnabledNew: false,\n compListingOnlyForSelectedSectionsEnabledNew: false,\n });\n }\n }}\n />\n \n {restrictSelection && (\n \n
    \n \n
    \n e.stopPropagation()}\n onChange={(v) => {\n if (v === RestrictSelectionType.SameZone) {\n onCompListingChange({\n compListingOnlyForSameZoneEnabledNew: true,\n compListingOnlyForSelectedSectionsEnabledNew: false,\n });\n } else {\n onCompListingChange({\n compListingOnlyForSameZoneEnabledNew: false,\n compListingOnlyForSelectedSectionsEnabledNew: true,\n });\n }\n }}\n />\n
    \n )}\n {compListingOnlyForSelectedSectionsEnabled && (\n \n \n {compListingSelectedSectionSettings?.sectionIdFilter?.length ? (\n <>\n \n \n \n }\n textContentId={ContentId.EditSections}\n onClick={sectionSelectDialog.launchDialog}\n disabled={disabled}\n style={{ paddingLeft: 0, paddingRight: 0 }}\n />\n \n ) : (\n \n }\n textContentId={ContentId.SelectSections}\n onClick={sectionSelectDialog.launchDialog}\n disabled={disabled}\n style={{ padding: 0 }}\n />\n )}\n \n \n )}\n
    \n )}\n \n \n \n \n \n
    \n \n
    \n e.stopPropagation()}\n onChange={(v) => {\n if (v) {\n onUndercutChange(v as AutoPricingUndercutMode);\n } else {\n onUndercutChange(null, null, null);\n }\n }}\n />\n
    \n \n
    \n
    \n
    \n {isDealScoreMode && (\n
    \n \n
    \n )}\n \n \n {\n if (!value) return;\n\n const mode = value as UndercutPriceSettingsMode;\n setUndercutRelativeAmountMode(mode);\n\n if (undercutRelativeAmount) {\n const curAmountAbs = Math.abs(undercutRelativeAmount);\n onUndercutChange(\n undefined,\n undefined,\n getUndercutPriceRepresentingMode(curAmountAbs, mode)\n );\n }\n }}\n />\n\n
    \n \n
    \n\n \n {\n const v = parseFloat(e.target.value);\n if (v >= 0 && v <= Number.MAX_VALUE) {\n const relativeValue = Math.min(v, 100) / 100;\n if (\n undercutRelativeAmountMode ===\n UndercutPriceSettingsMode.Premium\n ) {\n onUndercutChange(undefined, undefined, -relativeValue);\n } else {\n onUndercutChange(undefined, undefined, relativeValue);\n }\n } else {\n onUndercutChange(undefined, undefined, null);\n }\n }}\n />\n \n
    \n \n
    \n {\n if (!value) return;\n\n const mode = value as UndercutPriceSettingsMode;\n setUndercutAbsoluteAmountMode(mode);\n\n if (undercutAbsoluteAmount) {\n const curAmountAbs = Math.abs(undercutAbsoluteAmount);\n onUndercutChange(\n undefined,\n getUndercutPriceRepresentingMode(curAmountAbs, mode)\n );\n }\n }}\n />\n
    \n \n
    \n \n {\n const v = parseFloat(e.target.value);\n if (v >= 0 && v <= Number.MAX_VALUE) {\n if (\n undercutAbsoluteAmountMode ===\n UndercutPriceSettingsMode.Premium\n ) {\n onUndercutChange(undefined, -v);\n } else {\n onUndercutChange(undefined, v);\n }\n } else {\n onUndercutChange(undefined, null);\n }\n }}\n />\n \n
    \n
    \n \n }\n textContentId={ContentId.ResetSettings}\n onClick={onResetSettings}\n />\n \n\n {\n const compListingSelectedSectionSettingsNew = {\n ...compListingSelectedSectionSettings,\n sectionIdFilter: selectedSections.map((s) => s.id),\n rowIdFilter: compListingSelectedSectionSettings?.rowIdFilter ?? [],\n sectionRowIdFilter:\n compListingSelectedSectionSettings?.sectionRowIdFilter ?? {},\n };\n onCompListingChange({ compListingSelectedSectionSettingsNew });\n sectionSelectDialog.closeDialog();\n }}\n onClosed={sectionSelectDialog.closeDialog}\n />\n \n );\n};\n","import { useCallback, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Content } from 'src/contexts/ContentContext';\nimport { SimpleTable } from 'src/core/ui';\nimport { useEventMarketplaceSettings } from 'src/hooks/useEventMarketplaceSettings';\nimport { MultiDetailSection } from 'src/modals/common';\nimport { BulkEditListingGroupSettingsFields } from 'src/modals/GroupListings/components/groupingTypes';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { compareMarketplace } from 'src/utils/eventWithDataUtils';\nimport { isMarketplaceActive } from 'src/utils/userUtils';\nimport { Event, Marketplace } from 'src/WebApiController';\n\nimport { MarketplaceDisplay } from './MarketplaceDisplay';\nimport * as styles from './MarketplaceDisplay.css';\n\n/**\n * Get marketplace id from marketplace enum.\n * This assumes the enum order is aligned with the Marketplace.Marketplace table\n */\nconst getMarketplaceIdFromMarketplace = (marketplace: Marketplace) => {\n let marketplaceId = 0;\n Object.values(Marketplace).forEach((mp, index) => {\n if (mp === marketplace) {\n marketplaceId = index + 1;\n }\n });\n return marketplaceId;\n};\n\ntype BulkEditListingGroupSettingMarketplaceBroadcastProps = {\n event?: Event;\n};\n\nexport const BulkEditListingGroupSettingsMarketplaceBroadcast = ({\n event,\n}: BulkEditListingGroupSettingMarketplaceBroadcastProps) => {\n const { watch, setValue } =\n useFormContext();\n\n const marketplaceSettings = watch('marketplaceSettings');\n\n const { eventMarketplaceSettings, isUKEvent, isInternationalEvent } =\n useEventMarketplaceSettings(event);\n\n const onListingBroadcastToggle = useCallback(\n (isSelected: boolean, isBroadcasting: boolean, mp: Marketplace) => {\n const marketplaceId = getMarketplaceIdFromMarketplace(mp);\n const copied = { ...marketplaceSettings?.listingMarketplaceSettings };\n\n if (isSelected) {\n copied[marketplaceId] = {\n listingBroadcastStateId: isBroadcasting ? 2 : 1,\n };\n } else {\n delete copied[marketplaceId];\n }\n\n setValue('marketplaceSettings', { listingMarketplaceSettings: copied });\n },\n [marketplaceSettings, setValue]\n );\n\n const marketplacesSelected = useMemo(() => {\n const selected: Marketplace[] = [];\n const settings = marketplaceSettings?.listingMarketplaceSettings ?? [];\n const includedIds = Object.keys(settings);\n Object.values(Marketplace).forEach((mp, index) => {\n if (includedIds.includes(index + 1 + '')) {\n selected.push(mp);\n }\n });\n return selected;\n }, [marketplaceSettings]);\n\n const marketplaceToStateId = useMemo(() => {\n const marketplaceToId = {} as Record;\n const settings = marketplaceSettings?.listingMarketplaceSettings;\n const includedIds = settings != null ? Object.keys(settings) : [];\n Object.values(Marketplace).forEach((mp, index) => {\n const key = index + 1 + '';\n if (includedIds.includes(key) && settings != null) {\n marketplaceToId[mp] = settings[key].listingBroadcastStateId;\n }\n });\n return marketplaceToId;\n }, [marketplaceSettings]);\n\n return (\n }\n extraContent={[]}\n >\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {eventMarketplaceSettings\n .toSorted((a, b) => compareMarketplace(a.mkp, b.mkp))\n .flatMap((mk) => {\n const isSelected = marketplacesSelected.includes(mk.mkp);\n const isActive = marketplaceToStateId[mk.mkp] === 2;\n\n if (mk.mkp === Marketplace.StubHub) {\n return [\n ,\n ,\n ];\n }\n\n if (!event || !isInternationalEvent) {\n return [\n ,\n ];\n }\n\n // Only support Stubhub/Viagogo for international events\n return [];\n })}\n \n \n \n );\n};\n","import { isEqual } from 'lodash-es';\nimport { ChangeEvent, useState } from 'react';\nimport {\n UseFormRegister,\n UseFormSetValue,\n UseFormWatch,\n} from 'react-hook-form';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosMultiSelect } from 'src/core/POS/PosMultiSelect';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { Stack } from 'src/core/ui';\nimport * as Tabs from 'src/core/ui/Tabs';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { DetailSection, SectionContent } from 'src/modals/common';\nimport { BulkEditAdvancePricingSettings } from 'src/modals/GroupListings/components/AutoPricingSettings/BulkEditAdvancePricingSettings';\nimport { BulkEditAutoPricingSettingsSection } from 'src/modals/GroupListings/components/AutoPricingSettings/BulkEditAutoPricingSettingsSection';\nimport { BulkEditListingGroupSettingsFields } from 'src/modals/GroupListings/components/groupingTypes';\nimport { getQuantitiesOptions } from 'src/modals/GroupListings/components/groupingUtils';\nimport { BulkEditListingGroupSettingsMarketplaceBroadcast } from 'src/modals/GroupListings/components/MarketplaceBroadcast/BulkEditListingGroupSettingsMarketplaceBroadcast';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { roundToPrecision } from 'src/utils/numberFormatter';\nimport { Event, Feature } from 'src/WebApiController';\n\nimport * as styles from './BulkEditListingGroupSettingsDialog.css';\n\nenum GroupListingsTab {\n Groupings = 'groupings',\n Broadcast = 'broadcast',\n AutoPricing = 'autopricing',\n}\n\nexport const BulkEditListingGroupSettingsDialogBody = ({\n event,\n currency,\n watch,\n register,\n setValue,\n}: {\n event: Event;\n currency: string;\n setValue: UseFormSetValue;\n watch: UseFormWatch;\n register: UseFormRegister;\n}) => {\n const [activeTab, setActiveTab] = useState(\n GroupListingsTab.Groupings\n );\n\n return (\n <>\n \n \n \n \n \n setActiveTab(value as GroupListingsTab)}\n style={{ height: '100%' }}\n >\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n <>\n }>\n \n \n \n \n \n \n \n \n \n );\n};\n\nexport const BulkEditListingGroupSettingsInput = ({\n currency,\n watch,\n register,\n setValue,\n}: {\n currency: string;\n setValue: UseFormSetValue;\n watch: UseFormWatch;\n register: UseFormRegister;\n}) => {\n // Setup hooks\n const { getUiCurrency } = useLocalizationContext();\n\n // Variables\n const uiCurrency = getUiCurrency(currency);\n const dontChangePlaceholder = useContent(ContentId.DontChange);\n\n // Form values\n const desiredActiveListings = watch('desiredActiveListings');\n const deprioritizedQuantities = watch('deprioritizedQuantities');\n const undercutAbsoluteAmount = watch('rankPremiums.undercutAbsoluteAmount');\n const undercutRelativeAmount = watch('rankPremiums.undercutRelativeAmount');\n\n // FF\n const hasAutoPricingFeature = useUserHasFeature(Feature.AutoPricing);\n return (\n \n {hasAutoPricingFeature && (\n }\n style={{ flex: '0.5' }}\n >\n {\n const v = parseFloat(e.target.value);\n if (isNaN(v)) {\n setValue(`rankPremiums.undercutAbsoluteAmount`, null);\n return;\n }\n\n setValue(`rankPremiums.undercutAbsoluteAmount`, v);\n }}\n value={undercutAbsoluteAmount ?? undefined}\n placeholder={dontChangePlaceholder}\n />\n\n {\n const v = parseFloat(e.target.value);\n if (isNaN(v)) {\n setValue(`rankPremiums.undercutRelativeAmount`, null);\n return;\n }\n\n let relativeValue = null;\n if (v >= 0 && v <= Number.MAX_VALUE) {\n relativeValue = Math.min(v, 100) / 100;\n }\n setValue(`rankPremiums.undercutRelativeAmount`, relativeValue);\n }}\n value={\n undercutRelativeAmount != null\n ? roundToPrecision(Math.abs(undercutRelativeAmount) * 100, 8)\n : ''\n }\n />\n \n )}\n }\n style={{ width: '200px' }}\n >\n ) => {\n let v = parseInt(e.target.value);\n if (isNaN(v)) {\n setValue(`desiredActiveListings`, null);\n return;\n }\n\n if (v < 0) {\n v = 0;\n }\n setValue(`desiredActiveListings`, v);\n }}\n />\n \n }\n style={{ width: '190px' }}\n >\n {\n if (newValues.length === 0) {\n setValue('deprioritizedQuantities', null);\n return;\n }\n\n if (!isEqual(newValues, deprioritizedQuantities)) {\n setValue('deprioritizedQuantities', newValues);\n }\n }}\n valueOptionsContent={getQuantitiesOptions()}\n />\n \n \n );\n};\n","import { HubConnectionState } from '@microsoft/signalr';\nimport { ComponentProps, useCallback, useRef } from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { Modal as RSModal } from 'reactstrap';\nimport { BulkEditStatus } from 'src/components/common/BulkActions/BulkEditStatus';\nimport { useBulkEditHubContext } from 'src/contexts/BulkEditHubContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { BulkEditFooter } from 'src/dialogs/BulkEdits/common/BulkEditFooter';\nimport { useBulkEditHub } from 'src/hooks/useBulkEditHub';\nimport { BulkEditListingGroupSettingsFields } from 'src/modals/GroupListings/components/groupingTypes';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n ActionOutboxEntityType,\n BulkActionType,\n BulkEditPreviewWithDetails,\n BulkEditProgress,\n BulkEditStep,\n Event,\n} from 'src/WebApiController';\n\nimport { BulkEditHeader } from '../common/BulkEditHeader';\nimport { BulkEditListingGroupSettingsDialogBody } from './BulkEditListingGroupSettingsDialogBody';\n\nexport type BulkEditListingGroupSettingsDialogProps = ComponentProps<\n typeof RSModal\n> & {\n updateKey: string;\n isLoading?: boolean;\n event: Event;\n currency: string;\n onOkay: (\n input: BulkEditListingGroupSettingsFields | null,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => void;\n onCancel?: () => void;\n};\n\nconst getDefaultFormValues = () => {\n return {\n marketplaceSettings: { listingMarketplaceSettings: {} },\n desiredActiveListings: null,\n deprioritizedQuantities: null,\n rankPremiums: {\n undercutAbsoluteAmount: null,\n undercutRelativeAmount: null,\n },\n pricingSettingsInputs: {},\n };\n};\n\nexport const BulkEditListingGroupSettingsDialog = ({\n event,\n currency,\n ...rest\n}: BulkEditListingGroupSettingsDialogProps) => {\n const methods = useForm({\n defaultValues: getDefaultFormValues(),\n });\n\n return (\n \n \n \n );\n};\n\nexport const BulkEditListingGroupSettingsDialogContent = ({\n event,\n currency,\n updateKey,\n isLoading,\n onOkay,\n onCancel,\n handleSubmit,\n getValues,\n clearErrors,\n setError,\n setValue,\n watch,\n register,\n reset,\n formState,\n ...rest\n}: BulkEditListingGroupSettingsDialogProps &\n Omit<\n ComponentProps<\n typeof FormProvider\n >,\n 'children'\n >) => {\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n\n const { setSelectionMode } = useMultiSelectionContext();\n const { setProgress, setPreview, setMainDialogOpened } =\n useBulkEditHubContext();\n\n const onClose = useCallback(\n async (newProgress?: BulkEditProgress) => {\n if (newProgress?.step === BulkEditStep.Done) {\n await refreshExpandedListItems();\n setSelectionMode(undefined);\n setProgress(undefined);\n setPreview(undefined);\n }\n onCancel?.();\n },\n [\n onCancel,\n refreshExpandedListItems,\n setPreview,\n setProgress,\n setSelectionMode,\n ]\n );\n\n const onBulkEditDone = useCallback(\n async (doneProgress: BulkEditProgress, finalErrors: string[]) => {\n if (finalErrors.length === 0 && doneProgress.step === BulkEditStep.Done) {\n onClose(doneProgress);\n }\n },\n [onClose]\n );\n\n const { bulkEditHub, progress, stage, preview, initJob } = useBulkEditHub(\n ActionOutboxEntityType.Listing,\n BulkActionType.EditListingGroupSetting,\n updateKey,\n onBulkEditDone\n );\n\n const submitButtonRef = useRef(null);\n\n const hasBackgroundBulkEditFeature =\n bulkEditHub?.state === HubConnectionState.Connected;\n\n const onSubmitHandler = useCallback(\n (onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void) => {\n if (onPreviewReceived) {\n onOkay(null, false, onPreviewReceived);\n } else {\n handleSubmit((i) =>\n onOkay(i, hasBackgroundBulkEditFeature, undefined, preview)\n )();\n }\n },\n [onOkay, handleSubmit, hasBackgroundBulkEditFeature, preview]\n );\n\n return (\n <>\n }\n />\n }\n onOpened={() => {\n reset(getDefaultFormValues());\n initJob();\n }}\n onClosed={() => {\n setMainDialogOpened(false);\n if (progress) {\n setSelectionMode(undefined);\n }\n\n rest.onClosed?.();\n }}\n footer={\n \n }\n onCancel={isLoading ? undefined : onCancel}\n >\n \n \n \n \n \n );\n};\n","import { Content } from 'src/contexts/ContentContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nexport const LaunchBulkEditListingGroupSettings = ({\n onClick,\n onlyListingGroupsSelected,\n}: {\n onClick: (e: React.MouseEvent) => void;\n onlyListingGroupsSelected: boolean;\n}) => {\n return (\n <>\n \n \n \n \n \n \n );\n};\n","import { useCallback, useMemo } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport {\n BulkEditListingGroupSettingsDialog,\n BulkEditListingGroupSettingsDialogProps,\n} from 'src/dialogs/BulkEdits/BulkEditListingGroupSettingsDialog';\nimport { BulkEditListingGroupSettingsFields } from 'src/modals/GroupListings/components/groupingTypes';\nimport { flattenListingGroup } from 'src/modals/GroupListings/components/groupingUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n BulkEditListingGroupClient,\n BulkEditListingGroupSettingsInput,\n BulkEditPreviewWithDetails,\n EventWithData,\n ListingGroupUndercutSetting,\n ListingQuery,\n} from 'src/WebApiController';\n\nimport { INVENTORY_BULK_UPDATE_LISTING_GROUP_SETTINGS_UPDATE_KEY } from '../../InventoryActionDropdown.constants';\nimport { LaunchBulkEditListingGroupSettings } from './LaunchBulkEditListingGroupSettings';\n\nexport const useBulkEditListingGroupSettings = (\n filterQueryWithEventIds: ListingQuery,\n eventWithData: EventWithData,\n setIsLoading: (v: boolean) => void,\n isLoading?: boolean\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n const updateKey = INVENTORY_BULK_UPDATE_LISTING_GROUP_SETTINGS_UPDATE_KEY;\n\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n\n const eventCurrency = useMemo(\n () => eventWithData.entities.listings?.[0]?.currency ?? 'USD',\n [eventWithData.entities.listings]\n );\n\n const selectedListingIds = useMemo(\n () => filterQueryWithEventIds.entityIds ?? [],\n [filterQueryWithEventIds.entityIds]\n );\n\n const onlyListingGroupsSelected = useMemo(() => {\n if (\n selectedListingIds.length === 0 ||\n eventWithData.entities.listings == null\n ) {\n return true;\n }\n const selectedListings =\n eventWithData.entities.listings\n ?.flatMap(flattenListingGroup)\n .filter((l) => selectedListingIds.includes(l.id)) ?? [];\n\n const selectedListingGroups = eventWithData.entities.listings.filter((l) =>\n selectedListingIds.includes(l.id)\n );\n\n if (!selectedListingGroups || selectedListingGroups.length === 0) {\n return false;\n }\n\n const selectedListingGroupIds = selectedListingGroups\n .map((l) => l.ltGrpId)\n .filter((id) => id != null);\n\n return (selectedListings ?? []).every((l) =>\n selectedListingGroupIds.includes(l.ltGrpId ?? '')\n );\n }, [selectedListingIds, eventWithData.entities.listings]);\n\n const event = eventWithData.event;\n\n const { openDialog: openBulkEditDialog, closeDialog: closeBulkEditDialog } =\n useDialog(\n DialogId.BulkUpdateListingGroupSettings,\n BulkEditListingGroupSettingsDialog\n );\n\n const onSubmit = useCallback(\n (\n input: BulkEditListingGroupSettingsFields | null,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n tryInvokeApi(\n async () => {\n const client = await new BulkEditListingGroupClient(\n activeAccountWebClientConfig\n );\n const preview = await client.bulkEditListingsGroupSettingsPreview(\n filterQueryWithEventIds\n );\n\n onPreviewReceived(preview);\n },\n (error) => {\n showErrorDialog('bulkEditListingGroupSettingsPreview', error, {\n trackErrorData: {\n filterQueryWithEventIds,\n },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n } else if (input) {\n tryInvokeApi(\n async () => {\n const client = await new BulkEditListingGroupClient(\n activeAccountWebClientConfig\n );\n\n const rankPremiums: ListingGroupUndercutSetting = {\n undAbsAmt: input.rankPremiums?.undercutAbsoluteAmount ?? null,\n undRelAmt: input.rankPremiums?.undercutRelativeAmount ?? null,\n actRankUndAbsAmt: null,\n actRankUndRelAmt: null,\n };\n\n const listingGroupListingIds = preview!.listings\n ?.flatMap(flattenListingGroup)\n .filter(({ id, isLtGrp }) => id > 0 && !isLtGrp)\n .map((l) => l.id);\n\n const payload: BulkEditListingGroupSettingsInput = {\n desiredActiveListings: input.desiredActiveListings ?? null,\n deprioritizedQuantities: input.deprioritizedQuantities ?? null,\n groupUndercutSetting: rankPremiums,\n marketplaceSettings: input.marketplaceSettings ?? null,\n autoPricingInputs: input.pricingSettingsInputs ?? null,\n listingGroupListingIds: listingGroupListingIds ?? [],\n };\n\n const succeeded = await client.bulkEditListingGroupSettings(\n payload,\n updateKey,\n supportBackgroundProcess\n );\n\n if (!supportBackgroundProcess) {\n if (succeeded) {\n await refreshExpandedListItems();\n }\n\n closeBulkEditDialog();\n }\n },\n (error) => {\n showErrorDialog('bulkEditListingGroupSettings', error, {\n trackErrorData: {\n input,\n preview,\n },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n }\n },\n [\n activeAccountWebClientConfig,\n closeBulkEditDialog,\n filterQueryWithEventIds,\n refreshExpandedListItems,\n setIsLoading,\n showErrorDialog,\n updateKey,\n ]\n );\n\n const openDialog = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n\n openBulkEditDialog({\n event: event,\n currency: eventCurrency,\n updateKey: INVENTORY_BULK_UPDATE_LISTING_GROUP_SETTINGS_UPDATE_KEY,\n isLoading: isLoading,\n onOkay: onSubmit,\n onClosed: () => {\n setIsLoading(false);\n },\n onCancel: closeBulkEditDialog,\n });\n },\n [\n closeBulkEditDialog,\n event,\n eventCurrency,\n isLoading,\n onSubmit,\n openBulkEditDialog,\n setIsLoading,\n ]\n );\n\n return {\n dropDown: (\n \n ),\n };\n};\n","import { ComponentProps, useState } from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { Content } from 'src/contexts/ContentContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { Button, Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport * as styles from './AddSectionGroupDialog.css';\n\ntype FormValues = {\n zone: string | undefined;\n area: string | undefined;\n};\n\nexport type AddSectionGroupDialogProps = ComponentProps & {\n onOkay: (zoneName: string, sectionGroupName: string) => void;\n onCancel: () => void;\n};\n\nexport function AddSectionGroupDialog({\n onOkay,\n onCancel,\n ...rest\n}: AddSectionGroupDialogProps) {\n const [formValues, setFormValues] = useState({\n zone: undefined,\n area: undefined,\n });\n\n return (\n <>\n \n {' '}\n \n \n }\n footer={\n <>\n \n {\n onOkay(formValues.zone ?? '', formValues.area ?? '');\n setFormValues({ zone: undefined, area: undefined });\n }}\n >\n \n \n \n }\n onCancel={onCancel}\n >\n \n }>\n {\n const sanitizedValue = e.target.value.replace(/:/g, '');\n setFormValues((prev) => ({\n ...prev,\n zone: sanitizedValue,\n }));\n }}\n />\n \n }>\n {\n const sanitizedValue = e.target.value.replace(/:/g, '');\n setFormValues((prev) => ({\n ...prev,\n area: sanitizedValue,\n }));\n }}\n />\n \n \n \n \n );\n}\n","import {\n cloneElement,\n ComponentPropsWithoutRef,\n ComponentPropsWithRef,\n forwardRef,\n isValidElement,\n PropsWithChildren,\n ReactElement,\n ReactNode,\n useRef,\n} from 'react';\nimport { Button, Popover } from 'src/core/ui';\n\nimport * as styles from './PosDropdownAnimated.css';\n\nexport type PosDropdownAnimatedProps = {\n trigger?: ReactNode;\n rootProps?: ComponentPropsWithRef;\n triggerProps?: ComponentPropsWithRef;\n};\n\nexport const PosDropdownAnimated = forwardRef<\n HTMLDivElement,\n PropsWithChildren<\n ComponentPropsWithoutRef & PosDropdownAnimatedProps\n >\n>(function PosDropdownAnimated(\n { rootProps, triggerProps, trigger, children, id, ...rest },\n ref\n): ReactElement {\n return (\n \n {\n // This is to prevent the click from passing through to the container (which maybe a clickable tile)\n e.stopPropagation();\n }}\n >\n \n {isValidElement(trigger)\n ? cloneElement(trigger as ReactElement<{ disabled: boolean }>, {\n disabled: !!triggerProps?.disabled,\n })\n : trigger}\n \n \n \n {children}\n \n \n );\n});\n\nexport const PosDropdownAnimatedItem = forwardRef<\n HTMLButtonElement,\n PropsWithChildren> & {\n noPadding?: boolean;\n keepOpenAfterSelection?: boolean;\n justifyContent?: 'start' | 'center' | 'space-between';\n }\n>(function PosDropdownAnimatedItem(\n { onClick, justifyContent, keepOpenAfterSelection, children, id, ...props },\n ref\n): ReactElement {\n const closeRef = useRef(null);\n\n return (\n <>\n {\n onClick?.(e);\n if (!keepOpenAfterSelection) {\n closeRef.current?.click?.();\n }\n }}\n justifyContent={justifyContent ? justifyContent : 'space-between'}\n >\n {children}\n \n {\n // We want the default behavior of the onClick event here.\n // We only don't want the click event to propagate to other elements, e.g. eventAccordion that will cause the collapsible to fold\n e.stopPropagation();\n }}\n />\n \n );\n});\n","import { head, uniq } from 'lodash-es';\nimport { useCallback, useMemo, useState } from 'react';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { SectionInfo } from 'src/WebApiController';\n\nexport const useAutoCompMapSectionHandler = (onLaunchingDialog: () => void) => {\n const { venueMapInfo } = useEventMapContext();\n const [selectedSection, setSectionSelected] = useState(\n null\n );\n\n const [selectedSectionIds, setSelectedSectionIds] = useState([]);\n\n const selectedSectionData = useMemo(() => {\n if (!venueMapInfo || !selectedSectionIds?.length) {\n return undefined;\n }\n\n return venueMapInfo?.sections?.filter((s: SectionInfo) =>\n selectedSectionIds.includes(s.id)\n );\n }, [selectedSectionIds, venueMapInfo]);\n\n const onResetSections = useCallback(() => setSelectedSectionIds([]), []);\n\n const onShiftSelect = useCallback(\n (sectionInfo: SectionInfo) => {\n // We are using the ticketClassId to group the sections\n const selectedClassId = head(\n sectionInfo?.rows\n ?.map(({ tktClass: ticketClass }) => ticketClass?.id)\n .filter((id) => !!id)\n );\n const updatedSectionIds = venueMapInfo?.sections\n ?.filter(\n ({ rows }: SectionInfo) =>\n rows?.some(\n ({ tktClass: ticketClass }) => ticketClass?.id === selectedClassId\n )\n )\n ?.map((s: SectionInfo) => s.id);\n\n setSelectedSectionIds((prev) => {\n if (prev.includes(sectionInfo.id)) {\n return prev.filter((id) => !updatedSectionIds?.includes(id));\n }\n return uniq([...prev, ...(updatedSectionIds ?? [])]);\n });\n },\n [venueMapInfo?.sections]\n );\n\n const onCtrlSelect = useCallback(\n (sectionInfo: SectionInfo) =>\n setSelectedSectionIds((prev) => {\n if (prev.includes(sectionInfo.id)) {\n return prev.filter((id) => id !== sectionInfo.id);\n }\n return [...prev, sectionInfo.id];\n }),\n []\n );\n\n const onSingleSelect = useCallback(\n (sectionInfo: SectionInfo) =>\n setSelectedSectionIds((prev) => {\n if (prev.includes(sectionInfo.id)) {\n return prev.filter((id) => id !== sectionInfo.id);\n }\n return [...prev, sectionInfo.id];\n }),\n []\n );\n\n const onSectionClicked = useCallback(\n (e: MouseEvent, sectionInfo: SectionInfo) => {\n if (e.shiftKey) {\n onShiftSelect(sectionInfo);\n return;\n }\n if (e.ctrlKey || e.metaKey) {\n onCtrlSelect(sectionInfo);\n return;\n }\n\n onSingleSelect(sectionInfo);\n },\n [onCtrlSelect, onSingleSelect, onShiftSelect]\n );\n\n const onToggleMirrors = useCallback(\n (mirrors: SectionInfo[], exclude?: boolean) => {\n setSelectedSectionIds((prev) => {\n const mirrorIds = mirrors.map(({ id }) => id);\n if (exclude) {\n return [...prev.filter((id) => !mirrorIds.includes(id))];\n } else {\n return uniq([...prev, ...mirrorIds]);\n }\n });\n },\n []\n );\n\n const onSelectedSectionsChange = useCallback((sections: SectionInfo[]) => {\n setSelectedSectionIds(sections.map(({ id }) => id));\n }, []);\n\n return {\n selectedSection,\n selectedSectionIds,\n selectedSectionData,\n onSectionClicked,\n onResetSections,\n onToggleMirrors,\n onSelectedSectionsChange,\n };\n};\n","import { ComponentProps, useState } from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { Content } from 'src/contexts/ContentContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { PosSelect } from 'src/core/POS/PosSelect';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { Button, Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport * as styles from './AddToGroupDialog.css';\n\nexport type AddToGroupDialogProps = ComponentProps & {\n groupOptions: Record;\n onOkay: (groupId: string) => void;\n onCancel: () => void;\n};\n\nexport function AddToGroupDialog({\n groupOptions,\n onOkay,\n onCancel,\n ...rest\n}: AddToGroupDialogProps) {\n const [selectedGroupId, setSelectedGroupId] = useState(\n Object.keys(groupOptions)[0] ?? undefined\n );\n const [isSubmitting, setIsSubmitting] = useState(false);\n\n return (\n <>\n }\n footer={\n <>\n {isSubmitting ? (\n \n ) : (\n <>\n \n {\n setIsSubmitting(true);\n onOkay(selectedGroupId ?? '');\n }}\n >\n \n \n \n )}\n \n }\n onCancel={onCancel}\n >\n \n \n\n setSelectedGroupId(groupId)}\n value={selectedGroupId}\n searchable\n disabled={isSubmitting}\n valueOptionsContent={groupOptions}\n onClick={(e) => e.stopPropagation()}\n />\n \n \n \n );\n}\n","import { useCallback, useContext, useMemo } from 'react';\nimport { useInventoryEventBulkActionsState } from 'src/components/Events/EventListing/InventoryEventListing/BulkActions/InventoryEventBulkActions/useInventoryEventBulkActionsState';\nimport { Content } from 'src/contexts/ContentContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { Stack } from 'src/core/ui';\nimport { AddToGroupDialog } from 'src/dialogs/BulkEdits/AddToGroupDialog';\nimport { AddToGroupListingsModal } from 'src/modals/GroupListings';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { EventWithData, ListingGroup } from 'src/WebApiController';\n\nexport const LaunchAddToGroup = ({\n eventData,\n disabled,\n}: {\n eventData: EventWithData;\n disabled?: boolean;\n}) => {\n const { setModal } = useContext(ModalContext);\n\n const {\n openDialog: openAddToGroupDialog,\n closeDialog: closeAddToGroupDialog,\n } = useDialog(DialogId.AddToGroup, AddToGroupDialog);\n\n const { filterQueryWithEventIds } = useInventoryEventBulkActionsState(\n eventData.event\n );\n\n const selectedListingIds = useMemo(\n () => filterQueryWithEventIds.entityIds ?? [],\n [filterQueryWithEventIds]\n );\n\n const onLaunchDialog = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n\n const filteredListings = eventData?.entities?.listings?.filter(\n (l) => l.isLtGrp && l.ltGrpId != null\n ) as ListingGroup[];\n\n const listingGroups =\n filteredListings.reduce(\n (acc, curr: ListingGroup) => {\n acc[curr.ltGrpId!] = curr.groupName;\n return acc;\n },\n {} as Record\n ) ?? {};\n\n openAddToGroupDialog({\n groupOptions: listingGroups,\n onOkay: (groupId) => {\n closeAddToGroupDialog();\n setModal({\n children: (\n \n ),\n clickOutsideToClose: true,\n ...{ size: 'slide-in' },\n });\n },\n onCancel: () => {\n closeAddToGroupDialog();\n },\n });\n },\n [\n closeAddToGroupDialog,\n eventData.event.viagVirtualId,\n eventData?.entities?.listings,\n openAddToGroupDialog,\n selectedListingIds,\n setModal,\n ]\n );\n\n return (\n \n \n \n \n \n );\n};\n","import {\n BucketType,\n ListingGroupListingMarketplaceSettings,\n ListingGroupUndercutSetting,\n MergeListingGroupInputList,\n RowGroupSetting,\n VenueZoneConfigType,\n} from 'src/WebApiController';\n\nexport enum GroupListingsState {\n Configure = 'Configure',\n Review = 'Review',\n}\n\nexport enum ListingGroupType {\n Zone = 'Zone',\n ZoneMap = 'ZoneMap',\n Section = 'Section',\n Row = 'Row',\n Quantity = 'Quantity',\n UnitCost = 'UnitCost',\n None = 'None',\n}\n\nexport type ListingGroupBy = {\n groupingType: ListingGroupType;\n numberOfBuckets?: number;\n bucketOption?: BucketType;\n ranges?: GroupRange[];\n};\n\nexport type GroupListingsFormProps = MergeListingGroupInputList & {\n groupBys: ListingGroupBy[];\n venueZoneConfigType: VenueZoneConfigType;\n rowGroupSetting: RowGroupSetting;\n deprioritizedQuantities: string[];\n groupSortBy: GroupSortByType | null;\n desiredActiveListings: number | null;\n groupUndercutSettings: ListingGroupUndercutSetting | null;\n marketplaceSettings: ListingGroupListingMarketplaceSettings | null;\n};\n\nexport enum SplitZoneByType {\n RowRanges = 'RowRanges',\n}\n\nexport enum RankPremiumType {\n Absolute = 'absolute',\n Relative = 'relative',\n}\n\nexport enum GroupSortByType {\n SectionAsc = 'SectionAsc',\n SectionDesc = 'SectionDesc',\n RowAsc = 'RowAsc',\n RowDesc = 'RowDesc',\n UnsoldQuantityAsc = 'UnsoldQuantityAsc',\n UnsoldQuantityDesc = 'UnsoldQuantityDesc',\n}\n\nexport type GroupRange = {\n min: number;\n max: number;\n};\n","import { useSortable } from '@dnd-kit/sortable';\nimport { ColumnDef } from '@tanstack/react-table';\nimport { useMemo } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosDropdown, PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { vars } from 'src/core/themes';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { TableHeaderCellDiv } from 'src/core/ui/TableHeaderCellDiv';\nimport { BroadcastIcon } from 'src/svgs/BroadcastIcon';\nimport { FlattenedViewIcon } from 'src/svgs/FlattenedViewIcon';\nimport { IconsFill, MoreIcon } from 'src/svgs/Viagogo';\nimport { TableShimmeringDiv } from 'src/tables/Table';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getDeliveryTypeIcon } from 'src/utils/ticketTypeUtils';\nimport { DeliveryType } from 'src/WebApiController';\n\nimport { RankPremiumType } from '../../GroupListingsV2.types';\nimport { GroupListingTableItem } from './GroupListingsPreviewTable';\n\nexport const UngroupedListingGroupId = 'UngroupedListingGroup';\n\nconst DeliveryTypeCell = ({ deliveryType }: { deliveryType: DeliveryType }) => {\n const icon = getDeliveryTypeIcon(deliveryType, null, IconsFill.textStrong);\n return icon;\n};\n\n// Cell Component\nconst RowDragHandleCell = ({ rowId }: { rowId: number }) => {\n const { attributes, listeners } = useSortable({\n id: rowId,\n });\n return (\n \n );\n};\n\nexport const usePreviewTableColumns = (\n desiredActiveListings: number | null,\n isUngroupedGroup: boolean,\n removeListing: (listingId: number) => void,\n onMoveListing: (listingId: number) => void\n) => {\n const columns = useMemo((): ColumnDef[] => {\n const tableColumns: ColumnDef[] = [\n {\n id: 'id',\n header: () => undefined,\n size: 40,\n cell: ({ row: { original } }) => {\n if (!original) {\n return ;\n }\n\n return ;\n },\n enableSorting: false,\n },\n {\n id: 'priority',\n header: () => (\n \n #\n \n ),\n size: 40,\n cell: ({ row: { original, depth } }) => {\n if (!original) {\n return ;\n }\n\n const { priority } = original;\n\n if (depth > 0) return null;\n\n if (desiredActiveListings && priority <= desiredActiveListings) {\n return (\n \n \n \n );\n }\n\n return (\n \n {priority}\n \n );\n },\n enableSorting: false,\n },\n {\n id: 'seating.section',\n header: () => (\n \n \n \n ),\n minSize: 50,\n maxSize: 100,\n accessorFn: (data) => data?.seating.section,\n cell: ({ row: { original } }) => {\n if (!original) {\n return ;\n }\n\n return (\n \n {original.seating.section}\n \n );\n },\n enableSorting: false,\n },\n {\n id: 'seating.row',\n header: () => (\n \n \n \n ),\n minSize: 50,\n maxSize: 70,\n accessorFn: (data) => data?.seating.row ?? '',\n cell: ({ row: { original } }) => {\n if (!original) {\n return ;\n }\n\n return (\n \n {original.seating.row}\n \n );\n },\n enableSorting: false,\n },\n {\n id: 'seating.seatFr',\n header: () => (\n \n \n \n ),\n minSize: 50,\n maxSize: 100,\n cell: ({ row: { original } }) => {\n if (!original) {\n return ;\n }\n\n let text = original.seating.seatFr;\n if (\n original.seating.seatTo &&\n original.seating.seatTo !== original.seating.seatFr\n ) {\n text += ` - ${original.seating.seatTo}`;\n }\n\n return {text};\n },\n enableSorting: false,\n },\n {\n id: 'undercutSetting',\n header: () => (\n \n \n \n ),\n minSize: 50,\n maxSize: 100,\n cell: ({ row: { original } }) => {\n if (!original) {\n return ;\n }\n\n const undercutSettings = original.undercutSetting;\n\n const rankPremium =\n undercutSettings?.undAbsAmt != null\n ? RankPremiumType.Absolute\n : undercutSettings?.undRelAmt != null\n ? RankPremiumType.Relative\n : undefined;\n\n const premiumValue =\n undercutSettings?.undAbsAmt != null\n ? undercutSettings?.undAbsAmt\n : undercutSettings?.undRelAmt != null\n ? undercutSettings?.undRelAmt * 100\n : undefined;\n\n const display =\n premiumValue == null\n ? undefined\n : rankPremium === RankPremiumType.Absolute\n ? `$${premiumValue}`\n : rankPremium === RankPremiumType.Relative\n ? `${premiumValue}%`\n : premiumValue;\n\n return {display};\n },\n enableSorting: false,\n },\n {\n id: 'delivType',\n header: () => (\n \n \n \n ),\n minSize: 80,\n maxSize: 100,\n cell: ({ row: { original } }) => {\n if (!original) {\n return ;\n }\n\n return (\n \n \n \n );\n },\n enableSorting: false,\n },\n {\n id: 'availQty',\n header: () => (\n \n /\n \n ),\n minSize: 70,\n maxSize: 70,\n accessorFn: (data) => data?.availQty,\n cell: function Cell({ row: { original } }) {\n if (!original) {\n return ;\n }\n\n const available = original.availQty ?? 0;\n const sold = original.ticketCnt - available;\n\n return (\n {`${sold}/${available}`}\n );\n },\n enableSorting: false,\n },\n {\n id: 'unitCst',\n header: () => (\n \n \n \n ),\n minSize: 70,\n maxSize: 100,\n cell: function Cell({ row: { original } }) {\n if (!original) {\n return ;\n }\n\n return (\n \n {original.unitCst?.disp ?? original?.faceValue?.disp ?? (\n \n )}\n \n );\n },\n enableSorting: false,\n },\n {\n id: 'name',\n header: () => (\n \n \n \n ),\n size: 40,\n cell: function Cell({ row: { original } }) {\n if (!original) {\n return ;\n }\n\n return (\n \n \n \n
    \n }\n align=\"end\"\n >\n onMoveListing(original.id)}\n >\n \n \n {!isUngroupedGroup && (\n removeListing(original.id)}\n >\n \n \n )}\n \n \n );\n },\n enableSorting: false,\n },\n ];\n\n return tableColumns.filter((column) => {\n if (isUngroupedGroup) {\n return column.id && !['id', 'undercutSetting'].includes(column.id);\n }\n return true;\n });\n }, [desiredActiveListings, isUngroupedGroup, onMoveListing, removeListing]);\n\n return columns;\n};\n","import { Label } from '@radix-ui/react-label';\nimport { MarketplaceLogo } from 'src/components/common/MarketplaceLogo';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { SimpleTable, Switch } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Event, Marketplace } from 'src/WebApiController';\n\nimport * as styles from './Broadcast.css';\n\ntype BroadcastMarketplaceProps = {\n marketplace: Marketplace;\n isSelected: boolean;\n isActive: boolean;\n event?: Event;\n isUKEvent?: boolean;\n isViagogo?: boolean;\n onListingBroadcastToggle: (\n isSelected: boolean,\n isBroadcasting: boolean,\n marketplace: Marketplace\n ) => void;\n};\n\nexport const BroadcastMarketplace: React.FC = ({\n marketplace,\n isSelected,\n isActive,\n event,\n isUKEvent,\n isViagogo,\n onListingBroadcastToggle,\n}) => {\n const alwaysShowAsDelisted =\n isUKEvent && marketplace === Marketplace.StubHub && !isViagogo;\n\n const isChecked = !alwaysShowAsDelisted && isActive && isSelected;\n\n return (\n \n \n \n onListingBroadcastToggle(!isSelected, isChecked, marketplace)\n }\n />\n \n \n \n \n \n \n \n \n e.stopPropagation()}\n onCheckedChange={(checked) => {\n onListingBroadcastToggle(isSelected, checked, marketplace);\n }}\n />\n \n \n );\n};\n\ntype InventoryStatusProps = {\n isSelected: boolean;\n isActive: boolean;\n};\n\nconst InventoryStatus: React.FC = ({\n isSelected,\n isActive,\n}) => {\n if (!isSelected) {\n return undefined;\n }\n return (\n \n );\n};\n","import { isEmpty } from 'lodash-es';\nimport React, { useCallback, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { SimpleTable } from 'src/core/ui';\nimport { useEventMarketplaceSettings } from 'src/hooks/useEventMarketplaceSettings';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { compareMarketplace } from 'src/utils/eventWithDataUtils';\nimport { isMarketplaceActive } from 'src/utils/userUtils';\nimport {\n Event,\n ListingMarketplaceSetting,\n Marketplace,\n} from 'src/WebApiController';\n\nimport { GroupListingsFormProps } from '../../GroupListingsV2.types';\nimport * as styles from './Broadcast.css';\nimport { BroadcastMarketplace } from './BroadcastMarketplace';\n\n/**\n * Get maerketplace id from marketplace enum.\n * This assumes the enum order is aligned with the Marketplace.Marketplace table\n */\nconst getMarketplaceIdFromMarketplace = (marketplace: Marketplace) => {\n let marketplaceId = 0;\n Object.values(Marketplace).forEach((mp, index) => {\n if (mp === marketplace) {\n marketplaceId = index + 1;\n }\n });\n return marketplaceId;\n};\n\ntype GroupBroadcastSettingsProps = {\n event?: Event;\n};\n\nexport const GroupBroadcastSettings: React.FC = ({\n event,\n}) => {\n const { watch, setValue } = useFormContext();\n const marketplaceSettings = watch('marketplaceSettings');\n const { eventMarketplaceSettings, isUKEvent, isInternationalEvent } =\n useEventMarketplaceSettings(event);\n\n const availableMarketplaceSettings = useMemo(\n () =>\n eventMarketplaceSettings.filter((mk) => {\n if (mk.mkp === Marketplace.StubHub) {\n return true;\n }\n return (!event || !isInternationalEvent) && isMarketplaceActive(mk);\n }),\n [eventMarketplaceSettings, event, isInternationalEvent]\n );\n\n const onListingBroadcastToggle = useCallback(\n (isSelected: boolean, isBroadcasting: boolean, mp: Marketplace) => {\n const { listingMarketplaceSettings } = marketplaceSettings || {\n listingMarketplaceSettings: {},\n };\n const marketplaceId = getMarketplaceIdFromMarketplace(mp);\n const copied = { ...listingMarketplaceSettings };\n if (isSelected) {\n Object.assign(copied, {\n [marketplaceId + '']: {\n listingBroadcastStateId: isBroadcasting ? 2 : 1,\n },\n });\n } else {\n delete copied[marketplaceId];\n }\n setValue('marketplaceSettings', { listingMarketplaceSettings: copied });\n },\n [marketplaceSettings, setValue]\n );\n const onToggleAllBroadcast = useCallback(\n (isSelected: boolean) => {\n if (isSelected) {\n const marketplaceSettings: {\n [key: string]: ListingMarketplaceSetting;\n } = {};\n for (const setting of availableMarketplaceSettings) {\n const marketplaceId = getMarketplaceIdFromMarketplace(setting.mkp);\n marketplaceSettings[marketplaceId + ''] = {\n listingBroadcastStateId: 2,\n };\n }\n setValue('marketplaceSettings', {\n listingMarketplaceSettings: marketplaceSettings,\n });\n } else {\n setValue('marketplaceSettings', {\n listingMarketplaceSettings: {},\n });\n }\n },\n [availableMarketplaceSettings, setValue]\n );\n const allSelected = useMemo(() => {\n const { listingMarketplaceSettings } = marketplaceSettings || {\n listingMarketplaceSettings: {},\n };\n if (isEmpty(listingMarketplaceSettings)) {\n return false;\n }\n return availableMarketplaceSettings.every((setting) => {\n const marketplaceId = getMarketplaceIdFromMarketplace(setting.mkp);\n return !isEmpty(listingMarketplaceSettings[marketplaceId + '']);\n });\n }, [availableMarketplaceSettings, marketplaceSettings]);\n\n const marketplacesSelected = useMemo(() => {\n const selected: Marketplace[] = [];\n const listingMarketplaceSettings =\n marketplaceSettings?.listingMarketplaceSettings ?? {};\n const includedIds = Object.keys(listingMarketplaceSettings);\n Object.values(Marketplace).forEach((mp, index) => {\n if (includedIds.includes(index + 1 + '')) {\n selected.push(mp);\n }\n });\n return selected;\n }, [marketplaceSettings]);\n\n const marketplaceToStateId = useMemo(() => {\n const marketplaceToId = {} as Record;\n const listingMarketplaceSettings =\n marketplaceSettings?.listingMarketplaceSettings ?? {};\n const includedIds = Object.keys(listingMarketplaceSettings);\n Object.values(Marketplace).forEach((mp, index) => {\n const key = index + 1 + '';\n if (includedIds.includes(key)) {\n marketplaceToId[mp] =\n listingMarketplaceSettings[key].listingBroadcastStateId;\n }\n });\n return marketplaceToId;\n }, [marketplaceSettings]);\n\n return (\n \n \n \n \n {\n const value = event.target.checked;\n onToggleAllBroadcast(value);\n }}\n />\n \n \n \n \n \n \n \n \n \n \n \n \n \n {availableMarketplaceSettings\n .toSorted((a, b) => compareMarketplace(a.mkp, b.mkp))\n .flatMap((mk) => {\n const isSelected = marketplacesSelected.includes(mk.mkp);\n const isActive = marketplaceToStateId[mk.mkp] === 2;\n\n if (mk.mkp === Marketplace.StubHub) {\n return [\n ,\n ,\n ];\n }\n\n return [\n ,\n ];\n })}\n \n \n );\n};\n","import { ContentId } from 'src/utils/constants/contentId';\n\nimport { ListingGroupType, SplitZoneByType } from './GroupListingsV2.types';\n\nexport const GroupTypeToCID: Partial> = {\n [ListingGroupType.ZoneMap]: ContentId.ZoneMap,\n [ListingGroupType.Section]: ContentId.Section,\n [ListingGroupType.Zone]: ContentId.Zone,\n [ListingGroupType.Row]: ContentId.Row,\n [ListingGroupType.Quantity]: ContentId.Quantity,\n [ListingGroupType.UnitCost]: ContentId.UnitCost,\n [ListingGroupType.None]: ContentId.None,\n};\n\nexport const SplitZoneByTypeToCid: Record = {\n [SplitZoneByType.RowRanges]: ContentId.RowRanges,\n};\n","import React from 'react';\nimport { Stack } from 'src/core/ui';\n\nimport * as styles from './SettingsTitle.css';\n\ntype SettingsTitleProps = {\n title: React.ReactNode;\n subtitle?: React.ReactNode;\n};\n\nexport const SettingsTitle: React.FC = ({\n title,\n subtitle,\n}) => {\n return (\n \n
    {title}
    \n {subtitle &&
    {subtitle}
    }\n
    \n );\n};\n","import clsx from 'clsx';\nimport { useCallback, useMemo, useState } from 'react';\nimport { Content, useFormattedContent } from 'src/contexts/ContentContext';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { Stack, Tooltip } from 'src/core/ui';\nimport { InfoOutlineIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\n\nimport { GroupRange } from '../../GroupListingsV2.types';\nimport * as styles from './GroupingMethods.css';\n\ntype RowRangesPrefixType = {\n ranges?: GroupRange[];\n editing: boolean;\n};\n\nconst RowRangesPrefix: React.FC = ({\n ranges,\n editing,\n}) => {\n const getLabelFromRowRange = useCallback(({ min, max }: GroupRange) => {\n if (min === max) {\n return min;\n }\n if (max === Number.MAX_VALUE) {\n return `${min}+`;\n }\n return `${min}-${max}`;\n }, []);\n\n const lastRange = useMemo(() => {\n if (ranges && ranges.length > 0) {\n return ranges[ranges.length - 1];\n }\n return null;\n }, [ranges]);\n\n return (\n \n {(ranges ?? []).map((range, index) => {\n const lastEditing = ranges && index === ranges.length - 1 && editing;\n if (lastEditing) {\n return undefined;\n }\n return (\n \n {getLabelFromRowRange(range)}\n \n );\n })}\n {editing && lastRange && (\n
    {`${lastRange?.min}-`}
    \n )}\n
    \n );\n};\n\ntype InputRowRangesProps = {\n ranges?: GroupRange[];\n onRowRangesChange: (ranges: GroupRange[]) => void;\n};\n\nexport const InputRowRanges: React.FC = ({\n ranges,\n onRowRangesChange,\n}) => {\n const [rowInput, setRowInput] = useState();\n const [editing, setEditing] = useState(false);\n const [inputError, setInputError] = useState();\n\n const lastRowRange = useMemo(() => {\n if (ranges && ranges.length > 0) {\n return ranges[ranges.length - 1];\n }\n return undefined;\n }, [ranges]);\n\n const rowRangeInputErrorMsg = useFormattedContent(\n FormatContentId.RowRangeInputError,\n lastRowRange?.min + ''\n );\n\n const onLeaveInput = useCallback(() => {\n setEditing(false);\n setRowInput(undefined);\n setInputError(undefined);\n }, []);\n\n const onCutomRowRangeKeyDown = useCallback(\n (event: React.KeyboardEvent) => {\n const sorted = (ranges ?? []).toSorted((a, b) => a.min - b.min);\n\n // In the case when no row ranges, add 1+\n if (sorted.length === 0) {\n onRowRangesChange([{ min: 1, max: Number.MAX_VALUE }]);\n setRowInput(undefined);\n return;\n }\n\n // + is considered an terminating input to mark the last row range +, i.e 6+.\n if (event.key === '+') {\n onLeaveInput();\n if (document.activeElement instanceof HTMLElement) {\n document.activeElement.blur();\n }\n return;\n }\n\n if (event.key === 'Enter') {\n const lastRange = sorted[sorted.length - 1];\n\n //Enter with no input => apply max with infinite value via blur the input\n if (!rowInput) {\n lastRange.max = lastRange.min;\n sorted.pop();\n const updated = [\n ...sorted,\n lastRange,\n { min: lastRange.min + 1, max: Number.MAX_VALUE },\n ];\n\n onRowRangesChange(updated);\n setRowInput(undefined);\n return;\n }\n // Invalid input\n if (rowInput < lastRange.min) {\n setInputError(rowRangeInputErrorMsg as string);\n return;\n }\n // Only take the enter when the input value is gte than the leading min\n lastRange.max = rowInput;\n sorted.pop();\n const updated = [\n ...sorted,\n lastRange,\n { min: rowInput + 1, max: Number.MAX_VALUE },\n ];\n onRowRangesChange(updated);\n setRowInput(undefined);\n }\n\n // Backspace to clear the last range if no row input\n if (\n event.key === 'Backspace' &&\n rowInput === undefined &&\n sorted.length > 1\n ) {\n sorted.pop();\n const lastRange = sorted[sorted.length - 1];\n lastRange.max = Number.MAX_VALUE;\n onRowRangesChange(sorted);\n setRowInput(sorted[sorted.length - 1].min);\n }\n },\n [onLeaveInput, onRowRangesChange, rowInput, rowRangeInputErrorMsg, ranges]\n );\n\n const activePlaceholder = useMemo(() => {\n if (!editing) return undefined;\n if (!lastRowRange) return undefined;\n const suggestingNum = lastRowRange.min + 1;\n return suggestingNum + '';\n }, [editing, lastRowRange]);\n\n return (\n \n }\n value={rowInput ?? ''}\n onChange={(event) => {\n const value = parseInt(event.target.value);\n if (value > 0) {\n setRowInput(value);\n } else {\n setRowInput(undefined);\n }\n setInputError(undefined);\n }}\n onKeyDown={onCutomRowRangeKeyDown}\n onFocus={() => setEditing(true)}\n onBlur={onLeaveInput}\n placeholder={activePlaceholder}\n postfixDisplay={\n \n \n \n }\n >\n ↵\n \n }\n />\n \n );\n};\n","import { VenueMapColorSelector } from 'src/components/Events/VenueMap/VenueMap.types';\nimport { VenueMapContentProps } from 'src/components/Events/VenueMap/VenueMapContent';\nimport { SectionSectionGroup } from 'src/WebApiController';\n\nconst baseColors = [\n '#228B22', // Forest Green\n '#8B3A62', // Deep Rose\n '#008B8B', // Deep Cyan\n '#8B864E', // Dark Khaki\n '#8B3A8B', // Deep Magenta\n '#1F4F1F', // Deep Forest Green\n '#8B7355', // Deep Wheat\n '#8B4C39', // Deep Salmon\n '#8B7E66', // Deep Moccasin\n '#8B3E2F', // Deep Coral\n '#8B668B', // Deep Plum\n '#8B8B00', // Deep Yellow\n '#27408B', // Royal Blue\n '#8B3A3A', // Deep Red\n '#8B7B8B', // Deep Purple\n '#8B4726', // Deep Sienna\n '#704214', // Deep Sepia\n '#614051', // Deep Mauve\n '#683A5E', // Deep Wine\n '#4A2B45', // Deep Aubergine\n '#454B1B', // Deep Olive\n '#4B0082', // Deep Indigo\n '#2F4F4F', // Dark Slate Gray\n '#3C1414', // Deep Burgundy\n '#1B1B1B', // Almost Black\n '#3D1C02', // Deep Coffee\n '#2C1810', // Deep Brown\n '#371F1C', // Deep Mahogany\n '#302112', // Deep Umber\n '#32174D', // Russian Violet\n '#2B0202', // Dark Blood Red\n '#1A2421', // Dark Forest\n '#2C1608', // Deep Chocolate\n '#2F1B0C', // Dark Cinnamon\n '#251607', // Deep Espresso\n '#2C1103', // Dark Roast\n '#1F1200', // Deep Bronze\n '#251F1F', // Dark Charcoal\n '#28282B', // Dark Gunmetal\n '#483D8B', // Deep Slate Blue\n];\n\nexport const getRandomColor = (index: number): string => {\n if (index < baseColors.length) {\n return baseColors[index];\n }\n\n // Only pick a random one if we've run out of base colors to use for top level zones\n return baseColors[Math.floor(Math.random() * baseColors.length)];\n};\n\nexport const createGetColor = (\n sectionSectionGroupLookup?: { [key: string]: SectionSectionGroup } | null\n): NonNullable => {\n return ({ sectionId }: VenueMapColorSelector) => {\n if (!sectionId || sectionSectionGroupLookup == null) {\n return { fill: `#FFFFFF`, stroke: 'black' };\n }\n\n const colorMap = Object.fromEntries(\n Object.entries(sectionSectionGroupLookup).map(\n ([sectionId, sectionSectionGroup]) => [\n sectionId,\n {\n ...sectionSectionGroup,\n color: sectionSectionGroup.sectionGroupColor,\n },\n ]\n )\n );\n\n const sectionGroup = colorMap[sectionId];\n return { fill: `${sectionGroup?.color ?? '#FFFFFF'}`, stroke: 'black' };\n };\n};\n","import clsx from 'clsx';\nimport { isEmpty } from 'lodash-es';\nimport { useCallback, useMemo, useState } from 'react';\nimport { EventVenueMap } from 'src/components/Events/VenueMap/EventVenueMap';\nimport { createGetColor } from 'src/components/Listings/InventoryEventPage/utils/colorUtils';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { Button } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport * as styles from './GroupingMethods.css';\n\nexport const ZoneMap = () => {\n const [mapOverlay, setMapOverlay] = useState(true);\n const toggleZoneMap = useCallback(() => {\n setMapOverlay((prev) => !prev);\n }, []);\n\n const viewZoneMapText = useContent(ContentId.ViewZoneMap);\n const hideZoneMapText = useContent(ContentId.HideZoneMap);\n const buttonText = useMemo(\n () => (mapOverlay ? viewZoneMapText : hideZoneMapText),\n [hideZoneMapText, mapOverlay, viewZoneMapText]\n );\n\n const { venueZoneConfigs } = useEventMapContext();\n\n const getColor = useMemo(() => {\n if (isEmpty(venueZoneConfigs?.sectionSectionGroupLookup)) {\n return undefined;\n }\n return createGetColor(venueZoneConfigs?.sectionSectionGroupLookup);\n }, [venueZoneConfigs?.sectionSectionGroupLookup]);\n\n return (\n
    \n \n
    {venueZoneConfigs?.name}
    \n {mapOverlay && (\n \n {buttonText}\n \n )}\n
    \n \n
    \n \n
    \n \n {!mapOverlay && (\n
    \n \n
    \n )}\n \n );\n};\n","import { isEmpty, noop, size } from 'lodash-es';\nimport { ChangeEvent, useCallback, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { Button, Stack } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { BUCKET_OPTIONS_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { BucketType, Feature } from 'src/WebApiController';\n\nimport { GroupTypeToCID } from '../../GroupListingsV2.constants';\nimport * as commonStyles from '../../GroupListingsV2.css';\nimport {\n GroupListingsFormProps,\n GroupRange,\n ListingGroupBy,\n ListingGroupType,\n} from '../../GroupListingsV2.types';\nimport { SettingsTitle } from '../SettingsTitle';\nimport * as styles from './GroupingMethods.css';\nimport { InputRowRanges } from './InputRowRanges';\nimport { ZoneMap } from './ZoneMap';\n\nconst getDefaultRanges = (type: ListingGroupType): GroupRange[] | undefined => {\n if (type === ListingGroupType.Row) {\n return [\n { min: 1, max: 1 },\n { min: 2, max: 5 },\n { min: 6, max: Number.MAX_VALUE },\n ];\n }\n if (type === ListingGroupType.Quantity) {\n return [\n { min: 1, max: 4 },\n { min: 5, max: Number.MAX_VALUE },\n ];\n }\n\n if (type === ListingGroupType.UnitCost) {\n return [\n { min: 1, max: 100 },\n { min: 100, max: Number.MAX_VALUE },\n ];\n }\n\n return undefined;\n};\n\nconst BucketGroupingTypes = [\n ListingGroupType.Quantity,\n ListingGroupType.UnitCost,\n];\n\ntype GroupingMethodsProps = {};\n\nexport const GroupingMethods: React.FC = () => {\n const { watch, setValue } = useFormContext();\n\n const rowRangesText = useContent(ContentId.RowRanges);\n const addAnotherSplitText = useContent(ContentId.AddAnotherSplit);\n\n const groupBys = watch('groupBys');\n\n const primaryGroupBy = useMemo(() => {\n if (size(groupBys) < 1) {\n return null;\n }\n return groupBys[0];\n }, [groupBys]);\n\n const onPrimaryGroupTypeUpdate = useCallback(\n (type: ListingGroupType | null) => {\n if (type === null) {\n setValue('groupBys', []);\n } else {\n if (type === ListingGroupType.ZoneMap) {\n const groupBys: ListingGroupBy[] = [\n {\n groupingType: type,\n ranges: [\n { min: 1, max: 1 },\n { min: 2, max: 5 },\n { min: 6, max: Number.MAX_VALUE },\n ],\n },\n ];\n setValue('groupBys', groupBys);\n } else {\n const groupBys: ListingGroupBy[] = [{ groupingType: type }];\n setValue('groupBys', groupBys);\n }\n }\n },\n [setValue]\n );\n\n const onUpdateZoneMapRowRange = useCallback(\n (ranges: GroupRange[]) => {\n if (!primaryGroupBy) {\n return;\n }\n const updated = [...groupBys];\n const newGroupBy: ListingGroupBy = { ...primaryGroupBy, ranges };\n updated[0] = newGroupBy;\n setValue('groupBys', updated);\n },\n [groupBys, primaryGroupBy, setValue]\n );\n\n const primaryGroupOptions = useMemo(() => {\n const { Quantity, UnitCost, Row, None, ...cloned } = GroupTypeToCID;\n\n return cloned as Record;\n }, []);\n\n const groupBySubtitle = useMemo(() => {\n return (\n \n setValue('groupBys', [\n ...groupBys,\n { groupingType: ListingGroupType.None },\n ])\n }\n >\n {addAnotherSplitText}\n \n );\n }, [addAnotherSplitText, groupBys, setValue]);\n\n const canAddSecondaryThenBy = useMemo(() => {\n return groupBys.length === 1;\n }, [groupBys.length]);\n\n const canAddThirdThenBy = useMemo(() => {\n if (primaryGroupBy?.groupingType === ListingGroupType.ZoneMap) {\n return false;\n }\n return groupBys.length === 2;\n }, [groupBys.length, primaryGroupBy?.groupingType]);\n\n return (\n \n \n }\n subtitle={\n primaryGroupBy?.groupingType !== ListingGroupType.ZoneMap &&\n canAddSecondaryThenBy &&\n groupBySubtitle\n }\n />\n \n \n {primaryGroupBy?.groupingType === ListingGroupType.ZoneMap && (\n <>\n \n \n \n }\n subtitle={\n primaryGroupBy?.groupingType === ListingGroupType.ZoneMap &&\n canAddSecondaryThenBy &&\n groupBySubtitle\n }\n />\n \n \n \n
    \n \n )}\n <>\n setValue('groupBys', values)}\n subtitle={canAddThirdThenBy && groupBySubtitle}\n />\n {primaryGroupBy?.groupingType !== ListingGroupType.ZoneMap && (\n setValue('groupBys', values)}\n />\n )}\n \n \n );\n};\n\ntype ThenGroupByProps = {\n groupBys: ListingGroupBy[];\n groupLevel: number;\n subtitle?: React.ReactNode;\n onUpdateGroupBys: (groupBys: ListingGroupBy[]) => void;\n};\nconst ThenGroupBy: React.FC = ({\n groupLevel,\n groupBys,\n subtitle,\n onUpdateGroupBys,\n}) => {\n const hasGroupListingsWithRangedQuantityCostFeature = useUserHasFeature(\n Feature.GroupListingsWithRangedQuantityCost\n );\n const groupBy = useMemo(() => {\n if (groupBys.length <= groupLevel) {\n return undefined;\n }\n return groupBys[groupLevel];\n }, [groupBys, groupLevel]);\n\n const onUpdateGroupBy = useCallback(\n (type: ListingGroupType | null) => {\n if (type == null) {\n return;\n }\n if (type === ListingGroupType.None) {\n onUpdateGroupBys(groupBys.slice(0, groupLevel));\n return;\n }\n if (isEmpty(groupBy)) {\n onUpdateGroupBys([...groupBys, { groupingType: type }]);\n } else {\n const updated = [...groupBys];\n const newGroupBy: ListingGroupBy = {\n groupingType: type,\n numberOfBuckets: BucketGroupingTypes.includes(type) ? 2 : undefined,\n bucketOption: BucketGroupingTypes.includes(type)\n ? BucketType.Clusters\n : undefined,\n };\n\n if (hasGroupListingsWithRangedQuantityCostFeature) {\n const ranges = getDefaultRanges(type);\n Object.assign(newGroupBy, { ranges });\n }\n updated[groupLevel] = newGroupBy;\n onUpdateGroupBys(updated);\n }\n },\n [\n groupBy,\n groupBys,\n groupLevel,\n hasGroupListingsWithRangedQuantityCostFeature,\n onUpdateGroupBys,\n ]\n );\n\n const onUpdateGroupRanges = useCallback(\n (ranges: GroupRange[]) => {\n if (isEmpty(groupBy)) {\n return;\n }\n const updated = [...groupBys];\n const newGroupBy: ListingGroupBy = { ...groupBy, ranges };\n updated[groupLevel] = newGroupBy;\n onUpdateGroupBys(updated);\n },\n [groupBy, groupBys, groupLevel, onUpdateGroupBys]\n );\n\n const groupOptions = useMemo(() => {\n const { ZoneMap, ...cloned } = GroupTypeToCID;\n\n // Zone map is already splited by zone and section\n if (groupBys[0] && groupBys[0].groupingType === ListingGroupType.ZoneMap) {\n delete cloned[ListingGroupType.Zone];\n delete cloned[ListingGroupType.Section];\n delete cloned[ListingGroupType.Row]; // Row is included in the zone map ranges\n }\n for (let index = 0; index < groupBys.length; index++) {\n if (index < groupLevel) {\n const current = groupBys[index];\n if (\n current.groupingType !== ListingGroupType.ZoneMap &&\n current.groupingType !== ListingGroupType.None &&\n cloned[current.groupingType]\n ) {\n delete cloned[current.groupingType];\n }\n }\n }\n return cloned as Record;\n }, [groupBys, groupLevel]);\n\n const showBucketOption = useMemo(\n () =>\n groupBy?.groupingType &&\n [ListingGroupType.Quantity, ListingGroupType.UnitCost].includes(\n groupBy?.groupingType\n ),\n [groupBy?.groupingType]\n );\n\n if (groupLevel >= groupBys.length) {\n return undefined;\n }\n\n return (\n \n \n }\n subtitle={subtitle}\n />\n \n \n {hasGroupListingsWithRangedQuantityCostFeature &&\n groupBy?.groupingType &&\n groupBy.groupingType !== ListingGroupType.None && (\n \n )}\n {showBucketOption && !hasGroupListingsWithRangedQuantityCostFeature && (\n \n \n } />\n ) => {\n const v = parseInt(e.target.value);\n if (v >= 1) {\n if (v !== groupBy?.numberOfBuckets) {\n const updated = [...groupBys];\n updated[groupLevel] = {\n ...updated[groupLevel],\n numberOfBuckets: v,\n };\n onUpdateGroupBys(updated);\n }\n }\n }}\n />\n \n \n } />\n {\n if (v != null) {\n const updated = [...groupBys];\n updated[groupLevel] = {\n ...updated[groupLevel],\n bucketOption: v,\n };\n onUpdateGroupBys(updated);\n }\n }}\n />\n \n \n )}\n \n );\n};\n","import * as Collapsible from '@radix-ui/react-collapsible';\nimport clsx from 'clsx';\nimport { useState } from 'react';\nimport {\n ComponentProps,\n ComponentPropsWithoutRef,\n ComponentType,\n forwardRef,\n ReactNode,\n} from 'react';\nimport { vars } from 'src/core/themes';\nimport { mergeProps, styledComponent } from 'src/core/utils';\nimport { IconsFill, MinusIcon, PlusIcon } from 'src/svgs/Viagogo';\n\nimport * as styles from './GroupListingsSetting.css';\n\nexport type PosCollapsibleProps = Pick<\n ComponentProps,\n 'open' | 'onOpenChange'\n> & {\n trigger?: ReactNode;\n children?: ReactNode;\n};\n\nexport function PosCollapsible({\n open,\n onOpenChange,\n trigger,\n children,\n}: PosCollapsibleProps) {\n return (\n \n {trigger}\n {children}\n \n );\n}\n\nexport const Root = styledComponent(Collapsible.Root, styles.root);\n\nexport const Trigger = forwardRef<\n HTMLButtonElement,\n ComponentPropsWithoutRef & {\n ExpandIcon?: ComponentType<{ size: string; fill: IconsFill }>;\n FoldIcon?: ComponentType<{ size: string; fill: IconsFill }>;\n iconSize?: string;\n }\n>(function Content({ children, ...props }, ref) {\n return (\n \n
    \n
    {children}
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n );\n});\n\nexport const Content = styledComponent(Collapsible.Content, styles.content);\n\ntype GroupListingsSetting = {\n title: React.ReactNode;\n content: React.ReactNode;\n defaultToOpen?: boolean;\n};\n\nexport const GroupListingsSetting: React.FC = ({\n title,\n content,\n defaultToOpen = false,\n}) => {\n const [open, setOpen] = useState(defaultToOpen);\n return (\n setOpen(!open)}>\n {title}\n {content}\n \n );\n};\n","import { groupBy, keyBy } from 'lodash-es';\nimport { getContent, IContentContext } from 'src/contexts/ContentContext';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { kmeans, VectorWithData } from 'src/utils/kmeans';\nimport {\n BucketType,\n Listing,\n SectionInfo,\n SectionSectionGroup,\n} from 'src/WebApiController';\n\nimport {\n GroupRange,\n ListingGroupBy,\n ListingGroupType,\n} from './GroupListingsV2.types';\n\nexport type ListingGroup = {\n name: string;\n listings: Listing[];\n};\n\nconst getNameContent = (\n groupingType: ListingGroupType,\n contentContext: IContentContext\n) => {\n switch (groupingType) {\n case ListingGroupType.Section:\n return getContent(ContentId.Section, contentContext);\n case ListingGroupType.Row:\n return getContent(ContentId.Row, contentContext);\n case ListingGroupType.Zone:\n return getContent(ContentId.Zone, contentContext);\n case ListingGroupType.Quantity:\n return getContent(ContentId.UnsoldQty, contentContext);\n case ListingGroupType.UnitCost:\n return getContent(ContentId.UnitCost, contentContext);\n }\n\n return '';\n};\n\nexport class ListingGroupsGenerator {\n private listings: Listing[];\n private sections: SectionInfo[];\n private sectionGroups: SectionSectionGroup[];\n private listingGroups: ListingGroup[];\n constructor(\n listings: Listing[],\n sections: SectionInfo[],\n sectionGroups: SectionSectionGroup[]\n ) {\n this.listings = listings.filter(\n (listing) => listing.rowId || listing.seating.rowId\n );\n this.sections = sections;\n this.sectionGroups = sectionGroups;\n this.listingGroups = [{ name: '', listings: this.listings }];\n }\n\n public getListingGroups(): ListingGroup[] {\n return this.listingGroups;\n }\n\n public generateBaseZoneGroups(): ListingGroupsGenerator {\n const rowIdToSectionId = this.sections.reduce(\n (acc, section) => {\n for (const row of section.rows) {\n acc[row.id] = section.id;\n }\n return acc;\n },\n {} as Record\n );\n const sectionToSectionGroup = keyBy(\n this.sectionGroups,\n (group) => group.sectId\n );\n const sectionListings = groupBy(this.listings, (listing) => {\n if (listing.rowId) {\n return rowIdToSectionId[listing.rowId];\n }\n return rowIdToSectionId[listing.seating.rowId!];\n });\n const sectionGroups = Object.entries(sectionListings)\n .map(([sectionId, listings]) => {\n const sectionGroup = sectionToSectionGroup[sectionId];\n if (!sectionGroup) {\n return undefined;\n }\n const name = `${sectionGroup.ticketClassName} ${\n sectionGroup.sectionGroupAreaType ?? sectionGroup.sectionGroupAreaName\n }`;\n return {\n name,\n listings,\n };\n })\n .filter((group): group is ListingGroup => !!group);\n\n // Group by zone and area\n this.listingGroups = Object.entries(\n groupBy(sectionGroups, (group) => group.name)\n ).map(([name, groups]) => {\n return {\n name,\n listings: groups.flatMap((g) => g.listings),\n };\n });\n\n return this;\n }\n\n public splitByRanges(\n ranges: GroupRange[],\n type: ListingGroupType,\n contentContext: IContentContext\n ): ListingGroupsGenerator {\n if (ranges.length === 0) {\n return this;\n }\n const groupNamePrefix = getNameContent(type, contentContext);\n switch (type) {\n case ListingGroupType.Row:\n this.listingGroups = this.splitByRowRanges(ranges, groupNamePrefix);\n break;\n case ListingGroupType.Quantity:\n this.listingGroups = this.splitByQuantityRanges(\n ranges,\n groupNamePrefix\n );\n break;\n case ListingGroupType.UnitCost:\n this.listingGroups = this.splitByUnitCostRanges(\n ranges,\n groupNamePrefix\n );\n break;\n default:\n break;\n }\n\n return this;\n }\n\n public splitWithGroupBy(\n groupBy: ListingGroupBy,\n contentContext: IContentContext\n ): ListingGroupsGenerator {\n const { groupingType } = groupBy;\n const groupNamePrefix = getNameContent(groupingType, contentContext);\n switch (groupingType) {\n case ListingGroupType.Zone:\n this.listingGroups = this.splitByZone(groupNamePrefix);\n break;\n case ListingGroupType.Section:\n this.listingGroups = this.splitBySection(groupNamePrefix);\n break;\n case ListingGroupType.Row:\n this.listingGroups = this.splitByRow(groupNamePrefix);\n break;\n case ListingGroupType.Quantity:\n case ListingGroupType.UnitCost:\n this.listingGroups = this.splitByBucket(groupBy, groupNamePrefix);\n break;\n default:\n break;\n }\n return this;\n }\n\n private splitByRowRanges(\n ranges: GroupRange[],\n groupNamePrefix: string\n ): ListingGroup[] {\n const speculativeRowIds = this.sections.flatMap((section) =>\n section.rows.filter((row) => row.ordinal == null).map((row) => row.id)\n );\n const rowIdToIndex = this.sections.reduce(\n (res, section) => {\n const sortedRows = section.rows\n .filter((row) => row.ordinal != null)\n .toSorted((a, b) => a.ordinal! - b.ordinal!);\n for (const [index, row] of sortedRows.entries()) {\n res[row.id] = index + 1;\n }\n return res;\n },\n {} as Record\n );\n return this.listingGroups\n .flatMap((group) => {\n return ranges.map((range): ListingGroup | null => {\n const rangedListings = group.listings.filter((listing) => {\n const rowId = listing.rowId ?? listing.seating.rowId;\n if (rowId == null) {\n return false;\n }\n // Putting speculative rows to the first row range\n if (speculativeRowIds.includes(rowId)) {\n return range.min === 1;\n }\n const ordinal = rowIdToIndex[rowId];\n return ordinal && ordinal >= range.min && ordinal <= range.max;\n });\n if (rangedListings.length > 0) {\n const updatedName = `${group.name} ${groupNamePrefix} ${this.postfixNameFromRange(range)}`;\n return {\n name: updatedName,\n listings: rangedListings,\n };\n }\n return null;\n });\n })\n .filter((group: ListingGroup | null): group is ListingGroup => !!group);\n }\n\n private splitByQuantityRanges(\n ranges: GroupRange[],\n groupNamePrefix: string\n ): ListingGroup[] {\n return this.listingGroups.flatMap((group) => {\n return ranges\n .map((range) => {\n const rangedListings = group.listings.filter(\n (listing) =>\n listing.availQty >= range.min && listing.availQty <= range.max\n );\n if (rangedListings.length > 0) {\n const updatedName = `${group.name} ${groupNamePrefix} ${this.postfixNameFromRange(range)}`;\n return {\n name: updatedName,\n listings: rangedListings,\n };\n }\n return null;\n })\n .filter((group: ListingGroup | null): group is ListingGroup => !!group);\n });\n }\n\n private splitByUnitCostRanges(\n ranges: GroupRange[],\n groupNamePrefix: string\n ): ListingGroup[] {\n return this.listingGroups.flatMap((group) => {\n return ranges\n .map((range) => {\n const rangedListings = group.listings.filter(\n (listing) =>\n listing.unitCst?.amt &&\n listing.unitCst.amt >= range.min &&\n listing.unitCst.amt <= range.max\n );\n if (rangedListings.length > 0) {\n const updatedName = `${group.name} ${groupNamePrefix} ${this.postfixNameFromRange(range)}`;\n return {\n name: updatedName,\n listings: rangedListings,\n };\n }\n return null;\n })\n .filter((group: ListingGroup | null): group is ListingGroup => !!group);\n });\n }\n\n private splitByZone(groupNamePrefix: string): ListingGroup[] {\n const rowIdToZone = this.sections.reduce(\n (res, section) => {\n for (const row of section.rows) {\n res[row.id] = row.tktClass?.name ?? 'Unknown';\n }\n return res;\n },\n {} as Record\n );\n return this.listingGroups.flatMap((group) => {\n return Object.entries(\n groupBy(\n group.listings,\n (listing) => rowIdToZone[listing.rowId ?? 0] ?? 'Unknown'\n )\n )\n .map(([zone, listings]) => {\n return {\n name: this.getGroupName(group.name, groupNamePrefix, zone),\n listings,\n };\n })\n .filter((group) => group.listings.length > 0);\n });\n }\n\n private splitBySection(groupNamePrefix: string): ListingGroup[] {\n const rowIdToSection = this.sections.reduce(\n (res, section) => {\n for (const row of section.rows) {\n res[row.id] = section.name ?? 'Unknown';\n }\n return res;\n },\n {} as Record\n );\n return this.listingGroups.flatMap((group) => {\n return Object.entries(\n groupBy(group.listings, (listing) => rowIdToSection[listing.rowId ?? 0])\n )\n .map(([name, listings]) => {\n return {\n name: this.getGroupName(\n group.name,\n groupNamePrefix,\n name ?? 'Unknown'\n ),\n listings,\n };\n })\n .filter((group) => group.listings.length > 0);\n });\n }\n\n private splitByRow(groupNamePrefix: string): ListingGroup[] {\n const rowIdToName = this.sections.reduce(\n (res, section) => {\n for (const row of section.rows) {\n res[row.id] = row.name ?? 'Unknown';\n }\n return res;\n },\n {} as Record\n );\n return this.listingGroups.flatMap((group) => {\n return Object.entries(\n groupBy(group.listings, (listing) => rowIdToName[listing.rowId ?? 0])\n )\n .map(([name, listings]) => {\n return {\n name: this.getGroupName(\n group.name,\n groupNamePrefix,\n name ?? 'Unknown'\n ),\n listings,\n };\n })\n .filter((group) => group.listings.length > 0);\n });\n }\n\n private splitByBucket(\n groupBy: ListingGroupBy,\n groupNamePrefix: string\n ): ListingGroup[] {\n const { groupingType, numberOfBuckets, bucketOption } = groupBy;\n return this.listingGroups.flatMap((group) => {\n const listings = group.listings;\n const divider =\n bucketOption === BucketType.SameSize\n ? this.sameSizeDivider(listings, numberOfBuckets ?? 2)\n : this.kMeansDivider(listings, groupingType, numberOfBuckets ?? 2);\n return divider\n .map((listings, index) => {\n return {\n name: this.getGroupName(\n group.name,\n groupNamePrefix,\n `${index + 1}`\n ),\n listings,\n };\n })\n .filter((group) => group.listings.length > 0);\n });\n }\n\n private sameSizeDivider(\n listings: Listing[],\n numberOfBuckets: number\n ): Listing[][] {\n const bucketSize = Math.ceil(listings.length / numberOfBuckets);\n const result = [];\n for (let i = 0; i < listings.length; i += bucketSize) {\n result.push(listings.slice(i, i + bucketSize));\n }\n return result;\n }\n\n private kMeansDivider(\n listings: Listing[],\n groupType: ListingGroupType,\n numberOfBuckets: number\n ): Listing[][] {\n const sanitizedBuckets = Math.min(numberOfBuckets, listings.length);\n const dataset = listings.map(\n (listing) =>\n ({\n vector: [this.getListingClusterValue(listing, groupType)],\n data: listing,\n }) as VectorWithData\n );\n return kmeans(dataset, sanitizedBuckets).clusters.map((cluster) =>\n cluster.vectors.flatMap((v) => v.data)\n );\n }\n\n private getListingClusterValue(\n listing: Listing,\n groupingType: ListingGroupType\n ) {\n switch (groupingType) {\n case ListingGroupType.Quantity:\n return listing.availQty;\n case ListingGroupType.UnitCost:\n return listing.unitCst?.amt ?? 0;\n }\n }\n\n private getGroupName(prevName: string, subPrefix: string, value: string) {\n if (prevName.trim().length === 0) {\n return `${subPrefix} ${value}`;\n }\n return `${prevName} ${subPrefix} ${value}`;\n }\n\n private postfixNameFromRange(range: GroupRange) {\n const { min, max } = range;\n if (min === max) {\n return min;\n }\n if (max === Number.MAX_VALUE) {\n return `${min}+`;\n }\n return `${min}-${max}`;\n }\n}\n","import { isEmpty, size } from 'lodash-es';\nimport { useCallback, useMemo, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useInventoryEventBulkActionsState } from 'src/components/Events/EventListing/InventoryEventListing/BulkActions/InventoryEventBulkActions/useInventoryEventBulkActionsState';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { useContentContext } from 'src/contexts/ContentContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { newGuidId } from 'src/utils/idUtils';\nimport {\n Event,\n Listing,\n ListingGroupItemInput,\n MergeListingGroupInput,\n RowGroupSetting,\n} from 'src/WebApiController';\n\nimport { flattenListingGroup } from '../GroupListings/components/groupingUtils';\nimport {\n groupPrioritySort,\n useGroupSortingCriteria,\n} from '../GroupListings/components/ListingGroupInput.hook';\nimport {\n GroupListingsFormProps,\n GroupListingsState,\n GroupSortByType,\n ListingGroupType,\n} from './GroupListingsV2.types';\nimport { ListingGroupsGenerator } from './ZoneMapGroupsGenerator';\n\nconst stringSortWrapper = (\n a: string | null | undefined,\n b: string | null | undefined\n) => {\n const parsedA = parseFloat(a ?? '');\n const parsedB = parseFloat(b ?? '');\n if (isNaN(parsedA) || isNaN(parsedB)) {\n return (a ?? '').localeCompare(b ?? '');\n }\n return parsedA - parsedB;\n};\n\nconst rowRangeFromGroupSetting = (rowGroupSetting: RowGroupSetting) => {\n switch (rowGroupSetting) {\n case RowGroupSetting.OneToFiveSixPlus:\n return [\n { min: 1, max: 5 },\n { min: 6, max: Number.MAX_VALUE },\n ];\n case RowGroupSetting.OneToTenElevenPlus:\n return [\n { min: 1, max: 10 },\n { min: 11, max: Number.MAX_VALUE },\n ];\n case RowGroupSetting.SingleTwoToFiveSixPlus:\n return [\n { min: 1, max: 1 },\n { min: 2, max: 5 },\n { min: 6, max: Number.MAX_VALUE },\n ];\n case RowGroupSetting.OneTwoToFiveSixToTwelveThirteenPlus:\n return [\n { min: 1, max: 1 },\n { min: 2, max: 5 },\n { min: 6, max: 12 },\n { min: 13, max: Number.MAX_VALUE },\n ];\n default:\n return [];\n }\n};\n\nconst sortGroupListings = (\n groupListings: T[],\n eventListings: Listing[],\n groupSort?: GroupSortByType | null\n) => {\n if (!groupSort) {\n return groupListings;\n }\n const groupListingIds = groupListings.map((l) => l.listingId);\n\n const isAssending = ![\n GroupSortByType.RowDesc,\n GroupSortByType.SectionDesc,\n GroupSortByType.UnsoldQuantityDesc,\n ].includes(groupSort);\n const orderFactor = isAssending ? 1 : -1;\n const sortedListingIds = eventListings\n .filter((l) => groupListingIds.includes(l.id))\n .toSorted((a, b) => {\n if (\n [GroupSortByType.SectionAsc, GroupSortByType.SectionDesc].includes(\n groupSort\n )\n ) {\n return (\n orderFactor *\n stringSortWrapper(a.seating?.section, b.seating?.section)\n );\n }\n if (\n [GroupSortByType.RowAsc, GroupSortByType.RowDesc].includes(groupSort)\n ) {\n return orderFactor * stringSortWrapper(a.seating?.row, b.seating?.row);\n }\n\n return orderFactor * (a.availQty - b.availQty);\n })\n .map((l) => l.id);\n\n return groupListings\n .toSorted((a, b) => {\n return (\n sortedListingIds.indexOf(a.listingId) -\n sortedListingIds.indexOf(b.listingId)\n );\n })\n .map((l, index) => ({ ...l, priority: index + 1 }));\n};\n\nexport const useSetListingGroupValue = (listingGroupId: string) => {\n const { watch, setValue } = useFormContext();\n const listingGroups = watch('mergeListingGroupInputs');\n\n const setListingGroupValue = useCallback(\n (value: Partial) => {\n setValue(\n 'mergeListingGroupInputs',\n listingGroups.map((group) => {\n if (group.listingGroupId === listingGroupId) {\n return {\n ...group,\n ...value,\n };\n }\n return group;\n })\n );\n },\n [listingGroupId, listingGroups, setValue]\n );\n\n return setListingGroupValue;\n};\n\nconst useLoadListingGroups = (\n event: Event,\n listings: Listing[],\n input: GroupListingsFormProps\n) => {\n const { venueMapInfo, venueZoneConfigs } = useEventMapContext();\n\n const idToSortingCriteria = useGroupSortingCriteria(listings);\n const contentContext = useContentContext();\n\n const loadFromZoneMap = useCallback((): MergeListingGroupInput[] => {\n if (isEmpty(venueZoneConfigs?.sectionSectionGroupLookup)) {\n return [];\n }\n const rowRanges = input.groupBys[0].ranges ?? [];\n\n let generator = new ListingGroupsGenerator(\n listings,\n venueMapInfo?.sections ?? [],\n Object.values(venueZoneConfigs?.sectionSectionGroupLookup ?? {})\n )\n .generateBaseZoneGroups()\n .splitByRanges(rowRanges, ListingGroupType.Row, contentContext);\n\n if (input.groupBys.length > 1) {\n const secondaryGroup = input.groupBys[1];\n if (isEmpty(secondaryGroup.ranges)) {\n generator = generator.splitWithGroupBy(secondaryGroup, contentContext);\n } else {\n generator = generator.splitByRanges(\n secondaryGroup.ranges ?? [],\n secondaryGroup.groupingType,\n contentContext\n );\n }\n }\n\n return generator.getListingGroups().map((group): MergeListingGroupInput => {\n const listingGroupId = newGuidId();\n const { undAbsAmt, undRelAmt } = input.groupUndercutSettings ?? {};\n\n const items = sortGroupListings(\n group.listings.map((l, i) => ({\n ...l,\n listingId: l.id,\n priority: i + 1,\n })),\n listings,\n input.groupSortBy\n )\n .toSorted(\n groupPrioritySort(idToSortingCriteria, input.deprioritizedQuantities)\n )\n .map((l, i): ListingGroupItemInput => {\n const undercutSetting = {\n undAbsAmt: undAbsAmt ? undAbsAmt * i : null,\n undRelAmt: undRelAmt ? Math.min(undRelAmt * i, 1) : null,\n actRankUndAbsAmt: null,\n actRankUndRelAmt: null,\n };\n return {\n listingId: l.listingId,\n priority: i + 1,\n undercutSetting,\n groupId: l.ltGrpId,\n };\n });\n return {\n listingGroupId,\n name: group.name,\n minActiveListings: null,\n maxActiveListings: null,\n targetPercentage: null,\n viagogoEventId: event.viagId,\n viagogoMappingId: event.mappingId,\n desiredActiveListings: input.desiredActiveListings,\n deprioritizedQuantities: input.deprioritizedQuantities,\n marketplaceSettings: input.marketplaceSettings,\n groupUndercutSetting: input.groupUndercutSettings,\n listingGroupItems: items,\n groupingMethods: null,\n };\n });\n }, [\n venueZoneConfigs?.sectionSectionGroupLookup,\n input.groupBys,\n input.groupUndercutSettings,\n input.groupSortBy,\n input.deprioritizedQuantities,\n input.desiredActiveListings,\n input.marketplaceSettings,\n listings,\n venueMapInfo?.sections,\n contentContext,\n idToSortingCriteria,\n event.viagId,\n event.mappingId,\n ]);\n\n const loadFromGroupBys = useCallback(() => {\n let generator = new ListingGroupsGenerator(\n listings,\n venueMapInfo?.sections ?? [],\n Object.values(venueZoneConfigs?.sectionSectionGroupLookup ?? {})\n );\n\n for (const groupBy of input.groupBys) {\n if (isEmpty(groupBy.ranges)) {\n generator = generator.splitWithGroupBy(groupBy, contentContext);\n } else {\n generator = generator.splitByRanges(\n groupBy.ranges ?? [],\n groupBy.groupingType,\n contentContext\n );\n }\n }\n\n const { undAbsAmt, undRelAmt } = input.groupUndercutSettings ?? {};\n\n return generator.getListingGroups().map((group): MergeListingGroupInput => {\n const listingGroupId = newGuidId();\n const sortedItems = sortGroupListings(\n group.listings.map((l, i) => ({\n ...l,\n listingId: l.id,\n priority: i + 1,\n })),\n listings,\n input.groupSortBy\n )\n .toSorted(\n groupPrioritySort(idToSortingCriteria, input.deprioritizedQuantities)\n )\n .map((l, i): ListingGroupItemInput => {\n const undercutSetting = {\n undAbsAmt: undAbsAmt ? undAbsAmt * i : null,\n undRelAmt: undRelAmt ? Math.min(undRelAmt * i, 1) : null,\n actRankUndAbsAmt: null,\n actRankUndRelAmt: null,\n };\n return {\n listingId: l.listingId,\n priority: i + 1,\n undercutSetting,\n groupId: l.ltGrpId,\n };\n });\n return {\n listingGroupId,\n name: group.name,\n minActiveListings: null,\n maxActiveListings: null,\n targetPercentage: null,\n viagogoEventId: event.viagId,\n viagogoMappingId: event.mappingId,\n desiredActiveListings: input.desiredActiveListings,\n deprioritizedQuantities: input.deprioritizedQuantities,\n marketplaceSettings: input.marketplaceSettings,\n groupUndercutSetting: input.groupUndercutSettings,\n listingGroupItems: sortedItems,\n groupingMethods: null,\n };\n });\n }, [\n contentContext,\n event.mappingId,\n event.viagId,\n idToSortingCriteria,\n input.deprioritizedQuantities,\n input.desiredActiveListings,\n input.groupBys,\n input.groupSortBy,\n input.groupUndercutSettings,\n input.marketplaceSettings,\n listings,\n venueMapInfo?.sections,\n venueZoneConfigs?.sectionSectionGroupLookup,\n ]);\n\n return {\n loadFromGroupBys,\n loadFromZoneMap,\n };\n};\n\nexport const useEventListings = (event: Event) => {\n const { eventsTransformed } = useCatalogDataContext();\n\n const eventDate = useMemo(() => {\n return (\n eventsTransformed?.find(\n (e) => e.event.viagVirtualId === event.viagVirtualId\n ) ?? null\n );\n }, [event.viagVirtualId, eventsTransformed]);\n\n const { filterQueryWithEventIds } = useInventoryEventBulkActionsState(event);\n\n const eventListings = useMemo(() => {\n const selectedListingIds = filterQueryWithEventIds.entityIds ?? [];\n if (\n selectedListingIds.length === 0 ||\n eventDate?.entities?.listings == null\n ) {\n return (\n (eventDate?.entities?.listings?.flatMap(\n flattenListingGroup\n ) as Listing[]) ?? []\n );\n }\n\n return (\n (eventDate?.entities?.listings\n .filter((l) => selectedListingIds.includes(l.id))\n .flatMap(flattenListingGroup) as Listing[]) ?? []\n );\n }, [filterQueryWithEventIds.entityIds, eventDate?.entities?.listings]);\n\n return eventListings;\n};\n\nexport const useGroupListingsAction = (\n event: Event,\n onSubmit: (input: GroupListingsFormProps) => void\n) => {\n const [state, setState] = useState(\n GroupListingsState.Configure\n );\n\n const eventListings = useEventListings(event);\n\n const { watch, setValue, handleSubmit } =\n useFormContext();\n const input = watch();\n\n const primaryGroupType = useMemo(() => {\n if (size(input.groupBys) < 1) {\n return null;\n }\n return input.groupBys[0].groupingType;\n }, [input.groupBys]);\n\n const { loadFromGroupBys, loadFromZoneMap } = useLoadListingGroups(\n event,\n eventListings,\n input\n );\n\n const onFooterNav = useCallback(\n (back = false) => {\n // Move from configure to preview\n if (state === GroupListingsState.Configure) {\n if (primaryGroupType === ListingGroupType.ZoneMap) {\n const groups = loadFromZoneMap();\n setValue('mergeListingGroupInputs', groups);\n } else {\n const groups = loadFromGroupBys();\n setValue('mergeListingGroupInputs', groups);\n }\n setState(GroupListingsState.Review);\n }\n\n // Submit\n if (state === GroupListingsState.Review) {\n if (back) {\n setState(GroupListingsState.Configure);\n } else {\n handleSubmit(onSubmit)();\n }\n }\n },\n [\n state,\n primaryGroupType,\n loadFromZoneMap,\n setValue,\n loadFromGroupBys,\n handleSubmit,\n onSubmit,\n ]\n );\n\n return {\n state,\n onFooterNav,\n eventListings,\n };\n};\n","import { isEmpty } from 'lodash-es';\nimport {\n ListingGroupItemInput,\n ListingGroupUndercutSetting,\n} from 'src/WebApiController';\n\nexport const withGroupUndercustSettings = (\n groupUndercutSetting: ListingGroupUndercutSetting | null,\n listingGroupItems: ListingGroupItemInput[]\n): ListingGroupItemInput[] => {\n if (isEmpty(listingGroupItems)) {\n return listingGroupItems;\n }\n const { undAbsAmt, undRelAmt } = groupUndercutSetting ?? {};\n return listingGroupItems.map((listing, index): ListingGroupItemInput => {\n const undercutSetting: ListingGroupUndercutSetting = {\n undAbsAmt: undAbsAmt ? undAbsAmt * index : null,\n undRelAmt: undRelAmt ? Math.min(undRelAmt * index, 1) : null,\n actRankUndAbsAmt: null,\n actRankUndRelAmt: null,\n };\n return {\n ...listing,\n undercutSetting,\n };\n });\n};\n","import { sum } from 'lodash-es';\nimport {\n ComponentProps,\n ReactNode,\n useCallback,\n useMemo,\n useState,\n} from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { CancelButton } from 'src/components/Buttons';\nimport { OkButton } from 'src/components/Buttons/OkButton';\nimport { Content } from 'src/contexts/ContentContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { PosSelect } from 'src/core/POS/PosSelect';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { Button, Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { newGuidId } from 'src/utils/idUtils';\nimport { Listing, MergeListingGroupInput } from 'src/WebApiController';\n\nimport * as styles from './GroupListingsPreview.css';\nimport { UngroupedListingGroupId } from './GroupListingsPreviewTable.constants';\n\nexport type MoveListingGroupItem = Pick<\n MergeListingGroupInput,\n 'listingGroupId' | 'name' | 'listingGroupItems'\n>;\n\ntype MoveListingGroupDialogProps = ComponentProps & {\n onClose: () => void;\n currentListingGroupId?: string;\n listings: Listing[];\n listingGroups: MoveListingGroupItem[];\n onMoveListingToGroup: (\n targetListingGroupId: string,\n newGroupName?: string\n ) => void;\n canAddNewGroup?: boolean;\n};\n\nexport const MoveListingGroupDialog: React.FC = ({\n currentListingGroupId,\n listingGroups,\n listings,\n onMoveListingToGroup,\n onClose,\n canAddNewGroup = false,\n ...rest\n}) => {\n const [targetListingGroupId, setTargetListingGroupId] = useState();\n const [groupMode, setGroupMode] = useState<'Select' | 'Create'>('Select');\n const [newGroupName, setNewGroupName] = useState(null);\n const [groups, setGroups] = useState(listingGroups);\n\n const onConfirm = useCallback(() => {\n if (groupMode === 'Select') {\n if (targetListingGroupId) {\n const targetGroup = groups.find(\n (group) => group.listingGroupId === targetListingGroupId\n );\n onMoveListingToGroup(targetListingGroupId, targetGroup?.name);\n }\n } else {\n if (!newGroupName) {\n return;\n }\n const newListingGroupId = newGuidId();\n setGroups((prev) => {\n return [\n ...prev,\n {\n listingGroupId: newListingGroupId,\n name: newGroupName,\n listingGroupItems: [],\n },\n ];\n });\n setNewGroupName(null);\n setGroupMode('Select');\n setTargetListingGroupId(newListingGroupId);\n }\n }, [\n groupMode,\n groups,\n newGroupName,\n onMoveListingToGroup,\n targetListingGroupId,\n ]);\n\n const idToListing = useMemo(() => {\n return listings.reduce(\n (res, listing) => {\n res[listing.id] = listing;\n return res;\n },\n {} as Record\n );\n }, [listings]);\n\n const [groupOptions, contentOptions] = useMemo(() => {\n const groupOptions = groups.reduce(\n (res, group) => {\n if (\n group.listingGroupId !== currentListingGroupId &&\n group.listingGroupId !== UngroupedListingGroupId\n ) {\n res[group.listingGroupId] = group.name;\n }\n return res;\n },\n {} as Record\n );\n\n const contentOptions = groups.reduce(\n (res, group) => {\n if (\n group.listingGroupId !== currentListingGroupId &&\n group.listingGroupId !== UngroupedListingGroupId\n ) {\n const groupListings = group.listingGroupItems.map(\n (item) => idToListing[item.listingId]\n );\n const availableQuantity = sum(\n groupListings.map((listing) => listing?.availQty ?? 0)\n );\n const total = sum(\n groupListings.map((listing) => listing?.ticketCnt ?? 0)\n );\n res[group.listingGroupId] = (\n \n
    {group.name}
    \n \n \n
    \n :\n
    \n
    {total}
    \n
    \n \n
    \n :\n
    \n
    \n {availableQuantity}\n
    \n
    \n
    \n \n );\n }\n return res;\n },\n {} as Record\n );\n return [groupOptions, contentOptions];\n }, [currentListingGroupId, idToListing, groups]);\n\n const content = useMemo(() => {\n if (groupMode === 'Select') {\n return (\n \n
    \n :\n
    \n \n
    \n );\n }\n\n return (\n \n
    \n :\n
    \n {\n const newValue = e.target.value?.length ? e.target.value : null;\n if (newGroupName !== newValue) {\n setNewGroupName(newValue);\n }\n }}\n maxLength={200}\n />\n
    \n );\n }, [\n contentOptions,\n groupMode,\n groupOptions,\n newGroupName,\n targetListingGroupId,\n ]);\n\n const actionButton = useMemo(() => {\n if (!canAddNewGroup) {\n return undefined;\n }\n if (groupMode === 'Select') {\n return (\n \n );\n }\n return (\n \n );\n }, [canAddNewGroup, groupMode]);\n\n const readyToSubmit = useMemo(() => {\n if (groupMode === 'Select') {\n return targetListingGroupId;\n }\n return newGroupName;\n }, [groupMode, newGroupName, targetListingGroupId]);\n\n return (\n <>\n }\n footer={\n \n {actionButton}\n \n \n \n \n \n }\n onCancel={onClose}\n >\n {content}\n \n \n );\n};\n","import {\n closestCenter,\n DndContext,\n DragEndEvent,\n KeyboardSensor,\n MouseSensor,\n UniqueIdentifier,\n useSensor,\n useSensors,\n} from '@dnd-kit/core';\nimport {\n arrayMove,\n SortableContext,\n useSortable,\n verticalListSortingStrategy,\n} from '@dnd-kit/sortable';\nimport { CSS } from '@dnd-kit/utilities';\nimport {\n flexRender,\n getCoreRowModel,\n Row,\n useReactTable,\n} from '@tanstack/react-table';\nimport { useCallback, useMemo, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { vars } from 'src/core/themes';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport {\n groupPrioritySort,\n useGroupSortingCriteria,\n} from 'src/modals/GroupListings/components/ListingGroupInput.hook';\nimport {\n Listing,\n ListingGroupItemInput,\n ListingGroupUndercutSetting,\n MergeListingGroupInput,\n} from 'src/WebApiController';\n\nimport { useSetListingGroupValue } from '../../GroupListingsV2.hooks';\nimport { GroupListingsFormProps } from '../../GroupListingsV2.types';\nimport * as styles from './GroupListingsPreview.css';\nimport {\n UngroupedListingGroupId,\n usePreviewTableColumns,\n} from './GroupListingsPreviewTable.constants';\nimport { withGroupUndercustSettings } from './GroupsPreview.utils';\nimport { MoveListingGroupDialog } from './MoveListingGroupDialog';\n\nexport type GroupListingTableItem = ListingGroupItemInput & Listing;\n\ntype GroupListingPreviewTableProps = {\n listingGroup: MergeListingGroupInput;\n eventListings: Listing[];\n isUngroupedGroup: boolean;\n};\n\n// Row Component\nconst DraggableRow = ({ row }: { row: Row }) => {\n const { transform, transition, setNodeRef, isDragging } = useSortable({\n id: row.original.id,\n });\n\n return (\n \n {row.getVisibleCells().map((cell) => (\n
    \n ))}\n \n );\n};\n\nexport const GroupListingPreviewTable: React.FC<\n GroupListingPreviewTableProps\n> = ({ listingGroup, eventListings, isUngroupedGroup }) => {\n const { watch, setValue } = useFormContext();\n const listingGroups = watch('mergeListingGroupInputs');\n\n const [targetListingId, setTargetListingId] = useState();\n\n const moveListingGroupDialog = useBasicDialog();\n\n const idToSortingCriteria = useGroupSortingCriteria(eventListings);\n\n const setListingGroupValue = useSetListingGroupValue(\n listingGroup.listingGroupId\n );\n\n const listingIdToItem = useMemo(\n () =>\n listingGroup.listingGroupItems.reduce(\n (res, item) => {\n res[item.listingId] = item;\n return res;\n },\n {} as Record\n ),\n [listingGroup.listingGroupItems]\n );\n\n const listings = useMemo((): GroupListingTableItem[] => {\n const groupListingIds = Object.keys(listingIdToItem);\n return eventListings\n .filter((listing) => groupListingIds.includes(listing.id + ''))\n .map((listing) => ({ ...listing, ...listingIdToItem[listing.id] }))\n .toSorted((a, b) => a.priority - b.priority);\n }, [eventListings, listingIdToItem]);\n\n const listingIds = useMemo(\n () => listings.map(({ id }) => id),\n [listings]\n );\n\n const onMoveListing = useCallback(\n (listingId: number) => {\n setTargetListingId(listingId);\n moveListingGroupDialog.launchDialog();\n },\n [moveListingGroupDialog]\n );\n\n const onRemoveListingFromGroup = useCallback(\n (listingId: number) => {\n const updatedListings = withGroupUndercustSettings(\n listingGroup.groupUndercutSetting,\n listingGroup.listingGroupItems.filter(\n (item) => item.listingId !== listingId\n )\n ).map((item, index) => ({\n ...item,\n priority: index + 1,\n }));\n setListingGroupValue({\n listingGroupItems: updatedListings,\n });\n },\n [\n listingGroup.groupUndercutSetting,\n listingGroup.listingGroupItems,\n setListingGroupValue,\n ]\n );\n\n const onMoveListingToGroup = useCallback(\n (targetListingGroupId: string) => {\n if (!targetListingId) {\n return;\n }\n const targetListing = listings.find(\n ({ listingId }) => listingId === targetListingId\n );\n if (!targetListing) {\n return;\n }\n\n const idToGroup = listingGroups.reduce(\n (res, group) => {\n res[group.listingGroupId] = group;\n return res;\n },\n {} as Record\n );\n\n const toGroup = idToGroup[targetListingGroupId];\n\n if (listingGroup.listingGroupId === UngroupedListingGroupId) {\n const newItems = [\n ...toGroup.listingGroupItems,\n {\n listingId: targetListing.id,\n priority: toGroup.listingGroupItems.length + 1,\n groupId: targetListing.ltGrpId,\n undercutSetting: null,\n } as ListingGroupItemInput,\n ];\n\n idToGroup[targetListingGroupId] = {\n ...toGroup,\n listingGroupItems: withGroupUndercustSettings(\n toGroup.groupUndercutSetting,\n newItems\n )\n .toSorted(\n groupPrioritySort(\n idToSortingCriteria,\n toGroup.deprioritizedQuantities\n )\n )\n .map((listing, index) => ({\n ...listing,\n priority: index + 1,\n })),\n };\n } else {\n const fromGroup = idToGroup[listingGroup.listingGroupId];\n\n const targetListingGroupItem = fromGroup.listingGroupItems.find(\n ({ listingId }) => listingId === targetListingId\n );\n if (!targetListingGroupItem || !targetListing) {\n return;\n }\n\n idToGroup[listingGroup.listingGroupId] = {\n ...fromGroup,\n listingGroupItems: withGroupUndercustSettings(\n fromGroup.groupUndercutSetting,\n fromGroup.listingGroupItems.filter(\n ({ listingId }) => listingId !== targetListingId\n )\n ).map((listing, index) => ({\n ...listing,\n priority: index + 1,\n })),\n };\n\n const targetGroupItems = [\n ...toGroup.listingGroupItems,\n { ...targetListingGroupItem, groupId: targetListing.ltGrpId },\n ];\n idToGroup[targetListingGroupId] = {\n ...toGroup,\n listingGroupItems: withGroupUndercustSettings(\n toGroup.groupUndercutSetting,\n targetGroupItems\n )\n .toSorted(\n groupPrioritySort(\n idToSortingCriteria,\n toGroup.deprioritizedQuantities\n )\n )\n .map((listing, index) => ({\n ...listing,\n priority: index + 1,\n })),\n };\n }\n\n setValue('mergeListingGroupInputs', Object.values(idToGroup));\n moveListingGroupDialog.closeDialog();\n },\n [\n idToSortingCriteria,\n listingGroup.listingGroupId,\n listingGroups,\n listings,\n moveListingGroupDialog,\n setValue,\n targetListingId,\n ]\n );\n\n const columns = usePreviewTableColumns(\n listingGroup.desiredActiveListings,\n isUngroupedGroup,\n onRemoveListingFromGroup,\n onMoveListing\n );\n\n const table = useReactTable({\n data: listings,\n columns,\n getCoreRowModel: getCoreRowModel(),\n getRowId: (row) => row.id + '',\n sortingFns: {},\n });\n\n // reorder rows after drag & drop\n function handleDragEnd(event: DragEndEvent) {\n const { active, over } = event;\n if (active && over && active.id !== over.id) {\n const oldIndex = listingIds.indexOf(active.id);\n const newIndex = listingIds.indexOf(over.id);\n const reordered = arrayMove(listings, oldIndex, newIndex);\n const updateGroupItems = reordered.map(\n (listing, index): ListingGroupItemInput => {\n const { undAbsAmt, undRelAmt } =\n listingGroup.groupUndercutSetting ?? {};\n const undercutSetting: ListingGroupUndercutSetting = {\n undAbsAmt: undAbsAmt ? undAbsAmt * index : null,\n undRelAmt: undRelAmt ? undRelAmt * index : null,\n actRankUndAbsAmt: null,\n actRankUndRelAmt: null,\n };\n return {\n listingId: listing.id,\n groupId: listing.ltGrpId,\n priority: index + 1,\n undercutSetting,\n };\n }\n );\n setListingGroupValue({\n listingGroupItems: updateGroupItems,\n });\n }\n }\n\n const sensors = useSensors(\n useSensor(MouseSensor, {}),\n useSensor(KeyboardSensor, {})\n );\n\n return (\n <>\n \n
    \n {flexRender(cell.column.columnDef.cell, cell.getContext())}\n
    \n \n {table.getHeaderGroups().map((headerGroup) => (\n \n {headerGroup.headers.map((header) => (\n \n {header.isPlaceholder\n ? null\n : flexRender(\n header.column.columnDef.header,\n header.getContext()\n )}\n \n ))}\n \n ))}\n \n \n \n {table.getRowModel().rows.map((row) => (\n \n ))}\n \n \n
    \n \n \n \n );\n};\n","import { isEqual } from 'lodash-es';\nimport { useCallback, useMemo, useState } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosMultiSelect } from 'src/core/POS/PosMultiSelect';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { ToggleGroup } from 'src/core/ui/ToggleGroup';\nimport { getQuantitiesOptions } from 'src/modals/GroupListings/components/groupingUtils';\nimport {\n groupPrioritySort,\n useGroupSortingCriteria,\n} from 'src/modals/GroupListings/components/ListingGroupInput.hook';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n Listing,\n ListingGroupItemInput,\n MergeListingGroupInput,\n} from 'src/WebApiController';\n\nimport { useSetListingGroupValue } from '../../GroupListingsV2.hooks';\nimport { RankPremiumType } from '../../GroupListingsV2.types';\nimport * as styles from './GroupListingsPreview.css';\nimport { GroupListingPreviewTable } from './GroupListingsPreviewTable';\nimport { UngroupedListingGroupId } from './GroupListingsPreviewTable.constants';\nimport { withGroupUndercustSettings } from './GroupsPreview.utils';\n\nexport const RelativeAbsoluteGroupOptions = [\n { value: RankPremiumType.Relative, children: '%' },\n { value: RankPremiumType.Absolute, children: '$' },\n];\n\ntype GroupListingsPreviewProps = {\n listingGroup: MergeListingGroupInput;\n eventListings: Listing[];\n};\n\nexport const GroupListingsPreview: React.FC = ({\n listingGroup,\n eventListings,\n}) => {\n const setListingGroupValue = useSetListingGroupValue(\n listingGroup.listingGroupId\n );\n\n const isUngroupedGroup = useMemo(\n () => listingGroup.listingGroupId === UngroupedListingGroupId,\n [listingGroup.listingGroupId]\n );\n\n const idToSortingCriteria = useGroupSortingCriteria(eventListings);\n\n const [rankPremium, setRankPremium] = useState(() =>\n listingGroup.groupUndercutSetting?.undAbsAmt\n ? RankPremiumType.Absolute\n : RankPremiumType.Relative\n );\n\n const premiumValue = useMemo(() => {\n if (rankPremium === RankPremiumType.Absolute) {\n return listingGroup.groupUndercutSetting?.undAbsAmt ?? undefined;\n }\n if (listingGroup.groupUndercutSetting?.undRelAmt != null) {\n return listingGroup.groupUndercutSetting?.undRelAmt * 100;\n }\n return undefined;\n }, [\n listingGroup.groupUndercutSetting?.undAbsAmt,\n listingGroup.groupUndercutSetting?.undRelAmt,\n rankPremium,\n ]);\n\n const onRankPremiumChange = useCallback(\n (premium: string) => {\n if (premium === rankPremium) {\n return;\n }\n const { groupUndercutSetting, listingGroupItems } = listingGroup;\n const value =\n groupUndercutSetting?.undAbsAmt ??\n groupUndercutSetting?.undRelAmt ??\n null;\n let undercutSetting;\n if (premium === RankPremiumType.Absolute) {\n undercutSetting = {\n actRankUndAbsAmt: null,\n actRankUndRelAmt: null,\n undRelAmt: null,\n undAbsAmt: value ? value * 100 : null,\n };\n } else {\n undercutSetting = {\n actRankUndAbsAmt: null,\n actRankUndRelAmt: null,\n undRelAmt: value ? Math.min(value, 100) / 100 : null,\n undAbsAmt: null,\n };\n }\n setListingGroupValue({\n groupUndercutSetting: undercutSetting,\n listingGroupItems: withGroupUndercustSettings(\n undercutSetting,\n listingGroupItems\n ),\n });\n setRankPremium(premium as RankPremiumType);\n },\n [listingGroup, rankPremium, setListingGroupValue]\n );\n\n const onPremiumValueChange: React.ChangeEventHandler =\n useCallback(\n (event) => {\n const value = parseFloat(event.target.value);\n let undercutSetting;\n if (rankPremium === RankPremiumType.Absolute) {\n undercutSetting = {\n actRankUndAbsAmt: null,\n actRankUndRelAmt: null,\n undRelAmt: null,\n undAbsAmt: isNaN(value) ? null : value,\n };\n }\n if (rankPremium === RankPremiumType.Relative) {\n undercutSetting = {\n actRankUndAbsAmt: null,\n actRankUndRelAmt: null,\n undRelAmt: isNaN(value) ? null : Math.min(value, 100) / 100,\n undAbsAmt: null,\n };\n }\n if (undercutSetting) {\n setListingGroupValue({\n groupUndercutSetting: undercutSetting,\n listingGroupItems: withGroupUndercustSettings(\n undercutSetting,\n listingGroup.listingGroupItems\n ),\n });\n }\n },\n [listingGroup.listingGroupItems, rankPremium, setListingGroupValue]\n );\n\n const onUpdateDeprioritizeQuantities = useCallback(\n (newValues: string[]) => {\n if (!isEqual(newValues, listingGroup.deprioritizedQuantities)) {\n setListingGroupValue({\n deprioritizedQuantities: newValues,\n listingGroupItems: listingGroup.listingGroupItems\n .toSorted(groupPrioritySort(idToSortingCriteria, newValues))\n .map((l, i): ListingGroupItemInput => {\n return {\n ...l,\n priority: i + 1,\n };\n }),\n });\n }\n },\n [\n idToSortingCriteria,\n listingGroup.deprioritizedQuantities,\n listingGroup.listingGroupItems,\n setListingGroupValue,\n ]\n );\n\n return (\n \n \n :\n
    \n }\n onChange={(value) =>\n setListingGroupValue({\n name: value.target.value,\n })\n }\n />\n {!isUngroupedGroup && (\n \n \n :\n
    \n }\n value={premiumValue}\n onChange={onPremiumValueChange}\n postfixDisplay={\n \n }\n />\n\n \n :\n \n }\n value={listingGroup.desiredActiveListings ?? undefined}\n onChange={(e) => {\n const value = parseInt(e.target.value);\n if (isNaN(value) || value <= 0) {\n setListingGroupValue({\n desiredActiveListings: null,\n });\n return;\n }\n setListingGroupValue({\n desiredActiveListings: value,\n });\n }}\n />\n\n \n :\n \n }\n triggerProps={{ style: { width: '100%' } }}\n values={listingGroup.deprioritizedQuantities ?? []}\n onChange={onUpdateDeprioritizeQuantities}\n valueOptionsContent={getQuantitiesOptions()}\n valuesDisplayText={(\n listingGroup.deprioritizedQuantities ?? []\n ).join(',')}\n />\n
    \n )}\n \n \n );\n};\n","import { first, isEmpty } from 'lodash-es';\nimport { useEffect, useMemo, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport * as Tabs from 'src/core/ui/Tabs';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n Listing,\n ListingGroupItemInput,\n MergeListingGroupInput,\n} from 'src/WebApiController';\n\nimport { GroupListingsFormProps } from '../../GroupListingsV2.types';\nimport { GroupListingsPreview } from './GroupListingsPreview';\nimport * as styles from './GroupListingsPreview.css';\nimport { UngroupedListingGroupId } from './GroupListingsPreviewTable.constants';\n\ntype GroupPreivewProps = {\n eventListings: Listing[];\n};\n\nexport const GroupsPreview: React.FC = ({\n eventListings,\n}) => {\n const { watch } = useFormContext();\n const groups = watch('mergeListingGroupInputs');\n\n const [selectedGroup, setSelectedGroup] = useState();\n const ungroupedText = useContent(ContentId.Ungrouped);\n\n const ungroupedListings = useMemo(() => {\n const groupedListingIds = groups.flatMap((group) =>\n group.listingGroupItems.map(({ listingId }) => listingId)\n );\n return eventListings.filter(({ id }) => !groupedListingIds.includes(id));\n }, [eventListings, groups]);\n\n const ungroupedListingGroup = useMemo((): MergeListingGroupInput | null => {\n if (isEmpty(ungroupedListings)) {\n return null;\n }\n return {\n listingGroupId: UngroupedListingGroupId,\n name: ungroupedText,\n viagogoEventId: null,\n viagogoMappingId: null,\n marketplaceSettings: null,\n maxActiveListings: null,\n minActiveListings: null,\n groupingMethods: null,\n groupUndercutSetting: null,\n desiredActiveListings: null,\n deprioritizedQuantities: null,\n targetPercentage: null,\n listingGroupItems: ungroupedListings.map(\n (listing, index) =>\n ({\n listingId: listing.id,\n priority: index + 1,\n groupId: null,\n undercutSetting: null,\n }) as ListingGroupItemInput\n ),\n };\n }, [ungroupedListings, ungroupedText]);\n\n const enrichedGroups = useMemo(() => {\n if (ungroupedListingGroup === null) {\n return groups;\n }\n return [...groups, ungroupedListingGroup];\n }, [groups, ungroupedListingGroup]);\n\n useEffect(() => {\n if (isEmpty(enrichedGroups)) {\n return;\n }\n const firstGroup = first(enrichedGroups);\n const ids = enrichedGroups.map(({ listingGroupId }) => listingGroupId);\n if (selectedGroup && ids.includes(selectedGroup)) {\n return;\n }\n setSelectedGroup(firstGroup!.listingGroupId);\n }, [enrichedGroups, selectedGroup]);\n\n if (isEmpty(groups)) {\n return ;\n }\n return (\n \n \n {enrichedGroups.map((group) => {\n return (\n \n {group.name}\n \n );\n })}\n \n {enrichedGroups.map((group) => {\n return (\n \n \n \n );\n })}\n \n );\n};\n","import { isEqual } from 'lodash-es';\nimport { useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport {\n Content,\n getContent,\n useContentContext,\n} from 'src/contexts/ContentContext';\nimport { PosMultiSelect } from 'src/core/POS/PosMultiSelect';\nimport { PosSelect } from 'src/core/POS/PosSelect';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { Stack } from 'src/core/ui';\nimport { getQuantitiesOptions } from 'src/modals/GroupListings/components/groupingUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport * as styles from '../../GroupListingsV2.css';\nimport {\n GroupListingsFormProps,\n GroupSortByType,\n} from '../../GroupListingsV2.types';\nimport { SettingsTitle } from '../SettingsTitle';\n\ntype OrderingMethodsProps = {};\n\nexport const OrderingMethods: React.FC = () => {\n const { watch, setValue } = useFormContext();\n const groupSortBy = watch('groupSortBy');\n const deprioritizedQuantities = watch('deprioritizedQuantities');\n const desiredActiveListings = watch('desiredActiveListings');\n\n const contentContext = useContentContext();\n\n const sortingOptions = useMemo(() => {\n return {\n [GroupSortByType.RowDesc.toString()]: getContent(\n ContentId.RowsAscToDesc,\n contentContext\n ),\n [GroupSortByType.RowAsc.toString()]: getContent(\n ContentId.RowsDescToAsc,\n contentContext\n ),\n [GroupSortByType.SectionDesc.toString()]: getContent(\n ContentId.SectionsAscToDesc,\n contentContext\n ),\n [GroupSortByType.SectionAsc.toString()]: getContent(\n ContentId.SectionsDescToAsc,\n contentContext\n ),\n [GroupSortByType.UnsoldQuantityDesc.toString()]: getContent(\n ContentId.UnsoldQuantitiesHighToLow,\n contentContext\n ),\n [GroupSortByType.UnsoldQuantityAsc.toString()]: getContent(\n ContentId.UnsoldQuantitiesLowToHigh,\n contentContext\n ),\n };\n }, [contentContext]);\n\n return (\n \n \n }\n subtitle={}\n />\n\n \n type && setValue('groupSortBy', type as GroupSortByType)\n }\n valueOptionsContent={sortingOptions}\n valueOptionsContentOverride={sortingOptions}\n className={styles.inputStyle}\n />\n \n \n }\n subtitle={}\n />\n {\n const value = parseInt(e.target.value);\n if (value >= 0 && value !== desiredActiveListings) {\n setValue('desiredActiveListings', value);\n }\n }}\n rootProps={{ className: styles.inputStyle }}\n />\n \n \n }\n subtitle={\n \n }\n />\n
    \n {\n if (!isEqual(newValues, deprioritizedQuantities)) {\n setValue(`deprioritizedQuantities`, newValues);\n }\n }}\n valueOptionsContent={getQuantitiesOptions()}\n valuesDisplayText={(deprioritizedQuantities ?? []).join(', ')}\n />\n
    \n
    \n
    \n );\n};\n","import { useCallback, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { Radio, RadioGroup, Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport * as styles from '../../GroupListingsV2.css';\nimport {\n GroupListingsFormProps,\n RankPremiumType,\n} from '../../GroupListingsV2.types';\n\ntype RankPremiumProps = {};\n\nexport const RankPremium: React.FC = () => {\n const [rankPremiumType, setRankPremiumType] = useState(\n RankPremiumType.Absolute\n );\n const { getUiCurrency } = useLocalizationContext();\n const currency = getUiCurrency('USD');\n\n const { watch, setValue, register } =\n useFormContext();\n const undercutPremium = watch('groupUndercutSettings');\n\n const onRankPremiumTypeChange = useCallback(\n (premiumType: RankPremiumType) => {\n if (premiumType === RankPremiumType.Absolute) {\n setValue('groupUndercutSettings.undRelAmt', null);\n } else {\n setValue('groupUndercutSettings.undAbsAmt', null);\n }\n setRankPremiumType(premiumType);\n },\n [setValue]\n );\n\n return (\n \n \n \n }\n />\n (v ? parseFloat(v) : null),\n })}\n disabled={rankPremiumType === RankPremiumType.Relative}\n uiCurrency={currency}\n rootProps={{ className: styles.inputStyle }}\n />\n \n \n }\n />\n {\n const v = parseFloat(e.target.value);\n let relativeValue = null;\n if (v >= 0 && v <= Number.MAX_VALUE) {\n relativeValue = Math.min(v, 100) / 100;\n }\n setValue(`groupUndercutSettings.undRelAmt`, relativeValue);\n }}\n value={\n undercutPremium?.undRelAmt\n ? undercutPremium?.undRelAmt * 100\n : undefined\n }\n rootProps={{ className: styles.inputStyle }}\n />\n \n \n \n );\n};\n","import { Content, useContent } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { DividerLine, Stack, Tooltip } from 'src/core/ui';\nimport { InfoOutlineIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Event, Listing } from 'src/WebApiController';\n\nimport { GroupBroadcastSettings } from './components/Broadcast';\nimport { GroupingMethods } from './components/GroupingMethods';\nimport { GroupListingsSetting } from './components/GroupListingsSetting';\nimport { GroupsPreview } from './components/GroupsPreview';\nimport { OrderingMethods } from './components/OrderingMethods';\nimport { RankPremium } from './components/RankPremium';\nimport { GroupListingsState } from './GroupListingsV2.types';\n\ntype GroupListingsBodyProps = {\n event: Event;\n state: GroupListingsState;\n eventListings: Listing[];\n};\n\nexport const GroupListingsBody: React.FC = ({\n event,\n state,\n eventListings,\n}) => {\n const rankPremiumTips = useContent(ContentId.RankPremiumTips);\n if (state === GroupListingsState.Review) {\n return ;\n }\n return (\n \n }\n content={}\n defaultToOpen\n />\n \n \n \n \n \n \n }\n >\n \n \n \n }\n content={}\n />\n \n }\n content={}\n />\n \n }\n content={}\n />\n \n );\n};\n","import { HubConnectionState } from '@microsoft/signalr';\nimport { useCallback, useContext, useState } from 'react';\nimport { FormProvider, useForm, useFormContext } from 'react-hook-form';\nimport { ModalBody } from 'reactstrap';\nimport { CancelButton } from 'src/components/Buttons';\nimport { BulkEditStatus } from 'src/components/common/BulkActions/BulkEditStatus';\nimport { INVENTORY_BULK_CREATE_LISTING_GROUPS_KEY } from 'src/components/Listings/InventoryActionDropdown';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n BulkEditStage,\n useBulkEditHubContext,\n} from 'src/contexts/BulkEditHubContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { EventMapContextProvider } from 'src/contexts/EventMapContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { useBulkEditHub } from 'src/hooks/useBulkEditHub';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n BulkActionType,\n BulkEditListingClient,\n Event,\n RowGroupSetting,\n VenueZoneConfigType,\n} from 'src/WebApiController';\n\nimport { CancellableFormFooter } from '../common';\nimport { CancellableFormHeader } from '../common/CancellableFormHeader';\nimport { ConnectedEventEntityHeader } from '../common/EventEntityHeader';\nimport { Summary } from '../common/Summary';\nimport { ModalFooter } from '../Modal';\nimport { ModalBodyDataContainer } from '../Modal/Modal.styled';\nimport { UngroupedListingGroupId } from './components/GroupsPreview/GroupListingsPreviewTable.constants';\nimport { GroupListingsBody } from './GroupListingsBody';\nimport { useGroupListingsAction } from './GroupListingsV2.hooks';\nimport {\n GroupListingsFormProps,\n GroupListingsState,\n ListingGroupType,\n} from './GroupListingsV2.types';\n\ntype GroupListingsV2Props = {\n event: Event;\n};\n\nexport const GroupListingsV2: React.FC = ({ event }) => {\n const methods = useForm({\n defaultValues: {\n venueZoneConfigType: VenueZoneConfigType.ConcertsSectionsBehindStage,\n rowGroupSetting: RowGroupSetting.SingleTwoToFiveSixPlus,\n desiredActiveListings: undefined,\n deprioritizedQuantities: undefined,\n groupUndercutSettings: null,\n marketplaceSettings: null,\n groupBys: [\n {\n groupingType: ListingGroupType.ZoneMap,\n ranges: [\n { min: 1, max: 1 },\n { min: 2, max: 5 },\n { min: 6, max: Number.MAX_VALUE },\n ],\n },\n ],\n mergeListingGroupInputs: [],\n },\n });\n return (\n \n \n \n \n \n );\n};\n\nconst GroupListingV2Content: React.FC = ({ event }) => {\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const { formState, reset } = useFormContext();\n const [isLoading, setIsLoading] = useState(false);\n const { isSubmitting } = formState;\n const { setActivePosEntity } = useActivePosEntityContext();\n const { setProgress, setPreview, setStage, setMainDialogOpened } =\n useBulkEditHubContext();\n\n const { closeModal } = useContext(ModalContext);\n const { activeAccountWebClientConfig } = useAppContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n const { bulkEditHub, initJob } = useBulkEditHub(\n ActionOutboxEntityType.Listing,\n BulkActionType.GroupListings,\n INVENTORY_BULK_CREATE_LISTING_GROUPS_KEY,\n async () => {\n setActivePosEntity(0);\n await refreshExpandedListItems();\n\n closeModal();\n }\n );\n const hasBackgroundBulkEditFeature =\n bulkEditHub?.state === HubConnectionState.Connected;\n\n const onSubmit = useCallback(\n (inputFormData: GroupListingsFormProps) => {\n setIsLoading(true);\n\n tryInvokeApi(\n async () => {\n initJob();\n const filteredListingGroupInputs =\n inputFormData.mergeListingGroupInputs\n .map((groupInput) => ({\n ...groupInput,\n desiredActiveListings: groupInput.desiredActiveListings ?? 0,\n listingGroupItems: groupInput.listingGroupItems.filter(\n (x) => x.listingId > 0\n ),\n }))\n .filter(\n (m) =>\n m.listingGroupItems.length &&\n m.listingGroupId !== UngroupedListingGroupId\n );\n\n const succeeded = await new BulkEditListingClient(\n activeAccountWebClientConfig\n ).bulkCreateListingGroups(\n {\n mergeListingGroupInputs: filteredListingGroupInputs,\n },\n INVENTORY_BULK_CREATE_LISTING_GROUPS_KEY,\n hasBackgroundBulkEditFeature\n );\n\n reset(inputFormData);\n if (!hasBackgroundBulkEditFeature) {\n if (succeeded) {\n setActivePosEntity(0);\n await refreshExpandedListItems();\n\n closeModal();\n }\n }\n },\n (error) => {\n showErrorDialog(\n 'BulkEditListingClient.bulkCreateListingGroups',\n error,\n {\n trackErrorData: inputFormData,\n }\n );\n },\n () => {\n setIsLoading(false);\n }\n );\n },\n [\n activeAccountWebClientConfig,\n closeModal,\n hasBackgroundBulkEditFeature,\n initJob,\n refreshExpandedListItems,\n reset,\n setActivePosEntity,\n showErrorDialog,\n ]\n );\n\n const { state, onFooterNav, eventListings } = useGroupListingsAction(\n event,\n onSubmit\n );\n\n return (\n <>\n {\n setProgress(undefined);\n setPreview(undefined);\n setStage(BulkEditStage.Idle);\n setMainDialogOpened(false);\n }}\n >\n }\n />\n \n\n \n \n
    \n \n
    \n \n \n \n
    \n
    \n \n \n {state === GroupListingsState.Configure && (\n {\n setProgress(undefined);\n setPreview(undefined);\n setStage(BulkEditStage.Idle);\n setMainDialogOpened(false);\n }}\n />\n )}\n {state === GroupListingsState.Review && (\n onFooterNav(true)}\n />\n )}\n \n \n \n \n );\n};\n","import { useCallback, useContext } from 'react';\nimport { useBulkBroadcastActionsPermission } from 'src/components/common/BulkActions/BulkBroadcastActions/useBulkBroadcastActionsPermission';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { Stack } from 'src/core/ui';\nimport { GroupListingsV2 } from 'src/modals/GroupListingsV2';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Event } from 'src/WebApiController';\n\ntype LaunchGroupingWizardModal = {\n event: Event;\n};\n\nexport const LaunchGroupingWizard: React.FC = ({\n event,\n}) => {\n const { hasBroadcastPermission } = useBulkBroadcastActionsPermission();\n\n const { setModal } = useContext(ModalContext);\n const {\n eventsExpansion: { setListItemExpansion },\n } = useCatalogDataContext();\n\n const groupListings = useCallback(() => {\n setModal({\n children: ,\n clickOutsideToClose: true,\n ...{ size: 'slide-in', fullscreen: 'sm' },\n });\n }, [setModal, event]);\n\n const onLaunchDialog = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n\n setListItemExpansion(true, [event.viagVirtualId]);\n\n groupListings();\n },\n [event.viagVirtualId, groupListings, setListItemExpansion]\n );\n\n if (!hasBroadcastPermission) {\n return null;\n }\n\n return (\n \n \n \n \n \n );\n};\n","import { useCallback, useContext, useMemo } from 'react';\nimport { useInventoryEventBulkActionsState } from 'src/components/Events/EventListing/InventoryEventListing/BulkActions/InventoryEventBulkActions/useInventoryEventBulkActionsState';\nimport { Content } from 'src/contexts/ContentContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { Stack } from 'src/core/ui';\nimport { AddToGroupListingsModal } from 'src/modals/GroupListings';\nimport { flattenListingGroup } from 'src/modals/GroupListings/components/groupingUtils';\nimport {\n MoveListingGroupDialog,\n MoveListingGroupItem,\n} from 'src/modals/GroupListingsV2/components/GroupsPreview/MoveListingGroupDialog';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n EventWithData,\n Listing,\n ListingGroup,\n ListingGroupItemInput,\n} from 'src/WebApiController';\n\nexport const LaunchMoveToGroup = ({\n eventData,\n}: {\n eventData: EventWithData;\n}) => {\n const { setModal } = useContext(ModalContext);\n\n const { openDialog, closeDialog } = useDialog(\n DialogId.AddToGroup,\n MoveListingGroupDialog\n );\n\n const { filterQueryWithEventIds } = useInventoryEventBulkActionsState(\n eventData.event\n );\n\n const selectedListingIds = useMemo(\n () => filterQueryWithEventIds.entityIds ?? [],\n [filterQueryWithEventIds]\n );\n\n const eventListings = useMemo(() => {\n return (\n (eventData?.entities?.listings?.flatMap(\n flattenListingGroup\n ) as Listing[]) ?? []\n );\n }, [eventData?.entities?.listings]);\n const eventListingGroups = useMemo(() => {\n return (\n eventData\n .entities!.listings!.filter(\n (l): l is ListingGroup => l.isLtGrp && l.ltGrpId != null\n )\n .map((group) => {\n const items = flattenListingGroup(group).map(\n (item) =>\n ({\n listingId: item.id,\n priority: item.ltGrpPrior,\n groupId: item.ltGrpId,\n }) as ListingGroupItemInput\n );\n return {\n listingGroupId: group.ltGrpId!,\n name: group.groupName,\n listingGroupItems: items,\n } as MoveListingGroupItem;\n }) ?? []\n );\n }, [eventData.entities]);\n\n const onLaunchDialog = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n\n openDialog({\n listingGroups: eventListingGroups,\n listings: eventListings,\n canAddNewGroup: true,\n onMoveListingToGroup: (groupId: string, groupName?: string) => {\n const existingGroup = eventListingGroups.find(\n (group) => group.listingGroupId === groupId\n );\n const newListingGroupName = existingGroup ? undefined : groupName;\n closeDialog();\n setModal({\n children: (\n \n ),\n clickOutsideToClose: true,\n ...{ size: 'slide-in' },\n });\n },\n onClose: () => {\n closeDialog();\n },\n });\n },\n [\n closeDialog,\n eventData.event.viagVirtualId,\n eventListingGroups,\n eventListings,\n openDialog,\n selectedListingIds,\n setModal,\n ]\n );\n\n return (\n \n \n \n \n \n );\n};\n","import { useState } from 'react';\nimport { useBulkActionsState } from 'src/components/common/BulkActions/useBulkActionsState';\nimport { useInventoryEventBulkActionsState } from 'src/components/Events/EventListing/InventoryEventListing/BulkActions/InventoryEventBulkActions/useInventoryEventBulkActionsState';\nimport { useBulkEditListingGroupSettings } from 'src/components/Listings/InventoryActionDropdown/components/BulkEditListingGroupSettingsAction';\nimport { LaunchGroupListings } from 'src/components/Listings/InventoryActionDropdown/components/GroupListingsAction';\nimport { LaunchAddToGroup } from 'src/components/Listings/InventoryActionDropdown/components/GroupListingsAction/LaunchAddToGroup';\nimport { LaunchGroupingWizard } from 'src/components/Listings/InventoryActionDropdown/components/GroupListingsAction/LaunchGroupingWizard';\nimport { LaunchMoveToGroup } from 'src/components/Listings/InventoryActionDropdown/components/GroupListingsAction/LaunchMoveToGroup';\nimport { useBulkUngroupListings } from 'src/components/Listings/InventoryActionDropdown/components/LaunchUngroupListingsAction';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosDropdown } from 'src/core/POS/PosDropdown';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ChevronDownIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Feature } from 'src/WebApiController';\nimport { EventWithData } from 'src/WebApiController';\n\ninterface GroupActionsProps {\n data: EventWithData;\n}\n\nexport const GroupActions = ({ data }: GroupActionsProps) => {\n const { areBulkActionsEnabled } = useBulkActionsState();\n\n const [isLoading, setIsLoading] = useState(false);\n\n const { filterQueryWithEventIds } = useInventoryEventBulkActionsState(\n data.event\n );\n\n const bulkUngroupListings = useBulkUngroupListings(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n data.event\n );\n\n const bulkEditListingGroupSettings = useBulkEditListingGroupSettings(\n filterQueryWithEventIds,\n data,\n setIsLoading,\n isLoading\n );\n const hasMoveToGroupFeature = useUserHasFeature(Feature.MoveToGroup);\n\n const hasBulkEditsToListingGroupsFeature = useUserHasFeature(\n Feature.BulkEditsToListingGroups\n );\n\n const hasGroupingWizardFeature = useUserHasFeature(Feature.GroupingWizard);\n\n return (\n <>\n \n \n \n \n }\n align=\"start\"\n triggerProps={{ disabled: isLoading || !areBulkActionsEnabled }}\n >\n {hasBulkEditsToListingGroupsFeature &&\n bulkEditListingGroupSettings.dropDown}\n\n {hasGroupingWizardFeature ? (\n \n ) : (\n \n )}\n\n {hasMoveToGroupFeature ? (\n \n ) : (\n \n )}\n {bulkUngroupListings.dropDown}\n \n \n );\n};\n","import { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { Feature, Permission } from 'src/WebApiController';\n\ninterface BulkPricingActionsPermissions {\n hasEditPricingPermission: boolean;\n hasUpdateListingPermission: boolean;\n hasAutoPricingFeature: boolean;\n}\n\nexport const useBulkPricingActionsPermissions =\n (): BulkPricingActionsPermissions => {\n const hasEditPricingPermission = useUserHasAnyOfPermissions(\n Permission.Inventory_SetPrice,\n Permission.Inventory_SetPriceOnIsPricerOf,\n Permission.Inventory_SetPriceOnPurchasedBy\n );\n\n const hasUpdateListingPermission = useUserHasAnyOfPermissions(\n Permission.Inventory_UpdateListingInfo,\n Permission.Inventory_UpdateListingInfoOnIsPricerOf,\n Permission.Inventory_UpdateListingInfoOnPurchasedBy\n );\n\n const hasAutoPricingFeature = useUserHasFeature(Feature.AutoPricing);\n\n return {\n hasEditPricingPermission,\n hasAutoPricingFeature,\n hasUpdateListingPermission,\n };\n };\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport const FieldLabelWrapper = styled.div`\n font-weight: 600;\n ${({\n theme: {\n media,\n typography: { getStyles },\n },\n }) => `\n${getStyles('body1')}\n padding-left: 0;\n ${media.makeMediaQuery(\n media.breakpoints.md,\n `padding-left: 0px;` // reset padding for tablets and above\n )}\n`}\n`;\n\nexport const FieldWrapper = styled.div`\n padding-block-end: ${() => vars.spacing.m};\n\n label {\n width: 100%;\n margin-bottom: 0;\n }\n`;\n","import { HubConnectionState } from '@microsoft/signalr';\nimport { ComponentProps, useCallback, useMemo, useRef, useState } from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { BulkEditStatus } from 'src/components/common/BulkActions/BulkEditStatus';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n BulkEditStage,\n useBulkEditHubContext,\n} from 'src/contexts/BulkEditHubContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { Radio, RadioGroup, Stack } from 'src/core/ui';\nimport { useBulkEditHub } from 'src/hooks/useBulkEditHub';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n ActionOutboxEntityType,\n BulkActionType,\n BulkEditPreviewWithDetails,\n BulkEditProgress,\n BulkEditStep,\n ListingDetails,\n} from 'src/WebApiController';\n\nimport { BulkEditFooter } from '../common/BulkEditFooter';\nimport { BulkEditHeader } from '../common/BulkEditHeader';\nimport * as styles from './BulkEditListingPriceDialog.css';\nimport { FieldWrapper } from './BulkEditListingPriceDialog.styled';\n\nexport type BulkEditListingPriceDialogProps = ComponentProps & {\n updateKey: string;\n increasePrice: boolean;\n onOkay: (\n priceChangePercentage: number | undefined,\n priceChangeAbsolute: number | undefined,\n increasePrice: boolean,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => void;\n onCancel: () => void;\n};\n\nexport enum PriceChangeMode {\n Percent = 'Percent',\n Absolute = 'Absolute',\n}\n\nexport const PRICE_CHANGE_MODE_OPTIONS = [\n {\n value: PriceChangeMode.Percent,\n children: ,\n },\n {\n value: PriceChangeMode.Absolute,\n children: ,\n },\n];\n\nexport function BulkEditListingPriceDialog({\n updateKey,\n increasePrice,\n onOkay,\n onCancel,\n ...rest\n}: BulkEditListingPriceDialogProps) {\n const { getUiCurrency } = useLocalizationContext();\n\n const { loginContext } = useAppContext();\n const { setActivePosEntity } = useActivePosEntityContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n const { setSelectionMode } = useMultiSelectionContext();\n const { setProgress, setPreview, setMainDialogOpened } =\n useBulkEditHubContext();\n\n const uiCurrency = useMemo(\n () => getUiCurrency(loginContext?.user?.activeAccount?.currencyCode),\n [getUiCurrency, loginContext?.user?.activeAccount?.currencyCode]\n );\n\n const onClose = useCallback(\n async (\n newProgress?: BulkEditProgress,\n closeMainDialogForPopover?: boolean\n ) => {\n if (newProgress?.step === BulkEditStep.Done) {\n setIsRefreshing(true);\n setActivePosEntity(0);\n\n await refreshExpandedListItems();\n setSelectionMode(undefined);\n if (closeMainDialogForPopover) {\n setMainDialogOpened(false);\n } else {\n setProgress(undefined);\n setPreview(undefined);\n }\n setIsRefreshing(false);\n // progress kept to allow the BulkEditStatusPopover to show the result\n }\n onCancel();\n },\n [\n onCancel,\n refreshExpandedListItems,\n setActivePosEntity,\n setMainDialogOpened,\n setPreview,\n setProgress,\n setSelectionMode,\n ]\n );\n\n const onBulkEditDone = useCallback(\n async (doneProgress: BulkEditProgress, finalErrors: string[]) => {\n if (finalErrors.length === 0 && doneProgress.step === BulkEditStep.Done) {\n onClose(doneProgress, true);\n }\n },\n [onClose]\n );\n\n const { bulkEditHub, progress, preview, initJob, stage } = useBulkEditHub(\n ActionOutboxEntityType.Listing,\n BulkActionType.UpdatePrices,\n updateKey,\n onBulkEditDone\n );\n\n const hasBackgroundBulkEditFeature =\n bulkEditHub?.state === HubConnectionState.Connected;\n\n const [priceChangeMode, setPriceChangeMode] = useState(\n PriceChangeMode.Absolute\n );\n const [changeValue, setChangeValue] = useState();\n\n const [isRefreshing, setIsRefreshing] = useState(false);\n const [isLoading, setIsLoading] = useState(false);\n\n const onSubmitHandler = useCallback(\n (onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n onOkay(undefined, undefined, false, false, onPreviewReceived);\n } else {\n onOkay(\n priceChangeMode === PriceChangeMode.Percent ? changeValue : undefined,\n priceChangeMode === PriceChangeMode.Absolute\n ? changeValue\n : undefined,\n increasePrice,\n hasBackgroundBulkEditFeature,\n undefined,\n preview\n );\n }\n setIsLoading(false);\n },\n [\n onOkay,\n priceChangeMode,\n changeValue,\n increasePrice,\n preview,\n hasBackgroundBulkEditFeature,\n ]\n );\n\n const isInputValid = useMemo(() => {\n return !!changeValue;\n }, [changeValue]);\n\n const submittButtonRef = useRef(null);\n\n return (\n \n ) : (\n \n )\n }\n />\n }\n onOpened={() => {\n setPriceChangeMode(PriceChangeMode.Absolute);\n setChangeValue(undefined);\n initJob();\n }}\n onKeyUp={(e) => {\n if (submittButtonRef.current && e.key === 'Enter' && isInputValid) {\n submittButtonRef.current.click();\n }\n }}\n onClick={(e) => {\n // This so that this dialog does not cause event to flow to the EventHeader open/close event\n e.stopPropagation();\n e.preventDefault();\n }}\n onClosed={() => {\n setMainDialogOpened(false);\n if (progress) {\n setSelectionMode(undefined);\n }\n // Call the outside one if there is one\n rest.onClosed?.();\n }}\n footer={\n \n }\n onCancel={isLoading ? undefined : onCancel}\n >\n \n \n \n \n {': '}\n \n }\n >\n {\n setPriceChangeMode(newMode as PriceChangeMode);\n if (newMode == PriceChangeMode.Percent) {\n if (!increasePrice && (changeValue ?? 0) > 99) {\n setChangeValue(99); // we can't decrease by 100 or more % because that will result in zero\n }\n }\n }}\n disabled={isLoading}\n >\n \n {PRICE_CHANGE_MODE_OPTIONS.map((m) => (\n \n ))}\n \n \n \n {priceChangeMode === PriceChangeMode.Percent ? (\n {\n const value = parseFloat(e.target.value);\n if (value < 0) return;\n if (!increasePrice && value > 99) return; // we can't decrease by 100 or more % because that will result in zero\n\n setChangeValue(parseFloat(e.target.value));\n }}\n postfixDisplay={'%'}\n />\n ) : (\n {\n const value = parseFloat(e.target.value);\n if (value < 0) return;\n\n setChangeValue(parseFloat(e.target.value));\n }}\n />\n )}\n \n }\n />\n \n \n \n \n );\n}\n","import { Content } from 'src/contexts/ContentContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Permission } from 'src/WebApiController';\n\nexport const LaunchChangeListingPrice = ({\n onClick,\n disabled,\n}: {\n onClick: (\n e: React.MouseEvent,\n increasePrice: boolean\n ) => void;\n disabled?: boolean;\n}) => {\n const hasEditPricingPermission = useUserHasAnyOfPermissions(\n Permission.Inventory_SetPrice,\n Permission.Inventory_SetPriceOnIsPricerOf,\n Permission.Inventory_SetPriceOnPurchasedBy\n );\n\n if (!hasEditPricingPermission) {\n return null;\n }\n\n return (\n <>\n {hasEditPricingPermission && (\n onClick(e, true)}\n disabled={disabled}\n >\n \n \n )}\n {hasEditPricingPermission && (\n onClick(e, false)}\n disabled={disabled}\n >\n \n \n )}\n \n );\n};\n","import { useCallback } from 'react';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport {\n BulkEditListingPriceDialog,\n BulkEditListingPriceDialogProps,\n} from 'src/dialogs/BulkEdits/BulkEditListingPriceDialog';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n BulkEditListingClient,\n BulkEditPreviewWithDetails,\n BulkEditProgress,\n Event,\n ListingDetails,\n ListingQuery,\n} from 'src/WebApiController';\n\nimport { INVENTORY_BULK_UPDATE_LISTING_PRICES_UPDATE_KEY } from '../../InventoryActionDropdown.constants';\nimport { LaunchChangeListingPrice } from './LaunchChangeListingPrice';\n\nexport const useBulkChangeListingPriceAction = (\n filterQueryWithEventIds: ListingQuery,\n setIsLoading: (v: boolean) => void,\n isLoading?: boolean,\n event?: Event\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const bulkUpdateListingsPricesUpdateKey = event\n ? `listingPrices-event-${event.viagVirtualId}`\n : INVENTORY_BULK_UPDATE_LISTING_PRICES_UPDATE_KEY;\n\n const { setActivePosEntity } = useActivePosEntityContext();\n\n const {\n eventsExpansion: { setListItemExpansion, refreshExpandedListItems },\n } = useCatalogDataContext();\n\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const { openDialog: openBulkEditDialog, closeDialog: closeBulkEditDialog } =\n useDialog(\n DialogId.BulkEditListingPrice,\n BulkEditListingPriceDialog\n );\n\n const onSubmitChangePriceByPercent = useCallback(\n async (\n priceChangePercentage: number | undefined,\n priceChangeAbsolute: number | undefined,\n increasePrice: boolean,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n await tryInvokeApi(\n async () => {\n const preview = await new BulkEditListingClient(\n activeAccountWebClientConfig\n ).bulkUpdateListingsPricesPreview(filterQueryWithEventIds);\n\n onPreviewReceived(preview);\n },\n (error) => {\n showErrorDialog('bulkUpdateListingsPricesPreview', error, {\n trackErrorData: { filterQueryWithEventIds },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n } else {\n await tryInvokeApi(\n async () => {\n let succeeded: BulkEditProgress | undefined;\n if (priceChangePercentage !== undefined) {\n succeeded = await new BulkEditListingClient(\n activeAccountWebClientConfig\n ).bulkUpdateListingsPricesByPercent(\n preview!.preview,\n (increasePrice\n ? 100 + priceChangePercentage\n : 100 - priceChangePercentage) /\n 100 /* we're sending the percent back in 0 - 1 ratio */,\n bulkUpdateListingsPricesUpdateKey,\n supportBackgroundProcess\n );\n } else if (priceChangeAbsolute !== undefined) {\n succeeded = await new BulkEditListingClient(\n activeAccountWebClientConfig\n ).bulkUpdateListingsPrices(\n preview!.preview,\n increasePrice ? priceChangeAbsolute : -priceChangeAbsolute,\n bulkUpdateListingsPricesUpdateKey,\n supportBackgroundProcess\n );\n }\n\n if (!supportBackgroundProcess) {\n if (succeeded) {\n // Invalidate the activePosEntity, so that when clicking on listingDetails\n // we force re-loading the listing and newest pricing settings can be displayed\n setActivePosEntity(0);\n await refreshExpandedListItems();\n }\n\n closeBulkEditDialog();\n }\n },\n (error) => {\n showErrorDialog('onSubmitChangePrice', error, {\n trackErrorData: {\n priceChangePercentage,\n priceChangeAbsolute,\n increasePrice,\n preview,\n },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n }\n },\n [\n setIsLoading,\n activeAccountWebClientConfig,\n filterQueryWithEventIds,\n showErrorDialog,\n bulkUpdateListingsPricesUpdateKey,\n closeBulkEditDialog,\n setActivePosEntity,\n refreshExpandedListItems,\n ]\n );\n\n const onChangePriceByPercentClick = useCallback(\n (e: React.MouseEvent, increasePrice: boolean) => {\n e.preventDefault();\n e.stopPropagation();\n if (event) {\n setListItemExpansion(true, [event.viagVirtualId]);\n }\n openBulkEditDialog({\n updateKey: bulkUpdateListingsPricesUpdateKey,\n increasePrice,\n onOkay: onSubmitChangePriceByPercent,\n onClosed: () => {\n setIsLoading(false);\n },\n onCancel: closeBulkEditDialog,\n });\n },\n [\n bulkUpdateListingsPricesUpdateKey,\n closeBulkEditDialog,\n event,\n onSubmitChangePriceByPercent,\n openBulkEditDialog,\n setIsLoading,\n setListItemExpansion,\n ]\n );\n return {\n dropDown: (\n \n ),\n };\n};\n","import { Content } from 'src/contexts/ContentContext';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { useAlertWithSuppressionDialog } from './useAlertWithSuppressionDialog';\n\nexport function useDeliveryInfoChangeDialog(\n onOkay: () => void,\n onCancel: () => void\n) {\n const { value, ...rest } = useAlertWithSuppressionDialog(\n 'deliveryInfoChangeSuppressionTimestamp',\n onOkay,\n onCancel\n );\n return {\n ...rest,\n lastTimeStamp: value?.deliveryInfoChangeSuppressionTimestamp,\n bodyText: (\n \n ),\n cancelText: ,\n };\n}\n","import { useAppContext } from 'src/contexts/AppContext';\nimport { Marketplace } from 'src/WebApiController';\n\nexport const useMarketplaceHandledByProcessor = (\n marketplace?: Marketplace | null\n) => {\n const { loginContext } = useAppContext();\n\n const isMarketplaceHandledByProcessor =\n marketplace &&\n loginContext?.user?.activeAccount?.marketplaceSettings?.some(\n (mk) => mk.isSyncHandledByProcessor && mk.mkp === marketplace\n );\n\n return isMarketplaceHandledByProcessor;\n};\n\nexport const useAnyMarketplaceHandledByProcessor = () => {\n const { loginContext } = useAppContext();\n\n const isMarketplaceHandledByProcessor =\n loginContext?.user?.activeAccount?.marketplaceSettings?.some(\n (mk) => mk.isSyncHandledByProcessor\n );\n\n return isMarketplaceHandledByProcessor;\n};\n","import { UploadBarcodesBody } from 'src/components/UploadArtifacts/UploadBarcodes/UploadBarcodesBody';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { ModalBodyDataContainer } from 'src/modals/Modal/Modal.styled';\nimport { BarcodeIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SaleDetails } from 'src/WebApiController';\n\nexport const TransferTicketmasterBarcodesBody = ({\n disabled,\n instructionsContentId,\n viewOnly,\n}: {\n disabled?: boolean;\n instructionsContentId: ContentId;\n viewOnly?: boolean;\n}) => {\n const { posEntity: sale } = useActivePosEntityContext();\n\n return (\n \n \n \n {!viewOnly ? (\n \n ) : (\n \n {sale?.tickets\n ?.slice(0, sale.ticketCnt)\n ?.map((t) => (\n \n }\n value={t.barcode ?? ''}\n />\n ))}\n \n )}\n \n \n );\n};\n","import { useCallback, useContext } from 'react';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { ImageMagnifier } from 'src/core/POS/ImageMagnifier';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { Button, Stack } from 'src/core/ui';\nimport { Detail, DetailGroup, DetailSection } from 'src/modals/common';\nimport { CancellableFormHeader } from 'src/modals/common/CancellableFormHeader';\nimport { ConnectedEventEntityHeader } from 'src/modals/common/EventEntityHeader';\nimport { ModalBody, ModalFooter, ModalProps } from 'src/modals/Modal';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SaleDetails, UserDocumentLinks } from 'src/WebApiController';\n\nimport { SectionWrapper } from '../common/Detail/Detail.styled';\nimport { Summary } from '../common/Summary';\nimport {\n ModalBodyDataContainer,\n ModalBodyHeaderContainer,\n} from '../Modal/Modal.styled';\nimport * as styles from './TransferTickets.css';\nimport { TransferTicketmasterBarcodesBody } from './views/TransferTicketmasterBarcodes';\n\nexport const ViewTransferTickets = ({ cancelTo }: { cancelTo: ModalProps }) => {\n const { setModal } = useContext(ModalContext);\n const { event, posEntity: sale } = useActivePosEntityContext();\n const goBack = useCallback(() => {\n setModal(cancelTo);\n }, [setModal, cancelTo]);\n\n return (\n <>\n \n }\n />\n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\n// Pulled into a separate component since there were some weird issues with error boundary otherwise\nconst TrasnferProofBody = ({ saleDetails }: { saleDetails: SaleDetails }) => {\n const {\n transDest,\n transSrc,\n transferProofDocs,\n transferUrls,\n transferProofId,\n tickets,\n } = saleDetails;\n\n const transferBarcodes = tickets?.map((t) => t.barcode).filter((b) => b);\n\n const yourTickets = useContent(ContentId.YourTickets);\n const app = useContent(ContentId.App);\n const transferFrom = useContent(ContentId.TransferFrom);\n\n const yourBuyer = useContent(ContentId.YourBuyer);\n const transferTo = useContent(ContentId.TransferTo);\n const contact = useContent(ContentId.Contact);\n\n return (\n <>\n \n \n {transSrc?.map((tts) => (\n \n {tts.app}}\n />\n \n
    {tts.name}
    \n
    {tts.email}
    \n \n }\n />\n
    \n ))}\n
    \n \n {transDest ? (\n \n {transDest.name}\n }\n />\n {transDest.email}\n }\n />\n \n ) : (\n }\n />\n )}\n \n
    \n {transferProofDocs?.length ? (\n \n \n \n {' '}\n \n \n ) : transferUrls?.length ? (\n \n \n \n \n \n \n ) : transferProofId ? (\n \n \n \n \n \n \n ) : transferBarcodes?.length ? (\n \n \n \n ) : null}\n \n );\n};\n\nconst ImageProofContent = ({\n transferProofDocs,\n}: {\n transferProofDocs: UserDocumentLinks[];\n}) => {\n return (\n <>\n {transferProofDocs.map((d) => (\n

    \n \n

    \n ))}\n \n );\n};\n\nconst UrlProofContent = ({ transferUrls }: { transferUrls: string[] }) => {\n return (\n <>\n {transferUrls.map((url, i) => (\n

    \n \n

    \n ))}\n \n );\n};\n\nconst TransferIdProofContent = ({\n transferProofId,\n}: {\n transferProofId: string;\n}) => {\n return ;\n};\n","import { useCallback, useContext } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { UploadButton } from 'src/components/Buttons';\nimport {\n UploadBarcodesBody,\n UploadBarcodesForm,\n} from 'src/components/UploadArtifacts/UploadBarcodes';\nimport { BarcodeForm } from 'src/components/UploadArtifacts/UploadBarcodes/UploadBarcodes.utils';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useCatalogMetricsContext } from 'src/contexts/CatalogMetricsContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { Button } from 'src/core/ui';\nimport { useEventItemLoadingDisplay } from 'src/hooks/useEventItemLoadingDisplay';\nimport { CancellableFormFooter } from 'src/modals/common';\nimport { CancellableFormHeader } from 'src/modals/common/CancellableFormHeader';\nimport { ConnectedEventEntityHeader } from 'src/modals/common/EventEntityHeader';\nimport { ModalBody, ModalFooter, ModalProps } from 'src/modals/Modal';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { EntityWithRealTickets } from 'src/utils/ticketUtils';\nimport {\n PosClientConfig,\n PosUiActionResult,\n SaleMetrics,\n TicketBarcode,\n} from 'src/WebApiController';\n\nimport { modalDetails } from '../common/Modals.css';\nimport { Summary } from '../common/Summary';\nimport {\n ModalBodyDataContainer,\n ModalBodyHeaderContainer,\n} from '../Modal/Modal.styled';\n\nexport type UploadBarcodeProps = {\n onUploadBarcodes?: (\n posClientConfig: PosClientConfig,\n entityId: number,\n barcodes: TicketBarcode[]\n ) => Promise;\n cancelTo?: ModalProps;\n defaultToBulk?: boolean;\n isReadOnly?: boolean;\n loadingContentId: FormatContentId;\n searchingContentId: FormatContentId;\n errorContentId: FormatContentId;\n};\n\nexport const UploadBarcodes = ({\n onUploadBarcodes,\n loadingContentId,\n searchingContentId,\n errorContentId,\n ...rest\n}: UploadBarcodeProps) => {\n const { loadingState } = useEventItemLoadingDisplay(\n loadingContentId,\n searchingContentId,\n errorContentId\n );\n\n return (\n loadingState || (\n \n )\n );\n};\n\nexport type UploadBarcodeContentProps = Omit<\n UploadBarcodeProps,\n 'loadingContentId' | 'searchingContentId' | 'errorContentId'\n>;\n\nexport const UploadBarcodesContent = ({\n cancelTo,\n onUploadBarcodes,\n isReadOnly = false,\n}: UploadBarcodeContentProps) => {\n const { closeModal, setModal } = useContext(ModalContext);\n const { posEntity: entityWithTickets, setActivePosEntity } =\n useActivePosEntityContext();\n const { refreshMetrics } = useCatalogMetricsContext();\n\n const goBack = useCallback(\n async (isCancelled: boolean) => {\n if (!isCancelled) {\n refreshMetrics?.();\n\n // Refresh the active data so the SaleDetail dialog will have the new content\n await setActivePosEntity(\n entityWithTickets!.id,\n entityWithTickets!.idOnMkp,\n true\n );\n }\n\n if (cancelTo) {\n setModal(cancelTo);\n } else {\n closeModal(true);\n }\n },\n [\n cancelTo,\n refreshMetrics,\n setActivePosEntity,\n entityWithTickets,\n setModal,\n closeModal,\n ]\n );\n\n return (\n void, disabled?: boolean) => (\n \n )}\n />\n );\n};\n\nconst UploadBarcodesFormContent = ({\n cancelTo,\n onUploadClick,\n disabled,\n goBack,\n}: {\n cancelTo?: ModalProps;\n onUploadClick: () => void;\n disabled?: boolean;\n goBack: (isCancelled: boolean) => void;\n}) => {\n const { formState } = useFormContext();\n const { isDirty, isSubmitting } = formState;\n\n const { event, posEntity } =\n useActivePosEntityContext();\n\n return (\n <>\n \n }\n />\n \n \n \n \n \n \n {isSubmitting || !posEntity ? (\n \n ) : (\n
    \n \n
    \n )}\n
    \n \n \n {/* We want to use isReadOnly here because isReadOnly is meant for this dialog is informational */}\n {!disabled && (\n \n {\n e.stopPropagation();\n e.preventDefault();\n onUploadClick();\n }}\n textContentId={ContentId.SaveBarcodes}\n />\n \n )}\n {disabled && (\n \n )}\n \n \n );\n};\n","import { useEventItemLoadingDisplay } from 'src/hooks/useEventItemLoadingDisplay';\nimport { ModalProps } from 'src/modals/Modal';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { EntityWithRealTickets } from 'src/utils/ticketUtils';\n\nimport { UploadBarcodesContent } from './UploadBarcodes';\n\nexport type ViewBarcodeModalProps = {\n cancelTo?: ModalProps;\n defaultToBulk?: boolean;\n isReadOnly?: boolean;\n loadingContentId: FormatContentId;\n searchingContentId: FormatContentId;\n errorContentId: FormatContentId;\n};\n\nexport const ViewBarcodes = ({\n cancelTo,\n loadingContentId,\n searchingContentId,\n errorContentId,\n}: ViewBarcodeModalProps) => {\n const { loadingState } = useEventItemLoadingDisplay(\n loadingContentId,\n searchingContentId,\n errorContentId\n );\n\n return (\n loadingState || \n );\n};\n","import { ComponentProps } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Button } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nexport const BackButton = ({\n textContentId,\n variant = 'regular',\n ...rest\n}: { textContentId?: ContentId } & Omit<\n ComponentProps,\n 'children'\n>) => {\n return (\n \n );\n};\n","import { useCallback, useContext } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { BackButton } from 'src/components/Buttons/BackButton';\nimport { OkButton } from 'src/components/Buttons/OkButton';\nimport {\n DocumentFileUploadInfo,\n ETicketsForm,\n UploadETicketForm,\n UploadETicketsFinalPreviewBody,\n UploadETicketsSeatAssignmentBody,\n} from 'src/components/UploadArtifacts/UploadETickets';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useCatalogMetricsContext } from 'src/contexts/CatalogMetricsContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { useEventItemLoadingDisplay } from 'src/hooks/useEventItemLoadingDisplay';\nimport { CancellableFormFooter } from 'src/modals/common';\nimport { CancellableFormHeader } from 'src/modals/common/CancellableFormHeader';\nimport { ConnectedEventEntityHeader } from 'src/modals/common/EventEntityHeader';\nimport { ModalBody, ModalFooter, ModalProps } from 'src/modals/Modal';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { EntityWithRealTickets } from 'src/utils/ticketUtils';\nimport {\n DocumentProcessorClient,\n DocumentUploadInfo,\n FileParameter,\n PosClientConfig,\n PosUiActionResult,\n SaleMetrics,\n TicketType,\n UserDocument,\n} from 'src/WebApiController';\n\nimport { Summary } from '../common/Summary';\nimport {\n ModalBodyDataContainer,\n ModalBodyHeaderContainer,\n} from '../Modal/Modal.styled';\n\nexport type UploadETicketsModalProps = {\n onUploadDocuments: (\n client: DocumentProcessorClient,\n docUploadInfo: DocumentUploadInfo,\n file: FileParameter\n ) => Promise;\n onUploadETickets: (\n posClientConfig: PosClientConfig,\n entityId: number,\n ticketAssignments: UserDocument[]\n ) => Promise;\n ticketType: TicketType.ETicket | TicketType.QRCode;\n cancelTo?: ModalProps;\n loadingContentId: FormatContentId;\n searchingContentId: FormatContentId;\n errorContentId: FormatContentId;\n};\n\nexport const UploadETickets = ({\n loadingContentId,\n searchingContentId,\n errorContentId,\n ...rest\n}: UploadETicketsModalProps) => {\n const { loadingState } = useEventItemLoadingDisplay(\n loadingContentId,\n searchingContentId,\n errorContentId\n );\n\n return loadingState || ;\n};\n\nexport type UploadETicketsBodyProps = Omit<\n UploadETicketsModalProps,\n 'loadingContentId' | 'searchingContentId' | 'errorContentId'\n>;\n\nconst UploadETicketsContent = ({\n ticketType,\n onUploadDocuments,\n onUploadETickets,\n cancelTo,\n}: UploadETicketsBodyProps) => {\n const { setModal, closeModal } = useContext(ModalContext);\n\n const { posEntity, setActivePosEntity } =\n useActivePosEntityContext();\n\n const { refreshMetrics } = useCatalogMetricsContext();\n\n const goBack = useCallback(\n async (isCancelled: boolean) => {\n if (!isCancelled) {\n refreshMetrics?.();\n\n // Refresh the active data so the SaleDetail dialog will have the new content\n await setActivePosEntity(posEntity!.id, posEntity!.idOnMkp, true);\n }\n\n if (cancelTo) {\n setModal(cancelTo);\n } else {\n closeModal(true);\n }\n },\n [\n cancelTo,\n refreshMetrics,\n setActivePosEntity,\n posEntity,\n setModal,\n closeModal,\n ]\n );\n\n return (\n void,\n onNext: () => void,\n onCancel: () => void,\n onBack: () => void,\n isFinalPreview: boolean,\n disabled?: boolean\n ) => (\n \n )}\n />\n );\n};\n\nconst UploadETicketFormContent = ({\n cancelTo,\n ticketType,\n onNext,\n onCancel,\n onBack,\n isFinalPreview,\n disabled,\n eTicketUploadInfos,\n setETicketUploadInfos,\n}: {\n cancelTo?: ModalProps;\n ticketType: TicketType.ETicket | TicketType.QRCode;\n onNext: () => void;\n onCancel: () => void;\n onBack: () => void;\n isFinalPreview: boolean;\n disabled?: boolean;\n eTicketUploadInfos: DocumentFileUploadInfo[];\n setETicketUploadInfos: (infos: DocumentFileUploadInfo[]) => void;\n}) => {\n const { formState } = useFormContext();\n const { isDirty, isSubmitting } = formState;\n\n const { event, posEntity } =\n useActivePosEntityContext();\n\n return (\n <>\n \n \n }\n />\n \n\n \n \n \n \n \n {!isFinalPreview ? (\n \n ) : (\n \n )}\n \n \n\n \n \n {!isFinalPreview ? (\n \n ) : (\n <>\n \n \n \n )}\n \n \n \n );\n};\n","import { useCallback, useContext } from 'react';\nimport { SeatingInfo } from 'src/components/common/SeatingInfo';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { ImageMagnifier } from 'src/core/POS/ImageMagnifier';\nimport { Button } from 'src/core/ui';\nimport { CancellableFormHeader } from 'src/modals/common/CancellableFormHeader';\nimport { ConnectedEventEntityHeader } from 'src/modals/common/EventEntityHeader';\nimport { ModalBody, ModalFooter, ModalProps } from 'src/modals/Modal';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n ArtifactType,\n DocumentType,\n SaleDetails,\n Ticket,\n} from 'src/WebApiController';\n\nimport {\n Divider,\n PreviewTicket,\n SeatLabel,\n} from '../../components/UploadArtifacts/UploadETickets/UploadETickets.styled';\nimport { Summary } from '../common/Summary';\nimport {\n ModalBodyDataContainer,\n ModalBodyHeaderContainer,\n} from '../Modal/Modal.styled';\n\nexport const ViewETickets = ({\n artifactType,\n cancelTo,\n}: {\n artifactType: ArtifactType | null;\n cancelTo: ModalProps;\n}) => {\n const { setModal } = useContext(ModalContext);\n const { event, posEntity } = useActivePosEntityContext();\n const goBack = useCallback(() => {\n setModal(cancelTo);\n }, [setModal, cancelTo]);\n\n return (\n <>\n \n \n }\n />\n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\n// Pulled into a separate component since there were some weird issues with error boundary otherwise\nconst TicketArtifacts = ({\n section,\n tickets,\n artifactType,\n}: {\n section: string;\n tickets: Ticket[];\n artifactType: ArtifactType | null;\n}) => {\n const { posEntityId, entityType } = useActivePosEntityContext();\n\n return (\n <>\n {tickets.map(({ id, row, seat, eTicket, qrCode }, ix) => {\n const userDoc =\n artifactType === ArtifactType.ETicket ? eTicket : qrCode;\n return (\n
    \n \n \n \n \n {userDoc?.pageUri && (\n \n )}\n \n {ix !== tickets.length - 1 && }\n
    \n );\n })}\n \n );\n};\n","import { useCallback, useContext } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { UploadButton } from 'src/components/Buttons';\nimport {\n ExternalIdForm,\n UploadExternalIdsBody,\n UploadExternalIdsForm,\n} from 'src/components/UploadArtifacts/UploadExternalIds';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useCatalogMetricsContext } from 'src/contexts/CatalogMetricsContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { Button } from 'src/core/ui';\nimport { useEventItemLoadingDisplay } from 'src/hooks/useEventItemLoadingDisplay';\nimport { CancellableFormFooter } from 'src/modals/common';\nimport { CancellableFormHeader } from 'src/modals/common/CancellableFormHeader';\nimport { ConnectedEventEntityHeader } from 'src/modals/common/EventEntityHeader';\nimport { ModalBody, ModalFooter, ModalProps } from 'src/modals/Modal';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { EntityWithRealTickets } from 'src/utils/ticketUtils';\nimport {\n PosClientConfig,\n PosUiActionResult,\n SaleMetrics,\n TicketExternalId,\n} from 'src/WebApiController';\n\nimport { modalDetails } from '../common/Modals.css';\nimport { Summary } from '../common/Summary';\nimport {\n ModalBodyDataContainer,\n ModalBodyHeaderContainer,\n} from '../Modal/Modal.styled';\n\nexport type UploadExternalIdProps = {\n onUploadExternalIds?: (\n posClientConfig: PosClientConfig,\n entityId: number,\n externalIds: TicketExternalId[]\n ) => Promise;\n cancelTo?: ModalProps;\n defaultToBulk?: boolean;\n isReadOnly?: boolean;\n loadingContentId: FormatContentId;\n searchingContentId: FormatContentId;\n errorContentId: FormatContentId;\n};\n\nexport const UploadExternalIds = ({\n onUploadExternalIds,\n loadingContentId,\n searchingContentId,\n errorContentId,\n cancelTo,\n}: UploadExternalIdProps) => {\n const { loadingState } = useEventItemLoadingDisplay(\n loadingContentId,\n searchingContentId,\n errorContentId\n );\n\n return (\n loadingState || (\n \n )\n );\n};\n\nexport type UploadExternalIdsContentProps = Omit<\n UploadExternalIdProps,\n 'loadingContentId' | 'searchingContentId' | 'errorContentId'\n>;\n\nexport const UploadExternalIdsContent = ({\n onUploadExternalIds,\n cancelTo,\n isReadOnly = false,\n}: UploadExternalIdsContentProps) => {\n const { closeModal, setModal } = useContext(ModalContext);\n\n const { posEntity: posEntity, setActivePosEntity } =\n useActivePosEntityContext();\n const { refreshMetrics } = useCatalogMetricsContext();\n\n const goBack = useCallback(\n async (isCancelled: boolean) => {\n if (!isCancelled) {\n refreshMetrics?.();\n\n // Refresh the active data so the SaleDetail dialog will have the new content\n await setActivePosEntity(posEntity!.id, posEntity!.idOnMkp, true);\n }\n\n if (cancelTo) {\n setModal(cancelTo);\n } else {\n closeModal(true);\n }\n },\n [\n cancelTo,\n refreshMetrics,\n setActivePosEntity,\n posEntity,\n setModal,\n closeModal,\n ]\n );\n\n return (\n void, disabled?: boolean) => (\n \n )}\n />\n );\n};\n\nconst UploadExternalIdsFormContent = ({\n cancelTo,\n onUploadClick,\n disabled,\n goBack,\n}: {\n cancelTo?: ModalProps;\n onUploadClick: () => void;\n disabled?: boolean;\n goBack: (isCancelled: boolean) => void;\n}) => {\n const { formState } = useFormContext();\n const { isDirty, isSubmitting } = formState;\n\n const { event, posEntity } =\n useActivePosEntityContext();\n\n return (\n <>\n \n }\n />\n \n \n \n \n \n \n {isSubmitting || !posEntity ? (\n \n ) : (\n
    \n \n
    \n )}\n
    \n \n \n {/* We want to use isReadOnly here because isReadOnly is meant for this dialog is informational */}\n {!disabled && (\n \n {\n e.stopPropagation();\n e.preventDefault();\n onUploadClick();\n }}\n textContentId={ContentId.SaveTicketIds}\n />\n \n )}\n {disabled && (\n \n )}\n \n \n );\n};\n","import { useEventItemLoadingDisplay } from 'src/hooks/useEventItemLoadingDisplay';\nimport { ModalProps } from 'src/modals/Modal';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { EntityWithRealTickets } from 'src/utils/ticketUtils';\n\nimport { UploadExternalIdsContent } from './UploadExternalIds';\n\nexport type ViewExternalIdModalProps = {\n cancelTo?: ModalProps;\n defaultToBulk?: boolean;\n isReadOnly?: boolean;\n loadingContentId: FormatContentId;\n searchingContentId: FormatContentId;\n errorContentId: FormatContentId;\n};\n\nexport const ViewExternalIds = ({\n cancelTo,\n loadingContentId,\n searchingContentId,\n errorContentId,\n}: ViewExternalIdModalProps) => {\n const { loadingState } = useEventItemLoadingDisplay(\n loadingContentId,\n searchingContentId,\n errorContentId\n );\n\n return (\n loadingState || \n );\n};\n","import { useCallback, useContext } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { UploadButton } from 'src/components/Buttons';\nimport {\n TicketUrlForm,\n UploadTicketUrlsForm,\n} from 'src/components/UploadArtifacts/UploadTicketUrls';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useCatalogMetricsContext } from 'src/contexts/CatalogMetricsContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { Button } from 'src/core/ui';\nimport { useEventItemLoadingDisplay } from 'src/hooks/useEventItemLoadingDisplay';\nimport { CancellableFormFooter } from 'src/modals/common';\nimport { CancellableFormHeader } from 'src/modals/common/CancellableFormHeader';\nimport { ConnectedEventEntityHeader } from 'src/modals/common/EventEntityHeader';\nimport { ModalBody, ModalFooter, ModalProps } from 'src/modals/Modal';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { EntityWithRealTickets } from 'src/utils/ticketUtils';\nimport {\n PosClientConfig,\n PosUiActionResult,\n SaleMetrics,\n TicketUrl,\n} from 'src/WebApiController';\n\nimport { UploadTicketUrlsBody } from '../../components/UploadArtifacts/UploadTicketUrls/UploadTicketUrlsBody';\nimport { modalDetails } from '../common/Modals.css';\nimport { Summary } from '../common/Summary';\nimport {\n ModalBodyDataContainer,\n ModalBodyHeaderContainer,\n} from '../Modal/Modal.styled';\n\nexport type UploadTicketUrlProps = {\n onUploadTicketUrls?: (\n posClientConfig: PosClientConfig,\n entityId: number,\n ticketUrls: TicketUrl[]\n ) => Promise;\n cancelTo?: ModalProps;\n defaultToBulk?: boolean;\n isReadOnly?: boolean;\n loadingContentId: FormatContentId;\n searchingContentId: FormatContentId;\n errorContentId: FormatContentId;\n};\n\nexport const UploadTicketUrls = ({\n onUploadTicketUrls,\n loadingContentId,\n searchingContentId,\n errorContentId,\n cancelTo,\n}: UploadTicketUrlProps) => {\n const { loadingState } = useEventItemLoadingDisplay(\n loadingContentId,\n searchingContentId,\n errorContentId\n );\n\n return (\n loadingState || (\n \n )\n );\n};\n\nexport type UploadTicketUrlsContentProps = Omit<\n UploadTicketUrlProps,\n 'loadingContentId' | 'searchingContentId' | 'errorContentId'\n>;\n\nexport const UploadTicketUrlsContent = ({\n onUploadTicketUrls,\n cancelTo,\n isReadOnly = false,\n}: UploadTicketUrlsContentProps) => {\n const { closeModal, setModal } = useContext(ModalContext);\n\n const { posEntity: entityWithTickets, setActivePosEntity } =\n useActivePosEntityContext();\n const { refreshMetrics } = useCatalogMetricsContext();\n\n const goBack = useCallback(\n async (isCancelled: boolean) => {\n if (!isCancelled) {\n refreshMetrics?.();\n\n // Refresh the active data so the SaleDetail dialog will have the new content\n await setActivePosEntity(\n entityWithTickets!.id,\n entityWithTickets!.idOnMkp,\n true\n );\n }\n\n if (cancelTo) {\n setModal(cancelTo);\n } else {\n closeModal(true);\n }\n },\n [\n cancelTo,\n refreshMetrics,\n setActivePosEntity,\n entityWithTickets,\n setModal,\n closeModal,\n ]\n );\n\n return (\n void, disabled?: boolean) => (\n \n )}\n />\n );\n};\n\nconst UploadTicketUrlsFormContent = ({\n cancelTo,\n onUploadClick,\n disabled,\n goBack,\n}: {\n cancelTo?: ModalProps;\n onUploadClick: () => void;\n disabled?: boolean;\n goBack: (isCancelled: boolean) => void;\n}) => {\n const { formState } = useFormContext();\n const { isDirty, isSubmitting } = formState;\n\n const { event, posEntity } =\n useActivePosEntityContext();\n\n return (\n <>\n \n }\n />\n \n \n \n \n \n \n {isSubmitting || !posEntity ? (\n \n ) : (\n
    \n \n
    \n )}\n
    \n \n \n {/* We want to use isReadOnly here because isReadOnly is meant for this dialog is informational */}\n {!disabled && (\n \n {\n e.stopPropagation();\n e.preventDefault();\n onUploadClick();\n }}\n textContentId={ContentId.SaveTicketUrls}\n />\n \n )}\n {disabled && (\n \n )}\n \n \n );\n};\n","import { useEventItemLoadingDisplay } from 'src/hooks/useEventItemLoadingDisplay';\nimport { ModalProps } from 'src/modals/Modal';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { EntityWithRealTickets } from 'src/utils/ticketUtils';\n\nimport { UploadTicketUrlsContent } from './UploadTicketUrls';\n\nexport type ViewTicketUrlModalProps = {\n cancelTo?: ModalProps;\n defaultToBulk?: boolean;\n isReadOnly?: boolean;\n loadingContentId: FormatContentId;\n searchingContentId: FormatContentId;\n errorContentId: FormatContentId;\n};\n\nexport const ViewTicketUrls = ({\n cancelTo,\n loadingContentId,\n searchingContentId,\n errorContentId,\n}: ViewTicketUrlModalProps) => {\n const { loadingState } = useEventItemLoadingDisplay(\n loadingContentId,\n searchingContentId,\n errorContentId\n );\n\n return (\n loadingState || \n );\n};\n","import { useCallback, useContext } from 'react';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { Content, FormatContent } from 'src/contexts/ContentContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { DetailText } from 'src/modals/common';\nimport { ViewTransferTickets } from 'src/modals/TransferTickets/ViewTransferTickets';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { EntityWithRealTickets } from 'src/utils/ticketUtils';\nimport { ArtifactType } from 'src/WebApiController';\nimport { SaleDetails } from 'src/WebApiController';\n\nimport { ModalProps } from '../Modal';\nimport { ViewBarcodes } from '../UploadBarcodes';\nimport { ViewETickets } from '../UploadETickets';\nimport { ViewExternalIds } from '../UploadExternalIds';\nimport { ViewTicketUrls } from '../UploadTicketUrls';\n\nfunction getViewActionConfig(artifactType: ArtifactType | null) {\n switch (artifactType) {\n case ArtifactType.Barcode:\n return {\n contentId: ContentId.ViewBarcodes,\n ViewActionModal: ViewBarcodes,\n };\n case ArtifactType.ETicket:\n return {\n contentId: ContentId.ViewETickets,\n ViewActionModal: ViewETickets,\n };\n case ArtifactType.QRCode:\n return {\n contentId: ContentId.ViewQRCodes,\n ViewActionModal: ViewETickets,\n };\n case ArtifactType.TransferProof:\n return {\n contentId: ContentId.ViewTransferProof,\n ViewActionModal: ViewTransferTickets,\n };\n case ArtifactType.ETicketUrl:\n return {\n contentId: ContentId.ViewWallet,\n ViewActionModal: ViewTransferTickets,\n };\n case ArtifactType.TicketUrl:\n return {\n contentId: ContentId.ViewWallet,\n ViewActionModal: ViewTicketUrls,\n };\n case ArtifactType.ExternalId:\n return {\n contentId: ContentId.ViewTicketIds,\n ViewActionModal: ViewExternalIds,\n };\n default:\n return {\n id: undefined,\n ViewActionModal: undefined,\n };\n }\n}\n\nexport const ViewTickets = ({\n type,\n cancelTo,\n loadingContentId,\n searchingContentId,\n errorContentId,\n}: {\n type: ArtifactType | null;\n cancelTo: ModalProps;\n loadingContentId: FormatContentId;\n searchingContentId: FormatContentId;\n errorContentId: FormatContentId;\n}) => {\n const { posEntity } = useActivePosEntityContext();\n const { setModal } = useContext(ModalContext);\n const { ViewActionModal, contentId } = getViewActionConfig(type);\n\n const notAvailableContent = (\n \n {posEntity?.mkp ? (\n \n ) : (\n \n )}\n \n );\n\n const viewTickets = useCallback(() => {\n if (!ViewActionModal) {\n return;\n }\n\n setModal({\n children: (\n \n ),\n size: 'slide-in',\n clickOutsideToClose: true,\n deepLinkKey: cancelTo.deepLinkKey,\n deepLinkValue: cancelTo.deepLinkValue,\n });\n }, [\n ViewActionModal,\n setModal,\n type,\n cancelTo,\n loadingContentId,\n searchingContentId,\n errorContentId,\n ]);\n\n if (!ViewActionModal) {\n return notAvailableContent;\n }\n\n if (type === ArtifactType.TransferProof) {\n // Transfer is only on Sale\n const sale = posEntity as SaleDetails;\n if (\n // If it has none of the transfer artifacts\n !(\n sale?.transferProofDocs ||\n sale?.transferUrls ||\n sale?.transferProofId\n ) &&\n // or if it has no barcode to show\n (sale?.tickets ?? []).findIndex((t) => t.barcode) < 0\n ) {\n return notAvailableContent;\n }\n }\n\n // Both the below can be Sale or Listing (predelivered)\n\n if (type === ArtifactType.Barcode) {\n // if has at least one barcode, show the barcodes view, else show not available\n if ((posEntity?.tickets ?? []).findIndex((t) => t.barcode) < 0) {\n return notAvailableContent;\n }\n } else if (type === ArtifactType.ETicket) {\n // if has at least one e-ticket docs, show the docs view, else show not available\n if ((posEntity?.tickets ?? []).findIndex((t) => t.eTicket) < 0) {\n return notAvailableContent;\n }\n } else if (type === ArtifactType.TicketUrl) {\n // if has at least one e-ticket docs, show the docs view, else show not available\n if ((posEntity?.tickets ?? []).findIndex((t) => t.ticketUrl) < 0) {\n return notAvailableContent;\n }\n } else if (type === ArtifactType.ExternalId) {\n // if has at least one e-ticket docs, show the docs view, else show not available\n if ((posEntity?.tickets ?? []).findIndex((t) => t.externalTicketId) < 0) {\n return notAvailableContent;\n }\n }\n\n return contentId ? (\n \n \n \n ) : null;\n};\n","import { useFormContext } from 'react-hook-form';\nimport { TicketTypePriorityInput } from 'src/components/common/TicketTypePriorityInput';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { Detail, DetailGroup } from 'src/modals/common';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { DeliveryType, ListingDetailsUpdateInput } from 'src/WebApiController';\n\nexport const TicketTypePrioritySection = ({\n deliveryType,\n disabled,\n}: {\n deliveryType: DeliveryType | null;\n disabled: boolean;\n}) => {\n const { watch, setValue } = useFormContext();\n const isMobile = useMatchMedia('mobile');\n const ticketTypeRules = watch('ticketTypeRules');\n\n return (\n \n }\n style={{ flex: 1 }}\n detail={\n <>\n {\n setValue('ticketTypeRules', newRules);\n }}\n disabled={disabled}\n />\n \n }\n />\n \n );\n};\n","import { isEqual } from 'date-fns';\nimport { useCallback, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { InHandDateDisplay } from 'src/components/common/InHandDateDisplay';\nimport { InHandDateInput } from 'src/components/Input/InHandDateInput';\nimport { DeliveryTypeSelector } from 'src/components/Selectors/DeliveryTypeSelector';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Stack, Switch } from 'src/core/ui';\nimport { AlertWithSuppressionDialog } from 'src/dialogs/AlertWithSuppressionDialog';\nimport { useDeliveryInfoChangeDialog } from 'src/dialogs/AlertWithSuppressionDialog/useDeliveryInfoChangeDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useAnyMarketplaceHandledByProcessor } from 'src/hooks/useMarketplaceHandledByProcessor';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport {\n useUserCanSetDeliveryStrategy,\n useUserCanUpdateListing,\n useUserCanViewPredelivery,\n} from 'src/hooks/useUserHasListingPermissions';\nimport {\n Detail,\n DetailGroup,\n DetailSection,\n SectionContent,\n} from 'src/modals/common';\nimport { ViewTickets } from 'src/modals/ViewTickets';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { DELIVERY_OPTIONS_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { isDatePassedHours } from 'src/utils/dateTimeUtils';\nimport { getListingDetailsModalConfigWithDeepLink } from 'src/utils/inventoryUtils';\nimport { getDeliveryTypeIcon } from 'src/utils/ticketTypeUtils';\nimport {\n Event,\n Feature,\n ListingDetails,\n ListingDetailsUpdateInput,\n PreDeliveryState,\n} from 'src/WebApiController';\n\nimport { TicketTypePrioritySection } from './TicketTypePrioritySection';\n\nexport const DeliverySection = ({\n listing,\n disabled: externalDisabled,\n event,\n isBulkEdit,\n}: {\n event?: Event | null;\n listing?: ListingDetails | null;\n disabled?: boolean;\n isBulkEdit?: boolean;\n}) => {\n const hasAutoFulfillFeature = useUserHasFeature(Feature.AutoFulfillSetting);\n const isAnyHandledByProcessor = useAnyMarketplaceHandledByProcessor();\n\n const { watch, setValue } = useFormContext();\n\n const isMobile = useMatchMedia('mobile');\n const inHandAt = watch('inHandDate');\n const isNoFulfill = watch('isNoFulfill');\n const updateSalesOfListings = watch('updateSalesOfListings');\n\n const deliveryType = watch('delivType');\n\n const ticketsSold = useMemo(\n () => (listing?.tickets?.filter((t) => t.saleId) ?? []).length,\n [listing?.tickets]\n );\n\n const hasUpdateSalesOfListingsFeature = useUserHasFeature(\n Feature.UpdateSalesOfListingsDeliveryInfo\n );\n\n const hasAnySales = ticketsSold > 0;\n\n const warningDialog = useBasicDialog();\n const deliveryInfoChangeHookProps = useDeliveryInfoChangeDialog(\n () => {\n setValue('updateSalesOfListings', true);\n },\n () => {\n // set don't change back\n setValue('updateSalesOfListings', false);\n }\n );\n\n const { preDelivState, isUndeliv } = listing ?? {};\n const predeliveryArtifactTypes = listing?.availArtTypes ?? [];\n const cancelTo = listing?.id\n ? getListingDetailsModalConfigWithDeepLink(listing.id)\n : undefined;\n const inHandDate = inHandAt\n ? new Date(inHandAt)\n : isBulkEdit\n ? undefined\n : new Date();\n\n const canUpdate = useUserCanUpdateListing(listing, isBulkEdit);\n const canSetDeliveryStrategy = useUserCanSetDeliveryStrategy(\n listing,\n isBulkEdit\n );\n const canViewFulfillmentArtifacts = useUserCanViewPredelivery(\n listing,\n isBulkEdit\n );\n const disabled = externalDisabled || !canUpdate;\n\n const icon = getDeliveryTypeIcon(listing?.delivType);\n\n const confirmUpdateSales = useCallback(() => {\n if (\n hasAnySales &&\n hasUpdateSalesOfListingsFeature &&\n // only ask once per form\n updateSalesOfListings == null\n ) {\n if (isDatePassedHours(deliveryInfoChangeHookProps.lastTimeStamp, 1)) {\n // Show warning if it has passed 1 hr or not suppressed\n warningDialog.launchDialog();\n } else {\n // If suppressed, assumed it's true (since the current alert suppression only save for Yes answer)\n setValue('updateSalesOfListings', true);\n }\n }\n }, [\n deliveryInfoChangeHookProps.lastTimeStamp,\n hasAnySales,\n hasUpdateSalesOfListingsFeature,\n setValue,\n updateSalesOfListings,\n warningDialog,\n ]);\n\n return (\n <>\n }>\n \n {!isBulkEdit && listing && (\n \n }\n style={{ flex: 1 }}\n detail={\n listing?.isSeatSaver ? (\n {\n if (newD !== deliveryType) {\n setValue('delivType', newD);\n\n confirmUpdateSales();\n }\n }}\n />\n ) : (\n \n {icon}\n \n \n )\n }\n />\n \n )}\n {!isBulkEdit && listing && (\n \n \n }\n style={{ flex: 1 }}\n detail={\n \n \n \n }\n />\n\n {canViewFulfillmentArtifacts &&\n cancelTo &&\n canViewFulfillmentArtifacts &&\n predeliveryArtifactTypes.map((predeliveryArtifactType) => (\n \n ))}\n \n \n )}\n {!isBulkEdit && hasAutoFulfillFeature && isAnyHandledByProcessor && (\n \n \n }\n style={{ flex: 1 }}\n detail={\n e.stopPropagation()}\n onCheckedChange={(isChecked) => {\n setValue('isNoFulfill', !isChecked);\n\n confirmUpdateSales();\n }}\n />\n }\n />\n \n \n )}\n \n }\n style={{ flex: 1 }}\n detail={\n \n {!isBulkEdit && }\n {\n if (date) {\n if (!inHandDate || !isEqual(date, inHandDate)) {\n setValue('inHandDate', date.toISOString());\n }\n\n setValue('daysBeforeEvent', daysBeforeEvent ?? null);\n\n confirmUpdateSales();\n } else {\n if (isBulkEdit) {\n setValue('inHandDate', null);\n }\n }\n }}\n value={inHandAt}\n targetDate={\n event?.dates?.start\n ? new Date(event?.dates?.start)\n : new Date()\n }\n />\n \n }\n />\n \n {!isBulkEdit && listing && (\n \n )}\n \n \n }\n size=\"md\"\n {...warningDialog.dialogProps}\n alerts={[deliveryInfoChangeHookProps]}\n onOkay={() => {\n warningDialog.closeDialog();\n }}\n okText={ContentId.Yes}\n cancelText={ContentId.No}\n onCancel={() => warningDialog.closeDialog()}\n />\n \n );\n};\n","import {\n ChangeEvent,\n ForwardedRef,\n forwardRef,\n useCallback,\n useMemo,\n} from 'react';\nimport { FieldValues, Path, useFormContext } from 'react-hook-form';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport {\n getTextFieldState,\n PosTextFieldProps,\n} from 'src/core/POS/PosTextField';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { onPriceFieldChange } from 'src/utils/inventoryUtils';\nimport { roundToPrecision } from 'src/utils/numberFormatter';\n\ntype ListingPriceInputProps = {\n isBulkEdit?: boolean;\n currencyCode: string;\n field: Path;\n otherField: Path;\n isAllInPrice?: boolean;\n fieldToOtherRatio: number;\n onUnbroadcast?: () => void;\n onChange?: (newPrice: number) => void;\n onEnter?: () => void;\n} & Omit<\n PosTextFieldProps,\n 'type' | 'errors' | 'currency' | 'value' | 'onChange'\n>;\n\nconst ListingPriceInputInner = (\n {\n isBulkEdit,\n currencyCode,\n field,\n otherField,\n isAllInPrice,\n fieldToOtherRatio,\n onBlur,\n disabled,\n onChange,\n onEnter,\n placeholder,\n ...rest\n }: ListingPriceInputProps,\n ref: ForwardedRef\n) => {\n const { getUiCurrency } = useLocalizationContext();\n const { setValue, watch, setError, clearErrors, getFieldState, formState } =\n useFormContext();\n\n let price = watch(field) as number | null;\n const otherPrice = watch(otherField) as number | null;\n\n const uiCurrency = useMemo(\n () => getUiCurrency(currencyCode),\n [currencyCode, getUiCurrency]\n );\n\n if (isAllInPrice && otherPrice && price !== fieldToOtherRatio * otherPrice) {\n // This is a hack where the price fields for external marketplaces are not editable and is being derived from\n // only the StubHub price - so if the StubHub price has no fees, the external marketplaces price won't see the\n // reflection of their own fees\n price = roundToPrecision(fieldToOtherRatio * otherPrice, uiCurrency.dec);\n }\n\n const requiredMsg = useContent(ContentId.Required);\n const dontChange = useContent(ContentId.DontChange);\n\n const fieldError = getFieldState(field, formState)?.error?.message;\n\n const onChangeHandler = useCallback(\n (e: ChangeEvent) => {\n const newValue = parseFloat(e.target.value) ?? 0;\n\n onChange?.(newValue);\n\n onPriceFieldChange(\n newValue,\n field,\n price,\n otherField,\n otherPrice,\n // This is the otherToFieldRatio, so we take the inverse of fieldToOtherRatio\n 1 / fieldToOtherRatio,\n clearErrors,\n setValue\n );\n },\n [\n clearErrors,\n field,\n fieldToOtherRatio,\n onChange,\n otherField,\n otherPrice,\n price,\n setValue,\n ]\n );\n\n const onBlurHandler = useCallback(\n (e: React.FocusEvent) => {\n if (!isBulkEdit) {\n if (price == null || otherPrice == null) {\n setError(field, { message: requiredMsg });\n setError(otherField, { message: requiredMsg });\n }\n }\n\n if ((price ?? 0) < 0 || (otherPrice ?? 0) < 0) {\n setError(field, { message: requiredMsg });\n setError(otherField, { message: requiredMsg });\n }\n onBlur?.(e);\n },\n [\n field,\n isBulkEdit,\n onBlur,\n otherField,\n otherPrice,\n price,\n requiredMsg,\n setError,\n ]\n );\n\n return (\n \n {\n if (e.key === 'Enter' && typeof onEnter === 'function') {\n onEnter();\n }\n }}\n disabled={disabled}\n ref={ref}\n {...rest}\n />\n \n );\n};\n\nexport const ListingPriceInput = forwardRef(ListingPriceInputInner) as (\n props: ListingPriceInputProps & { ref?: ForwardedRef }\n) => ReturnType;\n","import { formatInTimeZone } from 'date-fns-tz';\nimport { createRef, useCallback, useEffect, useMemo, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { MarketplaceLogo } from 'src/components/common/MarketplaceLogo';\nimport { ListingPriceInput } from 'src/components/Input/ListingPriceInput';\nimport { SellerAccountEmployeeSelector } from 'src/components/Selectors/SellerAccountEmployeeSelector';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogMetricsContext } from 'src/contexts/CatalogMetricsContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { useSiteTimezoneContext } from 'src/contexts/SiteTimezoneContext/SiteTimezoneContext';\nimport { Switch } from 'src/core/interim/Switch';\nimport { WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { SimpleTable } from 'src/core/ui';\nimport {\n Alert,\n AlertWithSuppressionDialog,\n useManualPriceDisableAutoPricingDialog,\n} from 'src/dialogs/AlertWithSuppressionDialog';\nimport { useManualPriceAdjustFloorOrCeilingDialog } from 'src/dialogs/AlertWithSuppressionDialog/useManualPriceAdjustFloorOrCeilingDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useGetEventFullInfo } from 'src/hooks/useGetEventFullInfo';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { useUserCanSetPrice } from 'src/hooks/useUserHasListingPermissions';\nimport {\n Detail,\n DetailGroup,\n DetailSection,\n SectionContent,\n} from 'src/modals/common';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { isDatePassedHours } from 'src/utils/dateTimeUtils';\nimport {\n compareMarketplace,\n getIsInternationalEvent,\n} from 'src/utils/eventWithDataUtils';\nimport { getLocaleFromLanguageOrCurrent } from 'src/utils/localeUtils';\nimport { roundToPrecision } from 'src/utils/numberFormatter';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n Event,\n ListingClient,\n ListingDetailDataField,\n ListingDetails,\n ListingDetailsUpdateInput,\n ListingMetrics,\n ListingStatus,\n Marketplace,\n Permission,\n} from 'src/WebApiController';\n\nimport * as styles from './MarketplaceBroadcastSection/MarketplaceDisplay.css';\n\nexport const EconomicsSection = ({\n listing,\n disabled,\n isBulkEdit,\n activeEvent,\n displayMode = 'DEFAULT',\n}: {\n listing?: ListingDetails | null;\n disabled?: boolean;\n displayMode?: 'PRICE_ONLY' | 'NO_PRICE' | 'DEFAULT';\n isBulkEdit?: boolean;\n activeEvent?: Event;\n}) => {\n const { timeZone } = useSiteTimezoneContext();\n const isListed =\n listing?.status === ListingStatus.Listed ||\n listing?.status === ListingStatus.ListingPending;\n\n const { activeAccountWebClientConfig, loginContext } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n const { setActivePosEntity } = useActivePosEntityContext();\n const { getUiCurrency } = useLocalizationContext();\n const uiCurrency = useMemo(\n () =>\n getUiCurrency(\n listing?.currency ??\n loginContext?.user?.activeAccount?.currencyCode ??\n 'USD'\n ),\n [\n getUiCurrency,\n listing?.currency,\n loginContext?.user?.activeAccount?.currencyCode,\n ]\n );\n const canChangePricer = useUserHasAnyOfPermissions(\n Permission.Inventory_SetPrice\n );\n const { refreshMetrics } = useCatalogMetricsContext();\n\n const { watch, setValue, register, getValues, formState } =\n useFormContext();\n const dontChange = useContent(ContentId.DontChange);\n const defaultPlaceholder = useContent(ContentId.Default);\n\n const listPrice = watch('listPrice');\n const marketplacePriceUpdates = watch('marketplacePriceUpdates');\n const autoPricingEnabled = watch('autoPricingEnabled');\n const netProceedsFloor = watch('netProceedsFloor');\n const netProceedsCeiling = watch('netProceedsCeiling');\n const pricerSellerUserId = watch('pricerSellerUserId');\n const buyerUserId = watch('buyerUserId');\n const canSetPrice = useUserCanSetPrice(listing, isBulkEdit);\n\n const onUnbroadcast = useCallback(() => {\n if (!listing) {\n return;\n }\n tryInvokeApi(\n async () => {\n const client = new ListingClient(activeAccountWebClientConfig);\n\n const result = await client.deleteMarketplaceListings(listing.id, []);\n if (result) {\n refreshMetrics?.();\n\n // Refresh the active data so the SaleDetail dialog and table will have the new content\n await setActivePosEntity(listing.id, listing.idOnMkp, true, [\n ListingDetailDataField.Basic,\n ]);\n }\n },\n (error) => {\n showErrorDialog('ListingClient.deleteMarketplaceListings', error, {\n trackErrorData: {\n listingId: listing.id,\n marketplaceListingID: listing.idOnMkp,\n },\n });\n }\n );\n }, [\n activeAccountWebClientConfig,\n listing,\n refreshMetrics,\n setActivePosEntity,\n showErrorDialog,\n ]);\n\n const thirdPartyMPs = (\n listing?.mkpListings?.map(\n ({ mkp, markup, sellerAccountDefaultMarkup, sellerFee }) => ({\n mkp,\n markup,\n sellerAccountDefaultMarkup:\n sellerAccountDefaultMarkup != null\n ? roundToPrecision(sellerAccountDefaultMarkup * 100, 2)\n : null,\n sellerFee,\n })\n ) ??\n loginContext?.user?.activeAccount?.marketplaceSettings?.map(\n ({ mkp, markup, sellerFee }) => ({\n mkp,\n markup,\n sellerAccountDefaultMarkup: markup,\n sellerFee,\n })\n ) ??\n []\n )\n .filter((ml) => ml.mkp)\n .reduce(\n (r, m) => {\n r[m.mkp!] = m;\n return r;\n },\n {} as Record<\n Marketplace,\n {\n mkp: Marketplace;\n markup: number | null;\n sellerAccountDefaultMarkup: number | null;\n sellerFee: number | null;\n }\n >\n );\n const stubHubMarketplace = thirdPartyMPs[Marketplace.StubHub];\n\n const isDisabled = useMemo(() => {\n if (disabled || !canSetPrice) return true;\n // Bulk edit mode should not disable the section\n if (!listing) return false;\n if (listing.isDeleted) return true;\n\n return false;\n }, [disabled, canSetPrice, listing]);\n\n const { event, venue } = useGetEventFullInfo(activeEvent);\n\n const isInternationalEvent = getIsInternationalEvent(venue?.country?.code);\n\n const warningDialog = useBasicDialog();\n\n const manualPriceDisableAutoPricingProps =\n useManualPriceDisableAutoPricingDialog(() => {\n setValue('autoPricingEnabled', false);\n });\n\n const marketplacePrices = marketplacePriceUpdates\n .filter((m) => m.priceByMarketplace)\n .map((m) => m.listPrice);\n const allListPrices = useMemo(() => {\n const p = [listPrice, ...marketplacePrices]\n .filter((n) => n != null)\n .map((n) => n!);\n\n return p;\n }, [listPrice, marketplacePrices]);\n\n const smallestListPrice = useMemo(\n () => Math.min(...allListPrices.filter((l) => l > 0)),\n [allListPrices]\n );\n const largestListPrice = useMemo(\n () => Math.max(...allListPrices.filter((l) => l > 0)),\n [allListPrices]\n );\n const manualPriceAdjustFloorProps = useManualPriceAdjustFloorOrCeilingDialog(\n smallestListPrice,\n netProceedsFloor,\n netProceedsCeiling,\n () => {\n if (smallestListPrice < (netProceedsFloor ?? Number.MIN_VALUE)) {\n setValue('netProceedsFloor', smallestListPrice);\n }\n },\n () => {\n if (\n listPrice != null &&\n listPrice > 0 &&\n listPrice < (netProceedsFloor ?? Number.MIN_VALUE)\n ) {\n setValue('listPrice', netProceedsFloor);\n }\n\n marketplacePriceUpdates.forEach((m, i) => {\n if (m.priceByMarketplace && m.listPrice != null && m.listPrice > 0) {\n if (m.listPrice < (netProceedsFloor ?? 0)) {\n setValue(\n `marketplacePriceUpdates.${i}.listPrice`,\n netProceedsFloor\n );\n }\n }\n });\n }\n );\n\n const manualPriceAdjustCeilingProps =\n useManualPriceAdjustFloorOrCeilingDialog(\n largestListPrice,\n netProceedsFloor,\n netProceedsCeiling,\n () => {\n if (largestListPrice > (netProceedsCeiling ?? Number.MAX_VALUE)) {\n setValue('netProceedsCeiling', largestListPrice);\n }\n },\n () => {\n if (\n listPrice != null &&\n listPrice > 0 &&\n listPrice > (netProceedsCeiling ?? Number.MAX_VALUE)\n ) {\n setValue('listPrice', netProceedsCeiling);\n }\n\n marketplacePriceUpdates.forEach((m, i) => {\n if (m.priceByMarketplace && m.listPrice != null && m.listPrice > 0) {\n if (m.listPrice > (netProceedsCeiling ?? Number.MAX_VALUE)) {\n setValue(\n `marketplacePriceUpdates.${i}.listPrice`,\n netProceedsCeiling\n );\n }\n }\n });\n }\n );\n\n const [alerts, setAlerts] = useState([]);\n const rowsCount = marketplacePriceUpdates.length + 1;\n const [inputRefsArray] = useState(() =>\n Array.from({ length: rowsCount }, () => createRef())\n );\n const [focusedInputIndex, setFocusedInputIndex] = useState(0);\n\n const getFloorAlerts = useCallback((): Alert[] => {\n if (smallestListPrice < (netProceedsFloor ?? Number.MIN_VALUE)) {\n if (isDatePassedHours(manualPriceAdjustFloorProps.lastTimeStamp, 1)) {\n return [manualPriceAdjustFloorProps];\n }\n }\n return [];\n }, [manualPriceAdjustFloorProps, netProceedsFloor, smallestListPrice]);\n\n const getCeilingAlerts = useCallback((): Alert[] => {\n if (largestListPrice > (netProceedsCeiling ?? Number.MAX_VALUE)) {\n if (isDatePassedHours(manualPriceAdjustCeilingProps.lastTimeStamp, 1)) {\n return [manualPriceAdjustCeilingProps];\n }\n }\n return [];\n }, [largestListPrice, manualPriceAdjustCeilingProps, netProceedsCeiling]);\n const getAutoPriceAlerts = useCallback((): Alert[] => {\n if (\n autoPricingEnabled &&\n isDatePassedHours(manualPriceDisableAutoPricingProps.lastTimeStamp, 1)\n ) {\n return [manualPriceDisableAutoPricingProps];\n }\n return [];\n }, [autoPricingEnabled, manualPriceDisableAutoPricingProps]);\n\n const onPriceChanged = useCallback(() => {\n if (listPrice === formState?.defaultValues?.listPrice) {\n return;\n }\n const newAlerts = [\n ...getFloorAlerts(),\n ...getCeilingAlerts(),\n ...getAutoPriceAlerts(),\n ];\n\n if (!isBulkEdit && newAlerts.length) {\n setAlerts(newAlerts);\n warningDialog.launchDialog();\n }\n }, [\n listPrice,\n formState?.defaultValues?.listPrice,\n getFloorAlerts,\n getCeilingAlerts,\n getAutoPriceAlerts,\n isBulkEdit,\n warningDialog,\n ]);\n\n const onPriceEdit = useCallback(\n (newPrice: number, priceByMarketplaceEnabled: boolean, idx: number) => {\n if (listPrice) {\n const newMarkup = (newPrice - listPrice) / listPrice;\n\n if (priceByMarketplaceEnabled) {\n setValue(\n `marketplacePriceUpdates.${idx}.markup`,\n roundToPrecision(newMarkup * 100, 2)\n );\n onPriceChanged();\n }\n }\n },\n [listPrice, onPriceChanged, setValue]\n );\n\n const handleEnter = (index: number) => {\n let nextIndex = 0;\n for (let i = index + 1; i < rowsCount; i++) {\n // find next enabled\n if (marketplacePriceUpdates[i - 1]?.priceByMarketplace) {\n nextIndex = i;\n break;\n }\n }\n const nextInput = inputRefsArray?.[nextIndex]?.current;\n if (nextInput) {\n nextInput.focus();\n setFocusedInputIndex(() => nextIndex);\n }\n onPriceChanged();\n };\n\n useEffect(() => {\n if (isDisabled) return;\n const nextInput = inputRefsArray?.[focusedInputIndex]?.current;\n if (nextInput) {\n setTimeout(() => {\n nextInput.focus();\n nextInput.select();\n }, 100);\n }\n }, [isDisabled, focusedInputIndex, inputRefsArray]);\n\n return (\n }>\n {displayMode !== 'NO_PRICE' &&\n isBulkEdit &&\n (listPrice != null ||\n marketplacePriceUpdates.some((m) => m.listPrice != null)) && (\n \n \n }\n />\n \n )}\n \n {displayMode !== 'NO_PRICE' && (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n onPriceChanged()}\n onEnter={() => handleEnter(0)}\n />\n \n \n onPriceChanged()}\n onEnter={() => handleEnter(0)}\n />\n \n \n {(!isInternationalEvent || isBulkEdit) &&\n // We only show other marketplaces when the Event is US\n marketplacePriceUpdates\n .filter((mp) => mp.marketplace !== Marketplace.StubHub)\n .toSorted((a, b) =>\n compareMarketplace(a.marketplace, b.marketplace)\n )\n .map((mp, i) => {\n const ml = thirdPartyMPs[mp.marketplace!];\n\n const priceByMarketplaceEnabled = getValues(\n `marketplacePriceUpdates.${i}.priceByMarketplace`\n );\n\n return (\n \n \n \n \n \n handleEnter(i + 1)}\n onChange={(val) => {\n onPriceEdit(val, priceByMarketplaceEnabled, i);\n }}\n />\n \n \n {\n onPriceEdit(val, priceByMarketplaceEnabled, i);\n }}\n onEnter={() => handleEnter(i + 1)}\n />\n \n \n \n \n \n \n\n \n {\n const newMode = !mp.priceByMarketplace;\n setValue(\n `marketplacePriceUpdates.${i}.priceByMarketplace`,\n newMode\n );\n if (!newMode) {\n // If this is false, set the value to listValue\n const mpListPrice = roundToPrecision(\n (listPrice ?? 0) * (1 + (ml.markup ?? 0)),\n uiCurrency.dec\n );\n setValue(\n `marketplacePriceUpdates.${i}.listPrice`,\n mpListPrice\n );\n }\n\n setValue(\n `marketplacePriceUpdates.${i}.markup`,\n null\n );\n }}\n />\n \n \n );\n })}\n \n \n )}\n {displayMode !== 'PRICE_ONLY' && (\n <>\n \n }\n style={{ width: '100%' }}\n >\n {\n if (newId !== pricerSellerUserId) {\n setValue('pricerSellerUserId', newId);\n }\n }}\n onClick={(e) => e.stopPropagation()}\n />\n \n \n {isBulkEdit && (\n \n }\n style={{ width: '100%' }}\n >\n {\n if (newId !== buyerUserId) {\n setValue('buyerUserId', newId);\n }\n }}\n onClick={(e) => e.stopPropagation()}\n />\n \n \n )}\n {!isBulkEdit && listing && (\n \n {listing.lastPrcUpdOn && (\n }\n detail={\n \n {listing.lastPrcUpdOn\n ? formatInTimeZone(\n new Date(listing.lastPrcUpdOn),\n timeZone,\n 'MMM d, yyyy',\n {\n locale: getLocaleFromLanguageOrCurrent(),\n }\n )\n : ''}\n \n }\n />\n )}\n \n )}\n \n )}\n \n\n }\n size=\"md\"\n {...warningDialog.dialogProps}\n alerts={alerts}\n onOkay={() => warningDialog.closeDialog()}\n onCancel={() => warningDialog.closeDialog()}\n />\n \n );\n};\n","import { PropsWithChildren } from 'react';\nimport { mergeProps } from 'src/core/utils';\nimport { BroadcastFailedIcon } from 'src/svgs/BroadcastFailedIcon';\n\nimport { container, messageContainer } from './ErrorIconMessage.css';\n\nexport const ErrorIconMessage = ({\n alignment = 'left',\n children,\n ...props\n}: PropsWithChildren<{\n alignment?: 'center' | 'left' | 'right';\n className?: string;\n}>) => {\n return (\n \n \n
    {children}
    \n \n );\n};\n","import { formatInTimeZone } from 'date-fns-tz';\nimport { useState } from 'react';\nimport { SeatingInfo } from 'src/components/common/SeatingInfo';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useSiteTimezoneContext } from 'src/contexts/SiteTimezoneContext/SiteTimezoneContext';\nimport { vars } from 'src/core/themes';\nimport { Card, Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ListingDetails } from 'src/WebApiController';\n\nimport * as styles from './DuplicateSeatDialogEntry.css';\n\nexport type DuplicateSeatDialogEntryProps = {\n activeListing: ListingDetails;\n listingId: number;\n lastUpdateDate: Date;\n onClick: (listingId: number) => void;\n};\n\nexport function DuplicateSeatDialogEntry({\n activeListing,\n listingId,\n lastUpdateDate,\n onClick,\n}: DuplicateSeatDialogEntryProps) {\n const { timeZone } = useSiteTimezoneContext();\n const [isHovered, setIsHovered] = useState(false);\n const formattedDate = formatInTimeZone(\n lastUpdateDate,\n timeZone,\n 'MMM d, yyyy, h:mm a'\n );\n\n return (\n setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n >\n onClick(listingId)}\n >\n \n\n \n \n ID: {listingId}\n \n \n \n \n\n \n {formattedDate}\n \n \n \n \n );\n}\n","import { useQuery } from '@tanstack/react-query';\nimport { ComponentProps, useCallback, useContext } from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { CancelButton } from 'src/components/Buttons';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content, FormatContent } from 'src/contexts/ContentContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { Stack } from 'src/core/ui';\nimport { BodySectionTitle, FieldError } from 'src/modals/common';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { getListingDetailsModalConfigWithDeepLink } from 'src/utils/inventoryUtils';\nimport {\n ListingClient,\n ListingDetailDataField,\n ListingDetails,\n} from 'src/WebApiController';\n\nimport { DuplicateSeatDialogEntry } from './DuplicateSeatDialogEntry';\n\nexport type DuplicateSeatsSelectionDialogProps = ComponentProps<\n typeof RSModal\n> & {\n onCancel: () => void;\n};\n\nexport function DuplicateSeatsSelectionDialog({\n onCancel,\n ...rest\n}: DuplicateSeatsSelectionDialogProps) {\n const { posEntity: listing, setActivePosEntity } =\n useActivePosEntityContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n const { setModal } = useContext(ModalContext);\n\n const shouldQuery =\n listing?.id != null && activeAccountWebClientConfig.activeAccountId != null;\n const {\n data: duplicateListingInfo,\n isLoading,\n error,\n } = useQuery({\n queryKey: [\n 'ListingClient.GetDuplicateListingsForListingIds',\n activeAccountWebClientConfig,\n listing?.id,\n ],\n queryFn: async () => {\n if (!shouldQuery) {\n return null;\n }\n const data = await new ListingClient(\n activeAccountWebClientConfig\n ).getDuplicateListingsForListingId(listing?.id);\n\n return data;\n },\n\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n showErrorDialog(\n 'ListingClient.GetDuplicateListingsForListingIds',\n error,\n {\n trackErrorData: {\n activeAccountId: activeAccountWebClientConfig.activeAccountId,\n },\n }\n );\n },\n },\n });\n\n const activeListingInfo = duplicateListingInfo?.[0];\n\n const onDuplicateListingClick = useCallback(\n (listingId: number) => {\n setActivePosEntity(listingId, null, false, [\n ListingDetailDataField.Basic,\n ]);\n setModal(getListingDetailsModalConfigWithDeepLink(listingId, true));\n },\n [setActivePosEntity, setModal]\n );\n\n return (\n }\n footer={\n <>\n \n \n }\n onCancel={isLoading ? undefined : onCancel}\n >\n {isLoading || !listing ? (\n \n ) : error ? (\n Failed fetching duplicate listings\n ) : (\n \n \n \n \n \n {activeListingInfo && (\n \n )}\n \n \n \n {duplicateListingInfo?.map((info) => (\n \n ))}\n \n )}\n \n );\n}\n","import { ComponentProps } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Button, Stack } from 'src/core/ui';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { DuplicateSeatsSelectionDialog } from './DuplicateSeatsSelectionDialog';\n\nexport type LaunchDuplicateSeatsSelectionDialogProps = ComponentProps<\n typeof Button\n>;\n\nexport const LaunchDuplicateSeatsSelectionDialog = ({\n variant = 'link',\n ...props\n}: LaunchDuplicateSeatsSelectionDialogProps) => {\n const dialog = useBasicDialog();\n const onLaunch = () => {\n dialog.launchDialog();\n };\n\n return (\n \n \n \n \n );\n};\n","import {\n Content,\n FormatContent,\n useContent,\n} from 'src/contexts/ContentContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { ErrorIconMessage } from 'src/core/POS/ErrorIconMessage';\nimport { vars } from 'src/core/themes';\nimport { Card, Stack } from 'src/core/ui';\nimport { LaunchDuplicateSeatsSelectionDialog } from 'src/dialogs/DuplicateSeatsSelectionDialog.tsx';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { FieldError } from 'src/modals/common';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { Feature, ListingDetails } from 'src/WebApiController';\n\nimport * as styles from './DuplicateListingSection.css';\n\nexport const DuplicateListingSection = ({\n listing,\n allowBroadcast,\n handleClick,\n}: {\n listing: ListingDetails;\n allowBroadcast: boolean;\n handleClick: (isChecked: boolean) => void;\n}) => {\n const hasIgnoreDupFeature = useUserHasFeature(Feature.IgnoreDuplicate);\n\n const duplicateSeatHeader = useContent(ContentId.DuplicateSeat);\n if (!listing.dupListingId) {\n return null;\n }\n\n return (\n <>\n {listing.dupListingId ? (\n \n \n \n \n {duplicateSeatHeader}\n \n \n \n \n \n {hasIgnoreDupFeature && (\n \n {\n const isChecked = !allowBroadcast;\n handleClick(isChecked);\n }}\n />\n \n \n )}\n \n \n \n ) : null}\n \n );\n};\n","import { useFormContext } from 'react-hook-form';\nimport { Content, FormatContent } from 'src/contexts/ContentContext';\nimport { Stack, Switch } from 'src/core/ui';\nimport { useMarketplaceHandledByProcessor } from 'src/hooks/useMarketplaceHandledByProcessor';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport {\n Feature,\n ListingDetails,\n ListingDetailsBroadcastSectionUpdates,\n Marketplace,\n} from 'src/WebApiController';\n\nimport * as styles from './EnableNativeSyncSection.css';\n\nexport const EnableNativeSyncSection = ({\n disabled,\n listing,\n}: {\n disabled?: boolean;\n listing: ListingDetails;\n}) => {\n const { watch, setValue } =\n useFormContext();\n const hasEnableNativeSyncFeature = useUserHasFeature(\n Feature.EnableNativeSyncToggle\n );\n\n const stubHubHandledByProcessor = useMarketplaceHandledByProcessor(\n Marketplace.StubHub\n );\n\n const enableNativeSync = watch('enableNativeSync');\n\n const shouldShow =\n hasEnableNativeSyncFeature &&\n // Only show if this listing has StubHub or Ticketmaster enabled and sync-by-processor\n listing.mkpListings?.find(\n (mkp) =>\n mkp.isEnabled &&\n mkp.mkp === Marketplace.StubHub &&\n stubHubHandledByProcessor\n ) != null;\n\n if (!shouldShow) {\n return null;\n }\n\n return (\n \n e.stopPropagation()}\n onCheckedChange={(isChecked) => {\n setValue('enableNativeSync', isChecked, {\n shouldDirty: true,\n });\n }}\n />\n\n \n \n \n \n \n {' '}\n \n .\n \n \n \n );\n};\n","import { useCallback, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { FormatContent, useContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { ErrorMessage } from 'src/core/POS/ErrorMessage';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { SingleFileUploadWithPreview } from 'src/core/POS/SingleFileUploadWithPreview';\nimport { Stack } from 'src/core/ui';\nimport { MAX_ALLOWED_UPLOAD_FILE_SIZE } from 'src/core/utils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n DocumentPage,\n DocumentProcessorClient,\n DocumentType,\n UserDocument,\n UserDocumentLinks,\n} from 'src/WebApiController';\n\nimport * as styles from './UploadDocumentInput.css';\n\nexport type UploadDocumentInputForm = {\n uploadProofDocuments: UserDocument[] | null;\n};\n\ntype FileUploadInfo = {\n file?: File;\n errorMessage?: string;\n docLink?: UserDocumentLinks;\n};\n\nexport const UploadDocumentInput = ({\n entityId,\n entityType,\n uploadInstruction,\n documentType,\n setIsSaveDisabled,\n}: {\n entityId: number;\n entityType: ActionOutboxEntityType;\n uploadInstruction?: React.ReactNode;\n documentType: DocumentType;\n setIsSaveDisabled: (disabled: boolean) => void;\n}) => {\n const { setValue, setError, clearErrors } =\n useFormContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n const [isLoading, setIsLoading] = useState(false);\n const { activeAccountWebClientConfig } = useAppContext();\n\n const [fileInfo, setFileInfo] = useState({});\n\n const failedUpload = useContent(ContentId.UploadFailureMessage);\n const onUploadDocument = useCallback(\n (file: File) => {\n tryInvokeApi(\n async () => {\n const client = new DocumentProcessorClient(\n activeAccountWebClientConfig\n );\n\n if (file) {\n setIsLoading(true);\n setIsSaveDisabled(true);\n const uploadInfo = await client.getDocumentUploadInfo(\n entityId,\n documentType,\n file.type\n );\n\n const result = await client.uploadDocumentWithoutProcessing(\n uploadInfo.entityId,\n entityType,\n uploadInfo.documentType,\n uploadInfo.blobName,\n uploadInfo.documentId,\n uploadInfo.contentType,\n {\n data: file,\n fileName: file.name,\n }\n );\n\n if (result.data) {\n setFileInfo({\n file: file,\n docLink: result.data,\n });\n clearErrors('uploadProofDocuments');\n setValue('uploadProofDocuments', [\n {\n entityId: result.entityId,\n documentId: result.data.documentId,\n documentType: documentType,\n } as UserDocument,\n ]);\n } else {\n setFileInfo({\n file: file,\n errorMessage: result.message ?? failedUpload,\n });\n setValue('uploadProofDocuments', []);\n setError('uploadProofDocuments', {\n message: result.message ?? failedUpload,\n });\n }\n }\n },\n (error) => {\n showErrorDialog(\n 'DocumentProcessorClient.uploadDocumentWithoutProcessing',\n error,\n {\n trackErrorData: fileInfo.file,\n }\n );\n },\n () => {\n setIsLoading(false);\n setIsSaveDisabled(false);\n }\n );\n },\n [\n activeAccountWebClientConfig,\n setIsSaveDisabled,\n entityId,\n documentType,\n entityType,\n clearErrors,\n setValue,\n failedUpload,\n setError,\n showErrorDialog,\n fileInfo.file,\n ]\n );\n\n return (\n \n {uploadInstruction && (\n
    {uploadInstruction}
    \n )}\n {isLoading && fileInfo.file?.name ? (\n
    \n
    \n \n
    \n \n
    \n ) : (\n \n fileName={fileInfo.file?.name}\n filePages={\n fileInfo.docLink\n ? [\n {\n id: fileInfo.docLink.documentId,\n documentId: fileInfo.docLink.documentId,\n documentUrl: fileInfo.docLink.documentUri,\n pageNumber: 1,\n thumbUrl: fileInfo.docLink.pageUri,\n },\n ]\n : []\n }\n isDeletable\n onFileDeleted={() => setFileInfo({})}\n onNewFileSelected={(f) => onUploadDocument(f[0])}\n hasError={Boolean(fileInfo.errorMessage)}\n maxFileSize={MAX_ALLOWED_UPLOAD_FILE_SIZE}\n />\n )}\n {fileInfo.errorMessage && (\n {fileInfo.errorMessage}\n )}\n
    \n );\n};\n","import { ComponentProps, useCallback, useState } from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { Modal as RSModal } from 'reactstrap';\nimport { CancelButton } from 'src/components/Buttons';\nimport { OkButton } from 'src/components/Buttons/OkButton';\nimport {\n UploadDocumentInput,\n UploadDocumentInputForm,\n} from 'src/components/Input/UploadDocumentInput';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { ImageMagnifier } from 'src/core/POS/ImageMagnifier';\nimport { Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { isSuccess } from 'src/utils/errorUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n DocumentType,\n ListingClient,\n ListingDetailDataField,\n ListingDetails,\n UserDocumentLinks,\n} from 'src/WebApiController';\n\nexport type ProofOfPurchaseUploadDilaogProps = ComponentProps<\n typeof RSModal\n> & {\n onCancel: () => void;\n proofDocs?: UserDocumentLinks[] | null;\n};\n\nexport function ProofOfPurchaseUploadDilaog({\n onClosed,\n onCancel,\n proofDocs,\n ...rest\n}: ProofOfPurchaseUploadDilaogProps) {\n const methods = useForm();\n\n const { posEntity: listing, setActivePosEntity } =\n useActivePosEntityContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n const [isLoading, setIsLoading] = useState(false);\n\n const onUploadProofOfPurchase = useCallback(() => {\n const uploadDocs = methods.getValues()?.uploadProofDocuments;\n if (!listing?.id || !uploadDocs?.length) {\n return;\n }\n\n setIsLoading(true);\n tryInvokeApi(\n async () => {\n const result = await new ListingClient(\n activeAccountWebClientConfig\n ).updateProofOfPurchaseForListing(listing.id!, uploadDocs!);\n\n if (!isSuccess(result)) {\n showErrorDialog(\n 'updateProofOfPurchaseForListing',\n { status: result.status, message: result.message },\n { trackErrorData: uploadDocs }\n );\n } else {\n await setActivePosEntity(listing.id, listing.idOnMkp, true, [\n ListingDetailDataField.Basic,\n ]);\n }\n onClosed?.();\n },\n (error) => {\n showErrorDialog('PurchaseClient.importPurchaseFromFile', error, {\n trackErrorData: { uploadDocs },\n });\n },\n () => {\n setIsLoading(false);\n }\n );\n }, [\n activeAccountWebClientConfig,\n listing?.id,\n listing?.idOnMkp,\n methods,\n onClosed,\n setActivePosEntity,\n showErrorDialog,\n ]);\n\n return (\n }\n footer={\n <>\n \n {\n onUploadProofOfPurchase();\n }}\n textContentId={ContentId.Save}\n />\n \n }\n onCancel={isLoading ? undefined : onCancel}\n >\n \n \n \n }\n />\n {' '}\n {!methods.getValues().uploadProofDocuments?.length &&\n proofDocs?.map((d) => (\n

    \n \n

    \n ))}\n
    \n \n );\n}\n","import { ComponentProps } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { IconsFill, UploadIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { UserDocumentLinks } from 'src/WebApiController';\n\nimport { ProofOfPurchaseUploadDilaog } from './ProofOfPurchaseUploadDialog';\n\nexport type LaunchProofOfPurchaseUploadDilaogProps = ComponentProps<\n typeof Button\n> & { className?: string; proofDocs?: UserDocumentLinks[] | null };\n\nexport const LaunchProofOfPurchaseUploadDilaog = ({\n variant = 'link',\n proofDocs,\n ...props\n}: LaunchProofOfPurchaseUploadDilaogProps) => {\n const dialog = useBasicDialog();\n\n const onLaunch = () => {\n dialog.launchDialog();\n };\n\n return (\n \n \n \n \n );\n};\n","import { Content, useContent } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { Card, Stack } from 'src/core/ui';\nimport { RotatingWrapper } from 'src/core/ui/AnimatingWrapper';\nimport { LaunchProofOfPurchaseUploadDilaog } from 'src/dialogs/ProofOfPurchaseUploadDialog';\nimport { FieldError } from 'src/modals/common';\nimport { CheckIcon, IconsFill, ProcessingIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { PENDING_PROOF_STATE_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { ListingDetails, PendingProofState } from 'src/WebApiController';\n\nimport * as styles from './ProofOfPurchaseSection.css';\n\nexport const ProofOfPurchaseSection = ({\n listing,\n}: {\n listing: ListingDetails;\n}) => {\n const pendingProofText = useContent(\n PENDING_PROOF_STATE_TO_CID[\n listing.pendProofState ?? PendingProofState.Approved\n ]\n );\n if (!listing.pendProofState) return null;\n\n return (\n \n \n {listing.pendProofState === PendingProofState.PendingProof ? (\n \n {pendingProofText}\n \n \n \n \n ) : (\n \n \n {listing.pendProofState === PendingProofState.PendingReview ? (\n \n \n \n ) : (\n \n )}\n \n )}\n \n \n \n );\n};\n","import { Content, FormatContent } from 'src/contexts/ContentContext';\nimport {\n ActionOutboxEntityType,\n ActivityLogValueChange,\n} from 'src/WebApiController';\n\nimport { ACTIVITY_LOG_STATE_TO_CID } from './constants/contentIdMaps';\nimport { FormatContentId } from './constants/formatContentId';\n\nexport const getActivityLogChangeDisplay = (\n activity: string,\n v: ActivityLogValueChange,\n emptyContentPlaceholder = '',\n detailed = false\n) => {\n const normalizedMessage = normalizeActivityLogMessage(v.message?.message);\n const newValueNormalized = normalizeActivityLogValue(\n v.newValue,\n emptyContentPlaceholder\n );\n\n return v.message ? (\n
    \n \n \n {normalizedMessage?.length && `: ${normalizedMessage[0]}`}\n \n {detailed &&\n (normalizedMessage?.length ?? 0) > 1 &&\n normalizedMessage!.slice(1).map((m, i) => {m})}\n
    \n ) : v.oldValue && v.newValue ? (\n \n ) : v.oldValue ? (\n \n ) : activity ? (\n `${activity}: ${newValueNormalized}`\n ) : (\n newValueNormalized\n );\n};\n\nexport const normalizeActivityLogValue = (\n value: string | null | undefined,\n emptyPlaceholder?: string\n) => {\n let strippedValue = value ?? '';\n if (strippedValue.startsWith(\"'\") && strippedValue.endsWith(\"'\")) {\n strippedValue = strippedValue.substring(1, strippedValue.length - 1);\n }\n if (strippedValue.startsWith('\"') && strippedValue.endsWith('\"')) {\n strippedValue = strippedValue.substring(1, strippedValue.length - 1);\n }\n\n if (!strippedValue) {\n return emptyPlaceholder;\n }\n\n return value;\n};\n\nexport const normalizeActivityLogMessage = (\n message?: string | null\n): string[] | undefined => {\n if (!message) {\n return undefined;\n }\n\n try {\n if (message.startsWith(StubHubApiErrorFormat)) {\n message = message.replace(StubHubApiErrorFormat, '');\n }\n\n return normalizeErrorMessage(message);\n } catch (e) {\n console.warn(e);\n return message\n ?.split('.')\n ?.filter((s) => s.length)\n ?.map((s) => `${s.trim()}.`);\n }\n};\n\nexport const StubHubApiErrorFormat =\n 'An error occurred with this API request: ';\n\nexport type ActivityLogMessageDetails = {\n code?: string | null;\n message?: string | null;\n errors?: {\n eventIds: string[] | null | undefined;\n 'seller_listing.seating.section': string[] | null | undefined;\n 'seller_listing.seating.row': string[] | null | undefined;\n 'seller_listing.seating.seat_from': string[] | null | undefined;\n 'seller_listing.seating.seat_to': string[] | null | undefined;\n 'seller_listing.number_of_tickets': string[] | null | undefined;\n 'seller_listing.display_number_of_tickets': string[] | null | undefined;\n 'seller_listing.split_type': string[] | null | undefined;\n 'seller_listing.ticket_price.amt': string[] | null | undefined;\n 'seller_listing.ticket_price.currency': string[] | null | undefined;\n 'seller_listing.ticket_proceeds.amt': string[] | null | undefined;\n 'seller_listing.ticket_proceeds.currency': string[] | null | undefined;\n 'seller_listing.listing_note_ids': string[] | null | undefined;\n 'seller_listing.face_value.amt': string[] | null | undefined;\n 'seller_listing.face_value.currency': string[] | null | undefined;\n 'seller_listing.ticket_location_address_id': string[] | null | undefined;\n 'seller_listing.in_hand_at': string[] | null | undefined;\n 'seller_listing.ticket_type': string[] | null | undefined;\n 'seller_listing.reservation_details.code': string[] | null | undefined;\n 'seller_listing.reservation_details.pin': string[] | null | undefined;\n 'seller_listing.reservation_details.store': string[] | null | undefined;\n 'seller_listing.reservation_details.expiry_date':\n | string[]\n | null\n | undefined;\n 'seller_listing.reservation_details.release_date':\n | string[]\n | null\n | undefined;\n 'seller_listing.face_value': string[] | null | undefined;\n 'seller_listing.additional_information.primary_order_id':\n | string[]\n | null\n | undefined;\n 'seller_listing.additional_information.home_or_away':\n | string[]\n | null\n | undefined;\n };\n};\n\nexport const StubHubApiPropertiesToPosProperties: Record = {\n 'seating.section': 'Section',\n 'seating.row': 'Row',\n 'seating.seat_from': 'SeatFrom',\n 'seating.seat_to': 'SeatTo',\n number_of_tickets: 'Quantity',\n display_number_of_tickets: 'Max Display Quantity',\n split_type: 'SplitType',\n 'ticket_price.amt': 'All-in Price',\n 'ticket_price.currency': 'Currency Code',\n 'ticket_proceeds.amt': 'List Price',\n 'ticket_proceeds.currency': 'Currency Code',\n listing_note_ids: 'Listing Notes',\n 'face_value.amt': 'Face Value',\n 'face_value.currency': 'Currency Code',\n ticket_location_address_id: 'Ticket Location Address Id',\n in_hand_at: 'In-hand At',\n ticket_type: 'Ticket Type',\n 'reservation_details.code': 'Reservation Code',\n 'reservation_details.pin': 'Reservation Pin',\n 'reservation_details.store': 'Reservation Store',\n 'reservation_details.expiry_date': 'Reservation Expiry Date',\n 'reservation_details.release_date': 'Reservation Release Date',\n face_value: '',\n 'additional_information.primary_order_id': 'Primary Order Id',\n 'additional_information.home_or_away': 'Home or Away',\n};\n\ntype Error = {\n message?: string;\n errors?: unknown;\n};\n\nconst extractMessage = (error: Error): string[] | undefined => {\n if (error.message) {\n return normalizeErrorMessage(error.message);\n } else if (error.errors) {\n const result = normalizeErrorObject(error.errors);\n if (result) return result;\n\n // TODO - this would no longer be needed when Broadcast service returns all these in one giant \"message\"\n return Object.values(error.errors)\n .flatMap((m) => m)\n .filter((m) => m)\n .map((m) => {\n let ms = m!.toString();\n Object.keys(StubHubApiPropertiesToPosProperties).forEach((k) => {\n ms = ms!\n .toString()\n .replace(`'${k}'`, `'${StubHubApiPropertiesToPosProperties[k]}'`);\n });\n return ms;\n });\n }\n\n return undefined;\n};\n\nconst normalizeErrorMessage = (message?: string) => {\n if (!message) {\n return undefined;\n }\n try {\n const errorObj = JSON.parse(message.trim());\n const result = normalizeErrorObject(errorObj);\n if (result) {\n return result;\n }\n } catch (e) {\n console.warn(`Unable to parse: ${message}\n${e}`);\n }\n return message\n ?.split('.')\n ?.filter((s) => s.length)\n ?.map((s) => `${s.trim()}.`);\n};\n\nconst normalizeErrorObject = (errorObj: Error[] | Error) => {\n if (Array.isArray(errorObj)) {\n return errorObj\n .flatMap((e: Error) => extractMessage(e))\n .filter((s) => s)\n .map((s) => s!);\n } else if (typeof errorObj === 'object') {\n return extractMessage(errorObj);\n }\n\n return undefined;\n};\n\nexport const entityTypeNumberToEntityTypeEnum = (\n entityType: number | null | undefined\n): ActionOutboxEntityType | undefined => {\n switch (entityType) {\n case 1:\n return ActionOutboxEntityType.Sale;\n case 2:\n return ActionOutboxEntityType.Listing;\n case 3:\n return ActionOutboxEntityType.Purchase;\n case 4:\n return ActionOutboxEntityType.SellerSupportCase;\n case 5:\n return ActionOutboxEntityType.Document;\n case 6:\n return ActionOutboxEntityType.SellerEvent;\n case 7:\n return ActionOutboxEntityType.InboundEmail;\n default:\n return undefined;\n }\n};\n","import { useMemo } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { Virtuoso } from 'react-virtuoso';\nimport { vars } from 'src/core/themes';\nimport { ListingDetails } from 'src/WebApiController';\n\nimport { getSeatDisplay } from '../ListingDetails/components';\n\nexport const ViewSeatsListBody = ({\n listing,\n seeAvailableSeats,\n seeWastedSeats,\n}: {\n listing?: ListingDetails | null;\n seeAvailableSeats?: boolean;\n seeWastedSeats?: boolean;\n}) => {\n const navigate = useNavigate();\n const tickets = listing?.tickets;\n const seatsElements = useMemo(() => {\n if (tickets) {\n if (seeWastedSeats) {\n return tickets\n .filter((t) => t.saleId && t.isWasted)\n .map((t) => getSeatDisplay(t, navigate));\n } else if (seeAvailableSeats) {\n return tickets.filter((t) => !t.saleId).map((t) => getSeatDisplay(t));\n } else {\n return tickets\n .filter((t) => t.saleId)\n .map((t) => getSeatDisplay(t, navigate));\n }\n }\n }, [tickets, seeWastedSeats, seeAvailableSeats, navigate]);\n\n return (\n {\n return
    {seatsElement}
    ;\n }}\n />\n );\n};\n","import { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { CancellableFormFooter } from 'src/modals/common';\nimport { CancellableFormHeader } from 'src/modals/common/CancellableFormHeader';\nimport { ConnectedEventEntityHeader } from 'src/modals/common/EventEntityHeader';\nimport { ModalBody, ModalFooter, ModalProps } from 'src/modals/Modal';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ListingDetails } from 'src/WebApiController';\n\nimport { ViewSeatsListBody } from './ViewSeatsListBody';\n\nexport const ViewSeatsListModal = ({\n cancelTo,\n seeAvailableSeats,\n seeWastedSeats,\n}: {\n cancelTo?: ModalProps;\n seeAvailableSeats?: boolean;\n seeWastedSeats?: boolean;\n}) => {\n const { posEntity: listing } = useActivePosEntityContext();\n\n return (\n <>\n \n \n }\n />\n \n\n \n \n \n\n \n \n \n \n );\n};\n","import { ComponentProps, useCallback, useContext } from 'react';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { Button } from 'src/core/ui';\nimport { ViewSeatsListModal } from 'src/modals/ViewSeatsListModal';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n ActionOutboxEntityType,\n ListingDetailDataField,\n ListingDetails,\n} from 'src/WebApiController';\n\nexport const LaunchViewAllSeats = ({\n listingId,\n marketplaceListingId,\n cancelTo,\n seeAvailableSeats,\n seeWastedSeats,\n}: {\n listingId: number;\n marketplaceListingId?: string | null;\n\n disabled?: boolean;\n} & ComponentProps) => {\n const { setModal } = useContext(ModalContext);\n const { posEntity: listing, setActivePosEntity } =\n useActivePosEntityContext();\n\n const viewComps = useCallback(() => {\n setModal({\n children: (\n \n ),\n clickOutsideToClose: true,\n size: 'slide-in',\n deepLinkValue: listingId,\n trackViewEntityType: ActionOutboxEntityType.Listing,\n });\n }, [setModal, cancelTo, listingId, seeAvailableSeats]);\n\n const onLaunchDialog = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n\n setActivePosEntity(listingId, marketplaceListingId, true, [\n ListingDetailDataField.Basic,\n ListingDetailDataField.Tickets,\n ]);\n viewComps();\n },\n [setActivePosEntity, listingId, marketplaceListingId, viewComps]\n );\n\n return (\n \n );\n};\n","import { Fragment, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { NavigateFunction, useNavigate } from 'react-router-dom';\nimport { VenueRowInput } from 'src/components/Input/VenueRowInput';\nimport { VenueSectionInput } from 'src/components/Input/VenueSectionInput';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content, FormatContent } from 'src/contexts/ContentContext';\nimport { useGetSectionRowFromVenueMapConfig } from 'src/contexts/EventMapContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { Switch } from 'src/core/interim/Switch';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { Colors } from 'src/core/themes/constants/colors';\nimport { Button } from 'src/core/ui';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { useUserCanUpdateListing } from 'src/hooks/useUserHasListingPermissions';\nimport {\n Detail,\n DetailGroup,\n DetailSection,\n SectionContent,\n} from 'src/modals/common';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SPLIT_TYPE_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { getListingDetailsModalConfigWithDeepLink } from 'src/utils/inventoryUtils';\nimport { INT_MAX_VALUE } from 'src/utils/numberFormatter';\nimport { getSaleDetailsRelativeUrl } from 'src/utils/saleUtils';\nimport {\n ListingDetails,\n ListingDetailsUpdateInput,\n SplitType,\n Ticket,\n} from 'src/WebApiController';\n\nimport { LaunchViewAllSeats } from '../actions/LaunchViewAllSeats';\n\nconst MAX_SEATS_DISPLAY = 10;\n\nexport const getSeatDisplay = (ticket: Ticket, navigate?: NavigateFunction) => {\n const { saleId, seat, ord } = ticket;\n\n if (ticket.saleId) {\n return (\n \n navigate ? navigate(getSaleDetailsRelativeUrl(saleId!)) : null\n }\n >\n {seat ? (\n <>{seat}\n ) : (\n \n )}\n \n );\n } else {\n return seat ? (\n <>{seat}\n ) : (\n \n );\n }\n};\n\nexport const TicketsSection = ({\n listing,\n disabled,\n isBulkEdit,\n}: {\n listing?: ListingDetails | undefined;\n disabled?: boolean;\n isBulkEdit?: boolean;\n}) => {\n const navigate = useNavigate();\n const {\n setValue,\n watch,\n clearErrors,\n formState: { defaultValues, errors },\n } = useFormContext();\n\n const { loginContext } = useAppContext();\n const { getUiCurrency } = useLocalizationContext();\n const uiCurrency = useMemo(\n () =>\n getUiCurrency(\n listing?.currency ??\n loginContext?.user?.activeAccount?.currencyCode ??\n 'USD'\n ),\n [\n getUiCurrency,\n listing?.currency,\n loginContext?.user?.activeAccount?.currencyCode,\n ]\n );\n\n const splitType = watch('splitType');\n const hideSeats = watch('hideSeatsFromMarketplace');\n const manualMaxDisplayQuantity = watch('manualMaxDisplayQuantity');\n const cancelTo = getListingDetailsModalConfigWithDeepLink(listing?.id);\n\n const isMobile = useMatchMedia('mobile');\n\n const { tickets, ticketCnt, seating } = listing ?? {};\n\n const availableSeats = useMemo(() => {\n if (!tickets?.length || !listing) {\n return [];\n }\n const ticketsAvailable = tickets.filter((t) => !t.saleId);\n\n const ticketsElement = ticketsAvailable\n .slice(0, MAX_SEATS_DISPLAY)\n .map((t) => {getSeatDisplay(t)})\n .flatMap((value, index, array) =>\n array.length - 1 !== index\n ? [value, {', '}]\n : value\n );\n\n if (ticketsAvailable.length > MAX_SEATS_DISPLAY) {\n ticketsElement.push(\n \n {' ... '}\n \n \n );\n }\n return ticketsElement;\n }, [tickets, listing, cancelTo]);\n\n const soldSeats = useMemo(() => {\n if (!tickets?.length || !listing) {\n return [];\n }\n const ticketsSold = tickets.filter((t) => t.saleId);\n\n const ticketsElement = ticketsSold\n .slice(0, MAX_SEATS_DISPLAY)\n .map((t) => {getSeatDisplay(t, navigate)})\n .flatMap((value, index, array) =>\n array.length - 1 !== index\n ? [value, {', '}]\n : value\n );\n\n if (ticketsSold.length > MAX_SEATS_DISPLAY) {\n ticketsElement.push(\n \n {' ... '}\n \n \n );\n }\n return ticketsElement;\n }, [tickets, listing, navigate, cancelTo]);\n\n const canUpdate = useUserCanUpdateListing(listing, isBulkEdit);\n\n const isDisabled = disabled || listing?.isDeleted || !canUpdate;\n\n const onShownQuantityChange = (\n changeEvent: React.ChangeEvent\n ) => {\n const newValue = parseInt(changeEvent?.target?.value);\n if (newValue > 0 && newValue < INT_MAX_VALUE) {\n const validatedValue = Math.min(newValue, listing?.availQty ?? 0) || null;\n setValue('manualMaxDisplayQuantity', validatedValue);\n } else {\n setValue('manualMaxDisplayQuantity', null);\n }\n };\n\n const section = watch('section');\n const sectionId = watch('sectionId');\n const row = watch('row');\n const rowId = watch('rowId');\n const faceValueCost = watch('faceValue');\n\n const { section: selectedSection, row: selectedRow } =\n useGetSectionRowFromVenueMapConfig(rowId, sectionId, section, row);\n\n return (\n }>\n \n \n }\n detail={\n {\n if (newSplitType !== splitType) {\n setValue(\n 'splitType',\n newSplitType || isBulkEdit\n ? newSplitType\n : SplitType.AvoidOne\n );\n }\n }}\n />\n }\n />\n \n \n }\n detail={\n {\n const newHideSeats = e.target.checked;\n if (newHideSeats !== hideSeats) {\n setValue('hideSeatsFromMarketplace', newHideSeats);\n }\n }}\n />\n }\n />\n \n {!isBulkEdit && listing && seating && (\n <>\n \n }\n detail={\n \n }\n style={{\n width: '8em',\n }}\n />\n \n \n }\n detail={{listing.availQty}}\n />\n \n \n }\n detail={{ticketCnt}}\n />\n \n \n }\n errors={errors.section?.message}\n >\n {!listing.isSeatSaver ? (\n {section}\n ) : (\n {\n clearErrors('section');\n if (section) {\n setValue('section', section.name);\n setValue('sectionId', section.id);\n\n if (section.specRow?.id) {\n // Setting the section automatically set the speculative row id\n setValue('rowId', section.specRow?.id);\n setValue('row', '');\n }\n } else {\n setValue('section', sectionName ?? '');\n setValue('sectionId', null);\n\n // Free-text section do not have speculative row info\n setValue('rowId', null);\n setValue('row', '');\n }\n }}\n />\n )}\n \n \n \n }>\n {!listing.isSeatSaver ? (\n {row}\n ) : (\n {\n clearErrors('row');\n if (row) {\n setValue('row', row.isSpeculative ? '' : row.name);\n setValue('rowId', row.id);\n } else {\n // If we can't find the row - that mean they typed it in\n // so just keep with they type as the row\n setValue('row', rowName ?? '');\n setValue('rowId', null);\n }\n }}\n />\n )}\n \n \n \n }\n detail={\n <>\n
    \n \n \n {': '}\n \n {availableSeats}\n
    \n
    \n \n \n {': '}\n \n {soldSeats}\n
    \n \n }\n />\n
    \n\n {listing?.isSeatSaver && (\n \n }>\n {\n const v = parseFloat(e.target.value) || 0;\n if (v >= 0 && v <= Number.MAX_VALUE) {\n setValue('faceValue', v);\n } else {\n setValue('faceValue', null);\n }\n }}\n />\n \n \n )}\n \n )}\n
    \n
    \n );\n};\n","/* eslint-disable react-hooks/exhaustive-deps */\nimport { HubConnectionState } from '@microsoft/signalr';\nimport { ComponentProps, useCallback, useMemo, useRef, useState } from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { Modal as RSModal } from 'reactstrap';\nimport { BulkEditStatus } from 'src/components/common/BulkActions/BulkEditStatus';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useBulkEditHubContext } from 'src/contexts/BulkEditHubContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { Stack } from 'src/core/ui';\nimport { useBulkEditHub } from 'src/hooks/useBulkEditHub';\nimport { EconomicsSection } from 'src/modals/ListingDetails/components';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n getListingDetailsUpdateInput,\n isListingDetailsInputChanged,\n} from 'src/utils/inventoryUtils';\nimport {\n ActionOutboxEntityType,\n BulkActionType,\n BulkEditPreviewWithDetails,\n BulkEditProgress,\n BulkEditStep,\n Event,\n Listing,\n ListingDetails,\n ListingDetailsUpdateInput,\n} from 'src/WebApiController';\n\nimport { BulkEditFooter } from '../common/BulkEditFooter';\nimport { BulkEditHeader } from '../common/BulkEditHeader';\n\nexport type BulkEditMarketplacePricesDialogProps = ComponentProps<\n typeof RSModal\n> & {\n updateKey: string;\n listings?: Listing[] | null;\n selectedListingIds?: number[];\n event?: Event;\n onOkay: (\n listing: ListingDetailsUpdateInput | null,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => void;\n onCancel: () => void;\n};\n\nexport const BulkEditMarketplacePricesDialog = ({\n listings,\n ...rest\n}: BulkEditMarketplacePricesDialogProps) => {\n const { loginContext } = useAppContext();\n const methods = useForm({\n defaultValues: getListingDetailsUpdateInput(\n null,\n null,\n loginContext?.user?.activeAccount?.marketplaceSettings\n ),\n });\n\n return (\n \n \n \n );\n};\n\nfunction BulkEditMarketplacePricesDialogContent({\n updateKey,\n listings,\n selectedListingIds,\n event,\n onOkay,\n onCancel,\n handleSubmit,\n getValues,\n clearErrors,\n setError,\n setValue,\n watch,\n reset,\n formState,\n ...rest\n}: BulkEditMarketplacePricesDialogProps &\n Omit<\n ComponentProps>,\n 'children'\n >) {\n const { loginContext } = useAppContext();\n const { setActivePosEntity } = useActivePosEntityContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n const { setSelectionMode } = useMultiSelectionContext();\n const { setProgress, setPreview, setMainDialogOpened } =\n useBulkEditHubContext();\n const [isLoading, setIsLoading] = useState(false);\n const input = watch();\n\n const onClose = useCallback(\n async (\n newProgress?: BulkEditProgress,\n closeMainDialogForPopover?: boolean\n ) => {\n if (newProgress?.step === BulkEditStep.Done) {\n setIsRefreshing(true);\n setActivePosEntity(0);\n\n await refreshExpandedListItems();\n setSelectionMode(undefined);\n if (closeMainDialogForPopover) {\n setMainDialogOpened(false);\n } else {\n setProgress(undefined);\n setPreview(undefined);\n }\n setIsRefreshing(false);\n // progress kept to allow the BulkEditStatusPopover to show the result\n }\n onCancel();\n },\n [\n onCancel,\n refreshExpandedListItems,\n setActivePosEntity,\n setMainDialogOpened,\n setPreview,\n setProgress,\n setSelectionMode,\n ]\n );\n\n const onBulkEditDone = useCallback(\n async (doneProgress: BulkEditProgress, finalErrors: string[]) => {\n if (finalErrors.length === 0 && doneProgress.step === BulkEditStep.Done) {\n onClose(doneProgress, true);\n }\n },\n [onClose]\n );\n\n const { bulkEditHub, progress, stage, preview, initJob } = useBulkEditHub(\n ActionOutboxEntityType.Listing,\n BulkActionType.UpdateMarketplacePrices,\n updateKey,\n onBulkEditDone\n );\n\n const hasBackgroundBulkEditFeature =\n bulkEditHub?.state === HubConnectionState.Connected;\n\n const [isRefreshing, setIsRefreshing] = useState(false);\n\n const onSubmitHandler = useCallback(\n (onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n onOkay(null, false, onPreviewReceived);\n } else {\n handleSubmit((i) =>\n onOkay(i, hasBackgroundBulkEditFeature, undefined, preview)\n )();\n }\n setIsLoading(false);\n },\n [stage, onOkay, preview, hasBackgroundBulkEditFeature]\n );\n\n const isInputValid = useMemo(() => {\n return isListingDetailsInputChanged(\n input,\n formState.defaultValues as ListingDetailsUpdateInput\n );\n }, [input, formState.defaultValues]);\n\n const submittButtonRef = useRef(null);\n\n return (\n <>\n }\n />\n }\n onOpened={() => {\n reset(\n getListingDetailsUpdateInput(\n null,\n null,\n loginContext?.user?.activeAccount?.marketplaceSettings\n )\n );\n initJob();\n }}\n onKeyUp={(e) => {\n if (submittButtonRef.current && e.key === 'Enter' && isInputValid) {\n submittButtonRef.current.click();\n }\n }}\n onClosed={() => {\n setMainDialogOpened(false);\n if (progress) {\n setSelectionMode(undefined);\n }\n // Call the outside one if there is one\n rest.onClosed?.();\n }}\n footer={\n \n }\n onCancel={isLoading ? undefined : onCancel}\n >\n \n \n \n \n \n \n \n );\n}\n","import { useBulkPricingActionsPermissions } from 'src/components/common/BulkActions/BulkPricingActions/useBulkPricingActionsPermissions';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nexport const LaunchUpdateMarketplacePrices = ({\n onClick,\n disabled,\n}: {\n onClick: (e: React.MouseEvent) => void;\n disabled?: boolean;\n}) => {\n const { hasUpdateListingPermission, hasEditPricingPermission } =\n useBulkPricingActionsPermissions();\n\n if (!hasUpdateListingPermission) {\n return null;\n }\n\n if (!hasEditPricingPermission) {\n return null;\n }\n\n return (\n \n \n \n );\n};\n","import { useCallback, useMemo } from 'react';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { BulkEditMarketplacePricesDialog } from 'src/dialogs/BulkEdits/BulkEditMarketplacePricesDialog';\nimport { flattenListingGroup } from 'src/modals/GroupListings/components/groupingUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n BulkEditListingClient,\n BulkEditPreviewWithDetails,\n Event,\n Listing,\n ListingDetails,\n ListingDetailsUpdateInput,\n ListingPricesUpdateInput,\n ListingQuery,\n} from 'src/WebApiController';\n\nimport { INVENTORY_BULK_UPDATE_MARKETPLACE_PRICES_UPDATE_KEY } from '../../InventoryActionDropdown.constants';\nimport { LaunchUpdateMarketplacePrices } from './LaunchChangeMarketplacePrice';\n\nexport const useBulkUpdateMarketplacePrices = (\n filterQueryWithEventIds: ListingQuery,\n affectedVisibleListingIds: number[],\n setIsLoading: (v: boolean) => void,\n isLoading?: boolean,\n event?: Event\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const updateKey = event\n ? `marketplacePrices-event-${event?.viagVirtualId}`\n : INVENTORY_BULK_UPDATE_MARKETPLACE_PRICES_UPDATE_KEY;\n\n const { setActivePosEntity } = useActivePosEntityContext();\n\n const {\n eventsTransformed,\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const {\n openDialog: openBulkEditMarketplaceDialog,\n closeDialog: closeBulkEditMarketplaceDialog,\n } = useDialog(\n DialogId.BulkEditMarketplacePrices,\n BulkEditMarketplacePricesDialog\n );\n\n const onSubmit = useCallback(\n async (\n listingUpdate: ListingDetailsUpdateInput | null,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n await tryInvokeApi(\n async () => {\n const preview = await new BulkEditListingClient(\n activeAccountWebClientConfig\n ).bulkUpdateMarketplacePricesPreview(filterQueryWithEventIds);\n\n onPreviewReceived(preview);\n },\n (error) => {\n showErrorDialog('bulkUpdateMarketplacePricesPreview', error, {\n trackErrorData: { filterQueryWithEventIds },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n } else if (listingUpdate) {\n await tryInvokeApi(\n async () => {\n const client = await new BulkEditListingClient(\n activeAccountWebClientConfig\n );\n\n const input = {\n item1: preview!.preview,\n item2: {\n id: listingUpdate.id,\n allInPrice: listingUpdate.allInPrice,\n listPrice: listingUpdate.listPrice,\n netProceedsCeiling: listingUpdate.netProceedsCeiling,\n netProceedsFloor: listingUpdate.netProceedsFloor,\n autoPricingEnabled: listingUpdate.autoPricingEnabled,\n marketplacePriceUpdates: listingUpdate.marketplacePriceUpdates,\n } as ListingPricesUpdateInput,\n };\n const succeeded = await client.bulkUpdateMarketplacePrices(\n input,\n updateKey,\n supportBackgroundProcess\n );\n\n if (!supportBackgroundProcess) {\n if (succeeded) {\n // Invalidate the activePosEntity, so that when clicking on listingDetails\n // we force re-loading the listing and newest pricing settings can be displayed\n setActivePosEntity(0);\n await refreshExpandedListItems();\n }\n\n closeBulkEditMarketplaceDialog();\n }\n },\n (error) => {\n showErrorDialog('bulkUpdateMarketplacePrices', error, {\n trackErrorData: { preview, listingUpdate },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n }\n },\n [\n activeAccountWebClientConfig,\n closeBulkEditMarketplaceDialog,\n filterQueryWithEventIds,\n refreshExpandedListItems,\n setActivePosEntity,\n setIsLoading,\n showErrorDialog,\n updateKey,\n ]\n );\n\n const listings = useMemo(() => {\n return (eventsTransformed ?? [])\n .flatMap((ev) => ev.entities.listings)\n .flatMap(flattenListingGroup)\n .filter(({ id, isLtGrp }) => id > 0 && !isLtGrp) as Listing[];\n }, [eventsTransformed]);\n\n return {\n dropDown: (\n {\n e.preventDefault();\n e.stopPropagation();\n openBulkEditMarketplaceDialog({\n event,\n updateKey,\n listings,\n selectedListingIds: affectedVisibleListingIds,\n onOkay: onSubmit,\n onClosed: () => {\n setIsLoading(false);\n },\n onCancel: closeBulkEditMarketplaceDialog,\n });\n }}\n disabled={isLoading}\n />\n ),\n };\n};\n","import { Feature } from 'src/WebApiController';\n\nimport { useUserHasFeature } from './useUserHasFeature';\n\n/**\n * Returns `true` when user has the given feature _and_ has the general feature for autopricing;\n * Otherwise, returns `false`.\n */\nexport const useUserHasAutopricingFeature = (feature: Feature) => {\n const hasAutoPricingFeature = useUserHasFeature(Feature.AutoPricing);\n const hasFeature = useUserHasFeature(feature);\n return hasAutoPricingFeature && hasFeature;\n};\n","import { isEqual } from 'lodash-es';\nimport {\n UseFormClearErrors,\n UseFormSetError,\n UseFormSetValue,\n} from 'react-hook-form';\nimport {\n DEFAULT_COMP_LISTING_FLOOR,\n DEFAULT_UNDERCUT_ABSOLUTE_AMT,\n DEFAULT_UNDERCUT_RELATIVE_AMT,\n PricingSettingsField,\n} from 'src/utils/autoPricingUtils';\nimport { hasChanged, posChangedField, posField } from 'src/utils/posFieldUtils';\nimport {\n AutoPricingCompListingMode,\n Listing,\n ListingDetailsAutoPricingSectionUpdatesV2,\n} from 'src/WebApiController';\n\nimport {\n AutoPricingSettingsInput,\n PricingSettingsUpdateKey,\n} from './BulkEditAutoPricingSettingsDialog.types';\n\nexport const validateCompListingSettings = (\n clearErrors: UseFormClearErrors,\n setError: UseFormSetError,\n setValue: UseFormSetValue,\n listForm: ListingDetailsAutoPricingSectionUpdatesV2,\n compListingFloorCeilingError: string,\n requiredMsg: string,\n errorField?: PricingSettingsField,\n isStrategy?: boolean\n) => {\n let hasErrors = false;\n\n if (errorField) {\n clearErrors(errorField);\n } else {\n clearErrors('compListingFloor');\n clearErrors('compListingSelectedSectionSettings');\n }\n\n const {\n compListingMode,\n compListingFloor,\n compListingCeiling,\n compListingOnlyForSelectedSectionsEnabled,\n compListingSelectedSectionSettings,\n autoPricingEnabled,\n } = listForm;\n\n const skipCompListing = !(\n compListingMode?.hasChanged ||\n compListingFloor?.hasChanged ||\n compListingCeiling?.hasChanged ||\n compListingOnlyForSelectedSectionsEnabled?.hasChanged ||\n compListingSelectedSectionSettings?.hasChanged\n );\n\n if (!autoPricingEnabled || skipCompListing) {\n return true;\n }\n\n if (\n compListingMode?.value === AutoPricingCompListingMode.QualityScore ||\n compListingMode?.value === AutoPricingCompListingMode.SameSection\n ) {\n if (!compListingFloor?.value) {\n listForm.compListingFloor = compListingFloor;\n setValue('compListingFloor', posChangedField(DEFAULT_COMP_LISTING_FLOOR));\n } else if (compListingCeiling && compListingFloor >= compListingCeiling) {\n setError(\n errorField ?? 'compListingFloor',\n {\n message: compListingFloorCeilingError,\n },\n { shouldFocus: true }\n );\n\n hasErrors = true;\n }\n }\n\n if (\n compListingMode?.value === AutoPricingCompListingMode.QualityScore ||\n compListingMode?.value === AutoPricingCompListingMode.SameEvent ||\n compListingMode?.value === AutoPricingCompListingMode.SameZone\n ) {\n if (\n compListingOnlyForSelectedSectionsEnabled?.value &&\n !isStrategy &&\n !compListingSelectedSectionSettings?.value?.sectionIdFilter?.length\n ) {\n setError(\n errorField ?? 'compListingSelectedSectionSettings',\n {\n message: requiredMsg,\n },\n { shouldFocus: true }\n );\n\n hasErrors = true;\n }\n }\n\n return !hasErrors;\n};\n\nexport const validateUndercutSettings = (\n clearErrors: UseFormClearErrors,\n setValue: UseFormSetValue,\n listForm: ListingDetailsAutoPricingSectionUpdatesV2,\n errorField?: PricingSettingsField\n) => {\n if (errorField) {\n clearErrors(errorField);\n } else {\n clearErrors('undercutAbsoluteAmount');\n clearErrors('undercutRelativeAmount');\n }\n\n const {\n undercutMode,\n undercutAbsoluteAmount,\n undercutRelativeAmount,\n autoPricingEnabled,\n } = listForm;\n\n if (\n !autoPricingEnabled ||\n !(\n undercutMode?.hasChanged ||\n undercutAbsoluteAmount?.hasChanged ||\n undercutRelativeAmount?.hasChanged\n )\n ) {\n return true;\n }\n\n if (undercutMode?.value) {\n if (undercutAbsoluteAmount?.value == null) {\n listForm.undercutAbsoluteAmount = posChangedField(\n DEFAULT_UNDERCUT_ABSOLUTE_AMT\n );\n setValue(\n 'undercutAbsoluteAmount',\n posChangedField(DEFAULT_UNDERCUT_ABSOLUTE_AMT)\n );\n }\n\n if (undercutRelativeAmount?.value == null) {\n listForm.undercutRelativeAmount = posChangedField(\n DEFAULT_UNDERCUT_RELATIVE_AMT\n );\n setValue(\n 'undercutRelativeAmount',\n posChangedField(DEFAULT_UNDERCUT_RELATIVE_AMT)\n );\n }\n }\n\n return true;\n};\n\nexport const validateNetProceedsSettings = (\n clearErrors: UseFormClearErrors,\n setError: UseFormSetError,\n listForm: ListingDetailsAutoPricingSectionUpdatesV2,\n floorMustBeLessThanCeilingError: string,\n errorField?: PricingSettingsField\n) => {\n let hasErrors = false;\n\n if (errorField) {\n clearErrors(errorField);\n } else {\n clearErrors('netProceedsCeiling');\n clearErrors('netProceedsFloor');\n }\n\n const { netProceedsFloor, netProceedsCeiling } = listForm;\n\n if (\n (netProceedsFloor?.value ?? 0) > 0 &&\n (netProceedsCeiling?.value ?? 0) > 0\n ) {\n if (netProceedsFloor! >= netProceedsCeiling!) {\n setError(errorField ?? 'netProceedsFloor', {\n message: floorMustBeLessThanCeilingError,\n });\n hasErrors = true;\n }\n }\n\n return !hasErrors;\n};\n\nexport const validateAutoPricingSettings = (\n clearErrors: UseFormClearErrors,\n setError: UseFormSetError,\n setValue: UseFormSetValue,\n listForm: ListingDetailsAutoPricingSectionUpdatesV2,\n floorMustBeLessThanCeilingError: string,\n compListingFloorCeilingError: string,\n requiredMsg: string,\n isStrategy?: boolean\n) => {\n let hasErrors = false;\n\n if (\n !validateCompListingSettings(\n clearErrors,\n setError,\n setValue,\n listForm,\n compListingFloorCeilingError,\n requiredMsg,\n undefined,\n isStrategy\n )\n ) {\n hasErrors = true;\n }\n\n if (!validateUndercutSettings(clearErrors, setValue, listForm)) {\n hasErrors = true;\n }\n\n if (\n !isStrategy &&\n !validateNetProceedsSettings(\n clearErrors,\n setError,\n listForm,\n floorMustBeLessThanCeilingError\n )\n ) {\n hasErrors = true;\n }\n\n return !hasErrors;\n};\n\nexport const getSettingsInputChanged = (\n input: ListingDetailsAutoPricingSectionUpdatesV2,\n initial?: ListingDetailsAutoPricingSectionUpdatesV2,\n settingsInput?: AutoPricingSettingsInput\n): Partial<\n Record\n> => {\n const changedFields: Partial<\n Record\n > = {\n compListingFloor: hasChanged(\n input.compListingFloor,\n initial?.compListingFloor\n ),\n compListingCeiling: hasChanged(\n input.compListingCeiling,\n initial?.compListingCeiling\n ),\n undercutAbsoluteAmount: hasChanged(\n input.undercutAbsoluteAmount,\n initial?.undercutAbsoluteAmount\n ),\n undercutRelativeAmount: hasChanged(\n input.undercutRelativeAmount,\n initial?.undercutRelativeAmount\n ),\n netProceedsCeiling: hasChanged(\n input.netProceedsCeiling,\n initial?.netProceedsCeiling\n ),\n netProceedsFloor: hasChanged(\n input.netProceedsFloor,\n initial?.netProceedsFloor\n ),\n undercutMode: hasChanged(input.undercutMode, initial?.undercutMode),\n netProceedsFloorAdjustmentAmount:\n input.netProceedsFloorAdjustmentAmount != null &&\n input.netProceedsFloorAdjustmentType != null &&\n input.netProceedsFloorAdjustmentRelative != null,\n compListingMode: hasChanged(\n input.compListingMode,\n initial?.compListingMode\n ),\n id: false,\n rowVersion: false,\n autoPricingEnabled: hasChanged(\n input.autoPricingEnabled,\n initial?.autoPricingEnabled\n ),\n compListingQuantityScoreAdjustmentEnabled: hasChanged(\n input.compListingQuantityScoreAdjustmentEnabled,\n initial?.compListingQuantityScoreAdjustmentEnabled\n ),\n compListingQuantityScoreAdjustmentOverrideJson: hasChanged(\n input.compListingQuantityScoreAdjustmentOverrideJson,\n initial?.compListingQuantityScoreAdjustmentOverrideJson\n ),\n compListingOnlyForSameZoneEnabled: hasChanged(\n input.compListingOnlyForSameZoneEnabled,\n initial?.compListingOnlyForSameZoneEnabled\n ),\n compListingOnlyForSelectedSectionsEnabled: hasChanged(\n input.compListingOnlyForSelectedSectionsEnabled,\n initial?.compListingOnlyForSelectedSectionsEnabled\n ),\n compListingExcludeFanInventory: hasChanged(\n input.compListingExcludeFanInventory,\n initial?.compListingExcludeFanInventory\n ),\n compListingExcludeDefects: hasChanged(\n input.compListingExcludeDefects,\n initial?.compListingExcludeDefects\n ),\n compListingSelectedSectionSettings:\n hasChanged(\n input.compListingSelectedSectionSettings,\n initial?.compListingSelectedSectionSettings\n ) ||\n (settingsInput?.compListingSelectedSectionSettings?.hasConflict &&\n !input.includeExistingSelectedSections),\n deriveCompsFromVenueZoneConfig:\n input.deriveCompsFromVenueZoneConfig !=\n initial?.deriveCompsFromVenueZoneConfig,\n includeBetterZones: input.includeBetterZones != initial?.includeBetterZones,\n rowCompOffset: input.rowCompOffset != initial?.rowCompOffset,\n venueZoneMapName: input.venueZoneMapName != initial?.venueZoneMapName,\n circuitBreakerRelativeCeiling: hasChanged(\n input.circuitBreakerRelativeCeiling,\n initial?.circuitBreakerRelativeCeiling\n ),\n circuitBreakerRelativeFloor: hasChanged(\n input.circuitBreakerRelativeFloor,\n initial?.circuitBreakerRelativeFloor\n ),\n circuitBreakerMaxDiscountVelocityPercent: hasChanged(\n input.circuitBreakerMaxDiscountVelocityPercent,\n initial?.circuitBreakerMaxDiscountVelocityPercent\n ),\n circuitBreakerMaxDiscountVelocityTicksInHours: hasChanged(\n input.circuitBreakerMaxDiscountVelocityTicksInHours,\n initial?.circuitBreakerMaxDiscountVelocityTicksInHours\n ),\n circuitBreakerMinCompListingCount: hasChanged(\n input.circuitBreakerMinCompListingCount,\n initial?.circuitBreakerMinCompListingCount\n ),\n outlierMode: hasChanged(input.outlierMode, initial?.outlierMode),\n outlierStandardDeviations: hasChanged(\n input.outlierStandardDeviations,\n initial?.outlierStandardDeviations\n ),\n outlierKthLowestLimit: hasChanged(\n input.outlierKthLowestLimit,\n initial?.outlierKthLowestLimit\n ),\n outlierKthLowestLimitRelativeSpacing: hasChanged(\n input.outlierKthLowestLimitRelativeSpacing,\n initial?.outlierKthLowestLimitRelativeSpacing\n ),\n outlierKthLowestLimitAbsoluteSpacing: hasChanged(\n input.outlierKthLowestLimitAbsoluteSpacing,\n initial?.outlierKthLowestLimitAbsoluteSpacing\n ),\n currencyCode: false,\n };\n\n return changedFields;\n};\n\nexport const getAutoPricingSettingsUpdateInput = (\n listing: AutoPricingSettingsInput,\n accountCurrency: string | null,\n allowSeatScoreCompListingMode: boolean,\n hasBulkEditPricingSettingsUpdateFeature: boolean\n): ListingDetailsAutoPricingSectionUpdatesV2 => {\n let compListingMode;\n if (hasBulkEditPricingSettingsUpdateFeature) {\n compListingMode =\n !allowSeatScoreCompListingMode &&\n listing.compListingMode.value === AutoPricingCompListingMode.QualityScore\n ? posField(AutoPricingCompListingMode.SameEvent, true)\n : posField(listing.compListingMode.value);\n } else {\n // Bulk edit only supports SameEvent\n compListingMode = posField(AutoPricingCompListingMode.SameEvent, true);\n }\n return {\n id: -1,\n rowVersion: null,\n currencyCode: listing.currencyCode.value ?? accountCurrency,\n netProceedsFloorAdjustmentType: null,\n netProceedsFloorAdjustmentAmount: null,\n netProceedsFloorAdjustmentRelative: false,\n netProceedsFloor: posField(listing.netProceedsFloor.value),\n netProceedsCeiling: posField(listing.netProceedsCeiling.value),\n autoPricingEnabled: posField(listing.autoPricingEnabled.value),\n compListingFloor: posField(listing.compListingFloor.value),\n compListingCeiling: posField(listing.compListingCeiling.value),\n compListingMode,\n compListingOnlyForSameZoneEnabled: posField(\n listing.compListingOnlyForSameZoneEnabled.value\n ),\n compListingOnlyForSelectedSectionsEnabled: posField(\n listing.compListingOnlyForSelectedSectionsEnabled.value\n ),\n compListingExcludeFanInventory: posField(\n listing.compListingExcludeFanInventory.value\n ),\n compListingExcludeDefects: posField(\n listing.compListingExcludeDefects.value\n ),\n compListingQuantityScoreAdjustmentEnabled: posField(\n listing.compListingQuantityScoreAdjustmentEnabled.value\n ),\n compListingQuantityScoreAdjustmentOverrideJson: posField(\n listing.compListingQuantityScoreAdjustmentOverrideJson.value\n ),\n compListingSelectedSectionSettings: posField(\n listing.compListingSelectedSectionSettings.value\n ),\n deriveCompsFromVenueZoneConfig: false,\n includeBetterZones: false,\n rowCompOffset: 0,\n venueZoneMapName: null,\n includeExistingSelectedSections:\n !listing.compListingSelectedSectionSettings.value, // If no common sections are selected, include existing sections\n undercutMode: posField(listing.undercutMode.value),\n undercutAbsoluteAmount: posField(listing.undercutAbsoluteAmount.value),\n undercutRelativeAmount: posField(listing.undercutRelativeAmount.value),\n circuitBreakerMaxDiscountVelocityPercent: posField(\n listing.circuitBreakerMaxDiscountVelocityPercent.value\n ),\n circuitBreakerMaxDiscountVelocityTicksInHours: posField(\n listing.circuitBreakerMaxDiscountVelocityTicksInHours.value\n ),\n circuitBreakerMinCompListingCount: posField(\n listing.circuitBreakerMinCompListingCount.value\n ),\n circuitBreakerRelativeCeiling: posField(\n listing.circuitBreakerRelativeCeiling.value\n ),\n circuitBreakerRelativeFloor: posField(\n listing.circuitBreakerRelativeFloor.value\n ),\n outlierMode: posField(listing.outlierMode.value),\n outlierStandardDeviations: posField(\n listing.outlierStandardDeviations.value\n ),\n outlierKthLowestLimit: posField(listing.outlierKthLowestLimit.value),\n outlierKthLowestLimitRelativeSpacing: posField(\n listing.outlierKthLowestLimitRelativeSpacing.value\n ),\n outlierKthLowestLimitAbsoluteSpacing: posField(\n listing.outlierKthLowestLimitAbsoluteSpacing.value\n ),\n };\n};\n\nexport const generateDefaultSettings = (\n listings: Listing[],\n multiEvents: boolean,\n hasBulkEditPricingSettingsUpdateFeature: boolean\n): AutoPricingSettingsInput => {\n const currencyCode = new Set(listings.map((l) => l.currency));\n const autoPricingEnabled = new Set(listings.map((l) => l.isAutoPrc));\n const netProceedsFloor = new Set(listings.map((l) => l.procsFloor));\n const netProceedsCeiling = new Set(listings.map((l) => l.procsCeil));\n const compListingFloor = new Set(listings.map((l) => l.compFloor));\n const compListingCeiling = new Set(listings.map((l) => l.compCeil));\n const compListingSelectedSectionSettings = listings.map(\n (l) => l.compSectionSettings\n );\n const compListingOnlyForSameZoneEnabled = new Set(\n listings.map((l) => l.isCompForSameZone)\n );\n const compListingOnlyForSelectedSectionsEnabled = new Set(\n listings.map((l) => l.isCompSelectedSections)\n );\n const compListingExcludeFanInventory = new Set(\n listings.map((l) => l.compExclFanInv)\n );\n const compListingExcludeDefects = new Set(\n listings.map((l) => l.compExclDefects)\n );\n const compListingQuantityScoreAdjustmentEnabled = new Set(\n listings.map((l) => l.isCompQtyScrAdj)\n );\n const compListingQuantityScoreAdjustmentOverrideJson = new Set(\n listings.map((l) => l.compQtyScrAdjJson)\n );\n const undercutMode = new Set(listings.map((l) => l.undMode));\n const undercutAbsoluteAmount = new Set(listings.map((l) => l.undAbsAmt));\n const undercutRelativeAmount = new Set(listings.map((l) => l.undRelAmt));\n const circuitBreakerMaxDiscountVelocityPercent = new Set(\n listings.map((l) => l.cirBrMaxDiscVelocPercent)\n );\n const circuitBreakerMaxDiscountVelocityTicksInHours = new Set(\n listings.map((l) => l.cirBrMaxDiscVelocTicksInHrs)\n );\n const circuitBreakerMinCompListingCount = new Set(\n listings.map((l) => l.cirBrMinCompCount)\n );\n\n const circuitBreakerRelativeCeiling = new Set(\n listings.map((l) => l.cirBrRelCeil)\n );\n const circuitBreakerRelativeFloor = new Set(\n listings.map((l) => l.cirBrRelFloor)\n );\n const outlierMode = new Set(listings.map((l) => l.outMode));\n const outlierStandardDeviations = new Set(listings.map((l) => l.outlStdDev));\n const outlierKthLowestLimit = new Set(listings.map((l) => l.outKthLowestLim));\n const outlierKthLowestLimitRelativeSpacing = new Set(\n listings.map((l) => l.outKthLowestLimRelSpc)\n );\n const outlierKthLowestLimitAbsoluteSpacing = new Set(\n listings.map((l) => l.outKthLowestLimAbsSpc)\n );\n const compListingMode = new Set(listings.map((l) => l.compMode));\n\n return {\n currencyCode: toSettingInput(currencyCode, multiEvents),\n autoPricingEnabled: toSettingInput(autoPricingEnabled, multiEvents),\n netProceedsFloor: toSettingInput(netProceedsFloor, multiEvents),\n netProceedsCeiling: toSettingInput(netProceedsCeiling, multiEvents),\n compListingMode: hasBulkEditPricingSettingsUpdateFeature\n ? toSettingInput(compListingMode, multiEvents)\n : {\n value: AutoPricingCompListingMode.SameEvent,\n hasConflict: false,\n }, // Bulk edit only supports SameEvent\n compListingFloor: toSettingInput(compListingFloor, multiEvents),\n compListingCeiling: toSettingInput(compListingCeiling, multiEvents),\n compListingSelectedSectionSettings: toSettingInputFromArray(\n compListingSelectedSectionSettings,\n multiEvents\n ),\n compListingOnlyForSameZoneEnabled: toSettingInput(\n compListingOnlyForSameZoneEnabled,\n multiEvents\n ),\n compListingOnlyForSelectedSectionsEnabled: toSettingInput(\n compListingOnlyForSelectedSectionsEnabled,\n multiEvents\n ),\n compListingExcludeFanInventory: toSettingInput(\n compListingExcludeFanInventory,\n multiEvents\n ),\n compListingExcludeDefects: toSettingInput(\n compListingExcludeDefects,\n multiEvents\n ),\n compListingQuantityScoreAdjustmentEnabled: toSettingInput(\n compListingQuantityScoreAdjustmentEnabled,\n multiEvents\n ),\n compListingQuantityScoreAdjustmentOverrideJson: toSettingInput(\n compListingQuantityScoreAdjustmentOverrideJson,\n multiEvents\n ),\n undercutMode: toSettingInput(undercutMode, multiEvents),\n undercutAbsoluteAmount: toSettingInput(undercutAbsoluteAmount, multiEvents),\n undercutRelativeAmount: toSettingInput(undercutRelativeAmount, multiEvents),\n circuitBreakerMaxDiscountVelocityPercent: toSettingInput(\n circuitBreakerMaxDiscountVelocityPercent,\n multiEvents\n ),\n circuitBreakerMaxDiscountVelocityTicksInHours: toSettingInput(\n circuitBreakerMaxDiscountVelocityTicksInHours,\n multiEvents\n ),\n circuitBreakerMinCompListingCount: toSettingInput(\n circuitBreakerMinCompListingCount,\n multiEvents\n ),\n circuitBreakerRelativeCeiling: toSettingInput(\n circuitBreakerRelativeCeiling,\n multiEvents\n ),\n circuitBreakerRelativeFloor: toSettingInput(\n circuitBreakerRelativeFloor,\n multiEvents\n ),\n outlierMode: toSettingInput(outlierMode, multiEvents),\n outlierStandardDeviations: toSettingInput(\n outlierStandardDeviations,\n multiEvents\n ),\n outlierKthLowestLimit: toSettingInput(outlierKthLowestLimit, multiEvents),\n outlierKthLowestLimitRelativeSpacing: toSettingInput(\n outlierKthLowestLimitRelativeSpacing,\n multiEvents\n ),\n outlierKthLowestLimitAbsoluteSpacing: toSettingInput(\n outlierKthLowestLimitAbsoluteSpacing,\n multiEvents\n ),\n };\n};\n\nconst toSettingInput = (values: Set, multiEvents = false) => {\n const isUnique = values.size === 1;\n // Default to hasConflict if there are multiple events\n const hasConflict = values.size > 1 || multiEvents;\n return {\n value: isUnique ? Array.from(values)[0] ?? null : null,\n hasConflict,\n };\n};\n\nconst toSettingInputFromArray = (values: T[], multiEvents: boolean) => {\n const allEqual = values.every((v) => isEqual(v, values[0]));\n return {\n value: allEqual ? values[0] ?? null : null,\n // Default to hasConflict if there are multiple events\n hasConflict: !allEqual || multiEvents,\n };\n};\n\nexport const santizedPricingSettingsUpdateInput = (\n input: ListingDetailsAutoPricingSectionUpdatesV2,\n updateInput?: Partial>\n): ListingDetailsAutoPricingSectionUpdatesV2 => {\n return {\n id: input.id,\n rowVersion: input.rowVersion,\n currencyCode: input.currencyCode,\n netProceedsFloorAdjustmentType: input.netProceedsFloorAdjustmentType,\n netProceedsFloorAdjustmentAmount: input.netProceedsFloorAdjustmentAmount,\n netProceedsFloorAdjustmentRelative:\n input.netProceedsFloorAdjustmentRelative,\n netProceedsFloor: posField(\n input.netProceedsFloor?.value ?? null,\n input.netProceedsFloor?.hasChanged && updateInput?.netProceedsFloor\n ),\n netProceedsCeiling: posField(\n input.netProceedsCeiling?.value ?? null,\n input.netProceedsCeiling?.hasChanged && updateInput?.netProceedsCeiling\n ),\n autoPricingEnabled: posField(\n input.autoPricingEnabled?.value ?? null,\n input.autoPricingEnabled?.hasChanged && updateInput?.autoPricingEnabled\n ),\n undercutMode: input.undercutMode,\n undercutAbsoluteAmount: posField(\n input.undercutAbsoluteAmount?.value ?? null,\n input.undercutAbsoluteAmount?.hasChanged &&\n updateInput?.undercutAbsoluteAmount != null\n ),\n undercutRelativeAmount: posField(\n input.undercutRelativeAmount?.value ?? null,\n input.undercutRelativeAmount?.hasChanged &&\n updateInput?.undercutRelativeAmount\n ),\n compListingMode: posField(\n input.compListingMode?.value ?? null,\n input.compListingMode?.hasChanged && updateInput?.compListingMode\n ),\n compListingFloor: posField(\n input.compListingFloor?.value ?? null,\n input.compListingFloor?.hasChanged && updateInput?.compListingFloor\n ),\n compListingCeiling: posField(\n input.compListingCeiling?.value ?? null,\n input.compListingCeiling?.hasChanged && updateInput?.compListingCeiling\n ),\n compListingQuantityScoreAdjustmentEnabled: posField(\n input.compListingQuantityScoreAdjustmentEnabled?.value ?? null,\n input.compListingQuantityScoreAdjustmentEnabled?.hasChanged &&\n updateInput?.compListingQuantityScoreAdjustmentEnabled\n ),\n compListingQuantityScoreAdjustmentOverrideJson: posField(\n input.compListingQuantityScoreAdjustmentOverrideJson?.value ?? null,\n input.compListingQuantityScoreAdjustmentOverrideJson?.hasChanged &&\n updateInput?.compListingQuantityScoreAdjustmentOverrideJson\n ),\n compListingOnlyForSameZoneEnabled: posField(\n input.compListingOnlyForSameZoneEnabled?.value ?? null,\n input.compListingOnlyForSameZoneEnabled?.hasChanged &&\n updateInput?.compListingOnlyForSameZoneEnabled\n ),\n compListingOnlyForSelectedSectionsEnabled: posField(\n input.compListingOnlyForSelectedSectionsEnabled?.value ?? null,\n input.compListingOnlyForSelectedSectionsEnabled?.hasChanged &&\n updateInput?.compListingOnlyForSelectedSectionsEnabled\n ),\n compListingExcludeFanInventory: posField(\n input.compListingExcludeFanInventory?.value ?? null,\n input.compListingExcludeFanInventory?.hasChanged &&\n updateInput?.compListingExcludeFanInventory\n ),\n compListingExcludeDefects: posField(\n input.compListingExcludeDefects?.value ?? null,\n input.compListingExcludeDefects?.hasChanged &&\n updateInput?.compListingExcludeDefects\n ),\n compListingSelectedSectionSettings: posField(\n input.compListingSelectedSectionSettings?.value ?? null,\n (input.compListingSelectedSectionSettings?.hasChanged ||\n !input.includeExistingSelectedSections) && // When not include existing listings, always update\n updateInput?.compListingSelectedSectionSettings\n ),\n deriveCompsFromVenueZoneConfig: input.deriveCompsFromVenueZoneConfig,\n includeBetterZones: input.includeBetterZones,\n rowCompOffset: input.rowCompOffset,\n venueZoneMapName: input.venueZoneMapName,\n includeExistingSelectedSections:\n (input.includeExistingSelectedSections &&\n updateInput?.compListingSelectedSectionSettings) ??\n null,\n circuitBreakerRelativeCeiling: posField(\n input.circuitBreakerRelativeCeiling?.value ?? null,\n input.circuitBreakerRelativeCeiling?.hasChanged &&\n updateInput?.circuitBreakerRelativeCeiling\n ),\n circuitBreakerRelativeFloor: posField(\n input.circuitBreakerRelativeFloor?.value ?? null,\n input.circuitBreakerRelativeFloor?.hasChanged &&\n updateInput?.circuitBreakerRelativeFloor\n ),\n circuitBreakerMaxDiscountVelocityPercent: posField(\n input.circuitBreakerMaxDiscountVelocityPercent?.value ?? null,\n input.circuitBreakerMaxDiscountVelocityPercent?.hasChanged &&\n updateInput?.circuitBreakerMaxDiscountVelocityPercent\n ),\n circuitBreakerMaxDiscountVelocityTicksInHours: posField(\n input.circuitBreakerMaxDiscountVelocityTicksInHours?.value ?? null,\n input.circuitBreakerMaxDiscountVelocityTicksInHours?.hasChanged &&\n updateInput?.circuitBreakerMaxDiscountVelocityTicksInHours\n ),\n circuitBreakerMinCompListingCount: posField(\n input.circuitBreakerMinCompListingCount?.value ?? null,\n input.circuitBreakerMinCompListingCount?.hasChanged &&\n updateInput?.circuitBreakerMinCompListingCount\n ),\n outlierMode: posField(\n input.outlierMode?.value ?? null,\n input.outlierMode?.hasChanged && updateInput?.outlierMode\n ),\n outlierStandardDeviations: posField(\n input.outlierStandardDeviations?.value ?? null,\n input.outlierStandardDeviations?.hasChanged &&\n updateInput?.outlierStandardDeviations\n ),\n outlierKthLowestLimit: posField(\n input.outlierKthLowestLimit?.value ?? null,\n input.outlierKthLowestLimit?.hasChanged &&\n updateInput?.outlierKthLowestLimit\n ),\n outlierKthLowestLimitRelativeSpacing: posField(\n input.outlierKthLowestLimitRelativeSpacing?.value ?? null,\n input.outlierKthLowestLimitRelativeSpacing?.hasChanged &&\n updateInput?.outlierKthLowestLimitRelativeSpacing\n ),\n outlierKthLowestLimitAbsoluteSpacing: posField(\n input.outlierKthLowestLimitAbsoluteSpacing?.value ?? null,\n input.outlierKthLowestLimitAbsoluteSpacing?.hasChanged &&\n updateInput?.outlierKthLowestLimitAbsoluteSpacing\n ),\n };\n};\n","import { isEmpty } from 'lodash-es';\nimport { useCallback, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport {\n DEFAULT_COMP_LISTING_CEIL_MORE_THAN_FLOOR,\n DEFAULT_COMP_LISTING_FLOOR,\n} from 'src/utils/autoPricingUtils';\nimport { coalesceUndefinedOnly } from 'src/utils/miscUtils';\nimport { posChangedField, posField } from 'src/utils/posFieldUtils';\nimport {\n mapToSelectedSectionSettings,\n SelectedSectionSettingsWithOptionals,\n} from 'src/utils/types/selectedSectionSettingsWithOptionals';\nimport {\n AutoPricingCompListingMode,\n AutoPricingOutlierMode,\n AutoPricingUndercutMode,\n Feature,\n Listing,\n ListingDetailsAutoPricingSectionUpdatesV2,\n PricingFloorCeilingAdjustmentType,\n SectionInfo,\n SelectedSectionSettings,\n} from 'src/WebApiController';\n\nexport const useAutoPricingSettings = (listing?: Listing | null) => {\n const { setValue, watch } =\n useFormContext();\n\n const hasDefaultFilterRowsFeature = useUserHasFeature(\n Feature.DefaultFilterRows\n );\n\n const updateInput = watch();\n const {\n netProceedsFloor,\n netProceedsCeiling,\n netProceedsFloorAdjustmentAmount,\n netProceedsFloorAdjustmentType,\n netProceedsFloorAdjustmentRelative,\n\n autoPricingEnabled,\n undercutMode,\n undercutAbsoluteAmount,\n undercutRelativeAmount,\n\n compListingMode,\n compListingCeiling,\n compListingFloor,\n compListingOnlyForSameZoneEnabled,\n compListingOnlyForSelectedSectionsEnabled,\n compListingQuantityScoreAdjustmentEnabled,\n compListingExcludeFanInventory,\n compListingExcludeDefects,\n compListingQuantityScoreAdjustmentOverrideJson,\n compListingSelectedSectionSettings,\n includeExistingSelectedSections,\n\n outlierMode,\n outlierStandardDeviations,\n outlierKthLowestLimit,\n outlierKthLowestLimitAbsoluteSpacing,\n outlierKthLowestLimitRelativeSpacing,\n\n circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerMaxDiscountVelocityTicksInHours,\n circuitBreakerMinCompListingCount,\n circuitBreakerRelativeCeiling,\n circuitBreakerRelativeFloor,\n } = updateInput;\n\n const { loginContext } = useAppContext();\n\n const { getUiCurrency } = useLocalizationContext();\n\n const uiCurrency = useMemo(\n () =>\n getUiCurrency(\n listing?.currency ?? loginContext?.user?.activeAccount?.currencyCode\n ),\n [\n getUiCurrency,\n listing?.currency,\n loginContext?.user?.activeAccount?.currencyCode,\n ]\n );\n\n const { event } = useEventMapContext();\n\n const circuitBreakerSettings = useMemo(() => {\n return {\n circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerMaxDiscountVelocityTicksInHours,\n circuitBreakerMinCompListingCount,\n circuitBreakerRelativeCeiling,\n circuitBreakerRelativeFloor,\n };\n }, [\n circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerMaxDiscountVelocityTicksInHours,\n circuitBreakerMinCompListingCount,\n circuitBreakerRelativeCeiling,\n circuitBreakerRelativeFloor,\n ]);\n\n const undercutSettings = useMemo(() => {\n return {\n undercutMode,\n undercutAbsoluteAmount,\n undercutRelativeAmount,\n };\n }, [undercutAbsoluteAmount, undercutMode, undercutRelativeAmount]);\n\n const compListingSettings = useMemo(() => {\n return {\n compListingMode,\n compListingFloor:\n compListingFloor ?? posField(DEFAULT_COMP_LISTING_FLOOR),\n compListingCeiling:\n compListingCeiling ??\n posField(\n (compListingFloor?.value ?? DEFAULT_COMP_LISTING_FLOOR) +\n DEFAULT_COMP_LISTING_CEIL_MORE_THAN_FLOOR\n ),\n compListingOnlyForSameZoneEnabled,\n compListingOnlyForSelectedSectionsEnabled,\n compListingExcludeFanInventory,\n compListingExcludeDefects,\n compListingSelectedSectionSettings,\n compListingQuantityScoreAdjustmentEnabled,\n compListingQuantityScoreAdjustmentOverrideJson,\n };\n }, [\n compListingMode,\n compListingFloor,\n compListingCeiling,\n compListingOnlyForSameZoneEnabled,\n compListingOnlyForSelectedSectionsEnabled,\n compListingExcludeFanInventory,\n compListingExcludeDefects,\n compListingSelectedSectionSettings,\n compListingQuantityScoreAdjustmentEnabled,\n compListingQuantityScoreAdjustmentOverrideJson,\n ]);\n\n const outlierSettings = useMemo(() => {\n return {\n outlierMode,\n outlierStandardDeviations,\n outlierKthLowestLimit,\n outlierKthLowestLimitRelativeSpacing,\n outlierKthLowestLimitAbsoluteSpacing,\n };\n }, [\n outlierKthLowestLimit,\n outlierKthLowestLimitAbsoluteSpacing,\n outlierKthLowestLimitRelativeSpacing,\n outlierMode,\n outlierStandardDeviations,\n ]);\n\n const onUndercutChange = useCallback(\n (\n undercutModeNew?: AutoPricingUndercutMode | null,\n undercutAbsoluteAmountNew?: number | null,\n undercutRelativeAmountNew?: number | null\n ) => {\n setValue(\n 'undercutMode',\n posField(\n coalesceUndefinedOnly(\n undercutModeNew,\n undercutSettings.undercutMode?.value\n )!,\n undercutModeNew !== undefined ||\n undercutSettings.undercutMode?.hasChanged\n )\n );\n setValue(\n 'undercutAbsoluteAmount',\n posField(\n coalesceUndefinedOnly(\n undercutAbsoluteAmountNew,\n undercutSettings.undercutAbsoluteAmount?.value\n )!,\n undercutAbsoluteAmountNew !== undefined ||\n undercutSettings.undercutAbsoluteAmount?.hasChanged\n )\n );\n setValue(\n 'undercutRelativeAmount',\n posField(\n coalesceUndefinedOnly(\n undercutRelativeAmountNew,\n undercutSettings.undercutRelativeAmount?.value\n )!,\n undercutRelativeAmountNew !== undefined ||\n undercutSettings.undercutRelativeAmount?.hasChanged\n )\n );\n },\n [\n setValue,\n undercutSettings.undercutAbsoluteAmount,\n undercutSettings.undercutMode,\n undercutSettings.undercutRelativeAmount,\n ]\n );\n\n const onCompListingChange = useCallback(\n (input: {\n compListingModeNew?: AutoPricingCompListingMode | null;\n compListingFloorNew?: number | null;\n compListingCeilingNew?: number | null;\n compListingOnlyForSameZoneEnabledNew?: boolean | null;\n compListingOnlyForSelectedSectionsEnabledNew?: boolean | null;\n compListingQuantityScoreAdjustmentEnabledNew?: boolean | null;\n compListingExcludeFanInventoryNew?: boolean | null;\n compListingExcludeDefectsNew?: boolean | null;\n compListingQuantityScoreAdjustmentOverrideJsonNew?: string | null;\n compListingSelectedSectionSettingsNew?: SelectedSectionSettingsWithOptionals | null;\n }) => {\n const {\n compListingModeNew,\n compListingFloorNew,\n compListingCeilingNew,\n compListingOnlyForSameZoneEnabledNew,\n compListingOnlyForSelectedSectionsEnabledNew,\n compListingQuantityScoreAdjustmentEnabledNew,\n compListingExcludeFanInventoryNew,\n compListingExcludeDefectsNew,\n compListingQuantityScoreAdjustmentOverrideJsonNew,\n compListingSelectedSectionSettingsNew,\n } = input;\n\n const sanitizedCompListingOnlyForSameZoneEnabledNew =\n compListingOnlyForSelectedSectionsEnabledNew\n ? false\n : compListingOnlyForSameZoneEnabledNew;\n const sanitizedCompListingOnlyForSelectedSectionsEnabledNew =\n compListingOnlyForSameZoneEnabledNew\n ? false\n : compListingOnlyForSelectedSectionsEnabledNew;\n\n setValue(\n 'compListingMode',\n posField(\n coalesceUndefinedOnly(\n compListingModeNew,\n compListingSettings.compListingMode?.value\n )!,\n compListingModeNew !== undefined ||\n compListingSettings.compListingMode?.hasChanged\n )\n );\n setValue(\n 'compListingFloor',\n posField(\n coalesceUndefinedOnly(\n compListingFloorNew,\n compListingSettings.compListingFloor?.value\n )!,\n compListingFloorNew !== undefined ||\n compListingSettings.compListingFloor?.hasChanged\n )\n );\n setValue(\n 'compListingCeiling',\n posField(\n coalesceUndefinedOnly(\n compListingCeilingNew,\n compListingSettings.compListingCeiling?.value\n )!,\n compListingCeilingNew !== undefined ||\n compListingSettings.compListingCeiling?.hasChanged\n )\n );\n setValue(\n 'compListingOnlyForSameZoneEnabled',\n posField(\n coalesceUndefinedOnly(\n sanitizedCompListingOnlyForSameZoneEnabledNew,\n compListingSettings.compListingOnlyForSameZoneEnabled?.value\n )!,\n sanitizedCompListingOnlyForSameZoneEnabledNew !== undefined ||\n compListingSettings.compListingOnlyForSameZoneEnabled?.hasChanged\n )\n );\n setValue(\n 'compListingOnlyForSelectedSectionsEnabled',\n posField(\n coalesceUndefinedOnly(\n sanitizedCompListingOnlyForSelectedSectionsEnabledNew,\n compListingSettings.compListingOnlyForSelectedSectionsEnabled?.value\n )!,\n sanitizedCompListingOnlyForSelectedSectionsEnabledNew !== undefined ||\n compListingSettings.compListingOnlyForSelectedSectionsEnabled\n ?.hasChanged\n )\n );\n setValue(\n 'compListingQuantityScoreAdjustmentEnabled',\n posField(\n coalesceUndefinedOnly(\n compListingQuantityScoreAdjustmentEnabledNew,\n compListingSettings.compListingQuantityScoreAdjustmentEnabled?.value\n )!,\n compListingQuantityScoreAdjustmentEnabledNew !== undefined ||\n compListingSettings.compListingQuantityScoreAdjustmentEnabled\n ?.hasChanged\n )\n );\n setValue(\n 'compListingExcludeFanInventory',\n posField(\n coalesceUndefinedOnly(\n compListingExcludeFanInventoryNew,\n compListingSettings.compListingExcludeFanInventory?.value\n )!,\n compListingExcludeFanInventoryNew !== undefined ||\n compListingSettings.compListingExcludeFanInventory?.hasChanged\n )\n );\n setValue(\n 'compListingExcludeDefects',\n posField(\n coalesceUndefinedOnly(\n compListingExcludeDefectsNew,\n compListingSettings.compListingExcludeDefects?.value\n )!,\n compListingExcludeDefectsNew !== undefined ||\n compListingSettings.compListingExcludeDefects?.hasChanged\n )\n );\n setValue(\n 'compListingQuantityScoreAdjustmentOverrideJson',\n posField(\n coalesceUndefinedOnly(\n compListingQuantityScoreAdjustmentOverrideJsonNew,\n compListingSettings.compListingQuantityScoreAdjustmentOverrideJson\n ?.value\n )!,\n compListingQuantityScoreAdjustmentOverrideJsonNew !== undefined ||\n compListingSettings.compListingQuantityScoreAdjustmentOverrideJson\n ?.hasChanged\n )\n );\n setValue(\n 'compListingSelectedSectionSettings',\n posField(\n coalesceUndefinedOnly(\n mapToSelectedSectionSettings(compListingSelectedSectionSettingsNew),\n compListingSettings.compListingSelectedSectionSettings?.value\n )!,\n compListingSelectedSectionSettingsNew !== undefined ||\n compListingSettings.compListingSelectedSectionSettings?.hasChanged\n )\n );\n },\n [\n compListingSettings.compListingCeiling,\n compListingSettings.compListingFloor,\n compListingSettings.compListingMode,\n compListingSettings.compListingOnlyForSameZoneEnabled,\n compListingSettings.compListingOnlyForSelectedSectionsEnabled,\n compListingSettings.compListingQuantityScoreAdjustmentEnabled,\n compListingSettings.compListingExcludeFanInventory,\n compListingSettings.compListingExcludeDefects,\n compListingSettings.compListingQuantityScoreAdjustmentOverrideJson,\n compListingSettings.compListingSelectedSectionSettings,\n setValue,\n ]\n );\n\n const onCircuitBreakerChange = useCallback(\n (\n circuitBreakerRelativeCeilingNew?: number | null,\n circuitBreakerRelativeFloorNew?: number | null,\n circuitBreakerMaxDiscountVelocityPercentNew?: number | null,\n circuitBreakerMaxDiscountVelocityTicksInHoursNew?: number | null,\n circuitBreakerMinCompListingCountNew?: number | null\n ) => {\n setValue(\n 'circuitBreakerRelativeCeiling',\n posField(\n coalesceUndefinedOnly(\n circuitBreakerRelativeCeilingNew,\n circuitBreakerSettings.circuitBreakerRelativeCeiling?.value\n ) ?? null,\n circuitBreakerRelativeCeilingNew !== undefined ||\n circuitBreakerSettings.circuitBreakerRelativeCeiling?.hasChanged\n )\n );\n setValue(\n 'circuitBreakerRelativeFloor',\n posField(\n coalesceUndefinedOnly(\n circuitBreakerRelativeFloorNew,\n circuitBreakerSettings.circuitBreakerRelativeFloor?.value\n ) ?? null,\n circuitBreakerRelativeFloorNew !== undefined ||\n circuitBreakerSettings.circuitBreakerRelativeFloor?.hasChanged\n )\n );\n setValue(\n 'circuitBreakerMaxDiscountVelocityPercent',\n posField(\n coalesceUndefinedOnly(\n circuitBreakerMaxDiscountVelocityPercentNew,\n circuitBreakerSettings.circuitBreakerMaxDiscountVelocityPercent\n ?.value\n ) ?? null,\n circuitBreakerMaxDiscountVelocityPercentNew !== undefined ||\n circuitBreakerSettings.circuitBreakerMaxDiscountVelocityPercent\n ?.hasChanged\n )\n );\n setValue(\n 'circuitBreakerMaxDiscountVelocityTicksInHours',\n posField(\n coalesceUndefinedOnly(\n circuitBreakerMaxDiscountVelocityTicksInHoursNew,\n circuitBreakerSettings.circuitBreakerMaxDiscountVelocityTicksInHours\n ?.value\n ) ?? null,\n circuitBreakerMaxDiscountVelocityTicksInHoursNew !== undefined ||\n circuitBreakerSettings.circuitBreakerMaxDiscountVelocityTicksInHours\n ?.hasChanged\n )\n );\n setValue(\n 'circuitBreakerMinCompListingCount',\n posField(\n coalesceUndefinedOnly(\n circuitBreakerMinCompListingCountNew,\n circuitBreakerSettings.circuitBreakerMinCompListingCount?.value\n ) ?? null,\n circuitBreakerMinCompListingCountNew !== undefined ||\n circuitBreakerSettings.circuitBreakerMinCompListingCount?.hasChanged\n )\n );\n },\n [\n circuitBreakerSettings.circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerSettings.circuitBreakerMaxDiscountVelocityTicksInHours,\n circuitBreakerSettings.circuitBreakerMinCompListingCount,\n circuitBreakerSettings.circuitBreakerRelativeCeiling,\n circuitBreakerSettings.circuitBreakerRelativeFloor,\n setValue,\n ]\n );\n\n const onOutlierChange = useCallback(\n (input: {\n outlierModeNew?: AutoPricingOutlierMode | null;\n outlierStandardDeviationsNew?: number | null;\n outlierKthLowestLimitNew?: number | null;\n outlierKthLowestLimitRelativeSpacingNew?: number | null;\n outlierKthLowestLimitAbsoluteSpacingNew?: number | null;\n }) => {\n const {\n outlierModeNew,\n outlierStandardDeviationsNew,\n outlierKthLowestLimitNew,\n outlierKthLowestLimitRelativeSpacingNew,\n outlierKthLowestLimitAbsoluteSpacingNew,\n } = input;\n\n // Covers both null and undefined cases\n if (outlierModeNew !== undefined) {\n setValue('outlierMode', posChangedField(outlierModeNew));\n\n switch (outlierModeNew) {\n case AutoPricingOutlierMode.StandardDeviations:\n setValue(\n 'outlierStandardDeviations',\n posField(\n coalesceUndefinedOnly(\n outlierStandardDeviationsNew,\n outlierSettings.outlierStandardDeviations?.value\n ) ?? null,\n outlierStandardDeviationsNew !== undefined ||\n outlierSettings.outlierStandardDeviations?.hasChanged\n )\n );\n setValue('outlierKthLowestLimit', posChangedField(null));\n setValue(\n 'outlierKthLowestLimitRelativeSpacing',\n posChangedField(null)\n );\n setValue(\n 'outlierKthLowestLimitAbsoluteSpacing',\n posChangedField(null)\n );\n break;\n case AutoPricingOutlierMode.KthLowest:\n setValue('outlierStandardDeviations', posChangedField(null));\n setValue(\n 'outlierKthLowestLimit',\n posField(\n coalesceUndefinedOnly(\n outlierKthLowestLimitNew,\n outlierSettings.outlierKthLowestLimit?.value\n ) ?? null,\n outlierKthLowestLimitNew !== undefined ||\n outlierSettings.outlierKthLowestLimit?.hasChanged\n )\n );\n\n setValue(\n 'outlierKthLowestLimitRelativeSpacing',\n posField(\n coalesceUndefinedOnly(\n outlierKthLowestLimitRelativeSpacingNew,\n outlierSettings.outlierKthLowestLimitRelativeSpacing?.value\n ) ?? null,\n outlierKthLowestLimitRelativeSpacingNew !== undefined ||\n outlierSettings.outlierKthLowestLimitRelativeSpacing\n ?.hasChanged\n )\n );\n\n setValue(\n 'outlierKthLowestLimitAbsoluteSpacing',\n posField(\n coalesceUndefinedOnly(\n outlierKthLowestLimitAbsoluteSpacingNew,\n outlierSettings.outlierKthLowestLimitAbsoluteSpacing?.value\n ) ?? null,\n outlierKthLowestLimitAbsoluteSpacingNew !== undefined ||\n outlierSettings.outlierKthLowestLimitAbsoluteSpacing\n ?.hasChanged\n )\n );\n break;\n case AutoPricingOutlierMode.SkipLogic:\n setValue('outlierStandardDeviations', posChangedField(null));\n setValue('outlierKthLowestLimit', posChangedField(null));\n setValue(\n 'outlierKthLowestLimitRelativeSpacing',\n posChangedField(null)\n );\n setValue(\n 'outlierKthLowestLimitAbsoluteSpacing',\n posChangedField(null)\n );\n }\n } else {\n setValue('outlierMode', null);\n setValue('outlierStandardDeviations', null);\n setValue('outlierKthLowestLimit', null);\n setValue('outlierKthLowestLimitRelativeSpacing', null);\n setValue('outlierKthLowestLimitAbsoluteSpacing', null);\n }\n },\n [\n outlierSettings.outlierKthLowestLimit,\n outlierSettings.outlierKthLowestLimitAbsoluteSpacing,\n outlierSettings.outlierKthLowestLimitRelativeSpacing,\n outlierSettings.outlierStandardDeviations,\n setValue,\n ]\n );\n\n const applySectionRowFilterCompListingChanges = useCallback(\n (\n newSectionIdFilter: number[],\n sections: SectionInfo[],\n compListingSelectedSectionSettingsNew?:\n | SelectedSectionSettingsWithOptionals\n | null\n | undefined\n ) => {\n if (newSectionIdFilter.length === 0 && sections.length > 0) {\n onCompListingChange({\n compListingSelectedSectionSettingsNew,\n compListingOnlyForSelectedSectionsEnabledNew: false,\n });\n }\n onCompListingChange({\n compListingSelectedSectionSettingsNew,\n compListingOnlyForSelectedSectionsEnabledNew: true,\n });\n },\n [onCompListingChange]\n );\n\n const onCompListingSectionIdFilterChange = useCallback(\n (\n sectionId: number,\n selectedSections: SectionInfo[],\n section?: SectionInfo,\n listing?: Listing\n ) => {\n let newSectionIdFilter =\n compListingSelectedSectionSettings?.value?.sectionIdFilter ?? [];\n\n let newRowIdFilter =\n compListingSelectedSectionSettings?.value?.rowIdFilter ?? [];\n\n let newSectionRowIdFilter =\n compListingSelectedSectionSettings?.value?.sectionRowIdFilter ?? {};\n\n if (newSectionIdFilter.includes(sectionId)) {\n newSectionIdFilter = newSectionIdFilter.filter(\n (id) => id !== sectionId\n );\n\n // Remove all the associated row ids for this section\n const section = selectedSections.find((s) => s.id === sectionId);\n if (section) {\n const rowIds = section.rows.map((r) => r.id);\n newRowIdFilter = newRowIdFilter.filter((id) => !rowIds.includes(id));\n }\n\n // Remove the sectionRow mapping so we don't display it in pills\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { [sectionId]: omitted, ...updatedSectionRowIdFilter } =\n compListingSelectedSectionSettings?.value?.sectionRowIdFilter ?? {};\n\n newSectionRowIdFilter = updatedSectionRowIdFilter;\n } else {\n newSectionIdFilter.push(sectionId);\n\n // If a section is present, add all the rows associated with the newly selected section\n if (\n hasDefaultFilterRowsFeature &&\n listing &&\n section &&\n listing.seating?.row\n ) {\n const { seating: listingSeating } = listing;\n const listingRow = listingSeating.row!;\n\n const matchingRow = section.rows.find(\n ({ id, name }) =>\n id === listingSeating.rowId ||\n name?.toLowerCase() === listingRow.toLowerCase()\n );\n\n if (matchingRow) {\n // Remove all the row filters associated with the section id\n const sectionRowIds = section.rows.map((r) => r.id);\n newRowIdFilter = [\n ...newRowIdFilter.filter(\n (rowId) => !sectionRowIds.includes(rowId)\n ),\n ];\n\n // Exclude all rows from section if the matching row has no ordinal\n if (matchingRow.ordinal == null) {\n newSectionRowIdFilter[section.id] = matchingRow.id.toString();\n return;\n }\n\n // Push all the row ids with an ordinal less than or equal to the matching row\n section.rows.forEach((row) => {\n if (row.ordinal == null || matchingRow.ordinal == null) return;\n if (row.ordinal <= matchingRow.ordinal) {\n newRowIdFilter.push(row.id);\n }\n });\n\n // Only store the highest ordinal row id to display in the pill\n newSectionRowIdFilter[section.id] = matchingRow.id.toString();\n }\n } else if (section) {\n // If listing or seating info is not present, add all the section rows as a filter\n const newRowIds = section.rows.map((r) => r.id);\n newRowIds.forEach((newRowId) => {\n if (!newRowIdFilter.includes(newRowId)) {\n newRowIdFilter.push(newRowId);\n }\n });\n }\n }\n\n const compListingSelectedSectionSettingsNew = {\n sectionIdFilter: newSectionIdFilter,\n rowIdFilter: newRowIdFilter,\n sectionRowIdFilter: newSectionRowIdFilter,\n };\n\n applySectionRowFilterCompListingChanges(\n newSectionIdFilter,\n selectedSections,\n compListingSelectedSectionSettingsNew\n );\n },\n [\n applySectionRowFilterCompListingChanges,\n compListingSelectedSectionSettings,\n hasDefaultFilterRowsFeature,\n ]\n );\n\n const onCompListingSectionZoneChange = useCallback(\n (sections: SectionInfo[], flipOnSameSections = true) => {\n let newSectionIdFilter =\n compListingSelectedSectionSettings?.value?.sectionIdFilter ?? [];\n\n let newRowIdFilter =\n compListingSelectedSectionSettings?.value?.rowIdFilter ?? [];\n\n const newSectionRowIdFilter =\n compListingSelectedSectionSettings?.value?.sectionRowIdFilter ?? {};\n\n // If every section passed in already exists in prevSections then we should remove them entirely\n const completelyOverlap = sections.every((section) =>\n newSectionIdFilter.includes(section.id)\n );\n\n if (completelyOverlap && flipOnSameSections) {\n const sectionIdsToRemove = new Set(\n sections.map((section) => section.id)\n );\n\n newSectionIdFilter = newSectionIdFilter.filter(\n (id) => !sectionIdsToRemove.has(id)\n );\n\n // Remove all associated rows as well\n const rowIdsToRemove = sections\n .map((section) => section.rows.map((r) => r.id))\n .flat();\n\n const rowIdsToRemoveSet = new Set(rowIdsToRemove);\n\n newRowIdFilter = newRowIdFilter.filter(\n (rowId) => !rowIdsToRemoveSet.has(rowId)\n );\n\n // Update sectionRowIdFilters to remove the sections that have been removed\n sections.forEach((section) => {\n if (section.id in newSectionRowIdFilter) {\n delete newSectionRowIdFilter[section.id];\n }\n });\n } else {\n // Upsert of the new sections\n sections.forEach((section) => {\n if (section.id in newSectionRowIdFilter) {\n return;\n }\n\n newSectionIdFilter.push(section.id);\n if (hasDefaultFilterRowsFeature && listing && listing.seating?.row) {\n const { seating: listingSeating } = listing;\n const listingRow = listingSeating.row!;\n\n const matchingRow = section.rows.find(\n ({ id, name }) =>\n id === listingSeating.rowId ||\n name?.toLowerCase() === listingRow.toLowerCase()\n );\n\n if (matchingRow) {\n // Remove all the row filters associated with the section id\n const sectionRowIds = section.rows.map((r) => r.id);\n newRowIdFilter = [\n ...newRowIdFilter.filter(\n (rowId) => !sectionRowIds.includes(rowId)\n ),\n ];\n\n // Exclude all rows from section if the matching row has no ordinal\n if (matchingRow.ordinal == null) {\n newSectionRowIdFilter[section.id] = matchingRow.id.toString();\n return;\n }\n\n // Push all the row ids with an ordinal less than or equal to the matching row\n section.rows.forEach((row) => {\n if (row.ordinal == null || matchingRow.ordinal == null) return;\n if (row.ordinal <= matchingRow.ordinal) {\n newRowIdFilter.push(row.id);\n }\n });\n\n // Only store the highest ordinal row id to display in the pill\n newSectionRowIdFilter[section.id] = matchingRow.id.toString();\n }\n } else {\n // If listing or seating info is not present, add all the section rows as a filter\n const newRowIds = section.rows.map((r) => r.id);\n newRowIds.forEach((newRowId) => {\n if (!newRowIdFilter.includes(newRowId)) {\n newRowIdFilter.push(newRowId);\n }\n });\n }\n });\n }\n\n const compListingSelectedSectionSettingsNew = {\n sectionIdFilter: newSectionIdFilter,\n rowIdFilter: newRowIdFilter,\n sectionRowIdFilter: newSectionRowIdFilter,\n };\n\n applySectionRowFilterCompListingChanges(\n newSectionIdFilter,\n sections,\n compListingSelectedSectionSettingsNew\n );\n },\n [\n applySectionRowFilterCompListingChanges,\n compListingSelectedSectionSettings,\n hasDefaultFilterRowsFeature,\n listing,\n ]\n );\n\n const onCompListingModeChange = useCallback(\n (mode: AutoPricingCompListingMode | null) => {\n if (!mode) {\n onCompListingChange({\n compListingModeNew: null,\n compListingFloorNew: null,\n compListingCeilingNew: null,\n });\n return;\n }\n\n onCompListingChange({\n compListingModeNew: mode,\n // Reset flag on mode change\n compListingOnlyForSameZoneEnabledNew: false,\n compListingOnlyForSelectedSectionsEnabledNew: false,\n });\n\n if (mode === AutoPricingCompListingMode.ParentListing) {\n onUndercutChange(AutoPricingUndercutMode.Simple);\n }\n },\n [onCompListingChange, onUndercutChange]\n );\n\n const onUpdateNetProceedsFloorAdjustment = useCallback(\n (input: {\n isRelative?: boolean;\n adjustmentAmount?: number | null;\n adjustmentType?: PricingFloorCeilingAdjustmentType;\n }) => {\n if (isEmpty(input)) {\n setValue('netProceedsFloorAdjustmentAmount', null);\n setValue('netProceedsFloorAdjustmentRelative', false);\n setValue('netProceedsFloorAdjustmentType', null);\n }\n const { isRelative, adjustmentAmount, adjustmentType } = input;\n if (isRelative !== undefined) {\n setValue('netProceedsFloorAdjustmentRelative', isRelative);\n }\n if (adjustmentAmount !== undefined) {\n setValue('netProceedsFloorAdjustmentAmount', adjustmentAmount);\n }\n if (adjustmentType !== undefined) {\n setValue('netProceedsFloorAdjustmentType', adjustmentType);\n }\n },\n [setValue]\n );\n\n return {\n uiCurrency,\n autoPricingEnabled,\n event,\n\n ...circuitBreakerSettings,\n ...compListingSettings,\n ...undercutSettings,\n ...outlierSettings,\n\n netProceedsFloor,\n netProceedsCeiling,\n netProceedsFloorAdjustmentAmount,\n netProceedsFloorAdjustmentRelative,\n netProceedsFloorAdjustmentType,\n includeExistingSelectedSections,\n\n onUndercutChange,\n onCompListingChange,\n onCircuitBreakerChange,\n onOutlierChange,\n onCompListingSectionIdFilterChange,\n onCompListingSectionZoneChange,\n onCompListingModeChange,\n onUpdateNetProceedsFloorAdjustment,\n };\n};\n","import clsx from 'clsx';\nimport { ButtonWithIcon } from 'src/components/Buttons';\nimport { Stack } from 'src/core/ui';\nimport { ReloadIcon, WarningOutlineIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport * as styles from './AutoPricingSettings.css';\n\nconst PricingSettingStatus: React.FC<\n Pick\n> = ({ hasChange, hasConflict, onReset }) => {\n if (!hasChange && !hasConflict) {\n return undefined;\n }\n\n return (\n \n ) : (\n \n )\n }\n textContentId={hasChange ? ContentId.Edited : ContentId.Conflict}\n disabled={!hasChange}\n onClick={hasChange ? onReset : undefined}\n titleContentId={hasChange ? ContentId.Reset : undefined}\n />\n );\n};\n\ntype PricingSettingProps = {\n header: React.ReactNode;\n detail: React.ReactNode;\n status?: React.ReactNode;\n isHeader?: boolean;\n hasConflict?: boolean;\n hasChange?: boolean;\n onReset?: () => void;\n headerStyle?: React.CSSProperties;\n};\n\nexport const PricingSetting: React.FC = ({\n isHeader,\n header,\n detail,\n status,\n hasChange,\n hasConflict,\n onReset,\n headerStyle,\n}) => {\n return (\n \n
    \n {header}\n
    \n
    {detail}
    \n
    \n {status ?? (\n \n )}\n
    \n \n );\n};\n","import React, { useCallback, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Switch } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { posField } from 'src/utils/posFieldUtils';\nimport { ListingDetailsAutoPricingSectionUpdatesV2 } from 'src/WebApiController';\n\nimport {\n AutoPricingSettingsInput,\n PricingSettingsComponent,\n} from '../BulkEditAutoPricingSettingsDialog.types';\nimport { useAutoPricingSettings } from '../useBulkAutoPricingSettings';\nimport { PricingSetting } from './PricingSetting';\n\ntype AutoPricingEnabledSettingProps = {\n origin: Pick;\n};\n\nexport const AutoPricingEnabledSetting: React.FC<\n AutoPricingEnabledSettingProps\n> = ({ origin }) => {\n const { header, settings, hasConflict, hasChange, onReset } =\n useAutoPricingEnabled(origin);\n\n return (\n \n );\n};\n\nexport const useAutoPricingEnabled = (\n origin: Pick\n): PricingSettingsComponent => {\n const { autoPricingEnabled } = useAutoPricingSettings();\n\n const { setValue } =\n useFormContext();\n\n const hasChange = useMemo(\n () => origin.autoPricingEnabled?.value !== autoPricingEnabled?.value,\n [autoPricingEnabled?.value, origin.autoPricingEnabled?.value]\n );\n\n const onReset = useCallback(() => {\n setValue(\n 'autoPricingEnabled',\n posField(origin.autoPricingEnabled.value, false)\n );\n }, [setValue, origin.autoPricingEnabled?.value]);\n\n const onUpdateAutoPricingEnabled = useCallback(\n (isChecked: boolean) => {\n if (isChecked !== autoPricingEnabled?.value) {\n const changed = isChecked !== origin.autoPricingEnabled?.value;\n setValue('autoPricingEnabled', posField(isChecked, changed));\n }\n },\n [autoPricingEnabled?.value, origin.autoPricingEnabled?.value, setValue]\n );\n\n return {\n header: ,\n settings: (\n e.stopPropagation()}\n onCheckedChange={onUpdateAutoPricingEnabled}\n />\n ),\n fromDisplay: origin.autoPricingEnabled?.value + '',\n toDisplay: autoPricingEnabled?.value + '',\n hasConflict: origin.autoPricingEnabled.hasConflict,\n hasChange,\n onReset,\n };\n};\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport const Divider = styled.div`\n border-bottom: 1px solid ${(props) => props.theme.colors.borderPrimary};\n width: 100%;\n padding-bottom: ${() => vars.spacing.sm};\n`;\n","import { Content } from 'src/contexts/ContentContext';\nimport { Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { Divider } from '../AutoPricingSettings.styled';\nimport * as styles from './SettingsSubheader.css';\n\ntype PricingSubheaderProps = {\n title: ContentId;\n};\n\nexport const SettingsSubheader: React.FC = ({\n title,\n}) => {\n return (\n \n \n
    \n \n
    \n
    \n );\n};\n","import { useCallback, useMemo, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { Stack, Switch } from 'src/core/ui';\nimport { ToggleGroup } from 'src/core/ui/ToggleGroup';\nimport { useUserHasAutopricingFeature } from 'src/hooks/useUserHasAutopricingFeature';\nimport {\n OUTLIER_MODE_KTH_LOWEST_STRATEGY,\n OutlierModeKthLowestStrategy,\n} from 'src/utils/autoPricingUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { STANDARD_DEVIATIONS_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { roundToPrecision } from 'src/utils/numberFormatter';\nimport { posField } from 'src/utils/posFieldUtils';\nimport {\n AutoPricingOutlierMode,\n Feature,\n ListingDetailsAutoPricingSectionUpdatesV2,\n} from 'src/WebApiController';\n\nimport { AutoPricingSettingsInput } from '../../BulkEditAutoPricingSettingsDialog.types';\nimport { useAutoPricingSettings } from '../../useBulkAutoPricingSettings';\nimport { PricingSetting } from '../PricingSetting';\nimport { SettingsSubheader } from '../PricingSubheader';\nimport * as styles from './PricingAdvancedSettings.css';\ntype PricingAdvancedSettingsProps = {\n origin: Pick<\n AutoPricingSettingsInput,\n | 'outlierMode'\n | 'outlierKthLowestLimit'\n | 'outlierStandardDeviations'\n | 'outlierKthLowestLimitRelativeSpacing'\n | 'outlierKthLowestLimitAbsoluteSpacing'\n | 'compListingExcludeDefects'\n | 'compListingExcludeFanInventory'\n | 'circuitBreakerMaxDiscountVelocityPercent'\n | 'circuitBreakerMaxDiscountVelocityTicksInHours'\n >;\n outlierModes: Record;\n outlierModesDisabled: Record;\n};\n\nexport const PricingAdvancedSettings: React.FC<\n PricingAdvancedSettingsProps\n> = ({ origin, outlierModes, outlierModesDisabled }) => {\n const {\n outlierMode,\n outlierKthLowestLimit,\n outlierStandardDeviations,\n outlierKthLowestLimitRelativeSpacing,\n outlierKthLowestLimitAbsoluteSpacing,\n compListingExcludeFanInventory,\n compListingExcludeDefects,\n circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerMaxDiscountVelocityTicksInHours,\n onOutlierChange,\n onCircuitBreakerChange,\n onCompListingChange,\n } = useAutoPricingSettings();\n const { setValue } =\n useFormContext();\n\n const hasExcludeFanInventoryFeature = useUserHasAutopricingFeature(\n Feature.ExcludeFanInventory\n );\n const hasBulkEditPricingSettingsUpdateFeature = useUserHasAutopricingFeature(\n Feature.BulkEditPricingSettingsUpdate\n );\n\n const [outlierKthLowestStrategy, setKthLowestOutlierStrategy] = useState<\n OutlierModeKthLowestStrategy | undefined\n >(OutlierModeKthLowestStrategy.Relative);\n\n const outlierModeHasChange = useMemo(\n () => outlierMode?.value !== origin.outlierMode.value,\n [outlierMode?.value, origin.outlierMode.value]\n );\n const onResetOutlierMode = useCallback(() => {\n setValue('outlierMode', posField(origin.outlierMode.value));\n setValue(\n 'outlierStandardDeviations',\n posField(origin.outlierStandardDeviations.value)\n );\n setValue(\n 'outlierKthLowestLimit',\n posField(origin.outlierKthLowestLimit.value)\n );\n setValue(\n 'outlierKthLowestLimitRelativeSpacing',\n posField(origin.outlierKthLowestLimitRelativeSpacing.value)\n );\n setValue(\n 'outlierKthLowestLimitAbsoluteSpacing',\n posField(origin.outlierKthLowestLimitAbsoluteSpacing.value)\n );\n }, [\n origin.outlierKthLowestLimit.value,\n origin.outlierKthLowestLimitAbsoluteSpacing.value,\n origin.outlierKthLowestLimitRelativeSpacing.value,\n origin.outlierMode.value,\n origin.outlierStandardDeviations.value,\n setValue,\n ]);\n\n const standardDeviationsHasChange = useMemo(\n () =>\n origin.outlierStandardDeviations.value !==\n (outlierStandardDeviations?.value ?? null),\n [origin.outlierStandardDeviations?.value, outlierStandardDeviations?.value]\n );\n const onResetStandardDeviations = useCallback(() => {\n setValue('outlierMode', posField(origin.outlierMode.value));\n setValue(\n 'outlierStandardDeviations',\n posField(origin.outlierStandardDeviations.value)\n );\n }, [\n origin.outlierMode.value,\n origin.outlierStandardDeviations.value,\n setValue,\n ]);\n\n const kthLowestOutlierHasChange = useMemo(\n () =>\n origin.outlierKthLowestLimit.value !== outlierKthLowestLimit?.value ||\n origin.outlierKthLowestLimitRelativeSpacing.value !==\n outlierKthLowestLimitRelativeSpacing?.value ||\n origin.outlierKthLowestLimitAbsoluteSpacing.value !==\n outlierKthLowestLimitAbsoluteSpacing?.value,\n [\n origin.outlierKthLowestLimit.value,\n origin.outlierKthLowestLimitAbsoluteSpacing.value,\n origin.outlierKthLowestLimitRelativeSpacing.value,\n outlierKthLowestLimit?.value,\n outlierKthLowestLimitAbsoluteSpacing?.value,\n outlierKthLowestLimitRelativeSpacing?.value,\n ]\n );\n const onResetKthLowestOutlier = useCallback(() => {\n setValue(\n 'outlierKthLowestLimit',\n posField(origin.outlierKthLowestLimit.value)\n );\n setValue(\n 'outlierKthLowestLimitRelativeSpacing',\n posField(origin.outlierKthLowestLimitRelativeSpacing.value)\n );\n setValue(\n 'outlierKthLowestLimitAbsoluteSpacing',\n posField(origin.outlierKthLowestLimitAbsoluteSpacing.value)\n );\n }, [\n origin.outlierKthLowestLimit.value,\n origin.outlierKthLowestLimitAbsoluteSpacing.value,\n origin.outlierKthLowestLimitRelativeSpacing.value,\n setValue,\n ]);\n\n const circuitBreakerHasChange = useMemo(\n () =>\n origin.circuitBreakerMaxDiscountVelocityPercent.value !==\n circuitBreakerMaxDiscountVelocityPercent?.value ||\n origin.circuitBreakerMaxDiscountVelocityTicksInHours.value !==\n circuitBreakerMaxDiscountVelocityTicksInHours?.value,\n [\n circuitBreakerMaxDiscountVelocityPercent?.value,\n circuitBreakerMaxDiscountVelocityTicksInHours?.value,\n origin.circuitBreakerMaxDiscountVelocityPercent.value,\n origin.circuitBreakerMaxDiscountVelocityTicksInHours.value,\n ]\n );\n const onResetCircuitBreaker = useCallback(() => {\n setValue(\n 'circuitBreakerMaxDiscountVelocityPercent',\n posField(origin.circuitBreakerMaxDiscountVelocityPercent.value)\n );\n setValue(\n 'circuitBreakerMaxDiscountVelocityTicksInHours',\n posField(origin.circuitBreakerMaxDiscountVelocityTicksInHours.value)\n );\n }, [\n origin.circuitBreakerMaxDiscountVelocityPercent.value,\n origin.circuitBreakerMaxDiscountVelocityTicksInHours.value,\n setValue,\n ]);\n\n return (\n <>\n \n {hasBulkEditPricingSettingsUpdateFeature && (\n <>\n {hasExcludeFanInventoryFeature && (\n }\n detail={\n e.stopPropagation()}\n onCheckedChange={(isChecked) => {\n const compListingExcludeFanInventoryNew = isChecked;\n if (\n compListingExcludeFanInventoryNew !==\n compListingExcludeFanInventory?.value\n ) {\n onCompListingChange({\n compListingExcludeFanInventoryNew,\n });\n }\n }}\n />\n }\n hasChange={\n compListingExcludeFanInventory?.value !==\n origin.compListingExcludeFanInventory.value\n }\n hasConflict={origin.compListingExcludeFanInventory?.hasConflict}\n onReset={() =>\n setValue(\n 'compListingExcludeFanInventory',\n posField(origin.compListingExcludeFanInventory.value)\n )\n }\n />\n )}\n }\n detail={\n e.stopPropagation()}\n onCheckedChange={(isChecked) => {\n const compListingExcludeDefectsNew = !isChecked;\n if (\n compListingExcludeDefectsNew !==\n compListingExcludeDefects?.value\n ) {\n onCompListingChange({ compListingExcludeDefectsNew });\n }\n }}\n />\n }\n hasChange={\n compListingExcludeDefects?.value !==\n origin.compListingExcludeDefects.value\n }\n hasConflict={origin.compListingExcludeDefects?.hasConflict}\n onReset={() =>\n setValue(\n 'compListingExcludeDefects',\n posField(origin.compListingExcludeDefects.value)\n )\n }\n />\n \n )}\n\n }\n detail={\n e.stopPropagation()}\n onChange={(v) => {\n onOutlierChange({\n outlierModeNew: v as AutoPricingOutlierMode,\n });\n }}\n style={{ width: '50%' }}\n />\n }\n hasChange={outlierModeHasChange}\n hasConflict={origin.outlierMode?.hasConflict}\n onReset={onResetOutlierMode}\n />\n {outlierMode?.value === AutoPricingOutlierMode.StandardDeviations ? (\n }\n detail={\n e.stopPropagation()}\n onChange={(v) => {\n const value = parseInt(v ?? '');\n if (value != null && !isNaN(value)) {\n onOutlierChange({\n outlierModeNew: AutoPricingOutlierMode.StandardDeviations,\n outlierStandardDeviationsNew: value,\n });\n } else {\n onOutlierChange({\n outlierModeNew: AutoPricingOutlierMode.StandardDeviations,\n outlierStandardDeviationsNew: null,\n });\n }\n }}\n style={{ width: '50%' }}\n />\n }\n hasChange={standardDeviationsHasChange}\n hasConflict={origin.outlierStandardDeviations?.hasConflict}\n onReset={onResetStandardDeviations}\n />\n ) : outlierMode?.value == AutoPricingOutlierMode.KthLowest ? (\n }\n detail={\n \n {\n const v = parseInt(e.target.value);\n onOutlierChange({\n outlierModeNew: AutoPricingOutlierMode.KthLowest,\n outlierKthLowestLimitNew: v,\n });\n }}\n />\n \n {outlierKthLowestStrategy ==\n OutlierModeKthLowestStrategy.Relative ? (\n {\n let v = parseInt(e.target.value);\n if (v < 0) {\n v = 0;\n } else if (v > 100) {\n v = 100;\n }\n\n if (!isNaN(v)) {\n onOutlierChange({\n outlierModeNew: AutoPricingOutlierMode.KthLowest,\n outlierKthLowestLimitNew: undefined,\n outlierKthLowestLimitAbsoluteSpacingNew: null,\n outlierKthLowestLimitRelativeSpacingNew: v,\n });\n }\n }}\n />\n ) : (\n {\n const v = parseInt(e.target.value);\n onOutlierChange({\n outlierModeNew: AutoPricingOutlierMode.KthLowest,\n outlierKthLowestLimitNew: undefined,\n outlierKthLowestLimitAbsoluteSpacingNew: v,\n outlierKthLowestLimitRelativeSpacingNew: null,\n });\n }}\n />\n )}\n {\n if (!value) {\n return;\n }\n\n const strat = value as OutlierModeKthLowestStrategy;\n setKthLowestOutlierStrategy(strat);\n }}\n />\n \n \n }\n hasChange={kthLowestOutlierHasChange}\n hasConflict={\n origin.outlierKthLowestLimitAbsoluteSpacing?.hasConflict ||\n origin.outlierKthLowestLimitRelativeSpacing?.hasConflict\n }\n onReset={onResetKthLowestOutlier}\n />\n ) : null}\n {!hasBulkEditPricingSettingsUpdateFeature && (\n }\n detail={\n \n {\n const v = parseFloat(e.target.value) / 100;\n onCircuitBreakerChange(\n undefined,\n undefined,\n v,\n undefined,\n undefined\n );\n }}\n />\n \n {\n const v = parseInt(e.target.value);\n onCircuitBreakerChange(\n undefined,\n undefined,\n undefined,\n v,\n undefined\n );\n }}\n />\n \n \n }\n hasChange={circuitBreakerHasChange}\n hasConflict={\n origin.circuitBreakerMaxDiscountVelocityPercent?.hasConflict ||\n origin.circuitBreakerMaxDiscountVelocityTicksInHours?.hasConflict\n }\n onReset={onResetCircuitBreaker}\n />\n )}\n \n );\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { PricingClient } from 'src/WebApiController';\n\nimport { useAppContext } from '../AppContext';\nimport { ErrorTypes, useErrorBoundaryContext } from '../ErrorBoundaryContext';\n\nexport const useGetVenueZoneMapConfigInfo = (\n eventId?: number | null,\n configId?: number | null,\n disabled?: boolean\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const { trackError } = useErrorBoundaryContext();\n\n const shouldQuery =\n !disabled &&\n activeAccountWebClientConfig.activeAccountId != null &&\n eventId != null &&\n configId != null;\n\n const venueMapZoneInfoQuery = useQuery({\n queryKey: [\n 'PricingClient.GetVenueMapZoneConfigInfo',\n activeAccountWebClientConfig.activeAccountId,\n eventId,\n disabled,\n ],\n queryFn: async () => {\n if (!shouldQuery) {\n return null;\n }\n\n const venueMapZoneInfo = await new PricingClient(\n activeAccountWebClientConfig\n ).getVenueMapZoneConfigInfo(eventId!, configId!);\n\n return venueMapZoneInfo;\n },\n\n enabled: shouldQuery,\n staleTime: Infinity,\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError('PricingClient.GetVenueMapZoneConfigInfo', error, {\n eventId,\n configId,\n });\n },\n },\n });\n\n return venueMapZoneInfoQuery;\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { PricingClient } from 'src/WebApiController';\n\nimport { useAppContext } from '../AppContext';\nimport { ErrorTypes, useErrorBoundaryContext } from '../ErrorBoundaryContext';\n\nexport const useGetVenueZoneMapInfoOverrides = (\n eventId?: number | null,\n configId?: number | null,\n disabled?: boolean\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const { trackError } = useErrorBoundaryContext();\n\n const shouldQuery =\n !disabled &&\n activeAccountWebClientConfig.activeAccountId != null &&\n eventId != null &&\n configId != null;\n\n const venueMapZoneInfoOverrideQuery = useQuery({\n queryKey: [\n 'PricingClient.GetVenueMapZoneInfoOverrides',\n activeAccountWebClientConfig.activeAccountId,\n eventId,\n disabled,\n ],\n queryFn: async () => {\n if (!shouldQuery) {\n return null;\n }\n\n const venueMapZoneInfoOverrides = await new PricingClient(\n activeAccountWebClientConfig\n ).getVenueMapZoneInfoOverrides(eventId!, configId!);\n\n return venueMapZoneInfoOverrides;\n },\n\n enabled: shouldQuery,\n staleTime: Infinity,\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError('PricingClient.GetVenueMapZoneInfoOverrides', error, {\n eventId,\n configId,\n });\n },\n },\n });\n\n return venueMapZoneInfoOverrideQuery;\n};\n","import { useFormContext } from 'react-hook-form';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ROW_COMP_SETTING_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { ListingDetailsAutoPricingSectionUpdatesV2 } from 'src/WebApiController';\n\nimport * as styles from '../AutoPricingSettings.css';\nimport { PricingSetting } from '../PricingSetting';\n\nexport const RowComp = () => {\n const { watch, setValue } =\n useFormContext();\n const rowCompOffset = watch('rowCompOffset');\n\n return (\n }\n detail={\n \n {Object.entries(ROW_COMP_SETTING_TO_CID).map(\n ([option, contentId]) => {\n return (\n \n \n setValue('rowCompOffset', parseInt(e.target.value))\n }\n className={styles.hiddenRadio}\n />\n \n \n );\n }\n )}\n \n }\n hasChange={rowCompOffset != 0}\n hasConflict={false}\n onReset={() => setValue('rowCompOffset', 0)}\n />\n );\n};\n","import clsx from 'clsx';\nimport { isEqual } from 'lodash-es';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Button } from 'reactstrap';\nimport { ButtonWithIcon } from 'src/components/Buttons';\nimport { FilterPillList } from 'src/components/common/FilterPill';\nimport { EventVenueMap } from 'src/components/Events/VenueMap/EventVenueMap';\nimport { createGetColor } from 'src/components/Listings/InventoryEventPage/utils/colorUtils';\nimport {\n Content,\n getContent,\n useContent,\n useContentContext,\n} from 'src/contexts/ContentContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { useGetVenueZoneMapConfigInfo } from 'src/contexts/EventMapContext/useGetVenueZoneMapConfigInfo';\nimport { useGetVenueZoneMapInfoOverrides } from 'src/contexts/EventMapContext/useGetVenueZoneMapConfigInfoOverrides';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosMultiSelect } from 'src/core/POS/PosMultiSelect';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { Stack, Switch, Tooltip, TooltipPopover } from 'src/core/ui';\nimport { PillItem } from 'src/core/ui/PillList/PillItem';\nimport { ToggleGroup } from 'src/core/ui/ToggleGroup';\nimport { SectionSelectDialog } from 'src/dialogs/SectionSelectDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useCompQuantitiesFilter } from 'src/hooks/useCompQuantitiesFilter';\nimport { useGetEventAutoPricingSettings } from 'src/hooks/useGetEventAutoPricingSettings';\nimport { useUndercutAmountSettings } from 'src/hooks/useUndercutAmountSettings';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { EditIcon, IconsFill, InfoOutlineIcon } from 'src/svgs/Viagogo';\nimport {\n getUndercutPriceRepresentingMode,\n UNDERCUT_PRICE_MODE_OPTIONS,\n UndercutPriceSettingsMode,\n} from 'src/utils/autoPricingUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { VENUE_ZONE_CONFIG_TYPE_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { roundToPrecision } from 'src/utils/numberFormatter';\nimport {\n Feature,\n ListingDetailsAutoPricingSectionUpdatesV2,\n SectionSectionGroup,\n} from 'src/WebApiController';\n\nimport { AutoPricingSettingsInput } from '../../BulkEditAutoPricingSettingsDialog.types';\nimport { useAutoPricingSettings } from '../../useBulkAutoPricingSettings';\nimport * as styles from '../AutoPricingSettings.css';\nimport { PricingSetting } from '../PricingSetting';\nimport { SettingsSubheader } from '../PricingSubheader';\nimport { RowComp } from './RowComp';\n\ntype PricingAgainstProps = {\n origin: Pick<\n AutoPricingSettingsInput,\n | 'compListingMode'\n | 'compListingQuantityScoreAdjustmentEnabled'\n | 'compListingQuantityScoreAdjustmentOverrideJson'\n | 'compListingOnlyForSelectedSectionsEnabled'\n | 'compListingSelectedSectionSettings'\n | 'undercutAbsoluteAmount'\n | 'undercutRelativeAmount'\n >;\n compListingModes: Record;\n compListingModesDisabled: Record;\n canUseZoneMap?: boolean;\n};\n\nexport const PricingAgainst: React.FC = ({\n origin,\n compListingModes,\n compListingModesDisabled,\n canUseZoneMap,\n}) => {\n const {\n uiCurrency,\n compListingMode,\n compListingQuantityScoreAdjustmentOverrideJson,\n compListingSelectedSectionSettings,\n undercutMode,\n undercutRelativeAmount,\n undercutAbsoluteAmount,\n includeExistingSelectedSections,\n onCompListingChange,\n onUndercutChange,\n onCompListingSectionIdFilterChange,\n onCompListingModeChange,\n } = useAutoPricingSettings();\n\n const hasAllowSeatScoreCompListingModeFeature = useUserHasFeature(\n Feature.AllowSeatScoreCompListingMode\n );\n\n const { watch, setValue, formState } =\n useFormContext();\n\n const { event, venueMapInfo } = useEventMapContext();\n const contentContext = useContentContext();\n\n const [overrideLookup, setOverrideLookup] = useState<\n | {\n [key: string]: SectionSectionGroup;\n }\n | null\n | undefined\n >(null);\n\n const [defaultLookup, setDefaultLookup] = useState<\n | {\n [key: string]: SectionSectionGroup;\n }\n | null\n | undefined\n >(null);\n\n const { pricingSettingsQuery } = useGetEventAutoPricingSettings(\n event ?? null,\n false\n );\n\n const venueZoneMapConfigInfoQuery = useGetVenueZoneMapConfigInfo(\n event?.viagId,\n event?.venueCfgId\n );\n\n const venueZoneMapConfigOverrideInfoQuery = useGetVenueZoneMapInfoOverrides(\n event?.viagId,\n event?.venueCfgId\n );\n\n const selectedOverrideId = pricingSettingsQuery.data?.venueZoneOverrideId;\n const defaultConfig =\n pricingSettingsQuery.data?.venueZoneConfigType ??\n venueZoneMapConfigInfoQuery.data?.defaultVenueZoneConfigType;\n\n const venueNameFromQuery = useMemo(() => {\n if (\n selectedOverrideId != null &&\n venueZoneMapConfigOverrideInfoQuery.data &&\n venueZoneMapConfigOverrideInfoQuery.data[selectedOverrideId]?.name != null\n ) {\n return venueZoneMapConfigOverrideInfoQuery.data[selectedOverrideId].name;\n }\n\n if (\n defaultConfig != null &&\n venueZoneMapConfigInfoQuery.data?.venueMapZoneConfigs[defaultConfig]\n ) {\n return getContent(\n VENUE_ZONE_CONFIG_TYPE_TO_CID[defaultConfig],\n contentContext\n );\n }\n }, [\n contentContext,\n defaultConfig,\n selectedOverrideId,\n venueZoneMapConfigInfoQuery.data?.venueMapZoneConfigs,\n venueZoneMapConfigOverrideInfoQuery.data,\n ]);\n\n const currentVenueName = watch('venueZoneMapName');\n\n useEffect(() => {\n if (\n overrideLookup == null &&\n selectedOverrideId != null &&\n venueZoneMapConfigOverrideInfoQuery.data &&\n venueZoneMapConfigOverrideInfoQuery.data[selectedOverrideId] &&\n !venueZoneMapConfigOverrideInfoQuery.isLoading\n ) {\n setOverrideLookup(\n venueZoneMapConfigOverrideInfoQuery.data[selectedOverrideId]\n .sectionSectionGroupLookup\n );\n }\n }, [\n overrideLookup,\n selectedOverrideId,\n venueZoneMapConfigOverrideInfoQuery.data,\n venueZoneMapConfigOverrideInfoQuery.isLoading,\n setValue,\n ]);\n\n useEffect(() => {\n if (\n defaultLookup == null &&\n defaultConfig != null &&\n venueZoneMapConfigInfoQuery.data &&\n !venueZoneMapConfigInfoQuery.isLoading\n ) {\n setDefaultLookup(\n venueZoneMapConfigInfoQuery.data.venueMapZoneConfigs[defaultConfig]\n );\n }\n }, [\n defaultLookup,\n defaultConfig,\n venueZoneMapConfigInfoQuery.data,\n venueZoneMapConfigInfoQuery.isLoading,\n contentContext,\n setValue,\n ]);\n\n useEffect(() => {\n if (venueNameFromQuery && currentVenueName !== venueNameFromQuery) {\n setValue('venueZoneMapName', venueNameFromQuery);\n }\n }, [currentVenueName, venueNameFromQuery, setValue]);\n\n const sectionSectionGroupLookup = useMemo(() => {\n return overrideLookup ?? defaultLookup;\n }, [overrideLookup, defaultLookup]);\n\n const [mapOverlay, setMapOverlay] = useState(true);\n\n const deriveCompsFromVenueZoneConfig = watch(\n 'deriveCompsFromVenueZoneConfig'\n );\n const includeBetterZones = watch('includeBetterZones');\n\n const toggleZoneMap = useCallback(() => {\n setMapOverlay((prev) => !prev);\n }, []);\n\n const viewZoneMapText = useContent(ContentId.ViewZoneMap);\n const hideZoneMapText = useContent(ContentId.HideZoneMap);\n\n const buttonText = useMemo(\n () => (mapOverlay ? viewZoneMapText : hideZoneMapText),\n [hideZoneMapText, mapOverlay, viewZoneMapText]\n );\n\n const sectionSelectDialog = useBasicDialog();\n\n const {\n quantitiesFilterOptions,\n quantitiesFilterValue,\n onUpdateQuantitiesFilter,\n } = useCompQuantitiesFilter(\n compListingQuantityScoreAdjustmentOverrideJson?.value,\n onCompListingChange\n );\n\n const {\n undercutAbsoluteAmountMode,\n setUndercutAbsoluteAmountMode,\n undercutRelativeAmountMode,\n setUndercutRelativeAmountMode,\n } = useUndercutAmountSettings(\n undercutAbsoluteAmount?.value,\n undercutRelativeAmount?.value\n );\n\n const onResetCompListingMode = useCallback(() => {\n onCompListingChange({\n compListingModeNew: origin.compListingMode.value,\n compListingQuantityScoreAdjustmentEnabledNew:\n origin.compListingQuantityScoreAdjustmentEnabled.value,\n compListingOnlyForSelectedSectionsEnabledNew:\n origin.compListingOnlyForSelectedSectionsEnabled?.value,\n compListingSelectedSectionSettingsNew:\n origin.compListingSelectedSectionSettings?.value,\n });\n }, [\n onCompListingChange,\n origin.compListingMode.value,\n origin.compListingOnlyForSelectedSectionsEnabled?.value,\n origin.compListingQuantityScoreAdjustmentEnabled.value,\n origin.compListingSelectedSectionSettings?.value,\n ]);\n\n const selectedSectionsHasChange = useMemo(\n () =>\n !isEqual(\n origin.compListingSelectedSectionSettings?.value,\n compListingSelectedSectionSettings?.value\n ) ||\n (origin.compListingSelectedSectionSettings?.hasConflict &&\n !includeExistingSelectedSections),\n [\n compListingSelectedSectionSettings?.value,\n includeExistingSelectedSections,\n origin.compListingSelectedSectionSettings?.hasConflict,\n origin.compListingSelectedSectionSettings?.value,\n ]\n );\n const onResetSelectedSections = useCallback(() => {\n onCompListingChange({\n compListingOnlyForSelectedSectionsEnabledNew:\n origin.compListingOnlyForSelectedSectionsEnabled?.value,\n compListingSelectedSectionSettingsNew:\n origin.compListingSelectedSectionSettings?.value,\n });\n setValue(\n 'includeExistingSelectedSections',\n formState.defaultValues?.includeExistingSelectedSections ?? null\n );\n }, [\n formState.defaultValues?.includeExistingSelectedSections,\n onCompListingChange,\n origin.compListingOnlyForSelectedSectionsEnabled?.value,\n origin.compListingSelectedSectionSettings?.value,\n setValue,\n ]);\n const onResetZoneMapOption = useCallback(() => {\n onResetSelectedSections();\n\n setValue('deriveCompsFromVenueZoneConfig', false);\n setValue('includeBetterZones', false);\n setValue(\n 'includeExistingSelectedSections',\n formState.defaultValues?.includeExistingSelectedSections ?? null\n );\n }, [\n formState.defaultValues?.includeExistingSelectedSections,\n onResetSelectedSections,\n setValue,\n ]);\n\n const quantitiesFilterHasChange = useMemo(\n () =>\n origin.compListingQuantityScoreAdjustmentOverrideJson?.value !==\n compListingQuantityScoreAdjustmentOverrideJson?.value,\n [\n compListingQuantityScoreAdjustmentOverrideJson?.value,\n origin.compListingQuantityScoreAdjustmentOverrideJson?.value,\n ]\n );\n const onResetQuantitiesFilter = useCallback(\n () =>\n onCompListingChange({\n compListingQuantityScoreAdjustmentOverrideJsonNew:\n origin.compListingQuantityScoreAdjustmentOverrideJson?.value,\n }),\n [\n onCompListingChange,\n origin.compListingQuantityScoreAdjustmentOverrideJson?.value,\n ]\n );\n\n const undercutAmountHasChange = useMemo(\n () =>\n origin.undercutAbsoluteAmount?.value !== undercutAbsoluteAmount?.value ||\n origin.undercutRelativeAmount?.value !== undercutRelativeAmount?.value,\n [\n origin.undercutAbsoluteAmount?.value,\n origin.undercutRelativeAmount?.value,\n undercutAbsoluteAmount?.value,\n undercutRelativeAmount?.value,\n ]\n );\n const onResetUndercutAmount = useCallback(\n () =>\n onUndercutChange(\n undefined,\n origin.undercutAbsoluteAmount?.value,\n origin.undercutRelativeAmount?.value\n ),\n [\n onUndercutChange,\n origin.undercutAbsoluteAmount?.value,\n origin.undercutRelativeAmount?.value,\n ]\n );\n\n const existingSectionsText = useContent(ContentId.ExistingSections);\n const editSections = useContent(ContentId.EditSections);\n\n const selectedSections = useMemo(() => {\n const formSectionFilterIds =\n compListingSelectedSectionSettings?.value?.sectionIdFilter ?? [];\n return (\n venueMapInfo?.sections.filter((section) => {\n return formSectionFilterIds.includes(section.id);\n }) ?? []\n );\n }, [\n compListingSelectedSectionSettings?.value?.sectionIdFilter,\n venueMapInfo?.sections,\n ]);\n\n const rowIdFilters = useMemo(() => {\n return compListingSelectedSectionSettings?.value?.rowIdFilter ?? [];\n }, [compListingSelectedSectionSettings]);\n\n const sectionRowIdFilters = useMemo(() => {\n return compListingSelectedSectionSettings?.value?.sectionRowIdFilter ?? {};\n }, [compListingSelectedSectionSettings]);\n\n const applyCompListingChanges = (\n rowIdFilters: number[],\n sectionRowIdFilters: { [x: string]: string }\n ) => {\n const compListingSelectedSectionSettingsNew = {\n sectionIdFilter:\n compListingSelectedSectionSettings?.value?.sectionIdFilter ?? [],\n rowIdFilter: Array.from(new Set(rowIdFilters)),\n sectionRowIdFilter: sectionRowIdFilters,\n };\n\n onCompListingChange({\n compListingSelectedSectionSettingsNew,\n compListingOnlyForSelectedSectionsEnabledNew: true,\n });\n };\n\n return (\n <>\n \n {hasAllowSeatScoreCompListingModeFeature && (\n }\n detail={\n e.stopPropagation()}\n onChange={onCompListingModeChange}\n style={{ width: '50%' }}\n />\n }\n hasChange={origin.compListingMode.value !== compListingMode?.value}\n hasConflict={origin.compListingMode.hasConflict}\n onReset={onResetCompListingMode}\n />\n )}\n\n {event && (\n <>\n {!deriveCompsFromVenueZoneConfig ? (\n \n \n \n \n {canUseZoneMap ? (\n \n setValue(\n 'deriveCompsFromVenueZoneConfig',\n !deriveCompsFromVenueZoneConfig\n )\n }\n >\n {' '}\n \n ) : (\n \n {' '}\n \n }\n contentVariant=\"dark\"\n >\n \n \n )}\n \n }\n detail={\n \n {event && (\n \n }\n onClick={sectionSelectDialog.launchDialog}\n style={{ padding: 0, textAlign: 'start' }}\n />\n )}\n {origin.compListingSelectedSectionSettings?.hasConflict &&\n includeExistingSelectedSections && (\n \n event &&\n setValue('includeExistingSelectedSections', false)\n }\n disabled={!includeExistingSelectedSections}\n />\n )}\n {event && (\n
    \n \n
    \n )}\n
    \n }\n hasChange={selectedSectionsHasChange}\n hasConflict={\n origin.compListingSelectedSectionSettings?.hasConflict\n }\n onReset={onResetSelectedSections}\n />\n ) : (\n <>\n \n \n \n setValue(\n 'deriveCompsFromVenueZoneConfig',\n !deriveCompsFromVenueZoneConfig\n )\n }\n >\n \n \n \n }\n detail={\n
    \n \n \n {currentVenueName}\n \n \n {buttonText}\n \n
    \n \n
    \n \n
    \n \n \n }\n hasChange={true}\n hasConflict={\n origin.compListingSelectedSectionSettings?.hasConflict\n }\n onReset={onResetZoneMapOption}\n />\n \n \n \n }\n contentVariant=\"dark\"\n >\n \n \n \n }\n detail={\n \n setValue('includeBetterZones', !includeBetterZones)\n }\n onCheckedChange={() =>\n setValue('includeBetterZones', !includeBetterZones)\n }\n />\n }\n hasChange={includeBetterZones ?? false}\n hasConflict={false}\n onReset={() => setValue('includeBetterZones', false)}\n />\n \n \n )}\n \n )}\n\n }\n detail={\n \n
    \n \n
    \n
    \n }\n hasChange={quantitiesFilterHasChange}\n hasConflict={\n origin.compListingQuantityScoreAdjustmentOverrideJson?.hasConflict\n }\n onReset={onResetQuantitiesFilter}\n />\n }\n detail={\n \n {\n if (!value) return;\n\n const mode = value as UndercutPriceSettingsMode;\n setUndercutRelativeAmountMode(mode);\n\n if (undercutRelativeAmount?.value) {\n const curAmountAbs = Math.abs(undercutRelativeAmount.value);\n onUndercutChange(\n undefined,\n undefined,\n getUndercutPriceRepresentingMode(curAmountAbs, mode)\n );\n }\n }}\n />\n\n
    \n \n
    \n\n \n {\n const v = parseFloat(e.target.value);\n if (v >= 0 && v <= Number.MAX_VALUE) {\n const relativeValue = Math.min(v, 100) / 100;\n if (\n undercutRelativeAmountMode ===\n UndercutPriceSettingsMode.Premium\n ) {\n onUndercutChange(undefined, undefined, -relativeValue);\n } else {\n onUndercutChange(undefined, undefined, relativeValue);\n }\n } else {\n onUndercutChange(undefined, undefined, null);\n }\n }}\n />\n \n
    \n \n
    \n {\n if (!value) return;\n\n const mode = value as UndercutPriceSettingsMode;\n setUndercutAbsoluteAmountMode(mode);\n\n if (undercutAbsoluteAmount?.value) {\n const curAmountAbs = Math.abs(undercutAbsoluteAmount.value);\n onUndercutChange(\n undefined,\n getUndercutPriceRepresentingMode(curAmountAbs, mode)\n );\n }\n }}\n />\n
    \n \n
    \n \n {\n const v = parseFloat(e.target.value);\n if (v >= 0 && v <= Number.MAX_VALUE) {\n if (\n undercutAbsoluteAmountMode ===\n UndercutPriceSettingsMode.Premium\n ) {\n onUndercutChange(undefined, -v);\n } else {\n onUndercutChange(undefined, v);\n }\n } else {\n onUndercutChange(undefined, null);\n }\n }}\n />\n \n
    \n }\n hasChange={undercutAmountHasChange}\n hasConflict={\n origin.undercutAbsoluteAmount?.hasConflict ||\n origin.undercutRelativeAmount?.hasConflict\n }\n onReset={onResetUndercutAmount}\n />\n {\n const compListingSelectedSectionSettingsNew = {\n ...compListingSelectedSectionSettings?.value,\n sectionIdFilter: selectedSections.map((s) => s.id),\n rowIdFilter:\n compListingSelectedSectionSettings?.value?.rowIdFilter ?? [],\n sectionRowIdFilter:\n compListingSelectedSectionSettings?.value?.sectionRowIdFilter ??\n {},\n };\n onCompListingChange({ compListingSelectedSectionSettingsNew });\n sectionSelectDialog.closeDialog();\n }}\n onClosed={sectionSelectDialog.closeDialog}\n />\n \n );\n};\n","import { isEmpty } from 'lodash-es';\nimport React, {\n forwardRef,\n ReactElement,\n useCallback,\n useMemo,\n useState,\n} from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui/Stack';\nimport { ToggleGroup } from 'src/core/ui/ToggleGroup';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nconst enum RelativeAbsoluteOptions {\n Relative = 'relative',\n Absolute = 'absolute',\n}\n\nconst RelativeAbsoluteGroupOptions = [\n { value: RelativeAbsoluteOptions.Relative, children: '%' },\n { value: RelativeAbsoluteOptions.Absolute, children: '$' },\n];\n\nconst AboveBelowGroupOptions = [\n { value: 'true', children: },\n { value: 'false', children: },\n];\n\ntype FloorAdjustmentInputProps = {\n amount: number | null;\n isRelative?: boolean | null;\n onChange: (value: number | null, isRelative: boolean) => void;\n disabled?: boolean;\n};\n\nexport const FloorAdjustmentInput = forwardRef<\n HTMLInputElement,\n FloorAdjustmentInputProps\n>(function PosCurrencyField(\n { amount, isRelative, onChange, disabled },\n ref\n): ReactElement {\n const [isAbove, setIsAbove] = useState(!!amount && amount > 0);\n\n const onValueChange = useCallback(\n (event: React.ChangeEvent) => {\n const value = parseFloat(event.target.value);\n if (value < 0 || isNaN(value)) {\n onChange(null, !!isRelative);\n return;\n }\n // we can't decrease by 100 or more % because that will result in zero\n if (!isAbove && isRelative && value > 99) {\n return;\n }\n\n const sanitizedValue = isAbove ? value : -value;\n onChange(sanitizedValue, !!isRelative);\n },\n [isAbove, isRelative, onChange]\n );\n\n const onRelativeChange = useCallback(\n (value: string) => {\n if (isEmpty(value)) {\n return;\n }\n const updatedRelative = value === RelativeAbsoluteOptions.Relative;\n onChange(amount, updatedRelative);\n },\n [amount, onChange]\n );\n const onAboveChange = useCallback(\n (value: string) => {\n if (isEmpty(value)) {\n return;\n }\n const updatedIsAbove = value === 'true';\n setIsAbove(updatedIsAbove);\n const sanitizedValue = amount\n ? updatedIsAbove\n ? Math.abs(amount)\n : -Math.abs(amount)\n : null;\n onChange(sanitizedValue, !!isRelative);\n },\n [amount, isRelative, onChange]\n );\n\n const relativeValue = useMemo(() => {\n if (isRelative == null) {\n return undefined;\n }\n return isRelative\n ? RelativeAbsoluteOptions.Relative\n : RelativeAbsoluteOptions.Absolute;\n }, [isRelative]);\n\n return (\n \n \n \n \n \n }\n />\n \n );\n});\n","import { ChangeEvent, useCallback, useMemo, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { Stack, Switch } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { PRICING_FLOOR_CEIL_ADJUSTMENT_TYPE_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport {\n getAllInPriceFromListPrice,\n getListPriceFromAllinPrice,\n} from 'src/utils/inventoryUtils';\nimport { posChangedField, posField } from 'src/utils/posFieldUtils';\nimport {\n ListingDetailsAutoPricingSectionUpdatesV2,\n Marketplace,\n} from 'src/WebApiController';\n\nimport { AutoPricingSettingsInput } from '../../BulkEditAutoPricingSettingsDialog.types';\nimport { useAutoPricingSettings } from '../../useBulkAutoPricingSettings';\nimport { PricingSetting } from '../PricingSetting';\nimport { SettingsSubheader } from '../PricingSubheader';\nimport { FloorAdjustmentInput } from './FloorAdjustmentInput';\nimport * as styles from './PricingProtection.css';\n\ntype PricingProtectionProps = {\n origin: Pick<\n AutoPricingSettingsInput,\n 'netProceedsFloor' | 'netProceedsCeiling'\n >;\n};\n\nexport const PricingProtection: React.FC = ({\n origin,\n}) => {\n const { loginContext } = useAppContext();\n const { getUiCurrency } = useLocalizationContext();\n const stubHubMkpSettings =\n loginContext?.user?.activeAccount?.marketplaceSettings?.find(\n (m) => m.mkp === Marketplace.StubHub\n );\n\n const uiCurrency = getUiCurrency(\n loginContext?.user?.activeAccount?.currencyCode\n );\n\n const { setValue } =\n useFormContext();\n\n const [isAbsolute, setIsAbsolute] = useState(false);\n\n const {\n netProceedsCeiling,\n netProceedsFloor,\n netProceedsFloorAdjustmentAmount,\n netProceedsFloorAdjustmentRelative,\n netProceedsFloorAdjustmentType,\n onUpdateNetProceedsFloorAdjustment,\n } = useAutoPricingSettings();\n\n const onPriceFloorChange = useCallback(\n (e: ChangeEvent) => {\n const v = parseFloat(e.target.value);\n if (v >= 0 && v < Number.MAX_VALUE) {\n const netProceedsValueNew = getListPriceFromAllinPrice(\n v,\n null,\n stubHubMkpSettings?.sellerFee\n )!;\n setValue('netProceedsFloor', posChangedField(netProceedsValueNew));\n } else {\n setValue('netProceedsFloor', null);\n }\n },\n [setValue, stubHubMkpSettings?.sellerFee]\n );\n\n const onPriceCeilingChange = useCallback(\n (e: ChangeEvent) => {\n const v = parseFloat(e.target.value);\n if (v >= 0 && v <= Number.MAX_VALUE) {\n const netProceedsValueNew = getListPriceFromAllinPrice(\n v,\n null,\n stubHubMkpSettings?.sellerFee\n )!;\n setValue('netProceedsCeiling', posChangedField(netProceedsValueNew));\n } else {\n setValue('netProceedsCeiling', null);\n }\n },\n [setValue, stubHubMkpSettings?.sellerFee]\n );\n\n const netProceedsFloorWebsite = useMemo(() => {\n if (netProceedsFloor?.value == null) {\n return '';\n }\n return (\n getAllInPriceFromListPrice(\n netProceedsFloor.value,\n null,\n stubHubMkpSettings?.sellerFee\n ) ?? ''\n );\n }, [netProceedsFloor?.value, stubHubMkpSettings?.sellerFee]);\n\n const netProceedsCeilingWebsite = useMemo(() => {\n if (netProceedsCeiling?.value == null) {\n return '';\n }\n return (\n getAllInPriceFromListPrice(\n netProceedsCeiling.value,\n null,\n stubHubMkpSettings?.sellerFee\n ) ?? ''\n );\n }, [netProceedsCeiling?.value, stubHubMkpSettings?.sellerFee]);\n\n const floorOrCeilingHasChange = useMemo(\n () =>\n origin.netProceedsCeiling?.value !== netProceedsCeiling?.value ||\n origin.netProceedsFloor?.value !== netProceedsFloor?.value,\n [\n netProceedsCeiling?.value,\n netProceedsFloor?.value,\n origin.netProceedsCeiling?.value,\n origin.netProceedsFloor?.value,\n ]\n );\n\n const onResetPricingProtection = useCallback(() => {\n setValue('netProceedsCeiling', posField(origin.netProceedsCeiling?.value));\n setValue('netProceedsFloor', posField(origin.netProceedsFloor?.value));\n }, [\n origin.netProceedsCeiling?.value,\n origin.netProceedsFloor?.value,\n setValue,\n ]);\n\n const onRelativeSwitch = useCallback(\n (checked: boolean) => {\n setIsAbsolute(checked);\n onResetPricingProtection();\n },\n [onResetPricingProtection]\n );\n\n return (\n <>\n \n {!isAbsolute ? (\n }\n detail={\n \n {\n onUpdateNetProceedsFloorAdjustment({\n adjustmentAmount: amount,\n isRelative,\n });\n }}\n />\n\n
    \n \n
    \n\n {\n if (\n newValue != null &&\n newValue != netProceedsFloorAdjustmentType\n ) {\n onUpdateNetProceedsFloorAdjustment({\n adjustmentType: newValue,\n });\n }\n }}\n />\n
    \n }\n hasChange={\n netProceedsFloorAdjustmentAmount != null &&\n netProceedsFloorAdjustmentRelative != null &&\n !!netProceedsFloorAdjustmentType\n }\n onReset={() => onUpdateNetProceedsFloorAdjustment({})}\n />\n ) : (\n }\n detail={\n \n \n \n \n
    \n \n
    \n \n \n \n
    \n }\n hasChange={floorOrCeilingHasChange}\n hasConflict={\n origin.netProceedsFloor?.hasConflict ||\n origin.netProceedsCeiling?.hasConflict\n }\n onReset={onResetPricingProtection}\n />\n )}\n }\n detail={\n \n event.stopPropagation()}\n />\n \n }\n />\n \n );\n};\n","import React, { ComponentProps, useState } from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { CancelButton } from 'src/components/Buttons';\nimport { OkButton } from 'src/components/Buttons/OkButton';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nexport type ConfirmDialogProps = {\n onOkay?: () => Promise | void;\n headerText: React.ReactNode;\n bodyText: React.ReactNode;\n onCancel?: () => void;\n cancelText?: ContentId;\n okText?: ContentId;\n} & ComponentProps;\n\nexport function ConfirmDialog({\n headerText,\n bodyText,\n onCancel,\n onOkay,\n okText,\n cancelText,\n isOpen,\n ...rest\n}: ConfirmDialogProps) {\n const [isLoading, setIsLoading] = useState(false);\n\n return (\n \n {onCancel && (\n \n )}\n {onOkay && (\n {\n setIsLoading(true);\n await onOkay();\n setIsLoading(false);\n }}\n />\n )}\n \n }\n {...rest}\n isOpen={isOpen}\n onCancel={onCancel}\n >\n \n {bodyText}\n {isLoading && }\n \n \n );\n}\n","import { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\n\nimport { ConfirmDialog, ConfirmDialogProps } from './ConfirmDialogV2';\n\nexport const useConfirmDialog = () => {\n const { openDialog, closeDialog } = useDialog(\n DialogId.Confirm,\n ConfirmDialog\n );\n\n return {\n openConfirmDialog: openDialog,\n closeConfirmDialog: closeDialog,\n };\n};\n","import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { useHasListingPricePermissions } from 'src/modals/ListingDetails/components/useHasListingPricePermissions';\nimport {\n AutoPricingSettingsCollection,\n Listing,\n PricingClient,\n} from 'src/WebApiController';\n\nexport const useAutoPricingStrategies = (\n listing?: Listing | null,\n forBulkEdit?: boolean\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const { trackError, showErrorDialog } = useErrorBoundaryContext();\n\n const { canAutoPrice } = useHasListingPricePermissions(listing, forBulkEdit);\n const queryClient = useQueryClient();\n const queryKey = [\n 'getAutoPricingStrategies',\n activeAccountWebClientConfig.activeAccountId,\n ];\n\n const shouldQuery =\n canAutoPrice && activeAccountWebClientConfig.activeAccountId != null;\n const autoPricingStrategiesQuery = useQuery({\n queryKey,\n queryFn: () => {\n if (!shouldQuery) {\n return null;\n }\n return new PricingClient(\n activeAccountWebClientConfig\n ).getAutoPricingStrategies();\n },\n\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError('PricingClient.getAutoPricingStrategies', error);\n },\n },\n });\n\n const autoPricingStrategiesUpdateMutation = useMutation({\n mutationFn: async ({ input }: { input: AutoPricingSettingsCollection }) => {\n return await new PricingClient(\n activeAccountWebClientConfig\n ).upsertAutoPricingStrategy(input);\n },\n // optimistic ui\n onMutate: ({ input }) => {\n queryClient.cancelQueries({ queryKey });\n\n const prevValue =\n queryClient.getQueryData(queryKey);\n const newValue = [\n ...(prevValue?.filter(\n (c) =>\n c.autoPricingSettingsCollectionId !==\n input.autoPricingSettingsCollectionId\n ) ?? []),\n input,\n ];\n\n queryClient.setQueryData(queryKey, newValue);\n return { prevValue };\n },\n onError: (err: ErrorTypes, { input }, context) => {\n queryClient.setQueryData(queryKey, context?.prevValue);\n showErrorDialog('PricingClient.upsertAutoPricingStrategy', err, {\n trackErrorData: { input },\n });\n },\n onSettled: () => {\n queryClient.invalidateQueries({ queryKey });\n },\n });\n\n const autoPricingStrategiesDeleteMutation = useMutation({\n mutationFn: async ({ collectionId }: { collectionId: number }) => {\n return await new PricingClient(\n activeAccountWebClientConfig\n ).deleteAutoPricingStrategy(collectionId);\n },\n // optimistic ui\n onMutate: ({ collectionId }) => {\n queryClient.cancelQueries({ queryKey });\n\n const prevValue =\n queryClient.getQueryData(queryKey);\n const newValue = prevValue?.filter(\n (c) => c.autoPricingSettingsCollectionId !== collectionId\n );\n\n queryClient.setQueryData(queryKey, newValue);\n return { prevValue };\n },\n onError: (err: ErrorTypes, { collectionId }, context) => {\n queryClient.setQueryData(queryKey, context?.prevValue);\n showErrorDialog('PricingClient.deleteAutoPricingStrategy', err, {\n trackErrorData: { collectionId },\n });\n },\n onSettled: () => {\n queryClient.invalidateQueries({ queryKey });\n },\n });\n\n return {\n autoPricingStrategiesQuery,\n upsertAutoPricingStrategy: autoPricingStrategiesUpdateMutation.mutateAsync,\n deleteAutoPricingStrategy: autoPricingStrategiesDeleteMutation.mutateAsync,\n };\n};\n","import { useFormContext } from 'react-hook-form';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosMultiSelect } from 'src/core/POS/PosMultiSelect';\nimport { getTextFieldState } from 'src/core/POS/PosTextField';\nimport { Stack } from 'src/core/ui';\nimport { ToggleGroup } from 'src/core/ui/ToggleGroup';\nimport { useCompQuantitiesFilter } from 'src/hooks/useCompQuantitiesFilter';\nimport { useUndercutAmountSettings } from 'src/hooks/useUndercutAmountSettings';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { DetailGroup } from 'src/modals/common';\nimport { useListingAutoPricingSettings } from 'src/modals/ListingDetails/components/useListingAutoPricingSettings';\nimport {\n UNDERCUT_PRICE_MODE_OPTIONS,\n UndercutPriceSettingsMode,\n} from 'src/utils/autoPricingUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n AutoPricingUndercutMode,\n Feature,\n Listing,\n ListingDetailsUpdateInput,\n} from 'src/WebApiController';\n\nimport { AutoPricingCompQuantitiesSelector } from '../AutoPricingCompQuantitiesSelector/AutoPricingCompQuantitiesSelector';\nimport { AutoPricingSectionRowIdFilter } from '../components/AutoPricingSectionRowIdFilter';\nimport * as styles from './SimplifiedAutopricingSection.css';\n\ntype SimplifiedAutopricingGuidedPriceProps = {\n listing?: Listing | null;\n listingHasParent?: boolean;\n disabled?: boolean;\n isMarketListingsView?: boolean;\n};\n\n/**\n * @deprecated - Do not use. Cleanup as part of IntelligibleAutoPricingSettings and SimplifiedAutoPricingUiV2 flag cleanup\n */\nexport const SimplifiedAutopricingGuidedPrice = ({\n listing,\n disabled,\n isMarketListingsView,\n}: SimplifiedAutopricingGuidedPriceProps) => {\n const { clearErrors, formState } =\n useFormContext();\n\n const {\n canAutoPrice,\n uiCurrency,\n eventPricingSettings,\n accountPricingSettings,\n undercutMode,\n undercutAbsoluteAmount,\n undercutRelativeAmount,\n onUndercutChange,\n skipUndercut,\n compListingQuantityScoreAdjustmentOverrideJson,\n onCompListingChange,\n } = useListingAutoPricingSettings(listing);\n\n const hasIntelligibleAutoPricingSettingsFeature = useUserHasFeature(\n Feature.IntelligibleAutoPricingSettings\n );\n\n const {\n quantitiesFilterOptions,\n quantitiesFilterValue,\n onUpdateQuantitiesFilter,\n } = useCompQuantitiesFilter(\n compListingQuantityScoreAdjustmentOverrideJson,\n onCompListingChange\n );\n\n const autopricingSettingsAvailable = canAutoPrice || isMarketListingsView;\n\n const parsedQuantityOverridesJson = JSON.parse(\n compListingQuantityScoreAdjustmentOverrideJson || 'null'\n );\n\n const quantityFilterValue = parsedQuantityOverridesJson?.quantityFilter;\n\n const { undercutAbsoluteAmountMode, setUndercutAbsoluteAmountMode } =\n useUndercutAmountSettings(undercutAbsoluteAmount, undercutRelativeAmount);\n\n const isDealScoreMode =\n (undercutMode ??\n eventPricingSettings?.undercutMode ??\n accountPricingSettings?.undercutMode) === AutoPricingUndercutMode.Deal;\n const undercutAbsoluteAmountError =\n formState.errors.undercutAbsoluteAmount?.message;\n\n return (\n <>\n {isDealScoreMode && (\n
    \n \n
    \n )}\n\n \n {canAutoPrice && (\n \n {\n if (!value) return;\n\n const mode = value as UndercutPriceSettingsMode;\n setUndercutAbsoluteAmountMode(mode);\n\n if (undercutAbsoluteAmount) {\n const curAmountAbs = Math.abs(undercutAbsoluteAmount);\n onUndercutChange(\n undefined,\n mode == UndercutPriceSettingsMode.Premium\n ? -curAmountAbs\n : curAmountAbs\n );\n }\n }}\n />\n
    \n \n
    \n \n {\n clearErrors('undercutAbsoluteAmount');\n clearErrors('undercutRelativeAmount');\n const v = parseFloat(e.target.value);\n if (v >= 0 && v <= Number.MAX_VALUE) {\n if (\n undercutAbsoluteAmountMode ===\n UndercutPriceSettingsMode.Premium\n ) {\n onUndercutChange(undefined, -v);\n } else {\n onUndercutChange(undefined, v);\n }\n } else {\n onUndercutChange(undefined, null);\n }\n }}\n />\n \n
    \n )}\n\n {autopricingSettingsAvailable && listing && (\n \n {hasIntelligibleAutoPricingSettingsFeature ? (\n <>\n
    \n \n
    \n\n \n \n ) : (\n <>\n
    \n \n
    \n\n \n \n )}\n\n \n
    \n )}\n
    \n \n );\n};\n","import { useCallback, useEffect, useMemo, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { ButtonWithIcon } from 'src/components/Buttons';\nimport { Content } from 'src/contexts/ContentContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { PosSelect } from 'src/core/POS/PosSelect';\nimport { vars } from 'src/core/themes';\nimport {\n AutoPricingSettingsCollectionInput,\n AutoPricingStrategyDialog,\n AutoPricingStrategyDialogProps,\n} from 'src/dialogs/AutoPricingStrategyDialog';\nimport { useAutoPricingStrategies } from 'src/hooks/api/useAutoPricingStrategies';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { DetailGroup, DetailSection, SectionContent } from 'src/modals/common';\nimport { EditIcon, IconsFill, PlusIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n AutoPricingSettingsCollection,\n Listing,\n ListingDetailsUpdateInput,\n} from 'src/WebApiController';\n\nimport { useHasListingPricePermissions } from '../useHasListingPricePermissions';\nimport { useListingAutoPricingSettings } from '../useListingAutoPricingSettings';\n\nexport const AutoPricingStrategySection = ({\n listing,\n disabled,\n isBulkEdit,\n listingHasParent,\n isMarketListingsView = false,\n}: {\n listing?: Listing | null;\n disabled?: boolean;\n isBulkEdit?: boolean;\n listingHasParent?: boolean;\n isMarketListingsView?: boolean;\n}) => {\n const {\n openDialog: openAutoPricingStrategyDialog,\n closeDialog: closeAutoPricingStrategyDialog,\n } = useDialog(\n DialogId.AutoPricingStrategy,\n AutoPricingStrategyDialog\n );\n const { canAutoPrice } = useHasListingPricePermissions(listing, isBulkEdit);\n\n const isMobile = useMatchMedia('mobile');\n\n const { setValue } = useFormContext();\n const { autoPricingStrategiesQuery } = useAutoPricingStrategies(\n listing,\n isBulkEdit\n );\n\n const [selectedAutoPricingStrategyId, setSelectedAutoPricingStrategyId] =\n useState(null);\n\n const keyOptionsContent = useMemo(() => {\n return (\n autoPricingStrategiesQuery.data?.reduce(\n (re, r) => {\n re[r.autoPricingSettingsCollectionId?.toString() ?? ''] =\n r.strategyName;\n return re;\n },\n {} as Record\n ) ?? {}\n );\n }, [autoPricingStrategiesQuery.data]);\n\n useEffect(() => {\n const autoPricingStrategy = autoPricingStrategiesQuery.data?.find(\n (r) => r.autoPricingSettingsCollectionId === selectedAutoPricingStrategyId\n );\n\n if (selectedAutoPricingStrategyId) {\n if (!autoPricingStrategy) {\n // On strategy delete, reset the form\n setSelectedAutoPricingStrategyId(null);\n } else {\n // on strategy change, apply the settings to the form\n applyAutoPricingStrategy(autoPricingStrategy);\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [autoPricingStrategiesQuery.data]);\n\n const {\n autoPricingEnabled,\n\n undercutMode,\n undercutAbsoluteAmount,\n undercutRelativeAmount,\n\n compListingMode,\n compListingFloor,\n compListingCeiling,\n compListingQuantityScoreAdjustmentEnabled,\n compListingOnlyForSameZoneEnabled,\n compListingOnlyForSelectedSectionsEnabled,\n compListingExcludeFanInventory,\n\n circuitBreakerRelativeCeiling,\n circuitBreakerRelativeFloor,\n circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerMaxDiscountVelocityTicksInHours,\n circuitBreakerMinCompListingCount,\n\n outlierMode,\n outlierStandardDeviations,\n outlierKthLowestLimit,\n outlierKthLowestLimitRelativeSpacing,\n outlierKthLowestLimitAbsoluteSpacing,\n\n onUndercutChange,\n onCompListingChange,\n onCircuitBreakerChange,\n onOutlierChange,\n } = useListingAutoPricingSettings(listing, isBulkEdit);\n\n const applyAutoPricingStrategy = useCallback(\n (autoPricingStrategy: AutoPricingSettingsCollection) => {\n // Apply the settings to the form\n setValue('autoPricingEnabled', true);\n setValue('skipAutoPricing', false);\n setValue('skipAdvancePricing', false);\n setValue('skipCompListing', false);\n setValue('skipUndercut', false);\n\n onUndercutChange(\n autoPricingStrategy.undercutMode,\n autoPricingStrategy.undercutAbsoluteAmount,\n autoPricingStrategy.undercutRelativeAmount\n );\n onCompListingChange({\n compListingModeNew: autoPricingStrategy.compListingMode,\n compListingFloorNew: autoPricingStrategy.compListingFloor,\n compListingCeilingNew: autoPricingStrategy.compListingCeiling,\n compListingOnlyForSameZoneEnabledNew:\n autoPricingStrategy.compListingOnlyForSameZoneEnabled,\n compListingOnlyForSelectedSectionsEnabledNew:\n autoPricingStrategy.compListingOnlyForSelectedSectionsEnabled,\n compListingQuantityScoreAdjustmentEnabledNew:\n autoPricingStrategy.compListingQuantityScoreAdjustmentEnabled,\n compListingExcludeFanInventoryNew:\n autoPricingStrategy.compListingExcludeFanInventory,\n });\n onCircuitBreakerChange(\n autoPricingStrategy.circuitBreakerRelativeCeiling,\n autoPricingStrategy.circuitBreakerRelativeFloor,\n autoPricingStrategy.circuitBreakerMaxDiscountVelocityPercent,\n autoPricingStrategy.circuitBreakerMaxDiscountVelocityTicksInHours,\n autoPricingStrategy.circuitBreakerMinCompListingCount\n );\n onOutlierChange({\n outlierModeNew: autoPricingStrategy.outlierMode,\n outlierStandardDeviationsNew:\n autoPricingStrategy.outlierStandardDeviations,\n outlierKthLowestLimitNew: autoPricingStrategy.outlierKthLowestLimit,\n outlierKthLowestLimitRelativeSpacingNew:\n autoPricingStrategy.outlierKthLowestLimitRelativeSpacing,\n outlierKthLowestLimitAbsoluteSpacingNew:\n autoPricingStrategy.outlierKthLowestLimitAbsoluteSpacing,\n });\n\n setSelectedAutoPricingStrategyId(\n autoPricingStrategy.autoPricingSettingsCollectionId\n );\n },\n [\n onCircuitBreakerChange,\n onCompListingChange,\n onOutlierChange,\n onUndercutChange,\n setValue,\n ]\n );\n\n const onAutoPricingStrategyChange = useCallback(\n (value: string) => {\n if (!value) return;\n\n const autoPricingStrategy = autoPricingStrategiesQuery.data?.find(\n (r) => r.autoPricingSettingsCollectionId === parseInt(value, 10)\n );\n if (!autoPricingStrategy) {\n return;\n }\n\n applyAutoPricingStrategy(autoPricingStrategy);\n },\n [applyAutoPricingStrategy, autoPricingStrategiesQuery.data]\n );\n\n const currentValueEqualsSelectedStrategy = useMemo(() => {\n const autoPricingStrategy = autoPricingStrategiesQuery.data?.find(\n (r) => r.autoPricingSettingsCollectionId === selectedAutoPricingStrategyId\n );\n\n if (!autoPricingStrategy) return true;\n\n return (\n autoPricingEnabled === true &&\n autoPricingStrategy &&\n (autoPricingStrategy.undercutMode == null ||\n autoPricingStrategy.undercutMode === undercutMode) &&\n (autoPricingStrategy.undercutAbsoluteAmount == null ||\n autoPricingStrategy.undercutAbsoluteAmount ===\n undercutAbsoluteAmount) &&\n (autoPricingStrategy.undercutRelativeAmount == null ||\n autoPricingStrategy.undercutRelativeAmount ===\n undercutRelativeAmount) &&\n (autoPricingStrategy.compListingMode == null ||\n autoPricingStrategy.compListingMode === compListingMode) &&\n (autoPricingStrategy.compListingFloor == null ||\n autoPricingStrategy.compListingFloor === compListingFloor) &&\n (autoPricingStrategy.compListingCeiling == null ||\n autoPricingStrategy.compListingCeiling === compListingCeiling) &&\n (autoPricingStrategy.compListingQuantityScoreAdjustmentEnabled == null ||\n autoPricingStrategy.compListingQuantityScoreAdjustmentEnabled ===\n compListingQuantityScoreAdjustmentEnabled) &&\n (autoPricingStrategy.compListingOnlyForSameZoneEnabled == null ||\n autoPricingStrategy.compListingOnlyForSameZoneEnabled ===\n compListingOnlyForSameZoneEnabled) &&\n (autoPricingStrategy.compListingOnlyForSelectedSectionsEnabled == null ||\n autoPricingStrategy.compListingOnlyForSelectedSectionsEnabled ===\n compListingOnlyForSelectedSectionsEnabled) &&\n (autoPricingStrategy.compListingExcludeFanInventory == null ||\n autoPricingStrategy.compListingExcludeFanInventory ===\n compListingExcludeFanInventory) &&\n (autoPricingStrategy.circuitBreakerRelativeCeiling == null ||\n autoPricingStrategy.circuitBreakerRelativeCeiling ===\n circuitBreakerRelativeCeiling) &&\n (autoPricingStrategy.circuitBreakerRelativeFloor == null ||\n autoPricingStrategy.circuitBreakerRelativeFloor ===\n circuitBreakerRelativeFloor) &&\n (autoPricingStrategy.circuitBreakerMaxDiscountVelocityPercent == null ||\n autoPricingStrategy.circuitBreakerMaxDiscountVelocityPercent ===\n circuitBreakerMaxDiscountVelocityPercent) &&\n (autoPricingStrategy.circuitBreakerMaxDiscountVelocityTicksInHours ===\n null ||\n autoPricingStrategy.circuitBreakerMaxDiscountVelocityTicksInHours ===\n circuitBreakerMaxDiscountVelocityTicksInHours) &&\n (autoPricingStrategy.circuitBreakerMinCompListingCount == null ||\n autoPricingStrategy.circuitBreakerMinCompListingCount ===\n circuitBreakerMinCompListingCount) &&\n (autoPricingStrategy.outlierMode == null ||\n autoPricingStrategy.outlierMode === outlierMode) &&\n (autoPricingStrategy.outlierStandardDeviations == null ||\n autoPricingStrategy.outlierStandardDeviations ===\n outlierStandardDeviations) &&\n (autoPricingStrategy.outlierKthLowestLimit == null ||\n autoPricingStrategy.outlierKthLowestLimit === outlierKthLowestLimit) &&\n (autoPricingStrategy.outlierKthLowestLimitRelativeSpacing == null ||\n autoPricingStrategy.outlierKthLowestLimitRelativeSpacing ===\n outlierKthLowestLimitRelativeSpacing) &&\n (autoPricingStrategy.outlierKthLowestLimitAbsoluteSpacing == null ||\n autoPricingStrategy.outlierKthLowestLimitAbsoluteSpacing ===\n outlierKthLowestLimitAbsoluteSpacing)\n );\n }, [\n autoPricingEnabled,\n autoPricingStrategiesQuery.data,\n circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerMaxDiscountVelocityTicksInHours,\n circuitBreakerMinCompListingCount,\n circuitBreakerRelativeCeiling,\n circuitBreakerRelativeFloor,\n compListingCeiling,\n compListingFloor,\n compListingMode,\n compListingOnlyForSameZoneEnabled,\n compListingOnlyForSelectedSectionsEnabled,\n compListingExcludeFanInventory,\n compListingQuantityScoreAdjustmentEnabled,\n outlierMode,\n outlierStandardDeviations,\n outlierKthLowestLimit,\n outlierKthLowestLimitRelativeSpacing,\n outlierKthLowestLimitAbsoluteSpacing,\n selectedAutoPricingStrategyId,\n undercutAbsoluteAmount,\n undercutMode,\n undercutRelativeAmount,\n ]);\n\n const isStrategyApplied =\n currentValueEqualsSelectedStrategy && selectedAutoPricingStrategyId;\n\n const defaultValuesForStrategy = useMemo(() => {\n const autoPricingStrategy = isStrategyApplied\n ? autoPricingStrategiesQuery.data?.find(\n (r) =>\n r.autoPricingSettingsCollectionId === selectedAutoPricingStrategyId\n )\n : undefined;\n\n return {\n autoPricingSettingsCollectionId:\n autoPricingStrategy?.autoPricingSettingsCollectionId,\n strategyName: autoPricingStrategy?.strategyName,\n\n skipAutoPricing: false,\n skipAdvancePricing: false,\n skipCompListing: false,\n skipUndercut: false,\n\n autoPricingEnabled,\n\n undercutMode,\n undercutAbsoluteAmount,\n undercutRelativeAmount,\n\n compListingMode,\n compListingFloor,\n compListingCeiling,\n compListingQuantityScoreAdjustmentEnabled,\n compListingOnlyForSameZoneEnabled,\n compListingOnlyForSelectedSectionsEnabled,\n compListingExcludeFanInventory,\n\n circuitBreakerRelativeCeiling,\n circuitBreakerRelativeFloor,\n circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerMaxDiscountVelocityTicksInHours,\n circuitBreakerMinCompListingCount,\n\n outlierMode,\n outlierStandardDeviations,\n outlierKthLowestLimit,\n outlierKthLowestLimitRelativeSpacing,\n outlierKthLowestLimitAbsoluteSpacing,\n } as AutoPricingSettingsCollectionInput;\n }, [\n autoPricingEnabled,\n autoPricingStrategiesQuery.data,\n circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerMaxDiscountVelocityTicksInHours,\n circuitBreakerMinCompListingCount,\n circuitBreakerRelativeCeiling,\n circuitBreakerRelativeFloor,\n compListingCeiling,\n compListingFloor,\n compListingMode,\n compListingOnlyForSameZoneEnabled,\n compListingOnlyForSelectedSectionsEnabled,\n compListingExcludeFanInventory,\n compListingQuantityScoreAdjustmentEnabled,\n isStrategyApplied,\n outlierMode,\n outlierStandardDeviations,\n outlierKthLowestLimit,\n outlierKthLowestLimitRelativeSpacing,\n outlierKthLowestLimitAbsoluteSpacing,\n selectedAutoPricingStrategyId,\n undercutAbsoluteAmount,\n undercutMode,\n undercutRelativeAmount,\n ]);\n\n if (!canAutoPrice && !isMarketListingsView) {\n return null;\n }\n\n const sectionContent = (\n \n \n e.stopPropagation()}\n />\n \n \n \n ) : (\n \n )\n }\n textContentId={\n isStrategyApplied\n ? isMarketListingsView\n ? ContentId.Edit\n : ContentId.EditPricingStrategy\n : ContentId.CreatePricingStrategy\n }\n onClick={() =>\n openAutoPricingStrategyDialog({\n defaultValues: defaultValuesForStrategy,\n listing: listing!,\n isLoading: autoPricingStrategiesQuery.isLoading,\n onClosed: closeAutoPricingStrategyDialog,\n onStrategyUpdated: (strategyId: number) => {\n if (strategyId !== selectedAutoPricingStrategyId) {\n // An insert\n setSelectedAutoPricingStrategyId(strategyId);\n onAutoPricingStrategyChange(strategyId.toString());\n }\n closeAutoPricingStrategyDialog();\n },\n isBulkEdit,\n listingHasParent,\n disabled,\n })\n }\n disabled={disabled}\n style={{ padding: 0, textAlign: 'start' }}\n />\n \n \n );\n\n return (\n <>\n {isMarketListingsView ? (\n sectionContent\n ) : (\n }>\n {sectionContent}\n \n )}\n \n );\n};\n","import { useCallback, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { OkButton } from 'src/components/Buttons/OkButton';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { useEventHubContext } from 'src/contexts/EventHubContext';\nimport { Switch } from 'src/core/ui';\nimport { Stack } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { AutoPricingStrategySection } from 'src/modals/ListingDetails/components/PricingSection/AutoPricingStrategySection';\nimport { useHasListingPricePermissions } from 'src/modals/ListingDetails/components/useHasListingPricePermissions';\nimport { useListingAutoPricingSettings } from 'src/modals/ListingDetails/components/useListingAutoPricingSettings';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n Feature,\n Listing,\n ListingClient,\n ListingDetailDataField,\n ListingDetails,\n ListingDetailsAutoPricingSectionUpdates,\n ListingDetailsUpdateInput,\n} from 'src/WebApiController';\n\nimport { SimplifiedAutopricingGuidedPrice } from './SimplifiedAutopricingGuidedPrice';\n\ntype SimplifiedAutopricingSectionProps = {\n listing: Listing | undefined;\n};\n\n/**\n * @deprecated - Use SimplifiedAutopricingSectionV2 instead\n */\nexport const SimplifiedAutopricingSection = ({\n listing,\n}: SimplifiedAutopricingSectionProps) => {\n // Hooks\n const [isSubmitting, setIsSubmitting] = useState(false);\n const { showErrorDialog } = useErrorBoundaryContext();\n const { canSetPrice, canAutoPrice } = useHasListingPricePermissions(listing);\n\n const { activeAccountWebClientConfig } = useAppContext();\n\n // React-hook-form\n const { setValue, getValues, reset } =\n useFormContext();\n\n const { hasChanges, autoPricingEnabled } =\n useListingAutoPricingSettings(listing);\n\n // Mutations\n const {\n updateItemInEvent,\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n const { onUpdateListing } = useEventHubContext();\n\n const hasSectionalLoadDataFeature = useUserHasFeature(\n Feature.ListingLoadBySection\n );\n\n const submitPricingSettingsChange = useCallback(() => {\n setIsSubmitting(true);\n const listForm = getValues();\n\n if (!listing) {\n return;\n }\n\n tryInvokeApi(\n async () => {\n const client = new ListingClient(activeAccountWebClientConfig);\n\n const input: ListingDetailsAutoPricingSectionUpdates = {\n ...listForm,\n id: listing.id,\n rowVersion: null,\n autoPriceFrequency: null,\n compListingQuantityFilters: null,\n compListingQuantityScoreAdjustmentOverrides: null,\n scoreModel: null,\n autoPricingDefaultQuantityFiltersJson: null,\n venueZoneOverrideId: null,\n venueZoneConfigType: null,\n };\n await client.updateListingAutoPricingSection(input);\n\n // Refersh listing\n const updated = await client.getListingByListingId(\n listing.id,\n hasSectionalLoadDataFeature ? (listing as ListingDetails) : undefined,\n hasSectionalLoadDataFeature\n ? [\n ListingDetailDataField.Pricing, // To refresh pricing related listing fields, i.e. auto pricing enabled\n ListingDetailDataField.AutoPricing,\n ]\n : null\n );\n if (updated) {\n updateItemInEvent(updated, ActionOutboxEntityType.Listing);\n onUpdateListing(updated.id);\n }\n },\n (error) => {\n showErrorDialog(\n 'ListingClient.updateListingAutoPricingSection',\n error,\n {\n trackErrorData: {\n item1: listing.id,\n item2: listForm,\n },\n }\n );\n },\n () => {\n setIsSubmitting(false);\n reset(listForm);\n }\n );\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n getValues,\n listing,\n activeAccountWebClientConfig,\n refreshExpandedListItems,\n showErrorDialog,\n ]);\n\n return canSetPrice && listing ? (\n \n \n {canAutoPrice && (\n \n \n e.stopPropagation()}\n onCheckedChange={(isChecked) => {\n setValue('autoPricingEnabled', isChecked);\n }}\n />\n \n \n )}\n\n \n\n {\n submitPricingSettingsChange();\n }}\n textContentId={ContentId.Save}\n disabled={listing == null || isSubmitting || !hasChanges(getValues())}\n />\n \n \n \n ) : null;\n};\n","import { useCallback, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { OkButton } from 'src/components/Buttons/OkButton';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { useEventHubContext } from 'src/contexts/EventHubContext';\nimport { PosMultiSelect } from 'src/core/POS/PosMultiSelect';\nimport { vars } from 'src/core/themes';\nimport { Switch, Tooltip } from 'src/core/ui';\nimport { Stack } from 'src/core/ui';\nimport { useCompQuantitiesFilter } from 'src/hooks/useCompQuantitiesFilter';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { useListingAutoPricingSettings } from 'src/modals/ListingDetails/components/useListingAutoPricingSettings';\nimport { InfoOutlineIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n Feature,\n Listing,\n ListingClient,\n ListingDetailDataField,\n ListingDetails,\n ListingDetailsAutoPricingSectionUpdates,\n ListingDetailsUpdateInput,\n} from 'src/WebApiController';\n\nimport { AutoPricingCompQuantitiesSelector } from '../AutoPricingCompQuantitiesSelector/AutoPricingCompQuantitiesSelector';\nimport { AutoPricingSectionRowIdFilter } from '../components/AutoPricingSectionRowIdFilter';\n\ntype SimplifiedAutopricingSectionProps = {\n listing: Listing | undefined;\n};\n\nexport const SimplifiedAutopricingSection = ({\n listing,\n}: SimplifiedAutopricingSectionProps) => {\n // Hooks\n const [isSubmitting, setIsSubmitting] = useState(false);\n const [showSections, setShowSections] = useState(false);\n\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const { activeAccountWebClientConfig } = useAppContext();\n\n const hasIntelligibleAutoPricingSettingsFeature = useUserHasFeature(\n Feature.IntelligibleAutoPricingSettings\n );\n\n // React-hook-form\n const { setValue, getValues, reset } =\n useFormContext();\n\n const {\n hasChanges,\n autoPricingEnabled,\n canAutoPrice,\n compListingQuantityScoreAdjustmentOverrideJson,\n onCompListingChange,\n } = useListingAutoPricingSettings(listing);\n\n // Mutations\n const {\n updateItemInEvent,\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n const { onUpdateListing } = useEventHubContext();\n\n const hasSectionalLoadDataFeature = useUserHasFeature(\n Feature.ListingLoadBySection\n );\n\n const submitPricingSettingsChange = useCallback(() => {\n setIsSubmitting(true);\n const listForm = getValues();\n\n if (!listing) {\n return;\n }\n\n tryInvokeApi(\n async () => {\n const client = new ListingClient(activeAccountWebClientConfig);\n\n const input: ListingDetailsAutoPricingSectionUpdates = {\n ...listForm,\n id: listing.id,\n rowVersion: null,\n autoPriceFrequency: null,\n compListingQuantityFilters: null,\n compListingQuantityScoreAdjustmentOverrides: null,\n scoreModel: null,\n autoPricingDefaultQuantityFiltersJson: null,\n venueZoneOverrideId: null,\n venueZoneConfigType: null,\n };\n await client.updateListingAutoPricingSection(input);\n\n // Refersh listing\n const updated = await client.getListingByListingId(\n listing.id,\n hasSectionalLoadDataFeature ? (listing as ListingDetails) : undefined,\n hasSectionalLoadDataFeature\n ? [\n ListingDetailDataField.Pricing, // To refresh pricing related listing fields, i.e. auto pricing enabled\n ListingDetailDataField.AutoPricing,\n ]\n : null\n );\n if (updated) {\n updateItemInEvent(updated, ActionOutboxEntityType.Listing);\n onUpdateListing(updated.id);\n }\n },\n (error) => {\n showErrorDialog(\n 'ListingClient.updateListingAutoPricingSection',\n error,\n {\n trackErrorData: {\n item1: listing.id,\n item2: listForm,\n },\n }\n );\n },\n () => {\n setIsSubmitting(false);\n reset(listForm);\n }\n );\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n getValues,\n listing,\n activeAccountWebClientConfig,\n refreshExpandedListItems,\n showErrorDialog,\n ]);\n\n const {\n quantitiesFilterOptions,\n quantitiesFilterValue,\n onUpdateQuantitiesFilter,\n } = useCompQuantitiesFilter(\n compListingQuantityScoreAdjustmentOverrideJson,\n onCompListingChange\n );\n\n const showSave = listing != null && hasChanges(getValues());\n\n return canAutoPrice && listing ? (\n \n \n \n {hasIntelligibleAutoPricingSettingsFeature ? (\n <>\n \n\n \n \n ) : (\n <>\n \n \n \n )}\n \n \n \n \n \n \n }\n contentVariant=\"dark\"\n >\n \n \n e.stopPropagation()}\n onCheckedChange={(isChecked) => {\n setShowSections(isChecked);\n }}\n />\n \n \n \n \n \n \n }\n contentVariant=\"dark\"\n >\n \n \n e.stopPropagation()}\n onCheckedChange={(isChecked) => {\n setValue('autoPricingEnabled', isChecked);\n }}\n />\n \n {showSave && (\n {\n submitPricingSettingsChange();\n }}\n textContentId={ContentId.Save}\n disabled={isSubmitting}\n />\n )}\n \n\n {showSections && (\n \n )}\n \n ) : null;\n};\n","import { cloneElement } from 'react';\nimport { vars } from 'src/core/themes';\nimport { Stack, Tooltip } from 'src/core/ui';\nimport { IconsFill } from 'src/svgs/Viagogo';\nimport { ListingNoteType } from 'src/WebApiController';\n\nexport const ListingNoteBadge = ({\n listingNotes,\n icon,\n type,\n}: {\n listingNotes?: string[];\n icon: JSX.Element;\n type: ListingNoteType;\n}) => {\n const styledIcon = cloneElement(icon, {\n size: vars.iconSize.m,\n fill:\n type === ListingNoteType.Defect\n ? IconsFill.textWarning\n : IconsFill.textPrimary,\n });\n\n const content = {styledIcon};\n\n return listingNotes ? (\n \n \n {listingNotes?.map((note, idx) => {`• ${note}`})}\n \n \n ) : null;\n};\n","import clsx from 'clsx';\nimport { PropsWithChildren } from 'react';\n\nimport * as styles from './DividerLine.css';\n\nexport const DividerLine = ({\n children,\n darkBackground,\n}: PropsWithChildren<{ darkBackground?: boolean }>) => {\n return (\n
    \n \n \n {children}\n
    \n \n \n );\n};\n","import { ReactNode, useMemo } from 'react';\nimport { SeatingInfo } from 'src/components/common/SeatingInfo';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { useSiteTheme } from 'src/contexts/SiteTheme/SiteThemeContext';\nimport { vars } from 'src/core/themes';\nimport { Stack, Tooltip } from 'src/core/ui';\nimport { InfoOutlineIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { formatCurrency, formatPercent } from 'src/utils/numberFormatter';\nimport { ListingPriceCalculation, Seating } from 'src/WebApiController';\n\nimport * as styles from './ComparableListingDisplayTooltip.css';\nimport { DividerLine } from './DividerLine';\n\nexport type ComparableListingDisplayTooltipProps = {\n seating?: Seating;\n price?: ReactNode;\n listingPriceCalc?: ListingPriceCalculation | null;\n};\n\nexport function ComparableListingDisplayTooltip({\n seating,\n price,\n listingPriceCalc,\n}: ComparableListingDisplayTooltipProps) {\n const { getUiCurrency } = useLocalizationContext();\n const { isDarkMode } = useSiteTheme();\n\n const uiCurrency = useMemo(\n () => getUiCurrency(listingPriceCalc?.websitePrice?.currency ?? 'USD'),\n [getUiCurrency, listingPriceCalc?.websitePrice?.currency]\n );\n const pricingAgainst = listingPriceCalc?.compListings?.find(\n (x) => x.listingId === listingPriceCalc?.underCutChosenListingId\n );\n const content = (\n \n \n \n \n );\n\n const hasRelative = Boolean(\n listingPriceCalc?.udrRel || listingPriceCalc?.udrRelPrm\n );\n const hasAbsolute = Boolean(\n listingPriceCalc?.udrAbs || listingPriceCalc?.udrAbsPrm\n );\n\n return (\n \n \n \n \n \n \n {pricingAgainst?.sellerAllInPrice?.disp ?? (\n \n )}\n \n {hasRelative && (\n <>\n -\n\n
    \n {!!listingPriceCalc?.udrRel && (\n \n \n % \n \n {formatPercent(listingPriceCalc.udrRel, 0)}\n \n )}\n {!!listingPriceCalc?.udrRelPrm && (\n \n \n % \n \n {formatPercent(listingPriceCalc.udrRelPrm, 0)}\n \n )}\n
    \n \n )}\n {hasAbsolute && (\n <>\n +\n\n
    \n {!!listingPriceCalc?.udrAbs && (\n \n \n {uiCurrency.sym} \n \n {formatCurrency(\n listingPriceCalc.udrAbs,\n uiCurrency.code,\n uiCurrency.dec\n )}\n \n )}\n {!!listingPriceCalc?.udrAbsPrm && (\n \n \n {uiCurrency.sym} \n \n {formatCurrency(\n listingPriceCalc.udrAbsPrm,\n uiCurrency.code,\n uiCurrency.dec\n )}\n \n )}\n
    \n \n )}\n =\n \n \n {price}\n \n \n \n );\n}\n","import { clsx } from 'clsx';\nimport { ReactNode, useMemo } from 'react';\nimport { SeatingInfo } from 'src/components/common/SeatingInfo';\nimport { ListingNoteBadge } from 'src/components/Listings/ListingNoteBadge/index';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useSiteTheme } from 'src/contexts/SiteTheme/SiteThemeContext';\nimport { shared, vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { GenericDisclosuresIcon, InfoOutlineIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n Feature,\n ListingNote,\n ListingNoteType,\n ListingPriceCalculation,\n Seating,\n} from 'src/WebApiController';\n\nimport * as styles from './ComparableListingDisplay.css';\nimport { ComparableListingDisplayTooltip } from './ComparableListingDisplayTooltip';\n\nexport type ComparableListingDisplayProps = {\n /**\n * Whether this is the display that represents the current listing.\n */\n listingId: number;\n /**\n * Whether this is the selected listing.\n *\n * This will show an active background state.\n */\n isCurrentListing?: boolean;\n /**\n * Whether this is a listing owned by the current account.\n *\n * This will show a \"Your Listing\" badge.\n */\n isYourListing?: boolean;\n isOutlier?: boolean;\n isAnchor?: boolean;\n isSelectedWithListingGroup?: boolean;\n title?: ReactNode;\n price?: ReactNode;\n validPurchaseQuantities?: number[] | null;\n listingNotes?: ListingNote[];\n seating?: Seating;\n listingPriceCalc?: ListingPriceCalculation | null;\n};\n\nexport function ComparableListingDisplay({\n listingId,\n isCurrentListing = false,\n isYourListing = false,\n isOutlier = false,\n isAnchor = false,\n isSelectedWithListingGroup = false,\n title,\n price,\n validPurchaseQuantities,\n listingNotes,\n seating,\n listingPriceCalc,\n}: ComparableListingDisplayProps) {\n const hasShowIdFeature = useUserHasFeature(Feature.ListingIdForCompListings);\n const hasYourListingInComps = useUserHasFeature(Feature.YourListingsInComps);\n const hasIntelligiblePricePreviewFeature = useUserHasFeature(\n Feature.IntelligiblePricePreview\n );\n const hasListingGroupIntelligiblePricePreviewFeature = useUserHasFeature(\n Feature.IntelligiblePricePreviewForListingGroup\n );\n\n const hasCondensedTabsFeature = useUserHasFeature(\n Feature.CondensedPreviewTabsAndSingleListing\n );\n const hasCompListingDisplayUpdateFeature = useUserHasFeature(\n Feature.CompListingDisplayUpdate\n );\n\n const { isDarkMode } = useSiteTheme();\n\n const shouldGrayOut =\n isOutlier || (!isCurrentListing && isYourListing && hasYourListingInComps);\n\n const displayQuantity = useMemo(() => {\n if (!validPurchaseQuantities) {\n return 0;\n }\n\n return Math.max(...validPurchaseQuantities);\n }, [validPurchaseQuantities]);\n\n const quantitySplits = useMemo(() => {\n if (!validPurchaseQuantities || validPurchaseQuantities.length === 0) {\n return '0';\n }\n\n const splits = [...validPurchaseQuantities]\n .toSorted((a, b) => b - a)\n .filter((q) => q < 10);\n\n const hasSplitsLargerThanTen = validPurchaseQuantities.some((q) => q > 10);\n\n return [...(hasSplitsLargerThanTen ? ['10+'] : []), ...splits].join(', ');\n }, [validPurchaseQuantities]);\n\n const listingNoteDefects = useMemo(() => {\n return listingNotes\n ?.filter(\n (note) =>\n note.type === ListingNoteType.Defect ||\n note.type === ListingNoteType.RestrictionOnUse\n )\n .map((note) => note.listingNoteText);\n }, [listingNotes]);\n\n const listingNotePerks = useMemo(() => {\n return listingNotes\n ?.filter(\n (note) =>\n note.type === ListingNoteType.Perk ||\n note.type === ListingNoteType.Information\n )\n .map((note) => note.listingNoteText);\n }, [listingNotes]);\n\n return (\n \n \n \n \n {title ?? (\n \n )}\n \n \n \n \n \n {displayQuantity}\n \n\n •\n\n \n {quantitySplits}\n \n\n {listingNoteDefects?.length || listingNotePerks?.length ? (\n •\n ) : null}\n\n {listingNoteDefects?.length ? (\n }\n listingNotes={listingNoteDefects}\n type={ListingNoteType.Defect}\n />\n ) : null}\n\n {listingNotePerks?.length ? (\n }\n listingNotes={listingNotePerks}\n type={ListingNoteType.Perk}\n />\n ) : null}\n \n \n \n\n \n {isYourListing ? (\n \n {hasIntelligiblePricePreviewFeature &&\n (!isSelectedWithListingGroup ||\n hasListingGroupIntelligiblePricePreviewFeature) ? (\n \n ) : (\n \n )}\n \n ) : isOutlier ? (\n \n \n \n ) : isAnchor ? (\n \n \n \n ) : null}\n \n \n \n {price}\n \n {hasShowIdFeature && (\n \n {listingId}\n \n )}\n \n \n );\n}\n","import { Seating } from 'src/WebApiController';\n\nimport {\n ComparableListingDisplay,\n ComparableListingDisplayProps,\n} from '../../ComparableListingDisplay';\nimport { ComparableListing } from '../ComparableListings';\n\nexport type ConnectedComparableListingDisplayProps = Pick<\n ComparableListingDisplayProps,\n 'isCurrentListing'\n> & {\n listing: ComparableListing;\n};\n\nexport const ConnectedComparableListingDisplay: React.FC<\n ConnectedComparableListingDisplayProps\n> = ({\n listing: {\n listingId,\n section,\n row,\n price,\n currencyCode,\n isOutlier,\n isAnchor,\n isYourListing,\n isSelectedWithListingGroup,\n validPurchaseQuantities,\n listingNotes,\n },\n ...props\n}) => {\n if (price == null || currencyCode == null) {\n return null;\n }\n\n const formatter = new Intl.NumberFormat('en-US', {\n style: 'currency',\n currency: currencyCode,\n });\n\n return (\n \n );\n};\n","import { Content } from 'src/contexts/ContentContext';\nimport { Stack } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { FormatOption } from 'src/modals/EditTableColumns';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { applyNumberFormatting } from 'src/utils/numberFormatter';\nimport { Feature, UiCurrency } from 'src/WebApiController';\n\nimport { DisplayType } from './ComparableListingItem';\nimport * as styles from './FloorCeilingBarDisplay.css';\n\nexport type FloorCeilingBarDisplayProps = {\n displayType: DisplayType.FloorDisplay | DisplayType.CeilingDisplay;\n currency: UiCurrency;\n floorCeilingPrice: number;\n};\n\nexport const FloorCeilingBarDisplay: React.FC = ({\n displayType,\n currency,\n floorCeilingPrice,\n}) => {\n return (\n
    \n
    \n \n \n \n \n \n \n {applyNumberFormatting({\n precision: FormatOption.Precise,\n inputNumber: floorCeilingPrice,\n currencyCode: currency.code,\n currencyDecimalDigits: currency.dec,\n })}\n \n \n
    \n
    \n );\n};\n","import { Content } from 'src/contexts/ContentContext';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n Feature,\n ListingPriceCalculation,\n Seating,\n} from 'src/WebApiController';\n\nimport {\n ComparableListingDisplay,\n ComparableListingDisplayProps,\n} from '../../ComparableListingDisplay';\nimport { ComparableListing } from '../ComparableListings';\nimport * as styles from './YourAutoPricerResultsDisplay.css';\n\nexport type YourAutopriceResultsDisplayProps = Pick<\n ComparableListingDisplayProps,\n 'isCurrentListing'\n> & {\n currentListing: ComparableListing;\n anchorListing?: ComparableListing;\n listingPriceCalc?: ListingPriceCalculation | null;\n};\n\nexport const YourAutopriceResultsDisplay: React.FC<\n YourAutopriceResultsDisplayProps\n> = ({ isCurrentListing, currentListing, anchorListing, listingPriceCalc }) => {\n const hasIntelligiblePricePreviewFeature = useUserHasFeature(\n Feature.IntelligiblePricePreview\n );\n\n if (currentListing.price == null || currentListing.currencyCode == null) {\n return null;\n }\n\n if (anchorListing) {\n if (anchorListing.price == null || anchorListing.currencyCode == null) {\n return null;\n }\n }\n\n const formatterCurrent = new Intl.NumberFormat('en-US', {\n style: 'currency',\n currency: currentListing.currencyCode,\n });\n\n const formatterAnchor =\n anchorListing == null\n ? null\n : new Intl.NumberFormat('en-US', {\n style: 'currency',\n currency: anchorListing.currencyCode,\n });\n\n return hasIntelligiblePricePreviewFeature ? (\n \n ) : (\n
    \n \n {anchorListing && (\n \n )}\n\n \n
    \n );\n};\n","import {\n ConnectedComparableListingDisplay,\n ConnectedComparableListingDisplayProps,\n} from './ConnectedComparableListingDisplay';\nimport {\n FloorCeilingBarDisplay,\n FloorCeilingBarDisplayProps,\n} from './FloorCeilingBarDisplay';\nimport {\n YourAutopriceResultsDisplay,\n YourAutopriceResultsDisplayProps,\n} from './YourAutoPricerResultsDisplay';\n\nexport enum DisplayType {\n FloorDisplay = 'FloorDisplay',\n CeilingDisplay = 'CeilingDisplay',\n AutopricerDisplay = 'AutopricerDisplay',\n ComparableDisplay = 'ComparableDisplay',\n}\n\nexport type ComparableListingItemProps = {\n displayType: DisplayType;\n itemProps:\n | FloorCeilingBarDisplayProps\n | YourAutopriceResultsDisplayProps\n | ConnectedComparableListingDisplayProps;\n};\n\nexport const ComparableListingItem: React.FC = ({\n displayType,\n itemProps,\n}) => {\n switch (displayType) {\n case DisplayType.FloorDisplay:\n case DisplayType.CeilingDisplay:\n return (\n \n );\n\n case DisplayType.AutopricerDisplay:\n return (\n \n );\n default:\n return (\n \n );\n }\n};\n","import React, { useCallback, useMemo } from 'react';\nimport { Virtuoso } from 'react-virtuoso';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { compareNumber } from 'src/utils/miscUtils';\nimport {\n Feature,\n ListingNote,\n ListingPriceCalculation,\n} from 'src/WebApiController';\n\nimport {\n ComparableListingItem,\n ComparableListingItemProps,\n DisplayType,\n} from './ComparableListingItem';\nimport * as styles from './ComparableListings.css';\n\nconst calculateDealScore = (\n sellerNetProceeds: number | undefined | null,\n seatScore: number | undefined | null\n) => {\n if (sellerNetProceeds == null || !seatScore) {\n return undefined;\n }\n\n return sellerNetProceeds / seatScore;\n};\n\nexport type ComparableListing = {\n listingId: number;\n section?: string;\n row?: string;\n seatFr?: string;\n seatTo?: string;\n price?: number | null;\n sellerNetProceeds?: number;\n currencyCode?: string;\n listingNotes?: ListingNote[];\n isYourListing?: boolean;\n isOutlier?: boolean;\n isAnchor?: boolean;\n seatScore?: number | null;\n availableTickets?: number | null;\n validPurchaseQuantities?: number[] | null;\n isSelectedWithListingGroup?: boolean;\n};\n\nexport type ComparableListingsProps = {\n currentListings?: ComparableListing[];\n comparableListings: ComparableListing[];\n sortBy?: 'price' | 'dealScore';\n isLtGrp?: boolean;\n isSortDescending?: boolean;\n floorPrice?: number | null;\n ceilingPrice?: number | null;\n showAutoPriceResults?: boolean;\n listingPriceCalc?: ListingPriceCalculation | null;\n};\n\nexport const ComparableListings: React.FC = ({\n currentListings,\n comparableListings,\n isLtGrp,\n sortBy,\n isSortDescending,\n floorPrice,\n ceilingPrice,\n showAutoPriceResults,\n listingPriceCalc,\n}) => {\n const { getUiCurrency } = useLocalizationContext();\n\n const hasIntelligiblePricePreviewFeature = useUserHasFeature(\n Feature.IntelligiblePricePreview\n );\n\n const firstCurrentListing = currentListings?.[0];\n const currentListingIds = useMemo(() => {\n return currentListings?.map((listing) => listing.listingId);\n }, [currentListings]);\n\n const floorPriceUICurrency = getUiCurrency(firstCurrentListing?.currencyCode);\n\n const addFloorCeilingLine = useCallback(\n (\n items: ComparableListingItemProps[],\n type: DisplayType.FloorDisplay | DisplayType.CeilingDisplay,\n price: number\n ) => {\n if (!hasIntelligiblePricePreviewFeature) return false;\n\n items.push({\n displayType: type,\n itemProps: {\n displayType: type,\n floorCeilingPrice: price,\n currency: floorPriceUICurrency,\n },\n });\n\n return true;\n },\n [floorPriceUICurrency, hasIntelligiblePricePreviewFeature]\n );\n\n const allListings = useMemo(() => {\n const all: ComparableListing[] = [];\n if (currentListings) {\n all.push(...currentListings);\n }\n all.push(...comparableListings);\n\n return all.toSorted((a, b) => {\n let cmpRes = 0;\n if (sortBy === 'dealScore') {\n const dealScoreA = calculateDealScore(a.sellerNetProceeds, a.seatScore);\n const dealScoreB = calculateDealScore(b.sellerNetProceeds, b.seatScore);\n cmpRes = compareNumber(dealScoreA, dealScoreB);\n } else if (sortBy === 'price') {\n cmpRes = compareNumber(a.price, b.price);\n }\n return cmpRes * (isSortDescending ? -1 : 1);\n });\n }, [comparableListings, currentListings, sortBy, isSortDescending]);\n\n const hasCurrentListingAndAnchor = useMemo(() => {\n return (\n firstCurrentListing &&\n comparableListings.some((listing) => listing.isAnchor)\n );\n }, [comparableListings, firstCurrentListing]);\n\n // this is always set to true if the feature is present\n showAutoPriceResults =\n showAutoPriceResults || hasIntelligiblePricePreviewFeature;\n\n const showCurrentWithAnchor = useMemo(() => {\n if (isLtGrp || hasIntelligiblePricePreviewFeature) {\n // we do not show anchor for listing-group or the new IntelligiblePricePreview feature\n return false;\n }\n return showAutoPriceResults && hasCurrentListingAndAnchor;\n }, [\n hasCurrentListingAndAnchor,\n hasIntelligiblePricePreviewFeature,\n isLtGrp,\n showAutoPriceResults,\n ]);\n\n const listingItems = useMemo(() => {\n const items: ComparableListingItemProps[] = [];\n let floorPriceShown = false;\n let ceilingPriceShown = false;\n\n // Determine if all listings are above floor/ceiling\n if (sortBy === 'price') {\n if (floorPrice != null) {\n const anyPriceLessThanFloor = allListings.some(\n (l) => l.price != null && l.price < floorPrice\n );\n if (!anyPriceLessThanFloor) {\n // If there are no listing less than floor, show floor first\n floorPriceShown = addFloorCeilingLine(\n items,\n DisplayType.FloorDisplay,\n floorPrice\n );\n }\n }\n if (ceilingPrice != null) {\n const anyPriceLessThanCeiling = allListings.some(\n (l) => l.price != null && l.price < ceilingPrice\n );\n if (!anyPriceLessThanCeiling) {\n // If there are no listing less than ceiling, show ceiling first\n ceilingPriceShown = addFloorCeilingLine(\n items,\n DisplayType.CeilingDisplay,\n ceilingPrice\n );\n }\n }\n }\n\n allListings.forEach((listing) => {\n if (listing.listingId === firstCurrentListing?.listingId) {\n if (showCurrentWithAnchor) {\n return;\n }\n }\n\n if (\n sortBy === 'price' &&\n !floorPriceShown &&\n floorPrice != null &&\n listing.price != null\n ) {\n if (\n (isSortDescending && listing.price < floorPrice) ||\n (!isSortDescending && listing.price >= floorPrice)\n ) {\n floorPriceShown = addFloorCeilingLine(\n items,\n DisplayType.FloorDisplay,\n floorPrice\n );\n }\n }\n\n if (\n sortBy === 'price' &&\n !ceilingPriceShown &&\n ceilingPrice != null &&\n listing.price != null\n ) {\n if (\n (isSortDescending && listing.price < ceilingPrice) ||\n (!isSortDescending && listing.price >= ceilingPrice)\n ) {\n ceilingPriceShown = addFloorCeilingLine(\n items,\n DisplayType.CeilingDisplay,\n ceilingPrice\n );\n }\n }\n\n if (showCurrentWithAnchor && listing.isAnchor) {\n items.push({\n displayType: DisplayType.AutopricerDisplay,\n itemProps: {\n isCurrentListing: currentListingIds?.includes(listing.listingId),\n currentListing: firstCurrentListing!,\n anchorListing: listing,\n listingPriceCalc,\n },\n });\n } else if (listing.listingId === firstCurrentListing?.listingId) {\n if (showAutoPriceResults && !showCurrentWithAnchor) {\n items.push({\n displayType: DisplayType.AutopricerDisplay,\n itemProps: {\n isCurrentListing: currentListingIds?.includes(listing.listingId),\n currentListing: firstCurrentListing!,\n listingPriceCalc,\n },\n });\n }\n } else {\n items.push({\n displayType: DisplayType.ComparableDisplay,\n itemProps: {\n isCurrentListing: currentListingIds?.includes(listing.listingId),\n listing,\n },\n });\n }\n });\n\n // Determine if all listings are below floor/ceiling\n if (sortBy === 'price') {\n if (floorPrice != null && !floorPriceShown) {\n // If there are no listing greater than floor, show floor last\n addFloorCeilingLine(items, DisplayType.FloorDisplay, floorPrice);\n }\n if (ceilingPrice != null && !ceilingPriceShown) {\n // If there are no listing greater than ceiling, show ceiling last\n addFloorCeilingLine(items, DisplayType.CeilingDisplay, ceilingPrice);\n }\n }\n\n return items;\n }, [\n addFloorCeilingLine,\n allListings,\n ceilingPrice,\n currentListingIds,\n firstCurrentListing,\n floorPrice,\n isSortDescending,\n listingPriceCalc,\n showAutoPriceResults,\n showCurrentWithAnchor,\n sortBy,\n ]);\n\n return (\n
    \n
    \n }\n />\n
    \n
    \n );\n};\n","import { KeyboardEvent, useEffect, useMemo } from 'react';\nimport {\n ComparableListing,\n ComparableListings,\n} from 'src/components/Listings/ComparableListings';\nimport { useActiveFocusContext } from 'src/contexts/ActiveFocusContext/ActiveFocusContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { Stack } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { flattenListingGroup } from 'src/modals/GroupListings/components/groupingUtils';\nimport {\n getAllInPriceFromListPrice,\n getAllInPriceFromListPriceForListing,\n} from 'src/utils/inventoryUtils';\nimport {\n ActivityLogClient,\n CompListing,\n Feature,\n Listing,\n ListingPriceCalculation,\n Marketplace,\n} from 'src/WebApiController';\n\nimport * as styles from './ConnectedComparableListings.css';\n\nexport type ListingWithSeatScore = Listing & {\n seatScore?: number | null | undefined;\n};\n\nexport type CompListingWithSeatScore = CompListing & {\n seatScore?: number | null | undefined;\n};\n\nexport type ConnectedComparableListingsProps = {\n isLoading?: boolean;\n currentListing?: ListingWithSeatScore;\n priceOverride?: number | null;\n currentListingFromListingGroup?: ListingWithSeatScore[];\n comparableListings: CompListingWithSeatScore[];\n seatScore?: number | null;\n sortBy?: 'price' | 'dealScore';\n showAutoPriceResults?: boolean;\n isSortDescending?: boolean;\n listingPriceCalc?: ListingPriceCalculation | null;\n /**\n * User's listings\n */\n listings?: Listing[] | null;\n};\n\nconst mapListingToComparableListing = (\n listing: ListingWithSeatScore,\n isSelectedWithListingGroup: boolean\n): ComparableListing => ({\n listingId: listing.id,\n section: listing.seating.section,\n row: listing.seating.row ?? undefined,\n seatFr: listing.seating.seatFr ?? undefined,\n seatTo: listing.seating.seatTo ?? undefined,\n price: getAllInPriceFromListPriceForListing(listing),\n currencyCode: listing.currency,\n listingNotes: listing.seatTraits ?? undefined,\n // Price assuming same fees as seller’s account\n sellerNetProceeds: listing.listPrice,\n seatScore: listing.seatScore,\n isYourListing: true,\n availableTickets: listing.availQty,\n validPurchaseQuantities: listing.vldPurQty,\n isSelectedWithListingGroup: isSelectedWithListingGroup,\n});\n\nexport function ConnectedComparableListings({\n isLoading,\n currentListing,\n currentListingFromListingGroup,\n comparableListings,\n listings,\n listingPriceCalc,\n ...rest\n}: ConnectedComparableListingsProps) {\n const hasCondensedInventory = useUserHasFeature(\n Feature.CondensedPreviewTabsAndSingleListing\n );\n\n const { activeAccountWebClientConfig } = useAppContext();\n\n const { onKeyDownHandler, activeItem } = useActiveFocusContext();\n const activeItemIndex = activeItem?.index;\n\n const onCurrentKeyDownHandler = (e: KeyboardEvent) => {\n onKeyDownHandler(e, activeItemIndex ?? 0);\n };\n\n const marketplaceListingIdsSet = useMemo(() => {\n const flattenedListings = (listings?.flatMap(flattenListingGroup) ??\n []) as Listing[];\n\n return new Set(\n flattenedListings.reduce((ids, listing) => {\n const stubHubMkpListings = listing.mkpListings?.find(\n ({ mkp }) => mkp === Marketplace.StubHub\n );\n if (stubHubMkpListings?.mkpListingId) {\n ids.push(parseInt(stubHubMkpListings?.mkpListingId));\n }\n return ids;\n }, [] as number[])\n );\n }, [listings]);\n\n const { loginContext } = useAppContext();\n const stubHubMkpSettings =\n loginContext?.user?.activeAccount?.marketplaceSettings?.find(\n (m) => m.mkp === Marketplace.StubHub\n );\n\n const currentListings = useMemo(() => {\n if (currentListingFromListingGroup) {\n return currentListingFromListingGroup.map((l) =>\n mapListingToComparableListing(l, true)\n );\n }\n\n return currentListing\n ? [mapListingToComparableListing(currentListing, false)]\n : undefined;\n }, [currentListing, currentListingFromListingGroup]);\n\n const comparableListingsLoaded = useMemo(() => {\n return !isLoading && currentListing?.id != null;\n }, [currentListing?.id, isLoading]);\n\n useEffect(() => {\n if (comparableListingsLoaded && currentListing) {\n new ActivityLogClient(activeAccountWebClientConfig).trackListingCompsView(\n currentListing.id\n );\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [comparableListingsLoaded]);\n\n return (\n \n {isLoading ? (\n hasCondensedInventory ? null : (\n \n )\n ) : (\n \n ({\n listingId: compListing.listingId,\n section: compListing.section ?? undefined,\n row: compListing.row ?? undefined,\n seatFr: compListing.seatFrom ?? undefined,\n seatTo: compListing.seatTo ?? undefined,\n price: compListing.sellerAllInPrice?.amt,\n currencyCode: compListing.currencyCode ?? undefined,\n listingNotes: compListing.listingNotes ?? undefined,\n sellerNetProceeds:\n compListing.sellerNetProceeds?.amt ?? undefined,\n isOutlier:\n compListing.isWithoutOutlier == null\n ? false\n : compListing.isWithoutOutlier,\n isAnchor: compListing.isAnchor ?? false,\n isYourListing:\n marketplaceListingIdsSet.has(compListing.listingId) ||\n compListing.isSellerCompListing,\n seatScore: compListing.seatScore,\n availableTickets: compListing.availableTickets,\n validPurchaseQuantities:\n compListing.validPurchaseQuantities,\n }) as ComparableListing\n )\n : []\n }\n floorPrice={\n listingPriceCalc?.cmpFlr?.amt ?? currentListing?.procsFloor\n ? getAllInPriceFromListPrice(\n listingPriceCalc?.cmpFlr?.amt ?? currentListing?.procsFloor,\n currentListing,\n stubHubMkpSettings?.sellerFee\n )\n : undefined\n }\n ceilingPrice={\n listingPriceCalc?.cmpCeil?.amt ?? currentListing?.procsCeil\n ? getAllInPriceFromListPrice(\n listingPriceCalc?.cmpCeil?.amt ?? currentListing?.procsCeil,\n currentListing,\n stubHubMkpSettings?.sellerFee\n )\n : undefined\n }\n listingPriceCalc={listingPriceCalc}\n isLtGrp={!!currentListingFromListingGroup}\n {...rest}\n />\n )}\n \n );\n}\n","import { useQuery } from '@tanstack/react-query';\nimport { head, uniqBy } from 'lodash-es';\nimport { useCallback, useState } from 'react';\nimport { useDebounce } from 'react-use';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { getSectionInfoDisplay } from 'src/utils/autoPricingUtils';\nimport { filterSectionByZone } from 'src/utils/venueConfigUtils';\nimport {\n ListingClient,\n ListingDetailsPricingUpdates,\n ListingPriceCalculation,\n SectionInfo,\n VenueMapInfo,\n} from 'src/WebApiController';\n\ntype AutoPricingPreviewQueryKeyType =\n | {\n listingId: number | undefined;\n eventId: number | null;\n listingInput: ListingDetailsPricingUpdates | undefined;\n }\n | undefined;\n\nexport const useAutoPricingPreview = (\n viagogoEventId: number | null,\n listingId?: number | undefined,\n listingInput?: ListingDetailsPricingUpdates\n) => {\n const [queryKey, setQueryKey] =\n useState(undefined);\n\n useDebounce(\n () =>\n setQueryKey({\n eventId: viagogoEventId,\n listingId,\n listingInput: listingInput,\n }),\n 300,\n [viagogoEventId, listingId, JSON.stringify(listingInput)]\n );\n\n const { trackError } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const shouldQuery = Boolean(\n activeAccountWebClientConfig.activeAccountId != null &&\n queryKey?.eventId &&\n queryKey?.listingId &&\n queryKey?.listingInput\n );\n\n const priceCalcQuery = useQuery({\n queryKey: ['ListingClient.getListingPriceCalculation', queryKey],\n queryFn: async () => {\n if (!shouldQuery) {\n return null;\n }\n\n const r = await new ListingClient(\n activeAccountWebClientConfig\n ).getListingPriceCalculation(\n queryKey?.eventId ?? undefined,\n queryKey?.listingId ?? undefined,\n queryKey?.listingInput!\n );\n return r;\n },\n\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n networkMode: 'offlineFirst',\n meta: {\n persist: false,\n onError: (error: ErrorTypes) => {\n trackError(\n 'ListingClient.getListingPriceCalculation',\n error,\n listingInput\n );\n },\n },\n });\n\n return { priceCalcQuery };\n};\n\nexport const useVenueMapHandlers = (\n filterSections: SectionInfo[],\n pricingPreview?: ListingPriceCalculation,\n venueMapInfo?: VenueMapInfo | null,\n onSelectedSectionsChange?: (selectedSections: SectionInfo[]) => void\n) => {\n const onShiftSelect = useCallback(\n (sectionInfo: SectionInfo) => {\n // We are using the ticketClassId to group the sections\n const selectedClassId = head(\n sectionInfo?.rows\n ?.map(({ tktClass: ticketClass }) => ticketClass?.id)\n .filter((id) => !!id)\n );\n const classSections =\n venueMapInfo?.sections?.filter(filterSectionByZone(selectedClassId)) ||\n [];\n\n const classedSectionIds = classSections.map(({ id }) => id);\n const filteredSeciontIds = filterSections.map(({ id }) => id);\n let cloned = [...filterSections];\n if (classedSectionIds.every((id) => filteredSeciontIds.includes(id))) {\n cloned = cloned.filter(({ id }) => !classedSectionIds.includes(id));\n } else {\n for (const section of classSections) {\n if (!filteredSeciontIds.includes(section.id)) {\n cloned.push(section);\n }\n }\n }\n onSelectedSectionsChange?.(cloned);\n },\n [filterSections, onSelectedSectionsChange, venueMapInfo?.sections]\n );\n\n const onSingleSelect = useCallback(\n (section: SectionInfo) => {\n const idx = filterSections.findIndex(({ id }) => id === section.id);\n const cloned = [...filterSections];\n if (idx === -1) {\n cloned.push(section);\n } else {\n cloned.splice(idx, 1);\n }\n onSelectedSectionsChange?.(cloned);\n },\n [filterSections, onSelectedSectionsChange]\n );\n\n const onSectionClicked = useCallback(\n (e: MouseEvent, sectionInfo: SectionInfo) => {\n if (e.shiftKey) {\n onShiftSelect(sectionInfo);\n return;\n }\n\n onSingleSelect(sectionInfo);\n },\n [onSingleSelect, onShiftSelect]\n );\n\n const onToggleMirrors = useCallback(\n (mirrors: SectionInfo[], exclude?: boolean) => {\n if (exclude) {\n const idsToExclude = mirrors.map(({ id }) => id);\n const updated = uniqBy(\n filterSections.filter(({ id }) => !idsToExclude.includes(id)),\n 'id'\n ).toSorted((a, b) => a.name.localeCompare(b.name));\n onSelectedSectionsChange?.(updated);\n } else {\n const updated = uniqBy(filterSections.concat(mirrors), 'id').toSorted(\n (a, b) => a.name.localeCompare(b.name)\n );\n onSelectedSectionsChange?.(updated);\n }\n },\n [filterSections, onSelectedSectionsChange]\n );\n\n const onSectionHovered = useCallback(\n (hoveredSection: SectionInfo) => {\n return getSectionInfoDisplay(\n hoveredSection,\n pricingPreview?.compListings ?? [],\n venueMapInfo?.sectionScores\n );\n },\n [pricingPreview?.compListings, venueMapInfo?.sectionScores]\n );\n\n return {\n onSectionClicked,\n onToggleMirrors,\n onSectionHovered,\n };\n};\n","import { isEmpty } from 'lodash-es';\nimport { ChangeEvent, useCallback, useEffect, useMemo, useRef } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { Stack } from 'src/core/ui';\nimport { FloorAdjustmentInput } from 'src/dialogs/BulkEdits/BulkEditAutoPricingSettingsDialog/components/PricingProtection/FloorAdjustmentInput';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { PRICING_FLOOR_CEIL_ADJUSTMENT_TYPE_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport {\n getAllInPriceFromListPrice,\n getListPriceFromAllinPrice,\n} from 'src/utils/inventoryUtils';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport {\n Listing,\n ListingDetailsAutoPricingSectionUpdatesV2,\n Marketplace,\n PricingFloorCeilingAdjustmentType,\n} from 'src/WebApiController';\n\nexport const QuickFloorInput = ({\n listing,\n disabled,\n onEnterKeyPressed,\n}: {\n listing: Listing;\n disabled?: boolean;\n onEnterKeyPressed?: () => void;\n}) => {\n const { loginContext } = useAppContext();\n const { getUiCurrency } = useLocalizationContext();\n const stubHubMkpSettings =\n loginContext?.user?.activeAccount?.marketplaceSettings?.find(\n (m) => m.mkp === Marketplace.StubHub\n );\n\n const uiCurrency = getUiCurrency(\n loginContext?.user?.activeAccount?.currencyCode\n );\n\n const { setValue, watch } =\n useFormContext();\n\n const netProceedsFloor = watch('netProceedsFloor');\n const netProceedsFloorAdjustmentType = watch(\n 'netProceedsFloorAdjustmentType'\n );\n const netProceedsFloorAdjustmentAmount = watch(\n 'netProceedsFloorAdjustmentAmount'\n );\n const netProceedsFloorAdjustmentRelative = watch(\n 'netProceedsFloorAdjustmentRelative'\n );\n\n const onPriceFloorChange = useCallback(\n (e: ChangeEvent) => {\n const v = parseFloat(e.target.value);\n const newNetProceedFloor = getListPriceFromAllinPrice(\n v,\n listing,\n stubHubMkpSettings?.sellerFee\n );\n if (\n newNetProceedFloor &&\n newNetProceedFloor >= 0 &&\n newNetProceedFloor < (listing.procsCeil ?? Number.MAX_VALUE)\n ) {\n setValue('netProceedsFloor', posChangedField(newNetProceedFloor));\n } else {\n setValue('netProceedsFloor', null);\n }\n },\n [listing, setValue, stubHubMkpSettings?.sellerFee]\n );\n\n const onUpdateNetProceedsFloorAdjustment = useCallback(\n (input: {\n isRelative?: boolean;\n adjustmentAmount?: number | null;\n adjustmentType?: PricingFloorCeilingAdjustmentType;\n }) => {\n if (isEmpty(input)) {\n setValue('netProceedsFloorAdjustmentAmount', null);\n setValue('netProceedsFloorAdjustmentRelative', false);\n setValue('netProceedsFloorAdjustmentType', null);\n }\n const { isRelative, adjustmentAmount, adjustmentType } = input;\n if (isRelative !== undefined) {\n setValue('netProceedsFloorAdjustmentRelative', isRelative);\n }\n if (adjustmentAmount !== undefined) {\n setValue('netProceedsFloorAdjustmentAmount', adjustmentAmount);\n }\n if (adjustmentType !== undefined) {\n setValue('netProceedsFloorAdjustmentType', adjustmentType);\n }\n },\n [setValue]\n );\n\n const valueOptionsDisabled = useMemo(() => {\n const result: Record = {};\n\n if (listing.procsFloor == null) {\n result[PricingFloorCeilingAdjustmentType.CurrentFloor] =\n ContentId.ListingHasNoCurrentFloor;\n }\n if (listing.undNewPrice == null) {\n result[PricingFloorCeilingAdjustmentType.MarketPrice] =\n ContentId.ListingHasNoMarketprice;\n }\n if (listing.unitCst == null) {\n result[PricingFloorCeilingAdjustmentType.UnitCost] =\n ContentId.ListingHasNoUnitCost;\n }\n\n return result;\n }, [listing.procsFloor, listing.undNewPrice, listing.unitCst]);\n\n const inputboxRef = useRef(null);\n\n const onHandleEnterKey = useCallback(\n (e: KeyboardEvent) => {\n if (!disabled && onEnterKeyPressed && e.key === 'Enter') {\n e.preventDefault();\n e.stopPropagation();\n\n onEnterKeyPressed();\n }\n },\n [disabled, onEnterKeyPressed]\n );\n\n useEffect(() => {\n const curRef = inputboxRef.current;\n if (onEnterKeyPressed && curRef) {\n inputboxRef.current.addEventListener('keydown', onHandleEnterKey);\n }\n\n return () => curRef?.removeEventListener('keydown', onHandleEnterKey);\n }, [onEnterKeyPressed, onHandleEnterKey]);\n\n return (\n <>\n {listing.isAutoPrc &&\n netProceedsFloor?.value == null && // only show relative-floor-input when no floor is set and is auto-pricing\n Object.entries(valueOptionsDisabled).length <\n Object.entries(PRICING_FLOOR_CEIL_ADJUSTMENT_TYPE_TO_CID).length ? (\n \n {\n onUpdateNetProceedsFloorAdjustment({\n adjustmentAmount: amount,\n isRelative,\n });\n }}\n />\n\n {\n if (\n newValue != null &&\n newValue != netProceedsFloorAdjustmentType\n ) {\n onUpdateNetProceedsFloorAdjustment({\n adjustmentType: newValue,\n });\n }\n }}\n />\n \n ) : (\n // show the normal floor input if is not auto-pricing or has floor set\n \n \n \n )}\n \n );\n};\n","import clsx from 'clsx';\nimport { PropsWithChildren } from 'react';\nimport { useSiteTheme } from 'src/contexts/SiteTheme/SiteThemeContext';\nimport { vars } from 'src/core/themes';\nimport { mergeProps } from 'src/core/utils';\nimport { CrossIcon, MoreIcon } from 'src/svgs/Viagogo';\n\nimport * as styles from './FloatingToolbar.css';\n\nexport const FloatingToolbar = ({\n children,\n onToggleCollapsed,\n isCollapsed,\n disabled,\n ...rest\n}: PropsWithChildren<{\n onToggleCollapsed?: (forceCollapse?: boolean) => void;\n isCollapsed?: boolean;\n disabled?: boolean;\n}>) => {\n const { isDarkMode } = useSiteTheme();\n\n return (\n onToggleCollapsed?.(false) : undefined\n }\n >\n {!isCollapsed ? (\n <>\n {children}\n\n onToggleCollapsed?.(true)}\n withHoverEffect\n size={vars.iconSize.xs}\n />\n \n ) : (\n \n )}\n
    \n );\n};\n","import { PosIconProps } from './SvgWrapper';\n\nexport const QuickAtionShieldIcon = (props: Omit) => {\n return (\n \n \n \n );\n};\n","import { useCallback, useEffect, useState } from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { QuickFloorInput } from 'src/components/AutoPricing/QuickFloorInput';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { useSiteTheme } from 'src/contexts/SiteTheme/SiteThemeContext';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { RotatingWrapper } from 'src/core/ui/AnimatingWrapper';\nimport { FloatingToolbar } from 'src/core/ui/FloatingToolbar';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport { QuickAtionShieldIcon } from 'src/svgs/QuickAtionShieldIcon';\nimport { ProcessingIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { isSuccess } from 'src/utils/errorUtils';\nimport { posField } from 'src/utils/posFieldUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n Listing,\n ListingClient,\n ListingDetailsAutoPricingSectionUpdatesV2,\n PricingFloorCeilingAdjustmentType,\n UserSetting,\n} from 'src/WebApiController';\n\nexport const QuickFloorToolbar = ({ listing }: { listing: Listing }) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { isDarkMode } = useSiteTheme();\n const { showErrorDialog } = useErrorBoundaryContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n\n const { value: quickFloorCollapsed, setUserSetting: setQuickFloorCollapsed } =\n useServerUserSetting({\n id: UserSetting.QuickFloorPromptDismissal,\n });\n\n const [isSubmitting, setIsSubmitting] = useState(false);\n\n const [isCollapsed, setIsCollapsed] = useState(\n quickFloorCollapsed\n );\n\n useEffect(() => {\n if (isCollapsed == null) {\n if (quickFloorCollapsed != null) {\n // if there is user settings, use is\n setIsCollapsed(quickFloorCollapsed);\n }\n }\n }, [isCollapsed, listing, quickFloorCollapsed]);\n\n const quickFloorForm = useForm({\n defaultValues: {\n id: listing.id,\n rowVersion: listing.rowVer,\n currencyCode: listing.currency,\n netProceedsFloor: posField(listing.procsFloor),\n netProceedsFloorAdjustmentType: listing.undNewPrice\n ? PricingFloorCeilingAdjustmentType.MarketPrice\n : listing.procsFloor\n ? PricingFloorCeilingAdjustmentType.CurrentFloor\n : listing.unitCst\n ? PricingFloorCeilingAdjustmentType.UnitCost\n : null,\n netProceedsFloorAdjustmentRelative: false,\n },\n });\n\n const { watch, getValues, reset } = quickFloorForm;\n\n const floor = watch('netProceedsFloor');\n const netProceedsFloorAdjustmentAmount = watch(\n 'netProceedsFloorAdjustmentAmount'\n );\n\n const hasChanged =\n (floor?.value != null && floor?.hasChanged) ||\n netProceedsFloorAdjustmentAmount != null;\n\n const onSave = useCallback(() => {\n const input = getValues();\n\n tryInvokeApi(\n async () => {\n if (isSubmitting) return;\n\n setIsSubmitting(true);\n\n const result = await new ListingClient(\n activeAccountWebClientConfig\n ).updateListingAutoPricingSectionV2(input);\n\n if (isSuccess(result)) {\n await refreshExpandedListItems();\n reset({\n ...input,\n // Reset these so they become unchanged\n netProceedsFloorAdjustmentAmount: null,\n netProceedsFloor: posField(input.netProceedsFloor?.value),\n });\n } else {\n showErrorDialog('Unable to save changes.', result, {\n trackErrorData: input,\n });\n }\n },\n (error) => {\n showErrorDialog(\n 'ListingClient.updateListingAutoPricingSectionV2',\n error,\n { trackErrorData: input }\n );\n },\n () => {\n setIsSubmitting(false);\n }\n );\n }, [\n activeAccountWebClientConfig,\n getValues,\n isSubmitting,\n refreshExpandedListItems,\n reset,\n showErrorDialog,\n ]);\n\n return (\n {\n if (collapsed == null) {\n collapsed = !isCollapsed; // toggle previous state\n }\n setIsCollapsed(collapsed);\n setQuickFloorCollapsed(collapsed);\n }}\n >\n \n \n \n \n \n \n \n \n \n \n \n );\n};\n","import clsx from 'clsx';\nimport { union } from 'lodash-es';\nimport { useCallback, useMemo } from 'react';\nimport { SimplifiedAutopricingSection } from 'src/components/AutoPricing/SimplifiedAutopricingSection';\nimport { SimplifiedAutopricingSection as SimplifiedAutopricingSectionV2 } from 'src/components/AutoPricing/SimplifiedAutopricingSectionV2';\nimport { ColorBandProps } from 'src/components/Events/VenueMap';\nimport { EventVenueMap } from 'src/components/Events/VenueMap/EventVenueMap';\nimport { VenueMapContentProps } from 'src/components/Events/VenueMap/VenueMapContent';\nimport {\n ConnectedComparableListings,\n ListingWithSeatScore,\n} from 'src/components/Listings/ConnectedComparableListings';\nimport { Content } from 'src/contexts/ContentContext';\nimport {\n EventSessionRole,\n useEventHubContext,\n} from 'src/contexts/EventHubContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { Stack } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getListPriceFromAllinPrice } from 'src/utils/inventoryUtils';\nimport {\n getCompleteEventConfigScoreOverrides,\n getMatchingSectionRow,\n getSeatScore,\n} from 'src/utils/seatScoreUtils';\nimport {\n AutoPricingUndercutMode,\n CompListing,\n Feature,\n Listing,\n ListingDetailsPricingUpdates,\n ListingPriceCalculation,\n SectionInfo,\n} from 'src/WebApiController';\n\nimport * as styles from './MapWithCompListingsPreview.css';\nimport { useVenueMapHandlers } from './MapWithCompListingsPreview.hooks';\nimport { QuickFloorToolbar } from './QuickFloorToolbar';\n\ntype MapWithCompListingsPreviewProps = {\n listing?: Listing;\n listingInput: ListingDetailsPricingUpdates;\n pricingPreview?: ListingPriceCalculation;\n compListings: CompListing[];\n compListingsFromListgingGroup?: ListingWithSeatScore[];\n showSimplifiedSettings?: boolean;\n statsContent?: React.ReactNode;\n isLoading?: boolean;\n isInModal?: boolean;\n colorBand?: ColorBandProps;\n getColor?: VenueMapContentProps['getColor'];\n onSelectedSectionsChange?: (selectedSections: SectionInfo[]) => void;\n};\n\nexport const MapWithCompListingsPreview: React.FC<\n MapWithCompListingsPreviewProps\n> = ({\n listing,\n listingInput,\n pricingPreview,\n compListings,\n compListingsFromListgingGroup,\n showSimplifiedSettings,\n statsContent,\n isLoading,\n isInModal = false,\n colorBand,\n getColor,\n onSelectedSectionsChange,\n}) => {\n const { venueMapInfo, activeConfigOverride } = useEventMapContext();\n const { sessionRole, enabled } = useEventHubContext();\n const hasSimplifiedPricingV2Feature = useUserHasFeature(\n Feature.SimplifiedAutoPricingUiV2\n );\n const hasQuickFloorToolbarFeature = useUserHasFeature(\n Feature.QuickFloorToolbar\n );\n\n const sessionView = sessionRole === EventSessionRole.SidePanel;\n\n const filterSections = useMemo(() => {\n const selectedSectionId =\n listingInput?.compListingSelectedSectionSettings?.sectionIdFilter ?? [];\n return (\n venueMapInfo?.sections?.filter(({ id }) =>\n selectedSectionId.includes(id)\n ) ?? []\n );\n }, [\n listingInput?.compListingSelectedSectionSettings?.sectionIdFilter,\n venueMapInfo?.sections,\n ]);\n\n const { onSectionClicked, onToggleMirrors, onSectionHovered } =\n useVenueMapHandlers(\n filterSections,\n pricingPreview,\n venueMapInfo,\n onSelectedSectionsChange\n );\n\n const selectedSectionIds = useMemo(() => {\n if (!listing?.seating) {\n return [];\n }\n\n const { section } = getMatchingSectionRow(\n listing.seating,\n venueMapInfo?.sections\n );\n return section ? [section.id] : [];\n }, [listing?.seating, venueMapInfo?.sections]);\n\n const scoreOverrides = useMemo(\n () =>\n getCompleteEventConfigScoreOverrides(\n venueMapInfo?.sectionScores,\n activeConfigOverride?.scoreOverrides,\n false\n ),\n [activeConfigOverride?.scoreOverrides, venueMapInfo?.sectionScores]\n );\n\n const populateListingWithSeatScore = useCallback(\n (listing?: Listing) => {\n if (!listing) return;\n\n const seatScore = getSeatScore(\n listing.seating,\n scoreOverrides,\n venueMapInfo?.sections\n );\n if (seatScore != null) {\n const listPrice = getListPriceFromAllinPrice(\n pricingPreview?.websitePrice?.amt,\n listing\n );\n return {\n ...listing,\n // This is to make sure we use the auto-preview price instead of the listing's price when showing comparables\n // And we have to override listPrice because allIn is calculated from listPrice (instead of being read from the listing)\n listPrice: listPrice ?? listing.listPrice,\n seatScore,\n };\n }\n\n return listing;\n },\n [pricingPreview?.websitePrice?.amt, scoreOverrides, venueMapInfo?.sections]\n );\n\n const compListingsWithSeatScore: CompListing[] | undefined = useMemo(() => {\n return (\n compListings?.map((l) => {\n const seatScore = getSeatScore(\n l,\n scoreOverrides,\n venueMapInfo?.sections\n );\n if (seatScore != null) return { ...l, seatScore };\n\n return l;\n }) ?? []\n );\n }, [compListings, scoreOverrides, venueMapInfo?.sections]);\n\n const compListingSectionIds = useMemo(() => {\n const sectionNames = (pricingPreview?.compListings ?? []).map(\n (l) => l.section\n );\n const sectionIds = (venueMapInfo?.sections ?? [])\n .filter((section) => sectionNames.includes(section.name))\n .map(({ id }) => id);\n\n const selected = filterSections.map((section) => section.id);\n\n return union(sectionIds, selected);\n }, [pricingPreview?.compListings, venueMapInfo?.sections, filterSections]);\n\n return (\n \n \n }\n />\n
    \n \n {showSimplifiedSettings &&\n (hasSimplifiedPricingV2Feature ? (\n \n ) : (\n \n ))}\n \n {hasQuickFloorToolbarFeature && listing && !isInModal && (\n \n )}\n \n \n );\n};\n","import { groupBy, isEmpty, meanBy } from 'lodash-es';\nimport Rainbow from 'rainbowvis.js';\nimport { useMemo } from 'react';\nimport { VenueMapContentProps } from 'src/components/Events/VenueMap/VenueMapContent';\nimport { vars } from 'src/core/themes';\nimport { flattenListingGroup } from 'src/modals/GroupListings/components/groupingUtils';\nimport { roundToPrecision } from 'src/utils/numberFormatter';\nimport { CompListing, Listing, UiMoney } from 'src/WebApiController';\n\nexport const ListingCompsSpectrum = ['0094DC', 'FFFFFF', 'D80F5E'];\nexport const ListingCompsRangeMin = -10;\nexport const ListingCompsRangeMax = 10;\n/**\n * Number of steps in the spectrum.\n */\nexport const ListingCompsNumberRange =\n ListingCompsRangeMax - ListingCompsRangeMin + 1;\n\nconst STEPS_PER_HALF = (ListingCompsNumberRange - 1) / 2;\n\n/**\n * The ratio that represents the maximum end of the spectrum.\n */\nconst MAX_RATIO = 2;\nconst MAX_RATIO_INCREMENT = Math.abs(MAX_RATIO - 1) / STEPS_PER_HALF;\n/**\n * The ratio that represents the minimum end of the spectrum.\n */\nconst MIN_RATIO = 0.5;\nconst MIN_RATIO_INCREMENT = Math.abs(MIN_RATIO - 1) / STEPS_PER_HALF;\n\n/**\n * Round to 8 decimal places by default.\n */\nconst ROUNDING_DECIMAL_PLACES = 8;\n\n/**\n * Gets the range index for a comparable price on a scale of 50% to 200% of the given `price`.\n *\n * The value is negated before returning because for the spectrum is actual relative to the `price`\n * instead of the comparable price, so the spectrum is actually reversed.\n * @param price\n * @param comparablePrice\n * @returns The color for the given comparable price.\n */\nexport function getCompListingSpectrumIndex(\n price: number,\n comparablePrice: number\n) {\n // the ratio relative to 100%\n const relativeRatio =\n Math.max(MIN_RATIO, Math.min(comparablePrice / price, MAX_RATIO)) - 1;\n if (relativeRatio > 0) {\n return -Math.ceil(\n roundToPrecision(\n relativeRatio / MAX_RATIO_INCREMENT,\n ROUNDING_DECIMAL_PLACES\n )\n );\n }\n if (relativeRatio < 0) {\n return -Math.floor(\n roundToPrecision(\n relativeRatio / MIN_RATIO_INCREMENT,\n ROUNDING_DECIMAL_PLACES\n )\n );\n }\n return 0;\n}\n\nexport function useComparableListingsVenueMapColor(\n listings: Listing[],\n compListings?: CompListing[],\n defaultCompListings?: CompListing[]\n): NonNullable {\n const compListingsBySection = useMemo(() => {\n if (!compListings) return {};\n\n return groupBy(\n compListings.filter((l) => l.section),\n (l) => l.section\n );\n }, [compListings]);\n const compListingsByRowId = useMemo(() => {\n if (!compListings) return {};\n\n return groupBy(\n compListings.filter((l) => l.rowId),\n (l) => l.rowId\n );\n }, [compListings]);\n\n const defaultCompListingsBySection = useMemo(() => {\n if (!defaultCompListings) return {};\n\n return groupBy(\n defaultCompListings.filter((l) => l.section),\n (l) => l.section\n );\n }, [defaultCompListings]);\n const defaultCompListingsByRowId = useMemo(() => {\n if (!defaultCompListings) return {};\n\n return groupBy(\n defaultCompListings.filter((l) => l.rowId),\n (l) => l.rowId\n );\n }, [defaultCompListings]);\n\n const sellerListingsBySection = useMemo(\n () =>\n groupBy(\n listings.flatMap(flattenListingGroup) as Listing[],\n (listing) => listing.seating.section\n ),\n [listings]\n );\n const sellerListingsByRowId = useMemo(\n () =>\n groupBy(\n listings.flatMap(flattenListingGroup) as Listing[],\n (listing) => listing.seating.rowId\n ),\n [listings]\n );\n\n const avgOverallPrice = meanBy(\n (compListings ?? [])\n .map(\n ({ sellerNetProceeds, sellerAllInPrice }) =>\n sellerNetProceeds ?? sellerAllInPrice\n )\n .filter((money): money is UiMoney => money != null),\n ({ amt }) => amt\n );\n\n return useMemo(() => {\n return ({ sectionName, rowId, isSelected, isMarked }) => {\n if (!sectionName && !rowId) {\n return;\n }\n\n if (isSelected) {\n return { fill: vars.color.backgroundHighlightHover, stroke: 'black' };\n }\n\n if (isMarked) {\n return {\n fill: vars.color.backgroundBrandHoverLight,\n stroke: 'black',\n };\n }\n\n const hasSellerListings =\n (rowId && !isEmpty(sellerListingsByRowId[rowId])) ||\n (sectionName && !isEmpty(sellerListingsBySection[sectionName]));\n\n const selectedComplistings =\n (rowId && compListingsByRowId[rowId]) ??\n (sectionName && compListingsBySection[sectionName]);\n\n if (selectedComplistings) {\n const avgCompPrice = meanBy(\n selectedComplistings\n .map(\n ({ sellerNetProceeds, sellerAllInPrice }) =>\n sellerNetProceeds ?? sellerAllInPrice\n )\n .filter((money): money is UiMoney => money != null),\n ({ amt }) => amt\n );\n\n const rainbow = new Rainbow();\n rainbow.setNumberRange(ListingCompsRangeMin, ListingCompsRangeMax);\n rainbow.setSpectrumByArray(ListingCompsSpectrum);\n\n const color = rainbow.colorAt(\n getCompListingSpectrumIndex(avgCompPrice, avgOverallPrice)\n );\n return {\n fill: `#${color}`,\n stroke: hasSellerListings\n ? vars.color.backgroundBrandActive\n : 'black',\n strokeWidth: hasSellerListings ? '10px' : undefined,\n };\n }\n\n const hasCompListing =\n (rowId && !isEmpty(defaultCompListingsByRowId[rowId])) ||\n (sectionName && !isEmpty(defaultCompListingsBySection[sectionName]));\n\n return {\n fill: hasCompListing ? vars.color.backgroundPrimaryActive : 'white',\n stroke: hasCompListing ? 'black' : '#A6A6A6',\n textColor: hasCompListing ? 'black' : '#B7B7B7',\n };\n };\n }, [\n avgOverallPrice,\n compListingsByRowId,\n compListingsBySection,\n defaultCompListingsByRowId,\n defaultCompListingsBySection,\n sellerListingsByRowId,\n sellerListingsBySection,\n ]);\n}\n","import { useMemo } from 'react';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport {\n getMatchingSectionRow,\n getSectionsSameZone,\n} from 'src/utils/seatScoreUtils';\nimport { AutoPricingCompListingMode, Listing } from 'src/WebApiController';\n\n/**\n * Given comp listing settings and event map, returns the disabled section ids which should not be selectable\n * when restricting selection to sections (compListingOnlyForSelectedSectionsEnabled)\n * @param undercutAbsoluteAmount\n * @param undercutRelativeAmount\n * @returns\n */\nexport const useCompListingDisabledSections = (\n listing: Listing | null | undefined,\n isBulkEdit: boolean | undefined,\n compListingMode: AutoPricingCompListingMode | null,\n compListingFloor: number | null,\n compListingCeiling: number | null\n) => {\n const { venueMapInfo } = useEventMapContext();\n\n const disabledSectionIds = useMemo(() => {\n if (!venueMapInfo || !compListingMode || !listing || isBulkEdit) return [];\n\n if (compListingMode === AutoPricingCompListingMode.SameZone) {\n const { ticketClassId } = getMatchingSectionRow(\n listing.seating,\n venueMapInfo.sections\n );\n\n if (ticketClassId == null) return [];\n\n const sectionsSameZone = getSectionsSameZone(\n listing.seating,\n venueMapInfo.sections\n );\n\n return venueMapInfo.sections\n .filter((s) => !sectionsSameZone?.some((ss) => ss.id === s.id))\n .map((s) => s.id);\n } else if (compListingMode === AutoPricingCompListingMode.QualityScore) {\n // section must have at least one row with score within slider range\n const { row } = getMatchingSectionRow(\n listing.seating,\n venueMapInfo.sections\n );\n const rowScore = row?.seatQualityScore;\n\n if (\n rowScore == null ||\n compListingFloor == null ||\n compListingCeiling == null\n )\n return [];\n\n const rowScoreFloor = rowScore * compListingFloor;\n const rowScoreCeiling = rowScore * compListingCeiling;\n\n return venueMapInfo.sections\n .filter((s) => {\n const hasRowWithinRange = s.rows.some(\n (r) =>\n r.seatQualityScore != null &&\n r.seatQualityScore >= rowScoreFloor &&\n r.seatQualityScore <= rowScoreCeiling\n );\n return !hasRowWithinRange;\n })\n .map((s) => s.id);\n }\n\n return [];\n }, [\n compListingCeiling,\n compListingFloor,\n compListingMode,\n isBulkEdit,\n listing,\n venueMapInfo,\n ]);\n\n return {\n disabledSectionIds,\n };\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { DATA_REFRESH_RATE_IN_MILLIS_LONG } from 'src/utils/constants/constants';\nimport {\n Event,\n Feature,\n ListingClient,\n ListingGroupClient,\n} from 'src/WebApiController';\n\nexport const useGetCompListings = (\n event?: Event | null,\n selectedListingId?: number,\n currency?: string,\n selectedListingGroupId?: string | null\n) => {\n const hasGroupCompsFeature = useUserHasFeature(Feature.ListingGroupCompUi);\n\n const { trackError } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n\n const shouldQuery =\n activeAccountWebClientConfig.activeAccountId != null &&\n event?.viagId != null;\n\n const compListingsQuery = useQuery({\n queryKey: [\n 'ListingClient.getCompListingsByEventId',\n activeAccountWebClientConfig,\n event?.viagId,\n selectedListingId,\n ],\n queryFn: () => {\n if (!shouldQuery) {\n return null;\n }\n return new ListingClient(\n activeAccountWebClientConfig\n ).getCompListingsByEventId(event!.viagId!, selectedListingId, currency);\n },\n\n enabled: shouldQuery,\n staleTime: DATA_REFRESH_RATE_IN_MILLIS_LONG,\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError('ListingClient.getCompListingsByEventId', error, {\n trackErrorData: {\n viagogoEventId: event?.viagId,\n selectedListingId,\n },\n });\n },\n },\n });\n\n const shouldQueryListingGroupsQuery =\n activeAccountWebClientConfig.activeAccountId != null &&\n event?.viagId != null &&\n selectedListingGroupId != null &&\n hasGroupCompsFeature;\n\n const compListingsGroupQuery = useQuery({\n queryKey: [\n 'ListingGroupClient.getListingGroupCompData',\n activeAccountWebClientConfig,\n event?.viagId,\n selectedListingGroupId,\n selectedListingId,\n ],\n queryFn: () => {\n if (!shouldQueryListingGroupsQuery) {\n return null;\n }\n\n return new ListingGroupClient(\n activeAccountWebClientConfig\n ).getListingGroupCompData(event!.viagId!, selectedListingGroupId);\n },\n\n enabled: shouldQueryListingGroupsQuery,\n staleTime: DATA_REFRESH_RATE_IN_MILLIS_LONG,\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError('ListingGroupClient.getListingGroupCompData', error, {\n trackErrorData: {\n viagogoEventId: event?.viagId,\n selectedListingId,\n },\n });\n },\n },\n });\n\n return {\n compListingsQuery,\n compListingsGroupQuery,\n };\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { useCallback, useMemo, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useDebounce } from 'react-use';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport {\n AutoPricingCompListingMode,\n AutoPricingOutlierMode,\n AutoPricingUndercutMode,\n CompListingQuantity,\n ListingClient,\n ListingDetailsPricingUpdates,\n ListingDetailsUpdateInput,\n SelectedSectionSettings,\n} from 'src/WebApiController';\n\ntype AutoPricingPreviewQueryKeyType =\n | {\n listingId: number | undefined;\n eventId: number | null;\n priceUpdates: ListingDetailsPricingUpdates;\n }\n | undefined;\n\nexport const useAutoPricingPreview = (\n viagogoEventId: number | null,\n listingId?: number | undefined\n) => {\n const { watch } = useFormContext();\n\n const updatedFields = watch([\n 'netProceedsFloor',\n 'netProceedsCeiling',\n 'autoPricingEnabled',\n 'currencyCode',\n\n 'compListingFloor',\n 'compListingCeiling',\n 'compListingMode',\n 'compListingOnlyForSameZoneEnabled',\n 'compListingOnlyForSelectedSectionsEnabled',\n 'compListingExcludeFanInventory',\n 'compListingExcludeDefects',\n 'compListingQuantityScoreAdjustmentEnabled',\n 'compListingQuantityScoreAdjustmentOverrideJson',\n 'compListingSelectedSectionSettings',\n 'compListingQuantityFilters',\n\n 'undercutMode',\n 'undercutAbsoluteAmount',\n 'undercutRelativeAmount',\n\n 'circuitBreakerMaxDiscountVelocityPercent',\n 'circuitBreakerMaxDiscountVelocityTicksInHours',\n 'circuitBreakerMinCompListingCount',\n 'circuitBreakerRelativeCeiling',\n 'circuitBreakerRelativeFloor',\n\n 'outlierMode',\n 'outlierStandardDeviations',\n 'outlierKthLowestLimit',\n 'outlierKthLowestLimitRelativeSpacing',\n 'outlierKthLowestLimitAbsoluteSpacing',\n ]);\n\n const getListingDetailsPricingUpdates = useCallback(\n (\n listing: [\n number | null,\n number | null,\n boolean | null,\n string | null,\n\n // Comp Listing\n number | null,\n number | null,\n AutoPricingCompListingMode | null,\n boolean | null,\n boolean | null,\n boolean | null,\n boolean | null,\n boolean | null,\n string | null,\n SelectedSectionSettings | null,\n CompListingQuantity | null,\n\n // Undercut\n AutoPricingUndercutMode | null,\n number | null,\n number | null,\n\n // Circuit Breaker\n number | null,\n number | null,\n number | null,\n number | null,\n number | null,\n\n // Outlier\n AutoPricingOutlierMode | null,\n number | null,\n number | null,\n number | null,\n number | null,\n ]\n ) => {\n const [\n netProceedsFloor,\n netProceedsCeiling,\n autoPricingEnabled,\n currencyCode,\n\n compListingFloor,\n compListingCeiling,\n compListingMode,\n compListingOnlyForSameZoneEnabled,\n compListingOnlyForSelectedSectionsEnabled,\n compListingExcludeFanInventory,\n compListingExcludeDefects,\n compListingQuantityScoreAdjustmentEnabled,\n compListingQuantityScoreAdjustmentOverrideJson,\n compListingSelectedSectionSettings,\n compListingQuantityFilters,\n\n undercutMode,\n undercutAbsoluteAmount,\n undercutRelativeAmount,\n\n circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerMaxDiscountVelocityTicksInHours,\n circuitBreakerMinCompListingCount,\n circuitBreakerRelativeCeiling,\n circuitBreakerRelativeFloor,\n\n outlierMode,\n outlierStandardDeviations,\n outlierKthLowestLimit,\n outlierKthLowestLimitRelativeSpacing,\n outlierKthLowestLimitAbsoluteSpacing,\n ] = listing;\n\n return {\n netProceedsFloor,\n netProceedsCeiling,\n autoPricingEnabled,\n currencyCode,\n\n compListingFloor,\n compListingCeiling,\n compListingMode,\n compListingOnlyForSameZoneEnabled,\n compListingOnlyForSelectedSectionsEnabled,\n compListingExcludeFanInventory,\n compListingExcludeDefects,\n compListingQuantityScoreAdjustmentEnabled,\n compListingQuantityScoreAdjustmentOverrideJson,\n compListingSelectedSectionSettings,\n compListingQuantityFilters,\n\n undercutMode,\n undercutAbsoluteAmount,\n undercutRelativeAmount,\n\n circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerMaxDiscountVelocityTicksInHours,\n circuitBreakerMinCompListingCount,\n circuitBreakerRelativeCeiling,\n circuitBreakerRelativeFloor,\n\n outlierMode,\n outlierStandardDeviations,\n outlierKthLowestLimit,\n outlierKthLowestLimitRelativeSpacing,\n outlierKthLowestLimitAbsoluteSpacing,\n } as ListingDetailsPricingUpdates;\n },\n []\n );\n\n const priceUpdates = useMemo(() => {\n return getListingDetailsPricingUpdates(updatedFields);\n }, [getListingDetailsPricingUpdates, updatedFields]);\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n\n const [queryKey, setQueryKey] =\n useState(undefined);\n\n useDebounce(\n () =>\n setQueryKey({\n eventId: viagogoEventId,\n listingId,\n priceUpdates: priceUpdates,\n }),\n 300,\n [viagogoEventId, listingId, JSON.stringify(priceUpdates)]\n );\n\n const { trackError } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const shouldQuery = Boolean(\n activeAccountWebClientConfig.activeAccountId != null &&\n queryKey?.eventId &&\n queryKey?.listingId &&\n queryKey?.priceUpdates\n );\n\n const priceCalcQuery = useQuery({\n queryKey: ['ListingClient.getListingPriceCalculation', queryKey],\n queryFn: async () => {\n if (!shouldQuery) {\n return null;\n }\n\n const r = await new ListingClient(\n activeAccountWebClientConfig\n ).getListingPriceCalculation(\n queryKey?.eventId ?? undefined,\n queryKey?.listingId ?? undefined,\n queryKey?.priceUpdates!\n );\n return r;\n },\n\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n networkMode: 'offlineFirst',\n meta: {\n persist: false,\n onError: (error: ErrorTypes) => {\n trackError(\n 'ListingClient.getListingPriceCalculation',\n error,\n priceUpdates\n );\n },\n },\n });\n\n return { priceCalcQuery, priceUpdates };\n};\n","import {\n createContext,\n ReactNode,\n useCallback,\n useContext,\n useState,\n} from 'react';\n\ntype PanelContentType = 'comparables' | 'sectionSelection' | 'none';\n\ntype ListingDetailsModalSidePanelContextType = {\n contentType: PanelContentType;\n onCloseSidePanel: () => void;\n onShowContent: (\n newContentType: PanelContentType,\n e?: React.MouseEvent\n ) => void;\n};\n\nconst ListingDetailsModalSidePanelContext =\n createContext({\n contentType: 'none',\n onCloseSidePanel: () => {},\n onShowContent: () => {},\n });\n\ntype ListingDetailsModalSidePanelContextProviderProps = {\n children: ReactNode;\n};\n\nexport const ListingDetailsModalSidePanelContextProvider = ({\n children,\n}: ListingDetailsModalSidePanelContextProviderProps) => {\n const [contentType, setContentType] = useState('none');\n\n const onCloseSidePanel = useCallback(() => {\n if (contentType !== 'none') {\n setContentType('none');\n }\n }, [contentType]);\n\n const onShowContent = useCallback(\n (\n newContentType: PanelContentType,\n e?: React.MouseEvent\n ) => {\n e?.stopPropagation();\n e?.preventDefault();\n\n if (contentType !== newContentType) {\n setContentType(newContentType);\n } else if (contentType !== 'none') {\n setContentType('none');\n }\n },\n [contentType]\n );\n\n return (\n \n {children}\n \n );\n};\n\nexport const useListingDetailsModalSidePanelContext = () =>\n useContext(ListingDetailsModalSidePanelContext);\n","import { AutoPriceResultDisplay } from 'src/components/Listings/AutoPriceResultDisplay';\nimport { Content } from 'src/contexts/ContentContext';\nimport { WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { Button, Stack } from 'src/core/ui';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { AutoPricingResultType } from 'src/WebApiController';\n\nimport { useListingDetailsModalSidePanelContext } from '../ListingDetailsModalSidePanel';\nimport * as styles from './AutoPricePreview.css';\nimport { useAutoPricingPreview } from './useAutoPricePreview';\n\nexport const AutoPricePreview = ({\n viagogoEventId,\n listingId,\n}: {\n listingId: number;\n viagogoEventId: number;\n}) => {\n const { priceCalcQuery } = useAutoPricingPreview(viagogoEventId, listingId);\n const isMobile = useMatchMedia('mobile');\n const { onShowContent } = useListingDetailsModalSidePanelContext();\n\n return (\n onShowContent('comparables', e)} // undefined is for toggle\n >\n \n \n \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n {priceCalcQuery.data?.autoPricingResultType && // show when result type is not null and\n priceCalcQuery.data?.autoPricingResultType !==\n AutoPricingResultType.PriceSuccess && // is not success result and\n (priceCalcQuery.data?.autoPricingResultType !==\n AutoPricingResultType.None || // is not none or there's no price display (we show N/A when there's no price indicating we can't even call the endpoint)\n !priceCalcQuery.data?.websitePrice?.disp) && (\n \n )}\n {priceCalcQuery.data?.websitePrice?.disp}\n
    \n
    \n \n
    \n \n \n
    \n {priceCalcQuery.data?.compListings?.length ?? '0'}\n
    \n
    \n \n
    \n \n onShowContent('comparables', e)}\n style={isMobile ? { width: '100%' } : undefined}\n >\n \n \n \n {priceCalcQuery.data?.errorMessage && (\n \n )}\n \n \n );\n};\n","import { ListingDetailDataField } from 'src/WebApiController';\n\nexport const enum ListingTab {\n Broadcast = 'broadcast',\n Tickets = 'tickets',\n Pricing = 'pricing',\n Sales = 'sales',\n Purchase = 'purchase',\n Tags = 'tags',\n AutoPricing = 'autopricing',\n}\n\nexport const ListingTabOrder = [\n ListingTab.Broadcast,\n ListingTab.Tickets,\n ListingTab.Pricing,\n ListingTab.AutoPricing,\n ListingTab.Sales,\n ListingTab.Purchase,\n ListingTab.Tags,\n];\n\nexport const getListingDataFieldsForTab = (tab: ListingTab) => {\n switch (tab) {\n case ListingTab.AutoPricing:\n return [ListingDetailDataField.AutoPricing];\n case ListingTab.Broadcast:\n return [ListingDetailDataField.Basic];\n case ListingTab.Pricing:\n return [ListingDetailDataField.Pricing];\n case ListingTab.Purchase:\n return [ListingDetailDataField.Purchase];\n case ListingTab.Sales:\n return [ListingDetailDataField.Sales];\n case ListingTab.Tags:\n return [ListingDetailDataField.Tags];\n case ListingTab.Tickets:\n return [ListingDetailDataField.Tickets];\n\n default:\n console.log('Warning: unhandled listing tab for data: ' + tab);\n return [] as string[]; // we if we don't recognize the tab, return empty so we'll get all data\n }\n};\n","import { ChangeEvent } from 'react';\nimport { useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { ButtonWithIcon } from 'src/components/Buttons';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { Switch } from 'src/core/interim/Switch';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { Stack } from 'src/core/ui';\nimport { Slider } from 'src/core/ui/Slider';\nimport { ToggleGroup } from 'src/core/ui/ToggleGroup';\nimport { useAvailableAutopricingModes } from 'src/hooks/useAvailableAutopricingModes';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { DetailGroup, DetailSection, SectionContent } from 'src/modals/common';\nimport { ResetIcon } from 'src/svgs/Viagogo';\nimport {\n OUTLIER_MODE_KTH_LOWEST_STRATEGY,\n OutlierModeKthLowestStrategy,\n} from 'src/utils/autoPricingUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { STANDARD_DEVIATIONS_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { roundToPrecision } from 'src/utils/numberFormatter';\nimport { getCompleteEventConfigScoreOverrides } from 'src/utils/seatScoreUtils';\nimport {\n AutoPricingCompListingMode,\n AutoPricingOutlierMode,\n Feature,\n ListingDetails,\n ListingDetailsUpdateInput,\n} from 'src/WebApiController';\n\nimport { useListingAutoPricingSettings } from '../useListingAutoPricingSettings';\nimport * as styles from './PricingSection.css';\n\nexport const AdvancePricingSettings = ({\n listing,\n disabled: externalDisabled,\n isBulkEdit,\n isStrategyEdit,\n}: {\n listing?: ListingDetails;\n disabled?: boolean;\n isBulkEdit?: boolean;\n isStrategyEdit?: boolean;\n}) => {\n const { setValue, clearErrors } = useFormContext();\n const [outlierKthLowestStrategy, setKthLowestOutlierStrategy] = useState<\n OutlierModeKthLowestStrategy | undefined\n >(OutlierModeKthLowestStrategy.Relative);\n\n const {\n canSetPrice,\n onResetAdvanceSettings,\n\n circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerMaxDiscountVelocityTicksInHours,\n circuitBreakerMinCompListingCount,\n\n compListingMode,\n compListingQuantityScoreAdjustmentEnabled,\n compListingExcludeFanInventory,\n compListingExcludeDefects,\n\n outlierMode,\n outlierStandardDeviations,\n outlierKthLowestLimit,\n outlierKthLowestLimitAbsoluteSpacing,\n outlierKthLowestLimitRelativeSpacing,\n\n onCompListingChange,\n onCircuitBreakerChange,\n onOutlierChange,\n\n skipAdvancePricing,\n } = useListingAutoPricingSettings(listing, isBulkEdit);\n\n const { activeConfigOverride, venueMapInfo } = useEventMapContext();\n const hasExcludeFanInventoryFeature = useUserHasFeature(\n Feature.ExcludeFanInventory\n );\n const hasExcludeDefectsFeature = useUserHasFeature(Feature.ExcludeDefects);\n\n const scores = getCompleteEventConfigScoreOverrides(\n venueMapInfo?.sectionScores,\n activeConfigOverride?.scoreOverrides,\n false\n );\n\n const { outlierModes, outlierModesDisabled } = useAvailableAutopricingModes(\n true,\n null,\n null,\n Boolean(scores?.some((s) => s.score))\n );\n\n const disabled = externalDisabled || Boolean(skipAdvancePricing);\n\n return (\n }\n >\n \n {isBulkEdit && !isStrategyEdit ? (\n }\n labelPosition=\"right\"\n onChange={(e) => {\n const skip = !e.target.checked;\n setValue('skipAdvancePricing', skip);\n if (!skip) {\n setValue('skipAutoPricing', false);\n }\n }}\n checked={!skipAdvancePricing}\n />\n ) : undefined}\n {skipAdvancePricing ? null : (\n <>\n {compListingMode === AutoPricingCompListingMode.QualityScore && (\n \n \n }\n >\n ) =>\n e.stopPropagation()\n }\n onChange={(e) => {\n const isChecked = e.target.checked;\n if (\n isChecked !== compListingQuantityScoreAdjustmentEnabled\n ) {\n onCompListingChange({\n compListingQuantityScoreAdjustmentEnabledNew:\n isChecked,\n });\n }\n }}\n />\n \n \n )}\n {hasExcludeFanInventoryFeature && (\n \n }\n >\n ) =>\n e.stopPropagation()\n }\n onChange={(e) => {\n const isChecked = e.target.checked;\n if (isChecked !== compListingExcludeFanInventory) {\n onCompListingChange({\n compListingExcludeFanInventoryNew: isChecked,\n });\n }\n }}\n />\n \n \n )}\n {/*\n * [NOTE]\n * Exclude defects feature was built first before product changed their mind for the\n * UI to instead show the opposite, \"Include Defects\" with a default value of false.\n * Originally, the requirement was \"Exclude Defects\" with a default value of true.\n * The DB columns and pricer backend has already been finished with logic revolving\n * around the \"Exclude Defect\" verbiage, with the logic gates predicating busisness logic\n * off of \"exclude\". The UI will now show the copy \"Include Defects\" and invert the value\n * being read/written from the database, but the rest of the backend (pricer + site) will remain\n * unchanged.\n */}\n {hasExcludeDefectsFeature && (\n \n }>\n ) =>\n e.stopPropagation()\n }\n onChange={(e) => {\n const compListingExcludeDefectsNew = !e.target.checked;\n if (\n compListingExcludeDefectsNew !==\n compListingExcludeDefects\n ) {\n onCompListingChange({\n compListingExcludeDefectsNew:\n compListingExcludeDefectsNew,\n });\n }\n }}\n />\n \n \n )}\n \n }\n >\n {\n onCircuitBreakerChange(\n undefined,\n undefined,\n undefined,\n undefined,\n Math.round(count)\n );\n }}\n />\n \n \n \n }>\n e.stopPropagation()}\n onChange={(v) => {\n onOutlierChange({\n outlierModeNew: v as AutoPricingOutlierMode,\n });\n }}\n />\n \n \n {outlierMode == AutoPricingOutlierMode.StandardDeviations ? (\n \n }\n >\n e.stopPropagation()}\n onChange={(v) => {\n const value = parseInt(v ?? '');\n if (value != null && !isNaN(value)) {\n onOutlierChange({\n outlierModeNew:\n AutoPricingOutlierMode.StandardDeviations,\n outlierStandardDeviationsNew: value,\n });\n } else {\n onOutlierChange({\n outlierModeNew:\n AutoPricingOutlierMode.StandardDeviations,\n outlierStandardDeviationsNew: null,\n });\n }\n }}\n />\n \n \n ) : outlierMode == AutoPricingOutlierMode.KthLowest ? (\n \n \n \n {\n const v = parseInt(e.target.value);\n onOutlierChange({\n outlierModeNew: AutoPricingOutlierMode.KthLowest,\n outlierKthLowestLimitNew: v,\n });\n }}\n />\n \n {outlierKthLowestStrategy ==\n OutlierModeKthLowestStrategy.Relative ? (\n {\n let v = parseInt(e.target.value);\n if (v < 0) {\n v = 0;\n } else if (v > 100) {\n v = 100;\n }\n\n if (!isNaN(v)) {\n onOutlierChange({\n outlierModeNew: AutoPricingOutlierMode.KthLowest,\n outlierKthLowestLimitNew: undefined,\n outlierKthLowestLimitAbsoluteSpacingNew: null,\n outlierKthLowestLimitRelativeSpacingNew: v,\n });\n }\n }}\n />\n ) : (\n {\n const v = parseInt(e.target.value);\n onOutlierChange({\n outlierModeNew: AutoPricingOutlierMode.KthLowest,\n outlierKthLowestLimitNew: undefined,\n outlierKthLowestLimitAbsoluteSpacingNew: v,\n outlierKthLowestLimitRelativeSpacingNew: null,\n });\n }}\n />\n )}\n {\n if (!value) {\n return;\n }\n\n const strat = value as OutlierModeKthLowestStrategy;\n setKthLowestOutlierStrategy(strat);\n }}\n />\n \n \n \n ) : null}\n \n \n \n {\n clearErrors('circuitBreakerMaxDiscountVelocityPercent');\n const v = parseFloat(e.target.value) / 100;\n onCircuitBreakerChange(\n undefined,\n undefined,\n v,\n undefined,\n undefined\n );\n }}\n />\n \n {\n const v = parseInt(e.target.value);\n onCircuitBreakerChange(\n undefined,\n undefined,\n undefined,\n v,\n undefined\n );\n }}\n />\n \n \n \n \n }\n textContentId={ContentId.ResetSettings}\n onClick={onResetAdvanceSettings}\n />\n \n \n )}\n \n \n );\n};\n","/* eslint-disable react-hooks/exhaustive-deps */\nimport { isEqual, pickBy } from 'lodash-es';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { useCompListingDisabledSections } from 'src/hooks/useCompListingDisabledSections';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n getMatchingSectionRow,\n getSectionsSameZone,\n} from 'src/utils/seatScoreUtils';\nimport { Listing, ListingDetailsUpdateInput } from 'src/WebApiController';\n\nimport { useListingAutoPricingSettings } from '../useListingAutoPricingSettings';\nimport { RestrictSelectionType } from './AutoPricingSection.types';\n\nexport const useRestrictSelection = (\n listing: Listing | undefined,\n defaultRestrictSelectionType: RestrictSelectionType,\n restrictSelectionTypes: Record,\n isBulkEdit?: boolean\n) => {\n const {\n compListingMode,\n compListingFloor,\n compListingCeiling,\n compListingOnlyForSameZoneEnabled,\n compListingOnlyForSelectedSectionsEnabled,\n compListingSelectedSectionSettings,\n onCompListingChange,\n } = useListingAutoPricingSettings(listing, isBulkEdit);\n\n const { clearErrors } = useFormContext();\n const { venueMapInfo } = useEventMapContext();\n\n const matchingSectionRow = useMemo(() => {\n if (listing && venueMapInfo) {\n return getMatchingSectionRow(listing.seating, venueMapInfo.sections);\n }\n return null;\n }, [listing, venueMapInfo]);\n\n const { disabledSectionIds } = useCompListingDisabledSections(\n listing,\n isBulkEdit,\n compListingMode,\n compListingFloor,\n compListingCeiling\n );\n\n useEffect(() => {\n if (\n !disabledSectionIds.length ||\n !compListingSelectedSectionSettings?.sectionIdFilter\n ) {\n return;\n }\n\n const sectionIdFilterNew =\n compListingSelectedSectionSettings.sectionIdFilter.filter(\n (sid) => !disabledSectionIds.includes(sid)\n );\n\n if (\n !isEqual(\n sectionIdFilterNew,\n compListingSelectedSectionSettings.sectionIdFilter\n )\n ) {\n const compListingSelectedSectionSettingsNew = {\n ...compListingSelectedSectionSettings,\n sectionIdFilter: sectionIdFilterNew,\n };\n onCompListingChange({ compListingSelectedSectionSettingsNew });\n }\n }, [disabledSectionIds]);\n\n const [restrictSelectionType, setRestrictSelectionType] =\n useState(defaultRestrictSelectionType);\n\n const updateToSameZone = useCallback((): void => {\n if (\n listing &&\n !isBulkEdit &&\n venueMapInfo &&\n Object.keys(restrictSelectionTypes).includes(\n RestrictSelectionType.SpecificSections\n )\n ) {\n // Display all sections in the same zone\n const sectionsSameZone = getSectionsSameZone(\n listing.seating,\n venueMapInfo.sections\n )?.filter((s) => !disabledSectionIds.includes(s.id));\n if (sectionsSameZone) {\n const sectionIdFilter = sectionsSameZone\n .toSorted((a, b) => a.name.localeCompare(b.name))\n .map((s) => s.id);\n const rowIdFilter = (sectionsSameZone ?? [])\n .flatMap(({ rows }) => rows)\n .map(({ id }) => id);\n const sectionRowIdFilter = pickBy(\n Object.assign(\n {},\n compListingSelectedSectionSettings?.sectionRowIdFilter ?? {}\n ),\n (_, key) => sectionIdFilter.includes(parseInt(key))\n );\n const compListingSelectedSectionSettingsNew = {\n ...compListingSelectedSectionSettings,\n sectionIdFilter,\n rowIdFilter,\n sectionRowIdFilter,\n };\n onCompListingChange({\n compListingSelectedSectionSettingsNew,\n compListingOnlyForSameZoneEnabledNew: true,\n compListingOnlyForSelectedSectionsEnabledNew: false,\n });\n }\n }\n }, [\n compListingSelectedSectionSettings,\n disabledSectionIds,\n isBulkEdit,\n listing,\n onCompListingChange,\n restrictSelectionTypes,\n venueMapInfo,\n ]);\n\n const updateToSameSection = useCallback((): void => {\n const sectionIdFilter = matchingSectionRow?.section?.id\n ? [matchingSectionRow.section.id]\n : [];\n const rowIdFilter = compListingSelectedSectionSettings?.rowIdFilter ?? [];\n const sectionRowIdFilter = pickBy(\n Object.assign(\n {},\n compListingSelectedSectionSettings?.sectionRowIdFilter ?? {}\n ),\n (_, key) => sectionIdFilter.includes(parseInt(key))\n );\n const compListingSelectedSectionSettingsNew = {\n ...compListingSelectedSectionSettings,\n sectionIdFilter,\n rowIdFilter,\n sectionRowIdFilter,\n };\n onCompListingChange({\n compListingOnlyForSameZoneEnabledNew: false,\n compListingOnlyForSelectedSectionsEnabledNew: true,\n compListingSelectedSectionSettingsNew,\n });\n }, []);\n\n useEffect(() => {\n if (\n compListingOnlyForSelectedSectionsEnabled &&\n restrictSelectionType !== RestrictSelectionType.SameSection &&\n RestrictSelectionType.SpecificSections in restrictSelectionTypes\n ) {\n setRestrictSelectionType(RestrictSelectionType.SpecificSections);\n } else if (\n compListingOnlyForSameZoneEnabled &&\n restrictSelectionType !== RestrictSelectionType.SameZone &&\n RestrictSelectionType.SameZone in restrictSelectionTypes\n ) {\n setRestrictSelectionType(RestrictSelectionType.SameZone);\n }\n }, [\n compListingOnlyForSameZoneEnabled,\n compListingOnlyForSelectedSectionsEnabled,\n restrictSelectionTypes,\n ]);\n\n const onRestrictSelectionTypeChange = useCallback(\n (type: RestrictSelectionType | null) => {\n clearErrors('compListingFloor');\n setRestrictSelectionType(type ?? defaultRestrictSelectionType);\n if (type === RestrictSelectionType.SameZone) {\n return updateToSameZone();\n } else if (type === RestrictSelectionType.SpecificSections) {\n onCompListingChange({\n compListingOnlyForSameZoneEnabledNew: false,\n compListingOnlyForSelectedSectionsEnabledNew: true,\n });\n return;\n } else {\n // Same section\n updateToSameSection();\n }\n },\n [\n clearErrors,\n setRestrictSelectionType,\n updateToSameZone,\n onCompListingChange,\n updateToSameSection,\n ]\n );\n\n return {\n restrictSelectionType,\n disabledSectionIds,\n onRestrictSelectionTypeChange,\n };\n};\n","import { ChangeEvent, useCallback, useEffect, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { AutoPricingSectionRowIdFilter } from 'src/components/AutoPricing/components/AutoPricingSectionRowIdFilter';\nimport { ButtonWithIcon } from 'src/components/Buttons';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { Switch } from 'src/core/interim/Switch';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosMultiSelect } from 'src/core/POS/PosMultiSelect';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { getTextFieldState, PosTextField } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { Slider } from 'src/core/ui/Slider';\nimport { ToggleGroup } from 'src/core/ui/ToggleGroup';\nimport { SectionSelectDialog } from 'src/dialogs/SectionSelectDialog';\nimport { useAvailableAutopricingModes } from 'src/hooks/useAvailableAutopricingModes';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useCompQuantitiesFilter } from 'src/hooks/useCompQuantitiesFilter';\nimport { useAllInPriceFromListPrice } from 'src/hooks/useListAndAllInPrice';\nimport { useUndercutAmountSettings } from 'src/hooks/useUndercutAmountSettings';\nimport { Detail, DetailGroup } from 'src/modals/common';\nimport { EditIcon, IconsFill, PlusIcon, ResetIcon } from 'src/svgs/Viagogo';\nimport {\n convertSliderValueFromServer,\n convertSliderValueToServer,\n getUndercutPriceRepresentingMode,\n SLIDER_MAX,\n SLIDER_MIN,\n UNDERCUT_PRICE_MODE_OPTIONS,\n UndercutPriceSettingsMode,\n} from 'src/utils/autoPricingUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { AUTO_PRICING_RESULT_TYPES_OPTIONS_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { roundToPrecision } from 'src/utils/numberFormatter';\nimport { getCompleteEventConfigScoreOverrides } from 'src/utils/seatScoreUtils';\nimport {\n AutoPricingCompListingMode,\n AutoPricingUndercutMode,\n Listing,\n ListingDetailsUpdateInput,\n} from 'src/WebApiController';\n\nimport { useListingDetailsModalSidePanelContext } from '../ListingDetailsModalSidePanel';\nimport { useListingAutoPricingSettings } from '../useListingAutoPricingSettings';\nimport { RestrictSelectionType } from './AutoPricingSection.types';\nimport { useRestrictSelection } from './AutoPricingSettingsSection.hook';\nimport * as styles from './PricingSection.css';\n\n/**\n * @deprecated - Cleanup when cleaning up SimplifiedAutoPricingUiV2 and IntelligibleAutoPricingSettings field\n */\nexport const AutoPricingSettingsSection = ({\n listing,\n disabled,\n listingHasParent,\n isBulkEdit,\n isGlobalEdit,\n isStrategyEdit,\n}: {\n listing?: Listing;\n disabled?: boolean;\n listingHasParent: boolean;\n isBulkEdit?: boolean;\n isGlobalEdit?: boolean;\n isStrategyEdit?: boolean;\n}) => {\n const autoPricingResultStateContent = (\n AUTO_PRICING_RESULT_TYPES_OPTIONS_TO_CID as Record<\n string,\n string | undefined\n >\n )[listing?.autoPrcResult ?? ''];\n\n const { setValue, clearErrors, formState } =\n useFormContext();\n\n const sectionSelectDialog = useBasicDialog();\n\n const { contentType, onShowContent, onCloseSidePanel } =\n useListingDetailsModalSidePanelContext();\n\n const {\n canSetPrice,\n showAutoPricingSettings,\n uiCurrency,\n currencyNumberFormat,\n\n onResetSettings,\n eventPricingSettings,\n accountPricingSettings,\n\n undercutMode,\n undercutAbsoluteAmount,\n undercutRelativeAmount,\n\n compListingMode,\n compListingFloor,\n compListingCeiling,\n compListingSelectedSectionSettings,\n compListingOnlyForSameZoneEnabled,\n compListingOnlyForSelectedSectionsEnabled,\n compListingQuantityScoreAdjustmentOverrideJson,\n\n onUndercutChange,\n onCompListingChange,\n onCompListingModeChange,\n\n skipCompListing,\n skipUndercut,\n } = useListingAutoPricingSettings(listing, isBulkEdit);\n\n const {\n undercutAbsoluteAmountMode,\n setUndercutAbsoluteAmountMode,\n undercutRelativeAmountMode,\n setUndercutRelativeAmountMode,\n } = useUndercutAmountSettings(undercutAbsoluteAmount, undercutRelativeAmount);\n\n const {\n quantitiesFilterOptions,\n quantitiesFilterValue,\n onUpdateQuantitiesFilter,\n } = useCompQuantitiesFilter(\n compListingQuantityScoreAdjustmentOverrideJson,\n onCompListingChange\n );\n\n const compListingFloorError = formState.errors.compListingFloor?.message;\n const compListingSelectedSectionError =\n formState.errors.compListingSelectedSectionSettings?.message;\n\n const parsedQuantityOverridesJson = JSON.parse(\n compListingQuantityScoreAdjustmentOverrideJson || 'null'\n );\n\n const quantityFilterValue: number | null =\n parsedQuantityOverridesJson?.quantityFilter;\n\n const undercutAbsoluteAmountError =\n formState.errors.undercutAbsoluteAmount?.message;\n const undercutRelativeAmountError =\n formState.errors.undercutRelativeAmount?.message;\n\n const { activeConfigOverride, venueMapsByScoreModelQuery } =\n useEventMapContext();\n\n const defaultScoreOverrides = useMemo(() => {\n // In the backend, if AVG scores are missing, then we always fallback to MVG, even if AVG is explicitly selected\n return (\n venueMapsByScoreModelQuery?.data?.AdvancedVenueGeometry?.sectionScores ??\n venueMapsByScoreModelQuery?.data?.MergedVenueGeometry?.sectionScores ??\n venueMapsByScoreModelQuery?.data?.VenueGeometry?.sectionScores\n );\n }, [\n venueMapsByScoreModelQuery?.data?.AdvancedVenueGeometry?.sectionScores,\n venueMapsByScoreModelQuery?.data?.MergedVenueGeometry?.sectionScores,\n venueMapsByScoreModelQuery?.data?.VenueGeometry?.sectionScores,\n ]);\n\n const scores = getCompleteEventConfigScoreOverrides(\n defaultScoreOverrides,\n activeConfigOverride?.scoreOverrides,\n false\n );\n\n const {\n compListingModes,\n compListingModesDisabled,\n undercutModes,\n undercutModesDisabled,\n defaultRestrictSelectionType,\n restrictSelectionTypes,\n } = useAvailableAutopricingModes(\n true,\n undercutMode,\n compListingMode,\n Boolean(scores?.some((s) => s.score)),\n listingHasParent,\n isGlobalEdit,\n compListingOnlyForSelectedSectionsEnabled\n );\n\n if (\n compListingMode == AutoPricingCompListingMode.QualityScore &&\n compListingModesDisabled[AutoPricingCompListingMode.QualityScore] != null\n ) {\n setValue('compListingMode', AutoPricingCompListingMode.SameEvent);\n setValue('compListingOnlyForSameZoneEnabled', false);\n }\n\n const {\n restrictSelectionType,\n onRestrictSelectionTypeChange,\n disabledSectionIds,\n } = useRestrictSelection(\n listing,\n defaultRestrictSelectionType as RestrictSelectionType,\n restrictSelectionTypes,\n isBulkEdit\n );\n\n const isDealScoreMode =\n (undercutMode ??\n eventPricingSettings?.undercutMode ??\n accountPricingSettings?.undercutMode) === AutoPricingUndercutMode.Deal;\n\n const isParentListingMode =\n (compListingMode ??\n eventPricingSettings?.compListingMode ??\n accountPricingSettings?.compListingMode) ===\n AutoPricingCompListingMode.ParentListing;\n\n const showCompListingSettingsDetails = !(\n !compListingMode ||\n compListingMode === AutoPricingCompListingMode.SameZone ||\n compListingMode === AutoPricingCompListingMode.SameEvent ||\n compListingMode === AutoPricingCompListingMode.ParentListing\n );\n\n const showCompListingRestictSelectionDetails =\n compListingMode != null && Object.values(restrictSelectionTypes).length > 0;\n\n const hasAnyActiveRestrictionApplied = useMemo(() => {\n let applied = false;\n const restirctSelectionTypes = Object.keys(restrictSelectionTypes);\n restirctSelectionTypes.forEach((type) => {\n if (type === RestrictSelectionType.SameZone) {\n applied = applied || compListingOnlyForSameZoneEnabled === true;\n }\n if (\n type === RestrictSelectionType.SpecificSections ||\n type === RestrictSelectionType.SameSection\n ) {\n applied = applied || compListingOnlyForSelectedSectionsEnabled === true;\n }\n });\n\n return applied;\n }, [\n compListingOnlyForSameZoneEnabled,\n compListingOnlyForSelectedSectionsEnabled,\n restrictSelectionTypes,\n ]);\n\n const isCompListingAmountDisabled =\n disabled ||\n listing?.isDeleted ||\n !canSetPrice ||\n !compListingMode ||\n compListingMode === AutoPricingCompListingMode.SameZone ||\n compListingMode === AutoPricingCompListingMode.SameEvent ||\n compListingMode === AutoPricingCompListingMode.ParentListing;\n\n useEffect(() => {\n if (\n contentType === 'sectionSelection' &&\n (!showCompListingRestictSelectionDetails ||\n !hasAnyActiveRestrictionApplied)\n ) {\n onCloseSidePanel();\n }\n }, [\n showCompListingRestictSelectionDetails,\n hasAnyActiveRestrictionApplied,\n contentType,\n onShowContent,\n onCloseSidePanel,\n ]);\n\n const onLaunchSectionSelection = useCallback(\n (e: React.MouseEvent) => {\n if (!isBulkEdit && listing?.id) {\n onShowContent('sectionSelection', e);\n } else {\n sectionSelectDialog.launchDialog();\n }\n },\n [isBulkEdit, listing?.id, onShowContent, sectionSelectDialog]\n );\n\n const marketPrice = useAllInPriceFromListPrice(listing?.undNewPrice, listing);\n\n if (!showAutoPricingSettings) return null;\n\n return (\n <>\n {isBulkEdit && !isStrategyEdit ? (\n \n }\n labelPosition=\"right\"\n onChange={(e) => {\n const skip = !e.target.checked;\n setValue('skipCompListing', skip);\n if (!skip) {\n setValue('skipAutoPricing', false);\n }\n }}\n checked={!skipCompListing}\n />\n \n ) : undefined}\n {skipCompListing ? null : (\n <>\n \n \n \n \n \n
    \n \n
    \n e.stopPropagation()}\n onChange={onCompListingModeChange}\n />\n
    \n
    \n {showCompListingSettingsDetails && (\n <>\n \n \n
    \n \n
    \n \n {\n const v = parseFloat(e.target.value);\n if (!isNaN(v)) {\n if (\n v >= SLIDER_MIN * 100 &&\n v <= SLIDER_MAX * 100 &&\n convertSliderValueToServer(v) < compListingCeiling\n ) {\n onCompListingChange({\n compListingFloorNew:\n convertSliderValueToServer(v),\n });\n }\n }\n }}\n postfixDisplay=\"%\"\n placeholder={\n compListingMode == null\n ? eventPricingSettings?.compListingFloor?.toString() ??\n accountPricingSettings?.compListingFloor?.toString() ??\n undefined\n : undefined\n }\n />\n \n
    \n \n
    \n \n {\n const v = parseFloat(e.target.value);\n if (!isNaN(v)) {\n if (\n v >= SLIDER_MIN * 100 &&\n v <= SLIDER_MAX * 100 &&\n convertSliderValueToServer(v) > compListingFloor\n ) {\n onCompListingChange({\n compListingCeilingNew:\n convertSliderValueToServer(v),\n });\n }\n }\n }}\n postfixDisplay=\"%\"\n placeholder={\n compListingMode == null\n ? eventPricingSettings?.compListingCeiling?.toString() ??\n accountPricingSettings?.compListingCeiling?.toString() ??\n undefined\n : undefined\n }\n />\n \n
    \n \n
    \n
    \n
    \n \n {!isCompListingAmountDisabled && (\n \n (\n \n {roundToPrecision(val, 0)}%\n \n )}\n onValueChange={([floor, ceil]) => {\n onCompListingChange({\n compListingFloorNew:\n convertSliderValueToServer(floor),\n compListingCeilingNew:\n convertSliderValueToServer(ceil),\n });\n }}\n />\n
    \n \n
    \n
    \n \n )}\n \n \n )}\n {showCompListingRestictSelectionDetails && (\n \n }\n style={{ width: '100%' }}\n >\n \n \n\n }\n style={{ width: '100%' }}\n >\n ) => e.stopPropagation()}\n onChange={(e) => {\n const isChecked = e.target.checked;\n if (isChecked) {\n if (!hasAnyActiveRestrictionApplied) {\n onCompListingChange({\n compListingOnlyForSameZoneEnabledNew:\n defaultRestrictSelectionType ===\n RestrictSelectionType.SameZone,\n compListingOnlyForSelectedSectionsEnabledNew:\n defaultRestrictSelectionType ===\n RestrictSelectionType.SpecificSections,\n });\n }\n } else {\n onCompListingChange({\n compListingOnlyForSameZoneEnabledNew: false,\n compListingOnlyForSelectedSectionsEnabledNew: false,\n compListingSelectedSectionSettingsNew: null,\n });\n }\n }}\n />\n \n {hasAnyActiveRestrictionApplied && (\n \n
    \n \n
    \n e.stopPropagation()}\n onChange={onRestrictSelectionTypeChange}\n />\n
    \n )}\n {hasAnyActiveRestrictionApplied &&\n (!isBulkEdit || compListingOnlyForSelectedSectionsEnabled) &&\n !isGlobalEdit &&\n !isStrategyEdit && (\n \n \n {compListingSelectedSectionSettings?.sectionIdFilter\n ?.length ? (\n <>\n \n \n \n }\n textContentId={ContentId.EditSections}\n onClick={onLaunchSectionSelection}\n disabled={disabled}\n style={{ paddingLeft: 0, paddingRight: 0 }}\n />\n \n ) : (\n \n }\n textContentId={ContentId.SelectSections}\n onClick={onLaunchSectionSelection}\n disabled={disabled}\n style={{ padding: 0 }}\n />\n )}\n \n \n )}\n \n )}\n \n )}\n\n {isBulkEdit && !isStrategyEdit ? (\n \n }\n labelPosition=\"right\"\n onChange={(e) => {\n const skip = !e.target.checked;\n setValue('skipUndercut', skip);\n if (!skip) {\n setValue('skipAutoPricing', false);\n }\n }}\n checked={!skipUndercut}\n />\n \n ) : undefined}\n {skipUndercut ? null : (\n <>\n \n \n \n {isParentListingMode ? (\n
    \n \n
    \n ) : (\n <>\n \n \n
    \n \n
    \n e.stopPropagation()}\n onChange={(v) => {\n clearErrors('undercutAbsoluteAmount');\n clearErrors('undercutRelativeAmount');\n if (v) {\n onUndercutChange(v as AutoPricingUndercutMode);\n } else {\n onUndercutChange(null, null, null);\n }\n }}\n />\n
    \n \n
    \n
    \n
    \n {isDealScoreMode && (\n
    \n \n
    \n )}\n \n )}\n \n \n {\n if (!value) return;\n\n const mode = value as UndercutPriceSettingsMode;\n setUndercutRelativeAmountMode(mode);\n\n if (undercutRelativeAmount) {\n const curAmountAbs = Math.abs(undercutRelativeAmount);\n onUndercutChange(\n undefined,\n undefined,\n getUndercutPriceRepresentingMode(curAmountAbs, mode)\n );\n }\n }}\n />\n\n
    \n \n
    \n\n \n {\n clearErrors('undercutAbsoluteAmount');\n clearErrors('undercutRelativeAmount');\n const v = parseFloat(e.target.value);\n if (v >= 0 && v <= Number.MAX_VALUE) {\n const relativeValue = Math.min(v, 100) / 100;\n if (\n undercutRelativeAmountMode ===\n UndercutPriceSettingsMode.Premium\n ) {\n onUndercutChange(undefined, undefined, -relativeValue);\n } else {\n onUndercutChange(undefined, undefined, relativeValue);\n }\n } else {\n onUndercutChange(undefined, undefined, null);\n }\n }}\n />\n \n
    \n \n
    \n {\n if (!value) return;\n\n const mode = value as UndercutPriceSettingsMode;\n setUndercutAbsoluteAmountMode(mode);\n\n if (undercutAbsoluteAmount) {\n const curAmountAbs = Math.abs(undercutAbsoluteAmount);\n onUndercutChange(\n undefined,\n getUndercutPriceRepresentingMode(curAmountAbs, mode)\n );\n }\n }}\n />\n
    \n \n
    \n \n {\n clearErrors('undercutAbsoluteAmount');\n clearErrors('undercutRelativeAmount');\n const v = parseFloat(e.target.value);\n if (v >= 0 && v <= Number.MAX_VALUE) {\n if (\n undercutAbsoluteAmountMode ===\n UndercutPriceSettingsMode.Premium\n ) {\n onUndercutChange(undefined, -v);\n } else {\n onUndercutChange(undefined, v);\n }\n } else {\n onUndercutChange(undefined, null);\n }\n }}\n />\n \n
    \n
    \n \n )}\n {autoPricingResultStateContent && (\n \n }\n detail={\n \n \n \n }\n />\n \n )}\n {!isBulkEdit && !isStrategyEdit && marketPrice != null && (\n \n }\n detail={{currencyNumberFormat.format(marketPrice)}}\n />\n \n )}\n \n }\n textContentId={ContentId.ResetSettings}\n onClick={onResetSettings}\n />\n \n {\n const compListingSelectedSectionSettingsNew = {\n ...compListingSelectedSectionSettings,\n sectionIdFilter: selectedSections.map((s) => s.id),\n rowIdFilter: compListingSelectedSectionSettings?.rowIdFilter ?? [],\n sectionRowIdFilter:\n compListingSelectedSectionSettings?.sectionRowIdFilter ?? {},\n };\n onCompListingChange({\n compListingOnlyForSameZoneEnabledNew: false,\n compListingOnlyForSelectedSectionsEnabledNew: true,\n compListingSelectedSectionSettingsNew,\n });\n sectionSelectDialog.closeDialog();\n clearErrors('compListingSelectedSectionSettings');\n }}\n onClosed={sectionSelectDialog.closeDialog}\n />\n \n );\n};\n","import { ChangeEvent, useCallback } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { getTextFieldState } from 'src/core/POS/PosTextField';\nimport { Radio, RadioGroup } from 'src/core/ui';\nimport { Stack } from 'src/core/ui';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport { DetailGroup, DetailSection, SectionContent } from 'src/modals/common';\nimport {\n PRICE_FLOOR_CEILING_MODE_OPTIONS,\n PriceFloorCeilingMode,\n} from 'src/utils/autoPricingUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n getAllInPriceFromListPrice,\n getListPriceFromAllinPrice,\n} from 'src/utils/inventoryUtils';\nimport {\n AutoPricingCompListingMode,\n ListingDetails,\n ListingDetailsUpdateInput,\n Marketplace,\n UserSetting,\n} from 'src/WebApiController';\n\nimport { useListingAutoPricingSettings } from '../useListingAutoPricingSettings';\nimport * as styles from './PricingSection.css';\n\nexport const PricingProtection = ({\n listing,\n disabled,\n isBulkEdit,\n}: {\n listing?: ListingDetails | null;\n disabled?: boolean;\n isBulkEdit?: boolean;\n}) => {\n const { setValue, watch, clearErrors, formState } =\n useFormContext();\n\n const { loginContext } = useAppContext();\n const stubHubMkpSettings =\n loginContext?.user?.activeAccount?.marketplaceSettings?.find(\n (m) => m.mkp === Marketplace.StubHub\n );\n\n const dontChangeText = useContent(ContentId.DontChange);\n const listPrice = watch('listPrice');\n const netProceedsFloor = watch('netProceedsFloor');\n const netProceedsCeiling = watch('netProceedsCeiling');\n const marketplacePriceUpdates = watch('marketplacePriceUpdates');\n\n const floorError = formState.errors.netProceedsFloor?.message;\n const ceilingError = formState.errors.netProceedsCeiling?.message;\n\n const {\n canSetPrice,\n autoPricingEnabled,\n uiCurrency,\n compListingMode,\n skipPriceProtection,\n } = useListingAutoPricingSettings(listing, isBulkEdit);\n\n const turnOffSkipSetting = useCallback(\n () => setValue('skipPriceProtection', false),\n [setValue]\n );\n\n const priceProtectionDisabled =\n disabled ||\n listing?.isDeleted ||\n !canSetPrice ||\n Boolean(\n autoPricingEnabled &&\n compListingMode === AutoPricingCompListingMode.ParentListing\n );\n\n const adjustListPriceToBeWithinFloorAndCeiling = useCallback(() => {\n if (listPrice != null) {\n if (netProceedsFloor != null && listPrice < netProceedsFloor) {\n setValue('listPrice', netProceedsFloor);\n } else if (netProceedsCeiling != null && listPrice > netProceedsCeiling) {\n setValue('listPrice', netProceedsCeiling);\n }\n }\n marketplacePriceUpdates\n .filter((m) => m.priceByMarketplace)\n .forEach((m, i) => {\n if (m.listPrice != null) {\n if (netProceedsFloor != null && m.listPrice < netProceedsFloor) {\n setValue(\n `marketplacePriceUpdates.${i}.listPrice`,\n netProceedsFloor\n );\n } else if (\n netProceedsCeiling != null &&\n m.listPrice > netProceedsCeiling\n ) {\n setValue(\n `marketplacePriceUpdates.${i}.listPrice`,\n netProceedsCeiling\n );\n }\n }\n });\n }, [\n listPrice,\n marketplacePriceUpdates,\n netProceedsCeiling,\n netProceedsFloor,\n setValue,\n ]);\n\n const { value: priceFloorMode, setUserSetting: setPriceFloorMode } =\n useServerUserSetting({\n id: UserSetting.PriceFloorCeilingMode,\n currentLoginUserOnly: true,\n });\n\n const onPriceFloorChange = useCallback(\n (e: ChangeEvent) => {\n turnOffSkipSetting();\n const v = parseFloat(e.target.value);\n if (v >= 0 && v < Number.MAX_VALUE) {\n clearErrors('listPrice');\n marketplacePriceUpdates?.forEach((_, i) =>\n clearErrors(`marketplacePriceUpdates.${i}.listPrice`)\n );\n if (netProceedsCeiling && v < netProceedsCeiling) {\n clearErrors('netProceedsFloor');\n }\n\n let newV = v;\n if (priceFloorMode === PriceFloorCeilingMode.Website) {\n // If we're editing in WebSite mode, we need to convert it to proceeds\n newV = getListPriceFromAllinPrice(\n v,\n listing,\n stubHubMkpSettings?.sellerFee\n )!;\n }\n\n setValue('netProceedsFloor', newV);\n } else {\n setValue('netProceedsFloor', null);\n }\n },\n [\n turnOffSkipSetting,\n clearErrors,\n marketplacePriceUpdates,\n netProceedsCeiling,\n priceFloorMode,\n setValue,\n listing,\n stubHubMkpSettings?.sellerFee,\n ]\n );\n\n const onPriceCeilingChange = useCallback(\n (e: ChangeEvent) => {\n turnOffSkipSetting();\n const v = parseFloat(e.target.value);\n if (v >= 0 && v <= Number.MAX_VALUE) {\n clearErrors('listPrice');\n marketplacePriceUpdates?.forEach((_, i) =>\n clearErrors(`marketplacePriceUpdates.${i}.listPrice`)\n );\n if (netProceedsFloor && v > netProceedsFloor) {\n clearErrors('netProceedsCeiling');\n }\n\n let newV = v;\n if (priceFloorMode === PriceFloorCeilingMode.Website) {\n // If we're editing in WebSite mode, we need to convert it to proceeds\n newV = getListPriceFromAllinPrice(\n v,\n listing,\n stubHubMkpSettings?.sellerFee\n )!;\n }\n\n setValue('netProceedsCeiling', newV);\n } else {\n setValue('netProceedsCeiling', null);\n }\n },\n [\n turnOffSkipSetting,\n clearErrors,\n marketplacePriceUpdates,\n netProceedsFloor,\n priceFloorMode,\n setValue,\n listing,\n stubHubMkpSettings?.sellerFee,\n ]\n );\n\n return (\n <>\n }>\n {isBulkEdit ? (\n }\n labelPosition=\"right\"\n onChange={(e) => setValue('skipPriceProtection', !e.target.checked)}\n checked={!skipPriceProtection}\n />\n ) : undefined}\n\n \n \n }>\n \n \n {PRICE_FLOOR_CEILING_MODE_OPTIONS.map((m) => (\n \n ))}\n \n \n \n \n\n \n \n
    \n \n
    \n \n \n \n
    \n \n
    \n \n \n \n
    \n
    \n\n {isBulkEdit &&\n ((netProceedsFloor ?? 0) > 0 || (netProceedsCeiling ?? 0) > 0) && (\n \n \n }\n />\n \n )}\n
    \n
    \n \n );\n};\n","import { useCallback, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { SimplifiedAutopricingGuidedPrice } from 'src/components/AutoPricing/SimplifiedAutopricingSection';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { Button, Stack, Switch } from 'src/core/ui';\nimport { useListingHasVenueMapInfo } from 'src/hooks/useListingHasVenueMapInfo';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { DetailGroup, DetailSection, SectionContent } from 'src/modals/common';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n Feature,\n Listing,\n ListingDetails,\n ListingDetailsUpdateInput,\n} from 'src/WebApiController';\n\nimport { AutoPricePreview } from '../AutoPricePreview';\nimport { ListingTab } from '../listingDetailsUtils';\nimport { useListingAutoPricingSettings } from '../useListingAutoPricingSettings';\nimport { AdvancePricingSettings } from './AdvancePricingSection';\nimport { AutoPricingSettingsSection } from './AutoPricingSettingsSection';\nimport { AutoPricingStrategySection } from './AutoPricingStrategySection';\nimport { PricingProtection } from './PricingProtection';\n\n/**\n *\n * @deprecated - Use ListingAutoPricingSettingsFormContentWrapper instead. IntelligibleAutoPricingSettings is GA\n */\nexport const AutoPricingSection = ({\n listing,\n disabled,\n isBulkEdit,\n isGlobalEdit,\n isStrategyEdit,\n listingHasParent,\n onSwitchToTab,\n}: {\n listing?: Listing | null;\n disabled?: boolean;\n isBulkEdit?: boolean;\n isGlobalEdit?: boolean;\n isStrategyEdit?: boolean;\n listingHasParent?: boolean;\n onSwitchToTab?: (tabName: ListingTab) => void;\n}) => {\n const { setValue } = useFormContext();\n\n const {\n canSetPrice,\n canAutoPrice,\n autoPricingEnabled,\n setAutoPricingDefaults,\n showAutoPricingSettings,\n skipAutoPricing,\n event,\n } = useListingAutoPricingSettings(listing, isBulkEdit);\n\n const hasAutoPricingUiGateRemovalFeature = useUserHasFeature(\n Feature.RemoveUiGateOnUnmap\n );\n\n const [showDetailedSettings, setShowDetailedSettings] = useState(\n !isStrategyEdit && !isBulkEdit ? false : true\n );\n\n const turnOffSkipSetting = useCallback(\n () => setValue('skipAutoPricing', false),\n [setValue]\n );\n\n const { mapExists, hasVenueMapInfo } = useListingHasVenueMapInfo(\n listing,\n hasAutoPricingUiGateRemovalFeature\n );\n\n if (!canSetPrice || !canAutoPrice) {\n return null;\n }\n\n return (\n <>\n }>\n {isBulkEdit && !isStrategyEdit ? (\n }\n labelPosition=\"right\"\n onChange={(e) => {\n const skip = !e.target.checked;\n setValue('skipAutoPricing', skip);\n if (!skip) {\n if (autoPricingEnabled == null) {\n // When this is turned on, we want to also set the value of autoPricingEnabled\n // to false so it will match what the Switch is reflecting\n setValue('autoPricingEnabled', false);\n }\n } else {\n // If skip is set to true, ensure all other skips are set to true\n setValue('skipAdvancePricing', true);\n setValue('skipCompListing', true);\n setValue('skipUndercut', true);\n }\n }}\n checked={!skipAutoPricing}\n />\n ) : undefined}\n \n {(isBulkEdit || hasVenueMapInfo) && canAutoPrice ? (\n <>\n {!isStrategyEdit && (\n \n \n \n }\n style={{ width: 'auto' }}\n >\n \n e.stopPropagation()}\n onCheckedChange={(isChecked) => {\n turnOffSkipSetting();\n if (isChecked !== autoPricingEnabled) {\n setValue('autoPricingEnabled', isChecked);\n\n if (isChecked) {\n // If enabled, set defaults where necessary\n setAutoPricingDefaults();\n }\n }\n }}\n />\n
    \n \n \n
    \n }\n >\n \n e.stopPropagation()}\n onCheckedChange={(isChecked) => {\n setShowDetailedSettings(isChecked);\n }}\n />\n \n \n \n
    \n )}\n\n {showDetailedSettings ? (\n <>\n {!isBulkEdit &&\n !isStrategyEdit &&\n event?.viagId &&\n listing?.id && (\n \n \n \n )}\n \n \n ) : (\n <>\n \n {!isBulkEdit &&\n !isStrategyEdit &&\n event?.viagId &&\n listing?.id && (\n \n \n \n )}\n \n )}\n \n ) : (\n \n \n {!canAutoPrice ? (\n \n ) : (\n !isBulkEdit &&\n (mapExists && !hasVenueMapInfo ? (\n <>\n \n\n onSwitchToTab?.(ListingTab.Broadcast)}\n style={{ width: 'max-content', padding: '0' }}\n >\n \n \n \n ) : (\n \n ))\n )}\n \n \n )}\n \n \n {showDetailedSettings && (\n \n )}\n {showDetailedSettings &&\n (isBulkEdit || hasVenueMapInfo) &&\n showAutoPricingSettings && (\n \n )}\n \n );\n};\n","import { ComponentProps, useCallback, useMemo, useState } from 'react';\nimport {\n Controller,\n FormProvider,\n useForm,\n UseFormSetValue,\n} from 'react-hook-form';\nimport { Modal as RSModal } from 'reactstrap';\nimport { AutoPricingSettingsFormContent } from 'src/components/AutoPricing/AutoPricingSettingsFormContent/AutoPricingSettingsFormContent';\nimport { CancelButton } from 'src/components/Buttons';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { useConfirmDialog } from 'src/core/interim/dialogs/ConfirmDialog/useConfirmDialog';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { useAutoPricingStrategies } from 'src/hooks/api/useAutoPricingStrategies';\nimport { useUserHasAutopricingFeature } from 'src/hooks/useUserHasAutopricingFeature';\nimport { AutoPricingSection } from 'src/modals/ListingDetails/components/PricingSection/AutoPricingSection';\nimport { validateAutoPricingSettings } from 'src/utils/autoPricingUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n AutoPricingSettingsCollection,\n Feature,\n Listing,\n ListingDetailsUpdateInput,\n VenueZoneConfigType,\n} from 'src/WebApiController';\n\nexport type AutoPricingStrategyDialogProps = ComponentProps & {\n defaultValues?: AutoPricingSettingsCollectionInput;\n listing?: Listing;\n listingHasParent?: boolean;\n disabled?: boolean;\n onStrategyUpdated?: (strategyId: number) => void;\n isBulkEdit?: boolean;\n};\n\nexport type AutoPricingSettingsCollectionInput = ListingDetailsUpdateInput & {\n autoPricingSettingsCollectionId: number | null;\n strategyName: string;\n autoPricingDefaultQuantityFiltersJson: string;\n scoreModel: number | null;\n autoPriceFrequency: number | null;\n venueZoneConfigType: VenueZoneConfigType | null;\n venueZoneOverrideId: number | null;\n};\n\nexport const AutoPricingStrategyDialog = ({\n defaultValues,\n ...rest\n}: AutoPricingStrategyDialogProps) => {\n const methods = useForm({\n defaultValues,\n });\n\n return (\n \n \n \n );\n};\n\nfunction AutoPricingStrategyDialogContent({\n defaultValues,\n listing,\n listingHasParent,\n isBulkEdit,\n onClosed,\n onStrategyUpdated,\n onCancel,\n disabled,\n control,\n formState: { errors },\n watch,\n clearErrors,\n setError,\n setValue,\n getValues,\n handleSubmit,\n reset,\n ...rest\n}: AutoPricingStrategyDialogProps &\n Omit<\n ComponentProps<\n typeof FormProvider\n >,\n 'children'\n >) {\n const { loginContext } = useAppContext();\n const { getUiCurrency } = useLocalizationContext();\n\n const uiCurrency = useMemo(\n () =>\n getUiCurrency(\n listing?.currency ?? loginContext?.user?.activeAccount?.currencyCode\n ),\n [\n getUiCurrency,\n listing?.currency,\n loginContext?.user?.activeAccount?.currencyCode,\n ]\n );\n\n const { showErrorDialog } = useErrorBoundaryContext();\n const [isLoading, setIsLoading] = useState(false);\n\n const requiredMsg = useContent(ContentId.Required);\n const floorMustBeLessThanCeilingError = useContent(\n ContentId.FloorMustBeLessThanCeiling\n );\n const compListingFloorCeilingError = useContent(\n ContentId.CompListingFloorMustLessThanCeiling\n );\n\n const {\n openConfirmDialog: openConfirmDeleteDialog,\n closeConfirmDialog: closeConfirmDeleteDialog,\n } = useConfirmDialog();\n\n const autoPricingSettingsCollectionId = watch(\n 'autoPricingSettingsCollectionId'\n );\n\n const hasIntelligibleAutoPricingSettingsFeature =\n useUserHasAutopricingFeature(Feature.IntelligibleAutoPricingSettings);\n const hasAllowSeatScoreCompListingModeFeature = useUserHasAutopricingFeature(\n Feature.AllowSeatScoreCompListingMode\n );\n\n const { upsertAutoPricingStrategy, deleteAutoPricingStrategy } =\n useAutoPricingStrategies(listing, isBulkEdit);\n\n const onSubmit = useCallback(\n async (strategyInput: AutoPricingSettingsCollectionInput) => {\n setIsLoading(true);\n tryInvokeApi(\n async () => {\n const input = strategyInput as AutoPricingSettingsCollection;\n const id = await upsertAutoPricingStrategy({\n input,\n });\n\n if (id) {\n onStrategyUpdated?.(id);\n }\n },\n (error) => {\n showErrorDialog('PricingClient.upsertAutoPricingStrategy', error, {\n trackErrorData: strategyInput,\n });\n },\n () => {\n setIsLoading(false);\n }\n );\n },\n [onStrategyUpdated, showErrorDialog, upsertAutoPricingStrategy]\n );\n\n const onSubmitHandler = useCallback(() => {\n const listForm = getValues();\n\n if (\n !validateAutoPricingSettings(\n clearErrors,\n setError,\n setValue as unknown as UseFormSetValue,\n listForm,\n floorMustBeLessThanCeilingError,\n compListingFloorCeilingError,\n requiredMsg,\n true // isStrategy\n )\n ) {\n return;\n }\n\n handleSubmit(onSubmit)();\n return;\n }, [\n clearErrors,\n compListingFloorCeilingError,\n floorMustBeLessThanCeilingError,\n getValues,\n handleSubmit,\n onSubmit,\n requiredMsg,\n setError,\n setValue,\n ]);\n\n const onStrategyDelete = useCallback(() => {\n closeConfirmDeleteDialog();\n\n if (!autoPricingSettingsCollectionId) return;\n\n setIsLoading(true);\n tryInvokeApi(\n async () => {\n await deleteAutoPricingStrategy({\n collectionId: autoPricingSettingsCollectionId,\n });\n\n onClosed?.();\n },\n (error) => {\n showErrorDialog('PricingClient.deleteAutoPricingStrategy', error, {\n trackErrorData: { autoPricingSettingsCollectionId },\n });\n },\n () => {\n setIsLoading(false);\n }\n );\n }, [\n autoPricingSettingsCollectionId,\n closeConfirmDeleteDialog,\n deleteAutoPricingStrategy,\n onClosed,\n showErrorDialog,\n ]);\n\n return (\n <>\n \n ) : (\n \n )\n }\n onKeyUp={(e) => {\n if (e.key === 'Enter') {\n onSubmitHandler();\n }\n }}\n onOpened={() => {\n reset(defaultValues);\n }}\n footer={\n \n <>\n {autoPricingSettingsCollectionId ? (\n \n openConfirmDeleteDialog({\n size: 'm',\n headerText: (\n \n ),\n bodyText: ,\n onOkay: onStrategyDelete,\n onCancel: closeConfirmDeleteDialog,\n okText: ContentId.Yes,\n cancelText: ContentId.No,\n })\n }\n >\n \n \n ) : (\n \n )}\n \n \n {onClosed && (\n \n )}\n \n \n \n \n \n }\n onCancel={isLoading ? undefined : onCancel}\n >\n \n \n \n \n \n\n (\n }\n >\n \n \n )}\n />\n {hasIntelligibleAutoPricingSettingsFeature ? (\n \n ) : (\n \n )}\n \n \n \n \n );\n}\n","import { useCallback, useEffect, useMemo, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { ButtonWithIcon } from 'src/components/Buttons';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { PosSelect } from 'src/core/POS/PosSelect';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport {\n AutoPricingSettingsCollectionInput,\n AutoPricingStrategyDialog,\n AutoPricingStrategyDialogProps,\n} from 'src/dialogs/AutoPricingStrategyDialog';\nimport { useAutoPricingStrategies } from 'src/hooks/api/useAutoPricingStrategies';\nimport { EditIcon, PlusIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport {\n AutoPricingSettingsCollection,\n ListingDetailsAutoPricingSectionUpdatesV2,\n} from 'src/WebApiController';\n\nimport { useAutoPricingSettings } from '../useBulkAutoPricingSettings';\nimport { PricingSetting } from './PricingSetting';\n\nexport const AutoPricingStrategySetting = () => {\n const {\n openDialog: openAutoPricingStrategyDialog,\n closeDialog: closeAutoPricingStrategyDialog,\n } = useDialog(\n DialogId.AutoPricingStrategy,\n AutoPricingStrategyDialog\n );\n const { setValue } =\n useFormContext();\n const { autoPricingStrategiesQuery } = useAutoPricingStrategies();\n\n const [selectedAutoPricingStrategyId, setSelectedAutoPricingStrategyId] =\n useState(null);\n\n const createStrategyText = useContent(ContentId.CreatePricingStrategy);\n\n const keyOptionsContent = useMemo(() => {\n return (\n autoPricingStrategiesQuery.data?.reduce(\n (re, r) => {\n re[r.autoPricingSettingsCollectionId?.toString() ?? ''] =\n r.strategyName;\n return re;\n },\n {} as Record\n ) ?? {}\n );\n }, [autoPricingStrategiesQuery.data]);\n\n useEffect(() => {\n const autoPricingStrategy = autoPricingStrategiesQuery.data?.find(\n (r) => r.autoPricingSettingsCollectionId === selectedAutoPricingStrategyId\n );\n\n if (selectedAutoPricingStrategyId) {\n if (!autoPricingStrategy) {\n // On strategy delete, reset the form\n setSelectedAutoPricingStrategyId(null);\n } else {\n // on strategy change, apply the settings to the form\n applyAutoPricingStrategy(autoPricingStrategy);\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [autoPricingStrategiesQuery.data]);\n\n const {\n autoPricingEnabled,\n\n undercutMode,\n undercutAbsoluteAmount,\n undercutRelativeAmount,\n\n compListingMode,\n compListingFloor,\n compListingCeiling,\n compListingQuantityScoreAdjustmentEnabled,\n compListingOnlyForSameZoneEnabled,\n compListingOnlyForSelectedSectionsEnabled,\n compListingExcludeFanInventory,\n compListingExcludeDefects,\n\n circuitBreakerRelativeCeiling,\n circuitBreakerRelativeFloor,\n circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerMaxDiscountVelocityTicksInHours,\n circuitBreakerMinCompListingCount,\n\n outlierMode,\n outlierStandardDeviations,\n outlierKthLowestLimit,\n outlierKthLowestLimitRelativeSpacing,\n outlierKthLowestLimitAbsoluteSpacing,\n\n onUndercutChange,\n onCompListingChange,\n onCircuitBreakerChange,\n onOutlierChange,\n } = useAutoPricingSettings();\n\n const applyAutoPricingStrategy = useCallback(\n (autoPricingStrategy: AutoPricingSettingsCollection) => {\n // Apply the settings to the form\n setValue('autoPricingEnabled', posChangedField(true));\n\n onUndercutChange(\n autoPricingStrategy.undercutMode,\n autoPricingStrategy.undercutAbsoluteAmount,\n autoPricingStrategy.undercutRelativeAmount\n );\n onCompListingChange({\n compListingModeNew: autoPricingStrategy.compListingMode,\n compListingFloorNew: autoPricingStrategy.compListingFloor,\n compListingCeilingNew: autoPricingStrategy.compListingCeiling,\n compListingOnlyForSameZoneEnabledNew:\n autoPricingStrategy.compListingOnlyForSameZoneEnabled,\n compListingOnlyForSelectedSectionsEnabledNew:\n autoPricingStrategy.compListingOnlyForSelectedSectionsEnabled,\n compListingQuantityScoreAdjustmentEnabledNew:\n autoPricingStrategy.compListingQuantityScoreAdjustmentEnabled,\n compListingExcludeFanInventoryNew:\n autoPricingStrategy.compListingExcludeFanInventory,\n compListingExcludeDefectsNew:\n autoPricingStrategy.compListingExcludeDefects,\n });\n onCircuitBreakerChange(\n autoPricingStrategy.circuitBreakerRelativeCeiling,\n autoPricingStrategy.circuitBreakerRelativeFloor,\n autoPricingStrategy.circuitBreakerMaxDiscountVelocityPercent,\n autoPricingStrategy.circuitBreakerMaxDiscountVelocityTicksInHours,\n autoPricingStrategy.circuitBreakerMinCompListingCount\n );\n onOutlierChange({\n outlierModeNew: autoPricingStrategy.outlierMode,\n outlierStandardDeviationsNew:\n autoPricingStrategy.outlierStandardDeviations,\n outlierKthLowestLimitNew: autoPricingStrategy.outlierKthLowestLimit,\n outlierKthLowestLimitRelativeSpacingNew:\n autoPricingStrategy.outlierKthLowestLimitRelativeSpacing,\n outlierKthLowestLimitAbsoluteSpacingNew:\n autoPricingStrategy.outlierKthLowestLimitAbsoluteSpacing,\n });\n\n setSelectedAutoPricingStrategyId(\n autoPricingStrategy.autoPricingSettingsCollectionId\n );\n },\n [\n onCircuitBreakerChange,\n onCompListingChange,\n onOutlierChange,\n onUndercutChange,\n setValue,\n ]\n );\n\n const onAutoPricingStrategyChange = useCallback(\n (value: string) => {\n if (!value) return;\n\n const autoPricingStrategy = autoPricingStrategiesQuery.data?.find(\n (r) => r.autoPricingSettingsCollectionId === parseInt(value, 10)\n );\n if (!autoPricingStrategy) {\n return;\n }\n\n applyAutoPricingStrategy(autoPricingStrategy);\n },\n [applyAutoPricingStrategy, autoPricingStrategiesQuery.data]\n );\n\n const currentValueEqualsSelectedStrategy = useMemo(() => {\n const autoPricingStrategy = autoPricingStrategiesQuery.data?.find(\n (r) => r.autoPricingSettingsCollectionId === selectedAutoPricingStrategyId\n );\n\n if (!autoPricingStrategy) return true;\n\n return (\n autoPricingEnabled?.value === true &&\n autoPricingStrategy &&\n (autoPricingStrategy.undercutMode == null ||\n autoPricingStrategy.undercutMode === undercutMode?.value) &&\n (autoPricingStrategy.undercutAbsoluteAmount == null ||\n autoPricingStrategy.undercutAbsoluteAmount ===\n undercutAbsoluteAmount?.value) &&\n (autoPricingStrategy.undercutRelativeAmount == null ||\n autoPricingStrategy.undercutRelativeAmount ===\n undercutRelativeAmount?.value) &&\n (autoPricingStrategy.compListingMode == null ||\n autoPricingStrategy.compListingMode === compListingMode?.value) &&\n (autoPricingStrategy.compListingFloor == null ||\n autoPricingStrategy.compListingFloor === compListingFloor?.value) &&\n (autoPricingStrategy.compListingCeiling == null ||\n autoPricingStrategy.compListingCeiling === compListingCeiling?.value) &&\n (autoPricingStrategy.compListingQuantityScoreAdjustmentEnabled == null ||\n autoPricingStrategy.compListingQuantityScoreAdjustmentEnabled ===\n compListingQuantityScoreAdjustmentEnabled?.value) &&\n (autoPricingStrategy.compListingOnlyForSameZoneEnabled == null ||\n autoPricingStrategy.compListingOnlyForSameZoneEnabled ===\n compListingOnlyForSameZoneEnabled?.value) &&\n (autoPricingStrategy.compListingOnlyForSelectedSectionsEnabled == null ||\n autoPricingStrategy.compListingOnlyForSelectedSectionsEnabled ===\n compListingOnlyForSelectedSectionsEnabled?.value) &&\n (autoPricingStrategy.compListingExcludeFanInventory == null ||\n autoPricingStrategy.compListingExcludeFanInventory ===\n compListingExcludeFanInventory?.value) &&\n (autoPricingStrategy.circuitBreakerRelativeCeiling == null ||\n autoPricingStrategy.circuitBreakerRelativeCeiling ===\n circuitBreakerRelativeCeiling?.value) &&\n (autoPricingStrategy.circuitBreakerRelativeFloor == null ||\n autoPricingStrategy.circuitBreakerRelativeFloor ===\n circuitBreakerRelativeFloor?.value) &&\n (autoPricingStrategy.circuitBreakerMaxDiscountVelocityPercent == null ||\n autoPricingStrategy.circuitBreakerMaxDiscountVelocityPercent ===\n circuitBreakerMaxDiscountVelocityPercent?.value) &&\n (autoPricingStrategy.circuitBreakerMaxDiscountVelocityTicksInHours ===\n null ||\n autoPricingStrategy.circuitBreakerMaxDiscountVelocityTicksInHours ===\n circuitBreakerMaxDiscountVelocityTicksInHours?.value) &&\n (autoPricingStrategy.circuitBreakerMinCompListingCount == null ||\n autoPricingStrategy.circuitBreakerMinCompListingCount ===\n circuitBreakerMinCompListingCount?.value) &&\n (autoPricingStrategy.outlierMode == null ||\n autoPricingStrategy.outlierMode === outlierMode?.value) &&\n (autoPricingStrategy.outlierStandardDeviations == null ||\n autoPricingStrategy.outlierStandardDeviations ===\n outlierStandardDeviations?.value) &&\n (autoPricingStrategy.outlierKthLowestLimit == null ||\n autoPricingStrategy.outlierKthLowestLimit ===\n outlierKthLowestLimit?.value) &&\n (autoPricingStrategy.outlierKthLowestLimitRelativeSpacing == null ||\n autoPricingStrategy.outlierKthLowestLimitRelativeSpacing ===\n outlierKthLowestLimitRelativeSpacing?.value) &&\n (autoPricingStrategy.outlierKthLowestLimitAbsoluteSpacing == null ||\n autoPricingStrategy.outlierKthLowestLimitAbsoluteSpacing ===\n outlierKthLowestLimitAbsoluteSpacing?.value)\n );\n }, [\n autoPricingEnabled,\n autoPricingStrategiesQuery.data,\n circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerMaxDiscountVelocityTicksInHours,\n circuitBreakerMinCompListingCount,\n circuitBreakerRelativeCeiling,\n circuitBreakerRelativeFloor,\n compListingCeiling,\n compListingFloor,\n compListingMode,\n compListingOnlyForSameZoneEnabled,\n compListingOnlyForSelectedSectionsEnabled,\n compListingExcludeFanInventory,\n compListingQuantityScoreAdjustmentEnabled,\n outlierMode,\n outlierStandardDeviations,\n outlierKthLowestLimit,\n outlierKthLowestLimitRelativeSpacing,\n outlierKthLowestLimitAbsoluteSpacing,\n selectedAutoPricingStrategyId,\n undercutAbsoluteAmount,\n undercutMode,\n undercutRelativeAmount,\n ]);\n\n const isStrategyApplied =\n currentValueEqualsSelectedStrategy && selectedAutoPricingStrategyId;\n\n const defaultValuesForStrategy = useMemo(() => {\n const autoPricingStrategy = isStrategyApplied\n ? autoPricingStrategiesQuery.data?.find(\n (r) =>\n r.autoPricingSettingsCollectionId === selectedAutoPricingStrategyId\n )\n : undefined;\n\n return {\n autoPricingSettingsCollectionId:\n autoPricingStrategy?.autoPricingSettingsCollectionId,\n strategyName: autoPricingStrategy?.strategyName,\n\n autoPricingEnabled: autoPricingEnabled?.value,\n\n undercutMode: undercutMode?.value,\n undercutAbsoluteAmount: undercutAbsoluteAmount?.value,\n undercutRelativeAmount: undercutRelativeAmount?.value,\n\n compListingMode: compListingMode?.value,\n compListingFloor: compListingFloor?.value,\n compListingCeiling: compListingCeiling?.value,\n compListingQuantityScoreAdjustmentEnabled:\n compListingQuantityScoreAdjustmentEnabled?.value,\n compListingOnlyForSameZoneEnabled:\n compListingOnlyForSameZoneEnabled?.value,\n compListingOnlyForSelectedSectionsEnabled:\n compListingOnlyForSelectedSectionsEnabled?.value,\n compListingExcludeFanInventory: compListingExcludeFanInventory?.value,\n compListingExcludeDefects: compListingExcludeDefects?.value,\n\n circuitBreakerRelativeCeiling: circuitBreakerRelativeCeiling?.value,\n circuitBreakerRelativeFloor: circuitBreakerRelativeFloor?.value,\n circuitBreakerMaxDiscountVelocityPercent:\n circuitBreakerMaxDiscountVelocityPercent?.value,\n circuitBreakerMaxDiscountVelocityTicksInHours:\n circuitBreakerMaxDiscountVelocityTicksInHours?.value,\n circuitBreakerMinCompListingCount:\n circuitBreakerMinCompListingCount?.value,\n\n outlierMode: outlierMode?.value,\n outlierStandardDeviations: outlierStandardDeviations?.value,\n outlierKthLowestLimit: outlierKthLowestLimit?.value,\n outlierKthLowestLimitRelativeSpacing:\n outlierKthLowestLimitRelativeSpacing?.value,\n outlierKthLowestLimitAbsoluteSpacing:\n outlierKthLowestLimitAbsoluteSpacing?.value,\n } as AutoPricingSettingsCollectionInput;\n }, [\n isStrategyApplied,\n autoPricingStrategiesQuery.data,\n autoPricingEnabled?.value,\n undercutMode?.value,\n undercutAbsoluteAmount?.value,\n undercutRelativeAmount?.value,\n compListingMode?.value,\n compListingFloor?.value,\n compListingCeiling?.value,\n compListingQuantityScoreAdjustmentEnabled?.value,\n compListingOnlyForSameZoneEnabled?.value,\n compListingOnlyForSelectedSectionsEnabled?.value,\n compListingExcludeFanInventory?.value,\n compListingExcludeDefects?.value,\n circuitBreakerRelativeCeiling?.value,\n circuitBreakerRelativeFloor,\n circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerMaxDiscountVelocityTicksInHours,\n circuitBreakerMinCompListingCount,\n outlierMode,\n outlierStandardDeviations,\n outlierKthLowestLimit,\n outlierKthLowestLimitRelativeSpacing,\n outlierKthLowestLimitAbsoluteSpacing,\n selectedAutoPricingStrategyId,\n ]);\n\n const detailContent = (\n e.stopPropagation()}\n style={{ width: '50%' }}\n />\n );\n\n const headerContent = (\n \n \n \n ) : (\n \n )\n }\n onClick={() =>\n openAutoPricingStrategyDialog({\n defaultValues: defaultValuesForStrategy,\n isLoading: autoPricingStrategiesQuery.isLoading,\n onClosed: closeAutoPricingStrategyDialog,\n onStrategyUpdated: (strategyId: number) => {\n if (strategyId !== selectedAutoPricingStrategyId) {\n // An insert\n setSelectedAutoPricingStrategyId(strategyId);\n onAutoPricingStrategyChange(strategyId.toString());\n }\n closeAutoPricingStrategyDialog();\n },\n isBulkEdit: true,\n listingHasParent: false,\n })\n }\n style={{ padding: 0, textAlign: 'start' }}\n />\n \n );\n\n return ;\n};\n","import { useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { useAvailableAutopricingModes } from 'src/hooks/useAvailableAutopricingModes';\nimport { WarningOutlineIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getCompleteEventConfigScoreOverrides } from 'src/utils/seatScoreUtils';\nimport { ListingDetailsAutoPricingSectionUpdatesV2 } from 'src/WebApiController';\n\nimport { AutoPricingSettingsInput } from '../BulkEditAutoPricingSettingsDialog.types';\nimport { useAutoPricingSettings } from '../useBulkAutoPricingSettings';\nimport { AutoPricingEnabledSetting } from './AutoPricingEnabled';\nimport * as styles from './AutoPricingSettings.css';\nimport { PricingAdvancedSettings } from './PricingAdvancedSettings';\nimport { PricingAgainst } from './PricingAgainst';\nimport { PricingProtection } from './PricingProtection';\nimport { PricingSetting } from './PricingSetting';\nimport { AutoPricingStrategySetting } from './PricingStrategy';\n\ntype AutoPricingSettingsProps = {\n settingsInput: AutoPricingSettingsInput;\n canUseZoneMap?: boolean;\n};\n\nexport const AutoPricingSettings: React.FC = ({\n settingsInput,\n canUseZoneMap,\n}) => {\n const settingContent = useContent(ContentId.Settings);\n const details = useContent(ContentId.Details);\n const status = useContent(ContentId.Status);\n\n const {\n compListingMode,\n undercutMode,\n compListingOnlyForSelectedSectionsEnabled,\n } = useAutoPricingSettings();\n\n const { activeConfigOverride, venueMapsByScoreModelQuery } =\n useEventMapContext();\n\n const { watch } = useFormContext();\n\n const deriveCompsFromVenueZoneConfig = watch(\n 'deriveCompsFromVenueZoneConfig'\n );\n\n const defaultScoreOverrides = useMemo(() => {\n // In the backend, if AVG scores are missing, then we always fallback to MVG, even if AVG is explicitly selected\n return (\n venueMapsByScoreModelQuery?.data?.AdvancedVenueGeometry?.sectionScores ??\n venueMapsByScoreModelQuery?.data?.MergedVenueGeometry?.sectionScores ??\n venueMapsByScoreModelQuery?.data?.VenueGeometry?.sectionScores\n );\n }, [\n venueMapsByScoreModelQuery?.data?.AdvancedVenueGeometry?.sectionScores,\n venueMapsByScoreModelQuery?.data?.MergedVenueGeometry?.sectionScores,\n venueMapsByScoreModelQuery?.data?.VenueGeometry?.sectionScores,\n ]);\n\n const scores = getCompleteEventConfigScoreOverrides(\n defaultScoreOverrides,\n activeConfigOverride?.scoreOverrides,\n false\n );\n\n const {\n outlierModes,\n outlierModesDisabled,\n compListingModes,\n compListingModesDisabled,\n } = useAvailableAutopricingModes(\n true,\n undercutMode?.value,\n compListingMode?.value,\n Boolean(scores?.some((s) => s.score)),\n false,\n false,\n compListingOnlyForSelectedSectionsEnabled?.value,\n deriveCompsFromVenueZoneConfig\n );\n\n const hasConflict = useMemo(\n () => Object.values(settingsInput).some(({ hasConflict }) => hasConflict),\n [settingsInput]\n );\n\n return (\n \n {hasConflict && (\n \n \n \n \n )}\n \n \n \n \n \n \n \n );\n};\n","import { RefObject, useLayoutEffect, useRef, useState } from 'react';\n\ninterface OverflowX {\n ref: RefObject;\n isOverflowX: boolean;\n}\n\n/**\n * Hook to check if an element has overflow-x\n */\nexport const useOverflowX = (): OverflowX => {\n const [isOverflowX, setIsOverflowX] = useState(false);\n const ref = useRef(null);\n\n useLayoutEffect(() => {\n const { current } = ref;\n\n const resizeObserver = new ResizeObserver(() => {\n if (current) {\n const hasOverflowX = current.scrollWidth > current.clientWidth;\n if (hasOverflowX !== isOverflowX) {\n setIsOverflowX(hasOverflowX);\n }\n }\n });\n\n if (current) {\n resizeObserver.observe(current);\n const hasOverflowX = current.scrollWidth > current.clientWidth;\n if (hasOverflowX !== isOverflowX) {\n setIsOverflowX(hasOverflowX);\n }\n }\n\n return () => resizeObserver.disconnect();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [ref]);\n\n return { ref, isOverflowX };\n};\n","import clsx from 'clsx';\nimport { SeatingInfo } from 'src/components/common/SeatingInfo';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Stack, Tooltip } from 'src/core/ui';\nimport { useOverflowX } from 'src/hooks/useOverflowX';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport * as styles from './ListingsCarouselCard.css';\n\ninterface ListingsCarouselCardSingleListingProps {\n section: string;\n row?: string | null;\n}\n\ninterface ListingsCarouselCardMyListingsProps {\n listingsCount: number;\n}\n\nexport type ListingsCarouselCardProps = (\n | ListingsCarouselCardSingleListingProps\n | ListingsCarouselCardMyListingsProps\n) & {\n isSelected: boolean;\n onClick?: () => void;\n};\n\nexport const ListingsCarouselCard = ({\n isSelected,\n onClick,\n ...rest\n}: ListingsCarouselCardProps) => {\n const { section, row } = rest as ListingsCarouselCardSingleListingProps;\n const { listingsCount } = rest as ListingsCarouselCardMyListingsProps;\n\n return (\n \n {section ? (\n \n ) : (\n \n )}\n \n );\n};\n\nconst IndividualListingCard = ({\n section,\n row,\n isSelected,\n}: ListingsCarouselCardSingleListingProps & { isSelected: boolean }) => {\n const { ref, isOverflowX } = useOverflowX();\n\n const valueLabelClassName = clsx(styles.valueLabel, {\n [styles.valueLabelSelected]: isSelected,\n });\n return (\n <>\n \n {isOverflowX ? (\n {section}\n }\n contentVariant=\"theme\"\n >\n \n \n ) : (\n {section}\n )}\n \n\n {row && (\n \n \n \n \n {row}\n \n )}\n \n );\n};\n\nconst MyListingsCard = ({\n listingsCount,\n isSelected,\n}: ListingsCarouselCardMyListingsProps & { isSelected: boolean }) => {\n const attrLabelClassName = clsx(styles.attrLabel, {\n [styles.attrLabelSelected]: isSelected,\n });\n return (\n <>\n
    \n \n {}\n \n
    \n\n \n {listingsCount}\n \n \n );\n};\n","import { ScrollArea, Stack } from 'src/core/ui';\nimport { sortSeating } from 'src/utils/tableUtils';\nimport { Listing } from 'src/WebApiController';\n\nimport { ListingsCarouselCard } from '../ListingsCarouselCard/ListingsCarouselCard';\nimport * as styles from './ListingsCarousel.css';\nimport { VerticalDivider } from './ListingsCarousel.styled';\n\nexport type ListingsCarouselProps = {\n listings: Listing[];\n selectedListing: Listing | null;\n setSelectedListing: (listing: Listing | null) => void;\n};\n\nconst MY_LISTINGS_KEY = 0;\nconst DIVIDER_LINE_KEY = 1;\n\nexport const ListingsCarousel = ({\n listings,\n selectedListing,\n setSelectedListing,\n}: ListingsCarouselProps) => {\n return (\n \n \n \n setSelectedListing?.(null)}\n />\n\n \n\n {listings\n .toSorted((a, b) => sortSeating(a.seating, b.seating))\n .map((l, i) => {\n const index = i + 2;\n return (\n setSelectedListing?.(l)}\n />\n );\n })}\n \n \n \n );\n};\n","import { useCallback, useMemo, useState } from 'react';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { Stack } from 'src/core/ui';\nimport { getAllInPriceFromListPriceForListing } from 'src/utils/inventoryUtils';\nimport {\n BulkListingPriceCalculation,\n CompListing,\n Listing,\n ListingPriceCalculation,\n} from 'src/WebApiController';\n\nimport { ComparableListing, ComparableListings } from '../ComparableListings';\nimport { ListingsCarousel } from '../ListingsCarousel/ListingsCarousel';\nimport * as styles from './CompListingsPreview.css';\n\nexport type CompListingsPreviewProps = {\n isLoading: boolean;\n listings: Listing[];\n listingPriceCalculations: BulkListingPriceCalculation[];\n compListings: CompListing[];\n sellerCompListings: CompListing[];\n};\n\nexport const CompListingsPreview = ({\n isLoading,\n listings,\n listingPriceCalculations,\n compListings,\n sellerCompListings,\n}: CompListingsPreviewProps) => {\n const [selectedListing, setSelectedListing] = useState(\n listings.length == 1 ? listings[0] : null\n );\n\n const listingPriceCalculationsByListingId = useMemo(() => {\n const record: Record = {};\n listingPriceCalculations.forEach((x) => {\n record[x.listingId] = x;\n });\n\n return record;\n }, [listingPriceCalculations]);\n\n const selectedListingPriceCalculation = useMemo(\n () =>\n selectedListing\n ? listingPriceCalculationsByListingId[selectedListing.id]\n : null,\n [listingPriceCalculationsByListingId, selectedListing]\n );\n\n const mapListingToComparableListing = useCallback(\n (listing: Listing): ComparableListing => {\n const websitePrice =\n listingPriceCalculationsByListingId[listing.id]?.websitePrice?.amt ??\n getAllInPriceFromListPriceForListing(listing);\n\n return {\n listingId: listing.id,\n section: listing.seating.section,\n row: listing.seating.row ?? undefined,\n seatFr: listing.seating.seatFr ?? undefined,\n seatTo: listing.seating.seatTo ?? undefined,\n price: websitePrice,\n currencyCode: listing.currency,\n listingNotes: listing.seatTraits ?? undefined,\n // Price assuming same fees as seller’s account\n sellerNetProceeds: listing.listPrice,\n isYourListing: true,\n availableTickets: listing.availQty,\n validPurchaseQuantities: listing.vldPurQty,\n isSelectedWithListingGroup: false,\n };\n },\n [listingPriceCalculationsByListingId]\n );\n\n const isComparableToSelectedListing = useCallback(\n (cl: CompListing) => {\n if (cl.isSellerCompListing) {\n return (\n selectedListingPriceCalculation?.sellerCompStubHubListingIds.includes(\n cl.listingId\n ) ?? false\n );\n }\n\n const isComparableListing =\n selectedListingPriceCalculation?.compStubHubListingIds.includes(\n cl.listingId\n ) ?? false;\n const isOutlierListing =\n selectedListingPriceCalculation?.outlierStubHubListingIds.includes(\n cl.listingId\n ) ?? false;\n\n return !selectedListing || isComparableListing || isOutlierListing;\n },\n [\n selectedListing,\n selectedListingPriceCalculation?.compStubHubListingIds,\n selectedListingPriceCalculation?.outlierStubHubListingIds,\n selectedListingPriceCalculation?.sellerCompStubHubListingIds,\n ]\n );\n\n const mapCompListingToComparableListing = useCallback(\n (cl: CompListing): ComparableListing => {\n const isAnchor =\n selectedListingPriceCalculation?.underCutChosenListingId ==\n cl.listingId;\n const isOutlier =\n selectedListingPriceCalculation?.outlierStubHubListingIds.includes(\n cl.listingId\n ) ?? false;\n\n return {\n listingId: cl.listingId,\n section: cl.section ?? undefined,\n row: cl.row ?? undefined,\n seatFr: cl.seatFrom ?? undefined,\n seatTo: cl.seatTo ?? undefined,\n price: cl.sellerAllInPrice?.amt,\n currencyCode: cl.sellerAllInPrice?.currency ?? undefined,\n listingNotes: cl.listingNotes ?? undefined,\n // Price assuming same fees as seller’s account\n sellerNetProceeds: cl.sellerNetProceeds?.amt ?? undefined,\n isAnchor: isAnchor,\n isOutlier: isOutlier,\n isYourListing: cl.isSellerCompListing ?? false,\n availableTickets: cl.availableTickets ?? undefined,\n validPurchaseQuantities: cl.validPurchaseQuantities ?? undefined,\n isSelectedWithListingGroup: false,\n };\n },\n [\n selectedListingPriceCalculation?.outlierStubHubListingIds,\n selectedListingPriceCalculation?.underCutChosenListingId,\n ]\n );\n\n const currentListings = useMemo(() => {\n if (selectedListing) {\n return [mapListingToComparableListing(selectedListing)];\n }\n\n return listings.map((l) => mapListingToComparableListing(l));\n }, [listings, mapListingToComparableListing, selectedListing]);\n\n const currentCompListings = useMemo(\n () =>\n [...compListings, ...sellerCompListings].filter(\n isComparableToSelectedListing\n ),\n [compListings, isComparableToSelectedListing, sellerCompListings]\n );\n\n const currentComparableListings = useMemo(\n () => currentCompListings.map(mapCompListingToComparableListing),\n [currentCompListings, mapCompListingToComparableListing]\n );\n\n const listingPriceCalcWithComps = useMemo(\n (): ListingPriceCalculation | null =>\n selectedListingPriceCalculation\n ? {\n ...selectedListingPriceCalculation,\n compListings: currentCompListings,\n }\n : null,\n [currentCompListings, selectedListingPriceCalculation]\n );\n\n return isLoading ? (\n \n ) : (\n \n {listings.length > 1 && (\n \n )}\n\n \n \n );\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { PricingClient } from 'src/WebApiController';\n\nimport { useAppContext } from '../AppContext';\nimport { ErrorTypes, useErrorBoundaryContext } from '../ErrorBoundaryContext';\n\nexport const useGetActiveVenueZoneMapSectionGroups = (\n viagogoEventId: number\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const { trackError } = useErrorBoundaryContext();\n\n const shouldQuery = Boolean(\n activeAccountWebClientConfig.activeAccountId != null && viagogoEventId\n );\n\n const activeVenueZoneMapSectionGroupsQuery = useQuery({\n queryKey: [\n 'PricingClient.getActiveVenueZoneMapSectionGroups',\n activeAccountWebClientConfig.activeAccountId,\n viagogoEventId,\n ],\n queryFn: async () => {\n if (!shouldQuery) {\n return null;\n }\n\n return await new PricingClient(\n activeAccountWebClientConfig\n ).getActiveVenueZoneMapSectionGroups(viagogoEventId);\n },\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError('PricingClient.getActiveVenueZoneMapSectionGroups', error, {\n trackErrorData: {\n activeAccountId: activeAccountWebClientConfig.activeAccountId,\n viagogoEventId: viagogoEventId,\n },\n });\n },\n },\n });\n\n return {\n activeVenueZoneMapSectionGroupsQuery,\n sectionGroupsBySectionId: activeVenueZoneMapSectionGroupsQuery.data,\n isLoading: activeVenueZoneMapSectionGroupsQuery.isLoading,\n };\n};\n","import { head, uniq } from 'lodash-es';\nimport { useCallback } from 'react';\nimport { SectionInfo, VenueMapInfo } from 'src/WebApiController';\n\nexport const useEventVenueMapSectionHandler = (\n selectedSectionIds?: number[],\n setSelectedSectionIds?: (selectedSectionIds: number[]) => void,\n venueMapInfo?: VenueMapInfo | null\n) => {\n const onSectionIdsIncludedOrExcluded = useCallback(\n (\n updatedSectionIds: number[] | null | undefined,\n excludeUpdatedSectionIds: boolean | undefined\n ) => {\n const newSelectedSectionIds = excludeUpdatedSectionIds\n ? selectedSectionIds?.filter(\n (id) => !updatedSectionIds?.includes(id)\n ) ?? []\n : uniq([...(selectedSectionIds ?? []), ...(updatedSectionIds ?? [])]);\n setSelectedSectionIds?.(newSelectedSectionIds);\n },\n [selectedSectionIds, setSelectedSectionIds]\n );\n\n const onShiftSelect = useCallback(\n (sectionInfo: SectionInfo) => {\n // We are using the ticketClassId to group the sections\n const selectedClassId = head(\n sectionInfo?.rows\n ?.map(({ tktClass: ticketClass }) => ticketClass?.id)\n .filter((id) => !!id)\n );\n const updatedSectionIds = venueMapInfo?.sections\n ?.filter(\n ({ rows }: SectionInfo) =>\n rows?.some(\n ({ tktClass: ticketClass }) => ticketClass?.id === selectedClassId\n )\n )\n ?.map((s: SectionInfo) => s.id);\n\n onSectionIdsIncludedOrExcluded(\n updatedSectionIds,\n Boolean(selectedSectionIds?.includes(sectionInfo.id))\n );\n },\n [onSectionIdsIncludedOrExcluded, selectedSectionIds, venueMapInfo?.sections]\n );\n\n const onSingleSelect = useCallback(\n (sectionInfo: SectionInfo) =>\n onSectionIdsIncludedOrExcluded(\n [sectionInfo.id],\n Boolean(selectedSectionIds?.includes(sectionInfo.id))\n ),\n [onSectionIdsIncludedOrExcluded, selectedSectionIds]\n );\n\n const onSectionClicked = useCallback(\n (e: MouseEvent, sectionInfo: SectionInfo) => {\n if (e.shiftKey) {\n onShiftSelect(sectionInfo);\n return;\n }\n\n onSingleSelect(sectionInfo);\n },\n [onShiftSelect, onSingleSelect]\n );\n\n const onToggleMirrors = useCallback(\n (mirrors: SectionInfo[], exclude?: boolean) => {\n onSectionIdsIncludedOrExcluded(\n mirrors.map((s) => s.id),\n exclude\n );\n },\n [onSectionIdsIncludedOrExcluded]\n );\n\n const setSelectedSections = useCallback(\n (sections: SectionInfo[]) => {\n setSelectedSectionIds?.(sections.map(({ id }) => id));\n },\n [setSelectedSectionIds]\n );\n\n return {\n onSectionClicked,\n onToggleMirrors,\n setSelectedSections,\n };\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { isEmpty } from 'lodash-es';\nimport { useCallback, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { createGetColor } from 'src/components/Listings/InventoryEventPage/utils/colorUtils';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { useGetActiveVenueZoneMapSectionGroups } from 'src/contexts/EventMapContext/useGetActiveVenueZoneMapSectionGroups';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { useComparableListingsVenueMapColor } from 'src/hooks/useComparableListingsVenueMapColor';\nimport { useEventVenueMapSectionHandler } from 'src/hooks/useEventVenueMapSectionHandler';\nimport { quantityFiltersFromJson } from 'src/utils/autoPricingUtils';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport {\n BulkEditListingClient,\n CompListing,\n Event,\n Listing,\n ListingDetailsAutoPricingSectionUpdatesV2,\n ListingPriceCalculationsInEventInput,\n NetProceedsFloorAdjustment,\n SelectedSectionSettings,\n UiMoney,\n} from 'src/WebApiController';\n\nexport const useBulkGetListingPriceCalculationsInEvent = (\n event: Event,\n selectedListings: Listing[]\n) => {\n const { activeAccountWebClientConfig, loginContext } = useAppContext();\n const { getUiCurrency } = useLocalizationContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const uiCurrency = useMemo(\n () => getUiCurrency(loginContext?.user?.activeAccount?.currencyCode),\n [getUiCurrency, loginContext?.user?.activeAccount?.currencyCode]\n );\n\n const listingIds = useMemo(\n () => selectedListings.map((l) => l.id),\n [selectedListings]\n );\n\n const { watch } = useFormContext();\n const formValues = watch();\n\n // TODO: The bulk edit form should just be ListingPriceCalculationsInEventInput directly\n const autoPricingSettingsUpdates: ListingPriceCalculationsInEventInput =\n useMemo(\n () => ({\n compListingSetting: {\n mode: formValues.compListingMode,\n selectedSectionSettings: formValues.deriveCompsFromVenueZoneConfig\n ? {\n value: {\n sectionIdFilterFromZoneMap: true,\n includeBetterZones: formValues.includeBetterZones,\n rowOffset: formValues.rowCompOffset,\n } as SelectedSectionSettings,\n hasChanged: true,\n }\n : formValues.compListingSelectedSectionSettings,\n includeExistingSelectedSectionSettings: {\n value: formValues.includeExistingSelectedSections,\n hasChanged: formValues.includeExistingSelectedSections !== null,\n },\n onlyForSelectedSectionsEnabled:\n formValues.compListingOnlyForSelectedSectionsEnabled,\n quantityFilters:\n formValues.compListingQuantityScoreAdjustmentOverrideJson\n ? {\n value: quantityFiltersFromJson(\n formValues.compListingQuantityScoreAdjustmentOverrideJson\n .value\n ),\n hasChanged:\n formValues.compListingQuantityScoreAdjustmentOverrideJson\n .hasChanged,\n }\n : null,\n excludeFanInventory: formValues.compListingExcludeFanInventory,\n excludeDefects: formValues.compListingExcludeDefects,\n },\n underCutSetting: {\n underCutAbsoluteAmount: formValues.undercutAbsoluteAmount\n ? {\n value: formValues.undercutAbsoluteAmount.value\n ? ({\n amt: formValues.undercutAbsoluteAmount.value,\n currency: uiCurrency.code,\n } as UiMoney)\n : null,\n hasChanged: formValues.undercutAbsoluteAmount.hasChanged,\n }\n : null,\n underCutRelativeAmount: formValues.undercutRelativeAmount,\n },\n outlierSetting: {\n mode: formValues.outlierMode,\n standardDeviations: formValues.outlierStandardDeviations,\n outlierLimit: formValues.outlierKthLowestLimit,\n absoluteOutlierSpacing:\n formValues.outlierKthLowestLimitAbsoluteSpacing\n ? {\n value: formValues.outlierKthLowestLimitAbsoluteSpacing.value\n ? ({\n amt: formValues.outlierKthLowestLimitAbsoluteSpacing\n .value,\n currency: uiCurrency.code,\n } as UiMoney)\n : null,\n hasChanged:\n formValues.outlierKthLowestLimitAbsoluteSpacing.hasChanged,\n }\n : null,\n relativeOutlierSpacing:\n formValues.outlierKthLowestLimitRelativeSpacing,\n },\n netProceedsFloor: formValues.netProceedsFloor?.hasChanged\n ? {\n value: {\n absoluteAmount: formValues.netProceedsFloor?.value\n ? ({\n amt: formValues.netProceedsFloor.value,\n currency: uiCurrency.code,\n } as UiMoney)\n : null,\n relativeAdjustmentType: null,\n relativeAmount: null,\n relativePercentage: null,\n } as NetProceedsFloorAdjustment,\n hasChanged: true,\n }\n : formValues.netProceedsFloorAdjustmentAmount != null &&\n formValues.netProceedsFloorAdjustmentRelative != null &&\n !!formValues.netProceedsFloorAdjustmentType\n ? {\n value: {\n absoluteAmount: null,\n relativeAmount: !formValues.netProceedsFloorAdjustmentRelative\n ? {\n amt: formValues.netProceedsFloorAdjustmentAmount,\n currency: uiCurrency.code,\n }\n : null,\n relativePercentage:\n formValues.netProceedsFloorAdjustmentRelative\n ? formValues.netProceedsFloorAdjustmentAmount\n : null,\n relativeAdjustmentType:\n formValues.netProceedsFloorAdjustmentType,\n } as NetProceedsFloorAdjustment,\n hasChanged: true,\n }\n : null,\n netProceedsCeiling: formValues.netProceedsCeiling\n ? {\n value: formValues.netProceedsCeiling.value\n ? ({\n amt: formValues.netProceedsCeiling.value,\n currency: uiCurrency.code,\n } as UiMoney)\n : null,\n hasChanged: formValues.netProceedsCeiling.hasChanged,\n }\n : null,\n }),\n [\n formValues.compListingMode,\n formValues.compListingSelectedSectionSettings,\n formValues.deriveCompsFromVenueZoneConfig,\n formValues.includeBetterZones,\n formValues.includeExistingSelectedSections,\n formValues.compListingOnlyForSelectedSectionsEnabled,\n formValues.compListingQuantityScoreAdjustmentOverrideJson,\n formValues.compListingExcludeFanInventory,\n formValues.compListingExcludeDefects,\n formValues.undercutAbsoluteAmount,\n formValues.undercutRelativeAmount,\n formValues.outlierMode,\n formValues.outlierStandardDeviations,\n formValues.outlierKthLowestLimit,\n formValues.outlierKthLowestLimitAbsoluteSpacing,\n formValues.outlierKthLowestLimitRelativeSpacing,\n formValues.netProceedsFloor?.hasChanged,\n formValues.netProceedsFloor?.value,\n formValues.netProceedsFloorAdjustmentAmount,\n formValues.netProceedsFloorAdjustmentRelative,\n formValues.netProceedsFloorAdjustmentType,\n formValues.netProceedsCeiling,\n formValues.rowCompOffset,\n uiCurrency.code,\n ]\n );\n\n const shouldQuery = Boolean(\n activeAccountWebClientConfig.activeAccountId &&\n event.viagId &&\n !isEmpty(listingIds) &&\n autoPricingSettingsUpdates\n );\n const listingCalculationsQuery = useQuery({\n queryKey: [\n 'BulkEditListingClient.BulkGetListingPriceCalculationsInEvent',\n activeAccountWebClientConfig.activeAccountId,\n event.viagId,\n listingIds,\n autoPricingSettingsUpdates,\n ],\n queryFn: async () => {\n if (!shouldQuery) {\n return null;\n }\n const pricingSettings = await new BulkEditListingClient(\n activeAccountWebClientConfig\n ).bulkGetListingPriceCalculationsInEvent(event.viagId!, {\n item1: listingIds,\n item2: autoPricingSettingsUpdates!,\n });\n\n return pricingSettings;\n },\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n showErrorDialog('PricingClient.getListingAutoPricingSettings', error, {\n trackErrorData: {\n activeAccountId: activeAccountWebClientConfig.activeAccountId,\n viagogoEventId: event.viagId,\n listingIds,\n autoPricingSettingsUpdates,\n },\n });\n },\n },\n });\n\n return {\n listingCalculationsQuery,\n bulkListingPriceCalculationResult: listingCalculationsQuery.data,\n isLoading: listingCalculationsQuery.isLoading,\n };\n};\n\nexport const useBulkEditAutoPricingSettingsSidePanelEventMapProps = (\n viagogoEventId: number,\n listings: Listing[],\n compListings: CompListing[] | undefined\n) => {\n const { sectionGroupsBySectionId } =\n useGetActiveVenueZoneMapSectionGroups(viagogoEventId);\n\n const { setValue, watch } =\n useFormContext();\n const { compListingSelectedSectionSettings, deriveCompsFromVenueZoneConfig } =\n watch();\n\n const selectedSectionIds = useMemo(\n () =>\n deriveCompsFromVenueZoneConfig\n ? []\n : (compListingSelectedSectionSettings?.value?.sectionIdFilter ??\n undefined),\n [\n compListingSelectedSectionSettings?.value?.sectionIdFilter,\n deriveCompsFromVenueZoneConfig,\n ]\n );\n\n const setSelectedSectionIds = useCallback(\n (sectionIds: number[]) => {\n const compListingSelectedSectionSettingsNew = {\n ...compListingSelectedSectionSettings?.value,\n sectionIdFilter: sectionIds,\n rowIdFilter:\n compListingSelectedSectionSettings?.value?.rowIdFilter ?? [],\n sectionRowIdFilter:\n compListingSelectedSectionSettings?.value?.sectionRowIdFilter ?? {},\n sectionIdFilterFromZoneMap: false,\n includeBetterZones: false,\n rowOffset: null,\n };\n setValue(\n 'compListingSelectedSectionSettings',\n posChangedField(compListingSelectedSectionSettingsNew)\n );\n },\n [compListingSelectedSectionSettings?.value, setValue]\n );\n\n const { venueMapInfo } = useEventMapContext();\n\n const { onSectionClicked, onToggleMirrors, setSelectedSections } =\n useEventVenueMapSectionHandler(\n selectedSectionIds,\n setSelectedSectionIds,\n venueMapInfo\n );\n\n const compListingsVenueMapColor = useComparableListingsVenueMapColor(\n listings,\n undefined,\n compListings\n );\n\n const getColor = useMemo(\n () =>\n deriveCompsFromVenueZoneConfig\n ? createGetColor(sectionGroupsBySectionId)\n : compListingsVenueMapColor,\n [\n compListingsVenueMapColor,\n deriveCompsFromVenueZoneConfig,\n sectionGroupsBySectionId,\n ]\n );\n\n return {\n getColor,\n onSectionClicked,\n onToggleMirrors,\n selectedSectionIds,\n setSelectedSections,\n disableHoverEffect: Boolean(deriveCompsFromVenueZoneConfig),\n };\n};\n","import { EventVenueMap } from 'src/components/Events/VenueMap/EventVenueMap';\nimport { CompListingsPreview } from 'src/components/Listings/CompListingsPreview';\nimport { Content, FormatContent } from 'src/contexts/ContentContext';\nimport { Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { Event, Listing } from 'src/WebApiController';\n\nimport * as styles from './BulkEditAutoPricingSettingsSidePanel.css';\nimport {\n useBulkEditAutoPricingSettingsSidePanelEventMapProps,\n useBulkGetListingPriceCalculationsInEvent,\n} from './BulkEditAutoPricingSettingsSidePanel.hooks';\n\nexport const BulkEditAutoPricingSettingsSidePanel = ({\n event,\n selectedListings,\n show,\n}: {\n event: Event;\n selectedListings: Listing[];\n show?: boolean;\n}) => {\n const { bulkListingPriceCalculationResult, isLoading } =\n useBulkGetListingPriceCalculationsInEvent(event, selectedListings);\n\n const eventVenueMapProps =\n useBulkEditAutoPricingSettingsSidePanelEventMapProps(\n event.viagId!,\n selectedListings,\n bulkListingPriceCalculationResult?.compListings\n );\n\n if (!show) {\n return null;\n }\n\n return (\n \n \n
    \n }\n />\n
    \n \n \n \n \n \n \n
    \n
    \n );\n};\n","import { ContentId } from 'src/utils/constants/contentId';\n\nexport type PreviewColumn = {\n setting: ContentId;\n from: React.ReactNode;\n to: React.ReactNode;\n include: boolean;\n onChange: (checked: boolean) => void;\n};\n\nexport enum PricingSettingsPreviewColumnId {\n Setting = 'setting',\n SettingFrom = 'settingFrom',\n SettingTo = 'settingTo',\n Checkbox = 'checkbox',\n}\n","import { ColumnDef } from '@tanstack/react-table';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { vars } from 'src/core/themes';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { TableHeaderCellDiv } from 'src/core/ui/TableHeaderCellDiv';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport {\n PreviewColumn,\n PricingSettingsPreviewColumnId,\n} from './PricingSettingsPreview.types';\n\nexport const PricingSettingsPreviewColumns: ColumnDef[] = [\n {\n id: PricingSettingsPreviewColumnId.Setting,\n header: () => (\n \n \n \n ),\n minSize: 80,\n maxSize: 150,\n accessorFn: (data) => data.setting,\n cell: ({ getValue }) => {\n const value = getValue();\n\n return (\n \n \n \n );\n },\n enableSorting: false,\n },\n {\n id: PricingSettingsPreviewColumnId.SettingFrom,\n header: () => (\n \n \n \n ),\n minSize: 80,\n accessorFn: (data) => data.from,\n cell: ({ getValue }) => {\n const value = getValue();\n\n return {value};\n },\n enableSorting: false,\n },\n {\n id: PricingSettingsPreviewColumnId.SettingTo,\n header: () => (\n \n \n \n ),\n minSize: 80,\n accessorFn: (data) => data.to,\n cell: ({ getValue }) => {\n const value = getValue();\n\n return {value};\n },\n enableSorting: false,\n },\n {\n id: PricingSettingsPreviewColumnId.Checkbox,\n header: () => (\n \n \n \n ),\n size: 80,\n accessorFn: (data) => data,\n cell: ({ getValue }) => {\n const { include, onChange } = getValue();\n\n return (\n \n {\n onChange(!include);\n }}\n />\n \n );\n },\n enableSorting: false,\n },\n];\n","import { TableOptions } from '@tanstack/react-table';\nimport { useMemo } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { Stack } from 'src/core/ui/Stack';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getAllInPriceFromListPrice } from 'src/utils/inventoryUtils';\nimport { applyNumberFormatting } from 'src/utils/numberFormatter';\nimport { hasChanged } from 'src/utils/posFieldUtils';\nimport {\n ListingDetailsAutoPricingSectionUpdatesV2,\n Marketplace,\n} from 'src/WebApiController';\n\nimport {\n AutoPricingSettingsInput,\n PricingSettingsUpdateKey,\n} from '../BulkEditAutoPricingSettingsDialog.types';\nimport { PricingSettingsPreviewColumns } from './PricingSettingsPreview.constants';\nimport { PreviewColumn } from './PricingSettingsPreview.types';\n\nconst booleanToText = (\n value: boolean | null | undefined,\n defaultText: string,\n reverse = false\n) => {\n if (value == null) return defaultText;\n return Boolean(reverse ? !value : value) + '';\n};\n\nexport const usePricingSettingsPreviewTable = (\n settingsInput: AutoPricingSettingsInput,\n defaultValues: ListingDetailsAutoPricingSectionUpdatesV2,\n updates: ListingDetailsAutoPricingSectionUpdatesV2,\n updateChangedFields: (\n values: Partial>\n ) => void,\n changedFields?: Partial>\n): Partial> => {\n const conflictText = useContent(ContentId.Conflict);\n const existingSectionsText = useContent(ContentId.ExistingSections);\n const overrideText = useContent(ContentId.Override);\n const naText = useContent(ContentId.NA);\n const sameZoneOrBetter = useContent(ContentId.SameZoneOrBetter);\n const sameZone = useContent(ContentId.SameZone);\n\n const { loginContext } = useAppContext();\n const sellerFee =\n loginContext?.user?.activeAccount?.marketplaceSettings?.find(\n (m) => m.mkp === Marketplace.StubHub\n )?.sellerFee;\n\n const { venueMapInfo } = useEventMapContext();\n\n const sectionIdToName = useMemo(() => {\n return (venueMapInfo?.sections ?? []).reduce(\n (res, section) => {\n res[section.id] = section.name;\n return res;\n },\n {} as Record\n );\n }, [venueMapInfo?.sections]);\n\n const data = useMemo((): PreviewColumn[] => {\n const settings: PreviewColumn[] = [];\n if (\n hasChanged(updates?.autoPricingEnabled, defaultValues.autoPricingEnabled)\n ) {\n settings.push({\n setting: ContentId.EnableAutoPricing,\n from: settingsInput.autoPricingEnabled?.hasConflict\n ? conflictText\n : defaultValues.autoPricingEnabled?.value + '',\n to: updates.autoPricingEnabled?.value + '',\n include: !!changedFields?.autoPricingEnabled,\n onChange: (include: boolean) => {\n updateChangedFields({\n autoPricingEnabled: include,\n });\n },\n });\n }\n\n if (hasChanged(updates?.compListingMode, defaultValues.compListingMode)) {\n settings.push({\n setting: ContentId.AllListings,\n from: settingsInput.compListingMode?.hasConflict\n ? conflictText\n : defaultValues.compListingMode?.value,\n to: updates.compListingMode?.value,\n include: !!changedFields?.compListingMode,\n onChange: (include: boolean) => {\n updateChangedFields({\n compListingMode: include,\n });\n },\n });\n }\n\n if (\n hasChanged(\n updates?.compListingExcludeFanInventory,\n defaultValues.compListingExcludeFanInventory\n )\n ) {\n settings.push({\n setting: ContentId.ExcludeFanInventory,\n from: settingsInput.compListingExcludeFanInventory?.hasConflict\n ? conflictText\n : booleanToText(\n defaultValues.compListingExcludeFanInventory?.value,\n naText\n ),\n to: booleanToText(\n updates.compListingExcludeFanInventory?.value,\n naText\n ),\n include: !!changedFields?.compListingExcludeFanInventory,\n onChange: (include: boolean) => {\n updateChangedFields({\n compListingExcludeFanInventory: include,\n });\n },\n });\n }\n if (\n hasChanged(\n updates?.compListingExcludeDefects,\n defaultValues.compListingExcludeDefects\n )\n ) {\n settings.push({\n setting: ContentId.IncludeDefects,\n from: settingsInput.compListingExcludeDefects?.hasConflict\n ? conflictText\n : booleanToText(\n defaultValues.compListingExcludeDefects?.value,\n naText,\n true\n ),\n to: booleanToText(\n updates.compListingExcludeDefects?.value,\n naText,\n true\n ),\n include: !!changedFields?.compListingExcludeDefects,\n onChange: (include: boolean) => {\n updateChangedFields({\n compListingExcludeDefects: include,\n });\n },\n });\n }\n\n if (\n hasChanged(\n updates?.compListingSelectedSectionSettings,\n defaultValues.compListingSelectedSectionSettings\n ) ||\n (settingsInput.compListingSelectedSectionSettings?.hasConflict &&\n !updates.includeExistingSelectedSections)\n ) {\n const defaultSelectedSections = (\n defaultValues.compListingSelectedSectionSettings?.value\n ?.sectionIdFilter ?? []\n ).map((id) => sectionIdToName[id]);\n const updatedSectionedSections = (\n updates.compListingSelectedSectionSettings?.value?.sectionIdFilter ?? []\n ).map((id) => sectionIdToName[id]);\n settings.push({\n setting: ContentId.Sections,\n from: settingsInput.compListingSelectedSectionSettings?.hasConflict\n ? conflictText\n : defaultSelectedSections.join(','),\n to: `${\n updates.includeExistingSelectedSections\n ? existingSectionsText + ', '\n : overrideText\n } ${updatedSectionedSections.join(',')}`,\n include: !!changedFields?.compListingSelectedSectionSettings,\n onChange: (include: boolean) => {\n updateChangedFields({\n compListingSelectedSectionSettings: include,\n });\n },\n });\n }\n\n if (\n updates.deriveCompsFromVenueZoneConfig !=\n defaultValues?.deriveCompsFromVenueZoneConfig ||\n updates.includeBetterZones != defaultValues?.includeBetterZones ||\n updates.rowCompOffset != defaultValues?.rowCompOffset\n ) {\n const defaultSelectedSections = (\n defaultValues.compListingSelectedSectionSettings?.value\n ?.sectionIdFilter ?? []\n ).map((id) => sectionIdToName[id]);\n\n const venueMapName = updates.venueZoneMapName;\n const betterZonesValue = updates.includeBetterZones\n ? sameZoneOrBetter\n : sameZone;\n\n settings.push({\n setting: ContentId.Sections,\n from: settingsInput.compListingSelectedSectionSettings?.hasConflict\n ? conflictText\n : defaultSelectedSections.join(','),\n to: `${venueMapName}, ${betterZonesValue}, Row Comp Offset: ${updates.rowCompOffset}`,\n include: !!changedFields?.deriveCompsFromVenueZoneConfig,\n onChange: (include: boolean) => {\n updateChangedFields({\n deriveCompsFromVenueZoneConfig: include,\n });\n },\n });\n }\n\n if (\n hasChanged(\n updates?.compListingQuantityScoreAdjustmentOverrideJson,\n defaultValues.compListingQuantityScoreAdjustmentOverrideJson\n )\n ) {\n settings.push({\n setting: ContentId.SplitType,\n from: settingsInput.compListingQuantityScoreAdjustmentOverrideJson\n ?.hasConflict\n ? conflictText\n : defaultValues.compListingQuantityScoreAdjustmentOverrideJson\n ?.value + '',\n to: updates.compListingQuantityScoreAdjustmentOverrideJson?.value + '',\n include:\n !!changedFields?.compListingQuantityScoreAdjustmentOverrideJson,\n onChange: (include: boolean) => {\n updateChangedFields({\n compListingQuantityScoreAdjustmentOverrideJson: include,\n });\n },\n });\n }\n if (\n hasChanged(\n updates?.undercutAbsoluteAmount,\n defaultValues.undercutAbsoluteAmount\n ) ||\n hasChanged(\n updates?.undercutRelativeAmount,\n defaultValues.undercutRelativeAmount\n )\n ) {\n settings.push({\n setting: ContentId.UnderCutModePrompt,\n from:\n settingsInput.undercutAbsoluteAmount?.hasConflict ||\n settingsInput.undercutRelativeAmount?.hasConflict ? (\n conflictText\n ) : (\n \n \n
    \n {defaultValues.undercutRelativeAmount?.value\n ? applyNumberFormatting({\n inputNumber: defaultValues.undercutRelativeAmount.value,\n isPercent: true,\n })\n : naText}\n
    \n \n
    \n {defaultValues.undercutAbsoluteAmount?.value\n ? applyNumberFormatting({\n inputNumber: defaultValues.undercutAbsoluteAmount.value,\n currencyCode: defaultValues.currencyCode,\n })\n : naText}\n
    \n
    \n ),\n to: (\n \n \n
    \n {updates.undercutRelativeAmount?.value\n ? applyNumberFormatting({\n inputNumber: updates.undercutRelativeAmount.value,\n isPercent: true,\n })\n : naText}\n
    \n \n
    \n {updates.undercutAbsoluteAmount?.value\n ? applyNumberFormatting({\n inputNumber: updates.undercutAbsoluteAmount.value,\n currencyCode: updates.currencyCode,\n })\n : naText}\n
    \n
    \n ),\n include:\n !!changedFields?.undercutAbsoluteAmount ||\n !!changedFields?.undercutRelativeAmount,\n onChange: (include: boolean) => {\n updateChangedFields({\n undercutAbsoluteAmount: include,\n undercutRelativeAmount: include,\n });\n },\n });\n }\n if (\n hasChanged(updates?.netProceedsFloor, defaultValues.netProceedsFloor) ||\n hasChanged(updates?.netProceedsCeiling, defaultValues.netProceedsCeiling)\n ) {\n settings.push({\n setting: ContentId.PriceBelowFloor,\n from:\n settingsInput.netProceedsFloor?.hasConflict ||\n settingsInput.netProceedsCeiling?.hasConflict ? (\n conflictText\n ) : (\n \n
    \n {defaultValues.netProceedsFloor?.value\n ? applyNumberFormatting({\n inputNumber: getAllInPriceFromListPrice(\n defaultValues.netProceedsFloor.value,\n null,\n sellerFee\n ),\n currencyCode: defaultValues.currencyCode,\n })\n : naText}\n
    \n \n
    \n {defaultValues.netProceedsCeiling?.value\n ? applyNumberFormatting({\n inputNumber: getAllInPriceFromListPrice(\n defaultValues.netProceedsCeiling.value,\n null,\n sellerFee\n ),\n currencyCode: defaultValues.currencyCode,\n })\n : naText}\n
    \n
    \n ),\n to: (\n \n
    \n {updates.netProceedsFloor?.value\n ? applyNumberFormatting({\n inputNumber: getAllInPriceFromListPrice(\n updates.netProceedsFloor.value,\n null,\n sellerFee\n ),\n currencyCode: updates.currencyCode,\n })\n : naText}\n
    \n \n
    \n {updates.netProceedsCeiling?.value\n ? applyNumberFormatting({\n inputNumber: getAllInPriceFromListPrice(\n updates.netProceedsCeiling.value,\n null,\n sellerFee\n ),\n currencyCode: updates.currencyCode,\n })\n : naText}\n
    \n
    \n ),\n include:\n !!changedFields?.netProceedsFloor ||\n !!changedFields?.netProceedsCeiling,\n onChange: (include: boolean) => {\n updateChangedFields({\n netProceedsFloor: include,\n netProceedsCeiling: include,\n });\n },\n });\n }\n if (\n updates?.netProceedsFloorAdjustmentAmount != null &&\n updates?.netProceedsFloorAdjustmentRelative != null &&\n updates?.netProceedsFloorAdjustmentType != null\n ) {\n settings.push({\n setting: ContentId.AdjustFloor,\n from: naText,\n to: (\n \n
    \n {updates.netProceedsFloorAdjustmentRelative\n ? applyNumberFormatting({\n inputNumber: updates.netProceedsFloorAdjustmentAmount / 100,\n isPercent: true,\n })\n : applyNumberFormatting({\n inputNumber: updates.netProceedsFloorAdjustmentAmount,\n currencyCode: updates.currencyCode,\n })}\n
    \n \n
    {updates.netProceedsFloorAdjustmentType}
    \n
    \n ),\n include: !!changedFields?.netProceedsFloorAdjustmentAmount,\n onChange: (include: boolean) => {\n updateChangedFields({\n netProceedsFloorAdjustmentAmount: include,\n });\n },\n });\n }\n if (\n hasChanged(\n updates?.circuitBreakerMinCompListingCount,\n defaultValues.circuitBreakerMinCompListingCount\n )\n ) {\n settings.push({\n setting: ContentId.MinListingsRequired,\n from: settingsInput.circuitBreakerMinCompListingCount?.hasConflict\n ? conflictText\n : defaultValues.circuitBreakerMinCompListingCount?.value,\n to: updates.circuitBreakerMinCompListingCount?.value,\n include: !!changedFields?.circuitBreakerMinCompListingCount,\n onChange: (include: boolean) => {\n updateChangedFields({\n circuitBreakerMinCompListingCount: include,\n });\n },\n });\n }\n if (hasChanged(updates?.outlierMode, defaultValues.outlierMode)) {\n settings.push({\n setting: ContentId.OutlierMode,\n from: settingsInput.outlierMode?.hasConflict\n ? conflictText\n : defaultValues.outlierMode?.value,\n to: updates.outlierMode?.value,\n include: !!changedFields?.outlierMode,\n onChange: (include: boolean) => {\n updateChangedFields({\n outlierMode: include,\n });\n },\n });\n }\n if (\n hasChanged(\n updates?.outlierStandardDeviations,\n defaultValues.outlierStandardDeviations\n )\n ) {\n settings.push({\n setting: ContentId.OutlierFiltering,\n from: settingsInput.outlierStandardDeviations?.hasConflict\n ? conflictText\n : defaultValues.outlierStandardDeviations?.value,\n to: updates.outlierStandardDeviations?.value,\n include: !!changedFields?.outlierStandardDeviations,\n onChange: (include: boolean) => {\n updateChangedFields({\n outlierStandardDeviations: include,\n });\n },\n });\n }\n\n if (\n hasChanged(\n updates?.outlierKthLowestLimit,\n defaultValues.outlierKthLowestLimit\n ) &&\n (hasChanged(\n updates?.outlierKthLowestLimitAbsoluteSpacing,\n defaultValues.outlierKthLowestLimitAbsoluteSpacing\n ) ||\n hasChanged(\n updates?.outlierKthLowestLimitRelativeSpacing,\n defaultValues.outlierKthLowestLimitRelativeSpacing\n ))\n ) {\n settings.push({\n setting: ContentId.IgnoreTheFirst,\n from:\n settingsInput.outlierKthLowestLimit?.hasConflict ||\n settingsInput.outlierKthLowestLimitAbsoluteSpacing?.hasConflict ||\n settingsInput.outlierKthLowestLimitRelativeSpacing?.hasConflict ? (\n conflictText\n ) : (\n \n
    {defaultValues.outlierKthLowestLimit?.value ?? naText}
    \n \n
    \n {defaultValues.outlierKthLowestLimitAbsoluteSpacing?.value\n ? applyNumberFormatting({\n inputNumber:\n defaultValues.outlierKthLowestLimitAbsoluteSpacing\n ?.value,\n })\n : defaultValues.outlierKthLowestLimitRelativeSpacing?.value\n ? applyNumberFormatting({\n inputNumber:\n defaultValues.outlierKthLowestLimitRelativeSpacing\n ?.value,\n isPercent: true,\n })\n : naText}\n
    \n \n
    \n ),\n to: (\n \n
    {updates.outlierKthLowestLimit?.value ?? naText}
    \n \n
    \n {updates.outlierKthLowestLimitAbsoluteSpacing?.value\n ? applyNumberFormatting({\n inputNumber:\n updates.outlierKthLowestLimitAbsoluteSpacing?.value,\n })\n : updates.outlierKthLowestLimitRelativeSpacing?.value\n ? applyNumberFormatting({\n inputNumber:\n updates.outlierKthLowestLimitRelativeSpacing.value,\n isPercent: true,\n })\n : naText}\n
    \n \n
    \n ),\n include:\n !!changedFields?.outlierKthLowestLimit ||\n !!changedFields?.outlierKthLowestLimitAbsoluteSpacing ||\n !!changedFields?.outlierKthLowestLimitRelativeSpacing,\n onChange: (include: boolean) => {\n updateChangedFields({\n outlierKthLowestLimit: include,\n outlierKthLowestLimitAbsoluteSpacing: include,\n outlierKthLowestLimitRelativeSpacing: include,\n });\n },\n });\n }\n\n if (\n hasChanged(\n updates?.circuitBreakerMaxDiscountVelocityPercent,\n defaultValues?.circuitBreakerMaxDiscountVelocityPercent\n ) ||\n hasChanged(\n updates?.circuitBreakerMaxDiscountVelocityTicksInHours,\n defaultValues?.circuitBreakerMaxDiscountVelocityTicksInHours\n )\n ) {\n settings.push({\n setting: ContentId.DonotDropMoreThan,\n from:\n settingsInput.circuitBreakerMaxDiscountVelocityPercent?.hasConflict ||\n settingsInput.circuitBreakerMaxDiscountVelocityPercent\n ?.hasConflict ? (\n conflictText\n ) : (\n \n
    \n {defaultValues.circuitBreakerMaxDiscountVelocityPercent?.value\n ? applyNumberFormatting({\n inputNumber:\n defaultValues.circuitBreakerMaxDiscountVelocityPercent\n ?.value,\n isPercent: true,\n })\n : naText}\n
    \n \n
    \n {defaultValues.circuitBreakerMaxDiscountVelocityTicksInHours\n ?.value\n ? applyNumberFormatting({\n inputNumber:\n defaultValues\n .circuitBreakerMaxDiscountVelocityTicksInHours?.value,\n })\n : naText}\n
    \n \n
    \n ),\n to: (\n \n
    \n {updates.circuitBreakerMaxDiscountVelocityPercent?.value\n ? applyNumberFormatting({\n inputNumber:\n updates.circuitBreakerMaxDiscountVelocityPercent.value,\n isPercent: true,\n })\n : naText}\n
    \n \n
    \n {updates.circuitBreakerMaxDiscountVelocityTicksInHours?.value\n ? applyNumberFormatting({\n inputNumber:\n updates.circuitBreakerMaxDiscountVelocityTicksInHours\n ?.value,\n })\n : naText}\n
    \n \n
    \n ),\n include:\n !!changedFields?.circuitBreakerMaxDiscountVelocityPercent ||\n !!changedFields?.circuitBreakerMaxDiscountVelocityTicksInHours,\n onChange: (include: boolean) => {\n updateChangedFields({\n circuitBreakerMaxDiscountVelocityPercent: include,\n circuitBreakerMaxDiscountVelocityTicksInHours: include,\n });\n },\n });\n }\n\n return settings;\n }, [\n updates.autoPricingEnabled,\n updates.compListingMode,\n updates.compListingExcludeDefects,\n updates.compListingExcludeFanInventory,\n updates.compListingSelectedSectionSettings,\n updates.includeExistingSelectedSections,\n updates.deriveCompsFromVenueZoneConfig,\n updates.includeBetterZones,\n updates.rowCompOffset,\n updates.compListingQuantityScoreAdjustmentOverrideJson,\n updates.undercutAbsoluteAmount,\n updates.undercutRelativeAmount,\n updates.netProceedsFloor,\n updates.netProceedsCeiling,\n updates.netProceedsFloorAdjustmentAmount,\n updates.netProceedsFloorAdjustmentRelative,\n updates.netProceedsFloorAdjustmentType,\n updates.circuitBreakerMinCompListingCount,\n updates.outlierMode,\n updates.outlierStandardDeviations,\n updates.outlierKthLowestLimit,\n updates.outlierKthLowestLimitAbsoluteSpacing,\n updates.outlierKthLowestLimitRelativeSpacing,\n updates.circuitBreakerMaxDiscountVelocityPercent,\n updates.circuitBreakerMaxDiscountVelocityTicksInHours,\n updates.venueZoneMapName,\n updates.currencyCode,\n defaultValues.autoPricingEnabled,\n defaultValues.compListingMode,\n defaultValues.compListingExcludeDefects,\n defaultValues.compListingExcludeFanInventory,\n defaultValues.compListingSelectedSectionSettings,\n defaultValues?.deriveCompsFromVenueZoneConfig,\n defaultValues?.includeBetterZones,\n defaultValues?.rowCompOffset,\n defaultValues.compListingQuantityScoreAdjustmentOverrideJson,\n defaultValues.undercutAbsoluteAmount,\n defaultValues.undercutRelativeAmount,\n defaultValues.netProceedsFloor,\n defaultValues.netProceedsCeiling,\n defaultValues.circuitBreakerMinCompListingCount,\n defaultValues.outlierMode,\n defaultValues.outlierStandardDeviations,\n defaultValues.outlierKthLowestLimit,\n defaultValues.outlierKthLowestLimitAbsoluteSpacing,\n defaultValues.outlierKthLowestLimitRelativeSpacing,\n defaultValues.circuitBreakerMaxDiscountVelocityPercent,\n defaultValues.circuitBreakerMaxDiscountVelocityTicksInHours,\n defaultValues.currencyCode,\n settingsInput.compListingSelectedSectionSettings?.hasConflict,\n settingsInput.autoPricingEnabled?.hasConflict,\n settingsInput.compListingMode?.hasConflict,\n settingsInput.compListingExcludeDefects?.hasConflict,\n settingsInput.compListingExcludeFanInventory?.hasConflict,\n settingsInput.compListingQuantityScoreAdjustmentOverrideJson?.hasConflict,\n settingsInput.undercutAbsoluteAmount?.hasConflict,\n settingsInput.undercutRelativeAmount?.hasConflict,\n settingsInput.netProceedsFloor?.hasConflict,\n settingsInput.netProceedsCeiling?.hasConflict,\n settingsInput.circuitBreakerMinCompListingCount?.hasConflict,\n settingsInput.outlierMode?.hasConflict,\n settingsInput.outlierStandardDeviations?.hasConflict,\n settingsInput.outlierKthLowestLimit?.hasConflict,\n settingsInput.outlierKthLowestLimitAbsoluteSpacing?.hasConflict,\n settingsInput.outlierKthLowestLimitRelativeSpacing?.hasConflict,\n settingsInput.circuitBreakerMaxDiscountVelocityPercent?.hasConflict,\n conflictText,\n changedFields?.autoPricingEnabled,\n changedFields?.compListingMode,\n changedFields?.compListingExcludeDefects,\n changedFields?.compListingExcludeFanInventory,\n changedFields?.compListingSelectedSectionSettings,\n changedFields?.deriveCompsFromVenueZoneConfig,\n changedFields?.compListingQuantityScoreAdjustmentOverrideJson,\n changedFields?.undercutAbsoluteAmount,\n changedFields?.undercutRelativeAmount,\n changedFields?.netProceedsFloor,\n changedFields?.netProceedsCeiling,\n changedFields?.netProceedsFloorAdjustmentAmount,\n changedFields?.circuitBreakerMinCompListingCount,\n changedFields?.outlierMode,\n changedFields?.outlierStandardDeviations,\n changedFields?.outlierKthLowestLimit,\n changedFields?.outlierKthLowestLimitAbsoluteSpacing,\n changedFields?.outlierKthLowestLimitRelativeSpacing,\n changedFields?.circuitBreakerMaxDiscountVelocityPercent,\n changedFields?.circuitBreakerMaxDiscountVelocityTicksInHours,\n updateChangedFields,\n existingSectionsText,\n overrideText,\n sectionIdToName,\n sameZoneOrBetter,\n sameZone,\n naText,\n sellerFee,\n ]);\n\n return {\n data,\n columns: PricingSettingsPreviewColumns,\n };\n};\n","import React, { useMemo } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { WarningOutlineIcon } from 'src/svgs/Viagogo';\nimport { Table } from 'src/tables/Table';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ListingDetailsAutoPricingSectionUpdatesV2 } from 'src/WebApiController';\n\nimport {\n AutoPricingSettingsInput,\n PricingSettingsUpdateKey,\n} from '../BulkEditAutoPricingSettingsDialog.types';\nimport * as styles from '../components/AutoPricingSettings.css';\nimport { usePricingSettingsPreviewTable } from './PricingSettingsPreview.hooks';\n\ntype PricingSettingsPreviewProps = {\n settingsInput: AutoPricingSettingsInput;\n defaultValues: ListingDetailsAutoPricingSectionUpdatesV2;\n updates: ListingDetailsAutoPricingSectionUpdatesV2;\n changedFields?: Partial<\n Record\n >;\n updateChangedFields: (\n values: Partial>\n ) => void;\n};\n\nexport const PricingSettingsPreview: React.FC = ({\n settingsInput,\n defaultValues,\n updates,\n changedFields,\n updateChangedFields,\n}) => {\n const options = usePricingSettingsPreviewTable(\n settingsInput,\n defaultValues,\n updates,\n updateChangedFields,\n changedFields\n );\n\n const hasConflict = useMemo(\n () => Object.values(settingsInput).some(({ hasConflict }) => hasConflict),\n [settingsInput]\n );\n\n return (\n \n {hasConflict && (\n \n \n \n \n )}\n
    \n \n
    \n \n \n );\n};\n","/* eslint-disable react-hooks/exhaustive-deps */\n// /* eslint-disable react-hooks/exhaustive-deps */\nimport { HubConnectionState } from '@microsoft/signalr';\nimport {\n ComponentProps,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { FormProvider, useForm, useFormContext } from 'react-hook-form';\nimport { useEffectOnce } from 'react-use';\nimport { Modal as RSModal } from 'reactstrap';\nimport { BulkEditStatus } from 'src/components/common/BulkActions/BulkEditStatus';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n BulkEditStage,\n useBulkEditHubContext,\n} from 'src/contexts/BulkEditHubContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { EventMapContextProvider } from 'src/contexts/EventMapContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport {\n GenericDialog,\n GenericDialogProps,\n} from 'src/core/interim/dialogs/GenericDialog';\nimport { Stack } from 'src/core/ui';\nimport { useBulkEditHub } from 'src/hooks/useBulkEditHub';\nimport { useUserHasAutopricingFeature } from 'src/hooks/useUserHasAutopricingFeature';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { CancellableFormHeader } from 'src/modals/common/CancellableFormHeader';\nimport { ConnectedEventEntityHeader } from 'src/modals/common/EventEntityHeader';\nimport { flattenListingGroup } from 'src/modals/GroupListings/components/groupingUtils';\nimport { Modal, ModalBody, ModalFooter } from 'src/modals/Modal';\nimport { ModalBodyDataContainer } from 'src/modals/Modal/Modal.styled';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n ActionOutboxEntityType,\n BulkActionType,\n BulkEditPreviewWithDetails,\n BulkEditProgress,\n BulkEditStep,\n Event,\n Feature,\n Listing,\n ListingDetails,\n ListingDetailsAutoPricingSectionUpdatesV2,\n} from 'src/WebApiController';\n\nimport { BulkEditFooter } from '../common/BulkEditFooter';\nimport { BulkEditHeader } from '../common/BulkEditHeader';\nimport {\n AutoPricingSettingsInput,\n PricingSettingsUpdateKey,\n} from './BulkEditAutoPricingSettingsDialog.types';\nimport {\n generateDefaultSettings,\n getAutoPricingSettingsUpdateInput,\n getSettingsInputChanged,\n santizedPricingSettingsUpdateInput,\n} from './BulkEditAutoPricingSettingsDialog.utils';\nimport { AutoPricingSettings } from './components/AutoPricingSettings';\nimport { BulkEditAutoPricingSettingsSidePanel } from './components/BulkEditAutoPricingSettingsSidePanel/BulkEditAutoPricingSettingsSidePanel';\nimport { PricingSettingsPreview } from './PricingSettingsPreview';\n\nexport type BulkEditAutoPricingSettingsDialogProps = ComponentProps<\n typeof RSModal\n> & {\n updateKey: string;\n isLoading?: boolean;\n listings?: Listing[] | null;\n selectedListingIds?: number[];\n event?: Event;\n canUseZoneMap?: boolean;\n multiEvents?: boolean;\n onOkay: (\n input: ListingDetailsAutoPricingSectionUpdatesV2 | null,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => void;\n onCancel?: () => void;\n};\n\nexport const BulkEditAutoPricingSettingsDialog: React.FC<\n BulkEditAutoPricingSettingsDialogProps\n> = ({ listings, selectedListingIds, event, ...rest }) => {\n const { loginContext } = useAppContext();\n const hasAllowSeatScoreCompListingModeFeature = useUserHasFeature(\n Feature.AllowSeatScoreCompListingMode\n );\n const hasBulkEditPricingSettingsUpdateFeature = useUserHasFeature(\n Feature.BulkEditPricingSettingsUpdate\n );\n const selectedListings = useMemo(() => {\n const flattenedListings = listings?.flatMap((l) => flattenListingGroup(l));\n return (\n flattenedListings\n ?.filter((l) => l.isFull && selectedListingIds?.includes(l.id))\n .map((l) => l as Listing) ?? []\n );\n }, [listings, selectedListingIds]);\n\n const isMultiEvent = useMemo(\n () => (hasBulkEditPricingSettingsUpdateFeature ? rest.multiEvents : !event),\n [hasBulkEditPricingSettingsUpdateFeature, rest.multiEvents, event]\n );\n\n const settingsInput = useMemo(\n () =>\n generateDefaultSettings(\n selectedListings,\n Boolean(isMultiEvent),\n hasBulkEditPricingSettingsUpdateFeature\n ),\n [selectedListings, isMultiEvent]\n );\n\n const defaultValues = useMemo(\n () =>\n getAutoPricingSettingsUpdateInput(\n settingsInput,\n loginContext?.user?.activeAccount?.currencyCode ?? null,\n hasAllowSeatScoreCompListingModeFeature,\n hasBulkEditPricingSettingsUpdateFeature\n ),\n [\n settingsInput,\n loginContext?.user?.activeAccount?.currencyCode,\n hasAllowSeatScoreCompListingModeFeature,\n hasBulkEditPricingSettingsUpdateFeature,\n ]\n );\n const methods = useForm({\n defaultValues,\n });\n\n return (\n \n \n \n \n \n );\n};\n\nfunction BulkEditAutoPricingSettingsDialogContent({\n updateKey,\n isLoading,\n event,\n onOkay,\n onCancel,\n settingsInput,\n defaultInput,\n canUseZoneMap,\n selectedListings,\n listings,\n ...rest\n}: BulkEditAutoPricingSettingsDialogProps & {\n selectedListings: Listing[];\n settingsInput: AutoPricingSettingsInput;\n defaultInput: ListingDetailsAutoPricingSectionUpdatesV2;\n}) {\n const { setActivePosEntity } = useActivePosEntityContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n const { setSelectionMode } = useMultiSelectionContext();\n const { setProgress, setPreview, setMainDialogOpened } =\n useBulkEditHubContext();\n\n const [changedFields, setChangedFileds] =\n useState>>();\n const { handleSubmit, watch, reset, formState } =\n useFormContext();\n\n const input = watch();\n\n const onClose = useCallback(\n async (\n newProgress?: BulkEditProgress,\n closeMainDialogForPopover?: boolean\n ) => {\n if (newProgress?.step === BulkEditStep.Done) {\n setIsRefreshing(true);\n setActivePosEntity(0);\n await refreshExpandedListItems();\n setSelectionMode(undefined);\n if (closeMainDialogForPopover) {\n setMainDialogOpened(false);\n } else {\n setProgress(undefined);\n setPreview(undefined);\n }\n setIsRefreshing(false);\n // progress kept to allow the BulkEditStatusPopover to show the result\n }\n onCancel?.();\n },\n [\n onCancel,\n refreshExpandedListItems,\n setActivePosEntity,\n setMainDialogOpened,\n setPreview,\n setProgress,\n setSelectionMode,\n ]\n );\n\n const onBulkEditDone = useCallback(\n async (doneProgress: BulkEditProgress, finalErrors: string[]) => {\n if (finalErrors.length === 0 && doneProgress.step === BulkEditStep.Done) {\n onClose(doneProgress, true);\n }\n },\n [onClose]\n );\n\n const { bulkEditHub, progress, preview, stage, initJob } = useBulkEditHub(\n ActionOutboxEntityType.Listing,\n BulkActionType.UpdateAutoPricingSettings,\n updateKey,\n onBulkEditDone\n );\n\n const hasBackgroundBulkEditFeature =\n bulkEditHub?.state === HubConnectionState.Connected;\n\n const onSubmitHandler = useCallback(\n (onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void) => {\n if (onPreviewReceived) {\n onOkay(null, false, onPreviewReceived);\n } else {\n handleSubmit((i) => {\n onOkay(\n santizedPricingSettingsUpdateInput(i, changedFields),\n hasBackgroundBulkEditFeature,\n undefined,\n preview\n );\n })();\n }\n },\n [onOkay, handleSubmit, changedFields, hasBackgroundBulkEditFeature, preview]\n );\n\n const [isRefreshing, setIsRefreshing] = useState(false);\n\n useEffect(() => {\n const changed = getSettingsInputChanged(\n input,\n formState.defaultValues as ListingDetailsAutoPricingSectionUpdatesV2,\n settingsInput\n );\n\n setChangedFileds(changed);\n }, [\n JSON.stringify(input),\n JSON.stringify(formState.defaultValues),\n JSON.stringify(settingsInput),\n ]);\n\n const hasChanges = useMemo(\n () => Object.values(changedFields ?? {}).some((value) => !!value),\n [changedFields]\n );\n\n const submittButtonRef = useRef(null);\n\n const onUpdateChangedFields = useCallback(\n (\n values: Partial>\n ) => {\n setChangedFileds((prev) => ({ ...prev, ...values }));\n },\n [setChangedFileds]\n );\n\n return (\n <>\n }\n />\n }\n onOpened={() => {\n reset(defaultInput);\n initJob();\n }}\n onKeyUp={(e) => {\n if (submittButtonRef.current && e.key === 'Enter' && hasChanges) {\n submittButtonRef.current.click();\n }\n }}\n onClose={onClose}\n onClosed={() => {\n setMainDialogOpened(false);\n if (progress) {\n setSelectionMode(undefined);\n }\n\n rest.onClosed?.();\n }}\n footer={\n \n }\n onCancel={isLoading ? undefined : onCancel}\n >\n \n }\n >\n \n \n \n \n \n \n );\n}\n\nconst BulkEditAutoPricingSettingsModalOrDialog = ({\n selectedListings,\n event,\n multiEvents = false,\n stage,\n header,\n footer,\n children,\n onClose,\n ...rest\n}: GenericDialogProps & {\n selectedListings: Listing[];\n event: Event | null | undefined;\n multiEvents?: boolean;\n stage: BulkEditStage;\n onClose: () => void;\n}) => {\n const [delayLoaded, setDelayLoaded] = useState(false);\n const hasBulkEditAutoPricingPreviewFeature = useUserHasAutopricingFeature(\n Feature.AutoPricingBulkEditToDrawerWithPreview\n );\n const hasBulkEditPricingSettingsUpdateFeature = useUserHasAutopricingFeature(\n Feature.BulkEditPricingSettingsUpdate\n );\n\n // Trick to delay showing side panel to avoid modal bouncing left and right\n useEffectOnce(() => {\n setTimeout(() => {\n setDelayLoaded(true);\n }, 50);\n });\n\n // We don't want to show side pannel for multi-events,\n // but add this logic behind ulkEditPricingSettingsUpdate feature\n const showSidePanel = useMemo(\n () =>\n Boolean(event?.viagId && stage === BulkEditStage.Idle && delayLoaded) &&\n !(hasBulkEditPricingSettingsUpdateFeature && multiEvents),\n [\n event?.viagId,\n stage,\n delayLoaded,\n hasBulkEditPricingSettingsUpdateFeature,\n multiEvents,\n ]\n );\n\n return hasBulkEditAutoPricingPreviewFeature ? (\n \n \n {event?.viagId && (\n \n )}\n \n \n \n \n\n \n {children}\n \n\n {footer}\n \n \n \n ) : (\n \n {children}\n \n );\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { PricingClient } from 'src/WebApiController';\n\nexport const usePricingConfigFromEventIds = (\n eventIds: number[],\n disable: boolean\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n\n const shouldQuery =\n !disable &&\n activeAccountWebClientConfig.activeAccountId != null &&\n eventIds.length > 0;\n\n return useQuery({\n queryKey: [\n 'getPricingConfigFromEventIds',\n activeAccountWebClientConfig.activeAccountId,\n eventIds.toSorted(),\n disable,\n ],\n queryFn: () => {\n if (!shouldQuery) {\n return null;\n }\n return new PricingClient(\n activeAccountWebClientConfig\n ).getPricingConfigFromEventIds(eventIds);\n },\n\n enabled: shouldQuery,\n staleTime: Infinity,\n refetchOnMount: false,\n refetchOnReconnect: false,\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError('ListingClient.getPricingConfigFromEventIds', error, {\n eventIds,\n });\n },\n },\n });\n};\n","import { useBulkPricingActionsPermissions } from 'src/components/common/BulkActions/BulkPricingActions/useBulkPricingActionsPermissions';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nexport const LaunchEditAutoPricingSettings = ({\n onClick,\n disabled,\n}: {\n onClick: (e: React.MouseEvent) => void;\n disabled?: boolean;\n}) => {\n const { hasAutoPricingFeature, hasEditPricingPermission } =\n useBulkPricingActionsPermissions();\n\n if (!hasAutoPricingFeature || !hasEditPricingPermission) {\n return null;\n }\n\n return (\n \n \n \n );\n};\n","import { uniq } from 'lodash-es';\nimport { useCallback, useMemo } from 'react';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport {\n BulkEditAutoPricingSettingsDialog,\n BulkEditAutoPricingSettingsDialogProps,\n} from 'src/dialogs/BulkEdits/BulkEditAutoPricingSettingsDialog';\nimport { usePricingConfigFromEventIds } from 'src/hooks/api/usePricingConfigFromEventIds';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { flattenListingGroup } from 'src/modals/GroupListings/components/groupingUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n BulkEditListingClient,\n BulkEditPreviewWithDetails,\n Event,\n Feature,\n Listing,\n ListingDetails,\n ListingDetailsAutoPricingSectionUpdatesV2,\n ListingQuery,\n} from 'src/WebApiController';\n\nimport { INVENTORY_BULK_UPDATE_AUTOPRICING_SETTINGS_UPDATE_KEY } from '../../InventoryActionDropdown.constants';\nimport { LaunchEditAutoPricingSettings } from './LaunchEditAutoPricingSettings';\n\nexport const useBulkEditAutoPricingSettings = (\n filterQueryWithEventIds: ListingQuery,\n affectedVisibleListingIds: number[],\n setIsLoading: (v: boolean) => void,\n isLoading?: boolean,\n event?: Event\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const updateKey = event\n ? `autopricingSettings-event-${event?.viagVirtualId}`\n : INVENTORY_BULK_UPDATE_AUTOPRICING_SETTINGS_UPDATE_KEY;\n\n const { setActivePosEntity } = useActivePosEntityContext();\n const hasPricingSectionSettingsAcrossEventsFeature = useUserHasFeature(\n Feature.PricingSectionSettingsAcrossEvents\n );\n\n const {\n eventsTransformed,\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const distinctEventIds = useMemo(() => {\n const { eventOrMappingIds } = filterQueryWithEventIds;\n const eventIdsFromSelectedListings = (eventsTransformed ?? [])\n .flatMap((ev) => ev.entities.listings)\n .flatMap(flattenListingGroup)\n .filter(({ id, isLtGrp }) => id > 0 && !isLtGrp)\n .filter(({ id }) => affectedVisibleListingIds.includes(id))\n .map((l) => (l as Listing).viagEvId);\n return uniq([\n ...eventIdsFromSelectedListings,\n ...(eventOrMappingIds ?? [])\n .map((mappingId) => Number(mappingId))\n .filter((id) => !isNaN(id)),\n ]).filter((id: number | null): id is number => !!id);\n }, [affectedVisibleListingIds, eventsTransformed, filterQueryWithEventIds]);\n\n const pricingConfigFromEvents = usePricingConfigFromEventIds(\n distinctEventIds,\n !hasPricingSectionSettingsAcrossEventsFeature\n );\n\n const sanitizedEvent = useMemo(() => {\n if (event) {\n return event;\n }\n\n const { sharedConfigId } = pricingConfigFromEvents.data ?? {};\n if (sharedConfigId && sharedConfigId > 0) {\n return (eventsTransformed ?? [])\n .map((ev) => ev.event)\n .find((ev) => ev.viagId && distinctEventIds.includes(ev.viagId));\n }\n\n return undefined;\n }, [\n distinctEventIds,\n event,\n eventsTransformed,\n pricingConfigFromEvents.data,\n ]);\n\n const canUseZoneMap = useMemo(() => {\n if (event) {\n return true;\n }\n return pricingConfigFromEvents.data?.canUseZoneMap;\n }, [event, pricingConfigFromEvents.data?.canUseZoneMap]);\n\n const multiEvents = useMemo(() => {\n if (event) {\n return false;\n }\n return distinctEventIds.length > 1;\n }, [distinctEventIds.length, event]);\n\n const {\n openDialog: openBulkEditAutoPricingSettingsDialog,\n closeDialog: closeBulkEditAutoPricingSettingsDialog,\n } = useDialog(\n DialogId.BulkEditAutoPricingSettings,\n BulkEditAutoPricingSettingsDialog\n );\n\n const onSubmitAutoPricingRework = useCallback(\n (\n settingsInput: ListingDetailsAutoPricingSectionUpdatesV2 | null,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n tryInvokeApi(\n async () => {\n const client = await new BulkEditListingClient(\n activeAccountWebClientConfig\n );\n const preview = await client.bulkUpdateAutoPricingSettingsPreview(\n filterQueryWithEventIds\n );\n\n onPreviewReceived(preview);\n },\n (error) => {\n showErrorDialog('bulkUpdateAutoPricingSettingsPreview', error, {\n trackErrorData: {\n filterQueryWithEventIds,\n },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n } else if (settingsInput) {\n tryInvokeApi(\n async () => {\n const client = await new BulkEditListingClient(\n activeAccountWebClientConfig\n );\n const input = {\n item1: preview!.preview,\n item2: settingsInput,\n };\n\n const succeeded = await client.bulkUpdateAutoPricingSettingsV2(\n input,\n sanitizedEvent?.viagId,\n updateKey,\n supportBackgroundProcess\n );\n\n if (!supportBackgroundProcess) {\n if (succeeded) {\n // Invalidate the activePosEntity, so that when clicking on listingDetails\n // we force re-loading the listing and newest pricing settings can be displayed\n setActivePosEntity(0);\n await refreshExpandedListItems();\n }\n\n closeBulkEditAutoPricingSettingsDialog();\n }\n },\n (error) => {\n showErrorDialog('bulkUpdateAutoPricingSettingsV2', error, {\n trackErrorData: {\n settingsInput,\n preview,\n },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n }\n },\n [\n activeAccountWebClientConfig,\n closeBulkEditAutoPricingSettingsDialog,\n sanitizedEvent?.viagId,\n filterQueryWithEventIds,\n refreshExpandedListItems,\n setActivePosEntity,\n setIsLoading,\n showErrorDialog,\n updateKey,\n ]\n );\n\n const listings = useMemo(() => {\n return (eventsTransformed ?? [])\n .flatMap((ev) => ev.entities.listings)\n .flatMap(flattenListingGroup)\n .filter(({ id, isLtGrp }) => id > 0 && !isLtGrp) as Listing[];\n }, [eventsTransformed]);\n\n const openDialog = () => {\n openBulkEditAutoPricingSettingsDialog({\n event: sanitizedEvent,\n updateKey: updateKey,\n isLoading: isLoading,\n canUseZoneMap: canUseZoneMap,\n multiEvents,\n listings: listings,\n selectedListingIds: affectedVisibleListingIds,\n onOkay: onSubmitAutoPricingRework,\n onClosed: () => {\n setIsLoading(false);\n },\n });\n };\n\n return {\n dropDown: (\n {\n e.preventDefault();\n e.stopPropagation();\n openDialog();\n }}\n disabled={isLoading}\n />\n ),\n openDialog: openDialog,\n };\n};\n","import { throttle } from 'lodash-es';\nimport React, { useCallback, useMemo, useState } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { Stack } from 'src/core/ui/Stack';\nimport { ToggleGroup } from 'src/core/ui/ToggleGroup';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nconst enum RelativeAbsoluteOptions {\n Relative = 'relative',\n Absolute = 'absolute',\n}\n\nexport const enum LanguagePreference {\n Above_Below = 'aboveBelow',\n Increase_Decrease = 'increaseDecrease',\n}\n\nconst getRelativeAbsoluteOptions = (absoluteUnit: '$' | '123') => [\n { value: RelativeAbsoluteOptions.Relative, children: '%' },\n { value: RelativeAbsoluteOptions.Absolute, children: absoluteUnit },\n];\n\nconst getAboveBelowOptions = (languagePreference: LanguagePreference) => {\n const aboveText =\n languagePreference === LanguagePreference.Above_Below ? (\n \n ) : (\n \n );\n const belowText =\n languagePreference === LanguagePreference.Above_Below ? (\n \n ) : (\n \n );\n return [\n { value: 'true', children: aboveText },\n { value: 'false', children: belowText },\n ];\n};\n\ntype BulkEditNumberProps = {\n initAmount?: number | null;\n isLoading: boolean;\n onChange: (value: number, isRelative: boolean, isAbove: boolean) => void;\n showAbsolute?: boolean;\n showApplyToAll?: boolean;\n absoluteUnit?: '$' | '123';\n languagePreference?: LanguagePreference;\n};\n\nexport const BulkEditNumber: React.FC = ({\n initAmount,\n isLoading,\n onChange,\n showAbsolute = false,\n showApplyToAll = false,\n absoluteUnit = '$',\n languagePreference = LanguagePreference.Above_Below,\n}) => {\n const [amount, setAmount] = useState(initAmount ?? 0);\n const [isRelative, setIsRelative] = useState(true);\n const [isAbove, setIsAbove] = useState(false);\n\n const onValueChange = useCallback(\n (event: React.ChangeEvent) => {\n const value = parseFloat(event.target.value);\n if (value < 0 || isNaN(value)) {\n return;\n }\n // we can't decrease by 100 or more % because that will result in zero\n if (!isAbove && isRelative && value > 99) {\n return;\n }\n setAmount(value);\n\n // Don't call onChange if we are showing apply to all button\n !showApplyToAll && onChange(value, isRelative, isAbove);\n },\n [isAbove, isRelative, onChange, showApplyToAll]\n );\n\n const onRelativeChange = useCallback(\n (value: string) => {\n const updatedRelative = value === RelativeAbsoluteOptions.Relative;\n setIsRelative(updatedRelative);\n !showApplyToAll && onChange(amount, updatedRelative, isAbove);\n },\n [amount, isAbove, onChange, showApplyToAll]\n );\n const onAboveChange = useCallback(\n (value: string) => {\n const updatedIsAbove = value === 'true';\n setIsAbove(updatedIsAbove);\n !showApplyToAll && onChange(amount, isRelative, updatedIsAbove);\n },\n [amount, isRelative, onChange, showApplyToAll]\n );\n\n // Throttle the onChange call to avoid calling it too often, once per 800ms\n const onApplyToAll = useMemo(() => {\n if (showApplyToAll) {\n return throttle(() => onChange(amount, isRelative, isAbove), 800, {\n trailing: false,\n });\n }\n return () => undefined;\n }, [amount, isAbove, isRelative, onChange, showApplyToAll]);\n\n return (\n \n \n {showAbsolute ? (\n \n ) : (\n <>% \n )}\n \n \n }\n />\n {showApplyToAll && (\n \n \n \n )}\n \n );\n};\n","export enum FloorCeiling {\n Floor = 'Floor',\n Ceiling = 'Ceiling',\n}\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport const FieldLabelWrapper = styled.div`\n font-weight: 600;\n ${({\n theme: {\n media,\n typography: { getStyles },\n },\n }) => `\n${getStyles('body1')}\n padding-left: 0;\n ${media.makeMediaQuery(\n media.breakpoints.md,\n `padding-left: 0px;` // reset padding for tablets and above\n )}\n`}\n`;\n\nexport const FieldWrapper = styled.div`\n padding-block-end: ${() => vars.spacing.m};\n\n label {\n width: 100%;\n margin-bottom: 0;\n }\n`;\n","import { HubConnectionState } from '@microsoft/signalr';\nimport { ComponentProps, useCallback, useMemo, useRef, useState } from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { BulkEditNumber } from 'src/components/common/BulkActions/BulkEditNumber';\nimport { BulkEditStatus } from 'src/components/common/BulkActions/BulkEditStatus';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport {\n BulkEditStage,\n useBulkEditHubContext,\n} from 'src/contexts/BulkEditHubContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport {\n Content,\n FormatContent,\n useContent,\n} from 'src/contexts/ContentContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { Stack } from 'src/core/ui';\nimport { useBulkEditHub } from 'src/hooks/useBulkEditHub';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n PRICING_FLOOR_CEIL_ADJUSTMENT_TYPE_TO_CID,\n PRICING_FLOOR_CEIL_ADJUSTMENT_TYPE_TO_WARNING_CID,\n} from 'src/utils/constants/contentIdMaps';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport {\n ActionOutboxEntityType,\n BulkActionType,\n BulkEditPreviewWithDetails,\n BulkEditProgress,\n BulkEditStep,\n ListingDetails,\n PricingFloorCeilingAdjustmentType,\n} from 'src/WebApiController';\n\nimport { BulkEditFooter } from '../common/BulkEditFooter';\nimport { BulkEditHeader } from '../common/BulkEditHeader';\nimport { FloorCeiling } from './BulkEditListingPricingFloorCeilingDialog.constants';\nimport * as styles from './BulkEditListingPricingFloorCeilingDialog.css';\nimport {\n FieldLabelWrapper,\n FieldWrapper,\n} from './BulkEditListingPricingFloorCeilingDialog.styled';\n\n/**\n * Props for the BulkEditListingPricingFloorCeilingDialog component.\n *\n * @param floorCeiling Indicates whether the dialog is for adjusting the floor or ceiling.\n *\n * @param onOkay Callback function to be called when the user clicks the \"Okay\" button. Callback accepts\n the following parameters\n * - amount: The raw amount value we the user is adjusting the floor / ceiling by\n * - isAbove: Indicates whether the value should be increased or decreased\n * - floorCeiling: The floor/ceiling object.\n * - isRelative: Indicates whether the adjustment is relative or absolute.\n * - relativeToTarget: The type of adjustment to be made.\n * - supportBackgroundProcess: Optional parameter to indicate whether to support background process.\n */\nexport type BulkEditListingPricingFloorCeilingDialogProps = ComponentProps<\n typeof RSModal\n> & {\n updateKey: string;\n floorCeiling: FloorCeiling;\n onOkay: (\n amount: number,\n isAbove: boolean,\n floorCeiling: FloorCeiling,\n isRelative: boolean,\n relativeToTarget: PricingFloorCeilingAdjustmentType,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => void;\n onCancel: () => void;\n};\n\nexport function BulkEditListingPricingFloorCeilingDialog({\n updateKey,\n floorCeiling,\n onOkay,\n onCancel,\n ...rest\n}: BulkEditListingPricingFloorCeilingDialogProps) {\n const { setActivePosEntity } = useActivePosEntityContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n const { setSelectionMode } = useMultiSelectionContext();\n const { setProgress, setPreview, setMainDialogOpened } =\n useBulkEditHubContext();\n const [isLoading, setIsLoading] = useState(false);\n const marketPriceText = useContent(ContentId.MarketPrice);\n\n const onClose = useCallback(\n async (\n newProgress?: BulkEditProgress,\n closeMainDialogForPopover?: boolean\n ) => {\n if (newProgress?.step === BulkEditStep.Done) {\n setIsRefreshing(true);\n setActivePosEntity(0);\n\n await refreshExpandedListItems();\n setSelectionMode(undefined);\n if (closeMainDialogForPopover) {\n setMainDialogOpened(false);\n } else {\n setProgress(undefined);\n setPreview(undefined);\n }\n setIsRefreshing(false);\n // progress kept to allow the BulkEditStatusPopover to show the result\n }\n onCancel();\n },\n [\n onCancel,\n refreshExpandedListItems,\n setActivePosEntity,\n setMainDialogOpened,\n setPreview,\n setProgress,\n setSelectionMode,\n ]\n );\n\n const onBulkEditDone = useCallback(\n async (doneProgress: BulkEditProgress, finalErrors: string[]) => {\n if (finalErrors.length === 0 && doneProgress.step === BulkEditStep.Done) {\n onClose(doneProgress, true);\n }\n },\n [onClose]\n );\n\n const { bulkEditHub, progress, preview, initJob, stage } = useBulkEditHub(\n ActionOutboxEntityType.Listing,\n BulkActionType.UpdatePriceFloorCeiling,\n updateKey,\n onBulkEditDone\n );\n\n const hasBackgroundBulkEditFeature =\n bulkEditHub?.state === HubConnectionState.Connected;\n\n // Form values\n const [amount, setAmount] = useState(0);\n const [isAbove, setIsAbove] = useState(false);\n const [isRelative, setIsRelative] = useState(true);\n const [relativeToTarget, setRelativeToTarget] =\n useState(\n floorCeiling === FloorCeiling.Floor\n ? PricingFloorCeilingAdjustmentType.UnitCost\n : PricingFloorCeilingAdjustmentType.MarketPrice\n );\n\n const [isRefreshing, setIsRefreshing] = useState(false);\n\n const onSubmitHandler = useCallback(\n (onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n onOkay(\n 0,\n false,\n FloorCeiling.Floor,\n false,\n PricingFloorCeilingAdjustmentType.CurrentFloor,\n false,\n onPreviewReceived\n );\n } else {\n onOkay(\n amount,\n isAbove,\n floorCeiling,\n isRelative,\n relativeToTarget,\n hasBackgroundBulkEditFeature,\n undefined,\n preview\n );\n }\n setIsLoading(false);\n },\n [\n onOkay,\n amount,\n isAbove,\n floorCeiling,\n isRelative,\n relativeToTarget,\n preview,\n hasBackgroundBulkEditFeature,\n ]\n );\n\n const isInputValid = useMemo(() => {\n return !!amount;\n }, [amount]);\n\n const submittButtonRef = useRef(null);\n\n return (\n \n ) : (\n \n )\n }\n />\n }\n onOpened={() => {\n setAmount(0);\n setRelativeToTarget(\n floorCeiling === FloorCeiling.Floor\n ? PricingFloorCeilingAdjustmentType.UnitCost\n : PricingFloorCeilingAdjustmentType.MarketPrice\n );\n initJob();\n }}\n onKeyUp={(e) => {\n if (submittButtonRef.current && e.key === 'Enter' && isInputValid) {\n submittButtonRef.current.click();\n }\n }}\n onClick={(e) => {\n // This so that this dialog does not cause event to flow to the EventHeader open/close event\n e.stopPropagation();\n e.preventDefault();\n }}\n onClosed={() => {\n setMainDialogOpened(false);\n if (progress) {\n setSelectionMode(undefined);\n }\n // Call the outside one if there is one\n rest.onClosed?.();\n }}\n footer={\n \n }\n onCancel={isLoading ? undefined : onCancel}\n >\n \n \n \n {floorCeiling === FloorCeiling.Ceiling && (\n \n \n \n )}\n\n \n {\n setAmount(value);\n setIsRelative(isRelative);\n setIsAbove(isAbove);\n }}\n />\n {floorCeiling === FloorCeiling.Floor && (\n \n
    \n \n
    \n\n \n {\n if (newValue != null && newValue != relativeToTarget) {\n setRelativeToTarget(newValue);\n }\n }}\n />\n \n
    \n )}\n
    \n
    \n \n \n }\n />\n \n \n \n \n );\n}\n","import { useCallback } from 'react';\nimport { INVENTORY_BULK_UPDATE_PRICE_FLOOR_CEILING_UPDATE_KEY } from 'src/components/Listings/InventoryActionDropdown';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport {\n BulkEditListingPricingFloorCeilingDialog,\n FloorCeiling,\n} from 'src/dialogs/BulkEdits/BulkEditListingPricingFloorCeilingDialog';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n BulkEditPreviewWithDetails,\n EventWithData,\n} from 'src/WebApiController';\nimport {\n BulkEditListingClient,\n ListingDetails,\n ListingQuery,\n PricingFloorCeilingAdjustmentType,\n} from 'src/WebApiController';\n\ntype BulkChangeFloorCeilingActionsProps = {\n setIsLoading: (v: boolean) => void;\n isLoading: boolean;\n event?: EventWithData['event'] | undefined;\n filterQueryWithEventIds: ListingQuery;\n};\n\nexport const useBulkChangeFloorCeilingActions = ({\n setIsLoading,\n isLoading,\n event,\n filterQueryWithEventIds,\n}: BulkChangeFloorCeilingActionsProps) => {\n const {\n openDialog: openBulkChangeFloorCeilingDialog,\n closeDialog: closeBulkChangeFloorCeilingDialog,\n } = useDialog(\n DialogId.BulkChangeFloorCeilingActions,\n BulkEditListingPricingFloorCeilingDialog\n );\n\n const { showErrorDialog } = useErrorBoundaryContext();\n const { setActivePosEntity } = useActivePosEntityContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n\n const updateKey = event\n ? `listingPricingFloorCeiling-event-${event.viagVirtualId}`\n : INVENTORY_BULK_UPDATE_PRICE_FLOOR_CEILING_UPDATE_KEY;\n\n const onSubmitChangeFloorCeilingCallback = useCallback(\n async (\n amount: number,\n isAbove: boolean,\n floorCeiling: FloorCeiling,\n isRelative: boolean,\n adjustmentType: PricingFloorCeilingAdjustmentType,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => {\n if (activeAccountWebClientConfig.activeAccountId == null) {\n return null;\n }\n\n setIsLoading(true);\n\n if (onPreviewReceived) {\n await tryInvokeApi(\n async () => {\n const preview = await new BulkEditListingClient(\n activeAccountWebClientConfig\n ).bulkUpdatePriceFloorCeilingPreview(filterQueryWithEventIds);\n\n onPreviewReceived(preview);\n },\n (error) => {\n showErrorDialog('bulkUpdatePriceFloorCeilingPreview', error, {\n trackErrorData: { filterQueryWithEventIds },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n } else {\n await tryInvokeApi(\n async () => {\n const client = new BulkEditListingClient(\n activeAccountWebClientConfig\n );\n\n // At the moment, if we are submitting a bulk ceiling update, we should always use a percentage\n // based adjustment, and the values of isRelative and adjustmentType are ignored.\n let adjustment = (isAbove ? 100 + amount : 100 - amount) / 100;\n if (floorCeiling === FloorCeiling.Floor && !isRelative) {\n // If we are performing a bulk floor adjustment, and isRelative is false, that means we want\n // to do an absolute adjustment. The adjustment value needs to be positive if isAbove is true,\n // and negative if isAbove is false\n adjustment = isAbove ? amount : -1 * amount;\n }\n\n const succeeded =\n floorCeiling === FloorCeiling.Floor\n ? await client.bulkUpdatePriceFloor(\n preview!.preview,\n adjustment,\n updateKey,\n isRelative,\n adjustmentType,\n supportBackgroundProcess\n )\n : await client.bulkUpdatePriceCeiling(\n preview!.preview,\n adjustment,\n updateKey,\n supportBackgroundProcess\n );\n\n if (!supportBackgroundProcess) {\n if (succeeded) {\n // Invalidate the activePosEntity, so that when clicking on listingDetails\n // we force re-loading the listing and newest pricing settings can be displayed\n setActivePosEntity(0);\n await refreshExpandedListItems();\n }\n\n closeBulkChangeFloorCeilingDialog();\n }\n },\n (error) => {\n showErrorDialog('ListingClient.onSubmitChangeFloorCeiling', error, {\n trackErrorData: { amount, isAbove, floorCeiling, preview },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n }\n },\n [\n activeAccountWebClientConfig,\n setIsLoading,\n filterQueryWithEventIds,\n showErrorDialog,\n updateKey,\n closeBulkChangeFloorCeilingDialog,\n setActivePosEntity,\n refreshExpandedListItems,\n ]\n );\n\n const onChangeFloorCeilingClick = useCallback(\n (e: React.MouseEvent, floorCeiling: FloorCeiling) => {\n e.preventDefault();\n e.stopPropagation();\n\n openBulkChangeFloorCeilingDialog({\n updateKey,\n floorCeiling,\n onOkay: onSubmitChangeFloorCeilingCallback,\n onClosed: () => {\n setIsLoading(false);\n },\n onCancel: closeBulkChangeFloorCeilingDialog,\n });\n },\n [\n closeBulkChangeFloorCeilingDialog,\n onSubmitChangeFloorCeilingCallback,\n openBulkChangeFloorCeilingDialog,\n setIsLoading,\n updateKey,\n ]\n );\n\n return {\n dropDown: (\n <>\n onChangeFloorCeilingClick(e, FloorCeiling.Floor)}\n disabled={isLoading}\n >\n \n \n onChangeFloorCeilingClick(e, FloorCeiling.Ceiling)}\n disabled={isLoading}\n >\n \n \n \n ),\n };\n};\n","import { useState } from 'react';\nimport { useBulkPricingActionsPermissions } from 'src/components/common/BulkActions/BulkPricingActions/useBulkPricingActionsPermissions';\nimport { useBulkActionsState } from 'src/components/common/BulkActions/useBulkActionsState';\nimport { useInventoryEventBulkActionsState } from 'src/components/Events/EventListing/InventoryEventListing/BulkActions/InventoryEventBulkActions/useInventoryEventBulkActionsState';\nimport { useBulkChangeListingPriceAction } from 'src/components/Listings/InventoryActionDropdown/components/BulkChangeListingPriceAction';\nimport { useBulkUpdateMarketplacePrices } from 'src/components/Listings/InventoryActionDropdown/components/BulkChangeMarketplacePriceAction/indext';\nimport { useBulkEditAutoPricingSettings } from 'src/components/Listings/InventoryActionDropdown/components/BulkEditAutoPricingSettingsAction';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosDropdown } from 'src/core/POS/PosDropdown';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { useBulkChangeFloorCeilingActions } from 'src/hooks/useBulkChangeFloorCeilingActions';\nimport { ChevronDownIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { EventWithData } from 'src/WebApiController';\n\ninterface PricingActionsProps {\n event: EventWithData['event'];\n}\n\nexport const PricingActions = ({ event }: PricingActionsProps) => {\n const { areBulkActionsEnabled } = useBulkActionsState();\n const { affectedVisibleListingIds, filterQueryWithEventIds } =\n useInventoryEventBulkActionsState(event);\n\n const [isLoading, setIsLoading] = useState(false);\n\n const bulkUpdateListingPrice = useBulkChangeListingPriceAction(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n event\n );\n\n const { hasEditPricingPermission } = useBulkPricingActionsPermissions();\n\n const bulkEditAutoPricingSettingsV2 = useBulkEditAutoPricingSettings(\n filterQueryWithEventIds,\n affectedVisibleListingIds,\n setIsLoading,\n isLoading,\n event\n );\n\n const bulkChangeFloorCeilingActions = useBulkChangeFloorCeilingActions({\n event,\n setIsLoading,\n isLoading,\n filterQueryWithEventIds,\n });\n\n const bulkUpdateMarketplacePrices = useBulkUpdateMarketplacePrices(\n filterQueryWithEventIds,\n affectedVisibleListingIds,\n setIsLoading,\n isLoading,\n event\n );\n\n return (\n <>\n \n \n \n \n }\n align=\"start\"\n triggerProps={{ disabled: isLoading || !areBulkActionsEnabled }}\n >\n {bulkUpdateListingPrice.dropDown}\n {hasEditPricingPermission && bulkChangeFloorCeilingActions.dropDown}\n {bulkEditAutoPricingSettingsV2.dropDown}\n {bulkUpdateMarketplacePrices.dropDown}\n \n \n );\n};\n","import { Content } from 'src/contexts/ContentContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Feature, Permission } from 'src/WebApiController';\n\nexport const LaunchChangeEvent = ({\n onClick,\n disabled,\n}: {\n onClick: (e: React.MouseEvent) => void;\n disabled?: boolean;\n}) => {\n const hasPermission = useUserHasAnyOfPermissions(\n Permission.Inventory_UpdateListingInfo,\n Permission.Inventory_UpdateListingInfoOnIsPricerOf,\n Permission.Inventory_UpdateListingInfoOnPurchasedBy\n );\n\n if (!hasPermission) {\n return null;\n }\n\n return (\n <>\n \n \n \n \n );\n};\n","import { useCallback, useRef, useState } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { BulkChangeEventDialog } from 'src/dialogs/BulkEdits/BulkChangeEventDialog';\nimport { TicketGroupIntentionDialog } from 'src/dialogs/TicketGroupIntentionDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { EmptyListingQuery } from 'src/utils/eventQueryUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n BulkEditListingClient,\n BulkEditPreviewWithDetails,\n Event,\n TicketGroupEditReason,\n} from 'src/WebApiController';\n\nimport { LaunchChangeEvent } from './LaunchChangeEvent';\n\nexport const useBulkChangeEventAction = (\n event: Event,\n affectedVisibleListingIds: number[],\n\n setIsLoading: (v: boolean) => void,\n isLoading?: boolean\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const updateKey = `inventory-changeEvent-event-${event.viagVirtualId}`;\n const {\n refreshCatalog,\n eventsExpansion: { setListItemExpansion },\n } = useCatalogDataContext();\n const [changeEventNote, setChangeEventNote] = useState();\n const deallocateSalesRef = useRef(true);\n\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const ticketGroupIntentionDialog = useBasicDialog();\n\n const {\n openDialog: openBulkChangeEventDialog,\n closeDialog: closeBulkChangeEventDialog,\n } = useDialog(DialogId.BulkChangeEvent, BulkChangeEventDialog);\n\n const onSubmitChangeEvent = useCallback(\n async (\n newSelectedEvent: Event | null,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => {\n setIsLoading(true);\n\n if (onPreviewReceived) {\n const activeQuery = {\n ...EmptyListingQuery,\n eventOrMappingIds: affectedVisibleListingIds.length\n ? null\n : [event.viagVirtualId],\n entityIds: affectedVisibleListingIds,\n };\n await tryInvokeApi(\n async () => {\n const client = new BulkEditListingClient(\n activeAccountWebClientConfig\n );\n\n const preview = await client.bulkChangeEventPreview(activeQuery);\n\n onPreviewReceived(preview);\n },\n (error) => {\n showErrorDialog('bulkUpdateTagsPreview', error, {\n trackErrorData: { activeQuery },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n } else if (newSelectedEvent) {\n await tryInvokeApi(\n async () => {\n const succeeded = await new BulkEditListingClient(\n activeAccountWebClientConfig\n ).bulkChangeEvent(\n preview!.preview,\n newSelectedEvent.posIds[0],\n newSelectedEvent.viagId,\n newSelectedEvent.mappingId,\n deallocateSalesRef.current,\n changeEventNote ?? '',\n updateKey,\n supportBackgroundProcess\n );\n if (!supportBackgroundProcess) {\n if (succeeded) {\n refreshCatalog();\n setListItemExpansion(true, [event.viagVirtualId]);\n }\n\n closeBulkChangeEventDialog();\n }\n },\n (error) => {\n showErrorDialog('onSubmitChangeEvent', error, {\n trackErrorData: {\n newSelectedEvent,\n preview,\n changeEventNote,\n },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n }\n },\n [\n activeAccountWebClientConfig,\n affectedVisibleListingIds,\n changeEventNote,\n closeBulkChangeEventDialog,\n event.viagVirtualId,\n refreshCatalog,\n setIsLoading,\n setListItemExpansion,\n showErrorDialog,\n updateKey,\n ]\n );\n\n const onChangeEventClick = useCallback(\n (changeEventNote?: string) => {\n setChangeEventNote(changeEventNote);\n\n openBulkChangeEventDialog({\n entityType: ActionOutboxEntityType.Listing,\n changeEventNote,\n updateKey,\n onOkay: onSubmitChangeEvent,\n onClosed: () => {\n setIsLoading(false);\n },\n onCancel: closeBulkChangeEventDialog,\n });\n },\n [\n closeBulkChangeEventDialog,\n onSubmitChangeEvent,\n openBulkChangeEventDialog,\n setIsLoading,\n updateKey,\n ]\n );\n\n return {\n dropDown: (\n {\n e.preventDefault();\n e.stopPropagation();\n ticketGroupIntentionDialog.launchDialog();\n }}\n disabled={isLoading}\n />\n ),\n dialog: (\n <>\n {\n deallocateSalesRef.current = deallocateSales == true;\n onChangeEventClick(i.additionalInfo);\n ticketGroupIntentionDialog.closeDialog();\n }}\n saveButtonContentId={ContentId.Save}\n />\n \n ),\n };\n};\n","import { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { IconsFill, InfoOutlineIcon } from 'src/svgs/Viagogo';\n\nimport * as styles from './MessageWithIcon.css';\n\nexport const InfoMessage = ({\n message,\n iconSize = vars.iconSize.l,\n style,\n}: {\n message: string | JSX.Element;\n iconSize?: string;\n style?: React.CSSProperties;\n}) => {\n return (\n \n \n
    {message}
    \n \n );\n};\n","import { HubConnectionState } from '@microsoft/signalr';\nimport { ComponentProps, useCallback, useRef, useState } from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { BulkEditStatus } from 'src/components/common/BulkActions/BulkEditStatus';\nimport { TicketTypePriorityInput } from 'src/components/common/TicketTypePriorityInput';\nimport { DeliveryTypeSelector } from 'src/components/Selectors/DeliveryTypeSelector';\nimport {\n IPosEntity,\n useActivePosEntityContext,\n} from 'src/contexts/ActivePosEntityContext';\nimport {\n BulkEditStage,\n useBulkEditHubContext,\n} from 'src/contexts/BulkEditHubContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { InfoMessage } from 'src/core/POS/MessageWithIcon/InfoMessage';\nimport { Stack } from 'src/core/ui';\nimport { useBulkEditHub } from 'src/hooks/useBulkEditHub';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n ActionOutboxEntityType,\n BulkActionType,\n BulkEditPreviewWithDetails,\n BulkEditProgress,\n BulkEditStep,\n DeliveryType, Feature,\n TicketTypeOverride,\n} from 'src/WebApiController';\n\nimport { BulkEditFooter } from '../common/BulkEditFooter';\nimport { BulkEditHeader } from '../common/BulkEditHeader';\nimport {Checkbox} from \"src/core/interim/Checkbox\";\nimport {useUserHasFeature} from \"src/hooks/useUserHasFeature\";\n\nexport type BulkChangeTicketTypeRuleDialogProps = ComponentProps<\n typeof RSModal\n> & {\n updateKey: string;\n onOkay: (\n deliveryType: DeliveryType | null,\n ticketTypeRules: TicketTypeOverride | null,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n updateSalesOfListing?: boolean,\n preview?: BulkEditPreviewWithDetails\n ) => void;\n onCancel: () => void;\n};\n\nconst INIT_TICKET_TYPE_RULES = {\n overrides: [\n {\n deliveryType: DeliveryType.InApp,\n ticketTypePriorities: [],\n },\n ],\n};\n\nexport function BulkChangeTicketTypeRuleDialog({\n updateKey,\n onOkay,\n onCancel,\n ...rest\n}: BulkChangeTicketTypeRuleDialogProps) {\n const { setActivePosEntity } = useActivePosEntityContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n const { setSelectionMode } = useMultiSelectionContext();\n const { setProgress, setPreview, setMainDialogOpened } =\n useBulkEditHubContext();\n const [isLoading, setIsLoading] = useState(false);\n const [updateSalesOfListings, setUpdateSalesOfListings] = useState(false);\n\n const hasBackfillTicketTypeOverrideToSaleFeature = useUserHasFeature(\n Feature.BackfillListingTicketTypeOverrideToSale\n );\n\n const onClose = useCallback(\n async (\n newProgress?: BulkEditProgress,\n closeMainDialogForPopover?: boolean\n ) => {\n if (newProgress?.step === BulkEditStep.Done) {\n setIsRefreshing(true);\n setActivePosEntity(0);\n\n await refreshExpandedListItems();\n setSelectionMode(undefined);\n if (closeMainDialogForPopover) {\n setMainDialogOpened(false);\n } else {\n setProgress(undefined);\n setPreview(undefined);\n }\n setIsRefreshing(false);\n // progress kept to allow the BulkEditStatusPopover to show the result\n }\n onCancel();\n },\n [\n onCancel,\n refreshExpandedListItems,\n setActivePosEntity,\n setMainDialogOpened,\n setPreview,\n setProgress,\n setSelectionMode,\n ]\n );\n\n const onBulkEditDone = useCallback(\n async (doneProgress: BulkEditProgress, finalErrors: string[]) => {\n if (finalErrors.length === 0 && doneProgress.step === BulkEditStep.Done) {\n onClose(doneProgress, true);\n }\n },\n [onClose]\n );\n\n const { bulkEditHub, progress, preview, initJob, stage } = useBulkEditHub(\n ActionOutboxEntityType.Listing,\n BulkActionType.UpdateTicketTypeRules,\n updateKey,\n onBulkEditDone\n );\n\n const hasBackgroundBulkEditFeature =\n bulkEditHub?.state === HubConnectionState.Connected;\n\n const [deliveryType, setDeliveryType] = useState(\n DeliveryType.InApp\n );\n const [ticketTypeRules, setTicketTypeRules] = useState(\n INIT_TICKET_TYPE_RULES\n );\n\n const [isRefreshing, setIsRefreshing] = useState(false);\n\n const onSubmitHandler = useCallback(\n (onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n onOkay(null, null, false, onPreviewReceived, updateSalesOfListings);\n } else {\n onOkay(\n deliveryType,\n ticketTypeRules,\n hasBackgroundBulkEditFeature,\n undefined,\n updateSalesOfListings,\n preview\n );\n }\n setIsLoading(false);\n },\n [\n onOkay,\n deliveryType,\n ticketTypeRules,\n preview,\n hasBackgroundBulkEditFeature,\n updateSalesOfListings\n ]\n );\n\n const submittButtonRef = useRef(null);\n\n return (\n }\n />\n }\n onOpened={() => {\n setDeliveryType(DeliveryType.InApp);\n setTicketTypeRules(INIT_TICKET_TYPE_RULES);\n initJob();\n }}\n onKeyUp={(e) => {\n if (submittButtonRef.current && e.key === 'Enter') {\n submittButtonRef.current.click();\n }\n }}\n onClick={(e) => {\n // This so that this dialog does not cause event to flow to the EventHeader open/close event\n e.stopPropagation();\n e.preventDefault();\n }}\n onClosed={() => {\n setMainDialogOpened(false);\n if (progress) {\n setSelectionMode(undefined);\n }\n // Call the outside one if there is one\n rest.onClosed?.();\n }}\n footer={\n \n }\n onCancel={isLoading ? undefined : onCancel}\n >\n \n \n \n }\n />\n {\n if (newD && newD !== deliveryType) {\n setDeliveryType(newD);\n }\n }}\n />\n \n setTicketTypeRules(newRules ?? INIT_TICKET_TYPE_RULES)\n }\n disabled={isLoading}\n />\n {hasBackfillTicketTypeOverrideToSaleFeature && \n {\n setUpdateSalesOfListings((prev) => !prev);\n }}\n disabled={isLoading}\n label={}\n />\n }\n \n \n \n );\n}\n","import { Content } from 'src/contexts/ContentContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { Stack } from 'src/core/ui';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Permission } from 'src/WebApiController';\n\nexport const LaunchChangeTicketTypeRule = ({\n onClick,\n disabled,\n}: {\n onClick: (e: React.MouseEvent) => void;\n disabled?: boolean;\n}) => {\n const hasPermission = useUserHasAnyOfPermissions(\n Permission.Inventory_UpdateDeliveryStrategy,\n Permission.Inventory_UpdateDeliveryStrategyOnIsPricerOf,\n Permission.Inventory_UpdateDeliveryStrategyOnPurchasedBy\n );\n\n if (!hasPermission) {\n return null;\n }\n\n return (\n \n \n \n \n \n );\n};\n","import { useCallback } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { BulkChangeTicketTypeRuleDialog } from 'src/dialogs/BulkEdits/BulkChangeTicketTypeRuleDialog';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n BulkEditListingClient,\n BulkEditPreviewWithDetails,\n DeliveryType,\n Event,\n ListingQuery,\n TicketTypeOverride,\n} from 'src/WebApiController';\n\nimport { INVENTORY_BULK_UPDATE_TICKET_TYPE_RULE_UPDATE_KEY } from '../../InventoryActionDropdown.constants';\nimport { LaunchChangeTicketTypeRule } from './LaunchChangeTicketTypeRule';\n\nexport const useBulkChangeTicketTypeRuleAction = (\n filterQueryWithEventIds: ListingQuery,\n\n setIsLoading: (v: boolean) => void,\n isLoading?: boolean,\n event?: Event\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const updateKey = event\n ? `ticket-type-rule-event-${event.viagVirtualId}`\n : INVENTORY_BULK_UPDATE_TICKET_TYPE_RULE_UPDATE_KEY;\n const {\n refreshCatalog,\n eventsExpansion: { setListItemExpansion, refreshExpandedListItems },\n } = useCatalogDataContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const {\n openDialog: openBulkChangeTicketTypeRuleDialog,\n closeDialog: closeBulkChangeTicketTypeRuleDialog,\n } = useDialog(\n DialogId.BulkChangeTicketTypeRule,\n BulkChangeTicketTypeRuleDialog\n );\n\n const onSubmit = useCallback(\n async (\n deliveryType: DeliveryType | null,\n ticketTypeRules: TicketTypeOverride | null,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n updateSalesOfListing?: boolean,\n preview?: BulkEditPreviewWithDetails\n ) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n await tryInvokeApi(\n async () => {\n const client = new BulkEditListingClient(\n activeAccountWebClientConfig\n );\n\n const preview = await client.bulkUpdateTicketTypeRulesPreview(\n filterQueryWithEventIds,\n updateSalesOfListing\n );\n\n onPreviewReceived(preview);\n },\n (error) => {\n showErrorDialog('bulkUpdateTicketTypeRulesPreview', error, {\n trackErrorData: { filterQueryWithEventIds },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n } else if (deliveryType && ticketTypeRules) {\n await tryInvokeApi(\n async () => {\n const succeeded = await new BulkEditListingClient(\n activeAccountWebClientConfig\n ).bulkUpdateTicketTypeRules(\n {\n item1: preview!.preview,\n item2: deliveryType,\n item3:\n ticketTypeRules.overrides[0].ticketTypePriorities ?? null,\n },\n updateKey,\n supportBackgroundProcess,\n updateSalesOfListing\n );\n if (!supportBackgroundProcess) {\n if (succeeded) {\n if (!event) {\n await refreshCatalog();\n }\n await refreshExpandedListItems();\n }\n\n closeBulkChangeTicketTypeRuleDialog();\n }\n },\n (error) => {\n showErrorDialog(\n 'BulkEditListingClient.bulkUpdateTicketTypeRules',\n error,\n {\n trackErrorData: {\n preview,\n deliveryType,\n ticketTypeRules:\n ticketTypeRules.overrides[0].ticketTypePriorities ?? null,\n },\n }\n );\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n }\n },\n [\n setIsLoading,\n activeAccountWebClientConfig,\n filterQueryWithEventIds,\n showErrorDialog,\n updateKey,\n closeBulkChangeTicketTypeRuleDialog,\n event,\n refreshExpandedListItems,\n refreshCatalog,\n ]\n );\n\n return {\n dropDown: (\n {\n e.preventDefault();\n e.stopPropagation();\n if (event) {\n setListItemExpansion(true, [event.viagVirtualId]);\n }\n openBulkChangeTicketTypeRuleDialog({\n event,\n updateKey,\n onOkay: onSubmit,\n onClose: () => {\n setIsLoading(false);\n },\n onCancel: closeBulkChangeTicketTypeRuleDialog,\n });\n }}\n disabled={isLoading}\n />\n ),\n };\n};\n","import { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { Permission } from 'src/WebApiController';\n\ninterface UseUpdatePurchasesPermissions {\n hasUpdatePurchasesPermission: boolean;\n hasPurchaseUpdateCommissionPermission: boolean;\n hasPurchaseUpdateDeliveryTypePermission: boolean;\n hasPurchaseUpdateSeatTraitsPermission: boolean;\n}\n\nexport const useUpdatePurchasesPermissions =\n (): UseUpdatePurchasesPermissions => {\n const hasPurchaseUpdatePermission = useUserHasAnyOfPermissions(\n Permission.Purchases_Edit,\n Permission.Purchases_EditOwned\n );\n const hasPurchaseUpdateCommissionPermission = useUserHasAnyOfPermissions(\n Permission.Purchases_UpdateBuyerCommission,\n Permission.Purchases_UpdateBuyerCommissionOwned\n );\n const hasPurchaseUpdateDeliveryTypePermission = useUserHasAnyOfPermissions(\n Permission.Purchases_UpdateDeliveryType,\n Permission.Purchases_UpdateDeliveryTypeOwned,\n Permission.Purchases_UpdateCustomDeliveryType,\n Permission.Purchases_UpdateCustomDeliveryTypeOwned\n );\n const hasPurchaseUpdateSeatTraitsPermission = useUserHasAnyOfPermissions(\n Permission.Purchases_UpdateSeatTraits,\n Permission.Purchases_UpdateSeatTraitsOwned\n );\n\n return {\n hasUpdatePurchasesPermission: hasPurchaseUpdatePermission,\n hasPurchaseUpdateCommissionPermission,\n hasPurchaseUpdateDeliveryTypePermission,\n hasPurchaseUpdateSeatTraitsPermission,\n };\n };\n","import { useUpdatePurchasesPermissions } from 'src/components/Purchases/BulkActions/useUpdatePurchasesPermissions';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nexport const LaunchBulkEditCommission = ({\n onClick,\n disabled,\n}: {\n onClick: (e: React.MouseEvent) => void;\n disabled?: boolean;\n}) => {\n const { hasPurchaseUpdateCommissionPermission } =\n useUpdatePurchasesPermissions();\n\n if (!hasPurchaseUpdateCommissionPermission) {\n return null;\n }\n\n return (\n onClick(e)}\n disabled={disabled}\n >\n \n \n );\n};\n","import { HubConnectionState } from '@microsoft/signalr';\nimport { ComponentProps, useCallback, useMemo, useRef, useState } from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { Modal as RSModal } from 'reactstrap';\nimport { BulkEditStatus } from 'src/components/common/BulkActions/BulkEditStatus';\nimport {\n IPosEntity,\n useActivePosEntityContext,\n} from 'src/contexts/ActivePosEntityContext';\nimport {\n BulkEditStage,\n useBulkEditHubContext,\n} from 'src/contexts/BulkEditHubContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { usePurchaseDataContext } from 'src/contexts/PurchaseDataContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { Stack } from 'src/core/ui';\nimport { useBulkEditHub } from 'src/hooks/useBulkEditHub';\nimport {\n CommissionSection,\n PurchaseCommissionInput,\n} from 'src/modals/common/Purchase/CommissionSection';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n ActionOutboxEntityType,\n BulkActionType,\n BulkEditPreviewWithDetails,\n BulkEditProgress,\n BulkEditStep,\n Commission,\n} from 'src/WebApiController';\n\nimport { BulkEditFooter } from '../common/BulkEditFooter';\nimport { BulkEditHeader } from '../common/BulkEditHeader';\n\nexport type BulkEditCommissionDialogProps = ComponentProps & {\n updateKey: string;\n onOkay: (\n commissions: Commission[] | null,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => void;\n onCancel: () => void;\n};\n\nexport function BulkEditCommissionDialog({\n updateKey,\n onOkay,\n onCancel,\n ...rest\n}: BulkEditCommissionDialogProps) {\n const entityType = ActionOutboxEntityType.Purchase;\n\n const { setActivePosEntity } = useActivePosEntityContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n const { refreshData } = usePurchaseDataContext();\n const { setSelectionMode } = useMultiSelectionContext();\n const { setProgress, setPreview, setMainDialogOpened } =\n useBulkEditHubContext();\n const [isLoading, setIsLoading] = useState(false);\n\n const methods = useForm();\n const { handleSubmit, watch, formState, trigger } = methods;\n const isFormValid = formState.isValid;\n\n const input = watch();\n\n const onClose = useCallback(\n async (\n newProgress?: BulkEditProgress,\n closeMainDialogForPopover?: boolean\n ) => {\n if (newProgress?.step === BulkEditStep.Done) {\n setIsRefreshing(true);\n setActivePosEntity(0);\n\n // Depending whether it's Listing, Sales, or Purchase\n // the context would be different here\n if (refreshData) {\n await refreshData(true);\n }\n if (refreshExpandedListItems) {\n await refreshExpandedListItems();\n }\n setSelectionMode(undefined);\n if (closeMainDialogForPopover) {\n setMainDialogOpened(false);\n } else {\n setProgress(undefined);\n setPreview(undefined);\n }\n setIsRefreshing(false);\n // progress kept to allow the BulkEditStatusPopover to show the result\n }\n onCancel();\n },\n [\n onCancel,\n refreshData,\n refreshExpandedListItems,\n setActivePosEntity,\n setMainDialogOpened,\n setPreview,\n setProgress,\n setSelectionMode,\n ]\n );\n\n const onBulkEditDone = useCallback(\n async (doneProgress: BulkEditProgress, finalErrors: string[]) => {\n if (finalErrors.length === 0 && doneProgress.step === BulkEditStep.Done) {\n onClose(doneProgress, true);\n }\n },\n [onClose]\n );\n\n const { bulkEditHub, progress, preview, initJob, stage } = useBulkEditHub(\n entityType,\n BulkActionType.UpdateBuyerCommissions,\n updateKey,\n onBulkEditDone\n );\n\n const hasBackgroundBulkEditFeature = useMemo(\n () => bulkEditHub?.state === HubConnectionState.Connected,\n [bulkEditHub?.state]\n );\n\n const onSubmitHandler = useCallback(\n (onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n onOkay(null, false, onPreviewReceived);\n } else {\n handleSubmit((i) =>\n onOkay(\n i.commissions?.value ?? null,\n hasBackgroundBulkEditFeature,\n undefined,\n preview\n )\n )();\n }\n setIsLoading(false);\n },\n [handleSubmit, hasBackgroundBulkEditFeature, onOkay, preview]\n );\n\n const [isRefreshing, setIsRefreshing] = useState(false);\n\n const isInputValid = useMemo(() => {\n return input.commissions != null;\n }, [input]);\n\n const submitButtonRef = useRef(null);\n\n return (\n }\n />\n }\n onOpened={() => {\n initJob();\n }}\n onKeyUp={(e) => {\n if (submitButtonRef.current && e.key === 'Enter' && isInputValid) {\n submitButtonRef.current.click();\n }\n }}\n onClick={(e) => {\n // This so that this dialog does not cause event to flow to the EventHeader open/close event\n e.stopPropagation();\n e.preventDefault();\n }}\n onClosed={() => {\n setMainDialogOpened(false);\n if (progress) {\n setSelectionMode(undefined);\n }\n // Call the outside one if there is one\n rest.onClosed?.();\n }}\n footer={\n {\n if (!isFormValid) {\n trigger();\n }\n return isFormValid;\n }}\n />\n }\n onCancel={isLoading ? undefined : onCancel}\n >\n \n \n \n \n \n {input.commissions != null &&\n input.commissions.value?.length === 0 && (\n \n }\n />\n )}\n \n \n \n );\n}\n","import { useCallback } from 'react';\nimport { LaunchBulkEditCommission } from 'src/components/common/BulkActions/BulkEditCommissionAction';\nimport {\n IPosEntity,\n useActivePosEntityContext,\n} from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { BulkEditCommissionDialog } from 'src/dialogs/BulkEdits/BulkEditCommissionDialog';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n BulkEditListingClient,\n BulkEditPreviewWithDetails,\n Commission,\n Event,\n ListingQuery,\n} from 'src/WebApiController';\n\nimport { INVENTORY_BULK_UPDATE_COMMISSION_UPDATE_KEY } from '../../InventoryActionDropdown.constants';\n\nexport const useBulkEditCommissionAction = (\n filterQueryWithEventIds: ListingQuery,\n setIsLoading: (v: boolean) => void,\n isLoading?: boolean,\n event?: Event\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { setActivePosEntity } = useActivePosEntityContext();\n const updateKey = event\n ? `listingCommission-event-${event.viagVirtualId}`\n : INVENTORY_BULK_UPDATE_COMMISSION_UPDATE_KEY;\n const {\n eventsExpansion: { setListItemExpansion, refreshExpandedListItems },\n } = useCatalogDataContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const {\n openDialog: openBulkEditCommissionDialog,\n closeDialog: closeBulkEditCommissionDialog,\n } = useDialog(DialogId.BulkEditCommission, BulkEditCommissionDialog);\n\n const onSubmit = useCallback(\n async (\n commissions: Commission[] | null,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n await tryInvokeApi(\n async () => {\n const preview = await new BulkEditListingClient(\n activeAccountWebClientConfig\n ).bulkUpdatePurchaseCommissionsPreview(filterQueryWithEventIds);\n\n onPreviewReceived(preview);\n },\n (error) => {\n showErrorDialog('bulkUpdatePurchaseCommissionsPreview', error, {\n trackErrorData: { filterQueryWithEventIds },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n } else {\n await tryInvokeApi(\n async () => {\n const succeeded = await new BulkEditListingClient(\n activeAccountWebClientConfig\n ).bulkUpdatePurchaseCommissions(\n {\n item1: preview!.preview,\n item2: commissions ?? [],\n },\n updateKey,\n supportBackgroundProcess\n );\n\n if (!supportBackgroundProcess) {\n if (succeeded) {\n // Invalidate the activePosEntity, so that when clicking on listingDetails\n // we force re-loading the listing and newest pricing settings can be displayed\n setActivePosEntity(0);\n await refreshExpandedListItems();\n }\n\n closeBulkEditCommissionDialog();\n }\n },\n (error) => {\n showErrorDialog('onSubmitEditCommission', error, {\n trackErrorData: { commissions, preview },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n }\n },\n [\n setIsLoading,\n activeAccountWebClientConfig,\n filterQueryWithEventIds,\n showErrorDialog,\n updateKey,\n closeBulkEditCommissionDialog,\n setActivePosEntity,\n refreshExpandedListItems,\n ]\n );\n\n const onLaunchAction = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n if (event) {\n setListItemExpansion(true, [event.viagVirtualId]);\n }\n openBulkEditCommissionDialog({\n updateKey,\n onOkay: onSubmit,\n onClosed: () => {\n setIsLoading(false);\n },\n onCancel: closeBulkEditCommissionDialog,\n });\n },\n [\n closeBulkEditCommissionDialog,\n event,\n onSubmit,\n openBulkEditCommissionDialog,\n setIsLoading,\n setListItemExpansion,\n updateKey,\n ]\n );\n\n return {\n dropDown: (\n \n ),\n };\n};\n","import { HubConnectionState } from '@microsoft/signalr';\nimport { isEqual } from 'lodash-es';\nimport { ComponentProps, useCallback, useMemo, useRef, useState } from 'react';\nimport { FormProvider, useForm, UseFormReturn } from 'react-hook-form';\nimport { Modal as RSModal } from 'reactstrap';\nimport { BulkEditStatus } from 'src/components/common/BulkActions/BulkEditStatus';\nimport { MarketplaceLogo } from 'src/components/common/MarketplaceLogo';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n BulkEditStage,\n useBulkEditHubContext,\n} from 'src/contexts/BulkEditHubContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { SimpleTable } from 'src/core/ui';\nimport { useBulkEditHub } from 'src/hooks/useBulkEditHub';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { compareMarketplace } from 'src/utils/eventWithDataUtils';\nimport { getListingDetailsUpdateInput } from 'src/utils/inventoryUtils';\nimport {\n ActionOutboxEntityType,\n BulkActionType,\n BulkEditPreviewWithDetails,\n BulkEditProgress,\n BulkEditStep,\n ListingDetails,\n ListingDetailsUpdateInput,\n Marketplace,\n} from 'src/WebApiController';\n\nimport { BulkEditFooter } from '../common/BulkEditFooter';\nimport { BulkEditHeader } from '../common/BulkEditHeader';\nimport * as styles from './BulkEditMarketplaceSeatingDialog.css';\n\nexport type MarketplaceBroadcastSelectionMode = 'all' | 'none' | 'default';\n\nconst enum SeatingAttribute {\n Section = 'overrideSection',\n Row = 'overrideRow',\n Seats = 'overrideSeats',\n}\n\nconst seatingAttributes = [\n SeatingAttribute.Section,\n SeatingAttribute.Row,\n SeatingAttribute.Seats,\n] as const;\n\nexport type BulkEditMarketplaceSeatingDialogProps = ComponentProps<\n typeof RSModal\n> & {\n updateKey: string;\n onOkay: (\n listingUpdate: ListingDetailsUpdateInput | null,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => void;\n onCancel: () => void;\n};\n\n/**\n * Bulk Marketplace Seating Change Dialog, with Form Provider wrapper\n */\nexport const BulkEditMarketplaceSeatingDialog = ({\n ...rest\n}: BulkEditMarketplaceSeatingDialogProps) => {\n const methods = useForm<\n Partial>>\n >({});\n\n return (\n \n \n \n );\n};\n\ntype BulkEditMarketplaceSeatingDialogContent = {\n methods: UseFormReturn<\n Partial>>,\n unknown,\n undefined\n >;\n} & BulkEditMarketplaceSeatingDialogProps;\n\n/**\n * Bulk Marketplace Seating Change Dialog\n */\nexport function BulkEditMarketplaceSeatingDialogContent({\n updateKey,\n onOkay,\n onCancel,\n methods,\n ...rest\n}: BulkEditMarketplaceSeatingDialogContent) {\n const { loginContext } = useAppContext();\n const { setActivePosEntity } = useActivePosEntityContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n const { setSelectionMode } = useMultiSelectionContext();\n const { setProgress, setPreview, setMainDialogOpened } =\n useBulkEditHubContext();\n const [isLoading, setIsLoading] = useState(false);\n const marketplaceSettings =\n loginContext?.user?.activeAccount?.marketplaceSettings;\n const { getValues, setValue, formState, watch } = methods;\n\n const input = watch();\n\n const textContentMap = {\n [SeatingAttribute.Section]: useContent(ContentId.Section),\n [SeatingAttribute.Row]: useContent(ContentId.Row),\n [SeatingAttribute.Seats]: useContent(ContentId.Seats),\n };\n\n const onClose = useCallback(\n async (\n newProgress?: BulkEditProgress,\n closeMainDialogForPopover?: boolean\n ) => {\n if (newProgress?.step === BulkEditStep.Done) {\n setIsRefreshing(true);\n setActivePosEntity(0);\n\n await refreshExpandedListItems();\n setSelectionMode(undefined);\n if (closeMainDialogForPopover) {\n setMainDialogOpened(false);\n } else {\n setProgress(undefined);\n setPreview(undefined);\n }\n setIsRefreshing(false);\n // progress kept to allow the BulkEditStatusPopover to show the result\n }\n onCancel();\n },\n [\n onCancel,\n refreshExpandedListItems,\n setActivePosEntity,\n setMainDialogOpened,\n setPreview,\n setProgress,\n setSelectionMode,\n ]\n );\n\n const onBulkEditDone = useCallback(\n async (doneProgress: BulkEditProgress, finalErrors: string[]) => {\n if (finalErrors.length === 0 && doneProgress.step === BulkEditStep.Done) {\n onClose(doneProgress, true);\n }\n },\n [onClose]\n );\n\n const { bulkEditHub, progress, preview, initJob, stage } = useBulkEditHub(\n ActionOutboxEntityType.Listing,\n BulkActionType.UpdateMarketplaceSeating,\n updateKey,\n onBulkEditDone\n );\n\n const hasBackgroundBulkEditFeature =\n bulkEditHub?.state === HubConnectionState.Connected;\n\n const onInputChangeHandler = (\n value: string,\n marketplace: Marketplace,\n attribute: SeatingAttribute\n ) => {\n const oldValue =\n getValues(marketplace) ?? ({} as Record);\n setValue(marketplace, { ...oldValue, [attribute]: value });\n };\n\n const [isRefreshing, setIsRefreshing] = useState(false);\n\n const onSubmitHandler = useCallback(\n (onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void) => {\n const formValues = getValues();\n const formEntries = Object.entries(formValues).map(\n ([marketplace, value]) => ({ mkp: marketplace, ...value })\n );\n\n const updatedListing = getListingDetailsUpdateInput({\n mkpListings: formEntries,\n } as ListingDetails);\n\n setIsLoading(true);\n if (onPreviewReceived) {\n onOkay(null, false, onPreviewReceived);\n } else {\n onOkay(\n updatedListing,\n hasBackgroundBulkEditFeature,\n undefined,\n preview\n );\n }\n setIsLoading(false);\n },\n [getValues, onOkay, preview, hasBackgroundBulkEditFeature]\n );\n\n const isInputValid = useMemo(() => {\n return !isEqual(input, formState.defaultValues ?? {});\n }, [formState.defaultValues, input]);\n\n const submittButtonRef = useRef(null);\n\n return (\n }\n />\n }\n onOpened={() => {\n initJob();\n }}\n onClick={(e) => {\n // This so that this dialog does not cause event to flow to the EventHeader open/close event\n e.stopPropagation();\n }}\n centered\n onKeyUp={(e) => {\n if (submittButtonRef.current && e.key === 'Enter' && isInputValid) {\n submittButtonRef.current.click();\n }\n }}\n onClosed={() => {\n setMainDialogOpened(false);\n if (progress) {\n setSelectionMode(undefined);\n }\n // Call the outside one if there is one\n rest.onClosed?.();\n }}\n footer={\n \n }\n onCancel={isLoading ? undefined : onCancel}\n >\n \n
    \n
    \n \n \n \n \n \n \n \n {textContentMap[SeatingAttribute.Section]}\n \n \n {textContentMap[SeatingAttribute.Row]}\n \n \n {textContentMap[SeatingAttribute.Seats]}\n \n \n \n \n {marketplaceSettings\n ?.filter((ml) => ml.mkp && ml.mkp !== Marketplace.Offline)\n ?.toSorted((a, b) => compareMarketplace(a.mkp, b.mkp))\n ?.map((marketplace) => {\n return (\n \n \n \n \n {seatingAttributes.map((attribute) => (\n \n \n onInputChangeHandler(\n e.currentTarget.value,\n marketplace.mkp,\n attribute\n )\n }\n />\n \n ))}\n \n );\n })}\n \n \n
    \n
    \n \n \n );\n}\n","import { Content } from 'src/contexts/ContentContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { Stack } from 'src/core/ui';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Permission } from 'src/WebApiController';\n\nexport const LaunchUpdateMarketplaceSeating = ({\n onClick,\n disabled,\n}: {\n onClick: (e: React.MouseEvent) => void;\n disabled?: boolean;\n}) => {\n const hasPermission = useUserHasAnyOfPermissions(\n Permission.Inventory_UpdateListingInfo,\n Permission.Inventory_UpdateListingInfoOnIsPricerOf,\n Permission.Inventory_UpdateListingInfoOnPurchasedBy\n );\n\n if (!hasPermission) {\n return null;\n }\n\n return (\n \n \n \n \n \n );\n};\n","import { useCallback } from 'react';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { BulkEditMarketplaceSeatingDialog } from 'src/dialogs/BulkEdits/BulkEditMarketplaceSeatingDialog/BulkEditMarketplaceSeatingDialog';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n BulkEditListingClient,\n BulkEditPreviewWithDetails,\n Event,\n ListingDetails,\n ListingDetailsUpdateInput,\n ListingQuery,\n} from 'src/WebApiController';\n\nimport { INVENTORY_BULK_UPDATE_MARKETPLACE_SEATING_UPDATE_KEY } from '../../InventoryActionDropdown.constants';\nimport { LaunchUpdateMarketplaceSeating } from './LaunchEditMarketplaceSeating';\n\nexport const useBulkEditMarketplaceSeatingAction = (\n filterQueryWithEventIds: ListingQuery,\n\n setIsLoading: (v: boolean) => void,\n isLoading?: boolean,\n event?: Event\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const updateKey = event\n ? `marketplace-seating-event-${event.viagVirtualId}`\n : INVENTORY_BULK_UPDATE_MARKETPLACE_SEATING_UPDATE_KEY;\n const {\n eventsExpansion: { setListItemExpansion, refreshExpandedListItems },\n } = useCatalogDataContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const { setActivePosEntity } = useActivePosEntityContext();\n\n const {\n openDialog: openBulkEditMarketplaceSeatingDialog,\n closeDialog: closeBulkEditMarketplaceSeatingDialog,\n } = useDialog(\n DialogId.BulkEditMarketplaceSeating,\n BulkEditMarketplaceSeatingDialog\n );\n const onSubmit = useCallback(\n async (\n listingUpdate: ListingDetailsUpdateInput | null,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n await tryInvokeApi(\n async () => {\n const preview = await new BulkEditListingClient(\n activeAccountWebClientConfig\n ).bulkUpdateMarketplaceSeatingOverridesPreview(\n filterQueryWithEventIds\n );\n\n onPreviewReceived(preview);\n },\n (error) => {\n showErrorDialog(\n 'bulkUpdateMarketplaceSeatingOverridesPreview',\n error,\n {\n trackErrorData: { filterQueryWithEventIds },\n }\n );\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n } else if (listingUpdate) {\n await tryInvokeApi(\n async () => {\n const succeeded = await new BulkEditListingClient(\n activeAccountWebClientConfig\n ).bulkUpdateMarketplaceSeatingOverrides(\n {\n item1: preview!.preview,\n item2: listingUpdate,\n },\n updateKey,\n supportBackgroundProcess\n );\n if (!supportBackgroundProcess) {\n if (succeeded) {\n setActivePosEntity(0);\n await refreshExpandedListItems();\n }\n closeBulkEditMarketplaceSeatingDialog();\n }\n },\n (error) => {\n showErrorDialog('bulkUpdateMarketplaceSeatingOverrides', error, {\n trackErrorData: { listingUpdate, preview },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n }\n },\n [\n setIsLoading,\n activeAccountWebClientConfig,\n filterQueryWithEventIds,\n showErrorDialog,\n updateKey,\n closeBulkEditMarketplaceSeatingDialog,\n setActivePosEntity,\n refreshExpandedListItems,\n ]\n );\n\n return {\n dropDown: (\n {\n e.preventDefault();\n e.stopPropagation();\n if (event) {\n setListItemExpansion(true, [event.viagVirtualId]);\n }\n openBulkEditMarketplaceSeatingDialog({\n updateKey,\n onOkay: onSubmit,\n onClosed: () => {\n setIsLoading(false);\n },\n onCancel: closeBulkEditMarketplaceSeatingDialog,\n });\n }}\n disabled={isLoading}\n />\n ),\n };\n};\n","import { HubConnectionState } from '@microsoft/signalr';\nimport { ComponentProps, useCallback, useRef, useState } from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { BulkEditStatus } from 'src/components/common/BulkActions/BulkEditStatus';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport {\n BulkEditStage,\n useBulkEditHubContext,\n} from 'src/contexts/BulkEditHubContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { Stack } from 'src/core/ui';\nimport { useBulkEditHub } from 'src/hooks/useBulkEditHub';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n ActionOutboxEntityType,\n BulkActionType,\n BulkEditPreviewWithDetails,\n BulkEditProgress,\n BulkEditStep,\n ListingDetails,\n} from 'src/WebApiController';\n\nimport { BulkEditFooter } from '../common/BulkEditFooter';\nimport { BulkEditHeader } from '../common/BulkEditHeader';\n\nexport type BulkRemovePredeliveryDialogProps = ComponentProps<\n typeof RSModal\n> & {\n updateKey: string;\n onOkay: (\n removeBarcodes: boolean,\n removePdfs: boolean,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => void;\n onCancel: () => void;\n};\n\nexport const BulkRemovePredeliveryDialog = ({\n updateKey,\n onCancel,\n onOkay,\n ...rest\n}: BulkRemovePredeliveryDialogProps) => {\n const [removeBarcodes, setRemoveBarcodes] = useState(true);\n const [removePdfs, setRemovePdfs] = useState(true);\n\n const [isLoading, setIsLoading] = useState(false);\n const { setActivePosEntity } = useActivePosEntityContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n const { setSelectionMode } = useMultiSelectionContext();\n const { setProgress, setPreview, setMainDialogOpened } =\n useBulkEditHubContext();\n\n const onClose = useCallback(\n async (\n newProgress?: BulkEditProgress,\n closeMainDialogForPopover?: boolean\n ) => {\n if (newProgress?.step === BulkEditStep.Done) {\n setIsRefreshing(true);\n setActivePosEntity(0);\n\n await refreshExpandedListItems();\n setSelectionMode(undefined);\n if (closeMainDialogForPopover) {\n setMainDialogOpened(false);\n } else {\n setProgress(undefined);\n setPreview(undefined);\n }\n setIsRefreshing(false);\n // progress kept to allow the BulkEditStatusPopover to show the result\n }\n onCancel();\n },\n [\n onCancel,\n refreshExpandedListItems,\n setActivePosEntity,\n setMainDialogOpened,\n setPreview,\n setProgress,\n setSelectionMode,\n ]\n );\n\n const onBulkEditDone = useCallback(\n async (doneProgress: BulkEditProgress, finalErrors: string[]) => {\n if (finalErrors.length === 0 && doneProgress.step === BulkEditStep.Done) {\n onClose(doneProgress, true);\n }\n },\n [onClose]\n );\n\n const { bulkEditHub, progress, preview, initJob, stage } = useBulkEditHub(\n ActionOutboxEntityType.Listing,\n BulkActionType.RemovePredelivery,\n updateKey,\n onBulkEditDone\n );\n\n const hasBackgroundBulkEditFeature =\n bulkEditHub?.state === HubConnectionState.Connected;\n\n const [isRefreshing, setIsRefreshing] = useState(false);\n\n const onSubmitHandler = useCallback(\n (onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n onOkay(false, false, false, onPreviewReceived);\n } else {\n onOkay(\n removeBarcodes,\n removePdfs,\n hasBackgroundBulkEditFeature,\n undefined,\n preview\n );\n }\n setIsLoading(false);\n },\n [onOkay, removeBarcodes, removePdfs, preview, hasBackgroundBulkEditFeature]\n );\n\n const submittButtonRef = useRef(null);\n\n return (\n }\n />\n }\n onOpened={() => {\n setRemoveBarcodes(true);\n setRemovePdfs(true);\n initJob();\n }}\n onKeyUp={(e) => {\n if (\n submittButtonRef.current &&\n e.key === 'Enter' &&\n (removeBarcodes || removePdfs)\n ) {\n submittButtonRef.current.click();\n }\n }}\n onClick={(e) => {\n // This so that this dialog does not cause event to flow to the EventHeader open/close event\n e.stopPropagation();\n e.preventDefault();\n }}\n onClosed={() => {\n setMainDialogOpened(false);\n if (progress) {\n setSelectionMode(undefined);\n }\n // Call the outside one if there is one\n rest.onClosed?.();\n }}\n footer={\n \n }\n onCancel={isLoading ? undefined : onCancel}\n {...rest}\n >\n \n \n \n }\n />\n\n \n setRemoveBarcodes(e.target.checked)}\n label={}\n labelPosition=\"right\"\n />\n setRemovePdfs(e.target.checked)}\n label={}\n labelPosition=\"right\"\n />\n\n {isLoading && }\n \n \n \n \n );\n};\n","import { Content } from 'src/contexts/ContentContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Permission } from 'src/WebApiController';\n\nexport const LaunchRemovePredelivery = ({\n onClick,\n disabled,\n}: {\n onClick: (e: React.MouseEvent) => void;\n disabled?: boolean;\n}) => {\n const hasPermission = useUserHasAnyOfPermissions(\n Permission.Inventory_Predelivery,\n Permission.Inventory_PredeliveryOnIsPricerOf,\n Permission.Inventory_PredeliveryOnPurchasedBy\n );\n\n if (!hasPermission) {\n return null;\n }\n\n return (\n <>\n \n \n \n \n );\n};\n","import { useCallback } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { BulkRemovePredeliveryDialog } from 'src/dialogs/BulkEdits/BulkRemovePredeliveryDialog';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n BulkEditListingClient,\n BulkEditPreviewWithDetails,\n Event,\n ListingQuery,\n} from 'src/WebApiController';\n\nimport { INVENTORY_BULK_REMOVE_PREDELIVERY_UPDATE_KEY } from '../../InventoryActionDropdown.constants';\nimport { LaunchRemovePredelivery } from './LaunchRemovePredelivery';\n\nexport const useBulkRemovePredelivery = (\n filterQueryWithEventIds: ListingQuery,\n setIsLoading: (v: boolean) => void,\n isLoading?: boolean,\n event?: Event\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { setSelectionMode } = useMultiSelectionContext();\n\n const updateKey = event\n ? `inventory-predelivery-event-${event.viagVirtualId}`\n : INVENTORY_BULK_REMOVE_PREDELIVERY_UPDATE_KEY;\n\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const {\n openDialog: openBulkRemovePredeliveryDialog,\n closeDialog: closeBulkRemovePredeliveryDialog,\n } = useDialog(DialogId.BulkRemovePredilivery, BulkRemovePredeliveryDialog);\n\n const onSubmit = useCallback(\n async (\n removeBarcodes: boolean,\n removePdfs: boolean,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n await tryInvokeApi(\n async () => {\n const preview = await new BulkEditListingClient(\n activeAccountWebClientConfig\n ).bulkRemovePredeliveryPreview(filterQueryWithEventIds);\n\n onPreviewReceived(preview);\n },\n (error) => {\n showErrorDialog('bulkRemovePredeliveryPreview', error, {\n trackErrorData: { filterQueryWithEventIds },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n } else {\n await tryInvokeApi(\n async () => {\n const succeeded = await new BulkEditListingClient(\n activeAccountWebClientConfig\n ).bulkRemovePredelivery(\n preview!.preview,\n removeBarcodes,\n removePdfs,\n updateKey,\n supportBackgroundProcess\n );\n\n if (!supportBackgroundProcess) {\n if (succeeded) {\n setSelectionMode();\n await refreshExpandedListItems();\n }\n\n closeBulkRemovePredeliveryDialog();\n }\n },\n (error) => {\n showErrorDialog('bulkRemovePredelivery', error, {\n trackErrorData: {\n preview,\n removeBarcodes,\n removePdfs,\n },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n }\n },\n [\n activeAccountWebClientConfig,\n closeBulkRemovePredeliveryDialog,\n filterQueryWithEventIds,\n refreshExpandedListItems,\n setIsLoading,\n setSelectionMode,\n showErrorDialog,\n updateKey,\n ]\n );\n\n return {\n dropDown: (\n {\n e.preventDefault();\n e.stopPropagation();\n openBulkRemovePredeliveryDialog({\n updateKey,\n onOkay: onSubmit,\n onClosed: () => {\n setIsLoading(false);\n },\n onCancel: closeBulkRemovePredeliveryDialog,\n });\n }}\n disabled={isLoading}\n />\n ),\n };\n};\n","import { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { ActionOutboxEntityType, Permission } from 'src/WebApiController';\n\ninterface UseBulkUpdateAutoFulfillPermissionsProps {\n entityType: ActionOutboxEntityType.Listing | ActionOutboxEntityType.Sale;\n}\n\ninterface BulkUpdateAutoFulfillPermissions {\n hasEditAutoFulfillPermissions: boolean;\n}\n\nexport const useBulkUpdateAutoFulfillPermissions = ({\n entityType,\n}: UseBulkUpdateAutoFulfillPermissionsProps): BulkUpdateAutoFulfillPermissions => {\n const hasEditAutoFulfillPermissions = useUserHasAnyOfPermissions(\n ...(entityType === ActionOutboxEntityType.Listing\n ? [\n Permission.Inventory_UpdateListingInfo,\n Permission.Inventory_UpdateListingInfoOnIsPricerOf,\n Permission.Inventory_UpdateListingInfoOnPurchasedBy,\n ]\n : [\n Permission.Sales_UpdateSalesInfo,\n Permission.Sales_UpdateSalesInfoOnIsFulfillerOf,\n Permission.Sales_UpdateSalesInfoOnIsPricerOf,\n Permission.Sales_UpdateSaleOnPurchasedBy,\n ])\n );\n\n return {\n hasEditAutoFulfillPermissions,\n };\n};\n","import { Content } from 'src/contexts/ContentContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { useAnyMarketplaceHandledByProcessor } from 'src/hooks/useMarketplaceHandledByProcessor';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ActionOutboxEntityType, Feature } from 'src/WebApiController';\n\nimport { useBulkUpdateAutoFulfillPermissions } from './useBulkUpdateAutoFulfillPermissions';\n\nexport const LaunchBulkUpdateAutoFulfill = ({\n onClick,\n disabled,\n entityType,\n}: {\n onClick: (e: React.MouseEvent) => void;\n disabled?: boolean;\n entityType: ActionOutboxEntityType.Listing | ActionOutboxEntityType.Sale;\n}) => {\n const { hasEditAutoFulfillPermissions } = useBulkUpdateAutoFulfillPermissions(\n {\n entityType,\n }\n );\n const hasAutoFulfillFeature = useUserHasFeature(Feature.AutoFulfillSetting);\n const anyMkpHandledByProcessor = useAnyMarketplaceHandledByProcessor();\n\n if (\n !anyMkpHandledByProcessor ||\n !hasEditAutoFulfillPermissions ||\n !hasAutoFulfillFeature\n ) {\n return null;\n }\n\n return (\n \n \n \n );\n};\n","import { HubConnectionState } from '@microsoft/signalr';\nimport { ComponentProps, useCallback, useRef, useState } from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { BulkEditStatus } from 'src/components/common/BulkActions/BulkEditStatus';\nimport {\n IPosEntity,\n useActivePosEntityContext,\n} from 'src/contexts/ActivePosEntityContext';\nimport {\n BulkEditStage,\n useBulkEditHubContext,\n} from 'src/contexts/BulkEditHubContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { Stack, Switch } from 'src/core/ui';\nimport { useBulkEditHub } from 'src/hooks/useBulkEditHub';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n ActionOutboxEntityType,\n BulkActionType,\n BulkEditPreviewWithDetails,\n BulkEditProgress,\n BulkEditStep,\n} from 'src/WebApiController';\n\nimport { BulkEditFooter } from '../common/BulkEditFooter';\nimport { BulkEditHeader } from '../common/BulkEditHeader';\n\nexport type BulkUpdateAutoFulfillDialogProps = ComponentProps<\n typeof RSModal\n> & {\n updateKey: string;\n onOkay: (\n isNoFulfill: boolean | null,\n updateSalesOfListings: boolean,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => void;\n onCancel: () => void;\n entityType: ActionOutboxEntityType.Listing | ActionOutboxEntityType.Sale;\n};\n\nexport function BulkUpdateAutoFulfillDialog({\n updateKey,\n onOkay,\n onCancel,\n entityType,\n ...rest\n}: BulkUpdateAutoFulfillDialogProps) {\n const { setActivePosEntity } = useActivePosEntityContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n\n const { setSelectionMode } = useMultiSelectionContext();\n const { setProgress, setPreview, setMainDialogOpened } =\n useBulkEditHubContext();\n\n const [isNoFulfill, setIsNoFulfill] = useState(false);\n const [isLoading, setIsLoading] = useState(false);\n\n const onClose = useCallback(\n async (\n newProgress?: BulkEditProgress,\n closeMainDialogForPopover?: boolean\n ) => {\n if (newProgress?.step === BulkEditStep.Done) {\n setIsRefreshing(true);\n setActivePosEntity(0);\n\n await refreshExpandedListItems();\n\n setSelectionMode(undefined);\n if (closeMainDialogForPopover) {\n setMainDialogOpened(false);\n } else {\n setProgress(undefined);\n setPreview(undefined);\n }\n\n setIsRefreshing(false);\n // progress kept to allow the BulkEditStatusPopover to show the result\n }\n onCancel();\n },\n [\n onCancel,\n refreshExpandedListItems,\n setActivePosEntity,\n setMainDialogOpened,\n setPreview,\n setProgress,\n setSelectionMode,\n ]\n );\n\n const onBulkEditDone = useCallback(\n async (doneProgress: BulkEditProgress, finalErrors: string[]) => {\n if (finalErrors.length === 0 && doneProgress.step === BulkEditStep.Done) {\n onClose(doneProgress, true);\n }\n },\n [onClose]\n );\n\n const { bulkEditHub, progress, preview, initJob, stage } = useBulkEditHub(\n entityType,\n BulkActionType.UpdateIsNoFulfill,\n updateKey,\n onBulkEditDone\n );\n\n const hasBackgroundBulkEditFeature =\n bulkEditHub?.state === HubConnectionState.Connected;\n\n const [updateSalesOfListings, setUpdateSalesOfListings] = useState(false);\n const [isRefreshing, setIsRefreshing] = useState(false);\n\n const onSubmitHandler = useCallback(\n (onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n onOkay(null, updateSalesOfListings, false, onPreviewReceived);\n } else {\n onOkay(\n isNoFulfill,\n updateSalesOfListings,\n hasBackgroundBulkEditFeature,\n undefined,\n preview\n );\n }\n setIsLoading(false);\n },\n [\n onOkay,\n updateSalesOfListings,\n isNoFulfill,\n preview,\n hasBackgroundBulkEditFeature,\n ]\n );\n\n const submittButtonRef = useRef(null);\n\n return (\n }\n />\n }\n onOpened={() => {\n setIsNoFulfill(false);\n setUpdateSalesOfListings(false);\n initJob();\n }}\n onKeyUp={(e) => {\n if (submittButtonRef.current && e.key === 'Enter') {\n submittButtonRef.current.click();\n }\n }}\n onClick={(e) => {\n // This so that this dialog does not cause event to flow to the EventHeader open/close event\n e.stopPropagation();\n e.preventDefault();\n }}\n onClosed={() => {\n setMainDialogOpened(false);\n if (progress) {\n setSelectionMode(undefined);\n }\n // Call the outside one if there is one\n rest.onClosed?.();\n }}\n footer={\n \n }\n onCancel={isLoading ? undefined : onCancel}\n >\n \n \n \n \n \n \n e.stopPropagation()}\n onCheckedChange={(isChecked) => {\n setIsNoFulfill(!isChecked);\n }}\n />\n \n\n {entityType === ActionOutboxEntityType.Listing && (\n {\n setUpdateSalesOfListings((prev) => !prev);\n }}\n disabled={isLoading}\n label={}\n />\n )}\n \n \n \n );\n}\n","import { useCallback } from 'react';\nimport { LaunchBulkUpdateAutoFulfill } from 'src/components/common/BulkActions/BulkUpdateAutoFulfillAction';\nimport {\n IPosEntity,\n useActivePosEntityContext,\n} from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { BulkUpdateAutoFulfillDialog } from 'src/dialogs/BulkEdits/BulkUpdateAutoFulfillDialog';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n BulkEditListingClient,\n BulkEditPreviewWithDetails,\n Event,\n ListingQuery,\n} from 'src/WebApiController';\n\nimport { INVENTORY_BULK_UPDATE_AUTOFULFILL_UPDATE_KEY } from '../../InventoryActionDropdown.constants';\n\nexport const useBulkUpdateAutoFulfillAction = (\n filterQueryWithEventIds: ListingQuery,\n setIsLoading: (v: boolean) => void,\n isLoading?: boolean,\n event?: Event\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { setActivePosEntity } = useActivePosEntityContext();\n const updateKey = event\n ? `listing-autofulfill-event-${event.viagVirtualId}`\n : INVENTORY_BULK_UPDATE_AUTOFULFILL_UPDATE_KEY;\n const {\n eventsExpansion: { setListItemExpansion, refreshExpandedListItems },\n } = useCatalogDataContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const {\n openDialog: openBulkUpdateAutoFulfillDialog,\n closeDialog: closeBulkUpdateAutofulfillDialog,\n } = useDialog(DialogId.BulkUpdateAutoFulfill, BulkUpdateAutoFulfillDialog);\n\n const onSubmit = useCallback(\n async (\n isNoFulfill: boolean | null,\n updateSalesOfListings: boolean,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n await tryInvokeApi(\n async () => {\n const preview = await new BulkEditListingClient(\n activeAccountWebClientConfig\n ).bulkUpdateIsNoFulfillPreview(\n filterQueryWithEventIds,\n updateSalesOfListings\n );\n\n onPreviewReceived(preview);\n },\n (error) => {\n showErrorDialog('bulkUpdateIsNoFulfillPreview', error, {\n trackErrorData: { filterQueryWithEventIds },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n } else if (isNoFulfill != null) {\n await tryInvokeApi(\n async () => {\n const listingClient = new BulkEditListingClient(\n activeAccountWebClientConfig\n );\n\n const succeeded = await listingClient.bulkUpdateIsNoFulfill(\n preview!.preview,\n updateKey,\n isNoFulfill,\n updateSalesOfListings,\n supportBackgroundProcess\n );\n\n if (!supportBackgroundProcess) {\n if (succeeded) {\n // Invalidate the activePosEntity, so that when clicking on listingDetails\n // we force re-loading the listing and newest pricing settings can be displayed\n setActivePosEntity(0);\n await refreshExpandedListItems();\n }\n\n closeBulkUpdateAutofulfillDialog();\n }\n },\n (error) => {\n showErrorDialog('bulkUpdateIsNoFulfill', error, {\n trackErrorData: { isNoFulfill, preview },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n }\n },\n [\n setIsLoading,\n activeAccountWebClientConfig,\n filterQueryWithEventIds,\n showErrorDialog,\n updateKey,\n closeBulkUpdateAutofulfillDialog,\n setActivePosEntity,\n refreshExpandedListItems,\n ]\n );\n\n const onChangeClick = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n if (event) {\n setListItemExpansion(true, [event.viagVirtualId]);\n }\n\n openBulkUpdateAutoFulfillDialog({\n updateKey,\n onOkay: onSubmit,\n entityType: ActionOutboxEntityType.Listing,\n onClosed: () => {\n setIsLoading(false);\n },\n onCancel: closeBulkUpdateAutofulfillDialog,\n });\n },\n [\n event,\n openBulkUpdateAutoFulfillDialog,\n updateKey,\n onSubmit,\n closeBulkUpdateAutofulfillDialog,\n setListItemExpansion,\n setIsLoading,\n ]\n );\n\n return {\n dropDown: (\n \n ),\n };\n};\n","import { HubConnectionState } from '@microsoft/signalr';\nimport { ComponentProps, useCallback, useRef, useState } from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { BulkEditStatus } from 'src/components/common/BulkActions/BulkEditStatus';\nimport { TicketTypePriorityInput } from 'src/components/common/TicketTypePriorityInput';\nimport { DeliveryTypeSelector } from 'src/components/Selectors/DeliveryTypeSelector';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport {\n BulkEditStage,\n useBulkEditHubContext,\n} from 'src/contexts/BulkEditHubContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { usePurchaseDataContext } from 'src/contexts/PurchaseDataContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { Stack } from 'src/core/ui';\nimport { useBulkEditHub } from 'src/hooks/useBulkEditHub';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n ActionOutboxEntityType,\n BulkActionType,\n BulkEditPreview,\n BulkEditPreviewWithDetails,\n BulkEditProgress,\n BulkEditStep,\n DeliveryType,\n ListingDetails,\n TicketTypeOverride,\n} from 'src/WebApiController';\n\nimport { BulkEditFooter } from '../common/BulkEditFooter';\nimport { BulkEditHeader } from '../common/BulkEditHeader';\n\nexport type BulkEditDeliveryTypeDialogProps = ComponentProps & {\n updateKey: string;\n onOkay: (\n deliveryType: DeliveryType | null,\n ticketTypeRules: TicketTypeOverride | null,\n updateSalesOfListings: boolean,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails,\n retryableEntities?: BulkEditPreview\n ) => void;\n onCancel: () => void;\n entityType:\n | ActionOutboxEntityType.Listing\n | ActionOutboxEntityType.Purchase\n | ActionOutboxEntityType.TicketGroup;\n infoMessage?: React.ReactNode;\n showUpdateAssociatedSalesOption?: boolean;\n};\n\nconst INIT_TICKET_TYPE_RULES = {\n overrides: [\n {\n deliveryType: DeliveryType.InApp,\n ticketTypePriorities: [],\n },\n ],\n};\n\nexport function BulkEditDeliveryTypeDialog({\n updateKey,\n onOkay,\n onCancel,\n entityType,\n infoMessage,\n children,\n showUpdateAssociatedSalesOption = true,\n ...rest\n}: BulkEditDeliveryTypeDialogProps) {\n const { setActivePosEntity } = useActivePosEntityContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n const { refreshData } = usePurchaseDataContext();\n const { setSelectionMode } = useMultiSelectionContext();\n const [isLoading, setIsLoading] = useState(false);\n const {\n setProgress,\n setPreview,\n setMainDialogOpened,\n retryableEntities,\n clearRetryStates,\n } = useBulkEditHubContext();\n\n const onClose = useCallback(\n async (\n newProgress?: BulkEditProgress,\n closeMainDialogForPopover?: boolean\n ) => {\n if (retryableEntities || newProgress?.step === BulkEditStep.Done) {\n if (retryableEntities) {\n clearRetryStates();\n }\n\n setIsRefreshing(true);\n setActivePosEntity(0);\n\n if (refreshData) {\n await refreshData(true);\n }\n if (refreshExpandedListItems) {\n await refreshExpandedListItems();\n }\n setSelectionMode(undefined);\n if (closeMainDialogForPopover) {\n setMainDialogOpened(false);\n } else {\n setProgress(undefined);\n setPreview(undefined);\n }\n setIsRefreshing(false);\n // progress kept to allow the BulkEditStatusPopover to show the result\n }\n onCancel();\n },\n [\n clearRetryStates,\n onCancel,\n refreshData,\n refreshExpandedListItems,\n retryableEntities,\n setActivePosEntity,\n setMainDialogOpened,\n setPreview,\n setProgress,\n setSelectionMode,\n ]\n );\n\n const onBulkEditDone = useCallback(\n async (doneProgress: BulkEditProgress, finalErrors: string[]) => {\n if (finalErrors.length === 0 && doneProgress.step === BulkEditStep.Done) {\n onClose(doneProgress, true);\n }\n },\n [onClose]\n );\n\n const { bulkEditHub, progress, preview, initJob, stage } = useBulkEditHub(\n entityType,\n BulkActionType.UpdateDeliveryType,\n updateKey,\n onBulkEditDone\n );\n\n const hasBackgroundBulkEditFeature =\n bulkEditHub?.state === HubConnectionState.Connected;\n\n const [deliveryType, setDeliveryType] = useState(\n DeliveryType.InApp\n );\n const [ticketTypeRules, setTicketTypeRules] = useState(\n INIT_TICKET_TYPE_RULES\n );\n const [updateSalesOfListings, setUpdateSalesOfListings] = useState(false);\n\n const [isRefreshing, setIsRefreshing] = useState(false);\n\n const onSubmitHandler = useCallback(\n (onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n onOkay(\n null,\n null,\n updateSalesOfListings,\n false,\n onPreviewReceived,\n undefined,\n retryableEntities\n );\n } else {\n onOkay(\n deliveryType,\n ticketTypeRules,\n updateSalesOfListings,\n hasBackgroundBulkEditFeature,\n undefined,\n preview\n );\n }\n setIsLoading(false);\n },\n [\n onOkay,\n updateSalesOfListings,\n retryableEntities,\n deliveryType,\n ticketTypeRules,\n hasBackgroundBulkEditFeature,\n preview,\n ]\n );\n\n const submittButtonRef = useRef(null);\n\n return (\n }\n />\n }\n size={stage === BulkEditStage.Preview ? 'xl' : 'lg'}\n {...rest}\n onOpened={() => {\n setDeliveryType(DeliveryType.InApp);\n setTicketTypeRules(INIT_TICKET_TYPE_RULES);\n setUpdateSalesOfListings(false);\n initJob();\n }}\n onKeyUp={(e) => {\n if (submittButtonRef.current && e.key === 'Enter') {\n submittButtonRef.current.click();\n }\n }}\n onClick={(e) => {\n // This so that this dialog does not cause event to flow to the EventHeader open/close event\n e.stopPropagation();\n e.preventDefault();\n }}\n onClosed={() => {\n setMainDialogOpened(false);\n if (progress) {\n setSelectionMode(undefined);\n }\n // Call the outside one if there is one\n rest.onClosed?.();\n }}\n onExit={() => {\n if (retryableEntities) {\n clearRetryStates();\n }\n rest.onClosed?.();\n }}\n footer={\n \n }\n onCancel={isLoading ? undefined : onCancel}\n >\n \n \n {infoMessage}\n {\n if (newD && newD !== deliveryType) {\n setDeliveryType(newD);\n }\n }}\n />\n\n \n setTicketTypeRules(newRules || INIT_TICKET_TYPE_RULES)\n }\n disabled={isLoading}\n />\n\n {showUpdateAssociatedSalesOption && (\n {\n setUpdateSalesOfListings((prev) => !prev);\n }}\n disabled={isLoading}\n label={}\n />\n )}\n\n {children}\n \n \n \n );\n}\n","import { Content } from 'src/contexts/ContentContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { Stack } from 'src/core/ui';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Feature, Permission } from 'src/WebApiController';\n\nexport const LaunchBulkUpdateDeliveryType = ({\n onClick,\n disabled,\n}: {\n onClick: (e: React.MouseEvent) => void;\n disabled?: boolean;\n}) => {\n const hasPermission = useUserHasAnyOfPermissions(\n Permission.Inventory_ManageSeatSaver,\n Permission.Inventory_ManageSeatSaverCreatedBy\n );\n\n const hasSeatSaverPermission = useUserHasFeature(Feature.SeatSaver);\n\n if (!hasPermission || !hasSeatSaverPermission) {\n return null;\n }\n\n return (\n <>\n \n \n \n \n \n \n );\n};\n","import { useCallback } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { InfoMessage } from 'src/core/POS/MessageWithIcon/InfoMessage';\nimport { BulkEditDeliveryTypeDialog } from 'src/dialogs/BulkEdits/BulkEditDeliveryTypeDialog';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n BulkEditListingClient,\n BulkEditPreviewWithDetails,\n DeliveryType,\n Event,\n ListingQuery,\n TicketTypeOverride,\n} from 'src/WebApiController';\n\nimport { INVENTORY_BULK_UPDATE_DELIVERY_TYPE_UPDATE_KEY } from '../../InventoryActionDropdown.constants';\nimport { LaunchBulkUpdateDeliveryType } from './LaunchBulkUpdateDeliveryType';\n\nexport const useBulkUpdateDeliveryType = (\n filterQuery: ListingQuery,\n setIsLoading: (v: boolean) => void,\n isLoading?: boolean,\n event?: Event\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const updateKey = event\n ? `inventory-delivery-type-event-${event.viagVirtualId}`\n : INVENTORY_BULK_UPDATE_DELIVERY_TYPE_UPDATE_KEY;\n\n const { showErrorDialog } = useErrorBoundaryContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n\n const {\n openDialog: openBulkEditDeliveryTypeDialog,\n closeDialog: closeBulkEditDeliveryTypeDialog,\n } = useDialog(DialogId.BulkEditDeliveryType, BulkEditDeliveryTypeDialog);\n const onSubmit = useCallback(\n async (\n deliveryType: DeliveryType | null,\n tickeTypePriorities: TicketTypeOverride | null,\n _updateSalesOfListings: boolean, // not used\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n await tryInvokeApi(\n async () => {\n const preview = await new BulkEditListingClient(\n activeAccountWebClientConfig\n ).bulkUpdateDeliveryTypePreview(filterQuery);\n\n onPreviewReceived(preview);\n },\n (error) => {\n showErrorDialog('bulkUpdateDeliveryTypePreview', error, {\n trackErrorData: { filterQuery },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n } else if (deliveryType && tickeTypePriorities) {\n await tryInvokeApi(\n async () => {\n const succeeded = await new BulkEditListingClient(\n activeAccountWebClientConfig\n ).bulkUpdateDeliveryType(\n {\n item1: preview!.preview,\n item2: deliveryType,\n item3: tickeTypePriorities.overrides[0].ticketTypePriorities,\n },\n updateKey,\n supportBackgroundProcess\n );\n if (!supportBackgroundProcess) {\n if (succeeded) {\n refreshExpandedListItems();\n }\n\n closeBulkEditDeliveryTypeDialog();\n }\n },\n (error) => {\n showErrorDialog('bulkUpdateDeliveryType', error, {\n trackErrorData: {\n preview,\n deliveryType,\n tickeTypePriorities,\n },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n }\n },\n [\n activeAccountWebClientConfig,\n closeBulkEditDeliveryTypeDialog,\n filterQuery,\n refreshExpandedListItems,\n setIsLoading,\n showErrorDialog,\n updateKey,\n ]\n );\n\n return {\n dropDown: (\n {\n e.preventDefault();\n e.stopPropagation();\n openBulkEditDeliveryTypeDialog({\n header: (\n \n ),\n updateKey,\n onOkay: onSubmit,\n onClosed: () => {\n setIsLoading(false);\n },\n onCancel: closeBulkEditDeliveryTypeDialog,\n entityType: ActionOutboxEntityType.Listing,\n infoMessage: (\n \n }\n />\n ),\n showUpdateAssociatedSalesOption: false, // Placeholder listings don't have allocated sales\n });\n }}\n disabled={isLoading}\n />\n ),\n };\n};\n","import { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { ActionOutboxEntityType, Permission } from 'src/WebApiController';\n\ninterface UseBulkUpdateInternalNotesPermissionsProps {\n entityType:\n | ActionOutboxEntityType.Listing\n | ActionOutboxEntityType.Sale\n | ActionOutboxEntityType.Purchase;\n}\n\ninterface BulkUpdateInternalNotesPermissions {\n hasEditInternalNotesPermissions: boolean;\n}\n\nexport const useBulkUpdateInternalNotesPermissions = ({\n entityType,\n}: UseBulkUpdateInternalNotesPermissionsProps): BulkUpdateInternalNotesPermissions => {\n const hasEditInternalNotesPermissions = useUserHasAnyOfPermissions(\n ...(entityType === ActionOutboxEntityType.Listing\n ? [\n Permission.Inventory_UpdateListingInfo,\n Permission.Inventory_UpdateListingInfoOnIsPricerOf,\n Permission.Inventory_UpdateListingInfoOnPurchasedBy,\n ]\n : entityType === ActionOutboxEntityType.Sale\n ? [\n Permission.Sales_UpdateSalesInfo,\n Permission.Sales_UpdateSalesInfoOnIsFulfillerOf,\n Permission.Sales_UpdateSalesInfoOnIsPricerOf,\n Permission.Sales_UpdateSaleOnPurchasedBy,\n ]\n : [Permission.Purchases_Edit, Permission.Purchases_EditOwned])\n );\n\n return {\n hasEditInternalNotesPermissions,\n };\n};\n","import { useBulkUpdateInternalNotesPermissions } from 'src/components/common/BulkActions/BulkUpdateInternalNotesAction/useBulkUpdateInternalNotesPermissions';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ActionOutboxEntityType, Feature } from 'src/WebApiController';\n\nexport const LaunchBulkUpdateInternalNotes = ({\n onClick,\n disabled,\n entityType,\n}: {\n onClick: (e: React.MouseEvent) => void;\n disabled?: boolean;\n entityType:\n | ActionOutboxEntityType.Listing\n | ActionOutboxEntityType.Sale\n | ActionOutboxEntityType.Purchase;\n}) => {\n const { hasEditInternalNotesPermissions } =\n useBulkUpdateInternalNotesPermissions({\n entityType,\n });\n\n const hasBulkUpdateInternalNotesFeature = useUserHasFeature(\n Feature.BulkUpdateInternalNotes\n );\n\n if (!hasEditInternalNotesPermissions || !hasBulkUpdateInternalNotesFeature) {\n return null;\n }\n\n return (\n \n \n \n );\n};\n","import { HubConnectionState } from '@microsoft/signalr';\nimport { ComponentProps, useCallback, useMemo, useRef, useState } from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { BulkEditStatus } from 'src/components/common/BulkActions/BulkEditStatus';\nimport {\n IPosEntity,\n useActivePosEntityContext,\n} from 'src/contexts/ActivePosEntityContext';\nimport {\n BulkEditStage,\n useBulkEditHubContext,\n} from 'src/contexts/BulkEditHubContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { usePurchaseDataContext } from 'src/contexts/PurchaseDataContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { Radio, RadioGroup, Stack } from 'src/core/ui';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useBulkEditHub } from 'src/hooks/useBulkEditHub';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n BulkActionType,\n BulkEditPreviewWithDetails,\n BulkEditProgress,\n BulkEditStep,\n} from 'src/WebApiController';\n\nimport { BulkEditFooter } from '../common/BulkEditFooter';\nimport { BulkEditHeader } from '../common/BulkEditHeader';\n\nexport type BulkUpdateInternalNotesDialogProps = ComponentProps<\n typeof RSModal\n> & {\n updateKey: string;\n onOkay: (\n isUpdate: boolean | null,\n searchString: string | null,\n replaceString: string | null,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => void;\n onCancel: () => void;\n};\n\nexport function BulkUpdateInternalNotesDialog({\n updateKey,\n onOkay,\n onCancel,\n entityType,\n ...rest\n}: BulkUpdateInternalNotesDialogProps) {\n const { setActivePosEntity } = useActivePosEntityContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n const { refreshData } = usePurchaseDataContext();\n const { setSelectionMode } = useMultiSelectionContext();\n const { setProgress, setPreview, setMainDialogOpened } =\n useBulkEditHubContext();\n const [isLoading, setIsLoading] = useState(false);\n const [updateMode, setUpdateMode] = useState<\n 'searchAndReplace' | 'clearAndOverwrite'\n >('searchAndReplace');\n const [searchString, setSearchString] = useState('');\n const [replaceString, setReplaceString] = useState('');\n\n const onClose = useCallback(\n async (\n newProgress?: BulkEditProgress,\n closeMainDialogForPopover?: boolean\n ) => {\n if (newProgress?.step === BulkEditStep.Done) {\n setIsRefreshing(true);\n setActivePosEntity(0);\n\n // Depending whether it's Listing, Sales, or Purchase\n // the context would be different here\n if (refreshData) {\n await refreshData(true);\n }\n if (refreshExpandedListItems) {\n await refreshExpandedListItems();\n }\n setSelectionMode(undefined);\n if (closeMainDialogForPopover) {\n setMainDialogOpened(false);\n } else {\n setProgress(undefined);\n setPreview(undefined);\n }\n\n setIsRefreshing(false);\n // progress kept to allow the BulkEditStatusPopover to show the result\n }\n onCancel();\n },\n [\n onCancel,\n refreshData,\n refreshExpandedListItems,\n setActivePosEntity,\n setMainDialogOpened,\n setPreview,\n setProgress,\n setSelectionMode,\n ]\n );\n\n const onBulkEditDone = useCallback(\n async (doneProgress: BulkEditProgress, finalErrors: string[]) => {\n if (finalErrors.length === 0 && doneProgress.step === BulkEditStep.Done) {\n onClose(doneProgress, true);\n }\n },\n [onClose]\n );\n\n const { bulkEditHub, progress, preview, initJob, stage } = useBulkEditHub(\n entityType,\n BulkActionType.UpdateInternalNotes,\n updateKey,\n onBulkEditDone\n );\n\n const hasBackgroundBulkEditFeature =\n bulkEditHub?.state === HubConnectionState.Connected;\n\n const alertDialog = useBasicDialog();\n const [isRefreshing, setIsRefreshing] = useState(false);\n\n const isInputValid = useMemo(() => {\n if (updateMode === 'searchAndReplace') {\n return searchString.length > 0 && replaceString.length > 0;\n }\n\n return replaceString.length > 0;\n }, [updateMode, replaceString.length, searchString.length]);\n\n const onSubmitHandler = useCallback(\n (onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void) => {\n if (onPreviewReceived) {\n onOkay(null, null, null, false, onPreviewReceived);\n } else {\n onOkay(\n /* isUpdate */ updateMode === 'clearAndOverwrite',\n searchString,\n replaceString,\n hasBackgroundBulkEditFeature,\n undefined,\n preview\n );\n }\n setIsLoading(false);\n },\n [\n onOkay,\n updateMode,\n searchString,\n replaceString,\n preview,\n hasBackgroundBulkEditFeature,\n ]\n );\n\n const onConfirmDialogOkay = useCallback(() => {\n onOkay(\n /* isUpdate */ updateMode === 'clearAndOverwrite',\n searchString,\n replaceString,\n hasBackgroundBulkEditFeature,\n undefined,\n preview\n );\n\n alertDialog.closeDialog();\n }, [\n alertDialog,\n hasBackgroundBulkEditFeature,\n onOkay,\n preview,\n replaceString,\n searchString,\n updateMode,\n ]);\n\n const submittButtonRef = useRef(null);\n\n return (\n }\n />\n }\n onOpened={() => {\n setUpdateMode('searchAndReplace');\n setSearchString('');\n setReplaceString('');\n initJob();\n }}\n onKeyUp={(e) => {\n if (submittButtonRef.current && e.key === 'Enter' && isInputValid) {\n submittButtonRef.current.click();\n }\n }}\n onClick={(e) => {\n // This so that this dialog does not cause event to flow to the EventHeader open/close event\n e.stopPropagation();\n e.preventDefault();\n }}\n onClosed={() => {\n setMainDialogOpened(false);\n if (progress) {\n setSelectionMode(undefined);\n }\n // Call the outside one if there is one\n rest.onClosed?.();\n }}\n footer={\n \n }\n onCancel={isLoading ? undefined : onCancel}\n >\n \n \n }>\n {\n setUpdateMode(value);\n }}\n value={updateMode}\n >\n \n }\n />\n }\n />\n \n \n \n\n {updateMode === 'searchAndReplace' && (\n }>\n setSearchString(v.target.value)}\n />\n \n )}\n\n \n }\n >\n setReplaceString(v.target.value)}\n />\n \n \n \n \n );\n}\n","import { useCallback } from 'react';\nimport { LaunchBulkUpdateInternalNotes } from 'src/components/common/BulkActions/BulkUpdateInternalNotesAction';\nimport {\n IPosEntity,\n useActivePosEntityContext,\n} from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { BulkUpdateInternalNotesDialog } from 'src/dialogs/BulkEdits/BulkUpdateInternalNotesDialog';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n BulkEditListingClient,\n BulkEditPreviewWithDetails,\n Event,\n ListingQuery,\n} from 'src/WebApiController';\n\nimport { INVENTORY_BULK_UPDATE_INTERNAL_NOTES_UPDATE_KEY } from '../../InventoryActionDropdown.constants';\n\nexport const useBulkUpdateInternalNotesAction = (\n filterQueryWithEventIds: ListingQuery,\n setIsLoading: (v: boolean) => void,\n isLoading?: boolean,\n event?: Event\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { setActivePosEntity } = useActivePosEntityContext();\n const updateKey = event\n ? `listing-internal-notes-event-${event.viagVirtualId}`\n : INVENTORY_BULK_UPDATE_INTERNAL_NOTES_UPDATE_KEY;\n const {\n eventsExpansion: { setListItemExpansion, refreshExpandedListItems },\n } = useCatalogDataContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const {\n openDialog: openBulkUpdateInternalNotesDialog,\n closeDialog: closeBulkUpdateInternalNotesDialog,\n } = useDialog(\n DialogId.BulkUpdateInternalNotes,\n BulkUpdateInternalNotesDialog\n );\n\n const onSubmit = useCallback(\n async (\n isUpdate: boolean | null,\n searchString: string | null,\n replaceString: string | null,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n await tryInvokeApi(\n async () => {\n const preview = await new BulkEditListingClient(\n activeAccountWebClientConfig\n ).bulkUpdateInternalNotesPreview(filterQueryWithEventIds);\n\n onPreviewReceived(preview);\n },\n (error) => {\n showErrorDialog('bulkUpdateInternalNotesPreview', error, {\n trackErrorData: { filterQueryWithEventIds },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n } else if (\n isUpdate != null &&\n searchString != null &&\n replaceString != null\n ) {\n await tryInvokeApi(\n async () => {\n const listingClient = new BulkEditListingClient(\n activeAccountWebClientConfig\n );\n\n const succeeded = await listingClient.bulkUpdateInternalNotes(\n preview!.preview,\n updateKey,\n isUpdate,\n searchString,\n replaceString,\n supportBackgroundProcess\n );\n\n if (!supportBackgroundProcess) {\n if (succeeded) {\n // Invalidate the activePosEntity, so that when clicking on listingDetails\n // we force re-loading the listing and newest pricing settings can be displayed\n setActivePosEntity(0);\n await refreshExpandedListItems();\n }\n\n closeBulkUpdateInternalNotesDialog();\n }\n },\n (error) => {\n showErrorDialog('bulkUpdateInternalNotes', error, {\n trackErrorData: {\n isUpdate,\n searchString,\n replaceString,\n preview,\n },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n }\n },\n [\n setIsLoading,\n activeAccountWebClientConfig,\n filterQueryWithEventIds,\n showErrorDialog,\n updateKey,\n closeBulkUpdateInternalNotesDialog,\n setActivePosEntity,\n refreshExpandedListItems,\n ]\n );\n\n const onChangeClick = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n if (event) {\n setListItemExpansion(true, [event.viagVirtualId]);\n }\n\n openBulkUpdateInternalNotesDialog({\n updateKey,\n onOkay: onSubmit,\n entityType: ActionOutboxEntityType.Listing,\n onClosed: () => {\n setIsLoading(false);\n },\n onCancel: closeBulkUpdateInternalNotesDialog,\n });\n },\n [\n closeBulkUpdateInternalNotesDialog,\n event,\n onSubmit,\n openBulkUpdateInternalNotesDialog,\n setIsLoading,\n setListItemExpansion,\n updateKey,\n ]\n );\n\n return {\n dropDown: (\n \n ),\n };\n};\n","import { HubConnectionState } from '@microsoft/signalr';\nimport {\n ComponentProps,\n CSSProperties,\n useCallback,\n useRef,\n useState,\n} from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { BulkEditStatus } from 'src/components/common/BulkActions/BulkEditStatus';\nimport { ListingNoteSelectionInput } from 'src/components/Input/ListingNoteSelectionInput';\nimport {\n IPosEntity,\n useActivePosEntityContext,\n} from 'src/contexts/ActivePosEntityContext';\nimport {\n BulkEditStage,\n useBulkEditHubContext,\n} from 'src/contexts/BulkEditHubContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { usePurchaseDataContext } from 'src/contexts/PurchaseDataContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { InfoMessage } from 'src/core/POS/MessageWithIcon/InfoMessage';\nimport { vars } from 'src/core/themes';\nimport { Radio, RadioGroup, Stack } from 'src/core/ui';\nimport { useBulkEditHub } from 'src/hooks/useBulkEditHub';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n ActionOutboxEntityType,\n BulkActionType,\n BulkEditPreviewWithDetails,\n BulkEditProgress,\n BulkEditStep,\n ListingNote,\n} from 'src/WebApiController';\n\nimport { BulkEditFooter } from '../common/BulkEditFooter';\nimport { BulkEditHeader } from '../common/BulkEditHeader';\n\nconst radioInfoMessageStyle: CSSProperties = {\n marginLeft: vars.spacing.xxs,\n};\n\nexport type BulkEditSeatTraitsDialogProps = ComponentProps & {\n updateKey: string;\n isLoading?: boolean;\n onOkay: (\n seatTraits: ListingNote[] | null,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails,\n appendSeatTraits?: boolean\n ) => void;\n onCancel: () => void;\n entityType:\n | ActionOutboxEntityType.Listing\n | ActionOutboxEntityType.Purchase\n | ActionOutboxEntityType.TicketGroup;\n infoMessage?: React.ReactNode;\n};\n\nexport function BulkEditSeatTraitsDialog({\n updateKey,\n onOkay,\n onCancel,\n entityType,\n infoMessage,\n ...rest\n}: BulkEditSeatTraitsDialogProps) {\n const { setActivePosEntity } = useActivePosEntityContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n const { refreshData } = usePurchaseDataContext();\n const { setSelectionMode } = useMultiSelectionContext();\n const { setProgress, setPreview, setMainDialogOpened } =\n useBulkEditHubContext();\n const [isLoading, setIsLoading] = useState(false);\n const [appendSeatTraits, setAppendSeatTraits] = useState(false);\n\n const onClose = useCallback(\n async (\n newProgress?: BulkEditProgress,\n closeMainDialogForPopover?: boolean\n ) => {\n if (newProgress?.step === BulkEditStep.Done) {\n setIsRefreshing(true);\n setActivePosEntity(0);\n\n if (refreshData) {\n await refreshData(true);\n }\n if (refreshExpandedListItems) {\n await refreshExpandedListItems();\n }\n setSelectionMode(undefined);\n if (closeMainDialogForPopover) {\n setMainDialogOpened(false);\n } else {\n setProgress(undefined);\n setPreview(undefined);\n }\n setIsRefreshing(false);\n // progress kept to allow the BulkEditStatusPopover to show the result\n }\n onCancel();\n },\n [\n onCancel,\n refreshData,\n refreshExpandedListItems,\n setActivePosEntity,\n setMainDialogOpened,\n setPreview,\n setProgress,\n setSelectionMode,\n ]\n );\n\n const onBulkEditDone = useCallback(\n async (doneProgress: BulkEditProgress, finalErrors: string[]) => {\n if (finalErrors.length === 0 && doneProgress.step === BulkEditStep.Done) {\n onClose(doneProgress, true);\n }\n },\n [onClose]\n );\n\n const { bulkEditHub, progress, preview, initJob, stage } = useBulkEditHub(\n entityType,\n BulkActionType.UpdateSeatTraits,\n updateKey,\n onBulkEditDone\n );\n\n const hasBackgroundBulkEditFeature =\n bulkEditHub?.state === HubConnectionState.Connected;\n\n const [seatTraits, setSeatTraits] = useState([]);\n\n const [isRefreshing, setIsRefreshing] = useState(false);\n\n const onSubmitHandler = useCallback(\n (onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void) => {\n if (onPreviewReceived) {\n setIsLoading(true);\n\n onOkay(null, false, onPreviewReceived);\n setIsLoading(false);\n } else {\n onOkay(\n seatTraits,\n hasBackgroundBulkEditFeature,\n undefined,\n preview,\n appendSeatTraits\n );\n }\n },\n [\n onOkay,\n appendSeatTraits,\n seatTraits,\n hasBackgroundBulkEditFeature,\n preview,\n ]\n );\n const submitButtonRef = useRef(null);\n\n return (\n }\n />\n }\n {...rest}\n onKeyUp={(e) => {\n if (submitButtonRef.current && e.key === 'Enter') {\n submitButtonRef.current.click();\n }\n }}\n onOpened={() => {\n setSeatTraits([]);\n initJob();\n }}\n onClick={(e) => {\n // This so that this dialog does not cause event to flow to the EventHeader open/close event\n e.stopPropagation();\n e.preventDefault();\n }}\n onClosed={() => {\n setMainDialogOpened(false);\n if (progress) {\n setSelectionMode(undefined);\n }\n // Call the outside one if there is one\n rest.onClosed?.();\n }}\n footer={\n \n }\n onCancel={isLoading ? undefined : onCancel}\n >\n \n \n {infoMessage}\n {\n setAppendSeatTraits(value === 'true');\n }}\n value={appendSeatTraits.toString()}\n >\n \n \n }\n />\n \n }\n iconSize={vars.iconSize.s}\n />\n \n \n \n }\n />\n \n }\n iconSize={vars.iconSize.s}\n />\n \n \n \n\n \n {seatTraits && seatTraits.length === 0 && (\n \n }\n />\n )}\n \n \n \n );\n}\n","import { Content } from 'src/contexts/ContentContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { Stack } from 'src/core/ui';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Feature, Permission } from 'src/WebApiController';\n\nexport const LaunchBulkUpdateSeatTraits = ({\n onClick,\n disabled,\n}: {\n onClick: (e: React.MouseEvent) => void;\n disabled?: boolean;\n}) => {\n const hasPermission = useUserHasAnyOfPermissions(\n Permission.Inventory_ManageSeatSaver,\n Permission.Inventory_ManageSeatSaverCreatedBy\n );\n\n const hasSeatSaverPermission = useUserHasFeature(Feature.SeatSaver);\n\n if (!hasPermission || !hasSeatSaverPermission) {\n return null;\n }\n return (\n <>\n \n \n \n \n \n \n );\n};\n","import { useCallback } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext/Content';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { InfoMessage } from 'src/core/POS/MessageWithIcon/InfoMessage';\nimport { BulkEditSeatTraitsDialog } from 'src/dialogs/BulkEdits/BulkEditSeatTraitsDialog';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n BulkEditListingClient,\n BulkEditPreviewWithDetails,\n Event,\n ListingNote,\n ListingQuery,\n} from 'src/WebApiController';\n\nimport { INVENTORY_BULK_UPDATE_SEAT_TRAITS_UPDATE_KEY } from '../../InventoryActionDropdown.constants';\nimport { LaunchBulkUpdateSeatTraits } from './LaunchBulkUpdateSeatTraits';\n\nexport const useBulkUpdateSeatTraits = (\n filterQuery: ListingQuery,\n setIsLoading: (v: boolean) => void,\n isLoading?: boolean,\n event?: Event\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const updateKey = event\n ? `inventory-seat-traits-event-${event.viagVirtualId}`\n : INVENTORY_BULK_UPDATE_SEAT_TRAITS_UPDATE_KEY;\n\n const { showErrorDialog } = useErrorBoundaryContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n\n const {\n openDialog: openBulkEditSeatTraitsDialog,\n closeDialog: closeBulkEditSeatTraitsDialog,\n } = useDialog(DialogId.BulkEditSeatTraits, BulkEditSeatTraitsDialog);\n\n const onSubmit = useCallback(\n async (\n seatTraits: ListingNote[] | null,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails,\n appendSeatTraits?: boolean\n ) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n await tryInvokeApi(\n async () => {\n const bulkEditClient = new BulkEditListingClient(\n activeAccountWebClientConfig\n );\n\n const preview =\n await bulkEditClient.bulkUpdateSeatTraitsPreview(filterQuery);\n\n onPreviewReceived(preview);\n },\n (error) => {\n showErrorDialog('bulkUpdateTagsPreview', error, {\n trackErrorData: { filterQuery },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n } else if (seatTraits) {\n await tryInvokeApi(\n async () => {\n const succeeded = await new BulkEditListingClient(\n activeAccountWebClientConfig\n ).bulkUpdateSeatTraits(\n {\n item1: preview!.preview,\n item2: seatTraits,\n },\n updateKey,\n supportBackgroundProcess,\n appendSeatTraits\n );\n if (!supportBackgroundProcess) {\n if (succeeded) {\n refreshExpandedListItems();\n }\n\n closeBulkEditSeatTraitsDialog();\n }\n },\n (error) => {\n showErrorDialog('bulkUpdateSeatTraits', error, {\n trackErrorData: {\n preview,\n seatTraits,\n },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n }\n },\n [\n activeAccountWebClientConfig,\n closeBulkEditSeatTraitsDialog,\n filterQuery,\n refreshExpandedListItems,\n setIsLoading,\n showErrorDialog,\n updateKey,\n ]\n );\n\n return {\n dropDown: (\n {\n e.preventDefault();\n e.stopPropagation();\n openBulkEditSeatTraitsDialog({\n header: ,\n updateKey,\n isLoading,\n onOkay: onSubmit,\n onClosed: () => {\n setIsLoading(false);\n },\n onCancel: closeBulkEditSeatTraitsDialog,\n entityType: ActionOutboxEntityType.Listing,\n infoMessage: (\n \n }\n />\n ),\n });\n }}\n disabled={isLoading}\n />\n ),\n };\n};\n","import { Content } from 'src/contexts/ContentContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Feature } from 'src/WebApiController';\n\nexport const LaunchBulkWasteTickets = ({\n onClick,\n disabled,\n}: {\n onClick: (e: React.MouseEvent) => void;\n disabled?: boolean;\n}) => {\n const canBulkWasteTickets = useUserHasFeature(Feature.BulkWasteTickets);\n\n if (!canBulkWasteTickets) {\n return null;\n }\n\n return (\n \n \n \n );\n};\n","import { HubConnectionState } from '@microsoft/signalr';\nimport { ComponentProps, useCallback, useMemo, useRef, useState } from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { BulkEditStatus } from 'src/components/common/BulkActions/BulkEditStatus';\nimport {\n IPosEntity,\n useActivePosEntityContext,\n} from 'src/contexts/ActivePosEntityContext';\nimport {\n BulkEditStage,\n useBulkEditHubContext,\n} from 'src/contexts/BulkEditHubContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { Stack } from 'src/core/ui';\nimport { useBulkEditHub } from 'src/hooks/useBulkEditHub';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n ActionOutboxEntityType,\n BulkActionType,\n BulkEditPreviewWithDetails,\n BulkEditProgress,\n BulkEditStep,\n} from 'src/WebApiController';\n\nimport { BulkEditFooter } from '../common/BulkEditFooter';\nimport { BulkEditHeader } from '../common/BulkEditHeader';\n\nexport type BulkWasteTicketsDialogProps = ComponentProps & {\n updateKey: string;\n onOkay: (\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => void;\n onCancel: () => void;\n};\n\nexport function BulkWasteTicketsDialog({\n updateKey,\n onOkay,\n onCancel,\n ...rest\n}: BulkWasteTicketsDialogProps) {\n const entityType = ActionOutboxEntityType.Listing;\n\n const { setActivePosEntity } = useActivePosEntityContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n const { setSelectionMode } = useMultiSelectionContext();\n const { setProgress, setPreview, setMainDialogOpened } =\n useBulkEditHubContext();\n const [isLoading, setIsLoading] = useState(false);\n\n const onClose = useCallback(\n async (\n newProgress?: BulkEditProgress,\n closeMainDialogForPopover?: boolean\n ) => {\n if (newProgress?.step === BulkEditStep.Done) {\n setIsRefreshing(true);\n setActivePosEntity(0);\n\n if (refreshExpandedListItems) {\n await refreshExpandedListItems();\n }\n setSelectionMode(undefined);\n if (closeMainDialogForPopover) {\n setMainDialogOpened(false);\n } else {\n setProgress(undefined);\n setPreview(undefined);\n }\n setIsRefreshing(false);\n // progress kept to allow the BulkEditStatusPopover to show the result\n }\n onCancel();\n },\n [\n onCancel,\n refreshExpandedListItems,\n setActivePosEntity,\n setMainDialogOpened,\n setPreview,\n setProgress,\n setSelectionMode,\n ]\n );\n\n const onBulkEditDone = useCallback(\n async (doneProgress: BulkEditProgress, finalErrors: string[]) => {\n if (finalErrors.length === 0 && doneProgress.step === BulkEditStep.Done) {\n onClose(doneProgress, true);\n }\n },\n [onClose]\n );\n\n const { bulkEditHub, progress, preview, initJob, stage } = useBulkEditHub(\n entityType,\n BulkActionType.WasteTickets,\n updateKey,\n onBulkEditDone\n );\n\n const hasBackgroundBulkEditFeature = useMemo(\n () => bulkEditHub?.state === HubConnectionState.Connected,\n [bulkEditHub?.state]\n );\n\n const onSubmitHandler = useCallback(\n (onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n onOkay(false, onPreviewReceived);\n } else {\n onOkay(hasBackgroundBulkEditFeature, undefined, preview);\n }\n setIsLoading(false);\n },\n [hasBackgroundBulkEditFeature, onOkay, preview]\n );\n\n const [isRefreshing, setIsRefreshing] = useState(false);\n\n const submitButtonRef = useRef(null);\n\n return (\n }\n />\n }\n onOpened={initJob}\n onClick={(e) => {\n // This so that this dialog does not cause event to flow to the EventHeader open/close event\n e.stopPropagation();\n e.preventDefault();\n }}\n onClosed={() => {\n setMainDialogOpened(false);\n if (progress) {\n setSelectionMode(undefined);\n }\n // Call the outside one if there is one\n rest.onClosed?.();\n }}\n footer={\n \n }\n onCancel={isLoading ? undefined : onCancel}\n >\n \n \n \n \n \n \n );\n}\n","import { useCallback } from 'react';\nimport { LaunchBulkWasteTickets } from 'src/components/Listings/InventoryActionDropdown/components/BulkWasteTicketsAction/LaunchBulkWasteTickets';\nimport {\n IPosEntity,\n useActivePosEntityContext,\n} from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { BulkWasteTicketsDialog } from 'src/dialogs/BulkEdits/BulkWasteTicketsDialog';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n BulkEditListingClient,\n BulkEditPreviewWithDetails,\n Event,\n ListingQuery,\n} from 'src/WebApiController';\n\nimport { INVENTORY_BULK_WASTE_TICKETS_KEY } from '../../InventoryActionDropdown.constants';\n\nexport const useBulkWasteTicketsAction = (\n filterQueryWithEventIds: ListingQuery,\n setIsLoading: (v: boolean) => void,\n isLoading?: boolean,\n event?: Event\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { setActivePosEntity } = useActivePosEntityContext();\n const updateKey = event\n ? `wasteTickets-event-${event.viagVirtualId}`\n : INVENTORY_BULK_WASTE_TICKETS_KEY;\n const {\n eventsExpansion: { setListItemExpansion, refreshExpandedListItems },\n } = useCatalogDataContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const {\n openDialog: openBulkWasteTicketsDialog,\n closeDialog: closeBulkWasteTicketsDialog,\n } = useDialog(DialogId.BulkWasteTickets, BulkWasteTicketsDialog);\n\n const onSubmit = useCallback(\n async (\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n await tryInvokeApi(\n async () => {\n const preview = await new BulkEditListingClient(\n activeAccountWebClientConfig\n ).bulkWasteTicketsPreview(filterQueryWithEventIds);\n\n onPreviewReceived(preview);\n },\n (error) => {\n showErrorDialog('bulkWasteTicketsPreview', error, {\n trackErrorData: { filterQueryWithEventIds },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n } else {\n await tryInvokeApi(\n async () => {\n const succeeded = await new BulkEditListingClient(\n activeAccountWebClientConfig\n ).bulkWasteTickets(\n preview!.preview,\n updateKey,\n supportBackgroundProcess\n );\n\n if (!supportBackgroundProcess) {\n if (succeeded) {\n // Invalidate the activePosEntity, so that when clicking on listingDetails\n // we force re-loading the listing and newest pricing settings can be displayed\n setActivePosEntity(0);\n await refreshExpandedListItems();\n }\n\n closeBulkWasteTicketsDialog();\n }\n },\n (error) => {\n showErrorDialog('onSubmitWasteTickets', error, {\n trackErrorData: { preview },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n }\n },\n [\n setIsLoading,\n activeAccountWebClientConfig,\n filterQueryWithEventIds,\n showErrorDialog,\n updateKey,\n closeBulkWasteTicketsDialog,\n setActivePosEntity,\n refreshExpandedListItems,\n ]\n );\n\n const onLaunchAction = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n if (event) {\n setListItemExpansion(true, [event.viagVirtualId]);\n }\n openBulkWasteTicketsDialog({\n updateKey,\n onOkay: onSubmit,\n onClosed: () => {\n setIsLoading(false);\n },\n onCancel: closeBulkWasteTicketsDialog,\n });\n },\n [\n closeBulkWasteTicketsDialog,\n event,\n onSubmit,\n openBulkWasteTicketsDialog,\n setIsLoading,\n setListItemExpansion,\n updateKey,\n ]\n );\n\n return {\n dropDown: (\n \n ),\n };\n};\n","/* eslint-disable react-hooks/exhaustive-deps */\nimport { HubConnectionState } from '@microsoft/signalr';\nimport { ComponentProps, useCallback, useMemo, useRef, useState } from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { BulkEditStatus } from 'src/components/common/BulkActions/BulkEditStatus';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport {\n BulkEditStage,\n useBulkEditHubContext,\n} from 'src/contexts/BulkEditHubContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { InfoMessage } from 'src/core/POS/MessageWithIcon/InfoMessage';\nimport { Stack } from 'src/core/ui';\nimport { useBulkEditHub } from 'src/hooks/useBulkEditHub';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n ActionOutboxEntityType,\n BulkActionType,\n BulkEditPreviewWithDetails,\n BulkEditProgress,\n BulkEditStep,\n} from 'src/WebApiController';\n\nimport { BulkEditFooter } from '../common/BulkEditFooter';\nimport { BulkEditHeader } from '../common/BulkEditHeader';\n\nexport type BulkDeleteSeatSaversDialogProps = ComponentProps & {\n updateKey: string;\n onOkay: (\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => void;\n onCancel: () => void;\n};\n\nexport const BulkDeleteSeatSaversDialog = ({\n updateKey,\n onOkay,\n onCancel,\n ...rest\n}: BulkDeleteSeatSaversDialogProps) => {\n const { setActivePosEntity } = useActivePosEntityContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n const { setSelectionMode } = useMultiSelectionContext();\n const { setProgress, setPreview, setMainDialogOpened } =\n useBulkEditHubContext();\n\n const [isLoading, setIsLoading] = useState(false);\n\n const onClose = useCallback(\n async (\n newProgress?: BulkEditProgress,\n closeMainDialogForPopover?: boolean\n ) => {\n if (newProgress?.step === BulkEditStep.Done) {\n setIsRefreshing(true);\n setActivePosEntity(0);\n await refreshExpandedListItems();\n setSelectionMode(undefined);\n if (closeMainDialogForPopover) {\n setMainDialogOpened(false);\n } else {\n setProgress(undefined);\n setPreview(undefined);\n }\n setIsRefreshing(false);\n // progress kept to allow the BulkEditStatusPopover to show the result\n }\n onCancel?.();\n },\n [\n onCancel,\n refreshExpandedListItems,\n setActivePosEntity,\n setMainDialogOpened,\n setPreview,\n setProgress,\n setSelectionMode,\n ]\n );\n\n const onBulkEditDone = useCallback(\n async (doneProgress: BulkEditProgress, finalErrors: string[]) => {\n if (finalErrors.length === 0 && doneProgress.step === BulkEditStep.Done) {\n onClose(doneProgress, true);\n }\n },\n [onClose]\n );\n\n const { bulkEditHub, progress, preview, initJob, stage } = useBulkEditHub(\n ActionOutboxEntityType.Listing,\n BulkActionType.DeleteSeatSavers,\n updateKey,\n onBulkEditDone\n );\n\n const hasBackgroundBulkEditFeature = useMemo(\n () => bulkEditHub?.state === HubConnectionState.Connected,\n [bulkEditHub?.state]\n );\n\n const onSubmitHandler = useCallback(\n (onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n onOkay(false, onPreviewReceived);\n } else {\n onOkay(hasBackgroundBulkEditFeature, undefined, preview);\n }\n setIsLoading(false);\n },\n [onOkay, preview, hasBackgroundBulkEditFeature]\n );\n\n const [isRefreshing, setIsRefreshing] = useState(false);\n const submittButtonRef = useRef(null);\n\n return (\n }\n />\n }\n onOpened={initJob}\n onKeyUp={(e) => {\n if (submittButtonRef.current && e.key === 'Enter') {\n submittButtonRef.current.click();\n }\n }}\n onClick={(e) => {\n // This so that this dialog does not cause event to flow to the EventHeader open/close event\n e.stopPropagation();\n e.preventDefault();\n }}\n onClosed={() => {\n setMainDialogOpened(false);\n if (progress) {\n setSelectionMode(undefined);\n }\n // Call the outside one if there is one\n rest.onClosed?.();\n }}\n footer={\n \n }\n onCancel={isLoading ? undefined : onCancel}\n >\n \n \n \n \n \n }\n />\n \n \n \n );\n};\n","import { Content } from 'src/contexts/ContentContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { Stack } from 'src/core/ui';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Feature, Permission } from 'src/WebApiController';\n\nexport const LaunchDeleteSeatSavers = ({\n onClick,\n disabled,\n}: {\n onClick: (e: React.MouseEvent) => void;\n disabled?: boolean;\n}) => {\n const hasPermission = useUserHasAnyOfPermissions(\n Permission.Inventory_ManageSeatSaver,\n Permission.Inventory_ManageSeatSaverCreatedBy\n );\n const hasSeatSaverFeature = useUserHasFeature(Feature.SeatSaver);\n\n if (!hasPermission || !hasSeatSaverFeature) {\n return null;\n }\n\n return (\n <>\n \n \n \n \n \n \n );\n};\n","import { useCallback } from 'react';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { BulkDeleteSeatSaversDialog } from 'src/dialogs/BulkEdits/BulkDeleteSeatSaversDialog';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n BulkEditListingClient,\n BulkEditPreviewWithDetails,\n Event,\n ListingQuery,\n} from 'src/WebApiController';\n\nimport { INVENTORY_BULK_DELETE_SEAT_SAVERS_UPDATE_KEY } from '../../InventoryActionDropdown.constants';\nimport { LaunchDeleteSeatSavers } from './LaunchDeleteSeatSavers';\n\nexport const useBulkDeleteSeatSavers = (\n filterQueryWithEventIds: ListingQuery,\n setIsLoading: (v: boolean) => void,\n isLoading?: boolean,\n event?: Event\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { setActivePosEntity } = useActivePosEntityContext();\n\n const updateKey = event\n ? `inventory-delete-seat-savers-event-${event.viagVirtualId}`\n : INVENTORY_BULK_DELETE_SEAT_SAVERS_UPDATE_KEY;\n\n const {\n refreshCatalog,\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const {\n openDialog: openBulkDeleteSeatSavers,\n closeDialog: closeBulkDeleteSeatSavers,\n } = useDialog(DialogId.BulkDeleteSeatSeavers, BulkDeleteSeatSaversDialog);\n\n const onSubmitDeleteSeatSavers = useCallback(\n async (\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => {\n const client = new BulkEditListingClient(activeAccountWebClientConfig);\n setIsLoading(true);\n if (onPreviewReceived) {\n await tryInvokeApi(\n async () => {\n const preview = await client.bulkDeleteSeatSaversPreview(\n filterQueryWithEventIds\n );\n\n onPreviewReceived(preview);\n },\n (error) => {\n showErrorDialog('bulkDeleteSeatSaversPreview', error, {\n trackErrorData: { filterQueryWithEventIds },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n } else {\n await tryInvokeApi(\n async () => {\n const succeeded = await client.bulkDeleteSeatSavers(\n preview!.preview,\n updateKey,\n supportBackgroundProcess\n );\n\n if (!supportBackgroundProcess) {\n if (succeeded) {\n // Because delete listings can result in an empty event - so we need to reget catalog\n await refreshCatalog();\n\n setActivePosEntity(0);\n await refreshExpandedListItems();\n }\n closeBulkDeleteSeatSavers();\n }\n },\n (error) => {\n showErrorDialog('onSubmitDeleteSeatSavers', error, {\n trackErrorData: { preview, event },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n }\n },\n [\n activeAccountWebClientConfig,\n closeBulkDeleteSeatSavers,\n event,\n filterQueryWithEventIds,\n refreshCatalog,\n refreshExpandedListItems,\n setActivePosEntity,\n setIsLoading,\n showErrorDialog,\n updateKey,\n ]\n );\n\n return {\n dropDown: (\n {\n e.preventDefault();\n e.stopPropagation();\n openBulkDeleteSeatSavers({\n updateKey,\n onOkay: onSubmitDeleteSeatSavers,\n onClosed: () => {\n setIsLoading(false);\n },\n onCancel: closeBulkDeleteSeatSavers,\n });\n }}\n disabled={isLoading}\n />\n ),\n };\n};\n","import { useState } from 'react';\nimport { ExportInventoryButton } from 'src/components/Buttons/ExportInventoryButton';\nimport { useBulkActionsState } from 'src/components/common/BulkActions/useBulkActionsState';\nimport { useInventoryEventBulkActionsState } from 'src/components/Events/EventListing/InventoryEventListing/BulkActions/InventoryEventBulkActions/useInventoryEventBulkActionsState';\nimport { useBulkChangeEventAction } from 'src/components/Listings/InventoryActionDropdown/components/BulkChangeEventAction';\nimport { useBulkChangeTicketTypeRuleAction } from 'src/components/Listings/InventoryActionDropdown/components/BulkChangeTicketTypeRuleAction';\nimport { useBulkEditCommissionAction } from 'src/components/Listings/InventoryActionDropdown/components/BulkEditCommissionAction/useBulkEditCommissionAction';\nimport { useBulkEditMarketplaceSeatingAction } from 'src/components/Listings/InventoryActionDropdown/components/BulkEditMarketplaceSeating';\nimport { useBulkRemovePredelivery } from 'src/components/Listings/InventoryActionDropdown/components/BulkRemovePredeliveryAction';\nimport { useBulkUpdateAutoFulfillAction } from 'src/components/Listings/InventoryActionDropdown/components/BulkUpdateAutoFulfillAction';\nimport { useBulkUpdateDeliveryType } from 'src/components/Listings/InventoryActionDropdown/components/BulkUpdateDeliveryType';\nimport { useBulkUpdateInternalNotesAction } from 'src/components/Listings/InventoryActionDropdown/components/BulkUpdateInternalNotesAction';\nimport { useBulkUpdateListingSettings } from 'src/components/Listings/InventoryActionDropdown/components/BulkUpdateListingSettingsAction';\nimport { useBulkUpdateSeatTraits } from 'src/components/Listings/InventoryActionDropdown/components/BulkUpdateSeatTraits';\nimport { useBulkWasteTicketsAction } from 'src/components/Listings/InventoryActionDropdown/components/BulkWasteTicketsAction';\nimport { useBulkDeleteSeatSavers } from 'src/components/Listings/InventoryActionDropdown/components/LaunchDeleteSeatSaversAction';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosDropdown, PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ChevronDownIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { EventWithData, Feature } from 'src/WebApiController';\n\ninterface SettingsActionsProps {\n event: EventWithData['event'];\n\n isEventPage?: boolean;\n}\n\nexport const SettingsActions = ({\n event,\n isEventPage,\n}: SettingsActionsProps) => {\n const { areBulkActionsEnabled } = useBulkActionsState();\n const hasExportInventoryFeature = useUserHasFeature(Feature.ExportInventory);\n const [isLoading, setIsLoading] = useState(false);\n const { affectedVisibleListingIds, filterQueryWithEventIds } =\n useInventoryEventBulkActionsState(event);\n\n const bulkEditGeneralSettings = useBulkUpdateListingSettings(\n 'general',\n filterQueryWithEventIds,\n affectedVisibleListingIds,\n setIsLoading,\n isLoading,\n event\n );\n\n const bulkUpdateInternalNotes = useBulkUpdateInternalNotesAction(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n event\n );\n\n const bulkUpdateAutoFulfill = useBulkUpdateAutoFulfillAction(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n event\n );\n\n const bulkRemovePredelivery = useBulkRemovePredelivery(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n event\n );\n\n const bulkChangeEvent = useBulkChangeEventAction(\n event,\n affectedVisibleListingIds,\n setIsLoading,\n isLoading\n );\n\n const bulkDeleteSeatSavers = useBulkDeleteSeatSavers(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n event\n );\n const bulkEditDeliverType = useBulkUpdateDeliveryType(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n event\n );\n const bulkEditSeatTraits = useBulkUpdateSeatTraits(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n event\n );\n\n const bulkChangeTicketTypeRule = useBulkChangeTicketTypeRuleAction(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n event\n );\n\n const bulkEditMarketplaceSeating = useBulkEditMarketplaceSeatingAction(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n event\n );\n\n const bulkEditCommissionAction = useBulkEditCommissionAction(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n event\n );\n const bulkWasteTicketsAction = useBulkWasteTicketsAction(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n event\n );\n\n return (\n <>\n \n \n \n \n }\n align=\"start\"\n triggerProps={{ disabled: isLoading || !areBulkActionsEnabled }}\n >\n {bulkEditGeneralSettings.dropDown}\n {bulkUpdateInternalNotes.dropDown}\n {bulkUpdateAutoFulfill.dropDown}\n {bulkRemovePredelivery.dropDown}\n {bulkChangeEvent.dropDown}\n {bulkDeleteSeatSavers.dropDown}\n {bulkEditDeliverType.dropDown}\n {bulkEditSeatTraits.dropDown}\n {bulkChangeTicketTypeRule.dropDown}\n {bulkEditMarketplaceSeating.dropDown}\n {bulkEditCommissionAction.dropDown}\n {hasExportInventoryFeature && isEventPage && (\n \n \n \n )}\n {bulkWasteTicketsAction.dropDown}\n \n {bulkChangeEvent.dialog}\n \n );\n};\n","import { useTagsForEntityType } from 'src/hooks/useTagsForEntityType';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { ActionOutboxEntityType, Permission } from 'src/WebApiController';\n\ninterface UseBulkEditTagsPermissionsProps {\n entityType:\n | ActionOutboxEntityType.Listing\n | ActionOutboxEntityType.Sale\n | ActionOutboxEntityType.Purchase;\n}\n\ninterface BulkEditTagsPermissions {\n hasEditTagsPermissions: boolean;\n}\n\nexport const useBulkEditTagsPermissions = ({\n entityType,\n}: UseBulkEditTagsPermissionsProps): BulkEditTagsPermissions => {\n const hasEditTagsPermission = useUserHasAnyOfPermissions(\n ...(entityType === ActionOutboxEntityType.Listing\n ? [\n Permission.Inventory_UpdateTags,\n Permission.Inventory_UpdateTagsOnIsPricerOf,\n Permission.Inventory_UpdateTagsOnPurchasedBy,\n ]\n : entityType === ActionOutboxEntityType.Sale\n ? [\n Permission.Sales_UpdateTags,\n Permission.Sales_UpdateTagsOnIsFulfillerOf,\n Permission.Sales_UpdateTagsOnIsPricerOf,\n Permission.Sales_UpdateTagsOnPurchasedBy,\n ]\n : [Permission.Purchases_UpdateTags, Permission.Purchases_UpdateTagsOwned])\n );\n\n const { tagsMetadata: existingTagsMetadata = [] } =\n useTagsForEntityType(entityType);\n\n return {\n hasEditTagsPermissions:\n hasEditTagsPermission || (existingTagsMetadata ?? []).length > 0,\n };\n};\n","import { ReactNode } from 'react';\nimport { useBulkEditTagsPermissions } from 'src/components/common/BulkActions/BulkEditTagsAction/useBulkEditTagsPermissions';\nimport { ActionOutboxEntityType } from 'src/WebApiController';\n\ninterface BulkEditTagsActionPermissionsHandlerProps {\n children: ReactNode;\n entityType:\n | ActionOutboxEntityType.Listing\n | ActionOutboxEntityType.Sale\n | ActionOutboxEntityType.Purchase;\n}\n\nexport const BulkEditTagsActionPermissionsHandler = ({\n children,\n entityType,\n}: BulkEditTagsActionPermissionsHandlerProps) => {\n const { hasEditTagsPermissions } = useBulkEditTagsPermissions({ entityType });\n\n if (!hasEditTagsPermissions) {\n return null;\n }\n\n return <>{children};\n};\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport const FieldLabelWrapper = styled.div`\n font-weight: 600;\n ${({\n theme: {\n media,\n typography: { getStyles },\n },\n }) => `\n${getStyles('body1')}\n padding-left: 0;\n ${media.makeMediaQuery(\n media.breakpoints.md,\n `padding-left: 0px;` // reset padding for tablets and above\n )}\n`}\n`;\n\nexport const FieldWrapper = styled.div`\n padding-block-end: ${() => vars.spacing.m};\n\n label {\n width: 100%;\n margin-bottom: 0;\n }\n`;\n","import { HubConnectionState } from '@microsoft/signalr';\nimport { ComponentProps, useCallback, useMemo, useRef, useState } from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { BulkEditStatus } from 'src/components/common/BulkActions/BulkEditStatus';\nimport { TagValueInput } from 'src/components/TagsFormBody/TagValueCell';\nimport {\n IPosEntity,\n useActivePosEntityContext,\n} from 'src/contexts/ActivePosEntityContext';\nimport {\n BulkEditStage,\n useBulkEditHubContext,\n} from 'src/contexts/BulkEditHubContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { usePurchaseDataContext } from 'src/contexts/PurchaseDataContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { PosSelect } from 'src/core/POS/PosSelect';\nimport { Stack } from 'src/core/ui';\nimport { useBulkEditHub } from 'src/hooks/useBulkEditHub';\nimport { useTagsForEntityType } from 'src/hooks/useTagsForEntityType';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n ActionOutboxEntityType,\n BulkActionType,\n BulkEditPreviewWithDetails,\n BulkEditProgress,\n BulkEditStep,\n Tag,\n} from 'src/WebApiController';\n\nimport { BulkEditFooter } from '../common/BulkEditFooter';\nimport { BulkEditHeader } from '../common/BulkEditHeader';\nimport { FieldLabelWrapper, FieldWrapper } from './BulkEditTagDialog.styled';\n\nexport enum BulkEditTagAction {\n Update = 'Update',\n Remove = 'Remove',\n}\nexport type BulkEditTagDialogProps = ComponentProps & {\n updateKey: string;\n action: BulkEditTagAction;\n onOkay: (\n action: BulkEditTagAction,\n tagKey: string | null,\n tagValue?: string | undefined,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => void;\n onCancel: () => void;\n entityType:\n | ActionOutboxEntityType.Listing\n | ActionOutboxEntityType.Sale\n | ActionOutboxEntityType.Purchase;\n};\n\nexport function BulkEditTagDialog({\n updateKey,\n action,\n onOkay,\n onCancel,\n entityType,\n ...rest\n}: BulkEditTagDialogProps) {\n const { setActivePosEntity } = useActivePosEntityContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n const { refreshData } = usePurchaseDataContext();\n const { setSelectionMode } = useMultiSelectionContext();\n const { setProgress, setPreview, setMainDialogOpened } =\n useBulkEditHubContext();\n\n const [selectedTag, setSelectedTag] = useState();\n const [tagValue, setTagValue] = useState();\n const [isLoading, setIsLoading] = useState(false);\n\n const onClose = useCallback(\n async (\n newProgress?: BulkEditProgress,\n closeMainDialogForPopover?: boolean\n ) => {\n if (newProgress?.step === BulkEditStep.Done) {\n setIsRefreshing(true);\n setActivePosEntity(0);\n\n // Depending whether it's Listing, Sales, or Purchase\n // the context would be different here\n if (refreshData) {\n await refreshData(true);\n }\n if (refreshExpandedListItems) {\n await refreshExpandedListItems();\n }\n setSelectionMode(undefined);\n if (closeMainDialogForPopover) {\n setMainDialogOpened(false);\n } else {\n setProgress(undefined);\n setPreview(undefined);\n }\n\n setIsRefreshing(false);\n // progress kept to allow the BulkEditStatusPopover to show the result\n }\n onCancel();\n },\n [\n onCancel,\n refreshData,\n refreshExpandedListItems,\n setActivePosEntity,\n setMainDialogOpened,\n setPreview,\n setProgress,\n setSelectionMode,\n ]\n );\n\n const onBulkEditDone = useCallback(\n async (doneProgress: BulkEditProgress, finalErrors: string[]) => {\n if (finalErrors.length === 0 && doneProgress.step === BulkEditStep.Done) {\n onClose(doneProgress, true);\n }\n },\n [onClose]\n );\n\n const { bulkEditHub, progress, preview, initJob, stage } = useBulkEditHub(\n entityType,\n BulkActionType.UpdateTagValues,\n updateKey,\n onBulkEditDone\n );\n\n const hasBackgroundBulkEditFeature =\n bulkEditHub?.state === HubConnectionState.Connected;\n\n const { tagsMetadata: existingTagsMetadata = [] } =\n useTagsForEntityType(entityType);\n\n const keyOptionsContent = useMemo(() => {\n const keyOptions = (existingTagsMetadata ?? [])\n .toSorted((r1, r2) => r1.key.localeCompare(r2.key))\n .reduce(\n (re, r) => {\n re[r.key] = r.key;\n return re;\n },\n {} as Record\n );\n\n return keyOptions ?? {};\n }, [existingTagsMetadata]);\n\n const isInputValid = useMemo(() => {\n return selectedTag && (tagValue || action === BulkEditTagAction.Remove);\n }, [action, selectedTag, tagValue]);\n\n const [isRefreshing, setIsRefreshing] = useState(false);\n\n const onSubmitHandler = useCallback(\n (onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n onOkay(action, null, undefined, false, onPreviewReceived);\n } else {\n onOkay(\n action,\n selectedTag!.key,\n tagValue,\n hasBackgroundBulkEditFeature,\n undefined,\n preview\n );\n }\n setIsLoading(false);\n },\n [\n onOkay,\n action,\n selectedTag,\n tagValue,\n preview,\n hasBackgroundBulkEditFeature,\n ]\n );\n\n const submittButtonRef = useRef(null);\n\n return (\n <>\n \n ) : (\n \n )\n }\n />\n }\n onOpened={() => {\n setSelectedTag(undefined);\n setTagValue(undefined);\n initJob();\n }}\n onKeyUp={(e) => {\n if (submittButtonRef.current && e.key === 'Enter' && isInputValid) {\n submittButtonRef.current.click();\n }\n }}\n onClick={(e) => {\n // This so that this dialog does not cause event to flow to the EventHeader open/close event\n e.stopPropagation();\n e.preventDefault();\n }}\n onClosed={() => {\n setMainDialogOpened(false);\n if (progress) {\n setSelectionMode(undefined);\n }\n // Call the outside one if there is one\n rest.onClosed?.();\n }}\n footer={\n \n }\n onCancel={isLoading ? undefined : onCancel}\n >\n \n \n \n \n \n \n {\n setSelectedTag(\n (existingTagsMetadata ?? []).find((t) => t.key === newValue)\n );\n }}\n value={selectedTag?.key ?? ''}\n displayText={selectedTag?.key ?? ''}\n searchable\n disabled={isLoading}\n valueOptionsContent={keyOptionsContent}\n placeholderText={ContentId.Name}\n />\n \n {action !== BulkEditTagAction.Remove && (\n <>\n \n \n \n \n \n \n \n }\n />\n \n \n )}\n \n \n \n \n );\n}\n","import { useBulkEditTagsPermissions } from 'src/components/common/BulkActions/BulkEditTagsAction/useBulkEditTagsPermissions';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { BulkEditTagAction } from 'src/dialogs/BulkEdits/BulkEditTagDialog';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ActionOutboxEntityType } from 'src/WebApiController';\n\nexport const LaunchBulkEditTags = ({\n onClick,\n disabled,\n entityType,\n}: {\n onClick: (\n e: React.MouseEvent,\n editTagAction: BulkEditTagAction\n ) => void;\n disabled?: boolean;\n entityType:\n | ActionOutboxEntityType.Listing\n | ActionOutboxEntityType.Sale\n | ActionOutboxEntityType.Purchase;\n}) => {\n const { hasEditTagsPermissions } = useBulkEditTagsPermissions({ entityType });\n\n if (!hasEditTagsPermissions) {\n return null;\n }\n\n return (\n <>\n onClick(e, BulkEditTagAction.Update)}\n disabled={disabled}\n >\n \n \n onClick(e, BulkEditTagAction.Remove)}\n disabled={disabled}\n >\n \n \n \n );\n};\n","import { useCallback } from 'react';\nimport { LaunchBulkEditTags } from 'src/components/common/BulkActions/BulkEditTagsAction';\nimport {\n IPosEntity,\n useActivePosEntityContext,\n} from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport {\n BulkEditTagAction,\n BulkEditTagDialog,\n} from 'src/dialogs/BulkEdits/BulkEditTagDialog';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n BulkEditListingClient,\n BulkEditPreviewWithDetails,\n Event,\n ListingQuery,\n} from 'src/WebApiController';\n\nimport { INVENTORY_BULK_UPDATE_TAGS_UPDATE_KEY } from '../../InventoryActionDropdown.constants';\n\nexport const useBulkEditTagsAction = (\n filterQueryWithEventIds: ListingQuery,\n setIsLoading: (v: boolean) => void,\n isLoading?: boolean,\n event?: Event\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { setActivePosEntity } = useActivePosEntityContext();\n const updateKey = event\n ? `listingTags-event-${event.viagVirtualId}`\n : INVENTORY_BULK_UPDATE_TAGS_UPDATE_KEY;\n const {\n eventsExpansion: { setListItemExpansion, refreshExpandedListItems },\n } = useCatalogDataContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const {\n openDialog: openBulkEditTagDialog,\n closeDialog: closeBulkEditTagDialog,\n } = useDialog(DialogId.BulkEditTags, BulkEditTagDialog);\n\n const onSubmitEditTags = useCallback(\n async (\n action: BulkEditTagAction,\n tagKey: string | null,\n tagValue?: string | undefined,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => {\n if (activeAccountWebClientConfig.activeAccountId == null) {\n return null;\n }\n setIsLoading(true);\n if (onPreviewReceived) {\n await tryInvokeApi(\n async () => {\n const preview = await new BulkEditListingClient(\n activeAccountWebClientConfig\n ).bulkUpdateTagsPreview(filterQueryWithEventIds);\n\n onPreviewReceived(preview);\n },\n (error) => {\n showErrorDialog('bulkUpdateTagsPreview', error, {\n trackErrorData: { filterQueryWithEventIds },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n } else if (tagKey) {\n await tryInvokeApi(\n async () => {\n const listingClient = new BulkEditListingClient(\n activeAccountWebClientConfig\n );\n\n const succeeded =\n action === BulkEditTagAction.Update\n ? await listingClient.bulkUpdateTags(\n preview!.preview,\n tagKey,\n tagValue,\n updateKey,\n supportBackgroundProcess\n )\n : await listingClient.bulkRemoveTags(\n preview!.preview,\n tagKey,\n updateKey,\n supportBackgroundProcess\n );\n\n if (!supportBackgroundProcess) {\n if (succeeded) {\n // Invalidate the activePosEntity, so that when clicking on listingDetails\n // we force re-loading the listing and newest pricing settings can be displayed\n setActivePosEntity(0);\n await refreshExpandedListItems();\n }\n\n closeBulkEditTagDialog();\n }\n },\n (error) => {\n showErrorDialog('onSubmitEditTags', error, {\n trackErrorData: { tagKey, tagValue, preview },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n }\n },\n [\n activeAccountWebClientConfig,\n setIsLoading,\n filterQueryWithEventIds,\n showErrorDialog,\n updateKey,\n closeBulkEditTagDialog,\n setActivePosEntity,\n refreshExpandedListItems,\n ]\n );\n\n const onChangeTagClick = useCallback(\n (e: React.MouseEvent, editTagAction: BulkEditTagAction) => {\n e.preventDefault();\n e.stopPropagation();\n if (event) {\n setListItemExpansion(true, [event.viagVirtualId]);\n }\n\n openBulkEditTagDialog({\n updateKey: updateKey,\n action: editTagAction,\n onOkay: onSubmitEditTags,\n entityType: ActionOutboxEntityType.Listing,\n onClosed: () => {\n setIsLoading(false);\n },\n onCancel: closeBulkEditTagDialog,\n });\n },\n [\n closeBulkEditTagDialog,\n event,\n onSubmitEditTags,\n openBulkEditTagDialog,\n setIsLoading,\n setListItemExpansion,\n updateKey,\n ]\n );\n\n return {\n dropDown: (\n \n ),\n };\n};\n","import { useState } from 'react';\nimport { BulkEditTagsActionPermissionsHandler } from 'src/components/common/BulkActions/BulkEditTagsAction/BulkEditTagsActionPermissionsHandler';\nimport { useBulkActionsState } from 'src/components/common/BulkActions/useBulkActionsState';\nimport { useInventoryEventBulkActionsState } from 'src/components/Events/EventListing/InventoryEventListing/BulkActions/InventoryEventBulkActions/useInventoryEventBulkActionsState';\nimport { useBulkEditTagsAction } from 'src/components/Listings/InventoryActionDropdown/components/BulkEditTagsAction';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosDropdown } from 'src/core/POS/PosDropdown';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { ChevronDownIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { EventWithData } from 'src/WebApiController';\nimport { ActionOutboxEntityType } from 'src/WebApiController';\n\ninterface TagsActionsProps {\n event: EventWithData['event'];\n}\n\nexport const TagsActions = ({ event }: TagsActionsProps) => {\n const { areBulkActionsEnabled } = useBulkActionsState();\n const [isLoading, setIsLoading] = useState(false);\n const { filterQueryWithEventIds } = useInventoryEventBulkActionsState(event);\n const bulkUpdateTags = useBulkEditTagsAction(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n event\n );\n return (\n \n \n \n \n \n }\n align=\"start\"\n triggerProps={{ disabled: isLoading || !areBulkActionsEnabled }}\n >\n {bulkUpdateTags.dropDown}\n \n \n );\n};\n","import { MultiSelectActionsContainer } from 'src/components/common/MultiSelect/MultiSelectActionsContainer';\nimport { BroadcastActions } from 'src/components/Events/EventListing/InventoryEventListing/BulkActions/InventoryEventBulkActions/Actions/BroadcastActions';\nimport { EventWithData } from 'src/WebApiController';\n\nimport { GroupActions } from './Actions/GroupActions';\nimport { PricingActions } from './Actions/PricingActions';\nimport { SettingsActions } from './Actions/SettingsActions';\nimport { TagsActions } from './Actions/TagsActions';\n\ntype InventoryBulkActionsProps = {\n eventWithData: EventWithData;\n isEventPage: boolean;\n listingCount: number;\n};\n\nexport const InventoryEventBulkActions = (props: InventoryBulkActionsProps) => {\n const { eventWithData, isEventPage, listingCount } = props;\n\n return (\n \n \n \n \n \n \n \n );\n};\n","import { ListingTableColumnId } from 'src/utils/columns/inventory/inventoryColumnUtils.types';\nimport { CompListing, Listing, Seating } from 'src/WebApiController';\n\nexport const mapCompListingToListing = (listing: CompListing): Listing => {\n return {\n id: listing.listingId,\n availQty: listing.availableTickets ?? undefined,\n unsoldQty: listing.availableTickets ?? undefined,\n seating: {\n section: listing.section ?? '',\n row: listing.row,\n rowId: listing.rowId,\n seatFr: listing.seatFrom,\n seatTo: listing.seatTo,\n } as Seating,\n allInPrice: listing.sellerAllInPrice?.amt ?? undefined,\n currency:\n listing.sellerAllInPrice?.currency ?? listing.currencyCode ?? 'USD',\n } as Listing;\n};\n\nexport const prependTicketClassColorColumnForFirstTime = (\n storedInventoryColumnOrderSetting: string[],\n storedInventoryColumnsEnabledSetting: string[],\n setInventoryColumnOrderSetting: (value: string[]) => void,\n setInventoryColumnsEnabledSetting: (value: string[]) => void\n) => {\n // Only add if it's not already in the order setting list - meaning the user never configured it\n if (\n !storedInventoryColumnOrderSetting.includes(\n ListingTableColumnId.TicketClassColor\n )\n ) {\n // In this case we turn it on and add it to the beginning of the order setting\n setInventoryColumnOrderSetting([\n ListingTableColumnId.TicketClassColor,\n ...storedInventoryColumnOrderSetting,\n ]);\n if (\n !storedInventoryColumnsEnabledSetting.includes(\n ListingTableColumnId.TicketClassColor\n )\n ) {\n setInventoryColumnsEnabledSetting([\n ListingTableColumnId.TicketClassColor,\n ...storedInventoryColumnsEnabledSetting,\n ]);\n }\n }\n};\n","import { format } from 'date-fns';\nimport { getLocaleFromLanguageOrCurrent } from 'src/utils/localeUtils';\n\nexport const getGroupingLabelForString = (value: string): string => {\n return value.charAt(0).toUpperCase();\n};\n\nexport const getGroupLabelForDates = (date?: string | null): string => {\n if (!date) {\n return '-';\n }\n return format(new Date(date), 'MMMM yyyy', {\n locale: getLocaleFromLanguageOrCurrent(),\n });\n};\n\nexport const getGroupLabelForNumber = (value: number, prefix = ''): string => {\n const length = String(Math.abs(Math.trunc(value))).length;\n const sign = value < 0 ? '-' : '';\n const from = 10 ** (length - 1);\n const fromLabel = from === 1 ? 0 : from.toLocaleString();\n const to = (10 ** length).toLocaleString();\n return `${sign}${prefix}${fromLabel} to ${sign}${prefix}${to}`;\n};\n\nexport const getGroupLabelForPercentNumber = (\n value: number,\n prefix = ''\n): string => {\n let from = Math.abs(Math.trunc((value ?? 0) * 10));\n from = from === 10 ? 9 : from; // Avoid going over 100%\n const sign = value < 0 ? '-' : '';\n const fromLabel = (from * 10).toLocaleString();\n const to = ((from + 1) * 10).toLocaleString();\n return `${sign}${prefix}${fromLabel} - ${sign}${prefix}${to}%`;\n};\n","import { useMemo } from 'react';\nimport { EventNameDisplay } from 'src/components/Events/EventInfo';\nimport { Stack } from 'src/core/ui';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { ParkingPassIcon } from 'src/svgs/Viagogo/functional-svgs/ParkingPass';\nimport {\n EVENT_TYPE_PARKING,\n getFormattedEventName,\n} from 'src/utils/eventWithDataUtils';\nimport {\n Event,\n Performer,\n TopLevelCategory,\n Venue,\n} from 'src/WebApiController';\n\nimport * as styles from './EventsTableColumnsConfig.css';\n\ntype EventDisplayCellProps = {\n event: Event;\n performer?: Performer;\n venue?: Venue;\n isSinglePerformerView?: boolean;\n forceDisplayEventName?: boolean;\n};\n\nexport const EventDisplayCell: React.FC = ({\n event,\n performer,\n venue,\n isSinglePerformerView,\n forceDisplayEventName,\n}) => {\n const [eventName, eventNameConnector, eventSubName, displayVenueOnly] =\n useMemo(() => {\n const eventName = event.shortName || event.name;\n const lowerCasedEventName = eventName.toLocaleLowerCase();\n const lowerCasedPerformer = performer?.name?.toLocaleLowerCase();\n const displayVenueOnly = forceDisplayEventName\n ? false\n : isSinglePerformerView &&\n (event.genre === TopLevelCategory.Concert ||\n event.genre === TopLevelCategory.Theatre) &&\n lowerCasedEventName === lowerCasedPerformer;\n\n const [\n formattedEventName,\n formattedEventConnector,\n formattedEventSubName,\n ] = getFormattedEventName({\n event,\n performer,\n venue,\n slimMode: isSinglePerformerView,\n useShortName: true,\n });\n\n return [\n formattedEventName,\n formattedEventConnector,\n formattedEventSubName,\n displayVenueOnly,\n ];\n }, [event, forceDisplayEventName, isSinglePerformerView, performer, venue]);\n\n return (\n \n \n {!displayVenueOnly && (\n \n )}\n {event.eventType === EVENT_TYPE_PARKING && (\n \n )}\n \n \n );\n};\n","import { EventIdQueryParam } from 'src/utils/constants/constants';\nimport { removeFilters } from 'src/utils/eventQueryUtils';\n\nexport const createInventoryEventUrl = (\n eventId: string,\n includeAllSearchParams = true, // current searchParams + EventIdQueryParam\n useEventV2 = false,\n queryParamOverride?: string, // query param to use for eventId\n queryParamsToRemove?: string[] // queryParams to remove from final URL\n): string => {\n let searchParams = '';\n if (includeAllSearchParams) {\n const url = new URL(window.location.href);\n url.searchParams.set(queryParamOverride || EventIdQueryParam, eventId);\n (queryParamsToRemove ?? []).forEach((param) =>\n url.searchParams.delete(param)\n );\n searchParams = `?${removeFilters(url.searchParams.toString(), [\n 'searchText',\n ])}`;\n }\n return `/inventory/event${useEventV2 ? '/v2' : ''}${searchParams}`;\n};\n","import { useCallback } from 'react';\nimport { Link, useLocation, useNavigate } from 'react-router-dom';\nimport { IconButton } from 'src/components/Buttons';\nimport { vars } from 'src/core/themes';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { createInventoryEventUrl } from 'src/navigations/Routes/InventoryEvent/InventoryEvent.utils';\nimport { FullPageIcon } from 'src/svgs/FullPageIcon';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Event, Feature } from 'src/WebApiController';\n\nexport const EventActionsCell = ({ event }: { event: Event }) => {\n const navigate = useNavigate();\n const location = useLocation();\n\n const hasInventoryEventPageV2Feature = useUserHasFeature(\n Feature.InventoryEventPageV2\n );\n\n const eventUrl = createInventoryEventUrl(\n event.viagVirtualId,\n true // includeSearchParams\n );\n\n const eventUrlV2 = createInventoryEventUrl(\n event.viagVirtualId,\n true, // includeSearchParams\n true // useEventV2\n );\n\n const onViewClick = useCallback(\n (eventUrl: string) => {\n if (event) {\n window.location.replace(`#${event.viagVirtualId}`);\n setTimeout(() => {\n navigate(eventUrl, {\n state: {\n returnUrl: `${location.pathname}${location.search}#${event.viagVirtualId}`,\n },\n });\n }, 10);\n }\n },\n [event, navigate, location.pathname, location.search]\n );\n\n return (\n \n {hasInventoryEventPageV2Feature && (\n {\n if (e.button === 0 && e.getModifierState('Control') === false) {\n // Perform like a button click when it's a left-click (and no Ctrl)\n // Else the click will be whatever does\n e.preventDefault();\n e.stopPropagation();\n\n onViewClick(eventUrlV2);\n }\n }}\n >\n \n }\n titleContentId={ContentId.OpenEventPageV2InDevelopment}\n />\n \n )}\n {\n if (e.button === 0 && e.getModifierState('Control') === false) {\n // Perform like a button click when it's a left-click (and no Ctrl)\n // Else the click will be whatever does\n e.preventDefault();\n e.stopPropagation();\n\n onViewClick(eventUrl);\n }\n }}\n >\n \n }\n titleContentId={ContentId.OpenEventPage}\n />\n \n \n );\n};\n","import { VenueNameDisplay } from 'src/components/Events/EventInfo';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport * as styles from 'src/tables/Table/Table.css';\nimport {\n Event,\n Performer,\n TopLevelCategory,\n Venue,\n} from 'src/WebApiController';\n\ntype LocationDisplayCellProps = {\n event: Event;\n performer?: Performer;\n venue?: Venue;\n isSinglePerformerView?: boolean;\n};\n\nexport const LocationDisplayCell: React.FC = ({\n event,\n performer,\n venue,\n isSinglePerformerView,\n}) => {\n const lowerCasedEventName = event.name.toLocaleLowerCase();\n const lowerCasedPerformer = performer?.name?.toLocaleLowerCase();\n const doNotShowVenue =\n event.genre === TopLevelCategory.Sports && isSinglePerformerView;\n const displayVenueOnly =\n isSinglePerformerView &&\n (event.genre === TopLevelCategory.Concert ||\n event.genre === TopLevelCategory.Theatre) &&\n lowerCasedEventName === lowerCasedPerformer;\n return (\n \n {(!doNotShowVenue || displayVenueOnly) && (\n \n )}\n \n );\n};\n","import React from 'react';\nimport { VenueNameDisplay } from 'src/components/Events/EventInfo';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport * as styles from 'src/tables/Table/Table.css';\nimport {\n Event,\n Performer,\n TopLevelCategory,\n Venue,\n} from 'src/WebApiController';\n\ntype VenueDisplayCellProps = {\n event: Event;\n performer?: Performer;\n venue?: Venue;\n isSinglePerformerView?: boolean;\n};\n\nexport const VenueDisplayCell: React.FC = ({\n event,\n performer,\n venue,\n isSinglePerformerView,\n}) => {\n const lowerCasedEventName = event.name.toLocaleLowerCase();\n const lowerCasedPerformer = performer?.name?.toLocaleLowerCase();\n const doNotShowVenue =\n event.genre === TopLevelCategory.Sports && isSinglePerformerView;\n const displayVenueOnly =\n isSinglePerformerView &&\n (event.genre === TopLevelCategory.Concert ||\n event.genre === TopLevelCategory.Theatre) &&\n lowerCasedEventName === lowerCasedPerformer;\n return (\n \n {(!doNotShowVenue || displayVenueOnly) && (\n \n )}\n \n );\n};\n","import { ColumnDef } from '@tanstack/react-table';\nimport { EventDateDisplay } from 'src/components/Events/EventInfo';\nimport { TagValueDisplay } from 'src/components/TagsFormBody/TagValueCell';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n COLUMN_DEFAULT_SIZE_BASE,\n COLUMN_DEFAULT_SIZE_LG,\n COLUMN_DEFAULT_SIZE_SM,\n COLUMN_DEFAULT_SIZE_XL,\n COLUMN_MAX_SIZE,\n COLUMN_MIN_SIZE,\n} from 'src/contexts/ColumnResizingContext/ColumnResizingContext.types';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { vars } from 'src/core/themes';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { TableHeaderCellDiv } from 'src/core/ui/TableHeaderCellDiv';\nimport { useColumnUserSetting } from 'src/hooks/useColumnUserSetting';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport { FormatOption, FormatOptionEntries } from 'src/modals/EditTableColumns';\nimport { CustomColumnName } from 'src/modals/InventoryTableColumns/CustomColumnName';\nimport { CustomNumericCell } from 'src/tables/ListingTable/configs/CustomNumericCell';\nimport { TableShimmeringDiv } from 'src/tables/Table';\nimport { DateCell } from 'src/tables/Table/TableCells';\nimport { getColumnPersonalization } from 'src/utils/columns/columnPersonalizationUtils';\nimport { EventsTableColumnId } from 'src/utils/columns/events/eventsColumnUtils.types';\nimport { CustomEventsColumn } from 'src/utils/columns/events/eventsCustomColumnUtils.types';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { EVENTS_TABLE_COLUMN_ID_TO_CONTENT_ID } from 'src/utils/constants/contentIdMaps';\nimport {\n compareEventsByDate,\n compareEventsByLocation,\n compareEventsByName,\n compareEventsByVenue,\n getFormattedEventName,\n} from 'src/utils/eventWithDataUtils';\nimport {\n getGroupingLabelForString,\n getGroupLabelForDates,\n getGroupLabelForNumber,\n getGroupLabelForPercentNumber,\n} from 'src/utils/groupingUtils';\nimport { applyNumberFormatting } from 'src/utils/numberFormatter';\nimport { sortGeneric, sortMoney } from 'src/utils/tableUtils';\nimport {\n SECTION_TYPE_TO_PRECISION_SETTING,\n SectionType,\n} from 'src/utils/types/sectionType';\nimport {\n DateTimeRange,\n Event,\n EventWithData,\n Feature,\n ListingDetailedMetrics,\n Performer,\n TagsValueType,\n UiMoney,\n UserSetting,\n Venue,\n} from 'src/WebApiController';\n\nimport { evaluateFormula } from '../../../utils/columns/events/eventsCustomColumnUtils';\nimport { EventDisplayCell } from './EventDisplayCell';\nimport { EventActionsCell } from './EventsActionCell';\nimport * as styles from './EventsTableColumnsConfig.css';\nimport { LocationDisplayCell } from './LocationDisplayCell';\nimport { VenueDisplayCell } from './VenueDisplayCell';\n\nconst SHIMMERING_DIV_HEIGHT_SINGLE_LISTING = vars.spacing['4xl'];\n\nconst QUANTITY_COLUMN_MIN_SIZE = 50;\nconst QUANTITY_COLUMN_MAX_SIZE = 80;\nconst COST_COLUMN_MIN_SIZE = 50;\nconst COST_COLUMN_MAX_SIZE = 80;\nconst DATE_COLUMN_MIN_SIZE = 100;\nconst DATE_COLUMN_MAX_SIZE = 200;\n\nconst SECTION_TYPE = SectionType.Events;\n\nexport type EventWithDataAndMetrics = EventWithData & {\n isSinglePerformerView: boolean;\n performer?: Performer;\n venue?: Venue;\n metrics?: ListingDetailedMetrics;\n};\n\nexport type EventsFormulaFields = {\n actualStr?: number | null;\n expectedStr?: number | null;\n liftPercentage?: number | null;\n listedAtp?: number | null;\n revenue?: number | null;\n totalAtp?: number | null;\n totalCost?: number | null;\n totalGrossProfit?: number | null;\n totalListPrice?: number | null;\n totalListedQuantity?: number | null;\n totalListedValue?: number | null;\n totalNetProceeds?: number | null;\n totalSoldCost?: number | null;\n totalSoldQuantity?: number | null;\n totalTicketQuantity?: number | null;\n totalUnsoldListPrice?: number | null;\n totalUnsoldQuantity?: number | null;\n};\n\nexport const tagColumnDef = (\n tagName: string\n): ColumnDef => ({\n id: tagName,\n header: () => (\n \n \n {tagName}\n \n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n accessorFn: (data) => {\n const tag = data?.metrics?.tags?.find((t) => t.key === tagName);\n if (\n tag?.valueType === TagsValueType.Int ||\n tag?.valueType === TagsValueType.Decimal\n ) {\n return tag ? parseFloat(tag.value) : null;\n }\n return tag?.value;\n },\n cell: function Cell({ getValue, row: { original }, table }) {\n const { value: storedColumnNumberPrecisions = {} } =\n useServerUserSetting({\n id: SECTION_TYPE_TO_PRECISION_SETTING[\n table.options.meta?.sectionType ?? SECTION_TYPE\n ],\n });\n const tag = original?.metrics?.tags?.find((t) => t.key === tagName);\n\n if (\n tag?.valueType === TagsValueType.Int ||\n tag?.valueType === TagsValueType.Decimal\n ) {\n const userDefinedPrecision = storedColumnNumberPrecisions[tagName];\n\n return (\n ()}\n isLoading={Boolean(!original || !original.metrics)}\n shimmeringDivHeight={SHIMMERING_DIV_HEIGHT_SINGLE_LISTING}\n sectionType={table.options.meta?.sectionType ?? SECTION_TYPE}\n matchingTag={tag}\n currencyCode={original?.metrics?.currency}\n />\n );\n }\n\n if (!original || !original.metrics) {\n return (\n \n );\n }\n\n if (!tag) {\n return null;\n }\n\n return (\n \n \n \n );\n },\n});\n\nexport const customColumnDef = (\n columnId: string,\n formula?: string | null\n): ColumnDef => ({\n id: columnId,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n accessorFn: (data) => {\n return formula && data\n ? (evaluateFormula(formula, data.metrics) ?? null)\n : null;\n },\n cell: function Cell({ getValue, row: { original } }) {\n const { value: storedInventoryColumnNumberPrecisions = {} } =\n useServerUserSetting({\n id: UserSetting.SaleColumnNumberPrecision,\n });\n const { value: customColumns = [] } = useServerUserSetting<\n CustomEventsColumn[]\n >({\n id: UserSetting.EventsCustomColumns,\n });\n\n const userDefinedPrecision =\n storedInventoryColumnNumberPrecisions[columnId];\n\n const { loginContext } = useAppContext();\n const { getUiCurrency } = useLocalizationContext();\n const uiCurrency = getUiCurrency(\n loginContext?.user?.activeAccount.currencyCode\n );\n\n const { isCurrency, isPercent } = getColumnPersonalization({\n id: columnId,\n sectionType: SECTION_TYPE,\n matchingCustomColumn: customColumns.find((c) => c.id === columnId),\n });\n\n if (!original || !original.metrics) {\n return (\n \n );\n }\n\n const value = getValue();\n\n return (\n \n
    \n {value == null ? (\n ''\n ) : isNaN(value) || !isFinite(value) ? (\n \n ) : (\n <>\n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: getValue(),\n currencyCode: isCurrency ? uiCurrency.code : undefined,\n currencyDecimalDigits: isCurrency ? uiCurrency.dec : undefined,\n isPercent: isPercent && !isCurrency,\n })}\n \n )}\n
    \n
    \n );\n },\n});\n\nexport const EVENTS_TABLE_COLUMNS_CONFIG: Record<\n EventsTableColumnId,\n ColumnDef\n> = {\n [EventsTableColumnId.Checkbox]: {\n id: EventsTableColumnId.Checkbox,\n header: '',\n size: COLUMN_DEFAULT_SIZE_SM,\n minSize: COLUMN_DEFAULT_SIZE_SM,\n maxSize: COLUMN_DEFAULT_SIZE_SM,\n enableSorting: false,\n enableResizing: false,\n cell: function Cell({ row: { original, getIsSelected } }) {\n const { setShiftKeyGroupSelectionState } = useMultiSelectionContext();\n const isSelected = getIsSelected();\n\n if (!original?.metrics) {\n return ;\n }\n\n return (\n \n {\n setShiftKeyGroupSelectionState(original.event.viagVirtualId);\n }}\n />\n \n );\n },\n },\n [EventsTableColumnId.Event]: {\n id: EventsTableColumnId.Event,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_XL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n accessorFn: (data) => data,\n cell: function Cell({ getValue, row: { original } }) {\n const { event, performer, venue } = getValue();\n if (!original?.metrics) {\n return ;\n }\n\n return (\n \n );\n },\n sortingFn: compareEventsByName,\n getGroupingValue: (row) => {\n const eventName = getFormattedEventName({\n event: row?.event,\n performer: row?.performer,\n venue: row?.venue,\n useShortName: true,\n }).join(' ');\n return getGroupingLabelForString(eventName);\n },\n },\n\n [EventsTableColumnId.Venue]: {\n id: EventsTableColumnId.Venue,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_XL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n accessorFn: (data) => data,\n cell: function Cell({ getValue, row: { original } }) {\n const { event, venue, performer } = getValue();\n if (!original?.metrics) {\n return ;\n }\n return (\n \n );\n },\n sortingFn: compareEventsByVenue,\n getGroupingValue: (item: EventWithDataAndMetrics | null) =>\n getGroupingLabelForString(item?.venue?.name ?? ''),\n },\n [EventsTableColumnId.Location]: {\n id: EventsTableColumnId.Location,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_XL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n accessorFn: (data) => data,\n cell: function Cell({ getValue, row: { original } }) {\n const { event, venue, performer } = getValue();\n if (!original?.metrics) {\n return ;\n }\n return (\n
    \n \n
    \n );\n },\n sortingFn: compareEventsByLocation,\n getGroupingValue: (item: EventWithDataAndMetrics | null) =>\n getGroupingLabelForString(item?.venue?.descr ?? ''),\n },\n [EventsTableColumnId.Date]: {\n id: EventsTableColumnId.Date,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_XL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n accessorFn: (data) => data?.event?.dates,\n cell: function Cell({ getValue, row: { original }, column }) {\n const columnId = column.id;\n\n const value = getValue();\n const { userDefinedPrecision = FormatOption.DateTime_MonthDD_Time_Day } =\n useColumnUserSetting(columnId, SectionType.Events);\n\n if (!original?.metrics) {\n return ;\n }\n\n const date = applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value?.start,\n isDateTime: true,\n }) as string;\n\n return (\n \n {userDefinedPrecision === FormatOption.DateTime_MonthDD_Time ? (\n \n ) : (\n
    {date}
    \n )}\n
    \n );\n },\n sortingFn: compareEventsByDate,\n getGroupingValue: (item: EventWithDataAndMetrics | null) =>\n getGroupLabelForDates(item?.event.dates.start),\n },\n [EventsTableColumnId.TotalQty]: {\n id: EventsTableColumnId.TotalQty,\n header: () => (\n \n \n \n ),\n minSize: QUANTITY_COLUMN_MIN_SIZE,\n maxSize: QUANTITY_COLUMN_MAX_SIZE,\n accessorFn: (data) => data?.metrics?.tktQty,\n cell: function Cell({ getValue, row: { original }, column }) {\n const columnId = column.id;\n const value = getValue();\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SectionType.Events\n );\n if (!original?.metrics) {\n return ;\n }\n return (\n \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value,\n })}\n \n );\n },\n getGroupingValue: (item: EventWithDataAndMetrics | null) =>\n getGroupLabelForNumber(item?.metrics?.tktQty ?? 0),\n },\n [EventsTableColumnId.SoldQty]: {\n id: EventsTableColumnId.SoldQty,\n header: () => (\n \n \n \n ),\n minSize: QUANTITY_COLUMN_MIN_SIZE,\n maxSize: QUANTITY_COLUMN_MAX_SIZE,\n accessorFn: (data) => data?.metrics?.soldQty,\n cell: function Cell({ getValue, row: { original }, column }) {\n const columnId = column.id;\n\n const value = getValue();\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SectionType.Events\n );\n if (!original?.metrics) {\n return ;\n }\n return (\n \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value,\n })}\n \n );\n },\n getGroupingValue: (item: EventWithDataAndMetrics | null) =>\n getGroupLabelForNumber(item?.metrics?.soldQty ?? 0),\n },\n [EventsTableColumnId.ActualSTR]: {\n id: EventsTableColumnId.ActualSTR,\n header: () => (\n \n \n \n ),\n minSize: COST_COLUMN_MIN_SIZE,\n maxSize: COST_COLUMN_MAX_SIZE,\n accessorFn: (data) => data?.metrics?.str ?? 0,\n cell: function Cell({ getValue, row: { original }, column }) {\n const columnId = column.id;\n\n const value = getValue();\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SectionType.Events\n );\n if (!original?.metrics) {\n return ;\n }\n return (\n \n {applyNumberFormatting({\n inputNumber: value,\n precision: userDefinedPrecision,\n isPercent: true,\n })}\n \n );\n },\n getGroupingValue: (item: EventWithDataAndMetrics | null) => {\n return getGroupLabelForPercentNumber(item?.metrics?.str ?? 0);\n },\n },\n [EventsTableColumnId.Revenue]: {\n id: EventsTableColumnId.Revenue,\n header: () => (\n \n \n \n ),\n minSize: COST_COLUMN_MIN_SIZE,\n maxSize: COST_COLUMN_MAX_SIZE,\n accessorFn: (data) => data?.metrics?.rvn,\n cell: function Cell({ getValue, row: { original }, column }) {\n const columnId = column.id;\n\n const value = getValue();\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SectionType.Events\n );\n if (!original?.metrics) {\n return ;\n }\n return (\n \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value.amt,\n currencyCode: value.currency,\n currencyDecimalDigits: value.dec,\n })}\n \n );\n },\n sortingFn: sortMoney,\n getGroupingValue: (item: EventWithDataAndMetrics | null) =>\n getGroupLabelForNumber(item?.metrics?.rvn?.amt ?? 0, '$'),\n },\n [EventsTableColumnId.UnsoldProceeds]: {\n id: EventsTableColumnId.UnsoldProceeds,\n header: ({ column: { id: columnId } }) => (\n \n \n \n ),\n minSize: COST_COLUMN_MIN_SIZE,\n maxSize: COST_COLUMN_MAX_SIZE,\n accessorFn: (data) => data?.metrics?.ttlUnsoldListPrc,\n cell: function Cell({ getValue, row: { original }, column }) {\n const columnId = column.id;\n\n const value = getValue();\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SectionType.Events\n );\n if (!original?.metrics) {\n return ;\n }\n return (\n \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value.amt,\n currencyCode: value.currency,\n currencyDecimalDigits: value.dec,\n })}\n \n );\n },\n sortingFn: sortMoney,\n getGroupingValue: (item: EventWithDataAndMetrics | null) =>\n getGroupLabelForNumber(item?.metrics?.ttlUnsoldListPrc?.amt ?? 0, '$'),\n },\n [EventsTableColumnId.SoldCost]: {\n id: EventsTableColumnId.SoldCost,\n header: () => (\n \n \n \n ),\n minSize: COST_COLUMN_MIN_SIZE,\n maxSize: COST_COLUMN_MAX_SIZE,\n accessorFn: (data) => {\n return {\n currencyCode: data?.metrics?.currency ?? null,\n ...(data?.metrics?.soldCst ?? null),\n };\n },\n cell: function Cell({ getValue, row: { original }, column }) {\n const columnId = column.id;\n const value = getValue();\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SectionType.Events\n );\n if (!original?.metrics) {\n return ;\n }\n return (\n \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value.amt,\n currencyCode: value.currency,\n currencyDecimalDigits: value.dec,\n })}\n \n );\n },\n sortingFn: sortMoney,\n getGroupingValue: (item: EventWithDataAndMetrics | null) =>\n getGroupLabelForNumber(item?.metrics?.soldCst?.amt ?? 0, '$'),\n },\n [EventsTableColumnId.UnsoldCost]: {\n id: EventsTableColumnId.UnsoldCost,\n header: ({ column: { id: columnId } }) => (\n \n \n \n ),\n minSize: COST_COLUMN_MIN_SIZE,\n maxSize: COST_COLUMN_MAX_SIZE,\n accessorFn: (data) => {\n return {\n currency: data?.metrics?.currency ?? null,\n dec: data?.metrics?.soldCst?.dec ?? null,\n amt: data?.metrics\n ? data.metrics.ttlCst.amt - data.metrics.soldCst.amt\n : null,\n };\n },\n cell: function Cell({ getValue, row: { original }, column }) {\n const columnId = column.id;\n const value = getValue();\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SectionType.Events\n );\n if (!original?.metrics) {\n return ;\n }\n return (\n \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value.amt,\n currencyCode: value.currency,\n currencyDecimalDigits: value.dec,\n })}\n \n );\n },\n sortingFn: sortMoney,\n getGroupingValue: (item: EventWithDataAndMetrics | null) => {\n const value = item?.metrics\n ? item.metrics.ttlCst.amt - item.metrics.soldCst.amt\n : 0;\n return getGroupLabelForNumber(value, '$');\n },\n },\n [EventsTableColumnId.TotalCost]: {\n id: EventsTableColumnId.TotalCost,\n header: ({ column: { id: columnId } }) => (\n \n \n \n ),\n minSize: COST_COLUMN_MIN_SIZE,\n maxSize: COST_COLUMN_MAX_SIZE,\n accessorFn: (data) => {\n return {\n currencyCode: data?.metrics?.currency ?? null,\n ...(data?.metrics?.ttlCst ?? null),\n };\n },\n cell: function Cell({ getValue, row: { original }, column }) {\n const columnId = column.id;\n const value = getValue();\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SectionType.Events\n );\n if (!original?.metrics) {\n return ;\n }\n return (\n \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value.amt,\n currencyCode: value.currency,\n currencyDecimalDigits: value.dec,\n })}\n \n );\n },\n sortingFn: sortMoney,\n getGroupingValue: (item: EventWithDataAndMetrics | null) =>\n getGroupLabelForNumber(item?.metrics?.ttlCst?.amt ?? 0, '$'),\n },\n [EventsTableColumnId.Profit]: {\n id: EventsTableColumnId.Profit,\n header: () => (\n \n \n \n ),\n minSize: COST_COLUMN_MIN_SIZE,\n maxSize: COST_COLUMN_MAX_SIZE,\n accessorFn: (data) => data?.metrics?.pandL,\n cell: function Cell({ getValue, row: { original }, column }) {\n const columnId = column.id;\n const value = getValue();\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SectionType.Events\n );\n if (!original?.metrics) {\n return ;\n }\n return (\n \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value.amt,\n currencyCode: value.currency,\n currencyDecimalDigits: value.dec,\n })}\n \n );\n },\n sortingFn: sortMoney,\n getGroupingValue: (item: EventWithDataAndMetrics | null) =>\n getGroupLabelForNumber(item?.metrics?.pandL?.amt ?? 0, '$'),\n },\n [EventsTableColumnId.LiftPercentage]: {\n id: EventsTableColumnId.LiftPercentage,\n header: () => (\n \n \n \n ),\n minSize: COST_COLUMN_MIN_SIZE,\n maxSize: COST_COLUMN_MAX_SIZE,\n accessorFn: (data) => data?.metrics?.liftPerc,\n cell: function Cell({ getValue, row: { original }, column }) {\n const columnId = column.id;\n const value = getValue();\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SectionType.Events\n );\n if (!original?.metrics) {\n return ;\n }\n return (\n \n {applyNumberFormatting({\n inputNumber: value,\n precision: userDefinedPrecision,\n isPercent: true,\n })}\n \n );\n },\n getGroupingValue: (item: EventWithDataAndMetrics | null) =>\n getGroupLabelForPercentNumber(item?.metrics?.liftPerc ?? 0),\n },\n [EventsTableColumnId.ATP]: {\n id: EventsTableColumnId.ATP,\n header: () => (\n \n \n \n ),\n minSize: COST_COLUMN_MIN_SIZE,\n maxSize: COST_COLUMN_MAX_SIZE,\n accessorFn: (data) => data?.metrics?.atp,\n cell: function Cell({ getValue, row: { original }, column }) {\n const columnId = column.id;\n const value = getValue();\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SectionType.Events\n );\n if (!original?.metrics) {\n return ;\n }\n return (\n \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value.amt,\n currencyCode: value.currency,\n currencyDecimalDigits: value.dec,\n })}\n \n );\n },\n sortingFn: sortMoney,\n getGroupingValue: (item: EventWithDataAndMetrics | null) =>\n getGroupLabelForNumber(item?.metrics?.atp?.amt ?? 0, '$'),\n },\n [EventsTableColumnId.ListedQty]: {\n id: EventsTableColumnId.ListedQty,\n header: () => (\n \n \n \n ),\n minSize: QUANTITY_COLUMN_MIN_SIZE,\n maxSize: QUANTITY_COLUMN_MAX_SIZE,\n accessorFn: (data) => data?.metrics?.listQty ?? 0,\n cell: function Cell({ getValue, row: { original }, column }) {\n const columnId = column.id;\n const value = getValue();\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SectionType.Events\n );\n if (!original?.metrics) {\n return ;\n }\n return (\n \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value,\n })}\n \n );\n },\n getGroupingValue: (item: EventWithDataAndMetrics | null) =>\n getGroupLabelForNumber(item?.metrics?.listQty ?? 0, '$'),\n },\n [EventsTableColumnId.ListedAtp]: {\n id: EventsTableColumnId.ListedAtp,\n header: () => (\n \n \n \n ),\n minSize: COST_COLUMN_MIN_SIZE,\n maxSize: COST_COLUMN_MAX_SIZE,\n accessorFn: (data) => {\n return {\n currencyCode: data?.metrics?.currency ?? null,\n ...(data?.metrics?.listedATP ?? null),\n };\n },\n cell: function Cell({ getValue, row: { original }, column }) {\n const columnId = column.id;\n const value = getValue();\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SectionType.Events\n );\n if (!original?.metrics) {\n return ;\n }\n return (\n \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value.amt,\n currencyCode: value.currency,\n currencyDecimalDigits: value.dec,\n })}\n \n );\n },\n sortingFn: sortMoney,\n getGroupingValue: (item: EventWithDataAndMetrics | null) =>\n getGroupLabelForNumber(item?.metrics?.listedATP?.amt ?? 0, '$'),\n },\n [EventsTableColumnId.UnsoldQty]: {\n id: EventsTableColumnId.UnsoldQty,\n header: () => (\n \n \n \n ),\n minSize: QUANTITY_COLUMN_MIN_SIZE,\n maxSize: QUANTITY_COLUMN_MAX_SIZE,\n accessorFn: (data) => data?.metrics?.unsoldQty,\n cell: function Cell({ getValue, row: { original }, column }) {\n const columnId = column.id;\n const value = getValue();\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SectionType.Events\n );\n if (!original?.metrics) {\n return ;\n }\n return (\n \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value,\n })}\n \n );\n },\n getGroupingValue: (item: EventWithDataAndMetrics | null) =>\n getGroupLabelForNumber(item?.metrics?.unsoldQty ?? 0),\n },\n [EventsTableColumnId.Action]: {\n id: EventsTableColumnId.Action,\n enableSorting: false,\n enableResizing: true,\n header: function Cell() {\n const hasTablePinActionColumnFeature = useUserHasFeature(\n Feature.TablePinActionColumn\n );\n\n if (hasTablePinActionColumnFeature) {\n return null;\n }\n\n return (\n \n \n \n );\n },\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n accessorFn: (data) => data?.event ?? null,\n cell: function Cell({ getValue, row: { original } }) {\n const value = getValue();\n if (!original?.metrics) {\n return ;\n }\n return ;\n },\n },\n [EventsTableColumnId.LastPriceUpdatedDate]: {\n id: EventsTableColumnId.LastPriceUpdatedDate,\n header: () => (\n \n \n \n ),\n minSize: DATE_COLUMN_MIN_SIZE,\n maxSize: DATE_COLUMN_MAX_SIZE,\n sortingFn: sortGeneric,\n accessorFn: (data) => data?.metrics?.priceUpdatedOn,\n cell: function Cell({\n row: { original },\n getValue,\n column: { id: columnId },\n }) {\n const value = getValue();\n\n const { userDefinedPrecision = FormatOption.DateTime_MonthDD_Time } =\n useColumnUserSetting(columnId, SECTION_TYPE);\n\n if (!original?.metrics) {\n return ;\n }\n\n const date = applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value,\n isDateTime: true,\n }) as string;\n\n return (\n \n {userDefinedPrecision === FormatOption.DateTime_MonthDD_Time ? (\n \n ) : (\n
    {date}
    \n )}\n
    \n );\n },\n getGroupingValue: (item: EventWithDataAndMetrics | null) =>\n getGroupLabelForDates(item?.metrics?.priceUpdatedOn),\n },\n};\n","import { ReportConfig } from 'src/hooks/useReportConfigs';\nimport { ReportConfigV2 } from 'src/hooks/useReportConfigsV2';\nimport { ReportFileType } from 'src/WebApiController';\n\nexport type ReportExportOptions = {\n reportToExport: ReportConfig;\n fileType: ReportFileType;\n serverSideExport?: boolean;\n};\n\nexport type ReportExportOptionsV2 = {\n reportToExport: ReportConfigV2;\n fileType: ReportFileType.CSV | ReportFileType.XLSX;\n};\n\nexport enum AccessorReturnType {\n STRING = 'string',\n SELLER_USER_ID = 'sellerUserId',\n PURCHASE_BUYER_INFOS = 'purchaseBuyerInfos',\n}\n\n/**\n * Values from the table don't always match the values we want to export\n * e.g. some cells return sellerUserId, but we want to export the seller name\n * this type is used to return the value and the type of the value\n * so that the export function can resolve the value correctly\n */\nexport type AccessorReturn = {\n stringValueType: AccessorReturnType;\n /**\n * String values used for ReportsExport to resolve the real value\n * If undefined, it means that the value is already a string and we can use it for resolving directly\n */\n stringValues?: string[] | string | null | undefined;\n value: T;\n};\n","import { TableCellDiv } from 'src/core/ui/TableCellDiv';\n\nimport * as styles from './LinkCell.css';\n\nexport function LinkCell({\n text,\n url,\n openInNewTab,\n align,\n style,\n separator,\n}: {\n text: string | string[];\n url: string | string[];\n openInNewTab?: boolean;\n align: 'left' | 'right' | 'center';\n style?: React.CSSProperties;\n separator?: React.ReactElement;\n}) {\n if (!Array.isArray(text) && !Array.isArray(url)) {\n return (\n \n \n {text}\n
    \n \n );\n }\n\n const texts = text as string[];\n const urls = url as string[];\n\n return (\n \n {texts.flatMap((text, index) => {\n const url = urls[index];\n if (index < texts.length - 1 && separator) {\n return [\n \n {text}\n ,\n separator,\n ];\n }\n\n return [\n \n {text}\n ,\n ];\n })}\n \n );\n}\n","import { vars } from 'src/core/themes';\n\nexport const SHIMMERING_DIV_HEIGHT_REPORT = vars.spacing.xxl;\n","import { Content } from 'src/contexts/ContentContext';\nimport { TableHeaderCellDiv } from 'src/core/ui/TableHeaderCellDiv';\nimport { ListingReportTableColumnId } from 'src/utils/columns/inventory/inventoryColumnUtils.types';\nimport { SalesReportTableColumnId } from 'src/utils/columns/sales/salesColumnUtils.types';\nimport {\n LISTING_REPORT_TABLE_COLUMN_ID_TO_CONTENT_ID,\n SALE_REPORT_TABLE_COLUMN_ID_TO_CONTENT_ID,\n} from 'src/utils/constants/contentIdMaps';\nimport { SectionType } from 'src/utils/types/sectionType';\n\nexport const TableHeader = ({\n column: { id: columnId },\n sectionType,\n align = 'left',\n}: {\n column: { id: string };\n sectionType: SectionType.SalesReport | SectionType.ListingsReport;\n align: 'left' | 'right' | 'center';\n}) => {\n const contentId =\n sectionType === SectionType.SalesReport\n ? SALE_REPORT_TABLE_COLUMN_ID_TO_CONTENT_ID[\n columnId as SalesReportTableColumnId\n ]\n : LISTING_REPORT_TABLE_COLUMN_ID_TO_CONTENT_ID[\n columnId as ListingReportTableColumnId\n ];\n return (\n \n \n \n );\n};\n","import { Getter } from '@tanstack/react-table';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { TableShimmeringDiv } from 'src/tables/Table/Table.styled';\n\nimport { SHIMMERING_DIV_HEIGHT_REPORT } from './ReportTableCommon.constants';\n\n/**\n * Use this component to render any cell with text, as long as getValue() returns string.\n * @param param0\n * @returns\n */\nexport function TextCell({\n getValue,\n value,\n row: { original },\n align,\n style,\n}: {\n getValue: Getter;\n value?: string | null;\n row: { original: T | null };\n align: 'left' | 'right' | 'center';\n style?: React.CSSProperties;\n}) {\n if (!original) {\n return ;\n }\n\n return (\n \n {value ?? getValue()}\n \n );\n}\n","import { Table } from '@tanstack/react-table';\nimport { useCallback, useEffect, useState } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useColumnUserSetting } from 'src/hooks/useColumnUserSetting';\nimport { TableShimmeringDiv } from 'src/tables/Table/Table.styled';\nimport { getColumnPersonalization } from 'src/utils/columns/columnPersonalizationUtils';\nimport { CustomListingColumn } from 'src/utils/columns/inventory/inventoryCustomColumnUtils.types';\nimport { CustomSalesColumn } from 'src/utils/columns/sales/salesCustomColumnUtils.types';\nimport {\n ListingReportMetricsWithGroupBy,\n SaleReportMetricsWithGroupBy,\n} from 'src/utils/reportsUtils';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport { MoneyClient, PosClientConfig } from 'src/WebApiController';\n\nimport { CustomNumericCell } from './CustomNumericCell';\n\nexport const CustomNumericFooterCell = ({\n table,\n columnId,\n matchingCustomColumn,\n shimmeringDivHeight,\n sectionType,\n}: {\n table:\n | Table\n | Table;\n matchingCustomColumn?: CustomListingColumn | CustomSalesColumn;\n columnId: string;\n shimmeringDivHeight: string;\n sectionType: SectionType;\n}) => {\n const { userDefinedPrecision } = useColumnUserSetting(columnId, sectionType);\n const { activeAccountWebClientConfig } = useAppContext();\n const [sumValue, setSumValue] = useState(null);\n\n const original = table.options.meta?.summaryData;\n\n const loadData = useCallback(\n async (\n original: ListingReportMetricsWithGroupBy | SaleReportMetricsWithGroupBy,\n matchingCustomColumn: CustomListingColumn | CustomSalesColumn,\n activeAccountWebClientConfig: PosClientConfig\n ) => {\n let newSumValue: number | null = null;\n\n const tableRows = table.getFilteredRowModel().rows;\n const columnValues = tableRows.map((r) => {\n const value = r.getValue(columnId);\n if (value == null || isNaN(value) || !isFinite(value)) {\n return null;\n }\n return value;\n });\n\n const allNull = columnValues.every((d) => d == null);\n\n const { isCurrency } = getColumnPersonalization({\n id: columnId,\n sectionType,\n matchingCustomColumn,\n });\n\n if (!allNull) {\n if (isCurrency) {\n const targetCurrencyCode = original.currency;\n newSumValue = 0;\n const currencyCodes = tableRows.map((r) => r.original?.currency);\n\n // Need to sum the currency values\n const valuesByCurrencyCodeToConvert: {\n [currencyCode: string]: number;\n } = {};\n\n currencyCodes.forEach((currencyCode, i) => {\n if (currencyCode && columnValues[i] != null) {\n if (currencyCode === targetCurrencyCode) {\n newSumValue = (newSumValue ?? 0) + columnValues[i]!;\n } else {\n valuesByCurrencyCodeToConvert[currencyCode] =\n (valuesByCurrencyCodeToConvert[currencyCode] ?? 0) +\n (columnValues[i] ?? 0);\n }\n }\n });\n\n newSumValue += await new MoneyClient(\n activeAccountWebClientConfig\n ).getConvertedMoneyAmount(\n valuesByCurrencyCodeToConvert,\n targetCurrencyCode\n );\n } else {\n newSumValue = columnValues.reduce(\n (total, columnValue) => total + (columnValue ?? 0),\n 0\n );\n }\n }\n\n setSumValue(newSumValue);\n },\n [columnId, sectionType, table]\n );\n\n useEffect(() => {\n if (!original || !matchingCustomColumn || !activeAccountWebClientConfig) {\n return;\n }\n\n loadData(original, matchingCustomColumn, activeAccountWebClientConfig);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n original,\n matchingCustomColumn,\n activeAccountWebClientConfig,\n columnId,\n sectionType,\n ]);\n\n if (!original) {\n return ;\n }\n\n return (\n \n );\n};\n","import { ColumnDef, createColumnHelper } from '@tanstack/react-table';\nimport { useMemo } from 'react';\nimport { ListingDeliveryTypeDisplay } from 'src/components/Listings/ListingDeliveryTypeDisplay';\nimport { AccessorReturnType } from 'src/components/Reports/ReportsExport/ReportsExport.types';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n COLUMN_DEFAULT_SIZE_BASE,\n COLUMN_DEFAULT_SIZE_LG,\n COLUMN_DEFAULT_SIZE_XL,\n COLUMN_MAX_SIZE,\n COLUMN_MIN_SIZE,\n} from 'src/contexts/ColumnResizingContext/ColumnResizingContext.types';\nimport {\n Content,\n isContentId,\n useContent,\n useContentContext,\n} from 'src/contexts/ContentContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { useSellerAccountContext } from 'src/contexts/SellerAccountContext';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { TableHeaderCellDiv } from 'src/core/ui/TableHeaderCellDiv';\nimport { useColumnUserSetting } from 'src/hooks/useColumnUserSetting';\nimport { useMapDeliveryTypesToString } from 'src/hooks/useMapDeliveryTypesToString';\nimport { useGetUserInfos } from 'src/hooks/userGetUserInfo';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport {\n FormatOption,\n type FormatOptionEntries,\n} from 'src/modals/EditTableColumns';\nimport { CustomColumnName } from 'src/modals/InventoryTableColumns/CustomColumnName';\nimport { createInventoryEventUrl } from 'src/navigations/Routes/InventoryEvent/InventoryEvent.utils';\nimport { PaymentSize } from 'src/svgs/Viagogo';\nimport { LinkCell } from 'src/tables/ReportTableCommon/LinkCell';\nimport { SHIMMERING_DIV_HEIGHT_REPORT } from 'src/tables/ReportTableCommon/ReportTableCommon.constants';\nimport { TableHeader } from 'src/tables/ReportTableCommon/TableHeader';\nimport { TextCell } from 'src/tables/ReportTableCommon/TextCell';\nimport { TableShimmeringDiv } from 'src/tables/Table/Table.styled';\nimport { DateCell, InHandCell } from 'src/tables/Table/TableCells';\nimport { getColumnPersonalization } from 'src/utils/columns/columnPersonalizationUtils';\nimport { ListingReportTableColumnId } from 'src/utils/columns/inventory/inventoryColumnUtils.types';\nimport { CustomListingColumn } from 'src/utils/columns/inventory/inventoryCustomColumnUtils.types';\nimport { evaluateFormula } from 'src/utils/columns/inventory/inventoryReportCustomColumnUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ContentIds } from 'src/utils/constants/contentIdDataMap';\nimport {\n MARKETPLACE_SALE_PAYMENT_STATE_TO_CID,\n PAYMENT_METHOD_TYPE_TO_CID,\n PURCHASE_PAYMENT_STATUS_TO_CID,\n SALE_PAYMENT_STATE_TO_CID,\n} from 'src/utils/constants/contentIdMaps';\nimport { getListingDetailsRelativeUrl } from 'src/utils/inventoryUtils';\nimport {\n applyNumberFormatting,\n formatPercent,\n} from 'src/utils/numberFormatter';\nimport { getPaymentMethodIcon } from 'src/utils/paymentMethodUtils';\nimport { getPurchaseOrderRelativeUrl } from 'src/utils/purchaseUtils';\nimport { ListingReportMetricsWithGroupBy } from 'src/utils/reportsUtils';\nimport { getSaleDetailsRelativeUrl } from 'src/utils/saleUtils';\nimport { sortMoney } from 'src/utils/tableUtils';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport {\n DeliveryType,\n Feature,\n MarketplacePaymentState,\n PointOfSalePaymentState,\n PurchasePaymentMethodType,\n PurchasePaymentStatus,\n TagsValueType,\n UserSetting,\n} from 'src/WebApiController';\n\nimport { CustomNumericCell } from './CustomNumericCell';\nimport { CustomNumericFooterCell } from './CustomNumericFooterCell';\n\nconst SECTION_TYPE = SectionType.ListingsReport;\n\nexport const tagColumnDef = (\n tagName: string\n): ColumnDef => ({\n id: tagName,\n header: () => (\n \n \n {tagName}\n \n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n accessorFn: (data) => {\n const tag = data?.tags.find((t) => t.key === tagName);\n return tag ? parseFloat(tag.value) : null;\n },\n cell: function Cell({ getValue, row: { original } }) {\n const { userDefinedPrecision } = useColumnUserSetting(\n tagName,\n SECTION_TYPE\n );\n\n const tag = original?.tags.find((t) => t.key === tagName);\n\n return (\n ()}\n isLoading={!original}\n shimmeringDivHeight={SHIMMERING_DIV_HEIGHT_REPORT}\n sectionType={SECTION_TYPE}\n matchingTag={tag}\n currencyCode={original?.currency}\n />\n );\n },\n});\n\nexport const eventTagColumnDef = (\n tagName: string\n): ColumnDef => ({\n id: tagName,\n header: () => (\n \n \n {tagName}\n \n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n accessorFn: (data) => {\n const tag = data?.eventTags.find((t) => t.key === tagName);\n return tag?.value;\n },\n cell: function Cell({ getValue, row: { original } }) {\n const { value: storedInventoryColumnNumberPrecisions = {} } =\n useServerUserSetting({\n id: UserSetting.InventoryColumnNumberPrecision,\n });\n const tag = original?.tags.find((t) => t.key === tagName);\n\n const userDefinedPrecision = storedInventoryColumnNumberPrecisions[tagName];\n\n if (!original) {\n return ;\n }\n\n if (\n tag?.valueType === TagsValueType.Decimal ||\n tag?.valueType === TagsValueType.Int\n ) {\n return (\n ()}\n isLoading={!original}\n shimmeringDivHeight={SHIMMERING_DIV_HEIGHT_REPORT}\n sectionType={SECTION_TYPE}\n matchingTag={tag}\n currencyCode={original?.currency}\n />\n );\n }\n\n return (\n \n
    {getValue()}
    \n
    \n );\n },\n});\n\nexport const customColumnDef = (\n columnId: string,\n formula?: string | null\n): ColumnDef => ({\n id: columnId,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n accessorFn: (data) => {\n return formula && data ? (evaluateFormula(formula, data) ?? null) : null;\n },\n cell: function Cell({ getValue, row: { original } }) {\n const { value: customColumns = [] } = useServerUserSetting<\n CustomListingColumn[]\n >({\n id: UserSetting.InventoryCustomColumns,\n });\n\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n\n return (\n ()}\n isLoading={!original}\n shimmeringDivHeight={SHIMMERING_DIV_HEIGHT_REPORT}\n sectionType={SECTION_TYPE}\n matchingCustomColumn={customColumns.find((c) => c.id === columnId)}\n currencyCode={original?.currency}\n />\n );\n },\n\n footer: function Cell({ table }) {\n const { value: customColumns = [] } = useServerUserSetting<\n CustomListingColumn[]\n >({\n id: UserSetting.InventoryCustomColumns,\n });\n\n return (\n c.id === columnId)}\n sectionType={SECTION_TYPE}\n />\n );\n },\n});\n\nconst columnHelper =\n createColumnHelper();\n\nexport const LISTING_REPORT_TABLE_COLUMNS_CONFIG = {\n [ListingReportTableColumnId.Performer]: columnHelper.accessor(\n (data) => data?.performer?.name ?? '',\n {\n id: ListingReportTableColumnId.Performer,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_XL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: (params) => ,\n }\n ),\n [ListingReportTableColumnId.Venue]: columnHelper.accessor(\n (data) => data?.venue?.name ?? '',\n {\n id: ListingReportTableColumnId.Venue,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_XL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: (params) => ,\n }\n ),\n [ListingReportTableColumnId.Event]: columnHelper.accessor(\n (data) => data?.event?.name ?? '',\n {\n id: ListingReportTableColumnId.Event,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_XL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: (params) => ,\n }\n ),\n [ListingReportTableColumnId.EventGenre]: columnHelper.accessor(\n (data) => data?.genre ?? data?.event?.genre ?? '',\n {\n id: ListingReportTableColumnId.EventGenre,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: (params) => ,\n }\n ),\n [ListingReportTableColumnId.EventCountry]: columnHelper.accessor(\n (data) => data?.country?.name ?? data?.venue?.country?.name ?? '',\n {\n id: ListingReportTableColumnId.EventCountry,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: (params) => ,\n }\n ),\n [ListingReportTableColumnId.EventCity]: columnHelper.accessor(\n (data) => data?.city ?? data?.venue?.city ?? '',\n {\n id: ListingReportTableColumnId.EventCity,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: (params) => ,\n }\n ),\n [ListingReportTableColumnId.SeatingSection]: columnHelper.accessor(\n (data) => data?.section ?? '',\n {\n id: ListingReportTableColumnId.SeatingSection,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: (params) => ,\n }\n ),\n [ListingReportTableColumnId.SeatingRow]: columnHelper.accessor(\n (data) => data?.row ?? '',\n {\n id: ListingReportTableColumnId.SeatingRow,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: (params) => ,\n }\n ),\n [ListingReportTableColumnId.UnsoldQuantity]: columnHelper.accessor(\n (data) => data?.availQty ?? 0,\n {\n id: ListingReportTableColumnId.UnsoldQuantity,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n }) {\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n\n if (!original) {\n return ;\n }\n\n return (\n \n
    \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: getValue(),\n })}\n
    \n
    \n );\n },\n footer: function Cell({ table, column: { id: columnId, accessorFn } }) {\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n\n const original = table.options.meta?.summaryData;\n\n if (!original) {\n return ;\n }\n const number = accessorFn?.(original, -1);\n\n return (\n \n
    \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: number,\n })}\n
    \n
    \n );\n },\n }\n ),\n [ListingReportTableColumnId.TicketCount]: columnHelper.accessor(\n (data) => data?.tktQty ?? 0,\n {\n id: ListingReportTableColumnId.TicketCount,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n }) {\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n\n if (!original) {\n return ;\n }\n\n return (\n \n
    \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: getValue(),\n })}\n
    \n
    \n );\n },\n footer: function Cell({ table, column: { id: columnId, accessorFn } }) {\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n\n const original = table.options.meta?.summaryData;\n\n if (!original) {\n return ;\n }\n const number = accessorFn?.(original, -1);\n\n return (\n \n
    \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: number,\n })}\n
    \n
    \n );\n },\n }\n ),\n [ListingReportTableColumnId.SoldQuantity]: columnHelper.accessor(\n (data) => data?.soldQty ?? 0,\n {\n id: ListingReportTableColumnId.SoldQuantity,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n }) {\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n\n if (!original) {\n return ;\n }\n\n return (\n \n
    \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: getValue(),\n })}\n
    \n
    \n );\n },\n footer: function Cell({ table, column: { id: columnId, accessorFn } }) {\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n\n const original = table.options.meta?.summaryData;\n\n if (!original) {\n return ;\n }\n const number = accessorFn?.(original, -1);\n\n return (\n \n
    \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: number,\n })}\n
    \n
    \n );\n },\n }\n ),\n // TODO: Change to total cost\n [ListingReportTableColumnId.UnitCost]: columnHelper.accessor(\n (data) => data?.ttlCst,\n {\n id: ListingReportTableColumnId.UnitCost,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n }) {\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n\n if (!original) {\n return ;\n }\n\n const value = getValue();\n\n if (!value) return ;\n\n return (\n \n
    \n {userDefinedPrecision\n ? applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value.amt,\n currencyCode: value.currency,\n currencyDecimalDigits: value.dec,\n })\n : (value.disp ?? )}\n
    \n
    \n );\n },\n sortingFn: sortMoney,\n footer: function Cell({ table, column: { id: columnId, accessorFn } }) {\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n\n const original = table.options.meta?.summaryData;\n\n if (!original) {\n return ;\n }\n\n const value = accessorFn?.(original, -1);\n if (!value) return ;\n\n return (\n \n
    \n {userDefinedPrecision\n ? applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value.amt,\n currencyCode: value.currency,\n currencyDecimalDigits: value.dec,\n })\n : (value.disp ?? )}\n
    \n
    \n );\n },\n }\n ),\n [ListingReportTableColumnId.SoldCost]: columnHelper.accessor(\n (data) => data?.soldCst,\n {\n id: ListingReportTableColumnId.SoldCost,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n }) {\n const value = getValue();\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n\n if (!original) {\n return ;\n }\n\n if (!value) return ;\n\n return (\n \n
    \n {userDefinedPrecision\n ? applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value.amt,\n currencyCode: value.currency,\n currencyDecimalDigits: value.dec,\n })\n : (value.disp ?? )}\n
    \n
    \n );\n },\n sortingFn: sortMoney,\n footer: function Cell({ table, column: { id: columnId, accessorFn } }) {\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n\n const original = table.options.meta?.summaryData;\n\n if (!original) {\n return ;\n }\n\n const value = accessorFn?.(original, -1);\n if (!value) return ;\n\n return (\n \n
    \n {userDefinedPrecision\n ? applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value.amt,\n currencyCode: value.currency,\n currencyDecimalDigits: value.dec,\n })\n : (value.disp ?? )}\n
    \n
    \n );\n },\n }\n ),\n [ListingReportTableColumnId.UnsoldCost]: columnHelper.accessor(\n (data) => data?.unsoldCst,\n {\n id: ListingReportTableColumnId.UnsoldCost,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n }) {\n const value = getValue();\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n\n if (!original) {\n return ;\n }\n\n if (!value) return ;\n\n return (\n \n
    \n {userDefinedPrecision\n ? applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value.amt,\n currencyCode: value.currency,\n currencyDecimalDigits: value.dec,\n })\n : (value.disp ?? )}\n
    \n
    \n );\n },\n sortingFn: sortMoney,\n footer: function Cell({ table, column: { id: columnId, accessorFn } }) {\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n\n const original = table.options.meta?.summaryData;\n\n if (!original) {\n return ;\n }\n\n const value = accessorFn?.(original, -1);\n if (!value) return ;\n\n return (\n \n
    \n {userDefinedPrecision\n ? applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value.amt,\n currencyCode: value.currency,\n currencyDecimalDigits: value.dec,\n })\n : (value.disp ?? )}\n
    \n
    \n );\n },\n }\n ),\n [ListingReportTableColumnId.SoldProceeds]: columnHelper.accessor(\n (data) => data?.soldProcs,\n {\n id: ListingReportTableColumnId.SoldProceeds,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n }) {\n const value = getValue();\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n\n if (!original) {\n return ;\n }\n\n if (!value) return ;\n\n return (\n \n
    \n {userDefinedPrecision\n ? applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value.amt,\n currencyCode: value.currency,\n currencyDecimalDigits: value.dec,\n })\n : (value.disp ?? )}\n
    \n
    \n );\n },\n sortingFn: sortMoney,\n footer: function Cell({ table, column: { id: columnId, accessorFn } }) {\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n\n const original = table.options.meta?.summaryData;\n\n if (!original) {\n return ;\n }\n\n const value = accessorFn?.(original, -1);\n if (!value) return ;\n\n return (\n \n
    \n {userDefinedPrecision\n ? applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value.amt,\n currencyCode: value.currency,\n currencyDecimalDigits: value.dec,\n })\n : (value.disp ?? )}\n
    \n
    \n );\n },\n }\n ),\n [ListingReportTableColumnId.ListPrice]: columnHelper.accessor(\n (data) => data?.ttlListPrc,\n {\n id: ListingReportTableColumnId.ListPrice,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n }) {\n const value = getValue();\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n if (!original) {\n return ;\n }\n\n if (!value) return ;\n\n return (\n \n
    \n {userDefinedPrecision\n ? applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value.amt,\n currencyCode: value.currency,\n currencyDecimalDigits: value.dec,\n })\n : (value.disp ?? )}\n
    \n
    \n );\n },\n footer: function Cell({ table, column: { id: columnId, accessorFn } }) {\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n\n const original = table.options.meta?.summaryData;\n\n if (!original) {\n return ;\n }\n\n const value = accessorFn?.(original, -1);\n if (!value) return ;\n\n return (\n \n
    \n {userDefinedPrecision\n ? applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value.amt,\n currencyCode: value.currency,\n currencyDecimalDigits: value.dec,\n })\n : (value.disp ?? )}\n
    \n
    \n );\n },\n }\n ),\n [ListingReportTableColumnId.AllInPrice]: columnHelper.accessor(\n (data) => data?.ttlWebPrc,\n {\n id: ListingReportTableColumnId.AllInPrice,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n }) {\n const value = getValue();\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n\n if (!original) {\n return ;\n }\n\n if (!value) return ;\n\n return (\n \n
    \n {userDefinedPrecision\n ? applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value.amt,\n currencyCode: value.currency,\n currencyDecimalDigits: value.dec,\n })\n : (value.disp ?? )}\n
    \n
    \n );\n },\n footer: function Cell({ table, column: { id: columnId, accessorFn } }) {\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n\n const original = table.options.meta?.summaryData;\n\n if (!original) {\n return ;\n }\n\n const value = accessorFn?.(original, -1);\n if (!value) return ;\n\n return (\n \n
    \n {userDefinedPrecision\n ? applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value.amt,\n currencyCode: value.currency,\n currencyDecimalDigits: value.dec,\n })\n : (value.disp ?? )}\n
    \n
    \n );\n },\n }\n ),\n [ListingReportTableColumnId.PandL]: columnHelper.accessor(\n (data) => data?.pandL,\n {\n id: ListingReportTableColumnId.PandL,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n }) {\n const value = getValue();\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n\n if (!original) {\n return ;\n }\n\n if (!value) return ;\n\n return (\n \n
    \n {userDefinedPrecision\n ? applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value.amt,\n currencyCode: value.currency,\n currencyDecimalDigits: value.dec,\n })\n : (value.disp ?? )}\n
    \n
    \n );\n },\n sortingFn: sortMoney,\n footer: function Cell({ table, column: { id: columnId, accessorFn } }) {\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n\n const original = table.options.meta?.summaryData;\n\n if (!original) {\n return ;\n }\n\n const value = accessorFn?.(original, -1);\n if (!value) return ;\n\n return (\n \n
    \n {userDefinedPrecision\n ? applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value.amt,\n currencyCode: value.currency,\n currencyDecimalDigits: value.dec,\n })\n : (value.disp ?? )}\n
    \n
    \n );\n },\n }\n ),\n [ListingReportTableColumnId.Margin]: columnHelper.accessor(\n (data) => data?.marg,\n {\n id: ListingReportTableColumnId.Margin,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n }) {\n const value = getValue();\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n\n if (!original) {\n return ;\n }\n\n return (\n \n
    \n {userDefinedPrecision\n ? applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value,\n isPercent: true,\n })\n : (value ?? )}\n
    \n
    \n );\n },\n footer: function Cell({ table, column: { id: columnId, accessorFn } }) {\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n\n const original = table.options.meta?.summaryData;\n\n if (!original) {\n return ;\n }\n\n const value = accessorFn?.(original, -1);\n\n return (\n \n
    \n {userDefinedPrecision\n ? applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value,\n isPercent: true,\n })\n : (value ?? )}\n
    \n
    \n );\n },\n }\n ),\n [ListingReportTableColumnId.EventId]: columnHelper.accessor(\n (data) => data?.event?.viagId ?? '',\n {\n id: ListingReportTableColumnId.EventId,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: (params) => {\n const eventId = params.row.original?.eventId;\n if (!eventId) {\n return ;\n }\n const eventUrl = createInventoryEventUrl(eventId);\n return (\n \n );\n },\n }\n ),\n [ListingReportTableColumnId.Category]: columnHelper.accessor(\n (data) => data?.performer?.descr ?? '',\n {\n id: ListingReportTableColumnId.Category,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: (params) => ,\n }\n ),\n [ListingReportTableColumnId.EventDate]: columnHelper.accessor(\n (data) => data?.event?.dates?.start ?? '',\n {\n id: ListingReportTableColumnId.EventDate,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_XL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n }) {\n const value = getValue();\n const { userDefinedPrecision = FormatOption.DateTime_MonthDD_Time } =\n useColumnUserSetting(columnId, SECTION_TYPE);\n\n if (!original) {\n return ;\n }\n\n return (\n \n );\n },\n }\n ),\n [ListingReportTableColumnId.EventStateProvince]: columnHelper.accessor(\n (data) => data?.venue?.state ?? '',\n {\n id: ListingReportTableColumnId.EventStateProvince,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: (params) => ,\n }\n ),\n [ListingReportTableColumnId.SaleId]: columnHelper.accessor(\n (data) => data?.sales?.map((s) => s.saleId) ?? null,\n {\n id: ListingReportTableColumnId.SaleId,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ getValue }) => {\n const saleIds = getValue();\n\n if (!saleIds) {\n return ;\n }\n\n return (\n `#${saleId}`)}\n url={saleIds.map((saleId) => getSaleDetailsRelativeUrl(saleId))}\n separator={{', '}}\n openInNewTab\n align=\"left\"\n style={{ fontWeight: 600 }}\n />\n );\n },\n }\n ),\n [ListingReportTableColumnId.HoldId]: columnHelper.accessor(\n (data) => data?.holds?.map((s) => s.saleId) ?? null,\n {\n id: ListingReportTableColumnId.HoldId,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ getValue }) => {\n const holdIds = getValue();\n\n if (!holdIds) {\n return ;\n }\n\n return (\n `#${holdId}`)}\n url={holdIds.map((holdId) => getSaleDetailsRelativeUrl(holdId))}\n separator={{', '}}\n openInNewTab\n align=\"left\"\n style={{ fontWeight: 600 }}\n />\n );\n },\n }\n ),\n [ListingReportTableColumnId.SeatingSeats]: columnHelper.accessor(\n (data) => {\n if (!data?.seatFr) return null;\n let text = data.seatFr;\n if (data.seatTo && data.seatTo !== data.seatFr) {\n text += ` - ${data.seatTo}`;\n }\n return text;\n },\n {\n id: ListingReportTableColumnId.SeatingSeats,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: (params) => ,\n }\n ),\n [ListingReportTableColumnId.DeliveryType]: columnHelper.accessor(\n (data) => data?.delivType ?? null,\n {\n id: ListingReportTableColumnId.DeliveryType,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n }) {\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n const value = getValue();\n\n const strDeliveryTypes = useMapDeliveryTypesToString({\n deliveryTypesObj: { delivType: value },\n });\n\n if (!original || !value) {\n return ;\n }\n\n return (\n \n \n \n );\n },\n }\n ),\n [ListingReportTableColumnId.PurchasePaymentStatus]: columnHelper.accessor(\n (data) => data?.poInfos?.pmtStatuses ?? null,\n {\n id: ListingReportTableColumnId.PurchasePaymentStatus,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue }) {\n const values = getValue();\n\n const { contentResolver } = useContentContext();\n\n if (values == null) {\n return ;\n }\n\n const contentIds = values.map((v) => PURCHASE_PAYMENT_STATUS_TO_CID[v]);\n const contentText = contentIds\n .map((cid) => {\n if (isContentId(cid)) {\n return contentResolver(ContentIds[cid as ContentId]);\n } else {\n return cid;\n }\n })\n .join(', ');\n\n return (\n \n {contentText}\n \n );\n },\n }\n ),\n [ListingReportTableColumnId.PaymentMethodType]: columnHelper.accessor(\n (data) => data?.poInfos?.pmtMethods ?? null,\n {\n id: ListingReportTableColumnId.PaymentMethodType,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n }) {\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n const { contentResolver } = useContentContext();\n\n const value = getValue();\n if (!original || !value) {\n return ;\n }\n\n if (userDefinedPrecision === FormatOption.EnumDisplay_Text) {\n const contentIds = value.map((v) => PAYMENT_METHOD_TYPE_TO_CID[v]);\n const contentText = contentIds\n .map((cid) => {\n if (isContentId(cid)) {\n return contentResolver(ContentIds[cid as ContentId]);\n } else {\n return cid;\n }\n })\n .join(', ');\n\n return (\n \n {contentText}\n \n );\n }\n\n return (\n \n {value.map((v, i) => {\n const PurchaseMethodIcon = getPaymentMethodIcon(v);\n return (\n \n );\n })}\n \n );\n },\n }\n ),\n [ListingReportTableColumnId.InHandDate]: columnHelper.accessor(\n (data) => data?.inHandDate ?? '',\n {\n id: ListingReportTableColumnId.InHandDate,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_XL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ getValue, row: { original } }) => {\n const value = getValue();\n if (!original) {\n return ;\n }\n return (\n \n \n \n );\n },\n sortingFn: 'datetime',\n }\n ),\n [ListingReportTableColumnId.PurchaseId]: columnHelper.accessor(\n (data) => data?.poInfos?.poIds ?? null,\n {\n id: ListingReportTableColumnId.PurchaseId,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ getValue }) => {\n const purchaseIds = getValue();\n\n if (!purchaseIds) {\n return ;\n }\n\n return (\n `#${purchaseId}`)}\n url={purchaseIds.map((purchaseId) =>\n getPurchaseOrderRelativeUrl(purchaseId)\n )}\n separator={{', '}}\n openInNewTab\n align=\"left\"\n style={{ fontWeight: 600 }}\n />\n );\n },\n }\n ),\n [ListingReportTableColumnId.PurchasedBy]: columnHelper.accessor(\n (data) => ({\n stringValueType: AccessorReturnType.PURCHASE_BUYER_INFOS,\n value: data?.poInfos?.buyers,\n }),\n {\n id: ListingReportTableColumnId.PurchasedBy,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue }) {\n const buyerInfos = getValue().value;\n\n const useGetUserInfosQuery = useGetUserInfos(\n buyerInfos?.map((u) => u.buyerUserId)\n );\n const deactivatedText = useContent(ContentId.Deactivated);\n const hasDisplayDeactivatedUser = useUserHasFeature(\n Feature.DisplayDeactivatedUser\n );\n const buyerUserInfos = useMemo(() => {\n if (buyerInfos == null) return [];\n\n return buyerInfos.map((bi) => {\n const buyerUser = useGetUserInfosQuery.data?.[bi.buyerUserId];\n return {\n buyerUserId: bi.buyerUserId,\n buyerUser,\n averageBuyerCommissionPercentage:\n bi.averageBuyerCommissionPercent,\n };\n });\n }, [buyerInfos, useGetUserInfosQuery.data]);\n\n if (buyerInfos == null) {\n return ;\n }\n\n return (\n \n {buyerUserInfos\n .map(\n (bui) =>\n `${\n bui.buyerUser?.name ??\n bui.buyerUser?.email ??\n bui.buyerUserId\n } ${\n bui.buyerUser?.isDeactivated && !hasDisplayDeactivatedUser\n ? `(${deactivatedText})`\n : ''\n } ${\n bui.averageBuyerCommissionPercentage\n ? `(${formatPercent(\n bui.averageBuyerCommissionPercentage,\n 2\n )})`\n : ''\n }`\n )\n .join(', ')}\n \n );\n },\n }\n ),\n [ListingReportTableColumnId.PurchaseDate]: columnHelper.accessor(\n (data) => data?.poInfos?.poDates ?? null,\n {\n id: ListingReportTableColumnId.PurchaseDate,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_XL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n getValue,\n column: { id: columnId },\n row: { original },\n }) {\n const purchaseDates = getValue();\n const { userDefinedPrecision = FormatOption.DateTime_MonthDD_Time } =\n useColumnUserSetting(columnId, SECTION_TYPE);\n\n if (original == null) {\n return ;\n }\n\n return (\n \n );\n },\n }\n ),\n [ListingReportTableColumnId.CancellationDatePurchase]: columnHelper.accessor(\n (data) => data?.poInfos?.cancDates ?? null,\n {\n id: ListingReportTableColumnId.CancellationDatePurchase,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ getValue }) => {\n const purchaseDates = getValue();\n\n if (!purchaseDates) {\n return ;\n }\n\n return (\n \n );\n },\n }\n ),\n [ListingReportTableColumnId.Vendor]: columnHelper.accessor(\n (data) => {\n if (!data) return null;\n const { poInfos: purchaseInfos } = data;\n if (!purchaseInfos?.vendors.length) return null;\n\n return purchaseInfos.vendors.map((v) => v.vendorName).join(', ');\n },\n {\n id: ListingReportTableColumnId.Vendor,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: (params) => ,\n }\n ),\n [ListingReportTableColumnId.InternalNotesPurchase]: columnHelper.accessor(\n (data) => {\n if (!data) return null;\n const { poInfos: purchaseInfos } = data;\n if (!purchaseInfos?.privNotes.length) return null;\n\n return purchaseInfos.privNotes.join(', ');\n },\n {\n id: ListingReportTableColumnId.InternalNotesPurchase,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: (params) => ,\n }\n ),\n [ListingReportTableColumnId.VendorOrderId]: columnHelper.accessor(\n (data) => {\n if (!data) return null;\n const { poInfos: purchaseInfos } = data;\n if (!purchaseInfos?.vendOrdIds.length) return null;\n\n return purchaseInfos.vendOrdIds.join(', ');\n },\n {\n id: ListingReportTableColumnId.VendorOrderId,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: (params) => ,\n }\n ),\n\n [ListingReportTableColumnId.VendorAccountEmail]: columnHelper.accessor(\n (data) => {\n if (!data) return null;\n const { poInfos: purchaseInfos } = data;\n if (!purchaseInfos?.vendorAccs.length) return null;\n\n return purchaseInfos.vendorAccs\n .map((v) => v.encryptedEmailAddress)\n .join(', ');\n },\n {\n id: ListingReportTableColumnId.VendorAccountEmail,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: (params) => ,\n }\n ),\n [ListingReportTableColumnId.SalePaymentState]: columnHelper.accessor(\n (data) =>\n data?.sales\n ?.map((s) => ({\n marketplacePaymentState: s.mkpPmtState,\n paymentState: s.pmtState,\n }))\n ?.filter(\n (s) => s.marketplacePaymentState != null || s.paymentState != null\n ) ?? null,\n {\n id: ListingReportTableColumnId.SalePaymentState,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue }) {\n const values = getValue<\n {\n marketplacePaymentState: MarketplacePaymentState;\n paymentState: PointOfSalePaymentState;\n }[]\n >();\n if (values == null) {\n return ;\n }\n\n const pmtStates = values.map((s) =>\n s.marketplacePaymentState != null\n ? MARKETPLACE_SALE_PAYMENT_STATE_TO_CID[s.marketplacePaymentState]\n : SALE_PAYMENT_STATE_TO_CID[s.paymentState!]\n );\n\n const valuesDeduped = Array.from(new Set(pmtStates));\n\n return (\n \n {valuesDeduped.flatMap((contentId, index) => {\n if (index < valuesDeduped.length - 1) {\n return [\n ,\n {', '},\n ];\n }\n\n return [];\n })}\n \n );\n },\n }\n ),\n [ListingReportTableColumnId.Charges]: columnHelper.accessor(\n (data) =>\n data?.sales?.map((s) => s.chargs?.amt).filter((c) => c != null) ?? null,\n {\n id: ListingReportTableColumnId.Charges,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n }) {\n const { loginContext } = useAppContext();\n const { getUiCurrency } = useLocalizationContext();\n const uiCurrency = getUiCurrency(\n original?.currency ?? loginContext?.user?.activeAccount.currencyCode\n );\n\n const { isCurrency, isPercent } = getColumnPersonalization({\n id: columnId,\n sectionType: SECTION_TYPE,\n });\n\n if (original == null) {\n return ;\n }\n\n const value = getValue();\n\n const formatted =\n value\n ?.map((v) =>\n applyNumberFormatting({\n precision: FormatOption.Precise,\n inputNumber: v,\n currencyCode: uiCurrency.code,\n currencyDecimalDigits: uiCurrency.dec,\n isPercent: isPercent && !isCurrency,\n })\n )\n ?.join(', ') ?? '';\n\n return (\n \n
    {formatted}
    \n
    \n );\n },\n }\n ),\n [ListingReportTableColumnId.Credits]: columnHelper.accessor(\n (data) =>\n data?.sales?.map((s) => s.creds?.amt).filter((c) => c != null) ?? null,\n {\n id: ListingReportTableColumnId.Credits,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n }) {\n const { loginContext } = useAppContext();\n const { getUiCurrency } = useLocalizationContext();\n const uiCurrency = getUiCurrency(\n original?.currency ?? loginContext?.user?.activeAccount.currencyCode\n );\n\n const { isCurrency, isPercent } = getColumnPersonalization({\n id: columnId,\n sectionType: SECTION_TYPE,\n });\n\n if (original == null) {\n return ;\n }\n\n const value = getValue();\n\n const formatted =\n value\n ?.map((v) =>\n applyNumberFormatting({\n precision: FormatOption.Precise,\n inputNumber: v,\n currencyCode: uiCurrency.code,\n currencyDecimalDigits: uiCurrency.dec,\n isPercent: isPercent && !isCurrency,\n })\n )\n ?.join(', ') ?? '';\n\n return (\n \n
    {formatted}
    \n
    \n );\n },\n }\n ),\n [ListingReportTableColumnId.Fulfiller]: columnHelper.accessor(\n (data) => ({\n stringValueType: AccessorReturnType.SELLER_USER_ID,\n value:\n (data?.sales\n ?.map((s) => s.fulfillerId)\n .filter((c) => c != null) as string[]) ?? null,\n }),\n {\n id: ListingReportTableColumnId.Fulfiller,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n const { allActiveUserInfos } = useSellerAccountContext();\n\n const sellerUserIds = getValue().value;\n\n const fulfillerFormatted = useMemo(\n () =>\n sellerUserIds\n ? [...new Set(sellerUserIds)]\n .map(\n (fulfillerId) =>\n allActiveUserInfos?.[fulfillerId]?.displayName\n )\n .filter((name) => name != null)\n .join(', ')\n : null,\n [allActiveUserInfos, sellerUserIds]\n );\n\n if (original == null) {\n return ;\n }\n\n return {fulfillerFormatted};\n },\n }\n ),\n [ListingReportTableColumnId.ListingId]: columnHelper.accessor(\n (data) => data?.listId?.toString() ?? '',\n {\n id: ListingReportTableColumnId.ListingId,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ getValue }) => {\n const listingId = getValue();\n\n if (!listingId) {\n return ;\n }\n\n const url = getListingDetailsRelativeUrl(listingId!);\n return (\n \n );\n },\n }\n ),\n [ListingReportTableColumnId.Zone]: columnHelper.accessor(\n (data) => data?.zone ?? '',\n {\n id: ListingReportTableColumnId.Zone,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: (params) => ,\n }\n ),\n [ListingReportTableColumnId.PricedBy]: columnHelper.accessor(\n (data) => ({\n stringValueType: AccessorReturnType.SELLER_USER_ID,\n value: data?.pricerId ?? null,\n }),\n {\n id: ListingReportTableColumnId.PricedBy,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n const { allActiveUserInfos } = useSellerAccountContext();\n\n const pricerSellerUserId = getValue().value;\n\n const pricer = useMemo(\n () =>\n pricerSellerUserId\n ? allActiveUserInfos?.[pricerSellerUserId]?.displayName\n : null,\n [allActiveUserInfos, pricerSellerUserId]\n );\n\n if (original == null) {\n return ;\n }\n\n return {pricer};\n },\n }\n ),\n [ListingReportTableColumnId.PurchaseCreatedBy]: columnHelper.accessor(\n (data) => ({\n stringValueType: AccessorReturnType.SELLER_USER_ID,\n value: data?.poInfos?.createdBys,\n }),\n {\n id: ListingReportTableColumnId.PurchaseCreatedBy,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n const { allActiveUserInfos } = useSellerAccountContext();\n\n const sellerUserIds = getValue().value;\n\n const displayNamesFormatted = useMemo(\n () =>\n sellerUserIds\n ? [...new Set(sellerUserIds)]\n .map(\n (sellerUserId) =>\n allActiveUserInfos?.[sellerUserId]?.displayName\n )\n .filter((name) => name != null)\n .join(', ')\n : null,\n [allActiveUserInfos, sellerUserIds]\n );\n\n if (original == null) {\n return ;\n }\n\n return (\n {displayNamesFormatted}\n );\n },\n }\n ),\n [ListingReportTableColumnId.InternalNotes]: columnHelper.accessor(\n (data) => data?.privNotes ?? '',\n {\n id: ListingReportTableColumnId.InternalNotes,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: (params) => ,\n }\n ),\n} as const;\n","export function AutomatiqSquareLogo({\n width,\n height,\n}: {\n width?: string | number;\n height?: string | number;\n}) {\n return (\n \n \n \n \n \n );\n}\n","export function AxsSquareLogo({\n width,\n height,\n}: {\n width?: string | number;\n height?: string | number;\n}) {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n","export function FaxExchangeSquareLogo({\n width,\n height,\n}: {\n width?: string | number;\n height?: string | number;\n}) {\n return (\n \n \n \n \n );\n}\n","export function GametimeSquareLogo({\n width,\n height,\n}: {\n width?: string | number;\n height?: string | number;\n}) {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n","export function GoTicketsSquareLogo({\n width,\n height,\n}: {\n width?: string | number;\n height?: string | number;\n}) {\n return (\n \n \n \n \n \n \n \n \n \n \n );\n}\n","export function LyteSquareLogo({\n width,\n height,\n}: {\n width?: string | number;\n height?: string | number;\n}) {\n return (\n \n \n \n \n );\n}\n","export function SeatGeekSquareLogo({\n width,\n height,\n}: {\n width?: string | number;\n height?: string | number;\n}) {\n return (\n \n \n \n \n \n \n \n \n \n \n \n );\n}\n","export function StubHubSquareLogo({\n width,\n height,\n}: {\n width?: string | number;\n height?: string | number;\n}) {\n return (\n \n \n \n \n );\n}\n","export function TicketEvolutionSquareLogo({\n width,\n height,\n}: {\n width?: string | number;\n height?: string | number;\n}) {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n","export function TicketmasterSquareLogo({\n width,\n height,\n}: {\n width?: string | number;\n height?: string | number;\n}) {\n return (\n \n \n \n \n \n \n \n \n \n \n \n );\n}\n","export function TicketNetworkSquareLogo({\n width,\n height,\n}: {\n width?: string | number;\n height?: string | number;\n}) {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n","export function TickPickSquareLogo({\n width,\n height,\n}: {\n width?: string | number;\n height?: string | number;\n}) {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n","export function VividSeatsSquareLogo({\n width,\n height,\n}: {\n width?: string | number;\n height?: string | number;\n}) {\n return (\n \n \n \n \n \n \n \n \n \n );\n}\n","import { ReactNode } from 'react';\nimport { AutomatiqSquareLogo } from 'src/svgs/AutomatiqSquareLogo';\nimport { AxsSquareLogo } from 'src/svgs/AxsSquareLogo';\nimport { FaxExchangeSquareLogo } from 'src/svgs/FaxExchangeSquareLogo';\nimport { GametimeSquareLogo } from 'src/svgs/GametimeSquareLogo';\nimport { GoTicketsSquareLogo } from 'src/svgs/GoTicketsSquareLogo';\nimport { LyteSquareLogo } from 'src/svgs/LyteSquareLogo';\nimport { SeatGeekSquareLogo } from 'src/svgs/SeatGeekSquareLogo';\nimport { StubHubSquareLogo } from 'src/svgs/StubHubSquareLogo';\nimport { TicketEvolutionSquareLogo } from 'src/svgs/TicketEvolutionSquareLogo';\nimport { TicketmasterSquareLogo } from 'src/svgs/TicketmasterSquareLogo';\nimport { TicketNetworkSquareLogo } from 'src/svgs/TicketNetworkSquareLogo';\nimport { TickPickSquareLogo } from 'src/svgs/TickPickSquareLogo';\nimport { VividSeatsSquareLogo } from 'src/svgs/VividSeatsSquareLogo';\nimport { Marketplace } from 'src/WebApiController';\n\nconst getMarketplaceSquareLogo = (\n marketplace: Marketplace | undefined | null\n): ReactNode => {\n switch (marketplace) {\n case Marketplace.VividSeats:\n return ;\n case Marketplace.StubHub:\n return ;\n case Marketplace.SeatGeek:\n return ;\n case Marketplace.TickPick:\n return ;\n case Marketplace.Ticketmaster:\n return ;\n case Marketplace.AXS:\n return ;\n case Marketplace.FanXchange:\n return ;\n case Marketplace.Gametime:\n return ;\n case Marketplace.TicketEvolution:\n return ;\n case Marketplace.TicketNetwork:\n return ;\n case Marketplace.Automatiq:\n return ;\n case Marketplace.Lyte:\n return ;\n case Marketplace.GoTickets:\n return ;\n default:\n return marketplace;\n }\n};\n\ninterface MarketplaceSquareLogoProps {\n marketplace?: Marketplace | undefined | null;\n}\n\nexport const MarketplaceSquareLogo = ({\n marketplace,\n}: MarketplaceSquareLogoProps) => {\n return <>{getMarketplaceSquareLogo(marketplace)};\n};\n","import { useQueryClient } from '@tanstack/react-query';\nimport {\n MutableRefObject,\n useCallback,\n useImperativeHandle,\n useMemo,\n useState,\n} from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { PAYMENT_SINGLE_MONTH_QUERY_KEY } from 'src/contexts/MarketplacePaymentDataContext/MarketplacePaymentDataContext.constants';\nimport { ConvertCurrencyDialog } from 'src/dialogs/ConvertCurrency';\nimport {\n ConvertCurrencyForm,\n CurrencyConversionPayment,\n} from 'src/dialogs/ConvertCurrency/ConvertCurrencyDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { getConversionRate } from 'src/utils/currencyUtils';\nimport {\n Feature,\n MarketplacePaymentClient,\n MarketplaceSalePayment,\n} from 'src/WebApiController';\n\nexport interface ConvertPaymentAmountRefActions {\n showConvertPaymentAmountDialog: () => void;\n currencyConversionPayment: CurrencyConversionPayment;\n}\n\ninterface ConvertPaymentAmountProps {\n marketplaceSalePayment: MarketplaceSalePayment;\n convertPaymentAmountActionsRef?: MutableRefObject;\n}\n\nexport const ConvertPaymentAmount = ({\n convertPaymentAmountActionsRef,\n marketplaceSalePayment,\n}: ConvertPaymentAmountProps) => {\n const [isSavingConversionRate, setIsSavingConversionRate] =\n useState(false);\n const canConvertMarketplacePaymentLines = useUserHasFeature(\n Feature.MarketplacePaymentConversion\n );\n const queryClient = useQueryClient();\n const { activeAccountWebClientConfig } = useAppContext();\n const convertMarketplacePaymentDialog = useBasicDialog();\n const { loginContext } = useAppContext();\n const currentUserId = loginContext?.user?.userId!;\n\n const onCancel = useCallback(() => {\n convertMarketplacePaymentDialog.closeDialog();\n }, [convertMarketplacePaymentDialog]);\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const onSave = useCallback(\n async (formValues: ConvertCurrencyForm) => {\n setIsSavingConversionRate(true);\n try {\n await new MarketplacePaymentClient(\n activeAccountWebClientConfig\n ).convertMarketplacePaymentAmount(\n marketplaceSalePayment.id,\n formValues.convertedPaymentAmount!.amt,\n formValues.convertedCurrencyCode\n );\n\n const isExpanded = true;\n queryClient.invalidateQueries({\n queryKey: [PAYMENT_SINGLE_MONTH_QUERY_KEY, isExpanded],\n refetchType: 'active',\n });\n\n convertMarketplacePaymentDialog.closeDialog();\n } catch (e) {\n console.error(e);\n showErrorDialog(\n 'MarketplacePaymentClient.convertMarketplacePaymentAmount',\n e as Error\n );\n } finally {\n setIsSavingConversionRate(false);\n }\n },\n [\n activeAccountWebClientConfig,\n convertMarketplacePaymentDialog,\n marketplaceSalePayment.id,\n queryClient,\n showErrorDialog,\n ]\n );\n\n const currencyConversionPayment = useMemo(() => {\n return {\n convertedPaymentAmount: marketplaceSalePayment.convertedPmtAmt,\n paymentAmount: marketplaceSalePayment.pmtAmt,\n conversionRate: marketplaceSalePayment.convertedPmtAmt\n ? Math.abs(\n getConversionRate(\n marketplaceSalePayment.pmtAmt.amt,\n marketplaceSalePayment.convertedPmtAmt.amt\n )\n )\n : null,\n convertedCurrencyCode:\n marketplaceSalePayment.convertedPmtAmt?.currency ?? null,\n };\n }, [marketplaceSalePayment.convertedPmtAmt, marketplaceSalePayment.pmtAmt]);\n\n useImperativeHandle(\n convertPaymentAmountActionsRef,\n () => ({\n showConvertPaymentAmountDialog: () =>\n convertMarketplacePaymentDialog.launchDialog(),\n currencyConversionPayment: currencyConversionPayment,\n }),\n [convertMarketplacePaymentDialog, currencyConversionPayment]\n );\n\n return (\n <>\n {canConvertMarketplacePaymentLines &&\n convertMarketplacePaymentDialog.dialogProps.isOpen &&\n currencyConversionPayment && (\n \n )}\n \n );\n};\n","import { useRef } from 'react';\nimport {\n ConvertPaymentAmount,\n ConvertPaymentAmountRefActions,\n} from 'src/components/MarketplacePayments/ConvertPaymentAmount/ConvertPaymentAmount';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosDropdown, PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { vars } from 'src/core/themes';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { IconsFill, MoreIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Feature, MarketplaceSalePayment } from 'src/WebApiController';\n\ninterface MarketplacePaymentOptionsActionProps {\n marketplaceSalePayment: MarketplaceSalePayment;\n}\n\nexport const MarketplacePaymentOptions = ({\n marketplaceSalePayment,\n}: MarketplacePaymentOptionsActionProps) => {\n const actionsRef = useRef(null);\n const canConvertMarketplacePaymentLines = useUserHasFeature(\n Feature.MarketplacePaymentConversion\n );\n\n const canShowOptions = canConvertMarketplacePaymentLines;\n\n if (!canShowOptions) {\n return null;\n }\n\n return (\n <>\n \n \n \n \n }\n align=\"end\"\n >\n {canConvertMarketplacePaymentLines && (\n actionsRef.current?.showConvertPaymentAmountDialog()}\n >\n \n \n )}\n \n {canConvertMarketplacePaymentLines && (\n \n )}\n \n );\n};\n","import { useContext } from 'react';\nimport { IconButton } from 'src/components/Buttons';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { vars } from 'src/core/themes';\nimport { OpenLinkIcon } from 'src/svgs';\nimport { MarketplacePaymentOptions } from 'src/tables/MarketplacePaymentsTable/Cells/MarketplacePaymentOptionsAction';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getMarketplacePaymentDetailsModalConfigWithDeepLink } from 'src/utils/marketplacePaymentUtils';\nimport { MarketplaceSalePayment } from 'src/WebApiController';\n\ninterface MarketplacePaymentsActionsCellProps {\n marketplaceSalePayment: MarketplaceSalePayment;\n}\n\nexport const MarketplacePaymentsActions = ({\n marketplaceSalePayment,\n}: MarketplacePaymentsActionsCellProps) => {\n const { setModal } = useContext(ModalContext);\n return (\n <>\n \n\n \n setModal(\n getMarketplacePaymentDetailsModalConfigWithDeepLink(\n marketplaceSalePayment.id\n )\n )\n }\n icon={\n \n }\n titleContentId={ContentId.ViewDetails}\n />\n \n );\n};\n","import { vars } from 'src/core/themes';\n\nexport const SHIMMERING_DIV_HEIGHT_PAYMENTS = vars.spacing.xxl;\n","import { ColumnDef } from '@tanstack/react-table';\nimport { ReactNode, useMemo } from 'react';\nimport { MarketplacePaymentStatePill } from 'src/components/common/MarketplacePaymentStatePill/MarketplacePaymentStatePill';\nimport { MarketplaceSquareLogo } from 'src/components/common/MarketplaceSquareLogo';\nimport {\n COLUMN_DEFAULT_SIZE_BASE,\n COLUMN_DEFAULT_SIZE_LG,\n COLUMN_DEFAULT_SIZE_SM,\n COLUMN_MAX_SIZE,\n COLUMN_MIN_SIZE,\n} from 'src/contexts/ColumnResizingContext/ColumnResizingContext.types';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { TableHeaderCellDiv } from 'src/core/ui/TableHeaderCellDiv';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { FormatOption_DateTime } from 'src/modals/EditTableColumns';\nimport { MarketplacePaymentsActions } from 'src/tables/MarketplacePaymentsTable/Cells/MarketplacePaymentsActionsCell';\nimport { SHIMMERING_DIV_HEIGHT_PAYMENTS } from 'src/tables/MarketplacePaymentsTable/MarketplacePaymentsTableCommon.constants';\nimport { TableShimmeringDiv } from 'src/tables/Table';\nimport { DateCell } from 'src/tables/Table/TableCells';\nimport { MarketplacePaymentsTableColumnId } from 'src/utils/columns/marketplacePayments/marketplacePaymentsColumnsUtils.types';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { MARKETPLACE_SALE_PAYMENT_STATE_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { safeSortDateTime, sortMoney } from 'src/utils/tableUtils';\nimport {\n Feature,\n Marketplace,\n MarketplacePaymentState,\n MarketplaceSalePayment,\n UiMoney,\n} from 'src/WebApiController';\n\nexport const useMarketplacePaymentsTableColumnsConfig = () => {\n const hasTablePinActionColumnFeature = useUserHasFeature(\n Feature.TablePinActionColumn\n );\n\n return useMemo<\n Record<\n MarketplacePaymentsTableColumnId,\n ColumnDef\n >\n >(() => {\n // Reuse dates for same values\n const datesMap: Map = new Map();\n\n return {\n [MarketplacePaymentsTableColumnId.PaymentDate]: {\n id: MarketplacePaymentsTableColumnId.PaymentDate,\n accessorFn: (data) => data?.pmtDate,\n header: (params) => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_SM,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ getValue, row: { original } }) => {\n const date = getValue();\n if (!original) {\n return (\n \n );\n }\n\n if (!date) {\n return null;\n }\n\n if (!datesMap.has(date)) {\n datesMap.set(\n date,\n \n );\n }\n return {datesMap.get(date)};\n },\n sortingFn: safeSortDateTime,\n },\n [MarketplacePaymentsTableColumnId.Marketplace]: {\n id: MarketplacePaymentsTableColumnId.Marketplace,\n accessorFn: (data) => data?.mkp,\n header: (params) => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_SM,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ getValue, row: { original } }) => {\n const marketplace = getValue();\n if (!original) {\n return (\n \n );\n }\n\n return (\n \n \n \n );\n },\n },\n [MarketplacePaymentsTableColumnId.PaymentReferenceID]: {\n id: MarketplacePaymentsTableColumnId.PaymentReferenceID,\n accessorFn: (data) => data?.extPmtId,\n header: (params) => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_DEFAULT_SIZE_BASE,\n maxSize: COLUMN_DEFAULT_SIZE_LG,\n cell: ({ getValue, row: { original } }) => {\n const pmtRefId = getValue();\n if (!original) {\n return (\n \n );\n }\n return {pmtRefId};\n },\n },\n [MarketplacePaymentsTableColumnId.State]: {\n id: MarketplacePaymentsTableColumnId.State,\n accessorFn: (data) => data?.state,\n header: (params) => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_SM,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n const state = getValue();\n const stateTitle = useContent(\n MARKETPLACE_SALE_PAYMENT_STATE_TO_CID[\n state || MarketplacePaymentState.Ineligible\n ]\n );\n\n if (!original) {\n return (\n \n );\n }\n\n if (!state) {\n return null;\n }\n\n return (\n \n \n \n );\n },\n },\n [MarketplacePaymentsTableColumnId.PaymentAmount]: {\n id: MarketplacePaymentsTableColumnId.PaymentAmount,\n accessorFn: (data) => data?.pmtAmt,\n header: (params) => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_SM,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ getValue, row: { original } }) => {\n const pmtAmt = getValue();\n if (!original) {\n return (\n \n );\n }\n\n if (!pmtAmt) {\n return null;\n }\n\n return {pmtAmt.disp};\n },\n sortingFn: sortMoney,\n },\n [MarketplacePaymentsTableColumnId.ConvertedPaymentsAmount]: {\n id: MarketplacePaymentsTableColumnId.ConvertedPaymentsAmount,\n accessorFn: (data) => data?.convertedPmtAmt,\n header: (params) => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_SM,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ getValue, row: { original } }) => {\n const convertedPmtAmt = getValue();\n if (!original) {\n return (\n \n );\n }\n\n if (!convertedPmtAmt) {\n return null;\n }\n\n return (\n {convertedPmtAmt.disp}\n );\n },\n sortingFn: sortMoney,\n },\n [MarketplacePaymentsTableColumnId.CreditAmount]: {\n id: MarketplacePaymentsTableColumnId.CreditAmount,\n accessorFn: (data) => data?.credit,\n header: (params) => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_SM,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ getValue, row: { original } }) => {\n const credit = getValue();\n if (!original) {\n return (\n \n );\n }\n\n if (!credit) {\n return null;\n }\n\n return {credit.disp};\n },\n sortingFn: sortMoney,\n },\n [MarketplacePaymentsTableColumnId.ChargeAmount]: {\n id: MarketplacePaymentsTableColumnId.ChargeAmount,\n accessorFn: (data) => data?.charge,\n header: (params) => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_SM,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ getValue, row: { original } }) => {\n const charge = getValue();\n\n if (!original) {\n return (\n \n );\n }\n\n if (!charge) {\n return null;\n }\n\n return {charge.disp};\n },\n sortingFn: sortMoney,\n },\n [MarketplacePaymentsTableColumnId.ProceedsAmount]: {\n id: MarketplacePaymentsTableColumnId.ProceedsAmount,\n accessorFn: (data) => data?.proceedsAmt,\n header: (params) => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_SM,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ getValue, row: { original } }) => {\n const proceeds = getValue();\n\n if (!original) {\n return (\n \n );\n }\n\n if (!proceeds) {\n return null;\n }\n\n return {proceeds.disp};\n },\n sortingFn: sortMoney,\n },\n [MarketplacePaymentsTableColumnId.Actions]: {\n id: MarketplacePaymentsTableColumnId.Actions,\n accessorFn: (data) => data,\n header: (params) => (\n \n \n \n ),\n enableResizing: !hasTablePinActionColumnFeature,\n enableSorting: false,\n size: COLUMN_DEFAULT_SIZE_SM,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ getValue, row: { original } }) => {\n if (!original) {\n return (\n \n );\n }\n const marketplaceSalePayment = getValue();\n return (\n \n \n \n );\n },\n },\n };\n }, [hasTablePinActionColumnFeature]);\n};\n","import { useMemo } from 'react';\nimport { useMarketplacePaymentsTableColumnsConfig } from 'src/tables/MarketplacePaymentsTable';\nimport { getEventsColumnConfigById } from 'src/utils/columns/columnUtils';\nimport { MarketplacePaymentsTableColumnId } from 'src/utils/columns/marketplacePayments/marketplacePaymentsColumnsUtils.types';\n\nexport const useDefaultPaymentsColumnConfig = () => {\n const paymentColumnConfig = useMarketplacePaymentsTableColumnsConfig();\n return useMemo(\n () =>\n Object.values(paymentColumnConfig)\n .filter((item) => {\n const columnConfig = getEventsColumnConfigById(\n item.id as MarketplacePaymentsTableColumnId\n );\n return (\n !columnConfig.personalization.isHiddenByDefault &&\n (columnConfig.personalization.isConfigurable ||\n columnConfig.personalization.isRequired)\n );\n })\n .map((column) => column.id as MarketplacePaymentsTableColumnId),\n [paymentColumnConfig]\n );\n};\n","import { EventAccordionItemBodyComponentType } from 'src/components/Accordions';\nimport { FormatOptionEntries } from 'src/modals/EditTableColumns';\nimport { PurchasesTableColumnId } from 'src/utils/columns/purchases/purchasesColumnUtils.types';\nimport {\n PurchaseOrderTicketGroup,\n PurchaseViewMode,\n} from 'src/WebApiController';\n\nimport { TableProps } from '../Table/Table';\n\nexport const SHIMMERING_DIV_HEIGHT_SINGLE_PURCHASE = '30px';\n\nexport type PurchaseOrderTableDataProps = {\n useVirtuoso?: boolean;\n} & Pick<\n EventAccordionItemBodyComponentType,\n | 'onMount'\n | 'onUnmount'\n | 'initState'\n | 'disablePagination'\n | 'onItemSelectionsChanged'\n | 'entities'\n | 'entityCount'\n | 'getDataFail'\n | 'enableColumnFilters'\n>;\n\nexport type PurchaseOrderTableProps = PurchaseOrderTableDataProps & {\n groupId: string; // First of month, or event virtualId\n viewMode?: PurchaseViewMode;\n alwaysShowCheckbox?: boolean;\n showSelectAllOnHeader?: boolean;\n isItemsLoading?: boolean;\n rowSupportsAccordion?: boolean;\n columnVisibilityOverride?: PurchasesTableColumnId[];\n formatOptionOverrides?: FormatOptionEntries;\n withOuterPadding?: boolean;\n disableSelection?: boolean;\n isSideTable?: boolean;\n ignoreMaxCount?: boolean;\n} & Pick<\n TableProps,\n 'RowComponent' | 'virtuosoItemSize'\n >;\n","import { useMemo } from 'react';\nimport { useGetUserInfos } from 'src/hooks/userGetUserInfo';\nimport { SHIMMERING_DIV_HEIGHT_SINGLE_PURCHASE } from 'src/tables/PurchaseTable/PurchaseTable.types';\nimport { TableShimmeringDiv } from 'src/tables/Table';\nimport { Commission } from 'src/WebApiController';\n\ninterface CommissionsCellProps {\n commissions: Commission[] | null;\n}\n\nexport const CommissionsCell = ({ commissions }: CommissionsCellProps) => {\n const usersIds = useMemo(\n () => (commissions ?? [])?.map((commission) => commission.buyerUserId),\n [commissions]\n );\n\n const { isLoading: isLoadingUsers, data: usersMap } =\n useGetUserInfos(usersIds);\n\n return useMemo(() => {\n if (!commissions) {\n return null;\n }\n\n if (isLoadingUsers || !usersMap) {\n return (\n \n );\n }\n\n return commissions\n .map(\n (commission: Commission) =>\n `${usersMap[commission.buyerUserId]?.name} ${(\n commission.commissionPercentage * 100\n ).toFixed(2)}%`\n )\n .join(', ');\n }, [commissions, isLoadingUsers, usersMap]);\n};\n","import { useCallback, useContext } from 'react';\nimport { Link, useNavigate } from 'react-router-dom';\nimport { IconButton } from 'src/components/Buttons';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { ModalContext } from 'src/contexts/ModalContext/ModalContext';\nimport { vars } from 'src/core/themes';\nimport { MainRoute } from 'src/navigations/Routes/MainRoute';\nimport { OpenLinkIcon } from 'src/svgs/OpenLinkIcon';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n getPurchaseOrderDeepLinkUrl,\n getPurchaseOrderDetailsModalConfigWithDeepLink,\n getPurchaseOrderRelativeUrl,\n} from 'src/utils/purchaseUtils';\nimport { PurchaseOrderDetails } from 'src/WebApiController';\n\nexport const PurchaseActionsCell = ({\n purchaseOrderId,\n linkOnly,\n}: {\n purchaseOrderId: number;\n linkOnly?: boolean;\n}) => {\n const { setActivePosEntity } =\n useActivePosEntityContext();\n const { setModal } = useContext(ModalContext);\n const { mainRoute } = useAppContext();\n const navigate = useNavigate();\n\n const onViewClick = useCallback(\n async (newTab: boolean) => {\n if (newTab) {\n window.open(getPurchaseOrderDeepLinkUrl(purchaseOrderId), '_blank');\n } else if (mainRoute === MainRoute.Purchases) {\n setActivePosEntity(purchaseOrderId, undefined, true);\n setModal(\n getPurchaseOrderDetailsModalConfigWithDeepLink(purchaseOrderId)\n );\n } else {\n navigate(getPurchaseOrderRelativeUrl(purchaseOrderId));\n }\n },\n [setActivePosEntity, purchaseOrderId, setModal, mainRoute, navigate]\n );\n\n return (\n {\n if (e.button === 0 && e.getModifierState('Control') === false) {\n // Perform like a button click when it's a left-click (and no Ctrl)\n // Else the click will be whatever does\n e.preventDefault();\n e.stopPropagation();\n\n onViewClick(!!linkOnly);\n }\n }}\n >\n \n }\n titleContentId={ContentId.ViewDetails}\n />\n \n );\n};\n","import { useMemo } from 'react';\nimport { isCancelledState } from 'src/utils/purchaseUtils';\nimport { PurchaseOrder } from 'src/WebApiController';\n\nimport * as styles from './PurchaseTableColumnsConfig.css';\n\ntype PurchaseCellProps = Pick<\n PurchaseOrder,\n 'vendor' | 'vendOrdId' | 'poState'\n>;\n\nexport function PurchaseIdCell({\n vendor,\n vendOrdId,\n poState,\n}: PurchaseCellProps) {\n const isCancelled = isCancelledState(poState);\n\n const titleText = useMemo(() => {\n let text = `#${vendOrdId}`;\n if (vendor) {\n text += ` - ${vendor.name}`;\n }\n return text;\n }, [vendOrdId, vendor]);\n\n return (\n
    \n
    \n #{vendOrdId}\n {vendor?.name}\n
    \n {isCancelled && (\n
    \n {poState}\n
    \n )}\n
    \n );\n}\n","import {\n ColumnDef,\n createColumnHelper,\n FilterFnOption,\n} from '@tanstack/react-table';\nimport { format, startOfDay, startOfMonth } from 'date-fns';\nimport { useCallback, useContext, useMemo } from 'react';\nimport { Link, useNavigate } from 'react-router-dom';\nimport { IconButton } from 'src/components/Buttons';\nimport { MultiSelectAll } from 'src/components/common/MultiSelect/MultiSelectAll';\nimport { SeatingInfo } from 'src/components/common/SeatingInfo';\nimport { EventDateDisplay } from 'src/components/Events/EventInfo';\nimport { ListingNotesDisplay } from 'src/components/Listings/ListingDisplay/ListingNotesDisplay';\nimport { CommissionsCell } from 'src/components/Purchases/CommissionsCell';\nimport { TagValueDisplay } from 'src/components/TagsFormBody/TagValueCell';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport {\n COLUMN_DEFAULT_SIZE_BASE,\n COLUMN_DEFAULT_SIZE_LG,\n COLUMN_DEFAULT_SIZE_XL,\n COLUMN_DEFAULT_SIZE_XS,\n COLUMN_MAX_SIZE,\n COLUMN_MIN_SIZE,\n} from 'src/contexts/ColumnResizingContext/ColumnResizingContext.types';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport {\n NO_GROUP_ID,\n TableRow,\n useMultiSelectionContext,\n} from 'src/contexts/MultiSelectionContext';\nimport { useSellerAccountContext } from 'src/contexts/SellerAccountContext';\nimport { useSiteTimezoneContext } from 'src/contexts/SiteTimezoneContext/SiteTimezoneContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport * as PosCollapsible from 'src/core/POS/PosCollapsible';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { CopyToClipboardV2 } from 'src/core/ui/CopyToClipboard/CopyToClipboardV2';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { TableHeaderCellDiv } from 'src/core/ui/TableHeaderCellDiv';\nimport { useColumnUserSetting } from 'src/hooks/useColumnUserSetting';\nimport { useMapDeliveryTypesToString } from 'src/hooks/useMapDeliveryTypesToString';\nimport { getUserDisplayName, useGetUserInfos } from 'src/hooks/userGetUserInfo';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport {\n FormatOption,\n FormatOption_Seating,\n FormatOptionEntries,\n} from 'src/modals/EditTableColumns';\nimport { LaunchDownloadUserDocuments } from 'src/modals/PurchaseWizard/LaunchDownloadUserDocuments';\nimport { PredeliveryActionsDropdown } from 'src/modals/PurchaseWizard/PurchaseTicketsFlow/components/PredeliveryActionsDropdown';\nimport { UploadPredeliveryAction } from 'src/modals/PurchaseWizard/PurchaseTicketsFlow/purchaseTicketsFlow.utils';\nimport { TicketGroupEditContext } from 'src/modals/PurchaseWizard/PurchaseWizard.types';\nimport { MainRoute } from 'src/navigations/Routes/MainRoute';\nimport { OpenLinkIcon } from 'src/svgs';\nimport {\n EditIcon,\n ExpandIcon,\n ForwardIcon,\n IconsFill,\n PaymentSize,\n UploadIcon,\n} from 'src/svgs/Viagogo';\nimport { SEATING_SORTING_FN_NAME } from 'src/tables/common/hooks/useSeatingColumnSorting';\nimport { CustomNumericCell } from 'src/tables/ListingTable/configs/CustomNumericCell';\nimport { PurchaseActionsCell } from 'src/tables/PurchaseTable/configs/PurchaseActionsCell';\nimport { SeatInfoContainer, TableShimmeringDiv } from 'src/tables/Table';\nimport { PurchasesTableColumnId } from 'src/utils/columns/purchases/purchasesColumnUtils.types';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n PURCHASE_PAYMENT_STATUS_TO_CID,\n PURCHASE_TABLE_COLUMN_ID_TO_CONTENT_ID,\n QUALITY_CONTROL_STATE_TO_CID,\n} from 'src/utils/constants/contentIdMaps';\nimport { stringToUtcDate } from 'src/utils/dateTimeUtils';\nimport { isInFullPageEventView } from 'src/utils/deepLinkUtils';\nimport {\n EVENT_TYPE_PARKING,\n getEventPerformerVenue,\n lookupEventInCatalog,\n} from 'src/utils/eventWithDataUtils';\nimport { applyNumberFormatting } from 'src/utils/numberFormatter';\nimport { getPaymentMethodIcon } from 'src/utils/paymentMethodUtils';\nimport { posField } from 'src/utils/posFieldUtils';\nimport {\n combineWithTicketGroupId,\n formatConversionRate,\n getPurchaseOrderDeepLinkUrl,\n getPurchaseOrderDetailsModalConfigWithDeepLink,\n getPurchaseOrderRelativeUrl,\n} from 'src/utils/purchaseUtils';\nimport {\n filterSeatingSectionFn,\n filterSeatRangeFn,\n filterSeatTraitsFn,\n filterStringMultiSelect,\n sortGeneric,\n sortMoney,\n sortSeatingSeatsForTable,\n} from 'src/utils/tableUtils';\nimport { getDeliveryTypeIcon } from 'src/utils/ticketTypeUtils';\nimport {\n SECTION_TYPE_TO_PRECISION_SETTING,\n SectionType,\n} from 'src/utils/types/sectionType';\nimport {\n Commission,\n DeliveryType,\n Event,\n Feature,\n ListingNote,\n PurchaseOrderDetails,\n PurchaseOrderTicketGroup,\n PurchasePaymentStatus,\n QualityControlState,\n Seating,\n TagsValueType,\n TicketGroupEditReason,\n} from 'src/WebApiController';\n\nimport { SHIMMERING_DIV_HEIGHT_SINGLE_PURCHASE } from '../PurchaseTable.types';\nimport { PurchaseIdCell } from './PurchaseIdCell';\nimport * as styles from './PurchaseTableColumnsConfig.css';\n\nconst getSeating = (\n purchaseOrderTicketGroup: PurchaseOrderTicketGroup | null\n): Seating | null => {\n if (!purchaseOrderTicketGroup) {\n return null;\n }\n const ticketGroupToGetSeating = purchaseOrderTicketGroup.isTktGrp\n ? purchaseOrderTicketGroup\n : purchaseOrderTicketGroup.ticketGroupItems?.[0];\n\n if (ticketGroupToGetSeating?.seating == null) {\n return null;\n }\n\n return ticketGroupToGetSeating.seating;\n};\n\nconst columnHelper = createColumnHelper();\n\nexport const PURCHASE_TABLE_COLUMNS_CONFIG: ColumnDef<\n PurchaseOrderTicketGroup | null,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n any\n>[] = [\n columnHelper.accessor((data) => (data ? data : null), {\n id: PurchasesTableColumnId.Checkbox,\n enableSorting: false,\n enableResizing: false,\n header: (props) => {\n return props.table.options.meta?.showSelectAllCheckbox ? (\n \n \n \n ) : (\n ''\n );\n },\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_DEFAULT_SIZE_BASE,\n maxSize: COLUMN_DEFAULT_SIZE_BASE,\n cell: function Cell({\n row: { id, original, getIsSelected, depth, getCanSelectSubRows },\n table,\n }) {\n const {\n setShiftKeyRowSelectionState,\n isNoGroupIdSet,\n shouldHideCheckboxes,\n } = useMultiSelectionContext();\n if (!original || !original.poDate) {\n return (\n \n );\n }\n\n // We don't want to display this if the row is a ticket group\n if (\n original.isTktGrp &&\n table.options.meta?.sectionType !== SectionType.PurchaseEvent &&\n table.options.meta?.sectionType !== SectionType.PurchaseSideTable\n ) {\n return null;\n }\n\n const canSelect = getCanSelectSubRows() || depth === 0;\n return canSelect ? (\n \n {\n if (!original.poDate) {\n return;\n }\n let groupId = NO_GROUP_ID; // List View\n if (!isNoGroupIdSet()) {\n // Event View (TicketGroups)\n if (\n original.isTktGrp &&\n original.tgId &&\n original.viagVirtualId\n ) {\n groupId = original.viagVirtualId;\n } else {\n // Time View\n const startOfMonthDate = startOfDay(\n startOfMonth(stringToUtcDate(original.poDate))\n );\n groupId = format(startOfMonthDate, \"yyyy-MM-dd'T00:00:00'\");\n }\n }\n setShiftKeyRowSelectionState(\n id,\n table.getRowModel().rows as unknown as TableRow[],\n groupId\n );\n }}\n />\n \n ) : null;\n },\n }),\n columnHelper.accessor((data) => (data ? data : null), {\n id: PurchasesTableColumnId.AccordianToggle,\n enableSorting: false,\n header: '',\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_XS,\n minSize: COLUMN_DEFAULT_SIZE_XS,\n maxSize: COLUMN_DEFAULT_SIZE_XS,\n meta: {\n styleOverrides: { padding: 0 },\n },\n cell: ({\n row: { original, toggleExpanded, getCanExpand, getIsExpanded },\n }) => {\n const canExpand = getCanExpand();\n const isExpanded = getIsExpanded();\n const Icon = isExpanded ? ExpandIcon : ForwardIcon;\n\n if (original?.isTktGrp) {\n return null;\n }\n\n return (\n \n \n {canExpand && (\n {\n e.stopPropagation();\n e.preventDefault();\n toggleExpanded(!isExpanded);\n }}\n />\n )}\n \n \n );\n },\n }),\n columnHelper.accessor((data) => (data ? data.poDate || '' : null), {\n id: PurchasesTableColumnId.PurchaseDate,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_XL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n enableSorting: true,\n cell: function Cell({\n getValue,\n row: { original },\n table: {\n options: { meta },\n },\n column,\n }) {\n const columnId = column.id;\n const value = getValue();\n const rowSupportsAccordion = meta?.rowSupportsAccordion;\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n meta?.sectionType || SectionType.Purchases\n );\n const { timeZone } = useSiteTimezoneContext();\n\n const date = applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value,\n isDateTime: true,\n enableUtcFallback: true,\n timeZone,\n }) as string;\n if (!original) {\n return (\n \n );\n }\n\n // We don't want to display this if the row is a ticket group\n if (\n original.isTktGrp &&\n meta?.sectionType !== SectionType.PurchaseEvent &&\n meta?.sectionType !== SectionType.PurchaseSideTable\n ) {\n return null;\n }\n\n return (\n \n \n {rowSupportsAccordion && (\n e.stopPropagation()}\n className={styles.purchaseOrderTableCollapseTrigger}\n FoldIcon={ExpandIcon}\n ExpandIcon={ForwardIcon}\n iconSize={vars.iconSize.s}\n />\n )}\n {value == null ? (\n \n ) : (\n
    {date}
    \n )}\n
    \n
    \n );\n },\n sortingFn: 'datetime',\n }),\n columnHelper.accessor((data) => (data ? data : null), {\n id: PurchasesTableColumnId.VendorOrderId,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_XL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ getValue, row: { original }, table }) => {\n // We don't want to display this if the row is a ticket group\n if (\n original?.isTktGrp &&\n table.options.meta?.sectionType !== SectionType.PurchaseEvent &&\n table.options.meta?.sectionType !== SectionType.PurchaseSideTable\n ) {\n return null;\n }\n\n const value = getValue();\n if (value == null) {\n return (\n \n );\n }\n\n const rawIdOnly =\n table.options.meta?.formatOptionOverrides?.[\n PurchasesTableColumnId.VendorOrderId\n ] === FormatOption.Id_RawIdOnly;\n\n return (\n \n \n \n \n \n \n \n );\n },\n }),\n columnHelper.accessor((data) => (data ? data.delivType : null), {\n id: PurchasesTableColumnId.Shipment,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n const delivType = getValue();\n const strDelivType = useMapDeliveryTypesToString({\n deliveryTypesObj: {\n delivType,\n },\n });\n\n if (!original) {\n return (\n \n );\n }\n if (!delivType) return null;\n const icon = getDeliveryTypeIcon(delivType, null, IconsFill.textStrong);\n return (\n \n {icon}\n \n );\n },\n }),\n columnHelper.accessor((data) => (data ? data.tktGrpCnt : null), {\n id: PurchasesTableColumnId.Orders,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ getValue, row: { original }, table }) => {\n const value = getValue();\n if (!original) {\n return (\n \n );\n }\n\n // We don't want to display this if the row is a ticket group\n if (\n original.isTktGrp &&\n table.options.meta?.sectionType !== SectionType.PurchaseEvent &&\n table.options.meta?.sectionType !== SectionType.PurchaseSideTable\n ) {\n return null;\n }\n return {value ?? 0};\n },\n }),\n columnHelper.accessor((data) => (data ? data.ticketCnt : null), {\n id: PurchasesTableColumnId.Tickets,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ getValue, row: { original } }) => {\n const value = getValue();\n if (!original) {\n return (\n \n );\n }\n return {value ?? 0};\n },\n }),\n columnHelper.accessor((data) => (data ? data.pmtMethod : null), {\n id: PurchasesTableColumnId.Payment,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ getValue, row: { original }, table }) => {\n const value = getValue();\n if (!original) {\n return (\n \n );\n }\n\n // We don't want to display this if the row is a ticket group\n if (\n original.isTktGrp &&\n table.options.meta?.sectionType !== SectionType.PurchaseEvent &&\n table.options.meta?.sectionType !== SectionType.PurchaseSideTable\n ) {\n return null;\n }\n if (!value) return null;\n const PurchaseMethodIcon = getPaymentMethodIcon(value);\n return (\n \n \n \n );\n },\n }),\n columnHelper.accessor((data) => (data ? data.totalCst : null), {\n id: PurchasesTableColumnId.Cost,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ getValue }) => {\n const value = getValue();\n if (value == null) {\n return (\n \n );\n }\n return {value.disp};\n },\n sortingFn: sortMoney,\n }),\n columnHelper.accessor((data) => (data ? data.totalPmt : null), {\n id: PurchasesTableColumnId.TotalPayment,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ getValue, row: { original } }) => {\n const value = getValue();\n if (original == null) {\n return (\n \n );\n }\n return {value?.disp};\n },\n sortingFn: sortMoney,\n }),\n columnHelper.accessor((data) => (data ? data.totalConvertedPmt : null), {\n id: PurchasesTableColumnId.TotalConvertedPayment,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ getValue, row: { original } }) => {\n const value = getValue();\n if (original == null) {\n return (\n \n );\n }\n return {value?.disp};\n },\n sortingFn: sortMoney,\n }),\n columnHelper.accessor((data) => (data ? data.pmtConvRate : null), {\n id: PurchasesTableColumnId.PaymentConversionRate,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ getValue, row: { original } }) => {\n const value = getValue();\n if (original == null) {\n return (\n \n );\n }\n return (\n \n {formatConversionRate(\n value,\n original.totalPmt?.currency,\n original.totalConvertedPmt?.currency\n )}\n \n );\n },\n sortingFn: sortMoney,\n }),\n columnHelper.accessor((data) => (data ? data.pmtStat : null), {\n id: PurchasesTableColumnId.PaymentStatus,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ getValue, row: { original }, table }) => {\n // We don't want to display this if the row is a ticket group\n if (\n original?.isTktGrp &&\n table.options.meta?.sectionType !== SectionType.PurchaseEvent &&\n table.options.meta?.sectionType !== SectionType.PurchaseSideTable\n ) {\n return null;\n }\n\n const value = getValue();\n if (value == null) {\n return (\n \n );\n }\n\n return (\n \n \n \n );\n },\n }),\n columnHelper.accessor((data) => (data ? (data.qcState ?? null) : undefined), {\n id: PurchasesTableColumnId.QualityControlState,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ getValue, row: { original }, table }) => {\n // We don't want to display this if the row is a ticket group\n if (\n original?.isTktGrp &&\n table.options.meta?.sectionType !== SectionType.PurchaseEvent &&\n table.options.meta?.sectionType !== SectionType.PurchaseSideTable\n ) {\n return null;\n }\n\n const value = getValue() as QualityControlState;\n if (value === undefined) {\n return (\n \n );\n }\n return (\n \n \n \n );\n },\n }),\n columnHelper.accessor((data) => (data ? data.buyerId || '' : null), {\n id: PurchasesTableColumnId.BuyerUserId,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n enableSorting: true,\n cell: function Cell({ getValue, row: { original }, table }) {\n const { allActiveUserInfos, allUserInfos } = useSellerAccountContext();\n const sellerUserId = getValue();\n const displayNamesFormatted = useMemo(\n () =>\n sellerUserId ? allActiveUserInfos?.[sellerUserId]?.displayName : null,\n [allActiveUserInfos, sellerUserId]\n );\n if (!original) {\n return (\n \n );\n }\n\n // We don't want to display this if the row is a ticket group\n if (\n original.isTktGrp &&\n table.options.meta?.sectionType !== SectionType.PurchaseEvent &&\n table.options.meta?.sectionType !== SectionType.PurchaseSideTable\n ) {\n return null;\n }\n return {displayNamesFormatted};\n },\n }),\n columnHelper.display({\n id: PurchasesTableColumnId.Actions,\n enableSorting: false,\n enableResizing: true,\n header: function Cell() {\n const hasTablePinActionColumnFeature = useUserHasFeature(\n Feature.TablePinActionColumn\n );\n\n if (hasTablePinActionColumnFeature) {\n return null;\n }\n\n return (\n \n \n \n );\n },\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ row: { original }, table }) {\n const { setActivePosEntity } =\n useActivePosEntityContext();\n const { setModal } = useContext(ModalContext);\n const { mainRoute } = useAppContext();\n const navigate = useNavigate();\n\n const onAmendTickets = useCallback(\n (ticketGroupEditContext?: Partial) => {\n const ticketGroupId = original?.isTktGrp\n ? original!.tgId!\n : original?.ticketGroupItems?.[0]?.tgId;\n setActivePosEntity(original!.id, undefined, true);\n ticketGroupId &&\n setModal(\n getPurchaseOrderDetailsModalConfigWithDeepLink(\n combineWithTicketGroupId(original!.id, {\n ...ticketGroupEditContext,\n ticketGroupId,\n editIntention: TicketGroupEditReason.AmendTickets,\n })\n )\n );\n },\n [original, setActivePosEntity, setModal]\n );\n\n const ticketGroupNavId = useMemo(() => {\n const ticketGroupId = original?.isTktGrp\n ? original!.tgId!\n : original?.ticketGroupItems?.[0]?.tgId;\n\n return (\n original &&\n ticketGroupId &&\n combineWithTicketGroupId(original.id, {\n ticketGroupId: ticketGroupId,\n })\n );\n }, [original]);\n\n const onViewTicketGroup = useCallback(\n (newTab: boolean) => {\n const inFullPageEventView = isInFullPageEventView(mainRoute);\n if (ticketGroupNavId) {\n if (newTab) {\n window.open(\n getPurchaseOrderDeepLinkUrl(ticketGroupNavId),\n '_blank'\n );\n } else if (\n mainRoute === MainRoute.Purchases ||\n inFullPageEventView\n ) {\n setActivePosEntity(original!.id, undefined, true);\n setModal(\n getPurchaseOrderDetailsModalConfigWithDeepLink(ticketGroupNavId)\n );\n } else {\n navigate(getPurchaseOrderRelativeUrl(ticketGroupNavId));\n }\n } else {\n if (newTab) {\n window.open(getPurchaseOrderDeepLinkUrl(original!.id), '_blank');\n } else {\n setActivePosEntity(original!.id, undefined, true);\n setModal(\n getPurchaseOrderDetailsModalConfigWithDeepLink(original!.id)\n );\n }\n }\n },\n [\n mainRoute,\n navigate,\n original,\n setActivePosEntity,\n setModal,\n ticketGroupNavId,\n ]\n );\n\n if (!original) {\n return (\n \n );\n }\n\n const linkOnly =\n table.options.meta?.formatOptionOverrides?.[\n PurchasesTableColumnId.Actions\n ] === FormatOption.Actions_LinkOnly;\n\n let predeliveryActions = null;\n const ticketGroup = original.isTktGrp\n ? original\n : original.ticketGroupItems?.[0];\n\n if (!linkOnly && ticketGroup) {\n predeliveryActions = (\n \n }\n />\n }\n ticketGroup={{ tickets: posField(ticketGroup.tickets) }}\n onPredeliveryAction={(\n uploadPredeliveryAction: UploadPredeliveryAction\n ) => {\n onAmendTickets({\n additionalData: {\n amendActionData: {\n uploadPredeliveryAction: uploadPredeliveryAction,\n },\n },\n });\n }}\n />\n );\n }\n\n if (\n original.isTktGrp ||\n (table.options.meta?.sectionType !== SectionType.PurchaseEvent &&\n table.options.meta?.sectionType !== SectionType.PurchaseSideTable)\n ) {\n return (\n \n \n {!linkOnly && ticketGroupNavId && (\n <>\n }\n onClick={() => onAmendTickets()}\n titleContentId={ContentId.AmendTickets}\n />\n {ticketGroup?.canGetDocArts ? (\n \n ) : (\n predeliveryActions\n )}\n \n )}\n {\n if (\n e.button === 0 &&\n e.getModifierState('Control') === false\n ) {\n // Perform like a button click when it's a left-click (and no Ctrl)\n // Else the click will be whatever
    does\n e.preventDefault();\n e.stopPropagation();\n\n onViewTicketGroup(!!linkOnly);\n }\n }}\n >\n \n }\n titleContentId={ContentId.ViewDetails}\n />\n \n \n \n );\n }\n return (\n \n {original.ticketGroupItems?.length === 1 && (\n <>\n {ticketGroup?.canGetDocArts ? (\n \n ) : (\n predeliveryActions\n )}\n \n )}\n \n \n );\n },\n }),\n columnHelper.accessor((data) => (data ? data.vendAcc?.email || '' : null), {\n id: PurchasesTableColumnId.VendorAccountEmail,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n enableSorting: true,\n cell: function Cell({ getValue, row: { original }, table }) {\n const vendorAccountEmail = getValue() as string;\n\n if (!original) {\n return (\n \n );\n }\n\n // We don't want to display this if the row is a ticket group\n if (\n original.isTktGrp &&\n table.options.meta?.sectionType !== SectionType.PurchaseEvent &&\n table.options.meta?.sectionType !== SectionType.PurchaseSideTable\n ) {\n return null;\n }\n\n return {vendorAccountEmail};\n },\n sortingFn: sortGeneric,\n }),\n columnHelper.accessor((data) => (data ? data.insertBy || '' : null), {\n id: PurchasesTableColumnId.CreatedBy,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original }, table }) {\n const deactivatedText = useContent(ContentId.Deactivated);\n const insertByUserId = getValue() as string;\n const getUserInfosQuery = useGetUserInfos([insertByUserId]);\n\n const displayUserName = useMemo(() => {\n const user = insertByUserId\n ? getUserInfosQuery.data?.[insertByUserId]\n : undefined;\n\n return user ? getUserDisplayName(user, deactivatedText) : '';\n }, [deactivatedText, getUserInfosQuery.data, insertByUserId]);\n\n if (!original) {\n return (\n \n );\n }\n\n // We don't want to display this if the row is a ticket group\n if (\n original.isTktGrp &&\n table.options.meta?.sectionType !== SectionType.PurchaseEvent &&\n table.options.meta?.sectionType !== SectionType.PurchaseSideTable\n ) {\n return null;\n }\n\n return {displayUserName};\n },\n }),\n columnHelper.accessor((data) => data, {\n id: PurchasesTableColumnId.Event,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_XL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n const multipleText = useContent(ContentId.Multiple);\n const purchaseOrder = getValue();\n const { data } = useCatalogDataContext();\n\n if (!original) {\n return (\n \n );\n }\n\n let displayText: string | null | undefined = null;\n let displayTitle: string | null | undefined = null;\n const { ticketGroupItems, isMultEv, isTktGrp, viagVirtualId } =\n purchaseOrder;\n\n const isValidTicketGroups =\n ticketGroupItems != null && ticketGroupItems.length > 1;\n\n const getEventDisplayName = (event: Event | null | undefined) => {\n if (event?.eventType === EVENT_TYPE_PARKING) {\n // In this case we don't want to show the parking icon to keep the cell plan text, so just display full name\n return event?.name;\n }\n return event?.shortName || event?.name;\n };\n\n const { event, performer, venue } = getEventPerformerVenue(\n viagVirtualId,\n data\n );\n const {\n event: firstTgEvent,\n performer: firstTgPerf,\n venue: firstTgVenue,\n } = getEventPerformerVenue(ticketGroupItems?.[0]?.viagVirtualId, data);\n\n const eventDisplayName = getEventDisplayName(event?.event);\n const firstTgEventDisplayName = getEventDisplayName(firstTgEvent?.event);\n\n const performerDisplayName = performer?.shortName || performer?.name;\n const firstTgPerformerDisplayName =\n firstTgPerf?.shortName || firstTgPerf?.name;\n\n if (isTktGrp && event) {\n displayText = eventDisplayName;\n displayTitle = event.event.name;\n } else if (isValidTicketGroups) {\n const ticketGroupItemHasPerformer = !!firstTgPerf?.name;\n\n const performerName =\n performerDisplayName || firstTgPerformerDisplayName;\n const performerFullName = performer?.name || performer?.shortName;\n\n const eventName = eventDisplayName || firstTgEventDisplayName;\n const eventFullName = event?.event?.name || firstTgEvent?.event?.name;\n\n // Performer field is not consitantly populated. We'll fallback to event name if performer is not available\n const displayName = ticketGroupItemHasPerformer\n ? performerName\n : eventName;\n const displayFullName = ticketGroupItemHasPerformer\n ? performerFullName\n : eventFullName;\n\n // If it's not multiple events we can skip additional checks\n if (!isMultEv) {\n displayText = displayName\n ? `${displayName} (${multipleText})`\n : multipleText;\n displayTitle = displayFullName\n ? `${displayFullName} (${multipleText})`\n : multipleText;\n } else {\n const allEventsSameName = ticketGroupItemHasPerformer\n ? ticketGroupItems?.every((tg) => tg.perfId === firstTgPerf?.viagId)\n : ticketGroupItems?.every((tg) => {\n const tgEv = lookupEventInCatalog(data, tg.viagVirtualId);\n return tgEv?.event?.name === firstTgEvent?.event?.name;\n });\n\n displayText =\n allEventsSameName && displayName\n ? `${displayName} (${multipleText})`\n : multipleText;\n displayTitle =\n allEventsSameName && displayFullName\n ? `${displayFullName} (${multipleText})`\n : multipleText;\n }\n } else if (event != null) {\n displayText = eventDisplayName;\n displayTitle = event?.event?.name;\n }\n\n return (\n \n {displayText}\n \n );\n },\n }),\n columnHelper.accessor((data) => data, {\n id: PurchasesTableColumnId.Venue,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_XL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n const purchaseOrder = getValue();\n const multipleText = useContent(ContentId.Multiple);\n const { data } = useCatalogDataContext();\n\n if (!original) {\n return (\n \n );\n }\n\n const { ticketGroupItems, isMultEv, tktGrpCnt, isTktGrp, viagVirtualId } =\n purchaseOrder;\n\n const { venue } = getEventPerformerVenue(viagVirtualId, data);\n\n const isMultipleEvents = isMultEv || tktGrpCnt > 1;\n\n const isValidTicketGroups =\n ticketGroupItems != null && ticketGroupItems.length > 1;\n\n let displayText: string | null = null;\n let displayTitle: string | null = null;\n\n if (isTktGrp && venue != null) {\n displayText = venue.shortName || venue.name;\n displayTitle = venue.name;\n } else if (isValidTicketGroups) {\n const { venue: firstTgVenue } = getEventPerformerVenue(\n ticketGroupItems?.[0]?.viagVirtualId,\n data\n );\n\n const venueName =\n venue?.shortName ||\n venue?.name ||\n firstTgVenue?.shortName ||\n firstTgVenue?.name;\n const venueFullName = venue?.name || firstTgVenue?.name;\n\n // If it's not multiple events then that means venue is the same. We can skip additional checks\n if (!isMultipleEvents) {\n displayText = venueName ? venueName : multipleText;\n displayTitle = venueFullName ? venueFullName : multipleText;\n } else {\n const allEventsSameVenue = ticketGroupItems?.every(\n (tg) => tg.venId === firstTgVenue?.viagId\n );\n\n displayText =\n allEventsSameVenue && venueName ? venueName : multipleText;\n displayTitle =\n allEventsSameVenue && venueFullName ? venueFullName : multipleText;\n }\n } else if (venue != null) {\n displayText = venue.shortName || venue.name;\n displayTitle = venue.name;\n }\n\n if (displayText == null) {\n return null;\n }\n\n return (\n \n {displayText}\n \n );\n },\n }),\n columnHelper.accessor((data) => data, {\n id: PurchasesTableColumnId.EventDate,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original }, table }) {\n const purchaseOrder = getValue();\n const multipleText = useContent(ContentId.Multiple);\n const { data } = useCatalogDataContext();\n\n if (!original) {\n return (\n \n );\n }\n\n if (!purchaseOrder.isTktGrp && purchaseOrder.isMultEv) {\n return {multipleText};\n }\n\n const event = lookupEventInCatalog(data, purchaseOrder.viagVirtualId);\n if (event?.event == null) {\n return null;\n }\n\n const dates = event.event.dates;\n\n const customPrecision =\n table.options.meta?.formatOptionOverrides?.[\n PurchasesTableColumnId.EventDate\n ];\n\n const date = customPrecision\n ? (applyNumberFormatting({\n precision: customPrecision,\n inputNumber: dates?.start,\n isDateTime: true,\n }) as string)\n : undefined;\n\n return (\n \n {date ? (\n \n {date}\n \n ) : (\n \n )}\n \n );\n },\n }),\n columnHelper.accessor(\n (purchaseOrder) => {\n const seating = getSeating(purchaseOrder);\n\n if (seating == null) {\n return null;\n }\n\n return {\n seating,\n };\n },\n {\n id: PurchasesTableColumnId.Seating,\n header: function Header({\n table: {\n options: { meta },\n },\n column,\n }) {\n const seatingText = useContent(\n PURCHASE_TABLE_COLUMN_ID_TO_CONTENT_ID[PurchasesTableColumnId.Seating]\n );\n const sectionText = useContent(ContentId.Section);\n const { userDefinedPrecision } = useColumnUserSetting(\n column.id,\n meta?.sectionType || SectionType.PurchaseEvent\n );\n\n const isSectionOnly =\n userDefinedPrecision === FormatOption.Seating_SectionOnly;\n return (\n \n \n {isSectionOnly ? `${seatingText} (${sectionText})` : seatingText}\n \n \n );\n },\n enableColumnFilter: true,\n filterFn:\n filterSeatingSectionFn as FilterFnOption,\n meta: {\n uniqueValueVariant: 'seatingSection',\n },\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n table: {\n options: { meta },\n },\n row: { original },\n column,\n }) {\n const purchaseOrder = original;\n const multipleText = useContent(ContentId.Multiple);\n const columnId = column.id;\n const hasSeatTraitsColumnFeature = useUserHasFeature(\n Feature.SeatTraitsColumn\n );\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n meta?.sectionType || SectionType.PurchaseEvent\n );\n\n if (!purchaseOrder) {\n return (\n \n );\n }\n\n if (\n !purchaseOrder.isTktGrp &&\n (purchaseOrder.isMultEv || purchaseOrder.tktGrpCnt > 1)\n ) {\n return {multipleText};\n }\n\n const ticketGroupToGetSeating = purchaseOrder.isTktGrp\n ? purchaseOrder\n : purchaseOrder.ticketGroupItems?.[0];\n\n if (ticketGroupToGetSeating?.seating == null) {\n return null;\n }\n\n const { seating, seatTraits: listingNotes } = ticketGroupToGetSeating;\n const adjustedSeating =\n userDefinedPrecision === FormatOption_Seating.Seating_SectionOnly\n ? {\n ...seating,\n row: null,\n seatFr: null,\n seatTo: null,\n }\n : seating;\n\n return (\n \n \n {!hasSeatTraitsColumnFeature && listingNotes?.length ? (\n \n ) : null}\n \n );\n },\n sortingFn: SEATING_SORTING_FN_NAME,\n }\n ),\n columnHelper.accessor((data) => getSeating(data)?.row ?? '', {\n id: PurchasesTableColumnId.Row,\n header: () => (\n \n \n \n ),\n enableColumnFilter: true,\n filterFn:\n filterStringMultiSelect as FilterFnOption,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original: purchaseOrder } }) {\n const multipleText = useContent(ContentId.Multiple);\n if (!purchaseOrder) {\n return (\n \n );\n }\n\n if (\n !purchaseOrder.isTktGrp &&\n (purchaseOrder.isMultEv || purchaseOrder.tktGrpCnt > 1)\n ) {\n return {multipleText};\n }\n\n const ticketGroupToGetSeating = purchaseOrder.isTktGrp\n ? purchaseOrder\n : purchaseOrder.ticketGroupItems?.[0];\n\n if (ticketGroupToGetSeating?.seating == null) {\n return null;\n }\n\n const { seating } = ticketGroupToGetSeating;\n return {seating.row};\n },\n sortingFn: sortGeneric,\n }),\n columnHelper.accessor((data) => getSeating(data), {\n id: PurchasesTableColumnId.Seats,\n header: () => (\n \n \n \n ),\n enableColumnFilter: true,\n filterFn:\n filterSeatRangeFn as FilterFnOption,\n meta: {\n columnFilterVariant: 'seatRange',\n },\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ row: { original: purchaseOrder } }) {\n const multipleText = useContent(ContentId.Multiple);\n if (!purchaseOrder) {\n return (\n \n );\n }\n\n if (\n !purchaseOrder.isTktGrp &&\n (purchaseOrder.isMultEv || purchaseOrder.tktGrpCnt > 1)\n ) {\n return {multipleText};\n }\n\n const ticketGroupToGetSeating = purchaseOrder.isTktGrp\n ? purchaseOrder\n : purchaseOrder.ticketGroupItems?.[0];\n\n if (ticketGroupToGetSeating?.seating == null) {\n return null;\n }\n\n const { seating } = ticketGroupToGetSeating;\n return (\n \n \n \n );\n },\n sortingFn: sortSeatingSeatsForTable,\n }),\n columnHelper.accessor(\n (data) => {\n const ticketGroupToGetSeating = data?.isTktGrp\n ? data\n : data?.ticketGroupItems?.[0];\n\n return ticketGroupToGetSeating?.seatTraits;\n },\n {\n id: PurchasesTableColumnId.SeatTraits,\n header: () => (\n \n \n \n ),\n enableColumnFilter: true,\n filterFn:\n filterSeatTraitsFn as FilterFnOption,\n meta: {\n uniqueValueVariant: 'seatTraits',\n },\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original: purchaseOrder } }) {\n const multipleText = useContent(ContentId.Multiple);\n if (!purchaseOrder) {\n return (\n \n );\n }\n\n if (\n !purchaseOrder.isTktGrp &&\n (purchaseOrder.isMultEv || purchaseOrder.tktGrpCnt > 1)\n ) {\n return {multipleText};\n }\n\n const listingNotes = getValue();\n\n return (\n \n {listingNotes?.length ? (\n \n ) : null}\n \n );\n },\n enableSorting: false,\n }\n ),\n columnHelper.accessor((data) => data?.commissions, {\n id: PurchasesTableColumnId.Commissions,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original: purchaseOrder } }) {\n if (!purchaseOrder) {\n return (\n \n );\n }\n\n const commissions = getValue();\n\n if (!commissions) {\n return null;\n }\n\n return (\n \n \n \n );\n },\n sortingFn: sortGeneric,\n }),\n];\nconst SECTION_TYPE = SectionType.Purchases;\n\nexport const tagColumnDef = (\n tagName: string\n): ColumnDef => ({\n id: tagName,\n header: () => (\n \n \n {tagName}\n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n accessorFn: (data) => {\n const tag = data?.tags?.find((t) => t.key === tagName);\n if (\n tag?.valueType === TagsValueType.Int ||\n tag?.valueType === TagsValueType.Decimal\n ) {\n return tag ? parseFloat(tag.value) : null;\n }\n return tag?.value;\n },\n cell: function Cell({ getValue, row: { original }, table }) {\n const { value: storedColumnNumberPrecisions = {} } =\n useServerUserSetting({\n id: SECTION_TYPE_TO_PRECISION_SETTING[\n table.options.meta?.sectionType ?? SECTION_TYPE\n ],\n });\n const tag = original?.tags?.find((t) => t.key === tagName);\n\n if (\n tag?.valueType === TagsValueType.Int ||\n tag?.valueType === TagsValueType.Decimal\n ) {\n const userDefinedPrecision = storedColumnNumberPrecisions[tagName];\n\n return (\n ()}\n isLoading={Boolean(!original || !original)}\n shimmeringDivHeight={SHIMMERING_DIV_HEIGHT_SINGLE_PURCHASE}\n sectionType={table.options.meta?.sectionType ?? SECTION_TYPE}\n matchingTag={tag}\n currencyCode={original?.currency}\n />\n );\n }\n\n if (!original) {\n return (\n \n );\n }\n\n if (!tag) {\n return null;\n }\n\n return (\n \n \n \n );\n },\n});\n","import {\n AccessorReturn,\n AccessorReturnType,\n} from 'src/components/Reports/ReportsExport/ReportsExport.types';\nimport { SaleReportMetricsWithGroupBy } from 'src/utils/reportsUtils';\nimport { Money, UiMoney } from 'src/WebApiController';\n\nimport { SalesReportTableColumnId } from '../../../utils/columns/sales/salesColumnUtils.types';\n\n// Only primitive types / Money / AccessorReturn are allowed for proper support from ReportsExport.utils.ts\ntype SaleReportTableAccessorFn = (\n data: SaleReportMetricsWithGroupBy | null\n) =>\n | string\n | string[]\n | number\n | number[]\n | boolean\n | Money\n | UiMoney\n | AccessorReturn\n | null\n | undefined;\n\nexport const SALE_REPORT_TABLE_COLUMNS_ACCESSOR = {\n [SalesReportTableColumnId.Performer]: (data) => data?.performer?.name ?? '',\n [SalesReportTableColumnId.Venue]: (data) => data?.venue?.name ?? '',\n [SalesReportTableColumnId.Event]: (data) => data?.event?.name ?? '',\n [SalesReportTableColumnId.EventGenre]: (data) =>\n data?.genre ?? data?.event?.genre ?? '',\n [SalesReportTableColumnId.EventCountry]: (data) =>\n data?.country?.name ?? data?.venue?.country?.name ?? '',\n [SalesReportTableColumnId.EventCity]: (data) =>\n data?.city ?? data?.venue?.city ?? '',\n [SalesReportTableColumnId.SeatingSection]: (data) => data?.section ?? '',\n [SalesReportTableColumnId.SeatingRow]: (data) => data?.row ?? '',\n [SalesReportTableColumnId.SaleMarketplace]: (data) => data?.mkp ?? '',\n [SalesReportTableColumnId.SaleMonth]: (data) => data?.saleDate ?? '',\n [SalesReportTableColumnId.SaleWeek]: (data) => data?.saleDate ?? '',\n [SalesReportTableColumnId.SaleDay]: (data) => data?.saleDate ?? '',\n [SalesReportTableColumnId.QuantitySold]: (data) => data?.qtySold ?? 0,\n [SalesReportTableColumnId.Proceeds]: (data) => data?.netProcs,\n [SalesReportTableColumnId.SoldTicketCost]: (data) => data?.soldCst,\n [SalesReportTableColumnId.CommissionPercent]: (data) =>\n data?.commission?.commissionPercentage,\n\n [SalesReportTableColumnId.CommissionShare]: (data) => data?.commssionShr,\n [SalesReportTableColumnId.OutstandingBalance]: (data) => data?.ttlOutsBal,\n [SalesReportTableColumnId.Charges]: (data) => data?.chargs,\n [SalesReportTableColumnId.Credits]: (data) => data?.creds,\n [SalesReportTableColumnId.PandL]: (data) => data?.pandL,\n [SalesReportTableColumnId.Margin]: (data) => data?.marg,\n [SalesReportTableColumnId.EventId]: (data) => data?.event?.viagId ?? '',\n [SalesReportTableColumnId.Category]: (data) =>\n data?.performer?.categ[0] ?? '',\n [SalesReportTableColumnId.EventDate]: (data) =>\n data?.event?.dates?.start ?? '',\n\n [SalesReportTableColumnId.EventStateProvince]: (data) =>\n data?.venue?.state ?? '',\n [SalesReportTableColumnId.SaleId]: (data) => data?.saleId?.toString() ?? '',\n [SalesReportTableColumnId.MarketplaceSaleId]: (data) =>\n data?.mkpSaleId ? `#${data.mkpSaleId}` : '',\n [SalesReportTableColumnId.Status]: (data) => data?.saleStatus,\n [SalesReportTableColumnId.TicketType]: (data) => data?.ticketType,\n\n [SalesReportTableColumnId.InHandDate]: (data) => data?.inHandDate,\n\n [SalesReportTableColumnId.PaymentState]: (data) => ({\n stringValueType: AccessorReturnType.STRING,\n stringValues: data?.mkpPmtState ?? data?.pmtState,\n value: {\n marketplacePaymentState: data?.mkpPmtState,\n paymentState: data?.pmtState,\n },\n }),\n [SalesReportTableColumnId.PaymentReceived]: (data) => data?.pmtRcv,\n [SalesReportTableColumnId.PaymentReferenceId]: (data) => data?.pmtRefId,\n [SalesReportTableColumnId.PricedBy]: (data) => ({\n stringValueType: AccessorReturnType.SELLER_USER_ID,\n value: data?.pricerId,\n }),\n [SalesReportTableColumnId.Fulfiller]: (data) => ({\n stringValueType: AccessorReturnType.SELLER_USER_ID,\n value: data?.fulfillerId,\n }),\n [SalesReportTableColumnId.CommissionUser]: (data) => ({\n stringValueType: AccessorReturnType.SELLER_USER_ID,\n value: data?.commission?.buyerUserId,\n }),\n [SalesReportTableColumnId.PurchaseId]: (data) => data?.poInfos?.poIds,\n [SalesReportTableColumnId.PurchasedBy]: (data) => ({\n stringValueType: AccessorReturnType.PURCHASE_BUYER_INFOS,\n value: data?.poInfos?.buyers,\n }),\n [SalesReportTableColumnId.PurchaseDate]: (data) => data?.poInfos.poDates,\n [SalesReportTableColumnId.Vendor]: (data) => {\n if (!data) return null;\n const { poInfos } = data;\n if (!poInfos?.vendors.length) return null;\n return poInfos.vendors.map((v) => v.vendorName).join(', ');\n },\n [SalesReportTableColumnId.VendorAccountEmail]: (data) => {\n if (!data) return null;\n const { poInfos } = data;\n if (!poInfos?.vendorAccs.length) return null;\n return poInfos.vendorAccs.map((v) => v.encryptedEmailAddress).join(', ');\n },\n [SalesReportTableColumnId.SeatingSeats]: (data) => {\n if (!data?.seatFr) return null;\n let text = data.seatFr;\n if (data.seatTo && data.seatTo !== data.seatFr) {\n text += ` - ${data.seatTo}`;\n }\n return text;\n },\n [SalesReportTableColumnId.OrderDate]: (data) => data?.saleDate,\n [SalesReportTableColumnId.CancellationDate]: (data) => data?.cancelDate,\n [SalesReportTableColumnId.CurrencyCode]: (data) => data?.currency ?? '',\n [SalesReportTableColumnId.InternalNotes]: (data) => data?.privNotes ?? '',\n [SalesReportTableColumnId.TicketId]: (data) =>\n data?.ticketId?.toString() ?? '',\n [SalesReportTableColumnId.TicketGroupId]: (data) => data?.tktGrId?.toString(),\n [SalesReportTableColumnId.PaymentDate]: (data) => data?.lastPmtOn,\n [SalesReportTableColumnId.FulfillmentDate]: (data) => data?.fulfillDate,\n [SalesReportTableColumnId.PurchaseCreatedBy]: (data) => ({\n stringValueType: AccessorReturnType.SELLER_USER_ID,\n value: data?.poInfos?.createdBys,\n }),\n [SalesReportTableColumnId.MarketplacePaymentTerms]: (data) =>\n data?.mkpPmtTerm,\n} satisfies Record;\n","import { DateTimeRangeWithRelative } from 'src/WebApiController';\n\nconst DAY_IN_SECONDS = 86400;\nconst TIME_BUCKET_TOTAL_COLUMN_ID = 'timeBucketTotal';\n\nexport const timeBucketToDayString = (\n timeBucket: DateTimeRangeWithRelative,\n daysText: string,\n totalText: string\n) => {\n if (\n timeBucket.relativeStartSecs == null &&\n timeBucket.relativeEndSecs == null\n ) {\n return totalText;\n }\n if (timeBucket.relativeEndSecs == null) {\n return `${Math.floor(\n timeBucket.relativeStartSecs! / DAY_IN_SECONDS\n )}+ ${daysText}`;\n }\n\n return `${Math.floor(timeBucket.relativeStartSecs! / DAY_IN_SECONDS)}-${\n Math.floor(timeBucket.relativeEndSecs! / DAY_IN_SECONDS) - 1\n } ${daysText}`;\n};\n\nexport const timeBucketToColumnId = (timeBucket: DateTimeRangeWithRelative) =>\n timeBucket.relativeStartSecs != null || timeBucket.relativeEndSecs != null\n ? `${timeBucket.relativeStartSecs ?? ''}_${\n timeBucket.relativeEndSecs ?? ''\n }`\n : TIME_BUCKET_TOTAL_COLUMN_ID;\n","import { ColumnDef, createColumnHelper } from '@tanstack/react-table';\nimport { formatInTimeZone } from 'date-fns-tz';\nimport { useMemo } from 'react';\nimport { AccessorReturn } from 'src/components/Reports/ReportsExport/ReportsExport.types';\nimport {\n COLUMN_DEFAULT_SIZE_BASE,\n COLUMN_DEFAULT_SIZE_LG,\n COLUMN_DEFAULT_SIZE_XL,\n COLUMN_MAX_SIZE,\n COLUMN_MIN_SIZE,\n} from 'src/contexts/ColumnResizingContext/ColumnResizingContext.types';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useSellerAccountContext } from 'src/contexts/SellerAccountContext';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { TableHeaderCellDiv } from 'src/core/ui/TableHeaderCellDiv';\nimport { useColumnUserSetting } from 'src/hooks/useColumnUserSetting';\nimport { useGetUserInfos } from 'src/hooks/userGetUserInfo';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport {\n FormatOption,\n type FormatOptionEntries,\n} from 'src/modals/EditTableColumns';\nimport { CustomColumnName } from 'src/modals/InventoryTableColumns/CustomColumnName';\nimport { createInventoryEventUrl } from 'src/navigations/Routes/InventoryEvent/InventoryEvent.utils';\nimport { IconsFill } from 'src/svgs/Viagogo';\nimport { CustomNumericCell } from 'src/tables/ListingTable/configs/CustomNumericCell';\nimport { CustomNumericFooterCell } from 'src/tables/ListingTable/configs/CustomNumericFooterCell';\nimport { LinkCell } from 'src/tables/ReportTableCommon/LinkCell';\nimport { SHIMMERING_DIV_HEIGHT_REPORT } from 'src/tables/ReportTableCommon/ReportTableCommon.constants';\nimport { TableHeader } from 'src/tables/ReportTableCommon/TableHeader';\nimport { TextCell } from 'src/tables/ReportTableCommon/TextCell';\nimport { TableShimmeringDiv } from 'src/tables/Table/Table.styled';\nimport { DateCell, InHandCell } from 'src/tables/Table/TableCells';\nimport { evaluateFormulaSaleMetrics } from 'src/utils/columns/sales/salesCustomColumnUtils';\nimport { CustomSalesColumn } from 'src/utils/columns/sales/salesCustomColumnUtils.types';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n MARKETPLACE_PAYMENT_TERM_TO_CID,\n MARKETPLACE_SALE_PAYMENT_STATE_TO_CID,\n SALE_PAYMENT_STATE_TO_CID,\n TICKET_TYPE_TO_CID,\n} from 'src/utils/constants/contentIdMaps';\nimport { stringToUtcDate } from 'src/utils/dateTimeUtils';\nimport {\n applyNumberFormatting,\n formatPercent,\n} from 'src/utils/numberFormatter';\nimport { getPurchaseOrderRelativeUrl } from 'src/utils/purchaseUtils';\nimport { SaleReportMetricsWithGroupBy } from 'src/utils/reportsUtils';\nimport {\n getSaleDetailsRelativeUrl,\n getSaleStatusDisplayContentId,\n getSaleStatusIcon,\n} from 'src/utils/saleUtils';\nimport { sortMoney } from 'src/utils/tableUtils';\nimport { getTicketTypeIcon } from 'src/utils/ticketTypeUtils';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport {\n DateTimeRangeWithRelative,\n Feature,\n PointOfSaleSaleStatus,\n TagsValueType,\n TicketType,\n UiMoney,\n UserSetting,\n} from 'src/WebApiController';\n\nimport { SalesReportTableColumnId } from '../../../utils/columns/sales/salesColumnUtils.types';\nimport { SALE_REPORT_TABLE_COLUMNS_ACCESSOR } from './SaleReportTableColumnsAccessor';\nimport {\n timeBucketToColumnId,\n timeBucketToDayString,\n} from './SaleReportTableColumnsConfig.utils';\n\nconst SECTION_TYPE = SectionType.SalesReport;\n\nexport const tagColumnDef = (\n tagName: string\n): ColumnDef => ({\n id: tagName,\n header: () => (\n \n \n {tagName}\n \n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n accessorFn: (data) => {\n const tag = data?.tags.find((t) => t.key === tagName);\n return tag ? parseFloat(tag.value) : null;\n },\n cell: function Cell({ getValue, row: { original } }) {\n const { userDefinedPrecision } = useColumnUserSetting(\n tagName,\n SECTION_TYPE\n );\n\n const tag = original?.tags.find((t) => t.key === tagName);\n\n return (\n ()}\n isLoading={!original}\n shimmeringDivHeight={SHIMMERING_DIV_HEIGHT_REPORT}\n sectionType={SECTION_TYPE}\n matchingTag={tag}\n currencyCode={original?.currency}\n />\n );\n },\n});\n\nexport const eventTagColumnDef = (\n tagName: string\n): ColumnDef => ({\n id: tagName,\n header: () => (\n \n \n {tagName}\n \n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n accessorFn: (data) => {\n const tag = data?.eventTags.find((t) => t.key === tagName);\n return tag?.value;\n },\n cell: function Cell({ getValue, row: { original } }) {\n const { value: storedColumnNumberPrecision = {} } =\n useServerUserSetting({\n id: UserSetting.SaleColumnNumberPrecision,\n });\n const tag = original?.tags.find((t) => t.key === tagName);\n\n const userDefinedPrecision = storedColumnNumberPrecision[tagName];\n\n if (!original) {\n return ;\n }\n\n if (\n tag?.valueType === TagsValueType.Decimal ||\n tag?.valueType === TagsValueType.Int\n ) {\n return (\n ()}\n isLoading={!original}\n shimmeringDivHeight={SHIMMERING_DIV_HEIGHT_REPORT}\n sectionType={SECTION_TYPE}\n matchingTag={tag}\n currencyCode={original?.currency}\n />\n );\n }\n\n return (\n \n
    {getValue()}
    \n
    \n );\n },\n});\n\nexport const arTimeBucketColumnDef = (\n timeBucket: DateTimeRangeWithRelative\n): ColumnDef => {\n return {\n id: timeBucketToColumnId(timeBucket),\n header: function Cell() {\n const daysText = useContent(ContentId.Days);\n const totalText = useContent(ContentId.Total);\n return (\n \n \n {timeBucketToDayString(timeBucket, daysText, totalText)}\n \n \n );\n },\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n accessorFn: (data) => {\n const timeBucketWithData = data?.timeBucketsWithData?.find(\n (t) =>\n t.timeBkt?.relativeEndSecs === timeBucket.relativeEndSecs &&\n t.timeBkt?.relativeStartSecs === timeBucket.relativeStartSecs\n );\n return timeBucketWithData?.ttlOutsBal;\n },\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n }) {\n const value = getValue();\n\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n\n if (!original) {\n return ;\n }\n\n if (!value) return ;\n\n const displayValue =\n applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value.amt,\n currencyCode: value.currency,\n currencyDecimalDigits: value.dec,\n }) ?? undefined;\n\n return (\n \n
    {displayValue ?? }
    \n
    \n );\n },\n sortingFn: sortMoney,\n footer: function Cell({ table, column: { accessorFn } }) {\n const original = table.options.meta?.summaryData;\n\n if (!original) {\n return ;\n }\n\n const value = accessorFn?.(original, -1) as UiMoney | undefined;\n\n if (!value) return ;\n\n return (\n \n
    \n {applyNumberFormatting({\n inputNumber: value.amt,\n currencyCode: value.currency,\n currencyDecimalDigits: value.dec,\n })}\n
    \n
    \n );\n },\n };\n};\n\nexport const customColumnDef = (\n columnId: string,\n formula?: string | null\n): ColumnDef => ({\n id: columnId,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n accessorFn: (data) => {\n return formula && data ? evaluateFormulaSaleMetrics(formula, data) : null;\n },\n cell: function Cell({ getValue, row: { original } }) {\n const { value: customColumns = [] } = useServerUserSetting<\n CustomSalesColumn[]\n >({\n id: UserSetting.SaleCustomColumns,\n });\n\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n\n return (\n ()}\n isLoading={!original}\n shimmeringDivHeight={SHIMMERING_DIV_HEIGHT_REPORT}\n sectionType={SECTION_TYPE}\n matchingCustomColumn={customColumns.find((c) => c.id === columnId)}\n currencyCode={original?.currency}\n />\n );\n },\n\n footer: function Cell({ table }) {\n const { value: customColumns = [] } = useServerUserSetting<\n CustomSalesColumn[]\n >({\n id: UserSetting.SaleCustomColumns,\n });\n\n return (\n c.id === columnId)}\n sectionType={SECTION_TYPE}\n />\n );\n },\n});\n\nconst columnHelper = createColumnHelper();\n\nexport const SALE_REPORT_TABLE_COLUMNS_CONFIG = {\n [SalesReportTableColumnId.Performer]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[SalesReportTableColumnId.Performer],\n {\n id: SalesReportTableColumnId.Performer,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_XL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: (params) => ,\n }\n ),\n [SalesReportTableColumnId.Venue]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[SalesReportTableColumnId.Venue],\n {\n id: SalesReportTableColumnId.Venue,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_XL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: (params) => ,\n }\n ),\n [SalesReportTableColumnId.Event]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[SalesReportTableColumnId.Event],\n {\n id: SalesReportTableColumnId.Event,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_XL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: (params) => ,\n }\n ),\n [SalesReportTableColumnId.EventGenre]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[SalesReportTableColumnId.EventGenre],\n {\n id: SalesReportTableColumnId.EventGenre,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: (params) => ,\n }\n ),\n [SalesReportTableColumnId.EventCountry]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[SalesReportTableColumnId.EventCountry],\n {\n id: SalesReportTableColumnId.EventCountry,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: (params) => ,\n }\n ),\n [SalesReportTableColumnId.EventCity]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[SalesReportTableColumnId.EventCity],\n {\n id: SalesReportTableColumnId.EventCity,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: (params) => ,\n }\n ),\n [SalesReportTableColumnId.SeatingSection]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[SalesReportTableColumnId.SeatingSection],\n {\n id: SalesReportTableColumnId.SeatingSection,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: (params) => ,\n }\n ),\n [SalesReportTableColumnId.SeatingRow]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[SalesReportTableColumnId.SeatingRow],\n {\n id: SalesReportTableColumnId.SeatingRow,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: (params) => ,\n }\n ),\n [SalesReportTableColumnId.SaleMarketplace]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[\n SalesReportTableColumnId.SaleMarketplace\n ],\n {\n id: SalesReportTableColumnId.SaleMarketplace,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: (params) => ,\n }\n ),\n [SalesReportTableColumnId.SaleMonth]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[SalesReportTableColumnId.SaleMonth],\n {\n id: SalesReportTableColumnId.SaleMonth,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n if (!original) {\n return ;\n }\n\n const dateValue = getValue();\n\n return (\n \n
    \n {dateValue\n ? formatInTimeZone(\n stringToUtcDate(dateValue),\n 'UTC',\n 'MMMM yyyy'\n )\n : ''}\n
    \n
    \n );\n },\n }\n ),\n [SalesReportTableColumnId.SaleWeek]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[SalesReportTableColumnId.SaleWeek],\n {\n id: SalesReportTableColumnId.SaleWeek,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n if (!original) {\n return ;\n }\n\n const dateValue = getValue();\n\n const dateEndOfWeek = dateValue ? stringToUtcDate(dateValue) : null;\n if (dateEndOfWeek) {\n dateEndOfWeek.setDate(dateEndOfWeek.getDate() + 6);\n }\n\n return (\n \n
    \n {dateValue && dateEndOfWeek\n ? formatInTimeZone(\n stringToUtcDate(dateValue),\n 'UTC',\n 'yyyy/MM/dd'\n ) +\n ' - ' +\n formatInTimeZone(dateEndOfWeek, 'UTC', 'yyyy/MM/dd')\n : ''}\n
    \n
    \n );\n },\n }\n ),\n [SalesReportTableColumnId.SaleDay]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[SalesReportTableColumnId.SaleDay],\n {\n id: SalesReportTableColumnId.SaleDay,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n if (!original) {\n return ;\n }\n\n const dateValue = getValue();\n\n return (\n \n
    \n {dateValue\n ? formatInTimeZone(\n stringToUtcDate(dateValue),\n 'UTC',\n 'yyyy/MM/dd'\n )\n : ''}\n
    \n
    \n );\n },\n }\n ),\n [SalesReportTableColumnId.QuantitySold]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[SalesReportTableColumnId.QuantitySold],\n {\n id: SalesReportTableColumnId.QuantitySold,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n }) {\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n\n if (!original) {\n return ;\n }\n\n return (\n \n
    \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: getValue(),\n })}\n
    \n
    \n );\n },\n footer: function Cell({ table, column: { id: columnId, accessorFn } }) {\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n\n const original = table.options.meta?.summaryData;\n\n if (!original) {\n return ;\n }\n const number = accessorFn?.(original, -1);\n\n return (\n \n
    \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: number,\n })}\n
    \n
    \n );\n },\n }\n ),\n [SalesReportTableColumnId.Proceeds]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[SalesReportTableColumnId.Proceeds],\n {\n id: SalesReportTableColumnId.Proceeds,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n }) {\n const value = getValue();\n\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n\n if (!original) {\n return ;\n }\n\n if (!value) return ;\n\n const displayValue =\n applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value.amt,\n currencyCode: value.currency,\n currencyDecimalDigits: value.dec,\n }) ?? undefined;\n\n return (\n \n
    {displayValue ?? }
    \n
    \n );\n },\n sortingFn: sortMoney,\n footer: function Cell({ table, column: { id: columnId, accessorFn } }) {\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n\n const original = table.options.meta?.summaryData;\n\n if (!original) {\n return ;\n }\n\n const value = accessorFn?.(original, -1);\n if (!value) return ;\n\n return (\n \n
    \n {userDefinedPrecision\n ? applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value.amt,\n currencyCode: value.currency,\n currencyDecimalDigits: value.dec,\n })\n : (value.disp ?? )}\n
    \n
    \n );\n },\n }\n ),\n [SalesReportTableColumnId.SoldTicketCost]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[SalesReportTableColumnId.SoldTicketCost],\n {\n id: SalesReportTableColumnId.SoldTicketCost,\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n header: (params) => (\n \n ),\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n }) {\n const value = getValue();\n\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n\n if (!original) {\n return ;\n }\n\n if (!value) return ;\n\n const displayValue =\n applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value.amt,\n currencyCode: value.currency,\n currencyDecimalDigits: value.dec,\n }) ?? undefined;\n\n return (\n \n
    {displayValue ?? }
    \n
    \n );\n },\n sortingFn: sortMoney,\n footer: function Cell({ table, column: { id: columnId, accessorFn } }) {\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n\n const original = table.options.meta?.summaryData;\n\n if (!original) {\n return ;\n }\n\n const value = accessorFn?.(original, -1);\n if (!value) return ;\n\n return (\n \n
    \n {userDefinedPrecision\n ? applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value.amt,\n currencyCode: value.currency,\n currencyDecimalDigits: value.dec,\n })\n : (value.disp ?? )}\n
    \n
    \n );\n },\n }\n ),\n [SalesReportTableColumnId.CommissionPercent]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[\n SalesReportTableColumnId.CommissionPercent\n ],\n {\n id: SalesReportTableColumnId.CommissionPercent,\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n header: (params) => (\n \n ),\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n }) {\n const value = getValue();\n\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n\n if (!original) {\n return ;\n }\n\n if (!value) return ;\n\n const displayValue =\n applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value,\n isPercent: true,\n }) ?? undefined;\n\n return (\n \n
    {displayValue ?? }
    \n
    \n );\n },\n }\n ),\n [SalesReportTableColumnId.CommissionShare]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[\n SalesReportTableColumnId.CommissionShare\n ],\n {\n id: SalesReportTableColumnId.CommissionShare,\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n header: (params) => (\n \n ),\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n }) {\n const value = getValue();\n\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n\n if (!original) {\n return ;\n }\n\n if (!value) return ;\n\n const displayValue =\n applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value.amt,\n currencyCode: value.currency,\n currencyDecimalDigits: value.dec,\n }) ?? undefined;\n\n return (\n \n
    {displayValue ?? }
    \n
    \n );\n },\n sortingFn: sortMoney,\n footer: function Cell({ table, column: { id: columnId, accessorFn } }) {\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n\n const original = table.options.meta?.summaryData;\n\n if (!original) {\n return ;\n }\n\n const value = accessorFn?.(original, -1);\n if (!value) return ;\n\n return (\n \n
    \n {userDefinedPrecision\n ? applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value.amt,\n currencyCode: value.currency,\n currencyDecimalDigits: value.dec,\n })\n : (value.disp ?? )}\n
    \n
    \n );\n },\n }\n ),\n [SalesReportTableColumnId.OutstandingBalance]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[\n SalesReportTableColumnId.OutstandingBalance\n ],\n {\n id: SalesReportTableColumnId.OutstandingBalance,\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n header: (params) => (\n \n ),\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n }) {\n const value = getValue();\n\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n\n if (!original) {\n return ;\n }\n\n if (!value) return ;\n\n const displayValue =\n applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value.amt,\n currencyCode: value.currency,\n currencyDecimalDigits: value.dec,\n }) ?? undefined;\n\n return (\n \n
    {displayValue ?? }
    \n
    \n );\n },\n sortingFn: sortMoney,\n footer: function Cell({ table, column: { id: columnId, accessorFn } }) {\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n\n const original = table.options.meta?.summaryData;\n\n if (!original) {\n return ;\n }\n\n const value = accessorFn?.(original, -1);\n if (!value) return ;\n\n return (\n \n
    \n {userDefinedPrecision\n ? applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value.amt,\n currencyCode: value.currency,\n currencyDecimalDigits: value.dec,\n })\n : (value.disp ?? )}\n
    \n
    \n );\n },\n }\n ),\n [SalesReportTableColumnId.Charges]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[SalesReportTableColumnId.Charges],\n {\n id: SalesReportTableColumnId.Charges,\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n header: (params) => (\n \n ),\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n }) {\n const value = getValue();\n\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n\n if (!original) {\n return ;\n }\n\n if (!value) return ;\n\n const displayValue =\n applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value.amt,\n currencyCode: value.currency,\n currencyDecimalDigits: value.dec,\n }) ?? undefined;\n\n return (\n \n
    {displayValue ?? }
    \n
    \n );\n },\n sortingFn: sortMoney,\n footer: function Cell({ table, column: { id: columnId, accessorFn } }) {\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n\n const original = table.options.meta?.summaryData;\n\n if (!original) {\n return ;\n }\n\n const value = accessorFn?.(original, -1);\n if (!value) return ;\n\n return (\n \n
    \n {userDefinedPrecision\n ? applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value.amt,\n currencyCode: value.currency,\n currencyDecimalDigits: value.dec,\n })\n : (value.disp ?? )}\n
    \n
    \n );\n },\n }\n ),\n [SalesReportTableColumnId.Credits]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[SalesReportTableColumnId.Credits],\n {\n id: SalesReportTableColumnId.Credits,\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n header: (params) => (\n \n ),\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n }) {\n const value = getValue();\n\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n\n if (!original) {\n return ;\n }\n\n if (!value) return ;\n\n const displayValue =\n applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value.amt,\n currencyCode: value.currency,\n currencyDecimalDigits: value.dec,\n }) ?? undefined;\n\n return (\n \n
    {displayValue ?? }
    \n
    \n );\n },\n sortingFn: sortMoney,\n footer: function Cell({ table, column: { id: columnId, accessorFn } }) {\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n\n const original = table.options.meta?.summaryData;\n\n if (!original) {\n return ;\n }\n\n const value = accessorFn?.(original, -1);\n if (!value) return ;\n\n return (\n \n
    \n {userDefinedPrecision\n ? applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value.amt,\n currencyCode: value.currency,\n currencyDecimalDigits: value.dec,\n })\n : (value.disp ?? )}\n
    \n
    \n );\n },\n }\n ),\n [SalesReportTableColumnId.PandL]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[SalesReportTableColumnId.PandL],\n {\n id: SalesReportTableColumnId.PandL,\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n header: (params) => (\n \n ),\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n }) {\n const value = getValue();\n\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n\n if (!original) {\n return ;\n }\n\n if (!value) return ;\n\n const displayValue =\n applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value.amt,\n currencyCode: value.currency,\n currencyDecimalDigits: value.dec,\n }) ?? undefined;\n\n return (\n \n
    {displayValue ?? }
    \n
    \n );\n },\n sortingFn: sortMoney,\n footer: function Cell({ table, column: { id: columnId, accessorFn } }) {\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n\n const original = table.options.meta?.summaryData;\n\n if (!original) {\n return ;\n }\n\n const value = accessorFn?.(original, -1);\n if (!value) return ;\n\n return (\n \n
    \n {userDefinedPrecision\n ? applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value.amt,\n currencyCode: value.currency,\n currencyDecimalDigits: value.dec,\n })\n : (value.disp ?? )}\n
    \n
    \n );\n },\n }\n ),\n [SalesReportTableColumnId.Margin]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[SalesReportTableColumnId.Margin],\n {\n id: SalesReportTableColumnId.Margin,\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n header: (params) => (\n \n ),\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n }) {\n const value = getValue();\n\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n\n if (!original) {\n return ;\n }\n\n return (\n \n
    \n {userDefinedPrecision\n ? applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value,\n isPercent: true,\n })\n : (value ?? )}\n
    \n
    \n );\n },\n footer: function Cell({ table, column: { id: columnId, accessorFn } }) {\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n\n const original = table.options.meta?.summaryData;\n\n if (!original) {\n return ;\n }\n\n const value = accessorFn?.(original, -1);\n\n return (\n \n
    \n {userDefinedPrecision\n ? applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value,\n isPercent: true,\n })\n : (value ?? )}\n
    \n
    \n );\n },\n }\n ),\n [SalesReportTableColumnId.EventId]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[SalesReportTableColumnId.EventId],\n {\n id: SalesReportTableColumnId.EventId,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: (params) => {\n const eventId = params.row.original?.eventId;\n if (!eventId) {\n return ;\n }\n const eventUrl = createInventoryEventUrl(eventId);\n return (\n \n );\n },\n }\n ),\n [SalesReportTableColumnId.Category]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[SalesReportTableColumnId.Category],\n {\n id: SalesReportTableColumnId.Category,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: (params) => ,\n }\n ),\n [SalesReportTableColumnId.EventDate]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[SalesReportTableColumnId.EventDate],\n {\n id: SalesReportTableColumnId.EventDate,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_XL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n }) {\n const value = getValue();\n const { userDefinedPrecision = FormatOption.DateTime_MMDD_Time_Day } =\n useColumnUserSetting(columnId, SECTION_TYPE);\n\n if (!original) {\n return ;\n }\n\n return (\n \n );\n },\n }\n ),\n [SalesReportTableColumnId.EventStateProvince]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[\n SalesReportTableColumnId.EventStateProvince\n ],\n {\n id: SalesReportTableColumnId.EventStateProvince,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: (params) => ,\n }\n ),\n [SalesReportTableColumnId.SaleId]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[SalesReportTableColumnId.SaleId],\n {\n id: SalesReportTableColumnId.SaleId,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ getValue }) => {\n const saleId = getValue();\n\n if (!saleId) {\n return ;\n }\n\n const url = getSaleDetailsRelativeUrl(saleId!);\n return (\n \n );\n },\n }\n ),\n [SalesReportTableColumnId.MarketplaceSaleId]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[\n SalesReportTableColumnId.MarketplaceSaleId\n ],\n {\n id: SalesReportTableColumnId.MarketplaceSaleId,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_XL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: (params) => ,\n }\n ),\n [SalesReportTableColumnId.Status]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[SalesReportTableColumnId.Status],\n {\n id: SalesReportTableColumnId.Status,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n }) {\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n\n const value = getValue() as PointOfSaleSaleStatus;\n\n // TODO: SaleReportMetricsWithGroupBy does not have allocationState. We should add it\n const saleStatusContentId = getSaleStatusDisplayContentId(value);\n\n const statusContent = useContent(saleStatusContentId ?? '');\n if (original === undefined) {\n return ;\n }\n\n const SaleStatusIcon = getSaleStatusIcon(value);\n\n return (\n \n {userDefinedPrecision === FormatOption.EnumDisplay_Icon ? (\n \n ) : (\n \n )}\n \n );\n },\n }\n ),\n [SalesReportTableColumnId.TicketType]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[SalesReportTableColumnId.TicketType],\n {\n id: SalesReportTableColumnId.TicketType,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n }) {\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SECTION_TYPE\n );\n const value = getValue() as TicketType;\n if (original === undefined) {\n return ;\n }\n const ticketTypeIcon = getTicketTypeIcon(value, IconsFill.textStrong);\n return (\n \n {userDefinedPrecision === FormatOption.EnumDisplay_Icon ? (\n <>{ticketTypeIcon}\n ) : (\n \n )}\n \n );\n },\n }\n ),\n [SalesReportTableColumnId.InHandDate]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[SalesReportTableColumnId.InHandDate],\n {\n id: SalesReportTableColumnId.InHandDate,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_XL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ getValue, row: { original } }) => {\n const value = getValue();\n if (!original) {\n return ;\n }\n return (\n \n \n \n );\n },\n sortingFn: 'datetime',\n }\n ),\n [SalesReportTableColumnId.PaymentState]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[SalesReportTableColumnId.PaymentState],\n {\n id: SalesReportTableColumnId.PaymentState,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue }) {\n const value = getValue().value;\n\n if (value == null) {\n return ;\n }\n\n return (\n \n {value.marketplacePaymentState ? (\n \n ) : value.paymentState ? (\n \n ) : null}\n \n );\n },\n }\n ),\n [SalesReportTableColumnId.PaymentReceived]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[\n SalesReportTableColumnId.PaymentReceived\n ],\n {\n id: SalesReportTableColumnId.PaymentReceived,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n const value = getValue();\n if (original === undefined) {\n return ;\n }\n\n return (\n \n \n \n );\n },\n }\n ),\n [SalesReportTableColumnId.PaymentReferenceId]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[\n SalesReportTableColumnId.PaymentReferenceId\n ],\n {\n id: SalesReportTableColumnId.PaymentReferenceId,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n const value = getValue();\n if (original === undefined) {\n return ;\n }\n\n return {value};\n },\n }\n ),\n [SalesReportTableColumnId.PricedBy]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[SalesReportTableColumnId.PricedBy],\n {\n id: SalesReportTableColumnId.PricedBy,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n const { allActiveUserInfos } = useSellerAccountContext();\n\n const pricerSellerUserId = getValue().value;\n\n const pricer = useMemo(\n () =>\n pricerSellerUserId\n ? allActiveUserInfos?.[pricerSellerUserId]?.displayName\n : null,\n [allActiveUserInfos, pricerSellerUserId]\n );\n\n if (original === undefined) {\n return ;\n }\n\n return {pricer};\n },\n }\n ),\n [SalesReportTableColumnId.Fulfiller]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[SalesReportTableColumnId.Fulfiller],\n {\n id: SalesReportTableColumnId.Fulfiller,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n const { allActiveUserInfos } = useSellerAccountContext();\n\n const fulfillerId = getValue().value;\n\n const fulfiller = useMemo(\n () =>\n fulfillerId ? allActiveUserInfos?.[fulfillerId]?.displayName : null,\n [allActiveUserInfos, fulfillerId]\n );\n\n if (original === undefined) {\n return ;\n }\n\n return {fulfiller};\n },\n }\n ),\n [SalesReportTableColumnId.CommissionUser]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[SalesReportTableColumnId.CommissionUser],\n {\n id: SalesReportTableColumnId.CommissionUser,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n const { allActiveUserInfos } = useSellerAccountContext();\n\n const sellerUserId = getValue().value;\n\n const commissioner = useMemo(\n () =>\n sellerUserId\n ? allActiveUserInfos?.[sellerUserId]?.displayName\n : null,\n [allActiveUserInfos, sellerUserId]\n );\n\n if (original === undefined) {\n return ;\n }\n\n return {commissioner};\n },\n }\n ),\n [SalesReportTableColumnId.PurchaseId]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[SalesReportTableColumnId.PurchaseId],\n {\n id: SalesReportTableColumnId.PurchaseId,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ getValue }) => {\n const purchaseIds = getValue();\n\n if (!purchaseIds) {\n return ;\n }\n\n return (\n `#${purchaseId}`)}\n url={purchaseIds.map((purchaseId) =>\n getPurchaseOrderRelativeUrl(purchaseId)\n )}\n separator={{', '}}\n openInNewTab\n align=\"left\"\n style={{ fontWeight: 600 }}\n />\n );\n },\n }\n ),\n [SalesReportTableColumnId.PurchasedBy]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[SalesReportTableColumnId.PurchasedBy],\n {\n id: SalesReportTableColumnId.PurchasedBy,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n const buyerInfos = getValue().value;\n\n const useGetUserInfosQuery = useGetUserInfos(\n buyerInfos?.map((u) => u.buyerUserId)\n );\n const deactivatedText = useContent(ContentId.Deactivated);\n const hasDisplayDeactivatedUser = useUserHasFeature(\n Feature.DisplayDeactivatedUser\n );\n\n const buyerUserInfos = useMemo(() => {\n if (buyerInfos == null) return [];\n\n return buyerInfos.map((bi) => {\n const buyerUser = useGetUserInfosQuery.data?.[bi.buyerUserId];\n return {\n buyerUserId: bi.buyerUserId,\n buyerUser,\n averageBuyerCommissionPercentage:\n bi.averageBuyerCommissionPercent,\n };\n });\n }, [buyerInfos, useGetUserInfosQuery.data]);\n\n if (original === undefined) {\n return ;\n }\n\n return (\n \n {buyerUserInfos\n .map(\n (bui) =>\n `${\n bui.buyerUser?.name ??\n bui.buyerUser?.email ??\n bui.buyerUserId\n } ${\n bui.buyerUser?.isDeactivated && !hasDisplayDeactivatedUser\n ? `(${deactivatedText})`\n : ''\n } ${\n bui.averageBuyerCommissionPercentage\n ? `(${formatPercent(\n bui.averageBuyerCommissionPercentage,\n 2\n )})`\n : ''\n }`\n )\n .join(', ')}\n \n );\n },\n }\n ),\n [SalesReportTableColumnId.PurchaseDate]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[SalesReportTableColumnId.PurchaseDate],\n {\n id: SalesReportTableColumnId.PurchaseDate,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_XL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n const value = getValue();\n const { userDefinedPrecision = FormatOption.DateTime_MonthDD_Time } =\n useColumnUserSetting(\n SalesReportTableColumnId.PurchaseDate,\n SECTION_TYPE\n );\n\n if (original === undefined) {\n return ;\n }\n\n return (\n \n );\n },\n }\n ),\n [SalesReportTableColumnId.Vendor]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[SalesReportTableColumnId.Vendor],\n {\n id: SalesReportTableColumnId.Vendor,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: (params) => ,\n }\n ),\n [SalesReportTableColumnId.VendorAccountEmail]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[\n SalesReportTableColumnId.VendorAccountEmail\n ],\n {\n id: SalesReportTableColumnId.VendorAccountEmail,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: (params) => ,\n }\n ),\n [SalesReportTableColumnId.SeatingSeats]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[SalesReportTableColumnId.SeatingSeats],\n {\n id: SalesReportTableColumnId.SeatingSeats,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: (params) => ,\n }\n ),\n [SalesReportTableColumnId.OrderDate]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[SalesReportTableColumnId.OrderDate],\n {\n id: SalesReportTableColumnId.OrderDate,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_XL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n getValue,\n column: { id: columnId },\n row: { original },\n }) {\n const value = getValue();\n const {\n userDefinedPrecision = FormatOption.DateTime_Month_DD_YY_Time,\n } = useColumnUserSetting(columnId, SECTION_TYPE);\n\n if (original === undefined) {\n return ;\n }\n\n return (\n \n );\n },\n sortingFn: 'datetime',\n }\n ),\n [SalesReportTableColumnId.CancellationDate]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[\n SalesReportTableColumnId.CancellationDate\n ],\n {\n id: SalesReportTableColumnId.CancellationDate,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_XL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n getValue,\n column: { id: columnId },\n row: { original },\n }) {\n const value = getValue();\n const { userDefinedPrecision = FormatOption.DateTime_MonthDD_Time } =\n useColumnUserSetting(columnId, SECTION_TYPE);\n\n if (original === undefined) {\n return ;\n }\n\n return (\n \n );\n },\n sortingFn: 'datetime',\n }\n ),\n [SalesReportTableColumnId.CurrencyCode]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[SalesReportTableColumnId.CurrencyCode],\n {\n id: SalesReportTableColumnId.CurrencyCode,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: (params) => ,\n }\n ),\n [SalesReportTableColumnId.InternalNotes]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[SalesReportTableColumnId.InternalNotes],\n {\n id: SalesReportTableColumnId.InternalNotes,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: (params) => ,\n }\n ),\n [SalesReportTableColumnId.TicketId]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[SalesReportTableColumnId.TicketId],\n {\n id: SalesReportTableColumnId.TicketId,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: (params) => ,\n }\n ),\n [SalesReportTableColumnId.TicketGroupId]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[SalesReportTableColumnId.TicketGroupId],\n {\n id: SalesReportTableColumnId.TicketGroupId,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: (params) => ,\n }\n ),\n [SalesReportTableColumnId.PaymentDate]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[SalesReportTableColumnId.PaymentDate],\n {\n id: SalesReportTableColumnId.PaymentDate,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_XL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n getValue,\n column: { id: columnId },\n row: { original },\n }) {\n const value = getValue();\n const { userDefinedPrecision = FormatOption.DateTime_MonthDD_Time } =\n useColumnUserSetting(columnId, SECTION_TYPE);\n\n if (original === undefined) {\n return ;\n }\n\n return (\n \n );\n },\n sortingFn: 'datetime',\n }\n ),\n [SalesReportTableColumnId.FulfillmentDate]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[\n SalesReportTableColumnId.FulfillmentDate\n ],\n {\n id: SalesReportTableColumnId.FulfillmentDate,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n getValue,\n column: { id: columnId },\n row: { original },\n }) {\n const value = getValue();\n const { userDefinedPrecision = FormatOption.DateTime_MonthDD_Time } =\n useColumnUserSetting(columnId, SECTION_TYPE);\n\n if (original === undefined) {\n return ;\n }\n\n return (\n \n );\n },\n sortingFn: 'datetime',\n }\n ),\n [SalesReportTableColumnId.PurchaseCreatedBy]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[\n SalesReportTableColumnId.PurchaseCreatedBy\n ],\n {\n id: SalesReportTableColumnId.PurchaseCreatedBy,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n const { allActiveUserInfos } = useSellerAccountContext();\n\n const sellerUserIds = getValue>().value;\n\n const displayNamesFormatted = useMemo(\n () =>\n sellerUserIds\n ? [...new Set(sellerUserIds)]\n .map(\n (sellerUserId) =>\n allActiveUserInfos?.[sellerUserId]?.displayName\n )\n .filter((name) => name != null)\n .join(', ')\n : null,\n [allActiveUserInfos, sellerUserIds]\n );\n\n if (original === undefined) {\n return ;\n }\n\n return (\n {displayNamesFormatted}\n );\n },\n }\n ),\n [SalesReportTableColumnId.MarketplacePaymentTerms]: columnHelper.accessor(\n SALE_REPORT_TABLE_COLUMNS_ACCESSOR[\n SalesReportTableColumnId.MarketplacePaymentTerms\n ],\n {\n id: SalesReportTableColumnId.MarketplacePaymentTerms,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ getValue, row: { original } }) => {\n const value = getValue();\n if (!original) {\n return ;\n }\n\n return (\n \n
    \n {value ? (\n \n ) : null}\n
    \n
    \n );\n },\n }\n ),\n} as const;\n","import { Content } from 'src/contexts/ContentContext';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Marketplace } from 'src/WebApiController';\n\nexport const MerchantDisplay = ({\n name,\n}: {\n name?: Marketplace | string | null;\n}) => {\n if (!name) {\n return ;\n }\n\n return <>{name};\n};\n","import clsx from 'clsx';\nimport { MerchantDisplay } from 'src/components/common/MerchantDisplay';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport * as styles from './SaleMarketplaceIdDisplay.css';\n\nexport type SaleMarketplaceIdDisplayProps = {\n marketplaceSaleId: string | null;\n saleId: number;\n marketplace: string;\n textAlign?: 'left' | 'right';\n classNames?: string;\n};\n\nexport const SaleMarketplaceIdDisplay = ({\n saleId,\n marketplaceSaleId,\n marketplace,\n textAlign,\n classNames,\n}: SaleMarketplaceIdDisplayProps) => {\n const uniqueIdLabel = useContent(ContentId.UniqueId);\n return (\n \n #{marketplaceSaleId || saleId}\n \n \n \n \n );\n};\n","import { Content } from 'src/contexts/ContentContext';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Permission } from 'src/WebApiController';\nimport styled from 'styled-components/macro';\n\nexport type ProceedsCellProps = {\n displayValue?: string;\n margin?: number;\n};\n\nexport const ProceedsCell = ({ displayValue, margin }: ProceedsCellProps) => {\n const hasTotalNetProceedsPermissions = useUserHasAnyOfPermissions(\n Permission.Sales_ViewProceeds,\n Permission.Sales_ViewRecentProceeds\n );\n\n return (\n \n \n {!displayValue ? (\n hasTotalNetProceedsPermissions ? (\n \n ) : null\n ) : (\n displayValue\n )}\n \n {margin && {margin.toFixed(2)}%}\n \n );\n};\n\nconst ProceedsWrapper = styled.div`\n display: flex;\n justify-content: flex-end;\n align-items: center;\n color: ${({ theme: { colors } }) => colors.textPrimary};\n`;\n\nconst Proceeds = styled.span`\n font-weight: 500;\n`;\n\nconst ProceedsMargin = styled.span`\n margin-left: 10px;\n ${({ theme: { typography } }) => typography.getStyles('caption1', 'regular')}\n`;\n","import { vars } from 'src/core/themes';\nimport { Event, Performer, Sale, Venue } from 'src/WebApiController';\n\nexport const SHIMMERING_DIV_HEIGHT_SINGLE_SALE = vars.spacing['3xl'];\n\nexport type SaleWithEvent = {\n sale: Sale;\n event: Event;\n performer?: Performer | null;\n venue?: Venue | null;\n isFlattenedMode?: boolean;\n};\n\nexport type SaleFormulaFields = {\n totalNetProceeds?: number | null;\n quantitySold?: number | null;\n charges?: number | null;\n credits?: number | null;\n soldTicketCost?: number | null;\n pandL?: number | null;\n margin?: number | null;\n};\n","import { useCallback, useContext, useMemo } from 'react';\nimport { Link, useNavigate } from 'react-router-dom';\nimport { IconButton } from 'src/components/Buttons';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { ModalContext } from 'src/contexts/ModalContext/ModalContext';\nimport { vars } from 'src/core/themes';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { MainRoute } from 'src/navigations/Routes/MainRoute';\nimport { OpenLinkIcon } from 'src/svgs/OpenLinkIcon';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { isInFullPageEventView } from 'src/utils/deepLinkUtils';\nimport {\n getSaleActionButton,\n getSaleDetailsDeepLinkUrl,\n getSaleDetailsModalConfigWithDeepLink,\n getSaleDetailsRelativeUrl,\n NON_MAIN_SALE_ACTIONS,\n} from 'src/utils/saleUtils';\nimport {\n Marketplace,\n PointOfSaleSaleStatus,\n SaleActionType,\n SaleDetails,\n TicketType,\n} from 'src/WebApiController';\n\nexport const SalesActionsCell = ({\n saleId,\n marketplaceSaleId,\n marketplace,\n saleStatus,\n actions,\n ticketType,\n linkOnly,\n isNoFulfill,\n}: {\n saleId: number;\n marketplaceSaleId: string | null;\n marketplace: Marketplace | null;\n saleStatus: PointOfSaleSaleStatus;\n actions: SaleActionType[];\n ticketType: TicketType | null;\n linkOnly?: boolean;\n isNoFulfill?: boolean | null;\n}) => {\n const { setActivePosEntity, isLoading } =\n useActivePosEntityContext();\n const { setModal } = useContext(ModalContext);\n const { mainRoute } = useAppContext();\n const navigate = useNavigate();\n\n const onViewClick = useCallback(\n async (newTab: boolean) => {\n const inFullPageEventView = isInFullPageEventView(mainRoute);\n if (newTab) {\n window.open(getSaleDetailsDeepLinkUrl(saleId), '_blank');\n } else if (\n mainRoute === MainRoute.Sales ||\n mainRoute === MainRoute.SalesSearch ||\n inFullPageEventView\n ) {\n setActivePosEntity(saleId, marketplaceSaleId, true);\n setModal(getSaleDetailsModalConfigWithDeepLink(saleId, true));\n } else {\n navigate(getSaleDetailsRelativeUrl(saleId));\n }\n },\n [\n mainRoute,\n setActivePosEntity,\n saleId,\n marketplaceSaleId,\n setModal,\n navigate,\n ]\n );\n\n const mainActionTypes = useMemo(\n () => actions.filter((a) => !NON_MAIN_SALE_ACTIONS.includes(a)),\n [actions]\n );\n\n return (\n \n {!linkOnly &&\n (saleStatus === PointOfSaleSaleStatus.PendingConfirmation ||\n saleStatus === PointOfSaleSaleStatus.PendingAllocation ||\n saleStatus === PointOfSaleSaleStatus.Hold ||\n saleStatus === PointOfSaleSaleStatus.CancelledHold ? (\n <>\n {getSaleActionButton(\n saleId,\n marketplaceSaleId,\n marketplace,\n saleStatus,\n mainActionTypes[0],\n ticketType,\n isNoFulfill,\n undefined,\n true,\n undefined,\n isLoading\n )}\n {mainActionTypes.length > 1 &&\n getSaleActionButton(\n saleId,\n marketplaceSaleId,\n marketplace,\n saleStatus,\n actions[1],\n ticketType,\n isNoFulfill,\n undefined,\n true,\n undefined,\n isLoading\n )}\n \n ) : mainActionTypes.length > 0 ? (\n getSaleActionButton(\n saleId,\n marketplaceSaleId,\n marketplace,\n saleStatus,\n mainActionTypes[mainActionTypes.length - 1],\n ticketType,\n isNoFulfill,\n undefined,\n true,\n undefined,\n isLoading\n )\n ) : null)}\n {\n if (e.button === 0 && e.getModifierState('Control') === false) {\n // Perform like a button click when it's a left-click (and no Ctrl)\n // Else the click will be whatever
    does\n e.preventDefault();\n e.stopPropagation();\n\n onViewClick(!!linkOnly);\n }\n }}\n >\n \n }\n titleContentId={ContentId.ViewDetails}\n />\n \n \n );\n};\n","import { ColumnDef, FilterFnOption } from '@tanstack/react-table';\nimport { useCallback, useMemo } from 'react';\nimport { Link } from 'react-router-dom';\nimport { MultiSelectAll } from 'src/components/common/MultiSelect/MultiSelectAll';\nimport { SeatingInfo } from 'src/components/common/SeatingInfo';\nimport {\n SaleMarketplaceIdDisplay,\n SaleMarketplaceIdDisplayProps,\n} from 'src/components/Sales/SaleMarketplaceIdDisplay';\nimport { TagValueDisplay } from 'src/components/TagsFormBody/TagValueCell';\nimport {\n COLUMN_DEFAULT_SIZE_BASE,\n COLUMN_DEFAULT_SIZE_LG,\n COLUMN_DEFAULT_SIZE_XL,\n COLUMN_MAX_SIZE,\n COLUMN_MIN_SIZE,\n} from 'src/contexts/ColumnResizingContext/ColumnResizingContext.types';\nimport {\n Content,\n useContent,\n useContentContext,\n} from 'src/contexts/ContentContext';\nimport {\n NO_GROUP_ID,\n TableRow,\n useMultiSelectionContext,\n} from 'src/contexts/MultiSelectionContext';\nimport { useSellerAccountContext } from 'src/contexts/SellerAccountContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { HorizontalTextList } from 'src/core/POS/HorizontalTextList';\nimport { WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack, TooltipPopover } from 'src/core/ui';\nimport { CopyToClipboardV2 } from 'src/core/ui/CopyToClipboard/CopyToClipboardV2';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { TableHeaderCellDiv } from 'src/core/ui/TableHeaderCellDiv';\nimport { useColumnUserSetting } from 'src/hooks/useColumnUserSetting';\nimport { getUserDisplayName, useGetUserInfos } from 'src/hooks/userGetUserInfo';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport {\n FormatOption,\n FormatOption_Seating,\n FormatOptionEntries,\n} from 'src/modals/EditTableColumns';\nimport { CustomColumnName } from 'src/modals/InventoryTableColumns/CustomColumnName';\nimport { IconsFill, WarningOutlineIcon } from 'src/svgs/Viagogo';\nimport { SEATING_SORTING_FN_NAME } from 'src/tables/common/hooks/useSeatingColumnSorting';\nimport { CustomNumericCell } from 'src/tables/ListingTable/configs/CustomNumericCell';\nimport { ProceedsCell } from 'src/tables/SalesTable/configs/ProceedsCell';\nimport { SeatInfoContainer, TableShimmeringDiv } from 'src/tables/Table';\nimport { DateCell, InHandCell } from 'src/tables/Table/TableCells';\nimport { evaluateFormula } from 'src/utils/columns/sales/salesCustomColumnUtils';\nimport { CustomSalesColumn } from 'src/utils/columns/sales/salesCustomColumnUtils.types';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n MARKETPLACE_SALE_PAYMENT_STATE_TO_CID,\n SALE_PAYMENT_STATE_TO_CID,\n SALE_TABLE_COLUMN_ID_TO_CONTENT_ID,\n TICKET_TYPE_TO_CID,\n} from 'src/utils/constants/contentIdMaps';\nimport { getListingNoteIcon } from 'src/utils/listingNotesUtils';\nimport { applyNumberFormatting } from 'src/utils/numberFormatter';\nimport { getPurchaseOrderRelativeUrl } from 'src/utils/purchaseUtils';\nimport {\n getSaleStatusDisplayContentId,\n getSaleStatusIcon,\n} from 'src/utils/saleUtils';\nimport {\n filterSeatingSectionFn,\n filterSeatRangeFn,\n filterStringMultiSelect,\n safeSortDateTime,\n sortGeneric,\n sortMoney,\n sortSeatingSeatsForTable,\n} from 'src/utils/tableUtils';\nimport { getTicketTypeIcon } from 'src/utils/ticketTypeUtils';\nimport {\n SECTION_TYPE_TO_PRECISION_SETTING,\n SectionType,\n} from 'src/utils/types/sectionType';\nimport {\n Feature,\n ListingNote,\n MarketplaceFulfillmentState,\n MarketplacePaymentState,\n PointOfSalePaymentState,\n PointOfSaleSaleStatus,\n Seating,\n TagsValueType,\n TicketType,\n UiMoney,\n UserSetting,\n} from 'src/WebApiController';\n\nimport { SalesTableColumnId } from '../../../utils/columns/sales/salesColumnUtils.types';\nimport {\n SaleWithEvent,\n SHIMMERING_DIV_HEIGHT_SINGLE_SALE,\n} from '../SalesTable.type';\nimport { SalesActionsCell } from './SalesActionsCell';\n\nconst COST_COLUMN_MIN_SIZE = 75;\nconst COST_COLUMN_MAX_SIZE = 125;\n\nconst SECTION_TYPE = SectionType.Sales;\n\nexport const tagColumnDef = (\n tagName: string\n): ColumnDef => ({\n id: tagName,\n header: () => (\n \n \n {tagName}\n \n \n ),\n enableColumnFilter: false,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n accessorFn: (data) => {\n const tag = data?.sale?.tags?.find((t) => t.key === tagName);\n if (\n tag?.valueType === TagsValueType.Int ||\n tag?.valueType === TagsValueType.Decimal\n ) {\n return tag ? parseFloat(tag.value) : null;\n }\n return tag?.value;\n },\n cell: function Cell({ getValue, row: { original }, table }) {\n const { value: storedColumnNumberPrecisions = {} } =\n useServerUserSetting({\n id: SECTION_TYPE_TO_PRECISION_SETTING[\n table.options.meta?.sectionType ?? SECTION_TYPE\n ],\n });\n const tag = original?.sale?.tags?.find((t) => t.key === tagName);\n\n if (\n tag?.valueType === TagsValueType.Int ||\n tag?.valueType === TagsValueType.Decimal\n ) {\n const userDefinedPrecision = storedColumnNumberPrecisions[tagName];\n\n return (\n ()}\n isLoading={Boolean(!original || !original.sale)}\n shimmeringDivHeight={SHIMMERING_DIV_HEIGHT_SINGLE_SALE}\n sectionType={table.options.meta?.sectionType ?? SECTION_TYPE}\n matchingTag={tag}\n currencyCode={original?.sale?.currency}\n />\n );\n }\n\n if (!original || !original.sale) {\n return ;\n }\n\n if (!tag) {\n return null;\n }\n\n return (\n \n \n \n );\n },\n});\n\nexport const customColumnDef = (\n columnId: string,\n formula?: string | null\n): ColumnDef => ({\n id: columnId,\n header: ({ table }) => (\n \n \n \n ),\n enableColumnFilter: false,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n accessorFn: (data) => {\n return formula && data ? evaluateFormula(formula, data.sale) ?? null : null;\n },\n cell: function Cell({ getValue, row: { original }, table }) {\n const { value: storedColumnNumberPrecisions = {} } =\n useServerUserSetting({\n id: SECTION_TYPE_TO_PRECISION_SETTING[\n table.options.meta?.sectionType ?? SECTION_TYPE\n ],\n });\n const { value: customColumns = [] } = useServerUserSetting<\n CustomSalesColumn[]\n >({\n id: UserSetting.SaleCustomColumns,\n });\n\n const userDefinedPrecision = storedColumnNumberPrecisions[columnId];\n\n return (\n ()}\n isLoading={Boolean(!original || !original.sale)}\n shimmeringDivHeight={SHIMMERING_DIV_HEIGHT_SINGLE_SALE}\n sectionType={table.options.meta?.sectionType ?? SECTION_TYPE}\n matchingCustomColumn={customColumns.find((c) => c.id === columnId)}\n currencyCode={original?.sale?.currency}\n />\n );\n },\n});\n\nexport const SALE_TABLE_COLUMNS_CONFIG: Record<\n SalesTableColumnId,\n ColumnDef\n> = {\n [SalesTableColumnId.Checkbox]: {\n id: SalesTableColumnId.Checkbox,\n header: (props) => {\n return props.table.options.meta?.showSelectAllCheckbox ? (\n \n \n \n ) : (\n ''\n );\n },\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_DEFAULT_SIZE_BASE,\n maxSize: COLUMN_DEFAULT_SIZE_BASE,\n enableSorting: false,\n enableResizing: false,\n cell: function Cell({\n row: { id, original, getIsSelected, depth, getCanSelectSubRows },\n table,\n }) {\n const { setShiftKeyRowSelectionState, isNoGroupIdSet } =\n useMultiSelectionContext();\n\n if (!original || !original.sale) {\n return (\n \n );\n }\n\n const isSelected = getIsSelected();\n const canSelect = getCanSelectSubRows() || depth === 0;\n const groupId = isNoGroupIdSet()\n ? NO_GROUP_ID\n : original.event.viagVirtualId;\n return canSelect ? (\n \n {\n setShiftKeyRowSelectionState(\n id,\n table.getRowModel().rows as unknown as TableRow[],\n groupId\n );\n }}\n />\n \n ) : null;\n },\n },\n [SalesTableColumnId.Seating]: {\n id: SalesTableColumnId.Seating,\n header: function Header({\n table: {\n options: { meta },\n },\n column,\n }) {\n const seatingText = useContent(\n SALE_TABLE_COLUMN_ID_TO_CONTENT_ID[SalesTableColumnId.Seating]\n );\n const sectionText = useContent(ContentId.Section);\n const { userDefinedPrecision } = useColumnUserSetting(\n column.id,\n meta?.sectionType || SectionType.Sales\n );\n\n const isSectionOnly =\n userDefinedPrecision === FormatOption_Seating.Seating_SectionOnly;\n return (\n \n \n {isSectionOnly ? `${seatingText} (${sectionText})` : seatingText}\n \n \n );\n },\n enableColumnFilter: true,\n filterFn: filterSeatingSectionFn as FilterFnOption,\n meta: {\n uniqueValueVariant: 'seatingSection',\n },\n size: COLUMN_DEFAULT_SIZE_XL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n accessorFn: (data) =>\n data\n ? {\n seating: data.sale.seating,\n listingNotes: data.sale.seatTraits,\n isSeatSaver: data.sale.isSeatSaver,\n status: data.sale.status,\n }\n : null,\n cell: function Cell({\n getValue,\n row: { original },\n table: {\n options: { meta },\n },\n column,\n }) {\n const hasWasteSaleFeature = useUserHasFeature(Feature.WasteSale);\n const hasSaleHasMarketplaceProblemFeature = useUserHasFeature(\n Feature.SaleHasMarketplaceProblem\n );\n const contentContext = useContentContext();\n const hasListingNotesAdditionalInfoFeature = useUserHasFeature(\n Feature.ListingNotesAdditionalInfo\n );\n const { userDefinedPrecision } = useColumnUserSetting(\n column.id,\n meta?.sectionType || SectionType.Sales\n );\n\n const value = getValue<{\n seating: Seating;\n listingNotes: ListingNote[];\n isSeatSaver: boolean;\n status: PointOfSaleSaleStatus;\n } | null>();\n if (value == null) {\n return (\n \n );\n }\n\n const { seating, listingNotes, isSeatSaver, status } = value;\n const adjustedSeating =\n userDefinedPrecision === FormatOption_Seating.Seating_SectionOnly\n ? {\n ...seating,\n row: null,\n seatFr: null,\n seatTo: null,\n }\n : seating;\n const hasMarketplaceProblem =\n original?.sale?.hasMarketplaceProblem ?? false;\n return (\n \n \n \n \n {listingNotes?.length > 0 && (\n n.listingNoteText)}\n />\n )}\n \n {hasMarketplaceProblem && hasSaleHasMarketplaceProblemFeature && (\n
    \n \n }\n >\n \n }\n />\n \n
    \n )}\n
    \n
    \n );\n },\n sortingFn: SEATING_SORTING_FN_NAME,\n },\n [SalesTableColumnId.QuantitySold]: {\n id: SalesTableColumnId.QuantitySold,\n header: ({ column: { id } }) => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n accessorFn: (data) => (data ? data.sale.qtySold || 0 : null),\n cell: function Cell({ getValue, column: { id: columnId }, table }) {\n const value = getValue();\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n if (value == null) {\n return (\n \n );\n }\n\n return (\n \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value,\n })}\n \n );\n },\n },\n [SalesTableColumnId.OrderDate]: {\n id: SalesTableColumnId.OrderDate,\n header: ({ column: { id } }) => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_XL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n accessorFn: (data) => data?.sale?.saleDate,\n cell: function Cell({ getValue, column: { id: columnId }, table }) {\n const value = getValue();\n const { userDefinedPrecision = FormatOption.DateTime_MonthDD_Time } =\n useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n if (value == null) {\n return (\n \n );\n }\n\n return (\n \n \n \n );\n },\n sortingFn: safeSortDateTime,\n },\n [SalesTableColumnId.InHandDate]: {\n id: SalesTableColumnId.InHandDate,\n header: () => IH,\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n accessorFn: (data) => data?.sale.inHandAt,\n cell: ({ getValue, row: { original } }) => {\n const value = getValue();\n if (!original?.sale) {\n return (\n \n );\n }\n return (\n \n \n \n );\n },\n sortingFn: safeSortDateTime,\n },\n [SalesTableColumnId.Status]: {\n id: SalesTableColumnId.Status,\n header: ({ column: { id } }) => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_XL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n accessorFn: (data) => (data ? data.sale.status : null),\n cell: function Cell({ getValue, column: { id: columnId }, row, table }) {\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n const sale = row.original?.sale;\n const value = getValue() as PointOfSaleSaleStatus;\n\n const statusContent = useContent(\n getSaleStatusDisplayContentId(value, sale?.mkpContrState, sale?.mkp)\n );\n\n if (value == null) {\n return (\n \n );\n }\n\n const SaleStatusIcon = getSaleStatusIcon(\n value,\n sale?.mkpContrState,\n sale?.mkp\n );\n\n return (\n \n \n {userDefinedPrecision === FormatOption.EnumDisplay_Icon ? (\n \n ) : (\n
    {statusContent}
    \n )}\n\n {\n // if the Sale is fulfilled in both POS and Marketplace, but the version is mismatched, show the warning\n value === PointOfSaleSaleStatus.Fulfilled &&\n sale?.isFulfillVerMis ? (\n \n \n }\n >\n \n }\n />\n \n \n ) : value !== PointOfSaleSaleStatus.Fulfilled &&\n sale?.mkpFulfState === MarketplaceFulfillmentState.Fulfilled ? (\n \n \n }\n >\n \n }\n />\n \n \n ) : undefined\n }\n
    \n
    \n );\n },\n },\n [SalesTableColumnId.TicketType]: {\n id: SalesTableColumnId.TicketType,\n header: ({ column: { id } }) => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n accessorFn: (data) => (data ? data.sale.ticketType : null),\n cell: function Cell({ getValue, column: { id: columnId }, table }) {\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n const value = getValue() as TicketType;\n if (value == null) {\n return (\n \n );\n }\n const ticketTypeIcon = getTicketTypeIcon(value, IconsFill.currentColor);\n return (\n \n {userDefinedPrecision === FormatOption.EnumDisplay_Icon ? (\n \n {ticketTypeIcon}\n \n ) : (\n \n )}\n \n );\n },\n },\n [SalesTableColumnId.Proceeds]: {\n id: SalesTableColumnId.Proceeds,\n enableColumnFilter: false,\n minSize: COST_COLUMN_MIN_SIZE,\n maxSize: COST_COLUMN_MAX_SIZE,\n header: ({ column: { id } }) => (\n \n \n \n ),\n accessorFn: (data) => {\n return !data\n ? null\n : {\n proceeds: data.sale.ttlNetProcs,\n margin: undefined, // TODO - provide this when the data is actually available\n };\n },\n cell: function Cell({ getValue, column: { id: columnId }, table }) {\n const value = getValue<{\n proceeds: UiMoney | null;\n margin?: number;\n } | null>();\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n if (value == null) {\n return (\n \n );\n }\n\n const displayValue =\n applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value.proceeds?.amt,\n currencyCode: value.proceeds?.currency,\n currencyDecimalDigits: value.proceeds?.dec,\n }) ?? undefined;\n\n return (\n \n \n \n );\n },\n sortingFn: (rowA, rowB, colId) => {\n type ValueType = {\n proceeds: UiMoney | null;\n margin?: number;\n };\n const a = rowA.getValue(colId);\n const b = rowB.getValue(colId);\n if (!a?.proceeds) return b ? -1 : 1;\n if (!b?.proceeds) return 1;\n\n return a.proceeds.amt < b.proceeds.amt ? -1 : 1;\n },\n },\n [SalesTableColumnId.SoldTicketCost]: {\n id: SalesTableColumnId.SoldTicketCost,\n enableColumnFilter: false,\n minSize: COST_COLUMN_MIN_SIZE,\n maxSize: COST_COLUMN_MAX_SIZE,\n header: ({ column: { id } }) => (\n \n \n \n ),\n accessorFn: (data) => {\n return data?.sale?.soldTktCost?.amt;\n },\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n table,\n }) {\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n return (\n ()}\n isLoading={Boolean(!original || !original.sale)}\n shimmeringDivHeight={SHIMMERING_DIV_HEIGHT_SINGLE_SALE}\n sectionType={table.options.meta?.sectionType ?? SECTION_TYPE}\n currencyCode={original?.sale?.currency}\n />\n );\n },\n },\n [SalesTableColumnId.PandL]: {\n id: SalesTableColumnId.PandL,\n enableColumnFilter: false,\n minSize: COST_COLUMN_MIN_SIZE,\n maxSize: COST_COLUMN_MAX_SIZE,\n header: ({ column: { id } }) => (\n \n \n \n ),\n accessorFn: (data) => {\n return data?.sale?.pandL?.amt;\n },\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n table,\n }) {\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n return (\n ()}\n isLoading={Boolean(!original || !original.sale)}\n shimmeringDivHeight={SHIMMERING_DIV_HEIGHT_SINGLE_SALE}\n sectionType={table.options.meta?.sectionType ?? SECTION_TYPE}\n currencyCode={original?.sale?.currency}\n />\n );\n },\n },\n [SalesTableColumnId.Margin]: {\n id: SalesTableColumnId.Margin,\n enableColumnFilter: false,\n minSize: COST_COLUMN_MIN_SIZE,\n maxSize: COST_COLUMN_MAX_SIZE,\n header: ({ column: { id } }) => (\n \n \n \n ),\n accessorFn: (data) => {\n return data?.sale?.margin;\n },\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n table,\n }) {\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n return (\n ()}\n isLoading={Boolean(!original || !original.sale)}\n shimmeringDivHeight={SHIMMERING_DIV_HEIGHT_SINGLE_SALE}\n sectionType={table.options.meta?.sectionType ?? SECTION_TYPE}\n />\n );\n },\n },\n [SalesTableColumnId.Charges]: {\n id: SalesTableColumnId.Charges,\n enableColumnFilter: false,\n minSize: COST_COLUMN_MIN_SIZE,\n maxSize: COST_COLUMN_MAX_SIZE,\n header: ({ column: { id } }) => (\n \n \n \n ),\n accessorFn: (data) => {\n return data?.sale?.charges?.amt;\n },\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n table,\n }) {\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n return (\n ()}\n isLoading={Boolean(!original || !original.sale)}\n shimmeringDivHeight={SHIMMERING_DIV_HEIGHT_SINGLE_SALE}\n sectionType={table.options.meta?.sectionType ?? SECTION_TYPE}\n currencyCode={original?.sale?.currency}\n />\n );\n },\n },\n [SalesTableColumnId.Credits]: {\n id: SalesTableColumnId.Credits,\n enableColumnFilter: false,\n minSize: COST_COLUMN_MIN_SIZE,\n maxSize: COST_COLUMN_MAX_SIZE,\n header: ({ column: { id } }) => (\n \n \n \n ),\n accessorFn: (data) => {\n return data?.sale?.credits?.amt;\n },\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n table,\n }) {\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n return (\n ()}\n isLoading={Boolean(!original || !original.sale)}\n shimmeringDivHeight={SHIMMERING_DIV_HEIGHT_SINGLE_SALE}\n sectionType={table.options.meta?.sectionType ?? SECTION_TYPE}\n currencyCode={original?.sale?.currency}\n />\n );\n },\n },\n [SalesTableColumnId.Sale]: {\n id: SalesTableColumnId.Sale,\n header: ({ column: { id } }) => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_XL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n accessorFn: (data) =>\n !data\n ? null\n : {\n marketplaceSaleId: data.sale.idOnMkp,\n saleId: data.sale.id,\n isExternal: Boolean(data.sale.idOnMkp),\n marketplace: data.sale.mkp,\n },\n cell: ({ getValue }) => {\n const value = getValue();\n if (value == null) {\n return (\n \n );\n }\n\n const props = value as SaleMarketplaceIdDisplayProps;\n return (\n \n \n \n \n \n \n \n );\n },\n // sort by market, then order\n sortingFn: (rowA, rowB, colId) => {\n const a = rowA.getValue(colId) as SaleMarketplaceIdDisplayProps;\n const b = rowB.getValue(colId) as SaleMarketplaceIdDisplayProps;\n if (!a) return b ? -1 : 1;\n if (!b) return 1;\n\n if (a.marketplace !== b.marketplace) {\n return a.marketplace < b.marketplace ? -1 : 1;\n }\n\n // Same marketplace, sort by sale id\n return (a.marketplaceSaleId || '') < (b.marketplaceSaleId || '') ? -1 : 1;\n },\n },\n [SalesTableColumnId.Actions]: {\n id: SalesTableColumnId.Actions,\n enableSorting: false,\n enableResizing: true,\n header: function Cell() {\n const hasTablePinActionColumnFeature = useUserHasFeature(\n Feature.TablePinActionColumn\n );\n\n if (hasTablePinActionColumnFeature) {\n return null;\n }\n\n return (\n \n \n \n );\n },\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_DEFAULT_SIZE_LG,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ row: { original }, table }) => {\n const linkOnly =\n table.options.meta?.formatOptionOverrides?.[\n SalesTableColumnId.Actions\n ] === FormatOption.Actions_LinkOnly;\n\n return !original ? (\n \n ) : (\n \n );\n },\n },\n [SalesTableColumnId.FulfillmentDate]: {\n id: SalesTableColumnId.FulfillmentDate,\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n header: ({ column: { id } }) => (\n \n \n \n ),\n accessorFn: (data) => {\n return data?.sale?.fulfillDate;\n },\n cell: function Cell({\n getValue,\n column: { id: columnId },\n row: { original },\n table,\n }) {\n const value = getValue();\n const { userDefinedPrecision = FormatOption.DateTime_MonthDD_Time } =\n useColumnUserSetting(\n columnId,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n if (original == null) {\n return (\n \n );\n }\n\n return (\n \n );\n },\n sortingFn: safeSortDateTime,\n },\n [SalesTableColumnId.AutoFulfill]: {\n id: SalesTableColumnId.AutoFulfill,\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n header: ({ column: { id } }) => (\n \n \n \n ),\n accessorFn: (data) => {\n return data?.sale?.isNoFulfill;\n },\n cell: function Cell({ getValue, row: { original } }) {\n const value = getValue();\n\n if (original == null) {\n return (\n \n );\n }\n\n return (\n \n {/* AutoFulfill is negative of IsNoFulfill */}\n \n \n );\n },\n },\n [SalesTableColumnId.PaymentState]: {\n id: SalesTableColumnId.PaymentState,\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n header: ({ column: { id } }) => (\n \n \n \n ),\n accessorFn: (data) => {\n return {\n pmtState: data?.sale?.pmtState,\n mkpPmtState: data?.sale?.mkpPmtState,\n };\n },\n cell: function Cell({ getValue }) {\n const value = getValue() as {\n mkpPmtState: MarketplacePaymentState;\n pmtState: PointOfSalePaymentState;\n };\n if (value.mkpPmtState == null && value.pmtState == null) {\n return (\n \n );\n }\n\n return (\n \n {value.mkpPmtState ? (\n \n ) : (\n \n )}\n \n );\n },\n },\n [SalesTableColumnId.PaymentReceived]: {\n id: SalesTableColumnId.PaymentReceived,\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n header: ({ column: { id } }) => (\n \n \n \n ),\n accessorFn: (data) => {\n return data?.sale ? data.sale.pmtRcv ?? null : undefined;\n },\n cell: function Cell({ getValue }) {\n const value = getValue();\n if (value === undefined) {\n return (\n \n );\n }\n\n return (\n \n \n \n );\n },\n },\n [SalesTableColumnId.PaymentReferenceId]: {\n id: SalesTableColumnId.PaymentReferenceId,\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n header: ({ column: { id } }) => (\n \n \n \n ),\n accessorFn: (data) => {\n return data?.sale ? data.sale.pmtRefId ?? null : undefined;\n },\n cell: function Cell({ getValue }) {\n const value = getValue();\n if (value === undefined) {\n return (\n \n );\n }\n\n return {value};\n },\n },\n [SalesTableColumnId.PurchaseCreatedBy]: {\n id: SalesTableColumnId.PurchaseCreatedBy,\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n header: ({ column: { id } }) => (\n \n \n \n ),\n accessorFn: (data) => {\n return data?.sale?.owners?.poInsertBys;\n },\n cell: function Cell({ getValue, row: { original } }) {\n const { allActiveUserInfos } = useSellerAccountContext();\n\n const sellerUserIds = getValue();\n\n const displayNamesFormatted = useMemo(\n () =>\n sellerUserIds\n ? [...new Set(sellerUserIds)]\n .map(\n (sellerUserId) =>\n allActiveUserInfos?.[sellerUserId]?.displayName\n )\n .filter((name) => name != null)\n .join(', ')\n : null,\n [allActiveUserInfos, sellerUserIds]\n );\n\n if (original == null) {\n return (\n \n );\n }\n\n return {displayNamesFormatted};\n },\n },\n [SalesTableColumnId.PurchasedBy]: {\n id: SalesTableColumnId.PurchasedBy,\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n header: ({ column: { id } }) => (\n \n \n \n ),\n accessorFn: (data) => {\n return data?.sale?.owners?.buyerIds;\n },\n cell: function Cell({ getValue, row: { original } }) {\n const { allActiveUserInfos } = useSellerAccountContext();\n\n const sellerUserIds = getValue();\n\n const displayNamesFormatted = useMemo(\n () =>\n sellerUserIds\n ? [...new Set(sellerUserIds)]\n .map(\n (sellerUserId) =>\n allActiveUserInfos?.[sellerUserId]?.displayName\n )\n .filter((name) => name != null)\n .join(', ')\n : null,\n [allActiveUserInfos, sellerUserIds]\n );\n\n if (original == null) {\n return (\n \n );\n }\n\n return {displayNamesFormatted};\n },\n },\n [SalesTableColumnId.PurchaseDate]: {\n id: SalesTableColumnId.PurchaseDate,\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n header: ({ column: { id } }) => (\n \n \n \n ),\n accessorFn: (data) => {\n return data?.sale?.poDate;\n },\n cell: function Cell({ getValue, row: { original }, table }) {\n const value = getValue();\n const { userDefinedPrecision = FormatOption.DateTime_MonthDD_Time } =\n useColumnUserSetting(\n SalesTableColumnId.PurchaseDate,\n table.options.meta?.sectionType ?? SECTION_TYPE\n );\n\n if (original == null) {\n return (\n \n );\n }\n\n return (\n \n \n \n );\n },\n sortingFn: safeSortDateTime,\n },\n [SalesTableColumnId.VendorOrderId]: {\n id: SalesTableColumnId.VendorOrderId,\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n header: ({ column: { id } }) => (\n \n \n \n ),\n accessorFn: (data) => {\n return data?.sale?.poVendOrdId;\n },\n cell: function Cell({ getValue, row: { original } }) {\n const onViewClick = useCallback(async () => {\n if (!original || !original.sale?.poId) {\n return;\n }\n }, [original]);\n\n if (!original) {\n return (\n \n );\n }\n\n if (!original?.sale?.poId) {\n return '';\n }\n\n const externalPoID = getValue();\n\n return (\n \n \n \n \n \n {getValue()}\n \n \n \n \n \n );\n },\n },\n [SalesTableColumnId.VendorAccountEmail]: {\n id: SalesTableColumnId.VendorAccountEmail,\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n header: ({ column: { id } }) => (\n \n \n \n ),\n accessorFn: (data) => {\n return data?.sale?.poVendAccEmail;\n },\n cell: function Cell({ getValue, row: { original } }) {\n if (!original) {\n return (\n \n );\n }\n\n return (\n \n
    {getValue()}
    \n
    \n );\n },\n },\n [SalesTableColumnId.OriginatedBy]: {\n id: SalesTableColumnId.OriginatedBy,\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n header: ({ column: { id } }) => (\n \n \n \n ),\n accessorFn: (data) => {\n return data?.sale?.origBy;\n },\n cell: function Cell({ getValue, row: { original } }) {\n const deactivatedText = useContent(ContentId.Deactivated);\n const insertByUserId = getValue() as string;\n const getUserInfosQuery = useGetUserInfos([insertByUserId]);\n\n const displayUserName = useMemo(() => {\n const user = insertByUserId\n ? getUserInfosQuery.data?.[insertByUserId]\n : undefined;\n\n return user ? getUserDisplayName(user, deactivatedText) : '';\n }, [deactivatedText, getUserInfosQuery.data, insertByUserId]);\n\n if (original == null) {\n return (\n \n );\n }\n\n return {displayUserName};\n },\n },\n [SalesTableColumnId.Row]: {\n id: SalesTableColumnId.Row,\n enableColumnFilter: true,\n filterFn: filterStringMultiSelect as FilterFnOption,\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n header: ({ column: { id } }) => (\n \n \n \n ),\n accessorFn: (data) => {\n return data?.sale?.seating?.row;\n },\n cell: function Cell({ getValue, row: { original } }) {\n const value = getValue();\n\n if (!original) {\n return (\n \n );\n }\n if (!original.sale) return null;\n\n return {value};\n },\n sortingFn: sortGeneric,\n },\n [SalesTableColumnId.Seats]: {\n id: SalesTableColumnId.Seats,\n enableColumnFilter: true,\n filterFn: filterSeatRangeFn as FilterFnOption,\n meta: {\n columnFilterVariant: 'seatRange',\n },\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n header: ({ column: { id } }) => (\n \n \n \n ),\n accessorFn: (data) => {\n return data?.sale?.seating;\n },\n cell: function Cell({ row: { original } }) {\n if (!original) {\n return (\n \n );\n }\n if (!original.sale) return null;\n\n const { seatFr, seatTo } = original.sale.seating;\n\n return (\n \n \n \n );\n },\n sortingFn: sortSeatingSeatsForTable,\n },\n [SalesTableColumnId.TotalPaymentsAmount]: {\n id: SalesTableColumnId.TotalPaymentsAmount,\n enableColumnFilter: false,\n minSize: COST_COLUMN_MIN_SIZE,\n maxSize: COST_COLUMN_MAX_SIZE,\n header: ({ column: { id } }) => (\n \n \n \n ),\n accessorFn: (data) => {\n return data?.sale?.totalPmt;\n },\n cell: function Cell({ getValue, row: { original } }) {\n const totalAmount = getValue();\n\n if (!original) {\n return (\n \n );\n }\n\n return {totalAmount?.disp};\n },\n sortingFn: sortMoney,\n },\n [SalesTableColumnId.TotalConvertedPaymentsAmount]: {\n id: SalesTableColumnId.TotalConvertedPaymentsAmount,\n enableColumnFilter: false,\n minSize: COST_COLUMN_MIN_SIZE,\n maxSize: COST_COLUMN_MAX_SIZE,\n header: ({ column: { id } }) => (\n \n \n \n ),\n accessorFn: (data) => {\n return data?.sale?.totalConvertedPmt;\n },\n cell: function Cell({ getValue, row: { original } }) {\n const totalConvertedAmount = getValue();\n\n if (!original) {\n return (\n \n );\n }\n\n return (\n {totalConvertedAmount?.disp}\n );\n },\n sortingFn: sortMoney,\n },\n [SalesTableColumnId.WastedQuantity]: {\n id: SalesTableColumnId.WastedQuantity,\n enableColumnFilter: false,\n minSize: COST_COLUMN_MIN_SIZE,\n maxSize: COST_COLUMN_MAX_SIZE,\n header: ({ column: { id } }) => (\n \n \n \n ),\n accessorFn: (data) => {\n return data?.sale?.qtyWasted;\n },\n cell: function Cell({ getValue, row: { original } }) {\n if (!original) {\n return (\n \n );\n }\n\n const wastedQty = getValue();\n\n return {wastedQty};\n },\n },\n};\n","import { createColumnHelper } from '@tanstack/react-table';\nimport { ConnectedEventInfo } from 'src/components/Events/ConnectedEventInfo';\nimport {\n EventDateDisplay,\n VenueNameDisplay,\n} from 'src/components/Events/EventInfo';\nimport {\n COLUMN_DEFAULT_SIZE_XL,\n COLUMN_DEFAULT_SIZE_XXL,\n COLUMN_MAX_SIZE,\n COLUMN_MIN_SIZE,\n} from 'src/contexts/ColumnResizingContext/ColumnResizingContext.types';\nimport { Content } from 'src/contexts/ContentContext';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { useColumnUserSetting } from 'src/hooks/useColumnUserSetting';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport { FormatOption, FormatOptionEntries } from 'src/modals/EditTableColumns';\nimport * as tableStyles from 'src/tables/Table/Table.css';\nimport { TableShimmeringDiv } from 'src/tables/Table/Table.styled';\nimport { SalesTableFlattenedColumnId } from 'src/utils/columns/sales/salesColumnUtils.types';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n compareEventsByDate,\n compareEventsByName,\n} from 'src/utils/eventWithDataUtils';\nimport { applyNumberFormatting } from 'src/utils/numberFormatter';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport { DateTimeRange, UserSetting, Venue } from 'src/WebApiController';\n\nimport {\n SaleWithEvent,\n SHIMMERING_DIV_HEIGHT_SINGLE_SALE,\n} from '../SalesTable.type';\nconst columnHelper = createColumnHelper();\n\nexport const SALE_TABLE_FLATTENED_COLUMNS_CONFIG = {\n [SalesTableFlattenedColumnId.Event]: columnHelper.accessor((data) => data, {\n id: SalesTableFlattenedColumnId.Event,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_XXL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, table }) {\n const sale = getValue();\n const { value: storedColumnNumberPrecisions = {} } =\n useServerUserSetting({\n id: UserSetting.SaleFlattenedColumnNumberPrecision,\n });\n\n if (!sale) {\n return (\n \n );\n }\n\n if (!sale.event) {\n return null;\n }\n\n const customPrecision =\n table.options.meta?.formatOptionOverrides?.[\n SalesTableFlattenedColumnId.Event\n ];\n\n const eventNameOnly = customPrecision\n ? customPrecision === FormatOption.Event_EventName\n : !sale.isFlattenedMode ||\n storedColumnNumberPrecisions[SalesTableFlattenedColumnId.Event] ===\n FormatOption.Event_EventName;\n\n return (\n \n \n \n );\n },\n sortingFn: compareEventsByName,\n }),\n [SalesTableFlattenedColumnId.Venue]: columnHelper.accessor(\n (data) => data?.venue,\n {\n id: SalesTableFlattenedColumnId.Venue,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_XL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n const venue = getValue();\n if (!original || !original?.sale) {\n return (\n \n );\n }\n return (\n \n \n \n );\n },\n }\n ),\n [SalesTableFlattenedColumnId.Location]: columnHelper.accessor(\n (data) => data,\n {\n id: SalesTableFlattenedColumnId.Location,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_XL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n const sale = getValue();\n if (!original || !original?.sale) {\n return (\n \n );\n }\n return (\n \n \n \n );\n },\n }\n ),\n [SalesTableFlattenedColumnId.EventDate]: columnHelper.accessor(\n (data) => data?.event?.dates,\n {\n id: SalesTableFlattenedColumnId.EventDate,\n header: () => (\n \n \n \n ),\n enableColumnFilter: false,\n size: COLUMN_DEFAULT_SIZE_XL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original }, column, table }) {\n const columnId = column.id;\n\n const value = getValue();\n const {\n userDefinedPrecision = FormatOption.DateTime_MonthDD_Time_Day,\n } = useColumnUserSetting(columnId, SectionType.Events);\n\n if (!original || !original?.sale) {\n return (\n \n );\n }\n\n const customPrecision =\n table.options.meta?.formatOptionOverrides?.[\n SalesTableFlattenedColumnId.EventDate\n ];\n\n const date = applyNumberFormatting({\n precision: customPrecision ?? userDefinedPrecision,\n inputNumber: value?.start,\n isDateTime: true,\n }) as string;\n\n return (\n \n {userDefinedPrecision === FormatOption.DateTime_MonthDD_Time ? (\n \n ) : (\n \n {date}\n \n )}\n \n );\n },\n sortingFn: compareEventsByDate,\n }\n ),\n} as const;\n","import clsx from 'clsx';\nimport { ReactNode } from 'react';\nimport { vars } from 'src/core/themes';\nimport { HamburgerMenuIcon } from 'src/svgs/HamburgerMenuIcon';\n\nimport * as styles from './ColumnListItem.css';\n\ntype ColumnListItemProps = {\n children: ReactNode;\n actionButton: ReactNode;\n draggable?: boolean;\n highlighted?: boolean;\n};\n\nexport const ColumnListItem = ({\n children,\n actionButton,\n draggable,\n highlighted,\n}: ColumnListItemProps) => {\n return (\n \n
    \n {draggable && (\n \n )}\n {children}\n
    \n
    {actionButton}
    \n \n );\n};\n","import { useMemo } from 'react';\nimport { getContent, useContentContext } from 'src/contexts/ContentContext';\nimport { useTagsForEntityType } from 'src/hooks/useTagsForEntityType';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport { OnSaleEventsTableColumnId } from 'src/navigations/Routes/OnSaleEvent/OnSaleEventView.types';\nimport { EventsTableColumnId } from 'src/utils/columns/events/eventsColumnUtils.types';\nimport {\n ListingReportTableColumnId,\n ListingTableColumnId,\n ListingTableFlattenedColumnId,\n} from 'src/utils/columns/inventory/inventoryColumnUtils.types';\nimport { CustomListingColumn } from 'src/utils/columns/inventory/inventoryCustomColumnUtils.types';\nimport { MarketplacePaymentsTableColumnId } from 'src/utils/columns/marketplacePayments/marketplacePaymentsColumnsUtils.types';\nimport { PurchasesTableColumnId } from 'src/utils/columns/purchases/purchasesColumnUtils.types';\nimport {\n SalesReportTableColumnId,\n SalesTableColumnId,\n SalesTableFlattenedColumnId,\n} from 'src/utils/columns/sales/salesColumnUtils.types';\nimport {\n EVENTS_TABLE_COLUMN_ID_TO_CONTENT_ID,\n LISTING_REPORT_TABLE_COLUMN_ID_TO_CONTENT_ID,\n LISTING_TABLE_COLUMN_ID_TO_CONTENT_ID,\n LISTING_TABLE_FLATTENED_COLUMN_ID_TO_CONTENT_ID,\n ON_SALE_EVENT_TABLE_COLUMN_ID_CONTENT_ID,\n PAYMENTS_TABLE_COLUMN_ID_TO_CONTENT_ID,\n PURCHASE_TABLE_COLUMN_ID_TO_CONTENT_ID,\n SALE_REPORT_TABLE_COLUMN_ID_TO_CONTENT_ID,\n SALE_TABLE_COLUMN_ID_TO_CONTENT_ID,\n SALE_TABLE_FLATTENED_COLUMN_ID_TO_CONTENT_ID,\n} from 'src/utils/constants/contentIdMaps';\nimport {\n SECTION_TYPE_TO_ACTION_OUTBOX_ENTITY_TYPE,\n SECTION_TYPE_TO_CUSTOM_COLUMN_SETTING,\n SectionType,\n} from 'src/utils/types/sectionType';\n\nexport const getContentIdForColumn = (id: string, sectionType: SectionType) => {\n return {\n [SectionType.Listings]:\n LISTING_TABLE_COLUMN_ID_TO_CONTENT_ID[id as ListingTableColumnId],\n [SectionType.ListingsFlattened]:\n LISTING_TABLE_COLUMN_ID_TO_CONTENT_ID[id as ListingTableColumnId] ||\n LISTING_TABLE_FLATTENED_COLUMN_ID_TO_CONTENT_ID[\n id as ListingTableFlattenedColumnId\n ],\n [SectionType.InventorySideTable]:\n LISTING_TABLE_COLUMN_ID_TO_CONTENT_ID[id as ListingTableColumnId],\n [SectionType.Sales]:\n SALE_TABLE_COLUMN_ID_TO_CONTENT_ID[id as SalesTableColumnId],\n [SectionType.SalesFlattened]:\n SALE_TABLE_COLUMN_ID_TO_CONTENT_ID[id as SalesTableColumnId] ||\n SALE_TABLE_FLATTENED_COLUMN_ID_TO_CONTENT_ID[\n id as SalesTableFlattenedColumnId\n ],\n [SectionType.SalesSideTable]:\n SALE_TABLE_COLUMN_ID_TO_CONTENT_ID[id as SalesTableColumnId],\n [SectionType.Events]:\n EVENTS_TABLE_COLUMN_ID_TO_CONTENT_ID[id as EventsTableColumnId],\n [SectionType.SalesReport]:\n SALE_REPORT_TABLE_COLUMN_ID_TO_CONTENT_ID[id as SalesReportTableColumnId],\n [SectionType.Purchases]:\n PURCHASE_TABLE_COLUMN_ID_TO_CONTENT_ID[id as PurchasesTableColumnId],\n [SectionType.PurchaseEvent]:\n PURCHASE_TABLE_COLUMN_ID_TO_CONTENT_ID[id as PurchasesTableColumnId],\n [SectionType.PurchaseSideTable]:\n PURCHASE_TABLE_COLUMN_ID_TO_CONTENT_ID[id as PurchasesTableColumnId],\n [SectionType.ListingsReport]:\n LISTING_REPORT_TABLE_COLUMN_ID_TO_CONTENT_ID[\n id as ListingReportTableColumnId\n ],\n [SectionType.MarketplacePaymentsTable]:\n PAYMENTS_TABLE_COLUMN_ID_TO_CONTENT_ID[\n id as MarketplacePaymentsTableColumnId\n ],\n [SectionType.OnSaleEvents]:\n ON_SALE_EVENT_TABLE_COLUMN_ID_CONTENT_ID[id as OnSaleEventsTableColumnId],\n }[sectionType];\n};\n\nexport const isCustomColumn = (id: string, sectionType: SectionType) => {\n return getContentIdForColumn(id, sectionType) == null;\n};\n\nexport const useColumnDisplayName = ({\n columnIds,\n sectionType,\n}: {\n columnIds: string[];\n sectionType: SectionType;\n}) => {\n const contentContext = useContentContext();\n\n const { isTag } = useTagsForEntityType(\n SECTION_TYPE_TO_ACTION_OUTBOX_ENTITY_TYPE[sectionType],\n true\n );\n\n const { value: customListingColumns = [] } = useServerUserSetting<\n CustomListingColumn[]\n >({\n id: SECTION_TYPE_TO_CUSTOM_COLUMN_SETTING[sectionType],\n });\n\n const displayNamesWithContentId: string[] = useMemo(\n () =>\n columnIds.map((id) => {\n if (isTag(id)) {\n return id;\n } else if (isCustomColumn(id, sectionType)) {\n return customListingColumns.find((c) => c.id === id)?.name ?? id;\n } else {\n return getContentIdForColumn(id, sectionType);\n }\n }),\n [columnIds, customListingColumns, isTag, sectionType]\n );\n\n const columnIdDisplayNameMapping: Record = useMemo(\n () =>\n columnIds.reduce((access, id) => {\n if (isTag(id)) {\n return {\n ...access,\n [id]: id,\n };\n } else if (isCustomColumn(id, sectionType)) {\n const customColumn = customListingColumns.find((c) => c.id === id);\n return {\n ...access,\n [id]: customColumn?.name ?? id,\n };\n } else {\n const contentId = getContentIdForColumn(id, sectionType);\n return {\n ...access,\n [id]: getContent(contentId, contentContext),\n };\n }\n }, {}),\n [columnIds, customListingColumns, contentContext, isTag, sectionType]\n );\n\n const displayNames: string[] = useMemo(() => {\n return displayNamesWithContentId.map((name) =>\n getContent(name, contentContext)\n );\n }, [contentContext, displayNamesWithContentId]);\n\n return { displayNames, columnIdDisplayNameMapping };\n};\n","import { DndContext, DragEndEvent } from '@dnd-kit/core';\nimport { SortableContext } from '@dnd-kit/sortable';\nimport { Content } from 'src/contexts/ContentContext';\nimport { DropWrapper } from 'src/core/POS/DragAndDropSort/DragAndDrop';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SectionType } from 'src/utils/types/sectionType';\n\nimport { ColumnListItem } from '../InventoryTableColumns/ColumnListItem/ColumnListItem';\nimport { useColumnDisplayName } from '../InventoryTableColumns/useColumnDisplayName';\nimport * as styles from './ColumnsSection.css';\n\ntype ColumnsSelectionProps = {\n titleContentId?: ContentId;\n items?: string[];\n renderActions: (id: string) => JSX.Element;\n onDragEnd?: (event: DragEndEvent) => void;\n sectionType: SectionType;\n highlightIndex?: number;\n shouldHideItem?: (id: string) => boolean;\n};\n\n/**\n * The sections that represent the Add Columns and Current Columns for the Edit Columns experience\n */\nexport const ColumnsSection = ({\n titleContentId,\n items = [],\n renderActions,\n onDragEnd,\n sectionType,\n highlightIndex,\n shouldHideItem,\n}: ColumnsSelectionProps) => {\n const { displayNames } = useColumnDisplayName({\n columnIds: items,\n sectionType,\n });\n\n return (\n
    \n {titleContentId && (\n
    \n \n
    \n )}\n
    \n {onDragEnd ? (\n \n \n {items.map((id, i) => {\n if (shouldHideItem?.(id)) {\n return null;\n }\n\n return (\n \n \n \n {displayNames[i]}\n \n \n \n );\n })}\n \n \n ) : (\n <>\n {items.map((id, i) => (\n \n \n {displayNames[i]}\n \n \n ))}\n \n )}\n
    \n
    \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const OperatorsIcon = (props: PosIconProps) => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n );\n};\n","import { Content } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nexport const CustomColumnInstruction = () => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n","import 'react-autocomplete-input/dist/bundle.css';\n\nimport clsx from 'clsx';\nimport { nanoid } from 'nanoid';\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { useForm } from 'react-hook-form';\nimport { useToggle } from 'react-use';\nimport { CancelButton, IconButton } from 'src/components/Buttons';\nimport { OkButton } from 'src/components/Buttons/OkButton';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n Content,\n isContentId,\n useContent,\n useContentContext,\n useContents,\n} from 'src/contexts/ContentContext';\nimport { PosDropdown } from 'src/core/POS/PosDropdown';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { typography } from 'src/core/themes/shared.css';\nimport { Button, Popover } from 'src/core/ui';\nimport { useTagsForEntityType } from 'src/hooks/useTagsForEntityType';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport { OperatorsIcon } from 'src/svgs/OperatorsIcon';\nimport { InfoOutlineIcon } from 'src/svgs/Viagogo';\nimport { EventsFormulaFields } from 'src/tables/EventsTable/configs/EventsTableColumnsConfig';\nimport { SaleFormulaFields } from 'src/tables/SalesTable/SalesTable.type';\nimport { getColumnPersonalization } from 'src/utils/columns/columnPersonalizationUtils';\nimport {\n editableFormulaToTokens,\n FORMULA_DISPLAY_ALLOWED_INSERT_CHARS,\n FORMULA_OPERATORS_AND_NUMBERS_REGEXP_START,\n fromExecutableFormula,\n tagKeyToFieldName,\n toExecutableFormula,\n} from 'src/utils/columns/customColumnUtils';\nimport {\n findDependentEventsTableColumnIds,\n validateFormula as validateFormulaEvents,\n} from 'src/utils/columns/events/eventsCustomColumnUtils';\nimport { FORMULA_FIELD_TO_COLUMN_ID as FORMULA_FIELD_TO_COLUMN_ID_EVENT } from 'src/utils/columns/events/eventsCustomColumnUtils.constants';\nimport {\n CustomEventsColumn,\n CustomOnSaleEventsColumn,\n} from 'src/utils/columns/events/eventsCustomColumnUtils.types';\nimport {\n findDependentListingTableColumnIds as findDependentListingTableColumnIdsListing,\n FORMULA_FIELD_TO_COLUMN_ID as FORMULA_FIELD_TO_COLUMN_ID_LISTING,\n validateFormula as validateFormulaListing,\n} from 'src/utils/columns/inventory/inventoryCustomColumnUtils';\nimport { CustomListingColumn } from 'src/utils/columns/inventory/inventoryCustomColumnUtils.types';\nimport {\n findDependentListingTableColumnIds as findDependentListingTableColumnIdsListingReport,\n FORMULA_FIELD_TO_COLUMN_ID as FORMULA_FIELD_TO_COLUMN_ID_LISTING_REPORT,\n validateFormula as validateFormulaListingReport,\n} from 'src/utils/columns/inventory/inventoryReportCustomColumnUtils';\nimport { CustomMarketplacePaymentsColumn } from 'src/utils/columns/payments/paymentsCustomColumnUtils.types';\nimport { CustomPurchasesColumn } from 'src/utils/columns/purchases/purchasesCustomColumnUtils.types';\nimport {\n findDependentSaleTableColumnIds,\n FORMULA_FIELD_TO_COLUMN_ID as FORMULA_FIELD_TO_COLUMN_ID_SALE,\n validateFormula as validateFormulaSales,\n} from 'src/utils/columns/sales/salesCustomColumnUtils';\nimport { CustomSalesColumn } from 'src/utils/columns/sales/salesCustomColumnUtils.types';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ContentIds } from 'src/utils/constants/contentIdDataMap';\nimport {\n EVENTS_FORMULA_FIELDS_TO_CID,\n EVENTS_TABLE_COLUMN_ID_TO_CONTENT_ID,\n LISTING_FORMULA_FIELDS_TO_CID,\n LISTING_REPORT_FORMULA_FIELDS_TO_CID,\n LISTING_REPORT_TABLE_COLUMN_ID_TO_CONTENT_ID,\n LISTING_TABLE_COLUMN_ID_TO_CONTENT_ID,\n LISTING_TABLE_FLATTENED_COLUMN_ID_TO_CONTENT_ID,\n ListingFormulaFieldsListing,\n ListingFormulaFieldsListingReportMetrics,\n ON_SALE_EVENT_TABLE_COLUMN_ID_CONTENT_ID,\n PAYMENTS_TABLE_COLUMN_ID_TO_CONTENT_ID,\n PURCHASE_TABLE_COLUMN_ID_TO_CONTENT_ID,\n SALE_FORMULA_FIELDS_TO_CID,\n SALE_TABLE_COLUMN_ID_TO_CONTENT_ID,\n SALE_TABLE_FLATTENED_COLUMN_ID_TO_CONTENT_ID,\n} from 'src/utils/constants/contentIdMaps';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport { hasFeatures } from 'src/utils/userUtils';\nimport { ActionOutboxEntityType, UserSetting } from 'src/WebApiController';\n\nimport { Modal, ModalBody, ModalFooter, ModalHeader } from '../Modal';\nimport { CustomColumnInstruction } from './CustomColumnInstruction';\nimport * as styles from './TableColumns.css';\n\nexport type CustomColumnType = {\n id: string;\n name: string;\n formula: string;\n dependency: string[];\n};\n\nexport function TableCustomColumnModal<\n T extends\n | CustomListingColumn\n | CustomSalesColumn\n | CustomEventsColumn\n | CustomPurchasesColumn\n | CustomMarketplacePaymentsColumn\n | CustomOnSaleEventsColumn,\n>({\n onClose,\n onSave,\n columnToEditId,\n sectionType,\n}: {\n onClose: () => void;\n onSave: (columns: T[]) => void;\n columnToEditId?: string;\n sectionType: SectionType;\n}) {\n const [isOpen, toggleIsOpen] = useToggle(true);\n const [showInfo, setShowInfo] = useState(false);\n const [showMetricSelector, setShowMetricSelector] = useState(false);\n const { appContext, loginContext } = useAppContext();\n const { contentResolver } = useContentContext();\n\n const nameColumnPlaceholder = useContent(ContentId.NameColumnPlaceholder);\n const requiredMsg = useContent(ContentId.Required);\n const invalidFormulaMsg = useContent(ContentId.InvalidFormula);\n const columnWithSameNameExistsMsg = useContent(\n ContentId.ColumnWithSameNameExists\n );\n\n const allPresetColumnsMap = {\n [SectionType.Events]: EVENTS_TABLE_COLUMN_ID_TO_CONTENT_ID,\n [SectionType.Listings]: LISTING_TABLE_COLUMN_ID_TO_CONTENT_ID,\n [SectionType.ListingsFlattened]: {\n ...LISTING_TABLE_FLATTENED_COLUMN_ID_TO_CONTENT_ID,\n ...LISTING_TABLE_COLUMN_ID_TO_CONTENT_ID,\n },\n [SectionType.ListingsReport]: LISTING_REPORT_TABLE_COLUMN_ID_TO_CONTENT_ID,\n [SectionType.InventorySideTable]: LISTING_TABLE_COLUMN_ID_TO_CONTENT_ID,\n [SectionType.Sales]: SALE_TABLE_COLUMN_ID_TO_CONTENT_ID,\n [SectionType.SalesFlattened]: {\n ...SALE_TABLE_FLATTENED_COLUMN_ID_TO_CONTENT_ID,\n ...SALE_TABLE_COLUMN_ID_TO_CONTENT_ID,\n },\n [SectionType.SalesReport]: SALE_TABLE_COLUMN_ID_TO_CONTENT_ID,\n [SectionType.SalesSideTable]: SALE_TABLE_COLUMN_ID_TO_CONTENT_ID,\n [SectionType.Purchases]: PURCHASE_TABLE_COLUMN_ID_TO_CONTENT_ID,\n [SectionType.PurchaseEvent]: PURCHASE_TABLE_COLUMN_ID_TO_CONTENT_ID,\n [SectionType.PurchaseSideTable]: PURCHASE_TABLE_COLUMN_ID_TO_CONTENT_ID,\n [SectionType.MarketplacePaymentsTable]:\n PAYMENTS_TABLE_COLUMN_ID_TO_CONTENT_ID,\n [SectionType.OnSaleEvents]: ON_SALE_EVENT_TABLE_COLUMN_ID_CONTENT_ID,\n }[sectionType] as Record;\n\n const allPresetColumnCid = new Set([...Object.values(allPresetColumnsMap)]);\n const allPresetColumnNames = useContents(\n Array.from(allPresetColumnCid.values())\n );\n\n const actionOutboxEntityType = useMemo(() => {\n switch (sectionType) {\n case SectionType.Events:\n return ActionOutboxEntityType.SellerEvent;\n case SectionType.Listings:\n case SectionType.ListingsFlattened:\n case SectionType.ListingsReport:\n case SectionType.InventorySideTable:\n return ActionOutboxEntityType.Listing;\n case SectionType.Sales:\n case SectionType.SalesFlattened:\n case SectionType.SalesReport:\n case SectionType.SalesSideTable:\n return ActionOutboxEntityType.Sale;\n case SectionType.Purchases:\n case SectionType.PurchaseEvent:\n case SectionType.PurchaseSideTable:\n return ActionOutboxEntityType.Purchase;\n default:\n return undefined;\n }\n }, [sectionType]);\n\n const { tagsMetadataNumeric } = useTagsForEntityType(\n actionOutboxEntityType,\n true\n );\n\n const {\n findDependentListingTableColumnIds,\n validateFormula,\n fieldOptionsPreset,\n } =\n sectionType === SectionType.Listings\n ? {\n findDependentListingTableColumnIds:\n findDependentListingTableColumnIdsListing,\n validateFormula: validateFormulaListing,\n fieldOptionsPreset: LISTING_FORMULA_FIELDS_TO_CID,\n }\n : sectionType === SectionType.ListingsReport\n ? {\n findDependentListingTableColumnIds:\n findDependentListingTableColumnIdsListingReport,\n validateFormula: validateFormulaListingReport,\n fieldOptionsPreset: LISTING_REPORT_FORMULA_FIELDS_TO_CID,\n }\n : sectionType === SectionType.Sales\n ? {\n findDependentListingTableColumnIds: findDependentSaleTableColumnIds,\n validateFormula: validateFormulaSales,\n fieldOptionsPreset: SALE_FORMULA_FIELDS_TO_CID,\n }\n : sectionType === SectionType.SalesReport\n ? {\n findDependentListingTableColumnIds: findDependentSaleTableColumnIds,\n validateFormula: validateFormulaSales,\n fieldOptionsPreset: SALE_FORMULA_FIELDS_TO_CID,\n }\n : {\n findDependentListingTableColumnIds: findDependentEventsTableColumnIds,\n validateFormula: validateFormulaEvents,\n fieldOptionsPreset: EVENTS_FORMULA_FIELDS_TO_CID,\n };\n\n const filteredFormulaFields = useMemo(\n () =>\n Object.entries(fieldOptionsPreset)\n .filter(([field]) => {\n const columnId =\n sectionType === SectionType.Listings\n ? FORMULA_FIELD_TO_COLUMN_ID_LISTING[\n field as ListingFormulaFieldsListing\n ]\n : sectionType === SectionType.ListingsReport\n ? FORMULA_FIELD_TO_COLUMN_ID_LISTING_REPORT[\n field as ListingFormulaFieldsListingReportMetrics\n ]\n : sectionType === SectionType.Sales\n ? FORMULA_FIELD_TO_COLUMN_ID_SALE[\n field as keyof SaleFormulaFields\n ]\n : sectionType === SectionType.SalesReport\n ? FORMULA_FIELD_TO_COLUMN_ID_SALE[\n field as keyof SaleFormulaFields\n ]\n : FORMULA_FIELD_TO_COLUMN_ID_EVENT[\n field as keyof EventsFormulaFields\n ];\n\n const columnDef = getColumnPersonalization({\n id: columnId ?? '',\n sectionType,\n });\n const hasFeatureForColumn =\n columnDef.requiredFeatures.length === 0 ||\n hasFeatures(\n loginContext?.user,\n appContext?.features,\n columnDef.requiredFeatures\n );\n return hasFeatureForColumn;\n })\n .reduce>(\n (acc, [field, contentId]) => ({\n ...acc,\n [field]: contentId,\n }),\n {}\n ),\n [appContext?.features, fieldOptionsPreset, loginContext?.user, sectionType]\n );\n\n const fieldOptions = useMemo(\n () => ({\n ...filteredFormulaFields,\n ...tagsMetadataNumeric?.reduce>(\n (acc, tag) => ({\n ...acc,\n [tagKeyToFieldName(tag.key)]: tag.key,\n }),\n {}\n ),\n }),\n [filteredFormulaFields, tagsMetadataNumeric]\n );\n\n const fieldOptionsReverse = useMemo(() => {\n return Object.entries(fieldOptions).reduce>(\n (acc, entry) => {\n const [key, value] = entry;\n if (!isContentId(value)) {\n acc[value] = key;\n return acc;\n }\n\n const content = contentResolver(\n ContentIds[value as ContentId]\n ) as string;\n acc[content] = key;\n return acc;\n },\n {}\n );\n }, [contentResolver, fieldOptions]);\n\n const fieldOptionsDisplay = useMemo(() => {\n const options: Record = {};\n Object.keys(fieldOptionsReverse).forEach((key) => {\n options[fieldOptionsReverse[key]] = key;\n });\n return options;\n }, [fieldOptionsReverse]);\n\n const autoCompleteOptions = useMemo(\n () => Object.keys(fieldOptionsReverse),\n [fieldOptionsReverse]\n );\n\n const { value: customEventsColumns = [] } = useServerUserSetting<\n CustomEventsColumn[]\n >({\n id: UserSetting.EventsCustomColumns,\n });\n const { value: customListingColumns = [] } = useServerUserSetting<\n CustomListingColumn[]\n >({\n id: UserSetting.InventoryCustomColumns,\n });\n const { value: customSaleColumns = [] } = useServerUserSetting<\n CustomSalesColumn[]\n >({\n id: UserSetting.SaleCustomColumns,\n });\n const { value: customPurchaseColumns = [] } = useServerUserSetting<\n CustomSalesColumn[]\n >({\n id: UserSetting.PurchaseCustomColumns,\n });\n const { value: customPaymentsColumns = [] } = useServerUserSetting<\n CustomMarketplacePaymentsColumn[]\n >({\n id: UserSetting.MarketplacePaymentsCustomColumns,\n });\n const { value: customOnSaleEventColumns = [] } = useServerUserSetting<\n CustomOnSaleEventsColumn[]\n >({\n id: UserSetting.OnSaleEventCustomColumns,\n });\n\n const customColumns = {\n [SectionType.Events]: customEventsColumns,\n [SectionType.Listings]: customListingColumns,\n [SectionType.ListingsFlattened]: customListingColumns,\n [SectionType.ListingsReport]: customListingColumns,\n [SectionType.InventorySideTable]: customListingColumns,\n [SectionType.Sales]: customSaleColumns,\n [SectionType.SalesFlattened]: customSaleColumns,\n [SectionType.SalesReport]: customSaleColumns,\n [SectionType.SalesSideTable]: customSaleColumns,\n [SectionType.Purchases]: customPurchaseColumns,\n [SectionType.PurchaseEvent]: customPurchaseColumns,\n [SectionType.PurchaseSideTable]: customPurchaseColumns,\n [SectionType.MarketplacePaymentsTable]: customPaymentsColumns,\n [SectionType.OnSaleEvents]: customOnSaleEventColumns,\n }[sectionType] as T[];\n\n const {\n register,\n handleSubmit,\n setError,\n formState: { errors },\n watch,\n setValue,\n clearErrors,\n } = useForm({\n defaultValues: columnToEditId\n ? customColumns.find((c) => c.id === columnToEditId)\n : { id: nanoid() },\n });\n\n const name = watch('name');\n const [formulaTokens, setFormulaTokens] = useState([]);\n const [formulaCaretPosition, setFormulaCaretPosition] = useState(-1);\n\n const tokenRefs = useRef([]);\n\n const validateNewCustomColumn = useCallback(\n (name: string, formula: string) => {\n let hasError = false;\n\n // check against not only custom column but predefined columns\n const allColumnNames = [\n ...allPresetColumnNames,\n ...customColumns.map((c) => c.name),\n ];\n if (\n allColumnNames.some(\n (n) => n.toLocaleLowerCase() === name.toLocaleLowerCase()\n )\n ) {\n if (\n !columnToEditId ||\n (columnToEditId &&\n customColumns.find((c) => c.id === columnToEditId)?.name !== name)\n ) {\n setError(\n 'name',\n { message: columnWithSameNameExistsMsg },\n { shouldFocus: true }\n );\n hasError = true;\n }\n }\n\n if (!validateFormula(formula, tagsMetadataNumeric)) {\n setError(\n 'formula',\n { message: invalidFormulaMsg },\n { shouldFocus: true }\n );\n hasError = true;\n }\n // check empty\n if (!name) {\n setError('name', { message: requiredMsg }, { shouldFocus: true });\n hasError = true;\n }\n\n if (!formula) {\n setError('formula', { message: requiredMsg }, { shouldFocus: true });\n hasError = true;\n }\n\n return !hasError;\n },\n [\n allPresetColumnNames,\n columnToEditId,\n columnWithSameNameExistsMsg,\n customColumns,\n invalidFormulaMsg,\n requiredMsg,\n setError,\n tagsMetadataNumeric,\n validateFormula,\n ]\n );\n\n const onSaveHandler = (newCustomColumn: CustomColumnType) => {\n newCustomColumn.name = newCustomColumn.name.trim();\n newCustomColumn.formula = toExecutableFormula(formulaTokens ?? []).trim();\n\n if (!validateNewCustomColumn(newCustomColumn.name, newCustomColumn.formula))\n return;\n\n const editableFormula = fromExecutableFormula(newCustomColumn.formula);\n newCustomColumn.dependency = findDependentListingTableColumnIds(\n editableFormula ?? ''\n );\n\n onSave([\n ...customColumns.filter((c) =>\n columnToEditId ? c.id !== columnToEditId : true\n ),\n newCustomColumn,\n ] as T[]);\n\n toggleIsOpen();\n };\n\n const formulaTokensWithCaret = useMemo(() => {\n if (formulaCaretPosition === -1) return formulaTokens;\n const result = [...formulaTokens];\n result.splice(formulaCaretPosition, 0, '|');\n return result;\n }, [formulaCaretPosition, formulaTokens]);\n\n const keyUpHandler = useCallback(\n (e: KeyboardEvent) => {\n // Keys are ignored if the editor is out of focus (no caret)\n if (formulaCaretPosition === -1) return;\n if (FORMULA_DISPLAY_ALLOWED_INSERT_CHARS.includes(e.key)) {\n if (\n // Number pressed and the previous token is number --> append\n /[0-9]/.test(e.key) &&\n formulaCaretPosition > 0 &&\n /[0-9]/.test(formulaTokens[formulaCaretPosition - 1])\n ) {\n const newTokens = [...formulaTokens];\n newTokens[formulaCaretPosition - 1] =\n formulaTokens[formulaCaretPosition - 1] + e.key;\n setFormulaTokens(newTokens);\n } else if (\n // Number pressed and the previous next is number --> prepend\n /[0-9]/.test(e.key) &&\n formulaCaretPosition < formulaTokens.length &&\n /[0-9]/.test(formulaTokens[formulaCaretPosition])\n ) {\n const newTokens = [...formulaTokens];\n newTokens[formulaCaretPosition] =\n e.key + formulaTokens[formulaCaretPosition];\n setFormulaTokens(newTokens);\n } else if (e.key === '@') {\n // @ --> open the metric selector dropdown\n setShowMetricSelector(true);\n } else {\n // else: replace the caret with the typed char (number or operator) and set new caret\n const newTokens = [...formulaTokensWithCaret].map((token) =>\n token === '|' ? e.key : token\n );\n setFormulaTokens(newTokens);\n setFormulaCaretPosition(formulaCaretPosition + 1);\n }\n } else if (e.key === 'ArrowLeft') {\n // move caret left\n setFormulaCaretPosition(formulaCaretPosition - 1);\n } else if (e.key === 'ArrowRight') {\n // move caret right\n setFormulaCaretPosition(formulaCaretPosition + 1);\n } else if (e.key === 'Backspace') {\n // delete one token before the caret\n const newTokens = [...formulaTokens];\n newTokens.splice(formulaCaretPosition - 1, 1);\n setFormulaTokens(newTokens);\n setFormulaCaretPosition(formulaCaretPosition - 1);\n } else if (e.key === 'Delete') {\n // delete one token after the caret\n const newTokens = [...formulaTokens];\n newTokens.splice(formulaCaretPosition, 1);\n setFormulaTokens(newTokens);\n }\n },\n [formulaCaretPosition, formulaTokens, formulaTokensWithCaret]\n );\n\n useEffect(() => {\n window.addEventListener('keyup', keyUpHandler);\n\n return () => {\n window.removeEventListener('keyup', keyUpHandler);\n };\n }, [keyUpHandler]);\n\n useEffect(() => {\n // Set the text value on load\n if (columnToEditId) {\n const formula = customColumns.find((c) => c.id === columnToEditId)\n ?.formula;\n if (formula && autoCompleteOptions.length) {\n setFormulaTokens(\n editableFormulaToTokens(\n fromExecutableFormula(formula),\n fieldOptionsReverse\n )\n );\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [columnToEditId, customColumns, autoCompleteOptions.length]);\n\n useEffect(() => {\n if (!isOpen) setTimeout(onClose, 300);\n }, [isOpen, onClose]);\n\n useEffect(() => {\n // this ensures keeping refs up-to-date for click tracking & caret positioning\n tokenRefs.current = Array(formulaTokens.length).fill(null);\n clearErrors('formula');\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [formulaTokens]);\n\n return (\n {\n // hide caret\n setFormulaCaretPosition(-1);\n setShowMetricSelector(false);\n }}\n >\n \n
    \n
    \n {columnToEditId ? (\n \n ) : (\n \n )}\n
    \n
    \n
    \n \n
    \n
    \n \n
    \n \n {\n clearErrors('name');\n setValue('name', e.target.value);\n }}\n />\n \n
    \n \n\n \n \n setShowInfo((prev) => !prev)}\n >\n \n
    \n \n \n \n \n \n
    \n
    \n \n
    \n }>\n
    \n \n }\n style={{\n display: 'block',\n margin: 'auto',\n padding: vars.spacing.sm,\n }}\n >\n {['+', '-', '*', '/', '(', ')'].map((label, i) => (\n {\n e.stopPropagation();\n // add to tokens at caret position\n const newTokens = [...formulaTokensWithCaret].map(\n (token) => (token === '|' ? label : token)\n );\n setFormulaTokens(newTokens);\n setFormulaCaretPosition(formulaCaretPosition + 1);\n }}\n >\n {label}\n
    \n ))}\n \n \n \n \n }\n style={{\n display: 'block',\n margin: 'auto',\n padding: vars.spacing.sm,\n width: '40%',\n }}\n >\n {autoCompleteOptions.map((label, i) => (\n {\n e.stopPropagation();\n const tokenToAdd = fieldOptionsReverse[label] ?? '|';\n // add to tokens at caret position\n const newTokens = [...formulaTokensWithCaret].map(\n (token) => (token === '|' ? tokenToAdd : token)\n );\n setFormulaTokens(newTokens);\n setFormulaCaretPosition(formulaCaretPosition + 1);\n }}\n >\n {label}\n \n ))}\n \n \n \n
    \n {\n e.stopPropagation();\n const tokenRowRange = formulaTokens\n .map((token, i) => ({\n i,\n token,\n }))\n .filter((tokenItem) => {\n const tokenElement = tokenRefs.current[tokenItem.i];\n if (!tokenElement) return false;\n const rect = tokenElement.getBoundingClientRect();\n return (\n e.clientY >= rect.y && e.clientY <= rect.y + rect.height\n );\n });\n if (tokenRowRange.length === 0) {\n setFormulaCaretPosition(formulaTokens.length);\n return;\n }\n const position = tokenRowRange.find((tokenItem) => {\n const tokenElement = tokenRefs.current[tokenItem.i];\n if (!tokenElement) return false;\n const rect = tokenElement.getBoundingClientRect();\n return rect.x > e.clientX;\n });\n if (position) {\n setFormulaCaretPosition(position.i);\n } else {\n // none of them were left of the click\n const lastInRow = tokenRowRange.at(-1) as {\n i: number;\n token: string;\n };\n setFormulaCaretPosition(lastInRow.i + 1);\n }\n }}\n >\n {formulaTokensWithCaret.map((token, i) =>\n token === '|' ? (\n showMetricSelector ? (\n {\n if (!metric) return;\n const metricToken = fieldOptionsReverse[metric];\n if (!metricToken) return;\n const newTokens = [...formulaTokensWithCaret].map(\n (token) => (token === '|' ? metricToken : token)\n );\n setFormulaTokens(newTokens);\n setFormulaCaretPosition(formulaCaretPosition + 1);\n setShowMetricSelector(false);\n }}\n searchable\n valueOptionsContent={autoCompleteOptions.reduce(\n (options, current) => ({\n ...options,\n [current]: current,\n }),\n {}\n )}\n />\n ) : (\n
    \n |\n
    \n )\n ) : (\n {\n tokenRefs.current[i] = el;\n }}\n className={styles.formulaToken}\n onClick={(e) => {\n e.stopPropagation();\n const newCaretPosition =\n formulaTokens.findIndex((t) => t === token) + 1;\n setFormulaCaretPosition(newCaretPosition);\n }}\n >\n {FORMULA_OPERATORS_AND_NUMBERS_REGEXP_START.test(token)\n ? token\n : fieldOptionsDisplay[token]}\n \n )\n )}\n
    \n \n
    \n \n
    \n \n \n \n \n \n );\n}\n","import { DragEndEvent } from '@dnd-kit/core';\nimport { arrayMove } from '@dnd-kit/sortable';\nimport { MouseEvent, useCallback, useMemo, useState } from 'react';\nimport { useToggle } from 'react-use';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { ConfirmDialog } from 'src/core/interim/dialogs/ConfirmDialog';\nimport { vars } from 'src/core/themes';\nimport { Button, Switch } from 'src/core/ui';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport {\n FormatOption,\n FormatOptionEntries,\n FormatOptionPill,\n LISTING_TABLE_COLUMN_DEFAULT_PRECISION,\n} from 'src/modals/EditTableColumns';\nimport { DeleteIcon, EditIcon, IconsFill, PlusIcon } from 'src/svgs/Viagogo';\nimport { getColumnConfigById } from 'src/utils/columns/columnUtils';\nimport {\n CustomEventsColumn,\n CustomOnSaleEventsColumn,\n} from 'src/utils/columns/events/eventsCustomColumnUtils.types';\nimport { GROUP_BY_TO_PRIMARY_COLUMN_ID } from 'src/utils/columns/inventory/inventoryColumnUtils.constants';\nimport { ListingTableColumnId } from 'src/utils/columns/inventory/inventoryColumnUtils.types';\nimport { CustomListingColumn } from 'src/utils/columns/inventory/inventoryCustomColumnUtils.types';\nimport { CustomMarketplacePaymentsColumn } from 'src/utils/columns/payments/paymentsCustomColumnUtils.types';\nimport { CustomPurchasesColumn } from 'src/utils/columns/purchases/purchasesCustomColumnUtils.types';\nimport { CustomSalesColumn } from 'src/utils/columns/sales/salesCustomColumnUtils.types';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport { ReportGroupBy, Tag, UserSetting } from 'src/WebApiController';\n\nimport { ColumnsSection } from './ColumnsSection';\nimport * as styles from './TableColumns.css';\nimport { TableCustomColumnModal } from './TableCustomColumnModal';\n\ntype TableColumnsInputProps = {\n // Override of required column ids - additive to the default required columns\n requiredColumns?: string[];\n userColumnSelection: string[];\n onUserColumnSelectionChange: (newSelection: string[]) => void;\n userColumnSorting: string[];\n onUserColumnSortingChange: (newSorting: string[]) => void;\n userEditableColumns?: string[];\n onUserEditableColumnsChange?: (newEditableColumns: string[]) => void;\n customColumns: T[];\n onCustomColumnsChange?: (newCustomColumns: T[]) => void;\n reportingTags?: Tag[];\n enableConfigureEditability?: boolean;\n sectionType?: SectionType;\n groupBy?: ReportGroupBy;\n // Only used with SectionType.Listings\n // We only want to show this column for setting if it's visible in the current view\n showTicketClassColor?: boolean;\n style?: React.CSSProperties;\n // Only supported for Purchase for now, used for filtering visible columns\n viewMode?: string | null;\n};\n\nexport function TableColumnsInput<\n T extends\n | CustomListingColumn\n | CustomSalesColumn\n | CustomEventsColumn\n | CustomPurchasesColumn\n | CustomMarketplacePaymentsColumn\n | CustomOnSaleEventsColumn,\n>({\n requiredColumns,\n userColumnSelection,\n onUserColumnSelectionChange,\n userColumnSorting,\n onUserColumnSortingChange,\n userEditableColumns,\n onUserEditableColumnsChange,\n customColumns,\n onCustomColumnsChange,\n reportingTags,\n enableConfigureEditability,\n sectionType = SectionType.Listings,\n groupBy,\n showTicketClassColor,\n viewMode,\n style,\n}: TableColumnsInputProps) {\n const [isCustomColumnModalOpen, toggleCustomColumnModal] = useToggle(false);\n const [customColumnToEditId, setCustomColumnToEditId] = useState();\n const [customColumnToDeleteId, setCustomColumnToDeleteId] =\n useState();\n const [highlightedItemIndex, setHighlightedItemIndex] = useState(-1);\n\n const deleteCustomColumnConfirmDialog = useBasicDialog();\n\n const columnNumberPrecisionSettingId = {\n [SectionType.Events]: UserSetting.EventsColumnNumberPrecision,\n [SectionType.Listings]: UserSetting.InventoryColumnNumberPrecision,\n [SectionType.ListingsFlattened]:\n UserSetting.InventoryFlattenedColumnNumberPrecision,\n [SectionType.ListingsReport]: UserSetting.InventoryColumnNumberPrecision,\n [SectionType.InventorySideTable]:\n UserSetting.InventorySideTableColumnNumberPrecision,\n [SectionType.Sales]: UserSetting.SaleColumnNumberPrecision,\n [SectionType.SalesFlattened]:\n UserSetting.SaleFlattenedColumnNumberPrecision,\n [SectionType.SalesReport]: UserSetting.SaleColumnNumberPrecision,\n [SectionType.SalesSideTable]:\n UserSetting.SalesSideTableColumnNumberPrecision,\n [SectionType.Purchases]: UserSetting.PurchaseColumnNumberPrecision,\n [SectionType.PurchaseEvent]: UserSetting.PurchaseEventColumnNumberPrecision,\n [SectionType.PurchaseSideTable]:\n UserSetting.PurchaseSideTableColumnNumberPrecision,\n [SectionType.MarketplacePaymentsTable]:\n UserSetting.MarketplacePaymentsColumnNumberPrecision,\n [SectionType.OnSaleEvents]: UserSetting.OnSaleEventColumnNumberPrecision,\n }[sectionType];\n\n const {\n value: storedColumnNumberPrecisions = {},\n setUserSetting: setNumberPrecisionSetting,\n } = useServerUserSetting({\n id: columnNumberPrecisionSettingId,\n });\n\n const updateNumberPrecisionSetting = useCallback(\n (id: string, precision: FormatOption) => {\n setNumberPrecisionSetting({\n ...storedColumnNumberPrecisions,\n [id]: precision,\n });\n },\n [setNumberPrecisionSetting, storedColumnNumberPrecisions]\n );\n\n const isTagColumn = useCallback(\n (tagName: string) => (reportingTags ?? []).some((t) => t.key === tagName),\n [reportingTags]\n );\n\n const moveColumnUnderLastEnabled = useCallback(\n (id: string) => {\n const currentPosition = userColumnSorting.indexOf(id);\n const lastEnabledPosition = userColumnSorting.findLastIndex((col) =>\n userColumnSelection.includes(col)\n );\n if (\n currentPosition === -1 ||\n lastEnabledPosition === -1 ||\n currentPosition === lastEnabledPosition\n ) {\n return;\n }\n const newPosition =\n currentPosition < lastEnabledPosition\n ? lastEnabledPosition\n : lastEnabledPosition + 1;\n onUserColumnSortingChange(\n arrayMove(userColumnSorting, currentPosition, newPosition)\n );\n setHighlightedItemIndex(newPosition);\n setTimeout(() => {\n // reset one-off highlight\n setHighlightedItemIndex(-1);\n }, 1100);\n },\n [onUserColumnSortingChange, userColumnSelection, userColumnSorting]\n );\n\n const addColumn = useCallback(\n (id: string) => {\n moveColumnUnderLastEnabled(id);\n onUserColumnSelectionChange([...userColumnSelection, id]);\n },\n [\n moveColumnUnderLastEnabled,\n onUserColumnSelectionChange,\n userColumnSelection,\n ]\n );\n\n const removeColumn = useCallback(\n (id: string) => {\n moveColumnUnderLastEnabled(id);\n onUserColumnSelectionChange(\n userColumnSelection?.filter((cId) => cId !== id)\n );\n },\n [\n moveColumnUnderLastEnabled,\n onUserColumnSelectionChange,\n userColumnSelection,\n ]\n );\n\n const deleteCustomColumn = useCallback(\n (id: string) => {\n removeColumn(id);\n const remainingColumns = customColumns.filter(\n (c) => (c as T & { id: string }).id !== id\n ) as T[];\n onCustomColumnsChange?.(remainingColumns);\n },\n [customColumns, removeColumn, onCustomColumnsChange]\n );\n\n const editCustomColumn = useCallback(\n (id: string) => {\n if (!isCustomColumnModalOpen) {\n setCustomColumnToEditId(id);\n toggleCustomColumnModal();\n }\n },\n [isCustomColumnModalOpen, toggleCustomColumnModal]\n );\n\n const renderColumnRowActions = useCallback(\n (id: string /*isColumnAdded?: boolean*/) => {\n const personalization = getColumnConfigById({\n id,\n customColumns,\n sectionType,\n reportingTags,\n }).personalization;\n\n const {\n isNumeric,\n isDateTime,\n isCurrency,\n isPercent,\n isEditabilityConfigurable,\n isInteger,\n } = personalization;\n\n let isRequired = personalization.isRequired;\n if (groupBy) {\n if (sectionType === SectionType.ListingsReport) {\n isRequired = GROUP_BY_TO_PRIMARY_COLUMN_ID[groupBy] === id;\n }\n }\n if (requiredColumns?.includes(id)) {\n isRequired = true;\n }\n\n const isCustom = customColumns.find(\n (c) => (c as T & { id: string }).id === id\n );\n\n const toggleColumn = (isChecked: boolean) => {\n if (isChecked) {\n if (!userColumnSelection.includes(id)) {\n addColumn(id);\n }\n } else {\n if (!isRequired) removeColumn(id);\n }\n };\n\n return (\n {\n e.stopPropagation();\n }}\n >\n {isCustom && (\n
    \n \n
    \n )}\n {isTagColumn(id) && (\n
    \n \n
    \n )}\n {isEditabilityConfigurable && enableConfigureEditability ? (\n \n {\n e.stopPropagation();\n const isChecked = e.target.checked;\n if (isChecked) {\n onUserEditableColumnsChange?.([\n ...userEditableColumns!,\n id,\n ]);\n } else {\n onUserEditableColumnsChange?.(\n userEditableColumns!.filter((cId) => cId !== id)\n );\n }\n }}\n label={\n userEditableColumns!.includes(id) ? (\n \n ) : (\n \n )\n }\n labelPosition=\"right\"\n />\n \n ) : null}\n {isNumeric || isDateTime ? (\n \n ) : null}\n\n {isCustom && onCustomColumnsChange && (\n <>\n {\n editCustomColumn(id);\n }}\n />\n {\n setCustomColumnToDeleteId(id);\n deleteCustomColumnConfirmDialog.launchDialog();\n }}\n />\n \n )}\n\n \n \n );\n },\n [\n addColumn,\n customColumns,\n deleteCustomColumnConfirmDialog,\n editCustomColumn,\n enableConfigureEditability,\n groupBy,\n isTagColumn,\n onCustomColumnsChange,\n onUserEditableColumnsChange,\n removeColumn,\n reportingTags,\n requiredColumns,\n sectionType,\n storedColumnNumberPrecisions,\n updateNumberPrecisionSetting,\n userColumnSelection,\n userEditableColumns,\n ]\n );\n\n const renderToggleButton = useCallback(\n (id: string) => renderColumnRowActions(id),\n [renderColumnRowActions]\n );\n\n /**\n * Handler that sets the column order based on the drag drop event\n */\n const onDragEndHandler = useCallback(\n (event: DragEndEvent) => {\n const { active, over } = event;\n if (!over) return;\n const activeIndex = active.data.current?.sortable.index;\n const overIndex = over?.data.current?.sortable.index;\n\n onUserColumnSortingChange(\n arrayMove(userColumnSorting, activeIndex, overIndex)\n );\n },\n [onUserColumnSortingChange, userColumnSorting]\n );\n\n const openAddColumnModal = useCallback(\n (e: MouseEvent) => {\n e.stopPropagation();\n if (!isCustomColumnModalOpen) {\n setCustomColumnToEditId(undefined);\n toggleCustomColumnModal();\n }\n },\n [isCustomColumnModalOpen, toggleCustomColumnModal]\n );\n\n const hiddenItemIds = useMemo(() => {\n if (showTicketClassColor) {\n return [];\n }\n\n return [ListingTableColumnId.TicketClassColor.toString()];\n }, [showTicketClassColor]);\n\n const shouldHideItem = useCallback(\n (id: string) => {\n if (hiddenItemIds?.includes(id)) {\n return true;\n }\n\n const { visibleViewModes } = getColumnConfigById({\n id,\n customColumns,\n sectionType,\n reportingTags,\n }).personalization;\n\n if (\n visibleViewModes.length > 0 &&\n viewMode &&\n !visibleViewModes.includes(viewMode)\n ) {\n return true;\n }\n\n return false;\n },\n [customColumns, hiddenItemIds, reportingTags, sectionType, viewMode]\n );\n\n return (\n <>\n
    \n \n {onCustomColumnsChange && (\n \n \n \n \n )}\n
    \n {isCustomColumnModalOpen && (\n {\n onCustomColumnsChange?.(newColumns);\n }}\n sectionType={sectionType}\n />\n )}\n\n }\n bodyText={}\n onOkay={() => {\n if (customColumnToDeleteId) {\n deleteCustomColumn(customColumnToDeleteId);\n setCustomColumnToDeleteId(undefined);\n }\n\n deleteCustomColumnConfirmDialog.closeDialog();\n }}\n onCancel={() => deleteCustomColumnConfirmDialog.closeDialog()}\n />\n \n );\n}\n","import clsx from 'clsx';\nimport { isEqual, uniq } from 'lodash-es';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport { useToggle } from 'react-use';\nimport { CancelButton } from 'src/components/Buttons';\nimport { OkButton } from 'src/components/Buttons/OkButton';\nimport { prependTicketClassColorColumnForFirstTime } from 'src/components/Listings/InventoryEventPage/Sections/ManualPricingSection.utils';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { typography } from 'src/core/themes/shared.css';\nimport { useTagsForEntityType } from 'src/hooks/useTagsForEntityType';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport { ON_SALE_EVENTS_TABLE_COLUMNS_CONFIG } from 'src/navigations/Routes/OnSaleEvent/OnSaleEventView.constants';\nimport { EVENTS_TABLE_COLUMNS_CONFIG } from 'src/tables/EventsTable/configs/EventsTableColumnsConfig';\nimport { LISTING_REPORT_TABLE_COLUMNS_CONFIG } from 'src/tables/ListingTable/configs/ListingReportTableColumnsConfig';\nimport { getListingTableColumnConfigs } from 'src/tables/ListingTable/configs/ListingTableColumnsConfig';\nimport { LISTING_TABLE_FLATTENED_COLUMNS_CONFIG } from 'src/tables/ListingTable/configs/ListingTableFlattenedColumnsConfig';\nimport { useMarketplacePaymentsTableColumnsConfig } from 'src/tables/MarketplacePaymentsTable';\nimport { useDefaultPaymentsColumnConfig } from 'src/tables/PaymentsTable/useDefaultPaymentsColumnConfig';\nimport { PURCHASE_TABLE_COLUMNS_CONFIG } from 'src/tables/PurchaseTable/configs/PurchaseTableColumnsConfig';\nimport { SALE_REPORT_TABLE_COLUMNS_CONFIG } from 'src/tables/SalesTable/configs/SaleReportTableColumnsConfig';\nimport { SALE_TABLE_COLUMNS_CONFIG } from 'src/tables/SalesTable/configs/SaleTableColumnsConfig';\nimport { SALE_TABLE_FLATTENED_COLUMNS_CONFIG } from 'src/tables/SalesTable/configs/SaleTableFlattenedColumnsConfig';\nimport { getColumnPersonalization } from 'src/utils/columns/columnPersonalizationUtils';\nimport {\n defaultEventsColumnsConfig,\n defaultListingColumnsConfig,\n defaultListingFlattenedColumnsConfig,\n defaultOnSaleEventsColumnsConfig,\n defaultPurchaseEventEnabledColumnsConfig,\n defaultPurchasesColumnsConfig,\n defaultSalesColumnsConfig,\n defaultSalesFlattenedColumnsConfig,\n filterColumnsByFeatures,\n} from 'src/utils/columns/columnUtils';\nimport {\n CustomEventsColumn,\n CustomOnSaleEventsColumn,\n} from 'src/utils/columns/events/eventsCustomColumnUtils.types';\nimport { filterCustomColumnsForListing } from 'src/utils/columns/inventory/inventoryCustomColumnUtils';\nimport { CustomListingColumn } from 'src/utils/columns/inventory/inventoryCustomColumnUtils.types';\nimport { CustomMarketplacePaymentsColumn } from 'src/utils/columns/payments/paymentsCustomColumnUtils.types';\nimport { CustomPurchasesColumn } from 'src/utils/columns/purchases/purchasesCustomColumnUtils.types';\nimport { filterCustomColumnsForSale } from 'src/utils/columns/sales/salesCustomColumnUtils';\nimport { CustomSalesColumn } from 'src/utils/columns/sales/salesCustomColumnUtils.types';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport {\n ActionOutboxEntityType,\n Feature,\n UserSetting,\n} from 'src/WebApiController';\n\nimport { Modal, ModalBody, ModalFooter, ModalHeader } from '../Modal';\nimport * as styles from './ColumnSettings.css';\nimport { TableColumnsInput } from './TableColumnsInput';\n\nexport type TableColumnsSectionType =\n | SectionType.Listings\n | SectionType.ListingsFlattened\n | SectionType.InventorySideTable\n | SectionType.Sales\n | SectionType.SalesFlattened\n | SectionType.SalesSideTable\n | SectionType.Events\n | SectionType.Purchases\n | SectionType.PurchaseEvent\n | SectionType.PurchaseSideTable\n | SectionType.MarketplacePaymentsTable\n | SectionType.OnSaleEvents;\ntype TableColumnsModalContainerProps = {\n onClose: () => void;\n // Not fully supporting reporting yet\n sectionType: TableColumnsSectionType;\n // Only supported for Purchase for now, used for filtering visible columns\n viewMode?: string | null;\n // Only used with SectionType.Listings\n // We only want to show this column for setting if it's visible in the current view\n showTicketClassColor?: boolean;\n};\n\nexport function ColumnSettingsModal<\n T extends\n | CustomOnSaleEventsColumn\n | CustomListingColumn\n | CustomSalesColumn\n | CustomEventsColumn\n | CustomPurchasesColumn,\n>({\n onClose,\n sectionType,\n viewMode,\n showTicketClassColor,\n}: TableColumnsModalContainerProps) {\n const { appContext, loginContext } = useAppContext();\n\n const hasTablePinActionColumnFeature = useUserHasFeature(\n Feature.TablePinActionColumn\n );\n const hasSortListingsInGroupFeature = useUserHasFeature(\n Feature.SortListingsInGroup\n );\n const hasSectionalLoadInListingTableFeature = useUserHasFeature(\n Feature.SectionalLoadInListingTable\n );\n\n const [isOpen, toggleIsOpen] = useToggle(true);\n const {\n value: storedEventsColumnOrderSetting = defaultEventsColumnsConfig,\n setUserSetting: setEventsColumnOrderSetting,\n } = useServerUserSetting({\n id: UserSetting.EventsColumnOrder,\n });\n const {\n value: storedInventoryColumnOrderSetting = defaultListingColumnsConfig,\n setUserSetting: setInventoryColumnOrderSetting,\n } = useServerUserSetting({\n id: UserSetting.InventoryColumnOrder,\n });\n const {\n value:\n storedInventoryFlattenedColumnOrderSetting = defaultListingFlattenedColumnsConfig,\n setUserSetting: setInventoryFlattenedColumnOrderSetting,\n } = useServerUserSetting({\n id: UserSetting.InventoryFlattenedColumnOrder,\n });\n const {\n value:\n storedInventorySideTableColumnsOrderSetting = defaultListingColumnsConfig,\n setUserSetting: setInventorySideTableColumnsOrderSetting,\n } = useServerUserSetting({\n id: UserSetting.InventorySideTableColumnOrder,\n });\n const {\n value: storedSaleColumnOrderSetting = defaultSalesColumnsConfig,\n setUserSetting: setSaleColumnOrderSetting,\n } = useServerUserSetting({\n id: UserSetting.SaleColumnOrder,\n });\n const {\n value:\n storedSaleFlattenedColumnOrderSetting = defaultSalesFlattenedColumnsConfig,\n setUserSetting: setSaleFlattenedColumnOrderSetting,\n } = useServerUserSetting({\n id: UserSetting.SaleFlattenedColumnOrder,\n });\n const {\n value: storedSaleSideTableColumnOrderSetting = defaultSalesColumnsConfig,\n setUserSetting: setSaleSideTableColumnOrderSetting,\n } = useServerUserSetting({\n id: UserSetting.SalesSideTableColumnOrder,\n });\n const {\n value: storedPurchaseColumnOrderSetting = defaultPurchasesColumnsConfig,\n setUserSetting: setPurchaseColumnOrderSetting,\n } = useServerUserSetting({\n id: UserSetting.PurchaseColumnOrder,\n });\n const {\n value:\n storedPurchaseEventColumnOrderSetting = defaultPurchaseEventEnabledColumnsConfig,\n setUserSetting: setPurchaseEventColumnOrderSetting,\n } = useServerUserSetting({\n id: UserSetting.PurchaseEventColumnOrder,\n });\n const {\n value:\n storedPurchaseSideTableColumnOrderSetting = defaultPurchasesColumnsConfig,\n setUserSetting: setPurchaseSideTableColumnOrderSetting,\n } = useServerUserSetting({\n id: UserSetting.PurchaseSideTableColumnOrder,\n });\n const defaultMarketplaceColumnsConfig =\n useMarketplacePaymentsTableColumnsConfig();\n const defaultMarketplacePaymentsColumnsId = useDefaultPaymentsColumnConfig();\n const {\n value:\n storedMarketplacePaymentsTableColumnOrderSetting = defaultMarketplacePaymentsColumnsId,\n setUserSetting: setMarketplacePaymentsTableColumnOrderSetting,\n } = useServerUserSetting({\n id: UserSetting.MarketplacePaymentsTableColumnOrder,\n });\n const {\n value:\n storedOnSaleEventsTableColumnOrderSetting = defaultOnSaleEventsColumnsConfig,\n setUserSetting: setOnSaleEventsTableColumnOrderSetting,\n } = useServerUserSetting({\n id: UserSetting.OnSaleEventColumnsOrder,\n });\n\n const setColumnOrderSetting = {\n [SectionType.Events]: setEventsColumnOrderSetting,\n [SectionType.Listings]: setInventoryColumnOrderSetting,\n [SectionType.ListingsFlattened]: setInventoryFlattenedColumnOrderSetting,\n [SectionType.ListingsReport]: () => console.log('Unused'),\n [SectionType.InventorySideTable]: setInventorySideTableColumnsOrderSetting,\n [SectionType.Sales]: setSaleColumnOrderSetting,\n [SectionType.SalesFlattened]: setSaleFlattenedColumnOrderSetting,\n [SectionType.SalesReport]: () => console.log('Unused'),\n [SectionType.SalesSideTable]: setSaleSideTableColumnOrderSetting,\n [SectionType.Purchases]: setPurchaseColumnOrderSetting,\n [SectionType.PurchaseEvent]: setPurchaseEventColumnOrderSetting,\n [SectionType.PurchaseSideTable]: setPurchaseSideTableColumnOrderSetting,\n [SectionType.MarketplacePaymentsTable]:\n setMarketplacePaymentsTableColumnOrderSetting,\n [SectionType.OnSaleEvents]: setOnSaleEventsTableColumnOrderSetting,\n }[sectionType];\n\n const {\n value: storedEventsColumnsEnabledSetting,\n setUserSetting: setEventsColumnsEnabledSetting,\n } = useServerUserSetting({\n id: UserSetting.EventsColumnsEnabled,\n });\n const {\n value: storedInventoryColumnsEnabledSetting,\n setUserSetting: setInventoryColumnsEnabledSetting,\n } = useServerUserSetting({\n id: UserSetting.InventoryColumnsEnabled,\n });\n const {\n value: storedInventoryFlattenedColumnsEnabledSetting,\n setUserSetting: setInventoryFlattenedColumnsEnabledSetting,\n } = useServerUserSetting({\n id: UserSetting.InventoryFlattenedColumnsEnabled,\n });\n const {\n value: storedInventorySideTableColumnsEnabledSetting,\n setUserSetting: setInventorySideTableColumnsEnabledSetting,\n } = useServerUserSetting({\n id: UserSetting.InventorySideTableColumnsEnabled,\n });\n const {\n value: storedSaleColumnsEnabledSetting,\n setUserSetting: setSaleColumnsEnabledSetting,\n } = useServerUserSetting({\n id: UserSetting.SaleColumnsEnabled,\n });\n const {\n value: storedSaleFlattenedColumnsEnabledSetting,\n setUserSetting: setSaleFlattenedColumnsEnabledSetting,\n } = useServerUserSetting({\n id: UserSetting.SaleFlattenedColumnsEnabled,\n });\n const {\n value: storedSaleSideTableColumnsEnabledSetting,\n setUserSetting: setSaleSideTableColumnsEnabledSetting,\n } = useServerUserSetting({\n id: UserSetting.SalesSideTableColumnsEnabled,\n });\n const {\n value: storedPurchaseColumnsEnabledSetting,\n setUserSetting: setPurchaseColumnsEnabledSetting,\n } = useServerUserSetting({\n id: UserSetting.PurchaseColumnsEnabled,\n });\n const {\n value:\n storedPurchaseEventColumnsEnabledSetting = defaultPurchaseEventEnabledColumnsConfig,\n setUserSetting: setPurchaseEventColumnsEnabledSetting,\n } = useServerUserSetting({\n id: UserSetting.PurchaseEventColumnsEnabled,\n });\n const {\n value: storedPurchaseSideTableColumnsEnabledSetting,\n setUserSetting: setPurchaseSideTableColumnsEnabledSetting,\n } = useServerUserSetting({\n id: UserSetting.PurchaseSideTableColumnsEnabled,\n });\n const {\n value: storedMarketplacePaymentsTableColumnsEnabledSetting,\n setUserSetting: setMarketplacePaymentsTableColumnsEnabledSetting,\n } = useServerUserSetting({\n id: UserSetting.MarketplacePaymentsTableColumnsEnabled,\n });\n const {\n value: storedOnSaleEventsTableColumnsEnabledSetting,\n setUserSetting: setOnSaleEventsTableColumnsEnabledSetting,\n } = useServerUserSetting({\n id: UserSetting.OnSaleEventColumnsEnabled,\n });\n\n const setColumnsEnabledSetting = {\n [SectionType.Events]: setEventsColumnsEnabledSetting,\n [SectionType.Listings]: setInventoryColumnsEnabledSetting,\n [SectionType.ListingsFlattened]: setInventoryFlattenedColumnsEnabledSetting,\n [SectionType.ListingsReport]: () => console.log('Unused'),\n [SectionType.InventorySideTable]:\n setInventorySideTableColumnsEnabledSetting,\n [SectionType.Sales]: setSaleColumnsEnabledSetting,\n [SectionType.SalesFlattened]: setSaleFlattenedColumnsEnabledSetting,\n [SectionType.SalesReport]: () => console.log('Unused'),\n [SectionType.SalesSideTable]: setSaleSideTableColumnsEnabledSetting,\n [SectionType.Purchases]: setPurchaseColumnsEnabledSetting,\n [SectionType.PurchaseEvent]: setPurchaseEventColumnsEnabledSetting,\n [SectionType.PurchaseSideTable]: setPurchaseSideTableColumnsEnabledSetting,\n [SectionType.MarketplacePaymentsTable]:\n setMarketplacePaymentsTableColumnsEnabledSetting,\n [SectionType.OnSaleEvents]: setOnSaleEventsTableColumnsEnabledSetting,\n }[sectionType];\n\n const {\n value: customEventsColumns = [],\n setUserSetting: setCustomEventsColumns,\n } = useServerUserSetting({\n id: UserSetting.EventsCustomColumns,\n });\n const {\n value: customListingColumns = [],\n setUserSetting: setCustomListingColumns,\n } = useServerUserSetting({\n id: UserSetting.InventoryCustomColumns,\n });\n const {\n value: customSaleColumns = [],\n setUserSetting: setCustomSaleColumns,\n } = useServerUserSetting({\n id: UserSetting.SaleCustomColumns,\n });\n const {\n value: customPurchaseColumns = [],\n setUserSetting: setCustomPurchaseColumns,\n } = useServerUserSetting({\n id: UserSetting.PurchaseCustomColumns,\n });\n const {\n value: customMarketplacePaymentsColumns = [],\n setUserSetting: setCustomMarketplacePaymentsColumns,\n } = useServerUserSetting({\n id: UserSetting.MarketplacePaymentsCustomColumns,\n });\n const {\n value: customOnSaleEventColumns = [],\n setUserSetting: setCustomOnSaleEvemtsColumns,\n } = useServerUserSetting({\n id: UserSetting.OnSaleEventCustomColumns,\n });\n const setCustomColumns = {\n [SectionType.Events]: setCustomEventsColumns,\n [SectionType.Listings]: setCustomListingColumns,\n [SectionType.ListingsFlattened]: setCustomListingColumns,\n [SectionType.ListingsReport]: () => console.log('Unused'),\n [SectionType.InventorySideTable]: setCustomListingColumns,\n [SectionType.Sales]: setCustomSaleColumns,\n [SectionType.SalesFlattened]: setCustomSaleColumns,\n [SectionType.SalesReport]: () => console.log('Unused'),\n [SectionType.SalesSideTable]: setCustomSaleColumns,\n [SectionType.Purchases]: setCustomPurchaseColumns,\n [SectionType.PurchaseEvent]: setCustomPurchaseColumns,\n [SectionType.PurchaseSideTable]: setCustomPurchaseColumns,\n [SectionType.MarketplacePaymentsTable]: setCustomMarketplacePaymentsColumns,\n [SectionType.OnSaleEvents]: setCustomOnSaleEvemtsColumns,\n }[sectionType] as (value: T[]) => void;\n\n const actionOutboxEntityType = useMemo(() => {\n switch (sectionType) {\n case SectionType.Events:\n return ActionOutboxEntityType.SellerEvent;\n case SectionType.Listings:\n case SectionType.ListingsFlattened:\n case SectionType.InventorySideTable:\n return ActionOutboxEntityType.Listing;\n case SectionType.Sales:\n case SectionType.SalesFlattened:\n case SectionType.SalesSideTable:\n return ActionOutboxEntityType.Sale;\n case SectionType.Purchases:\n case SectionType.PurchaseEvent:\n case SectionType.PurchaseSideTable:\n return ActionOutboxEntityType.Purchase;\n }\n }, [sectionType]);\n\n const { tagsMetadataNumeric, tagsMetadata } = useTagsForEntityType(\n actionOutboxEntityType,\n true\n );\n\n const customColumnsFiltered = {\n [SectionType.Events]: customEventsColumns, // TODO: check if correct\n [SectionType.Listings]: filterCustomColumnsForListing(\n customListingColumns,\n tagsMetadataNumeric\n ),\n [SectionType.ListingsFlattened]: filterCustomColumnsForListing(\n customListingColumns,\n tagsMetadataNumeric\n ),\n [SectionType.ListingsReport]: () => console.log('Unused'),\n [SectionType.InventorySideTable]: filterCustomColumnsForListing(\n customListingColumns,\n tagsMetadataNumeric\n ),\n [SectionType.Sales]: filterCustomColumnsForSale(\n customSaleColumns,\n tagsMetadataNumeric\n ),\n [SectionType.SalesFlattened]: filterCustomColumnsForSale(\n customSaleColumns,\n tagsMetadataNumeric\n ),\n [SectionType.SalesReport]: () => console.log('Unused'),\n [SectionType.SalesSideTable]: filterCustomColumnsForSale(\n customSaleColumns,\n tagsMetadataNumeric\n ),\n [SectionType.Purchases]: customPurchaseColumns,\n [SectionType.PurchaseEvent]: customPurchaseColumns,\n [SectionType.PurchaseSideTable]: customPurchaseColumns,\n\n [SectionType.MarketplacePaymentsTable]: customMarketplacePaymentsColumns,\n [SectionType.OnSaleEvents]: customOnSaleEventColumns,\n }[sectionType] as T[];\n\n const presetColumns = {\n [SectionType.Events]: EVENTS_TABLE_COLUMNS_CONFIG,\n [SectionType.Listings]: getListingTableColumnConfigs(\n hasSortListingsInGroupFeature\n ),\n [SectionType.ListingsFlattened]: {\n ...LISTING_TABLE_FLATTENED_COLUMNS_CONFIG,\n ...getListingTableColumnConfigs(\n hasSortListingsInGroupFeature,\n false,\n hasSectionalLoadInListingTableFeature\n ),\n },\n [SectionType.InventorySideTable]: getListingTableColumnConfigs(\n hasSortListingsInGroupFeature,\n false,\n hasSectionalLoadInListingTableFeature\n ),\n [SectionType.ListingsReport]: LISTING_REPORT_TABLE_COLUMNS_CONFIG,\n [SectionType.Sales]: SALE_TABLE_COLUMNS_CONFIG,\n [SectionType.SalesFlattened]: {\n ...SALE_TABLE_FLATTENED_COLUMNS_CONFIG,\n ...SALE_TABLE_COLUMNS_CONFIG,\n },\n [SectionType.SalesReport]: SALE_REPORT_TABLE_COLUMNS_CONFIG,\n [SectionType.SalesSideTable]: SALE_TABLE_COLUMNS_CONFIG,\n [SectionType.Purchases]: PURCHASE_TABLE_COLUMNS_CONFIG,\n [SectionType.PurchaseEvent]: PURCHASE_TABLE_COLUMNS_CONFIG,\n [SectionType.PurchaseSideTable]: PURCHASE_TABLE_COLUMNS_CONFIG,\n [SectionType.MarketplacePaymentsTable]: defaultMarketplaceColumnsConfig,\n [SectionType.OnSaleEvents]: ON_SALE_EVENTS_TABLE_COLUMNS_CONFIG,\n }[sectionType];\n\n const presetColumnIds = Object.values(presetColumns).map((i) => i.id);\n\n const filterColumns = useCallback(\n (columnList: string[]) => {\n // Filter out reporting tags that are later turned off reporting\n const activeTagNames = tagsMetadata?.map((t) => t.key) ?? [];\n const customColumnIds = customColumnsFiltered.map(\n (c) => (c as T & { id: string }).id\n );\n return columnList.filter((columnId) => {\n // Don't show inconfigurable columns - like checkbox\n if (presetColumnIds.includes(columnId)) {\n const isConfigurable = getColumnPersonalization({\n id: columnId,\n sectionType,\n }).isConfigurable;\n\n // With this new feature, we set action column as a column always showing at the right, thus inconfigurable\n // Without the feature, we treat the column as configurable\n if (!hasTablePinActionColumnFeature) {\n if (columnId === 'action' || columnId === 'actions') {\n return true;\n }\n }\n\n return isConfigurable;\n }\n return (\n activeTagNames.includes(columnId) ||\n customColumnIds.includes(columnId)\n );\n });\n },\n [\n customColumnsFiltered,\n hasTablePinActionColumnFeature,\n presetColumnIds,\n sectionType,\n tagsMetadata,\n ]\n );\n\n const storedColumnsEnabledSetting = {\n [SectionType.Events]: storedEventsColumnsEnabledSetting,\n [SectionType.Listings]: storedInventoryColumnsEnabledSetting,\n [SectionType.ListingsFlattened]:\n storedInventoryFlattenedColumnsEnabledSetting,\n [SectionType.ListingsReport]: [],\n [SectionType.InventorySideTable]:\n storedInventorySideTableColumnsEnabledSetting,\n [SectionType.Sales]: storedSaleColumnsEnabledSetting,\n [SectionType.SalesFlattened]: storedSaleFlattenedColumnsEnabledSetting,\n [SectionType.SalesReport]: [],\n [SectionType.SalesSideTable]: storedSaleSideTableColumnsEnabledSetting,\n [SectionType.Purchases]: storedPurchaseColumnsEnabledSetting,\n [SectionType.PurchaseEvent]: storedPurchaseEventColumnsEnabledSetting,\n [SectionType.PurchaseSideTable]:\n storedPurchaseSideTableColumnsEnabledSetting,\n [SectionType.MarketplacePaymentsTable]:\n storedMarketplacePaymentsTableColumnsEnabledSetting,\n [SectionType.OnSaleEvents]: storedOnSaleEventsTableColumnsEnabledSetting,\n }[sectionType];\n\n const storedColumnOrderSetting = {\n [SectionType.Events]: storedEventsColumnOrderSetting,\n [SectionType.Listings]: storedInventoryColumnOrderSetting,\n [SectionType.ListingsFlattened]: storedInventoryFlattenedColumnOrderSetting,\n [SectionType.ListingsReport]: [],\n [SectionType.InventorySideTable]:\n storedInventorySideTableColumnsOrderSetting,\n [SectionType.Sales]: storedSaleColumnOrderSetting,\n [SectionType.SalesFlattened]: storedSaleFlattenedColumnOrderSetting,\n [SectionType.SalesReport]: [],\n [SectionType.SalesSideTable]: storedSaleSideTableColumnOrderSetting,\n [SectionType.Purchases]: storedPurchaseColumnOrderSetting,\n [SectionType.PurchaseEvent]: storedPurchaseEventColumnOrderSetting,\n [SectionType.PurchaseSideTable]: storedPurchaseSideTableColumnOrderSetting,\n [SectionType.MarketplacePaymentsTable]:\n storedMarketplacePaymentsTableColumnOrderSetting,\n [SectionType.OnSaleEvents]: storedOnSaleEventsTableColumnOrderSetting,\n }[sectionType];\n\n const storedColumnOrderSettingFiltered = useMemo(() => {\n const allColumnIdsAvailable = filterColumns(\n uniq([\n ...storedColumnOrderSetting,\n ...presetColumnIds.toSorted((a, b) => a.localeCompare(b)),\n ...customColumnsFiltered.map((c) => c.id),\n ...(tagsMetadata?.map((t) => t.key) ?? []),\n ])\n );\n\n const existingColumnsOrderSetting = filterColumns(\n storedColumnOrderSetting as string[]\n );\n\n allColumnIdsAvailable.forEach((columnId) => {\n if (!existingColumnsOrderSetting.includes(columnId)) {\n existingColumnsOrderSetting.push(columnId);\n }\n });\n\n return existingColumnsOrderSetting;\n }, [\n customColumnsFiltered,\n filterColumns,\n presetColumnIds,\n storedColumnOrderSetting,\n tagsMetadata,\n ]);\n\n const storedColumnEnabledSettingFiltered = useMemo(() => {\n if (\n Array.isArray(storedColumnsEnabledSetting) &&\n storedColumnsEnabledSetting.length > 0\n ) {\n return filterColumns(storedColumnsEnabledSetting as string[]);\n } else {\n return filterColumns(storedColumnOrderSetting);\n }\n }, [filterColumns, storedColumnsEnabledSetting, storedColumnOrderSetting]);\n\n const editabilityId = {\n [SectionType.Events]: UserSetting.EventsColumnEditability,\n [SectionType.Listings]: UserSetting.InventoryColumnEditability,\n [SectionType.ListingsFlattened]:\n UserSetting.InventoryFlattenedColumnEditability,\n [SectionType.ListingsReport]: '' as UserSetting, // Unused\n [SectionType.InventorySideTable]:\n UserSetting.InventorySideTableColumnEditability,\n [SectionType.Sales]: UserSetting.SaleColumnEditability,\n [SectionType.SalesFlattened]: UserSetting.SaleFlattenedColumnEditability,\n [SectionType.SalesReport]: '' as UserSetting, // Unused,\n [SectionType.SalesSideTable]: UserSetting.SalesSideTableColumnEditability,\n [SectionType.Purchases]: UserSetting.PurchaseColumnEditability,\n [SectionType.PurchaseEvent]: UserSetting.PurchaseEventColumnEditability,\n [SectionType.PurchaseSideTable]:\n UserSetting.PurchaseSideTableColumnEditability,\n [SectionType.MarketplacePaymentsTable]:\n UserSetting.MarketplacePaymentsColumnEditability,\n [SectionType.OnSaleEvents]: UserSetting.OnSaleEventColumnEditability,\n }[sectionType];\n const { value: editableColumns = [], setUserSetting: setEditableColumns } =\n useServerUserSetting({\n id: editabilityId,\n });\n\n const customColumns = {\n [SectionType.Events]: customEventsColumns,\n [SectionType.Listings]: customListingColumns,\n [SectionType.ListingsFlattened]: customListingColumns,\n [SectionType.ListingsReport]: [], // Unused\n [SectionType.InventorySideTable]: customListingColumns,\n [SectionType.Sales]: customSaleColumns,\n [SectionType.SalesFlattened]: customSaleColumns,\n [SectionType.SalesReport]: [], // Unused\n [SectionType.SalesSideTable]: customSaleColumns,\n [SectionType.Purchases]: customPurchaseColumns,\n [SectionType.PurchaseEvent]: customPurchaseColumns,\n [SectionType.PurchaseSideTable]: customPurchaseColumns,\n [SectionType.MarketplacePaymentsTable]: customMarketplacePaymentsColumns,\n [SectionType.OnSaleEvents]: customOnSaleEventColumns,\n }[sectionType];\n\n const [userColumnSelection, setUserColumnSelection] = useState(\n filterColumnsByFeatures(\n storedColumnEnabledSettingFiltered,\n sectionType,\n customColumns,\n loginContext?.user,\n appContext?.features\n )\n );\n\n const [userColumnSorting, setUserColumnSorting] = useState(\n filterColumnsByFeatures(\n storedColumnOrderSettingFiltered,\n sectionType,\n customColumns,\n loginContext?.user,\n appContext?.features\n )\n );\n const [userEditableColumns, setUserEditableColumns] =\n useState(editableColumns);\n const [userColumnIsDirty, setUserColumnIsDirty] = useState(false);\n\n const onSaveHandler = () => {\n if (!userColumnSelection) {\n // TODO: show error\n return;\n }\n setColumnsEnabledSetting(userColumnSelection);\n setColumnOrderSetting(userColumnSorting);\n setEditableColumns(userEditableColumns);\n toggleIsOpen();\n };\n\n useEffect(() => {\n // XX Migration to add TicketClassColor column for users\n // When the column becomes available for the first time\n if (\n storedInventoryColumnOrderSetting != null &&\n storedInventoryColumnsEnabledSetting != null\n ) {\n prependTicketClassColorColumnForFirstTime(\n storedInventoryColumnOrderSetting,\n storedInventoryColumnsEnabledSetting,\n setInventoryColumnOrderSetting,\n setInventoryColumnsEnabledSetting\n );\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [storedInventoryColumnOrderSetting, storedInventoryColumnsEnabledSetting]);\n\n // Sync the user setting to the default if the user has never set it\n useEffect(() => {\n const newColumns = filterColumnsByFeatures(\n storedColumnOrderSettingFiltered,\n sectionType,\n customColumns,\n loginContext?.user,\n appContext?.features,\n tagsMetadata ?? []\n );\n const newEnabledColumns = filterColumnsByFeatures(\n storedColumnEnabledSettingFiltered,\n sectionType,\n customColumns,\n loginContext?.user,\n appContext?.features\n );\n if (!userColumnIsDirty) {\n if (!isEqual(newColumns, userColumnSorting)) {\n setUserColumnSorting(newColumns);\n }\n if (!isEqual(editableColumns, userEditableColumns)) {\n setUserEditableColumns(editableColumns);\n }\n if (!isEqual(newEnabledColumns, userColumnSelection)) {\n setUserColumnSelection(newEnabledColumns);\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n appContext?.features,\n customListingColumns,\n editableColumns,\n loginContext?.user,\n storedColumnOrderSettingFiltered,\n storedColumnEnabledSettingFiltered,\n ]);\n\n // Keep the columns up to date in case the user changes the settings (e.g. adds/deletes custom column)\n useEffect(() => {\n const allColumnIdsAvailable = filterColumns(\n uniq([\n ...storedColumnOrderSetting,\n ...presetColumnIds.toSorted((a, b) => a.localeCompare(b)),\n ...customColumnsFiltered.map((c) => c.id),\n ...(tagsMetadata?.map((t) => t.key) ?? []),\n ])\n );\n\n let userColumnSortingFiltered = filterColumns(userColumnSorting);\n\n allColumnIdsAvailable.forEach((columnId) => {\n if (!userColumnSortingFiltered.includes(columnId)) {\n userColumnSortingFiltered.push(columnId);\n }\n });\n\n userColumnSortingFiltered = filterColumnsByFeatures(\n userColumnSortingFiltered,\n sectionType,\n customColumns,\n loginContext?.user,\n appContext?.features,\n tagsMetadata ?? []\n );\n\n if (\n !isEqual(new Set(userColumnSortingFiltered), new Set(userColumnSorting))\n ) {\n setUserColumnSorting(userColumnSortingFiltered);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [customColumnsFiltered]);\n\n useEffect(() => {\n if (!isOpen) setTimeout(onClose, 300);\n }, [isOpen, onClose]);\n\n return (\n <>\n \n \n
    \n
    \n \n
    \n
    \n
    \n \n \n userColumnSelection={userColumnSelection}\n onUserColumnSelectionChange={(newSelection) => {\n setUserColumnSelection(newSelection);\n setUserColumnIsDirty(true);\n }}\n userColumnSorting={userColumnSorting}\n onUserColumnSortingChange={(newSorting) => {\n setUserColumnSorting(newSorting);\n setUserColumnIsDirty(true);\n }}\n userEditableColumns={userEditableColumns}\n onUserEditableColumnsChange={(newEditableColumns) => {\n setUserEditableColumns(newEditableColumns);\n setUserColumnIsDirty(true);\n }}\n customColumns={customColumnsFiltered}\n onCustomColumnsChange={setCustomColumns}\n reportingTags={tagsMetadata ?? []}\n enableConfigureEditability\n sectionType={sectionType}\n showTicketClassColor={showTicketClassColor}\n viewMode={viewMode}\n />\n \n \n \n \n \n \n \n );\n}\n","export const SelectAllHotkeys = 'ctrl+s, command+s';\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const MultiEditCheckboxChecked = (props: PosIconProps) => {\n return (\n \n \n\n \n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const MultiEditCheckboxUnchecked = (props: PosIconProps) => {\n return (\n \n \n \n \n );\n};\n","import { useEffect, useMemo } from 'react';\nimport { useKeyPress } from 'react-use';\nimport {\n bulKActionsHighlightLetter,\n toggleButton,\n} from 'src/components/common/MultiSelect/Toggle/MultiSelectionToggle.css';\nimport { useBulkEditHubContext } from 'src/contexts/BulkEditHubContext';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { useGenericDialogContext } from 'src/contexts/GenericDialogContext/GenericDialogContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { vars } from 'src/core/themes';\nimport { Button, Tooltip } from 'src/core/ui';\nimport { MultiEditCheckboxChecked } from 'src/svgs/MultiEditCheckboxChecked';\nimport { MultiEditCheckboxUnchecked } from 'src/svgs/MultiEditCheckboxUnchecked';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getCurrentLanguage } from 'src/utils/localeUtils';\n\ninterface MultiSelectionToggleProps {\n isToggled: boolean;\n onChange: (e: React.MouseEvent) => void;\n}\n\nexport const MultiSelectionToggle = ({\n onChange,\n isToggled,\n}: MultiSelectionToggleProps) => {\n const { mainDialogOpened } = useBulkEditHubContext();\n const { isDialogOpen } = useGenericDialogContext();\n const isEnglishLanguage = getCurrentLanguage().startsWith('en-');\n const tooltipText = useContent(ContentId.SelectItemsForBulkEdit);\n const isEscKeyPressed = useKeyPress('Escape')[0];\n const { setSelectionMode, selectionMode } = useMultiSelectionContext();\n const isToggleOn = !!selectionMode?.mode;\n\n const tooltipTextHighlighted = useMemo(() => {\n if (!isEnglishLanguage) {\n return tooltipText;\n }\n const parts = tooltipText.split(new RegExp('S', 'g'));\n return (\n \n {parts[0]}\n S\n {parts[1]}\n \n );\n }, [isEnglishLanguage, tooltipText]);\n\n useEffect(() => {\n if (isEscKeyPressed && isToggleOn && !mainDialogOpened && !isDialogOpen) {\n setSelectionMode();\n }\n }, [\n isEscKeyPressed,\n setSelectionMode,\n isToggleOn,\n mainDialogOpened,\n isDialogOpen,\n ]);\n\n return (\n \n {isToggled ? (\n \n ) : (\n \n )}\n \n }\n >\n {tooltipTextHighlighted}\n \n );\n};\n","import { SelectAllHotkeys } from 'src/components/common/MultiSelect/Toggle/contants';\nimport { MultiSelectionToggle } from 'src/components/common/MultiSelect/Toggle/MultiSelectionToggle';\nimport {\n MultiSelectScope,\n useMultiSelectionContext,\n} from 'src/contexts/MultiSelectionContext';\nimport { PosHotkeys } from 'src/core/POS/PosHotkeys';\n\ninterface MultiSelectionToggleGroupProps {\n groupId: string;\n onToggle?: (groupId: string, isChecked: boolean) => void;\n enableHotkey?: boolean;\n}\n\nexport const MultiSelectionToggleGroup = ({\n groupId,\n onToggle,\n enableHotkey = false,\n}: MultiSelectionToggleGroupProps) => {\n const { selectionMode, setSelectionMode, getSelection } =\n useMultiSelectionContext();\n const listingSelection = getSelection(groupId);\n const isChecked = selectionMode?.groupId === groupId;\n\n const onSelectMultipleClick = (e?: React.MouseEvent) => {\n e?.stopPropagation();\n onToggle?.(groupId, isChecked);\n\n if (listingSelection.isSingleGroupMultiSelect) {\n setSelectionMode();\n } else {\n setSelectionMode({\n mode: MultiSelectScope.SingleGroup,\n groupId,\n });\n }\n };\n\n // Since hotkeys are shared with globalToggle, disabled the hotkey\n // in here will make the global to be disabled too.\n const keyNames = enableHotkey ? SelectAllHotkeys : '';\n\n return (\n {\n onSelectMultipleClick();\n }}\n disabled={!enableHotkey}\n >\n \n \n );\n};\n","import { useCallback, useMemo } from 'react';\nimport { Link, useLocation } from 'react-router-dom';\nimport { IconButton } from 'src/components/Buttons';\nimport { MultiSelectionToggleGroup } from 'src/components/common/MultiSelect/Toggle/MultiSelectionToggleGroup';\nimport { EventItemHeader } from 'src/components/Events/EventItemHeader';\nimport {\n EventItemHeaderType,\n METRICS_PLACEHOLDER_DIMS,\n} from 'src/components/Events/EventItemHeader/EventItemHeader';\nimport { InventoryEventActionDropdown } from 'src/components/Listings/InventoryActionDropdown';\nimport {\n MetricsDisplay,\n MetricsDisplayPlaceholder,\n} from 'src/components/Metrics';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { useCatalogMetricsContext } from 'src/contexts/CatalogMetricsContext';\nimport { vars } from 'src/core/themes';\nimport { useGetEventFullInfo } from 'src/hooks/useGetEventFullInfo';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { createInventoryEventUrl } from 'src/navigations/Routes/InventoryEvent/InventoryEvent.utils';\nimport { TagIcon } from 'src/svgs';\nimport { FullPageIcon } from 'src/svgs/FullPageIcon';\nimport { EventIdQueryParam } from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n getInventoryListingMetrics,\n getInventoryListingMetricsV2,\n} from 'src/utils/ticketMetricUtils';\nimport { Feature, ListingMetrics } from 'src/WebApiController';\n\nimport * as styles from './EventListingHeader.css';\n\nexport const EventListingHeader = (props: EventItemHeaderType) => {\n const location = useLocation();\n const { loginContext } = useAppContext();\n\n const { event, ...rest } = props;\n const { venue, performer } = useGetEventFullInfo(event);\n const hasInventoryTileMetricV2Feature = useUserHasFeature(\n Feature.InventoryTileMetricV2\n );\n\n const hasInventoryEventPageV2Feature = useUserHasFeature(\n Feature.InventoryEventPageV2\n );\n const getInventoryListingMetricsFn = hasInventoryTileMetricV2Feature\n ? getInventoryListingMetricsV2\n : getInventoryListingMetrics;\n\n const { eventMetrics } = useCatalogMetricsContext();\n const metrics = useMemo(\n () =>\n getInventoryListingMetricsFn(\n eventMetrics?.[event.viagVirtualId],\n loginContext?.user?.activeAccount?.currencyCode\n ),\n [\n getInventoryListingMetricsFn,\n eventMetrics,\n event.viagVirtualId,\n loginContext?.user?.activeAccount?.currencyCode,\n ]\n );\n\n const {\n eventsExpansion: { expandedListItems, toggleListItemExpansion },\n } = useCatalogDataContext();\n\n const onToggleGroup = useCallback(\n (groupId: string) => {\n if (!expandedListItems.includes(groupId)) {\n toggleListItemExpansion([groupId]);\n }\n },\n [expandedListItems, toggleListItemExpansion]\n );\n\n const eventId = event.viagVirtualId;\n const searchParam = useMemo(() => {\n const searchParam = new URLSearchParams(location.search);\n searchParam.set(EventIdQueryParam, eventId);\n return searchParam;\n }, [eventId, location.search]);\n\n const actions = useMemo(\n () => [\n ...(hasInventoryEventPageV2Feature\n ? [\n \n \n }\n titleContentId={ContentId.OpenEventPageV2InDevelopment}\n />\n ,\n ]\n : []),\n \n \n }\n titleContentId={ContentId.OpenEventPage}\n />\n ,\n ,\n ,\n ],\n [\n eventId,\n hasInventoryEventPageV2Feature,\n location.pathname,\n location.search,\n onToggleGroup,\n props,\n searchParam,\n ]\n );\n\n return (\n \n {!hasInventoryTileMetricV2Feature && (\n \n )}\n {metrics.mainMetrics}\n \n }\n />\n )\n }\n metrics={\n !metrics ? (\n \n ) : (\n \n )\n }\n actions={actions}\n showMappingState={true}\n />\n );\n};\n","import clsx from 'clsx';\nimport { MouseEvent } from 'react';\nimport { useToggle } from 'react-use';\nimport { MinRowsForUsingVirtuoso } from 'src/components/Accordions';\nimport {\n multiSelectCollapsed,\n multiselectEventPageDetails,\n} from 'src/components/Accordions/InventoryEventsAccordion/InventoryEventsAccordion.css';\nimport { InventoryEventsBody } from 'src/components/Accordions/InventoryEventsAccordion/InventoryEventsBody';\nimport { MultiSelectActionBar } from 'src/components/common/MultiSelect/MultiSelectActionBar';\nimport { InventoryEventBulkActions } from 'src/components/Events/EventListing/InventoryEventListing/BulkActions/InventoryEventBulkActions/InventoryEventBulkActions';\nimport { ActiveSortTableColumnProvider } from 'src/contexts/ActiveSortTableColumnContext';\nimport { useCollapsableViewContext } from 'src/contexts/CollapsableViewContext/CollapsableViewContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { ColumnSettingsModal } from 'src/modals/ColumnSettings/ColumnSettings';\nimport { LayoutIcon } from 'src/svgs/LayoutIcon';\nimport { CustomListingColumn } from 'src/utils/columns/inventory/inventoryCustomColumnUtils.types';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport { EventWithData, Listing } from 'src/WebApiController';\n\nimport {\n EventAccordionItemProps,\n EventsAccordion,\n VirtualizedEventAccordionProps,\n} from '../EventsAccordion';\nimport { EventListingHeader } from './EventListingHeader';\n\nexport const translateEventToInventoryAccordionItem = (\n props: EventWithData,\n index: number,\n isInventoryEventDetailsPage = false\n) => {\n return {\n index,\n itemId: props.event.viagVirtualId,\n HeaderComponent: EventListingHeader,\n BodyComponent: InventoryEventsBody,\n AfterHeaderComponent: () => {\n const { isCollapsedView, isEnabled } = useCollapsableViewContext();\n return (\n \n \n \n );\n },\n usingVirtuoso:\n isInventoryEventDetailsPage ||\n (props.counts.listCnt ?? 0) > MinRowsForUsingVirtuoso,\n ...props,\n entities: props.entities.listings ?? [],\n entityCount: props.counts.listCnt,\n ungroupedListingCount: props.counts.ungrListCnt,\n listingGroupCount: props.counts.listGrpCnt,\n } as EventAccordionItemProps;\n};\n\nexport const InventoryEventsAccordion = (\n props: VirtualizedEventAccordionProps\n) => {\n const [isColumnModalOpen, toggleColumnModal] = useToggle(false);\n\n const onColumnSettingButtonClickHandler = (\n e: MouseEvent\n ) => {\n e.stopPropagation();\n if (!isColumnModalOpen) toggleColumnModal(true);\n };\n\n return (\n \n {isColumnModalOpen ? (\n \n sectionType={SectionType.Listings}\n onClose={toggleColumnModal}\n />\n ) : null}\n \n \n \n \n \n \n }\n />\n \n );\n};\n","import {\n ColumnDef,\n functionalUpdate,\n Row,\n RowSelectionState,\n SortingState,\n TableOptions,\n Updater,\n} from '@tanstack/react-table';\nimport clsx from 'clsx';\nimport {\n CSSProperties,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport { EventAccordionItemBodyComponentType } from 'src/components/Accordions';\nimport { shiftSelect } from 'src/components/Events/EventPage/EventPage.css';\nimport { useSingleTableShortcutSelection } from 'src/components/Events/EventPage/hooks/useSingleTableShortcutSelection';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { ColumnResizingContextProvider } from 'src/contexts/ColumnResizingContext/ColumnResizingContext';\nimport {\n Content,\n FormatContent,\n useContent,\n} from 'src/contexts/ContentContext';\nimport {\n MultiSelectScope,\n useMultiSelectionContext,\n} from 'src/contexts/MultiSelectionContext';\nimport { useClearShiftSelectionOnSortingChange } from 'src/contexts/MultiSelectionContext/useClearShiftSelectionOnSortingChange';\nimport { useTagsForEntityType } from 'src/hooks/useTagsForEntityType';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport { NoData, Table } from 'src/tables/Table';\nimport {\n defaultSalesColumnsConfig,\n filterColumnsByFeatures,\n getSaleColumnConfigById,\n} from 'src/utils/columns/columnUtils';\nimport { SALE_MAIN_COLUMNS } from 'src/utils/columns/sales/salesColumnUtils.constants';\nimport { filterCustomColumnsForSale } from 'src/utils/columns/sales/salesCustomColumnUtils';\nimport { CustomSalesColumn } from 'src/utils/columns/sales/salesCustomColumnUtils.types';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { generateShimmeringRows } from 'src/utils/dataTableUtils';\nimport { isInFullPageEventView } from 'src/utils/deepLinkUtils';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport { hasFeatures } from 'src/utils/userUtils';\nimport { SomethingWentWrong } from 'src/views';\nimport {\n ActionOutboxEntityType,\n Feature,\n Permission,\n Sale,\n UserSetting,\n} from 'src/WebApiController';\n\nimport { SalesTableColumnId } from '../../utils/columns/sales/salesColumnUtils.types';\nimport { useSeatingColumnSorting } from '../common/hooks/useSeatingColumnSorting';\nimport { usePaginationSettings } from '../Table/hooks/usePaginationSettings';\nimport {\n customColumnDef,\n SALE_TABLE_COLUMNS_CONFIG,\n tagColumnDef,\n} from './configs/SaleTableColumnsConfig';\nimport { SaleWithEvent } from './SalesTable.type';\n\nexport type SalesTableProps = EventAccordionItemBodyComponentType & {\n alwaysShowCheckbox?: boolean;\n showSelectAllOnHeader?: boolean;\n};\n\nconst PAGE_SIZE = 10;\n\nconst disabledPaginationStyles: CSSProperties = {\n position: 'sticky',\n top: '0',\n zIndex: '10',\n};\n\nconst tableCellStyles: CSSProperties = {\n height: '1px', // Keep this to be able to use height: 100% inside td\n};\n\nconst getRowId = (row: SaleWithEvent | null, index: number) =>\n (row?.sale?.id ?? index).toString();\n\nexport const SalesTable = ({\n event,\n entities: sales,\n entityCount: salesCount,\n getDataFail: failedToRetrieveData,\n onMount,\n onUnmount,\n initState,\n disablePagination,\n useVirtuoso,\n withOuterPadding = true,\n isSideTable = false,\n onItemSelectionsChanged,\n alwaysShowCheckbox,\n showSelectAllOnHeader,\n enableColumnFilters,\n}: SalesTableProps) => {\n const showMainColumnsOnly = false;\n const isItemsLoading = salesCount > 0 && (sales == null || sales.length == 0);\n const data = useMemo(() => {\n const result = sales?.map((sale) => ({ sale, event }));\n\n return result?.length\n ? result\n : result == null || isItemsLoading\n ? (generateShimmeringRows(salesCount) as null[])\n : [];\n }, [sales, isItemsLoading, salesCount, event]);\n\n const hasViewProceeds = useUserHasAnyOfPermissions(\n Permission.Sales_ViewProceeds,\n Permission.Sales_ViewRecentProceeds\n );\n const hasTablePinActionColumnFeature = useUserHasFeature(\n Feature.TablePinActionColumn\n );\n\n const { appContext, loginContext, mainRoute } = useAppContext();\n const inFullPageEventView = isInFullPageEventView(mainRoute);\n\n const salesText = useContent(ContentId.Sales);\n\n const {\n setGroupItems,\n getGroupToggleState,\n getSelection,\n selectionMode,\n updateGroupFilteredIds,\n } = useMultiSelectionContext();\n\n const saleSelection = getSelection(event.viagVirtualId);\n\n // Enable passing in table state as parameters -- we can remount with the last state the user was on\n const [sorting, setSorting] = useState(\n initState?.sorting || []\n );\n\n useClearShiftSelectionOnSortingChange({ sortingState: sorting });\n\n const seatingColumnSorting = useSeatingColumnSorting(\n SalesTableColumnId.Seating,\n SectionType.Sales\n );\n\n const { pagination, setPagination } = usePaginationSettings(\n data.length,\n -1,\n PAGE_SIZE,\n disablePagination,\n initState\n );\n\n const groupId = event.viagVirtualId;\n const rowSelection = useMemo(() => {\n return data\n ?.flatMap((d) => [d?.sale])\n ?.reduce>((result, sale) => {\n if (sale?.id) {\n result[sale.id] =\n getGroupToggleState(groupId).isGroupSelected &&\n !saleSelection.items.itemIds.length\n ? true\n : ((saleSelection?.items.itemIds ?? [])?.includes(\n String(sale?.id)\n ) ?? false);\n }\n return result;\n }, {});\n }, [data, groupId, getGroupToggleState, saleSelection.items.itemIds]);\n\n const onRowSelectionChange = useCallback(\n (updater: Updater) => {\n const newSelections =\n typeof updater === 'function' ? updater(rowSelection) : updater;\n\n const newSelectedIds = Object.keys(newSelections).filter(\n (r) => newSelections[r] === true\n );\n\n setGroupItems(event.viagVirtualId, newSelections);\n onItemSelectionsChanged?.(\n newSelectedIds\n .filter((id) => newSelections[id])\n .map((id) => parseInt(id))\n );\n },\n [event.viagVirtualId, onItemSelectionsChanged, rowSelection, setGroupItems]\n );\n\n const showCheckbox = useMemo(\n () =>\n alwaysShowCheckbox ||\n selectionMode?.mode === MultiSelectScope.AllGroups ||\n saleSelection.isSingleGroupMultiSelect,\n [\n alwaysShowCheckbox,\n saleSelection.isSingleGroupMultiSelect,\n selectionMode?.mode,\n ]\n );\n\n const {\n lastSelectedRowRefIndex,\n allowShiftClickSelection,\n isShiftKeyPressed,\n isCtrlOrCmdKeyPressed,\n updateSelectionForRowAndSubRows,\n } = useSingleTableShortcutSelection({ isSideTable });\n\n const onRowShiftSelect = useCallback(\n (\n tableRows: Row[] | undefined,\n row: Row,\n index: number\n ) => {\n if (!tableRows || !allowShiftClickSelection || showCheckbox) {\n return;\n }\n const rowId = row.id.toString();\n const newIsSelected = !rowSelection[rowId];\n\n if (isShiftKeyPressed && lastSelectedRowRefIndex.current !== null) {\n const start = Math.min(lastSelectedRowRefIndex.current, index);\n const end = Math.max(lastSelectedRowRefIndex.current, index);\n\n const newRowSelection = { ...rowSelection };\n for (let i = start; i <= end; i++) {\n const row = tableRows[i];\n if (row) {\n updateSelectionForRowAndSubRows({\n row,\n rowId: row.id.toString(),\n newIsSelected,\n newRowSelection,\n });\n }\n }\n\n lastSelectedRowRefIndex.current = index;\n onRowSelectionChange(newRowSelection);\n } else if (isCtrlOrCmdKeyPressed) {\n const newRowSelection = { ...rowSelection };\n newRowSelection[rowId] = newIsSelected;\n updateSelectionForRowAndSubRows({\n row,\n rowId,\n newIsSelected, // Select the clicked row\n newRowSelection,\n });\n lastSelectedRowRefIndex.current = index;\n onRowSelectionChange(newRowSelection);\n } else {\n // No modifier key pressed, reset selection\n const newRowSelection = {};\n\n updateSelectionForRowAndSubRows({\n row,\n rowId,\n newIsSelected,\n newRowSelection,\n });\n lastSelectedRowRefIndex.current = index;\n onRowSelectionChange(newRowSelection);\n }\n },\n [\n allowShiftClickSelection,\n isCtrlOrCmdKeyPressed,\n isShiftKeyPressed,\n lastSelectedRowRefIndex,\n onRowSelectionChange,\n rowSelection,\n showCheckbox,\n updateSelectionForRowAndSubRows,\n ]\n );\n\n useEffect(() => {\n onMount?.();\n });\n\n useEffect(() => {\n /**\n * Intent for `onMount` is use with 'windowing' in order to maintain user state\n * when the component is scrolled back into view.\n * Anything that needs to be persisted in `react-table` state should be added here.\n * Only update on unmount to ensure we aren't doing too many re-renders.\n */\n return () => onUnmount?.({ pagination, sorting });\n }, [pagination, sorting, onUnmount]);\n\n // Clear selections when selection mode changes\n useEffect(() => {\n onItemSelectionsChanged?.([]);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [selectionMode?.mode]);\n\n const {\n value: storedInventoryColumnOrderSetting = defaultSalesColumnsConfig,\n } = useServerUserSetting({\n id: isSideTable\n ? UserSetting.SalesSideTableColumnOrder\n : UserSetting.SaleColumnOrder,\n });\n const { value: storedSaleColumnsEnabledSetting } = useServerUserSetting<\n string[]\n >({\n id: isSideTable\n ? UserSetting.SalesSideTableColumnsEnabled\n : UserSetting.SaleColumnsEnabled,\n });\n\n const { value: customSaleColumns = [] } = useServerUserSetting<\n CustomSalesColumn[]\n >({\n id: UserSetting.SaleCustomColumns,\n });\n const { tagsMetadata, tagsMetadataNumeric } = useTagsForEntityType(\n ActionOutboxEntityType.Sale,\n true\n );\n\n const customSaleColumnsFiltered = filterCustomColumnsForSale(\n customSaleColumns,\n tagsMetadataNumeric\n );\n\n const displayedColumnsConfig = useMemo(() => {\n if (showMainColumnsOnly) {\n return SALE_MAIN_COLUMNS.filter((c) =>\n c === SalesTableColumnId.Checkbox ? showCheckbox : true\n ).reduce[]>((acc, columnId) => {\n const columnConfig = Object.values(SALE_TABLE_COLUMNS_CONFIG).find(\n (column) => column.id === columnId\n );\n if (columnConfig) {\n acc.push(columnConfig);\n }\n return acc;\n }, []);\n }\n\n const saleColumnOrder = storedInventoryColumnOrderSetting.filter(\n // If storedSaleColumnsEnabledSetting has never been set, default to true\n (c) => storedSaleColumnsEnabledSetting?.includes(c) ?? true\n );\n\n const salesTableColumnsConfig = Object.values(SALE_TABLE_COLUMNS_CONFIG);\n\n const columns = new Set([\n // Add unconfigurable columns first\n ...salesTableColumnsConfig\n .filter((column) => {\n const columnDef = getSaleColumnConfigById(\n column.id as SalesTableColumnId\n ).personalization;\n const hasFeatureForColumn =\n columnDef.requiredFeatures.length === 0 ||\n hasFeatures(\n loginContext?.user,\n appContext?.features,\n columnDef.requiredFeatures\n );\n\n let isConfigurable = columnDef.isConfigurable;\n if (\n !hasTablePinActionColumnFeature &&\n column.id === SalesTableColumnId.Actions\n ) {\n isConfigurable = true;\n }\n\n return !isConfigurable && hasFeatureForColumn;\n })\n .map((item) => item.id as SalesTableColumnId),\n // Add user defined columns next\n ...filterColumnsByFeatures(\n saleColumnOrder,\n SectionType.Sales,\n customSaleColumnsFiltered,\n loginContext?.user,\n appContext?.features,\n tagsMetadata ?? []\n ),\n ]);\n\n if (showCheckbox) {\n if (!alwaysShowCheckbox) {\n columns.delete(SalesTableColumnId.Actions);\n }\n } else {\n columns.delete(SalesTableColumnId.Checkbox);\n }\n\n return Array.from(columns).reduce[]>(\n (acc, columnId) => {\n if (tagsMetadata?.find((t) => t.key === columnId)) {\n acc.push(tagColumnDef(columnId));\n } else if (customSaleColumnsFiltered.find((c) => c.id === columnId)) {\n acc.push(\n customColumnDef(\n columnId,\n customSaleColumnsFiltered.find((c) => c.id === columnId)?.formula\n )\n );\n } else {\n const columnConfig = salesTableColumnsConfig.find(\n (column) => column.id === columnId\n );\n if (columnConfig) acc.push(columnConfig);\n }\n\n return acc;\n },\n []\n );\n }, [\n alwaysShowCheckbox,\n appContext?.features,\n customSaleColumnsFiltered,\n hasTablePinActionColumnFeature,\n loginContext?.user,\n showCheckbox,\n showMainColumnsOnly,\n storedInventoryColumnOrderSetting,\n storedSaleColumnsEnabledSetting,\n tagsMetadata,\n ]);\n\n const options: Partial> = useMemo(\n () => ({\n data,\n columns: displayedColumnsConfig.filter((c) =>\n c.id === 'proceeds' ? hasViewProceeds : true\n ),\n state: {\n pagination,\n rowSelection,\n sorting,\n columnVisibility: {\n checkbox: showCheckbox,\n },\n columnPinning: {\n right: hasTablePinActionColumnFeature\n ? [SalesTableColumnId.Actions]\n : undefined,\n },\n },\n meta: {\n sectionType: isSideTable ? SectionType.SalesSideTable : undefined,\n showSelectAllCheckbox: showSelectAllOnHeader,\n },\n getRowId: getRowId,\n onPaginationChange: setPagination,\n onSortingChange: (sortingUpdaterFn) => {\n const newSortVal = functionalUpdate(sortingUpdaterFn, sorting);\n setSorting(newSortVal);\n },\n enableRowSelection: showCheckbox || inFullPageEventView,\n enableMultiRowSelection: showCheckbox,\n enableSubRowSelection: showCheckbox,\n onRowSelectionChange:\n !allowShiftClickSelection || showCheckbox\n ? onRowSelectionChange\n : undefined,\n sortingFns: { ...seatingColumnSorting },\n }),\n [\n data,\n displayedColumnsConfig,\n pagination,\n rowSelection,\n sorting,\n showCheckbox,\n hasTablePinActionColumnFeature,\n isSideTable,\n showSelectAllOnHeader,\n setPagination,\n inFullPageEventView,\n allowShiftClickSelection,\n onRowSelectionChange,\n seatingColumnSorting,\n hasViewProceeds,\n ]\n );\n\n const onFilteredRowsChange = useCallback(\n (filteredRows: Row[] | undefined) => {\n const filteredItemIds = filteredRows\n ?.map((r) => r.original?.sale?.id)\n .filter((lid) => lid != null) as number[] | undefined;\n updateGroupFilteredIds(groupId, filteredItemIds);\n },\n [groupId, updateGroupFilteredIds]\n );\n\n return failedToRetrieveData ? (\n }\n />\n ) : data?.length ? (\n \n \n \n ) : (\n // We should never see this - because the events are filtered to only those that has sales\n // So this is to prevent a crash - but this should be looked at\n \n \n \n );\n};\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nimport { TileWrapper } from '../Tile/Tile.styled';\n\nexport const SaleEventTileWrapper = styled(TileWrapper)`\n border-radius: 0;\n border: 0;\n border-bottom: 1px solid ${(props) => props.theme.colors.borderPrimary};\n`;\n\nexport const SaleTilesContainer = styled.div`\n ${SaleEventTileWrapper}:last-child {\n border-bottom: 0;\n padding-bottom: ${() => vars.spacing.sm};\n }\n`;\n\nexport const Status = styled.span``;\n\nexport const Price = styled.span``;\n\nexport const UnHideIconContainer = styled.span`\n display: flex;\n ${({ theme: { typography } }) => typography.getStyles('body1', 'medium')}\n`;\n\nexport const Divider = styled.div`\n border-bottom: 1px solid ${(props) => props.theme.colors.borderPrimary};\n`;\n\nexport const DetailLabel = styled.span<{ textAlign?: TextAlign }>`\n ${({ theme: { typography } }) => typography.getStyles('caption1', 'regular')}\n color: ${({ theme: { colors } }) => colors.textPrimary};\n text-align: ${(props) =>\n props.textAlign ? props.textAlign.toString() : 'left'};\n`;\n\nexport const DetailValue = styled.span<{ textAlign?: TextAlign }>`\n ${({ theme: { typography } }) => typography.getStyles('caption1', 'regular')}\n text-align: ${(props) =>\n props.textAlign ? props.textAlign.toString() : 'left'};\n padding-right: ${() => vars.spacing.xxs};\n`;\n\nexport const DetailUnitCostValue = styled.span`\n ${({ theme: { typography } }) => typography.getStyles('caption1', 'regular')}\n display: flex;\n align-items: center;\n padding-right: ${() => vars.spacing.xxs};\n`;\n\nexport enum TextAlign {\n Left = 'left',\n Center = 'center',\n Right = 'right',\n}\n\nexport const OtherDetailsDiv = styled.div`\n display: flex;\n color: ${({ theme: { colors } }) => colors.textPrimary};\n font-size: ${() => vars.typography.fontSize['xs']};\n`;\n","import { useCallback, useContext, useMemo } from 'react';\nimport { SeatingInfo } from 'src/components/common/SeatingInfo';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ModalContext } from 'src/contexts/ModalContext/ModalContext';\nimport { PosDropdown, PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { vars } from 'src/core/themes';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { IconsFill, MoreIcon } from 'src/svgs/Viagogo';\nimport { ProceedsCell } from 'src/tables/SalesTable/configs/ProceedsCell';\nimport { SeatInfoContainer } from 'src/tables/Table';\nimport { DateCell, InHandCell } from 'src/tables/Table/TableCells';\nimport {\n getSaleActionButton,\n getSaleDetailsModalConfigWithDeepLink,\n getSaleStatusDisplayContentId,\n NON_MAIN_SALE_ACTIONS,\n} from 'src/utils/saleUtils';\nimport { getTicketTypeIcon } from 'src/utils/ticketTypeUtils';\nimport {\n ListingDetailDataField,\n Permission,\n PointOfSaleSaleStatus,\n Sale,\n SaleDetails,\n TicketType,\n} from 'src/WebApiController';\n\nimport {\n TileHeader,\n TileLeftLayout,\n TileRightLayout,\n} from '../Tile/Tile.styled';\nimport * as styles from './SaleTiles.css';\nimport {\n OtherDetailsDiv,\n Price,\n SaleEventTileWrapper,\n SaleTilesContainer,\n Status,\n} from './SaleTiles.styled';\n\nconst SaleTile = ({ sale }: { sale: Sale }) => {\n const ticketTypeIcon = getTicketTypeIcon(\n sale?.ticketType as TicketType,\n IconsFill.textPrimary\n );\n\n const { setActivePosEntity } = useActivePosEntityContext();\n const { setModal } = useContext(ModalContext);\n const onViewClick = useCallback(async () => {\n setActivePosEntity(sale.id, sale.idOnMkp, true, [\n ListingDetailDataField.Basic,\n ]);\n setModal(getSaleDetailsModalConfigWithDeepLink(sale.id, true));\n }, [sale.idOnMkp, setActivePosEntity, setModal, sale.id]);\n\n const hasTotalNetProceedsPermissions = useUserHasAnyOfPermissions(\n Permission.Sales_ViewProceeds,\n Permission.Sales_ViewRecentProceeds\n );\n\n const mainActionTypes = useMemo(\n () => sale.actions.filter((a) => !NON_MAIN_SALE_ACTIONS.includes(a)),\n [sale.actions]\n );\n\n const actions = sale\n ? sale.status === PointOfSaleSaleStatus.PendingConfirmation\n ? [\n getSaleActionButton(\n sale.id,\n sale.idOnMkp,\n sale.mkp,\n sale.status,\n mainActionTypes[0],\n sale.ticketType,\n sale.isNoFulfill,\n 'text',\n false\n ),\n getSaleActionButton(\n sale.id,\n sale.idOnMkp,\n sale.mkp,\n sale.status,\n mainActionTypes[1],\n sale.ticketType,\n sale.isNoFulfill,\n 'text',\n false\n ),\n ]\n : mainActionTypes.length > 0\n ? [\n getSaleActionButton(\n sale.id,\n sale.idOnMkp,\n sale.mkp,\n sale.status,\n mainActionTypes[mainActionTypes.length - 1],\n sale.ticketType,\n sale.isNoFulfill,\n 'text',\n false\n ),\n ]\n : []\n : [];\n\n return (\n \n \n \n
    \n {ticketTypeIcon}\n \n \n \n
    \n
    \n \n \n \n {actions.length > 0 ? (\n \n }\n align=\"end\"\n >\n {actions.map((a, i) => (\n {a}\n ))}\n \n ) : null}\n \n \n
    \n \n \n \n \n \n \n \n \n \n \n {hasTotalNetProceedsPermissions && (\n \n \n \n )}\n \n \n
    \n );\n};\n\nexport const SaleTiles = ({ sales }: { sales?: Sale[] | null }) => {\n return sales ? (\n \n {sales.map((sale) => (\n \n ))}\n \n ) : (\n \n );\n};\n","import {\n EventAccordionItemBodyComponentType,\n MinRowsForUsingVirtuoso,\n} from 'src/components/Accordions';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { SalesTable } from 'src/tables/SalesTable';\nimport { SaleTiles } from 'src/tiles/SaleTiles';\nimport { Sale } from 'src/WebApiController';\n\ntype EventSaleBodyProps = EventAccordionItemBodyComponentType;\n\nexport const EventSaleBody = (props: EventSaleBodyProps) => {\n const isMobile = useMatchMedia('mobile');\n const Body = isMobile ? SaleTiles : SalesTable;\n const usingVirtuoso = props.entityCount > MinRowsForUsingVirtuoso;\n\n return ;\n};\n","import { ReactNode } from 'react';\n\ninterface SalesBulkActionsPermissionsProps {\n children: ReactNode;\n}\n\n// TODO: Feature is now GA, need to clean this up.\nexport const SalesBulkActionsPermissions = ({\n children,\n}: SalesBulkActionsPermissionsProps) => {\n return <>{children};\n};\n","import { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { Permission } from 'src/WebApiController';\n\ninterface UseUpdateSalesSettingsPermissions {\n hasUpdateSalesSettingsPermission: boolean;\n}\n\nexport const useUpdateSalesSettingsPermissions =\n (): UseUpdateSalesSettingsPermissions => {\n const hasSaleViewPermission = useUserHasAnyOfPermissions(\n Permission.Sales_UpdateSalesInfo,\n Permission.Sales_UpdateSalesInfoOnIsFulfillerOf,\n Permission.Sales_UpdateSalesInfoOnIsPricerOf,\n Permission.Sales_UpdateSaleOnPurchasedBy\n );\n\n return {\n hasUpdateSalesSettingsPermission: hasSaleViewPermission,\n };\n };\n","/* IMPORTANT - whenever you add a new one here\n You need to add a handling for it in the BulkEditStatusSalePopover.tsx\n */\nexport const SALES_BULK_UPDATE_GENERAL_SETTINGS_UPDATE_KEY =\n 'general-settings-event-sales';\nexport const SALES_BULK_UPDATE_COMMISSION_UPDATE_KEY = 'commission-event-sales';\nexport const SALES_BULK_UPDATE_TAGS_UPDATE_KEY = 'tags-event-sales';\nexport const SALES_BULK_UPDATE_INTERNAL_NOTES_UPDATE_KEY =\n 'update-internal-notes-sales';\nexport const SALES_BULK_UPDATE_AUTOFULFILL_UPDATE_KEY =\n 'update-autofulfill-sales';\nexport const SALES_BULK_UPDATE_MARK_AS_FULFILLED_UPDATE_KEY =\n 'update-mark-as-fulfilled-sales';\nexport const SALES_BULK_MARK_SALE_AS_PAID_UPDATE_KEY = 'mark-sale-as-paid';\n","import { useCallback } from 'react';\nimport { LaunchBulkEditCommission } from 'src/components/common/BulkActions/BulkEditCommissionAction';\nimport {\n IPosEntity,\n useActivePosEntityContext,\n} from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { usePurchaseDataContext } from 'src/contexts/PurchaseDataContext';\nimport { BulkEditCommissionDialog } from 'src/dialogs/BulkEdits/BulkEditCommissionDialog';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n BulkEditPreviewWithDetails,\n BulkEditSaleClient,\n Commission,\n Event,\n SaleQuery,\n} from 'src/WebApiController';\n\nimport { SALES_BULK_UPDATE_COMMISSION_UPDATE_KEY } from '../../SalesActionDropdown.constants';\n\nexport const useBulkEditCommissionAction = (\n filterQueryWithEventIds: SaleQuery,\n setIsLoading: (v: boolean) => void,\n isLoading?: boolean,\n event?: Event\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { setActivePosEntity } = useActivePosEntityContext();\n const updateKey = event\n ? `saleCommission-event-${event.viagVirtualId}`\n : SALES_BULK_UPDATE_COMMISSION_UPDATE_KEY;\n const {\n eventsExpansion: { setListItemExpansion, refreshExpandedListItems },\n } = useCatalogDataContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const {\n openDialog: openBulkEditCommissionDialog,\n closeDialog: closeBulkEditCommissionDialog,\n } = useDialog(DialogId.BulkEditCommission, BulkEditCommissionDialog);\n\n const onSubmit = useCallback(\n async (\n commissions: Commission[] | null,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => {\n if (activeAccountWebClientConfig.activeAccountId == null) {\n return null;\n }\n\n setIsLoading(true);\n\n if (onPreviewReceived) {\n await tryInvokeApi(\n async () => {\n const preview = await new BulkEditSaleClient(\n activeAccountWebClientConfig\n ).bulkUpdatePurchaseCommissionsPreview(filterQueryWithEventIds);\n\n onPreviewReceived(preview);\n },\n (error) => {\n showErrorDialog('bulkUpdatePurchaseCommissionsPreview', error, {\n trackErrorData: { filterQueryWithEventIds },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n } else {\n await tryInvokeApi(\n async () => {\n const succeeded = await new BulkEditSaleClient(\n activeAccountWebClientConfig\n ).bulkUpdatePurchaseCommissions(\n {\n item1: preview!.preview,\n item2: commissions ?? [],\n },\n updateKey,\n supportBackgroundProcess\n );\n\n if (!supportBackgroundProcess) {\n if (succeeded) {\n // Invalidate the activePosEntity, so that when clicking on details modal\n // we force re-loading the entity and newest pricing settings can be displayed\n setActivePosEntity(0);\n await refreshExpandedListItems();\n }\n\n closeBulkEditCommissionDialog();\n }\n },\n (error) => {\n showErrorDialog('bulkUpdatePurchaseCommissions', error, {\n trackErrorData: { commissions, preview },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n }\n },\n [\n activeAccountWebClientConfig,\n setIsLoading,\n filterQueryWithEventIds,\n showErrorDialog,\n updateKey,\n closeBulkEditCommissionDialog,\n setActivePosEntity,\n refreshExpandedListItems,\n ]\n );\n\n const onLaunchAction = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n if (event) {\n setListItemExpansion(true, [event.viagVirtualId]);\n }\n openBulkEditCommissionDialog({\n updateKey,\n onOkay: onSubmit,\n onCancel: closeBulkEditCommissionDialog,\n onClosed: () => {\n setIsLoading(false);\n },\n });\n },\n [\n closeBulkEditCommissionDialog,\n event,\n onSubmit,\n openBulkEditCommissionDialog,\n setIsLoading,\n setListItemExpansion,\n updateKey,\n ]\n );\n return {\n dropDown: (\n \n ),\n };\n};\n","import { HubConnectionState } from '@microsoft/signalr';\nimport { ComponentProps, useCallback, useMemo, useRef, useState } from 'react';\nimport { Controller, FormProvider, useForm } from 'react-hook-form';\nimport { Modal as RSModal } from 'reactstrap';\nimport { BulkEditStatus } from 'src/components/common/BulkActions/BulkEditStatus';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n BulkEditStage,\n useBulkEditHubContext,\n} from 'src/contexts/BulkEditHubContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { DatePickerInput } from 'src/core/POS/DateSelector';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { Stack } from 'src/core/ui';\nimport { useBulkEditHub } from 'src/hooks/useBulkEditHub';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { MARKET_PLACE_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { getLocaleFromLanguageOrCurrent } from 'src/utils/localeUtils';\nimport {\n ActionOutboxEntityType,\n BulkActionType,\n BulkEditPreviewWithDetails,\n BulkEditProgress,\n BulkEditStep,\n Marketplace,\n SaleDetails,\n} from 'src/WebApiController';\n\nimport { BulkEditFooter } from '../common/BulkEditFooter';\nimport { BulkEditHeader } from '../common/BulkEditHeader';\n\nexport interface MarkSaleAsPaidForm {\n paymentDate: string;\n paymentReference: string;\n marketplace: Marketplace;\n}\n\nexport type BulkMarkSaleAsPaidDialogProps = ComponentProps & {\n updateKey: string;\n onOkay: (\n markSaleAsPaidForm: MarkSaleAsPaidForm | null,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => void;\n onCancel: () => void;\n};\n\nexport const BulkMarkSaleAsPaidDialog = ({\n ...rest\n}: BulkMarkSaleAsPaidDialogProps) => {\n const methods = useForm();\n\n return (\n \n \n \n );\n};\n\nfunction BulkMarkSaleAsPaidDialogContent({\n updateKey,\n sales,\n event,\n onOkay,\n onCancel,\n handleSubmit,\n watch,\n reset,\n control,\n formState,\n setValue,\n register,\n trigger,\n ...rest\n}: BulkMarkSaleAsPaidDialogProps &\n Omit<\n ComponentProps>,\n 'children'\n >) {\n const { loginContext } = useAppContext();\n const requiredText = useContent(ContentId.Required);\n const { setActivePosEntity } = useActivePosEntityContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n const { setSelectionMode } = useMultiSelectionContext();\n const { setProgress, setPreview, setMainDialogOpened } =\n useBulkEditHubContext();\n const [isLoading, setIsLoading] = useState(false);\n const paymentDate = watch('paymentDate');\n const paymentReference = watch('paymentReference');\n const marketplace = watch('marketplace');\n const { isValid: isFormValid } = formState;\n\n const onClose = useCallback(\n async (\n newProgress?: BulkEditProgress,\n closeMainDialogForPopover?: boolean\n ) => {\n if (newProgress?.step === BulkEditStep.Done) {\n setIsRefreshing(true);\n setActivePosEntity(0);\n\n await refreshExpandedListItems(true);\n setSelectionMode(undefined);\n if (closeMainDialogForPopover) {\n setMainDialogOpened(false);\n } else {\n setProgress(undefined);\n setPreview(undefined);\n }\n setIsRefreshing(false);\n // progress kept to allow the BulkEditStatusPopover to show the result\n }\n onCancel();\n setMainDialogOpened(false);\n },\n [\n onCancel,\n refreshExpandedListItems,\n setActivePosEntity,\n setMainDialogOpened,\n setPreview,\n setProgress,\n setSelectionMode,\n ]\n );\n\n const onBulkEditDone = useCallback(\n async (doneProgress: BulkEditProgress, finalErrors: string[]) => {\n if (finalErrors.length === 0 && doneProgress.step === BulkEditStep.Done) {\n onClose(doneProgress, true);\n }\n },\n [onClose]\n );\n\n const { bulkEditHub, progress, preview, initJob, stage } = useBulkEditHub(\n ActionOutboxEntityType.Sale,\n BulkActionType.MarkSaleAsPaid,\n updateKey,\n onBulkEditDone\n );\n\n const hasBackgroundBulkEditFeature =\n bulkEditHub?.state === HubConnectionState.Connected;\n\n const onSubmitHandler = useCallback(\n (onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n onOkay(null, false, onPreviewReceived);\n } else {\n handleSubmit((formValues) =>\n onOkay(formValues, hasBackgroundBulkEditFeature, undefined, preview)\n )();\n }\n setIsLoading(false);\n },\n [handleSubmit, hasBackgroundBulkEditFeature, onOkay, preview]\n );\n\n const [isRefreshing, setIsRefreshing] = useState(false);\n\n const isInputValid = useMemo(() => {\n return marketplace && paymentDate && paymentReference;\n }, [marketplace, paymentDate, paymentReference]);\n\n const submitButtonRef = useRef(null);\n\n return (\n <>\n }\n />\n }\n onOpened={() => {\n initJob();\n }}\n onClosed={() => {\n setMainDialogOpened(false);\n if (progress) {\n setSelectionMode(undefined);\n }\n // Call the outside one if there is one\n rest.onClosed?.();\n }}\n onKeyUp={(e) => {\n if (submitButtonRef.current && e.key === 'Enter' && isInputValid) {\n submitButtonRef.current.click();\n }\n }}\n footer={\n {\n if (!isFormValid) {\n trigger();\n }\n return isFormValid;\n }}\n />\n }\n onCancel={isLoading ? undefined : onCancel}\n >\n \n \n }\n errors={formState.errors.marketplace?.message}\n >\n {\n if (marketplace) {\n setValue('marketplace', marketplace);\n }\n }}\n valueOptionsContent={(\n loginContext?.user?.activeAccount?.marketplaceSettings?.map(\n (m) => m.mkp\n ) ?? [Marketplace.StubHub]\n )\n .concat(Marketplace.Offline)\n .reduce(\n (cur, m) => {\n cur[m] = MARKET_PLACE_TO_CID[m];\n return cur;\n },\n {} as Record\n )}\n />\n \n }\n errors={formState.errors.paymentDate?.message}\n >\n (\n {\n setValue(field.name, d.toISOString());\n }}\n />\n )}\n />\n \n }\n errors={formState.errors.paymentReference?.message}\n >\n \n \n \n \n \n \n );\n}\n","import { Content } from 'src/contexts/ContentContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { Stack } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Feature } from 'src/WebApiController';\n\nexport const LaunchBulkMarkSaleAsPaid = ({\n onClick,\n disabled,\n}: {\n onClick: (e: React.MouseEvent) => void;\n disabled?: boolean;\n}) => {\n const hasBulkMarkSaleAsPaidFeature = useUserHasFeature(\n Feature.BulkMarkSalesAsPaid\n );\n\n if (!hasBulkMarkSaleAsPaidFeature) {\n return null;\n }\n\n return (\n <>\n \n \n \n \n \n \n \n \n );\n};\n","import { useCallback } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport {\n BulkMarkSaleAsPaidDialog,\n MarkSaleAsPaidForm,\n} from 'src/dialogs/BulkEdits/BulkMarkSaleAsPaidDialog';\nimport { lookupEventInCatalog } from 'src/utils/eventWithDataUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n BulkEditPreviewWithDetails,\n BulkEditSaleClient,\n Event,\n SaleQuery,\n} from 'src/WebApiController';\n\nimport { SALES_BULK_MARK_SALE_AS_PAID_UPDATE_KEY } from '../../SalesActionDropdown.constants';\nimport { LaunchBulkMarkSaleAsPaid } from './LaunchBulkMarkSaleAsPaid';\n\nexport const useBulkMarkSaleAsPaid = (\n filterQueryWithEventIds: SaleQuery,\n setIsLoading: (v: boolean) => void,\n isLoading?: boolean,\n event?: Event\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const updateKey = event\n ? `markSaleAsPaid-event-${event?.viagVirtualId}`\n : SALES_BULK_MARK_SALE_AS_PAID_UPDATE_KEY;\n\n const {\n data,\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const {\n openDialog: openBulkMarkSaleAsDialog,\n closeDialog: closeBulkMarkSaleAsPaidDialog,\n } = useDialog(DialogId.BulkMarkSaleAsPaid, BulkMarkSaleAsPaidDialog);\n\n const onSubmit = useCallback(\n async (\n markSaleAsPaidForm: MarkSaleAsPaidForm | null,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n await tryInvokeApi(\n async () => {\n const preview = await new BulkEditSaleClient(\n activeAccountWebClientConfig\n ).bulkMarkSaleAsPaidPreview(filterQueryWithEventIds);\n\n onPreviewReceived(preview);\n },\n (error) => {\n showErrorDialog('bulkMarkSaleAsPaidPreview', error, {\n trackErrorData: { filterQueryWithEventIds },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n } else if (markSaleAsPaidForm) {\n await tryInvokeApi(\n async () => {\n const succeeded = await new BulkEditSaleClient(\n activeAccountWebClientConfig\n ).bulkMarkSaleAsPaid(\n preview!.preview,\n markSaleAsPaidForm.paymentReference,\n markSaleAsPaidForm.paymentDate,\n markSaleAsPaidForm.marketplace,\n updateKey,\n supportBackgroundProcess\n );\n if (!supportBackgroundProcess) {\n if (succeeded) {\n await refreshExpandedListItems();\n }\n\n closeBulkMarkSaleAsPaidDialog();\n }\n },\n (error) => {\n showErrorDialog('bulkMarkSaleAsPaid', error, {\n trackErrorData: { event, preview },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n }\n },\n [\n activeAccountWebClientConfig,\n closeBulkMarkSaleAsPaidDialog,\n event,\n filterQueryWithEventIds,\n refreshExpandedListItems,\n setIsLoading,\n showErrorDialog,\n updateKey,\n ]\n );\n\n return {\n dropDown: (\n {\n e.preventDefault();\n e.stopPropagation();\n openBulkMarkSaleAsDialog({\n event,\n sales: event\n ? lookupEventInCatalog(data, event.viagVirtualId)\n ?.entities?.sales?.filter((s) => s != null)\n ?.map((s) => s!)\n : [],\n updateKey,\n onOkay: onSubmit,\n onClosed: () => {\n setIsLoading(false);\n },\n onCancel: closeBulkMarkSaleAsPaidDialog,\n });\n }}\n disabled={isLoading}\n />\n ),\n };\n};\n","import { useCallback } from 'react';\nimport { LaunchBulkUpdateInternalNotes } from 'src/components/common/BulkActions/BulkUpdateInternalNotesAction';\nimport {\n IPosEntity,\n useActivePosEntityContext,\n} from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { BulkUpdateInternalNotesDialog } from 'src/dialogs/BulkEdits/BulkUpdateInternalNotesDialog';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n BulkEditPreviewWithDetails,\n BulkEditSaleClient,\n Event,\n SaleQuery,\n} from 'src/WebApiController';\n\nimport { SALES_BULK_UPDATE_INTERNAL_NOTES_UPDATE_KEY } from '../../SalesActionDropdown.constants';\n\nexport const useBulkUpdateInternalNotesAction = (\n filterQueryWithEventIds: SaleQuery,\n\n setIsLoading: (v: boolean) => void,\n isLoading?: boolean,\n event?: Event\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { setActivePosEntity } = useActivePosEntityContext();\n const updateKey = event\n ? `sales-internal-notes-event-${event.viagVirtualId}`\n : SALES_BULK_UPDATE_INTERNAL_NOTES_UPDATE_KEY;\n const {\n eventsExpansion: { setListItemExpansion, refreshExpandedListItems },\n } = useCatalogDataContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const {\n openDialog: openBulkUpdateInternalNotesDialog,\n closeDialog: closeBulkUpdateInternalNotesDialog,\n } = useDialog(\n DialogId.BulkUpdateInternalNotes,\n BulkUpdateInternalNotesDialog\n );\n\n const onSubmit = useCallback(\n async (\n isUpdate: boolean | null,\n searchString: string | null,\n replaceString: string | null,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n await tryInvokeApi(\n async () => {\n const preview = await new BulkEditSaleClient(\n activeAccountWebClientConfig\n ).bulkUpdateInternalNotesPreview(filterQueryWithEventIds);\n\n onPreviewReceived(preview);\n },\n (error) => {\n showErrorDialog('bulkUpdateInternalNotesPreview', error, {\n trackErrorData: { filterQueryWithEventIds },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n } else if (\n isUpdate != null &&\n searchString != null &&\n replaceString != null\n ) {\n await tryInvokeApi(\n async () => {\n const saleClient = new BulkEditSaleClient(\n activeAccountWebClientConfig\n );\n\n const succeeded = await saleClient.bulkUpdateInternalNotes(\n preview!.preview,\n updateKey,\n isUpdate,\n searchString,\n replaceString,\n supportBackgroundProcess\n );\n\n if (!supportBackgroundProcess) {\n if (succeeded) {\n // Invalidate the activePosEntity, so that when clicking on listingDetails\n // we force re-loading the listing and newest pricing settings can be displayed\n setActivePosEntity(0);\n await refreshExpandedListItems();\n }\n\n closeBulkUpdateInternalNotesDialog();\n }\n },\n (error) => {\n showErrorDialog('bulkUpdateInternalNotes', error, {\n trackErrorData: {\n isUpdate,\n searchString,\n replaceString,\n preview,\n },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n }\n },\n [\n setIsLoading,\n activeAccountWebClientConfig,\n filterQueryWithEventIds,\n showErrorDialog,\n updateKey,\n closeBulkUpdateInternalNotesDialog,\n setActivePosEntity,\n refreshExpandedListItems,\n ]\n );\n\n const onChangeClick = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n if (event) {\n setListItemExpansion(true, [event.viagVirtualId]);\n }\n openBulkUpdateInternalNotesDialog({\n updateKey,\n onOkay: onSubmit,\n entityType: ActionOutboxEntityType.Sale,\n onClosed: () => {\n setIsLoading(false);\n },\n onCancel: closeBulkUpdateInternalNotesDialog,\n });\n },\n [\n closeBulkUpdateInternalNotesDialog,\n event,\n onSubmit,\n openBulkUpdateInternalNotesDialog,\n setIsLoading,\n setListItemExpansion,\n updateKey,\n ]\n );\n\n return {\n dropDown: (\n \n ),\n };\n};\n","import { useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { PosSelect } from 'src/core/POS/PosSelect';\nimport { Stack } from 'src/core/ui';\nimport { Detail } from 'src/modals/common';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport { SaleInput } from 'src/WebApiController';\n\nexport const PaymentCurrencyConversionSection = () => {\n const { watch, setValue } = useFormContext();\n\n const paymentAmountReceived = watch('paymentAmountReceived');\n const paymentCurrency = watch('paymentCurrency');\n\n const { currencyCache, getUiCurrency } = useLocalizationContext();\n\n const availableCurrenciesOptions = useMemo(\n () =>\n Object.values(currencyCache || []).reduce(\n (result, cur) => {\n result[cur.code] = cur.code;\n return result;\n },\n {} as Record\n ),\n [currencyCache]\n );\n\n const { loginContext } = useAppContext();\n\n const uiCurrency = useMemo(\n () =>\n getUiCurrency(loginContext?.user?.activeAccount?.currencyCode ?? 'USD'),\n [getUiCurrency, loginContext?.user?.activeAccount?.currencyCode]\n );\n\n return (\n \n }\n />\n \n }\n style={{ width: '50%' }}\n detail={\n {\n setValue('paymentCurrency', posChangedField(value), {\n shouldDirty: true,\n });\n }}\n />\n }\n />\n }\n style={{ width: '50%' }}\n detail={\n {\n const newValue = parseFloat(e.target.value) || 0;\n setValue('paymentAmountReceived', posChangedField(newValue), {\n shouldDirty: true,\n });\n\n setValue(\n 'paymentCurrency',\n posChangedField(paymentCurrency?.value ?? uiCurrency.code),\n {\n shouldDirty: true,\n }\n );\n }}\n />\n }\n />\n \n \n );\n};\n","import { useEffect } from 'react';\nimport { Controller, useFormContext } from 'react-hook-form';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SALE_LINE_ITEM_CHARGE_REASON_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { SaleLineItem } from 'src/WebApiController';\n\nimport * as styles from './ChargeOrCreditReasonSelector.css';\n\nexport const ChargeReasonSelector = () => {\n const { control, formState, watch, setValue } =\n useFormContext();\n const chargeReason = watch('saleLineItemChargeReason');\n const requiredText = useContent(ContentId.Required);\n\n useEffect(() => {\n return () => {\n setValue('saleLineItemChargeReason', null);\n };\n }, [setValue]);\n\n return (\n }\n errors={formState.errors.saleLineItemChargeReason?.message}\n >\n (\n \n )}\n />\n \n );\n};\n","import { useEffect } from 'react';\nimport { Controller, useFormContext } from 'react-hook-form';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SALE_LINE_ITEM_CREDIT_REASON_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { SaleLineItem } from 'src/WebApiController';\nimport * as styles from './ChargeOrCreditReasonSelector.css';\n\nexport const CreditReasonSelector = () => {\n const { control, formState, watch, setValue } =\n useFormContext();\n const creditReason = watch('saleLineItemCreditReason');\n const requiredText = useContent(ContentId.Required);\n\n useEffect(() => {\n return () => {\n setValue('saleLineItemCreditReason', null);\n };\n }, [setValue]);\n\n return (\n }\n errors={formState.errors.saleLineItemCreditReason?.message}\n >\n (\n {\n setValue('saleLineItemCreditReason', creditReason);\n }}\n />\n )}\n />\n \n );\n};\n","import { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { Feature } from 'src/WebApiController';\n\nexport const useHasPaymentsSectionsV2Feature = () => {\n return useUserHasFeature(Feature.SaleEarningsTableV2);\n};\n","import { useFormContext } from 'react-hook-form';\nimport { ChargeReasonSelector } from 'src/modals/SaleDetails/components/PaymentSection/SaleLineItemModal/ChargeOrCreditReason/ChargeReasonSelector';\nimport { CreditReasonSelector } from 'src/modals/SaleDetails/components/PaymentSection/SaleLineItemModal/ChargeOrCreditReason/CreditReasonSelector';\nimport { useHasPaymentsSectionsV2Feature } from 'src/modals/SaleDetails/hooks/useHasPaymentsSectionsV2Feature';\nimport { SaleCostType, SaleLineItem } from 'src/WebApiController';\n\nexport const ChargeOrCreditReasonSelector = () => {\n const { watch } = useFormContext();\n const costType = watch('costType');\n const isChargeType = costType === SaleCostType.Charge;\n const isCreditType = costType === SaleCostType.Credit;\n const hasPaymentsSectionsV2Feature = useHasPaymentsSectionsV2Feature();\n\n if (!hasPaymentsSectionsV2Feature) {\n return null;\n }\n\n if (isChargeType) {\n return ;\n }\n\n if (isCreditType) {\n return ;\n }\n\n return null;\n};\n","import { isEqual } from 'lodash';\nimport { useEffect, useMemo } from 'react';\nimport {\n Controller,\n FormProvider,\n useForm,\n useFormContext,\n UseFormReturn,\n} from 'react-hook-form';\nimport { CancelButton } from 'src/components/Buttons';\nimport { OkButton } from 'src/components/Buttons/OkButton';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { DatePickerInput } from 'src/core/POS/DateSelector';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { getTextFieldState, PosTextField } from 'src/core/POS/PosTextField';\nimport { shared } from 'src/core/themes';\nimport { Radio, RadioGroup, Stack } from 'src/core/ui';\nimport { Modal, ModalBody, ModalFooter, ModalHeader } from 'src/modals/Modal';\nimport { ChargeOrCreditReasonSelector } from 'src/modals/SaleDetails/components/PaymentSection/SaleLineItemModal/ChargeOrCreditReason/ChargeOrCreditReasonSelector';\nimport { useHasPaymentsSectionsV2Feature } from 'src/modals/SaleDetails/hooks/useHasPaymentsSectionsV2Feature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getLocaleFromLanguageOrCurrent } from 'src/utils/localeUtils';\nimport {\n SaleCostType,\n SaleLineItem,\n SaleLineItemStatus,\n} from 'src/WebApiController';\n\nimport * as styles from './SaleLineItemModal.css';\nimport { AddLineItemModalBodyProps as SaleLineItemModalBodyProps } from './SaleLineItemModal.types';\n\nexport const SaleLineItemModal = (props: SaleLineItemModalBodyProps) => {\n const methods = useForm({\n defaultValues: props.item ?? {\n description: null,\n costType: SaleCostType.Charge,\n status: SaleLineItemStatus.Unpaid,\n costDate: props.costDate ?? new Date().toISOString(),\n dueDate: new Date().toISOString(),\n currencyCode: props.currencyCode,\n saleLineItemChargeReason: props.saleLineItemChargeReason,\n saleLineItemCreditReason: props.saleLineItemCreditReason,\n cost: props.remainingBalance ?? undefined,\n },\n });\n\n useEffect(() => {\n if (props.item && !isEqual(props.item, methods.formState.defaultValues)) {\n methods.reset(props.item);\n } else if (!props.item) {\n methods.reset({\n description: null,\n costType: SaleCostType.Charge,\n status: SaleLineItemStatus.Unpaid,\n costDate: new Date().toISOString(),\n dueDate: new Date().toISOString(),\n currencyCode: props.currencyCode,\n saleLineItemCreditReason: null,\n saleLineItemChargeReason: null,\n });\n }\n }, [methods, props.currencyCode, props.item, props.isOpen]);\n\n return (\n \n \n \n );\n};\n\nconst SaleLineItemModalBody = ({\n isOpen,\n onClose,\n onSave,\n currencyCode,\n}: SaleLineItemModalBodyProps & UseFormReturn) => {\n const hasPaymentsSectionsV2Feature = useHasPaymentsSectionsV2Feature();\n const itemNameText = useContent(ContentId.ItemName);\n const amountText = useContent(ContentId.Amount);\n const requiredText = useContent(ContentId.Required);\n\n const { control, reset, register, watch, setValue, handleSubmit, formState } =\n useFormContext();\n\n const name = watch('description');\n const cost = watch('cost');\n const costType = watch('costType');\n const status = watch('status');\n const costDate = watch('costDate');\n const dueDate = watch('dueDate');\n\n const { getUiCurrency } = useLocalizationContext();\n\n const uiCurrency = useMemo(\n () => getUiCurrency(currencyCode),\n [getUiCurrency, currencyCode]\n );\n\n return (\n \n \n
    \n
    \n \n
    \n
    \n
    \n \n \n \n \n \n setValue('costType', v as SaleCostType)}\n >\n }\n value={SaleCostType.Charge}\n />\n }\n value={SaleCostType.Credit}\n />\n \n\n \n\n \n 0) ? requiredText : undefined,\n valueAsNumber: true,\n })}\n />\n \n {!hasPaymentsSectionsV2Feature && (\n setValue('status', v as SaleLineItemStatus)}\n >\n }\n value={SaleLineItemStatus.Paid}\n />\n }\n value={SaleLineItemStatus.Unpaid}\n />\n \n )}\n\n \n }\n errors={formState.errors.costDate?.message}\n >\n (\n {\n setValue(field.name, d.toISOString());\n }}\n />\n )}\n />\n \n {!hasPaymentsSectionsV2Feature && (\n }\n errors={formState.errors.dueDate?.message}\n >\n (\n {\n setValue(field.name, d.toISOString());\n }}\n />\n )}\n />\n \n )}\n \n \n \n \n {\n onClose();\n reset();\n }}\n />\n {\n handleSubmit(onSave)();\n }}\n />\n \n
    \n );\n};\n","import { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { Feature } from 'src/WebApiController';\n\nexport const useHasWasteSaleFeature = () => {\n return useUserHasFeature(Feature.WasteSale);\n};\n","import { useHasWasteSaleFeature } from 'src/hooks/features/useHasWasteSaleFeature';\nimport { Sale } from 'src/WebApiController';\n\nexport const useShouldHideForWastedSale = (sale: Sale | null | undefined) => {\n const hasWasteSaleFeature = useHasWasteSaleFeature();\n const isWastedSale = !!sale?.isWastageSale;\n return hasWasteSaleFeature && isWastedSale;\n};\n","export const NUM_OF_COLUMNS = 5;\nexport const NUM_OF_COLUMNS_MOBILE = 2;\nexport const SectionContentGridFormat = `repeat(${NUM_OF_COLUMNS}, minmax(0, 1fr))`;\nexport const SectionContentGridMobileFormat = `repeat(${NUM_OF_COLUMNS_MOBILE}, minmax(0, 1fr))`;\n","import { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport {\n SectionContentGridFormat,\n SectionContentGridMobileFormat,\n} from 'src/modals/SaleDetailsV2/SaleDetails.constants';\n\nexport const useGetModalGridFormat = () => {\n const isMobile = useMatchMedia('mobile');\n\n return isMobile\n ? { SectionContentGridFormat: SectionContentGridMobileFormat }\n : { SectionContentGridFormat };\n};\n","import { useCallback, useMemo, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosDropdown, PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack, Switch } from 'src/core/ui';\nimport { useHasSaleDetailsMarketplaceTermsFeature } from 'src/hooks/features/useHasSaleDetailsMarketplaceTermsFeature';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { Detail, DetailGroup, SectionContent } from 'src/modals/common';\nimport { SaleLineItemModal } from 'src/modals/SaleDetails/components/PaymentSection/SaleLineItemModal';\nimport { useShouldHideForWastedSale } from 'src/modals/SaleDetails/hooks/useShouldHideForWastedSale';\nimport { useGetModalGridFormat } from 'src/modals/SaleDetailsV2/hooks/useGetModalGridFormat';\nimport { IconsFill, MoreIcon, PlusIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n MARKETPLACE_SALE_PAYMENT_STATE_TO_CID,\n SALE_PAYMENT_STATE_TO_CID,\n} from 'src/utils/constants/contentIdMaps';\nimport { formatCurrency } from 'src/utils/numberFormatter';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport {\n Feature,\n Permission,\n Sale,\n SaleCostType,\n SaleInput,\n SaleLineItem,\n} from 'src/WebApiController';\n\nimport * as styles from './PaymentSection.css';\n\nexport const PaymentSection = ({\n sale,\n lineItems,\n isBulkEdit,\n onLineItemChange,\n}: {\n sale?: Sale | null;\n lineItems?: SaleLineItem[] | null;\n onLineItemChange?: (item: SaleLineItem, isDelete?: boolean) => void;\n isBulkEdit?: boolean;\n}) => {\n const { SectionContentGridFormat } = useGetModalGridFormat();\n const { loginContext } = useAppContext();\n const hasEditSaleLineItemsFeature = useUserHasFeature(\n Feature.SaleEditChargesAndCredits\n );\n const hasHideSalePaymentReceivedFilterFeature = useUserHasFeature(\n Feature.HideSalePaymentReceivedFilter\n );\n const { watch, setValue } = useFormContext();\n\n const costDialog = useBasicDialog();\n\n const hideForWastedSale = useShouldHideForWastedSale(sale);\n\n const onAddNewCostSave = useCallback(\n (item: SaleLineItem) => {\n onLineItemChange?.(item);\n\n // post logic goes here\n costDialog.closeDialog();\n },\n [costDialog, onLineItemChange]\n );\n\n const onAddNewCostCancel = useCallback(() => {\n costDialog.closeDialog();\n setCurItem(undefined);\n }, [costDialog]);\n\n const paymentReceived = watch('paymentReceived');\n const paymentReferenceId = watch('paymentReferenceId');\n\n const hasTotalNetProceedsPermissions = useUserHasAnyOfPermissions(\n Permission.Sales_ViewProceeds,\n Permission.Sales_ViewRecentProceeds\n );\n\n const hasSaleDetailsMarketplaceTermsFeature =\n useHasSaleDetailsMarketplaceTermsFeature();\n\n const totalProfitAmount = useMemo(() => {\n let sum = hasTotalNetProceedsPermissions\n ? (sale?.ttlNetProcs?.amt ?? 0)\n : 0;\n\n if (sale?.soldTktCost != null) {\n sum -= sale?.soldTktCost.amt;\n }\n\n if (hasEditSaleLineItemsFeature) {\n lineItems?.forEach((li) => {\n // Per James - charges subtracts and credits add\n sum += (li.costType === SaleCostType.Charge ? -1 : 1) * li.cost;\n });\n }\n\n return sum;\n }, [\n hasEditSaleLineItemsFeature,\n hasTotalNetProceedsPermissions,\n lineItems,\n sale?.soldTktCost,\n sale?.ttlNetProcs?.amt,\n ]);\n\n const [curItem, setCurItem] = useState();\n\n const onAddNewCost = useCallback(() => {\n costDialog.launchDialog();\n }, [costDialog]);\n\n return (\n \n {!isBulkEdit && (\n \n }\n detail={\n
    \n \n \n \n \n \n\n \n \n \n \n\n {hasEditSaleLineItemsFeature &&\n lineItems?.map((i) => (\n \n \n \n \n \n ))}\n {/* Add line item button */}\n {hasEditSaleLineItemsFeature && (\n {\n setCurItem(undefined);\n onAddNewCost();\n }}\n tabIndex={0}\n disabled={hideForWastedSale}\n >\n \n \n \n )}\n \n \n \n \n \n \n \n
    \n \n \n \n \n \n {sale?.ttlNetProcs == null ? (\n hasTotalNetProceedsPermissions ? (\n \n ) : null\n ) : (\n {sale.ttlNetProcs.disp}\n )}\n \n \n
    \n \n \n \n {sale?.soldTktCost == null ? (\n \n ) : (\n \n {'-'}\n {sale.soldTktCost.disp}\n \n )}\n \n \n
    \n {i.description}\n \n \n \n {i.costType === SaleCostType.Charge ? '-' : ''}\n \n \n {formatCurrency(i.cost!, sale?.currency)}\n \n \n \n
    \n \n }\n align=\"end\"\n >\n {\n setCurItem(i);\n onAddNewCost();\n }}\n >\n \n \n onLineItemChange?.(i, true)}\n >\n \n \n \n
    \n
    \n \n \n \n {formatCurrency(totalProfitAmount, sale?.currency)}\n \n
    \n }\n />\n \n )}\n\n {isBulkEdit && hasHideSalePaymentReceivedFilterFeature ? null : (\n \n }\n detail={\n {\n setValue('paymentReceived', posChangedField(isChecked), {\n shouldDirty: true,\n });\n }}\n />\n }\n />\n \n }\n detail={\n {\n const { value } = e.target;\n if (!value) {\n setValue('paymentReferenceId', null, {\n shouldDirty: true,\n });\n return;\n }\n setValue('paymentReferenceId', posChangedField(value), {\n shouldDirty: true,\n });\n }}\n trimOnBlur={true}\n />\n }\n />\n \n {!isBulkEdit && !hasSaleDetailsMarketplaceTermsFeature && (\n \n }\n detail={\n \n {sale?.mkpPmtState ? (\n \n ) : sale?.pmtState ? (\n \n ) : null}\n \n }\n />\n \n )}\n \n )}\n\n \n \n );\n};\n","import { useFormContext } from 'react-hook-form';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport * as styles from 'src/modals/SaleDetails/SaleDetails.css';\nimport { SALE_CANCELLATION_REASON_CID } from 'src/utils/constants/contentIdMaps';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport {\n Feature,\n PointOfSaleSaleStatus,\n SaleInput,\n} from 'src/WebApiController';\n\ninterface SaleCancellationReasonProps {\n status: PointOfSaleSaleStatus | undefined | null;\n}\n\nexport const SaleCancellationReason = ({\n status,\n}: SaleCancellationReasonProps) => {\n const { watch, setValue } = useFormContext();\n const userHasSaleCancellationReason = useUserHasFeature(\n Feature.SaleCancellationReason\n );\n\n const cancellationReason = watch('cancellationReason');\n\n const isRejectedState =\n status === PointOfSaleSaleStatus.Rejected ||\n status === PointOfSaleSaleStatus.PendingRejection;\n\n if (!isRejectedState || !userHasSaleCancellationReason) {\n return null;\n }\n\n return (\n {\n setValue(\n 'cancellationReason',\n posChangedField(selectedCancellationReason),\n {\n shouldDirty: true,\n }\n );\n }}\n />\n );\n};\n","import { formatInTimeZone } from 'date-fns-tz';\nimport { useFormContext } from 'react-hook-form';\nimport { InHandDateDisplay } from 'src/components/common/InHandDateDisplay';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useSiteTimezoneContext } from 'src/contexts/SiteTimezoneContext/SiteTimezoneContext';\nimport { WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { Stack, Switch, TooltipPopover } from 'src/core/ui';\nimport { useMarketplaceHandledByProcessor } from 'src/hooks/useMarketplaceHandledByProcessor';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport {\n useUserCanUpdateSale,\n useUserCanViewFulfillmentArtifacts,\n} from 'src/hooks/useUserHasSalePermissions';\nimport { Detail, DetailGroup, SectionContent } from 'src/modals/common';\nimport { modalSection } from 'src/modals/common/Modals.css';\nimport { SaleCancellationReason } from 'src/modals/SaleDetails/components/SaleCancellationReason';\nimport { useGetModalGridFormat } from 'src/modals/SaleDetailsV2/hooks/useGetModalGridFormat';\nimport * as ticketsStyles from 'src/modals/TransferTickets/TransferTickets.css';\nimport { ViewTickets } from 'src/modals/ViewTickets';\nimport { IconsFill, WarningOutlineIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { TICKET_TYPE_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { stringToUtcDate } from 'src/utils/dateTimeUtils';\nimport { getLocaleFromLanguageOrCurrent } from 'src/utils/localeUtils';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport {\n getSaleDetailsModalConfigWithDeepLink,\n getSaleStatusDisplayContentId,\n} from 'src/utils/saleUtils';\nimport {\n getTicketTypeIcon,\n getTicketTypeIcons,\n getTicketTypeLabel,\n} from 'src/utils/ticketTypeUtils';\nimport {\n Feature,\n Marketplace,\n MarketplaceFulfillmentState,\n PointOfSaleSaleStatus,\n SaleDetails,\n SaleInput,\n} from 'src/WebApiController';\n\nimport * as styles from '../SaleDetails.css';\n\n/**\n * Set of sale statuses that allow for changing ticket type.\n */\nconst ALLOWED_TICKET_TYPE_CHANGE_SALE_STATUSES = new Set([\n PointOfSaleSaleStatus.PendingConfirmation,\n PointOfSaleSaleStatus.PendingFulfillment,\n PointOfSaleSaleStatus.PendingReshipment,\n PointOfSaleSaleStatus.FulfillmentFailed,\n PointOfSaleSaleStatus.Hold,\n PointOfSaleSaleStatus.CancelledHold,\n]);\n\nexport type DeliverySectionProps = {\n sale?: SaleDetails | null;\n isBulkEdit?: boolean;\n disabled?: boolean;\n};\n\nexport const DeliverySection = ({\n sale,\n isBulkEdit,\n disabled,\n}: DeliverySectionProps) => {\n const { SectionContentGridFormat } = useGetModalGridFormat();\n const { timeZone } = useSiteTimezoneContext();\n const canEditSale = useUserCanUpdateSale(sale) || isBulkEdit;\n const canViewFulfillmentArtifacts = useUserCanViewFulfillmentArtifacts(sale);\n const hasFufillmentMismatchDisplay = useUserHasFeature(\n Feature.FufillmentMismatchDisplay\n );\n\n const { watch, setValue } = useFormContext();\n\n const ticketType = watch('ticketType');\n const isNoFulfill = watch('isNoFulfill');\n\n let InHandInfo = null;\n let HoldExpirationInfo = null;\n\n if (sale?.holdExpiredOn && status === PointOfSaleSaleStatus.Hold) {\n const holdExpirationDateAsDate = stringToUtcDate(sale.holdExpiredOn);\n\n const holdExpirationDateString = holdExpirationDateAsDate\n ? formatInTimeZone(\n holdExpirationDateAsDate,\n timeZone,\n 'MMM d, yyyy HH:mm:ss',\n {\n locale: getLocaleFromLanguageOrCurrent(),\n }\n )\n : undefined;\n\n HoldExpirationInfo = (\n }\n detail={holdExpirationDateString}\n />\n );\n }\n\n if (sale?.inHandAt) {\n const date = new Date(sale.inHandAt);\n\n const dateString = formatInTimeZone(date, timeZone, '(MMM d, yyyy)', {\n locale: getLocaleFromLanguageOrCurrent(),\n });\n\n const needsToFulfill = Boolean(\n sale?.status &&\n [\n PointOfSaleSaleStatus.Fulfilled,\n PointOfSaleSaleStatus.ProcessingFulfillment,\n PointOfSaleSaleStatus.Rejected,\n PointOfSaleSaleStatus.PendingRejection,\n ].includes(sale.status)\n );\n\n InHandInfo = (\n }\n detail={\n
    \n \n {dateString}\n
    \n }\n />\n );\n } else {\n InHandInfo = (\n }\n detail={}\n />\n );\n }\n\n const cancelTo = getSaleDetailsModalConfigWithDeepLink(sale?.id);\n\n const hasAutoFulfillFeature = useUserHasFeature(Feature.AutoFulfillSetting);\n const saleIsHandledByProcessor = useMarketplaceHandledByProcessor(sale?.mkp);\n\n const canChangeTicketType =\n isBulkEdit ||\n (sale &&\n (sale.mkp === Marketplace.StubHub || saleIsHandledByProcessor) &&\n ALLOWED_TICKET_TYPE_CHANGE_SALE_STATUSES.has(sale.status));\n\n const cantChangeTicketTypeTooltip = useContent(\n ContentId.SaleTicketTypeWarning\n );\n const content = (\n <>\n \n }\n detail={\n canEditSale ? (\n \n {isBulkEdit && (\n \n }\n />\n )}\n {\n setValue('ticketType', posChangedField(newTicketType), {\n shouldDirty: true,\n });\n }}\n />\n \n ) : (\n
    \n {getTicketTypeIcon(\n ticketType?.value ?? null,\n IconsFill.textPrimary\n )}\n
    \n {getTicketTypeLabel(ticketType?.value ?? null)}\n
    \n
    \n )\n }\n />\n {!isBulkEdit &&\n Boolean(sale?.availArtTypes?.length) &&\n canViewFulfillmentArtifacts && (\n \n )}\n
    \n {!isBulkEdit && hasAutoFulfillFeature && saleIsHandledByProcessor && (\n \n \n }\n style={{ flex: 1 }}\n detail={\n e.stopPropagation()}\n onCheckedChange={(isChecked) => {\n setValue('isNoFulfill', posChangedField(!isChecked), {\n shouldDirty: true,\n });\n }}\n />\n }\n />\n \n \n )}\n\n {!isBulkEdit && (\n <>\n {sale?.status && (\n \n }\n detail={\n <>\n \n \n \n {\n // if the Sale is fulfilled in both POS and Marketplace, but the version is mismatched, show the warning\n sale.status === PointOfSaleSaleStatus.Fulfilled &&\n sale.isFulfillVerMis ? (\n <>\n {hasFufillmentMismatchDisplay && (\n \n \n }\n >\n \n }\n />\n \n \n )}\n \n ) : sale.status !== PointOfSaleSaleStatus.Fulfilled &&\n sale?.mkpFulfState ===\n MarketplaceFulfillmentState.Fulfilled ? (\n \n \n }\n >\n \n }\n />\n \n \n ) : undefined\n }\n \n \n }\n />\n \n )}\n {HoldExpirationInfo}\n {InHandInfo}\n {sale?.transDest && (\n \n }\n detail={\n
    \n
    \n {sale?.transDest.name}\n
    \n
    \n {sale?.transDest.email}\n
    \n
    \n {sale?.transDest.phoneNumber}\n
    \n
    \n }\n />\n
    \n )}\n \n )}\n \n );\n\n return isBulkEdit ? (\n
    {content}
    \n ) : (\n {content}\n );\n};\n","import { useFormContext } from 'react-hook-form';\nimport { SellerAccountEmployeeSelector } from 'src/components/Selectors/SellerAccountEmployeeSelector';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { useUserCanUpdateSale } from 'src/hooks/useUserHasSalePermissions';\nimport { Detail, DetailGroup, SectionContent } from 'src/modals/common';\nimport { modalSection } from 'src/modals/common/Modals.css';\nimport { useGetModalGridFormat } from 'src/modals/SaleDetailsV2/hooks/useGetModalGridFormat';\nimport {\n EMPTY_SELLER_USER_ID,\n FULFILLMENT_PROVIDER_SELLER_USER_IDS,\n} from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport { Feature, Permission, Sale, SaleInput } from 'src/WebApiController';\n\nexport const FulfillmentSection = ({\n sale,\n isBulkEdit,\n}: {\n sale?: Sale | null;\n isBulkEdit?: boolean;\n}) => {\n const { SectionContentGridFormat } = useGetModalGridFormat();\n const canUpdate = useUserCanUpdateSale(sale) || isBulkEdit;\n const canChangeFulfiller =\n useUserHasAnyOfPermissions(Permission.Sales_Fulfill) && canUpdate;\n const { watch, setValue } = useFormContext();\n const hasFulfillmentProvidersFeature = useUserHasFeature(\n Feature.FulfillmentProviders\n );\n\n const fulfillerId = watch('fulfillerSellerUserId');\n\n const content = (\n \n }\n detail={\n {\n if (newId !== fulfillerId?.value) {\n setValue('fulfillerSellerUserId', posChangedField(newId), {\n shouldDirty: true,\n });\n if (FULFILLMENT_PROVIDER_SELLER_USER_IDS.has(newId)) {\n setValue('isNoFulfill', posChangedField(true), {\n shouldDirty: true,\n });\n }\n }\n }}\n onClick={(e) => e.stopPropagation()}\n isFulfillmentSection={hasFulfillmentProvidersFeature}\n />\n }\n />\n \n );\n return isBulkEdit ? (\n
    {content}
    \n ) : (\n {content}\n );\n};\n","import { HubConnectionState } from '@microsoft/signalr';\nimport { isEqual } from 'lodash-es';\nimport { ComponentProps, useCallback, useMemo, useRef, useState } from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { Modal as RSModal } from 'reactstrap';\nimport { BulkEditStatus } from 'src/components/common/BulkActions/BulkEditStatus';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport {\n BulkEditStage,\n useBulkEditHubContext,\n} from 'src/contexts/BulkEditHubContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { Stack } from 'src/core/ui';\nimport { useBulkEditHub } from 'src/hooks/useBulkEditHub';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { PaymentCurrencyConversionSection } from 'src/modals/SaleDetails/components/PaymentCurrencyConversionSection';\nimport { PaymentSection } from 'src/modals/SaleDetails/components/PaymentSection/PaymentSection';\nimport { DeliverySection } from 'src/modals/SaleDetailsV2/components/DeliverySection';\nimport { FulfillmentSection } from 'src/modals/SaleDetailsV2/components/FulfillmentSection';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getSaleDetailsUpdateInput } from 'src/utils/saleUtils';\nimport {\n ActionOutboxEntityType,\n BulkActionType,\n BulkEditPreviewWithDetails,\n BulkEditProgress,\n BulkEditStep,\n Event,\n Feature,\n Sale,\n SaleDetails,\n SaleInput,\n} from 'src/WebApiController';\n\nimport { BulkEditFooter } from '../common/BulkEditFooter';\nimport { BulkEditHeader } from '../common/BulkEditHeader';\n\nexport type BulkEditSalesSettingsDialogProps = ComponentProps<\n typeof RSModal\n> & {\n updateKey: string;\n sales?: Sale[] | null;\n event?: Event;\n onOkay: (\n saleInput: SaleInput | null,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => void;\n onCancel: () => void;\n};\n\nexport const BulkEditSalesSettingsDialog = ({\n sales,\n ...rest\n}: BulkEditSalesSettingsDialogProps) => {\n const methods = useForm({\n defaultValues: getSaleDetailsUpdateInput(sales?.[0] as SaleDetails),\n });\n\n return (\n \n \n \n );\n};\n\nfunction BulkEditSalesSettingsDialogContent({\n updateKey,\n sales,\n event,\n onOkay,\n onCancel,\n handleSubmit,\n watch,\n reset,\n formState,\n ...rest\n}: BulkEditSalesSettingsDialogProps &\n Omit>, 'children'>) {\n const { setActivePosEntity } = useActivePosEntityContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n const { setSelectionMode } = useMultiSelectionContext();\n const { setProgress, setPreview, setMainDialogOpened } =\n useBulkEditHubContext();\n const [isLoading, setIsLoading] = useState(false);\n const input = watch();\n\n const onClose = useCallback(\n async (\n newProgress?: BulkEditProgress,\n closeMainDialogForPopover?: boolean\n ) => {\n if (newProgress?.step === BulkEditStep.Done) {\n setIsRefreshing(true);\n setActivePosEntity(0);\n\n await refreshExpandedListItems(true);\n setSelectionMode(undefined);\n if (closeMainDialogForPopover) {\n setMainDialogOpened(false);\n } else {\n setProgress(undefined);\n setPreview(undefined);\n }\n setIsRefreshing(false);\n // progress kept to allow the BulkEditStatusPopover to show the result\n }\n onCancel();\n setMainDialogOpened(false);\n },\n [\n onCancel,\n refreshExpandedListItems,\n setActivePosEntity,\n setMainDialogOpened,\n setPreview,\n setProgress,\n setSelectionMode,\n ]\n );\n\n const onBulkEditDone = useCallback(\n async (doneProgress: BulkEditProgress, finalErrors: string[]) => {\n if (finalErrors.length === 0 && doneProgress.step === BulkEditStep.Done) {\n onClose(doneProgress, true);\n }\n },\n [onClose]\n );\n\n const { bulkEditHub, progress, preview, initJob, stage } = useBulkEditHub(\n ActionOutboxEntityType.Sale,\n BulkActionType.UpdateGeneralSettings,\n updateKey,\n onBulkEditDone\n );\n\n const hasBackgroundBulkEditFeature =\n bulkEditHub?.state === HubConnectionState.Connected;\n\n const onSubmitHandler = useCallback(\n (onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n onOkay(null, false, onPreviewReceived);\n } else {\n handleSubmit((i) =>\n onOkay(i, hasBackgroundBulkEditFeature, undefined, preview)\n )();\n }\n setIsLoading(false);\n },\n [onOkay, handleSubmit, preview, hasBackgroundBulkEditFeature]\n );\n\n const [isRefreshing, setIsRefreshing] = useState(false);\n\n const hidePaymentCurrencyConversion = useUserHasFeature(\n Feature.HideSalePaymentConversionSection\n );\n\n const isInputValid = useMemo(() => {\n return !isEqual(input, formState.defaultValues ?? {});\n }, [formState.defaultValues, input]);\n\n const submittButtonRef = useRef(null);\n\n return (\n <>\n }\n />\n }\n onOpened={() => {\n reset(getSaleDetailsUpdateInput());\n initJob();\n }}\n onClosed={() => {\n setMainDialogOpened(false);\n if (progress) {\n setSelectionMode(undefined);\n }\n // Call the outside one if there is one\n rest.onClosed?.();\n }}\n onKeyUp={(e) => {\n if (submittButtonRef.current && e.key === 'Enter' && isInputValid) {\n submittButtonRef.current.click();\n }\n }}\n footer={\n \n }\n onCancel={isLoading ? undefined : onCancel}\n >\n \n \n \n\n \n \n {!hidePaymentCurrencyConversion && (\n \n )}\n \n \n \n \n );\n}\n","import { useUpdateSalesSettingsPermissions } from 'src/components/Sales/BulkActions/useUpdateSalesSettingsPermissions';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nexport const LaunchUpdateSalesSettings = ({\n onClick,\n disabled,\n}: {\n onClick: (e: React.MouseEvent) => void;\n disabled?: boolean;\n}) => {\n const { hasUpdateSalesSettingsPermission } =\n useUpdateSalesSettingsPermissions();\n\n if (!hasUpdateSalesSettingsPermission) {\n return null;\n }\n\n return (\n <>\n \n \n \n \n \n \n \n \n );\n};\n","import { useCallback } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { BulkEditSalesSettingsDialog } from 'src/dialogs/BulkEdits/BulkEditSalesSettingsDialog';\nimport { lookupEventInCatalog } from 'src/utils/eventWithDataUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n BulkEditPreviewWithDetails,\n BulkEditSaleClient,\n Event,\n SaleInput,\n SaleQuery,\n} from 'src/WebApiController';\n\nimport { SALES_BULK_UPDATE_GENERAL_SETTINGS_UPDATE_KEY } from '../../SalesActionDropdown.constants';\nimport { LaunchUpdateSalesSettings } from './LaunchUpdateSaleSettings';\n\nexport const useBulkUpdateSalesSettings = (\n filterQueryWithEventIds: SaleQuery,\n setIsLoading: (v: boolean) => void,\n isLoading?: boolean,\n event?: Event\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const updateKey = event\n ? `salesSettings-event-${event?.viagVirtualId}`\n : SALES_BULK_UPDATE_GENERAL_SETTINGS_UPDATE_KEY;\n\n const {\n data,\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const {\n openDialog: openBulkEditSalesSettingsDialog,\n closeDialog: closeBulkEditSalesSettingsDialog,\n } = useDialog(DialogId.BulkEditSalesSettings, BulkEditSalesSettingsDialog);\n\n const onSubmit = useCallback(\n async (\n saleInput: SaleInput | null,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n await tryInvokeApi(\n async () => {\n const preview = await new BulkEditSaleClient(\n activeAccountWebClientConfig\n ).bulkUpdateGeneralSettingsPreview(filterQueryWithEventIds);\n\n onPreviewReceived(preview);\n },\n (error) => {\n showErrorDialog('bulkUpdateGeneralSettingsPreview', error, {\n trackErrorData: { filterQueryWithEventIds },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n } else if (saleInput) {\n await tryInvokeApi(\n async () => {\n const succeeded = await new BulkEditSaleClient(\n activeAccountWebClientConfig\n ).bulkUpdateGeneralSettings(\n {\n item1: preview!.preview,\n item2: saleInput,\n },\n updateKey,\n supportBackgroundProcess\n );\n if (!supportBackgroundProcess) {\n if (succeeded) {\n await refreshExpandedListItems();\n }\n\n closeBulkEditSalesSettingsDialog();\n }\n },\n (error) => {\n showErrorDialog('bulkUpdateGeneralSettings', error, {\n trackErrorData: { event, preview },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n }\n },\n [\n activeAccountWebClientConfig,\n closeBulkEditSalesSettingsDialog,\n event,\n filterQueryWithEventIds,\n refreshExpandedListItems,\n setIsLoading,\n showErrorDialog,\n updateKey,\n ]\n );\n\n return {\n dropDown: (\n {\n e.preventDefault();\n e.stopPropagation();\n openBulkEditSalesSettingsDialog({\n event,\n sales: event\n ? lookupEventInCatalog(data, event.viagVirtualId)\n ?.entities?.sales?.filter((s) => s != null)\n ?.map((s) => s!)\n : [],\n updateKey,\n onOkay: onSubmit,\n onClosed: () => {\n setIsLoading(false);\n },\n onCancel: closeBulkEditSalesSettingsDialog,\n });\n }}\n disabled={isLoading}\n />\n ),\n };\n};\n","import { useMemo } from 'react';\nimport {\n useFilterQueryState,\n UseFilterQueryStateType,\n} from 'src/components/MainFilterBar/useFilterQueryState';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { EventWithData } from 'src/WebApiController';\nimport { ActionOutboxEntityType, Sale, SaleQuery } from 'src/WebApiController';\n\ninterface UseSalesBulkActionsState {\n isAllSalesSelected: boolean;\n affectedVisibleSaleIds: number[];\n filterQueryWithEventIds: UseFilterQueryStateType;\n}\n\nexport const useSalesBulkActionsState = (\n event?: EventWithData['event']\n): UseSalesBulkActionsState => {\n const { isAllSelected } = useMultiSelectionContext();\n\n const { filterQueryWithEventIds } = useFilterQueryState(\n ActionOutboxEntityType.Sale,\n event?.viagVirtualId ? [event?.viagVirtualId] : []\n );\n\n const { eventsTransformed } = useCatalogDataContext();\n\n const sales = useMemo(() => {\n return (eventsTransformed ?? [])\n .flatMap((ev) => ev.entities.sales)\n .filter((s) => s != null) as Sale[];\n }, [eventsTransformed]);\n\n const affectedVisibleSaleIds = useMemo(() => {\n // Else we must respect only the entity Ids and event Ids\n const ids = [...(filterQueryWithEventIds.entityIds ?? [])];\n ids.push(\n ...sales\n .filter(\n (s) =>\n filterQueryWithEventIds.eventOrMappingIds?.includes(s.viagVirtualId)\n )\n .map((s) => s.id)\n );\n return ids;\n }, [\n filterQueryWithEventIds.entityIds,\n filterQueryWithEventIds.eventOrMappingIds,\n sales,\n ]);\n\n return {\n isAllSalesSelected: isAllSelected,\n affectedVisibleSaleIds,\n filterQueryWithEventIds,\n };\n};\n","import { useState } from 'react';\nimport { useBulkActionsState } from 'src/components/common/BulkActions/useBulkActionsState';\nimport { useUpdatePurchasesPermissions } from 'src/components/Purchases/BulkActions/useUpdatePurchasesPermissions';\nimport { useUpdateSalesSettingsPermissions } from 'src/components/Sales/BulkActions/useUpdateSalesSettingsPermissions';\nimport { useBulkEditCommissionAction } from 'src/components/Sales/SalesActionDropdown/components/BulkEditCommissionAction';\nimport { useBulkMarkSaleAsPaid } from 'src/components/Sales/SalesActionDropdown/components/BulkMarkSaleAsPaid';\nimport { useBulkUpdateInternalNotesAction } from 'src/components/Sales/SalesActionDropdown/components/BulkUpdateInternalNotesAction';\nimport { useBulkUpdateSalesSettings } from 'src/components/Sales/SalesActionDropdown/components/BulkUpdateSalesGeneralSettings';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosDropdown } from 'src/core/POS/PosDropdown';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { ChevronDownIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { EventWithData } from 'src/WebApiController';\n\nimport { useSalesBulkActionsState } from '../../useSalesBulkActionsState';\n\ninterface SettingsActionsProps {\n event: EventWithData['event'];\n}\n\nexport const SettingsActions = ({ event }: SettingsActionsProps) => {\n const { areBulkActionsEnabled } = useBulkActionsState();\n const [isLoading, setIsLoading] = useState(false);\n const { filterQueryWithEventIds } = useSalesBulkActionsState(event);\n\n const bulkUpdateGeneralSettings = useBulkUpdateSalesSettings(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n event\n );\n\n const bulkUpdateInternalNotes = useBulkUpdateInternalNotesAction(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n event\n );\n\n const bulkEditCommissionAction = useBulkEditCommissionAction(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n event\n );\n\n const bulkBulkMarkAsPaid = useBulkMarkSaleAsPaid(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n event\n );\n\n const { hasUpdateSalesSettingsPermission } =\n useUpdateSalesSettingsPermissions();\n const {\n hasUpdatePurchasesPermission,\n hasPurchaseUpdateCommissionPermission,\n } = useUpdatePurchasesPermissions();\n\n if (\n !hasUpdateSalesSettingsPermission &&\n !hasUpdatePurchasesPermission &&\n !hasPurchaseUpdateCommissionPermission\n ) {\n return null;\n }\n\n return (\n <>\n \n \n \n \n }\n align=\"start\"\n triggerProps={{ disabled: isLoading || !areBulkActionsEnabled }}\n >\n {bulkUpdateGeneralSettings.dropDown}\n {bulkUpdateInternalNotes.dropDown}\n {bulkEditCommissionAction.dropDown}\n {bulkBulkMarkAsPaid.dropDown}\n \n \n );\n};\n","import { useCallback, useState } from 'react';\nimport { LaunchBulkEditTags } from 'src/components/common/BulkActions/BulkEditTagsAction';\nimport {\n IPosEntity,\n useActivePosEntityContext,\n} from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport {\n BulkEditTagAction,\n BulkEditTagDialog,\n} from 'src/dialogs/BulkEdits/BulkEditTagDialog';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n BulkEditPreviewWithDetails,\n BulkEditSaleClient,\n Event,\n SaleQuery,\n} from 'src/WebApiController';\n\nimport { SALES_BULK_UPDATE_TAGS_UPDATE_KEY } from '../../SalesActionDropdown.constants';\n\nexport const useBulkEditTagsAction = (\n filterQueryWithEventIds: SaleQuery,\n setIsLoading: (v: boolean) => void,\n isLoading?: boolean,\n event?: Event\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { setActivePosEntity } = useActivePosEntityContext();\n const updateKey = event\n ? `saleTags-event-${event.viagVirtualId}`\n : SALES_BULK_UPDATE_TAGS_UPDATE_KEY;\n const {\n eventsExpansion: { setListItemExpansion, refreshExpandedListItems },\n } = useCatalogDataContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const {\n openDialog: openBulkEditTagDialog,\n closeDialog: closeBulkEditTagDialog,\n } = useDialog(DialogId.BulkEditTags, BulkEditTagDialog);\n\n const [editTagAction, setEditTagAction] = useState(\n BulkEditTagAction.Update\n );\n\n const onSubmitEditTags = useCallback(\n async (\n action: BulkEditTagAction,\n tagKey: string | null,\n tagValue?: string | undefined,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => {\n if (activeAccountWebClientConfig.activeAccountId == null) {\n return null;\n }\n\n setIsLoading(true);\n\n if (onPreviewReceived) {\n await tryInvokeApi(\n async () => {\n const client = new BulkEditSaleClient(activeAccountWebClientConfig);\n\n const preview = await client.bulkUpdateTagsPreview(\n filterQueryWithEventIds\n );\n\n onPreviewReceived(preview);\n },\n (error) => {\n showErrorDialog('bulkUpdateTagsPreview', error, {\n trackErrorData: { filterQueryWithEventIds },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n } else if (tagKey) {\n await tryInvokeApi(\n async () => {\n const client = new BulkEditSaleClient(activeAccountWebClientConfig);\n\n const succeeded =\n action === BulkEditTagAction.Update\n ? await client.bulkUpdateTags(\n preview!.preview,\n tagKey,\n tagValue,\n updateKey,\n supportBackgroundProcess\n )\n : await client.bulkRemoveTags(\n preview!.preview,\n tagKey,\n updateKey,\n supportBackgroundProcess\n );\n\n if (!supportBackgroundProcess) {\n if (succeeded) {\n // Invalidate the activePosEntity, so that when clicking on details modal\n // we force re-loading the entity and newest pricing settings can be displayed\n setActivePosEntity(0);\n await refreshExpandedListItems();\n }\n\n closeBulkEditTagDialog();\n }\n },\n (error) => {\n showErrorDialog('bulkUpdateTags', error, {\n trackErrorData: { tagKey, tagValue, preview },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n }\n },\n [\n activeAccountWebClientConfig,\n setIsLoading,\n filterQueryWithEventIds,\n showErrorDialog,\n updateKey,\n closeBulkEditTagDialog,\n setActivePosEntity,\n refreshExpandedListItems,\n ]\n );\n\n const onChangeTagClick = useCallback(\n (e: React.MouseEvent, editTagAction: BulkEditTagAction) => {\n e.preventDefault();\n e.stopPropagation();\n if (event) {\n setListItemExpansion(true, [event.viagVirtualId]);\n }\n setEditTagAction(editTagAction);\n openBulkEditTagDialog({\n updateKey,\n action: editTagAction,\n onOkay: onSubmitEditTags,\n entityType: ActionOutboxEntityType.Sale,\n onClosed: () => {\n setIsLoading(false);\n },\n onCancel: closeBulkEditTagDialog,\n });\n },\n [\n closeBulkEditTagDialog,\n event,\n onSubmitEditTags,\n openBulkEditTagDialog,\n setIsLoading,\n setListItemExpansion,\n updateKey,\n ]\n );\n\n return {\n dropDown: (\n \n ),\n };\n};\n","import { useState } from 'react';\nimport { BulkEditTagsActionPermissionsHandler } from 'src/components/common/BulkActions/BulkEditTagsAction/BulkEditTagsActionPermissionsHandler';\nimport { useBulkActionsState } from 'src/components/common/BulkActions/useBulkActionsState';\nimport { useBulkEditTagsAction } from 'src/components/Sales/SalesActionDropdown/components/BulkEditTagsAction';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosDropdown } from 'src/core/POS/PosDropdown';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { ChevronDownIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { EventWithData } from 'src/WebApiController';\nimport { ActionOutboxEntityType } from 'src/WebApiController';\n\nimport { useSalesBulkActionsState } from '../../useSalesBulkActionsState';\n\ninterface TagsActionsProps {\n event: EventWithData['event'];\n}\n\nexport const TagsActions = ({ event }: TagsActionsProps) => {\n const { areBulkActionsEnabled } = useBulkActionsState();\n const [isLoading, setIsLoading] = useState(false);\n const { filterQueryWithEventIds } = useSalesBulkActionsState();\n\n const bulkUpdateTags = useBulkEditTagsAction(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n event\n );\n\n return (\n \n \n \n \n \n }\n align=\"start\"\n triggerProps={{ disabled: isLoading || !areBulkActionsEnabled }}\n >\n {bulkUpdateTags.dropDown}\n \n \n );\n};\n","import { useBulkUpdateAutoFulfillPermissions } from 'src/components/common/BulkActions/BulkUpdateAutoFulfillAction/useBulkUpdateAutoFulfillPermissions';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { useAnyMarketplaceHandledByProcessor } from 'src/hooks/useMarketplaceHandledByProcessor';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ActionOutboxEntityType, Feature } from 'src/WebApiController';\n\nexport const LaunchBulkMarkAsFulfilled = ({\n onClick,\n disabled,\n}: {\n onClick: (e: React.MouseEvent) => void;\n disabled?: boolean;\n}) => {\n const { hasEditAutoFulfillPermissions } = useBulkUpdateAutoFulfillPermissions(\n {\n entityType: ActionOutboxEntityType.Sale,\n }\n );\n const hasMarkedAsFulfilled = useUserHasFeature(Feature.SaleMarkedAsFulfilled);\n const anyMkpHandledByProcessor = useAnyMarketplaceHandledByProcessor();\n\n if (\n !anyMkpHandledByProcessor ||\n !hasEditAutoFulfillPermissions ||\n !hasMarkedAsFulfilled\n ) {\n return null;\n }\n\n return (\n \n \n \n );\n};\n","import { useContent } from 'src/contexts/ContentContext';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nexport const SalesGlobalActionDropdown = () => {\n const actionsMsg = useContent(ContentId.Actions);\n\n // Return actual content when we have actions\n // again\n return null;\n\n // return (\n // \n // \n // \n // }\n // align=\"end\"\n // >\n // );\n};\n","import { HubConnectionState } from '@microsoft/signalr';\nimport { ComponentProps, useCallback, useRef, useState } from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { BulkEditStatus } from 'src/components/common/BulkActions/BulkEditStatus';\nimport {\n IPosEntity,\n useActivePosEntityContext,\n} from 'src/contexts/ActivePosEntityContext';\nimport {\n BulkEditStage,\n useBulkEditHubContext,\n} from 'src/contexts/BulkEditHubContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { Stack } from 'src/core/ui';\nimport { useBulkEditHub } from 'src/hooks/useBulkEditHub';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n ActionOutboxEntityType,\n BulkActionType,\n BulkEditPreviewWithDetails,\n BulkEditProgress,\n BulkEditStep,\n} from 'src/WebApiController';\n\nimport { BulkEditFooter } from '../common/BulkEditFooter';\nimport { BulkEditHeader } from '../common/BulkEditHeader';\n\nexport type BulkMarkAsFulfilledDialogProps = ComponentProps & {\n updateKey: string;\n onOkay: (\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => void;\n onCancel: () => void;\n};\n\nexport function BulkMarkAsFulfilledDialog({\n updateKey,\n onOkay,\n onCancel,\n ...rest\n}: BulkMarkAsFulfilledDialogProps) {\n const { setActivePosEntity } = useActivePosEntityContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n const { setSelectionMode } = useMultiSelectionContext();\n const { setProgress, setPreview, setMainDialogOpened } =\n useBulkEditHubContext();\n\n const [isRefreshing, setIsRefreshing] = useState(false);\n const [isLoading, setIsLoading] = useState(false);\n\n const onClose = useCallback(\n async (\n newProgress?: BulkEditProgress,\n closeMainDialogForPopover?: boolean\n ) => {\n if (newProgress?.step === BulkEditStep.Done) {\n setIsRefreshing(true);\n setActivePosEntity(0);\n\n await refreshExpandedListItems();\n setSelectionMode(undefined);\n if (closeMainDialogForPopover) {\n setMainDialogOpened(false);\n } else {\n setProgress(undefined);\n setPreview(undefined);\n }\n\n setIsRefreshing(false);\n // progress kept to allow the BulkEditStatusPopover to show the result\n }\n onCancel();\n },\n [\n onCancel,\n refreshExpandedListItems,\n setActivePosEntity,\n setMainDialogOpened,\n setPreview,\n setProgress,\n setSelectionMode,\n ]\n );\n\n const onBulkEditDone = useCallback(\n async (doneProgress: BulkEditProgress, finalErrors: string[]) => {\n if (finalErrors.length === 0 && doneProgress.step === BulkEditStep.Done) {\n onClose(doneProgress, true);\n }\n },\n [onClose]\n );\n\n const { bulkEditHub, progress, preview, initJob, stage } = useBulkEditHub(\n ActionOutboxEntityType.Sale,\n BulkActionType.MarkAsFulfilled,\n updateKey,\n onBulkEditDone\n );\n\n const hasBackgroundBulkEditFeature =\n bulkEditHub?.state === HubConnectionState.Connected;\n\n const onSubmitHandler = useCallback(\n (onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n onOkay(false, onPreviewReceived);\n } else {\n onOkay(hasBackgroundBulkEditFeature, undefined, preview);\n }\n setIsLoading(false);\n },\n [onOkay, preview, hasBackgroundBulkEditFeature]\n );\n const submittButtonRef = useRef(null);\n\n return (\n }\n />\n }\n onOpened={() => {\n initJob();\n }}\n onKeyUp={(e) => {\n if (submittButtonRef.current && e.key === 'Enter') {\n submittButtonRef.current.click();\n }\n }}\n onClick={(e) => {\n // This so that this dialog does not cause event to flow to the EventHeader open/close event\n e.stopPropagation();\n e.preventDefault();\n }}\n onClosed={() => {\n setMainDialogOpened(false);\n if (progress) {\n setSelectionMode(undefined);\n }\n // Call the outside one if there is one\n rest.onClosed?.();\n }}\n footer={\n \n }\n onCancel={isLoading ? undefined : onCancel}\n >\n \n \n \n \n \n \n \n \n );\n}\n","import { useCallback } from 'react';\nimport { LaunchBulkMarkAsFulfilled } from 'src/components/common/BulkActions/BulkMarkAsFulfilled';\nimport { SALES_BULK_UPDATE_MARK_AS_FULFILLED_UPDATE_KEY } from 'src/components/Sales/SalesActionDropdown';\nimport {\n IPosEntity,\n useActivePosEntityContext,\n} from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { BulkMarkAsFulfilledDialog } from 'src/dialogs/BulkEdits/BulkMarkAsFulfilledDialog';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n BulkEditPreviewWithDetails,\n BulkEditSaleClient,\n Event,\n SaleQuery,\n} from 'src/WebApiController';\n\nexport const useBulkMarkAsFulfilledAction = (\n filterQueryWithEventIds: SaleQuery,\n setIsLoading: (v: boolean) => void,\n isLoading?: boolean,\n event?: Event\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { setActivePosEntity } = useActivePosEntityContext();\n const updateKey = event\n ? `sales-markasfulfilled-event-${event.viagVirtualId}`\n : SALES_BULK_UPDATE_MARK_AS_FULFILLED_UPDATE_KEY;\n const {\n refreshCatalog,\n eventsExpansion: { setListItemExpansion, refreshExpandedListItems },\n } = useCatalogDataContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const {\n openDialog: openBulkMarkAsFulfilledDialog,\n closeDialog: closeBulkMarkAsFulfilledDialog,\n } = useDialog(DialogId.BulkMarkAsFulfilled, BulkMarkAsFulfilledDialog);\n\n const onSubmit = useCallback(\n async (\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n await tryInvokeApi(\n async () => {\n const preview = await new BulkEditSaleClient(\n activeAccountWebClientConfig\n ).bulkUpdateMarkAsFulfilledPreview(filterQueryWithEventIds);\n\n onPreviewReceived(preview);\n },\n (error) => {\n showErrorDialog('bulkUpdateMarkAsFulfilledPreview', error, {\n trackErrorData: { event },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n } else {\n await tryInvokeApi(\n async () => {\n const saleClient = new BulkEditSaleClient(\n activeAccountWebClientConfig\n );\n\n const succeeded = await saleClient.bulkUpdateMarkAsFulfilled(\n preview!.preview,\n updateKey,\n supportBackgroundProcess\n );\n\n if (!supportBackgroundProcess) {\n if (succeeded) {\n // Invalidate the activePosEntity, so that when clicking on listingDetails\n // we force re-loading the listing and newest pricing settings can be displayed\n setActivePosEntity(0);\n await refreshExpandedListItems();\n }\n\n closeBulkMarkAsFulfilledDialog();\n await refreshCatalog();\n }\n },\n (error) => {\n showErrorDialog('bulkUpdateMarkAsFulfilled', error, {\n trackErrorData: { preview },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n }\n },\n [\n setIsLoading,\n activeAccountWebClientConfig,\n filterQueryWithEventIds,\n showErrorDialog,\n event,\n updateKey,\n closeBulkMarkAsFulfilledDialog,\n refreshCatalog,\n setActivePosEntity,\n refreshExpandedListItems,\n ]\n );\n\n const onChangeClick = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n if (event) {\n setListItemExpansion(true, [event.viagVirtualId]);\n }\n\n openBulkMarkAsFulfilledDialog({\n updateKey,\n onOkay: onSubmit,\n onClosed: () => {\n setIsLoading(false);\n },\n onCancel: closeBulkMarkAsFulfilledDialog,\n });\n },\n [\n closeBulkMarkAsFulfilledDialog,\n event,\n onSubmit,\n openBulkMarkAsFulfilledDialog,\n setIsLoading,\n setListItemExpansion,\n updateKey,\n ]\n );\n\n return {\n dropDown: (\n \n ),\n };\n};\n","import { useCallback } from 'react';\nimport { LaunchBulkUpdateAutoFulfill } from 'src/components/common/BulkActions/BulkUpdateAutoFulfillAction';\nimport {\n IPosEntity,\n useActivePosEntityContext,\n} from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { BulkUpdateAutoFulfillDialog } from 'src/dialogs/BulkEdits/BulkUpdateAutoFulfillDialog';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n BulkEditPreviewWithDetails,\n BulkEditSaleClient,\n Event,\n SaleQuery,\n} from 'src/WebApiController';\n\nimport { SALES_BULK_UPDATE_AUTOFULFILL_UPDATE_KEY } from '../../SalesActionDropdown.constants';\n\nexport const useBulkUpdateAutoFulfillAction = (\n filterQueryWithEventIds: SaleQuery,\n setIsLoading: (v: boolean) => void,\n isLoading?: boolean,\n event?: Event\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { setActivePosEntity } = useActivePosEntityContext();\n const updateKey = event\n ? `sales-autofulfill-event-${event.viagVirtualId}`\n : SALES_BULK_UPDATE_AUTOFULFILL_UPDATE_KEY;\n const {\n eventsExpansion: { setListItemExpansion, refreshExpandedListItems },\n } = useCatalogDataContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const {\n openDialog: openBulkUpdateAutoFulfillDialog,\n closeDialog: closeBulkUpdateAutofulfillDialog,\n } = useDialog(DialogId.BulkUpdateAutoFulfill, BulkUpdateAutoFulfillDialog);\n\n const onSubmit = useCallback(\n async (\n isNoFulfill: boolean | null,\n _updateSalesOfListings: boolean,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n await tryInvokeApi(\n async () => {\n const preview = await new BulkEditSaleClient(\n activeAccountWebClientConfig\n ).bulkUpdateIsNoFulfillPreview(filterQueryWithEventIds);\n\n onPreviewReceived(preview);\n },\n (error) => {\n showErrorDialog('bulkUpdateIsNoFulfillPreview', error, {\n trackErrorData: { filterQueryWithEventIds },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n } else if (isNoFulfill != null) {\n await tryInvokeApi(\n async () => {\n const saleClient = new BulkEditSaleClient(\n activeAccountWebClientConfig\n );\n\n const succeeded = await saleClient.bulkUpdateIsNoFulfill(\n preview!.preview,\n updateKey,\n isNoFulfill,\n supportBackgroundProcess\n );\n\n if (!supportBackgroundProcess) {\n if (succeeded) {\n // Invalidate the activePosEntity, so that when clicking on listingDetails\n // we force re-loading the listing and newest pricing settings can be displayed\n setActivePosEntity(0);\n await refreshExpandedListItems();\n }\n\n closeBulkUpdateAutofulfillDialog();\n }\n },\n (error) => {\n showErrorDialog('bulkUpdateIsNoFulfill', error, {\n trackErrorData: { isNoFulfill, preview },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n }\n },\n [\n setIsLoading,\n activeAccountWebClientConfig,\n filterQueryWithEventIds,\n showErrorDialog,\n updateKey,\n closeBulkUpdateAutofulfillDialog,\n setActivePosEntity,\n refreshExpandedListItems,\n ]\n );\n\n const onChangeClick = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n if (event) {\n setListItemExpansion(true, [event.viagVirtualId]);\n }\n openBulkUpdateAutoFulfillDialog({\n updateKey,\n onOkay: onSubmit,\n entityType: ActionOutboxEntityType.Sale,\n onClosed: () => {\n setIsLoading(false);\n },\n onCancel: closeBulkUpdateAutofulfillDialog,\n });\n },\n [\n closeBulkUpdateAutofulfillDialog,\n event,\n onSubmit,\n openBulkUpdateAutoFulfillDialog,\n setIsLoading,\n setListItemExpansion,\n updateKey,\n ]\n );\n\n return {\n dropDown: (\n \n ),\n };\n};\n","import { useState } from 'react';\nimport { useBulkUpdateAutoFulfillPermissions } from 'src/components/common/BulkActions/BulkUpdateAutoFulfillAction/useBulkUpdateAutoFulfillPermissions';\nimport { useBulkActionsState } from 'src/components/common/BulkActions/useBulkActionsState';\nimport { useSalesBulkActionsState } from 'src/components/Sales/BulkActions/useSalesBulkActionsState';\nimport { useBulkMarkAsFulfilledAction } from 'src/components/Sales/SalesActionDropdown/components/BulkMarkAsFulfilled';\nimport { useBulkUpdateAutoFulfillAction } from 'src/components/Sales/SalesActionDropdown/components/BulkUpdateAutoFulfillAction';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosDropdown } from 'src/core/POS/PosDropdown';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { useAnyMarketplaceHandledByProcessor } from 'src/hooks/useMarketplaceHandledByProcessor';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ChevronDownIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n ActionOutboxEntityType,\n EventWithData,\n Feature,\n} from 'src/WebApiController';\n\ninterface FulfillmentActionsProps {\n event?: EventWithData['event'];\n}\n\nexport const FulfillmentActions = ({ event }: FulfillmentActionsProps) => {\n const { areBulkActionsEnabled } = useBulkActionsState();\n const [isLoading, setIsLoading] = useState(false);\n const { filterQueryWithEventIds } = useSalesBulkActionsState();\n const bulkUpdateAutoFulfill = useBulkUpdateAutoFulfillAction(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n event\n );\n\n const bulkMarkAsFulfilled = useBulkMarkAsFulfilledAction(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n event\n );\n\n const { hasEditAutoFulfillPermissions } = useBulkUpdateAutoFulfillPermissions(\n {\n entityType: ActionOutboxEntityType.Sale,\n }\n );\n const hasAutoFulfillFeature = useUserHasFeature(Feature.AutoFulfillSetting);\n const hasMarkedAsFulfilled = useUserHasFeature(Feature.SaleMarkedAsFulfilled);\n const anyMkpHandledByProcessor = useAnyMarketplaceHandledByProcessor();\n\n if (\n (!hasAutoFulfillFeature && !hasMarkedAsFulfilled) ||\n !anyMkpHandledByProcessor ||\n !hasEditAutoFulfillPermissions\n )\n return null;\n\n return (\n <>\n \n \n \n \n }\n align=\"start\"\n triggerProps={{ disabled: isLoading || !areBulkActionsEnabled }}\n >\n {bulkUpdateAutoFulfill.dropDown}\n {bulkMarkAsFulfilled.dropDown}\n \n \n );\n};\n","import { MultiSelectActionsContainer } from 'src/components/common/MultiSelect/MultiSelectActionsContainer';\nimport { SettingsActions } from 'src/components/Sales/BulkActions/SalesEventBulkActions/Actions/SettingsActions';\nimport { TagsActions } from 'src/components/Sales/BulkActions/SalesEventBulkActions/Actions/TagsActions';\nimport { FulfillmentActions } from 'src/components/Sales/BulkActions/SalesGlobalBulkActions/Actions/FulfillmentActions';\nimport { EventWithData } from 'src/WebApiController';\n\ninterface SalesMonthlyBulkActionsProps {\n event: EventWithData['event'];\n}\n\nexport const SalesMonthlyBulkActions = ({\n event,\n}: SalesMonthlyBulkActionsProps) => {\n return (\n \n \n \n \n \n );\n};\n","import styled from 'styled-components/macro';\n\nexport const ItemsCountDiv = styled.div`\n text-align: right;\n line-height: 18px;\n white-space: nowrap;\n color: ${(props) => props.theme.colors.textPrimary};\n ${({\n theme: {\n typography: { getStyles },\n },\n }) => getStyles('caption1')};\n`;\n","import { useCallback, useMemo } from 'react';\nimport { Link, useNavigate } from 'react-router-dom';\nimport { IconButton } from 'src/components/Buttons';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { vars } from 'src/core/themes';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { MainRoute } from 'src/navigations/Routes/MainRoute';\nimport { FullPageIcon } from 'src/svgs';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { createPurchaseEventPageUrl } from 'src/utils/purchaseUtils';\nimport { createSaleEventPageUrl } from 'src/utils/saleUtils';\nimport { Event, Feature } from 'src/WebApiController';\n\nexport const FullPageEventAction = ({ event }: { event: Event }) => {\n const hasFullPageEventViewFeature = useUserHasFeature(\n Feature.FullPageEventView\n );\n const navigate = useNavigate();\n const { mainRoute } = useAppContext();\n\n const eventUrl = useMemo(() => {\n if (mainRoute === MainRoute.Sales) {\n return createSaleEventPageUrl(event.viagVirtualId);\n } else {\n return createPurchaseEventPageUrl(event.viagVirtualId);\n }\n }, [event.viagVirtualId, mainRoute]);\n\n const onViewClick = useCallback(\n (eventUrl: string) => {\n if (event) {\n window.location.replace(`#${event.viagVirtualId}`);\n setTimeout(() => {\n navigate(eventUrl, {\n state: {\n returnUrl: `${location.pathname}${location.search}#${event.viagVirtualId}`,\n },\n });\n }, 10);\n }\n },\n [event, navigate]\n );\n\n if (!hasFullPageEventViewFeature) {\n return null;\n }\n\n return (\n {\n if (e.button === 0 && e.getModifierState('Control') === false) {\n // Perform like a button click when it's a left-click (and no Ctrl)\n // Else the click will be whatever
    does\n e.preventDefault();\n e.stopPropagation();\n\n onViewClick(eventUrl);\n }\n }}\n >\n \n }\n titleContentId={ContentId.OpenEventPage}\n />\n \n );\n};\n","import { useMemo } from 'react';\nimport { MultiSelectionToggleGroup } from 'src/components/common/MultiSelect/Toggle/MultiSelectionToggleGroup';\nimport {\n MetricsDisplay,\n MetricsDisplayPlaceholder,\n} from 'src/components/Metrics';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { useCatalogMetricsContext } from 'src/contexts/CatalogMetricsContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useGetEventFullInfo } from 'src/hooks/useGetEventFullInfo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getSalesSaleMetrics } from 'src/utils/ticketMetricUtils';\nimport { SaleMetrics } from 'src/WebApiController';\n\nimport {\n EventItemHeader,\n EventItemHeaderType,\n METRICS_PLACEHOLDER_DIMS,\n} from '../../Events/EventItemHeader';\nimport * as styles from './EventSaleHeader.css';\nimport { ItemsCountDiv } from './EventSaleHeader.styled';\nimport { FullPageEventAction } from './FullPageEventAction';\n\nexport const EventSaleHeader = (props: EventItemHeaderType) => {\n const { eventMetrics } = useCatalogMetricsContext();\n\n const { event, entityCount: salesCount, ...rest } = props;\n const metrics = useMemo(\n () => getSalesSaleMetrics(eventMetrics?.[event.viagVirtualId]),\n [eventMetrics, event]\n );\n const { performer, venue } = useGetEventFullInfo(event);\n\n const {\n eventsExpansion: { expandedListItems, toggleListItemExpansion },\n } = useCatalogDataContext();\n\n const onToggleGroup = (groupId: string) => {\n if (!expandedListItems.includes(groupId)) {\n toggleListItemExpansion([groupId]);\n }\n };\n\n return (\n ,\n ,\n ]}\n headerMetrics={\n metrics && (\n \n )\n }\n metrics={\n
    \n {!metrics ? (\n \n ) : (\n \n )}\n \n {`${salesCount} `}\n \n \n
    \n }\n />\n );\n};\n","import clsx from 'clsx';\nimport { MinRowsForUsingVirtuoso } from 'src/components/Accordions';\nimport { EventSaleBody } from 'src/components/Accordions/SalesEventsAccordion/EventSaleBody';\nimport * as EmptySectionContent from 'src/components/common/EmptySectionContent';\nimport { MultiSelectActionBar } from 'src/components/common/MultiSelect/MultiSelectActionBar';\nimport { multiActionToolBarNoHorizontalPadding } from 'src/components/Events/EventPage/EventPage.css';\nimport { SalesBulkActionsPermissions } from 'src/components/Sales/BulkActions/SalesBulkActionsPermissions';\nimport { SalesMonthlyBulkActions } from 'src/components/Sales/BulkActions/SalesEventBulkActions/SalesEventBulkActions';\nimport { Content } from 'src/contexts/ContentContext';\nimport { SearchSolidIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { EventWithData, Sale } from 'src/WebApiController';\n\nimport {\n EventAccordionItemProps,\n EventsAccordion,\n VirtualizedEventAccordionProps,\n} from '../EventsAccordion';\nimport { EventSaleHeader } from './EventSaleHeader';\n\nexport function translateEventToSaleAccordionItem(\n props: EventWithData,\n index: number,\n noPadding?: boolean\n): EventAccordionItemProps {\n return {\n index,\n itemId: props.event.viagVirtualId,\n HeaderComponent: EventSaleHeader,\n BodyComponent: EventSaleBody,\n AfterHeaderComponent: () => (\n \n \n \n \n \n ),\n usingVirtuoso: (props.counts.salesCnt ?? 0) > MinRowsForUsingVirtuoso,\n ...props,\n entities: props.entities.sales ?? [],\n entityCount: props.counts.salesCnt ?? 0,\n };\n}\n\nexport function SalesEventsAccordion(\n props: VirtualizedEventAccordionProps\n) {\n return ;\n}\n\nexport function SaleEventsEmpty() {\n return (\n \n \n \n }\n >\n \n \n \n \n \n \n \n );\n}\n","import { vars } from 'src/core/themes';\n\nexport const SHIMMERING_DIV_HEIGHT_PAYMENTS = vars.spacing.xxl;\n","export enum MarketplacePaymentLinesTableColumnId {\n Id = 'id',\n Type = 'type',\n Event = 'event',\n Seating = 'seating',\n Sale = 'sale',\n Paid = 'paid',\n SaleStatus = 'saleStatus',\n Actions = 'actions',\n}\n","import { useFormContext } from 'react-hook-form';\nimport { LinkMarketplacePaymentToSaleInput } from 'src/dialogs/LinkMarketplacePaymentToSaleDialog/LinkMarketplacePaymentToSaleDialog';\nimport { MarketplacePaymentLineType, SaleCostType } from 'src/WebApiController';\n\nexport const useGetRemainingBalance = () => {\n const { watch } = useFormContext();\n\n const saleLineItems = watch('saleLineItems') ?? [];\n const marketplacePaymentLine = watch('marketplacePaymentLine');\n\n const isCredit =\n marketplacePaymentLine?.type === MarketplacePaymentLineType.Credit;\n\n if (!marketplacePaymentLine) {\n return { remainingAmount: 0, isCredit };\n }\n\n // Only charge/credit that is linked to current payment id\n const saleLineItemsAmount = saleLineItems.reduce((acc, saleLineItem) => {\n let shouldCount = true;\n\n if (isCredit && saleLineItem.costType !== SaleCostType.Credit) {\n shouldCount = false;\n }\n\n if (!isCredit && saleLineItem.costType !== SaleCostType.Charge) {\n shouldCount = false;\n }\n\n if (saleLineItem.marketplacePaymentLineId !== marketplacePaymentLine.id) {\n shouldCount = false;\n }\n\n if (shouldCount) {\n acc += (isCredit ? 1 : -1) * saleLineItem.cost;\n }\n\n return acc;\n }, 0);\n\n return {\n remainingAmount: marketplacePaymentLine.amt.amt - saleLineItemsAmount,\n isCredit,\n };\n};\n","import { useFormContext } from 'react-hook-form';\nimport { LinkMarketplacePaymentToSaleInput } from 'src/dialogs/LinkMarketplacePaymentToSaleDialog/LinkMarketplacePaymentToSaleDialog';\nimport { useGetRemainingBalance } from 'src/dialogs/LinkMarketplacePaymentToSaleDialog/useGetRemainingBalance';\nimport { SaleLineItemModal } from 'src/modals/SaleDetails/components/PaymentSection/SaleLineItemModal';\nimport { AddLineItemModalBodyProps as SaleLineItemModalBodyProps } from 'src/modals/SaleDetails/components/PaymentSection/SaleLineItemModal/SaleLineItemModal.types';\n\ntype WrapperProps = SaleLineItemModalBodyProps;\n\nexport const SaleLineItemModalWrapper = (props: WrapperProps) => {\n const { remainingAmount, isCredit } = useGetRemainingBalance();\n const { watch } = useFormContext();\n\n const marketplacePaymentLine = watch('marketplacePaymentLine');\n return (\n \n );\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { SaleClient } from 'src/WebApiController';\n\nexport function useGetSaleLineItemsBySaleId(saleId?: number | null) {\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n\n const shouldQuery =\n !!activeAccountWebClientConfig?.activeAccountId && !!saleId;\n\n return useQuery({\n queryKey: ['GetSaleLineItemsBySaleId', saleId],\n async queryFn() {\n if (!shouldQuery) return null;\n\n try {\n return await new SaleClient(\n activeAccountWebClientConfig\n ).getSaleLineItemsBySaleId(saleId);\n } catch (err: unknown) {\n trackError('SaleClient.getSaleLineItemsBySaleId', err as ErrorTypes, {\n saleId,\n });\n throw err;\n }\n },\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n });\n}\n","import { useCallback, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { SimpleTable } from 'src/core/ui';\nimport { useHasPaymentsSectionsV2Feature } from 'src/modals/SaleDetails/hooks/useHasPaymentsSectionsV2Feature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n SALE_LINE_ITEM_CHARGE_REASON_TO_CID,\n SALE_LINE_ITEM_CREDIT_REASON_TO_CID,\n} from 'src/utils/constants/contentIdMaps';\nimport { formatCurrency } from 'src/utils/numberFormatter';\nimport { MarketplacePaymentLineType, SaleCostType } from 'src/WebApiController';\n\nimport { LinkMarketplacePaymentToSaleInput } from './LinkMarketplacePaymentToSaleDialog';\n\nexport function SaleChargesTable() {\n const { watch } = useFormContext();\n const hasPaymentsSectionsV2Feature = useHasPaymentsSectionsV2Feature();\n\n const saleLineItems = watch('saleLineItems') ?? [];\n const marketplacePaymentLine = watch('marketplacePaymentLine');\n const marketplacePaymentLineId = marketplacePaymentLine.id;\n const isCredit =\n marketplacePaymentLine.type === MarketplacePaymentLineType.Credit;\n\n const saleLineItemIndexesToDisplay = saleLineItems\n .map((saleLineItem, index) => {\n let shouldDisplay = true;\n\n if (isCredit && saleLineItem.costType !== SaleCostType.Credit) {\n shouldDisplay = false;\n }\n\n if (!isCredit && saleLineItem.costType !== SaleCostType.Charge) {\n shouldDisplay = false;\n }\n\n // Only charge/credit that is unlinked or current payment id\n if (\n saleLineItem.marketplacePaymentLineId != null &&\n saleLineItem.marketplacePaymentLineId !== marketplacePaymentLineId\n ) {\n shouldDisplay = false;\n }\n\n return { index, shouldDisplay };\n })\n .filter(({ shouldDisplay }) => shouldDisplay)\n .map(({ index }) => index);\n\n return (\n \n \n \n \n
    \n \n
    \n
    \n \n
    \n \n
    \n
    \n {hasPaymentsSectionsV2Feature && (\n \n
    \n \n
    \n
    \n )}\n \n
    \n \n
    \n
    \n
    \n
    \n \n {saleLineItemIndexesToDisplay.map((index, i) => (\n \n ))}\n \n
    \n );\n}\n\nfunction SaleLineItemRow({ index }: { index: number }) {\n const { watch, setValue } =\n useFormContext();\n const hasPaymentsSectionsV2Feature = useHasPaymentsSectionsV2Feature();\n const { getUiCurrency } = useLocalizationContext();\n\n const saleLineItems = watch('saleLineItems');\n const saleLineItem = saleLineItems![index];\n const marketplacePaymentLineId = watch('marketplacePaymentLine').id;\n\n const isSelected =\n saleLineItem.marketplacePaymentLineId === marketplacePaymentLineId;\n\n const reasonContentId =\n saleLineItem.costType === SaleCostType.Credit\n ? saleLineItem.saleLineItemCreditReason\n ? SALE_LINE_ITEM_CREDIT_REASON_TO_CID[\n saleLineItem.saleLineItemCreditReason\n ]\n : undefined\n : saleLineItem.saleLineItemChargeReason\n ? SALE_LINE_ITEM_CHARGE_REASON_TO_CID[\n saleLineItem.saleLineItemChargeReason\n ]\n : undefined;\n const reasonMsg = useContent(reasonContentId);\n\n const onSelect = useCallback(() => {\n if (isSelected) {\n setValue(\n 'saleLineItems',\n saleLineItems?.map((item, i) => {\n return i === index\n ? { ...item, marketplacePaymentLineId: null }\n : item;\n }) ?? null\n );\n } else {\n setValue(\n 'saleLineItems',\n saleLineItems?.map((item, i) => {\n return i === index ? { ...item, marketplacePaymentLineId } : item;\n }) ?? null\n );\n }\n }, [index, isSelected, marketplacePaymentLineId, saleLineItems, setValue]);\n\n const uiCurrency = useMemo(\n () => getUiCurrency(saleLineItem.currencyCode),\n [getUiCurrency, saleLineItem.currencyCode]\n );\n\n return (\n \n {saleLineItem.description}\n \n {formatCurrency(saleLineItem.cost, uiCurrency.code, uiCurrency.dec)}\n \n {hasPaymentsSectionsV2Feature && (\n {reasonMsg}\n )}\n \n \n \n \n );\n}\n","import { ComponentProps, useCallback, useEffect, useMemo } from 'react';\nimport { FormProvider, useForm, useFormContext } from 'react-hook-form';\nimport { Modal as RSModal } from 'reactstrap';\nimport { CancelButton } from 'src/components/Buttons';\nimport { OkButton } from 'src/components/Buttons/OkButton';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { SaleLineItemModalWrapper } from 'src/dialogs/LinkMarketplacePaymentToSaleDialog/SaleLineItemModalWrapper';\nimport { useGetRemainingBalance } from 'src/dialogs/LinkMarketplacePaymentToSaleDialog/useGetRemainingBalance';\nimport { useGetSaleLineItemsBySaleId } from 'src/hooks/api/useGetSaleLineItemsBySaleId';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { IconsFill, PlusIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { formatCurrency } from 'src/utils/numberFormatter';\nimport {\n MarketplacePaymentLineType,\n MarketplaceSaleLineItem,\n SaleCostType,\n SaleLineItem,\n} from 'src/WebApiController';\n\nimport * as styles from './LinkMarketplacePaymentToSaleDialog.css';\nimport { SaleChargesTable } from './SaleChargesTable';\n\ntype LinkMarketplacePaymentToSaleDialogProps = Omit<\n ComponentProps,\n 'onSubmit'\n> & {\n onSubmit: (\n marketplacePaymentLineId: number,\n saleLineItems: SaleLineItem[]\n ) => void;\n marketplacePaymentLine: MarketplaceSaleLineItem;\n};\n\nexport type LinkMarketplacePaymentToSaleInput = {\n saleLineItems: SaleLineItem[] | null;\n marketplacePaymentLine: MarketplaceSaleLineItem;\n isCredit: boolean;\n};\n\nexport function LinkMarketplacePaymentToSaleDialog({\n onSubmit,\n onCancel,\n marketplacePaymentLine,\n ...dialogProps\n}: LinkMarketplacePaymentToSaleDialogProps) {\n const { loginContext } = useAppContext();\n const methods = useForm({\n defaultValues: {\n marketplacePaymentLine,\n },\n });\n\n const { watch, setValue } = methods;\n\n const {\n data: existingSaleLineItems,\n isLoading,\n isFetching,\n } = useGetSaleLineItemsBySaleId(marketplacePaymentLine.saleId);\n\n const isCredit =\n marketplacePaymentLine.type === MarketplacePaymentLineType.Credit;\n const costDialog = useBasicDialog();\n const saleLineItems = watch('saleLineItems');\n\n useEffect(() => {\n setValue('saleLineItems', existingSaleLineItems ?? null);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [existingSaleLineItems]);\n\n const onAddNewCostSave = useCallback(\n (item: SaleLineItem) => {\n // Only allow credit to be linked to credit and charge to be linked to charge\n if (isCredit && item.costType !== SaleCostType.Credit) {\n costDialog.closeDialog();\n }\n if (!isCredit && item.costType !== SaleCostType.Charge) {\n costDialog.closeDialog();\n }\n\n setValue('saleLineItems', [\n ...(saleLineItems ?? []),\n {\n ...item,\n saleId: marketplacePaymentLine.saleId!,\n marketplacePaymentLineId: marketplacePaymentLine.id,\n },\n ]);\n\n costDialog.closeDialog();\n },\n [\n costDialog,\n isCredit,\n marketplacePaymentLine.id,\n marketplacePaymentLine.saleId,\n saleLineItems,\n setValue,\n ]\n );\n\n const onAddNewCostCancel = useCallback(() => {\n costDialog.closeDialog();\n }, [costDialog]);\n\n const onAddNewCost = useCallback(() => {\n costDialog.launchDialog();\n }, [costDialog]);\n\n const saleLineItemsToLink = useMemo(\n () =>\n (saleLineItems ?? []).filter(\n (s) => s.marketplacePaymentLineId === marketplacePaymentLine.id\n ),\n [marketplacePaymentLine.id, saleLineItems]\n );\n\n const canSubmit = useMemo(\n () => saleLineItemsToLink.length > 0,\n [saleLineItemsToLink.length]\n );\n\n return (\n }\n footer={\n \n \n \n onSubmit(marketplacePaymentLine.id, saleLineItemsToLink)\n }\n disabled={!canSubmit}\n textContentId={ContentId.Link}\n />\n \n }\n {...dialogProps}\n >\n \n {isLoading || isFetching ? (\n \n ) : (\n \n \n \n \n \n \n \n \n \n \n {\n onAddNewCost();\n }}\n tabIndex={0}\n >\n \n \n \n \n )}\n {costDialog.dialogProps.isOpen && (\n \n )}\n \n \n );\n}\n\nfunction LinkMarketplacePaymentToSaleAmountDisplay() {\n const { watch } = useFormContext();\n const { getUiCurrency } = useLocalizationContext();\n\n const marketplacePaymentLine = watch('marketplacePaymentLine');\n const { remainingAmount } = useGetRemainingBalance();\n\n // Assuming marketplacePaymentLine and saleLineItems are in the same currency\n const uiCurrency = useMemo(\n () => getUiCurrency(marketplacePaymentLine.amt.currency),\n [getUiCurrency, marketplacePaymentLine.amt.currency]\n );\n\n return (\n \n \n \n \n \n

    \n {formatCurrency(remainingAmount, uiCurrency.code, uiCurrency.dec)}\n

    \n \n \n \n

    {marketplacePaymentLine.amt.disp}

    \n
    \n \n );\n}\n","import { useMutation } from '@tanstack/react-query';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { MarketplacePaymentClient } from 'src/WebApiController';\n\nexport function useLinkMarketplacePaymentLineToSale() {\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError, showErrorDialog } = useErrorBoundaryContext();\n\n return useMutation({\n mutationFn: async ({\n marketplacePaymentLineId,\n }: {\n marketplacePaymentLineId: number | undefined;\n }) => {\n if (!marketplacePaymentLineId) {\n return Promise.reject('Invalid parameters');\n }\n return await new MarketplacePaymentClient(\n activeAccountWebClientConfig\n ).unlinkMarketplacePaymentLine(marketplacePaymentLineId);\n },\n onError: (error: ErrorTypes, { marketplacePaymentLineId }, context) => {\n trackError(\n 'MarketplacePaymentClient.unlinkMarketplacePaymentLine',\n error,\n {\n marketplacePaymentLineId,\n }\n );\n showErrorDialog(\n 'MarketplacePaymentClient.unlinkMarketplacePaymentLine',\n error,\n {\n trackErrorData: { marketplacePaymentLineId },\n }\n );\n },\n });\n}\n","import React, { MutableRefObject, useImperativeHandle } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ConfirmDialog } from 'src/core/interim/dialogs/ConfirmDialog';\nimport { useLinkMarketplacePaymentLineToSale } from 'src/hooks/api/useUnlinkMarketplacePaymentLineToSale';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { LinkMarketplacePaymentLineRefActions } from 'src/tables/MarketplacePaymentLinesTable/Cell/LinkMarketplacePaymentLineToSale';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport * as styles from './UnlinkMarketplacePaymentLineToSaleDialog.css';\n\nexport interface UnlinkMarketplacePaymentLineRefActions {\n showDialog: () => void;\n}\n\nexport type UnlinkMarketplacePaymentLineToSaleDialogProps = {\n refActions: MutableRefObject;\n marketplacePaymentLineId: number;\n onUnlinkSuccess: () => void;\n};\n\nexport const UnlinkMarketplacePaymentLineToSaleDialog = ({\n refActions,\n marketplacePaymentLineId,\n onUnlinkSuccess,\n}: UnlinkMarketplacePaymentLineToSaleDialogProps) => {\n const { launchDialog, closeDialog, dialogProps } = useBasicDialog();\n\n const { isPending, mutateAsync } = useLinkMarketplacePaymentLineToSale();\n\n useImperativeHandle(\n refActions,\n () => {\n return {\n showDialog: launchDialog,\n };\n },\n [launchDialog]\n );\n\n if (!dialogProps.isOpen) {\n return null;\n }\n\n return (\n }\n bodyText={\n
    \n \n \n \n \n
    \n }\n okText={ContentId.Confirm}\n cancelText={ContentId.Cancel}\n {...dialogProps}\n isLoading={isPending}\n onOkay={async () => {\n await mutateAsync({ marketplacePaymentLineId });\n closeDialog();\n onUnlinkSuccess();\n }}\n size=\"l\"\n />\n );\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport {\n CatalogClient,\n CatalogResults,\n Sale,\n SaleClient,\n} from 'src/WebApiController';\n\nexport function useGetSaleByAmbiguousIdWithCatalogData(id?: string | null) {\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n return useQuery({\n queryKey: ['useGetSaleByAmbiguousIdWithCatalogData', id],\n async queryFn() {\n if (!id) return null;\n\n let sale: Sale | null = null;\n let catalog: CatalogResults | null = null;\n const saleId = Number(id);\n if (!isNaN(saleId)) {\n try {\n sale = await new SaleClient(\n activeAccountWebClientConfig\n ).getSaleBySaleId(saleId);\n } catch (err: unknown) {\n trackError('SaleClient.getSaleBySaleId', err as ErrorTypes, {\n saleId,\n });\n throw err;\n }\n }\n\n if (sale == null) {\n try {\n const sales = await new SaleClient(\n activeAccountWebClientConfig\n ).getSalesByMarketplaceSaleId(id);\n\n // there is rare chance there are multiple POS sale returned on the same marketplace sale id\n // return the first one as default for now\n if (sales != null && sales.length > 0) {\n sale = sales[0];\n }\n } catch (err: unknown) {\n trackError('SaleClient.getSaleBySaleId', err as ErrorTypes, {\n saleId,\n });\n throw err;\n }\n }\n\n if (sale == null) {\n return { sale, catalog };\n }\n\n try {\n catalog = await new CatalogClient(\n activeAccountWebClientConfig\n ).getCatalogForSaleBySaleId(sale.id);\n } catch (err: unknown) {\n trackError(\n 'CatalogClient.getCatalogForSaleBySaleId',\n err as ErrorTypes,\n {\n saleId,\n }\n );\n throw err;\n }\n return { sale, catalog };\n },\n refetchOnWindowFocus: false,\n });\n}\n","import { clsx } from 'clsx';\nimport { useEffect } from 'react';\nimport { MarketplaceLogo } from 'src/components/common/MarketplaceLogo';\nimport { SeatingInfo } from 'src/components/common/SeatingInfo';\nimport { EventInfo } from 'src/components/Events/EventInfo';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosLink } from 'src/core/POS/PosLink';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { Stack } from 'src/core/ui';\nimport { useGetSaleByAmbiguousIdWithCatalogData } from 'src/hooks/api/useGetSaleByAmbiguousIdWithCatalogData';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SALES_STATUS_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { getFormattedEventName } from 'src/utils/eventWithDataUtils';\nimport { getFormattedLocation } from 'src/utils/format';\nimport { getSaleDetailsRelativeUrl } from 'src/utils/saleUtils';\nimport { Sale } from 'src/WebApiController';\n\nimport * as styles from './SaleEventBox.css';\n\ninterface SaleEventBoxProps {\n lookupId: string | undefined | null;\n onSearchSaleChanged?: (sale: Sale | undefined | null) => void;\n}\n\nexport const SaleEventBox = ({\n lookupId,\n onSearchSaleChanged,\n}: SaleEventBoxProps) => {\n const { isLoading, data, isError } = useGetSaleByAmbiguousIdWithCatalogData(lookupId);\n\n useEffect(() => {\n if (isLoading || isError) {\n onSearchSaleChanged?.(undefined);\n }\n onSearchSaleChanged?.(data?.sale);\n }, [data?.sale, isError, isLoading, onSearchSaleChanged]);\n\n if (isLoading) {\n return ;\n }\n\n if (isError) {\n return (\n
    \n \n
    \n );\n }\n\n if (data) {\n const sale = data.sale;\n const eventId = sale?.viagEvId;\n const event = eventId && data.catalog?.events[eventId]?.event;\n const seating = sale?.seating;\n\n if (!eventId || !event || !sale) {\n return (\n
    \n \n
    \n );\n }\n\n const venue = data.catalog.venues[event.venueId];\n const performer = event.perfId\n ? data.catalog.performers[event.perfId]\n : undefined;\n\n const [eventName, eventNameConnector, eventSubName] = getFormattedEventName(\n {\n event,\n performer,\n venue,\n slimMode: false,\n }\n );\n\n const venueLocation = venue && getFormattedLocation(venue);\n\n return (\n \n
    \n \n
    \n {seating && (\n
    \n \n
    \n )}\n
    \n \n \n #{sale.idOnMkp}\n \n \n \n
    \n \n \n \n
    \n );\n }\n\n return null;\n};\n","import { useMutation } from '@tanstack/react-query';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { MarketplacePaymentClient } from 'src/WebApiController';\n\nexport function useLinkMarketplacePaymentLineToSale() {\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError, showErrorDialog } = useErrorBoundaryContext();\n\n return useMutation({\n mutationFn: async ({\n saleId,\n marketplacePaymentLineId,\n }: {\n saleId: number | undefined;\n marketplacePaymentLineId: number | undefined;\n }) => {\n if (!saleId || !marketplacePaymentLineId) {\n return Promise.reject('Invalid parameters');\n }\n return await new MarketplacePaymentClient(\n activeAccountWebClientConfig\n ).linkMarketplacePaymentLine(saleId, marketplacePaymentLineId);\n },\n onError: (\n error: ErrorTypes,\n { saleId, marketplacePaymentLineId },\n context\n ) => {\n trackError('MarketplacePaymentClient.linkMarketplacePaymentLine', error, {\n saleId,\n marketplacePaymentLineId,\n });\n showErrorDialog(\n 'MarketplacePaymentClient.linkMarketplacePaymentLine',\n error,\n {\n trackErrorData: { saleId, marketplacePaymentLineId },\n }\n );\n },\n });\n}\n","import React, { ComponentProps, useCallback, useState } from 'react';\nimport { useForm } from 'react-hook-form';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { Button } from 'src/core/ui';\nimport { SaleEventBox } from 'src/dialogs/LinkMarketplacePaymentLineDialog/SaleEventBox/SaleEventBox';\nimport { useLinkMarketplacePaymentLineToSale } from 'src/hooks/api/useLinkMarketplacePaymentLineToSale';\nimport { FieldWrapper } from 'src/modals/common';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Sale } from 'src/WebApiController';\n\nexport type LinkMarketplacePaymentLineToSaleDialogProps = Omit<\n ComponentProps,\n 'header' | 'footer'\n> & {\n onCancel: () => void;\n marketplacePaymentLineId: number | undefined;\n onLinkSuccess: () => void;\n};\n\ntype LinkMarketplacePaymentLineToSaleForm = {\n lookupId: string | null; // can be either marketplace sale id or pos sale id\n saleId: number | null; // pos sale id\n marketplacePaymentLineId: number;\n};\n\nexport const LinkMarketplacePaymentLineToSaleDialog = ({\n onCancel,\n payment,\n marketplacePaymentLineId,\n closeDialog,\n onLinkSuccess,\n ...dialogProps\n}: LinkMarketplacePaymentLineToSaleDialogProps) => {\n const requiredMsg = useContent(ContentId.Required);\n const [existsSaleId, setExistsSaleId] = useState(false);\n const [posSaleIdToLink, setPosSaleIdToLink] = useState();\n\n const { register, formState, handleSubmit, trigger, getValues, watch } =\n useForm({\n defaultValues: {\n lookupId: null,\n saleId: null,\n marketplacePaymentLineId,\n },\n });\n\n const { mutateAsync, isPending } = useLinkMarketplacePaymentLineToSale();\n\n const lookupId = watch('lookupId');\n\n const onSubmit = useCallback(async () => {\n const hasErrors = Object.keys(formState.errors).length > 0;\n if (hasErrors || !existsSaleId) {\n return;\n }\n const { marketplacePaymentLineId } = getValues();\n\n await mutateAsync({\n saleId: posSaleIdToLink ?? undefined,\n marketplacePaymentLineId,\n });\n closeDialog();\n onLinkSuccess();\n }, [\n closeDialog,\n existsSaleId,\n formState.errors,\n getValues,\n mutateAsync,\n onLinkSuccess,\n ]);\n\n const onSearchSaleChanged = useCallback(\n (saleDetails: Sale | undefined | null) => {\n setExistsSaleId(!!saleDetails);\n setPosSaleIdToLink(saleDetails?.id)\n },\n []\n );\n\n return (\n
    \n }\n footer={\n {\n await trigger();\n await handleSubmit(onSubmit)();\n }}\n >\n \n \n }\n onCancel={onCancel}\n >\n {isPending ? (\n \n ) : (\n <>\n \n }\n errors={formState.errors.saleId?.message}\n >\n \n \n \n \n\n {!!lookupId && (\n \n )}\n \n )}\n \n \n );\n};\n","import { MutableRefObject, useImperativeHandle } from 'react';\nimport { LinkMarketplacePaymentLineToSaleDialog } from 'src/dialogs/LinkMarketplacePaymentLineDialog/LinkMarketplacePaymentLineToSaleDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\n\nexport interface LinkMarketplacePaymentLineRefActions {\n showDialog: () => void;\n}\n\ninterface LinkMarketplacePaymentLineToSaleProps {\n refActions: MutableRefObject;\n marketplacePaymentLineId: number;\n onLinkSuccess: () => void;\n}\n\nexport const LinkMarketplacePaymentLineToSale = ({\n refActions,\n marketplacePaymentLineId,\n onLinkSuccess,\n}: LinkMarketplacePaymentLineToSaleProps) => {\n const { launchDialog, dialogProps, closeDialog } = useBasicDialog();\n\n useImperativeHandle(\n refActions,\n () => {\n return {\n showDialog: launchDialog,\n };\n },\n [launchDialog]\n );\n\n if (!dialogProps.isOpen) {\n return null;\n }\n\n return (\n \n );\n};\n","import { useQueryClient } from '@tanstack/react-query';\nimport { ReactNode, useCallback, useRef, useState } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { GET_PAYMENT_LINES_WITH_SALES_QUERY_KEY } from 'src/contexts/MarketplacePaymentDataContext';\nimport { useConfirmDialog } from 'src/core/interim/dialogs/ConfirmDialog/useConfirmDialog';\nimport { PosDropdown, PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { LinkMarketplacePaymentToSaleDialog } from 'src/dialogs/LinkMarketplacePaymentToSaleDialog';\nimport { UnlinkMarketplacePaymentLineToSaleDialog } from 'src/dialogs/UnlinkMarketplacePaymentLineDialog/UnlinkMarketplacePaymentLineToSaleDialog';\nimport { MarketplacePaymentLineWithSaleAndEventInfo } from 'src/hooks/useGetMarketplacePaymentLineTableData';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { CheckIcon, IconsFill, MoreIcon } from 'src/svgs/Viagogo';\nimport {\n LinkMarketplacePaymentLineRefActions,\n LinkMarketplacePaymentLineToSale,\n} from 'src/tables/MarketplacePaymentLinesTable/Cell/LinkMarketplacePaymentLineToSale';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n Feature,\n MarketplacePaymentClient,\n MarketplacePaymentLineType,\n SaleLineItem,\n} from 'src/WebApiController';\n\nexport function MarketplacePaymentLinesActionsCell({\n marketplacePaymentLine,\n}: {\n marketplacePaymentLine: MarketplacePaymentLineWithSaleAndEventInfo;\n}) {\n const linkActionsRef = useRef(\n null\n );\n const unlinkActionsRef = useRef(\n null\n );\n const { activeAccountWebClientConfig } = useAppContext();\n const queryClient = useQueryClient();\n const hasAddMarketplaceChargeCreditToSaleFeature = useUserHasFeature(\n Feature.AddMarketplaceChargeCreditToSale\n );\n\n const refreshData = useCallback(async () => {\n queryClient.invalidateQueries({\n queryKey: [GET_PAYMENT_LINES_WITH_SALES_QUERY_KEY],\n });\n }, [queryClient]);\n\n const actionsMsg = useContent(ContentId.Actions);\n const addedToSaleMsg = useContent(ContentId.AddedToSale);\n const [isLoading, setIsLoading] = useState(false);\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const userHasLinkPaymentLineFeature = useUserHasFeature(\n Feature.LinkPaymentLine\n );\n const canLinkPaymentLine =\n userHasLinkPaymentLineFeature && !marketplacePaymentLine.saleId;\n\n const canUnlinkMarketplaceLine =\n userHasLinkPaymentLineFeature && !!marketplacePaymentLine.saleId;\n\n const canManuallyAddToSale =\n hasAddMarketplaceChargeCreditToSaleFeature &&\n marketplacePaymentLine.saleId != null &&\n (marketplacePaymentLine.type === MarketplacePaymentLineType.Credit ||\n marketplacePaymentLine.type === MarketplacePaymentLineType.Charge);\n\n const isAddedToSale = marketplacePaymentLine?.isAddedToSale ?? false;\n\n const {\n openConfirmDialog: openRemoveFromSaleDialog,\n closeConfirmDialog: closeRemoveFromSaleDialog,\n } = useConfirmDialog();\n\n const { openDialog: openAddToSaleDialog, closeDialog: closeAddToSaleDialog } =\n useDialog(\n DialogId.AddMarketplacePaymentLineToSale,\n LinkMarketplacePaymentToSaleDialog\n );\n\n const marketplacePaymentLineId = marketplacePaymentLine.id;\n\n const onRemoveFromSale = useCallback(() => {\n closeRemoveFromSaleDialog();\n\n setIsLoading(true);\n tryInvokeApi(\n async () => {\n await new MarketplacePaymentClient(\n activeAccountWebClientConfig\n ).removeMarketplacePaymentLineFromSaleLineItems(\n marketplacePaymentLineId!\n );\n\n refreshData();\n },\n (error) => {\n showErrorDialog(\n 'MarketplacePaymentClient.removeMarketplacePaymentLineFromSaleLineItems',\n error,\n {\n trackErrorData: { marketplacePaymentLineId },\n }\n );\n },\n () => {\n setIsLoading(false);\n }\n );\n }, [\n activeAccountWebClientConfig,\n closeRemoveFromSaleDialog,\n marketplacePaymentLineId,\n refreshData,\n showErrorDialog,\n ]);\n\n const onSubmitAddToSale = useCallback(\n (marketplacePaymentLineId: number, saleLineItems: SaleLineItem[]) => {\n closeAddToSaleDialog();\n setIsLoading(true);\n tryInvokeApi(\n async () => {\n await new MarketplacePaymentClient(\n activeAccountWebClientConfig\n ).addMarketplacePaymentLineToSaleLineItems(\n marketplacePaymentLineId,\n saleLineItems\n );\n refreshData();\n },\n (error) => {\n showErrorDialog(\n 'MarketplacePaymentClient.addMarketplacePaymentLineToSaleLineItems',\n error,\n {\n trackErrorData: { marketplacePaymentLineId },\n }\n );\n },\n () => {\n setIsLoading(false);\n }\n );\n },\n [\n activeAccountWebClientConfig,\n closeAddToSaleDialog,\n refreshData,\n showErrorDialog,\n ]\n );\n\n const dropdownItems: ReactNode[] = [];\n\n if (canManuallyAddToSale) {\n dropdownItems.push(\n <>\n {isAddedToSale ? (\n \n openRemoveFromSaleDialog({\n size: 'm',\n headerText: ,\n bodyText: ,\n onOkay: onRemoveFromSale,\n onCancel: closeRemoveFromSaleDialog,\n okText: ContentId.Yes,\n cancelText: ContentId.No,\n })\n }\n >\n \n \n \n \n ) : (\n {\n openAddToSaleDialog({\n marketplacePaymentLine,\n onSubmit: onSubmitAddToSale,\n onClosed: () => {\n setIsLoading(false);\n },\n onCancel: closeAddToSaleDialog,\n });\n }}\n >\n \n \n \n \n )}\n \n );\n }\n\n if (canLinkPaymentLine) {\n dropdownItems.push(\n linkActionsRef.current?.showDialog()}\n >\n \n \n );\n } else if (canUnlinkMarketplaceLine) {\n dropdownItems.push(\n unlinkActionsRef.current?.showDialog()}\n >\n \n \n );\n }\n\n return (\n \n {isAddedToSale && (\n \n )}\n {dropdownItems.length > 0 && (\n \n \n \n }\n align=\"end\"\n >\n {...dropdownItems}\n \n )}\n {canLinkPaymentLine && (\n \n )}\n {canUnlinkMarketplaceLine && (\n \n )}\n \n );\n}\n","import { ColumnDef } from '@tanstack/react-table';\nimport { useMemo } from 'react';\nimport { SeatingInfo } from 'src/components/common/SeatingInfo';\nimport { EventInfo } from 'src/components/Events/EventInfo';\nimport {\n COLUMN_DEFAULT_SIZE_BASE,\n COLUMN_DEFAULT_SIZE_LG,\n COLUMN_DEFAULT_SIZE_SM,\n COLUMN_MAX_SIZE,\n COLUMN_MIN_SIZE,\n} from 'src/contexts/ColumnResizingContext/ColumnResizingContext.types';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosLink } from 'src/core/POS/PosLink';\nimport { Stack } from 'src/core/ui';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { TableHeaderCellDiv } from 'src/core/ui/TableHeaderCellDiv';\nimport { MarketplacePaymentLineWithSaleAndEventInfo } from 'src/hooks/useGetMarketplacePaymentLineTableData';\nimport { SHIMMERING_DIV_HEIGHT_PAYMENTS } from 'src/tables/MarketplacePaymentLinesTable/MarketplacePaymentLinesTableCommon.constants';\nimport { TableShimmeringDiv } from 'src/tables/Table';\nimport { MarketplacePaymentLinesTableColumnId } from 'src/utils/columns/marketplacePaymentLines/marketplacePaymentLinesColumnsUtils.types';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { MARKETPLACE_PAYMENT_LINE_TYPE_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { getFormattedEventName } from 'src/utils/eventWithDataUtils';\nimport { getFormattedLocation } from 'src/utils/format';\nimport {\n getSaleDetailsRelativeUrl,\n getSaleStatusDisplayContentId,\n} from 'src/utils/saleUtils';\nimport {\n sortMarketplacePaymentLineSeating,\n sortMoney,\n} from 'src/utils/tableUtils';\nimport {\n MarketplacePaymentLineType,\n PointOfSaleSaleStatus,\n Seating,\n UiMoney,\n} from 'src/WebApiController';\n\nimport { MarketplacePaymentLinesActionsCell } from './Cell/MarketplacePaymentLinesActionsCell';\n\nexport const useMarketplacePaymentLinesTableColumnsConfig = () => {\n return useMemo<\n Record<\n MarketplacePaymentLinesTableColumnId,\n ColumnDef\n >\n >(() => {\n return {\n [MarketplacePaymentLinesTableColumnId.Id]: {\n id: MarketplacePaymentLinesTableColumnId.Id,\n accessorFn: (data) => data?.extLineId,\n header: (params) => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_DEFAULT_SIZE_SM,\n maxSize: COLUMN_DEFAULT_SIZE_LG,\n cell: ({ getValue, row: { original } }) => {\n if (!original) {\n return (\n \n );\n }\n\n const paymentLineId = getValue();\n return (\n \n {paymentLineId}\n \n );\n },\n },\n [MarketplacePaymentLinesTableColumnId.Paid]: {\n id: MarketplacePaymentLinesTableColumnId.Paid,\n accessorFn: (data) => data?.amt,\n header: (params) => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_SM,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ getValue, row: { original } }) => {\n if (!original) {\n return (\n \n );\n }\n const amount = getValue();\n\n if (!amount) {\n return null;\n }\n\n return (\n \n {amount.disp}\n \n );\n },\n sortingFn: sortMoney,\n },\n [MarketplacePaymentLinesTableColumnId.Type]: {\n id: MarketplacePaymentLinesTableColumnId.Type,\n accessorFn: (data) => data?.type,\n header: (params) => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_DEFAULT_SIZE_SM,\n maxSize: COLUMN_DEFAULT_SIZE_LG,\n cell: ({ getValue, row: { original } }) => {\n if (!original) {\n return (\n \n );\n }\n\n const paymentType = getValue();\n return (\n \n \n \n );\n },\n },\n [MarketplacePaymentLinesTableColumnId.Event]: {\n id: MarketplacePaymentLinesTableColumnId.Event,\n accessorFn: (data) => data,\n header: (params) => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_DEFAULT_SIZE_LG,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ getValue, row: { original } }) => {\n if (!original) {\n return (\n \n );\n }\n\n const paymentLine =\n getValue();\n const { event, venue } = paymentLine ?? {};\n\n if (!event) {\n return null;\n }\n\n const [eventName, eventNameConnector, eventSubName] =\n getFormattedEventName({\n event,\n performer: null,\n venue,\n slimMode: false,\n });\n\n const venueLocation = venue && getFormattedLocation(venue);\n\n return (\n \n \n \n );\n },\n },\n [MarketplacePaymentLinesTableColumnId.Seating]: {\n id: MarketplacePaymentLinesTableColumnId.Seating,\n accessorFn: (data) => data?.seating,\n header: (params) => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_SM,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ getValue, row: { original } }) => {\n if (!original) {\n return (\n \n );\n }\n const seating = getValue();\n\n if (!seating) {\n return null;\n }\n\n return (\n \n \n \n );\n },\n sortingFn: sortMarketplacePaymentLineSeating,\n },\n [MarketplacePaymentLinesTableColumnId.Sale]: {\n id: MarketplacePaymentLinesTableColumnId.Sale,\n accessorFn: (data) => data?.extSaleId,\n header: (params) => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_SM,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ getValue, row: { original } }) => {\n if (!original) {\n return (\n \n );\n }\n const extSaleId = getValue();\n\n if (!extSaleId) {\n return null;\n }\n\n return (\n \n \n {original.saleId != null ? (\n \n #{extSaleId}\n \n ) : (\n #{extSaleId}\n )}\n {original.marketplace}\n \n \n );\n },\n },\n [MarketplacePaymentLinesTableColumnId.SaleStatus]: {\n id: MarketplacePaymentLinesTableColumnId.SaleStatus,\n accessorFn: (data) => data?.saleStatus,\n header: (params) => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_SM,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ getValue, row: { original } }) => {\n if (!original) {\n return (\n \n );\n }\n const saleStatus = getValue();\n\n if (!saleStatus) {\n return null;\n }\n\n return (\n \n \n \n );\n },\n },\n [MarketplacePaymentLinesTableColumnId.Actions]: {\n id: MarketplacePaymentLinesTableColumnId.Actions,\n accessorFn: (data) => data?.id,\n enableSorting: false,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_SM,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ getValue, row: { original } }) => {\n const marketplacePaymentLineId = getValue();\n\n if (!original) {\n return (\n \n );\n }\n\n if (marketplacePaymentLineId == null) {\n return null;\n }\n\n return (\n \n \n \n );\n },\n },\n };\n }, []);\n};\n","import {\n functionalUpdate,\n SortingState,\n TableOptions,\n} from '@tanstack/react-table';\nimport { useMemo, useState } from 'react';\nimport { MinRowsForUsingVirtuoso } from 'src/components/Accordions';\nimport { ColumnResizingContextProvider } from 'src/contexts/ColumnResizingContext/ColumnResizingContext';\nimport { MarketplacePaymentLineWithSaleAndEventInfo } from 'src/hooks/useGetMarketplacePaymentLineTableData';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { useMarketplacePaymentLinesTableColumnsConfig } from 'src/tables/MarketplacePaymentLinesTable/useMarketplacePaymentLinesTableColumnsConfig';\nimport { Table } from 'src/tables/Table';\nimport { MarketplacePaymentLinesTableColumnId } from 'src/utils/columns/marketplacePaymentLines/marketplacePaymentLinesColumnsUtils.types';\nimport { Feature } from 'src/WebApiController';\n\nconst getRowId = (\n row: MarketplacePaymentLineWithSaleAndEventInfo | null,\n index: number\n) => (row?.id ?? index).toString();\n\ninterface PaymentsTableProps {\n tableData: MarketplacePaymentLineWithSaleAndEventInfo[] | null;\n}\n\nexport const MarketplacePaymentLinesTable = ({\n tableData,\n}: PaymentsTableProps) => {\n const paymentsTableColumnConfig =\n useMarketplacePaymentLinesTableColumnsConfig();\n const [sorting, setSorting] = useState([]);\n const hasTablePinActionColumnFeature = useUserHasFeature(\n Feature.TablePinActionColumn\n );\n\n const options: Partial<\n TableOptions\n > = useMemo(\n () => ({\n data: tableData ?? [],\n columns: Object.values(paymentsTableColumnConfig),\n state: {\n sorting,\n columnPinning: {\n right: hasTablePinActionColumnFeature\n ? [MarketplacePaymentLinesTableColumnId.Actions]\n : undefined,\n },\n },\n getRowId: getRowId,\n onSortingChange: (sortingUpdaterFn) => {\n const newSortVal = functionalUpdate(sortingUpdaterFn, sorting);\n setSorting(newSortVal);\n },\n sortingFns: {},\n }),\n [\n tableData,\n paymentsTableColumnConfig,\n sorting,\n hasTablePinActionColumnFeature,\n ]\n );\n\n return (\n \n MinRowsForUsingVirtuoso)\n }\n usePaginationFooter={false}\n roundBorders={true}\n />\n \n );\n};\n","import * as EmptySectionContent from 'src/components/common/EmptySectionContent';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { useGetMarketplacePaymentById } from 'src/hooks/api/useGetMarketplacePaymentById';\nimport { useGetMarketplacePaymentLineTableData } from 'src/hooks/useGetMarketplacePaymentLineTableData';\nimport { MarketplacePaymentHeaderDetails } from 'src/modals/MaketplacePayments/MarketplacePaymentHeaderDetails';\nimport { SearchSolidIcon } from 'src/svgs/Viagogo';\nimport { MarketplacePaymentLinesTable } from 'src/tables/MarketplacePaymentLinesTable/MarketplacePaymentLinesTable';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SomethingWentWrong } from 'src/views';\n\ninterface MarketplacePaymentsDetailsModalBodyProps {\n marketplacePaymentId: number | undefined;\n}\n\nexport const MarketplacePaymentsDetailsModalBody = ({\n marketplacePaymentId,\n}: MarketplacePaymentsDetailsModalBodyProps) => {\n const {\n isLoading: isLoadingTableData,\n error,\n data,\n } = useGetMarketplacePaymentLineTableData(marketplacePaymentId);\n\n const { data: marketplacePayment, isLoading: isLoadingMarketplacePayment } =\n useGetMarketplacePaymentById(marketplacePaymentId);\n\n const hasData = !!data?.length;\n\n const isLoading = isLoadingTableData || isLoadingMarketplacePayment;\n\n return (\n <>\n {isLoading && }\n {error && (\n }\n />\n )}\n {!isLoading && !error && (\n <>\n {marketplacePayment && (\n \n )}\n {hasData ? (\n <>\n \n \n ) : (\n \n \n \n }\n >\n \n \n \n \n )}\n \n )}\n \n );\n};\n","import { useGetMarketplacePaymentIdQueryParam } from 'src/components/MarketplacePayments/hooks/useGetMarketplacePaymentIdQueryParam';\nimport { Content } from 'src/contexts/ContentContext';\nimport { CancellableFormHeader } from 'src/modals/common/CancellableFormHeader';\nimport { EventEntityHeader } from 'src/modals/common/EventEntityHeader';\nimport { MarketplacePaymentsDetailsModalBody } from 'src/modals/MaketplacePayments/MarketplacePaymentsDetailsModalBody';\nimport {\n ModalBody,\n ModalBodyDataContainer,\n} from 'src/modals/Modal/Modal.styled';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nexport const MarketplacePaymentsDetailsModal = () => {\n const marketplacePaymentId = useGetMarketplacePaymentIdQueryParam();\n return (\n \n \n } />\n \n \n \n \n \n );\n};\n","import { MarketplacePaymentsDetailsModal } from 'src/modals/MaketplacePayments/MarketplacePaymentsDetailsModal';\nimport { MarketplacePaymentIdDeeplinkQueryParam } from 'src/utils/constants/constants';\n\nexport const MarketplacePaymentsDetails = {\n children: ,\n clickOutsideToClose: true,\n deepLinkKey: MarketplacePaymentIdDeeplinkQueryParam,\n deepLinkValue: undefined,\n size: 'slide-in',\n};\n","import { MarketplacePaymentsDetails } from 'src/modals/MaketplacePayments';\nimport { ModalProps } from 'src/modals/Modal';\nimport { MainRoute } from 'src/navigations/Routes/MainRoute';\nimport { MarketplacePaymentIdDeeplinkQueryParam } from 'src/utils/constants/constants';\nimport { getPathFromMainRoute } from 'src/utils/deepLinkUtils';\n\nexport const getMarketplacePaymentRelativeUrl = (\n marketplacePaymentId: number\n) => {\n return `${getPathFromMainRoute(\n MainRoute.Payments\n )}?${MarketplacePaymentIdDeeplinkQueryParam}=${marketplacePaymentId}`;\n};\n\nexport const getMarketplacePaymentDetailsModalConfigWithDeepLink = (\n marketplacePaymentId: number\n): ModalProps => {\n return {\n ...MarketplacePaymentsDetails,\n deepLinkValue: marketplacePaymentId,\n };\n};\n","import { clsx } from 'clsx';\nimport { formatInTimeZone } from 'date-fns-tz';\nimport { useCallback, useMemo, useRef } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { IconButton } from 'src/components/Buttons';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useSiteTimezoneContext } from 'src/contexts/SiteTimezoneContext/SiteTimezoneContext';\nimport { PosLink } from 'src/core/POS/PosLink';\nimport { vars } from 'src/core/themes';\nimport { Button, SimpleTable, Stack } from 'src/core/ui';\nimport { Detail, DetailGroup } from 'src/modals/common';\nimport * as styles from 'src/modals/SaleDetails/components/MarketplacePaymentSection/MarketplacePaymentSection.css';\nimport {\n SetMarketplaceCharge,\n SetMarketplaceChargeActions,\n} from 'src/modals/SaleDetails/components/MarketplacePaymentSection/SetMarketplaceCharge';\nimport { DeleteIcon, EditIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n MARKETPLACE_PAYMENT_LINE_TYPE_TO_CID,\n MARKETPLACE_SALE_PAYMENT_STATE_TO_CID,\n} from 'src/utils/constants/contentIdMaps';\nimport { stringToUtcDate } from 'src/utils/dateTimeUtils';\nimport { getLocaleFromLanguageOrCurrent } from 'src/utils/localeUtils';\nimport { getMarketplacePaymentRelativeUrl } from 'src/utils/marketplacePaymentUtils';\nimport { formatCurrency } from 'src/utils/numberFormatter';\nimport { addMoneySameCurrency } from 'src/utils/ticketMetricUtils';\nimport {\n MarketplacePaymentState,\n SaleDetails,\n SaleInput,\n SiteMarketplacePaymentLineInput,\n UiMoney,\n} from 'src/WebApiController';\n\ninterface MarketplacePaymentProps {\n sale: SaleDetails;\n canManageMarketplacePayment: boolean;\n}\n\nexport const MarketplacePaymentLines = ({\n sale,\n canManageMarketplacePayment,\n}: MarketplacePaymentProps) => {\n const setMarketplaceChargeActions =\n useRef(null);\n const { timeZone } = useSiteTimezoneContext();\n const { watch, formState } = useFormContext();\n const marketplacePaymentLines = watch('marketplacePaymentLines');\n const marketplacePaymentLinesFormFieldDirty =\n !!formState.dirtyFields.marketplacePaymentLines;\n\n const formatDateCell = useCallback(\n (date: string | null) => {\n return (\n date &&\n formatInTimeZone(stringToUtcDate(date), timeZone, 'MMM d, yyyy', {\n locale: getLocaleFromLanguageOrCurrent(),\n })\n );\n },\n [timeZone]\n );\n\n const allMkpLinesHaveSameCurrency = useMemo(() => {\n const currencies = new Set();\n const saleMkpLines = sale?.mkpLines ?? [];\n saleMkpLines.forEach((line) => {\n if (line.amt.currency) {\n currencies.add(line.amt.currency);\n }\n });\n return currencies.size <= 1;\n }, [sale]);\n\n const mkpLinesTotal = useMemo(() => {\n if (!marketplacePaymentLinesFormFieldDirty) {\n return sale?.mkpLinesTotal?.disp;\n }\n\n if (allMkpLinesHaveSameCurrency) {\n const saleMkpLines = sale?.mkpLines ?? [];\n let total: UiMoney | null = null;\n const exampleUiMoney = saleMkpLines.find((line) => !!line.amt.currency)\n ?.amt;\n marketplacePaymentLines?.value?.forEach((line) => {\n const money: UiMoney = {\n amt: line.amount,\n disp: null,\n currency: exampleUiMoney?.currency ?? null,\n dec: exampleUiMoney?.dec ?? 2,\n };\n total = addMoneySameCurrency(total, money);\n });\n\n if (!total) {\n return undefined;\n }\n\n const totalDisplay = (total as UiMoney | null)?.disp;\n if (!totalDisplay) {\n const { amt, currency, dec } = total as UiMoney;\n return formatCurrency(amt, currency, dec);\n }\n\n return totalDisplay;\n }\n\n // Different currencies, don't show anything\n return undefined;\n }, [\n marketplacePaymentLinesFormFieldDirty,\n allMkpLinesHaveSameCurrency,\n sale,\n marketplacePaymentLines?.value,\n ]);\n\n return (\n <>\n \n \n \n {canManageMarketplacePayment && (\n \n setMarketplaceChargeActions.current?.addNewMarketplacePaymentLine()\n }\n >\n \n \n )}\n \n }\n detail={\n <>\n {Boolean(marketplacePaymentLines?.value?.length) && (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {canManageMarketplacePayment && (\n \n \n \n )}\n \n \n \n {marketplacePaymentLines?.value?.map(\n (\n marketplacePaymentLine: SiteMarketplacePaymentLineInput\n ) => {\n const {\n externalPaymentId,\n externalPaymentLineId,\n paymentLineType,\n amount,\n currency,\n externalSaleId,\n paymentDate,\n marketplacePaymentId,\n } = marketplacePaymentLine;\n\n const state =\n sale.mkpLines?.find(\n (mkPayment) =>\n mkPayment.extLineId === externalPaymentLineId\n )?.state || MarketplacePaymentState.Paid;\n return (\n \n \n {marketplacePaymentId ? (\n \n {externalPaymentId}\n \n ) : (\n <>{externalPaymentId}\n )}\n \n \n {externalPaymentLineId}\n \n \n {formatCurrency(amount, currency)}\n \n \n \n \n \n \n \n \n {formatDateCell(paymentDate)}\n \n\n {canManageMarketplacePayment && (\n \n \n \n }\n onClick={() => {\n setMarketplaceChargeActions.current?.editNewMarketplacePaymentLine(\n marketplacePaymentLine\n );\n }}\n titleContentId={ContentId.Edit}\n />\n \n }\n onClick={() => {\n setMarketplaceChargeActions.current?.removeNewMarketplacePaymentLine(\n marketplacePaymentLine.externalPaymentLineId\n );\n }}\n titleContentId={ContentId.Edit}\n />\n \n \n )}\n \n );\n }\n )}\n {mkpLinesTotal && (\n \n \n \n \n \n \n {mkpLinesTotal}\n \n \n \n \n )}\n \n \n )}\n \n }\n />\n\n \n \n \n );\n};\n","import { MarketplacePaymentStatePill } from 'src/components/common/MarketplacePaymentStatePill/MarketplacePaymentStatePill';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Stack } from 'src/core/ui';\nimport { useHasSaleDetailsMarketplaceTermsFeature } from 'src/hooks/features/useHasSaleDetailsMarketplaceTermsFeature';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { Detail, DetailGroup } from 'src/modals/common';\nimport { MarketplacePaymentLines } from 'src/modals/SaleDetails/components/MarketplacePaymentSection/MarketplacePaymentLines';\nimport { useHasPaymentsSectionsV2Feature } from 'src/modals/SaleDetails/hooks/useHasPaymentsSectionsV2Feature';\nimport { useShouldHideForWastedSale } from 'src/modals/SaleDetails/hooks/useShouldHideForWastedSale';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n MARKETPLACE_SALE_PAYMENT_STATE_TO_CID,\n SALE_PAYMENT_STATE_TO_CID,\n SALES_STATUS_TO_CID,\n} from 'src/utils/constants/contentIdMaps';\nimport { Feature, Permission, SaleDetails } from 'src/WebApiController';\n\nimport * as styles from './MarketplacePaymentSection.css';\n\nexport const MarketplacePaymentSection = ({\n sale,\n}: {\n sale?: SaleDetails | null;\n}) => {\n const hasMarketplacePaymentLinesDisplayFeature = useUserHasFeature(\n Feature.MarketplacePaymentLinesDisplay\n );\n const hasManageMarketplacePaymentFeature = useUserHasFeature(\n Feature.ManageMarketplacePayment\n );\n\n const hasViewMarketplacePaymentLinesPermission = useUserHasAnyOfPermissions(\n Permission.Accounting_ViewAll,\n Permission.Accounting_ViewPaymentsOnSale\n );\n\n const canViewMarketplacePaymentLines =\n hasViewMarketplacePaymentLinesPermission &&\n (hasMarketplacePaymentLinesDisplayFeature ||\n hasManageMarketplacePaymentFeature);\n\n const hasPaymentsSectionsV2Feature = useHasPaymentsSectionsV2Feature();\n const hasSaleDetailsMarketplaceTermsFeature =\n useHasSaleDetailsMarketplaceTermsFeature();\n\n const hideForWastedSale = useShouldHideForWastedSale(sale);\n\n return (\n \n \n {hideForWastedSale && sale?.status && (\n }\n detail={}\n />\n )}\n {!hasSaleDetailsMarketplaceTermsFeature && (\n }\n detail={\n \n {sale?.mkpPmtState ? (\n <>\n {hasPaymentsSectionsV2Feature ? (\n \n ) : (\n \n )}\n \n ) : sale?.pmtState ? (\n <>\n {hasPaymentsSectionsV2Feature ? (\n \n ) : (\n \n )}\n \n ) : null}\n \n }\n />\n )}\n \n {canViewMarketplacePaymentLines && sale && (\n \n )}\n \n );\n};\n","import { MarketplacePaymentStatePill } from 'src/components/common/MarketplacePaymentStatePill/MarketplacePaymentStatePill';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Stack } from 'src/core/ui';\nimport { Detail } from 'src/modals/common';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { MARKETPLACE_PAYMENT_TERM_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport {\n MarketplacePaymentState,\n MarketplacePaymentTerm,\n} from 'src/WebApiController';\n\ninterface MarketplacePaymentTermsProps {\n marketplacePaymentTerm: MarketplacePaymentTerm | null | undefined;\n marketplacePaymentState: MarketplacePaymentState | null | undefined;\n}\n\nexport const MarketplacePaymentTerms = ({\n marketplacePaymentTerm,\n marketplacePaymentState,\n}: MarketplacePaymentTermsProps) => {\n if (!marketplacePaymentTerm || !marketplacePaymentState) {\n return null;\n }\n\n return (\n
    \n \n }\n detail={\n \n }\n />\n }\n detail={\n \n }\n />\n \n
    \n );\n};\n","import { clsx } from 'clsx';\nimport { formatInTimeZone } from 'date-fns-tz';\nimport { useCallback, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { IconButton } from 'src/components/Buttons';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useSiteTimezoneContext } from 'src/contexts/SiteTimezoneContext/SiteTimezoneContext';\nimport { PosLink } from 'src/core/POS/PosLink';\nimport { vars } from 'src/core/themes';\nimport { SimpleTable, Stack, Switch } from 'src/core/ui';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { DeleteIcon, EditIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n SALE_LINE_ITEM_CHARGE_REASON_TO_CID,\n SALE_LINE_ITEM_CREDIT_REASON_TO_CID,\n} from 'src/utils/constants/contentIdMaps';\nimport { stringToUtcDate } from 'src/utils/dateTimeUtils';\nimport { getLocaleFromLanguageOrCurrent } from 'src/utils/localeUtils';\nimport { getMarketplacePaymentRelativeUrl } from 'src/utils/marketplacePaymentUtils';\nimport { formatCurrency } from 'src/utils/numberFormatter';\nimport {\n Feature,\n MarketplacePaymentLineType,\n Permission,\n SaleCostType,\n SaleDetails,\n SaleInput,\n SaleLineItem,\n} from 'src/WebApiController';\n\nimport * as tableStyles from '../../../SaleDetailsTable.css';\nimport * as styles from './PaymentSectionTable.css';\n\ninterface PaymentSectionTableProps {\n sale: SaleDetails;\n lineItems: SaleLineItem[] | null | undefined;\n onEditSaleLineItem: (lineItem: SaleLineItem) => void;\n onDeleteSaleLineItem: (lineItem: SaleLineItem) => void;\n onPaymentReceivedToggleClicked: () => void;\n onSaleLineItemPaymentReceivedToggleClicked: (lineItem: SaleLineItem) => void;\n hidePartsForWastedSale: boolean;\n}\n\nexport const PaymentSectionTable = ({\n sale,\n lineItems,\n onEditSaleLineItem,\n onDeleteSaleLineItem,\n onPaymentReceivedToggleClicked,\n onSaleLineItemPaymentReceivedToggleClicked,\n hidePartsForWastedSale,\n}: PaymentSectionTableProps) => {\n const { timeZone } = useSiteTimezoneContext();\n const { watch } = useFormContext();\n const paymentReceived = watch('paymentReceived')?.value ?? false;\n const paymentReferenceId = watch('paymentReferenceId')?.value ?? '';\n const lastPaymentDate = watch('lastPaymentDate')?.value;\n const marketplacePaymentLines = watch('marketplacePaymentLines')?.value;\n const hasEditSaleLineItemsFeature = useUserHasFeature(\n Feature.SaleEditChargesAndCredits\n );\n\n const hasTotalNetProceedsPermissions = useUserHasAnyOfPermissions(\n Permission.Sales_ViewProceeds,\n Permission.Sales_ViewRecentProceeds\n );\n\n let originalProceeds = null;\n if (sale.ttlNetProcs && sale.mkpSaleTtlNetProcs) {\n if (sale.ttlNetProcs.currency !== sale.mkpSaleTtlNetProcs.currency) {\n originalProceeds = `(${sale.mkpSaleTtlNetProcs.disp})`;\n }\n }\n\n const totalProfitAmount = useMemo(() => {\n let sum = hasTotalNetProceedsPermissions ? sale?.ttlNetProcs?.amt ?? 0 : 0;\n\n if (sale?.soldTktCost != null) {\n sum -= sale?.soldTktCost.amt;\n }\n\n if (hasEditSaleLineItemsFeature) {\n lineItems?.forEach((li) => {\n // Per James - charges subtracts and credits add\n sum += (li.costType === SaleCostType.Charge ? -1 : 1) * li.cost;\n });\n }\n\n return sum;\n }, [\n hasEditSaleLineItemsFeature,\n hasTotalNetProceedsPermissions,\n lineItems,\n sale?.soldTktCost,\n sale?.ttlNetProcs?.amt,\n ]);\n\n const getMarketplacePaymentId = useCallback(\n (saleLineItem: SaleLineItem) => {\n return (marketplacePaymentLines ?? []).find(\n (mktPaymentLine) =>\n mktPaymentLine.marketplacePaymentLineId ===\n saleLineItem.marketplacePaymentLineId\n );\n },\n [marketplacePaymentLines]\n );\n\n const proceedsPaymentLine = useMemo(() => {\n return (marketplacePaymentLines ?? []).find(\n (mktPaymentLine) =>\n mktPaymentLine.paymentLineType === MarketplacePaymentLineType.Proceeds\n );\n }, [marketplacePaymentLines]);\n\n return (\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {originalProceeds && (\n \n {originalProceeds}{' '}\n \n )}\n {sale.ttlNetProcs?.disp}\n \n \n e.stopPropagation()}\n onClick={onPaymentReceivedToggleClicked}\n />\n \n \n {proceedsPaymentLine?.marketplacePaymentId ? (\n \n {paymentReferenceId}\n \n ) : (\n paymentReferenceId\n )}\n \n \n {lastPaymentDate &&\n formatInTimeZone(\n stringToUtcDate(lastPaymentDate),\n timeZone,\n 'MMM d, yyyy',\n {\n locale: getLocaleFromLanguageOrCurrent(),\n }\n )}\n \n \n \n {(lineItems ?? []).map((saleLineItem) => {\n const {\n id,\n costType,\n cost,\n costDate,\n currencyCode,\n saleLineItemChargeReason,\n saleLineItemCreditReason,\n paymentReceived,\n paymentReferenceId,\n } = saleLineItem;\n const marketplacePayment = getMarketplacePaymentId(saleLineItem);\n const isCharge = costType === SaleCostType.Charge;\n const lineTypeContentId = isCharge\n ? ContentId.Charge\n : ContentId.Credit;\n const costWithSign = isCharge ? cost * -1 : cost;\n const reasonContentId = isCharge\n ? saleLineItemChargeReason\n ? SALE_LINE_ITEM_CHARGE_REASON_TO_CID[saleLineItemChargeReason]\n : null\n : saleLineItemCreditReason\n ? SALE_LINE_ITEM_CREDIT_REASON_TO_CID[saleLineItemCreditReason]\n : null;\n return (\n \n \n \n \n {reasonContentId && (\n \n \n \n )}\n \n \n \n {formatCurrency(costWithSign, currencyCode)}\n \n \n e.stopPropagation()}\n onClick={() =>\n onSaleLineItemPaymentReceivedToggleClicked(saleLineItem)\n }\n />\n \n \n {paymentReferenceId &&\n marketplacePayment?.marketplacePaymentId ? (\n \n {paymentReferenceId}\n \n ) : (\n paymentReferenceId\n )}\n \n \n {costDate &&\n formatInTimeZone(\n stringToUtcDate(costDate),\n timeZone,\n 'MMM d, yyyy',\n {\n locale: getLocaleFromLanguageOrCurrent(),\n }\n )}\n \n \n \n onEditSaleLineItem(saleLineItem)}\n icon={\n \n }\n titleContentId={ContentId.Edit}\n />\n onDeleteSaleLineItem(saleLineItem)}\n icon={\n \n }\n titleContentId={ContentId.Remove}\n />\n \n \n \n );\n })}\n \n \n \n \n \n {sale?.soldTktCost == null ? (\n \n ) : (\n sale.soldTktCost.disp\n )}\n \n \n \n \n \n \n \n \n \n \n \n {formatCurrency(totalProfitAmount, sale?.currency)}\n \n \n \n \n \n \n \n \n
    \n );\n};\n","import { useCallback, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useConfirmDialog } from 'src/core/interim/dialogs/ConfirmDialog/useConfirmDialog';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { SaleLineItemModal } from 'src/modals/SaleDetails/components/PaymentSection/SaleLineItemModal';\nimport { PaymentSectionTable } from 'src/modals/SaleDetails/components/PaymentSectionV2/PaymentSectionTable/PaymentSectionTable';\nimport { useShouldHideForWastedSale } from 'src/modals/SaleDetails/hooks/useShouldHideForWastedSale';\nimport { IconsFill, PlusIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport {\n MarketplacePaymentLineType,\n MarketplacePaymentState,\n SaleCostType,\n SaleDetails,\n SaleInput,\n SaleLineItem,\n SiteMarketplacePaymentLineInput,\n} from 'src/WebApiController';\n\nimport { MarketplacePaymentLineDialog } from '../MarketplacePaymentSection/MarketplacePaymentLineDialog';\nimport { EMPTY_MARKETPLACE_PAYMENT_LINE } from '../MarketplacePaymentSection/MarketplacePaymentLineDialog/MarketplacePaymentLineDialog.utils';\n\ninterface PaymentSectionV2Props {\n sale?: SaleDetails | null | undefined;\n lineItems: SaleLineItem[] | null | undefined;\n onLineItemChange?: (item: SaleLineItem, isDelete?: boolean) => void;\n}\n\nexport const PaymentSectionV2 = ({\n sale,\n lineItems,\n onLineItemChange,\n}: PaymentSectionV2Props) => {\n const { loginContext } = useAppContext();\n const costDialog = useBasicDialog();\n\n const [curItem, setCurItem] = useState();\n\n const { setValue, watch } = useFormContext();\n const [currentMarketplacePaymentLine, setCurrentMarketplacePaymentLine] =\n useState();\n\n const paymentReceived = watch('paymentReceived')?.value ?? false;\n const marketplacePaymentLines = watch('marketplacePaymentLines')?.value;\n\n const {\n openConfirmDialog: launchRemovePaymentReceivedDialog,\n closeConfirmDialog: closeRemovePaymentReceivedDialog,\n } = useConfirmDialog();\n const addSalePaymentDialog = useBasicDialog();\n\n const hideForWastedSale = useShouldHideForWastedSale(sale);\n\n const onAddNewCostCancel = useCallback(() => {\n costDialog.closeDialog();\n setCurItem(undefined);\n }, [costDialog]);\n\n const onAddNewCostSave = useCallback(\n (item: SaleLineItem) => {\n onLineItemChange?.(item);\n costDialog.closeDialog();\n },\n [costDialog, onLineItemChange]\n );\n\n const onSetSaleLineItem = useCallback(\n (item?: SaleLineItem) => {\n setCurItem(item);\n costDialog.launchDialog();\n },\n [costDialog]\n );\n\n const onDeleteSaleLineItem = useCallback(\n (saleLineItem: SaleLineItem) => {\n onLineItemChange?.(saleLineItem, true);\n },\n [onLineItemChange]\n );\n\n const setPaymentReceivedFields = useCallback(\n (marketplacePaymentLine: SiteMarketplacePaymentLineInput) => {\n if (curItem?.id != null) {\n onLineItemChange?.(\n {\n ...curItem,\n paymentReceived: true,\n paymentReferenceId: marketplacePaymentLine.externalPaymentId,\n costDate: marketplacePaymentLine.paymentDate,\n },\n false\n );\n } else {\n setValue(\n 'paymentReferenceId',\n posChangedField(marketplacePaymentLine.externalPaymentId),\n {\n shouldDirty: true,\n }\n );\n setValue('paymentReceived', posChangedField(true), {\n shouldDirty: true,\n });\n setValue(\n 'lastPaymentDate',\n posChangedField(marketplacePaymentLine.paymentDate),\n {\n shouldDirty: true,\n }\n );\n }\n },\n [curItem, onLineItemChange, setValue]\n );\n\n const onRemovePaymentReceivedFields = useCallback(\n (curItem?: SaleLineItem) => {\n if (curItem?.id != null) {\n onLineItemChange?.(\n {\n ...curItem,\n paymentReceived: false,\n paymentReferenceId: null,\n marketplacePaymentLineId: null,\n },\n false\n );\n } else {\n setValue('paymentReceived', posChangedField(false), {\n shouldDirty: true,\n });\n setValue('paymentReferenceId', posChangedField(null), {\n shouldDirty: true,\n });\n setValue('lastPaymentDate', posChangedField(null), {\n shouldDirty: true,\n });\n }\n\n closeRemovePaymentReceivedDialog();\n },\n [closeRemovePaymentReceivedDialog, onLineItemChange, setValue]\n );\n\n const onCreateSalePayment = useCallback(\n (formMarketplacePaymentLineInput: SiteMarketplacePaymentLineInput) => {\n setValue(\n 'marketplacePaymentLines',\n posChangedField([\n ...(marketplacePaymentLines ?? []),\n formMarketplacePaymentLineInput,\n ]),\n {\n shouldDirty: true,\n }\n );\n setPaymentReceivedFields(formMarketplacePaymentLineInput);\n addSalePaymentDialog.closeDialog();\n setCurItem(undefined);\n },\n [\n addSalePaymentDialog,\n marketplacePaymentLines,\n setPaymentReceivedFields,\n setValue,\n ]\n );\n\n const onPaymentReceivedToggleClicked = useCallback(() => {\n if (paymentReceived) {\n launchRemovePaymentReceivedDialog({\n size: 'm',\n headerText: ,\n bodyText: ,\n onOkay: onRemovePaymentReceivedFields,\n onCancel: closeRemovePaymentReceivedDialog,\n okText: ContentId.Yes,\n cancelText: ContentId.No,\n });\n } else {\n const existingMarketplacePaymentProceedsLine =\n marketplacePaymentLines?.find(\n (line) => line.paymentLineType === MarketplacePaymentLineType.Proceeds\n );\n if (existingMarketplacePaymentProceedsLine != null) {\n setPaymentReceivedFields(existingMarketplacePaymentProceedsLine);\n } else {\n // Prompt user to enter a new one\n setCurrentMarketplacePaymentLine({\n ...EMPTY_MARKETPLACE_PAYMENT_LINE,\n externalPaymentLineId: `paymentline-${new Date().getTime()}`,\n externalSaleId: sale!.idOnMkp!,\n saleId: sale!.id,\n currency: sale!.currency,\n paymentLineType: MarketplacePaymentLineType.Proceeds,\n amount: sale!.mkpSaleTtlNetProcs?.amt ?? 0,\n paymentState: MarketplacePaymentState.Paid,\n });\n addSalePaymentDialog.launchDialog();\n }\n }\n }, [\n addSalePaymentDialog,\n closeRemovePaymentReceivedDialog,\n launchRemovePaymentReceivedDialog,\n marketplacePaymentLines,\n onRemovePaymentReceivedFields,\n paymentReceived,\n sale,\n setPaymentReceivedFields,\n ]);\n\n const onSaleLineItemPaymentReceivedToggleClicked = useCallback(\n (lineItem: SaleLineItem) => {\n if (lineItem.paymentReceived) {\n launchRemovePaymentReceivedDialog({\n size: 'm',\n headerText: ,\n bodyText: ,\n onOkay: () => onRemovePaymentReceivedFields(lineItem),\n onCancel: closeRemovePaymentReceivedDialog,\n okText: ContentId.Yes,\n cancelText: ContentId.No,\n });\n } else {\n setCurItem(lineItem);\n // Prompt user to enter a new one\n setCurrentMarketplacePaymentLine({\n ...EMPTY_MARKETPLACE_PAYMENT_LINE,\n externalPaymentLineId: `paymentline-${new Date().getTime()}`,\n externalSaleId: sale!.idOnMkp!,\n saleId: sale!.id,\n currency: lineItem.currencyCode,\n paymentLineType:\n lineItem.costType === SaleCostType.Charge\n ? MarketplacePaymentLineType.Charge\n : MarketplacePaymentLineType.Credit,\n amount: lineItem.cost,\n });\n addSalePaymentDialog.launchDialog();\n }\n },\n [\n addSalePaymentDialog,\n closeRemovePaymentReceivedDialog,\n launchRemovePaymentReceivedDialog,\n onRemovePaymentReceivedFields,\n sale,\n ]\n );\n\n if (!sale) {\n return null;\n }\n\n return (\n <>\n \n onSetSaleLineItem()}\n variant=\"textPlain\"\n disabled={hideForWastedSale}\n >\n \n \n \n \n \n \n {addSalePaymentDialog.dialogProps.isOpen && (\n {\n addSalePaymentDialog.closeDialog();\n setCurItem(undefined);\n }}\n disabledPaymentTypeInput={true}\n disabledAmountInput={!!currentMarketplacePaymentLine?.amount}\n />\n )}\n \n );\n};\n","import { PaymentSection } from 'src/modals/SaleDetails/components/PaymentSection';\nimport { PaymentSectionV2 } from 'src/modals/SaleDetails/components/PaymentSectionV2';\nimport { useHasPaymentsSectionsV2Feature } from 'src/modals/SaleDetails/hooks/useHasPaymentsSectionsV2Feature';\nimport { SaleDetails, SaleLineItem } from 'src/WebApiController';\n\ninterface PaymentSectionSelectorProps {\n sale?: SaleDetails | null;\n lineItems: SaleLineItem[] | null | undefined;\n onLineItemChange?: (item: SaleLineItem, isDelete?: boolean) => void;\n}\n\nexport const PaymentSectionSelector = ({\n sale,\n lineItems,\n onLineItemChange,\n}: PaymentSectionSelectorProps) => {\n const hasPaymentsSectionsV2Feature = useHasPaymentsSectionsV2Feature();\n\n return hasPaymentsSectionsV2Feature ? (\n \n ) : (\n \n );\n};\n","import { useFormContext } from 'react-hook-form';\nimport { TagsFormBodyV2 } from 'src/components/TagsFormBody';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { useUserCanUpdateSaleTags } from 'src/hooks/useUserHasSalePermissions';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport {\n ActionOutboxEntityType,\n Permission,\n Sale,\n SaleInput,\n} from 'src/WebApiController';\n\nexport const TagsSection = ({\n sale,\n disabled,\n}: {\n sale?: Sale | null;\n disabled?: boolean;\n}) => {\n const { setValue, watch } = useFormContext();\n const tags = watch('tags');\n\n const canCreateTage = useUserHasAnyOfPermissions(Permission.Sales_AddTagType);\n const canEditTags = useUserCanUpdateSaleTags(sale);\n\n return (\n {\n setValue('tags', posChangedField(tags), { shouldDirty: true });\n }}\n disabled={disabled}\n entityType={ActionOutboxEntityType.Sale}\n />\n );\n};\n","export const enum SaleTab {\n YourSale = 'YourSale',\n Tickets = 'Tickets',\n Notes = 'Notes',\n Economics = 'Economics',\n Delivery = 'Delivery',\n Fulfillment = 'Fulfillment',\n Purchase = 'Purchase',\n Tags = 'Tags',\n}\n\nexport enum SaleDetailsActionKey {\n Refresh = 'Refresh',\n UnwasteSale = 'Unwaste',\n}\n","import { useMutation } from '@tanstack/react-query';\nimport { useCallback, useContext, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { ReloadButton } from 'src/components/Buttons';\nimport { OkButton } from 'src/components/Buttons/OkButton';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { PosDropdown, PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { useTagsForEntityType } from 'src/hooks/useTagsForEntityType';\nimport { useUserCanUpdateSale } from 'src/hooks/useUserHasSalePermissions';\nimport { ModalFooter } from 'src/modals/Modal/Modal.styled';\nimport { SaleDetailsActionKey } from 'src/modals/SaleDetails/SaleDetails.constants';\nimport { IconsFill, MoreIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n getSaleActionButton,\n getSaleDetailsModalConfigWithDeepLink,\n NON_MAIN_SALE_ACTIONS,\n} from 'src/utils/saleUtils';\nimport { tagHasChanges } from 'src/utils/tagUtils';\nimport {\n ActionOutboxEntityType,\n PointOfSaleSaleStatus,\n SaleActionType,\n SaleClient,\n SaleDetails,\n SaleInput,\n Tag,\n TicketType,\n} from 'src/WebApiController';\n\nexport function SaleDetailsFooter() {\n const { showErrorDialog } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const { refetch: refreshTagMetadata, tagsMetadata } = useTagsForEntityType(\n ActionOutboxEntityType.Sale\n );\n\n const updateSaleMutation = useMutation({\n mutationFn: async (data: SaleInput) => {\n await new SaleClient(activeAccountWebClientConfig).updateSale(data);\n onReload();\n reset(data);\n },\n\n onError: (err: ErrorTypes, data) => {\n showErrorDialog('SaleClient.updateSale', err, {\n trackErrorData: { data },\n });\n },\n });\n\n const { formState, handleSubmit, reset, watch } = useFormContext();\n\n const tags = watch('tags');\n\n const isMobile = useMatchMedia('mobile');\n const { closeModal } = useContext(ModalContext);\n const {\n posEntity: sale,\n isLoading,\n errorInfo,\n setActivePosEntity,\n } = useActivePosEntityContext();\n\n const canUpdate = useUserCanUpdateSale(sale);\n\n const cancelTo = getSaleDetailsModalConfigWithDeepLink(sale?.id);\n\n const onReload = useCallback(() => {\n if (sale) {\n setActivePosEntity(sale.id, sale.idOnMkp, true);\n }\n // Update the tags metadata\n refreshTagMetadata();\n }, [refreshTagMetadata, sale, setActivePosEntity]);\n\n const formIsDirty = useMemo(() => {\n if (\n Object.keys(formState.dirtyFields).length === 1 &&\n Object.keys(formState.dirtyFields).includes('tags')\n ) {\n return tagHasChanges(\n (formState.defaultValues?.tags?.value ?? []) as Tag[],\n tags?.value,\n tagsMetadata ?? []\n );\n } else {\n return formState.isDirty;\n }\n }, [\n formState.defaultValues?.tags,\n formState.dirtyFields,\n formState.isDirty,\n tags,\n tagsMetadata,\n ]);\n\n // This flag is used to explicitly manually fulfill a sale when there is already artifact\n const canAttemptManualForceFulfill = useMemo(() => {\n // Condition 1, 2: isNoFulfill is true, and is pending fulfillment state\n if (\n !sale?.isNoFulfill ||\n sale?.status !== PointOfSaleSaleStatus.PendingFulfillment\n ) {\n return false;\n }\n\n // Condition 3: sale has artifact matching the ticket type\n if (\n sale.ticketType === TicketType.Barcode &&\n sale.tickets.every((t) => t.barcode)\n ) {\n return true;\n }\n\n if (\n sale.ticketType === TicketType.QRCode &&\n sale.tickets.every((t) => t.eTicket)\n ) {\n return true;\n }\n\n if (\n sale.ticketType === TicketType.QRCode &&\n sale.tickets.every((t) => t.qrCode)\n ) {\n return true;\n }\n\n return false;\n }, [sale?.isNoFulfill, sale?.status, sale?.ticketType, sale?.tickets]);\n\n if (errorInfo) {\n return ;\n }\n\n const refreshAction: { key: string; action: JSX.Element | null }[] = [\n {\n key: SaleDetailsActionKey.Refresh,\n action: (\n \n ),\n },\n ];\n\n const mainActionsStartingIndex = Math.max(\n 0,\n (sale?.actions?.length ?? 0) - (isMobile ? 2 : 3)\n );\n\n const actions: { key: string; action: JSX.Element | null }[] = sale?.actions\n ? sale.actions.map((saleActionType, i) => {\n const resolvedAction =\n saleActionType === SaleActionType.Fulfill &&\n canAttemptManualForceFulfill\n ? SaleActionType.Refulfill\n : saleActionType;\n\n return {\n key: resolvedAction,\n action:\n getSaleActionButton(\n sale.id,\n sale.idOnMkp,\n sale.mkp,\n sale.status,\n resolvedAction,\n sale.ticketType,\n sale.isNoFulfill,\n i < mainActionsStartingIndex\n ? 'text'\n : i === sale.actions.length - 1 &&\n resolvedAction !== SaleActionType.Reject &&\n !NON_MAIN_SALE_ACTIONS.includes(resolvedAction)\n ? 'regular'\n : 'outline',\n false,\n cancelTo,\n isLoading\n ) ?? null,\n };\n })\n : [];\n\n if (formIsDirty && canUpdate) {\n actions.push({\n key: 'Submit',\n action: (\n {\n const saleId = sale?.id;\n if (saleId) {\n updateSaleMutation.mutate({\n ...data,\n saleId,\n });\n }\n })}\n textContentId={ContentId.Save}\n disabled={isLoading}\n />\n ),\n });\n }\n\n const mainActions = (isMobile ? [] : refreshAction).concat(\n actions.slice(mainActionsStartingIndex)\n );\n\n const subActions = (isMobile ? refreshAction : []).concat(\n actions.slice(0, mainActionsStartingIndex)\n );\n\n return (\n \n {mainActions.map((a) => (\n
    {a.action}
    \n ))}\n {subActions.length > 0 ? (\n \n }\n align=\"end\"\n >\n {subActions\n .toSorted((a, b) => a.key.localeCompare(b.key))\n .map((a) => (\n \n {a.action}\n \n ))}\n \n ) : null}\n
    \n );\n}\n","import { ChangeEvent } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Switch } from 'src/core/interim/Switch';\nimport { Stack } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { Detail, DetailGroup } from 'src/modals/common';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport { Feature, SaleInput } from 'src/WebApiController';\n\ninterface AutoSourceTicketsProps {\n isSeatSaver?: boolean | null;\n}\n\nexport const AutoSourceTickets = ({ isSeatSaver }: AutoSourceTicketsProps) => {\n const { watch, setValue } = useFormContext();\n const disableAutoSourcing = watch('disableAutoSourcing');\n\n const allowDisableAutoSourcing = useUserHasFeature(\n Feature.DisableAutoSourcing\n );\n\n if (!isSeatSaver || !allowDisableAutoSourcing) {\n return null;\n }\n\n return (\n \n }\n detail={\n \n ) => e.stopPropagation()}\n onChange={(e) => {\n // by default, AutoSource Tickets is set to true\n // if not checked, seller wants to disable auto sourcing.\n const isChecked = e.currentTarget.checked;\n setValue('disableAutoSourcing', posChangedField(isChecked), {\n shouldDirty: true,\n });\n }}\n />\n \n }\n />\n \n );\n};\n","import { useCallback, useState } from 'react';\nimport { useSiteTheme } from 'src/contexts/SiteTheme/SiteThemeContext';\nimport { vars } from 'src/core/themes';\nimport { Colors } from 'src/core/themes/constants/colors';\nimport { Stack } from 'src/core/ui';\nimport useCopyToClipboard from 'src/hooks/useCopyToClipboard';\nimport { CopyIcon } from 'src/svgs';\nimport { CheckIcon } from 'src/svgs/Viagogo';\n\nconst SHOW_COPIED_ICON_TIME = 1000;\n\ninterface CopyToClipboardPops {\n textToCopy?: string | number;\n copyIconColor?: string;\n iconSize?: string;\n}\n\nexport const CopyToClipboard = ({\n textToCopy,\n copyIconColor,\n iconSize,\n}: CopyToClipboardPops) => {\n const { isDarkMode } = useSiteTheme();\n const [showingCheckmarkIcon, setShowingCheckmarkIcon] =\n useState(false);\n const { copyToClipboard } = useCopyToClipboard();\n\n const copy = useCallback(async () => {\n if (textToCopy == null || String(textToCopy).length === 0) {\n return;\n }\n await copyToClipboard(String(textToCopy));\n setShowingCheckmarkIcon(true);\n const timeoutId = setTimeout(\n () => setShowingCheckmarkIcon(false),\n SHOW_COPIED_ICON_TIME\n );\n return () => {\n clearTimeout(timeoutId);\n };\n }, [copyToClipboard, textToCopy]);\n\n return (\n \n {showingCheckmarkIcon ? (\n \n ) : (\n \n )}\n \n );\n};\n","import { ReactNode } from 'react';\nimport { Link } from 'react-router-dom';\nimport { NavLink } from 'reactstrap';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { CopyToClipboard } from 'src/core/ui/CopyToClipboard';\n\nimport * as styles from './LinkAncCopy.css';\n\ninterface LinkAndCopyProps {\n valueToCopy: string | number;\n relativeUrl: string;\n linkChildren?: ReactNode;\n copyIconSize?: string;\n}\n\nexport const LinkAndCopy = ({\n relativeUrl,\n valueToCopy,\n linkChildren,\n copyIconSize,\n}: LinkAndCopyProps) => {\n return (\n \n \n {linkChildren || valueToCopy}\n \n \n \n );\n};\n","import { Link } from 'react-router-dom';\nimport { NavLink } from 'reactstrap';\nimport { Content } from 'src/contexts/ContentContext/Content';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { Detail, DetailGroup } from 'src/modals/common';\nimport { OpenLinkIcon } from 'src/svgs';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getListingDetailsRelativeUrl } from 'src/utils/inventoryUtils';\nimport { selectDistinctListingIds } from 'src/utils/ticketUtils';\nimport { Ticket } from 'src/WebApiController';\n\nimport * as styles from '../SaleDetails.css';\n\nconst renderListing = (\n contentId: string,\n listingId?: number | null,\n showTitle?: boolean\n) => {\n if (!listingId) return null;\n\n return (\n \n }\n detail={\n \n \n
    {'#' + listingId}
    \n \n
    \n \n }\n />\n
    \n );\n};\n\nexport const ListingLinksDetail = ({\n listingId,\n originatedFromListingId,\n tickets,\n showTitle = true,\n}: {\n listingId?: number | null;\n originatedFromListingId?: number | null;\n tickets?: Ticket[];\n showTitle?: boolean;\n}) => {\n const distinctListingIds = tickets?.length\n ? selectDistinctListingIds(tickets)\n : [];\n\n const hasOriginatedListing =\n originatedFromListingId &&\n distinctListingIds.includes(originatedFromListingId);\n\n return (\n <>\n {tickets?.length ? (\n <>\n {!hasOriginatedListing &&\n renderListing(\n ContentId.OriginatedListing,\n originatedFromListingId,\n showTitle\n )}\n {distinctListingIds.map((listingId) =>\n renderListing(\n listingId === originatedFromListingId\n ? ContentId.OriginatedListing\n : ContentId.AllocatedListing,\n listingId,\n showTitle\n )\n )}\n \n ) : (\n <>\n {originatedFromListingId &&\n renderListing(\n ContentId.OriginatedListing,\n originatedFromListingId,\n showTitle\n )}\n {listingId !== originatedFromListingId &&\n renderListing(ContentId.AllocatedListing, listingId, showTitle)}\n \n )}\n \n );\n};\n","import { clsx } from 'clsx';\nimport { useMemo } from 'react';\nimport { LinkAndCopy } from 'src/components/common/LinkAndCopy';\nimport { Content } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { SimpleTable, Stack, Tooltip } from 'src/core/ui';\nimport { UseGetUserInfo, useGetUserInfos } from 'src/hooks/userGetUserInfo';\nimport { ListingLinksDetail } from 'src/modals/SaleDetails/components/ListingLinksDetail';\nimport { GenericDisclosuresIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getPurchaseOrderRelativeUrl } from 'src/utils/purchaseUtils';\nimport { SaleDetails } from 'src/WebApiController';\n\nimport * as tableStyles from '../../../SaleDetails/SaleDetailsTable.css';\nimport * as styles from './SaleTickets.css';\n\ninterface AllocatedListingProps {\n sale: SaleDetails;\n}\n\nexport const AllocatedListing = ({ sale }: AllocatedListingProps) => {\n const { ticketGroupInfos } = sale;\n\n const canRender = sale.originatedFromListingId;\n\n const buyerUserIds = useMemo(() => {\n if (!canRender) {\n return []; // Don't fetch if it can't render\n }\n return ticketGroupInfos\n .filter((tkgInfo) => !!tkgInfo.buyerUserId)\n .map((tkgInfo) => tkgInfo.buyerUserId) as string[];\n }, [canRender, ticketGroupInfos]);\n\n const usersInfoQuery = useGetUserInfos(buyerUserIds);\n\n const usersMap: Record = usersInfoQuery.data || {};\n\n if (!canRender) {\n return null;\n }\n\n return (\n
    \n \n \n \n \n \n \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {ticketGroupInfos.map((tkInfo, index) => {\n const { seating } = tkInfo;\n return (\n \n \n {seating.section}\n \n \n {seating.row}\n \n \n {seating.seatFr} - {seating.seatTo}\n \n \n {tkInfo.ticketCount}\n \n \n \n \n \n {tkInfo.buyerUserId && usersMap?.[tkInfo.buyerUserId]?.name}\n \n \n
    \n {tkInfo.vendor?.vendorName}\n
    \n \n ({tkInfo.vendorAccount?.encryptedEmailAddress})\n
    \n \n \n {tkInfo.internalNotes ? (\n \n \n
    \n }\n >\n
    \n
    \n \n
    \n
    \n {tkInfo.internalNotes}\n
    \n
    \n \n ) : undefined}\n \n \n );\n })}\n \n \n \n \n );\n};\n","import { clsx } from 'clsx';\nimport { Content } from 'src/contexts/ContentContext';\nimport { SimpleTable, Stack } from 'src/core/ui';\nimport { ListingLinksDetail } from 'src/modals/SaleDetails/components/ListingLinksDetail';\nimport * as styles from 'src/modals/SaleDetailsV2/components/SaleTickets/SaleTickets.css';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SaleDetails } from 'src/WebApiController';\n\nimport * as tableStyles from '../../../SaleDetails/SaleDetailsTable.css';\n\ninterface OriginalListingProps {\n sale: SaleDetails;\n}\n\nexport const OriginalListing = ({ sale }: OriginalListingProps) => {\n if (!sale.mkpSeating) {\n return null;\n }\n\n const { section, row, seatFr, seatTo } = sale.mkpSeating;\n\n return (\n
    \n \n \n \n \n \n \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {section}\n \n \n {row}\n \n \n {seatFr} - {seatTo}\n \n \n {sale.qtySold}\n \n \n \n \n \n \n \n \n
    \n
    \n );\n};\n","import { Content } from 'src/contexts/ContentContext';\nimport { DetailSection } from 'src/modals/common';\nimport { AutoSourceTickets } from 'src/modals/SaleDetails/components/AutoSourceTickets';\nimport { useShouldHideForWastedSale } from 'src/modals/SaleDetails/hooks/useShouldHideForWastedSale';\nimport { AllocatedListing } from 'src/modals/SaleDetailsV2/components/SaleTickets/AllocatedListing';\nimport { OriginalListing } from 'src/modals/SaleDetailsV2/components/SaleTickets/OriginalListing';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SaleDetails } from 'src/WebApiController';\n\ninterface SeatsSoldAsProps {\n sale: SaleDetails | undefined | null;\n}\n\nexport const SaleTicketsSection = ({ sale }: SeatsSoldAsProps) => {\n const hideForWastedSale = useShouldHideForWastedSale(sale);\n\n if (!sale) {\n return null;\n }\n\n return (\n }>\n {!hideForWastedSale && sale.tickets.length > 0 && (\n \n )}\n\n \n \n \n );\n};\n","import { Fragment, useMemo } from 'react';\nimport { LinkAndCopy } from 'src/components/common/LinkAndCopy';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { Button } from 'src/core/ui';\nimport { getUserDisplayName, useGetUserInfos } from 'src/hooks/userGetUserInfo';\nimport {\n Detail,\n DetailGroup,\n DetailSection,\n SectionContent,\n} from 'src/modals/common';\nimport * as styles from 'src/modals/SaleDetails/SaleDetails.css';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { QUALITY_CONTROL_STATE_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { removeDuplicates } from 'src/utils/miscUtils';\nimport { getPurchaseOrderRelativeUrl } from 'src/utils/purchaseUtils';\nimport { QualityControlState, UiPurchaseInfo } from 'src/WebApiController';\n\nexport const PurchaseInfoSection = ({\n isSeatSaver,\n purchaseInfos,\n qualityControlState,\n insertBy,\n}: {\n isSeatSaver?: boolean;\n purchaseInfos: UiPurchaseInfo[];\n qualityControlState?: QualityControlState | null;\n insertBy?: string | null;\n}) => {\n const useGetUserInfosQuery = useGetUserInfos(\n [...purchaseInfos.map((u) => u.buyerUserId), insertBy]\n .filter((id) => id != null)\n .map((id) => id!)\n );\n\n const deactivatedText = useContent(ContentId.Deactivated);\n const buyerUserInfos = useMemo(() => {\n return purchaseInfos.map((bi) => {\n const buyerUser =\n bi.buyerUserId && useGetUserInfosQuery.data?.[bi.buyerUserId];\n return {\n buyerUserId: bi.buyerUserId,\n buyerUser,\n };\n });\n }, [purchaseInfos, useGetUserInfosQuery.data]);\n\n const insertByUser = insertBy\n ? useGetUserInfosQuery.data?.[insertBy]\n : undefined;\n\n return (\n }>\n {isSeatSaver ? (\n \n \n \n \n \n \n \n \n }\n detail={\n insertByUser && (\n {getUserDisplayName(insertByUser)}\n )\n }\n />\n \n \n ) : (\n \n \n \n }\n detail={\n
    \n {purchaseInfos.map(({ purchaseOrderId, vendorOrderId }) => {\n return (\n \n {purchaseOrderId && (\n \n )}\n \n );\n })}\n
    \n }\n />\n
    \n \n }\n detail={\n \n {removeDuplicates(\n buyerUserInfos.map((bui) =>\n bui.buyerUser\n ? getUserDisplayName(bui.buyerUser, deactivatedText)\n : bui.buyerUserId\n )\n ).join(', ')}\n \n }\n />\n \n \n \n }\n detail={\n \n {removeDuplicates(\n purchaseInfos\n .filter((v) => v.vendor?.vendorName != null)\n .map((v) => v.vendor!.vendorName)\n ).join(', ')}\n \n }\n />\n \n \n \n }\n detail={\n \n {removeDuplicates(\n purchaseInfos\n .filter(\n (v) => v.vendorAccount?.encryptedEmailAddress != null\n )\n .map((v) =>\n v.vendorAccount!.vendorAccountName\n ? `${v.vendorAccount!.vendorAccountName} (${\n v.vendorAccount!.encryptedEmailAddress\n })`\n : v.vendorAccount!.encryptedEmailAddress\n )\n ).join(', ')}\n \n }\n />\n \n {qualityControlState !== undefined && (\n \n }\n detail={\n qualityControlState ? (\n \n ) : (\n \n )\n }\n />\n \n )}\n {insertBy && (\n \n }\n detail={\n insertByUser && (\n {getUserDisplayName(insertByUser)}\n )\n }\n />\n \n )}\n \n }\n detail={\n \n {removeDuplicates(\n purchaseInfos\n .filter((p) => p.internalNotes?.length)\n .map((p) => p.internalNotes)\n ).join(', ')}\n \n }\n />\n \n
    \n )}\n
    \n );\n};\n","import { ReactNode } from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { SetCommissionForm } from 'src/components/common/SetCommissions/SetCommissionsForm';\nimport { PosFieldArrayOfCommission } from 'src/WebApiController';\n\ninterface SaleCommissionOverrideFormProps {\n children: ReactNode;\n commissions: PosFieldArrayOfCommission | null;\n}\n\n/**\n * This wrapper is used to modify commissions overrides, but not apply them\n * to parent form. This solves the cancel option of the modal to rollback changes.\n * @param commissions\n * @param children\n * @constructor\n */\nexport const SaleCommissionOverrideFormWrapper = ({\n commissions,\n children,\n}: SaleCommissionOverrideFormProps) => {\n const methods = useForm({\n defaultValues: {\n commissions: commissions,\n },\n });\n return {children};\n};\n","import React, { ComponentProps, useRef, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Modal as RSModal } from 'reactstrap';\nimport { CancelButton } from 'src/components/Buttons';\nimport { OkButton } from 'src/components/Buttons/OkButton';\nimport {\n SetCommissionForm,\n SetCommissionsForm,\n SetCommissionsRefActions,\n} from 'src/components/common/SetCommissions/SetCommissionsForm';\n\nimport { Content } from 'src/contexts/ContentContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { SaleCommissionOverrideFormWrapper } from 'src/dialogs/SaleCommissionOverrideDialog/SaleCommissionOverrideFormWrapper';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Commission, PosFieldArrayOfCommission } from 'src/WebApiController';\nimport * as styles from './SaleCommissionOverrideDialog.css';\n\nexport type SaleCommissionOverrideDialogProps = {\n onSave: (commissions: Commission[]) => void;\n onCancel?: () => void;\n} & ComponentProps;\n\nexport function SaleCommissionOverrideDialog({\n header,\n onSave,\n onCancel,\n ...rest\n}: SaleCommissionOverrideDialogProps) {\n const actionsRef = useRef(null);\n const { watch } = useFormContext();\n const commissions = watch('commissions');\n const [initialCommissions] = useState(\n commissions\n );\n return (\n \n {onCancel && }\n actionsRef.current?.onSave()}\n />\n \n }\n includeCloseButton={true}\n >\n
    \n \n \n \n \n \n \n
    \n \n );\n}\n","import { vars } from 'src/core/themes';\n\nexport const shimmerHeight = vars.spacing.xl;\n","import { useMemo } from 'react';\nimport { IconButton } from 'src/components/Buttons';\nimport { Content } from 'src/contexts/ContentContext';\nimport { SimpleTable } from 'src/core/ui';\nimport { useGetUserInfos } from 'src/hooks/userGetUserInfo';\nimport { shimmerHeight } from 'src/modals/SaleDetails/components/Commissions/Commissions.constants';\nimport { EditIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { TableShimmeringDiv } from 'src/tables/Table';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Commission } from 'src/WebApiController';\n\nimport * as styles from '../CommissionsTable.css';\n\ninterface CommissionsTableProps {\n commissions: Commission[];\n onEditAction: () => void;\n}\n\nexport const CommissionsOverridesTable = ({\n commissions,\n onEditAction,\n}: CommissionsTableProps) => {\n const usersIds = useMemo(\n () => commissions.map((commission) => commission.buyerUserId),\n [commissions]\n );\n\n const usersQuery = useGetUserInfos(usersIds);\n\n return (\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {usersQuery.isLoading ? (\n <>\n {commissions.map(({ buyerUserId }) => (\n \n \n \n \n \n \n \n \n \n \n \n ))}\n \n ) : (\n <>\n {commissions.map(\n ({ commissionPercentage, buyerUserId }, index) => (\n \n \n {usersQuery.data?.[buyerUserId]?.name}\n \n \n {(commissionPercentage * 100).toFixed(0)}%\n \n \n {index === 0 && (\n \n }\n titleContentId={ContentId.Edit}\n />\n )}\n \n \n )\n )}\n \n )}\n \n \n
    \n );\n};\n","import { useMemo } from 'react';\nimport { LinkAndCopy } from 'src/components/common/LinkAndCopy';\nimport { Content } from 'src/contexts/ContentContext';\nimport { SimpleTable } from 'src/core/ui';\nimport { useGetUserInfos } from 'src/hooks/userGetUserInfo';\nimport { shimmerHeight } from 'src/modals/SaleDetails/components/Commissions/Commissions.constants';\nimport { TableShimmeringDiv } from 'src/tables/Table';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getPurchaseOrderRelativeUrl } from 'src/utils/purchaseUtils';\nimport { SaleDetails } from 'src/WebApiController';\nimport * as styles from '../CommissionsTable.css';\n\ninterface CommissionsTableProps {\n sale: SaleDetails | null | undefined;\n}\n\nexport const CommissionsTable = ({ sale }: CommissionsTableProps) => {\n const usersIds = useMemo(() => {\n if (\n !sale?.purchaseOrderCommissions ||\n sale?.purchaseOrderCommissions?.length === 0\n ) {\n return [];\n }\n\n const buyerUserIds = sale.purchaseOrderCommissions.flatMap((poc) =>\n poc.commissions.map((c) => c.buyerUserId)\n );\n return Array.from(new Set(buyerUserIds));\n }, [sale]);\n\n const usersQuery = useGetUserInfos(usersIds);\n\n if (!sale?.purchaseOrderCommissions || usersIds.length === 0) {\n return (\n
    \n \n
    \n );\n }\n\n const users = usersQuery.data ?? {};\n\n return (\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {usersQuery.isLoading ? (\n <>\n {usersIds.map((userId) => (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ))}\n \n ) : (\n <>\n {sale.purchaseOrderCommissions.map(\n ({ commissions, purchaseOrderId }) => {\n const tkInfo = sale.ticketGroupInfos.find(\n (tkg) => tkg.purchaseOrderId === purchaseOrderId\n );\n if (!tkInfo) {\n return null;\n }\n const { seating, ticketCount } = tkInfo;\n return (\n \n \n {seating.section}\n \n \n {seating.row}\n \n \n {seating.seatFr} - {seating.seatTo}\n \n \n {ticketCount}\n \n \n \n \n \n {commissions.map(({ buyerUserId }) => (\n
    {users[buyerUserId].name}
    \n ))}\n
    \n \n {commissions.map(\n ({ buyerUserId, commissionPercentage }) => (\n
    \n {(commissionPercentage * 100).toFixed(0)}%\n
    \n )\n )}\n
    \n
    \n );\n }\n )}\n \n )}\n
    \n
    \n
    \n );\n};\n","import { useCallback } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { ButtonWithIcon } from 'src/components/Buttons';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useConfirmDialog } from 'src/core/interim/dialogs/ConfirmDialog/useConfirmDialog';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { SaleCommissionOverrideDialog } from 'src/dialogs/SaleCommissionOverrideDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport * as styles from 'src/modals/SaleDetails/components/Commissions/Commissions.css';\nimport { CommissionsOverridesTable } from 'src/modals/SaleDetails/components/Commissions/CommissionsOverrideTable/CommissionsOverridesTable';\nimport { CommissionsTable } from 'src/modals/SaleDetails/components/Commissions/CommissionsTable/CommissionsTable';\nimport { EditIcon, IconsFill, ResetIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport { Commission, SaleDetails, SaleInput } from 'src/WebApiController';\n\ninterface CommissionsSectionProps {\n sale: SaleDetails | null | undefined;\n}\n\nexport const CommissionsSection = ({ sale }: CommissionsSectionProps) => {\n const { setValue, watch } = useFormContext();\n const { closeDialog, launchDialog, dialogProps } = useBasicDialog();\n const commissions = watch('commissions')?.value ?? [];\n\n const onSave = useCallback(\n (commissions: Commission[]) => {\n setValue('commissions', posChangedField(commissions), {\n shouldDirty: true,\n });\n closeDialog();\n },\n [closeDialog, setValue]\n );\n\n const {\n openConfirmDialog: openConfirmDeleteDialog,\n closeConfirmDialog: closeConfirmDeleteDialog,\n } = useConfirmDialog();\n\n const resetOverride = useCallback(() => {\n openConfirmDeleteDialog({\n size: 's',\n headerText: ,\n bodyText: ,\n onOkay: () => {\n const emptyCommissions: Commission[] = [];\n onSave(emptyCommissions);\n closeConfirmDeleteDialog();\n },\n onCancel: closeConfirmDeleteDialog,\n okText: ContentId.Yes,\n cancelText: ContentId.No,\n });\n }, [closeConfirmDeleteDialog, onSave, openConfirmDeleteDialog]);\n\n if (!sale) {\n return null;\n }\n\n const hasCommissions = commissions.length > 0;\n const ActionIcon = hasCommissions ? ResetIcon : EditIcon;\n\n return (\n <>\n \n (hasCommissions ? resetOverride() : launchDialog())}\n icon={\n \n }\n className={styles.addCommissionButton}\n />\n \n\n {hasCommissions ? (\n \n ) : (\n \n )}\n\n {dialogProps.isOpen && (\n }\n />\n )}\n \n );\n};\n","import { formatInTimeZone } from 'date-fns-tz';\nimport { MarketplaceLogo } from 'src/components/common/MarketplaceLogo';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useSiteTimezoneContext } from 'src/contexts/SiteTimezoneContext/SiteTimezoneContext';\nimport { PosPill } from 'src/core/POS/PosPill';\nimport { PosPillVariant } from 'src/core/POS/PosPill/PosPill';\nimport { Stack } from 'src/core/ui';\nimport { CopyToClipboard } from 'src/core/ui/CopyToClipboard';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { getUserDisplayName, useGetUserInfos } from 'src/hooks/userGetUserInfo';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { Detail, DetailGroup, SectionContent } from 'src/modals/common';\nimport { useGetModalGridFormat } from 'src/modals/SaleDetailsV2/hooks/useGetModalGridFormat';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { stringToUtcDate } from 'src/utils/dateTimeUtils';\nimport { getLocaleFromLanguageOrCurrent } from 'src/utils/localeUtils';\nimport {\n Feature,\n Marketplace,\n PointOfSaleSaleStatus,\n Sale,\n} from 'src/WebApiController';\n\nexport type YourSaleSectionProps = {\n marketplace?: Marketplace | null;\n saleId: number;\n marketplaceSaleId: string | null;\n saleDate: Sale['saleDate'];\n insertBy: Sale['insertBy'];\n status: PointOfSaleSaleStatus;\n};\n\nexport const YourSaleSection = ({\n marketplaceSaleId,\n saleId,\n marketplace,\n saleDate,\n insertBy,\n status,\n}: YourSaleSectionProps) => {\n const hasWasteSaleFeature = useUserHasFeature(Feature.WasteSale);\n const { SectionContentGridFormat } = useGetModalGridFormat();\n const { timeZone } = useSiteTimezoneContext();\n const displayDate = formatInTimeZone(\n stringToUtcDate(saleDate),\n timeZone,\n 'MMM d, yyyy h:mm aa',\n {\n locale: getLocaleFromLanguageOrCurrent(),\n }\n );\n\n const isMobile = useMatchMedia('mobile');\n\n const useGetUserInfosQuery = useGetUserInfos(\n insertBy ? [insertBy] : undefined\n );\n\n const deactivatedText = useContent(ContentId.Deactivated);\n const insertByUser = insertBy\n ? useGetUserInfosQuery.data?.[insertBy]\n : undefined;\n\n const isWastedSale = status === PointOfSaleSaleStatus.Wasted;\n\n return (\n \n \n }\n detail={\n \n #{marketplaceSaleId || saleId}\n \n \n }\n />\n \n \n }\n detail={\n hasWasteSaleFeature && isWastedSale ? (\n \n \n \n ) : (\n \n )\n }\n />\n \n \n }\n detail={displayDate}\n />\n \n {insertByUser && (\n \n }\n detail={\n insertByUser && (\n \n {getUserDisplayName(insertByUser, deactivatedText)}\n \n )\n }\n />\n \n )}\n \n );\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { useCallback, useMemo } from 'react';\nimport { FormProvider, useForm, useFormContext } from 'react-hook-form';\nimport { useNavigate } from 'react-router-dom';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { PosDropdown, PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { Stack } from 'src/core/ui';\nimport { useHasSaleDetailsMarketplaceTermsFeature } from 'src/hooks/features/useHasSaleDetailsMarketplaceTermsFeature';\nimport { useEventItemLoadingDisplay } from 'src/hooks/useEventItemLoadingDisplay';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { useUserCanUpdateSale } from 'src/hooks/useUserHasSalePermissions';\nimport { DetailSection } from 'src/modals/common';\nimport { CancellableFormHeader } from 'src/modals/common/CancellableFormHeader';\nimport { ConnectedEventEntityHeader } from 'src/modals/common/EventEntityHeader';\nimport { ListingNotesSection } from 'src/modals/common/ListingNotesSection';\nimport { ModalBody } from 'src/modals/Modal';\nimport { CommentSection } from 'src/modals/SaleDetails/components/CommentSection';\nimport { MarketplacePaymentSection } from 'src/modals/SaleDetails/components/MarketplacePaymentSection';\nimport { MarketplacePaymentTerms } from 'src/modals/SaleDetails/components/MarketplacePaymentTerms';\nimport { PaymentSectionSelector } from 'src/modals/SaleDetails/components/PaymentSectionSelector';\nimport { TagsSection } from 'src/modals/SaleDetails/components/TagsSection';\nimport { useShouldHideForWastedSale } from 'src/modals/SaleDetails/hooks/useShouldHideForWastedSale';\nimport { SaleDetailsFooter } from 'src/modals/SaleDetails/SaleDetailsFooter';\nimport { SaleTicketsSection } from 'src/modals/SaleDetailsV2/components/SaleTickets/SaleTickets';\nimport { IconsFill, MoreIcon } from 'src/svgs/Viagogo';\nimport { SaleDeeplinkQueryParam } from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { getDeepLinkIdFromUrl } from 'src/utils/deepLinkUtils';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport {\n createSaleEventPageUrl,\n getSaleDetailsUpdateInput,\n} from 'src/utils/saleUtils';\nimport {\n AutoPoClient,\n Feature,\n Permission,\n SaleDetails,\n SaleInput,\n SaleLineItem,\n} from 'src/WebApiController';\n\nimport { PurchaseInfoSection } from '../common/PurchaseInfoSection';\nimport { Summary } from '../common/Summary';\nimport {\n ModalBodyDataContainer,\n ModalBodyHeaderContainer,\n} from '../Modal/Modal.styled';\nimport { CommissionsSection } from '../SaleDetails/components/Commissions';\nimport { DeliverySection } from './components/DeliverySection';\nimport { FulfillmentSection } from './components/FulfillmentSection';\nimport { YourSaleSection } from './components/YourSaleSection';\n\nexport const SaleDetailsModalV2 = () => {\n const activeId = getDeepLinkIdFromUrl(\n SaleDeeplinkQueryParam,\n window.location.href\n );\n const {\n isLoading,\n posEntity: sale,\n loadingState,\n } = useEventItemLoadingDisplay(\n FormatContentId.LoadingSaleId,\n FormatContentId.SearchingForSaleId,\n FormatContentId.CouldNotFindSaleId,\n activeId\n );\n\n if (!sale) {\n // If we don't have a sale yet, either return loading state or nothing\n return loadingState;\n }\n\n // If we do have a sale already, only return loadingState if it is not loading (ie, it's something else wrong)\n if (!isLoading && loadingState) return loadingState;\n\n return ;\n};\n\nconst SaleDetailsModalForm = ({ sale }: { sale: SaleDetails }) => {\n const methods = useForm({\n defaultValues: getSaleDetailsUpdateInput(sale),\n });\n\n return (\n \n \n }\n />\n \n\n \n \n \n );\n};\n\nconst SaleDetailsModalBody = () => {\n const { event, posEntity: sale } = useActivePosEntityContext();\n\n const hasSaleSkyboxNotesSectionFeature = useUserHasFeature(\n Feature.SaleSkyboxNotesSection\n );\n const hasCreatePermission = useUserHasAnyOfPermissions(\n Permission.Purchases_Create\n );\n const hasSaleSeatsSoldAs = useUserHasFeature(Feature.SaleSeatsSoldAs);\n\n const { activeAccountWebClientConfig } = useAppContext();\n const navigate = useNavigate();\n const { trackError } = useErrorBoundaryContext();\n const { watch, setValue } = useFormContext();\n const internalNotes = watch('internalNotes');\n const lineItems = watch('lineItems');\n\n const canUpdate = useUserCanUpdateSale(sale);\n const hideForWastedSale = useShouldHideForWastedSale(sale);\n const hasSaleDetailsMarketplaceTermsFeature =\n useHasSaleDetailsMarketplaceTermsFeature();\n\n const shouldQuery =\n activeAccountWebClientConfig.activeAccountId != null && sale?.id != null;\n const inboundEmailId = useQuery({\n queryKey: [\n 'AutoPoClient.getAutoPoClassifiedInboundEmailIdForEntity',\n activeAccountWebClientConfig,\n sale?.id,\n ],\n async queryFn() {\n if (!shouldQuery) {\n return null;\n }\n return new AutoPoClient(\n activeAccountWebClientConfig\n ).getAutoPoClassifiedInboundEmailIdForEntity(null, sale!.id);\n },\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError(\n 'AutoPoClient.getAutoPoClassifiedInboundEmailIdForEntity',\n error,\n {\n saleId: sale?.id,\n }\n );\n },\n },\n });\n\n const onLineItemChange = useCallback(\n (item: SaleLineItem, isDelete?: boolean) => {\n if (isDelete) {\n setValue(\n 'lineItems',\n posChangedField(\n lineItems?.value?.filter((l) => l.id !== item.id) ?? []\n ),\n {\n shouldDirty: true,\n }\n );\n } else {\n const indexExisting = lineItems?.value?.findIndex(\n (l) => l.id === item.id\n );\n if ((indexExisting ?? -1) >= 0) {\n lineItems!.value![indexExisting!] = item;\n setValue('lineItems', posChangedField([...lineItems!.value!]), {\n shouldDirty: true,\n });\n } else {\n item.id = -((lineItems?.value?.length ?? 0) + 1);\n setValue(\n 'lineItems',\n posChangedField([...(lineItems?.value ?? []), item]),\n {\n shouldDirty: true,\n }\n );\n }\n }\n },\n [lineItems, setValue]\n );\n\n const onInternalNotesChanged = useCallback(\n (notes?: string | null) => {\n if (notes !== internalNotes?.value) {\n setValue('internalNotes', posChangedField(notes ?? null), {\n shouldDirty: true,\n });\n }\n },\n [internalNotes?.value, setValue]\n );\n\n const saleEventUrl = useMemo(() => {\n const eventId = sale?.viagVirtualId;\n if (eventId) {\n return createSaleEventPageUrl(eventId, [SaleDeeplinkQueryParam]);\n }\n return undefined;\n }, [sale]);\n\n return (\n \n \n \n }\n align=\"end\"\n >\n {\n navigate(`/messages/${inboundEmailId.data}`);\n }}\n >\n \n \n \n )\n }\n />\n \n\n \n }>\n \n \n\n \n\n }>\n \n \n\n }>\n \n \n\n \n\n {hasSaleDetailsMarketplaceTermsFeature && (\n \n )}\n \n \n\n {!hideForWastedSale && (\n }>\n \n \n )}\n {!hideForWastedSale && (\n }>\n \n \n )}\n\n {!hasSaleSeatsSoldAs && (\n \n )}\n\n }>\n \n \n\n {hasSaleSkyboxNotesSectionFeature && (\n }>\n \n \n \n \n )}\n\n }>\n \n \n \n \n );\n};\n","import { SaleDeeplinkQueryParam } from 'src/utils/constants/constants';\n\nimport { SaleDetailsModalV2 } from '../SaleDetailsV2/SaleDetailsModalBody';\n\nexport const SaleDetailsModalConfig = {\n children: ,\n clickOutsideToClose: true,\n deepLinkKey: SaleDeeplinkQueryParam,\n deepLinkValue: undefined,\n size: 'slide-in',\n};\n","import { Content } from 'src/contexts/ContentContext';\nimport { Detail, DetailGroup, SectionContent } from 'src/modals/common';\nimport { AutoSourceTickets } from 'src/modals/SaleDetails/components/AutoSourceTickets';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { formatSeatDisplay } from 'src/utils/ticketUtils';\nimport { Seating, Ticket } from 'src/WebApiController';\n\nimport { ListingLinksDetail } from './ListingLinksDetail';\n\nexport const TicketsSection = ({\n section,\n row,\n seatFr,\n seatTo,\n quantity,\n tickets,\n listingId,\n originatedFromListingId,\n isSeatSaver,\n}: Seating & {\n quantity: number;\n tickets?: Ticket[];\n listingId?: number | null;\n originatedFromListingId?: number | null;\n isSeatSaver?: boolean | null;\n}) => {\n return (\n \n \n }\n detail={section}\n />\n \n\n \n } detail={row} />\n \n\n \n }\n detail={<>{formatSeatDisplay(seatFr, seatTo)}}\n />\n \n\n \n }\n detail={x {quantity}}\n />\n \n \n\n \n \n );\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { isEqual } from 'lodash-es';\nimport { useCallback, useMemo, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Link } from 'react-router-dom';\nimport { TableVirtuoso } from 'react-virtuoso';\nimport { NavLink } from 'reactstrap';\nimport { usePurchaseVendorSelector } from 'src/components/Selectors/PurchaseVendorSelector/usePurchaseVendorSelector';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n Content,\n getFormattedContent,\n useContent,\n useContentContext,\n} from 'src/contexts/ContentContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { vars } from 'src/core/themes';\nimport { Button, Radio, RadioGroup, SimpleTable, Stack } from 'src/core/ui';\nimport { useGetUserInfos } from 'src/hooks/userGetUserInfo';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { AttrLabel } from 'src/modals/common';\nimport { GenericFeatureIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { getPurchaseOrderRelativeUrl } from 'src/utils/purchaseUtils';\nimport { formatSeatDisplay } from 'src/utils/ticketUtils';\nimport {\n Feature,\n SaleClient,\n SaleDetails,\n Seating,\n SeatingForAlloc,\n} from 'src/WebApiController';\n\nimport * as styles from './SeatingAllocationInput.css';\n\nexport const SeatingAllocationInput = () => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n const { getValues, setValue, watch } = useFormContext();\n\n const [allPossibleSeatings, setAllPossibleSeatings] = useState(false);\n\n const sale = getValues();\n const seating = watch('seating');\n\n const ticketsForAllocationQuery = useQuery({\n queryKey: [\n 'SaleClient.getSeatingsForSaleAllocation',\n sale.id,\n allPossibleSeatings,\n ],\n queryFn: async () => {\n if (activeAccountWebClientConfig.activeAccountId == null) {\n return null;\n }\n const client = new SaleClient(activeAccountWebClientConfig);\n const data = await client.getSeatingsForSaleAllocation(\n sale.id,\n allPossibleSeatings,\n false\n );\n\n return data;\n },\n refetchOnWindowFocus: false,\n refetchOnMount: true,\n networkMode: 'offlineFirst',\n meta: {\n persist: false,\n onError: (error: ErrorTypes) => {\n showErrorDialog('SaleClient.getSeatingsForSaleAllocation', error, {\n trackErrorData: {\n saleId: sale.id,\n allPossibleSeatings: allPossibleSeatings,\n },\n });\n },\n },\n });\n\n const possibleSeatings = useMemo(() => {\n const possibleSeatings = ticketsForAllocationQuery.data?.possibleSeatings;\n if (!possibleSeatings) {\n return possibleSeatings;\n }\n\n const possibleSeatingsConsecutive = possibleSeatings.filter(\n (seating) => !seating.nonConsecSeats\n );\n\n const possibleSeatingsNonConsecutive = possibleSeatings.filter(\n (seating) => seating.nonConsecSeats\n );\n\n return [...possibleSeatingsConsecutive, ...possibleSeatingsNonConsecutive];\n }, [ticketsForAllocationQuery.data?.possibleSeatings]);\n\n const getIndexOf = useCallback(\n (seating: Seating) => {\n let index = possibleSeatings?.findIndex((s) =>\n isEqual(s.ticketIds?.toSorted(), seating.ticketIds?.toSorted())\n );\n\n if (index == null || index < 0) {\n // If we don't have any selected...\n if (possibleSeatings?.length) {\n const newS = possibleSeatings.some((s, i) => {\n if (s.recAlloc) {\n // ...auto-select the first recommended one if there is one\n setValue('seating', s);\n index = i;\n\n // break\n return true;\n }\n\n return false;\n });\n\n if (!newS && !sale.isSeatSaver) {\n // if we still have nothing, just select the first one\n setValue('seating', possibleSeatings[0]);\n index = 0;\n }\n }\n }\n\n return index;\n },\n [possibleSeatings, sale.isSeatSaver, setValue]\n );\n\n if (ticketsForAllocationQuery.isFetching && !possibleSeatings?.length) {\n return ;\n }\n\n return (\n {\n const selectedIndex = parseInt(value);\n const newSeating = possibleSeatings?.[selectedIndex];\n\n if (newSeating) {\n setValue('seating', newSeating);\n }\n }}\n value={getIndexOf(seating)?.toString()}\n >\n {possibleSeatings?.length ? (\n <>\n
    \n (\n \n \n  \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {' '}\n \n \n \n \n \n \n \n \n \n \n \n  \n \n \n )}\n itemContent={(index, seating) => (\n \n )}\n />\n
    \n {ticketsForAllocationQuery.data?.hasMoreAllocations && (\n setAllPossibleSeatings(!allPossibleSeatings)}\n >\n \n \n )}\n \n ) : (\n \n \n
    \n \n \n \n
    \n
    \n )}\n \n );\n};\n\nconst PossibleSeatingTableRow = ({\n seating,\n index,\n}: {\n seating: SeatingForAlloc;\n index: number;\n}) => {\n const recommended = useContent(ContentId.Recommended);\n const contentContext = useContentContext();\n const deactivatedText = useContent(ContentId.Deactivated);\n const hasDisplayDeactivatedUser = useUserHasFeature(\n Feature.DisplayDeactivatedUser\n );\n\n const {\n section,\n row,\n seatFr,\n seatTo,\n recAlloc,\n nonConsecSeats,\n tktsForAlloc,\n } = seating;\n\n const purchasedByUsers = useGetUserInfos([\n ...new Set(\n tktsForAlloc\n ?.filter((t) => t.purchasedBy != null)\n ?.map((t) => t.purchasedBy!)\n ),\n ]);\n\n const { availableVendors } = usePurchaseVendorSelector({});\n\n const vendorNames = useMemo(() => {\n const missingVendorNameIds = new Set(\n tktsForAlloc\n .filter((t) => !t.vendorName && t.vendorId)\n .map((t) => t.vendorId!)\n );\n\n const vendorNames = [...missingVendorNameIds]\n .map((id) => availableVendors[id]?.name)\n .filter((n) => n)\n .map((n) => n!);\n\n const uniqueNames = new Set([\n ...vendorNames,\n ...tktsForAlloc.filter((t) => t.vendorName).map((t) => t.vendorName!),\n ]);\n\n return [...uniqueNames];\n }, [availableVendors, tktsForAlloc]);\n\n const vendorAccountNames = useMemo(() => {\n const uniqueNames = new Set(\n tktsForAlloc\n .filter((t) => t.vendorAccEmail || t.vendorAccName)\n .map((t) => (t.vendorAccEmail || t.vendorAccName)!)\n );\n\n return [...uniqueNames];\n }, [tktsForAlloc]);\n\n const seatNumbersDisplay = useMemo(() => {\n const allSeatsHaveValues = tktsForAlloc?.every((t) => !!t.seat);\n\n if (allSeatsHaveValues) {\n return tktsForAlloc\n ?.map((t) => t.seat)\n .toSorted((a, b) =>\n a.localeCompare(b, undefined, { numeric: true, sensitivity: 'base' })\n ) // Sort alphanumerically, case insensitive. This may not follow the underlying ordinality of the seats, but for display purposes it's better\n .join(', ');\n }\n\n const allSeatsHaveListingOrdinal = tktsForAlloc?.every(\n (t) => t.listingOrd != null\n );\n\n return tktsForAlloc\n ?.toSorted((a, b) => {\n if (allSeatsHaveListingOrdinal) {\n return a.listingOrd! - b.listingOrd!;\n }\n return a.ticketOrd - b.ticketOrd;\n })\n .map((t) => {\n if (t.seat) {\n return t.seat;\n }\n\n return getFormattedContent(\n FormatContentId.SeatNumber,\n [\n (allSeatsHaveListingOrdinal\n ? t.listingOrd!\n : t.ticketOrd\n ).toString(),\n ],\n contentContext\n );\n })\n .join(', ');\n }, [contentContext, tktsForAlloc]);\n\n return (\n <>\n \n \n \n {section}\n {row}\n \n {nonConsecSeats ? (\n <>\n {seatNumbersDisplay ? (\n {seatNumbersDisplay}\n ) : (\n \n )}\n \n ) : (\n <>{formatSeatDisplay(seatFr, seatTo)}\n )}\n \n \n \n {Object.values(purchasedByUsers.data ?? {}).map((user) => (\n
    \n {' '}\n {`${user?.name} ${\n user?.isDeactivated && !hasDisplayDeactivatedUser\n ? ` (${deactivatedText})`\n : ''\n }`}\n
    \n ))}\n
    \n
    \n \n \n {vendorNames?.map((vn) =>
    {vn}
    )}\n
    \n
    \n \n \n {vendorAccountNames.map((van) => (\n
    {van}
    \n ))}\n
    \n
    \n \n \n \n \n \n \n );\n};\n","import { useFormContext } from 'react-hook-form';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Stack } from 'src/core/ui';\nimport { DetailSection } from 'src/modals/common';\nimport { TicketsSection } from 'src/modals/SaleDetails/components/TicketsSection';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SaleDetails, Seating } from 'src/WebApiController';\n\nimport { SeatingAllocationInput } from './SeatingAllocationInput';\n\nexport const SeatingAllocationInputV1 = ({\n originalSeating,\n}: {\n originalSeating: Seating;\n}) => {\n const { getValues } = useFormContext();\n\n const sale = getValues();\n\n return (\n \n <>\n
    \n \n
    \n\n \n\n }>\n \n \n \n\n } fullHeight>\n \n \n
    \n );\n};\n","import { useQuery } from '@tanstack/react-query';\nimport clsx from 'clsx';\nimport { useMemo, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Link } from 'react-router-dom';\nimport { TableVirtuoso } from 'react-virtuoso';\nimport { NavLink } from 'reactstrap';\nimport { usePurchaseVendorSelector } from 'src/components/Selectors/PurchaseVendorSelector/usePurchaseVendorSelector';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { vars } from 'src/core/themes';\nimport { Button, SimpleTable, Stack } from 'src/core/ui';\nimport { UseGetUserInfo, useGetUserInfos } from 'src/hooks/userGetUserInfo';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { AttrLabel } from 'src/modals/common';\nimport { GenericFeatureIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getPurchaseOrderRelativeUrl } from 'src/utils/purchaseUtils';\nimport {\n Feature,\n SaleClient,\n SaleDetails,\n SeatingForAlloc,\n TicketInfoForAllocation,\n} from 'src/WebApiController';\n\nimport * as styles from './SeatingAllocationInput.css';\n\nexport type FlattenedSeatingAllocation = TicketInfoForAllocation &\n Pick;\n\nexport const SeatingSingleTicketAllocationInput = ({\n selectedSeatings,\n setSelectedSeatings,\n}: {\n selectedSeatings: FlattenedSeatingAllocation[];\n setSelectedSeatings: React.Dispatch<\n React.SetStateAction\n >;\n}) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n const { getValues } = useFormContext();\n\n const [allPossibleSeatings, setAllPossibleSeatings] = useState(false);\n\n const sale = getValues();\n\n const selectedListingId = useMemo(() => {\n if (selectedSeatings.length) {\n return selectedSeatings[0].listingId;\n }\n\n return null;\n }, [selectedSeatings]);\n\n const hasRemoveListingRestrictionFeature = useUserHasFeature(Feature.AllocateSingleTicketListingRestrictionRemoval);\n\n const ticketsForAllocationQuery = useQuery({\n queryKey: [\n 'SaleClient.getSeatingsForSaleAllocation',\n sale.id,\n allPossibleSeatings,\n ],\n queryFn: async () => {\n if (activeAccountWebClientConfig.activeAccountId == null) {\n return null;\n }\n const client = new SaleClient(activeAccountWebClientConfig);\n const data = await client.getSeatingsForSaleAllocation(\n sale.id,\n allPossibleSeatings,\n true\n );\n return data;\n },\n refetchOnWindowFocus: false,\n refetchOnMount: true,\n networkMode: 'offlineFirst',\n meta: {\n persist: false,\n onError: (error: ErrorTypes) => {\n showErrorDialog('SaleClient.getSeatingsForSaleAllocation', error, {\n trackErrorData: {\n saleId: sale.id,\n allPossibleSeatings: allPossibleSeatings,\n },\n });\n },\n },\n });\n\n const possibleSeatings: FlattenedSeatingAllocation[] | undefined =\n useMemo(() => {\n const possibleSeatings = ticketsForAllocationQuery.data?.possibleSeatings;\n if (!possibleSeatings) {\n return possibleSeatings;\n }\n const seatingTickets: FlattenedSeatingAllocation[] = [];\n const ticketIds = new Set();\n\n const possibleSeatingsConsecutive = possibleSeatings.filter(\n (seating) => !seating.nonConsecSeats\n );\n\n const possibleSeatingsNonConsecutive = possibleSeatings.filter(\n (seating) => seating.nonConsecSeats\n );\n\n const filteredPossibleSeating = [\n ...possibleSeatingsConsecutive,\n ...possibleSeatingsNonConsecutive,\n ];\n\n filteredPossibleSeating.forEach((seating) => {\n seating.tktsForAlloc.forEach((ticket) => {\n if (!ticketIds.has(ticket.id)) {\n ticketIds.add(ticket.id);\n seatingTickets.push({\n section: seating.section,\n recAlloc: seating.recAlloc,\n ...ticket,\n });\n }\n });\n });\n\n return seatingTickets;\n }, [ticketsForAllocationQuery.data?.possibleSeatings]);\n\n const handleToggleSeating = (seating: FlattenedSeatingAllocation) => {\n setSelectedSeatings((prevSelected) => {\n const isAlreadySelected = prevSelected.some((s) => s.id === seating.id);\n\n if (isAlreadySelected) {\n const newSelected = prevSelected.filter((s) => s.id !== seating.id);\n return newSelected;\n } else {\n if (prevSelected.length >= sale.qtySold) {\n return prevSelected;\n } else {\n const newSelected = [...prevSelected, seating];\n return newSelected;\n }\n }\n });\n };\n\n const userIds = possibleSeatings\n ?.map((seating) => seating.purchasedBy)\n .filter((id): id is string => id !== null);\n\n const purchasedByUsers = useGetUserInfos(userIds);\n\n if (ticketsForAllocationQuery.isFetching && !possibleSeatings?.length) {\n return ;\n }\n\n return (\n <>\n {possibleSeatings?.length ? (\n \n
    \n (\n \n \n  \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {' '}\n \n \n \n \n \n \n \n \n \n \n \n  \n \n \n )}\n itemContent={(index, seating) => (\n s.id === seating.id)}\n handleSelection={handleToggleSeating}\n purchasedBy={\n seating.purchasedBy\n ? purchasedByUsers?.data\n ? purchasedByUsers.data[seating.purchasedBy]\n : null\n : null\n }\n disabled={\n hasRemoveListingRestrictionFeature ? \n false : (selectedListingId != null && seating.listingId !== selectedListingId)\n }\n />\n )}\n />\n
    \n {ticketsForAllocationQuery.data?.hasMoreAllocations && (\n setAllPossibleSeatings(!allPossibleSeatings)}\n >\n \n \n )}\n
    \n ) : (\n \n \n
    \n \n \n \n
    \n
    \n )}\n \n );\n};\n\nconst PossibleSeatingTableRow = ({\n seating,\n isSelected,\n handleSelection,\n purchasedBy,\n disabled,\n}: {\n seating: FlattenedSeatingAllocation;\n handleSelection: (seating: FlattenedSeatingAllocation) => void;\n isSelected: boolean;\n purchasedBy?: UseGetUserInfo | null;\n disabled?: boolean;\n}) => {\n const recommended = useContent(ContentId.Recommended);\n const deactivatedText = useContent(ContentId.Deactivated);\n const hasDisplayDeactivatedUser = useUserHasFeature(\n Feature.DisplayDeactivatedUser\n );\n const {\n seat,\n section,\n row,\n vendorId,\n vendorName,\n vendorAccEmail,\n vendorAccName,\n recAlloc,\n listingId,\n } = seating;\n\n const { availableVendors } = usePurchaseVendorSelector({});\n return (\n <>\n \n handleSelection(seating)}\n label={null}\n disabled={disabled}\n />\n \n \n {section}\n \n \n {row}\n \n \n {seat}\n \n \n {`#${listingId}`}\n \n \n {`${purchasedBy?.name} ${\n purchasedBy?.isDeactivated && !hasDisplayDeactivatedUser\n ? ` (${deactivatedText})`\n : ''\n }`}\n \n \n {vendorId ? availableVendors[vendorId]?.name : vendorName}\n \n \n {vendorAccEmail || vendorAccName}\n \n \n \n \n \n \n \n );\n};\n","import { SetStateAction } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Stack } from 'src/core/ui';\nimport * as Tabs from 'src/core/ui/Tabs';\nimport { DetailSection } from 'src/modals/common';\nimport { TicketsSection } from 'src/modals/SaleDetails/components/TicketsSection';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SaleDetails, Seating } from 'src/WebApiController';\n\nimport { SeatingAllocationInput } from './SeatingAllocationInput';\nimport * as styles from './SeatingAllocationInput.css';\nimport {\n FlattenedSeatingAllocation,\n SeatingSingleTicketAllocationInput,\n} from './SeatingSingleTicketAllocationInput';\n\nexport const enum SeatingAllocationInputTab {\n Listings = 'listings',\n Tickets = 'tickets',\n}\n\nexport const SeatingAllocationInputV2 = ({\n selectedSeatings,\n setSelectedSeatings,\n activeTab,\n setActiveTab,\n originalSeating,\n}: {\n selectedSeatings: FlattenedSeatingAllocation[];\n setSelectedSeatings: React.Dispatch<\n React.SetStateAction\n >;\n activeTab: SeatingAllocationInputTab;\n setActiveTab: React.Dispatch>;\n originalSeating: Seating;\n}) => {\n const { getValues } = useFormContext();\n\n const sale = getValues();\n\n return (\n \n
    \n \n
    \n\n \n\n }>\n \n \n } fullHeight>\n {\n setActiveTab(value as SeatingAllocationInputTab);\n setSelectedSeatings([]);\n }}\n className={styles.tabsSection}\n >\n {/* Do not remove this empty div or the tab-list will display a weird scroll - this is due to the virtuoso content body */}\n
    \n \n \n \n \n \n \n \n \n
    \n \n \n \n \n \n \n \n
    \n
    \n );\n};\n","import { maxBy } from 'lodash';\nimport { useCallback, useContext, useState } from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { ConfirmButton } from 'src/components/Buttons';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { useEventItemLoadingDisplay } from 'src/hooks/useEventItemLoadingDisplay';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { CancellableFormFooter } from 'src/modals/common';\nimport { CancellableFormHeader } from 'src/modals/common/CancellableFormHeader';\nimport { ConnectedEventEntityHeader } from 'src/modals/common/EventEntityHeader';\nimport {\n SeatingAllocationInputTab,\n SeatingAllocationInputV1,\n SeatingAllocationInputV2,\n} from 'src/modals/ConfirmSale/SeatingAllocationInput';\nimport { ModalBody, ModalFooter, ModalProps } from 'src/modals/Modal';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { isSuccess } from 'src/utils/errorUtils';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport { getPosManagedMarketplaceSaleInputFromSale } from 'src/utils/saleUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ApiException,\n Feature,\n Marketplace,\n PointOfSaleSaleStatus,\n PosUiActionResult,\n SaleActionType,\n SaleClient,\n SaleDetails,\n Seating,\n} from 'src/WebApiController';\n\nimport { Summary } from '../common/Summary';\nimport {\n ModalBodyDataContainer,\n ModalBodyHeaderContainer,\n} from '../Modal/Modal.styled';\nimport { FlattenedSeatingAllocation } from './SeatingAllocationInput/SeatingSingleTicketAllocationInput';\n\nexport type ConfirmSaleProps = {\n cancelTo?: ModalProps;\n action:\n | SaleActionType.Confirm\n | SaleActionType.Allocate\n | SaleActionType.ConfirmAllocation;\n};\n\nexport const ConfirmSaleModal = (props: ConfirmSaleProps) => {\n const { loadingState } = useEventItemLoadingDisplay(\n FormatContentId.LoadingSaleId,\n FormatContentId.SearchingForSaleId,\n FormatContentId.CouldNotFindSaleId\n );\n\n return loadingState ? loadingState : ;\n};\n\nconst ConfirmSaleModalContent = ({ cancelTo, action }: ConfirmSaleProps) => {\n const {\n event,\n posEntity: sale,\n setActivePosEntity,\n } = useActivePosEntityContext();\n const { showErrorDialog, genericError } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const { setModal, closeModal } = useContext(ModalContext);\n const [isSubmitting, setIsSubmitting] = useState(false);\n\n const hasAllocatedSingleTicketFeature = useUserHasFeature(\n Feature.AllocateSingleTickets\n );\n\n const [activeTab, setActiveTab] = useState(\n SeatingAllocationInputTab.Listings\n );\n\n const [showSectionRowChangeWarning, setShowSectionRowChangeWarning] =\n useState(false);\n\n const methods = useForm({\n defaultValues: sale!,\n });\n\n const { isDirty } = methods.formState;\n const seating = methods.watch('seating');\n\n const [selectedSeatings, setSelectedSeatings] = useState<\n FlattenedSeatingAllocation[]\n >([]);\n\n const createSeatingFromSelectedTickets = (\n selectedTickets: FlattenedSeatingAllocation[]\n ): Seating => {\n // Find the most frequent section and row\n const sectionCounts: Record = {};\n const rowCounts: Record = {};\n\n selectedTickets.forEach((ticket) => {\n const { section, row } = ticket;\n sectionCounts[section] = (sectionCounts[section] || 0) + 1;\n rowCounts[row || ''] = (rowCounts[row || ''] || 0) + 1;\n });\n\n const mostFrequentSection = maxBy(\n Object.entries(sectionCounts),\n ([_, value]) => value\n )?.[0];\n\n const mostFrequentRow = maxBy(\n Object.entries(rowCounts),\n ([_, value]) => value\n )?.[0];\n\n // SeatFr & SeatTo sort by listingOrd or seat text\n let sortedTickets: FlattenedSeatingAllocation[] = [];\n\n const allHaveListingOrd = selectedTickets.every(\n (ticket) => ticket.listingOrd != null\n );\n\n if (allHaveListingOrd) {\n sortedTickets = selectedTickets.toSorted(\n (a, b) => (a.listingOrd || 0) - (b.listingOrd || 0)\n );\n } else {\n sortedTickets = selectedTickets.toSorted((a, b) =>\n (a.seat || '').localeCompare(b.seat || '', undefined, {\n numeric: true,\n })\n );\n }\n\n const seatFr = sortedTickets[0]?.seat || null;\n const seatTo = sortedTickets[sortedTickets.length - 1]?.seat || null;\n\n // Collect ticketIds & listingIds\n const ticketIds = selectedTickets.map((ticket) => ticket.id);\n const listingIds = selectedTickets.reduce((ids, ticket) => {\n if (ticket.listingId != null) {\n ids.push(ticket.listingId);\n }\n return ids;\n }, []);\n\n const seating: Seating = {\n section: mostFrequentSection || '',\n sectionId: null,\n row: mostFrequentRow || null,\n rowId: null,\n seatFr,\n seatTo,\n ticketIds,\n listingIds,\n };\n\n return seating;\n };\n\n const onSubmit = useCallback(\n async (saleForm: SaleDetails, skipAllocation?: boolean) => {\n // If this is called, there are no form errors (else onSubmit is never called)\n if (sale) {\n if (\n !showSectionRowChangeWarning &&\n (saleForm.seating.section !== sale.seating.section ||\n saleForm.seating.row !== sale.seating.row)\n ) {\n setShowSectionRowChangeWarning(true);\n return;\n }\n setIsSubmitting(true);\n\n tryInvokeApi(\n async () => {\n let result: PosUiActionResult;\n const client = new SaleClient(activeAccountWebClientConfig);\n if (\n sale.mkp === Marketplace.Offline &&\n (sale.status === PointOfSaleSaleStatus.Hold ||\n sale.status === PointOfSaleSaleStatus.CancelledHold ||\n sale.status === PointOfSaleSaleStatus.PendingRejection ||\n sale.status === PointOfSaleSaleStatus.Rejected)\n ) {\n // If it's offline sale and it's currently on hold or cancelled hold,\n result = await client.mergePosManagedMarketplaceSale({\n ...getPosManagedMarketplaceSaleInputFromSale(sale, event!),\n saleStatus: posChangedField(\n PointOfSaleSaleStatus.PendingConfirmation\n ),\n });\n\n if (!isSuccess(result)) {\n showErrorDialog(\n 'SaleClient.mergePosManagedMarketplaceSale',\n {\n message: result.message ?? genericError,\n status: result.status!,\n } as ApiException,\n {\n onDismissError: () => cancelTo && setModal(cancelTo),\n trackErrorData: {\n item1: saleForm.id,\n item2: saleForm.seating,\n },\n }\n );\n return;\n }\n }\n\n const skipAllocationValidation =\n activeTab === SeatingAllocationInputTab.Tickets;\n\n result = await client.confirmAllocationSale(\n saleForm.id,\n skipAllocation ? undefined : saleForm.seating,\n skipAllocationValidation\n );\n\n if (!isSuccess(result)) {\n showErrorDialog(\n 'SaleClient.confirmSale',\n {\n message: result.message ?? genericError,\n status: result.status!,\n } as ApiException,\n {\n onDismissError: () => cancelTo && setModal(cancelTo),\n trackErrorData: {\n item1: saleForm.id,\n item2: saleForm.seating,\n },\n }\n );\n } else {\n // Refresh the active data so the SaleDetail dialog and table will have the new content\n await setActivePosEntity(saleForm!.id, saleForm!.idOnMkp, true);\n if (cancelTo) {\n setModal(cancelTo);\n } else {\n closeModal(true);\n }\n }\n },\n (error) => {\n showErrorDialog('SaleClient.confirmSale', error, {\n trackErrorData: {\n saleId: saleForm.id,\n seation: saleForm.seating,\n },\n });\n },\n () => setIsSubmitting(false)\n );\n }\n\n return false;\n },\n [\n activeAccountWebClientConfig,\n activeTab,\n cancelTo,\n closeModal,\n event,\n genericError,\n sale,\n setActivePosEntity,\n setModal,\n showErrorDialog,\n showSectionRowChangeWarning,\n ]\n );\n\n const updateSeatingValueFromSingleTicketSelection = useCallback(() => {\n if (\n !hasAllocatedSingleTicketFeature ||\n activeTab === SeatingAllocationInputTab.Listings\n ) {\n return;\n }\n const seating = createSeatingFromSelectedTickets(selectedSeatings);\n methods.setValue('seating', seating); // Update form state\n }, [activeTab, hasAllocatedSingleTicketFeature, methods, selectedSeatings]);\n\n const contentId =\n action === SaleActionType.Confirm\n ? ContentId.ConfirmSale\n : action === SaleActionType.ConfirmAllocation\n ? ContentId.ConfirmAllocation\n : ContentId.AllocateTickets;\n\n return (\n \n \n } />\n \n\n \n \n
    \n \n \n {isSubmitting ? (\n \n ) : showSectionRowChangeWarning ? (\n \n ) : hasAllocatedSingleTicketFeature ? (\n \n ) : (\n \n )}\n \n \n\n \n \n {showSectionRowChangeWarning && (\n setShowSectionRowChangeWarning(false)}\n disabled={isSubmitting}\n textContentId={ContentId.Back}\n />\n )}\n {action === SaleActionType.Confirm &&\n sale?.isSeatSaver &&\n !seating?.ticketIds?.length && (\n onSubmit(f, true))}\n disabled={isSubmitting}\n variant=\"outline\"\n textContentId={ContentId.ConfirmWithoutAllocation}\n />\n )}\n {\n updateSeatingValueFromSingleTicketSelection();\n methods.handleSubmit((f) => onSubmit(f))();\n }}\n disabled={\n isSubmitting ||\n (hasAllocatedSingleTicketFeature &&\n activeTab === SeatingAllocationInputTab.Tickets\n ? selectedSeatings.length < (sale?.qtySold || 0)\n : !seating?.ticketIds?.length)\n }\n textContentId={\n showSectionRowChangeWarning\n ? ContentId.Yes\n : ContentId.ConfirmAllocation\n }\n />\n \n \n \n );\n};\n\nconst SeatingAllocationWarning = () => {\n return (\n
    \n
    \n \n
    \n }\n />\n
    \n );\n};\n","import { ComponentProps, useCallback, useContext } from 'react';\nimport { ConfirmButton } from 'src/components/Buttons';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { vars } from 'src/core/themes';\nimport { ButtonProps } from 'src/core/ui';\nimport { ConfirmSaleModal } from 'src/modals/ConfirmSale';\nimport { IconsFill, SearchOutlineIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n ActionOutboxEntityType,\n PointOfSaleSaleStatus,\n SaleActionType,\n SaleDetails,\n} from 'src/WebApiController';\n\nexport const LaunchConfirmSale = ({\n action,\n saleId,\n marketplaceSaleId,\n saleStatus,\n cancelTo,\n variant,\n ...buttonProps\n}: {\n action:\n | SaleActionType.Confirm\n | SaleActionType.Allocate\n | SaleActionType.ConfirmAllocation;\n saleId: number;\n marketplaceSaleId?: string | null;\n saleStatus: PointOfSaleSaleStatus;\n variant?: ButtonProps['variant'];\n iconOnlyMode?: boolean;\n disabled?: boolean;\n} & ComponentProps) => {\n const { setModal } = useContext(ModalContext);\n const { setActivePosEntity } = useActivePosEntityContext();\n\n const confirmSale = useCallback(() => {\n setModal({\n children: ,\n clickOutsideToClose: true,\n size: 'slide-in',\n deepLinkValue: saleId,\n trackViewEntityType: ActionOutboxEntityType.Sale,\n });\n }, [setModal, cancelTo, action, saleId]);\n\n const onLaunchDialog = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n\n setActivePosEntity(saleId, marketplaceSaleId);\n confirmSale();\n },\n [confirmSale, marketplaceSaleId, setActivePosEntity, saleId]\n );\n\n const contentId =\n action === SaleActionType.Confirm\n ? saleStatus === PointOfSaleSaleStatus.CancelledHold\n ? ContentId.UndoCancel\n : ContentId.ConfirmSale\n : action === SaleActionType.ConfirmAllocation\n ? ContentId.ConfirmAllocation\n : ContentId.AllocateTickets;\n\n return (\n \n ) : undefined\n }\n />\n );\n};\n","import { ComponentProps } from 'react';\nimport { vars } from 'src/core/themes';\nimport { IconsFill, ResetIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { ButtonWithIcon } from './ButtonWithIcon';\n\nexport const DeallocateButton = ({\n textContentId,\n iconOnlyMode,\n variant,\n icon,\n ...props\n}: ComponentProps) => {\n return (\n \n )\n }\n iconOnlyMode={iconOnlyMode}\n variant={variant}\n textContentId={textContentId || ContentId.DeallocateSale}\n />\n );\n};\n","import React, { useCallback, useState } from 'react';\nimport { DeallocateButton } from 'src/components/Buttons/DeallocateButton';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { ConfirmDialog } from 'src/core/interim/dialogs/ConfirmDialog';\nimport { vars } from 'src/core/themes';\nimport { ButtonProps, Stack } from 'src/core/ui';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { ErrorOutlineIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { isSuccess } from 'src/utils/errorUtils';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport { getPosManagedMarketplaceSaleInputFromSale } from 'src/utils/saleUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n ActivityLogClient,\n ApiException,\n Marketplace,\n Permission,\n PointOfSaleSaleStatus,\n SaleActionType,\n SaleClient,\n SaleDetails,\n} from 'src/WebApiController';\n\nimport * as styles from './LaunchDeallocateSale.css';\n\nexport const LaunchDeallocateSale = ({\n action,\n saleId,\n marketplaceSaleId,\n marketplace,\n saleStatus,\n variant,\n iconOnlyMode,\n disabled,\n}: {\n action: SaleActionType.Deallocate | SaleActionType.RejectAllocation;\n saleId: number;\n marketplaceSaleId?: string | null;\n marketplace?: Marketplace | null;\n saleStatus: PointOfSaleSaleStatus;\n variant?: ButtonProps['variant'];\n iconOnlyMode?: boolean;\n disabled?: boolean;\n}) => {\n const [isLoading, setIsLoading] = useState(false);\n const { showErrorDialog, genericError } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const { event, posEntity, setActivePosEntity } =\n useActivePosEntityContext();\n\n const hasPermission = useUserHasAnyOfPermissions(\n Permission.SellerAccount_Admin\n );\n\n const { launchDialog, closeDialog, dialogProps } = useBasicDialog();\n const [shouldAdminHold, setShouldAdminHold] = useState(false);\n const onToggleAdminHold = useCallback(\n () => setShouldAdminHold((prev) => !prev),\n []\n );\n\n const deallocateSale = useCallback(() => {\n setIsLoading(true);\n tryInvokeApi(\n async () => {\n const client = new SaleClient(activeAccountWebClientConfig);\n\n if (\n marketplace === Marketplace.Offline &&\n saleStatus === PointOfSaleSaleStatus.Fulfilled\n ) {\n // If the Offline Sale is set to be Fulfilled - it can't just be deallocated\n // We need to put it back to PendingFulfillment first then the Deallocation will work\n let saleDetails = posEntity;\n if (saleDetails == null) {\n saleDetails = await client.getSaleBySaleId(saleId);\n }\n const offlineSaleUpdate = getPosManagedMarketplaceSaleInputFromSale(\n saleDetails,\n event!\n );\n\n offlineSaleUpdate.saleStatus = posChangedField(\n PointOfSaleSaleStatus.PendingFulfillment\n );\n await client.mergePosManagedMarketplaceSale(offlineSaleUpdate);\n }\n\n const result = await client.deallocateSale(saleId, shouldAdminHold);\n if (!isSuccess(result)) {\n showErrorDialog(\n 'SaleClient.deallocateSale',\n {\n message: result.message ?? genericError,\n status: result.status!,\n } as ApiException,\n {\n trackErrorData: { saleId },\n }\n );\n } else {\n await setActivePosEntity(saleId, marketplaceSaleId, true);\n }\n },\n (error) => {\n showErrorDialog('SaleClient.deallocateSale', error, {\n trackErrorData: { saleId },\n });\n },\n () => {\n setIsLoading(false);\n closeDialog();\n }\n );\n }, [\n activeAccountWebClientConfig,\n closeDialog,\n event,\n genericError,\n marketplace,\n marketplaceSaleId,\n posEntity,\n saleId,\n saleStatus,\n setActivePosEntity,\n shouldAdminHold,\n showErrorDialog,\n ]);\n\n const onLaunchDialog = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n\n new ActivityLogClient(activeAccountWebClientConfig).trackEntityView(\n saleId,\n ActionOutboxEntityType.Sale\n );\n launchDialog();\n },\n [saleId, launchDialog, activeAccountWebClientConfig]\n );\n\n const contentId =\n action === SaleActionType.RejectAllocation\n ? ContentId.RejectAllocation\n : ContentId.DeallocateSale;\n\n return (\n
    \n \n ) : undefined\n }\n />\n }\n onOkay={deallocateSale}\n bodyText={\n \n \n {hasPermission && action !== SaleActionType.RejectAllocation && (\n }\n />\n )}\n \n }\n />\n
    \n );\n};\n","import { useCallback, useState } from 'react';\nimport { ButtonWithIcon } from 'src/components/Buttons';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { vars } from 'src/core/themes';\nimport { ButtonProps } from 'src/core/ui';\nimport { RotatingWrapper } from 'src/core/ui/AnimatingWrapper';\nimport { DownloadIcon, ProcessingIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { downloadFileFromBlob } from 'src/utils/fileUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { SaleClient } from 'src/WebApiController';\n\nexport const LaunchDownloadUserDocuments = ({\n saleId,\n variant,\n iconOnlyMode,\n disabled,\n}: {\n saleId: number;\n variant?: ButtonProps['variant'];\n iconOnlyMode?: boolean;\n disabled?: boolean;\n}) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n const [isLoading, setIsLoading] = useState(false);\n\n const onDownload = useCallback(async () => {\n setIsLoading(true);\n return await tryInvokeApi(\n async () => {\n const result = await new SaleClient(\n activeAccountWebClientConfig\n ).downloadMergedUserDocumentsPdf(saleId);\n if (result.data) {\n downloadFileFromBlob(result.fileName ?? 'tickets.pdf', result.data);\n }\n },\n (error) => {\n showErrorDialog('ListingClient.downloadMergedUserDocumentsPdf', error);\n },\n () => setIsLoading(false)\n );\n }, [activeAccountWebClientConfig, saleId, showErrorDialog]);\n\n const onClickHandler = useCallback(\n (e: React.MouseEvent) => {\n onDownload();\n },\n [onDownload]\n );\n\n const iconFill =\n iconOnlyMode || (variant && variant !== 'regular')\n ? vars.color.textBrand\n : vars.color.textInverted;\n\n return (\n \n \n \n ) : (\n \n )\n }\n />\n );\n};\n","import { useQuery, UseQueryResult } from '@tanstack/react-query';\nimport { useMemo } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { PosSelectProps } from 'src/core/POS/PosSelect';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { BuyerInfo, SaleClient } from 'src/WebApiController';\n\nexport type UseBuyerSelectorOptions = {\n disabled?: boolean;\n additionalOptions?: Record;\n additionalOptionsPosition?: 'top' | 'bottom';\n placeholderText?: string | ContentId;\n};\n\nexport const useBuyerSelector = ({\n disabled,\n additionalOptions,\n additionalOptionsPosition = 'bottom',\n placeholderText,\n}: UseBuyerSelectorOptions): {\n query: UseQueryResult;\n posSelectProps: Pick<\n PosSelectProps,\n 'placeholderText' | 'valueOptionsContent'\n >;\n} => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n\n const shouldQuery =\n !disabled && activeAccountWebClientConfig.activeAccountId != null;\n const query = useQuery({\n queryKey: [\n 'getAllAvailableBuyers',\n activeAccountWebClientConfig.activeAccountId,\n ],\n queryFn: () => {\n if (!shouldQuery) {\n return null;\n }\n return tryInvokeApi(\n () => {\n return new SaleClient(\n activeAccountWebClientConfig\n ).getAllAvailableBuyers();\n },\n (error) => {\n trackError('SaleClient.getAllAvailableBuyers', error);\n }\n );\n },\n\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n });\n\n const availableBuyers = useMemo(() => {\n const dataSorted = query.data?.toSorted((a: BuyerInfo, b: BuyerInfo) =>\n a.email.localeCompare(b.email)\n );\n\n const results = dataSorted?.reduce(\n (r, cur) => {\n r[cur.email] = `${cur.email}${cur.name ? ` (${cur.name})` : ''}`;\n return r;\n },\n (additionalOptions && additionalOptionsPosition === 'top'\n ? additionalOptions\n : {}) as Record\n );\n\n return {\n ...(additionalOptionsPosition === 'top' ? additionalOptions : {}),\n ...(results ?? {}),\n ...(additionalOptionsPosition === 'bottom' ? additionalOptions : {}),\n };\n }, [query.data, additionalOptions, additionalOptionsPosition]);\n\n return {\n query,\n posSelectProps: {\n placeholderText: placeholderText ?? ContentId.ChooseBuyer,\n valueOptionsContent: availableBuyers,\n },\n };\n};\n","import { useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useBuyerSelector } from 'src/components/Selectors/BuyerSelector/useBuyerSelector';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosSelect } from 'src/core/POS/PosSelect';\nimport { getTextFieldState, PosTextField } from 'src/core/POS/PosTextField';\nimport { DetailGroup, DetailSection, SectionContent } from 'src/modals/common';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport { PosManagedMarketplaceSaleInput } from 'src/WebApiController';\n\ntype MarketplaceSaleInputBuyer = Pick<\n PosManagedMarketplaceSaleInput,\n 'marketplaceSaleId' | 'buyerEmail' | 'buyerName' | 'buyerPhone' | 'saleId'\n>;\n\nexport const BuyerSection = ({ disabled }: { disabled?: boolean }) => {\n const requiredMsg = useContent(ContentId.Required);\n\n const { register, formState, setValue, getValues, clearErrors } =\n useFormContext();\n\n const { buyerEmail } = getValues();\n const { query, posSelectProps } = useBuyerSelector({\n disabled,\n placeholderText: ContentId.AddNewBuyer,\n });\n const [selectedBuyer, setSelectedBuyer] = useState(\n buyerEmail?.value ?? ''\n );\n\n const isEdit = formState?.defaultValues?.saleId != null;\n const buyerEmailError = formState.errors.buyerEmail?.message;\n const orderIdError = formState.errors.marketplaceSaleId?.message;\n return (\n }>\n \n \n }\n errors={orderIdError}\n >\n \n \n }>\n {\n setSelectedBuyer(newSelection);\n if (newSelection !== 'AddNewBuyer') {\n clearErrors('buyerEmail');\n setValue('buyerEmail', posChangedField(newSelection));\n const buyer = query.data?.find(\n (b) => b.email === newSelection\n );\n if (buyer) {\n setValue('buyerName', posChangedField(buyer.name));\n setValue('buyerPhone', posChangedField(buyer.phone));\n }\n }\n }}\n />\n \n }\n errors={buyerEmailError}\n >\n {\n const buyer = query.data?.find((b) => b.email === value);\n if (!buyer) {\n setSelectedBuyer('');\n } else {\n setValue('buyerEmail', posChangedField(value));\n setValue('buyerName', posChangedField(buyer.name));\n setValue('buyerPhone', posChangedField(buyer.phone));\n setSelectedBuyer(value);\n }\n },\n })}\n />\n \n }>\n {\n setValue('buyerName', posChangedField(value));\n },\n })}\n />\n \n }>\n {\n setValue('buyerPhone', posChangedField(value));\n },\n })}\n />\n \n \n \n \n );\n};\n","import { ChangeEvent, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { CurrencyFilterSelector } from 'src/components/Selectors/CurrencyFilterSelector';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { DatePickerInput } from 'src/core/POS/DateSelector';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { PosTextArea } from 'src/core/POS/PosTextArea';\nimport { getTextFieldState } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { DetailSection, SectionContent } from 'src/modals/common';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n SALE_PAYMENT_STATE_TO_CID,\n SALES_STATUS_TO_CID,\n} from 'src/utils/constants/contentIdMaps';\nimport { getLocaleFromLanguageOrCurrent } from 'src/utils/localeUtils';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport {\n PointOfSaleSaleStatus,\n PosManagedMarketplaceSaleInput,\n} from 'src/WebApiController';\n\nconst statusAllowedChangeable = [\n PointOfSaleSaleStatus.PendingFulfillment,\n PointOfSaleSaleStatus.ProcessingFulfillment,\n PointOfSaleSaleStatus.Fulfilled,\n PointOfSaleSaleStatus.FulfillmentFailed,\n];\n\ntype MarketplaceSaleInputMarketplaceInfo = Pick<\n PosManagedMarketplaceSaleInput,\n | 'saleId'\n | 'saleDate'\n | 'saleStatus'\n | 'paymentState'\n | 'inHandDate'\n | 'totalNetProceeds'\n | 'internalNotes'\n | 'currencyCode'\n>;\n\nexport const MarketplaceSaleInfoSection = ({\n disabled,\n}: {\n disabled?: boolean;\n}) => {\n const { getValues, watch, formState, setValue, clearErrors } =\n useFormContext();\n const {\n saleId,\n saleDate,\n saleStatus,\n paymentState,\n inHandDate,\n totalNetProceeds,\n internalNotes,\n } = getValues();\n const currencyCode = watch('currencyCode');\n\n const saleDateError = formState.errors.saleDate?.message;\n const currencyCodeError = formState.errors.currencyCode?.message;\n const inHandDateError = formState.errors.inHandDate?.message;\n const totalNetProceedsError = formState.errors.totalNetProceeds?.message;\n\n const { getUiCurrency } = useLocalizationContext();\n const uiCurrency = useMemo(\n () => getUiCurrency(currencyCode?.value),\n [getUiCurrency, currencyCode]\n );\n\n const isMobile = useMatchMedia('mobile');\n\n const allowChangingSaleStatus =\n saleStatus &&\n statusAllowedChangeable.includes(\n saleStatus?.value ?? PointOfSaleSaleStatus.PendingAllocation\n );\n\n const allowedSaleStatus = useMemo(() => {\n if (allowChangingSaleStatus) {\n const saleStatusOptions: Record = {};\n statusAllowedChangeable.forEach((s) => {\n saleStatusOptions[s] = SALES_STATUS_TO_CID[s];\n });\n\n return saleStatusOptions;\n }\n\n return {};\n }, [allowChangingSaleStatus]);\n\n return (\n }>\n \n }\n errors={saleDateError}\n >\n {\n if (date) {\n clearErrors('saleDate');\n const dateStr = date.toISOString();\n if (dateStr !== saleDate?.value) {\n setValue('saleDate', posChangedField(dateStr));\n }\n }\n }}\n locale={getLocaleFromLanguageOrCurrent()}\n />\n \n }\n errors={inHandDateError}\n >\n {\n if (date) {\n clearErrors('inHandDate');\n const dateStr = date.toISOString();\n if (dateStr !== inHandDate?.value) {\n setValue('inHandDate', posChangedField(dateStr));\n }\n }\n }}\n locale={getLocaleFromLanguageOrCurrent()}\n />\n \n
    \n }\n errors={currencyCodeError}\n style={{ width: 'auto' }}\n >\n {\n if (\n newCurrencyCode &&\n newCurrencyCode !== currencyCode?.value\n ) {\n setValue('currencyCode', posChangedField(newCurrencyCode));\n }\n }}\n />\n \n }\n >\n ) => {\n const v = parseFloat(e.target.value) || 0;\n if (v >= 0 && v <= Number.MAX_VALUE) {\n clearErrors('totalNetProceeds');\n setValue('totalNetProceeds', posChangedField(v));\n }\n }}\n />\n \n
    \n {saleId && allowChangingSaleStatus && (\n }>\n {\n if (newStatus && newStatus !== saleStatus?.value) {\n setValue('saleStatus', posChangedField(newStatus));\n }\n }}\n />\n \n )}\n {saleId && (\n }>\n {\n if (newState && newState !== paymentState?.value) {\n setValue('paymentState', posChangedField(newState));\n }\n }}\n />\n \n )}\n }>\n {\n const newNotes = (e.target as HTMLInputElement).value;\n if (newNotes && newNotes !== internalNotes?.value) {\n setValue('internalNotes', posChangedField(newNotes));\n }\n }}\n onBlur={() => {\n const newNotes = internalNotes?.value?.trim();\n if (newNotes && newNotes !== internalNotes?.value) {\n setValue('internalNotes', posChangedField(newNotes));\n }\n }}\n />\n \n \n
    \n );\n};\n","import { isEqual } from 'lodash-es';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useGetEventMapConfig } from 'src/contexts/EventMapContext';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosEnumSelect, PosSelect } from 'src/core/POS/PosSelect';\nimport { getTextFieldState, PosTextField } from 'src/core/POS/PosTextField';\nimport { useTicketTypes } from 'src/hooks/api/useTicketTypes';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { DetailGroup, DetailSection, SectionContent } from 'src/modals/common';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { TICKET_TYPE_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport { getConsecutiveSeatingsForQuantity } from 'src/utils/saleUtils';\nimport { isSectionTypeGeneralAdmission } from 'src/utils/ticketUtils';\nimport {\n DeliveryType,\n Event,\n ListingDetails,\n PosManagedMarketplaceSaleInput,\n Ticket,\n TicketType,\n} from 'src/WebApiController';\n\ntype MarketplaceSaleInputTicket = Pick<\n PosManagedMarketplaceSaleInput,\n 'section' | 'row' | 'seatFrom' | 'seatTo' | 'ticketType' | 'quantitySold'\n>;\n\nexport const TicketSection = ({\n maxQuantity,\n deliveryType,\n disabled,\n tickets,\n event,\n listing,\n isEditingExisting,\n}: {\n maxQuantity?: number;\n deliveryType?: DeliveryType;\n disabled?: boolean;\n tickets?: Ticket[];\n event?: Event | null;\n listing?: ListingDetails;\n isEditingExisting?: boolean;\n}) => {\n const venueMapQuery = useGetEventMapConfig(\n event?.viagId,\n event?.viagId == null || listing?.sectionType != null\n );\n\n const requiredMsg = useContent(ContentId.Required);\n\n const { watch, getValues, register, formState, setValue, clearErrors } =\n useFormContext();\n const { section, row, seatFrom, seatTo, ticketType } = getValues();\n\n const quantitySold = watch('quantitySold');\n const sectionError = formState.errors.section?.message;\n const quantitySoldError = formState.errors.quantitySold?.message;\n const rowError = formState.errors.row?.message;\n const seatFromError = formState.errors.seatFrom?.message;\n const seatToError = formState.errors.seatTo?.message;\n const isMobile = useMatchMedia('mobile');\n\n const { ticketTypes } = useTicketTypes(deliveryType);\n\n const deliveryTypeToTicketTypesMap = useMemo(() => {\n const ticketTypeOptions = { ...TICKET_TYPE_TO_CID };\n if (deliveryType) {\n if (ticketTypes?.length) {\n Object.keys(ticketTypeOptions).forEach((k) => {\n const tt = k as TicketType;\n if (!ticketTypes.includes(tt)) {\n delete ticketTypeOptions[tt];\n }\n });\n\n // if ticket type is null or not exists in the options (because feature not allow)\n // default to 1st available ones\n if (\n ticketType?.value == null ||\n ticketTypeOptions[ticketType?.value] == null\n ) {\n setValue('ticketType', posChangedField(ticketTypes[0]));\n }\n }\n }\n\n return ticketTypeOptions;\n }, [deliveryType, setValue, ticketType, ticketTypes]);\n\n const [seatFromToOptions, setSeatFromToOptions] = useState<\n Record | undefined\n >();\n const [seatFromOptions, setSeatFromOptions] = useState<\n Record\n >({});\n\n const setSeatTo = useCallback(\n (quantitySold: number, seatFr: string, seatToOrdinal: number) => {\n if (quantitySold < 2) {\n setValue('seatTo', posChangedField(seatFr));\n } else {\n const t = tickets!.find((t) => t.lstOrd === seatToOrdinal);\n if (t) setValue('seatTo', posChangedField(t.seat));\n }\n },\n [setValue, tickets]\n );\n\n const canAllocateToNonConsecutiveSeats = useMemo(() => {\n let isSeatingGA = false;\n\n if (listing?.sectionType != null) {\n isSeatingGA = isSectionTypeGeneralAdmission(listing.sectionType);\n } else {\n const sections = venueMapQuery.data?.sections;\n if (sections != null && section != null) {\n isSeatingGA = isSectionTypeGeneralAdmission(\n sections.find(\n (s) =>\n s.name.toLocaleLowerCase() === section?.value?.toLocaleLowerCase()\n )?.sectionType\n );\n }\n }\n\n return isSeatingGA;\n }, [listing?.sectionType, section, venueMapQuery.data?.sections]);\n\n useEffect(() => {\n const result = getConsecutiveSeatingsForQuantity(\n tickets,\n quantitySold?.value,\n canAllocateToNonConsecutiveSeats\n );\n if (!result || listing?.isSeatSaver) return;\n\n if (result.maxAvailableQuantity < (quantitySold?.value ?? 0)) {\n // Current quantity sold not valid, so set new max possible quantity sold and quit\n // the next cycle of the use effect will recalculate the options\n setValue('quantitySold', posChangedField(result.maxAvailableQuantity));\n return;\n }\n\n const newSeatFromToOptions = result.result;\n\n if (\n tickets?.length &&\n newSeatFromToOptions &&\n !isEqual(newSeatFromToOptions, seatFromToOptions)\n ) {\n setSeatFromToOptions(newSeatFromToOptions);\n const seatFromOrdinals = Object.keys(newSeatFromToOptions);\n const newSeatFromOptions = seatFromOrdinals.reduce(\n (r, c) => {\n const t = tickets!.find((t) => t.lstOrd === parseInt(c));\n r[(t!.lstOrd ?? t!.ord).toString()] = t!.seat;\n return r;\n },\n {} as Record\n );\n\n if (!seatFrom?.value) {\n const seatFr = Object.values(newSeatFromOptions)[0];\n setValue('seatFrom', posChangedField(seatFr));\n\n const seatToOrdinal =\n newSeatFromToOptions![parseInt(seatFromOrdinals[0])];\n setSeatTo(quantitySold!.value!, seatFr, seatToOrdinal);\n } else {\n // Either the seatFr is no longer valid due to quantity change, or seatTo, need to revalidate both\n const seatFromTicket = tickets!.find((t) => t.seat === seatFrom.value);\n\n let seatFr = seatFromTicket!.seat;\n let seatFromOrdinal = seatFromTicket!.lstOrd ?? seatFromTicket!.ord;\n if (!seatFromOrdinals.includes(seatFromOrdinal.toString())) {\n seatFr = Object.values(newSeatFromOptions)[0];\n setValue('seatFrom', posChangedField(seatFr));\n seatFromOrdinal = parseInt(seatFromOrdinals[0]);\n }\n\n const seatToOrdinal = newSeatFromToOptions![seatFromOrdinal];\n setSeatTo(quantitySold!.value!, seatFr, seatToOrdinal);\n }\n\n setSeatFromOptions(newSeatFromOptions);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [quantitySold]);\n\n const ticketFrom = useMemo(() => {\n return tickets?.find((t) => t.seat === seatFrom?.value);\n }, [tickets, seatFrom?.value]);\n\n return (\n }>\n \n \n }\n >\n {\n const v = parseInt(e.target.value);\n if (v > 0 && v <= maxQuantity!) {\n clearErrors('quantitySold');\n\n if (v !== quantitySold?.value) {\n setValue('quantitySold', posChangedField(v));\n }\n } else {\n setValue('quantitySold', null);\n }\n }}\n />\n \n }\n >\n {\n if (t && t !== ticketType?.value) {\n setValue('ticketType', posChangedField(t));\n }\n }}\n />\n \n \n \n }\n >\n {\n setValue('section', posChangedField(value));\n },\n })}\n />\n \n }\n errors={rowError}\n >\n {\n setValue('row', posChangedField(value));\n },\n })}\n />\n \n }\n errors={seatFromError}\n >\n {\n const ord = parseInt(newSeatOrdinal);\n if (ord >= 0) {\n const fromTick = tickets!.find((t) => t.lstOrd === ord);\n const toTick = tickets!.find(\n (t) => t.lstOrd === seatFromToOptions![ord]\n );\n\n setValue('seatFrom', posChangedField(fromTick!.seat));\n setValue('seatTo', posChangedField(toTick!.seat));\n }\n }}\n />\n \n }\n errors={seatToError}\n >\n {\n setValue('seatTo', posChangedField(value));\n },\n })}\n />\n \n \n \n \n );\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { useMemo } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { selectDistinctListingIds } from 'src/utils/ticketUtils';\nimport {\n Event,\n ListingClient,\n ListingDetails,\n SaleDetails,\n} from 'src/WebApiController';\n\nimport { ModalBodyDataContainer } from '../Modal/Modal.styled';\nimport { BuyerSection } from './components/BuyerSection';\nimport { MarketplaceSaleInfoSection } from './components/MarketplaceSaleInfoSection';\nimport { TicketSection } from './components/TicketSection';\n\nexport const ManagedMarketplaceSaleBody = ({\n listing,\n sale,\n disabled,\n event,\n}: {\n listing?: ListingDetails;\n sale?: SaleDetails;\n disabled?: boolean;\n event?: Event | null;\n}) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const saleLinkedListingIds = useMemo(\n () =>\n sale &&\n (selectDistinctListingIds(sale?.tickets).filter(\n (l) => l != null\n ) as number[]),\n [sale]\n );\n\n const shouldQuery = Boolean(\n saleLinkedListingIds != null &&\n activeAccountWebClientConfig != null &&\n saleLinkedListingIds.length > 0\n );\n\n const saleLinkedListingQuantityQuery = useQuery({\n queryKey: [\n 'ListingClient.getListingAvailableQuantitiesByListingIds',\n saleLinkedListingIds,\n activeAccountWebClientConfig,\n ],\n queryFn: () => {\n if (!shouldQuery) return null;\n\n return new ListingClient(\n activeAccountWebClientConfig\n ).getListingAvailableQuantitiesByListingIds(saleLinkedListingIds!);\n },\n\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n });\n\n const linkedListingAvailableQuantities =\n saleLinkedListingQuantityQuery.data ?? 0;\n\n const maxQuantity = useMemo(() => {\n if (listing) {\n return listing.availQty;\n }\n\n return sale ? sale.ticketCnt + linkedListingAvailableQuantities : undefined;\n }, [linkedListingAvailableQuantities, listing, sale]);\n\n return (\n \n \n \n {saleLinkedListingQuantityQuery.isFetching ? (\n \n ) : (\n 0}\n />\n )}\n \n );\n};\n","import {\n ComponentProps,\n useCallback,\n useContext,\n useEffect,\n useState,\n} from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { useNavigate } from 'react-router-dom';\nimport { OkButton } from 'src/components/Buttons/OkButton';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { useEventItemLoadingDisplay } from 'src/hooks/useEventItemLoadingDisplay';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { isSuccess } from 'src/utils/errorUtils';\nimport { hasChanged, posChangedField } from 'src/utils/posFieldUtils';\nimport {\n getPosManagedMarketplaceSaleInputFromListing,\n getPosManagedMarketplaceSaleInputFromSale,\n getSaleDetailsRelativeUrl,\n} from 'src/utils/saleUtils';\nimport { EntityWithRealTickets } from 'src/utils/ticketUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n ApiException,\n Event,\n ListingDetails,\n PosManagedMarketplaceSaleInput,\n SaleClient,\n SaleDetails,\n} from 'src/WebApiController';\n\nimport { CancellableFormFooter } from '../common';\nimport { CancellableFormHeader } from '../common/CancellableFormHeader';\nimport { ConnectedEventEntityHeader } from '../common/EventEntityHeader';\nimport { modalDetails } from '../common/Modals.css';\nimport { Summary } from '../common/Summary';\nimport { ModalProps } from '../Modal';\nimport {\n ModalBody,\n ModalBodyHeaderContainer,\n ModalFooter,\n} from '../Modal/Modal.styled';\nimport { ManagedMarketplaceSaleBody } from './ManagedMarketplaceSaleBody';\n\ntype ManagedMarketplaceSaleProps = {\n cancelTo?: ModalProps;\n};\n\nexport const ManagedMarketplaceSale = ({\n cancelTo,\n}: ManagedMarketplaceSaleProps) => {\n const { posEntity, event, posEntityDisplayId, posEntityId } =\n useActivePosEntityContext();\n const listing =\n posEntity?.entityType === ActionOutboxEntityType.Listing\n ? (posEntity as ListingDetails)\n : undefined;\n const sale =\n posEntity?.entityType === ActionOutboxEntityType.Sale\n ? (posEntity as SaleDetails)\n : undefined;\n\n const methods = useForm({\n defaultValues:\n listing?.tickets?.length && event\n ? getPosManagedMarketplaceSaleInputFromListing(listing, event)\n : sale?.tickets?.length && event\n ? getPosManagedMarketplaceSaleInputFromSale(sale, event)\n : undefined,\n });\n\n useEffect(() => {\n if (\n methods.formState.defaultValues === undefined &&\n (listing?.tickets?.length || sale?.tickets?.length) &&\n event\n ) {\n methods.reset(\n listing?.tickets?.length\n ? getPosManagedMarketplaceSaleInputFromListing(listing, event)\n : getPosManagedMarketplaceSaleInputFromSale(sale!, event)\n );\n }\n }, [sale, methods, event, listing]);\n\n return (\n \n \n \n );\n};\n\nexport const ManagedSaleContent = ({\n listing,\n sale,\n posEntityDisplayId,\n event,\n cancelTo,\n formState,\n handleSubmit,\n watch,\n getValues,\n setError,\n}: Omit<\n ComponentProps>,\n 'children'\n> &\n ManagedMarketplaceSaleProps & {\n listing?: ListingDetails;\n sale?: SaleDetails;\n posEntityDisplayId?: string;\n event?: Event | null;\n }) => {\n const { showErrorDialog, genericError } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const { setModal, closeModal } = useContext(ModalContext);\n const { setActivePosEntity } = useActivePosEntityContext();\n\n const { isLoading: entityIsLoading, loadingState } =\n useEventItemLoadingDisplay(\n FormatContentId.LoadingSaleId,\n FormatContentId.SearchingForSaleId,\n FormatContentId.CouldNotFindSaleId,\n posEntityDisplayId\n );\n\n const [isLoading, setIsLoading] = useState(false);\n const navigate = useNavigate();\n\n const onSubmit = useCallback(\n async (saleFormValue: PosManagedMarketplaceSaleInput) => {\n setIsLoading(true);\n tryInvokeApi(\n async () => {\n const client = new SaleClient(activeAccountWebClientConfig);\n\n const r = await client.mergePosManagedMarketplaceSale(saleFormValue);\n\n if (isSuccess(r)) {\n if (sale) {\n await setActivePosEntity(sale.id, sale.idOnMkp, true);\n } else if (r.entityId) {\n navigate(getSaleDetailsRelativeUrl(r.entityId));\n }\n if (cancelTo) {\n setModal(cancelTo);\n } else {\n closeModal(true);\n }\n } else {\n showErrorDialog(\n 'SaleClient.mergePosManagedMarketplaceSale',\n {\n message: r.message ?? genericError,\n status: r.status!,\n } as ApiException,\n {\n trackErrorData: saleFormValue,\n }\n );\n }\n },\n (error) => {\n showErrorDialog('SaleClient.mergePosManagedMarketplaceSale', error, {\n trackErrorData: saleFormValue,\n });\n },\n () => {\n setIsLoading(false);\n }\n );\n },\n [\n activeAccountWebClientConfig,\n cancelTo,\n closeModal,\n genericError,\n navigate,\n sale,\n setActivePosEntity,\n setModal,\n showErrorDialog,\n ]\n );\n\n const hasChanges = useCallback(\n (saleFormValue: PosManagedMarketplaceSaleInput) => {\n if (\n hasChanged(\n saleFormValue.saleStatus,\n formState.defaultValues?.saleStatus\n ) ||\n hasChanged(\n saleFormValue.buyerEmail,\n formState.defaultValues?.buyerEmail\n ) ||\n hasChanged(\n saleFormValue.buyerName,\n formState.defaultValues?.buyerName\n ) ||\n hasChanged(\n saleFormValue.buyerPhone,\n formState.defaultValues?.buyerPhone\n ) ||\n hasChanged(\n saleFormValue.currencyCode,\n formState.defaultValues?.currencyCode\n ) ||\n hasChanged(\n saleFormValue.inHandDate,\n formState.defaultValues?.inHandDate\n ) ||\n hasChanged(\n saleFormValue.quantitySold,\n formState.defaultValues?.quantitySold\n ) ||\n hasChanged(saleFormValue.saleDate, formState.defaultValues?.saleDate) ||\n hasChanged(saleFormValue.section, formState.defaultValues?.section) ||\n hasChanged(saleFormValue.row, formState.defaultValues?.row) ||\n hasChanged(saleFormValue.seatFrom, formState.defaultValues?.seatFrom) ||\n hasChanged(saleFormValue.seatTo, formState.defaultValues?.seatTo) ||\n hasChanged(\n saleFormValue.ticketType,\n formState.defaultValues?.ticketType\n ) ||\n hasChanged(\n saleFormValue.totalNetProceeds,\n formState.defaultValues?.totalNetProceeds\n ) ||\n hasChanged(\n saleFormValue.internalNotes,\n formState.defaultValues?.internalNotes\n ) ||\n hasChanged(\n saleFormValue.paymentState,\n formState.defaultValues?.paymentState\n ) ||\n hasChanged(\n saleFormValue.fulfillerSellerUserId,\n formState.defaultValues?.fulfillerSellerUserId\n )\n ) {\n return true;\n }\n return false;\n },\n [formState.defaultValues]\n );\n\n const requiredMsg = useContent(ContentId.Required);\n const inhandDateMustBeforeEventDate = useContent(\n ContentId.InHandDateMustBeBeforeEventDate\n );\n\n const onSubmitHandler = useCallback(() => {\n const formValues = getValues();\n if (!hasChanges(formValues)) return;\n\n if (!formValues.saleDate) {\n setError('saleDate', { message: requiredMsg }, { shouldFocus: true });\n }\n\n if (!formValues.totalNetProceeds?.value) {\n formValues.totalNetProceeds = posChangedField(0);\n }\n\n if (!formValues.inHandDate?.value) {\n setError('inHandDate', { message: requiredMsg }, { shouldFocus: true });\n } else if (\n new Date(formValues.inHandDate.value) >= new Date(event!.dates.start!)\n ) {\n setError(\n 'inHandDate',\n { message: inhandDateMustBeforeEventDate },\n { shouldFocus: true }\n );\n }\n if ((formValues.quantitySold?.value ?? 0) <= 0) {\n setError('quantitySold', { message: requiredMsg }, { shouldFocus: true });\n }\n\n if (listing?.tickets?.find((t) => !!t.seat)) {\n // If the listing tickets has seats - so better the sale\n if (!formValues.seatFrom?.value || !formValues.seatTo?.value) {\n setError('seatFrom', { message: requiredMsg }, { shouldFocus: true });\n }\n }\n\n handleSubmit(onSubmit)();\n }, [\n getValues,\n hasChanges,\n event,\n listing?.tickets,\n handleSubmit,\n onSubmit,\n setError,\n requiredMsg,\n inhandDateMustBeforeEventDate,\n ]);\n\n if (!sale && !listing) {\n // If we're looking for an active Sale, and there isn't one, return loading state\n return loadingState;\n }\n\n const formHasChanges = hasChanges(watch());\n\n return (\n <>\n \n \n \n \n }\n />\n \n\n \n
    \n {event && (listing || sale) && (\n \n \n \n )}\n {entityIsLoading || !(listing || sale) ? (\n \n ) : (\n \n )}\n
    \n
    \n\n \n \n \n \n \n \n );\n};\n","import { ComponentProps, useCallback, useContext } from 'react';\nimport { ButtonWithIcon } from 'src/components/Buttons';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { vars } from 'src/core/themes';\nimport { ManagedMarketplaceSale } from 'src/modals/ManagedMarketplaceSale';\nimport { EditIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ActionOutboxEntityType, SaleDetails } from 'src/WebApiController';\n\nexport const LaunchEditOfflineSale = ({\n saleId,\n marketplaceSaleId,\n cancelTo,\n iconOnlyMode,\n variant,\n ...buttonProps\n}: Omit<\n ComponentProps,\n 'onClick' | 'textContentId' | 'icon' | 'iconProps'\n> &\n Omit<\n ComponentProps,\n 'sale' | 'listing' | 'event' | 'venue'\n > & {\n saleId: number;\n marketplaceSaleId: string | null;\n eventId: string | null;\n }) => {\n const { setModal } = useContext(ModalContext);\n\n const { setActivePosEntity } = useActivePosEntityContext();\n\n const editOfflineSale = useCallback(() => {\n setModal({\n children: ,\n clickOutsideToClose: true,\n size: 'slide-in',\n deepLinkValue: saleId,\n trackViewEntityType: ActionOutboxEntityType.Sale,\n });\n }, [setModal, cancelTo, saleId]);\n\n const onLaunchDialog = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n\n setActivePosEntity(saleId, marketplaceSaleId);\n editOfflineSale();\n },\n [editOfflineSale, marketplaceSaleId, saleId, setActivePosEntity]\n );\n\n return (\n \n }\n />\n );\n};\n","import React, { useCallback, useState } from 'react';\nimport { ExpireHoldButton } from 'src/components/Buttons/ExpireHoldButton';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { ConfirmDialog } from 'src/core/interim/dialogs/ConfirmDialog';\nimport { ButtonProps } from 'src/core/ui';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { isSuccess } from 'src/utils/errorUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n ActivityLogClient,\n ApiException,\n SaleClient,\n SaleDetails,\n} from 'src/WebApiController';\n\nexport const LaunchExpireHold = ({\n saleId,\n marketplaceSaleId,\n variant,\n iconOnlyMode,\n disabled,\n}: {\n saleId: number;\n marketplaceSaleId?: string | null;\n variant?: ButtonProps['variant'];\n iconOnlyMode?: boolean;\n disabled?: boolean;\n}) => {\n const [isLoading, setIsLoading] = useState(false);\n const { showErrorDialog, genericError, trackError } =\n useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const { setActivePosEntity } = useActivePosEntityContext();\n\n const { launchDialog, closeDialog, dialogProps } = useBasicDialog();\n\n const expireHold = useCallback(() => {\n setIsLoading(true);\n tryInvokeApi(\n async () => {\n const client = new SaleClient(activeAccountWebClientConfig);\n\n const result = await client.expireHold(saleId);\n if (!isSuccess(result)) {\n showErrorDialog(\n 'SaleClient.ExpireHold',\n {\n message: result.message ?? genericError,\n status: result.status!,\n } as ApiException,\n {\n trackErrorData: { saleId },\n }\n );\n } else {\n await setActivePosEntity(saleId, marketplaceSaleId, true);\n }\n },\n (error) => {\n showErrorDialog('SaleClient.ExpireHold', error, {\n trackErrorData: { saleId },\n });\n },\n () => {\n setIsLoading(false);\n closeDialog();\n }\n );\n }, [\n activeAccountWebClientConfig,\n closeDialog,\n genericError,\n marketplaceSaleId,\n saleId,\n setActivePosEntity,\n showErrorDialog,\n ]);\n\n const onLaunchDialog = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n\n tryInvokeApi(\n async () => {\n await new ActivityLogClient(\n activeAccountWebClientConfig\n ).trackEntityView(saleId, ActionOutboxEntityType.Sale);\n },\n (error) => {\n trackError('ActivityLogClient.trackEntityView', error, { saleId });\n }\n );\n launchDialog();\n },\n [launchDialog, activeAccountWebClientConfig, saleId, trackError]\n );\n\n return (\n
    \n \n }\n bodyText={}\n onOkay={expireHold}\n />\n
    \n );\n};\n","import React, { useCallback, useState } from 'react';\nimport { ButtonWithIcon } from 'src/components/Buttons';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { ConfirmDialog } from 'src/core/interim/dialogs/ConfirmDialog';\nimport { vars } from 'src/core/themes';\nimport { ButtonProps } from 'src/core/ui';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { CheckIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { isSuccess } from 'src/utils/errorUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n ActivityLogClient,\n ApiException,\n SaleClient,\n SaleDetails,\n} from 'src/WebApiController';\n\nexport const LaunchMarkAsFulfilled = ({\n saleId,\n marketplaceSaleId,\n variant,\n iconOnlyMode,\n disabled,\n}: {\n saleId: number;\n marketplaceSaleId?: string | null;\n variant?: ButtonProps['variant'];\n iconOnlyMode?: boolean;\n disabled?: boolean;\n}) => {\n const [isLoading, setIsLoading] = useState(false);\n const { showErrorDialog, genericError } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const { setActivePosEntity } = useActivePosEntityContext();\n\n const { launchDialog, closeDialog, dialogProps } = useBasicDialog();\n\n const markAsFulfilled = useCallback(() => {\n setIsLoading(true);\n tryInvokeApi(\n async () => {\n const client = new SaleClient(activeAccountWebClientConfig);\n\n const result = await client.markAsFulfilled(saleId);\n if (!isSuccess(result)) {\n showErrorDialog(\n 'SaleClient.markAsFulfilled',\n {\n message: result.message ?? genericError,\n status: result.status!,\n } as ApiException,\n {\n trackErrorData: { saleId },\n }\n );\n } else {\n await setActivePosEntity(saleId, marketplaceSaleId, true);\n }\n },\n (error) => {\n showErrorDialog('SaleClient.markAsFulfilled', error, {\n trackErrorData: { saleId },\n });\n },\n () => {\n setIsLoading(false);\n closeDialog();\n }\n );\n }, [\n activeAccountWebClientConfig,\n closeDialog,\n genericError,\n marketplaceSaleId,\n saleId,\n setActivePosEntity,\n showErrorDialog,\n ]);\n\n const onLaunchDialog = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n\n new ActivityLogClient(activeAccountWebClientConfig).trackEntityView(\n saleId,\n ActionOutboxEntityType.Sale\n );\n launchDialog();\n },\n [saleId, launchDialog, activeAccountWebClientConfig]\n );\n\n return (\n
    \n \n }\n iconOnlyMode={iconOnlyMode}\n variant={variant}\n textContentId={ContentId.MarkAsFulfilled}\n />\n }\n bodyText={}\n onOkay={markAsFulfilled}\n />\n
    \n );\n};\n","import { ComponentProps } from 'react';\nimport { vars } from 'src/core/themes';\nimport { ErrorOutlineIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { ButtonWithIcon } from './ButtonWithIcon';\n\nexport const RejectButton = ({\n textContentId,\n variant,\n iconOnlyMode,\n icon,\n ...props\n}: ComponentProps) => {\n return (\n \n )\n }\n iconOnlyMode={iconOnlyMode}\n variant={variant}\n textContentId={textContentId || ContentId.RejectSale}\n />\n );\n};\n","import React, { useCallback, useState } from 'react';\nimport { RejectButton } from 'src/components/Buttons/RejectButton';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { ConfirmDialog } from 'src/core/interim/dialogs/ConfirmDialog';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { ButtonProps, Stack } from 'src/core/ui';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SALE_CANCELLATION_REASON_CID } from 'src/utils/constants/contentIdMaps';\nimport { isSuccess } from 'src/utils/errorUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n ActivityLogClient,\n ApiException,\n Feature,\n SaleCancellationReason,\n SaleClient,\n SaleDetails,\n} from 'src/WebApiController';\n\nimport * as styles from '../SaleDetails.css';\n\nexport const LaunchRejectSale = ({\n saleId,\n marketplaceSaleId,\n variant,\n iconOnlyMode,\n disabled,\n}: {\n saleId: number;\n marketplaceSaleId?: string | null;\n variant?: ButtonProps['variant'];\n iconOnlyMode?: boolean;\n disabled?: boolean;\n}) => {\n const [isLoading, setIsLoading] = useState(false);\n const [saleCancellationReason, setSaleCancellationReason] =\n useState(null);\n const { showErrorDialog, genericError, trackError } =\n useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const { setActivePosEntity } = useActivePosEntityContext();\n const userHasSaleCancellationReason = useUserHasFeature(\n Feature.SaleCancellationReason\n );\n\n const { launchDialog, closeDialog, dialogProps } = useBasicDialog();\n\n const rejectSale = useCallback(() => {\n setIsLoading(true);\n tryInvokeApi(\n async () => {\n const client = new SaleClient(activeAccountWebClientConfig);\n\n const result = await client.rejectSale(\n saleId,\n false,\n saleCancellationReason\n );\n if (!isSuccess(result)) {\n showErrorDialog(\n 'SaleClient.rejectSale',\n {\n message: result.message ?? genericError,\n status: result.status!,\n } as ApiException,\n {\n trackErrorData: { saleId },\n }\n );\n } else {\n await setActivePosEntity(saleId, marketplaceSaleId, true);\n }\n },\n (error) => {\n showErrorDialog('SaleClient.rejectSale', error, {\n trackErrorData: { saleId },\n });\n },\n () => {\n setIsLoading(false);\n closeDialog();\n }\n );\n }, [\n activeAccountWebClientConfig,\n closeDialog,\n genericError,\n marketplaceSaleId,\n saleCancellationReason,\n saleId,\n setActivePosEntity,\n showErrorDialog,\n ]);\n\n const onLaunchDialog = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n\n tryInvokeApi(\n async () => {\n await new ActivityLogClient(\n activeAccountWebClientConfig\n ).trackEntityView(saleId, ActionOutboxEntityType.Sale);\n },\n (error) => {\n trackError('ActivityLogClient.trackEntityView', error, { saleId });\n }\n );\n setSaleCancellationReason(null);\n launchDialog();\n },\n [launchDialog, activeAccountWebClientConfig, saleId, trackError]\n );\n\n return (\n
    \n \n }\n bodyText={\n \n {userHasSaleCancellationReason && (\n \n \n \n \n )}\n \n \n }\n />\n
    \n );\n};\n","import React, { useCallback, useState } from 'react';\nimport { ButtonWithIcon } from 'src/components/Buttons';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { ConfirmDialog } from 'src/core/interim/dialogs/ConfirmDialog';\nimport { vars } from 'src/core/themes';\nimport { ButtonProps } from 'src/core/ui';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { IconsFill, ResetIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { isSuccess } from 'src/utils/errorUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n ActivityLogClient,\n ApiException,\n SaleClient,\n SaleDetails,\n} from 'src/WebApiController';\n\nexport const LaunchResetFulfillment = ({\n saleId,\n marketplaceSaleId,\n variant,\n iconOnlyMode,\n disabled,\n}: {\n saleId: number;\n marketplaceSaleId?: string | null;\n variant?: ButtonProps['variant'];\n iconOnlyMode?: boolean;\n disabled?: boolean;\n}) => {\n const [isLoading, setIsLoading] = useState(false);\n const { showErrorDialog, genericError } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const { setActivePosEntity } = useActivePosEntityContext();\n\n const { launchDialog, closeDialog, dialogProps } = useBasicDialog();\n\n const resetFulfillment = useCallback(() => {\n setIsLoading(true);\n tryInvokeApi(\n async () => {\n const client = new SaleClient(activeAccountWebClientConfig);\n\n const result = await client.resetFulfillment(saleId, true, false);\n if (!isSuccess(result)) {\n showErrorDialog(\n 'SaleClient.resetFulfillment',\n {\n message: result.message ?? genericError,\n status: result.status!,\n } as ApiException,\n {\n trackErrorData: { saleId },\n }\n );\n } else {\n await setActivePosEntity(saleId, marketplaceSaleId, true);\n }\n },\n (error) => {\n showErrorDialog('SaleClient.resetFulfillment', error, {\n trackErrorData: { saleId },\n });\n },\n () => {\n setIsLoading(false);\n closeDialog();\n }\n );\n }, [\n activeAccountWebClientConfig,\n closeDialog,\n genericError,\n marketplaceSaleId,\n saleId,\n setActivePosEntity,\n showErrorDialog,\n ]);\n\n const onLaunchDialog = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n\n new ActivityLogClient(activeAccountWebClientConfig).trackEntityView(\n saleId,\n ActionOutboxEntityType.Sale\n );\n launchDialog();\n },\n [saleId, launchDialog, activeAccountWebClientConfig]\n );\n\n return (\n
    \n \n }\n iconOnlyMode={iconOnlyMode}\n variant={variant}\n textContentId={ContentId.ResetFulfillment}\n />\n }\n bodyText={}\n onOkay={resetFulfillment}\n />\n
    \n );\n};\n","import { ComponentProps, useState } from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { CancelButton } from 'src/components/Buttons';\nimport { OkButton } from 'src/components/Buttons/OkButton';\nimport { Content } from 'src/contexts/ContentContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { Radio, RadioGroup, Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { reset } from 'svg-pan-zoom';\n\nenum SaveArtifactType {\n SaveArtifact = 'SaveArtifact',\n ResetArtifact = 'ResetArtifact',\n}\n\nexport type ResetFulfillmentDialgoProps = ComponentProps;\n\nexport const ResetFulfillmentDialog = ({\n onOkay,\n onCancel,\n ...rest\n}: ResetFulfillmentDialgoProps) => {\n const [resetArtifacts, setResetArtifacts] = useState(false);\n\n const ResetFulfillmentDialogBody = () => (\n
    \n {\n if (value === SaveArtifactType.SaveArtifact) {\n setResetArtifacts(false);\n } else {\n setResetArtifacts(true);\n }\n }}\n value={\n resetArtifacts\n ? SaveArtifactType.ResetArtifact\n : SaveArtifactType.SaveArtifact\n }\n >\n \n }\n />\n }\n />\n \n \n
    \n );\n\n return (\n }\n onClick={(e) => {\n e.stopPropagation();\n e.preventDefault();\n }}\n footer={\n <>\n \n onOkay(resetArtifacts)}\n />\n \n }\n >\n \n \n );\n};\n","import React, { useCallback, useState } from 'react';\nimport { ButtonWithIcon } from 'src/components/Buttons';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { vars } from 'src/core/themes';\nimport { ButtonProps } from 'src/core/ui';\nimport { IconsFill, ResetIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { isSuccess } from 'src/utils/errorUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n ActivityLogClient,\n ApiException,\n Feature,\n SaleClient,\n SaleDetails,\n} from 'src/WebApiController';\n\nimport { ResetFulfillmentDialog } from '../components/ResetFulfillmentDialog';\n\nexport const LaunchResetFulfillmentV2 = ({\n saleId,\n marketplaceSaleId,\n variant,\n iconOnlyMode,\n disabled,\n}: {\n saleId: number;\n marketplaceSaleId?: string | null;\n variant?: ButtonProps['variant'];\n iconOnlyMode?: boolean;\n disabled?: boolean;\n}) => {\n const [isLoading, setIsLoading] = useState(false);\n const { showErrorDialog, genericError } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const { setActivePosEntity } = useActivePosEntityContext();\n\n const {\n openDialog: openResetFulfillment,\n closeDialog: closeResetFulfillment,\n } = useDialog(DialogId.ResetFulfillment, ResetFulfillmentDialog);\n\n const resetFulfillment = useCallback(\n (resetArtifacts: boolean) => {\n setIsLoading(true);\n tryInvokeApi(\n async () => {\n const client = new SaleClient(activeAccountWebClientConfig);\n\n const result = await client.resetFulfillment(\n saleId,\n resetArtifacts,\n true\n );\n if (!isSuccess(result)) {\n showErrorDialog(\n 'SaleClient.resetFulfillment',\n {\n message: result.message ?? genericError,\n status: result.status!,\n } as ApiException,\n {\n trackErrorData: { saleId },\n }\n );\n } else {\n await setActivePosEntity(saleId, marketplaceSaleId, true);\n }\n },\n (error) => {\n showErrorDialog('SaleClient.resetFulfillment', error, {\n trackErrorData: { saleId },\n });\n },\n () => {\n setIsLoading(false);\n closeResetFulfillment();\n }\n );\n },\n [\n activeAccountWebClientConfig,\n closeResetFulfillment,\n genericError,\n marketplaceSaleId,\n saleId,\n setActivePosEntity,\n showErrorDialog,\n ]\n );\n\n const onLaunchDialog = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n\n new ActivityLogClient(activeAccountWebClientConfig).trackEntityView(\n saleId,\n ActionOutboxEntityType.Sale\n );\n\n openResetFulfillment({\n onOkay: (resetArtifacts: boolean) => {\n resetFulfillment(resetArtifacts);\n closeResetFulfillment();\n },\n onCancel: closeResetFulfillment,\n });\n },\n [\n activeAccountWebClientConfig,\n saleId,\n openResetFulfillment,\n closeResetFulfillment,\n resetFulfillment,\n ]\n );\n\n return (\n \n }\n iconOnlyMode={iconOnlyMode}\n variant={variant}\n textContentId={ContentId.ResetFulfillment}\n />\n );\n};\n","import { ButtonProps } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { Feature } from 'src/WebApiController';\n\nimport { LaunchResetFulfillment } from './LaunchResetFulfillment';\nimport { LaunchResetFulfillmentV2 } from './LaunchResetFulfillmentV2';\n\nexport const LaunchResetFulfillmentButton = ({\n saleId,\n marketplaceSaleId,\n variant,\n iconOnlyMode,\n disabled,\n}: {\n saleId: number;\n marketplaceSaleId?: string | null;\n variant?: ButtonProps['variant'];\n iconOnlyMode?: boolean;\n disabled?: boolean;\n}) => {\n const hasResetFulfillmentKeepArtifactsFeature = useUserHasFeature(\n Feature.ResetFulfillmentKeepArtifacts\n );\n\n if (!hasResetFulfillmentKeepArtifactsFeature) {\n return (\n \n );\n }\n\n return (\n \n );\n};\n","import { useCallback, useState } from 'react';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport {\n ConfirmDialog,\n ConfirmDialogProps,\n} from 'src/core/interim/dialogs/ConfirmDialog';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { SaleClient, SaleDetails } from 'src/WebApiController';\n\nexport type TurnOnSaleAutoFulfillDialogProps = Omit<\n ConfirmDialogProps,\n 'headerText' | 'bodyText'\n> & {\n saleId: number;\n};\n\nexport const TurnOnSaleAutoFulfillDialog = ({\n saleId,\n onOkay,\n onCancel,\n ...props\n}: TurnOnSaleAutoFulfillDialogProps) => {\n const { showErrorDialog } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const [isLoading, setIsLoading] = useState(false);\n\n const { posEntity: sale, setActivePosEntity } =\n useActivePosEntityContext();\n\n const onTurnOnAutoFulfill = useCallback(async () => {\n setIsLoading(true);\n await tryInvokeApi(\n async () => {\n await new SaleClient(\n activeAccountWebClientConfig\n ).updateSaleIsNoFulfill({\n item1: saleId,\n item2: false,\n });\n setIsLoading(false);\n\n if (sale) {\n setActivePosEntity(sale.id, sale.idOnMkp, true);\n }\n\n onOkay();\n },\n (error) => {\n showErrorDialog('SaleClient.updateSaleIsNoFulfill', error, {\n trackErrorData: {\n saleId,\n },\n });\n },\n () => setIsLoading(false)\n );\n }, [\n activeAccountWebClientConfig,\n onOkay,\n sale,\n saleId,\n setActivePosEntity,\n showErrorDialog,\n ]);\n\n return (\n }\n bodyText={}\n onOkay={onTurnOnAutoFulfill}\n onCancel={onCancel}\n okText={ContentId.Yes}\n cancelText={ContentId.No}\n {...props}\n isLoading={isLoading}\n />\n );\n};\n","import { UploadDocumentInput } from 'src/components/Input/UploadDocumentInput';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n ActionOutboxEntityType,\n DocumentType,\n SaleDetails,\n} from 'src/WebApiController';\n\nexport const ImageProofBody = ({\n setIsSaveDisabled,\n}: {\n setIsSaveDisabled: (disabled: boolean) => void;\n}) => {\n const { posEntity: sale } = useActivePosEntityContext();\n\n return (\n }\n setIsSaveDisabled={setIsSaveDisabled}\n />\n );\n};\n","import { useFormContext } from 'react-hook-form';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Radio, RadioGroup, Stack } from 'src/core/ui';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ModalBodyDataContainer } from 'src/modals/Modal/Modal.styled';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { TransferTicketsForm } from 'src/utils/ticketUtils';\nimport { Feature, Permission, TransferTicketType } from 'src/WebApiController';\n\nexport const ProofTypeSelectionBody = ({\n supportTicketmasterBarcodeTransfer,\n}: {\n supportTicketmasterBarcodeTransfer?: boolean;\n}) => {\n const { watch, setValue } = useFormContext();\n const watchTransferType = watch('transferType');\n const has1TicketApiFeature = useUserHasFeature(Feature.OneTicketTransferApi);\n const hasTransferWithoutProof = useUserHasAnyOfPermissions(\n Permission.Sales_ConfirmTransferWithoutProof\n );\n const hasTransferWithoutProofFeature = useUserHasFeature(\n Feature.ConfirmTransferWithoutProof\n );\n\n return (\n \n \n \n \n \n setValue('transferType', value as TransferTicketType)\n }\n value={watchTransferType}\n >\n \n \n }\n />\n }\n />\n {supportTicketmasterBarcodeTransfer && (\n <>\n \n }\n />\n {has1TicketApiFeature && (\n \n }\n />\n )}\n \n )}\n {hasTransferWithoutProof && hasTransferWithoutProofFeature && (\n }\n />\n )}\n \n \n \n \n \n );\n};\n","import { useFormContext } from 'react-hook-form';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { Stack } from 'src/core/ui';\nimport { ModalBodyDataContainer } from 'src/modals/Modal/Modal.styled';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { TransferTicketsForm } from 'src/utils/ticketUtils';\n\nexport const TransferIdProofBody = ({ disabled }: { disabled?: boolean }) => {\n const { register, formState, watch } = useFormContext();\n const transferProofId = watch('transferProofId');\n\n const transferProofIdErrpr = formState?.errors?.transferProofId?.message;\n return (\n \n \n \n }\n errors={transferProofIdErrpr}\n >\n \n \n \n \n );\n};\n","import { useCallback } from 'react';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { BlinkingWrapper } from 'src/core/ui/AnimatingWrapper';\nimport useCopyToClipboard from 'src/hooks/useCopyToClipboard';\nimport { Detail, DetailGroup, DetailSection } from 'src/modals/common';\nimport { ModalBodyDataContainer } from 'src/modals/Modal/Modal.styled';\nimport { TicketsSection } from 'src/modals/SaleDetails/components/TicketsSection';\nimport * as styles from 'src/modals/TransferTickets/TransferTickets.css';\nimport { CopyIcon } from 'src/svgs/CopyIcon';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Marketplace, SaleDetails } from 'src/WebApiController';\n\nexport const TransferTicketsRecipientBody = () => {\n const { posEntity: sale } = useActivePosEntityContext();\n\n const { loginContext } = useAppContext();\n const yourTickets = useContent(ContentId.YourTickets);\n const app = useContent(ContentId.App);\n const transferFrom = useContent(ContentId.TransferFrom);\n\n const yourBuyer = useContent(ContentId.YourBuyer);\n const transferTo = useContent(ContentId.TransferTo);\n const contact = useContent(ContentId.Contact);\n\n const { referenceIsCopied, copyToClipboard } = useCopyToClipboard();\n\n const onCopy = useCallback(\n (text: string, referenceId: string) => {\n copyToClipboard(text, referenceId);\n },\n [copyToClipboard]\n );\n\n const recipientNameReferenceId = 'recipientName';\n const recipientEmailReferenceId = 'recipientEmail';\n\n return (\n \n \n \n\n \n \n \n {sale?.transSrc?.length ? (\n sale?.transSrc?.map((tts) => (\n <>\n
    \n {tts.app}
    \n }\n />\n \n
    \n \n
    \n {tts.name}\n
    \n
    \n {tts.email}\n
    \n
    \n }\n />\n \n \n ))\n ) : (\n <>\n
    \n \n {Marketplace.StubHub}\n
    \n }\n />\n \n
    \n \n
    \n {loginContext?.user?.displayName}\n
    \n
    \n {loginContext?.user?.userName}\n
    \n
    \n }\n />\n \n \n )}\n {' '}\n
    \n
    \n \n \n {sale?.transDest ? (\n <>\n
    \n \n
    \n {sale.transDest.name}\n
    \n \n onCopy(\n sale.transDest!.name!,\n recipientNameReferenceId\n )\n }\n />\n {referenceIsCopied === recipientNameReferenceId && (\n \n \n \n )}\n
    \n }\n />\n \n
    \n \n
    \n {sale.transDest.email}\n
    \n \n onCopy(\n sale.transDest!.email!,\n recipientEmailReferenceId\n )\n }\n />\n {referenceIsCopied === recipientEmailReferenceId && (\n \n \n \n )}\n
    \n }\n />\n \n \n ) : (\n
    \n \n \n
    \n \n
    \n
    \n
    \n }\n />\n \n )}\n
    \n
    \n
    \n
    \n
    \n );\n};\n","import { UseFormRegister } from 'react-hook-form';\nimport { IconButton } from 'src/components/Buttons';\nimport { useContent, useFormattedContent } from 'src/contexts/ContentContext';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { getTextFieldState, PosTextField } from 'src/core/POS/PosTextField';\nimport { CrossIcon } from 'src/svgs/Viagogo';\nimport { URL_REGEX } from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { TransferTicketsForm } from 'src/utils/ticketUtils';\nimport { isUniqueWithin } from 'src/utils/validation';\n\nimport * as styles from './UrlProof.css';\n\nexport const URLInputField = ({\n id,\n index,\n register,\n canRemove,\n onRemove,\n allFields,\n error,\n disabled,\n}: {\n id: string | number;\n index: number;\n register: UseFormRegister;\n canRemove: boolean;\n onRemove: () => void;\n allFields: TransferTicketsForm['acceptanceUrlInputs'];\n error?: string;\n disabled?: boolean;\n}) => {\n const requiredUrlMsg = useContent(ContentId.Required);\n const invalidUrlMsg = useContent(ContentId.InvalidUrl);\n const dupeUrlMsg = useContent(ContentId.DuplicateUrl);\n const label = useFormattedContent(FormatContentId.UrlNumber, `${index + 1}`);\n\n return (\n
    \n \n {\n return fieldVal?.length ? undefined : requiredUrlMsg;\n },\n isUnique: (fieldVal) => {\n return (\n isUniqueWithin(\n fieldVal,\n allFields.map((t) => t.url) || [],\n true\n ) || dupeUrlMsg\n );\n },\n },\n })}\n />\n {canRemove && (\n } />\n )}\n \n
    \n );\n};\n","import { useEffect } from 'react';\nimport { useFieldArray, useFormContext } from 'react-hook-form';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ErrorMessage } from 'src/core/POS/ErrorMessage';\nimport { Button, Stack } from 'src/core/ui';\nimport { ModalBodyDataContainer } from 'src/modals/Modal/Modal.styled';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { TransferTicketsForm } from 'src/utils/ticketUtils';\n\nimport { URLInputField } from './URLInput';\nimport * as styles from './UrlProof.css';\n\nexport const UrlProofBody = ({ disabled }: { disabled?: boolean }) => {\n const { register, formState, watch } = useFormContext();\n const { fields, append, remove } = useFieldArray({\n name: 'acceptanceUrlInputs',\n });\n const allUrlInputs = watch('acceptanceUrlInputs');\n useEffect(() => {\n if (fields.length === 0) {\n append({ id: fields.length, url: '' });\n }\n }, [append, fields.length]);\n\n const allUrlsError = formState?.errors?.acceptanceUrlInputs?.message;\n return (\n \n \n \n
    \n {fields.map((field, index) => {\n const error =\n formState?.errors?.acceptanceUrlInputs?.[index]?.url?.message;\n return (\n 1}\n onRemove={() => remove(index)}\n allFields={allUrlInputs}\n error={error}\n />\n );\n })}\n
    \n append({ id: fields.length, url: '' })}\n >\n + \n \n
    \n {allUrlsError && {allUrlsError}}\n
    \n
    \n
    \n );\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { ComponentProps, useCallback, useContext, useState } from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { BackButton } from 'src/components/Buttons/BackButton';\nimport { OkButton } from 'src/components/Buttons/OkButton';\nimport {\n checkBarcodeErrors,\n checkDuplicateBarcodes,\n} from 'src/components/UploadArtifacts/UploadBarcodes';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogMetricsContext } from 'src/contexts/CatalogMetricsContext';\nimport {\n Content,\n useContent,\n useFormattedContent,\n} from 'src/contexts/ContentContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { useEventItemLoadingDisplay } from 'src/hooks/useEventItemLoadingDisplay';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { CancellableFormFooter } from 'src/modals/common';\nimport { CancellableFormHeader } from 'src/modals/common/CancellableFormHeader';\nimport { ConnectedEventEntityHeader } from 'src/modals/common/EventEntityHeader';\nimport { ModalBody, ModalFooter, ModalProps } from 'src/modals/Modal';\nimport {\n DATA_REFRESH_RATE_IN_MILLIS_FAST,\n TICKETMASTER_APP_ID,\n} from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { isSuccess } from 'src/utils/errorUtils';\nimport { TransferTicketsForm } from 'src/utils/ticketUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ApiException,\n Marketplace,\n SaleClient,\n SaleDetails,\n SaleMetrics,\n TransferTicketType,\n} from 'src/WebApiController';\n\nimport { Summary } from '../common/Summary';\nimport {\n ModalBodyDataContainer,\n ModalBodyHeaderContainer,\n} from '../Modal/Modal.styled';\nimport { ImageProofBody } from './views/ImageProof';\nimport { ProofTypeSelectionBody } from './views/ProofTypeSelection';\nimport { TransferIdProofBody } from './views/TransferIdProof';\nimport { TransferTicketmasterBarcodesBody } from './views/TransferTicketmasterBarcodes';\nimport { TransferTicketsRecipientBody } from './views/TransferTicketsRecipientBody';\nimport { UrlProofBody } from './views/UrlProof';\n\ntype TransferTicketProps = {\n cancelTo?: ModalProps;\n eTicketUrlOnly?: boolean;\n};\n\nexport const TransferTickets = (props: TransferTicketProps) => {\n const { loadingState } = useEventItemLoadingDisplay(\n FormatContentId.LoadingSaleId,\n FormatContentId.SearchingForSaleId,\n FormatContentId.CouldNotFindSaleId\n );\n\n return loadingState || ;\n};\n\nexport const TransferTicketsContent = (props: TransferTicketProps) => {\n const { loginContext } = useAppContext();\n const { posEntity: sale } = useActivePosEntityContext();\n\n const hasTicketmasterEnabled =\n loginContext?.user?.activeAccount?.marketplaceSettings?.find(\n (m) =>\n m.mkp === Marketplace.Ticketmaster &&\n m.isEnabled &&\n (m.hasApiToken || m.hasApiRefreshToken) &&\n !m.tokenExpired\n );\n const indexOfTM = sale?.transSrc?.findIndex(\n (ti) => ti.appId === TICKETMASTER_APP_ID\n );\n\n const supportTicketmasterBarcodeTransfer =\n hasTicketmasterEnabled != null && indexOfTM != null && indexOfTM >= 0;\n\n const methods = useForm({\n defaultValues: {\n transferType: props.eTicketUrlOnly\n ? TransferTicketType.URL\n : supportTicketmasterBarcodeTransfer &&\n sale?.tickets?.every((t) => t.barcode)\n ? TransferTicketType.ApiTransferTicketmaster // if this support TM transfer and has barcodes, default to selecting TM transfer\n : TransferTicketType.ImageProof,\n acceptanceUrls: sale?.transferUrls,\n acceptanceUrlInputs: sale?.transferUrls?.map((url, i) => ({\n id: i,\n url: url,\n })),\n uploadProofDocuments: sale?.transferProofDocs,\n transferProofId: sale?.transferProofId,\n barcodes: sale?.tickets?.map((t) => ({\n ticketId: t.id,\n barcode: t.barcode ?? '',\n })),\n },\n });\n\n return (\n \n \n \n );\n};\n\nenum TransferTicketBody {\n Recipient,\n ProofType,\n ImageProof,\n UrlProof,\n IdProof,\n TicketmasterBarcodesViaOneTicket,\n TicketmasterBarcodesViaTradeDesk,\n}\n\nconst TransferTicketsModal = ({\n cancelTo,\n formState,\n handleSubmit,\n watch,\n setError,\n getValues,\n eTicketUrlOnly,\n supportTicketmasterBarcodeTransfer,\n}: TransferTicketProps & {\n supportTicketmasterBarcodeTransfer: boolean;\n} & Omit<\n ComponentProps>,\n 'children'\n >) => {\n const [currentBody, setCurrentBody] = useState(\n eTicketUrlOnly ? TransferTicketBody.UrlProof : TransferTicketBody.Recipient\n );\n const { activeAccountWebClientConfig } = useAppContext();\n const { setModal, closeModal } = useContext(ModalContext);\n\n const { trackError, showErrorDialog, genericError } =\n useErrorBoundaryContext();\n\n const { isDirty, isSubmitting } = formState;\n\n const [isLoading, setIsLoading] = useState(false);\n\n const {\n posEntity: sale,\n event,\n setActivePosEntity,\n updateActivePosEntityInfo,\n } = useActivePosEntityContext();\n\n const shouldQuery = sale?.id != null && sale?.transDest == null;\n\n useQuery({\n queryKey: ['SaleClient.getSaleRecipient', sale?.id],\n queryFn: async () => {\n if (!shouldQuery) return null;\n\n const saleDetails = await new SaleClient(\n activeAccountWebClientConfig\n ).getSaleBySaleId(sale.id);\n\n if (saleDetails?.transDest) {\n // Only update the Sale details if we get the recipient info\n updateActivePosEntityInfo({\n event: event,\n posEntity: saleDetails,\n posEntityId: saleDetails.id,\n posEntityDisplayId: saleDetails.idOnMkp,\n });\n }\n\n return saleDetails;\n },\n\n enabled: shouldQuery,\n staleTime: Infinity, // Since we're always refetching on an interval, we don't want query to calculate whether the data is stale\n refetchOnWindowFocus: false,\n networkMode: 'offlineFirst',\n meta: {\n persist: false,\n onError: (error: ErrorTypes) => {\n trackError('SaleClient.getSaleRecipient', error, { saleId: sale?.id });\n },\n },\n refetchInterval: DATA_REFRESH_RATE_IN_MILLIS_FAST,\n });\n\n const { refreshMetrics } = useCatalogMetricsContext();\n\n const requiredMsg = useContent(ContentId.Required);\n const atleastOneUrlRequired = useContent(ContentId.AtLeastOneUrlRequired);\n const anUploadedDocumentIsRequired = useContent(\n ContentId.AnUploadedDocumentIsRequired\n ); // 'An upload image or document is required.'\n\n const watchTransferType = watch('transferType');\n\n const isMobile = useMatchMedia('mobile');\n\n const onNext = useCallback(async () => {\n if (eTicketUrlOnly) {\n setCurrentBody(TransferTicketBody.UrlProof);\n }\n\n switch (currentBody) {\n case TransferTicketBody.Recipient:\n setCurrentBody(TransferTicketBody.ProofType);\n break;\n case TransferTicketBody.ProofType:\n if (watchTransferType === TransferTicketType.ImageProof) {\n setCurrentBody(TransferTicketBody.ImageProof);\n } else if (watchTransferType === TransferTicketType.URL) {\n setCurrentBody(TransferTicketBody.UrlProof);\n } else if (watchTransferType === TransferTicketType.IdProof) {\n setCurrentBody(TransferTicketBody.IdProof);\n } else if (\n watchTransferType === TransferTicketType.ApiTransferTicketmaster\n ) {\n setCurrentBody(TransferTicketBody.TicketmasterBarcodesViaTradeDesk);\n } else if (\n watchTransferType === TransferTicketType.ApiTransfer1Ticket\n ) {\n setCurrentBody(TransferTicketBody.TicketmasterBarcodesViaOneTicket);\n }\n break;\n default:\n console.log('Unhandled TransferTicketBody onNext: ' + currentBody);\n break;\n }\n }, [currentBody, eTicketUrlOnly, watchTransferType]);\n\n const onBack = useCallback(async () => {\n if (eTicketUrlOnly) {\n if (cancelTo) {\n setModal(cancelTo);\n } else {\n closeModal();\n }\n }\n switch (currentBody) {\n case TransferTicketBody.Recipient:\n if (cancelTo) {\n setModal(cancelTo);\n } else {\n closeModal();\n }\n break;\n case TransferTicketBody.ProofType:\n setCurrentBody(TransferTicketBody.Recipient);\n break;\n case TransferTicketBody.ImageProof:\n case TransferTicketBody.UrlProof:\n case TransferTicketBody.IdProof:\n case TransferTicketBody.TicketmasterBarcodesViaOneTicket:\n case TransferTicketBody.TicketmasterBarcodesViaTradeDesk:\n setCurrentBody(TransferTicketBody.ProofType);\n break;\n }\n }, [cancelTo, closeModal, currentBody, eTicketUrlOnly, setModal]);\n\n const { ticketCnt } = sale!;\n const barcodes = watch('barcodes');\n const barcodesProvided =\n barcodes?.map((b) => b.barcode).filter((b) => b?.length) ?? [];\n\n const duplicateMsg = useContent(ContentId.DuplicateBarcode);\n const missingMsg = useFormattedContent(\n FormatContentId.MissingBarcodes,\n `${ticketCnt - barcodesProvided.length}`\n );\n\n const extraMsg = useFormattedContent(\n FormatContentId.ExtraBarcodes,\n `${barcodesProvided.length - ticketCnt}`\n );\n\n const [alreadyReportedUsedBarcodes, setAlreadyReportedUsedBarcodes] =\n useState([]);\n const barcodeAlreadyUsedWarning = useContent(ContentId.BarcodeAlreadyInUsed);\n\n const onSubmit = useCallback(\n async (data: TransferTicketsForm) => {\n tryInvokeApi(\n async () => {\n setIsLoading(true);\n\n const client = new SaleClient(activeAccountWebClientConfig);\n\n data.saleId = sale!.id;\n const result = await client.saveTicketTransferInfo({\n saleId: data.saleId,\n transferType: data.transferType,\n acceptanceUrls:\n data.transferType === TransferTicketType.URL\n ? data.acceptanceUrlInputs.map((url) => url.url)\n : null,\n uploadProofDocuments:\n data.transferType === TransferTicketType.ImageProof\n ? data.uploadProofDocuments\n : null,\n transferProofId:\n data.transferType === TransferTicketType.IdProof\n ? data.transferProofId\n : null,\n barcodes:\n data.transferType === TransferTicketType.ApiTransfer1Ticket ||\n data.transferType === TransferTicketType.ApiTransferTicketmaster\n ? data.barcodes\n : null,\n });\n if (!isSuccess(result)) {\n showErrorDialog(\n 'SaleClient.saveTicketTransferInfo',\n {\n message: result.message ?? genericError,\n status: result.status!,\n } as ApiException,\n {\n onDismissError: () => cancelTo && setModal(cancelTo),\n trackErrorData: data,\n }\n );\n } else {\n // Refresh the active data so the SaleDetail dialog and table will have the new content\n await setActivePosEntity(sale!.id, sale!.idOnMkp, true);\n refreshMetrics?.();\n\n if (cancelTo) {\n setModal(cancelTo);\n } else {\n closeModal(true);\n }\n }\n },\n (error) => {\n showErrorDialog('SaleClient.saveTicketTransferInfo', error, {\n trackErrorData: data,\n });\n },\n () => setIsLoading(false)\n );\n },\n [\n activeAccountWebClientConfig,\n cancelTo,\n closeModal,\n genericError,\n refreshMetrics,\n sale,\n setActivePosEntity,\n setModal,\n showErrorDialog,\n ]\n );\n\n const onTransferClicked = useCallback(async () => {\n const data = getValues();\n if (data.transferType === TransferTicketType.URL) {\n if (!data.acceptanceUrlInputs?.length) {\n setError(\n 'acceptanceUrlInputs',\n {\n message: atleastOneUrlRequired,\n },\n { shouldFocus: true }\n );\n return;\n } else {\n let hasErrors = false;\n data.acceptanceUrlInputs.forEach((url, i) => {\n if (!url?.url?.length) {\n setError(\n `acceptanceUrlInputs.${i}.url`,\n {\n message: requiredMsg,\n },\n { shouldFocus: true }\n );\n hasErrors = true;\n }\n });\n\n if (hasErrors) return;\n data.acceptanceUrls = data.acceptanceUrlInputs.map((t) => t.url);\n }\n } else if (data.transferType === TransferTicketType.ImageProof) {\n if (!data.uploadProofDocuments?.length) {\n setError('uploadProofDocuments', {\n message: anUploadedDocumentIsRequired,\n });\n return;\n }\n } else if (data.transferType === TransferTicketType.IdProof) {\n if (!data.transferProofId) {\n setError('transferProofId', {\n message: requiredMsg,\n });\n\n return;\n }\n } else if (\n data.transferType === TransferTicketType.ApiTransferTicketmaster ||\n data.transferType === TransferTicketType.ApiTransfer1Ticket\n ) {\n let hasErrors = checkBarcodeErrors(\n data.isBulkUpload,\n data.barcodes ?? [],\n ticketCnt,\n setError,\n requiredMsg,\n missingMsg as string,\n extraMsg as string,\n duplicateMsg\n );\n\n if (hasErrors) {\n return;\n }\n\n hasErrors = Boolean(\n await checkDuplicateBarcodes(\n sale!.id,\n barcodes ?? [],\n activeAccountWebClientConfig,\n alreadyReportedUsedBarcodes,\n setAlreadyReportedUsedBarcodes,\n (index) =>\n setError(`barcodes.${index}.barcode`, {\n type: 'warning',\n message: barcodeAlreadyUsedWarning,\n }),\n () => setIsLoading(true),\n () => setIsLoading(false),\n showErrorDialog,\n sale!.viagVirtualId\n )\n );\n\n if (hasErrors) {\n return;\n }\n }\n\n handleSubmit(onSubmit)();\n }, [\n activeAccountWebClientConfig,\n alreadyReportedUsedBarcodes,\n anUploadedDocumentIsRequired,\n atleastOneUrlRequired,\n barcodeAlreadyUsedWarning,\n barcodes,\n duplicateMsg,\n extraMsg,\n getValues,\n handleSubmit,\n missingMsg,\n onSubmit,\n requiredMsg,\n sale,\n setError,\n showErrorDialog,\n ticketCnt,\n ]);\n\n const getBody = useCallback(() => {\n switch (currentBody) {\n case TransferTicketBody.Recipient:\n return ;\n case TransferTicketBody.ProofType:\n return (\n \n );\n case TransferTicketBody.ImageProof:\n return ;\n case TransferTicketBody.UrlProof:\n return ;\n case TransferTicketBody.IdProof:\n return ;\n case TransferTicketBody.TicketmasterBarcodesViaTradeDesk:\n return (\n \n );\n case TransferTicketBody.TicketmasterBarcodesViaOneTicket:\n return (\n \n );\n }\n }, [\n currentBody,\n isLoading,\n isSubmitting,\n supportTicketmasterBarcodeTransfer,\n ]);\n\n const LocalModalFooter = () => {\n return (\n <>\n {currentBody !== TransferTicketBody.Recipient && (\n \n )}\n {currentBody === TransferTicketBody.ImageProof ||\n currentBody === TransferTicketBody.UrlProof ||\n currentBody === TransferTicketBody.IdProof ||\n currentBody === TransferTicketBody.TicketmasterBarcodesViaOneTicket ||\n currentBody === TransferTicketBody.TicketmasterBarcodesViaTradeDesk ||\n watchTransferType === TransferTicketType.None ? (\n \n ) : (\n \n )}\n \n );\n };\n\n return (\n <>\n \n }\n />\n \n\n \n \n
    \n \n \n {isSubmitting && }\n {!isSubmitting && getBody()}\n \n \n\n \n {isMobile || currentBody !== TransferTicketBody.Recipient ? (\n \n ) : (\n \n \n \n )}\n \n \n );\n};\n","import { useCallback, useContext } from 'react';\nimport { TransferButton } from 'src/components/Buttons';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { ButtonProps } from 'src/core/ui';\nimport { TurnOnSaleAutoFulfillDialog } from 'src/dialogs/TurnOnSaleAutoFulfillDialog';\nimport { ModalProps } from 'src/modals/Modal';\nimport { TransferTickets } from 'src/modals/TransferTickets';\nimport { ActionOutboxEntityType, SaleDetails } from 'src/WebApiController';\n\nexport const LaunchTransferTickets = ({\n saleId,\n marketplaceSaleId,\n cancelTo,\n eTicketUrlOnly,\n isSaleNoFulfill,\n ...buttonProps\n}: {\n saleId: number;\n marketplaceSaleId?: string | null;\n variant?: ButtonProps['variant'];\n cancelTo?: ModalProps;\n iconOnlyMode?: boolean;\n disabled?: boolean;\n eTicketUrlOnly?: boolean;\n isSaleNoFulfill?: boolean | null;\n}) => {\n const { setModal } = useContext(ModalContext);\n const { setActivePosEntity } = useActivePosEntityContext();\n\n const {\n openDialog: openTurnOnSaleAutoFulfillDialog,\n closeDialog: closeTurnOnSaleAutoFulfillDialog,\n } = useDialog(DialogId.Confirm, TurnOnSaleAutoFulfillDialog);\n\n const transferTickets = useCallback(() => {\n setModal({\n children: (\n \n ),\n clickOutsideToClose: true,\n size: 'slide-in',\n deepLinkValue: saleId,\n trackViewEntityType: ActionOutboxEntityType.Sale,\n });\n }, [setModal, cancelTo, eTicketUrlOnly, saleId]);\n\n const onLaunchDialog = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n\n setActivePosEntity(saleId, marketplaceSaleId);\n transferTickets();\n },\n [setActivePosEntity, saleId, marketplaceSaleId, transferTickets]\n );\n\n const onClickHandler = useCallback(\n (e: React.MouseEvent) => {\n if (isSaleNoFulfill) {\n e?.preventDefault();\n e?.stopPropagation();\n\n openTurnOnSaleAutoFulfillDialog({\n saleId: saleId,\n onOkay: () => {\n closeTurnOnSaleAutoFulfillDialog();\n onLaunchDialog(e);\n },\n onCancel: () => {\n closeTurnOnSaleAutoFulfillDialog();\n onLaunchDialog(e);\n },\n });\n } else {\n onLaunchDialog(e);\n }\n },\n [\n closeTurnOnSaleAutoFulfillDialog,\n isSaleNoFulfill,\n onLaunchDialog,\n openTurnOnSaleAutoFulfillDialog,\n saleId,\n ]\n );\n\n return (\n \n );\n};\n","import { useMutation } from '@tanstack/react-query';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { SaleClient } from 'src/WebApiController';\n\nexport function useUnwasteSale() {\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError, showErrorDialog } = useErrorBoundaryContext();\n\n return useMutation({\n mutationFn: async ({ saleId }: { saleId: number }) => {\n return await new SaleClient(activeAccountWebClientConfig).unwasteSale({\n saleId,\n });\n },\n onError: (error: ErrorTypes, { saleId }, context) => {\n trackError('SaleClient.unwasteSale', error, {\n saleId,\n });\n showErrorDialog('SaleClient.unwasteSale', error, {\n trackErrorData: { saleId },\n });\n },\n });\n}\n","import React, { useCallback } from 'react';\nimport { ButtonWithIcon } from 'src/components/Buttons';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ConfirmDialog } from 'src/core/interim/dialogs/ConfirmDialog';\nimport { vars } from 'src/core/themes';\nimport { useUnwasteSale } from 'src/hooks/api/useUnwasteSale';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { IconsFill, ResetIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SaleDetails } from 'src/WebApiController';\n\ninterface UnwasteTicketsButtonProps {\n saleId: number | undefined | null;\n}\n\nexport const UnwasteTicketsButton = ({ saleId }: UnwasteTicketsButtonProps) => {\n const isMobile = useMatchMedia('mobile');\n const { launchDialog, closeDialog, dialogProps } = useBasicDialog();\n const { mutateAsync, isPending } = useUnwasteSale();\n const { posEntity: sale, setActivePosEntity } =\n useActivePosEntityContext();\n\n const onReload = useCallback(() => {\n if (sale) {\n setActivePosEntity(sale.id, sale.idOnMkp, true);\n }\n }, [sale, setActivePosEntity]);\n\n if (!saleId) {\n return null;\n }\n\n return (\n <>\n \n }\n textContentId={ContentId.UnwasteTickets}\n onClick={launchDialog}\n />\n }\n bodyText={}\n okText={ContentId.Yes}\n cancelText={ContentId.No}\n {...dialogProps}\n isLoading={isPending}\n onOkay={async () => {\n await mutateAsync({ saleId });\n closeDialog();\n onReload();\n }}\n />\n \n );\n};\n","import { useCallback, useContext } from 'react';\nimport { UploadButton } from 'src/components/Buttons';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { ButtonProps } from 'src/core/ui';\nimport { TurnOnSaleAutoFulfillDialog } from 'src/dialogs/TurnOnSaleAutoFulfillDialog';\nimport { UploadBarcodeProps, UploadBarcodes } from 'src/modals/UploadBarcodes';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { EntityWithRealTickets } from 'src/utils/ticketUtils';\nimport { ListingActionType, SaleActionType } from 'src/WebApiController';\n\nexport const LaunchUploadBarcodes = ({\n entityId,\n idOnMkp,\n variant,\n iconOnlyMode,\n dropdownItemMode,\n disabled,\n action,\n isSaleNoFulfill,\n ...modalProps\n}: UploadBarcodeProps & {\n entityId: number;\n idOnMkp?: string | null;\n variant?: ButtonProps['variant'];\n iconOnlyMode?: boolean;\n dropdownItemMode?: boolean;\n disabled?: boolean;\n isSaleNoFulfill?: boolean | null;\n action:\n | ListingActionType.PredeliverBarcodes\n | ListingActionType.RedeliverBarcodes\n | SaleActionType.Fulfill\n | SaleActionType.Refulfill;\n}) => {\n const { setModal } = useContext(ModalContext);\n const { setActivePosEntity } =\n useActivePosEntityContext();\n\n const uploadBarcodes = useCallback(() => {\n setModal({\n children: ,\n clickOutsideToClose: true,\n size: 'slide-in',\n });\n }, [setModal, modalProps]);\n\n const {\n openDialog: openTurnOnSaleAutoFulfillDialog,\n closeDialog: closeTurnOnSaleAutoFulfillDialog,\n } = useDialog(DialogId.Confirm, TurnOnSaleAutoFulfillDialog);\n\n const onLaunchDialog = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n\n setActivePosEntity(entityId, idOnMkp);\n uploadBarcodes();\n },\n [setActivePosEntity, entityId, idOnMkp, uploadBarcodes]\n );\n\n const onClickHandler = useCallback(\n (e: React.MouseEvent) => {\n if (isSaleNoFulfill) {\n e.preventDefault();\n e.stopPropagation();\n\n openTurnOnSaleAutoFulfillDialog({\n saleId: entityId,\n onOkay: () => {\n closeTurnOnSaleAutoFulfillDialog();\n onLaunchDialog(e);\n },\n onCancel: () => {\n closeTurnOnSaleAutoFulfillDialog();\n onLaunchDialog(e);\n },\n });\n } else {\n onLaunchDialog(e);\n }\n },\n [\n closeTurnOnSaleAutoFulfillDialog,\n entityId,\n isSaleNoFulfill,\n onLaunchDialog,\n openTurnOnSaleAutoFulfillDialog,\n ]\n );\n\n const actionContentId =\n action === SaleActionType.Refulfill && isSaleNoFulfill\n ? ContentId.Fulfill\n : action === ListingActionType.RedeliverBarcodes ||\n action === SaleActionType.Refulfill\n ? ContentId.ReuploadBarcodes\n : ContentId.UploadBarcodes;\n\n if (dropdownItemMode) {\n return (\n \n \n \n );\n }\n\n return (\n \n );\n};\n","import { useCallback, useContext } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { OkButton } from 'src/components/Buttons/OkButton';\nimport {\n DocumentFileUploadInfo,\n ETicketsForm,\n UploadETicketForm,\n UploadETicketsSeatAssignmentBody,\n} from 'src/components/UploadArtifacts/UploadETicketsV2';\nimport { UploadETicketsContextProvider } from 'src/components/UploadArtifacts/UploadETicketsV2/UploadETicketsContext';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useCatalogMetricsContext } from 'src/contexts/CatalogMetricsContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { DndGlobalFileDrop } from 'src/core/POS/DnDFileUploader/components/DndGlobalFileDrop';\nimport { DndFilerUploaderContextProvider } from 'src/core/POS/DnDFileUploader/DndFileUploaderContext';\nimport { useEventItemLoadingDisplay } from 'src/hooks/useEventItemLoadingDisplay';\nimport { CancellableFormFooter } from 'src/modals/common';\nimport { CancellableFormHeader } from 'src/modals/common/CancellableFormHeader';\nimport { ConnectedEventEntityHeader } from 'src/modals/common/EventEntityHeader';\nimport { ModalBody, ModalFooter, ModalProps } from 'src/modals/Modal';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { EntityWithRealTickets } from 'src/utils/ticketUtils';\nimport {\n DocumentProcessorClient,\n DocumentUploadInfo,\n FileParameter,\n PosClientConfig,\n PosUiActionResult,\n SaleMetrics,\n TicketType,\n UserDocument,\n} from 'src/WebApiController';\n\nimport { Summary } from '../common/Summary';\nimport {\n ModalBodyDataContainer,\n ModalBodyHeaderContainer,\n} from '../Modal/Modal.styled';\n\nexport type UploadETicketsModalProps = {\n onUploadDocuments: (\n client: DocumentProcessorClient,\n docUploadInfo: DocumentUploadInfo,\n file: FileParameter\n ) => Promise;\n onUploadETickets: (\n posClientConfig: PosClientConfig,\n entityId: number,\n ticketAssignments: UserDocument[]\n ) => Promise;\n ticketType: TicketType.ETicket | TicketType.QRCode;\n cancelTo?: ModalProps;\n loadingContentId: FormatContentId;\n searchingContentId: FormatContentId;\n errorContentId: FormatContentId;\n};\n\nexport const UploadETicketsV2 = ({\n loadingContentId,\n searchingContentId,\n errorContentId,\n ...rest\n}: UploadETicketsModalProps) => {\n const { loadingState } = useEventItemLoadingDisplay(\n loadingContentId,\n searchingContentId,\n errorContentId\n );\n\n return loadingState || ;\n};\n\nexport type UploadETicketsBodyProps = Omit<\n UploadETicketsModalProps,\n 'loadingContentId' | 'searchingContentId' | 'errorContentId'\n>;\n\nconst UploadETicketsContent = ({\n ticketType,\n onUploadDocuments,\n onUploadETickets,\n cancelTo,\n}: UploadETicketsBodyProps) => {\n const { setModal, closeModal } = useContext(ModalContext);\n\n const { posEntity, setActivePosEntity } =\n useActivePosEntityContext();\n\n const { refreshMetrics } = useCatalogMetricsContext();\n\n const goBack = useCallback(\n async (isCancelled: boolean) => {\n if (!isCancelled) {\n refreshMetrics?.();\n\n // Refresh the active data so the SaleDetail dialog will have the new content\n await setActivePosEntity(posEntity!.id, posEntity!.idOnMkp, true);\n }\n\n if (cancelTo) {\n setModal(cancelTo);\n } else {\n closeModal(true);\n }\n },\n [\n cancelTo,\n refreshMetrics,\n setActivePosEntity,\n posEntity,\n setModal,\n closeModal,\n ]\n );\n\n return (\n \n void,\n onNext: () => void,\n onCancel: () => void,\n disabled?: boolean\n ) => (\n \n )}\n />\n \n );\n};\n\nconst UploadETicketFormContent = ({\n cancelTo,\n ticketType,\n onNext,\n onCancel,\n disabled,\n eTicketUploadInfos,\n setETicketUploadInfos,\n}: {\n cancelTo?: ModalProps;\n ticketType: TicketType.ETicket | TicketType.QRCode;\n onNext: () => void;\n onCancel: () => void;\n disabled?: boolean;\n eTicketUploadInfos: DocumentFileUploadInfo[];\n setETicketUploadInfos: (infos: DocumentFileUploadInfo[]) => void;\n}) => {\n const { formState } = useFormContext();\n const { isDirty, isSubmitting } = formState;\n\n const { event, posEntity } =\n useActivePosEntityContext();\n\n return (\n <>\n \n \n }\n />\n \n\n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n );\n};\n","import { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport {\n UploadETickets,\n UploadETicketsModalProps,\n} from 'src/modals/UploadETickets';\nimport { UploadETicketsV2 } from 'src/modals/UploadETickets/UploadETicketsV2';\nimport { Feature } from 'src/WebApiController';\n\ntype UploadETicketsVersionSelectorProps = UploadETicketsModalProps;\n\nexport const UploadETicketsSelector = (\n props: UploadETicketsVersionSelectorProps\n) => {\n const hasUploadTicketFilesFlowV2 = useUserHasFeature(\n Feature.UploadTicketFilesFlowV2\n );\n\n if (hasUploadTicketFilesFlowV2) {\n return ;\n }\n\n return ;\n};\n","import { useCallback, useContext } from 'react';\nimport { UploadButton } from 'src/components/Buttons';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { ConfirmDialog } from 'src/core/interim/dialogs/ConfirmDialog';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { ButtonProps } from 'src/core/ui';\nimport { TurnOnSaleAutoFulfillDialog } from 'src/dialogs/TurnOnSaleAutoFulfillDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { UploadETicketsSelector } from 'src/modals/PurchaseWizard/UploadETicketsSelector';\nimport { UploadETicketsModalProps } from 'src/modals/UploadETickets';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n ListingActionType,\n SaleActionType,\n TicketType,\n} from 'src/WebApiController';\n\nexport const LaunchUploadETickets = ({\n entityId,\n marketplaceSaleId,\n variant,\n iconOnlyMode,\n dropdownItemMode,\n disabled,\n action,\n ticketType,\n isSaleNoFulfill,\n ...modalProps\n}: {\n entityId: number;\n marketplaceSaleId?: string | null;\n variant?: ButtonProps['variant'];\n iconOnlyMode?: boolean;\n dropdownItemMode?: boolean;\n disabled?: boolean;\n isSaleNoFulfill?: boolean | null;\n action:\n | ListingActionType.PredeliverETickets\n | ListingActionType.RedeliverETickets\n | ListingActionType.PredeliverQRCode\n | ListingActionType.RedeliverQRCode\n | SaleActionType.Fulfill\n | SaleActionType.Refulfill;\n} & UploadETicketsModalProps) => {\n const { setModal } = useContext(ModalContext);\n const { setActivePosEntity } = useActivePosEntityContext();\n\n const {\n launchDialog: launchConfirmDialog,\n closeDialog: closeConfirmDialog,\n dialogProps,\n } = useBasicDialog();\n\n const {\n openDialog: openTurnOnSaleAutoFulfillDialog,\n closeDialog: closeTurnOnSaleAutoFulfillDialog,\n } = useDialog(DialogId.Confirm, TurnOnSaleAutoFulfillDialog);\n\n const uploadETickets = useCallback(() => {\n setModal({\n children: (\n \n ),\n clickOutsideToClose: true,\n size: 'slide-in',\n });\n }, [setModal, modalProps, ticketType]);\n\n const onLaunchDialog = useCallback(\n (e?: React.MouseEvent) => {\n e?.preventDefault();\n e?.stopPropagation();\n\n setActivePosEntity(entityId, marketplaceSaleId);\n uploadETickets();\n },\n [setActivePosEntity, entityId, marketplaceSaleId, uploadETickets]\n );\n\n const onClickHandler = useCallback(\n (e?: React.MouseEvent) => {\n if (isSaleNoFulfill) {\n e?.preventDefault();\n e?.stopPropagation();\n\n openTurnOnSaleAutoFulfillDialog({\n saleId: entityId,\n onOkay: () => {\n closeTurnOnSaleAutoFulfillDialog();\n onLaunchDialog(e);\n },\n onCancel: () => {\n closeTurnOnSaleAutoFulfillDialog();\n onLaunchDialog(e);\n },\n });\n } else {\n onLaunchDialog(e);\n }\n },\n [\n closeTurnOnSaleAutoFulfillDialog,\n entityId,\n isSaleNoFulfill,\n onLaunchDialog,\n openTurnOnSaleAutoFulfillDialog,\n ]\n );\n\n const actionContentId =\n action === SaleActionType.Refulfill && isSaleNoFulfill\n ? ContentId.Fulfill\n : action === ListingActionType.PredeliverQRCode ||\n (ticketType === TicketType.QRCode && action === SaleActionType.Fulfill)\n ? ContentId.UploadQRCodes\n : action === ListingActionType.RedeliverQRCode ||\n (ticketType === TicketType.QRCode &&\n action === SaleActionType.Refulfill)\n ? ContentId.ReuploadQRCodes\n : action === ListingActionType.RedeliverETickets ||\n action === SaleActionType.Refulfill\n ? ContentId.ReuploadETickets\n : ContentId.UploadETickets;\n\n const onAttemptLaunchDialog = useCallback(() => {\n if (action === SaleActionType.Refulfill) {\n launchConfirmDialog();\n } else {\n onClickHandler();\n }\n }, [action, launchConfirmDialog, onClickHandler]);\n\n return (\n <>\n {dropdownItemMode ? (\n \n \n \n ) : (\n {\n e.stopPropagation();\n e.preventDefault();\n onAttemptLaunchDialog();\n }}\n textContentId={actionContentId}\n />\n )}\n }\n bodyText={}\n onOkay={onClickHandler}\n onCancel={closeConfirmDialog}\n />\n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const CancelledHoldIcon = (props: PosIconProps) => {\n return (\n \n \n \n \n \n \n \n \n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const FulfilledIcon = (props: PosIconProps) => {\n return (\n \n \n \n \n \n \n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const FulfillmentFailedIcon = (props: PosIconProps) => {\n return (\n \n \n \n \n \n \n \n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const HoldIcon = (props: PosIconProps) => {\n return (\n \n \n \n \n \n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const PendingAllocationIcon = (props: PosIconProps) => {\n return (\n \n \n \n \n \n \n \n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const PendingFulfillmentIcon = (props: PosIconProps) => {\n return (\n \n \n \n \n \n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const PendingRejectionIcon = (props: PosIconProps) => {\n return (\n \n \n \n \n \n \n \n \n \n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const ProcessingFulfillmentIcon = (props: PosIconProps) => {\n return (\n \n \n \n \n \n \n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const SaleCancelledIcon = (props: PosIconProps) => {\n return (\n \n \n \n \n \n \n \n );\n};\n","/* eslint-disable react-hooks/rules-of-hooks */\nimport { differenceInMinutes, format } from 'date-fns';\nimport { ButtonWithIcon } from 'src/components/Buttons';\nimport { vars } from 'src/core/themes';\nimport { ButtonProps } from 'src/core/ui';\nimport { ModalProps } from 'src/modals/Modal';\nimport { SaleDetailsModalConfig } from 'src/modals/SaleDetails';\nimport { LaunchConfirmSale } from 'src/modals/SaleDetails/actions/LaunchConfirmSale';\nimport { LaunchDeallocateSale } from 'src/modals/SaleDetails/actions/LaunchDeallocateSale';\nimport { LaunchDownloadUserDocuments } from 'src/modals/SaleDetails/actions/LaunchDownloadUserDocuments';\nimport { LaunchEditOfflineSale } from 'src/modals/SaleDetails/actions/LaunchEditOfflineSale';\nimport { LaunchExpireHold } from 'src/modals/SaleDetails/actions/LaunchExpireHold';\nimport { LaunchMarkAsFulfilled } from 'src/modals/SaleDetails/actions/LaunchMarkAsFulfilled';\nimport { LaunchRejectSale } from 'src/modals/SaleDetails/actions/LaunchRejectSale';\nimport { LaunchResetFulfillmentButton } from 'src/modals/SaleDetails/actions/LaunchResetFulfillmentButton';\nimport { LaunchTransferTickets } from 'src/modals/SaleDetails/actions/LaunchTransferTickets';\nimport { UnwasteTicketsButton } from 'src/modals/SaleDetails/components/UnwasteTickets/UnwasteTicketsButton';\nimport { LaunchUploadBarcodes } from 'src/modals/UploadBarcodes/LaunchUploadBarcodes';\nimport { LaunchUploadETickets } from 'src/modals/UploadETickets/LaunchUploadETickets';\nimport { MainRoute } from 'src/navigations/Routes/MainRoute';\nimport { CancelledHoldIcon } from 'src/svgs/CancelledHoldIcon';\nimport { FulfilledIcon } from 'src/svgs/FulfilledIcon';\nimport { FulfillmentFailedIcon } from 'src/svgs/FulfillmentFailedIcon';\nimport { HoldIcon } from 'src/svgs/HoldIcon';\nimport { PendingAllocationIcon } from 'src/svgs/PendingAllocationIcon';\nimport { PendingFulfillmentIcon } from 'src/svgs/PendingFulfillmentIcon';\nimport { PendingRejectionIcon } from 'src/svgs/PendingRejectionIcon';\nimport { ProcessingFulfillmentIcon } from 'src/svgs/ProcessingFulfillmentIcon';\nimport { SaleCancelledIcon } from 'src/svgs/SaleCancelledIcon';\nimport { IconsFill, WarningOutlineIcon } from 'src/svgs/Viagogo';\nimport {\n EventIdQueryParam,\n REACT_APP_STUBHUB_MY_HUB_BASE_URL,\n SaleDeeplinkQueryParam,\n} from 'src/utils/constants/constants';\nimport { removeFilters } from 'src/utils/eventQueryUtils';\nimport {\n ActionOutboxEntityType,\n DocumentProcessorClient,\n DocumentUploadInfo,\n Event,\n FileParameter,\n Listing,\n Marketplace,\n MarketplaceContractState,\n MarketplaceSaleInput,\n MarketplaceSaleLineItem,\n PointOfSaleSaleStatus,\n PosClientConfig,\n PosManagedMarketplaceSaleInput,\n SaleActionType,\n SaleClient,\n SaleDetails,\n SaleInput,\n SiteMarketplacePaymentLineInput,\n Ticket,\n TicketBarcode,\n TicketType,\n UserDocument,\n} from 'src/WebApiController';\n\nimport { ContentId } from './constants/contentId';\nimport { SALES_STATUS_TO_CID } from './constants/contentIdMaps';\nimport { FormatContentId } from './constants/formatContentId';\nimport { getFullUrl, getPathFromMainRoute } from './deepLinkUtils';\nimport { getInHandDateBasedOnEvent } from './eventWithDataUtils';\nimport { getLocaleFromLanguageOrCurrent } from './localeUtils';\nimport { getTimeDateDifferenceAsShorthand } from './numberFormatter';\nimport { posChangedField, posField } from './posFieldUtils';\nimport { getDefaultTicketType, getTicketTypeIcon } from './ticketTypeUtils';\n\nexport const NON_MAIN_SALE_ACTIONS = [\n SaleActionType.Deallocate,\n SaleActionType.MarkAsFulfilled,\n SaleActionType.ResetFulfillment,\n SaleActionType.Unwaste,\n];\n\nexport const getSaleDetailsModalConfigWithDeepLink = (\n deepLinkId?: string | number,\n doTrackView = false\n) => {\n const modalConfig = SaleDetailsModalConfig;\n return {\n ...modalConfig,\n deepLinkValue: deepLinkId,\n trackViewEntityType: doTrackView ? ActionOutboxEntityType.Sale : undefined,\n };\n};\n\nexport const getSaleDetailsDeepLinkUrl = (deepLinkId?: string | number) => {\n return getFullUrl(MainRoute.Sales, SaleDeeplinkQueryParam, deepLinkId);\n};\n\nexport const getSaleDetailsRelativeUrl = (deepLinkId?: string | number) => {\n const navigateUrl = `${getPathFromMainRoute(\n MainRoute.Sales\n )}?${SaleDeeplinkQueryParam}=${deepLinkId}`;\n\n return navigateUrl;\n};\n\nexport const openOnStubHubMyAccount = (marketplaceSaleId: string | null) => {\n if (!marketplaceSaleId) return;\n\n window.open(\n new URL(\n `/sales?saleId=${marketplaceSaleId}`,\n /* TODO - POS-777 - this should be the viagogo url if the event is a UK event */\n REACT_APP_STUBHUB_MY_HUB_BASE_URL\n ),\n '_blank'\n );\n};\n\nexport const getSaleActionButton = (\n saleId: number,\n marketplaceSaleId: string | null,\n marketplace: Marketplace | null,\n saleStatus: PointOfSaleSaleStatus,\n action: SaleActionType,\n ticketType: TicketType | null,\n isNoFulfill?: boolean | null,\n variant?: ButtonProps['variant'],\n iconOnlyMode?: boolean,\n cancelTo?: ModalProps,\n disabled?: boolean\n) => {\n if (action === SaleActionType.Reject) {\n return (\n \n );\n }\n if (action === SaleActionType.DownloadUserDocuments) {\n return (\n \n );\n }\n\n if (\n action === SaleActionType.Deallocate ||\n action === SaleActionType.RejectAllocation\n ) {\n return (\n \n );\n }\n\n if (action === SaleActionType.ResetFulfillment) {\n return (\n \n );\n }\n\n if (action === SaleActionType.MarkAsFulfilled) {\n return (\n \n );\n }\n\n if (\n action === SaleActionType.Confirm ||\n action === SaleActionType.Allocate ||\n action === SaleActionType.ConfirmAllocation\n ) {\n return (\n \n );\n }\n if (action === SaleActionType.ExpireHold) {\n return (\n \n );\n }\n\n if (\n action === SaleActionType.Fulfill ||\n action === SaleActionType.Refulfill\n ) {\n switch (ticketType) {\n case TicketType.Barcode:\n return (\n \n new SaleClient(clientConfig).updateBarcodesForSale(\n saleId,\n barcodes\n )\n }\n entityId={saleId}\n idOnMkp={marketplaceSaleId}\n iconOnlyMode={iconOnlyMode}\n cancelTo={cancelTo}\n variant={variant}\n action={action}\n loadingContentId={FormatContentId.LoadingSaleId}\n errorContentId={FormatContentId.CouldNotFindSaleId}\n searchingContentId={FormatContentId.SearchingForSaleId}\n isSaleNoFulfill={isNoFulfill}\n />\n );\n case TicketType.ETicket:\n case TicketType.QRCode:\n return (\n \n ticketType === TicketType.ETicket\n ? new SaleClient(clientConfig).saveETicketAssignments(\n entityId,\n etickets\n )\n : new SaleClient(clientConfig).saveQRCodeAssignments(\n entityId,\n etickets\n )\n }\n onUploadDocuments={(\n client: DocumentProcessorClient,\n docUploadInfo: DocumentUploadInfo,\n file: FileParameter\n ) =>\n client.uploadDocumentForSale(\n docUploadInfo.entityId,\n ActionOutboxEntityType.Sale,\n docUploadInfo.documentType,\n docUploadInfo.blobName,\n docUploadInfo.documentId,\n docUploadInfo.contentType,\n file\n )\n }\n loadingContentId={FormatContentId.LoadingSaleId}\n errorContentId={FormatContentId.CouldNotFindSaleId}\n searchingContentId={FormatContentId.SearchingForSaleId}\n isSaleNoFulfill={isNoFulfill}\n />\n );\n case TicketType.Transfer:\n case TicketType.ETicketUrl:\n case TicketType.SMPWallet:\n return (\n \n );\n default:\n return (\n {\n e.stopPropagation();\n openOnStubHubMyAccount(marketplaceSaleId);\n }}\n />\n );\n }\n }\n\n if (action === SaleActionType.EditOffline) {\n return (\n \n );\n }\n\n if (action === SaleActionType.Unwaste) {\n return ;\n }\n};\n\nexport function getInHandDisplayData(\n inhandTextString: string,\n utcDate?: Date | null,\n fromUtcDate: Date = new Date(),\n needsToFulfill = false\n): {\n displayText: string | null;\n displayTooltip: string | null;\n alertIcon: React.ReactNode | null;\n} {\n const minutes = !utcDate ? -1 : differenceInMinutes(utcDate, fromUtcDate);\n const shorthandDifference = getTimeDateDifferenceAsShorthand({\n inputDate: utcDate,\n dateToCompareTo: fromUtcDate,\n hideRelativeTerms: true,\n });\n let displayText = null;\n let alertIcon: React.ReactNode | null = (\n \n );\n\n if (minutes <= 0) {\n displayText = inhandTextString;\n\n if (needsToFulfill) {\n alertIcon = (\n \n );\n }\n } else {\n displayText = shorthandDifference;\n const hours = minutes / 60;\n // Do not alert when in-hand date is still < 48 hours in the future\n if (hours > 48) alertIcon = null;\n }\n\n const displayTooltip = utcDate\n ? format(utcDate, 'MMM d, yyyy hh:mm', {\n locale: getLocaleFromLanguageOrCurrent(),\n })\n : null;\n\n return {\n displayText,\n displayTooltip,\n alertIcon,\n };\n}\n\nexport const getMarketplaceSaleInputFromListing = (\n listing: Listing,\n event: Event\n) => {\n const curMillis = new Date().getTime();\n\n return {\n marketplaceSaleId: `Sale-${curMillis}`, // the chance of 2 people creating the same Offline sale in the same milli is rare - this makes a short enough ID\n marketplace: undefined,\n listingId: listing.id,\n section: posChangedField(listing.seating.section),\n row: posChangedField(listing.seating.row),\n seatFrom: posChangedField(''),\n seatTo: posChangedField(''),\n posEventId: listing.posEvId,\n viagogoEventId: event.viagId,\n eventMappingId: event.mappingId,\n saleDate: posChangedField(new Date().toISOString()),\n currencyCode: posChangedField(listing.currency),\n totalNetProceeds: posChangedField(0),\n inHandDate: posChangedField(\n listing.inHandAt ?? getInHandDateBasedOnEvent(event)\n ),\n venueId: event.venueId,\n quantitySold: posChangedField(listing.availQty),\n ticketType: posChangedField(\n listing.topPriTktType ?? getDefaultTicketType(listing.delivType)\n ),\n buyerName: posChangedField(null),\n buyerEmail: posChangedField(null),\n buyerPhone: posChangedField(null),\n listingNotes: posChangedField(listing.seatTraits),\n saleStatus: posChangedField(PointOfSaleSaleStatus.PendingFulfillment), // We want to create this already-allocated\n } as unknown as MarketplaceSaleInput;\n};\n\nexport const getPosManagedMarketplaceSaleInputFromListing = (\n listing: Listing,\n event: Event\n) => {\n const curMillis = new Date().getTime();\n\n return {\n marketplaceSaleId: `Offline-${curMillis}`, // the chance of 2 people creating the same Offline sale in the same milli is rare - this makes a short enough ID\n listingId: listing.id,\n section: posChangedField(listing.seating.section),\n row: posChangedField(listing.seating.row),\n seatFrom: posChangedField(''),\n seatTo: posChangedField(''),\n posEventId: listing.posEvId,\n viagogoEventId: event.viagId,\n eventMappingId: event.mappingId,\n saleDate: posChangedField(new Date().toISOString()),\n currencyCode: posChangedField(listing.currency),\n totalNetProceeds: posChangedField(0),\n inHandDate: posChangedField(\n listing.inHandAt ?? getInHandDateBasedOnEvent(event)\n ),\n venueId: event.venueId,\n quantitySold: posChangedField(listing.availQty),\n ticketType: posChangedField(\n listing.topPriTktType ?? getDefaultTicketType(listing.delivType)\n ),\n buyerName: posChangedField(null),\n buyerEmail: posChangedField(null),\n buyerPhone: posChangedField(null),\n listingNotes: posChangedField(listing.seatTraits),\n saleStatus: posChangedField(PointOfSaleSaleStatus.Hold),\n } as PosManagedMarketplaceSaleInput;\n};\n\nexport const getPosManagedMarketplaceSaleInputFromSale = (\n sale: SaleDetails,\n event: Event\n) => {\n return {\n saleId: sale.id,\n marketplaceSaleId: sale.idOnMkp,\n listingId: sale.listingId ?? 0,\n section: posField(sale.seating.section),\n row: posField(sale.seating.row),\n seatFrom: posField(sale.seating.seatFr),\n seatTo: posField(sale.seating.seatTo),\n posEventId: sale.posEvId,\n viagogoEventId: event.viagId,\n eventMappingId: event.mappingId,\n saleDate: posField(new Date().toISOString()),\n currencyCode: posField(sale.currency),\n totalNetProceeds: posField(sale.ttlNetProcs?.amt ?? 0),\n inHandDate: posField(sale.inHandAt),\n venueId: event.venueId,\n quantitySold: posField(sale.qtySold),\n ticketType: posField(sale.ticketType),\n buyerName: posField(sale.transDest?.name),\n buyerEmail: posField(sale.transDest?.email),\n buyerPhone: posField(sale.transDest?.phoneNumber),\n listingNotes: posField(sale.seatTraits),\n saleStatus: posField(sale.status),\n paymentState: posField(sale.pmtState),\n internalNotes: posField(sale.privNotes),\n fulfillerSellerUserId: posField(sale.fulfillerId),\n } as PosManagedMarketplaceSaleInput;\n};\n\nexport const getConsecutiveSeatingsForQuantity = (\n tickets?: Ticket[],\n quantity?: number | null,\n canAllocateToNonConsecutiveSeats?: boolean\n) => {\n if (!tickets || !quantity) return undefined;\n\n const filteredTickets = tickets\n .filter((t) => t.saleId == null && t.holdId == null) // we only want the unsold/unhold tickets\n .toSorted((a, b) => (a.lstOrd ?? a.ord) - (b.lstOrd ?? b.ord));\n\n const result: Record = {};\n\n if (quantity < 2) {\n // Quantity 1 or less, we want to set seatFr and seatTo to same number\n return {\n result: filteredTickets.reduce(\n (r, c) => {\n r[c.lstOrd ?? c.ord] = c.lstOrd ?? c.ord;\n return r;\n },\n {} as Record\n ),\n maxAvailableQuantity: 1,\n };\n }\n\n let maxAvailableQuantity = 1;\n\n if (canAllocateToNonConsecutiveSeats) {\n // We treat the tickets as a consecutive sequence\n maxAvailableQuantity = filteredTickets.length;\n for (let i = 0; i < filteredTickets.length; i++) {\n if (i + quantity - 1 < filteredTickets.length) {\n const ord = filteredTickets[i].lstOrd ?? filteredTickets[i].ord;\n const nextOrd =\n filteredTickets[i + quantity - 1].lstOrd ??\n filteredTickets[i + quantity - 1].ord;\n result[ord] = nextOrd;\n }\n }\n } else {\n // We want to generate a seating for every seatFr\n for (let i = 0; i < filteredTickets.length; i++) {\n let isValidSequence = true;\n let sequenceLength = 1;\n for (\n let j = i;\n j < i + quantity - 1 && j < filteredTickets.length - 1;\n j++\n ) {\n const currentSeat = filteredTickets[j];\n const nextSeat = filteredTickets[j + 1];\n if (currentSeat.seat && nextSeat.seat) {\n const curOrdinal = currentSeat.lstOrd ?? currentSeat.ord;\n const nexOrdinal = nextSeat.lstOrd;\n if (curOrdinal + 1 !== nexOrdinal) {\n isValidSequence = false;\n break;\n } else {\n sequenceLength++;\n }\n } else {\n sequenceLength++;\n }\n }\n\n if (sequenceLength > maxAvailableQuantity) {\n // Update the max possible quantity as we go along\n maxAvailableQuantity = sequenceLength;\n }\n\n // If we found a valid sequence for the requested quantity - save it to result\n if (isValidSequence && sequenceLength === quantity) {\n const ord = filteredTickets[i].lstOrd ?? filteredTickets[i].ord;\n const nextOrd =\n filteredTickets[i + quantity - 1].lstOrd ??\n filteredTickets[i + quantity - 1].ord;\n result[ord] = nextOrd;\n }\n }\n }\n\n return { result: result, maxAvailableQuantity: maxAvailableQuantity };\n};\n\nexport const getSaleStatusDisplayContentId = (\n status?: PointOfSaleSaleStatus | null,\n marketplaceContractState?: MarketplaceContractState | null,\n marketplace?: Marketplace | null\n) => {\n if (\n marketplaceContractState ===\n MarketplaceContractState.CancelledProvisional &&\n marketplace !== Marketplace.Offline\n ) {\n return ContentId.CancelledHoldOnMarketplace;\n }\n\n return status ? SALES_STATUS_TO_CID[status] : undefined;\n};\n\nexport const getSaleStatusIcon = (\n status?: PointOfSaleSaleStatus | null,\n marketplaceContractState?: MarketplaceContractState | null,\n marketplace?: Marketplace | null\n) => {\n if (\n marketplaceContractState ===\n MarketplaceContractState.CancelledProvisional &&\n marketplace !== Marketplace.Offline\n ) {\n return CancelledHoldIcon;\n }\n\n switch (status) {\n case PointOfSaleSaleStatus.CancelledHold:\n return CancelledHoldIcon;\n\n case PointOfSaleSaleStatus.Fulfilled:\n return FulfilledIcon;\n\n case PointOfSaleSaleStatus.FulfillmentFailed:\n return FulfillmentFailedIcon;\n\n case PointOfSaleSaleStatus.Hold:\n return HoldIcon;\n\n case PointOfSaleSaleStatus.PendingConfirmation:\n return PendingAllocationIcon;\n\n case PointOfSaleSaleStatus.ProcessingFulfillment:\n return ProcessingFulfillmentIcon;\n\n case PointOfSaleSaleStatus.PendingRejection:\n return PendingRejectionIcon;\n\n case PointOfSaleSaleStatus.Rejected:\n return SaleCancelledIcon;\n case PointOfSaleSaleStatus.PendingFulfillment:\n default:\n return PendingFulfillmentIcon;\n }\n};\n\nexport const getSiteMarketplacePaymentLineInput = (\n mkpLine: MarketplaceSaleLineItem\n): SiteMarketplacePaymentLineInput => {\n return {\n marketplacePaymentLineId: mkpLine.id,\n marketplacePaymentId: mkpLine.posPmtId,\n externalPaymentId: mkpLine.extPmtId,\n externalPaymentLineId: mkpLine.extLineId,\n externalSaleId: mkpLine.extSaleId,\n saleId: mkpLine.saleId,\n currency: mkpLine.amt.currency!,\n amount: mkpLine.amt.amt,\n isCredit: mkpLine.isCred,\n paymentLineType: mkpLine.type,\n paymentDate: mkpLine.date,\n receivedDate: mkpLine.recvDate,\n paymentState: mkpLine.state,\n };\n};\n\nexport const getSaleDetailsUpdateInput = (\n sale?: SaleDetails | null\n): SaleInput => {\n return {\n saleId: sale?.id ?? -1,\n ticketType: posField(sale?.ticketType ?? null),\n fulfillerSellerUserId: posField(sale?.fulfillerId ?? null),\n tags: posField(sale?.tags ?? null),\n internalNotes: posField(sale?.privNotes ?? null),\n lineItems: posField(sale?.lineItems ?? null),\n paymentReceived: posField(sale?.pmtRcv ?? null),\n paymentReferenceId: posField(sale?.pmtRefId ?? null),\n paymentAmountReceived: posField(sale?.pmtAmtRcv ?? null),\n paymentCurrency: posField(sale?.pmtCurcy ?? null),\n disableAutoSourcing: posField(sale?.disAutoSource ?? null),\n isNoFulfill: posField(sale?.isNoFulfill ?? null),\n marketplacePaymentLines: posField(\n sale?.mkpLines?.map(getSiteMarketplacePaymentLineInput) ?? null\n ),\n commissions: posField(sale?.commissionOverride ?? null),\n lastPaymentDate: posField(sale?.lastPmtDate ?? null),\n cancellationReason: posField(sale?.cancellationReason ?? null),\n };\n};\n\nexport const createSaleEventPageUrl = (\n eventId: string,\n queryParamsToRemove?: string[] // queryParams to remove from final URL\n): string => {\n const url = new URL(window.location.href);\n url.searchParams.set(EventIdQueryParam, eventId);\n (queryParamsToRemove ?? []).forEach((param) =>\n url.searchParams.delete(param)\n );\n const cleanSearchParams = removeFilters(url.searchParams.toString(), [\n 'searchText',\n ]);\n return `/sales/event?${cleanSearchParams}`;\n};\n","import { LaunchActivityLog } from 'src/modals/ActivityLog';\nimport { SaleDeeplinkQueryParam } from 'src/utils/constants/constants';\nimport { getSaleDetailsModalConfigWithDeepLink } from 'src/utils/saleUtils';\n\nimport { ShareButton } from '../ShareButton/ShareButton';\nimport * as styles from './EventEntityHeader.css';\nimport { EntityIdNumberDiv, EntityInfoDiv } from './EventEntityHeader.styled';\n\nexport const SaleInfoDisplay = ({\n marketplace,\n entityId,\n idOnMkp,\n}: {\n marketplace?: string | null;\n idOnMkp: string | null;\n entityId: number;\n}) => {\n return (\n \n
    \n \n #{idOnMkp || entityId}\n
    \n
    {marketplace}
    \n \n
    \n );\n};\n","import { format } from 'date-fns';\nimport { ReactNode } from 'react';\nimport { SeatingInfo } from 'src/components/common/SeatingInfo';\nimport { EventInfo } from 'src/components/Events/EventInfo';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { useGetEventFullInfo } from 'src/hooks/useGetEventFullInfo';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { SummaryWrapper } from 'src/modals/common/Summary/SummaryWrapper';\nimport { MainRoute } from 'src/navigations/Routes/MainRoute';\nimport { SeatSaverIcon } from 'src/svgs';\nimport { ToBeDeterminedIcon } from 'src/svgs/Viagogo';\nimport {\n InventoryDeeplinkQueryParam,\n SaleDeeplinkQueryParam,\n} from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getFormattedEventName } from 'src/utils/eventWithDataUtils';\nimport { getFormattedLocation } from 'src/utils/format';\nimport { getLocaleFromLanguageOrCurrent } from 'src/utils/localeUtils';\nimport {\n DateTimeRange,\n Event,\n MarketplaceEntityWithTickets,\n Performer,\n Seating,\n Venue,\n} from 'src/WebApiController';\n\nimport { ListingInfoDisplay } from '../EventEntityHeader/ListingInfoDisplay';\nimport { SaleInfoDisplay } from '../EventEntityHeader/SaleInfoDisplay';\nimport { ShareButton } from '../ShareButton/ShareButton';\nimport * as styles from './Summary.css';\nimport {\n Divider,\n MarketPlaceDetailsWrapper,\n SummaryColumn,\n SummaryDateSection,\n SummaryDetailsSection,\n SummaryMainText,\n SummaryMainTextPinkAccent,\n SummaryRow,\n} from './Summary.styled';\n\nexport const Summary = ({\n event,\n eventNameLink,\n proposedVenue,\n proposedPerformer,\n posEntity,\n actions,\n}: {\n event: Event;\n eventNameLink?: string;\n proposedPerformer?: Performer | null;\n proposedVenue?: Venue | null;\n posEntity?: MarketplaceEntityWithTickets;\n actions?: ReactNode;\n}) => {\n const { performer, venue } = useGetEventFullInfo(\n event,\n proposedPerformer,\n proposedVenue\n );\n if (!event) {\n throw new Error('Event could not be loaded');\n }\n\n const { mainRoute } = useAppContext();\n\n const { mkp, id: entityId, idOnMkp, seating, ticketCnt } = posEntity ?? {};\n\n const isSeatSaver = (posEntity as { isSeatSaver?: boolean | null })\n ?.isSeatSaver;\n\n const isMobile = useMatchMedia('mobile');\n const [mainText, connectText, subText] = getFormattedEventName({\n event,\n performer,\n });\n const venueLocation = venue && getFormattedLocation(venue);\n return isMobile ? (\n \n \n \n \n {actions}\n \n \n \n \n \n \n \n \n ) : (\n \n \n \n \n \n \n \n \n {isSeatSaver && (\n \n \n \n \n )}\n \n {posEntity &&\n (mainRoute === MainRoute.Sales ||\n mainRoute === MainRoute.SalesEvent) && (\n \n )}\n {posEntity &&\n (mainRoute === MainRoute.Inventory ||\n mainRoute === MainRoute.InventoryEvent) && (\n \n )}\n \n \n {actions &&
    {actions}
    }\n
    \n );\n};\n\nconst SummaryDateDisplay = ({\n dates,\n}: {\n dates?: DateTimeRange | null;\n hideYear?: boolean;\n}) => {\n const locale = getLocaleFromLanguageOrCurrent();\n\n const startDateObj = dates?.start;\n\n const startDate = startDateObj == null ? null : new Date(startDateObj);\n\n return (\n \n {!startDate && }\n {startDate && (\n <>\n \n {format(startDate, 'eee', { locale })}\n \n \n {format(startDate, 'h:mm a', { locale })}\n \n \n {format(startDate, 'MMM d, yyyy', {\n locale,\n })}\n \n \n )}\n \n );\n};\n\nconst MarketPlaceDetails = ({\n marketplace,\n entityId,\n idOnMkp,\n}: {\n marketplace?: string | null;\n idOnMkp: string | null;\n entityId: number;\n}) => {\n const { mainRoute } = useAppContext();\n return (\n \n
    \n \n \n #{idOnMkp || entityId}\n \n
    \n {marketplace}\n
    \n );\n};\n\nconst EventDetails = ({\n seating,\n isSeatSaver,\n}: {\n seating: Seating;\n isSeatSaver?: boolean;\n}) => {\n return (\n \n \n \n );\n};\n","import { PurchaseEventItemHeader } from 'src/modals/common';\nimport { VenueConfigSummary } from 'src/modals/common/Summary';\nimport { formatCurrency } from 'src/utils/numberFormatter';\nimport { getTicketGroupInputTotalCost } from 'src/utils/ticketUtils';\nimport { TicketGroupInput } from 'src/WebApiController';\n\ninterface PurchaseTicketFlowEventHeaderProps {\n isSingleInputModeForMultiEvent: boolean;\n ticketGroups: TicketGroupInput[];\n}\n\nexport const PurchaseTicketsFlowEventHeader = ({\n isSingleInputModeForMultiEvent,\n ticketGroups,\n}: PurchaseTicketFlowEventHeaderProps) => {\n const ticketGroup = ticketGroups[0];\n\n if (!ticketGroup || !ticketGroup.event) {\n return null;\n }\n\n if (!isSingleInputModeForMultiEvent) {\n const totalCost = getTicketGroupInputTotalCost(ticketGroup);\n return (\n \n );\n }\n\n const { event, performer, venue } = ticketGroup;\n\n const venues =\n (venue && {\n [event.viagVirtualId]: venue,\n }) ||\n undefined;\n\n const performers =\n (performer && {\n [event.viagVirtualId]: performer,\n }) ||\n undefined;\n\n return (\n tg.event!) || []}\n eventSelected={event}\n venues={venues}\n performers={performers}\n />\n );\n};\n","import { useCallback, useEffect, useMemo, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { FormPage } from 'src/core/POS/FormPage';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { getTextFieldState } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { Radio, RadioGroup, Stack } from 'src/core/ui';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { CheckboxContainer, FieldWrapper, FormRow } from 'src/modals/common';\nimport { fieldText } from 'src/modals/common/Purchase/Purchase.css';\nimport { TagIcon } from 'src/svgs';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n getAllInPriceFromListPrice,\n getListPriceFromAllinPrice,\n} from 'src/utils/inventoryUtils';\nimport { formatCurrency } from 'src/utils/numberFormatter';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport { PurchaseOrderDetailsInput } from 'src/utils/purchaseUtils';\nimport { Marketplace } from 'src/WebApiController';\n\nimport { CostType } from '../TicketGroupInput';\n\nexport const CostSection = ({\n ticketGroupIndex,\n disabled,\n}: {\n ticketGroupIndex: number;\n disabled?: boolean;\n}) => {\n const { setValue, formState, getFieldState, clearErrors, watch } =\n useFormContext();\n\n const { getUiCurrency } = useLocalizationContext();\n const { loginContext } = useAppContext();\n\n const ticketGroup = watch(`ticketGroups.${ticketGroupIndex}`);\n const ticketCnt = watch(\n `ticketGroups.${ticketGroupIndex}.numberOfTickets.value`\n );\n const unitCost = watch(`ticketGroups.${ticketGroupIndex}.unitCost.value`);\n const faceValueCost = watch(\n `ticketGroups.${ticketGroupIndex}.faceValueCost.value`\n );\n const expectedValue = watch(\n `ticketGroups.${ticketGroupIndex}.expectedValue.value`\n );\n const websitePrice = watch(`ticketGroups.${ticketGroupIndex}.webPrice`);\n const taxPaid = watch(`ticketGroups.${ticketGroupIndex}.taxPaid.value`);\n const autoBroadcastCreatedListing = watch(\n `ticketGroups.${ticketGroupIndex}.autoBroadcastCreatedListing`\n );\n\n const unitCostField: `ticketGroups.${number}.unitCost` = `ticketGroups.${ticketGroupIndex}.unitCost`;\n const taxPaidField: `ticketGroups.${number}.taxPaid` = `ticketGroups.${ticketGroupIndex}.taxPaid`;\n const expectedValueField: `ticketGroups.${number}.expectedValue` = `ticketGroups.${ticketGroupIndex}.expectedValue`;\n const websitePriceField: `ticketGroups.${number}.webPrice` = `ticketGroups.${ticketGroupIndex}.webPrice`;\n\n const faceValueCostField: `ticketGroups.${number}.faceValueCost` = `ticketGroups.${ticketGroupIndex}.faceValueCost`;\n\n const unitCostError = getFieldState(unitCostField, formState)?.error?.message;\n const faceValueCostError = getFieldState(faceValueCostField, formState)?.error\n ?.message;\n\n const uiCurrency = useMemo(\n () => getUiCurrency(ticketGroup.currencyCode?.value),\n [getUiCurrency, ticketGroup.currencyCode?.value]\n );\n\n const isMobile = useMatchMedia('mobile');\n\n const [costSelected, setCostSelected] = useState(\n CostType.CostPerTicket\n );\n const [totalCost, setTotalCost] = useState(0);\n\n useEffect(() => {\n if (costSelected === CostType.CostPerTicket) {\n setTotalCost((unitCost ?? 0) * (ticketCnt ?? 0));\n }\n }, [unitCost, costSelected, ticketCnt]);\n\n const setFaceValue = useCallback(\n (faceValue: number) => {\n if (\n faceValue >= 0 &&\n faceValue <= Number.MAX_VALUE &&\n faceValue !== faceValueCost\n ) {\n setValue(faceValueCostField, posChangedField(faceValue));\n }\n },\n [faceValueCostField, setValue, faceValueCost]\n );\n\n const setUnitCost = useCallback(\n (newUnitCost: number) => {\n if (newUnitCost >= 0 && newUnitCost <= Number.MAX_VALUE) {\n clearErrors(unitCostField);\n\n if (newUnitCost !== unitCost) {\n if (newUnitCost === faceValueCost) {\n setFaceValue(newUnitCost);\n\n if (newUnitCost > 0 || autoBroadcastCreatedListing === false) {\n clearErrors(faceValueCostField);\n }\n }\n setValue(unitCostField, posChangedField(newUnitCost));\n }\n }\n },\n [\n autoBroadcastCreatedListing,\n clearErrors,\n faceValueCostField,\n setFaceValue,\n setValue,\n faceValueCost,\n unitCost,\n unitCostField,\n ]\n );\n\n const stubHubMarketplace =\n loginContext?.user?.activeAccount.marketplaceSettings.find(\n (mps) => mps.mkp === Marketplace.StubHub\n );\n return (\n }\n title={}\n >\n \n \n {\n if (value) {\n setCostSelected(value as CostType);\n }\n }}\n >\n \n \n \n \n }\n disabled={disabled}\n />\n \n \n \n }\n disabled={disabled}\n />\n \n \n \n \n {costSelected === CostType.TotalCost && (\n \n \n }\n >\n {\n const v = parseFloat(e.target.value) || 0;\n if (v >= 0 && v <= Number.MAX_VALUE) {\n setTotalCost(v);\n if (ticketGroup.numberOfTickets?.value) {\n const costPerTicket =\n v / ticketGroup.numberOfTickets.value;\n setUnitCost(costPerTicket);\n }\n }\n }}\n />\n \n \n \n )}\n \n \n }\n >\n {\n const v = parseFloat(e.target.value) || 0;\n setUnitCost(v);\n setTotalCost(\n ticketGroup.numberOfTickets?.value\n ? v * ticketGroup.numberOfTickets.value\n : 0\n );\n }}\n />\n \n \n \n }\n errors={faceValueCostError}\n >\n {\n const v = parseFloat(e.target.value) || 0;\n setFaceValue(v);\n\n if (v > 0 || autoBroadcastCreatedListing === false) {\n clearErrors(faceValueCostField);\n }\n }}\n />\n \n \n \n }>\n {\n const newExpectedValue = parseFloat(e.target.value) || 0;\n if (\n newExpectedValue >= 0 &&\n newExpectedValue <= Number.MAX_VALUE &&\n newExpectedValue !== expectedValue\n ) {\n setValue(\n expectedValueField,\n posChangedField(newExpectedValue)\n );\n const newWebsitePrice = getAllInPriceFromListPrice(\n newExpectedValue,\n null,\n stubHubMarketplace?.sellerFee\n );\n if (newWebsitePrice)\n setValue(websitePriceField, newWebsitePrice);\n }\n }}\n />\n \n \n \n }>\n {\n const newWebsitePrice = parseFloat(e.target.value) || 0;\n if (\n newWebsitePrice >= 0 &&\n newWebsitePrice <= Number.MAX_VALUE &&\n newWebsitePrice !== websitePrice\n ) {\n setValue(websitePriceField, newWebsitePrice);\n const newExpectedValue = getListPriceFromAllinPrice(\n newWebsitePrice,\n null,\n stubHubMarketplace?.sellerFee\n );\n if (newExpectedValue)\n setValue(\n expectedValueField,\n posChangedField(newExpectedValue)\n );\n }\n }}\n />\n \n \n \n {costSelected === CostType.CostPerTicket && (\n \n \n }\n >\n
    \n {formatCurrency(\n totalCost || 0,\n uiCurrency.code,\n uiCurrency.dec\n )}\n
    \n \n
    \n
    \n )}\n \n \n \n }\n disabled={disabled}\n checked={(taxPaid ?? 0) === 0} // tax exempt true means zero tax is paid\n onChange={(e) => {\n const isChecked = e.target.checked;\n setValue(taxPaidField, posChangedField(isChecked ? 0 : 1));\n }}\n />\n \n \n \n \n );\n};\n","import { useCallback, useEffect, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { TicketTypePriorityInput } from 'src/components/common/TicketTypePriorityInput';\nimport { DeliveryTypeRadioInput } from 'src/components/Input/DeliveryTypeRadioInput';\nimport { InHandDateInput } from 'src/components/Input/InHandDateInput';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { FormPage } from 'src/core/POS/FormPage';\nimport { InfoMessage } from 'src/core/POS/MessageWithIcon/InfoMessage';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { AlertWithSuppressionDialog } from 'src/dialogs/AlertWithSuppressionDialog';\nimport { useDeliveryInfoChangeDialog } from 'src/dialogs/AlertWithSuppressionDialog/useDeliveryInfoChangeDialog';\nimport { useDeliveryOverrideForNewTicketGroup } from 'src/hooks/api/useDeliveryOverrideForNewTicketGroup';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport {\n useUserCanUpdateListingTicketTypePriorityFromPurchase,\n useUserCanUpdatePurchaseCustomDeliveryType,\n useUserCanUpdatePurchaseDeliveryType,\n} from 'src/hooks/useUserHasPurchasePermissions';\nimport { FieldWrapper, FormRow } from 'src/modals/common/Purchase';\nimport { useGetListingAndSaleIds } from 'src/modals/common/Purchase/hooks/useGetListingAndSaleIds';\nimport { IconsFill, SeatMapIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { isDatePassedHours } from 'src/utils/dateTimeUtils';\nimport { getInHandDateBasedOnEvent } from 'src/utils/eventWithDataUtils';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport { PurchaseTicketsInput } from 'src/utils/purchaseUtils';\nimport { DeliveryType, Feature } from 'src/WebApiController';\n\nimport { PurchaseOrderInfoForTicketGroupInput } from '../TicketGroupInput.types';\n\nexport const DeliverySection = ({\n disabled,\n ticketGroupIndex,\n purchaseOrderInfo,\n}: {\n ticketGroupIndex: number;\n disabled?: boolean;\n purchaseOrderInfo?: PurchaseOrderInfoForTicketGroupInput | null;\n}) => {\n const { setValue, formState, getFieldState, clearErrors, watch } =\n useFormContext();\n\n const ticketGroup = watch(`ticketGroups.${ticketGroupIndex}`);\n\n const {\n isLoading: deliveryOverrideDefaultIsLoading,\n hasDefaultValues: hasDeliveryOverrideValues,\n deliveryTypeDefault,\n ticketTypeRulesDefault,\n inHandAtDefault,\n } = useDeliveryOverrideForNewTicketGroup(\n ticketGroup.event?.viagId,\n purchaseOrderInfo?.vendor?.id,\n purchaseOrderInfo?.vendAcc?.id,\n true, // isManual\n ticketGroup.ticketGroupId > 0 /* disabled if not new ticket group */\n );\n\n const canEditDeliveryType =\n useUserCanUpdatePurchaseDeliveryType(purchaseOrderInfo);\n const canEditCustomDeliveryType =\n useUserCanUpdatePurchaseCustomDeliveryType(purchaseOrderInfo);\n const canEditTicketTypePriority =\n useUserCanUpdateListingTicketTypePriorityFromPurchase(purchaseOrderInfo);\n\n const hasUpdateSalesOfListingsFeature = useUserHasFeature(\n Feature.UpdateSalesOfListingsDeliveryInfo\n );\n const { saleIds } = useGetListingAndSaleIds({\n ticketGroups: [{ tickets: ticketGroup.tickets?.value }],\n });\n const hasAnySales = saleIds.size > 0;\n\n const { getUiCurrency } = useLocalizationContext();\n const uiCurrency = useMemo(\n () => getUiCurrency(ticketGroup.currencyCode?.value),\n [getUiCurrency, ticketGroup.currencyCode?.value]\n );\n\n const deliveryOptionField: `ticketGroups.${number}.deliveryType` = `ticketGroups.${ticketGroupIndex}.deliveryType`;\n const inHandAtField: `ticketGroups.${number}.inHandDate` = `ticketGroups.${ticketGroupIndex}.inHandDate`;\n const deliveryCostField: `ticketGroups.${number}.deliveryCost` = `ticketGroups.${ticketGroupIndex}.deliveryCost`;\n const daysBeforeEventField = 'daysBeforeEvent' as const;\n\n const ticketTypeOverrideField: `ticketGroups.${number}.ticketTypeRules` = `ticketGroups.${ticketGroupIndex}.ticketTypeRules`;\n\n const defaultDelivType =\n formState.defaultValues?.ticketGroups?.[ticketGroupIndex]?.deliveryType\n ?.value;\n\n const inHandAt = watch(inHandAtField)?.value;\n const daysBeforeEvent = watch(daysBeforeEventField);\n const delivType = watch(deliveryOptionField)?.value;\n const delivCst = watch(deliveryCostField)?.value;\n const tktTypeRules = watch(ticketTypeOverrideField);\n const updateSalesOfListings = watch('updateSalesOfListings');\n\n const isNewTicketGroup = ticketGroup.ticketGroupId < 0;\n\n const deliveryOptionError = getFieldState(deliveryOptionField, formState)\n .error?.message;\n const inHandAtError = getFieldState(inHandAtField, formState).error?.message;\n\n const isMobile = useMatchMedia('mobile');\n\n const warningDialog = useBasicDialog();\n const deliveryInfoChangeHookProps = useDeliveryInfoChangeDialog(\n () => {\n setValue('updateSalesOfListings', true);\n },\n () => {\n // set don't change back\n setValue('updateSalesOfListings', false);\n }\n );\n\n const deliveryTypeHasChanged =\n delivType !==\n formState.defaultValues?.ticketGroups?.[ticketGroupIndex]?.deliveryType;\n\n // Used for setting value when the default value is loaded\n useEffect(() => {\n if (!deliveryOverrideDefaultIsLoading) {\n const desiredDelivType = deliveryTypeDefault ?? delivType;\n\n if (deliveryTypeDefault && delivType !== deliveryTypeDefault) {\n setValue(deliveryOptionField, posChangedField(deliveryTypeDefault));\n }\n\n if (inHandAtDefault && inHandAt !== inHandAtDefault) {\n setValue(inHandAtField, posChangedField(inHandAtDefault));\n }\n\n if (ticketTypeRulesDefault) {\n setValue(ticketTypeOverrideField, {\n overrides: ticketTypeRulesDefault.overrides.filter(\n (o) => o.deliveryType === desiredDelivType\n ),\n });\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n deliveryOverrideDefaultIsLoading,\n deliveryTypeDefault,\n inHandAtDefault,\n ticketTypeRulesDefault,\n ]);\n\n useEffect(() => {\n if (!inHandAt && ticketGroup.event?.dates?.start) {\n const inHandDate = getInHandDateBasedOnEvent(\n ticketGroup.event,\n daysBeforeEvent\n );\n setValue(inHandAtField, posChangedField(inHandDate));\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [inHandAtField]);\n\n const onDeliveryTypeChange = (newDelType: DeliveryType) => {\n if (!disabled && newDelType && newDelType !== delivType) {\n clearErrors(deliveryOptionField);\n setValue(deliveryOptionField, posChangedField(newDelType));\n\n if (ticketTypeRulesDefault) {\n setValue(ticketTypeOverrideField, {\n overrides: ticketTypeRulesDefault.overrides.filter(\n (o) => o.deliveryType === newDelType\n ),\n });\n }\n\n confirmUpdateSales();\n }\n };\n\n const confirmUpdateSales = useCallback(() => {\n if (\n hasAnySales &&\n hasUpdateSalesOfListingsFeature &&\n // only ask once per form\n updateSalesOfListings == null\n ) {\n if (isDatePassedHours(deliveryInfoChangeHookProps.lastTimeStamp, 1)) {\n // Show warning if it has passed 1 hr or not suppressed\n warningDialog.launchDialog();\n } else {\n // If suppressed, assumed it's true (since the current alert suppression only save for Yes answer)\n setValue('updateSalesOfListings', true);\n }\n }\n }, [\n deliveryInfoChangeHookProps.lastTimeStamp,\n hasAnySales,\n hasUpdateSalesOfListingsFeature,\n setValue,\n updateSalesOfListings,\n warningDialog,\n ]);\n\n return (\n <>\n \n }\n title={}\n >\n {deliveryTypeHasChanged && (\n \n }\n />\n )}\n {hasDeliveryOverrideValues && (\n }\n />\n )}\n \n \n \n \n \n\n {(isNewTicketGroup || deliveryTypeHasChanged) && (\n \n \n \n }\n style={{ gap: vars.spacing['sm'] }}\n >\n {\n setValue(ticketTypeOverrideField, newRules);\n }}\n disabled={\n disabled ||\n deliveryOverrideDefaultIsLoading ||\n !canEditTicketTypePriority\n }\n />\n \n \n \n \n )}\n\n \n \n }\n >\n {\n const v = parseFloat(e.target.value) || 0;\n if (v >= 0 && v <= Number.MAX_VALUE && v !== delivCst) {\n setValue(deliveryCostField, posChangedField(v));\n }\n }}\n />\n \n \n \n }\n errors={inHandAtError}\n >\n {\n if (date) {\n clearErrors(inHandAtField);\n const dateStr = date.toISOString();\n if (dateStr !== inHandAt) {\n setValue(inHandAtField, posChangedField(dateStr));\n }\n\n setValue(daysBeforeEventField, daysBeforeEvent);\n\n confirmUpdateSales();\n }\n }}\n value={inHandAt ?? null}\n targetDate={\n ticketGroup.event?.dates?.start\n ? new Date(ticketGroup.event?.dates?.start)\n : new Date()\n }\n />\n \n \n \n \n }\n size=\"md\"\n {...warningDialog.dialogProps}\n alerts={[deliveryInfoChangeHookProps]}\n onOkay={() => {\n warningDialog.closeDialog();\n }}\n okText={ContentId.Yes}\n cancelText={ContentId.No}\n onCancel={() => warningDialog.closeDialog()}\n />\n \n );\n};\n","import { useFormContext } from 'react-hook-form';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { FormPage } from 'src/core/POS/FormPage';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { vars } from 'src/core/themes';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { CheckboxContainer, FormRow } from 'src/modals/common';\nimport { IconsFill, PaperTicketsOutlineIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { PurchaseOrderDetailsInput } from 'src/utils/purchaseUtils';\n\nexport const NewListingSection = ({\n ticketGroupIndex,\n disabled,\n}: {\n ticketGroupIndex: number;\n disabled?: boolean;\n}) => {\n const { setValue, watch, clearErrors } =\n useFormContext();\n const isMobile = useMatchMedia('mobile');\n\n const autoBroadcastCreatedListing = watch(\n `ticketGroups.${ticketGroupIndex}.autoBroadcastCreatedListing`\n );\n\n const faceValue =\n watch(`ticketGroups.${ticketGroupIndex}.faceValueCost`)?.value ?? 0;\n\n return (\n \n }\n title={}\n >\n \n \n \n }\n disabled={disabled}\n checked={autoBroadcastCreatedListing ?? false}\n onChange={(e) => {\n const isChecked = e.target.checked;\n if (isChecked !== autoBroadcastCreatedListing) {\n setValue(\n `ticketGroups.${ticketGroupIndex}.autoBroadcastCreatedListing`,\n isChecked\n );\n }\n if (!isChecked || faceValue > 0) {\n clearErrors(`ticketGroups.${ticketGroupIndex}.faceValueCost`);\n }\n }}\n />\n \n \n \n \n );\n};\n","import { useFormContext } from 'react-hook-form';\nimport {\n ListingNoteSelectionInput,\n ListingNoteSelectionInputProps,\n} from 'src/components/Input/ListingNoteSelectionInput';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport { PurchaseTicketsInput } from 'src/utils/purchaseUtils';\n\nexport type SeatTraitsSelectionInputProps = {\n ticketGroupIndex: number;\n} & Omit;\n\nexport const SeatTraitsSelectionInput = ({\n ticketGroupIndex,\n disabled,\n validListingNoteIds,\n ...rest\n}: SeatTraitsSelectionInputProps) => {\n const { setValue, watch } = useFormContext();\n\n const listingNotesField: `ticketGroups.${number}.listingNotes` = `ticketGroups.${ticketGroupIndex}.listingNotes`;\n const listingNotes = watch(listingNotesField);\n return (\n \n setValue(listingNotesField, posChangedField(listingNotes))\n }\n />\n );\n};\n","import { debounce, range } from 'lodash-es';\nimport { useCallback, useEffect } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { VenueRowInput } from 'src/components/Input/VenueRowInput';\nimport { VenueSectionInput } from 'src/components/Input/VenueSectionInput';\nimport {\n Content,\n FormatContent,\n useContent,\n useFormattedContent,\n} from 'src/contexts/ContentContext';\nimport { useGetSectionRowFromVenueMapConfig } from 'src/contexts/EventMapContext';\nimport { FormPage } from 'src/core/POS/FormPage';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosSelect } from 'src/core/POS/PosSelect';\nimport { getTextFieldState, PosTextField } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { Switch } from 'src/core/ui';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { useUserCanUpdatePurchaseSeatTraits } from 'src/hooks/useUserHasPurchasePermissions';\nimport { FieldWrapper, FormRow } from 'src/modals/common';\nimport * as styles from 'src/modals/common/Purchase/PurchaseModal.css';\nimport { SeatTraitsSelectionInput } from 'src/modals/common/Purchase/SeatTraitsSelectionInput';\nimport { IconsFill, SeatIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { INT_MAX_VALUE } from 'src/utils/numberFormatter';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport { PurchaseTicketsInput } from 'src/utils/purchaseUtils';\nimport { getNextTicketBy } from 'src/utils/ticketUtils';\nimport {\n EventListingConstraints,\n Ticket,\n TicketGroupInput,\n} from 'src/WebApiController';\n\nimport { PurchaseOrderInfoForTicketGroupInput } from '../TicketGroupInput.types';\n\nexport const SeatingSection = ({\n ticketGroupIndex,\n disabled,\n listingConstraints,\n purchaseOrderInfo,\n}: {\n ticketGroupIndex: number;\n disabled?: boolean;\n listingConstraints?: EventListingConstraints | null;\n purchaseOrderInfo?: PurchaseOrderInfoForTicketGroupInput | null;\n}) => {\n const { setValue, formState, getFieldState, clearErrors, watch } =\n useFormContext();\n\n const canSetSeatTraits =\n useUserCanUpdatePurchaseSeatTraits(purchaseOrderInfo);\n\n const initialTicketGroup =\n formState.defaultValues?.ticketGroups?.[ticketGroupIndex];\n const ticketGroup = watch(`ticketGroups.${ticketGroupIndex}`);\n\n const ticketCountField: `ticketGroups.${number}.numberOfTickets` = `ticketGroups.${ticketGroupIndex}.numberOfTickets`;\n\n const sectionField: `ticketGroups.${number}.section` = `ticketGroups.${ticketGroupIndex}.section`;\n const sectionIdField: `ticketGroups.${number}.sectionId` = `ticketGroups.${ticketGroupIndex}.sectionId`;\n const rowField: `ticketGroups.${number}.row` = `ticketGroups.${ticketGroupIndex}.row`;\n const rowIdField: `ticketGroups.${number}.rowId` = `ticketGroups.${ticketGroupIndex}.rowId`;\n const allocateSeatsField: `ticketGroups.${number}.allocateSeats` = `ticketGroups.${ticketGroupIndex}.allocateSeats`;\n const seatIncrementTypeField: `ticketGroups.${number}.seatIncementType` = `ticketGroups.${ticketGroupIndex}.seatIncementType`;\n\n const ticketCountError = getFieldState(ticketCountField, formState).error\n ?.message;\n const sectionError = getFieldState(sectionField, formState).error?.message;\n const rowError = getFieldState(rowField, formState).error?.message;\n const seatErrors: (string | undefined)[] = [];\n\n ticketGroup.tickets?.value?.forEach((_, i) => {\n const seatError = getFieldState(\n `ticketGroups.${ticketGroupIndex}.tickets.value.${i}.seat`,\n formState\n ).error?.message;\n seatErrors.push(seatError);\n });\n\n // eslint-disable-next-line react-hooks/rules-of-hooks,react-hooks/exhaustive-deps\n const allocSeats = useCallback(\n debounce((ticketCnt: number) => {\n const curTicketOrdinals =\n ticketGroup.tickets?.value?.map((t) => t.ord) ?? [];\n\n const startingOrdinal =\n curTicketOrdinals.length > 0\n ? Math.min(...(ticketGroup.tickets?.value?.map((t) => t.ord) ?? [0]))\n : 0;\n\n setValue(\n `ticketGroups.${ticketGroupIndex}.tickets`,\n posChangedField(\n ticketCnt\n ? range(ticketCnt).map((index) => {\n const ordinal = startingOrdinal + index;\n // Try to preserve previous seating\n let prevTicket = ticketGroup.tickets?.value?.find(\n (t) => t.ord === ordinal\n );\n if (!prevTicket && initialTicketGroup?.tickets?.value) {\n // If the user clear the quantity - ticketGroup.tickets would be empty and so\n // there's no chance to retrieve the previous tickets, so we need to look at the\n // default value\n prevTicket = initialTicketGroup.tickets.value.find(\n (t) => t!.ord === ordinal\n ) as Ticket;\n }\n return {\n id: -ordinal,\n ord: ordinal,\n row: ticketGroup?.row?.value,\n ...(prevTicket ?? {}),\n seat: prevTicket?.seat ?? '',\n } as Ticket;\n })\n : []\n )\n );\n }, 600),\n [setValue, ticketGroup?.row, ticketGroup.tickets, ticketGroupIndex]\n );\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const setRowForTickets = useCallback(\n debounce((row: string) => {\n if (ticketGroup.tickets?.value) {\n setValue(\n `ticketGroups.${ticketGroupIndex}.tickets`,\n posChangedField(\n ticketGroup.tickets.value.map((t) => ({ ...t, row: row })) ?? null\n )\n );\n }\n }, 600),\n [setValue, ticketGroup.tickets, ticketGroupIndex]\n );\n\n const isMobile = useMatchMedia('mobile');\n\n const getOrSetDefaultAllocateSeats = (tg: TicketGroupInput) => {\n if (tg.allocateSeats == null) {\n tg.allocateSeats = Boolean(\n (ticketGroup.tickets?.value?.length &&\n ticketGroup.tickets!.value.find((t) => t.seat)) ||\n !ticketGroup.tickets?.value?.length\n );\n }\n return tg.allocateSeats;\n };\n\n useEffect(() => {\n if (\n getOrSetDefaultAllocateSeats(ticketGroup) &&\n !ticketGroup.tickets?.value?.length\n ) {\n allocSeats(0);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const increaseNone = useContent(ContentId.None);\n const increaseBy1Format = useFormattedContent(\n FormatContentId.NIncreaseBy,\n '1'\n );\n const increaseBy2Format = useFormattedContent(\n FormatContentId.NIncreaseBy,\n '2'\n );\n const increaseByValues = {\n '0': increaseNone as string,\n '1': increaseBy1Format as string,\n '2': increaseBy2Format as string,\n };\n\n const getOrSetDefaultSeatIncrementType = (tg: TicketGroupInput) => {\n if (!tg.seatIncementType && tg.seatIncementType !== 0) {\n tg.seatIncementType = 1;\n }\n return tg.seatIncementType?.toString();\n };\n\n const setSeatsIncrement = debounce((seatIndex: number) => {\n if (\n ticketGroup.seatIncementType &&\n ticketGroup.seatIncementType !== 0 &&\n ticketGroup.tickets?.value?.length &&\n seatIndex < ticketGroup.tickets.value.length - 1 &&\n ticketGroup.tickets.value[seatIndex].seat\n ) {\n let seatValue = ticketGroup.tickets.value[seatIndex].seat;\n for (\n let index = seatIndex + 1;\n index < ticketGroup.tickets.value.length;\n index++\n ) {\n const ticket = ticketGroup.tickets.value[index];\n\n seatValue = getNextTicketBy(\n seatValue,\n ticketGroup.seatIncementType\n ).toString();\n setSeatValue(seatValue, index, ticket);\n }\n }\n }, 500);\n\n const setSeatValue = (\n seatValue: string,\n seatIndex: number,\n ticket: Ticket\n ) => {\n if (seatValue) {\n clearErrors(\n `ticketGroups.${ticketGroupIndex}.tickets.value.${seatIndex}.seat`\n );\n }\n\n if (seatValue !== ticket.seat) {\n setValue(\n `ticketGroups.${ticketGroupIndex}.tickets.value.${seatIndex}.seat`,\n seatValue\n );\n setValue(`ticketGroups.${ticketGroupIndex}.tickets.hasChanged`, true);\n }\n };\n\n const { section: selectedSection, row: selectedRow } =\n useGetSectionRowFromVenueMapConfig(\n ticketGroup?.rowId?.value,\n ticketGroup?.sectionId?.value,\n ticketGroup?.section?.value,\n ticketGroup?.row?.value\n );\n\n return (\n }\n title={}\n >\n \n \n }\n >\n {\n const v = parseInt(e.target.value) || 0;\n if (v >= 0 && v <= INT_MAX_VALUE) {\n clearErrors(ticketCountField);\n\n if (v !== ticketGroup.numberOfTickets?.value) {\n allocSeats(v);\n setValue(ticketCountField, posChangedField(v));\n }\n }\n }}\n />\n \n \n }>\n
    \n {\n setValue(allocateSeatsField, isChecked);\n allocSeats(ticketGroup.numberOfTickets?.value ?? 0);\n }}\n />\n
    \n
    \n\n \n \n }\n >\n {\n clearErrors(sectionField);\n if (section) {\n setValue(sectionField, posChangedField(section.name));\n setValue(sectionIdField, posChangedField(section.id));\n\n if (section.specRow?.id) {\n // Setting the section automatically set the speculative row id\n setValue(rowIdField, posChangedField(section.specRow?.id));\n setValue(rowField, posChangedField(''));\n // changing the row changes all the tickets\n setRowForTickets('');\n }\n } else {\n setValue(sectionField, posChangedField(sectionName ?? ''));\n setValue(sectionIdField, posChangedField(null));\n\n // Free-text section do not have speculative row info\n setValue(rowIdField, posChangedField(null));\n setValue(rowField, posChangedField(''));\n setRowForTickets('');\n }\n }}\n />\n \n \n {ticketGroup.allocateSeats && (\n \n }\n >\n {\n clearErrors(rowField);\n if (row) {\n setValue(\n rowField,\n posChangedField(row.isSpeculative ? '' : row.name)\n );\n setValue(rowIdField, posChangedField(row.id));\n setRowForTickets((row.isSpeculative ? '' : row.name) ?? '');\n } else {\n // If we can't find the row - that mean they typed it in\n // so just keep with they type as the row\n setValue(rowField, posChangedField(rowName ?? ''));\n setValue(rowIdField, posChangedField(null));\n setRowForTickets(rowName ?? '');\n }\n }}\n />\n \n \n )}\n \n\n {ticketGroup.allocateSeats && (\n <>\n \n \n }\n >\n {\n if (e) {\n const v = parseInt(e) || 0;\n setValue(seatIncrementTypeField, v);\n } else {\n setValue(seatIncrementTypeField, null);\n }\n }}\n value={getOrSetDefaultSeatIncrementType(ticketGroup)}\n placeholderText={ContentId.ChooseIncrementType}\n valueOptionsContent={increaseByValues}\n />\n \n \n \n\n \n \n
    \n {ticketGroup.tickets?.value?.map((t, i) => (\n \n \n }\n >\n {\n const v = e.target.value;\n setSeatValue(v, i, t);\n setSeatsIncrement(i);\n }}\n />\n \n \n ))}\n
    \n
    \n
    \n \n )}\n \n \n }>\n \n \n \n \n \n );\n};\n","import { ComponentProps } from 'react';\nimport { EventMapContextProvider } from 'src/contexts/EventMapContext';\nimport { Stack } from 'src/core/ui';\nimport { ModalBodyDataContainer } from 'src/modals/Modal/Modal.styled';\nimport {\n EventListingConstraints,\n TicketGroupInput,\n} from 'src/WebApiController';\n\nimport { CostSection } from './components/CostSection';\nimport { DeliverySection } from './components/DeliverySection';\nimport { NewListingSection } from './components/NewListingSection';\nimport { PredeliverySection } from './components/PredeliverySection';\nimport { SeatingSection } from './components/SeatingSection';\nimport { UploadPredeliveryAction } from './purchaseTicketsFlow.utils';\nimport { PurchaseOrderInfoForTicketGroupInput } from './TicketGroupInput.types';\n\nexport enum CostType {\n CostPerTicket = 'CostPerTicket',\n TotalCost = 'TotalCost',\n}\n\nexport function TicketGroupInputForm({\n hideHeader,\n ticketGroup,\n ...rest\n}: {\n hideHeader: boolean;\n} & ComponentProps) {\n return (\n \n \n \n );\n}\n\nfunction TicketGroupInputBody({\n ticketGroup,\n ticketGroupIndex,\n disabled,\n listingConstraints,\n showPredeliverySection,\n onHidePredeliverAction,\n purchaseOrderInfo,\n}: {\n ticketGroup: TicketGroupInput;\n ticketGroupIndex: number;\n disabled?: boolean;\n listingConstraints?: EventListingConstraints | null;\n showPredeliverySection?: UploadPredeliveryAction;\n onHidePredeliverAction: () => void;\n purchaseOrderInfo?: PurchaseOrderInfoForTicketGroupInput | null;\n}) {\n return (\n \n {showPredeliverySection ? (\n \n ) : (\n <>\n \n {ticketGroup.ticketGroupId < 0 && (\n \n )}\n \n \n \n \n \n )}\n \n );\n}\n","import { isEqual } from 'lodash-es';\nimport { ComponentProps, useCallback, useMemo, useState } from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { ConfirmDialog } from 'src/core/interim/dialogs/ConfirmDialog';\nimport { DndGlobalFileDrop } from 'src/core/POS/DnDFileUploader/components/DndGlobalFileDrop';\nimport { DndFilerUploaderContextProvider } from 'src/core/POS/DnDFileUploader/DndFileUploaderContext';\nimport { Stack } from 'src/core/ui';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useGetEventListingConstraints } from 'src/hooks/useGetEventListingConstraints';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { CancellableFormHeader } from 'src/modals/common/CancellableFormHeader';\nimport { EventEntityHeader } from 'src/modals/common/EventEntityHeader';\nimport { ModalBodyHeaderContainer } from 'src/modals/Modal/Modal.styled';\nimport { PurchaseTicketsFlowEventHeader } from 'src/modals/PurchaseWizard/PurchaseTicketsFlow/components/PurchaseTicketFlowEventHeader';\nimport { PurchaseTicketFlowTitle } from 'src/modals/PurchaseWizard/PurchaseTicketsFlow/components/PurchaseTicketFlowTitle';\nimport { predeliverETicketsDnd } from 'src/modals/PurchaseWizard/PurchaseTicketsFlow/PurchaseTicketFlow.css';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getInHandDateBasedOnEvent } from 'src/utils/eventWithDataUtils';\nimport { posChangedField, posField } from 'src/utils/posFieldUtils';\nimport {\n PurchaseTicketsInput,\n validateEventSelection,\n validateTicketGroup,\n validateTicketGroups,\n} from 'src/utils/purchaseUtils';\nimport { selectEventInfoFromTicketGroups } from 'src/utils/ticketUtils';\nimport {\n Feature,\n ListingActionType,\n TicketGroupInput,\n} from 'src/WebApiController';\n\nimport {\n PurchaseWizardFooter,\n PurchaseWizardFooterProps,\n} from '../../common/Purchase/PurchaseWizardFooter';\nimport { ModalBody } from '../../Modal';\nimport { PredeliveryActionsDropdown } from './components/PredeliveryActionsDropdown';\nimport { UploadPredeliveryAction } from './purchaseTicketsFlow.utils';\nimport { SearchPurchasedEvents } from './SearchPurchasedEvents';\nimport { TicketGroupInputForm } from './TicketGroupInput';\nimport { PurchaseOrderInfoForTicketGroupInput } from './TicketGroupInput.types';\n\nconst scrollToTopOnTicketGroupChange = () => {\n // The modal sits on top of the window, so window scrolling don't work.\n // Also, the ModalBody is a react component, wrapping it in forwardRef didn't expose the unlying html element. So, we use the vanilla js way to scroll to the top.\n const el = document.getElementsByClassName('modal-body')[0];\n el.scrollTop = 0;\n};\n\nexport type PurchaseTicketsFlowProps = {\n currencyCode: string;\n purchaseOrderInfo?: PurchaseOrderInfoForTicketGroupInput | null;\n ticketGroups: TicketGroupInput[];\n ticketGroupFromPartialPurchaseOrder?: TicketGroupInput | null;\n eventSearchTextFromPartialPurchaseOrder?: string | null;\n updateSalesOfListings?: boolean | null;\n startIndex: number;\n avoidPrefill?: boolean;\n disabled?: boolean;\n onCancel: () => void;\n onSubmit: (formData: PurchaseTicketsInput) => void;\n emailPreview?: JSX.Element | null;\n uploadPredeliveryAction?: UploadPredeliveryAction | undefined;\n};\n\nexport const PurchaseTicketsFlow = ({\n ticketGroups,\n avoidPrefill,\n ticketGroupFromPartialPurchaseOrder,\n eventSearchTextFromPartialPurchaseOrder,\n updateSalesOfListings,\n ...rest\n}: PurchaseTicketsFlowProps) => {\n const methods = useForm({\n defaultValues: {\n ticketGroups: avoidPrefill\n ? selectEventInfoFromTicketGroups(ticketGroups)\n : ticketGroups.map((tg) => ({\n ...tg,\n tickets: posField(\n tg.tickets?.value?.toSorted((a, b) => a.ord - b.ord)\n ),\n })),\n updateSalesOfListings,\n updatePredeliveryETicketArtifacts: false,\n ticketGroupFromPartialPurchaseOrder,\n eventSearchTextFromPartialPurchaseOrder,\n },\n });\n\n return (\n \n \n \n );\n};\n\nconst EMPTY_EVENT_IDS: number[] = [];\n\nfunction PurchaseTicketsFlowBody({\n disabled,\n currencyCode,\n purchaseOrderInfo,\n startIndex,\n onCancel,\n onSubmit,\n formState,\n handleSubmit,\n setError,\n setValue,\n clearErrors,\n watch,\n emailPreview,\n uploadPredeliveryAction,\n}: Omit &\n Omit<\n ComponentProps>,\n 'children'\n >) {\n const formTicketGroups = watch('ticketGroups');\n const daysBeforeEvent = watch('daysBeforeEvent');\n\n const hasPurchaseDeliveryFeature = useUserHasFeature(\n Feature.PurchasePredelivery\n );\n const hasMultiTicketGroupTableFeature = useUserHasFeature(\n Feature.MultiTicketGroupTable\n );\n const requiredMsg = useContent(ContentId.Required);\n const duplicateSeatMsg = useContent(ContentId.DuplicateSeat);\n const eventRequiredMsg = useContent(ContentId.SearchAndSelectAnEvent);\n const inHandDateMustBeforeEventDateMsg = useContent(\n ContentId.InHandDateMustBeBeforeEventDate\n );\n const autoBroadcastRequireFaceValueMsg = useContent(\n ContentId.AutoBroadcastRequiredFaceValue\n );\n\n const hasUploadTicketFilesFlowV2 = useUserHasFeature(\n Feature.UploadTicketFilesFlowV2\n );\n\n const multiEventInputsDialog = useBasicDialog();\n const [singleInputModeForMultiEvent, setSingleInputModeForMultiEvent] =\n useState(true);\n const isSingleInputModeForMultiEvent =\n singleInputModeForMultiEvent && formTicketGroups.length > 1;\n\n // Index of a Group of TicketGroupInput\n const [curGroupIndex, setCurGroupIndex] = useState(startIndex);\n\n const groupsOfTicketGroup = useMemo(() => {\n const noVenueCfgIdGroup = 'no_venue_cfg_id';\n\n if (isSingleInputModeForMultiEvent) {\n const ticketGroupsMap = new Map();\n formTicketGroups.forEach((ticketGroup) => {\n const venueCfgId = ticketGroup?.event?.venueCfgId || noVenueCfgIdGroup;\n const group = ticketGroupsMap.get(venueCfgId) || [];\n group.push(ticketGroup);\n ticketGroupsMap.set(venueCfgId, group);\n });\n\n const noCfgId = ticketGroupsMap.get(noVenueCfgIdGroup);\n ticketGroupsMap.delete(noVenueCfgIdGroup);\n\n const groupOfTicketGroups = Array.from(ticketGroupsMap.values());\n if (noCfgId && noCfgId.length > 0) {\n noCfgId.forEach((ticketGroup) => {\n groupOfTicketGroups.push([ticketGroup]);\n });\n }\n\n return groupOfTicketGroups;\n }\n\n return formTicketGroups.map((ticketGroup) => [ticketGroup]);\n }, [formTicketGroups, isSingleInputModeForMultiEvent]);\n\n const [showPredeliverySection, setShowPredeliverySection] = useState<\n UploadPredeliveryAction | undefined\n >(uploadPredeliveryAction);\n\n const curTicketGroup = useMemo(() => {\n return curGroupIndex >= 0\n ? // Pick first ticketGroup because:\n // If inputMode is grouping: all the items in the group will have the same config\n // If input mode is one by one: Each ticketGroup is a group of one item.\n groupsOfTicketGroup[curGroupIndex]?.[0]\n : undefined;\n }, [groupsOfTicketGroup, curGroupIndex]);\n\n const showSearch = curGroupIndex < 0 || !curTicketGroup;\n const ticketGroupsEventIds = useMemo(\n () =>\n formTicketGroups\n .filter((tg) => tg.event?.viagId != null)\n .map((tg) => tg.event?.viagId!),\n [formTicketGroups]\n );\n const { eventListingConstraintsQuery } = useGetEventListingConstraints(\n showSearch ? EMPTY_EVENT_IDS : ticketGroupsEventIds\n );\n\n const currentFormTicketGroupIndex = useMemo(() => {\n return formTicketGroups.findIndex(\n (tg) => tg.ticketGroupId === curTicketGroup?.ticketGroupId\n );\n }, [formTicketGroups, curTicketGroup]);\n\n const onSubmitWrapper = useCallback(() => {\n if (\n validateEventSelection(\n clearErrors,\n setError,\n formTicketGroups,\n eventRequiredMsg\n ) &&\n validateTicketGroups(\n true,\n clearErrors,\n setError,\n formTicketGroups,\n requiredMsg,\n duplicateSeatMsg,\n inHandDateMustBeforeEventDateMsg,\n autoBroadcastRequireFaceValueMsg\n )\n ) {\n handleSubmit(onSubmit)();\n }\n }, [\n autoBroadcastRequireFaceValueMsg,\n clearErrors,\n duplicateSeatMsg,\n eventRequiredMsg,\n handleSubmit,\n inHandDateMustBeforeEventDateMsg,\n onSubmit,\n requiredMsg,\n setError,\n formTicketGroups,\n ]);\n\n const onPrevFromSearchEventsStep = useCallback(() => {\n onCancel();\n }, [onCancel]);\n\n const onNextFromSearchEventsStep = useCallback(() => {\n if (\n validateEventSelection(\n clearErrors,\n setError,\n formTicketGroups,\n eventRequiredMsg\n )\n ) {\n const hasGroupedEvents = groupsOfTicketGroup.some(\n (group) => group.length > 1\n );\n if (hasGroupedEvents) {\n // If we have more than one event selected, we need to ask whether the user\n // wants to input tickets for each of them separately for together\n multiEventInputsDialog.launchDialog();\n } else {\n setSingleInputModeForMultiEvent(false);\n setCurGroupIndex(0);\n }\n }\n }, [\n clearErrors,\n setError,\n formTicketGroups,\n eventRequiredMsg,\n groupsOfTicketGroup,\n multiEventInputsDialog,\n ]);\n\n const onPrevFromTicketGroupInputStep = useCallback(() => {\n if (showPredeliverySection) {\n setShowPredeliverySection(undefined);\n } else if (curGroupIndex === startIndex) {\n onCancel();\n } else {\n setCurGroupIndex(curGroupIndex - 1);\n\n // Generate groups again to ask for confirmation for single input\n setSingleInputModeForMultiEvent(true);\n }\n }, [curGroupIndex, onCancel, showPredeliverySection, startIndex]);\n\n const onNextFromTicketGroupInputStep = useCallback(() => {\n const errors = validateTicketGroup(\n clearErrors,\n setError,\n curTicketGroup!,\n currentFormTicketGroupIndex,\n requiredMsg,\n duplicateSeatMsg,\n inHandDateMustBeforeEventDateMsg,\n autoBroadcastRequireFaceValueMsg\n );\n\n if (errors.length) {\n return;\n }\n\n const isLastGroup = curGroupIndex === groupsOfTicketGroup.length - 1;\n\n // Input mode: One input per group of ticket\n if (isSingleInputModeForMultiEvent) {\n const groupOfTickets = groupsOfTicketGroup[curGroupIndex];\n\n // Copy the content of the previous ticket-Group to all the ticketGroups and submit\n for (let i = 1; i < groupOfTickets.length; i++) {\n const tg = groupOfTickets[i];\n\n if (!tg.inHandDate?.value && tg.event?.dates?.start) {\n tg.inHandDate = posChangedField(\n getInHandDateBasedOnEvent(tg.event, daysBeforeEvent)\n );\n }\n\n const formTicketGroup = formTicketGroups.find(\n (ftg) => ftg.ticketGroupId === tg.ticketGroupId\n );\n\n if (formTicketGroup) {\n Object.assign(formTicketGroup, {\n ...curTicketGroup,\n ticketGroupId: tg.ticketGroupId,\n viagogoEventId: tg.event?.viagId,\n viagogoVirtualId: tg.event?.viagVirtualId,\n eventMappingId: tg.event?.mappingId,\n posEventId: tg.event?.posIds?.[0],\n event: tg.event,\n performer: tg.performer,\n venue: tg.venue,\n inHandDate: tg.inHandDate,\n } as TicketGroupInput);\n }\n }\n\n setValue('ticketGroups', [...formTicketGroups]);\n\n if (isLastGroup) {\n onSubmitWrapper();\n } else {\n setCurGroupIndex(curGroupIndex + 1);\n }\n } else {\n // Input mode: One ticket group at a time\n if (isLastGroup) {\n onSubmitWrapper();\n } else {\n // Just increment the group, since each ticketGroup\n // represents a ticketGroup[] of one element.\n setCurGroupIndex(curGroupIndex + 1);\n }\n }\n scrollToTopOnTicketGroupChange();\n }, [\n clearErrors,\n setError,\n curTicketGroup,\n currentFormTicketGroupIndex,\n requiredMsg,\n duplicateSeatMsg,\n inHandDateMustBeforeEventDateMsg,\n autoBroadcastRequireFaceValueMsg,\n curGroupIndex,\n groupsOfTicketGroup,\n isSingleInputModeForMultiEvent,\n setValue,\n formTicketGroups,\n daysBeforeEvent,\n onSubmitWrapper,\n ]);\n\n const getFooterActions = useCallback((): PurchaseWizardFooterProps => {\n if (curGroupIndex < 0) {\n return {\n hasChanges:\n !showPredeliverySection &&\n !isEqual(formState.defaultValues?.ticketGroups, formTicketGroups),\n onPreviousLabel: ContentId.Cancel,\n onPrevious: onPrevFromSearchEventsStep,\n onNextLabel: ContentId.Next,\n onNext: onNextFromSearchEventsStep,\n };\n } else {\n return {\n hasChanges:\n !showPredeliverySection && curGroupIndex === startIndex\n ? !isEqual(formState.defaultValues?.ticketGroups, formTicketGroups)\n : false,\n onPreviousLabel:\n curGroupIndex === startIndex ? ContentId.Cancel : ContentId.Back,\n onPrevious: onPrevFromTicketGroupInputStep,\n onNextLabel: showPredeliverySection\n ? ContentId.Upload\n : curGroupIndex === formTicketGroups.length - 1\n ? disabled\n ? ContentId.OK\n : ContentId.Save\n : ContentId.Next,\n onNext: onNextFromTicketGroupInputStep,\n };\n }\n }, [\n curGroupIndex,\n disabled,\n formState.defaultValues?.ticketGroups,\n onNextFromSearchEventsStep,\n onNextFromTicketGroupInputStep,\n onPrevFromSearchEventsStep,\n onPrevFromTicketGroupInputStep,\n showPredeliverySection,\n startIndex,\n formTicketGroups,\n ]);\n\n const footerActions = getFooterActions();\n const isPredeliverETicketsAction =\n showPredeliverySection === ListingActionType.PredeliverETickets;\n\n return (\n <>\n setShowPredeliverySection(undefined)\n : onCancel\n }\n >\n \n }\n />\n \n \n \n \n {emailPreview}\n\n \n {showSearch ? (\n \n ) : (\n <>\n \n \n \n \n setShowPredeliverySection(undefined)\n }\n purchaseOrderInfo={purchaseOrderInfo}\n hideHeader={isSingleInputModeForMultiEvent}\n disabled={disabled}\n ticketGroup={curTicketGroup}\n ticketGroupIndex={currentFormTicketGroupIndex}\n listingConstraints={\n curTicketGroup.event?.viagId\n ? eventListingConstraintsQuery.data?.[\n curTicketGroup.event.viagId\n ]\n : null\n }\n />\n \n )}\n \n \n {!showPredeliverySection && (\n ,\n ]\n : undefined\n }\n isSubmitting={formState.isSubmitting}\n />\n )}\n \n \n \n }\n bodyText={\n \n \n \n \n \n \n \n \n \n \n \n }\n onCancel={() => {\n setCurGroupIndex(0);\n setSingleInputModeForMultiEvent(false);\n multiEventInputsDialog.closeDialog();\n }}\n onOkay={() => {\n setCurGroupIndex(0);\n setSingleInputModeForMultiEvent(true);\n multiEventInputsDialog.closeDialog();\n }}\n />\n \n );\n}\n","import { UploadPredeliveryAction } from 'src/modals/PurchaseWizard/PurchaseTicketsFlow/purchaseTicketsFlow.utils';\nimport {\n Event,\n Performer,\n TicketGroupEditReason,\n Venue,\n} from 'src/WebApiController';\n\nexport const Steps = {\n PurchaseVendorInfoStep: 'PurchaseVendorInfoStep',\n PurchaseWizardMainStep: 'PurchaseWizardMainStep',\n TicketGroupInputStep: 'TicketGroupInputStep',\n TicketGroupBlankInputStep: 'TicketGroupBlankInputStep',\n} as const;\n\nexport const AddActions = [\n TicketGroupEditReason.EditEvent,\n TicketGroupEditReason.ExchangeTickets,\n TicketGroupEditReason.AddTickets,\n];\n\nexport const TicketGroupInputSteps: (keyof typeof Steps)[] = [\n Steps.TicketGroupInputStep,\n Steps.TicketGroupBlankInputStep,\n];\n\nexport type AmendActionData = {\n uploadPredeliveryAction: UploadPredeliveryAction | undefined;\n};\n\nexport type TicketGroupEditContextAdditionalData = {\n event?: Event | null;\n performer?: Performer | null;\n venue?: Venue | null;\n amendActionData?: AmendActionData;\n};\n\nexport type TicketGroupEditContext = {\n startWithEventSearch: boolean;\n ticketGroupId: number;\n ticketGroupIdToRemove?: number; // in the case of exchange\n editIntention: TicketGroupEditReason;\n editInfo: string;\n additionalData?: TicketGroupEditContextAdditionalData;\n};\n","import { useQueryClient } from '@tanstack/react-query';\nimport { StatusCodes } from 'http-status-codes';\nimport { isEqual } from 'lodash-es';\nimport {\n ComponentProps,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport { FormProvider } from 'react-hook-form';\nimport { useNavigate } from 'react-router-dom';\nimport { useDebounce } from 'react-use';\nimport { EmailBody } from 'src/components/Messages/EmailBody';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { EmailPurchaseOrderContext } from 'src/contexts/EmailPurchaseOrderContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { usePurchaseDataContext } from 'src/contexts/PurchaseDataContext';\nimport { ConfirmDialog } from 'src/core/interim/dialogs/ConfirmDialog';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { Stack } from 'src/core/ui';\nimport {\n AlertWithSuppressionDialog,\n useCancelTicketGroupDialog,\n} from 'src/dialogs/AlertWithSuppressionDialog';\nimport {\n InternationalComplianceDialog,\n useInternationalComplianceDialog,\n} from 'src/dialogs/InternationalComplianceDialog';\nimport { SecondaryVendorAccountDialog } from 'src/dialogs/SecondaryVendorAccountDialog/SecondaryVendorAccountDialog';\nimport { TicketGroupIntentionDialog } from 'src/dialogs/TicketGroupIntentionDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useGetIsPurchaseIdsInUsedForVendorId } from 'src/hooks/useGetIsPurchaseIdsInUsedForVendorId';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { useTagsForEntityType } from 'src/hooks/useTagsForEntityType';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { useUserCanUpdatePurchase } from 'src/hooks/useUserHasPurchasePermissions';\nimport { TicketGroupActionParams } from 'src/tables/PurchaseTicketTable/configs/TicketGroupTableColumnsConfig';\nimport {\n EventIdQueryParam,\n PurchaseDeeplinkQueryParam,\n PurchaseFromEmailPoQueryParam,\n US_COUNTRY_CODES,\n} from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { isDatePassedHours } from 'src/utils/dateTimeUtils';\nimport {\n getDeepLinkIdFromUrl,\n isInFullPageEventView,\n useRemoveDeepLinkUrlPart,\n} from 'src/utils/deepLinkUtils';\nimport { getEventPerformerVenue } from 'src/utils/eventWithDataUtils';\nimport { newBigIntId } from 'src/utils/idUtils';\nimport {\n ListingCatalogMetricsQueryKey,\n ListingCatalogQueryKey,\n} from 'src/utils/inventoryUtils';\nimport { hasChanged, posChangedField } from 'src/utils/posFieldUtils';\nimport {\n cleanTicketGroupContextFromDeepLink,\n getPurchaseOrderDetailsModalConfigWithDeepLink,\n getPurchaseOrderRelativeUrl,\n PurchaseOrderDetailsInput,\n PurchaseTicketsInput,\n validateEventSelection,\n validateTicketGroups,\n validateVendorInfo,\n} from 'src/utils/purchaseUtils';\nimport { tagFieldHasChanges } from 'src/utils/tagUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n AutoPoClient,\n CatalogClient,\n DeliveryType,\n Feature,\n Permission,\n PosFieldArrayOfTag,\n PurchaseClient,\n PurchaseOrderDetails,\n PurchaseOrderState,\n PurchaseOrderTicketGroup,\n TicketClient,\n TicketGroupEditReason,\n TicketGroupInput,\n TicketGroupIntention,\n TicketGroupMergeInput,\n} from 'src/WebApiController';\n\nimport { CancellableFormHeader } from '../common/CancellableFormHeader';\nimport { EventEntityHeader } from '../common/EventEntityHeader';\nimport {\n EmailBodyWrapper,\n EmailPreviewContainer,\n EmailPreviewTitle,\n PurchaseMainDetails,\n PurchaseVendorHeader,\n StyledPurchaseWizardBody,\n} from '../common/Purchase';\nimport { DealSection } from '../common/Purchase/Deal/DealSection';\nimport {\n PurchaseWizardFooter,\n PurchaseWizardFooterProps,\n} from '../common/Purchase/PurchaseWizardFooter';\nimport { ModalBody } from '../Modal';\nimport { ModalBodyHeaderContainer } from '../Modal/Modal.styled';\nimport { PurchaseMultiTicketsFlow } from './PurchaseTicketsFlow/PurchaseMultiTicketsFlow';\nimport { PurchaseTicketsFlow } from './PurchaseTicketsFlow/PurchaseTicketsFlow';\nimport {\n AddActions,\n Steps,\n TicketGroupEditContext,\n TicketGroupInputSteps,\n} from './PurchaseWizard.types';\n\nexport function PurchaseWizardBody({\n formState,\n handleSubmit,\n setError,\n clearErrors,\n setValue,\n watch,\n reset,\n getValues,\n purchaseHasMergedListings,\n highlightTicketGroupIds,\n initialTicketGroupEditContext,\n}: Omit<\n ComponentProps>,\n 'children'\n> & {\n purchaseHasMergedListings?: boolean | null;\n highlightTicketGroupIds?: number[];\n initialTicketGroupEditContext?: Partial;\n}) {\n const initialTicketGroupEditReason =\n initialTicketGroupEditContext?.editIntention;\n const queryClient = useQueryClient();\n const navigate = useNavigate();\n const removeDeepLinkUrlPart = useRemoveDeepLinkUrlPart();\n const { posEntity: purchaseDetails } =\n useActivePosEntityContext();\n\n const purchaseOrderId = watch('id');\n const vendor = watch('vendor');\n const vendorAccount = watch('vendorAccount');\n const buyerUserId = watch('buyerUserId');\n const secondaryVendorAccount = watch('secondaryVendorAccount');\n const vendorOrderId = watch('vendorOrderId');\n const purchaseDate = watch('purchaseDate');\n const ticketGroups = watch('ticketGroups');\n const updateSalesOfListings = watch('updateSalesOfListings');\n const ticketGroupIntentions = watch('ticketGroupIntentions');\n const currencyCode = watch('currencyCode');\n const { refreshData } = usePurchaseDataContext();\n const { updateItemInEvent, refreshCatalog } = useCatalogDataContext();\n\n const [debouncedOrderId, setDebouncedOrderId] = useState();\n useDebounce(\n () => {\n setDebouncedOrderId(vendorOrderId?.value);\n },\n 300,\n [vendorOrderId]\n );\n\n const { purchasingIdInUseQuery } = useGetIsPurchaseIdsInUsedForVendorId(\n debouncedOrderId,\n vendor?.value?.id\n );\n\n const requiredMsg = useContent(ContentId.Required);\n const duplicateSeatMsg = useContent(ContentId.DuplicateSeat);\n const orderIdUsedErrorMsg = useContent(ContentId.OrderIdInUseSameVendor);\n const eventRequiredMsg = useContent(ContentId.SearchAndSelectAnEvent);\n const inhandDateMustBeforeEventDateMsg = useContent(\n ContentId.InHandDateMustBeBeforeEventDate\n );\n const autoBroadcastRequireFaceValueMsg = useContent(\n ContentId.AutoBroadcastRequiredFaceValue\n );\n\n const { closeModal } = useContext(ModalContext);\n const { inboundEmailId, classificationType } = useContext(\n EmailPurchaseOrderContext\n );\n const { showErrorDialog } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig, loginContext, mainRoute } =\n useAppContext();\n const { refetch: refreshTagMetadata, tagsMetadata } = useTagsForEntityType(\n ActionOutboxEntityType.Purchase\n );\n const [currentStep, setCurrentStep] = useState(\n purchaseOrderId < 0\n ? Steps.PurchaseVendorInfoStep\n : Steps.PurchaseWizardMainStep\n );\n\n useEffect(() => {\n if (purchaseOrderId > 0 && currentStep === Steps.PurchaseVendorInfoStep) {\n setCurrentStep(Steps.PurchaseWizardMainStep);\n }\n }, [currentStep, purchaseOrderId]);\n\n const [isLoading, setIsLoading] = useState(false);\n\n const isMobile = useMatchMedia('mobile');\n const { setModal } = useContext(ModalContext);\n const canCreate = useUserHasAnyOfPermissions(Permission.Purchases_Create);\n const canEdit = useUserCanUpdatePurchase(purchaseDetails);\n\n // if this is true - Everything in the PO is readonly\n // use this if an input can be writeable when PO is cancelled (like payments)\n const absoluteReadOnly =\n purchaseDetails?.poState === PurchaseOrderState.Void ||\n (purchaseOrderId > 0 ? !canEdit : !canCreate);\n\n // if this is true, either the entire PO is readonly, or only parts of it (in the case where the PO is cancelled, some parts can be Writeable - like Payments)\n // use this on a component if you know it will always be readonly whether the PO is void or cancelled\n const readOnly =\n absoluteReadOnly ||\n purchaseDetails?.poState === PurchaseOrderState.Cancelled;\n\n useEffect(() => {\n if (inboundEmailId && currentStep === Steps.PurchaseVendorInfoStep) {\n validateVendorInfo(\n purchaseOrderId,\n clearErrors,\n purchaseDate,\n requiredMsg,\n orderIdUsedErrorMsg,\n setError,\n vendor,\n vendorAccount,\n vendorOrderId,\n purchasingIdInUseQuery.data\n );\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n inboundEmailId,\n currentStep,\n vendor,\n vendorAccount,\n vendorOrderId,\n purchasingIdInUseQuery.data,\n ]);\n\n const removeEventIdQueryIfExists = useCallback(() => {\n const posEventId = getDeepLinkIdFromUrl(\n EventIdQueryParam,\n window.location.href\n );\n\n const inFullPageEventView = isInFullPageEventView(mainRoute);\n\n if (posEventId && !inFullPageEventView) {\n removeDeepLinkUrlPart(EventIdQueryParam);\n }\n }, [mainRoute, removeDeepLinkUrlPart]);\n\n const onCloseModal = useCallback(\n (force?: boolean) => {\n removeEventIdQueryIfExists();\n removeDeepLinkUrlPart(PurchaseFromEmailPoQueryParam);\n closeModal(force);\n },\n [closeModal, removeDeepLinkUrlPart, removeEventIdQueryIfExists]\n );\n\n const [ticketGroupEditContext, setTicketGroupEditContext] =\n useState({\n startWithEventSearch: true,\n ticketGroupId: newBigIntId(),\n editIntention: TicketGroupEditReason.AddTickets,\n editInfo: '',\n ...initialTicketGroupEditContext,\n });\n const [ticketGroupActionParams, setTicketGroupActionParams] = useState<\n TicketGroupActionParams | undefined\n >();\n\n const ticketGroupIntentionDialog = useBasicDialog();\n const secondaryVendorAccountDialog = useBasicDialog();\n const updateMergedListingDialog = useBasicDialog();\n const ticketGroupCancelConfirmDialog = useBasicDialog();\n\n const hasPurchasePaymentConversionFeature = useUserHasFeature(\n Feature.PurchasePaymentConversion\n );\n const hasMultiTicketGroupTableFeature = useUserHasFeature(\n Feature.MultiTicketGroupTable\n );\n\n const { setActivePosEntity } =\n useActivePosEntityContext();\n\n const onSubmit = useCallback(\n async (purchaseDetailsForm: PurchaseOrderDetailsInput) => {\n if (absoluteReadOnly) {\n // Don't save\n return;\n }\n\n tryInvokeApi(\n async () => {\n setIsLoading(true);\n\n const client = new PurchaseClient(activeAccountWebClientConfig);\n if (purchaseDetailsForm.id < 0) {\n const result = await client.insertPurchaseOrder(\n purchaseDetailsForm,\n true // isManual\n );\n\n const savePurchaseOrderId = result.entityId;\n\n if (savePurchaseOrderId == null) {\n let errorMessage = 'Failed to insert purchase order';\n\n if (result.message != null) {\n errorMessage += `: ${result.message}`;\n }\n\n showErrorDialog(\n 'PurchaseClient.insertPurchaseOrder',\n {\n message: errorMessage,\n status: result.status ?? StatusCodes.INTERNAL_SERVER_ERROR,\n },\n {\n trackErrorData: purchaseDetailsForm,\n }\n );\n } else {\n if (inboundEmailId != null) {\n new AutoPoClient(\n activeAccountWebClientConfig\n ).classifyInboundEmail(\n inboundEmailId,\n classificationType,\n savePurchaseOrderId,\n null\n );\n\n navigate(\n `${getPurchaseOrderRelativeUrl(\n savePurchaseOrderId\n )}&fromAutoPo=true`\n );\n } else if (setActivePosEntity != null) {\n // Avoid calling navigate(getPurchaseOrderRelativeUrl()) because\n // the modal is used outside the purchases, and this will make\n // a non-wanted navigation.\n setModal(\n getPurchaseOrderDetailsModalConfigWithDeepLink(\n savePurchaseOrderId\n )\n );\n\n // Refetch all the inventory related queries because it needs to pick up the latest created inventories/events\n // Or else we have to wait until the next refetch cycle\n queryClient.refetchQueries({\n queryKey: [ListingCatalogQueryKey],\n type: 'all',\n });\n queryClient.refetchQueries({\n queryKey: [ListingCatalogQueryKey],\n type: 'all',\n });\n queryClient.refetchQueries({\n queryKey: [ListingCatalogMetricsQueryKey],\n type: 'all',\n });\n }\n }\n } else {\n if (purchaseHasMergedListings) {\n updateMergedListingDialog.closeDialog();\n }\n\n let reloadWizard = false;\n\n let ticketGroupsChanged = !isEqual(\n purchaseDetailsForm.ticketGroups,\n formState.defaultValues?.ticketGroups\n );\n const costsChanged = !isEqual(\n purchaseDetailsForm.additionalCosts,\n formState.defaultValues?.additionalCosts\n );\n const paymentsChanged = !isEqual(\n purchaseDetailsForm.payments,\n formState.defaultValues?.payments\n );\n\n const dealChanged = !isEqual(\n purchaseDetailsForm.deal,\n formState.defaultValues?.deal\n );\n\n // If we have any change from ticket-groups or costs, that could affect the PO main props (total-cost, unit cost, num of tickets and ticket-groups, etc.)\n // Or if we made any changes explicitly on the PO, then call updatePurchaseOrder to update those first-class props\n if (\n ticketGroupsChanged ||\n costsChanged ||\n paymentsChanged ||\n dealChanged ||\n hasChanged(\n purchaseDetailsForm.currencyCode,\n formState.defaultValues?.currencyCode\n ) ||\n hasChanged(\n purchaseDetailsForm.buyerUserId,\n formState.defaultValues?.buyerUserId\n ) ||\n hasChanged(\n purchaseDetailsForm.purchaseDate,\n formState.defaultValues?.purchaseDate\n ) ||\n hasChanged(\n purchaseDetailsForm.vendor,\n formState.defaultValues?.vendor\n ) ||\n hasChanged(\n purchaseDetailsForm.vendorAccount,\n formState.defaultValues?.vendorAccount\n ) ||\n hasChanged(\n purchaseDetailsForm.vendorOrderId,\n formState.defaultValues?.vendorOrderId\n ) ||\n hasChanged(\n purchaseDetailsForm.secondaryVendorAccount,\n formState.defaultValues?.secondaryVendorAccount\n ) ||\n hasChanged(\n purchaseDetailsForm.transferId,\n formState.defaultValues?.transferId\n ) ||\n tagFieldHasChanges(\n purchaseDetailsForm.tags,\n (formState.defaultValues?.tags ?? {}) as PosFieldArrayOfTag,\n tagsMetadata ?? []\n ) ||\n hasChanged(\n purchaseDetailsForm.privateNotes,\n formState.defaultValues?.privateNotes\n ) ||\n hasChanged(\n purchaseDetailsForm?.commissions,\n formState.defaultValues?.commissions\n ) ||\n hasChanged(\n purchaseDetailsForm?.qcState,\n formState.defaultValues?.qcState\n ) ||\n hasChanged(\n purchaseDetailsForm?.isCommissionsLocked,\n formState.defaultValues?.isCommissionsLocked\n )\n ) {\n reloadWizard = true;\n const result =\n await client.updatePurchaseOrder(purchaseDetailsForm);\n\n if (result.status !== 200) {\n let errorMessage = 'Failed to update purchase order';\n\n if (result.message != null) {\n errorMessage += `: ${result.message}`;\n }\n\n showErrorDialog(\n 'PurchaseClient.updatePurchaseOrder',\n { message: errorMessage, status: result.status },\n {\n trackErrorData: {\n purchaseDetailsForm,\n result,\n },\n }\n );\n return;\n }\n }\n\n if (ticketGroupsChanged || paymentsChanged || costsChanged) {\n reloadWizard = true;\n\n const tgIntentionsMap = getValues('ticketGroupIntentions');\n if (\n (paymentsChanged || costsChanged) &&\n hasPurchasePaymentConversionFeature\n ) {\n ticketGroups.forEach(({ ticketGroupId }) => {\n if (!tgIntentionsMap[ticketGroupId]?.reason) {\n tgIntentionsMap[ticketGroupId] = {\n ticketGroupId: ticketGroupId,\n reason: TicketGroupEditReason.AmendTickets,\n additionalInfo: 'Update payment and cost',\n };\n }\n });\n }\n\n // New ad groups (negative ids) can be edited/ after being added, so we want to change it back to add\n // so the backend can handle it properly\n // We don't care about the Cancel intention because it will result in no-op\n const intentions = Object.values(tgIntentionsMap).map((tgi) => {\n if (\n tgi.ticketGroupId < 0 &&\n tgi.reason === TicketGroupEditReason.AmendTickets\n ) {\n tgi.reason = TicketGroupEditReason.AddTickets;\n }\n\n return tgi;\n });\n ticketGroupsChanged = await new TicketClient(\n activeAccountWebClientConfig\n ).mergeTicketGroups(\n {\n purchaseOrderId: purchaseDetailsForm.id,\n intentions: intentions,\n ticketGroups: purchaseDetailsForm.ticketGroups,\n updateSalesOfListings:\n purchaseDetailsForm.updateSalesOfListings,\n updatePredeliveryETicketArtifacts:\n purchaseDetailsForm.updatePredeliveryETicketArtifacts,\n } as TicketGroupMergeInput,\n true // isManual\n );\n\n // If the ticket group is the same as the one we are editing, we need to update the context\n if (\n purchaseOrderId > 0 &&\n updateItemInEvent != null &&\n intentions.length === 1 &&\n highlightTicketGroupIds?.length === 1\n ) {\n if (\n highlightTicketGroupIds[0] === intentions[0].ticketGroupId\n ) {\n const purchaseOrderDetails =\n await client.getPurchaseOrderByPurchaseOrderId(\n purchaseOrderId,\n false\n );\n if (purchaseOrderDetails) {\n updateItemInEvent(\n {\n ...purchaseOrderDetails,\n ...purchaseOrderDetails.ticketGroups[0],\n ticketGroupItems: [],\n isTktGrp: true,\n id: purchaseOrderDetails.id,\n tgId: purchaseOrderDetails.ticketGroups[0].id,\n isMultEv: false,\n } as PurchaseOrderTicketGroup,\n ActionOutboxEntityType.Purchase\n );\n }\n }\n }\n }\n\n if (reloadWizard) {\n // Refresh the active data so the SaleDetail dialog and table will have the new content\n setActivePosEntity(purchaseDetailsForm.id, null, true);\n reset(purchaseDetailsForm);\n // Update the tags metadata\n refreshTagMetadata();\n }\n }\n\n await refreshCatalog();\n\n refreshData(true);\n },\n (error) => {\n showErrorDialog(\n purchaseDetailsForm.id < 0\n ? 'PurchaseClient.insertPurchaseOrder'\n : 'PurchaseClient.updatePurchaseOrder',\n error,\n {\n trackErrorData: purchaseDetailsForm,\n }\n );\n },\n () => {\n setIsLoading(false);\n }\n );\n },\n [\n absoluteReadOnly,\n activeAccountWebClientConfig,\n refreshCatalog,\n refreshData,\n showErrorDialog,\n inboundEmailId,\n setActivePosEntity,\n classificationType,\n navigate,\n setModal,\n queryClient,\n purchaseHasMergedListings,\n formState.defaultValues?.ticketGroups,\n formState.defaultValues?.additionalCosts,\n formState.defaultValues?.payments,\n formState.defaultValues?.deal,\n formState.defaultValues?.currencyCode,\n formState.defaultValues?.buyerUserId,\n formState.defaultValues?.purchaseDate,\n formState.defaultValues?.vendor,\n formState.defaultValues?.vendorAccount,\n formState.defaultValues?.vendorOrderId,\n formState.defaultValues?.secondaryVendorAccount,\n formState.defaultValues?.transferId,\n formState.defaultValues?.tags,\n formState.defaultValues?.privateNotes,\n formState.defaultValues?.commissions,\n formState.defaultValues?.qcState,\n formState.defaultValues?.isCommissionsLocked,\n tagsMetadata,\n updateMergedListingDialog,\n getValues,\n hasPurchasePaymentConversionFeature,\n purchaseOrderId,\n updateItemInEvent,\n highlightTicketGroupIds,\n ticketGroups,\n reset,\n refreshTagMetadata,\n ]\n );\n\n const onNextFromVendorInfoStep = useCallback(async () => {\n if (\n validateVendorInfo(\n purchaseOrderId,\n clearErrors,\n purchaseDate,\n requiredMsg,\n orderIdUsedErrorMsg,\n setError,\n vendor,\n vendorAccount,\n vendorOrderId,\n purchasingIdInUseQuery.data\n )\n ) {\n const viagVirtualId =\n purchaseOrderId < 0 &&\n getDeepLinkIdFromUrl(EventIdQueryParam, window.location.href);\n\n let additionalData = undefined;\n if (viagVirtualId) {\n // We have a viagVirtualId specified - we should go get that Event before moving on with the add\n const catalog = await new CatalogClient(\n activeAccountWebClientConfig\n ).getCatalog([viagVirtualId]);\n\n const { event, venue, performer } = getEventPerformerVenue(\n viagVirtualId,\n catalog\n );\n if (event) {\n additionalData = {\n event: event.event,\n performer,\n venue,\n };\n }\n }\n\n setTicketGroupEditContext({\n startWithEventSearch: !additionalData,\n ticketGroupId: newBigIntId(),\n editIntention: TicketGroupEditReason.AddTickets,\n editInfo: '',\n additionalData: additionalData,\n });\n setCurrentStep(Steps.TicketGroupInputStep);\n }\n }, [\n activeAccountWebClientConfig,\n clearErrors,\n orderIdUsedErrorMsg,\n purchaseOrderId,\n purchaseDate,\n purchasingIdInUseQuery.data,\n requiredMsg,\n setError,\n vendor,\n vendorAccount,\n vendorOrderId,\n ]);\n\n const {\n launchDialog: launchInternationalComplianceDialog,\n closeDialog: closeInternationalComplianceDialog,\n dialogProps: internationalComplianceDialogProps,\n } = useBasicDialog();\n\n const internationalComplianceHookProps = useInternationalComplianceDialog(\n () => {\n closeInternationalComplianceDialog();\n handleSubmit(onSubmit)();\n }\n );\n\n const onNextFromPurchaseWizardMainStep = useCallback(() => {\n if (\n validateVendorInfo(\n purchaseOrderId,\n clearErrors,\n purchaseDate,\n requiredMsg,\n orderIdUsedErrorMsg,\n setError,\n vendor,\n vendorAccount,\n vendorOrderId,\n purchasingIdInUseQuery.data\n ) &&\n validateEventSelection(\n clearErrors,\n setError,\n ticketGroups,\n eventRequiredMsg\n ) &&\n validateTicketGroups(\n false,\n clearErrors,\n setError,\n ticketGroups,\n requiredMsg,\n duplicateSeatMsg,\n inhandDateMustBeforeEventDateMsg,\n autoBroadcastRequireFaceValueMsg\n )\n ) {\n // Find any ticket group that is new and are for events not in US\n const internationalNewTgs = ticketGroups.filter(\n (tg) =>\n tg.ticketGroupId < 0 &&\n !US_COUNTRY_CODES.includes(\n tg.venue?.country?.code?.toUpperCase() ?? ''\n )\n );\n\n if (\n // If we have any, and there is a settings that last time we used it compare to now is more than 24 hrs, ask again\n internationalNewTgs.length > 0 &&\n isDatePassedHours(\n internationalComplianceHookProps.value?.doNotAskAgainTimestamp,\n 24\n )\n ) {\n launchInternationalComplianceDialog();\n } else {\n if (purchaseHasMergedListings) {\n updateMergedListingDialog.launchDialog();\n } else {\n handleSubmit(onSubmit)();\n }\n }\n }\n }, [\n purchaseOrderId,\n clearErrors,\n purchaseDate,\n requiredMsg,\n orderIdUsedErrorMsg,\n setError,\n vendor,\n vendorAccount,\n vendorOrderId,\n purchasingIdInUseQuery.data,\n ticketGroups,\n eventRequiredMsg,\n duplicateSeatMsg,\n inhandDateMustBeforeEventDateMsg,\n autoBroadcastRequireFaceValueMsg,\n internationalComplianceHookProps.value?.doNotAskAgainTimestamp,\n launchInternationalComplianceDialog,\n purchaseHasMergedListings,\n updateMergedListingDialog,\n handleSubmit,\n onSubmit,\n ]);\n\n const handleTicketGroupEdit = useCallback(\n (intention: TicketGroupIntention, tgContext: TicketGroupEditContext) => {\n if (intention.reason === TicketGroupEditReason.CancelTickets) {\n const newTgs = ticketGroups.filter(\n (tg) => tg.ticketGroupId !== tgContext.ticketGroupId\n );\n\n setValue('ticketGroups', newTgs);\n\n ticketGroupIntentions[intention.ticketGroupId.toString()] = intention;\n setValue('ticketGroupIntentions', { ...ticketGroupIntentions });\n } else if (intention.reason === TicketGroupEditReason.AmendTickets) {\n setTicketGroupEditContext({\n ...tgContext,\n editInfo: intention.additionalInfo,\n });\n\n // We just want to edit - go straight there\n setCurrentStep(Steps.TicketGroupInputStep);\n } else if (AddActions.includes(intention.reason)) {\n // Adding a new ticket-groups for the current-event\n // If it's an exchange, on Submit of the PurchaseTicketFlow, the current ticket group will be deleted\n const { additionalData } = tgContext;\n if (additionalData?.event) {\n setTicketGroupEditContext({\n ticketGroupId: intention.ticketGroupId,\n startWithEventSearch: false,\n ticketGroupIdToRemove: tgContext.ticketGroupIdToRemove,\n editIntention: intention.reason,\n additionalData,\n editInfo: intention.additionalInfo,\n });\n } else {\n setTicketGroupEditContext({\n startWithEventSearch: true,\n ticketGroupId: newBigIntId(),\n editIntention: TicketGroupEditReason.AddTickets,\n editInfo: intention.additionalInfo,\n });\n }\n\n // We just want to edit (but keep fields not pre-filled) - go straight there\n setCurrentStep(Steps.TicketGroupBlankInputStep);\n }\n\n ticketGroupIntentionDialog.closeDialog();\n },\n [setValue, ticketGroupIntentionDialog, ticketGroupIntentions, ticketGroups]\n );\n\n const onTicketGroupIntentionDialogSave = useCallback(\n (intention: TicketGroupIntention) => {\n cleanTicketGroupContextFromDeepLink(PurchaseDeeplinkQueryParam);\n\n handleTicketGroupEdit(intention, ticketGroupEditContext);\n\n ticketGroupIntentionDialog.closeDialog();\n },\n [handleTicketGroupEdit, ticketGroupEditContext, ticketGroupIntentionDialog]\n );\n\n const isDisabledAbsolutely =\n absoluteReadOnly || isLoading || formState.isSubmitting;\n\n const isDisabled = readOnly || isLoading || formState.isSubmitting;\n\n const onPurchaseTicketsFlowSubmit = useCallback(\n (formData: PurchaseTicketsInput) => {\n if (!isDisabled) {\n const newTicketGroups = formData.ticketGroups;\n let finalTicketGroups = [] as TicketGroupInput[];\n if (\n ticketGroupEditContext.editIntention ===\n TicketGroupEditReason.AddTickets\n ) {\n finalTicketGroups = [...(ticketGroups || []), ...newTicketGroups];\n newTicketGroups.forEach((tg) => {\n ticketGroupIntentions[tg.ticketGroupId.toString()] = {\n ticketGroupId: tg.ticketGroupId,\n reason: ticketGroupEditContext.editIntention,\n additionalInfo: ticketGroupEditContext.editInfo,\n };\n });\n } else if (\n ticketGroupEditContext.editIntention ===\n TicketGroupEditReason.AmendTickets\n ) {\n const index = ticketGroups.findIndex(\n (tg) => tg.ticketGroupId === ticketGroupEditContext.ticketGroupId\n );\n const editedTicketGroup = newTicketGroups[0];\n finalTicketGroups = [...(ticketGroups || [])];\n finalTicketGroups[index] = editedTicketGroup;\n\n ticketGroupIntentions[editedTicketGroup.ticketGroupId.toString()] = {\n ticketGroupId: editedTicketGroup.ticketGroupId,\n reason: ticketGroupEditContext.editIntention,\n additionalInfo: ticketGroupEditContext.editInfo,\n };\n } else if (\n ticketGroupEditContext.editIntention ===\n TicketGroupEditReason.ExchangeTickets\n ) {\n const ticketGroupsWithoutTheRemoved = (finalTicketGroups =\n ticketGroups.filter(\n (tg) =>\n tg.ticketGroupId !==\n ticketGroupEditContext.ticketGroupIdToRemove\n ));\n finalTicketGroups = [\n ...ticketGroupsWithoutTheRemoved,\n ...newTicketGroups,\n ];\n\n ticketGroupIntentions[\n ticketGroupEditContext.ticketGroupIdToRemove!.toString()\n ] = {\n ticketGroupId: ticketGroupEditContext.ticketGroupIdToRemove!,\n reason: ticketGroupEditContext.editIntention,\n additionalInfo: ticketGroupEditContext.editInfo,\n };\n\n newTicketGroups.forEach((tg) => {\n ticketGroupIntentions[tg.ticketGroupId.toString()] = {\n ticketGroupId: tg.ticketGroupId,\n reason: ticketGroupEditContext.editIntention,\n additionalInfo: ticketGroupEditContext.editInfo,\n };\n });\n }\n setValue('ticketGroups', finalTicketGroups);\n setValue('ticketGroupIntentions', { ...ticketGroupIntentions });\n setValue('updateSalesOfListings', formData.updateSalesOfListings);\n setValue(\n 'updatePredeliveryETicketArtifacts',\n formData.updatePredeliveryETicketArtifacts\n );\n }\n setCurrentStep(Steps.PurchaseWizardMainStep);\n cleanTicketGroupContextFromDeepLink(PurchaseDeeplinkQueryParam);\n },\n [\n isDisabled,\n ticketGroupEditContext,\n setValue,\n ticketGroupIntentions,\n ticketGroups,\n ]\n );\n\n const onPurchaseMultiTicketsFlowSubmit = useCallback(\n (formData: PurchaseTicketsInput) => {\n if (!isDisabled) {\n const newTicketGroups = formData.ticketGroups;\n let finalTicketGroups = [] as TicketGroupInput[];\n if (\n ticketGroupEditContext.editIntention ===\n TicketGroupEditReason.AddTickets ||\n ticketGroupEditContext.editIntention ===\n TicketGroupEditReason.AmendTickets\n ) {\n // For predelivery flow we want single TG action\n if (\n ticketGroupEditContext.additionalData?.amendActionData\n ?.uploadPredeliveryAction\n ) {\n const index = ticketGroups.findIndex(\n (tg) => tg.ticketGroupId === ticketGroupEditContext.ticketGroupId\n );\n const editedTicketGroup = newTicketGroups[0];\n finalTicketGroups = [...(ticketGroups || [])];\n finalTicketGroups[index] = editedTicketGroup;\n\n ticketGroupIntentions[editedTicketGroup.ticketGroupId.toString()] =\n {\n ticketGroupId: editedTicketGroup.ticketGroupId,\n reason: ticketGroupEditContext.editIntention,\n additionalInfo: ticketGroupEditContext.editInfo,\n };\n } else {\n const targetEventId = newTicketGroups[0]?.event?.viagVirtualId;\n if (targetEventId != null) {\n // Filter out existing ticketGroups with the same event ID\n finalTicketGroups = ticketGroups?.filter(\n (tg) => tg.event?.viagVirtualId !== targetEventId\n );\n\n // Add newTicketGroups to the final result\n finalTicketGroups = [\n ...(finalTicketGroups || []),\n ...newTicketGroups,\n ];\n } else {\n // If no event ID in newTicketGroups, just keep the existing groups unchanged\n finalTicketGroups = [...ticketGroups];\n }\n\n newTicketGroups.forEach((tg) => {\n ticketGroupIntentions[tg.ticketGroupId.toString()] = {\n ticketGroupId: tg.ticketGroupId,\n reason: ticketGroupEditContext.editIntention,\n additionalInfo: ticketGroupEditContext.editInfo,\n };\n });\n }\n } else if (\n ticketGroupEditContext.editIntention ===\n TicketGroupEditReason.ExchangeTickets\n ) {\n const ticketGroupsWithoutTheRemoved = (finalTicketGroups =\n ticketGroups.filter(\n (tg) =>\n tg.ticketGroupId !==\n ticketGroupEditContext.ticketGroupIdToRemove\n ));\n finalTicketGroups = [\n ...ticketGroupsWithoutTheRemoved,\n ...newTicketGroups,\n ];\n\n ticketGroupIntentions[\n ticketGroupEditContext.ticketGroupIdToRemove!.toString()\n ] = {\n ticketGroupId: ticketGroupEditContext.ticketGroupIdToRemove!,\n reason: ticketGroupEditContext.editIntention,\n additionalInfo: ticketGroupEditContext.editInfo,\n };\n\n newTicketGroups.forEach((tg) => {\n ticketGroupIntentions[tg.ticketGroupId.toString()] = {\n ticketGroupId: tg.ticketGroupId,\n reason: ticketGroupEditContext.editIntention,\n additionalInfo: ticketGroupEditContext.editInfo,\n };\n });\n }\n setValue('ticketGroups', finalTicketGroups);\n setValue('ticketGroupIntentions', { ...ticketGroupIntentions });\n setValue('updateSalesOfListings', formData.updateSalesOfListings);\n setValue(\n 'updatePredeliveryETicketArtifacts',\n formData.updatePredeliveryETicketArtifacts\n );\n }\n setCurrentStep(Steps.PurchaseWizardMainStep);\n cleanTicketGroupContextFromDeepLink(PurchaseDeeplinkQueryParam);\n },\n [\n isDisabled,\n ticketGroupEditContext,\n setValue,\n ticketGroupIntentions,\n ticketGroups,\n ]\n );\n\n const onPurchaseTicketsFlowCancel = useCallback(() => {\n setCurrentStep(Steps.PurchaseWizardMainStep);\n cleanTicketGroupContextFromDeepLink(PurchaseDeeplinkQueryParam);\n }, []);\n\n const getFooterActions = useCallback((): PurchaseWizardFooterProps => {\n const hasChanges = !isEqual(formState.defaultValues, getValues());\n switch (currentStep) {\n case Steps.PurchaseVendorInfoStep:\n return {\n onPreviousLabel: hasChanges ? ContentId.Cancel : ContentId.Close,\n onPrevious: onCloseModal,\n onNextLabel: ContentId.Next,\n onNext: onNextFromVendorInfoStep,\n };\n case Steps.PurchaseWizardMainStep:\n return {\n onPreviousLabel: hasChanges ? ContentId.Cancel : ContentId.Close,\n onPrevious: onCloseModal, // Once we're on the main page, going back means cancelling\n onNextLabel:\n purchaseOrderId < 0 || hasChanges ? ContentId.Save : undefined,\n onNext:\n purchaseOrderId < 0 || hasChanges\n ? onNextFromPurchaseWizardMainStep\n : undefined,\n };\n case Steps.TicketGroupInputStep:\n case Steps.TicketGroupBlankInputStep:\n return {\n onPreviousLabel: undefined,\n onPrevious: undefined,\n onNextLabel: undefined,\n onNext: undefined,\n };\n }\n }, [\n formState.defaultValues,\n getValues,\n currentStep,\n onCloseModal,\n onNextFromVendorInfoStep,\n purchaseOrderId,\n onNextFromPurchaseWizardMainStep,\n ]);\n const footerActions = getFooterActions();\n\n const getTicketGroupsForEditing = useCallback((): TicketGroupInput[] => {\n if (ticketGroupEditContext.startWithEventSearch) {\n // If we want to start with search, then we want to create new ticket groups for new event\n // so just return nothing here\n return [];\n }\n const existingTicketGroup = ticketGroups?.find(\n (tg) => tg.ticketGroupId === ticketGroupEditContext.ticketGroupId\n );\n\n if (existingTicketGroup) {\n if (\n hasMultiTicketGroupTableFeature &&\n !ticketGroupEditContext.additionalData?.amendActionData\n ?.uploadPredeliveryAction\n ) {\n return ticketGroups.filter(\n (tg) =>\n tg.event?.viagVirtualId === existingTicketGroup.event?.viagVirtualId\n );\n }\n\n return [existingTicketGroup];\n }\n\n // Return a new one that is copy of an existing one if exist for the same event\n const existingTgs = (ticketGroups ?? [])?.filter(\n (tg) =>\n tg.viagogoVirtualId ===\n ticketGroupEditContext.additionalData!.event!.viagVirtualId ||\n tg.event?.viagVirtualId ===\n ticketGroupEditContext.additionalData!.event!.viagVirtualId\n );\n\n // To handle \"Add Purchase\" from an event\n if (hasMultiTicketGroupTableFeature && existingTgs.length > 0) {\n return existingTgs;\n }\n return [\n {\n ...(existingTgs.length ? existingTgs[existingTgs.length - 1] : {}),\n ticketGroupId: ticketGroupEditContext.ticketGroupId,\n viagogoVirtualId:\n ticketGroupEditContext.additionalData!.event?.viagVirtualId,\n viagogoEventId: ticketGroupEditContext.additionalData!.event?.viagId,\n eventMappingId: ticketGroupEditContext.additionalData!.event?.mappingId,\n posEventId: ticketGroupEditContext.additionalData!.event?.posIds?.[0],\n deliveryType: posChangedField(DeliveryType.InApp),\n event: ticketGroupEditContext.additionalData!.event,\n performer: ticketGroupEditContext.additionalData!.performer,\n venue: ticketGroupEditContext.additionalData!.venue,\n currencyCode: posChangedField(currencyCode?.value),\n } as TicketGroupInput,\n ];\n }, [\n currencyCode?.value,\n hasMultiTicketGroupTableFeature,\n ticketGroupEditContext.additionalData,\n ticketGroupEditContext.startWithEventSearch,\n ticketGroupEditContext.ticketGroupId,\n ticketGroups,\n ]);\n\n const emailPreview = useMemo(() => {\n return inboundEmailId != null && !isMobile ? (\n \n \n \n \n \n \n \n \n ) : null;\n }, [inboundEmailId, isMobile]);\n\n const onTicketGroupAction = useCallback(\n ({ ticketGroupId, action, additionalData }: TicketGroupActionParams) => {\n const newTGNav: TicketGroupEditContext = {\n startWithEventSearch: false,\n ticketGroupId: AddActions.includes(action)\n ? newBigIntId()\n : ticketGroupId,\n editIntention: action,\n editInfo: '',\n additionalData: additionalData,\n ticketGroupIdToRemove:\n action === TicketGroupEditReason.ExchangeTickets\n ? ticketGroupId\n : undefined,\n };\n\n setTicketGroupEditContext(newTGNav);\n if (\n isDisabled ||\n purchaseOrderId < 0 ||\n (ticketGroupId < 0 && action !== TicketGroupEditReason.AddTickets) ||\n additionalData?.amendActionData?.uploadPredeliveryAction\n ) {\n // If this is a new order, or\n // Cancelling or Amending a newly added ticket, or\n // it's amend dialog for uploading artifacts\n // should just do it without launching the dialog\n handleTicketGroupEdit(\n {\n ticketGroupId: newTGNav.ticketGroupId,\n reason: action,\n additionalInfo: '',\n },\n newTGNav\n );\n } else {\n ticketGroupIntentionDialog.launchDialog();\n }\n },\n [\n handleTicketGroupEdit,\n isDisabled,\n purchaseOrderId,\n ticketGroupIntentionDialog,\n ]\n );\n\n const cancelTicketGroupHookProps = useCancelTicketGroupDialog(\n () => {\n if (ticketGroupActionParams) {\n onTicketGroupAction(ticketGroupActionParams);\n setTicketGroupActionParams(undefined);\n ticketGroupCancelConfirmDialog.closeDialog();\n }\n },\n () => {\n setTicketGroupActionParams(undefined);\n ticketGroupCancelConfirmDialog.closeDialog();\n }\n );\n\n const onTicketGroupActionAttempt = useCallback(\n (\n { ticketGroupId, action, additionalData }: TicketGroupActionParams,\n showConfirmationDialog?: boolean\n ) => {\n if (\n showConfirmationDialog &&\n isDatePassedHours(cancelTicketGroupHookProps.lastTimeStamp, 1)\n ) {\n setTicketGroupActionParams({ ticketGroupId, action, additionalData });\n ticketGroupCancelConfirmDialog.launchDialog();\n return;\n }\n\n onTicketGroupAction({ ticketGroupId, action, additionalData });\n },\n [\n cancelTicketGroupHookProps.lastTimeStamp,\n onTicketGroupAction,\n ticketGroupCancelConfirmDialog,\n ]\n );\n\n const saleIds = useMemo(() => {\n const ticketGroup =\n ticketGroupEditContext.ticketGroupId >= 0\n ? ticketGroups.find(\n (tg) => tg.ticketGroupId === ticketGroupEditContext.ticketGroupId\n )\n : undefined;\n return new Set(\n ticketGroup?.tickets?.value\n ?.filter((t) => t.saleId)\n ?.map((t) => t.saleId!) || []\n );\n }, [ticketGroupEditContext.ticketGroupId, ticketGroups]);\n\n useEffect(() => {\n if (highlightTicketGroupIds?.length === 1 && initialTicketGroupEditReason) {\n onTicketGroupAction({\n ticketGroupId: highlightTicketGroupIds[0],\n action: initialTicketGroupEditReason,\n additionalData: initialTicketGroupEditContext?.additionalData,\n });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const ticketGroupFromPartialPurchaseOrder = watch(\n 'ticketGroupFromPartialPurchaseOrder'\n );\n const eventSearchTextFromPartialPurchaseOrder = watch(\n 'eventSearchTextFromPartialPurchaseOrder'\n );\n\n if (TicketGroupInputSteps.includes(currentStep)) {\n if (hasMultiTicketGroupTableFeature) {\n return (\n \n );\n }\n return (\n \n );\n }\n\n return (\n \n onCloseModal(true)}\n >\n \n }\n />\n \n \n {!isLoading && emailPreview}\n \n {currentStep === Steps.PurchaseVendorInfoStep && (\n \n {/* this is only for add - which means there are no sales or listings */}\n \n \n \n \n \n )}\n {isLoading ? (\n \n ) : (\n currentStep === Steps.PurchaseWizardMainStep && (\n \n )\n )}\n \n \n \n {\n cleanTicketGroupContextFromDeepLink(PurchaseDeeplinkQueryParam);\n ticketGroupIntentionDialog.closeDialog();\n }}\n onSave={onTicketGroupIntentionDialogSave}\n />\n {vendorAccount && (\n {\n setValue(\n 'secondaryVendor',\n posChangedField(secondaryVendor ?? null)\n );\n setValue(\n 'secondaryVendorAccount',\n posChangedField(secondaryVendorAccount ?? null)\n );\n secondaryVendorAccountDialog.closeDialog();\n }}\n vendorAccountFrom={vendorAccount.value}\n vendorAccountTo={secondaryVendorAccount?.value ?? null}\n />\n )}\n \n }\n bodyText={\n \n \n \n \n \n \n \n \n }\n onOkay={handleSubmit(onSubmit)}\n disabled={isLoading}\n onCancel={() => updateMergedListingDialog.closeDialog()}\n />\n }\n size=\"md\"\n {...ticketGroupCancelConfirmDialog.dialogProps}\n alerts={[cancelTicketGroupHookProps]}\n onOkay={() => {\n if (ticketGroupActionParams) {\n onTicketGroupAction(ticketGroupActionParams);\n setTicketGroupActionParams(undefined);\n ticketGroupCancelConfirmDialog.closeDialog();\n }\n }}\n okText={ContentId.Yes}\n cancelText={ContentId.No}\n onCancel={() => {\n setTicketGroupActionParams(undefined);\n ticketGroupCancelConfirmDialog.closeDialog();\n }}\n />\n \n );\n}\n","import {\n ReactNode,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { EmailPurchaseOrderContext } from 'src/contexts/EmailPurchaseOrderContext';\nimport { useEventItemLoadingDisplay } from 'src/hooks/useEventItemLoadingDisplay';\nimport { TicketGroupEditContext } from 'src/modals/PurchaseWizard/PurchaseWizard.types';\nimport {\n PurchaseDeeplinkQueryParam,\n PurchaseFromEmailPoQueryParam,\n} from 'src/utils/constants/constants';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { getDeepLinkIdFromUrl } from 'src/utils/deepLinkUtils';\nimport { getEventPerformerVenue } from 'src/utils/eventWithDataUtils';\nimport { newBigIntId } from 'src/utils/idUtils';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport {\n PurchaseOrderDetailsInput,\n splitOutTicketGroupId,\n toPartialPurchaseOrderToPurchaseOrderDetailsInput,\n toPurchaseOrderDetailsInput,\n} from 'src/utils/purchaseUtils';\nimport { CatalogClient, PurchaseOrderDetails } from 'src/WebApiController';\n\nimport { PurchaseWizardBody } from './PurchaseWizardBody';\n\nexport const PurchaseWizard = () => {\n const { posEntity: purchase, setActivePosEntity } =\n useActivePosEntityContext();\n\n const idParam = getDeepLinkIdFromUrl(\n PurchaseDeeplinkQueryParam,\n window.location.href\n );\n const {\n id: activeId,\n ticketGroupId,\n ticketGroupEditReason,\n ticketGroupEditContext,\n } = useMemo(() => {\n return splitOutTicketGroupId(idParam);\n }, [idParam]);\n\n const purchaseOrderId = Number(activeId);\n\n const isFromAutoPo =\n getDeepLinkIdFromUrl(\n PurchaseFromEmailPoQueryParam,\n window.location.href\n ) === 'true';\n\n useEffect(() => {\n if (isFromAutoPo) {\n if (purchase?.id !== activeId) {\n setActivePosEntity(purchaseOrderId, null, true);\n }\n }\n }, [activeId, isFromAutoPo, purchase, purchaseOrderId, setActivePosEntity]);\n\n const { isLoading, loadingState } =\n useEventItemLoadingDisplay(\n FormatContentId.LoadingOrderId,\n FormatContentId.SearchingForOrderId,\n FormatContentId.CouldNotFindOrderId,\n activeId?.toString()\n );\n\n if (purchaseOrderId > 0) {\n if (!purchase) {\n // If we don't have a purchase yet, either return loading state or nothing\n return loadingState;\n }\n\n // If we do have a purchase already, only return loadingState if it is not loading (ie, it's something else wrong)\n if (!isLoading && loadingState) return loadingState;\n }\n\n return (\n \n );\n};\n\nconst PurchaseOrderDetailsForm = ({\n purchase,\n loadingState,\n ...rest\n}: {\n purchase?: PurchaseOrderDetails | null;\n loadingState?: ReactNode;\n highlightTicketGroupIds?: number[];\n initialTicketGroupEditContext?: Partial;\n}) => {\n const { loginContext, activeAccountUserId, activeAccountWebClientConfig } =\n useAppContext();\n const { partialPurchaseOrder } = useContext(EmailPurchaseOrderContext);\n const { data } = useCatalogDataContext();\n const [poInput, setPoInput] = useState(\n null\n );\n\n const createPurchaseInput = useCallback(async () => {\n const poInput = toPurchaseOrderDetailsInput(\n purchase,\n activeAccountUserId,\n loginContext?.user?.activeAccount?.currencyCode,\n data\n );\n\n if (poInput) {\n const tgMissingEvents = poInput?.ticketGroups?.filter(\n (tg) => tg.event == null\n );\n\n if (tgMissingEvents?.length) {\n const missingViagVirtualIds = tgMissingEvents?.map(\n (tg) => tg.viagogoVirtualId\n );\n const smallCatalog = await new CatalogClient(\n activeAccountWebClientConfig\n ).getCatalog(missingViagVirtualIds);\n\n tgMissingEvents.forEach((tg) => {\n const viagogoVirtualId = tg.viagogoVirtualId;\n\n const { event, performer, venue } = getEventPerformerVenue(\n viagogoVirtualId,\n smallCatalog\n );\n\n tg.event = event?.event ?? null;\n tg.performer = performer ?? null;\n tg.venue = venue ?? null;\n });\n }\n\n setPoInput(poInput);\n }\n }, [\n activeAccountUserId,\n activeAccountWebClientConfig,\n data,\n loginContext?.user?.activeAccount?.currencyCode,\n purchase,\n ]);\n\n const createDefaultValues = useCallback(() => {\n if (purchase && !poInput) {\n return undefined;\n }\n\n return (\n poInput ??\n toPartialPurchaseOrderToPurchaseOrderDetailsInput(\n partialPurchaseOrder,\n activeAccountUserId,\n loginContext?.user?.activeAccount?.currencyCode\n ) ??\n ({\n id: newBigIntId(),\n buyerUserId: posChangedField(activeAccountUserId),\n purchaseDate: posChangedField(new Date().toISOString()),\n currencyCode: posChangedField(\n loginContext?.user?.activeAccount?.currencyCode\n ),\n ticketGroupIntentions: {},\n deal: null,\n } as PurchaseOrderDetailsInput)\n );\n }, [\n activeAccountUserId,\n loginContext?.user?.activeAccount?.currencyCode,\n partialPurchaseOrder,\n poInput,\n purchase,\n ]);\n\n const methods = useForm({\n defaultValues: createDefaultValues(),\n });\n\n useEffect(() => {\n if (purchase && !poInput) {\n createPurchaseInput();\n } else {\n methods.reset(createDefaultValues());\n }\n }, [createDefaultValues, createPurchaseInput, methods, poInput, purchase]);\n\n if (!methods.formState.defaultValues) {\n // If we have purchase but unable to load the purchase default value yet, return loading state\n return loadingState;\n }\n\n return (\n \n \n \n );\n};\n","import { PurchaseWizard } from 'src/modals/PurchaseWizard';\nimport { PurchaseDeeplinkQueryParam } from 'src/utils/constants/constants';\n\nexport const PurchaseWizardModalConfig = {\n children: ,\n clickOutsideToClose: true,\n deepLinkKey: PurchaseDeeplinkQueryParam,\n deepLinkValue: undefined,\n size: 'slide-in',\n};\n","import * as Sentry from '@sentry/react';\nimport { UseFormClearErrors, UseFormSetError } from 'react-hook-form';\nimport { ExpandedEventData } from 'src/contexts/CatalogDataContext';\nimport { AutoPoPartialPurchaseOrderFields } from 'src/contexts/EmailPurchaseOrderContext';\nimport { ErrorTypes } from 'src/contexts/ErrorBoundaryContext';\nimport { ModalProps } from 'src/modals/Modal';\nimport { TicketGroupEditContext } from 'src/modals/PurchaseWizard/PurchaseWizard.types';\nimport { PurchaseWizardModalConfig } from 'src/modals/PurchaseWizard/PurchaseWizardModalConfig';\nimport { MainRoute } from 'src/navigations/Routes/MainRoute';\nimport {\n EventIdQueryParam,\n PurchaseDeeplinkQueryParam,\n} from 'src/utils/constants/constants';\nimport { removeFilters } from 'src/utils/eventQueryUtils';\nimport {\n CatalogClient,\n CatalogResults,\n DateTimeRange,\n DeliveryType,\n PosClientConfig,\n PosFieldOfNullableDateTime,\n PosFieldOfPurchaseVendor,\n PosFieldOfPurchaseVendorAccount,\n PosFieldOfString,\n PurchaseClient,\n PurchaseOrderDeal,\n PurchaseOrderDealInput,\n PurchaseOrderDetails,\n PurchaseOrderDetailsInput as ServerPurchaseOrderDetailsInput,\n PurchaseOrderQuery,\n PurchaseOrderState,\n PurchasingIdInUseResultType,\n Ticket,\n TicketGroup,\n TicketGroupEditReason,\n TicketGroupInput,\n TicketGroupIntention,\n UserSetting,\n} from 'src/WebApiController';\n\nimport {\n getPresetFromUiDateTimeRange,\n getUiDateTimeRangeFromPreset,\n PurchaseDateRangePresetNames,\n StandardDateRangePresetNames,\n} from './dateTimeUtils';\nimport {\n addDeepLinkUrlPart,\n getDeepLinkIdFromUrl,\n getFullUrl,\n getPathFromMainRoute,\n} from './deepLinkUtils';\nimport { getEventPerformerVenue } from './eventWithDataUtils';\nimport { newBigIntId } from './idUtils';\nimport { posChangedField, posField } from './posFieldUtils';\nimport { fitsSeatIncrementType, getNextTicketBy } from './ticketUtils';\nimport { tryInvokeApi } from './tryExecuteUtils';\n\nexport type PurchaseOrderDetailsInput = ServerPurchaseOrderDetailsInput & {\n ticketGroupIntentions: Record;\n ticketGroupFromPartialPurchaseOrder?: TicketGroupInput | null;\n eventSearchTextFromPartialPurchaseOrder?: string | null;\n updateSalesOfListings?: boolean | null;\n updatePredeliveryETicketArtifacts?: boolean | null;\n};\n\nexport type PurchaseTicketsInput = Pick<\n PurchaseOrderDetailsInput,\n | 'ticketGroups'\n | 'ticketGroupFromPartialPurchaseOrder'\n | 'eventSearchTextFromPartialPurchaseOrder'\n | 'updateSalesOfListings'\n | 'updatePredeliveryETicketArtifacts'\n> & {\n daysBeforeEvent?: number;\n};\n\nexport const toPurchaseOrderDetailsInput = (\n purchase?: PurchaseOrderDetails | null,\n accountUserId?: string | null,\n accountCurrencyCode?: string | null,\n catalog?: CatalogResults\n) => {\n if (!purchase) {\n return null;\n }\n\n const isNewPurchase = purchase.id <= 0;\n return {\n id: purchase.id > 0 ? purchase.id : newBigIntId(),\n purchaseDate: posField(\n purchase.poDate ?? new Date().toISOString(),\n isNewPurchase\n ),\n buyerUserId: posField(purchase.buyerId ?? accountUserId, isNewPurchase),\n currencyCode: posField(\n purchase.currency ?? accountCurrencyCode,\n isNewPurchase\n ),\n vendorOrderId: posField(purchase?.vendOrdId, isNewPurchase),\n commissions: posField(purchase?.commissions ?? [], isNewPurchase),\n vendor: posField(purchase?.vendor, isNewPurchase),\n vendorAccount: posField(purchase?.vendAcc, isNewPurchase),\n secondaryVendorAccount: posField(purchase?.secVendAcc, isNewPurchase),\n secondaryVendor: posField(purchase?.secVendor, isNewPurchase),\n paymentStatus: posField(purchase?.pmtStat, isNewPurchase),\n additionalCosts: posField(purchase?.additionalCosts, isNewPurchase),\n payments: posField(purchase?.payments, isNewPurchase),\n transferId: posField(purchase?.transferId, isNewPurchase),\n tags: posField(purchase?.tags, isNewPurchase),\n privateNotes: posField(purchase?.privNotes, isNewPurchase),\n qcState: posField(purchase?.qcState, isNewPurchase),\n ticketGroupCount: purchase?.tktGrpCnt,\n ticketCount: purchase?.ticketCnt,\n isAutoPo: purchase?.isAutoPo,\n ticketGroups: purchase?.ticketGroups.map((tg) =>\n toTicketGroupInput(tg, catalog, isNewPurchase)\n ),\n ticketGroupIntentions: {},\n deal: purchase?.deal\n ? posField(toDealInput(purchase?.deal, isNewPurchase), isNewPurchase)\n : null,\n isCommissionsLocked: posField(purchase?.isCommissionsLocked, isNewPurchase),\n } as PurchaseOrderDetailsInput;\n};\n\nexport const toTicketGroupInput = (\n tg: TicketGroup,\n catalog?: CatalogResults,\n isNewTicketGroup?: boolean\n) => {\n const viagogoVirtualId = tg.viagVirtualId;\n\n const { event, performer, venue } = getEventPerformerVenue(\n viagogoVirtualId,\n catalog\n );\n\n return {\n ticketGroupId: tg.id,\n purchaseOrderId: tg.poId,\n viagogoEventId: tg.viagEvId ?? event?.event?.viagId,\n eventMappingId: tg.viagEvMapId ?? event?.event?.mappingId,\n viagogoVirtualId: viagogoVirtualId,\n posEventId: tg.posEvId ?? event?.event?.posIds?.[0],\n event: event?.event,\n venue,\n performer,\n canGetDocArts: tg.canGetDocArts,\n unitCost: posField(tg.unitCst?.amt, isNewTicketGroup),\n inHandDate: posField(tg.inHandAt, isNewTicketGroup),\n expectedValue: posField(tg.expectedVal?.amt, isNewTicketGroup),\n isFaceValueCost: posField(tg.isFaceVal, isNewTicketGroup),\n faceValueCost: posField(tg.faceVal?.amt, isNewTicketGroup),\n deliveryType: posField(tg.delivType, isNewTicketGroup),\n totalCost: posField(tg.totalCst?.amt, isNewTicketGroup),\n taxPaid: posField(tg.taxPaid?.amt, isNewTicketGroup),\n deliveryCost: posField(tg.delivCst?.amt, isNewTicketGroup),\n currencyCode: posField(tg.currency, isNewTicketGroup),\n section: posField(tg.seating.section, isNewTicketGroup),\n sectionId: posField(tg.seating.sectionId, isNewTicketGroup),\n rowId: posField(tg.seating.rowId, isNewTicketGroup),\n row: posField(tg.seating.row, isNewTicketGroup),\n tickets: posField(tg.tickets, isNewTicketGroup),\n numberOfTickets: posField(tg.ticketCnt, isNewTicketGroup),\n /** Note - TicketGroup doesn't have InternalNotes as a field, but they are passed in from API to be set onto Listing */\n internalNotes: posField(tg.privNotes, isNewTicketGroup),\n listingNotes: posField(tg.seatTraits, isNewTicketGroup),\n webPrice: tg.webPrice,\n autoBroadcastCreatedListing: false,\n } as TicketGroupInput;\n};\n\nexport const toDealInput = (\n deal: PurchaseOrderDeal | null,\n isNewDeal: boolean\n) => {\n return {\n dealId: deal?.dealId,\n dealType: deal?.dealType,\n dealDetails: {\n dealConfigId: deal?.dealDetails?.dealConfigId,\n dealFallbackConfig: deal?.dealDetails?.dealFallbackConfig,\n dealConfigs: posField(deal?.dealDetails?.dealConfigs, isNewDeal),\n dealStartDate: deal?.dealDetails?.dealStartDate,\n dealEndDate: deal?.dealDetails?.dealEndDate,\n configSplitType: posField(deal?.dealDetails?.configSplitType, isNewDeal),\n guaranteedAmountPaid: deal?.dealDetails?.guaranteedAmountPaid,\n },\n } as PurchaseOrderDealInput;\n};\n\nexport const formatConversionRate = (\n rate: number | null,\n fromCurrency?: string | null,\n toCurrency?: string | null\n) => {\n if (rate == null) {\n return null;\n }\n\n return `1 ${fromCurrency == null ? '' : ' '}${fromCurrency} → ${rate.toFixed(\n 4\n )}${toCurrency == null ? '' : ' '}${toCurrency}`;\n};\n\nexport const toPartialPurchaseOrderToPurchaseOrderDetailsInput = (\n partialPurchaseOrder?: AutoPoPartialPurchaseOrderFields | null,\n accountUserId?: string | null,\n accountCurrencyCode?: string | null\n): PurchaseOrderDetailsInput | null => {\n if (!partialPurchaseOrder) {\n return null;\n }\n\n let ticketGroup = null;\n let eventSearchText = null;\n if (\n partialPurchaseOrder.eventName != null ||\n partialPurchaseOrder.venueName != null ||\n partialPurchaseOrder.section != null ||\n partialPurchaseOrder.row != null ||\n partialPurchaseOrder.seatFrom != null ||\n partialPurchaseOrder.seatTo != null ||\n partialPurchaseOrder.quantity != null ||\n partialPurchaseOrder.faceValue != null\n ) {\n const tgId = newBigIntId();\n const tickets = [] as Ticket[];\n let seatIncrementType = null;\n // Assemble tickets\n if (partialPurchaseOrder.quantity) {\n const seatValues = [] as string[];\n if (\n partialPurchaseOrder.seatFrom != null ||\n partialPurchaseOrder.seatTo != null\n ) {\n for (let incr = 1; incr <= 2; incr++) {\n if (\n fitsSeatIncrementType(\n partialPurchaseOrder.seatFrom,\n partialPurchaseOrder.seatTo,\n partialPurchaseOrder.quantity,\n incr\n )\n ) {\n seatIncrementType = incr;\n break;\n }\n }\n }\n\n let i;\n if (seatIncrementType) {\n let seatValue = partialPurchaseOrder.seatFrom;\n seatValues.push(seatValue);\n for (i = 1; i < partialPurchaseOrder.quantity; i++) {\n seatValue = getNextTicketBy(seatValue, seatIncrementType).toString();\n seatValues.push(seatValue);\n }\n } else {\n for (i = 0; i < partialPurchaseOrder.quantity; i++) {\n if (i === 0) seatValues.push(partialPurchaseOrder.seatFrom);\n else if (i === partialPurchaseOrder.quantity - 1)\n seatValues.push(partialPurchaseOrder.seatTo);\n else seatValues.push('');\n }\n }\n\n for (i = 0; i < partialPurchaseOrder.quantity; i++) {\n tickets.push({\n id: -i,\n tgId: tgId,\n ord: i,\n lstOrd: i,\n row: partialPurchaseOrder.row,\n seat: seatValues[i],\n } as Ticket);\n }\n }\n\n eventSearchText =\n partialPurchaseOrder.eventName ?? partialPurchaseOrder.venueName;\n // Strip chars other than blank, alphanumeric, quote\n // Sometimes there's difference of special chars like ':' vs '-' making it hard to search\n if (eventSearchText != null) {\n eventSearchText = eventSearchText.replace(/[^\\p{L}\\p{N}' ]/giu, '');\n }\n\n ticketGroup = {\n ticketGroupId: tgId,\n currencyCode: posChangedField(accountCurrencyCode),\n section: posChangedField(partialPurchaseOrder.section ?? ''),\n row: posChangedField(partialPurchaseOrder.row),\n numberOfTickets: posChangedField(partialPurchaseOrder.quantity ?? 0),\n tickets: posChangedField(tickets),\n deliveryType: posChangedField(DeliveryType.InApp),\n seatIncrementType: posChangedField(seatIncrementType),\n allocateSeats: posChangedField(\n partialPurchaseOrder.row != null ||\n partialPurchaseOrder.seatFrom != null ||\n partialPurchaseOrder.seatTo != null\n ),\n faceValueCost: posChangedField(partialPurchaseOrder.faceValue),\n isFaceValueCost: posChangedField(partialPurchaseOrder.faceValue != null),\n } as unknown as TicketGroupInput;\n }\n\n return {\n id: newBigIntId(),\n vendorOrderId: posChangedField(partialPurchaseOrder.orderId),\n purchaseDate: posChangedField(\n partialPurchaseOrder.purchaseOrderDate ?? new Date().toISOString()\n ),\n buyerUserId: posChangedField(accountUserId),\n vendorAccount: posChangedField(partialPurchaseOrder.vendorAccount),\n vendor: posChangedField(partialPurchaseOrder.vendor),\n currencyCode: posChangedField(accountCurrencyCode),\n ticketGroupIntentions: {},\n ticketGroupFromPartialPurchaseOrder: ticketGroup,\n eventSearchTextFromPartialPurchaseOrder: eventSearchText,\n deal: null,\n } as PurchaseOrderDetailsInput;\n};\n\nexport const getPurchaseOrderDeepLinkUrl = (deepLinkId?: string | number) => {\n return getFullUrl(\n MainRoute.Purchases,\n PurchaseDeeplinkQueryParam,\n deepLinkId\n );\n};\n\nexport const getPurchaseOrderRelativeUrl = (\n deepLinkId?: string | number,\n viagVirtualId?: string\n) => {\n let navigateUrl = `${getPathFromMainRoute(\n MainRoute.Purchases\n )}?${PurchaseDeeplinkQueryParam}=${deepLinkId}`;\n\n if (deepLinkId === 0 && viagVirtualId) {\n // We only honor eventQueryId if the ID is 0 (which is for adding a new Purchase)\n navigateUrl += `&${EventIdQueryParam}=${viagVirtualId}`;\n }\n\n return navigateUrl;\n};\n\nexport const getPurchaseOrderDetailsModalConfigWithDeepLink = (\n deepLinkId?: string | number\n): ModalProps => {\n return {\n ...PurchaseWizardModalConfig,\n deepLinkValue: deepLinkId,\n };\n};\n\nexport const validateEventSelection = (\n clearErrors: UseFormClearErrors<\n Partial<{ ticketGroups: TicketGroupInput[] | null }>\n >,\n setError: UseFormSetError<\n Partial<{ ticketGroups: TicketGroupInput[] | null }>\n >,\n ticketGroups: TicketGroupInput[] | null,\n requiredMsg: string\n) => {\n clearErrors('ticketGroups');\n if (!ticketGroups?.length) {\n setError('ticketGroups', { message: requiredMsg });\n return false;\n }\n\n return true;\n};\n\nexport const validateVendorInfo = (\n purchaseId: number,\n clearErrors: UseFormClearErrors,\n purchaseDate: PosFieldOfNullableDateTime | null,\n requiredMsg: string,\n orderIdUsedErrorMsg: string,\n setError: UseFormSetError,\n vendor: PosFieldOfPurchaseVendor | null,\n vendorAccount: PosFieldOfPurchaseVendorAccount | null,\n vendorOrderId: PosFieldOfString | null,\n purchasingIdsInUseResult: PurchasingIdInUseResultType | null | undefined\n) => {\n let hasErrors = false;\n\n clearErrors('vendor');\n clearErrors('vendorAccount');\n clearErrors('secondaryVendorAccount');\n clearErrors('vendorOrderId');\n clearErrors('purchaseDate');\n\n if (\n !vendor?.value ||\n !vendorAccount?.value ||\n !vendorOrderId?.value ||\n !purchaseDate?.value\n ) {\n !purchaseDate?.value &&\n setError('purchaseDate', { message: requiredMsg }, { shouldFocus: true });\n\n !vendorOrderId?.value &&\n setError(\n 'vendorOrderId', // for this we use register so we put error on the value\n { message: requiredMsg },\n { shouldFocus: true }\n );\n\n !vendorAccount?.value &&\n setError(\n 'vendorAccount',\n { message: requiredMsg },\n { shouldFocus: true }\n );\n\n !vendor?.value &&\n setError('vendor', { message: requiredMsg }, { shouldFocus: true });\n\n hasErrors = true;\n }\n\n // Only validate OrderId when we're having new purchase\n if (\n purchaseId < 0 &&\n purchasingIdsInUseResult ===\n PurchasingIdInUseResultType.SameOrderIdAndVendorId\n ) {\n setError(\n 'vendorOrderId',\n { message: orderIdUsedErrorMsg },\n { shouldFocus: true }\n );\n hasErrors = true;\n }\n\n return !hasErrors;\n};\n\nexport const validateTicketGroup = (\n clearErrors: UseFormClearErrors<\n Partial<{ ticketGroups: TicketGroupInput[] | null }>\n >,\n setError: UseFormSetError<\n Partial<{ ticketGroups: TicketGroupInput[] | null }>\n >,\n curTicketGroup: TicketGroupInput,\n index: number,\n requiredMsg: string,\n duplicateSeatMsg: string,\n inhandDateMustBeforeEventDateMsg: string,\n autoBroadcastRequireFaceValueMsg: string,\n isMultiTgTableFeature?: boolean\n) => {\n // Validate the current ticket-group first\n const errors = [];\n\n const { event } = curTicketGroup;\n\n const isNewTicketGroup = curTicketGroup.ticketGroupId < 0;\n\n clearErrors(`ticketGroups.${index}`);\n clearErrors(`ticketGroups.${index}.deliveryType`);\n clearErrors(`ticketGroups.${index}.unitCost`);\n clearErrors(`ticketGroups.${index}.currencyCode`);\n clearErrors(`ticketGroups.${index}.numberOfTickets`);\n clearErrors(`ticketGroups.${index}.inHandDate`);\n clearErrors(`ticketGroups.${index}.faceValueCost`);\n\n if (\n (curTicketGroup.deliveryType?.hasChanged || isNewTicketGroup) &&\n !curTicketGroup.deliveryType?.value\n ) {\n errors.push('Delivery Type: ' + requiredMsg); // TODO - how to get content-id here\n setError(\n `ticketGroups.${index}.deliveryType`,\n {\n message: requiredMsg,\n },\n { shouldFocus: true }\n );\n }\n\n if (\n (curTicketGroup.unitCost?.hasChanged || isNewTicketGroup) &&\n !Number.isFinite(curTicketGroup.unitCost?.value)\n ) {\n errors.push('Unit Cost: ' + requiredMsg);\n setError(\n `ticketGroups.${index}.unitCost`,\n {\n message: requiredMsg,\n },\n { shouldFocus: true }\n );\n }\n\n if (\n (curTicketGroup.currencyCode?.hasChanged || isNewTicketGroup) &&\n !curTicketGroup.currencyCode?.value\n ) {\n errors.push('Currency Code: ' + requiredMsg);\n setError(\n `ticketGroups.${index}.currencyCode`,\n {\n message: requiredMsg,\n },\n { shouldFocus: true }\n );\n }\n\n if (\n (curTicketGroup.numberOfTickets?.hasChanged || isNewTicketGroup) &&\n !curTicketGroup.numberOfTickets?.value\n ) {\n errors.push('Quantity: ' + requiredMsg);\n setError(\n `ticketGroups.${index}.numberOfTickets`,\n {\n message: requiredMsg,\n },\n { shouldFocus: true }\n );\n } else {\n const uniqueSeats: Record = {};\n let ticketsWithSeats = 0;\n curTicketGroup.tickets?.value?.forEach((t, ti) => {\n if (t.seat) {\n ticketsWithSeats++;\n clearErrors(`ticketGroups.${index}.tickets.value.${ti}.seat`);\n\n if (uniqueSeats[t.seat] >= 0) {\n errors.push(`${t.seat}: ${duplicateSeatMsg}`);\n setError(\n `ticketGroups.${index}.tickets.value.${ti}.seat`,\n {\n message: duplicateSeatMsg,\n },\n { shouldFocus: true }\n );\n } else {\n uniqueSeats[t.seat] = ti;\n }\n }\n });\n\n if (curTicketGroup.allocateSeats || isMultiTgTableFeature) {\n if (\n (curTicketGroup.row?.hasChanged || isNewTicketGroup) &&\n !curTicketGroup.row?.value\n ) {\n errors.push(`Row: ${requiredMsg}`);\n setError(\n `ticketGroups.${index}.row`,\n {\n message: requiredMsg,\n },\n { shouldFocus: true }\n );\n }\n\n if (\n (curTicketGroup.tickets?.hasChanged || isNewTicketGroup) &&\n ticketsWithSeats > 0 && // If any ticket has seat, then total number needs to match ticket-count\n ticketsWithSeats !== curTicketGroup.numberOfTickets?.value\n ) {\n curTicketGroup.tickets?.value?.forEach((t, ti) => {\n if (!t.seat) {\n errors.push(`Seats: ${requiredMsg}`);\n setError(\n `ticketGroups.${index}.tickets.value.${ti}.seat`,\n {\n message: requiredMsg,\n },\n { shouldFocus: true }\n );\n }\n });\n }\n }\n }\n\n if (\n (curTicketGroup.section?.hasChanged || isNewTicketGroup) &&\n !curTicketGroup.section?.value\n ) {\n errors.push(`Section: ${requiredMsg}`);\n setError(\n `ticketGroups.${index}.section`,\n {\n message: requiredMsg,\n },\n { shouldFocus: true }\n );\n }\n\n if (\n (curTicketGroup.inHandDate?.hasChanged || isNewTicketGroup) &&\n !curTicketGroup.inHandDate?.value\n ) {\n errors.push(`In-Hand Date: ${requiredMsg}`);\n setError(\n `ticketGroups.${index}.inHandDate`,\n {\n message: requiredMsg,\n },\n { shouldFocus: true }\n );\n } else if (\n curTicketGroup.inHandDate?.hasChanged &&\n new Date(curTicketGroup.inHandDate!.value!) >= new Date(event!.dates.start!)\n ) {\n errors.push(`In-Hand Date: ${inhandDateMustBeforeEventDateMsg}`);\n setError(\n `ticketGroups.${index}.inHandDate`,\n {\n message: inhandDateMustBeforeEventDateMsg,\n },\n { shouldFocus: true }\n );\n }\n\n if (curTicketGroup.faceValueCost?.hasChanged) {\n if (!Number.isFinite(curTicketGroup.faceValueCost.value)) {\n errors.push(`Face Value: ${autoBroadcastRequireFaceValueMsg}`);\n setError(\n `ticketGroups.${index}.faceValueCost`,\n {\n message: autoBroadcastRequireFaceValueMsg,\n },\n { shouldFocus: true }\n );\n }\n }\n return errors;\n};\n\nexport const validateTicketGroups = (\n isAtSingleTicketGroupInputLevel: boolean,\n clearErrors: UseFormClearErrors<\n Partial<{ ticketGroups: TicketGroupInput[] | null }>\n >,\n setError: UseFormSetError<\n Partial<{ ticketGroups: TicketGroupInput[] | null }>\n >,\n ticketGroups: TicketGroupInput[],\n requiredMsg: string,\n duplicateSeatMsg: string,\n inhandDateMustBeforeEventDateMsg: string,\n autoBroadcastRequireFaceValueMsg: string,\n isMultiTgTableFeature?: boolean\n) => {\n let isValid = true;\n const seatingByEvents = {} as Record>;\n ticketGroups.forEach((tg, i) => {\n if (tg.tickets?.hasChanged && tg.tickets.value) {\n const eventKey = tg.event?.viagVirtualId ?? tg.viagogoVirtualId;\n const curEvent = seatingByEvents[eventKey];\n if (!curEvent) {\n seatingByEvents[eventKey] = tg.tickets.value\n .filter((t) => t.seat)\n .reduce(\n (r, t) => {\n r[`${tg.section?.value}|${tg.row?.value}|${t.seat}`] = t.id;\n return r;\n },\n {} as Record\n );\n } else {\n tg.tickets.value.forEach((t, ti) => {\n if (t.seat) {\n const newSeat = `${tg.section?.value}|${tg.row?.value}|${t.seat}`;\n if (curEvent[newSeat] >= 0) {\n isValid = false;\n if (isMultiTgTableFeature) {\n setError(\n `ticketGroups.${i}.tickets`,\n {\n message: `${duplicateSeatMsg}: ${tg.section?.value} Row ${tg.row?.value} Seat ${t.seat}`,\n },\n { shouldFocus: true }\n );\n } else {\n setError(\n `ticketGroups.${i}.tickets.value.${ti}.seat`,\n {\n message: `${duplicateSeatMsg}: ${tg.section?.value} Row ${tg.row?.value} Seat ${t.seat}`,\n },\n { shouldFocus: true }\n );\n }\n }\n // Add seat to array\n curEvent[newSeat] = t.id;\n }\n });\n }\n }\n });\n\n if (isMultiTgTableFeature && isValid) {\n let isValidTicketGroups = true;\n ticketGroups.forEach((tg, i) => {\n const errors = validateTicketGroup(\n clearErrors,\n setError,\n tg,\n i,\n requiredMsg,\n duplicateSeatMsg,\n inhandDateMustBeforeEventDateMsg,\n autoBroadcastRequireFaceValueMsg,\n isMultiTgTableFeature\n );\n if (errors.length) {\n if (!isAtSingleTicketGroupInputLevel) {\n setError(\n `ticketGroups.${i}`,\n {\n message: errors.join(' | '),\n },\n { shouldFocus: true }\n );\n }\n isValidTicketGroups = false;\n }\n });\n\n return isValidTicketGroups;\n }\n\n return (\n isValid &&\n ticketGroups.every((tg, i) => {\n const errors = validateTicketGroup(\n clearErrors,\n setError,\n tg,\n i,\n requiredMsg,\n duplicateSeatMsg,\n inhandDateMustBeforeEventDateMsg,\n autoBroadcastRequireFaceValueMsg\n );\n if (errors.length) {\n if (!isAtSingleTicketGroupInputLevel) {\n // Only report at the ticketGroups (collection) if not at single-ticket-group level\n setError(\n `ticketGroups.${i}`,\n {\n message: errors.join(' | '),\n },\n { shouldFocus: true }\n );\n }\n return false; // invalid\n }\n\n return true; // valid\n })\n );\n};\n\nconst CombinedTicketGroupSeparator = '|';\n\nexport const isCancelledState = (poState?: PurchaseOrderState | null) =>\n poState === PurchaseOrderState.Cancelled ||\n poState === PurchaseOrderState.Void;\n\n/**\n * Removes all TicketGroupContext data except\n * for the ticketGroupId and set it in the URL\n * @param queryParamName\n */\nexport const cleanTicketGroupContextFromDeepLink = (queryParamName: string) => {\n const deepLinkValue = getDeepLinkIdFromUrl(\n queryParamName,\n window.location.href\n );\n const ticketGroup = splitOutTicketGroupId(deepLinkValue);\n const { id: purchaseId, ticketGroupId } = ticketGroup;\n const ticketGroupEditContext: Partial = {\n ticketGroupId,\n };\n\n if (!purchaseId) {\n return;\n }\n\n addDeepLinkUrlPart(\n queryParamName,\n combineWithTicketGroupId(purchaseId, ticketGroupEditContext)\n );\n};\n\ntype SplitOutTicketGroupIdReturnType = {\n id: number | string;\n ticketGroupId: number | undefined;\n ticketGroupEditReason: TicketGroupEditReason | undefined;\n ticketGroupEditContext: Partial;\n};\n\nexport const splitOutTicketGroupId = (\n purchaseIdDeepLinkValue: string\n): SplitOutTicketGroupIdReturnType => {\n let id: number | string = purchaseIdDeepLinkValue;\n let ticketGroupId: number | undefined = undefined;\n let ticketGroupEditReason: TicketGroupEditReason | undefined = undefined;\n let ticketGroupEditContext: Partial = {};\n\n const ticketGroupSeparatorIndex = purchaseIdDeepLinkValue.indexOf(\n CombinedTicketGroupSeparator\n );\n if (ticketGroupSeparatorIndex > 0) {\n id = purchaseIdDeepLinkValue.substring(0, ticketGroupSeparatorIndex);\n try {\n const dataStr = purchaseIdDeepLinkValue.substring(\n String(id).length + CombinedTicketGroupSeparator.length\n );\n ticketGroupEditContext = JSON.parse(\n dataStr\n ) as Partial;\n ticketGroupId = ticketGroupEditContext.ticketGroupId ?? undefined;\n ticketGroupEditReason = ticketGroupEditContext?.editIntention;\n } catch (e) {\n console.error(e);\n try {\n Sentry.captureException(e);\n } catch (err) {\n console.warn('Sentry log request failed', err);\n }\n }\n } else {\n const indexOfTgBracket = id.indexOf('[');\n const indexOfTgBracketEnd = id.indexOf(']');\n\n if (indexOfTgBracket > 0 && indexOfTgBracketEnd > 0) {\n id = purchaseIdDeepLinkValue.substring(0, indexOfTgBracket);\n const ticketGroupIdStr = purchaseIdDeepLinkValue.substring(\n indexOfTgBracket + 1,\n indexOfTgBracketEnd\n );\n\n const n = parseInt(ticketGroupIdStr);\n if (!Number.isNaN(n)) {\n ticketGroupId = n;\n }\n }\n }\n\n return { id, ticketGroupId, ticketGroupEditReason, ticketGroupEditContext };\n};\n\nexport const combineWithTicketGroupIdSimple = (\n purchaseId: number | string,\n ticketGroupId?: number | null\n) => {\n return purchaseId + (ticketGroupId ? '[' + ticketGroupId + ']' : '');\n};\n\nexport const combineWithTicketGroupId = (\n purchaseId: number | string,\n ticketGroupEditContext?: Partial\n) => {\n return `${purchaseId}${CombinedTicketGroupSeparator}${JSON.stringify(\n ticketGroupEditContext || {}\n )}`;\n};\n\nexport const filterPurchaseOrderTicketGroupsByEventId = (\n tgs: TicketGroup[],\n allEventIds:\n | {\n viagVirtualId: string;\n performerId: number | null;\n venueId: number;\n }[]\n | undefined\n) => {\n tgs = tgs.filter((tg) => {\n return (\n allEventIds?.find((e) => e.viagVirtualId === tg.viagVirtualId) != null\n );\n });\n\n return tgs;\n};\n\nexport const createPurchaseEventPageUrl = (\n eventId: string,\n queryParamsToRemove?: string[] // queryParams to remove from final URL\n): string => {\n let searchParams = '';\n const url = new URL(window.location.href);\n url.searchParams.set(EventIdQueryParam, eventId);\n (queryParamsToRemove ?? []).forEach((param) =>\n url.searchParams.delete(param)\n );\n searchParams = `?${removeFilters(url.searchParams.toString(), [\n 'searchText',\n ])}`;\n return `/purchases/event${searchParams}`;\n};\n\nexport const getCatalogData = async (\n client: CatalogClient,\n filterQuery: PurchaseOrderQuery,\n includeCounts: boolean\n) => {\n return await client.getCatalogForPurchaseOrders(filterQuery, includeCounts);\n};\n\nexport const PURCHASE_USER_SETTINGS = [\n UserSetting.PurchaseColumnEditability,\n UserSetting.PurchaseColumnNumberPrecision,\n UserSetting.PurchaseColumnOrder,\n UserSetting.PurchaseColumnsEnabled,\n UserSetting.PurchaseCustomColumns,\n UserSetting.QuickFiltersStatePurchases,\n UserSetting.PurchaseColumnWidths,\n UserSetting.PurchasePageViewMode,\n UserSetting.PurchaseEventColumnOrder,\n UserSetting.PurchaseEventColumnsEnabled,\n UserSetting.PurchaseEventColumnEditability,\n UserSetting.PurchaseEventColumnNumberPrecision,\n UserSetting.PurchaseEventColumnWidths,\n UserSetting.PurchasesDefaultTab,\n];\n\nexport const purchaseQueryValueTransformToUrl = (\n key: string,\n value: DateTimeRange\n) => {\n if (!value) {\n return value;\n }\n\n const queryKey = key as keyof PurchaseOrderQuery;\n\n if (queryKey === 'purchaseDates') {\n const preset = getPresetFromUiDateTimeRange(value);\n if (preset && PurchaseDateRangePresetNames.includes(preset.name)) {\n return preset.name;\n }\n } else if (queryKey === 'paymentDates') {\n const preset = getPresetFromUiDateTimeRange(value);\n if (preset && StandardDateRangePresetNames.includes(preset.name)) {\n return preset.name;\n }\n }\n\n return value;\n};\n\nexport const purchaseQueryValueTransformFromUrl = (\n key: string,\n value: string\n) => {\n if (!value) {\n return value;\n }\n\n const queryKey = key as keyof PurchaseOrderQuery;\n if (queryKey === 'purchaseDates') {\n const preset = getUiDateTimeRangeFromPreset(\n value,\n PurchaseDateRangePresetNames\n );\n if (preset) {\n return preset;\n }\n } else if (queryKey === 'paymentDates') {\n const preset = getUiDateTimeRangeFromPreset(\n value,\n StandardDateRangePresetNames\n );\n if (preset) {\n return preset;\n }\n }\n\n return value;\n};\n\nexport const getCatalogDataExpanded = async (\n viagogoVirtualIds: string[],\n filterQuery: PurchaseOrderQuery,\n {\n activeAccountWebClientConfig,\n onError,\n }: {\n activeAccountWebClientConfig: PosClientConfig;\n onError?: (error: ErrorTypes) => void;\n }\n) => {\n const result = await tryInvokeApi(async () => {\n const allTicketGroups = await new PurchaseClient(\n activeAccountWebClientConfig\n ).getTicketGroupsForEvents({\n ...filterQuery,\n // Is is to support the legacy event ID urls\n oldPosEventIds: viagogoVirtualIds\n .filter((id) => id.startsWith('old:'))\n .map((id) => id.substring(4)),\n eventOrMappingIds: viagogoVirtualIds.filter(\n (id) => !id.startsWith('old:')\n ),\n });\n\n const emptyResults = viagogoVirtualIds.reduce((results, id) => {\n results[id] = {\n sales: null,\n listings: null,\n ticketGroups: null,\n failedToRetrieveData: false,\n };\n return results;\n }, {} as ExpandedEventData);\n\n return Promise.resolve(\n Object.entries(allTicketGroups).reduce((results, [id, ticketGroups]) => {\n results[id] = {\n sales: null,\n listings: null,\n ticketGroups: ticketGroups,\n failedToRetrieveData: false,\n };\n return results;\n }, emptyResults)\n );\n }, onError);\n\n if (result) {\n return Promise.resolve(result);\n }\n\n return Promise.resolve(\n viagogoVirtualIds.reduce((results, id) => {\n results[id] = {\n failedToRetrieveData: true,\n sales: null,\n listings: null,\n ticketGroups: null,\n };\n return results;\n }, {} as ExpandedEventData)\n );\n};\n\nexport const getCatalogMetrics = (\n client: CatalogClient,\n filterQuery: PurchaseOrderQuery,\n rowVersion?: number | null,\n hasMetricsV2Feature?: boolean\n) => {\n return hasMetricsV2Feature\n ? client.getCatalogMetricsForTicketGroups(filterQuery, rowVersion)\n : client.getCatalogTicketGroupMetrics(filterQuery);\n};\n","import { format } from 'date-fns';\nimport { STUBHUB_LOGO_IMAGE } from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n ACTION_OUTBOX_ENTITY_TYPE_TO_CID,\n NOTIFICATION_TYPE_TO_CID,\n} from 'src/utils/constants/contentIdMaps';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { getFormattedEventName } from 'src/utils/eventWithDataUtils';\nimport { getFormattedLocation } from 'src/utils/format';\nimport { getListingDetailsDeepLinkUrl } from 'src/utils/inventoryUtils';\nimport { getLocaleFromLanguageOrCurrent } from 'src/utils/localeUtils';\nimport { getPurchaseOrderDeepLinkUrl } from 'src/utils/purchaseUtils';\nimport { getSaleDetailsDeepLinkUrl } from 'src/utils/saleUtils';\nimport {\n ActionOutboxEntityType,\n Marketplace,\n Notification,\n} from 'src/WebApiController';\n\nconst getUrl = (\n entityType: ActionOutboxEntityType,\n entityId: number\n): URL | null | undefined => {\n switch (entityType) {\n case ActionOutboxEntityType.Sale:\n return getSaleDetailsDeepLinkUrl(entityId);\n\n case ActionOutboxEntityType.Listing:\n return getListingDetailsDeepLinkUrl(entityId);\n\n case ActionOutboxEntityType.Purchase:\n return getPurchaseOrderDeepLinkUrl(entityId);\n\n case ActionOutboxEntityType.SellerSupportCase:\n return new URL(\n 'http://add-deep-link-to-support-case-view-when-its-created'\n );\n\n case ActionOutboxEntityType.Document:\n case ActionOutboxEntityType.SellerEvent:\n case ActionOutboxEntityType.InboundEmail:\n return null;\n }\n};\n\nconst buildMessage = (\n notification: Notification,\n resolveContent: (\n contentId: ContentId | FormatContentId,\n marketplace: Marketplace | null\n ) => string | string[] | undefined\n): string => {\n const locale = getLocaleFromLanguageOrCurrent();\n let result = `${resolveContent(\n ACTION_OUTBOX_ENTITY_TYPE_TO_CID[notification.entityType],\n notification.marketplace\n )} #${notification.entityId} \\n`;\n\n if (notification.event) {\n result += `${getFormattedEventName({\n event: notification.event,\n performer: notification.performer,\n }).join(' ')}\\n`;\n\n const startDate =\n notification.event?.dates.start == null\n ? null\n : new Date(notification.event?.dates.start);\n\n if (startDate) {\n const eventDate = `${format(startDate, 'MMM d, yyyy', {\n locale,\n })} - ${format(startDate, 'h:mm a', { locale })}`;\n\n result += `${eventDate}\\n`;\n }\n }\n\n if (notification.venue) {\n result += `${resolveContent(\n ContentId.VenueName,\n null\n )}: ${getFormattedLocation(notification.venue)}\\n`;\n }\n\n return result;\n};\n\nexport const fireNativeNotification = (\n notification: Notification,\n resolveContent: (\n contentId: ContentId | FormatContentId,\n marketplace: Marketplace | null\n ) => string | string[] | undefined\n) => {\n window.Notification.requestPermission().then((permission) => {\n if (permission === 'granted') {\n const notif = new window.Notification(\n resolveContent(\n NOTIFICATION_TYPE_TO_CID[notification.notificationType],\n notification.marketplace\n )?.toString() ?? '',\n {\n body: buildMessage(notification, resolveContent),\n icon: STUBHUB_LOGO_IMAGE,\n }\n );\n notif.onclick = () => {\n const url = getUrl(notification.entityType, notification.entityId);\n if (url) {\n window.open(url)?.focus();\n }\n };\n }\n });\n};\n","import * as signalR from '@microsoft/signalr';\nimport { ILogger, LogLevel } from '@microsoft/signalr';\nimport * as Sentry from '@sentry/react';\nimport { useQuery } from '@tanstack/react-query';\nimport { debounce, isEmpty } from 'lodash-es';\nimport React, {\n Dispatch,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { useSet } from 'react-use';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ContentIds } from 'src/utils/constants/contentIdDataMap';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { FormatContentIds } from 'src/utils/constants/formatContentIdDataMap';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n Feature,\n Marketplace,\n Notification,\n NotificationClient,\n NotificationState,\n NotificationType,\n Permission,\n} from 'src/WebApiController';\n\nimport { useAppContext } from '../AppContext';\nimport { isContentId, useContentContext } from '../ContentContext';\nimport { fireNativeNotification } from './NativeNotification';\n\nexport class SignalRLogger implements ILogger {\n log(logLevel: LogLevel, message: string) {\n if (logLevel <= LogLevel.Debug) {\n return;\n }\n if (logLevel <= LogLevel.Information) {\n console.debug(message);\n } else if (logLevel <= LogLevel.Warning) {\n console.warn(message);\n } else if (logLevel <= LogLevel.Critical) {\n console.error(message);\n }\n }\n}\n\nexport type NotificationFilter = {\n type?: Set;\n};\n\ntype INotificationsContext = {\n notifications: Notification[];\n notificationsIsLoading: boolean;\n notificationsIsInitialLoading: boolean;\n dismissNotification: (notificationId: number) => Promise;\n setNotificationFilter: Dispatch;\n /**\n * Whether a filter is set, but there are no results for the filter.\n */\n noResultsForNotificationFilter: boolean;\n};\n\nexport const NotificationsContext = React.createContext({\n notifications: [],\n notificationsIsLoading: false,\n notificationsIsInitialLoading: false,\n dismissNotification: async () => {},\n setNotificationFilter: () => {},\n noResultsForNotificationFilter: false,\n});\n\nexport const useNotificationsContext = () => useContext(NotificationsContext);\n\nexport const NotificationsContextProvider = ({\n loadActiveNotifications,\n children,\n}: {\n loadActiveNotifications?: boolean;\n children: React.ReactNode;\n}) => {\n const hasActiveNotificationsFeature = useUserHasFeature(\n Feature.HomePageNotifications\n );\n const canViewNotifications = useUserHasAnyOfPermissions(\n Permission.General_ViewNotifications\n );\n\n loadActiveNotifications =\n loadActiveNotifications &&\n hasActiveNotificationsFeature &&\n canViewNotifications;\n\n const { trackError } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const { contentResolver, formattedContentResolver } = useContentContext();\n\n const hubConnection = useRef();\n const [dismissedNotifications, { add: addDismissedNotification }] =\n useSet();\n\n const [notificationFilter, setNotificationFilter] =\n useState();\n\n const resolveContent = useCallback(\n (\n contentId: ContentId | FormatContentId,\n marketplace: Marketplace | null\n ): string | string[] | undefined => {\n return isContentId(contentId)\n ? contentResolver({ ...ContentIds[contentId] })\n : (formattedContentResolver(\n FormatContentIds[contentId].id,\n [marketplace ?? ''],\n FormatContentIds[contentId].defaultValue\n ) as string);\n },\n [contentResolver, formattedContentResolver]\n );\n\n const getActiveNotificationsQuery = useQuery({\n queryKey: [\n 'NotificationsClient.getActiveNotifications',\n activeAccountWebClientConfig.activeAccountId,\n loadActiveNotifications,\n ],\n queryFn: () => {\n if (\n activeAccountWebClientConfig.activeAccountId == null ||\n !loadActiveNotifications\n ) {\n return null;\n }\n return new NotificationClient(\n activeAccountWebClientConfig\n ).getActiveNotifications();\n },\n enabled:\n activeAccountWebClientConfig.activeAccountId != null &&\n loadActiveNotifications,\n staleTime: 0,\n gcTime: 0,\n refetchOnWindowFocus: false,\n meta: {\n persist: false, // we do not want this thing cached\n onError: (error: ErrorTypes) => {\n trackError('NotificationsClient.getActiveNotifications', error);\n },\n },\n });\n\n const undismissedNotifications = useMemo(() => {\n if (!getActiveNotificationsQuery.data) {\n return [];\n }\n return getActiveNotificationsQuery.data\n .filter((n) => !dismissedNotifications.has(n.notificationId))\n .toSorted((a, b) => b.createDateTime.localeCompare(a.createDateTime));\n }, [dismissedNotifications, getActiveNotificationsQuery.data]);\n\n const filteredNotifications = useMemo(() => {\n return undismissedNotifications.filter((n) => {\n if (\n notificationFilter?.type &&\n !notificationFilter.type.has(n.notificationType)\n ) {\n return false;\n }\n return true;\n });\n }, [undismissedNotifications, notificationFilter]);\n\n const getNotificationById = useCallback(\n async (notificationId: number): Promise => {\n if (!activeAccountWebClientConfig.activeAccountId) {\n return null;\n }\n return tryInvokeApi(\n async () => {\n return new NotificationClient(\n activeAccountWebClientConfig\n ).getNotification(notificationId);\n },\n (error: ErrorTypes) => {\n trackError('NotificationClient.getNotificationById', error, {\n notificationId,\n });\n }\n );\n },\n [activeAccountWebClientConfig, trackError]\n );\n\n const getNotificationsQueryDebounced = debounce(\n getActiveNotificationsQuery.refetch,\n 2000\n );\n\n useEffect(() => {\n if (!hubConnection.current) {\n hubConnection.current = new signalR.HubConnectionBuilder()\n .withUrl('/hubs/notification')\n .withAutomaticReconnect()\n .configureLogging(new SignalRLogger())\n .build();\n\n hubConnection.current.on('new', async (message) => {\n try {\n const messageList = JSON.parse(message);\n for (const m of messageList) {\n console.debug(\n 'notificationcontext - got new notification',\n m,\n hubConnection\n );\n const notification = await getNotificationById(m.NotificationId);\n // TODO (POS-3544): Dismiss notification depending on NotificationState\n notification &&\n notification.notificationState == NotificationState.Active &&\n fireNativeNotification(notification, resolveContent);\n }\n await getNotificationsQueryDebounced();\n } catch (e) {\n console.error(\n 'notificationcontext - malformed SignalR Message: ' + message\n );\n try {\n Sentry.captureException(e);\n } catch (err) {\n console.warn('Sentry log request failed', err);\n }\n }\n });\n\n hubConnection.current.start().catch(console.error);\n\n console.debug(\n 'Creating new Notification connection with id: ' +\n hubConnection.current.connectionId\n );\n }\n\n // Close the connection before unmount\n return () => {\n if (\n hubConnection.current &&\n hubConnection.current.state === signalR.HubConnectionState.Connected\n ) {\n console.debug(\n 'Stopping Notification connection with id: ' +\n hubConnection.current.connectionId\n );\n hubConnection.current.stop();\n hubConnection.current = undefined;\n }\n };\n }, [getNotificationById, getNotificationsQueryDebounced, resolveContent]);\n\n const dismissNotification = useCallback(\n async (notificationId: number) => {\n await tryInvokeApi(\n async () => {\n addDismissedNotification(notificationId);\n await new NotificationClient(\n activeAccountWebClientConfig\n ).dismissNotification(notificationId);\n await getNotificationsQueryDebounced();\n },\n (error: ErrorTypes) => {\n trackError('NotificationClient.dismissNotification', error, {\n notificationId,\n });\n }\n );\n },\n [\n activeAccountWebClientConfig,\n addDismissedNotification,\n getNotificationsQueryDebounced,\n trackError,\n ]\n );\n\n return (\n \n {children}\n \n );\n};\n","import signalR, {\n HubConnection,\n HubConnectionBuilder,\n HubConnectionState,\n} from '@microsoft/signalr';\nimport { isEqual } from 'lodash-es';\nimport {\n createContext,\n ReactNode,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport {\n ActionOutboxEntityType,\n BulkActionType,\n BulkEditPreview,\n BulkEditPreviewWithDetails,\n BulkEditProgress,\n BulkEditStep,\n} from 'src/WebApiController';\n\nimport { useAppContext } from '../AppContext';\nimport { SignalRLogger } from '../NotificationsContext';\n\nexport enum BulkEditStage {\n Idle,\n GettingPreview,\n Preview,\n Execute,\n Done,\n}\n\nexport type BulkEditJob = {\n entityType: ActionOutboxEntityType;\n action: BulkActionType;\n updateKey: string;\n onBulkEditDone?: (\n progress: BulkEditProgress,\n errors: string[]\n ) => Promise;\n};\n\nexport type IBulkEditHubContext = {\n bulkEditHub?: HubConnection;\n progress?: BulkEditProgress;\n setProgress: React.Dispatch<\n React.SetStateAction\n >;\n errors: string[];\n setErrors: React.Dispatch>;\n warnings: string[];\n setWarnings: React.Dispatch>;\n mainDialogOpened: boolean;\n setMainDialogOpened: React.Dispatch>;\n stage: BulkEditStage;\n setStage: (stage: BulkEditStage) => void;\n preview?: BulkEditPreviewWithDetails;\n setPreview: (preview: BulkEditPreviewWithDetails | undefined) => void;\n setCurJob: (job: BulkEditJob | undefined) => void;\n /**\n * Retryable entities are entities that are changed during the time between preview and actual action\n */\n retryableEntities?: BulkEditPreview;\n /**\n * Snapshot of the progress before retrying\n */\n progressBeforeRetry?: BulkEditProgress;\n clearRetryStates: () => void;\n onRetryCancel: () => void;\n};\n\nexport const BulkEditHubContext = createContext({\n bulkEditHub: undefined,\n progress: undefined,\n setProgress: () => {},\n errors: [],\n setErrors: () => {},\n warnings: [],\n setWarnings: () => {},\n mainDialogOpened: false,\n setMainDialogOpened: () => {},\n stage: BulkEditStage.Idle,\n setStage: () => {},\n preview: undefined,\n setPreview: () => {},\n setCurJob: () => {},\n retryableEntities: undefined,\n progressBeforeRetry: undefined,\n clearRetryStates: () => {},\n onRetryCancel: () => {},\n});\n\nexport const useBulkEditHubContext = () => useContext(BulkEditHubContext);\n\n/**\n * Needs to be in sync with the method in C#\n * GetMethodName in BackgroundActionService.cs\n */\nexport const getBulkEditMethodName = (\n entityType?: ActionOutboxEntityType,\n bulkEditAction?: BulkActionType\n) => {\n if (!entityType || !bulkEditAction) {\n return undefined;\n }\n\n return `${entityType}-${bulkEditAction}`;\n};\n\nexport function BulkEditHubContextProvider({\n children,\n}: {\n children: ReactNode;\n}) {\n const { activeAccountWebClientConfig } = useAppContext();\n const [hubConnection, setHubConnection] = useState();\n\n const [curJob, setCurJob] = useState();\n const method = useMemo(\n () => getBulkEditMethodName(curJob?.entityType, curJob?.action),\n [curJob?.action, curJob?.entityType]\n );\n\n const [progress, setProgress] = useState();\n\n const [progressBeforeRetry, setProgressBeforeRetry] =\n useState();\n const [errorsBeforeRetry, setErrorsBeforeRetry] = useState([]);\n const [retryableEntities, setRetryableEntities] = useState();\n\n const [errors, setErrors] = useState([]);\n const [warnings, setWarnings] = useState([]);\n const [mainDialogOpened, setMainDialogOpened] = useState(false);\n\n const [stage, setStage] = useState(BulkEditStage.Idle);\n const [preview, setPreview] = useState<\n BulkEditPreviewWithDetails | undefined\n >(undefined);\n\n useEffect(() => {\n // Only attempt to connect to signal R when there is a login\n if (activeAccountWebClientConfig.activeAccountId) {\n if (\n !hubConnection ||\n hubConnection.state === HubConnectionState.Disconnected ||\n hubConnection.state === HubConnectionState.Disconnecting\n ) {\n const newHubConnection = new HubConnectionBuilder()\n .withUrl('/hubs/bulkEdit')\n .withAutomaticReconnect()\n .configureLogging(new SignalRLogger())\n .build();\n\n setHubConnection(newHubConnection);\n\n newHubConnection\n .start()\n .then(() => {\n console.debug(\n `BulkEditHub connection ready with id: ${newHubConnection.connectionId}`\n );\n })\n .catch((err) => {\n console.warn(\n 'BulkEditHub could not be started at this time: ' + err\n );\n });\n\n newHubConnection.onclose((err) => {\n console.debug('BulkEditHub connection closed', err);\n });\n }\n }\n\n return () => {\n if (\n hubConnection &&\n !(\n hubConnection.state === HubConnectionState.Disconnected ||\n hubConnection.state === HubConnectionState.Disconnecting\n )\n ) {\n console.debug(\n `Stopping BulkEditHub connection (state: ${hubConnection.state}) with id: ${hubConnection.connectionId}`\n );\n hubConnection.stop();\n setHubConnection(undefined);\n }\n };\n }, [activeAccountWebClientConfig.activeAccountId, hubConnection]);\n\n const clearRetryStates = useCallback(() => {\n setRetryableEntities(undefined);\n setProgressBeforeRetry(undefined);\n setErrorsBeforeRetry([]);\n }, []);\n\n const updateProgress = useCallback(\n async (newProgress: BulkEditProgress) => {\n if (\n curJob &&\n method &&\n newProgress.updateKey === curJob.updateKey &&\n newProgress.method === method\n ) {\n if (\n !isEqual(newProgress, progress) &&\n (newProgress.step === BulkEditStep.Initializing || // new initialization, overrides the previous done progress\n progress?.step !== BulkEditStep.Done) // no more progress update is allowed when the last received progress is Done\n ) {\n if (newProgress.step === BulkEditStep.Initializing) {\n clearRetryStates();\n }\n\n newProgress =\n newProgress.step !== progress?.step\n ? newProgress // step changed, just take new one\n : {\n // step didn't change, make sure we only take the higher numbers\n ...newProgress,\n // This make sure the counts only increase, never decrease\n successCount: Math.max(\n newProgress.successCount,\n progress?.successCount ?? 0\n ),\n warningCount: Math.max(\n newProgress.warningCount,\n progress?.warningCount ?? 0\n ),\n failureCount: Math.max(\n newProgress.failureCount,\n progress?.failureCount ?? 0\n ),\n totalCount: Math.max(\n newProgress.totalCount,\n progress?.totalCount ?? 0\n ),\n successPercent: Math.max(\n newProgress.successPercent ?? 0,\n progress?.successPercent ?? 0\n ),\n warningPercent: Math.max(\n newProgress.warningPercent ?? 0,\n progress?.warningPercent ?? 0\n ),\n failurePercent: Math.max(\n newProgress.failurePercent ?? 0,\n progress?.failurePercent ?? 0\n ),\n };\n\n // This make sure that if the count is passed the total, considered the bulk-progress done unless forceNotDone is specified\n if (\n newProgress.step === BulkEditStep.InProgress &&\n newProgress.totalCount > 0 &&\n newProgress.successCount +\n newProgress.warningCount +\n newProgress.failureCount >=\n newProgress.totalCount\n ) {\n newProgress.step = BulkEditStep.Done;\n }\n\n // NOTE - this is necessary to call before the \"setProgress\" is called\n // because once the setProgress happens, the bulk edit shows completion\n // but the refresh of data hasn't complete, causing people to report bulk-edit not working\n if (newProgress.step === BulkEditStep.Done) {\n // Ensure that count matches so users don't question wtf is going on\n // Because the Done event can come in before the last count event\n // We only tally up success-count because even if the last message is the error we would have missed it\n newProgress.successCount =\n newProgress.totalCount -\n newProgress.failureCount -\n newProgress.warningCount;\n\n setStage(BulkEditStage.Done);\n await curJob.onBulkEditDone?.(newProgress, errors);\n }\n\n if (newProgress.step === BulkEditStep.DoneWithRetryableEntities) {\n setStage(BulkEditStage.Idle);\n setRetryableEntities(newProgress.retryableEntities ?? undefined);\n setProgressBeforeRetry(newProgress);\n setErrorsBeforeRetry(errors);\n }\n\n setProgress(newProgress);\n\n if (newProgress?.error && !errors.includes(newProgress.error)) {\n setErrors((prev) => {\n return [...prev, newProgress.error!];\n });\n }\n if (newProgress?.warning && !warnings.includes(newProgress.warning)) {\n setWarnings((prev) => {\n return [...prev, newProgress.warning!];\n });\n }\n }\n }\n },\n [curJob, method, progress, errors, warnings, clearRetryStates]\n );\n\n useEffect(() => {\n if (curJob) {\n const handler = (progress: BulkEditProgress) => {\n if (!curJob.updateKey || progress.updateKey === curJob.updateKey) {\n updateProgress(progress);\n }\n };\n\n if (method) {\n hubConnection?.on(method, handler);\n return () => {\n hubConnection?.off(method, handler);\n };\n }\n }\n }, [curJob, hubConnection, method, updateProgress]);\n\n const [successPercent, setSuccessPercent] = useState(0);\n useEffect(() => {\n if (curJob) {\n if (stage === BulkEditStage.GettingPreview) {\n if (successPercent < 100) {\n const interval = setInterval(() => {\n setProgress({\n updateKey: curJob.updateKey,\n method: method,\n step: BulkEditStep.InProgress,\n successPercent: Math.min(successPercent + 0.6, 100) / 100,\n } as BulkEditProgress);\n\n setSuccessPercent((prev) => prev + 0.3);\n }, 100);\n\n return () => clearInterval(interval);\n }\n } else {\n setProgress(undefined);\n }\n }\n }, [curJob, method, retryableEntities, setProgress, stage, successPercent]);\n\n const setStageWrapper = (newStage: BulkEditStage) => {\n if (curJob) {\n setStage(newStage);\n if (newStage === BulkEditStage.GettingPreview) {\n setSuccessPercent(0);\n } else if (newStage === BulkEditStage.Preview) {\n setSuccessPercent(100);\n setProgress({\n updateKey: curJob.updateKey,\n method: method,\n step: BulkEditStep.InProgress,\n successPercent: 1,\n } as BulkEditProgress);\n }\n }\n };\n\n const onRetryCancel = async () => {\n setStage(BulkEditStage.Done);\n if (progressBeforeRetry) {\n await curJob?.onBulkEditDone?.(progressBeforeRetry, errorsBeforeRetry);\n }\n clearRetryStates();\n };\n\n const setCurJobWrapper = (job?: BulkEditJob) => {\n if (!job) {\n setProgress(undefined);\n setPreview(undefined);\n setStage(BulkEditStage.Idle);\n }\n\n setCurJob(job);\n };\n\n return (\n \n {children}\n \n );\n}\n","import { Stack } from 'src/core/ui';\n\nimport * as styles from './BulkEditErrorList.css';\n\nexport function BulkEditErrorList({ errors }: { errors: string[] }) {\n return (\n \n {errors.toSorted().map((err, i) => (\n {err}\n ))}\n \n );\n}\n","import { Content } from 'src/contexts/ContentContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { roundToPrecision } from 'src/utils/numberFormatter';\nimport { BulkEditProgress } from 'src/WebApiController';\n\nimport * as styles from './BulkEditPreviewDisplay.css';\n\nexport const BulkEditGettingPreview = ({\n progress,\n}: {\n progress?: BulkEditProgress;\n}) => {\n return (\n <>\n \n \n
    \n \n
    \n\n \n {roundToPrecision((progress?.successPercent ?? 0) * 100, 0)} / 100%\n \n
    \n \n );\n};\n","import { useMemo } from 'react';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { FormatContent } from 'src/contexts/ContentContext';\nimport { MultiSelectScope } from 'src/contexts/MultiSelectionContext';\nimport { WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { Stack } from 'src/core/ui';\nimport { FormatOption } from 'src/modals/EditTableColumns';\nimport { ListingTableFlattened } from 'src/tables/ListingTable';\nimport {\n ListingTableColumnId,\n ListingTableFlattenedColumnId,\n} from 'src/utils/columns/inventory/inventoryColumnUtils.types';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { getEventPerformerVenue } from 'src/utils/eventWithDataUtils';\nimport { BulkEditPreviewWithDetails } from 'src/WebApiController';\n\nexport const BulkEditPreviewListingDetails = ({\n preview,\n}: {\n preview?: BulkEditPreviewWithDetails | null;\n}) => {\n const { data: catalog } = useCatalogDataContext();\n\n const listings = useMemo(() => {\n return preview?.listings\n ?.map((l) => {\n const { event, performer, venue } = getEventPerformerVenue(\n l?.viagVirtualId,\n catalog\n );\n\n if (event) {\n return { event: event.event, listing: l, performer, venue };\n }\n return null;\n })\n .filter((l) => l != null)\n .map((l) => l!);\n }, [catalog, preview?.listings]);\n\n if (!listings) {\n return null;\n }\n\n return (\n \n {listings.length <\n (preview?.preview?.bulkEditCountPreview?.Listing?.totalCount ?? 0) && (\n \n }\n />\n )}\n \n \n );\n};\n","import { ColumnDef } from '@tanstack/react-table';\nimport { useMemo } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useTagsForEntityType } from 'src/hooks/useTagsForEntityType';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport {\n PURCHASE_TABLE_COLUMNS_CONFIG,\n tagColumnDef,\n} from 'src/tables/PurchaseTable/configs/PurchaseTableColumnsConfig';\nimport {\n defaultPurchaseEventEnabledColumnsConfig,\n defaultPurchasesColumnsConfig,\n filterColumnsByFeatures,\n getPurchasesColumnConfigById,\n} from 'src/utils/columns/columnUtils';\nimport { PurchasesTableColumnId } from 'src/utils/columns/purchases/purchasesColumnUtils.types';\nimport { CustomPurchasesColumn } from 'src/utils/columns/purchases/purchasesCustomColumnUtils.types';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport { hasFeatures } from 'src/utils/userUtils';\nimport {\n ActionOutboxEntityType,\n Feature,\n PurchaseOrderTicketGroup,\n PurchaseViewMode,\n UserSetting,\n} from 'src/WebApiController';\n\ninterface UseGetPurchasesTableColumnsProps {\n groupId: string; // First of month\n viewMode: PurchaseViewMode;\n columnVisibilityOverride?: PurchasesTableColumnId[];\n isSideTable?: boolean;\n showCheckbox?: boolean;\n hideActionOnCheckbox?: boolean;\n}\n\nexport const useGetPurchasesTableColumns = ({\n viewMode,\n columnVisibilityOverride,\n isSideTable,\n showCheckbox,\n hideActionOnCheckbox = true,\n}: UseGetPurchasesTableColumnsProps) => {\n const hasTablePinActionColumnFeature = useUserHasFeature(\n Feature.TablePinActionColumn\n );\n\n const { appContext, loginContext } = useAppContext();\n\n const {\n value: storedPurchaseColumnOrderSetting = viewMode ===\n PurchaseViewMode.EventTileView\n ? defaultPurchaseEventEnabledColumnsConfig\n : defaultPurchasesColumnsConfig,\n } = useServerUserSetting({\n id: isSideTable\n ? UserSetting.PurchaseSideTableColumnOrder\n : viewMode === PurchaseViewMode.EventTileView\n ? UserSetting.PurchaseEventColumnOrder\n : UserSetting.PurchaseColumnOrder,\n });\n const {\n value: storedPurchaseColumnsEnabledSetting = viewMode ===\n PurchaseViewMode.EventTileView\n ? defaultPurchaseEventEnabledColumnsConfig\n : undefined,\n } = useServerUserSetting({\n id: isSideTable\n ? UserSetting.PurchaseSideTableColumnsEnabled\n : viewMode === PurchaseViewMode.EventTileView\n ? UserSetting.PurchaseEventColumnsEnabled\n : UserSetting.PurchaseColumnsEnabled,\n });\n\n const { tagsMetadata } = useTagsForEntityType(\n ActionOutboxEntityType.Purchase,\n true\n );\n\n return useMemo(() => {\n const customPurchaseColumnsFiltered: CustomPurchasesColumn[] = [];\n\n const purchaseColumnOrder = columnVisibilityOverride\n ? columnVisibilityOverride\n : storedPurchaseColumnOrderSetting.filter(\n // If storedPurchaseColumnsEnabledSetting has never been set, default to true\n (c) => storedPurchaseColumnsEnabledSetting?.includes(c) ?? true\n );\n\n const columns = new Set(\n columnVisibilityOverride\n ? columnVisibilityOverride\n .map(\n (cid) => PURCHASE_TABLE_COLUMNS_CONFIG.find((c) => c.id === cid)!\n )\n\n .map((item) => item.id!)\n : [\n // Add unconfigurable columns first\n ...Object.values(PURCHASE_TABLE_COLUMNS_CONFIG)\n .filter((column) => {\n const columnDef = getPurchasesColumnConfigById(\n column.id as PurchasesTableColumnId\n ).personalization;\n const hasFeatureForColumn =\n columnDef.requiredFeatures.length === 0 ||\n hasFeatures(\n loginContext?.user,\n appContext?.features,\n columnDef.requiredFeatures\n );\n\n const visibleInCurrentViewMode =\n columnDef.visibleViewModes.length === 0 ||\n columnDef.visibleViewModes.includes(viewMode);\n\n let isConfigurable = columnDef.isConfigurable;\n if (\n !hasTablePinActionColumnFeature &&\n column.id === PurchasesTableColumnId.Actions\n ) {\n isConfigurable = true;\n }\n\n return (\n !isConfigurable &&\n hasFeatureForColumn &&\n visibleInCurrentViewMode\n );\n })\n .map((item) => item.id as PurchasesTableColumnId),\n // Add user defined columns next\n ...filterColumnsByFeatures(\n purchaseColumnOrder,\n SectionType.Purchases,\n customPurchaseColumnsFiltered,\n loginContext?.user,\n appContext?.features,\n tagsMetadata ?? [],\n undefined,\n viewMode\n ),\n ]\n );\n\n if (!columnVisibilityOverride) {\n if (showCheckbox) {\n if (hideActionOnCheckbox) {\n columns.delete(PurchasesTableColumnId.Actions);\n }\n } else {\n columns.delete(PurchasesTableColumnId.Checkbox);\n }\n }\n\n return Array.from(columns).reduce<\n ColumnDef[]\n >((acc, columnId) => {\n if (tagsMetadata?.find((t) => t.key === columnId)) {\n acc.push(tagColumnDef(columnId));\n } else {\n const columnConfig = Object.values(PURCHASE_TABLE_COLUMNS_CONFIG).find(\n (column) => column.id === columnId\n );\n if (columnConfig) {\n acc.push(columnConfig);\n }\n }\n return acc;\n }, []);\n }, [\n appContext?.features,\n columnVisibilityOverride,\n hasTablePinActionColumnFeature,\n hideActionOnCheckbox,\n loginContext?.user,\n showCheckbox,\n storedPurchaseColumnOrderSetting,\n storedPurchaseColumnsEnabledSetting,\n tagsMetadata,\n viewMode,\n ]);\n};\n","import { useCallback, useMemo } from 'react';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { PurchaseOrderTableProps } from 'src/tables/PurchaseTable/PurchaseTable.types';\nimport { MAX_NUM_OF_ITEMS_FOR_FLATTENED_VIEWS } from 'src/utils/constants/constants';\nimport { generateShimmeringRows } from 'src/utils/dataTableUtils';\nimport { getEventPerformerVenue } from 'src/utils/eventWithDataUtils';\nimport {\n PurchaseOrderTicketGroup,\n PurchaseViewMode,\n} from 'src/WebApiController';\n\nexport function usePurchaseTableData({\n entities: purchaseOrders,\n entityCount: purchaseCount,\n viewMode,\n isItemsLoading,\n ignoreMaxCount,\n}: Pick<\n PurchaseOrderTableProps,\n 'entities' | 'entityCount' | 'viewMode' | 'isItemsLoading' | 'ignoreMaxCount'\n>) {\n const { data: catalog } = useCatalogDataContext();\n\n const getCatalogDataFromVirtualId = useCallback(\n (viagVirtualId: string | null | undefined) => {\n if (!viagVirtualId) {\n return {};\n }\n\n const { event, performer, venue } = getEventPerformerVenue(\n viagVirtualId,\n catalog\n );\n return { event: event?.event, performer, venue };\n },\n [catalog]\n );\n\n const { data, hasNoDataLoad } = useMemo(() => {\n const shouldShowShimmeringRows =\n viewMode === PurchaseViewMode.FlattenedView\n ? purchaseOrders == null || isItemsLoading\n : !purchaseOrders?.length || isItemsLoading;\n\n const data = shouldShowShimmeringRows\n ? (generateShimmeringRows(purchaseCount) as null[])\n : (purchaseOrders as PurchaseOrderTicketGroup[]);\n\n if (viewMode === PurchaseViewMode.FlattenedView) {\n return {\n data: data,\n hasNoDataLoad:\n !ignoreMaxCount &&\n purchaseCount > MAX_NUM_OF_ITEMS_FOR_FLATTENED_VIEWS,\n };\n }\n\n let dataWithEvent: (PurchaseOrderTicketGroup | null)[] = [];\n\n if (viewMode === PurchaseViewMode.EventTileView) {\n // Event Tile View - fill in the data, item is already flattened\n dataWithEvent = data?.map((tgItem) => {\n if (tgItem == null) {\n return null;\n }\n\n return {\n ...tgItem,\n ticketGroupItems: null,\n ...getCatalogDataFromVirtualId(tgItem.viagVirtualId),\n } as PurchaseOrderTicketGroup;\n });\n } else {\n // Tile View - just fill in the event data and keep the 2-level hierarchy\n dataWithEvent = data?.map((p) => {\n if (p == null) {\n return null;\n }\n\n const po = p as PurchaseOrderTicketGroup;\n const groupItems =\n po.ticketGroupItems?.map((tgItem) => {\n return {\n ...po,\n ...tgItem,\n ticketGroupItems: null,\n ...getCatalogDataFromVirtualId(tgItem.viagVirtualId),\n } as PurchaseOrderTicketGroup;\n }) ?? [];\n\n return {\n ...po,\n ...getCatalogDataFromVirtualId(po.viagVirtualId),\n ticketGroupItems: groupItems,\n } as PurchaseOrderTicketGroup;\n });\n }\n\n return { data: dataWithEvent, hasNoDataLoad: false };\n }, [\n getCatalogDataFromVirtualId,\n ignoreMaxCount,\n isItemsLoading,\n purchaseCount,\n purchaseOrders,\n viewMode,\n ]);\n\n return { data, hasNoDataLoad };\n}\n","import { Row, RowSelectionState, Updater } from '@tanstack/react-table';\nimport { useCallback, useEffect, useMemo } from 'react';\nimport {\n MultiSelectScope,\n useMultiSelectionContext,\n} from 'src/contexts/MultiSelectionContext';\nimport { packNumericIds } from 'src/contexts/MultiSelectionContext/MultiSelectionContext.utils';\nimport { PurchaseOrderTableProps } from 'src/tables/PurchaseTable/PurchaseTable.types';\nimport {\n PurchaseOrderTicketGroup,\n PurchaseViewMode,\n} from 'src/WebApiController';\n\nconst getRowIdForPurchase = (\n originalRow: PurchaseOrderTicketGroup | null,\n index: number\n) =>\n (\n (originalRow?.isTktGrp ? originalRow.tgId : originalRow?.id) ?? index\n ).toString();\n\nconst getRowIdForTicketGroup = (\n originalRow: PurchaseOrderTicketGroup | null,\n index: number\n) =>\n originalRow?.tgId\n ? packNumericIds([originalRow.id, originalRow.tgId])\n : index.toString();\n\nexport function usePurchaseTableSelection({\n data,\n groupId,\n viewMode,\n disableSelection,\n onItemSelectionsChanged,\n}: Pick<\n PurchaseOrderTableProps,\n 'groupId' | 'viewMode' | 'disableSelection' | 'onItemSelectionsChanged'\n> & {\n data: (PurchaseOrderTicketGroup | null)[] | undefined;\n}) {\n const {\n selectionMode,\n setGroupItems,\n getGroupToggleState,\n getSelection,\n totalItemsSelected,\n updateGroupFilteredIds,\n } = useMultiSelectionContext();\n const rowSelection = useMemo(() => {\n // Don't call \"getSelection\" outside hook, the result is not memoized\n // and it expensive to calculate.\n const groupSelection = getSelection(groupId);\n // Type casting needed because of a bug in older TS versions: https://github.com/microsoft/TypeScript/issues/44373\n return (data as (PurchaseOrderTicketGroup | null)[]).reduce<\n Record\n >(\n (result, rowItem) => {\n if (viewMode === PurchaseViewMode.EventTileView) {\n if (rowItem?.tgId) {\n const rowId = getRowIdForTicketGroup(rowItem, -1);\n\n result[rowId] =\n getGroupToggleState(groupId).isGroupSelected &&\n !groupSelection.items.itemIds.length\n ? true\n : (groupSelection?.items.itemIds ?? [])?.includes(rowId) ??\n false;\n }\n } else {\n if (rowItem?.id) {\n result[rowItem.id] =\n getGroupToggleState(groupId).isGroupSelected &&\n !groupSelection.items.itemIds.length\n ? true\n : (groupSelection?.items.itemIds ?? [])?.includes(\n String(rowItem?.id)\n ) ?? false;\n }\n }\n\n return result;\n },\n {} as Record\n );\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n totalItemsSelected, // Keep it here to trigger the hook\n data,\n viewMode,\n getGroupToggleState,\n getSelection,\n groupId,\n ]);\n\n // Clear selections when selection mode changes\n useEffect(() => {\n onItemSelectionsChanged?.([]);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [selectionMode?.mode]);\n\n const onRowSelectionChange = useCallback(\n (updater: Updater) => {\n if (disableSelection) return;\n const newSelections =\n typeof updater === 'function' ? updater(rowSelection) : updater;\n\n const newSelectedIds = Object.keys(newSelections).filter(\n (r) => newSelections[r] === true\n );\n\n setGroupItems(groupId, newSelections);\n onItemSelectionsChanged?.(\n newSelectedIds\n .filter((id) => newSelections[id])\n .map((id) => parseInt(id))\n );\n },\n [\n disableSelection,\n groupId,\n onItemSelectionsChanged,\n rowSelection,\n setGroupItems,\n ]\n );\n\n const getRowId =\n viewMode === PurchaseViewMode.EventTileView\n ? getRowIdForTicketGroup\n : getRowIdForPurchase;\n\n const onFilteredRowsChange = useCallback(\n (filteredRows: Row[] | undefined) => {\n const filteredItemIds = filteredRows\n ?.map((r) => getRowId(r.original, r.index))\n .filter((lid) => lid != null) as number[] | undefined;\n updateGroupFilteredIds(groupId, filteredItemIds);\n },\n [getRowId, groupId, updateGroupFilteredIds]\n );\n\n return {\n getRowId,\n onRowSelectionChange,\n onFilteredRowsChange,\n rowSelection,\n showCheckbox:\n selectionMode?.mode === MultiSelectScope.AllGroups ||\n selectionMode?.mode === MultiSelectScope.SingleGroup,\n };\n}\n","import {\n ExpandedState,\n getExpandedRowModel,\n Row,\n SortingState,\n TableOptions,\n} from '@tanstack/react-table';\nimport clsx from 'clsx';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport { shiftSelect } from 'src/components/Events/EventPage/EventPage.css';\nimport { useSingleTableShortcutSelection } from 'src/components/Events/EventPage/hooks/useSingleTableShortcutSelection';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { ColumnResizingContextProvider } from 'src/contexts/ColumnResizingContext/ColumnResizingContext';\nimport {\n Content,\n FormatContent,\n useContent,\n} from 'src/contexts/ContentContext';\nimport { useClearShiftSelectionOnSortingChange } from 'src/contexts/MultiSelectionContext/useClearShiftSelectionOnSortingChange';\nimport { WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { useSyncCenterSettings } from 'src/hooks/api/useSyncCenterSetting';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { PurchaseOrderTableProps } from 'src/tables/PurchaseTable/PurchaseTable.types';\nimport { useGetPurchasesTableColumns } from 'src/tables/PurchaseTicketTable/useGetPurchasesTableColumns';\nimport { NoData, Table } from 'src/tables/Table';\nimport { PurchasesTableColumnId } from 'src/utils/columns/purchases/purchasesColumnUtils.types';\nimport { MAX_NUM_OF_ITEMS_FOR_FLATTENED_VIEWS } from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { isInFullPageEventView } from 'src/utils/deepLinkUtils';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport { SomethingWentWrong } from 'src/views';\nimport {\n Feature,\n PurchaseOrderTicketGroup,\n PurchaseViewMode,\n UserSetting,\n} from 'src/WebApiController';\n\nimport { useSeatingColumnSorting } from '../common/hooks/useSeatingColumnSorting';\nimport { usePaginationSettings } from '../Table/hooks/usePaginationSettings';\nimport { usePurchaseTableData } from './usePurchaseTableData';\nimport { usePurchaseTableSelection } from './usePurchaseTableSelection';\n\nconst PAGE_SIZE = 10;\n\nexport function PurchaseOrderTable({\n groupId,\n entities,\n entityCount,\n getDataFail,\n onMount,\n onUnmount,\n initState,\n disablePagination,\n useVirtuoso,\n viewMode = PurchaseViewMode.TileView,\n isItemsLoading,\n RowComponent,\n rowSupportsAccordion,\n virtuosoItemSize,\n columnVisibilityOverride,\n formatOptionOverrides,\n withOuterPadding = true,\n disableSelection,\n isSideTable,\n alwaysShowCheckbox,\n showSelectAllOnHeader,\n onItemSelectionsChanged,\n enableColumnFilters,\n ignoreMaxCount,\n}: PurchaseOrderTableProps) {\n const settings = useSyncCenterSettings();\n const { isAutoPoQualityControlled = false } = settings.data ?? {};\n\n const purchasesText = useContent(ContentId.Purchases);\n const hasTablePinActionColumnFeature = useUserHasFeature(\n Feature.TablePinActionColumn\n );\n\n const [expandedState, setExpandedState] = useState({});\n\n // Enable passing in table state as parameters -- we can remount with the last state the user was on\n const [sorting, setSorting] = useState(\n initState?.sorting || [{ id: 'purchaseDate', desc: true }]\n );\n\n useClearShiftSelectionOnSortingChange({ sortingState: sorting });\n\n const sectionType = isSideTable\n ? SectionType.PurchaseSideTable\n : viewMode === PurchaseViewMode.EventTileView\n ? SectionType.PurchaseEvent\n : SectionType.Purchases;\n\n const seatingColumnSorting =\n useSeatingColumnSorting(\n PurchasesTableColumnId.Seating,\n sectionType\n );\n\n const { data, hasNoDataLoad } = usePurchaseTableData({\n entities,\n entityCount,\n viewMode,\n isItemsLoading,\n ignoreMaxCount,\n });\n\n const { pagination, setPagination } = usePaginationSettings(\n data.length,\n -1,\n PAGE_SIZE,\n disablePagination,\n initState\n );\n\n useEffect(() => {\n onMount?.();\n });\n\n useEffect(() => {\n /**\n * Intent for `onMount` is use with 'windowing' in order to maintain user state\n * when the component is scrolled back into view.\n * Anything that needs to be persisted in `react-table` state should be added here.\n * Only update on unmount to ensure we aren't doing too many re-renders.\n */\n return () => onUnmount?.({ pagination, sorting });\n }, [pagination, sorting, onUnmount]);\n\n const {\n rowSelection,\n onRowSelectionChange,\n getRowId,\n showCheckbox,\n onFilteredRowsChange,\n } = usePurchaseTableSelection({\n data,\n groupId,\n viewMode,\n disableSelection,\n onItemSelectionsChanged,\n });\n\n const columns = useGetPurchasesTableColumns({\n groupId,\n viewMode: viewMode,\n columnVisibilityOverride,\n isSideTable,\n showCheckbox: showCheckbox || alwaysShowCheckbox,\n hideActionOnCheckbox: !alwaysShowCheckbox, // only hide Action if we're not always showing checkbox\n });\n\n const {\n lastSelectedRowRefIndex,\n allowShiftClickSelection,\n isShiftKeyPressed,\n isCtrlOrCmdKeyPressed,\n updateSelectionForRowAndSubRows,\n } = useSingleTableShortcutSelection({\n isSideTable,\n });\n\n const onRowShiftSelect = useCallback(\n (\n tableRows: Row[] | undefined,\n row: Row,\n index: number\n ) => {\n if (\n !tableRows ||\n !allowShiftClickSelection ||\n showCheckbox ||\n alwaysShowCheckbox\n ) {\n return;\n }\n const rowId = row.id.toString();\n const newIsSelected = !rowSelection[rowId];\n\n if (isShiftKeyPressed && lastSelectedRowRefIndex.current !== null) {\n const start = Math.min(lastSelectedRowRefIndex.current, index);\n const end = Math.max(lastSelectedRowRefIndex.current, index);\n\n const newRowSelection = { ...rowSelection };\n for (let i = start; i <= end; i++) {\n const row = tableRows[i];\n const rowId = getRowId(row.original, i);\n\n if (row) {\n updateSelectionForRowAndSubRows({\n row,\n rowId,\n newIsSelected,\n newRowSelection,\n });\n }\n }\n\n lastSelectedRowRefIndex.current = index;\n onRowSelectionChange(newRowSelection);\n } else if (isCtrlOrCmdKeyPressed) {\n const newRowSelection = { ...rowSelection };\n newRowSelection[rowId] = newIsSelected;\n updateSelectionForRowAndSubRows({\n row,\n rowId,\n newIsSelected, // Select the clicked row\n newRowSelection,\n });\n lastSelectedRowRefIndex.current = index;\n onRowSelectionChange(newRowSelection);\n } else {\n // No modifier key pressed, reset selection\n const newRowSelection = {};\n\n updateSelectionForRowAndSubRows({\n row,\n rowId,\n newIsSelected,\n newRowSelection,\n });\n\n lastSelectedRowRefIndex.current = index;\n onRowSelectionChange(newRowSelection);\n }\n },\n [\n allowShiftClickSelection,\n alwaysShowCheckbox,\n getRowId,\n isCtrlOrCmdKeyPressed,\n isShiftKeyPressed,\n lastSelectedRowRefIndex,\n onRowSelectionChange,\n rowSelection,\n showCheckbox,\n updateSelectionForRowAndSubRows,\n ]\n );\n\n const { mainRoute } = useAppContext();\n const inFullPageEventView = isInFullPageEventView(mainRoute);\n const options = useMemo<\n Partial>\n >(\n () => ({\n data,\n columns: columns,\n state: {\n pagination,\n rowSelection,\n expanded: expandedState,\n sorting,\n columnVisibility: {\n checkbox: Boolean(showCheckbox || alwaysShowCheckbox),\n qualityControlState: isAutoPoQualityControlled ?? false,\n },\n columnPinning: {\n right: hasTablePinActionColumnFeature\n ? [PurchasesTableColumnId.Actions]\n : undefined,\n },\n },\n meta: {\n rowSupportsAccordion,\n sectionType,\n formatOptionOverrides,\n showSelectAllCheckbox: showSelectAllOnHeader,\n },\n enableRowSelection:\n showCheckbox || alwaysShowCheckbox || inFullPageEventView,\n enableMultiRowSelection: showCheckbox || alwaysShowCheckbox,\n enableSubRowSelection:\n alwaysShowCheckbox ||\n (showCheckbox && viewMode !== PurchaseViewMode.TileView), // For tile view, only select purchaseOrdes\n getRowId: getRowId,\n onPaginationChange: setPagination,\n onRowSelectionChange:\n !allowShiftClickSelection || showCheckbox || alwaysShowCheckbox\n ? onRowSelectionChange\n : undefined,\n onSortingChange: setSorting,\n onExpandedChange: setExpandedState,\n getSubRows: (originalRow) => {\n if (\n !originalRow ||\n !originalRow.ticketGroupItems?.length ||\n originalRow.ticketGroupItems?.length < 2\n ) {\n return [];\n }\n\n return originalRow.ticketGroupItems.map(\n (tgItem) => tgItem as PurchaseOrderTicketGroup\n );\n },\n getRowCanExpand: (originalRow) =>\n viewMode === PurchaseViewMode.TileView &&\n !!(\n originalRow?.original?.ticketGroupItems?.length &&\n originalRow?.original?.ticketGroupItems?.length > 1\n ),\n getExpandedRowModel: (table) => getExpandedRowModel()(table),\n autoResetExpanded: false,\n paginateExpandedRows: false,\n sortingFns: { ...seatingColumnSorting },\n }),\n [\n data,\n columns,\n pagination,\n rowSelection,\n expandedState,\n sorting,\n showCheckbox,\n alwaysShowCheckbox,\n isAutoPoQualityControlled,\n hasTablePinActionColumnFeature,\n rowSupportsAccordion,\n sectionType,\n formatOptionOverrides,\n showSelectAllOnHeader,\n inFullPageEventView,\n viewMode,\n getRowId,\n setPagination,\n allowShiftClickSelection,\n onRowSelectionChange,\n seatingColumnSorting,\n ]\n );\n\n if (getDataFail) {\n return (\n }\n />\n );\n }\n\n if (hasNoDataLoad) {\n return (\n \n \n }\n />\n \n );\n }\n\n return data?.length > 0 ? (\n \n \n \n ) : // We should never see this - because the events are filtered to only those that has purchaseOrders\n // So this is to prevent a crash - but this should be looked at\n viewMode === PurchaseViewMode.FlattenedView ? null : (\n \n \n \n );\n}\n","import { FormatContent } from 'src/contexts/ContentContext';\nimport { NO_GROUP_ID } from 'src/contexts/MultiSelectionContext';\nimport { WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { Stack } from 'src/core/ui';\nimport { FormatOption } from 'src/modals/EditTableColumns';\nimport { PurchaseOrderTable } from 'src/tables/PurchaseTable';\nimport { PurchasesTableColumnId } from 'src/utils/columns/purchases/purchasesColumnUtils.types';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport {\n BulkEditPreviewWithDetails,\n PurchaseOrderTicketGroup,\n PurchaseViewMode,\n} from 'src/WebApiController';\n\nexport const BulkEditPreviewPurchaseDetails = ({\n preview,\n}: {\n preview?: BulkEditPreviewWithDetails | null;\n}) => {\n if (!preview?.purchases) {\n return null;\n }\n\n return (\n \n {preview.purchases.length <\n (preview?.preview?.bulkEditCountPreview?.Purchase?.totalCount ?? 0) && (\n \n }\n />\n )}\n p as PurchaseOrderTicketGroup\n )}\n getDataFail={false}\n isItemsLoading={false}\n viewMode={PurchaseViewMode.FlattenedView}\n columnVisibilityOverride={[\n PurchasesTableColumnId.VendorOrderId,\n PurchasesTableColumnId.PurchaseDate,\n PurchasesTableColumnId.VendorAccountEmail,\n PurchasesTableColumnId.BuyerUserId,\n PurchasesTableColumnId.Actions,\n ]}\n formatOptionOverrides={{\n [PurchasesTableColumnId.Actions]: FormatOption.Actions_LinkOnly,\n }}\n withOuterPadding={false}\n />\n \n );\n};\n","import {\n ColumnDef,\n functionalUpdate,\n InitialTableState,\n Row,\n RowSelectionState,\n SortingState,\n TableOptions,\n Updater,\n} from '@tanstack/react-table';\nimport {\n CSSProperties,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { ColumnResizingContextProvider } from 'src/contexts/ColumnResizingContext/ColumnResizingContext';\nimport { Content, FormatContent } from 'src/contexts/ContentContext';\nimport {\n MultiSelectScope,\n NO_GROUP_ID,\n useMultiSelectionContext,\n} from 'src/contexts/MultiSelectionContext';\nimport { useClearShiftSelectionOnSortingChange } from 'src/contexts/MultiSelectionContext/useClearShiftSelectionOnSortingChange';\nimport { WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { useTagsForEntityType } from 'src/hooks/useTagsForEntityType';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport { FormatOptionEntries } from 'src/modals/EditTableColumns';\nimport { NoData, Table } from 'src/tables/Table';\nimport {\n defaultSalesFlattenedColumnsConfig,\n filterColumnsByFeatures,\n getSaleColumnConfigById,\n} from 'src/utils/columns/columnUtils';\nimport { SALE_MAIN_COLUMNS } from 'src/utils/columns/sales/salesColumnUtils.constants';\nimport { filterCustomColumnsForSale } from 'src/utils/columns/sales/salesCustomColumnUtils';\nimport { CustomSalesColumn } from 'src/utils/columns/sales/salesCustomColumnUtils.types';\nimport { MAX_NUM_OF_ITEMS_FOR_FLATTENED_VIEWS } from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { generateShimmeringRows } from 'src/utils/dataTableUtils';\nimport { getEventPerformerVenue } from 'src/utils/eventWithDataUtils';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport { hasFeatures } from 'src/utils/userUtils';\nimport { SomethingWentWrong } from 'src/views';\nimport {\n ActionOutboxEntityType,\n Feature,\n Permission,\n Sale,\n UserSetting,\n} from 'src/WebApiController';\n\nimport {\n SalesTableColumnId,\n SalesTableFlattenedColumnId,\n} from '../../utils/columns/sales/salesColumnUtils.types';\nimport { useSeatingColumnSorting } from '../common/hooks/useSeatingColumnSorting';\nimport { usePaginationSettings } from '../Table/hooks/usePaginationSettings';\nimport {\n customColumnDef,\n SALE_TABLE_COLUMNS_CONFIG,\n tagColumnDef,\n} from './configs/SaleTableColumnsConfig';\nimport { SALE_TABLE_FLATTENED_COLUMNS_CONFIG } from './configs/SaleTableFlattenedColumnsConfig';\nimport { SaleWithEvent } from './SalesTable.type';\n\nexport type SalesTableFlattenedProps = {\n sales?: Sale[];\n salesCount: number;\n failedToRetrieveData: boolean;\n onMount?: () => void;\n onUnmount?: (state: object) => void;\n initState?: InitialTableState;\n disablePagination?: boolean;\n useVirtuoso?: boolean;\n columnVisibilityOverride?: (\n | SalesTableColumnId\n | SalesTableFlattenedColumnId\n )[];\n formatOptionOverrides?: FormatOptionEntries;\n withOuterPadding?: boolean;\n disableSelection?: boolean;\n alwaysShowCheckbox?: boolean;\n showSelectAllOnHeader?: boolean;\n enableColumnFilters?: boolean;\n ignoreMaxCount?: boolean;\n};\n\nconst PAGE_SIZE = 100;\n\nconst tableStyle: CSSProperties = {\n maxHeight: '60vh',\n};\n\nconst disabledPaginationStyles: CSSProperties = {\n position: 'sticky',\n top: '0',\n zIndex: '10',\n};\n\nconst tableCellStyles: CSSProperties = {\n height: '1px', // Keep this to be able to use height: 100% inside td\n};\n\nexport const SalesTableFlattened = ({\n sales,\n salesCount,\n failedToRetrieveData,\n onMount,\n onUnmount,\n initState,\n disablePagination,\n useVirtuoso,\n columnVisibilityOverride,\n formatOptionOverrides,\n withOuterPadding = true,\n disableSelection,\n alwaysShowCheckbox,\n showSelectAllOnHeader,\n enableColumnFilters,\n ignoreMaxCount,\n}: SalesTableFlattenedProps) => {\n const showMainColumnsOnly = false;\n const { data: catalog, isItemsLoading } = useCatalogDataContext();\n const hasTablePinActionColumnFeature = useUserHasFeature(\n Feature.TablePinActionColumn\n );\n\n const seatingColumnSorting = useSeatingColumnSorting(\n SalesTableColumnId.Seating,\n SectionType.SalesFlattened\n );\n\n const { data, hasNoDataLoad } = useMemo(() => {\n const nonNullSales = sales\n ?.map((sale) => {\n const { event, performer, venue } = getEventPerformerVenue(\n sale.viagVirtualId,\n catalog\n );\n\n if (event) {\n return {\n event: event.event,\n sale,\n performer,\n venue,\n isFlattenedMode: true,\n } as SaleWithEvent;\n }\n\n return null;\n })\n ?.filter((s) => s != null)\n ?.map((s) => s!);\n\n const data =\n nonNullSales == null || isItemsLoading\n ? (generateShimmeringRows(salesCount) as null[])\n : nonNullSales;\n\n const hasNoDataLoad =\n !ignoreMaxCount && salesCount > MAX_NUM_OF_ITEMS_FOR_FLATTENED_VIEWS;\n\n return { data, hasNoDataLoad };\n }, [sales, isItemsLoading, salesCount, ignoreMaxCount, catalog]);\n\n const hasViewProceeds = useUserHasAnyOfPermissions(\n Permission.Sales_ViewProceeds,\n Permission.Sales_ViewRecentProceeds\n );\n\n const { appContext, loginContext } = useAppContext();\n const {\n setGroupItems,\n getGroupToggleState,\n getSelection,\n selectionMode,\n updateGroupFilteredIds,\n } = useMultiSelectionContext();\n\n const saleSelection = getSelection(NO_GROUP_ID);\n\n // Enable passing in table state as parameters -- we can remount with the last state the user was on\n const [sorting, setSorting] = useState(\n initState?.sorting || []\n );\n\n useClearShiftSelectionOnSortingChange({ sortingState: sorting });\n\n const { pagination, setPagination } = usePaginationSettings(\n data.length,\n -1,\n PAGE_SIZE,\n disablePagination,\n initState\n );\n\n const rowSelection = useMemo(() => {\n return data\n ?.flatMap((d) => [d?.sale])\n ?.reduce>((result, sale) => {\n if (sale?.id) {\n result[sale.id] =\n (getGroupToggleState(NO_GROUP_ID).isGroupSelected ||\n (saleSelection?.items.itemIds ?? [])?.includes(\n String(sale?.id)\n )) ??\n false;\n }\n return result;\n }, {});\n }, [data, getGroupToggleState, saleSelection?.items.itemIds]);\n\n const onRowSelectionChange = useCallback(\n (updater: Updater) => {\n if (disableSelection) return;\n const newSelections =\n typeof updater === 'function' ? updater(rowSelection) : updater;\n setGroupItems(NO_GROUP_ID, newSelections);\n },\n [disableSelection, rowSelection, setGroupItems]\n );\n\n useEffect(() => {\n onMount?.();\n });\n\n useEffect(() => {\n /**\n * Intent for `onMount` is use with 'windowing' in order to maintain user state\n * when the component is scrolled back into view.\n * Anything that needs to be persisted in `react-table` state should be added here.\n * Only update on unmount to ensure we aren't doing too many re-renders.\n */\n return () => onUnmount?.({ pagination, sorting });\n }, [pagination, sorting, onUnmount]);\n\n const {\n value:\n storedSaleFlattenedColumnOrderSetting = defaultSalesFlattenedColumnsConfig,\n } = useServerUserSetting({\n id: UserSetting.SaleFlattenedColumnOrder,\n });\n const { value: storedSaleColumnsEnabledSetting } = useServerUserSetting<\n string[]\n >({\n id: UserSetting.SaleFlattenedColumnsEnabled,\n });\n\n const { value: customSaleColumns = [] } = useServerUserSetting<\n CustomSalesColumn[]\n >({\n id: UserSetting.SaleCustomColumns,\n });\n const { tagsMetadata, tagsMetadataNumeric } = useTagsForEntityType(\n ActionOutboxEntityType.Sale,\n true\n );\n\n const customSaleColumnsFiltered = filterCustomColumnsForSale(\n customSaleColumns,\n tagsMetadataNumeric\n );\n\n const showCheckbox = useMemo(\n () =>\n alwaysShowCheckbox ||\n selectionMode?.mode === MultiSelectScope.AllGroups ||\n saleSelection.isSingleGroupMultiSelect,\n [\n alwaysShowCheckbox,\n saleSelection.isSingleGroupMultiSelect,\n selectionMode?.mode,\n ]\n );\n\n const displayedColumnsConfig = useMemo(() => {\n if (showMainColumnsOnly) {\n return SALE_MAIN_COLUMNS.filter((c) =>\n c === SalesTableColumnId.Checkbox ? showCheckbox : true\n ).reduce[]>((acc, columnId) => {\n const columnConfig = Object.values(SALE_TABLE_COLUMNS_CONFIG).find(\n (column) => column.id === columnId\n );\n if (columnConfig) {\n acc.push(columnConfig);\n }\n return acc;\n }, []);\n }\n\n const saleColumnOrder = columnVisibilityOverride\n ? columnVisibilityOverride\n : storedSaleFlattenedColumnOrderSetting.filter(\n // If storedSaleColumnsEnabledSetting has never been set, default to true\n (c) => storedSaleColumnsEnabledSetting?.includes(c) ?? true\n );\n\n if (\n !columnVisibilityOverride &&\n !hasTablePinActionColumnFeature &&\n !saleColumnOrder.includes(SalesTableColumnId.Actions)\n ) {\n saleColumnOrder.push(SalesTableColumnId.Actions);\n }\n\n const saleTableFlattenedColumnsConfig = Object.values(\n SALE_TABLE_FLATTENED_COLUMNS_CONFIG\n );\n const saleTableColumnsConfig = Object.values(SALE_TABLE_COLUMNS_CONFIG);\n\n const columns = new Set(\n columnVisibilityOverride\n ? columnVisibilityOverride\n .map(\n (cid) =>\n saleTableColumnsConfig.find((c) => c.id === cid) ??\n saleTableFlattenedColumnsConfig.find((c) => c.id === cid)!\n )\n\n .map((item) => item.id!)\n : [\n // Add unconfigurable columns first\n ...saleTableFlattenedColumnsConfig\n .filter((column) => {\n const columnDef = getSaleColumnConfigById(\n column.id as SalesTableFlattenedColumnId\n ).personalization;\n const hasFeatureForColumn =\n columnDef.requiredFeatures.length === 0 ||\n hasFeatures(\n loginContext?.user,\n appContext?.features,\n columnDef.requiredFeatures\n );\n\n return !columnDef.isConfigurable && hasFeatureForColumn;\n // return true;\n // return !columnDef.isConfigurable;\n })\n .map((item) => item.id as SalesTableFlattenedColumnId),\n ...saleTableColumnsConfig\n .filter((column) => {\n const columnDef = getSaleColumnConfigById(\n column.id as SalesTableColumnId\n ).personalization;\n const hasFeatureForColumn =\n columnDef.requiredFeatures.length === 0 ||\n hasFeatures(\n loginContext?.user,\n appContext?.features,\n columnDef.requiredFeatures\n );\n\n let isConfigurable = columnDef.isConfigurable;\n if (\n !hasTablePinActionColumnFeature &&\n column.id === SalesTableColumnId.Actions\n ) {\n isConfigurable = true;\n }\n\n return !isConfigurable && hasFeatureForColumn;\n })\n .map((item) => item.id as SalesTableColumnId),\n // Add user defined columns next\n ...filterColumnsByFeatures(\n saleColumnOrder,\n SectionType.SalesFlattened,\n customSaleColumnsFiltered,\n loginContext?.user,\n appContext?.features,\n tagsMetadata ?? []\n ),\n ]\n );\n\n if (!columnVisibilityOverride) {\n if (showCheckbox) {\n if (!alwaysShowCheckbox) {\n columns.delete(SalesTableColumnId.Actions);\n }\n } else {\n columns.delete(SalesTableColumnId.Checkbox);\n }\n }\n\n return Array.from(columns).reduce[]>(\n (acc, columnId) => {\n if (tagsMetadata?.find((t) => t.key === columnId)) {\n acc.push(tagColumnDef(columnId));\n } else if (customSaleColumnsFiltered.find((c) => c.id === columnId)) {\n acc.push(\n customColumnDef(\n columnId,\n customSaleColumnsFiltered.find((c) => c.id === columnId)?.formula\n )\n );\n } else {\n const columnConfig1 = saleTableColumnsConfig.find(\n (column) => column.id === columnId\n );\n if (columnConfig1) acc.push(columnConfig1);\n\n const columnConfig2 = saleTableFlattenedColumnsConfig.find(\n (column) => column.id === columnId\n );\n if (columnConfig2) acc.push(columnConfig2);\n }\n\n return acc;\n },\n []\n );\n }, [\n showMainColumnsOnly,\n columnVisibilityOverride,\n storedSaleFlattenedColumnOrderSetting,\n hasTablePinActionColumnFeature,\n customSaleColumnsFiltered,\n loginContext?.user,\n appContext?.features,\n tagsMetadata,\n showCheckbox,\n storedSaleColumnsEnabledSetting,\n alwaysShowCheckbox,\n ]);\n\n const options: Partial> = useMemo(\n () => ({\n data,\n columns: displayedColumnsConfig.filter((c) =>\n c.id === 'proceeds' ? hasViewProceeds : true\n ),\n state: {\n pagination,\n rowSelection,\n sorting,\n columnVisibility: {\n checkbox: showCheckbox,\n },\n columnPinning: {\n right: hasTablePinActionColumnFeature\n ? [SalesTableColumnId.Actions]\n : undefined,\n },\n },\n meta: {\n sectionType: SectionType.SalesFlattened,\n formatOptionOverrides,\n showSelectAllCheckbox: showSelectAllOnHeader,\n },\n getRowId: (row: SaleWithEvent | null, index: number) =>\n (row?.sale?.id ?? index).toString(),\n onPaginationChange: setPagination,\n onSortingChange: (sortingUpdaterFn) => {\n const newSortVal = functionalUpdate(sortingUpdaterFn, sorting);\n setSorting(newSortVal);\n },\n enableRowSelection: showCheckbox,\n enableMultiRowSelection: showCheckbox,\n enableSubRowSelection: showCheckbox,\n onRowSelectionChange,\n sortingFns: { ...seatingColumnSorting },\n }),\n [\n data,\n displayedColumnsConfig,\n pagination,\n rowSelection,\n sorting,\n showCheckbox,\n hasTablePinActionColumnFeature,\n formatOptionOverrides,\n showSelectAllOnHeader,\n setPagination,\n onRowSelectionChange,\n seatingColumnSorting,\n hasViewProceeds,\n ]\n );\n\n const onFilteredRowsChange = useCallback(\n (filteredRows: Row[] | undefined) => {\n const filteredItemIds = filteredRows\n ?.map((r) => r.original?.sale?.id)\n .filter((lid) => lid != null) as number[] | undefined;\n updateGroupFilteredIds(NO_GROUP_ID, filteredItemIds);\n },\n [updateGroupFilteredIds]\n );\n\n return failedToRetrieveData ? (\n }\n />\n ) : hasNoDataLoad ? (\n \n \n }\n />\n \n ) : data?.length > 0 ? (\n \n \n \n ) : null;\n};\n","import { FormatContent } from 'src/contexts/ContentContext';\nimport { WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { Stack } from 'src/core/ui';\nimport { FormatOption } from 'src/modals/EditTableColumns';\nimport { SalesTableFlattened } from 'src/tables/SalesTable/SalesTableFlattened';\nimport {\n SalesTableColumnId,\n SalesTableFlattenedColumnId,\n} from 'src/utils/columns/sales/salesColumnUtils.types';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { BulkEditPreviewWithDetails } from 'src/WebApiController';\n\nexport const BulkEditPreviewSaleDetails = ({\n preview,\n}: {\n preview?: BulkEditPreviewWithDetails | null;\n}) => {\n if (!preview?.sales) {\n return null;\n }\n\n return (\n \n {preview.sales.length <\n (preview?.preview?.bulkEditCountPreview?.Sale?.totalCount ?? 0) && (\n \n }\n />\n )}\n\n \n \n );\n};\n","import { FormatContent } from 'src/contexts/ContentContext';\nimport { NO_GROUP_ID } from 'src/contexts/MultiSelectionContext';\nimport { WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { Stack } from 'src/core/ui';\nimport { FormatOption } from 'src/modals/EditTableColumns';\nimport { PurchaseOrderTable } from 'src/tables/PurchaseTable';\nimport { PurchasesTableColumnId } from 'src/utils/columns/purchases/purchasesColumnUtils.types';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport {\n BulkEditPreviewWithDetails,\n PurchaseViewMode,\n} from 'src/WebApiController';\n\nexport const BulkEditPreviewTicketGroupDetails = ({\n preview,\n}: {\n preview?: BulkEditPreviewWithDetails | null;\n}) => {\n if (!preview?.ticketGroups) {\n return null;\n }\n\n return (\n \n {preview.ticketGroups.length <\n (preview?.preview?.bulkEditCountPreview?.TicketGroup?.totalCount ??\n 0) && (\n \n }\n />\n )}\n\n \n \n );\n};\n","import clsx from 'clsx';\nimport { useMemo, useState } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { FailureMessage, WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { Stack } from 'src/core/ui';\nimport { TabPanel } from 'src/core/ui/TabPanel';\nimport { TabItem } from 'src/core/ui/TabPanel/TabPanel.types';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ACTION_OUTBOX_ENTITY_TYPE_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport {\n ActionOutboxEntityType,\n BulkEditPreviewWithDetails,\n} from 'src/WebApiController';\n\nimport { ActionOutboxEntityTypeForBulkEdit } from '../../bulkEditUtils';\nimport * as styles from './BulkEditPreviewDisplay.css';\nimport { BulkEditPreviewListingDetails } from './BulkEditPreviewListingDetails';\nimport { BulkEditPreviewPurchaseDetails } from './BulkEditPreviewPurchaseDetails';\nimport { BulkEditPreviewSaleDetails } from './BulkEditPreviewSaleDetails';\nimport { BulkEditPreviewTicketGroupDetails } from './BulkEditPreviewTicketGroupDetails';\n\nconst NUM_OF_ITEMS_TO_FLAG_AS_TOO_LARGE = 12000;\n\nexport const BulkEditPreviewDisplay = ({\n entityType,\n preview,\n entityUpdatesPreview,\n}: {\n entityType: ActionOutboxEntityTypeForBulkEdit;\n preview?: BulkEditPreviewWithDetails | null;\n entityUpdatesPreview?: React.ReactNode;\n}) => {\n const [activeTabIndex, setActiveTabIndex] = useState(0);\n\n const isTooMany =\n (preview?.allItemsCount ?? 0) > NUM_OF_ITEMS_TO_FLAG_AS_TOO_LARGE;\n\n const tabs: TabItem[] = useMemo(\n () =>\n preview?.preview.bulkEditCountPreview\n ? Object.entries(preview.preview.bulkEditCountPreview)\n .filter((p) => p[1].totalCount > 0)\n .toSorted((a, b) =>\n a[0] === entityType\n ? -1\n : b[0] === entityType\n ? 1\n : a[0].localeCompare(b[0])\n )\n .map(([tab, value]) => ({\n value: tab,\n title: (\n \n \n \n :\n \n\n \n \n {value.totalCount}\n \n \n \n ),\n content: (\n <>\n {tab === ActionOutboxEntityType.Listing &&\n preview.listings && (\n \n )}\n {tab === ActionOutboxEntityType.Sale && preview.sales && (\n \n )}\n {tab === ActionOutboxEntityType.Purchase &&\n preview.purchases && (\n \n )}\n {tab === ActionOutboxEntityType.TicketGroup &&\n preview.ticketGroups && (\n \n )}\n \n ),\n }))\n : [],\n [entityType, preview]\n );\n\n return (\n \n {preview?.error && }\n {entityUpdatesPreview}\n {preview?.allItemsCount ? (\n \n \n {preview?.allItemsCount}\n \n \n \n \n \n ) : (\n }\n />\n )}\n\n {tabs.length > 0 && (\n \n setActiveTabIndex(tabs.findIndex((t) => t.value === v))\n }\n />\n )}\n \n );\n};\n","import { Content, FormatContent } from 'src/contexts/ContentContext';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { ActionOutboxEntityType, BulkEditProgress } from 'src/WebApiController';\n\nimport * as styles from './BulkEditProgressDisplay.css';\n\nexport const CountsByEntityDisplay = ({\n countsByEntity,\n}: {\n countsByEntity: BulkEditProgress['countsByEntity'];\n}) => {\n return (\n <>\n {Object.entries(countsByEntity).map(([key, value], index) => {\n let entityContentId = '';\n switch (key) {\n case ActionOutboxEntityType.Listing:\n entityContentId = ContentId.Listings;\n break;\n case ActionOutboxEntityType.Purchase:\n entityContentId = ContentId.Purchases;\n break;\n case ActionOutboxEntityType.Sale:\n entityContentId = ContentId.Sales;\n break;\n case ActionOutboxEntityType.Document:\n entityContentId = ContentId.Document;\n break;\n case ActionOutboxEntityType.TicketGroup:\n entityContentId = ContentId.TicketGroups;\n break;\n default:\n break;\n }\n\n return (\n <>\n {value.ttlCnt > 0 && (\n
    \n \n {value.succCnt} / {value.ttlCnt}{' '}\n \n \n
    \n \n }\n />\n \n )}\n {value.warnCnt > 0 && (\n
    \n \n
    \n )}\n {value.failCnt > 0 && (\n
    \n \n
    \n )}\n \n );\n })}\n \n );\n};\n","import { Content, FormatContent } from 'src/contexts/ContentContext';\nimport {\n FailureMessage,\n SuccessMessage,\n WarningMessage,\n WorkingMessage,\n} from 'src/core/POS/MessageWithIcon';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { roundToPrecision } from 'src/utils/numberFormatter';\nimport { BulkEditProgress, BulkEditStep } from 'src/WebApiController';\n\nimport { ActionOutboxEntityTypeForBulkEdit } from '../../bulkEditUtils';\nimport * as styles from './BulkEditProgressDisplay.css';\nimport { CountsByEntityDisplay } from './CountsByEntityDisplay';\n\nexport type BulkEditProgressDisplayProps = BulkEditProgress & {\n step: BulkEditStep;\n entityType?: ActionOutboxEntityTypeForBulkEdit;\n};\n\nexport function BulkEditProgressDisplay({\n countsByEntity,\n successPercent,\n failurePercent,\n warningPercent,\n successCount,\n failureCount,\n warningCount,\n totalCount,\n status,\n step,\n entityType,\n retryableEntities,\n}: BulkEditProgressDisplayProps) {\n successPercent =\n totalCount > 0\n ? 0\n : successPercent != null\n ? roundToPrecision(successPercent * 100, 0)\n : null;\n warningPercent =\n totalCount > 0\n ? 0\n : warningPercent != null\n ? roundToPrecision(warningPercent * 100, 0)\n : null;\n failurePercent =\n totalCount > 0\n ? 0\n : failurePercent != null\n ? roundToPrecision(failurePercent * 100, 0)\n : null;\n\n const skippedItemCount = entityType\n ? retryableEntities?.bulkEditCountPreview[entityType]?.idsAffected.length\n : undefined;\n\n return (\n \n \n \n
    \n {step === BulkEditStep.Initializing ? (\n \n ) : step === BulkEditStep.InProgress ? (\n \n ) : step === BulkEditStep.Done ? (\n \n ) : step === BulkEditStep.DoneWithRetryableEntities ? (\n \n ) : step === BulkEditStep.Cancelled ? (\n \n ) : null}\n
    \n \n {countsByEntity && Object.keys(countsByEntity).length > 0 ? (\n \n ) : (\n <>\n {!!successPercent && (\n
    \n \n
    \n )}\n {!!successCount && (\n
    \n \n
    \n )}\n {!!warningPercent && (\n
    \n \n
    \n )}\n {!!warningCount && (\n
    \n \n
    \n )}\n {!!failurePercent && (\n
    \n \n
    \n )}\n {!!failureCount && (\n
    \n \n
    \n )}\n \n )}\n
    \n
    \n \n {step === BulkEditStep.Done ||\n step === BulkEditStep.DoneWithRetryableEntities ? (\n <>\n {!totalCount && (\n }\n />\n )}\n {!!failureCount && (!!warningCount || !!successCount) && (\n }\n />\n )}\n {!failureCount && !!warningCount && !!successCount && (\n \n }\n />\n )}\n {!failureCount && !warningCount && !!successCount && (\n }\n />\n )}\n {!!failureCount && !warningCount && !successCount && (\n }\n />\n )}\n \n ) : (\n \n )}\n \n
    \n\n {retryableEntities && entityType && (\n \n }\n messageStyle={{ fontSize: vars.typography.fontSize.lg }}\n />\n )}\n
    \n );\n}\n","import { Stack } from 'src/core/ui';\n\nimport * as styles from './BulkEditWarningList.css';\n\nexport function BulkEditWarningList({ warnings }: { warnings: string[] }) {\n return (\n \n {warnings.toSorted().map((w, i) => (\n {w}\n ))}\n \n );\n}\n","import { ComponentProps, PropsWithChildren } from 'react';\nimport {\n BulkEditStage,\n useBulkEditHubContext,\n} from 'src/contexts/BulkEditHubContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { Stack } from 'src/core/ui';\n\nimport { ActionOutboxEntityTypeForBulkEdit } from './bulkEditUtils';\nimport { BulkEditErrorList } from './components/BulkEditErrorList';\nimport {\n BulkEditGettingPreview,\n BulkEditPreviewDisplay,\n} from './components/BulkEditPreviewDisplay';\nimport { BulkEditProgressDisplay } from './components/BulkEditProgressDisplay';\nimport { BulkEditWarningList } from './components/BulkEditWarningList/BulkEditWarningList';\n\nexport type BulkEditStatusProps = {\n isLoading?: boolean;\n entityType: ActionOutboxEntityTypeForBulkEdit;\n updateKey: string;\n entityUpdatesPreview?: React.ReactNode;\n} & Pick, 'height'>;\n\nexport const BulkEditStatus = ({\n children,\n height,\n entityType,\n isLoading,\n entityUpdatesPreview,\n}: PropsWithChildren) => {\n const {\n progress,\n progressBeforeRetry,\n errors,\n warnings,\n preview,\n retryableEntities,\n stage,\n } = useBulkEditHubContext();\n\n return (\n \n {stage === BulkEditStage.GettingPreview ? (\n \n ) : preview && stage === BulkEditStage.Preview ? (\n \n ) : stage === BulkEditStage.Idle &&\n retryableEntities &&\n progressBeforeRetry ? (\n errors?.length ? (\n <>\n \n \n \n ) : (\n \n )\n ) : progress != null ? (\n <>\n \n\n {Boolean(warnings?.length) && (\n \n )}\n\n {Boolean(errors?.length) && }\n \n ) : isLoading ? (\n \n ) : (\n // Only display children if there's no progress\n children\n )}\n \n );\n};\n","import { REACT_APP_NAME } from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n ActionOutboxEntityType,\n BulkActionType,\n BulkEditListingClient,\n BulkEditPreviewWithDetails,\n BulkEditProgress,\n BulkEditPurchaseClient,\n BulkEditSaleClient,\n BulkEditStep,\n ClientLogClient,\n LogLevel,\n PosClientConfig,\n} from 'src/WebApiController';\n\nexport const BulkEditProgressingSteps = [\n BulkEditStep.Initializing,\n BulkEditStep.InProgress,\n];\n\nexport type ActionOutboxEntityTypeForBulkEdit =\n | ActionOutboxEntityType.Listing\n | ActionOutboxEntityType.Sale\n | ActionOutboxEntityType.Purchase\n | ActionOutboxEntityType.TicketGroup;\n\nexport const cancelBulkEdit = async (\n entityType: ActionOutboxEntityType,\n activeAccountWebClientConfig: PosClientConfig,\n updateKey: string,\n progress?: BulkEditProgress | null,\n setProgress?: (newProgress: BulkEditProgress) => void\n) => {\n const client =\n entityType === ActionOutboxEntityType.Listing\n ? new BulkEditListingClient(activeAccountWebClientConfig)\n : entityType === ActionOutboxEntityType.Sale\n ? new BulkEditSaleClient(activeAccountWebClientConfig)\n : entityType === ActionOutboxEntityType.Purchase\n ? new BulkEditPurchaseClient(activeAccountWebClientConfig)\n : undefined;\n\n if (client) {\n client.cancelBackgroundTask(updateKey);\n if (progress) {\n setProgress?.({\n ...progress,\n step: BulkEditStep.Cancelled,\n });\n }\n } else {\n new ClientLogClient(activeAccountWebClientConfig).log({\n logLevel: LogLevel.Warning,\n applicationSource: REACT_APP_NAME,\n errorId: null,\n error: `Unhandled BulkEditClient for entity: ${entityType}`,\n pageUrl: window.location.href,\n componentStack: 'bulkEditUtils.ts - cancelBulkEdit',\n additionalInfo: {\n entityType,\n updateKey,\n progress,\n },\n });\n }\n};\n\nexport const bulkEditInProgress = (\n hasBackgroundBulkEditFeature?: boolean,\n isLoading?: boolean,\n progress?: BulkEditProgress\n) => {\n const progressCountIsMax =\n (progress?.failureCount ?? 0) +\n (progress?.successCount ?? 0) +\n (progress?.warningCount ?? 0) >=\n (progress?.totalCount ?? 0);\n\n const progressPercentIsMax =\n (progress?.failurePercent ?? 0) +\n (progress?.successPercent ?? 0) +\n (progress?.warningPercent ?? 0) >=\n 1;\n\n if (!hasBackgroundBulkEditFeature && isLoading) {\n return true;\n }\n\n if (progress?.step) {\n if (progress?.step === BulkEditStep.Initializing) {\n return true;\n }\n\n if (\n progress?.step === BulkEditStep.InProgress &&\n !(progressCountIsMax || progressPercentIsMax)\n ) {\n return true;\n }\n }\n\n return false;\n};\n\nexport const getTitleForMethod = ({\n bulkActionType,\n entityType,\n}: {\n bulkActionType: BulkActionType;\n entityType: ActionOutboxEntityType;\n}) => {\n switch (bulkActionType) {\n case BulkActionType.UpdateBroadcastSettings:\n return ContentId.BroadcastSettings;\n case BulkActionType.UpdatePrices:\n return ContentId.IncreaseDecreasePrice;\n case BulkActionType.UpdateTagValues:\n return ContentId.UpdateTagValues;\n case BulkActionType.UpdatePriceFloorCeiling:\n return ContentId.UpdatePriceFloorCeiling;\n case BulkActionType.UpdateAutoPricingSettings:\n return ContentId.AutopricingSettings;\n case BulkActionType.UpdateMarketplacePrices:\n return ContentId.ListingSettings;\n case BulkActionType.UpdateMarketplaceSeating:\n return ContentId.UpdateMarketplaceSeating;\n case BulkActionType.GroupListings:\n return ContentId.GroupListings;\n case BulkActionType.ChangeEvent:\n return ContentId.ChangeEvent;\n case BulkActionType.AdminHold:\n return ContentId.Hold;\n case BulkActionType.UpdateDeliveryType:\n return ContentId.DeliveryStrategy;\n case BulkActionType.UpdateBuyerCommissions:\n return ContentId.BuyerCommission;\n\n case BulkActionType.UpdateGeneralSettings:\n if (entityType === ActionOutboxEntityType.Sale) {\n return ContentId.SaleSettings;\n } else if (entityType === ActionOutboxEntityType.Purchase) {\n return ContentId.PurchaseSettings;\n } else {\n return ContentId.ListingSettings;\n }\n case BulkActionType.UploadPurchaseFile:\n return ContentId.UploadPurchaseFile;\n\n case BulkActionType.UpdateInternalNotes:\n return ContentId.UpdatePrivateNotes;\n case BulkActionType.DeleteSeatSavers:\n return ContentId.DeletePlaceholders;\n case BulkActionType.RemovePredelivery:\n return ContentId.RemovePredelivery;\n default:\n return ContentId.BulkActions;\n }\n};\n\nexport const getPrimaryAffectedIds = (\n preview: BulkEditPreviewWithDetails | null | undefined,\n entityType: ActionOutboxEntityTypeForBulkEdit\n) => {\n const result =\n preview?.preview?.bulkEditCountPreview?.[entityType]?.idsAffected;\n return result?.length ? result : null;\n};\n\nexport const hasPrimaryAffectedIds = (\n preview: BulkEditPreviewWithDetails | null | undefined,\n entityType:\n | ActionOutboxEntityTypeForBulkEdit\n | ActionOutboxEntityTypeForBulkEdit[]\n) => {\n if (entityType instanceof Array) {\n return entityType.some(\n (et) => preview?.preview?.bulkEditCountPreview?.[et]?.idsAffected?.length\n );\n }\n\n return getPrimaryAffectedIds(preview, entityType) != null;\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { Event, Feature, Listing, PricingClient } from 'src/WebApiController';\n\nimport { useUserHasAutopricingFeature } from './useUserHasAutopricingFeature';\n\nexport const useGetListingAutoPricingSettings = (\n listing: Listing | null | undefined,\n event: Event | null | undefined\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const hasIntelligibleAutoPricingSettingsFeature =\n useUserHasAutopricingFeature(Feature.IntelligibleAutoPricingSettings);\n\n const shouldQuery = !(\n !activeAccountWebClientConfig.activeAccountId ||\n !listing?.id ||\n !event?.viagId ||\n !hasIntelligibleAutoPricingSettingsFeature\n );\n const pricingSettingsQuery = useQuery({\n queryKey: [\n 'PricingClient.getListingAutoPricingSettings',\n activeAccountWebClientConfig.activeAccountId,\n listing?.id,\n listing?.rowVer,\n event?.viagId,\n ],\n queryFn: async () => {\n if (!shouldQuery) {\n return null;\n }\n const pricingSettings = await new PricingClient(\n activeAccountWebClientConfig\n ).getListingAutoPricingSettings(listing?.id, event!.viagId!);\n\n return pricingSettings;\n },\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n retry: 3,\n retryDelay: (attemptIndex) => Math.min(500 ** attemptIndex, 3000),\n meta: {\n // TODO: temporally hide the error for now, enable this after https://stubhub.enterprise.slack.com/archives/C08D76X6M0S is fixed.\n // onError: (error: ErrorTypes) => {\n // showErrorDialog('PricingClient.getListingAutoPricingSettings', error, {\n // trackErrorData: {\n // activeAccountId: activeAccountWebClientConfig.activeAccountId,\n // listingId: listing?.id,\n // rowVer: listing?.rowVer,\n // viagogoEventId: event?.viagId,\n // },\n // });\n // },\n },\n });\n\n return {\n pricingSettings: pricingSettingsQuery.data,\n pricingSettingsQuery,\n loaded: pricingSettingsQuery.isFetched,\n };\n};\n","import { isEqual } from 'lodash-es';\nimport { useCallback, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { useListingGroupPricingSettings } from 'src/hooks/api/useListingGroupPricingSettings';\nimport { useGetAccountAutoPricingSettings } from 'src/hooks/useGetAccountAutoPricingSettings';\nimport { useGetEventAutoPricingSettings } from 'src/hooks/useGetEventAutoPricingSettings';\nimport { useGetListingAutoPricingSettings } from 'src/hooks/useGetListingAutoPricingSettings';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport {\n DEFAULT_COMP_LISTING_CEIL_MORE_THAN_FLOOR,\n DEFAULT_COMP_LISTING_FLOOR,\n DEFAULT_UNDERCUT_ABSOLUTE_AMT,\n DEFAULT_UNDERCUT_RELATIVE_AMT,\n quantityFiltersFromJson,\n} from 'src/utils/autoPricingUtils';\nimport { getCurrentLanguage } from 'src/utils/localeUtils';\nimport { coalesceUndefinedOnly } from 'src/utils/miscUtils';\nimport {\n mapToSelectedSectionSettings,\n SelectedSectionSettingsWithOptionals,\n} from 'src/utils/types/selectedSectionSettingsWithOptionals';\nimport {\n AutoPricingCompListingMode,\n AutoPricingOutlierMode,\n AutoPricingUndercutMode,\n Feature,\n Listing,\n ListingDetailsAutoPricingSectionUpdates,\n ListingDetailsUpdateInput,\n SectionInfo,\n} from 'src/WebApiController';\n\nimport { useHasListingPricePermissions } from '../../components/useHasListingPricePermissions';\n\nexport const useAutoPricingSettings = (listing?: Listing | null) => {\n const { setValue, watch, formState, clearErrors } =\n useFormContext();\n const { canSetPrice, canAutoPrice } = useHasListingPricePermissions(\n listing,\n false\n );\n\n const unitNetProceeds = listing?.listPrice ?? 0;\n\n const updateInput = watch();\n const {\n autoPricingEnabled,\n\n skipAutoPricing,\n skipAdvancePricing,\n skipCompListing,\n skipUndercut,\n\n undercutMode,\n undercutAbsoluteAmount,\n undercutRelativeAmount,\n\n compListingMode,\n compListingCeiling,\n compListingFloor,\n compListingOnlyForSameZoneEnabled,\n compListingOnlyForSelectedSectionsEnabled,\n compListingQuantityScoreAdjustmentEnabled,\n compListingExcludeFanInventory,\n compListingExcludeDefects,\n compListingQuantityScoreAdjustmentOverrideJson,\n compListingSelectedSectionSettings,\n compListingQuantityFilters,\n\n outlierMode,\n outlierStandardDeviations,\n outlierKthLowestLimit,\n outlierKthLowestLimitAbsoluteSpacing,\n outlierKthLowestLimitRelativeSpacing,\n netProceedsFloor,\n\n circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerMaxDiscountVelocityTicksInHours,\n circuitBreakerMinCompListingCount,\n circuitBreakerRelativeCeiling,\n circuitBreakerRelativeFloor,\n } = updateInput;\n\n const { loginContext } = useAppContext();\n\n const { getUiCurrency } = useLocalizationContext();\n\n const uiCurrency = useMemo(\n () =>\n getUiCurrency(\n listing?.currency ?? loginContext?.user?.activeAccount?.currencyCode\n ),\n [\n getUiCurrency,\n listing?.currency,\n loginContext?.user?.activeAccount?.currencyCode,\n ]\n );\n const currencyNumberFormat = useMemo(\n () =>\n new Intl.NumberFormat(getCurrentLanguage(), {\n style: 'currency',\n currency: uiCurrency.code,\n }),\n [uiCurrency.code]\n );\n\n const hasIntelligibleAutoPricingSettingsFeature = useUserHasFeature(\n Feature.IntelligibleAutoPricingSettings\n );\n const hasAllowSeatScoreCompListingModeFeature = useUserHasFeature(\n Feature.AllowSeatScoreCompListingMode\n );\n\n const defaultCompListingMode = useMemo(() => {\n if (hasAllowSeatScoreCompListingModeFeature) {\n return AutoPricingCompListingMode.QualityScore;\n }\n return AutoPricingCompListingMode.SameEvent;\n }, [hasAllowSeatScoreCompListingModeFeature]);\n\n const { event } = useEventMapContext();\n const { pricingSettings: listingPricingSettings } =\n useGetListingAutoPricingSettings(listing, event);\n const { pricingSettings: groupPricingSettings } =\n useListingGroupPricingSettings(listing?.ltGrpId, event);\n const { pricingSettings: eventPricingSettings } =\n useGetEventAutoPricingSettings(event!, false);\n const { pricingSettings: accountPricingSettings } =\n useGetAccountAutoPricingSettings();\n\n const onResetSettings = useCallback(() => {\n setValue('undercutMode', null);\n setValue('undercutAbsoluteAmount', null);\n setValue('undercutRelativeAmount', null);\n\n setValue('compListingMode', null);\n setValue('compListingFloor', null);\n setValue('compListingCeiling', null);\n setValue('compListingSelectedSectionSettings', null);\n setValue('compListingQuantityScoreAdjustmentOverrideJson', null);\n setValue('compListingOnlyForSameZoneEnabled', null);\n setValue('compListingOnlyForSelectedSectionsEnabled', null);\n }, [setValue]);\n\n const onResetAdvanceSettings = useCallback(() => {\n setValue('compListingQuantityScoreAdjustmentEnabled', null);\n setValue('compListingExcludeFanInventory', null);\n setValue('compListingExcludeDefects', null);\n\n setValue('circuitBreakerRelativeCeiling', null);\n setValue('circuitBreakerRelativeFloor', null);\n setValue('circuitBreakerMaxDiscountVelocityPercent', null);\n setValue('circuitBreakerMaxDiscountVelocityTicksInHours', null);\n setValue('circuitBreakerMinCompListingCount', null);\n\n setValue('outlierMode', null);\n setValue('outlierStandardDeviations', null);\n setValue('outlierKthLowestLimit', null);\n setValue('outlierKthLowestLimitRelativeSpacing', null);\n setValue('outlierKthLowestLimitAbsoluteSpacing', null);\n }, [setValue]);\n\n const circuitBreakerSettings = useMemo(() => {\n if (\n listingPricingSettings?.circuitBreakerMaxDiscountVelocityPercent !=\n null ||\n listingPricingSettings?.circuitBreakerMaxDiscountVelocityTicksInHours !=\n null ||\n listingPricingSettings?.circuitBreakerMinCompListingCount != null ||\n listingPricingSettings?.circuitBreakerRelativeCeiling != null ||\n listingPricingSettings?.circuitBreakerRelativeFloor != null\n ) {\n // if it has any of these set - use the entire area\n return {\n circuitBreakerMaxDiscountVelocityPercent:\n listingPricingSettings?.circuitBreakerMaxDiscountVelocityPercent ??\n null,\n circuitBreakerMaxDiscountVelocityTicksInHours:\n listingPricingSettings?.circuitBreakerMaxDiscountVelocityTicksInHours ??\n null,\n circuitBreakerMinCompListingCount:\n listingPricingSettings?.circuitBreakerMinCompListingCount ?? null,\n circuitBreakerRelativeCeiling:\n listingPricingSettings?.circuitBreakerRelativeCeiling ?? null,\n circuitBreakerRelativeFloor:\n listingPricingSettings?.circuitBreakerRelativeFloor ?? null,\n };\n }\n\n if (\n circuitBreakerMaxDiscountVelocityPercent != null ||\n circuitBreakerMaxDiscountVelocityTicksInHours != null ||\n circuitBreakerMinCompListingCount != null ||\n circuitBreakerRelativeCeiling != null ||\n circuitBreakerRelativeFloor != null\n ) {\n // if it has any of these set - use the entire area\n return {\n circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerMaxDiscountVelocityTicksInHours,\n circuitBreakerMinCompListingCount,\n circuitBreakerRelativeCeiling,\n circuitBreakerRelativeFloor,\n };\n }\n\n if (\n groupPricingSettings?.circuitBreakerMaxDiscountVelocityPercent != null ||\n groupPricingSettings?.circuitBreakerMaxDiscountVelocityTicksInHours !=\n null ||\n groupPricingSettings?.circuitBreakerMinCompListingCount != null ||\n groupPricingSettings?.circuitBreakerRelativeCeiling != null ||\n groupPricingSettings?.circuitBreakerRelativeFloor != null\n ) {\n // if it has any of these set - use the entire area\n return {\n circuitBreakerMaxDiscountVelocityPercent:\n groupPricingSettings?.circuitBreakerMaxDiscountVelocityPercent ??\n null,\n circuitBreakerMaxDiscountVelocityTicksInHours:\n groupPricingSettings?.circuitBreakerMaxDiscountVelocityTicksInHours ??\n null,\n circuitBreakerMinCompListingCount:\n groupPricingSettings?.circuitBreakerMinCompListingCount ?? null,\n circuitBreakerRelativeCeiling:\n groupPricingSettings?.circuitBreakerRelativeCeiling ?? null,\n circuitBreakerRelativeFloor:\n groupPricingSettings?.circuitBreakerRelativeFloor ?? null,\n };\n }\n\n if (\n eventPricingSettings?.circuitBreakerMaxDiscountVelocityPercent != null ||\n eventPricingSettings?.circuitBreakerMaxDiscountVelocityTicksInHours !=\n null ||\n eventPricingSettings?.circuitBreakerMinCompListingCount != null ||\n eventPricingSettings?.circuitBreakerRelativeCeiling != null ||\n eventPricingSettings?.circuitBreakerRelativeFloor != null\n ) {\n // if it has any of these set - use the entire area\n return {\n circuitBreakerMaxDiscountVelocityPercent:\n eventPricingSettings?.circuitBreakerMaxDiscountVelocityPercent ??\n null,\n circuitBreakerMaxDiscountVelocityTicksInHours:\n eventPricingSettings?.circuitBreakerMaxDiscountVelocityTicksInHours ??\n null,\n circuitBreakerMinCompListingCount:\n eventPricingSettings?.circuitBreakerMinCompListingCount ?? null,\n circuitBreakerRelativeCeiling:\n eventPricingSettings?.circuitBreakerRelativeCeiling ?? null,\n circuitBreakerRelativeFloor:\n eventPricingSettings?.circuitBreakerRelativeFloor ?? null,\n };\n }\n\n // if it has any of these set - use the entire area\n return {\n circuitBreakerMaxDiscountVelocityPercent:\n accountPricingSettings?.circuitBreakerMaxDiscountVelocityPercent ??\n null,\n circuitBreakerMaxDiscountVelocityTicksInHours:\n accountPricingSettings?.circuitBreakerMaxDiscountVelocityTicksInHours ??\n null,\n circuitBreakerMinCompListingCount:\n accountPricingSettings?.circuitBreakerMinCompListingCount ?? null,\n circuitBreakerRelativeCeiling:\n accountPricingSettings?.circuitBreakerRelativeCeiling ?? null,\n circuitBreakerRelativeFloor:\n accountPricingSettings?.circuitBreakerRelativeFloor ?? null,\n };\n }, [\n accountPricingSettings?.circuitBreakerMaxDiscountVelocityPercent,\n accountPricingSettings?.circuitBreakerMaxDiscountVelocityTicksInHours,\n accountPricingSettings?.circuitBreakerMinCompListingCount,\n accountPricingSettings?.circuitBreakerRelativeCeiling,\n accountPricingSettings?.circuitBreakerRelativeFloor,\n circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerMaxDiscountVelocityTicksInHours,\n circuitBreakerMinCompListingCount,\n circuitBreakerRelativeCeiling,\n circuitBreakerRelativeFloor,\n eventPricingSettings?.circuitBreakerMaxDiscountVelocityPercent,\n eventPricingSettings?.circuitBreakerMaxDiscountVelocityTicksInHours,\n eventPricingSettings?.circuitBreakerMinCompListingCount,\n eventPricingSettings?.circuitBreakerRelativeCeiling,\n eventPricingSettings?.circuitBreakerRelativeFloor,\n groupPricingSettings?.circuitBreakerMaxDiscountVelocityPercent,\n groupPricingSettings?.circuitBreakerMaxDiscountVelocityTicksInHours,\n groupPricingSettings?.circuitBreakerMinCompListingCount,\n groupPricingSettings?.circuitBreakerRelativeCeiling,\n groupPricingSettings?.circuitBreakerRelativeFloor,\n listingPricingSettings?.circuitBreakerMaxDiscountVelocityPercent,\n listingPricingSettings?.circuitBreakerMaxDiscountVelocityTicksInHours,\n listingPricingSettings?.circuitBreakerMinCompListingCount,\n listingPricingSettings?.circuitBreakerRelativeCeiling,\n listingPricingSettings?.circuitBreakerRelativeFloor,\n ]);\n\n const undercutSettings = useMemo(() => {\n if (\n listingPricingSettings?.undercutMode != null ||\n listingPricingSettings?.undercutAbsoluteAmount != null ||\n listingPricingSettings?.undercutRelativeAmount != null\n ) {\n // if it has any of these set - use the entire area\n return {\n undercutMode: listingPricingSettings?.undercutMode ?? null,\n undercutAbsoluteAmount:\n listingPricingSettings?.undercutAbsoluteAmount ?? null,\n undercutRelativeAmount:\n listingPricingSettings?.undercutRelativeAmount ?? null,\n };\n }\n\n if (\n undercutMode != null ||\n undercutAbsoluteAmount != null ||\n undercutRelativeAmount != null\n ) {\n // if it has any of these set - use the entire area\n return {\n undercutMode,\n undercutAbsoluteAmount,\n undercutRelativeAmount,\n };\n }\n\n if (\n groupPricingSettings?.undercutMode != null ||\n groupPricingSettings?.undercutAbsoluteAmount != null ||\n groupPricingSettings?.undercutRelativeAmount != null\n ) {\n // if it has any of these set - use the entire area\n return {\n undercutMode: groupPricingSettings?.undercutMode ?? null,\n undercutAbsoluteAmount:\n groupPricingSettings?.undercutAbsoluteAmount ?? null,\n undercutRelativeAmount:\n groupPricingSettings?.undercutRelativeAmount ?? null,\n };\n }\n\n if (\n eventPricingSettings?.undercutMode != null ||\n eventPricingSettings?.undercutAbsoluteAmount != null ||\n eventPricingSettings?.undercutRelativeAmount != null\n ) {\n // if it has any of these set - use the entire area\n return {\n undercutMode: eventPricingSettings?.undercutMode ?? null,\n undercutAbsoluteAmount:\n eventPricingSettings?.undercutAbsoluteAmount ?? null,\n undercutRelativeAmount:\n eventPricingSettings?.undercutRelativeAmount ?? null,\n };\n }\n\n // if it has any of these set - use the entire area\n return {\n undercutMode:\n accountPricingSettings?.undercutMode ?? AutoPricingUndercutMode.Simple,\n undercutAbsoluteAmount:\n accountPricingSettings?.undercutAbsoluteAmount ??\n DEFAULT_UNDERCUT_ABSOLUTE_AMT,\n undercutRelativeAmount:\n accountPricingSettings?.undercutRelativeAmount ??\n DEFAULT_UNDERCUT_RELATIVE_AMT,\n };\n }, [\n accountPricingSettings?.undercutAbsoluteAmount,\n accountPricingSettings?.undercutMode,\n accountPricingSettings?.undercutRelativeAmount,\n eventPricingSettings?.undercutAbsoluteAmount,\n eventPricingSettings?.undercutMode,\n eventPricingSettings?.undercutRelativeAmount,\n groupPricingSettings?.undercutAbsoluteAmount,\n groupPricingSettings?.undercutMode,\n groupPricingSettings?.undercutRelativeAmount,\n undercutAbsoluteAmount,\n undercutMode,\n undercutRelativeAmount,\n listingPricingSettings?.undercutAbsoluteAmount,\n listingPricingSettings?.undercutMode,\n listingPricingSettings?.undercutRelativeAmount,\n ]);\n\n const compListingSettings = useMemo(() => {\n if (\n listingPricingSettings?.compListingMode != null ||\n listingPricingSettings?.compListingFloor != null ||\n listingPricingSettings?.compListingCeiling != null ||\n listingPricingSettings?.compListingOnlyForSameZoneEnabled != null ||\n listingPricingSettings?.compListingOnlyForSelectedSectionsEnabled !=\n null ||\n listingPricingSettings?.compListingExcludeFanInventory != null ||\n listingPricingSettings?.compListingExcludeDefects != null ||\n listingPricingSettings?.compListingQuantityScoreAdjustmentEnabled !=\n null ||\n listingPricingSettings?.compListingQuantityScoreAdjustmentOverrideJson !=\n null ||\n listingPricingSettings?.compListingSelectedSectionSettings != null ||\n listingPricingSettings?.compListingQuantityFilters != null\n ) {\n // if it has any of these set - use the entire area\n return {\n compListingMode: listingPricingSettings?.compListingMode ?? null,\n compListingFloor:\n listingPricingSettings?.compListingFloor ??\n DEFAULT_COMP_LISTING_FLOOR,\n compListingCeiling:\n listingPricingSettings?.compListingCeiling ??\n (listingPricingSettings?.compListingFloor ??\n DEFAULT_COMP_LISTING_FLOOR) +\n DEFAULT_COMP_LISTING_CEIL_MORE_THAN_FLOOR,\n compListingOnlyForSameZoneEnabled:\n listingPricingSettings?.compListingOnlyForSameZoneEnabled ?? null,\n compListingOnlyForSelectedSectionsEnabled:\n listingPricingSettings?.compListingOnlyForSelectedSectionsEnabled ??\n null,\n compListingQuantityScoreAdjustmentEnabled:\n listingPricingSettings?.compListingQuantityScoreAdjustmentEnabled ??\n null,\n compListingExcludeFanInventory:\n listingPricingSettings?.compListingExcludeFanInventory ?? null,\n compListingExcludeDefects:\n listingPricingSettings?.compListingExcludeDefects ?? null,\n compListingQuantityScoreAdjustmentOverrideJson:\n listingPricingSettings?.compListingQuantityScoreAdjustmentOverrideJson ??\n null,\n compListingSelectedSectionSettings:\n listingPricingSettings?.compListingSelectedSectionSettings ?? null,\n compListingQuantityFilters:\n listingPricingSettings?.compListingQuantityFilters ?? null,\n };\n }\n\n if (\n compListingMode != null ||\n compListingFloor != null ||\n compListingCeiling != null ||\n compListingOnlyForSameZoneEnabled != null ||\n compListingOnlyForSelectedSectionsEnabled != null ||\n compListingExcludeFanInventory != null ||\n compListingExcludeDefects != null ||\n compListingSelectedSectionSettings != null ||\n compListingQuantityScoreAdjustmentEnabled != null ||\n compListingQuantityScoreAdjustmentOverrideJson != null ||\n compListingQuantityFilters != null\n ) {\n // if it has any of these set - use the entire area\n return {\n compListingMode,\n compListingFloor: compListingFloor ?? DEFAULT_COMP_LISTING_FLOOR,\n compListingCeiling:\n compListingCeiling ??\n (compListingFloor ?? DEFAULT_COMP_LISTING_FLOOR) +\n DEFAULT_COMP_LISTING_CEIL_MORE_THAN_FLOOR,\n compListingOnlyForSameZoneEnabled,\n compListingOnlyForSelectedSectionsEnabled,\n compListingExcludeFanInventory,\n compListingExcludeDefects,\n compListingSelectedSectionSettings,\n compListingQuantityScoreAdjustmentEnabled,\n compListingQuantityScoreAdjustmentOverrideJson,\n compListingQuantityFilters,\n };\n }\n\n if (\n groupPricingSettings?.compListingMode != null ||\n groupPricingSettings?.compListingFloor != null ||\n groupPricingSettings?.compListingCeiling != null ||\n groupPricingSettings?.compListingOnlyForSameZoneEnabled != null ||\n groupPricingSettings?.compListingOnlyForSelectedSectionsEnabled != null ||\n groupPricingSettings?.compListingExcludeFanInventory != null ||\n groupPricingSettings?.compListingExcludeDefects != null ||\n groupPricingSettings?.compListingQuantityScoreAdjustmentEnabled != null ||\n groupPricingSettings?.compListingQuantityScoreAdjustmentOverrideJson !=\n null ||\n groupPricingSettings?.compListingSelectedSectionSettings != null ||\n groupPricingSettings?.compListingQuantityFilters != null\n ) {\n // if it has any of these set - use the entire area\n return {\n compListingMode: groupPricingSettings?.compListingMode ?? null,\n compListingFloor:\n groupPricingSettings?.compListingFloor ?? DEFAULT_COMP_LISTING_FLOOR,\n compListingCeiling:\n groupPricingSettings?.compListingCeiling ??\n (groupPricingSettings?.compListingFloor ??\n DEFAULT_COMP_LISTING_FLOOR) +\n DEFAULT_COMP_LISTING_CEIL_MORE_THAN_FLOOR,\n compListingOnlyForSameZoneEnabled:\n groupPricingSettings?.compListingOnlyForSameZoneEnabled ?? null,\n compListingOnlyForSelectedSectionsEnabled:\n groupPricingSettings?.compListingOnlyForSelectedSectionsEnabled ??\n null,\n compListingQuantityScoreAdjustmentEnabled:\n groupPricingSettings?.compListingQuantityScoreAdjustmentEnabled ??\n null,\n compListingExcludeFanInventory:\n groupPricingSettings?.compListingExcludeFanInventory ?? null,\n compListingExcludeDefects:\n groupPricingSettings?.compListingExcludeDefects ?? null,\n compListingQuantityScoreAdjustmentOverrideJson:\n groupPricingSettings?.compListingQuantityScoreAdjustmentOverrideJson ??\n null,\n compListingSelectedSectionSettings:\n groupPricingSettings?.compListingSelectedSectionSettings ?? null,\n compListingQuantityFilters:\n groupPricingSettings?.compListingQuantityFilters ?? null,\n };\n }\n\n if (\n eventPricingSettings?.compListingMode != null ||\n eventPricingSettings?.compListingFloor != null ||\n eventPricingSettings?.compListingCeiling != null ||\n eventPricingSettings?.compListingOnlyForSameZoneEnabled != null ||\n eventPricingSettings?.compListingOnlyForSelectedSectionsEnabled != null ||\n eventPricingSettings?.compListingExcludeFanInventory != null ||\n eventPricingSettings?.compListingExcludeDefects != null ||\n eventPricingSettings?.compListingQuantityScoreAdjustmentEnabled != null ||\n eventPricingSettings?.compListingQuantityScoreAdjustmentOverrideJson !=\n null ||\n eventPricingSettings?.compListingSelectedSectionSettings != null ||\n eventPricingSettings?.compListingQuantityFilters != null\n ) {\n // if it has any of these set - use the entire area\n return {\n compListingMode: eventPricingSettings?.compListingMode ?? null,\n compListingFloor:\n eventPricingSettings?.compListingFloor ?? DEFAULT_COMP_LISTING_FLOOR,\n compListingCeiling:\n eventPricingSettings?.compListingCeiling ??\n (eventPricingSettings?.compListingFloor ??\n DEFAULT_COMP_LISTING_FLOOR) +\n DEFAULT_COMP_LISTING_CEIL_MORE_THAN_FLOOR,\n compListingOnlyForSameZoneEnabled:\n eventPricingSettings?.compListingOnlyForSameZoneEnabled ?? null,\n compListingOnlyForSelectedSectionsEnabled:\n eventPricingSettings?.compListingOnlyForSelectedSectionsEnabled ??\n null,\n compListingQuantityScoreAdjustmentEnabled:\n eventPricingSettings?.compListingQuantityScoreAdjustmentEnabled ??\n null,\n compListingExcludeFanInventory:\n eventPricingSettings?.compListingExcludeFanInventory ?? null,\n compListingExcludeDefects:\n eventPricingSettings?.compListingExcludeDefects ?? null,\n compListingQuantityScoreAdjustmentOverrideJson:\n eventPricingSettings?.compListingQuantityScoreAdjustmentOverrideJson ??\n null,\n compListingSelectedSectionSettings:\n eventPricingSettings?.compListingSelectedSectionSettings ?? null,\n compListingQuantityFilters:\n eventPricingSettings?.compListingQuantityFilters ?? null,\n };\n }\n\n // if it has any of these set - use the entire area\n return {\n compListingMode:\n accountPricingSettings?.compListingMode ?? defaultCompListingMode,\n compListingFloor:\n accountPricingSettings?.compListingFloor ?? DEFAULT_COMP_LISTING_FLOOR,\n compListingCeiling:\n accountPricingSettings?.compListingCeiling ??\n (accountPricingSettings?.compListingFloor ??\n DEFAULT_COMP_LISTING_FLOOR) +\n DEFAULT_COMP_LISTING_CEIL_MORE_THAN_FLOOR,\n compListingOnlyForSameZoneEnabled:\n accountPricingSettings?.compListingOnlyForSameZoneEnabled ?? null,\n compListingOnlyForSelectedSectionsEnabled:\n accountPricingSettings?.compListingOnlyForSelectedSectionsEnabled ??\n null,\n compListingQuantityScoreAdjustmentEnabled:\n accountPricingSettings?.compListingQuantityScoreAdjustmentEnabled ??\n null,\n compListingExcludeFanInventory:\n accountPricingSettings?.compListingExcludeFanInventory ?? null,\n compListingExcludeDefects:\n accountPricingSettings?.compListingExcludeDefects ?? null,\n compListingQuantityScoreAdjustmentOverrideJson:\n accountPricingSettings?.compListingQuantityScoreAdjustmentOverrideJson ??\n null,\n compListingSelectedSectionSettings:\n accountPricingSettings?.compListingSelectedSectionSettings ?? null,\n compListingQuantityFilters:\n accountPricingSettings?.compListingQuantityFilters ?? null,\n };\n }, [\n listingPricingSettings?.compListingMode,\n listingPricingSettings?.compListingFloor,\n listingPricingSettings?.compListingCeiling,\n listingPricingSettings?.compListingOnlyForSameZoneEnabled,\n listingPricingSettings?.compListingOnlyForSelectedSectionsEnabled,\n listingPricingSettings?.compListingExcludeFanInventory,\n listingPricingSettings?.compListingExcludeDefects,\n listingPricingSettings?.compListingQuantityScoreAdjustmentEnabled,\n listingPricingSettings?.compListingQuantityScoreAdjustmentOverrideJson,\n listingPricingSettings?.compListingSelectedSectionSettings,\n listingPricingSettings?.compListingQuantityFilters,\n compListingMode,\n compListingFloor,\n compListingCeiling,\n compListingOnlyForSameZoneEnabled,\n compListingOnlyForSelectedSectionsEnabled,\n compListingExcludeFanInventory,\n compListingExcludeDefects,\n compListingSelectedSectionSettings,\n compListingQuantityScoreAdjustmentEnabled,\n compListingQuantityScoreAdjustmentOverrideJson,\n compListingQuantityFilters,\n groupPricingSettings?.compListingMode,\n groupPricingSettings?.compListingFloor,\n groupPricingSettings?.compListingCeiling,\n groupPricingSettings?.compListingOnlyForSameZoneEnabled,\n groupPricingSettings?.compListingOnlyForSelectedSectionsEnabled,\n groupPricingSettings?.compListingExcludeFanInventory,\n groupPricingSettings?.compListingExcludeDefects,\n groupPricingSettings?.compListingQuantityScoreAdjustmentEnabled,\n groupPricingSettings?.compListingQuantityScoreAdjustmentOverrideJson,\n groupPricingSettings?.compListingSelectedSectionSettings,\n groupPricingSettings?.compListingQuantityFilters,\n eventPricingSettings?.compListingMode,\n eventPricingSettings?.compListingFloor,\n eventPricingSettings?.compListingCeiling,\n eventPricingSettings?.compListingOnlyForSameZoneEnabled,\n eventPricingSettings?.compListingOnlyForSelectedSectionsEnabled,\n eventPricingSettings?.compListingExcludeFanInventory,\n eventPricingSettings?.compListingExcludeDefects,\n eventPricingSettings?.compListingQuantityScoreAdjustmentEnabled,\n eventPricingSettings?.compListingQuantityScoreAdjustmentOverrideJson,\n eventPricingSettings?.compListingSelectedSectionSettings,\n eventPricingSettings?.compListingQuantityFilters,\n accountPricingSettings?.compListingMode,\n accountPricingSettings?.compListingFloor,\n accountPricingSettings?.compListingCeiling,\n accountPricingSettings?.compListingOnlyForSameZoneEnabled,\n accountPricingSettings?.compListingOnlyForSelectedSectionsEnabled,\n accountPricingSettings?.compListingQuantityScoreAdjustmentEnabled,\n accountPricingSettings?.compListingExcludeFanInventory,\n accountPricingSettings?.compListingExcludeDefects,\n accountPricingSettings?.compListingQuantityScoreAdjustmentOverrideJson,\n accountPricingSettings?.compListingSelectedSectionSettings,\n accountPricingSettings?.compListingQuantityFilters,\n defaultCompListingMode,\n ]);\n\n const outlierSettings = useMemo(() => {\n if (\n listingPricingSettings?.outlierMode != null ||\n listingPricingSettings?.outlierStandardDeviations != null ||\n listingPricingSettings?.outlierKthLowestLimit != null ||\n listingPricingSettings?.outlierKthLowestLimitAbsoluteSpacing != null ||\n listingPricingSettings?.outlierKthLowestLimitRelativeSpacing != null\n ) {\n // if it has any of these set - use the entire area\n return {\n outlierMode: listingPricingSettings?.outlierMode ?? null,\n outlierStandardDeviations:\n listingPricingSettings?.outlierStandardDeviations ?? null,\n outlierKthLowestLimit:\n listingPricingSettings?.outlierKthLowestLimit ?? null,\n outlierKthLowestLimitAbsoluteSpacing:\n listingPricingSettings?.outlierKthLowestLimitAbsoluteSpacing ?? null,\n outlierKthLowestLimitRelativeSpacing:\n listingPricingSettings?.outlierKthLowestLimitRelativeSpacing ?? null,\n };\n }\n\n if (\n outlierMode != null ||\n outlierStandardDeviations != null ||\n outlierKthLowestLimit != null\n ) {\n // if it has any of these set - use the entire area\n return {\n outlierMode,\n outlierStandardDeviations,\n outlierKthLowestLimit,\n outlierKthLowestLimitRelativeSpacing,\n outlierKthLowestLimitAbsoluteSpacing,\n };\n }\n\n if (\n groupPricingSettings?.outlierMode != null ||\n groupPricingSettings?.outlierStandardDeviations != null\n // TODO - add rest of settings here\n ) {\n // if it has any of these set - use the entire area\n return {\n outlierMode: groupPricingSettings?.outlierMode ?? null,\n outlierStandardDeviations:\n groupPricingSettings?.outlierStandardDeviations ?? null,\n };\n }\n\n if (\n eventPricingSettings?.outlierMode != null ||\n eventPricingSettings?.outlierStandardDeviations != null\n // TODO - add rest of settings here\n ) {\n // if it has any of these set - use the entire area\n return {\n outlierMode: eventPricingSettings?.outlierMode ?? null,\n outlierStandardDeviations:\n eventPricingSettings?.outlierStandardDeviations ?? null,\n };\n }\n\n // if it has any of these set - use the entire area\n return {\n outlierMode: accountPricingSettings?.outlierMode ?? null,\n outlierStandardDeviations:\n accountPricingSettings?.outlierStandardDeviations ?? null,\n // TODO - add rest of settings here\n };\n }, [\n accountPricingSettings?.outlierMode,\n accountPricingSettings?.outlierStandardDeviations,\n eventPricingSettings?.outlierMode,\n eventPricingSettings?.outlierStandardDeviations,\n groupPricingSettings?.outlierMode,\n groupPricingSettings?.outlierStandardDeviations,\n outlierKthLowestLimit,\n outlierKthLowestLimitAbsoluteSpacing,\n outlierKthLowestLimitRelativeSpacing,\n outlierMode,\n outlierStandardDeviations,\n listingPricingSettings?.outlierMode,\n listingPricingSettings?.outlierStandardDeviations,\n listingPricingSettings?.outlierKthLowestLimit,\n listingPricingSettings?.outlierKthLowestLimitAbsoluteSpacing,\n listingPricingSettings?.outlierKthLowestLimitRelativeSpacing,\n ]);\n\n const onUndercutChange = useCallback(\n (\n undercutModeNew?: AutoPricingUndercutMode | null,\n undercutAbsoluteAmountNew?: number | null,\n undercutRelativeAmountNew?: number | null\n ) => {\n if (\n undercutModeNew !== undefined ||\n undercutAbsoluteAmountNew !== undefined ||\n undercutRelativeAmountNew !== undefined\n ) {\n setValue(\n 'undercutMode',\n coalesceUndefinedOnly(undercutModeNew, undercutSettings.undercutMode)!\n );\n setValue(\n 'undercutAbsoluteAmount',\n coalesceUndefinedOnly(\n undercutAbsoluteAmountNew,\n undercutSettings.undercutAbsoluteAmount\n )!\n );\n setValue(\n 'undercutRelativeAmount',\n coalesceUndefinedOnly(\n undercutRelativeAmountNew,\n undercutSettings.undercutRelativeAmount\n )!\n );\n }\n },\n [\n setValue,\n undercutSettings.undercutAbsoluteAmount,\n undercutSettings.undercutMode,\n undercutSettings.undercutRelativeAmount,\n ]\n );\n\n const onCompListingChange = useCallback(\n (input: {\n compListingModeNew?: AutoPricingCompListingMode | null;\n compListingFloorNew?: number | null;\n compListingCeilingNew?: number | null;\n compListingOnlyForSameZoneEnabledNew?: boolean | null;\n compListingOnlyForSelectedSectionsEnabledNew?: boolean | null;\n compListingQuantityScoreAdjustmentEnabledNew?: boolean | null;\n compListingExcludeFanInventoryNew?: boolean | null;\n compListingExcludeDefectsNew?: boolean | null;\n compListingQuantityScoreAdjustmentOverrideJsonNew?: string | null;\n compListingSelectedSectionSettingsNew?: SelectedSectionSettingsWithOptionals | null;\n }) => {\n const {\n compListingModeNew,\n compListingFloorNew,\n compListingCeilingNew,\n compListingOnlyForSameZoneEnabledNew,\n compListingOnlyForSelectedSectionsEnabledNew,\n compListingQuantityScoreAdjustmentEnabledNew,\n compListingExcludeFanInventoryNew,\n compListingExcludeDefectsNew,\n compListingQuantityScoreAdjustmentOverrideJsonNew,\n compListingSelectedSectionSettingsNew,\n } = input;\n\n if (\n compListingModeNew !== undefined ||\n compListingFloorNew !== undefined ||\n compListingCeilingNew !== undefined ||\n compListingOnlyForSameZoneEnabledNew !== undefined ||\n compListingOnlyForSelectedSectionsEnabledNew !== undefined ||\n compListingQuantityScoreAdjustmentEnabledNew !== undefined ||\n compListingExcludeFanInventoryNew !== undefined ||\n compListingExcludeDefectsNew !== undefined ||\n compListingQuantityScoreAdjustmentOverrideJsonNew !== undefined ||\n compListingSelectedSectionSettingsNew !== undefined\n ) {\n const sanitizedCompListingOnlyForSameZoneEnabledNew =\n compListingOnlyForSelectedSectionsEnabledNew\n ? false\n : compListingOnlyForSameZoneEnabledNew;\n const sanitizedCompListingOnlyForSelectedSectionsEnabledNew =\n compListingOnlyForSameZoneEnabledNew\n ? false\n : compListingOnlyForSelectedSectionsEnabledNew;\n setValue(\n 'compListingMode',\n coalesceUndefinedOnly(\n compListingModeNew,\n compListingSettings.compListingMode\n )!\n );\n setValue(\n 'compListingFloor',\n coalesceUndefinedOnly(\n compListingFloorNew,\n compListingSettings.compListingFloor\n )!\n );\n setValue(\n 'compListingCeiling',\n coalesceUndefinedOnly(\n compListingCeilingNew,\n compListingSettings.compListingCeiling\n )!\n );\n setValue(\n 'compListingOnlyForSameZoneEnabled',\n coalesceUndefinedOnly(\n sanitizedCompListingOnlyForSameZoneEnabledNew,\n compListingSettings.compListingOnlyForSameZoneEnabled\n )!\n );\n setValue(\n 'compListingOnlyForSelectedSectionsEnabled',\n coalesceUndefinedOnly(\n sanitizedCompListingOnlyForSelectedSectionsEnabledNew,\n compListingSettings.compListingOnlyForSelectedSectionsEnabled\n )!\n );\n setValue(\n 'compListingQuantityScoreAdjustmentEnabled',\n coalesceUndefinedOnly(\n compListingQuantityScoreAdjustmentEnabledNew,\n compListingSettings.compListingQuantityScoreAdjustmentEnabled\n )!\n );\n setValue(\n 'compListingExcludeFanInventory',\n coalesceUndefinedOnly(\n compListingExcludeFanInventoryNew,\n compListingSettings.compListingExcludeFanInventory\n )!\n );\n setValue(\n 'compListingExcludeDefects',\n coalesceUndefinedOnly(\n compListingExcludeDefectsNew,\n compListingSettings.compListingExcludeDefects\n )!\n );\n setValue(\n 'compListingQuantityScoreAdjustmentOverrideJson',\n coalesceUndefinedOnly(\n compListingQuantityScoreAdjustmentOverrideJsonNew,\n compListingSettings.compListingQuantityScoreAdjustmentOverrideJson\n )!\n );\n // When setting the json quantity fitlers, we also want to override the structured quantity filters\n setValue(\n 'compListingQuantityFilters',\n coalesceUndefinedOnly(\n quantityFiltersFromJson(\n compListingQuantityScoreAdjustmentOverrideJsonNew\n ),\n compListingSettings.compListingQuantityFilters\n )!\n ),\n setValue(\n 'compListingSelectedSectionSettings',\n coalesceUndefinedOnly(\n mapToSelectedSectionSettings(\n compListingSelectedSectionSettingsNew\n ),\n compListingSettings.compListingSelectedSectionSettings\n )!\n );\n }\n },\n [\n setValue,\n compListingSettings.compListingMode,\n compListingSettings.compListingFloor,\n compListingSettings.compListingCeiling,\n compListingSettings.compListingOnlyForSameZoneEnabled,\n compListingSettings.compListingOnlyForSelectedSectionsEnabled,\n compListingSettings.compListingQuantityScoreAdjustmentEnabled,\n compListingSettings.compListingExcludeFanInventory,\n compListingSettings.compListingExcludeDefects,\n compListingSettings.compListingQuantityScoreAdjustmentOverrideJson,\n compListingSettings.compListingQuantityFilters,\n compListingSettings.compListingSelectedSectionSettings,\n ]\n );\n\n const onCircuitBreakerChange = useCallback(\n (\n circuitBreakerRelativeCeilingNew?: number | null,\n circuitBreakerRelativeFloorNew?: number | null,\n circuitBreakerMaxDiscountVelocityPercentNew?: number | null,\n circuitBreakerMaxDiscountVelocityTicksInHoursNew?: number | null,\n circuitBreakerMinCompListingCountNew?: number | null\n ) => {\n if (\n circuitBreakerRelativeCeilingNew !== undefined ||\n circuitBreakerRelativeFloorNew !== undefined ||\n circuitBreakerMaxDiscountVelocityPercentNew !== undefined ||\n circuitBreakerMaxDiscountVelocityTicksInHoursNew !== undefined ||\n circuitBreakerMinCompListingCountNew !== undefined\n ) {\n setValue(\n 'circuitBreakerRelativeCeiling',\n coalesceUndefinedOnly(\n circuitBreakerRelativeCeilingNew,\n circuitBreakerSettings.circuitBreakerRelativeCeiling\n ) ?? null\n );\n setValue(\n 'circuitBreakerRelativeFloor',\n coalesceUndefinedOnly(\n circuitBreakerRelativeFloorNew,\n circuitBreakerSettings.circuitBreakerRelativeFloor\n ) ?? null\n );\n setValue(\n 'circuitBreakerMaxDiscountVelocityPercent',\n coalesceUndefinedOnly(\n circuitBreakerMaxDiscountVelocityPercentNew,\n circuitBreakerSettings.circuitBreakerMaxDiscountVelocityPercent\n ) ?? null\n );\n setValue(\n 'circuitBreakerMaxDiscountVelocityTicksInHours',\n coalesceUndefinedOnly(\n circuitBreakerMaxDiscountVelocityTicksInHoursNew,\n circuitBreakerSettings.circuitBreakerMaxDiscountVelocityTicksInHours\n ) ?? null\n );\n setValue(\n 'circuitBreakerMinCompListingCount',\n coalesceUndefinedOnly(\n circuitBreakerMinCompListingCountNew,\n circuitBreakerSettings.circuitBreakerMinCompListingCount\n ) ?? null\n );\n }\n },\n [\n circuitBreakerSettings.circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerSettings.circuitBreakerMaxDiscountVelocityTicksInHours,\n circuitBreakerSettings.circuitBreakerMinCompListingCount,\n circuitBreakerSettings.circuitBreakerRelativeCeiling,\n circuitBreakerSettings.circuitBreakerRelativeFloor,\n setValue,\n ]\n );\n\n const onOutlierChange = useCallback(\n (input: {\n outlierModeNew?: AutoPricingOutlierMode | null;\n outlierStandardDeviationsNew?: number | null;\n outlierKthLowestLimitNew?: number | null;\n outlierKthLowestLimitRelativeSpacingNew?: number | null;\n outlierKthLowestLimitAbsoluteSpacingNew?: number | null;\n }) => {\n const {\n outlierModeNew,\n outlierStandardDeviationsNew,\n outlierKthLowestLimitNew,\n outlierKthLowestLimitRelativeSpacingNew,\n outlierKthLowestLimitAbsoluteSpacingNew,\n } = input;\n\n // Covers both null and undefined cases\n if (outlierModeNew !== undefined) {\n setValue(\n 'outlierMode',\n coalesceUndefinedOnly(outlierModeNew, outlierSettings.outlierMode) ??\n null\n );\n\n switch (outlierModeNew) {\n case AutoPricingOutlierMode.StandardDeviations:\n setValue(\n 'outlierStandardDeviations',\n coalesceUndefinedOnly(\n outlierStandardDeviationsNew,\n outlierSettings.outlierStandardDeviations\n ) ?? null\n );\n setValue('outlierKthLowestLimit', null);\n setValue('outlierKthLowestLimitRelativeSpacing', null);\n setValue('outlierKthLowestLimitAbsoluteSpacing', null);\n break;\n case AutoPricingOutlierMode.KthLowest:\n setValue('outlierStandardDeviations', null);\n setValue(\n 'outlierKthLowestLimit',\n coalesceUndefinedOnly(\n outlierKthLowestLimitNew,\n outlierSettings.outlierKthLowestLimit\n ) ?? null\n );\n\n setValue(\n 'outlierKthLowestLimitRelativeSpacing',\n coalesceUndefinedOnly(\n outlierKthLowestLimitRelativeSpacingNew,\n outlierSettings.outlierKthLowestLimitRelativeSpacing\n ) ?? null\n );\n\n setValue(\n 'outlierKthLowestLimitAbsoluteSpacing',\n coalesceUndefinedOnly(\n outlierKthLowestLimitAbsoluteSpacingNew,\n outlierSettings.outlierKthLowestLimitAbsoluteSpacing\n ) ?? null\n );\n break;\n case AutoPricingOutlierMode.SkipLogic:\n setValue('outlierStandardDeviations', null);\n setValue('outlierKthLowestLimit', null);\n setValue('outlierKthLowestLimitRelativeSpacing', null);\n setValue('outlierKthLowestLimitAbsoluteSpacing', null);\n }\n } else {\n setValue('outlierMode', null);\n setValue('outlierStandardDeviations', null);\n setValue('outlierKthLowestLimit', null);\n setValue('outlierKthLowestLimitRelativeSpacing', null);\n setValue('outlierKthLowestLimitAbsoluteSpacing', null);\n }\n },\n [\n outlierSettings.outlierKthLowestLimit,\n outlierSettings.outlierKthLowestLimitAbsoluteSpacing,\n outlierSettings.outlierKthLowestLimitRelativeSpacing,\n outlierSettings.outlierMode,\n outlierSettings.outlierStandardDeviations,\n setValue,\n ]\n );\n\n const setAutoPricingDefaults = useCallback(() => {\n if (!netProceedsFloor) {\n const proposedFloor = unitNetProceeds\n ? // If we have a non-zero list-price, we want the min of listprice or unitCost\n Math.min(\n unitNetProceeds,\n listing?.unitCst?.amt ??\n listing?.faceValue?.amt ??\n Number.MAX_SAFE_INTEGER\n )\n : // Else just use the unitCost\n (listing?.unitCst?.amt ?? listing?.faceValue?.amt ?? null);\n\n setValue('netProceedsFloor', proposedFloor);\n }\n\n // If this or any higher level don't have, set the default\n if (\n !undercutMode &&\n !eventPricingSettings?.undercutMode &&\n !accountPricingSettings?.undercutMode\n ) {\n setValue('undercutMode', undercutMode);\n setValue('undercutAbsoluteAmount', undercutAbsoluteAmount);\n setValue('undercutRelativeAmount', undercutRelativeAmount);\n }\n\n // If this or any higher level don't have, set the default\n if (\n !compListingMode &&\n !eventPricingSettings?.compListingMode &&\n !accountPricingSettings?.compListingMode\n ) {\n setValue('compListingMode', compListingMode);\n setValue('compListingFloor', compListingFloor);\n setValue('compListingCeiling', compListingCeiling);\n }\n }, [\n accountPricingSettings?.compListingMode,\n accountPricingSettings?.undercutMode,\n compListingCeiling,\n compListingFloor,\n compListingMode,\n eventPricingSettings?.compListingMode,\n eventPricingSettings?.undercutMode,\n listing?.faceValue?.amt,\n listing?.unitCst?.amt,\n netProceedsFloor,\n setValue,\n undercutAbsoluteAmount,\n undercutMode,\n undercutRelativeAmount,\n unitNetProceeds,\n ]);\n\n const applySectionRowFilterCompListingChanges = useCallback(\n (\n newSectionIdFilter: number[],\n sections: SectionInfo[],\n compListingSelectedSectionSettingsNew?:\n | SelectedSectionSettingsWithOptionals\n | null\n | undefined\n ) => {\n // If sectionIdFilter is empty, we should disable the compListingOnlyForSelectedSectionsEnabled\n // and revert back to QualitScore mode. When users add section filters, we should enable\n // compListingOnlyForSelectedSectionsEnabled and put the mode to SameEvent only on when the first\n // section is added. If the user swaps the comp mode after the first section we don't want to keep\n // forcing them back into SameEvent mode.\n if (newSectionIdFilter.length === 0 && sections.length > 0) {\n onCompListingChange({\n compListingSelectedSectionSettingsNew,\n compListingModeNew: defaultCompListingMode,\n compListingOnlyForSelectedSectionsEnabledNew: false,\n });\n } else {\n if (newSectionIdFilter.length === 1 && sections.length === 0) {\n onCompListingChange({\n compListingSelectedSectionSettingsNew,\n compListingModeNew: AutoPricingCompListingMode.SameEvent,\n compListingOnlyForSelectedSectionsEnabledNew: true,\n });\n\n return;\n }\n\n // Otherwise, just update the section filters and ensure the selectedSections flag is true\n onCompListingChange({\n compListingSelectedSectionSettingsNew,\n compListingOnlyForSelectedSectionsEnabledNew: true,\n });\n }\n },\n [defaultCompListingMode, onCompListingChange]\n );\n\n const onCompListingSectionIdFilterChange = useCallback(\n (\n sectionId: number,\n selectedSections: SectionInfo[],\n section?: SectionInfo\n ) => {\n let newSectionIdFilter =\n compListingSelectedSectionSettings?.sectionIdFilter ?? [];\n\n let newRowIdFilter =\n compListingSelectedSectionSettings?.rowIdFilter ?? [];\n\n let newSectionRowIdFilter =\n compListingSelectedSectionSettings?.sectionRowIdFilter ?? {};\n\n if (newSectionIdFilter.includes(sectionId)) {\n newSectionIdFilter = newSectionIdFilter.filter(\n (id) => id !== sectionId\n );\n\n // Remove all the associated row ids for this section\n const section = selectedSections.find((s) => s.id === sectionId);\n if (section) {\n const rowIds = section.rows.map((r) => r.id);\n newRowIdFilter = newRowIdFilter.filter((id) => !rowIds.includes(id));\n }\n\n // Remove the sectionRow mapping so we don't display it in pills\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { [sectionId]: omitted, ...updatedSectionRowIdFilter } =\n compListingSelectedSectionSettings?.sectionRowIdFilter ?? {};\n\n newSectionRowIdFilter = updatedSectionRowIdFilter;\n } else {\n newSectionIdFilter.push(sectionId);\n\n // If a section is present, add all the rows associated with the newly selected section\n if (section) {\n const newRowIds = section.rows.map((r) => r.id);\n newRowIds.forEach((newRowId) => {\n if (!newRowIdFilter.includes(newRowId)) {\n newRowIdFilter.push(newRowId);\n }\n });\n }\n }\n\n const compListingSelectedSectionSettingsNew = {\n ...compListingSelectedSectionSettings,\n sectionIdFilter: newSectionIdFilter,\n rowIdFilter: newRowIdFilter,\n sectionRowIdFilter: newSectionRowIdFilter,\n };\n\n applySectionRowFilterCompListingChanges(\n newSectionIdFilter,\n selectedSections,\n compListingSelectedSectionSettingsNew\n );\n },\n [\n applySectionRowFilterCompListingChanges,\n compListingSelectedSectionSettings,\n ]\n );\n\n const onCompListingSectionZoneChange = useCallback(\n (sections: SectionInfo[], flipOnSameSections = true) => {\n let newSectionIdFilter =\n compListingSelectedSectionSettings?.sectionIdFilter ?? [];\n\n let newRowIdFilter =\n compListingSelectedSectionSettings?.rowIdFilter ?? [];\n\n const newSectionRowIdFilter =\n compListingSelectedSectionSettings?.sectionRowIdFilter ?? {};\n\n // If every section passed in already exists in prevSections then we should remove them entirely\n const completelyOverlap = sections.every((section) =>\n newSectionIdFilter.includes(section.id)\n );\n\n if (completelyOverlap && flipOnSameSections) {\n const sectionIdsToRemove = new Set(\n sections.map((section) => section.id)\n );\n\n newSectionIdFilter = newSectionIdFilter.filter(\n (id) => !sectionIdsToRemove.has(id)\n );\n\n // Remove all associated rows as well\n const rowIdsToRemove = sections\n .map((section) => section.rows.map((r) => r.id))\n .flat();\n\n const rowIdsToRemoveSet = new Set(rowIdsToRemove);\n\n newRowIdFilter = newRowIdFilter.filter(\n (rowId) => !rowIdsToRemoveSet.has(rowId)\n );\n\n // Update sectionRowIdFilters to remove the sections that have been removed\n sections.forEach((section) => {\n if (section.id in newSectionRowIdFilter) {\n delete newSectionRowIdFilter[section.id];\n }\n });\n } else {\n // Upsert of the new sections\n sections.forEach((section) => {\n if (!(section.id in newSectionRowIdFilter)) {\n newSectionIdFilter.push(section.id);\n\n const newRowIds = section.rows.map((r) => r.id);\n newRowIds.forEach((newRowId) => {\n if (!newRowIdFilter.includes(newRowId)) {\n newRowIdFilter.push(newRowId);\n }\n });\n }\n });\n }\n\n const compListingSelectedSectionSettingsNew = {\n ...compListingSelectedSectionSettings,\n sectionIdFilter: newSectionIdFilter,\n rowIdFilter: newRowIdFilter,\n sectionRowIdFilter: newSectionRowIdFilter,\n };\n\n applySectionRowFilterCompListingChanges(\n newSectionIdFilter,\n sections,\n compListingSelectedSectionSettingsNew\n );\n },\n [\n applySectionRowFilterCompListingChanges,\n compListingSelectedSectionSettings,\n ]\n );\n\n const hasChanges = useCallback(\n (listingForm: ListingDetailsUpdateInput) => {\n const hasCompListingQuantityFiltersChanges =\n hasIntelligibleAutoPricingSettingsFeature &&\n !isEqual(\n formState.defaultValues?.compListingQuantityFilters,\n listingForm?.compListingQuantityFilters\n );\n\n // Make sure we only send back the settable props\n if (\n formState.defaultValues?.autoPricingEnabled !==\n listingForm.autoPricingEnabled ||\n formState.defaultValues?.netProceedsFloor !==\n listingForm.netProceedsFloor ||\n formState.defaultValues?.compListingMode !==\n listingForm.compListingMode ||\n formState.defaultValues?.compListingFloor !==\n listingForm.compListingFloor ||\n formState.defaultValues?.compListingCeiling !==\n listingForm.compListingCeiling ||\n formState.defaultValues?.compListingQuantityScoreAdjustmentEnabled !==\n listingForm.compListingQuantityScoreAdjustmentEnabled ||\n formState.defaultValues\n ?.compListingQuantityScoreAdjustmentOverrideJson !==\n listingForm.compListingQuantityScoreAdjustmentOverrideJson ||\n formState.defaultValues?.compListingOnlyForSameZoneEnabled !==\n listingForm.compListingOnlyForSameZoneEnabled ||\n formState.defaultValues?.compListingOnlyForSelectedSectionsEnabled !==\n listingForm.compListingOnlyForSelectedSectionsEnabled ||\n formState.defaultValues?.compListingExcludeFanInventory !==\n listingForm.compListingExcludeFanInventory ||\n formState.defaultValues?.compListingExcludeDefects !==\n listingForm.compListingExcludeDefects ||\n !isEqual(\n formState.defaultValues?.compListingSelectedSectionSettings,\n listingForm?.compListingSelectedSectionSettings\n ) ||\n hasCompListingQuantityFiltersChanges ||\n formState.defaultValues?.undercutMode !== listingForm.undercutMode ||\n formState.defaultValues?.undercutAbsoluteAmount !==\n listingForm.undercutAbsoluteAmount ||\n formState.defaultValues?.undercutRelativeAmount !==\n listingForm.undercutRelativeAmount ||\n formState.defaultValues?.circuitBreakerMaxDiscountVelocityPercent !==\n listingForm.circuitBreakerMaxDiscountVelocityPercent ||\n formState.defaultValues\n ?.circuitBreakerMaxDiscountVelocityTicksInHours !==\n listingForm.circuitBreakerMaxDiscountVelocityTicksInHours ||\n formState.defaultValues?.circuitBreakerMinCompListingCount !==\n listingForm.circuitBreakerMinCompListingCount ||\n formState.defaultValues?.circuitBreakerRelativeCeiling !==\n listingForm.circuitBreakerRelativeCeiling ||\n formState.defaultValues?.circuitBreakerRelativeFloor !==\n listingForm.circuitBreakerRelativeFloor ||\n formState.defaultValues?.outlierMode !== listingForm.outlierMode ||\n formState.defaultValues?.outlierStandardDeviations !==\n listingForm.outlierStandardDeviations ||\n formState.defaultValues?.outlierKthLowestLimit !==\n listingForm.outlierKthLowestLimit ||\n formState.defaultValues?.outlierKthLowestLimitRelativeSpacing !==\n listingForm.outlierKthLowestLimitRelativeSpacing ||\n formState.defaultValues?.outlierKthLowestLimitAbsoluteSpacing !==\n listingForm.outlierKthLowestLimitAbsoluteSpacing\n ) {\n return true;\n }\n },\n [\n hasIntelligibleAutoPricingSettingsFeature,\n formState.defaultValues?.compListingQuantityFilters,\n formState.defaultValues?.autoPricingEnabled,\n formState.defaultValues?.netProceedsFloor,\n formState.defaultValues?.compListingMode,\n formState.defaultValues?.compListingFloor,\n formState.defaultValues?.compListingCeiling,\n formState.defaultValues?.compListingQuantityScoreAdjustmentEnabled,\n formState.defaultValues?.compListingQuantityScoreAdjustmentOverrideJson,\n formState.defaultValues?.compListingOnlyForSameZoneEnabled,\n formState.defaultValues?.compListingOnlyForSelectedSectionsEnabled,\n formState.defaultValues?.compListingExcludeFanInventory,\n formState.defaultValues?.compListingExcludeDefects,\n formState.defaultValues?.compListingSelectedSectionSettings,\n formState.defaultValues?.undercutMode,\n formState.defaultValues?.undercutAbsoluteAmount,\n formState.defaultValues?.undercutRelativeAmount,\n formState.defaultValues?.circuitBreakerMaxDiscountVelocityPercent,\n formState.defaultValues?.circuitBreakerMaxDiscountVelocityTicksInHours,\n formState.defaultValues?.circuitBreakerMinCompListingCount,\n formState.defaultValues?.circuitBreakerRelativeCeiling,\n formState.defaultValues?.circuitBreakerRelativeFloor,\n formState.defaultValues?.outlierMode,\n formState.defaultValues?.outlierStandardDeviations,\n formState.defaultValues?.outlierKthLowestLimit,\n formState.defaultValues?.outlierKthLowestLimitRelativeSpacing,\n formState.defaultValues?.outlierKthLowestLimitAbsoluteSpacing,\n ]\n );\n\n const onCompListingModeChange = useCallback(\n (mode: AutoPricingCompListingMode | null) => {\n clearErrors('compListingFloor');\n\n if (!mode) {\n onCompListingChange({\n compListingModeNew: null,\n compListingFloorNew: null,\n compListingCeilingNew: null,\n });\n return;\n }\n\n onCompListingChange({\n compListingModeNew: mode,\n // Reset flag on mode change\n compListingOnlyForSameZoneEnabledNew: false,\n compListingOnlyForSelectedSectionsEnabledNew: false,\n });\n\n if (mode === AutoPricingCompListingMode.ParentListing) {\n onUndercutChange(AutoPricingUndercutMode.Simple);\n }\n },\n [clearErrors, onCompListingChange, onUndercutChange]\n );\n\n return {\n setValue,\n updateInput,\n canSetPrice,\n canAutoPrice,\n uiCurrency,\n currencyNumberFormat,\n showAutoPricingSettings: !(listing?.isDeleted || !canSetPrice),\n\n autoPricingEnabled,\n onResetSettings,\n onResetAdvanceSettings,\n setAutoPricingDefaults,\n eventPricingSettings,\n accountPricingSettings,\n event,\n\n ...circuitBreakerSettings,\n ...compListingSettings,\n ...undercutSettings,\n ...outlierSettings,\n\n onUndercutChange,\n onCompListingChange,\n onCircuitBreakerChange,\n onOutlierChange,\n onCompListingSectionIdFilterChange,\n onCompListingSectionZoneChange,\n onCompListingModeChange,\n\n skipAdvancePricing,\n skipAutoPricing,\n skipCompListing,\n skipUndercut,\n hasChanges,\n };\n};\n","import { useCallback, useEffect, useMemo, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { ButtonWithIcon } from 'src/components/Buttons';\nimport { Content } from 'src/contexts/ContentContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { PosSelect } from 'src/core/POS/PosSelect';\nimport { vars } from 'src/core/themes';\nimport {\n AutoPricingSettingsCollectionInput,\n AutoPricingStrategyDialog,\n AutoPricingStrategyDialogProps,\n} from 'src/dialogs/AutoPricingStrategyDialog';\nimport { useAutoPricingStrategies } from 'src/hooks/api/useAutoPricingStrategies';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { DetailGroup, DetailSection, SectionContent } from 'src/modals/common';\nimport { useHasListingPricePermissions } from 'src/modals/ListingDetails/components/useHasListingPricePermissions';\nimport { EditIcon, IconsFill, PlusIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n AutoPricingSettingsCollection,\n Listing,\n ListingDetailsAutoPricingSectionUpdates,\n} from 'src/WebApiController';\n\nimport { useAutoPricingSettings } from '../useAutoPricingSettings';\n\nexport const AutoPricingStrategySection = ({\n listing,\n disabled,\n isMarketListingsView = false,\n}: {\n listing?: Listing | null;\n disabled?: boolean;\n isMarketListingsView?: boolean;\n}) => {\n const {\n openDialog: openAutoPricingStrategyDialog,\n closeDialog: closeAutoPricingStrategyDialog,\n } = useDialog(\n DialogId.AutoPricingStrategy,\n AutoPricingStrategyDialog\n );\n const { canAutoPrice } = useHasListingPricePermissions(listing, false);\n\n const isMobile = useMatchMedia('mobile');\n\n const { setValue, watch } =\n useFormContext();\n const { autoPricingStrategiesQuery } = useAutoPricingStrategies(listing);\n\n const {\n autoPricingEnabled,\n\n undercutMode,\n undercutAbsoluteAmount,\n undercutRelativeAmount,\n\n compListingMode,\n compListingFloor,\n compListingCeiling,\n compListingQuantityScoreAdjustmentEnabled,\n compListingOnlyForSameZoneEnabled,\n compListingOnlyForSelectedSectionsEnabled,\n compListingExcludeFanInventory,\n\n circuitBreakerRelativeCeiling,\n circuitBreakerRelativeFloor,\n circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerMaxDiscountVelocityTicksInHours,\n circuitBreakerMinCompListingCount,\n\n outlierMode,\n outlierStandardDeviations,\n outlierKthLowestLimit,\n outlierKthLowestLimitRelativeSpacing,\n outlierKthLowestLimitAbsoluteSpacing,\n } = watch();\n\n const {\n onUndercutChange,\n onCompListingChange,\n onCircuitBreakerChange,\n onOutlierChange,\n } = useAutoPricingSettings(listing);\n\n const [selectedAutoPricingStrategyId, setSelectedAutoPricingStrategyId] =\n useState(null);\n\n const keyOptionsContent = useMemo(() => {\n return (\n autoPricingStrategiesQuery.data?.reduce(\n (re, r) => {\n re[r.autoPricingSettingsCollectionId?.toString() ?? ''] =\n r.strategyName;\n return re;\n },\n {} as Record\n ) ?? {}\n );\n }, [autoPricingStrategiesQuery.data]);\n\n useEffect(() => {\n const autoPricingStrategy = autoPricingStrategiesQuery.data?.find(\n (r) => r.autoPricingSettingsCollectionId === selectedAutoPricingStrategyId\n );\n\n if (selectedAutoPricingStrategyId) {\n if (!autoPricingStrategy) {\n // On strategy delete, reset the form\n setSelectedAutoPricingStrategyId(null);\n } else {\n // on strategy change, apply the settings to the form\n applyAutoPricingStrategy(autoPricingStrategy);\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [autoPricingStrategiesQuery.data]);\n\n const applyAutoPricingStrategy = useCallback(\n (autoPricingStrategy: AutoPricingSettingsCollection) => {\n // Apply the settings to the form\n setValue('autoPricingEnabled', true);\n setValue('skipAutoPricing', false);\n setValue('skipAdvancePricing', false);\n setValue('skipCompListing', false);\n setValue('skipUndercut', false);\n\n onUndercutChange(\n autoPricingStrategy.undercutMode,\n autoPricingStrategy.undercutAbsoluteAmount,\n autoPricingStrategy.undercutRelativeAmount\n );\n onCompListingChange({\n compListingModeNew: autoPricingStrategy.compListingMode,\n compListingFloorNew: autoPricingStrategy.compListingFloor,\n compListingCeilingNew: autoPricingStrategy.compListingCeiling,\n compListingOnlyForSameZoneEnabledNew:\n autoPricingStrategy.compListingOnlyForSameZoneEnabled,\n compListingOnlyForSelectedSectionsEnabledNew:\n autoPricingStrategy.compListingOnlyForSelectedSectionsEnabled,\n compListingQuantityScoreAdjustmentEnabledNew:\n autoPricingStrategy.compListingQuantityScoreAdjustmentEnabled,\n compListingExcludeFanInventoryNew:\n autoPricingStrategy.compListingExcludeFanInventory,\n compListingQuantityScoreAdjustmentOverrideJsonNew:\n autoPricingStrategy.compListingQuantityScoreAdjustmentOverrideJson,\n });\n onCircuitBreakerChange(\n autoPricingStrategy.circuitBreakerRelativeCeiling,\n autoPricingStrategy.circuitBreakerRelativeFloor,\n autoPricingStrategy.circuitBreakerMaxDiscountVelocityPercent,\n autoPricingStrategy.circuitBreakerMaxDiscountVelocityTicksInHours,\n autoPricingStrategy.circuitBreakerMinCompListingCount\n );\n onOutlierChange({\n outlierModeNew: autoPricingStrategy.outlierMode,\n outlierStandardDeviationsNew:\n autoPricingStrategy.outlierStandardDeviations,\n outlierKthLowestLimitNew: autoPricingStrategy.outlierKthLowestLimit,\n outlierKthLowestLimitRelativeSpacingNew:\n autoPricingStrategy.outlierKthLowestLimitRelativeSpacing,\n outlierKthLowestLimitAbsoluteSpacingNew:\n autoPricingStrategy.outlierKthLowestLimitAbsoluteSpacing,\n });\n\n setSelectedAutoPricingStrategyId(\n autoPricingStrategy.autoPricingSettingsCollectionId\n );\n },\n [\n onCircuitBreakerChange,\n onCompListingChange,\n onOutlierChange,\n onUndercutChange,\n setValue,\n ]\n );\n\n const onAutoPricingStrategyChange = useCallback(\n (value: string) => {\n if (!value) return;\n\n const autoPricingStrategy = autoPricingStrategiesQuery.data?.find(\n (r) => r.autoPricingSettingsCollectionId === parseInt(value, 10)\n );\n if (!autoPricingStrategy) {\n return;\n }\n\n applyAutoPricingStrategy(autoPricingStrategy);\n },\n [applyAutoPricingStrategy, autoPricingStrategiesQuery.data]\n );\n\n const currentValueEqualsSelectedStrategy = useMemo(() => {\n const autoPricingStrategy = autoPricingStrategiesQuery.data?.find(\n (r) => r.autoPricingSettingsCollectionId === selectedAutoPricingStrategyId\n );\n\n if (!autoPricingStrategy) return true;\n\n return (\n autoPricingEnabled === true &&\n autoPricingStrategy &&\n (autoPricingStrategy.undercutMode == null ||\n autoPricingStrategy.undercutMode === undercutMode) &&\n (autoPricingStrategy.undercutAbsoluteAmount == null ||\n autoPricingStrategy.undercutAbsoluteAmount ===\n undercutAbsoluteAmount) &&\n (autoPricingStrategy.undercutRelativeAmount == null ||\n autoPricingStrategy.undercutRelativeAmount ===\n undercutRelativeAmount) &&\n (autoPricingStrategy.compListingMode == null ||\n autoPricingStrategy.compListingMode === compListingMode) &&\n (autoPricingStrategy.compListingFloor == null ||\n autoPricingStrategy.compListingFloor === compListingFloor) &&\n (autoPricingStrategy.compListingCeiling == null ||\n autoPricingStrategy.compListingCeiling === compListingCeiling) &&\n (autoPricingStrategy.compListingQuantityScoreAdjustmentEnabled == null ||\n autoPricingStrategy.compListingQuantityScoreAdjustmentEnabled ===\n compListingQuantityScoreAdjustmentEnabled) &&\n (autoPricingStrategy.compListingOnlyForSameZoneEnabled == null ||\n autoPricingStrategy.compListingOnlyForSameZoneEnabled ===\n compListingOnlyForSameZoneEnabled) &&\n (autoPricingStrategy.compListingOnlyForSelectedSectionsEnabled == null ||\n autoPricingStrategy.compListingOnlyForSelectedSectionsEnabled ===\n compListingOnlyForSelectedSectionsEnabled) &&\n (autoPricingStrategy.compListingExcludeFanInventory == null ||\n autoPricingStrategy.compListingExcludeFanInventory ===\n compListingExcludeFanInventory) &&\n (autoPricingStrategy.circuitBreakerRelativeCeiling == null ||\n autoPricingStrategy.circuitBreakerRelativeCeiling ===\n circuitBreakerRelativeCeiling) &&\n (autoPricingStrategy.circuitBreakerRelativeFloor == null ||\n autoPricingStrategy.circuitBreakerRelativeFloor ===\n circuitBreakerRelativeFloor) &&\n (autoPricingStrategy.circuitBreakerMaxDiscountVelocityPercent == null ||\n autoPricingStrategy.circuitBreakerMaxDiscountVelocityPercent ===\n circuitBreakerMaxDiscountVelocityPercent) &&\n (autoPricingStrategy.circuitBreakerMaxDiscountVelocityTicksInHours ==\n null ||\n autoPricingStrategy.circuitBreakerMaxDiscountVelocityTicksInHours ===\n circuitBreakerMaxDiscountVelocityTicksInHours) &&\n (autoPricingStrategy.circuitBreakerMinCompListingCount == null ||\n autoPricingStrategy.circuitBreakerMinCompListingCount ===\n circuitBreakerMinCompListingCount) &&\n (autoPricingStrategy.outlierMode == null ||\n autoPricingStrategy.outlierMode === outlierMode) &&\n (autoPricingStrategy.outlierStandardDeviations == null ||\n autoPricingStrategy.outlierStandardDeviations ===\n outlierStandardDeviations) &&\n (autoPricingStrategy.outlierKthLowestLimit == null ||\n autoPricingStrategy.outlierKthLowestLimit === outlierKthLowestLimit) &&\n (autoPricingStrategy.outlierKthLowestLimitRelativeSpacing == null ||\n autoPricingStrategy.outlierKthLowestLimitRelativeSpacing ===\n outlierKthLowestLimitRelativeSpacing) &&\n (autoPricingStrategy.outlierKthLowestLimitAbsoluteSpacing == null ||\n autoPricingStrategy.outlierKthLowestLimitAbsoluteSpacing ===\n outlierKthLowestLimitAbsoluteSpacing)\n );\n }, [\n autoPricingEnabled,\n autoPricingStrategiesQuery.data,\n circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerMaxDiscountVelocityTicksInHours,\n circuitBreakerMinCompListingCount,\n circuitBreakerRelativeCeiling,\n circuitBreakerRelativeFloor,\n compListingCeiling,\n compListingFloor,\n compListingMode,\n compListingOnlyForSameZoneEnabled,\n compListingOnlyForSelectedSectionsEnabled,\n compListingExcludeFanInventory,\n compListingQuantityScoreAdjustmentEnabled,\n outlierMode,\n outlierStandardDeviations,\n outlierKthLowestLimit,\n outlierKthLowestLimitRelativeSpacing,\n outlierKthLowestLimitAbsoluteSpacing,\n selectedAutoPricingStrategyId,\n undercutAbsoluteAmount,\n undercutMode,\n undercutRelativeAmount,\n ]);\n\n const isStrategyApplied =\n currentValueEqualsSelectedStrategy && selectedAutoPricingStrategyId;\n\n const defaultValuesForStrategy = useMemo(() => {\n const autoPricingStrategy = isStrategyApplied\n ? autoPricingStrategiesQuery.data?.find(\n (r) =>\n r.autoPricingSettingsCollectionId === selectedAutoPricingStrategyId\n )\n : undefined;\n\n return {\n autoPricingSettingsCollectionId:\n autoPricingStrategy?.autoPricingSettingsCollectionId,\n strategyName: autoPricingStrategy?.strategyName,\n\n skipAutoPricing: false,\n skipAdvancePricing: false,\n skipCompListing: false,\n skipUndercut: false,\n\n autoPricingEnabled,\n\n undercutMode,\n undercutAbsoluteAmount,\n undercutRelativeAmount,\n\n compListingMode,\n compListingFloor,\n compListingCeiling,\n compListingQuantityScoreAdjustmentEnabled,\n compListingOnlyForSameZoneEnabled,\n compListingOnlyForSelectedSectionsEnabled,\n compListingExcludeFanInventory,\n\n circuitBreakerRelativeCeiling,\n circuitBreakerRelativeFloor,\n circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerMaxDiscountVelocityTicksInHours,\n circuitBreakerMinCompListingCount,\n\n outlierMode,\n outlierStandardDeviations,\n outlierKthLowestLimit,\n outlierKthLowestLimitRelativeSpacing,\n outlierKthLowestLimitAbsoluteSpacing,\n } as AutoPricingSettingsCollectionInput;\n }, [\n autoPricingEnabled,\n autoPricingStrategiesQuery.data,\n circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerMaxDiscountVelocityTicksInHours,\n circuitBreakerMinCompListingCount,\n circuitBreakerRelativeCeiling,\n circuitBreakerRelativeFloor,\n compListingCeiling,\n compListingFloor,\n compListingMode,\n compListingOnlyForSameZoneEnabled,\n compListingOnlyForSelectedSectionsEnabled,\n compListingExcludeFanInventory,\n compListingQuantityScoreAdjustmentEnabled,\n isStrategyApplied,\n outlierMode,\n outlierStandardDeviations,\n outlierKthLowestLimit,\n outlierKthLowestLimitRelativeSpacing,\n outlierKthLowestLimitAbsoluteSpacing,\n selectedAutoPricingStrategyId,\n undercutAbsoluteAmount,\n undercutMode,\n undercutRelativeAmount,\n ]);\n\n if (!canAutoPrice && !isMarketListingsView) {\n return null;\n }\n\n const sectionContent = (\n \n \n e.stopPropagation()}\n />\n \n \n \n ) : (\n \n )\n }\n textContentId={\n isStrategyApplied\n ? isMarketListingsView\n ? ContentId.Edit\n : ContentId.EditPricingStrategy\n : ContentId.CreatePricingStrategy\n }\n onClick={() =>\n openAutoPricingStrategyDialog({\n defaultValues: defaultValuesForStrategy,\n listing: listing!,\n isLoading: autoPricingStrategiesQuery.isLoading,\n onClosed: closeAutoPricingStrategyDialog,\n onStrategyUpdated: (strategyId: number) => {\n if (strategyId !== selectedAutoPricingStrategyId) {\n // An insert\n setSelectedAutoPricingStrategyId(strategyId);\n onAutoPricingStrategyChange(strategyId.toString());\n }\n closeAutoPricingStrategyDialog();\n },\n isBulkEdit: false,\n listingHasParent: false,\n disabled,\n })\n }\n disabled={disabled}\n style={{ padding: 0, textAlign: 'start' }}\n />\n \n \n );\n\n return (\n <>\n {isMarketListingsView ? (\n sectionContent\n ) : (\n }>\n {sectionContent}\n \n )}\n \n );\n};\n","import { ChangeEvent, useCallback, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport {\n AutoPricingSettingsFormContent,\n AutoPricingSettingsFormContentCoreProps,\n PricingSetting,\n} from 'src/components/AutoPricing/AutoPricingSettingsFormContent/AutoPricingSettingsFormContent';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { Stack, Switch } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n getAllInPriceFromListPrice,\n getListPriceFromAllinPrice,\n} from 'src/utils/inventoryUtils';\nimport {\n Listing,\n ListingDetailsAutoPricingSectionUpdates,\n UiCurrency,\n} from 'src/WebApiController';\n\nimport * as styles from './ListingAutoPricingSettingsFormContent.css';\n\nexport type ListingAutoPricingSettingsFormContentProps =\n AutoPricingSettingsFormContentCoreProps & {\n listing: Listing | null | undefined;\n isGlobalEdit: boolean | undefined;\n sellerFee: number | null | undefined;\n autoPricingStrategySection?: React.ReactNode;\n };\n\nexport const ListingAutoPricingSettingsFormContent = ({\n listing,\n disabled,\n sellerFee,\n autoPricingStrategySection,\n ...rest\n}: ListingAutoPricingSettingsFormContentProps) => {\n const { watch, setValue } =\n useFormContext();\n\n const { autoPricingEnabled } = watch();\n\n return (\n <>\n \n {autoPricingStrategySection && (\n }\n detail={autoPricingStrategySection}\n />\n )}\n\n }\n detail={\n e.stopPropagation()}\n onCheckedChange={(isChecked: boolean) => {\n if (isChecked !== autoPricingEnabled) {\n setValue('autoPricingEnabled', isChecked);\n }\n }}\n />\n }\n />\n \n }\n pricingProtectionSectionChildren={\n \n }\n {...rest}\n />\n \n );\n};\n\nconst PricingProtectionSettings = ({\n listing,\n sellerFee,\n uiCurrency,\n disabled,\n}: {\n listing: Listing | null | undefined;\n sellerFee: number | null | undefined;\n uiCurrency: UiCurrency;\n disabled: boolean;\n}) => {\n const { watch, setValue } =\n useFormContext();\n\n const { netProceedsFloor, netProceedsCeiling } = watch();\n\n const allInFloor = useMemo(() => {\n return getAllInPriceFromListPrice(netProceedsFloor, listing, sellerFee);\n }, [listing, netProceedsFloor, sellerFee]);\n const allInCeiling = useMemo(() => {\n return getAllInPriceFromListPrice(netProceedsCeiling, listing, sellerFee);\n }, [listing, netProceedsCeiling, sellerFee]);\n\n const onPriceValueChange = useCallback(\n (\n e: ChangeEvent,\n valueName: 'netProceedsFloor' | 'netProceedsCeiling'\n ) => {\n const v = parseFloat(e.target.value);\n if (v >= 0 && v <= Number.MAX_VALUE) {\n const netProceedsValueNew = getListPriceFromAllinPrice(\n v,\n listing,\n sellerFee\n )!;\n setValue(valueName, netProceedsValueNew);\n } else {\n setValue(valueName, null);\n }\n },\n [listing, sellerFee, setValue]\n );\n\n return (\n <>\n }\n detail={\n \n \n onPriceValueChange(e, 'netProceedsFloor')}\n />\n \n
    \n \n
    \n \n onPriceValueChange(e, 'netProceedsCeiling')}\n />\n \n
    \n }\n />\n \n );\n};\n","import { useMemo } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { Button, Stack } from 'src/core/ui';\nimport { useListingHasVenueMapInfo } from 'src/hooks/useListingHasVenueMapInfo';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ListingTab } from 'src/modals/ListingDetails/components/listingDetailsUtils';\nimport { useHasListingPricePermissions } from 'src/modals/ListingDetails/components/useHasListingPricePermissions';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getCompleteEventConfigScoreOverrides } from 'src/utils/seatScoreUtils';\nimport { Feature, Listing, Marketplace } from 'src/WebApiController';\n\nimport { AutoPricingStrategySection } from '../../Sections/AutoPricingStrategySection';\nimport { ListingAutoPricingSettingsFormContent } from '../ListingAutoPricingSettingsFormContent/ListingAutoPricingSettingsFormContent';\n\nexport const ListingAutoPricingSettingsFormContentWrapper = ({\n listing,\n isBulkEdit,\n isGlobalEdit,\n disabled,\n onSwitchToTab,\n}: {\n listing: Listing | null | undefined;\n isBulkEdit?: boolean;\n isGlobalEdit?: boolean;\n disabled: boolean;\n onSwitchToTab?: (tabName: ListingTab) => void;\n}) => {\n const { loginContext } = useAppContext();\n const { getUiCurrency } = useLocalizationContext();\n const stubHubMkpSettings =\n loginContext?.user?.activeAccount?.marketplaceSettings?.find(\n (m) => m.mkp === Marketplace.StubHub\n );\n\n const uiCurrency = useMemo(\n () =>\n getUiCurrency(\n listing?.currency ?? loginContext?.user?.activeAccount?.currencyCode\n ),\n [\n getUiCurrency,\n listing?.currency,\n loginContext?.user?.activeAccount?.currencyCode,\n ]\n );\n\n const { canAutoPrice } = useHasListingPricePermissions(listing, isBulkEdit);\n const { hasVenueMapInfo, mapExists } = useListingHasVenueMapInfo(listing);\n\n const { activeConfigOverride, venueMapInfo, venueMapsByScoreModelQuery } =\n useEventMapContext();\n\n const defaultScoreOverrides = useMemo(() => {\n // In the backend, if AVG scores are missing, then we always fallback to MVG, even if AVG is explicitly selected\n return (\n venueMapsByScoreModelQuery?.data?.AdvancedVenueGeometry?.sectionScores ??\n venueMapsByScoreModelQuery?.data?.MergedVenueGeometry?.sectionScores ??\n venueMapsByScoreModelQuery?.data?.VenueGeometry?.sectionScores\n );\n }, [\n venueMapsByScoreModelQuery?.data?.AdvancedVenueGeometry?.sectionScores,\n venueMapsByScoreModelQuery?.data?.MergedVenueGeometry?.sectionScores,\n venueMapsByScoreModelQuery?.data?.VenueGeometry?.sectionScores,\n ]);\n\n const scores = getCompleteEventConfigScoreOverrides(\n defaultScoreOverrides,\n activeConfigOverride?.scoreOverrides,\n false\n );\n\n const hasAllowSeatScoreCompListingModeFeature = useUserHasFeature(\n Feature.AllowSeatScoreCompListingMode\n );\n\n return (isBulkEdit || hasVenueMapInfo) && canAutoPrice ? (\n s.score))}\n sellerFee={stubHubMkpSettings?.sellerFee}\n uiCurrency={uiCurrency}\n allowSeatScoreCompListingMode={hasAllowSeatScoreCompListingModeFeature}\n isGlobalEdit={isGlobalEdit}\n disabled={disabled}\n autoPricingStrategySection={\n \n }\n />\n ) : (\n \n {!canAutoPrice ? (\n \n ) : mapExists && !hasVenueMapInfo ? (\n <>\n \n\n onSwitchToTab?.(ListingTab.Broadcast)}\n style={{ width: 'max-content', padding: '0' }}\n >\n \n \n \n ) : (\n \n )}\n \n );\n};\n","import { useUserHasAutopricingFeature } from 'src/hooks/useUserHasAutopricingFeature';\nimport { AutoPricingSection } from 'src/modals/ListingDetails/components/PricingSection/AutoPricingSection';\nimport { ListingAutoPricingSettingsFormContentWrapper } from 'src/modals/ListingDetails/ListingForms/AutoPricingForm/components/ListingAutoPricingSettingsFormContentWrapper/ListingAutoPricingSettingsFormContentWrapper';\nimport { Feature } from 'src/WebApiController';\n\nexport const AutoPricingSettings = ({\n isLoading,\n hasParents,\n isGlobalEdit,\n}: {\n isLoading?: boolean;\n hasParents?: boolean;\n isGlobalEdit?: boolean;\n}) => {\n const hasIntelligibleAutoPricingSettingsFeature =\n useUserHasAutopricingFeature(Feature.IntelligibleAutoPricingSettings);\n\n return (\n <>\n {hasIntelligibleAutoPricingSettingsFeature ? (\n \n ) : (\n \n )}\n \n );\n};\n","import { useFormContext } from 'react-hook-form';\nimport { Content } from 'src/contexts/ContentContext';\nimport { DetailSection } from 'src/modals/common';\nimport { ListingNotesSection } from 'src/modals/common/ListingNotesSection';\nimport {\n DeliverySection,\n EconomicsSection,\n TicketsSection,\n} from 'src/modals/ListingDetails/components';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n Event,\n ListingDetails,\n ListingDetailsUpdateInput,\n} from 'src/WebApiController';\n\nexport const GeneralSettings = ({\n event,\n isLoading,\n}: {\n listing?: ListingDetails | undefined;\n event?: Event;\n isLoading?: boolean;\n}) => {\n const { watch } = useFormContext();\n\n return (\n <>\n \n\n \n\n \n \n );\n};\n","/* eslint-disable react-hooks/exhaustive-deps */\nimport { HubConnectionState } from '@microsoft/signalr';\nimport { ComponentProps, useCallback, useMemo, useRef, useState } from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { Modal as RSModal } from 'reactstrap';\nimport { BulkEditStatus } from 'src/components/common/BulkActions/BulkEditStatus';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport {\n BulkEditStage,\n useBulkEditHubContext,\n} from 'src/contexts/BulkEditHubContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { EventMapContextProvider } from 'src/contexts/EventMapContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { Stack } from 'src/core/ui';\nimport { useBulkEditHub } from 'src/hooks/useBulkEditHub';\nimport { useGetAccountAutoPricingSettings } from 'src/hooks/useGetAccountAutoPricingSettings';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { flattenListingGroup } from 'src/modals/GroupListings/components/groupingUtils';\nimport { validateAutoPricingSettings } from 'src/utils/autoPricingUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n getListingDetailsUpdateInput,\n isListingDetailsInputChanged,\n} from 'src/utils/inventoryUtils';\nimport {\n ActionOutboxEntityType,\n BulkActionType,\n BulkEditPreviewWithDetails,\n BulkEditProgress,\n BulkEditStep,\n Event,\n Feature,\n Listing,\n ListingDetails,\n ListingDetailsUpdateInput,\n} from 'src/WebApiController';\n\nimport { BulkEditFooter } from '../common/BulkEditFooter';\nimport { BulkEditHeader } from '../common/BulkEditHeader';\nimport { AutoPricingSettings } from './components/AutoPricingSettings';\nimport { GeneralSettings } from './components/GeneralSettings';\n\nexport type BulkEditListingSettingsDialogProps = ComponentProps<\n typeof RSModal\n> & {\n updateKey: string;\n isLoading?: boolean;\n listings?: Listing[] | null;\n selectedListingIds?: number[];\n event?: Event;\n onOkay: (\n listing: ListingDetailsUpdateInput | null,\n hasPurchaseUpdate: boolean,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => void;\n onCancel?: () => void;\n bulkEditMode: 'autoPricing' | 'general';\n};\n\nexport const BulkEditListingSettingsDialog = ({\n listings,\n ...rest\n}: BulkEditListingSettingsDialogProps) => {\n const methods = useForm({\n defaultValues: getListingDetailsUpdateInput(\n null,\n null,\n [],\n null,\n null,\n true\n ),\n });\n\n return (\n \n \n \n );\n};\n\nfunction BulkEditListingSettingsDialogContent({\n updateKey,\n isLoading,\n listings,\n bulkEditMode,\n selectedListingIds,\n event,\n onOkay,\n onCancel,\n handleSubmit,\n getValues,\n clearErrors,\n setError,\n setValue,\n watch,\n reset,\n formState,\n ...rest\n}: BulkEditListingSettingsDialogProps &\n Omit<\n ComponentProps>,\n 'children'\n >) {\n const { setActivePosEntity } = useActivePosEntityContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n const { setSelectionMode } = useMultiSelectionContext();\n const { setProgress, setPreview, setMainDialogOpened } =\n useBulkEditHubContext();\n\n const hasAllowSeatScoreCompListingModeFeature = useUserHasFeature(\n Feature.AllowSeatScoreCompListingMode\n );\n\n const { pricingSettings } = useGetAccountAutoPricingSettings();\n\n const input = watch();\n\n const onClose = useCallback(\n async (\n newProgress?: BulkEditProgress,\n closeMainDialogForPopover?: boolean\n ) => {\n if (newProgress?.step === BulkEditStep.Done) {\n setIsRefreshing(true);\n setActivePosEntity(0);\n await refreshExpandedListItems();\n setSelectionMode(undefined);\n if (closeMainDialogForPopover) {\n setMainDialogOpened(false);\n } else {\n setProgress(undefined);\n setPreview(undefined);\n }\n setIsRefreshing(false);\n // progress kept to allow the BulkEditStatusPopover to show the result\n }\n onCancel?.();\n },\n [\n onCancel,\n refreshExpandedListItems,\n setActivePosEntity,\n setMainDialogOpened,\n setPreview,\n setProgress,\n setSelectionMode,\n ]\n );\n\n const onBulkEditDone = useCallback(\n async (doneProgress: BulkEditProgress, finalErrors: string[]) => {\n if (finalErrors.length === 0 && doneProgress.step === BulkEditStep.Done) {\n onClose(doneProgress, true);\n }\n },\n [onClose]\n );\n\n const { bulkEditHub, progress, stage, preview, initJob } = useBulkEditHub(\n ActionOutboxEntityType.Listing,\n bulkEditMode === 'autoPricing'\n ? BulkActionType.UpdateAutoPricingSettings\n : BulkActionType.UpdateGeneralSettings,\n updateKey,\n onBulkEditDone\n );\n\n const selectedListings = useMemo(() => {\n const flattenedListings = listings?.flatMap((l) => flattenListingGroup(l));\n return flattenedListings\n ?.filter((l) => l.isFull && selectedListingIds?.includes(l.id))\n .map((l) => l as Listing);\n }, [listings, selectedListingIds]);\n\n const hasParents = useMemo(() => {\n return selectedListings?.every((l) => !!l.ltGrpParentId);\n }, [selectedListings]);\n\n const hasBackgroundBulkEditFeature =\n bulkEditHub?.state === HubConnectionState.Connected;\n\n const floorMustBeLessThanCeilingError = useContent(\n ContentId.FloorMustBeLessThanCeiling\n );\n\n const compListingFloorCeilingError = useContent(\n ContentId.CompListingFloorMustLessThanCeiling\n );\n\n const requiredMsg = useContent(ContentId.Required);\n\n const onSubmitHandler = useCallback(\n (onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void) => {\n const listForm = getValues();\n if (\n !validateAutoPricingSettings(\n clearErrors,\n setError,\n setValue,\n listForm,\n floorMustBeLessThanCeilingError,\n compListingFloorCeilingError,\n requiredMsg\n )\n )\n return;\n\n if (onPreviewReceived) {\n const hasPurchaseUpdate = listForm.buyerUserId != null;\n onOkay(null, hasPurchaseUpdate, false, onPreviewReceived);\n } else {\n handleSubmit((i) =>\n onOkay(\n i,\n i.buyerUserId != null,\n hasBackgroundBulkEditFeature,\n undefined,\n preview\n )\n )();\n }\n },\n [onOkay, preview, hasBackgroundBulkEditFeature]\n );\n\n const [isRefreshing, setIsRefreshing] = useState(false);\n\n const isInputValid = useMemo(() => {\n return isListingDetailsInputChanged(\n input,\n formState.defaultValues as ListingDetailsUpdateInput\n );\n }, [input, formState.defaultValues]);\n\n const submittButtonRef = useRef(null);\n\n return (\n <>\n \n }\n />\n }\n onOpened={() => {\n reset(\n getListingDetailsUpdateInput(\n null,\n null,\n [],\n pricingSettings,\n null,\n true,\n null,\n hasAllowSeatScoreCompListingModeFeature\n )\n );\n initJob();\n }}\n onKeyUp={(e) => {\n if (submittButtonRef.current && e.key === 'Enter' && isInputValid) {\n submittButtonRef.current.click();\n }\n }}\n onClosed={() => {\n setMainDialogOpened(false);\n if (progress) {\n setSelectionMode(undefined);\n }\n\n rest.onClosed?.();\n }}\n footer={\n \n }\n onCancel={isLoading ? undefined : onCancel}\n >\n \n \n \n {bulkEditMode === 'autoPricing' && (\n \n )}\n {bulkEditMode === 'general' && (\n \n )}\n \n \n \n \n \n );\n}\n","import { useBulkPricingActionsPermissions } from 'src/components/common/BulkActions/BulkPricingActions/useBulkPricingActionsPermissions';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nexport const LaunchUpdateListingSettings = ({\n onClick,\n disabled,\n bulkEditMode,\n}: {\n onClick: (e: React.MouseEvent) => void;\n disabled?: boolean;\n\n bulkEditMode: 'general' | 'autoPricing';\n}) => {\n const {\n hasUpdateListingPermission,\n hasAutoPricingFeature,\n hasEditPricingPermission,\n } = useBulkPricingActionsPermissions();\n\n if (bulkEditMode === 'general' && !hasUpdateListingPermission) {\n return null;\n }\n\n if (\n bulkEditMode === 'autoPricing' &&\n (!hasAutoPricingFeature || !hasEditPricingPermission)\n ) {\n return null;\n }\n\n return (\n \n {bulkEditMode === 'general' ? (\n \n \n \n ) : (\n \n )}\n \n );\n};\n","import { useCallback, useMemo } from 'react';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport {\n BulkEditListingSettingsDialog,\n BulkEditListingSettingsDialogProps,\n} from 'src/dialogs/BulkEdits/BulkEditListingSettingsDialog';\nimport { flattenListingGroup } from 'src/modals/GroupListings/components/groupingUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n BulkEditListingClient,\n BulkEditPreviewWithDetails,\n Event,\n Listing,\n ListingDetails,\n ListingDetailsUpdateInput,\n ListingQuery,\n} from 'src/WebApiController';\n\nimport {\n INVENTORY_BULK_UPDATE_AUTOPRICING_SETTINGS_UPDATE_KEY,\n INVENTORY_BULK_UPDATE_GENERAL_SETTINGS_UPDATE_KEY,\n} from '../../InventoryActionDropdown.constants';\nimport { LaunchUpdateListingSettings } from './LaunchUpdateListingSettings';\n\nexport const useBulkUpdateListingSettings = (\n bulkEditMode: 'general' | 'autoPricing',\n filterQueryWithEventIds: ListingQuery,\n affectedVisibleListingIds: number[],\n setIsLoading: (v: boolean) => void,\n isLoading?: boolean,\n event?: Event\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const updateKey =\n bulkEditMode === 'general'\n ? event\n ? `listingSettings-event-${event?.viagVirtualId}`\n : INVENTORY_BULK_UPDATE_GENERAL_SETTINGS_UPDATE_KEY\n : event\n ? `autopricingSettings-event-${event?.viagVirtualId}`\n : INVENTORY_BULK_UPDATE_AUTOPRICING_SETTINGS_UPDATE_KEY;\n\n const { setActivePosEntity } = useActivePosEntityContext();\n\n const {\n eventsTransformed,\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const { openDialog: openBulkEditDialog, closeDialog: closeBulkEditDialog } =\n useDialog(\n DialogId.BulkEditListingSettings,\n BulkEditListingSettingsDialog\n );\n\n const onSubmit = useCallback(\n (\n listingUpdate: ListingDetailsUpdateInput | null,\n hasPurchaseUpdate: boolean,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n tryInvokeApi(\n async () => {\n const client = await new BulkEditListingClient(\n activeAccountWebClientConfig\n );\n const preview =\n bulkEditMode === 'general'\n ? await client.bulkUpdateGeneralSettingsPreview(\n filterQueryWithEventIds,\n hasPurchaseUpdate\n )\n : await client.bulkUpdateAutoPricingSettingsPreview(\n filterQueryWithEventIds\n );\n\n onPreviewReceived(preview);\n },\n (error) => {\n showErrorDialog('bulkUpdateGeneralSettingsPreview', error, {\n trackErrorData: {\n filterQueryWithEventIds,\n hasPurchaseUpdate,\n bulkEditMode,\n },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n } else if (listingUpdate) {\n tryInvokeApi(\n async () => {\n const client = await new BulkEditListingClient(\n activeAccountWebClientConfig\n );\n const input = {\n item1: preview!.preview,\n item2: listingUpdate,\n };\n\n const succeeded =\n bulkEditMode === 'general'\n ? await client.bulkUpdateGeneralSettings(\n input,\n updateKey,\n supportBackgroundProcess\n )\n : await client.bulkUpdateAutoPricingSettings(\n input,\n updateKey,\n supportBackgroundProcess\n );\n\n if (!supportBackgroundProcess) {\n if (succeeded) {\n // Invalidate the activePosEntity, so that when clicking on listingDetails\n // we force re-loading the listing and newest pricing settings can be displayed\n setActivePosEntity(0);\n await refreshExpandedListItems();\n }\n\n closeBulkEditDialog();\n }\n },\n (error) => {\n showErrorDialog(\n bulkEditMode === 'general'\n ? 'bulkUpdateGeneralSettings'\n : 'bulkUpdateAutoPricingSettings',\n error,\n {\n trackErrorData: {\n listingUpdate,\n preview,\n hasPurchaseUpdate,\n bulkEditMode,\n },\n }\n );\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n }\n },\n [\n activeAccountWebClientConfig,\n bulkEditMode,\n closeBulkEditDialog,\n filterQueryWithEventIds,\n refreshExpandedListItems,\n setActivePosEntity,\n setIsLoading,\n showErrorDialog,\n updateKey,\n ]\n );\n\n const listings = useMemo(() => {\n return (eventsTransformed ?? [])\n .flatMap((ev) => ev.entities.listings)\n .flatMap(flattenListingGroup)\n .filter(({ id, isLtGrp }) => id > 0 && !isLtGrp) as Listing[];\n }, [eventsTransformed]);\n\n const openDialog = () => {\n openBulkEditDialog({\n event: event,\n updateKey: updateKey,\n isLoading: isLoading,\n listings: listings,\n selectedListingIds: affectedVisibleListingIds,\n onOkay: onSubmit,\n onClosed: () => {\n setIsLoading(false);\n },\n bulkEditMode: bulkEditMode,\n });\n };\n\n return {\n dropDown: (\n {\n e.preventDefault();\n e.stopPropagation();\n openDialog();\n }}\n disabled={isLoading}\n bulkEditMode={bulkEditMode}\n />\n ),\n openDialog: openDialog,\n };\n};\n","import React, {\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { useInventoryEventBulkActionsState } from 'src/components/Events/EventListing/InventoryEventListing/BulkActions/InventoryEventBulkActions/useInventoryEventBulkActionsState';\nimport { useBulkUpdateListingSettings } from 'src/components/Listings/InventoryActionDropdown/components/BulkUpdateListingSettingsAction';\nimport { Content } from 'src/contexts/ContentContext';\nimport {\n MultiSelectScope,\n useMultiSelectionContext,\n} from 'src/contexts/MultiSelectionContext';\nimport { Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ContentIds } from 'src/utils/constants/contentIdDataMap';\nimport { COMMAND_OPTION_TYPE_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { EventWithData } from 'src/WebApiController';\n\nimport * as styles from './CommandMenu.css';\n\ninterface CommandMenuProps {\n groupId: string;\n event: EventWithData['event'];\n}\n\nexport enum CommandOptionType {\n ToggleSelectionMode = 'toggle-selection-mode',\n SelectAll = 'select-all',\n AutoPricingSettings = 'auto-pricing-settings',\n}\n\nconst CommandMenu = ({ groupId, event }: CommandMenuProps) => {\n const [open, setOpen] = useState(false);\n const [search, setSearch] = useState('');\n const [selectedIndex, setSelectedIndex] = useState(0);\n const dialogRef = useRef(null);\n const inputRef = useRef(null);\n\n const { toggleGroup, selectionMode, setSelectionMode, getSelection } =\n useMultiSelectionContext();\n\n const listingSelection = getSelection(groupId);\n\n const onToggleSelectionModeClick = useCallback(\n (e?: React.MouseEvent) => {\n e?.stopPropagation();\n\n if (listingSelection.isSingleGroupMultiSelect) {\n setSelectionMode();\n } else {\n setSelectionMode({\n mode: MultiSelectScope.SingleGroup,\n groupId,\n });\n }\n },\n [groupId, listingSelection.isSingleGroupMultiSelect, setSelectionMode]\n );\n\n const onSelectAllClick = useCallback(() => {\n toggleGroup(groupId);\n }, [groupId, toggleGroup]);\n\n const { affectedVisibleListingIds, filterQueryWithEventIds } =\n useInventoryEventBulkActionsState(event);\n\n const [isLoading, setIsLoading] = useState(false);\n\n const bulkEditAutoPricingSettings = useBulkUpdateListingSettings(\n 'autoPricing',\n filterQueryWithEventIds,\n affectedVisibleListingIds,\n setIsLoading,\n isLoading,\n event\n );\n\n const filteredCommandOptions = useMemo(() => {\n const commandOptions = [\n {\n label: (\n \n ),\n id: CommandOptionType.ToggleSelectionMode,\n searchText: `${\n ContentIds[\n COMMAND_OPTION_TYPE_TO_CID[CommandOptionType.ToggleSelectionMode]\n ].defaultValue\n }`,\n },\n {\n label: (\n \n ),\n id: CommandOptionType.SelectAll,\n searchText: `${\n ContentIds[COMMAND_OPTION_TYPE_TO_CID[CommandOptionType.SelectAll]]\n .defaultValue\n }`,\n },\n ];\n\n return commandOptions.filter((option) =>\n option.searchText.toString().toLowerCase().includes(search.toLowerCase())\n );\n }, [search]);\n\n const filteredSettingOptions = useMemo(() => {\n const settingOptions = [\n {\n label: (\n \n ),\n id: CommandOptionType.AutoPricingSettings,\n searchText: `${\n ContentIds[\n COMMAND_OPTION_TYPE_TO_CID[CommandOptionType.AutoPricingSettings]\n ].defaultValue\n }`,\n },\n ];\n\n return settingOptions.filter((option) =>\n option.searchText.toString().toLowerCase().includes(search.toLowerCase())\n );\n }, [search]);\n\n const combinedOptions = useMemo(\n () => [...filteredCommandOptions, ...filteredSettingOptions],\n [filteredCommandOptions, filteredSettingOptions]\n );\n\n useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if ((event.metaKey || event.ctrlKey) && event.key === 'k') {\n event.preventDefault();\n setOpen((prev) => !prev);\n }\n };\n\n window.addEventListener('keydown', handleKeyDown);\n return () => window.removeEventListener('keydown', handleKeyDown);\n }, []);\n\n const handleOptionSelect = useCallback(\n (option: {\n label: JSX.Element;\n id: CommandOptionType;\n searchText: string;\n }) => {\n setOpen((prev) => !prev);\n\n if (option.id === CommandOptionType.ToggleSelectionMode) {\n onToggleSelectionModeClick();\n } else if (option.id === CommandOptionType.SelectAll) {\n if (selectionMode == undefined) {\n onToggleSelectionModeClick();\n }\n onSelectAllClick();\n } else if (option.id === CommandOptionType.AutoPricingSettings) {\n bulkEditAutoPricingSettings.openDialog();\n }\n },\n [\n onToggleSelectionModeClick,\n selectionMode,\n onSelectAllClick,\n bulkEditAutoPricingSettings,\n ]\n );\n\n useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (!open) {\n return;\n }\n\n if (event.key === 'Escape') {\n setOpen(false); // Close dialog on Escape\n } else if (['ArrowDown', 'ArrowUp', 'Enter'].includes(event.key)) {\n event.preventDefault();\n\n if (event.key === 'ArrowDown') {\n setSelectedIndex((prevIndex) =>\n prevIndex === combinedOptions.length - 1 ? 0 : prevIndex + 1\n );\n } else if (event.key === 'ArrowUp') {\n setSelectedIndex((prevIndex) =>\n prevIndex === 0 ? combinedOptions.length - 1 : prevIndex - 1\n );\n } else if (event.key === 'Enter') {\n handleOptionSelect(combinedOptions[selectedIndex]);\n }\n }\n };\n window.addEventListener('keydown', handleKeyDown);\n return () => window.removeEventListener('keydown', handleKeyDown);\n }, [open, combinedOptions, selectedIndex, handleOptionSelect]);\n\n useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n if (\n dialogRef.current &&\n !dialogRef.current.contains(event.target as Node)\n ) {\n setOpen(false);\n }\n };\n\n if (open) {\n document.addEventListener('mousedown', handleClickOutside);\n } else {\n document.removeEventListener('mousedown', handleClickOutside);\n }\n\n return () => document.removeEventListener('mousedown', handleClickOutside);\n }, [open]);\n\n useEffect(() => {\n if (open && inputRef.current) {\n inputRef.current.focus();\n }\n }, [open]);\n\n return (\n \n {\n setSearch(e.target.value);\n }}\n />\n {filteredCommandOptions.length > 0 && (\n
    \n
    \n \n
    \n \n {filteredCommandOptions.map((option, index) => {\n return (\n setSelectedIndex(index)}\n onClick={() => {\n if (combinedOptions.length === 0) {\n return;\n }\n\n handleOptionSelect(combinedOptions[selectedIndex]);\n }}\n >\n {option.label}\n
    \n );\n })}\n \n \n )}\n\n {filteredSettingOptions.length > 0 && (\n
    \n
    \n \n
    \n \n {filteredSettingOptions.map((option, index) => {\n return (\n \n setSelectedIndex(index + filteredCommandOptions.length)\n }\n onClick={() => {\n if (combinedOptions.length === 0) {\n return;\n }\n\n handleOptionSelect(combinedOptions[selectedIndex]);\n }}\n >\n {option.label}\n
    \n );\n })}\n \n \n )}\n \n );\n};\n\nexport default CommandMenu;\n","/**\n * Used as an enum and the path associated with that enum\n *\n * N.B. Changes here should also reflect in `contentIdMaps.ts` and `AppRoutes.tsx`\n *\n * Planned based on the mocks: (contentIds already generated for these)\n * - Vendors\n * - Automations\n * - Pricing\n * - Venues\n * - Tickets\n */\nexport const enum SettingTab {\n MyAccount = 'my-account',\n UserManagement = 'user-management',\n UserManagement_Users = 'users',\n UserManagement_Roles = 'roles',\n UserManagement_Teams = 'teams',\n SyncCenter = 'sync-center',\n CurrencyConversion = 'currency-conversion',\n PurchaseOrder = 'purchase-order',\n Accounting = 'accounting',\n SellerAccount = 'seller-account', // legacy: will be split out into separate views\n VendorManagement = 'vendor-management',\n VendorManagement_Vendors = 'vendors',\n VendorManagement_Payments = 'payments',\n FulfillmentProviders = 'fulfillment-providers',\n AutoPricing = 'auto-pricing',\n}\n\nexport const SettingsTree: Record = {\n [SettingTab.MyAccount]: '',\n [SettingTab.UserManagement]: '',\n [SettingTab.SyncCenter]: '',\n [SettingTab.AutoPricing]: '',\n [SettingTab.PurchaseOrder]: '',\n [SettingTab.Accounting]: '',\n [SettingTab.SellerAccount]: '',\n [SettingTab.CurrencyConversion]: '',\n [SettingTab.UserManagement_Users]: SettingTab.UserManagement + '/',\n [SettingTab.UserManagement_Roles]: SettingTab.UserManagement + '/',\n [SettingTab.UserManagement_Teams]: SettingTab.UserManagement + '/',\n [SettingTab.VendorManagement]: '',\n [SettingTab.VendorManagement_Vendors]: SettingTab.VendorManagement + '/',\n [SettingTab.VendorManagement_Payments]: SettingTab.VendorManagement + '/',\n [SettingTab.FulfillmentProviders]: '',\n};\n","export enum AdCampaignsTableColumnId {\n Name = 'name',\n State = 'state',\n Budget = 'budget',\n StartDateTime = 'startDateTime',\n EndDateTime = 'endDateTime',\n AdSpend = 'adSpend',\n SoldProceeds = 'salesProceeds',\n SoldQty = 'qtySold',\n Actions = 'action',\n}\n","export enum AdGroupsTableColumnId {\n Name = 'name',\n State = 'state',\n BaseBid = 'baseBid',\n MaxBid = 'maxBid',\n DailyBudget = 'dailyBudget',\n Genre = 'genre',\n Performer = 'performer',\n Venue = 'venue',\n TicketClass = 'ticketClass',\n Section = 'section',\n Listing = 'listing',\n Event = 'event',\n BidModifier = 'bidModifier',\n AdSpend = 'adSpend',\n SoldProceeds = 'salesProceeds',\n SoldQty = 'qtySold',\n Actions = 'actions',\n}\n","// Subset of ReportCommissionColumnName from ReportingService\n\nexport enum CommissionReportTableGroupingColumnId {\n SaleId = 'saleId',\n MarketplaceName = 'marketplaceName',\n MarketplaceSaleId = 'marketplaceSaleId',\n Commissioner = 'commissioner',\n EventName = 'eventName',\n EventDateLocal = 'eventDateLocal',\n VenueName = 'venueName',\n EventId = 'eventId',\n EventStateName = 'eventStateName',\n SaleStatusName = 'saleStatusName',\n Section = 'section',\n SeatingRow = 'seatingRow',\n SeatFrom = 'seatFrom',\n SeatTo = 'seatTo',\n FulfillmentDate = 'fulfillmentDate',\n LastPaymentDate = 'lastPaymentDate',\n NetCommissionRate = 'netCommissionRate',\n NetCommissionRateOverride = 'netCommissionRateOverride',\n SaleBasisShare = 'saleBasisShare',\n IsCommissionEligible = 'isCommissionEligible',\n CommissionEligibilityDate = 'commissionEligibilityDate',\n}\n\nexport enum CommissionReportTableValueColumnId {\n TotalNetProceeds = 'totalNetProceeds',\n Credits = 'credits',\n TotalCost = 'totalCost',\n Charges = 'charges',\n CommissionerCostsAndCharges = 'commissionerCostsAndCharges',\n CommissionerProceedsAndCredits = 'commissionerProceedsAndCredits',\n CommissionerProfitAndLoss = 'commissionerProfitAndLoss',\n OriginalProceeds = 'originalProceeds',\n}\n","export enum ReportFilterEditability {\n Hidden = 'hidden',\n View = 'view',\n Edit = 'edit',\n}\n\nexport const DEFAULT_REPORT_FILTER_EDITABILITY = ReportFilterEditability.Hidden;\n\nexport enum ReportPerformerVenueFilterItemId {\n PerformerIds = 'performerIds',\n VenueIds = 'venueIds',\n}\n","import { PriceUpdatedFilterEnum } from 'src/components/Filters/StackedFilter/PriceUpdatedDateStackedFilter';\nimport { SaleDateFilterEnum } from 'src/components/Filters/StackedFilter/SaleDateStackedFilter';\nimport { CommandOptionType } from 'src/components/Listings/InventoryEventPage/CommandMenu/CommandMenu';\nimport { SiteThemeOption } from 'src/contexts/SiteTheme/SiteThemeContext';\nimport { vars } from 'src/core/themes';\nimport { RestrictSelectionType } from 'src/modals/ListingDetails/components/PricingSection/AutoPricingSection.types';\nimport { OnSaleEventsTableColumnId } from 'src/navigations/Routes/OnSaleEvent/OnSaleEventView.types';\nimport { SettingTab } from 'src/navigations/Routes/Settings/constants';\nimport { SaleFormulaFields } from 'src/tables/SalesTable/SalesTable.type';\nimport { EventsTableColumnId } from 'src/utils/columns/events/eventsColumnUtils.types';\nimport { MarketplacePaymentsTableColumnId } from 'src/utils/columns/marketplacePayments/marketplacePaymentsColumnsUtils.types';\nimport {\n PurchasesTableColumnId,\n PurchaseTableColumnGroupId,\n} from 'src/utils/columns/purchases/purchasesColumnUtils.types';\nimport {\n SalesReportTableColumnId,\n SalesReportTableGroupingColumnId,\n SalesReportTableValueColumnId,\n SalesTableColumnId,\n SalesTableFlattenedColumnId,\n} from 'src/utils/columns/sales/salesColumnUtils.types';\nimport {\n ActionOutboxEntityType,\n ApiEventStatus,\n AutoPoInboundEmailClassificationType,\n AutoPricingCompListingMode,\n AutoPricingOutlierMode,\n AutoPricingResultType,\n AutoPricingUndercutMode,\n BroadcastErrorCode,\n BucketType,\n DealSplitType,\n DealThresholdSplitDirection,\n DeliveryType,\n EventDemandFactorType,\n EventGroupingType,\n EventTimeFrameFilter,\n EventUnpricedStatus,\n GroupingType,\n InventoryViewMode,\n ListingNoteType,\n ListingStatus,\n Marketplace,\n MarketplaceOperationResultState,\n MarketplacePaymentLineType,\n MarketplacePaymentState,\n MarketplacePaymentTerm,\n NotificationType,\n OnSaleEventViewMode,\n PaymentMethodNameKnownRegex,\n PendingProofState,\n Permission,\n PermissionAccessArea,\n PointOfSaleFulfillmentState,\n PointOfSalePaymentState,\n PointOfSaleSaleStatus,\n PricingFloorCeilingAdjustmentType,\n PurchaseOrderCostType,\n PurchaseOrderState,\n PurchasePaymentMethodType,\n PurchaseViewMode,\n QualityControlState,\n ReportGroupBy,\n ReportWidgetTypesInventory,\n Role,\n RowGroupSetting,\n SaleCancellationReason,\n SaleLineItemChargeReason,\n SaleLineItemCreditReason,\n SalesViewMode,\n SectionGroupAreaType,\n SplitType,\n TagsValueType,\n TicketGroupEditReason,\n TicketType,\n TimePeriodType,\n TopLevelCategory,\n VenueZoneConfigType,\n} from 'src/WebApiController';\n\nimport { AdCampaignsTableColumnId } from '../columns/adCampaigns/adCampaignsColumnUtils.types';\nimport { AdGroupsTableColumnId } from '../columns/adGroups/adGroupsColumnUtils.types';\nimport { CommissionReportTableValueColumnId } from '../columns/commission/commissionColumnUtils.types';\nimport { CommissionReportTableGroupingColumnId } from '../columns/commission/commissionColumnUtils.types';\nimport {\n ListingReportTableColumnId,\n ListingReportTableGroupingColumnId,\n ListingReportTableValueColumnId,\n ListingTableColumnId,\n ListingTableFlattenedColumnId,\n} from '../columns/inventory/inventoryColumnUtils.types';\nimport { ListingFormulaFields } from '../columns/inventory/inventoryCustomColumnUtils';\nimport {\n EventMappingStateFilter,\n EventUiSort,\n LastReviewedSinceDate,\n TextFilterEnum,\n YesNoEnum,\n} from '../eventQueryUtils';\nimport { ReportFilterEditability } from '../reportsFilterUtils';\nimport { ReportTypes } from '../reportsUtils';\nimport { PurchasePaymentStatus } from './../../WebApiController';\nimport { ContentId } from './contentId';\nimport { FormatContentId } from './formatContentId';\n\n// NOTE - the order declared here is the order the items shows up in the drop-down\n\nexport const EVENT_GROUPING_TO_CID: Record = {\n [EventGroupingType.Performer]: ContentId.Performers,\n [EventGroupingType.Venue]: ContentId.Venues,\n};\n\nexport const EVENT_SORT_TO_CID: Record = {\n [EventUiSort.DateDesc]: ContentId.DateDescArrow,\n [EventUiSort.DateAsc]: ContentId.DateAscArrow,\n [EventUiSort.SortAtoZ]: ContentId.AtoZArrow,\n [EventUiSort.SortZtoA]: ContentId.ZtoAArrow,\n};\n\nexport const EVENT_SORT_DATE_ONLY_TO_CID: Record = {\n [EventUiSort.DateDesc]: ContentId.DateDescArrow,\n [EventUiSort.DateAsc]: ContentId.DateAscArrow,\n};\n\nexport const ON_SALE_EVENT_VIEW_MODE_TO_CID: Record = {\n [OnSaleEventViewMode.MetricView]: ContentId.InsightsView,\n};\nexport const INVENTORY_VIEW_MODE_TO_CID: Record = {\n [InventoryViewMode.TileView]: ContentId.TileView,\n [InventoryViewMode.MetricView]: ContentId.InsightsView,\n [InventoryViewMode.FlattenedView]: ContentId.ListView,\n};\nexport const SALES_VIEW_MODE_TO_CID: Record = {\n [SalesViewMode.TileView]: ContentId.TileView,\n [SalesViewMode.FlattenedView]: ContentId.ListView,\n};\nexport const PURCHASE_VIEW_MODE_TO_CID: Record = {\n [PurchaseViewMode.TileView]: ContentId.TimeView,\n [PurchaseViewMode.FlattenedView]: ContentId.ListView,\n [PurchaseViewMode.EventTileView]: ContentId.EventView,\n};\n\nexport const PURCHASE_SORT_TO_CID: Record = {\n [EventUiSort.DateDesc]: ContentId.DateDescArrow,\n [EventUiSort.DateAsc]: ContentId.DateAscArrow,\n};\n\nexport const TIME_PERIOD_TO_CID: Record<\n Exclude,\n ContentId\n> = {\n // [TimePeriodType.Daily]: ContentId.Day, // TODO - Fix how we handle timezones when fetching data\n [TimePeriodType.Weekly]: ContentId.Week,\n [TimePeriodType.Monthly]: ContentId.Month,\n};\n\nexport const CONVERSATION_SORT_TO_CID: Record = {\n [EventUiSort.DateDesc]: ContentId.DateDescArrow,\n [EventUiSort.DateAsc]: ContentId.DateAscArrow,\n};\n\nexport const DEAL_CONFIG_SPLIT_TYPE_TO_CID: Record = {\n [DealSplitType.Sales]: ContentId.Sales,\n [DealSplitType.Quantity]: ContentId.Quantity,\n [DealSplitType.None]: ContentId.NoHurdle,\n};\n\nexport const DEAL_CONFIG_TRESHOLD_SPLIT_DIRECTION_TO_CID: Record<\n string,\n ContentId\n> = {\n [DealThresholdSplitDirection.Above]: ContentId.Above,\n [DealThresholdSplitDirection.Below]: ContentId.Below,\n};\n\n/**\n * Use `getSaleStatusDisplayContentId` for displaying purposes\n */\nexport const SALES_STATUS_TO_CID: Record = {\n [PointOfSaleSaleStatus.PendingConfirmation]: ContentId.PendingConfirmation,\n [PointOfSaleSaleStatus.PendingAllocation]: ContentId.PendingSourcing,\n [PointOfSaleSaleStatus.ProvisionalAllocation]:\n ContentId.ProvisionalAllocation,\n [PointOfSaleSaleStatus.PendingFulfillment]: ContentId.PendingFulfillment,\n [PointOfSaleSaleStatus.PendingReshipment]: ContentId.PendingReshipment,\n [PointOfSaleSaleStatus.ProcessingFulfillment]:\n ContentId.ProcessingFulfillment,\n [PointOfSaleSaleStatus.Fulfilled]: ContentId.Fulfilled,\n [PointOfSaleSaleStatus.FulfillmentFailed]: ContentId.FulfillmentFailed,\n [PointOfSaleSaleStatus.PendingRejection]: ContentId.Rejected,\n [PointOfSaleSaleStatus.Rejected]: ContentId.Cancelled,\n [PointOfSaleSaleStatus.Hold]: ContentId.Hold,\n [PointOfSaleSaleStatus.CancelledHold]: ContentId.CancelledHold,\n [PointOfSaleSaleStatus.Wasted]: ContentId.Wasted,\n};\n\nexport const SETTINGS_VIEWS_TO_CONTENT_ID_MAP: Record = {\n [SettingTab.MyAccount]: ContentId.MyAccount,\n [SettingTab.UserManagement]: ContentId.UserManagement,\n [SettingTab.UserManagement_Users]: ContentId.Users,\n [SettingTab.UserManagement_Roles]: ContentId.Roles,\n [SettingTab.UserManagement_Teams]: ContentId.Teams,\n [SettingTab.SyncCenter]: ContentId.SyncCenter,\n [SettingTab.AutoPricing]: ContentId.Autopricing,\n [SettingTab.PurchaseOrder]: ContentId.Purchases,\n [SettingTab.Accounting]: ContentId.Accounting,\n [SettingTab.SellerAccount]: ContentId.SellerAccount,\n [SettingTab.CurrencyConversion]: ContentId.CurrencyConversion,\n [SettingTab.FulfillmentProviders]: ContentId.FulfillmentProviders,\n [SettingTab.VendorManagement]: ContentId.VendorManagement,\n [SettingTab.VendorManagement_Payments]: ContentId.Payments,\n [SettingTab.VendorManagement_Vendors]: ContentId.Vendors,\n};\n\nexport const SALE_PAYMENT_STATE_TO_CID: Record<\n PointOfSalePaymentState,\n ContentId\n> = {\n [PointOfSalePaymentState.Paid]: ContentId.Paid,\n [PointOfSalePaymentState.Queued]: ContentId.QueuedForPayment,\n [PointOfSalePaymentState.Unpaid]: ContentId.Unpaid,\n [PointOfSalePaymentState.PartiallyPaid]: ContentId.PartiallyPaid,\n [PointOfSalePaymentState.PendingReversal]: ContentId.PendingReversal,\n [PointOfSalePaymentState.Reversed]: ContentId.Reversed,\n};\n\nexport const SALE_CANCELLATION_REASON_CID: Record<\n SaleCancellationReason,\n ContentId\n> = {\n [SaleCancellationReason.EventCancellation]: ContentId.EventCancellation,\n [SaleCancellationReason.SellerFault]: ContentId.SellerFault,\n [SaleCancellationReason.MarketplaceFault]: ContentId.MarketplaceFault,\n [SaleCancellationReason.NoFault]: ContentId.NoFault,\n [SaleCancellationReason.Other]: ContentId.Other,\n};\n\nexport const MARKETPLACE_SALE_PAYMENT_STATE_TO_CID: Record<\n MarketplacePaymentState,\n ContentId\n> = {\n [MarketplacePaymentState.Paid]: ContentId.Paid,\n [MarketplacePaymentState.Queued]: ContentId.QueuedForPayment,\n [MarketplacePaymentState.Unpaid]: ContentId.Unpaid,\n [MarketplacePaymentState.PartiallyPaid]: ContentId.PartiallyPaid,\n [MarketplacePaymentState.Ineligible]: ContentId.Ineligible,\n [MarketplacePaymentState.PendingReversal]: ContentId.PendingReversal,\n [MarketplacePaymentState.Reversed]: ContentId.Reversed,\n};\n\nexport const MARKETPLACE_PAYMENT_LINE_TYPE_TO_CID: Record<\n MarketplacePaymentLineType,\n ContentId\n> = {\n [MarketplacePaymentLineType.Credit]: ContentId.Credit,\n [MarketplacePaymentLineType.Proceeds]: ContentId.Proceeds,\n [MarketplacePaymentLineType.FullPrice]: ContentId.FullPrice,\n [MarketplacePaymentLineType.SellerFee]: ContentId.SellerFee,\n [MarketplacePaymentLineType.Penalty]: ContentId.Penalty,\n [MarketplacePaymentLineType.AlternativeTickets]: ContentId.AlternativeTickets,\n [MarketplacePaymentLineType.OrderNotFulfilled]: ContentId.OrderNotFulfilled,\n [MarketplacePaymentLineType.CancelledEvent]: ContentId.CancelledEvent,\n [MarketplacePaymentLineType.WitheldFunds]: ContentId.WitheldFunds,\n [MarketplacePaymentLineType.LastMinuteSalesLateDelivery]:\n ContentId.LastMinuteSalesLateDelivery,\n [MarketplacePaymentLineType.ExpiredShippingLabel]:\n ContentId.ExpiredShippingLabel,\n [MarketplacePaymentLineType.DeliveryMethodChange]:\n ContentId.DeliveryMethodChange,\n [MarketplacePaymentLineType.BuyerDeniedEntry]: ContentId.BuyerDeniedEntry,\n [MarketplacePaymentLineType.WrongTicketsReturnShippingCost]:\n ContentId.WrongTicketsReturnShippingCost,\n [MarketplacePaymentLineType.EarlyShippingLabelGeneration]:\n ContentId.EarlyShippingLabelGeneration,\n [MarketplacePaymentLineType.WrongTrackingNumber]:\n ContentId.WrongTrackingNumber,\n [MarketplacePaymentLineType.ExcessiveFailureRate]:\n ContentId.ExcessiveFailureRate,\n [MarketplacePaymentLineType.SellerError]: ContentId.SellerError,\n [MarketplacePaymentLineType.AlternativeTicketsBuyerCompensation]:\n ContentId.AlternativeTicketsBuyerCompensation,\n [MarketplacePaymentLineType.RAGSellerFaultNoResponse]:\n ContentId.RAGSellerFaultNoResponse,\n [MarketplacePaymentLineType.OverchargedSeller]: ContentId.OverchargedSeller,\n [MarketplacePaymentLineType.ShippingRefund]: ContentId.ShippingRefund,\n [MarketplacePaymentLineType.SellerRelationship]: ContentId.SellerRelationship,\n [MarketplacePaymentLineType.RAGDeliveryDispute]: ContentId.RAGDeliveryDispute,\n [MarketplacePaymentLineType.CSError]: ContentId.CSError,\n [MarketplacePaymentLineType.LMSError]: ContentId.LMSError,\n [MarketplacePaymentLineType.TaxRefund]: ContentId.TaxRefund,\n [MarketplacePaymentLineType.Other]: ContentId.Other,\n [MarketplacePaymentLineType.Charge]: ContentId.Charge,\n};\n\nexport const PURCHASE_PAYMENT_STATUS_TO_CID: Record<\n PurchasePaymentStatus,\n ContentId\n> = {\n [PurchasePaymentStatus.Unpaid]: ContentId.Unpaid,\n [PurchasePaymentStatus.PartiallyPaid]: ContentId.PartiallyPaid,\n [PurchasePaymentStatus.Paid]: ContentId.Paid,\n [PurchasePaymentStatus.Failed]: ContentId.Failed,\n [PurchasePaymentStatus.RefundNeeded]: ContentId.RefundNeeded,\n [PurchasePaymentStatus.Refunded]: ContentId.Refunded,\n [PurchasePaymentStatus.PartiallyRefunded]: ContentId.PartiallyRefunded,\n};\n\nexport const QUALITY_CONTROL_STATE_TO_CID: Record<\n QualityControlState,\n ContentId\n> = {\n [QualityControlState.Pending]: ContentId.Pending,\n [QualityControlState.Approved]: ContentId.Approved,\n [QualityControlState.Rejected]: ContentId.Rejected,\n};\n\nexport const ROLE_TO_CID: Record = {\n [Role.Owner]: [ContentId.Owner, ContentId.Role_Owner_Details],\n [Role.Buyer]: [ContentId.Buyer, ContentId.Role_Buyer_Details],\n [Role.Finance]: [ContentId.Finance, ContentId.Role_Finance_Details],\n [Role.FinanceAPI]: [ContentId.FinanceAPI, ContentId.Role_FinanceAPI_Details],\n [Role.Fulfillment]: [\n ContentId.Fulfillment,\n ContentId.Role_Fulfillment_Details,\n ],\n [Role.Pricer]: [ContentId.Pricer, ContentId.Role_Pricer_Details],\n [Role.Processor]: [ContentId.Processor, ContentId.Role_Processor_Details],\n [Role.AutoPO]: [ContentId.AutoPO, ContentId.Role_AutoPO_Details],\n [Role.AutoFulfill]: [\n ContentId.AutoFulfill,\n ContentId.Role_AutoFulfill_Details,\n ],\n [Role.AutoPricer]: [ContentId.AutoPricer, ContentId.Role_AutoPricer_Details],\n [Role.Reporter]: [ContentId.Reporter, ContentId.Role_Reporter_Details],\n};\n\nexport const PERMISSION_ACCESS_AREA_TO_CID: Record<\n PermissionAccessArea,\n ContentId\n> = {\n [PermissionAccessArea.General]: ContentId.General,\n [PermissionAccessArea.Inventory]: ContentId.Inventory,\n [PermissionAccessArea.Sales]: ContentId.Sales,\n [PermissionAccessArea.Purchases]: ContentId.Purchases,\n [PermissionAccessArea.Events]: ContentId.Events,\n [PermissionAccessArea.Account]: ContentId.Account,\n [PermissionAccessArea.Reporting]: ContentId.Reporting,\n [PermissionAccessArea.Messages]: ContentId.Messages,\n [PermissionAccessArea.Accounting]: ContentId.Accounting,\n [PermissionAccessArea.AdPlatform]: ContentId.SponsoredListings,\n};\n\nexport const PERMISSION_TO_CID: Record<\n Permission,\n // TODO - add contentId for Details (explanation when clicking (i) icon)\n [ContentId, ContentId, 'view' | 'action']\n> = {\n [Permission.Sales_ViewAll]: [\n ContentId.Permission_ViewAll,\n ContentId.Sales_ViewAll_Details,\n 'view',\n ],\n [Permission.Sales_ViewRecent]: [\n ContentId.Permission_ViewRecentSales,\n ContentId.Sales_ViewRecent_Details,\n 'view',\n ],\n [Permission.Sales_ViewRecentFromExternalMarketplace]: [\n ContentId.Permission_ViewRecentFromExternalMarketplace,\n ContentId.Sales_ViewRecentFromExternalMarketplace_Details,\n 'view',\n ],\n [Permission.Sales_ConfirmReject]: [\n ContentId.Permission_ConfirmRejectSale,\n ContentId.Sales_ConfirmReject_Details,\n 'action',\n ],\n [Permission.Sales_Fulfill]: [\n ContentId.Permission_FulfillSale,\n ContentId.Sales_Fulfill_Details,\n 'action',\n ],\n [Permission.Sales_CreateForExternalMarketplaces]: [\n ContentId.Permission_CreateForExternalMarketplaces,\n ContentId.Sales_CreateForExternalMarketplaces_Details,\n 'action',\n ],\n [Permission.Sales_ViewProceeds]: [\n ContentId.Permission_ViewProceeds,\n ContentId.Sales_ViewProceeds_Details,\n 'view',\n ],\n [Permission.Sales_ViewRecentProceeds]: [\n ContentId.Permission_ViewRecentProceeds,\n ContentId.Sales_ViewRecentProceeds_Details,\n 'view',\n ],\n [Permission.Sales_ViewCostAndMargin]: [\n ContentId.Permission_ViewCostAndMargin,\n ContentId.Sales_ViewCostAndMargin_Details,\n 'view',\n ],\n [Permission.Sales_ViewPaymentState]: [\n ContentId.Permission_ViewPaymentState,\n ContentId.Sales_ViewPaymentState_Details,\n 'view',\n ],\n [Permission.Sales_ViewFulfillmentArtifacts]: [\n ContentId.Permission_ViewFulfillmentArtifacts,\n ContentId.Sales_ViewFulfillmentArtifacts_Details,\n 'view',\n ],\n [Permission.Sales_ManageHold]: [\n ContentId.Permission_ManageHolds,\n ContentId.Sales_ManageHold_Details,\n 'action',\n ],\n [Permission.Inventory_ViewAll]: [\n ContentId.Permission_ViewAll,\n ContentId.Inventory_ViewAll_Details,\n 'view',\n ],\n [Permission.Inventory_ViewRecent]: [\n ContentId.Permission_ViewRecentListings,\n ContentId.Inventory_ViewRecent_Details,\n 'view',\n ],\n [Permission.Inventory_ViewRecentFromExternalMarketplace]: [\n ContentId.Permission_ViewRecentFromExternalMarketplace,\n ContentId.Inventory_ViewRecentFromExternalMarketplace_Details,\n 'view',\n ],\n [Permission.Inventory_ViewAllMarketplaceAttributes]: [\n ContentId.Permission_ViewAllMarketplaceAttributes,\n ContentId.Inventory_ViewAllMarketplaceAttributes_Details,\n 'view',\n ],\n [Permission.Inventory_ViewExternalMarketplaceAttributes]: [\n ContentId.Permission_ViewExternalMarketplaceAttributes,\n ContentId.Inventory_ViewExternalMarketplaceAttributes_Details,\n 'view',\n ],\n [Permission.Inventory_ViewFulfillmentArtifacts]: [\n ContentId.Permission_ViewFulfillmentArtifacts,\n ContentId.Inventory_ViewFulfillmentArtifacts_Details,\n 'view',\n ],\n [Permission.Inventory_SetPrice]: [\n ContentId.Permission_SetPrice,\n ContentId.Inventory_SetPrice_Details,\n 'action',\n ],\n [Permission.Inventory_SetPriceOnPurchasedBy]: [\n ContentId.Permission_SetPriceOnPurchasedListings,\n ContentId.Inventory_SetPriceOnPurchasedBy_Details,\n 'action',\n ],\n [Permission.Inventory_SetPriceOnIsPricerOf]: [\n ContentId.Permission_SetPriceOnAssignedListings,\n ContentId.Inventory_SetPriceOnIsPricerOf_Details,\n 'action',\n ],\n [Permission.Inventory_Predelivery]: [\n ContentId.Permission_Predeliver,\n ContentId.Inventory_Predelivery_Details,\n 'action',\n ],\n [Permission.Inventory_BroadcastUnbroadcast]: [\n ContentId.Permission_BroadcastUnbroadcast,\n ContentId.Inventory_BroadcastUnbroadcast_Details,\n\n 'action',\n ],\n [Permission.Inventory_BroadcastUnbroadcastOnPurchasedBy]: [\n ContentId.Permission_BroadcastUnbroadcastOnPurchasedBy,\n ContentId.Inventory_BroadcastUnbroadcastOnPurchasedBy_Details,\n 'action',\n ],\n [Permission.Inventory_UpdateListingInfo]: [\n ContentId.Permission_UpdateInfo,\n ContentId.Inventory_UpdateListingInfo_Details,\n 'action',\n ],\n [Permission.Inventory_UpdateListingInfoOnPurchasedBy]: [\n ContentId.Permission_UpdateInfoOnPurchasedListings,\n ContentId.Inventory_UpdateListingInfoOnPurchasedBy_Details,\n 'action',\n ],\n [Permission.Inventory_UpdateDeliveryStrategy]: [\n ContentId.Permission_UpdateDeliveryStrategy,\n ContentId.Inventory_UpdateDeliveryStrategy_Details,\n 'action',\n ],\n [Permission.Inventory_UpdateDeliveryStrategyOnIsPricerOf]: [\n ContentId.Permission_UpdateDeliveryStrategyOnPricedListings,\n ContentId.Inventory_UpdateDeliveryStrategyOnIsPricerOf_Details,\n 'action',\n ],\n [Permission.Inventory_UpdateDeliveryStrategyOnPurchasedBy]: [\n ContentId.Permission_UpdateDeliveryStrategyOnPurchasedListings,\n ContentId.Inventory_UpdateDeliveryStrategyOnPurchasedBy_Details,\n 'action',\n ],\n [Permission.SellerAccount_Admin]: [\n ContentId.Permission_Administration,\n ContentId.SellerAccount_Admin_Details,\n 'action',\n ],\n [Permission.SellerSupportCase_Create]: [\n ContentId.Permission_Create,\n ContentId.SellerSupportCase_Create_Details,\n 'action',\n ],\n [Permission.SellerSupportCase_View]: [\n ContentId.Permission_ViewAll,\n ContentId.SellerSupportCase_View_Details,\n 'view',\n ],\n [Permission.Purchases_ViewAll]: [\n ContentId.Permission_ViewAll,\n ContentId.Purchases_ViewAll_Details,\n 'view',\n ],\n [Permission.Purchases_ViewRecent]: [\n ContentId.Permission_ViewRecent,\n ContentId.Purchases_ViewRecent_Details,\n 'view',\n ],\n [Permission.Purchases_Edit]: [\n ContentId.Permission_UpdateInfo,\n ContentId.Purchases_Edit_Details,\n 'action',\n ],\n [Permission.Purchases_EditOwned]: [\n ContentId.Permission_UpdateInfoOnPurchasedListings,\n ContentId.Purchases_EditOwned_Details,\n 'action',\n ],\n [Permission.Purchases_UpdateBuyerCommission]: [\n ContentId.Permission_UpdateBuyerCommission,\n ContentId.Purchases_UpdateBuyerCommission_Details,\n 'action',\n ],\n [Permission.Purchases_UpdateBuyerCommissionOwned]: [\n ContentId.Permission_UpdateBuyerCommissionOwned,\n ContentId.Purchases_UpdateBuyerCommissionOwned_Details,\n 'action',\n ],\n [Permission.Purchases_UpdateDeliveryType]: [\n ContentId.Permission_UpdateDeliveryType,\n ContentId.Purchases_UpdateDeliveryType_Details,\n 'action',\n ],\n [Permission.Purchases_UpdateDeliveryTypeOwned]: [\n ContentId.Permission_UpdateDeliveryTypeOwned,\n ContentId.Purchases_UpdateDeliveryTypeOwned_Details,\n 'action',\n ],\n [Permission.Purchases_UpdateCustomDeliveryType]: [\n ContentId.Permission_UpdateCustomDeliveryType,\n ContentId.Purchases_UpdateCustomDeliveryType_Details,\n 'action',\n ],\n [Permission.Purchases_UpdateCustomDeliveryTypeOwned]: [\n ContentId.Permission_UpdateCustomDeliveryTypeOwned,\n ContentId.Purchases_UpdateCustomDeliveryTypeOwned_Details,\n 'action',\n ],\n [Permission.Purchases_UpdateSeatTraits]: [\n ContentId.Permission_UpdateSeatTraits,\n ContentId.Purchases_UpdateSeatTraits_Details,\n 'action',\n ],\n [Permission.Purchases_UpdateSeatTraitsOwned]: [\n ContentId.Permission_UpdateSeatTraitsOwned,\n ContentId.Purchases_UpdateSeatTraitsOwned_Details,\n 'action',\n ],\n [Permission.Purchases_Create]: [\n ContentId.Permission_CreatePO,\n ContentId.Purchases_Create_Details,\n 'action',\n ],\n [Permission.Purchases_LockUnlockCommission]: [\n ContentId.Permission_LockUnlockCommission,\n ContentId.Purchases_LockUnlockCommission_Details,\n 'action',\n ],\n [Permission.Purchases_LockUnlockCommissionOwned]: [\n ContentId.Permission_LockUnlockCommissionOwned,\n ContentId.Purchases_LockUnlockCommissionOwned_Details,\n 'action',\n ],\n [Permission.Purchases_EditVendor]: [\n ContentId.Permission_EditVendor,\n ContentId.Purchases_EditVendor_Details,\n 'action',\n ],\n [Permission.Events_ViewAll]: [\n ContentId.Permission_ViewAll,\n ContentId.Events_ViewAll_Details,\n 'view',\n ],\n [Permission.Accounts_ViewAll]: [\n ContentId.Permission_ViewAll,\n ContentId.Accounts_ViewAll_Details,\n 'view',\n ],\n [Permission.TicketGroups_ViewAll]: [\n ContentId.Permission_ViewAll,\n ContentId.TicketGroups_ViewAll_Details,\n 'view',\n ],\n [Permission.Sales_AddTagType]: [\n ContentId.Permission_AddTagType,\n ContentId.Sales_AddTagType_Details,\n 'action',\n ],\n [Permission.Sales_UpdateTags]: [\n ContentId.Permission_UpdateTags,\n ContentId.Sales_UpdateTags_Details,\n 'action',\n ],\n [Permission.Sales_ViewSalesOnIsPricerOf]: [\n ContentId.Permission_ViewSaleFromPricedListings,\n ContentId.Sales_ViewSalesOnIsPricerOf_Details,\n 'view',\n ],\n [Permission.Sales_UpdateSalesInfo]: [\n ContentId.Permission_UpdateInfo,\n ContentId.Sales_UpdateSalesInfo_Details,\n 'action',\n ],\n [Permission.Sales_UpdateSalesInfoOnIsPricerOf]: [\n ContentId.Permission_UpdateInfoOnPricedListings,\n ContentId.Sales_UpdateSalesInfoOnIsPricerOf_Details,\n 'action',\n ],\n [Permission.Sales_UpdateSalesInfoOnIsFulfillerOf]: [\n ContentId.Permission_UpdateInfoOnAssignedSales,\n ContentId.Sales_UpdateSalesInfoOnIsFulfillerOf_Details,\n 'action',\n ],\n [Permission.Sales_FulfillOnIsFulfillerOf]: [\n ContentId.Permission_FulfillSalesOnAssignedSales,\n ContentId.Sales_FulfillOnIsFulfillerOf_Details,\n 'action',\n ],\n [Permission.Sales_ViewSalesOnPurchasedBy]: [\n ContentId.Permission_ViewSaleOnPurchasedListings,\n ContentId.Sales_ViewSalesOnPurchasedBy_Details,\n 'view',\n ],\n [Permission.Sales_UpdateSaleOnPurchasedBy]: [\n ContentId.Permission_UpdateInfoFromPurchasedListings,\n ContentId.Sales_UpdateSaleOnPurchasedBy_Details,\n 'action',\n ],\n [Permission.Sales_FulfillOnPurchasedBy]: [\n ContentId.Permission_FulfillSalesFromPurchasedListings,\n ContentId.Sales_FulfillOnPurchasedBy_Details,\n 'action',\n ],\n [Permission.Sales_FulfillOnPricerOf]: [\n ContentId.Permission_FulfillSaleOnPricedListings,\n ContentId.Sales_FulfillOnPricerOf_Details,\n 'action',\n ],\n [Permission.Sales_UpdateTagsOnPurchasedBy]: [\n ContentId.Permission_UpdateTagsFromPurchasedListings,\n ContentId.Sales_UpdateTagsOnPurchasedBy_Details,\n 'action',\n ],\n [Permission.Sales_UpdateTagsOnIsPricerOf]: [\n ContentId.Permission_UpdateTagsFromPricedListings,\n ContentId.Sales_UpdateTagsOnIsPricerOf_Details,\n 'action',\n ],\n [Permission.Sales_UpdateTagsOnIsFulfillerOf]: [\n ContentId.Permission_UpdateTagsOnAssignedSales,\n ContentId.Sales_UpdateTagsOnIsFulfillerOf_Details,\n 'action',\n ],\n [Permission.Sales_ConfirmRejectOnIsPricerOf]: [\n ContentId.Permission_ConfirmRejectSaleOnPricedListings,\n ContentId.Sales_ConfirmRejectOnIsPricerOf_Details,\n 'action',\n ],\n [Permission.Sales_ConfirmRejectOnPurchasedBy]: [\n ContentId.Permission_ConfirmRejectSalesFromPurchasedListings,\n ContentId.Sales_ConfirmRejectOnPurchasedBy_Details,\n 'action',\n ],\n [Permission.Sales_ViewFulfillmentArtifactsOnPurchasedBy]: [\n ContentId.Permission_ViewFulfillmentArtifactsOnSaleFromPurchasedListings,\n ContentId.Sales_ViewFulfillmentArtifactsOnPurchasedBy_Details,\n 'view',\n ],\n [Permission.Sales_ViewFulfillmentArtifactsOnIsPricerOf]: [\n ContentId.Permission_ViewFulfillmentArtifactsOnSaleFromPricedListings,\n ContentId.Sales_ViewFulfillmentArtifactsOnIsPricerOf_Details,\n 'view',\n ],\n [Permission.Sales_ConfirmRejectOnIsFulfillerOf]: [\n ContentId.Permission_ConfirmRejectOnAssignedSales,\n ContentId.Sales_ConfirmRejectOnIsFulfillerOf_Details,\n 'action',\n ],\n [Permission.Sales_ViewSalesOnIsFulfillerOf]: [\n ContentId.Permission_ViewAssignedSales,\n ContentId.Sales_ViewSalesOnIsFulfillerOf_Details,\n 'view',\n ],\n [Permission.Inventory_EditPricing]: [\n ContentId.Permission_SetPrice,\n ContentId.Inventory_EditPricing_Details,\n 'action',\n ],\n [Permission.Inventory_AddTagType]: [\n ContentId.Permission_AddTagType,\n ContentId.Inventory_AddTagType_Details,\n 'action',\n ],\n [Permission.Inventory_UpdateTags]: [\n ContentId.Permission_UpdateTags,\n ContentId.Inventory_UpdateTags_Details,\n 'action',\n ],\n [Permission.Inventory_UpdateTagsOnPurchasedBy]: [\n ContentId.Permission_UpdateTagsOnPurchasedListings,\n ContentId.Inventory_UpdateTagsOnPurchasedBy_Details,\n 'action',\n ],\n [Permission.Inventory_ViewListingOnIsPricerOf]: [\n ContentId.Permission_ViewAssignedListings,\n ContentId.Inventory_ViewListingOnIsPricerOf_Details,\n 'view',\n ],\n [Permission.Inventory_UpdateListingInfoOnIsPricerOf]: [\n ContentId.Permission_UpdateInfoOnAssignedListings,\n ContentId.Inventory_UpdateListingInfoOnIsPricerOf_Details,\n 'action',\n ],\n [Permission.Inventory_UpdateTagsOnIsPricerOf]: [\n ContentId.Permission_UpdateTagsOnAssignedListings,\n ContentId.Inventory_UpdateTagsOnIsPricerOf_Details,\n 'action',\n ],\n [Permission.Inventory_PredeliveryOnPurchasedBy]: [\n ContentId.Permission_PredeliverPurchasedListings,\n ContentId.Inventory_PredeliveryOnPurchasedBy_Details,\n 'action',\n ],\n [Permission.Inventory_PredeliveryOnIsPricerOf]: [\n ContentId.Permission_PredeliverOnAssignedListings,\n ContentId.Inventory_PredeliveryOnIsPricerOf_Details,\n 'action',\n ],\n [Permission.Inventory_ViewListingsOnPurchasedBy]: [\n ContentId.Permission_ViewPurchasedListings,\n ContentId.Inventory_ViewListingsOnPurchasedBy_Details,\n 'view',\n ],\n [Permission.Inventory_ViewFulfillmentArtifactsOnPurchasedBy]: [\n ContentId.Permission_ViewFulfillmentArtifactsOnPurchasedListings,\n ContentId.Inventory_ViewFulfillmentArtifactsOnPurchasedBy_Details,\n 'view',\n ],\n [Permission.Inventory_ViewFulfillmentArtifactsOnIsPricerOf]: [\n ContentId.Permission_ViewFulfillmentArtifactsOnAssignedListings,\n ContentId.Inventory_ViewFulfillmentArtifactsOnIsPricerOf_Details,\n 'view',\n ],\n [Permission.Inventory_BroadcastUnbroadcastOnIsPricerOf]: [\n ContentId.Permission_BroadcastUnbroadcastOnAssignedListings,\n ContentId.Inventory_BroadcastUnbroadcastOnIsPricerOf_Details,\n 'action',\n ],\n [Permission.Purchases_AddTagType]: [\n ContentId.Permission_AddTagType,\n ContentId.Purchases_AddTagType_Details,\n 'action',\n ],\n [Permission.Purchases_UpdateTags]: [\n ContentId.Permission_UpdateTags,\n ContentId.Purchases_UpdateTags_Details,\n 'action',\n ],\n [Permission.Purchases_UpdateTagsOwned]: [\n ContentId.Permission_UpdateTagsOnOwnedPurchasedOrder,\n ContentId.Purchases_UpdateTagsOwned_Details,\n 'action',\n ],\n [Permission.Purchases_ViewOwned]: [\n ContentId.Permission_ViewOwnedPurchasedOrders,\n ContentId.Purchases_ViewOwned_Details,\n 'view',\n ],\n [Permission.Events_AddTagType]: [\n ContentId.Permission_AddTagType,\n ContentId.Events_AddTagType_Details,\n 'action',\n ],\n [Permission.Events_UpdateTags]: [\n ContentId.Permission_UpdateTags,\n ContentId.Events_UpdateTags_Details,\n 'action',\n ],\n [Permission.Events_Edit]: [\n ContentId.Permission_UpdateInfo,\n ContentId.Events_Edit_Details,\n 'action',\n ],\n [Permission.Reports_CreateReports]: [\n ContentId.Permission_CreateReports,\n ContentId.Reports_CreateReports_Details,\n 'action',\n ],\n [Permission.Reports_UpdateReports]: [\n ContentId.Permission_UpdateReports,\n ContentId.Reports_UpdateReports_Details,\n 'action',\n ],\n [Permission.Reports_UpdateReportsOwned]: [\n ContentId.Permission_UpdateCreatedReports,\n ContentId.Reports_UpdateReportsOwned_Details,\n 'action',\n ],\n [Permission.Reports_ViewInventoryReports]: [\n ContentId.Permission_ViewInventoryReports,\n ContentId.Reports_ViewInventoryReports_Details,\n 'view',\n ],\n [Permission.Reports_ViewSalesReports]: [\n ContentId.Permission_ViewSalesReports,\n ContentId.Reports_ViewSalesReports_Details,\n 'view',\n ],\n [Permission.Reports_ViewGlobalReports]: [\n ContentId.Permission_ViewGlobalReports,\n ContentId.Reports_ViewGlobalReports_Details,\n 'view',\n ],\n [Permission.Reports_ViewAll]: [\n ContentId.Permission_ViewAll,\n ContentId.Reports_ViewAll_Details,\n 'view',\n ],\n [Permission.Sales_ViewFulfillmentArtifactsOnIsFulfillerOf]: [\n ContentId.Permission_ViewFulfillmentArtifactsOnAssignedSales,\n ContentId.Sales_ViewFulfillmentArtifactsOnIsFulfillerOf_Details,\n 'view',\n ],\n [Permission.Sales_CreateOfflineSale]: [\n ContentId.Permission_CreateOfflineSale,\n ContentId.Sales_CreateOfflineSale_Details,\n 'action',\n ],\n [Permission.Sales_ManageOfflineSale]: [\n ContentId.Permission_ManageOfflineSale,\n ContentId.Sales_ManageOfflineSale_Details,\n 'action',\n ],\n [Permission.Sales_ManageOfflineSaleCreatedBy]: [\n ContentId.Permission_ManageOfflineSalesOnPurchasedListings,\n ContentId.Sales_ManageOfflineSaleCreatedBy_Details,\n 'action',\n ],\n [Permission.Sales_ConfirmTransferWithoutProof]: [\n ContentId.Permission_ConfirmTransferWithoutProof,\n ContentId.Sales_ConfirmTransferWithoutProof_Details,\n 'action',\n ],\n [Permission.Sales_ResetFulfillment]: [\n ContentId.Permission_ResetFulfillment,\n ContentId.Sales_ResetFulfillment_Details,\n 'action',\n ],\n [Permission.Inventory_AddSeatSaver]: [\n ContentId.Permission_AddSeatSaver,\n ContentId.Inventory_AddSeatSaver_Details,\n 'action',\n ],\n [Permission.Inventory_ManageSeatSaver]: [\n ContentId.Permission_ManagePlaceholderListings,\n ContentId.Inventory_ManageSeatSaver_Details,\n 'action',\n ],\n [Permission.Inventory_ManageSeatSaverCreatedBy]: [\n ContentId.Permission_ManageCreatedPlaceholderListings,\n ContentId.Inventory_ManageSeatSaverCreatedBy_Details,\n 'action',\n ],\n [Permission.Events_SetPrice]: [\n ContentId.Permission_ConfigurePricing,\n ContentId.Events_SetPrice_Details,\n 'action',\n ],\n [Permission.Account_SetPrice]: [\n ContentId.Permission_ConfigurePricing,\n ContentId.Account_SetPrice_Details,\n 'action',\n ],\n [Permission.Webhook_View]: [\n ContentId.Permission_Webhook_View,\n ContentId.Webhook_View_Details,\n 'view',\n ],\n [Permission.Webhook_Create]: [\n ContentId.Permission_Webhook_Create,\n ContentId.Webhook_Create_Details,\n 'action',\n ],\n [Permission.Webhook_Edit]: [\n ContentId.Permission_Webhook_Edit,\n ContentId.Webhook_Edit_Details,\n 'action',\n ],\n [Permission.EventConfig_Create]: [\n ContentId.Permission_EventConfig_Create,\n ContentId.EventConfig_Create_Details,\n 'action',\n ],\n [Permission.EventConfig_Edit]: [\n ContentId.Permission_EventConfig_Edit,\n ContentId.EventConfig_Edit_Details,\n 'action',\n ],\n [Permission.EventConfig_View]: [\n ContentId.Permission_EventConfig_View,\n ContentId.EventConfig_View_Details,\n 'view',\n ],\n [Permission.Accounting_ViewAll]: [\n ContentId.Permission_ViewAll,\n ContentId.Accounting_ViewAll_Details,\n 'view',\n ],\n [Permission.Accounting_ViewPaymentsOnSale]: [\n ContentId.Permission_ViewPaymentsOnSale,\n ContentId.Accounting_ViewPaymentsOnSale_Details,\n 'view',\n ],\n [Permission.Accounting_ViewStubhubPayments]: [\n ContentId.Permission_ViewStubhubPayments,\n ContentId.Accounting_ViewStubhubPayments_Details,\n 'view',\n ],\n [Permission.General_ViewNotifications]: [\n ContentId.Permission_ViewNotifications,\n ContentId.General_ViewNotifications_Details,\n 'view',\n ],\n [Permission.General_ViewReleaseNotes]: [\n ContentId.Permission_ViewReleaseNotes,\n ContentId.General_ViewReleaseNotes_Details,\n 'view',\n ],\n [Permission.AdPlatform_Edit]: [\n ContentId.Permission_AdPlatformEdit,\n ContentId.AdPlatform_Edit_Details,\n 'action',\n ],\n};\n\nexport const EVENT_TIME_FRAME_FILTER_TO_CID: Record<\n EventTimeFrameFilter,\n ContentId\n> = {\n [EventTimeFrameFilter.Future]: ContentId.FutureEvents,\n [EventTimeFrameFilter.Past]: ContentId.PastEvents,\n};\n\nexport const MARKETPLACE_PAYMENTS_TIME_FRAME_FILTER_TO_CID: Record<\n EventTimeFrameFilter,\n ContentId\n> = {\n [EventTimeFrameFilter.Future]: ContentId.FuturePayments,\n [EventTimeFrameFilter.Past]: ContentId.PastPayments,\n};\n\nexport const TOP_LEVEL_CATEGORY_TO_CID: Record = {\n [TopLevelCategory.Concert]: ContentId.Concert,\n [TopLevelCategory.Festival]: ContentId.Festival,\n [TopLevelCategory.Sports]: ContentId.Sports,\n [TopLevelCategory.Theatre]: ContentId.Theatre,\n};\n\nexport const PARENT_CATEGORY_TO_CID: Record = {\n '1007': ContentId.Category1007,\n '1009': ContentId.Category1009,\n '4286': ContentId.Category4286,\n '5099': ContentId.Category5099,\n '6401': ContentId.Category6401,\n '6404': ContentId.Category6404,\n '6451': ContentId.Category6451,\n '6452': ContentId.Category6452,\n '12567': ContentId.Category12567,\n '263024': ContentId.Category263024,\n '272988': ContentId.Category272988,\n '272989': ContentId.Category272989,\n '273013': ContentId.Category273013,\n '273026': ContentId.Category273026,\n '273031': ContentId.Category273031,\n '273034': ContentId.Category273034,\n '273055': ContentId.Category273055,\n '273057': ContentId.Category273057,\n '273089': ContentId.Category273089,\n '273137': ContentId.Category273137,\n '273138': ContentId.Category273138,\n '273164': ContentId.Category273164,\n '273171': ContentId.Category273171,\n '273393': ContentId.Category273393,\n '273409': ContentId.Category273409,\n '273431': ContentId.Category273431,\n '273485': ContentId.Category273485,\n '273529': ContentId.Category273529,\n '273657': ContentId.Category273657,\n '274164': ContentId.Category274164,\n '274701': ContentId.Category274701,\n '274794': ContentId.Category274794,\n '275344': ContentId.Category275344,\n '275641': ContentId.Category275641,\n '276077': ContentId.Category276077,\n '276281': ContentId.Category276281,\n '276306': ContentId.Category276306,\n '276308': ContentId.Category276308,\n '276311': ContentId.Category276311,\n '276861': ContentId.Category276861,\n '278221': ContentId.Category278221,\n '278837': ContentId.Category278837,\n '279267': ContentId.Category279267,\n '279563': ContentId.Category279563,\n '289352': ContentId.Category289352,\n '150012246': ContentId.Category150012246,\n '1013': ContentId.Category1013,\n '1015': ContentId.Category1015,\n '1017': ContentId.Category1017,\n '2294': ContentId.Category2294,\n '4551': ContentId.Category4551,\n '6403': ContentId.Category6403,\n '55548': ContentId.Category55548,\n '259716': ContentId.Category259716,\n '356361': ContentId.Category356361,\n '356453': ContentId.Category356453,\n '356499': ContentId.Category356499,\n '356585': ContentId.Category356585,\n '357019': ContentId.Category357019,\n '357036': ContentId.Category357036,\n '358121': ContentId.Category358121,\n '358959': ContentId.Category358959,\n '366262': ContentId.Category366262,\n '366288': ContentId.Category366288,\n '366529': ContentId.Category366529,\n '366888': ContentId.Category366888,\n '375100': ContentId.Category375100,\n '379731': ContentId.Category379731,\n '379991': ContentId.Category379991,\n '380480': ContentId.Category380480,\n '381561': ContentId.Category381561,\n '150002820': ContentId.Category150002820,\n '1014': ContentId.Category1014,\n '1022': ContentId.Category1022,\n '1023': ContentId.Category1023,\n '1026': ContentId.Category1026,\n '1027': ContentId.Category1027,\n '1059': ContentId.Category1059,\n '1205': ContentId.Category1205,\n '14858': ContentId.Category14858,\n '259810': ContentId.Category259810,\n '259815': ContentId.Category259815,\n '259819': ContentId.Category259819,\n '259820': ContentId.Category259820,\n '259822': ContentId.Category259822,\n '259823': ContentId.Category259823,\n '259824': ContentId.Category259824,\n '259827': ContentId.Category259827,\n '259828': ContentId.Category259828,\n '259829': ContentId.Category259829,\n '259833': ContentId.Category259833,\n '259921': ContentId.Category259921,\n '259922': ContentId.Category259922,\n '260261': ContentId.Category260261,\n '260263': ContentId.Category260263,\n '260264': ContentId.Category260264,\n '260265': ContentId.Category260265,\n '260266': ContentId.Category260266,\n '260267': ContentId.Category260267,\n '260268': ContentId.Category260268,\n '260270': ContentId.Category260270,\n '260271': ContentId.Category260271,\n '260275': ContentId.Category260275,\n '260347': ContentId.Category260347,\n '260357': ContentId.Category260357,\n '260385': ContentId.Category260385,\n '260389': ContentId.Category260389,\n '260392': ContentId.Category260392,\n '260421': ContentId.Category260421,\n '260478': ContentId.Category260478,\n '260483': ContentId.Category260483,\n '260492': ContentId.Category260492,\n '260530': ContentId.Category260530,\n '260539': ContentId.Category260539,\n '260542': ContentId.Category260542,\n '260601': ContentId.Category260601,\n '260624': ContentId.Category260624,\n '260628': ContentId.Category260628,\n '260637': ContentId.Category260637,\n '260644': ContentId.Category260644,\n '261289': ContentId.Category261289,\n '261291': ContentId.Category261291,\n '308335': ContentId.Category308335,\n '308336': ContentId.Category308336,\n '308341': ContentId.Category308341,\n '308342': ContentId.Category308342,\n '308344': ContentId.Category308344,\n '308345': ContentId.Category308345,\n '308350': ContentId.Category308350,\n '308351': ContentId.Category308351,\n '308352': ContentId.Category308352,\n '308353': ContentId.Category308353,\n '308355': ContentId.Category308355,\n '308357': ContentId.Category308357,\n '308358': ContentId.Category308358,\n '308363': ContentId.Category308363,\n '308364': ContentId.Category308364,\n '308365': ContentId.Category308365,\n '308385': ContentId.Category308385,\n '321834': ContentId.Category321834,\n '1024': ContentId.Category1024,\n};\n\nexport const MARKET_PLACE_TO_CID: Record = {\n [Marketplace.StubHub]: Marketplace.StubHub,\n [Marketplace.SeatGeek]: Marketplace.SeatGeek,\n [Marketplace.Ticketmaster]: Marketplace.Ticketmaster,\n [Marketplace.VividSeats]: Marketplace.VividSeats,\n [Marketplace.TickPick]: Marketplace.TickPick,\n [Marketplace.Offline]: ContentId.DirectOffline,\n [Marketplace.AXS]: Marketplace.AXS,\n [Marketplace.FanXchange]: Marketplace.FanXchange,\n [Marketplace.Gametime]: Marketplace.Gametime,\n [Marketplace.TicketEvolution]: Marketplace.TicketEvolution,\n [Marketplace.TicketNetwork]: Marketplace.TicketNetwork,\n [Marketplace.Automatiq]: Marketplace.Automatiq,\n [Marketplace.Lyte]: Marketplace.Lyte,\n [Marketplace.GoTickets]: Marketplace.GoTickets,\n [Marketplace.B2BSales]: Marketplace.B2BSales,\n [Marketplace.TicketNetworkMercury]: Marketplace.TicketNetworkMercury,\n};\n\nexport const YES_NO_ENUM_FILTER_TO_CID: Record = {\n [YesNoEnum.Yes]: ContentId.Yes,\n [YesNoEnum.No]: ContentId.No,\n};\n\nexport const EVENT_PRICED_STATUS_TO_CID: Record<\n EventUnpricedStatus,\n ContentId\n> = {\n [EventUnpricedStatus.AllUnpriced]: ContentId.All,\n [EventUnpricedStatus.NoneUnpriced]: ContentId.None,\n [EventUnpricedStatus.AnyUnpriced]: ContentId.Any,\n};\n\nexport const EVENT_LAST_REVIEWED_SINCE_DATE_CID: Record<\n LastReviewedSinceDate,\n ContentId\n> = {\n [LastReviewedSinceDate.LastThreeDays]: ContentId.Last3Days,\n [LastReviewedSinceDate.LastSevenDays]: ContentId.LastWeek,\n [LastReviewedSinceDate.LastTwoWeeks]: ContentId.Last2Weeks,\n [LastReviewedSinceDate.LastThirtyDays]: ContentId.Last30Days,\n};\n\nexport const CONTAINS_EQUALS_ENUM_FILTER_TO_CID: Record<\n TextFilterEnum,\n ContentId\n> = {\n [TextFilterEnum.Contains]: ContentId.Contains,\n [TextFilterEnum.Equals]: ContentId.Equals,\n [TextFilterEnum.NotContains]: ContentId.NotContains,\n};\n\nexport const SALES_DATE_FILTER_TO_CID: Record = {\n [SaleDateFilterEnum.HasSaleDate]: ContentId.SaleDateFilterOccured,\n [SaleDateFilterEnum.NoSaleDate]: ContentId.SaleDateFilterNotOccured,\n};\n\nexport const PRICE_UPDATED_DATE_FILTER_TO_CID: Record<\n PriceUpdatedFilterEnum,\n ContentId\n> = {\n [PriceUpdatedFilterEnum.PriceUpdatedDate]: ContentId.PriceDateFilterChanged,\n [PriceUpdatedFilterEnum.PriceNotUpdatedDate]:\n ContentId.PriceDateFilterUnchanged,\n};\n\n/**\n * This is created when we don't need to show the No option in the filter\n */\nexport const YES_ENUM_FILTER_TO_CID: Record = {\n [YesNoEnum.Yes]: ContentId.Yes,\n};\n\n/**\n * This is created because the original YES_NO_ENUM_FILTER_TO_CID was used for\n * filter query \"isSeatingUnmapped\" and the labels was Seating Unmapped.\n * A new business requirement, asks for called it Seating Mapped, so the values\n * must be inverted in order to continue working.\n */\nexport const YES_NO_INVERTED_ENUM_FILTER_TO_CID: Record =\n {\n [YesNoEnum.Yes]: ContentId.No,\n [YesNoEnum.No]: ContentId.Yes,\n };\n\nexport const AUTO_PRICING_RESULT_TYPES_OPTIONS_TO_CID: Record<\n AutoPricingResultType,\n ContentId\n> = {\n [AutoPricingResultType.None]: ContentId.NA,\n [AutoPricingResultType.PriceSuccess]: ContentId.Success,\n [AutoPricingResultType.PriceBelowFloor]: ContentId.PriceBelowFloor,\n [AutoPricingResultType.PriceAboveCeiling]: ContentId.PriceAboveCeiling,\n [AutoPricingResultType.PriceBelowMaxAllowedDrop]:\n ContentId.PriceBelowMaxAllowedDrop,\n [AutoPricingResultType.InsufficientComparables]:\n ContentId.InsufficientComparables,\n [AutoPricingResultType.CannotCalculateUndercut]:\n ContentId.CannotCalculateUndercut,\n [AutoPricingResultType.EffectiveCeilingBelowFloor]:\n ContentId.EffectiveCeilingBelowFloor,\n [AutoPricingResultType.MissingSeatScore]: ContentId.MissingSeatScore,\n [AutoPricingResultType.MissingUnitCost]: ContentId.MissingUnitCost,\n [AutoPricingResultType.MissingZone]: ContentId.MissingZone,\n [AutoPricingResultType.PriceHitHardFloor]: ContentId.PriceHitHardFloor,\n [AutoPricingResultType.PriceHitRelativeFloor]:\n ContentId.PriceHitRelativeFloor,\n [AutoPricingResultType.PriceHitMaxAllowedDrop]:\n ContentId.PriceHitMaxAllowedDrop,\n [AutoPricingResultType.ConfigRowMissing]: ContentId.MappingError,\n [AutoPricingResultType.SectionUnmapped]: ContentId.SectionUnmapped,\n};\n\nexport const AUTO_PRICING_RESULT_TYPES_OPTIONS_TO_COLOR: Record<\n AutoPricingResultType,\n string\n> = {\n [AutoPricingResultType.None]: vars.color.textDisabled,\n [AutoPricingResultType.PriceSuccess]: vars.color.borderSuccess,\n [AutoPricingResultType.PriceBelowFloor]: vars.color.borderWarning,\n [AutoPricingResultType.PriceAboveCeiling]: vars.color.borderWarning,\n [AutoPricingResultType.PriceBelowMaxAllowedDrop]: vars.color.borderWarning,\n [AutoPricingResultType.InsufficientComparables]: vars.color.borderWarning,\n [AutoPricingResultType.CannotCalculateUndercut]: vars.color.borderError,\n [AutoPricingResultType.EffectiveCeilingBelowFloor]: vars.color.borderError,\n [AutoPricingResultType.MissingSeatScore]: vars.color.borderError,\n [AutoPricingResultType.MissingUnitCost]: vars.color.borderError,\n [AutoPricingResultType.MissingZone]: vars.color.borderError,\n [AutoPricingResultType.PriceHitHardFloor]: vars.color.borderWarning,\n [AutoPricingResultType.PriceHitRelativeFloor]: vars.color.borderWarning,\n [AutoPricingResultType.PriceHitMaxAllowedDrop]: vars.color.borderWarning,\n [AutoPricingResultType.ConfigRowMissing]: vars.color.borderError,\n [AutoPricingResultType.SectionUnmapped]: vars.color.borderError,\n};\n\nexport const DELIVERY_OPTIONS_TO_CID: Record =\n {\n [DeliveryType.InApp]: ContentId.InApp,\n [DeliveryType.PDF]: DeliveryType.PDF, // PDF has no translation\n [DeliveryType.Paper]: ContentId.Paper,\n [DeliveryType.MemberCard]: ContentId.MemberCard,\n [DeliveryType.Wallet]: ContentId.Wallet,\n [DeliveryType.Custom]: ContentId.Custom,\n };\n\nexport const TICKET_TYPE_TO_CID: Record = {\n [TicketType.Barcode]: ContentId.Barcode,\n [TicketType.ETicket]: ContentId.ETicket,\n [TicketType.QRCode]: ContentId.QRCode,\n [TicketType.Transfer]: ContentId.Transfer,\n [TicketType.ETicketUrl]: ContentId.Wallet,\n [TicketType.SMPWallet]: ContentId.SMPWallet,\n [TicketType.Paper]: ContentId.Paper,\n [TicketType.Season]: ContentId.Season,\n [TicketType.Custom]: ContentId.Custom,\n};\n\nexport const PENDING_PROOF_STATE_TO_CID: Record =\n {\n [PendingProofState.PendingProof]: ContentId.ProofOfPurchasedRequired,\n [PendingProofState.PendingReview]: ContentId.PendingReview,\n [PendingProofState.Approved]: ContentId.Approved,\n };\n\nexport const PURCHASE_COST_TYPE_TO_CID: Record<\n PurchaseOrderCostType,\n ContentId\n> = {\n [PurchaseOrderCostType.Tax]: ContentId.TaxPaid,\n [PurchaseOrderCostType.Shipping]: ContentId.Shipping,\n [PurchaseOrderCostType.CreditCardFee]: ContentId.CreditCardFee,\n [PurchaseOrderCostType.BulkDiscount]: ContentId.BulkDiscount,\n};\n\nexport const SPLIT_TYPE_TO_CID: Record = {\n [SplitType.Any]: ContentId.Any,\n [SplitType.None]: ContentId.None,\n [SplitType.AvoidOne]: ContentId.AvoidOne,\n [SplitType.AvoidOneAndThree]: ContentId.AvoidOneAndThree,\n [SplitType.Pairs]: ContentId.Pairs,\n};\n\nexport const TAG_VALUE_TYPE_TO_CID: Record = {\n [TagsValueType.String]: ContentId.Text,\n [TagsValueType.Decimal]: ContentId.DecimalNumber,\n [TagsValueType.Int]: ContentId.WholeNumber,\n [TagsValueType.Boolean]: ContentId.TrueFalse,\n [TagsValueType.Url]: ContentId.Hyperlink,\n [TagsValueType.Marketplace]: ContentId.Marketplace,\n [TagsValueType.Date]: ContentId.Date,\n [TagsValueType.POSUser]: ContentId.Users,\n [TagsValueType.Vendor]: ContentId.Vendors,\n [TagsValueType.UserGroup]: ContentId.Teams,\n};\n\nexport const PAYMENT_METHOD_TYPE_TO_CID: Record<\n PurchasePaymentMethodType,\n ContentId | string\n> = {\n [PurchasePaymentMethodType.PayPal]: PurchasePaymentMethodType.PayPal, // this is a brand\n [PurchasePaymentMethodType.Check]: ContentId.Check,\n [PurchasePaymentMethodType.ECheck]: ContentId.ECheck,\n [PurchasePaymentMethodType.MoneyOrder]: ContentId.MoneyOrder,\n [PurchasePaymentMethodType.Card]: ContentId.CreditCard,\n [PurchasePaymentMethodType.Cash]: ContentId.Cash,\n [PurchasePaymentMethodType.Credit]: ContentId.Credit,\n [PurchasePaymentMethodType.COD]: ContentId.COD,\n [PurchasePaymentMethodType.BankTransfer]: ContentId.BankTransfer,\n [PurchasePaymentMethodType.DebitCard]: ContentId.DebitCard,\n [PurchasePaymentMethodType.CreditMemo]: ContentId.CreditBalance,\n [PurchasePaymentMethodType.DebitNote]: ContentId.DebitNote,\n [PurchasePaymentMethodType.Other]: ContentId.Other,\n};\n\nexport const TICKET_GROUP_EDIT_REASON_TO_CID: Record<\n TicketGroupEditReason,\n ContentId\n> = {\n [TicketGroupEditReason.AddTickets]: ContentId.AddTickets,\n [TicketGroupEditReason.AmendTickets]: ContentId.AmendTickets,\n [TicketGroupEditReason.CancelTickets]: ContentId.CancelTickets,\n [TicketGroupEditReason.ExchangeTickets]: ContentId.ExchangeTickets,\n [TicketGroupEditReason.EditEvent]: ContentId.ChangeEvent,\n};\n\nexport const LISTING_STATUS_TO_CID: Record = {\n [ListingStatus.Delisted]: ContentId.Delisted,\n [ListingStatus.DelistingPending]: ContentId.DelistingPending,\n [ListingStatus.DelistingFailed]: ContentId.ListedDelistFailed,\n [ListingStatus.Listed]: ContentId.Listed,\n [ListingStatus.ListingPending]: ContentId.ListingPending,\n [ListingStatus.ListingFailed]: ContentId.ListingFailed,\n [ListingStatus.FullySold]: ContentId.FullySold,\n [ListingStatus.Disabled]: ContentId.BroadcastDisabled,\n};\n\nexport const FULFILLMENT_STATE_TO_CID: Record<\n PointOfSaleFulfillmentState,\n ContentId\n> = {\n [PointOfSaleFulfillmentState.Ineligible]: ContentId.Ineligible,\n [PointOfSaleFulfillmentState.Pending]: ContentId.Pending,\n [PointOfSaleFulfillmentState.Processing]: ContentId.Processing,\n [PointOfSaleFulfillmentState.PendingPickup]: ContentId.PendingPickup,\n [PointOfSaleFulfillmentState.InTransit]: ContentId.InTransit,\n [PointOfSaleFulfillmentState.Fulfilled]: ContentId.Fulfilled,\n [PointOfSaleFulfillmentState.Resetted]: ContentId.PendingRefulfillment,\n [PointOfSaleFulfillmentState.Failed]: ContentId.Failed,\n};\n\nexport const LISTING_STATUS_WITH_ACTION_TO_CID: Record<\n ListingStatus,\n ContentId\n> = {\n [ListingStatus.Delisted]: ContentId.DelistedClickToList,\n [ListingStatus.DelistingPending]: ContentId.DelistingClickToCancel,\n [ListingStatus.DelistingFailed]: ContentId.DelistingFailedClickToTryAgain,\n [ListingStatus.Listed]: ContentId.ListedClickToDelist,\n [ListingStatus.ListingPending]: ContentId.ListingClickToCancel,\n [ListingStatus.ListingFailed]: ContentId.ListingFailedClickToTryAgain,\n [ListingStatus.FullySold]: ContentId.ListingFullSoldNoActionAvailable,\n [ListingStatus.Disabled]: ContentId.BroadcastDisabled,\n};\n\nexport const LISTING_TABLE_FLATTENED_COLUMN_ID_TO_CONTENT_ID: Record<\n ListingTableFlattenedColumnId,\n ContentId\n> = {\n [ListingTableFlattenedColumnId.Event]: ContentId.Event,\n [ListingTableFlattenedColumnId.Venue]: ContentId.Venue,\n [ListingTableFlattenedColumnId.Location]: ContentId.Location,\n [ListingTableFlattenedColumnId.EventDate]: ContentId.EventDate,\n};\n\nexport const LISTING_TABLE_COLUMN_ID_TO_CONTENT_ID: Record<\n ListingTableColumnId,\n ContentId | string\n> = {\n [ListingTableColumnId.Checkbox]: ContentId.Checkbox,\n [ListingTableColumnId.TicketClassColor]: ContentId.Zone,\n [ListingTableColumnId.Seating]: ContentId.Seating,\n [ListingTableColumnId.DeliveryType]: ContentId.Delivery,\n [ListingTableColumnId.ShownQuantity]: ContentId.Shown,\n [ListingTableColumnId.UnsoldQuantity]: ContentId.Unsold,\n [ListingTableColumnId.TicketCount]: ContentId.Total,\n [ListingTableColumnId.InHandDate]: 'IH',\n [ListingTableColumnId.UnitCost]: ContentId.UnitCost,\n [ListingTableColumnId.ListPrice]: ContentId.Proceeds,\n [ListingTableColumnId.AllInPrice]: ContentId.Price,\n [ListingTableColumnId.Actions]: ContentId.Actions,\n [ListingTableColumnId.ListingId]: ContentId.ListingId,\n [ListingTableColumnId.AutoPricing]: ContentId.PriceToMarket,\n [ListingTableColumnId.ProceedsFloor]: ContentId.ProceedsFloor,\n [ListingTableColumnId.ProceedsCeiling]: ContentId.ProceedsCeiling,\n [ListingTableColumnId.WebsiteFloor]: ContentId.WebsiteFloor,\n [ListingTableColumnId.WebsiteCeiling]: ContentId.WebsiteCeiling,\n [ListingTableColumnId.UndercutMode]: ContentId.UndercutMode,\n [ListingTableColumnId.UndercutAbsoluteAmount]:\n ContentId.UndercutAbsoluteAmount,\n [ListingTableColumnId.UndercutRelativeAmount]:\n ContentId.UndercutRelativeAmount,\n [ListingTableColumnId.UndercutNewPrice]: ContentId.MarketPrice,\n [ListingTableColumnId.CompListingMode]: ContentId.CompListingMode,\n [ListingTableColumnId.CompListingFloor]: ContentId.CompListingFloor,\n [ListingTableColumnId.CompListingCeiling]: ContentId.CompListingCeiling,\n [ListingTableColumnId.CompListingMinimumQuantity]:\n ContentId.CompListingMinQuantity,\n [ListingTableColumnId.CompListingExcludeFanInventory]:\n ContentId.ExcludeFanInventory,\n [ListingTableColumnId.OutlierMode]: ContentId.OutlierMode,\n [ListingTableColumnId.OutlierLimit]: ContentId.OutlierLimit,\n [ListingTableColumnId.OutlierFiltering]: ContentId.OutlierFiltering,\n [ListingTableColumnId.OutlierSpacing]: ContentId.OutlierSpacing,\n [ListingTableColumnId.CircuitBreakerMinCompListingCount]:\n ContentId.CompListingMinCount,\n [ListingTableColumnId.CircuitBreakerVelocity]: ContentId.Velocity,\n [ListingTableColumnId.CircuitBreakerVelocityHours]: ContentId.VelocityHours,\n [ListingTableColumnId.SeatingRow]: ContentId.Row,\n [ListingTableColumnId.SeatingSeats]: ContentId.Seats,\n [ListingTableColumnId.AutoPricingResultType]: ContentId.AutoPricingResult,\n [ListingTableColumnId.LastPriceUpdatedDate]: ContentId.LastPriceUpdatedDate,\n [ListingTableColumnId.WastedCost]: ContentId.WastedCost,\n [ListingTableColumnId.WastedTickets]: ContentId.WastedQty,\n [ListingTableColumnId.PurchaseId]: ContentId.ExternalPurchaseIdAbbreviated,\n [ListingTableColumnId.VendorAccount]: ContentId.VendorAccount,\n [ListingTableColumnId.MarketplaceVisibility]: ContentId.MarketplaceVisibility,\n [ListingTableColumnId.PurchaseCreatedBy]: ContentId.CreatedBy,\n [ListingTableColumnId.PurchasedBy]: ContentId.PurchasedBy,\n [ListingTableColumnId.PurchaseDate]: ContentId.PoDate,\n [ListingTableColumnId.RelativeRankPremium]: ContentId.RelativeRankPremium,\n [ListingTableColumnId.AbsoluteRankPremium]: ContentId.AbsoluteRankPremium,\n [ListingTableColumnId.UnsoldProceeds]: ContentId.UnsoldProceeds,\n [ListingTableColumnId.UnsoldCost]: ContentId.UnsoldCost,\n [ListingTableColumnId.SoldQty]: ContentId.SoldQty,\n [ListingTableColumnId.SoldCost]: ContentId.SoldCost,\n [ListingTableColumnId.TotalCost]: ContentId.TotalCost,\n [ListingTableColumnId.AutoFulfill]: ContentId.AutoFulfill,\n [ListingTableColumnId.SeatTraits]: ContentId.SeatTraits,\n [ListingTableColumnId.SplitType]: ContentId.SplitType,\n};\n\nexport const LISTING_REPORT_TABLE_COLUMN_ID_TO_CONTENT_ID: Record<\n ListingReportTableColumnId,\n ContentId | string\n> = {\n [ListingReportTableColumnId.Performer]: ContentId.Performer,\n [ListingReportTableColumnId.Venue]: ContentId.Venue,\n [ListingReportTableColumnId.Event]: ContentId.EventName,\n [ListingReportTableColumnId.UnsoldQuantity]: ContentId.UnsoldQty,\n [ListingReportTableColumnId.SoldQuantity]: ContentId.SoldQty,\n [ListingReportTableColumnId.TicketCount]: ContentId.TotalQty,\n [ListingReportTableColumnId.UnitCost]: ContentId.TotalUnitCost,\n [ListingReportTableColumnId.ListPrice]: ContentId.TotalProceeds,\n [ListingReportTableColumnId.AllInPrice]: ContentId.Price,\n [ListingReportTableColumnId.EventGenre]: ContentId.Genre,\n [ListingReportTableColumnId.EventCountry]: ContentId.Country,\n [ListingReportTableColumnId.EventCity]: ContentId.City,\n [ListingReportTableColumnId.SeatingSection]: ContentId.Section,\n [ListingReportTableColumnId.SeatingRow]: ContentId.Row,\n [ListingReportTableColumnId.SoldCost]: ContentId.SoldCost,\n [ListingReportTableColumnId.SoldProceeds]: ContentId.SoldProceeds,\n [ListingReportTableColumnId.UnsoldCost]: ContentId.UnsoldCost,\n [ListingReportTableColumnId.EventId]: ContentId.EventId,\n [ListingReportTableColumnId.Category]: ContentId.Category,\n [ListingReportTableColumnId.EventDate]: ContentId.EventDate,\n [ListingReportTableColumnId.EventStateProvince]: ContentId.StateProvince,\n [ListingReportTableColumnId.SaleId]: ContentId.SaleId,\n [ListingReportTableColumnId.HoldId]: ContentId.HoldId,\n [ListingReportTableColumnId.SeatingSeats]: ContentId.Seats,\n [ListingReportTableColumnId.DeliveryType]: ContentId.Delivery,\n [ListingReportTableColumnId.InHandDate]: 'IH',\n [ListingReportTableColumnId.PurchaseId]: ContentId.PoId,\n [ListingReportTableColumnId.PurchasedBy]: ContentId.PurchasedBy,\n [ListingReportTableColumnId.PurchaseDate]: ContentId.PoDate,\n [ListingReportTableColumnId.Vendor]: ContentId.Vendor,\n [ListingReportTableColumnId.SalePaymentState]: ContentId.PayState,\n [ListingReportTableColumnId.Charges]: ContentId.Charges,\n [ListingReportTableColumnId.Credits]: ContentId.Credits,\n [ListingReportTableColumnId.Fulfiller]: ContentId.FulfilledBy,\n [ListingReportTableColumnId.ListingId]: ContentId.ListingId,\n [ListingReportTableColumnId.PaymentMethodType]: ContentId.PaymentMethod,\n [ListingReportTableColumnId.PurchasePaymentStatus]: ContentId.POPaymentState,\n [ListingReportTableColumnId.Zone]: ContentId.Zone,\n [ListingReportTableColumnId.PricedBy]: ContentId.PricedBy,\n [ListingReportTableColumnId.InternalNotes]: ContentId.Notes,\n [ListingReportTableColumnId.InternalNotesPurchase]: ContentId.Notes,\n [ListingReportTableColumnId.VendorOrderId]:\n ContentId.ExternalPurchaseIdAbbreviated,\n [ListingReportTableColumnId.VendorAccountEmail]: ContentId.VendorAccount,\n [ListingReportTableColumnId.CancellationDatePurchase]:\n ContentId.CancellationDate,\n [ListingReportTableColumnId.PandL]: ContentId.PandL,\n [ListingReportTableColumnId.Margin]: ContentId.Margin,\n [ListingReportTableColumnId.PurchaseCreatedBy]: ContentId.POCreatedBy,\n};\n\nexport const LISTING_REPORT_TABLE_GROUPING_COLUMN_ID_TO_CONTENT_ID: Record<\n ListingReportTableGroupingColumnId,\n ContentId\n> = {\n [ListingReportTableGroupingColumnId.PerformerName]: ContentId.Performer,\n [ListingReportTableGroupingColumnId.VenueName]: ContentId.Venue,\n [ListingReportTableGroupingColumnId.EventName]: ContentId.EventName,\n [ListingReportTableGroupingColumnId.TopLevelCategoryName]: ContentId.Genre,\n [ListingReportTableGroupingColumnId.CountryName]: ContentId.Country,\n [ListingReportTableGroupingColumnId.CityName]: ContentId.City,\n [ListingReportTableGroupingColumnId.EventId]: ContentId.EventId,\n [ListingReportTableGroupingColumnId.LocalEventDateTime]: ContentId.EventDate,\n [ListingReportTableGroupingColumnId.StateProvince]: ContentId.StateProvince,\n [ListingReportTableGroupingColumnId.InternalNotes]: ContentId.PrivateNote,\n [ListingReportTableGroupingColumnId.ListingId]: ContentId.ListingId,\n [ListingReportTableGroupingColumnId.IsSeatSaver]: ContentId.SeatSaver,\n [ListingReportTableGroupingColumnId.IsNoFulfill]: ContentId.AutoFulfill,\n [ListingReportTableGroupingColumnId.PricerSellerUserId]: ContentId.PricedBy,\n [ListingReportTableGroupingColumnId.Section]: ContentId.Section,\n [ListingReportTableGroupingColumnId.SeatingRow]: ContentId.Row,\n [ListingReportTableGroupingColumnId.SeatFrom]: ContentId.SeatFrom,\n [ListingReportTableGroupingColumnId.SeatTo]: ContentId.SeatTo,\n};\n\nexport const LISTING_REPORT_TABLE_VALUE_COLUMN_ID_TO_CONTENT_ID: Record<\n ListingReportTableValueColumnId,\n ContentId\n> = {\n [ListingReportTableValueColumnId.UnsoldQuantity]: ContentId.UnsoldQty,\n [ListingReportTableValueColumnId.SoldQuantity]: ContentId.SoldQuantity,\n [ListingReportTableValueColumnId.TotalQuantity]: ContentId.TotalQuantity,\n [ListingReportTableValueColumnId.UnitAllInPrice]: ContentId.AllIn,\n [ListingReportTableValueColumnId.UnitNetProceeds]: ContentId.TotalNetProceeds,\n [ListingReportTableValueColumnId.SoldCost]: ContentId.SoldCost,\n [ListingReportTableValueColumnId.UnsoldCost]: ContentId.UnsoldCost,\n [ListingReportTableValueColumnId.UnitCost]: ContentId.UnitCost,\n [ListingReportTableValueColumnId.PurchaseOrderId]: ContentId.PoId,\n [ListingReportTableValueColumnId.PurchaseOrderDate]: ContentId.PoDate,\n [ListingReportTableValueColumnId.BuyerUserId]: ContentId.PurchasedBy,\n [ListingReportTableValueColumnId.PurchaseOrderVendorName]: ContentId.Vendor,\n [ListingReportTableValueColumnId.VendorOrderId]:\n ContentId.ExternalPurchaseIdAbbreviated,\n [ListingReportTableValueColumnId.VendorAccountEmail]: ContentId.VendorAccount,\n};\n\nexport const SALES_REPORT_TABLE_GROUPING_COLUMN_ID_TO_CONTENT_ID: Record<\n SalesReportTableGroupingColumnId,\n ContentId\n> = {\n [SalesReportTableGroupingColumnId.PerformerName]: ContentId.Performer,\n [SalesReportTableGroupingColumnId.VenueName]: ContentId.Venue,\n [SalesReportTableGroupingColumnId.EventName]: ContentId.EventName,\n [SalesReportTableGroupingColumnId.TopLevelCategoryName]: ContentId.Genre,\n [SalesReportTableGroupingColumnId.CountryName]: ContentId.Country,\n [SalesReportTableGroupingColumnId.CityName]: ContentId.City,\n [SalesReportTableGroupingColumnId.Section]: ContentId.Section,\n [SalesReportTableGroupingColumnId.SeatingRow]: ContentId.Row,\n [SalesReportTableGroupingColumnId.SeatFrom]: ContentId.SeatFrom,\n [SalesReportTableGroupingColumnId.SeatTo]: ContentId.SeatTo,\n [SalesReportTableGroupingColumnId.EventId]: ContentId.EventId,\n [SalesReportTableGroupingColumnId.LocalEventDateTime]: ContentId.EventDate,\n [SalesReportTableGroupingColumnId.StateProvince]: ContentId.StateProvince,\n [SalesReportTableGroupingColumnId.SaleId]: ContentId.SaleId,\n [SalesReportTableGroupingColumnId.InternalNotes]: ContentId.PrivateNote,\n [SalesReportTableGroupingColumnId.SaleDate]: ContentId.SaleDate,\n [SalesReportTableGroupingColumnId.SaleStatusName]: ContentId.SaleStatus,\n [SalesReportTableGroupingColumnId.PaymentReferenceId]: ContentId.PayRef,\n [SalesReportTableGroupingColumnId.TicketTypeName]: ContentId.Ticket,\n [SalesReportTableGroupingColumnId.InHandDate]: ContentId.InHandDate,\n [SalesReportTableGroupingColumnId.LastPaymentDate]: ContentId.PaymentDate,\n [SalesReportTableGroupingColumnId.CancellationDate]:\n ContentId.CancellationDate,\n [SalesReportTableGroupingColumnId.FulfillerSellerUserId]:\n ContentId.FulfilledBy,\n [SalesReportTableGroupingColumnId.FulfillmentDate]: ContentId.FulfillmentDate,\n [SalesReportTableGroupingColumnId.MarketplacePaymentStateName]:\n ContentId.PayState,\n [SalesReportTableGroupingColumnId.MarketplaceName]: ContentId.Marketplace,\n [SalesReportTableGroupingColumnId.MarketplaceSaleId]:\n ContentId.ExternalSaleId,\n [SalesReportTableGroupingColumnId.IsSeatSaver]: ContentId.SeatSaver,\n [SalesReportTableGroupingColumnId.IsNoFulfill]: ContentId.AutoFulfill,\n [SalesReportTableGroupingColumnId.SaleMonth]: ContentId.SaleMonth,\n [SalesReportTableGroupingColumnId.SaleWeek]: ContentId.SaleWeek,\n [SalesReportTableGroupingColumnId.SaleDay]: ContentId.SaleDay,\n};\n\nexport const SALES_REPORT_TABLE_VALUE_COLUMN_ID_TO_CONTENT_ID: Record<\n SalesReportTableValueColumnId,\n ContentId\n> = {\n [SalesReportTableValueColumnId.QuantitySold]: ContentId.SoldQty,\n [SalesReportTableValueColumnId.TotalNetProceeds]: ContentId.TotalNetProceeds,\n [SalesReportTableValueColumnId.Charges]: ContentId.Charges,\n [SalesReportTableValueColumnId.Credits]: ContentId.Credits,\n [SalesReportTableValueColumnId.OutstandingBalance]:\n ContentId.OutstandingBalance,\n [SalesReportTableValueColumnId.PandL]: ContentId.PandL,\n [SalesReportTableValueColumnId.TotalCost]: ContentId.TotalCost,\n [SalesReportTableValueColumnId.Margin]: ContentId.Margin,\n};\n\nexport const COMMISSION_REPORT_TABLE_GROUPING_COLUMN_ID_TO_CONTENT_ID: Record<\n CommissionReportTableGroupingColumnId,\n ContentId\n> = {\n [CommissionReportTableGroupingColumnId.SaleId]: ContentId.SaleId,\n [CommissionReportTableGroupingColumnId.MarketplaceName]:\n ContentId.Marketplace,\n [CommissionReportTableGroupingColumnId.MarketplaceSaleId]:\n ContentId.ExternalSaleId,\n [CommissionReportTableGroupingColumnId.Commissioner]: ContentId.Commissioner,\n [CommissionReportTableGroupingColumnId.EventName]: ContentId.EventName,\n [CommissionReportTableGroupingColumnId.EventDateLocal]: ContentId.EventDate,\n [CommissionReportTableGroupingColumnId.VenueName]: ContentId.VenueName,\n [CommissionReportTableGroupingColumnId.EventId]: ContentId.EventId,\n [CommissionReportTableGroupingColumnId.EventStateName]: ContentId.EventState,\n [CommissionReportTableGroupingColumnId.SaleStatusName]: ContentId.SaleStatus,\n [CommissionReportTableGroupingColumnId.Section]: ContentId.Section,\n [CommissionReportTableGroupingColumnId.SeatingRow]: ContentId.Row,\n [CommissionReportTableGroupingColumnId.SeatFrom]: ContentId.SeatFrom,\n [CommissionReportTableGroupingColumnId.SeatTo]: ContentId.SeatTo,\n [CommissionReportTableGroupingColumnId.FulfillmentDate]:\n ContentId.FulfillmentDate,\n [CommissionReportTableGroupingColumnId.LastPaymentDate]:\n ContentId.PaymentDate,\n [CommissionReportTableGroupingColumnId.NetCommissionRate]:\n ContentId.NetCommissionRate,\n [CommissionReportTableGroupingColumnId.NetCommissionRateOverride]:\n ContentId.NetCommissionRateOverride,\n [CommissionReportTableGroupingColumnId.SaleBasisShare]:\n ContentId.SaleBasisShare,\n [CommissionReportTableGroupingColumnId.IsCommissionEligible]:\n ContentId.CommissionEligible,\n [CommissionReportTableGroupingColumnId.CommissionEligibilityDate]:\n ContentId.CommissionEligibilityDate,\n};\n\nexport const COMMISSION_REPORT_TABLE_VALUE_COLUMN_ID_TO_CONTENT_ID: Record<\n CommissionReportTableValueColumnId,\n ContentId\n> = {\n [CommissionReportTableValueColumnId.TotalNetProceeds]:\n ContentId.TotalNetProceeds,\n [CommissionReportTableValueColumnId.Credits]: ContentId.Credits,\n [CommissionReportTableValueColumnId.TotalCost]: ContentId.TotalCost,\n [CommissionReportTableValueColumnId.Charges]: ContentId.Charges,\n [CommissionReportTableValueColumnId.CommissionerCostsAndCharges]:\n ContentId.CommissionerCostsAndCharges,\n [CommissionReportTableValueColumnId.CommissionerProceedsAndCredits]:\n ContentId.CommissionerProceedsAndCredits,\n [CommissionReportTableValueColumnId.CommissionerProfitAndLoss]:\n ContentId.CommissionerProfitAndLoss,\n [CommissionReportTableValueColumnId.OriginalProceeds]:\n ContentId.OriginalProceeds,\n};\n\nexport const SITE_THEME_OPTION_TO_CID_MAP: Record =\n {\n [SiteThemeOption.System]: ContentId.SyncWithSystemSettings,\n [SiteThemeOption.Light]: ContentId.Light,\n [SiteThemeOption.Dark]: ContentId.Dark,\n };\n\nexport const EVENTS_TABLE_COLUMN_ID_TO_CONTENT_ID: Record<\n EventsTableColumnId,\n ContentId\n> = {\n [EventsTableColumnId.Checkbox]: ContentId.Checkbox,\n [EventsTableColumnId.Event]: ContentId.EventName,\n [EventsTableColumnId.Venue]: ContentId.Venue,\n [EventsTableColumnId.Location]: ContentId.Location,\n [EventsTableColumnId.Date]: ContentId.EventDate,\n [EventsTableColumnId.TotalQty]: ContentId.TotalQty,\n [EventsTableColumnId.SoldQty]: ContentId.SoldQty,\n [EventsTableColumnId.ActualSTR]: ContentId.SellThroughRate,\n [EventsTableColumnId.Revenue]: ContentId.SoldProceeds,\n [EventsTableColumnId.SoldCost]: ContentId.SoldCost,\n [EventsTableColumnId.Profit]: ContentId.SoldProfit,\n [EventsTableColumnId.LiftPercentage]: ContentId.LiftPercentage,\n [EventsTableColumnId.ATP]: ContentId.SoldAverageTicketPrice,\n [EventsTableColumnId.ListedQty]: ContentId.ListedQty,\n [EventsTableColumnId.ListedAtp]: ContentId.ListedAverageTicketPrice,\n [EventsTableColumnId.UnsoldQty]: ContentId.UnsoldQty,\n [EventsTableColumnId.Action]: ContentId.Actions,\n [EventsTableColumnId.UnsoldProceeds]: ContentId.UnsoldProceeds,\n [EventsTableColumnId.UnsoldCost]: ContentId.UnsoldCost,\n [EventsTableColumnId.TotalCost]: ContentId.TotalCost,\n [EventsTableColumnId.LastPriceUpdatedDate]: ContentId.LastPriceUpdatedDate,\n};\n\nexport const SALE_TABLE_COLUMN_ID_TO_CONTENT_ID: Record<\n SalesTableColumnId,\n ContentId\n> = {\n [SalesTableColumnId.Checkbox]: ContentId.Checkbox,\n [SalesTableColumnId.Actions]: ContentId.Actions,\n [SalesTableColumnId.InHandDate]: ContentId.InHandDate,\n [SalesTableColumnId.OrderDate]: ContentId.SaleDate,\n [SalesTableColumnId.Proceeds]: ContentId.SoldProceeds,\n [SalesTableColumnId.QuantitySold]: ContentId.SoldQty,\n [SalesTableColumnId.Sale]: ContentId.Sale,\n [SalesTableColumnId.Seating]: ContentId.Seating,\n [SalesTableColumnId.Row]: ContentId.Row,\n [SalesTableColumnId.Seats]: ContentId.Seats,\n [SalesTableColumnId.Status]: ContentId.SaleStatus,\n [SalesTableColumnId.TicketType]: ContentId.Ticket,\n [SalesTableColumnId.SoldTicketCost]: ContentId.SoldCost,\n [SalesTableColumnId.Charges]: ContentId.Charges,\n [SalesTableColumnId.Credits]: ContentId.Credits,\n [SalesTableColumnId.PandL]: ContentId.PandL,\n [SalesTableColumnId.Margin]: ContentId.Margin,\n [SalesTableColumnId.PurchaseCreatedBy]: ContentId.POCreatedBy,\n [SalesTableColumnId.PurchasedBy]: ContentId.PurchasedBy,\n [SalesTableColumnId.PurchaseDate]: ContentId.PoDate,\n [SalesTableColumnId.PaymentState]: ContentId.PayState,\n [SalesTableColumnId.PaymentReceived]: ContentId.PayRec,\n [SalesTableColumnId.PaymentReferenceId]: ContentId.PayRef,\n [SalesTableColumnId.FulfillmentDate]: ContentId.FulfillmentDate,\n [SalesTableColumnId.AutoFulfill]: ContentId.AutoFulfill,\n [SalesTableColumnId.VendorOrderId]: ContentId.ExternalPurchaseIdAbbreviated,\n [SalesTableColumnId.VendorAccountEmail]: ContentId.VendorAccount,\n [SalesTableColumnId.OriginatedBy]: ContentId.OriginatedBy,\n [SalesTableColumnId.TotalPaymentsAmount]: ContentId.PaymentsAmount,\n [SalesTableColumnId.TotalConvertedPaymentsAmount]:\n ContentId.ConvertedPaymentsAmount,\n [SalesTableColumnId.WastedQuantity]: ContentId.WastedQty,\n};\n\nexport const SALE_TABLE_FLATTENED_COLUMN_ID_TO_CONTENT_ID: Record<\n SalesTableFlattenedColumnId,\n ContentId\n> = {\n [SalesTableFlattenedColumnId.Event]: ContentId.Event,\n [SalesTableFlattenedColumnId.Venue]: ContentId.Venue,\n [SalesTableFlattenedColumnId.Location]: ContentId.Location,\n [SalesTableFlattenedColumnId.EventDate]: ContentId.EventDate,\n};\n\nexport const SALE_REPORT_TABLE_COLUMN_ID_TO_CONTENT_ID: Record<\n SalesReportTableColumnId,\n ContentId\n> = {\n [SalesReportTableColumnId.Performer]: ContentId.Performer,\n [SalesReportTableColumnId.Venue]: ContentId.Venue,\n [SalesReportTableColumnId.Event]: ContentId.EventName,\n [SalesReportTableColumnId.QuantitySold]: ContentId.SoldQty,\n [SalesReportTableColumnId.Proceeds]: ContentId.SoldProceeds,\n [SalesReportTableColumnId.EventGenre]: ContentId.Genre,\n [SalesReportTableColumnId.EventCountry]: ContentId.Country,\n [SalesReportTableColumnId.EventCity]: ContentId.City,\n [SalesReportTableColumnId.SeatingSection]: ContentId.Section,\n [SalesReportTableColumnId.SeatingRow]: ContentId.Row,\n [SalesReportTableColumnId.SaleMarketplace]: ContentId.Marketplace,\n [SalesReportTableColumnId.SaleMonth]: ContentId.Month,\n [SalesReportTableColumnId.SaleWeek]: ContentId.WeekOfYear,\n [SalesReportTableColumnId.SaleDay]: ContentId.Day,\n [SalesReportTableColumnId.SoldTicketCost]: ContentId.SoldCost,\n [SalesReportTableColumnId.Charges]: ContentId.Charges,\n [SalesReportTableColumnId.Credits]: ContentId.Credits,\n [SalesReportTableColumnId.EventId]: ContentId.EventId,\n [SalesReportTableColumnId.Category]: ContentId.Category,\n [SalesReportTableColumnId.EventDate]: ContentId.EventDate,\n [SalesReportTableColumnId.EventStateProvince]: ContentId.StateProvince,\n [SalesReportTableColumnId.SaleId]: ContentId.SaleId,\n [SalesReportTableColumnId.MarketplaceSaleId]: ContentId.ExternalSaleId,\n [SalesReportTableColumnId.Status]: ContentId.SaleStatus,\n [SalesReportTableColumnId.TicketType]: ContentId.Ticket,\n [SalesReportTableColumnId.InHandDate]: ContentId.InHandDate,\n [SalesReportTableColumnId.PaymentState]: ContentId.PayState,\n [SalesReportTableColumnId.PaymentReceived]: ContentId.PayRec,\n [SalesReportTableColumnId.PaymentReferenceId]: ContentId.PayRef,\n [SalesReportTableColumnId.Fulfiller]: ContentId.FulfilledBy,\n [SalesReportTableColumnId.PurchaseId]: ContentId.PoId,\n [SalesReportTableColumnId.PurchasedBy]: ContentId.PurchasedBy,\n [SalesReportTableColumnId.Vendor]: ContentId.Vendor,\n [SalesReportTableColumnId.SeatingSeats]: ContentId.Seats,\n [SalesReportTableColumnId.OrderDate]: ContentId.SaleDate,\n [SalesReportTableColumnId.PricedBy]: ContentId.PricedBy,\n [SalesReportTableColumnId.CurrencyCode]: ContentId.Currency,\n [SalesReportTableColumnId.PaymentDate]: ContentId.PaymentDate,\n [SalesReportTableColumnId.FulfillmentDate]: ContentId.FulfillmentDate,\n [SalesReportTableColumnId.VendorAccountEmail]: ContentId.VendorAccount,\n [SalesReportTableColumnId.InternalNotes]: ContentId.Notes,\n [SalesReportTableColumnId.CancellationDate]: ContentId.CancellationDate,\n [SalesReportTableColumnId.OutstandingBalance]: ContentId.OutstandingBalance,\n [SalesReportTableColumnId.PandL]: ContentId.PandL,\n [SalesReportTableColumnId.Margin]: ContentId.Margin,\n [SalesReportTableColumnId.PurchaseCreatedBy]: ContentId.POCreatedBy,\n [SalesReportTableColumnId.PurchaseDate]: ContentId.PoDate,\n [SalesReportTableColumnId.TicketId]: ContentId.TicketId,\n [SalesReportTableColumnId.TicketGroupId]: ContentId.TicketGroupId,\n [SalesReportTableColumnId.CommissionUser]: ContentId.Commissioner,\n [SalesReportTableColumnId.CommissionPercent]: ContentId.Commission,\n [SalesReportTableColumnId.CommissionShare]: ContentId.Share,\n [SalesReportTableColumnId.MarketplacePaymentTerms]:\n ContentId.MarketplacePaymentTerms,\n};\n\nexport const ADGROUPS_TABLE_COLUMN_ID_TO_CONTENT_ID: Record<\n AdGroupsTableColumnId,\n ContentId\n> = {\n [AdGroupsTableColumnId.Name]: ContentId.Name,\n [AdGroupsTableColumnId.State]: ContentId.State,\n [AdGroupsTableColumnId.BaseBid]: ContentId.BaseBid,\n [AdGroupsTableColumnId.MaxBid]: ContentId.MaxBid,\n [AdGroupsTableColumnId.DailyBudget]: ContentId.DailyBudget,\n [AdGroupsTableColumnId.Genre]: ContentId.Genre,\n [AdGroupsTableColumnId.Performer]: ContentId.Performer,\n [AdGroupsTableColumnId.Venue]: ContentId.Venue,\n [AdGroupsTableColumnId.Section]: ContentId.Section,\n [AdGroupsTableColumnId.TicketClass]: ContentId.TicketClass,\n [AdGroupsTableColumnId.Listing]: ContentId.Listing,\n [AdGroupsTableColumnId.Event]: ContentId.Event,\n [AdGroupsTableColumnId.BidModifier]: ContentId.BidModifier,\n [AdGroupsTableColumnId.AdSpend]: ContentId.AdSpend,\n [AdGroupsTableColumnId.SoldProceeds]: ContentId.SoldProceeds,\n [AdGroupsTableColumnId.SoldQty]: ContentId.SoldQty,\n [AdGroupsTableColumnId.Actions]: ContentId.Actions,\n};\n\nexport const ADCAMPAIGNS_TABLE_COLUMN_ID_TO_CONTENT_ID: Record<\n AdCampaignsTableColumnId,\n ContentId\n> = {\n [AdCampaignsTableColumnId.Name]: ContentId.Name,\n [AdCampaignsTableColumnId.State]: ContentId.State,\n [AdCampaignsTableColumnId.Budget]: ContentId.Budget,\n [AdCampaignsTableColumnId.StartDateTime]: ContentId.StartDateTime,\n [AdCampaignsTableColumnId.EndDateTime]: ContentId.EndDateTime,\n [AdCampaignsTableColumnId.AdSpend]: ContentId.AdSpend,\n [AdCampaignsTableColumnId.SoldProceeds]: ContentId.SoldProceeds,\n [AdCampaignsTableColumnId.SoldQty]: ContentId.SoldQty,\n [AdCampaignsTableColumnId.Actions]: ContentId.Actions,\n};\n\nexport const PURCHASE_TABLE_COLUMN_ID_TO_CONTENT_ID: Record<\n PurchasesTableColumnId | PurchaseTableColumnGroupId,\n ContentId | string\n> = {\n [PurchasesTableColumnId.BuyerUserId]: ContentId.PurchasedBy,\n [PurchasesTableColumnId.Checkbox]: ContentId.Checkbox,\n [PurchasesTableColumnId.AccordianToggle]: ContentId.AccordianToggle,\n [PurchasesTableColumnId.Id]: ContentId.Id,\n [PurchasesTableColumnId.Payment]: ContentId.PmtMethod,\n [PurchasesTableColumnId.PaymentStatus]: ContentId.PmtState,\n [PurchasesTableColumnId.PurchaseDate]: ContentId.PoDate,\n [PurchasesTableColumnId.QualityControlState]: 'QC',\n [PurchasesTableColumnId.TotalCost]: ContentId.TotalCost,\n [PurchasesTableColumnId.UnitCost]: ContentId.UnitCost,\n [PurchasesTableColumnId.VendorOrderId]:\n ContentId.ExternalPurchaseIdAbbreviated,\n [PurchasesTableColumnId.Tickets]: ContentId.QuantityAbbreviated,\n [PurchasesTableColumnId.Orders]: ContentId.TicketGroups,\n [PurchasesTableColumnId.Shipment]: ContentId.Delivery,\n [PurchasesTableColumnId.Cost]: ContentId.TotalCost,\n [PurchasesTableColumnId.Actions]: ContentId.Actions,\n [PurchasesTableColumnId.VendorAccountEmail]: ContentId.VendorAccount,\n [PurchasesTableColumnId.CreatedBy]: ContentId.CreatedBy,\n [PurchasesTableColumnId.Event]: ContentId.Event,\n [PurchasesTableColumnId.Venue]: ContentId.Venue,\n [PurchasesTableColumnId.EventDate]: ContentId.EventDate,\n [PurchasesTableColumnId.Seating]: ContentId.Seating,\n [PurchasesTableColumnId.Row]: ContentId.Row,\n [PurchasesTableColumnId.Seats]: ContentId.Seats,\n [PurchaseTableColumnGroupId.TicketGroup]: ContentId.TicketGroup,\n [PurchasesTableColumnId.TotalPayment]: ContentId.PmtAmount,\n [PurchasesTableColumnId.TotalConvertedPayment]: ContentId.ConvPmtAmt,\n [PurchasesTableColumnId.PaymentConversionRate]: ContentId.FXRate,\n [PurchasesTableColumnId.Commissions]: ContentId.Commissions,\n [PurchasesTableColumnId.SeatTraits]: ContentId.SeatTraits,\n};\n\nexport const PAYMENTS_TABLE_COLUMN_ID_TO_CONTENT_ID: Record<\n MarketplacePaymentsTableColumnId,\n ContentId | string\n> = {\n [MarketplacePaymentsTableColumnId.PaymentReferenceID]:\n ContentId.PaymentReferenceID,\n [MarketplacePaymentsTableColumnId.PaymentAmount]: ContentId.PaymentAmount,\n [MarketplacePaymentsTableColumnId.PaymentDate]: ContentId.PaymentDate,\n [MarketplacePaymentsTableColumnId.State]: ContentId.State,\n [MarketplacePaymentsTableColumnId.CreditAmount]: ContentId.CreditAmount,\n [MarketplacePaymentsTableColumnId.ProceedsAmount]: ContentId.ProceedsAmount,\n [MarketplacePaymentsTableColumnId.ChargeAmount]: ContentId.ChargeAmount,\n [MarketplacePaymentsTableColumnId.Marketplace]: ContentId.Marketplace,\n [MarketplacePaymentsTableColumnId.ConvertedPaymentsAmount]:\n ContentId.ConvertedPaymentsAmount,\n [MarketplacePaymentsTableColumnId.Actions]: ContentId.Actions,\n};\n\nexport const ON_SALE_EVENT_TABLE_COLUMN_ID_CONTENT_ID: Record<\n OnSaleEventsTableColumnId,\n ContentId | string\n> = {\n [ListingTableColumnId.Checkbox]: ContentId.Checkbox,\n [OnSaleEventsTableColumnId.Event]: ContentId.EventName,\n [OnSaleEventsTableColumnId.Venue]: ContentId.Venue,\n [OnSaleEventsTableColumnId.Location]: ContentId.Location,\n [OnSaleEventsTableColumnId.OnSaleDate]: ContentId.OnSaleDate,\n [OnSaleEventsTableColumnId.RawPreSaleDate]: ContentId.PreSaleDate,\n [OnSaleEventsTableColumnId.Date]: ContentId.EventDate,\n [OnSaleEventsTableColumnId.ListingCount]: ContentId.ListingQty,\n [OnSaleEventsTableColumnId.TicketCount]: ContentId.TicketQty,\n [OnSaleEventsTableColumnId.UnitNetProceedsMin]: ContentId.PriceMin,\n [OnSaleEventsTableColumnId.UnitNetProceedsP25]: ContentId.PriceP25,\n [OnSaleEventsTableColumnId.UnitNetProceedsP50]: ContentId.PriceP50,\n // TODO: @tianxu Temporary hardcode the texts, need to make the map support formatted contents\n [OnSaleEventsTableColumnId.VisitsLastHour]: 'Visits L1H',\n [OnSaleEventsTableColumnId.VisitsLastDay]: 'Visits L24H',\n [OnSaleEventsTableColumnId.VisitsLast3Days]: 'Visits L3D',\n [OnSaleEventsTableColumnId.TransactionsLastHour]: 'Visits L7H',\n [OnSaleEventsTableColumnId.VisitsLast7Days]: 'Trans. L1H',\n [OnSaleEventsTableColumnId.TransactionsLastDay]: 'Trans. L24H',\n [OnSaleEventsTableColumnId.TransactionsLast3Days]: 'Trans. L3D',\n [OnSaleEventsTableColumnId.TransactionsLast7Days]: 'Trans. L7D',\n [OnSaleEventsTableColumnId.Action]: ContentId.Actions,\n};\n\nexport type ListingFormulaFieldsListing =\n | ListingFormulaFields.availableQuantity\n | ListingFormulaFields.ticketCount\n | ListingFormulaFields.unitCost\n | ListingFormulaFields.listPrice\n | ListingFormulaFields.allInPrice\n | ListingFormulaFields.netProceedsFloor\n | ListingFormulaFields.netProceedsCeiling\n | ListingFormulaFields.websiteFloor\n | ListingFormulaFields.websiteCeiling\n | ListingFormulaFields.undercutAbsoluteAmount\n | ListingFormulaFields.undercutRelativeAmount\n | ListingFormulaFields.compListingFloor\n | ListingFormulaFields.compListingCeiling;\n\nexport const LISTING_FORMULA_FIELDS_TO_CID: Record<\n ListingFormulaFieldsListing,\n ContentId\n> = {\n ['availableQuantity']: ContentId.Remaining,\n ['ticketCount']: ContentId.Original,\n ['unitCost']: ContentId.UnitCost,\n ['listPrice']: ContentId.Proceeds,\n ['allInPrice']: ContentId.Price,\n ['netProceedsFloor']: ContentId.ProceedsFloor,\n ['netProceedsCeiling']: ContentId.ProceedsCeiling,\n ['websiteFloor']: ContentId.Price,\n ['websiteCeiling']: ContentId.WebsiteCeiling,\n ['undercutAbsoluteAmount']: ContentId.UndercutAbsoluteAmount,\n ['undercutRelativeAmount']: ContentId.UndercutRelativeAmount,\n ['compListingFloor']: ContentId.CompListingFloor,\n ['compListingCeiling']: ContentId.CompListingCeiling,\n};\n\nexport type ListingFormulaFieldsListingReportMetrics =\n | ListingFormulaFields.availableQuantity\n | ListingFormulaFields.ticketCount\n | ListingFormulaFields.unitCost\n | ListingFormulaFields.listPrice\n | ListingFormulaFields.allInPrice\n | ListingFormulaFields.soldQuantity\n | ListingFormulaFields.soldCost\n | ListingFormulaFields.unsoldCost\n | ListingFormulaFields.soldProceeds;\n\nexport const LISTING_REPORT_FORMULA_FIELDS_TO_CID: Record<\n ListingFormulaFieldsListingReportMetrics,\n ContentId\n> = {\n ['availableQuantity']: ContentId.UnsoldQty,\n ['soldQuantity']: ContentId.SoldQty,\n ['ticketCount']: ContentId.TotalQty,\n ['soldProceeds']: ContentId.SoldProceeds,\n ['listPrice']: ContentId.TotalProceeds,\n ['allInPrice']: ContentId.Price,\n ['soldCost']: ContentId.SoldCost,\n ['unsoldCost']: ContentId.UnsoldCost,\n ['unitCost']: ContentId.TotalCost,\n};\n\nexport const SALE_FORMULA_FIELDS_TO_CID: Record<\n keyof SaleFormulaFields,\n ContentId\n> = {\n ['quantitySold']: ContentId.SoldQty,\n ['totalNetProceeds']: ContentId.SoldProceeds,\n ['charges']: ContentId.Charges,\n ['credits']: ContentId.Credits,\n ['soldTicketCost']: ContentId.SoldCost,\n ['pandL']: ContentId.PandL,\n ['margin']: ContentId.Margin,\n};\n\nexport const EVENTS_FORMULA_FIELDS_TO_CID: Record = {\n totalListedQuantity: ContentId.ListedQty,\n totalSoldQuantity: ContentId.SoldQty,\n totalUnsoldQuantity: ContentId.UnsoldQty,\n totalTicketQuantity: ContentId.TotalQty,\n listedAtp: ContentId.ListedAverageTicketPrice,\n totalAtp: ContentId.SoldAverageTicketPrice,\n revenue: ContentId.SoldProceeds,\n totalSoldCost: ContentId.SoldCost,\n totalGrossProfit: ContentId.SoldProfit,\n actualStr: ContentId.SellThroughRate,\n liftPercentage: ContentId.LiftPercentage,\n};\n\nexport const LISTING_GROUPING_TO_CID: Record = {\n [GroupingType.Custom]: ContentId.Custom,\n [GroupingType.Section]: ContentId.Section,\n [GroupingType.Zone]: ContentId.Zone,\n [GroupingType.Row]: ContentId.Row,\n [GroupingType.SeatScore]: ContentId.SeatScore,\n [GroupingType.Quantity]: ContentId.UnsoldQuantity,\n [GroupingType.UnitCost]: ContentId.UnitCost,\n [GroupingType.None]: ContentId.None,\n};\n\nexport const BUCKET_OPTIONS_TO_CID: Record = {\n [BucketType.None]: ContentId.None,\n [BucketType.Clusters]: ContentId.Clusters,\n [BucketType.SameSize]: ContentId.SameSize,\n};\n\nexport const NOTIFICATION_TYPE_TO_CID: Record<\n NotificationType,\n ContentId | FormatContentId\n> = {\n [NotificationType.SaleNew]: ContentId.NotificationTypeSaleNew,\n [NotificationType.SaleFulfilmentFailed]:\n ContentId.NotificationTypeSaleFulfilmentFailed,\n [NotificationType.SaleMarketplaceCancelled]:\n ContentId.NotificationTypeSaleMarketplaceCancelled,\n [NotificationType.ListingHideSeatsFailed]:\n ContentId.NotificationTypeListingHideSeatsFailed,\n [NotificationType.ListingUpdateAllInPriceFailed]:\n FormatContentId.NotificationTypeListingUpdateAllInPriceFailed,\n [NotificationType.ListingUpdateInHandDateFailed]:\n FormatContentId.NotificationTypeListingUpdateInHandDateFailed,\n [NotificationType.ListingUpdateSplitTypeFailed]:\n FormatContentId.NotificationTypeListingUpdateSplitTypeFailed,\n [NotificationType.ListingUpdateDeliveryTypeFailed]:\n ContentId.NotificationTypeListingUpdateDeliveryTypeFailed,\n [NotificationType.ListingUpdateUnitNetProceedsFailed]:\n FormatContentId.NotificationTypeListingUpdateUnitNetProceedsFailed,\n [NotificationType.ListingBroadcastFailed]:\n FormatContentId.NotificationTypeListingBroadcastFailed,\n [NotificationType.ListingUnbroadcastFailed]:\n FormatContentId.NotificationTypeListingUnbroadcastFailed,\n [NotificationType.ListingMergeFailed]:\n ContentId.NotificationTypeListingMergeFailed,\n [NotificationType.ListingSplitFailed]:\n ContentId.NotificationTypeListingSplitFailed,\n [NotificationType.ListingPriceUpdate]:\n ContentId.NotificationTypeListingPriceUpdate,\n [NotificationType.AutopriceBelowFloor]:\n ContentId.NotificationTypeAutopriceBelowFloor,\n [NotificationType.AutopriceInsufficientCompListings]:\n ContentId.NotificationTypeAutopriceInsufficientCompListings,\n [NotificationType.AutopriceFirebrake]:\n ContentId.NotificationTypeAutopriceFirebrake,\n [NotificationType.SellerSupportCaseNewReply]:\n FormatContentId.NotificationTypeSellerSupportCaseNewReply,\n};\n\nexport const ACTION_OUTBOX_ENTITY_TYPE_TO_CID: Record<\n ActionOutboxEntityType,\n ContentId\n> = {\n [ActionOutboxEntityType.Listing]: ContentId.Listing,\n [ActionOutboxEntityType.Sale]: ContentId.Sale,\n [ActionOutboxEntityType.Purchase]: ContentId.Purchase,\n [ActionOutboxEntityType.SellerSupportCase]: ContentId.SellerSupportCase,\n [ActionOutboxEntityType.Document]: ContentId.Document,\n [ActionOutboxEntityType.SellerEvent]: ContentId.Event,\n [ActionOutboxEntityType.InboundEmail]: ContentId.Email,\n [ActionOutboxEntityType.TicketGroup]: ContentId.TicketGroup,\n};\n\nexport const ACTIVITY_LOG_STATE_TO_CID: Record<\n MarketplaceOperationResultState,\n ContentId\n> = {\n [MarketplaceOperationResultState.Succeeded]: ContentId.Succeeded,\n [MarketplaceOperationResultState.FailedAndRequiresSellerAction]:\n ContentId.FailedAndRequiresSellerAction,\n [MarketplaceOperationResultState.FailedWithNonRetryableError]:\n ContentId.FailedWithNonRetryableError,\n [MarketplaceOperationResultState.FailedWithRetryableError]:\n ContentId.FailedWithRetryableError,\n [MarketplaceOperationResultState.Skipped]: ContentId.Skipped,\n [MarketplaceOperationResultState.NotImplemented]: ContentId.NotImplemented,\n};\n\nexport const UNDERCUT_MODE_TO_CID: Record =\n {\n [AutoPricingUndercutMode.Simple]: ContentId.Simple,\n [AutoPricingUndercutMode.RowExtrapolation]: ContentId.RowExtrapolation,\n [AutoPricingUndercutMode.Deal]: ContentId.Deal,\n };\n\nexport const UNDERCUT_MODE_TO_FLUENT_CID: Record<\n AutoPricingUndercutMode,\n ContentId\n> = {\n [AutoPricingUndercutMode.Simple]: ContentId.Cheapest,\n [AutoPricingUndercutMode.RowExtrapolation]: ContentId.BestRowExtrapolation,\n [AutoPricingUndercutMode.Deal]: ContentId.BestDealScore,\n};\n\nexport const OUTLIER_MODE_TO_CID: Record = {\n [AutoPricingOutlierMode.StandardDeviations]: ContentId.StandardDeviations,\n [AutoPricingOutlierMode.KthLowest]: ContentId.Spacing,\n [AutoPricingOutlierMode.SkipLogic]: ContentId.SkipLogic,\n};\n\nexport const COMP_LISTING_MODE_TO_CID: Record<\n AutoPricingCompListingMode,\n ContentId\n> = {\n [AutoPricingCompListingMode.QualityScore]: ContentId.VenueWideQualityScore,\n [AutoPricingCompListingMode.SameSection]:\n ContentId.VenueWideInSectionPriority,\n [AutoPricingCompListingMode.SameZone]: ContentId.Zones,\n [AutoPricingCompListingMode.SameEvent]: ContentId.Events,\n [AutoPricingCompListingMode.ParentListing]: ContentId.ParentListing,\n};\n\nexport const COMP_LISTING_MODE_TO_FLUENT_CID: Record<\n AutoPricingCompListingMode,\n ContentId\n> = {\n [AutoPricingCompListingMode.QualityScore]: ContentId.OfSimilarQuality,\n [AutoPricingCompListingMode.SameSection]: ContentId.InSection,\n [AutoPricingCompListingMode.SameZone]: ContentId.InZone,\n [AutoPricingCompListingMode.SameEvent]: ContentId.ForTheEvent,\n [AutoPricingCompListingMode.ParentListing]: ContentId.InMyGroup,\n};\n\nexport const AUTO_PO_INBOUND_EMAIL_CLASSIFICATION_TYPE_TO_CID: Record<\n AutoPoInboundEmailClassificationType,\n ContentId\n> = {\n [AutoPoInboundEmailClassificationType.NewPurchaseOrder]: ContentId.NewOrder,\n [AutoPoInboundEmailClassificationType.ExistingPurchaseOrder]:\n ContentId.ExistingOrder,\n [AutoPoInboundEmailClassificationType.Junk]: ContentId.Junk,\n [AutoPoInboundEmailClassificationType.OneTimePass]: ContentId.OneTimePass,\n [AutoPoInboundEmailClassificationType.Password]: ContentId.Password,\n [AutoPoInboundEmailClassificationType.TicketsAvailable]:\n ContentId.TicketsAvailable,\n [AutoPoInboundEmailClassificationType.PurchaseCancelled]:\n ContentId.PurchaseCancelled,\n [AutoPoInboundEmailClassificationType.EventCancelled]:\n ContentId.EventCancelled,\n [AutoPoInboundEmailClassificationType.EventPostponed]:\n ContentId.EventPostponed,\n [AutoPoInboundEmailClassificationType.EnjoyTheEvent]: ContentId.EnjoyTheEvent,\n [AutoPoInboundEmailClassificationType.TransferSent]: ContentId.TransferSent,\n [AutoPoInboundEmailClassificationType.TransferAccepted]:\n ContentId.TransferAccepted,\n [AutoPoInboundEmailClassificationType.TransferExpired]:\n ContentId.TransferExpired,\n [AutoPoInboundEmailClassificationType.NewSale]: ContentId.NewSale,\n [AutoPoInboundEmailClassificationType.ConfirmationDeadline]:\n ContentId.ConfirmationDeadline,\n [AutoPoInboundEmailClassificationType.ShippingDeadline]:\n ContentId.ShippingDeadline,\n [AutoPoInboundEmailClassificationType.SaleCancelled]: ContentId.SaleCancelled,\n [AutoPoInboundEmailClassificationType.OtherMarketplaceContact]:\n ContentId.OtherMarketplaceContact,\n};\n\nexport const STANDARD_DEVIATIONS_TO_CID: Record = {\n '1': ContentId.VeryAggressive,\n '2': ContentId.AggressiveOption,\n '3': ContentId.NormalOption,\n '4': ContentId.InclusiveOption,\n};\n\nexport const REPORT_TYPES_TO_CID: Record = {\n [ReportTypes.Inventory]: ContentId.Inventory,\n [ReportTypes.Sale]: ContentId.Sales,\n};\n\nexport const INVENTORY_REPORT_WIDGETS_TO_CID: Record<\n ReportWidgetTypesInventory,\n ContentId\n> = {\n [ReportWidgetTypesInventory.AverageTicketPrice]:\n ContentId.SoldAverageTicketPrice,\n [ReportWidgetTypesInventory.SalesAndMargin]: ContentId.SalesAndMargin,\n [ReportWidgetTypesInventory.TicketsListedAndSold]:\n ContentId.TicketsListedAndSold,\n};\n\nexport const REPORT_INVENTORY_GROUP_BY_TO_CID: Record = {\n [ReportGroupBy.ListingId]: ContentId.Listing,\n [ReportGroupBy.PurchaseId]: ContentId.Purchase,\n [ReportGroupBy.Performer]: ContentId.Performers,\n [ReportGroupBy.Event]: ContentId.Event,\n [ReportGroupBy.EventGenre]: ContentId.Genre,\n [ReportGroupBy.Venue]: ContentId.Venue,\n [ReportGroupBy.EventCountry]: ContentId.Country,\n [ReportGroupBy.EventCity]: ContentId.City,\n [ReportGroupBy.SeatingSection]: ContentId.Section,\n [ReportGroupBy.SeatingRow]: ContentId.Row,\n [ReportGroupBy.Vendor]: ContentId.Vendor,\n [ReportGroupBy.PricedBy]: ContentId.PricedBy,\n [ReportGroupBy.PurchasedBy]: ContentId.PurchasedBy,\n [ReportGroupBy.FulfilledBy]: ContentId.FulfilledBy,\n};\n\nexport const REPORT_SALE_GROUP_BY_TO_CID: Record = {\n [ReportGroupBy.SaleId]: ContentId.Sale,\n [ReportGroupBy.Performer]: ContentId.Performers,\n [ReportGroupBy.Event]: ContentId.Event,\n [ReportGroupBy.EventGenre]: ContentId.Genre,\n [ReportGroupBy.Venue]: ContentId.Venue,\n [ReportGroupBy.EventCountry]: ContentId.Country,\n [ReportGroupBy.EventCity]: ContentId.City,\n [ReportGroupBy.SeatingSection]: ContentId.Section,\n [ReportGroupBy.SeatingRow]: ContentId.Row,\n [ReportGroupBy.SaleMarketplace]: ContentId.Marketplace,\n [ReportGroupBy.Vendor]: ContentId.Vendor,\n [ReportGroupBy.SaleMonth]: ContentId.Month,\n [ReportGroupBy.SaleWeek]: ContentId.WeekOfYear,\n [ReportGroupBy.SaleDay]: ContentId.Day,\n [ReportGroupBy.PricedBy]: ContentId.PricedBy,\n [ReportGroupBy.PurchasedBy]: ContentId.PurchasedBy,\n [ReportGroupBy.FulfilledBy]: ContentId.FulfilledBy,\n};\n\nexport const REPORT_IS_SORT_DESCENDING_TO_CID: Record = {\n // corresponds to value isSortDescending : boolean\n false: ContentId.AtoZArrow,\n true: ContentId.ZtoAArrow,\n};\n\nexport const REPORT_IS_SORT_ASCENDING_TO_CID: Record = {\n // corresponds to value isSortAsc : boolean\n true: ContentId.AtoZArrow,\n false: ContentId.ZtoAArrow,\n};\n\nexport const BOOLEAN_OPTIONS_CONTENT: Record = {\n true: 'true',\n false: 'false',\n};\n\nexport const RESTRICT_SELECTION_TYPE_TO_CID: Record<\n RestrictSelectionType,\n ContentId\n> = {\n [RestrictSelectionType.SameZone]: ContentId.SameZone,\n [RestrictSelectionType.SpecificSections]: ContentId.SpecificSections,\n [RestrictSelectionType.SameSection]: ContentId.SameSection,\n};\n\nexport const MARKETPLACE_PAYMENT_TERM_TO_CID: Record<\n MarketplacePaymentTerm,\n ContentId\n> = {\n [MarketplacePaymentTerm.PaymentUponSaleConfirmation]:\n ContentId.PaymentUponSaleConfirmation,\n [MarketplacePaymentTerm.PaymentUponDelivery]: ContentId.PaymentUponDelivery,\n [MarketplacePaymentTerm.PaymentPostEvent]: ContentId.PaymentPostEvent,\n};\n\n// From https://dev.azure.com/viagogo/Database/_git/viagogo.Database.ProductionDeploys?path=%2Fdb%2FGoldenData%2FAppEventDataManager%2Ftables%2FMappingRejectionReason.sql&_a=contents&version=GBdevelop\n// Overrides the MappingRejectionReasonDescription within the table with internationalized content\n//\n// select\t*\n// from\tGoldenData.AppEventDataManager.MappingRejectionReason\n// where\tMappingTypeId = 1; -- Event Mapping\nexport const MAPPING_REJECTION_REASON_ID_TO_CID: Record = {\n '1': ContentId.CancelledEvent,\n '2': ContentId.CharityEvent,\n '3': ContentId.DuplicateEventNeedsToBeRescheduled,\n '4': ContentId.DuplicateEventPerformerVenueDateAndTimeMatch,\n '5': ContentId.EventHasPassed,\n '6': ContentId.FreeEvent,\n '7': ContentId.FulfillmentRestrictions,\n '8': ContentId.IncorrectPerfomerOrGrouping,\n '9': ContentId.NotEnoughInformationToCreate,\n '10': ContentId.NotFoundOnPrimary,\n '11': ContentId.PendingPartnerIntegrations,\n '12': ContentId.IncorrectCountryCode,\n};\n\nexport const EVENT_MAPPING_STATE_FILTER_TO_CID: Record<\n EventMappingStateFilter,\n ContentId\n> = {\n [EventMappingStateFilter.All]: ContentId.All,\n [EventMappingStateFilter.Mapped]: ContentId.Mapped,\n [EventMappingStateFilter.Pending]: ContentId.Pending,\n [EventMappingStateFilter.Rejected]: ContentId.Rejected,\n};\n\nexport const PRICING_FLOOR_CEIL_ADJUSTMENT_TYPE_TO_CID: Record<\n PricingFloorCeilingAdjustmentType,\n ContentId\n> = {\n [PricingFloorCeilingAdjustmentType.MarketPrice]: ContentId.MarketPrice,\n [PricingFloorCeilingAdjustmentType.UnitCost]: ContentId.UnitCost,\n [PricingFloorCeilingAdjustmentType.CurrentFloor]: ContentId.CurrentFloor,\n};\n\nexport const PRICING_FLOOR_CEIL_ADJUSTMENT_TYPE_TO_WARNING_CID: Record<\n PricingFloorCeilingAdjustmentType,\n ContentId\n> = {\n [PricingFloorCeilingAdjustmentType.MarketPrice]:\n ContentId.BulkEditFloorCeilingWarning,\n [PricingFloorCeilingAdjustmentType.UnitCost]:\n ContentId.BulkEditFloorCeilingUnitCostWarning,\n [PricingFloorCeilingAdjustmentType.CurrentFloor]:\n ContentId.BulkEditFloorCeilingCurrentFloorWarning,\n};\n\nexport const BROADCAST_ERROR_CODE_TO_CID: Record<\n BroadcastErrorCode,\n ContentId\n> = {\n [BroadcastErrorCode.BroadcastListing]:\n ContentId.BroadcastErrorCode_BroadcastListing,\n [BroadcastErrorCode.Unknown]: ContentId.BroadcastErrorCode_Unknown,\n [BroadcastErrorCode.UpdatePrice]: ContentId.BroadcastErrorCode_UpdatePrice,\n [BroadcastErrorCode.UpdateTicketType]:\n ContentId.BroadcastErrorCode_UpdateTicketType,\n [BroadcastErrorCode.UpdateSplitType]:\n ContentId.BroadcastErrorCode_UpdateSplitType,\n [BroadcastErrorCode.UpdateInHandDate]:\n ContentId.BroadcastErrorCode_UpdateInHandDate,\n [BroadcastErrorCode.SplitListing]: ContentId.BroadcastErrorCode_SplitListing,\n [BroadcastErrorCode.MergeListing]: ContentId.BroadcastErrorCode_MergeListing,\n [BroadcastErrorCode.UnbroadcastListing]:\n ContentId.BroadcastErrorCode_UnbroadcastListing,\n [BroadcastErrorCode.UpdateQuantity]:\n ContentId.BroadcastErrorCode_UpdateQuantity,\n [BroadcastErrorCode.HideSeats]: ContentId.BroadcastErrorCode_HideSeats,\n [BroadcastErrorCode.UpdateListingNotes]:\n ContentId.BroadcastErrorCode_UpdateListingNotes,\n [BroadcastErrorCode.UpdateSeating]:\n ContentId.BroadcastErrorCode_UpdateSeating,\n [BroadcastErrorCode.MarketplaceResaleRestricted]:\n ContentId.BroadcastErrorCode_MarketplaceResaleRestricted,\n [BroadcastErrorCode.MarketplaceManifestMismatch]:\n ContentId.BroadcastErrorCode_MarketplaceManifestMismatch,\n [BroadcastErrorCode.MarketplacePriceBelowFloor]:\n ContentId.BroadcastErrorCode_MarketplacePriceBelowFloor,\n};\n\nexport const PAYMENT_METHOD_NAME_REGEX_TO_CONTENT_ID: Record<\n PaymentMethodNameKnownRegex,\n ContentId\n> = {\n [PaymentMethodNameKnownRegex.All]: ContentId.All,\n [PaymentMethodNameKnownRegex.AllAmex]: ContentId.AllAmex,\n [PaymentMethodNameKnownRegex.AllVisa]: ContentId.AllVisa,\n [PaymentMethodNameKnownRegex.AllMastercard]: ContentId.AllMastercard,\n};\n\nexport const REPORT_FILTER_EDITABILITY_TO_CID: Record<\n ReportFilterEditability,\n ContentId\n> = {\n [ReportFilterEditability.Hidden]: ContentId.Hidden,\n [ReportFilterEditability.View]: ContentId.View,\n [ReportFilterEditability.Edit]: ContentId.Edit,\n};\n\nexport const REPORT_FILTER_EDITABILITY_TO_DESC_CID: Record<\n ReportFilterEditability,\n ContentId\n> = {\n [ReportFilterEditability.Hidden]: ContentId.HiddenEditabilityDescription,\n [ReportFilterEditability.View]: ContentId.ViewEditabilityDescription,\n [ReportFilterEditability.Edit]: ContentId.EditEditabilityDescription,\n};\n\nexport const VENUE_ZONE_CONFIG_TYPE_TO_CID: Record<\n VenueZoneConfigType,\n ContentId\n> = {\n [VenueZoneConfigType.Amphitheater]: ContentId.Amphitheater,\n [VenueZoneConfigType.ConcertsSectionsBehindStage]:\n ContentId.ConcertsSectionsBehindStage,\n [VenueZoneConfigType.SportsOrConcertsWith360]:\n ContentId.SportsOrConcertsWith360,\n};\n\nexport const VENUE_ZONE_SECTION_GROUP_AREA_TYPE_TO_CID: Record<\n SectionGroupAreaType,\n ContentId\n> = {\n [SectionGroupAreaType.Center]: ContentId.Center,\n [SectionGroupAreaType.LeftRight]: ContentId.LeftAndRight,\n [SectionGroupAreaType.FarLeftFarRight]: ContentId.FarLeftAndFarRight,\n [SectionGroupAreaType.Front]: ContentId.Front,\n [SectionGroupAreaType.Sides]: ContentId.Sides,\n [SectionGroupAreaType.SideT1]: ContentId.SideTier1,\n [SectionGroupAreaType.SideT2]: ContentId.SideTier2,\n [SectionGroupAreaType.Ends]: ContentId.Ends,\n [SectionGroupAreaType.Rear]: ContentId.Rear,\n [SectionGroupAreaType.Corners]: ContentId.Corners,\n [SectionGroupAreaType.Unknown]: ContentId.Unknown,\n};\n\nexport const EVENT_STATUS_TO_CID: Record = {\n [ApiEventStatus.Normal]: ContentId.Normal,\n [ApiEventStatus.Postponed]: ContentId.Postponed,\n [ApiEventStatus.Cancelled]: ContentId.Cancelled,\n [ApiEventStatus.Rescheduled]: ContentId.Rescheduled,\n [ApiEventStatus.Relocated]: ContentId.Relocated,\n [ApiEventStatus.RelocatedAndRescheduled]: ContentId.RelocatedAndRescheduled,\n [ApiEventStatus.Draft]: ContentId.Draft,\n [ApiEventStatus.Deleted]: ContentId.Deleted,\n [ApiEventStatus.Contingent]: ContentId.Contingent,\n};\n\nexport const EVENT_DEMAND_FACTOR_TYPE_TO_CID: Record<\n EventDemandFactorType,\n ContentId\n> = {\n [EventDemandFactorType.HomeTeamOdds]: ContentId.Odds,\n [EventDemandFactorType.Opponent]: ContentId.Opponent,\n [EventDemandFactorType.SpotifyPopularity]: ContentId.SpotifyPopularity,\n [EventDemandFactorType.Stakes]: ContentId.Stakes,\n [EventDemandFactorType.Standing]: ContentId.Standing,\n [EventDemandFactorType.Weather]: ContentId.Weather,\n};\n\nexport const ROW_COMP_SETTING_TO_CID: Record = {\n 0: ContentId.RowCompSettingExactMatch,\n 1: '-1',\n 3: '-3',\n 6: '-6',\n};\n\nexport const ROW_GROUP_SETTING_TO_CID: Record<\n RowGroupSetting,\n ContentId | string\n> = {\n [RowGroupSetting.SingleTwoToFiveSixPlus]: '1 2-5 6+',\n [RowGroupSetting.OneTwoToFiveSixToTwelveThirteenPlus]: '1 2-5 6-12 13+',\n [RowGroupSetting.OneToFiveSixPlus]: '1-5 6+',\n [RowGroupSetting.OneToTenElevenPlus]: '1-10 11+',\n [RowGroupSetting.AllRows]: ContentId.All,\n};\n\nexport const PURCHASE_ORDER_STATE_TO_CID: Record<\n PurchaseOrderState,\n ContentId\n> = {\n [PurchaseOrderState.Active]: ContentId.Active,\n [PurchaseOrderState.Cancelled]: ContentId.Cancelled,\n [PurchaseOrderState.Void]: ContentId.Void,\n [PurchaseOrderState.Drafted]: ContentId.Drafted,\n};\n\nexport const LISTING_NOTE_TYPE_TO_CID: Record = {\n [ListingNoteType.Defect]: ContentId.Defect,\n [ListingNoteType.RestrictionOnUse]: ContentId.RestrictionOnUse,\n [ListingNoteType.Perk]: ContentId.Perk,\n [ListingNoteType.Information]: ContentId.Information,\n [ListingNoteType.ConnectedSeller]: ContentId.ConnectedSeller,\n [ListingNoteType.InternallyGenerated]: ContentId.InternallyGenerated,\n};\n\nexport const COMMAND_OPTION_TYPE_TO_CID: Record =\n {\n [CommandOptionType.ToggleSelectionMode]: ContentId.ToggleSelectionMode,\n [CommandOptionType.SelectAll]: ContentId.SelectAll,\n [CommandOptionType.AutoPricingSettings]: ContentId.AutopricingSettings,\n };\n\nexport const SALE_LINE_ITEM_CHARGE_REASON_TO_CID: Record<\n SaleLineItemChargeReason,\n ContentId\n> = {\n [SaleLineItemChargeReason.CancelledProceeds]: ContentId.CancelledProceeds,\n [SaleLineItemChargeReason.DroppedOrderPenalty]: ContentId.DroppedOrderPenalty,\n [SaleLineItemChargeReason.Compensation]: ContentId.Compensation,\n [SaleLineItemChargeReason.Other]: ContentId.Other,\n};\n\nexport const SALE_LINE_ITEM_CREDIT_REASON_TO_CID: Record<\n SaleLineItemCreditReason,\n ContentId\n> = {\n [SaleLineItemCreditReason.ReversedPenalty]: ContentId.ReversedPenalty,\n [SaleLineItemCreditReason.ReversedCharge]: ContentId.ReversedCharge,\n [SaleLineItemCreditReason.ProceedRepayment]: ContentId.ProceedRepayment,\n [SaleLineItemCreditReason.Other]: ContentId.Other,\n};\n","import { useMemo } from 'react';\nimport { useGetEventAutoPricingSettings } from 'src/hooks/useGetEventAutoPricingSettings';\nimport { VENUE_ZONE_CONFIG_TYPE_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { Event, VenueZoneConfigOverride } from 'src/WebApiController';\n\nimport { getContent, useContentContext } from '../ContentContext';\nimport { useGetVenueZoneMapConfigInfo } from './useGetVenueZoneMapConfigInfo';\nimport { useGetVenueZoneMapInfoOverrides } from './useGetVenueZoneMapConfigInfoOverrides';\n\nexport const useVenueZoneMapIntegration = (event: Event | null) => {\n const contentContext = useContentContext();\n\n const { pricingSettingsQuery } = useGetEventAutoPricingSettings(\n event ?? null,\n false\n );\n const venueZoneMapConfigInfoQuery = useGetVenueZoneMapConfigInfo(\n event?.viagId,\n event?.venueCfgId\n );\n const venueZoneMapConfigOverrideInfoQuery = useGetVenueZoneMapInfoOverrides(\n event?.viagId,\n event?.venueCfgId\n );\n\n const venueZoneConfigs = useMemo((): VenueZoneConfigOverride | null => {\n const venueZoneOverrideId = pricingSettingsQuery.data?.venueZoneOverrideId;\n if (\n venueZoneOverrideId != null &&\n venueZoneMapConfigOverrideInfoQuery.data &&\n venueZoneMapConfigOverrideInfoQuery.data[venueZoneOverrideId]\n ) {\n return venueZoneMapConfigOverrideInfoQuery.data[venueZoneOverrideId];\n }\n\n const zoneConfigType =\n pricingSettingsQuery.data?.venueZoneConfigType ??\n venueZoneMapConfigInfoQuery.data?.defaultVenueZoneConfigType;\n if (zoneConfigType && venueZoneMapConfigInfoQuery.data) {\n const sectionSectionGroupLookup =\n venueZoneMapConfigInfoQuery.data.venueMapZoneConfigs[zoneConfigType];\n\n return {\n name: getContent(\n VENUE_ZONE_CONFIG_TYPE_TO_CID[zoneConfigType],\n contentContext\n ),\n sectionSectionGroupLookup: sectionSectionGroupLookup ?? {},\n };\n }\n return null;\n }, [\n contentContext,\n pricingSettingsQuery.data?.venueZoneConfigType,\n pricingSettingsQuery.data?.venueZoneOverrideId,\n venueZoneMapConfigInfoQuery.data,\n venueZoneMapConfigOverrideInfoQuery.data,\n ]);\n\n return venueZoneConfigs;\n};\n","import * as Sentry from '@sentry/react';\nimport { UseQueryResult } from '@tanstack/react-query';\nimport {\n createContext,\n PropsWithChildren,\n useCallback,\n useContext,\n useMemo,\n} from 'react';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport {\n Event,\n EventConfigScoreOverride,\n Feature,\n SellerAccountEventConfigScoreOverrides,\n TicketClassInfo,\n VenueMapInfo,\n VenueZoneConfigOverride\n} from 'src/WebApiController';\n\nimport { ErrorTypes } from '../ErrorBoundaryContext';\nimport { useGetEventMapConfig } from './useGetEventMapConfig';\nimport { useGetEventMapConfigOverrides } from './useGetEventMapConfigOverrides';\nimport { useGetEventMapsByScoreModelConfig } from './useGetEventMapsByScoreModelConfig';\nimport { useVenueZoneMapIntegration } from './useVenueZoneMapIntegration';\n\nexport type EventMapContextProps = {\n event?: Event | null;\n ticketClasses: TicketClassInfo[];\n /**\n * @deprecated Use venueMapInfo and isMapLoading instead.\n */\n venueMapQuery: UseQueryResult;\n venueMapsByScoreModelQuery: UseQueryResult<\n {\n readonly VenueGeometry?: VenueMapInfo | undefined;\n readonly MergedVenueGeometry?: VenueMapInfo | undefined;\n readonly AdvancedVenueGeometry?: VenueMapInfo | undefined;\n } | null,\n ErrorTypes\n >;\n isMapLoading: boolean;\n venueMapInfo: VenueMapInfo | null;\n mapConfigOverridesQuery: UseQueryResult<\n EventConfigScoreOverride[] | null,\n ErrorTypes\n >;\n sellerAccountScoreOverridesQuery: UseQueryResult<\n SellerAccountEventConfigScoreOverrides[] | null,\n ErrorTypes\n >;\n activeConfigOverride?: EventConfigScoreOverride | null;\n isGeneralAdmissionOnly: boolean;\n normalizeConfigOverrideWithUiScore: (\n scoreOverride: EventConfigScoreOverride\n ) => EventConfigScoreOverride;\n venueZoneConfigs: VenueZoneConfigOverride | null;\n};\n\nexport const EventMapContext = createContext({\n event: null,\n ticketClasses: [],\n venueMapQuery: {} as UseQueryResult,\n venueMapsByScoreModelQuery: {} as UseQueryResult<{\n readonly VenueGeometry?: VenueMapInfo | undefined;\n readonly MergedVenueGeometry?: VenueMapInfo | undefined;\n } | null>,\n isMapLoading: false,\n venueMapInfo: null,\n mapConfigOverridesQuery: {} as UseQueryResult,\n sellerAccountScoreOverridesQuery: {} as UseQueryResult<\n SellerAccountEventConfigScoreOverrides[]\n >,\n activeConfigOverride: null,\n isGeneralAdmissionOnly: false,\n normalizeConfigOverrideWithUiScore: (x) => x,\n venueZoneConfigs: null,\n});\n\nexport const useEventMapContext = () => useContext(EventMapContext);\n\nconst populateScoreForDisplay = (\n eventConfigScoreOverride: EventConfigScoreOverride | null | undefined,\n venueMapMaxScoreRaw: number,\n venueMapInfo: VenueMapInfo | null | undefined,\n normalizeScores: boolean\n) => {\n if (!eventConfigScoreOverride) {\n return eventConfigScoreOverride;\n }\n\n const scoreOverrides = eventConfigScoreOverride.scoreOverrides.map(\n (scoreOverride) => {\n let score = scoreOverride.scoreRaw;\n\n // If the venue config ids do not align that means we are pulling scores\n // from a different venue config as a template, and should not normalize\n normalizeScores =\n normalizeScores &&\n eventConfigScoreOverride.cfgId == venueMapInfo?.venueCfgId;\n if (\n normalizeScores &&\n scoreOverride.scoreRaw != null &&\n venueMapMaxScoreRaw\n ) {\n // Score normalized to 0-100\n score = (scoreOverride.scoreRaw / venueMapMaxScoreRaw) * 100;\n }\n\n return {\n ...scoreOverride,\n score,\n };\n }\n );\n\n return {\n ...eventConfigScoreOverride,\n scoreOverrides,\n };\n};\n\nexport const EventMapContextProvider = ({\n event,\n children,\n disabled,\n doNotGetScoreOverrides,\n}: PropsWithChildren<{\n event?: Event | null;\n disabled?: boolean;\n doNotGetScoreOverrides?: boolean;\n}>) => {\n const viagogoEventId = event?.viagId;\n const venueConfigId = event?.venueCfgId;\n\n const hasScaledSeatScoreFeature = useUserHasFeature(Feature.ScaledSeatScore);\n\n const venueMapQuery = useGetEventMapConfig(viagogoEventId, disabled);\n\n const venueMapsByScoreModelQuery = useGetEventMapsByScoreModelConfig(\n viagogoEventId,\n disabled\n );\n\n const venueZoneConfigs = useVenueZoneMapIntegration(event ?? null);\n\n /**\n * VenueMapBaseInfo are all the same for different score models,\n * this is the safe guard to ensure we have a venue map present\n * in case any of the queries returned empty map due to race\n * conditions.\n */\n const venueMapInfo = useMemo((): VenueMapInfo | null => {\n if (venueMapQuery.data) {\n return venueMapQuery.data;\n }\n if (venueMapsByScoreModelQuery.data) {\n return (\n Object.values(venueMapsByScoreModelQuery.data).find(\n (mapInfo) => !!mapInfo\n ) ?? null\n );\n }\n\n return null;\n }, [venueMapQuery.data, venueMapsByScoreModelQuery.data]);\n\n const configId = venueMapInfo?.venueCfgId;\n\n const {\n seatScoreOverridesQuery: mapConfigOverridesQuery,\n sellerAccountScoreOverridesQuery: sellerAccountScoreOverridesQuery,\n } = useGetEventMapConfigOverrides(\n doNotGetScoreOverrides\n ? undefined // If we don't want the score overrides, just pass null into here\n : viagogoEventId,\n doNotGetScoreOverrides ? undefined : configId,\n doNotGetScoreOverrides || disabled\n );\n\n /* This logic was something carried from CX code\n We don't think we need this, but leaving this to know how is GA handles\n const isGeneralAdmissionOnly = Boolean(\n venueMapQuery.data &&\n venueMapQuery.data.sections.every(\n (s) =>\n s.sectionType === VenueMapSectionType.GeneralAdmission ||\n s.sectionType === VenueMapSectionType.GeneralAdmissionWithQueueNumber\n )\n );*/\n\n const venueMapMaxScoreRaw = useMemo(\n () =>\n venueMapQuery.data?.sectionScores.reduce(\n (acc, section) => Math.max(acc, section.scoreRaw ?? 0),\n 0\n ) ?? 0,\n [venueMapQuery.data]\n );\n\n const mapConfigOverridesQueryWithUIScore = useMemo(() => {\n if (!mapConfigOverridesQuery.data?.length) {\n return mapConfigOverridesQuery;\n }\n\n const data = mapConfigOverridesQuery.data.map((configOverride) =>\n populateScoreForDisplay(\n configOverride,\n venueMapMaxScoreRaw,\n venueMapQuery.data,\n hasScaledSeatScoreFeature\n )\n );\n\n return {\n ...mapConfigOverridesQuery,\n data,\n } as UseQueryResult;\n }, [\n hasScaledSeatScoreFeature,\n mapConfigOverridesQuery,\n venueMapMaxScoreRaw,\n venueMapQuery.data,\n ]);\n\n const activeConfigOverride = useMemo(():\n | EventConfigScoreOverride\n | undefined => {\n if (mapConfigOverridesQueryWithUIScore.isLoading) {\n return undefined;\n }\n\n const activeConfig = mapConfigOverridesQueryWithUIScore.data?.find(\n (c) => c.isActive\n );\n\n if (!activeConfig) {\n return undefined;\n }\n\n const rowIdToOrdinal =\n venueMapInfo?.sections?.reduce(\n (acc, section) => {\n for (const row of section.rows) {\n acc[row.id] = row.ordinal;\n }\n return acc;\n },\n {} as Record\n ) ?? {};\n\n const sanitizedScores = activeConfig?.scoreOverrides?.map((score) => {\n const ordinal = score.isManualOverride\n ? score.rowOrdinal\n : rowIdToOrdinal[score.rowId] ?? score.rowOrdinal;\n return {\n ...score,\n rowOrdinal: ordinal,\n };\n });\n\n return {\n ...activeConfig,\n scoreOverrides: sanitizedScores,\n };\n }, [\n venueMapInfo?.sections,\n mapConfigOverridesQueryWithUIScore.data,\n mapConfigOverridesQueryWithUIScore.isLoading,\n ]);\n\n const normalizeConfigOverrideWithUiScore = useCallback(\n (scoreOverride: EventConfigScoreOverride) => {\n const result = populateScoreForDisplay(\n scoreOverride,\n venueMapMaxScoreRaw,\n venueMapQuery.data,\n hasScaledSeatScoreFeature\n );\n\n return result!;\n },\n [hasScaledSeatScoreFeature, venueMapMaxScoreRaw, venueMapQuery.data]\n );\n\n const ticketClasses = useMemo(() => {\n try {\n if (venueMapQuery.data) {\n return Object.values(\n venueMapQuery.data.sections\n .flatMap((s) => s.rows.map((r) => r.tktClass))\n .reduce(\n (r, c) => {\n if (c?.id) {\n r[c.id] = c;\n }\n return r;\n },\n {} as Record\n )\n );\n }\n return [];\n } catch (error) {\n // TODO - remove when this is main-stream\n console.error(error);\n try {\n Sentry.captureException(error);\n } catch (err) {\n console.warn('Sentry log request failed', err);\n }\n }\n\n return [];\n }, [venueMapQuery.data]);\n\n const isMapLoading = useMemo(\n () => venueMapQuery.isLoading || venueMapsByScoreModelQuery.isLoading,\n [venueMapQuery.isLoading, venueMapsByScoreModelQuery.isLoading]\n );\n\n return (\n \n {children}\n \n );\n};\n","import { SectionInfo } from 'src/WebApiController';\n\nimport { useEventMapContext } from './EventMapContext';\n\nexport const useGetSectionRowFromVenueMapConfig = (\n rowId?: number | null,\n sectionId?: number | null,\n sectionName?: string | null,\n rowName?: string | null\n) => {\n const { venueMapInfo } = useEventMapContext();\n\n if (!venueMapInfo) return {};\n\n let section: SectionInfo | undefined = undefined;\n if (sectionId) {\n section = venueMapInfo.sections.find((s) => s.id == sectionId);\n }\n\n if (rowId) {\n let row = section?.rows.find((r) => r.id === rowId);\n\n if (row) {\n return { section, row };\n }\n\n section = venueMapInfo.sections.find((s) =>\n s.rows.some((r) => r.id === rowId)\n );\n\n if (!section) return {};\n\n row = section.rows.find((r) => r.id === rowId);\n\n // Row cannot be null, because if it was, the section would have been null\n if (!row) return {};\n\n return { section, row };\n } else {\n const section = venueMapInfo.sections.find((s) => s.name === sectionName);\n\n if (!section) return {};\n\n const row = section.rows.find((r) => r.name === rowName);\n\n return { section, row };\n }\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { ListingClient } from 'src/WebApiController';\n\nexport const useListingCanBeWasted = (listingId?: number | null) => {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const { trackError } = useErrorBoundaryContext();\n\n const shouldQuery =\n activeAccountWebClientConfig.activeAccountId != null && listingId != null;\n\n return useQuery({\n queryKey: [\n 'getListingsCanBeWasted',\n activeAccountWebClientConfig.activeAccountId,\n listingId,\n ],\n queryFn: () => {\n if (!shouldQuery) {\n return null;\n }\n return new ListingClient(\n activeAccountWebClientConfig\n ).getListingsCanBeWasted(listingId!);\n },\n\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError('ListingClient.getListingsCanBeWasted', error, {\n listingId,\n });\n },\n },\n });\n};\n","import { clsx } from 'clsx';\nimport { format } from 'date-fns';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Seating, Ticket } from 'src/WebApiController';\nimport * as styles from './SaleWasteInfo.css';\n\ninterface SaleWasteInfoProps {\n eventDate: string | null | undefined;\n tickets: Ticket[] | undefined;\n seating?: Seating;\n canBeWasted: boolean;\n}\n\nexport const SaleWasteInfo = ({\n eventDate,\n tickets,\n seating,\n canBeWasted,\n}: SaleWasteInfoProps) => {\n const isMobile = useMatchMedia('mobile');\n const ticketsToWaste = (tickets ?? []).filter((t) => !t.isWasted);\n\n if (\n !eventDate ||\n !tickets ||\n !seating ||\n ticketsToWaste.length === 0 ||\n !canBeWasted\n ) {\n return (\n
    \n \n
    \n );\n }\n\n return (\n \n \n \n \n
    \n
    \n \n
    \n
    \n {format(new Date(eventDate), 'MMM dd, yyyy')}\n
    \n
    \n
    \n
    \n \n
    \n
    $0
    \n
    \n
    \n \n
    \n\n
    \n
    \n \n
    \n
    x {ticketsToWaste.length}
    \n
    \n\n {ticketsToWaste.map((ticket, index) => {\n const isFirst = index === 0;\n return (\n <>\n
    \n {isFirst && (\n
    \n \n
    \n )}\n
    {seating.section}
    \n
    \n
    \n {isFirst && (\n
    \n \n
    \n )}\n
    {ticket.row}
    \n
    \n
    \n {isFirst && (\n
    \n \n
    \n )}\n
    {ticket.seat}
    \n
    \n \n );\n })}\n \n );\n};\n","import { useCallback, useContext, useState } from 'react';\nimport { OkButton } from 'src/components/Buttons/OkButton';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { useListingCanBeWasted } from 'src/hooks/api/useListingCanBeWasted';\nimport { useEventItemLoadingDisplay } from 'src/hooks/useEventItemLoadingDisplay';\nimport { CancellableFormFooter } from 'src/modals/common';\nimport { CancellableFormHeader } from 'src/modals/common/CancellableFormHeader';\nimport { ConnectedEventEntityHeader } from 'src/modals/common/EventEntityHeader';\nimport { modalDetails } from 'src/modals/common/Modals.css';\nimport { Summary } from 'src/modals/common/Summary';\nimport { SaleWasteInfo } from 'src/modals/ListingDetails/components/WasteUnsoldTickets/SaleWasteInfo';\nimport { ModalBody, ModalFooter, ModalProps } from 'src/modals/Modal';\nimport { ModalBodyHeaderContainer } from 'src/modals/Modal/Modal.styled';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { isSuccess } from 'src/utils/errorUtils';\nimport { EntityWithRealTickets } from 'src/utils/ticketUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n ApiException,\n ListingDetails,\n SaleClient,\n SaleDetails,\n} from 'src/WebApiController';\nimport * as styles from './WasteUnsoldTickets.css';\n\ntype WasteUnsoldTicketsProps = {\n cancelTo?: ModalProps;\n onWastedSuccess: (saleId: number) => void;\n};\n\nexport const WasteUnsoldTickets = ({\n cancelTo,\n onWastedSuccess,\n}: WasteUnsoldTicketsProps) => {\n const { posEntity, event, posEntityDisplayId, posEntityId } =\n useActivePosEntityContext();\n const listing =\n posEntity?.entityType === ActionOutboxEntityType.Listing\n ? (posEntity as ListingDetails)\n : undefined;\n const [isLoading, setIsLoading] = useState(false);\n\n const canBeWastedQuery = useListingCanBeWasted(listing?.id);\n const { item1: canBeWasted, item2: ticketsToWaste } =\n canBeWastedQuery.data ?? {};\n\n const { showErrorDialog, genericError } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const { setModal, closeModal } = useContext(ModalContext);\n\n const { isLoading: entityIsLoading, loadingState } =\n useEventItemLoadingDisplay(\n FormatContentId.LoadingSaleId,\n FormatContentId.SearchingForSaleId,\n FormatContentId.CouldNotFindSaleId,\n posEntityDisplayId ?? posEntityId?.toString()\n );\n\n const onSubmit = useCallback(async () => {\n setIsLoading(true);\n tryInvokeApi(\n async () => {\n if (!listing || !canBeWasted) {\n return null;\n }\n const client = new SaleClient(activeAccountWebClientConfig);\n\n const r = await client.wasteListingTickets({\n listingId: listing.id,\n });\n\n if (isSuccess(r) && r.entityId) {\n onWastedSuccess(r.entityId);\n if (cancelTo) {\n setModal(cancelTo);\n } else {\n closeModal(true);\n }\n } else {\n showErrorDialog(\n 'SaleClient.mergePosManagedMarketplaceSale',\n {\n message: r.message ?? genericError,\n status: r.status!,\n } as ApiException,\n {\n trackErrorData: {\n listing: listing?.id,\n },\n }\n );\n }\n },\n (error) => {\n showErrorDialog('SaleClient.mergePosManagedMarketplaceSale', error, {\n trackErrorData: {\n listing: listing?.id,\n },\n });\n },\n () => {\n setIsLoading(false);\n }\n );\n }, [\n activeAccountWebClientConfig,\n canBeWasted,\n cancelTo,\n closeModal,\n genericError,\n listing,\n onWastedSuccess,\n setModal,\n showErrorDialog,\n ]);\n\n return (\n <>\n \n \n \n \n }\n />\n \n\n \n
    \n {event && listing && (\n \n \n \n )}\n {entityIsLoading ||\n !listing ||\n !event ||\n isLoading ||\n canBeWastedQuery.isFetching ? (\n \n ) : (\n
    \n \n
    \n )}\n
    \n
    \n\n \n \n \n \n \n \n );\n};\n","import { ComponentProps, useCallback, useContext } from 'react';\nimport { ButtonWithIcon } from 'src/components/Buttons';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { vars } from 'src/core/themes';\nimport { WasteUnsoldTickets } from 'src/modals/ListingDetails/components/WasteUnsoldTickets/WasteUnsoldTickets';\nimport { ClockTrashIcon } from 'src/svgs/ClockTrashIcon';\nimport { IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { EntityWithRealTickets } from 'src/utils/ticketUtils';\nimport { ActionOutboxEntityType, ListingDetails } from 'src/WebApiController';\n\ntype WasteUnsoldTicketsProps = Omit<\n ComponentProps,\n 'event' | 'venue'\n> & {\n onWastedSuccess: (saleId: number) => void;\n};\n\nexport const LaunchWasteUnsoldTickets = ({\n cancelTo,\n onWastedSuccess,\n}: WasteUnsoldTicketsProps) => {\n const { posEntity } = useActivePosEntityContext();\n const listing =\n posEntity?.entityType === ActionOutboxEntityType.Listing\n ? (posEntity as ListingDetails)\n : undefined;\n const { setModal } = useContext(ModalContext);\n\n const listingId = listing?.id;\n\n const launchWasteUnsoldTickets = useCallback(() => {\n setModal({\n children: (\n \n ),\n clickOutsideToClose: true,\n size: 'slide-in',\n deepLinkValue: listingId,\n trackViewEntityType: ActionOutboxEntityType.Listing,\n });\n }, [setModal, cancelTo, onWastedSuccess, listingId]);\n\n const onLaunchDialog = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n launchWasteUnsoldTickets();\n },\n [launchWasteUnsoldTickets]\n );\n\n return (\n \n }\n onClick={onLaunchDialog}\n />\n );\n};\n","import { useCallback, useContext } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { ConfirmDialog } from 'src/core/interim/dialogs/ConfirmDialog';\nimport { Button, Stack } from 'src/core/ui';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { DeleteIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { isSuccess } from 'src/utils/errorUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { ApiException, ListingClient, Permission } from 'src/WebApiController';\n\nexport const LaunchDeleteSeatSaver = ({\n listingId,\n disabled,\n setIsLoading,\n}: {\n listingId: number;\n disabled?: boolean;\n setIsLoading?: (isLoading: boolean) => void;\n}) => {\n const { closeModal } = useContext(ModalContext);\n const { showErrorDialog, genericError } = useErrorBoundaryContext();\n const hasSeatSaverPermission = useUserHasAnyOfPermissions(\n Permission.Inventory_ManageSeatSaver,\n Permission.Inventory_ManageSeatSaverCreatedBy\n );\n const {\n refreshCatalog,\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n const { activeAccountWebClientConfig } = useAppContext();\n\n const dialogProps = useBasicDialog();\n\n const onDeleteSeatSaver = useCallback(async () => {\n setIsLoading?.(true);\n dialogProps.closeDialog();\n\n await tryInvokeApi(\n async () => {\n const r = await new ListingClient(\n activeAccountWebClientConfig\n ).deleteSeatSaver(listingId);\n\n if (isSuccess(r)) {\n await refreshExpandedListItems(); // Because we're deleting - this will need to be cleared from the table\n refreshCatalog();\n closeModal(true);\n } else {\n showErrorDialog(\n 'ListingClient.deleteSeatSaver',\n {\n message: r.message ?? genericError,\n status: r.status!,\n } as ApiException,\n {\n trackErrorData: {\n listingId,\n },\n }\n );\n }\n },\n (error) => {\n showErrorDialog('ListingClient.deleteSeatSaver', error);\n },\n () => setIsLoading?.(false)\n );\n }, [\n activeAccountWebClientConfig,\n closeModal,\n dialogProps,\n genericError,\n listingId,\n refreshCatalog,\n refreshExpandedListItems,\n setIsLoading,\n showErrorDialog,\n ]);\n\n if (!hasSeatSaverPermission) {\n return null;\n }\n\n return (\n <>\n dialogProps.launchDialog()}\n disabled={disabled}\n >\n \n \n \n \n \n }\n bodyText={}\n {...dialogProps.dialogProps}\n centered\n disabled={disabled}\n onOkay={onDeleteSeatSaver}\n onClosed={dialogProps.closeDialog}\n onCancel={dialogProps.closeDialog}\n />\n \n );\n};\n","import { ConnectedComparableListings } from 'src/components/Listings/ConnectedComparableListings';\nimport { CompListing, ListingDetails } from 'src/WebApiController';\n\nexport const ViewCompsBody = ({\n listing,\n compListings,\n ...rest\n}: {\n listing?: ListingDetails | null;\n compListings?: CompListing[] | null;\n}) => {\n return (\n \n );\n};\n","import { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { vars } from 'src/core/themes';\nimport { useEventItemLoadingDisplay } from 'src/hooks/useEventItemLoadingDisplay';\nimport { useGetCompListings } from 'src/hooks/useGetCompListings';\nimport { CancellableFormFooter } from 'src/modals/common';\nimport { CancellableFormHeader } from 'src/modals/common/CancellableFormHeader';\nimport { ConnectedEventEntityHeader } from 'src/modals/common/EventEntityHeader';\nimport { ModalBody, ModalFooter, ModalProps } from 'src/modals/Modal';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { ListingDetails } from 'src/WebApiController';\n\nimport { ViewCompsBody } from './ViewCompsBody';\n\nexport const ViewCompsModal = ({ cancelTo }: { cancelTo?: ModalProps }) => {\n const { loadingState } = useEventItemLoadingDisplay(\n FormatContentId.LoadingListingId,\n FormatContentId.SearchingForListingId,\n FormatContentId.CouldNotFindListingId\n );\n\n const { event, posEntity: listing } =\n useActivePosEntityContext();\n\n const { compListingsQuery } = useGetCompListings(\n event,\n listing?.id,\n listing?.currency\n );\n\n if (loadingState) return loadingState;\n\n return (\n <>\n \n }\n />\n \n\n {compListingsQuery.isLoading ? (\n
    \n \n
    \n ) : (\n \n \n \n )}\n\n \n \n \n \n );\n};\n","import { ComponentProps, useCallback, useContext } from 'react';\nimport { ButtonWithIcon } from 'src/components/Buttons';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { vars } from 'src/core/themes';\nimport { ButtonProps } from 'src/core/ui';\nimport { ViewCompsModal } from 'src/modals/ViewCompsModal';\nimport { DollarIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n ActionOutboxEntityType,\n ListingDetailDataField,\n ListingDetails,\n} from 'src/WebApiController';\n\nexport const LaunchViewComps = ({\n listingId,\n marketplaceListingId,\n cancelTo,\n variant,\n ...buttonProps\n}: {\n listingId: number;\n marketplaceListingId?: string | null;\n variant?: ButtonProps['variant'];\n disabled?: boolean;\n} & ComponentProps) => {\n const { setModal } = useContext(ModalContext);\n const { setActivePosEntity } = useActivePosEntityContext();\n\n const viewComps = useCallback(() => {\n setModal({\n children: ,\n clickOutsideToClose: true,\n size: 'slide-in',\n deepLinkValue: listingId,\n trackViewEntityType: ActionOutboxEntityType.Listing,\n });\n }, [setModal, cancelTo, listingId]);\n\n const onLaunchDialog = useCallback(\n async (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n\n setActivePosEntity(listingId, marketplaceListingId, true, [\n ListingDetailDataField.Basic,\n ListingDetailDataField.Pricing,\n ListingDetailDataField.AutoPricing,\n ]);\n viewComps();\n },\n [setActivePosEntity, listingId, marketplaceListingId, viewComps]\n );\n\n return (\n }\n />\n );\n};\n","import { useCallback, useContext } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { ReloadButton } from 'src/components/Buttons';\nimport { OkButton } from 'src/components/Buttons/OkButton';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { PosDropdown, PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { Stack } from 'src/core/ui';\nimport { useHasWasteSaleFeature } from 'src/hooks/features/useHasWasteSaleFeature';\nimport { useUserCanSetPrice } from 'src/hooks/useUserHasListingPermissions';\nimport { LaunchWasteUnsoldTickets } from 'src/modals/ListingDetails/actions/LaunchWasteUnsoldTickets';\nimport { ModalFooter } from 'src/modals/Modal/Modal.styled';\nimport { IconsFill, MoreIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n getListingActionButtons,\n getListingDetailsModalConfigWithDeepLink,\n} from 'src/utils/inventoryUtils';\nimport { getSaleDetailsRelativeUrl } from 'src/utils/saleUtils';\nimport {\n ListingActionType,\n ListingDetailDataField,\n ListingDetails,\n} from 'src/WebApiController';\n\nimport { LaunchDeleteSeatSaver } from './actions/LaunchDeleteSeatSaver';\nimport { LaunchViewComps } from './actions/LaunchViewComps';\n\nexport const ListingDetailsFooter = ({\n onSubmit,\n disabled,\n setIsLoading,\n}: {\n onSubmit?: () => void;\n disabled?: boolean;\n setIsLoading?: (isLoading: boolean) => void;\n}) => {\n const hasWasteSaleFeature = useHasWasteSaleFeature();\n const { closeModal } = useContext(ModalContext);\n const navigate = useNavigate();\n\n const {\n event,\n posEntity: listing,\n isLoading,\n errorInfo,\n setActivePosEntity,\n } = useActivePosEntityContext();\n const cancelTo = getListingDetailsModalConfigWithDeepLink(listing?.id);\n\n const onReload = useCallback(() => {\n if (listing) {\n setActivePosEntity(\n listing.id,\n listing.idOnMkp,\n true,\n [ListingDetailDataField.Basic],\n true\n );\n }\n }, [listing, setActivePosEntity]);\n\n const canSetPrice = useUserCanSetPrice(listing, false);\n\n const navigateToWastedSale = useCallback(\n (saleId: number) => {\n navigate(getSaleDetailsRelativeUrl(saleId));\n },\n [navigate]\n );\n\n if (errorInfo) {\n return ;\n }\n\n if (!listing) {\n return null;\n }\n\n const mainActions: { key: string; action: JSX.Element | null }[] = [\n {\n key: 'Refresh',\n action: (\n \n ),\n },\n ];\n\n const uiActions: { key: string; action: JSX.Element | null }[] = [\n ...(canSetPrice\n ? [\n {\n key: 'ViewComps',\n action: (\n \n ),\n },\n ]\n : []),\n ];\n\n const actions: { key: string; action: JSX.Element | null }[] = [\n ...uiActions,\n ...listing.actions\n .filter(\n (a) =>\n a !== ListingActionType.FullySoldNoAction &&\n a !== ListingActionType.Waste\n )\n .map((a, i) => ({\n key: a,\n action:\n getListingActionButtons(\n false /* for table */,\n listing,\n [a],\n event,\n a === ListingActionType.Broadcast ||\n a === ListingActionType.Unbroadcast\n ? 'regular'\n : a === ListingActionType.DownloadUserDocuments\n ? 'outline'\n : 'text',\n false,\n cancelTo,\n disabled || isLoading\n )?.[0] ?? null,\n })),\n ];\n\n const mainAction = actions.find((a) =>\n [\n ListingActionType.Broadcast,\n ListingActionType.Unbroadcast,\n ListingActionType.DownloadUserDocuments,\n ].includes(a.key as ListingActionType)\n );\n if (mainAction) {\n mainActions.push(mainAction);\n }\n if (onSubmit) {\n mainActions.push({\n key: 'Submit',\n action: (\n \n ),\n });\n }\n\n const subActions = actions.filter(\n (a) =>\n ![\n ListingActionType.Broadcast,\n ListingActionType.Unbroadcast,\n ListingActionType.DownloadUserDocuments,\n ].includes(a.key as ListingActionType)\n );\n\n if (hasWasteSaleFeature) {\n const hasWasteListingAction = listing.actions.includes(\n ListingActionType.Waste\n );\n if (hasWasteListingAction) {\n subActions.push({\n key: 'WasteTickets',\n action: (\n \n ),\n });\n }\n }\n\n return listing ? (\n \n \n \n {listing.isSeatSaver && (\n \n )}\n \n \n {listing?.isDeleted ? (\n \n ) : (\n <>\n {mainActions.map((a) => (\n
    {a.action}
    \n ))}\n {subActions.length > 0 ? (\n \n }\n triggerProps={{ disabled: disabled || isLoading }}\n align=\"end\"\n >\n {subActions\n .toSorted((a, b) => a.key.localeCompare(b.key))\n .map((a) => (\n \n {a.action}\n \n ))}\n \n ) : null}\n \n )}\n
    \n \n
    \n ) : null;\n};\n","import { isEqual } from 'lodash-es';\nimport { useCallback, useEffect, useMemo } from 'react';\nimport { useForm } from 'react-hook-form';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { useListingGroupPricingSettings } from 'src/hooks/api/useListingGroupPricingSettings';\nimport { useGetAccountAutoPricingSettings } from 'src/hooks/useGetAccountAutoPricingSettings';\nimport { useGetListingAutoPricingSettings } from 'src/hooks/useGetListingAutoPricingSettings';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { isSuccess } from 'src/utils/errorUtils';\nimport { safeParseJson } from 'src/utils/inventoryUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n AutoPricingCompListingMode,\n AutoPricingInputs,\n AutoPricingOutlierMode,\n AutoPricingUndercutMode,\n Feature,\n Listing,\n ListingClient,\n ListingDetails,\n ListingDetailsAutoPricingSectionUpdates,\n} from 'src/WebApiController';\n\n// TODO: this need to be clean up as IntelligibleAutoPricingSettings is GA'ed\nconst getListingDetailsAutoPricingInput = (\n listing: Listing | null | undefined,\n accountPricingSettings?: AutoPricingInputs | null,\n groupPricingSettings?: AutoPricingInputs | null,\n listingPricingSettings?: ListingDetailsAutoPricingSectionUpdates | null,\n hasIntelligibleAutoPricingSettingsFeature?: boolean | null,\n allowSeatScoreCompListingMode?: boolean | null\n): ListingDetailsAutoPricingSectionUpdates | undefined => {\n if (hasIntelligibleAutoPricingSettingsFeature) {\n // We take care of fallbacks and defaults on the server-side now\n return listingPricingSettings ?? undefined;\n }\n\n const quantityScoreOverrideJson = safeParseJson(listing?.compQtyScrAdjJson);\n\n // Listing is totally null for bulk updates\n const defaultQuantityScoreOverrideJson =\n listing == null\n ? null\n : JSON.stringify({\n ...quantityScoreOverrideJson,\n quantityFilter: null,\n });\n // If SectionId or RowId filters are set, make sure we alwayws set compListingOnlyForSelectedSectionsEnabled to true\n // If a user decides to disable this setting, we need to make it known that the selected sections are not being used\n const defaultCompListingOnlyForSelectedSectionsEnabled =\n !!listing?.compSectionSettings?.sectionIdFilter?.length;\n\n const defaultCompListingMode = allowSeatScoreCompListingMode\n ? AutoPricingCompListingMode.QualityScore\n : AutoPricingCompListingMode.SameEvent;\n\n return {\n id: listing?.id ?? 0,\n rowVersion: null,\n netProceedsFloor: listing?.procsFloor ?? null,\n netProceedsCeiling: listing?.procsCeil ?? null,\n currencyCode: listing?.currency ?? null,\n autoPricingEnabled: listing?.isAutoPrc ?? null,\n\n compListingFloor:\n listing?.compFloor ??\n groupPricingSettings?.compListingFloor ??\n accountPricingSettings?.compListingFloor ??\n 1,\n compListingCeiling:\n listing?.compCeil ??\n groupPricingSettings?.compListingCeiling ??\n accountPricingSettings?.compListingCeiling ??\n 6,\n compListingMode:\n listing?.compMode ??\n groupPricingSettings?.compListingMode ??\n accountPricingSettings?.compListingMode ??\n defaultCompListingMode,\n compListingOnlyForSameZoneEnabled:\n listing?.isCompForSameZone ??\n groupPricingSettings?.compListingOnlyForSameZoneEnabled ??\n accountPricingSettings?.compListingOnlyForSameZoneEnabled ??\n !defaultCompListingOnlyForSelectedSectionsEnabled, // Default to false if we have selected sections enabled\n compListingOnlyForSelectedSectionsEnabled:\n listing?.isCompSelectedSections ??\n groupPricingSettings?.compListingOnlyForSelectedSectionsEnabled ??\n accountPricingSettings?.compListingOnlyForSelectedSectionsEnabled ??\n defaultCompListingOnlyForSelectedSectionsEnabled,\n compListingExcludeFanInventory:\n listing?.compExclFanInv ??\n groupPricingSettings?.compListingExcludeFanInventory ??\n accountPricingSettings?.compListingExcludeFanInventory ??\n null,\n compListingExcludeDefects:\n listing?.compExclDefects ??\n groupPricingSettings?.compListingExcludeDefects ??\n accountPricingSettings?.compListingExcludeDefects ??\n null,\n compListingQuantityScoreAdjustmentEnabled:\n listing?.isCompQtyScrAdj ??\n groupPricingSettings?.compListingQuantityScoreAdjustmentEnabled ??\n accountPricingSettings?.compListingQuantityScoreAdjustmentEnabled ??\n null,\n compListingQuantityScoreAdjustmentOverrideJson:\n listing?.compQtyScrAdjJson ??\n groupPricingSettings?.compListingQuantityScoreAdjustmentOverrideJson ??\n defaultQuantityScoreOverrideJson,\n compListingSelectedSectionSettings:\n listing?.compSectionSettings ??\n groupPricingSettings?.compListingSelectedSectionSettings ??\n accountPricingSettings?.compListingSelectedSectionSettings ??\n null,\n undercutMode:\n listing?.undMode ??\n groupPricingSettings?.undercutMode ??\n accountPricingSettings?.undercutMode ??\n AutoPricingUndercutMode.Simple,\n undercutAbsoluteAmount:\n listing?.undAbsAmt ??\n groupPricingSettings?.undercutAbsoluteAmount ??\n accountPricingSettings?.undercutAbsoluteAmount ??\n 0.01,\n undercutRelativeAmount:\n listing?.undRelAmt ??\n groupPricingSettings?.undercutRelativeAmount ??\n accountPricingSettings?.undercutRelativeAmount ??\n 0,\n circuitBreakerMaxDiscountVelocityPercent:\n listing?.cirBrMaxDiscVelocPercent ??\n groupPricingSettings?.circuitBreakerMaxDiscountVelocityPercent ??\n accountPricingSettings?.circuitBreakerMaxDiscountVelocityPercent ??\n 0.8,\n circuitBreakerMaxDiscountVelocityTicksInHours:\n listing?.cirBrMaxDiscVelocTicksInHrs ??\n groupPricingSettings?.circuitBreakerMaxDiscountVelocityTicksInHours ??\n accountPricingSettings?.circuitBreakerMaxDiscountVelocityTicksInHours ??\n 6,\n circuitBreakerMinCompListingCount:\n listing?.cirBrMinCompCount ??\n groupPricingSettings?.circuitBreakerMinCompListingCount ??\n accountPricingSettings?.circuitBreakerMinCompListingCount ??\n 10,\n circuitBreakerRelativeCeiling:\n listing?.cirBrRelCeil ??\n groupPricingSettings?.circuitBreakerRelativeCeiling ??\n accountPricingSettings?.circuitBreakerRelativeCeiling ??\n 100,\n circuitBreakerRelativeFloor:\n listing?.cirBrRelFloor ??\n groupPricingSettings?.circuitBreakerRelativeFloor ??\n accountPricingSettings?.circuitBreakerRelativeFloor ??\n 1,\n outlierMode:\n listing?.outMode ??\n groupPricingSettings?.outlierMode ??\n accountPricingSettings?.outlierMode ??\n AutoPricingOutlierMode.StandardDeviations,\n outlierStandardDeviations:\n listing?.outlStdDev ??\n groupPricingSettings?.outlierStandardDeviations ??\n accountPricingSettings?.outlierStandardDeviations ??\n 3,\n outlierKthLowestLimit:\n listing?.outKthLowestLim ??\n groupPricingSettings?.outlierKthLowestLimit ??\n accountPricingSettings?.outlierKthLowestLimit ??\n null,\n outlierKthLowestLimitRelativeSpacing:\n listing?.outKthLowestLimRelSpc ??\n groupPricingSettings?.outlierKthLowestLimitRelativeSpacing ??\n accountPricingSettings?.outlierKthLowestLimitRelativeSpacing ??\n null,\n outlierKthLowestLimitAbsoluteSpacing:\n listing?.outKthLowestLimAbsSpc ??\n groupPricingSettings?.outlierKthLowestLimitAbsoluteSpacing ??\n accountPricingSettings?.outlierKthLowestLimitAbsoluteSpacing ??\n null,\n\n // If listing id is null, we're creating the default input for bulk edit - default to skipping everything\n skipAdvancePricing: !listing?.id,\n skipAutoPricing: !listing?.id,\n skipCompListing: !listing?.id,\n skipUndercut: !listing?.id,\n\n autoPriceFrequency: null,\n compListingQuantityFilters: null,\n compListingQuantityScoreAdjustmentOverrides: null,\n scoreModel: null,\n autoPricingDefaultQuantityFiltersJson: null,\n venueZoneOverrideId: null,\n venueZoneConfigType: null,\n };\n};\n\nexport const useAutoPricingForm = (\n listing: Listing | null | undefined,\n onSubmitStart: () => void,\n onSubmitDone: (success?: boolean) => Promise\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n const { event } = useActivePosEntityContext();\n const {\n pricingSettings: listingPricingSettings,\n loaded: listingSettingLoaded,\n } = useGetListingAutoPricingSettings(listing, event);\n const { pricingSettings: groupPricingSettings, loaded: groupSettingLoaded } =\n useListingGroupPricingSettings(listing?.ltGrpId, event);\n const {\n pricingSettings: accountPricingSettings,\n loaded: accountSettingLoaded,\n } = useGetAccountAutoPricingSettings();\n const hasAllowSeatScoreCompListingModeFeature = useUserHasFeature(\n Feature.AllowSeatScoreCompListingMode\n );\n\n const methods = useForm({\n defaultValues: getListingDetailsAutoPricingInput(\n listing,\n accountPricingSettings,\n groupPricingSettings,\n listingPricingSettings,\n true,\n hasAllowSeatScoreCompListingModeFeature\n ),\n });\n\n useEffect(() => {\n if (groupSettingLoaded || accountSettingLoaded || listingSettingLoaded) {\n methods.reset(\n getListingDetailsAutoPricingInput(\n listing,\n accountPricingSettings,\n groupPricingSettings,\n listingPricingSettings,\n true,\n hasAllowSeatScoreCompListingModeFeature\n )\n );\n }\n }, [\n groupSettingLoaded,\n accountSettingLoaded,\n methods,\n listing,\n accountPricingSettings,\n groupPricingSettings,\n listingPricingSettings,\n listingSettingLoaded,\n hasAllowSeatScoreCompListingModeFeature,\n ]);\n\n const onSubmitHandler = useCallback(\n async (autoPricingSectionForm: ListingDetailsAutoPricingSectionUpdates) => {\n tryInvokeApi(\n async () => {\n onSubmitStart();\n const result = await new ListingClient(\n activeAccountWebClientConfig\n ).updateListingAutoPricingSection(autoPricingSectionForm);\n\n if (isSuccess(result)) {\n // Reset the form to latest changed\n methods.reset(autoPricingSectionForm);\n await onSubmitDone();\n } else {\n showErrorDialog(\n 'ListingClient.updateListingAutoPricingSection',\n { message: result.message, status: result.status },\n {\n trackErrorData: {\n autoPricingSectionForm,\n },\n }\n );\n }\n },\n (error) => {\n showErrorDialog(\n 'ListingClient.updateListingAutoPricingSection',\n error,\n {\n trackErrorData: autoPricingSectionForm,\n }\n );\n },\n () => {\n onSubmitDone(false);\n }\n );\n },\n [\n activeAccountWebClientConfig,\n methods,\n onSubmitDone,\n onSubmitStart,\n showErrorDialog,\n ]\n );\n\n const onSubmit = useCallback(() => {\n methods.handleSubmit(onSubmitHandler)();\n }, [methods, onSubmitHandler]);\n\n const onReset = useCallback(() => {\n methods.reset(\n getListingDetailsAutoPricingInput(\n listing,\n accountPricingSettings,\n groupPricingSettings,\n listingPricingSettings,\n undefined,\n hasAllowSeatScoreCompListingModeFeature\n )\n );\n }, [\n accountPricingSettings,\n groupPricingSettings,\n hasAllowSeatScoreCompListingModeFeature,\n listing,\n listingPricingSettings,\n methods,\n ]);\n\n const input = methods.watch();\n\n const hasChanges = useMemo(() => {\n const defaultValues = methods.formState.defaultValues;\n return (\n input.netProceedsFloor !== defaultValues?.netProceedsFloor ||\n input.netProceedsCeiling !== defaultValues?.netProceedsCeiling ||\n input.currencyCode !== defaultValues?.currencyCode ||\n input.autoPricingEnabled !== defaultValues?.autoPricingEnabled ||\n input.compListingFloor !== defaultValues?.compListingFloor ||\n input.compListingCeiling !== defaultValues?.compListingCeiling ||\n input.compListingMode !== defaultValues?.compListingMode ||\n input.compListingOnlyForSameZoneEnabled !==\n defaultValues?.compListingOnlyForSameZoneEnabled ||\n input.compListingOnlyForSelectedSectionsEnabled !==\n defaultValues?.compListingOnlyForSelectedSectionsEnabled ||\n input.compListingExcludeFanInventory !==\n defaultValues?.compListingExcludeFanInventory ||\n input.compListingExcludeDefects !==\n defaultValues?.compListingExcludeDefects ||\n input.compListingQuantityScoreAdjustmentEnabled !==\n defaultValues?.compListingQuantityScoreAdjustmentEnabled ||\n input.compListingQuantityScoreAdjustmentOverrideJson !==\n defaultValues?.compListingQuantityScoreAdjustmentOverrideJson ||\n input.undercutMode !== defaultValues?.undercutMode ||\n input.undercutAbsoluteAmount !== defaultValues?.undercutAbsoluteAmount ||\n input.undercutRelativeAmount !== defaultValues?.undercutRelativeAmount ||\n input.circuitBreakerMaxDiscountVelocityPercent !==\n defaultValues?.circuitBreakerMaxDiscountVelocityPercent ||\n input.circuitBreakerMaxDiscountVelocityTicksInHours !==\n defaultValues?.circuitBreakerMaxDiscountVelocityTicksInHours ||\n input.circuitBreakerMinCompListingCount !==\n defaultValues?.circuitBreakerMinCompListingCount ||\n input.circuitBreakerRelativeCeiling !==\n defaultValues?.circuitBreakerRelativeCeiling ||\n input.circuitBreakerRelativeFloor !==\n defaultValues?.circuitBreakerRelativeFloor ||\n input.outlierMode !== defaultValues?.outlierMode ||\n input.outlierStandardDeviations !==\n defaultValues?.outlierStandardDeviations ||\n input.outlierKthLowestLimit !== defaultValues?.outlierKthLowestLimit ||\n input.outlierKthLowestLimitRelativeSpacing !==\n defaultValues?.outlierKthLowestLimitRelativeSpacing ||\n input.outlierKthLowestLimitAbsoluteSpacing !==\n defaultValues?.outlierKthLowestLimitAbsoluteSpacing ||\n input.skipAdvancePricing !== defaultValues?.skipAdvancePricing ||\n input.skipAutoPricing !== defaultValues?.skipAutoPricing ||\n input.skipCompListing !== defaultValues?.skipCompListing ||\n input.skipUndercut !== defaultValues?.skipUndercut ||\n !isEqual(\n input.compListingSelectedSectionSettings,\n defaultValues?.compListingSelectedSectionSettings\n ) ||\n !isEqual(\n input.compListingQuantityFilters,\n defaultValues?.compListingQuantityFilters\n )\n );\n }, [input, methods.formState.defaultValues]);\n\n return {\n hasChanges,\n methods,\n onSubmit,\n onReset,\n };\n};\n","import { useFormContext } from 'react-hook-form';\nimport { useToggle } from 'react-use';\nimport { Content } from 'src/contexts/ContentContext';\nimport { HorizontalTextList } from 'src/core/POS/HorizontalTextList';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { AddAdminHoldNoteModal } from 'src/modals/AddNote';\nimport { Detail, DetailSection } from 'src/modals/common';\nimport { EditIcon, IconsFill, PlusIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n ListingDetailsBroadcastSectionUpdates,\n Permission,\n} from 'src/WebApiController';\n\nimport * as styles from './AdminHoldNotes.css';\n\nexport const AdminHoldNotesSection = ({ disabled }: { disabled?: boolean }) => {\n const { watch } = useFormContext();\n const adminHoldNotes = watch('adminHoldNotes');\n\n const hasPermission = useUserHasAnyOfPermissions(\n Permission.SellerAccount_Admin\n );\n\n const [isAddNoteModalOpen, toggleAddNoteModal] = useToggle(false);\n\n const onSubmit = () => {\n toggleAddNoteModal();\n };\n\n if (!hasPermission) {\n return null;\n }\n\n return (\n }>\n {isAddNoteModalOpen && (\n \n )}\n \n }\n detail={\n \n {adminHoldNotes ? (\n
    \n \n
    \n ) : null}\n \n {adminHoldNotes ? (\n \n ) : (\n \n )}\n \n \n
    \n }\n />\n
    \n
    \n );\n};\n","import { useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { MarketplaceLogo } from 'src/components/common/MarketplaceLogo';\nimport { getSeatDisplayText } from 'src/components/common/SeatingInfo';\nimport { AdminHoldBadge } from 'src/components/Listings/AdminHoldBadge';\nimport {\n RowSelector,\n SectionSelector,\n} from 'src/components/Selectors/SectionRowSelector';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport {\n Content,\n getContent,\n useContentContext,\n useFormattedContent,\n} from 'src/contexts/ContentContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { Switch } from 'src/core/interim/Switch';\nimport { ErrorIconMessage } from 'src/core/POS/ErrorIconMessage';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { Popover, SimpleTable, Stack } from 'src/core/ui';\nimport { TooltipPopover } from 'src/core/ui/TooltipPopover';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { CrossIcon, WarningOutlineIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n BROADCAST_ERROR_CODE_TO_CID,\n LISTING_STATUS_TO_CID,\n PENDING_PROOF_STATE_TO_CID,\n} from 'src/utils/constants/contentIdMaps';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { getListingBroadcastIcon } from 'src/utils/inventoryUtils';\nimport {\n Feature,\n ListingBroadcastStatus,\n ListingDetails,\n ListingDetailsBroadcastSectionUpdates,\n ListingStatus,\n Marketplace,\n MarketplaceListing,\n PendingProofState,\n QualityControlState,\n} from 'src/WebApiController';\n\nimport * as styles from './MarketplaceDisplay.css';\nimport { MarketplaceFailure } from './useGetMarketplaceFailures';\nexport const MarketplaceDisplay = ({\n marketplaceListing: ml,\n formIndex,\n status,\n setListingStatus,\n isUKEvent,\n isViagogo,\n isDeleted,\n disabled,\n onListingBroadcastToggle,\n error,\n qcState,\n}: {\n marketplaceListing: MarketplaceListing;\n formIndex: number;\n status: ListingStatus;\n setListingStatus: (\n marketplace: Marketplace,\n newListingStatus: ListingStatus\n ) => void;\n isUKEvent?: boolean;\n isViagogo?: boolean;\n isDeleted?: boolean;\n disabled?: boolean;\n onListingBroadcastToggle: (\n isBroadcasting: boolean,\n marketplace: Marketplace\n ) => void;\n error?: MarketplaceFailure | null;\n qcState?: QualityControlState | null;\n}) => {\n const alwaysShowAsDelisted =\n isUKEvent && ml.mkp === Marketplace.StubHub && !isViagogo;\n const { event, posEntity: listing } =\n useActivePosEntityContext();\n const noListingQty = listing ? listing.availQty === 0 : true;\n\n const contentContext = useContentContext();\n const { venueMapQuery } = useEventMapContext();\n\n const { register, watch, setValue } =\n useFormContext();\n\n const marketplaceSeatOverrides = watch('marketplaceSeatOverrides');\n\n const { overrideSection, overrideRow, overrideSeats } =\n marketplaceSeatOverrides[formIndex] ?? {};\n\n const { selectedSection, selectedRow } = useMemo(() => {\n const section = venueMapQuery.data?.sections.find(\n (s) => s.name === overrideSection\n );\n const row = section?.rows.find((r) => r.name === overrideRow);\n\n return { selectedSection: section, selectedRow: row };\n }, [overrideRow, overrideSection, venueMapQuery.data?.sections]);\n\n const isListed = !alwaysShowAsDelisted && status === ListingStatus.Listed;\n\n const isChecked =\n !alwaysShowAsDelisted &&\n (status === ListingStatus.Listed ||\n status === ListingStatus.ListingPending ||\n status === ListingStatus.DelistingFailed ||\n ml.brdcstStatus === ListingBroadcastStatus.BroadcastWithError);\n\n const hasBroadcastErrors =\n ml.status === ListingStatus.ListingFailed ||\n ml.status === ListingStatus.DelistingFailed;\n\n const { iconComponent: ListingBroadcastIcon, contentId } =\n getListingBroadcastIcon(\n alwaysShowAsDelisted\n ? ListingStatus.Delisted // We always show Delisted for StubHub when event is in UK\n : status,\n qcState,\n false,\n true,\n listing?.isUndeliv,\n ml.brdcstStatus,\n ml.pendProofState\n );\n\n const disabledDueToPendingQC =\n ml.status !== ListingStatus.Listed &&\n qcState === QualityControlState.Pending;\n\n const pendingProofErrorMessage = useFormattedContent(\n FormatContentId.ProofOfPurchasedRequiredDetailMessage,\n [isViagogo ? 'Viagogo' : ml.mkp]\n ) as string;\n\n const hasUseSelectedRowIdFeature = useUserHasFeature(\n Feature.UseSelectedRowIdForMarketplaceSeatingOverride\n );\n\n const listingStatusCID = useMemo(() => {\n if (listing?.isAdminHold) {\n return ContentId.OnHoldBroadcastDisabled;\n }\n\n if (disabledDueToPendingQC) {\n return contentId ?? ContentId.PendingQC;\n }\n\n if (listing?.isUndeliv) {\n return contentId ?? ContentId.Undeliverable;\n }\n\n if (\n ml.pendProofState === PendingProofState.PendingProof ||\n ml.pendProofState === PendingProofState.PendingReview\n ) {\n return PENDING_PROOF_STATE_TO_CID[ml.pendProofState];\n }\n\n if (ml.brdcstStatus === ListingBroadcastStatus.BroadcastWithError) {\n return ContentId.ListedSyncFailed;\n }\n if (ml.brdcstStatus === ListingBroadcastStatus.UnbroadcastWithError) {\n return ContentId.Delisted;\n }\n\n const santitizedStatus =\n ml.errMsgs != null && ml.errMsgs.length > 0\n ? status\n : alwaysShowAsDelisted\n ? status === ListingStatus.Disabled\n ? status\n : ListingStatus.Delisted // We always show Delisted for StubHub when event is in UK\n : status;\n return LISTING_STATUS_TO_CID[santitizedStatus];\n }, [\n alwaysShowAsDelisted,\n contentId,\n disabledDueToPendingQC,\n listing?.isAdminHold,\n listing?.isUndeliv,\n ml.brdcstStatus,\n ml.errMsgs,\n ml.pendProofState,\n status,\n ]);\n\n const listingStatusCell = (\n <>\n {listing?.isAdminHold ? (\n \n ) : (\n \n )}\n \n \n \n \n );\n\n const hasVenueMapInfo = useMemo(() => {\n if (listing?.seating?.rowId) {\n return true;\n }\n\n const foundSection = venueMapQuery.data?.sections.find(\n (s) => s.name === listing?.seating.section\n );\n\n if (foundSection) {\n return true;\n }\n\n const foundOverrideSection = venueMapQuery.data?.sections.find(\n (s) => s.name === overrideSection\n );\n\n if (foundOverrideSection) {\n return true;\n }\n\n return false;\n }, [\n listing?.seating?.rowId,\n listing?.seating.section,\n overrideSection,\n venueMapQuery.data?.sections,\n ]);\n\n const errorMessages = useMemo(() => {\n let errorMessages: string[] = [];\n\n // Collect all the error messages if there are supposed to be errors\n if (hasBroadcastErrors) {\n errorMessages = error?.messages?.filter((m) => m)?.map((m) => m!) ?? [];\n\n if (ml.errCodes) {\n ml.errCodes.forEach((err) => {\n const message = getContent(\n BROADCAST_ERROR_CODE_TO_CID[err],\n contentContext\n );\n errorMessages.push(message);\n });\n }\n\n errorMessages = [...new Set(errorMessages)]; // filter out dups\n }\n\n if (\n ml.pendProofState === PendingProofState.PendingProof ||\n ml.pendProofState === PendingProofState.PendingReview\n ) {\n errorMessages.push(pendingProofErrorMessage);\n }\n\n return errorMessages;\n }, [\n contentContext,\n error?.messages,\n hasBroadcastErrors,\n ml.errCodes,\n ml.pendProofState,\n pendingProofErrorMessage,\n ]);\n\n return (\n \n \n \n \n \n {\n if (ml && !isDeleted) {\n const newStatus = isChecked\n ? ListingStatus.DelistingPending\n : ListingStatus.ListingPending;\n setListingStatus(ml.mkp!, newStatus);\n onListingBroadcastToggle(!isChecked, ml.mkp!);\n }\n }}\n />\n \n \n
    \n {errorMessages.length ? (\n \n \n {errorMessages.map((m, i) => (\n {m}\n ))}\n \n \n ) : (\n listingStatusCell\n )}\n
    \n
    \n\n \n \n {ml.mkp === Marketplace.StubHub &&\n Boolean(venueMapQuery.data?.sections?.length) &&\n !hasVenueMapInfo && (\n \n }\n >\n \n \n )}\n \n \n {overrideSection || listing?.seating.section || (\n \n )}\n \n \n }\n >\n {venueMapQuery.data?.sections?.length ? (\n {\n const id = parseInt(selectedSectionId);\n const section = venueMapQuery.data?.sections?.find(\n (s) => s.id === id\n );\n\n setValue(\n `marketplaceSeatOverrides.${formIndex}.overrideSection`,\n section?.name ?? selectedSectionId\n );\n\n if (section?.id) {\n setValue(\n `marketplaceSeatOverrides.${formIndex}.overrideSectionId`,\n section?.id\n );\n }\n\n if (hasUseSelectedRowIdFeature && overrideRow) {\n const row = section?.rows?.find(\n (r) => r.name === overrideRow\n );\n if (row?.id) {\n setValue(\n `marketplaceSeatOverrides.${formIndex}.overrideRowId`,\n row?.id\n );\n }\n }\n }}\n />\n ) : (\n \n \n \n }\n />\n )}\n \n \n \n \n \n {overrideRow || listing?.seating.row || (\n \n )}\n \n }\n >\n {selectedSection?.rows?.length ? (\n {\n const id = parseInt(rowId);\n const row = selectedSection?.rows?.find((r) => r.id === id);\n\n setValue(\n `marketplaceSeatOverrides.${formIndex}.overrideRow`,\n (row?.isSpeculative ? '' : row?.name) ?? rowId\n );\n\n if (row?.id) {\n setValue(\n `marketplaceSeatOverrides.${formIndex}.overrideRowId`,\n row?.id\n );\n }\n }}\n />\n ) : (\n \n \n \n }\n />\n )}\n \n \n \n \n {overrideSeats ||\n getSeatDisplayText({\n seatFr: listing?.seating.seatFr,\n seatTo: listing?.seating.seatTo,\n compact: true,\n }) || }\n \n }\n >\n \n \n \n }\n />\n \n \n\n \n {isListed && ml.mkpListingId ? (\n ml.mkpListingId\n ) : (\n \n )}\n \n \n );\n};\n","import { isEqual } from 'lodash-es';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogMetricsContext } from 'src/contexts/CatalogMetricsContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { SimpleTable } from 'src/core/ui';\nimport { useGetEventFullInfo } from 'src/hooks/useGetEventFullInfo';\nimport { useUserCanBroadcast } from 'src/hooks/useUserHasListingPermissions';\nimport { UK_COUNTRY_CODES } from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n compareMarketplace,\n getIsInternationalEvent,\n} from 'src/utils/eventWithDataUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ListingClient,\n ListingDetails,\n ListingMetrics,\n ListingStatus,\n Marketplace,\n MarketplaceListingStatusInfo,\n} from 'src/WebApiController';\n\nimport { MarketplaceDisplay } from './MarketplaceDisplay';\nimport * as styles from './MarketplaceDisplay.css';\nimport { MarketplaceFailure } from './useGetMarketplaceFailures';\n\nexport const MarketplaceTable = ({\n listing,\n disabled,\n marketplaceFailures,\n marketplaceListingStatus,\n setMarketplaceListingStatus,\n}: {\n listing: ListingDetails;\n disabled?: boolean;\n marketplaceFailures: MarketplaceFailure[];\n marketplaceListingStatus: Record;\n setMarketplaceListingStatus: React.Dispatch<\n React.SetStateAction>\n >;\n}) => {\n const { setActivePosEntity, updateActivePosEntityInfo } =\n useActivePosEntityContext();\n\n const { event, venue } = useGetEventFullInfo();\n\n const isUKEvent = Boolean(\n venue?.country?.code &&\n UK_COUNTRY_CODES.includes(venue.country.code.toUpperCase())\n );\n const isInternationalEvent = getIsInternationalEvent(venue?.country?.code);\n\n const { refreshMetrics } = useCatalogMetricsContext();\n\n const [isLoading, setIsLoading] = useState(false);\n\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog, trackError } = useErrorBoundaryContext();\n\n const { mkpListings } = listing;\n\n const marketplaceFailuresByMarketplace = useMemo(\n () =>\n marketplaceFailures.reduce(\n (r, c) => {\n r[c.marketplace] = c;\n return r;\n },\n {} as Record\n ),\n [marketplaceFailures]\n );\n\n // Only when the marketling-listing changed should we try to refresh the local states with it\n useEffect(() => {\n const newStatuses = mkpListings\n ?.filter((ml) => ml.mkp)\n .reduce(\n (ml, cur) => {\n ml[cur.mkp!] = cur.status;\n return ml;\n },\n {} as Record\n );\n\n if (newStatuses && !isEqual(newStatuses, marketplaceListingStatus)) {\n setMarketplaceListingStatus(newStatuses);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [mkpListings]); // We only want to run this when mkpListings changed - not the other things\n\n const onSetMarketplaceListingStatus = useCallback(\n (marketplace: Marketplace, status: ListingStatus) => {\n const newStatues = {\n ...marketplaceListingStatus,\n [marketplace]: status,\n };\n setMarketplaceListingStatus(newStatues);\n },\n [marketplaceListingStatus, setMarketplaceListingStatus]\n );\n\n const onListingBroadcastToggle = useCallback(\n (isBroadcasting: boolean, marketPlace: Marketplace) => {\n tryInvokeApi(\n async () => {\n setIsLoading(true);\n\n if (isBroadcasting) {\n await new ListingClient(\n activeAccountWebClientConfig\n ).createMarketplaceListings(listing.id, [marketPlace]);\n } else {\n await new ListingClient(\n activeAccountWebClientConfig\n ).deleteMarketplaceListings(listing.id, [marketPlace]);\n }\n },\n (error) => {\n showErrorDialog(\n isBroadcasting\n ? 'ListingClient.createMarketplaceListings'\n : 'ListingClient.deleteMarketplaceListings',\n error,\n {\n trackErrorData: {\n listingId: listing.id,\n marketPlaces: [marketPlace],\n },\n }\n );\n },\n () => setIsLoading(false)\n );\n },\n [activeAccountWebClientConfig, listing, showErrorDialog]\n );\n\n const canBroadcast = useUserCanBroadcast(listing, false);\n\n useEffect(() => {\n // If we have any Marketplace listing pending status - we need to poll to get the latest status\n const statusChecking = setInterval(async () => {\n const marketplacesInPending = Object.keys(\n marketplaceListingStatus\n ).filter(\n (marketplace) =>\n marketplaceListingStatus[marketplace as Marketplace] ===\n ListingStatus.ListingPending ||\n marketplaceListingStatus[marketplace as Marketplace] ===\n ListingStatus.DelistingPending\n );\n\n if (marketplacesInPending.length > 0 && !isLoading) {\n await tryInvokeApi(\n async () => {\n setIsLoading(true);\n\n const client = new ListingClient(activeAccountWebClientConfig);\n\n const newListing = await client.getListingStatusByListingId(\n listing.id\n );\n\n if (newListing) {\n const newMarketplaceStatuses = {} as Record<\n Marketplace,\n ListingStatus\n >;\n\n // We we get back a listing from server, it may or may not have finished the job\n // So we just have to assume the status is flowing in one direct only, ie, if we set something to pending,\n // we expect it to either finish or failed (but not reversed)\n const newMarketplaceListings = newListing.mkpListings;\n newMarketplaceListings.forEach((ml) => {\n if (ml.mkp) {\n if (\n marketplaceListingStatus[ml.mkp!] ===\n ListingStatus.DelistingPending\n ) {\n // If we are delisting-pending, set if the new status is either Delisted or DelistingFailed\n if (\n ml.status === ListingStatus.Disabled ||\n ml.status === ListingStatus.Delisted ||\n ml.status === ListingStatus.DelistingFailed\n ) {\n newMarketplaceStatuses[ml.mkp] = ml.status;\n }\n } else if (\n marketplaceListingStatus[ml.mkp!] ===\n ListingStatus.ListingPending\n ) {\n // If we are listing-pending, set if the new status is either Listed or ListedFailed\n if (\n ml.status === ListingStatus.Disabled ||\n ml.status === ListingStatus.Listed ||\n ml.status === ListingStatus.ListingFailed\n ) {\n newMarketplaceStatuses[ml.mkp] = ml.status;\n }\n }\n }\n });\n\n // Only if we do get status changes shall we try to actually update the active-item\n // provider with the latest states, or else the toggle will jump back and forth due\n // to the useEffect earlier (since we modified the active listing)\n if (Object.keys(newMarketplaceStatuses).length > 0) {\n const newStatus = {\n ...marketplaceListingStatus,\n ...newMarketplaceStatuses,\n };\n setMarketplaceListingStatus(newStatus);\n\n // Use the calculated status on the new listing obj\n newListing.mkpListings.forEach((ml) => {\n if (ml.mkp) {\n ml.status = newStatus[ml.mkp!];\n }\n });\n\n // Only stop running this if all the status is no longer pending\n clearInterval(statusChecking);\n\n let updatedListing = newListing as ListingDetails;\n\n const newMkpListings = newListing.mkpListings.reduce(\n (r, c) => {\n r[c.mkp] = c;\n return r;\n },\n {} as Record\n );\n\n updatedListing = {\n ...listing,\n ...newListing,\n // for marketplaces, we also need to merge since the MarketplaceListingStatusInfo is just a subset of the MarketplaceListing\n mkpListings:\n listing.mkpListings?.map((mkp) => ({\n ...mkp,\n ...(newMkpListings[mkp.mkp] ?? {}),\n })) ?? null,\n } as ListingDetails;\n\n refreshMetrics?.();\n updateActivePosEntityInfo({\n event: event,\n posEntity: updatedListing,\n posEntityId: newListing.id,\n posEntityDisplayId: newListing.idOnMkp,\n });\n }\n }\n },\n (error) => {\n // Because this is a background process - we don't want to show error dialog\n trackError('ListingClient.getListingByListingId', error, {\n listingId: listing.id,\n });\n },\n () => setIsLoading(false)\n );\n }\n }, 2000 /* 2 sec */);\n\n return () => clearInterval(statusChecking);\n }, [\n activeAccountWebClientConfig,\n event,\n listing,\n listing.id,\n listing.idOnMkp,\n marketplaceListingStatus,\n mkpListings,\n refreshMetrics,\n setActivePosEntity,\n updateActivePosEntityInfo,\n trackError,\n isLoading,\n setMarketplaceListingStatus,\n ]);\n\n const isDisabled = disabled || !canBroadcast;\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n {mkpListings\n ?.filter((ml) => ml.mkp && ml.mkp !== Marketplace.Offline)\n .toSorted((a, b) => compareMarketplace(a.mkp, b.mkp))\n .flatMap((ml, i) => {\n const mpListingStatus = marketplaceListingStatus[ml.mkp!];\n\n // When the UnitNetProceeds value is 0, we should prevent broadcasting\n const isDisabledWithPriceCheck =\n isDisabled ||\n (mpListingStatus === ListingStatus.Delisted &&\n listing.listPrice === 0 &&\n (ml.netProcs == null || ml.netProcs === 0));\n\n if (ml.mkp === Marketplace.StubHub) {\n return [\n {\n window.open('/redirect-uk', '_blank');\n onListingBroadcastToggle(listing, marketplace);\n }\n : onListingBroadcastToggle\n }\n error={marketplaceFailuresByMarketplace[Marketplace.StubHub]}\n qcState={listing.qcState}\n />,\n ,\n ];\n }\n\n return !isInternationalEvent\n ? [\n // We only show other marketplaces when the Event is US\n ,\n ]\n : [];\n })}\n \n \n );\n};\n","import { debounce } from 'lodash-es';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { normalizeActivityLogMessage } from 'src/utils/activityLogUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n ActionType,\n ActivityLog,\n ActivityLogClient,\n ListingDetails,\n ListingStatus,\n Marketplace,\n MarketplaceOperationResultState,\n} from 'src/WebApiController';\n\nexport type MarketplaceFailure = {\n marketplace: Marketplace;\n messages?: (string | null | undefined)[];\n};\n\nexport const useGetMarketplaceFailures = (\n listing: ListingDetails\n): MarketplaceFailure[] => {\n const hasBroadcastErrors = listing.mkpListings?.filter(\n (ml) =>\n ml.status === ListingStatus.ListingFailed ||\n ml.status === ListingStatus.DelistingFailed ||\n (ml.errMsgs != null && ml.errMsgs.length > 0)\n );\n const { activeAccountWebClientConfig } = useAppContext();\n const [isLoading, setIsLoading] = useState(false);\n const [activities, setActivities] = useState(\n undefined\n );\n const { trackError } = useErrorBoundaryContext();\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const getBroadcastErrorsForListings = useCallback(\n debounce(() => {\n tryInvokeApi(\n async () => {\n setIsLoading(true);\n\n const activities = await new ActivityLogClient(\n activeAccountWebClientConfig\n ).getActivityLogByFilter({\n entityId: listing.id,\n entityType: ActionOutboxEntityType.Listing,\n actionTypes: [\n ActionType.ListingBroadcast,\n ActionType.ListingUnbroadcast,\n ActionType.ListingMarketplaceInsert,\n ActionType.ListingMarketplaceUpdate,\n ActionType.ListingMarketplaceDelete,\n ActionType.BroadcastMarketplaceListing,\n ActionType.UnbroadcastMarketplaceListing,\n ],\n auditActionTypes: null,\n userId: '00000000-0000-0000-0000-000000000000', // we only want System\n impersonatedUserId: null,\n includeUserOnly: false,\n // This used to be 10, but sometimes if it's just one marketplace broadcast failed, and all others didn't,\n // top 10 may be all the successful ones, so to find a failure one we need at least 100\n take: 100,\n skip: 0,\n tagName: null,\n });\n\n if (activities?.length) {\n setActivities(activities);\n }\n },\n (error) => {\n trackError('ActivityLogClient.getActivityLogByFilter', error, {\n trackErrorData: {\n listingId: listing.id,\n },\n });\n },\n () => setIsLoading(false)\n );\n }, 3000),\n [activeAccountWebClientConfig, listing.id, trackError]\n );\n\n useEffect(() => {\n if (activities === undefined && hasBroadcastErrors?.length && !isLoading) {\n getBroadcastErrorsForListings();\n }\n }, [\n activities,\n getBroadcastErrorsForListings,\n hasBroadcastErrors?.length,\n isLoading,\n ]);\n\n const failuresByMarketplaces = useMemo(() => {\n let failureMessages: MarketplaceFailure[] = [];\n if (activities?.length) {\n const additionalInfos = activities.map(\n (a) => a.additionalInfo['MarketplaceSyncResult']\n );\n\n failureMessages = additionalInfos\n .filter(\n (a) =>\n a?.message?.state &&\n a.message.state !== MarketplaceOperationResultState.Succeeded\n )\n .map(\n (a) =>\n ({\n marketplace: a.message.mkp as Marketplace,\n messages: normalizeActivityLogMessage(a.message.message),\n }) as MarketplaceFailure\n );\n }\n\n if (hasBroadcastErrors?.length) {\n const broadcastErrorMessages = hasBroadcastErrors\n .filter((error) => error.errMsgs != null && error.errMsgs.length > 0)\n .map(\n (error) =>\n ({\n marketplace: error.mkp as Marketplace,\n messages: error.errMsgs,\n }) as MarketplaceFailure\n );\n failureMessages = [...failureMessages, ...broadcastErrorMessages];\n }\n\n return failureMessages;\n }, [activities, hasBroadcastErrors]);\n\n return failuresByMarketplaces;\n};\n","import { useState } from 'react';\nimport { useCallback } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { MultiDetailSection } from 'src/modals/common';\nimport { DuplicateListingSection } from 'src/modals/ListingDetails/components/DuplicateListingSection/DuplicateListingSection';\nimport { EnableNativeSyncSection } from 'src/modals/ListingDetails/components/EnableNativeSyncSection/EnableNativeSyncSection';\nimport { ProofOfPurchaseSection } from 'src/modals/ListingDetails/components/ProofOfPurchaseSection/ProofOfPurchaseSection';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ListingDetails,\n ListingStatus,\n Marketplace,\n} from 'src/WebApiController';\nimport { Feature, ListingClient } from 'src/WebApiController';\n\nimport { MarketplaceTable } from './MarketplaceTable';\nimport { useGetMarketplaceFailures } from './useGetMarketplaceFailures';\n\nexport const MarketplaceBroadcastSection = ({\n listing,\n disabled,\n setLoading,\n}: {\n listing: ListingDetails;\n disabled?: boolean;\n setLoading: (nextValue: boolean) => void;\n}) => {\n const [ignoreDup, setIgnoreDup] = useState(listing?.ignoreDup ?? false);\n\n const { showErrorDialog } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n const marketplaceFailures = useGetMarketplaceFailures(listing);\n const hasIgnoreDupFeature = useUserHasFeature(Feature.IgnoreDuplicate);\n\n // We need to keep a local state of the listing status so we can use this to reflect the listing toggle and status when user clicks\n // otherwise we have to wait until the status is updated in the server before the UI shows the updates\n // However, mainting this local state in sync with the server is a bit nuanced - do be care of changing this logic\n const [marketplaceListingStatus, setMarketplaceListingStatus] = useState<\n Record\n >(\n // Initialized this state to what the current market listing status is\n listing.mkpListings\n ?.filter((ml) => ml.mkp)\n .reduce(\n (ml, cur) => {\n ml[cur.mkp!] = cur.status;\n return ml;\n },\n {} as Record\n ) ?? ({} as Record)\n );\n\n const handleIgnoreDuplicateClick = useCallback(\n async (isChecked: boolean) => {\n setLoading(true);\n setIgnoreDup(isChecked);\n tryInvokeApi(\n async () => {\n const client = new ListingClient(activeAccountWebClientConfig);\n const success = await client.updateListingIgnoreDuplicate(\n listing?.id,\n isChecked\n );\n\n if (!success) {\n setIgnoreDup(!isChecked);\n } else if (listing) {\n refreshExpandedListItems();\n\n const unbroadcastResult = await client.deleteMarketplaceListings(\n listing.id,\n []\n );\n if (unbroadcastResult) {\n const newStatuses = Object.keys(marketplaceListingStatus).reduce(\n (acc, marketplace) => {\n acc[marketplace as Marketplace] = ListingStatus.Delisted;\n return acc;\n },\n {} as Record\n );\n setMarketplaceListingStatus(newStatuses);\n }\n }\n },\n (error) => {\n showErrorDialog('ListingClient.updateListingIgnoreDuplicate', error, {\n trackErrorData: { ListingId: listing?.id },\n });\n },\n () => {\n setLoading(false);\n }\n );\n },\n [\n activeAccountWebClientConfig,\n listing,\n marketplaceListingStatus,\n refreshExpandedListItems,\n setLoading,\n showErrorDialog,\n ]\n );\n\n const isDuplicate =\n !!listing?.dupListingId && (!hasIgnoreDupFeature || !ignoreDup);\n\n const isDisabled = disabled || isDuplicate;\n\n const sections = [\n ,\n ,\n ,\n ];\n\n return (\n <>\n }\n extraContent={sections}\n >\n \n \n \n );\n};\n","import { FormProvider } from 'react-hook-form';\nimport { ListingDetails } from 'src/WebApiController';\n\nimport { useListingDetailsContext } from '../../ListingDetailsModalV2Context';\nimport { AdminHoldNotesSection } from './AdminHoldNotes';\nimport { MarketplaceBroadcastSection } from './MarketplaceBroadcastSection';\n\ntype ListingDetailsBroadcastFormProps = {\n listing: ListingDetails;\n};\n\nexport const ListingDetailsBroadcastForm: React.FC<\n ListingDetailsBroadcastFormProps\n> = ({ listing }) => {\n const { methods, isLoading, setLoading } = useListingDetailsContext();\n\n return (\n \n \n {listing?.isAdminHold && }\n \n );\n};\n","import { isEqual } from 'lodash-es';\nimport { useCallback, useEffect, useMemo } from 'react';\nimport { useForm } from 'react-hook-form';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { isSuccess } from 'src/utils/errorUtils';\nimport { compareMarketplace } from 'src/utils/eventWithDataUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ListingClient,\n ListingDetailDataField,\n ListingDetails,\n ListingDetailsBroadcastSectionUpdates,\n Marketplace,\n} from 'src/WebApiController';\n\nconst getListingDetailsBroadcastInput = (\n listing: ListingDetails | null | undefined\n): ListingDetailsBroadcastSectionUpdates => {\n return {\n id: listing?.id ?? 0,\n rowVersion: null,\n adminHoldNotes: listing?.adminHoldNotes ?? null,\n enableNativeSync: listing?.enableNativeSync ?? null,\n marketplaceSeatOverrides:\n listing?.mkpListings\n ?.filter((m) => m.mkp && m.mkp !== Marketplace.Offline)\n ?.toSorted((a, b) => compareMarketplace(a.mkp, b.mkp))\n ?.map((m) => ({\n marketplace: m.mkp,\n overrideSection: m.overrideSection,\n overrideRow: m.overrideRow,\n overrideSeats: m.overrideSeats,\n overrideRowId: m.overrideRowId,\n overrideSectionId: m.overrideSectionId,\n })) ?? [],\n };\n};\n\nexport const useBroadcastForm = (\n listing: ListingDetails | null | undefined,\n onSubmitStart: () => void,\n onSubmitDone: (success?: boolean) => Promise\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n const methods = useForm({\n defaultValues: listing?.dataIsLoaded[ListingDetailDataField.Basic]\n ? getListingDetailsBroadcastInput(listing)\n : undefined,\n });\n\n useEffect(() => {\n if (\n methods.formState.defaultValues == null &&\n listing?.dataIsLoaded[ListingDetailDataField.Basic]\n ) {\n methods.reset(getListingDetailsBroadcastInput(listing));\n }\n }, [methods, listing]);\n\n const onSubmitHandler = useCallback(\n async (broadcastSectionForm: ListingDetailsBroadcastSectionUpdates) => {\n tryInvokeApi(\n async () => {\n onSubmitStart();\n const result = await new ListingClient(\n activeAccountWebClientConfig\n ).updateListingBroadcastSection(broadcastSectionForm);\n\n if (isSuccess(result)) {\n // Reset the form to latest changed\n methods.reset(broadcastSectionForm);\n await onSubmitDone();\n } else {\n showErrorDialog(\n 'ListingClient.updateListingBroadcastSection',\n { message: result.message, status: result.status },\n {\n trackErrorData: {\n broadcastSectionForm,\n },\n }\n );\n }\n },\n (error) => {\n showErrorDialog(\n 'ListingClient.updateListingBroadcastSection',\n error,\n {\n trackErrorData: broadcastSectionForm,\n }\n );\n },\n () => {\n onSubmitDone(false);\n }\n );\n },\n [\n activeAccountWebClientConfig,\n methods,\n onSubmitDone,\n onSubmitStart,\n showErrorDialog,\n ]\n );\n\n const onSubmit = useCallback(() => {\n methods.handleSubmit(onSubmitHandler)();\n }, [methods, onSubmitHandler]);\n\n const onReset = useCallback(() => {\n methods.reset(getListingDetailsBroadcastInput(listing));\n }, [listing, methods]);\n\n const input = methods.watch();\n\n const hasChanges = useMemo(() => {\n const defaultValues = methods.formState.defaultValues;\n return (\n input.adminHoldNotes !== defaultValues?.adminHoldNotes ||\n input.enableNativeSync !== defaultValues?.enableNativeSync ||\n !isEqual(\n input.marketplaceSeatOverrides,\n defaultValues?.marketplaceSeatOverrides\n )\n );\n }, [input, methods.formState.defaultValues]);\n\n return {\n hasChanges,\n methods,\n onSubmit,\n onReset,\n };\n};\n","export enum KnownVendors {\n StubHub = 'StubHub',\n Ticketmaster = 'TicketMaster',\n TicketmasterCa = 'Ticketmaster CA',\n Axs = 'AXS',\n Eventbrite = 'Eventbrite',\n Livenation = 'Livenation',\n BroadwayDotCom = 'broadway.com',\n Telecharge = 'Telecharge',\n Ticketon = 'Ticketon',\n Seetickets = 'Seetickets',\n Etix = 'Etix',\n Tixr = 'Tixr',\n Festicket = 'Festicket',\n Insomniac = 'Insomniac',\n DiceImport = 'Dice Import',\n MgmResorts = 'MGM Resorts',\n Tickeri = 'Tickeri',\n SmithCenterImport = 'Smith Center Import',\n Stubwire = 'Stubwire',\n Computicket = 'Computicket',\n}\n","import { vars } from 'src/core/themes';\nimport { Marketplace } from 'src/WebApiController';\n\nimport { KnownVendors } from './knownVendors';\n\nexport const MARKETPLACE_TO_BACKGROUND_COLOR: Record = {\n [Marketplace.StubHub]: vars.color.marketplaceBackgroundStubhub,\n [Marketplace.AXS]: vars.color.marketplaceBackgroundAxs,\n [Marketplace.SeatGeek]: vars.color.marketplaceBackgroundSeatgeek,\n [Marketplace.VividSeats]: vars.color.marketplaceBackgroundVivid,\n [Marketplace.Ticketmaster]: vars.color.marketplaceBackgroundTicketMaster,\n [Marketplace.TickPick]: vars.color.marketplaceBackgroundTickPick,\n [Marketplace.Offline]: vars.color.marketplaceBackgroundOffline,\n [Marketplace.FanXchange]: vars.color.marketplaceBackgroundFanXchange,\n [Marketplace.Gametime]: vars.color.marketplaceBackgroundGametime,\n [Marketplace.TicketEvolution]:\n vars.color.marketplaceBackgroundTicketEvolution,\n [Marketplace.TicketNetwork]: vars.color.marketplaceBackgroundTicketNetwork,\n [Marketplace.Automatiq]: vars.color.marketplaceBackgroundAutomatiq,\n};\n\nexport const MARKETPLACE_TO_TEXT_COLOR: Record = {\n [Marketplace.SeatGeek]: vars.color.marketplaceTextSeatgeek,\n [Marketplace.FanXchange]: vars.color.marketplaceTextFanXchange,\n [Marketplace.Automatiq]: vars.color.marketplaceTextAutomatiq,\n};\n\nexport const KNOWNVENDOR_TO_BACKGROUND_COLOR: Record = {\n [KnownVendors.TicketmasterCa]: vars.color.marketplaceBackgroundTicketmasterCa,\n [KnownVendors.Eventbrite]: vars.color.marketplaceBackgroundEventbrite,\n [KnownVendors.Livenation]: vars.color.marketplaceBackgroundLivenation,\n [KnownVendors.BroadwayDotCom]: vars.color.marketplaceBackgroundBroadwayDotCom,\n [KnownVendors.Telecharge]: vars.color.marketplaceBackgroundTelecharge,\n [KnownVendors.Ticketon]: vars.color.marketplaceBackgroundTicketon,\n [KnownVendors.Seetickets]: vars.color.marketplaceBackgroundSeetickets,\n [KnownVendors.Etix]: vars.color.marketplaceBackgroundEtix,\n [KnownVendors.Tixr]: vars.color.marketplaceBackgroundTixr,\n [KnownVendors.Festicket]: vars.color.marketplaceBackgroundFesticket,\n [KnownVendors.Insomniac]: vars.color.marketplaceBackgroundInsomniac,\n [KnownVendors.DiceImport]: vars.color.marketplaceBackgroundDiceImport,\n [KnownVendors.MgmResorts]: vars.color.marketplaceBackgroundMgmResorts,\n [KnownVendors.Tickeri]: vars.color.marketplaceBackgroundTickeri,\n [KnownVendors.SmithCenterImport]:\n vars.color.marketplaceBackgroundSmithCenterImport,\n [KnownVendors.Stubwire]: vars.color.marketplaceBackgroundStubwire,\n [KnownVendors.Computicket]: vars.color.marketplaceBackgroundComputicket,\n};\n\nexport const KNOWNVENDOR_TO_TEXT_COLOR: Record = {\n [KnownVendors.Eventbrite]: vars.color.marketplaceTextEventbrite,\n [KnownVendors.Livenation]: vars.color.marketplaceTextLivenation,\n [KnownVendors.Ticketon]: vars.color.marketplaceTextTicketon,\n [KnownVendors.Etix]: vars.color.marketplaceTextEtix,\n [KnownVendors.Festicket]: vars.color.marketplaceTextFesticket,\n [KnownVendors.MgmResorts]: vars.color.marketplaceTextMgmResorts,\n [KnownVendors.Tickeri]: vars.color.marketplaceTextTickeri,\n [KnownVendors.Stubwire]: vars.color.marketplaceTextStubwire,\n};\n\n/**\n * Function to map brand names to background colors.\n * If we have pre-defined color mappings for brands in `MARKETPLACE_TO_BACKGROUND_COLOR`,\n * simply return the corresponding color.\n * If we don't have a mapping for the brand name, we convert the string to a\n * certain hash and get the corresponding color. Hashing ensures that we get the\n * same color for the same brand name (case insensitive)\n * @param str name for brand\n * @returns color string for the brand\n */\nexport function mapBrandNameToBackgroundcolor(\n str: string | Marketplace | KnownVendors\n): string {\n const marketplaceValue = Object.values(Marketplace).find(\n (m) => m.toString().toLocaleLowerCase() === str.toLocaleLowerCase()\n );\n\n if (marketplaceValue) {\n if (MARKETPLACE_TO_BACKGROUND_COLOR[marketplaceValue] != null) {\n return MARKETPLACE_TO_BACKGROUND_COLOR[marketplaceValue];\n }\n }\n\n const knownVendorValue = Object.values(KnownVendors).find(\n (m) => m.toString().toLocaleLowerCase() === str.toLocaleLowerCase()\n );\n\n if (knownVendorValue) {\n if (KNOWNVENDOR_TO_BACKGROUND_COLOR[knownVendorValue] != null) {\n return KNOWNVENDOR_TO_BACKGROUND_COLOR[knownVendorValue];\n }\n }\n\n // Fallback for colors without a mapping.\n // For missing color for brands, we need to ask Design for a new color\n if (str.length === 0) return vars.color.textBrand;\n str = str.toLocaleLowerCase();\n\n let hash = 0;\n for (let i = 0; i < str.length; i++) {\n hash = str.charCodeAt(i) + ((hash << 5) - hash);\n hash = hash & hash;\n }\n let color = '#';\n for (let i = 0; i < 3; i++) {\n // Using value [0, 128] to ensure color is dark\n const value = (hash >> (i * 8)) & (255 / 2);\n color += ('00' + value.toString(16)).slice(-2);\n }\n return color;\n}\n\nexport function mapBrandNameToTextcolor(\n str: string | Marketplace | KnownVendors\n): string {\n const marketplaceValue = Object.values(Marketplace).find(\n (m) => m.toString().toLocaleLowerCase() === str.toLocaleLowerCase()\n );\n\n if (marketplaceValue) {\n if (MARKETPLACE_TO_TEXT_COLOR[marketplaceValue] != null) {\n return MARKETPLACE_TO_TEXT_COLOR[marketplaceValue];\n }\n }\n\n const knownVendorValue = Object.values(KnownVendors).find(\n (m) => m.toString().toLocaleLowerCase() === str.toLocaleLowerCase()\n );\n\n if (knownVendorValue) {\n if (KNOWNVENDOR_TO_TEXT_COLOR[knownVendorValue] != null) {\n return KNOWNVENDOR_TO_TEXT_COLOR[knownVendorValue];\n }\n }\n\n return vars.color.marketplaceTextDefault;\n}\n","import { useQuery } from '@tanstack/react-query';\nimport * as Highcharts from 'highcharts';\nimport HighchartsReact from 'highcharts-react-official';\nimport { useMemo, useRef } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useContent } from 'src/contexts/ContentContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { vars } from 'src/core/themes';\nimport { MARKETPLACE_TO_BACKGROUND_COLOR } from 'src/utils/constants/colorMaps';\nimport { DATA_REFRESH_RATE_IN_MILLIS_FAST } from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n ListingClient,\n ListingDetails,\n ListingStatus,\n Marketplace,\n} from 'src/WebApiController';\n\nimport * as styles from './HistoricalPricingGraph.css';\n\nexport const HistoricalPricingGraph = ({\n listing,\n}: {\n listing: ListingDetails;\n}) => {\n const { mkpListings, id: listingId } = listing;\n\n const historicalPricingText = useContent(ContentId.HistoricalPricing);\n const priceText = useContent(ContentId.Price);\n const { trackError } = useErrorBoundaryContext();\n\n const containerRef = useRef(null);\n\n const { activeAccountWebClientConfig } = useAppContext();\n\n const historicalPricingResult = useQuery({\n queryKey: ['ListingClient.getPriceHistoryByListingId', listingId],\n queryFn: () => {\n if (activeAccountWebClientConfig.activeAccountId == null) {\n return null;\n }\n return new ListingClient(\n activeAccountWebClientConfig\n ).getPriceHistoryByListingId({\n item1: listingId,\n item2: 1,\n });\n },\n\n enabled: activeAccountWebClientConfig.activeAccountId != null,\n staleTime: Infinity, // Since we're always refetching on an interval, we don't want query to calculate whether the data is stale\n refetchOnWindowFocus: false,\n networkMode: 'offlineFirst',\n meta: {\n onError: (error: ErrorTypes) => {\n trackError('ListingClient.getPriceHistoryByListingId', error, {\n listingId,\n });\n },\n },\n refetchInterval: DATA_REFRESH_RATE_IN_MILLIS_FAST,\n });\n\n const marketplacesBroadcasted = useMemo(\n () =>\n mkpListings\n ?.filter((ml) => ml.mkp && ml.status === ListingStatus.Listed)\n .map((ml) => ml.mkp!),\n [mkpListings]\n );\n\n const currencyCode = useMemo(() => {\n const { data } = historicalPricingResult;\n if (!data) return;\n return data[0]?.unitNetProceeds.currency;\n }, [historicalPricingResult]);\n\n const { getUiCurrency } = useLocalizationContext();\n const uiCurrency = getUiCurrency(currencyCode);\n\n const dataAsTuples = useMemo(() => {\n const { data } = historicalPricingResult;\n if (!data) return;\n\n const massagedData = data.reduce<{\n [marketplace: string]: Highcharts.SeriesOptionsType & {\n data: [number, number][];\n };\n }>((acc, current) => {\n const { marketplace, priceDate, unitNetProceeds } = current;\n if (!marketplace) return acc;\n\n const marketplaceColor = MARKETPLACE_TO_BACKGROUND_COLOR[marketplace];\n const isListed = marketplacesBroadcasted?.includes(marketplace);\n const item = acc[marketplace] ?? {\n data: [],\n type: 'line',\n name: marketplace,\n color: marketplaceColor,\n opacity: isListed ? 1 : 0.35,\n marker: {\n lineColor: marketplaceColor,\n },\n visible: marketplace === Marketplace.StubHub,\n };\n item.data.push([new Date(priceDate).getTime(), unitNetProceeds.amt]);\n acc[marketplace] = item;\n return acc;\n }, {});\n\n return Object.values(massagedData);\n }, [historicalPricingResult, marketplacesBroadcasted]);\n\n const options: Highcharts.Options = {\n chart: {\n zooming: { type: 'x' },\n width: 0.9 * (containerRef.current?.clientWidth ?? 500),\n },\n title: {\n text: historicalPricingText,\n align: 'left',\n },\n xAxis: { type: 'datetime' },\n yAxis: {\n title: { text: priceText },\n labels: { format: `${uiCurrency.sym}{text}` },\n },\n legend: { enabled: true },\n plotOptions: {\n line: {\n color: vars.color.backgroundBrandActive,\n marker: {\n radius: 4,\n lineColor: vars.color.backgroundBrandHover,\n fillColor: '#fff',\n lineWidth: 2,\n },\n lineWidth: 2,\n threshold: null,\n },\n series: {\n animation: false,\n },\n },\n series: dataAsTuples,\n // Watermark\n credits: { enabled: false },\n };\n\n const chartComponentRef = useRef(null);\n\n return dataAsTuples?.length ? (\n
    \n \n
    \n ) : null;\n};\n","import { Content } from 'src/contexts/ContentContext';\nimport { DetailGroup, DetailSection, SectionContent } from 'src/modals/common';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ListingDetails } from 'src/WebApiController';\n\nimport { HistoricalPricingGraph } from './HistoricalPricingGraph/HistoricalPricingGraph';\n\nexport const HistoricalPricingGraphSection = ({\n listing,\n}: {\n listing: ListingDetails;\n}) => {\n return (\n }>\n \n \n \n \n \n \n );\n};\n","import { ChangeEvent, useCallback } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { getTextFieldState } from 'src/core/POS/PosTextField';\nimport { Radio, RadioGroup } from 'src/core/ui';\nimport { Stack } from 'src/core/ui';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport { DetailGroup, DetailSection, SectionContent } from 'src/modals/common';\nimport {\n PRICE_FLOOR_CEILING_MODE_OPTIONS,\n PriceFloorCeilingMode,\n} from 'src/utils/autoPricingUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n getAllInPriceFromListPrice,\n getListPriceFromAllinPrice,\n} from 'src/utils/inventoryUtils';\nimport {\n AutoPricingCompListingMode,\n ListingDetails,\n ListingDetailsAutoPricingSectionUpdates,\n Marketplace,\n UserSetting,\n} from 'src/WebApiController';\n\nimport { useAutoPricingSettings } from '../useAutoPricingSettings';\nimport * as styles from './PricingSection.css';\n\nexport const PricingProtection = ({\n listing,\n disabled,\n}: {\n listing?: ListingDetails | null;\n disabled?: boolean;\n}) => {\n const { setValue, watch, clearErrors, formState } =\n useFormContext();\n\n const { loginContext } = useAppContext();\n const stubHubMkpSettings =\n loginContext?.user?.activeAccount?.marketplaceSettings?.find(\n (m) => m.mkp === Marketplace.StubHub\n );\n\n const netProceedsFloor = watch('netProceedsFloor');\n const netProceedsCeiling = watch('netProceedsCeiling');\n\n const floorError = formState.errors.netProceedsFloor?.message;\n const ceilingError = formState.errors.netProceedsCeiling?.message;\n\n const { canSetPrice, autoPricingEnabled, uiCurrency, compListingMode } =\n useAutoPricingSettings(listing);\n\n const priceProtectionDisabled =\n disabled ||\n listing?.isDeleted ||\n !canSetPrice ||\n Boolean(\n autoPricingEnabled &&\n compListingMode === AutoPricingCompListingMode.ParentListing\n );\n\n const { value: priceFloorMode, setUserSetting: setPriceFloorMode } =\n useServerUserSetting({\n id: UserSetting.PriceFloorCeilingMode,\n currentLoginUserOnly: true,\n });\n\n const onPriceFloorChange = useCallback(\n (e: ChangeEvent) => {\n const v = parseFloat(e.target.value);\n if (v >= 0 && v < Number.MAX_VALUE) {\n if (netProceedsCeiling && v < netProceedsCeiling) {\n clearErrors('netProceedsFloor');\n }\n\n let newV = v;\n if (priceFloorMode === PriceFloorCeilingMode.Website) {\n // If we're editing in WebSite mode, we need to convert it to proceeds\n newV = getListPriceFromAllinPrice(\n v,\n listing,\n stubHubMkpSettings?.sellerFee\n )!;\n }\n\n setValue('netProceedsFloor', newV);\n } else {\n setValue('netProceedsFloor', null);\n }\n },\n [\n clearErrors,\n netProceedsCeiling,\n priceFloorMode,\n setValue,\n listing,\n stubHubMkpSettings?.sellerFee,\n ]\n );\n\n const onPriceCeilingChange = useCallback(\n (e: ChangeEvent) => {\n const v = parseFloat(e.target.value);\n if (v >= 0 && v <= Number.MAX_VALUE) {\n if (netProceedsFloor && v > netProceedsFloor) {\n clearErrors('netProceedsCeiling');\n }\n\n let newV = v;\n if (priceFloorMode === PriceFloorCeilingMode.Website) {\n // If we're editing in WebSite mode, we need to convert it to proceeds\n newV = getListPriceFromAllinPrice(\n v,\n listing,\n stubHubMkpSettings?.sellerFee\n )!;\n }\n\n setValue('netProceedsCeiling', newV);\n } else {\n setValue('netProceedsCeiling', null);\n }\n },\n [\n clearErrors,\n netProceedsFloor,\n priceFloorMode,\n setValue,\n listing,\n stubHubMkpSettings?.sellerFee,\n ]\n );\n\n return (\n <>\n }>\n \n \n }>\n \n \n {PRICE_FLOOR_CEILING_MODE_OPTIONS.map((m) => (\n \n ))}\n \n \n \n \n\n \n \n
    \n \n
    \n \n \n \n
    \n \n
    \n \n \n \n
    \n
    \n
    \n
    \n \n );\n};\n","import { formatInTimeZone } from 'date-fns-tz';\nimport { createRef, useCallback, useEffect, useMemo, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { MarketplaceLogo } from 'src/components/common/MarketplaceLogo';\nimport { ListingPriceInput } from 'src/components/Input/ListingPriceInput';\nimport { SellerAccountEmployeeSelector } from 'src/components/Selectors/SellerAccountEmployeeSelector';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogMetricsContext } from 'src/contexts/CatalogMetricsContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { useSiteTimezoneContext } from 'src/contexts/SiteTimezoneContext/SiteTimezoneContext';\nimport { Switch } from 'src/core/interim/Switch';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { SimpleTable } from 'src/core/ui';\nimport {\n Alert,\n AlertWithSuppressionDialog,\n useManualPriceDisableAutoPricingDialog,\n} from 'src/dialogs/AlertWithSuppressionDialog';\nimport { useManualPriceAdjustFloorOrCeilingDialog } from 'src/dialogs/AlertWithSuppressionDialog/useManualPriceAdjustFloorOrCeilingDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useGetEventFullInfo } from 'src/hooks/useGetEventFullInfo';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { useUserCanSetPrice } from 'src/hooks/useUserHasListingPermissions';\nimport {\n Detail,\n DetailGroup,\n DetailSection,\n SectionContent,\n} from 'src/modals/common';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { isDatePassedHours } from 'src/utils/dateTimeUtils';\nimport {\n compareMarketplace,\n getIsInternationalEvent,\n} from 'src/utils/eventWithDataUtils';\nimport { getLocaleFromLanguageOrCurrent } from 'src/utils/localeUtils';\nimport { roundToPrecision } from 'src/utils/numberFormatter';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ListingClient,\n ListingDetailDataField,\n ListingDetails,\n ListingDetailsPricingSectionUpdates,\n ListingMetrics,\n ListingStatus,\n Marketplace,\n Permission,\n} from 'src/WebApiController';\n\nimport * as styles from './EconomicsSection.css';\n\ntype EconomicsSectionProps = {\n listing?: ListingDetails | null;\n disabled?: boolean;\n};\n\nexport const EconomicsSection = ({\n listing,\n disabled,\n}: EconomicsSectionProps) => {\n const { timeZone } = useSiteTimezoneContext();\n const isListed =\n listing?.status === ListingStatus.Listed ||\n listing?.status === ListingStatus.ListingPending;\n\n const { activeAccountWebClientConfig, loginContext } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n const { setActivePosEntity } = useActivePosEntityContext();\n const { getUiCurrency } = useLocalizationContext();\n const uiCurrency = useMemo(\n () =>\n getUiCurrency(\n listing?.currency ??\n loginContext?.user?.activeAccount?.currencyCode ??\n 'USD'\n ),\n [\n getUiCurrency,\n listing?.currency,\n loginContext?.user?.activeAccount?.currencyCode,\n ]\n );\n const canChangePricer = useUserHasAnyOfPermissions(\n Permission.Inventory_SetPrice\n );\n const { refreshMetrics } = useCatalogMetricsContext();\n\n const { watch, setValue, register, getValues, formState } =\n useFormContext();\n\n const listPrice = watch('listPrice');\n const marketplacePriceUpdates = watch('marketplacePriceUpdates');\n const autoPricingEnabled = watch('autoPricingEnabled');\n const netProceedsFloor = watch('netProceedsFloor');\n const netProceedsCeiling = watch('netProceedsCeiling');\n const pricerSellerUserId = watch('pricerSellerUserId');\n const canSetPrice = useUserCanSetPrice(listing, false);\n\n const onUnbroadcast = useCallback(() => {\n if (!listing) {\n return;\n }\n tryInvokeApi(\n async () => {\n const client = new ListingClient(activeAccountWebClientConfig);\n\n const result = await client.deleteMarketplaceListings(listing.id, []);\n if (result) {\n refreshMetrics?.();\n\n // Refresh the active data so the SaleDetail dialog and table will have the new content\n await setActivePosEntity(listing.id, listing.idOnMkp, true, [\n ListingDetailDataField.Basic,\n ]);\n }\n },\n (error) => {\n showErrorDialog('ListingClient.deleteMarketplaceListings', error, {\n trackErrorData: {\n listingId: listing.id,\n marketplaceListingID: listing.idOnMkp,\n },\n });\n }\n );\n }, [\n activeAccountWebClientConfig,\n listing,\n refreshMetrics,\n setActivePosEntity,\n showErrorDialog,\n ]);\n\n const thirdPartyMPs = (\n listing?.mkpListings?.map(\n ({ mkp, markup, sellerAccountDefaultMarkup, sellerFee }) => ({\n mkp,\n markup,\n sellerAccountDefaultMarkup:\n sellerAccountDefaultMarkup != null\n ? roundToPrecision(sellerAccountDefaultMarkup * 100, 2)\n : null,\n sellerFee,\n })\n ) ??\n loginContext?.user?.activeAccount?.marketplaceSettings?.map(\n ({ mkp, markup, sellerFee }) => ({\n mkp,\n markup,\n sellerAccountDefaultMarkup: markup,\n sellerFee,\n })\n ) ??\n []\n )\n .filter((ml) => ml.mkp)\n .reduce(\n (r, m) => {\n r[m.mkp!] = m;\n return r;\n },\n {} as Record<\n Marketplace,\n {\n mkp: Marketplace;\n markup: number | null;\n sellerAccountDefaultMarkup: number | null;\n sellerFee: number | null;\n }\n >\n );\n const stubHubMarketplace = thirdPartyMPs[Marketplace.StubHub];\n\n const isDisabled = useMemo(() => {\n if (disabled || !canSetPrice) return true;\n // Bulk edit mode should not disable the section\n if (!listing) return false;\n if (listing.isDeleted) return true;\n\n return false;\n }, [disabled, canSetPrice, listing]);\n\n const { event, venue } = useGetEventFullInfo(null);\n\n const isInternationalEvent = getIsInternationalEvent(venue?.country?.code);\n\n const warningDialog = useBasicDialog();\n\n const manualPriceDisableAutoPricingProps =\n useManualPriceDisableAutoPricingDialog(() => {\n setValue('autoPricingEnabled', false);\n });\n\n const marketplacePrices = marketplacePriceUpdates\n .filter((m) => m.priceByMarketplace)\n .map((m) => m.listPrice);\n const allListPrices = useMemo(() => {\n const p = [listPrice, ...marketplacePrices]\n .filter((n) => n != null)\n .map((n) => n!);\n\n return p;\n }, [listPrice, marketplacePrices]);\n\n const smallestListPrice = useMemo(\n () => Math.min(...allListPrices.filter((l) => l > 0)),\n [allListPrices]\n );\n const largestListPrice = useMemo(\n () => Math.max(...allListPrices.filter((l) => l > 0)),\n [allListPrices]\n );\n const manualPriceAdjustFloorProps = useManualPriceAdjustFloorOrCeilingDialog(\n smallestListPrice,\n netProceedsFloor,\n netProceedsCeiling,\n () => {\n if (smallestListPrice < (netProceedsFloor ?? Number.MIN_VALUE)) {\n setValue('netProceedsFloor', smallestListPrice);\n }\n },\n () => {\n if (\n listPrice != null &&\n listPrice > 0 &&\n listPrice < (netProceedsFloor ?? Number.MIN_VALUE)\n ) {\n setValue('listPrice', netProceedsFloor);\n }\n\n marketplacePriceUpdates.forEach((m, i) => {\n if (m.priceByMarketplace && m.listPrice != null && m.listPrice > 0) {\n if (m.listPrice < (netProceedsFloor ?? 0)) {\n setValue(\n `marketplacePriceUpdates.${i}.listPrice`,\n netProceedsFloor\n );\n }\n }\n });\n }\n );\n\n const manualPriceAdjustCeilingProps =\n useManualPriceAdjustFloorOrCeilingDialog(\n largestListPrice,\n netProceedsFloor,\n netProceedsCeiling,\n () => {\n if (largestListPrice > (netProceedsCeiling ?? Number.MAX_VALUE)) {\n setValue('netProceedsCeiling', largestListPrice);\n }\n },\n () => {\n if (\n listPrice != null &&\n listPrice > 0 &&\n listPrice > (netProceedsCeiling ?? Number.MAX_VALUE)\n ) {\n setValue('listPrice', netProceedsCeiling);\n }\n\n marketplacePriceUpdates.forEach((m, i) => {\n if (m.priceByMarketplace && m.listPrice != null && m.listPrice > 0) {\n if (m.listPrice > (netProceedsCeiling ?? Number.MAX_VALUE)) {\n setValue(\n `marketplacePriceUpdates.${i}.listPrice`,\n netProceedsCeiling\n );\n }\n }\n });\n }\n );\n\n const [alerts, setAlerts] = useState([]);\n const rowsCount = marketplacePriceUpdates.length + 1;\n const [inputRefsArray] = useState(() =>\n Array.from({ length: rowsCount }, () => createRef())\n );\n const [focusedInputIndex, setFocusedInputIndex] = useState(0);\n\n const getFloorAlerts = useCallback((): Alert[] => {\n if (smallestListPrice < (netProceedsFloor ?? Number.MIN_VALUE)) {\n if (isDatePassedHours(manualPriceAdjustFloorProps.lastTimeStamp, 1)) {\n return [manualPriceAdjustFloorProps];\n }\n }\n return [];\n }, [manualPriceAdjustFloorProps, netProceedsFloor, smallestListPrice]);\n\n const getCeilingAlerts = useCallback((): Alert[] => {\n if (largestListPrice > (netProceedsCeiling ?? Number.MAX_VALUE)) {\n if (isDatePassedHours(manualPriceAdjustCeilingProps.lastTimeStamp, 1)) {\n return [manualPriceAdjustCeilingProps];\n }\n }\n return [];\n }, [largestListPrice, manualPriceAdjustCeilingProps, netProceedsCeiling]);\n const getAutoPriceAlerts = useCallback((): Alert[] => {\n if (\n autoPricingEnabled &&\n isDatePassedHours(manualPriceDisableAutoPricingProps.lastTimeStamp, 1)\n ) {\n return [manualPriceDisableAutoPricingProps];\n }\n return [];\n }, [autoPricingEnabled, manualPriceDisableAutoPricingProps]);\n\n const onPriceChanged = useCallback(() => {\n if (listPrice === formState?.defaultValues?.listPrice) {\n return;\n }\n const newAlerts = [\n ...getFloorAlerts(),\n ...getCeilingAlerts(),\n ...getAutoPriceAlerts(),\n ];\n\n if (newAlerts.length) {\n setAlerts(newAlerts);\n warningDialog.launchDialog();\n }\n }, [\n listPrice,\n formState?.defaultValues?.listPrice,\n getFloorAlerts,\n getCeilingAlerts,\n getAutoPriceAlerts,\n warningDialog,\n ]);\n\n const onPriceEdit = useCallback(\n (newPrice: number, priceByMarketplaceEnabled: boolean, idx: number) => {\n if (listPrice) {\n const newMarkup = (newPrice - listPrice) / listPrice;\n\n if (priceByMarketplaceEnabled) {\n setValue(\n `marketplacePriceUpdates.${idx}.markup`,\n roundToPrecision(newMarkup * 100, 2)\n );\n onPriceChanged();\n }\n }\n },\n [listPrice, onPriceChanged, setValue]\n );\n\n const handleEnter = (index: number) => {\n let nextIndex = 0;\n for (let i = index + 1; i < rowsCount; i++) {\n // find next enabled\n if (marketplacePriceUpdates[i - 1]?.priceByMarketplace) {\n nextIndex = i;\n break;\n }\n }\n const nextInput = inputRefsArray?.[nextIndex]?.current;\n if (nextInput) {\n nextInput.focus();\n setFocusedInputIndex(() => nextIndex);\n }\n onPriceChanged();\n };\n\n useEffect(() => {\n if (isDisabled) return;\n const nextInput = inputRefsArray?.[focusedInputIndex]?.current;\n if (nextInput) {\n setTimeout(() => {\n nextInput.focus();\n nextInput.select();\n }, 100);\n }\n }, [isDisabled, focusedInputIndex, inputRefsArray]);\n\n return (\n }>\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n onPriceChanged()}\n onEnter={() => handleEnter(0)}\n />\n \n \n onPriceChanged()}\n onEnter={() => handleEnter(0)}\n />\n \n \n {!isInternationalEvent &&\n // We only show other marketplaces when the Event is US\n marketplacePriceUpdates\n .filter((mp) => mp.marketplace !== Marketplace.StubHub)\n .toSorted((a, b) =>\n compareMarketplace(a.marketplace, b.marketplace)\n )\n .map((mp, i) => {\n const ml = thirdPartyMPs[mp.marketplace!];\n\n const priceByMarketplaceEnabled = getValues(\n `marketplacePriceUpdates.${i}.priceByMarketplace`\n );\n\n return (\n \n \n \n \n \n handleEnter(i + 1)}\n onChange={(val) => {\n onPriceEdit(val, priceByMarketplaceEnabled, i);\n }}\n />\n \n \n {\n onPriceEdit(val, priceByMarketplaceEnabled, i);\n }}\n onEnter={() => handleEnter(i + 1)}\n />\n \n \n \n \n \n \n\n \n {\n const newMode = !mp.priceByMarketplace;\n setValue(\n `marketplacePriceUpdates.${i}.priceByMarketplace`,\n newMode\n );\n if (!newMode) {\n // If this is false, set the value to listValue\n const mpListPrice = roundToPrecision(\n (listPrice ?? 0) * (1 + (ml.markup ?? 0)),\n uiCurrency.dec\n );\n setValue(\n `marketplacePriceUpdates.${i}.listPrice`,\n mpListPrice\n );\n }\n\n setValue(\n `marketplacePriceUpdates.${i}.markup`,\n null\n );\n }}\n />\n \n \n );\n })}\n \n \n <>\n \n }\n style={{ width: '100%' }}\n >\n {\n if (newId !== pricerSellerUserId) {\n setValue('pricerSellerUserId', newId);\n }\n }}\n onClick={(e) => e.stopPropagation()}\n />\n \n \n\n {listing && (\n \n {listing.lastPrcUpdOn && (\n }\n detail={\n \n {listing.lastPrcUpdOn\n ? formatInTimeZone(\n new Date(listing.lastPrcUpdOn),\n timeZone,\n 'MMM d, yyyy',\n {\n locale: getLocaleFromLanguageOrCurrent(),\n }\n )\n : ''}\n \n }\n />\n )}\n \n )}\n \n \n\n }\n size=\"md\"\n {...warningDialog.dialogProps}\n alerts={alerts}\n onOkay={() => warningDialog.closeDialog()}\n onCancel={() => warningDialog.closeDialog()}\n />\n \n );\n};\n","import { FormProvider } from 'react-hook-form';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { Feature, ListingDetails } from 'src/WebApiController';\n\nimport { HistoricalPricingGraphSection } from '../../components/HistoricalPricingGraphSection';\nimport { useListingDetailsContext } from '../../ListingDetailsModalV2Context';\nimport { PricingProtection } from '../AutoPricingForm/Sections/PricingProtection';\nimport { EconomicsSection } from './EconomicsSection/EconomicsSection';\n\ntype ListingDetailsPricingFormProps = {\n listing: ListingDetails;\n};\n\nexport const ListingDetailsPricingForm = ({\n listing,\n}: ListingDetailsPricingFormProps) => {\n const { methods, isLoading } = useListingDetailsContext();\n const hasAutoPricingFeature = useUserHasFeature(Feature.AutoPricing);\n\n return (\n \n \n {hasAutoPricingFeature && (\n \n )}\n \n \n );\n};\n","import { isEqual } from 'lodash-es';\nimport { useCallback, useEffect, useMemo } from 'react';\nimport { useForm } from 'react-hook-form';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { EMPTY_SELLER_USER_ID } from 'src/utils/constants/constants';\nimport { isSuccess } from 'src/utils/errorUtils';\nimport { compareMarketplace } from 'src/utils/eventWithDataUtils';\nimport { getAllInPriceFromListPriceForListing } from 'src/utils/inventoryUtils';\nimport { roundToPrecision } from 'src/utils/numberFormatter';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ListingClient,\n ListingDetailDataField,\n ListingDetails,\n ListingDetailsPricingSectionUpdates,\n ListingMarketplacePriceUpdateInput,\n Marketplace,\n} from 'src/WebApiController';\n\nconst getListingDetailPricingInput = (\n listing: ListingDetails | null | undefined\n): ListingDetailsPricingSectionUpdates => {\n const marketplacePriceUpdates = listing?.mkpListings\n ? listing.mkpListings\n ?.filter((m) => m.mkp !== Marketplace.StubHub)\n ?.toSorted((a, b) => compareMarketplace(a.mkp, b.mkp))\n ?.map((x) => {\n const listPriceMarkup = x.markup ?? x.sellerAccountDefaultMarkup ?? 0;\n\n return {\n allInPrice: x.isPriceByMkp\n ? (x.webPrice ?? listing?.allInPrice)\n : null,\n listPrice: x.isPriceByMkp\n ? (x.netProcs ?? listing?.listPrice)\n : (listing?.listPrice ?? 0) * (1 + listPriceMarkup),\n priceByMarketplace: x.isPriceByMkp,\n marketplace: x.mkp,\n markup:\n x.markup != null ? roundToPrecision(x.markup * 100, 2) : null,\n } as ListingMarketplacePriceUpdateInput;\n })\n : [];\n return {\n id: listing?.id ?? 0,\n rowVersion: null,\n listPrice: listing?.listPrice ?? null,\n allInPrice: getAllInPriceFromListPriceForListing(listing, null) ?? null,\n netProceedsFloor: listing?.procsFloor ?? -1,\n netProceedsCeiling: listing?.procsCeil ?? -1,\n autoPricingEnabled: listing?.isAutoPrc ?? null,\n marketplacePriceUpdates,\n pricerSellerUserId: listing?.pricerId ?? EMPTY_SELLER_USER_ID,\n buyerUserId: null,\n currencyCode: listing?.currency ?? null,\n };\n};\n\nexport const usePricingForm = (\n listing: ListingDetails | null | undefined,\n onSubmitStart: () => void,\n onSubmitDone: (success?: boolean) => Promise\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const methods = useForm({\n defaultValues: listing?.dataIsLoaded[ListingDetailDataField.Pricing]\n ? getListingDetailPricingInput(listing)\n : undefined,\n });\n\n useEffect(() => {\n if (\n methods.formState.defaultValues == null &&\n listing?.dataIsLoaded[ListingDetailDataField.Pricing]\n ) {\n methods.reset(getListingDetailPricingInput(listing));\n }\n }, [methods, listing]);\n\n const onSubmitHandler = useCallback(\n async (pricingSectionForm: ListingDetailsPricingSectionUpdates) => {\n tryInvokeApi(\n async () => {\n onSubmitStart();\n const result = await new ListingClient(\n activeAccountWebClientConfig\n ).updateListingPricingSection(pricingSectionForm);\n\n if (isSuccess(result)) {\n // Reset the form to latest changed\n methods.reset(pricingSectionForm);\n await onSubmitDone();\n } else {\n showErrorDialog(\n 'ListingClient.updateListingPricingSection',\n { message: result.message, status: result.status },\n {\n trackErrorData: {\n pricingSectionForm,\n },\n }\n );\n }\n },\n (error) => {\n showErrorDialog('ListingClient.updateListingPricingSection', error, {\n trackErrorData: pricingSectionForm,\n });\n },\n () => {\n onSubmitDone(false);\n }\n );\n },\n [\n activeAccountWebClientConfig,\n methods,\n onSubmitDone,\n onSubmitStart,\n showErrorDialog,\n ]\n );\n\n const onSubmit = useCallback(() => {\n methods.handleSubmit(onSubmitHandler)();\n }, [methods, onSubmitHandler]);\n\n const onReset = useCallback(() => {\n methods.reset(getListingDetailPricingInput(listing));\n }, [listing, methods]);\n\n const input = methods.watch();\n\n const hasChanges = useMemo(() => {\n const defaultValues = methods.formState.defaultValues;\n return (\n input.listPrice !== defaultValues?.listPrice ||\n input.allInPrice !== defaultValues?.allInPrice ||\n input.netProceedsFloor !== defaultValues?.netProceedsFloor ||\n input.netProceedsCeiling !== defaultValues?.netProceedsCeiling ||\n input.autoPricingEnabled !== defaultValues?.autoPricingEnabled ||\n input.pricerSellerUserId !== defaultValues?.pricerSellerUserId ||\n input.buyerUserId !== defaultValues?.buyerUserId ||\n input.currencyCode !== defaultValues?.currencyCode ||\n !isEqual(\n input.marketplacePriceUpdates,\n defaultValues?.marketplacePriceUpdates\n )\n );\n }, [input, methods.formState.defaultValues]);\n\n return {\n hasChanges,\n methods,\n onSubmit,\n onReset,\n };\n};\n","import { useFormContext } from 'react-hook-form';\nimport { TagsFormBodyV2 } from 'src/components/TagsFormBody';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { useUserCanUpdateListingTags } from 'src/hooks/useUserHasListingPermissions';\nimport { DetailSection } from 'src/modals/common';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n ActionOutboxEntityType,\n ListingDetails,\n ListingDetailsTagsSectionUpdates,\n Permission,\n} from 'src/WebApiController';\n\ntype TagsTabProp = {\n listing: ListingDetails | null;\n disabled?: boolean;\n isBulkEdit?: boolean;\n};\n\nexport const TagsSection: React.FC = ({\n listing,\n disabled,\n isBulkEdit = false,\n}) => {\n const { setValue, watch } =\n useFormContext();\n const tags = watch('tags') ?? [];\n\n const canCreateTage = useUserHasAnyOfPermissions(\n Permission.Inventory_AddTagType\n );\n const canEditTags = useUserCanUpdateListingTags(listing, isBulkEdit);\n\n return (\n }>\n {\n setValue('tags', tags);\n }}\n disabled={disabled}\n entityType={ActionOutboxEntityType.Listing}\n />\n \n );\n};\n","import { FormProvider } from 'react-hook-form';\nimport { ListingDetails } from 'src/WebApiController';\n\nimport { useListingDetailsContext } from '../../ListingDetailsModalV2Context';\nimport { TagsSection } from './TagsSection';\n\ntype ListingDetailsTagsFormProps = {\n listing: ListingDetails | null;\n};\n\nexport const ListingDetailsTagsForm: React.FC = ({\n listing,\n}) => {\n const { methods, isLoading } = useListingDetailsContext();\n return (\n \n \n \n );\n};\n","import { isEqual } from 'lodash-es';\nimport { useCallback, useEffect, useMemo } from 'react';\nimport { useForm } from 'react-hook-form';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { isSuccess } from 'src/utils/errorUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ListingClient,\n ListingDetailDataField,\n ListingDetails,\n ListingDetailsTagsSectionUpdates,\n} from 'src/WebApiController';\n\nconst getListingDetailTagsInput = (\n listing: ListingDetails | null | undefined\n): ListingDetailsTagsSectionUpdates => {\n return {\n id: listing?.id ?? 0,\n rowVersion: null,\n tags: listing?.tags ?? null,\n };\n};\n\nexport const useTagsForm = (\n listing: ListingDetails | null | undefined,\n onSubmitStart: () => void,\n onSubmitDone: (success?: boolean) => Promise\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const methods = useForm({\n defaultValues: listing?.dataIsLoaded[ListingDetailDataField.Tags]\n ? getListingDetailTagsInput(listing)\n : undefined,\n });\n\n useEffect(() => {\n if (\n methods.formState.defaultValues == null &&\n listing?.dataIsLoaded[ListingDetailDataField.Tags]\n ) {\n methods.reset(getListingDetailTagsInput(listing));\n }\n }, [methods, listing]);\n\n const onSubmitHandler = useCallback(\n async (tagsSectionForm: ListingDetailsTagsSectionUpdates) => {\n tryInvokeApi(\n async () => {\n onSubmitStart();\n const result = await new ListingClient(\n activeAccountWebClientConfig\n ).updateListingTagSection(tagsSectionForm);\n\n if (isSuccess(result)) {\n // Reset the form to latest changed\n methods.reset(tagsSectionForm);\n await onSubmitDone();\n } else {\n showErrorDialog(\n 'ListingClient.updateListingTagSection',\n { message: result.message, status: result.status },\n {\n trackErrorData: {\n tagsSectionForm,\n },\n }\n );\n }\n },\n (error) => {\n showErrorDialog('ListingClient.updateListingTagSection', error, {\n trackErrorData: tagsSectionForm,\n });\n },\n () => {\n onSubmitDone(false);\n }\n );\n },\n [\n activeAccountWebClientConfig,\n methods,\n onSubmitDone,\n onSubmitStart,\n showErrorDialog,\n ]\n );\n\n const onSubmit = useCallback(() => {\n methods.handleSubmit(onSubmitHandler)();\n }, [methods, onSubmitHandler]);\n\n const onReset = useCallback(() => {\n methods.reset(getListingDetailTagsInput(listing));\n }, [listing, methods]);\n\n const input = methods.watch();\n\n const hasChanges = useMemo(() => {\n const defaultValues = methods.formState.defaultValues;\n return !isEqual(input.tags, defaultValues?.tags);\n }, [input.tags, methods.formState.defaultValues]);\n\n return {\n hasChanges,\n methods,\n onSubmit,\n onReset,\n };\n};\n","import { useCallback } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useUserCanUpdateListing } from 'src/hooks/useUserHasListingPermissions';\nimport { ListingNotesSection } from 'src/modals/common';\nimport {\n Listing,\n ListingDetailsUpdateInput,\n ListingNote,\n} from 'src/WebApiController';\n\nexport const NotesSection = ({\n listing,\n disabled,\n isBulkEdit,\n}: {\n listing?: Listing | null;\n disabled?: boolean;\n isBulkEdit?: boolean;\n}) => {\n const { watch, setValue } = useFormContext();\n const internalNotes = watch('internalNotes');\n const seatTraits = watch('seatTraits');\n\n const canUpdate = useUserCanUpdateListing(listing, false);\n\n const onListingNotesChanged = useCallback(\n (listingNotes?: ListingNote[] | null) => {\n setValue('seatTraits', listingNotes ?? null);\n },\n [setValue]\n );\n\n const onInternalNotesChanged = useCallback(\n (notes?: string | null) => {\n setValue('internalNotes', notes ?? null);\n },\n [setValue]\n );\n\n if (isBulkEdit) {\n return null;\n }\n\n return (\n \n );\n};\n","import { useFormContext } from 'react-hook-form';\nimport { TicketTypePriorityInput } from 'src/components/common/TicketTypePriorityInput';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { Detail, DetailGroup } from 'src/modals/common';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {DeliveryType, Feature, ListingDetailsUpdateInput} from 'src/WebApiController';\nimport {useUserHasFeature} from \"src/hooks/useUserHasFeature\";\n\nexport const TicketTypePrioritySection = ({\n deliveryType,\n disabled,\n confirmUpdateSales,\n}: {\n deliveryType: DeliveryType | null;\n disabled: boolean;\n confirmUpdateSales: () => void;\n}) => {\n const { watch, setValue } = useFormContext();\n const isMobile = useMatchMedia('mobile');\n const ticketTypeRules = watch('ticketTypeRules');\n const hasBackfillTicketTypeOverrideToSaleFeature = useUserHasFeature(\n Feature.BackfillListingTicketTypeOverrideToSale\n );\n\n return (\n \n }\n style={{ flex: 1 }}\n detail={\n <>\n {\n setValue('ticketTypeRules', newRules);\n \n if (hasBackfillTicketTypeOverrideToSaleFeature) {\n confirmUpdateSales();\n }\n }}\n disabled={disabled}\n />\n \n }\n />\n \n );\n};\n","import { isEqual } from 'date-fns';\nimport { useCallback, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { InHandDateDisplay } from 'src/components/common/InHandDateDisplay';\nimport { InHandDateInput } from 'src/components/Input/InHandDateInput';\nimport { DeliveryTypeSelector } from 'src/components/Selectors/DeliveryTypeSelector';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Stack, Switch } from 'src/core/ui';\nimport { AlertWithSuppressionDialog } from 'src/dialogs/AlertWithSuppressionDialog';\nimport { useDeliveryInfoChangeDialog } from 'src/dialogs/AlertWithSuppressionDialog/useDeliveryInfoChangeDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useAnyMarketplaceHandledByProcessor } from 'src/hooks/useMarketplaceHandledByProcessor';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport {\n useUserCanSetDeliveryStrategy,\n useUserCanUpdateListing,\n useUserCanViewPredelivery,\n} from 'src/hooks/useUserHasListingPermissions';\nimport {\n Detail,\n DetailGroup,\n DetailSection,\n SectionContent,\n} from 'src/modals/common';\nimport { ViewTickets } from 'src/modals/ViewTickets';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { DELIVERY_OPTIONS_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { isDatePassedHours } from 'src/utils/dateTimeUtils';\nimport { getListingDetailsModalConfigWithDeepLink } from 'src/utils/inventoryUtils';\nimport { getDeliveryTypeIcon } from 'src/utils/ticketTypeUtils';\nimport {\n Event,\n Feature,\n ListingDetails,\n ListingDetailsTicketSectionUpdates,\n PreDeliveryState,\n} from 'src/WebApiController';\n\nimport { TicketTypePrioritySection } from './TicketTypePrioritySection';\n\nexport const DeliverySection = ({\n listing,\n disabled: externalDisabled,\n event,\n isBulkEdit,\n}: {\n event?: Event | null;\n listing?: ListingDetails | null;\n disabled?: boolean;\n isBulkEdit?: boolean;\n}) => {\n const hasAutoFulfillFeature = useUserHasFeature(Feature.AutoFulfillSetting);\n const isAnyHandledByProcessor = useAnyMarketplaceHandledByProcessor();\n\n const { watch, setValue } =\n useFormContext();\n\n const isMobile = useMatchMedia('mobile');\n const inHandAt = watch('inHandDate');\n const isNoFulfill = watch('isNoFulfill');\n const updateSalesOfListings = watch('updateSalesOfListings');\n\n const deliveryType = watch('delivType');\n\n const ticketsSold = useMemo(\n () => (listing?.tickets?.filter((t) => t.saleId) ?? []).length,\n [listing?.tickets]\n );\n\n const hasUpdateSalesOfListingsFeature = useUserHasFeature(\n Feature.UpdateSalesOfListingsDeliveryInfo\n );\n\n const hasAnySales = ticketsSold > 0;\n\n const warningDialog = useBasicDialog();\n const deliveryInfoChangeHookProps = useDeliveryInfoChangeDialog(\n () => {\n setValue('updateSalesOfListings', true);\n },\n () => {\n // set don't change back\n setValue('updateSalesOfListings', false);\n }\n );\n\n const { preDelivState, isUndeliv } = listing ?? {};\n const predeliveryArtifactTypes = listing?.availArtTypes ?? [];\n const cancelTo = listing?.id\n ? getListingDetailsModalConfigWithDeepLink(listing.id)\n : undefined;\n const inHandDate = inHandAt\n ? new Date(inHandAt)\n : isBulkEdit\n ? undefined\n : new Date();\n\n const canUpdate = useUserCanUpdateListing(listing, isBulkEdit);\n const canSetDeliveryStrategy = useUserCanSetDeliveryStrategy(\n listing,\n isBulkEdit\n );\n const canViewFulfillmentArtifacts = useUserCanViewPredelivery(\n listing,\n isBulkEdit\n );\n const disabled = externalDisabled || !canUpdate;\n\n const icon = getDeliveryTypeIcon(listing?.delivType);\n\n const confirmUpdateSales = useCallback(() => {\n if (\n hasAnySales &&\n hasUpdateSalesOfListingsFeature &&\n // only ask once per form\n updateSalesOfListings == null\n ) {\n if (isDatePassedHours(deliveryInfoChangeHookProps.lastTimeStamp, 1)) {\n // Show warning if it has passed 1 hr or not suppressed\n warningDialog.launchDialog();\n } else {\n // If suppressed, assumed it's true (since the current alert suppression only save for Yes answer)\n setValue('updateSalesOfListings', true);\n }\n }\n }, [\n deliveryInfoChangeHookProps.lastTimeStamp,\n hasAnySales,\n hasUpdateSalesOfListingsFeature,\n setValue,\n updateSalesOfListings,\n warningDialog,\n ]);\n\n return (\n <>\n }>\n \n {!isBulkEdit && listing && (\n \n }\n style={{ flex: 1 }}\n detail={\n listing?.isSeatSaver ? (\n {\n if (newD !== deliveryType) {\n setValue('delivType', newD);\n\n confirmUpdateSales();\n }\n }}\n />\n ) : (\n \n {icon}\n \n \n )\n }\n />\n \n )}\n {!isBulkEdit && listing && (\n \n \n }\n style={{ flex: 1 }}\n detail={\n \n \n \n }\n />\n\n {canViewFulfillmentArtifacts &&\n cancelTo &&\n canViewFulfillmentArtifacts &&\n predeliveryArtifactTypes.map((predeliveryArtifactType) => (\n \n ))}\n \n \n )}\n {!isBulkEdit && hasAutoFulfillFeature && isAnyHandledByProcessor && (\n \n \n }\n style={{ flex: 1 }}\n detail={\n e.stopPropagation()}\n onCheckedChange={(isChecked) => {\n setValue('isNoFulfill', !isChecked);\n\n confirmUpdateSales();\n }}\n />\n }\n />\n \n \n )}\n \n }\n style={{ flex: 1 }}\n detail={\n \n {!isBulkEdit && }\n {\n if (date) {\n if (!inHandDate || !isEqual(date, inHandDate)) {\n setValue('inHandDate', date.toISOString());\n }\n\n setValue('daysBeforeEvent', daysBeforeEvent ?? null);\n\n confirmUpdateSales();\n } else {\n if (isBulkEdit) {\n setValue('inHandDate', null);\n }\n }\n }}\n value={inHandAt}\n targetDate={\n event?.dates?.start\n ? new Date(event?.dates?.start)\n : new Date()\n }\n />\n \n }\n />\n \n {!isBulkEdit && listing && (\n \n )}\n \n \n }\n size=\"md\"\n {...warningDialog.dialogProps}\n alerts={[deliveryInfoChangeHookProps]}\n onOkay={() => {\n warningDialog.closeDialog();\n }}\n okText={ContentId.Yes}\n cancelText={ContentId.No}\n onCancel={() => warningDialog.closeDialog()}\n />\n \n );\n};\n","import { Fragment, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { NavigateFunction, useNavigate } from 'react-router-dom';\nimport { VenueRowInput } from 'src/components/Input/VenueRowInput';\nimport { VenueSectionInput } from 'src/components/Input/VenueSectionInput';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content, FormatContent } from 'src/contexts/ContentContext';\nimport { useGetSectionRowFromVenueMapConfig } from 'src/contexts/EventMapContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { Switch } from 'src/core/interim/Switch';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { Colors } from 'src/core/themes/constants/colors';\nimport { Button } from 'src/core/ui';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { useUserCanUpdateListing } from 'src/hooks/useUserHasListingPermissions';\nimport {\n Detail,\n DetailGroup,\n DetailSection,\n SectionContent,\n} from 'src/modals/common';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SPLIT_TYPE_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { getListingDetailsModalConfigWithDeepLink } from 'src/utils/inventoryUtils';\nimport { INT_MAX_VALUE } from 'src/utils/numberFormatter';\nimport { getSaleDetailsRelativeUrl } from 'src/utils/saleUtils';\nimport {\n Feature,\n ListingDetails,\n ListingDetailsTicketSectionUpdates,\n SplitType,\n Ticket,\n} from 'src/WebApiController';\n\nimport { LaunchViewAllSeats } from '../../actions/LaunchViewAllSeats';\n\nconst MAX_SEATS_DISPLAY = 10;\n\nexport const getSeatDisplay = (ticket: Ticket, navigate?: NavigateFunction) => {\n const { saleId, seat, ord } = ticket;\n\n if (ticket.saleId) {\n return (\n \n navigate ? navigate(getSaleDetailsRelativeUrl(saleId!)) : null\n }\n >\n {seat ? (\n <>{seat}\n ) : (\n \n )}\n \n );\n } else {\n return seat ? (\n <>{seat}\n ) : (\n \n );\n }\n};\n\nexport const TicketsSection = ({\n listing,\n disabled,\n isBulkEdit,\n}: {\n listing?: ListingDetails | undefined;\n disabled?: boolean;\n isBulkEdit?: boolean;\n}) => {\n const navigate = useNavigate();\n const {\n setValue,\n watch,\n clearErrors,\n formState: { defaultValues, errors },\n } = useFormContext();\n\n const userHasWasteSaleFeature = useUserHasFeature(Feature.WasteSale);\n\n const { loginContext } = useAppContext();\n const { getUiCurrency } = useLocalizationContext();\n const uiCurrency = useMemo(\n () =>\n getUiCurrency(\n listing?.currency ??\n loginContext?.user?.activeAccount?.currencyCode ??\n 'USD'\n ),\n [\n getUiCurrency,\n listing?.currency,\n loginContext?.user?.activeAccount?.currencyCode,\n ]\n );\n\n const splitType = watch('splitType');\n const hideSeats = watch('hideSeatsFromMarketplace');\n const manualMaxDisplayQuantity = watch('manualMaxDisplayQuantity');\n const cancelTo = getListingDetailsModalConfigWithDeepLink(listing?.id);\n\n const isMobile = useMatchMedia('mobile');\n\n const { tickets, ticketCnt, seating } = listing ?? {};\n\n const availableSeats = useMemo(() => {\n if (!tickets?.length || !listing) {\n return [];\n }\n const ticketsAvailable = tickets.filter((t) => !t.saleId);\n\n const ticketsElement = ticketsAvailable\n .slice(0, MAX_SEATS_DISPLAY)\n .map((t) => {getSeatDisplay(t)})\n .flatMap((value, index, array) =>\n array.length - 1 !== index\n ? [value, {', '}]\n : value\n );\n\n if (ticketsAvailable.length > MAX_SEATS_DISPLAY) {\n ticketsElement.push(\n \n {' ... '}\n \n \n );\n }\n return ticketsElement;\n }, [tickets, listing, cancelTo]);\n\n const soldSeats = useMemo(() => {\n if (!tickets?.length || !listing) {\n return [];\n }\n const ticketsSold = tickets.filter((t) => t.saleId && !t.isWasted);\n\n const ticketsElement = ticketsSold\n .slice(0, MAX_SEATS_DISPLAY)\n .map((t) => {getSeatDisplay(t, navigate)})\n .flatMap((value, index, array) =>\n array.length - 1 !== index\n ? [value, {', '}]\n : value\n );\n\n if (ticketsSold.length > MAX_SEATS_DISPLAY) {\n ticketsElement.push(\n \n {' ... '}\n \n \n );\n }\n return ticketsElement;\n }, [tickets, listing, navigate, cancelTo]);\n\n const wastedTickets = useMemo(() => {\n if (!tickets?.length || !listing || !userHasWasteSaleFeature) {\n return [];\n }\n const wastedTickets = tickets.filter((t) => !!t.saleId && t.isWasted);\n\n const wastedTicketsElements = wastedTickets\n .slice(0, MAX_SEATS_DISPLAY)\n .map((t) => {getSeatDisplay(t, navigate)})\n .flatMap((value, index, array) =>\n array.length - 1 !== index\n ? [value, {', '}]\n : value\n );\n if (wastedTicketsElements.length > MAX_SEATS_DISPLAY) {\n wastedTicketsElements.push(\n \n {' ... '}\n \n \n );\n }\n return wastedTicketsElements;\n }, [cancelTo, listing, navigate, tickets, userHasWasteSaleFeature]);\n\n const canUpdate = useUserCanUpdateListing(listing, isBulkEdit);\n\n const isDisabled = disabled || listing?.isDeleted || !canUpdate;\n\n const onShownQuantityChange = (\n changeEvent: React.ChangeEvent\n ) => {\n const newValue = parseInt(changeEvent?.target?.value);\n if (newValue > 0 && newValue < INT_MAX_VALUE) {\n const validatedValue = Math.min(newValue, listing?.availQty ?? 0) || null;\n setValue('manualMaxDisplayQuantity', validatedValue);\n } else {\n setValue('manualMaxDisplayQuantity', null);\n }\n };\n\n const section = watch('section');\n const sectionId = watch('sectionId');\n const row = watch('row');\n const rowId = watch('rowId');\n const faceValueCost = watch('faceValue');\n\n const { section: selectedSection, row: selectedRow } =\n useGetSectionRowFromVenueMapConfig(rowId, sectionId, section, row);\n\n return (\n }>\n \n \n }\n detail={\n {\n if (newSplitType !== splitType) {\n setValue(\n 'splitType',\n newSplitType || isBulkEdit\n ? newSplitType\n : SplitType.AvoidOne\n );\n }\n }}\n />\n }\n />\n \n \n }\n detail={\n {\n const newHideSeats = e.target.checked;\n if (newHideSeats !== hideSeats) {\n setValue('hideSeatsFromMarketplace', newHideSeats);\n }\n }}\n />\n }\n />\n \n {!isBulkEdit && listing && seating && (\n <>\n \n }\n detail={\n \n }\n style={{\n width: '8em',\n }}\n />\n \n \n }\n detail={{listing.unsoldQty}}\n />\n \n \n }\n detail={{ticketCnt}}\n />\n \n \n }\n errors={errors.section?.message}\n >\n {!listing.isSeatSaver ? (\n {section}\n ) : (\n {\n clearErrors('section');\n if (section) {\n setValue('section', section.name);\n setValue('sectionId', section.id);\n\n if (section.specRow?.id) {\n // Setting the section automatically set the speculative row id\n setValue('rowId', section.specRow?.id);\n setValue('row', '');\n }\n } else {\n setValue('section', sectionName ?? '');\n setValue('sectionId', null);\n\n // Free-text section do not have speculative row info\n setValue('rowId', null);\n setValue('row', '');\n }\n }}\n />\n )}\n \n \n \n }>\n {!listing.isSeatSaver ? (\n {row}\n ) : (\n {\n clearErrors('row');\n if (row) {\n setValue('row', row.isSpeculative ? '' : row.name);\n setValue('rowId', row.id);\n } else {\n // If we can't find the row - that mean they typed it in\n // so just keep with they type as the row\n setValue('row', rowName ?? '');\n setValue('rowId', null);\n }\n }}\n />\n )}\n \n \n \n }\n detail={\n <>\n
    \n \n \n {': '}\n \n {availableSeats}\n
    \n
    \n \n \n {': '}\n \n {soldSeats}\n
    \n {userHasWasteSaleFeature && (\n
    \n \n \n {': '}\n \n {wastedTickets}\n
    \n )}\n \n }\n />\n
    \n\n {listing?.isSeatSaver && (\n \n }>\n {\n const v = parseFloat(e.target.value) || 0;\n if (v >= 0 && v <= Number.MAX_VALUE) {\n setValue('faceValue', v);\n } else {\n setValue('faceValue', null);\n }\n }}\n />\n \n \n )}\n \n )}\n
    \n
    \n );\n};\n","import { FormProvider } from 'react-hook-form';\nimport { Content } from 'src/contexts/ContentContext';\nimport { DetailSection } from 'src/modals/common';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Event, ListingDetails } from 'src/WebApiController';\n\nimport { NotesSection } from '../../components/NotesSection';\nimport { useListingDetailsContext } from '../../ListingDetailsModalV2Context';\nimport { DeliverySection } from './DeliverySection/DeliverySection';\nimport { TicketsSection } from './TicketsSection';\n\ntype ListingDetailsTicketsFormProps = {\n event: Event | null | undefined;\n listing: ListingDetails;\n isLoading?: boolean;\n};\n\nexport const ListingDetailsTicketsForm: React.FC<\n ListingDetailsTicketsFormProps\n> = ({ event, listing, isLoading }) => {\n const { methods } = useListingDetailsContext();\n return (\n \n \n }>\n \n \n \n \n );\n};\n","import { isEqual } from 'lodash-es';\nimport { useCallback, useEffect, useMemo } from 'react';\nimport { useForm } from 'react-hook-form';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { isSuccess } from 'src/utils/errorUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ListingClient,\n ListingDetailDataField,\n ListingDetails,\n ListingDetailsTicketSectionUpdates,\n} from 'src/WebApiController';\n\nconst getListingDetailsTicketsInput = (\n listing: ListingDetails | null | undefined\n): ListingDetailsTicketSectionUpdates => {\n return {\n id: listing?.id ?? 0,\n rowVersion: null,\n splitType: listing?.splitType ?? null,\n hideSeatsFromMarketplace: listing?.hideSeats ?? null,\n inHandDate: listing?.inHandAt ?? null,\n isNoFulfill: listing?.isNoFulfill ?? null,\n delivType: listing?.delivType ?? null,\n seatTraits: listing?.seatTraits ?? null,\n section: listing?.seating?.section ?? null,\n sectionId: listing?.seating?.sectionId ?? null,\n row: listing?.seating?.row ?? null,\n rowId: listing?.seating?.rowId ?? null,\n faceValue: listing?.faceValue?.amt ?? null,\n manualMaxDisplayQuantity:\n listing?.manMaxDispQty ?? listing?.maxDispQty ?? null,\n internalNotes: listing?.privNotes ?? null,\n daysBeforeEvent: null,\n ticketTypeRules: listing?.tktTypeRules ?? null,\n updateSalesOfListings: null,\n updatePredeliveryETicketArtifacts: null,\n };\n};\n\nexport const useTicketsForm = (\n listing: ListingDetails | null | undefined,\n onSubmitStart: () => void,\n onSubmitDone: (success?: boolean) => Promise\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const methods = useForm({\n defaultValues: listing?.dataIsLoaded[ListingDetailDataField.Tickets]\n ? getListingDetailsTicketsInput(listing)\n : undefined,\n });\n\n useEffect(() => {\n if (\n methods.formState.defaultValues == null &&\n listing?.dataIsLoaded[ListingDetailDataField.Tickets]\n ) {\n methods.reset(getListingDetailsTicketsInput(listing));\n }\n }, [methods, listing]);\n\n const onSubmitHandler = useCallback(\n async (ticketsSectionForm: ListingDetailsTicketSectionUpdates) => {\n tryInvokeApi(\n async () => {\n onSubmitStart();\n const result = await new ListingClient(\n activeAccountWebClientConfig\n ).updateListingTicketSection(ticketsSectionForm);\n\n if (isSuccess(result)) {\n // Reset the form to latest changed\n methods.reset(ticketsSectionForm);\n await onSubmitDone();\n } else {\n showErrorDialog(\n 'ListingClient.updateListingTicketSection',\n { message: result.message, status: result.status },\n {\n trackErrorData: {\n ticketsSectionForm,\n },\n }\n );\n }\n },\n (error) => {\n showErrorDialog('ListingClient.updateListingTicketSection', error, {\n trackErrorData: ticketsSectionForm,\n });\n },\n () => {\n onSubmitDone(false);\n }\n );\n },\n [\n activeAccountWebClientConfig,\n methods,\n onSubmitDone,\n onSubmitStart,\n showErrorDialog,\n ]\n );\n\n const onSubmit = useCallback(() => {\n methods.handleSubmit(onSubmitHandler)();\n }, [methods, onSubmitHandler]);\n\n const onReset = useCallback(() => {\n methods.reset(getListingDetailsTicketsInput(listing));\n }, [listing, methods]);\n\n const input = methods.watch();\n\n const hasChanges = useMemo(() => {\n const defaultValues = methods.formState.defaultValues;\n return (\n input.splitType !== defaultValues?.splitType ||\n input.hideSeatsFromMarketplace !==\n defaultValues?.hideSeatsFromMarketplace ||\n input.inHandDate !== defaultValues?.inHandDate ||\n input.isNoFulfill !== defaultValues?.isNoFulfill ||\n input.delivType !== defaultValues?.delivType ||\n input.section !== defaultValues?.section ||\n input.sectionId !== defaultValues?.sectionId ||\n input.row !== defaultValues?.row ||\n input.rowId !== defaultValues?.rowId ||\n input.faceValue !== defaultValues?.faceValue ||\n input.manualMaxDisplayQuantity !==\n defaultValues?.manualMaxDisplayQuantity ||\n input.internalNotes !== defaultValues?.internalNotes ||\n input.daysBeforeEvent !== defaultValues?.daysBeforeEvent ||\n !isEqual(input.ticketTypeRules, defaultValues?.ticketTypeRules ?? null) ||\n input.updateSalesOfListings !== defaultValues?.updateSalesOfListings ||\n !isEqual(input.seatTraits, defaultValues?.seatTraits ?? null)\n );\n }, [input, methods.formState.defaultValues]);\n\n return {\n hasChanges,\n methods,\n onSubmit,\n onReset,\n };\n};\n","import { ListingDetails } from 'src/WebApiController';\n\nimport { useAutoPricingForm } from './ListingForms/AutoPricingForm/AutoPricingForm.hooks';\nimport { useBroadcastForm } from './ListingForms/BroadcastForm';\nimport { usePricingForm } from './ListingForms/PricingForm';\nimport { useTagsForm } from './ListingForms/TagsForm';\nimport { useTicketsForm } from './ListingForms/TicketsForm';\n\nexport const useListingDetailsMethods = (\n listing: ListingDetails | null | undefined,\n onSubmitStart: () => void,\n onSubmitDone: (success?: boolean) => Promise\n) => {\n const {\n hasChanges: broadcastHasChanges,\n methods: broadcastMethods,\n onSubmit: onSubmitBroadcast,\n onReset: onResetBroadcast,\n } = useBroadcastForm(listing, onSubmitStart, onSubmitDone);\n const {\n hasChanges: ticketsHasChanges,\n methods: ticketsMethods,\n onSubmit: onSubmitTickets,\n onReset: onResetTickets,\n } = useTicketsForm(listing, onSubmitStart, onSubmitDone);\n const {\n hasChanges: tagsHasChanges,\n methods: tagsMethods,\n onSubmit: onSubmitTags,\n onReset: onResetTags,\n } = useTagsForm(listing, onSubmitStart, onSubmitDone);\n const {\n hasChanges: pricingHasChanges,\n methods: pricingMethods,\n onSubmit: onSubmitPricing,\n onReset: onResetPricing,\n } = usePricingForm(listing, onSubmitStart, onSubmitDone);\n const {\n hasChanges: autoPricingHasChanges,\n methods: autoPricingMethods,\n onSubmit: onSubmitAutoPricing,\n onReset: onResetAutoPricing,\n } = useAutoPricingForm(listing, onSubmitStart, onSubmitDone);\n\n return {\n updated: {\n broadcast: broadcastHasChanges,\n tickets: ticketsHasChanges,\n tags: tagsHasChanges,\n pricing: pricingHasChanges,\n autoPricing: autoPricingHasChanges,\n },\n methods: {\n broadcast: broadcastMethods,\n tickets: ticketsMethods,\n tags: tagsMethods,\n pricing: pricingMethods,\n autoPricing: autoPricingMethods,\n },\n onSubmits: {\n broadcast: onSubmitBroadcast,\n tickets: onSubmitTickets,\n tags: onSubmitTags,\n pricing: onSubmitPricing,\n autoPricing: onSubmitAutoPricing,\n },\n onResets: {\n broadcast: onResetBroadcast,\n tickets: onResetTickets,\n tags: onResetTags,\n pricing: onResetPricing,\n autoPricing: onResetAutoPricing,\n },\n };\n};\n","import { head, uniqBy } from 'lodash-es';\nimport { useCallback, useMemo } from 'react';\nimport { EventVenueMap } from 'src/components/Events/VenueMap/EventVenueMap';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { shared, vars } from 'src/core/themes';\nimport { getSectionInfoDisplay } from 'src/utils/autoPricingUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { filterSectionByZone } from 'src/utils/venueConfigUtils';\nimport { SectionInfo } from 'src/WebApiController';\n\nexport type SectionSelectorProps = {\n sectionIds: number[];\n disabledSectionIds?: number[];\n onSelectedSectionsChange: (selectedSections: SectionInfo[]) => void;\n};\n\nexport const SectionSelector = ({\n sectionIds,\n disabledSectionIds,\n onSelectedSectionsChange,\n}: SectionSelectorProps) => {\n const { venueMapInfo } = useEventMapContext();\n\n const selectedSections = useMemo(() => {\n if (venueMapInfo) {\n return venueMapInfo.sections\n .filter((section) => sectionIds.includes(section.id))\n .toSorted((a, b) => a.name.localeCompare(b.name));\n }\n return [];\n }, [sectionIds, venueMapInfo]);\n\n const selectedSectionIds = useMemo(() => {\n return selectedSections.map((s) => s.id);\n }, [selectedSections]);\n\n const getColor = useCallback(\n (info: {\n sectionId: number;\n rowId?: number;\n sectionName?: string;\n ticketClassId: number;\n isSelected: boolean;\n }) => {\n const isSectionDisabled = disabledSectionIds?.includes(info.sectionId);\n return {\n stroke: isSectionDisabled\n ? vars.color.backgroundDisabled\n : vars.color.textBrand,\n fill: isSectionDisabled\n ? vars.color.backgroundDisabled\n : info.isSelected\n ? vars.color.backgroundBrandSeatmap\n : vars.color.backgroundPrimary,\n textColor: isSectionDisabled\n ? vars.color.textDisabled\n : vars.color.textStrong,\n };\n },\n [disabledSectionIds]\n );\n\n const onSectionHovered = useCallback(\n (hoveredSection: SectionInfo) => {\n if (disabledSectionIds?.includes(hoveredSection.id)) {\n return null;\n }\n\n return getSectionInfoDisplay(\n hoveredSection,\n [],\n venueMapInfo?.sectionScores\n );\n },\n [disabledSectionIds, venueMapInfo?.sectionScores]\n );\n\n const onShiftSelect = useCallback(\n (section: SectionInfo) => {\n // We are using the ticketClassId to group the sections\n const selectedClassId = head(\n section?.rows\n ?.map(({ tktClass: ticketClass }) => ticketClass?.id)\n .filter((id) => !!id)\n );\n const classSections =\n venueMapInfo?.sections?.filter(filterSectionByZone(selectedClassId)) ||\n [];\n\n const classSectionIds = classSections.map(({ id }) => id);\n if (selectedSections.findIndex(({ id }) => id === section.id) > -1) {\n const updated = selectedSections.filter(\n ({ id }) => !classSectionIds.includes(id)\n );\n onSelectedSectionsChange(updated);\n } else {\n const updated = uniqBy(\n selectedSections.concat(classSections),\n 'id'\n ).toSorted((a, b) => a.name.localeCompare(b.name));\n onSelectedSectionsChange(updated);\n }\n },\n [onSelectedSectionsChange, selectedSections, venueMapInfo?.sections]\n );\n\n const onSingleSelect = useCallback(\n (section: SectionInfo) => {\n if (disabledSectionIds?.includes(section.id)) {\n return;\n }\n\n const idx = selectedSections.findIndex(({ id }) => id === section.id);\n\n const selectedSectionsNew =\n idx === -1\n ? [...selectedSections, section]\n : selectedSections.filter(({ id }) => id !== section.id);\n onSelectedSectionsChange(\n selectedSectionsNew.toSorted((a, b) => a.name.localeCompare(b.name))\n );\n },\n [disabledSectionIds, onSelectedSectionsChange, selectedSections]\n );\n\n const onSectionSelected = useCallback(\n (e: MouseEvent, section: SectionInfo) => {\n e.preventDefault();\n e.stopPropagation();\n if (e.shiftKey) {\n onShiftSelect(section);\n return;\n }\n onSingleSelect(section);\n },\n [onSingleSelect, onShiftSelect]\n );\n\n const onToggleMirrors = useCallback(\n (mirrors: SectionInfo[], exclude?: boolean) => {\n if (exclude) {\n const idsToExclude = mirrors.map(({ id }) => id);\n const updated = uniqBy(\n selectedSections.filter(({ id }) => !idsToExclude.includes(id)),\n 'id'\n ).toSorted((a, b) => a.name.localeCompare(b.name));\n onSelectedSectionsChange(updated);\n } else {\n const updated = uniqBy(selectedSections.concat(mirrors), 'id').toSorted(\n (a, b) => a.name.localeCompare(b.name)\n );\n onSelectedSectionsChange(updated);\n }\n },\n [onSelectedSectionsChange, selectedSections]\n );\n\n return (\n <>\n \n \n \n
    \n \n
    \n \n );\n};\n","import { Content } from 'src/contexts/ContentContext';\nimport { Button, Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SectionInfo } from 'src/WebApiController';\n\nimport * as styles from './SectionSelectionPanel.css';\nimport { SectionSelector } from './SectionSelector';\n\nexport type SectionSelectorProps = {\n sectionIds: number[];\n disabledSectionIds?: number[];\n onSelectedSectionsChange: (selectedSections: SectionInfo[]) => void;\n};\n\nexport const SectionSelectorPanel = ({\n sectionIds,\n disabledSectionIds,\n onSelectedSectionsChange,\n}: SectionSelectorProps) => {\n return (\n
    \n \n {sectionIds.length > 0 && (\n \n onSelectedSectionsChange([])}\n >\n \n \n \n )}\n
    \n );\n};\n","import { useMemo } from 'react';\nimport { ButtonWithIcon } from 'src/components/Buttons';\nimport { MapWithCompListingsPreview } from 'src/components/Listings/MapWithCompListingsPreview';\nimport { useAutoPricingPreview } from 'src/components/Listings/MapWithCompListingsPreview/MapWithCompListingsPreview.hooks';\nimport { Stack } from 'src/core/ui';\nimport { useComparableListingsVenueMapColor } from 'src/hooks/useComparableListingsVenueMapColor';\nimport { useGetCompListings } from 'src/hooks/useGetCompListings';\nimport { CrossIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n Event,\n ListingDetails,\n ListingDetailsAutoPricingSectionUpdates,\n ListingDetailsPricingUpdates,\n} from 'src/WebApiController';\n\nimport { useAutoPricingSidePanelContext } from '.';\nimport * as styles from './AutoPricingSidePanel.css';\nimport { SectionSelectorPanel } from './SectionSelectionPanel/SectionSelectionPanel';\n\nexport const AutoPricingSidePanel = ({\n event,\n listing,\n listingInput,\n}: {\n event: Event;\n listing: ListingDetails;\n listingInput?: ListingDetailsAutoPricingSectionUpdates;\n}) => {\n const { contentType, onCloseSidePanel, metadata } =\n useAutoPricingSidePanelContext();\n\n const showComparables =\n contentType === 'comparables' && listing && event?.viagId != null;\n\n const showSectionSelector = contentType === 'sectionSelection' && listing;\n\n const sanitizedListingInput = useMemo((): ListingDetailsPricingUpdates => {\n const {\n netProceedsFloor,\n netProceedsCeiling,\n autoPricingEnabled,\n currencyCode,\n\n compListingFloor,\n compListingCeiling,\n compListingMode,\n compListingOnlyForSameZoneEnabled,\n compListingOnlyForSelectedSectionsEnabled,\n compListingExcludeFanInventory,\n compListingExcludeDefects,\n compListingQuantityScoreAdjustmentEnabled,\n compListingQuantityScoreAdjustmentOverrideJson,\n compListingSelectedSectionSettings,\n compListingQuantityFilters,\n\n undercutMode,\n undercutAbsoluteAmount,\n undercutRelativeAmount,\n\n circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerMaxDiscountVelocityTicksInHours,\n circuitBreakerMinCompListingCount,\n circuitBreakerRelativeCeiling,\n circuitBreakerRelativeFloor,\n\n outlierMode,\n outlierStandardDeviations,\n outlierKthLowestLimit,\n outlierKthLowestLimitRelativeSpacing,\n outlierKthLowestLimitAbsoluteSpacing,\n } = listingInput ?? {};\n\n return {\n netProceedsFloor,\n netProceedsCeiling,\n autoPricingEnabled,\n currencyCode,\n\n compListingFloor,\n compListingCeiling,\n compListingMode,\n compListingOnlyForSameZoneEnabled,\n compListingOnlyForSelectedSectionsEnabled,\n compListingExcludeFanInventory,\n compListingExcludeDefects,\n compListingQuantityScoreAdjustmentEnabled,\n compListingQuantityScoreAdjustmentOverrideJson,\n compListingSelectedSectionSettings,\n compListingQuantityFilters,\n\n undercutMode,\n undercutAbsoluteAmount,\n undercutRelativeAmount,\n\n circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerMaxDiscountVelocityTicksInHours,\n circuitBreakerMinCompListingCount,\n circuitBreakerRelativeCeiling,\n circuitBreakerRelativeFloor,\n\n outlierMode,\n outlierStandardDeviations,\n outlierKthLowestLimit,\n outlierKthLowestLimitRelativeSpacing,\n outlierKthLowestLimitAbsoluteSpacing,\n } as ListingDetailsPricingUpdates;\n }, [listingInput]);\n\n const { priceCalcQuery } = useAutoPricingPreview(\n event.viagId,\n listing?.id,\n sanitizedListingInput\n );\n const { compListingsQuery } = useGetCompListings(\n event,\n listing?.id,\n listing?.currency\n );\n\n const getColor = useComparableListingsVenueMapColor(\n listing ? [listing] : [],\n priceCalcQuery.data?.compListings,\n compListingsQuery.data ?? undefined\n );\n\n if (!showComparables && !showSectionSelector) return null;\n\n return (\n \n
    \n }\n onClick={onCloseSidePanel}\n textContentId={ContentId.Close}\n />\n
    \n \n {showComparables && (\n \n )}\n {showSectionSelector && (\n \n )}\n
    \n \n );\n};\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { isEqual } from 'lodash-es';\nimport {\n createContext,\n ReactNode,\n useCallback,\n useContext,\n useState,\n} from 'react';\nimport {\n ListingDetailsAutoPricingSectionUpdates,\n SectionInfo,\n} from 'src/WebApiController';\n\ntype PanelContentType = 'comparables' | 'sectionSelection' | 'none';\ntype PanelMetadata = {\n sectionIds: number[];\n disabledSectionIds: number[];\n input: ListingDetailsAutoPricingSectionUpdates;\n onSelectedSectionsChange: (sections: SectionInfo[]) => void;\n};\n\ntype AutoPricingSidePanelContextType = {\n contentType: PanelContentType;\n onCloseSidePanel: () => void;\n onShowContent: (\n newContentType: PanelContentType,\n e?: React.MouseEvent\n ) => void;\n metadata: PanelMetadata;\n updateMetadata: (data: PanelMetadata) => void;\n};\n\nconst AutoPricingSidePanelContext =\n createContext({\n contentType: 'none',\n onCloseSidePanel: () => {},\n onShowContent: () => {},\n metadata: {\n sectionIds: [],\n disabledSectionIds: [],\n input: {} as ListingDetailsAutoPricingSectionUpdates,\n onSelectedSectionsChange: () => void 0,\n },\n updateMetadata: () => void 0,\n });\n\ntype AutoPricingSidePanelContextProviderProps = {\n children: ReactNode;\n};\n\nexport const AutoPricingSidePanelContextProvider = ({\n children,\n}: AutoPricingSidePanelContextProviderProps) => {\n const [contentType, setContentType] = useState('none');\n const [metadata, setMetadata] = useState({\n sectionIds: [],\n disabledSectionIds: [],\n input: {} as ListingDetailsAutoPricingSectionUpdates,\n onSelectedSectionsChange: () => void 0,\n });\n\n const onCloseSidePanel = useCallback(() => {\n if (contentType !== 'none') {\n setContentType('none');\n }\n }, [contentType]);\n\n const onShowContent = useCallback(\n (\n newContentType: PanelContentType,\n e?: React.MouseEvent\n ) => {\n e?.stopPropagation();\n e?.preventDefault();\n\n if (contentType !== newContentType) {\n setContentType(newContentType);\n } else if (contentType !== 'none') {\n setContentType('none');\n }\n },\n [contentType, setContentType]\n );\n\n const updateMetadata = useCallback(\n (data: any) => {\n const { onSelectedSectionsChange: onSelectedSectionsChange, ...rest } =\n data;\n const {\n onSelectedSectionsChange: newOnSelectedSectionsChange,\n ...newRest\n } = metadata;\n if (!isEqual(rest, newRest)) {\n setMetadata(data);\n }\n },\n [metadata, setMetadata]\n );\n\n return (\n \n {children}\n \n );\n};\n\nexport const useAutoPricingSidePanelContext = () =>\n useContext(AutoPricingSidePanelContext);\n","import { useQuery } from '@tanstack/react-query';\nimport { useMemo, useState } from 'react';\nimport { useDebounce } from 'react-use';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport {\n ListingClient,\n ListingDetailsPricingUpdates,\n} from 'src/WebApiController';\n\nimport { useAutoPricingSidePanelContext } from '../../../AutoPricingSidePanel';\n\ntype AutoPricingPreviewQueryKeyType =\n | {\n listingId: number | undefined;\n eventId: number | null;\n priceUpdates: ListingDetailsPricingUpdates;\n }\n | undefined;\n\nexport const useAutoPricingPreview = (\n viagogoEventId: number | null,\n listingId?: number | undefined\n) => {\n const { metadata } = useAutoPricingSidePanelContext();\n\n const priceUpdates = useMemo(() => {\n const {\n netProceedsFloor,\n netProceedsCeiling,\n autoPricingEnabled,\n currencyCode,\n\n compListingFloor,\n compListingCeiling,\n compListingMode,\n compListingOnlyForSameZoneEnabled,\n compListingOnlyForSelectedSectionsEnabled,\n compListingExcludeFanInventory,\n compListingExcludeDefects,\n compListingQuantityScoreAdjustmentEnabled,\n compListingQuantityScoreAdjustmentOverrideJson,\n compListingSelectedSectionSettings,\n compListingQuantityFilters,\n\n undercutMode,\n undercutAbsoluteAmount,\n undercutRelativeAmount,\n\n circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerMaxDiscountVelocityTicksInHours,\n circuitBreakerMinCompListingCount,\n circuitBreakerRelativeCeiling,\n circuitBreakerRelativeFloor,\n\n outlierMode,\n outlierStandardDeviations,\n outlierKthLowestLimit,\n outlierKthLowestLimitRelativeSpacing,\n outlierKthLowestLimitAbsoluteSpacing,\n } = metadata.input ?? {};\n\n return {\n netProceedsFloor,\n netProceedsCeiling,\n autoPricingEnabled,\n currencyCode,\n\n compListingFloor,\n compListingCeiling,\n compListingMode,\n compListingOnlyForSameZoneEnabled,\n compListingOnlyForSelectedSectionsEnabled,\n compListingExcludeFanInventory,\n compListingExcludeDefects,\n compListingQuantityScoreAdjustmentEnabled,\n compListingQuantityScoreAdjustmentOverrideJson,\n compListingSelectedSectionSettings,\n compListingQuantityFilters,\n\n undercutMode,\n undercutAbsoluteAmount,\n undercutRelativeAmount,\n\n circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerMaxDiscountVelocityTicksInHours,\n circuitBreakerMinCompListingCount,\n circuitBreakerRelativeCeiling,\n circuitBreakerRelativeFloor,\n\n outlierMode,\n outlierStandardDeviations,\n outlierKthLowestLimit,\n outlierKthLowestLimitRelativeSpacing,\n outlierKthLowestLimitAbsoluteSpacing,\n } as ListingDetailsPricingUpdates;\n }, [metadata.input]);\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n\n const [queryKey, setQueryKey] =\n useState(undefined);\n\n useDebounce(\n () =>\n setQueryKey({\n eventId: viagogoEventId,\n listingId,\n priceUpdates: priceUpdates,\n }),\n 300,\n [viagogoEventId, listingId, JSON.stringify(priceUpdates)]\n );\n\n const { trackError } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const shouldQuery = Boolean(\n activeAccountWebClientConfig.activeAccountId != null &&\n queryKey?.eventId &&\n queryKey?.listingId &&\n queryKey?.priceUpdates\n );\n\n const priceCalcQuery = useQuery({\n queryKey: ['ListingClient.getListingPriceCalculation', queryKey],\n queryFn: async () => {\n if (!shouldQuery) {\n return null;\n }\n\n const r = await new ListingClient(\n activeAccountWebClientConfig\n ).getListingPriceCalculation(\n queryKey?.eventId ?? undefined,\n queryKey?.listingId ?? undefined,\n queryKey?.priceUpdates!\n );\n return r;\n },\n\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n networkMode: 'offlineFirst',\n meta: {\n persist: false,\n onError: (error: ErrorTypes) => {\n trackError(\n 'ListingClient.getListingPriceCalculation',\n error,\n priceUpdates\n );\n },\n },\n });\n\n return { priceCalcQuery, priceUpdates };\n};\n","import { AutoPriceResultDisplay } from 'src/components/Listings/AutoPriceResultDisplay';\nimport { Content } from 'src/contexts/ContentContext';\nimport { WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { Button, Stack } from 'src/core/ui';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { AutoPricingResultType } from 'src/WebApiController';\n\nimport { useAutoPricingSidePanelContext } from '../../../AutoPricingSidePanel';\nimport * as styles from './AutoPricePreview.css';\nimport { useAutoPricingPreview } from './useAutoPricePreview';\n\nexport const AutoPricePreview = ({\n viagogoEventId,\n listingId,\n}: {\n listingId: number;\n viagogoEventId: number;\n}) => {\n const { priceCalcQuery } = useAutoPricingPreview(viagogoEventId, listingId);\n const isMobile = useMatchMedia('mobile');\n const { onShowContent } = useAutoPricingSidePanelContext();\n\n return (\n onShowContent('comparables', e)} // undefined is for toggle\n >\n \n \n \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n {priceCalcQuery.data?.autoPricingResultType && // show when result type is not null and\n priceCalcQuery.data?.autoPricingResultType !==\n AutoPricingResultType.PriceSuccess && // is not success result and\n (priceCalcQuery.data?.autoPricingResultType !==\n AutoPricingResultType.None || // is not none or there's no price display (we show N/A when there's no price indicating we can't even call the endpoint)\n !priceCalcQuery.data?.websitePrice?.disp) && (\n \n )}\n {priceCalcQuery.data?.websitePrice?.disp}\n
    \n
    \n \n
    \n \n \n
    \n {priceCalcQuery.data?.compListings?.length ?? '0'}\n
    \n
    \n \n
    \n \n onShowContent('comparables', e)}\n style={isMobile ? { width: '100%' } : undefined}\n >\n \n \n \n {priceCalcQuery.data?.errorMessage && (\n \n )}\n \n \n );\n};\n","import { useMemo } from 'react';\nimport { FilterPillList } from 'src/components/common/FilterPill/FilterPillList';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { Listing } from 'src/WebApiController';\n\nimport { useAutoPricingSettings } from '../useAutoPricingSettings';\n\n/**\n * @deprecated - Do not use\n */\nexport const AutoPricingSectionRowIdFilter = ({\n listing,\n disabled,\n}: {\n listing?: Listing | null;\n disabled?: boolean;\n}) => {\n const { venueMapQuery } = useEventMapContext();\n const {\n onCompListingChange,\n onCompListingSectionIdFilterChange,\n compListingSelectedSectionSettings,\n } = useAutoPricingSettings(listing);\n\n const selectedSections = useMemo(() => {\n const formSectionFilterIds =\n compListingSelectedSectionSettings?.sectionIdFilter ?? [];\n return (\n venueMapQuery.data?.sections.filter((section) => {\n return formSectionFilterIds.includes(section.id);\n }) ?? []\n );\n }, [\n compListingSelectedSectionSettings?.sectionIdFilter,\n venueMapQuery.data?.sections,\n ]);\n\n const rowIdFilters = useMemo(() => {\n return compListingSelectedSectionSettings?.rowIdFilter ?? [];\n }, [compListingSelectedSectionSettings]);\n\n const sectionRowIdFilters = useMemo(() => {\n return compListingSelectedSectionSettings?.sectionRowIdFilter ?? {};\n }, [compListingSelectedSectionSettings]);\n\n const applyCompListingChanges = (\n rowIdFilters: number[],\n sectionRowIdFilters: { [x: string]: string }\n ) => {\n const compListingSelectedSectionSettingsNew = {\n ...compListingSelectedSectionSettings,\n sectionIdFilter:\n compListingSelectedSectionSettings?.sectionIdFilter ?? [],\n rowIdFilter: Array.from(new Set(rowIdFilters)),\n sectionRowIdFilter: sectionRowIdFilters,\n };\n\n onCompListingChange({\n compListingSelectedSectionSettingsNew,\n compListingOnlyForSelectedSectionsEnabledNew: true,\n });\n };\n\n return (\n
    \n \n
    \n );\n};\n","import { useFormContext } from 'react-hook-form';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosMultiSelect } from 'src/core/POS/PosMultiSelect';\nimport { getTextFieldState } from 'src/core/POS/PosTextField';\nimport { Stack } from 'src/core/ui';\nimport { ToggleGroup } from 'src/core/ui/ToggleGroup';\nimport { useCompQuantitiesFilter } from 'src/hooks/useCompQuantitiesFilter';\nimport { useUndercutAmountSettings } from 'src/hooks/useUndercutAmountSettings';\nimport { DetailGroup } from 'src/modals/common';\nimport {\n UNDERCUT_PRICE_MODE_OPTIONS,\n UndercutPriceSettingsMode,\n} from 'src/utils/autoPricingUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n AutoPricingUndercutMode,\n Listing,\n ListingDetailsAutoPricingSectionUpdates,\n} from 'src/WebApiController';\n\nimport { useAutoPricingSettings } from '../useAutoPricingSettings';\nimport { AutoPricingSectionRowIdFilter } from './AutoPricingSectionRowIdFilter';\nimport * as styles from './SimplifiedAutopricingGuidedPrice.css';\n\ntype SimplifiedAutopricingGuidedPriceProps = {\n listing?: Listing | null;\n listingHasParent?: boolean;\n disabled?: boolean;\n isMarketListingsView?: boolean;\n};\n\n/**\n * @deprecated - Do not use\n */\nexport const SimplifiedAutopricingGuidedPrice = ({\n listing,\n disabled,\n isMarketListingsView,\n}: SimplifiedAutopricingGuidedPriceProps) => {\n const { clearErrors, formState } =\n useFormContext();\n\n const {\n canAutoPrice,\n uiCurrency,\n eventPricingSettings,\n accountPricingSettings,\n undercutMode,\n undercutAbsoluteAmount,\n undercutRelativeAmount,\n onUndercutChange,\n skipUndercut,\n compListingQuantityScoreAdjustmentOverrideJson,\n onCompListingChange,\n } = useAutoPricingSettings(listing);\n\n const {\n quantitiesFilterOptions,\n quantitiesFilterValue,\n onUpdateQuantitiesFilter,\n } = useCompQuantitiesFilter(\n compListingQuantityScoreAdjustmentOverrideJson,\n onCompListingChange\n );\n\n const autopricingSettingsAvailable = canAutoPrice || isMarketListingsView;\n\n const parsedQuantityOverridesJson = JSON.parse(\n compListingQuantityScoreAdjustmentOverrideJson || 'null'\n );\n\n const quantityFilterValue = parsedQuantityOverridesJson?.quantityFilter;\n\n const { undercutAbsoluteAmountMode, setUndercutAbsoluteAmountMode } =\n useUndercutAmountSettings(undercutAbsoluteAmount, undercutRelativeAmount);\n\n const isDealScoreMode =\n (undercutMode ??\n eventPricingSettings?.undercutMode ??\n accountPricingSettings?.undercutMode) === AutoPricingUndercutMode.Deal;\n const undercutAbsoluteAmountError =\n formState.errors.undercutAbsoluteAmount?.message;\n\n return (\n <>\n {isDealScoreMode && (\n
    \n \n
    \n )}\n\n \n {canAutoPrice && (\n \n {\n if (!value) return;\n\n const mode = value as UndercutPriceSettingsMode;\n setUndercutAbsoluteAmountMode(mode);\n\n if (undercutAbsoluteAmount) {\n const curAmountAbs = Math.abs(undercutAbsoluteAmount);\n onUndercutChange(\n undefined,\n mode == UndercutPriceSettingsMode.Premium\n ? -curAmountAbs\n : curAmountAbs\n );\n }\n }}\n />\n
    \n \n
    \n \n {\n clearErrors('undercutAbsoluteAmount');\n clearErrors('undercutRelativeAmount');\n const v = parseFloat(e.target.value);\n if (v >= 0 && v <= Number.MAX_VALUE) {\n if (\n undercutAbsoluteAmountMode ===\n UndercutPriceSettingsMode.Premium\n ) {\n onUndercutChange(undefined, -v);\n } else {\n onUndercutChange(undefined, v);\n }\n } else {\n onUndercutChange(undefined, null);\n }\n }}\n />\n \n
    \n )}\n\n {autopricingSettingsAvailable && listing && (\n \n
    \n \n
    \n \n\n \n
    \n )}\n
    \n \n );\n};\n","import { ChangeEvent } from 'react';\nimport { useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { ButtonWithIcon } from 'src/components/Buttons';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { Switch } from 'src/core/interim/Switch';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { Stack } from 'src/core/ui';\nimport { Slider } from 'src/core/ui/Slider';\nimport { ToggleGroup } from 'src/core/ui/ToggleGroup';\nimport { useAvailableAutopricingModes } from 'src/hooks/useAvailableAutopricingModes';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { DetailGroup, DetailSection, SectionContent } from 'src/modals/common';\nimport { ResetIcon } from 'src/svgs/Viagogo';\nimport {\n OUTLIER_MODE_KTH_LOWEST_STRATEGY,\n OutlierModeKthLowestStrategy,\n} from 'src/utils/autoPricingUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { STANDARD_DEVIATIONS_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { roundToPrecision } from 'src/utils/numberFormatter';\nimport { getCompleteEventConfigScoreOverrides } from 'src/utils/seatScoreUtils';\nimport {\n AutoPricingCompListingMode,\n AutoPricingOutlierMode,\n Feature,\n ListingDetails,\n ListingDetailsAutoPricingSectionUpdates,\n} from 'src/WebApiController';\n\nimport { useAutoPricingSettings } from '../useAutoPricingSettings';\nimport * as styles from './PricingSection.css';\n\nexport const AdvancePricingSettings = ({\n listing,\n disabled: externalDisabled,\n}: {\n listing?: ListingDetails;\n disabled?: boolean;\n}) => {\n const { clearErrors } =\n useFormContext();\n const [outlierKthLowestStrategy, setKthLowestOutlierStrategy] = useState<\n OutlierModeKthLowestStrategy | undefined\n >(OutlierModeKthLowestStrategy.Relative);\n\n const {\n canSetPrice,\n onResetAdvanceSettings,\n\n circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerMaxDiscountVelocityTicksInHours,\n circuitBreakerMinCompListingCount,\n\n compListingMode,\n compListingQuantityScoreAdjustmentEnabled,\n compListingExcludeFanInventory,\n compListingExcludeDefects,\n\n outlierMode,\n outlierStandardDeviations,\n outlierKthLowestLimit,\n outlierKthLowestLimitAbsoluteSpacing,\n outlierKthLowestLimitRelativeSpacing,\n\n onCompListingChange,\n onCircuitBreakerChange,\n onOutlierChange,\n\n skipAdvancePricing,\n } = useAutoPricingSettings(listing);\n\n const { activeConfigOverride, venueMapQuery } = useEventMapContext();\n const hasExcludeFanInventoryFeature = useUserHasFeature(\n Feature.ExcludeFanInventory\n );\n const hasExcludeDefectsFeature = useUserHasFeature(Feature.ExcludeDefects);\n\n const scores = getCompleteEventConfigScoreOverrides(\n venueMapQuery.data?.sectionScores,\n activeConfigOverride?.scoreOverrides,\n false\n );\n\n const { outlierModes, outlierModesDisabled } = useAvailableAutopricingModes(\n true,\n null,\n null,\n Boolean(scores?.some((s) => s.score))\n );\n\n const disabled = externalDisabled || Boolean(skipAdvancePricing);\n\n return (\n }\n >\n \n {skipAdvancePricing ? null : (\n <>\n {compListingMode === AutoPricingCompListingMode.QualityScore && (\n \n \n }\n >\n ) =>\n e.stopPropagation()\n }\n onChange={(e) => {\n const isChecked = e.target.checked;\n if (\n isChecked !== compListingQuantityScoreAdjustmentEnabled\n ) {\n onCompListingChange({\n compListingQuantityScoreAdjustmentEnabledNew:\n isChecked,\n });\n }\n }}\n />\n \n \n )}\n {hasExcludeFanInventoryFeature && (\n \n }\n >\n ) =>\n e.stopPropagation()\n }\n onChange={(e) => {\n const isChecked = e.target.checked;\n if (isChecked !== compListingExcludeFanInventory) {\n onCompListingChange({\n compListingExcludeFanInventoryNew: isChecked,\n });\n }\n }}\n />\n \n \n )}\n {/*\n * [NOTE]\n * Exclude defects feature was built first before product changed their mind for the\n * UI to instead show the opposite, \"Include Defects\" with a default value of false.\n * Originally, the requirement was \"Exclude Defects\" with a default value of true.\n * The DB columns and pricer backend has already been finished with logic revolving\n * around the \"Exclude Defect\" verbiage, with the logic gates predicating busisness logic\n * off of \"exclude\". The UI will now show the copy \"Include Defects\" and invert the value\n * being read/written from the database, but the rest of the backend (pricer + site) will remain\n * unchanged.\n */}\n {hasExcludeDefectsFeature && (\n \n }>\n ) =>\n e.stopPropagation()\n }\n onChange={(e) => {\n const compListingExcludeDefectsNew = !e.target.checked;\n if (\n compListingExcludeDefectsNew !==\n compListingExcludeDefects\n ) {\n onCompListingChange({\n compListingExcludeDefectsNew:\n compListingExcludeDefectsNew,\n });\n }\n }}\n />\n \n \n )}\n \n }\n >\n {\n onCircuitBreakerChange(\n undefined,\n undefined,\n undefined,\n undefined,\n Math.round(count)\n );\n }}\n />\n \n \n \n }>\n e.stopPropagation()}\n onChange={(v) => {\n onOutlierChange({\n outlierModeNew: v as AutoPricingOutlierMode,\n });\n }}\n />\n \n \n {outlierMode == AutoPricingOutlierMode.StandardDeviations ? (\n \n }\n >\n e.stopPropagation()}\n onChange={(v) => {\n const value = parseInt(v ?? '');\n if (value != null && !isNaN(value)) {\n onOutlierChange({\n outlierModeNew:\n AutoPricingOutlierMode.StandardDeviations,\n outlierStandardDeviationsNew: value,\n });\n } else {\n onOutlierChange({\n outlierModeNew:\n AutoPricingOutlierMode.StandardDeviations,\n outlierStandardDeviationsNew: null,\n });\n }\n }}\n />\n \n \n ) : outlierMode == AutoPricingOutlierMode.KthLowest ? (\n \n \n \n {\n const v = parseInt(e.target.value);\n onOutlierChange({\n outlierModeNew: AutoPricingOutlierMode.KthLowest,\n outlierKthLowestLimitNew: v,\n });\n }}\n />\n \n {outlierKthLowestStrategy ==\n OutlierModeKthLowestStrategy.Relative ? (\n {\n let v = parseInt(e.target.value);\n if (v < 0) {\n v = 0;\n } else if (v > 100) {\n v = 100;\n }\n\n if (!isNaN(v)) {\n onOutlierChange({\n outlierModeNew: AutoPricingOutlierMode.KthLowest,\n outlierKthLowestLimitNew: undefined,\n outlierKthLowestLimitAbsoluteSpacingNew: null,\n outlierKthLowestLimitRelativeSpacingNew: v,\n });\n }\n }}\n />\n ) : (\n {\n const v = parseInt(e.target.value);\n onOutlierChange({\n outlierModeNew: AutoPricingOutlierMode.KthLowest,\n outlierKthLowestLimitNew: undefined,\n outlierKthLowestLimitAbsoluteSpacingNew: v,\n outlierKthLowestLimitRelativeSpacingNew: null,\n });\n }}\n />\n )}\n {\n if (!value) {\n return;\n }\n\n const strat = value as OutlierModeKthLowestStrategy;\n setKthLowestOutlierStrategy(strat);\n }}\n />\n \n \n \n ) : null}\n \n \n \n {\n clearErrors('circuitBreakerMaxDiscountVelocityPercent');\n const v = parseFloat(e.target.value) / 100;\n onCircuitBreakerChange(\n undefined,\n undefined,\n v,\n undefined,\n undefined\n );\n }}\n />\n \n {\n const v = parseInt(e.target.value);\n onCircuitBreakerChange(\n undefined,\n undefined,\n undefined,\n v,\n undefined\n );\n }}\n />\n \n \n \n \n }\n textContentId={ContentId.ResetSettings}\n onClick={onResetAdvanceSettings}\n />\n \n \n )}\n \n \n );\n};\n","export enum RestrictSelectionType {\n SameZone = 'SameZone',\n SpecificSections = 'SpecificSections',\n SameSection = 'SameSection',\n}\n","/* eslint-disable react-hooks/exhaustive-deps */\nimport { isEqual, pickBy } from 'lodash-es';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { useCompListingDisabledSections } from 'src/hooks/useCompListingDisabledSections';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n getMatchingSectionRow,\n getSectionsSameZone,\n} from 'src/utils/seatScoreUtils';\nimport {\n Listing,\n ListingDetailsAutoPricingSectionUpdates,\n} from 'src/WebApiController';\n\nimport { useAutoPricingSettings } from '../useAutoPricingSettings';\nimport { RestrictSelectionType } from './AutoPricingSection.types';\n\nexport const useRestrictSelection = (\n listing: Listing | undefined,\n defaultRestrictSelectionType: RestrictSelectionType,\n restrictSelectionTypes: Record\n) => {\n const {\n compListingMode,\n compListingFloor,\n compListingCeiling,\n compListingOnlyForSameZoneEnabled,\n compListingOnlyForSelectedSectionsEnabled,\n compListingSelectedSectionSettings,\n onCompListingChange,\n } = useAutoPricingSettings(listing);\n\n const { clearErrors } =\n useFormContext();\n const { venueMapQuery } = useEventMapContext();\n\n const matchingSectionRow = useMemo(() => {\n if (listing && venueMapQuery.data) {\n return getMatchingSectionRow(\n listing.seating,\n venueMapQuery.data.sections\n );\n }\n return null;\n }, [listing, venueMapQuery]);\n\n const { disabledSectionIds } = useCompListingDisabledSections(\n listing,\n false,\n compListingMode,\n compListingFloor,\n compListingCeiling\n );\n\n useEffect(() => {\n if (\n !disabledSectionIds.length ||\n !compListingSelectedSectionSettings?.sectionIdFilter\n ) {\n return;\n }\n\n const sectionIdFilterNew =\n compListingSelectedSectionSettings.sectionIdFilter.filter(\n (sid) => !disabledSectionIds.includes(sid)\n );\n\n if (\n !isEqual(\n sectionIdFilterNew,\n compListingSelectedSectionSettings.sectionIdFilter\n )\n ) {\n const compListingSelectedSectionSettingsNew = {\n ...compListingSelectedSectionSettings,\n sectionIdFilter: sectionIdFilterNew,\n };\n onCompListingChange({ compListingSelectedSectionSettingsNew });\n }\n }, [disabledSectionIds]);\n\n const [restrictSelectionType, setRestrictSelectionType] =\n useState(defaultRestrictSelectionType);\n\n const updateToSameZone = useCallback((): void => {\n if (\n listing &&\n venueMapQuery.data &&\n Object.keys(restrictSelectionTypes).includes(\n RestrictSelectionType.SpecificSections\n )\n ) {\n // Display all sections in the same zone\n const sectionsSameZone = getSectionsSameZone(\n listing.seating,\n venueMapQuery.data.sections\n )?.filter((s) => !disabledSectionIds.includes(s.id));\n if (sectionsSameZone) {\n const sectionIdFilter = sectionsSameZone\n .toSorted((a, b) => a.name.localeCompare(b.name))\n .map((s) => s.id);\n const rowIdFilter = (sectionsSameZone ?? [])\n .flatMap(({ rows }) => rows)\n .map(({ id }) => id);\n const sectionRowIdFilter = pickBy(\n Object.assign(\n {},\n compListingSelectedSectionSettings?.sectionRowIdFilter ?? {}\n ),\n (_, key) => sectionIdFilter.includes(parseInt(key))\n );\n const compListingSelectedSectionSettingsNew = {\n ...compListingSelectedSectionSettings,\n sectionIdFilter,\n rowIdFilter,\n sectionRowIdFilter,\n };\n onCompListingChange({\n compListingSelectedSectionSettingsNew,\n compListingOnlyForSameZoneEnabledNew: true,\n compListingOnlyForSelectedSectionsEnabledNew: false,\n });\n }\n }\n }, [\n compListingSelectedSectionSettings,\n disabledSectionIds,\n listing,\n onCompListingChange,\n restrictSelectionTypes,\n venueMapQuery.data,\n ]);\n\n const updateToSameSection = useCallback((): void => {\n const sectionIdFilter = matchingSectionRow?.section?.id\n ? [matchingSectionRow.section.id]\n : [];\n const rowIdFilter = compListingSelectedSectionSettings?.rowIdFilter ?? [];\n const sectionRowIdFilter = pickBy(\n Object.assign(\n {},\n compListingSelectedSectionSettings?.sectionRowIdFilter ?? {}\n ),\n (_, key) => sectionIdFilter.includes(parseInt(key))\n );\n const compListingSelectedSectionSettingsNew = {\n ...compListingSelectedSectionSettings,\n sectionIdFilter,\n rowIdFilter,\n sectionRowIdFilter,\n };\n onCompListingChange({\n compListingOnlyForSameZoneEnabledNew: false,\n compListingOnlyForSelectedSectionsEnabledNew: true,\n compListingSelectedSectionSettingsNew,\n });\n }, []);\n\n useEffect(() => {\n if (\n compListingOnlyForSelectedSectionsEnabled &&\n restrictSelectionType !== RestrictSelectionType.SameSection &&\n RestrictSelectionType.SpecificSections in restrictSelectionTypes\n ) {\n setRestrictSelectionType(RestrictSelectionType.SpecificSections);\n } else if (\n compListingOnlyForSameZoneEnabled &&\n restrictSelectionType !== RestrictSelectionType.SameZone &&\n RestrictSelectionType.SameZone in restrictSelectionTypes\n ) {\n setRestrictSelectionType(RestrictSelectionType.SameZone);\n }\n }, [\n compListingOnlyForSameZoneEnabled,\n compListingOnlyForSelectedSectionsEnabled,\n restrictSelectionTypes,\n ]);\n\n const onRestrictSelectionTypeChange = useCallback(\n (type: RestrictSelectionType | null) => {\n clearErrors('compListingFloor');\n setRestrictSelectionType(type ?? defaultRestrictSelectionType);\n if (type === RestrictSelectionType.SameZone) {\n return updateToSameZone();\n } else if (type === RestrictSelectionType.SpecificSections) {\n onCompListingChange({\n compListingOnlyForSameZoneEnabledNew: false,\n compListingOnlyForSelectedSectionsEnabledNew: true,\n });\n return;\n } else {\n // Same section\n updateToSameSection();\n }\n },\n [\n clearErrors,\n setRestrictSelectionType,\n updateToSameZone,\n onCompListingChange,\n updateToSameSection,\n ]\n );\n\n return {\n restrictSelectionType,\n disabledSectionIds,\n onRestrictSelectionTypeChange,\n };\n};\n","import { ChangeEvent, useCallback, useEffect, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { ButtonWithIcon } from 'src/components/Buttons';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { Switch } from 'src/core/interim/Switch';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosMultiSelect } from 'src/core/POS/PosMultiSelect';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { getTextFieldState, PosTextField } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { Slider } from 'src/core/ui/Slider';\nimport { ToggleGroup } from 'src/core/ui/ToggleGroup';\nimport { SectionSelectDialog } from 'src/dialogs/SectionSelectDialog';\nimport { useAvailableAutopricingModes } from 'src/hooks/useAvailableAutopricingModes';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useCompQuantitiesFilter } from 'src/hooks/useCompQuantitiesFilter';\nimport { useAllInPriceFromListPrice } from 'src/hooks/useListAndAllInPrice';\nimport { useUndercutAmountSettings } from 'src/hooks/useUndercutAmountSettings';\nimport { Detail, DetailGroup } from 'src/modals/common';\nimport { EditIcon, IconsFill, PlusIcon, ResetIcon } from 'src/svgs/Viagogo';\nimport {\n convertSliderValueFromServer,\n convertSliderValueToServer,\n getUndercutPriceRepresentingMode,\n SLIDER_MAX,\n SLIDER_MIN,\n UNDERCUT_PRICE_MODE_OPTIONS,\n UndercutPriceSettingsMode,\n} from 'src/utils/autoPricingUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { AUTO_PRICING_RESULT_TYPES_OPTIONS_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { roundToPrecision } from 'src/utils/numberFormatter';\nimport { getCompleteEventConfigScoreOverrides } from 'src/utils/seatScoreUtils';\nimport {\n AutoPricingCompListingMode,\n AutoPricingUndercutMode,\n Listing,\n ListingDetailsAutoPricingSectionUpdates,\n} from 'src/WebApiController';\n\nimport { useAutoPricingSidePanelContext } from '../../AutoPricingSidePanel';\nimport { AutoPricingSectionRowIdFilter } from '../components/AutoPricingSectionRowIdFilter';\nimport { useAutoPricingSettings } from '../useAutoPricingSettings';\nimport { RestrictSelectionType } from './AutoPricingSection.types';\nimport { useRestrictSelection } from './AutoPricingSettingsSection.hook';\nimport * as styles from './PricingSection.css';\n\n/**\n * @deprecated - Do not use\n */\nexport const AutoPricingSettingsSection = ({\n listing,\n disabled,\n listingHasParent,\n}: {\n listing?: Listing;\n disabled?: boolean;\n listingHasParent: boolean;\n}) => {\n const autoPricingResultStateContent = (\n AUTO_PRICING_RESULT_TYPES_OPTIONS_TO_CID as Record<\n string,\n string | undefined\n >\n )[listing?.autoPrcResult ?? ''];\n\n const { setValue, clearErrors, formState } =\n useFormContext();\n\n const sectionSelectDialog = useBasicDialog();\n\n const { contentType, onShowContent, onCloseSidePanel } =\n useAutoPricingSidePanelContext();\n\n const {\n canSetPrice,\n showAutoPricingSettings,\n uiCurrency,\n currencyNumberFormat,\n\n onResetSettings,\n eventPricingSettings,\n accountPricingSettings,\n\n undercutMode,\n undercutAbsoluteAmount,\n undercutRelativeAmount,\n\n compListingMode,\n compListingFloor,\n compListingCeiling,\n compListingSelectedSectionSettings,\n compListingOnlyForSameZoneEnabled,\n compListingOnlyForSelectedSectionsEnabled,\n compListingQuantityScoreAdjustmentOverrideJson,\n\n onUndercutChange,\n onCompListingChange,\n onCompListingModeChange,\n\n skipCompListing,\n skipUndercut,\n } = useAutoPricingSettings(listing);\n\n const {\n undercutAbsoluteAmountMode,\n setUndercutAbsoluteAmountMode,\n undercutRelativeAmountMode,\n setUndercutRelativeAmountMode,\n } = useUndercutAmountSettings(undercutAbsoluteAmount, undercutRelativeAmount);\n\n const {\n quantitiesFilterOptions,\n quantitiesFilterValue,\n onUpdateQuantitiesFilter,\n } = useCompQuantitiesFilter(\n compListingQuantityScoreAdjustmentOverrideJson,\n onCompListingChange\n );\n\n const compListingFloorError = formState.errors.compListingFloor?.message;\n const compListingSelectedSectionError =\n formState.errors.compListingSelectedSectionSettings?.message;\n\n const parsedQuantityOverridesJson = JSON.parse(\n compListingQuantityScoreAdjustmentOverrideJson || 'null'\n );\n\n const quantityFilterValue: number | null =\n parsedQuantityOverridesJson?.quantityFilter;\n\n const undercutAbsoluteAmountError =\n formState.errors.undercutAbsoluteAmount?.message;\n const undercutRelativeAmountError =\n formState.errors.undercutRelativeAmount?.message;\n\n const { activeConfigOverride, venueMapsByScoreModelQuery } =\n useEventMapContext();\n\n const defaultScoreOverrides = useMemo(() => {\n // In the backend, if AVG scores are missing, then we always fallback to MVG, even if AVG is explicitly selected\n return (\n venueMapsByScoreModelQuery?.data?.AdvancedVenueGeometry?.sectionScores ??\n venueMapsByScoreModelQuery?.data?.MergedVenueGeometry?.sectionScores ??\n venueMapsByScoreModelQuery?.data?.VenueGeometry?.sectionScores\n );\n }, [\n venueMapsByScoreModelQuery?.data?.AdvancedVenueGeometry?.sectionScores,\n venueMapsByScoreModelQuery?.data?.MergedVenueGeometry?.sectionScores,\n venueMapsByScoreModelQuery?.data?.VenueGeometry?.sectionScores,\n ]);\n\n const scores = getCompleteEventConfigScoreOverrides(\n defaultScoreOverrides,\n activeConfigOverride?.scoreOverrides,\n false\n );\n\n const {\n compListingModes,\n compListingModesDisabled,\n undercutModes,\n undercutModesDisabled,\n defaultRestrictSelectionType,\n restrictSelectionTypes,\n } = useAvailableAutopricingModes(\n true,\n undercutMode,\n compListingMode,\n Boolean(scores?.some((s) => s.score)),\n listingHasParent,\n false,\n compListingOnlyForSelectedSectionsEnabled\n );\n\n if (\n compListingMode == AutoPricingCompListingMode.QualityScore &&\n compListingModesDisabled[AutoPricingCompListingMode.QualityScore] != null\n ) {\n setValue('compListingMode', AutoPricingCompListingMode.SameEvent);\n setValue('compListingOnlyForSameZoneEnabled', false);\n }\n\n const {\n restrictSelectionType,\n onRestrictSelectionTypeChange,\n disabledSectionIds,\n } = useRestrictSelection(\n listing,\n defaultRestrictSelectionType as RestrictSelectionType,\n restrictSelectionTypes\n );\n\n const isDealScoreMode =\n (undercutMode ??\n eventPricingSettings?.undercutMode ??\n accountPricingSettings?.undercutMode) === AutoPricingUndercutMode.Deal;\n\n const isParentListingMode =\n (compListingMode ??\n eventPricingSettings?.compListingMode ??\n accountPricingSettings?.compListingMode) ===\n AutoPricingCompListingMode.ParentListing;\n\n const showCompListingSettingsDetails = !(\n !compListingMode ||\n compListingMode === AutoPricingCompListingMode.SameZone ||\n compListingMode === AutoPricingCompListingMode.SameEvent ||\n compListingMode === AutoPricingCompListingMode.ParentListing\n );\n\n const showCompListingRestictSelectionDetails =\n compListingMode != null && Object.values(restrictSelectionTypes).length > 0;\n\n const hasAnyActiveRestrictionApplied = useMemo(() => {\n let applied = false;\n const restirctSelectionTypes = Object.keys(restrictSelectionTypes);\n restirctSelectionTypes.forEach((type) => {\n if (type === RestrictSelectionType.SameZone) {\n applied = applied || compListingOnlyForSameZoneEnabled === true;\n }\n if (\n type === RestrictSelectionType.SpecificSections ||\n type === RestrictSelectionType.SameSection\n ) {\n applied = applied || compListingOnlyForSelectedSectionsEnabled === true;\n }\n });\n\n return applied;\n }, [\n compListingOnlyForSameZoneEnabled,\n compListingOnlyForSelectedSectionsEnabled,\n restrictSelectionTypes,\n ]);\n\n const isCompListingAmountDisabled =\n disabled ||\n listing?.isDeleted ||\n !canSetPrice ||\n !compListingMode ||\n compListingMode === AutoPricingCompListingMode.SameZone ||\n compListingMode === AutoPricingCompListingMode.SameEvent ||\n compListingMode === AutoPricingCompListingMode.ParentListing;\n\n useEffect(() => {\n if (\n contentType === 'sectionSelection' &&\n (!showCompListingRestictSelectionDetails ||\n !hasAnyActiveRestrictionApplied)\n ) {\n onCloseSidePanel();\n }\n }, [\n showCompListingRestictSelectionDetails,\n hasAnyActiveRestrictionApplied,\n contentType,\n onShowContent,\n onCloseSidePanel,\n ]);\n\n const onLaunchSectionSelection = useCallback(\n (e: React.MouseEvent) => {\n if (listing?.id) {\n onShowContent('sectionSelection', e);\n } else {\n sectionSelectDialog.launchDialog();\n }\n },\n [listing?.id, onShowContent, sectionSelectDialog]\n );\n\n const marketPrice = useAllInPriceFromListPrice(listing?.undNewPrice, listing);\n\n if (!showAutoPricingSettings) return null;\n\n return (\n <>\n {skipCompListing ? null : (\n <>\n \n \n \n \n \n
    \n \n
    \n e.stopPropagation()}\n onChange={onCompListingModeChange}\n />\n
    \n
    \n {showCompListingSettingsDetails && (\n <>\n \n \n
    \n \n
    \n \n {\n const v = parseFloat(e.target.value);\n if (!isNaN(v)) {\n if (\n v >= SLIDER_MIN * 100 &&\n v <= SLIDER_MAX * 100 &&\n convertSliderValueToServer(v) < compListingCeiling\n ) {\n onCompListingChange({\n compListingFloorNew:\n convertSliderValueToServer(v),\n });\n }\n }\n }}\n postfixDisplay=\"%\"\n placeholder={\n compListingMode == null\n ? eventPricingSettings?.compListingFloor?.toString() ??\n accountPricingSettings?.compListingFloor?.toString() ??\n undefined\n : undefined\n }\n />\n \n
    \n \n
    \n \n {\n const v = parseFloat(e.target.value);\n if (!isNaN(v)) {\n if (\n v >= SLIDER_MIN * 100 &&\n v <= SLIDER_MAX * 100 &&\n convertSliderValueToServer(v) > compListingFloor\n ) {\n onCompListingChange({\n compListingCeilingNew:\n convertSliderValueToServer(v),\n });\n }\n }\n }}\n postfixDisplay=\"%\"\n placeholder={\n compListingMode == null\n ? eventPricingSettings?.compListingCeiling?.toString() ??\n accountPricingSettings?.compListingCeiling?.toString() ??\n undefined\n : undefined\n }\n />\n \n
    \n \n
    \n
    \n
    \n \n {!isCompListingAmountDisabled && (\n \n (\n \n {roundToPrecision(val, 0)}%\n \n )}\n onValueChange={([floor, ceil]) => {\n onCompListingChange({\n compListingFloorNew:\n convertSliderValueToServer(floor),\n compListingCeilingNew:\n convertSliderValueToServer(ceil),\n });\n }}\n />\n
    \n \n
    \n
    \n \n )}\n \n \n )}\n {showCompListingRestictSelectionDetails && (\n \n }\n style={{ width: '100%' }}\n >\n \n \n\n }\n style={{ width: '100%' }}\n >\n ) => e.stopPropagation()}\n onChange={(e) => {\n const isChecked = e.target.checked;\n if (isChecked) {\n if (!hasAnyActiveRestrictionApplied) {\n onCompListingChange({\n compListingOnlyForSameZoneEnabledNew:\n defaultRestrictSelectionType ===\n RestrictSelectionType.SameZone,\n compListingOnlyForSelectedSectionsEnabledNew:\n defaultRestrictSelectionType ===\n RestrictSelectionType.SpecificSections,\n });\n }\n } else {\n onCompListingChange({\n compListingOnlyForSameZoneEnabledNew: false,\n compListingOnlyForSelectedSectionsEnabledNew: false,\n compListingSelectedSectionSettingsNew: null,\n });\n }\n }}\n />\n \n {hasAnyActiveRestrictionApplied && (\n \n
    \n \n
    \n e.stopPropagation()}\n onChange={onRestrictSelectionTypeChange}\n />\n
    \n )}\n {hasAnyActiveRestrictionApplied && (\n \n \n {compListingSelectedSectionSettings?.sectionIdFilter\n ?.length ? (\n <>\n \n \n \n }\n textContentId={ContentId.EditSections}\n onClick={onLaunchSectionSelection}\n disabled={disabled}\n style={{ paddingLeft: 0, paddingRight: 0 }}\n />\n \n ) : (\n \n }\n textContentId={ContentId.SelectSections}\n onClick={onLaunchSectionSelection}\n disabled={disabled}\n style={{ padding: 0 }}\n />\n )}\n \n \n )}\n \n )}\n \n )}\n\n {skipUndercut ? null : (\n <>\n \n \n \n {isParentListingMode ? (\n
    \n \n
    \n ) : (\n <>\n \n \n
    \n \n
    \n e.stopPropagation()}\n onChange={(v) => {\n clearErrors('undercutAbsoluteAmount');\n clearErrors('undercutRelativeAmount');\n if (v) {\n onUndercutChange(v as AutoPricingUndercutMode);\n } else {\n onUndercutChange(null, null, null);\n }\n }}\n />\n
    \n \n
    \n
    \n
    \n {isDealScoreMode && (\n
    \n \n
    \n )}\n \n )}\n \n \n {\n if (!value) return;\n\n const mode = value as UndercutPriceSettingsMode;\n setUndercutRelativeAmountMode(mode);\n\n if (undercutRelativeAmount) {\n const curAmountAbs = Math.abs(undercutRelativeAmount);\n onUndercutChange(\n undefined,\n undefined,\n getUndercutPriceRepresentingMode(curAmountAbs, mode)\n );\n }\n }}\n />\n\n
    \n \n
    \n\n \n {\n clearErrors('undercutAbsoluteAmount');\n clearErrors('undercutRelativeAmount');\n const v = parseFloat(e.target.value);\n if (v >= 0 && v <= Number.MAX_VALUE) {\n const relativeValue = Math.min(v, 100) / 100;\n if (\n undercutRelativeAmountMode ===\n UndercutPriceSettingsMode.Premium\n ) {\n onUndercutChange(undefined, undefined, -relativeValue);\n } else {\n onUndercutChange(undefined, undefined, relativeValue);\n }\n } else {\n onUndercutChange(undefined, undefined, null);\n }\n }}\n />\n \n
    \n \n
    \n {\n if (!value) return;\n\n const mode = value as UndercutPriceSettingsMode;\n setUndercutAbsoluteAmountMode(mode);\n\n if (undercutAbsoluteAmount) {\n const curAmountAbs = Math.abs(undercutAbsoluteAmount);\n onUndercutChange(\n undefined,\n getUndercutPriceRepresentingMode(curAmountAbs, mode)\n );\n }\n }}\n />\n
    \n \n
    \n \n {\n clearErrors('undercutAbsoluteAmount');\n clearErrors('undercutRelativeAmount');\n const v = parseFloat(e.target.value);\n if (v >= 0 && v <= Number.MAX_VALUE) {\n if (\n undercutAbsoluteAmountMode ===\n UndercutPriceSettingsMode.Premium\n ) {\n onUndercutChange(undefined, -v);\n } else {\n onUndercutChange(undefined, v);\n }\n } else {\n onUndercutChange(undefined, null);\n }\n }}\n />\n \n
    \n
    \n \n )}\n {autoPricingResultStateContent && (\n \n \n }\n detail={\n \n \n \n }\n />\n {marketPrice != null && (\n }\n detail={{currencyNumberFormat.format(marketPrice)}}\n />\n )}\n \n \n )}\n \n }\n textContentId={ContentId.ResetSettings}\n onClick={onResetSettings}\n />\n \n {\n const compListingSelectedSectionSettingsNew = {\n ...compListingSelectedSectionSettings,\n sectionIdFilter: selectedSections.map((s) => s.id),\n rowIdFilter: compListingSelectedSectionSettings?.rowIdFilter ?? [],\n sectionRowIdFilter:\n compListingSelectedSectionSettings?.sectionRowIdFilter ?? {},\n };\n onCompListingChange({\n compListingOnlyForSameZoneEnabledNew: false,\n compListingOnlyForSelectedSectionsEnabledNew: true,\n compListingSelectedSectionSettingsNew,\n });\n sectionSelectDialog.closeDialog();\n clearErrors('compListingSelectedSectionSettings');\n }}\n onClosed={sectionSelectDialog.closeDialog}\n />\n \n );\n};\n","import { useCallback, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { Button, Stack, Switch } from 'src/core/ui';\nimport { useListingHasVenueMapInfo } from 'src/hooks/useListingHasVenueMapInfo';\nimport { DetailGroup, DetailSection, SectionContent } from 'src/modals/common';\nimport { ListingTab } from 'src/modals/ListingDetails/components/listingDetailsUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n Listing,\n ListingDetails,\n ListingDetailsAutoPricingSectionUpdates,\n} from 'src/WebApiController';\n\nimport { AutoPricePreview } from '../components/AutoPricePreview';\nimport { SimplifiedAutopricingGuidedPrice } from '../components/SimplifiedAutopricingGuidedPrice';\nimport { useAutoPricingSettings } from '../useAutoPricingSettings';\nimport { AdvancePricingSettings } from './AdvancePricingSection';\nimport { AutoPricingSettingsSection } from './AutoPricingSettingsSection';\nimport { AutoPricingStrategySection } from './AutoPricingStrategySection';\nimport { PricingProtection } from './PricingProtection';\n\n/**\n * @deprecated This component is deprecated and will be removed in a future version.\n * Please use ListingAutoPricingSettingsFormContentWrapper instead\n */\nexport const AutoPricingSection = ({\n listing,\n disabled,\n onSwitchToTab,\n}: {\n listing?: Listing | null;\n disabled?: boolean;\n onSwitchToTab?: (tabName: ListingTab) => void;\n}) => {\n const { setValue } =\n useFormContext();\n\n const {\n canSetPrice,\n canAutoPrice,\n autoPricingEnabled,\n setAutoPricingDefaults,\n showAutoPricingSettings,\n skipAutoPricing,\n event,\n } = useAutoPricingSettings(listing);\n\n const [showDetailedSettings, setShowDetailedSettings] = useState(false);\n\n const turnOffSkipSetting = useCallback(\n () => setValue('skipAutoPricing', false),\n [setValue]\n );\n\n const { mapExists, hasVenueMapInfo } = useListingHasVenueMapInfo(listing);\n\n if (!canSetPrice || !canAutoPrice) {\n return null;\n }\n\n return (\n <>\n }>\n \n {hasVenueMapInfo && canAutoPrice ? (\n <>\n \n \n \n }\n style={{ width: 'auto' }}\n >\n \n e.stopPropagation()}\n onCheckedChange={(isChecked) => {\n turnOffSkipSetting();\n if (isChecked !== autoPricingEnabled) {\n setValue('autoPricingEnabled', isChecked);\n\n if (isChecked) {\n // If enabled, set defaults where necessary\n setAutoPricingDefaults();\n }\n }\n }}\n />\n
    \n \n \n
    \n }\n >\n \n e.stopPropagation()}\n onCheckedChange={(isChecked) => {\n setShowDetailedSettings(isChecked);\n }}\n />\n \n \n \n
    \n\n {showDetailedSettings ? (\n <>\n {event?.viagId && listing?.id && (\n \n \n \n )}\n \n \n ) : (\n <>\n \n {event?.viagId && listing?.id && (\n \n \n \n )}\n \n )}\n \n ) : (\n \n \n {!canAutoPrice ? (\n \n ) : mapExists && !hasVenueMapInfo ? (\n <>\n \n\n onSwitchToTab?.(ListingTab.Broadcast)}\n style={{ width: 'max-content', padding: '0' }}\n >\n \n \n \n ) : (\n \n )}\n \n \n )}\n \n \n {showDetailedSettings && (\n \n )}\n {showDetailedSettings && hasVenueMapInfo && showAutoPricingSettings && (\n \n )}\n \n );\n};\n","import { isEmpty, pickBy } from 'lodash-es';\nimport { useCallback, useEffect } from 'react';\nimport { FormProvider, useFormContext } from 'react-hook-form';\nimport { useCompListingDisabledSections } from 'src/hooks/useCompListingDisabledSections';\nimport { useUserHasAutopricingFeature } from 'src/hooks/useUserHasAutopricingFeature';\nimport {\n Feature,\n ListingDetails,\n ListingDetailsAutoPricingSectionUpdates,\n SectionInfo,\n} from 'src/WebApiController';\n\nimport { ListingTab } from '../../components/listingDetailsUtils';\nimport { useListingDetailsContext } from '../../ListingDetailsModalV2Context';\nimport { useAutoPricingSidePanelContext } from '../AutoPricingSidePanel';\nimport { ListingAutoPricingSettingsFormContentWrapper } from './components/ListingAutoPricingSettingsFormContentWrapper/ListingAutoPricingSettingsFormContentWrapper';\nimport { AutoPricingSection } from './Sections/AutoPricingSection';\nimport { useAutoPricingSettings } from './useAutoPricingSettings';\n\ntype ListingDetailsAutoPricingFormProps = {\n listing: ListingDetails;\n};\n\nexport const ListingDetailsAutoPricingForm: React.FC<\n ListingDetailsAutoPricingFormProps\n> = ({ listing }) => {\n const { methods, isLoading, onTabChange } = useListingDetailsContext();\n\n return (\n \n \n \n );\n};\n\ntype ListingAutoPricingSettingsFormWrapperProps = {\n listing: ListingDetails;\n isLoading: boolean;\n onTabChange: (v: ListingTab) => void;\n};\n\nconst ListingAutoPricingSettingsFormWrapper: React.FC<\n ListingAutoPricingSettingsFormWrapperProps\n> = ({ listing, isLoading, onTabChange }) => {\n const hasIntelligibleAutoPricingSettingsFeature =\n useUserHasAutopricingFeature(Feature.IntelligibleAutoPricingSettings);\n const { watch } = useFormContext();\n const { updateMetadata } = useAutoPricingSidePanelContext();\n\n const input = watch();\n\n const {\n compListingMode,\n compListingFloor,\n compListingCeiling,\n compListingSelectedSectionSettings,\n onCompListingChange,\n } = useAutoPricingSettings(listing);\n\n const { disabledSectionIds } = useCompListingDisabledSections(\n listing,\n false,\n compListingMode,\n compListingFloor,\n compListingCeiling\n );\n\n const onSelectedSectionsChange = useCallback(\n (selectedSections: SectionInfo[]) => {\n // Restructure the id filters.\n const sectionIdFilter = selectedSections.map((s) => s.id);\n const selectedRowIds = selectedSections\n .flatMap(({ rows }) => rows)\n .map(({ id }) => id);\n const rowIdFilter = [];\n if (isEmpty(compListingSelectedSectionSettings?.rowIdFilter)) {\n rowIdFilter.push(...selectedRowIds);\n } else {\n rowIdFilter.push(\n ...(compListingSelectedSectionSettings?.rowIdFilter?.filter((rowId) =>\n selectedRowIds.includes(rowId)\n ) ?? [])\n );\n }\n const sectionRowIdFilter = pickBy(\n Object.assign(\n {},\n compListingSelectedSectionSettings?.sectionRowIdFilter ?? {}\n ),\n (_, key) => sectionIdFilter.includes(parseInt(key))\n );\n const compListingSelectedSectionSettingsNew = {\n ...compListingSelectedSectionSettings,\n sectionIdFilter,\n rowIdFilter,\n sectionRowIdFilter,\n };\n onCompListingChange({\n compListingOnlyForSameZoneEnabledNew: false,\n compListingOnlyForSelectedSectionsEnabledNew: true,\n compListingSelectedSectionSettingsNew,\n });\n },\n [compListingSelectedSectionSettings, onCompListingChange]\n );\n\n useEffect(() => {\n updateMetadata({\n input,\n sectionIds: compListingSelectedSectionSettings?.sectionIdFilter ?? [],\n disabledSectionIds,\n onSelectedSectionsChange,\n });\n }, [\n compListingSelectedSectionSettings?.sectionIdFilter,\n disabledSectionIds,\n onSelectedSectionsChange,\n input,\n updateMetadata,\n ]);\n\n return (\n <>\n {hasIntelligibleAutoPricingSettingsFeature ? (\n \n ) : (\n \n )}\n \n );\n};\n","import { useSyncCenterSettings } from 'src/hooks/api/useSyncCenterSetting';\nimport { PurchaseInfoSection } from 'src/modals/common/PurchaseInfoSection';\nimport { ListingDetails } from 'src/WebApiController';\n\ntype ListingDetailsPurchaseFormProps = {\n listing?: ListingDetails | null;\n};\n\nexport const ListingDetailsPurchaseForm: React.FC<\n ListingDetailsPurchaseFormProps\n> = ({ listing }) => {\n const settings = useSyncCenterSettings();\n const isAutoPoQualityControlled =\n settings.data?.isAutoPoQualityControlled ?? false;\n\n return (\n \n );\n};\n","import { Fragment } from 'react';\nimport { LinkAndCopy } from 'src/components/common/LinkAndCopy';\nimport { SeatingInfo } from 'src/components/common/SeatingInfo';\nimport { SaleMarketplaceIdDisplay } from 'src/components/Sales/SaleMarketplaceIdDisplay';\nimport { Content } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { Detail, DetailSection, SectionContent } from 'src/modals/common';\nimport * as styles from 'src/modals/ListingDetails/ListingForms/SalesForm/SalesForm.css';\nimport { SeatIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n getSaleDetailsRelativeUrl,\n getSaleStatusDisplayContentId,\n} from 'src/utils/saleUtils';\nimport { SaleDisplayInfo, Seating, Ticket } from 'src/WebApiController';\n\ninterface SalesDetailsSectionProps {\n ticketsBySalesId: Record | undefined;\n saleInfos: SaleDisplayInfo[] | undefined;\n seating?: Seating | null;\n sectionName: ContentId;\n}\n\nexport const SalesDetailsSection = ({\n ticketsBySalesId,\n seating,\n saleInfos,\n sectionName,\n}: SalesDetailsSectionProps) => {\n return (\n }>\n \n {saleInfos?.map((s) => {\n const { id, externalId, idOnMkp, mkp, stat } = s;\n const saleTickets = ticketsBySalesId?.[id];\n\n return (\n \n }\n detail={\n \n }\n />\n }\n />\n }\n detail={\n
    \n \n
    \n }\n />\n }\n detail={\n
    \n {saleTickets?.map((ticket) => {\n return (\n \n \n \n \n );\n })}\n
    \n }\n />\n
    \n );\n })}\n
    \n
    \n );\n};\n","import { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { SalesDetailsSection } from 'src/modals/ListingDetails/ListingForms/SalesForm/SalesDetailsSection';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n Feature,\n ListingDetails,\n PointOfSaleSaleStatus,\n Ticket,\n} from 'src/WebApiController';\n\ntype ListingDetailsSalesFormProps = {\n listing?: ListingDetails | null;\n};\n\nexport const ListingDetailsSalesForm: React.FC<\n ListingDetailsSalesFormProps\n> = ({ listing }) => {\n const hasWasteSaleFeature = useUserHasFeature(Feature.WasteSale);\n const { tickets = [] } = listing ?? {};\n const ticketsWithSales = tickets?.filter((ticket) => ticket.id);\n\n const ticketsBySalesId = ticketsWithSales?.reduce>(\n (acc, curr) => {\n if (!curr.id) return acc;\n const sale = acc[curr.id] ?? [];\n return { ...acc, [curr.id]: [...sale, curr] };\n },\n {}\n );\n\n const wastedSales = listing?.saleInfos?.filter(\n (saleInfo) => saleInfo.stat === PointOfSaleSaleStatus.Wasted\n );\n\n const nonWastedSales = listing?.saleInfos?.filter(\n (saleInfo) => saleInfo.stat !== PointOfSaleSaleStatus.Wasted\n );\n\n return (\n <>\n \n {hasWasteSaleFeature && (\n \n )}\n \n );\n};\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport {\n PropsWithChildren,\n useCallback,\n useContext,\n useMemo,\n useState,\n} from 'react';\nimport { createContext } from 'react';\nimport { UseFormReturn } from 'react-hook-form';\nimport { useToggle } from 'react-use';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useEventHubContext } from 'src/contexts/EventHubContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { SpinnerWrapper } from 'src/core/POS/PosSpinner/PosSpinner.styled';\nimport { TabItem } from 'src/core/ui/TabPanel/TabPanel.types';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n Event,\n Feature,\n ListingClient,\n ListingDetailDataField,\n ListingDetails,\n ListingDetailsAutoPricingSectionUpdates,\n ListingDetailsBroadcastSectionUpdates,\n ListingDetailsPricingSectionUpdates,\n ListingDetailsTagsSectionUpdates,\n ListingDetailsTicketSectionUpdates,\n} from 'src/WebApiController';\n\nimport {\n getListingDataFieldsForTab,\n ListingTab,\n} from './components/listingDetailsUtils';\nimport { useHasListingPricePermissions } from './components/useHasListingPricePermissions';\nimport { useListingDetailsMethods } from './ListingDetailsModalV2.hooks';\nimport { ListingDetailsAutoPricingForm } from './ListingForms/AutoPricingForm';\nimport { useAutoPricingSidePanelContext } from './ListingForms/AutoPricingSidePanel';\nimport { ListingDetailsBroadcastForm } from './ListingForms/BroadcastForm';\nimport { ListingDetailsPricingForm } from './ListingForms/PricingForm';\nimport { ListingDetailsPurchaseForm } from './ListingForms/PurchaseForm';\nimport { ListingDetailsSalesForm } from './ListingForms/SalesForm';\nimport { ListingDetailsTagsForm } from './ListingForms/TagsForm';\nimport { ListingDetailsTicketsForm } from './ListingForms/TicketsForm';\n\ntype ModalMethods = {\n broadcast: UseFormReturn<\n ListingDetailsBroadcastSectionUpdates,\n any,\n undefined\n >;\n tickets: UseFormReturn;\n tags: UseFormReturn;\n pricing: UseFormReturn;\n autoPricing: UseFormReturn<\n ListingDetailsAutoPricingSectionUpdates,\n any,\n undefined\n >;\n};\n\ntype ListingDetailsModalContextType = {\n event: Event | null | undefined;\n listing: ListingDetails | null | undefined;\n tabs: TabItem[];\n isLoading: boolean;\n hasChanges: boolean;\n activeTabIndex: number;\n setLoading: (nextValue: boolean) => void;\n onTabChange: (v: ListingTab) => void;\n setActiveTabIndex: React.Dispatch>;\n onSubmit: () => void;\n onReset: (tabIndex: number) => void;\n methods: ModalMethods;\n};\n\nconst ListingDetailsModalContext =\n createContext({\n event: null,\n listing: null,\n tabs: [],\n isLoading: false,\n hasChanges: false,\n activeTabIndex: 0,\n setLoading: (_: boolean) => void 0,\n onTabChange: (_: ListingTab) => void 0,\n setActiveTabIndex: (_) => void 0,\n onSubmit: () => void 0,\n onReset: (_: number) => void 0,\n methods: {} as ModalMethods,\n });\n\nexport const ListingDetailsModalContextProvider = ({\n children,\n}: PropsWithChildren) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const {\n event,\n posEntity: listing,\n setActivePosEntity,\n updateActivePosEntityInfo,\n } = useActivePosEntityContext();\n const { onUpdateListing } = useEventHubContext();\n\n const { onShowContent, onCloseSidePanel } = useAutoPricingSidePanelContext();\n\n const hasSectionalLoadDataFeature = useUserHasFeature(\n Feature.ListingLoadBySection\n );\n\n const [isLoading, setLoading] = useToggle(false);\n const [activeTabIndex, setActiveTabIndex] = useState(0);\n\n const onSaveCompleted = useCallback(\n async (success = true) => {\n if (listing?.id && success) {\n if (hasSectionalLoadDataFeature) {\n // Since update can have rippling affect through the whole listing, we need to get the whole thing and\n // update it in both the active entity and the catalog event context\n const updatedListing = await new ListingClient(\n activeAccountWebClientConfig\n ).getListingByListingId(listing.id, undefined, undefined);\n\n if (updatedListing) {\n updateActivePosEntityInfo({\n event,\n posEntity: updatedListing,\n posEntityId: updatedListing.id,\n posEntityDisplayId: updatedListing.idOnMkp,\n });\n }\n } else {\n // Old - we shouldn't use this to update listing\n onUpdateListing(listing.id);\n }\n }\n setLoading(false);\n },\n [\n activeAccountWebClientConfig,\n event,\n hasSectionalLoadDataFeature,\n listing?.id,\n onUpdateListing,\n setLoading,\n updateActivePosEntityInfo,\n ]\n );\n\n const onSaveStart = useCallback(() => {\n setLoading(true);\n }, [setLoading]);\n\n const { updated, methods, onSubmits, onResets } = useListingDetailsMethods(\n listing,\n onSaveStart,\n onSaveCompleted\n );\n\n const { canSetPrice, canAutoPrice } = useHasListingPricePermissions(listing);\n\n const tabs: TabItem[] = useMemo(() => {\n if (listing == null) {\n return [];\n }\n\n const spinner = (\n \n \n \n );\n\n const listingTabs = [\n {\n value: ListingTab.Broadcast,\n title: ,\n content:\n !hasSectionalLoadDataFeature ||\n listing?.dataIsLoaded[ListingDetailDataField.Basic] ? (\n \n ) : (\n spinner\n ),\n },\n {\n value: ListingTab.Tickets,\n title: ,\n content:\n !hasSectionalLoadDataFeature ||\n listing?.dataIsLoaded[ListingDetailDataField.Tickets] ? (\n \n ) : (\n spinner\n ),\n },\n ];\n\n if (canSetPrice) {\n listingTabs.push({\n value: ListingTab.Pricing,\n title: ,\n content:\n !hasSectionalLoadDataFeature ||\n listing?.dataIsLoaded[ListingDetailDataField.Pricing] ? (\n \n ) : (\n spinner\n ),\n });\n }\n\n if (canAutoPrice) {\n listingTabs.push({\n value: ListingTab.AutoPricing,\n title: ,\n // AutoPricing does it's only load logic so it doesn't use the ListingDetailDataField check/load\n content: ,\n });\n }\n\n listingTabs.push(\n ...[\n {\n value: ListingTab.Sales,\n title: ,\n content:\n !hasSectionalLoadDataFeature ||\n listing?.dataIsLoaded[ListingDetailDataField.Sales] ? (\n \n ) : (\n spinner\n ),\n },\n {\n value: ListingTab.Purchase,\n title: ,\n content:\n !hasSectionalLoadDataFeature ||\n listing?.dataIsLoaded[ListingDetailDataField.Purchase] ? (\n \n ) : (\n spinner\n ),\n },\n {\n value: ListingTab.Tags,\n title: ,\n content:\n !hasSectionalLoadDataFeature ||\n listing?.dataIsLoaded[ListingDetailDataField.Tags] ? (\n \n ) : (\n spinner\n ),\n },\n ]\n );\n return listingTabs;\n }, [canAutoPrice, canSetPrice, event, hasSectionalLoadDataFeature, listing]);\n\n const loadDataForTab = useCallback(\n (tab: ListingTab) => {\n if (!hasSectionalLoadDataFeature || listing?.id == null) {\n // main listing not even loaded, can't get partial data\n return;\n }\n\n switch (tab) {\n case ListingTab.Broadcast:\n {\n const dataField = getListingDataFieldsForTab(ListingTab.Broadcast);\n if (\n dataField.some(\n (f) => !listing?.dataIsLoaded[f as ListingDetailDataField]\n )\n ) {\n setActivePosEntity(\n listing.id,\n listing.idOnMkp,\n false,\n getListingDataFieldsForTab(ListingTab.Broadcast)\n );\n }\n }\n break;\n case ListingTab.Tickets:\n {\n const dataField = getListingDataFieldsForTab(ListingTab.Tickets);\n if (\n dataField.some(\n (f) => !listing?.dataIsLoaded[f as ListingDetailDataField]\n )\n ) {\n setActivePosEntity(\n listing.id,\n listing.idOnMkp,\n false,\n getListingDataFieldsForTab(ListingTab.Tickets)\n );\n }\n }\n break;\n case ListingTab.Pricing:\n {\n const dataField = getListingDataFieldsForTab(ListingTab.Pricing);\n if (\n dataField.some(\n (f) => !listing?.dataIsLoaded[f as ListingDetailDataField]\n )\n ) {\n if (!listing?.mkpListings?.length) {\n setActivePosEntity(\n listing.id,\n listing.idOnMkp,\n false,\n getListingDataFieldsForTab(ListingTab.Pricing)\n );\n }\n }\n }\n break;\n case ListingTab.AutoPricing:\n {\n const dataField = getListingDataFieldsForTab(\n ListingTab.AutoPricing\n );\n if (\n dataField.some(\n (f) => !listing?.dataIsLoaded[f as ListingDetailDataField]\n )\n ) {\n setActivePosEntity(\n listing.id,\n listing.idOnMkp,\n false,\n getListingDataFieldsForTab(ListingTab.AutoPricing)\n );\n }\n }\n break;\n case ListingTab.Tags:\n {\n const dataField = getListingDataFieldsForTab(ListingTab.Tags);\n if (\n dataField.some(\n (f) => !listing?.dataIsLoaded[f as ListingDetailDataField]\n )\n ) {\n setActivePosEntity(\n listing.id,\n listing.idOnMkp,\n false,\n getListingDataFieldsForTab(ListingTab.Tags)\n );\n }\n }\n break;\n case ListingTab.Sales:\n {\n const dataField = getListingDataFieldsForTab(ListingTab.Sales);\n if (\n dataField.some(\n (f) => !listing?.dataIsLoaded[f as ListingDetailDataField]\n )\n ) {\n setActivePosEntity(\n listing.id,\n listing.idOnMkp,\n false,\n getListingDataFieldsForTab(ListingTab.Sales)\n );\n }\n }\n break;\n case ListingTab.Purchase:\n {\n const dataField = getListingDataFieldsForTab(ListingTab.Purchase);\n if (\n dataField.some(\n (f) => !listing?.dataIsLoaded[f as ListingDetailDataField]\n )\n ) {\n setActivePosEntity(\n listing.id,\n listing.idOnMkp,\n false,\n getListingDataFieldsForTab(ListingTab.Purchase)\n );\n }\n }\n break;\n default:\n break;\n }\n },\n [\n hasSectionalLoadDataFeature,\n listing?.dataIsLoaded,\n listing?.id,\n listing?.idOnMkp,\n listing?.mkpListings?.length,\n setActivePosEntity,\n ]\n );\n\n const onReset = useCallback(\n (tabIndex: number) => {\n if (tabIndex >= tabs.length) {\n return;\n }\n switch (tabs[tabIndex].value) {\n case ListingTab.Broadcast:\n onResets.broadcast();\n break;\n case ListingTab.Tickets:\n onResets.tickets();\n break;\n case ListingTab.Pricing:\n onResets.pricing();\n break;\n case ListingTab.AutoPricing:\n onResets.autoPricing();\n break;\n case ListingTab.Tags:\n onResets.tags();\n break;\n default:\n break;\n }\n },\n [onResets, tabs]\n );\n const onTabChange = useCallback(\n (value: ListingTab) => {\n if (value === ListingTab.AutoPricing) {\n onShowContent('comparables');\n } else {\n onCloseSidePanel();\n }\n\n const tabIndex = tabs.findIndex((t) => t.value === value);\n if (tabIndex !== activeTabIndex) {\n onReset(activeTabIndex);\n\n loadDataForTab(value);\n setActiveTabIndex(tabIndex ?? 0);\n }\n },\n [\n tabs,\n activeTabIndex,\n onShowContent,\n onCloseSidePanel,\n onReset,\n loadDataForTab,\n ]\n );\n\n const onSubmit = useCallback(() => {\n if (activeTabIndex >= tabs.length) {\n return;\n }\n switch (tabs[activeTabIndex].value) {\n case ListingTab.Broadcast:\n onSubmits.broadcast();\n break;\n case ListingTab.Tickets:\n onSubmits.tickets();\n break;\n case ListingTab.Pricing:\n onSubmits.pricing();\n break;\n case ListingTab.AutoPricing:\n onSubmits.autoPricing();\n break;\n case ListingTab.Tags:\n onSubmits.tags();\n break;\n default:\n break;\n }\n }, [activeTabIndex, onSubmits, tabs]);\n\n const hasChanges = useMemo(() => {\n if (activeTabIndex >= tabs.length) {\n return false;\n }\n switch (tabs[activeTabIndex].value) {\n case ListingTab.Broadcast:\n return updated.broadcast;\n case ListingTab.Tickets:\n return updated.tickets;\n case ListingTab.Pricing:\n return updated.pricing;\n case ListingTab.AutoPricing:\n return updated.autoPricing;\n case ListingTab.Tags:\n return updated.tags;\n default:\n return false;\n }\n }, [activeTabIndex, tabs, updated]);\n\n return (\n \n {children}\n \n );\n};\n\nexport const useListingDetailsContext = () =>\n useContext(ListingDetailsModalContext);\n","import { KeyboardEventHandler, useCallback, useMemo } from 'react';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { EventMapContextProvider } from 'src/contexts/EventMapContext';\nimport { Stack } from 'src/core/ui';\nimport { onTabPanelKeyDown, TabPanel } from 'src/core/ui/TabPanel';\nimport { useEventItemLoadingDisplay } from 'src/hooks/useEventItemLoadingDisplay';\nimport { CancellableFormHeader } from 'src/modals/common/CancellableFormHeader';\nimport { ConnectedEventEntityHeader } from 'src/modals/common/EventEntityHeader';\nimport { ModalBody } from 'src/modals/Modal';\nimport { createInventoryEventUrl } from 'src/navigations/Routes/InventoryEvent/InventoryEvent.utils';\nimport { InventoryDeeplinkQueryParam } from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { getDeepLinkIdFromUrl } from 'src/utils/deepLinkUtils';\nimport { ListingDetails } from 'src/WebApiController';\n\nimport { modalDetails } from '../common/Modals.css';\nimport { Summary } from '../common/Summary';\nimport {\n ModalBodyDataContainer,\n ModalBodyHeaderContainer,\n} from '../Modal/Modal.styled';\nimport { ListingTab } from './components/listingDetailsUtils';\nimport { ListingDetailsFooter } from './ListingDetailsFooter';\nimport {\n ListingDetailsModalContextProvider,\n useListingDetailsContext,\n} from './ListingDetailsModalV2Context';\nimport {\n AutoPricingSidePanel,\n AutoPricingSidePanelContextProvider,\n useAutoPricingSidePanelContext,\n} from './ListingForms/AutoPricingSidePanel';\n\nexport const ListingDetailsModalV2 = () => {\n const activeId = getDeepLinkIdFromUrl(\n InventoryDeeplinkQueryParam,\n window.location.href\n );\n\n const { isLoading: listingIsLoading, loadingState } =\n useEventItemLoadingDisplay(\n FormatContentId.LoadingListingId,\n FormatContentId.SearchingForListingId,\n FormatContentId.CouldNotFindListingId,\n activeId\n );\n\n const { posEntity: listing } = useActivePosEntityContext();\n\n if (!listing) {\n return loadingState;\n }\n\n if (!listingIsLoading && loadingState) return loadingState;\n\n return ;\n};\n\nconst ListingDetailsModalWrapper = () => {\n const { event } = useActivePosEntityContext();\n\n return (\n \n \n \n \n \n \n \n );\n};\n\nconst ListingDetailsModalContent = () => {\n const {\n isLoading,\n hasChanges,\n event,\n listing,\n activeTabIndex,\n tabs,\n setActiveTabIndex,\n onTabChange,\n setLoading,\n onSubmit,\n } = useListingDetailsContext();\n const { metadata } = useAutoPricingSidePanelContext();\n\n const onKeyDown: KeyboardEventHandler = useCallback(\n (e) => {\n onTabPanelKeyDown(e, setActiveTabIndex, tabs.length);\n },\n [setActiveTabIndex, tabs.length]\n );\n\n const inventoryEventPageUrl = useMemo(() => {\n if (event) {\n const includeAllSearchParams = true;\n const queryParamOverride = undefined;\n const queryParamsToRemove = [InventoryDeeplinkQueryParam];\n return createInventoryEventUrl(\n event.viagVirtualId,\n includeAllSearchParams,\n false, // useEventV2\n queryParamOverride,\n queryParamsToRemove\n );\n }\n return undefined;\n }, [event]);\n\n return (\n \n {event && listing && (\n \n )}\n \n \n \n \n {listing!.isDeleted && (\n <>\n {' ('}\n \n {')'}\n \n )}\n \n }\n />\n \n\n \n \n \n \n
    \n \n onTabChange(v as ListingTab)}\n />\n \n
    \n
    \n\n \n
    \n \n );\n};\n","import { InventoryDeeplinkQueryParam } from 'src/utils/constants/constants';\n\nimport { ListingDetailsModalV2 } from './ListingDetailsModalV2';\n\nexport const ListingDetailsModalConfig = {\n children: ,\n clickOutsideToClose: true,\n deepLinkKey: InventoryDeeplinkQueryParam,\n deepLinkValue: undefined,\n size: 'slide-in-full',\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const PendingQCIcon = (props: PosIconProps) => {\n const fillColor = props.fill || '#87909A';\n return (\n \n \n \n \n \n \n );\n};\n","import { useCallback, useEffect, useState } from 'react';\nimport { ButtonWithIcon, IconButton } from 'src/components/Buttons';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { useCatalogMetricsContext } from 'src/contexts/CatalogMetricsContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { vars } from 'src/core/themes';\nimport { ButtonProps } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { SignalIcon } from 'src/svgs';\nimport { DuplicateOutlinedIcon } from 'src/svgs/DuplicateOutlinedIcon';\nimport { PendingQCIcon } from 'src/svgs/PendingQC';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n getListingBroadcastIcon,\n getListingGroupForListing,\n} from 'src/utils/inventoryUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n Event,\n Feature,\n Listing,\n ListingClient,\n ListingDetails,\n ListingGroupClient,\n ListingMetrics,\n ListingStatus,\n Marketplace,\n MarketplaceListingStatusInfo,\n QualityControlState,\n} from 'src/WebApiController';\n\nexport const LaunchBroadcastListing = ({\n forTable,\n listing,\n event,\n variant,\n iconOnlyMode,\n disabled,\n lockListingGroupFromEdits,\n}: {\n forTable: boolean;\n listing: Listing;\n event?: Event | null;\n variant?: ButtonProps['variant'];\n iconOnlyMode?: boolean;\n disabled?: boolean;\n lockListingGroupFromEdits?: (lock: boolean) => void;\n}) => {\n const [isLoading, setIsLoading] = useState(false);\n const { showErrorDialog, trackError } = useErrorBoundaryContext();\n const { posEntity, updateActivePosEntityInfo } =\n useActivePosEntityContext();\n\n const { activeAccountWebClientConfig } = useAppContext();\n const {\n updateItemInEvent,\n eventsExpansion: { refreshExpandedListItems },\n eventsTransformed,\n } = useCatalogDataContext();\n const { refreshMetrics } = useCatalogMetricsContext();\n\n const hasIgnoreDupFeature = useUserHasFeature(Feature.IgnoreDuplicate);\n const isDuplicate =\n !!listing?.dupListingId && (!hasIgnoreDupFeature || !listing?.ignoreDup);\n\n const isNotListed =\n listing.status !== ListingStatus.Listed &&\n listing.status !== ListingStatus.ListingPending;\n\n useEffect(() => {\n // We're only polling in this for the table, because the modal has the MarketplaceBroadcastSection polling already\n if (forTable) {\n // If we have any Marketplace listing pending status - we need to poll to get the latest status\n const statusChecking = setInterval(async () => {\n const needChecking =\n listing.status === ListingStatus.ListingPending ||\n listing.status === ListingStatus.DelistingPending;\n\n if (\n needChecking &&\n !isLoading &&\n activeAccountWebClientConfig.activeAccountId\n ) {\n await tryInvokeApi(\n async () => {\n setIsLoading(true);\n\n const client = new ListingClient(activeAccountWebClientConfig);\n\n const newListing = await client.getListingStatusByListingId(\n listing.id\n );\n\n if (newListing) {\n // We we get back a listing from server, it may or may not have finished the job\n // So we just have to assume the status is flowing in one direct only, ie, if we set something to pending,\n // we expect it to either finish or failed (but not reversed)\n let newStatus: ListingStatus | undefined = undefined;\n if (listing.status === ListingStatus.DelistingPending) {\n // If we are delisting-pending, set if the new status is either Delisted or DelistingFailed\n if (\n newListing.status === ListingStatus.Disabled ||\n newListing.status === ListingStatus.Delisted ||\n newListing.status === ListingStatus.DelistingFailed\n ) {\n newStatus = newListing.status;\n }\n } else if (listing.status === ListingStatus.ListingPending) {\n // If we are listing-pending, set if the new status is either Listed or ListedFailed\n if (\n newListing.status === ListingStatus.Disabled ||\n newListing.status === ListingStatus.Listed ||\n newListing.status === ListingStatus.ListingFailed\n ) {\n newStatus = newListing.status;\n }\n }\n\n let updatedListing = newListing as ListingDetails;\n\n const newMkpListings = newListing.mkpListings.reduce(\n (r, c) => {\n r[c.mkp] = c;\n return r;\n },\n {} as Record\n );\n\n updatedListing = {\n ...(posEntity ?? listing),\n ...newListing,\n // for marketplaces, we also need to merge since the MarketplaceListingStatusInfo is just a subset of the MarketplaceListing\n mkpListings: (posEntity ?? listing).mkpListings?.map(\n (mkp) => ({\n ...mkp,\n ...(newMkpListings[mkp.mkp] ?? {}),\n })\n ),\n } as ListingDetails;\n\n // Only if we do get status changes shall we try to actually update the active-item\n // provider with the latest states, or else the toggle will jump back and forth due\n // to the useEffect earlier (since we modified the active listing)\n if (newStatus) {\n // Only stop running this if all the status is no longer pending\n clearInterval(statusChecking);\n\n refreshMetrics?.();\n updateItemInEvent(\n updatedListing,\n ActionOutboxEntityType.Listing\n );\n if (posEntity && updatedListing.id === posEntity.id) {\n updateActivePosEntityInfo({\n posEntity: updatedListing,\n posEntityId: updatedListing!.id,\n posEntityDisplayId: updatedListing!.idOnMkp,\n });\n }\n }\n }\n },\n (error) => {\n // Because this is a background process - we don't want to show error dialog\n trackError(\n 'LaunchBroadcastListing.getListingStatusByListingId',\n error,\n {\n listingId: listing.id,\n }\n );\n },\n () => setIsLoading(false)\n );\n }\n }, 2000 /* 2 sec */);\n\n return () => clearInterval(statusChecking);\n }\n }, [\n activeAccountWebClientConfig,\n listing,\n listing.id,\n listing.idOnMkp,\n refreshMetrics,\n trackError,\n updateItemInEvent,\n forTable,\n posEntity,\n updateActivePosEntityInfo,\n isLoading,\n ]);\n\n const onBroadcastClick = useCallback(async () => {\n setIsLoading(true);\n\n // Update the intention so the UI is changed immediately to the pending state\n const newStatus = isNotListed\n ? ListingStatus.ListingPending\n : ListingStatus.DelistingPending;\n\n if (forTable) {\n if (listing.ltGrpId) {\n listing.ltGrpActive = newStatus === ListingStatus.ListingPending;\n\n const listingGroup = getListingGroupForListing(\n event?.viagId,\n listing.ltGrpId,\n eventsTransformed\n );\n\n if (listingGroup) {\n listingGroup.isLockedFromEdits = true;\n\n updateItemInEvent(listingGroup, ActionOutboxEntityType.Listing);\n }\n }\n\n updateItemInEvent(\n { ...listing, status: newStatus },\n ActionOutboxEntityType.Listing\n );\n } else {\n updateActivePosEntityInfo({\n posEntity: {\n ...posEntity!,\n status: newStatus,\n mkpListings:\n posEntity!.mkpListings?.map((ml) => ({\n ...ml,\n status:\n isNotListed && !(ml.isEnabled ?? true) ? ml.status : newStatus,\n })) ?? null,\n },\n posEntityId: posEntity!.id,\n posEntityDisplayId: posEntity!.idOnMkp,\n });\n }\n\n await tryInvokeApi(\n async () => {\n const client = new ListingClient(activeAccountWebClientConfig);\n\n let result = false;\n if (isNotListed) {\n result = await client.createMarketplaceListings(listing.id, []);\n } else {\n if (listing.ltGrpId) {\n // if this is part of the group, reduce active listing count of the group first\n await new ListingGroupClient(\n activeAccountWebClientConfig\n ).setListingActiveInGroup(listing.ltGrpId, listing.id, false);\n }\n\n result = await client.deleteMarketplaceListings(listing.id, []);\n }\n\n await refreshExpandedListItems();\n return result;\n },\n (error) => {\n showErrorDialog(\n isNotListed\n ? 'ListingClient.createMarketplaceListings'\n : 'ListingClient.deleteMarketplaceListings',\n error,\n {\n trackErrorData: {\n listingId: listing.id,\n idOnMkp: listing.idOnMkp,\n },\n }\n );\n },\n () => {\n setIsLoading(false);\n if (listing.ltGrpId) {\n lockListingGroupFromEdits?.(false);\n }\n }\n );\n }, [\n isNotListed,\n forTable,\n listing,\n updateItemInEvent,\n event?.viagId,\n eventsTransformed,\n updateActivePosEntityInfo,\n posEntity,\n activeAccountWebClientConfig,\n refreshExpandedListItems,\n showErrorDialog,\n lockListingGroupFromEdits,\n ]);\n\n const { iconComponent: ListingBroadcastIcon, contentId } =\n getListingBroadcastIcon(\n listing.status,\n listing.qcState,\n false,\n true,\n listing.isUndeliv,\n listing.brdcstStatus,\n listing.pendProofState\n );\n\n if (\n listing.qcState === QualityControlState.Pending &&\n listing.status !== ListingStatus.Listed\n ) {\n return iconOnlyMode ? (\n \n }\n titleContentId={ContentId.PendingQC}\n />\n ) : null;\n }\n\n if (isDuplicate) {\n return iconOnlyMode ? (\n }\n titleContentId={ContentId.DuplicatedListing}\n />\n ) : null;\n }\n\n return (\n \n ) : (\n \n )\n }\n variant={variant}\n iconOnlyMode={iconOnlyMode}\n />\n );\n};\n","import { useMemo } from 'react';\nimport { Controller, useFormContext } from 'react-hook-form';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { DetailGroup, DetailSection, SectionContent } from 'src/modals/common';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { MARKET_PLACE_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { Marketplace, MarketplaceSaleInput } from 'src/WebApiController';\n\ntype MarketplaceSaleInputBuyer = Pick;\n\nexport const MarketplaceSection = ({ disabled }: { disabled?: boolean }) => {\n const { loginContext } = useAppContext();\n const requiredMsg = useContent(ContentId.Required);\n\n const {\n formState: { errors },\n control,\n } = useFormContext();\n\n const marketplaceOptionsContent = useMemo(\n () =>\n (\n loginContext?.user?.activeAccount?.marketplaceSettings\n ?.filter((m) => m.isSyncHandledByProcessor)\n .map((m) => m.mkp) ?? []\n ).reduce(\n (cur, m) => {\n cur[m] = MARKET_PLACE_TO_CID[m];\n return cur;\n },\n {} as Record\n ),\n [loginContext?.user?.activeAccount?.marketplaceSettings]\n );\n\n return (\n }>\n \n \n (\n }\n errors={errors.marketplace?.message}\n >\n \n \n )}\n />\n \n \n \n );\n};\n","import { ListingDetails } from 'src/WebApiController';\n\nimport { BuyerSection } from '../ManagedMarketplaceSale/components/BuyerSection';\nimport { MarketplaceSaleInfoSection } from '../ManagedMarketplaceSale/components/MarketplaceSaleInfoSection';\nimport { TicketSection } from '../ManagedMarketplaceSale/components/TicketSection';\nimport { ModalBodyDataContainer } from '../Modal/Modal.styled';\nimport { MarketplaceSection } from './components/MarketplaceSection';\n\nexport const MarketplaceSaleBody = ({\n listing,\n disabled,\n}: {\n listing?: ListingDetails;\n disabled?: boolean;\n}) => {\n return (\n \n \n \n \n \n \n );\n};\n","import { isEqual } from 'lodash-es';\nimport {\n ComponentProps,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { useNavigate } from 'react-router-dom';\nimport { OkButton } from 'src/components/Buttons/OkButton';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { isSuccess } from 'src/utils/errorUtils';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport {\n getMarketplaceSaleInputFromListing,\n getSaleDetailsRelativeUrl,\n} from 'src/utils/saleUtils';\nimport { EntityWithRealTickets } from 'src/utils/ticketUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n ApiException,\n Event,\n ListingDetails,\n MarketplaceSaleInput,\n SaleClient,\n} from 'src/WebApiController';\n\nimport { CancellableFormFooter } from '../common';\nimport { CancellableFormHeader } from '../common/CancellableFormHeader';\nimport { ConnectedEventEntityHeader } from '../common/EventEntityHeader';\nimport { modalDetails } from '../common/Modals.css';\nimport { Summary } from '../common/Summary';\nimport { ModalProps } from '../Modal';\nimport {\n ModalBody,\n ModalBodyHeaderContainer,\n ModalFooter,\n} from '../Modal/Modal.styled';\nimport { MarketplaceSaleBody } from './MarketplaceSaleBody';\n\ntype MarketplaceSaleProps = {\n cancelTo?: ModalProps;\n};\n\nexport const MarketplaceSale = ({ cancelTo }: MarketplaceSaleProps) => {\n const { posEntity, event } =\n useActivePosEntityContext();\n const listing =\n posEntity?.entityType === ActionOutboxEntityType.Listing\n ? (posEntity as ListingDetails)\n : undefined;\n\n const methods = useForm({\n defaultValues:\n listing?.tickets?.length && event\n ? getMarketplaceSaleInputFromListing(listing, event)\n : undefined,\n });\n\n useEffect(() => {\n if (\n methods.formState.defaultValues === undefined &&\n listing?.tickets?.length &&\n event\n ) {\n methods.reset(getMarketplaceSaleInputFromListing(listing, event));\n }\n }, [methods, event, listing]);\n\n return (\n \n \n \n );\n};\n\nexport const SaleContent = ({\n listing,\n event,\n cancelTo,\n formState,\n handleSubmit,\n watch,\n getValues,\n setError,\n}: Omit<\n ComponentProps>,\n 'children'\n> &\n MarketplaceSaleProps & {\n listing?: ListingDetails;\n event?: Event | null;\n }) => {\n const { showErrorDialog, genericError } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const { setModal, closeModal } = useContext(ModalContext);\n\n const [isLoading, setIsLoading] = useState(false);\n const navigate = useNavigate();\n\n const onSubmit = useCallback(\n async (saleFormValue: MarketplaceSaleInput) => {\n setIsLoading(true);\n tryInvokeApi(\n async () => {\n const client = new SaleClient(activeAccountWebClientConfig);\n\n const r = await client.createMarketplaceSale(saleFormValue);\n\n if (isSuccess(r)) {\n if (r.entityId) {\n navigate(getSaleDetailsRelativeUrl(r.entityId));\n }\n if (cancelTo) {\n setModal(cancelTo);\n } else {\n closeModal(true);\n }\n } else {\n showErrorDialog(\n 'SaleClient.createMarketplaceSale',\n {\n message: r.message ?? genericError,\n status: r.status!,\n } as ApiException,\n {\n trackErrorData: saleFormValue,\n }\n );\n }\n },\n (error) => {\n showErrorDialog('SaleClient.createMarketplaceSale', error, {\n trackErrorData: saleFormValue,\n });\n },\n () => {\n setIsLoading(false);\n }\n );\n },\n [\n activeAccountWebClientConfig,\n cancelTo,\n closeModal,\n genericError,\n navigate,\n setModal,\n showErrorDialog,\n ]\n );\n\n const requiredMsg = useContent(ContentId.Required);\n const inhandDateMustBeforeEventDate = useContent(\n ContentId.InHandDateMustBeBeforeEventDate\n );\n\n const onSubmitHandler = useCallback(() => {\n const formValues = getValues();\n if (isEqual(formValues, formState.defaultValues)) return;\n\n if (!formValues.saleDate) {\n setError('saleDate', { message: requiredMsg }, { shouldFocus: true });\n }\n\n if (!formValues.totalNetProceeds?.value) {\n formValues.totalNetProceeds = posChangedField(0);\n }\n\n if (!formValues.inHandDate?.value) {\n setError('inHandDate', { message: requiredMsg }, { shouldFocus: true });\n } else if (\n new Date(formValues.inHandDate.value) >= new Date(event!.dates.start!)\n ) {\n setError(\n 'inHandDate',\n { message: inhandDateMustBeforeEventDate },\n { shouldFocus: true }\n );\n }\n if ((formValues.quantitySold?.value ?? 0) <= 0) {\n setError('quantitySold', { message: requiredMsg }, { shouldFocus: true });\n }\n\n if (listing?.tickets?.find((t) => !!t.seat)) {\n // If the listing tickets has seats - so better the sale\n if (!formValues.seatFrom?.value || !formValues.seatTo?.value) {\n setError('seatFrom', { message: requiredMsg }, { shouldFocus: true });\n }\n }\n\n handleSubmit(onSubmit)();\n }, [\n getValues,\n formState.defaultValues,\n event,\n listing?.tickets,\n handleSubmit,\n onSubmit,\n setError,\n requiredMsg,\n inhandDateMustBeforeEventDate,\n ]);\n\n const formValues = watch();\n\n const formHasChanges = useMemo(() => {\n return !isEqual(formValues, formState.defaultValues);\n }, [formState.defaultValues, formValues]);\n\n return (\n <>\n \n \n \n \n }\n />\n \n\n \n
    \n {event && listing && (\n \n \n \n )}\n {!listing ? (\n \n ) : (\n \n )}\n
    \n
    \n\n \n \n \n \n \n \n );\n};\n","import { ComponentProps, useCallback, useContext } from 'react';\nimport { ButtonWithIcon } from 'src/components/Buttons';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { vars } from 'src/core/themes';\nimport { MarketplaceSale } from 'src/modals/MarketplaceSale/MarketplaceSale';\nimport { MoneyIcon } from 'src/svgs';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n ActionOutboxEntityType,\n ListingDetailDataField,\n ListingDetails,\n} from 'src/WebApiController';\n\nexport const LaunchCreateMarketplaceSale = ({\n listingId,\n marketplaceListingId,\n cancelTo,\n ...buttonProps\n}: Omit<\n ComponentProps,\n 'onClick' | 'textContentId' | 'icon' | 'iconProps'\n> &\n Omit, 'event' | 'venue'> & {\n listingId: number;\n marketplaceListingId?: string | null;\n }) => {\n const { setModal } = useContext(ModalContext);\n const { setActivePosEntity } = useActivePosEntityContext();\n\n const createOfflineSale = useCallback(() => {\n setModal({\n children: ,\n clickOutsideToClose: true,\n size: 'slide-in',\n deepLinkValue: listingId,\n trackViewEntityType: ActionOutboxEntityType.Listing,\n });\n }, [setModal, cancelTo, listingId]);\n\n const onLaunchDialog = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n\n setActivePosEntity(listingId, marketplaceListingId, true, [\n ListingDetailDataField.Basic,\n ListingDetailDataField.Tickets,\n ]);\n createOfflineSale();\n },\n [createOfflineSale, listingId, marketplaceListingId, setActivePosEntity]\n );\n\n return (\n }\n />\n );\n};\n","import { ComponentProps, useCallback, useContext } from 'react';\nimport { ButtonWithIcon } from 'src/components/Buttons';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { vars } from 'src/core/themes';\nimport { ManagedMarketplaceSale } from 'src/modals/ManagedMarketplaceSale';\nimport { MoneyIcon } from 'src/svgs';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n ActionOutboxEntityType,\n ListingDetailDataField,\n ListingDetails,\n} from 'src/WebApiController';\n\nexport const LaunchCreateOfflineSale = ({\n listingId,\n marketplaceListingId,\n cancelTo,\n ...buttonProps\n}: Omit<\n ComponentProps,\n 'onClick' | 'textContentId' | 'icon' | 'iconProps'\n> &\n Omit, 'event' | 'venue'> & {\n listingId: number;\n marketplaceListingId?: string | null;\n }) => {\n const { setModal } = useContext(ModalContext);\n const { setActivePosEntity } = useActivePosEntityContext();\n\n const createOfflineSale = useCallback(() => {\n setModal({\n children: ,\n clickOutsideToClose: true,\n size: 'slide-in',\n deepLinkValue: listingId,\n trackViewEntityType: ActionOutboxEntityType.Listing,\n });\n }, [setModal, cancelTo, listingId]);\n\n const onLaunchDialog = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n\n setActivePosEntity(listingId, marketplaceListingId, true, [\n ListingDetailDataField.Basic,\n ListingDetailDataField.Tickets,\n ]);\n createOfflineSale();\n },\n [createOfflineSale, listingId, marketplaceListingId, setActivePosEntity]\n );\n\n return (\n }\n />\n );\n};\n","import { ComponentProps, useCallback, useState } from 'react';\nimport { ButtonWithIcon } from 'src/components/Buttons';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { vars } from 'src/core/themes';\nimport { ButtonProps } from 'src/core/ui';\nimport { RotatingWrapper } from 'src/core/ui/AnimatingWrapper';\nimport { SplitListingModal } from 'src/modals/SplitListing';\nimport { DownloadIcon, ProcessingIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { downloadFileFromBlob } from 'src/utils/fileUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { ListingClient } from 'src/WebApiController';\n\nexport const LaunchDownloadUserDocuments = ({\n listingId,\n variant,\n iconOnlyMode,\n disabled,\n ...buttonProps\n}: {\n listingId: number;\n variant?: ButtonProps['variant'];\n iconOnlyMode?: boolean;\n disabled?: boolean;\n} & ComponentProps) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n const [isLoading, setIsLoading] = useState(false);\n\n const onDownload = useCallback(async () => {\n setIsLoading(true);\n return await tryInvokeApi(\n async () => {\n const result = await new ListingClient(\n activeAccountWebClientConfig\n ).downloadMergedUserDocumentsPdf(listingId);\n if (result.data) {\n downloadFileFromBlob(result.fileName ?? 'tickets.pdf', result.data);\n }\n },\n (error) => {\n showErrorDialog('ListingClient.downloadMergedUserDocumentsPdf', error);\n },\n () => setIsLoading(false)\n );\n }, [activeAccountWebClientConfig, listingId, showErrorDialog]);\n\n const onClickHandler = useCallback(\n (e: React.MouseEvent) => {\n onDownload();\n },\n [onDownload]\n );\n\n const iconFill =\n iconOnlyMode || (variant && variant !== 'regular')\n ? vars.color.textBrand\n : vars.color.textInverted;\n\n return (\n \n \n \n ) : (\n \n )\n }\n />\n );\n};\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport const MainLabel = styled.div`\n ${({\n theme: {\n typography: { getStyles },\n },\n }) => getStyles('title4')};\n margin-bottom: ${() => vars.spacing.sm};\n`;\n\nexport const SplitListQuickOptionsContainer = styled.div`\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: ${() => vars.spacing.lg};\n & > div {\n flex: 1;\n display: flex;\n gap: ${() => vars.spacing.xxs};\n align-items: center;\n }\n`;\nexport const SplitListingTableContainer = styled.table`\n border-collapse: collapse;\n margin-top: ${() => vars.spacing.lg};\n width: 100%;\n max-width: 690px;\n border-radius: ${() => vars.spacing.xxs};\n border: 1px solid ${(props) => props.theme.colors.borderPrimary};\n table-layout: fixed;\n\n thead {\n background-color: ${(props) => props.theme.colors.backgroundPrimary};\n\n .header {\n ${(props) => props.theme.typography.getStyles('body2', 'regular')}\n color: ${(props) => props.theme.colors.textPrimary};\n background-color: ${(props) => props.theme.colors.backgroundSecondary};\n }\n }\n\n tr {\n &.even {\n background-color: ${(props) => props.theme.colors.backgroundSecondary};\n }\n }\n\n td,\n th {\n border: 1px solid transparent;\n background-clip: padding-box;\n vertical-align: middle;\n padding: ${() => `${vars.spacing.xxs} ${vars.spacing.sm}`};\n }\n\n tr > td + td,\n tr > th + th {\n border-left-width: ${() => vars.spacing.m};\n }\n\n tr + tr > td {\n border-top-width: 8px;\n }\n`;\n\nexport const SoldTicketContainer = styled.div`\n color: ${(props) => props.theme.colors.textDisabled};\n text-align: center;\n`;\n","import { range } from 'lodash-es';\nimport { useCallback, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { TableVirtuoso } from 'react-virtuoso';\nimport { Content, FormatContent } from 'src/contexts/ContentContext';\nimport { Switch } from 'src/core/interim/Switch';\nimport { PosSelect } from 'src/core/POS/PosSelect';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { SimpleTable, Stack, TooltipPopover } from 'src/core/ui';\nimport { FieldError } from 'src/modals/common/Purchase';\nimport { InfoOutlineIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { SplitListingInput } from 'src/WebApiController';\n\nimport { ModalBodyDataContainer } from '../Modal/Modal.styled';\nimport * as styles from './SplitListing.css';\nimport {\n MainLabel,\n SoldTicketContainer,\n SplitListQuickOptionsContainer,\n} from './SplitListing.styled';\n\nexport const SplitListingBody = () => {\n const { watch, setValue, formState, clearErrors } =\n useFormContext();\n const numOfListings = watch('numOfListings');\n const ticketsByListingNumber = watch('ticketsByListingNumber');\n\n const [allowManualSplitSoldTickets, setAllowManualSplitSoldTickets] =\n useState(false);\n\n const regenerateListingTicketIds = (numOfListings: number) => {\n // for every ticket who's list index is greater than numOfListings, set it to numOfListings\n const newListingsTickets = ticketsByListingNumber.map((t) => {\n if (t.listingNumber > numOfListings) {\n t.listingNumber = numOfListings;\n }\n\n return t;\n });\n\n clearErrors('numOfListings');\n setValue('numOfListings', numOfListings);\n setValue('ticketsByListingNumber', newListingsTickets);\n };\n\n const assignListingNumberToTicket = useCallback(\n (newListingNum: number, ticketIndex: number) => {\n ticketsByListingNumber[ticketIndex].listingNumber = newListingNum;\n\n // To keep all the contiguous tickets in the same listing\n // All tickets above ticketIndex but listing-num greater than it has to be set to the same num\n for (let i = ticketIndex - 1; i >= 0; i--) {\n if (ticketsByListingNumber[i].listingNumber > newListingNum) {\n ticketsByListingNumber[i].listingNumber = newListingNum;\n }\n }\n // And all tickets below ti but listing-num less than it also has to be set to the same num\n for (let i = ticketIndex + 1; i < ticketsByListingNumber.length; i++) {\n if (ticketsByListingNumber[i].listingNumber < newListingNum) {\n ticketsByListingNumber[i].listingNumber = newListingNum;\n }\n }\n\n clearErrors('ticketsByListingNumber');\n setValue('ticketsByListingNumber', [...ticketsByListingNumber]);\n },\n [clearErrors, setValue, ticketsByListingNumber]\n );\n\n return (\n \n \n \n \n \n
    \n :\n
    \n {\n const newNum = parseInt(e.target.value);\n if (newNum !== numOfListings) {\n regenerateListingTicketIds(\n Math.min(Math.max(2, newNum), ticketsByListingNumber.length)\n );\n }\n }}\n />\n
    \n
    \n
    \n {' '}\n \n }\n >\n \n \n \n \n \n \n \n \n \n :\n {\n if (value.target.checked !== allowManualSplitSoldTickets) {\n setAllowManualSplitSoldTickets(value.target.checked);\n }\n }}\n />\n {formState.errors.numOfListings?.message && (\n {formState.errors.numOfListings?.message}\n )}\n
    \n
    \n
    \n (\n \n \n \n \n \n \n \n \n \n \n \n #\n \n \n )}\n itemContent={(ti, t) => (\n <>\n \n \n \n \n {t.ticket.seat}\n \n \n {t.ticket.unitCost?.disp}\n \n \n {t.ticket.saleId && !allowManualSplitSoldTickets ? (\n \n \n \n ) : (\n {\n if (newListingNumber) {\n const newListingNum = parseInt(newListingNumber);\n assignListingNumberToTicket(newListingNum, ti);\n }\n }}\n valueOptionsContent={range(numOfListings).reduce(\n (r, i) => {\n r[(i + 1).toString()] = (i + 1).toString();\n return r;\n },\n {} as Record\n )}\n />\n )}\n \n \n )}\n />\n
    \n
    \n );\n};\n","import { range } from 'lodash-es';\nimport {\n ComponentProps,\n useCallback,\n useContext,\n useEffect,\n useState,\n} from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { ConfirmButton } from 'src/components/Buttons';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { useCatalogMetricsContext } from 'src/contexts/CatalogMetricsContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { useEventItemLoadingDisplay } from 'src/hooks/useEventItemLoadingDisplay';\nimport { CancellableFormFooter } from 'src/modals/common';\nimport { CancellableFormHeader } from 'src/modals/common/CancellableFormHeader';\nimport { ConnectedEventEntityHeader } from 'src/modals/common/EventEntityHeader';\nimport { ModalBody, ModalFooter, ModalProps } from 'src/modals/Modal';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ListingClient,\n ListingDetails,\n ListingMetrics,\n SplitListingInput,\n} from 'src/WebApiController';\n\nimport { Summary } from '../common/Summary';\nimport { ModalBodyHeaderContainer } from '../Modal/Modal.styled';\nimport { SplitListingBody } from './SplitListingBody';\n\nexport const SplitListingModal = ({ cancelTo }: { cancelTo?: ModalProps }) => {\n const { posEntity: listing } = useActivePosEntityContext();\n\n const methods = useForm({\n defaultValues: {\n sourceListingId: listing?.id,\n numOfListings: 2,\n ticketsByListingNumber: (listing?.tickets ?? []).map((t) => ({\n ticket: t,\n listingNumber: 1,\n })),\n alwaysUnbroadcastListing: false,\n useOriginalTicketGroupInfoForNewListings: false,\n },\n });\n\n useEffect(() => {\n if (\n methods.formState.defaultValues?.ticketsByListingNumber !==\n listing?.tickets?.length\n ) {\n methods.reset({\n sourceListingId: listing?.id,\n numOfListings: 2,\n ticketsByListingNumber: (listing?.tickets ?? []).map((t) => ({\n ticket: t,\n listingNumber: 1,\n })),\n alwaysUnbroadcastListing: false,\n useOriginalTicketGroupInfoForNewListings: false,\n });\n }\n }, [listing?.id, listing?.tickets, methods]);\n\n return (\n \n \n \n );\n};\n\nconst SplitListingModalContent = ({\n cancelTo,\n formState,\n handleSubmit,\n setError,\n}: {\n cancelTo?: ModalProps;\n} & Omit<\n ComponentProps>,\n 'children'\n>) => {\n const { loadingState } = useEventItemLoadingDisplay(\n FormatContentId.LoadingListingId,\n FormatContentId.SearchingForListingId,\n FormatContentId.CouldNotFindListingId\n );\n\n const { closeModal } = useContext(ModalContext);\n const { activeAccountWebClientConfig } = useAppContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n const { refreshMetrics } = useCatalogMetricsContext();\n\n const needToSplitToTwoOrMoreListingsError = useContent(\n ContentId.NeedToSplitToTwoOrMoreListings\n );\n const listingNumberUsedError = useContent(\n ContentId.ListingNumberUsedRequired\n );\n\n const [isLoading, setIsLoading] = useState(false);\n const { isDirty, isSubmitting } = formState;\n\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const onSubmit = useCallback(\n async (formData: SplitListingInput) => {\n if (formData.numOfListings < 2) {\n setError('numOfListings', {\n message: needToSplitToTwoOrMoreListingsError,\n });\n return;\n }\n\n const listingNumberMap = range(1, formData.numOfListings + 1).reduce(\n (r, i) => {\n r[i.toString()] = false;\n return r;\n },\n {} as Record\n );\n\n formData.ticketsByListingNumber.forEach((t) => {\n listingNumberMap[t.listingNumber.toString()] = true;\n });\n\n if (Object.values(listingNumberMap).includes(false)) {\n setError('ticketsByListingNumber', {\n message:\n listingNumberUsedError +\n ' ' +\n Object.keys(listingNumberMap)\n .filter((n) => !listingNumberMap[n])\n .join(', '),\n });\n return;\n }\n\n // If this is called, there are no form errors (else onSubmit is never called)\n setIsLoading(true);\n\n return await tryInvokeApi(\n async () => {\n const result = await new ListingClient(\n activeAccountWebClientConfig\n ).splitListings(formData);\n if (result) {\n await refreshExpandedListItems();\n refreshMetrics?.();\n\n // After we split - the original listing is gone - so we don't want to cancel back to it\n // so we just close the main modal\n closeModal(true);\n }\n },\n (error) => {\n showErrorDialog('ListingClient.splitListings', error, {\n trackErrorData: formData,\n });\n },\n () => setIsLoading(false)\n );\n },\n [\n activeAccountWebClientConfig,\n closeModal,\n listingNumberUsedError,\n needToSplitToTwoOrMoreListingsError,\n refreshExpandedListItems,\n refreshMetrics,\n setError,\n showErrorDialog,\n ]\n );\n\n const { event, posEntity: listing } =\n useActivePosEntityContext();\n\n if (loadingState) return loadingState;\n\n return (\n <>\n \n }\n />\n \n\n \n {isLoading ? (\n \n ) : (\n <>\n \n
    \n \n \n \n )}\n \n \n \n \n \n \n \n );\n};\n","import { ComponentProps, useCallback, useContext } from 'react';\nimport { ButtonWithIcon } from 'src/components/Buttons';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { vars } from 'src/core/themes';\nimport { ButtonProps } from 'src/core/ui';\nimport { SplitListingModal } from 'src/modals/SplitListing';\nimport { SplitIcon } from 'src/svgs/SplitIcon';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n ActionOutboxEntityType,\n ListingDetailDataField,\n ListingDetails,\n} from 'src/WebApiController';\n\nexport const LaunchSplitListing = ({\n listingId,\n marketplaceListingId,\n cancelTo,\n variant,\n iconOnlyMode,\n ...buttonProps\n}: {\n listingId: number;\n marketplaceListingId?: string | null;\n variant?: ButtonProps['variant'];\n iconOnlyMode?: boolean;\n disabled?: boolean;\n} & ComponentProps) => {\n const { setModal } = useContext(ModalContext);\n const { setActivePosEntity } = useActivePosEntityContext();\n\n const splitListing = useCallback(() => {\n setModal({\n children: ,\n clickOutsideToClose: true,\n size: 'slide-in',\n deepLinkValue: listingId,\n trackViewEntityType: ActionOutboxEntityType.Listing,\n });\n }, [setModal, cancelTo, listingId]);\n\n const onLaunchDialog = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n\n setActivePosEntity(listingId, marketplaceListingId, false, [\n ListingDetailDataField.Basic,\n ListingDetailDataField.Tickets,\n ]);\n splitListing();\n },\n [setActivePosEntity, listingId, marketplaceListingId, splitListing]\n );\n\n return (\n \n }\n />\n );\n};\n","import {\n ListingDetails,\n SplitListingInput,\n TicketByListingNumber,\n} from 'src/WebApiController';\n\nexport function getSplitListingToOriginalInput(\n listing: ListingDetails | null | undefined\n): SplitListingInput | null {\n if (!listing?.tickets?.length) {\n return null;\n }\n\n const ticketsByListingNumber: TicketByListingNumber[] = [];\n\n (listing.tickets ?? []).forEach((t) => {\n if (ticketsByListingNumber.length === 0) {\n ticketsByListingNumber.push({ ticket: t, listingNumber: 1 });\n } else {\n const prev = ticketsByListingNumber[ticketsByListingNumber.length - 1];\n if (prev.ticket.tgId !== t.tgId) {\n ticketsByListingNumber.push({\n ticket: t,\n listingNumber: prev.listingNumber + 1,\n });\n } else {\n ticketsByListingNumber.push({\n ticket: t,\n listingNumber: prev.listingNumber,\n });\n }\n }\n });\n\n if (ticketsByListingNumber.length < 2) {\n return null;\n }\n\n const numOfListings =\n ticketsByListingNumber[ticketsByListingNumber.length - 1].listingNumber;\n\n return {\n sourceListingId: listing.id,\n numOfListings: numOfListings,\n ticketsByListingNumber: ticketsByListingNumber,\n alwaysUnbroadcastListing: true,\n useOriginalTicketGroupInfoForNewListings: true,\n };\n}\n","import { isEqual } from 'lodash-es';\nimport { ComponentProps, useEffect, useState } from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { Button, SimpleTable, Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ListingDetails, SplitListingInput } from 'src/WebApiController';\n\nimport { getSplitListingToOriginalInput } from './SplitListingToOriginal.util';\n\nexport type SplitListingToOriginalDialogProps = ComponentProps<\n typeof RSModal\n> & {\n onOkay: (splitListingInput: SplitListingInput) => Promise;\n onCancel: () => void;\n};\n\nexport function SplitListingToOriginalDialog({\n onOkay,\n onCancel,\n ...rest\n}: SplitListingToOriginalDialogProps) {\n const { posEntity: listing, isLoading: isDataLoading } =\n useActivePosEntityContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const [isLoading, setIsLoading] = useState(false);\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const [splitListingInput, setSplitListingInput] =\n useState();\n\n useEffect(() => {\n if (listing?.tickets) {\n // Only do this if there are tickets\n const newInput = getSplitListingToOriginalInput(listing);\n if (newInput && !isEqual(newInput, splitListingInput)) {\n setSplitListingInput(newInput);\n }\n }\n }, [\n activeAccountWebClientConfig,\n listing,\n showErrorDialog,\n splitListingInput,\n ]);\n\n return (\n }\n onOpened={() => {\n setSplitListingInput(undefined);\n }}\n onClick={(e) => {\n // This so that this dialog does not cause event to flow to the EventHeader open/close event\n e.stopPropagation();\n e.preventDefault();\n }}\n footer={\n <>\n {\n onCancel();\n }}\n disabled={isLoading || isDataLoading}\n >\n \n \n\n {\n setIsLoading(true);\n await onOkay(splitListingInput!);\n setIsLoading(false);\n }}\n >\n \n \n \n }\n onCancel={isLoading || isDataLoading ? undefined : onCancel}\n >\n \n {isLoading || isDataLoading || !splitListingInput ? (\n \n ) : (\n <>\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {(splitListingInput?.ticketsByListingNumber ?? []).map(\n (ticketListingNumber) => {\n return (\n \n \n {ticketListingNumber.ticket.row}\n \n \n {ticketListingNumber.ticket.seat}\n \n \n {ticketListingNumber.listingNumber}\n \n \n );\n }\n )}\n \n \n \n )}\n \n \n );\n}\n","import { ComponentProps, useCallback, useContext } from 'react';\nimport { ButtonWithIcon } from 'src/components/Buttons';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { vars } from 'src/core/themes';\nimport { ButtonProps } from 'src/core/ui';\nimport { SplitListingToOriginalDialog } from 'src/dialogs/SplitListingToOriginalDialog';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { SplitListingModal } from 'src/modals/SplitListing';\nimport { SplitIcon } from 'src/svgs/SplitIcon';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n Feature,\n ListingClient,\n ListingDetailDataField,\n ListingDetails,\n SplitListingInput,\n} from 'src/WebApiController';\n\nexport const LaunchSplitListingToOriginal = ({\n listingId,\n cancelTo,\n variant,\n disabled,\n iconOnlyMode,\n ...buttonProps\n}: {\n listingId: number;\n variant?: ButtonProps['variant'];\n iconOnlyMode?: boolean;\n disabled?: boolean;\n} & ComponentProps) => {\n const hasSplitListingToOriginalFeature = useUserHasFeature(\n Feature.SplitListingToOriginal\n );\n const { closeModal } = useContext(ModalContext);\n const { posEntity: listing, setActivePosEntity } =\n useActivePosEntityContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n const { activeAccountWebClientConfig } = useAppContext();\n\n const { openDialog, closeDialog } = useDialog(\n DialogId.Confirm,\n SplitListingToOriginalDialog\n );\n\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const splitListing = useCallback(\n async (splitListingInput: SplitListingInput) => {\n return await tryInvokeApi(\n async () => {\n const result = await new ListingClient(\n activeAccountWebClientConfig\n ).splitListings(splitListingInput!);\n\n if (result) {\n refreshExpandedListItems();\n\n // After we split - the original listing is gone - so we don't want to cancel back to it\n // so we just close the main modal\n closeModal(true);\n }\n },\n (error) => {\n showErrorDialog('ListingClient.splitListings', error);\n },\n () => {\n closeDialog();\n }\n );\n },\n [\n activeAccountWebClientConfig,\n closeDialog,\n closeModal,\n refreshExpandedListItems,\n showErrorDialog,\n ]\n );\n\n const onLaunchDialog = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n\n if (!listing?.tickets?.length) {\n // If we haven't pulled tickets, pull it\n setActivePosEntity(listingId, null, false, [\n ListingDetailDataField.Basic,\n ListingDetailDataField.Tickets,\n ]);\n }\n\n openDialog({\n onOkay: async (splitListingInput) => {\n await splitListing(splitListingInput);\n closeDialog();\n },\n onCancel: () => {\n closeDialog();\n },\n });\n },\n [\n listing?.tickets?.length,\n openDialog,\n setActivePosEntity,\n listingId,\n splitListing,\n closeDialog,\n ]\n );\n\n if (!hasSplitListingToOriginalFeature) {\n return null;\n }\n\n return (\n \n }\n />\n );\n};\n","import { ComponentProps, useState } from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { Content } from 'src/contexts/ContentContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { Button } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { AddAdminHoldInput } from './AddAdminHoldInput';\n\nexport type AddAdminHoldDialogProps = ComponentProps & {\n isLoading?: boolean;\n onOkay: (\n adminHoldExpirationDate: Date | null,\n adminHoldNotes: string | null\n ) => void;\n onCancel: () => void;\n};\n\nexport function AddAdminHoldDialog({\n isLoading,\n onOkay,\n onCancel,\n ...rest\n}: AddAdminHoldDialogProps) {\n const [adminHoldExpirationDate, setAdminHoldExpirationDate] =\n useState(null);\n const [adminHoldNotes, setAdminHoldNotes] = useState(null);\n\n return (\n }\n onOpened={() => {\n setAdminHoldExpirationDate(null);\n setAdminHoldNotes(null);\n }}\n onClick={(e) => {\n // This so that this dialog does not cause event to flow to the EventHeader open/close event\n e.stopPropagation();\n e.preventDefault();\n }}\n footer={\n <>\n {\n onCancel();\n }}\n >\n \n \n\n {\n onOkay(adminHoldExpirationDate, adminHoldNotes);\n }}\n >\n \n \n \n }\n onCancel={isLoading ? undefined : onCancel}\n >\n \n \n );\n}\n","import { ComponentProps, useCallback, useState } from 'react';\nimport { ButtonWithIcon } from 'src/components/Buttons';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { useCatalogMetricsContext } from 'src/contexts/CatalogMetricsContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { vars } from 'src/core/themes';\nimport { ButtonProps } from 'src/core/ui';\nimport { AddAdminHoldDialog } from 'src/dialogs/AddAdminHoldDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { SplitListingModal } from 'src/modals/SplitListing';\nimport { AdminHoldIcon } from 'src/svgs/AdminHoldIcon';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SQL_MAX_DATEITME } from 'src/utils/dateTimeUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ListingClient,\n ListingDetailDataField,\n ListingDetails,\n ListingMetrics,\n} from 'src/WebApiController';\n\nexport const LaunchUpdateAdminHold = ({\n listingId,\n isAddHold,\n variant,\n iconOnlyMode,\n ...buttonProps\n}: {\n listingId: number;\n isAddHold?: boolean;\n variant?: ButtonProps['variant'];\n iconOnlyMode?: boolean;\n disabled?: boolean;\n} & ComponentProps) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n const { refreshMetrics } = useCatalogMetricsContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const { posEntity: listing, setActivePosEntity } =\n useActivePosEntityContext();\n\n const adminHoldDialog = useBasicDialog();\n const [isLoading, setIsLoading] = useState(false);\n\n const onAddHold = useCallback(\n async (\n adminHoldExpirationDate: Date | null,\n adminHoldNotes: string | null\n ) => {\n setIsLoading(true);\n return await tryInvokeApi(\n async () => {\n const result = await new ListingClient(\n activeAccountWebClientConfig\n ).updateListingAdminHold(\n listingId,\n (adminHoldExpirationDate ?? SQL_MAX_DATEITME).toISOString(),\n adminHoldNotes\n );\n if (result) {\n refreshExpandedListItems();\n refreshMetrics?.();\n if (listing) {\n await setActivePosEntity(listing.id, listing.idOnMkp, true, [\n ListingDetailDataField.Basic,\n ]);\n }\n }\n },\n (error) => {\n showErrorDialog('ListingClient.updateListingAdminHold', error);\n },\n () => {\n setIsLoading(false);\n adminHoldDialog.closeDialog();\n }\n );\n },\n [\n activeAccountWebClientConfig,\n adminHoldDialog,\n listing,\n listingId,\n refreshExpandedListItems,\n refreshMetrics,\n setActivePosEntity,\n showErrorDialog,\n ]\n );\n\n const onRemoveHold = useCallback(async () => {\n return await tryInvokeApi(\n async () => {\n const result = await new ListingClient(\n activeAccountWebClientConfig\n ).updateListingAdminHold(listingId, null, null);\n if (result) {\n refreshExpandedListItems();\n refreshMetrics?.();\n if (listing) {\n await setActivePosEntity(listing.id, listing.idOnMkp, true, [\n ListingDetailDataField.Basic,\n ]);\n }\n }\n },\n (error) => {\n showErrorDialog('ListingClient.updateListingAdminHold', error);\n }\n );\n }, [\n activeAccountWebClientConfig,\n listing,\n listingId,\n refreshExpandedListItems,\n refreshMetrics,\n setActivePosEntity,\n showErrorDialog,\n ]);\n\n const onClickHandler = useCallback(\n (e: React.MouseEvent) => {\n if (isAddHold) {\n e.preventDefault();\n e.stopPropagation();\n adminHoldDialog.launchDialog();\n } else {\n onRemoveHold();\n }\n },\n [adminHoldDialog, isAddHold, onRemoveHold]\n );\n\n return (\n <>\n \n }\n />\n \n \n );\n};\n","import { useCallback, useContext } from 'react';\nimport { UploadButton } from 'src/components/Buttons';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { ButtonProps } from 'src/core/ui';\nimport {\n UploadExternalIdProps,\n UploadExternalIds,\n} from 'src/modals/UploadExternalIds';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { EntityWithRealTickets } from 'src/utils/ticketUtils';\nimport { ListingActionType, SaleActionType } from 'src/WebApiController';\n\nexport const LaunchUploadExternalIds = ({\n entityId,\n idOnMkp,\n variant,\n iconOnlyMode,\n dropdownItemMode,\n disabled,\n action,\n ...modalProps\n}: UploadExternalIdProps & {\n entityId: number;\n idOnMkp?: string | null;\n variant?: ButtonProps['variant'];\n iconOnlyMode?: boolean;\n dropdownItemMode?: boolean;\n disabled?: boolean;\n action:\n | ListingActionType.PredeliverExternalIds\n | ListingActionType.RedeliverExternalIds\n | SaleActionType.Fulfill\n | SaleActionType.Refulfill;\n}) => {\n const { setModal } = useContext(ModalContext);\n const { setActivePosEntity } =\n useActivePosEntityContext();\n\n const uploadExternalIds = useCallback(() => {\n setModal({\n children: ,\n clickOutsideToClose: true,\n size: 'slide-in',\n });\n }, [setModal, modalProps]);\n\n const onLaunchDialog = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n\n setActivePosEntity(entityId, idOnMkp);\n uploadExternalIds();\n },\n [setActivePosEntity, entityId, idOnMkp, uploadExternalIds]\n );\n\n if (dropdownItemMode) {\n return (\n \n \n \n );\n }\n\n return (\n \n );\n};\n","import { useCallback, useContext } from 'react';\nimport { UploadButton } from 'src/components/Buttons';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { ButtonProps } from 'src/core/ui';\nimport {\n UploadTicketUrlProps,\n UploadTicketUrls,\n} from 'src/modals/UploadTicketUrls';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { EntityWithRealTickets } from 'src/utils/ticketUtils';\nimport { ListingActionType, SaleActionType } from 'src/WebApiController';\n\nexport const LaunchUploadTicketUrls = ({\n entityId,\n idOnMkp,\n variant,\n iconOnlyMode,\n dropdownItemMode,\n disabled,\n action,\n ...modalProps\n}: UploadTicketUrlProps & {\n entityId: number;\n idOnMkp?: string | null;\n variant?: ButtonProps['variant'];\n iconOnlyMode?: boolean;\n dropdownItemMode?: boolean;\n disabled?: boolean;\n action:\n | ListingActionType.PredeliverTicketUrls\n | ListingActionType.RedeliverTicketUrls\n | SaleActionType.Fulfill\n | SaleActionType.Refulfill;\n}) => {\n const { setModal } = useContext(ModalContext);\n const { setActivePosEntity } =\n useActivePosEntityContext();\n\n const uploadTicketUrls = useCallback(() => {\n setModal({\n children: ,\n clickOutsideToClose: true,\n size: 'slide-in',\n });\n }, [setModal, modalProps]);\n\n const onLaunchDialog = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n\n setActivePosEntity(entityId, idOnMkp);\n uploadTicketUrls();\n },\n [setActivePosEntity, entityId, idOnMkp, uploadTicketUrls]\n );\n\n if (dropdownItemMode) {\n return (\n \n \n \n );\n }\n\n return (\n \n );\n};\n","import { isEqual } from 'lodash-es';\nimport {\n FieldValues,\n Path,\n UseFormClearErrors,\n UseFormSetValue,\n} from 'react-hook-form';\nimport {\n ButtonWithIcon,\n IconButton,\n UploadButton,\n} from 'src/components/Buttons';\nimport { AdminHoldBadge } from 'src/components/Listings/AdminHoldBadge';\nimport { PosDropdown } from 'src/core/POS/PosDropdown';\nimport { vars } from 'src/core/themes';\nimport { ButtonProps } from 'src/core/ui';\nimport { ListingDetailsModalConfig } from 'src/modals/ListingDetails';\nimport { LaunchBroadcastListing } from 'src/modals/ListingDetails/actions/LaunchBroadcastListing';\nimport { LaunchCreateMarketplaceSale } from 'src/modals/ListingDetails/actions/LaunchCreateMarketplaceSale';\nimport { LaunchCreateOfflineSale } from 'src/modals/ListingDetails/actions/LaunchCreateOfflineSale';\nimport { LaunchDownloadUserDocuments } from 'src/modals/ListingDetails/actions/LaunchDownloadUserDocuments';\nimport { LaunchSplitListing } from 'src/modals/ListingDetails/actions/LaunchSplitListing';\nimport { LaunchSplitListingToOriginal } from 'src/modals/ListingDetails/actions/LaunchSplitListingToOriginal';\nimport { LaunchUpdateAdminHold } from 'src/modals/ListingDetails/actions/LaunchUpdateAdminHold';\nimport { ModalProps } from 'src/modals/Modal';\nimport { LaunchUploadBarcodes } from 'src/modals/UploadBarcodes/LaunchUploadBarcodes';\nimport { LaunchUploadETickets } from 'src/modals/UploadETickets/LaunchUploadETickets';\nimport { LaunchUploadExternalIds } from 'src/modals/UploadExternalIds/LaunchUploadExternalIds';\nimport { LaunchUploadTicketUrls } from 'src/modals/UploadTicketUrls/LaunchUploadTicketUrls';\nimport { MainRoute } from 'src/navigations/Routes/MainRoute';\nimport { BroadcastIcon, UnbroadcastIcon } from 'src/svgs';\nimport { AnimatedBroadcastIcon } from 'src/svgs/AnimatedBroadcastIcon';\nimport { AnimatedUnbroadcastIcon } from 'src/svgs/AnimatedUnbroadcastIcon';\nimport { BroadcastFailedIcon } from 'src/svgs/BroadcastFailedIcon';\nimport { BroadcastWithErrorIcon } from 'src/svgs/BroadcastWithErrorIcon';\nimport { DuplicateOutlinedIcon } from 'src/svgs/DuplicateOutlinedIcon';\nimport { FullySoldIcon } from 'src/svgs/FullySoldIcon';\nimport { PendingQCIcon } from 'src/svgs/PendingQC';\nimport { PosIconProps } from 'src/svgs/SvgWrapper';\nimport { ClockIcon } from 'src/svgs/Viagogo';\nimport {\n EMPTY_SELLER_USER_ID,\n InventoryDeeplinkQueryParam,\n REACT_APP_STUBHUB_BASE_URL,\n REACT_APP_VIAGOGO_BASE_URL,\n SuspiciousPriceChangeThreshold,\n} from 'src/utils/constants/constants';\nimport {\n ActionOutboxEntityType,\n AutoPricingCompListingMode,\n AutoPricingInputs,\n AutoPricingOutlierMode,\n AutoPricingUndercutMode,\n DocumentProcessorClient,\n DocumentUploadInfo,\n Event,\n EventWithData,\n FileParameter,\n GroupType,\n Listing,\n ListingActionType,\n ListingBroadcastStatus,\n ListingClient,\n ListingDetailsUpdateInput,\n ListingGroup,\n ListingMarketplacePriceUpdateInput,\n ListingStatus,\n Marketplace,\n MarketplaceAccountSetting,\n PendingProofState,\n PosClientConfig,\n QualityControlState,\n Tag,\n TicketBarcode,\n TicketExternalId,\n TicketType,\n TicketUrl,\n UiCurrency,\n UserDocument,\n} from 'src/WebApiController';\n\nimport { ContentId } from './constants/contentId';\nimport { LISTING_STATUS_WITH_ACTION_TO_CID } from './constants/contentIdMaps';\nimport { FormatContentId } from './constants/formatContentId';\nimport { getFullUrl, getPathFromMainRoute } from './deepLinkUtils';\nimport { compareMarketplace } from './eventWithDataUtils';\nimport { roundToPrecision } from './numberFormatter';\nimport { tagHasChanges } from './tagUtils';\n\nexport const getListingDetailsModalConfigWithDeepLink = (\n deepLinkId?: string | number,\n doTrackView = false\n) => {\n return {\n ...ListingDetailsModalConfig,\n deepLinkValue: deepLinkId,\n trackViewEntityType: doTrackView\n ? ActionOutboxEntityType.Listing\n : undefined,\n };\n};\n\nexport const ListingCatalogQueryKey = 'CatalogClient.getCatalogForListing';\nexport const ListingCatalogMetricsQueryKey =\n 'CatalogClient.getCatalogListingMetrics';\n\nexport const getListingDetailsDeepLinkUrl = (deepLinkId?: string | number) => {\n return getFullUrl(\n MainRoute.Inventory,\n InventoryDeeplinkQueryParam,\n deepLinkId\n );\n};\n\nexport const getListingDetailsRelativeUrl = (deepLinkId?: string | number) => {\n const navigateUrl = `${getPathFromMainRoute(\n MainRoute.Inventory\n )}?${InventoryDeeplinkQueryParam}=${deepLinkId}`;\n\n return navigateUrl;\n};\n\n/**\n * Get all listing ids excluding listing groups\n * @param listings\n * @returns\n */\nexport const getFlattenedListingIds = (listings: Listing[]) => {\n return [\n ...listings.filter((n) => !n.isLtGrp).map((l) => l.id),\n ...listings\n .filter((n) => n.isLtGrp)\n .flatMap((g) =>\n (g as ListingGroup).groupItems\n .filter((gi) => !(gi as ListingGroup).groupItems)\n .map((gi) => gi.id)\n ),\n // this is the second level group\n ...listings\n .filter((n) => n.isLtGrp)\n .flatMap((g) =>\n (g as ListingGroup).groupItems\n .filter((gi) => (gi as ListingGroup).groupItems)\n .flatMap((gi) => (gi as ListingGroup).groupItems.map((gi2) => gi2.id))\n ),\n ];\n};\n\nconst getListingUploadDropdownItems = (\n listing: Listing,\n actions: ListingActionType[],\n variant?: ButtonProps['variant'],\n cancelTo?: ModalProps,\n disabled?: boolean\n) => {\n const dropdownItems = [];\n\n const barcodeAction = actions.find(\n (a) =>\n a === ListingActionType.PredeliverBarcodes ||\n a === ListingActionType.RedeliverBarcodes\n ) as\n | ListingActionType.PredeliverBarcodes\n | ListingActionType.RedeliverBarcodes\n | undefined;\n\n if (barcodeAction) {\n dropdownItems.push(\n \n new ListingClient(clientConfig).updateBarcodesForListing(\n listingId,\n barcodes\n )\n }\n dropdownItemMode={true}\n action={barcodeAction}\n entityId={listing.id}\n idOnMkp={listing.idOnMkp}\n iconOnlyMode={false}\n cancelTo={cancelTo}\n variant={variant}\n loadingContentId={FormatContentId.LoadingListingId}\n errorContentId={FormatContentId.CouldNotFindListingId}\n searchingContentId={FormatContentId.SearchingForListingId}\n />\n );\n }\n\n const ticketUrlAction = actions.find(\n (a) =>\n a === ListingActionType.PredeliverTicketUrls ||\n a === ListingActionType.RedeliverTicketUrls\n ) as\n | ListingActionType.PredeliverTicketUrls\n | ListingActionType.RedeliverTicketUrls\n | undefined;\n if (ticketUrlAction) {\n dropdownItems.push(\n \n new ListingClient(clientConfig).updateTicketUrlsForListing(\n listingId,\n ticketUrls\n )\n }\n dropdownItemMode={true}\n action={ticketUrlAction}\n entityId={listing.id}\n idOnMkp={listing.idOnMkp}\n iconOnlyMode={false}\n cancelTo={cancelTo}\n variant={variant}\n loadingContentId={FormatContentId.LoadingListingId}\n errorContentId={FormatContentId.CouldNotFindListingId}\n searchingContentId={FormatContentId.SearchingForListingId}\n />\n );\n }\n\n const externalIdAction = actions.find(\n (a) =>\n a === ListingActionType.PredeliverExternalIds ||\n a === ListingActionType.RedeliverExternalIds\n ) as\n | ListingActionType.PredeliverExternalIds\n | ListingActionType.RedeliverExternalIds\n | undefined;\n if (externalIdAction) {\n dropdownItems.push(\n \n new ListingClient(clientConfig).updateExternalIdsForListing(\n listingId,\n externalIds\n )\n }\n dropdownItemMode={true}\n action={externalIdAction}\n entityId={listing.id}\n idOnMkp={listing.idOnMkp}\n iconOnlyMode={false}\n cancelTo={cancelTo}\n variant={variant}\n loadingContentId={FormatContentId.LoadingListingId}\n errorContentId={FormatContentId.CouldNotFindListingId}\n searchingContentId={FormatContentId.SearchingForListingId}\n />\n );\n }\n\n const createEticketDropdown = (\n ticketType: TicketType.ETicket | TicketType.QRCode,\n action:\n | ListingActionType.PredeliverETickets\n | ListingActionType.RedeliverETickets\n | ListingActionType.PredeliverQRCode\n | ListingActionType.RedeliverQRCode\n ) => {\n dropdownItems.push(\n \n ticketType === TicketType.ETicket\n ? new ListingClient(clientConfig).updateETicketsForListing(\n entityId,\n etickets\n )\n : new ListingClient(clientConfig).updateMobileQRCodesForListing(\n entityId,\n etickets\n )\n }\n onUploadDocuments={(\n client: DocumentProcessorClient,\n docUploadInfo: DocumentUploadInfo,\n file: FileParameter\n ) =>\n client.uploadDocumentForListing(\n docUploadInfo.entityId,\n ActionOutboxEntityType.Listing,\n docUploadInfo.documentType,\n docUploadInfo.blobName,\n docUploadInfo.documentId,\n docUploadInfo.contentType,\n file\n )\n }\n loadingContentId={FormatContentId.LoadingListingId}\n errorContentId={FormatContentId.CouldNotFindListingId}\n searchingContentId={FormatContentId.SearchingForListingId}\n />\n );\n };\n\n const eticketAction = actions.find(\n (a) =>\n a === ListingActionType.PredeliverETickets ||\n a === ListingActionType.RedeliverETickets\n ) as\n | ListingActionType.PredeliverETickets\n | ListingActionType.RedeliverETickets\n | undefined;\n if (eticketAction) {\n createEticketDropdown(TicketType.ETicket, eticketAction);\n }\n\n const qrCodeAction = actions.find(\n (a) =>\n a === ListingActionType.PredeliverQRCode ||\n a === ListingActionType.RedeliverQRCode\n ) as\n | ListingActionType.PredeliverQRCode\n | ListingActionType.RedeliverQRCode\n | undefined;\n if (qrCodeAction) {\n createEticketDropdown(TicketType.QRCode, qrCodeAction);\n }\n\n return dropdownItems;\n};\n\nexport const getListingActionButtons = (\n forTable: boolean,\n listing: Listing,\n actions: ListingActionType[],\n event?: Event | null,\n variant?: ButtonProps['variant'],\n iconOnlyMode?: boolean,\n cancelTo?: ModalProps,\n disabled?: boolean,\n lockListingGroupFromEdits?: (lock: boolean) => void,\n onSetListingActiveInGroup?: () => void\n) => {\n const actionElements: JSX.Element[] = [];\n\n const dropdownItems = [];\n\n if (iconOnlyMode) {\n if (!actions.includes(ListingActionType.DownloadUserDocuments)) {\n dropdownItems.push(\n ...getListingUploadDropdownItems(\n listing,\n actions,\n variant,\n cancelTo,\n disabled\n )\n );\n }\n const hasNoBroadcastActions =\n !listing.actions.includes(ListingActionType.Broadcast) &&\n !listing.actions.includes(ListingActionType.Unbroadcast);\n\n if (listing.isAdminHold) {\n actionElements.push(\n \n }\n />\n );\n } else if (hasNoBroadcastActions && !listing.isAdminHold) {\n const { iconComponent: ListingBroadcastIcon, contentId } =\n getListingBroadcastIcon(\n listing.status,\n listing.qcState,\n !!listing.dupListingId,\n !!listing.ignoreDup,\n listing.isUndeliv,\n listing.brdcstStatus,\n listing.pendProofState\n );\n actionElements.push(\n }\n titleContentId={contentId}\n />\n );\n } else if (\n listing.ltGrpId &&\n !listing.ltGrpActive &&\n !listing.isAdminHold\n ) {\n actionElements.push(\n \n }\n disabled={disabled}\n onClick={onSetListingActiveInGroup}\n titleContentId={ContentId.SetActiveInGroup}\n />\n );\n }\n }\n\n actions.forEach((action) => {\n switch (action) {\n case ListingActionType.FullySoldNoAction:\n actionElements.push(\n }\n variant={variant}\n iconOnlyMode={iconOnlyMode}\n />\n );\n break;\n case ListingActionType.Broadcast:\n case ListingActionType.Unbroadcast:\n actionElements.push(\n \n );\n break;\n case ListingActionType.Split:\n actionElements.push(\n \n );\n break;\n case ListingActionType.SplitToOriginal:\n actionElements.push(\n \n );\n break;\n\n case ListingActionType.AddOfflineSale:\n actionElements.push(\n \n );\n break;\n\n case ListingActionType.AddMarketplaceSale:\n actionElements.push(\n \n );\n break;\n case ListingActionType.PredeliverBarcodes:\n case ListingActionType.RedeliverBarcodes:\n // Show a dropdown to select different upload types if iconOnlyMode is true\n if (\n iconOnlyMode &&\n (dropdownItems.length > 1 ||\n actions.includes(ListingActionType.DownloadUserDocuments))\n )\n break;\n actionElements.push(\n \n new ListingClient(clientConfig).updateBarcodesForListing(\n listingId,\n barcodes\n )\n }\n action={action}\n entityId={listing.id}\n idOnMkp={listing.idOnMkp}\n iconOnlyMode={iconOnlyMode}\n cancelTo={cancelTo}\n variant={variant}\n loadingContentId={FormatContentId.LoadingListingId}\n errorContentId={FormatContentId.CouldNotFindListingId}\n searchingContentId={FormatContentId.SearchingForListingId}\n />\n );\n break;\n case ListingActionType.PredeliverTicketUrls:\n case ListingActionType.RedeliverTicketUrls:\n // Show a dropdown to select different upload types if iconOnlyMode is true\n if (\n iconOnlyMode &&\n (dropdownItems.length > 1 ||\n actions.includes(ListingActionType.DownloadUserDocuments))\n )\n break;\n actionElements.push(\n \n new ListingClient(clientConfig).updateTicketUrlsForListing(\n listingId,\n ticketUrls\n )\n }\n action={action}\n entityId={listing.id}\n idOnMkp={listing.idOnMkp}\n iconOnlyMode={iconOnlyMode}\n cancelTo={cancelTo}\n variant={variant}\n loadingContentId={FormatContentId.LoadingListingId}\n errorContentId={FormatContentId.CouldNotFindListingId}\n searchingContentId={FormatContentId.SearchingForListingId}\n />\n );\n break;\n case ListingActionType.PredeliverExternalIds:\n case ListingActionType.RedeliverExternalIds:\n // Show a dropdown to select different upload types if iconOnlyMode is true\n if (\n iconOnlyMode &&\n (dropdownItems.length > 1 ||\n actions.includes(ListingActionType.DownloadUserDocuments))\n )\n break;\n actionElements.push(\n \n new ListingClient(clientConfig).updateExternalIdsForListing(\n listingId,\n externalIds\n )\n }\n action={action}\n entityId={listing.id}\n idOnMkp={listing.idOnMkp}\n iconOnlyMode={iconOnlyMode}\n cancelTo={cancelTo}\n variant={variant}\n loadingContentId={FormatContentId.LoadingListingId}\n errorContentId={FormatContentId.CouldNotFindListingId}\n searchingContentId={FormatContentId.SearchingForListingId}\n />\n );\n break;\n case ListingActionType.PredeliverETickets:\n case ListingActionType.RedeliverETickets:\n case ListingActionType.PredeliverQRCode:\n case ListingActionType.RedeliverQRCode: {\n // Show a dropdown to select different upload types if iconOnlyMode is true\n if (\n iconOnlyMode &&\n (dropdownItems.length > 1 ||\n actions.includes(ListingActionType.DownloadUserDocuments))\n )\n break;\n const ticketType =\n action === ListingActionType.PredeliverETickets ||\n action === ListingActionType.RedeliverETickets\n ? TicketType.ETicket\n : TicketType.QRCode;\n\n actionElements.push(\n \n ticketType === TicketType.ETicket\n ? new ListingClient(clientConfig).updateETicketsForListing(\n entityId,\n etickets\n )\n : new ListingClient(clientConfig).updateMobileQRCodesForListing(\n entityId,\n etickets\n )\n }\n onUploadDocuments={(\n client: DocumentProcessorClient,\n docUploadInfo: DocumentUploadInfo,\n file: FileParameter\n ) =>\n client.uploadDocumentForListing(\n docUploadInfo.entityId,\n ActionOutboxEntityType.Listing,\n docUploadInfo.documentType,\n docUploadInfo.blobName,\n docUploadInfo.documentId,\n docUploadInfo.contentType,\n file\n )\n }\n loadingContentId={FormatContentId.LoadingListingId}\n errorContentId={FormatContentId.CouldNotFindListingId}\n searchingContentId={FormatContentId.SearchingForListingId}\n />\n );\n break;\n }\n\n case ListingActionType.AddAdminHold:\n case ListingActionType.RemoveAdminHold:\n actionElements.push(\n \n );\n break;\n case ListingActionType.DownloadUserDocuments:\n actionElements.unshift(\n \n );\n break;\n default:\n break;\n }\n });\n\n if (dropdownItems.length > 1) {\n // Insert upload actions always at the beginning\n actionElements.unshift(\n \n }\n align=\"end\"\n triggerProps={{ disabled: disabled }}\n >\n {dropdownItems}\n \n );\n }\n\n if (actionElements.length) {\n return actionElements;\n } else {\n return null;\n }\n};\n\ntype IconComponent = (props: Omit) => JSX.Element;\n\nconst BROADCAST_STATE_TO_ICON: Partial> = {\n [ListingStatus.FullySold]: FullySoldIcon,\n [ListingStatus.Listed]: BroadcastIcon,\n [ListingStatus.ListingPending]: AnimatedBroadcastIcon,\n [ListingStatus.DelistingPending]: AnimatedUnbroadcastIcon,\n [ListingStatus.ListingFailed]: BroadcastFailedIcon,\n [ListingStatus.DelistingFailed]: BroadcastWithErrorIcon,\n [ListingStatus.Delisted]: UnbroadcastIcon,\n};\nconst PENDING_QC_ICON = {\n iconComponent: PendingQCIcon,\n contentId: ContentId.PendingQC,\n};\n\n/**\n * Gets the applicable icon for a listing status (and optionally a QC state), along with its contentId\n * @param status\n * @param qcState\n * @returns\n */\nexport const getListingBroadcastIcon = (\n status?: ListingStatus,\n qcState?: QualityControlState | null,\n isDuplicate?: boolean,\n ignoreDuplicate?: boolean,\n isUndeliverable?: boolean | null,\n broadcastStatus?: ListingBroadcastStatus | null,\n pendingProofState?: PendingProofState | null\n): {\n iconComponent: IconComponent;\n contentId?: ContentId;\n} => {\n const isPendingQc = qcState === QualityControlState.Pending;\n const isListed = status === ListingStatus.Listed;\n\n if (isDuplicate && !ignoreDuplicate) {\n return {\n iconComponent: DuplicateOutlinedIcon,\n contentId: ContentId.DuplicatedListing,\n };\n }\n\n if (!isListed && isPendingQc) return PENDING_QC_ICON;\n\n if (!status) {\n return {\n iconComponent: UnbroadcastIcon,\n contentId: ContentId.Unbroadcasted,\n };\n }\n\n if (broadcastStatus === ListingBroadcastStatus.BroadcastWithError) {\n return {\n iconComponent: BroadcastWithErrorIcon,\n contentId: ContentId.SyncFailedClickToDelist,\n };\n }\n\n if (broadcastStatus === ListingBroadcastStatus.UnbroadcastWithError) {\n return {\n iconComponent: UnbroadcastIcon,\n contentId: ContentId.DelistedClickToRelist,\n };\n }\n\n const contentId = LISTING_STATUS_WITH_ACTION_TO_CID[status];\n const iconComponent = BROADCAST_STATE_TO_ICON[status] || UnbroadcastIcon;\n\n if (status === ListingStatus.Listed && isUndeliverable) {\n return {\n iconComponent: BroadcastWithErrorIcon,\n contentId: ContentId.Undeliverable,\n };\n }\n\n if (\n status === ListingStatus.Listed &&\n pendingProofState === PendingProofState.PendingProof\n ) {\n return {\n iconComponent: BroadcastWithErrorIcon,\n contentId,\n };\n }\n\n return { iconComponent, contentId };\n};\n\nexport const getAllInPriceFromListPrice = (\n listPrice?: number | null,\n listing?: Listing | null,\n fallbackFee?: number | null,\n uiCurrency?: UiCurrency | null\n) => {\n if (listPrice == null) {\n return listPrice;\n }\n const stubHubMarketplace = listing?.mkpListings?.find(\n (m) => m.mkp === Marketplace.StubHub\n );\n\n const fee =\n stubHubMarketplace?.sellerFee != null\n ? stubHubMarketplace.sellerFee\n : fallbackFee;\n\n const allInRatio = 1 / (1 - (fee ?? 0));\n\n return roundToPrecision(listPrice * allInRatio, uiCurrency?.dec ?? 4);\n};\n\nexport const getListPriceFromAllinPrice = (\n allInPrice?: number | null,\n listing?: Listing | null,\n fallbackFee?: number | null\n) => {\n if (allInPrice == null) {\n return allInPrice;\n }\n const stubHubMarketplace = listing?.mkpListings?.find(\n (m) => m.mkp === Marketplace.StubHub\n );\n\n const fee =\n stubHubMarketplace?.sellerFee != null\n ? stubHubMarketplace.sellerFee\n : fallbackFee;\n\n const listRatio = 1 - (fee ?? 0);\n\n return roundToPrecision(allInPrice * listRatio, 4);\n};\n\nexport const getAllInPriceFromListPriceForListing = (\n listing?: Listing | null,\n uiCurrency?: UiCurrency | null\n) => {\n return listing?.listPrice\n ? getAllInPriceFromListPrice(listing.listPrice, listing, null, uiCurrency)\n : listing?.allInPrice;\n};\n\nexport const getListingDetailsUpdateInput = (\n listing?: Listing | null,\n uiCurrency?: UiCurrency | null,\n accountMarketplaces?: MarketplaceAccountSetting[],\n accountPricingSettings?: AutoPricingInputs | null,\n groupPricingSettings?: AutoPricingInputs | null,\n isBulkEdit?: boolean,\n listingPricingSettings?: AutoPricingInputs | null,\n allowSeatScoreCompListingMode?: boolean\n) => {\n const marketplacePriceUpdates = listing?.mkpListings\n ? listing.mkpListings\n ?.filter((m) => m.mkp !== Marketplace.StubHub)\n ?.toSorted((a, b) => compareMarketplace(a.mkp, b.mkp))\n ?.map((x) => {\n const listPriceMarkup = x.markup ?? x.sellerAccountDefaultMarkup ?? 0;\n\n return {\n allInPrice: x.isPriceByMkp\n ? (x.webPrice ?? listing?.allInPrice)\n : null,\n listPrice: x.isPriceByMkp\n ? (x.netProcs ?? listing?.listPrice)\n : (listing?.listPrice ?? 0) * (1 + listPriceMarkup),\n priceByMarketplace: x.isPriceByMkp,\n marketplace: x.mkp,\n markup:\n x.markup != null ? roundToPrecision(x.markup * 100, 2) : null,\n } as ListingMarketplacePriceUpdateInput;\n })\n : accountMarketplaces\n ? accountMarketplaces\n ?.filter((m) => m.mkp !== Marketplace.StubHub)\n ?.toSorted((a, b) => compareMarketplace(a.mkp, b.mkp))\n ?.map(\n (x) =>\n ({\n allInPrice: null,\n listPrice: null,\n priceByMarketplace: false,\n marketplace: x.mkp,\n }) as ListingMarketplacePriceUpdateInput\n )\n : [];\n\n const quantityScoreOverrideJson = safeParseJson(listing?.compQtyScrAdjJson);\n\n // Listing is totally null for bulk updates\n const defaultQuantityScoreOverrideJson =\n listing == null\n ? null\n : JSON.stringify({\n ...quantityScoreOverrideJson,\n quantityFilter: null,\n });\n\n // If SectionId or RowId filters are set, make sure we alwayws set compListingOnlyForSelectedSectionsEnabled to true\n // If a user decides to disable this setting, we need to make it known that the selected sections are not being used\n const defaultCompListingOnlyForSelectedSectionsEnabled =\n !!listing?.compSectionSettings?.sectionIdFilter?.length;\n\n const defaultCurrencyCode = listing?.currency ?? uiCurrency?.code;\n\n const defaultCompListingMode = allowSeatScoreCompListingMode\n ? AutoPricingCompListingMode.QualityScore\n : AutoPricingCompListingMode.SameEvent;\n\n return {\n id: listing?.id,\n rowVersion: listing?.rowVer,\n splitType: listing?.splitType,\n hideSeatsFromMarketplace: listing?.hideSeats,\n pricerSellerUserId:\n listing == null ? EMPTY_SELLER_USER_ID : listing?.pricerId,\n currencyCode: defaultCurrencyCode,\n\n inHandDate: listing?.inHandAt,\n isNoFulfill: listing?.isNoFulfill,\n enableNativeSync: listing?.enableNativeSync,\n\n delivType: listing?.delivType,\n seatTraits: listing?.seatTraits,\n\n section: listing?.seating?.section,\n sectionId: listing?.seating?.sectionId,\n row: listing?.seating?.row,\n rowId: listing?.seating?.rowId,\n\n listPrice: listing?.listPrice,\n allInPrice: getAllInPriceFromListPriceForListing(listing, uiCurrency),\n faceValue: listing?.faceValue?.amt,\n manualMaxDisplayQuantity: listing?.manMaxDispQty ?? listing?.maxDispQty,\n\n marketplacePriceUpdates,\n\n marketplaceSeatOverrides:\n listing?.mkpListings\n ?.filter((m) => m.mkp && m.mkp !== Marketplace.Offline)\n ?.toSorted((a, b) => compareMarketplace(a.mkp, b.mkp))\n ?.map((m) => ({\n marketplace: m.mkp,\n overrideSection: m.overrideSection,\n overrideRow: m.overrideRow,\n overrideSeats: m.overrideSeats,\n overrideRowId: m.overrideRowId,\n overrideSectionId: m.overrideSectionId,\n })) ?? [],\n\n tags: listing?.tags,\n internalNotes: listing?.privNotes,\n\n netProceedsFloor: listing == null ? -1 : listing?.procsFloor,\n netProceedsCeiling: listing == null ? -1 : listing?.procsCeil,\n\n autoPricingEnabled: listing?.isAutoPrc ?? (isBulkEdit ? true : false),\n\n compListingFloor:\n listingPricingSettings?.compListingFloor ??\n listing?.compFloor ??\n groupPricingSettings?.compListingFloor ??\n accountPricingSettings?.compListingFloor ??\n 1,\n compListingCeiling:\n listingPricingSettings?.compListingCeiling ??\n listing?.compCeil ??\n groupPricingSettings?.compListingCeiling ??\n accountPricingSettings?.compListingCeiling ??\n 6,\n compListingMode:\n listingPricingSettings?.compListingMode ??\n listing?.compMode ??\n groupPricingSettings?.compListingMode ??\n accountPricingSettings?.compListingMode ??\n defaultCompListingMode,\n compListingOnlyForSameZoneEnabled:\n listingPricingSettings?.compListingOnlyForSameZoneEnabled ??\n listing?.isCompForSameZone ??\n groupPricingSettings?.compListingOnlyForSameZoneEnabled ??\n accountPricingSettings?.compListingOnlyForSameZoneEnabled ??\n !defaultCompListingOnlyForSelectedSectionsEnabled, // Default to false if we have selected sections enabled\n compListingOnlyForSelectedSectionsEnabled:\n listingPricingSettings?.compListingOnlyForSelectedSectionsEnabled ??\n listing?.isCompSelectedSections ??\n groupPricingSettings?.compListingOnlyForSelectedSectionsEnabled ??\n accountPricingSettings?.compListingOnlyForSelectedSectionsEnabled ??\n defaultCompListingOnlyForSelectedSectionsEnabled,\n compListingExcludeFanInventory:\n listingPricingSettings?.compListingExcludeFanInventory ??\n listing?.compExclFanInv ??\n groupPricingSettings?.compListingExcludeFanInventory ??\n accountPricingSettings?.compListingExcludeFanInventory ??\n null,\n compListingExcludeDefects:\n listingPricingSettings?.compListingExcludeDefects ??\n listing?.compExclDefects ??\n groupPricingSettings?.compListingExcludeDefects ??\n accountPricingSettings?.compListingExcludeDefects ??\n null,\n compListingQuantityScoreAdjustmentEnabled:\n listingPricingSettings?.compListingQuantityScoreAdjustmentEnabled ??\n listing?.isCompQtyScrAdj ??\n groupPricingSettings?.compListingQuantityScoreAdjustmentEnabled ??\n accountPricingSettings?.compListingQuantityScoreAdjustmentEnabled,\n compListingQuantityScoreAdjustmentOverrideJson:\n listingPricingSettings?.compListingQuantityScoreAdjustmentOverrideJson ??\n listing?.compQtyScrAdjJson ??\n groupPricingSettings?.compListingQuantityScoreAdjustmentOverrideJson ??\n defaultQuantityScoreOverrideJson,\n compListingSelectedSectionSettings:\n listingPricingSettings?.compListingSelectedSectionSettings ??\n listing?.compSectionSettings ??\n groupPricingSettings?.compListingSelectedSectionSettings ??\n accountPricingSettings?.compListingSelectedSectionSettings,\n compListingQuantityFilters:\n listingPricingSettings?.compListingQuantityFilters ??\n groupPricingSettings?.compListingQuantityFilters ??\n accountPricingSettings?.compListingQuantityFilters,\n undercutMode:\n listingPricingSettings?.undercutMode ??\n listing?.undMode ??\n groupPricingSettings?.undercutMode ??\n accountPricingSettings?.undercutMode ??\n AutoPricingUndercutMode.Simple,\n undercutAbsoluteAmount:\n listingPricingSettings?.undercutAbsoluteAmount ??\n listing?.undAbsAmt ??\n groupPricingSettings?.undercutAbsoluteAmount ??\n accountPricingSettings?.undercutAbsoluteAmount ??\n 0.01,\n undercutRelativeAmount:\n listingPricingSettings?.undercutRelativeAmount ??\n listing?.undRelAmt ??\n groupPricingSettings?.undercutRelativeAmount ??\n accountPricingSettings?.undercutRelativeAmount ??\n 0,\n circuitBreakerMaxDiscountVelocityPercent:\n listingPricingSettings?.circuitBreakerMaxDiscountVelocityPercent ??\n listing?.cirBrMaxDiscVelocPercent ??\n groupPricingSettings?.circuitBreakerMaxDiscountVelocityPercent ??\n accountPricingSettings?.circuitBreakerMaxDiscountVelocityPercent ??\n 0.8,\n circuitBreakerMaxDiscountVelocityTicksInHours:\n listingPricingSettings?.circuitBreakerMaxDiscountVelocityTicksInHours ??\n listing?.cirBrMaxDiscVelocTicksInHrs ??\n groupPricingSettings?.circuitBreakerMaxDiscountVelocityTicksInHours ??\n accountPricingSettings?.circuitBreakerMaxDiscountVelocityTicksInHours ??\n 6,\n circuitBreakerMinCompListingCount:\n listingPricingSettings?.circuitBreakerMinCompListingCount ??\n listing?.cirBrMinCompCount ??\n groupPricingSettings?.circuitBreakerMinCompListingCount ??\n accountPricingSettings?.circuitBreakerMinCompListingCount ??\n 10,\n circuitBreakerRelativeCeiling:\n listingPricingSettings?.circuitBreakerRelativeCeiling ??\n listing?.cirBrRelCeil ??\n groupPricingSettings?.circuitBreakerRelativeCeiling ??\n accountPricingSettings?.circuitBreakerRelativeCeiling ??\n 100,\n circuitBreakerRelativeFloor:\n listingPricingSettings?.circuitBreakerRelativeFloor ??\n listing?.cirBrRelFloor ??\n groupPricingSettings?.circuitBreakerRelativeFloor ??\n accountPricingSettings?.circuitBreakerRelativeFloor ??\n 1,\n outlierMode:\n listingPricingSettings?.outlierMode ??\n listing?.outMode ??\n groupPricingSettings?.outlierMode ??\n accountPricingSettings?.outlierMode ??\n AutoPricingOutlierMode.StandardDeviations,\n outlierStandardDeviations:\n listingPricingSettings?.outlierStandardDeviations ??\n listing?.outlStdDev ??\n groupPricingSettings?.outlierStandardDeviations ??\n accountPricingSettings?.outlierStandardDeviations ??\n 3,\n outlierKthLowestLimit:\n listingPricingSettings?.outlierKthLowestLimit ??\n listing?.outKthLowestLim ??\n groupPricingSettings?.outlierKthLowestLimit ??\n accountPricingSettings?.outlierKthLowestLimit,\n outlierKthLowestLimitRelativeSpacing:\n listingPricingSettings?.outlierKthLowestLimitRelativeSpacing ??\n listing?.outKthLowestLimRelSpc ??\n groupPricingSettings?.outlierKthLowestLimitRelativeSpacing ??\n accountPricingSettings?.outlierKthLowestLimitRelativeSpacing,\n outlierKthLowestLimitAbsoluteSpacing:\n listingPricingSettings?.outlierKthLowestLimitAbsoluteSpacing ??\n listing?.outKthLowestLimAbsSpc ??\n groupPricingSettings?.outlierKthLowestLimitAbsoluteSpacing ??\n accountPricingSettings?.outlierKthLowestLimitAbsoluteSpacing,\n\n adminHoldNotes: listing?.adminHoldNotes,\n adminHoldExpirationDate: listing?.adminHoldExpiredOn,\n ticketTypeRules: listing?.tktTypeRules,\n\n // If listing id is null, we're creating the default input for bulk edit - default to skipping everything\n skipAdvancePricing: !listing?.id,\n skipAutoPricing: !listing?.id,\n skipCompListing: !listing?.id,\n skipPriceProtection: !listing?.id,\n skipUndercut: !listing?.id,\n } as ListingDetailsUpdateInput;\n};\n\nexport const isListingDetailsInputChanged = (\n input: ListingDetailsUpdateInput,\n initial?: ListingDetailsUpdateInput,\n tagsMetadata?: Tag[] | null\n) => {\n const hasChanged =\n initial?.splitType !== input.splitType ||\n initial?.hideSeatsFromMarketplace !== input.hideSeatsFromMarketplace ||\n initial?.delivType !== input.delivType ||\n !isEqual(initial?.seatTraits, input.seatTraits) ||\n initial?.isNoFulfill !== input.isNoFulfill ||\n initial?.inHandDate !== input.inHandDate ||\n initial?.allInPrice !== input.allInPrice ||\n initial?.listPrice !== input.listPrice ||\n !isEqual(\n initial?.marketplacePriceUpdates,\n input?.marketplacePriceUpdates\n ) ||\n !isEqual(\n initial?.marketplaceSeatOverrides,\n input?.marketplaceSeatOverrides\n ) ||\n initial?.pricerSellerUserId !== input.pricerSellerUserId ||\n initial?.autoPricingEnabled !== input.autoPricingEnabled ||\n initial?.netProceedsFloor !== input.netProceedsFloor ||\n initial?.netProceedsCeiling !== input.netProceedsCeiling ||\n initial?.compListingMode !== input.compListingMode ||\n initial?.compListingFloor !== input.compListingFloor ||\n initial?.compListingCeiling !== input.compListingCeiling ||\n initial?.compListingQuantityScoreAdjustmentEnabled !==\n input.compListingQuantityScoreAdjustmentEnabled ||\n initial?.compListingQuantityScoreAdjustmentOverrideJson !==\n input.compListingQuantityScoreAdjustmentOverrideJson ||\n initial?.compListingOnlyForSameZoneEnabled !==\n input.compListingOnlyForSameZoneEnabled ||\n initial?.compListingOnlyForSelectedSectionsEnabled !==\n input.compListingOnlyForSelectedSectionsEnabled ||\n initial?.compListingExcludeFanInventory !==\n input.compListingExcludeFanInventory ||\n initial?.compListingExcludeDefects !== input.compListingExcludeDefects ||\n !isEqual(\n initial?.compListingSelectedSectionSettings,\n input?.compListingSelectedSectionSettings\n ) ||\n initial?.undercutMode !== input.undercutMode ||\n initial?.undercutAbsoluteAmount !== input.undercutAbsoluteAmount ||\n initial?.undercutRelativeAmount !== input.undercutRelativeAmount ||\n initial?.circuitBreakerMaxDiscountVelocityPercent !==\n input.circuitBreakerMaxDiscountVelocityPercent ||\n initial?.circuitBreakerMaxDiscountVelocityTicksInHours !==\n input.circuitBreakerMaxDiscountVelocityTicksInHours ||\n initial?.circuitBreakerMinCompListingCount !==\n input.circuitBreakerMinCompListingCount ||\n initial?.circuitBreakerRelativeCeiling !==\n input.circuitBreakerRelativeCeiling ||\n initial?.circuitBreakerRelativeFloor !==\n input.circuitBreakerRelativeFloor ||\n initial?.outlierMode !== input.outlierMode ||\n initial?.outlierStandardDeviations !== input.outlierStandardDeviations ||\n initial?.adminHoldNotes !== input.adminHoldNotes ||\n initial?.enableNativeSync !== input.enableNativeSync ||\n tagHasChanges(\n (initial?.tags ?? []) as Tag[],\n input.tags,\n tagsMetadata ?? []\n ) ||\n initial?.internalNotes !== input.internalNotes ||\n !isEqual(initial?.ticketTypeRules, input?.ticketTypeRules) ||\n initial?.manualMaxDisplayQuantity !== input.manualMaxDisplayQuantity ||\n initial?.section != input.section ||\n initial?.row != input.row ||\n initial?.rowId != input.rowId ||\n initial?.sectionId != input.sectionId ||\n initial?.allInPrice != input.allInPrice ||\n initial?.faceValue != input.faceValue ||\n initial?.buyerUserId != input.buyerUserId;\n\n return hasChanged;\n};\n\nexport const onPriceFieldChange = (\n newValue: number,\n field: Path,\n fieldPrice: number | null,\n otherField: Path,\n otherFieldPrice: number | null,\n /* This multiplier is used to get the other value due to this field value's newValue */\n otherToFieldRatio: number,\n clearErrors: UseFormClearErrors,\n setValue: UseFormSetValue\n): void => {\n if (Number.isNaN(newValue)) {\n newValue = 0;\n } else if (newValue > Infinity) {\n newValue = Number.MAX_VALUE;\n }\n\n if (newValue >= 0 && newValue <= Number.MAX_VALUE) {\n clearErrors(field);\n clearErrors(otherField);\n\n if (newValue !== fieldPrice) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n setValue(field, newValue as any);\n }\n\n const newOtherValue = newValue * otherToFieldRatio;\n if (newOtherValue !== otherFieldPrice) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n setValue(otherField, newOtherValue as any);\n }\n }\n};\n\nexport const isSuspiciousPriceChange = (\n newListPrice: number | null | undefined,\n oldListPrice: number | null | undefined\n) => {\n let result = false;\n if (oldListPrice && newListPrice && oldListPrice !== newListPrice) {\n // if both of these are non-zeros, check their change\n if (isSuspiciousPriceChangeHelper(newListPrice, oldListPrice)) {\n result = true;\n }\n }\n\n return result;\n};\n\nconst isSuspiciousPriceChangeHelper = (\n newPrice: number | null | undefined,\n oldPrice: number | null | undefined\n) => {\n if (!newPrice || !oldPrice) {\n // If either are null or 0, return false, zero has it's own validations\n return false;\n }\n\n const diff = Math.abs(newPrice - oldPrice);\n const percentChange = (diff / oldPrice) * 100;\n\n return percentChange >= SuspiciousPriceChangeThreshold;\n};\n\nexport const getStubhubEventWithPricingUrl = (\n eventId?: number | null,\n isInternationalEvent?: boolean\n) => {\n const baseUrl = isInternationalEvent\n ? REACT_APP_VIAGOGO_BASE_URL\n : REACT_APP_STUBHUB_BASE_URL;\n\n if (eventId) {\n // If we could not get anything, just go to the event vanilla page\n return new URL(`/E-${eventId}?multi=true`, baseUrl);\n } else {\n return new URL(baseUrl ?? '.');\n }\n};\n\nexport const getListingGroupForListing = (\n viagogoEventId?: number | null,\n ltGrpId?: string | null,\n events?: EventWithData[] | null\n) => {\n if (!ltGrpId || !viagogoEventId) {\n return null;\n }\n\n const eventData = events?.find((ev) => ev.event.viagId === viagogoEventId);\n const listingGroup = eventData?.entities?.listings?.find(\n (l) => l.isLtGrp && l.ltGrpId === ltGrpId\n ) as ListingGroup;\n\n return listingGroup;\n};\n\nexport const getListingGroupItemCount = (lg: ListingGroup) => {\n let count = lg.groupItems.length ?? 0;\n\n lg.groupItems.forEach((l) => {\n if (l.isLtGrp) {\n count--; // take out the count that is this listing-group and add in the sub-counts instead\n count += getListingGroupItemCount(l as ListingGroup);\n }\n });\n\n return count;\n};\n\nexport const isListingGroupLeader = (listing?: Listing | null) => {\n return (listing as ListingGroup)?.groupType === GroupType.Leader;\n};\n\nexport const DefaultQuantityFilterOption = 'Default';\n\nexport const getMinQuantityOptions = () =>\n [\n DefaultQuantityFilterOption,\n '1',\n '2',\n '3',\n '4',\n '5',\n '6',\n '7',\n '8',\n '9',\n '10',\n ].reduce(\n (r, c) => {\n r[c] = c;\n return r;\n },\n {} as Record\n );\n\nexport const getCompQuantitiesOptions = () => {\n return ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10+'].reduce(\n (r, c) => {\n r[c] = c;\n return r;\n },\n {} as Record\n );\n};\n\nexport const safeParseJson = (jsonString: string | null | undefined) => {\n try {\n return JSON.parse(jsonString ?? 'null');\n } catch (error) {\n return null;\n }\n};\n","import { QueryObserverResult } from '@tanstack/react-query';\nimport { createContext, PropsWithChildren } from 'react';\nimport { IListExpansion } from 'src/hooks/useListExpansion';\nimport {\n ActionOutboxEntityType,\n CatalogClient,\n CatalogResults,\n EventWithData,\n Listing,\n PurchaseOrderTicketGroup,\n Sale,\n} from 'src/WebApiController';\n\nexport const EmptyCatalogResults: CatalogResults = {\n events: {},\n performers: {},\n venues: {},\n venueCfgs: {},\n viagIdToLatestIdLookup: {},\n posIdToViagIdLookup: {},\n purchaseCount: 0,\n};\n\nexport type EventWithDataMap = Record;\n\nexport type ItemIdWithRowVersion = {\n id: number;\n rowVer: number;\n};\n\nexport enum ExpandedCallbackStatus {\n Pending,\n InProgress,\n Done,\n}\n\nexport type CatalogDataContextProviderProps = PropsWithChildren<{\n queryKey: string;\n entityType:\n | ActionOutboxEntityType.Listing\n | ActionOutboxEntityType.Sale\n | ActionOutboxEntityType.TicketGroup\n | ActionOutboxEntityType.Purchase;\n getCatalogData: (\n client: CatalogClient,\n filterQuery: TQuery\n ) => Promise;\n getCatalogDataExpanded?: (\n ids: string[],\n filterQuery: TQuery\n ) => Promise;\n onCatalogDataExpanded?: (\n ids: string[],\n filterQuery: TQuery,\n data?: ExpandedEventData\n ) => Promise;\n transformEventData: (\n entityType:\n | ActionOutboxEntityType.Listing\n | ActionOutboxEntityType.Sale\n | ActionOutboxEntityType.TicketGroup\n | ActionOutboxEntityType.Purchase,\n data: EventWithData[],\n expandedEventData?: ExpandedEventData | null,\n isExpandedDataLoading?: boolean,\n filterZeroCounts?: boolean\n ) => EventWithData[];\n disabled?: boolean;\n disableAutoRefresh?: boolean;\n ignoreMaxCount?: boolean;\n}>;\n\nexport type ICatalogDataContext = {\n isLoading: boolean;\n isItemsLoading: boolean;\n data?: CatalogResults;\n errorInfo?: { errorHeader: React.ReactNode; errorMessage: React.ReactNode };\n eventsTransformed?: EventWithData[];\n allEventIds?: {\n viagVirtualId: string;\n performerId: number | null;\n venueId: number;\n }[];\n refreshCatalog: () => Promise;\n eventsExpansion: IListExpansion;\n updateItemInEvent: (\n item: Listing | Sale | PurchaseOrderTicketGroup,\n entityType: ActionOutboxEntityType\n ) => void;\n updateExpandedListItems: (updatedListingsByEvent: {\n [key: string]: Listing[];\n }) => void;\n refreshEventForItems: (\n itemIds: ItemIdWithRowVersion[],\n entityType: ActionOutboxEntityType\n ) => void;\n /**\n * Only used for Purchase Flattened View Currently\n * Can be transformed to something more general such as `totalEntityCount` if needed\n */\n totalPurchaseCount?: number;\n};\n\nexport type ExpandedEventData = {\n [key: string]: {\n sales: Sale[] | null;\n listings: Listing[] | null;\n ticketGroups: PurchaseOrderTicketGroup[] | null;\n failedToRetrieveData: boolean;\n };\n};\nconst emptyContext: ICatalogDataContext = {\n isLoading: false,\n isItemsLoading: false,\n data: undefined,\n eventsTransformed: undefined,\n allEventIds: undefined,\n refreshCatalog: () =>\n Promise.resolve({} as QueryObserverResult),\n updateItemInEvent: () => {},\n eventsExpansion: {\n expandedListItems: [],\n setExpandedListItems: () => {},\n toggleListItemExpansion: () => false,\n refreshExpandedListItems: () => Promise.resolve(),\n setListItemExpansion: () => {},\n },\n updateExpandedListItems: () => {},\n refreshEventForItems: () => {},\n totalPurchaseCount: undefined,\n};\n\nexport const CatalogDataContextV1 =\n createContext(emptyContext);\n\nexport const CatalogDataContextV2 =\n createContext(emptyContext);\n","import {\n useQueries,\n useQueryClient,\n UseQueryResult,\n} from '@tanstack/react-query';\nimport { cloneDeep, merge } from 'lodash-es';\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\nimport isEqual from 'react-fast-compare';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { useListExpansion } from 'src/hooks/useListExpansion';\nimport {\n DATA_REFRESH_RATE_IN_MILLIS_LONG,\n DATA_REFRESH_RATE_IN_MILLIS_SHORT,\n MAX_NUM_OF_ITEMS_FOR_FLATTENED_VIEWS,\n} from 'src/utils/constants/constants';\nimport { getErrorInfoFromStatusCode } from 'src/utils/errorUtils';\nimport {\n EmptyEntityWithTicketsQuery,\n QueryWithViewMode,\n} from 'src/utils/eventQueryUtils';\nimport { searchEvents, sortEvents } from 'src/utils/eventWithDataUtils';\nimport { getFlattenedListingIds } from 'src/utils/inventoryUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n CatalogClient,\n CatalogCounts,\n CatalogResults,\n EntityWithTicketsQuery,\n EventEntityCounts,\n EventWithData,\n InventoryViewMode,\n Listing,\n ListingGroup,\n ListingQuery,\n PurchaseOrderQuery,\n PurchaseOrderTicketGroup,\n Sale,\n SaleQuery,\n} from 'src/WebApiController';\n\nimport { useAppContext } from '../AppContext';\nimport { useFilterQueryContext } from '../FilterQueryContext';\nimport { NO_GROUP_ID } from '../MultiSelectionContext';\nimport {\n CatalogDataContextProviderProps,\n CatalogDataContextV2,\n ExpandedCallbackStatus,\n ExpandedEventData,\n ItemIdWithRowVersion,\n} from './CatalogDataContext.types';\nimport {\n getEventsWithNonZeroCounts,\n hasEventsWithFullLoadedData,\n} from './CatalogDataContext.utils';\n\nexport function CatalogDataContextV2Provider<\n TQuery extends EntityWithTicketsQuery & QueryWithViewMode,\n>({\n queryKey,\n entityType,\n getCatalogDataExpanded,\n onCatalogDataExpanded,\n transformEventData,\n children,\n disabled,\n disableAutoRefresh,\n ignoreMaxCount,\n}: CatalogDataContextProviderProps) {\n const queryClient = useQueryClient();\n\n const { trackError, showErrorDialog } = useErrorBoundaryContext();\n\n const { filterQuery, isQueryInitialized } = useFilterQueryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const eventsExpansion = useListExpansion();\n const { expandedListItems } = eventsExpansion;\n\n const [errorInfo, setErrorInfo] = useState<{\n errorHeader: React.ReactNode;\n errorMessage: React.ReactNode;\n }>();\n\n // Flags to track the status of the expanded callback\n const [expandedCallbackStatus, setExpandedCallbackStatus] = useState<\n Record\n >({});\n const onExpandedCallbackStatusUpdate = useCallback(\n (stringQueryKey: string, status: ExpandedCallbackStatus) =>\n setExpandedCallbackStatus((prev) => ({\n ...prev,\n [stringQueryKey]: status,\n })),\n []\n );\n\n const {\n searchText,\n sortBy,\n isSortDescending,\n performerIds,\n venueIds,\n viewMode, // this is not used for server and keeping it in this cause refresh to happen 2x\n ...serverSideFilterQuery // Don't use it because it's a new object on every render\n } = filterQuery;\n\n const countFilterQuery = useMemo(() => {\n const query = Object.fromEntries(\n Object.entries(serverSideFilterQuery).filter(([_, v]) => v != null)\n );\n return {\n ...query,\n timezoneOffsetMins:\n query.timezoneOffsetMins ??\n EmptyEntityWithTicketsQuery.timezoneOffsetMins,\n } as TQuery;\n }, [serverSideFilterQuery]);\n\n const [catalogResults, setCatalogResults] = useState();\n const eventsFullyLoaded = useMemo(() => {\n if (catalogResults?.events == null) {\n return false; // we haven't loaded the events yet\n }\n\n const allEvents = Object.values(catalogResults.events);\n\n // at least 1 has both events and counts\n return hasEventsWithFullLoadedData(entityType, allEvents);\n }, [catalogResults?.events, entityType]);\n\n /* Arguments for the catalog queries */\n\n const eventIdsNeedingData = useMemo(() => {\n const eventCountsMissingDataIds = Object.values(\n catalogResults?.events ?? {}\n )\n .filter((ev) => ev.event == null && ev.counts.viagVirtId != null)\n .map((ev) => ev.counts.viagVirtId);\n\n const customEventIds =\n countFilterQuery.eventOrMappingIds?.filter(\n (id) => !catalogResults?.events[id]\n ) ?? [];\n\n return Array.from(\n new Set([...eventCountsMissingDataIds, ...customEventIds])\n ).toSorted();\n }, [catalogResults, countFilterQuery.eventOrMappingIds]);\n\n /* QueryKey for the catalog queries */\n\n const catalogCountQueryKey = useMemo(\n () => [queryKey + 'Count', entityType, countFilterQuery],\n [entityType, queryKey, countFilterQuery]\n );\n\n const catalogDataQueryKey = useMemo(\n () => [queryKey + 'Data', eventIdsNeedingData],\n [eventIdsNeedingData, queryKey]\n );\n\n /* Conditions for the catalog queries */\n\n const shouldQueryCounts = useMemo(\n () => activeAccountWebClientConfig.activeAccountId != null && !disabled,\n [activeAccountWebClientConfig.activeAccountId, disabled]\n );\n\n const shouldQueryEventData = useMemo(\n () =>\n Boolean(eventIdsNeedingData.length) &&\n activeAccountWebClientConfig.activeAccountId != null &&\n isQueryInitialized &&\n !disabled,\n [\n activeAccountWebClientConfig.activeAccountId,\n disabled,\n eventIdsNeedingData.length,\n isQueryInitialized,\n ]\n );\n\n const mergeCatalogCounts = useCallback(\n (newResults: CatalogResults, counts?: CatalogCounts | null) => {\n if (!counts) {\n return undefined;\n }\n\n newResults.purchaseCount = counts.purchaseCount;\n\n // Reset all the counts first\n Object.values(newResults.events).forEach((ev) => {\n ev.counts = {\n listCnt: 0,\n listGrpCnt: 0,\n ungrListCnt: 0,\n salesCnt: 0,\n pricedListCnt: 0,\n tktGrpsCnt: 0,\n poCnt: 0,\n } as EventEntityCounts;\n });\n\n Object.entries(counts.entityCnts).forEach(([id, cnts]) => {\n const ev = newResults.events[id] ?? ({} as EventWithData);\n ev.counts = cnts;\n\n newResults.events[id] = ev;\n });\n\n return newResults;\n },\n []\n );\n\n const combine = useCallback(\n (results: UseQueryResult[]) => {\n const eventQuery = results[0] as UseQueryResult;\n const countsQuery = results[1] as UseQueryResult;\n\n if (\n (shouldQueryEventData && eventQuery.isLoading) ||\n (shouldQueryCounts && countsQuery.isLoading)\n ) {\n return;\n }\n\n const failureReason =\n (shouldQueryEventData && eventQuery.failureReason) ||\n (shouldQueryCounts && countsQuery.failureReason);\n\n if (failureReason) {\n const { headerDisplay, messageDisplay } = getErrorInfoFromStatusCode(\n null,\n failureReason?.toString()\n );\n setErrorInfo({\n errorHeader: headerDisplay,\n errorMessage: messageDisplay,\n });\n } else if (errorInfo) {\n setErrorInfo(undefined);\n }\n\n if (!eventQuery.data && !countsQuery.data) {\n return;\n }\n\n const newCatalogResults =\n cloneDeep(catalogResults) ??\n ({\n events: {},\n performers: {},\n venues: {},\n venueCfgs: {},\n viagIdToLatestIdLookup: {},\n posIdToViagIdLookup: {},\n purchaseCount: 0,\n } as CatalogResults);\n if (eventQuery.data) {\n merge(newCatalogResults, eventQuery.data);\n }\n\n if (countsQuery.data) {\n mergeCatalogCounts(newCatalogResults, countsQuery.data);\n\n if (newCatalogResults && !isEqual(catalogResults, newCatalogResults)) {\n setCatalogResults(newCatalogResults);\n console.debug('setCatalogResults updated with counts data');\n }\n }\n },\n [\n catalogResults,\n errorInfo,\n mergeCatalogCounts,\n shouldQueryCounts,\n shouldQueryEventData,\n ]\n );\n\n /* The catalog queries */\n\n const refetchIntervalLong = !disableAutoRefresh\n ? DATA_REFRESH_RATE_IN_MILLIS_LONG\n : false;\n\n const catalogQueries = useMemo(\n () => ({\n queries: [\n {\n queryKey: catalogDataQueryKey,\n queryFn: async (): Promise => {\n setErrorInfo(undefined);\n\n if (!shouldQueryEventData) {\n return null;\n }\n\n return tryInvokeApi(\n async () => {\n const data = await new CatalogClient(\n activeAccountWebClientConfig\n ).getCatalog(eventIdsNeedingData);\n\n return data;\n },\n (error) => {\n const { headerDisplay, messageDisplay } =\n getErrorInfoFromStatusCode(error?.status, error?.message);\n setErrorInfo({\n errorHeader: headerDisplay,\n errorMessage: messageDisplay,\n });\n trackError('CatalogClient.getCatalog', error);\n }\n );\n },\n enabled: shouldQueryEventData,\n staleTime: Infinity, // Since we're always refetching on an interval, we don't want query to calculate whether the data is stale\n refetchOnWindowFocus: false,\n refetchInterval: refetchIntervalLong as number | false,\n meta: {\n persist: false, // we do not want to persist the catalog data, we just need the count persisted, the catalog are obtained in C# cache (no SQL)\n },\n },\n {\n queryKey: catalogCountQueryKey,\n queryFn: async (): Promise => {\n setErrorInfo(undefined);\n\n if (!shouldQueryCounts) {\n return null;\n }\n\n return tryInvokeApi(\n async () => {\n const client = new CatalogClient(activeAccountWebClientConfig);\n\n if (entityType === ActionOutboxEntityType.Listing) {\n const counts = await client.getCatalogCountForListings(\n countFilterQuery as unknown as ListingQuery\n );\n\n return counts;\n } else if (entityType === ActionOutboxEntityType.Sale) {\n const counts = await client.getCatalogCountForSales(\n countFilterQuery as unknown as SaleQuery\n );\n\n return counts;\n }\n if (\n entityType === ActionOutboxEntityType.TicketGroup ||\n entityType === ActionOutboxEntityType.Purchase\n ) {\n const counts = await client.getCatalogCountForPurchaseOrders(\n countFilterQuery as unknown as PurchaseOrderQuery\n );\n\n return counts;\n }\n\n return null;\n },\n (error) => {\n const { headerDisplay, messageDisplay } =\n getErrorInfoFromStatusCode(error?.status, error?.message);\n setErrorInfo({\n errorHeader: headerDisplay,\n errorMessage: messageDisplay,\n });\n trackError(\n queryKey + 'Count: ' + entityType,\n error,\n countFilterQuery\n );\n }\n );\n },\n enabled: shouldQueryCounts,\n staleTime: Infinity, // Since we're always refetching on an interval, we don't want query to calculate whether the data is stale\n refetchOnWindowFocus: false,\n refetchOnMount: true,\n refetchInterval: refetchIntervalLong as number | false,\n },\n ],\n }),\n [\n activeAccountWebClientConfig,\n catalogCountQueryKey,\n catalogDataQueryKey,\n entityType,\n eventIdsNeedingData,\n queryKey,\n refetchIntervalLong,\n countFilterQuery,\n shouldQueryCounts,\n shouldQueryEventData,\n trackError,\n ]\n );\n\n // Use the extracted variable in the useQueries hook\n const catalogResultsFromHook = useQueries(catalogQueries);\n\n useEffect(() => {\n combine(catalogResultsFromHook);\n }, [catalogResultsFromHook, combine]);\n\n const eventIdsToGetItemsFor = useMemo(() => {\n if (!catalogResults) {\n return [] as [string][];\n }\n let listingCount = 0;\n let salesCount = 0;\n\n const eventsToGetItemsFor = getEventsWithNonZeroCounts(\n entityType,\n searchEvents(catalogResults, searchText, performerIds, venueIds),\n true\n )\n .map((ev) => {\n if (ev) {\n const evCount = ev?.counts;\n listingCount += evCount?.listCnt ?? 0;\n salesCount += evCount?.salesCnt ?? 0;\n return ev;\n }\n })\n .filter((ev) => ev)\n .map((ev) => ev!);\n\n let isTooManyItems = false;\n if (!ignoreMaxCount && viewMode === InventoryViewMode.FlattenedView) {\n // Only one of these are non-zero\n if (listingCount) {\n isTooManyItems = listingCount > MAX_NUM_OF_ITEMS_FOR_FLATTENED_VIEWS;\n } else if (salesCount) {\n isTooManyItems = salesCount > MAX_NUM_OF_ITEMS_FOR_FLATTENED_VIEWS;\n }\n }\n const results =\n viewMode === InventoryViewMode.FlattenedView\n ? isTooManyItems &&\n // If the catalog shows a count of way too many items and we're actually not filtering to the individual items, don't query at all\n !countFilterQuery.entityIds?.length &&\n !countFilterQuery.marketplaceEntityIds?.length\n ? []\n : // For flatten view - we know we're gonna get all of them at once, so just bundle all the event ids in 1 array\n [eventsToGetItemsFor?.map((ev) => ev.event.viagVirtualId)]\n : // For tile view, we only want 1 event per query\n expandedListItems.map((id) => [id]);\n\n // Finally, we need to include the PosEventIds with all the ids, because in some cases\n // the ViagogoVirtualIds do not resolve properly due to the outdated cache, and missing items are returned\n // for merged events\n return results.map((idArray) => {\n const allEvents = eventsToGetItemsFor\n .filter((ev) => idArray.includes(ev.event.viagVirtualId))\n .flatMap((ev) => ev.event.posIds.map((posId) => `old:${posId}`));\n return idArray.concat(allEvents);\n });\n }, [\n catalogResults,\n entityType,\n searchText,\n performerIds,\n venueIds,\n ignoreMaxCount,\n viewMode,\n countFilterQuery.entityIds?.length,\n countFilterQuery.marketplaceEntityIds?.length,\n expandedListItems,\n ]);\n\n const realExpandedDataItemsQueryKey = useMemo(\n () => [queryKey + 'Expanded', countFilterQuery],\n [queryKey, countFilterQuery]\n );\n\n const shouldQueryExpandedItems = useMemo(\n () =>\n activeAccountWebClientConfig.activeAccountId != null &&\n countFilterQuery != null &&\n !disabled,\n [activeAccountWebClientConfig.activeAccountId, disabled, countFilterQuery]\n );\n\n const refreshInterval = !disableAutoRefresh\n ? DATA_REFRESH_RATE_IN_MILLIS_SHORT\n : false;\n\n const onCatalogDataExpandedCallbackCheck = useCallback(\n async (\n queryResults: UseQueryResult<\n ExpandedEventData | null | undefined,\n Error\n >[]\n ) => {\n if (!onCatalogDataExpanded) {\n return;\n }\n const queryIds = eventIdsToGetItemsFor ?? [];\n for (let index = 0; index < queryIds.length; index++) {\n const ids = queryIds[index];\n const queryKey = [...realExpandedDataItemsQueryKey, ...ids.toSorted()];\n const stringQueryKey = queryKey.toString();\n const queryResult = queryResults[index];\n if (\n expandedCallbackStatus[stringQueryKey] ===\n ExpandedCallbackStatus.Pending\n ) {\n onExpandedCallbackStatusUpdate(\n stringQueryKey,\n ExpandedCallbackStatus.InProgress\n );\n const newData = await onCatalogDataExpanded(\n ids,\n countFilterQuery as TQuery,\n queryResult?.data ?? undefined\n );\n queryClient.setQueryData(queryKey, newData);\n onExpandedCallbackStatusUpdate(\n stringQueryKey,\n ExpandedCallbackStatus.Done\n );\n }\n }\n },\n [\n eventIdsToGetItemsFor,\n expandedCallbackStatus,\n onCatalogDataExpanded,\n onExpandedCallbackStatusUpdate,\n queryClient,\n realExpandedDataItemsQueryKey,\n countFilterQuery,\n ]\n );\n\n const expandedItemsQueryOptions = useMemo(\n () => ({\n queries: (eventIdsToGetItemsFor ?? []).map((ids) => {\n const queryKey = [...realExpandedDataItemsQueryKey, ...ids.toSorted()];\n return {\n queryKey: queryKey,\n queryFn: async () => {\n if (!shouldQueryExpandedItems) {\n return null;\n }\n\n return tryInvokeApi(\n async () => {\n const data = await getCatalogDataExpanded?.(\n ids[0] === NO_GROUP_ID ? [] : ids,\n countFilterQuery as TQuery\n );\n if (onCatalogDataExpanded) {\n onExpandedCallbackStatusUpdate(\n queryKey.toString(),\n ExpandedCallbackStatus.Pending\n );\n }\n return data;\n },\n (error: ErrorTypes) => {\n showErrorDialog('CatalogClient.getCatalogDataExpanded', error, {\n trackErrorData: {\n eventIds: ids,\n filterQuery,\n },\n });\n }\n );\n },\n enabled: shouldQueryExpandedItems,\n staleTime: Infinity, // Since we're always refetching on an interval, we don't want query to calculate whether the data is stale\n refetchOnWindowFocus: false,\n refetchInterval: refreshInterval as number | false,\n };\n }),\n combine: (\n results: UseQueryResult[]\n ) => {\n onCatalogDataExpandedCallbackCheck(results);\n\n return results;\n },\n }),\n [\n eventIdsToGetItemsFor,\n filterQuery,\n getCatalogDataExpanded,\n onCatalogDataExpanded,\n onCatalogDataExpandedCallbackCheck,\n onExpandedCallbackStatusUpdate,\n realExpandedDataItemsQueryKey,\n refreshInterval,\n countFilterQuery,\n shouldQueryExpandedItems,\n showErrorDialog,\n ]\n );\n\n const queryWithExpandedItems = useQueries(expandedItemsQueryOptions);\n\n const [eventsTransformed, setEventsTransformed] = useState();\n\n // This to apply client-side filtering before transformation of the data\n useEffect(() => {\n if (!eventsFullyLoaded) {\n console.debug('eventsTransformed skipped due no complete event data');\n return;\n }\n\n const newExpandedData = merge(\n {},\n ...queryWithExpandedItems.map((r) => r.data ?? {})\n ) as ExpandedEventData;\n\n const newExpandedEvents = transformEventData(\n entityType,\n searchEvents(catalogResults!, searchText, performerIds, venueIds),\n newExpandedData,\n queryWithExpandedItems.some((q) => q.isLoading),\n true\n );\n\n const transformed = sortEvents(\n catalogResults!,\n newExpandedEvents,\n sortBy,\n isSortDescending\n );\n\n if (transformed && !isEqual(transformed, eventsTransformed)) {\n setEventsTransformed(transformed);\n console.debug(\n 'eventsTransformed updated with transformed: ' + transformed.length\n );\n }\n }, [\n catalogResults,\n entityType,\n eventsFullyLoaded,\n eventsTransformed,\n isSortDescending,\n performerIds,\n queryWithExpandedItems,\n searchText,\n sortBy,\n transformEventData,\n venueIds,\n ]);\n\n const refreshCatalog = useCallback(async () => {\n await queryClient.invalidateQueries({\n queryKey: [queryKey + 'Count'],\n refetchType: 'active',\n });\n return await queryClient.invalidateQueries({\n queryKey: [queryKey + 'Data'],\n refetchType: 'active',\n });\n }, [queryClient, queryKey]);\n\n const refreshExpandedListItems = useCallback(() => {\n queryClient.invalidateQueries({\n queryKey: [queryKey + 'Expanded'],\n refetchType: 'none', // we don't want to refetch any, we'll manually refetch the active\n });\n\n return queryClient.invalidateQueries({\n queryKey: realExpandedDataItemsQueryKey,\n });\n }, [queryClient, queryKey, realExpandedDataItemsQueryKey]);\n\n /**\n * Refreshes the event data for a specific item\n */\n const refreshEventForItems = useCallback(\n (itemIds: ItemIdWithRowVersion[], entityType: ActionOutboxEntityType) => {\n const eventIds = eventsTransformed\n ?.filter((ev) => {\n if (entityType === ActionOutboxEntityType.Listing) {\n return ev.entities.listings?.some((l) =>\n itemIds.some((i) => i.id === l.id && i.rowVer > l.rowVer)\n );\n } else if (entityType === ActionOutboxEntityType.Sale) {\n return ev.entities.sales?.some((s) =>\n itemIds.some((i) => i.id === s.id && i.rowVer > s.rowVer)\n );\n } else if (entityType === ActionOutboxEntityType.Purchase) {\n return ev.entities.ticketGroups?.some((t) =>\n itemIds.some((i) => i.id === t.id && i.rowVer > t.rowVer)\n );\n }\n return false;\n })\n ?.map((ev) => ev.counts?.viagVirtId ?? ev.event?.viagVirtualId);\n\n if (eventIds?.length) {\n if (viewMode === InventoryViewMode.FlattenedView) {\n queryClient.invalidateQueries({\n queryKey: realExpandedDataItemsQueryKey,\n });\n } else {\n for (const eventId of eventIds) {\n queryClient.invalidateQueries({\n queryKey: [...realExpandedDataItemsQueryKey, eventId],\n });\n }\n }\n }\n },\n [eventsTransformed, queryClient, realExpandedDataItemsQueryKey, viewMode]\n );\n\n const updateExpandedListItems = useCallback(\n (updatedListingsByEvent: { [key: string]: Listing[] }) => {\n const newDatas = queryClient.setQueriesData(\n {\n queryKey: [queryKey + 'Expanded'],\n },\n (oldData: ExpandedEventData | undefined) => {\n if (!oldData) {\n return oldData;\n }\n const newData = { ...oldData };\n Object.entries(updatedListingsByEvent).forEach(([key, value]) => {\n const oldListingsByIds =\n newData[key]?.listings?.reduce(\n (r, l) => {\n r[l.id] = l;\n return r;\n },\n {} as Record\n ) ?? {};\n\n // Filter all the new ones that have row version < the old one\n const newListings = [\n ...value.filter((l) => {\n const oldListing = oldListingsByIds[l.id];\n if (oldListing && oldListing.rowVer > l.rowVer) {\n return false;\n }\n\n return true;\n }),\n ];\n const newListingIdsFlattened = getFlattenedListingIds(newListings);\n\n // Retain listings that are not updated\n newData[key]?.listings?.forEach((originalListing) => {\n let shouldKeep = true;\n if (!originalListing.isLtGrp) {\n if (newListingIdsFlattened.includes(originalListing.id))\n shouldKeep = false;\n } else {\n // If `originalListing` is a listing group\n // there will only be two cases\n // 1. No one listing in `newListingIdsFlattened` show up in the group (keep the group), or\n // 2. All listings in `newListingIdsFlattened` show up in the group (don't keep it, group has been edited or removed)\n const originalListingIdsFlattened = getFlattenedListingIds([\n originalListing,\n ]);\n if (\n originalListingIdsFlattened.some((l) =>\n newListingIdsFlattened.includes(l)\n )\n ) {\n shouldKeep = false;\n }\n }\n\n if (shouldKeep) {\n newListings.push(originalListing);\n }\n });\n\n newData[key] = {\n sales: null,\n listings: newListings,\n ticketGroups: null,\n failedToRetrieveData: false,\n };\n });\n return newData;\n }\n );\n\n // We should only check at first 2 query keys [PrimaryKey, QueryObject]\n const newData = newDatas.find((qk) =>\n isEqual((qk[0] ?? []).slice(0, 2), realExpandedDataItemsQueryKey)\n );\n if (catalogResults && newData) {\n const transformed = sortEvents(\n catalogResults,\n transformEventData(\n entityType,\n searchEvents(catalogResults, searchText, performerIds, venueIds),\n newData[1] as ExpandedEventData,\n false,\n true\n ),\n sortBy,\n isSortDescending\n );\n\n setEventsTransformed(transformed);\n console.debug(\n 'eventsTransformed updated with updateExpandedListItems transformed: ' +\n transformed.length\n );\n }\n },\n [\n entityType,\n isSortDescending,\n performerIds,\n catalogResults,\n queryClient,\n queryKey,\n realExpandedDataItemsQueryKey,\n searchText,\n sortBy,\n transformEventData,\n venueIds,\n ]\n );\n\n const updateExpandedSaleItems = useCallback(\n (updatedListingsByEvent: { [key: string]: Sale[] }) => {\n const newDatas = queryClient.setQueriesData(\n {\n queryKey: [queryKey + 'Expanded'],\n },\n (oldData: ExpandedEventData | undefined) => {\n if (!oldData) {\n return oldData;\n }\n const newData = { ...oldData };\n Object.entries(updatedListingsByEvent).forEach(([key, value]) => {\n const oldSalesByIds =\n newData[key]?.sales?.reduce(\n (r, s) => {\n r[s.id] = s;\n return r;\n },\n {} as Record\n ) ?? {};\n\n // Filter all the new ones that have row version < the old one\n const newSales = [\n ...value.filter((s) => {\n const oldSale = oldSalesByIds[s.id];\n if (oldSale && oldSale.rowVer > s.rowVer) {\n return false;\n }\n\n return true;\n }),\n ];\n const newSaleIds = newSales.map((s) => s.id);\n\n // Retain sales that are not in the newSales\n newData[key]?.sales?.forEach((originalSale) => {\n if (!newSaleIds.includes(originalSale.id)) {\n // new sales doesn't have the original sale, keep it\n newSales.push(originalSale);\n }\n });\n\n newData[key] = {\n sales: newSales,\n listings: null,\n ticketGroups: null,\n failedToRetrieveData: false,\n };\n });\n return newData;\n }\n );\n\n const newData = newDatas.find((qk) =>\n isEqual((qk[0] ?? []).slice(0, 2), realExpandedDataItemsQueryKey)\n );\n if (catalogResults && newData) {\n const transformed = sortEvents(\n catalogResults,\n transformEventData(\n entityType,\n searchEvents(catalogResults, searchText, performerIds, venueIds),\n newData[1] as ExpandedEventData,\n false,\n true\n ),\n sortBy,\n isSortDescending\n );\n\n setEventsTransformed(transformed);\n console.debug(\n 'eventsTransformed updated with updateExpandedSaleItems transformed: ' +\n transformed.length\n );\n }\n },\n [\n entityType,\n isSortDescending,\n performerIds,\n catalogResults,\n queryClient,\n queryKey,\n realExpandedDataItemsQueryKey,\n searchText,\n sortBy,\n transformEventData,\n venueIds,\n ]\n );\n\n const updateExpandedTicketGroupItems = useCallback(\n (updatedTgsByEvent: { [key: string]: PurchaseOrderTicketGroup[] }) => {\n const newDatas = queryClient.setQueriesData(\n {\n queryKey: [queryKey + 'Expanded'],\n },\n (oldData: ExpandedEventData | undefined) => {\n if (!oldData) {\n return oldData;\n }\n const newData = { ...oldData };\n Object.entries(updatedTgsByEvent).forEach(([key, value]) => {\n const oldTgsByIds =\n newData[key]?.ticketGroups?.reduce(\n (r, t) => {\n r[t.tgId!] = t;\n return r;\n },\n {} as Record\n ) ?? {};\n\n // Filter all the new ones that have row version < the old one\n const newTgs = [\n ...value.filter((t) => {\n const oldTg = oldTgsByIds[t.tgId!];\n if (oldTg && oldTg.rowVer > t.rowVer) {\n return false;\n }\n\n return true;\n }),\n ];\n const newTgIds = newTgs.map((s) => s.tgId!);\n\n // Retain tgs that are not in the newTgs\n newData[key]?.ticketGroups?.forEach((originalTg) => {\n if (!newTgIds.includes(originalTg.tgId!)) {\n // new sales doesn't have the original sale, keep it\n newTgs.push(originalTg);\n }\n });\n\n newData[key] = {\n sales: null,\n listings: null,\n ticketGroups: newTgs,\n failedToRetrieveData: false,\n };\n });\n return newData;\n }\n );\n\n const newData = newDatas.find((qk) =>\n isEqual(qk[0], realExpandedDataItemsQueryKey)\n );\n if (catalogResults && newData) {\n const transformed = sortEvents(\n catalogResults,\n transformEventData(\n entityType,\n searchEvents(catalogResults, searchText, performerIds, venueIds),\n newData[1] as ExpandedEventData,\n false,\n true\n ),\n sortBy,\n isSortDescending\n );\n\n setEventsTransformed(transformed);\n console.debug(\n 'eventsTransformed updated with updateExpandedTicketGroupItems transformed: ' +\n transformed.length\n );\n }\n },\n [\n entityType,\n isSortDescending,\n performerIds,\n catalogResults,\n queryClient,\n queryKey,\n realExpandedDataItemsQueryKey,\n searchText,\n sortBy,\n transformEventData,\n venueIds,\n ]\n );\n\n const updateItemInEvent = useCallback(\n async (\n item: Listing | Sale | PurchaseOrderTicketGroup,\n entityType: ActionOutboxEntityType\n ) => {\n // Now that we got the listing details, try to get the Event from existing data\n const catalogIdKey = item.viagVirtualId!;\n const eventQuery = queryWithExpandedItems.find(\n (r) => r.data?.[catalogIdKey]\n );\n\n // If we can't find it, go fetch it\n if (eventQuery?.data != null) {\n const event = eventQuery.data[catalogIdKey];\n\n // NOTE - after each refresh - the row version will be zero\n // and direct cache-update will trigger the row-version change until the next refresh\n // this is to make sure async updates to multiple listings/sales of an event do not overwrite each other\n if (entityType === ActionOutboxEntityType.Listing && event.listings) {\n // Because we're manually updating, set all rowVer here to be min 1, and the item to be updated to be min 2\n event.listings.forEach((l) => (l.rowVer = l.rowVer || 1));\n\n // If the event in the catalog has the listings expanded, we'll want to update it\n // with the latest info from the listing details above (this will help update state changes or seat allocations, etc.)\n const index = event.listings.findIndex(\n (s) =>\n s.id === item.id ||\n (s as ListingGroup).groupItems?.some(\n (l) =>\n l.id === item.id ||\n // this is the second level group\n (l as ListingGroup).groupItems?.some(\n (l2) => l2.id === item.id\n )\n )\n );\n\n const oldItem = event.listings[index];\n const lg = oldItem as ListingGroup;\n\n if (oldItem.id === item.id) {\n item.rowVer = oldItem.rowVer + 1; // Increase rowVer to indicate that we updated this recently\n event.listings[index] = { ...oldItem, ...item } as Listing;\n } else if (lg.groupItems != null) {\n // The item is a listing under a group\n const groupListingIndex = lg.groupItems.findIndex(\n (s) => s.id === item.id\n );\n\n if (groupListingIndex < 0) {\n for (const subGroup of lg.groupItems) {\n if (subGroup.isLtGrp) {\n const listingIndex = (\n subGroup as ListingGroup\n ).groupItems.findIndex((s) => s.id === item.id);\n\n if (listingIndex >= 0) {\n const oldItemInGroup = (subGroup as ListingGroup)\n .groupItems[listingIndex];\n item.rowVer = oldItemInGroup.rowVer + 1; // Increase rowVer to indicate that we updated this recently\n\n (subGroup as ListingGroup).groupItems[listingIndex] = {\n ...oldItem,\n ...item,\n } as Listing;\n }\n }\n }\n } else {\n const oldItemInGroup = lg.groupItems[groupListingIndex];\n item.rowVer = oldItemInGroup.rowVer + 1; // Increase rowVer to indicate that we updated this recently\n\n lg.groupItems[groupListingIndex] = {\n ...oldItem,\n ...item,\n } as Listing;\n }\n }\n\n event.listings = [...event.listings]; // this so the table will forced to be re-rendered\n updateExpandedListItems({ [catalogIdKey]: event.listings });\n } else if (entityType === ActionOutboxEntityType.Sale && event.sales) {\n // Because we're manually updating, set all rowVer here to be min 1, and the item to be updated to be min 2\n event.sales.forEach((s) => (s.rowVer = s.rowVer || 1));\n\n // If the event in the catalog has the sales expanded, we'll want to update it\n // with the latest info from the sale details above (this will help update state changes or seat allocations, etc.)\n const index = event.sales.findIndex((s) => s.id === item.id);\n const oldItem = event.sales[index];\n item.rowVer = oldItem.rowVer + 1; // Increase rowVer to indicate that we updated this recently\n\n event.sales[index] = { ...oldItem, ...item } as Sale;\n event.sales = [...event.sales]; // this so the table will forced to be re-rendered\n\n updateExpandedSaleItems({ [catalogIdKey]: event.sales });\n } else if (\n entityType === ActionOutboxEntityType.Purchase &&\n event.ticketGroups\n ) {\n // Because we're manually updating, set all rowVer here to be min 1, and the item to be updated to be min 2\n event.ticketGroups.forEach((s) => (s.rowVer = s.rowVer || 1));\n\n // If the event in the catalog has the sales expanded, we'll want to update it\n // with the latest info from the sale details above (this will help update state changes or seat allocations, etc.)\n const index = event.ticketGroups.findIndex(\n (t) => t.tgId === (item as PurchaseOrderTicketGroup).tgId\n );\n const oldItem = event.ticketGroups[index];\n item.rowVer = oldItem.rowVer + 1; // Increase rowVer to indicate that we updated this recently\n\n event.ticketGroups[index] = {\n ...oldItem,\n ...item,\n } as PurchaseOrderTicketGroup;\n event.ticketGroups = [...event.ticketGroups]; // this so the table will forced to be re-rendered\n\n updateExpandedTicketGroupItems({\n [catalogIdKey]: event.ticketGroups,\n });\n }\n }\n },\n [\n queryWithExpandedItems,\n updateExpandedListItems,\n updateExpandedSaleItems,\n updateExpandedTicketGroupItems,\n ]\n );\n\n const allEventIds = useMemo(\n () =>\n eventsTransformed?.map((ev) => ({\n viagVirtualId: ev.counts?.viagVirtId ?? ev.event?.viagVirtualId,\n performerId: ev.counts?.perfId ?? ev.event?.perfId,\n venueId: ev.counts?.venId ?? ev.event?.venueId,\n })) ?? [],\n [eventsTransformed]\n );\n\n return (\n r.isLoading) || // queries are loading\n !eventsFullyLoaded || // event data is not fully loaded\n eventsTransformed == null, // queries are fetching and prev there is no data\n isItemsLoading:\n queryWithExpandedItems.some((r) => r.isLoading) ||\n !eventsTransformed?.length, // whether the query to get items are loading\n data: catalogResults ?? undefined,\n errorInfo,\n eventsTransformed,\n allEventIds,\n refreshCatalog,\n updateItemInEvent,\n eventsExpansion: {\n ...eventsExpansion,\n refreshExpandedListItems,\n },\n updateExpandedListItems,\n refreshEventForItems,\n totalPurchaseCount: catalogResults?.purchaseCount,\n }}\n >\n {children}\n \n );\n}\n","import {\n useQueries,\n useQuery,\n useQueryClient,\n UseQueryResult,\n} from '@tanstack/react-query';\nimport { differenceInDays } from 'date-fns';\nimport { isEqual, merge } from 'lodash-es';\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { useListExpansion } from 'src/hooks/useListExpansion';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport {\n DATA_REFRESH_RATE_IN_MILLIS_LONG,\n DATA_REFRESH_RATE_IN_MILLIS_SHORT,\n MAX_DATE,\n MAX_NUM_OF_ITEMS_FOR_FLATTENED_VIEWS,\n MIN_DATE,\n} from 'src/utils/constants/constants';\nimport { getErrorInfoFromStatusCode } from 'src/utils/errorUtils';\nimport { QueryWithViewMode } from 'src/utils/eventQueryUtils';\nimport { searchEvents, sortEvents } from 'src/utils/eventWithDataUtils';\nimport { getFlattenedListingIds } from 'src/utils/inventoryUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n CatalogClient,\n EntityWithTicketsQuery,\n EventTimeFrameFilter,\n EventWithData,\n Feature,\n InventoryViewMode,\n Listing,\n ListingGroup,\n PurchaseOrderTicketGroup,\n Sale,\n} from 'src/WebApiController';\n\nimport { useAppContext } from '../AppContext';\nimport { useFilterQueryContext } from '../FilterQueryContext';\nimport { NO_GROUP_ID } from '../MultiSelectionContext';\nimport {\n CatalogDataContextProviderProps,\n CatalogDataContextV1,\n ExpandedCallbackStatus,\n ExpandedEventData,\n ItemIdWithRowVersion,\n} from './CatalogDataContext.types';\nimport { updateCatalogResults } from './CatalogDataContext.utils';\nimport { CatalogDataContextV2Provider } from './CatalogDataContextV2';\n\nexport function CatalogDataContextV1Provider<\n TQuery extends EntityWithTicketsQuery & QueryWithViewMode,\n>({\n entityType,\n queryKey,\n getCatalogData,\n getCatalogDataExpanded,\n onCatalogDataExpanded,\n transformEventData,\n children,\n disabled,\n disableAutoRefresh,\n ignoreMaxCount,\n}: CatalogDataContextProviderProps) {\n const queryClient = useQueryClient();\n\n const { trackError, showErrorDialog } = useErrorBoundaryContext();\n\n const { filterQuery, isQueryInitialized } = useFilterQueryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const eventsExpansion = useListExpansion();\n const { expandedListItems } = eventsExpansion;\n\n const [errorInfo, setErrorInfo] = useState<{\n errorHeader: React.ReactNode;\n errorMessage: React.ReactNode;\n }>();\n\n // Flags to track the status of the expanded callback\n const [expandedCallbackStatus, setExpandedCallbackStatus] = useState<\n Record\n >({});\n const onExpandedCallbackStatusUpdate = useCallback(\n (stringQueryKey: string, status: ExpandedCallbackStatus) =>\n setExpandedCallbackStatus((prev) => ({\n ...prev,\n [stringQueryKey]: status,\n })),\n []\n );\n\n const {\n searchText,\n sortBy,\n isSortDescending,\n performerIds,\n venueIds,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n viewMode, // this is not used for server and keeping it in this cause refresh to happen 2x\n ...rest // Don't use it because it's a new object on every render\n } = filterQuery;\n\n const transformedQuery = useMemo(() => {\n const {\n searchText,\n sortBy,\n isSortDescending,\n performerIds,\n venueIds,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n viewMode, // this is not used for server and keeping it in this cause refresh to happen 2x\n ...rest\n } = filterQuery;\n return rest as TQuery;\n }, [filterQuery]);\n\n const realQueryKey = useMemo(\n () => [\n queryKey,\n transformedQuery,\n activeAccountWebClientConfig.activeAccountId,\n ],\n [queryKey, transformedQuery, activeAccountWebClientConfig.activeAccountId]\n );\n\n // The result for the catalog query can be tremedously huge -\n // this is an arbitrary rule to decide whether or not to keep this around\n // in the cache long or only for rendering\n const shouldBeCachedNormally =\n !transformedQuery.eventNotReviewedSinceDate &&\n (transformedQuery.eventTimeFrameFilter === EventTimeFrameFilter.Future ||\n // If difference in days is less than 1 year\n differenceInDays(\n transformedQuery.eventDates?.start == null\n ? MIN_DATE\n : new Date(transformedQuery.eventDates.start),\n transformedQuery.eventDates?.end == null\n ? MAX_DATE\n : new Date(transformedQuery.eventDates.end)\n ) < 365);\n\n const shouldQuery =\n transformedQuery != null &&\n activeAccountWebClientConfig.activeAccountId != null &&\n isQueryInitialized &&\n !disabled;\n\n const query = useQuery({\n queryKey: realQueryKey,\n queryFn: async () => {\n setErrorInfo(undefined);\n\n if (!shouldQuery) {\n return null;\n }\n\n return tryInvokeApi(\n async () => {\n const data = await getCatalogData(\n new CatalogClient(activeAccountWebClientConfig),\n transformedQuery\n );\n\n return data;\n },\n (error) => {\n const { headerDisplay, messageDisplay } = getErrorInfoFromStatusCode(\n error?.status,\n error?.message\n );\n setErrorInfo({\n errorHeader: headerDisplay,\n errorMessage: messageDisplay,\n });\n trackError('CatalogClient.getCatalogData', error, transformedQuery);\n }\n );\n },\n\n enabled: shouldQuery,\n staleTime: shouldBeCachedNormally ? Infinity : 0, // Since we're always refetching on an interval, we don't want query to calculate whether the data is stale\n gcTime: shouldBeCachedNormally ? undefined /* use default */ : 0,\n refetchOnWindowFocus: false,\n networkMode: 'offlineFirst',\n refetchInterval:\n shouldBeCachedNormally && !disableAutoRefresh\n ? DATA_REFRESH_RATE_IN_MILLIS_LONG\n : false, // disable refetch if event timespan is over a year in the past\n });\n const catalogResults = query.data;\n\n const eventIdsToGetItemsFor = useMemo(() => {\n if (transformedQuery.entityIds?.length) {\n return [[NO_GROUP_ID]];\n }\n\n if (!catalogResults) {\n return [] as [string][];\n }\n\n const eventsToGetItemsFor = searchEvents(\n catalogResults,\n searchText,\n performerIds,\n venueIds\n );\n\n let listingCount = 0;\n let salesCount = 0;\n\n (eventsToGetItemsFor ?? []).forEach((ev) => {\n listingCount += ev.counts.listCnt ?? 0;\n salesCount += ev.counts.salesCnt ?? 0;\n });\n\n let isTooManyItems = false;\n if (!ignoreMaxCount && viewMode === InventoryViewMode.FlattenedView) {\n // Only one of these are non-zero\n if (listingCount) {\n isTooManyItems = listingCount > MAX_NUM_OF_ITEMS_FOR_FLATTENED_VIEWS;\n } else if (salesCount) {\n isTooManyItems = salesCount > MAX_NUM_OF_ITEMS_FOR_FLATTENED_VIEWS;\n }\n }\n const results =\n viewMode === InventoryViewMode.FlattenedView\n ? isTooManyItems &&\n // If the catalog shows a count of way too many items and we're actually not filtering to the individual items, don't query at all\n !rest.entityIds?.length &&\n !rest.marketplaceEntityIds?.length\n ? []\n : // For flatten view - we know we're gonna get all of them at once, so just bundle all the event ids in 1 array\n [eventsToGetItemsFor?.map((ev) => ev.event.viagVirtualId)]\n : // For tile view, we only want 1 event per query\n expandedListItems.map((id) => [id]);\n\n // Finally, we need to include the PosEventIds with all the ids, because in some cases\n // the ViagogoVirtualIds do not resolve properly due to the outdated cache, and missing items are returned\n // for merged events\n return results.map((idArray) => {\n const allEvents = eventsToGetItemsFor\n .filter((ev) => idArray.includes(ev.event.viagVirtualId))\n .flatMap((ev) => ev.event.posIds.map((posId) => `old:${posId}`));\n\n return idArray.concat(allEvents);\n });\n }, [\n transformedQuery.entityIds?.length,\n catalogResults,\n searchText,\n performerIds,\n venueIds,\n ignoreMaxCount,\n viewMode,\n rest.entityIds?.length,\n rest.marketplaceEntityIds?.length,\n expandedListItems,\n ]);\n\n const realExpandedDataItemsQueryKey = useMemo(\n () => [queryKey + 'Expanded', transformedQuery],\n [queryKey, transformedQuery]\n );\n\n const shouldQuery2 =\n activeAccountWebClientConfig.activeAccountId != null &&\n transformedQuery != null &&\n !disabled;\n\n const [queryWithExpandedItems, setQueryWithExpandedItems] = useState<\n UseQueryResult[]\n >([]);\n\n const refreshInterval = !disableAutoRefresh\n ? DATA_REFRESH_RATE_IN_MILLIS_SHORT\n : false;\n\n const queryWithExpandedItemsFromHook = useQueries({\n queries: (eventIdsToGetItemsFor ?? []).map((ids) => {\n const queryKey = [...realExpandedDataItemsQueryKey, ...ids.toSorted()];\n return {\n queryKey: queryKey,\n queryFn: async () => {\n if (!shouldQuery2) {\n return null;\n }\n\n return tryInvokeApi(\n async () => {\n const data = await getCatalogDataExpanded?.(\n ids[0] === NO_GROUP_ID ? [] : ids,\n transformedQuery\n );\n if (onCatalogDataExpanded) {\n onExpandedCallbackStatusUpdate(\n queryKey.toString(),\n ExpandedCallbackStatus.Pending\n );\n }\n return data;\n },\n (error: ErrorTypes) => {\n showErrorDialog('CatalogClient.getCatalogDataExpanded', error, {\n trackErrorData: {\n eventIds: ids,\n filterQuery,\n },\n });\n }\n );\n },\n enabled: shouldQuery2,\n staleTime: Infinity, // Since we're always refetching on an interval, we don't want query to calculate whether the data is stale\n refetchOnWindowFocus: false,\n refetchInterval: refreshInterval as number | false,\n };\n }),\n });\n\n const onCatalogDataExpandedCallbackCheck = useCallback(\n async (\n queryResults: UseQueryResult<\n ExpandedEventData | null | undefined,\n Error\n >[]\n ) => {\n if (!onCatalogDataExpanded) {\n return;\n }\n const queryIds = eventIdsToGetItemsFor ?? [];\n for (let index = 0; index < queryIds.length; index++) {\n const ids = queryIds[index];\n const queryKey = [...realExpandedDataItemsQueryKey, ...ids.toSorted()];\n const stringQueryKey = queryKey.toString();\n const queryResult = queryResults[index];\n if (\n expandedCallbackStatus[stringQueryKey] ===\n ExpandedCallbackStatus.Pending\n ) {\n onExpandedCallbackStatusUpdate(\n stringQueryKey,\n ExpandedCallbackStatus.InProgress\n );\n const newData = await onCatalogDataExpanded(\n ids,\n transformedQuery,\n queryResult?.data ?? undefined\n );\n queryClient.setQueryData(queryKey, newData);\n onExpandedCallbackStatusUpdate(\n stringQueryKey,\n ExpandedCallbackStatus.Done\n );\n }\n }\n },\n [\n eventIdsToGetItemsFor,\n expandedCallbackStatus,\n onCatalogDataExpanded,\n onExpandedCallbackStatusUpdate,\n queryClient,\n realExpandedDataItemsQueryKey,\n transformedQuery,\n ]\n );\n\n /**\n * IMPORTANT: This is needed because queryWithExpandedItemsFromHook from useQueries\n * is not a memoized object, so on every render it returns a new array with queryWithExpandedItems,\n * causing the app to re-render.\n */\n useEffect(() => {\n if (!isEqual(queryWithExpandedItems, queryWithExpandedItemsFromHook)) {\n setQueryWithExpandedItems(queryWithExpandedItemsFromHook);\n onCatalogDataExpandedCallbackCheck(queryWithExpandedItemsFromHook);\n return;\n }\n }, [\n onCatalogDataExpandedCallbackCheck,\n queryWithExpandedItems,\n queryWithExpandedItemsFromHook,\n ]);\n\n useEffect(() => {\n if (!catalogResults) {\n return;\n }\n\n const expandedEventsWithData: ExpandedEventData[] = (\n queryWithExpandedItems ?? []\n ).map((r) => r.data ?? {});\n\n const updatedCatalaogResult = updateCatalogResults(\n catalogResults,\n expandedEventsWithData\n );\n if (!isEqual(catalogResults, updatedCatalaogResult)) {\n queryClient.setQueryData(realQueryKey, updatedCatalaogResult);\n }\n }, [queryWithExpandedItems, catalogResults, queryClient, realQueryKey]);\n\n const [eventsTransformed, setEventsTransformed] = useState();\n\n // This to apply client-side filtering before transformation of the data\n useEffect(() => {\n if (catalogResults) {\n const newExpandedData = merge(\n {},\n ...queryWithExpandedItems.map((r) => r.data ?? {})\n ) as ExpandedEventData;\n const transformed = sortEvents(\n catalogResults,\n transformEventData(\n entityType,\n searchEvents(catalogResults, searchText, performerIds, venueIds),\n newExpandedData,\n queryWithExpandedItems.some((q) => q.isLoading)\n ),\n sortBy,\n isSortDescending\n );\n\n if (!isEqual(transformed, eventsTransformed)) {\n setEventsTransformed(transformed);\n }\n }\n }, [\n isSortDescending,\n searchText,\n sortBy,\n transformEventData,\n queryWithExpandedItems,\n eventsTransformed,\n catalogResults,\n performerIds,\n venueIds,\n query.isPending,\n entityType,\n ]);\n\n const refreshCatalog = useCallback(() => {\n queryClient.invalidateQueries({\n queryKey: [queryKey],\n refetchType: 'none', // we don't want to refetch any, we'll manually refetch the active\n });\n return query.refetch();\n }, [query, queryClient, queryKey]);\n\n const refreshExpandedListItems = useCallback(() => {\n queryClient.invalidateQueries({\n queryKey: [queryKey + 'Expanded'],\n refetchType: 'none', // we don't want to refetch any, we'll manually refetch the active\n });\n\n return queryClient.invalidateQueries({\n queryKey: realExpandedDataItemsQueryKey,\n });\n }, [queryClient, queryKey, realExpandedDataItemsQueryKey]);\n\n /**\n * Refreshes the event data for a specific item\n */\n const refreshEventForItems = useCallback(\n (itemIds: ItemIdWithRowVersion[], entityType: ActionOutboxEntityType) => {\n const eventIds = eventsTransformed\n ?.filter((ev) => {\n if (entityType === ActionOutboxEntityType.Listing) {\n return ev.entities.listings?.some((l) =>\n itemIds.some((i) => i.id === l.id && i.rowVer > l.rowVer)\n );\n } else if (entityType === ActionOutboxEntityType.Sale) {\n return ev.entities.sales?.some((s) =>\n itemIds.some((i) => i.id === s.id && i.rowVer > s.rowVer)\n );\n } else if (entityType === ActionOutboxEntityType.Purchase) {\n return ev.entities.ticketGroups?.some((t) =>\n itemIds.some((i) => i.id === t.id && i.rowVer > t.rowVer)\n );\n }\n return false;\n })\n ?.map((ev) => ev.event.viagVirtualId);\n\n if (eventIds?.length) {\n if (viewMode === InventoryViewMode.FlattenedView) {\n queryClient.invalidateQueries({\n queryKey: realExpandedDataItemsQueryKey,\n });\n } else {\n for (const eventId of eventIds) {\n queryClient.invalidateQueries({\n queryKey: [...realExpandedDataItemsQueryKey, eventId],\n });\n }\n }\n }\n },\n [eventsTransformed, queryClient, realExpandedDataItemsQueryKey, viewMode]\n );\n\n const updateExpandedListItems = useCallback(\n (updatedListingsByEvent: { [key: string]: Listing[] }) => {\n const newDatas = queryClient.setQueriesData(\n {\n queryKey: [queryKey + 'Expanded'],\n },\n (oldData: ExpandedEventData | undefined) => {\n if (!oldData) {\n return oldData;\n }\n const newData = { ...oldData };\n Object.entries(updatedListingsByEvent).forEach(([key, value]) => {\n const oldListingsByIds =\n newData[key]?.listings?.reduce(\n (r, l) => {\n r[l.id] = l;\n return r;\n },\n {} as Record\n ) ?? {};\n\n // Filter all the new ones that have row version < the old one\n const newListings = [\n ...value.filter((l) => {\n const oldListing = oldListingsByIds[l.id];\n if (oldListing && oldListing.rowVer > l.rowVer) {\n return false;\n }\n\n return true;\n }),\n ];\n const newListingIdsFlattened = getFlattenedListingIds(newListings);\n\n // Retain listings that are not updated\n newData[key]?.listings?.forEach((originalListing) => {\n let shouldKeep = true;\n if (!originalListing.isLtGrp) {\n if (newListingIdsFlattened.includes(originalListing.id))\n shouldKeep = false;\n } else {\n // If `originalListing` is a listing group\n // there will only be two cases\n // 1. No one listing in `newListingIdsFlattened` show up in the group (keep the group), or\n // 2. All listings in `newListingIdsFlattened` show up in the group (don't keep it, group has been edited or removed)\n const originalListingIdsFlattened = getFlattenedListingIds([\n originalListing,\n ]);\n if (\n originalListingIdsFlattened.some((l) =>\n newListingIdsFlattened.includes(l)\n )\n ) {\n shouldKeep = false;\n }\n }\n\n if (shouldKeep) {\n newListings.push(originalListing);\n }\n });\n\n newData[key] = {\n sales: null,\n listings: newListings,\n ticketGroups: null,\n failedToRetrieveData: false,\n };\n });\n return newData;\n }\n );\n\n // We should only check at first 2 query keys [PrimaryKey, QueryObject]\n const newData = newDatas.find((qk) =>\n isEqual((qk[0] ?? []).slice(0, 2), realExpandedDataItemsQueryKey)\n );\n if (catalogResults && newData) {\n const transformed = sortEvents(\n catalogResults,\n transformEventData(\n entityType,\n searchEvents(catalogResults, searchText, performerIds, venueIds),\n newData[1] as ExpandedEventData,\n false\n ),\n sortBy,\n isSortDescending\n );\n\n setEventsTransformed(transformed);\n }\n },\n [\n queryClient,\n queryKey,\n catalogResults,\n realExpandedDataItemsQueryKey,\n transformEventData,\n entityType,\n searchText,\n performerIds,\n venueIds,\n sortBy,\n isSortDescending,\n ]\n );\n\n const updateExpandedSaleItems = useCallback(\n (updatedListingsByEvent: { [key: string]: Sale[] }) => {\n const newDatas = queryClient.setQueriesData(\n {\n queryKey: [queryKey + 'Expanded'],\n },\n (oldData: ExpandedEventData | undefined) => {\n if (!oldData) {\n return oldData;\n }\n const newData = { ...oldData };\n Object.entries(updatedListingsByEvent).forEach(([key, value]) => {\n const oldSalesByIds =\n newData[key]?.sales?.reduce(\n (r, s) => {\n r[s.id] = s;\n return r;\n },\n {} as Record\n ) ?? {};\n\n // Filter all the new ones that have row version < the old one\n const newSales = [\n ...value.filter((s) => {\n const oldSale = oldSalesByIds[s.id];\n if (oldSale && oldSale.rowVer > s.rowVer) {\n return false;\n }\n\n return true;\n }),\n ];\n const newSaleIds = newSales.map((s) => s.id);\n\n // Retain sales that are not in the newSales\n newData[key]?.sales?.forEach((originalSale) => {\n if (!newSaleIds.includes(originalSale.id)) {\n // new sales doesn't have the original sale, keep it\n newSales.push(originalSale);\n }\n });\n\n newData[key] = {\n sales: newSales,\n listings: null,\n ticketGroups: null,\n failedToRetrieveData: false,\n };\n });\n return newData;\n }\n );\n\n const newData = newDatas.find((qk) =>\n isEqual((qk[0] ?? []).slice(0, 2), realExpandedDataItemsQueryKey)\n );\n if (catalogResults && newData) {\n const transformed = sortEvents(\n catalogResults,\n transformEventData(\n entityType,\n searchEvents(catalogResults, searchText, performerIds, venueIds),\n newData[1] as ExpandedEventData,\n false\n ),\n sortBy,\n isSortDescending\n );\n\n setEventsTransformed(transformed);\n }\n },\n [\n queryClient,\n queryKey,\n catalogResults,\n realExpandedDataItemsQueryKey,\n transformEventData,\n entityType,\n searchText,\n performerIds,\n venueIds,\n sortBy,\n isSortDescending,\n ]\n );\n\n const updateExpandedTicketGroupItems = useCallback(\n (updatedTgsByEvent: { [key: string]: PurchaseOrderTicketGroup[] }) => {\n const newDatas = queryClient.setQueriesData(\n {\n queryKey: [queryKey + 'Expanded'],\n },\n (oldData: ExpandedEventData | undefined) => {\n if (!oldData) {\n return oldData;\n }\n const newData = { ...oldData };\n Object.entries(updatedTgsByEvent).forEach(([key, value]) => {\n const oldTgsByIds =\n newData[key]?.ticketGroups?.reduce(\n (r, t) => {\n r[t.tgId!] = t;\n return r;\n },\n {} as Record\n ) ?? {};\n\n // Filter all the new ones that have row version < the old one\n const newTgs = [\n ...value.filter((t) => {\n const oldTg = oldTgsByIds[t.tgId!];\n if (oldTg && oldTg.rowVer > t.rowVer) {\n return false;\n }\n\n return true;\n }),\n ];\n const newTgIds = newTgs.map((s) => s.tgId!);\n\n // Retain tgs that are not in the newTgs\n newData[key]?.ticketGroups?.forEach((originalTg) => {\n if (!newTgIds.includes(originalTg.tgId!)) {\n // new sales doesn't have the original sale, keep it\n newTgs.push(originalTg);\n }\n });\n\n newData[key] = {\n sales: null,\n listings: null,\n ticketGroups: newTgs,\n failedToRetrieveData: false,\n };\n });\n return newData;\n }\n );\n\n const newData = newDatas.find((qk) =>\n isEqual(qk[0], realExpandedDataItemsQueryKey)\n );\n if (catalogResults && newData) {\n const transformed = sortEvents(\n catalogResults,\n transformEventData(\n entityType,\n searchEvents(catalogResults, searchText, performerIds, venueIds),\n newData[1] as ExpandedEventData,\n false\n ),\n sortBy,\n isSortDescending\n );\n\n setEventsTransformed(transformed);\n }\n },\n [\n queryClient,\n queryKey,\n catalogResults,\n realExpandedDataItemsQueryKey,\n transformEventData,\n entityType,\n searchText,\n performerIds,\n venueIds,\n sortBy,\n isSortDescending,\n ]\n );\n\n const updateItemInEvent = useCallback(\n async (\n item: Listing | Sale | PurchaseOrderTicketGroup,\n entityType: ActionOutboxEntityType\n ) => {\n // Now that we got the listing details, try to get the Event from existing data\n const catalogIdKey = item.viagVirtualId!;\n const eventQuery = queryWithExpandedItems.find(\n (r) => r.data?.[catalogIdKey]\n );\n\n // If we can't find it, go fetch it\n if (eventQuery?.data != null) {\n const event = eventQuery.data[catalogIdKey];\n\n // NOTE - after each refresh - the row version will be zero\n // and direct cache-update will trigger the row-version change until the next refresh\n // this is to make sure async updates to multiple listings/sales of an event do not overwrite each other\n if (entityType === ActionOutboxEntityType.Listing && event.listings) {\n // Because we're manually updating, set all rowVer here to be min 1, and the item to be updated to be min 2\n event.listings.forEach((l) => (l.rowVer = l.rowVer || 1));\n\n // If the event in the catalog has the listings expanded, we'll want to update it\n // with the latest info from the listing details above (this will help update state changes or seat allocations, etc.)\n const index = event.listings.findIndex(\n (s) =>\n s.id === item.id ||\n (s as ListingGroup).groupItems?.some(\n (l) =>\n l.id === item.id ||\n // this is the second level group\n (l as ListingGroup).groupItems?.some(\n (l2) => l2.id === item.id\n )\n )\n );\n\n const oldItem = event.listings[index];\n const lg = oldItem as ListingGroup;\n\n if (oldItem.id === item.id) {\n item.rowVer = oldItem.rowVer + 1; // Increase rowVer to indicate that we updated this recently\n event.listings[index] = { ...oldItem, ...item } as Listing;\n } else if (lg.groupItems != null) {\n // The item is a listing under a group\n const groupListingIndex = lg.groupItems.findIndex(\n (s) => s.id === item.id\n );\n\n if (groupListingIndex < 0) {\n for (const subGroup of lg.groupItems) {\n if (subGroup.isLtGrp) {\n const listingIndex = (\n subGroup as ListingGroup\n ).groupItems.findIndex((s) => s.id === item.id);\n\n if (listingIndex >= 0) {\n const oldItemInGroup = (subGroup as ListingGroup)\n .groupItems[listingIndex];\n item.rowVer = oldItemInGroup.rowVer + 1; // Increase rowVer to indicate that we updated this recently\n\n (subGroup as ListingGroup).groupItems[listingIndex] = {\n ...oldItem,\n ...item,\n } as Listing;\n }\n }\n }\n } else {\n const oldItemInGroup = lg.groupItems[groupListingIndex];\n item.rowVer = oldItemInGroup.rowVer + 1; // Increase rowVer to indicate that we updated this recently\n\n lg.groupItems[groupListingIndex] = {\n ...oldItem,\n ...item,\n } as Listing;\n }\n }\n\n event.listings = [...event.listings]; // this so the table will forced to be re-rendered\n updateExpandedListItems({ [catalogIdKey]: event.listings });\n } else if (entityType === ActionOutboxEntityType.Sale && event.sales) {\n // Because we're manually updating, set all rowVer here to be min 1, and the item to be updated to be min 2\n event.sales.forEach((s) => (s.rowVer = s.rowVer || 1));\n\n // If the event in the catalog has the sales expanded, we'll want to update it\n // with the latest info from the sale details above (this will help update state changes or seat allocations, etc.)\n const index = event.sales.findIndex((s) => s.id === item.id);\n const oldItem = event.sales[index];\n item.rowVer = oldItem.rowVer + 1; // Increase rowVer to indicate that we updated this recently\n\n event.sales[index] = { ...oldItem, ...item } as Sale;\n event.sales = [...event.sales]; // this so the table will forced to be re-rendered\n\n updateExpandedSaleItems({ [catalogIdKey]: event.sales });\n } else if (\n entityType === ActionOutboxEntityType.Purchase &&\n event.ticketGroups\n ) {\n // Because we're manually updating, set all rowVer here to be min 1, and the item to be updated to be min 2\n event.ticketGroups.forEach((s) => (s.rowVer = s.rowVer || 1));\n\n // If the event in the catalog has the sales expanded, we'll want to update it\n // with the latest info from the sale details above (this will help update state changes or seat allocations, etc.)\n const index = event.ticketGroups.findIndex(\n (t) => t.tgId === (item as PurchaseOrderTicketGroup).tgId\n );\n const oldItem = event.ticketGroups[index];\n item.rowVer = oldItem.rowVer + 1; // Increase rowVer to indicate that we updated this recently\n\n event.ticketGroups[index] = {\n ...oldItem,\n ...item,\n } as PurchaseOrderTicketGroup;\n event.ticketGroups = [...event.ticketGroups]; // this so the table will forced to be re-rendered\n\n updateExpandedTicketGroupItems({\n [catalogIdKey]: event.ticketGroups,\n });\n }\n }\n },\n [\n queryWithExpandedItems,\n updateExpandedListItems,\n updateExpandedSaleItems,\n updateExpandedTicketGroupItems,\n ]\n );\n\n const allEventIds = useMemo(\n () =>\n eventsTransformed?.map((ev) => ({\n viagVirtualId: ev.event.viagVirtualId,\n performerId: ev.event.perfId,\n venueId: ev.event.venueId,\n })),\n [eventsTransformed]\n );\n\n useEffect(() => {\n if (query.failureReason) {\n const { headerDisplay, messageDisplay } = getErrorInfoFromStatusCode(\n null,\n query.failureReason?.toString()\n );\n setErrorInfo({\n errorHeader: headerDisplay,\n errorMessage: messageDisplay,\n });\n } else if (errorInfo) {\n setErrorInfo(undefined);\n }\n }, [errorInfo, query.failureReason]);\n\n return (\n r.isLoading), // whether the query to get items are loading\n data: catalogResults ?? undefined,\n errorInfo,\n eventsTransformed,\n allEventIds,\n refreshCatalog,\n updateItemInEvent,\n eventsExpansion: {\n ...eventsExpansion,\n refreshExpandedListItems,\n },\n updateExpandedListItems,\n refreshEventForItems,\n totalPurchaseCount: catalogResults?.purchaseCount,\n }}\n >\n {children}\n \n );\n}\n\nexport function CatalogDataContextProvider<\n TQuery extends EntityWithTicketsQuery & QueryWithViewMode,\n>(props: CatalogDataContextProviderProps) {\n const hasCatalogV2Feature = useUserHasFeature(Feature.CatalogCacheStrategyV2);\n\n return hasCatalogV2Feature ? (\n \n ) : (\n \n );\n}\n","import { useContext } from 'react';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { Feature } from 'src/WebApiController';\n\nimport {\n CatalogDataContextV1,\n CatalogDataContextV2,\n} from './CatalogDataContext.types';\n\nexport const useCatalogDataContext = () => {\n const hasCatalogV2Feature = useUserHasFeature(Feature.CatalogCacheStrategyV2);\n\n return useContext(\n hasCatalogV2Feature ? CatalogDataContextV2 : CatalogDataContextV1\n );\n};\n","import { ComponentProps, useCallback, useMemo, useState } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { RotatingWrapper } from 'src/core/ui/AnimatingWrapper';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { DownloadIcon, IconsFill, ProcessingIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n Feature,\n ListingClient,\n ListingQuery,\n} from 'src/WebApiController';\n\nimport { useFilterQueryState } from '../MainFilterBar/useFilterQueryState';\nimport { ButtonWithIcon } from './ButtonWithIcon';\n\nexport const ExportInventoryButton = ({\n textContentId,\n iconOnlyMode,\n textOnly,\n variant,\n ...props\n}: {\n textContentId?: ContentId;\n iconOnlyMode?: boolean;\n textOnly?: boolean;\n variant?: string;\n} & Omit, 'icon' | 'onClick'>) => {\n const { eventsTransformed } = useCatalogDataContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n const { filterQuery } = useFilterQueryContext();\n const { filterQueryWithEventIds } = useFilterQueryState(\n ActionOutboxEntityType.Listing\n );\n const [isLoading, setIsLoading] = useState(false);\n const hasAutoPricingFeature = useUserHasFeature(Feature.AutoPricing);\n const isButtonDisabled = isLoading || eventsTransformed == null;\n\n const onExportButtonClicked = useCallback(async () => {\n setIsLoading(true);\n await tryInvokeApi(\n async () => {\n const result = await new ListingClient(\n activeAccountWebClientConfig\n ).exportListings({\n item1: filterQueryWithEventIds,\n item2: {\n hasAutoPricingFeature,\n },\n });\n\n if (result.data) {\n const url = URL.createObjectURL(result.data);\n const a = document.createElement('a');\n a.setAttribute('href', url);\n a.setAttribute('download', result.fileName ?? '');\n a.click();\n URL.revokeObjectURL(url);\n a.remove();\n }\n },\n (error) => {\n showErrorDialog('ListingClient.exportListings', error, {\n trackErrorData: { filterQuery },\n });\n },\n () => setIsLoading(false)\n );\n }, [\n activeAccountWebClientConfig,\n filterQuery,\n filterQueryWithEventIds,\n hasAutoPricingFeature,\n showErrorDialog,\n ]);\n\n const iconFill = useMemo(\n () =>\n props.disabled\n ? IconsFill.textDisabled\n : iconOnlyMode || (variant ?? 'text') !== 'regular'\n ? IconsFill.textBrand\n : IconsFill.textInverted,\n [iconOnlyMode, props.disabled, variant]\n );\n return (\n \n \n \n ) : (\n \n )\n ) : null\n }\n iconOnlyMode={iconOnlyMode}\n variant={variant ?? 'text'}\n textContentId={textContentId || ContentId.Export}\n />\n );\n};\n","import { ComponentProps, useCallback, useMemo, useState } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { RotatingWrapper } from 'src/core/ui/AnimatingWrapper';\nimport { DownloadIcon, IconsFill, ProcessingIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { downloadFileFromBlob } from 'src/utils/fileUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { PurchaseClient, PurchaseOrderQuery } from 'src/WebApiController';\n\nimport { ButtonWithIcon } from './ButtonWithIcon';\n\nexport const ExportPurchasesButton = ({\n filterQuery,\n textContentId,\n iconOnlyMode,\n textOnly,\n variant,\n isEventView,\n ...props\n}: {\n filterQuery: PurchaseOrderQuery;\n textContentId?: ContentId;\n iconOnlyMode?: boolean;\n textOnly?: boolean;\n variant?: string;\n isEventView: boolean;\n} & Omit, 'icon' | 'onClick'>) => {\n const { eventsTransformed } = useCatalogDataContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n const [isLoading, setIsLoading] = useState(false);\n const isButtonDisabled = isLoading || eventsTransformed == null;\n\n const onExportButtonClicked = useCallback(async () => {\n setIsLoading(true);\n await tryInvokeApi(\n async () => {\n const result = await new PurchaseClient(\n activeAccountWebClientConfig\n ).exportPurchases(filterQuery, isEventView);\n\n if (result.data) {\n downloadFileFromBlob(result.fileName ?? 'purchase.csv', result.data);\n }\n },\n (error) => {\n showErrorDialog('PurchaseClient.exportPurchases', error, {\n trackErrorData: { filterQuery, isEventView },\n });\n },\n () => setIsLoading(false)\n );\n }, [activeAccountWebClientConfig, filterQuery, isEventView, showErrorDialog]);\n\n const iconFill = useMemo(\n () =>\n props.disabled\n ? IconsFill.textDisabled\n : iconOnlyMode || (variant ?? 'text') !== 'regular'\n ? IconsFill.textBrand\n : IconsFill.textInverted,\n [iconOnlyMode, props.disabled, variant]\n );\n return (\n \n \n \n ) : (\n \n )\n ) : null\n }\n iconOnlyMode={iconOnlyMode}\n variant={variant ?? 'text'}\n textContentId={textContentId || ContentId.Export}\n />\n );\n};\n","import { ComponentProps, useCallback, useMemo, useState } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { RotatingWrapper } from 'src/core/ui/AnimatingWrapper';\nimport { DownloadIcon, IconsFill, ProcessingIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n SaleClient,\n SaleQuery,\n} from 'src/WebApiController';\n\nimport { useFilterQueryState } from '../MainFilterBar/useFilterQueryState';\nimport { ButtonWithIcon } from './ButtonWithIcon';\n\nexport const ExportSalesButton = ({\n textContentId,\n textOnly,\n iconOnlyMode,\n variant,\n ...props\n}: Omit, 'icon' | 'onClick'> & {\n textOnly?: boolean;\n}) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n const { filterQueryWithEventIds } = useFilterQueryState(\n ActionOutboxEntityType.Sale\n );\n const [isLoading, setIsLoading] = useState(false);\n\n const onExportButtonClicked = useCallback(async () => {\n setIsLoading(true);\n await tryInvokeApi(\n async () => {\n const result = await new SaleClient(\n activeAccountWebClientConfig\n ).exportSales(filterQueryWithEventIds);\n\n if (result.data) {\n const url = URL.createObjectURL(result.data);\n const a = document.createElement('a');\n a.setAttribute('href', url);\n a.setAttribute('download', result.fileName ?? '');\n a.click();\n URL.revokeObjectURL(url);\n a.remove();\n }\n },\n (error) => {\n showErrorDialog('SaleClient.exportSales', error, {\n trackErrorData: { filterQueryWithEventIds },\n });\n },\n () => setIsLoading(false)\n );\n }, [activeAccountWebClientConfig, filterQueryWithEventIds, showErrorDialog]);\n\n const iconFill = useMemo(\n () =>\n props.disabled\n ? IconsFill.textDisabled\n : iconOnlyMode || (variant ?? 'text') !== 'regular'\n ? IconsFill.textBrand\n : IconsFill.textInverted,\n [iconOnlyMode, props.disabled, variant]\n );\n return (\n \n \n \n ) : (\n \n )\n ) : null\n }\n iconOnlyMode={iconOnlyMode}\n variant={variant ?? 'text'}\n textContentId={textContentId || ContentId.Export}\n />\n );\n};\n","import { ComponentProps } from 'react';\nimport { vars } from 'src/core/themes';\nimport { ReloadIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { ButtonWithIcon } from './ButtonWithIcon';\n\nexport const ReloadButton = ({\n textContentId,\n ...props\n}: Omit, 'icon'>) => {\n return (\n }\n textContentId={textContentId || ContentId.Reload}\n />\n );\n};\n","import { ComponentProps } from 'react';\nimport { vars } from 'src/core/themes';\nimport {\n IconsFill,\n MobileTicketIcon,\n MobileTransferIcon,\n} from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { ButtonWithIcon } from './ButtonWithIcon';\n\nexport const TransferButton = ({\n textContentId,\n iconOnlyMode,\n variant,\n eTicketUrlOnly,\n ...props\n}: Omit, 'icon'> & {\n eTicketUrlOnly?: boolean;\n}) => {\n const Icon = eTicketUrlOnly ? MobileTicketIcon : MobileTransferIcon;\n return (\n \n }\n iconOnlyMode={iconOnlyMode}\n variant={variant}\n textContentId={\n textContentId ||\n (eTicketUrlOnly ? ContentId.AddUrl : ContentId.Transfer)\n }\n />\n );\n};\n","import { ComponentProps } from 'react';\nimport { vars } from 'src/core/themes';\nimport { IconsFill, UploadIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { ButtonWithIcon } from './ButtonWithIcon';\n\nexport const UploadButton = ({\n textContentId,\n iconOnlyMode,\n variant,\n ...props\n}: Omit, 'icon'>) => {\n return (\n \n }\n iconOnlyMode={iconOnlyMode}\n variant={variant}\n textContentId={textContentId || ContentId.Upload}\n />\n );\n};\n","import * as Sentry from '@sentry/react';\nimport { ColumnDef } from '@tanstack/react-table';\nimport { useCallback } from 'react';\nimport { Link, useLocation, useNavigate } from 'react-router-dom';\nimport { IconButton } from 'src/components/Buttons';\nimport { EventDateDisplay } from 'src/components/Events/EventInfo';\nimport {\n COLUMN_DEFAULT_SIZE_BASE,\n COLUMN_DEFAULT_SIZE_L,\n COLUMN_DEFAULT_SIZE_SM,\n COLUMN_DEFAULT_SIZE_XL,\n COLUMN_DEFAULT_SIZE_XXL,\n COLUMN_MAX_SIZE,\n COLUMN_MIN_SIZE,\n} from 'src/contexts/ColumnResizingContext/ColumnResizingContext.types';\nimport { Content, FormatContent } from 'src/contexts/ContentContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { vars } from 'src/core/themes';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { TableHeaderCellDiv } from 'src/core/ui/TableHeaderCellDiv';\nimport { useColumnUserSetting } from 'src/hooks/useColumnUserSetting';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { FormatOption } from 'src/modals/EditTableColumns';\nimport { FullPageIcon } from 'src/svgs';\nimport { EventDisplayCell } from 'src/tables/EventsTable/configs/EventDisplayCell';\nimport { LocationDisplayCell } from 'src/tables/EventsTable/configs/LocationDisplayCell';\nimport { VenueDisplayCell } from 'src/tables/EventsTable/configs/VenueDisplayCell';\nimport { TableShimmeringDiv } from 'src/tables/Table';\nimport {\n DemandDashboardEventIdQueryParam,\n DemandDashboardIsOnSaleEventQueryParam,\n} from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ON_SALE_EVENT_TABLE_COLUMN_ID_CONTENT_ID } from 'src/utils/constants/contentIdMaps';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport {\n compareEventsByDate,\n compareEventsByDateStr,\n compareEventsByLocation,\n compareEventsByName,\n compareEventsByVenue,\n getFormattedEventName,\n} from 'src/utils/eventWithDataUtils';\nimport {\n getGroupingLabelForString,\n getGroupLabelForDates,\n getGroupLabelForNumber,\n} from 'src/utils/groupingUtils';\nimport { applyNumberFormatting } from 'src/utils/numberFormatter';\nimport { sortMoney } from 'src/utils/tableUtils';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport { DateTimeRange, Event, Feature, UiMoney } from 'src/WebApiController';\n\nimport {\n OnSaleEventsTableColumnId,\n OnSaleEventWithMetrics,\n} from './OnSaleEventView.types';\n\nconst QUANTITY_COLUMN_MIN_SIZE = 50;\nconst QUANTITY_COLUMN_MAX_SIZE = 80;\nconst COST_COLUMN_MIN_SIZE = 50;\nconst COST_COLUMN_MAX_SIZE = 80;\n\nexport const ON_SALE_EVENTS_TABLE_COLUMNS_CONFIG: Partial<\n Record>\n> = {\n [OnSaleEventsTableColumnId.Checkbox]: {\n id: OnSaleEventsTableColumnId.Checkbox,\n header: '',\n size: COLUMN_DEFAULT_SIZE_SM,\n minSize: COLUMN_DEFAULT_SIZE_SM,\n maxSize: COLUMN_DEFAULT_SIZE_SM,\n enableSorting: false,\n enableResizing: false,\n cell: function Cell({ row: { original, getIsSelected } }) {\n const { setShiftKeyGroupSelectionState } = useMultiSelectionContext();\n const isSelected = getIsSelected();\n\n if (!original?.event) {\n return ;\n }\n\n return (\n \n {\n setShiftKeyGroupSelectionState(original.event.viagVirtualId);\n }}\n />\n \n );\n },\n },\n [OnSaleEventsTableColumnId.Event]: {\n id: OnSaleEventsTableColumnId.Event,\n header: ({ column: { id: columnId } }) => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_XXL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n accessorFn: (data) => data,\n cell: function Cell({ getValue, row: { original } }) {\n const { metrics, ...rest } = getValue();\n if (!original?.event) {\n return ;\n }\n\n return ;\n },\n sortingFn: compareEventsByName,\n getGroupingValue: (row) => {\n const eventName = getFormattedEventName({\n event: row?.event,\n performer: row?.performer,\n venue: row?.venue,\n useShortName: true,\n }).join(' ');\n return getGroupingLabelForString(eventName);\n },\n },\n\n [OnSaleEventsTableColumnId.Venue]: {\n id: OnSaleEventsTableColumnId.Venue,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_XL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n accessorFn: (data) => data,\n cell: function Cell({ getValue, row: { original } }) {\n const { metrics, ...rest } = getValue();\n if (!original?.event) {\n return ;\n }\n return ;\n },\n sortingFn: compareEventsByVenue,\n getGroupingValue: (item: OnSaleEventWithMetrics | null) =>\n getGroupingLabelForString(item?.venue?.name ?? ''),\n },\n [OnSaleEventsTableColumnId.Location]: {\n id: OnSaleEventsTableColumnId.Location,\n header: ({ column: { id: columnId } }) => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_XL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n accessorFn: (data) => data,\n cell: function Cell({ getValue, row: { original } }) {\n const { metrics, ...rest } = getValue();\n if (!original?.event) {\n return ;\n }\n return ;\n },\n sortingFn: compareEventsByLocation,\n getGroupingValue: (item: OnSaleEventWithMetrics | null) =>\n getGroupingLabelForString(item?.venue?.descr ?? ''),\n },\n [OnSaleEventsTableColumnId.OnSaleDate]: {\n id: OnSaleEventsTableColumnId.OnSaleDate,\n header: ({ column: { id: columnId } }) => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_L,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n accessorFn: (data) => data?.event?.rawOnSaleDate,\n cell: function Cell({ getValue, row: { original }, column }) {\n const columnId = column.id;\n\n const value = getValue();\n const { userDefinedPrecision = FormatOption.DateTime_Month_DD_YY_Time } =\n useColumnUserSetting(columnId, SectionType.OnSaleEvents);\n\n if (!original?.event) {\n return ;\n }\n\n const date = applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value,\n isDateTime: true,\n }) as string;\n\n return (\n \n {userDefinedPrecision === FormatOption.DateTime_MonthDD_Time ? (\n \n ) : (\n
    {date}
    \n )}\n
    \n );\n },\n sortingFn: compareEventsByDateStr,\n getGroupingValue: (item: OnSaleEventWithMetrics | null) =>\n getGroupLabelForDates(item?.event.rawOnSaleDate),\n },\n [OnSaleEventsTableColumnId.Date]: {\n id: OnSaleEventsTableColumnId.Date,\n header: ({ column: { id: columnId } }) => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_L,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n accessorFn: (data) => data?.event?.dates,\n cell: function Cell({ getValue, row: { original }, column }) {\n const columnId = column.id;\n\n const value = getValue();\n const { userDefinedPrecision = FormatOption.DateTime_Month_DD_YY_Time } =\n useColumnUserSetting(columnId, SectionType.OnSaleEvents);\n\n if (!original?.event) {\n return ;\n }\n\n const date = applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value?.start,\n isDateTime: true,\n }) as string;\n\n return (\n \n {userDefinedPrecision === FormatOption.DateTime_MonthDD_Time ? (\n \n ) : (\n
    {date}
    \n )}\n
    \n );\n },\n sortingFn: compareEventsByDate,\n getGroupingValue: (item: OnSaleEventWithMetrics | null) =>\n getGroupLabelForDates(item?.event.dates.start),\n },\n [OnSaleEventsTableColumnId.RawPreSaleDate]: {\n id: OnSaleEventsTableColumnId.RawPreSaleDate,\n header: ({ column: { id: columnId } }) => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_L,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n accessorFn: (data) => data?.event?.rawPreSaleDate,\n cell: function Cell({ getValue, row: { original }, column }) {\n const columnId = column.id;\n\n const value = getValue();\n const { userDefinedPrecision = FormatOption.DateTime_Month_DD_YY_Time } =\n useColumnUserSetting(columnId, SectionType.OnSaleEvents);\n\n if (!original?.event) {\n return ;\n }\n\n const date = applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value,\n isDateTime: true,\n }) as string;\n\n return (\n \n {userDefinedPrecision === FormatOption.DateTime_MonthDD_Time ? (\n \n ) : (\n
    {date}
    \n )}\n
    \n );\n },\n sortingFn: compareEventsByDateStr,\n getGroupingValue: (item: OnSaleEventWithMetrics | null) =>\n getGroupLabelForDates(item?.event.rawPreSaleDate),\n },\n [OnSaleEventsTableColumnId.ListingCount]: {\n id: OnSaleEventsTableColumnId.ListingCount,\n header: ({ column: { id: columnId } }) => (\n \n \n \n ),\n minSize: QUANTITY_COLUMN_MIN_SIZE,\n maxSize: QUANTITY_COLUMN_MAX_SIZE,\n accessorFn: (data) => data?.metrics?.listingCount,\n cell: function Cell({ getValue, row: { original }, column }) {\n const columnId = column.id;\n const value = getValue();\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SectionType.OnSaleEvents\n );\n if (!original?.metrics) {\n return ;\n }\n return (\n \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value,\n })}\n \n );\n },\n getGroupingValue: (item: OnSaleEventWithMetrics | null) =>\n getGroupLabelForNumber(item?.metrics?.listingCount ?? 0),\n },\n [OnSaleEventsTableColumnId.TicketCount]: {\n id: OnSaleEventsTableColumnId.TicketCount,\n header: ({ column: { id: columnId } }) => (\n \n \n \n ),\n minSize: QUANTITY_COLUMN_MIN_SIZE,\n maxSize: QUANTITY_COLUMN_MAX_SIZE,\n accessorFn: (data) => data?.metrics?.ticketCount,\n cell: function Cell({ getValue, row: { original }, column }) {\n const columnId = column.id;\n const value = getValue();\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SectionType.OnSaleEvents\n );\n if (!original?.metrics) {\n return ;\n }\n return (\n \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value,\n })}\n \n );\n },\n getGroupingValue: (item: OnSaleEventWithMetrics | null) =>\n getGroupLabelForNumber(item?.metrics?.ticketCount ?? 0),\n },\n [OnSaleEventsTableColumnId.UnitNetProceedsMin]: {\n id: OnSaleEventsTableColumnId.UnitNetProceedsMin,\n header: ({ column: { id: columnId } }) => (\n \n \n \n ),\n minSize: COST_COLUMN_MIN_SIZE,\n maxSize: COST_COLUMN_MAX_SIZE,\n accessorFn: (data) => data?.metrics?.unitNetProceedsUsdMin,\n cell: function Cell({ getValue, row: { original }, column }) {\n const columnId = column.id;\n\n const value = getValue();\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SectionType.OnSaleEvents\n );\n if (!original?.metrics) {\n return ;\n }\n return (\n \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value?.amt,\n currencyCode: value?.currency,\n })}\n \n );\n },\n sortingFn: sortMoney,\n getGroupingValue: (item: OnSaleEventWithMetrics | null) =>\n getGroupLabelForNumber(\n item?.metrics?.unitNetProceedsUsdMin?.amt ?? 0,\n item?.metrics?.unitNetProceedsUsdMin?.disp ?? '$'\n ),\n },\n [OnSaleEventsTableColumnId.UnitNetProceedsP25]: {\n id: OnSaleEventsTableColumnId.UnitNetProceedsP25,\n header: ({ column: { id: columnId } }) => (\n \n \n \n ),\n minSize: COST_COLUMN_MIN_SIZE,\n maxSize: COST_COLUMN_MAX_SIZE,\n accessorFn: (data) => data?.metrics?.unitNetProceedsUsdP25,\n cell: function Cell({ getValue, row: { original }, column }) {\n const columnId = column.id;\n\n const value = getValue();\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SectionType.Events\n );\n if (!original?.metrics) {\n return ;\n }\n return (\n \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value?.amt,\n currencyCode: value?.currency,\n })}\n \n );\n },\n sortingFn: sortMoney,\n getGroupingValue: (item: OnSaleEventWithMetrics | null) =>\n getGroupLabelForNumber(\n item?.metrics?.unitNetProceedsUsdP25?.amt ?? 0,\n item?.metrics?.unitNetProceedsUsdP25?.disp ?? '$'\n ),\n },\n [OnSaleEventsTableColumnId.UnitNetProceedsP50]: {\n id: OnSaleEventsTableColumnId.UnitNetProceedsP50,\n header: ({ column: { id: columnId } }) => (\n \n \n \n ),\n minSize: COST_COLUMN_MIN_SIZE,\n maxSize: COST_COLUMN_MAX_SIZE,\n accessorFn: (data) => data?.metrics?.unitNetProceedsUsdP50,\n cell: function Cell({ getValue, row: { original }, column }) {\n const columnId = column.id;\n\n const value = getValue();\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SectionType.OnSaleEvents\n );\n if (!original?.metrics) {\n return ;\n }\n return (\n \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value?.amt,\n currencyCode: value?.currency,\n })}\n \n );\n },\n sortingFn: sortMoney,\n getGroupingValue: (item: OnSaleEventWithMetrics | null) =>\n getGroupLabelForNumber(\n item?.metrics?.unitNetProceedsUsdP50?.amt ?? 0,\n item?.metrics?.unitNetProceedsUsdP50?.disp ?? '$'\n ),\n },\n [OnSaleEventsTableColumnId.VisitsLastHour]: {\n id: OnSaleEventsTableColumnId.VisitsLastHour,\n header: ({ column: { id: columnId } }) => (\n \n \n \n ),\n minSize: QUANTITY_COLUMN_MIN_SIZE,\n maxSize: QUANTITY_COLUMN_MAX_SIZE,\n accessorFn: (data) => data?.metrics?.eventVisits?.lastHour,\n cell: function Cell({ getValue, row: { original }, column }) {\n const columnId = column.id;\n const value = getValue();\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SectionType.OnSaleEvents\n );\n if (!original?.metrics) {\n return ;\n }\n return (\n \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value,\n })}\n \n );\n },\n getGroupingValue: (item: OnSaleEventWithMetrics | null) =>\n getGroupLabelForNumber(item?.metrics?.eventVisits?.lastHour ?? 0),\n },\n [OnSaleEventsTableColumnId.VisitsLastDay]: {\n id: OnSaleEventsTableColumnId.VisitsLastDay,\n header: ({ column: { id: columnId } }) => (\n \n \n \n ),\n minSize: QUANTITY_COLUMN_MIN_SIZE,\n maxSize: QUANTITY_COLUMN_MAX_SIZE,\n accessorFn: (data) => data?.metrics?.eventVisits?.lastDay,\n cell: function Cell({ getValue, row: { original }, column }) {\n const columnId = column.id;\n const value = getValue();\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SectionType.OnSaleEvents\n );\n if (!original?.metrics) {\n return ;\n }\n return (\n \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value,\n })}\n \n );\n },\n getGroupingValue: (item: OnSaleEventWithMetrics | null) =>\n getGroupLabelForNumber(item?.metrics?.eventVisits?.lastDay ?? 0),\n },\n [OnSaleEventsTableColumnId.VisitsLast3Days]: {\n id: OnSaleEventsTableColumnId.VisitsLast3Days,\n header: ({ column: { id: columnId } }) => (\n \n \n \n ),\n minSize: QUANTITY_COLUMN_MIN_SIZE,\n maxSize: QUANTITY_COLUMN_MAX_SIZE,\n accessorFn: (data) => data?.metrics?.eventVisits?.lastThreeDays,\n cell: function Cell({ getValue, row: { original }, column }) {\n const columnId = column.id;\n const value = getValue();\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SectionType.OnSaleEvents\n );\n if (!original?.metrics) {\n return ;\n }\n return (\n \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value,\n })}\n \n );\n },\n getGroupingValue: (item: OnSaleEventWithMetrics | null) =>\n getGroupLabelForNumber(item?.metrics?.eventVisits?.lastThreeDays ?? 0),\n },\n [OnSaleEventsTableColumnId.VisitsLast7Days]: {\n id: OnSaleEventsTableColumnId.VisitsLast7Days,\n header: ({ column: { id: columnId } }) => (\n \n \n \n ),\n minSize: QUANTITY_COLUMN_MIN_SIZE,\n maxSize: QUANTITY_COLUMN_MAX_SIZE,\n accessorFn: (data) => data?.metrics?.eventVisits?.lastSevenDays,\n cell: function Cell({ getValue, row: { original }, column }) {\n const columnId = column.id;\n const value = getValue();\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SectionType.OnSaleEvents\n );\n if (!original?.metrics) {\n return ;\n }\n return (\n \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value,\n })}\n \n );\n },\n getGroupingValue: (item: OnSaleEventWithMetrics | null) =>\n getGroupLabelForNumber(item?.metrics?.eventVisits?.lastSevenDays ?? 0),\n },\n\n [OnSaleEventsTableColumnId.TransactionsLastHour]: {\n id: OnSaleEventsTableColumnId.TransactionsLastHour,\n header: ({ column: { id: columnId } }) => (\n \n \n \n ),\n minSize: QUANTITY_COLUMN_MIN_SIZE,\n maxSize: QUANTITY_COLUMN_MAX_SIZE,\n accessorFn: (data) => data?.metrics?.eventTransactions?.lastHour,\n cell: function Cell({ getValue, row: { original }, column }) {\n const columnId = column.id;\n const value = getValue();\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SectionType.OnSaleEvents\n );\n if (!original?.metrics) {\n return ;\n }\n return (\n \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value,\n })}\n \n );\n },\n getGroupingValue: (item: OnSaleEventWithMetrics | null) =>\n getGroupLabelForNumber(item?.metrics?.eventTransactions?.lastHour ?? 0),\n },\n [OnSaleEventsTableColumnId.TransactionsLastDay]: {\n id: OnSaleEventsTableColumnId.TransactionsLastDay,\n header: ({ column: { id: columnId } }) => (\n \n \n \n ),\n minSize: QUANTITY_COLUMN_MIN_SIZE,\n maxSize: QUANTITY_COLUMN_MAX_SIZE,\n accessorFn: (data) => data?.metrics?.eventTransactions?.lastDay,\n cell: function Cell({ getValue, row: { original }, column }) {\n const columnId = column.id;\n const value = getValue();\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SectionType.OnSaleEvents\n );\n if (!original?.metrics) {\n return ;\n }\n return (\n \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value,\n })}\n \n );\n },\n getGroupingValue: (item: OnSaleEventWithMetrics | null) =>\n getGroupLabelForNumber(item?.metrics?.eventTransactions?.lastDay ?? 0),\n },\n [OnSaleEventsTableColumnId.TransactionsLast3Days]: {\n id: OnSaleEventsTableColumnId.TransactionsLast3Days,\n header: ({ column: { id: columnId } }) => (\n \n \n \n ),\n minSize: QUANTITY_COLUMN_MIN_SIZE,\n maxSize: QUANTITY_COLUMN_MAX_SIZE,\n accessorFn: (data) => data?.metrics?.eventTransactions?.lastThreeDays,\n cell: function Cell({ getValue, row: { original }, column }) {\n const columnId = column.id;\n const value = getValue();\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SectionType.OnSaleEvents\n );\n if (!original?.metrics) {\n return ;\n }\n return (\n \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value,\n })}\n \n );\n },\n getGroupingValue: (item: OnSaleEventWithMetrics | null) =>\n getGroupLabelForNumber(\n item?.metrics?.eventTransactions?.lastThreeDays ?? 0\n ),\n },\n [OnSaleEventsTableColumnId.TransactionsLast7Days]: {\n id: OnSaleEventsTableColumnId.TransactionsLast7Days,\n header: ({ column: { id: columnId } }) => (\n \n \n \n ),\n minSize: QUANTITY_COLUMN_MIN_SIZE,\n maxSize: QUANTITY_COLUMN_MAX_SIZE,\n accessorFn: (data) => data?.metrics?.eventTransactions?.lastSevenDays,\n cell: function Cell({ getValue, row: { original }, column }) {\n const columnId = column.id;\n const value = getValue();\n const { userDefinedPrecision } = useColumnUserSetting(\n columnId,\n SectionType.OnSaleEvents\n );\n if (!original?.metrics) {\n return ;\n }\n return (\n \n {applyNumberFormatting({\n precision: userDefinedPrecision,\n inputNumber: value,\n })}\n \n );\n },\n getGroupingValue: (item: OnSaleEventWithMetrics | null) =>\n getGroupLabelForNumber(\n item?.metrics?.eventTransactions?.lastSevenDays ?? 0\n ),\n },\n [OnSaleEventsTableColumnId.Action]: {\n id: OnSaleEventsTableColumnId.Action,\n enableSorting: false,\n enableResizing: true,\n header: function Cell() {\n const hasTablePinActionColumnFeature = useUserHasFeature(\n Feature.TablePinActionColumn\n );\n\n if (hasTablePinActionColumnFeature) {\n return null;\n }\n\n return (\n \n \n \n );\n },\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n accessorFn: (data) => data?.event ?? null,\n cell: function Cell({ getValue, row: { original } }) {\n const value = getValue();\n if (!original?.event) {\n return ;\n }\n return ;\n },\n },\n};\n\nexport const OnSaleEventActionsCell = ({ event }: { event: Event }) => {\n const navigate = useNavigate();\n const location = useLocation();\n\n const eventUrlV2 = `/inventory/event/v2?${DemandDashboardEventIdQueryParam}=${event.viagVirtualId}&${DemandDashboardIsOnSaleEventQueryParam}=true`;\n\n const onViewClick = useCallback(\n (eventUrl: string) => {\n if (event) {\n const span = Sentry.startSpan(\n { name: 'Event Discovery', op: 'event_clicked' },\n (span: Sentry.Span) => {\n span.setAttribute('event_id', event.viagId ?? 0);\n return span;\n }\n );\n span.end();\n window.location.replace(`#${event.viagVirtualId}`);\n setTimeout(() => {\n navigate(eventUrl, {\n state: {\n returnUrl: `${location.pathname}${location.search}#${event.viagVirtualId}`,\n },\n });\n }, 10);\n }\n },\n [event, navigate, location.pathname, location.search]\n );\n\n return (\n \n {\n if (e.button === 0 && e.getModifierState('Control') === false) {\n // Perform like a button click when it's a left-click (and no Ctrl)\n // Else the click will be whatever
    does\n e.preventDefault();\n e.stopPropagation();\n\n onViewClick(eventUrlV2);\n }\n }}\n >\n \n }\n titleContentId={ContentId.OpenEventPageV2InDevelopment}\n />\n \n \n );\n};\n","import { ColumnDef } from '@tanstack/react-table';\nimport { ON_SALE_EVENTS_TABLE_COLUMNS_CONFIG } from 'src/navigations/Routes/OnSaleEvent/OnSaleEventView.constants';\nimport {\n OnSaleEventsTableColumnId,\n OnSaleEventWithMetrics,\n} from 'src/navigations/Routes/OnSaleEvent/OnSaleEventView.types';\nimport {\n customColumnDef as customColumnDefEvent,\n EVENTS_TABLE_COLUMNS_CONFIG,\n EventWithDataAndMetrics,\n} from 'src/tables/EventsTable/configs/EventsTableColumnsConfig';\nimport {\n customColumnDef as customColumnDefListingReport,\n LISTING_REPORT_TABLE_COLUMNS_CONFIG,\n tagColumnDef as tagColumnDefListingReport,\n} from 'src/tables/ListingTable/configs/ListingReportTableColumnsConfig';\nimport {\n customColumnDef as customColumnDefListing,\n getListingTableColumnConfigs,\n tagColumnDef as tagColumnDefListing,\n} from 'src/tables/ListingTable/configs/ListingTableColumnsConfig';\nimport { LISTING_TABLE_FLATTENED_COLUMNS_CONFIG } from 'src/tables/ListingTable/configs/ListingTableFlattenedColumnsConfig';\nimport { ListingWithEvent } from 'src/tables/ListingTable/ListingTable.types';\nimport { PURCHASE_TABLE_COLUMNS_CONFIG } from 'src/tables/PurchaseTable/configs/PurchaseTableColumnsConfig';\nimport {\n customColumnDef as customColumnDefSaleReport,\n SALE_REPORT_TABLE_COLUMNS_CONFIG,\n tagColumnDef as tagColumnDefSaleReport,\n} from 'src/tables/SalesTable/configs/SaleReportTableColumnsConfig';\nimport {\n customColumnDef as customColumnDefSale,\n SALE_TABLE_COLUMNS_CONFIG,\n tagColumnDef as tagColumnDefSale,\n} from 'src/tables/SalesTable/configs/SaleTableColumnsConfig';\nimport { SALE_TABLE_FLATTENED_COLUMNS_CONFIG } from 'src/tables/SalesTable/configs/SaleTableFlattenedColumnsConfig';\nimport { SaleWithEvent } from 'src/tables/SalesTable/SalesTable.type';\nimport { EventsTableColumnId } from 'src/utils/columns/events/eventsColumnUtils.types';\nimport {\n GROUP_BY_TO_PRIMARY_COLUMN_ID as GROUP_BY_TO_PRIMARY_COLUMN_ID_LISTING,\n GROUP_BY_TO_VISIBLE_COLUMN_IDS as GROUP_BY_TO_VISIBLE_COLUMN_IDS_LISTINGS,\n NON_METRIC_LISTING_REPORT_TABLE_COLUMN_IDS,\n} from 'src/utils/columns/inventory/inventoryColumnUtils.constants';\nimport { CustomMarketplacePaymentsColumn } from 'src/utils/columns/payments/paymentsCustomColumnUtils.types';\nimport { PurchasesTableColumnId } from 'src/utils/columns/purchases/purchasesColumnUtils.types';\nimport { CustomPurchasesColumn } from 'src/utils/columns/purchases/purchasesCustomColumnUtils.types';\nimport {\n SalesReportTableColumnId,\n SalesTableColumnId,\n SalesTableFlattenedColumnId,\n} from 'src/utils/columns/sales/salesColumnUtils.types';\nimport {\n GROUP_BY_TO_PRIMARY_COLUMN_ID as GROUP_BY_TO_PRIMARY_COLUMN_ID_SALES,\n GROUP_BY_TO_VISIBLE_COLUMN_IDS as GROUP_BY_TO_VISIBLE_COLUMN_IDS_SALES,\n NON_METRIC_SALES_REPORT_TABLE_COLUMN_IDS,\n} from 'src/utils/columns/sales/salesReportColumnUtils.constants';\nimport {\n AdCampaignEntity,\n AdGroup,\n FeatureDetail,\n MarketplaceSalePayment,\n PurchaseOrder,\n ReportGroupBy,\n Tag,\n UserDetail,\n} from 'src/WebApiController';\n\nimport {\n ListingReportMetricsWithGroupBy,\n SaleReportMetricsWithGroupBy,\n} from '../reportsUtils';\nimport { SectionType } from '../types/sectionType';\nimport { hasFeatures } from '../userUtils';\nimport { AdCampaignsListingsColumn as CustomAdCampaignsColumn } from './adCampaigns/adCampaignsCustomColumnUtils.types';\nimport { AdGroupsListingsColumn as CustomAdGroupsColumn } from './adGroups/adGroupsCustomColumnUtils.types';\nimport { getColumnPersonalization } from './columnPersonalizationUtils';\nimport {\n ColumnPersonalizationFlags,\n GetListingColumnConfigById,\n} from './columnUtils.types';\nimport {\n CustomEventsColumn,\n CustomOnSaleEventsColumn,\n} from './events/eventsCustomColumnUtils.types';\nimport {\n ListingReportTableColumnId,\n ListingTableColumnId,\n ListingTableFlattenedColumnId,\n} from './inventory/inventoryColumnUtils.types';\nimport { CustomListingColumn } from './inventory/inventoryCustomColumnUtils.types';\nimport { CustomSalesColumn } from './sales/salesCustomColumnUtils.types';\n\nexport const getColumnConfigById = ({\n id,\n customColumns,\n sectionType,\n reportingTags,\n}: {\n id: string;\n sectionType: SectionType;\n customColumns?: (\n | CustomSalesColumn\n | CustomListingColumn\n | CustomEventsColumn\n | CustomPurchasesColumn\n | CustomAdCampaignsColumn\n | CustomAdGroupsColumn\n | CustomMarketplacePaymentsColumn\n | CustomOnSaleEventsColumn\n )[];\n reportingTags?: Tag[];\n}): {\n personalization: ColumnPersonalizationFlags;\n definition:\n | ColumnDef\n | ColumnDef\n | ColumnDef\n | ColumnDef\n | ColumnDef\n | ColumnDef\n | ColumnDef\n | ColumnDef\n | ColumnDef\n | ColumnDef\n | undefined;\n} => {\n const matchingCustomColumn = (customColumns ?? []).find((c) => c.id === id);\n const matchingTag = (reportingTags ?? []).find((t) => t.key === id);\n\n const tableColumns = getListingTableColumnConfigs();\n\n const { customColumnDef, tagColumnDef, tableColumnsConfig } =\n sectionType === SectionType.Listings\n ? {\n customColumnDef: customColumnDefListing,\n tagColumnDef: tagColumnDefListing,\n tableColumnsConfig: tableColumns[id as ListingTableColumnId],\n }\n : sectionType === SectionType.ListingsFlattened\n ? {\n customColumnDef: customColumnDefListing,\n tagColumnDef: tagColumnDefListing,\n tableColumnsConfig:\n tableColumns[id as ListingTableColumnId] ||\n LISTING_TABLE_FLATTENED_COLUMNS_CONFIG[\n id as ListingTableFlattenedColumnId\n ],\n }\n : sectionType === SectionType.ListingsReport\n ? {\n customColumnDef: customColumnDefListingReport,\n tagColumnDef: tagColumnDefListingReport,\n tableColumnsConfig:\n LISTING_REPORT_TABLE_COLUMNS_CONFIG[\n id as ListingReportTableColumnId\n ],\n }\n : sectionType === SectionType.Sales\n ? {\n customColumnDef: customColumnDefSale,\n tagColumnDef: tagColumnDefSale,\n tableColumnsConfig:\n SALE_TABLE_COLUMNS_CONFIG[id as SalesTableColumnId],\n }\n : sectionType === SectionType.SalesFlattened\n ? {\n customColumnDef: customColumnDefSale,\n tagColumnDef: tagColumnDefSale,\n tableColumnsConfig:\n SALE_TABLE_COLUMNS_CONFIG[id as SalesTableColumnId] ||\n SALE_TABLE_FLATTENED_COLUMNS_CONFIG[\n id as SalesTableFlattenedColumnId\n ],\n }\n : sectionType === SectionType.SalesReport\n ? {\n customColumnDef: customColumnDefSaleReport,\n tagColumnDef: tagColumnDefSaleReport,\n tableColumnsConfig:\n SALE_REPORT_TABLE_COLUMNS_CONFIG[id as SalesReportTableColumnId],\n }\n : sectionType === SectionType.OnSaleEvents\n ? {\n customColumnDef: customColumnDefEvent,\n tagColumnDef: undefined,\n tableColumnsConfig:\n ON_SALE_EVENTS_TABLE_COLUMNS_CONFIG[\n id as OnSaleEventsTableColumnId\n ],\n }\n : {\n // SectionType.Event\n customColumnDef: customColumnDefEvent,\n tagColumnDef: undefined,\n tableColumnsConfig:\n EVENTS_TABLE_COLUMNS_CONFIG[id as EventsTableColumnId],\n };\n\n const definition = matchingCustomColumn\n ? customColumnDef(id)\n : matchingTag\n ? tagColumnDef?.(matchingTag.key)\n : tableColumnsConfig;\n\n const personalization = getColumnPersonalization({\n id,\n sectionType,\n matchingCustomColumn,\n matchingTag,\n });\n\n return {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n definition: definition as any, // FIXME: type\n personalization,\n };\n};\n\nexport const filterColumnsByFeatures = (\n columns: string[],\n sectionType: SectionType,\n customColumns?: (\n | CustomSalesColumn\n | CustomListingColumn\n | CustomEventsColumn\n | CustomPurchasesColumn\n | CustomAdCampaignsColumn\n | CustomAdGroupsColumn\n | CustomMarketplacePaymentsColumn\n | CustomOnSaleEventsColumn\n )[],\n user?: UserDetail | null,\n featureDetails?: FeatureDetail[] | null,\n reportingTags?: Tag[],\n groupBy?: ReportGroupBy,\n viewMode?: string\n) => {\n return columns.filter((c) => {\n if (reportingTags?.find((t) => t.key === c) != null) {\n return true;\n }\n const customColumn = customColumns?.find((col) => col.id === c);\n if (customColumn) {\n const dependentColumns = customColumn.dependency;\n if (!dependentColumns) return true;\n\n // Inherit required features from dependent preset columns\n return (dependentColumns as string[]).every((d) => {\n const columnDef = getColumnPersonalization({ id: d, sectionType });\n const hasFeatureForColumn =\n columnDef.requiredFeatures.length === 0 ||\n hasFeatures(user, featureDetails, columnDef.requiredFeatures);\n return hasFeatureForColumn;\n });\n }\n\n if (groupBy) {\n if (sectionType === SectionType.SalesReport) {\n if (\n NON_METRIC_SALES_REPORT_TABLE_COLUMN_IDS.includes(\n c as SalesReportTableColumnId\n ) &&\n !GROUP_BY_TO_VISIBLE_COLUMN_IDS_SALES[groupBy]?.includes(\n c as SalesReportTableColumnId\n ) &&\n GROUP_BY_TO_PRIMARY_COLUMN_ID_SALES[groupBy] !== c\n ) {\n return false;\n }\n } else if (sectionType === SectionType.ListingsReport) {\n if (\n NON_METRIC_LISTING_REPORT_TABLE_COLUMN_IDS.includes(\n c as ListingReportTableColumnId\n ) &&\n !GROUP_BY_TO_VISIBLE_COLUMN_IDS_LISTINGS[groupBy]?.includes(\n c as ListingReportTableColumnId\n ) &&\n GROUP_BY_TO_PRIMARY_COLUMN_ID_LISTING[groupBy] !== c\n ) {\n return false;\n }\n }\n }\n\n const columnDef = getColumnPersonalization({ id: c, sectionType });\n const hasFeatureForColumn =\n columnDef.requiredFeatures.length === 0 ||\n hasFeatures(user, featureDetails, columnDef.requiredFeatures);\n\n const visibleInCurrentViewMode =\n viewMode == null ||\n columnDef.visibleViewModes.length === 0 ||\n columnDef.visibleViewModes.includes(viewMode);\n\n return hasFeatureForColumn && visibleInCurrentViewMode;\n });\n};\n\nexport const getListingColumnConfigById = (\n id: string,\n customColumns?: CustomListingColumn[],\n reportingTags?: Tag[]\n): GetListingColumnConfigById => {\n return getColumnConfigById({\n id,\n sectionType: SectionType.Listings,\n customColumns,\n reportingTags,\n }) as GetListingColumnConfigById;\n};\n\nexport const getListingFlattenedColumnConfigById = (\n id: string,\n customColumns?: CustomListingColumn[],\n reportingTags?: Tag[]\n): GetListingColumnConfigById => {\n return getColumnConfigById({\n id,\n sectionType: SectionType.ListingsFlattened,\n customColumns,\n reportingTags,\n }) as GetListingColumnConfigById;\n};\n\ntype GetListingReportColumnConfigById = {\n personalization: ColumnPersonalizationFlags;\n definition: ColumnDef | undefined;\n};\n\nexport const getListingReportColumnConfigById = (\n id: string,\n customColumns?: CustomListingColumn[],\n reportingTags?: Tag[]\n): GetListingReportColumnConfigById => {\n return getColumnConfigById({\n id,\n sectionType: SectionType.ListingsReport,\n customColumns,\n reportingTags,\n }) as GetListingReportColumnConfigById;\n};\n\ntype GetSaleColumnConfigById = {\n personalization: ColumnPersonalizationFlags;\n definition: ColumnDef;\n};\n\nexport const getSaleColumnConfigById = (\n id: string,\n customColumns?: CustomSalesColumn[],\n reportingTags?: Tag[]\n): GetSaleColumnConfigById => {\n return getColumnConfigById({\n id,\n sectionType: SectionType.Sales,\n customColumns,\n reportingTags,\n }) as GetSaleColumnConfigById;\n};\n\nexport const getSaleFlattenedColumnConfigById = (\n id: string,\n customColumns?: CustomSalesColumn[],\n reportingTags?: Tag[]\n): GetSaleColumnConfigById => {\n return getColumnConfigById({\n id,\n sectionType: SectionType.SalesFlattened,\n customColumns,\n reportingTags,\n }) as GetSaleColumnConfigById;\n};\n\ntype GetSaleReportColumnConfigById = {\n personalization: ColumnPersonalizationFlags;\n definition: ColumnDef;\n};\n\nexport const getSaleReportColumnConfigById = (\n id: string,\n customColumns?: CustomSalesColumn[],\n reportingTags?: Tag[]\n): GetSaleReportColumnConfigById => {\n return getColumnConfigById({\n id,\n sectionType: SectionType.SalesReport,\n customColumns,\n reportingTags,\n }) as GetSaleReportColumnConfigById;\n};\n\ntype GetEventsColumnConfigById = {\n personalization: ColumnPersonalizationFlags;\n definition: ColumnDef;\n};\ntype GetOnSaleEventsColumnConfigById = {\n personalization: ColumnPersonalizationFlags;\n definition: ColumnDef;\n};\n\nexport const getEventsColumnConfigById = (\n id: string,\n customColumns?: CustomEventsColumn[]\n): GetEventsColumnConfigById => {\n return getColumnConfigById({\n id,\n sectionType: SectionType.Events,\n customColumns,\n reportingTags: undefined,\n }) as GetEventsColumnConfigById;\n};\n\nexport const getOnSaleEventsColumnConfigById = (\n id: string,\n customColumns?: CustomOnSaleEventsColumn[]\n): GetOnSaleEventsColumnConfigById => {\n return getColumnConfigById({\n id,\n sectionType: SectionType.OnSaleEvents,\n customColumns,\n reportingTags: undefined,\n }) as GetOnSaleEventsColumnConfigById;\n};\n\ntype GetPurchasesColumnConfigById = {\n personalization: ColumnPersonalizationFlags;\n definition: ColumnDef;\n};\n\nexport const getPurchasesColumnConfigById = (\n id: string,\n customColumns?: CustomPurchasesColumn[]\n): GetPurchasesColumnConfigById => {\n return getColumnConfigById({\n id,\n sectionType: SectionType.Purchases,\n customColumns,\n reportingTags: undefined,\n }) as GetPurchasesColumnConfigById;\n};\n\nexport const defaultListingColumnsConfig = Object.values(\n getListingTableColumnConfigs()\n)\n .filter((item) => {\n const columnConfig = getListingColumnConfigById(\n item.id as ListingTableColumnId\n );\n return (\n !columnConfig.personalization.isHiddenByDefault &&\n (columnConfig.personalization.isConfigurable ||\n columnConfig.personalization.isRequired)\n );\n })\n .map((column) => column.id as ListingTableColumnId);\n\nconst DEFAULT_LISTING_FLATTENED_COLUMNS_FROM_LISTING_COLUMNS = [\n ListingTableColumnId.Seating,\n ListingTableColumnId.TicketCount,\n ListingTableColumnId.UnsoldQuantity,\n ListingTableColumnId.UnitCost,\n ListingTableColumnId.ListPrice,\n ListingTableColumnId.AllInPrice,\n ListingTableColumnId.DeliveryType,\n ListingTableColumnId.InHandDate,\n ListingTableColumnId.Actions,\n];\n\nexport const defaultListingFlattenedColumnsConfig = [\n ...Object.values(LISTING_TABLE_FLATTENED_COLUMNS_CONFIG)\n .filter((item) => {\n const columnConfig = getListingFlattenedColumnConfigById(\n item.id as string\n );\n return (\n !columnConfig.personalization.isHiddenByDefault &&\n (columnConfig.personalization.isConfigurable ||\n columnConfig.personalization.isRequired)\n );\n })\n .map((column) => column.id as ListingTableColumnId),\n ...DEFAULT_LISTING_FLATTENED_COLUMNS_FROM_LISTING_COLUMNS,\n];\n\nexport const defaultSalesColumnsConfig = Object.values(\n SALE_TABLE_COLUMNS_CONFIG\n)\n .filter((item) => {\n const columnConfig = getSaleColumnConfigById(item.id as SalesTableColumnId);\n return (\n !columnConfig.personalization.isHiddenByDefault &&\n (columnConfig.personalization.isConfigurable ||\n columnConfig.personalization.isRequired)\n );\n })\n .map((column) => column.id as SalesTableColumnId);\n\nconst DEFAULT_SALES_FLATTENED_COLUMNS_FROM_SALES_COLUMNS = [\n SalesTableColumnId.Seating,\n SalesTableColumnId.OrderDate,\n SalesTableColumnId.QuantitySold,\n SalesTableColumnId.Proceeds,\n SalesTableColumnId.Status,\n SalesTableColumnId.TicketType,\n SalesTableColumnId.InHandDate,\n SalesTableColumnId.Actions,\n];\n\nexport const defaultSalesFlattenedColumnsConfig = [\n ...Object.values(SALE_TABLE_FLATTENED_COLUMNS_CONFIG)\n .filter((item) => {\n const columnConfig = getSaleFlattenedColumnConfigById(item.id as string);\n return (\n !columnConfig.personalization.isHiddenByDefault &&\n (columnConfig.personalization.isConfigurable ||\n columnConfig.personalization.isRequired)\n );\n })\n .map((column) => column.id as SalesTableColumnId),\n ...DEFAULT_SALES_FLATTENED_COLUMNS_FROM_SALES_COLUMNS,\n];\n\nexport const defaultEventsColumnsConfig = Object.values(\n EVENTS_TABLE_COLUMNS_CONFIG\n)\n .filter((item) => {\n const columnConfig = getEventsColumnConfigById(\n item.id as EventsTableColumnId\n );\n return (\n !columnConfig.personalization.isHiddenByDefault &&\n (columnConfig.personalization.isConfigurable ||\n columnConfig.personalization.isRequired)\n );\n })\n .map((column) => column.id as EventsTableColumnId);\n\nexport const defaultPurchasesColumnsConfig = Object.values(\n PURCHASE_TABLE_COLUMNS_CONFIG\n)\n .filter((item) => {\n const columnConfig = getPurchasesColumnConfigById(\n item.id as PurchasesTableColumnId\n );\n return (\n !columnConfig.personalization.isHiddenByDefault &&\n (columnConfig.personalization.isConfigurable ||\n columnConfig.personalization.isRequired)\n );\n })\n .map((column) => column.id as PurchasesTableColumnId);\n\nexport const defaultOnSaleEventsColumnsConfig = Object.values(\n ON_SALE_EVENTS_TABLE_COLUMNS_CONFIG\n)\n .filter((item) => {\n const columnConfig = getOnSaleEventsColumnConfigById(\n item.id as OnSaleEventsTableColumnId\n );\n return (\n !columnConfig.personalization.isHiddenByDefault &&\n (columnConfig.personalization.isConfigurable ||\n columnConfig.personalization.isRequired)\n );\n })\n .map((column) => column.id as OnSaleEventsTableColumnId);\n\nexport const defaultPurchaseEventEnabledColumnsConfig = [\n PurchasesTableColumnId.VendorOrderId,\n PurchasesTableColumnId.Seating,\n PurchasesTableColumnId.Tickets,\n PurchasesTableColumnId.Shipment,\n PurchasesTableColumnId.Cost,\n PurchasesTableColumnId.Actions,\n];\n\ntype GetMarketplacePaymentColumnConfigById = {\n personalization: ColumnPersonalizationFlags;\n definition: ColumnDef;\n};\n\nexport const getMarketplacePaymentColumnConfigById = (\n id: string,\n customColumns?: CustomMarketplacePaymentsColumn[],\n reportingTags?: Tag[]\n): GetMarketplacePaymentColumnConfigById => {\n return getColumnConfigById({\n id,\n sectionType: SectionType.MarketplacePaymentsTable,\n customColumns,\n reportingTags,\n }) as GetMarketplacePaymentColumnConfigById;\n};\n","import { Updater } from '@tanstack/react-table';\nimport { debounce, once } from 'lodash-es';\nimport React, {\n ReactNode,\n useCallback,\n useContext,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport { getColumnConfigById } from 'src/utils/columns/columnUtils';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport { UserSetting } from 'src/WebApiController';\n\nimport { useServerUserSetting } from '../../hooks/useUserSetting';\nimport {\n ColumnResizingContextType,\n CustomColumnWidthsType,\n} from './ColumnResizingContext.types';\n\nexport const createColumnResizingContext = once(() =>\n React.createContext({} as ColumnResizingContextType)\n);\n\nexport function useColumnResizingContext() {\n return useContext(createColumnResizingContext());\n}\n\nconst USER_SETTING_TO_SECTION_TYPE = {\n [UserSetting.InventoryColumnWidths]: SectionType.Listings,\n [UserSetting.SaleColumnWidths]: SectionType.Sales,\n [UserSetting.PurchaseColumnWidths]: SectionType.Purchases,\n [UserSetting.PurchaseEventColumnWidths]: SectionType.PurchaseEvent,\n [UserSetting.InventoryReportColumnWidths]: SectionType.ListingsReport,\n [UserSetting.SaleReportColumnWidths]: SectionType.SalesReport,\n [UserSetting.EventsColumnWidths]: SectionType.Events,\n [UserSetting.MarketplacePaymentsColumnsWidth]:\n SectionType.MarketplacePaymentsTable,\n [UserSetting.OnSaleEventColumnsWidths]: SectionType.OnSaleEvents,\n};\n\nexport const ColumnResizingContextProvider = ({\n userSettingId,\n children,\n}: {\n userSettingId?:\n | UserSetting.InventoryColumnWidths\n | UserSetting.SaleColumnWidths\n | UserSetting.PurchaseColumnWidths\n | UserSetting.PurchaseEventColumnWidths\n | UserSetting.InventoryReportColumnWidths\n | UserSetting.SaleReportColumnWidths\n | UserSetting.EventsColumnWidths\n | UserSetting.MarketplacePaymentsColumnsWidth\n | UserSetting.OnSaleEventColumnsWidths;\n children: ReactNode;\n}) => {\n const ColumnResizingContext = createColumnResizingContext();\n const sectionType =\n userSettingId != null\n ? USER_SETTING_TO_SECTION_TYPE[userSettingId]\n : undefined;\n\n const isInitializedRef = useRef(false);\n\n const {\n value: serverCustomColumnWidths,\n setUserSetting: setServerCustomColumnWidths,\n } = useServerUserSetting({\n id: userSettingId,\n });\n\n const [customColumnWidths, setCustomColumnWidths] =\n useState({});\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const debouncedSetServerColumnWidths = useCallback(\n debounce(\n (newWidth: Record) =>\n setServerCustomColumnWidths(newWidth),\n 1000\n ),\n [setServerCustomColumnWidths]\n );\n\n const onColumnSizingChange = (\n updaterOrValue: Updater\n ) => {\n if (!(updaterOrValue instanceof Function)) return;\n\n const state = updaterOrValue({});\n if (!Object.keys(state).length) return;\n\n const [key, width] = Object.entries(\n state as Record\n )[0];\n const definition =\n sectionType != null\n ? getColumnConfigById({\n id: key,\n sectionType,\n }).definition\n : null;\n\n const minSize = definition?.minSize ?? 0;\n const maxSize = definition?.maxSize;\n const currentSize = customColumnWidths[key] ?? 0;\n let updatedSize = Math.max(width, minSize);\n if (maxSize != null) {\n updatedSize = Math.min(updatedSize, maxSize);\n }\n\n if (updatedSize === currentSize) return;\n\n const newWidths = {\n ...customColumnWidths,\n [key]: updatedSize,\n };\n\n setCustomColumnWidths(newWidths);\n debouncedSetServerColumnWidths(newWidths);\n };\n\n useEffect(() => {\n if (isInitializedRef.current || !serverCustomColumnWidths) return;\n isInitializedRef.current = true;\n\n const serverCustomColumnWidthsWithoutZeroValues = Object.entries(\n serverCustomColumnWidths\n ).reduce(\n (acc, [key, value]) => {\n if (!value) return acc;\n return { ...acc, [key]: value };\n },\n {} as Record\n );\n setCustomColumnWidths(serverCustomColumnWidthsWithoutZeroValues);\n }, [serverCustomColumnWidths]);\n\n return (\n \n {children}\n \n );\n};\n","import { Column } from '@tanstack/react-table';\nimport { CSSProperties } from 'react';\n\nexport const itemSizeDefault = (el: HTMLElement) =>\n el.getBoundingClientRect().height;\n\nexport const getCommonPinningStyles = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n column: Column\n): CSSProperties => {\n const isPinned = column.getIsPinned();\n return {\n left: isPinned === 'left' ? `${column.getStart('left')}px` : undefined,\n right: isPinned === 'right' ? `${column.getAfter('right')}px` : undefined,\n position: isPinned ? 'sticky' : 'relative',\n zIndex: 0,\n background: isPinned ? 'inherit' : undefined,\n };\n};\n","import clsx from 'clsx';\nimport { useSiteTheme } from 'src/contexts/SiteTheme/SiteThemeContext';\n\nimport {\n gradient,\n gradientDark,\n gradientLight,\n wrapper,\n} from './PinnedCellGradient.css';\n\ninterface PinnedCellGradientProps {\n height: string | number;\n}\n\nexport const PinnedCellGradient = ({ height }: PinnedCellGradientProps) => {\n const { isDarkMode } = useSiteTheme();\n\n return (\n
    \n
    \n \n );\n};\n","import { Cell } from '@tanstack/react-table';\nimport clsx from 'clsx';\nimport { CSSProperties, ReactNode, useRef } from 'react';\nimport { vars } from 'src/core/themes';\nimport { PosTableData } from 'src/tables/Table';\nimport { pinnedCell, tableTd } from 'src/tables/Table/components/TableTd.css';\nimport { PosGroupingTableTd } from 'src/tables/Table/Table.css';\nimport { getCommonPinningStyles } from 'src/tables/Table/Table.utils';\nimport { PinnedCellGradient } from 'src/tables/Table/TableCells/PinnedCellGradient';\n\ninterface TableTdProps {\n cell: Cell;\n tableCellStyle?: CSSProperties;\n children: ReactNode;\n isLargeDesktop?: boolean;\n isResizeEnabled?: boolean;\n isGrouping?: boolean;\n classNames?: string;\n}\n\nexport const TableTd = ({\n children,\n tableCellStyle,\n cell,\n isLargeDesktop,\n isResizeEnabled,\n isGrouping,\n classNames,\n ...props\n}: TableTdProps) => {\n const isPinned = cell.column.getIsPinned();\n const cellRef = useRef(null);\n\n return (\n \n {isPinned && (\n \n )}\n {children}\n \n );\n};\n","import { forwardRef, RefObject } from 'react';\nimport { Components } from 'react-virtuoso';\n\nimport * as styles from '../Table.css';\n\nexport const PosGroupedVirtuosoGroup: Components['Group'] = forwardRef(\n function GroupedVirtuosoGroup({ context, children, ...props }, ref) {\n return (\n
    } {...props}>\n \n \n {children}\n \n
    \n
    \n );\n }\n);\n","import { RowData } from '@tanstack/react-table';\nimport clsx from 'clsx';\nimport { useEffect, useRef } from 'react';\nimport { useActiveFocusContext } from 'src/contexts/ActiveFocusContext/ActiveFocusContext';\nimport { PosVirtuosoTableRowProps } from 'src/tables/Table/PosVirtuosoTableComponent/PosVirtuosoTableContext';\n\nimport * as styles from '../Table.css';\n\nexport const PosVirtuosoTableRow = ({\n context,\n children,\n ...props\n}: PosVirtuosoTableRowProps) => {\n const {\n tableRowStyle,\n tableRows,\n rowWrapper,\n RowComponent,\n onRowShiftSelect,\n } = context || {};\n const inputRef = useRef(null);\n const { activeItem, onKeyDownHandler } = useActiveFocusContext();\n\n useEffect(() => {\n if (activeItem?.id && inputRef.current && activeItem.id === props.item.id) {\n inputRef.current.focus();\n inputRef.current.scrollIntoView({\n behavior: 'smooth',\n block: 'nearest',\n inline: 'nearest',\n });\n inputRef.current.focus();\n }\n }, [activeItem, props.item.id]);\n\n const rowProps = {\n className: clsx(styles.tableRow, {\n [styles.isSelectedRow]: props.item.getIsSelected(),\n [styles.isSubRow]: props.item.depth > 0,\n }),\n style: {\n ...tableRowStyle,\n width: '99%',\n },\n ref: inputRef,\n key: props.item.id,\n onClick: (e: React.MouseEvent) => {\n e.stopPropagation();\n props.item.toggleSelected();\n onRowShiftSelect?.(tableRows, props.item, props['data-item-index']);\n },\n onKeyDown:\n activeItem != null\n ? (e: React.KeyboardEvent) =>\n onKeyDownHandler(e, props['data-index'], tableRows)\n : undefined,\n tabIndex:\n activeItem != null\n ? props.item.getIsSelected() || props.item.id === activeItem?.id\n ? 0\n : -1\n : undefined,\n ...props,\n };\n\n children = rowWrapper\n ? rowWrapper(props.item.original, children, props['data-index'])\n : children;\n\n if (RowComponent) {\n return (\n \n {children}\n \n );\n }\n\n return {children};\n};\n","import { forwardRef, RefObject } from 'react';\nimport { Components } from 'react-virtuoso';\nimport { PosTableData } from 'src/tables/Table';\nimport { PosGroupedVirtuosoContext } from 'src/tables/Table/GroupedVirtuosoTable/PosGroupedVirtuosoContext';\nimport { PosVirtuosoTableRow } from 'src/tables/Table/PosVirtuosoTableComponent/PosVirtuosoTableRow';\n\nimport * as styles from '../Table.css';\n\nexport const PosGroupedVirtuosoItem: Components['Item'] = forwardRef(\n function GroupedVirtuosoItem({ context, children, item, ...props }, ref) {\n const { tableRows } = context as PosGroupedVirtuosoContext;\n const itemIndex = props['data-item-index'];\n const row = tableRows[itemIndex];\n return (\n
    } {...props}>\n \n \n \n {children}\n \n \n
    \n
    \n );\n }\n);\n","import { vars } from 'src/core/themes';\nimport { ArrowDownIcon, ArrowUpIcon } from 'src/svgs/Viagogo';\n\nimport * as styles from './SortButton.css';\nimport {\n ArrowType,\n getNextSortStatus,\n SortButtonProps,\n SortStatus,\n} from './SortButton.utils';\n\ntype GetIconClass = (\n arrow: ArrowType,\n disabled: boolean,\n status: SortStatus\n) => string;\nconst getIconClass: GetIconClass = (arrow, disabled, status) => {\n if (!disabled) {\n // If asc order, up arrow is active state\n if (status === SortStatus.ASC && arrow === ArrowType.UP) {\n return styles.sortActive;\n }\n\n // If desc order, down arrow is active state\n if (status === SortStatus.DESC && arrow === ArrowType.DOWN) {\n return styles.sortActive;\n }\n }\n\n return styles.sortInactive;\n};\n\nexport function SortButton({\n onClick,\n sortStatus,\n disabled = false,\n allowUnsorted = true,\n}: SortButtonProps) {\n const upArrowClass = getIconClass(ArrowType.UP, disabled, sortStatus);\n const downArrowClass = getIconClass(ArrowType.DOWN, disabled, sortStatus);\n\n return (\n {\n !disabled && onClick?.(getNextSortStatus(sortStatus, allowUnsorted));\n }}\n className={styles.sortIconContainer}\n >\n \n \n \n );\n}\n","import { useSiteTheme } from 'src/contexts/SiteTheme/SiteThemeContext';\nimport { Colors } from 'src/core/themes/constants/colors';\n\nimport { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport function TableSortingIcon({\n width,\n height,\n isActive,\n ...props\n}: PosIconProps & {\n isActive?: boolean;\n}) {\n const { isDarkMode } = useSiteTheme();\n const fill = isDarkMode\n ? isActive\n ? Colors.indigo600\n : Colors.neutral075\n : isActive\n ? Colors.indigo100\n : Colors.neutral500;\n\n const stroke = isDarkMode\n ? isActive\n ? Colors.neutral025\n : Colors.neutral100\n : isActive\n ? Colors.white\n : Colors.neutral100;\n\n return (\n \n \n \n \n );\n}\n","import clsx from 'clsx';\nimport { vars } from 'src/core/themes';\nimport { TableSortingIcon } from 'src/svgs/TableSortingIcon';\n\nimport * as styles from './SortButton.css';\nimport {\n getNextSortStatus,\n SortButtonProps,\n SortStatus,\n} from './SortButton.utils';\n\nexport function SortButtonV2({\n onClick,\n sortStatus,\n disabled = false,\n allowUnsorted = true,\n}: SortButtonProps) {\n return (\n {\n !disabled && onClick?.(getNextSortStatus(sortStatus, allowUnsorted));\n }}\n className={styles.sortIconContainerV2}\n >\n \n \n );\n}\n","import { useSiteTheme } from 'src/contexts/SiteTheme/SiteThemeContext';\nimport { Colors } from 'src/core/themes/constants/colors';\n\nimport { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport function TableFilterIcon({\n width,\n height,\n isActive,\n ...props\n}: PosIconProps & {\n isActive?: boolean;\n}) {\n const { isDarkMode } = useSiteTheme();\n\n const fill = isDarkMode\n ? isActive\n ? Colors.indigo600\n : Colors.neutral075\n : isActive\n ? Colors.indigo100\n : Colors.neutral500;\n\n const stroke = isDarkMode\n ? isActive\n ? Colors.neutral025\n : Colors.neutral100\n : isActive\n ? Colors.white\n : Colors.neutral100;\n return (\n \n \n \n \n \n \n );\n}\n","import { useState } from 'react';\nimport { vars } from 'src/core/themes';\nimport { TableFilterIcon } from 'src/svgs/TableFilterIcon';\n\nexport function ColumnFilterButton({ isActive }: { isActive?: boolean }) {\n const [isPressed, setIsPressed] = useState(false);\n\n return (\n setIsPressed(true)}\n onMouseUp={() => {\n setIsPressed(false);\n }}\n />\n );\n}\n","import { Header } from '@tanstack/react-table';\nimport type { Table } from '@tanstack/table-core';\nimport { useCallback, useEffect, useMemo } from 'react';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { ListingNote, Seating } from 'src/WebApiController';\n\nexport const useColumnFilter = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n table: Table,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n header: Header\n) => {\n const canColumnFilter = header.column.getCanFilter();\n const columnFilterVariant = header.column.columnDef.meta?.columnFilterVariant;\n const uniqueValueVariant = header.column.columnDef.meta?.uniqueValueVariant;\n\n const canMultiSelect = columnFilterVariant == null;\n\n const { setSelectionMode, selectionMode } = useMultiSelectionContext();\n\n const tableFlatRows = table.getCoreRowModel().flatRows;\n\n // Values from PosSelect have to be string - so if comparing against number values we need weak equality\n const columnFilterOptionsContent = useMemo(() => {\n if (!canColumnFilter || !canMultiSelect) {\n // No need to calculate anything here\n return {};\n }\n\n let uniqueValues: [string, string][] = [];\n\n if (uniqueValueVariant == 'seatingSection') {\n const values = new Set();\n tableFlatRows.forEach((row) => {\n // If the row has subrows, skip\n if (row.getLeafRows().length == 0) {\n const value = row.getValue(header.column.id);\n if (value) {\n const { seating } = value as { seating: Seating };\n if (seating) {\n values.add(seating.section);\n }\n }\n }\n });\n uniqueValues = Array.from(values).map((value) => [value, value]);\n } else if (uniqueValueVariant == 'seatTraits') {\n const values: ListingNote[] = [];\n tableFlatRows.forEach((row) => {\n // If the row has subrows, skip\n if (row.getLeafRows().length == 0) {\n const value = row.getValue(header.column.id);\n if (value) {\n const listingNotes = value as ListingNote[] | null | undefined;\n if (listingNotes) {\n listingNotes.forEach((note) => {\n if (\n !values.some((v) => v.listingNoteId === note.listingNoteId)\n ) {\n values.push(note);\n }\n });\n }\n }\n }\n });\n uniqueValues = values.map((value) => [\n value.listingNoteId.toString(),\n value.listingNoteText,\n ]);\n } else {\n const values: string[] = [];\n tableFlatRows.forEach((row) => {\n // If the row has subrows, skip\n if (row.getLeafRows().length == 0) {\n const value = row.getValue(header.column.id);\n if (\n value &&\n values.every(\n (v) =>\n v.toLocaleLowerCase() !== value.toString().toLocaleLowerCase()\n )\n ) {\n values.push(value.toString());\n }\n }\n });\n\n uniqueValues = values\n .filter((value) => !!value?.trim())\n .map((value) => [value, value]);\n }\n\n return uniqueValues.reduce(\n (acc, value) => {\n if (value) {\n acc[value[0]] = value[1];\n }\n return acc;\n },\n {} as Record\n );\n }, [\n canColumnFilter,\n canMultiSelect,\n header.column,\n tableFlatRows,\n uniqueValueVariant,\n ]);\n\n const filterValue = header.column.getFilterValue();\n\n const isColumnFilterActive = useMemo(() => {\n if (!filterValue) {\n return false;\n }\n\n if (canMultiSelect) {\n return !!(filterValue as unknown[]).length;\n } else {\n return (\n (filterValue as [number, number])?.[0] != null ||\n (filterValue as [number, number])?.[1] != null\n );\n }\n }, [canMultiSelect, filterValue]);\n\n const setFilterValueWrapper = useCallback(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (updater: any) => {\n // Clear the selection\n setSelectionMode(selectionMode);\n header.column.setFilterValue(updater);\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [header.column]\n );\n\n // Consolidate filter value to undefined - no need to keep invalid values like [null, null]\n // Makes it easy for any potential consumers to check if the filter is active on a table level\n useEffect(() => {\n if (!isColumnFilterActive && filterValue != null) {\n header.column.setFilterValue(undefined);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [filterValue, isColumnFilterActive]);\n\n return {\n columnFilterOptionsContent,\n canMultiSelect,\n isColumnFilterActive,\n setColumnFilterValue: setFilterValueWrapper,\n filterValue,\n };\n};\n","import { Content, useContent } from 'src/contexts/ContentContext';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { Button, Popover, Stack } from 'src/core/ui';\nimport { CrossIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport * as styles from './ColumnHeader.css';\n\nexport const ColumnRangeFilterInput = ({\n filterValue,\n setFilterValue,\n}: {\n filterValue: [number | undefined, number | undefined] | undefined;\n setFilterValue: (\n value: [number | undefined, number | undefined] | undefined\n ) => void;\n}) => {\n const hasFilterValue = filterValue?.[0] != null || filterValue?.[1] != null;\n const minText = useContent(ContentId.Min);\n const maxText = useContent(ContentId.Max);\n\n return (\n e.stopPropagation()}\n >\n \n {\n const v = parseInt(e.target.value);\n const oldValue = filterValue;\n\n const newMinValue = e.target.value ? v : undefined;\n const newMaxValue =\n oldValue?.[1] != null\n ? e.target.value\n ? Math.max(v, oldValue[1])\n : oldValue[1]\n : undefined;\n\n setFilterValue([newMinValue, newMaxValue]);\n }}\n placeholder={minText}\n onClick={(e) => e.stopPropagation()}\n />\n {\n const v = parseInt(e.target.value);\n\n const newMaxValue = e.target.value ? v : undefined;\n const newMinValue =\n filterValue?.[0] != null\n ? e.target.value\n ? Math.min(v, filterValue[0])\n : filterValue[0]\n : undefined;\n\n setFilterValue([newMinValue, newMaxValue]);\n }}\n placeholder={maxText}\n onClick={(e) => e.stopPropagation()}\n />\n \n\n \n {\n setFilterValue(undefined);\n }}\n disabled={!hasFilterValue}\n >\n \n \n\n \n \n \n \n \n );\n};\n","import { PosMultiSelect } from 'src/core/POS/PosMultiSelect';\nimport { TooltipPopover } from 'src/core/ui';\nimport { ColumnFilterButton } from 'src/core/ui/ColumnFilterButton';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { useColumnFilter } from '../hooks/useColumnFilter';\nimport { TableHeaderProps } from './ColumnHeader.types';\nimport { ColumnRangeFilterInput } from './ColumnRangeFilterInput';\n\nexport const ColumnHeaderFilter = ({ table, header }: TableHeaderProps) => {\n const {\n isColumnFilterActive,\n columnFilterOptionsContent,\n canMultiSelect,\n filterValue,\n setColumnFilterValue,\n } = useColumnFilter(table, header);\n\n return (\n <>\n {canMultiSelect ? (\n setColumnFilterValue(values)}\n onClick={(e) => e.stopPropagation()}\n enableEmptySelection\n valueOptionsContent={columnFilterOptionsContent}\n showSelectedOptionsFirst\n childrenAsTrigger\n placeholderText={ContentId.All}\n searchable={Object.keys(columnFilterOptionsContent).length > 10}\n >\n \n \n ) : (\n \n }\n >\n \n \n )}\n \n );\n};\n","import { flexRender } from '@tanstack/react-table';\nimport clsx from 'clsx';\nimport React, { useRef, useState } from 'react';\nimport { useColumnResizingContext } from 'src/contexts/ColumnResizingContext/ColumnResizingContext';\nimport { vars } from 'src/core/themes';\nimport { SortButton, SortButtonV2 } from 'src/core/ui/SortButton';\nimport { SortStatus } from 'src/core/ui/SortButton/SortButton.utils';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { pinnedCell } from 'src/tables/Table/components/TableTd.css';\nimport { PinnedCellGradient } from 'src/tables/Table/TableCells/PinnedCellGradient';\nimport { Feature } from 'src/WebApiController';\nimport styled from 'styled-components/macro';\n\nimport { getCommonPinningStyles } from '../Table.utils';\nimport * as styles from './ColumnHeader.css';\nimport { resizerWidth } from './ColumnHeader.css';\nimport { TableHeaderProps } from './ColumnHeader.types';\nimport { ColumnHeaderFilter } from './ColumnHeaderFilter';\n\nfunction getSortStatus(canSort: boolean, sortOrder: string | boolean) {\n if (!canSort || !sortOrder) {\n return SortStatus.UNSORTED;\n }\n\n return sortOrder === 'asc' ? SortStatus.ASC : SortStatus.DESC;\n}\n\nexport const ColumnHeader = ({ table, header, style }: TableHeaderProps) => {\n const headerRef = useRef(null);\n const canSort = header.column.getCanSort();\n const canColumnFilter = header.column.getCanFilter();\n const sortStatus = getSortStatus(canSort, header.column.getIsSorted());\n const isLargeDesktop = useMatchMedia('largeDesktop');\n const { isResizeEnabled } = useColumnResizingContext();\n const isColumnSorted = Boolean(header.column.getIsSorted());\n const isPinned = header.column.getIsPinned();\n const hasCleanupWhiteSpaceFeature = useUserHasFeature(\n Feature.CleanupWhiteSpace\n );\n const hasTableColumnFilterFeature = useUserHasFeature(\n Feature.TableColumnFilter\n );\n const [isHovered, setIsHovered] = useState(false);\n\n const showSortIcon =\n (hasTableColumnFilterFeature && isHovered) || isColumnSorted;\n\n return (\n setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n {...{\n onClick: () => {\n if (canSort) {\n header.column.toggleSorting();\n }\n\n const canGroup = !!header.column.columnDef.getGroupingValue;\n\n if (!canGroup || header.column.getIsGrouped()) {\n return;\n }\n\n // If it's already grouped by this column, then return;\n if (table.getState().grouping?.includes(header.column.id)) {\n return;\n }\n\n // Reset grouping state to group by the new column\n table.resetGrouping();\n\n // toggle grouping\n header.column.toggleGrouping();\n },\n }}\n {...(canSort ? { cursor: 'pointer' } : {})}\n {...{\n paddingLeft: isLargeDesktop\n ? header.column.columnDef.meta?.paddingLeftLargeDesktop\n : header.column.columnDef.meta?.paddingLeft,\n // This is needed for text overflow to work\n width: header.getSize(),\n minWidth: isResizeEnabled\n ? header.getSize()\n : header.column.columnDef.minSize,\n maxWidth: isResizeEnabled\n ? header.getSize()\n : header.column.columnDef.maxSize,\n styleOverrides: {\n ...getCommonPinningStyles(header.column),\n ...header.column.columnDef.meta?.styleOverrides,\n },\n }}\n {...style}\n >\n {isPinned && (\n \n )}\n \n \n {flexRender(header.column.columnDef.header, header.getContext())}\n \n \n\n {hasTableColumnFilterFeature ? (\n \n {canColumnFilter && (\n \n )}\n {canSort && (\n \n \n \n )}\n \n ) : (\n <>\n {canSort && (\n \n \n \n )}\n \n )}\n\n {isResizeEnabled && header.column.getCanResize() ? (\n e.stopPropagation(),\n onMouseDown: header.getResizeHandler(),\n onTouchStart: header.getResizeHandler(),\n className: `${styles.resizer} ${\n header.column.getIsResizing() ? styles.resizing : ''\n }`,\n }}\n />\n ) : null}\n \n );\n};\n\nconst HeaderActionWrapper = styled.div<{\n hasCleanupWhiteSpaceFeature: boolean;\n}>`\n right: ${({ hasCleanupWhiteSpaceFeature }) =>\n hasCleanupWhiteSpaceFeature ? 0 : resizerWidth};\n top: 0;\n height: 100%;\n padding: 0 2px;\n position: absolute;\n display: flex;\n flex-direction: row;\n`;\n\nconst IconWrapperV2 = styled.span<{\n showSortIcon: boolean;\n}>`\n height: 100%;\n padding: 0 2px;\n ${({ showSortIcon }) => ({\n display: showSortIcon ? 'flex' : 'none',\n alignItems: 'center',\n })};\n\n > div {\n height: 18px;\n }\n`;\n\nconst IconWrapper = styled.span<{\n showSortIcon: boolean;\n hasCleanupWhiteSpaceFeature: boolean;\n}>`\n right: ${({ hasCleanupWhiteSpaceFeature }) =>\n hasCleanupWhiteSpaceFeature ? 0 : resizerWidth};\n top: 0;\n height: 100%;\n padding: 0 2px;\n position: absolute;\n ${({ showSortIcon }) => ({\n display: showSortIcon ? 'flex' : 'none',\n alignItems: 'center',\n })};\n\n > div {\n height: 18px;\n }\n`;\n\nconst ColumnHeaderTh = styled.th.attrs(\n (props: {\n paddingLeft?: string;\n paddingTop?: string;\n paddingBottom?: string;\n fontSize?: string;\n fontWeight?: number;\n width?: number;\n minWidth?: number;\n maxWidth?: number;\n cursor?: string;\n styleOverrides?: React.CSSProperties;\n }) => ({\n style: {\n paddingLeft: props.paddingLeft?.toString(),\n paddingTop: props.paddingTop?.toString(),\n paddingBottom: props.paddingBottom?.toString(),\n fontSize: props.fontSize?.toString(),\n fontWeight: props.fontWeight?.toString(),\n width: props.width ? `${props.width}px` : 'auto',\n minWidth: props.minWidth ? `${props.minWidth}px` : 'auto',\n maxWidth: props.maxWidth ? `${props.maxWidth}px` : 'auto',\n cursor: props.cursor,\n ...props.styleOverrides,\n },\n })\n)<{ isSorted: boolean; hasCleanupWhiteSpaceFeature: boolean }>`\n user-select: none;\n position: ${({ hasCleanupWhiteSpaceFeature }) =>\n hasCleanupWhiteSpaceFeature ? 'relative' : 'static'};\n &:hover ${IconWrapper} {\n display: flex;\n align-items: center;\n background-color: ${vars.color.backgroundSecondary};\n }\n`;\n\nconst LabelWrapper = styled.span<{\n showSortIcon: boolean;\n showFilterIcon: boolean;\n hasCleanupWhiteSpaceFeature: boolean;\n}>`\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n padding-right: ${({\n hasCleanupWhiteSpaceFeature,\n showSortIcon,\n showFilterIcon,\n }) =>\n hasCleanupWhiteSpaceFeature\n ? '0px'\n : showSortIcon && showFilterIcon\n ? '26px'\n : '12px'};\n`;\n\nconst HeaderContentWrapper = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n","import { Table } from '@tanstack/react-table';\nimport {\n ChangeEvent,\n MutableRefObject,\n useLayoutEffect,\n useRef,\n useState,\n} from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Button } from 'src/core/ui';\nimport { PosTablePaginationFooterHeight } from 'src/tables/Table';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport styled from 'styled-components/macro';\n\nimport * as styles from './PaginationFooter.css';\n\ntype PaginationFooterProps = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n table: Table;\n tableWrapperRef: MutableRefObject;\n showPageSizeOptions?: boolean;\n};\n\nconst PAGE_SIZE_OPTIONS = [10, 25, 50, 100, 250, 500];\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const PaginationFooter = ({\n table,\n tableWrapperRef,\n showPageSizeOptions,\n}: PaginationFooterProps) => {\n const paginationWrapperRef = useRef(null);\n const [isPageIndexEmpty, setIsPageIndexEmpty] = useState(false);\n const previousPageSize = table.options.state.pagination?.pageSize ?? 10;\n\n const onPaginationChange = (e: ChangeEvent) => {\n const pageSize = parseInt(e.currentTarget.value);\n if (!pageSize) return;\n table.setPageSize(() => pageSize);\n };\n\n const displayedPageCountOptions = PAGE_SIZE_OPTIONS.includes(previousPageSize)\n ? PAGE_SIZE_OPTIONS\n : [...PAGE_SIZE_OPTIONS, previousPageSize].toSorted((a, b) => a - b);\n\n const footerHeight = paginationWrapperRef.current?.offsetHeight ?? 0;\n useLayoutEffect(() => {\n tableWrapperRef.current?.style.setProperty(\n PosTablePaginationFooterHeight,\n `${footerHeight}px`\n );\n }, [tableWrapperRef, footerHeight]);\n\n return (\n \n {showPageSizeOptions ? (\n
    \n \n :\n \n \n {displayedPageCountOptions.map((value) => (\n \n ))}\n \n
    \n ) : null}\n
    \n table.setPageIndex(0)}\n disabled={!table.getCanPreviousPage()}\n >\n {'<<'}\n \n table.previousPage()}\n disabled={!table.getCanPreviousPage()}\n >\n {'<'}\n \n
    \n {\n const val = e.target?.value;\n if (val === '') {\n setIsPageIndexEmpty(true);\n return;\n } else {\n setIsPageIndexEmpty(false);\n }\n const page = val ? Number(val) - 1 : 0;\n table.setPageIndex(page);\n }}\n />\n \n of {table.getPageCount()}\n \n
    \n table.nextPage()}\n disabled={!table.getCanNextPage()}\n >\n {'>'}\n \n table.setPageIndex(table.getPageCount() - 1)}\n disabled={!table.getCanNextPage()}\n >\n {'>>'}\n \n
    \n
    \n );\n};\n\nconst Pagination = styled.div`\n position: sticky;\n left: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n ${({\n theme: {\n typography: { size },\n },\n }) => size(1)};\n background: ${(props) => props.theme.colors.backgroundSecondary};\n`;\n","import { forwardRef, useMemo } from 'react';\nimport { Components } from 'react-virtuoso';\nimport { ColumnHeader } from 'src/tables/Table/components';\nimport { PosGroupedVirtuosoContext } from 'src/tables/Table/GroupedVirtuosoTable/PosGroupedVirtuosoContext';\nimport * as styles from 'src/tables/Table/Table.css';\n\nimport { PosTableData } from '../Table';\n\ntype C = Components<\n any,\n PosGroupedVirtuosoContext\n>['List'];\n\nexport const PosGroupedVirtuosoList: Components['List'] = forwardRef(\n function GroupedVirtuosoList({ context, children, ...props }, ref) {\n const { table } = context! as PosGroupedVirtuosoContext;\n const headerGroups = table.getHeaderGroups();\n\n const tableHeaderCmp = useMemo(() => {\n return (\n \n \n {headerGroups.map((headerGroup) => (\n \n {headerGroup.headers.map((header) => (\n \n ))}\n \n ))}\n \n
    \n );\n }, [headerGroups, table]);\n\n return (\n
    \n
    {tableHeaderCmp}
    \n {children}\n
    \n );\n }\n);\n","import { forwardRef } from 'react';\nimport { Components } from 'react-virtuoso';\nimport { scrollerWrapper } from 'src/tables/Table/GroupedVirtuosoTable/PosGroupedVirtuosoTable.css';\n\nexport const PosGroupedVirtuosoScroller: Components['Scroller'] = forwardRef(\n function GroupedVirtuosoScroller({ context, children, ...props }, ref) {\n return (\n
    \n
    \n {children}\n
    \n
    \n );\n }\n);\n","import { Row, Table as ReactTable } from '@tanstack/react-table';\nimport { useMemo } from 'react';\nimport { PosTableData } from 'src/tables/Table';\n\ninterface UseGetVirtuosoDataProps {\n table: ReactTable;\n}\n\ninterface VirtuosoGroupData {\n allSingleRows: Row[]; // No grouped rows, just single rows with data\n rowHeaderGroups: Row[]; // Just grouped rows\n\n // Array of numbers where each number represents the amount of rows\n // in a group\n groupCounts: number[];\n}\n\nexport const useGetVirtuosoGroups = ({\n table,\n}: UseGetVirtuosoDataProps) => {\n // Only use it for getting the arrays of single rows and\n // the array of header rows\n const groupedTableRows = table.getRowModel().rows;\n\n return useMemo>(() => {\n const rowGroups: Row[][] = [];\n const rowHeaderGroups: Row[] = [];\n const groupCounts: number[] = [];\n\n // Use it for accessing current rendering single row\n const allSingleRows: Row[] = [];\n\n const map: Record[]> = {};\n for (const row of groupedTableRows) {\n // id: grouping row ID (when it's parent, parentId is undefined)\n // parentId: single row parent ID\n const { id, parentId, groupingValue } = row;\n\n const groupingId = parentId || id;\n map[groupingId] = map[groupingId] || [];\n const localRowGroups: Row[] = map[groupingId];\n\n const isSingleRow = !row.getIsGrouped();\n\n // Only keep\n if (isSingleRow) {\n localRowGroups.push(row);\n allSingleRows.push(row);\n } else {\n rowHeaderGroups.push(row);\n }\n\n if (!rowGroups.includes(localRowGroups)) {\n rowGroups.push(localRowGroups);\n }\n }\n\n for (const group of rowGroups) {\n groupCounts.push(group.length);\n }\n\n return { groupCounts, rowHeaderGroups, allSingleRows };\n }, [groupedTableRows]);\n};\n","import { Row } from '@tanstack/react-table';\nimport clsx from 'clsx';\nimport { MutableRefObject, ReactNode, useCallback, useMemo } from 'react';\nimport { GroupedVirtuoso, ListItem } from 'react-virtuoso';\nimport { PageSection } from 'src/components/common/PageSection';\nimport { useColumnResizingContext } from 'src/contexts/ColumnResizingContext/ColumnResizingContext';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { TableTd } from 'src/tables/Table/components/TableTd';\nimport { PosGroupedVirtuosoContext } from 'src/tables/Table/GroupedVirtuosoTable/PosGroupedVirtuosoContext';\nimport { PosGroupedVirtuosoGroup } from 'src/tables/Table/GroupedVirtuosoTable/PosGroupedVirtuosoGroup';\nimport { PosGroupedVirtuosoItem } from 'src/tables/Table/GroupedVirtuosoTable/PosGroupedVirtuosoItem';\nimport { PosGroupedVirtuosoList } from 'src/tables/Table/GroupedVirtuosoTable/PosGroupedVirtuosoList';\nimport { PosGroupedVirtuosoScroller } from 'src/tables/Table/GroupedVirtuosoTable/PosGroupedVirtuosoScroller';\nimport { groupedVirtuosoWrapper } from 'src/tables/Table/GroupedVirtuosoTable/PosGroupedVirtuosoTable.css';\nimport { useGetVirtuosoGroups } from 'src/tables/Table/GroupedVirtuosoTable/useGetVirtuosoGroups';\nimport {\n cellNoWrapStyle,\n groupRow,\n groupRowFirstCell,\n groupValue,\n} from 'src/tables/Table/GroupRow.css';\n\nimport { PosTableData } from '../Table';\n\ninterface GroupedVirtuosoTableProps {\n context: PosGroupedVirtuosoContext;\n renderRowContent: (row: Row) => ReactNode;\n scrollRef?: MutableRefObject;\n itemsRendered?: (rows: Row[]) => void;\n}\n\nconst groupedVirtuosoComponents = {\n List: PosGroupedVirtuosoList,\n Group: PosGroupedVirtuosoGroup,\n Item: PosGroupedVirtuosoItem,\n Scroller: PosGroupedVirtuosoScroller,\n};\n\nexport const PosGroupedVirtuosoTable = ({\n context,\n renderRowContent,\n scrollRef,\n itemsRendered,\n}: GroupedVirtuosoTableProps) => {\n const { table } = context;\n const isGrouping = table.getState().grouping.length > 0;\n const isLargeDesktop = useMatchMedia('largeDesktop');\n const { isResizeEnabled } = useColumnResizingContext();\n\n const { groupCounts, rowHeaderGroups, allSingleRows } = useGetVirtuosoGroups({\n table,\n });\n\n const groupedContext = useMemo>(\n () => ({\n ...context,\n tableRows: allSingleRows,\n }),\n [allSingleRows, context]\n );\n\n const groupContentRenderer = useCallback(\n (groupIndex: number) => {\n const rowsGroup: Row = rowHeaderGroups[groupIndex];\n\n // Used when there is no grouping applied\n if (!rowHeaderGroups.length) {\n return ;\n }\n\n return (\n <>\n {rowsGroup.getVisibleCells().map((cell, index) => {\n const isFirstCell = index === 0;\n return (\n \n \n {isFirstCell ? (\n \n {rowsGroup.groupingValue as string}\n \n ) : null}\n \n \n );\n })}\n \n );\n },\n [isGrouping, isLargeDesktop, isResizeEnabled, rowHeaderGroups]\n );\n\n const itemContentRenderer = useCallback(\n (globalIndex: number) => {\n return renderRowContent(allSingleRows[globalIndex]);\n },\n [allSingleRows, renderRowContent]\n );\n\n const setScrollerRef = useCallback(\n (el: unknown) => {\n if (el instanceof HTMLElement && scrollRef) {\n scrollRef.current = el;\n }\n },\n [scrollRef]\n );\n\n const onItemsRendered = useCallback(\n (items: ListItem[]) => {\n if (!itemsRendered) return;\n const renderedRows = items\n .map(({ index }) =>\n allSingleRows.length > index ? allSingleRows[index] : null\n )\n .filter((row: Row | null): row is Row => row != null);\n itemsRendered(renderedRows);\n },\n [allSingleRows, itemsRendered]\n );\n\n return (\n \n );\n};\n","import { Cell, Header, Row, Table as ReactTable } from '@tanstack/react-table';\nimport { useVirtualizer } from '@tanstack/react-virtual';\nimport { ReactNode, useCallback } from 'react';\n\nexport const useColumnVirtualizer = (\n table: ReactTable,\n scrollRef: React.MutableRefObject,\n renderColumnHeader: (header: Header) => ReactNode,\n renderCell: (cell: Cell) => ReactNode\n) => {\n const visibleColumns = table.getVisibleFlatColumns();\n\n //we are using a slightly different virtualization strategy for columns (compared to virtual rows) in order to support dynamic row heights\n const columnVirtualizer = useVirtualizer({\n count: visibleColumns.length,\n estimateSize: (index) => visibleColumns[index].getSize(), //estimate width of each column for accurate scrollbar dragging\n getScrollElement: () => scrollRef.current,\n horizontal: true,\n overscan: 3, //how many columns to render on each side off screen each way (adjust this for performance)\n });\n\n const virtualColumns = columnVirtualizer.getVirtualItems();\n\n //different virtualization strategy for columns - instead of absolute and translateY, we add empty columns to the left and right\n let virtualPaddingLeft: number | undefined;\n let virtualPaddingRight: number | undefined;\n\n if (columnVirtualizer && virtualColumns?.length) {\n virtualPaddingLeft = virtualColumns[0]?.start ?? 0;\n virtualPaddingRight =\n columnVirtualizer.getTotalSize() -\n (virtualColumns[virtualColumns.length - 1]?.end ?? 0);\n }\n\n const renderHeaderRow = useCallback(() => {\n const headerGroups = table.getHeaderGroups();\n\n return (\n <>\n {headerGroups.map((headerGroup) => (\n <>\n {virtualPaddingLeft ? (\n //fake empty column to the left for virtualization scroll padding\n \n ) : null}\n {virtualColumns.map((vc) => {\n const header = headerGroup.headers[vc.index];\n return header.column.getIsPinned()\n ? null\n : renderColumnHeader(header); // we alway render the pinned columns as below\n })}\n {virtualPaddingRight ? (\n //fake empty column to the right for virtualization scroll padding\n \n ) : null}\n {headerGroup.headers\n .filter((h) => h.column.getIsPinned())\n .map((h) => renderColumnHeader(h))}\n \n ))}\n \n );\n }, [\n renderColumnHeader,\n table,\n virtualColumns,\n virtualPaddingLeft,\n virtualPaddingRight,\n ]);\n\n const renderRowContent = useCallback(\n (row: Row) => {\n const visibleCells = row.getVisibleCells();\n return (\n <>\n {virtualPaddingLeft ? (\n //fake empty column to the left for virtualization scroll padding\n \n ) : null}\n {virtualColumns.map((vc) => {\n const cell = visibleCells[vc.index];\n return cell.column.getIsPinned() ? null : renderCell(cell); // we alway render the pinned columns as below\n })}\n {virtualPaddingRight ? (\n //fake empty column to the right for virtualization scroll padding\n \n ) : null}\n {visibleCells\n .filter((c) => c.column.getIsPinned())\n .map((c) => renderCell(c))}\n \n );\n },\n [renderCell, virtualColumns, virtualPaddingLeft, virtualPaddingRight]\n );\n\n return { renderHeaderRow, renderRowContent };\n};\n","import { RowData } from '@tanstack/react-table';\nimport { PosVirtuosoTableProps } from 'src/tables/Table/PosVirtuosoTableComponent/PosVirtuosoTableContext';\nimport * as styles from 'src/tables/Table/Table.css';\n\nexport const PosVirtuosoTable = ({\n children,\n context,\n ...props\n}: PosVirtuosoTableProps) => (\n \n {children}\n \n);\n","import { RowData } from '@tanstack/react-table';\nimport { clsx } from 'clsx';\nimport { PosVirtuosoTableProps } from 'src/tables/Table/PosVirtuosoTableComponent/PosVirtuosoTableContext';\nimport { PosTableFooterSticky } from 'src/tables/Table/Table.css';\n\nexport const PosVirtuosoTableFooter = ({\n children,\n context,\n}: PosVirtuosoTableProps) => (\n \n {children}\n \n);\n","import { RowData } from '@tanstack/react-table';\nimport { PosVirtuosoTableProps } from 'src/tables/Table/PosVirtuosoTableComponent/PosVirtuosoTableContext';\nimport * as styles from 'src/tables/Table/Table.css';\n\nexport const PosVirtuosoTableHead = ({\n children,\n context,\n}: PosVirtuosoTableProps) => (\n \n {children}\n \n);\n","import { Row, RowData, Table as ReactTable } from '@tanstack/react-table';\nimport { isEmpty, min, size, uniq } from 'lodash-es';\nimport { useCallback } from 'react';\nimport { useHotkeys } from 'react-hotkeys-hook';\nimport { useBulkEditHubContext } from 'src/contexts/BulkEditHubContext';\nimport { useGenericDialogContext } from 'src/contexts/GenericDialogContext/GenericDialogContext';\n\nimport { PosTableData } from './Table';\n\nexport const useTableHotkeys = (\n enabled: boolean,\n table: ReactTable,\n onRowSelection?: (row: Row) => void\n) => {\n const { mainDialogOpened } = useBulkEditHubContext();\n const { isDialogOpen } = useGenericDialogContext();\n const selectRow = useCallback(\n (id: number) => {\n table.setRowSelection((prev) => {\n for (const key in prev) {\n prev[key] = false;\n }\n return {\n ...prev,\n [id]: true,\n };\n });\n },\n [table]\n );\n const onArrowUp = useCallback(() => {\n if (!enabled || mainDialogOpened || isDialogOpen) {\n return;\n }\n const { rowsById } = table.getSelectedRowModel();\n const { rows } = table.getRowModel();\n const selectedRows = Object.values(rowsById);\n\n // Select the last row when no selection\n if (isEmpty(selectedRows) && size(rows) > 0) {\n selectRow(parseInt(rows[rows.length - 1].id));\n return;\n }\n\n const parent = getParentRow(selectedRows);\n if (parent) {\n const sanitizedId = parseInt(parent.id);\n selectRow(sanitizedId);\n return;\n }\n\n const selectedIds = selectedRows.map((row) => row.id);\n let minIndex = Number.MAX_VALUE;\n rows.forEach((row, index) => {\n if (selectedIds.includes(row.id)) {\n minIndex = Math.min(index, minIndex);\n }\n });\n\n if (minIndex > 0) {\n const sanitizedId = parseInt(rows[minIndex - 1].id);\n selectRow(sanitizedId);\n }\n }, [enabled, isDialogOpen, mainDialogOpened, selectRow, table]);\n\n const onArrowDown = useCallback(\n (event: KeyboardEvent) => {\n event.preventDefault();\n if (!enabled || mainDialogOpened || isDialogOpen) {\n return;\n }\n const { rowsById } = table.getSelectedRowModel();\n const { rows } = table.getRowModel();\n const selectedRows = Object.values(rowsById);\n\n // Select the frist row when no selection\n if (isEmpty(selectedRows) && size(rows) > 0) {\n selectRow(parseInt(rows[0].id));\n return;\n }\n\n const parent = getParentRow(selectedRows);\n if (parent) {\n const sanitizedId = parseInt(parent.id);\n selectRow(sanitizedId);\n return;\n }\n\n const selectedIds = selectedRows.map((row) => row.id);\n let maxIndex = Number.MIN_VALUE;\n rows.forEach((row, index) => {\n if (selectedIds.includes(row.id)) {\n maxIndex = Math.max(index, maxIndex);\n }\n });\n\n if (maxIndex + 1 < rows.length) {\n const sanitizedId = parseInt(rows[maxIndex + 1].id);\n selectRow(sanitizedId);\n }\n },\n [enabled, isDialogOpen, mainDialogOpened, selectRow, table]\n );\n\n const onEnter = useCallback(\n (event: KeyboardEvent) => {\n event.preventDefault();\n if (!enabled || mainDialogOpened || isDialogOpen) {\n return;\n }\n const { rowsById } = table.getSelectedRowModel();\n const selectedRows = Object.values(rowsById);\n\n if (isEmpty(selectedRows)) {\n return;\n }\n const parent = getParentRow(selectedRows);\n if (parent) {\n parent.toggleExpanded(!parent.getIsExpanded());\n return;\n }\n\n const row = selectedRows[0];\n if (!isEmpty(row.subRows)) {\n row.toggleExpanded(!row.getIsExpanded());\n } else {\n onRowSelection && onRowSelection(row);\n }\n },\n [enabled, isDialogOpen, mainDialogOpened, onRowSelection, table]\n );\n\n useHotkeys('down', onArrowDown, { keydown: true }, [onArrowDown]);\n useHotkeys('up', onArrowUp, { keydown: true }, [onArrowUp]);\n useHotkeys('enter', onEnter, { keydown: true }, [onEnter]);\n};\n\nconst getParentRow = (rows: Row[]) => {\n const depths = uniq(rows.map(({ depth }) => depth));\n if (depths.length === 1) {\n return null;\n }\n const parentDepth = min(depths);\n return rows.find((row) => row.depth === parentDepth);\n};\n","import {\n Cell,\n flexRender,\n getCoreRowModel,\n getExpandedRowModel,\n getFacetedUniqueValues,\n getFilteredRowModel,\n getGroupedRowModel,\n getPaginationRowModel,\n getSortedRowModel,\n Header,\n HeaderGroup,\n Row,\n RowData,\n SortingFn,\n Table as ReactTable,\n TableOptions,\n useReactTable,\n} from '@tanstack/react-table';\nimport { getFacetedRowModel } from '@tanstack/react-table';\nimport clsx from 'clsx';\nimport React, {\n ComponentType,\n CSSProperties,\n MutableRefObject,\n ReactNode,\n useCallback,\n useEffect,\n useRef,\n} from 'react';\nimport { useScroll } from 'react-use';\nimport { State } from 'react-use/lib/useScroll';\nimport { SizeFunction, TableVirtuoso } from 'react-virtuoso';\nimport { useActiveFocusContext } from 'src/contexts/ActiveFocusContext/ActiveFocusContext';\nimport { useColumnResizingContext } from 'src/contexts/ColumnResizingContext/ColumnResizingContext';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { FormatOptionEntries } from 'src/modals/EditTableColumns';\nimport { TableTd } from 'src/tables/Table/components/TableTd';\nimport { PosGroupedVirtuosoTable } from 'src/tables/Table/GroupedVirtuosoTable/PosGroupedVirtuosoTable';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport { Feature } from 'src/WebApiController';\n\nimport { ColumnHeader, PaginationFooter } from './components';\nimport { useColumnVirtualizer } from './hooks/useColumnVirtualizer';\nimport { PosVirtuosoTable } from './PosVirtuosoTableComponent/PosVirtuosoTable';\nimport { PosVirtuosoTableContext } from './PosVirtuosoTableComponent/PosVirtuosoTableContext';\nimport { PosVirtuosoTableFooter } from './PosVirtuosoTableComponent/PosVirtuosoTableFooter';\nimport { PosVirtuosoTableHead } from './PosVirtuosoTableComponent/PosVirtuosoTableHead';\nimport { PosVirtuosoTableRow } from './PosVirtuosoTableComponent/PosVirtuosoTableRow';\nimport * as styles from './Table.css';\nimport { useTableHotkeys } from './Table.hooks';\nimport { RowComponentWithRowData, RowWrapper } from './Table.types';\nimport { itemSizeDefault } from './Table.utils';\n\nconst virtuosoTableOverscan = { main: 500, reverse: 500 };\nconst virtuosoTableStyle = { width: '100%', height: '100%' };\nconst MIN_COLUMN_COUNT_TO_USE_VIRTUOSO = 20;\n\nexport interface VirtuosoScrollEvent {\n scrollState: State;\n element: HTMLElement;\n}\n\ndeclare module '@tanstack/table-core' {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface ColumnMeta {\n paddingLeft?: string;\n paddingLeftLargeDesktop?: string;\n styleOverrides?: React.CSSProperties;\n /**\n * If not specified, the default should handled as multi select\n * 'seatRange' needs to be used with filterSeatRangeFn from tableUtils.tsx as custom filter function\n */\n columnFilterVariant?: 'seatRange';\n /**\n * See filter functions defined in tableUtils.tsx for actual expected data shape\n *\n * 'seatingSection'\n * Cell value expected: { seating: Seating }\n * Filter function: filterSeatingSectionFn\n *\n * 'seatTraits'\n * Cell value expected: ListingNote[]\n * Filter function: filterSeatTraitsFn\n *\n */\n uniqueValueVariant?: 'seatingSection' | 'seatTraits';\n }\n\n interface TableMeta {\n summaryData?: TData | null | undefined;\n sectionType?: SectionType;\n rowSupportsAccordion?: boolean;\n formatOptionOverrides?: FormatOptionEntries;\n showSelectAllCheckbox?: boolean;\n }\n\n // Used to use sortingFns (custom sorting) in columnDef\n // (because it doesn't other strings but the table definition does)\n interface SortingFns {\n [key: string]: SortingFn;\n }\n}\n\ntype CustomTrProps = Omit<\n React.DetailedHTMLProps<\n React.HTMLAttributes,\n HTMLTableRowElement\n >,\n 'ref'\n>;\n\nexport type TableLayout = 'fixed' | 'auto';\n\nexport type PosTableData = RowData;\n\nexport type TableProps = {\n tableLayout?: TableLayout;\n options: Partial>;\n /**\n * Custom row wrapper to wrap row content *inside* tr element\n */\n rowWrapper?: RowWrapper;\n /**\n * Custom row component to render each row to *replace tr element* totally\n */\n RowComponent?: ComponentType>;\n style?: CSSProperties;\n tableStyle?: CSSProperties;\n tableHeadStyle?: CSSProperties;\n tableHeadCellStyle?: {\n paddingTop?: string | null;\n paddingBottom?: string | null;\n fontSize?: string | null;\n fontWeight?: number | null;\n };\n tableCellStyle?: CSSProperties;\n tableRowStyle?: CSSProperties;\n roundBorders?: boolean;\n showPageSizeOptions?: boolean;\n withOuterPadding?: boolean;\n className?: string;\n useVirtuoso?: boolean;\n onVirtuosoTableScroll?: (virtuosoScrollEvent: VirtuosoScrollEvent) => void;\n useStickyFooter?: boolean;\n virtuosoItemSize?: SizeFunction;\n resizeDisabled?: boolean;\n usePaginationFooter?: boolean;\n /**\n * Use this to enable column filters\n * Tanstack makes the default value true\n * But most our columns don't need it yet, so we make it false by default\n * If any column of a table needs it, it can be enabled by setting this prop to true\n */\n enableColumnFilters?: boolean;\n\n // Grouping\n useDataGrouping?: boolean;\n // Table hotkeys\n useTableNavKeys?: boolean;\n onRowSelect?: (row: Row) => void;\n onRowShiftSelect?: (\n tableRows: Row[] | undefined,\n row: Row,\n index: number\n ) => void;\n onVirtuosoEndReached?: (lastItemIndex?: number) => void;\n onFilteredRowsChange?: (filteredRows: Row[] | undefined) => void;\n footerEl?: ReactNode;\n itemsRendered?: (items: Row[]) => void;\n disableColumnVirtualization?: boolean;\n};\n\nexport const Table = ({\n tableLayout,\n options,\n rowWrapper,\n RowComponent,\n tableStyle,\n tableHeadStyle,\n tableHeadCellStyle,\n tableCellStyle,\n tableRowStyle,\n showPageSizeOptions,\n withOuterPadding,\n className,\n useVirtuoso,\n onVirtuosoTableScroll,\n useStickyFooter,\n virtuosoItemSize,\n resizeDisabled,\n usePaginationFooter = true,\n useDataGrouping,\n useTableNavKeys = false,\n onRowSelect,\n onRowShiftSelect,\n onVirtuosoEndReached,\n onFilteredRowsChange,\n footerEl,\n roundBorders,\n enableColumnFilters = false,\n itemsRendered,\n disableColumnVirtualization,\n}: TableProps) => {\n let rowIndex = 0;\n const isLargeDesktop = useMatchMedia('largeDesktop');\n const tableWrapperRef = useRef(null);\n const { isResizeEnabled, customColumnWidths, onColumnSizingChange } =\n useColumnResizingContext();\n const { activeItem, onKeyDownHandler } = useActiveFocusContext();\n\n const hasTableColumnFilterFeature = useUserHasFeature(\n Feature.TableColumnFilter\n );\n\n const table: ReactTable = useReactTable({\n autoResetPageIndex: false,\n enableColumnResizing: isResizeEnabled && !resizeDisabled,\n columnResizeMode: 'onChange',\n getCoreRowModel: getCoreRowModel(),\n getSortedRowModel: getSortedRowModel(),\n getGroupedRowModel: useDataGrouping ? getGroupedRowModel() : undefined,\n getExpandedRowModel: getExpandedRowModel(),\n getPaginationRowModel: usePaginationFooter ? getPaginationRowModel() : null,\n getFilteredRowModel: getFilteredRowModel(),\n getFacetedRowModel: options.getFacetedRowModel ?? getFacetedRowModel(),\n getFacetedUniqueValues:\n options.getFacetedUniqueValues ?? getFacetedUniqueValues(),\n onColumnSizingChange: onColumnSizingChange,\n // This is default turned on, but we want to turn it off in most cases\n enableRowSelection: false,\n // This is default turned on, but we want to turn it off in most cases\n enableMultiRowSelection: false,\n enableColumnFilters: hasTableColumnFilterFeature\n ? enableColumnFilters\n : false,\n filterFromLeafRows: hasTableColumnFilterFeature\n ? enableColumnFilters\n : false,\n filterFns: {},\n\n // Leave this in false to not reorder columns when grouping\n groupedColumnMode: false,\n ...options,\n state: {\n ...options.state,\n columnSizing: customColumnWidths ?? {},\n },\n } as TableOptions);\n\n const isGrouping = table.getState().grouping?.length > 0;\n const tableRows = table.getRowModel().rows;\n const footerRow = table.getFooterGroups();\n const hasFooterDef = footerRow.some((row: HeaderGroup) =>\n row.headers.some(\n (header: Header) => header.column.columnDef.footer != null\n )\n );\n\n // Listen to filtered rows change and trigger callback\n useEffect(() => {\n if (onFilteredRowsChange == null) return;\n\n const hasColumnFilterApplied = table\n .getAllColumns()\n .some((column) => column.getFilterValue() != null);\n\n // Make it undefined when no filter is applied\n const filteredRows = hasColumnFilterApplied\n ? table.getFilteredRowModel().flatRows\n : undefined;\n\n onFilteredRowsChange(filteredRows);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [table.getFilteredRowModel().flatRows]);\n\n useTableHotkeys(useTableNavKeys, table, onRowSelect);\n\n useEffect(() => {\n if (!activeItem) return;\n tableRows[activeItem.index]?.toggleSelected(\n Array.from(activeItem.id)[0] !== '-'\n );\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [tableRows, activeItem]);\n\n const scrollRef = useRef(null);\n const scrollState = useScroll(scrollRef);\n\n const renderRowCell = useCallback(\n (cell: Cell) => {\n return (\n \n {flexRender(cell.column.columnDef.cell, cell.getContext())}\n \n );\n },\n [isGrouping, isLargeDesktop, isResizeEnabled, tableCellStyle]\n );\n\n const renderRowContent = useCallback(\n (row: Row) => {\n return (\n <>\n {row.getVisibleCells().map((cell) => {\n return renderRowCell(cell);\n })}\n \n );\n },\n [renderRowCell]\n );\n\n const renderHeader = useCallback(\n (header: Header) => (\n \n ),\n [table, tableHeadCellStyle]\n );\n\n const { renderHeaderRow, renderRowContent: renderRowContentVirtualized } =\n useColumnVirtualizer(table, scrollRef, renderHeader, renderRowCell);\n\n useEffect(() => {\n if ((useVirtuoso || useDataGrouping) && scrollRef.current) {\n onVirtuosoTableScroll?.({\n scrollState,\n element: scrollRef.current,\n });\n }\n }, [onVirtuosoTableScroll, scrollState, useDataGrouping, useVirtuoso]);\n\n const useColumnVirtualization =\n useVirtuoso &&\n table.getVisibleLeafColumns().length >= MIN_COLUMN_COUNT_TO_USE_VIRTUOSO &&\n !disableColumnVirtualization;\n\n // We cannot used fixed layout if we're using column virtualization\n if (useColumnVirtualization) {\n tableLayout = 'auto';\n }\n\n return (\n \n {useDataGrouping ? (\n \n ) : useVirtuoso ? (\n , PosVirtuosoTableContext>\n style={virtuosoTableStyle}\n data={tableRows}\n overscan={virtuosoTableOverscan}\n context={{\n tableLayout,\n tableStyle,\n tableHeadStyle,\n tableRowStyle,\n tableRows,\n rowWrapper,\n RowComponent,\n useStickyFooter,\n onRowShiftSelect,\n }}\n scrollerRef={(el) => {\n if (el instanceof HTMLElement) scrollRef.current = el;\n }}\n endReached={onVirtuosoEndReached}\n itemSize={virtuosoItemSize ?? itemSizeDefault}\n // Always use components declared outside a rendering component\n // or new elements are created causing to lose state\n // https://virtuoso.dev/customize-structure/\n components={{\n Table: PosVirtuosoTable,\n TableHead: PosVirtuosoTableHead,\n TableRow: PosVirtuosoTableRow,\n TableFoot: PosVirtuosoTableFooter,\n }}\n fixedHeaderContent={() => {\n return useColumnVirtualization ? (\n renderHeaderRow()\n ) : (\n <>\n {table.getHeaderGroups().map((headerGroup) => (\n \n {headerGroup.headers.map((header) => (\n \n ))}\n \n ))}\n \n );\n }}\n fixedFooterContent={() => (\n <>\n {footerEl}\n {hasFooterDef &&\n footerRow.map((row, index) => {\n const tableRow = (customProps?: CustomTrProps) => (\n {\n e.stopPropagation();\n }}\n onKeyDown={\n activeItem != null\n ? (e) => onKeyDownHandler(e, index, tableRows)\n : undefined\n }\n {...customProps}\n style={tableRowStyle}\n >\n {row.headers.map((cell) => (\n \n {flexRender(\n cell.column.columnDef.footer,\n cell.getContext()\n )}\n \n ))}\n \n );\n\n return tableRow();\n })}\n \n )}\n itemContent={(index, row) =>\n useColumnVirtualization\n ? renderRowContentVirtualized(row)\n : renderRowContent(row)\n }\n />\n ) : (\n }\n >\n \n \n {useColumnVirtualization\n ? renderHeaderRow()\n : table.getHeaderGroups().map((headerGroup) => (\n \n {headerGroup.headers.map((header) => (\n \n ))}\n \n ))}\n \n \n {tableRows.map((row, index) => {\n const rowProps = {\n className: clsx(styles.tableRow, {\n [styles.isSelectedRow]: row.getIsSelected(),\n [styles.isSubRow]: row.depth > 0,\n }),\n key: row.id,\n onClick: (e: React.MouseEvent) => {\n e.stopPropagation();\n row.toggleSelected();\n onRowShiftSelect?.(tableRows, row, index);\n },\n onKeyDown: activeItem\n ? (e: React.KeyboardEvent) =>\n onKeyDownHandler(e, index, tableRows)\n : undefined,\n tabIndex:\n activeItem && activeItem.id === row.id\n ? 0\n : row.getIsSelected()\n ? 0\n : -1,\n style: tableRowStyle,\n };\n const rowContent = useColumnVirtualization\n ? renderRowContentVirtualized(row)\n : renderRowContent(row);\n\n const children = rowWrapper\n ? rowWrapper(row.original, rowContent, rowIndex++)\n : rowContent;\n\n const tableRow = RowComponent ? (\n \n {children}\n \n ) : (\n {children}\n );\n\n return tableRow;\n })}\n {hasFooterDef &&\n footerRow.map((row, index) => {\n const tableRow = (customProps?: CustomTrProps) => (\n {\n e.stopPropagation();\n }}\n onKeyDown={\n activeItem != null\n ? (e) => onKeyDownHandler(e, index, tableRows)\n : undefined\n }\n {...customProps}\n style={tableRowStyle}\n >\n {row.headers.map((cell) => (\n \n {flexRender(\n cell.column.columnDef.footer,\n cell.getContext()\n )}\n \n ))}\n \n );\n\n return tableRow();\n })}\n {footerEl}\n \n \n \n )}\n {usePaginationFooter && table.getPageCount() > 1 && (\n \n )}\n \n );\n};\n\nexport default Table;\n","import { useContent } from 'src/contexts/ContentContext';\nimport { getActivityLogChangeDisplay } from 'src/utils/activityLogUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ActivityLogAdditionalInformationDictionaryOfActivityLogValueChange } from 'src/WebApiController';\n\nimport {\n activityAdditionalInfoItem,\n activityAdditionalInfoList,\n} from './ActivityLog.css';\n\nexport const ActivityLogAdditionalInfo = (\n additionalInfo: ActivityLogAdditionalInformationDictionaryOfActivityLogValueChange\n) => {\n const entries = Object.entries(additionalInfo);\n const removedContent = useContent(ContentId.Empty);\n return (\n
    \n {entries.map(([k, v]) => (\n
    \n {getActivityLogChangeDisplay(k, v, removedContent, true)}\n
    \n ))}\n
    \n );\n};\n","import styled from 'styled-components/macro';\n\nexport const ActivityLogDateCellDiv = styled.div`\n text-transform: 'none';\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n ${({\n theme: {\n typography: { size },\n },\n }) => size(1)};\n`;\n","import { formatInTimeZone } from 'date-fns-tz';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useSiteTimezoneContext } from 'src/contexts/SiteTimezoneContext/SiteTimezoneContext';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { ActivityLogDateCellDiv } from '../ActivityLogTable.styled';\n\nexport function ActivityLogDateCell({ date }: { date: Date | null }) {\n const { timeZone } = useSiteTimezoneContext();\n const formattedDate = date ? (\n <>\n {formatInTimeZone(date, timeZone, 'LLL do yyyy')}\n {formatInTimeZone(date, timeZone, 'hh:mm:ss aa')}\n \n ) : (\n \n );\n return {formattedDate};\n}\n","import { formatInTimeZone } from 'date-fns-tz';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useSiteTimezoneContext } from 'src/contexts/SiteTimezoneContext/SiteTimezoneContext';\nimport { Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { ActivityLogDateCellDiv } from '../ActivityLogTable.styled';\n\nexport function ActivityLogDateRangeCell({\n dateFrom,\n dateTo,\n}: {\n dateFrom: Date | null;\n dateTo: Date | null;\n}) {\n const { timeZone } = useSiteTimezoneContext();\n\n const formatDate = (date: Date | null) =>\n date ? (\n {formatInTimeZone(date, timeZone, 'LLL do yyyy')}\n ) : (\n \n );\n\n if (dateFrom?.toDateString() === dateTo?.toDateString()) {\n const date = dateFrom || dateTo;\n return {formatDate(date)};\n }\n\n return (\n \n {formatDate(dateFrom)}\n {formatDate(dateTo)}\n \n );\n}\n","import { ColumnDef } from '@tanstack/react-table';\nimport { GroupedActivityLog } from 'src/components/ActivityLog';\nimport { ActivityLogAdditionalInfo } from 'src/components/ActivityLog/ActivityLogAdditionalInfo';\nimport { Content } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { CountBadge, Stack } from 'src/core/ui';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { TableHeaderCellDiv } from 'src/core/ui/TableHeaderCellDiv';\nimport { ExpandIcon, ForwardIcon } from 'src/svgs/Viagogo';\nimport { TableShimmeringDiv } from 'src/tables/Table';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { stringToUtcDate } from 'src/utils/dateTimeUtils';\nimport {\n ActivityLogAdditionalInformationDictionaryOfActivityLogValueChange,\n ActivityLogInitiatedByUser,\n} from 'src/WebApiController';\n\nimport { ActivityLogDateCell } from './ActivityLogDateCell';\nimport { ActivityLogDateRangeCell } from './ActivityLogDateRangeCell';\n\nexport const ACTIVITY_LOG_GROUPED_TABLE_COLUMNS_CONFIG: ColumnDef[] =\n [\n {\n id: 'accordionToggle',\n header: '',\n minSize: 24,\n maxSize: 40,\n meta: {\n styleOverrides: { padding: 0 },\n },\n cell: ({\n row: { original, toggleExpanded, getCanExpand, getIsExpanded },\n }) => {\n const canExpand = true; // getCanExpand();\n const isExpanded = getIsExpanded();\n const Icon = isExpanded ? ExpandIcon : ForwardIcon;\n if ((original && original?.activityLogs.length < 2) || !original) {\n return null;\n }\n\n return (\n \n {canExpand && (\n \n \n {\n e.stopPropagation();\n e.preventDefault();\n toggleExpanded(!isExpanded);\n }}\n />\n \n )}\n \n );\n },\n },\n {\n id: 'actionDate',\n header: () => (\n \n \n \n ),\n maxSize: 90,\n accessorFn: (data) => (data ? data.actionDate || '' : null),\n cell: ({\n getValue,\n row: { original, getCanExpand },\n table: { getState },\n }) => {\n const canExpand = getCanExpand();\n\n const value = getValue() as string;\n if (!original) {\n return ;\n }\n\n if (canExpand) {\n const sortState = getState().sorting.find(\n (s) => s.id === 'actionDate'\n );\n const activityLogs = original?.activityLogs;\n const firstDate = activityLogs[0].actionDate;\n const lastDate = activityLogs[activityLogs.length - 1].actionDate;\n\n const [dateFrom, dateTo] = [firstDate, lastDate].toSorted((a, b) => {\n return sortState?.desc ? b.localeCompare(a) : a.localeCompare(b);\n });\n\n return (\n \n \n \n );\n }\n\n return (\n \n \n \n );\n },\n sortingFn: 'datetime',\n },\n {\n id: 'actionType',\n header: () => (\n \n \n \n ),\n enableSorting: false,\n accessorFn: (data) => (data ? data.actionTypeDisplay : null),\n cell: ({ getValue, row: { original } }) => {\n const actionTypeDisplay = getValue() as string;\n if (!original) {\n return ;\n }\n return (\n \n {actionTypeDisplay}\n \n );\n },\n },\n {\n id: 'initiatedBy',\n header: () => (\n \n \n \n ),\n enableSorting: false,\n accessorFn: (data) => data?.initiatedBy,\n cell: ({ getValue, row: { original } }) => {\n const value = getValue() as ActivityLogInitiatedByUser;\n if (!original) {\n return ;\n }\n return (\n \n {value?.username}\n \n );\n },\n },\n {\n id: 'additionalInfo',\n header: () => (\n \n \n \n ),\n enableSorting: false,\n accessorFn: (data) => (data ? data.additionalInfo : null),\n cell: ({ getValue, row: { original, getCanExpand } }) => {\n const canExpand = getCanExpand();\n\n const value =\n getValue() as ActivityLogAdditionalInformationDictionaryOfActivityLogValueChange;\n if (!original) {\n return ;\n }\n\n if (canExpand) {\n return null;\n }\n return (\n \n \n \n );\n },\n },\n ];\n","import { ColumnDef } from '@tanstack/react-table';\nimport { ActivityLogAdditionalInfo } from 'src/components/ActivityLog/ActivityLogAdditionalInfo';\nimport { Content } from 'src/contexts/ContentContext';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { TableHeaderCellDiv } from 'src/core/ui/TableHeaderCellDiv';\nimport { TableShimmeringDiv } from 'src/tables/Table';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { stringToUtcDate } from 'src/utils/dateTimeUtils';\nimport {\n ActivityLog,\n ActivityLogAdditionalInformationDictionaryOfActivityLogValueChange,\n} from 'src/WebApiController';\n\nimport { ActivityLogDateCell } from './ActivityLogDateCell';\n\nexport const ACTIVITY_LOG_TABLE_COLUMNS_CONFIG: ColumnDef[] =\n [\n {\n id: 'actionDate',\n header: () => (\n \n \n \n ),\n maxSize: 90,\n accessorFn: (data) => (data ? data.actionDate || '' : null),\n cell: ({ getValue, row: { original } }) => {\n const value = getValue() as string;\n if (!original) {\n return ;\n }\n return (\n \n \n \n );\n },\n sortingFn: 'datetime',\n },\n {\n id: 'actionType',\n header: () => (\n \n \n \n ),\n enableSorting: false,\n accessorFn: (data) => (data ? data.actionTypeDisplay : null),\n cell: ({ getValue, row: { original } }) => {\n const actionTypeDisplay = getValue() as string;\n if (!original) {\n return ;\n }\n return (\n \n {actionTypeDisplay}\n \n );\n },\n },\n {\n id: 'initiatedBy',\n header: () => (\n \n \n \n ),\n enableSorting: false,\n accessorFn: (data) => data,\n cell: ({ getValue, row: { original } }) => {\n const value = getValue() as ActivityLog;\n if (!original) {\n return ;\n }\n return (\n \n {value?.initiatedBy?.username}\n {value?.initiatedByImpersonated?.username\n ? ` (impersonating ${value.initiatedByImpersonated.username})`\n : ''}\n \n );\n },\n },\n {\n id: 'additionalInfo',\n header: () => (\n \n \n \n ),\n enableSorting: false,\n accessorFn: (data) => (data ? data.additionalInfo : null),\n cell: ({ getValue, row: { original } }) => {\n const value =\n getValue() as ActivityLogAdditionalInformationDictionaryOfActivityLogValueChange;\n if (!original) {\n return ;\n }\n return (\n \n \n \n );\n },\n },\n ];\n","import {\n getExpandedRowModel,\n InitialTableState,\n PaginationState,\n SortingState,\n TableOptions,\n} from '@tanstack/react-table';\nimport { useEffect, useMemo, useState } from 'react';\nimport { GroupedActivityLog } from 'src/components/ActivityLog';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { NoData, Table } from 'src/tables/Table';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { generateShimmeringRows } from 'src/utils/dataTableUtils';\nimport { SomethingWentWrong } from 'src/views';\nimport { ActivityLog, Feature } from 'src/WebApiController';\n\nimport { ACTIVITY_LOG_GROUPED_TABLE_COLUMNS_CONFIG } from './configs/ActivityLogGroupedTableColumnsConfig';\nimport { ACTIVITY_LOG_TABLE_COLUMNS_CONFIG } from './configs/ActivityLogTableColumnsConfig';\n\nexport type ActivityLogTableDataProps = {\n activityLogs?: ActivityLog[];\n groupedActivityLogs?: GroupedActivityLog[];\n count: number;\n failedToRetrieveData: boolean;\n};\n\ntype ActivityLogTableProps = ActivityLogTableDataProps & {\n failedToRetrieveData: boolean;\n onMount?: () => void;\n onUnmount?: (state: object) => void;\n initState?: InitialTableState;\n};\n\nconst PAGE_SIZE = 20;\n\nexport function ActivityLogTable({\n activityLogs,\n groupedActivityLogs,\n count,\n failedToRetrieveData,\n onMount,\n onUnmount,\n initState,\n}: ActivityLogTableProps) {\n // Enable passing in table state as parameters -- we can remount with the last state the user was on\n const [sorting, setSorting] = useState(\n initState?.sorting || [{ id: 'actionDate', desc: true }]\n );\n const [{ pageIndex, pageSize }, setPagination] = useState({\n pageIndex: initState?.pagination?.pageIndex || 0,\n pageSize: PAGE_SIZE,\n });\n\n const hasGroupedActivityLog = useUserHasFeature(Feature.GroupedActivityLog);\n\n const pagination = useMemo(\n () => ({\n pageIndex,\n pageSize,\n }),\n [pageIndex, pageSize]\n );\n\n useEffect(() => {\n onMount?.();\n });\n\n useEffect(() => {\n /**\n * Intent for `onMount` is use with 'windowing' in order to maintain user state\n * when the component is scrolled back into view.\n * Anything that needs to be persisted in `react-table` state should be added here.\n * Only update on unmount to ensure we aren't doing too many re-renders.\n */\n return () => onUnmount?.({ pagination, sorting });\n }, [pagination, sorting, onUnmount]);\n\n const flatActivityLogData = useMemo(\n () => activityLogs || (generateShimmeringRows(count) as null[]),\n [count, activityLogs]\n );\n\n const data = useMemo(\n () => groupedActivityLogs || (generateShimmeringRows(count) as null[]),\n [count, groupedActivityLogs]\n );\n\n const flatActivityLogOptions: Partial> =\n useMemo(\n () => ({\n data: flatActivityLogData,\n columns: ACTIVITY_LOG_TABLE_COLUMNS_CONFIG,\n state: {\n pagination,\n sorting,\n },\n onPaginationChange: setPagination,\n onSortingChange: setSorting,\n }),\n [flatActivityLogData, pagination, sorting]\n );\n\n const options: Partial> = useMemo(\n () => ({\n data,\n columns: ACTIVITY_LOG_GROUPED_TABLE_COLUMNS_CONFIG,\n state: {\n pagination,\n sorting,\n },\n onPaginationChange: setPagination,\n onSortingChange: setSorting,\n getRowCanExpand: (row) =>\n (row.original?.activityLogs && row.original?.activityLogs.length > 2) ||\n false,\n getExpandedRowModel: (table) => getExpandedRowModel()(table),\n getSubRows: (originalRow) => {\n if (originalRow?.activityLogs && originalRow.activityLogs.length < 2) {\n return [];\n }\n const activityLogs = originalRow?.activityLogs.map((activityLog) => ({\n ...activityLog,\n activityLogs: [activityLog], // Make each ActivityLog into a GroupedActivityLog\n }));\n return activityLogs ?? [];\n },\n }),\n [data, pagination, sorting]\n );\n\n return failedToRetrieveData ? (\n }\n />\n ) : data?.length > 0 ? (\n hasGroupedActivityLog ? (\n \n ) : (\n
    \n )\n ) : (\n \n \n \n );\n}\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport const ActivityLogTitleTextSpan = styled.span`\n align-items: center;\n font-size: ${() => vars.typography.fontSize['2xl']};\n font-weight: 700;\n color: ${(props) => props.theme.colors.textBrand};\n padding-top: ${(props) => (props.onClick ? '2px' : vars.spacing.sm)};\n padding-bottom: 2px;\n`;\n","import clsx from 'clsx';\nimport { debounce } from 'lodash-es';\nimport {\n CSSProperties,\n useCallback,\n useDeferredValue,\n useMemo,\n useState,\n} from 'react';\nimport {\n FilterDropdownItem,\n FilterToolbarGroup,\n SelectedFilters,\n} from 'src/components/Filters';\nimport {\n AddFilterButtonPlain,\n dropdownGroupContainer,\n dropdownItemParentLabel,\n notFoundOption,\n searchDropdownItem,\n} from 'src/components/FilterToolbar/FilterDialogV2/FiltersDropdown/FiltersDropdown.css';\nimport {\n Content,\n getContent,\n useContent,\n useContentContext,\n} from 'src/contexts/ContentContext';\nimport { PosDropdown, PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { PosSearchBox } from 'src/core/POS/PosSearchBox';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { IconsFill, PlusIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Feature } from 'src/WebApiController';\n\ninterface FiltersDropdownProps {\n filters: FilterToolbarGroup[];\n selectedDropdownItems: SelectedFilters;\n onFilterSelected: (filterDropdownItem: FilterDropdownItem[]) => void;\n}\n\nconst triggerStyles: CSSProperties = {\n width: '100%',\n};\n\nexport const FiltersDropdown = ({\n filters,\n selectedDropdownItems,\n onFilterSelected,\n}: FiltersDropdownProps) => {\n const hasFiltersApplied = Object.keys(selectedDropdownItems).length > 0;\n const [searchText, setSearchText] = useState('');\n const searchPlaceholder = useContent(ContentId.Search);\n const contentContext = useContentContext();\n const hasMetricsV2Feature = useUserHasFeature(Feature.CatalogMetricsV2);\n\n // NOTE:\n // This is a wishy-washy way to do this, we already have debounce - so this should be be needed\n // but since this has been working - let's keep it like this\n // If the search drop-down ever not respond to text search - remove this line\n const searchDeferredValue = useDeferredValue(searchText);\n\n // eslint-disable-next-line react-hooks/rules-of-hooks,react-hooks/exhaustive-deps\n const updateSearchText = useCallback(\n debounce((value: string) => {\n setSearchText(value);\n }, 200),\n []\n );\n\n const filteredFilters = useMemo(() => {\n if (!searchDeferredValue) {\n return filters;\n }\n const lowercaseSearchText = searchDeferredValue.toLocaleLowerCase();\n return filters\n .map((filter) => {\n const items = filter.items.filter((filterItem) => {\n const labelValue = getContent(\n filterItem.labelContentId,\n contentContext\n );\n return (\n labelValue.toLocaleLowerCase().indexOf(lowercaseSearchText) !== -1\n );\n });\n return {\n ...filter,\n items,\n };\n })\n .filter((filter) => filter.items.length > 0);\n }, [contentContext, filters, searchDeferredValue]);\n\n const clearSearch = useCallback(() => {\n setSearchText('');\n }, []);\n\n return (\n \n \n \n \n }\n triggerProps={{\n style: triggerStyles,\n }}\n align=\"start\"\n >\n \n \n \n\n {filteredFilters.flatMap((filtersToolbarGroup, i) => {\n const items = filtersToolbarGroup.items.map((filterItem) => {\n return (\n {\n onFilterSelected([\n {\n filterId: filterItem.filterId,\n titleContentId: filtersToolbarGroup.titleContentId,\n },\n ]);\n }}\n >\n {filterItem.postfixIcon && hasMetricsV2Feature ? (\n \n \n {filterItem.postfixIcon}\n \n ) : (\n \n )}\n \n );\n });\n return [\n
    \n
    \n \n \n \n {items}\n
    \n
    ,\n ];\n })}\n\n {filteredFilters.length === 0 && (\n \n \n \n )}\n \n );\n};\n","import { cloneElement, useMemo } from 'react';\nimport { FilterToolbarItem } from 'src/components/Filters';\nimport {\n filterItemLabel,\n filterItemWrapper,\n} from 'src/components/FilterToolbar/FilterDialogV2/FiltersList/FiltersList.css';\nimport { Content } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { IconsFill, LockIcon } from 'src/svgs/Viagogo';\nimport {\n DEFAULT_REPORT_FILTER_EDITABILITY,\n ReportFilterEditability,\n} from 'src/utils/reportsFilterUtils';\n\nimport { FiltersListProp } from './FiltersList.types';\n\nconst FILTER_ITEM_WIDTH = '190px';\n\nexport const FiltersListEmbedded = ({\n filters,\n selectedDropdownItems,\n performerVenueFilter,\n embeddedResetButton,\n}: FiltersListProp) => {\n const filterItemsToShow = useMemo(() => {\n const selectedFilters = filters.filter(\n (filterToolbarGroup) =>\n filterToolbarGroup.titleContentId &&\n !!selectedDropdownItems[filterToolbarGroup.titleContentId]\n );\n\n return selectedFilters.flatMap((filterToolbarGroup) => {\n const dropdownFilterIds = selectedDropdownItems[\n filterToolbarGroup.titleContentId!\n ].map((dropdownFilter) => dropdownFilter.filterId);\n\n return filterToolbarGroup.items.filter(\n (filterItem) =>\n dropdownFilterIds.includes(filterItem.filterId) &&\n (filterItem.reportFilterEditability ??\n DEFAULT_REPORT_FILTER_EDITABILITY) !==\n ReportFilterEditability.Hidden\n );\n });\n }, [filters, selectedDropdownItems]);\n\n return (\n \n \n {performerVenueFilter != null && (\n 0}>\n {performerVenueFilter}\n \n )}\n {filterItemsToShow.map((item, i) => (\n \n ))}\n \n {(performerVenueFilter != null || filterItemsToShow.length > 0) && (\n 0}>\n {embeddedResetButton}\n \n )}\n \n );\n};\n\nconst FilterToolbarListItemEmbedded = ({\n item,\n}: {\n item: FilterToolbarItem;\n}) => {\n const disabled =\n item.reportFilterEditability !== ReportFilterEditability.Edit;\n\n const filterItem = disabled\n ? cloneElement(item.filterItem, { disabled })\n : item.filterItem;\n\n return (\n \n \n \n \n \n \n {filterItem}\n \n {disabled && (\n \n \n \n )}\n \n \n );\n};\n\nconst FilterToolBarButtonWrapper = ({\n lineBreak,\n children,\n}: {\n /**\n * This prop is used to add a line break before the children to align with FilterToolbarListItemEmbedded\n */\n lineBreak?: boolean;\n children: React.ReactNode;\n}) => {\n return (\n
    \n {lineBreak &&
    }
    \n \n \n {children}\n \n \n
    \n );\n};\n","import { FilterToolbarItemId } from 'src/components/Filters';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { PosDropdown, PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { shared, vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport {\n REPORT_FILTER_EDITABILITY_TO_CID,\n REPORT_FILTER_EDITABILITY_TO_DESC_CID,\n} from 'src/utils/constants/contentIdMaps';\nimport {\n DEFAULT_REPORT_FILTER_EDITABILITY,\n ReportFilterEditability,\n} from 'src/utils/reportsFilterUtils';\n\nexport const ReportFilterEditabilityDropdown = ({\n filterId,\n reportFilterEditability,\n onEditabilityChange,\n disabled,\n}: {\n filterId: FilterToolbarItemId;\n reportFilterEditability?: ReportFilterEditability;\n onEditabilityChange: (\n filterId: FilterToolbarItemId,\n editability: ReportFilterEditability\n ) => void;\n disabled?: boolean;\n}) => {\n const handleEditabilityChange = (editability: string) => {\n onEditabilityChange(filterId, editability as ReportFilterEditability);\n };\n\n const title = useContent(\n REPORT_FILTER_EDITABILITY_TO_DESC_CID[\n reportFilterEditability ?? DEFAULT_REPORT_FILTER_EDITABILITY\n ]\n );\n\n return (\n \n \n \n }\n triggerProps={{\n disabled: disabled,\n }}\n align=\"start\"\n >\n {Object.values(ReportFilterEditability).map((editability) => (\n handleEditabilityChange(editability)}\n >\n \n \n \n \n \n \n \n \n \n ))}\n \n );\n};\n","import { FilterToolbarGroup, FilterToolbarItem } from 'src/components/Filters';\nimport {\n filterGroupHeader,\n filterItemLabel,\n filterItemWrapper,\n RemoveFilterButton,\n} from 'src/components/FilterToolbar/FilterDialogV2/FiltersList/FiltersList.css';\nimport { Content } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { CrossIcon } from 'src/svgs/Viagogo';\nimport { Feature } from 'src/WebApiController';\n\nimport { FiltersListProp } from './FiltersList.types';\nimport { FiltersListEmbedded } from './FiltersListEmbedded';\nimport { ReportFilterEditabilityDropdown } from './ReportFilterEditabilityDropdown';\n\nexport const FiltersList = (props: FiltersListProp) => {\n if (props.embeddedDisplayOnly) {\n return ;\n }\n if (props.listView) {\n return ;\n }\n\n return ;\n};\n\nconst FiltersListListView = ({\n filters,\n selectedDropdownItems,\n ...props\n}: FiltersListProp) => {\n return (\n \n {filters\n .filter(\n (filterToolbarGroup) =>\n filterToolbarGroup.titleContentId &&\n !!selectedDropdownItems[filterToolbarGroup.titleContentId]\n )\n .map((filterToolbarGroup, i) => (\n \n ))}\n \n );\n};\n\nconst FiltersListDefault = ({\n filters,\n selectedDropdownItems,\n ...props\n}: FiltersListProp) => {\n return (\n \n {filters\n .filter(\n (filterToolbarGroup) =>\n filterToolbarGroup.titleContentId &&\n !!selectedDropdownItems[filterToolbarGroup.titleContentId]\n )\n .map((filterToolbarGroup, i) => (\n \n ))}\n \n );\n};\n\nconst FilterToolbarGroupListItem = ({\n filterToolbarGroup,\n selectedDropdownItems,\n tempQuery,\n filtersMap,\n mandatoryFiltersToShow,\n onEditabilityChange,\n ...props\n}: Omit & {\n filterToolbarGroup: FilterToolbarGroup;\n}) => {\n const titleContentId = filterToolbarGroup.titleContentId ?? '';\n const dropdownFilterIds = selectedDropdownItems[titleContentId].map(\n (dropdownFilter) => dropdownFilter.filterId\n );\n const itemsToShow = filterToolbarGroup.items.filter((filterItem) =>\n dropdownFilterIds.includes(filterItem.filterId)\n );\n return (\n \n {titleContentId && (\n
    \n \n
    \n )}\n \n {itemsToShow.map((item, itemIndex) => (\n \n ))}\n \n
    \n );\n};\n\nconst FilterToolbarListItem = ({\n filterToolbarGroup,\n item,\n itemIndex,\n selectedDropdownItems,\n onFilterRemoved,\n onEditabilityChange,\n mandatoryFiltersToShow,\n}: Omit & {\n filterToolbarGroup: FilterToolbarGroup;\n item: FilterToolbarItem;\n itemIndex: number;\n}) => {\n const titleContentId = filterToolbarGroup.titleContentId ?? '';\n const hasMetricsV2Feature = useUserHasFeature(Feature.CatalogMetricsV2);\n const canBeRemoved = !mandatoryFiltersToShow.includes(item.filterId);\n\n const showEditabilityDropdown = onEditabilityChange != null;\n\n const onRemoveFilterHandler = () => {\n const filterDropdownItem = selectedDropdownItems[titleContentId].find(\n (filterDropdownItem) => filterDropdownItem.filterId === item.filterId\n );\n if (filterDropdownItem) {\n onFilterRemoved(filterDropdownItem);\n }\n };\n\n return (\n \n \n \n {item.postfixIcon && hasMetricsV2Feature ? (\n \n \n {item.postfixIcon}\n \n ) : (\n \n )}\n \n \n {item.filterItem}\n {canBeRemoved && (\n \n \n \n )}\n {showEditabilityDropdown && (\n \n )}\n \n \n \n );\n};\n","import { ReactNode, useCallback, useMemo, useState } from 'react';\nimport {\n FilterDropdownItem,\n FilterToolbarGroup,\n FilterToolbarItem,\n FilterToolbarItemId,\n mapFiltersToFiltersState,\n SelectedFilters,\n useFilterFiltersByPermission,\n} from 'src/components/Filters';\nimport {\n FilterDialogV2Body,\n FilterDialogV2Footer,\n FilterDialogV2Header,\n FilterDialogV2Wrapper,\n saveFiltersButton,\n} from 'src/components/FilterToolbar/FilterDialogV2/FilterDialogV2.css';\nimport { FiltersDropdown } from 'src/components/FilterToolbar/FilterDialogV2/FiltersDropdown/FiltersDropdown';\nimport { FiltersList } from 'src/components/FilterToolbar/FilterDialogV2/FiltersList/FiltersList';\nimport { Content } from 'src/contexts/ContentContext';\nimport { CrossIconContainer } from 'src/core/interim/dialogs/GenericDialog/GenericDialog.styled';\nimport { vars } from 'src/core/themes';\nimport { Button, Popover, Stack } from 'src/core/ui';\nimport { CrossIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n DEFAULT_REPORT_FILTER_EDITABILITY,\n ReportFilterEditability,\n} from 'src/utils/reportsFilterUtils';\n\nexport interface FilterDialogV2Props {\n filters: FilterToolbarGroup[];\n onResetAll: () => void;\n onSubmitFilter?: () => void;\n appliedFilterIds: FilterToolbarItemId[];\n onSaveQuickFilter?: () => void;\n resetTempQuery?: (keys?: FilterToolbarItemId[]) => void;\n tempQuery?: Partial>;\n initialQuery?: Partial>;\n mandatoryFiltersToShow: FilterToolbarItemId[];\n filterAppliedMessage?: ReactNode;\n\n onEditabilityChange?: (\n filterId: FilterToolbarItemId | FilterToolbarItemId[],\n editability: ReportFilterEditability\n ) => void;\n embeddedDisplayOnly?: boolean;\n listView?: boolean;\n performerVenueFilter?: JSX.Element;\n}\n\nexport const FilterDialogV2 = ({\n filters,\n onResetAll,\n onSubmitFilter,\n appliedFilterIds,\n onSaveQuickFilter,\n resetTempQuery,\n tempQuery = {},\n initialQuery = {},\n mandatoryFiltersToShow,\n filterAppliedMessage,\n onEditabilityChange,\n embeddedDisplayOnly,\n listView,\n performerVenueFilter,\n}: FilterDialogV2Props) => {\n const filtersMap = useMemo<\n Partial>\n >(() => {\n const filtersMap: Partial> =\n {};\n filters.forEach((filterGroup) => {\n filterGroup.items.forEach((filterItem) => {\n filtersMap[filterItem.filterId] = filterItem;\n });\n });\n return filtersMap;\n }, [filters]);\n\n const filteredByPermissionsFilters = useFilterFiltersByPermission({\n filters,\n });\n\n const nonHiddenFilterIds = useMemo(\n () =>\n onEditabilityChange\n ? filteredByPermissionsFilters\n .flatMap((group) => group.items)\n .filter(\n (item) =>\n (item.reportFilterEditability ??\n DEFAULT_REPORT_FILTER_EDITABILITY) !==\n ReportFilterEditability.Hidden\n )\n .map((item) => item.filterId)\n : [],\n [filteredByPermissionsFilters, onEditabilityChange]\n );\n\n const appliedFilterIdsWithNonHidden = useMemo(\n () => Array.from(new Set([...appliedFilterIds, ...nonHiddenFilterIds])),\n [appliedFilterIds, nonHiddenFilterIds]\n );\n\n const [selectedFilters, setSelectedFilters] = useState(() =>\n mapFiltersToFiltersState({\n filters: filteredByPermissionsFilters,\n appliedFilterIds: appliedFilterIdsWithNonHidden,\n mandatoryFiltersToShow,\n })\n );\n\n const hasFiltersApplied = useMemo(\n () => Object.keys(selectedFilters).length > 0,\n [selectedFilters]\n );\n\n const clearAll = useCallback(() => {\n // Clear all and keep the mandatory fields\n const cleanSelectedFilters: SelectedFilters = {};\n for (const key in selectedFilters) {\n selectedFilters[key].forEach((dropdownItem) => {\n if (\n mandatoryFiltersToShow.includes(dropdownItem.filterId) ||\n nonHiddenFilterIds.includes(dropdownItem.filterId) ||\n initialQuery[dropdownItem.filterId] != null\n ) {\n cleanSelectedFilters[key] = cleanSelectedFilters[key] ?? [];\n cleanSelectedFilters[key].push(dropdownItem);\n }\n });\n }\n setSelectedFilters(cleanSelectedFilters);\n resetTempQuery?.();\n onResetAll();\n }, [\n initialQuery,\n mandatoryFiltersToShow,\n nonHiddenFilterIds,\n onResetAll,\n resetTempQuery,\n selectedFilters,\n ]);\n\n const onFilterRemoved = useCallback(\n (removedFilterDropdownItem: FilterDropdownItem) => {\n const titleContentId = removedFilterDropdownItem.titleContentId as string;\n\n const filterToolbarGroup = filters.find(\n (group) => group.titleContentId === titleContentId\n );\n\n if (!filterToolbarGroup) {\n return;\n }\n\n const filtersToRemove = filterToolbarGroup.items.filter(\n (filter) => filter.filterId === removedFilterDropdownItem.filterId\n );\n\n const filterIdsToRemove = filtersToRemove.map((f) => f.filterId);\n const filteredDropdownItems = (\n selectedFilters[titleContentId] ?? []\n ).filter(\n (dropdownItem) => !filterIdsToRemove.includes(dropdownItem.filterId)\n );\n\n const updatedSelectedFilters = { ...selectedFilters };\n if (filteredDropdownItems.length > 0) {\n updatedSelectedFilters[titleContentId] = filteredDropdownItems;\n } else {\n delete updatedSelectedFilters[titleContentId];\n }\n\n // all keys to remove from tempQuery\n const filterQueryKeysToRemove = filtersToRemove.flatMap(\n (f) => f.filterQueryKeys ?? []\n );\n\n resetTempQuery?.(filterQueryKeysToRemove);\n setSelectedFilters(updatedSelectedFilters);\n onEditabilityChange?.(\n filtersToRemove.map((f) => f.filterId),\n ReportFilterEditability.Hidden\n );\n },\n [filters, onEditabilityChange, resetTempQuery, selectedFilters]\n );\n\n if (embeddedDisplayOnly) {\n return (\n \n \n \n }\n />\n );\n }\n\n if (listView) {\n return (\n <>\n \n {\n let updatedSelectedFilters: SelectedFilters = {\n ...selectedFilters,\n };\n\n filterDropdownItems.forEach((filterDropdownItem) => {\n const titleContentId =\n filterDropdownItem.titleContentId as string;\n updatedSelectedFilters = {\n ...updatedSelectedFilters,\n [titleContentId]: [\n ...(updatedSelectedFilters[titleContentId] ?? []),\n filterDropdownItem,\n ],\n };\n });\n\n setSelectedFilters(updatedSelectedFilters);\n }}\n />\n \n );\n }\n\n return (\n
    \n
    \n \n \n \n \n \n \n
    \n
    \n \n {\n let updatedSelectedFilters: SelectedFilters = {\n ...selectedFilters,\n };\n\n filterDropdownItems.forEach((filterDropdownItem) => {\n const titleContentId =\n filterDropdownItem.titleContentId as string;\n updatedSelectedFilters = {\n ...updatedSelectedFilters,\n [titleContentId]: [\n ...(updatedSelectedFilters[titleContentId] ?? []),\n filterDropdownItem,\n ],\n };\n });\n\n setSelectedFilters(updatedSelectedFilters);\n }}\n />\n
    \n {hasFiltersApplied && (\n
    {filterAppliedMessage}
    \n )}\n \n {hasFiltersApplied && onSaveQuickFilter && (\n {\n onSubmitFilter?.();\n onSaveQuickFilter?.();\n }}\n className={saveFiltersButton}\n >\n \n \n )}\n \n \n \n \n \n \n \n
    \n );\n};\n","import { clsx } from 'clsx';\nimport { ComponentProps, forwardRef, ReactNode } from 'react';\n\nimport * as styles from './ToolbarButton.css';\n\nexport type ToolbarButtonProps = ComponentProps<'div'> & {\n disabled?: boolean;\n isSelected?: boolean;\n children?: ReactNode;\n};\n\nexport const ToolbarButton = forwardRef(\n function ToolbarButton(\n { isSelected, children, className, disabled, ...buttonProps },\n ref\n ) {\n return (\n \n {children}\n \n );\n }\n);\n","import { DndContext } from '@dnd-kit/core';\nimport { SortableContext, useSortable } from '@dnd-kit/sortable';\nimport { CSS } from '@dnd-kit/utilities';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { ToolbarButton } from 'src/core/POS/ToolbarButton';\nimport { vars } from 'src/core/themes';\nimport { Button, Popover } from 'src/core/ui';\nimport { DeleteIcon, EditIcon, IconsFill, PlusIcon } from 'src/svgs/Viagogo';\nimport { ListIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport {\n CustomFilterIconsContainer,\n CustomFilterItem,\n CustomFilterPopoverContainer,\n CustomFilterPopoverTitle,\n} from '../FilterToolbar.styled';\nimport { QuickFilterToolbarItem } from '../QuickFilterToolbarItem';\nimport * as styles from './CustomFilterButton.css';\n\nexport type CustomFilterButtonProps = {\n quickFilters: QuickFilterToolbarItem[];\n onToggleQuickFilter?: (id: string, isShown: boolean) => void;\n onMoveQuickFilter?: (id: string, overId: string) => void;\n onCreateCustomQuickFilter?: () => void;\n onDeleteCustomQuickFilter?: (id: string) => void;\n onUpdateCustomQuickFilter?: (id: string) => void;\n};\n\nexport function CustomFilterButton({\n quickFilters,\n onToggleQuickFilter,\n onMoveQuickFilter,\n onCreateCustomQuickFilter,\n onDeleteCustomQuickFilter,\n onUpdateCustomQuickFilter,\n}: CustomFilterButtonProps) {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n {quickFilters?.map((item) => (\n {\n onToggleQuickFilter?.(item.id, isShown);\n }}\n onEdit={() => {\n onUpdateCustomQuickFilter?.(item.id);\n }}\n onDelete={() => {\n onDeleteCustomQuickFilter?.(item.id);\n }}\n />\n ))}\n \n \n\n \n {\n onCreateCustomQuickFilter?.();\n }}\n >\n \n \n \n \n \n \n \n \n \n );\n}\n\nexport type SortableCustomFilterItemProps = QuickFilterToolbarItem & {\n onToggle?: (isShown: boolean) => void;\n onEdit?: () => void;\n onDelete?: () => void;\n};\n\nexport function SortableCustomFilterItem({\n id,\n name,\n isCustomFilter,\n isHidden,\n onToggle,\n onEdit,\n onDelete,\n}: SortableCustomFilterItemProps) {\n const { attributes, listeners, setNodeRef, transform, transition } =\n useSortable({ id });\n\n return (\n \n {\n onToggle?.(e.target.checked);\n }}\n />\n \n {isCustomFilter && (\n <>\n {\n onEdit?.();\n }}\n />\n {\n onDelete?.();\n }}\n />\n \n )}\n
    \n \n
    \n
    \n \n );\n}\n","import { ComponentProps, ReactNode } from 'react';\nimport { useForm } from 'react-hook-form';\nimport { Modal as RSModal } from 'reactstrap';\nimport { OkButton } from 'src/components/Buttons/OkButton';\nimport { useContent, useFormattedContent } from 'src/contexts/ContentContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { getTextFieldState, PosTextField } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { CloseButton } from 'src/modals/Modal';\nimport { CrossIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\n\nexport type CustomFilterDialogFieldValues = {\n filterName: string;\n};\n\nexport type CustomFilterDialogProps = {\n headerTitle?: ReactNode;\n defaultValues?: CustomFilterDialogFieldValues;\n validateIsFilterUnique: (name: string) => boolean;\n onSave?: (data: CustomFilterDialogFieldValues) => void;\n} & ComponentProps;\n\nexport const CustomFilterDialog = ({\n headerTitle,\n defaultValues = { filterName: '' },\n validateIsFilterUnique,\n onSave,\n onCancel,\n ...rest\n}: CustomFilterDialogProps) => {\n const requiredMsg = useContent(ContentId.Required);\n const nameText = useContent(ContentId.Name);\n const notUniqueMsg = useFormattedContent(FormatContentId.NotUnique, nameText);\n const { formState, register, handleSubmit } =\n useForm({ defaultValues });\n\n return (\n \n
    {headerTitle}
    \n \n \n \n \n }\n footer={\n <>\n \n \n }\n >\n \n \n validateIsFilterUnique(val) || (notUniqueMsg as string),\n })}\n />\n \n \n );\n};\n","import * as styles from 'src/core/POS/ToolbarButton/ToolbarButton.css';\nimport { Select } from 'src/core/ui';\n\nimport { QuickFilterToolbarItem } from './QuickFilterToolbarItem';\n\nexport const MobileFilterToolbar = ({\n filters,\n defaultValue,\n isSideTable,\n}: {\n filters?: QuickFilterToolbarItem[];\n defaultValue?: string;\n isSideTable?: boolean;\n}) => {\n if (!filters) return null;\n\n return (\n {\n // Find the filter that matches the value and call its onClick handler\n filters.find((f) => f.id === value)?.onClick();\n }}\n defaultValue={defaultValue}\n >\n \n \n \n \n {filters.map(({ id, name, isHidden }) => {\n if (isHidden) {\n return null;\n }\n return (\n \n {name}\n \n );\n })}\n \n \n );\n};\n","import { isEqual } from 'lodash-es';\nimport { useMemo, useState } from 'react';\nimport {\n FilterDialogV2,\n FilterDialogV2Props,\n} from 'src/components/FilterToolbar/FilterDialogV2/FilterDialogV2';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { ToolbarButton } from 'src/core/POS/ToolbarButton';\nimport { vars } from 'src/core/themes';\nimport { Popover } from 'src/core/ui';\nimport { ScrollableToolbar } from 'src/core/ui/ScrollableToolbar';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { FilterIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { hasAnyOfPermissions } from 'src/utils/userPermissionUtils';\n\nimport {\n FilterToolbarGroup,\n FilterToolbarItemId,\n} from '../Filters/Filter.types';\nimport {\n CustomFilterButton,\n CustomFilterButtonProps,\n} from './CustomFilterButton';\nimport { CustomFilterDialog } from './CustomFilterButton/CustomFilterDialog';\nimport { FilterDialog } from './FilterDialog';\nimport * as styles from './FilterToolbar.css';\nimport { FilterCount, FilterToolbarContainer } from './FilterToolbar.styled';\nimport { MobileFilterToolbar } from './MobileFilterToolbar';\nimport { QuickFilterToolbarItem } from './QuickFilterToolbarItem';\n\nexport type FilterToolbarProps = {\n filters: FilterToolbarGroup[];\n quickFilters?: QuickFilterToolbarItem[];\n /**\n * Whether the \"All\" quick filter is currently selected.\n */\n isAllSelected?: boolean;\n onResetAll: () => void;\n resetTempQuery?: (keys?: FilterToolbarItemId[]) => void; // TODO: make this not optional\n tempQuery?: Partial>;\n onSubmitFilter?: () => void;\n filterAppliedCounts: number;\n filterAppliedIds?: FilterToolbarItemId[];\n mandatoryFiltersToShow?: FilterToolbarItemId[];\n allContentId?: ContentId;\n\n showAllButton?: boolean;\n showCustomFilterButton?: boolean;\n onCreateCustomQuickFilter?: (filter: { name: string }) => void;\n onUpdateCustomQuickFilter?: (\n id: string,\n updatedFilter: { name: string }\n ) => void;\n filterAppliedMessage?: React.ReactNode;\n\n alwaysShowAllFilters?: boolean;\n} & Pick<\n CustomFilterButtonProps,\n 'onToggleQuickFilter' | 'onMoveQuickFilter' | 'onDeleteCustomQuickFilter'\n> &\n Pick<\n FilterDialogV2Props,\n | 'onEditabilityChange'\n | 'embeddedDisplayOnly'\n | 'performerVenueFilter'\n | 'listView'\n >;\n\nexport function FilterToolbar({\n filters,\n quickFilters,\n isAllSelected,\n allContentId,\n onResetAll,\n onSubmitFilter,\n filterAppliedCounts,\n showAllButton = true,\n showCustomFilterButton = true,\n onCreateCustomQuickFilter,\n onUpdateCustomQuickFilter,\n filterAppliedIds,\n resetTempQuery,\n tempQuery,\n mandatoryFiltersToShow = [],\n alwaysShowAllFilters,\n embeddedDisplayOnly = false,\n performerVenueFilter,\n filterAppliedMessage,\n onEditabilityChange,\n listView,\n ...customFilterButtonProps\n}: FilterToolbarProps) {\n const customFilterDialog = useBasicDialog();\n // the quick filter currently being edited\n const [currQuickFilterId, setCurrQuickFilterId] = useState(\n null\n );\n const currQuickFilter = quickFilters?.find(\n ({ id }) => id === currQuickFilterId\n );\n\n const isMobile = useMatchMedia('mobile');\n const allFilter = useMemo(\n () =>\n showAllButton\n ? [\n {\n id: 'all',\n name: ,\n isHidden: false,\n isSelected: isAllSelected,\n onClick: onResetAll,\n isCustomFilter: false,\n },\n ]\n : [],\n [allContentId, isAllSelected, onResetAll, showAllButton]\n );\n\n const mergedFilters = useMemo(\n () => (quickFilters ? [...allFilter, ...quickFilters] : allFilter),\n [allFilter, quickFilters]\n );\n\n const { initialQuery } = useFilterQueryContext();\n\n const hasFiltersApplied = useMemo(\n () => !isEqual(tempQuery, initialQuery),\n [initialQuery, tempQuery]\n );\n\n const onSaveQuickFilter = useMemo(\n () =>\n showCustomFilterButton\n ? () => {\n customFilterDialog.launchDialog();\n }\n : undefined,\n [customFilterDialog, showCustomFilterButton]\n );\n\n if (embeddedDisplayOnly || listView) {\n return (\n \n );\n }\n\n return (\n \n {isMobile && }\n {filters.length > 0 && (\n {\n if (!alwaysShowAllFilters && !isOpen) {\n resetTempQuery?.();\n }\n }}\n >\n \n
    \n \n
    \n \n
    \n {hasFiltersApplied && filterAppliedCounts > 0 && (\n {filterAppliedCounts}\n )}\n
    \n
    \n \n {!alwaysShowAllFilters ? (\n \n ) : (\n \n )}\n \n \n )}\n {!isMobile && (\n \n {mergedFilters?.map(({ id, name, isHidden, isSelected, onClick }) => {\n if (isHidden) {\n return null;\n }\n return (\n \n {name}\n \n );\n })}\n \n )}\n {showCustomFilterButton && (\n <>\n {\n customFilterDialog.launchDialog();\n }}\n onUpdateCustomQuickFilter={(id) => {\n setCurrQuickFilterId(id);\n customFilterDialog.launchDialog();\n }}\n />\n {customFilterDialog.dialogProps.isOpen && (\n \n ) : (\n \n )\n }\n defaultValues={\n currQuickFilter && currQuickFilter.isCustomFilter\n ? {\n filterName: currQuickFilter.name as string,\n }\n : undefined\n }\n validateIsFilterUnique={(val) => {\n if (currQuickFilterId && val === currQuickFilterId) {\n return true;\n }\n return (\n quickFilters === undefined ||\n !quickFilters.some(({ id }) => id === val)\n );\n }}\n onSave={(data) => {\n if (currQuickFilterId) {\n onUpdateCustomQuickFilter?.(currQuickFilterId, {\n name: data.filterName,\n });\n } else {\n onCreateCustomQuickFilter?.({ name: data.filterName });\n }\n setCurrQuickFilterId(null);\n customFilterDialog.closeDialog();\n }}\n onCancel={() => {\n setCurrQuickFilterId(null);\n customFilterDialog.closeDialog();\n }}\n />\n )}\n \n )}\n
    \n );\n}\n","import { isEqual } from 'lodash-es';\nimport { useMemo } from 'react';\nimport { DateRangeSelector } from 'src/core/POS/DateRangeSelector';\nimport { PosMultiSelect } from 'src/core/POS/PosMultiSelect';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { DateRangePresetName } from 'src/utils/dateTimeUtils';\nimport {\n ActionType,\n AuditActionType,\n DateTimeRangeWithRelative,\n} from 'src/WebApiController';\n\nimport { FilterToolbarItemId } from '../Filters';\nimport { FilterToolbar } from '../FilterToolbar';\nimport * as styles from './ActivityLog.css';\n\nexport type ActivityLogFilterQuery = {\n date?: DateTimeRangeWithRelative | null;\n actionTypes: ActionType[];\n auditActionTypes: AuditActionType[];\n initiatedBy: string[];\n};\n\nexport type ActivityLogFilterProps = {\n currentFilter: ActivityLogFilterQuery;\n onCurrentFilterUpdated: (settings: ActivityLogFilterQuery) => void;\n allActionTypes?:\n | {\n actionType: ActionType;\n auditActionType?: AuditActionType | null;\n display: string;\n }[]\n | undefined;\n allUsers: (string | null)[] | undefined;\n};\n\nexport function ActivityLogFilter({\n currentFilter,\n onCurrentFilterUpdated,\n allActionTypes,\n allUsers,\n}: ActivityLogFilterProps) {\n const getAppliedFilterCounts = () => {\n let count = 0;\n\n if (currentFilter.date != null) {\n count++;\n }\n // Two filters are combined into one in UI\n if (\n currentFilter.actionTypes.length > 0 ||\n currentFilter.auditActionTypes.length > 0\n ) {\n count++;\n }\n if (currentFilter.initiatedBy.length > 0) {\n count++;\n }\n\n return count;\n };\n\n const availableUsers = useMemo(\n () =>\n (allUsers ?? [])\n ?.filter((x) => x != null)\n .toSorted((a, b) =>\n a == null || b == null\n ? 1\n : a.localeCompare(b, undefined, {\n sensitivity: 'base',\n })\n )\n .reduce(\n (acc, item) => {\n acc[item!] = item!;\n return acc;\n },\n {} as Record\n ),\n [allUsers]\n );\n\n const availableActionTypesWithAudit = useMemo(\n () =>\n (allActionTypes ?? [])\n .toSorted((a, b) =>\n a == null || b == null\n ? 1\n : a.toString().localeCompare(b.toString(), undefined, {\n sensitivity: 'base',\n })\n )\n .reduce(\n (acc, item) => {\n if (item.auditActionType) {\n acc[item.auditActionType] = item.display;\n } else {\n acc[item.actionType] = item.display;\n }\n return acc;\n },\n {} as Record\n ),\n [allActionTypes]\n );\n\n const defaultFilter = {\n actionTypes: [],\n auditActionTypes: [],\n initiatedBy: [],\n };\n return (\n
    \n onCurrentFilterUpdated(defaultFilter)}\n filterAppliedCounts={getAppliedFilterCounts()}\n alwaysShowAllFilters\n filters={[\n {\n items: [\n {\n filterId: 'date' as FilterToolbarItemId,\n labelContentId: ContentId.Date,\n filterQueryKeys: ['date'] as FilterToolbarItemId[],\n filterItem: (\n \n onCurrentFilterUpdated({\n ...currentFilter,\n date: newValue ?? null,\n })\n }\n />\n ),\n },\n {\n filterId: 'auditActionTypes' as FilterToolbarItemId,\n labelContentId: ContentId.ActivityLogActionType,\n filterQueryKeys: [\n 'actionTypes',\n 'auditActionTypes',\n ] as FilterToolbarItemId[],\n filterItem: (\n 10\n }\n onChange={(newValues) => {\n if (newValues) {\n const actionTypes = newValues.filter((x) =>\n Object.keys(ActionType).includes(x)\n );\n const auditActionTypes = newValues.filter((x) =>\n Object.keys(AuditActionType).includes(x)\n );\n onCurrentFilterUpdated({\n ...currentFilter,\n actionTypes: actionTypes as ActionType[],\n auditActionTypes:\n auditActionTypes as AuditActionType[],\n });\n } else {\n onCurrentFilterUpdated({\n ...currentFilter,\n actionTypes: [],\n auditActionTypes: [],\n });\n }\n }}\n valueOptionsContent={availableActionTypesWithAudit}\n />\n ),\n },\n {\n filterId: 'initiatedBy' as FilterToolbarItemId,\n labelContentId: ContentId.ActivityLogInitiatedBy,\n filterQueryKeys: ['initiatedBy'] as FilterToolbarItemId[],\n filterItem: (\n 10}\n onChange={(newValues) => {\n if (newValues.length) {\n onCurrentFilterUpdated({\n ...currentFilter,\n initiatedBy: newValues,\n });\n } else {\n onCurrentFilterUpdated({\n ...currentFilter,\n initiatedBy: [],\n });\n }\n }}\n valueOptionsContent={availableUsers}\n />\n ),\n },\n ],\n },\n ]}\n />\n
    \n );\n}\n","import { useMemo, useState } from 'react';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport {\n ActivityLogTable,\n ActivityLogTableDataProps,\n} from 'src/tables/ActivityLogTable';\nimport type { ActivityLog } from 'src/WebApiController';\nimport { ActionType, Feature } from 'src/WebApiController';\nimport styled from 'styled-components/macro';\n\nimport * as styles from './ActivityLog.css';\nimport {} from './ActivityLog.styled';\nimport { ActivityLogFilter, ActivityLogFilterQuery } from './ActivityLogFilter';\n\ntype ActivityLogUiProps = ActivityLogTableDataProps & object;\n\nexport interface GroupedActivityLog extends ActivityLog {\n activityLogs: ActivityLog[];\n}\n\nexport function ActivityLog({\n activityLogs,\n count,\n failedToRetrieveData,\n}: ActivityLogUiProps) {\n const [filter, setFilter] = useState({\n actionTypes: [],\n auditActionTypes: [],\n initiatedBy: [],\n });\n\n const hasAutoPricingFeature = useUserHasFeature(Feature.AutoPricing);\n\n const filteredData = useMemo(() => {\n return activityLogs?.filter((activityLog) => {\n let allow = true;\n allow =\n filter?.date?.start == null ||\n new Date(filter.date?.start) <= new Date(activityLog.actionDate);\n allow &&=\n filter?.date?.end == null ||\n new Date(filter.date?.end) >= new Date(activityLog.actionDate);\n allow &&=\n ((filter?.actionTypes == null || filter?.actionTypes.length === 0) &&\n (filter?.auditActionTypes == null ||\n filter?.auditActionTypes.length === 0)) ||\n filter.actionTypes.includes(activityLog.actionType) ||\n (activityLog.auditActionType != null &&\n filter.auditActionTypes.includes(activityLog.auditActionType));\n allow &&=\n filter?.initiatedBy == null ||\n filter?.initiatedBy.length === 0 ||\n (activityLog.initiatedBy != null &&\n activityLog.initiatedBy.username != null &&\n filter.initiatedBy.includes(activityLog.initiatedBy.username)) ||\n (activityLog.initiatedByImpersonated != null &&\n activityLog.initiatedByImpersonated.username != null &&\n filter.initiatedBy.includes(\n activityLog.initiatedByImpersonated.username\n ));\n allow &&=\n hasAutoPricingFeature ||\n activityLog.actionType !== ActionType.ListingAutoPricingConfig;\n return allow;\n });\n }, [filter, activityLogs, hasAutoPricingFeature]);\n\n const groupedData: GroupedActivityLog[] = useMemo(() => {\n if (!filteredData) {\n return [];\n }\n\n const result: GroupedActivityLog[] = [];\n let currentGroup: GroupedActivityLog | null = null;\n\n const sortedFilteredData = filteredData.toSorted((a, b) =>\n a.actionDate.localeCompare(b.actionDate)\n );\n sortedFilteredData.forEach((activityLog) => {\n if (\n currentGroup &&\n currentGroup.actionTypeDisplay === activityLog.actionTypeDisplay &&\n currentGroup.initiatedBy.userId === activityLog.initiatedBy.userId\n ) {\n currentGroup.activityLogs.push(activityLog);\n } else {\n currentGroup = {\n ...activityLog,\n actionTypeDisplay: activityLog.actionTypeDisplay,\n initiatedBy: activityLog.initiatedBy,\n activityLogs: [activityLog],\n };\n result.push(currentGroup);\n }\n });\n\n return result;\n }, [filteredData]);\n\n return (\n
    \n {count > 0 && (\n
    \n \n ({\n actionType: log.actionType,\n auditActionType: log.auditActionType,\n display: log.actionTypeDisplay,\n }))}\n allUsers={activityLogs\n ?.filter((log) => log.initiatedBy?.username && true)\n .map((log) => log.initiatedBy?.username ?? null)}\n />\n \n
    \n )}\n \n
    \n );\n}\n\nconst StyledDiv = styled.span`\n float: left;\n`;\n","import { formatInTimeZone } from 'date-fns-tz';\nimport { useNavigate } from 'react-router-dom';\nimport { ConnectedEventInfo } from 'src/components/Events/ConnectedEventInfo';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useSiteTimezoneContext } from 'src/contexts/SiteTimezoneContext/SiteTimezoneContext';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { TooltipPopover } from 'src/core/ui/TooltipPopover';\nimport { OpenLinkIcon } from 'src/svgs/OpenLinkIcon';\nimport { getActivityLogChangeDisplay } from 'src/utils/activityLogUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getTimeAgoString, stringToUtcDate } from 'src/utils/dateTimeUtils';\nimport { getListingDetailsRelativeUrl } from 'src/utils/inventoryUtils';\nimport { getPurchaseOrderRelativeUrl } from 'src/utils/purchaseUtils';\nimport { getSaleDetailsRelativeUrl } from 'src/utils/saleUtils';\nimport {\n ActionOutboxEntityType,\n ActivityLog,\n ActivityLogValueChange,\n MarketplaceOperationResultState,\n} from 'src/WebApiController';\n\nimport * as styles from './ActivityLogDisplay.css';\n\n/**\n * Maximum number of lines we will show for additional info.\n *\n * If there are more than this value, 1 less will be shown and the rest will be hidden in a see\n * more.\n */\nconst MAX_ADDITIONAL_INFO_LINES = 3;\n\nexport type ActivityLogDisplayProps = {\n activityLog: ActivityLog;\n};\n\nexport function ActivityLogDisplay({\n activityLog: {\n actionTypeDisplay,\n actionDate: actionDateStr,\n entityId,\n entityType,\n additionalInfo,\n initiatedBy: initiatedByUser,\n initiatedByImpersonated,\n event,\n performer,\n venue,\n },\n}: ActivityLogDisplayProps) {\n const { timeZone } = useSiteTimezoneContext();\n const actionDate = new Date(stringToUtcDate(actionDateStr));\n const removedContent = useContent(ContentId.Empty);\n const navigate = useNavigate();\n\n const entityUrl = (() => {\n switch (entityType) {\n case ActionOutboxEntityType.Sale:\n return getSaleDetailsRelativeUrl(entityId);\n\n case ActionOutboxEntityType.Listing:\n return getListingDetailsRelativeUrl(entityId);\n\n case ActionOutboxEntityType.Purchase:\n return getPurchaseOrderRelativeUrl(entityId);\n\n case ActionOutboxEntityType.SellerSupportCase:\n return new URL(\n 'http://add-deep-link-to-support-case-view-when-its-created'\n );\n\n case ActionOutboxEntityType.Document:\n return null;\n }\n })();\n const timeAgo = getTimeAgoString(actionDate);\n const additionalInfoKeys = Object.keys(additionalInfo);\n const actionTypeIntent = (() => {\n for (const entry of Object.values(additionalInfo)) {\n if (\n entry.message?.state &&\n entry.message.state !== MarketplaceOperationResultState.Succeeded\n ) {\n return 'error';\n }\n }\n return 'success';\n })();\n\n const initiatedBy = (\n \n by {initiatedByUser?.username}\n {initiatedByImpersonated?.username\n ? ` (impersonating ${initiatedByImpersonated.username})`\n : ''}\n \n );\n return (\n \n \n
    \n
    \n \n {actionTypeDisplay}\n \n {timeAgo && (\n <>\n   •  \n \n {timeAgo}\n \n \n )}\n
    \n {additionalInfoKeys.length === 0\n ? initiatedBy\n : (additionalInfoKeys.length <= MAX_ADDITIONAL_INFO_LINES\n ? additionalInfoKeys\n : additionalInfoKeys.slice(0, MAX_ADDITIONAL_INFO_LINES - 1)\n ).map((key, i) => (\n
    \n \n {getActivityLogChangeDisplay(\n key,\n additionalInfo[key],\n removedContent\n )}\n \n {i === 0 && <> {initiatedBy}}\n
    \n ))}\n {additionalInfoKeys.length > MAX_ADDITIONAL_INFO_LINES && (\n }\n >\n {additionalInfoKeys.slice(2).map((key) => (\n
    \n {getActivityLogChangeDisplay(\n key,\n additionalInfo[key],\n removedContent\n )}\n
    \n ))}\n \n )}\n
    \n {entityUrl && (\n {\n navigate(entityUrl.toString());\n }}\n >\n \n \n )}\n
    \n \n
    \n );\n}\n","import { createContext, ReactNode, useContext } from 'react';\nimport { useToggle } from 'react-use';\n\ntype MenuContextType = {\n isMenuOpened: boolean;\n toggleIsMenuOpened: (nextValue?: boolean) => void;\n};\n\nconst MenuContext = createContext({\n isMenuOpened: false,\n toggleIsMenuOpened: () => void 0,\n});\n\ntype MenuContextProviderProps = { children: ReactNode };\n\nexport const MenuContextProvider = ({ children }: MenuContextProviderProps) => {\n const [isMenuOpened, toggleIsMenuOpened] = useToggle(false);\n\n return (\n \n {children}\n \n );\n};\n\nexport const useMenuState = () => useContext(MenuContext);\n","import { useCallback } from 'react';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { ErrorTypes } from 'src/contexts/ErrorBoundaryContext';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { LoginClient, LoginContext } from 'src/WebApiController';\n\nexport const useFetchLoginContext = () => {\n const loginErrorMessage = useContent(\n ContentId.Error_Unauthorized_GenericMessage\n );\n const fetchLoginContext = useCallback(\n (\n onSuccess: (loginContext: LoginContext) => void,\n onError?: (error: ErrorTypes) => void\n ) => {\n tryInvokeApi(\n () =>\n new LoginClient({})\n .getLoginContext(window.location.pathname)\n .then((loginContext) => {\n if (\n loginContext.isSuccess &&\n loginContext?.user?.activeAccount?.id != null\n ) {\n onSuccess(loginContext);\n } else {\n onError?.({\n status: 401,\n message: loginErrorMessage,\n response: JSON.stringify(loginContext),\n });\n }\n }),\n (error) => {\n onError?.(error);\n }\n );\n },\n [loginErrorMessage]\n );\n\n return {\n fetchLoginContext,\n };\n};\n","import { useAppContext } from 'src/contexts/AppContext';\nimport { getHasAccessToRoutes } from 'src/utils/userUtils';\n\nexport const useMainAccessibleRoute = () => {\n const { loginContext, appContext } = useAppContext();\n const mainAccessibleRoutes = getHasAccessToRoutes(\n loginContext?.user,\n appContext?.features\n );\n\n return mainAccessibleRoutes.length ? mainAccessibleRoutes[0] : undefined;\n};\n","import signalR, {\n HubConnection,\n HubConnectionBuilder,\n HubConnectionState,\n} from '@microsoft/signalr';\nimport {\n createContext,\n ReactNode,\n useContext,\n useEffect,\n useState,\n} from 'react';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { Feature } from 'src/WebApiController';\n\nimport { useAppContext } from '../AppContext';\nimport { SignalRLogger } from '../NotificationsContext';\n\nexport type IListingNotificationContext = {\n hubConnection?: HubConnection;\n};\n\nexport const ListingNotificationContext =\n createContext({\n hubConnection: undefined,\n });\n\nexport const useListingNotificationContext = () =>\n useContext(ListingNotificationContext);\n\nexport function ListingNotificationContextProvider({\n children,\n}: {\n children: ReactNode;\n}) {\n const hasHandlingListingSignalRFeature = useUserHasFeature(\n Feature.HandlingListingSignalR\n );\n const { activeAccountWebClientConfig } = useAppContext();\n const [hubConnection, setHubConnection] = useState();\n\n useEffect(() => {\n // Only attempt to connect to signal R when there is a login\n if (\n activeAccountWebClientConfig.activeAccountId &&\n hasHandlingListingSignalRFeature\n ) {\n if (\n !hubConnection ||\n hubConnection.state === HubConnectionState.Disconnected ||\n hubConnection.state === HubConnectionState.Disconnecting\n ) {\n const newHubConnection = new HubConnectionBuilder()\n .withUrl('/hubs/listingnotification')\n .withAutomaticReconnect()\n .configureLogging(new SignalRLogger())\n .build();\n\n setHubConnection(newHubConnection);\n\n newHubConnection\n .start()\n .then(() => {\n console.debug(\n `ListingNotification connection ready with id: ${newHubConnection.connectionId}`\n );\n })\n .catch((err) => {\n console.warn(\n 'ListingNotification could not be started at this time: ' + err\n );\n });\n\n newHubConnection.onclose((err) => {\n console.debug('ListingNotification connection closed', err);\n });\n }\n }\n\n return () => {\n if (\n hubConnection &&\n !(\n hubConnection.state === HubConnectionState.Disconnected ||\n hubConnection.state === HubConnectionState.Disconnecting\n )\n ) {\n console.debug(\n `Stopping ListingNotification connection (state: ${hubConnection.state}) with id: ${hubConnection.connectionId}`\n );\n hubConnection.stop();\n setHubConnection(undefined);\n }\n };\n }, [\n activeAccountWebClientConfig.activeAccountId,\n hubConnection,\n hasHandlingListingSignalRFeature,\n ]);\n\n return (\n \n {children}\n \n );\n}\n","import { debounce } from 'lodash-es';\nimport { useCallback, useEffect, useState } from 'react';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport {\n ItemIdWithRowVersion,\n useCatalogDataContext,\n} from 'src/contexts/CatalogDataContext';\nimport { useListingNotificationContext } from 'src/contexts/ListingNotificationContext';\nimport { entityTypeNumberToEntityTypeEnum } from 'src/utils/activityLogUtils';\nimport { ActionOutboxEntityType, Listing } from 'src/WebApiController';\n\nexport const useRefreshListingOnNotification = () => {\n const { hubConnection } = useListingNotificationContext();\n\n const { refreshEventForItems } = useCatalogDataContext();\n const { setActivePosEntity, posEntityId, posEntity } =\n useActivePosEntityContext();\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const debouncedSetActivePosEntity = useCallback(\n debounce((posEntityId: number) => {\n setActivePosEntity(posEntityId, undefined, true);\n }, 3000),\n []\n );\n\n const [_, setItemsIdsToRefresh] = useState([]);\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const debouncedSetItemsIdsToRefresh = useCallback(\n debounce((ids: ItemIdWithRowVersion[]) => {\n refreshEventForItems(ids, ActionOutboxEntityType.Listing);\n setItemsIdsToRefresh((prev) => []);\n }, 5000),\n [refreshEventForItems]\n );\n\n useEffect(() => {\n const messageHandler = async (message: string) => {\n try {\n const messageList = JSON.parse(message);\n for (const m of messageList) {\n console.debug(\n 'useRefreshListingOnNotification - got new notification',\n m,\n hubConnection\n );\n\n // Refresh relevant listing\n if (m.EntityId === posEntityId && posEntityId) {\n if (\n posEntity?.rowVer &&\n m.RowVersion &&\n m.RowVersion > posEntity?.rowVer\n ) {\n debouncedSetActivePosEntity(posEntityId);\n }\n }\n const entityType = entityTypeNumberToEntityTypeEnum(m.EntityType);\n if (\n entityType === ActionOutboxEntityType.Listing &&\n m.EntityId &&\n m.RowVersion\n ) {\n setItemsIdsToRefresh((prev) => {\n const existingRowVer = prev.find((i) => i.id === m.EntityId)\n ?.rowVer;\n if (existingRowVer && m.RowVersion <= existingRowVer) {\n return prev;\n }\n\n const newIds: ItemIdWithRowVersion[] = [\n ...prev.filter((i) => i.id !== m.EntityId),\n { id: m.EntityId, rowVer: m.RowVersion },\n ];\n debouncedSetItemsIdsToRefresh(newIds);\n return newIds;\n });\n }\n }\n } catch (e) {\n console.error(\n 'useRefreshListingOnNotification - malformed SignalR Message: ' +\n message\n );\n }\n };\n\n if (hubConnection) {\n hubConnection.on('new', messageHandler);\n }\n\n return () => {\n if (hubConnection) {\n hubConnection.off('new', messageHandler);\n }\n };\n }, [\n debouncedSetActivePosEntity,\n debouncedSetItemsIdsToRefresh,\n hubConnection,\n posEntity?.rowVer,\n posEntityId,\n ]);\n};\n","import React, { ComponentProps, ReactNode, useState } from 'react';\nimport { useDebounce } from 'react-use';\nimport { Modal as RSModal } from 'reactstrap';\nimport { CancelButton } from 'src/components/Buttons';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { PosSearchBox } from 'src/core/POS/PosSearchBox';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { Button, Stack } from 'src/core/ui';\nimport { SearchOutlineIcon } from 'src/svgs/Viagogo';\n\nimport * as styles from './SearchResultPickerDialog.css';\n\nexport type SearchResultPickerDialogProps = {\n header: JSX.Element;\n resultItems: T[];\n isLoading?: boolean;\n renderItem?: (item: T) => React.ReactElement;\n onResultItemPicked: (item: T) => void;\n onCancel?: () => void;\n} & ComponentProps;\n\nexport function SearchResultPickerDialog({\n header,\n resultItems,\n isLoading,\n renderItem,\n onResultItemPicked,\n onResultItemSearched,\n onCancel,\n ...rest\n}: SearchResultPickerDialogProps) {\n const [textSearch, setTextSearch] = useState('');\n useDebounce(\n () => {\n onResultItemSearched?.(textSearch);\n },\n 300,\n [textSearch]\n );\n\n return (\n }\n includeCloseButton={true}\n >\n {isLoading ? (\n \n ) : (\n \n {onResultItemSearched && (\n }\n value={textSearch}\n onSearchChange={setTextSearch}\n />\n )}\n {resultItems?.map((ri, i) => (\n onResultItemPicked(ri)}\n >\n {renderItem?.(ri) || (ri as ReactNode)}\n \n ))}\n \n )}\n \n );\n}\n","import { useQuery } from '@tanstack/react-query';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { Permission, SellerUserClient } from 'src/WebApiController';\n\nimport { useUserHasAnyOfPermissions } from './useUserHasAnyOfPermissions';\n\nexport const HAS_RELEASE_NOTES_UNREAD_QUERY_KEY =\n 'SellerUserClient.getHasReleaseNotesUnread';\n\nexport const useHasReleaseNotesUnread = ({\n currentLoginUserOnly,\n disabled,\n}: {\n /* whether to use the active account's user or the login user (which includes impersonating user) Id */\n currentLoginUserOnly?: boolean;\n disabled?: boolean;\n}) => {\n const { trackError } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n\n const canViewReleaseNotes = useUserHasAnyOfPermissions(\n Permission.General_ViewReleaseNotes\n );\n const shouldQuery =\n activeAccountWebClientConfig.activeAccountId != null &&\n !disabled &&\n canViewReleaseNotes;\n\n const hasReleaseNotesUnreadQuery = useQuery({\n queryKey: [\n HAS_RELEASE_NOTES_UNREAD_QUERY_KEY,\n activeAccountWebClientConfig.activeAccountId,\n currentLoginUserOnly,\n shouldQuery,\n ],\n queryFn: () => {\n if (!shouldQuery) {\n return null;\n }\n return new SellerUserClient(\n activeAccountWebClientConfig\n ).getHasReleaseNotesUnread(currentLoginUserOnly ?? false);\n },\n\n enabled: shouldQuery,\n staleTime: Infinity, // seldom change data and we invalidate on reload\n refetchOnWindowFocus: false,\n meta: {\n persist: false,\n onError: (error: ErrorTypes) => {\n trackError('SellerUserClient.getHasReleaseNotesUnread', error, {\n currentLoginUserOnly,\n });\n },\n },\n });\n\n return {\n hasReleaseNotesUnread: hasReleaseNotesUnreadQuery.data ?? false,\n };\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { useEffect, useState } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { SellerUserClient } from 'src/WebApiController';\n\nexport const useGetReleaseNoteHtml = ({\n releaseNoteIds,\n currentLoginUserOnly,\n disabled,\n}: {\n releaseNoteIds?: number[];\n currentLoginUserOnly?: boolean;\n disabled?: boolean;\n}) => {\n const { trackError } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const [releaseNoteHtmlByReleaseNoteId, setReleaseNoteHtmlByReleaseNoteId] =\n useState>({});\n\n const shouldQuery =\n activeAccountWebClientConfig.activeAccountId != null &&\n !disabled &&\n !!releaseNoteIds?.length;\n\n const releaseNoteIdsSorted = releaseNoteIds?.toSorted((a, b) => a - b);\n\n const releaseNoteHtmlQuery = useQuery({\n queryKey: [\n 'SellerUserClient.getAvailableReleaseNotes',\n activeAccountWebClientConfig.activeAccountId,\n currentLoginUserOnly,\n releaseNoteIdsSorted,\n ],\n queryFn: () => {\n if (!shouldQuery) {\n return null;\n }\n return new SellerUserClient(\n activeAccountWebClientConfig\n ).getReleaseNoteHtmlByReleaseNoteIds(\n currentLoginUserOnly ?? false,\n releaseNoteIdsSorted ?? []\n );\n },\n\n enabled: shouldQuery,\n staleTime: Infinity, // seldom change data and we invalidate on reload\n refetchOnWindowFocus: false,\n meta: {\n persist: false,\n onError: (error: ErrorTypes) => {\n trackError(\n 'SellerUserClient.getReleaseNoteHtmlByReleaseNoteIds',\n error,\n { currentLoginUserOnly, releaseNoteIdsSorted }\n );\n },\n },\n });\n\n useEffect(() => {\n // Accumulate release note html\n if (releaseNoteHtmlQuery.data != null) {\n const alreadyContainsAllReleaseNoteIds = releaseNoteHtmlQuery.data.every(\n (r) => !!releaseNoteHtmlByReleaseNoteId[r.id]\n );\n\n if (!alreadyContainsAllReleaseNoteIds) {\n setReleaseNoteHtmlByReleaseNoteId((prev) => {\n return {\n ...prev,\n ...releaseNoteHtmlQuery.data!.reduce(\n (acc, curr) => {\n acc[curr.id] = curr.descriptionHtml ?? '';\n return acc;\n },\n {} as Record\n ),\n };\n });\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [releaseNoteHtmlQuery.data]);\n\n return {\n releaseNoteHtmlByReleaseNoteId: releaseNoteHtmlByReleaseNoteId,\n isLoading: releaseNoteHtmlQuery.isLoading,\n };\n};\n","import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport {\n Permission,\n ReleaseNote,\n SellerUserClient,\n UserSetting,\n} from 'src/WebApiController';\n\nimport { HAS_RELEASE_NOTES_UNREAD_QUERY_KEY } from './useHasReleaseNotesUnread';\nimport { useUserHasAnyOfPermissions } from './useUserHasAnyOfPermissions';\nimport { useServerUserSetting } from './useUserSetting';\n\nexport const useReleaseNotes = ({\n getUnreadOnly,\n currentLoginUserOnly,\n disabled,\n}: {\n getUnreadOnly?: boolean;\n /* whether to use the active account's user or the login user (which includes impersonating user) Id */\n currentLoginUserOnly?: boolean;\n disabled?: boolean;\n}) => {\n const { trackError } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const queryClient = useQueryClient();\n\n const canViewReleaseNotes = useUserHasAnyOfPermissions(\n Permission.General_ViewReleaseNotes\n );\n\n const { value: releaseNoteIdsRead, setUserSetting } = useServerUserSetting<\n number[]\n >({\n id: UserSetting.ReleaseNoteIdsRead,\n currentLoginUserOnly: currentLoginUserOnly ?? false,\n });\n\n const shouldQuery =\n activeAccountWebClientConfig.activeAccountId != null &&\n !disabled &&\n canViewReleaseNotes;\n\n const mainQueryKey = [\n 'SellerUserClient.getAvailableReleaseNoteInfos',\n activeAccountWebClientConfig.activeAccountId,\n currentLoginUserOnly,\n shouldQuery,\n ];\n\n const unreadQueryKey = [...mainQueryKey, true /* getUnreadOnly */];\n\n const releaseNotesQuery = useQuery({\n queryKey: [...mainQueryKey, getUnreadOnly],\n queryFn: () => {\n if (!shouldQuery) {\n return null;\n }\n return new SellerUserClient(\n activeAccountWebClientConfig\n ).getAvailableReleaseNoteInfos(\n currentLoginUserOnly ?? false,\n getUnreadOnly ?? false\n );\n },\n\n enabled: shouldQuery,\n staleTime: Infinity, // seldom change data and we invalidate on reload\n refetchOnWindowFocus: false,\n meta: {\n persist: false,\n onError: (error: ErrorTypes) => {\n trackError('SellerUserClient.getAvailableReleaseNoteInfos', error, {\n currentLoginUserOnly,\n getUnreadOnly,\n });\n },\n },\n });\n\n // Mutation to update release note id and refresh related queries\n const setReleaseNoteIdsReadMutation = useMutation({\n mutationFn: async ({ value }: { value: number[] }) => {\n return await setUserSetting(value);\n },\n // optimistic ui\n // Reference: https://tanstack.com/query/v3/docs/react/guides/optimistic-updates\n onMutate: ({ value }) => {\n queryClient.cancelQueries({ queryKey: unreadQueryKey });\n const prevValue = queryClient.getQueryData(\n unreadQueryKey\n );\n\n const newValue = prevValue?.filter((p) => !value.includes(p.id));\n\n queryClient.setQueryData(unreadQueryKey, newValue);\n return { prevValue };\n },\n onError: (err: ErrorTypes, { value }, context) => {\n queryClient.setQueryData(unreadQueryKey, context?.prevValue);\n trackError('SellerUserClient.getAvailableReleaseNoteInfos', err, {\n value,\n });\n },\n onSettled: () => {\n queryClient.invalidateQueries({ queryKey: unreadQueryKey });\n queryClient.invalidateQueries({\n queryKey: [HAS_RELEASE_NOTES_UNREAD_QUERY_KEY],\n });\n },\n });\n\n return {\n releaseNoteInfos: releaseNotesQuery.data,\n isLoading: releaseNotesQuery.isPending,\n releaseNoteIdsRead,\n setReleaseNoteIdsRead: async (noteIds: number[]) => {\n return await setReleaseNoteIdsReadMutation.mutateAsync({\n value: noteIds,\n });\n },\n };\n};\n","import clsx from 'clsx';\nimport { debounce } from 'lodash-es';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport {\n Content,\n FormatContent,\n useContent,\n} from 'src/contexts/ContentContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { useGetReleaseNoteHtml } from 'src/hooks/api/useGetReleaseNoteHtml';\nimport { useReleaseNotes } from 'src/hooks/useReleaseNotes';\nimport { LayoutContent } from 'src/navigations/LayoutContent';\nimport { NoData } from 'src/tables/Table';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { ReleaseNote, ReleaseNoteType } from 'src/WebApiController';\n\nimport { MainRoute } from '../MainRoute';\nimport * as reportsStyles from '../Reports/Reports.css';\nimport * as styles from './ReleaseNotes.css';\n\nexport function ReleaseNotes() {\n const whatsNewTitle = useContent(ContentId.WhatsNew);\n const releaseNotesText = useContent(ContentId.ReleaseNotes);\n\n const {\n releaseNoteInfos,\n releaseNoteIdsRead,\n setReleaseNoteIdsRead,\n isLoading,\n } = useReleaseNotes({});\n\n const isReleaseNoteRead = useCallback(\n (releaseNoteId: number) => {\n return releaseNoteIdsRead?.includes(releaseNoteId);\n },\n [releaseNoteIdsRead]\n );\n\n const markReleaseNoteAsRead = useCallback(\n async (releaseNoteId: number) => {\n if (isReleaseNoteRead(releaseNoteId)) {\n return;\n }\n\n await setReleaseNoteIdsRead([\n ...(releaseNoteIdsRead ?? []),\n releaseNoteId,\n ]);\n },\n [isReleaseNoteRead, setReleaseNoteIdsRead, releaseNoteIdsRead]\n );\n\n const releaseNotesSortedByType = useMemo(() => {\n if (!releaseNoteInfos) {\n return releaseNoteInfos;\n }\n\n const newFeatures = releaseNoteInfos.filter(\n (releaseNote) =>\n releaseNote.releaseNoteType === ReleaseNoteType.NewFeature\n );\n\n const bugFixes = releaseNoteInfos.filter(\n (releaseNote) => releaseNote.releaseNoteType === ReleaseNoteType.BugFix\n );\n\n return [...newFeatures, ...bugFixes];\n }, [releaseNoteInfos]);\n\n const [activeReleaseNote, setActiveReleaseNote] =\n useState(null);\n\n const { releaseNoteHtmlByReleaseNoteId = {}, isLoading: htmlIsLoading } =\n useGetReleaseNoteHtml({\n releaseNoteIds: activeReleaseNote ? [activeReleaseNote.id] : [],\n });\n\n useEffect(() => {\n if (activeReleaseNote == null) {\n if (releaseNotesSortedByType?.length) {\n setActiveReleaseNote(releaseNotesSortedByType[0]);\n debounce(() => {\n markReleaseNoteAsRead(releaseNotesSortedByType[0].id);\n }, 600)();\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [releaseNotesSortedByType]);\n\n return (\n \n
    \n

    \n \n

    \n\n
    \n {isLoading ? (\n \n ) : (\n <>\n {releaseNotesSortedByType?.length ? (\n <>\n \n {releaseNotesSortedByType?.map((releaseNote) => {\n return (\n {\n setActiveReleaseNote(releaseNote);\n markReleaseNoteAsRead(releaseNote.id);\n }}\n className={clsx(\n reportsStyles.navTitle,\n styles.flexRow,\n reportsStyles.textPrimary,\n {\n [reportsStyles.navTitleActive]:\n activeReleaseNote?.id === releaseNote.id,\n }\n )}\n title={releaseNote.title}\n >\n {releaseNote.title}\n {isReleaseNoteRead(releaseNote.id) ? null : (\n \n )}\n
    \n );\n })}\n
    \n {activeReleaseNote ? (\n
    \n {htmlIsLoading ? (\n \n ) : (\n \n )}\n
    \n ) : null}\n \n ) : (\n \n \n \n )}\n \n )}\n \n \n \n );\n}\n\nexport const UnreadDot = ({ fill = 'red' }: { fill?: string }) => (\n
    \n
    \n
    \n);\n","export default \"__VITE_ASSET__b13a0c23__\"","import { clsx } from 'clsx';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useSiteTheme } from 'src/contexts/SiteTheme/SiteThemeContext';\nimport StarburstLogo from 'src/images/StarburstLogo.png';\nimport { StubHubProLogo } from 'src/svgs';\nimport { TicketUtilLogo } from 'src/svgs/TicketUtilLogo';\nimport { CoBrandId } from 'src/WebApiController';\n\nimport * as styles from './ProLogo.css';\n\nexport const logoAreaDimensions = { height: '40px', width: 'auto' };\n\nexport type ProLogoProps = {\n className?: string;\n};\n\nexport function ProLogo({ className }: ProLogoProps) {\n const { isDarkMode } = useSiteTheme();\n\n const { appContext, cobrandId, overrideCoBrandId } = useAppContext();\n\n const onLogoClicked = () => {\n if (appContext?.isDevelopment) {\n let newCobrandId = cobrandId;\n switch (cobrandId) {\n case CoBrandId.StubHub:\n newCobrandId = CoBrandId.TicketUtil;\n break;\n case CoBrandId.TicketUtil:\n newCobrandId = CoBrandId.Starburst;\n break;\n case CoBrandId.Starburst:\n default:\n newCobrandId = CoBrandId.StubHub;\n break;\n }\n overrideCoBrandId(newCobrandId);\n }\n };\n\n return (\n
    \n {!appContext ? null : cobrandId === CoBrandId.TicketUtil ? (\n \n ) : cobrandId === CoBrandId.Starburst ? (\n // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions\n \n ) : (\n \n )}\n
    \n );\n}\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport const SellerAccountInfoContainer = styled.div<{ isCurrent: boolean }>`\n display: flex;\n align-items: center;\n gap: ${() => vars.spacing.sm};\n width: 100%;\n cursor: ${(props) => (props.isCurrent ? 'default' : 'inherit')};\n`;\n\nexport const SellerAccountNameContainer = styled.div`\n display: flex;\n flex-wrap: wrap;\n gap: ${() => vars.spacing.sm};\n`;\n\nexport const AccountTypeDiv = styled.div<{ isCurrent: boolean }>`\n color: ${(props) =>\n props.isCurrent\n ? props.theme.colors.textSuccess\n : props.theme.colors.textPrimary};\n`;\n\nexport const AccountNameDiv = styled.div<{ isCurrent: boolean }>`\n font-weight: ${(props) => (props.isCurrent ? 700 : 500)};\n color: ${(props) => props.theme.colors.textBrand};\n`;\n\nexport const ImpersonatedAccountNameDiv = styled.div`\n padding-left: ${() => vars.spacing.xxs};\n color: ${(props) => props.theme.colors.textPrimary};\n`;\n","import { Content } from 'src/contexts/ContentContext';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SellerAccount } from 'src/WebApiController';\n\nimport {\n AccountNameDiv,\n AccountTypeDiv,\n ImpersonatedAccountNameDiv,\n SellerAccountInfoContainer,\n SellerAccountNameContainer,\n} from './SellerAccountBasicInfo.style';\n\nexport const SellerAccountBasicInfo = ({\n account,\n isCurrent,\n}: {\n account: SellerAccount;\n isCurrent: boolean;\n}) => {\n return (\n \n \n \n {account.impersonatedUsername ? (\n \n ) : (\n \n )}\n :\n \n \n {account.accountName}\n \n \n {account.impersonatedUsername\n ? `(${account.impersonatedUsername})`\n : ''}\n \n \n \n );\n};\n","import { CoBrandId } from 'src/WebApiController';\nimport styled from 'styled-components/macro';\n\nexport const UserInfoDisplayContainer = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n\n ${({ theme: { media } }) =>\n `${media.makeMediaQuery(\n media.breakpoints.lg,\n `\n align-items: flex-end;\n `\n )}`}\n`;\nexport const ActiveAccountDisplay = styled.div<{ cobrandId?: CoBrandId }>`\n ${({\n theme: {\n typography: { getStyles },\n },\n }) => getStyles('body1')};\n text-overflow: ellipsis;\n width: 100%;\n overflow: hidden;\n white-space: nowrap;\n color: ${(props) =>\n props.cobrandId === CoBrandId.TicketUtil\n ? props.theme.colors.textInverted\n : props.theme.colors.textPrimary};\n\n @media ${({ theme: { media } }) => media.desktop} {\n text-align: end;\n }\n`;\n\nexport const ActiveUserDisplay = styled.div`\n text-overflow: ellipsis;\n width: 100%;\n overflow: hidden;\n white-space: nowrap;\n\n ${({ theme: { media } }) =>\n `${media.makeMediaQuery(\n media.breakpoints.lg,\n `\n text-align: end;\n `\n )}`}\n`;\n","import { UserDetail } from 'src/WebApiController';\n\nimport {\n ActiveAccountDisplay,\n ActiveUserDisplay,\n UserInfoDisplayContainer,\n} from './UserInfoDisplay.styled';\n\nexport const UserInfoDisplay = ({\n userInfo,\n showUserName = true,\n}: {\n userInfo?: UserDetail | null;\n showUserName?: boolean;\n}) => {\n const fullUserName = `${userInfo?.displayName}${\n userInfo?.impersonatorDisplayName\n ? ` (${userInfo?.impersonatorDisplayName})`\n : ''\n }`;\n\n const accountName = userInfo?.activeAccount?.accountName || '';\n return (\n \n {accountName}\n {showUserName && (\n \n {fullUserName}\n \n )}\n \n );\n};\n","import clsx from 'clsx';\nimport { ReactNode } from 'react';\nimport { CoBrandId } from 'src/WebApiController';\n\nimport * as styles from './MainNavTopBar.css';\n\ntype NavTitleProps = {\n children: ReactNode;\n cobrandId?: CoBrandId;\n isActive?: boolean;\n};\n\nexport const NavTitle = ({ children, cobrandId, isActive }: NavTitleProps) => {\n return (\n \n {children}\n \n );\n};\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport const HeaderWrapperDiv = styled.div`\n background-color: ${(props) => props.theme.colors.backgroundPrimary};\n color: ${(props) => props.theme.colors.textPrimary};\n width: 100%;\n padding: 0;\n border-top: 1px solid ${(props) => props.theme.colors.borderPrimary};\n border-bottom: 1px solid ${(props) => props.theme.colors.borderPrimary};\n`;\n\nexport const Header = styled.header`\n display: grid;\n grid-template-columns: 12% 1fr 8%;\n align-items: center;\n align-self: center;\n padding: ${() => `0 ${vars.spacing.sm}`};\n ${({ theme: { media } }) =>\n `${media.makeMediaQuery(\n media.breakpoints.md,\n `\n grid-template-columns: 20% 1fr 20%;\n padding: 0 ${vars.spacing.xl};\n }`\n )}`};\n`;\n\nexport const HeaderLeftAreaDiv = styled.div`\n display: flex;\n align-self: flex-start;\n align-items: stretch;\n align-self: center;\n padding: ${() => `${vars.spacing.sm} 0`};\n\n .brand-logo {\n display: flex;\n align-items: center;\n padding-inline-end: ${() => vars.spacing.xxs};\n ${({ theme: { media } }) =>\n `${media.makeMediaQuery(\n media.breakpoints.md,\n `padding-inline-end: ${vars.spacing.lg};`\n )}`}\n }\n`;\n\nexport const ProfileDiv = styled.div<{ loggedIn: boolean }>`\n display: flex;\n flex-direction: column-reverse;\n align-items: center;\n color: ${({ loggedIn, theme }) =>\n loggedIn ? theme.colors.textBrand : theme.colors.textPrimary};\n\n ${({ theme: { media } }) =>\n `${media.makeMediaQuery(\n media.breakpoints.md,\n `\n flex-direction: row;\n `\n )}`}\n\n svg {\n margin-inline-start: ${() => vars.spacing.sm};\n }\n`;\n\nexport const DropdownLabel = styled.strong`\n display: none;\n ${({ theme: { media } }) =>\n `${media.makeMediaQuery(\n media.breakpoints.md,\n `\n display: block;\n `\n )}`}\n`;\n\nexport const DropdownDivider = styled.div`\n border-bottom: 1px solid ${(props) => props.theme.colors.borderPrimary};\n width: 100%;\n`;\n\nexport const DesktopNavTitleSale = styled.div`\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: ${() => vars.spacing.sm};\n padding: 0 1px;\n\n ${({ theme: { media } }) =>\n `${media.makeMediaQuery(\n media.breakpoints.md,\n `\n font-weight: 500;\n font-size: ${() => vars.typography.fontSize['lg']};\n line-height: 24px;\n text-align: center;\n `\n )}\n `}\n\n &.active {\n font-weight: 600;\n color: ${(props) => props.theme.colors.textBrand};\n\n border-top-color: ${(props) => props.theme.colors.backgroundBrandActive};\n ${({ theme: { media, colors } }) =>\n `${media.makeMediaQuery(\n media.breakpoints.md,\n `border-bottom-color: ${colors.backgroundBrandActive};\n border-top-color: transparent;\n `\n )}`}\n\n &:hover {\n color: ${(props) => props.theme.colors.textBrandHover};\n border-bottom-color: ${(props) =>\n props.theme.colors.backgroundBrandHover};\n }\n }\n`;\n\nexport const NavTitleSaleCheck = styled.span`\n svg {\n fill: ${(props) => props.theme.colors.accent100};\n }\n`;\n","import { useCallback, useState } from 'react';\nimport { Link, useNavigate } from 'react-router-dom';\nimport { NavLink } from 'reactstrap';\nimport { AppRouteConfigs } from 'src/app/AppRoutes';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { PosDropdown, PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { SearchResultPickerDialog } from 'src/dialogs/SearchResultPickerDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useHasReleaseNotesUnread } from 'src/hooks/useHasReleaseNotesUnread';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { UnreadDot } from 'src/navigations/Routes/ReleaseNotes';\nimport {\n IconsFill,\n ProfileOutlineIcon,\n SigninIcon,\n SignoutIcon,\n} from 'src/svgs/Viagogo';\nimport { REACT_APP_REPORTS_BRIDGE_URL } from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { hasAccessToRoute, sortSellerAccount } from 'src/utils/userUtils';\nimport {\n Feature,\n LoginClient,\n Permission,\n SellerAccount,\n SellerAccountClient,\n} from 'src/WebApiController';\n\nimport { ProLogo } from '../../../components/common/ProLogo';\nimport { SellerAccountBasicInfo } from '../../../components/SellerAccountBasicInfo';\nimport { UserInfoDisplay } from '../UserInfoDisplay';\nimport { NavTitle } from './MainNavTitle';\nimport * as styles from './MainNavTopBar.css';\nimport {\n DropdownDivider,\n DropdownLabel,\n Header,\n HeaderLeftAreaDiv,\n HeaderWrapperDiv,\n} from './MainNavTopBar.styled';\n\nexport function MainNavTopBar() {\n const {\n appContext,\n cobrandId,\n mainRoute,\n loginContext,\n activeAccountWebClientConfig,\n } = useAppContext();\n\n const navigate = useNavigate();\n const signInText = useContent(ContentId.SignIn);\n const myAccountText = useContent(ContentId.MyAccount);\n const menuText = loginContext ? myAccountText : signInText;\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const [sellerAccounts, setSellerAccounts] = useState([]);\n const { closeDialog, launchDialog, dialogProps } = useBasicDialog();\n const [isSellerAccountLoading, setIsSellerAccountLoading] = useState(false);\n const hasKBFeature = useUserHasFeature(Feature.KnowledgePortalPage);\n\n const canViewReleaseNotes = useUserHasAnyOfPermissions(\n Permission.General_ViewReleaseNotes\n );\n const canViewNotifications = useUserHasAnyOfPermissions(\n Permission.General_ViewNotifications\n );\n const canViewStubhubPayments = useUserHasAnyOfPermissions(\n Permission.Accounting_ViewStubhubPayments\n );\n\n const allowedRoutes = Object.values(AppRouteConfigs).filter(\n (r) =>\n r.view != null &&\n hasAccessToRoute(loginContext?.user, appContext?.features, r.view)\n );\n\n const { hasReleaseNotesUnread } = useHasReleaseNotesUnread({});\n\n const onSwitchAccountClicked = useCallback(async () => {\n const accounts = await tryInvokeApi(\n async () => {\n setIsSellerAccountLoading(true);\n return await new SellerAccountClient(\n activeAccountWebClientConfig\n ).getCurrentUserSellerAccounts();\n },\n (error) => {\n showErrorDialog(\n 'SellerAccountClient.getCurrentUserSellerAccounts',\n error\n );\n },\n () => setIsSellerAccountLoading(false)\n );\n if (accounts) {\n setSellerAccounts(sortSellerAccount(accounts));\n launchDialog();\n }\n }, [activeAccountWebClientConfig, launchDialog, showErrorDialog]);\n\n const onSellerAccountPicked = useCallback(\n async (account: SellerAccount) => {\n if (account.id === activeAccountWebClientConfig.activeAccountId) {\n return;\n }\n\n await tryInvokeApi(\n async () => {\n setIsSellerAccountLoading(true);\n await new LoginClient(activeAccountWebClientConfig).setActiveAccount(\n account.id,\n account.impersonatedUserId\n );\n // We need to reload so all the data is reload with the new login context\n window.location.reload();\n closeDialog();\n },\n (error) => {\n showErrorDialog('LoginClient.setActiveAccount', error, {\n trackErrorData: account,\n });\n },\n () => setIsSellerAccountLoading(false)\n );\n },\n [activeAccountWebClientConfig, closeDialog, showErrorDialog]\n );\n\n const openInNewTab = (url: string) => {\n window.open(url, '_blank', 'noreferrer');\n };\n\n return (\n <>\n \n
    \n \n
    \n \n
    \n
    \n
    \n {allowedRoutes.map(({ view, label, path, icon: Icon }, index) => (\n \n \n {Icon && (\n \n )}\n {label || view}\n \n \n ))}\n
    \n
    \n } align=\"end\">\n {loginContext ? (\n <>\n \n {loginContext ? (\n \n ) : (\n {menuText}\n )}\n \n \n\n {loginContext?.user?.hasManyAccounts && (\n \n \n \n )}\n\n {canViewReleaseNotes && (\n navigate('/release-notes')}>\n
    \n \n {hasReleaseNotesUnread ? : null}\n
    \n
    \n )}\n\n {hasKBFeature && (\n navigate('/help')}>\n
    \n \n
    \n
    \n )}\n {canViewNotifications && (\n navigate('/notifications')}>\n \n \n )}\n\n {canViewStubhubPayments && (\n \n openInNewTab(REACT_APP_REPORTS_BRIDGE_URL!)\n }\n >\n \n \n )}\n\n navigate('/messages')}>\n \n \n\n navigate('/settings')}>\n \n \n\n \n navigate('/logout')}>\n \n \n \n \n \n \n ) : (\n navigate('/login')}>\n \n \n \n \n \n )}\n
    \n
    \n
    \n
    \n }\n resultItems={sellerAccounts || []}\n isLoading={isSellerAccountLoading}\n renderItem={(account: SellerAccount) => (\n \n )}\n onResultItemPicked={onSellerAccountPicked}\n onCancel={closeDialog}\n />\n \n );\n}\n","import { ProLogo } from '../../../components/common/ProLogo';\nimport {\n Header,\n HeaderLeftAreaDiv,\n HeaderWrapperDiv,\n} from './MainNavTopBar.styled';\n\nexport function MainNavTopBarEmpty() {\n return (\n \n
    \n \n \n \n
    \n
    \n );\n}\n","import { Content } from 'src/contexts/ContentContext';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SomethingWentWrong } from 'src/views';\n\nimport * as styles from './OfflineWrapper.css';\n\nexport const Offline = () => {\n return (\n
    \n }\n message={\n \n }\n />\n
    \n );\n};\n","import clsx from 'clsx';\nimport { Link } from 'react-router-dom';\nimport { IconsFill, IconsProps } from 'src/svgs/Viagogo';\n\nimport * as styles from './MenuItem.css';\n\ntype MenuItemProps = {\n isActive?: boolean;\n textContent: string | JSX.Element;\n path: string;\n icon: (props: IconsProps) => JSX.Element;\n onClick: (e: React.MouseEvent) => void;\n};\n\nexport const MenuItem = ({\n isActive = false,\n textContent,\n icon: Icon,\n path,\n onClick,\n}: MenuItemProps) => {\n return (\n
    \n \n
    \n \n
    \n {textContent}\n \n
    \n );\n};\n","import { useMemo } from 'react';\nimport { AppRouteConfigs } from 'src/app/AppRoutes';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { hasAccessToRoute } from 'src/utils/userUtils';\n\nimport { MenuItem } from '../MenuItem/MenuItem';\nimport * as styles from './MainMenu.css';\n\nexport const MainMenu = ({ toggleClose }: { toggleClose: () => void }) => {\n const { loginContext, appContext, mainRoute } = useAppContext();\n\n const user = loginContext?.user;\n const features = appContext?.features;\n const allowedRoutes = useMemo(\n () =>\n Object.values(AppRouteConfigs)\n .filter(\n (r) => r.view != null && hasAccessToRoute(user, features, r.view)\n )\n .map(({ view, label, path, icon }, index) => (\n \n )),\n [features, user, mainRoute, toggleClose]\n );\n\n return
    {allowedRoutes}
    ;\n};\n","import { useCallback, useState } from 'react';\nimport { useNavigate } from 'react-router';\nimport { MenuItems } from 'src/app/AppRoutes';\nimport { SellerAccountBasicInfo } from 'src/components/SellerAccountBasicInfo';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { PosDropdown, PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { SearchResultPickerDialog } from 'src/dialogs/SearchResultPickerDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useHasReleaseNotesUnread } from 'src/hooks/useHasReleaseNotesUnread';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport {\n DropdownDivider,\n DropdownLabel,\n} from 'src/navigations/MainNav/MainNavTopBar/MainNavTopBar.styled';\nimport { UserInfoDisplay } from 'src/navigations/MainNav/UserInfoDisplay';\nimport { MainRoute } from 'src/navigations/Routes/MainRoute';\nimport { UnreadDot } from 'src/navigations/Routes/ReleaseNotes';\nimport { ProfileOutlineIcon, SigninIcon, SignoutIcon } from 'src/svgs/Viagogo';\nimport { REACT_APP_REPORTS_BRIDGE_URL } from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { sortSellerAccount } from 'src/utils/userUtils';\nimport {\n Feature,\n LoginClient,\n Permission,\n SellerAccount,\n SellerAccountClient,\n} from 'src/WebApiController';\n\nimport { MenuItem } from '../MenuItem/MenuItem';\nimport {\n icon,\n menuItem,\n menuText,\n releaseNoteOptionContainer,\n} from '../MenuItem/MenuItem.css';\n\nconst menuItems = [MainRoute.Settings] as const;\n\nexport const UserMenu = ({ toggleClose }: { toggleClose: () => void }) => {\n const { mainRoute } = useAppContext();\n return (\n
    \n \n {menuItems.map((item, index) => {\n const { view, path, label, icon } = MenuItems[item];\n return (\n \n );\n })}\n
    \n );\n};\n\nconst MyAccountMenuItem = () => {\n const { loginContext } = useAppContext();\n const userDisplayName = loginContext?.user?.activeAccount.accountName;\n return (\n <>\n
    \n
    \n \n
    \n \n {userDisplayName ?? }\n \n
    \n \n );\n};\n\nconst Dropdown = ({ toggleClose }: { toggleClose: () => void }) => {\n const { loginContext, activeAccountWebClientConfig } = useAppContext();\n const signInText = useContent(ContentId.SignIn);\n const navigate = useNavigate();\n const [sellerAccounts, setSellerAccounts] = useState([]);\n const [filteredSellerAccounts, setFilteredSellerAccounts] = useState<\n SellerAccount[]\n >([]);\n const [isSellerAccountLoading, setIsSellerAccountLoading] = useState(false);\n\n const { showErrorDialog } = useErrorBoundaryContext();\n const { closeDialog, launchDialog, dialogProps } = useBasicDialog();\n const myAccountText = useContent(ContentId.MyAccount);\n const menuText = loginContext ? myAccountText : signInText;\n\n const { hasReleaseNotesUnread } = useHasReleaseNotesUnread({});\n const hasKBFeature = useUserHasFeature(Feature.KnowledgePortalPage);\n const canViewReleaseNotes = useUserHasAnyOfPermissions(\n Permission.General_ViewReleaseNotes\n );\n const canViewNotifications = useUserHasAnyOfPermissions(\n Permission.General_ViewNotifications\n );\n const canViewStubhubPayments = useUserHasAnyOfPermissions(\n Permission.Accounting_ViewStubhubPayments\n );\n\n const onFilterSellerAccount = useCallback(\n (text: string) => {\n text = text.toLocaleUpperCase();\n const filtered = sellerAccounts.filter(\n (sa) =>\n sa.accountName.toLocaleUpperCase().includes(text) ||\n sa.impersonatedUsername?.toLocaleUpperCase()?.includes(text) ||\n sa.id.toLocaleUpperCase().includes(text)\n );\n setFilteredSellerAccounts(filtered);\n },\n [sellerAccounts]\n );\n\n const openInNewTab = (url: string) => {\n window.open(url, '_blank', 'noreferrer');\n };\n\n const onSwitchAccountClicked = useCallback(async () => {\n const accounts = await tryInvokeApi(\n async () => {\n setIsSellerAccountLoading(true);\n return await new SellerAccountClient(\n activeAccountWebClientConfig\n ).getCurrentUserSellerAccounts();\n },\n (error) => {\n showErrorDialog(\n 'SellerAccountClient.getCurrentUserSellerAccounts',\n error\n );\n },\n () => setIsSellerAccountLoading(false)\n );\n if (accounts) {\n const sorted = sortSellerAccount(accounts);\n setSellerAccounts(sorted);\n setFilteredSellerAccounts(sorted);\n launchDialog();\n }\n }, [activeAccountWebClientConfig, launchDialog, showErrorDialog]);\n\n const onSellerAccountPicked = useCallback(\n async (account: SellerAccount) => {\n if (account.id === activeAccountWebClientConfig.activeAccountId) {\n return;\n }\n\n await tryInvokeApi(\n async () => {\n setIsSellerAccountLoading(true);\n await new LoginClient(activeAccountWebClientConfig).setActiveAccount(\n account.id,\n account.impersonatedUserId\n );\n // We need to reload so all the data is reload with the new login context\n window.location.reload();\n closeDialog();\n },\n (error) => {\n showErrorDialog('LoginClient.setActiveAccount', error, {\n trackErrorData: account,\n });\n },\n () => setIsSellerAccountLoading(false)\n );\n },\n [activeAccountWebClientConfig, closeDialog, showErrorDialog]\n );\n\n return (\n <>\n {loginContext ? (\n }\n align=\"start\"\n triggerProps={{ style: { width: '100%' } }}\n >\n <>\n \n {loginContext ? (\n \n ) : (\n {menuText}\n )}\n \n \n {loginContext?.user?.hasManyAccounts && (\n {\n onSwitchAccountClicked();\n toggleClose();\n }}\n >\n \n \n )}\n {canViewStubhubPayments && (\n {\n openInNewTab(REACT_APP_REPORTS_BRIDGE_URL!);\n toggleClose();\n }}\n >\n \n \n )}\n\n {canViewReleaseNotes && (\n {\n navigate('/release-notes');\n toggleClose();\n }}\n >\n
    \n \n {hasReleaseNotesUnread ? : null}\n
    \n \n )}\n\n {hasKBFeature && (\n {\n navigate('/help');\n toggleClose();\n }}\n >\n
    \n \n
    \n \n )}\n\n {canViewNotifications && (\n {\n navigate('/notifications');\n toggleClose();\n }}\n >\n \n \n )}\n\n \n {\n navigate('/logout');\n toggleClose();\n }}\n >\n \n \n \n \n \n \n \n ) : (\n }\n path={'/login'}\n icon={SigninIcon}\n onClick={toggleClose}\n />\n )}\n }\n resultItems={filteredSellerAccounts ?? []}\n isLoading={isSellerAccountLoading}\n renderItem={(account: SellerAccount) => (\n \n )}\n onResultItemSearched={onFilterSellerAccount}\n onResultItemPicked={onSellerAccountPicked}\n onCancel={closeDialog}\n />\n \n );\n};\n","import clsx from 'clsx';\nimport { debounce } from 'lodash-es';\nimport { useCallback, useEffect, useMemo, useRef } from 'react';\nimport { MenuItems } from 'src/app/AppRoutes';\nimport { ProLogo } from 'src/components/common/ProLogo';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { MainRoute } from 'src/navigations/Routes/MainRoute';\nimport { CrossIcon } from 'src/svgs/Viagogo';\nimport { isInFullPageEventView } from 'src/utils/deepLinkUtils';\nimport { hasAccessToRoute } from 'src/utils/userUtils';\nimport { Feature } from 'src/WebApiController';\n\nimport { MainMenu } from './MainMenu/MainMenu';\nimport * as styles from './MainNavSideBar.css';\nimport { MenuItem } from './MenuItem/MenuItem';\nimport { UserMenu } from './UserMenu/UserMenu';\n\ntype MainNavSideBarProps = {\n toggleMenu: (value?: boolean) => void;\n isExpanded: boolean;\n};\n\nconst OPEN_MENU_MOUSE_EVENT = 'mouseenter';\nconst CLOSE_MENU_MOUSE_EVENT = 'mouseleave';\n\nexport const MainNavSideBar = ({\n toggleMenu,\n isExpanded,\n}: MainNavSideBarProps) => {\n const isMobile = useMatchMedia('mobile');\n const { loginContext, appContext, mainRoute } = useAppContext();\n\n const delayedOpen = useMemo(() => {\n return debounce(() => {\n toggleMenu(true);\n }, 300);\n }, [toggleMenu]);\n\n const toggleClose = useCallback(() => {\n delayedOpen.cancel();\n toggleMenu(false);\n }, [delayedOpen, toggleMenu]);\n\n const mainSideBarRef = useRef(null);\n\n // Used to avoid the effect to unsubscribe and subscribe again to DOM events\n // when using a callback that depends on this.\n const useRefExpanded = useRef(isExpanded);\n useRefExpanded.current = isExpanded;\n\n const handleOnMouseEnter = useCallback(\n (e: MouseEvent) => {\n const isExpanded = useRefExpanded.current;\n if (!isExpanded) {\n delayedOpen();\n }\n },\n [delayedOpen]\n );\n\n const handleOnMouseLeave = useCallback(\n (e: MouseEvent) => {\n // Only close the menu if the target event is fired\n // from the main parent div\n if (mainSideBarRef.current === e?.target) {\n toggleClose();\n }\n },\n [toggleClose]\n );\n\n useEffect(() => {\n const sideBar = mainSideBarRef.current;\n sideBar?.addEventListener(OPEN_MENU_MOUSE_EVENT, handleOnMouseEnter);\n return () => {\n sideBar?.removeEventListener(OPEN_MENU_MOUSE_EVENT, handleOnMouseEnter);\n };\n }, [handleOnMouseEnter]);\n\n useEffect(() => {\n const sideBar = mainSideBarRef.current;\n sideBar?.addEventListener(CLOSE_MENU_MOUSE_EVENT, handleOnMouseLeave);\n return () => {\n sideBar?.removeEventListener(CLOSE_MENU_MOUSE_EVENT, handleOnMouseLeave);\n };\n }, [handleOnMouseLeave]);\n\n const hasHideNavAndFilterBarsFeature = useUserHasFeature(\n Feature.HideNavAndFilterBars\n );\n\n if (hasHideNavAndFilterBarsFeature && isInFullPageEventView(mainRoute)) {\n return null;\n }\n\n return (\n \n
    \n {isMobile && (\n
    \n \n
    \n )}\n
    \n
    \n \n
    \n \n {hasAccessToRoute(\n loginContext?.user,\n appContext?.features,\n MainRoute.Email\n ) && }\n
    \n
    \n
    \n \n
    \n
    \n \n );\n};\n\nconst MessagesItem = ({ toggleClose }: { toggleClose: () => void }) => {\n const { icon, label, path, view } = MenuItems[MainRoute.Email];\n\n const { mainRoute } = useAppContext();\n\n return (\n \n );\n};\n","import { ProLogo } from 'src/components/common/ProLogo';\nimport { HamburgerMenuIcon } from 'src/svgs';\n\nimport * as styles from './MobileTopBar.css';\n\ntype MobileTopBarProps = {\n toggleMenu: () => void;\n};\n\nexport const MobileTopBar = ({ toggleMenu }: MobileTopBarProps) => {\n return (\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n );\n};\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport const NavBarContainer = styled.div`\n background-color: ${(props) => props.theme.colors.backgroundPrimary};\n color: ${(props) => props.theme.colors.textPrimary};\n z-index: 100;\n padding: 0;\n width: 100%;\n`;\n\nexport const BottomNavBarContainer = styled(NavBarContainer)`\n position: fixed;\n bottom: 0;\n justify-content: space-around;\n\n @media ${({ theme: { media } }) => `${media.phone}`} {\n display: none;\n }\n`;\n\nexport const UnauthorizedAccessMessageContainer = styled.div`\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n margin: ${() => `${vars.spacing['5xl']} auto`};\n`;\n","import { useMemo } from 'react';\nimport { useNavigate, useSearchParams } from 'react-router-dom';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport {\n ACTIVE_EVENT_IDS_2_QUERY_PARAM,\n ACTIVE_EVENT_IDS_QUERY_PARAM,\n TAB_EVENT_IDS_2_QUERY_PARAM,\n TAB_EVENT_IDS_QUERY_PARAM,\n} from 'src/navigations/Routes/InventoryEvent/InventoryEvent.constants';\nimport { MainRoute } from 'src/navigations/Routes/MainRoute';\nimport { BackIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { CoBrandId } from 'src/WebApiController';\n\nimport * as styles from './BackSection.css';\n\nexport const BackSection = ({\n returnUrl,\n state,\n}: {\n returnUrl: string;\n state?: unknown;\n}) => {\n const navigate = useNavigate();\n const { cobrandId, mainRoute } = useAppContext();\n\n const [searchParams] = useSearchParams();\n\n const activeEventIds1 = searchParams.get(ACTIVE_EVENT_IDS_QUERY_PARAM);\n const tabEventIds1 = searchParams.get(TAB_EVENT_IDS_QUERY_PARAM);\n const activeEventIds2 = searchParams.get(ACTIVE_EVENT_IDS_2_QUERY_PARAM);\n const tabEventIds2 = searchParams.get(TAB_EVENT_IDS_2_QUERY_PARAM);\n\n const isCatchupMode = useMemo(\n () =>\n mainRoute === MainRoute.InventoryEvent &&\n ((activeEventIds1 && tabEventIds1) || (activeEventIds2 && tabEventIds2)),\n [mainRoute, activeEventIds1, tabEventIds1, activeEventIds2, tabEventIds2]\n );\n\n return (\n
    \n {\n navigate(returnUrl, { state });\n }}\n >\n \n \n \n \n \n
    \n );\n};\n","import { ReactNode } from 'react';\nimport { BackSection } from 'src/components/common/BackSection';\nimport { Stack } from 'src/core/ui';\n\nimport * as styles from './LayoutContent.css';\n\nexport const LayoutContentHeader = ({\n routeTitle,\n centerContent,\n rightContent,\n returnUrl,\n}: {\n routeTitle: ReactNode;\n centerContent?: ReactNode;\n rightContent?: ReactNode;\n returnUrl?: string;\n}) => {\n return (\n \n \n {returnUrl && }\n

    \n {routeTitle}\n

    \n
    \n \n {centerContent ??
     
    }\n
    \n \n {rightContent ??
     
    }\n
    \n \n );\n};\n","import { PropsWithChildren, ReactNode, useEffect } from 'react';\nimport { Helmet } from 'react-helmet';\nimport { useNavigate } from 'react-router-dom';\nimport { useMeasure } from 'react-use';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content, useContentContext } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { useMenuState } from 'src/contexts/MenuContext/MenuContext';\nimport { WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { Button, Stack } from 'src/core/ui';\nimport { useFetchLoginContext } from 'src/hooks/useFetchLoginContext';\nimport { useMainAccessibleRoute } from 'src/hooks/useMainAccessibleRoute';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { useNetworkState } from 'src/hooks/useNetworkState';\nimport { useRefreshListingOnNotification } from 'src/hooks/useRefreshListingOnNotification';\nimport { MainNavTopBar } from 'src/navigations/MainNav/MainNavTopBar';\nimport { Offline } from 'src/navigations/Routes/Offline';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { navigateToMainRoute } from 'src/utils/deepLinkUtils';\nimport { hasAccessToRoute } from 'src/utils/userUtils';\nimport { CoBrandId } from 'src/WebApiController';\n\nimport { MainNavSideBar, MobileTopBar } from '../MainNav';\nimport { MainRoute } from '../Routes/MainRoute';\nimport * as styles from './LayoutContent.css';\nimport {\n BottomNavBarContainer,\n UnauthorizedAccessMessageContainer,\n} from './LayoutContent.styled';\nimport { LayoutContentHeader } from './LayoutContentHeader';\n\nconst OFFLINE_TIMEOUT_MS = 15 * 1000;\n\nexport function LayoutContent({\n children,\n mainRoute,\n routeTitle,\n centerContent,\n rightContent,\n returnUrl,\n}: PropsWithChildren<{\n mainRoute: MainRoute;\n routeTitle?: string;\n centerContent?: ReactNode;\n rightContent?: ReactNode;\n returnUrl?: string;\n}>) {\n const { appContext, cobrandId, loginContext, setLoginContext, setMainRoute } =\n useAppContext();\n const { isLoading } = useContentContext();\n const { isMenuOpened, toggleIsMenuOpened } = useMenuState();\n const isOnline = useNetworkState(OFFLINE_TIMEOUT_MS);\n const navigate = useNavigate();\n const { showErrorDialog } = useErrorBoundaryContext();\n const { fetchLoginContext } = useFetchLoginContext();\n const isMobile = useMatchMedia('mobile');\n const [bottomNavbarRef, { height: bottomNavbarHeight }] =\n useMeasure();\n useRefreshListingOnNotification();\n\n // Set what view we're in\n useEffect(() => {\n setMainRoute(mainRoute);\n if (\n // Only get login context if the route is not one of the login/logout ones\n ![\n MainRoute.Login,\n MainRoute.LoginCallback,\n MainRoute.LoginFailure,\n MainRoute.Logout,\n ].includes(mainRoute)\n ) {\n fetchLoginContext(setLoginContext, (error) => {\n showErrorDialog('LoginClient.getLoginContext', error, {\n onDismissError: () => {\n navigate(`/login`, {\n state: { returnUrl: window.location.pathname },\n });\n },\n trackErrorData: {\n returnUrl: window.location.pathname,\n mainRoute,\n loginContext,\n },\n });\n });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const hasAccess = hasAccessToRoute(\n loginContext?.user,\n appContext?.features,\n mainRoute\n );\n\n const mainRouteAccess = useMainAccessibleRoute();\n\n if (!hasAccess) {\n if (loginContext?.user) {\n // If the user doesn't have access\n // Find the first route he has access to and direct him to that\n if (mainRouteAccess) {\n navigateToMainRoute(mainRouteAccess, navigate);\n }\n } else {\n // If the user is null, the login may not complete so just wait\n // until the login user is not null\n return isOnline ? (\n
    \n \n
    \n ) : (\n \n );\n }\n }\n\n let routeTitleDefault;\n switch (cobrandId) {\n case CoBrandId.TicketUtil:\n routeTitleDefault = 'TicketUtils';\n break;\n case CoBrandId.Starburst:\n routeTitleDefault = 'Starburst Pro';\n break;\n case CoBrandId.StubHub:\n default:\n routeTitleDefault = 'StubHub Pro';\n }\n\n return (\n
    \n {(!isMobile || isMenuOpened) && (\n \n )}\n\n
    \n {(appContext?.version ?? '') < (loginContext?.version ?? '') && (\n // Using < so in case the client has higher version than the server\n // (when deploy happens client bits from SVC2 may be hitting api from SVC3, should be very rare)\n // To test this locally, change the < to <= to see the message/button\n \n }\n />\n \n \n )}\n {routeTitle ? (\n \n \n {routeTitleDefault} - {routeTitle}\n \n \n ) : (\n \n {routeTitleDefault}\n \n )}\n {isLoading ? (\n isOnline ? (\n
    \n \n
    \n ) : (\n \n )\n ) : hasAccess ? (\n <>\n {isMobile && (\n toggleIsMenuOpened(true)} />\n )}\n {!isMobile &&\n [\n MainRoute.Home,\n MainRoute.Inventory,\n MainRoute.InventoryEvent,\n MainRoute.InventorySearch,\n MainRoute.Sales,\n MainRoute.SalesEvent,\n MainRoute.SalesSearch,\n MainRoute.Purchases,\n MainRoute.PurchasesEvent,\n MainRoute.PurchaseSearch,\n MainRoute.Payments,\n MainRoute.Reports,\n MainRoute.ReportsV2,\n MainRoute.SponsoredListings,\n MainRoute.Settings,\n MainRoute.Discovery,\n MainRoute.HelpCenter,\n ].includes(mainRoute) &&\n routeTitle && (\n \n )}\n {children}\n \n ) : (\n loginContext?.user && (\n \n \n \n )\n )}\n {isMobile && (\n <>\n \n \n \n \n \n )}\n
    \n
    \n );\n}\n","import { useQuery } from '@tanstack/react-query';\nimport { Dispatch, SetStateAction, useMemo, useState } from 'react';\nimport { Components, Virtuoso } from 'react-virtuoso';\nimport { ActivityLogDisplay } from 'src/components/ActivityLog';\nimport {\n ActivityLogFilter,\n ActivityLogFilterQuery,\n} from 'src/components/ActivityLog/ActivityLogFilter';\nimport * as EmptySectionContent from 'src/components/common/EmptySectionContent';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { vars } from 'src/core/themes';\nimport { Card } from 'src/core/ui';\nimport { LayoutContent } from 'src/navigations/LayoutContent';\nimport { ErrorSolidIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ActivityLog, ActivityLogClient } from 'src/WebApiController';\n\nimport IconBulletList from '~icons/pos/bulletList';\n\nimport { MainRoute } from '../MainRoute';\nimport * as styles from './Activity.css';\n\n/**\n * Number of items to fetch\n */\nconst ACTIVITY_LOG_ITEM_COUNT = 1000;\n\ntype VirtuosoContext = {\n isLoading?: boolean;\n isError?: boolean;\n filter: ActivityLogFilterQuery;\n setFilter: Dispatch>;\n data?: ActivityLog[];\n};\n\nconst EmptyPlaceholder: Components<\n unknown,\n VirtuosoContext\n>['EmptyPlaceholder'] = ({ context }: { context?: VirtuosoContext }) => {\n if (context?.isLoading) {\n return ;\n }\n if (context?.isError) {\n return (\n \n }\n >\n \n \n \n \n );\n }\n return (\n }>\n \n \n );\n};\n\nconst Header: Components['Header'] = ({\n context,\n}: {\n context?: VirtuosoContext;\n}) => {\n const { filter, setFilter, data } = context ?? {};\n return (\n
    \n

    \n \n

    \n {filter && setFilter && (\n
    \n ({\n actionType: log.actionType,\n display: log.actionTypeDisplay,\n }))}\n allUsers={data\n ?.filter((log) => log.initiatedBy?.username && true)\n .map((log) => log.initiatedBy?.username ?? null)}\n />\n
    \n )}\n
    \n );\n};\n\n// XXX hack to prevent margin collapse on last element\nconst Footer = () => {\n return
    ;\n};\n\nexport function Activity() {\n const routeTitle = useContent(ContentId.Activity);\n const { trackError } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const activityLogResult = useQuery({\n queryKey: [\n 'ActivityLogClient.getRecentActivityLog',\n activeAccountWebClientConfig.activeAccountId,\n ACTIVITY_LOG_ITEM_COUNT,\n ],\n queryFn: () => {\n if (activeAccountWebClientConfig.activeAccountId == null) {\n return null;\n }\n return new ActivityLogClient(\n activeAccountWebClientConfig\n ).getRecentActivityLog(ACTIVITY_LOG_ITEM_COUNT, true);\n },\n\n enabled: activeAccountWebClientConfig.activeAccountId != null,\n refetchOnWindowFocus: false,\n meta: {\n persist: false,\n onError: (error: ErrorTypes) => {\n trackError('ActivityLogClient.getRecentActivityLog', error, {\n ACTIVITY_LOG_ITEM_COUNT,\n });\n },\n },\n });\n\n const [filter, setFilter] = useState({\n actionTypes: [],\n auditActionTypes: [],\n initiatedBy: [],\n });\n const filteredData = useMemo(() => {\n return activityLogResult.data?.filter((activityLog) => {\n let allow = true;\n allow =\n filter?.date?.start == null ||\n new Date(filter.date?.start) <= new Date(activityLog.actionDate);\n allow &&=\n filter?.date?.end == null ||\n new Date(filter.date?.end) >= new Date(activityLog.actionDate);\n allow &&=\n ((filter?.actionTypes == null || filter?.actionTypes.length === 0) &&\n (filter?.auditActionTypes == null ||\n filter?.auditActionTypes.length === 0)) ||\n filter.actionTypes.includes(activityLog.actionType) ||\n (activityLog.auditActionType != null &&\n filter.auditActionTypes.includes(activityLog.auditActionType));\n allow &&=\n filter?.initiatedBy == null ||\n filter?.initiatedBy.length === 0 ||\n (activityLog.initiatedBy != null &&\n activityLog.initiatedBy.username != null &&\n filter.initiatedBy.includes(activityLog.initiatedBy.username)) ||\n (activityLog.initiatedByImpersonated != null &&\n activityLog.initiatedByImpersonated.username != null &&\n filter.initiatedBy.includes(\n activityLog.initiatedByImpersonated.username\n ));\n return allow;\n });\n }, [filter, activityLogResult.data]);\n\n return (\n \n {\n return (\n
    \n \n \n \n
    \n );\n }}\n />\n
    \n );\n}\n","import {\n QueryObserverResult,\n useQuery,\n useQueryClient,\n UseQueryResult,\n} from '@tanstack/react-query';\nimport {\n createContext,\n useCallback,\n useContext,\n useMemo,\n useState,\n} from 'react';\nimport { DATA_REFRESH_RATE_IN_MILLIS_LONG } from 'src/utils/constants/constants';\nimport { getErrorInfoFromStatusCode } from 'src/utils/errorUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { AdGroup, CampaignManagerClient } from 'src/WebApiController';\n\nimport { useAppContext } from '../AppContext';\nimport { useErrorBoundaryContext } from '../ErrorBoundaryContext';\n\nexport type IAdGroupsDataContext = {\n adGroupsDataQuery: UseQueryResult;\n adGroupsData: AdGroup[] | null | undefined;\n errorInfo?: { errorHeader: React.ReactNode; errorMessage: React.ReactNode };\n refreshData: (\n adCampaignId?: string,\n adGroupId?: string\n ) => Promise;\n};\n\nexport const AdGroupsDataContext = createContext({\n adGroupsDataQuery: {} as UseQueryResult,\n adGroupsData: [],\n refreshData: () => Promise.resolve({} as QueryObserverResult),\n});\n\nexport const useAdGroupsDataContext = () => useContext(AdGroupsDataContext);\n\nexport const AdGroupsDataContextProvider = ({\n adCampaignId,\n adGroupId,\n children,\n}: {\n adCampaignId: string | undefined;\n adGroupId: string | undefined;\n children: React.ReactNode;\n}) => {\n const [errorInfo, setErrorInfo] = useState<{\n errorHeader: React.ReactNode;\n errorMessage: React.ReactNode;\n }>();\n\n const {\n adGroupsDataQuery: adGroupsDataQuery,\n adGroupsData,\n refreshData,\n } = useGetAdGroupsDataQuery(adCampaignId, adGroupId, setErrorInfo);\n\n return (\n \n {children}\n \n );\n};\n\nconst useGetAdGroupsDataQuery = (\n adCampaignId: string | undefined,\n adGroupId: string | undefined,\n setErrorInfo: (\n value: React.SetStateAction<\n | {\n errorHeader: React.ReactNode;\n errorMessage: React.ReactNode;\n }\n | undefined\n >\n ) => void\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const { trackError } = useErrorBoundaryContext();\n\n const ADGROUP_DATA_QUERY_KEY = 'CampaignManagerClient.retrieveAdGroups';\n const queryKey = useMemo(\n () => [\n ADGROUP_DATA_QUERY_KEY,\n activeAccountWebClientConfig.activeAccountId,\n adCampaignId,\n adGroupId,\n ],\n [activeAccountWebClientConfig.activeAccountId, adCampaignId, adGroupId]\n );\n\n const shouldQuery =\n activeAccountWebClientConfig.activeAccountId != null &&\n (adCampaignId != null || adGroupId != null);\n\n const adGroupsDataQuery = useQuery({\n queryKey: queryKey,\n queryFn: async () => {\n setErrorInfo(undefined);\n\n if (!shouldQuery) {\n return null;\n }\n\n return tryInvokeApi(\n async () => {\n const client = new CampaignManagerClient(\n activeAccountWebClientConfig\n );\n const data = await client.retrieveAdGroups(\n adCampaignId ?? undefined,\n adGroupId ?? undefined\n );\n return data;\n },\n (error) => {\n const { headerDisplay, messageDisplay } = getErrorInfoFromStatusCode(\n error?.status,\n error?.message\n );\n setErrorInfo({\n errorHeader: headerDisplay,\n errorMessage: messageDisplay,\n });\n trackError(ADGROUP_DATA_QUERY_KEY, error, {\n adCampaignId: adCampaignId,\n adGroupId: adGroupId,\n });\n }\n );\n },\n enabled: activeAccountWebClientConfig.activeAccountId != null,\n staleTime: Infinity, // Since we're always refetching on an interval, we don't want query to calculate whether the data is stale\n refetchOnWindowFocus: false,\n networkMode: 'offlineFirst',\n refetchInterval: DATA_REFRESH_RATE_IN_MILLIS_LONG,\n });\n\n const queryClient = useQueryClient();\n\n const refreshData = useCallback(async () => {\n queryClient.invalidateQueries({\n queryKey: queryKey,\n });\n\n return await adGroupsDataQuery.refetch();\n }, [adGroupsDataQuery, queryClient, queryKey]);\n\n return {\n adGroupsDataQuery: adGroupsDataQuery,\n adGroupsData: adGroupsDataQuery.data,\n refreshData: refreshData,\n };\n};\n","import {\n QueryObserverResult,\n useQuery,\n useQueryClient,\n} from '@tanstack/react-query';\nimport {\n createContext,\n useCallback,\n useContext,\n useMemo,\n useState,\n} from 'react';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { DATA_REFRESH_RATE_IN_MILLIS_LONG } from 'src/utils/constants/constants';\nimport { getErrorInfoFromStatusCode } from 'src/utils/errorUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n AdPlatformCatalogClient,\n AdPlatformCatalogResults,\n} from 'src/WebApiController';\n\nimport { useAppContext } from '../AppContext';\n\nexport const EmptyAdPlatformCatalogResults: AdPlatformCatalogResults = {\n events: {},\n performers: {},\n venues: {},\n listingsByExternalId: {},\n venueMapByEventId: {},\n};\n\nexport type IAdPlatformCatalogDataContext = {\n isLoading: boolean;\n isItemsLoading: boolean;\n data?: AdPlatformCatalogResults;\n errorInfo?: { errorHeader: React.ReactNode; errorMessage: React.ReactNode };\n refreshCatalog: () => Promise;\n};\n\nexport const AdPlatformCatalogDataContext =\n createContext({\n isLoading: false,\n isItemsLoading: false,\n refreshCatalog: () => Promise.resolve({} as QueryObserverResult),\n });\n\nexport const useAdPlatformCatalogDataContext = () =>\n useContext(AdPlatformCatalogDataContext);\n\nexport const AdPlatformCatalogDataContextProvider = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\n const [errorInfo, setErrorInfo] = useState<{\n errorHeader: React.ReactNode;\n errorMessage: React.ReactNode;\n }>();\n\n const { adPlatformCatalogDataQuery, refreshData } =\n useGetAdPlatformCatalogDataQuery(setErrorInfo);\n\n return (\n \n {children}\n \n );\n};\n\nconst useGetAdPlatformCatalogDataQuery = (\n setErrorInfo: (\n value: React.SetStateAction<\n | {\n errorHeader: React.ReactNode;\n errorMessage: React.ReactNode;\n }\n | undefined\n >\n ) => void\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const { trackError } = useErrorBoundaryContext();\n\n const ADPLATFORMCATALOG_DATA_QUERY_KEY = 'AdPlatformCatalogDataQuery';\n const queryKey = useMemo(\n () => [\n ADPLATFORMCATALOG_DATA_QUERY_KEY,\n activeAccountWebClientConfig.activeAccountId,\n ],\n [activeAccountWebClientConfig.activeAccountId]\n );\n\n const shouldQuery = activeAccountWebClientConfig.activeAccountId != null;\n\n const query = useQuery({\n queryKey: queryKey,\n queryFn: async () => {\n setErrorInfo(undefined);\n\n if (!shouldQuery) {\n return null;\n }\n\n return tryInvokeApi(\n async () => {\n const client = new AdPlatformCatalogClient(\n activeAccountWebClientConfig\n );\n const data = await client.getCatalogForSeller();\n return data;\n },\n (error) => {\n const { headerDisplay, messageDisplay } = getErrorInfoFromStatusCode(\n error?.status,\n error?.message\n );\n setErrorInfo({\n errorHeader: headerDisplay,\n errorMessage: messageDisplay,\n });\n trackError(ADPLATFORMCATALOG_DATA_QUERY_KEY, error, {});\n }\n );\n },\n enabled: activeAccountWebClientConfig.activeAccountId != null,\n staleTime: Infinity, // Since we're always refetching on an interval, we don't want query to calculate whether the data is stale\n refetchOnWindowFocus: false,\n networkMode: 'offlineFirst',\n refetchInterval: DATA_REFRESH_RATE_IN_MILLIS_LONG,\n });\n\n const queryClient = useQueryClient();\n\n const refreshData = useCallback(async () => {\n queryClient.invalidateQueries({\n queryKey: queryKey,\n });\n\n return await query.refetch();\n }, [query, queryClient, queryKey]);\n\n return {\n adPlatformCatalogDataQuery: query,\n adPlatformCatalogData: query.data,\n refreshData: refreshData,\n };\n};\n","import { useQuery, useQueryClient } from '@tanstack/react-query';\nimport { createContext, useState } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { DATA_REFRESH_RATE_IN_MILLIS_LONG } from 'src/utils/constants/constants';\nimport { getErrorInfoFromStatusCode } from 'src/utils/errorUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n AdPlatformReportingClient,\n AdPlatformTransactionAgg,\n TransactionAggType,\n} from 'src/WebApiController';\n\nexport type IAdPlatformReportingContext = {\n reportData: AdPlatformTransactionAgg[] | null | undefined;\n errorInfo?: { errorHeader: React.ReactNode; errorMessage: React.ReactNode };\n // TODO: Re-enable after CPC support\n //refreshData: (\n // aggType: TransactionAggType,\n // adCampaignId?: string\n //) => Promise>;\n};\n\nconst REPORTING_DATA_QUERY_KEY =\n 'AdPlatformReportingClient.getTransactionReport';\n\nexport const AdPlatformReportingContext =\n createContext({\n reportData: [],\n //refreshData: () =>\n // Promise.resolve({} as QueryObserverResult),\n });\n\nexport const AdPlatformReportingContextProvider = ({\n aggType,\n adCampaignId,\n children,\n}: {\n aggType: TransactionAggType;\n adCampaignId: string | undefined;\n children: React.ReactNode;\n}) => {\n const [errorInfo, setErrorInfo] = useState<{\n errorHeader: React.ReactNode;\n errorMessage: React.ReactNode;\n }>();\n\n // TODO: Re-enable after CPC support\n //const { reportQuery } = useGetAdPlatformReportingQuery(\n // aggType,\n // adCampaignId,\n // setErrorInfo\n //);\n const reportData: AdPlatformTransactionAgg[] = [];\n\n const { activeAccountWebClientConfig } = useAppContext();\n const queryClient = useQueryClient();\n\n // const refreshData = useCallback(\n // async (aggType: TransactionAggType, campaignId?: string) => {\n // queryClient.invalidateQueries({\n // queryKey: [\n // REPORTING_DATA_QUERY_KEY,\n // activeAccountWebClientConfig,\n // aggType,\n // campaignId,\n // ],\n // });\n // return reportQuery.refetch();\n // },\n // [activeAccountWebClientConfig, queryClient]\n // );\n\n return (\n \n {children}\n \n );\n};\n\nconst useGetAdPlatformReportingQuery = (\n aggType: TransactionAggType,\n adCampaignId: string | undefined,\n setErrorInfo: (\n value: React.SetStateAction<\n | {\n errorHeader: React.ReactNode;\n errorMessage: React.ReactNode;\n }\n | undefined\n >\n ) => void\n) => {\n const { activeAccountWebClientConfig, loginContext } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n\n const { getUiCurrency } = useLocalizationContext();\n\n const uiCurrency = getUiCurrency(\n loginContext?.user?.activeAccount?.currencyCode\n );\n\n const shouldQuery = activeAccountWebClientConfig.activeAccountId != null;\n\n const reportQuery = useQuery({\n queryKey: [\n REPORTING_DATA_QUERY_KEY,\n activeAccountWebClientConfig.activeAccountId,\n aggType,\n adCampaignId,\n ],\n queryFn: async () => {\n setErrorInfo(undefined);\n\n if (!shouldQuery) {\n return null;\n }\n\n return tryInvokeApi(\n async () => {\n const client = new AdPlatformReportingClient(\n activeAccountWebClientConfig\n );\n const data = await client.getTransactionReport(\n uiCurrency.code,\n aggType,\n adCampaignId,\n undefined\n );\n return data;\n },\n (error) => {\n const { headerDisplay, messageDisplay } = getErrorInfoFromStatusCode(\n error?.status,\n error?.message\n );\n setErrorInfo({\n errorHeader: headerDisplay,\n errorMessage: messageDisplay,\n });\n trackError(REPORTING_DATA_QUERY_KEY, error, {\n aggType: aggType,\n adCampaignId: adCampaignId,\n });\n }\n );\n },\n enabled: activeAccountWebClientConfig.activeAccountId != null,\n staleTime: Infinity,\n refetchOnWindowFocus: false,\n networkMode: 'offlineFirst',\n refetchInterval: DATA_REFRESH_RATE_IN_MILLIS_LONG,\n });\n return { reportQuery, reportData: reportQuery.data };\n};\n","export const SHIMMERING_DIV_HEIGHT_SINGLE_ADGROUPS = '40px';\n","import { AdGroupListingsQueryParam } from './constants/constants';\n\nexport const getAdGroupListingsUrl = (\n adGroupId: string,\n includeSearchParams = true\n): string => {\n let searchParams = '';\n if (includeSearchParams) {\n const url = new URL(window.location.href);\n url.searchParams.set(AdGroupListingsQueryParam, adGroupId);\n searchParams = `?${url.searchParams.toString()}`;\n }\n return `/sponsoredlistings/adgrouplistings${searchParams}`;\n};\n","import { useCallback } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosDropdown, PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { vars } from 'src/core/themes';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { IconsFill, MoreIcon } from 'src/svgs/Viagogo';\nimport { getAdGroupListingsUrl } from 'src/utils/adGroupListingsUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nexport const AdGroupActionsCell = ({ adGroupId }: { adGroupId: string }) => {\n const navigate = useNavigate();\n\n const onViewClick = useCallback(\n (url: string) => {\n setTimeout(() => {\n navigate(url, {\n state: {\n returnUrl: `${location.pathname}${location.search}`,\n },\n });\n }, 10);\n },\n [navigate]\n );\n\n return (\n \n \n \n
    \n }\n align=\"end\"\n >\n {\n if (e.button === 0 && e.getModifierState('Control') === false) {\n // Perform like a button click when it's a left-click (and no Ctrl)\n // Else the click will be whatever does\n e.preventDefault();\n e.stopPropagation();\n\n onViewClick(getAdGroupListingsUrl(adGroupId));\n }\n }}\n >\n \n \n \n \n );\n};\n","import { ColumnDef, createColumnHelper } from '@tanstack/react-table';\nimport { VenueNameDisplay } from 'src/components/Events/EventInfo';\nimport { ListingDisplay } from 'src/components/Listings/ListingDisplay';\nimport {\n COLUMN_DEFAULT_SIZE_LG,\n COLUMN_MAX_SIZE,\n COLUMN_MIN_SIZE,\n} from 'src/contexts/ColumnResizingContext/ColumnResizingContext.types';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { TableHeaderCellDiv } from 'src/core/ui/TableHeaderCellDiv';\nimport { TableShimmeringDiv } from 'src/tables/Table';\nimport { AdGroupsTableColumnId } from 'src/utils/columns/adGroups/adGroupsColumnUtils.types';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ADGROUPS_TABLE_COLUMN_ID_TO_CONTENT_ID } from 'src/utils/constants/contentIdMaps';\nimport { getEventDisplayText } from 'src/utils/eventWithDataUtils';\nimport { applyNumberFormatting } from 'src/utils/numberFormatter';\nimport { sortMoney } from 'src/utils/tableUtils';\nimport {\n AdGroupState,\n EventWithData,\n Listing,\n MoneyType,\n Performer,\n RowInfo,\n SectionInfo,\n TicketClassInfo,\n TopLevelCategory,\n UiMoney,\n Venue,\n} from 'src/WebApiController';\n\nimport { SHIMMERING_DIV_HEIGHT_SINGLE_ADGROUPS } from '../AdGroupsTable.type';\nimport { AdGroupActionsCell } from './AdGroupsActionsCell';\n\nexport type AdGroupRow = {\n id: string;\n name: string;\n state: AdGroupState;\n campaignId: string;\n baseBid: MoneyType;\n maxBid: MoneyType;\n dailyBudget: MoneyType;\n genre?: TopLevelCategory;\n performer?: Performer;\n venue?: Venue;\n event?: EventWithData;\n ticketClass?: TicketClassInfo;\n section?: SectionInfo;\n row?: RowInfo;\n listing?: Listing;\n bidModifier?: number;\n adSpend: UiMoney | null | undefined;\n salesProceeds: UiMoney | null | undefined;\n qtySold: number | null | undefined;\n};\n\nconst columnHelper = createColumnHelper();\n\nexport const ADGROUPS_TABLE_COLUMNS_CONFIG: ColumnDef<\n AdGroupRow | null,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n any\n>[] = [\n columnHelper.accessor((data) => (data ? data.name || '' : null), {\n id: AdGroupsTableColumnId.Name,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n if (!original) {\n return (\n \n );\n }\n\n return {getValue()};\n },\n }),\n\n columnHelper.accessor((data) => (data ? data.state || '' : null), {\n id: AdGroupsTableColumnId.State,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n // TODO\n const value = getValue();\n\n if (!original) {\n return (\n \n );\n }\n\n return {value};\n },\n }),\n\n columnHelper.accessor((data) => (data ? data.baseBid : null), {\n id: AdGroupsTableColumnId.BaseBid,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ getValue }) => {\n const value = getValue()?.amount;\n if (value == null) {\n return (\n \n );\n }\n return {value};\n },\n sortingFn: sortMoney, // TODO: Use UiMoney\n }),\n\n columnHelper.accessor((data) => (data ? data.maxBid : null), {\n id: AdGroupsTableColumnId.MaxBid,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ getValue }) => {\n const value = getValue()?.amount;\n if (value == null) {\n return (\n \n );\n }\n return {value};\n },\n sortingFn: sortMoney, // TODO: Use UiMoney\n }),\n\n columnHelper.accessor((data) => (data ? data.dailyBudget : null), {\n id: AdGroupsTableColumnId.DailyBudget,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ getValue }) => {\n const value = getValue()?.amount;\n if (value == null) {\n return (\n \n );\n }\n return {value};\n },\n sortingFn: sortMoney, // TODO: Use UiMoney\n }),\n\n columnHelper.accessor((data) => (data ? data.genre : null), {\n id: AdGroupsTableColumnId.Genre,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n const value = getValue();\n\n if (!original) {\n return (\n \n );\n }\n\n return {value};\n },\n }),\n\n columnHelper.accessor((data) => (data ? data.performer : null), {\n id: AdGroupsTableColumnId.Performer,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n const value = getValue()?.name;\n\n if (!original) {\n return (\n \n );\n }\n\n return {value};\n },\n }),\n\n columnHelper.accessor((data) => (data ? data.venue : null), {\n id: AdGroupsTableColumnId.Venue,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n const venue = getValue();\n\n if (!original) {\n return (\n \n );\n }\n\n return (\n \n \n \n );\n },\n }),\n\n columnHelper.accessor((data) => (data ? data.event : null), {\n id: AdGroupsTableColumnId.Event,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n const event = getValue()?.event;\n const eventDisplayText = event ? getEventDisplayText(event) : '';\n\n if (!original) {\n return (\n \n );\n }\n\n return {eventDisplayText};\n },\n }),\n\n columnHelper.accessor((data) => (data ? data.ticketClass : null), {\n id: AdGroupsTableColumnId.TicketClass,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n const value = getValue()?.name;\n\n if (!original) {\n return (\n \n );\n }\n\n return {value};\n },\n }),\n\n columnHelper.accessor((data) => (data ? data.section : null), {\n id: AdGroupsTableColumnId.Section,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n const value = getValue()?.name;\n\n if (!original) {\n return (\n \n );\n }\n\n return {value};\n },\n }),\n\n columnHelper.accessor((data) => (data ? data.listing : null), {\n id: AdGroupsTableColumnId.Listing,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n const value = getValue();\n\n if (!original) {\n return (\n \n );\n }\n\n return <>{value ? : <>};\n },\n }),\n\n columnHelper.accessor((data) => (data ? data.adSpend : null), {\n id: AdGroupsTableColumnId.AdSpend,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n const value = getValue();\n const { getUiCurrency } = useLocalizationContext();\n const currency = getUiCurrency(value?.currency);\n\n if (!original || value === undefined) {\n return (\n \n );\n }\n\n if (value === null) return ;\n\n return (\n \n {applyNumberFormatting({\n inputNumber: value.amt,\n currencyCode: currency.code,\n currencyDecimalDigits: currency.dec,\n })}\n \n );\n },\n }),\n columnHelper.accessor((data) => (data ? data.salesProceeds : null), {\n id: AdGroupsTableColumnId.SoldProceeds,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n const value = getValue();\n const { getUiCurrency } = useLocalizationContext();\n const currency = getUiCurrency(value?.currency);\n\n if (!original || value === undefined) {\n return (\n \n );\n }\n\n if (value === null) return ;\n\n return (\n \n {applyNumberFormatting({\n inputNumber: value.amt,\n currencyCode: currency.code,\n currencyDecimalDigits: currency.dec,\n })}\n \n );\n },\n }),\n columnHelper.accessor((data) => (data ? data.qtySold : null), {\n id: AdGroupsTableColumnId.SoldQty,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ getValue, row: { original } }) => {\n const value = getValue();\n if (!original || value === undefined) {\n return (\n \n );\n }\n\n if (value === null) return ;\n\n return {value};\n },\n }),\n\n columnHelper.accessor((data) => (data ? data.bidModifier : null), {\n id: AdGroupsTableColumnId.BidModifier,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n const value = getValue()?.value ?? getValue();\n\n if (!original) {\n return (\n \n );\n }\n\n return {value};\n },\n }),\n\n columnHelper.display({\n id: AdGroupsTableColumnId.Actions,\n enableSorting: false,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ row: { original } }) => {\n return !original ? (\n \n ) : (\n \n );\n },\n }),\n];\n","import { ColumnDef } from '@tanstack/react-table';\nimport { useMemo } from 'react';\nimport {\n AdGroupRow,\n ADGROUPS_TABLE_COLUMNS_CONFIG,\n} from 'src/tables/AdGroupsTable/configs/AdGroupsTableColumnConfig';\nimport { AdGroupsTableColumnId } from 'src/utils/columns/adGroups/adGroupsColumnUtils.types';\n\nexport const useGetAdGroupsTableColumns = () => {\n return useMemo(() => {\n // TODO: Filter out reporting columns until we enabled this on AdCampaign side\n const columns = ADGROUPS_TABLE_COLUMNS_CONFIG.filter(\n (item) =>\n ![\n AdGroupsTableColumnId.AdSpend,\n AdGroupsTableColumnId.SoldProceeds,\n AdGroupsTableColumnId.SoldQty,\n ].includes(item.id as AdGroupsTableColumnId)\n ).map((item) => item.id as AdGroupsTableColumnId);\n\n return Array.from(columns).reduce[]>(\n (acc, columnId) => {\n const columnConfig = Object.values(ADGROUPS_TABLE_COLUMNS_CONFIG).find(\n (column) => column.id === columnId\n );\n if (columnConfig) {\n acc.push(columnConfig);\n }\n return acc;\n },\n []\n );\n }, []);\n};\n","import {\n InitialTableState,\n SortingState,\n TableOptions,\n} from '@tanstack/react-table';\nimport { useEffect, useMemo, useState } from 'react';\nimport {\n Content,\n FormatContent,\n useContent,\n} from 'src/contexts/ContentContext';\nimport { WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { NoData, Table, TableProps } from 'src/tables/Table';\nimport { MAX_NUM_OF_ITEMS_FOR_FLATTENED_VIEWS } from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { generateShimmeringRows } from 'src/utils/dataTableUtils';\nimport { SomethingWentWrong } from 'src/views';\n\nimport { usePaginationSettings } from '../Table/hooks/usePaginationSettings';\nimport { AdGroupRow } from './configs/AdGroupsTableColumnConfig';\nimport { useGetAdGroupsTableColumns } from './useGetAdGroupsTableColumns';\n\nexport type AdGroupsTableDataProps = {\n adGroupEntities?: AdGroupRow[] | null;\n failedToRetrieveData: boolean;\n disablePagination?: boolean;\n useVirtuoso?: boolean;\n};\n\ntype AdGroupsTableProps = AdGroupsTableDataProps & {\n failedToRetrieveData: boolean;\n onMount?: () => void;\n onUnmount?: (state: object) => void;\n initState?: InitialTableState;\n isFlattenedView?: boolean;\n isItemsLoading?: boolean;\n rowSupportsAccordion?: boolean;\n} & Pick, 'RowComponent' | 'virtuosoItemSize'>;\n\nconst PAGE_SIZE = 10;\n\nconst getRowId = (originalRow: AdGroupRow | null, index: number) =>\n (originalRow?.id ?? index).toString();\n\nexport function AdGroupsTable({\n adGroupEntities,\n failedToRetrieveData,\n onMount,\n onUnmount,\n initState,\n disablePagination,\n isItemsLoading,\n RowComponent,\n rowSupportsAccordion,\n virtuosoItemSize,\n}: AdGroupsTableProps) {\n const adGroupsText = useContent(ContentId.AdGroups);\n\n const [sorting, setSorting] = useState(\n initState?.sorting || [{ id: 'name', desc: true }]\n );\n\n const { pagination, setPagination } = usePaginationSettings(\n adGroupEntities?.length ?? 0,\n -1,\n PAGE_SIZE,\n disablePagination,\n initState\n );\n\n useEffect(() => {\n onMount?.();\n });\n\n useEffect(() => {\n return () => onUnmount?.({ pagination, sorting });\n }, [pagination, sorting, onUnmount]);\n\n const { data, hasNoDataLoad } = useMemo(() => {\n const data = adGroupEntities?.length\n ? adGroupEntities\n : adGroupEntities == null || isItemsLoading\n ? (generateShimmeringRows(0) as null[])\n : adGroupEntities;\n\n const hasNoDataLoad =\n adGroupEntities == null\n ? true\n : adGroupEntities.length > MAX_NUM_OF_ITEMS_FOR_FLATTENED_VIEWS;\n\n return { data, hasNoDataLoad };\n }, [isItemsLoading, adGroupEntities]);\n\n const columns = useGetAdGroupsTableColumns();\n\n const options = useMemo>>(\n () => ({\n data,\n columns: columns,\n state: {\n pagination,\n sorting,\n },\n meta: {\n rowSupportsAccordion,\n },\n enableRowSelection: false,\n enableMultiRowSelection: false,\n enableSubRowSelection: false,\n getRowId: getRowId,\n onPaginationChange: setPagination,\n onSortingChange: setSorting,\n }),\n [data, columns, pagination, sorting, rowSupportsAccordion, setPagination]\n );\n\n return failedToRetrieveData ? (\n }\n />\n ) : hasNoDataLoad ? (\n \n \n }\n />\n \n ) : data?.length > 0 ? (\n \n ) : isItemsLoading ? (\n \n ) : (\n \n \n \n );\n}\n","import { getSeatDisplayText } from 'src/components/common/SeatingInfo';\nimport { Listing, TopLevelCategory } from 'src/WebApiController';\n\nconst TopLevelCategoryMap: { [key in TopLevelCategory]: number } = {\n [TopLevelCategory.Theatre]: 1,\n [TopLevelCategory.Sports]: 2,\n [TopLevelCategory.Concert]: 3,\n [TopLevelCategory.Festival]: 1023,\n};\n\nexport const getTopLevelCategoryId = (name: string): number => {\n const category = TopLevelCategory[name as keyof typeof TopLevelCategory];\n return TopLevelCategoryMap[category];\n};\n\nexport const getTopLevelCategoryName = (id: number): TopLevelCategory => {\n return (\n Object.keys(TopLevelCategoryMap) as Array\n ).find((key) => TopLevelCategoryMap[key] === id) as TopLevelCategory;\n};\n\nexport const EmptySelectionKey = 'empty';\n\nexport const getListingDisplaytext = (\n listing: Listing,\n sectionText: string,\n rowText: string,\n seatText: string,\n seatsText: string\n): string => {\n const section = listing.seating.section;\n const seatFr = listing.seating.seatFr;\n const seatTo = listing.seating.seatTo;\n const hasSeats = !!(seatFr || seatTo);\n const isSingleSeat = hasSeats && (seatFr === seatTo || !seatTo);\n\n let seatingText = '';\n if (hasSeats) {\n const seatDisplayText = getSeatDisplayText({\n seatFr: listing.seating.seatFr,\n seatTo: listing.seating.seatTo,\n });\n if (seatDisplayText) {\n seatingText = `${isSingleSeat ? seatText : seatsText} ${seatDisplayText}`;\n }\n }\n\n return `${sectionText} ${section} ${rowText} ${listing.seating.row} ${seatingText}`;\n};\n","import { ReactNode, useCallback, useContext, useEffect, useState } from 'react';\nimport { AdGroupsDataContext } from 'src/contexts/AdGroupsDataContext/AdGroupsDataContext';\nimport { useAdPlatformCatalogDataContext } from 'src/contexts/AdPlatformCatalogDataContext';\nimport { AdPlatformReportingContext } from 'src/contexts/AdPlatformReportingContext/AdPlatformReportingContext';\nimport { Stack } from 'src/core/ui';\nimport { AdGroupsTable } from 'src/tables/AdGroupsTable';\nimport { AdGroupRow } from 'src/tables/AdGroupsTable/configs/AdGroupsTableColumnConfig';\nimport { getTopLevelCategoryName } from 'src/utils/adGroupUtils';\nimport {\n AdGroup,\n AdPlatformTransactionAgg,\n Listing,\n RowInfo,\n SectionInfo,\n TicketClassInfo,\n VenueMapInfo,\n} from 'src/WebApiController';\n\ntype AdGroupsFlattenedViewProps = {\n before?: ReactNode;\n topListItemBefore?: ReactNode;\n};\n\nexport const AdGroupsFlattenedView = ({\n before,\n topListItemBefore,\n}: AdGroupsFlattenedViewProps) => {\n const { adGroupsDataQuery, adGroupsData } = useContext(AdGroupsDataContext);\n const { reportData, errorInfo: reportingErrorInfo } = useContext(\n AdPlatformReportingContext\n );\n const { data: catalogData } = useAdPlatformCatalogDataContext();\n\n const getListingById = useCallback(\n (listingId: string) => {\n if (catalogData == null) {\n return undefined;\n }\n return catalogData.listingsByExternalId[listingId];\n },\n [catalogData]\n );\n\n const listingExternalIdLookup = useCallback(\n (key: string) => {\n return getListingById(key);\n },\n [getListingById]\n );\n\n const venueMapLookup = useCallback(\n (eventId?: number) => {\n if (!catalogData || !eventId) {\n return undefined;\n }\n return catalogData.venueMapByEventId[eventId];\n },\n [catalogData]\n );\n\n const ticketClassInfoLookupForMap = useCallback(\n (key: number, venueMap: VenueMapInfo | undefined) => {\n const rowInfo = venueMap?.sections\n .flatMap((section) => section.rows)\n .find((row) => row.tktClass?.id == key);\n return rowInfo?.tktClass ?? undefined;\n },\n []\n );\n\n const ticketClassInfoLookup = useCallback(\n async (ticketClassId: number, eventId: number) => {\n const venueMap = await venueMapLookup(eventId);\n return ticketClassInfoLookupForMap(ticketClassId, venueMap);\n },\n [ticketClassInfoLookupForMap, venueMapLookup]\n );\n\n const sectionInfoLookupForMap = useCallback(\n (sectionId: number | undefined, venueMap: VenueMapInfo | undefined) => {\n if (!sectionId) return;\n return venueMap?.sections.find((section) => section.id == sectionId);\n },\n []\n );\n\n const sectionInfoLookup = useCallback(\n async (sectionId: number, eventId: number) => {\n const venueMap = await venueMapLookup(eventId);\n return sectionInfoLookupForMap(sectionId, venueMap);\n },\n [sectionInfoLookupForMap, venueMapLookup]\n );\n\n const rowInfoLookupForMap = useCallback(\n (rowId: number | undefined, venueMap: VenueMapInfo | undefined) => {\n if (!rowId) return;\n const result = venueMap?.sections.reduce<{\n section: SectionInfo | undefined;\n row: RowInfo | undefined;\n }>(\n (acc, section) => {\n const row = section.rows.find((row) => row.id == rowId);\n if (row) {\n return { section, row };\n }\n return acc;\n },\n { section: undefined, row: undefined }\n );\n\n return result;\n },\n []\n );\n\n const rowInfoLookup = useCallback(\n async (rowId: number, eventId: number) => {\n const venueMap = await venueMapLookup(eventId);\n\n return rowInfoLookupForMap(rowId, venueMap);\n },\n [rowInfoLookupForMap, venueMapLookup]\n );\n\n const populateBaseProperties = useCallback(\n (\n adGroup: AdGroup,\n reportDataByAdGroupId:\n | { [key: string]: AdPlatformTransactionAgg }\n | undefined\n ) => {\n const metric = reportDataByAdGroupId?.[adGroup.adGroupId];\n return {\n id: adGroup.adGroupId,\n state: adGroup.state,\n name: adGroup.name,\n campaignId: adGroup.campaignId,\n baseBid: adGroup.baseBid,\n maxBid: adGroup.maxBid,\n dailyBudget: adGroup.dailyBudget,\n adSpend:\n metric?.adSpend ??\n (reportDataByAdGroupId || reportingErrorInfo ? null : undefined),\n salesProceeds:\n metric?.salesProceeds ??\n (reportDataByAdGroupId || reportingErrorInfo ? null : undefined),\n qtySold:\n metric?.qtySold ??\n (reportDataByAdGroupId || reportingErrorInfo ? null : undefined),\n };\n },\n [reportingErrorInfo]\n );\n\n const processExternalIds = useCallback(\n async (\n adGroup: AdGroup,\n reportDataByAdGroupId:\n | { [key: string]: AdPlatformTransactionAgg }\n | undefined\n ) => {\n return Promise.all(\n adGroup.bidModifiers\n .filter((b) => b.key.externalId != null)\n .map(async (b) => {\n const baseProperties = populateBaseProperties(\n adGroup,\n reportDataByAdGroupId\n );\n const listing = listingExternalIdLookup(b.key.externalId!) as\n | Listing\n | undefined;\n\n if (listing) {\n const venueMap = venueMapLookup(listing.viagEvId ?? undefined);\n\n const ticketClass = venueMap?.sections\n .flatMap((section) => section.rows)\n .find((row) => row.id === listing.seating.rowId)?.tktClass;\n\n const section = sectionInfoLookupForMap(\n listing.seating.sectionId ?? undefined,\n venueMap\n );\n\n const event = listing.viagEvId\n ? catalogData?.events[listing.viagEvId]\n : undefined;\n\n const venue = event\n ? catalogData?.venues[event.event.venueId.toString()]\n : undefined;\n\n const performer = event?.event.perfId\n ? catalogData?.performers[event.event.perfId.toString()]\n : undefined;\n\n const genre = event?.event.genre?.toString();\n\n return {\n ...baseProperties,\n listing: listing,\n ticketClass: ticketClass,\n section: section,\n event: event,\n venue: venue,\n performer: performer,\n genre: genre,\n } as AdGroupRow;\n }\n\n return null;\n })\n );\n },\n [\n catalogData?.events,\n catalogData?.performers,\n catalogData?.venues,\n listingExternalIdLookup,\n populateBaseProperties,\n sectionInfoLookupForMap,\n venueMapLookup,\n ]\n );\n\n const processRowInfos = useCallback(\n async (\n adGroup: AdGroup,\n reportDataByAdGroupId:\n | { [key: string]: AdPlatformTransactionAgg }\n | undefined\n ) => {\n return Promise.all(\n adGroup.bidModifiers\n .filter((b) => b.key.rowId != null && b.key.eventId != null)\n .map(async (b) => {\n const baseProperties = populateBaseProperties(\n adGroup,\n reportDataByAdGroupId\n );\n\n const eventId = b.key.eventId!;\n const rowAndSectionInfo = await rowInfoLookup(\n b.key.rowId!,\n eventId\n );\n if (rowAndSectionInfo) {\n const event = eventId ? catalogData?.events[eventId] : undefined;\n const venue = event\n ? catalogData?.venues[event.event.venueId.toString()]\n : undefined;\n const performer = event?.event.perfId\n ? catalogData?.performers[event.event.perfId.toString()]\n : undefined;\n const genre = event?.event.genre.toString();\n return {\n ...baseProperties,\n row: rowAndSectionInfo.row,\n section: rowAndSectionInfo.section,\n ticketClass: rowAndSectionInfo.row?.tktClass,\n event: event,\n venue: venue,\n performer: performer,\n genre: genre,\n } as AdGroupRow;\n }\n return null;\n })\n );\n },\n [\n catalogData?.events,\n catalogData?.performers,\n catalogData?.venues,\n populateBaseProperties,\n rowInfoLookup,\n ]\n );\n\n const processTicketClassInfos = useCallback(\n async (\n adGroup: AdGroup,\n reportDataByAdGroupId:\n | { [key: string]: AdPlatformTransactionAgg }\n | undefined\n ) => {\n return Promise.all(\n adGroup.bidModifiers\n .filter((b) => b.key.ticketClassId != null && b.key.eventId != null)\n .map(async (b) => {\n const baseProperties = populateBaseProperties(\n adGroup,\n reportDataByAdGroupId\n );\n\n const eventId = b.key.eventId!;\n const ticketClass = (await ticketClassInfoLookup(\n b.key.ticketClassId!,\n eventId!\n )) as TicketClassInfo | undefined;\n if (ticketClass) {\n const event = eventId ? catalogData?.events[eventId] : undefined;\n const venue = event\n ? catalogData?.venues[event.event.venueId.toString()]\n : undefined;\n const performer = event?.event.perfId\n ? catalogData?.performers[event.event.perfId.toString()]\n : undefined;\n const genre = event?.event.genre.toString();\n return {\n ...baseProperties,\n ticketClass: ticketClass,\n event: event,\n venue: venue,\n performer: performer,\n genre: genre,\n } as AdGroupRow;\n }\n return null;\n })\n );\n },\n [\n catalogData?.events,\n catalogData?.performers,\n catalogData?.venues,\n populateBaseProperties,\n ticketClassInfoLookup,\n ]\n );\n\n const processSectionInfos = useCallback(\n async (\n adGroup: AdGroup,\n reportDataByAdGroupId:\n | { [key: string]: AdPlatformTransactionAgg }\n | undefined\n ) => {\n return Promise.all(\n adGroup.bidModifiers\n .filter((b) => b.key.sectionId != null && b.key.eventId != null)\n .map(async (b) => {\n const baseProperties = populateBaseProperties(\n adGroup,\n reportDataByAdGroupId\n );\n\n const eventId = b.key.eventId!;\n const sectionInfo = await sectionInfoLookup(\n b.key.sectionId!,\n eventId\n );\n if (sectionInfo) {\n const venueMapTicketClass = sectionInfo.specRow?.tktClass;\n const ticketClass: TicketClassInfo | undefined =\n venueMapTicketClass\n ? {\n id: venueMapTicketClass?.ticketClassId,\n name: venueMapTicketClass?.ticketClassName,\n color: venueMapTicketClass?.color,\n cssPostFix: venueMapTicketClass?.cssPostFix,\n }\n : undefined;\n const event = eventId ? catalogData?.events[eventId] : undefined;\n const venue = event\n ? catalogData?.venues[event.event.venueId.toString()]\n : undefined;\n const performer = event?.event.perfId\n ? catalogData?.performers[event.event.perfId.toString()]\n : undefined;\n const genre = event?.event.genre.toString();\n return {\n ...baseProperties,\n section: sectionInfo,\n ticketClass: ticketClass,\n event: event,\n venue: venue,\n performer: performer,\n genre: genre,\n } as AdGroupRow;\n }\n return null;\n })\n );\n },\n [\n catalogData?.events,\n catalogData?.performers,\n catalogData?.venues,\n populateBaseProperties,\n sectionInfoLookup,\n ]\n );\n\n const processEvents = useCallback(\n async (\n adGroup: AdGroup,\n reportDataByAdGroupId:\n | { [key: string]: AdPlatformTransactionAgg }\n | undefined\n ) => {\n return Promise.all(\n adGroup.bidModifiers\n .filter(\n (b) =>\n b.key.eventId != null &&\n b.key.ticketClassId == null &&\n b.key.sectionId == null &&\n b.key.rowId == null &&\n b.key.externalId == null\n )\n .map(async (b) => {\n const baseProperties = populateBaseProperties(\n adGroup,\n reportDataByAdGroupId\n );\n\n const eventId = b.key.eventId!;\n const event = eventId ? catalogData?.events[eventId] : undefined;\n const venue = event\n ? catalogData?.venues[event.event.venueId.toString()]\n : undefined;\n const performer = event?.event.perfId\n ? catalogData?.performers[event.event.perfId.toString()]\n : undefined;\n const genre = event?.event.genre.toString();\n return {\n ...baseProperties,\n event: event,\n venue: venue,\n performer: performer,\n genre: genre,\n } as AdGroupRow;\n })\n );\n },\n [\n catalogData?.events,\n catalogData?.performers,\n catalogData?.venues,\n populateBaseProperties,\n ]\n );\n\n const processLeafCategories = useCallback(\n async (\n adGroup: AdGroup,\n reportDataByAdGroupId:\n | { [key: string]: AdPlatformTransactionAgg }\n | undefined\n ) => {\n return Promise.all(\n adGroup.bidModifiers\n .filter((b) => b.key.leafCategoryId != null)\n .map(async (b) => {\n const baseProperties = populateBaseProperties(\n adGroup,\n reportDataByAdGroupId\n );\n\n const leafCategoryId = b.key.leafCategoryId!;\n const performer = leafCategoryId\n ? catalogData?.performers[leafCategoryId]\n : undefined;\n\n const genre = performer?.categ.at(0);\n return {\n ...baseProperties,\n performer: performer,\n genre: genre,\n } as AdGroupRow;\n })\n );\n },\n [catalogData?.performers, populateBaseProperties]\n );\n\n const processTopLevelCategories = useCallback(\n async (\n adGroup: AdGroup,\n reportDataByAdGroupId:\n | { [key: string]: AdPlatformTransactionAgg }\n | undefined\n ) => {\n return Promise.all(\n adGroup.bidModifiers\n .filter((b) => b.key.topLevelCategoryId != null)\n .map(async (b) => {\n const baseProperties = populateBaseProperties(\n adGroup,\n reportDataByAdGroupId\n );\n\n const genre = getTopLevelCategoryName(b.key.topLevelCategoryId!);\n return {\n ...baseProperties,\n genre: genre,\n } as AdGroupRow;\n })\n );\n },\n [populateBaseProperties]\n );\n\n const resolveAndFlattenAdGroups = useCallback(\n async ({\n adGroups,\n reportDataByAdGroupId,\n }: {\n adGroups: AdGroup[];\n reportDataByAdGroupId:\n | { [key: string]: AdPlatformTransactionAgg }\n | undefined;\n }): Promise => {\n return adGroups.reduce>(\n async (accPromise, adGroup) => {\n const acc = await accPromise;\n\n const newRows = await Promise.all([\n processExternalIds(adGroup, reportDataByAdGroupId),\n processRowInfos(adGroup, reportDataByAdGroupId),\n processSectionInfos(adGroup, reportDataByAdGroupId),\n processTicketClassInfos(adGroup, reportDataByAdGroupId),\n processEvents(adGroup, reportDataByAdGroupId),\n processLeafCategories(adGroup, reportDataByAdGroupId),\n processTopLevelCategories(adGroup, reportDataByAdGroupId),\n ]);\n\n // Flatten the results and filter out null values\n return acc.concat(\n newRows\n .flat()\n .filter(\n (row): row is AdGroupRow => row !== null && row !== undefined\n )\n );\n },\n Promise.resolve([])\n );\n },\n [\n processEvents,\n processExternalIds,\n processLeafCategories,\n processRowInfos,\n processSectionInfos,\n processTicketClassInfos,\n processTopLevelCategories,\n ]\n );\n\n const [adGroupRows, setAdGroupRows] = useState([]);\n const [isLoading, setIsLoading] = useState(true);\n\n useEffect(() => {\n const getAdGroupRows = async () => {\n if (!adGroupsData || !catalogData) {\n return [];\n }\n\n setIsLoading(true);\n\n // TODO: Rather than building a dictionary here, we should get the data pre-indexed by id.\n const reportDataByAdGroupId = reportData?.reduce<{\n [key: string]: AdPlatformTransactionAgg;\n }>((acc, entity) => {\n if (entity.adGroupId) {\n acc[entity.adGroupId] = entity;\n }\n return acc;\n }, {});\n\n const adGroupRows = await resolveAndFlattenAdGroups({\n adGroups: adGroupsData,\n reportDataByAdGroupId: reportDataByAdGroupId,\n });\n\n setAdGroupRows(adGroupRows);\n setIsLoading(false);\n };\n getAdGroupRows();\n }, [adGroupsData, catalogData, reportData, resolveAndFlattenAdGroups]);\n\n return (\n \n {before}\n {topListItemBefore}\n \n \n );\n};\n","import { once } from 'lodash-es';\nimport React, { useContext, useState } from 'react';\n\nexport type IAdCampaignIdContext = {\n setAdCampaignId: (adCampaignId: string | undefined) => void;\n adCampaignId: string | undefined;\n};\n\nexport const createAdCampaignIdContext = once(() => {\n return React.createContext({} as IAdCampaignIdContext);\n});\n\nexport const useAdCampaignIdContext = () =>\n useContext(createAdCampaignIdContext());\n\nexport const AdCampaignIdProvider = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\n const [campaignId, setCampaignId] = useState(undefined);\n\n const setAdCampaignId = (adCampaignId: string | undefined) => {\n setCampaignId(adCampaignId);\n };\n\n const AdCampaignIdContext = createAdCampaignIdContext();\n\n return (\n \n {children}\n \n );\n};\n","import {\n QueryObserverResult,\n useQuery,\n useQueryClient,\n UseQueryResult,\n} from '@tanstack/react-query';\nimport { createContext, useCallback, useMemo, useState } from 'react';\nimport { DATA_REFRESH_RATE_IN_MILLIS_LONG } from 'src/utils/constants/constants';\nimport { getErrorInfoFromStatusCode } from 'src/utils/errorUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { AdCampaignEntity, CampaignManagerClient } from 'src/WebApiController';\n\nimport { useAppContext } from '../AppContext';\nimport { useErrorBoundaryContext } from '../ErrorBoundaryContext';\n\nexport type IAdCampaignsDataContext = {\n adCampaignsDataQuery: UseQueryResult;\n allCampaignData: AdCampaignEntity[] | null | undefined;\n errorInfo?: { errorHeader: React.ReactNode; errorMessage: React.ReactNode };\n refreshData: (adCampaignId?: string) => Promise;\n};\n\nexport const AdCampaignsDataContext = createContext({\n adCampaignsDataQuery: {} as UseQueryResult,\n allCampaignData: [],\n refreshData: () => Promise.resolve({} as QueryObserverResult),\n});\n\nexport const AdCampaignsDataContextProvider = ({\n adCampaignId,\n children,\n}: {\n adCampaignId: string | undefined;\n children: React.ReactNode;\n}) => {\n const [errorInfo, setErrorInfo] = useState<{\n errorHeader: React.ReactNode;\n errorMessage: React.ReactNode;\n }>();\n\n const { campaignDataQuery, allCampaignData, refreshData } =\n useGetCampaignDataQuery(adCampaignId, setErrorInfo);\n\n return (\n \n {children}\n \n );\n};\n\nexport const useGetCampaignDataQuery = (\n adCampaignId: string | undefined,\n setErrorInfo: (\n value: React.SetStateAction<\n | {\n errorHeader: React.ReactNode;\n errorMessage: React.ReactNode;\n }\n | undefined\n >\n ) => void\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n\n const CAMPAIGN_DATA_QUERY_KEY = 'CampaignManagerClient.getCampaignData';\n\n const queryKey = useMemo(\n () => [\n CAMPAIGN_DATA_QUERY_KEY,\n activeAccountWebClientConfig.activeAccountId,\n adCampaignId,\n ],\n [activeAccountWebClientConfig.activeAccountId, adCampaignId]\n );\n\n const shouldQuery = activeAccountWebClientConfig.activeAccountId != null;\n\n const campaignDataQuery = useQuery({\n queryKey: [\n CAMPAIGN_DATA_QUERY_KEY,\n activeAccountWebClientConfig,\n adCampaignId,\n ],\n queryFn: async () => {\n setErrorInfo(undefined);\n\n if (!shouldQuery) {\n return null;\n }\n\n return tryInvokeApi(\n async () => {\n const client = new CampaignManagerClient(\n activeAccountWebClientConfig\n );\n const data = await client.retrieveCampaigns(adCampaignId ?? null);\n return data;\n },\n (error) => {\n const { headerDisplay, messageDisplay } = getErrorInfoFromStatusCode(\n error?.status,\n error?.message\n );\n setErrorInfo({\n errorHeader: headerDisplay,\n errorMessage: messageDisplay,\n });\n trackError(CAMPAIGN_DATA_QUERY_KEY, error, { adCampaignId });\n }\n );\n },\n enabled: activeAccountWebClientConfig.activeAccountId != null,\n staleTime: Infinity,\n refetchOnWindowFocus: false,\n networkMode: 'offlineFirst',\n refetchInterval: DATA_REFRESH_RATE_IN_MILLIS_LONG,\n });\n\n const queryClient = useQueryClient();\n\n const refreshData = useCallback(async () => {\n queryClient.invalidateQueries({\n queryKey: queryKey,\n });\n\n return await campaignDataQuery.refetch();\n }, [campaignDataQuery, queryClient, queryKey]);\n\n return {\n campaignDataQuery,\n allCampaignData: campaignDataQuery.data,\n refreshData: refreshData,\n };\n};\n","import { EventIdQueryParam } from 'src/utils/constants/constants';\nimport { UserSetting } from 'src/WebApiController';\n\nexport const queryIdSearchParam = 'queryId';\n\nexport const INVENTORY_USER_SETTINGS = [\n UserSetting.InventoryDefaultTab,\n UserSetting.InventoryV2DefaultTab,\n UserSetting.QuickFiltersStateInventory,\n UserSetting.InventoryColumnNumberPrecision,\n UserSetting.InventoryColumnEditability,\n UserSetting.SuspiciousPriceChange,\n UserSetting.InventoryColumnWidths,\n UserSetting.InventoryColumnOrder,\n UserSetting.InventoryColumnsEnabled,\n UserSetting.InventoryPageViewMode,\n UserSetting.InventoryFlattenedColumnOrder,\n UserSetting.InventoryFlattenedColumnsEnabled,\n UserSetting.InventoryFlattenedColumnNumberPrecision,\n UserSetting.InventoryFlattenedColumnEditability,\n UserSetting.InventorySideTableColumnNumberPrecision,\n UserSetting.InventorySideTableColumnEditability,\n UserSetting.InventorySideTableColumnOrder,\n UserSetting.InventorySideTableColumnsEnabled,\n UserSetting.InventoryCustomColumns,\n UserSetting.EventsColumnWidths,\n UserSetting.EventsColumnOrder,\n UserSetting.EventsColumnEditability,\n UserSetting.EventsColumnNumberPrecision,\n UserSetting.EventsColumnsEnabled,\n UserSetting.EventsCustomColumns,\n];\n\nexport const getDefaultReturnUrl = (viagVirtualId?: string | null) => {\n const queryParams = new URLSearchParams(location.search);\n\n queryParams.delete(EventIdQueryParam);\n queryParams.delete('queryId'); // TODO - this is obsolete and no longer use, but it could still exists\n\n return `/inventory?${queryParams.toString()}${\n viagVirtualId ? `#${viagVirtualId}` : ''\n }`;\n};\n","import { useMemo } from 'react';\nimport { useAdPlatformCatalogDataContext } from 'src/contexts/AdPlatformCatalogDataContext';\nimport { PosSelect, PosSelectProps } from 'src/core/POS/PosSelect';\nimport { EmptySelectionKey } from 'src/utils/adGroupUtils';\nimport {\n getEventDisplayText,\n getPerformerAndVenueForEvent,\n} from 'src/utils/eventWithDataUtils';\nimport { EventWithData } from 'src/WebApiController';\n\ntype AdGroupEventSelectorProps = Omit & {\n filterCallback: (event?: EventWithData) => boolean;\n};\n\nexport const AdGroupEventSelector = ({\n filterCallback,\n placeholderText,\n ...props\n}: AdGroupEventSelectorProps) => {\n const { data: catalogData } = useAdPlatformCatalogDataContext();\n\n const allEvents = useMemo(() => {\n if (!catalogData?.events) return {};\n const events = catalogData.events;\n\n const results = Object.values(events).reduce(\n (acc, event) => {\n if (event.event.viagId && filterCallback(event)) {\n const { venue } = getPerformerAndVenueForEvent(\n event?.event,\n catalogData\n );\n\n acc[event.event.viagId.toString()] = getEventDisplayText(\n event.event,\n venue\n );\n }\n return acc;\n },\n {} as Record\n );\n\n if (Object.values(results).length == 0) {\n results[EmptySelectionKey] = 'N/A';\n }\n return results;\n }, [catalogData, filterCallback]);\n\n return (\n 10\n }\n loading={catalogData == null}\n placeholderText={placeholderText}\n valueOptionsContent={allEvents}\n />\n );\n};\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components';\n\nexport const StyledAdGroupCreateBody = styled.div`\n height: 100%;\n display: grid;\n grid-template-rows: auto 1fr auto;\n\n @supports (-webkit-touch-callout: none) {\n max-height: -webkit-fill-available;\n }\n`;\n\nexport const HeaderRightGroup = styled.div<{ editMode?: boolean }>`\n display: flex;\n flex-direction: column;\n width: 100%;\n\n ${({ editMode, theme: { media, spacing } }) =>\n `${media.makeMediaQuery(\n media.breakpoints.md,\n `\n text-align: ${editMode ? 'left' : 'right'};\n max-width: calc(50% - ${spacing(4)});\n align-items: ${editMode ? 'flex-start' : 'flex-end'};\n `\n )}`}\n`;\n\nexport const HeaderLeftGroup = styled.div`\n display: flex;\n flex-direction: column;\n width: 100%;\n\n ${({ theme: { media, spacing } }) =>\n `${media.makeMediaQuery(\n media.breakpoints.md,\n `\n max-width: calc(50% - ${spacing(4)});\n `\n )}`}\n`;\n\nexport const HeaderContainer = styled.div`\n ${({\n theme: {\n typography: { getStyles },\n },\n }) => getStyles('title4')};\n padding-block-end: ${(props) => props.theme.spacing(4)};\n\n width: 100%;\n white-space: nowrap;\n text-overflow: ellipsis;\n`;\n\nexport const BodySectionTitle = styled.div`\n ${(props) => props.theme.typography.getStyles('subtitle1')};\n color: ${(props) => props.theme.colors.textBrand};\n text-transform: uppercase;\n margin: 0;\n padding-block-end: ${() => vars.spacing.lg};\n`;\n\nexport const BodySectionBody = styled.div`\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: space-between;\n width: 100%;\n padding-block-end: ${() => vars.spacing.sm};\n ${({\n theme: {\n typography: { getStyles },\n },\n }) => getStyles('subtitle1', 'regular')};\n\n ${({ theme: { media } }) =>\n `${media.makeMediaQuery(\n media.breakpoints.md,\n `\n padding-block-end: ${vars.spacing.lg};\n `\n )}`}\n`;\n","import * as styles from './AdGroupCreate.css';\ninterface AdGroupSelectErrorProps {\n error?: string;\n}\n\nexport const AdGroupSelectError = ({ error }: AdGroupSelectErrorProps) => {\n return (\n <>\n {error && (\n
    \n
    {error}
    \n
    \n )}\n \n );\n};\n","import { ComponentProps, useCallback, useMemo } from 'react';\nimport { useForm } from 'react-hook-form';\nimport { CancelButton } from 'src/components/Buttons';\nimport { AdGroupEventSelector } from 'src/components/Selectors/AdGroupEventSelector';\nimport { useAdPlatformCatalogDataContext } from 'src/contexts/AdPlatformCatalogDataContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { PillList } from 'src/core/ui/PillList';\nimport { PillItemProps } from 'src/core/ui/PillList/PillItem';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { EventIcon } from 'src/svgs/EventIcon';\nimport { IconsFill, PlusIcon } from 'src/svgs/Viagogo';\nimport {\n EmptySelectionKey,\n getTopLevelCategoryName,\n} from 'src/utils/adGroupUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n getEventDisplayText,\n getPerformerAndVenueForEvent,\n} from 'src/utils/eventWithDataUtils';\nimport { EventWithData } from 'src/WebApiController';\n\nimport { BodySectionTitle, FieldWrapper } from '../common';\nimport * as styles from './AdGroupCreate.css';\nimport { BodySectionBody } from './AdGroupCreate.styled';\nimport { AdGroupSelectError } from './AdGroupSelectError';\n\nexport type EventSectionInput = {\n event: EventWithData | null | undefined;\n};\n\nexport interface EventSectionProps {\n onSelectEvent: (event: EventWithData | null | undefined) => void;\n performerId?: number;\n genreId?: number;\n event: EventWithData | null | undefined;\n error?: string;\n}\n\nexport const EventSection = ({\n onSelectEvent,\n performerId,\n genreId,\n event,\n error,\n}: EventSectionProps) => {\n const addEventDialog = useBasicDialog();\n\n const onAddEventSave = useCallback(\n (event: EventWithData | null | undefined) => {\n onSelectEvent(event);\n addEventDialog.closeDialog();\n },\n [onSelectEvent, addEventDialog]\n );\n\n const onAddEventCancel = useCallback(() => {\n addEventDialog.closeDialog();\n }, [addEventDialog]);\n\n const onAddEvent = useCallback(() => {\n addEventDialog.launchDialog();\n }, [addEventDialog]);\n\n const { data: catalogData } = useAdPlatformCatalogDataContext();\n\n const contentNA = useContent(ContentId.NA);\n\n const pills = useMemo(() => {\n const pills = [] as PillItemProps[];\n if (event !== undefined) {\n const { venue } = getPerformerAndVenueForEvent(event?.event, catalogData);\n\n pills.push({\n value: 'event',\n display: event ? getEventDisplayText(event.event, venue) : contentNA,\n icon: ,\n onDelete: () => {\n onSelectEvent(undefined);\n },\n });\n }\n\n return pills;\n }, [catalogData, contentNA, event, onSelectEvent]);\n\n return (\n <>\n
    \n \n \n \n {event !== undefined ? (\n \n \n \n ) : (\n \n \n \n \n )}\n
    \n {addEventDialog.dialogProps.isOpen && (\n \n )}\n \n );\n};\n\nexport type AddEventFieldValues = {\n event: EventWithData | null | undefined;\n};\n\nexport type AddEventDialogProps = Omit<\n ComponentProps,\n 'header' | 'footer'\n> & {\n onSave: (event: EventWithData | null | undefined) => void;\n onCancel: () => void;\n performerId?: number;\n genreId?: number;\n};\n\nexport const AddEventDialog = ({\n onSave,\n onCancel,\n performerId,\n genreId,\n ...genericDialogProps\n}: AddEventDialogProps) => {\n const addEventForm = useForm({\n defaultValues: {\n event: undefined,\n },\n });\n\n const { data: catalogData } = useAdPlatformCatalogDataContext();\n\n const setEvent = useCallback(\n (eventId: string) => {\n if (!catalogData) {\n return;\n }\n const event =\n eventId == EmptySelectionKey\n ? null\n : catalogData.events[parseInt(eventId, 10)];\n addEventForm.clearErrors('event');\n addEventForm.setValue('event', event);\n },\n [addEventForm, catalogData]\n );\n\n const event = addEventForm.watch('event');\n\n const onSubmit = useCallback(() => {\n onSave(event);\n }, [event, onSave]);\n\n const handleEventFilter = (event: EventWithData | null | undefined) => {\n if (performerId && event?.event.perfId != performerId) {\n return false;\n }\n if (genreId && event?.event.genre != getTopLevelCategoryName(genreId)) {\n return false;\n }\n return true;\n };\n\n return (\n }\n footer={\n <>\n \n \n \n \n \n }\n onClosed={() => {\n addEventForm.reset();\n }}\n {...genericDialogProps}\n onCancel={onCancel}\n >\n \n }>\n {\n setEvent(eventId);\n }}\n style={{ width: '100%' }}\n />\n \n \n \n );\n};\n","import categoryIconManifest from 'src/assets/categoryIconManifest.json';\nimport categoryOverrideMappings from 'src/assets/categoryIconOverrideMappings.json';\nimport { Performer, TopLevelCategory } from 'src/WebApiController';\n\nconst isCategoryOverrideMappingKey = (\n key: string\n): key is keyof typeof categoryOverrideMappings =>\n key in categoryOverrideMappings;\n\nconst isCategoryIconManifestKey = (\n key: string\n): key is keyof typeof categoryIconManifest => key in categoryIconManifest;\n\nconst getCategoryIconFilename = (categoryId: string) => {\n if (isCategoryOverrideMappingKey(categoryId)) {\n categoryId = categoryOverrideMappings[categoryId];\n }\n return isCategoryIconManifestKey(categoryId)\n ? categoryIconManifest[categoryId]\n : undefined;\n};\n\nexport type PerformerCategoryIconProps = {\n performer: Performer;\n /**\n * Size in px\n */\n size?: number;\n};\n\nexport function PerformerCategoryIcon({\n performer,\n size = 16,\n}: PerformerCategoryIconProps) {\n const iconFilename =\n performer.genreId != null\n ? getCategoryIconFilename(performer.genreId.toString())\n : undefined;\n const iconFilepath = iconFilename\n ? `/icons/category/${iconFilename}#category-icon-svg`\n : getTopLevelCategoryIconFilepath(\n (() => {\n if (performer.categ) {\n const category = performer.categ[0];\n if (category) {\n return category;\n }\n }\n return performer.descr as TopLevelCategory;\n })()\n );\n return (\n \n \n \n );\n}\n\nfunction getTopLevelCategoryIconFilepath(topLevelCategory: TopLevelCategory) {\n switch (topLevelCategory) {\n case TopLevelCategory.Concert:\n return `/icons/category/concert.svg#category-icon-svg`;\n\n case TopLevelCategory.Sports:\n return `/icons/category/sports.svg#category-icon-svg`;\n\n case TopLevelCategory.Theatre:\n return `/icons/category/theater.svg#category-icon-svg`;\n\n case TopLevelCategory.Festival:\n return `/icons/category/music.svg#category-icon-svg`;\n\n default:\n return `/icons/category/music.svg#category-icon-svg`;\n }\n}\n","import { PosSelect, PosSelectProps } from 'src/core/POS/PosSelect';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { TopLevelCategory } from 'src/WebApiController';\n\nexport const topLevelCategories: Record = {\n [TopLevelCategory.Concert]: ContentId.Concert,\n [TopLevelCategory.Festival]: ContentId.Festival,\n [TopLevelCategory.Sports]: ContentId.Sports,\n [TopLevelCategory.Theatre]: ContentId.Theatre,\n};\n\nexport const AdGroupGenreSelector = ({\n placeholderText,\n ...props\n}: Omit) => {\n return (\n 10\n }\n placeholderText={placeholderText}\n valueOptionsContent={topLevelCategories}\n />\n );\n};\n","import { ComponentProps, useCallback, useMemo } from 'react';\nimport { useForm } from 'react-hook-form';\nimport { CancelButton } from 'src/components/Buttons';\nimport { PerformerCategoryIcon } from 'src/components/common/PerformerCategoryIcon';\nimport { AdGroupGenreSelector } from 'src/components/Selectors/AdGroupGenreSelector';\nimport { Content } from 'src/contexts/ContentContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { PillList } from 'src/core/ui/PillList';\nimport { PillItemProps } from 'src/core/ui/PillList/PillItem';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { IconsFill, PlusIcon } from 'src/svgs/Viagogo';\nimport {\n getTopLevelCategoryId,\n getTopLevelCategoryName,\n} from 'src/utils/adGroupUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Performer } from 'src/WebApiController';\n\nimport { BodySectionTitle, FieldWrapper } from '../common';\nimport * as styles from './AdGroupCreate.css';\nimport { BodySectionBody } from './AdGroupCreate.styled';\nimport { AdGroupSelectError } from './AdGroupSelectError';\n\nexport interface GenreSectionProps {\n onSelectGenre: (genre?: number) => void;\n genreId?: number;\n error?: string;\n}\n\nexport const GenreSection = ({\n onSelectGenre,\n genreId,\n error,\n}: GenreSectionProps) => {\n const addGenreDialog = useBasicDialog();\n\n const onAddGenreSave = useCallback(\n (genreId?: number) => {\n onSelectGenre(genreId);\n addGenreDialog.closeDialog();\n },\n [onSelectGenre, addGenreDialog]\n );\n\n const onAddGenreCancel = useCallback(() => {\n addGenreDialog.closeDialog();\n }, [addGenreDialog]);\n\n const onAddGenre = useCallback(() => {\n addGenreDialog.launchDialog();\n }, [addGenreDialog]);\n\n const pills = useMemo(() => {\n const pills = [] as PillItemProps[];\n if (genreId) {\n pills.push({\n value: 'genreId',\n display: getTopLevelCategoryName(genreId),\n icon: (\n \n ),\n onDelete: () => {\n onSelectGenre(undefined);\n },\n });\n }\n\n return pills;\n }, [genreId, onSelectGenre]);\n\n return (\n <>\n
    \n \n \n \n {genreId ? (\n \n \n \n ) : (\n \n \n \n \n )}\n
    \n {addGenreDialog.dialogProps.isOpen && (\n \n )}\n \n );\n};\n\nexport type AddGenreFieldValues = {\n genreId?: number;\n};\n\nexport type AddGenreDialogProps = Omit<\n ComponentProps,\n 'header' | 'footer'\n> & {\n onSave: (genreId?: number) => void;\n onCancel: () => void;\n};\n\nexport const AddGenreDialog = ({\n onSave,\n onCancel,\n ...genericDialogProps\n}: AddGenreDialogProps) => {\n const addGenreForm = useForm({\n defaultValues: {\n genreId: undefined,\n },\n });\n\n const setGenre = useCallback(\n (genreId: number) => {\n addGenreForm.clearErrors('genreId');\n addGenreForm.setValue('genreId', genreId);\n },\n [addGenreForm]\n );\n\n const genreId = addGenreForm.watch('genreId');\n\n const onSubmit = useCallback(() => {\n onSave(genreId);\n }, [genreId, onSave]);\n\n return (\n }\n footer={\n <>\n \n \n \n \n \n }\n onClosed={() => {\n addGenreForm.reset();\n }}\n {...genericDialogProps}\n onCancel={onCancel}\n >\n \n }>\n {\n setGenre(getTopLevelCategoryId(genreId));\n }}\n style={{ width: '100%' }}\n />\n \n \n \n );\n};\n","import { useMemo } from 'react';\nimport { useAdPlatformCatalogDataContext } from 'src/contexts/AdPlatformCatalogDataContext';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { PosSelect, PosSelectProps } from 'src/core/POS/PosSelect';\nimport {\n EmptySelectionKey,\n getListingDisplaytext,\n} from 'src/utils/adGroupUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getPerformerAndVenueForEvent } from 'src/utils/eventWithDataUtils';\nimport { Listing } from 'src/WebApiController';\n\ntype Listings = {\n listingsData: Record | null | undefined;\n};\n\nexport type ListingsSelectorProps = PosSelectProps & Listings;\n\nexport const AdGroupListingSelector = ({\n listingsData,\n placeholderText,\n ...props\n}: Omit) => {\n const { data: catalogData } = useAdPlatformCatalogDataContext();\n\n const rowText = useContent(ContentId.Row);\n const seatText = useContent(ContentId.Seat);\n const seatsText = useContent(ContentId.Seats);\n const sectionText = useContent(ContentId.Section);\n\n const listings: Record = useMemo(() => {\n if (!listingsData) {\n return {};\n }\n const results =\n Object.values(listingsData)\n ?.map((l) => {\n const event = l.viagEvId\n ? catalogData?.events?.[l.viagEvId]\n : undefined;\n const { performer, venue } = getPerformerAndVenueForEvent(\n event?.event,\n catalogData\n );\n if (event) {\n return { event: event.event, listing: l, performer, venue };\n }\n\n return null;\n })\n ?.filter((l) => l != null)\n ?.map((l) => l!)\n ?.reduce(\n (acc, l) => {\n acc[l?.listing.idOnMkp!] = getListingDisplaytext(\n l?.listing,\n sectionText,\n rowText,\n seatText,\n seatsText\n );\n return acc;\n },\n {} as Record\n ) ?? {};\n\n if (Object.values(results).length == 0) {\n results[EmptySelectionKey] = 'N/A';\n }\n return results;\n }, [catalogData, listingsData, rowText, seatText, seatsText, sectionText]);\n\n return (\n 10\n }\n loading={listingsData == null}\n placeholderText={placeholderText}\n valueOptionsContent={listings}\n />\n );\n};\n","import { ComponentProps, useCallback, useMemo } from 'react';\nimport { useForm } from 'react-hook-form';\nimport { CancelButton } from 'src/components/Buttons';\nimport { AdGroupListingSelector } from 'src/components/Selectors/AdGroupListingSelector';\nimport { useAdPlatformCatalogDataContext } from 'src/contexts/AdPlatformCatalogDataContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { EventMapContextProvider } from 'src/contexts/EventMapContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { PillList } from 'src/core/ui/PillList';\nimport { PillItemProps } from 'src/core/ui/PillList/PillItem';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { ListingIcon } from 'src/svgs';\nimport { IconsFill, PlusIcon } from 'src/svgs/Viagogo';\nimport {\n EmptySelectionKey,\n getListingDisplaytext,\n} from 'src/utils/adGroupUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getMatchingSectionRow } from 'src/utils/seatScoreUtils';\nimport { Listing, Seating, TicketClassInfo } from 'src/WebApiController';\n\nimport { BodySectionTitle, FieldWrapper } from '../common';\nimport * as styles from './AdGroupCreate.css';\nimport { BodySectionBody } from './AdGroupCreate.styled';\nimport { AdGroupSelectError } from './AdGroupSelectError';\n\nexport type ListingSectionInput = {\n listing: Listing | null | undefined;\n};\n\nexport interface ListingSectionProps {\n onSelectListing: (\n listing: Listing | null | undefined,\n seating: Seating | null | undefined,\n ticketClass: TicketClassInfo | null | undefined\n ) => void;\n eventId?: number;\n ticketClass?: TicketClassInfo;\n seating?: Seating;\n listing: Listing | null | undefined;\n error?: string;\n}\n\nexport const ListingSection = ({\n onSelectListing,\n eventId,\n ticketClass,\n seating,\n listing,\n error,\n}: ListingSectionProps) => {\n const addListingDialog = useBasicDialog();\n const { data: catalogData } = useAdPlatformCatalogDataContext();\n\n const event = useMemo(() => {\n if (!eventId || !catalogData?.events?.[eventId.toString()]) {\n return undefined;\n }\n\n return catalogData.events[eventId.toString()].event;\n }, [catalogData, eventId]);\n\n const onAddListingSave = useCallback(\n (\n listing: Listing | null | undefined,\n seating: Seating | null | undefined,\n ticketClass: TicketClassInfo | null | undefined\n ) => {\n onSelectListing(listing, seating, ticketClass);\n addListingDialog.closeDialog();\n },\n [onSelectListing, addListingDialog]\n );\n\n const onAddListingCancel = useCallback(() => {\n addListingDialog.closeDialog();\n }, [addListingDialog]);\n\n const onAddListing = useCallback(() => {\n addListingDialog.launchDialog();\n }, [addListingDialog]);\n\n const contentNA = useContent(ContentId.NA);\n const sectionText = useContent(ContentId.Section);\n const rowText = useContent(ContentId.Row);\n const seatText = useContent(ContentId.Seat);\n const seatsText = useContent(ContentId.Seats);\n\n const pills = useMemo(() => {\n const pills = [] as PillItemProps[];\n if (listing !== undefined) {\n let listingDisplayText = undefined;\n\n if (listing) {\n listingDisplayText = getListingDisplaytext(\n listing,\n sectionText,\n rowText,\n seatText,\n seatsText\n );\n }\n\n pills.push({\n value: 'listing',\n display: listingDisplayText ?? contentNA,\n icon: ,\n onDelete: () => {\n onSelectListing(undefined, undefined, undefined);\n },\n });\n }\n\n return pills;\n }, [\n listing,\n contentNA,\n sectionText,\n rowText,\n seatText,\n seatsText,\n onSelectListing,\n ]);\n\n const enableButton = event;\n\n return (\n <>\n
    \n \n \n \n {listing !== undefined ? (\n \n \n \n ) : (\n \n \n \n \n \n \n \n )}\n
    \n {addListingDialog.dialogProps.isOpen && (\n \n \n \n )}\n \n );\n};\n\nexport type AddListingFieldValues = {\n listing: Listing | null | undefined;\n ticketClass: TicketClassInfo | null | undefined;\n seating: Seating | null | undefined;\n};\n\nexport type AddListingDialogProps = Omit<\n ComponentProps,\n 'header' | 'footer'\n> & {\n onSave: (\n listing: Listing | null | undefined,\n seating: Seating | null | undefined,\n ticketClass: TicketClassInfo | null | undefined\n ) => void;\n onCancel: () => void;\n eventId?: number;\n ticketClass?: TicketClassInfo;\n seating?: Seating;\n};\n\nexport const AddListingDialog = ({\n onSave,\n onCancel,\n eventId,\n ticketClass,\n seating,\n ...genericDialogProps\n}: AddListingDialogProps) => {\n const addListingForm = useForm({\n defaultValues: {\n listing: undefined,\n },\n });\n\n const listing = addListingForm.watch('listing');\n\n const onSubmit = useCallback(() => {\n onSave(\n listing,\n addListingForm.getValues('seating'),\n addListingForm.getValues('ticketClass')\n );\n }, [addListingForm, listing, onSave]);\n\n const { data: catalogData } = useAdPlatformCatalogDataContext();\n\n const getListingsForEvent = useCallback(\n (eventId: number | undefined) => {\n if (eventId == null || catalogData == null) {\n return undefined;\n }\n return catalogData?.events[eventId]?.entities?.listings;\n },\n [catalogData]\n );\n\n const getSectionsForEvent = useCallback(\n (eventId: number | undefined) => {\n if (eventId == null || catalogData == null) {\n return undefined;\n }\n return catalogData?.venueMapByEventId[eventId].sections;\n },\n [catalogData]\n );\n\n const listingsData = getListingsForEvent(eventId);\n const sectionsData = getSectionsForEvent(eventId);\n\n const listings = useMemo(() => {\n if (!listingsData) {\n return null;\n }\n\n return (\n listingsData.reduce(\n (acc, listing) => {\n let match = false;\n if (seating) {\n // Filter by section\n if (seating?.sectionId == listing.seating.sectionId) {\n match = true;\n }\n } else if (ticketClass) {\n // Filter by ticket class\n const row = getMatchingSectionRow(listing.seating, sectionsData);\n\n const ticketClassId = row.section?.specRow?.tktClass?.ticketClassId;\n if (ticketClassId == ticketClass.id) {\n match = true;\n }\n } else {\n match = true;\n }\n\n if (match) {\n acc[listing.idOnMkp!] = listing;\n }\n return acc;\n },\n {} as Record\n ) ?? []\n );\n }, [listingsData, seating, sectionsData, ticketClass]);\n\n const setListing = useCallback(\n (listingId: string) => {\n if (!listings) {\n return;\n }\n\n const listing =\n listingId == EmptySelectionKey ? null : listings[listingId];\n\n addListingForm.setValue('seating', null);\n addListingForm.setValue('ticketClass', null);\n\n if (listing?.seating.sectionId) {\n addListingForm.setValue('seating', listing.seating);\n\n const row = getMatchingSectionRow(listing.seating, sectionsData);\n\n const ticketClass = row.section?.specRow?.tktClass;\n if (ticketClass) {\n addListingForm.setValue('ticketClass', {\n id: ticketClass?.ticketClassId,\n name: ticketClass?.ticketClassName,\n color: ticketClass?.color,\n cssPostFix: ticketClass?.cssPostFix,\n });\n }\n }\n\n addListingForm.clearErrors('listing');\n addListingForm.setValue('listing', listing);\n },\n [addListingForm, listings, sectionsData]\n );\n\n return (\n }\n footer={\n <>\n \n \n \n \n \n }\n onClosed={() => {\n addListingForm.reset();\n }}\n {...genericDialogProps}\n onCancel={onCancel}\n >\n \n }>\n {\n setListing(listingId);\n }}\n style={{ width: '100%' }}\n />\n \n \n \n );\n};\n","import { useMemo } from 'react';\nimport { useAdPlatformCatalogDataContext } from 'src/contexts/AdPlatformCatalogDataContext';\nimport { PosSelect, PosSelectProps } from 'src/core/POS/PosSelect';\nimport { EmptySelectionKey } from 'src/utils/adGroupUtils';\nimport { Performer } from 'src/WebApiController';\n\ntype AdGroupPerformerSelectorProps = Omit<\n PosSelectProps,\n 'valueOptionsContent'\n> & {\n filterCallback: (performer?: Performer) => boolean;\n};\n\nexport const AdGroupPerformerSelector = ({\n filterCallback,\n placeholderText,\n ...props\n}: AdGroupPerformerSelectorProps) => {\n const { data: catalogData } = useAdPlatformCatalogDataContext();\n\n const allPerformers = useMemo(() => {\n if (!catalogData?.performers) return {};\n const performers = catalogData.performers;\n\n const results = Object.values(performers).reduce(\n (acc, performer) => {\n if (performer.viagId && filterCallback(performer)) {\n acc[performer.viagId.toString()] = performer.name;\n }\n return acc;\n },\n {} as Record\n );\n\n if (Object.values(results).length == 0) {\n results[EmptySelectionKey] = 'N/A';\n }\n\n return results;\n }, [catalogData?.performers, filterCallback]);\n\n return (\n 10\n }\n loading={catalogData == null}\n placeholderText={placeholderText}\n valueOptionsContent={allPerformers}\n />\n );\n};\n","import { ComponentProps, useCallback, useMemo } from 'react';\nimport { useForm } from 'react-hook-form';\nimport { CancelButton } from 'src/components/Buttons';\nimport { PerformerCategoryIcon } from 'src/components/common/PerformerCategoryIcon';\nimport { AdGroupPerformerSelector } from 'src/components/Selectors/AdGroupPerformerSelector';\nimport { useAdPlatformCatalogDataContext } from 'src/contexts/AdPlatformCatalogDataContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { PillList } from 'src/core/ui/PillList';\nimport { PillItemProps } from 'src/core/ui/PillList/PillItem';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { IconsFill, PlusIcon } from 'src/svgs/Viagogo';\nimport {\n EmptySelectionKey,\n getTopLevelCategoryId,\n getTopLevelCategoryName,\n} from 'src/utils/adGroupUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Performer, TopLevelCategory } from 'src/WebApiController';\n\nimport { BodySectionTitle, FieldWrapper } from '../common';\nimport * as styles from './AdGroupCreate.css';\nimport { BodySectionBody } from './AdGroupCreate.styled';\nimport { AdGroupSelectError } from './AdGroupSelectError';\n\nexport interface PerformerSectionProps {\n onSelectPerformer: (performer: Performer | null | undefined) => void;\n genreId?: number;\n performer: Performer | null | undefined;\n error?: string;\n}\n\nexport const PerformerSection = ({\n onSelectPerformer,\n genreId,\n performer,\n error,\n}: PerformerSectionProps) => {\n const addPerformerDialog = useBasicDialog();\n\n const onAddPerformerSave = useCallback(\n (performer: Performer | null | undefined) => {\n onSelectPerformer(performer);\n addPerformerDialog.closeDialog();\n },\n [onSelectPerformer, addPerformerDialog]\n );\n\n const onAddPerformerCancel = useCallback(() => {\n addPerformerDialog.closeDialog();\n }, [addPerformerDialog]);\n\n const onAddPerformer = useCallback(() => {\n addPerformerDialog.launchDialog();\n }, [addPerformerDialog]);\n\n const contentNA = useContent(ContentId.NA);\n\n const pills = useMemo(() => {\n const pills = [] as PillItemProps[];\n let performerRef = performer;\n if (performer !== undefined) {\n if (!performer) {\n performerRef = {\n genreId: getTopLevelCategoryId(TopLevelCategory.Concert),\n name: contentNA,\n } as Performer;\n }\n\n pills.push({\n value: 'performer',\n display: performerRef!.name,\n icon: ,\n onDelete: () => {\n onSelectPerformer(undefined);\n },\n });\n }\n\n return pills;\n }, [performer, contentNA, onSelectPerformer]);\n\n return (\n <>\n
    \n \n \n \n {performer !== undefined ? (\n \n \n \n ) : (\n \n \n \n \n )}\n
    \n {addPerformerDialog.dialogProps.isOpen && (\n \n )}\n \n );\n};\n\nexport type AddPerformerFieldValues = {\n performer: Performer | null | undefined;\n};\n\nexport type AddPerformerDialogProps = Omit<\n ComponentProps,\n 'header' | 'footer'\n> & {\n onSave: (performer: Performer | null | undefined) => void;\n onCancel: () => void;\n genreId?: number;\n};\n\nexport const AddPerformerDialog = ({\n onSave,\n onCancel,\n genreId,\n ...genericDialogProps\n}: AddPerformerDialogProps) => {\n const addPerformerForm = useForm({\n defaultValues: {\n performer: undefined,\n },\n });\n\n const { data: catalogData } = useAdPlatformCatalogDataContext();\n\n const setPerformer = useCallback(\n (performerId: string) => {\n if (!catalogData) {\n return;\n }\n\n const performer =\n performerId == EmptySelectionKey\n ? null\n : catalogData.performers[parseInt(performerId, 10)];\n\n addPerformerForm.clearErrors('performer');\n addPerformerForm.setValue('performer', performer);\n },\n [addPerformerForm, catalogData]\n );\n\n const performer = addPerformerForm.watch('performer');\n\n const topLevelCategory = genreId\n ? getTopLevelCategoryName(genreId)\n : undefined;\n\n const onSubmit = useCallback(() => {\n onSave(performer);\n }, [performer, onSave]);\n\n const handleEventFilter = (performer: Performer | null | undefined) => {\n if (\n !performer ||\n !topLevelCategory ||\n performer.categ.some((tlc) => tlc == topLevelCategory)\n ) {\n return true;\n }\n return false;\n };\n\n return (\n }\n footer={\n <>\n \n \n \n \n \n }\n onClosed={() => {\n addPerformerForm.reset();\n }}\n {...genericDialogProps}\n onCancel={onCancel}\n >\n \n }>\n {\n setPerformer(performerId);\n }}\n style={{ width: '100%' }}\n />\n \n \n \n );\n};\n","import { useMemo } from 'react';\nimport { useAdPlatformCatalogDataContext } from 'src/contexts/AdPlatformCatalogDataContext';\nimport { PosSelect, PosSelectProps } from 'src/core/POS/PosSelect';\nimport { EmptySelectionKey } from 'src/utils/adGroupUtils';\nimport { AdPlatformCatalogResults, Seating } from 'src/WebApiController';\n\nexport type ListingsSelectorProps = PosSelectProps & {\n seatings: Record | null | undefined;\n};\n\nexport const AdGroupSectionSelector = ({\n seatings,\n placeholderText,\n ...props\n}: Omit) => {\n const { data: catalogData } = useAdPlatformCatalogDataContext();\n\n return (\n \n );\n};\n\nexport const SelectionBody = ({\n catalogData,\n seatings,\n placeholderText,\n ...props\n}: {\n catalogData: AdPlatformCatalogResults | undefined;\n seatings: Record | null | undefined;\n placeholderText: string | undefined;\n} & Omit) => {\n const sectionsData: Record = useMemo(() => {\n if (!seatings) {\n return {};\n }\n\n const results =\n Object.values(seatings).reduce(\n (acc, seating) => {\n const sectionId = seating.sectionId;\n const sectionName = seating.section;\n if (sectionId && sectionName) {\n acc[sectionId.toString()] = sectionName;\n }\n return acc;\n },\n {} as Record\n ) ?? {};\n\n if (Object.values(results).length == 0) {\n results[EmptySelectionKey] = 'N/A';\n }\n\n return results;\n }, [seatings]);\n\n return (\n 10\n }\n loading={seatings == null}\n placeholderText={placeholderText}\n valueOptionsContent={sectionsData}\n />\n );\n};\n","import { ComponentProps, useCallback, useMemo } from 'react';\nimport { useForm } from 'react-hook-form';\nimport { CancelButton } from 'src/components/Buttons';\nimport { AdGroupSectionSelector } from 'src/components/Selectors/AdGroupSectionSelector';\nimport { useAdPlatformCatalogDataContext } from 'src/contexts/AdPlatformCatalogDataContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { EventMapContextProvider } from 'src/contexts/EventMapContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { PillList } from 'src/core/ui/PillList';\nimport { PillItemProps } from 'src/core/ui/PillList/PillItem';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { IconsFill, PlusIcon, SeatIcon } from 'src/svgs/Viagogo';\nimport { EmptySelectionKey } from 'src/utils/adGroupUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getMatchingSectionRow } from 'src/utils/seatScoreUtils';\nimport { Seating, TicketClassInfo } from 'src/WebApiController';\n\nimport { BodySectionTitle, FieldWrapper } from '../common';\nimport * as styles from './AdGroupCreate.css';\nimport { BodySectionBody } from './AdGroupCreate.styled';\nimport { AdGroupSelectError } from './AdGroupSelectError';\n\nexport type SeatingSectionInput = {\n seating: Seating | null | undefined;\n};\n\nexport interface SeatingSectionProps {\n onSelectSeating: (\n seating: Seating | null | undefined,\n ticketClass: TicketClassInfo | null | undefined\n ) => void;\n eventId?: number;\n ticketClass?: TicketClassInfo;\n seating: Seating | null | undefined;\n error?: string;\n}\n\nexport const SeatingSection = ({\n onSelectSeating,\n eventId,\n ticketClass,\n seating,\n error,\n}: SeatingSectionProps) => {\n const addSeatingDialog = useBasicDialog();\n const { data: catalogData } = useAdPlatformCatalogDataContext();\n\n const event = useMemo(() => {\n if (!eventId || !catalogData?.events?.[eventId.toString()]) {\n return undefined;\n }\n\n return catalogData.events[eventId.toString()].event;\n }, [catalogData, eventId]);\n\n const onAddSeatingSave = useCallback(\n (\n seating: Seating | null | undefined,\n ticketClass: TicketClassInfo | null | undefined\n ) => {\n onSelectSeating(seating, ticketClass);\n addSeatingDialog.closeDialog();\n },\n [onSelectSeating, addSeatingDialog]\n );\n\n const onAddSeatingCancel = useCallback(() => {\n addSeatingDialog.closeDialog();\n }, [addSeatingDialog]);\n\n const onAddSeating = useCallback(() => {\n addSeatingDialog.launchDialog();\n }, [addSeatingDialog]);\n\n const contentNA = useContent(ContentId.NA);\n\n const pills = useMemo(() => {\n const pills = [] as PillItemProps[];\n if (seating !== undefined) {\n pills.push({\n value: 'seating',\n display: seating?.section ?? contentNA,\n icon: ,\n onDelete: () => {\n onSelectSeating(undefined, undefined);\n },\n });\n }\n\n return pills;\n }, [seating, contentNA, onSelectSeating]);\n\n const enableButton = event;\n\n return (\n <>\n
    \n \n \n \n {seating !== undefined ? (\n \n \n \n ) : (\n \n \n \n \n \n \n \n )}\n
    \n {addSeatingDialog.dialogProps.isOpen && (\n \n \n \n )}\n \n );\n};\n\nexport type AddSeatingFieldValues = {\n seating: Seating | null | undefined;\n ticketClass: TicketClassInfo | null | undefined;\n};\n\nexport type AddSeatingDialogProps = Omit<\n ComponentProps,\n 'header' | 'footer'\n> & {\n onSave: (\n seating: Seating | null | undefined,\n ticketClass: TicketClassInfo | null | undefined\n ) => void;\n onCancel: () => void;\n eventId?: number;\n ticketClass?: TicketClassInfo;\n};\n\nexport const AddSeatingDialog = ({\n onSave,\n onCancel,\n eventId,\n ticketClass,\n ...genericDialogProps\n}: AddSeatingDialogProps) => {\n const addSeatingForm = useForm({\n defaultValues: {\n seating: undefined,\n },\n });\n\n const seating = addSeatingForm.watch('seating');\n\n const onSubmit = useCallback(() => {\n onSave(seating, addSeatingForm.getValues('ticketClass'));\n }, [onSave, seating, addSeatingForm]);\n\n const { data: catalogData } = useAdPlatformCatalogDataContext();\n\n const getListingsForEvent = useCallback(\n (eventId: number | undefined) => {\n if (eventId == null || catalogData == null) {\n return undefined;\n }\n return catalogData?.events[eventId]?.entities?.listings;\n },\n [catalogData]\n );\n\n const getSectionsForEvent = useCallback(\n (eventId: number | undefined) => {\n if (eventId == null || catalogData == null) {\n return undefined;\n }\n return catalogData?.venueMapByEventId[eventId].sections;\n },\n [catalogData]\n );\n\n const listingsData = getListingsForEvent(eventId);\n const sectionsData = getSectionsForEvent(eventId);\n\n const seatings = useMemo(() => {\n if (!listingsData) {\n return null;\n }\n\n return (\n listingsData.reduce(\n (acc, listing) => {\n const seating = listing.seating;\n const sectionId = listing.seating.sectionId;\n\n if (seating != null && sectionId != null) {\n if (ticketClass) {\n // Filter by ticket class id if needed\n const row = getMatchingSectionRow(listing.seating, sectionsData);\n\n const ticketClassId =\n row.section?.specRow?.tktClass?.ticketClassId;\n if (ticketClassId == ticketClass.id) {\n acc[sectionId] = listing.seating;\n }\n } else {\n acc[sectionId] = listing.seating;\n }\n }\n\n return acc;\n },\n {} as Record\n ) ?? {}\n );\n }, [listingsData, sectionsData, ticketClass]);\n\n const setSeating = useCallback(\n (seatingId: string) => {\n if (!seatings) {\n return;\n }\n\n const seating =\n seatingId == EmptySelectionKey\n ? null\n : seatings[parseInt(seatingId, 10)];\n addSeatingForm.clearErrors('seating');\n addSeatingForm.setValue('seating', seating);\n addSeatingForm.setValue('ticketClass', null);\n\n if (seating) {\n const row = getMatchingSectionRow(seating, sectionsData);\n\n const ticketClass = row.section?.specRow?.tktClass;\n if (ticketClass) {\n addSeatingForm.setValue('ticketClass', {\n id: ticketClass?.ticketClassId,\n name: ticketClass?.ticketClassName,\n color: ticketClass?.color,\n cssPostFix: ticketClass?.cssPostFix,\n });\n }\n }\n },\n [addSeatingForm, seatings, sectionsData]\n );\n\n return (\n }\n footer={\n <>\n \n \n \n \n \n }\n onClosed={() => {\n addSeatingForm.reset();\n }}\n {...genericDialogProps}\n onCancel={onCancel}\n >\n \n }>\n {\n setSeating(seatingId);\n }}\n style={{ width: '100%' }}\n />\n \n \n \n );\n};\n","import { useMemo } from 'react';\nimport { useAdPlatformCatalogDataContext } from 'src/contexts/AdPlatformCatalogDataContext';\nimport { PosSelect, PosSelectProps } from 'src/core/POS/PosSelect';\nimport { EmptySelectionKey } from 'src/utils/adGroupUtils';\nimport {\n AdPlatformCatalogResults,\n TicketClassInfo,\n} from 'src/WebApiController';\n\nexport type TicketClassSelectorProps = PosSelectProps & {\n ticketClasses: Record | null | undefined;\n};\n\nexport const AdGroupTicketClassSelector = ({\n ticketClasses,\n placeholderText,\n ...props\n}: Omit) => {\n const { data: catalogData } = useAdPlatformCatalogDataContext();\n\n return (\n \n );\n};\n\nexport const SelectionBody = ({\n catalogData,\n ticketClasses,\n placeholderText,\n ...props\n}: {\n catalogData: AdPlatformCatalogResults | undefined;\n ticketClasses: Record | null | undefined;\n placeholderText: string | undefined;\n} & Omit) => {\n const ticketClassesData = useMemo(() => {\n if (!ticketClasses) {\n return {};\n }\n\n const results =\n Object.values(ticketClasses).reduce(\n (acc, ticketClass) => {\n const ticketClassId = ticketClass.id;\n const ticketClassName = ticketClass.name;\n if (ticketClassId != null && ticketClassName != null) {\n acc[ticketClassId.toString()] = ticketClassName;\n }\n return acc;\n },\n {} as Record\n ) ?? {};\n if (Object.values(results).length == 0) {\n results[EmptySelectionKey] = 'N/A';\n }\n\n return results;\n }, [ticketClasses]);\n return (\n 10\n : false\n }\n loading={ticketClasses == null}\n placeholderText={placeholderText}\n valueOptionsContent={ticketClassesData}\n />\n );\n};\n","import { ComponentProps, useCallback, useMemo } from 'react';\nimport { useForm } from 'react-hook-form';\nimport { CancelButton } from 'src/components/Buttons';\nimport { AdGroupTicketClassSelector } from 'src/components/Selectors/AdGroupTicketClassSelector';\nimport { useAdPlatformCatalogDataContext } from 'src/contexts/AdPlatformCatalogDataContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { EventMapContextProvider } from 'src/contexts/EventMapContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { PillList } from 'src/core/ui/PillList';\nimport { PillItemProps } from 'src/core/ui/PillList/PillItem';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { IconsFill, PlusIcon, SeatIcon } from 'src/svgs/Viagogo';\nimport { EmptySelectionKey } from 'src/utils/adGroupUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getMatchingSectionRow } from 'src/utils/seatScoreUtils';\nimport { TicketClassInfo } from 'src/WebApiController';\n\nimport { BodySectionTitle, FieldWrapper } from '../common';\nimport * as styles from './AdGroupCreate.css';\nimport { BodySectionBody } from './AdGroupCreate.styled';\nimport { AdGroupSelectError } from './AdGroupSelectError';\n\nexport type TicketClassSectionInput = {\n ticketClass: TicketClassInfo | null | undefined;\n};\n\nexport interface TicketClassSectionProps {\n onSelectTicketClass: (\n ticketClass: TicketClassInfo | null | undefined\n ) => void;\n eventId?: number;\n ticketClass: TicketClassInfo | null | undefined;\n error?: string;\n}\n\nexport const TicketClassSection = ({\n onSelectTicketClass,\n eventId,\n ticketClass,\n error,\n}: TicketClassSectionProps) => {\n const addTicketClassDialog = useBasicDialog();\n const { data: catalogData } = useAdPlatformCatalogDataContext();\n\n const event = useMemo(() => {\n if (!eventId || !catalogData?.events?.[eventId.toString()]) {\n return undefined;\n }\n\n return catalogData.events[eventId.toString()].event;\n }, [catalogData, eventId]);\n\n const onAddTicketClassSave = useCallback(\n (ticketClass: TicketClassInfo | null | undefined) => {\n onSelectTicketClass(ticketClass);\n addTicketClassDialog.closeDialog();\n },\n [onSelectTicketClass, addTicketClassDialog]\n );\n\n const onAddTicketClassCancel = useCallback(() => {\n addTicketClassDialog.closeDialog();\n }, [addTicketClassDialog]);\n\n const onAddTicketClass = useCallback(() => {\n addTicketClassDialog.launchDialog();\n }, [addTicketClassDialog]);\n\n const contentNA = useContent(ContentId.NA);\n\n const pills = useMemo(() => {\n const pills = [] as PillItemProps[];\n if (ticketClass !== undefined) {\n pills.push({\n value: 'ticketClass',\n display: ticketClass?.name ?? contentNA,\n icon: ,\n onDelete: () => {\n onSelectTicketClass(undefined);\n },\n });\n }\n\n return pills;\n }, [ticketClass, contentNA, onSelectTicketClass]);\n\n const enableButton = event;\n\n return (\n <>\n
    \n \n \n \n {ticketClass !== undefined ? (\n \n \n \n ) : (\n \n \n \n \n \n \n \n )}\n
    \n {addTicketClassDialog.dialogProps.isOpen && (\n \n \n \n )}\n \n );\n};\n\nexport type AddTicketClassFieldValues = {\n ticketClass: TicketClassInfo | null | undefined;\n};\n\nexport type AddTicketClassDialogProps = Omit<\n ComponentProps,\n 'header' | 'footer'\n> & {\n onSave: (ticketClass: TicketClassInfo | null | undefined) => void;\n onCancel: () => void;\n eventId?: number;\n};\n\nexport const AddTicketClassDialog = ({\n onSave,\n onCancel,\n eventId,\n ...genericDialogProps\n}: AddTicketClassDialogProps) => {\n const addTicketClassForm = useForm({\n defaultValues: {\n ticketClass: undefined,\n },\n });\n\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError, showErrorDialog } = useErrorBoundaryContext();\n const ticketClass = addTicketClassForm.watch('ticketClass');\n\n const onSubmit = useCallback(() => {\n onSave(ticketClass);\n }, [ticketClass, onSave]);\n\n const { data: catalogData } = useAdPlatformCatalogDataContext();\n\n const getListingsForEvent = useCallback(\n (eventId: number | undefined) => {\n if (eventId == null || catalogData == null) {\n return undefined;\n }\n return catalogData?.events[eventId]?.entities?.listings;\n },\n [catalogData]\n );\n\n const getSectionsForEvent = useCallback(\n (eventId: number | undefined) => {\n if (eventId == null || catalogData == null) {\n return undefined;\n }\n return catalogData?.venueMapByEventId[eventId].sections;\n },\n [catalogData]\n );\n\n const listingsData = getListingsForEvent(eventId);\n const sectionsData = getSectionsForEvent(eventId);\n\n const ticketClasses = useMemo(() => {\n if (!listingsData) {\n return null;\n }\n\n return (\n listingsData.reduce(\n (acc, listing) => {\n const row = getMatchingSectionRow(listing.seating, sectionsData);\n const ticketClass = row.section?.specRow?.tktClass;\n const ticketClassId = ticketClass?.ticketClassId;\n if (ticketClass != null && ticketClassId != null) {\n acc[ticketClassId] = {\n id: ticketClass.ticketClassId,\n name: ticketClass.ticketClassName,\n color: ticketClass.color,\n cssPostFix: ticketClass.cssPostFix,\n } as TicketClassInfo;\n }\n return acc;\n },\n {} as Record\n ) ?? {}\n );\n }, [listingsData, sectionsData]);\n\n const setTicketClass = useCallback(\n (ticketClassId: string) => {\n if (!ticketClasses) {\n return;\n }\n\n const ticketClass =\n ticketClassId == EmptySelectionKey\n ? null\n : ticketClasses[parseInt(ticketClassId, 10)];\n addTicketClassForm.clearErrors('ticketClass');\n addTicketClassForm.setValue('ticketClass', ticketClass);\n },\n [addTicketClassForm, ticketClasses]\n );\n\n return (\n }\n footer={\n <>\n \n \n \n \n \n }\n onClosed={() => {\n addTicketClassForm.reset();\n }}\n {...genericDialogProps}\n onCancel={onCancel}\n >\n \n }>\n {\n setTicketClass(ticketClassId);\n }}\n style={{ width: '100%' }}\n />\n \n \n \n );\n};\n","import { isEqual } from 'lodash-es';\nimport {\n ComponentProps,\n useCallback,\n useContext,\n useMemo,\n useState,\n} from 'react';\nimport { FormProvider, useForm, useFormContext } from 'react-hook-form';\nimport { OkButton } from 'src/components/Buttons/OkButton';\nimport { AdCampaignsDataContext } from 'src/contexts/AdCampaignsDataContext/AdCampaignsDataContext';\nimport { AdGroupsDataContext } from 'src/contexts/AdGroupsDataContext/AdGroupsDataContext';\nimport { useAdPlatformCatalogDataContext } from 'src/contexts/AdPlatformCatalogDataContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { getTextFieldState, PosTextField } from 'src/core/POS/PosTextField';\nimport { Stack } from 'src/core/ui';\nimport { getTopLevelCategoryId } from 'src/utils/adGroupUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getPerformerAndVenueForEvent } from 'src/utils/eventWithDataUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n AdGroupBidModifierKey,\n AdGroupState,\n CampaignManagerClient,\n CreateAdGroupBidModifierValue,\n CreateAdGroupRequest,\n EventWithData,\n Listing,\n Performer,\n Seating,\n TicketClassInfo,\n Venue,\n} from 'src/WebApiController';\n\nimport { CancellableFormFooter, FieldWrapper } from '../common';\nimport { CancellableFormHeader } from '../common/CancellableFormHeader';\nimport { ConnectedEventEntityHeader } from '../common/EventEntityHeader';\nimport { modalDetails } from '../common/Modals.css';\nimport { ModalBody } from '../Modal';\nimport { ModalBodyDataContainer, ModalFooter } from '../Modal/Modal.styled';\nimport { EventSection } from './AdGroupSelectEventSection';\nimport { GenreSection } from './AdGroupSelectGenreSection';\nimport { ListingSection } from './AdGroupSelectListingSection';\nimport { PerformerSection } from './AdGroupSelectPerformerSection';\nimport { SeatingSection } from './AdGroupSelectSeatingSection';\nimport { TicketClassSection } from './AdGroupSelectTicketClassSection';\n\ntype AdGroupCreateInput = {\n genreId?: number;\n performer: Performer | null | undefined;\n event: EventWithData | null | undefined;\n venue: Venue | null | undefined;\n ticketClass: TicketClassInfo | null | undefined;\n seating: Seating | null | undefined;\n listing: Listing | null | undefined;\n name: string;\n baseBid: number;\n maxBid: number;\n dailyBudget: number;\n};\n\nexport const AdGroupCreateForm = () => {\n const defaultValues = useMemo(() => {\n return {\n name: '',\n baseBid: 0,\n maxBid: 0,\n dailyBudget: 0,\n } as AdGroupCreateInput;\n }, []);\n\n const methods = useForm({\n defaultValues,\n });\n\n return (\n \n \n \n );\n};\n\nexport const AdGroupCreateModal = {\n children: ,\n clickOutsideToClose: true,\n size: 'slide-in',\n};\n\nexport function AdGroupCreateFormContent({\n formState,\n handleSubmit,\n watch,\n setError,\n clearErrors,\n}: Omit<\n ComponentProps>,\n 'children'\n>) {\n const curFormValues = watch();\n\n const { closeModal } = useContext(ModalContext);\n\n const { allCampaignData } = useContext(AdCampaignsDataContext);\n\n const adCampaignEntity = allCampaignData ? allCampaignData[0] : null;\n\n const { showErrorDialog } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const { refreshData } = useContext(AdGroupsDataContext);\n\n const [isLoading, setIsLoading] = useState(false);\n\n const onSubmit = useCallback(\n async (adGroupCreateInput: AdGroupCreateInput) => {\n setIsLoading(true);\n\n if (!adCampaignEntity) {\n return;\n }\n\n const currencyCode = adCampaignEntity?.currencyCode;\n\n tryInvokeApi(\n async () => {\n setIsLoading(true);\n\n const client = new CampaignManagerClient(\n activeAccountWebClientConfig\n );\n\n const createAdGroupClientRequest: CreateAdGroupRequest = {\n name: adGroupCreateInput.name,\n state: AdGroupState.Active,\n campaignId: adCampaignEntity!.campaignId,\n baseBid: {\n currencyCode: currencyCode,\n amount: adGroupCreateInput.baseBid,\n },\n maxBid: {\n currencyCode: currencyCode,\n amount: adGroupCreateInput.maxBid,\n },\n dailyBudget: {\n currencyCode: currencyCode,\n amount: adGroupCreateInput.dailyBudget,\n },\n bidModifiers: [],\n };\n\n const bidModifierValue: CreateAdGroupBidModifierValue = {\n isManaged: false,\n value: 1.0,\n };\n\n const baseKey: AdGroupBidModifierKey = {\n topLevelCategoryId: null,\n leafCategoryId: null,\n venueId: null,\n eventId: null,\n ticketClassId: null,\n sectionId: null,\n rowId: null,\n externalId: null,\n };\n\n // Add specific bid modifier, based on hierarchy\n if (adGroupCreateInput.listing) {\n createAdGroupClientRequest.bidModifiers.push({\n key: {\n ...baseKey,\n eventId: adGroupCreateInput.event!.event.viagId,\n externalId: adGroupCreateInput.listing.idOnMkp!,\n },\n value: bidModifierValue,\n });\n } else if (adGroupCreateInput.seating) {\n createAdGroupClientRequest.bidModifiers.push({\n key: {\n ...baseKey,\n eventId: adGroupCreateInput.event!.event.viagId,\n sectionId: adGroupCreateInput.seating.sectionId,\n },\n value: bidModifierValue,\n });\n } else if (adGroupCreateInput.ticketClass) {\n createAdGroupClientRequest.bidModifiers.push({\n key: {\n ...baseKey,\n eventId: adGroupCreateInput.event!.event.viagId,\n ticketClassId: adGroupCreateInput.ticketClass.id,\n },\n value: bidModifierValue,\n });\n } else if (adGroupCreateInput.event) {\n createAdGroupClientRequest.bidModifiers.push({\n key: {\n ...baseKey,\n eventId: adGroupCreateInput.event!.event.viagId!,\n },\n value: bidModifierValue,\n });\n } else if (adGroupCreateInput.venue) {\n createAdGroupClientRequest.bidModifiers.push({\n key: {\n ...baseKey,\n venueId: adGroupCreateInput.venue.viagId,\n },\n value: bidModifierValue,\n });\n } else if (adGroupCreateInput.performer) {\n createAdGroupClientRequest.bidModifiers.push({\n key: {\n ...baseKey,\n leafCategoryId: adGroupCreateInput.performer.viagId,\n },\n value: bidModifierValue,\n });\n } else if (adGroupCreateInput.genreId) {\n createAdGroupClientRequest.bidModifiers.push({\n key: {\n ...baseKey,\n topLevelCategoryId: adGroupCreateInput.genreId,\n },\n value: bidModifierValue,\n });\n }\n const response = await client.createAdGroup(\n createAdGroupClientRequest\n );\n\n if (response.success) {\n await refreshData(adCampaignEntity.campaignId, undefined);\n } else {\n const errorMessage = 'Failed to create Ad Group';\n\n showErrorDialog(\n 'CampaignManagerClient.createAdGroup',\n { message: errorMessage, status: 500 },\n {\n trackErrorData: adGroupCreateInput,\n }\n );\n return;\n }\n\n closeModal(true);\n },\n (error) => {\n showErrorDialog('CampaignManagerClient.createAdGroup', error, {\n trackErrorData: adGroupCreateInput,\n });\n },\n () => {\n setIsLoading(false);\n }\n );\n },\n [\n activeAccountWebClientConfig,\n adCampaignEntity,\n closeModal,\n refreshData,\n showErrorDialog,\n ]\n );\n\n const hasChanges = useCallback(\n (form: AdGroupCreateInput) => {\n return (\n !isEqual(formState.defaultValues?.name, form.name) ||\n !isEqual(formState.defaultValues?.baseBid, form.baseBid) ||\n !isEqual(formState.defaultValues?.maxBid, form.maxBid) ||\n !isEqual(formState.defaultValues?.dailyBudget, form.dailyBudget) ||\n !isEqual(formState.defaultValues?.genreId, form.genreId) ||\n !isEqual(formState.defaultValues?.performer, form.performer) ||\n !isEqual(formState.defaultValues?.venue, form.venue) ||\n !isEqual(formState.defaultValues?.event, form.event) ||\n !isEqual(formState.defaultValues?.ticketClass, form.ticketClass) ||\n !isEqual(formState.defaultValues?.seating, form.seating) ||\n !isEqual(formState.defaultValues?.listing, form.listing)\n );\n },\n [\n formState.defaultValues?.name,\n formState.defaultValues?.baseBid,\n formState.defaultValues?.maxBid,\n formState.defaultValues?.dailyBudget,\n formState.defaultValues?.genreId,\n formState.defaultValues?.performer,\n formState.defaultValues?.venue,\n formState.defaultValues?.event,\n formState.defaultValues?.ticketClass,\n formState.defaultValues?.seating,\n formState.defaultValues?.listing,\n ]\n );\n\n const requiredMsg = useContent(ContentId.Required);\n const maxBidLessThanBaseBidMsg = useContent(\n ContentId.MaxBidLessThanBaseBidMsg\n );\n const dailyBudgetLessThanMaxBidMsg = useContent(\n ContentId.DailyBudgetLessThanMaxBidMsg\n );\n\n const validateForm = useCallback(() => {\n let hasErrors = false;\n\n clearErrors('name');\n if (!curFormValues.name) {\n setError('name', { message: requiredMsg }, { shouldFocus: true });\n hasErrors = true;\n }\n\n clearErrors('baseBid');\n if (!curFormValues.baseBid) {\n setError('baseBid', { message: requiredMsg }, { shouldFocus: true });\n hasErrors = true;\n }\n\n clearErrors('maxBid');\n if (!curFormValues.maxBid) {\n setError('maxBid', { message: requiredMsg }, { shouldFocus: true });\n hasErrors = true;\n }\n\n if (curFormValues.maxBid < curFormValues.baseBid) {\n setError(\n 'maxBid',\n { message: maxBidLessThanBaseBidMsg },\n { shouldFocus: true }\n );\n hasErrors = true;\n }\n\n clearErrors('dailyBudget');\n if (!curFormValues.dailyBudget) {\n setError('dailyBudget', { message: requiredMsg }, { shouldFocus: true });\n hasErrors = true;\n }\n\n if (curFormValues.dailyBudget < curFormValues.maxBid) {\n setError(\n 'dailyBudget',\n { message: dailyBudgetLessThanMaxBidMsg },\n { shouldFocus: true }\n );\n hasErrors = true;\n }\n\n // Require at least genre to be specified\n clearErrors('genreId');\n if (!curFormValues.genreId) {\n setError('genreId', { message: requiredMsg }, { shouldFocus: true });\n hasErrors = true;\n }\n\n return !hasErrors;\n }, [\n clearErrors,\n curFormValues.baseBid,\n curFormValues.dailyBudget,\n curFormValues.genreId,\n curFormValues.maxBid,\n curFormValues.name,\n dailyBudgetLessThanMaxBidMsg,\n maxBidLessThanBaseBidMsg,\n requiredMsg,\n setError,\n ]);\n\n const onSubmitHandler = useCallback(() => {\n if (!hasChanges(curFormValues)) return;\n\n if (!validateForm()) {\n return;\n }\n\n handleSubmit(onSubmit)();\n }, [hasChanges, curFormValues, validateForm, handleSubmit, onSubmit]);\n\n const formHasChanges = hasChanges(curFormValues);\n\n return (\n <>\n \n }\n />\n \n\n \n
    \n \n \n \n
    \n
    \n\n \n \n \n \n \n \n );\n}\n\nexport const AdGroupCreateFormBody = () => {\n const { setValue, watch, formState, clearErrors } =\n useFormContext();\n\n const namePlaceholder = useContent(ContentId.EnterAdGroupName);\n\n const { getUiCurrency } = useLocalizationContext();\n const { loginContext } = useAppContext();\n\n const uiCurrency = getUiCurrency(\n loginContext?.user?.activeAccount?.currencyCode\n );\n\n const name = watch('name');\n const baseBid = watch('baseBid');\n const maxBid = watch('maxBid');\n const dailyBudget = watch('dailyBudget');\n\n const setName = useCallback(\n (name: string) => {\n clearErrors('name');\n setValue('name', name);\n },\n [clearErrors, setValue]\n );\n\n const setBaseBid = useCallback(\n (baseBid: number) => {\n if (baseBid >= 0 && baseBid <= Number.MAX_VALUE) {\n clearErrors('baseBid');\n setValue('baseBid', baseBid);\n }\n },\n [clearErrors, setValue]\n );\n\n const setMaxBid = useCallback(\n (maxBid: number) => {\n if (maxBid >= 0 && maxBid <= Number.MAX_VALUE) {\n clearErrors('maxBid');\n setValue('maxBid', maxBid);\n }\n },\n [clearErrors, setValue]\n );\n\n const setDailyBudget = useCallback(\n (dailyBudget: number) => {\n if (dailyBudget >= 0 && dailyBudget <= Number.MAX_VALUE) {\n clearErrors('dailyBudget');\n setValue('dailyBudget', dailyBudget);\n }\n },\n [clearErrors, setValue]\n );\n\n return (\n <>\n \n }\n >\n {\n setName(e.target.value);\n }}\n />\n \n \n \n \n }\n >\n {\n const v = parseFloat(e.target.value) || 0;\n setBaseBid(v);\n }}\n />\n \n \n \n }\n >\n {\n const v = parseFloat(e.target.value) || 0;\n setMaxBid(v);\n }}\n />\n \n \n \n }\n >\n {\n const v = parseFloat(e.target.value) || 0;\n setDailyBudget(v);\n }}\n />\n \n \n \n );\n};\n\nexport const AdGroupCreateFormHierarchy = () => {\n const { setValue, watch, clearErrors, formState } =\n useFormContext();\n\n const genreId = watch('genreId');\n const performer = watch('performer');\n const venue = watch('venue');\n const event = watch('event');\n const ticketClass = watch('ticketClass');\n const seating = watch('seating');\n const listing = watch('listing');\n\n const { data: catalogData } = useAdPlatformCatalogDataContext();\n\n const onSelectGenre = (genreId?: number, clearChildren = true): void => {\n clearErrors('genreId');\n setValue('genreId', genreId);\n\n if (clearChildren) {\n setValue('performer', undefined);\n setValue('venue', undefined);\n setValue('event', undefined);\n setValue('ticketClass', undefined);\n setValue('seating', undefined);\n setValue('listing', undefined);\n }\n };\n\n const onSelectPerformer = (\n performer: Performer | null | undefined,\n clearChildren = true\n ): void => {\n clearErrors('performer');\n setValue('performer', performer);\n\n if (performer && performer.categ?.length > 0 && genreId === undefined) {\n const genreId = getTopLevelCategoryId(performer.categ[0]);\n onSelectGenre(genreId, false);\n }\n\n if (clearChildren) {\n setValue('venue', undefined);\n setValue('event', undefined);\n setValue('ticketClass', undefined);\n setValue('seating', undefined);\n setValue('listing', undefined);\n }\n };\n\n const onSelectVenue = (\n venue: Venue | null | undefined,\n clearChildren = true\n ): void => {\n clearErrors('venue');\n setValue('venue', venue);\n\n if (clearChildren) {\n setValue('event', undefined);\n setValue('ticketClass', undefined);\n setValue('seating', undefined);\n setValue('listing', undefined);\n }\n };\n\n const onSelectEvent = (\n event: EventWithData | null | undefined,\n clearChildren = true\n ): void => {\n clearErrors('event');\n setValue('event', event);\n\n if (clearChildren) {\n setValue('ticketClass', undefined);\n setValue('seating', undefined);\n setValue('listing', undefined);\n }\n\n // TODO: Also handle onSelectVenue() when we enable this\n\n if (catalogData && event && performer === undefined) {\n const { performer: performerForEvent } = getPerformerAndVenueForEvent(\n event.event,\n catalogData\n );\n\n if (performerForEvent) {\n onSelectPerformer(performerForEvent, false);\n }\n }\n };\n\n const onSelectTicketClass = (\n ticketClass: TicketClassInfo | null | undefined,\n clearChildren = true\n ): void => {\n clearErrors('ticketClass');\n setValue('ticketClass', ticketClass);\n\n if (clearChildren) {\n setValue('seating', undefined);\n setValue('listing', undefined);\n }\n };\n\n const onSelectSeating = (\n seating: Seating | null | undefined,\n parentTicketClass: TicketClassInfo | null | undefined,\n clearChildren = true\n ): void => {\n clearErrors('seating');\n setValue('seating', seating);\n\n if (ticketClass === undefined) {\n onSelectTicketClass(parentTicketClass, false);\n }\n\n if (clearChildren) {\n setValue('listing', undefined);\n }\n };\n\n const onSelectListing = (\n listing: Listing | null | undefined,\n parentSeating: Seating | null | undefined,\n parentTicketClass: TicketClassInfo | null | undefined\n ): void => {\n clearErrors('listing');\n setValue('listing', listing);\n\n if (seating === undefined) {\n onSelectSeating(parentSeating, parentTicketClass, false);\n }\n };\n\n return (\n <>\n \n \n \n \n \n \n \n \n \n );\n};\n","import styled from 'styled-components/macro';\n\nexport const AdGroupsToolbarDiv = styled.div`\n display: flex;\n justify-content: space-between;\n align-items: center;\n border-bottom: 1px solid ${(props) => props.theme.colors.borderPrimary};\n padding: ${(props) => props.theme.spacing(2, 4, 2, 3)};\n\n ${({ theme: { media, spacing } }) =>\n `${media.makeMediaQuery(\n media.breakpoints.md,\n `padding: ${spacing(2, 8, 2, 6)};`\n )}`}\n\n .add-adGroup {\n white-space: nowrap;\n width: fit-content;\n }\n`;\n\nexport const FilterBarLeftSide = styled.div`\n display: flex;\n flex-grow: 1;\n align-items: center;\n gap: 8px;\n\n > div {\n flex-grow: 1;\n }\n`;\n\nexport const FilterBarRightSide = styled.div`\n display: flex;\n align-items: center;\n padding-inline-start: ${(props) => props.theme.spacing(2)};\n\n ${({ theme: { media, spacing } }) =>\n `${media.makeMediaQuery(\n media.breakpoints.md,\n `padding-inline-start: ${spacing(4)};`\n )}`}\n`;\n","import { MouseEvent, useContext } from 'react';\nimport { BackSection } from 'src/components/common/BackSection';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { Button } from 'src/core/ui';\nimport { AdGroupCreateModal } from 'src/modals/AdGroupCreate/AdGroupCreate';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport * as styles from './AdGroupsToolbar.css';\nimport {\n AdGroupsToolbarDiv,\n FilterBarLeftSide,\n FilterBarRightSide,\n} from './AdGroupsToolbar.styled';\n\nexport type AdGroupsToolbarType = {\n disabled?: boolean;\n onColumnSettingButtonClickHandler?: (\n e: MouseEvent\n ) => void;\n};\n\nexport function AdGroupsToolbar({\n returnUrl,\n}: {\n returnUrl: string | undefined;\n}) {\n const { setModal } = useContext(ModalContext);\n\n return (\n \n \n {returnUrl && }\n \n \n setModal(AdGroupCreateModal)}\n >\n \n \n \n \n );\n}\n","import { useMemo } from 'react';\nimport { useLocation, useSearchParams } from 'react-router-dom';\nimport { AdGroupsFlattenedView } from 'src/components/AdGroupsFlattenedView/AdGroupsFlattenedView';\nimport * as EmptySectionContent from 'src/components/common/EmptySectionContent';\nimport { AdCampaignIdProvider } from 'src/contexts/AdCampaignIdContext/AdCampaignIdContext';\nimport { AdCampaignsDataContextProvider } from 'src/contexts/AdCampaignsDataContext/AdCampaignsDataContext';\nimport {\n AdGroupsDataContextProvider,\n useAdGroupsDataContext,\n} from 'src/contexts/AdGroupsDataContext/AdGroupsDataContext';\nimport {\n AdPlatformCatalogDataContextProvider,\n useAdPlatformCatalogDataContext,\n} from 'src/contexts/AdPlatformCatalogDataContext';\nimport { AdPlatformReportingContextProvider } from 'src/contexts/AdPlatformReportingContext/AdPlatformReportingContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { DialogProvider } from 'src/contexts/DialogContext/DialogContext';\nimport { SellerUserSettingsProvider } from 'src/contexts/SellerUserSettingsContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { Stack } from 'src/core/ui';\nimport { LayoutContent } from 'src/navigations/LayoutContent';\nimport { SearchSolidIcon } from 'src/svgs/Viagogo';\nimport { AdCampaignQueryParam } from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { removeDeepLinkUrlPartsFromRelativeUrl } from 'src/utils/deepLinkUtils';\nimport { SomethingWentWrong } from 'src/views';\nimport { TransactionAggType, UserSetting } from 'src/WebApiController';\n\nimport { getDefaultReturnUrl } from '../InventoryEvent/constants';\nimport { MainRoute } from '../MainRoute';\nimport { AdGroupsToolbar } from '../SponsoredListings/AdGroupsToolbar/AdGroupsToolbar';\n\nconst SPONSOREDLISTINGS_USER_SETTINGS: UserSetting[] = [];\n\nexport const AdCampaign = () => {\n const [searchParams] = useSearchParams();\n const adCampaignId = searchParams.get(AdCampaignQueryParam);\n\n if (!adCampaignId) {\n return null;\n }\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport const AdGroupsContent = ({ adCampaignId }: { adCampaignId: string }) => {\n const location = useLocation();\n\n const returnUrl = useMemo(() => {\n const relativeUrl =\n (location.state as { returnUrl?: string })?.returnUrl ||\n getDefaultReturnUrl(adCampaignId);\n\n return removeDeepLinkUrlPartsFromRelativeUrl(relativeUrl, [\n AdCampaignQueryParam,\n ]);\n }, [adCampaignId, location.state]);\n\n const {\n adGroupsDataQuery,\n adGroupsData,\n errorInfo: errorInfoAdGroups,\n } = useAdGroupsDataContext();\n\n const { errorInfo: errorInfoCatalog } = useAdPlatformCatalogDataContext();\n\n const errorInfo = errorInfoAdGroups ?? errorInfoCatalog;\n\n return (\n \n \n \n \n {errorInfo == null &&\n (adGroupsDataQuery.isLoading ||\n adGroupsDataQuery.data == null) && }\n {errorInfo && (\n \n )\n }\n />\n )}\n {!(adGroupsDataQuery.isLoading || adGroupsDataQuery.data == null) &&\n !errorInfo && (\n <>\n \n {adGroupsData?.length ? (\n \n ) : (\n \n \n \n }\n >\n \n \n \n \n \n \n \n )}\n \n )}\n \n \n \n \n );\n};\n","import clsx from 'clsx';\nimport { collapsableButton } from 'src/components/common/CollapsableContent/ExpandCollapsableContentButton.css';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { ChevronDownIcon, IconsFill } from 'src/svgs/Viagogo';\n\ninterface ExpandCollapsableContentButton {\n onClick: () => void;\n className?: string;\n}\n\nexport const ExpandCollapsableContentButton = ({\n onClick,\n className,\n}: ExpandCollapsableContentButton) => {\n return (\n \n \n \n );\n};\n","import clsx from 'clsx';\nimport {\n MouseEvent,\n ReactNode,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport { useToggle } from 'react-use';\nimport { ExpandCollapsableContentButton } from 'src/components/common/CollapsableContent/ExpandCollapsableContentButton';\nimport { collapsedRow } from 'src/components/Events/EventListing/InventoryEventListing/InventoryFlattenedView.css';\nimport { AdGroupsDataContext } from 'src/contexts/AdGroupsDataContext/AdGroupsDataContext';\nimport { useAdPlatformCatalogDataContext } from 'src/contexts/AdPlatformCatalogDataContext';\nimport { useCollapsableViewContext } from 'src/contexts/CollapsableViewContext/CollapsableViewContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { InputPriceFocusProvider } from 'src/contexts/InputPriceFocusContext/InputPriceFocusContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { LayoutIcon } from 'src/svgs';\nimport { ListingWithEvent } from 'src/tables/ListingTable/ListingTable.types';\nimport { ListingTableFlattened } from 'src/tables/ListingTable/ListingTableFlattened';\nimport { getTopLevelCategoryName } from 'src/utils/adGroupUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getEventPerformerVenue } from 'src/utils/eventWithDataUtils';\nimport { EventWithData, Listing } from 'src/WebApiController';\n\nimport * as styles from './AdGroupListingsFlattenedView.css';\n\ntype AdGroupListingsFlattenedViewProps = {\n before?: ReactNode;\n};\n\nexport const AdGroupListingsFlattenedView = ({\n before,\n}: AdGroupListingsFlattenedViewProps) => {\n const [isColumnModalOpen, toggleColumnModal] = useToggle(false);\n const [isLoading, setIsLoading] = useState(true);\n const { isCollapsedView, setIsCollapsedView } = useCollapsableViewContext();\n\n const { data: catalog } = useAdPlatformCatalogDataContext();\n\n const { adGroupsData } = useContext(AdGroupsDataContext);\n const adGroup = adGroupsData ? adGroupsData[0] : null;\n\n const onColumnSettingButtonClickHandler = (\n e: MouseEvent\n ) => {\n e.stopPropagation();\n if (!isColumnModalOpen) toggleColumnModal(true);\n };\n\n const getListingById = useCallback(\n (listingId: string) => {\n if (catalog == null) {\n return undefined;\n }\n return catalog.listingsByExternalId[listingId];\n },\n [catalog]\n );\n\n const getListingsForEvents = useCallback(\n (eventIds: number[]) => {\n if (catalog == null) {\n return undefined;\n }\n return Object.values(catalog.events).flatMap(\n (event) => event.entities.listings ?? []\n );\n },\n [catalog]\n );\n\n const listingExternalIdLookup = useCallback(\n (key: string) => {\n return getListingById(key);\n },\n [getListingById]\n );\n\n const venueMapLookup = useCallback(\n (eventId?: number) => {\n if (!catalog || !eventId) {\n return undefined;\n }\n return catalog.venueMapByEventId[eventId];\n },\n [catalog]\n );\n\n const resolveListings = useCallback(async () => {\n if (!adGroup || !catalog) {\n return undefined;\n }\n\n const listingsArray: Listing[] = [];\n\n // Get explicit listings\n const listingPromises = adGroup.bidModifiers\n .filter((b) => b.key.externalId != null)\n .map((b) => {\n const listing = listingExternalIdLookup(b.key.externalId!);\n if (listing) {\n listingsArray.push(listing);\n }\n });\n await Promise.all(listingPromises);\n\n // Get listings for ticket class\n const ticketClassPromises = adGroup.bidModifiers\n .filter((b) => b.key.ticketClassId != null && b.key.eventId != null)\n .map(async (b) => {\n const eventId = b.key.eventId!;\n const venueMap = venueMapLookup(eventId);\n const rows = venueMap?.sections\n .flatMap((section) => section.rows)\n .filter(\n (row) =>\n row?.tktClass?.id.toString() == b.key.ticketClassId?.toString()\n );\n\n const event = catalog?.events[eventId.toString()];\n if (event && rows) {\n const listings = getListingsForEvents([eventId]);\n const filteredListings = Object.values(listings ?? [])\n .flat()\n .filter((l) => rows.some((row) => l.seating.rowId == row.id));\n listingsArray.push(...filteredListings);\n }\n });\n await Promise.all(ticketClassPromises);\n\n // Get listings for section\n const sectionPromises = adGroup.bidModifiers\n .filter((b) => b.key.sectionId != null && b.key.eventId != null)\n .map(async (b) => {\n const eventId = b.key.eventId!;\n const venueMap = venueMapLookup(eventId);\n const sections = venueMap?.sections.filter(\n (section) => section.id.toString() == b.key.sectionId?.toString()\n );\n const event = catalog?.events[eventId.toString()];\n if (sections && event) {\n const listings = getListingsForEvents([eventId]);\n const filteredListings = Object.values(listings ?? [])\n .flat()\n .filter((l) =>\n sections.some((section) => l.seating.sectionId == section.id)\n );\n listingsArray.push(...filteredListings);\n }\n });\n await Promise.all(sectionPromises);\n\n // Get explicit events\n const explicitEvents = adGroup.bidModifiers\n .filter(\n (b) =>\n b.key.eventId != null &&\n b.key.sectionId == null &&\n b.key.ticketClassId == null &&\n b.key.externalId == null\n )\n .reduce((acc, b) => {\n const event = catalog?.events[b.key.eventId!];\n if (event) {\n acc.push(event);\n }\n return acc;\n }, []);\n\n // Get events for venue\n const eventsForVenues = adGroup.bidModifiers\n .filter((b) => b.key.venueId != null)\n .reduce((acc, b) => {\n const matchedEvents = Object.values(catalog?.events || {}).filter(\n (e) => e.event.venueId.toString() == b.key.venueId?.toString()\n );\n return acc.concat(matchedEvents);\n }, []);\n\n // Get events for performer\n const eventsForPerformer = adGroup.bidModifiers\n .filter((b) => b.key.leafCategoryId != null)\n .reduce((acc, b) => {\n const matchedEvents = Object.values(catalog?.events || {}).filter(\n (e) => e.event.perfId?.toString() == b.key.leafCategoryId?.toString()\n );\n return acc.concat(matchedEvents);\n }, []);\n\n // Get events for genre\n const eventsForGenre = adGroup.bidModifiers\n .filter((b) => b.key.topLevelCategoryId != null)\n .reduce((acc, b) => {\n const matchedEvents = Object.values(catalog?.events || {}).filter(\n (e) =>\n e.event.genre?.toString() ==\n getTopLevelCategoryName(b.key.topLevelCategoryId!)\n );\n return acc.concat(matchedEvents);\n }, []);\n\n // Concat all events\n const allEvents: Set = [\n explicitEvents,\n eventsForVenues,\n eventsForPerformer,\n eventsForGenre,\n ].reduce((set, events) => {\n events.forEach((event) => set.add(event));\n return set;\n }, new Set());\n\n // Retrieve listings for events\n const listingsMapForEvents = getListingsForEvents(\n [...allEvents]\n .map((event) => event.event.viagId)\n .filter(\n (viagId): viagId is number => viagId !== null && viagId !== undefined\n )\n );\n\n listingsArray.push(...Object.values(listingsMapForEvents ?? []).flat());\n\n return listingsArray\n ?.map((l) => {\n const { event, performer, venue } = getEventPerformerVenue(\n l.viagVirtualId,\n {\n ...catalog,\n viagIdToLatestIdLookup: {},\n posIdToViagIdLookup: {},\n }\n );\n if (event) {\n return {\n event: event.event,\n listing: l,\n performer,\n venue,\n eventWithData: event,\n };\n }\n\n return null;\n })\n .filter((l) => l != null)\n .map((l) => l!);\n }, [\n adGroup,\n catalog,\n getListingsForEvents,\n listingExternalIdLookup,\n venueMapLookup,\n ]);\n\n const [processedListings, setProcessedListings] = useState<\n (ListingWithEvent & { eventWithData: EventWithData })[]\n >([]);\n\n useEffect(() => {\n const processAdGroup = async () => {\n if (!adGroupsData || !catalog) {\n return [];\n }\n\n setIsLoading(true);\n const listings = await resolveListings();\n setProcessedListings(\n listings?.map((l) => ({\n event: l.event,\n performer: l.performer ?? undefined,\n venue: l.venue ?? undefined,\n eventWithData: l.eventWithData,\n })) ?? []\n );\n setIsLoading(false);\n };\n processAdGroup();\n }, [adGroupsData, catalog, resolveListings]);\n\n const { listingCount, ungroupedListingCount, listingGroupCount } =\n useMemo(() => {\n let listingCount = 0;\n let ungroupedListingCount = 0;\n let listingGroupCount = 0;\n\n (processedListings ?? []).forEach(({ eventWithData }) => {\n listingCount += eventWithData.counts.listCnt ?? 0;\n listingGroupCount += eventWithData.counts.listGrpCnt ?? 0;\n ungroupedListingCount += eventWithData.counts.ungrListCnt ?? 0;\n });\n\n return { listingCount, ungroupedListingCount, listingGroupCount };\n }, [processedListings]);\n\n return (\n \n \n {before}\n \n \n {isCollapsedView && (\n setIsCollapsedView(false)}\n />\n )}\n \n \n \n {isLoading ? (\n \n ) : (\n \n )}\n \n \n );\n};\n","import { useMemo } from 'react';\nimport { useLocation, useSearchParams } from 'react-router-dom';\nimport { AdGroupListingsFlattenedView } from 'src/components/AdGroupsFlattenedView/AdGroupListingsFlattenedView';\nimport * as EmptySectionContent from 'src/components/common/EmptySectionContent';\nimport {\n AdGroupsDataContextProvider,\n useAdGroupsDataContext,\n} from 'src/contexts/AdGroupsDataContext/AdGroupsDataContext';\nimport { AdPlatformCatalogDataContextProvider } from 'src/contexts/AdPlatformCatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ModalProvider } from 'src/contexts/ModalContext';\nimport { SellerUserSettingsProvider } from 'src/contexts/SellerUserSettingsContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { LayoutContent } from 'src/navigations/LayoutContent';\nimport { SearchSolidIcon } from 'src/svgs/Viagogo';\nimport {\n AdCampaignQueryParam,\n AdGroupListingsQueryParam,\n} from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { removeDeepLinkUrlPartsFromRelativeUrl } from 'src/utils/deepLinkUtils';\nimport { SomethingWentWrong } from 'src/views';\nimport { UserSetting } from 'src/WebApiController';\n\nimport { getDefaultReturnUrl } from '../InventoryEvent/constants';\nimport { MainRoute } from '../MainRoute';\nimport { AdGroupsToolbar } from '../SponsoredListings/AdGroupsToolbar/AdGroupsToolbar';\nimport * as styles from './AdGroupListings.css';\n\nconst SPONSOREDLISTINGS_USER_SETTINGS: UserSetting[] = [];\n\nexport const AdGroupListings = () => {\n const [searchParams] = useSearchParams();\n const adCampaignId = searchParams.get(AdCampaignQueryParam);\n const adGroupId = searchParams.get(AdGroupListingsQueryParam);\n\n const location = useLocation();\n\n const returnUrl = useMemo(() => {\n const relativeUrl =\n (location.state as { returnUrl?: string })?.returnUrl ||\n getDefaultReturnUrl(adGroupId);\n\n return removeDeepLinkUrlPartsFromRelativeUrl(relativeUrl, [\n AdGroupListingsQueryParam,\n ]);\n }, [adGroupId, location.state]);\n\n if (!adGroupId) {\n return null;\n }\n\n return (\n \n \n \n \n \n \n
    \n \n
    \n \n
    \n
    \n
    \n \n );\n};\n\nexport const AdGroupListingsContent = ({\n adGroupId,\n}: {\n adGroupId: string;\n}) => {\n const { adGroupsDataQuery, adGroupsData, errorInfo } =\n useAdGroupsDataContext();\n\n return (\n
    \n {(adGroupsDataQuery.isLoading || adGroupsDataQuery.data == null) && (\n \n )}\n {errorInfo && (\n \n )\n }\n />\n )}\n {!(adGroupsDataQuery.isLoading || adGroupsDataQuery.data == null) &&\n !errorInfo && (\n <>\n {adGroupsData?.length ? (\n \n \n \n ) : (\n \n \n \n }\n >\n \n \n \n \n \n \n \n )}\n \n )}\n
    \n );\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { AutoPoClient } from 'src/WebApiController';\n\nexport function useGetInboundEmailSellerGuidIds() {\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n return useQuery({\n queryKey: [\n 'getInboundEmailSellerGuidIds',\n activeAccountWebClientConfig.activeAccountId,\n ],\n queryFn: () => {\n if (activeAccountWebClientConfig.activeAccountId == null) {\n return null;\n }\n return tryInvokeApi(\n () => {\n return new AutoPoClient(\n activeAccountWebClientConfig\n ).getInboundEmailSellerGuidIds();\n },\n (error) => {\n trackError('AutoPoClient.getInboundEmailSellerGuidIds', error);\n }\n );\n },\n\n enabled: activeAccountWebClientConfig.activeAccountId != null,\n refetchOnWindowFocus: false,\n });\n}\n","import { useState } from 'react';\nimport { CancelButton } from 'src/components/Buttons';\nimport { Content } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport * as Tooltip from 'src/core/ui';\nimport { useGetInboundEmailSellerGuidIds } from 'src/hooks/api/useGetInboundEmailSellerGuidIds';\nimport { CopyIcon } from 'src/svgs';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport AddMessageSourceIcon from '~icons/pos/addMessageSource';\n\nimport { Modal, ModalBody, ModalFooter, ModalHeader } from '../Modal';\nimport * as styles from './MessagesAddSourceModal.css';\n\nexport type MessagesAddSourceModalProps = {\n isOpen?: boolean;\n onClose?: () => void;\n};\n\nexport function MessagesAddSourceModal({\n isOpen,\n onClose,\n}: MessagesAddSourceModalProps) {\n const guidsQuery = useGetInboundEmailSellerGuidIds();\n const [showCopiedText, setShowCopiedText] = useState(false);\n return (\n \n \n
    \n
    \n \n
    \n
    \n
    \n \n
    \n \n
    \n \n
    \n
      \n
    1. \n \n
    2. \n
    3. \n
      \n \n
      \n {guidsQuery.data?.map((id) => {\n const email = `${id}@ticketoutbox.com`;\n return (\n
      \n {email}\n \n {\n if (!open) {\n setShowCopiedText(false);\n }\n }}\n >\n \n
      \n {\n e.stopPropagation(); // stops the tooltip from disappearing on click\n\n navigator.clipboard.writeText(email);\n setShowCopiedText(true);\n }}\n />\n
      \n
      \n {\n e.preventDefault(); // stops the tooltip from disappearing on click\n }}\n >\n {showCopiedText ? (\n \n ) : (\n \n )}\n \n \n
      \n
      \n );\n })}\n
    4. \n
    5. \n \n
    6. \n
    \n
    \n
    \n \n \n \n
    \n );\n}\n","import { ReactNode } from 'react';\n\nimport { CountBadge } from '../CountBadge';\nimport { Stack } from '../Stack';\nimport * as styles from './Badge.css';\n\nexport function Badge({ children }: { children?: ReactNode }) {\n return
    {children}
    ;\n}\n\nexport function BadgeWithCounts({\n count,\n children,\n title,\n}: {\n count: number;\n children?: ReactNode;\n title?: string;\n}) {\n return (\n \n {children} \n \n );\n}\n","import { useNavigate } from 'react-router-dom';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ToolbarButton } from 'src/core/POS/ToolbarButton';\nimport { vars } from 'src/core/themes';\nimport { Badge } from 'src/core/ui/Badge';\nimport { ScrollableToolbar } from 'src/core/ui/ScrollableToolbar';\nimport { CalendarOutlineIcon, ChatIcon, MailIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nexport type EmailNavPageName =\n | 'inbox'\n | 'uncategorized'\n | 'recentlyCategorized';\n\nexport const EMAIL_NAV_PAGE_NAME_MAP: { [pageName in EmailNavPageName]: true } =\n {\n inbox: true,\n uncategorized: true,\n recentlyCategorized: true,\n };\n\ntype EmailNavToolbarProps = {\n pageName: EmailNavPageName;\n uncategorizedEmailsCount?: number | null;\n};\n\nexport function EmailNavToolbar({\n pageName,\n uncategorizedEmailsCount,\n}: EmailNavToolbarProps) {\n const navigate = useNavigate();\n return (\n \n navigate('/messages')}\n >\n \n \n \n \n \n navigate('/messages/uncategorized')}\n >\n \n \n \n \n {uncategorizedEmailsCount != null && (\n {uncategorizedEmailsCount}\n )}\n \n navigate('/messages/recently-categorized')}\n >\n \n \n \n \n \n \n );\n}\n","import { useMemo } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ErrorIconMessage } from 'src/core/POS/ErrorIconMessage';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { isMarketplaceActive } from 'src/utils/userUtils';\n\nimport { notificationContainer } from './AccountDisabledNotification.css';\n\nexport const AccountDisabledNotification = () => {\n const { loginContext } = useAppContext();\n const accountEnabledForBroadcast = useMemo(\n () =>\n Boolean(\n loginContext?.user?.activeAccount?.marketplaceSettings?.filter((m) =>\n isMarketplaceActive(m)\n )?.length\n ),\n [loginContext?.user?.activeAccount?.marketplaceSettings]\n );\n\n if (accountEnabledForBroadcast) {\n return null;\n }\n return (\n
    \n \n \n \n
    \n );\n};\n","import { useMemo } from 'react';\nimport { useContent } from 'src/contexts/ContentContext';\nimport {\n mapBrandNameToBackgroundcolor,\n mapBrandNameToTextcolor,\n} from 'src/utils/constants/colorMaps';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Marketplace } from 'src/WebApiController';\n\nimport { usePurchaseVendorSelector } from '../../Selectors/PurchaseVendorSelector/usePurchaseVendorSelector';\nimport * as styles from './MerchantColorBadge.css';\n\nexport const MerchantColorBadge = ({\n vendorId,\n name,\n}: {\n vendorId?: number | null;\n name?: Marketplace | string | null;\n}) => {\n const { availableVendors } = usePurchaseVendorSelector({});\n const vendor = useMemo(() => {\n if (vendorId == null) {\n return null;\n }\n\n return availableVendors[vendorId];\n }, [availableVendors, vendorId]);\n\n const directOfflineContent = useContent(ContentId.DirectOffline);\n\n const displayName = useMemo(() => {\n return vendor?.name ?? name ?? directOfflineContent;\n }, [directOfflineContent, name, vendor]);\n\n return (\n \n {displayName}\n \n );\n};\n","import { createContext, ReactNode, useCallback } from 'react';\nimport { useRef } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n PurchaseClient,\n PurchaseOrderDetails,\n SaleClient,\n SaleDetails,\n} from 'src/WebApiController';\n\nimport { useErrorBoundaryContext } from '../ErrorBoundaryContext';\n\ntype IConversationDataContext = {\n getPurchaseOrderDetails: (\n purchaseId: number\n ) => Promise;\n getSaleDetails: (saleId: number) => Promise;\n};\n\nexport const ConversationDataContext = createContext({\n getPurchaseOrderDetails: async () => null,\n getSaleDetails: async () => null,\n});\n\nexport const ConversationDataContextProvider = ({\n children,\n}: {\n children: ReactNode;\n}) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n\n const purchaseLookup = useRef<\n Record\n >({});\n const getPurchaseOrderDetails = useCallback(\n async (purchaseId: number) => {\n let purchase = purchaseLookup.current[purchaseId];\n if (purchase == null) {\n purchase =\n (await tryInvokeApi(\n async () => {\n return await new PurchaseClient(\n activeAccountWebClientConfig\n ).getPurchaseOrderByPurchaseOrderId(purchaseId, true);\n },\n (error) => {\n trackError(\n 'ConversationDataContext.PurchaseClient.getPurchaseOrderByPurchaseOrderId',\n error,\n { purchaseId }\n );\n }\n )) ?? undefined;\n if (purchase != null) {\n purchaseLookup.current[purchaseId] = purchase;\n }\n }\n return purchase ?? null;\n },\n [activeAccountWebClientConfig, purchaseLookup, trackError]\n );\n\n const saleLookup = useRef>({});\n const getSaleDetails = useCallback(\n async (saleId: number) => {\n let sale = saleLookup.current[saleId];\n if (sale == null) {\n sale =\n (await tryInvokeApi(\n async () => {\n return await new SaleClient(\n activeAccountWebClientConfig\n ).getSaleBySaleId(saleId);\n },\n (error) => {\n trackError('SaleClient.getSaleBySaleId', error, { saleId });\n }\n )) ?? undefined;\n if (sale != null) {\n saleLookup.current[saleId] = sale;\n }\n }\n return sale ?? null;\n },\n [activeAccountWebClientConfig, saleLookup, trackError]\n );\n\n return (\n \n {children}\n \n );\n};\n","import clsx from 'clsx';\nimport { formatInTimeZone } from 'date-fns-tz';\nimport {\n ComponentProps,\n useCallback,\n useContext,\n useEffect,\n useState,\n} from 'react';\nimport { MerchantColorBadge } from 'src/components/common/MerchantColorBadge';\nimport { useContent, useContentContext } from 'src/contexts/ContentContext';\nimport { ConversationDataContext } from 'src/contexts/ConversationDataContext';\nimport { useSiteTimezoneContext } from 'src/contexts/SiteTimezoneContext/SiteTimezoneContext';\nimport { HorizontalTextList } from 'src/core/POS/HorizontalTextList';\nimport { vars } from 'src/core/themes';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { DotIcon } from 'src/svgs/DotIcon';\nimport { MailIcon } from 'src/svgs/MailIcon';\nimport { PurchaseIcon } from 'src/svgs/PurchaseIcon';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { formatDate } from 'src/utils/dateTimeUtils';\nimport { getEventPerformerVenue } from 'src/utils/eventWithDataUtils';\nimport { getListingNoteIcon } from 'src/utils/listingNotesUtils';\nimport {\n AutoPoInboundEmail,\n AutoPoInboundEmailClassificationType,\n Feature,\n ListingNote,\n Marketplace,\n SellerSupportCase,\n} from 'src/WebApiController';\n\nimport * as styles from './ConversationListItem.css';\n\n// TODO Probably this will be moved to mvc layer when integrating\nexport enum ConversationType {\n Purchase = 'Purchase',\n Sale = 'Sale',\n Transfer = 'Transfer',\n Private = 'Private',\n Junk = 'Junk',\n Uncategorized = 'Uncategorized',\n}\n\nconst EMAIL_CLASSIFICATION_TYPE_TO_CONVERSATION_TYPE: Record<\n AutoPoInboundEmailClassificationType,\n ConversationType\n> = {\n [AutoPoInboundEmailClassificationType.ExistingPurchaseOrder]:\n ConversationType.Purchase,\n [AutoPoInboundEmailClassificationType.NewPurchaseOrder]:\n ConversationType.Purchase,\n [AutoPoInboundEmailClassificationType.Junk]: ConversationType.Junk,\n [AutoPoInboundEmailClassificationType.OneTimePass]: ConversationType.Private,\n [AutoPoInboundEmailClassificationType.Password]: ConversationType.Private,\n [AutoPoInboundEmailClassificationType.TicketsAvailable]:\n ConversationType.Purchase,\n [AutoPoInboundEmailClassificationType.PurchaseCancelled]:\n ConversationType.Purchase,\n [AutoPoInboundEmailClassificationType.EventCancelled]:\n ConversationType.Purchase,\n [AutoPoInboundEmailClassificationType.EventPostponed]:\n ConversationType.Purchase,\n [AutoPoInboundEmailClassificationType.EnjoyTheEvent]:\n ConversationType.Purchase,\n [AutoPoInboundEmailClassificationType.TransferSent]:\n ConversationType.Transfer,\n [AutoPoInboundEmailClassificationType.TransferAccepted]:\n ConversationType.Transfer,\n [AutoPoInboundEmailClassificationType.TransferExpired]:\n ConversationType.Transfer,\n [AutoPoInboundEmailClassificationType.NewSale]: ConversationType.Sale,\n [AutoPoInboundEmailClassificationType.ConfirmationDeadline]:\n ConversationType.Sale,\n [AutoPoInboundEmailClassificationType.ShippingDeadline]:\n ConversationType.Sale,\n [AutoPoInboundEmailClassificationType.SaleCancelled]: ConversationType.Sale,\n [AutoPoInboundEmailClassificationType.OtherMarketplaceContact]:\n ConversationType.Sale,\n};\n\nexport const convertEmailClassificationTypeToConversationType = (\n classificationType?: AutoPoInboundEmailClassificationType | null\n) =>\n classificationType\n ? EMAIL_CLASSIFICATION_TYPE_TO_CONVERSATION_TYPE[classificationType]\n : ConversationType.Uncategorized;\n\nexport const convertConversationTypeToEmailClassificationTypes = (\n conversationTypes: ConversationType[]\n) => {\n const entries = Object.entries(\n EMAIL_CLASSIFICATION_TYPE_TO_CONVERSATION_TYPE\n );\n return entries\n .filter(([, type]) => conversationTypes.includes(type))\n .map(([key]) => key as AutoPoInboundEmailClassificationType);\n};\n\nexport type ConversationInfo = {\n vendorId?: number | null;\n merchantName?: string | null;\n title?: string | null;\n datetime?: Date | null;\n unread?: boolean | null;\n conversationType?: ConversationType;\n sellerSupportCase?: SellerSupportCase;\n inboundEmail?: AutoPoInboundEmail;\n onEmailClassified?: (inboundEmailId: number) => void;\n};\n\nexport type ConversationListItemProps = ConversationInfo &\n Omit, 'title' | 'content'> & {\n isActive: boolean;\n subtitle?: string | null;\n content?: string | null;\n listingNotes?: ListingNote[] | null;\n };\n\nexport function ConversationListItem({\n vendorId,\n merchantName,\n title,\n conversationType,\n datetime,\n unread,\n inboundEmail,\n sellerSupportCase,\n ...props\n}: ConversationListItemProps) {\n const { getPurchaseOrderDetails, getSaleDetails } = useContext(\n ConversationDataContext\n );\n const [subtitle, setSubtitle] = useState();\n const [content, setContent] = useState();\n const [listingNotes, setListingNotes] = useState();\n const [merchant, setMerchant] = useState(\n merchantName\n );\n\n const supportCaseIdContent = useContent(ContentId.SupportCaseId);\n const orderIdContent = useContent(ContentId.ExternalPurchaseId);\n const sectionContent = useContent(ContentId.Section);\n const rowContent = useContent(ContentId.Row);\n const seatsContent = useContent(ContentId.Seats);\n const ticketsContent = useContent(ContentId.Tickets);\n\n const fetchDisplayContent = useCallback(async () => {\n let merchant, content, subtitle;\n\n if (conversationType === ConversationType.Purchase) {\n if (inboundEmail?.purchaseOrderId) {\n const purchaseOrder = await getPurchaseOrderDetails(\n inboundEmail.purchaseOrderId\n );\n if (purchaseOrder) {\n subtitle = `${orderIdContent}: ${purchaseOrder.vendOrdId}`;\n merchant = purchaseOrder.vendor?.name;\n\n const catalog = purchaseOrder.miniCatalog;\n\n // Example of formatted content using the following code:\n // Section {S}, Row {R}, Seats {F}-{T} • {N} Tickets\n // {Venue}, {City} • {EventDate}\n content = '';\n const tg = purchaseOrder.ticketGroups[0];\n if (tg) {\n const { event, performer, venue } = getEventPerformerVenue(\n tg.viagVirtualId,\n catalog\n );\n\n content += `${sectionContent} ${tg.seating.section}`;\n if (tg.seating.row) {\n content += `, ${rowContent} ${tg.seating.row}`;\n }\n if (tg.seating.seatFr) {\n content += `, ${seatsContent} ${tg.seating.seatFr}`;\n if (tg.seating.seatTo) {\n content += `-${tg.seating.seatTo}`;\n }\n }\n content += ` • ${tg.ticketCnt} ${ticketsContent}`;\n if (venue?.name || event?.event?.dates.start) {\n content += '\\n';\n if (venue?.name) {\n content += `${venue.name}`;\n if (venue?.city) {\n content += `, ${venue.city}`;\n }\n if (event?.event?.dates.start) {\n content += ' • ';\n }\n }\n if (event?.event?.dates.start) {\n content += formatDate(event.event.dates.start);\n }\n }\n setListingNotes(tg.seatTraits);\n }\n }\n }\n } else if (conversationType === ConversationType.Sale) {\n if (inboundEmail?.saleId) {\n const sale = await getSaleDetails(inboundEmail.saleId);\n if (sale) {\n const { idOnMkp, id, mkp, seating, ticketCnt } = sale;\n\n subtitle = `${orderIdContent}: ${idOnMkp ?? id}`;\n merchant = mkp;\n content = [\n [\n `${sectionContent} ${seating.section}`,\n seating.row ? `${rowContent} ${seating.row}` : undefined,\n seating.seatFr\n ? `${seatsContent} ${seating.seatFr}` +\n (seating.seatTo ? `-${seating.seatTo}` : '')\n : undefined,\n ]\n .filter((s) => Boolean(s))\n .join(', '),\n `${ticketCnt} ${ticketsContent}`,\n ]\n .filter((s) => Boolean(s))\n .join(' • ');\n }\n }\n } else if (sellerSupportCase != null) {\n merchant = Marketplace.StubHub;\n subtitle = `${supportCaseIdContent}: ${sellerSupportCase?.sellerSupportCaseId}`;\n }\n\n setSubtitle(subtitle);\n setMerchant(merchant);\n setContent(content);\n }, [\n conversationType,\n getPurchaseOrderDetails,\n getSaleDetails,\n inboundEmail?.purchaseOrderId,\n inboundEmail?.saleId,\n orderIdContent,\n rowContent,\n seatsContent,\n sectionContent,\n sellerSupportCase,\n supportCaseIdContent,\n ticketsContent,\n ]);\n\n useEffect(() => {\n fetchDisplayContent();\n }, [fetchDisplayContent, inboundEmail, sellerSupportCase]);\n\n return (\n \n );\n}\n\nfunction ConversationListItemDisplay({\n vendorId,\n merchantName,\n title,\n subtitle,\n content,\n datetime,\n unread,\n listingNotes,\n conversationType,\n isActive = false,\n sellerSupportCase,\n ...props\n}: ConversationListItemProps) {\n const contentContext = useContentContext();\n const hasListingNotesAdditionalInfoFeature = useUserHasFeature(\n Feature.ListingNotesAdditionalInfo\n );\n\n const { timeZone } = useSiteTimezoneContext();\n return (\n \n
    \n {sellerSupportCase != null && (\n
    \n \n
    \n )}\n {conversationType === ConversationType.Purchase && (\n
    \n \n
    \n )}\n
    \n
    \n
    \n
    \n {(vendorId || merchantName) && (\n \n )}\n
    \n
    \n {datetime && (\n
    \n {formatInTimeZone(datetime, timeZone, 'LLL dd yyyy, h:mm a')}\n
    \n )}\n
    \n {unread === true && (\n \n )}\n
    \n
    \n
    \n\n {title &&
    {title}
    }\n {subtitle &&
    {subtitle}
    }\n {content &&
    {content}
    }\n {listingNotes?.length ? (\n n.listingNoteText)}\n maxTextsToShowOnHover={listingNotes.length}\n />\n ) : null}\n
    \n \n );\n}\n","import { DownloadButton } from 'src/components/Buttons/DownloadButton';\nimport { FormatContent } from 'src/contexts/ContentContext';\nimport { shared, vars } from 'src/core/themes';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { stringToUtcDate } from 'src/utils/dateTimeUtils';\nimport { getCurrentLanguage } from 'src/utils/localeUtils';\nimport { AutoPoInboundEmailThreadEmail } from 'src/WebApiController';\n\nimport { EmailRenderer } from '../EmailBody';\nimport * as styles from './EmailThreadItem.css';\n\nconst dateFormatter = new Intl.DateTimeFormat(getCurrentLanguage(), {\n dateStyle: 'long',\n timeStyle: 'short',\n});\n\nexport function EmailThreadItem({\n email: {\n subject,\n receiveDate,\n fromEmailAddress,\n toEmailAddress,\n htmlBody,\n textBody,\n attachments,\n },\n}: {\n email: AutoPoInboundEmailThreadEmail;\n}) {\n return (\n
    \n
    \n
    \n
    {subject && subject}
    \n {receiveDate && (\n
    \n {dateFormatter.format(stringToUtcDate(receiveDate))}\n
    \n )}\n
    \n
    \n
    \n {fromEmailAddress && (\n \n {fromEmailAddress}}\n />\n \n )}\n {fromEmailAddress && toEmailAddress &&
    }\n {toEmailAddress && (\n \n {toEmailAddress}}\n />\n \n )}\n
    \n
    \n
    \n {attachments && attachments.length > 0 && (\n
    \n {attachments.map((attachment, index) => (\n
    \n window.open(attachment.downloadUri, '_blank')}\n />\n
    \n ))}\n
    \n )}\n {(htmlBody || textBody) && (\n
    \n \n
    \n )}\n
    \n );\n}\n","import { useQuery } from '@tanstack/react-query';\nimport {\n ConversationType,\n convertEmailClassificationTypeToConversationType,\n} from 'src/components/Messages/ConversationSidePanel/ConversationListItem/ConversationListItem';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { SomethingWentWrong } from 'src/views';\nimport {\n AutoPoClient,\n AutoPoInboundEmailClassificationType,\n} from 'src/WebApiController';\n\nimport * as styles from './EmailThread.css';\nimport { EmailThreadItem } from './EmailThreadItem';\n\nexport type EmailThreadRequest = {\n inboundEmailId: number;\n purchaseOrderId: number | null;\n saleId: number | null;\n toEmailAddress: string | null;\n classificationType: AutoPoInboundEmailClassificationType | null;\n};\n\nexport type EmailThreadProps = EmailThreadRequest & {\n // other UI only props here\n};\n\nexport function EmailThread(request: EmailThreadProps) {\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n\n const threadQuery = useQuery({\n queryKey: ['emailThread', request],\n queryFn() {\n if (activeAccountWebClientConfig.activeAccountId == null) {\n return null;\n }\n return tryInvokeApi(\n async () => {\n const {\n inboundEmailId,\n purchaseOrderId,\n saleId,\n toEmailAddress,\n classificationType,\n } = request;\n if (purchaseOrderId) {\n return new AutoPoClient(\n activeAccountWebClientConfig\n ).getPurchaseInboundEmailThread(purchaseOrderId, true);\n }\n if (saleId) {\n return new AutoPoClient(\n activeAccountWebClientConfig\n ).getSaleInboundEmailThread(saleId, true);\n }\n if (\n classificationType &&\n convertEmailClassificationTypeToConversationType(\n classificationType\n ) === ConversationType.Private &&\n toEmailAddress\n ) {\n return new AutoPoClient(\n activeAccountWebClientConfig\n ).getPrivateInboundEmailThread(\n toEmailAddress,\n classificationType,\n true\n );\n }\n return new AutoPoClient(\n activeAccountWebClientConfig\n ).getSingleInboundEmailThread(inboundEmailId);\n },\n (error) => {\n trackError('AutoPoClient.getSingleInboundEmailThread', error, {\n request: JSON.stringify(request),\n });\n }\n );\n },\n enabled: activeAccountWebClientConfig.activeAccountId != null,\n refetchOnWindowFocus: false,\n });\n\n if (threadQuery.isLoading) {\n return ;\n }\n if (threadQuery.isError) {\n return ; // TODO\n }\n return (\n
    \n {threadQuery.data?.map((email) => {\n return (\n
    \n \n
    \n );\n })}\n
    \n );\n}\n","import { createContext, ReactNode, useCallback, useMemo } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { SellerAccountClient, SellerUser } from 'src/WebApiController';\n\ntype ISellerSupportCaseDataContext = {\n getSellerUserDetails: (sellerUserId: string) => Promise;\n};\n\nexport const SellerSupportCaseDataContext =\n createContext({\n getSellerUserDetails: () => Promise.resolve(null),\n });\n\nexport const SellerSupportCaseDataContextProvider = ({\n children,\n}: {\n children: ReactNode;\n}) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n\n const userDetailsLookup: Record = useMemo(() => {\n return {};\n }, []);\n\n const getSellerUserDetails = useCallback(\n async (sellerUserId: string) => {\n if (sellerUserId == null) {\n return null;\n }\n\n if (!Object.keys(userDetailsLookup).includes(sellerUserId)) {\n const userDetails = await tryInvokeApi(\n async () => {\n return await new SellerAccountClient(\n activeAccountWebClientConfig\n ).getSellerUser(sellerUserId);\n },\n (error) => {\n trackError('SellerAccountClient.getSellerUser', error);\n }\n );\n if (userDetails != null) {\n userDetailsLookup[sellerUserId] = userDetails;\n }\n }\n return userDetailsLookup[sellerUserId];\n },\n [activeAccountWebClientConfig, trackError, userDetailsLookup]\n );\n\n return (\n \n {children}\n \n );\n};\n","import clsx from 'clsx';\nimport { useCallback, useState } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { vars } from 'src/core/themes';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { DetailSection, SectionContent } from 'src/modals/common';\nimport { CrossIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { downloadFile } from 'src/utils/fileUtils';\nimport { getFormattedBytesSize } from 'src/utils/format';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n SellerSupportCaseAttachmentRequest,\n SellerSupportCaseClient,\n} from 'src/WebApiController';\n\nimport * as styles from './AttachmentsPanel.css';\n\nexport type AttachmentInfo = {\n attachmentId: string;\n name: string;\n size?: number;\n content?: string;\n contentType?: string;\n};\n\nexport type AttachmentsPanelProps = {\n attachments: AttachmentInfo[];\n showDelete?: boolean;\n onDeleteClicked?: (attachment: AttachmentInfo) => void;\n isDownloadable?: boolean;\n};\n\nexport const AttachmentDisplay = ({\n attachmentInfo,\n showDelete,\n onDeleteClicked,\n isDownloadable,\n}: {\n attachmentInfo: AttachmentInfo;\n showDelete: boolean;\n onDeleteClicked?: (attachment: AttachmentInfo) => void;\n isDownloadable: boolean | undefined;\n}) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const [isLoading, setIsLoading] = useState(false);\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const handleDownloadFile = useCallback(async () => {\n setIsLoading(true);\n const downloadedFiles = await tryInvokeApi(\n async () => {\n const requests: SellerSupportCaseAttachmentRequest[] = [\n {\n id: attachmentInfo.attachmentId,\n contentType: attachmentInfo.contentType ?? '',\n name: attachmentInfo.name,\n },\n ];\n return await new SellerSupportCaseClient(\n activeAccountWebClientConfig\n ).retrieveSellerSupportCaseNoteAttachments(requests, true);\n },\n (error) => {\n showErrorDialog('retrieveSellerSupportCaseNoteAttachments', error);\n }\n );\n\n if (downloadedFiles) {\n if (downloadedFiles.length > 0 && downloadedFiles[0].content != null) {\n const fileToDownload = downloadedFiles[0];\n downloadFile(\n fileToDownload.name,\n fileToDownload.content ?? '',\n fileToDownload.contentType,\n true\n );\n }\n }\n\n setIsLoading(false);\n }, [\n activeAccountWebClientConfig,\n attachmentInfo.attachmentId,\n attachmentInfo.contentType,\n attachmentInfo.name,\n showErrorDialog,\n ]);\n\n return (\n {\n if (!isLoading && isDownloadable && attachmentInfo.size) {\n handleDownloadFile();\n }\n }}\n >\n {isLoading ? (\n \n ) : (\n <>\n
    \n
    {attachmentInfo.name}
    \n {attachmentInfo.size != null && (\n
    \n {getFormattedBytesSize(attachmentInfo.size, 2, false)}\n
    \n )}\n
    \n <>\n {showDelete && (\n
    \n onDeleteClicked?.(attachmentInfo)}\n />\n
    \n )}\n \n \n )}\n \n );\n};\n\nexport const AttachmentsPanel = ({\n attachments,\n showDelete,\n onDeleteClicked,\n isDownloadable,\n}: AttachmentsPanelProps) => {\n const isMobile = useMatchMedia('mobile');\n\n return (\n }>\n \n {attachments.map((a: AttachmentInfo) => {\n return (\n
    \n 0}\n />\n
    \n );\n })}\n
    \n
    \n );\n};\n","import { formatInTimeZone } from 'date-fns-tz';\nimport {\n ComponentProps,\n useCallback,\n useContext,\n useEffect,\n useState,\n} from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { SellerSupportCaseDataContext } from 'src/contexts/SellerSupportCaseDataContext';\nimport { useSiteTimezoneContext } from 'src/contexts/SiteTimezoneContext/SiteTimezoneContext';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n AttachmentResource,\n SellerSupportCaseAttachmentRequest,\n SellerSupportCaseClient,\n SellerUser,\n} from 'src/WebApiController';\n\nimport { AttachmentInfo, AttachmentsPanel } from '../AttachmentsPanel';\nimport * as styles from './SupportCaseNoteDisplay.css';\n\nexport type SupportCaseNoteDisplayProps = {\n createdByUserId?: string | null;\n noteDate?: Date;\n noteContent?: string | null;\n attachments?: AttachmentResource[] | null;\n} & ComponentProps<'div'>;\n\nexport const SupportCaseNoteDisplay = ({\n createdByUserId,\n noteDate,\n noteContent,\n attachments,\n ...props\n}: SupportCaseNoteDisplayProps) => {\n const { timeZone } = useSiteTimezoneContext();\n const { getSellerUserDetails } = useContext(SellerSupportCaseDataContext);\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n\n const [userDetails, setUserDetails] = useState();\n const [attachmentsInfo, setAttachmentsInfo] = useState([]);\n\n const getUserDetails = useCallback(\n async (sellerUserId: string | null | undefined) => {\n const details =\n sellerUserId && getSellerUserDetails\n ? await getSellerUserDetails(sellerUserId)\n : null;\n setUserDetails(details);\n },\n [getSellerUserDetails]\n );\n\n useEffect(() => {\n getUserDetails(createdByUserId);\n }, [createdByUserId, getUserDetails]);\n\n const fetchAttachmentMetadata = useCallback(async () => {\n const requests: SellerSupportCaseAttachmentRequest[] =\n attachments?.map((a) => {\n return {\n id: a.id,\n contentType: a.content_type,\n name: a.name,\n };\n }) ?? [];\n\n const attachmentsResult = await tryInvokeApi(\n async () => {\n return await new SellerSupportCaseClient(\n activeAccountWebClientConfig\n ).retrieveSellerSupportCaseNoteAttachments(requests, false);\n },\n (error) => {\n trackError(\n 'SellerSupportCaseClient.retrieveSellerSupportCaseNoteAttachments',\n error,\n { requests: JSON.stringify(requests) }\n );\n }\n );\n\n if (attachmentsResult == null) {\n return;\n }\n\n if (attachmentsResult?.length === attachments?.length) {\n const info: AttachmentInfo[] = [];\n for (let i = 0; i < attachmentsResult.length; i++) {\n info.push({\n attachmentId: attachments[i].id,\n name: attachmentsResult[i].fileName,\n size: attachmentsResult[i].length,\n // We aren't fetching content here. Actual content will be fetched if user\n // downloads the file\n content: undefined,\n contentType: attachmentsResult[i].contentType,\n });\n }\n setAttachmentsInfo(info);\n }\n }, [activeAccountWebClientConfig, attachments, trackError]);\n\n useEffect(() => {\n fetchAttachmentMetadata();\n }, [attachments, fetchAttachmentMetadata]);\n\n return (\n
    \n
    \n
    \n
    \n {userDetails?.sellerDisplayName}\n
    \n {userDetails?.email && (\n
    \n {userDetails.email}\n
    \n )}\n
    \n
    \n {noteDate &&\n formatInTimeZone(noteDate, timeZone, 'LLL dd yyyy, h:mm')}\n
    \n
    \n
    {noteContent}
    \n {attachments && attachments.length > 0 && (\n \n )}\n
    \n );\n};\n","import { ComponentProps, useCallback, useRef, useState } from 'react';\nimport { useForm } from 'react-hook-form';\nimport { useWindowSize } from 'react-use';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { PosTextArea } from 'src/core/POS/PosTextArea';\nimport { Button } from 'src/core/ui';\nimport { AddFileIcon } from 'src/svgs/AddFileIcon';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n FileParameter,\n Marketplace,\n SellerSupportCaseClient,\n} from 'src/WebApiController';\n\nimport { ButtonWithIcon } from '../../Buttons';\nimport { AttachmentInfo, AttachmentsPanel } from '../AttachmentsPanel';\nimport * as styles from './SupportCaseBody.css';\n\ntype UploadAttachmentInfo = {\n id: string;\n fileName: string;\n file?: File;\n};\n\ntype SupportCaseReplyFieldValues = {\n attachmentInfo: UploadAttachmentInfo[];\n noteContent: string;\n};\n\n// 2^31-1 (2GB) is technically the maximum size allowed\n// to be stored in DB. Change this if there are other\n// explicit limits on content length.\nconst CONTENT_MAX_SIZE = Math.pow(2, 31) - 1;\n\nexport const SupportCaseReplyInput = ({\n sellerSupportCaseId,\n sellerSupportCaseNotesIsLoading,\n onReply,\n ...props\n}: ComponentProps<'div'> & {\n sellerSupportCaseId: number;\n sellerSupportCaseNotesIsLoading: boolean;\n onReply?: () => void;\n}) => {\n const { height: windowHeight } = useWindowSize();\n\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n const [isLoading, setLoading] = useState(false);\n const requiredMsg = useContent(ContentId.Required);\n\n const defaultValues = { attachmentInfo: [], noteContent: '' };\n\n const { register, handleSubmit, watch, setValue, reset } =\n useForm({\n defaultValues,\n });\n\n const sendReply = async (\n noteContent: string,\n attachments: FileParameter[] | null\n ) => {\n tryInvokeApi(\n async () => {\n await new SellerSupportCaseClient(\n activeAccountWebClientConfig\n ).createSellerSupportCaseReply(\n sellerSupportCaseId,\n noteContent,\n Marketplace.StubHub,\n attachments\n );\n\n onReply?.();\n },\n (error) => {\n showErrorDialog('createSellerSupportCaseReply', error);\n }\n );\n };\n\n const noteContent = watch('noteContent');\n const attachments = watch('attachmentInfo');\n\n const inputRef = useRef(null);\n\n const onDeleteAttachment = useCallback(\n (attachmentToDelete: AttachmentInfo) => {\n const newAttachments = attachments.filter(\n (a) => a.id !== attachmentToDelete.attachmentId\n );\n setValue('attachmentInfo', newAttachments);\n },\n [attachments, setValue]\n );\n\n const onUploadFileClick = useCallback(() => {\n // trigger the hidden input\n inputRef?.current?.click();\n }, []);\n\n const onNewFileSelected = (file: File) => {\n if (attachments.every((e) => e.fileName !== file.name)) {\n const newAttachments = [\n ...attachments,\n {\n id: file.name,\n fileName: file.name,\n file: file,\n } as UploadAttachmentInfo,\n ];\n setValue('attachmentInfo', newAttachments);\n }\n };\n\n const onSubmit = async (data: SupportCaseReplyFieldValues) => {\n setLoading(true);\n const attachmentsContent: FileParameter[] = data.attachmentInfo\n .filter((att) => att.file)\n .map((att) => {\n return { data: att.file!, fileName: att.fileName };\n });\n\n await sendReply(data.noteContent, attachmentsContent);\n\n reset(defaultValues);\n setLoading(false);\n };\n\n return (\n
    \n
    \n \n
    \n
    \n {\n const newFiles = e.target?.files;\n if (newFiles?.[0]) {\n onNewFileSelected(newFiles[0]);\n }\n }}\n />\n }\n disabled={sellerSupportCaseNotesIsLoading || isLoading}\n onClick={onUploadFileClick}\n />\n
    \n handleSubmit(onSubmit)()}\n >\n \n \n
    \n
    \n {attachments && attachments.length > 0 && (\n {\n return {\n attachmentId: a.id,\n name: a.fileName,\n };\n })}\n showDelete\n onDeleteClicked={onDeleteAttachment}\n />\n )}\n
    \n );\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { ComponentPropsWithRef } from 'react';\nimport { Components, Virtuoso } from 'react-virtuoso';\nimport * as EmptySectionContent from 'src/components/common/EmptySectionContent';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { clearIDBCache } from 'src/core/utils/createIndexDBPersister';\nimport { ErrorSolidIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { stringToUtcDate } from 'src/utils/dateTimeUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n SellerSupportCaseClient,\n SellerSupportCaseNote,\n} from 'src/WebApiController';\n\nimport IconBulletList from '~icons/pos/bulletList';\n\nimport { SupportCaseNoteDisplay } from '../SupportCaseNoteDisplay/SupportCaseNoteDisplay';\nimport * as styles from './SupportCaseBody.css';\nimport { SupportCaseReplyInput } from './SupportCaseReplyInput';\n\ntype VirtuosoContext = {\n isLoading?: boolean;\n isError?: boolean;\n};\n\nconst EmptyPlaceholder: Components<\n unknown,\n VirtuosoContext\n>['EmptyPlaceholder'] = ({ context }: { context?: VirtuosoContext }) => {\n if (context?.isLoading) {\n return ;\n }\n if (context?.isError) {\n return (\n \n }\n >\n \n \n \n {\n clearIDBCache(); // delete the cache storage before reloading\n window.location.reload();\n }}\n >\n \n \n \n );\n }\n return (\n }>\n \n \n );\n};\n\nconst Item: Components['Item'] = ({\n children,\n ...rest\n}: ComponentPropsWithRef<'div'>) => {\n return (\n
    \n {children}\n
    \n );\n};\n\n// XXX hack to prevent margin collapse on last element\nconst Footer = () => {\n return
    ;\n};\n\nexport function SupportCaseBody({\n sellerSupportCaseId,\n}: {\n sellerSupportCaseId: number;\n}) {\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n\n const shouldQuery =\n activeAccountWebClientConfig.activeAccountId != null &&\n sellerSupportCaseId != null;\n\n const sellerSupportCaseNoteQuery = useQuery({\n queryKey: [\n 'SellerSupportCaseClient.getSellerSupportCaseNotesByCaseId',\n activeAccountWebClientConfig.activeAccountId,\n sellerSupportCaseId,\n ],\n queryFn: async () => {\n if (!shouldQuery) {\n return null;\n }\n return tryInvokeApi(\n () => {\n return new SellerSupportCaseClient(\n activeAccountWebClientConfig\n ).getSellerSupportCaseNotesByCaseId(\n sellerSupportCaseId,\n null,\n null,\n true\n );\n },\n (error) => {\n trackError(\n 'SellerSupportCaseClient.getSellerSupportCaseNotesByCaseId',\n error,\n { sellerSupportCaseId }\n );\n }\n );\n },\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n });\n\n const supportNoteData = sellerSupportCaseNoteQuery.data;\n return (\n
    \n {\n return (\n \n );\n }}\n />\n\n {\n sellerSupportCaseNoteQuery.refetch();\n }}\n />\n
    \n );\n}\n","import { useQuery } from '@tanstack/react-query';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport {\n CatalogClient,\n CatalogResults,\n SaleClient,\n SaleDetails,\n} from 'src/WebApiController';\n\nexport function useGetSaleWithCatalogData(saleId?: number | null) {\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n return useQuery({\n queryKey: ['getSaleWithCatalogData', saleId],\n async queryFn() {\n if (!saleId) return null;\n\n let sale: SaleDetails;\n let catalog: CatalogResults;\n try {\n sale = await new SaleClient(\n activeAccountWebClientConfig\n ).getSaleBySaleId(saleId);\n } catch (err: unknown) {\n trackError('SaleClient.getSaleBySaleId', err as ErrorTypes, {\n saleId,\n });\n throw err;\n }\n try {\n catalog = await new CatalogClient(\n activeAccountWebClientConfig\n ).getCatalogForSaleBySaleId(sale.id);\n } catch (err: unknown) {\n trackError(\n 'CatalogClient.getCatalogForSaleBySaleId',\n err as ErrorTypes,\n {\n saleId,\n }\n );\n throw err;\n }\n return { sale, catalog };\n },\n refetchOnWindowFocus: false,\n });\n}\n","import { ComponentProps } from 'react';\nimport { vars } from 'src/core/themes';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { ChevronLeftIcon, ChevronRightIcon } from 'src/svgs/Viagogo';\nimport Swiper from 'swiper';\nimport { useSwiper } from 'swiper/react';\n\nimport { expandButton } from './SidePanelButton/SidePanelButton.css';\n\ntype SwiperButtonProps = { dir: 'left' | 'right' } & Pick<\n ComponentProps<'div'>,\n 'onClick'\n> & {\n swiperRef?: React.MutableRefObject;\n };\n\nexport function SwiperButton({ dir, onClick, swiperRef }: SwiperButtonProps) {\n const mobile = useMatchMedia('mobile');\n const swiper = useSwiper();\n const ExpandIcon = dir === 'left' ? ChevronRightIcon : ChevronLeftIcon;\n\n if (!mobile) {\n return null;\n }\n\n return (\n {\n onClick?.(e);\n dir === 'left'\n ? swiperRef?.current\n ? swiperRef?.current.slidePrev()\n : swiper?.slidePrev()\n : swiperRef?.current\n ? swiperRef?.current.slideNext()\n : swiper?.slideNext();\n }}\n >\n \n
    \n );\n}\n","import { ReactNode } from 'react';\n\nimport * as styles from './HotkeyDisplay.css';\n\nexport type HotkeyDisplayProps = {\n children?: ReactNode;\n};\n\nexport function HotkeyDisplay({ children }: HotkeyDisplayProps) {\n return
    {children}
    ;\n}\n","import { debounce } from 'lodash-es';\nimport React, {\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport { Feature, UserSetting } from 'src/WebApiController';\n\nexport enum SidePanelPage {\n General = 'General', // The default\n InventoryEvent = 'InventoryEvent',\n SaleEvent = 'SaleEvent',\n PurchaseEvent = 'PurchaseEvent',\n}\n\nexport type ISidePanelContext = {\n isCollapsed: boolean;\n\n // Show small/big panel content\n setCollapsed: (val: boolean) => void;\n\n // Show/hide the panel\n isHidden: boolean;\n setHidden: (val: boolean) => void;\n\n // Sidepanel widths\n sidePanelWidths: Record | null;\n onUpdateSidePanelWidth: (page: SidePanelPage, width: number) => void;\n};\n\nexport const createResizablePanelContext =\n React.createContext({} as ISidePanelContext);\n\nexport const useSidePanelContext = () =>\n React.useContext(createResizablePanelContext);\n\ntype SidePanelType = 'content' | 'flyover';\n\ntype SidePanelPersistedState = Pick<\n ISidePanelContext,\n 'isCollapsed' | 'isHidden'\n>;\n\nconst defaultSidePanelState: SidePanelPersistedState = {\n isCollapsed: false,\n isHidden: false,\n};\n\nconst getSidePanelKey = (sidePanelId: string): string => {\n return `${SIDE_PANEL_STORAGE_KEY}-${sidePanelId}`;\n};\n\nconst SIDE_PANEL_STORAGE_KEY = 'sidePanelState';\n\nconst persistSidePanelState = (\n sidePanelId: string,\n sidePanelState: SidePanelPersistedState\n) => {\n localStorage.setItem(\n getSidePanelKey(sidePanelId),\n JSON.stringify(sidePanelState)\n );\n};\n\nconst isFlyoverPanel = (panel?: SidePanelType): boolean => {\n return panel === 'flyover';\n};\n\nconst getSidePanelState = (sidePanelId: string): SidePanelPersistedState => {\n const stringifiedSidePanelState = localStorage.getItem(\n getSidePanelKey(sidePanelId)\n );\n\n if (!stringifiedSidePanelState) {\n return defaultSidePanelState;\n }\n\n try {\n return {\n ...defaultSidePanelState,\n ...JSON.parse(stringifiedSidePanelState),\n };\n } catch (e) {\n return defaultSidePanelState;\n }\n};\n\nexport const SidePanelProvider = ({\n sidePanelId,\n children,\n initialOpened,\n panelType,\n}: {\n sidePanelId: string;\n children: React.ReactNode;\n initialOpened?: boolean;\n panelType?: SidePanelType;\n}) => {\n const sidePanelType: SidePanelType = panelType || 'content';\n\n const [state, setState] = useState(() => {\n const loadedState = getSidePanelState(sidePanelId);\n if (isFlyoverPanel(panelType)) {\n loadedState.isHidden = true;\n }\n\n if (initialOpened) {\n loadedState.isHidden = false;\n }\n return loadedState;\n });\n\n const { value: sidePanelWidthsSetting, setUserSetting } =\n useServerUserSetting>({\n id: UserSetting.SidePanelWidths,\n });\n const hasSidePanelWidthsFeature = useUserHasFeature(Feature.SidePanelWidths);\n\n const stateRef = useRef(state);\n stateRef.current = state;\n\n useEffect(() => {\n if (isFlyoverPanel(sidePanelType)) {\n setState({\n ...stateRef.current,\n isHidden: true,\n });\n }\n }, [sidePanelType]);\n\n useEffect(() => {\n // Don't persist panel state for flyover panel\n if (isFlyoverPanel(sidePanelType)) {\n return;\n }\n persistSidePanelState(sidePanelId, state);\n }, [sidePanelType, sidePanelId, state]);\n\n const setCollapsed = useCallback((isCollapsed: boolean) => {\n setState({\n ...stateRef.current,\n isCollapsed,\n });\n }, []);\n\n const setHidden = useCallback((isHidden: boolean) => {\n setState({\n ...stateRef.current,\n isHidden,\n });\n }, []);\n\n const sidePanelWidths = useMemo((): Record | null => {\n if (!hasSidePanelWidthsFeature) {\n return null;\n }\n return sidePanelWidthsSetting ?? null;\n }, [hasSidePanelWidthsFeature, sidePanelWidthsSetting]);\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const onUpdateSidePanelWidth = useCallback(\n debounce((page: SidePanelPage, width: number) => {\n if (!hasSidePanelWidthsFeature) {\n return;\n }\n const updatedWidths = {\n ...(sidePanelWidths ?? ({} as Record)),\n [page]: width.toFixed(4),\n };\n setUserSetting(updatedWidths);\n }, 500),\n [setUserSetting, sidePanelWidths, hasSidePanelWidthsFeature]\n );\n\n return (\n \n {children}\n \n );\n};\n","import { useMemo } from 'react';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nexport const useGetNoSelectedItemsLabel = (): string => {\n const selectedText = useContent(ContentId.Selected);\n\n return useMemo(() => {\n return `0 ${selectedText}`.toLocaleLowerCase();\n }, [selectedText]);\n};\n","import { useMemo } from 'react';\nimport { useGetNoSelectedItemsLabel } from 'src/components/common/MultiSelect/useGetNoSelectedItemsLabel';\nimport { useContent } from 'src/contexts/ContentContext';\nimport {\n MultiSelectScope,\n useMultiSelectionContext,\n} from 'src/contexts/MultiSelectionContext';\nimport { ContentId } from 'src/utils/constants/contentId';\n\ninterface UseInventorySelectedLegendProps {\n singleElementLabel: string;\n multipleElementsLabel: string;\n}\n\nexport const useEventsAccordionSelectedLegend = ({\n singleElementLabel,\n multipleElementsLabel,\n}: UseInventorySelectedLegendProps): string => {\n const {\n selectionMode,\n getSelection,\n getGroupSelectableGroupMetadata,\n totalItemsSelected,\n } = useMultiSelectionContext();\n\n // How to read selection:\n // {\n // isSingleGroupMultiSelect: false,\n // groupIds: ['152176600'], // Full selected groupIds\n // items: { // Partially selected groupIds and items\n // negative items mean subgroups. Don't count them\n // itemIds: ['65300', '65843', '-1984169708', '-1984169705'],\n // groupIds: ['152159378'],\n // },\n // };\n\n const eventText = useContent(ContentId.Event);\n const eventsText = useContent(ContentId.Events);\n const selectedText = useContent(ContentId.Selected);\n const selectedFromText = useContent(ContentId.SelectedFrom);\n const noItemsSelected = useGetNoSelectedItemsLabel();\n const isAllGroupsMode = selectionMode?.mode === MultiSelectScope.AllGroups;\n\n return useMemo(() => {\n if (!totalItemsSelected) {\n return noItemsSelected;\n }\n\n const selection = getSelection();\n\n const eventsCount = new Set([\n ...selection.groupIds,\n ...selection.items.groupIds,\n ]).size;\n\n let listingsCount = 0;\n\n const singleSelectedItems = new Set(\n selection.items.itemIds.filter((itemId) => parseInt(itemId) > 0) ?? []\n );\n\n listingsCount += singleSelectedItems.size;\n\n selection.groupIds.forEach((groupId) => {\n const g = getGroupSelectableGroupMetadata(groupId);\n listingsCount += g?.itemCount ?? 0;\n });\n\n const selectedEventsLabel = eventsCount === 1 ? eventText : eventsText;\n\n const selectedListingsLabel =\n listingsCount === 1 ? singleElementLabel : multipleElementsLabel;\n\n return (\n isAllGroupsMode\n ? `${listingsCount} ${selectedListingsLabel} ${selectedFromText} ${eventsCount} ${selectedEventsLabel}`\n : `${listingsCount} ${selectedListingsLabel} ${selectedText}`\n ).toLocaleLowerCase();\n }, [\n totalItemsSelected,\n getSelection,\n eventText,\n eventsText,\n singleElementLabel,\n multipleElementsLabel,\n isAllGroupsMode,\n selectedFromText,\n selectedText,\n noItemsSelected,\n getGroupSelectableGroupMetadata,\n ]);\n};\n","import { ReactNode, useEffect } from 'react';\nimport { useEventsAccordionSelectedLegend } from 'src/components/Events/EventListing/useEventsAccordionSelectedLegend';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { ContentId } from 'src/utils/constants/contentId';\n\ninterface SetInventoryEventAccordionSelectionCountLabelProps {\n children: ReactNode;\n}\n\nexport const SetInventoryEventAccordionSelectionCountLabel = ({\n children,\n}: SetInventoryEventAccordionSelectionCountLabelProps) => {\n const listingText = useContent(ContentId.Listing);\n const listingsText = useContent(ContentId.Listings);\n const { setSelectedCountLabel, setUsingCustomSelectedCountLabel } =\n useMultiSelectionContext();\n\n useEffect(() => {\n setUsingCustomSelectedCountLabel(true);\n }, [setUsingCustomSelectedCountLabel]);\n\n const selectedLegend = useEventsAccordionSelectedLegend({\n singleElementLabel: listingText,\n multipleElementsLabel: listingsText,\n });\n\n useEffect(() => {\n setSelectedCountLabel(selectedLegend);\n }, [selectedLegend, setSelectedCountLabel]);\n\n return <>{children};\n};\n","import { ReactNode, useEffect, useMemo } from 'react';\nimport { useGetNoSelectedItemsLabel } from 'src/components/common/MultiSelect/useGetNoSelectedItemsLabel';\nimport { useContent } from 'src/contexts/ContentContext';\nimport {\n MultiSelectScope,\n useMultiSelectionContext,\n} from 'src/contexts/MultiSelectionContext';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { EventWithData } from 'src/WebApiController';\n\ninterface SetInventoryMetricsSelectionCountLabelProps {\n children: ReactNode;\n events: EventWithData[];\n}\n\nexport const SetInventoryMetricsSelectionCountLabel = ({\n children,\n events,\n}: SetInventoryMetricsSelectionCountLabelProps) => {\n const {\n itemSelection,\n selectionMode,\n totalItemsSelected,\n setSelectedCountLabel,\n setUsingCustomSelectedCountLabel,\n } = useMultiSelectionContext();\n const isAllGroupsMode = selectionMode?.mode === MultiSelectScope.AllGroups;\n\n const listingText = useContent(ContentId.Listing);\n const listingsText = useContent(ContentId.Listings);\n const eventText = useContent(ContentId.Event);\n const eventsText = useContent(ContentId.Events);\n const selectedFromText = useContent(ContentId.SelectedFrom);\n const noItemsSelected = useGetNoSelectedItemsLabel();\n\n useEffect(() => {\n setUsingCustomSelectedCountLabel(true);\n }, [setUsingCustomSelectedCountLabel]);\n\n const eventsMap = useMemo>(() => {\n const map: Record = {};\n events.map((e) => {\n const eventId = e.event.viagVirtualId;\n map[eventId] = e;\n });\n return map;\n }, [events]);\n\n const selectedLabel = useMemo(() => {\n if (!totalItemsSelected || !isAllGroupsMode) {\n return noItemsSelected;\n }\n\n const selectedEventsIds = Object.keys(itemSelection);\n const eventsCount = selectedEventsIds.length;\n\n let listingsCount = 0;\n selectedEventsIds.forEach((id) => {\n listingsCount += eventsMap[id]?.counts?.listCnt ?? 0;\n });\n\n const selectedEventsLabel = eventsCount === 1 ? eventText : eventsText;\n\n const selectedListingsLabel =\n listingsCount === 1 ? listingText : listingsText;\n\n return `${listingsCount} ${selectedListingsLabel} ${selectedFromText} ${eventsCount} ${selectedEventsLabel}`.toLocaleLowerCase();\n }, [\n eventText,\n eventsMap,\n eventsText,\n isAllGroupsMode,\n itemSelection,\n listingText,\n listingsText,\n noItemsSelected,\n selectedFromText,\n totalItemsSelected,\n ]);\n\n useEffect(() => {\n setSelectedCountLabel(selectedLabel);\n }, [selectedLabel, setSelectedCountLabel]);\n\n return <>{children};\n};\n","import { useCallback } from 'react';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { BulkEditBroadcastSettingsDialog } from 'src/dialogs/BulkEdits/BulkEditBroadcastSettingsDialog';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { lookupEventInCatalog } from 'src/utils/eventWithDataUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n BulkEditListingClient,\n BulkEditPreview,\n BulkEditPreviewWithDetails,\n Listing,\n ListingActionType,\n ListingDetails,\n ListingGroup,\n ListingQuery,\n ListingStatus,\n Marketplace,\n} from 'src/WebApiController';\n\nimport { INVENTORY_BULK_BROADCAST_LISTINGS_KEY } from '../../InventoryActionDropdown.constants';\n\nexport const useBulkEditBroadcastGlobalSettingsAction = ({\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n}: {\n filterQueryWithEventIds: ListingQuery;\n setIsLoading: (v: boolean) => void;\n isLoading?: boolean;\n}) => {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const {\n data,\n updateItemInEvent,\n eventsExpansion: { expandedListItems, refreshExpandedListItems },\n } = useCatalogDataContext();\n const { setActivePosEntity } = useActivePosEntityContext();\n const { getGroupToggleState } = useMultiSelectionContext();\n\n const { showErrorDialog } = useErrorBoundaryContext();\n const {\n openDialog: openBulkEditBroadcastSettingsDialog,\n closeDialog: closeBulkEditBroadcastSettingsDialog,\n } = useDialog(\n DialogId.BulkEditBroadcastSettings,\n BulkEditBroadcastSettingsDialog\n );\n\n const {\n openDialog: openBulkEditUnbroadcastSettingsDialog,\n closeDialog: closeBulkEditUnbroadcastSettingsDialog,\n } = useDialog(\n DialogId.BulkEditBroadcastSettings,\n BulkEditBroadcastSettingsDialog\n );\n\n const onSubmitEditBroadcastSettings = useCallback(\n async (\n marketplacesToBroadcast: Marketplace[] | null,\n marketplacesToUnbroadcast: Marketplace[] | null,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreview\n ) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n tryInvokeApi(\n async () => {\n const client = new BulkEditListingClient(\n activeAccountWebClientConfig\n );\n\n const preview = await client.bulkBroadcastListingsPreview(\n filterQueryWithEventIds\n );\n\n onPreviewReceived(preview);\n },\n (error) => {\n showErrorDialog('bulkBroadcastListingsPreview', error, {\n trackErrorData: {\n filterQueryWithEventIds,\n },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n } else if (marketplacesToBroadcast && marketplacesToUnbroadcast) {\n await tryInvokeApi(\n async () => {\n // Find all listings whose event is expanded - we want to update their state immediately\n expandedListItems.forEach((viagVirtualId) => {\n const eventWithData = lookupEventInCatalog(data, viagVirtualId);\n if (eventWithData?.entities?.listings?.length) {\n const affectedListings =\n eventWithData.entities.listings.flatMap((l) => [\n l,\n // We only need to update broadcast state for top-level listings (they are the active ones)\n ...((l as ListingGroup)?.groupItems ?? []),\n ]);\n\n const eventToggleState = getGroupToggleState(viagVirtualId);\n\n if (marketplacesToUnbroadcast.length) {\n affectedListings\n .filter(\n (listing) =>\n ((listing as Listing).actions.includes(\n ListingActionType.Unbroadcast\n ) &&\n eventToggleState.isGroupSelected) ||\n eventToggleState.items.includes(String(listing.id))\n )\n .forEach((l) =>\n updateItemInEvent(\n {\n ...(l as Listing),\n status: ListingStatus.DelistingPending,\n },\n ActionOutboxEntityType.Listing\n )\n );\n }\n if (marketplacesToBroadcast.length) {\n affectedListings\n .filter(\n (listing) =>\n ((listing as Listing).actions.includes(\n ListingActionType.Broadcast\n ) &&\n eventToggleState.isGroupSelected) ||\n eventToggleState.items.includes(String(listing.id))\n )\n .forEach((l) =>\n updateItemInEvent(\n {\n ...(l as Listing),\n status: ListingStatus.ListingPending,\n },\n ActionOutboxEntityType.Listing\n )\n );\n }\n }\n });\n\n const succeeded = await new BulkEditListingClient(\n activeAccountWebClientConfig\n ).bulkBroadcastListings(\n {\n item1: preview!,\n item2: marketplacesToBroadcast,\n item3: marketplacesToUnbroadcast,\n },\n INVENTORY_BULK_BROADCAST_LISTINGS_KEY,\n supportBackgroundProcess\n );\n\n if (!supportBackgroundProcess) {\n // It's ok to close both, cuz only 1 can be opened anyway\n closeBulkEditBroadcastSettingsDialog();\n closeBulkEditUnbroadcastSettingsDialog();\n\n if (succeeded) {\n // Invalidate the activePosEntity, so that when clicking on listingDetails\n // we force re-loading the listing and newest broadcast state can be displayed\n setActivePosEntity(0);\n await refreshExpandedListItems();\n }\n }\n },\n (error) => {\n showErrorDialog('onSubmitEditBroadcastSettings', error, {\n trackErrorData: {\n preview,\n marketplacesToBroadcast,\n marketplacesToUnbroadcast,\n },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n }\n },\n [\n activeAccountWebClientConfig,\n closeBulkEditBroadcastSettingsDialog,\n closeBulkEditUnbroadcastSettingsDialog,\n data,\n expandedListItems,\n filterQueryWithEventIds,\n getGroupToggleState,\n refreshExpandedListItems,\n setActivePosEntity,\n setIsLoading,\n showErrorDialog,\n updateItemInEvent,\n ]\n );\n\n const openBulkEditBroadcastSettingsDialogWithEvent = useCallback(() => {\n openBulkEditBroadcastSettingsDialog({\n event: undefined,\n updateKey: INVENTORY_BULK_BROADCAST_LISTINGS_KEY,\n filterQuery: filterQueryWithEventIds,\n marketplaceBroadcastSelectionMode: 'all',\n onOkay: onSubmitEditBroadcastSettings,\n onClosed: () => {\n setIsLoading(false);\n },\n onCancel: closeBulkEditBroadcastSettingsDialog,\n });\n }, [\n closeBulkEditBroadcastSettingsDialog,\n filterQueryWithEventIds,\n onSubmitEditBroadcastSettings,\n openBulkEditBroadcastSettingsDialog,\n setIsLoading,\n ]);\n\n const openBulkEditUnbroadcastSettingsDialogWithEvent = useCallback(() => {\n openBulkEditUnbroadcastSettingsDialog({\n event: undefined,\n updateKey: INVENTORY_BULK_BROADCAST_LISTINGS_KEY,\n filterQuery: filterQueryWithEventIds,\n marketplaceBroadcastSelectionMode: 'none',\n onOkay: onSubmitEditBroadcastSettings,\n onClosed: () => {\n setIsLoading(false);\n },\n onCancel: closeBulkEditUnbroadcastSettingsDialog,\n });\n }, [\n closeBulkEditUnbroadcastSettingsDialog,\n filterQueryWithEventIds,\n onSubmitEditBroadcastSettings,\n openBulkEditUnbroadcastSettingsDialog,\n setIsLoading,\n ]);\n\n const onBroadcastAllClick = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n openBulkEditBroadcastSettingsDialogWithEvent();\n },\n [openBulkEditBroadcastSettingsDialogWithEvent]\n );\n\n const onUnbroadcastAllClick = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n openBulkEditUnbroadcastSettingsDialogWithEvent();\n },\n [openBulkEditUnbroadcastSettingsDialogWithEvent]\n );\n\n return {\n dropDown: (\n <>\n \n \n \n \n \n \n \n ),\n };\n};\n","import { useState } from 'react';\nimport { useBulkBroadcastActionsPermission } from 'src/components/common/BulkActions/BulkBroadcastActions/useBulkBroadcastActionsPermission';\nimport { useBulkActionsState } from 'src/components/common/BulkActions/useBulkActionsState';\nimport { useBulkAddHoldAction } from 'src/components/Listings/InventoryActionDropdown/components/BulkAddHoldAction';\nimport { useBulkEditBroadcastGlobalSettingsAction } from 'src/components/Listings/InventoryActionDropdown/components/BulkEditBroadcastSettingsAction/useBulkEditBroadcastGlobalSettingsAction';\nimport { useBulkRemoveHoldAction } from 'src/components/Listings/InventoryActionDropdown/components/BulkRemoveHoldAction';\nimport { useBulkUngroupListings } from 'src/components/Listings/InventoryActionDropdown/components/LaunchUngroupListingsAction';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosDropdown } from 'src/core/POS/PosDropdown';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { ChevronDownIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { useInventoryEventBulkActionsState } from '../../InventoryEventBulkActions/useInventoryEventBulkActionsState';\n\nexport const BroadcastActions = () => {\n const { areBulkActionsEnabled } = useBulkActionsState();\n const [isLoading, setIsLoading] = useState(false);\n const { hasBroadcastPermission } = useBulkBroadcastActionsPermission();\n\n const { filterQueryWithEventIds } = useInventoryEventBulkActionsState();\n\n const bulkAddHold = useBulkAddHoldAction(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n undefined\n );\n\n const bulkRemoveHold = useBulkRemoveHoldAction(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n undefined\n );\n\n const bulkUngroupListings = useBulkUngroupListings(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n undefined\n );\n\n const bulkEditBroadcastSettings = useBulkEditBroadcastGlobalSettingsAction({\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n });\n\n return (\n <>\n \n \n \n \n }\n align=\"end\"\n triggerProps={{ disabled: isLoading || !areBulkActionsEnabled }}\n >\n {hasBroadcastPermission && bulkEditBroadcastSettings.dropDown}\n {bulkAddHold.dropDown}\n {bulkRemoveHold.dropDown}\n {bulkUngroupListings.dropDown}\n \n \n );\n};\n","import { useCallback } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { useFilterQueryState } from 'src/components/MainFilterBar/useFilterQueryState';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Button } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport {\n ACTIVE_EVENT_IDS_2_QUERY_PARAM,\n TAB_EVENT_IDS_2_QUERY_PARAM,\n TAB_EVENT_IDS_SEPARATOR,\n} from 'src/navigations/Routes/InventoryEvent/InventoryEvent.constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n ActionOutboxEntityType,\n Feature,\n ListingQuery,\n} from 'src/WebApiController';\n\nexport const CatchUpAction = () => {\n const hasPricingCatchupFeature = useUserHasFeature(Feature.PricingCatchup);\n const navigate = useNavigate();\n const { selectedViagogoVirtualIds } = useFilterQueryState(\n ActionOutboxEntityType.Listing\n );\n\n const onCatchUp = useCallback(() => {\n const tabEventIds = selectedViagogoVirtualIds?.join(\n TAB_EVENT_IDS_SEPARATOR\n );\n\n const activeEventId = selectedViagogoVirtualIds?.[0];\n const catchUpEventUrl = `/inventory/event?${ACTIVE_EVENT_IDS_2_QUERY_PARAM}=${activeEventId}&${TAB_EVENT_IDS_2_QUERY_PARAM}=${tabEventIds}`;\n navigate(catchUpEventUrl);\n }, [navigate, selectedViagogoVirtualIds]);\n\n if (!hasPricingCatchupFeature) {\n return null;\n }\n\n return (\n \n \n \n );\n};\n","import { useState } from 'react';\nimport { useBulkPricingActionsPermissions } from 'src/components/common/BulkActions/BulkPricingActions/useBulkPricingActionsPermissions';\nimport { useBulkActionsState } from 'src/components/common/BulkActions/useBulkActionsState';\nimport { useBulkChangeListingPriceAction } from 'src/components/Listings/InventoryActionDropdown/components/BulkChangeListingPriceAction';\nimport { useBulkUpdateMarketplacePrices } from 'src/components/Listings/InventoryActionDropdown/components/BulkChangeMarketplacePriceAction/indext';\nimport { useBulkEditAutoPricingSettings } from 'src/components/Listings/InventoryActionDropdown/components/BulkEditAutoPricingSettingsAction';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosDropdown } from 'src/core/POS/PosDropdown';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { useBulkChangeFloorCeilingActions } from 'src/hooks/useBulkChangeFloorCeilingActions';\nimport { ChevronDownIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { useInventoryEventBulkActionsState } from '../../InventoryEventBulkActions/useInventoryEventBulkActionsState';\n\nexport const PricingActions = () => {\n const { areBulkActionsEnabled } = useBulkActionsState();\n\n const { affectedVisibleListingIds, filterQueryWithEventIds } =\n useInventoryEventBulkActionsState();\n\n const [isLoading, setIsLoading] = useState(false);\n\n const { hasEditPricingPermission } = useBulkPricingActionsPermissions();\n\n const bulkUpdateListingPrice = useBulkChangeListingPriceAction(\n filterQueryWithEventIds,\n\n setIsLoading,\n isLoading,\n undefined\n );\n\n const bulkEditAutoPricingSettingsV2 = useBulkEditAutoPricingSettings(\n filterQueryWithEventIds,\n affectedVisibleListingIds,\n setIsLoading,\n isLoading,\n undefined\n );\n\n const bulkChangeFloorCeilingActions = useBulkChangeFloorCeilingActions({\n setIsLoading,\n isLoading,\n filterQueryWithEventIds,\n });\n\n const bulkUpdateMarketplacePrices = useBulkUpdateMarketplacePrices(\n filterQueryWithEventIds,\n affectedVisibleListingIds,\n setIsLoading,\n isLoading,\n undefined\n );\n\n return (\n <>\n \n \n \n \n }\n align=\"start\"\n triggerProps={{ disabled: isLoading || !areBulkActionsEnabled }}\n >\n {bulkUpdateListingPrice.dropDown}\n {hasEditPricingPermission && bulkChangeFloorCeilingActions.dropDown}\n {bulkEditAutoPricingSettingsV2.dropDown}\n {bulkUpdateMarketplacePrices.dropDown}\n \n \n );\n};\n","import { useState } from 'react';\nimport { ExportInventoryButton } from 'src/components/Buttons/ExportInventoryButton';\nimport { useBulkActionsState } from 'src/components/common/BulkActions/useBulkActionsState';\nimport { useBulkChangeTicketTypeRuleAction } from 'src/components/Listings/InventoryActionDropdown/components/BulkChangeTicketTypeRuleAction';\nimport { useBulkEditCommissionAction } from 'src/components/Listings/InventoryActionDropdown/components/BulkEditCommissionAction/useBulkEditCommissionAction';\nimport { useBulkEditMarketplaceSeatingAction } from 'src/components/Listings/InventoryActionDropdown/components/BulkEditMarketplaceSeating';\nimport { useBulkRemovePredelivery } from 'src/components/Listings/InventoryActionDropdown/components/BulkRemovePredeliveryAction';\nimport { useBulkUpdateAutoFulfillAction } from 'src/components/Listings/InventoryActionDropdown/components/BulkUpdateAutoFulfillAction';\nimport { useBulkUpdateDeliveryType } from 'src/components/Listings/InventoryActionDropdown/components/BulkUpdateDeliveryType';\nimport { useBulkUpdateInternalNotesAction } from 'src/components/Listings/InventoryActionDropdown/components/BulkUpdateInternalNotesAction';\nimport { useBulkUpdateListingSettings } from 'src/components/Listings/InventoryActionDropdown/components/BulkUpdateListingSettingsAction';\nimport { useBulkUpdateSeatTraits } from 'src/components/Listings/InventoryActionDropdown/components/BulkUpdateSeatTraits';\nimport { useBulkWasteTicketsAction } from 'src/components/Listings/InventoryActionDropdown/components/BulkWasteTicketsAction';\nimport { useBulkDeleteSeatSavers } from 'src/components/Listings/InventoryActionDropdown/components/LaunchDeleteSeatSaversAction';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosDropdown, PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ChevronDownIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Feature } from 'src/WebApiController';\n\nimport { useInventoryEventBulkActionsState } from '../../InventoryEventBulkActions/useInventoryEventBulkActionsState';\n\nexport const SettingsActions = () => {\n const { areBulkActionsEnabled } = useBulkActionsState();\n const hasExportInventoryFeature = useUserHasFeature(Feature.ExportInventory);\n\n const [isLoading, setIsLoading] = useState(false);\n const { affectedVisibleListingIds, filterQueryWithEventIds } =\n useInventoryEventBulkActionsState();\n\n const bulkRemovePredelivery = useBulkRemovePredelivery(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n undefined\n );\n\n const bulkEditListingSettings = useBulkUpdateListingSettings(\n 'general',\n filterQueryWithEventIds,\n affectedVisibleListingIds,\n setIsLoading,\n isLoading,\n undefined\n );\n\n const bulkUpdateInternalNotes = useBulkUpdateInternalNotesAction(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n undefined\n );\n\n const bulkUpdateAutoFulfill = useBulkUpdateAutoFulfillAction(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n undefined\n );\n\n const bulkChangeTicketTypeRule = useBulkChangeTicketTypeRuleAction(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n undefined\n );\n\n const bulkEditMarketplaceSeating = useBulkEditMarketplaceSeatingAction(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n undefined\n );\n\n const bulkDeleteSeatSavers = useBulkDeleteSeatSavers(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n undefined\n );\n\n const bulkEditDeliverType = useBulkUpdateDeliveryType(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n undefined\n );\n const bulkEditSeatTraits = useBulkUpdateSeatTraits(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n undefined\n );\n\n const bulkEditCommissionAction = useBulkEditCommissionAction(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n undefined\n );\n\n const bulkWasteTicketsAction = useBulkWasteTicketsAction(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n undefined\n );\n\n return (\n <>\n \n \n \n \n }\n align=\"start\"\n triggerProps={{ disabled: isLoading || !areBulkActionsEnabled }}\n >\n {bulkEditListingSettings.dropDown}\n {bulkUpdateInternalNotes.dropDown}\n {bulkUpdateAutoFulfill.dropDown}\n {bulkRemovePredelivery.dropDown}\n {bulkChangeTicketTypeRule.dropDown}\n {bulkDeleteSeatSavers.dropDown}\n {bulkEditDeliverType.dropDown}\n {bulkEditSeatTraits.dropDown}\n {bulkEditMarketplaceSeating.dropDown}\n {bulkEditCommissionAction.dropDown}\n {hasExportInventoryFeature && (\n \n \n \n )}\n {bulkWasteTicketsAction.dropDown}\n \n \n );\n};\n","import { useState } from 'react';\nimport { BulkEditTagsActionPermissionsHandler } from 'src/components/common/BulkActions/BulkEditTagsAction/BulkEditTagsActionPermissionsHandler';\nimport { useBulkActionsState } from 'src/components/common/BulkActions/useBulkActionsState';\nimport { useBulkEditTagsAction } from 'src/components/Listings/InventoryActionDropdown/components/BulkEditTagsAction';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosDropdown } from 'src/core/POS/PosDropdown';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { ChevronDownIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ActionOutboxEntityType } from 'src/WebApiController';\n\nimport { useInventoryEventBulkActionsState } from '../../InventoryEventBulkActions/useInventoryEventBulkActionsState';\n\nexport const TagsActions = () => {\n const { areBulkActionsEnabled } = useBulkActionsState();\n const { filterQueryWithEventIds } = useInventoryEventBulkActionsState();\n const [isLoading, setIsLoading] = useState(false);\n\n const bulkUpdateTags = useBulkEditTagsAction(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n undefined\n );\n\n return (\n \n \n \n \n \n }\n align=\"start\"\n triggerProps={{ disabled: isLoading || !areBulkActionsEnabled }}\n >\n {bulkUpdateTags.dropDown}\n \n \n );\n};\n","import { MultiSelectActionsContainer } from 'src/components/common/MultiSelect/MultiSelectActionsContainer';\n\nimport { BroadcastActions } from './Actions/BroadcastActions';\nimport { CatchUpAction } from './Actions/CatchUpAction';\nimport { PricingActions } from './Actions/PricingActions';\nimport { SettingsActions } from './Actions/SettingsActions';\nimport { TagsActions } from './Actions/TagsActions';\n\nexport const InventoryGlobalBulkActions = () => {\n return (\n \n \n \n \n \n \n \n );\n};\n","import {\n ColumnDef,\n functionalUpdate,\n GroupingState,\n InitialTableState,\n PaginationState,\n RowSelectionState,\n SortingState,\n TableOptions,\n Updater,\n} from '@tanstack/react-table';\nimport {\n CSSProperties,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { useCatalogMetricsContext } from 'src/contexts/CatalogMetricsContext';\nimport {\n Content,\n FormatContent,\n useContent,\n} from 'src/contexts/ContentContext';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport {\n MultiSelectScope,\n useMultiSelectionContext,\n} from 'src/contexts/MultiSelectionContext';\nimport { useClearShiftSelectionOnSortingChange } from 'src/contexts/MultiSelectionContext/useClearShiftSelectionOnSortingChange';\nimport { useTagsForEntityType } from 'src/hooks/useTagsForEntityType';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport { NoData, Table, VirtuosoScrollEvent } from 'src/tables/Table';\nimport {\n defaultEventsColumnsConfig,\n filterColumnsByFeatures,\n getEventsColumnConfigById,\n} from 'src/utils/columns/columnUtils';\nimport { EventsTableColumnId } from 'src/utils/columns/events/eventsColumnUtils.types';\nimport { CustomEventsColumn } from 'src/utils/columns/events/eventsCustomColumnUtils.types';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { QueryWithViewMode } from 'src/utils/eventQueryUtils';\nimport { getPerformerAndVenueForEvent } from 'src/utils/eventWithDataUtils';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport { hasFeatures } from 'src/utils/userUtils';\nimport { SomethingWentWrong } from 'src/views';\nimport {\n ActionOutboxEntityType,\n EntityWithTicketsQuery,\n EventWithData,\n Feature,\n ListingDetailedMetrics,\n UserSetting,\n} from 'src/WebApiController';\n\nimport { isCustomEventsColumn } from '../../utils/columns/events/eventsCustomColumnUtils';\nimport {\n customColumnDef,\n EVENTS_TABLE_COLUMNS_CONFIG,\n EventWithDataAndMetrics,\n tagColumnDef,\n} from './configs/EventsTableColumnsConfig';\n\nexport type EventsTableProps = {\n events: EventWithData[];\n highlightedId?: string;\n failedToRetrieveData: boolean;\n onMount?: () => void;\n onUnmount?: (state: object) => void;\n initState?: InitialTableState;\n useVirtuoso?: boolean;\n usePagination?: boolean;\n useDataGrouping?: boolean;\n withOuterPadding?: boolean;\n onScroll?: (virtuosoScrollEvent: VirtuosoScrollEvent) => void;\n tableHeadStyle?: CSSProperties;\n};\n\nconst PAGE_SIZE = 100;\n\nconst getRowId = (originalRow: EventWithDataAndMetrics | null): string => {\n return (originalRow as EventWithDataAndMetrics)?.event.viagVirtualId ?? '';\n};\n\nexport const EventsTable = ({\n events,\n highlightedId,\n failedToRetrieveData,\n onMount,\n onUnmount,\n initState,\n useVirtuoso,\n usePagination = true,\n useDataGrouping,\n withOuterPadding,\n onScroll,\n tableHeadStyle,\n}: EventsTableProps) => {\n const eventsText = useContent(ContentId.Events);\n const { appContext, loginContext } = useAppContext();\n const { getSelection, selectionMode, setGroupStates } =\n useMultiSelectionContext();\n const listingSelection = getSelection();\n const { filterQuery } = useFilterQueryContext<\n EntityWithTicketsQuery & QueryWithViewMode\n >();\n const { eventDetailedMetrics: detailedMetrics } = useCatalogMetricsContext();\n\n const hasTablePinActionColumnFeature = useUserHasFeature(\n Feature.TablePinActionColumn\n );\n\n const { data: catalogData } = useCatalogDataContext();\n\n const singlePerformer = filterQuery.performerIds?.length === 1;\n\n // Enable passing in table state as parameters -- we can remount with the last state the user was on\n const [sorting, setSorting] = useState(\n initState?.sorting || []\n );\n const [pagination, setPagination] = useState({\n pageIndex: initState?.pagination?.pageIndex || 0,\n pageSize: PAGE_SIZE,\n });\n const [grouping, setGrouping] = useState(\n initState?.grouping || []\n );\n\n useClearShiftSelectionOnSortingChange({ sortingState: sorting });\n\n useEffect(() => {\n onMount?.();\n });\n\n useEffect(() => {\n /**\n * Intent for `onMount` is use with 'windowing' in order to maintain user state\n * when the component is scrolled back into view.\n * Anything that needs to be persisted in `react-table` state should be added here.\n * Only update on unmount to ensure we aren't doing too many re-renders.\n */\n return () => onUnmount?.({ pagination, sorting });\n }, [pagination, sorting, onUnmount]);\n\n const data = useMemo(\n () =>\n events.map((event) => {\n const metrics = detailedMetrics?.[\n event.event.viagVirtualId\n ] as ListingDetailedMetrics;\n const { performer, venue } = getPerformerAndVenueForEvent(\n event.event,\n catalogData\n );\n return {\n ...event,\n performer,\n venue,\n isSinglePerformerView: singlePerformer,\n metrics,\n };\n }),\n [catalogData, detailedMetrics, events, singlePerformer]\n );\n\n // TODO: handle main columns filter\n const { value: storedEventsColumnOrderSetting = defaultEventsColumnsConfig } =\n useServerUserSetting({\n id: UserSetting.EventsColumnOrder,\n });\n const { value: storedEventsColumnsEnabledSetting } = useServerUserSetting<\n string[]\n >({\n id: UserSetting.EventsColumnsEnabled,\n });\n const { value: customEventsColumns = [] } = useServerUserSetting<\n CustomEventsColumn[]\n >({\n id: UserSetting.EventsCustomColumns,\n });\n\n const { tagsMetadata } = useTagsForEntityType(\n ActionOutboxEntityType.SellerEvent,\n true\n );\n\n const displayedColumnsConfig = useMemo(() => {\n const eventsColumnOrder = storedEventsColumnOrderSetting.filter(\n // If storedEventsColumnsEnabledSetting has never been set, default to true\n (c) => storedEventsColumnsEnabledSetting?.includes(c) ?? true\n );\n\n if (\n !hasTablePinActionColumnFeature &&\n !eventsColumnOrder.includes(EventsTableColumnId.Action)\n ) {\n eventsColumnOrder.push(EventsTableColumnId.Action);\n }\n const columns = new Set([\n // Add unconfigurable columns first\n ...Object.values(EVENTS_TABLE_COLUMNS_CONFIG)\n .filter((column) => {\n const columnDef = getEventsColumnConfigById(\n column.id as EventsTableColumnId\n ).personalization;\n const hasFeatureForColumn =\n columnDef.requiredFeatures.length === 0 ||\n hasFeatures(\n loginContext?.user,\n appContext?.features,\n columnDef.requiredFeatures\n );\n\n let isConfigurable = columnDef.isConfigurable;\n if (\n !hasTablePinActionColumnFeature &&\n column.id === EventsTableColumnId.Action\n ) {\n isConfigurable = true;\n }\n\n return !isConfigurable && hasFeatureForColumn;\n })\n .map((item) => item.id as EventsTableColumnId),\n // Add user defined columns next\n ...filterColumnsByFeatures(\n eventsColumnOrder,\n SectionType.Events,\n customEventsColumns,\n loginContext?.user,\n appContext?.features\n ),\n ]);\n\n return Array.from(columns).reduce<\n ColumnDef[]\n >((acc, columnId) => {\n if (tagsMetadata?.find((t) => t.key === columnId)) {\n acc.push(tagColumnDef(columnId));\n } else if (isCustomEventsColumn(columnId)) {\n acc.push(\n customColumnDef(\n columnId,\n customEventsColumns.find((c) => c.id === columnId)?.formula\n )\n );\n } else {\n const columnConfig = Object.values(EVENTS_TABLE_COLUMNS_CONFIG).find(\n (column) => column.id === columnId\n );\n if (columnConfig) acc.push(columnConfig);\n }\n\n return acc;\n }, []);\n }, [\n appContext?.features,\n customEventsColumns,\n hasTablePinActionColumnFeature,\n loginContext?.user,\n storedEventsColumnOrderSetting,\n storedEventsColumnsEnabledSetting,\n tagsMetadata,\n ]);\n\n const rowSelection = useMemo(() => {\n if (!selectionMode && highlightedId) {\n return {\n [highlightedId]: true,\n };\n }\n return listingSelection.groupIds.reduce>(\n (acc, eventId) => {\n acc[eventId] = true;\n return acc;\n },\n {}\n );\n }, [highlightedId, listingSelection.groupIds, selectionMode]);\n\n const onRowSelectionChanged = useCallback(\n (updater: Updater) => {\n const newSelections =\n typeof updater === 'function' ? updater(rowSelection) : updater;\n const newSelectedIds = Object.keys(newSelections).filter(\n (r) => newSelections[r] === true\n );\n if (!selectionMode) {\n newSelectedIds.forEach((id) => {\n if (rowSelection[id] && newSelections[id]) {\n // if both of these are the same value and is true, we need to set it to false\n newSelections[id] = false;\n }\n });\n }\n setGroupStates(newSelections);\n },\n [rowSelection, selectionMode, setGroupStates]\n );\n\n const showCheckbox = selectionMode?.mode === MultiSelectScope.AllGroups;\n\n const options: Partial> =\n useMemo(\n () => ({\n data,\n columns: displayedColumnsConfig,\n state: {\n expanded: useDataGrouping ? true : undefined,\n grouping,\n pagination: usePagination ? pagination : undefined,\n sorting,\n rowSelection,\n columnVisibility: {\n checkbox: showCheckbox,\n },\n columnPinning: {\n right: hasTablePinActionColumnFeature\n ? [EventsTableColumnId.Action]\n : undefined,\n },\n },\n onGroupingChange: setGrouping,\n getRowId: getRowId,\n onRowSelectionChange: onRowSelectionChanged,\n onPaginationChange: usePagination ? setPagination : undefined,\n onSortingChange: (sortingUpdaterFn: any) => {\n const newSortVal = functionalUpdate(sortingUpdaterFn, sorting);\n setSorting(newSortVal);\n },\n enableRowSelection: showCheckbox,\n enableMultiRowSelection: showCheckbox,\n enableGrouping: !!useDataGrouping,\n }),\n [\n data,\n displayedColumnsConfig,\n useDataGrouping,\n grouping,\n usePagination,\n pagination,\n sorting,\n rowSelection,\n showCheckbox,\n hasTablePinActionColumnFeature,\n onRowSelectionChanged,\n ]\n );\n\n return failedToRetrieveData ? (\n }\n />\n ) : data?.length > 0 ? (\n \n ) : (\n // We should never see this - because the events are filtered to only those that has sales\n // So this is to prevent a crash - but this should be looked at\n \n \n \n );\n};\n","import clsx from 'clsx';\nimport { CSSProperties, ReactNode } from 'react';\nimport { ExpandCollapsableContentButton } from 'src/components/common/CollapsableContent/ExpandCollapsableContentButton';\nimport * as styles from 'src/components/Events/EventListing/InventoryEventListing/InventoryFlattenedView.css';\nimport { collapsedRow } from 'src/components/Events/EventListing/InventoryEventListing/InventoryFlattenedView.css';\nimport { useCollapsableViewContext } from 'src/contexts/CollapsableViewContext/CollapsableViewContext';\nimport { Stack } from 'src/core/ui';\nimport { EventsTable } from 'src/tables/EventsTable/EventsTable';\nimport { EventsTableColumnId } from 'src/utils/columns/events/eventsColumnUtils.types';\nimport { ActionOutboxEntityType, EventWithData } from 'src/WebApiController';\n\nimport { header } from './EventsTableWithInnerGrouping.css';\n\ninterface EventsTableWithInnerGroupingProps {\n before?: ReactNode;\n topListItemBefore?: ReactNode;\n events: EventWithData[];\n columnSettingButton?: ReactNode;\n tableHeadStyle?: CSSProperties;\n highlightEvent?: string; // Event UUID\n}\n\nconst posTableHeadStyle: CSSProperties = {\n position: 'sticky',\n top: '0',\n};\n\nexport const EventsTableWithInnerGrouping = ({\n events,\n before,\n topListItemBefore,\n columnSettingButton,\n highlightEvent,\n}: EventsTableWithInnerGroupingProps) => {\n const { isCollapsedView, setIsCollapsedView } = useCollapsableViewContext();\n const { onScroll } = useCollapsableViewContext();\n\n return (\n \n \n {before}\n \n {topListItemBefore}\n \n {isCollapsedView && (\n setIsCollapsedView(false)}\n />\n )}\n {columnSettingButton}\n \n \n \n );\n};\n","import { MouseEvent, ReactNode } from 'react';\nimport { useToggle } from 'react-use';\nimport { ActiveSortTableColumnProvider } from 'src/contexts/ActiveSortTableColumnContext';\nimport { CollapsableViewProvider } from 'src/contexts/CollapsableViewContext/CollapsableViewContext';\nimport { ColumnResizingContextProvider } from 'src/contexts/ColumnResizingContext/ColumnResizingContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { ColumnSettingsModal } from 'src/modals/ColumnSettings/ColumnSettings';\nimport { LayoutIcon } from 'src/svgs';\nimport { EventsTableWithInnerGrouping } from 'src/tables/EventsTable/EventsTableWithInnerGrouping';\nimport { CustomEventsColumn } from 'src/utils/columns/events/eventsCustomColumnUtils.types';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport {\n ActionOutboxEntityType,\n EventWithData,\n UserSetting,\n} from 'src/WebApiController';\n\ntype InventoryDetailedEventViewProps = {\n before?: ReactNode;\n topListItemBefore?: ReactNode;\n items?: EventWithData[];\n highlightEvent?: string; // Event UUID\n /**\n * If provided, the list will scroll to the month containing the event with the given viagogo virtual id\n */\n scrollToEventId?: string;\n};\n\nexport const InventoryDetailedEventView = ({\n items,\n highlightEvent,\n scrollToEventId,\n ...rest\n}: InventoryDetailedEventViewProps) => {\n const [isColumnModalOpen, toggleColumnModal] = useToggle(false);\n const onColumnSettingButtonClickHandler = (\n e: MouseEvent\n ) => {\n e.stopPropagation();\n if (!isColumnModalOpen) toggleColumnModal(true);\n };\n\n return (\n \n \n {isColumnModalOpen ? (\n \n onClose={toggleColumnModal}\n sectionType={SectionType.Events}\n />\n ) : null}\n\n \n \n \n \n \n }\n />\n \n \n \n );\n};\n","import { ComponentProps, ReactNode } from 'react';\nimport { ContentPlaceholder } from 'src/core/POS/ContentPlaceholder';\nimport { mergeProps } from 'src/core/utils';\nimport { getLocaleFromLanguageOrCurrent } from 'src/utils/localeUtils';\n\nimport * as styles from './SummaryTile.css';\n\ntype RootProps = Pick, 'style' | 'className'> & {\n children?: ReactNode;\n};\n\nexport function Root({ children, ...props }: RootProps) {\n return (\n
    {children}
    \n );\n}\n\nexport function DateDisplay({ date }: { date: Date }) {\n const currentLocale = getLocaleFromLanguageOrCurrent();\n const month = date.toLocaleString(currentLocale.code, { month: 'long' });\n const day = date.toLocaleString(currentLocale.code, { day: '2-digit' });\n const dayOfWeek = date.toLocaleString(currentLocale.code, {\n weekday: 'short',\n });\n return (\n
    \n
    {month}
    \n
    {day}
    \n
    \n
    {dayOfWeek}
    \n
    \n );\n}\n\nexport function Body({ children }: { children?: ReactNode }) {\n return
    {children}
    ;\n}\n\nexport function Title({ children }: { children?: ReactNode }) {\n return
    {children}
    ;\n}\n\nexport function Description({ children }: { children?: ReactNode }) {\n return
    {children}
    ;\n}\n\nexport function MetricGroup({\n children,\n ...props\n}: { children?: ReactNode } & Pick<\n ComponentProps<'div'>,\n 'style' | 'className'\n>) {\n return (\n
    \n {children}\n
    \n );\n}\n\nexport function Metric({\n showLoadingPlaceholders = false,\n name,\n children,\n}: {\n /**\n * Whether to show a placeholder if the metric value is `undefined`.\n */\n showLoadingPlaceholders?: boolean;\n name?: ReactNode;\n children?: ReactNode;\n}) {\n return (\n
    \n
    {name}
    \n
    \n {showLoadingPlaceholders && children === undefined ? (\n \n ) : (\n children\n )}\n
    \n
    \n );\n}\n","import { MetricTile } from 'src/components/Metrics';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { InventorySummaryListingMetricsDisplayStrings } from 'src/utils/ticketMetricUtils';\n\nimport * as styles from './InventorySummaryWidgets.css';\n\nexport const AverageTicketPriceDisplay = ({\n formattedTotalMetrics,\n}: {\n formattedTotalMetrics:\n | InventorySummaryListingMetricsDisplayStrings\n | undefined\n | null;\n}) => {\n return (\n \n \n \n \n
    \n \n {formattedTotalMetrics?.formattedAverageSalePrice}\n \n {/* Placeholder div with the same height as the metric visual to center the\n text in the same way */}\n
    \n
    \n \n );\n};\n","import { MetricTile } from 'src/components/Metrics';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { InventorySummaryListingMetricsDisplayStrings } from 'src/utils/ticketMetricUtils';\n\nimport * as styles from './InventorySummaryWidgets.css';\n\nexport const SalesAndMarginDisplay = ({\n formattedTotalMetrics,\n}: {\n formattedTotalMetrics:\n | InventorySummaryListingMetricsDisplayStrings\n | undefined\n | null;\n}) => {\n return (\n \n \n \n \n
    \n \n {formattedTotalMetrics?.formattedTotalGrossMargin}\n \n \n {formattedTotalMetrics?.formattedTotalNetProceeds}\n \n
    \n
    \n );\n};\n","import { MetricTile } from 'src/components/Metrics';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { InventorySummaryListingMetricsDisplayStrings } from 'src/utils/ticketMetricUtils';\n\nimport * as styles from './InventorySummaryWidgets.css';\n\nexport const TicketsListedAndSoldDisplay = ({\n formattedTotalMetrics,\n}: {\n formattedTotalMetrics:\n | InventorySummaryListingMetricsDisplayStrings\n | undefined\n | null;\n}) => {\n return (\n \n \n \n \n
    \n \n {formattedTotalMetrics?.formattedTotalSoldPercentage}\n \n \n \n \n
    \n
    \n );\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { useMemo } from 'react';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { DATA_REFRESH_RATE_IN_MILLIS_LONG } from 'src/utils/constants/constants';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { CatalogClient } from 'src/WebApiController';\n\nimport { useAppContext } from '../AppContext';\nimport { useCatalogDataContext } from '../CatalogDataContext';\nimport { useCatalogMetricsContext } from './useCatalogMetricsContext';\n\nexport function useGeSummaryMetricsQuery<\n TMetrics extends { currency: string | null },\n>(\n queryKey: string,\n performerIds: number[] | null | undefined,\n venueIds: number[] | null | undefined,\n mergeCatalogMetrics: (metrics: TMetrics[]) => TMetrics[],\n getCatalogSummaryMetrics?: (\n client: CatalogClient,\n allMetrics: TMetrics[],\n mergeCatalogMetrics: (metrics: TMetrics[]) => TMetrics[]\n ) => Promise,\n disabled?: boolean\n) {\n const { trackError } = useErrorBoundaryContext();\n const { eventsTransformed } = useCatalogDataContext();\n const { activeAccountWebClientConfig } = useAppContext();\n\n const eventIdsToGetSummaryMetricsFor = useMemo(\n () =>\n (eventsTransformed ?? [])\n .map((ev) => ({\n eventId: ev.event.viagVirtualId,\n performerId: ev.event.perfId,\n venueId: ev.event.venueId,\n }))\n .toSorted((ev1, ev2) => ev1.eventId.localeCompare(ev2.eventId)),\n [eventsTransformed]\n );\n\n const { eventDetailedMetrics, eventMetrics } =\n useCatalogMetricsContext();\n\n const metricsToSummarize = useMemo(() => {\n const detailedMetrics = Object.entries(eventDetailedMetrics ?? {});\n const normalMetrics = Object.entries(eventMetrics ?? {});\n const metrics = (\n detailedMetrics.length ? detailedMetrics : normalMetrics\n ).map(([evId, evMetrics]) => {\n if (performerIds?.length) {\n if (\n eventIdsToGetSummaryMetricsFor.find(\n (eid) =>\n eid.eventId === evId &&\n eid.performerId != null &&\n performerIds.includes(eid.performerId)\n )\n ) {\n return evMetrics;\n }\n } else if (venueIds?.length) {\n if (\n eventIdsToGetSummaryMetricsFor.find(\n (eid) => eid.eventId === evId && venueIds.includes(eid.venueId)\n )\n ) {\n return evMetrics;\n }\n } else {\n return evMetrics;\n }\n\n return null;\n });\n\n return mergeCatalogMetrics(metrics.filter((m) => m != null).map((m) => m!));\n }, [\n eventDetailedMetrics,\n eventIdsToGetSummaryMetricsFor,\n eventMetrics,\n mergeCatalogMetrics,\n performerIds,\n venueIds,\n ]);\n\n const shouldQuery =\n !(\n !getCatalogSummaryMetrics || !activeAccountWebClientConfig.activeAccountId\n ) &&\n metricsToSummarize.length > 0 &&\n !disabled;\n\n const summaryMetricsQuery = useQuery({\n queryKey: [\n `${queryKey}-summary`,\n metricsToSummarize,\n activeAccountWebClientConfig,\n ],\n queryFn: async () => {\n if (!shouldQuery) {\n return null;\n }\n return tryInvokeApi(\n () =>\n getCatalogSummaryMetrics!(\n new CatalogClient(activeAccountWebClientConfig),\n metricsToSummarize,\n mergeCatalogMetrics\n ),\n (error) => {\n // Since this is just loading metrics, we have the data so we'll just ignore that metrics error\n trackError(\n `${CatalogClient.name}.${CatalogClient.prototype.getSummaryMetricsForListings.name}`,\n error,\n {\n eventIds: eventIdsToGetSummaryMetricsFor,\n metricsToSummarize: metricsToSummarize,\n }\n );\n }\n );\n },\n\n enabled: shouldQuery,\n staleTime: Infinity, // Since we're always refetching on an interval, we don't want query to calculate whether the data is stale\n refetchOnWindowFocus: false,\n refetchInterval: DATA_REFRESH_RATE_IN_MILLIS_LONG,\n });\n\n return {\n summaryMetrics: summaryMetricsQuery.data ?? undefined,\n isLoading: summaryMetricsQuery.isLoading,\n refreshMetrics: () => summaryMetricsQuery.refetch(),\n };\n}\n","import { useCallback } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { logToServer } from 'src/utils/clientLogUtils';\nimport { LoginClient, LogLevel } from 'src/WebApiController';\n\nexport const useGetActiveAccountClientConfig = (requestName: string) => {\n const { activeAccountWebClientConfig, setLoginContext } = useAppContext();\n\n const navigate = useNavigate();\n\n const getActiveAccountClientConfig = useCallback(async () => {\n if (activeAccountWebClientConfig.activeAccountId == null) {\n logToServer(\n LogLevel.Warning,\n requestName,\n 'Null activeAccountId - repulling loginContext',\n { activeAccountWebClientConfig }\n );\n\n const newLogin = await new LoginClient({}).getLoginContext(\n window.location.pathname\n );\n if (!newLogin.isSuccess || newLogin.user?.activeAccount.id == null) {\n logToServer(\n LogLevel.Error,\n requestName,\n 'Null activeAccountId - unable to repull loginContext - reload to refresh login',\n { newLogin }\n );\n navigate(`/login`, {\n state: { returnUrl: window.location.pathname },\n });\n } else {\n logToServer(\n LogLevel.Information,\n requestName,\n 'Null activeAccountId - repull loginContext successful - updating loginContext in app',\n { newLogin }\n );\n setLoginContext(newLogin);\n activeAccountWebClientConfig.activeAccountId =\n newLogin.user.activeAccount.id;\n }\n }\n\n return activeAccountWebClientConfig;\n }, [activeAccountWebClientConfig, navigate, requestName, setLoginContext]);\n\n return getActiveAccountClientConfig;\n};\n","export const EVENT_DETAILED_METRICS_QUERY_KEY =\n 'EventTable.getDetailedMetricsQuery';\n","import { isEmpty } from 'lodash-es';\nimport { FilterToolbarItemId } from 'src/components/Filters';\nimport { ExpandedEventData } from 'src/contexts/CatalogDataContext';\nimport { ErrorTypes } from 'src/contexts/ErrorBoundaryContext';\nimport {\n filterAndflattenListingGroup,\n flattenListingGroup,\n} from 'src/modals/GroupListings/components/groupingUtils';\nimport {\n getPresetFromUiDateTimeRange,\n getUiDateTimeRangeFromPreset,\n InhandDateRangePresetNames,\n} from 'src/utils/dateTimeUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n CatalogClient,\n DateTimeRange,\n GroupType,\n IListingGroupItem,\n Listing,\n ListingClient,\n ListingDetailDataField,\n ListingGroup,\n ListingMetrics,\n ListingMetricsInput,\n ListingQuery,\n PosClientConfig,\n SectionalListingsForEventsInput,\n} from 'src/WebApiController';\n\nexport const getCatalogData = async (\n client: CatalogClient,\n filterQuery: ListingQuery,\n includeCounts: boolean\n) => {\n return await client.getCatalogForListing(filterQuery, includeCounts);\n};\n\n// Don't load sectional data for listing in invisible groups\nconst filterInvisibleGroups = (l: IListingGroupItem): boolean => {\n if (l == null) {\n return false;\n }\n if (l.isLtGrp) {\n return (l as ListingGroup).groupType !== GroupType.Invisible;\n }\n return true;\n};\n\nconst deepOverrideListing = (\n listing: Listing,\n overrides: Record,\n dataToOverride: ListingDetailDataField[]\n) => {\n const groupItems = (listing as ListingGroup).groupItems;\n if (!isEmpty(groupItems)) {\n Object.assign(listing, {\n groupItems: groupItems.map((item) =>\n deepOverrideListing(item as Listing, overrides, dataToOverride)\n ),\n });\n return listing;\n }\n const override = overrides[listing.id];\n if (override) {\n if (\n dataToOverride.includes(ListingDetailDataField.Purchase) &&\n override.dataIsLoaded?.[ListingDetailDataField.Purchase]\n ) {\n Object.assign(listing, {\n isCurUserPo: override.isCurUserPo,\n poBys: override.poBys,\n poCreatedBys: override.poCreatedBys,\n poDate: override.poDate,\n poId: override.poId,\n poOrderId: override.poOrderId,\n poVendAccEmail: override.poVendAccEmail,\n dataIsLoaded: {\n ...listing.dataIsLoaded,\n [ListingDetailDataField.Purchase]: true,\n },\n } as Partial);\n }\n\n if (\n dataToOverride.includes(ListingDetailDataField.Tags) &&\n override.dataIsLoaded?.[ListingDetailDataField.Tags]\n ) {\n Object.assign(listing, {\n tags: override.tags,\n dataIsLoaded: {\n ...listing.dataIsLoaded,\n [ListingDetailDataField.Tags]: true,\n },\n } as Partial);\n }\n }\n return listing;\n};\n\nconst mergeCatalogListings = (\n listings: Listing[],\n overrides: Listing[],\n dataToOverride: ListingDetailDataField[]\n) => {\n if (overrides.length === 0 || dataToOverride.length === 0) {\n return listings;\n }\n\n const overrideById = overrides\n .flatMap(flattenListingGroup)\n .map((listing) => listing as Listing)\n .reduce(\n (map, listing) => {\n map[listing.id] = listing;\n return map;\n },\n {} as Record\n );\n\n return listings.map((listing) =>\n deepOverrideListing(listing, overrideById, dataToOverride)\n );\n};\n\nexport const getCatalogSectionalDataExpanded = async (\n viagogoVirtualIds: string[],\n filterQuery: ListingQuery,\n dataToInclude: ListingDetailDataField[],\n {\n activeAccountWebClientConfig,\n onError,\n }: {\n activeAccountWebClientConfig: PosClientConfig;\n onError?: (error: ErrorTypes) => void;\n },\n currentData?: ExpandedEventData\n) => {\n const emptyResults = viagogoVirtualIds.reduce((results, id) => {\n results[id] = {\n sales: null,\n listings: null,\n ticketGroups: null,\n failedToRetrieveData: false,\n };\n return results;\n }, {} as ExpandedEventData);\n const result = await tryInvokeApi(async () => {\n // Only process listing group when basic data is included\n const processListingGroup = dataToInclude.includes(\n ListingDetailDataField.Basic\n );\n // No current data, we are loading for the first time\n if (currentData == null) {\n const input: SectionalListingsForEventsInput = {\n listingQuery: {\n ...filterQuery,\n // Is is to support the legacy event ID urls\n oldPosEventIds: viagogoVirtualIds\n .filter((id) => id.startsWith('old:'))\n .map((id) => id.substring(4)),\n eventOrMappingIds: viagogoVirtualIds.filter(\n (id) => !id.startsWith('old:')\n ),\n },\n curListings: null,\n };\n // Listing groups will be loaded in the first call\n // TODO: we should add guard to make sure basic data is loaded the first time\n const allListings = await new ListingClient(\n activeAccountWebClientConfig\n ).getListingsSectionalDataForEvents(\n input,\n dataToInclude,\n processListingGroup\n );\n return Promise.resolve(\n Object.entries(allListings).reduce((results, [id, listings]) => {\n results[id] = {\n sales: null,\n listings: listings,\n ticketGroups: null,\n failedToRetrieveData: false,\n };\n return results;\n }, emptyResults)\n );\n } else {\n const curListings = Object.entries(currentData ?? {})\n .flatMap(([_, data]) => data.listings ?? [])\n .flatMap(filterAndflattenListingGroup(filterInvisibleGroups))\n .map((listing) => listing as Listing)\n .map(\n (listing) =>\n ({\n id: listing.id,\n actions: listing.actions,\n seating: listing.seating,\n currency: listing.currency,\n viagVirtualId: listing.viagVirtualId,\n vldPurQty: listing.vldPurQty,\n }) as Listing\n );\n const input: SectionalListingsForEventsInput = {\n listingQuery: {\n ...filterQuery,\n // Is is to support the legacy event ID urls\n oldPosEventIds: viagogoVirtualIds\n .filter((id) => id.startsWith('old:'))\n .map((id) => id.substring(4)),\n eventOrMappingIds: viagogoVirtualIds.filter(\n (id) => !id.startsWith('old:')\n ),\n },\n curListings,\n };\n // Skip processing listing group in the follow up sectional calls\n const overrideListings = await new ListingClient(\n activeAccountWebClientConfig\n ).getListingsSectionalDataForEvents(\n input,\n dataToInclude,\n processListingGroup\n );\n return Promise.resolve(\n Object.entries(currentData).reduce((results, [id, data]) => {\n const override = overrideListings?.[id] ?? [];\n results[id] = {\n ...data,\n listings: mergeCatalogListings(\n data.listings ?? [],\n override,\n dataToInclude\n ),\n };\n return results;\n }, emptyResults)\n );\n }\n }, onError);\n\n if (result) {\n return Promise.resolve(result);\n }\n\n return Promise.resolve(\n viagogoVirtualIds.reduce((results, id) => {\n results[id] = {\n failedToRetrieveData: true,\n sales: null,\n listings: null,\n ticketGroups: null,\n };\n return results;\n }, {} as ExpandedEventData)\n );\n};\n\nexport const getCatalogDataExpanded = async (\n viagogoVirtualIds: string[],\n filterQuery: ListingQuery,\n {\n activeAccountWebClientConfig,\n onError,\n }: {\n activeAccountWebClientConfig: PosClientConfig;\n onError?: (error: ErrorTypes) => void;\n },\n useReadonlyDB = false,\n doNotProcessListingGroups = false\n) => {\n const result = await tryInvokeApi(async () => {\n const allListings = await new ListingClient(\n activeAccountWebClientConfig\n ).getListingsForEvents(\n {\n ...filterQuery,\n // Is is to support the legacy event ID urls\n oldPosEventIds: viagogoVirtualIds\n .filter((id) => id.startsWith('old:'))\n .map((id) => id.substring(4)),\n eventOrMappingIds: viagogoVirtualIds.filter(\n (id) => !id.startsWith('old:')\n ),\n },\n useReadonlyDB,\n doNotProcessListingGroups\n );\n\n const emptyResults = viagogoVirtualIds.reduce((results, id) => {\n results[id] = {\n sales: null,\n listings: null,\n ticketGroups: null,\n failedToRetrieveData: false,\n };\n return results;\n }, {} as ExpandedEventData);\n\n return Promise.resolve(\n Object.entries(allListings).reduce((results, [id, listings]) => {\n results[id] = {\n sales: null,\n listings: listings,\n ticketGroups: null,\n failedToRetrieveData: false,\n };\n return results;\n }, emptyResults)\n );\n }, onError);\n\n if (result) {\n return Promise.resolve(result);\n }\n\n return Promise.resolve(\n viagogoVirtualIds.reduce((results, id) => {\n results[id] = {\n failedToRetrieveData: true,\n sales: null,\n listings: null,\n ticketGroups: null,\n };\n return results;\n }, {} as ExpandedEventData)\n );\n};\n\nexport const getCatalogMetrics = (\n client: CatalogClient,\n filterQuery: ListingQuery,\n rowVersion?: number | null,\n hasMetricsV2Feature?: boolean\n) => {\n return hasMetricsV2Feature\n ? client.getCatalogMetricsForListings(filterQuery, rowVersion ?? undefined)\n : client.getCatalogListingMetrics(filterQuery);\n};\n\nexport const getCatalogSummaryMetrics = (\n client: CatalogClient,\n metrics: ListingMetrics[],\n mergeCatalogMetrics: (metrics: ListingMetrics[]) => ListingMetrics[]\n) => {\n const resultMetrics = mergeCatalogMetrics(metrics);\n if (resultMetrics?.length === 1) {\n return Promise.resolve(resultMetrics[0]);\n }\n return client.getSummaryMetricsForListings(\n resultMetrics.map(\n (m) =>\n ({\n totalTicketQuantity: m.tktQty,\n totalSoldQuantity: m.soldQty,\n totalUnsoldQuantity: m.unsoldQty,\n totalListedQuantity: m.listQty,\n totalUnlistedQuantity: m.unlistQty,\n currencyCode: m.currency,\n /** Total cost of all tickets */\n totalCost: {\n amount: m.ttlCst.amt,\n currencyCode: m.ttlCst.currency ?? m.currency,\n decimalDigits: m.ttlCst.dec,\n display: m.ttlCst.disp,\n },\n /** Total cost of sold tickets */\n totalSoldCost: {\n amount: m.soldCst.amt,\n currencyCode: m.soldCst.currency ?? m.currency ?? m.currency,\n decimalDigits: m.soldCst.dec,\n display: m.soldCst.disp,\n },\n /** Total cost of unsold tickets */\n totalUnsoldCost: {\n amount: m.unsoldCst.amt,\n currencyCode: m.unsoldCst.currency ?? m.currency,\n decimalDigits: m.unsoldCst.dec,\n display: m.unsoldCst.disp,\n },\n /** Total list price of all tickets */\n totalListPrice: {\n amount: m.ttlListPrc.amt,\n currencyCode: m.ttlListPrc.currency ?? m.currency,\n decimalDigits: m.ttlListPrc.dec,\n display: m.ttlListPrc.disp,\n },\n /** Total value of all listed tickets */\n // This is un-used and only exists for backward compatibility\n totalListedValue: {\n amount: 0,\n currencyCode: m.currency,\n decimalDigits: 2,\n display: '',\n },\n /** Total list price of unsold tickets */\n totalUnsoldListPrice: {\n amount: m.ttlUnsoldListPrc.amt,\n currencyCode: m.ttlUnsoldListPrc.currency ?? m.currency,\n decimalDigits: m.ttlUnsoldListPrc.dec,\n display: m.ttlUnsoldListPrc.disp,\n },\n /** Total net proceeds of sold tickets */\n totalNetProceeds: {\n amount: m.netProcs.amt,\n currencyCode: m.netProcs.currency ?? m.currency,\n decimalDigits: m.netProcs.dec,\n display: m.netProcs.disp,\n },\n /** Total gross profit of sold tickets */\n totalGrossProfit: {\n amount: m.pandL.amt,\n currencyCode: m.pandL.currency ?? m.currency,\n decimalDigits: m.pandL.dec,\n display: m.pandL.disp,\n },\n }) as ListingMetricsInput\n )\n );\n};\n\nexport const getEventDetailedMetrics = (\n client: CatalogClient,\n filterQuery: ListingQuery,\n rowVersion?: number | null,\n hasMetricsV2Feature?: boolean\n) =>\n hasMetricsV2Feature\n ? client.getCatalogDetailedMetricsForListings(filterQuery, rowVersion)\n : client.getEventDetailedListingMetrics(filterQuery);\n\nexport const listingQueryValueTransformFromUrl = (\n key: string,\n value: string\n) => {\n if (!value) {\n return value;\n }\n\n const listingsKey = key as keyof ListingQuery;\n if (listingsKey === 'inHandDates') {\n const preset = getUiDateTimeRangeFromPreset(\n value,\n InhandDateRangePresetNames\n );\n if (preset) {\n return preset;\n }\n }\n\n return value;\n};\n\nexport const listingQueryValueTransformToUrl = (\n key: FilterToolbarItemId,\n value: unknown\n) => {\n if (!value) {\n return value;\n }\n\n const listingsKey = key as keyof ListingQuery;\n\n if (listingsKey === 'inHandDates') {\n const preset = getPresetFromUiDateTimeRange(value as DateTimeRange);\n if (preset && InhandDateRangePresetNames.includes(preset.name)) {\n return preset.name;\n }\n }\n\n return value;\n};\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport const PerformerVenueDisplayContainer = styled.div`\n padding: ${() =>\n `${vars.spacing.sm} ${vars.spacing.lg} 0 ${vars.spacing.lg}`};\n`;\n","import clsx from 'clsx';\nimport { useMemo } from 'react';\nimport { PerformerCategoryIcon } from 'src/components/common/PerformerCategoryIcon';\nimport {\n MetricsDisplay,\n MetricsDisplayPlaceholder,\n} from 'src/components/Metrics';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useSidePanelContext } from 'src/contexts/SidePanelContext';\nimport { vars } from 'src/core/themes';\nimport { MainRoute } from 'src/navigations/Routes/MainRoute';\nimport {\n getInventoryListingMetrics,\n getSalesSaleMetrics,\n} from 'src/utils/ticketMetricUtils';\nimport {\n CatalogEntity,\n ListingMetrics,\n Performer,\n SaleMetrics,\n} from 'src/WebApiController';\n\nimport * as styles from './PerformerVenueDisplay.css';\nimport { PerformerVenueDisplayContainer } from './PerformerVenueDisplay.styled';\n\nconst GROUPING_METRICS_PLACEHOLDER_DIMS = { width: '50px' };\n\nexport function PerformerVenueDisplay({\n grouping,\n isSelected,\n onPerformerVenueClicked,\n metricsData,\n hideMetrics,\n disabled,\n}: {\n grouping: CatalogEntity;\n isSelected: boolean;\n onPerformerVenueClicked: (group: CatalogEntity) => void;\n metricsData: Record | undefined;\n hideMetrics?: boolean;\n disabled?: boolean;\n}) {\n const { isCollapsed } = useSidePanelContext();\n const { mainRoute } = useAppContext();\n const { loginContext } = useAppContext();\n const displayMetrics = useMemo(() => {\n if (!metricsData) {\n return null;\n }\n return mainRoute === MainRoute.Sales\n ? getSalesSaleMetrics(\n metricsData[grouping.viagId!] as SaleMetrics,\n false,\n true,\n false\n )\n : getInventoryListingMetrics(\n metricsData[grouping.viagId!] as ListingMetrics,\n loginContext?.user?.activeAccount?.currencyCode\n );\n }, [\n grouping.viagId,\n loginContext?.user?.activeAccount?.currencyCode,\n mainRoute,\n metricsData,\n ]);\n\n const hasCategory = useMemo(() => {\n return (grouping as Performer).categ;\n }, [grouping]);\n\n const mainMetrics = useMemo(\n () => (mainRoute === MainRoute.Sales ? null : displayMetrics?.mainMetrics),\n [displayMetrics?.mainMetrics, mainRoute]\n );\n\n return (\n \n {\n if (!disabled) {\n onPerformerVenueClicked(grouping);\n }\n }}\n title={`${grouping.name} - ${grouping.descr}`}\n className={clsx(styles.mainGroupingDisplayDiv, {\n [styles.mainGroupingDisplaySelected]: isSelected,\n [styles.mainGroupingDisplayCollapsed]: isCollapsed,\n [styles.mainGroupingDisplayDivActive]: !disabled,\n })}\n >\n
    \n
    \n
    \n \n
    {grouping.name}
    \n
    \n {mainMetrics}\n
    \n
    \n\n
    \n \n {hasCategory && (\n \n \n \n )}\n {/* TODO remove this in POS-1218 after the responsiveness of these tiles is fixed*/}\n {grouping.descr?.replace(/ Music$/, '')}\n
    \n {!hideMetrics && (\n \n {displayMetrics == null ? (\n \n ) : (\n \n )}\n \n )}\n
    \n
    \n
    \n
    \n \n \n );\n}\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport const PerformerVenueFilterBarDiv = styled.div<{ isCollapsed: boolean }>`\n display: flex;\n gap: ${() => vars.spacing.sm};\n padding: ${() => `${vars.spacing.lg} ${vars.spacing.xl}`};\n justify-content: ${(props) =>\n props.isCollapsed ? 'flex-end' : 'space-between'};\n align-items: center;\n border-bottom: 0;\n position: relative;\n`;\n\nexport const SortButtonContainer = styled.div`\n padding-inline-start: ${() => vars.spacing.sm};\n\n ${({ theme: { media } }) =>\n `${media.makeMediaQuery(\n media.breakpoints.md,\n `padding-inline-start: ${vars.spacing.lg};`\n )}`}\n`;\n","import { debounce } from 'lodash-es';\nimport { useCallback, useMemo } from 'react';\nimport { SwiperButton } from 'src/components/Buttons/SwiperButton';\nimport { ReportFilterEditabilityDropdown } from 'src/components/FilterToolbar/FilterDialogV2/FiltersList/ReportFilterEditabilityDropdown';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { useSidePanelContext } from 'src/contexts/SidePanelContext';\nimport { PosSelectableSearchBox } from 'src/core/POS/PosSearchBox/PosSelectableSearchBox';\nimport { Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { EVENT_GROUPING_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport {\n DEFAULT_REPORT_FILTER_EDITABILITY,\n ReportFilterEditability,\n ReportPerformerVenueFilterItemId,\n} from 'src/utils/reportsFilterUtils';\nimport { EventGroupingType } from 'src/WebApiController';\n\nimport { PerformerVenueFilterBarDiv } from './PerformerVenueFilterBar.styled';\nimport type { PerformerVenueFilterBarProps } from './PerformerVenueFilterBar.types';\n\nexport function PerformerVenueFilterBar({\n groupingQuery,\n onGroupingQueryChanged,\n onEditabilityChange,\n performerFilterEditability,\n venueFilterEditability,\n embeddedDisplayOnly,\n swiperRef,\n}: PerformerVenueFilterBarProps) {\n const searchPlaceholderText = useContent(ContentId.Search);\n const { isCollapsed } = useSidePanelContext();\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const debouncedOnSearchChange = useCallback(\n debounce((text: string) => {\n if (text !== groupingQuery.searchText) {\n onGroupingQueryChanged({\n ...groupingQuery,\n searchText: text || null,\n });\n }\n }, 200),\n [groupingQuery]\n );\n\n const onSearchChange = useCallback(\n (searchText: string) => debouncedOnSearchChange(searchText),\n [debouncedOnSearchChange]\n );\n\n const onSelectorChange = useCallback(\n (groupingType: EventGroupingType | null) => {\n if (groupingType !== groupingQuery.groupingType) {\n onGroupingQueryChanged({\n ...groupingQuery,\n groupingType: groupingType!, // null is not a selectable option for this enum filter\n });\n }\n },\n [groupingQuery, onGroupingQueryChanged]\n );\n\n const activeReportFilterId = useMemo(() => {\n return groupingQuery.groupingType === EventGroupingType.Performer\n ? ReportPerformerVenueFilterItemId.PerformerIds\n : ReportPerformerVenueFilterItemId.VenueIds;\n }, [groupingQuery.groupingType]);\n\n const activeEditability = useMemo(() => {\n return groupingQuery.groupingType === EventGroupingType.Performer\n ? performerFilterEditability\n : venueFilterEditability;\n }, [\n groupingQuery.groupingType,\n performerFilterEditability,\n venueFilterEditability,\n ]);\n\n const activeValueOptionsContent = useMemo(() => {\n if (!embeddedDisplayOnly) {\n return EVENT_GROUPING_TO_CID;\n }\n\n return Object.entries(EVENT_GROUPING_TO_CID).reduce(\n (acc, [key, value]) => {\n if (\n key === EventGroupingType.Performer &&\n (performerFilterEditability ?? DEFAULT_REPORT_FILTER_EDITABILITY) !==\n ReportFilterEditability.Hidden\n ) {\n acc[key as EventGroupingType] = value;\n }\n if (\n key === EventGroupingType.Venue &&\n (venueFilterEditability ?? DEFAULT_REPORT_FILTER_EDITABILITY) !==\n ReportFilterEditability.Hidden\n ) {\n acc[key as EventGroupingType] = value;\n }\n return acc;\n },\n {} as Record\n );\n }, [embeddedDisplayOnly, performerFilterEditability, venueFilterEditability]);\n\n const selectorProps = useMemo(\n () => ({\n value: groupingQuery.groupingType || EventGroupingType.Performer,\n defaultValue: EventGroupingType.Performer,\n onChange: onSelectorChange,\n valueOptionsContent: activeValueOptionsContent,\n }),\n [activeValueOptionsContent, groupingQuery.groupingType, onSelectorChange]\n );\n\n return (\n \n {!isCollapsed && (\n \n \n {!embeddedDisplayOnly && onEditabilityChange != null && (\n \n )}\n \n )}\n \n \n );\n}\n","import styled from 'styled-components/macro';\n\nexport const SelectedPerformerVenueContainer = styled.div`\n position: absolute;\n overflow: hidden;\n width: 100%;\n z-index: 2;\n box-shadow: 0px 10px 10px -5px ${(props) => props.theme.colors.textPrimary};\n`;\n","import styled from 'styled-components/macro';\n\nexport const SelectedPerformerVenueListContainer = styled.div<{\n isOpen: boolean;\n}>`\n display: flex;\n flex-direction: column;\n width: 100%;\n max-height: ${(props) => (props.isOpen ? 'calc(40vh - 41px)' : '0')};\n overflow: auto;\n background: ${(props) => props.theme.colors.backgroundSecondary};\n transition: max-height 0.5s;\n`;\n","import { CatalogEntity } from 'src/WebApiController';\n\nimport { PerformerVenueDisplay } from '../PerformerVenueDisplay';\nimport { SelectedPerformerVenueListContainer } from './SelectedPerformerVenueList.styled';\n\nexport const SelectedPerformerVenueList = ({\n selectedPerformerVenues,\n isOpen,\n onPerformerVenueClicked,\n metricsData,\n disabled,\n}: {\n selectedPerformerVenues: CatalogEntity[];\n isOpen: boolean;\n onPerformerVenueClicked: (g: CatalogEntity) => void;\n metricsData: Record | undefined;\n disabled?: boolean;\n}) => {\n return (\n \n {selectedPerformerVenues.map((mg) => (\n \n ))}\n \n );\n};\n","import clsx from 'clsx';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ChevronDownIcon, ChevronUpIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport * as styles from './SelectedPerformerVenueListDivider.css';\n\nexport const SelectedPerformerVenuesDivider = ({\n selectedCount,\n totalCount,\n isOpened,\n onClick,\n}: {\n selectedCount: number;\n totalCount: number;\n isOpened?: boolean;\n onClick?: () => void;\n}) => {\n const clickable = Boolean(onClick);\n const upIcon = isOpened ? : ;\n return (\n \n
    \n {clickable && upIcon}\n
    \n {selectedCount} / {totalCount} \n
    \n {clickable && upIcon}\n
    \n
    \n );\n};\n","import { debounce, isEqual } from 'lodash-es';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport { ListItem, Virtuoso } from 'react-virtuoso';\nimport removeAccents from 'remove-accents';\nimport * as EmptySectionContent from 'src/components/common/EmptySectionContent';\nimport { PerformerVenueDisplay } from 'src/components/Events/PerformerVenueList/PerformerVenueDisplay/PerformerVenueDisplay';\nimport { PerformerVenueFilterBar } from 'src/components/Events/PerformerVenueList/PerformerVenueFilterBar/PerformerVenueFilterBar';\nimport { SelectedPerformerVenueContainer } from 'src/components/Events/PerformerVenueList/PerformerVenueList.styled';\nimport { SelectedPerformerVenueList } from 'src/components/Events/PerformerVenueList/SelectedPerformerVenueList';\nimport { SelectedPerformerVenuesDivider } from 'src/components/Events/PerformerVenueList/SelectedPerformerVenueListDivider';\nimport { FilterToolbarItemId } from 'src/components/Filters';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { getEventsWithNonZeroCounts } from 'src/contexts/CatalogDataContext/CatalogDataContext.utils';\nimport { useCatalogMetricsContext } from 'src/contexts/CatalogMetricsContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { SearchSolidIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n DefaultEventGroupingQuery,\n QueryWithViewMode,\n} from 'src/utils/eventQueryUtils';\nimport { compareLocaleLowercased } from 'src/utils/localeUtils';\nimport {\n DEFAULT_REPORT_FILTER_EDITABILITY,\n ReportFilterEditability,\n} from 'src/utils/reportsFilterUtils';\nimport { SomethingWentWrong } from 'src/views';\nimport {\n ActionOutboxEntityType,\n CatalogEntity,\n EntityWithTicketsQuery,\n EventGroupingQuery,\n EventGroupingType,\n Feature,\n Performer,\n Venue,\n} from 'src/WebApiController';\n\nimport { PerformerVenueFilterBarProps } from './PerformerVenueFilterBar/PerformerVenueFilterBar.types';\nimport * as styles from './PerformerVenueList.css';\n\ntype PerformerVenueListingItem =\n | { entity: CatalogEntity; isSelected: boolean }\n | number;\n\ntype CatalogEntitiesWithGroupingType = {\n entities: CatalogEntity[];\n groupingType: EventGroupingType;\n};\n\nexport type PerformerVenueListProps = {\n entityType:\n | ActionOutboxEntityType.Listing\n | ActionOutboxEntityType.Sale\n | ActionOutboxEntityType.TicketGroup;\n onItemsRendered?: (\n items: CatalogEntity[],\n itemType: EventGroupingType\n ) => void;\n hideMetrics?: boolean;\n updateTempQuery?: boolean;\n onEditabilityChange?: (\n filterId: FilterToolbarItemId,\n editability: ReportFilterEditability\n ) => void;\n} & Pick<\n PerformerVenueFilterBarProps,\n | 'onEditabilityChange'\n | 'performerFilterEditability'\n | 'venueFilterEditability'\n | 'embeddedDisplayOnly'\n | 'swiperRef'\n>;\n\nexport function PerformerVenueList({\n entityType,\n onItemsRendered,\n hideMetrics,\n updateTempQuery,\n embeddedDisplayOnly,\n performerFilterEditability,\n venueFilterEditability,\n ...props\n}: PerformerVenueListProps) {\n const defaultGroupingQuery = useMemo(() => {\n return {\n ...DefaultEventGroupingQuery,\n groupingType:\n !embeddedDisplayOnly ||\n (performerFilterEditability ?? DEFAULT_REPORT_FILTER_EDITABILITY) !==\n ReportFilterEditability.Hidden\n ? EventGroupingType.Performer\n : EventGroupingType.Venue,\n };\n }, [embeddedDisplayOnly, performerFilterEditability]);\n\n const [groupingQuery, setGroupingQuery] =\n useState(defaultGroupingQuery);\n const [debouncedGroupingQuery, setDebouncedGroupingQuery] =\n useState(groupingQuery);\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const debounceWrapper = useCallback(\n debounce((f: EventGroupingQuery) => {\n setDebouncedGroupingQuery(f);\n }, 200),\n []\n );\n\n const handleFilterChange = useCallback(\n (f: EventGroupingQuery) => {\n setGroupingQuery(f);\n debounceWrapper(f);\n },\n [debounceWrapper]\n );\n\n const [selectedPerformerVenuesWithType, setSelectedPerformerVenuesWithType] =\n useState([]);\n const [selectedDividerIsVisibleInList, setSelectedDividerIsVisibleInList] =\n useState(false);\n const [\n selectedDividerButtonShouldBeVisible,\n setSelectedDividerButtonShouldBeVisible,\n ] = useState(false);\n const [showSelectedList, setShowSelectedList] = useState(false);\n\n const { filterQuery, setFilterQuery, setTempQuery } = useFilterQueryContext<\n EntityWithTicketsQuery & QueryWithViewMode\n >();\n const { isLoading, data, errorInfo } = useCatalogDataContext();\n const { performerMetrics, venueMetrics } = useCatalogMetricsContext();\n\n const selectedPerformerVenues: CatalogEntity[] = useMemo(\n () =>\n selectedPerformerVenuesWithType.find(\n (s) => s.groupingType === groupingQuery.groupingType\n )?.entities ?? [],\n [groupingQuery.groupingType, selectedPerformerVenuesWithType]\n );\n\n const updateSelectedPerformerVenues = useCallback(\n (newSelectedPerformerVenues: CatalogEntitiesWithGroupingType[]): void => {\n if (newSelectedPerformerVenues.length) {\n // We want to retain the selected main groupings of other type than currently selected\n // So what when switching back the main grouping type, they won't get cleared\n const selectedPerformerVenuesOtherType =\n selectedPerformerVenuesWithType.filter(\n (s) =>\n !newSelectedPerformerVenues.some(\n (n) => n.groupingType === s.groupingType\n )\n );\n setSelectedPerformerVenuesWithType([\n ...selectedPerformerVenuesOtherType,\n ...newSelectedPerformerVenues,\n ]);\n } else {\n setSelectedPerformerVenuesWithType([]);\n }\n\n const newFilterQuery = { ...filterQuery };\n const performerGroupings = newSelectedPerformerVenues.find(\n (s) => s.groupingType === EventGroupingType.Performer\n );\n const venueGroupings = newSelectedPerformerVenues.find(\n (s) => s.groupingType === EventGroupingType.Venue\n );\n if (performerGroupings) {\n newFilterQuery.performerIds = performerGroupings.entities.length\n ? performerGroupings.entities.map((mg) => mg.viagId!).toSorted()\n : null;\n }\n if (venueGroupings) {\n newFilterQuery.venueIds = venueGroupings.entities.length\n ? venueGroupings.entities.map((mg) => mg.viagId!).toSorted()\n : null;\n }\n\n if (performerGroupings || venueGroupings) {\n if (updateTempQuery) {\n setTempQuery(newFilterQuery);\n }\n setFilterQuery(newFilterQuery);\n }\n },\n [\n filterQuery,\n selectedPerformerVenuesWithType,\n updateTempQuery,\n setTempQuery,\n setFilterQuery,\n ]\n );\n\n const filterPerformerVenues = useCallback(\n (\n groupings: CatalogEntity[] | undefined,\n selectedPerformerVenues: CatalogEntity[]\n ) => {\n if (!groupings) return undefined;\n\n let filteredGroups = [...groupings];\n\n if (selectedPerformerVenues?.length) {\n const curSelectedIds = selectedPerformerVenues.map((mg) => mg.viagId);\n // Any performer id or venue id in the query that is no longer in the result list should be removed (unselected)\n const newAllIds = filteredGroups.map((mg) => mg.viagId);\n const updateSelectedIds = curSelectedIds?.filter((id) =>\n newAllIds.includes(id)\n );\n if (!isEqual(curSelectedIds, updateSelectedIds)) {\n const newSelectedPerformerVenues = selectedPerformerVenues.filter(\n (mg) => updateSelectedIds.includes(mg.viagId)\n );\n\n updateSelectedPerformerVenues([\n {\n entities: newSelectedPerformerVenues,\n groupingType: groupingQuery.groupingType,\n },\n ]);\n }\n }\n\n const searchText = removeAccents(\n debouncedGroupingQuery?.searchText?.toUpperCase() || ''\n );\n if (searchText.length > 0) {\n filteredGroups = filteredGroups.filter((g) => {\n const isSelected = selectedPerformerVenues.some(\n (mg2) => mg2.viagId === g.viagId\n );\n const entity = removeAccents(g.name.toUpperCase());\n const searchTerms = searchText.split(/\\s/); // any whitespace\n\n const isMatchingSearch = searchTerms.every((term) =>\n entity.includes(term)\n );\n // We always keep the selected around\n return isSelected || isMatchingSearch;\n });\n }\n\n // NOTE - For main-grouping, we will sort in-memory because the list is not paged,\n // but if it is paged, we will need to sort server side\n filteredGroups = filteredGroups.toSorted((a, b) => {\n const result = compareLocaleLowercased(a.name, b.name);\n return debouncedGroupingQuery?.isSortDescending ? -1 * result : result;\n });\n\n return filteredGroups;\n },\n [\n debouncedGroupingQuery?.isSortDescending,\n debouncedGroupingQuery?.searchText,\n groupingQuery.groupingType,\n updateSelectedPerformerVenues,\n ]\n );\n\n const onPerformerVenueClicked = useCallback(\n (g: CatalogEntity) => {\n // Clicking will toggle the display\n const newSelectedPerformerVenues =\n selectedPerformerVenues.findIndex((sg) => sg.viagId === g.viagId) >= 0\n ? selectedPerformerVenues.filter((sg) => sg.viagId !== g.viagId)\n : [...selectedPerformerVenues, g];\n\n if (\n newSelectedPerformerVenues.length > 0 &&\n !selectedDividerIsVisibleInList\n ) {\n setSelectedDividerButtonShouldBeVisible(true);\n }\n\n updateSelectedPerformerVenues([\n {\n entities: newSelectedPerformerVenues,\n groupingType: groupingQuery.groupingType,\n },\n ]);\n },\n [\n groupingQuery.groupingType,\n selectedDividerIsVisibleInList,\n selectedPerformerVenues,\n updateSelectedPerformerVenues,\n ]\n );\n\n const selectedPerformerVenuesMap = selectedPerformerVenues.reduce<\n Record\n >((result, cur) => {\n result[cur.viagId!] = cur;\n return result;\n }, {});\n\n const getNonEmptyPerformersAndVenues = useCallback(\n (filterZeroCounts?: boolean) => {\n if (!data?.events) {\n return {};\n }\n\n let events = Object.values(data.events);\n const perfs: Record = {};\n const venues: Record = {};\n events = filterZeroCounts\n ? getEventsWithNonZeroCounts(entityType, events, true)\n : events;\n\n events.forEach((ev) => {\n const p = ev.event.perfId\n ? data?.performers[ev.event.perfId]\n : undefined;\n if (p) {\n perfs[ev.event.perfId!] = p;\n }\n const v = data?.venues[ev.event.venueId];\n if (v) {\n venues[ev.event.venueId!] = v;\n }\n });\n\n return { perfs: Object.values(perfs), venues: Object.values(venues) };\n },\n [data, entityType]\n );\n\n const hasCatalogV2Feature = useUserHasFeature(Feature.CatalogCacheStrategyV2);\n\n const filteredData = useMemo(() => {\n const { perfs, venues } =\n getNonEmptyPerformersAndVenues(hasCatalogV2Feature);\n\n return filterPerformerVenues(\n groupingQuery.groupingType === EventGroupingType.Performer\n ? perfs?.length\n ? perfs\n : undefined\n : venues?.length\n ? venues\n : undefined,\n selectedPerformerVenues\n );\n }, [\n filterPerformerVenues,\n getNonEmptyPerformersAndVenues,\n groupingQuery.groupingType,\n hasCatalogV2Feature,\n selectedPerformerVenues,\n ]);\n\n useEffect(() => {\n // Currently we only need to update `selectedPerformerVenues` according to `filterQuery`\n // When:\n // 1. loading from a url that contains non-empty performerIds/venueIds query params\n // 2. filterQuery has been reset\n if (data === undefined) {\n return;\n }\n\n if (!selectedPerformerVenues.length) {\n const newSelectedPerformerVenues: CatalogEntitiesWithGroupingType[] = [];\n if (filterQuery.performerIds?.length) {\n const groupings = Object.values(data?.performers ?? {}) || [];\n const performerGroupings = groupings.filter(\n (mg) => mg.viagId && filterQuery.performerIds?.includes(mg.viagId)\n );\n\n if (groupingQuery.groupingType !== EventGroupingType.Performer) {\n handleFilterChange({\n ...groupingQuery,\n groupingType: EventGroupingType.Performer,\n });\n // Assigning state directly because `updateSelectedPerformerVenues`\n // Needs to use the state immediately\n groupingQuery.groupingType = EventGroupingType.Performer;\n }\n\n newSelectedPerformerVenues.push({\n entities: performerGroupings,\n groupingType: EventGroupingType.Performer,\n });\n }\n\n if (filterQuery.venueIds?.length) {\n const groupings = Object.values(data?.venues ?? {}) || [];\n const venueGroupings = groupings.filter(\n (mg) => mg.viagId && filterQuery.venueIds?.includes(mg.viagId)\n );\n\n if (!filterQuery.performerIds?.length) {\n if (groupingQuery.groupingType !== EventGroupingType.Venue) {\n handleFilterChange({\n ...groupingQuery,\n groupingType: EventGroupingType.Venue,\n });\n }\n }\n\n newSelectedPerformerVenues.push({\n entities: venueGroupings,\n groupingType: EventGroupingType.Venue,\n });\n }\n\n if (newSelectedPerformerVenues.length) {\n updateSelectedPerformerVenues(newSelectedPerformerVenues);\n }\n }\n\n if (!filterQuery.performerIds?.length && !filterQuery.venueIds?.length) {\n updateSelectedPerformerVenues([]);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [filterQuery.performerIds, filterQuery.venueIds, data]);\n\n const isSelected = useCallback(\n (mg: CatalogEntity) => {\n const isSelected = selectedPerformerVenuesMap[mg.viagId!];\n return Boolean(isSelected);\n },\n [selectedPerformerVenuesMap]\n );\n\n const getItemsToDisplay = useCallback((): {\n items: PerformerVenueListingItem[];\n indexOfDivider: number;\n } => {\n const { selected, unselected } = (filteredData || []).reduce(\n ({ selected, unselected }, mg) => {\n if (isSelected(mg)) {\n selected.push(mg);\n } else {\n unselected.push(mg);\n }\n return { unselected, selected };\n },\n { unselected: [], selected: [] } as {\n unselected: CatalogEntity[];\n selected: CatalogEntity[];\n }\n );\n\n const items: PerformerVenueListingItem[] = selected.map((mg) => {\n return { entity: mg, isSelected: true };\n });\n\n let indexOfDivider = -1;\n if (selected.length) {\n indexOfDivider = items.length;\n items.push(selected.length);\n }\n\n unselected.forEach((mg) => {\n items.push({ entity: mg, isSelected: false });\n });\n\n return { items, indexOfDivider };\n }, [filteredData, isSelected]);\n\n const { items, indexOfDivider } = getItemsToDisplay();\n\n const onItemsRenderedHandler = (\n items: ListItem[]\n ) => {\n onItemsRendered?.(\n items\n .filter((i) => i.data != null)\n .map((i) => (typeof i.data === 'number' ? undefined : i.data!.entity))\n .filter((i) => i != null)\n .map((i) => i!),\n groupingQuery.groupingType\n );\n\n if (indexOfDivider >= 0 && items.length) {\n // if there is a divider and the divider is not hidden to the top\n const dividerInView = indexOfDivider >= items[0].index;\n\n if (dividerInView) {\n if (!selectedDividerIsVisibleInList)\n setSelectedDividerIsVisibleInList(true);\n if (selectedDividerButtonShouldBeVisible)\n setSelectedDividerButtonShouldBeVisible(false);\n if (showSelectedList) setShowSelectedList(false);\n } else {\n // divider is out of view\n if (selectedDividerIsVisibleInList)\n setSelectedDividerIsVisibleInList(false);\n if (!selectedDividerButtonShouldBeVisible)\n setSelectedDividerButtonShouldBeVisible(true);\n }\n } else {\n if (selectedDividerIsVisibleInList)\n setSelectedDividerIsVisibleInList(false);\n if (selectedDividerButtonShouldBeVisible)\n setSelectedDividerButtonShouldBeVisible(false);\n if (showSelectedList) setShowSelectedList(false);\n }\n };\n\n const showSelectedPerformerVenuesList = () => {\n setShowSelectedList(!showSelectedList);\n };\n\n const NoMatchingContent = useMemo(() => {\n if (groupingQuery.groupingType === EventGroupingType.Performer) {\n return ;\n }\n return ;\n }, [groupingQuery]);\n\n const activeEditability = useMemo(() => {\n return groupingQuery.groupingType === EventGroupingType.Performer\n ? performerFilterEditability\n : venueFilterEditability;\n }, [\n groupingQuery.groupingType,\n performerFilterEditability,\n venueFilterEditability,\n ]);\n\n return (\n
    \n \n
    \n {isLoading && }\n {errorInfo && (\n }\n />\n )}\n {!isLoading && !errorInfo && (\n
    \n {selectedDividerButtonShouldBeVisible &&\n selectedPerformerVenues.length > 0 && (\n \n \n \n \n )}\n {items?.length > 0 && (\n {\n if (typeof d === 'number') {\n return (\n \n );\n } else {\n return (\n \n );\n }\n }}\n />\n )}\n {items?.length === 0 && (\n \n \n \n }\n >\n \n \n \n \n {NoMatchingContent}\n \n \n )}\n
    \n )}\n
    \n
    \n );\n}\n","import { useCallback, useEffect, useState } from 'react';\nimport {\n IPosEntity,\n useActivePosEntityContext,\n} from 'src/contexts/ActivePosEntityContext';\nimport { useBulkEditHubContext } from 'src/contexts/BulkEditHubContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { usePurchaseDataContext } from 'src/contexts/PurchaseDataContext';\nimport { vars } from 'src/core/themes';\nimport { Button, Popover, Stack } from 'src/core/ui';\nimport { RotatingWrapper } from 'src/core/ui/AnimatingWrapper';\nimport { parseBulkEditMethodName } from 'src/hooks/useBulkEditHub';\nimport { CrossIcon, IconsFill, LoadingIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { BulkEditStep } from 'src/WebApiController';\n\nimport {\n BulkEditStatus,\n BulkEditStatusProps,\n} from '../BulkEditStatus/BulkEditStatus';\nimport {\n ActionOutboxEntityTypeForBulkEdit,\n getTitleForMethod,\n} from '../BulkEditStatus/bulkEditUtils';\nimport * as styles from './BulkEditStatusPopover.css';\n\nexport const BulkEditStatusPopoverContent = ({\n titleContentId,\n ...rest\n}: BulkEditStatusProps & { titleContentId: ContentId }) => {\n return (\n \n \n \n \n );\n};\n\nexport const BulkEditStatusPopover = ({\n entityType,\n}: {\n entityType: ActionOutboxEntityTypeForBulkEdit;\n}) => {\n const [isPopoverOpen, setIsPopoverOpen] = useState(false);\n const [showSpinner, setShowSpinner] = useState(false);\n\n const {\n progress,\n setProgress,\n errors,\n warnings,\n mainDialogOpened,\n setPreview,\n setCurJob,\n ...rest\n } = useBulkEditHubContext();\n\n const isDone =\n progress?.step === BulkEditStep.Done ||\n progress?.step === BulkEditStep.Cancelled;\n\n useEffect(() => {\n if (!showSpinner && !isDone) {\n setShowSpinner(true);\n }\n if (isDone && !isPopoverOpen && !mainDialogOpened) {\n setIsPopoverOpen(true);\n }\n }, [isDone, isPopoverOpen, mainDialogOpened, showSpinner]);\n\n const [isRefreshing, setIsRefreshing] = useState(false);\n const { setActivePosEntity } = useActivePosEntityContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n const { refreshData } = usePurchaseDataContext();\n\n const onRefreshDoneData = useCallback(async () => {\n setIsRefreshing(true);\n setActivePosEntity(0);\n\n // Depending whether it's Listing, Sales, or Purchase\n // the context would be different here\n if (refreshData) {\n await refreshData(true);\n }\n if (refreshExpandedListItems) {\n await refreshExpandedListItems();\n }\n\n setIsRefreshing(false);\n }, [refreshData, refreshExpandedListItems, setActivePosEntity]);\n\n if ((!isPopoverOpen && !showSpinner) || progress == null) {\n return null;\n }\n\n return (\n {\n if (\n open == false && // closing\n progress?.step === BulkEditStep.Done // progress is done\n ) {\n await onRefreshDoneData();\n\n setShowSpinner(false);\n setProgress(undefined);\n setCurJob(undefined);\n }\n\n setIsPopoverOpen(open);\n }}\n >\n \n \n \n \n
    \n \n {\n if (isDone) {\n await onRefreshDoneData();\n\n setShowSpinner(false);\n setProgress(undefined);\n setCurJob(undefined);\n }\n setIsPopoverOpen(false);\n }}\n />\n \n {progress && (\n \n )}\n {isDone && (\n \n {\n setProgress(undefined);\n setPreview(undefined);\n setIsPopoverOpen(false);\n\n await onRefreshDoneData();\n\n setShowSpinner(false);\n setCurJob(undefined);\n }}\n >\n \n \n \n )}\n
    \n
    \n \n );\n};\n","import { useCallback } from 'react';\nimport { SelectAllHotkeys } from 'src/components/common/MultiSelect/Toggle/contants';\nimport { MultiSelectionToggle } from 'src/components/common/MultiSelect/Toggle/MultiSelectionToggle';\nimport {\n MultiSelectScope,\n useMultiSelectionContext,\n} from 'src/contexts/MultiSelectionContext';\nimport { PosHotkeys } from 'src/core/POS/PosHotkeys';\n\nexport const MultiSelectionToggleGlobal = () => {\n const { selectionMode, setSelectionMode } = useMultiSelectionContext();\n\n const onMultiSelectListingClick = useCallback(() => {\n setSelectionMode(\n selectionMode?.mode !== MultiSelectScope.AllGroups\n ? { mode: MultiSelectScope.AllGroups }\n : undefined\n );\n }, [selectionMode, setSelectionMode]);\n\n const isChecked = selectionMode?.mode === MultiSelectScope.AllGroups;\n\n return (\n \n \n \n );\n};\n","import { useMemo } from 'react';\nimport {\n FilterToolbarGroup,\n FilterToolbarItemId,\n} from 'src/components/Filters';\nimport { getAppliedFilters } from 'src/utils/eventQueryUtils';\n\ninterface FiltersHelpersProps {\n filters: FilterToolbarGroup[];\n initialQuery: TQuery;\n activeQuery: TQuery;\n mandatoryFiltersToShow: FilterToolbarItemId[];\n}\n\ninterface UseFiltersHelpers {\n ignoredKeys: FilterToolbarItemId[];\n appliedFilters: FilterToolbarItemId[];\n}\n\nexport const useFiltersHelpers = ({\n filters,\n initialQuery,\n activeQuery,\n}: FiltersHelpersProps): UseFiltersHelpers => {\n /**\n * Gets the filters keys that are not shown in the UI.\n * For example, sortBy\n */\n const ignoredKeys = useMemo(() => {\n const allVisualFiltersIds = filters.flatMap((filterGroup) =>\n filterGroup.items.map((filter) => filter.filterId)\n );\n const allQueryIds = Object.keys(initialQuery) as FilterToolbarItemId[];\n\n return allQueryIds.filter(\n (filterId) => !allVisualFiltersIds.includes(filterId)\n );\n }, [filters, initialQuery]);\n\n const appliedFilters = useMemo(() => {\n return getAppliedFilters(activeQuery, initialQuery, ignoredKeys, filters);\n }, [filters, ignoredKeys, initialQuery, activeQuery]);\n\n return {\n ignoredKeys,\n appliedFilters,\n };\n};\n","import clsx from 'clsx';\nimport endOfDay from 'date-fns/endOfDay';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport {\n DateRange as ReactDateRange,\n DateRangePickerProps,\n} from 'react-date-range';\nimport {\n Content,\n getContent,\n useContent,\n useContentContext,\n} from 'src/contexts/ContentContext';\nimport { useSiteTimezoneContext } from 'src/contexts/SiteTimezoneContext/SiteTimezoneContext';\nimport {\n DateRange,\n DateRangePresets,\n} from 'src/core/POS/DateRangeSelector/DateRangePresets';\nimport { DateRangeRelativePresets } from 'src/core/POS/DateRangeSelector/DateRangePresets/DateRangeRelativePresets';\nimport {\n CustomDateRangeButton,\n DateErrorContainer,\n DateRangePickerContainer,\n DateRangeTrigger,\n DateRangeTriggerContent,\n IconContainer,\n} from 'src/core/POS/DateRangeSelector/DateRangeSelector.styled';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { vars } from 'src/core/themes';\nimport { DividerLine, Popover, Stack, TooltipPopover } from 'src/core/ui';\nimport {\n CalendarIcon,\n CheckIcon,\n CrossIcon,\n ExpandIcon,\n IconsFill,\n WarningOutlineIcon,\n} from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { EVENT_TIME_FRAME_FILTER_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport {\n formatDate,\n getEventTimeFrameFromDateTimeRange,\n NextDateRangePresetNames,\n PastDateRangePresetNames,\n tryGetDateRangePresetSuggestionText,\n tryGetDateRangeRelativePresetSuggestionText,\n validateDate,\n} from 'src/utils/dateTimeUtils';\nimport { getLocaleFromLanguageOrCurrent } from 'src/utils/localeUtils';\nimport {\n DateTimeRangeWithRelative,\n EventTimeFrameFilter,\n} from 'src/WebApiController';\n\nimport * as styles from './EventDateSelector.css';\n\nexport type EventDateSelectorProps = {\n disabled?: boolean;\n eventTimeFrame?: EventTimeFrameFilter | null;\n value?: DateTimeRangeWithRelative | null;\n onChange?: (\n timeFrame?: EventTimeFrameFilter | null,\n value?: DateTimeRangeWithRelative | null\n ) => void;\n useRelativePresets?: boolean;\n /**\n * If true, the site's timezone will be applied to the date being displayed.\n * the underlying date value (value, data, onDateChange) will not be changed.\n */\n useSiteTimeZone?: boolean;\n timeFrameLabelRecord?: Record;\n allEventsLabel?: ContentId;\n} & Omit;\n\nexport const EventDateSelector = ({\n eventTimeFrame,\n value,\n startDatePlaceholder,\n endDatePlaceholder,\n className,\n dateDisplayFormat = 'MM/dd/yyyy',\n retainEndDateOnFirstSelection = true,\n rangeColors = [vars.color.backgroundHighlight],\n locale = getLocaleFromLanguageOrCurrent(),\n onChange,\n disabled,\n useRelativePresets,\n useSiteTimeZone = true,\n onPreviewChange,\n timeFrameLabelRecord = EVENT_TIME_FRAME_FILTER_TO_CID,\n allEventsLabel = ContentId.AllEvents,\n}: EventDateSelectorProps) => {\n const { toZonedTime, fromZonedTime } = useSiteTimezoneContext();\n const contentContext = useContentContext();\n\n const currentLocale = getLocaleFromLanguageOrCurrent();\n const [showDatePicker, setShowDatePicker] = useState(false);\n const [isOpen, setIsOpen] = useState(false);\n const [dateValue, setDateValue] = useState({\n start: formatDate(value?.start || '', currentLocale.code),\n end: formatDate(value?.end || '', currentLocale.code),\n });\n const [dateErrors, setDateErrors] = useState([]);\n\n const defaultDateRangeDisplayText = useContent(\n ContentId.DateRangeDisplayText\n );\n const defaultFromlabel = useContent(ContentId.FromDate);\n const defaultToLabel = useContent(ContentId.ToDate);\n const endDateBeforeStartDate = useContent(ContentId.EndDateBeforeStartDate);\n const invalidEndDate = useContent(ContentId.InvalidEndDate);\n const invalidStartDate = useContent(ContentId.InvalidStartDate);\n const dateErrorConfig = useMemo(\n () => ({\n endDateBeforeStartDate,\n invalidEndDate,\n invalidStartDate,\n }),\n [endDateBeforeStartDate, invalidEndDate, invalidStartDate]\n );\n\n const highlightDropBox = !(\n value?.start == null &&\n value?.end == null &&\n value?.relativeStartSecs == null &&\n value?.relativeEndSecs == null\n );\n\n const getDisplayText = useCallback(() => {\n if (\n !value?.start &&\n !value?.end &&\n value?.relativeStartSecs == null &&\n value?.relativeEndSecs == null\n ) {\n return eventTimeFrame == null\n ? getContent(allEventsLabel, contentContext)\n : getContent(timeFrameLabelRecord[eventTimeFrame], contentContext);\n }\n\n const suggestionText = tryGetDateRangePresetSuggestionText(\n value,\n useSiteTimeZone ? toZonedTime : undefined\n );\n\n if (suggestionText) {\n return suggestionText;\n }\n\n const suggestionTextRelative =\n tryGetDateRangeRelativePresetSuggestionText(value);\n\n if (suggestionTextRelative) {\n return suggestionTextRelative;\n }\n\n const { end, start } = dateValue;\n if (value && start) {\n if (useSiteTimeZone && value.start && value.end) {\n const startZoned = formatDate(\n toZonedTime(new Date(value.start)).toISOString(),\n currentLocale.code\n );\n const endZoned = formatDate(\n toZonedTime(new Date(value.end)).toISOString(),\n currentLocale.code\n );\n\n return `${startZoned} - ${endZoned}`;\n }\n return `${start} - ${end}`;\n }\n\n return defaultDateRangeDisplayText;\n }, [\n allEventsLabel,\n contentContext,\n currentLocale.code,\n dateValue,\n defaultDateRangeDisplayText,\n eventTimeFrame,\n timeFrameLabelRecord,\n toZonedTime,\n useSiteTimeZone,\n value,\n ]);\n\n const onDateRangePickerChange = useCallback(\n (\n from: Date | undefined,\n to: Date | undefined,\n timeFrame?: EventTimeFrameFilter | null\n ) => {\n if (!from && !to) {\n onChange?.(EventTimeFrameFilter.Future, null);\n setDateValue({\n start: formatDate('', currentLocale.code),\n end: formatDate('', currentLocale.code),\n });\n }\n\n timeFrame = timeFrame ?? getEventTimeFrameFromDateTimeRange(from, to);\n const newValue: DateTimeRangeWithRelative = value\n ? { ...value }\n : {\n start: null,\n end: null,\n relativeStartSecs: null,\n relativeEndSecs: null,\n roundingMode: null,\n };\n\n if (from == null) {\n newValue.start = null;\n } else {\n newValue.start = from.toISOString();\n }\n if (to == null) {\n newValue.end = null;\n } else {\n newValue.end = to.toISOString();\n }\n\n newValue.relativeStartSecs = null;\n newValue.relativeEndSecs = null;\n\n onChange?.(timeFrame, newValue);\n setDateValue({\n start: formatDate(newValue.start || '', currentLocale.code),\n end: formatDate(newValue.end || '', currentLocale.code),\n });\n },\n [currentLocale.code, onChange, value]\n );\n\n const onEventTimeFrameChanged = useCallback(\n (timeFrame?: EventTimeFrameFilter | null) => {\n onChange?.(timeFrame, null);\n setDateValue({\n start: formatDate('', currentLocale.code),\n end: formatDate('', currentLocale.code),\n });\n },\n [currentLocale.code, onChange]\n );\n\n const onClear = useCallback(() => {\n onDateRangePickerChange(undefined, undefined);\n }, [onDateRangePickerChange]);\n\n const onSuggestionClick = useCallback(\n (range: DateRange, timeRange: EventTimeFrameFilter) => {\n // All the available time-frames are in the past\n onDateRangePickerChange(range.from, range.to, timeRange);\n setIsOpen(false);\n },\n [onDateRangePickerChange]\n );\n\n const onSuggestionRelativeClick = useCallback(\n (range: DateTimeRangeWithRelative) => {\n onChange?.(null, range);\n setDateValue({\n start: formatDate('', currentLocale.code),\n end: formatDate('', currentLocale.code),\n });\n setIsOpen(false);\n },\n [currentLocale.code, onChange]\n );\n\n useEffect(() => {\n const dateErrors = validateDate(dateValue, currentLocale, dateErrorConfig);\n setDateErrors(dateErrors);\n }, [dateValue, dateErrorConfig, currentLocale]);\n\n const isCustomDateRangeSelected = !value?.start || !value?.end;\n\n return (\n {\n setIsOpen(isOpen);\n if (!isOpen) {\n setShowDatePicker(false);\n }\n }}\n >\n \n \n \n
    {getDisplayText()}
    \n
    \n {!disabled &&\n (!!dateValue.start || !!value) &&\n highlightDropBox && (\n \n \n \n )}\n \n
    \n \n
    \n
    \n \n \n onEventTimeFrameChanged(EventTimeFrameFilter.Future)}\n >\n \n {eventTimeFrame === EventTimeFrameFilter.Future &&\n isCustomDateRangeSelected && (\n \n )}\n \n {useRelativePresets ? (\n \n ) : (\n onSuggestionClick(r, EventTimeFrameFilter.Future)}\n selectedDateRange={value}\n hideSuggestionTitle\n useSiteTimeZone={useSiteTimeZone}\n />\n )}\n {useRelativePresets ? (\n \n ) : (\n onSuggestionClick(r, EventTimeFrameFilter.Past)}\n selectedDateRange={value}\n hideSuggestionTitle\n />\n )}\n onEventTimeFrameChanged(EventTimeFrameFilter.Past)}\n >\n \n \n \n }\n >\n \n \n \n {eventTimeFrame === EventTimeFrameFilter.Past &&\n isCustomDateRangeSelected && (\n \n )}\n \n onEventTimeFrameChanged(null)}\n >\n \n \n \n }\n >\n \n \n \n {eventTimeFrame == null &&\n value?.relativeEndSecs == null &&\n value?.relativeStartSecs == null &&\n isCustomDateRangeSelected && (\n \n )}\n \n
    \n \n
    \n setShowDatePicker((val) => !val)}\n >\n
    \n \n
    {' '}\n \n \n {showDatePicker && (\n <>\n
    \n \n {dateErrors.map((err) => (\n
  • {err}
  • \n ))}\n
    \n {\n const startDate =\n range.range.startDate && useSiteTimeZone\n ? fromZonedTime(range.range.startDate)\n : range.range.startDate;\n const endDate = range.range.endDate\n ? useSiteTimeZone\n ? fromZonedTime(endOfDay(range.range.endDate))\n : endOfDay(range.range.endDate)\n : undefined;\n onDateRangePickerChange(startDate, endDate);\n }}\n rangeColors={rangeColors}\n locale={locale}\n />\n \n )}\n \n \n \n );\n};\n","import { isEqual } from 'lodash-es';\nimport { useMemo } from 'react';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { OnSaleEventQuery } from 'src/WebApiController';\n\nimport { EventDateSelector } from '../Events/EventDateSelector/EventDateSelector';\nimport { FilterToolbarGroup, FilterToolbarItemId } from '../Filters';\n\nexport const listingsMandatoryFiltersToShow: FilterToolbarItemId[] = [\n 'eventDates',\n];\n\nexport function useDiscoveryFilters() {\n const { tempQuery, setTempQuery } = useFilterQueryContext();\n\n const eventFilter = useMemo(\n () => ({\n titleContentId: ContentId.Events,\n type: 'row',\n items: [\n {\n labelContentId: ContentId.OnSaleDate,\n filterId: 'onSaleDates',\n filterQueryKeys: ['onSaleDates'],\n filterItem: (\n {\n if (!isEqual(dateRange, tempQuery.onSaleDates)) {\n setTempQuery({\n ...tempQuery,\n onSaleDates: dateRange ?? null,\n });\n }\n }}\n />\n ),\n },\n ],\n }),\n [tempQuery, setTempQuery]\n );\n\n const filters = useMemo(\n () => [eventFilter].filter((f) => f).map((f) => f!),\n [eventFilter]\n );\n\n return { filters };\n}\n","import { arrayMove } from '@dnd-kit/sortable';\nimport { castDraft, produce } from 'immer';\nimport { isEmpty, isEqual } from 'lodash-es';\nimport { nanoid } from 'nanoid';\nimport { ReactNode, useCallback, useMemo } from 'react';\nimport { useSearchParams } from 'react-router-dom';\nimport { FilterToolbarProps } from 'src/components/FilterToolbar';\nimport {\n CustomQuickFilterOfListingQuery,\n CustomQuickFilterOfMarketplacePaymentQuery,\n CustomQuickFilterOfOnSaleEventQuery,\n CustomQuickFilterOfPurchaseOrderQuery,\n CustomQuickFilterOfSaleQuery,\n UserSetting,\n} from 'src/WebApiController';\n\nimport { useServerUserSetting, UseUserSettingHook } from './useUserSetting';\n\ntype QuickFiltersState = {\n [id: string]: {\n /**\n * Whether to hide the filter in the quick filter bar.\n */\n isHidden?: boolean;\n order?: number;\n };\n};\n\n/**\n * Map quick filter settings to their data types.\n *\n * Add to this type if new settings are added.\n */\ntype CustomQuickFilterMap = {\n [UserSetting.QuickFiltersCustomInventory]: CustomQuickFilterOfListingQuery;\n [UserSetting.QuickFiltersCustomSales]: CustomQuickFilterOfSaleQuery;\n [UserSetting.QuickFiltersCustomPurchases]: CustomQuickFilterOfPurchaseOrderQuery;\n [UserSetting.QuickFiltersCustomMarketplacePayments]: CustomQuickFilterOfMarketplacePaymentQuery;\n [UserSetting.QuickFiltersCustomOnSaleEvent]: CustomQuickFilterOfOnSaleEventQuery;\n};\n\ntype CustomQuickFilterUserSetting = keyof CustomQuickFilterMap;\n\ntype CustomQuickFilterData =\n CustomQuickFilterMap[S]['data'];\n\n// TODO add test to confirm that the server types are assignable to this\ntype CustomQuickFilter = {\n // This should always match `schemaVersion` from server\n schemaVersion: '2';\n id: string;\n name: string;\n data: D;\n};\n\nexport type DefaultQuickFilter = Omit<\n CustomQuickFilter,\n 'schemaVersion' | 'name'\n> & {\n name: ReactNode;\n};\n\n/**\n * `QuickFilter` augmented with extra fields. This is the type that is returned from the\n * `useQuickFilters` hook.\n */\nexport type ProcessedQuickFilter = (\n | DefaultQuickFilter\n | Omit, 'schemaVersion'>\n) & {\n isCustomFilter: boolean;\n isHidden: boolean;\n};\n\n/**\n * Helper type for consumers of this hook to use for typing default quick filters more easily.\n *\n * Do not use this within the `useQuickFilters` hook.\n */\nexport type QuickFilter = Omit<\n CustomQuickFilterMap[S],\n 'schemaVersion' | 'name'\n> & {\n name: ReactNode;\n};\n\n// Remove eventIds from quick filters\nconst cleanCustomFilters = (\n data: CustomQuickFilterData\n): CustomQuickFilterData => {\n if ('eventIds' in data) {\n return {\n ...data,\n eventIds: null,\n };\n }\n if ('eventDates' in data && !('eventTimeFrameFilter' in data)) {\n // if the filter has eventDates but not eventTimeFrameFilter, we need to add eventTimeFrameFilter=null\n return {\n ...data,\n eventTimeFrameFilter: null,\n };\n }\n\n return data;\n};\n\nexport type UseQuickFiltersOptions<\n S extends CustomQuickFilterUserSetting,\n D = CustomQuickFilterData,\n> = {\n /**\n * Id used to store quick filter state.\n *\n * This will be in the form `UserSetting.QuickFiltersState`.\n *\n * eg. `UserSetting.QuickFiltersStateInventory`\n *\n * **NOTE**: This id cannot be changed or else saved user data for the page will be lost.\n */\n quickFiltersStateSetting:\n | UserSetting.QuickFiltersStateOnSaleEvent\n | UserSetting.QuickFiltersStateInventory\n | UserSetting.QuickFiltersStateSales\n | UserSetting.QuickFiltersStatePurchases\n | UserSetting.QuickFiltersStateMarketplacePayments;\n /**\n * Id used to store custom quick filters.\n *\n * This will be in the form `UserSetting.QuickFiltersCustom`.\n *\n * eg. `UserSetting.QuickFiltersCustomInventory`\n *\n * **NOTE**: This id cannot be changed or else saved user data for the page will be lost.\n */\n customQuickFiltersSetting: S;\n /**\n * Array of default quick filters that cannot be deleted.\n */\n defaultQuickFilters: DefaultQuickFilter[];\n useUserSetting?: UseUserSettingHook;\n};\n\n/**\n * Hook to help with implementing quick filters.\n * @param options\n * @returns\n */\nexport function useQuickFilters<\n S extends CustomQuickFilterUserSetting,\n D = CustomQuickFilterData,\n>({\n quickFiltersStateSetting,\n customQuickFiltersSetting,\n defaultQuickFilters,\n useUserSetting = useServerUserSetting,\n}: UseQuickFiltersOptions) {\n const defaultQuickFiltersState = useMemo(() => ({}), []);\n const {\n value: quickFiltersState = defaultQuickFiltersState,\n setUserSetting: setQuickFiltersState,\n } = useUserSetting({ id: quickFiltersStateSetting });\n\n const defaultCustomQuickFilters = useMemo[]>(\n () => [],\n []\n );\n const {\n value: _customQuickFilters = defaultCustomQuickFilters,\n setUserSetting: setCustomQuickFilters,\n } = useUserSetting[]>({\n id: customQuickFiltersSetting,\n });\n const customQuickFilters = _customQuickFilters.filter((filter) => {\n // XXX POS-1317 skip filters from the old version\n return filter.schemaVersion === '2';\n });\n\n const quickFilters = useMemo[]>(() => {\n const processFilter = (\n isCustomFilter: boolean,\n { id, name, data }: DefaultQuickFilter | CustomQuickFilter\n ): ProcessedQuickFilter => {\n return {\n id,\n name,\n isCustomFilter,\n isHidden: quickFiltersState[id]?.isHidden ?? false,\n data: cleanCustomFilters(data as CustomQuickFilterData) as D,\n };\n };\n\n // merge default and custom quick filters\n const filterSortKeys: {\n order: number;\n originalIndex: number;\n id: string;\n }[] = [];\n const filterMap: { [id: string]: ProcessedQuickFilter } = {};\n defaultQuickFilters.forEach((filter, i) => {\n filterMap[filter.id] = processFilter(false, filter);\n filterSortKeys.push({\n // we default to negative infinity because we want default quick filters to show at the\n // beginning if it has no order set\n order: quickFiltersState[filter.id]?.order ?? Number.NEGATIVE_INFINITY,\n originalIndex: i,\n id: filter.id,\n });\n });\n customQuickFilters.forEach((filter, i) => {\n filterMap[filter.id] = processFilter(true, filter);\n filterSortKeys.push({\n // we default to positive infinity because we want default quick filters to show at the\n // end if it has no order set\n order: quickFiltersState[filter.id]?.order ?? Number.POSITIVE_INFINITY,\n originalIndex: i,\n id: filter.id,\n });\n });\n\n return filterSortKeys\n .toSorted((a, b) => {\n if (a.order === b.order) {\n return a.originalIndex - b.originalIndex;\n }\n return a.order - b.order;\n })\n .map(({ id }) => filterMap[id]);\n }, [quickFiltersState, defaultQuickFilters, customQuickFilters]);\n\n type CustomQuickFilterInput = Omit<\n CustomQuickFilter,\n 'schemaVersion' | 'id'\n >;\n return {\n quickFilters,\n /**\n * Show or hide quick filter within the toolbar.\n * @param id\n * @param isShown\n */\n toggleQuickFilter: (id: string, isShown: boolean) => {\n const newState = produce(quickFiltersState, (draftState) => {\n if (!draftState[id]) {\n draftState[id] = {};\n }\n if (isShown) {\n delete draftState[id].isHidden;\n if (isEmpty(draftState[id])) {\n delete draftState[id];\n }\n } else {\n draftState[id].isHidden = true;\n }\n });\n\n setQuickFiltersState(newState);\n },\n /**\n * @param id The id of the quick filter that was moved.\n * @param overId The id of the quick filter that the moved quick filter should be placed into\n * the location of.\n */\n moveQuickFilter: (id: string, overId: string) => {\n if (id === overId) {\n return;\n }\n\n const ids = quickFilters.map(({ id }) => id);\n const oldIndex = ids.indexOf(id);\n const newIndex = ids.indexOf(overId);\n const movedIds = arrayMove(ids, oldIndex, newIndex);\n const newState = produce(quickFiltersState, (draftState) => {\n movedIds.forEach((id, i) => {\n if (!draftState[id]) {\n draftState[id] = {};\n }\n draftState[id].order = i;\n });\n });\n\n setQuickFiltersState(newState);\n },\n createCustomQuickFilter: ({ name, data }: CustomQuickFilterInput) => {\n const cleanData = cleanCustomFilters(\n data as CustomQuickFilterData\n ) as D;\n\n setCustomQuickFilters(\n produce(customQuickFilters, (draftState) => {\n draftState.push(\n castDraft({\n schemaVersion: '2',\n id: nanoid(),\n name,\n data: cleanData,\n })\n );\n })\n );\n },\n deleteCustomQuickFilter: (id: string) => {\n setCustomQuickFilters(\n customQuickFilters.filter((filter) => filter.id !== id)\n );\n },\n updateCustomQuickFilter: (\n id: string,\n updatedFilter: Partial\n ) => {\n setCustomQuickFilters(\n produce(customQuickFilters, (draftState) => {\n const idx = draftState.findIndex((filter) => filter.id === id);\n if (idx !== -1) {\n if (updatedFilter.name != null) {\n draftState[idx].name = updatedFilter.name;\n }\n if (updatedFilter.data != null) {\n draftState[idx].data = castDraft(updatedFilter.data);\n }\n }\n })\n );\n },\n };\n}\n\nconst QUICK_FILTER_SEARCH_PARAM_KEY = 'quickFilterId';\n\nexport function useQuickFilterSearchParam() {\n const [searchParams] = useSearchParams();\n return searchParams.get(QUICK_FILTER_SEARCH_PARAM_KEY);\n}\n\nexport type UseFilterToolbarQuickFiltersOptions<\n S extends CustomQuickFilterUserSetting,\n TQuery = CustomQuickFilterData,\n> = UseQuickFiltersOptions & {\n currentQuery: TQuery;\n initialQuery: TQuery;\n onSelect: ({ id, query }: { id: string; query: TQuery }) => void;\n};\n\nexport type UseFilterToolbarQuickFiltersReturn = Pick<\n FilterToolbarProps,\n | 'quickFilters'\n | 'isAllSelected'\n | 'onResetAll'\n | 'onToggleQuickFilter'\n | 'onMoveQuickFilter'\n | 'onCreateCustomQuickFilter'\n | 'onDeleteCustomQuickFilter'\n | 'onUpdateCustomQuickFilter'\n>;\n\n/**\n * Hook specifically for use with `FilterToolbar`.\n * @param param0\n * @param param1\n * @returns\n */\nexport function useFilterToolbarQuickFilters<\n S extends CustomQuickFilterUserSetting,\n TQuery = CustomQuickFilterData,\n>({\n currentQuery,\n initialQuery,\n onSelect,\n ...useQuickFiltersOptions\n}: UseFilterToolbarQuickFiltersOptions<\n S,\n TQuery\n>): UseFilterToolbarQuickFiltersReturn {\n const [searchParams, setSearchParams] = useSearchParams();\n const selectedQuickFilterId = searchParams.get(QUICK_FILTER_SEARCH_PARAM_KEY);\n\n const setQuickFilterParam = useCallback(\n (id: string) => {\n setSearchParams((params) => {\n params.set(QUICK_FILTER_SEARCH_PARAM_KEY, id);\n return params;\n });\n },\n [setSearchParams]\n );\n const resetQuickFilterParam = useCallback(() => {\n setSearchParams((params) => {\n params.delete(QUICK_FILTER_SEARCH_PARAM_KEY);\n return params;\n });\n }, [setSearchParams]);\n\n const {\n quickFilters,\n toggleQuickFilter,\n moveQuickFilter,\n createCustomQuickFilter,\n deleteCustomQuickFilter,\n updateCustomQuickFilter,\n } = useQuickFilters(useQuickFiltersOptions);\n const finalQuickFilters = useMemo(() => {\n return quickFilters.map(\n ({ id, name, isCustomFilter, isHidden, data: query }) => {\n return {\n id,\n name,\n isCustomFilter,\n isHidden,\n isSelected: selectedQuickFilterId === id,\n onClick: () => {\n setQuickFilterParam(id);\n onSelect?.({ id, query });\n },\n };\n }\n );\n }, [quickFilters, selectedQuickFilterId, onSelect, setQuickFilterParam]);\n\n return {\n quickFilters: finalQuickFilters,\n isAllSelected:\n selectedQuickFilterId == null && isEqual(currentQuery, initialQuery),\n onToggleQuickFilter: toggleQuickFilter,\n onMoveQuickFilter: moveQuickFilter,\n onCreateCustomQuickFilter: ({ name }) => {\n createCustomQuickFilter({ name, data: currentQuery });\n },\n onDeleteCustomQuickFilter: deleteCustomQuickFilter,\n onUpdateCustomQuickFilter: updateCustomQuickFilter,\n onResetAll: () => {\n resetQuickFilterParam();\n onSelect?.({ id: 'all', query: initialQuery });\n },\n };\n}\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const MetricViewIcon = (props: PosIconProps) => {\n return (\n \n \n \n \n \n \n \n \n );\n};\n","import { Dispatch, SetStateAction } from 'react';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { PosSearchBox } from 'src/core/POS/PosSearchBox';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nexport const EventEntitySearchBox = ({\n onIdLookup,\n onEventSearch,\n minWidth = 250,\n maxWidth,\n disabled,\n searchText,\n setSearchText,\n clearSearchEntity,\n placeholderContentId = ContentId.SearchEventOrLookupId,\n disableSearchMode,\n}: {\n onIdLookup: (id: string) => void;\n onEventSearch: (searchText: string) => void;\n minWidth?: number | string;\n maxWidth?: number | string;\n disabled?: boolean;\n searchText: string;\n setSearchText: Dispatch>;\n clearSearchEntity?: () => void;\n placeholderContentId?: ContentId;\n disableSearchMode?: boolean;\n}) => {\n const searchPlaceholder = useContent(placeholderContentId);\n return (\n {\n setSearchText(searchText);\n\n if (!searchText && clearSearchEntity) {\n clearSearchEntity();\n } else if (!disableSearchMode) {\n onEventSearch(searchText);\n }\n }}\n onEnterKeyPressed={(curValue) => {\n onIdLookup(curValue);\n\n // If user press enter - they're interested in look-up, not text-search, so clear the search\n // tex so the tables doesn't get empty while the modal opens\n // But only if it's a single-id lookup, if multiple, we keep the search filter because\n // the table needs to display the result set\n if (!curValue.includes(',')) {\n onEventSearch('');\n }\n }}\n />\n );\n};\n","import { debounce, noop } from 'lodash-es';\nimport { useCallback, useEffect, useState } from 'react';\nimport { EventEntitySearchBox } from 'src/components/Accordions/EventEntitySearchBox';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { OnSaleEventQuery } from 'src/WebApiController';\n\nexport function OnSaleEventSearchBox() {\n const [searchText, setSearchText] = useState('');\n\n const {\n filterQuery: onSaleEventQuery,\n tempQuery,\n setFilterQuery,\n } = useFilterQueryContext();\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const debouncedOnSearchChange = useCallback(\n debounce((text: string) => {\n if (text !== onSaleEventQuery.searchText) {\n setFilterQuery({\n ...onSaleEventQuery,\n searchText: text || null,\n });\n }\n }, 200),\n [onSaleEventQuery]\n );\n\n const clearSearchEntity = useCallback(() => {\n const newQuery = {\n ...tempQuery,\n searchText: null,\n };\n setFilterQuery(newQuery);\n }, [tempQuery, setFilterQuery]);\n\n useEffect(() => {\n setSearchText(onSaleEventQuery.searchText ?? '');\n }, [onSaleEventQuery.searchText]);\n\n return (\n debouncedOnSearchChange(value)}\n searchText={searchText}\n setSearchText={setSearchText}\n clearSearchEntity={clearSearchEntity}\n />\n );\n}\n","import { useMemo } from 'react';\nimport { FormatContent } from 'src/contexts/ContentContext';\nimport { QuickFilter } from 'src/hooks/useQuickFilters';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { getNextDateRange } from 'src/utils/dateTimeUtils';\nimport {\n DateTimeRangeWithRelative,\n OnSaleEventQuery,\n OnSaleEventViewMode,\n UserSetting,\n} from 'src/WebApiController';\n\nexport const useDefaultOnSaleEventFilter = ({\n initialQuery,\n}: {\n initialQuery: OnSaleEventQuery;\n}) => {\n const defaultQuickFilters = useMemo(() => {\n const next7DaysRange = getNextDateRange({ days: 7 }, new Date());\n const next30DaysRange = getNextDateRange({ days: 30 }, new Date());\n const filters: QuickFilter[] = [\n {\n id: 'in7Days',\n name: ,\n data: {\n ...initialQuery,\n viewMode: OnSaleEventViewMode.MetricView,\n onSaleDates: {\n start: next7DaysRange.start.toISOString(),\n end: next7DaysRange.end.toISOString(),\n } as DateTimeRangeWithRelative,\n },\n },\n {\n id: 'in30Days',\n name: ,\n data: {\n ...initialQuery,\n viewMode: OnSaleEventViewMode.MetricView,\n onSaleDates: {\n start: next30DaysRange.start.toISOString(),\n end: next30DaysRange.end.toISOString(),\n } as DateTimeRangeWithRelative,\n },\n },\n ];\n return filters;\n }, [initialQuery]);\n\n return defaultQuickFilters;\n};\n","import { ReactNode, useEffect } from 'react';\nimport { FilterToolbar } from 'src/components/FilterToolbar';\nimport { useFiltersHelpers } from 'src/components/FilterToolbar/useFiltersHelpers';\nimport { ViewModeSelector } from 'src/components/MainFilterBar';\nimport { useDiscoveryFilters } from 'src/components/MainFilterBar/useDiscoveryFilters';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { useFilterToolbarQuickFilters } from 'src/hooks/useQuickFilters';\nimport { MetricViewIcon } from 'src/svgs/MetricViewIcon';\nimport { IconsFill } from 'src/svgs/Viagogo';\nimport { ON_SALE_EVENT_VIEW_MODE_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport {\n OnSaleEventQuery,\n OnSaleEventViewMode,\n UserSetting,\n} from 'src/WebApiController';\n\nimport * as styles from '../../MainFilterBar/MainFilterBar.css';\nimport { OnSaleEventSearchBox } from '../OnSaleEventSearchBox';\nimport { useDefaultOnSaleEventFilter } from './hooks/useDefaultOnSaleEventFilter';\n\nexport const DISCOVERY_VIEW_MODE_TO_ICON: Record = {\n [OnSaleEventViewMode.MetricView]: (\n \n ),\n};\n\nexport function OnSaleEventFilterBar() {\n const isMobile = useMatchMedia('mobile');\n const { filters } = useDiscoveryFilters();\n\n const {\n filterQuery: onSaleEventQuery,\n initialQuery,\n tempQuery,\n setFilterQuery,\n setTempQuery,\n resetTempQuery,\n } = useFilterQueryContext();\n\n const defaultQuickFilters = useDefaultOnSaleEventFilter({\n initialQuery,\n });\n\n useEffect(() => {\n setTempQuery(onSaleEventQuery);\n }, [onSaleEventQuery, setTempQuery]);\n\n const filterToolbarProps = useFilterToolbarQuickFilters({\n quickFiltersStateSetting: UserSetting.QuickFiltersStateOnSaleEvent,\n customQuickFiltersSetting: UserSetting.QuickFiltersCustomOnSaleEvent,\n defaultQuickFilters,\n currentQuery: onSaleEventQuery,\n initialQuery,\n onSelect: ({ query }) => {\n setFilterQuery(query);\n },\n });\n\n const { appliedFilters } = useFiltersHelpers({\n filters,\n activeQuery: onSaleEventQuery,\n mandatoryFiltersToShow: ['onSaleDates'],\n initialQuery,\n });\n\n const filterToolbar = onSaleEventQuery && (\n setFilterQuery(tempQuery)}\n filters={filters}\n resetTempQuery={resetTempQuery}\n tempQuery={tempQuery}\n showCustomFilterButton={false}\n alwaysShowAllFilters={false}\n />\n );\n\n return (\n
    \n {isMobile ? (\n filterToolbar\n ) : (\n <>\n
    \n
    {filterToolbar}
    \n
    \n
    \n
    \n \n {/* */}\n \n
    \n
    \n \n )}\n
    \n );\n}\n","import { Fragment } from 'react';\nimport {\n FilterToolbarGroup,\n FilterToolbarItemId,\n} from 'src/components/Filters';\nimport {\n EventTagInfoFilter,\n TagInfoFilter,\n useEventTagFilters,\n useTagFilters,\n} from 'src/components/MainFilterBar';\nimport { Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ActionOutboxEntityType } from 'src/WebApiController';\n\nexport type MergedTagFilters = TagInfoFilter & EventTagInfoFilter;\n\ninterface UseMergedTagFiltersProps {\n query: TFilter;\n setQuery: (query: TFilter) => void;\n entityType:\n | ActionOutboxEntityType.Listing\n | ActionOutboxEntityType.Purchase\n | ActionOutboxEntityType.Sale;\n includeEventTags?: boolean;\n}\n\nexport const useMergedTagFilters = ({\n query,\n setQuery,\n entityType,\n includeEventTags = true,\n}: UseMergedTagFiltersProps): FilterToolbarGroup[] => {\n const tagFilters = useTagFilters(query, setQuery, entityType);\n const eventTagFilters = useEventTagFilters(query, setQuery);\n\n const tagsFilterGroup: FilterToolbarGroup = {\n titleContentId: ContentId.Tags,\n type: 'row',\n items: [\n // tags\n {\n filterId: 'tagName' as const,\n labelContentId: tagFilters.titleContentId!,\n filterQueryKeys: tagFilters.items\n .map((filterToolbarItem) => filterToolbarItem.filterQueryKeys)\n .flat() as FilterToolbarItemId[],\n filterItem: (\n \n {tagFilters.items.map((filterToolbarItem) => (\n \n {filterToolbarItem.filterItem}\n \n ))}\n \n ),\n },\n ],\n };\n\n if (includeEventTags) {\n tagsFilterGroup.items.push(\n // event tags\n {\n filterId: 'eventTagName' as const,\n labelContentId: eventTagFilters.titleContentId!,\n filterQueryKeys: eventTagFilters.items\n .map((filterToolbarItem) => filterToolbarItem.filterQueryKeys)\n .flat() as FilterToolbarItemId[],\n filterItem: (\n \n {eventTagFilters.items.map((filterToolbarItem) => (\n \n {filterToolbarItem.filterItem}\n \n ))}\n \n ),\n }\n );\n }\n\n return [tagsFilterGroup];\n};\n","import {\n Dispatch,\n SetStateAction,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport { usePurchaseVendorAccountSelector } from 'src/components/Selectors/PurchaseVendorAccountSelector/usePurchaseVendorAccountSelector';\nimport { usePurchaseVendorSelector } from 'src/components/Selectors/PurchaseVendorSelector/usePurchaseVendorSelector';\nimport { PosMultiSelectProps } from 'src/core/POS/PosMultiSelect';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { PurchaseVendor, PurchaseVendorAccount } from 'src/WebApiController';\n\ninterface AccountSelectorOptions {\n disabled: boolean;\n multiSelectOptions: PosMultiSelectProps['valueOptionsContent'];\n purchaseVendorAccountsByVendorIds: Record;\n availableVendorAccounts: Record;\n onSearchTextChange?: Dispatch>;\n isFetchingNextPage: boolean;\n hasNextPage: boolean;\n fetchNextPage: () => void;\n}\n\nexport const useStandalonePurchaseVendorAccountSelector = ({\n vendorAccountIds,\n}: {\n vendorAccountIds?: string[];\n}): AccountSelectorOptions => {\n const [purchaseVendorAccountsMap, setPurchaseVendorAccountsMap] = useState<\n Record\n >({});\n const { query: purchaseVendorQuery, availableVendors } =\n usePurchaseVendorSelector({});\n\n const [searchText, setSearchText] = useState(undefined);\n const vendorIds = useMemo(() => {\n let vendorIds: number[] = [];\n if (purchaseVendorQuery && !purchaseVendorQuery.isFetching) {\n if (purchaseVendorQuery.data?.length) {\n vendorIds = (purchaseVendorQuery.data ?? []).map(\n (vendor: PurchaseVendor) => vendor.id\n );\n }\n }\n return vendorIds;\n }, [purchaseVendorQuery]);\n\n const noVendorIds = !vendorIds.length;\n\n const onPurchaseVendorAccountsListChange = useCallback(\n (purchaseVendorAccounts: PurchaseVendorAccount[]) => {\n const pvaMap: Record = {};\n purchaseVendorAccounts\n .filter((pva) => availableVendors[pva.vendorId])\n .forEach((purchaseVendorAccount) => {\n const email =\n purchaseVendorAccount.email || purchaseVendorAccount.name;\n if (!email) {\n return;\n }\n const purchaseVendorAccountsList = pvaMap[email] ?? [];\n purchaseVendorAccountsList.push(purchaseVendorAccount);\n pvaMap[email] = purchaseVendorAccountsList;\n });\n setPurchaseVendorAccountsMap(pvaMap);\n },\n [availableVendors]\n );\n\n const multiSelectOptions = useMemo(() => {\n return Object.keys(purchaseVendorAccountsMap).reduce<\n Record\n >((map, email) => {\n map[email] = email;\n return map;\n }, {});\n }, [purchaseVendorAccountsMap]);\n\n const {\n query: purchaseVendorAccountsQuery,\n sortedVendorAccounts,\n availableVendorAccounts,\n } = usePurchaseVendorAccountSelector({\n vendorId: vendorIds,\n disabled: noVendorIds,\n placeholderText: ContentId.AllVendorAccounts,\n searchText,\n vendorAccountIds,\n });\n\n const { isFetchingNextPage, hasNextPage, fetchNextPage } =\n purchaseVendorAccountsQuery;\n\n const purchaseVendorAccounts = sortedVendorAccounts;\n\n useEffect(() => {\n onPurchaseVendorAccountsListChange(purchaseVendorAccounts ?? []);\n }, [onPurchaseVendorAccountsListChange, purchaseVendorAccounts]);\n\n return {\n disabled: noVendorIds || purchaseVendorAccountsQuery.isFetching,\n multiSelectOptions,\n purchaseVendorAccountsByVendorIds: purchaseVendorAccountsMap,\n availableVendorAccounts,\n isFetchingNextPage,\n onSearchTextChange: setSearchText,\n hasNextPage,\n fetchNextPage,\n };\n};\n","import { isEqual } from 'lodash-es';\nimport { useEffect, useMemo, useState } from 'react';\nimport { PurchaseInfoFilter } from 'src/components/MainFilterBar/usePurchaseInfoFilters';\nimport { useStandalonePurchaseVendorAccountSelector } from 'src/components/Selectors/PurchaseVendorAccountSelector/StandaloneMultiplePurchaseVendorAccountSelector/useStandalonePurchaseVendorAccountSelector';\nimport { PosMultiSelect } from 'src/core/POS/PosMultiSelect';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { removeDuplicates } from 'src/utils/miscUtils';\nimport { PurchaseVendorAccount } from 'src/WebApiController';\n\nconst triggerStyles = { style: { width: '100%' } };\n\ninterface StandalonePurchaseVendorAccountsSelectorProps<\n TFilter extends PurchaseInfoFilter,\n> {\n query: TFilter;\n setQuery: (query: TFilter) => void;\n}\n\nexport const StandalonePurchaseVendorAccountsSelector = <\n TFilter extends PurchaseInfoFilter,\n>({\n query,\n setQuery,\n}: StandalonePurchaseVendorAccountsSelectorProps) => {\n const { purchaseVendorAccountIds } = query;\n\n const {\n disabled,\n purchaseVendorAccountsByVendorIds: purchaseVendorAccountsMap,\n isFetchingNextPage,\n hasNextPage,\n fetchNextPage,\n onSearchTextChange,\n } = useStandalonePurchaseVendorAccountSelector({\n vendorAccountIds: purchaseVendorAccountIds || undefined,\n });\n\n const [selectedPurchaseVendorAccounts, setSelectedPurchaseVendorAccounts] =\n useState>({});\n\n // Combines the purchaseVendorAccountsMap that gets updated after search with the selectedPurchaseVendorAccounts\n const purchaseVendorAccountsMapWithSelected = useMemo(() => {\n return {\n ...purchaseVendorAccountsMap,\n ...selectedPurchaseVendorAccounts,\n };\n }, [purchaseVendorAccountsMap, selectedPurchaseVendorAccounts]);\n\n const multiSelectOptions = useMemo(() => {\n return Object.keys(purchaseVendorAccountsMapWithSelected).reduce<\n Record\n >((map, email) => {\n map[email] = email;\n return map;\n }, {});\n }, [purchaseVendorAccountsMapWithSelected]);\n\n const selectedPurchaseVendorAccountEmails = useMemo(() => {\n return Object.keys(selectedPurchaseVendorAccounts);\n }, [selectedPurchaseVendorAccounts]);\n\n useEffect(() => {\n const allPurchaseVendorAccounts = Object.values(\n purchaseVendorAccountsMapWithSelected\n ).flat();\n\n // Get all emails from accountIds\n const emailAccounts =\n (purchaseVendorAccountIds\n ?.map((purchaseVendorAccountId) => {\n return allPurchaseVendorAccounts.find(\n (purchaseVendorAccount) =>\n purchaseVendorAccount.id === purchaseVendorAccountId\n );\n })\n .map((account) => account?.email)\n .filter((email) => !!email) as string[]) ?? [];\n\n const cleanEmailAccounts = removeDuplicates(emailAccounts);\n if (isEqual(cleanEmailAccounts, selectedPurchaseVendorAccountEmails)) {\n return;\n }\n\n const cleanPurchaseVendorAccounts = Object.entries(\n purchaseVendorAccountsMapWithSelected\n ).reduce(\n (acc, [key, value]) => {\n if (cleanEmailAccounts.includes(key)) {\n acc[key] = value;\n }\n return acc;\n },\n {} as { [x: string]: PurchaseVendorAccount[] }\n );\n\n setSelectedPurchaseVendorAccounts(cleanPurchaseVendorAccounts);\n }, [\n purchaseVendorAccountIds,\n purchaseVendorAccountsMapWithSelected,\n selectedPurchaseVendorAccountEmails,\n ]);\n\n return (\n {\n const purchaseVendorAccounts = purchaseVendorAccountEmails.flatMap(\n (email) => purchaseVendorAccountsMapWithSelected[email]\n );\n const purchaseVendorAccountIds = purchaseVendorAccounts.map(\n (purchaseVendorAccount) => purchaseVendorAccount.id\n );\n const cleanPurchaseVendorAccountIds = removeDuplicates(\n purchaseVendorAccountIds\n );\n setQuery({\n ...query,\n purchaseVendorAccountIds:\n cleanPurchaseVendorAccountIds.length > 0\n ? cleanPurchaseVendorAccountIds\n : null,\n });\n\n const adaptPurchaseVendorAccountsToPurchaseVendorAccountsMap =\n purchaseVendorAccounts.reduce<\n Record\n >((acc, purchaseVendorAccount) => {\n const email = purchaseVendorAccount.email;\n\n if (!acc[email]) {\n acc[email] = [];\n }\n\n acc[email].push(purchaseVendorAccount);\n\n return acc;\n }, {});\n\n setSelectedPurchaseVendorAccounts(\n adaptPurchaseVendorAccountsToPurchaseVendorAccountsMap\n );\n }}\n onSearchTextChange={onSearchTextChange}\n valueOptionsContent={multiSelectOptions}\n enableEmptySelection\n placeholderText={ContentId.AllVendorAccounts}\n disabled={disabled}\n isFetchingNextPage={isFetchingNextPage}\n hasNextPage={hasNextPage}\n fetchNextPage={fetchNextPage}\n showSelectedOptionsFirst={true}\n includeSelectedInSearch={true}\n sortMode={'none'}\n />\n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const MetricsIcon = (props: Omit) => {\n return (\n \n \n \n );\n};\n","import { useQuery, UseQueryResult } from '@tanstack/react-query';\nimport { useMemo } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { PosSelectProps } from 'src/core/POS/PosSelect';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { AccessControlProvider, PurchaseClient } from 'src/WebApiController';\n\nexport type UseVendorAccessControlProvidersSelectorProps = {\n disabled?: boolean;\n additionalOptions?: Record;\n additionalOptionsPosition?: 'top' | 'bottom';\n placeholderText?: string | ContentId;\n};\n\nexport const useVendorAccessControlProvidersSelector = ({\n disabled,\n additionalOptions,\n additionalOptionsPosition = 'bottom',\n placeholderText,\n}: UseVendorAccessControlProvidersSelectorProps): {\n query: UseQueryResult;\n posSelectProps: Pick<\n PosSelectProps,\n 'placeholderText' | 'valueOptionsContent'\n >;\n} => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n\n const shouldQuery =\n !disabled && activeAccountWebClientConfig.activeAccountId != null;\n const query = useQuery({\n queryKey: [\n 'getAccessibleAccessControlProviders',\n activeAccountWebClientConfig.activeAccountId,\n ],\n queryFn: () => {\n if (!shouldQuery) {\n return null;\n }\n return tryInvokeApi(\n () => {\n return new PurchaseClient(\n activeAccountWebClientConfig\n ).getAccessibleAccessControlProviders();\n },\n (error) => {\n trackError(\n 'PurchaseClient.getAccessibleAccessControlProviders',\n error\n );\n }\n );\n },\n\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n });\n\n const availableAccessControlProviders = useMemo(() => {\n const dataSorted = query.data?.toSorted(\n (a: AccessControlProvider, b: AccessControlProvider) =>\n a.name.localeCompare(b.name)\n );\n\n const results = dataSorted?.reduce(\n (r, cur) => {\n r[cur.id] = cur.name;\n return r;\n },\n (additionalOptions && additionalOptionsPosition === 'top'\n ? additionalOptions\n : {}) as Record\n );\n\n return {\n ...(additionalOptionsPosition === 'top' ? additionalOptions : {}),\n ...(results ?? {}),\n ...(additionalOptionsPosition === 'bottom' ? additionalOptions : {}),\n };\n }, [query.data, additionalOptions, additionalOptionsPosition]);\n\n return {\n query,\n posSelectProps: {\n placeholderText: placeholderText ?? ContentId.VendorGroup,\n valueOptionsContent: availableAccessControlProviders,\n },\n };\n};\n","import { PosSelect, PosSelectProps } from 'src/core/POS/PosSelect';\n\nimport {\n useVendorAccessControlProvidersSelector,\n UseVendorAccessControlProvidersSelectorProps,\n} from './useVendorAccessControlProvidersSelector';\n\nexport const VendorAccessControlProvidersSelector = ({\n disabled,\n additionalOptions,\n additionalOptionsPosition,\n placeholderText,\n ...props\n}: Omit &\n UseVendorAccessControlProvidersSelectorProps) => {\n const {\n query: { isLoading },\n posSelectProps,\n } = useVendorAccessControlProvidersSelector({\n additionalOptions,\n additionalOptionsPosition,\n placeholderText,\n });\n\n return (\n \n );\n};\n","import {\n FilterToolbarGroup,\n FilterToolbarItem,\n FilterToolbarItemId,\n} from 'src/components/Filters';\nimport { StandalonePurchaseVendorAccountsSelector } from 'src/components/Selectors/PurchaseVendorAccountSelector';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { DateRangeSelector } from 'src/core/POS/DateRangeSelector';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { vars } from 'src/core/themes';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { MetricsIcon } from 'src/svgs/MetricsIcon';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { YES_ENUM_FILTER_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { PurchaseDateRangePresetNames } from 'src/utils/dateTimeUtils';\nimport { FromYesNoEnum, ToYesNoEnum } from 'src/utils/eventQueryUtils';\nimport { ReportTypes } from 'src/utils/reportsUtils';\nimport { DateTimeRangeWithRelative, Feature } from 'src/WebApiController';\n\nimport { usePurchaseVendorAccountSelector } from '../Selectors/PurchaseVendorAccountSelector/usePurchaseVendorAccountSelector';\nimport { PurchaseVendorSelector } from '../Selectors/PurchaseVendorSelector';\nimport { SellerAccountEmployeeSelector } from '../Selectors/SellerAccountEmployeeSelector';\nimport { VendorAccessControlProvidersSelector } from '../Selectors/VendorAccessControlProvidersSelector/VendorAccessControlProvidersSelector';\n\nexport type PurchaseInfoFilter = {\n purchaseVendorId?: number | null;\n purchaseVendorAccountIds?: string[] | null;\n purchaseBuyerId?: string | null;\n purchaseOrderCreatedBy?: string | null;\n purchaseDates?: DateTimeRangeWithRelative | null;\n purchaseCommissionUserId?: string | null;\n purchaseCancellationDates?: DateTimeRangeWithRelative | null;\n purchaseCancelledOnly?: boolean | null;\n vendorAccessControlProviderId?: number | null;\n};\n\nexport const usePurchaseInfoFilters = ({\n query,\n setQuery,\n reportType,\n showCommissionerFilter,\n showMetricsIndicationOnFilters,\n}: {\n query: TFilter;\n setQuery: (query: TFilter) => void;\n reportType?: ReportTypes;\n showCommissionerFilter?: boolean;\n showMetricsIndicationOnFilters?: boolean;\n}): FilterToolbarGroup => {\n const isReportPage = reportType != null;\n const useRelativePresets = isReportPage;\n\n const hasFilterByCommissionUserFeature = useUserHasFeature(\n Feature.ReportFilterByCommissionUser\n );\n\n const { query: vendorAccountQuery } = usePurchaseVendorAccountSelector({\n vendorId: query.purchaseVendorId,\n });\n\n const metricsIconNote = useContent(ContentId.ThisFilterWillChangeMetrics);\n\n return {\n titleContentId: ContentId.Purchase,\n type: 'row',\n items: [\n {\n filterId: 'purchaseVendorId' as const,\n labelContentId: ContentId.Vendor,\n filterQueryKeys: ['purchaseVendorId'] as FilterToolbarItemId[],\n filterItem: (\n {\n const purchaseVendorId = newId ? +newId : null;\n if (purchaseVendorId !== query?.purchaseVendorId) {\n setQuery({\n ...query,\n purchaseVendorId,\n purchaseVendorAccountIds: null, // changing vendor should reset the vendor-account selection filter\n });\n vendorAccountQuery.refetch();\n }\n }}\n />\n ),\n },\n {\n filterId: 'purchaseVendorAccountIds' as const,\n labelContentId: ContentId.VendorAccount,\n filterQueryKeys: ['purchaseVendorAccountIds'] as FilterToolbarItemId[],\n filterItem: (\n \n ),\n },\n !reportType\n ? {\n filterId: 'vendorAccessControlProviderId' as const,\n labelContentId: ContentId.VendorGroup,\n filterQueryKeys: [\n 'vendorAccessControlProviderId',\n ] as FilterToolbarItemId[],\n filterItem: (\n {\n if (vendorAccessControlProviderId) {\n setQuery({\n ...query,\n vendorAccessControlProviderId: Number(\n vendorAccessControlProviderId\n ),\n });\n }\n }}\n />\n ),\n }\n : null,\n {\n filterId: 'purchaseBuyerId' as const,\n labelContentId: ContentId.PurchasedBy,\n filterQueryKeys: ['purchaseBuyerId'] as FilterToolbarItemId[],\n postfixIcon: showMetricsIndicationOnFilters ? (\n \n ) : undefined,\n filterItem: (\n {\n if (purchaseBuyerId !== query.purchaseBuyerId) {\n setQuery({\n ...query,\n purchaseBuyerId,\n });\n }\n }}\n />\n ),\n },\n {\n filterId: 'purchaseDates' as const,\n labelContentId: ContentId.PurchaseDate,\n filterQueryKeys: ['purchaseDates'] as FilterToolbarItemId[],\n filterItem: (\n \n setQuery({\n ...query,\n purchaseDates: value,\n })\n }\n useRelativePresets={useRelativePresets}\n />\n ),\n },\n {\n filterId: 'purchaseOrderCreatedBy' as const,\n labelContentId: ContentId.CreatedBy,\n filterQueryKeys: ['purchaseOrderCreatedBy'] as FilterToolbarItemId[],\n postfixIcon: showMetricsIndicationOnFilters ? (\n \n ) : undefined,\n filterItem: (\n {\n if (purchaseOrderCreatedBy !== query.purchaseOrderCreatedBy) {\n setQuery({\n ...query,\n purchaseOrderCreatedBy,\n });\n }\n }}\n />\n ),\n },\n ...(hasFilterByCommissionUserFeature &&\n (isReportPage || showCommissionerFilter)\n ? [\n {\n filterId: 'purchaseCommissionUserId' as FilterToolbarItemId,\n labelContentId: ContentId.Commissioner,\n filterQueryKeys: [\n 'purchaseCommissionUserId',\n ] as FilterToolbarItemId[],\n filterItem: (\n {\n if (\n purchaseCommissionUserId !==\n query.purchaseCommissionUserId\n ) {\n setQuery({\n ...query,\n purchaseCommissionUserId,\n });\n }\n }}\n />\n ),\n },\n ]\n : []),\n ...(reportType === ReportTypes.Inventory\n ? [\n {\n filterId: 'purchaseCancellationDates' as FilterToolbarItemId,\n labelContentId: ContentId.CancellationDate,\n filterQueryKeys: [\n 'purchaseCancellationDates',\n ] as FilterToolbarItemId[],\n filterItem: (\n \n setQuery({\n ...query,\n purchaseCancellationDates: value,\n })\n }\n useRelativePresets={useRelativePresets}\n />\n ),\n },\n {\n filterId: 'purchaseCancelledOnly' as FilterToolbarItemId,\n labelContentId: ContentId.Cancelled,\n filterQueryKeys: [\n 'purchaseCancelledOnly',\n ] as FilterToolbarItemId[],\n filterItem: (\n {\n if (\n yesNoEnumValue !==\n ToYesNoEnum(query.purchaseCancelledOnly)\n ) {\n setQuery({\n ...query,\n purchaseCancelledOnly: FromYesNoEnum(yesNoEnumValue),\n });\n }\n }}\n valueOptionsContent={YES_ENUM_FILTER_TO_CID}\n />\n ),\n },\n ]\n : []),\n ].filter((f) => f!) as FilterToolbarItem[],\n };\n};\n","import { ComponentPropsWithRef } from 'react';\n\nimport { PosMultiSelect } from './PosMultiSelect';\n\nexport function PosEnumMultiSelect({\n values,\n defaultValue,\n onChange,\n valueOptionsContent,\n ...rest\n}: {\n values: EnumType[];\n defaultValue?: EnumType | null;\n valueOptionsContent: Record;\n onChange: (newValues: EnumType[]) => void;\n} & Omit<\n ComponentPropsWithRef,\n 'values' | 'valueOptionsContent' | 'onChange' | 'defaultValue'\n>) {\n return (\n v as string)}\n defaultValue={\n defaultValue === undefined\n ? undefined\n : defaultValue === null\n ? ''\n : defaultValue\n }\n onChange={(newValues: string[]) => {\n onChange(newValues.map((v) => v as EnumType));\n }}\n valueOptionsContent={valueOptionsContent}\n {...rest}\n />\n );\n}\n","import { useMemo } from 'react';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport {\n PosMultiSelect,\n PosMultiSelectProps,\n} from 'src/core/POS/PosMultiSelect';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n getEventDisplayText,\n getPerformerAndVenueForEvent,\n} from 'src/utils/eventWithDataUtils';\nimport { EventWithData } from 'src/WebApiController';\n\ntype EventSelectorProps = Omit & {\n filterCallback?: (event?: EventWithData) => boolean;\n};\n\nexport const EventSelector = ({\n filterCallback,\n placeholderText,\n ...props\n}: EventSelectorProps) => {\n // TODO - remove all these logic once Catalog v2 feature is available\n const { data: catalogData, isLoading } = useCatalogDataContext();\n\n const allEvents = useMemo(() => {\n if (!catalogData?.events) return {};\n\n const events = catalogData?.events;\n\n const results = Object.values(events!).reduce(\n (acc, event) => {\n if (\n event.event.viagVirtualId &&\n (filterCallback == null || filterCallback(event))\n ) {\n const { venue, performer } = getPerformerAndVenueForEvent(\n event?.event,\n catalogData\n );\n\n const name = getEventDisplayText(event.event, venue, performer, true);\n\n acc[event.event.viagVirtualId] = name;\n }\n return acc;\n },\n {} as Record\n );\n\n return results;\n }, [catalogData, filterCallback]);\n\n const hasNoEvent = Object.values(allEvents).length == 0;\n\n return (\n \n );\n};\n","import { isEqual } from 'lodash-es';\nimport { FilterToolbarItem } from 'src/components/Filters';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { PosEnumMultiSelect } from 'src/core/POS/PosMultiSelect/PosEnumMultiSelect';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { EVENT_STATUS_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { QueryWithViewMode } from 'src/utils/eventQueryUtils';\nimport { EntityWithTicketsQuery } from 'src/WebApiController';\n\nexport const useEventStateFilters = (): FilterToolbarItem[] => {\n const { tempQuery, setTempQuery } = useFilterQueryContext<\n EntityWithTicketsQuery & QueryWithViewMode\n >();\n\n return [\n {\n filterId: 'eventStatuses',\n labelContentId: ContentId.EventState,\n filterQueryKeys: ['eventStatuses'],\n filterItem: (\n {\n const isChanged = !isEqual(eventStatuses, tempQuery.eventStatuses);\n\n setTempQuery({\n ...tempQuery,\n eventStatuses: isChanged ? eventStatuses : [],\n });\n }}\n valueOptionsContent={EVENT_STATUS_TO_CID}\n />\n ),\n },\n ];\n};\n","import { isEqual } from 'lodash-es';\nimport {\n FilterToolbarGroup,\n FilterToolbarItem,\n FilterToolbarItemId,\n useLocationFilter,\n} from 'src/components/Filters';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { PosMultiSelect } from 'src/core/POS/PosMultiSelect';\nimport { PosEnumMultiSelect } from 'src/core/POS/PosMultiSelect/PosEnumMultiSelect';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n PARENT_CATEGORY_TO_CID,\n TOP_LEVEL_CATEGORY_TO_CID,\n} from 'src/utils/constants/contentIdMaps';\nimport { QueryWithViewMode } from 'src/utils/eventQueryUtils';\nimport {\n EntityWithTicketsQuery,\n EventTimeFrameFilter,\n Feature,\n TopLevelCategory,\n} from 'src/WebApiController';\n\nimport { EventDateSelector } from '../Events/EventDateSelector/EventDateSelector';\nimport { EventSelector } from '../Selectors/EventSelector';\nimport { useEventStateFilters } from './useEventStateFilters';\n\nexport type CommonEventFilter = {\n eventTimeFrameFilter: null;\n eventDates: null;\n countryCodes: null;\n stateProvinceIds: null;\n cityIds: null;\n topLevelCategories: null;\n parentCategories: null;\n eventStatuses: null;\n\n // there are only for the search-views\n eventOrMappingIds: null;\n performerIds: null;\n venueIds: null;\n};\n\nexport const useCommonEventFilters = ({\n showCatalogFilters,\n additionalFilters,\n}: {\n showCatalogFilters?: boolean;\n additionalFilters?: FilterToolbarItem[];\n}): FilterToolbarGroup => {\n const { tempQuery, initialQuery, setTempQuery } = useFilterQueryContext<\n EntityWithTicketsQuery & QueryWithViewMode\n >();\n\n const hasCatalogFilters = useUserHasFeature(Feature.EventSelectorFilter);\n\n const locationFilters = useLocationFilter();\n const eventStateFilters = useEventStateFilters();\n\n const hideCatalogFilters = !showCatalogFilters || !hasCatalogFilters;\n\n return {\n titleContentId: ContentId.Events,\n items: [\n {\n filterId: 'eventDates' as FilterToolbarItemId,\n labelContentId: ContentId.EventDate,\n filterQueryKeys: [\n 'eventDates',\n 'eventTimeFrameFilter',\n ] as FilterToolbarItemId[],\n filterItem: (\n {\n if (\n eventTimeFrameFilter !== tempQuery.eventTimeFrameFilter ||\n !isEqual(dateRange, tempQuery.eventDates)\n ) {\n let isSortDescending = tempQuery.isSortDescending;\n if (eventTimeFrameFilter !== EventTimeFrameFilter.Future) {\n // When sorting by past or by all - we do not want to sort by date asc (as that would put the oldest event first)\n // Changing this to desc\n isSortDescending = true;\n } else {\n isSortDescending = initialQuery.isSortDescending;\n }\n\n setTempQuery({\n ...tempQuery,\n eventTimeFrameFilter: eventTimeFrameFilter ?? null,\n eventDates: dateRange ?? null,\n isSortDescending,\n });\n }\n }}\n />\n ),\n },\n ...(hideCatalogFilters\n ? []\n : [\n {\n filterId: 'eventOrMappingIds' as FilterToolbarItemId,\n labelContentId: ContentId.Event,\n filterQueryKeys: ['eventOrMappingIds'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (!isEqual(values, tempQuery.eventOrMappingIds)) {\n setTempQuery({\n ...tempQuery,\n eventOrMappingIds: values ?? null,\n });\n }\n }}\n />\n ),\n },\n ]),\n ...locationFilters,\n {\n filterId: 'topLevelCategories' as FilterToolbarItemId,\n filterQueryKeys: ['topLevelCategories'] as FilterToolbarItemId[],\n labelContentId: ContentId.Genre,\n filterItem: (\n {\n const isChanged = !isEqual(\n topLevelCategories,\n tempQuery.topLevelCategories\n );\n\n setTempQuery({\n ...tempQuery,\n topLevelCategories: isChanged ? topLevelCategories : [],\n });\n }}\n valueOptionsContent={TOP_LEVEL_CATEGORY_TO_CID}\n />\n ),\n },\n {\n filterId: 'parentCategories' as FilterToolbarItemId,\n labelContentId: ContentId.SubGenre,\n filterQueryKeys: ['parentCategories'] as FilterToolbarItemId[],\n filterItem: (\n String(c))\n : []\n }\n onChange={(newValues: string[]) => {\n setTempQuery({\n ...tempQuery,\n parentCategories:\n newValues.length > 0\n ? newValues.map((value) => Number(value))\n : null,\n });\n }}\n searchable={true}\n valueOptionsContent={PARENT_CATEGORY_TO_CID}\n />\n ),\n },\n ...eventStateFilters,\n ...(additionalFilters ?? []),\n ],\n };\n};\n","import { isEqual } from 'lodash';\nimport { useMemo } from 'react';\nimport { FilterToolbarItemId } from 'src/components/Filters';\nimport { useInternalNotesFilter } from 'src/components/Filters/InternalNotesFilter';\nimport { useMergedTagFilters } from 'src/components/MainFilterBar/Tags/useMergedTagFilters';\nimport { usePurchaseInfoFilters } from 'src/components/MainFilterBar/usePurchaseInfoFilters';\nimport { DeliveryTypeSelector } from 'src/components/Selectors/DeliveryTypeSelector';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { DateRangeSelector } from 'src/core/POS/DateRangeSelector';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { Slider } from 'src/core/ui/Slider';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { PurchasePaymentMethodSelectionInput } from 'src/modals/common';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n PAYMENT_METHOD_TYPE_TO_CID,\n PURCHASE_PAYMENT_STATUS_TO_CID,\n YES_NO_ENUM_FILTER_TO_CID,\n} from 'src/utils/constants/contentIdMaps';\nimport { StandardDateRangePresetNames } from 'src/utils/dateTimeUtils';\nimport { FromYesNoEnum, ToYesNoEnum } from 'src/utils/eventQueryUtils';\nimport { formatNumber } from 'src/utils/numberFormatter';\nimport {\n ActionOutboxEntityType,\n Feature,\n PurchaseOrderQuery,\n PurchaseOrderState,\n} from 'src/WebApiController';\n\nimport {\n CurrencyFilterMultiSelector,\n CurrencyFilterSelector,\n} from '../Selectors/CurrencyFilterSelector';\nimport { useCommonEventFilters } from './useCommonEventFilters';\n\nexport const purchaseMandatoryFiltersToShow: FilterToolbarItemId[] = [\n 'purchaseDates',\n];\n\ninterface PurchaseFiltersParams {\n isHorizontalLayout?: boolean;\n showCommissionerFilter?: boolean;\n showConsignmentFilter?: boolean;\n showCatalogFilters?: boolean;\n showMetricsIndicationOnFilters?: boolean;\n}\n\nexport const usePurchaseFilters = ({\n isHorizontalLayout,\n showCommissionerFilter,\n showConsignmentFilter,\n showCatalogFilters,\n showMetricsIndicationOnFilters,\n}: PurchaseFiltersParams) => {\n const hasFilterByCurrencyCodeMultiFeature = useUserHasFeature(\n Feature.FilterByCurrencyCodeMulti\n );\n const hasFilterByCurrencyCodeFeature = !hasFilterByCurrencyCodeMultiFeature;\n const hasFilterByPaymentCurrencyCodeMultiFeature = useUserHasFeature(\n Feature.FilterByPaymentCurrencyCodeMulti\n );\n const hasFilterPOByPaymentMethodIdFeature = useUserHasFeature(\n Feature.FilterPOByPaymentMethodId\n );\n\n const internalNotesFilter = useInternalNotesFilter({\n entityType: ActionOutboxEntityType.Purchase,\n isHorizontalLayout,\n });\n\n const { initialQuery, tempQuery, setTempQuery } =\n useFilterQueryContext();\n\n const reportType = undefined;\n const purchaseInfoFilters = usePurchaseInfoFilters({\n query: tempQuery,\n setQuery: setTempQuery,\n reportType,\n showCommissionerFilter,\n showMetricsIndicationOnFilters,\n });\n\n const tagsFilter = useMergedTagFilters({\n query: tempQuery,\n setQuery: setTempQuery,\n entityType: ActionOutboxEntityType.Purchase,\n includeEventTags: false,\n });\n\n const eventFilter = useCommonEventFilters({ showCatalogFilters });\n\n return useMemo(() => {\n const costHandle: [number, number] = [\n tempQuery.totalCostLow || 0,\n tempQuery.totalCostHigh || 50000,\n ];\n\n return [\n {\n titleContentId: ContentId.WhenWhereWho,\n type: 'row',\n items: [\n ...purchaseInfoFilters.items,\n ...(showConsignmentFilter\n ? [\n {\n filterId: 'isConsignment' as FilterToolbarItemId,\n labelContentId: ContentId.Consignment,\n filterQueryKeys: ['isConsignment'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (\n yesNoEnumValue !== ToYesNoEnum(tempQuery.isSeatSaver)\n ) {\n setTempQuery({\n ...tempQuery,\n isConsignment: FromYesNoEnum(yesNoEnumValue),\n });\n }\n }}\n valueOptionsContent={YES_NO_ENUM_FILTER_TO_CID}\n />\n ),\n },\n ]\n : []),\n ],\n },\n {\n titleContentId: ContentId.Payments,\n type: 'row',\n items: [\n {\n filterId: 'paymentDates' as FilterToolbarItemId,\n labelContentId: ContentId.PaymentDate,\n filterQueryKeys: ['paymentDates'] as FilterToolbarItemId[],\n filterItem: (\n \n setTempQuery({\n ...tempQuery,\n paymentDates: value,\n })\n }\n />\n ),\n },\n {\n filterId: 'paymentStatus' as FilterToolbarItemId,\n labelContentId: ContentId.PaymentState,\n filterQueryKeys: ['paymentStatus'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (paymentStatus !== tempQuery.paymentStatus) {\n setTempQuery({\n ...tempQuery,\n paymentStatus: paymentStatus,\n });\n }\n }}\n valueOptionsContent={PURCHASE_PAYMENT_STATUS_TO_CID}\n />\n ),\n },\n {\n filterId: 'paymentMethod' as FilterToolbarItemId,\n labelContentId: ContentId.PaymentType,\n filterQueryKeys: ['paymentMethod'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (paymentMethod !== tempQuery.paymentMethod) {\n setTempQuery({\n ...tempQuery,\n paymentMethod: paymentMethod,\n });\n }\n }}\n valueOptionsContent={PAYMENT_METHOD_TYPE_TO_CID}\n />\n ),\n },\n ...(hasFilterByPaymentCurrencyCodeMultiFeature\n ? [\n {\n filterId: 'paymentCurrencyCodes' as FilterToolbarItemId,\n labelContentId: ContentId.PaymentCurrency,\n filterQueryKeys: [\n 'paymentCurrencyCodes',\n ] as FilterToolbarItemId[],\n filterItem: (\n {\n if (\n !isEqual(\n tempQuery.paymentCurrencyCodes,\n newPaymentCurrencyCodes\n )\n ) {\n setTempQuery({\n ...tempQuery,\n paymentCurrencyCodes:\n newPaymentCurrencyCodes?.length\n ? newPaymentCurrencyCodes\n : null,\n });\n }\n }}\n />\n ),\n },\n ]\n : []),\n ...(hasFilterPOByPaymentMethodIdFeature\n ? [\n {\n filterId: 'paymentMethodId' as FilterToolbarItemId,\n labelContentId: ContentId.PaymentMethodUsed,\n filterQueryKeys: ['paymentMethodId'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (\n paymentMethodId !==\n tempQuery.paymentMethodId?.toString()\n ) {\n setTempQuery({\n ...tempQuery,\n paymentMethodId: paymentMethodId?.length\n ? parseInt(paymentMethodId)\n : null,\n });\n }\n }}\n />\n ),\n },\n ]\n : []),\n ],\n },\n eventFilter,\n {\n titleContentId: ContentId.Delivery,\n type: 'row',\n items: [\n {\n filterId: 'deliveryType' as FilterToolbarItemId,\n labelContentId: ContentId.Delivery,\n filterQueryKeys: ['deliveryType'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (deliveryType !== tempQuery.deliveryType) {\n setTempQuery({\n ...tempQuery,\n deliveryType: deliveryType,\n });\n }\n }}\n allowCustomDeliveryType\n />\n ),\n },\n ],\n },\n {\n titleContentId: ContentId.Status,\n type: 'row',\n items: [\n {\n filterId: 'purchaseOrderState' as FilterToolbarItemId,\n labelContentId: ContentId.ShowVoidCancelledPurchases,\n filterQueryKeys: ['purchaseOrderState'] as FilterToolbarItemId[],\n filterItem: (\n {\n const showCancelledAndVoided = e.target.checked;\n const newPurchaseOrderState = showCancelledAndVoided\n ? null\n : PurchaseOrderState.Active;\n\n if (newPurchaseOrderState !== tempQuery.purchaseOrderState) {\n setTempQuery({\n ...tempQuery,\n purchaseOrderState: newPurchaseOrderState,\n });\n }\n }}\n labelPosition=\"right\"\n label={\n isHorizontalLayout ? undefined : (\n \n )\n }\n />\n ),\n },\n ],\n },\n {\n titleContentId: ContentId.Cost,\n items: [\n {\n filterId: 'totalCostHigh' as FilterToolbarItemId,\n labelContentId: ContentId.TotalCost,\n filterQueryKeys: [\n 'totalCostLow',\n 'totalCostHigh',\n ] as FilterToolbarItemId[],\n filterItem: (\n (\n {formatNumber(n)}\n )}\n onValueChange={([low, high]: [number, number]) => {\n if (\n low !== (tempQuery.totalCostLow || 0) ||\n high !== tempQuery.totalCostHigh\n ) {\n const newQuery = {\n ...tempQuery,\n totalCostLow: low === 0 ? null : low,\n totalCostHigh: high === 50000 ? null : high,\n };\n setTempQuery(newQuery);\n }\n }}\n />\n ),\n },\n ...(hasFilterByCurrencyCodeFeature\n ? [\n {\n filterId: 'currencyCode' as FilterToolbarItemId,\n labelContentId: ContentId.Currency,\n filterQueryKeys: ['currencyCode'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (tempQuery.currencyCode !== newCurrencyCode) {\n setTempQuery({\n ...tempQuery,\n currencyCode: newCurrencyCode?.length\n ? newCurrencyCode\n : null,\n });\n }\n }}\n enableEmptySelection\n />\n ),\n },\n ]\n : []),\n ...(hasFilterByCurrencyCodeMultiFeature\n ? [\n {\n filterId: 'currencyCodes' as FilterToolbarItemId,\n labelContentId: ContentId.Currency,\n filterQueryKeys: ['currencyCodes'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (\n !isEqual(tempQuery.currencyCodes, newCurrencyCodes)\n ) {\n setTempQuery({\n ...tempQuery,\n currencyCodes: newCurrencyCodes?.length\n ? newCurrencyCodes\n : null,\n });\n }\n }}\n enableEmptySelection\n />\n ),\n },\n ]\n : []),\n ],\n },\n ...tagsFilter,\n ...(internalNotesFilter ? [internalNotesFilter] : []),\n ];\n }, [\n tempQuery,\n purchaseInfoFilters.items,\n showConsignmentFilter,\n initialQuery.paymentDates,\n hasFilterByPaymentCurrencyCodeMultiFeature,\n hasFilterPOByPaymentMethodIdFeature,\n eventFilter,\n isHorizontalLayout,\n hasFilterByCurrencyCodeFeature,\n hasFilterByCurrencyCodeMultiFeature,\n tagsFilter,\n internalNotesFilter,\n setTempQuery,\n ]);\n};\n","import { ReactNode } from 'react';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { Permission } from 'src/WebApiController';\n\ninterface PurchaseGlobalActionsPermissionsWrapperProps {\n children: ReactNode;\n showBulkUpload?: boolean;\n}\n\nexport const PurchaseGlobalActionsPermissionsWrapper = ({\n children,\n showBulkUpload,\n}: PurchaseGlobalActionsPermissionsWrapperProps) => {\n const hasPurchaseUpdatePermission = useUserHasAnyOfPermissions(\n Permission.Purchases_Edit,\n Permission.Purchases_EditOwned\n );\n\n if (!showBulkUpload && !hasPurchaseUpdatePermission) {\n return null;\n }\n\n return <>{children};\n};\n","import { useMemo } from 'react';\nimport { usePurchaseVendorSelector } from 'src/components/Selectors/PurchaseVendorSelector/usePurchaseVendorSelector';\nimport { Content } from 'src/contexts/ContentContext';\nimport { QuickFilter } from 'src/hooks/useQuickFilters';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { KnownVendors } from 'src/utils/constants/knownVendors';\nimport {\n PurchaseOrderQuery,\n PurchasePaymentStatus,\n UserSetting,\n} from 'src/WebApiController';\n\nexport const useDefaultPurchaseFilters = ({\n purchaseQuery,\n initialQuery,\n}: {\n purchaseQuery: PurchaseOrderQuery;\n initialQuery: PurchaseOrderQuery;\n}) => {\n const {\n posSelectProps: { valueOptionsContent: purchaseVendors },\n } = usePurchaseVendorSelector({});\n\n const ticketmasterVendorId = useMemo(\n () =>\n Object.keys(purchaseVendors).find(\n (key) => purchaseVendors[key] === KnownVendors.Ticketmaster\n ),\n [purchaseVendors]\n );\n const defaultQuickFilters = useMemo(() => {\n const filters: QuickFilter[] = [\n {\n id: 'unpaid',\n name: ,\n data: {\n ...initialQuery,\n paymentStatus: PurchasePaymentStatus.Unpaid,\n },\n },\n {\n id: 'refundNeeded',\n name: ,\n data: {\n ...initialQuery,\n paymentStatus: PurchasePaymentStatus.RefundNeeded,\n },\n },\n ];\n if (ticketmasterVendorId) {\n filters.push({\n id: 'ticketmaster',\n name: KnownVendors.Ticketmaster,\n data: {\n ...initialQuery,\n purchaseVendorId: Number(ticketmasterVendorId),\n purchaseVendorAccountIds: null, // changing vendor should reset the vendor-account selection filter\n },\n });\n }\n\n // Default filters aren't supposed to change view mode\n filters.forEach(\n (f: QuickFilter) => {\n f.data.viewMode = purchaseQuery.viewMode;\n }\n );\n return filters;\n }, [initialQuery, purchaseQuery.viewMode, ticketmasterVendorId]);\n\n return defaultQuickFilters;\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const TileViewIcon = (props: PosIconProps) => {\n return (\n \n \n \n \n \n \n \n );\n};\n","import { ReactNode } from 'react';\nimport { FlattenedViewIcon } from 'src/svgs/FlattenedViewIcon';\nimport { TileViewIcon } from 'src/svgs/TileViewIcon';\nimport { IconsFill } from 'src/svgs/Viagogo';\nimport { PurchaseViewMode } from 'src/WebApiController';\n\nexport const PURCHASE_VIEW_MODE_TO_ICON: Record = {\n [PurchaseViewMode.TileView]: (\n \n ),\n [PurchaseViewMode.FlattenedView]: (\n \n ),\n [PurchaseViewMode.EventTileView]: (\n \n ),\n};\n","import { useContent } from 'src/contexts/ContentContext';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { PurchaseOrderDetails } from 'src/WebApiController';\n\nimport * as styles from './PurchaseOrderBasicInfo.css';\n\nexport const PurchaseOrderBasicInfo = ({\n purchaseOrder,\n}: {\n purchaseOrder: PurchaseOrderDetails;\n}) => {\n const purchaseOrderIdLabel = useContent(ContentId.UniqueId);\n const vendorLabel = useContent(ContentId.Vendor);\n const vendorAccountNameLabel = useContent(ContentId.VendorAccount);\n const purchaseDateLabel = useContent(ContentId.PurchaseDate);\n\n return (\n
    \n {purchaseOrderIdLabel}\n {purchaseOrder.id}\n\n {vendorLabel}\n {purchaseOrder.vendor?.name}\n\n {vendorAccountNameLabel}\n \n {purchaseOrder.vendAcc?.email || purchaseOrder.vendAcc?.name}\n \n\n {purchaseDateLabel}\n {purchaseOrder.poDate}\n
    \n );\n};\n","import { debounce } from 'lodash-es';\nimport { useCallback, useContext, useEffect, useState } from 'react';\nimport { useLocation } from 'react-router-dom';\nimport { EventEntitySearchBox } from 'src/components/Accordions/EventEntitySearchBox';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { FormatContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { SearchResultPickerDialog } from 'src/dialogs/SearchResultPickerDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { PurchaseDeeplinkQueryParam } from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { getDeepLinkIdFromUrl } from 'src/utils/deepLinkUtils';\nimport {\n DefaultPurchaseQuery,\n getQueryFromUrl,\n} from 'src/utils/eventQueryUtils';\nimport {\n combineWithTicketGroupIdSimple,\n getPurchaseOrderDetailsModalConfigWithDeepLink,\n splitOutTicketGroupId,\n} from 'src/utils/purchaseUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n Feature,\n PurchaseClient,\n PurchaseOrder,\n PurchaseOrderDetails,\n PurchaseOrderQuery,\n PurchaseViewMode,\n} from 'src/WebApiController';\n\nimport { PurchaseOrderBasicInfo } from '../PurchaseOrderBasicInfo';\n\nexport const PurchaseSearchBox = ({\n isEventPage,\n}: {\n isEventPage?: boolean;\n}) => {\n const hasFullPageEventViewEntitySelection = useUserHasFeature(\n Feature.FullPageEventViewEntitySelection\n );\n const { showErrorDialog } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const { setModal, isModalOpen } = useContext(ModalContext);\n const [searchText, setSearchText] = useState('');\n\n const { closeDialog, launchDialog, dialogProps } = useBasicDialog();\n\n const [searchId, setSearchId] = useState();\n const [searchResults, setSearchResults] = useState();\n const [isLoadingSearch, setIsLoadingSearch] = useState(false);\n const { posEntity: purchase, setActivePosEntity } =\n useActivePosEntityContext();\n\n const {\n filterQuery: purchaseQuery,\n initialQuery,\n tempQuery,\n setFilterQuery,\n } = useFilterQueryContext();\n\n const clearSearchEntity = useCallback(() => {\n const newQuery = {\n ...tempQuery,\n searchText: null,\n entityIds: null,\n marketplaceEntityIds: null,\n };\n setFilterQuery(newQuery);\n }, [tempQuery, setFilterQuery]);\n\n const onLookupById = useCallback(\n async (idText: string, isSearching: boolean) => {\n const { id, ticketGroupId } = splitOutTicketGroupId(idText);\n const idNum = Number(id);\n const idStr = String(id);\n if (\n !id &&\n tempQuery.marketplaceEntityIds &&\n hasFullPageEventViewEntitySelection\n ) {\n const newQuery = {\n ...tempQuery,\n entityIds: null,\n marketplaceEntityIds: null,\n };\n setFilterQuery({ ...newQuery });\n return;\n }\n\n if (id && !isLoadingSearch) {\n if (purchase?.vendOrdId === idStr || purchase?.id === idNum) {\n // If the id hasn't changed, check that if it's open, if it's not, open it\n if (!isModalOpen) {\n setModal(\n getPurchaseOrderDetailsModalConfigWithDeepLink(\n combineWithTicketGroupIdSimple(purchase.id, ticketGroupId)\n )\n );\n }\n\n // Else, just don't do anything\n return;\n }\n\n if (hasFullPageEventViewEntitySelection) {\n const matchedIds = idStr\n .split(',')\n .filter((s) => s.trim())\n .map((s) => s.trim()); // split by commas and remove all empty ones\n\n if (matchedIds.length > 1) {\n const newQuery = {\n ...DefaultPurchaseQuery,\n marketplaceEntityIds: matchedIds,\n viewMode: PurchaseViewMode.FlattenedView,\n };\n setFilterQuery(newQuery);\n return;\n } else if (tempQuery.marketplaceEntityIds) {\n const newQuery = {\n ...tempQuery,\n marketplaceEntityIds: null,\n };\n\n setFilterQuery(newQuery);\n }\n }\n\n setSearchId(idStr);\n setIsLoadingSearch(true);\n\n try {\n // when user enter a text here, we don't know whether they entered the order id or unique id\n // since 99% of the time they'll be entering a order id, we try to lookup by that first\n const purchaseOrders = isSearching\n ? await tryInvokeApi(\n () =>\n new PurchaseClient(\n activeAccountWebClientConfig\n ).getPurchaseOrdersByVendorOrderId(idStr),\n (error) => {\n showErrorDialog(\n 'PurchaseClient.getPurchaseOrdersByVendorOrderId',\n error,\n { trackErrorData: { saleId: id } }\n );\n }\n )\n : null;\n\n if (!purchaseOrders || purchaseOrders.length === 0) {\n if (isNaN(idNum)) {\n // If we can't find by either PO external id or internal id, just launch empty search result dialog\n launchDialog();\n return false;\n }\n\n // If we didn't find any POs by vendor-order-id, assume this is a unique id search\n setActivePosEntity(idNum, undefined, true);\n setModal(\n getPurchaseOrderDetailsModalConfigWithDeepLink(\n combineWithTicketGroupIdSimple(idNum, ticketGroupId)\n )\n );\n\n return true;\n } else {\n // We have POs using the vendor order id\n // If there is duplicate vendor order id (which is rare)\n // we need to present to the user and ask them what they want\n if (purchaseOrders.length === 1) {\n const poInfo = purchaseOrders[0];\n // happy path\n setActivePosEntity(poInfo.id, poInfo.vendOrdId, true);\n setModal(\n getPurchaseOrderDetailsModalConfigWithDeepLink(\n combineWithTicketGroupIdSimple(poInfo.id, ticketGroupId)\n )\n );\n\n return true;\n } else {\n setSearchResults(\n purchaseOrders.toSorted((a, b) => {\n return a.poDate && b.poDate\n ? a.poDate < b.poDate\n ? 1\n : -1\n : 0;\n })\n );\n launchDialog();\n }\n }\n } finally {\n setIsLoadingSearch(false);\n }\n }\n\n return false;\n },\n [\n activeAccountWebClientConfig,\n hasFullPageEventViewEntitySelection,\n isLoadingSearch,\n isModalOpen,\n launchDialog,\n purchase?.id,\n purchase?.vendOrdId,\n setActivePosEntity,\n setFilterQuery,\n setModal,\n showErrorDialog,\n tempQuery,\n ]\n );\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const debouncedOnSearchChange = useCallback(\n debounce((text: string) => {\n if (text !== purchaseQuery.searchText) {\n setFilterQuery({\n ...purchaseQuery,\n searchText: text || null,\n });\n }\n }, 200),\n [purchaseQuery]\n );\n\n const onResultItemPicked = useCallback(\n (purchaseOrder: PurchaseOrder) => {\n setActivePosEntity(purchaseOrder.id, purchaseOrder.vendOrdId, true);\n setModal(\n getPurchaseOrderDetailsModalConfigWithDeepLink(purchaseOrder.id)\n );\n\n // We do not want to close the search dialog as users may want to click each one\n // We'll let them close the search dialog manually\n },\n [setActivePosEntity, setModal]\n );\n\n const location = useLocation();\n\n const activeId = getDeepLinkIdFromUrl(\n PurchaseDeeplinkQueryParam,\n window.location.href\n );\n\n useEffect(() => {\n if (activeId?.length) {\n onLookupById(activeId, false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [activeId]);\n\n useEffect(() => {\n if (!hasFullPageEventViewEntitySelection) {\n return;\n }\n\n // Since we only support id searching in flattened view for Purchases, reset filters when view mode changes\n if (\n purchaseQuery.viewMode !== PurchaseViewMode.FlattenedView &&\n !isEventPage &&\n purchaseQuery.marketplaceEntityIds\n ) {\n setFilterQuery({\n ...purchaseQuery,\n marketplaceEntityIds: null,\n searchText: null,\n });\n setSearchText('');\n }\n }, [\n purchaseQuery.marketplaceEntityIds,\n purchaseQuery.viewMode,\n isEventPage,\n purchaseQuery,\n setFilterQuery,\n hasFullPageEventViewEntitySelection,\n ]);\n\n useEffect(() => {\n if (\n purchaseQuery.marketplaceEntityIds &&\n hasFullPageEventViewEntitySelection\n ) {\n return;\n }\n setSearchText(purchaseQuery.searchText ?? '');\n }, [\n hasFullPageEventViewEntitySelection,\n purchaseQuery.marketplaceEntityIds,\n purchaseQuery.searchText,\n ]);\n\n useEffect(() => {\n if (!hasFullPageEventViewEntitySelection) {\n return;\n }\n\n const queryFromUrl = getQueryFromUrl(\n initialQuery,\n location.search\n );\n\n if (\n Array.isArray(queryFromUrl?.marketplaceEntityIds) &&\n queryFromUrl?.marketplaceEntityIds.length\n ) {\n setSearchText(() =>\n queryFromUrl?.marketplaceEntityIds\n ? queryFromUrl?.marketplaceEntityIds.join(',')\n : ''\n );\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [hasFullPageEventViewEntitySelection, initialQuery, setFilterQuery]);\n\n return (\n <>\n onLookupById(value, true)}\n onEventSearch={(value) => debouncedOnSearchChange(value)}\n searchText={searchText}\n setSearchText={setSearchText}\n clearSearchEntity={clearSearchEntity}\n disableSearchMode={isEventPage}\n />\n \n }\n resultItems={searchResults || []}\n renderItem={(purchaseOrder: PurchaseOrderDetails) => (\n \n )}\n onResultItemPicked={onResultItemPicked}\n onCancel={closeDialog}\n />\n \n );\n};\n","import { useContext, useEffect } from 'react';\nimport { useToggle } from 'react-use';\nimport { BackSection } from 'src/components/common/BackSection';\nimport { BulkEditStatusPopover } from 'src/components/common/BulkActions/BulkEditStatusPopover';\nimport { MultiSelectionToggleGlobal } from 'src/components/common/MultiSelect/Toggle/MultiSelectionToggleGlobal';\nimport { FilterToolbar } from 'src/components/FilterToolbar';\nimport { useFiltersHelpers } from 'src/components/FilterToolbar/useFiltersHelpers';\nimport { ViewModeSelector } from 'src/components/MainFilterBar';\nimport * as styles from 'src/components/MainFilterBar/MainFilterBar.css';\nimport {\n purchaseMandatoryFiltersToShow,\n usePurchaseFilters,\n} from 'src/components/MainFilterBar/usePurchaseFilters';\nimport { PurchaseGlobalActionsPermissionsWrapper } from 'src/components/Purchases/PurchaseFilterBar/PurchaseGlobalActionsPermissionsWrapper';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { LaunchBulkUploadPurchaseDialog } from 'src/dialogs/BulkEdits/BulkUploadPurchaseDialog';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { useFilterToolbarQuickFilters } from 'src/hooks/useQuickFilters';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport { MessagesAddSourceModal } from 'src/modals/MessagesAddSourceModal/MessagesAddSourceModal';\nimport { PurchaseWizardModalConfig } from 'src/modals/PurchaseWizard/PurchaseWizardModalConfig';\nimport { IconsFill, SettingsIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { PURCHASE_VIEW_MODE_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport {\n ActionOutboxEntityType,\n Feature,\n Permission,\n PurchaseOrderDetails,\n PurchaseOrderQuery,\n PurchaseViewMode,\n UserSetting,\n} from 'src/WebApiController';\n\nimport { PurchaseGlobalActionDropdown } from '../PurchaseActionDropdown';\nimport { useDefaultPurchaseFilters } from './hooks/useDefaultPurchaseFilters';\nimport { PURCHASE_VIEW_MODE_TO_ICON } from './PurchaseFilterBar.types';\nimport { PurchaseSearchBox } from './PurchaseSearchBox';\n\nexport function PurchaseFilterBar({\n isEventPage = false,\n returnUrl,\n posEventId,\n}: {\n isEventPage?: boolean;\n returnUrl?: string;\n posEventId?: string;\n}) {\n const { setModal } = useContext(ModalContext);\n const { selectionMode, setSelectionMode } = useMultiSelectionContext();\n const [isAddSourceModalOpen, setIsAddSourceModalOpen] = useToggle(false);\n const { setActivePosEntity } =\n useActivePosEntityContext();\n\n const hasCreatePermission = useUserHasAnyOfPermissions(\n Permission.Purchases_Create\n );\n\n const hasBulkEditInPurchaseEventFeature = useUserHasFeature(\n Feature.BulkEditInPurchaseEvent\n );\n\n const hasNewSearchFeature = useUserHasFeature(Feature.SearchView_Purchase);\n\n const {\n filterQuery: purchaseQuery,\n initialQuery,\n tempQuery,\n setFilterQuery,\n setTempQuery,\n resetTempQuery,\n } = useFilterQueryContext();\n\n const onCloseAddSourceModal = () => {\n setIsAddSourceModalOpen(false);\n };\n\n useEffect(() => {\n setTempQuery(purchaseQuery);\n }, [purchaseQuery, setTempQuery]);\n\n const defaultQuickFilters = useDefaultPurchaseFilters({\n purchaseQuery,\n initialQuery,\n });\n\n const { value: defaultViewModeUserSetting, setUserSetting } =\n useServerUserSetting({\n id: UserSetting.PurchasePageViewMode,\n currentLoginUserOnly: true,\n });\n\n const filterToolbarProps = useFilterToolbarQuickFilters({\n quickFiltersStateSetting: UserSetting.QuickFiltersStatePurchases,\n customQuickFiltersSetting: UserSetting.QuickFiltersCustomPurchases,\n defaultQuickFilters,\n currentQuery: purchaseQuery,\n initialQuery,\n onSelect: ({ id, query }) => {\n if (query.viewMode != null) {\n // We need to update initialQuery, otherwise the quick filter \"All\"\n // may change the current view mode\n if (query.viewMode !== initialQuery.viewMode) {\n initialQuery.viewMode = query.viewMode;\n }\n }\n setFilterQuery(query);\n\n // This needs to happen after to reduce re-rendering\n if (query.viewMode != null) {\n // Update user setting view mode too so it won't revert the filter query viewMode\n if (query.viewMode !== defaultViewModeUserSetting) {\n setUserSetting(query.viewMode);\n }\n }\n },\n });\n\n const isMobile = useMatchMedia('mobile');\n\n const onAddPurchase = () => {\n setActivePosEntity(0);\n setModal(PurchaseWizardModalConfig);\n };\n\n const purchaseFilters = usePurchaseFilters({\n showMetricsIndicationOnFilters: true,\n });\n\n const { appliedFilters } = useFiltersHelpers({\n filters: purchaseFilters,\n activeQuery: purchaseQuery,\n mandatoryFiltersToShow: purchaseMandatoryFiltersToShow,\n initialQuery,\n });\n\n useEffect(() => {\n if (\n purchaseQuery.viewMode === PurchaseViewMode.EventTileView &&\n selectionMode &&\n !hasBulkEditInPurchaseEventFeature\n ) {\n setSelectionMode(undefined);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [purchaseQuery.viewMode]);\n\n return (\n <>\n
    \n
    \n
    \n {isEventPage && (\n \n )}\n {purchaseQuery && (\n {\n setFilterQuery(tempQuery);\n }}\n mandatoryFiltersToShow={purchaseMandatoryFiltersToShow}\n filters={purchaseFilters}\n filterAppliedIds={appliedFilters}\n resetTempQuery={resetTempQuery}\n tempQuery={tempQuery}\n />\n )}\n
    \n
    \n
    \n
    \n {!isMobile && (\n <>\n {!isEventPage && (\n <>\n \n \n {(purchaseQuery.viewMode !==\n PurchaseViewMode.EventTileView ||\n hasBulkEditInPurchaseEventFeature) && (\n \n \n \n )}\n \n )}\n\n {(!hasNewSearchFeature || isEventPage) && (\n \n )}\n \n )}\n
    \n
    \n
    \n {isMobile && (\n
    \n
    \n
    \n \n {hasCreatePermission && (\n <>\n \n \n \n\n {!isMobile && (\n \n )}\n\n {!isMobile && (\n <>\n \n \n \n \n\n \n \n )}\n \n )}\n \n\n \n \n \n \n \n \n \n\n \n \n
    \n
    \n
    \n )}\n \n );\n}\n","import { useMemo } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { QuickFilter } from 'src/hooks/useQuickFilters';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n DateRangePresetName,\n getDateRangePresets,\n} from 'src/utils/dateTimeUtils';\nimport {\n DateTimeRangeWithRelative,\n SaleQuery,\n UserSetting,\n} from 'src/WebApiController';\n\nexport const useDefaultSaleFilters = ({\n saleQuery,\n initialQuery,\n}: {\n saleQuery: SaleQuery;\n initialQuery: SaleQuery;\n}) => {\n const defaultQuickFilters = useMemo(() => {\n const [last30DaysPreset] = getDateRangePresets([\n DateRangePresetName.Last30Days,\n ]);\n const filters = [\n {\n id: 'recentlySold',\n name: ,\n data: {\n ...initialQuery,\n eventTimeFrameFilter: null,\n saleDates: {\n start: last30DaysPreset.range.start.toISOString(),\n end: last30DaysPreset.range.end.toISOString(),\n } as DateTimeRangeWithRelative,\n },\n },\n ];\n\n // Default filters aren't supposed to change view mode\n filters.forEach((f: QuickFilter) => {\n f.data.viewMode = saleQuery.viewMode;\n });\n return filters;\n }, [initialQuery, saleQuery.viewMode]);\n\n return defaultQuickFilters;\n};\n","import { ReactNode } from 'react';\nimport { FlattenedViewIcon } from 'src/svgs/FlattenedViewIcon';\nimport { TileViewIcon } from 'src/svgs/TileViewIcon';\nimport { IconsFill } from 'src/svgs/Viagogo';\nimport { SalesViewMode } from 'src/WebApiController';\n\nexport const SALE_VIEW_MODE_TO_ICON: Record = {\n [SalesViewMode.TileView]: (\n \n ),\n [SalesViewMode.FlattenedView]: (\n \n ),\n};\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport const SaleIdContainer = styled.div`\n display: flex;\n align-items: baseline;\n flex-wrap: wrap;\n color: ${({ theme: { colors } }) => colors.textPrimary};\n`;\n\nexport const AttrLabel = styled.span`\n vertical-align: baseline;\n text-transform: uppercase;\n ${({ theme: { typography } }) => typography.getStyles('caption2', 'regular')}\n`;\n\nexport const AttrValue = styled.span`\n margin: ${() => `0 ${vars.spacing.xxs}`};\n font-size: ${() => vars.typography.fontSize['sm']};\n font-weight: 400;\n line-height: 20px;\n\n ${({ theme: { media } }) =>\n `${media.makeMediaQuery(\n media.breakpoints.md,\n `\n font-size: ${() => vars.typography.fontSize['lg']};\n line-height: 24px;\n }`\n )}`}\n`;\n","import { MerchantDisplay } from 'src/components/common/MerchantDisplay';\nimport { SeatingInfo } from 'src/components/common/SeatingInfo';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Sale } from 'src/WebApiController';\n\nimport * as styles from './SaleBasicInfo.css';\nimport { AttrLabel, AttrValue, SaleIdContainer } from './SaleBasicInfo.styled';\n\nexport const SaleBasicInfo = ({ sale }: { sale: Sale }) => {\n const saleIdLabel = useContent(ContentId.SaleId);\n const marketplaceLabel = useContent(ContentId.Merchant);\n\n return (\n /* TODO - search by sale id being mainly used with marketplace sale id (which can yield multiple results if we have multiple marketplaces that use the same ids)\n We are displaying Sale info without the Event's info, but there is several reason we don't need to show the Event info right now, mainly...\n 1 - Event info currently is expensive to get (calling catalog API) - when we bring catalog API info in-house, we can add it performantly\n 2 - We don't need Event info yet, because currently all our sales are from StubHub, and so NO user will see this dialog\n 3 - This might actually be replaced with the Universal Search anyway (when we have both catalog in-house and the search index).\n */\n
    \n \n {saleIdLabel}\n {sale.idOnMkp || sale.id}\n {marketplaceLabel}\n \n \n \n \n \n
    \n );\n};\n","import { debounce } from 'lodash-es';\nimport { useCallback, useContext, useEffect, useState } from 'react';\nimport { useLocation } from 'react-router-dom';\nimport { EventEntitySearchBox } from 'src/components/Accordions/EventEntitySearchBox';\nimport { SaleBasicInfo } from 'src/components/Sales/SaleBasicInfo';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { FormatContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { SearchResultPickerDialog } from 'src/dialogs/SearchResultPickerDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { SaleDeeplinkQueryParam } from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { getDeepLinkIdFromUrl } from 'src/utils/deepLinkUtils';\nimport { DefaultSaleQuery, getQueryFromUrl } from 'src/utils/eventQueryUtils';\nimport { getSaleDetailsModalConfigWithDeepLink } from 'src/utils/saleUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n Feature,\n Sale,\n SaleClient,\n SaleDetails,\n SaleQuery,\n SalesViewMode,\n} from 'src/WebApiController';\n\nexport function SaleSearchBox({ isEventPage }: { isEventPage?: boolean }) {\n const { posEntity: sale, setActivePosEntity } =\n useActivePosEntityContext();\n const { closeDialog, launchDialog, dialogProps } = useBasicDialog();\n const { setModal, isModalOpen } = useContext(ModalContext);\n const { activeAccountWebClientConfig } = useAppContext();\n\n const [searchId, setSearchId] = useState();\n const [searchResults, setSearchResults] = useState();\n const [isLoadingSearch, setIsLoadingSearch] = useState(false);\n const [searchText, setSearchText] = useState('');\n\n const { showErrorDialog } = useErrorBoundaryContext();\n const hasFullPageEventViewEntitySelection = useUserHasFeature(\n Feature.FullPageEventViewEntitySelection\n );\n\n const {\n filterQuery: saleQuery,\n initialQuery,\n tempQuery,\n setFilterQuery,\n } = useFilterQueryContext();\n\n const location = useLocation();\n\n useEffect(() => {\n if (!hasFullPageEventViewEntitySelection) {\n return;\n }\n\n const queryFromUrl = getQueryFromUrl(\n initialQuery,\n location.search\n );\n\n if (\n Array.isArray(queryFromUrl?.entityIds) &&\n queryFromUrl?.entityIds.length\n ) {\n setSearchText((prev) =>\n queryFromUrl?.entityIds ? queryFromUrl?.entityIds.join(',') : prev\n );\n } else if (\n Array.isArray(queryFromUrl?.marketplaceEntityIds) &&\n queryFromUrl?.marketplaceEntityIds.length\n ) {\n setSearchText((prev) =>\n queryFromUrl?.marketplaceEntityIds\n ? queryFromUrl?.marketplaceEntityIds.join(',')\n : prev\n );\n }\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [initialQuery, hasFullPageEventViewEntitySelection]);\n\n const { marketplaceEntityIds, searchText: saleQuerySearchText } = saleQuery;\n useEffect(() => {\n if (marketplaceEntityIds && hasFullPageEventViewEntitySelection) {\n return;\n }\n\n if (saleQuerySearchText) {\n setSearchText(saleQuerySearchText);\n } else if (marketplaceEntityIds && Array.isArray(marketplaceEntityIds)) {\n const ids = marketplaceEntityIds.join(',');\n if (ids.length > 0) {\n setSearchText(ids);\n }\n }\n }, [\n hasFullPageEventViewEntitySelection,\n marketplaceEntityIds,\n saleQuerySearchText,\n ]);\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const debouncedOnSearchChange = useCallback(\n debounce((text: string) => {\n if (text !== saleQuery.searchText) {\n setFilterQuery({\n ...saleQuery,\n searchText: text || null,\n });\n }\n }, 200),\n [saleQuery]\n );\n\n const activeDeepLinkSaleId = getDeepLinkIdFromUrl(\n SaleDeeplinkQueryParam,\n window.location.href\n );\n\n const onLookupById = useCallback(\n async (id: string, isSearching: boolean) => {\n if (!id && (tempQuery.entityIds || tempQuery.marketplaceEntityIds)) {\n const newQuery = {\n ...tempQuery,\n entityIds: null,\n marketplaceEntityIds: null,\n };\n setFilterQuery({ ...newQuery });\n return;\n }\n if (id && !isLoadingSearch) {\n if (\n sale?.idOnMkp === id ||\n String(sale?.id) === id ||\n activeDeepLinkSaleId === id\n ) {\n // If the id hasn't changed, check that if it's open, if it's not, open it\n if (!isModalOpen) {\n if (activeDeepLinkSaleId) {\n setActivePosEntity(\n Number(activeDeepLinkSaleId),\n undefined,\n false\n );\n }\n setModal(getSaleDetailsModalConfigWithDeepLink(sale?.id));\n }\n\n // Else, just don't do anything\n return;\n }\n\n const matchedIds = id\n .split(',')\n .filter((s) => s.trim())\n .map((s) => s.trim()); // split by commas and remove all empty ones\n\n if (matchedIds.length > 1) {\n const newQuery = {\n ...DefaultSaleQuery,\n entityIds: null,\n marketplaceEntityIds: matchedIds,\n viewMode: SalesViewMode.FlattenedView,\n };\n setFilterQuery(newQuery);\n return;\n } else if (tempQuery.entityIds || tempQuery.marketplaceEntityIds) {\n const newQuery = {\n ...tempQuery,\n entityIds: null,\n marketplaceEntityIds: null,\n };\n setFilterQuery(newQuery);\n }\n\n setSearchId(id);\n setIsLoadingSearch(true);\n\n try {\n // when user enter a text here, we don't know whether they entered the sale id or unique id\n // since 99% of the time they'll be entering a sale id, we try to lookup by that first\n const sales = isSearching\n ? await tryInvokeApi(\n () =>\n new SaleClient(\n activeAccountWebClientConfig\n ).getSalesByMarketplaceSaleId(id),\n (error) => {\n showErrorDialog(\n 'SaleClient.getSalesByMarketplaceSaleId',\n error,\n { trackErrorData: { saleId: id } }\n );\n }\n )\n : null;\n\n if (!sales || sales.length === 0) {\n const idNum = Number(id);\n if (isNaN(idNum)) {\n // If we can't find by either PO external id or internal id, just launch empty search result dialog\n launchDialog();\n return false;\n }\n\n // If we didn't find any sales by market-place-sale-id, assume this is a unique id search\n setActivePosEntity(idNum, undefined, true);\n setModal(getSaleDetailsModalConfigWithDeepLink(idNum));\n\n return true;\n } else {\n // We have sales using the market place id\n // 99% of the time, the id should be unique, but if we support more than 1 marketplaces\n // the ids may collide and return more than one result, therefore we need to present to the user and ask them what they want\n if (sales.length === 1) {\n const saleInfo = sales[0];\n // happy path\n setActivePosEntity(saleInfo.id, saleInfo.idOnMkp, true);\n setModal(\n getSaleDetailsModalConfigWithDeepLink(saleInfo.id, true)\n );\n\n return true;\n } else {\n setSearchResults(sales);\n launchDialog();\n }\n }\n } finally {\n setIsLoadingSearch(false);\n }\n }\n\n return false;\n },\n [\n activeAccountWebClientConfig,\n activeDeepLinkSaleId,\n isLoadingSearch,\n isModalOpen,\n launchDialog,\n sale,\n setActivePosEntity,\n setFilterQuery,\n setModal,\n showErrorDialog,\n tempQuery,\n ]\n );\n\n const clearSearchEntity = useCallback(() => {\n const newQuery = {\n ...tempQuery,\n searchText: null,\n entityIds: null,\n marketplaceEntityIds: null,\n };\n setFilterQuery(newQuery);\n }, [tempQuery, setFilterQuery]);\n\n const onResultItemPicked = useCallback(\n (sale: Sale) => {\n setActivePosEntity(sale.id, sale.idOnMkp, true);\n setModal(getSaleDetailsModalConfigWithDeepLink(sale.id, true));\n\n // We do not want to close the search dialog as users may want to click each one\n // We'll let them close the search dialog manually\n },\n [setActivePosEntity, setModal]\n );\n\n useEffect(() => {\n if (activeDeepLinkSaleId?.length) {\n onLookupById(activeDeepLinkSaleId, false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [activeDeepLinkSaleId]);\n\n return (\n <>\n onLookupById(value, true)}\n onEventSearch={(value) => debouncedOnSearchChange(value)}\n searchText={searchText}\n setSearchText={setSearchText}\n clearSearchEntity={clearSearchEntity}\n disableSearchMode={isEventPage}\n />\n\n \n }\n resultItems={searchResults || []}\n renderItem={(sale: Sale) => }\n onResultItemPicked={onResultItemPicked}\n onCancel={closeDialog}\n />\n \n );\n}\n","import { useEffect } from 'react';\nimport { BackSection } from 'src/components/common/BackSection';\nimport { BulkEditStatusPopover } from 'src/components/common/BulkActions/BulkEditStatusPopover';\nimport { MultiSelectionToggleGlobal } from 'src/components/common/MultiSelect/Toggle/MultiSelectionToggleGlobal';\nimport { FilterToolbar } from 'src/components/FilterToolbar';\nimport { useFiltersHelpers } from 'src/components/FilterToolbar/useFiltersHelpers';\nimport {\n saleMandatoryFiltersToShow,\n useSaleFilters,\n ViewModeSelector,\n} from 'src/components/MainFilterBar';\nimport * as styles from 'src/components/MainFilterBar/MainFilterBar.css';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { useFilterToolbarQuickFilters } from 'src/hooks/useQuickFilters';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport { SALES_VIEW_MODE_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport {\n ActionOutboxEntityType,\n Feature,\n SaleQuery,\n SalesViewMode,\n UserSetting,\n} from 'src/WebApiController';\nimport Swiper from 'swiper';\n\nimport { SwiperButton } from '../../Buttons/SwiperButton';\nimport { SalesGlobalActionDropdown } from '../SalesActionDropdown';\nimport { useDefaultSaleFilters } from './hooks/useDefaultSaleFilters';\nimport { SALE_VIEW_MODE_TO_ICON } from './SaleFilterBar.types';\nimport { SaleSearchBox } from './SaleSearchBox';\n\nexport function SaleFilterBar({\n isSearchOnly,\n isEventPage = false,\n returnUrl,\n posEventId,\n swiperRef,\n}: {\n isSearchOnly?: boolean;\n isEventPage?: boolean;\n returnUrl?: string;\n posEventId?: string;\n swiperRef?: React.MutableRefObject;\n}) {\n const hasNewSearchFeature = useUserHasFeature(Feature.SearchView_Sale);\n\n const {\n filterQuery: saleQuery,\n initialQuery,\n tempQuery,\n setFilterQuery,\n setTempQuery,\n resetTempQuery,\n } = useFilterQueryContext();\n\n useEffect(() => {\n setTempQuery(saleQuery);\n }, [saleQuery, setTempQuery]);\n\n const defaultQuickFilters = useDefaultSaleFilters({\n saleQuery,\n initialQuery,\n });\n\n const { value: defaultViewModeUserSetting, setUserSetting } =\n useServerUserSetting({\n id: UserSetting.SalePageViewMode,\n currentLoginUserOnly: true,\n });\n\n const filterToolbarProps = useFilterToolbarQuickFilters({\n quickFiltersStateSetting: UserSetting.QuickFiltersStateSales,\n customQuickFiltersSetting: UserSetting.QuickFiltersCustomSales,\n defaultQuickFilters,\n currentQuery: saleQuery,\n initialQuery,\n onSelect: ({ query }) => {\n if (query.viewMode != null) {\n // We need to update initialQuery, otherwise the quick filter \"All\"\n // may change the current view mode\n if (query.viewMode !== initialQuery.viewMode) {\n initialQuery.viewMode = query.viewMode;\n }\n }\n setFilterQuery(query);\n\n // This needs to happen after to reduce re-rendering\n if (query.viewMode != null) {\n // Update user setting view mode too so it won't revert the filter query viewMode\n if (query.viewMode !== defaultViewModeUserSetting) {\n setUserSetting(query.viewMode);\n }\n }\n },\n });\n\n const { filters: saleFilters } = useSaleFilters({\n showMetricsIndicationOnFilters: true,\n });\n\n const isMobile = useMatchMedia('mobile');\n\n const { appliedFilters } = useFiltersHelpers({\n filters: saleFilters,\n activeQuery: saleQuery,\n mandatoryFiltersToShow: saleMandatoryFiltersToShow,\n initialQuery,\n });\n\n const filterToolbar = saleQuery && (\n {\n setFilterQuery(tempQuery);\n }}\n filters={saleFilters}\n mandatoryFiltersToShow={saleMandatoryFiltersToShow}\n resetTempQuery={resetTempQuery}\n tempQuery={tempQuery}\n />\n );\n\n return isSearchOnly ? (\n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n {!isEventPage && (\n <>\n \n {!isMobile && (\n \n )}\n \n \n\n \n \n )}\n
    \n
    \n
    \n ) : (\n
    \n {isMobile ? (\n filterToolbar\n ) : (\n <>\n
    \n
    \n {isEventPage && (\n \n )}\n {filterToolbar}\n
    \n
    \n
    \n
    \n {!isEventPage && (\n <>\n \n \n \n \n \n )}\n\n {(!hasNewSearchFeature || isEventPage) && (\n \n )}\n
    \n
    \n \n )}\n
    \n );\n}\n","import { ReactNode } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { MainRoute } from 'src/navigations/Routes/MainRoute';\nimport { isInFullPageEventView } from 'src/utils/deepLinkUtils';\nimport { Feature } from 'src/WebApiController';\nimport Swiper from 'swiper';\n\nimport { ListingFilterBar } from '../Listings/ListingFilterBar';\nimport { OnSaleEventFilterBar } from '../OnSaleEvent/OnSaleEventFilterBar';\nimport { PurchaseFilterBar } from '../Purchases/PurchaseFilterBar/PurchaseFilterBar';\nimport { SaleFilterBar } from '../Sales/SaleFilterBar';\nimport * as styles from './MainFilterBar.css';\n\nexport function MainFilterBar(props: {\n isEventPage?: boolean;\n returnUrl?: string;\n posEventId?: string;\n swiperRef?: React.MutableRefObject;\n}) {\n const { isEventPage, returnUrl, posEventId, swiperRef, ...sharedProps } =\n props;\n const { mainRoute } = useAppContext();\n\n const hasHideNavAndFilterBarsFeature = useUserHasFeature(\n Feature.HideNavAndFilterBars\n );\n\n if (hasHideNavAndFilterBarsFeature && isInFullPageEventView(mainRoute)) {\n return null;\n }\n\n return mainRoute === MainRoute.Inventory ||\n mainRoute === MainRoute.InventoryEvent ? (\n \n ) : mainRoute == MainRoute.Discovery ? (\n \n ) : mainRoute === MainRoute.Purchases ||\n mainRoute === MainRoute.PurchasesEvent ? (\n \n ) : (\n \n );\n}\n\ntype MainFilterBarDivProps = { children: ReactNode };\nexport const MainFilterBarDiv = ({ children }: MainFilterBarDivProps) => {\n return
    {children}
    ;\n};\n","import { formatInTimeZone } from 'date-fns-tz';\nimport { PurchaseVendorSelector } from 'src/components/Selectors/PurchaseVendorSelector';\nimport { SellerAccountEmployeeSelector } from 'src/components/Selectors/SellerAccountEmployeeSelector';\nimport { UserGroupSelector } from 'src/components/Selectors/UserGroupSelector';\nimport { TOTAL_VALUE_LENGTH_LIMIT } from 'src/components/TagsFormBody/TagValueCell';\nimport { useSiteTimezoneContext } from 'src/contexts/SiteTimezoneContext/SiteTimezoneContext';\nimport { DatePickerInput } from 'src/core/POS/DateSelector';\nimport { PosEnumSelect, PosSelect } from 'src/core/POS/PosSelect';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n BOOLEAN_OPTIONS_CONTENT,\n MARKET_PLACE_TO_CID,\n} from 'src/utils/constants/contentIdMaps';\nimport { ToMarketplaceEnum } from 'src/utils/tagUtils';\nimport { Marketplace, TagsValueType } from 'src/WebApiController';\n\nexport type TagInfoFilter = {\n tagName: string | null;\n tagValue: string | null;\n};\n\nexport const TagValueFilterInput = ({\n value,\n valueType,\n onChange,\n disabled,\n}: {\n disabled?: boolean;\n value: string;\n valueType?: TagsValueType | null;\n onChange: (newValue: string) => void;\n}) => {\n const { timeZone, timezoneOffsetMins } = useSiteTimezoneContext();\n return (\n <>\n {valueType === TagsValueType.Date ? (\n \n {\n const newDate = value ? new Date(value) : new Date();\n newDate.setFullYear(date.getFullYear());\n newDate.setMonth(date.getMonth());\n newDate.setDate(date.getDate());\n\n // Setting to yyyy-MM-dd format to match ISO format\n onChange(formatInTimeZone(newDate, timeZone, 'yyyy-MM-dd'));\n }}\n disabled={disabled}\n />\n \n ) : valueType === TagsValueType.Marketplace ? (\n {\n onChange(Marketplace[value as keyof typeof Marketplace]);\n }}\n disabled={disabled}\n valueOptionsContent={MARKET_PLACE_TO_CID}\n />\n ) : valueType === TagsValueType.Boolean ? (\n \n ) : valueType === TagsValueType.POSUser ? (\n \n ) : valueType === TagsValueType.UserGroup ? (\n \n ) : valueType === TagsValueType.Vendor ? (\n \n ) : (\n {\n const newValue = e.target.value ?? null;\n onChange(newValue);\n }}\n maxLength={TOTAL_VALUE_LENGTH_LIMIT}\n />\n )}\n \n );\n};\n","import { useMemo } from 'react';\nimport {\n FilterToolbarGroup,\n FilterToolbarItemId,\n} from 'src/components/Filters';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { PosSelect } from 'src/core/POS/PosSelect';\nimport { useTagsForEntityType } from 'src/hooks/useTagsForEntityType';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ActionOutboxEntityType } from 'src/WebApiController';\n\nimport { TagValueFilterInput } from './TagValueFilterInput';\n\nexport type EventTagInfoFilter = {\n eventTagName: string | null;\n eventTagValue: string | null;\n};\n\nexport const useEventTagFilters = (\n query: TFilter,\n setQuery: (query: TFilter) => void\n): FilterToolbarGroup => {\n const { tagsMetadata: existingTagsMetadata = [] } = useTagsForEntityType(\n ActionOutboxEntityType.SellerEvent\n );\n\n const noTagsMsg = useContent(ContentId.NoTagsExist);\n\n const selectedTagMetadata = useMemo(() => {\n return (existingTagsMetadata ?? []).find(\n (r) => r.key === query.eventTagName\n );\n }, [existingTagsMetadata, query.eventTagName]);\n\n const keyOptionsContent = useMemo(() => {\n const keyOptions = (existingTagsMetadata ?? [])\n .toSorted((r1, r2) => r1.key.localeCompare(r2.key))\n .reduce(\n (re, r) => {\n re[r.key] = r.key;\n return re;\n },\n {} as Record\n );\n\n return keyOptions ?? {};\n }, [existingTagsMetadata]);\n\n const noTagsExist = useMemo(() => {\n return existingTagsMetadata?.length === 0;\n }, [existingTagsMetadata]);\n\n return {\n titleContentId: ContentId.EventTag,\n type: 'row',\n items: [\n {\n filterId: 'eventTagName' as const,\n labelContentId: ContentId.Name,\n filterQueryKeys: ['eventTagName'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (query.eventTagName !== newValue) {\n setQuery({\n ...query,\n eventTagName: newValue,\n eventTagValue: null,\n });\n }\n }}\n value={query.eventTagName ?? ''}\n displayText={noTagsExist ? noTagsMsg : (query.eventTagName ?? '')}\n searchable\n disabled={noTagsExist}\n valueOptionsContent={keyOptionsContent}\n placeholderText={ContentId.None}\n enableEmptySelection\n />\n ),\n },\n {\n filterId: 'eventTagValue' as const,\n labelContentId: ContentId.Value,\n filterQueryKeys: ['eventTagValue'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (query.eventTagValue !== newValue) {\n setQuery({\n ...query,\n eventTagValue: newValue,\n });\n }\n }}\n />\n ),\n },\n ].filter((f) => f!),\n };\n};\n","import { useMemo } from 'react';\nimport {\n FilterToolbarGroup,\n FilterToolbarItemId,\n} from 'src/components/Filters';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { PosSelect } from 'src/core/POS/PosSelect';\nimport { useTagsForEntityType } from 'src/hooks/useTagsForEntityType';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ActionOutboxEntityType } from 'src/WebApiController';\n\nimport { TagValueFilterInput } from './TagValueFilterInput';\n\nexport type TagInfoFilter = {\n tagName: string | null;\n tagValue: string | null;\n};\n\nexport const useTagFilters = (\n query: TFilter,\n setQuery: (query: TFilter) => void,\n entityType:\n | ActionOutboxEntityType.Listing\n | ActionOutboxEntityType.Purchase\n | ActionOutboxEntityType.Sale\n): FilterToolbarGroup => {\n const { tagsMetadata: existingTagsMetadata = [] } =\n useTagsForEntityType(entityType);\n\n const noTagsMsg = useContent(ContentId.NoTagsExist);\n\n const selectedTagMetadata = useMemo(() => {\n return (existingTagsMetadata ?? []).find((r) => r.key === query.tagName);\n }, [existingTagsMetadata, query.tagName]);\n\n const keyOptionsContent = useMemo(() => {\n const keyOptions = (existingTagsMetadata ?? [])\n .toSorted((r1, r2) => r1.key.localeCompare(r2.key))\n .reduce(\n (re, r) => {\n re[r.key] = r.key;\n return re;\n },\n {} as Record\n );\n\n return keyOptions ?? {};\n }, [existingTagsMetadata]);\n\n const noTagsExist = useMemo(() => {\n return (existingTagsMetadata ?? []).length === 0;\n }, [existingTagsMetadata]);\n\n const titleContentId =\n entityType === ActionOutboxEntityType.Listing\n ? ContentId.InventoryTag\n : entityType === ActionOutboxEntityType.Sale\n ? ContentId.SaleTag\n : ContentId.PurchaseTag;\n\n return {\n titleContentId: titleContentId,\n type: 'row',\n items: [\n {\n filterId: 'tagName' as const,\n labelContentId: ContentId.Name,\n filterQueryKeys: ['tagName'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (query.tagName !== newValue) {\n setQuery({\n ...query,\n tagName: newValue,\n tagValue: null,\n });\n }\n }}\n value={query.tagName ?? ''}\n displayText={noTagsExist ? noTagsMsg : (query.tagName ?? '')}\n searchable\n disabled={noTagsExist}\n valueOptionsContent={keyOptionsContent}\n placeholderText={ContentId.None}\n enableEmptySelection\n shape=\"rectFull\"\n />\n ),\n },\n {\n filterId: 'tagValue' as const,\n labelContentId: ContentId.Value,\n filterQueryKeys: ['tagValue'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (query.tagValue !== newValue) {\n setQuery({\n ...query,\n tagValue: newValue,\n });\n }\n }}\n />\n ),\n },\n ].filter((f) => f!),\n };\n};\n","import { FilterToolbarItem, FilterToolbarItemId } from 'src/components/Filters';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { DateRangeSelector } from 'src/core/POS/DateRangeSelector';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n getDisabledDatesForTimeFrameFilter,\n StandardDateRangePresetNames,\n} from 'src/utils/dateTimeUtils';\nimport { Feature, ListingQuery } from 'src/WebApiController';\n\nexport const useEventLastReviewedFilters = (): FilterToolbarItem[] => {\n const { initialQuery, tempQuery, setTempQuery } =\n useFilterQueryContext();\n\n return [\n {\n filterId: 'eventNotReviewedSinceDate' as FilterToolbarItemId,\n labelContentId: ContentId.EventNotReviewedSince,\n filterQueryKeys: ['eventNotReviewedSinceDate'] as FilterToolbarItemId[],\n filterItem: (\n \n setTempQuery({\n ...tempQuery,\n eventNotReviewedSinceDate: value,\n })\n }\n disabledDay={(d) =>\n getDisabledDatesForTimeFrameFilter(\n d,\n tempQuery.eventTimeFrameFilter\n )\n }\n />\n ),\n },\n ];\n};\n","import { isEqual } from 'lodash-es';\nimport { useMemo } from 'react';\nimport { useInternalNotesFilter } from 'src/components/Filters/InternalNotesFilter';\nimport { useMergedTagFilters } from 'src/components/MainFilterBar/Tags/useMergedTagFilters';\nimport { SellerAccountEmployeeSelector } from 'src/components/Selectors/SellerAccountEmployeeSelector';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { DateRangeSelector } from 'src/core/POS/DateRangeSelector';\nimport { PosEnumMultiSelect } from 'src/core/POS/PosMultiSelect/PosEnumMultiSelect';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { vars } from 'src/core/themes';\nimport { Slider } from 'src/core/ui/Slider';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { MetricsIcon } from 'src/svgs/MetricsIcon';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n AUTO_PRICING_RESULT_TYPES_OPTIONS_TO_CID,\n EVENT_MAPPING_STATE_FILTER_TO_CID,\n EVENT_PRICED_STATUS_TO_CID,\n TICKET_TYPE_TO_CID,\n YES_NO_ENUM_FILTER_TO_CID,\n YES_NO_INVERTED_ENUM_FILTER_TO_CID,\n} from 'src/utils/constants/contentIdMaps';\nimport { InhandDateRangePresetNames } from 'src/utils/dateTimeUtils';\nimport {\n EventMappingStateFilter,\n FromEventMappingStateFilter,\n FromYesNoEnum,\n ToEventMappingStateFilter,\n ToYesNoEnum,\n} from 'src/utils/eventQueryUtils';\nimport { formatNumber } from 'src/utils/numberFormatter';\nimport { ReportTypes } from 'src/utils/reportsUtils';\nimport {\n ActionOutboxEntityType,\n Feature,\n ListingQuery,\n} from 'src/WebApiController';\n\nimport {\n FilterToolbarGroup,\n FilterToolbarItem,\n FilterToolbarItemId,\n} from '../Filters';\nimport { RowFilter } from '../Filters/RowFilter';\nimport { SectionFilter } from '../Filters/SectionFilter';\nimport { PriceUpdatedDateStackedFilter } from '../Filters/StackedFilter/PriceUpdatedDateStackedFilter';\nimport { SaleDateStackedFilter } from '../Filters/StackedFilter/SaleDateStackedFilter';\nimport {\n CurrencyFilterMultiSelector,\n CurrencyFilterSelector,\n} from '../Selectors/CurrencyFilterSelector';\nimport { DeliveryTypeSelector } from '../Selectors/DeliveryTypeSelector';\nimport { useCommonEventFilters } from './useCommonEventFilters';\nimport { useEventLastReviewedFilters } from './useEventLastReviewedFilter';\nimport { usePurchaseInfoFilters } from './usePurchaseInfoFilters';\n\nconst MAX_NUMBER_OF_TICKETS_HELD = 100_000;\n\nexport const listingsMandatoryFiltersToShow: FilterToolbarItemId[] = [\n 'eventDates',\n];\n\nexport function useListingFilters({\n isEventPage,\n isReportsPage,\n isHorizontalLayout,\n showCatalogFilters,\n showMetricsIndicationOnFilters,\n}: {\n isEventPage?: boolean;\n isReportsPage?: boolean;\n isHorizontalLayout?: boolean;\n showCatalogFilters?: boolean;\n showMetricsIndicationOnFilters?: boolean;\n}) {\n const { initialQuery, tempQuery, setTempQuery } =\n useFilterQueryContext();\n\n const purchaseInfoFilters = usePurchaseInfoFilters({\n query: tempQuery,\n setQuery: setTempQuery,\n reportType: isReportsPage ? ReportTypes.Inventory : undefined,\n showMetricsIndicationOnFilters: showMetricsIndicationOnFilters,\n });\n\n const tagsFilter = useMergedTagFilters({\n query: tempQuery,\n setQuery: setTempQuery,\n entityType: ActionOutboxEntityType.Listing,\n });\n\n const eventLastReviewedFilters = useEventLastReviewedFilters();\n\n const hasAutoPricingFeature = useUserHasFeature(Feature.AutoPricing);\n\n const hasFilterByCurrencyCodeMultiFeature = useUserHasFeature(\n Feature.FilterByCurrencyCodeMulti\n );\n const hasFilterByCurrencyCodeFeature = !hasFilterByCurrencyCodeMultiFeature;\n\n const hasAutoFulfillSetting = useUserHasFeature(Feature.AutoFulfillSetting);\n\n const autoPricingFilter = useMemo(\n () => [\n {\n filterId: 'isAutoPricingEnabled',\n labelContentId: ContentId.AutoPricingEnabled,\n filterQueryKeys: ['isAutoPricingEnabled'],\n filterItem: (\n {\n if (\n yesNoEnumValue !== ToYesNoEnum(tempQuery.isAutoPricingEnabled)\n ) {\n setTempQuery({\n ...tempQuery,\n isAutoPricingEnabled: FromYesNoEnum(yesNoEnumValue),\n });\n }\n }}\n valueOptionsContent={YES_NO_ENUM_FILTER_TO_CID}\n />\n ),\n },\n ...[\n {\n filterId: 'autoPricingResultTypes' as FilterToolbarItemId,\n labelContentId: ContentId.AutoPricingResultType,\n filterQueryKeys: ['autoPricingResultTypes'] as FilterToolbarItemId[],\n filterItem: (\n {\n // TODO: We should have it such that if they click on the placeholder, it could clear out the options\n // This should not be default though because sometimes the placeholder really is just a placeholder.\n const isChanged = !isEqual(\n autoPricingResultTypes,\n tempQuery.autoPricingResultTypes\n );\n setTempQuery({\n ...tempQuery,\n autoPricingResultTypes: isChanged\n ? autoPricingResultTypes\n : [],\n });\n }}\n valueOptionsContent={AUTO_PRICING_RESULT_TYPES_OPTIONS_TO_CID}\n />\n ),\n },\n ],\n ],\n [setTempQuery, tempQuery]\n );\n\n const adminHoldFilter = useMemo(\n () =>\n [\n {\n filterId: 'isAdminHold',\n labelContentId: ContentId.Hold,\n filterQueryKeys: ['isAdminHold'],\n filterItem: (\n {\n if (yesNoEnumValue !== ToYesNoEnum(tempQuery.isAdminHold)) {\n setTempQuery({\n ...tempQuery,\n isAdminHold: FromYesNoEnum(yesNoEnumValue),\n });\n }\n }}\n valueOptionsContent={YES_NO_ENUM_FILTER_TO_CID}\n />\n ),\n },\n ] as FilterToolbarItem[],\n [setTempQuery, tempQuery]\n );\n\n const seatingFilters = useMemo(\n () => ({\n titleContentId: ContentId.Seating,\n type: 'row',\n items: [\n {\n filterId: 'sectionContains',\n labelContentId: ContentId.Section,\n filterQueryKeys: [\n 'sectionEquals',\n 'sectionContains',\n 'sectionNotContains',\n ],\n filterItem: (\n \n ),\n },\n {\n filterId: 'rowContains',\n labelContentId: ContentId.Row,\n filterQueryKeys: ['rowEquals', 'rowContains', 'rowNotContains'],\n filterItem: (\n \n ),\n },\n ],\n }),\n [isHorizontalLayout, setTempQuery, tempQuery]\n );\n\n const additionalEventFilters = useMemo(\n () =>\n [\n ...eventLastReviewedFilters,\n {\n filterId: 'eventHasUnsoldTickets' as FilterToolbarItemId,\n labelContentId: ContentId.HasUnsoldListings,\n filterQueryKeys: ['eventHasUnsoldTickets'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (\n yesNoEnumValue !==\n ToYesNoEnum(tempQuery.eventHasUnsoldTickets)\n ) {\n setTempQuery({\n ...tempQuery,\n eventHasUnsoldTickets: FromYesNoEnum(yesNoEnumValue),\n });\n }\n }}\n valueOptionsContent={YES_NO_ENUM_FILTER_TO_CID}\n />\n ),\n },\n {\n filterId: 'noSaleDates',\n labelContentId: ContentId.SaleDateFilterTitle,\n filterQueryKeys: ['lastSaleDates', 'noSaleDates'],\n filterItem: ,\n },\n {\n filterId: 'numberOfTicketsHeld',\n labelContentId: ContentId.NumberOfTicketsHeld,\n filterQueryKeys: ['numberOfTicketsHeld'],\n filterItem: (\n (\n {formatNumber(n)}\n )}\n onValueChange={([start, end]: [number, number]) => {\n if (\n start !== (tempQuery.numberOfTicketsHeld?.start || 0) ||\n end !== tempQuery.numberOfTicketsHeld?.end\n ) {\n const newQuery = {\n ...tempQuery,\n numberOfTicketsHeld: {\n start: start === 0 ? null : start,\n end: end === MAX_NUMBER_OF_TICKETS_HELD ? null : end,\n },\n };\n setTempQuery(newQuery);\n }\n }}\n />\n ),\n },\n {\n filterId: 'isMapped' as FilterToolbarItemId,\n labelContentId: ContentId.RequestState,\n filterQueryKeys: [\n 'isMapped',\n 'isMappingRejected',\n ] as FilterToolbarItemId[],\n filterItem: (\n {\n if (\n filterEnumValue !==\n ToEventMappingStateFilter(\n tempQuery.isMapped,\n tempQuery.isMappingRejected\n )\n ) {\n const [isMapped, isMappingRejected] =\n FromEventMappingStateFilter(\n filterEnumValue ?? EventMappingStateFilter.All\n );\n setTempQuery({\n ...tempQuery,\n isMapped,\n isMappingRejected,\n });\n }\n }}\n valueOptionsContent={EVENT_MAPPING_STATE_FILTER_TO_CID}\n />\n ),\n },\n {\n filterId: 'eventUnpricedStatus' as FilterToolbarItemId,\n labelContentId: ContentId.HasUnpricedListings,\n filterQueryKeys: ['eventUnpricedStatus'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (eventUnpricedStatus !== tempQuery.eventUnpricedStatus) {\n setTempQuery({\n ...tempQuery,\n eventUnpricedStatus,\n });\n }\n }}\n valueOptionsContent={EVENT_PRICED_STATUS_TO_CID}\n />\n ),\n },\n ] as FilterToolbarItem[],\n [eventLastReviewedFilters, setTempQuery, tempQuery]\n );\n\n const eventFilters = useCommonEventFilters({\n showCatalogFilters,\n additionalFilters: additionalEventFilters,\n });\n const eventFilter = isEventPage ? undefined : eventFilters;\n\n const notesFilters = useInternalNotesFilter({\n entityType: ActionOutboxEntityType.Listing,\n isHorizontalLayout,\n });\n\n const metricsIconNote = useContent(ContentId.ThisFilterWillChangeMetrics);\n\n const filters = useMemo(\n () =>\n [\n eventFilter,\n {\n titleContentId: ContentId.Pricing,\n type: 'row',\n items: [\n {\n filterId: 'pricerSellerUserId' as FilterToolbarItemId,\n filterQueryKeys: ['pricerSellerUserId'] as FilterToolbarItemId[],\n labelContentId: ContentId.PricedBy,\n postfixIcon: showMetricsIndicationOnFilters ? (\n \n ) : undefined,\n filterItem: (\n {\n if (newId !== tempQuery.pricerSellerUserId) {\n setTempQuery({\n ...tempQuery,\n pricerSellerUserId: newId,\n });\n }\n }}\n />\n ),\n },\n ...(hasAutoPricingFeature ? autoPricingFilter : []),\n\n {\n filterId: 'isPricedAboveZero' as FilterToolbarItemId,\n labelContentId: ContentId.Priced,\n filterQueryKeys: ['isPricedAboveZero'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (\n yesNoEnumValue !==\n ToYesNoEnum(tempQuery.isPricedAboveZero)\n ) {\n setTempQuery({\n ...tempQuery,\n isPricedAboveZero: FromYesNoEnum(yesNoEnumValue),\n });\n }\n }}\n valueOptionsContent={YES_NO_ENUM_FILTER_TO_CID}\n />\n ),\n },\n {\n filterId: 'lastPriceUpdateDates' as FilterToolbarItemId,\n filterQueryKeys: [\n 'lastPriceUpdateDates',\n 'lastPriceNoUpdateDates',\n ] as FilterToolbarItemId[],\n labelContentId: ContentId.PriceDateFilterTitle,\n filterItem: ,\n },\n\n {\n labelContentId: ContentId.IsPricedByMarketplace,\n filterId: 'isPricedByMarketplace' as FilterToolbarItemId,\n filterQueryKeys: [\n 'isPricedByMarketplace',\n ] as FilterToolbarItemId[],\n filterItem: (\n {\n if (\n yesNoEnumValue !==\n ToYesNoEnum(tempQuery.isPricedByMarketplace)\n ) {\n setTempQuery({\n ...tempQuery,\n isPricedByMarketplace: FromYesNoEnum(yesNoEnumValue),\n });\n }\n }}\n valueOptionsContent={YES_NO_ENUM_FILTER_TO_CID}\n />\n ),\n },\n\n ...(hasFilterByCurrencyCodeFeature\n ? [\n {\n filterId: 'currencyCode' as FilterToolbarItemId,\n labelContentId: ContentId.Currency,\n filterQueryKeys: ['currencyCode'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (tempQuery.currencyCode !== newCurrencyCode) {\n setTempQuery({\n ...tempQuery,\n currencyCode: newCurrencyCode?.length\n ? newCurrencyCode\n : null,\n });\n }\n }}\n enableEmptySelection\n />\n ),\n },\n ]\n : []),\n ...(hasFilterByCurrencyCodeMultiFeature\n ? [\n {\n filterId: 'currencyCodes' as FilterToolbarItemId,\n labelContentId: ContentId.Currency,\n filterQueryKeys: ['currencyCodes'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (\n !isEqual(tempQuery.currencyCodes, newCurrencyCodes)\n ) {\n setTempQuery({\n ...tempQuery,\n currencyCodes: newCurrencyCodes?.length\n ? newCurrencyCodes\n : null,\n });\n }\n }}\n enableEmptySelection\n />\n ),\n },\n ]\n : []),\n ],\n },\n\n {\n titleContentId: ContentId.Broadcast,\n type: 'row',\n items: [\n {\n filterId: 'isListed' as FilterToolbarItemId,\n labelContentId: ContentId.Broadcasted,\n filterQueryKeys: ['isListed'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (yesNoEnumValue !== ToYesNoEnum(tempQuery.isListed)) {\n setTempQuery({\n ...tempQuery,\n isListed: FromYesNoEnum(yesNoEnumValue),\n });\n }\n }}\n valueOptionsContent={YES_NO_ENUM_FILTER_TO_CID}\n />\n ),\n },\n {\n filterId: 'hasBroadcastError' as FilterToolbarItemId,\n labelContentId: ContentId.HasBroadcastError,\n filterQueryKeys: ['hasBroadcastError'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (\n yesNoEnumValue !==\n ToYesNoEnum(tempQuery.hasBroadcastError)\n ) {\n setTempQuery({\n ...tempQuery,\n hasBroadcastError: FromYesNoEnum(yesNoEnumValue),\n });\n }\n }}\n valueOptionsContent={YES_NO_ENUM_FILTER_TO_CID}\n />\n ),\n },\n ...adminHoldFilter,\n {\n filterId: 'isDuplicate' as FilterToolbarItemId,\n labelContentId: ContentId.IsDuplicate,\n filterQueryKeys: ['isDuplicate'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (yesNoEnumValue !== ToYesNoEnum(tempQuery.isDuplicate)) {\n setTempQuery({\n ...tempQuery,\n isDuplicate: FromYesNoEnum(yesNoEnumValue),\n });\n }\n }}\n valueOptionsContent={YES_NO_ENUM_FILTER_TO_CID}\n />\n ),\n },\n\n {\n filterId: 'isPendingProof' as FilterToolbarItemId,\n labelContentId: ContentId.ProofOfPurchasedRequired,\n filterQueryKeys: ['isPendingProof'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (\n yesNoEnumValue !== ToYesNoEnum(tempQuery.isPendingProof)\n ) {\n setTempQuery({\n ...tempQuery,\n isPendingProof: FromYesNoEnum(yesNoEnumValue),\n });\n }\n }}\n valueOptionsContent={YES_NO_ENUM_FILTER_TO_CID}\n />\n ),\n },\n ],\n },\n {\n titleContentId: ContentId.Fulfillment,\n type: 'row',\n items: [\n {\n filterId: 'isPredelivered' as FilterToolbarItemId,\n labelContentId: ContentId.PreDelivered,\n type: 'row',\n filterQueryKeys: ['isPredelivered'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (\n yesNoEnumValue !== ToYesNoEnum(tempQuery.isPredelivered)\n ) {\n setTempQuery({\n ...tempQuery,\n isPredelivered: FromYesNoEnum(yesNoEnumValue),\n });\n }\n }}\n valueOptionsContent={YES_NO_ENUM_FILTER_TO_CID}\n />\n ),\n },\n {\n filterId: 'deliveryType' as FilterToolbarItemId,\n labelContentId: ContentId.Delivery,\n filterQueryKeys: ['deliveryType'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (deliveryType !== tempQuery.deliveryType) {\n setTempQuery({\n ...tempQuery,\n deliveryType: deliveryType,\n });\n }\n }}\n allowCustomDeliveryType\n />\n ),\n },\n {\n filterId: 'ticketType' as FilterToolbarItemId,\n labelContentId: ContentId.TicketType,\n filterQueryKeys: ['ticketType'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (ticketType !== tempQuery.ticketType) {\n setTempQuery({\n ...tempQuery,\n ticketType: ticketType || null,\n });\n }\n }}\n valueOptionsContent={TICKET_TYPE_TO_CID}\n />\n ),\n },\n ...(hasAutoFulfillSetting\n ? [\n {\n filterId: 'isNoFulfill' as FilterToolbarItemId,\n labelContentId: ContentId.AutoFulfill,\n type: 'row',\n filterQueryKeys: ['isNoFulfill'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (\n yesNoEnumValue !==\n ToYesNoEnum(\n // the ui is the inverse of isNoFulfil\n tempQuery.isNoFulfill == null\n ? null\n : !tempQuery.isNoFulfill\n )\n ) {\n const v = FromYesNoEnum(yesNoEnumValue);\n setTempQuery({\n ...tempQuery,\n isNoFulfill: v == null ? null : !v, // the ui is the inverse of isNoFulfil\n });\n }\n }}\n valueOptionsContent={YES_NO_ENUM_FILTER_TO_CID}\n />\n ),\n },\n ]\n : []),\n {\n filterId: 'hasUnsoldTickets' as FilterToolbarItemId,\n labelContentId: ContentId.HasUnsoldTickets,\n filterQueryKeys: ['hasUnsoldTickets'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (\n yesNoEnumValue !== ToYesNoEnum(tempQuery.hasUnsoldTickets)\n ) {\n setTempQuery({\n ...tempQuery,\n hasUnsoldTickets: FromYesNoEnum(yesNoEnumValue),\n });\n }\n }}\n valueOptionsContent={YES_NO_ENUM_FILTER_TO_CID}\n />\n ),\n },\n {\n filterId: 'inHandDates' as const,\n labelContentId: ContentId.InHand,\n filterQueryKeys: ['inHandDates'] as FilterToolbarItemId[],\n filterItem: (\n \n setTempQuery({\n ...tempQuery,\n inHandDates: value,\n })\n }\n />\n ),\n },\n {\n filterId: 'isSeatSaver' as const,\n labelContentId: ContentId.Placeholder,\n filterQueryKeys: ['isSeatSaver'] as FilterToolbarItemId[],\n postfixIcon: showMetricsIndicationOnFilters ? (\n \n ) : undefined,\n filterItem: (\n {\n if (yesNoEnumValue !== ToYesNoEnum(tempQuery.isSeatSaver)) {\n setTempQuery({\n ...tempQuery,\n isSeatSaver: FromYesNoEnum(yesNoEnumValue),\n });\n }\n }}\n valueOptionsContent={YES_NO_ENUM_FILTER_TO_CID}\n />\n ),\n },\n ],\n },\n {\n titleContentId: ContentId.Mappings,\n type: 'row',\n items: [\n {\n filterId: 'isMapped' as FilterToolbarItemId,\n labelContentId: ContentId.EventMapped,\n filterQueryKeys: ['isMapped'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (yesNoEnumValue !== ToYesNoEnum(tempQuery.isMapped)) {\n setTempQuery({\n ...tempQuery,\n isMapped: FromYesNoEnum(yesNoEnumValue),\n });\n }\n }}\n valueOptionsContent={YES_NO_ENUM_FILTER_TO_CID}\n />\n ),\n },\n {\n filterId: 'isSeatingUnmapped' as FilterToolbarItemId,\n labelContentId: ContentId.SeatingMapped,\n filterQueryKeys: ['isSeatingUnmapped'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (\n yesNoEnumValue !==\n ToYesNoEnum(tempQuery.isSeatingUnmapped)\n ) {\n setTempQuery({\n ...tempQuery,\n isSeatingUnmapped: FromYesNoEnum(yesNoEnumValue),\n });\n }\n }}\n valueOptionsContent={YES_NO_INVERTED_ENUM_FILTER_TO_CID}\n />\n ),\n },\n ],\n },\n seatingFilters,\n purchaseInfoFilters,\n notesFilters,\n ...tagsFilter,\n ]\n .filter((f) => f)\n .map((f) => f!),\n [\n eventFilter,\n showMetricsIndicationOnFilters,\n metricsIconNote,\n tempQuery,\n hasAutoPricingFeature,\n autoPricingFilter,\n hasFilterByCurrencyCodeFeature,\n hasFilterByCurrencyCodeMultiFeature,\n adminHoldFilter,\n hasAutoFulfillSetting,\n initialQuery.inHandDates,\n seatingFilters,\n purchaseInfoFilters,\n notesFilters,\n tagsFilter,\n setTempQuery,\n ]\n );\n\n return { filters };\n}\n","import { isEqual } from 'lodash-es';\nimport { useMemo } from 'react';\nimport {\n FilterToolbarGroup,\n FilterToolbarItemId,\n} from 'src/components/Filters';\nimport { useInternalNotesFilter } from 'src/components/Filters/InternalNotesFilter';\nimport { useMergedTagFilters } from 'src/components/MainFilterBar/Tags/useMergedTagFilters';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { DateRangeSelector } from 'src/core/POS/DateRangeSelector';\nimport { PosEnumMultiSelect } from 'src/core/POS/PosMultiSelect/PosEnumMultiSelect';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { Slider } from 'src/core/ui/Slider';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { MetricsIcon } from 'src/svgs/MetricsIcon';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n MARKET_PLACE_TO_CID,\n MARKETPLACE_SALE_PAYMENT_STATE_TO_CID,\n SALES_STATUS_TO_CID,\n TICKET_TYPE_TO_CID,\n YES_NO_ENUM_FILTER_TO_CID,\n} from 'src/utils/constants/contentIdMaps';\nimport {\n getDisabledDatesForTimeFrameFilter,\n InhandDateRangePresetNames,\n SaleDateRangeRelativePresetNames,\n StandardDateRangePresetNames,\n} from 'src/utils/dateTimeUtils';\nimport { FromYesNoEnum, ToYesNoEnum } from 'src/utils/eventQueryUtils';\nimport { formatNumber } from 'src/utils/numberFormatter';\nimport { ReportTypes } from 'src/utils/reportsUtils';\nimport {\n ActionOutboxEntityType,\n Feature,\n Marketplace,\n Permission,\n SaleQuery,\n} from 'src/WebApiController';\n\nimport { RowFilter } from '../Filters/RowFilter';\nimport { SectionFilter } from '../Filters/SectionFilter';\nimport {\n CurrencyFilterMultiSelector,\n CurrencyFilterSelector,\n} from '../Selectors/CurrencyFilterSelector';\nimport { SellerAccountEmployeeSelector } from '../Selectors/SellerAccountEmployeeSelector';\nimport { useCommonEventFilters } from './useCommonEventFilters';\nimport { usePurchaseInfoFilters } from './usePurchaseInfoFilters';\n\nconst MAX_NUMBER_OF_TICKETS_HELD = 100_000;\n\nexport const saleMandatoryFiltersToShow: FilterToolbarItemId[] = [\n 'eventDates',\n 'saleStatuses',\n];\n\nexport function useSaleFilters({\n isReportsPage,\n isHorizontalLayout,\n showCatalogFilters,\n showMetricsIndicationOnFilters,\n}: {\n isReportsPage?: boolean;\n isHorizontalLayout?: boolean;\n showCatalogFilters?: boolean;\n showMetricsIndicationOnFilters?: boolean;\n}) {\n const { loginContext } = useAppContext();\n\n const hasFilterByCurrencyCodeMultiFeature = useUserHasFeature(\n Feature.FilterByCurrencyCodeMulti\n );\n const hasFilterByCurrencyCodeFeature = !hasFilterByCurrencyCodeMultiFeature;\n const metricsIconNote = useContent(ContentId.ThisFilterWillChangeMetrics);\n const hasAutoFulfillSetting = useUserHasFeature(Feature.AutoFulfillSetting);\n const hasHideSalePaymentReceivedFilterFeature = useUserHasFeature(\n Feature.HideSalePaymentReceivedFilter\n );\n\n const { initialQuery, tempQuery, setTempQuery } =\n useFilterQueryContext();\n\n const purchaseInfoFiltersBase = usePurchaseInfoFilters({\n query: tempQuery,\n setQuery: setTempQuery,\n reportType: isReportsPage ? ReportTypes.Sale : undefined,\n showMetricsIndicationOnFilters: showMetricsIndicationOnFilters,\n });\n\n const tagsFilter = useMergedTagFilters({\n query: tempQuery,\n setQuery: setTempQuery,\n entityType: ActionOutboxEntityType.Sale,\n });\n\n const purchaseInfoFilters = useMemo(() => {\n return {\n ...purchaseInfoFiltersBase,\n items: [\n ...purchaseInfoFiltersBase.items,\n {\n filterId: 'purchaseVendorOrderId' as FilterToolbarItemId,\n labelContentId: ContentId.ExternalPurchaseId,\n filterQueryKeys: ['purchaseVendorOrderId'] as FilterToolbarItemId[],\n filterItem: (\n {\n const newValue = e.target.value?.length\n ? e.target.value.trim()\n : null;\n if (tempQuery.purchaseVendorOrderId !== newValue) {\n setTempQuery({\n ...tempQuery,\n purchaseVendorOrderId: newValue,\n });\n }\n }}\n maxLength={200}\n />\n ),\n },\n ],\n };\n }, [purchaseInfoFiltersBase, setTempQuery, tempQuery]);\n\n const notesFilters = useInternalNotesFilter({\n entityType: ActionOutboxEntityType.Sale,\n isHorizontalLayout,\n });\n\n const seatingFilters = useMemo(\n () => ({\n titleContentId: ContentId.Seating,\n type: 'row',\n items: [\n {\n filterId: 'sectionContains',\n labelContentId: ContentId.Section,\n filterQueryKeys: [\n 'sectionEquals',\n 'sectionContains',\n 'sectionNotContains',\n ],\n filterItem: (\n \n ),\n },\n {\n filterId: 'rowContains',\n labelContentId: ContentId.Row,\n filterQueryKeys: ['rowEquals', 'rowContains', 'rowNotContains'],\n filterItem: (\n \n ),\n },\n ],\n }),\n [isHorizontalLayout, setTempQuery, tempQuery]\n );\n\n const eventFilters = useCommonEventFilters({\n showCatalogFilters,\n additionalFilters: [\n {\n filterId: 'lastSaleDates' as FilterToolbarItemId,\n labelContentId: ContentId.LastSaleDates,\n filterQueryKeys: ['lastSaleDates'] as FilterToolbarItemId[],\n filterItem: (\n \n setTempQuery({\n ...tempQuery,\n lastSaleDates: value,\n })\n }\n disabledDay={(d) =>\n getDisabledDatesForTimeFrameFilter(\n d,\n tempQuery.eventTimeFrameFilter\n )\n }\n />\n ),\n },\n {\n filterId: 'numberOfTicketsHeld' as FilterToolbarItemId,\n labelContentId: ContentId.NumberOfTicketsHeld,\n filterQueryKeys: ['numberOfTicketsHeld'] as FilterToolbarItemId[],\n filterItem: (\n (\n {formatNumber(n)}\n )}\n onValueChange={([start, end]: [number, number]) => {\n if (\n start !== (tempQuery.numberOfTicketsHeld?.start || 0) ||\n end !== tempQuery.numberOfTicketsHeld?.end\n ) {\n const newQuery = {\n ...tempQuery,\n numberOfTicketsHeld: {\n start: start === 0 ? null : start,\n end: end === MAX_NUMBER_OF_TICKETS_HELD ? null : end,\n },\n };\n setTempQuery(newQuery);\n }\n }}\n />\n ),\n },\n ],\n });\n\n return {\n filters: [\n eventFilters,\n {\n titleContentId: ContentId.Fulfillment,\n items: [\n {\n filterId: 'saleStatuses' as FilterToolbarItemId,\n labelContentId: ContentId.Status,\n filterQueryKeys: ['saleStatuses'] as FilterToolbarItemId[],\n filterItem: (\n {\n setTempQuery({\n ...tempQuery,\n saleStatuses,\n });\n }}\n />\n ),\n },\n {\n filterId: 'inHandDates' as FilterToolbarItemId,\n labelContentId: ContentId.InHand,\n filterQueryKeys: ['inHandDates'] as FilterToolbarItemId[],\n filterItem: (\n \n setTempQuery({\n ...tempQuery,\n inHandDates: value,\n })\n }\n />\n ),\n },\n {\n filterId: 'ticketType' as FilterToolbarItemId,\n labelContentId: ContentId.TicketType,\n filterQueryKeys: ['ticketType'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (ticketType !== tempQuery.ticketType) {\n setTempQuery({\n ...tempQuery,\n ticketType: ticketType,\n });\n }\n }}\n valueOptionsContent={TICKET_TYPE_TO_CID}\n />\n ),\n },\n {\n filterId: 'fulfillerSellerUserId' as FilterToolbarItemId,\n labelContentId: ContentId.FulfilledBy,\n filterQueryKeys: ['fulfillerSellerUserId'] as FilterToolbarItemId[],\n postfixIcon: showMetricsIndicationOnFilters ? (\n \n ) : undefined,\n filterItem: (\n {\n if (newId !== tempQuery.fulfillerSellerUserId) {\n setTempQuery({\n ...tempQuery,\n fulfillerSellerUserId: newId,\n });\n }\n }}\n />\n ),\n },\n {\n filterId: 'isSeatSaver' as FilterToolbarItemId,\n labelContentId: ContentId.Placeholder,\n filterQueryKeys: ['isSeatSaver'] as FilterToolbarItemId[],\n postfixIcon: showMetricsIndicationOnFilters ? (\n \n ) : undefined,\n filterItem: (\n {\n if (yesNoEnumValue !== ToYesNoEnum(tempQuery.isSeatSaver)) {\n setTempQuery({\n ...tempQuery,\n isSeatSaver: FromYesNoEnum(yesNoEnumValue),\n });\n }\n }}\n valueOptionsContent={YES_NO_ENUM_FILTER_TO_CID}\n />\n ),\n },\n {\n filterId: 'fulfillmentDates' as FilterToolbarItemId,\n labelContentId: ContentId.FulfillmentDate,\n filterQueryKeys: ['fulfillmentDates'] as FilterToolbarItemId[],\n filterItem: (\n \n setTempQuery({\n ...tempQuery,\n fulfillmentDates: value,\n })\n }\n />\n ),\n },\n ...(hasAutoFulfillSetting\n ? [\n {\n filterId: 'isNoFulfill' as FilterToolbarItemId,\n labelContentId: ContentId.AutoFulfill,\n type: 'row',\n filterQueryKeys: ['isNoFulfill'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (\n yesNoEnumValue !==\n ToYesNoEnum(\n // the ui is the inverse of isNoFulfil\n tempQuery.isNoFulfill == null\n ? null\n : !tempQuery.isNoFulfill\n )\n ) {\n const v = FromYesNoEnum(yesNoEnumValue);\n setTempQuery({\n ...tempQuery,\n isNoFulfill: v == null ? null : !v, // the ui is the inverse of isNoFulfil\n });\n }\n }}\n valueOptionsContent={YES_NO_ENUM_FILTER_TO_CID}\n />\n ),\n },\n ]\n : []),\n {\n filterId: 'cancellationDates' as FilterToolbarItemId,\n labelContentId: ContentId.CancellationDate,\n filterQueryKeys: ['cancellationDates'] as FilterToolbarItemId[],\n filterItem: (\n \n setTempQuery({\n ...tempQuery,\n cancellationDates: value,\n })\n }\n />\n ),\n },\n ],\n },\n {\n titleContentId: ContentId.WhenAndWhere,\n type: 'row',\n items: [\n {\n filterId: 'soldOnMarketplace' as FilterToolbarItemId,\n labelContentId: ContentId.Marketplace,\n filterQueryKeys: ['soldOnMarketplace'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (soldOnMarketplace !== tempQuery.soldOnMarketplace) {\n setTempQuery({\n ...tempQuery,\n soldOnMarketplace,\n });\n }\n }}\n valueOptionsContent={(\n loginContext?.user?.activeAccount?.marketplaceSettings?.map(\n (m) => m.mkp\n ) ?? [Marketplace.StubHub]\n )\n .concat(Marketplace.Offline)\n .reduce(\n (cur, m) => {\n cur[m] = MARKET_PLACE_TO_CID[m];\n return cur;\n },\n {} as Record\n )}\n />\n ),\n },\n {\n filterId: 'saleDates' as FilterToolbarItemId,\n labelContentId: ContentId.SaleDate,\n filterQueryKeys: ['saleDates'] as FilterToolbarItemId[],\n filterItem: (\n {\n setTempQuery({\n ...tempQuery,\n saleDates: value,\n });\n }}\n useRelativePresets\n />\n ),\n },\n {\n filterId: 'listingInsertBy' as FilterToolbarItemId,\n labelContentId: ContentId.OriginatedBy,\n filterQueryKeys: ['listingInsertBy'] as FilterToolbarItemId[],\n postfixIcon: showMetricsIndicationOnFilters ? (\n \n ) : undefined,\n filterItem: (\n {\n if (newId !== tempQuery.listingInsertBy) {\n setTempQuery({\n ...tempQuery,\n listingInsertBy: newId,\n });\n }\n }}\n />\n ),\n },\n ],\n },\n {\n titleContentId: ContentId.Payment,\n requiredPermissions: [Permission.Sales_ViewPaymentState],\n type: 'row',\n items: [\n {\n filterId: 'marketplacePaymentState' as FilterToolbarItemId,\n labelContentId: ContentId.Payment,\n filterQueryKeys: [\n 'marketplacePaymentState',\n ] as FilterToolbarItemId[],\n filterItem: (\n {\n if (\n marketplacePaymentState !==\n tempQuery.marketplacePaymentState\n ) {\n setTempQuery({\n ...tempQuery,\n marketplacePaymentState: marketplacePaymentState,\n });\n }\n }}\n valueOptionsContent={MARKETPLACE_SALE_PAYMENT_STATE_TO_CID}\n />\n ),\n },\n {\n filterId: 'paymentDates' as FilterToolbarItemId,\n labelContentId: ContentId.PaymentDate,\n filterQueryKeys: ['paymentDates'] as FilterToolbarItemId[],\n filterItem: (\n \n setTempQuery({\n ...tempQuery,\n paymentDates: value,\n })\n }\n />\n ),\n },\n // POS-5575: We want to deprecate the paymentReceived filter\n // so it's intentional to NOT show it when the feature flag is enabled\n ...(hasHideSalePaymentReceivedFilterFeature\n ? []\n : [\n {\n filterId: 'paymentReceived' as FilterToolbarItemId,\n labelContentId: ContentId.PaymentReceived,\n filterQueryKeys: ['paymentReceived'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (\n yesNoEnumValue !==\n ToYesNoEnum(tempQuery.paymentReceived)\n ) {\n setTempQuery({\n ...tempQuery,\n paymentReceived: FromYesNoEnum(yesNoEnumValue),\n });\n }\n }}\n valueOptionsContent={YES_NO_ENUM_FILTER_TO_CID}\n />\n ),\n },\n ]),\n {\n filterId: 'paymentReferenceId' as FilterToolbarItemId,\n labelContentId: ContentId.PaymentReference,\n filterQueryKeys: ['paymentReferenceId'] as FilterToolbarItemId[],\n filterItem: (\n {\n const newValue = e.target.value ?? null;\n if (tempQuery.paymentReferenceId !== newValue) {\n setTempQuery({\n ...tempQuery,\n paymentReferenceId: newValue,\n });\n }\n }}\n maxLength={200}\n />\n ),\n },\n ...(hasFilterByCurrencyCodeFeature\n ? [\n {\n filterId: 'currencyCode' as FilterToolbarItemId,\n labelContentId: ContentId.Currency,\n filterQueryKeys: ['currencyCode'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (tempQuery.currencyCode !== newCurrencyCode) {\n setTempQuery({\n ...tempQuery,\n currencyCode: newCurrencyCode?.length\n ? newCurrencyCode\n : null,\n });\n }\n }}\n enableEmptySelection\n />\n ),\n },\n ]\n : []),\n ...(hasFilterByCurrencyCodeMultiFeature\n ? [\n {\n filterId: 'currencyCodes' as FilterToolbarItemId,\n labelContentId: ContentId.Currency,\n filterQueryKeys: ['currencyCodes'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (\n !isEqual(tempQuery.currencyCodes, newCurrencyCodes)\n ) {\n setTempQuery({\n ...tempQuery,\n currencyCodes: newCurrencyCodes?.length\n ? newCurrencyCodes\n : null,\n });\n }\n }}\n enableEmptySelection\n />\n ),\n },\n ]\n : []),\n ],\n },\n seatingFilters,\n purchaseInfoFilters,\n ...(notesFilters ? [notesFilters] : []),\n ...tagsFilter,\n ],\n };\n}\n","import { debounce } from 'lodash-es';\nimport { ReactNode, useCallback, useMemo } from 'react';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { QueryWithViewMode } from 'src/utils/eventQueryUtils';\nimport { UserSetting } from 'src/WebApiController';\n\nexport const ViewModeSelector = ({\n query,\n initialQuery,\n setFilterQuery,\n viewModeSettingsId,\n viewModeCidMap,\n viewModeIconMap,\n}: {\n query: TQuery;\n initialQuery: TQuery;\n setFilterQuery: (newQuery: TQuery) => void;\n viewModeSettingsId:\n | UserSetting.InventoryPageViewMode\n | UserSetting.SalePageViewMode\n | UserSetting.PurchasePageViewMode;\n viewModeCidMap: Record;\n viewModeIconMap: Record;\n}) => {\n const {\n setUserSetting: setViewModeUserSetting,\n value: defaultViewModeUserSetting,\n } = useServerUserSetting({\n id: viewModeSettingsId,\n currentLoginUserOnly: true,\n });\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const debouncedOnViewModeChange = useCallback(\n debounce((selectedViewMode?: string | null) => {\n if (selectedViewMode) {\n if (selectedViewMode !== query.viewMode) {\n setFilterQuery({\n ...query,\n viewMode: selectedViewMode,\n });\n }\n // We need to update initialQuery, otherwise the quick filter \"All\"\n // may change the current view mode\n if (selectedViewMode !== initialQuery.viewMode) {\n initialQuery.viewMode = selectedViewMode;\n }\n\n if (selectedViewMode !== defaultViewModeUserSetting) {\n setViewModeUserSetting(selectedViewMode);\n }\n }\n }, 200),\n [query]\n );\n\n const effectiveViewMode = useMemo(() => {\n const viewMode =\n query.viewMode ||\n defaultViewModeUserSetting ||\n Object.keys(viewModeCidMap)[0];\n\n return viewMode;\n }, [query.viewMode, defaultViewModeUserSetting, viewModeCidMap]);\n\n if (Object.keys(viewModeCidMap).length < 2) {\n return null;\n }\n\n return (\n \n );\n};\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport const ContainerStyledDiv = styled.div<{\n isHorizontal: boolean;\n}>`\n position: relative;\n display: flex;\n flex-grow: 0;\n align-items: stretch;\n\n ${(props) => (props.isHorizontal ? 'width: auto' : 'height: auto')};\n ${(props) => (props.isHorizontal ? 'height: 100%' : 'width: 100%')};\n`;\n\nexport const ContentStyledDiv = styled.div.attrs(\n (props: { isHorizontal: boolean; size: number }) => ({\n style: props.isHorizontal\n ? {\n width: `${props.size}px`,\n }\n : {\n height: `${props.size}px`,\n },\n })\n)<{\n isHorizontal: boolean;\n size: number;\n shouldAnimateContent: boolean;\n}>`\n flex-grow: 1;\n align-self: stretch;\n display: flex;\n flex-flow: ${(props) => (props.isHorizontal ? 'row' : 'column')};\n transition: ${(props) => (props.shouldAnimateContent ? 'all 0.3s' : 'none')};\n margin-left: ${vars.spacing.xs};\n`;\n\nexport const DividerContainer = styled.div<{\n isHorizontal: boolean;\n}>`\n width: ${() => vars.iconSize.l};\n right: -8px;\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n cursor: ${(props) => (props.isHorizontal ? 'ew-resize' : 'ns-resize')};\n\n &:hover {\n .divider {\n ${(props) => (props.isHorizontal ? 'width: 4px' : 'width: 4px')};\n padding: 0;\n background-color: ${(props) => props.theme.colors.backgroundBrandHover};\n }\n }\n\n .divider {\n ${(props) => (props.isHorizontal ? 'width: 2px' : 'height: 2px')};\n transition: all 0.2s;\n position: relative;\n margin-right: -2px;\n background-color: ${(props) => props.theme.colors.borderPrimary};\n z-index: 2;\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n }\n`;\n","import React, {\n PropsWithChildren,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport { DraggableCore, DraggableData, DraggableEvent } from 'react-draggable';\nimport { SidePanelButton } from 'src/components/Buttons/SidePanelButton';\nimport {\n SidePanelPage,\n useSidePanelContext,\n} from 'src/contexts/SidePanelContext';\n\nimport {\n ContainerStyledDiv,\n ContentStyledDiv,\n DividerContainer,\n} from './ResizablePanel.styled';\n\nconst MIN_PANEL_SIZE = 120; // enough to show grouping info\nconst MAX_PANEL_SIZE = 420;\n\nexport enum ResizeEdge {\n North,\n South,\n East,\n West,\n}\n\nexport type ResizablePanelProps = {\n direction: ResizeEdge;\n sidePanelPage?: SidePanelPage;\n initialSize?: number;\n disabled?: boolean;\n onResize?: (curSize: number) => void;\n autoHide?: boolean;\n minPanelSize?: number;\n maxPanelSize?: number;\n minPanelPercent?: number;\n maxPanelPercent?: number;\n defaultRatio?: number;\n showExpandButton?: boolean;\n};\n\nexport function ResizablePanel({\n children,\n direction,\n initialSize,\n disabled,\n onResize,\n sidePanelPage,\n autoHide = true,\n minPanelSize = MIN_PANEL_SIZE,\n maxPanelSize = MAX_PANEL_SIZE,\n minPanelPercent,\n maxPanelPercent,\n defaultRatio = 0.25,\n showExpandButton,\n}: PropsWithChildren) {\n const {\n isHidden,\n setCollapsed,\n setHidden,\n sidePanelWidths,\n onUpdateSidePanelWidth,\n } = useSidePanelContext();\n const [disableAnimation, setDisabledAnimation] = useState(false);\n\n const isHorizontal =\n direction === ResizeEdge.East || direction === ResizeEdge.West;\n\n const contentRef = useRef(null);\n const wrapperRef = useRef(null);\n const lastHandleRect = useRef(null);\n\n const getMaxSize = useCallback(() => {\n const parentBound =\n wrapperRef.current?.parentElement?.getBoundingClientRect();\n\n const parentSize = isHorizontal ? parentBound?.width : parentBound?.height;\n return maxPanelPercent && parentSize\n ? maxPanelPercent * parentSize\n : maxPanelSize;\n }, [isHorizontal, maxPanelPercent, maxPanelSize]);\n\n const [size, setSize] = useState(isHidden ? 0 : getMaxSize());\n\n const getMinSize = useCallback(() => {\n const parentBound =\n wrapperRef.current?.parentElement?.getBoundingClientRect();\n const parentSize = isHorizontal ? parentBound?.width : parentBound?.height;\n return minPanelPercent && parentSize\n ? minPanelPercent * parentSize\n : minPanelSize;\n }, [isHorizontal, minPanelPercent, minPanelSize]);\n\n const updateSize = useCallback(\n (size: number) => {\n if (isHidden) {\n return;\n }\n const minSize = getMinSize();\n const maxSize = getMaxSize();\n let actualSize = size;\n if (actualSize < minSize) {\n actualSize = minSize;\n }\n actualSize = Math.max(minSize, actualSize);\n actualSize = Math.min(actualSize, maxSize);\n setCollapsed(actualSize <= minSize);\n if (actualSize <= minSize && autoHide) {\n setHidden(true);\n } else {\n setSize(actualSize);\n onResize?.(actualSize);\n if (sidePanelPage) {\n onUpdateSidePanelWidth(sidePanelPage, actualSize);\n }\n }\n },\n [\n isHidden,\n getMinSize,\n getMaxSize,\n setCollapsed,\n autoHide,\n setHidden,\n onResize,\n sidePanelPage,\n onUpdateSidePanelWidth,\n ]\n );\n\n useEffect(() => {\n const content = contentRef.current;\n const parent = wrapperRef.current?.parentElement;\n if (!content || !parent) {\n return;\n }\n\n const actualContent = content.children[0];\n if (sidePanelPage && sidePanelWidths?.[sidePanelPage]) {\n setSize(sidePanelWidths[sidePanelPage]);\n } else if (initialSize != null) {\n updateSize(initialSize);\n } else if (size === 0) {\n const bound = actualContent.getBoundingClientRect();\n // !!Importatnt, assigned the current rect bound to record the last visited position\n lastHandleRect.current = bound;\n const parentBound =\n wrapperRef.current?.parentElement?.getBoundingClientRect();\n const parentSize = isHorizontal\n ? parentBound?.width\n : parentBound?.height;\n\n let proposedSize = isHorizontal ? bound.width : bound.height;\n proposedSize = proposedSize || defaultRatio * parentSize;\n\n // Initialize the size value based on the content's current size\n updateSize(proposedSize);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [initialSize]);\n\n useEffect(() => {\n if (isHidden) {\n setSize(0);\n onResize?.(0);\n return;\n }\n const defaultSize =\n (sidePanelPage && sidePanelWidths?.[sidePanelPage]) ?? getMaxSize();\n setSize(defaultSize);\n onResize?.(defaultSize);\n setCollapsed(false);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isHidden, sidePanelPage, sidePanelWidths]);\n\n const onDrag = useCallback(\n (_: DraggableEvent, data: DraggableData) => {\n const handleRect = contentRef.current?.getBoundingClientRect();\n if (!handleRect) {\n return;\n }\n let { deltaX, deltaY } = data;\n // Calculate the deltas from the relative positions between the current rect and the last handled rect\n if (lastHandleRect.current) {\n deltaX += handleRect.left - lastHandleRect.current.left;\n deltaY += handleRect.top - lastHandleRect.current.top;\n }\n // !!Importatnt, assigned the current rect bound to record the last visited position\n lastHandleRect.current = handleRect;\n // modify the size based on the drag delta\n const delta = isHorizontal ? deltaX : deltaY;\n\n const factor = [ResizeEdge.East, ResizeEdge.South].includes(direction)\n ? -1\n : 1;\n updateSize(Math.max(10, size - delta * factor));\n\n if (isHidden) {\n if (deltaX > 0 && direction === ResizeEdge.East) {\n setHidden(false);\n } else if (deltaX < 0 && direction === ResizeEdge.West) {\n setHidden(false);\n } else if (deltaY > 0 && direction === ResizeEdge.South) {\n setHidden(false);\n } else if (deltaY < 0 && direction === ResizeEdge.North) {\n setHidden(false);\n }\n }\n },\n [direction, isHidden, isHorizontal, setHidden, size, updateSize]\n );\n\n const divider = disabled ? null : (\n setDisabledAnimation(true)}\n onStop={() => setDisabledAnimation(false)}\n disabled={disabled}\n grid={\n initialSize == null\n ? undefined\n : [isHorizontal ? initialSize : 0, !isHorizontal ? initialSize : 0]\n }\n >\n \n {showExpandButton && }\n
    \n \n \n );\n const isHandleInFront =\n direction === ResizeEdge.West || direction === ResizeEdge.North;\n return (\n \n {isHandleInFront && divider}\n \n {\n // this ensure that children is only 1 element\n React.Children.only(children)\n }\n \n {!isHandleInFront && divider}\n \n );\n}\n","import { useMemo } from 'react';\nimport { useSidePanelContext } from 'src/contexts/SidePanelContext';\nimport { vars } from 'src/core/themes';\nimport { ResizeEdge } from 'src/core/ui/ResizablePanel/ResizablePanel';\nimport {\n ChevronDownIcon,\n ChevronLeftIcon,\n ChevronRightIcon,\n ChevronUpIcon,\n} from 'src/svgs/Viagogo';\n\nimport { expandButton } from './SidePanelButton.css';\n\nexport function SidePanelButton({\n direction = ResizeEdge.East,\n position = 'absolute',\n}: {\n direction?: ResizeEdge;\n position?: 'relative' | 'absolute';\n}) {\n const { isHidden, setHidden } = useSidePanelContext();\n const ExpandIcon = useMemo(() => {\n if (direction === ResizeEdge.East) {\n return isHidden ? ChevronRightIcon : ChevronLeftIcon;\n } else if (direction === ResizeEdge.West) {\n return isHidden ? ChevronLeftIcon : ChevronRightIcon;\n } else if (direction === ResizeEdge.South) {\n return isHidden ? ChevronDownIcon : ChevronUpIcon;\n } else {\n return isHidden ? ChevronUpIcon : ChevronDownIcon;\n }\n }, [direction, isHidden]);\n\n return (\n setHidden(!isHidden)}\n className={expandButton}\n style={\n position === 'relative' ? { position: 'relative', top: 0 } : undefined\n }\n >\n \n
    \n );\n}\n","import { useMemo } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { QuickFilter } from 'src/hooks/useQuickFilters';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getNextDateRange } from 'src/utils/dateTimeUtils';\nimport {\n DateTimeRangeWithRelative,\n EventTimeFrameFilter,\n ListingQuery,\n UserSetting,\n} from 'src/WebApiController';\n\nexport const useDefaultListingFilter = ({\n initialQuery,\n listingQuery,\n}: {\n initialQuery: ListingQuery;\n listingQuery: ListingQuery;\n}) => {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const defaultQuickFilters = useMemo(() => {\n const next2WeeksRange = getNextDateRange({ weeks: 2 }, new Date());\n const filters: QuickFilter[] = [\n {\n id: 'unsoldTickets',\n name: ,\n data: {\n ...initialQuery,\n eventHasUnsoldTickets: true,\n },\n },\n {\n id: 'next2Weeks',\n name: ,\n data: {\n ...initialQuery,\n eventTimeFrameFilter: EventTimeFrameFilter.Future,\n eventDates: {\n start: next2WeeksRange.start.toISOString(),\n end: next2WeeksRange.end.toISOString(),\n } as DateTimeRangeWithRelative,\n },\n },\n ];\n if (activeAccountWebClientConfig.activeAccountId) {\n filters.push({\n id: 'imPricing',\n name: ,\n data: {\n ...initialQuery,\n pricerSellerUserId: activeAccountWebClientConfig.activeAccountId,\n },\n });\n }\n filters.push({\n id: 'broadcastError',\n name: ,\n data: {\n ...initialQuery,\n hasBroadcastError: true,\n },\n });\n\n // Default filters aren't supposed to change view mode\n filters.forEach(\n (f: QuickFilter) => {\n f.data.viewMode = listingQuery.viewMode;\n }\n );\n return filters;\n }, [initialQuery, listingQuery, activeAccountWebClientConfig]);\n\n return defaultQuickFilters;\n};\n","import { ReactNode } from 'react';\nimport { FlattenedViewIcon } from 'src/svgs/FlattenedViewIcon';\nimport { MetricViewIcon } from 'src/svgs/MetricViewIcon';\nimport { TileViewIcon } from 'src/svgs/TileViewIcon';\nimport { IconsFill } from 'src/svgs/Viagogo';\nimport { InventoryViewMode } from 'src/WebApiController';\n\nexport const INVENTORY_VIEW_MODE_TO_ICON: Record = {\n [InventoryViewMode.TileView]: (\n \n ),\n [InventoryViewMode.MetricView]: (\n \n ),\n [InventoryViewMode.FlattenedView]: (\n \n ),\n};\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport const SaleIdContainer = styled.div`\n display: flex;\n align-items: baseline;\n flex-wrap: wrap;\n color: ${({ theme: { colors } }) => colors.textPrimary};\n`;\n\nexport const AttrLabel = styled.span`\n vertical-align: baseline;\n text-transform: uppercase;\n ${({ theme: { typography } }) => typography.getStyles('caption2', 'regular')}\n`;\n\nexport const AttrValue = styled.span`\n margin: ${() => `0 ${vars.spacing.xxs}`};\n font-size: ${() => vars.typography.fontSize['sm']};\n font-weight: 400;\n line-height: 20px;\n\n ${({ theme: { media } }) =>\n `${media.makeMediaQuery(\n media.breakpoints.md,\n `\n font-size: ${() => vars.typography.fontSize['lg']};\n line-height: 24px;\n }`\n )}`}\n`;\n","import { MerchantDisplay } from 'src/components/common/MerchantDisplay';\nimport { SeatingInfo } from 'src/components/common/SeatingInfo';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Listing } from 'src/WebApiController';\n\nimport * as styles from './ListingBasicInfo.css';\nimport {\n AttrLabel,\n AttrValue,\n SaleIdContainer,\n} from './ListingBasicInfo.styled';\n\nexport const ListingBasicInfo = ({ listing }: { listing: Listing }) => {\n const listingIdLabel = useContent(ContentId.ListingId);\n const marketplaceLabel = useContent(ContentId.Merchant);\n\n return (\n /* TODO - search by sale id being mainly used with marketplace sale id (which can yield multiple results if we have multiple marketplaces that use the same ids)\n We are displaying Sale info without the Event's info, but there is several reason we don't need to show the Event info right now, mainly...\n 1 - Event info currently is expensive to get (calling catalog API) - when we bring catalog API info in-house, we can add it performantly\n 2 - We don't need Event info yet, because currently all our sales are from StubHub, and so NO user will see this dialog\n 3 - This might actually be replaced with the Universal Search anyway (when we have both catalog in-house and the search index).\n */\n
    \n \n {listingIdLabel}\n {listing.idOnMkp || listing.id}\n {marketplaceLabel}\n \n \n \n \n \n
    \n );\n};\n","import { debounce } from 'lodash-es';\nimport { useCallback, useContext, useEffect, useState } from 'react';\nimport { useLocation } from 'react-router-dom';\nimport { EventEntitySearchBox } from 'src/components/Accordions/EventEntitySearchBox';\nimport { ListingBasicInfo } from 'src/components/Listings/ListingBasicInfo';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { FormatContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { SearchResultPickerDialog } from 'src/dialogs/SearchResultPickerDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { InventoryDeeplinkQueryParam } from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { getDeepLinkIdFromUrl } from 'src/utils/deepLinkUtils';\nimport {\n DefaultListingQuery,\n getQueryFromUrl,\n} from 'src/utils/eventQueryUtils';\nimport { getListingDetailsModalConfigWithDeepLink } from 'src/utils/inventoryUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n Feature,\n InventoryViewMode,\n Listing,\n ListingClient,\n ListingDetailDataField,\n ListingDetails,\n ListingQuery,\n} from 'src/WebApiController';\n\nexport function ListingSearchBox({\n isEventPage = false,\n}: {\n isEventPage?: boolean;\n}) {\n const activeId = getDeepLinkIdFromUrl(\n InventoryDeeplinkQueryParam,\n window.location.href\n );\n\n const [searchId, setSearchId] = useState();\n\n const [searchResults, setSearchResults] = useState();\n const [isLoadingSearch, setIsLoadingSearch] = useState(false);\n const [searchText, setSearchText] = useState('');\n\n const { closeDialog, launchDialog, dialogProps } = useBasicDialog();\n const { setModal, isModalOpen } = useContext(ModalContext);\n const { showErrorDialog } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n\n const hasFullPageEventViewEntitySelection = useUserHasFeature(\n Feature.FullPageEventViewEntitySelection\n );\n\n const { posEntity: listing, setActivePosEntity } =\n useActivePosEntityContext();\n\n const {\n filterQuery: listingQuery,\n initialQuery,\n tempQuery,\n setFilterQuery,\n } = useFilterQueryContext();\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const debouncedOnSearchChange = useCallback(\n debounce((text: string) => {\n if (text !== listingQuery.searchText) {\n setFilterQuery({\n ...listingQuery,\n searchText: text || null,\n });\n }\n }, 200),\n [listingQuery]\n );\n\n const clearSearchEntity = useCallback(() => {\n const newQuery = {\n ...tempQuery,\n searchText: null,\n entityIds: null,\n marketplaceEntityIds: null,\n };\n setFilterQuery(newQuery);\n }, [tempQuery, setFilterQuery]);\n\n const location = useLocation();\n\n useEffect(() => {\n if (!hasFullPageEventViewEntitySelection) {\n return;\n }\n\n // Since we only support id searching in flattened view for Listings, reset filters when view mode changes\n if (\n listingQuery.viewMode !== InventoryViewMode.FlattenedView &&\n !isEventPage &&\n listingQuery.marketplaceEntityIds\n ) {\n setFilterQuery({\n ...listingQuery,\n marketplaceEntityIds: null,\n searchText: null,\n });\n setSearchText('');\n }\n }, [\n listingQuery.marketplaceEntityIds,\n listingQuery.viewMode,\n isEventPage,\n listingQuery,\n setFilterQuery,\n hasFullPageEventViewEntitySelection,\n ]);\n\n useEffect(() => {\n if (!hasFullPageEventViewEntitySelection) {\n return;\n }\n\n const queryFromUrl = getQueryFromUrl(\n initialQuery,\n location.search\n );\n\n if (\n Array.isArray(queryFromUrl?.marketplaceEntityIds) &&\n queryFromUrl?.marketplaceEntityIds.length\n ) {\n setSearchText((prev) =>\n queryFromUrl?.marketplaceEntityIds\n ? queryFromUrl?.marketplaceEntityIds.join(',')\n : prev\n );\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [hasFullPageEventViewEntitySelection, initialQuery, setFilterQuery]);\n\n const onLookupById = useCallback(\n async (id: string, isSearching: boolean) => {\n if (\n !id &&\n tempQuery.marketplaceEntityIds &&\n hasFullPageEventViewEntitySelection\n ) {\n const newQuery = {\n ...tempQuery,\n entityIds: null,\n marketplaceEntityIds: null,\n };\n setFilterQuery({ ...newQuery });\n return;\n }\n\n if (id && !isLoadingSearch) {\n if (listing?.idOnMkp === id || listing?.id === Number(id)) {\n // If the id hasn't changed, check that if it's open, if it's not, open it\n if (!isModalOpen) {\n setModal(getListingDetailsModalConfigWithDeepLink(listing.id));\n }\n\n // Else, just don't do anything\n return;\n }\n\n if (hasFullPageEventViewEntitySelection) {\n const matchedIds = id\n .split(',')\n .filter((s) => s.trim())\n .map((s) => s.trim()); // split by commas and remove all empty strings\n\n if (matchedIds.length > 1) {\n const newQuery = {\n ...DefaultListingQuery,\n entityIds: null,\n marketplaceEntityIds: matchedIds,\n viewMode: InventoryViewMode.FlattenedView,\n };\n setFilterQuery(newQuery);\n return;\n } else if (tempQuery.marketplaceEntityIds) {\n const newQuery = {\n ...tempQuery,\n entityIds: null,\n marketplaceEntityIds: null,\n };\n setFilterQuery(newQuery);\n }\n }\n\n setSearchId(id);\n setIsLoadingSearch(true);\n\n try {\n // when user enter a text here, we don't know whether they entered the listing id or unique id\n // since 99% of the time they'll be entering a listing id, we try to lookup by that first\n const listings = isSearching\n ? await tryInvokeApi(\n () =>\n new ListingClient(\n activeAccountWebClientConfig\n ).getListingByMarketplaceListingId(id),\n (error) => {\n showErrorDialog(\n 'ListingClient.getListingByMarketplaceListingId',\n error,\n { trackErrorData: { listingId: id } }\n );\n }\n )\n : null;\n\n if (!listings || listings.length === 0) {\n const idNum = Number(id);\n\n if (isNaN(idNum)) {\n // If we can't find by either PO external id or internal id, just launch empty search result dialog\n launchDialog();\n return false;\n }\n\n // If we didn't find any listings by market-place-listing-id, assume this is a unique id search\n setActivePosEntity(idNum, undefined, true, [\n ListingDetailDataField.Basic,\n ]);\n setModal(getListingDetailsModalConfigWithDeepLink(idNum));\n\n return true;\n } else {\n // We have listings using the market place id\n // 99% of the time, the id should be unique, but if we support more than 1 marketplaces\n // the ids may collide and return more than one result, therefore we need to present to the user and ask them what they want\n if (listings.length === 1) {\n const listingInfo = listings[0];\n // happy path\n setActivePosEntity(listingInfo.id, listingInfo.idOnMkp, true, [\n ListingDetailDataField.Basic,\n ]);\n setModal(\n getListingDetailsModalConfigWithDeepLink(listingInfo.id, true)\n );\n\n return true;\n } else {\n setSearchResults(listings);\n launchDialog();\n }\n }\n } finally {\n setIsLoadingSearch(false);\n }\n }\n\n return false;\n },\n [\n activeAccountWebClientConfig,\n hasFullPageEventViewEntitySelection,\n isLoadingSearch,\n isModalOpen,\n launchDialog,\n listing?.id,\n listing?.idOnMkp,\n setActivePosEntity,\n setFilterQuery,\n setModal,\n showErrorDialog,\n tempQuery,\n ]\n );\n\n const onResultItemPicked = useCallback(\n (listing: Listing) => {\n setActivePosEntity(listing.id, listing.idOnMkp, true, [\n ListingDetailDataField.Basic,\n ]);\n setModal(getListingDetailsModalConfigWithDeepLink(listing.id, true));\n\n // We do not want to close the search dialog as users may want to click each one\n // We'll let them close the search dialog manually\n },\n [setActivePosEntity, setModal]\n );\n\n useEffect(() => {\n if (\n listingQuery.marketplaceEntityIds &&\n hasFullPageEventViewEntitySelection\n ) {\n return;\n }\n setSearchText(listingQuery.searchText ?? '');\n }, [\n hasFullPageEventViewEntitySelection,\n listingQuery.marketplaceEntityIds,\n listingQuery.searchText,\n ]);\n\n useEffect(() => {\n if (activeId?.length) {\n onLookupById(activeId, false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [activeId]);\n\n return (\n <>\n onLookupById(value, true)}\n onEventSearch={(value) => debouncedOnSearchChange(value)}\n searchText={searchText}\n setSearchText={setSearchText}\n clearSearchEntity={clearSearchEntity}\n disableSearchMode={isEventPage}\n />\n\n \n }\n resultItems={searchResults || []}\n renderItem={(listing: Listing) => (\n \n )}\n onResultItemPicked={onResultItemPicked}\n onCancel={closeDialog}\n />\n \n );\n}\n","import { useEffect } from 'react';\nimport { BulkEditStatusPopover } from 'src/components/common/BulkActions/BulkEditStatusPopover';\nimport { MultiSelectionToggleGlobal } from 'src/components/common/MultiSelect/Toggle/MultiSelectionToggleGlobal';\nimport { FilterToolbar } from 'src/components/FilterToolbar';\nimport { useFiltersHelpers } from 'src/components/FilterToolbar/useFiltersHelpers';\nimport { InventoryGlobalActionDropdown } from 'src/components/Listings/InventoryActionDropdown';\nimport {\n listingsMandatoryFiltersToShow,\n ViewModeSelector,\n} from 'src/components/MainFilterBar';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { useFilterToolbarQuickFilters } from 'src/hooks/useQuickFilters';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport { INVENTORY_VIEW_MODE_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport {\n ActionOutboxEntityType,\n Feature,\n InventoryViewMode,\n ListingQuery,\n UserSetting,\n} from 'src/WebApiController';\nimport Swiper from 'swiper';\n\nimport { SidePanelButton } from '../../Buttons/SidePanelButton';\nimport { SwiperButton } from '../../Buttons/SwiperButton';\nimport { BackSection } from '../../common/BackSection';\nimport { useListingFilters } from '../../MainFilterBar';\nimport * as styles from '../../MainFilterBar/MainFilterBar.css';\nimport { useDefaultListingFilter } from './hooks/useDefaultListingFilter';\nimport { INVENTORY_VIEW_MODE_TO_ICON } from './ListingFilterBar.types';\nimport { ListingSearchBox } from './ListingSearchBox';\n\nexport function ListingFilterBar({\n isSearchOnly,\n isEventPage = false,\n returnUrl,\n posEventId,\n swiperRef,\n}: {\n isSearchOnly?: boolean;\n isEventPage?: boolean;\n returnUrl?: string;\n posEventId?: string;\n swiperRef?: React.MutableRefObject;\n}) {\n const isMobile = useMatchMedia('mobile');\n const { filters } = useListingFilters({\n isEventPage,\n showMetricsIndicationOnFilters: true,\n });\n\n const hasNewSearchFeature = useUserHasFeature(Feature.SearchView_Inventory);\n\n const {\n filterQuery: listingQuery,\n initialQuery,\n tempQuery,\n setFilterQuery,\n setTempQuery,\n resetTempQuery,\n } = useFilterQueryContext();\n\n const defaultQuickFilters = useDefaultListingFilter({\n initialQuery,\n listingQuery,\n });\n\n useEffect(() => {\n setTempQuery(listingQuery);\n }, [listingQuery, setTempQuery]);\n\n const { value: defaultViewModeUserSetting, setUserSetting } =\n useServerUserSetting({\n id: UserSetting.InventoryPageViewMode,\n currentLoginUserOnly: true,\n });\n\n const filterToolbarProps = useFilterToolbarQuickFilters({\n quickFiltersStateSetting: UserSetting.QuickFiltersStateInventory,\n customQuickFiltersSetting: UserSetting.QuickFiltersCustomInventory,\n defaultQuickFilters,\n currentQuery: listingQuery,\n initialQuery,\n onSelect: ({ query }) => {\n if (query.viewMode != null) {\n // We need to update initialQuery, otherwise the quick filter \"All\"\n // may change the current view mode\n if (query.viewMode !== initialQuery.viewMode) {\n initialQuery.viewMode = query.viewMode;\n }\n }\n\n setFilterQuery(query);\n\n // This needs to happen after to reduce re-rendering\n if (query.viewMode != null) {\n // Update user setting view mode too so it won't revert the filter query viewMode\n if (query.viewMode !== defaultViewModeUserSetting) {\n setUserSetting(query.viewMode);\n }\n }\n },\n });\n\n const { appliedFilters } = useFiltersHelpers({\n filters,\n activeQuery: listingQuery,\n mandatoryFiltersToShow: listingsMandatoryFiltersToShow,\n initialQuery,\n });\n\n const filterToolbar = listingQuery && (\n setFilterQuery(tempQuery)}\n filters={filters}\n resetTempQuery={resetTempQuery}\n tempQuery={tempQuery}\n mandatoryFiltersToShow={listingsMandatoryFiltersToShow}\n />\n );\n\n return isSearchOnly ? (\n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n {!isMobile && (\n \n )}\n \n {!isEventPage && (\n <>\n \n\n \n \n )}\n
    \n
    \n
    \n ) : (\n
    \n {isMobile ? (\n filterToolbar\n ) : (\n <>\n
    \n
    \n {isEventPage && (\n \n )}\n {listingQuery.viewMode === InventoryViewMode.MetricView && (\n \n )}\n {filterToolbar}\n
    \n
    \n
    \n
    \n {!isEventPage && (\n <>\n \n \n \n \n \n )}\n {(!hasNewSearchFeature || isEventPage) && (\n \n )}\n
    \n
    \n \n )}\n
    \n );\n}\n","import { ReactNode, useCallback, useEffect, useState } from 'react';\nimport { useSidePanelContext } from 'src/contexts/SidePanelContext';\nimport { Modal, ModalHeader } from 'src/modals/Modal';\nimport styled from 'styled-components/macro';\n\nexport function FlyoverPanel({ children }: { children: ReactNode | null }) {\n const { setHidden, isHidden } = useSidePanelContext();\n\n // Workaround: Modal from Reactstrap only initializes properly when\n // `isOpen` set to true, so only mount the modal when `isOpen` is true.\n //\n // Not using conditional render here {!isHidden && } because we\n // want to keep the state of the children across opening/closing modal\n const [componentDidInit, setComponentInit] = useState(false);\n\n useEffect(() => {\n if (!componentDidInit && !isHidden) {\n setComponentInit(true);\n }\n }, [isHidden, componentDidInit]);\n\n const closeModal = useCallback(() => {\n setHidden(true);\n }, [setHidden]);\n\n return (\n <>\n {componentDidInit && (\n \n \n \n \n {children}\n \n )}\n \n );\n}\n\nconst ModalHeaderContent = styled.div`\n min-height: 40px;\n`;\n","import 'swiper/swiper.min.css';\n\nimport { PropsWithChildren, ReactNode, useRef } from 'react';\nimport { FlyoverPanel } from 'src/core/POS/FlyoverPanel/FlyoverPanel';\nimport {\n ResizablePanel,\n ResizablePanelProps,\n ResizeEdge,\n} from 'src/core/ui/ResizablePanel/ResizablePanel';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport Swiper, { Scrollbar } from 'swiper';\nimport { Swiper as SwiperComponent, SwiperSlide } from 'swiper/react';\n\nimport * as styles from './ExplorerLayout.css';\n\nexport function ExplorerLayout({\n leftPanelContent,\n leftPanelFlyover,\n rightPanelContent,\n rightPanelFlyover,\n autoHide,\n children,\n initialSlide,\n swiperRef,\n ...rest\n}: PropsWithChildren<\n Omit & {\n leftPanelContent?: ReactNode;\n leftPanelFlyover?: boolean;\n rightPanelContent?: ReactNode;\n rightPanelFlyover?: boolean;\n initialSlide?: number;\n swiperRef?: React.MutableRefObject;\n }\n>) {\n const mainRef = useRef(null);\n const mobile = useMatchMedia('mobile');\n\n if (mobile) {\n return (\n
    \n {\n if (swiperRef) {\n swiperRef.current = swiper;\n }\n }}\n allowTouchMove={false}\n initialSlide={initialSlide ?? leftPanelContent ? 1 : 0}\n touchReleaseOnEdges\n slidesPerView={'auto'}\n scrollbar={{\n hide: true,\n snapOnRelease: true,\n }}\n focusableElements=\"input, select, option, textarea, button, video, label, span\"\n modules={[Scrollbar]}\n className={styles.swiper}\n >\n {leftPanelContent && (\n \n
    {leftPanelContent}
    \n
    \n )}\n \n
    {children}
    \n
    \n {rightPanelContent && (\n \n
    {rightPanelContent}
    \n
    \n )}\n \n
    \n );\n }\n\n const subPanel = (\n
    \n {leftPanelContent ?? rightPanelContent}\n
    \n );\n\n return (\n
    \n {leftPanelContent &&\n (leftPanelFlyover ? (\n {subPanel}\n ) : (\n \n {subPanel}\n \n ))}\n\n
    {children}
    \n\n {rightPanelContent &&\n (rightPanelFlyover ? (\n {subPanel}\n ) : (\n \n {subPanel}\n \n ))}\n
    \n );\n}\n","import { SearchResultIdQueryParam } from './constants/constants';\nimport { removeFilters } from './eventQueryUtils';\n\nexport const createPurchaseSearchPageUrl = (\n searchResultId?: string,\n queryParamsToRemove?: string[] // queryParams to remove from final URL\n): string => {\n let searchParams = '';\n const url = new URL(window.location.href);\n\n if (searchResultId) {\n url.searchParams.set(SearchResultIdQueryParam, searchResultId);\n }\n (queryParamsToRemove ?? []).forEach((param) =>\n url.searchParams.delete(param)\n );\n searchParams = `?${removeFilters(url.searchParams.toString(), [\n 'searchText',\n ])}`;\n return `/purchases/search${searchParams}`;\n};\n\nexport const createSaleSearchPageUrl = (\n searchResultId?: string,\n queryParamsToRemove?: string[] // queryParams to remove from final URL\n): string => {\n let searchParams = '';\n const url = new URL(window.location.href);\n\n if (searchResultId) {\n url.searchParams.set(SearchResultIdQueryParam, searchResultId);\n }\n (queryParamsToRemove ?? []).forEach((param) =>\n url.searchParams.delete(param)\n );\n searchParams = `?${removeFilters(url.searchParams.toString(), [\n 'searchText',\n ])}`;\n return `/sales/search${searchParams}`;\n};\n\nexport const createInventorySearchPageUrl = (\n searchResultId?: string,\n queryParamsToRemove?: string[] // queryParams to remove from final URL\n): string => {\n let searchParams = '';\n const url = new URL(window.location.href);\n\n if (searchResultId) {\n url.searchParams.set(SearchResultIdQueryParam, searchResultId);\n }\n (queryParamsToRemove ?? []).forEach((param) =>\n url.searchParams.delete(param)\n );\n searchParams = `?${removeFilters(url.searchParams.toString(), [\n 'searchText',\n ])}`;\n return `/inventory/search${searchParams}`;\n};\n","import { useCallback, useRef } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { EventAccordionItemProps } from 'src/components/Accordions';\nimport { AccountDisabledNotification } from 'src/components/common/AccountDisabledNotification';\nimport { EventListing } from 'src/components/Events/EventListing';\nimport { PerformerVenueList } from 'src/components/Events/PerformerVenueList';\nimport { ListingFilterBar } from 'src/components/Listings/ListingFilterBar';\nimport { ListingSearchBox } from 'src/components/Listings/ListingFilterBar/ListingSearchBox';\nimport { MainFilterBar } from 'src/components/MainFilterBar';\nimport { CatalogMultiSelectionContextProvider } from 'src/contexts/CatalogMultiSelectionContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { DialogProvider } from 'src/contexts/DialogContext/DialogContext';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { MultiSelectionContextProvider } from 'src/contexts/MultiSelectionContext';\nimport { ExplorerLayout } from 'src/core/layouts';\nimport { Button, Stack } from 'src/core/ui';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { LayoutContent } from 'src/navigations/LayoutContent';\nimport { createInventorySearchPageUrl } from 'src/utils/advancedSearchUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n ActionOutboxEntityType,\n CatalogEntity,\n Event,\n EventGroupingType,\n Feature,\n InventoryViewMode,\n Listing,\n ListingQuery,\n} from 'src/WebApiController';\nimport Swiper from 'swiper';\n\nimport { MainRoute } from '../MainRoute';\n\nexport function InventoryEventsExplorer({\n onPerformerVenueRendered,\n onEventsRendered,\n}: {\n onPerformerVenueRendered?: (\n items: CatalogEntity[],\n itemType: EventGroupingType\n ) => void;\n onEventsRendered?: (items: Event[]) => void;\n}) {\n const routeTitle = useContent(ContentId.Inventory);\n const { filterQuery } = useFilterQueryContext();\n\n const onItemsRendered = (items: EventAccordionItemProps[]) => {\n onEventsRendered?.(items.flatMap((i) => i?.event ?? []));\n };\n\n const swiperRef = useRef();\n const mobile = useMatchMedia('mobile');\n\n const hasNewSearchFeature = useUserHasFeature(Feature.SearchView_Inventory);\n\n const navigate = useNavigate();\n\n const onAdvancePurchaseSearch = useCallback(() => {\n const searchUrl = createInventorySearchPageUrl();\n\n setTimeout(() => {\n navigate(searchUrl, {\n state: {\n returnUrl: `${location.pathname}${location.search}`,\n },\n });\n }, 10);\n }, [navigate]);\n\n return (\n \n \n \n \n \n \n \n )\n }\n >\n \n \n \n }\n leftPanelFlyover={\n filterQuery.viewMode === InventoryViewMode.MetricView\n }\n >\n \n {mobile && (\n \n )}\n \n \n \n \n \n \n \n );\n}\n","import { useCallback } from 'react';\nimport { ActivePosEntityProvider } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n CatalogDataContextProvider,\n ExpandedEventData,\n} from 'src/contexts/CatalogDataContext';\nimport { CatalogMetricsContextProvider } from 'src/contexts/CatalogMetricsContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport {\n FilterQueryContextProvider,\n useFilterQueryContext,\n} from 'src/contexts/FilterQueryContext';\nimport { ListingNotificationContextProvider } from 'src/contexts/ListingNotificationContext';\nimport { SellerUserSettingsProvider } from 'src/contexts/SellerUserSettingsContext';\nimport { SidePanelProvider } from 'src/contexts/SidePanelContext';\nimport { useGetActiveAccountClientConfig } from 'src/hooks/useGetActiveAccountClientConfig';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { EVENT_DETAILED_METRICS_QUERY_KEY } from 'src/tables/EventsTable/EventsTable.constants';\nimport {\n DefaultListingQuery,\n EmptyListingQuery,\n} from 'src/utils/eventQueryUtils';\nimport { transformData } from 'src/utils/eventWithDataUtils';\nimport {\n ListingCatalogMetricsQueryKey,\n ListingCatalogQueryKey,\n} from 'src/utils/inventoryUtils';\nimport { addListingMetrics } from 'src/utils/ticketMetricUtils';\nimport {\n ActionOutboxEntityType,\n Feature,\n InventoryViewMode,\n ListingClient,\n ListingDetailDataField,\n ListingDetails,\n ListingMetrics,\n ListingQuery,\n UserSetting,\n} from 'src/WebApiController';\n\nimport { INVENTORY_USER_SETTINGS } from '../InventoryEvent/constants';\nimport {\n getCatalogData,\n getCatalogDataExpanded,\n getCatalogMetrics,\n getCatalogSectionalDataExpanded,\n getEventDetailedMetrics,\n listingQueryValueTransformFromUrl,\n listingQueryValueTransformToUrl,\n} from './Inventory.utils';\nimport { InventoryEventsExplorer } from './InventoryEventsExplorer';\n\nexport function Inventory() {\n const { trackError } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n\n const hasSectionalLoadInListingTable = useUserHasFeature(\n Feature.SectionalLoadInListingTable\n );\n\n const getCatalogDataExpandedCallback = useCallback(\n (ids: string[], filterQuery: ListingQuery) => {\n if (hasSectionalLoadInListingTable) {\n return getCatalogSectionalDataExpanded(\n ids,\n filterQuery,\n [\n ListingDetailDataField.Basic,\n ListingDetailDataField.Pricing,\n ListingDetailDataField.AutoPricing,\n ],\n {\n activeAccountWebClientConfig,\n onError: (error) => {\n trackError(\n 'ListingClient.getListingsSectionalDataForEvents',\n error,\n {\n ...filterQuery,\n eventIds: ids,\n }\n );\n },\n }\n );\n }\n return getCatalogDataExpanded(ids, filterQuery, {\n activeAccountWebClientConfig,\n onError: (error) => {\n trackError('ListingClient.getListingsForEvents', error, {\n ...filterQuery,\n eventIds: ids,\n });\n },\n });\n },\n [activeAccountWebClientConfig, hasSectionalLoadInListingTable, trackError]\n );\n\n const onCatalogDataExpandedCallback = useCallback(\n (\n ids: string[],\n filterQuery: ListingQuery,\n currentData?: ExpandedEventData\n ) =>\n getCatalogSectionalDataExpanded(\n ids,\n filterQuery,\n [ListingDetailDataField.Purchase, ListingDetailDataField.Tags],\n {\n activeAccountWebClientConfig,\n onError: (error) => {\n trackError('ListingClient.getCatalogSectionalDataExpanded', error, {\n ...filterQuery,\n eventIds: ids,\n });\n },\n },\n currentData\n ),\n [activeAccountWebClientConfig, trackError]\n );\n\n return (\n \n \n initialQuery={DefaultListingQuery}\n emptyQuery={EmptyListingQuery}\n viewModeSettingId={UserSetting.InventoryPageViewMode}\n queryValueTransformToUrl={listingQueryValueTransformToUrl}\n queryValueTransformFromUrl={listingQueryValueTransformFromUrl}\n saveQueryInUrl\n >\n \n entityType={ActionOutboxEntityType.Listing}\n queryKey={ListingCatalogQueryKey}\n getCatalogData={(c, f) => getCatalogData(c, f, true)}\n getCatalogDataExpanded={getCatalogDataExpandedCallback}\n onCatalogDataExpanded={\n hasSectionalLoadInListingTable\n ? onCatalogDataExpandedCallback\n : undefined\n }\n transformEventData={transformData}\n >\n \n \n \n \n );\n}\n\nconst ListingRouteBody = () => {\n const { filterQuery } = useFilterQueryContext();\n const getActClientCfg = useGetActiveAccountClientConfig(\n 'Inventory.ListingClient.getListingByListingId'\n );\n\n const hasSectionalLoadDataFeature = useUserHasFeature(\n Feature.ListingLoadBySection\n );\n\n const getActivePosEntity = useCallback(\n async (\n posEntityId: number,\n curEntity?: ListingDetails | null,\n dataToGet?: string[] | null\n ) => {\n const activeClientCf = await getActClientCfg();\n\n const listingDetail = await new ListingClient(\n activeClientCf\n ).getListingByListingId(\n posEntityId,\n hasSectionalLoadDataFeature ? curEntity ?? undefined : undefined,\n hasSectionalLoadDataFeature\n ? dataToGet?.map((s) => s as ListingDetailDataField) ?? []\n : undefined\n );\n\n if (listingDetail) {\n return {\n posEntityId: listingDetail.id,\n posEntity: listingDetail,\n posEntityDisplayId: listingDetail.idOnMkp,\n };\n }\n\n return {};\n },\n [getActClientCfg, hasSectionalLoadDataFeature]\n );\n\n const isSidePanelFlyover =\n filterQuery.viewMode === InventoryViewMode.MetricView;\n\n const hasMetricsV2Feature = useUserHasFeature(Feature.CatalogMetricsV2);\n\n return (\n \n queryKey={\n isSidePanelFlyover\n ? EVENT_DETAILED_METRICS_QUERY_KEY\n : ListingCatalogMetricsQueryKey\n }\n entityType={ActionOutboxEntityType.Listing}\n isDetailed={isSidePanelFlyover}\n getCatalogMetrics={(c, f, r) =>\n isSidePanelFlyover\n ? getEventDetailedMetrics(c, f, r, hasMetricsV2Feature)\n : getCatalogMetrics(c, f, r, hasMetricsV2Feature)\n }\n addCatalogMetrics={addListingMetrics}\n >\n \n entityType={ActionOutboxEntityType.Listing}\n getActivePosEntity={getActivePosEntity}\n >\n \n \n \n \n \n \n \n );\n};\n","import { useMemo } from 'react';\nimport { PerformerCategoryIcon } from 'src/components/common/PerformerCategoryIcon';\nimport { SummaryTile } from 'src/components/common/SummaryTile';\nimport {\n AverageTicketPriceDisplay,\n SalesAndMarginDisplay,\n TicketsListedAndSoldDisplay,\n} from 'src/components/Listings/InventorySummaryWidgets';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { groupAndAggregateMetrics } from 'src/contexts/CatalogMetricsContext/CatalogMetrics.utils';\nimport { useGeSummaryMetricsQuery } from 'src/contexts/CatalogMetricsContext/useGetSummaryMetricsQuery';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { hideMobile } from 'src/core/themes/shared.css';\nimport { Stack } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { getCatalogSummaryMetrics } from 'src/navigations/Routes/Inventory';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n addListingMetrics,\n getInventorySummaryListingMetricsDisplayStrings,\n} from 'src/utils/ticketMetricUtils';\nimport {\n Feature,\n ListingMetrics,\n ListingQuery,\n Performer,\n} from 'src/WebApiController';\n\nimport * as styles from './InventoryEventListing.css';\n\nconst mergeCatalogMetrics = (metrics: ListingMetrics[]) =>\n groupAndAggregateMetrics(metrics, addListingMetrics);\n\nexport const InventoryEventSummaryMetrics = () => {\n const { data } = useCatalogDataContext();\n const hasBlockInventorySummaryStatsFeature = useUserHasFeature(\n Feature.BlockInventorySummaryStats\n );\n\n const { filterQuery } = useFilterQueryContext();\n const { loginContext } = useAppContext();\n\n const { summaryMetrics } = useGeSummaryMetricsQuery(\n 'ListingMetrics',\n filterQuery.performerIds,\n filterQuery.venueIds,\n mergeCatalogMetrics,\n getCatalogSummaryMetrics\n );\n\n const currencyCode = loginContext?.user?.activeAccount?.currencyCode;\n const formattedTotalMetrics = useMemo(() => {\n return summaryMetrics\n ? getInventorySummaryListingMetricsDisplayStrings(\n summaryMetrics,\n currencyCode\n )\n : null;\n }, [currencyCode, summaryMetrics]);\n\n const selectedEntity = (() => {\n const { performerIds, venueIds } = filterQuery;\n const selectedPerformersCount = performerIds?.length ?? 0;\n const selectedVenuesCount = venueIds?.length ?? 0;\n // return if only 1 entity is selected\n if (selectedPerformersCount + selectedVenuesCount === 1) {\n if (performerIds?.length === 1) {\n return data?.performers[performerIds[0]];\n }\n if (venueIds?.length === 1) {\n return data?.venues[venueIds[0]];\n }\n }\n })();\n\n if (hasBlockInventorySummaryStatsFeature) {\n return null;\n }\n\n return (\n
    \n \n \n \n {selectedEntity?.name ?? }\n {selectedEntity && (\n \n {(selectedEntity as Performer).categ && (\n <>\n \n  \n \n )}\n {selectedEntity?.descr}\n \n )}\n \n \n }\n showLoadingPlaceholders={!formattedTotalMetrics}\n >\n {formattedTotalMetrics?.formattedTotalListPrice}\n \n \n \n \n \n \n \n \n \n
    \n );\n};\n","import { useMemo } from 'react';\nimport { useGetNoSelectedItemsLabel } from 'src/components/common/MultiSelect/useGetNoSelectedItemsLabel';\nimport { useContent } from 'src/contexts/ContentContext';\nimport {\n MultiSelectScope,\n NO_GROUP_ID,\n useMultiSelectionContext,\n} from 'src/contexts/MultiSelectionContext';\nimport { ContentId } from 'src/utils/constants/contentId';\n\ninterface UseInventoryFlattedViewSelectedLegendProps {\n singleElementLabel: string;\n multipleElementsLabel: string;\n}\n\nexport const useEventFlattedViewSelectedLegend = ({\n singleElementLabel,\n multipleElementsLabel,\n}: UseInventoryFlattedViewSelectedLegendProps) => {\n const { selectionMode, totalItemsSelected, itemSelection } =\n useMultiSelectionContext();\n const selectedText = useContent(ContentId.Selected);\n\n const isAllGroupsMode = selectionMode?.mode === MultiSelectScope.AllGroups;\n const isNoGroupSelection = !!itemSelection?.[NO_GROUP_ID];\n const noItemsSelected = useGetNoSelectedItemsLabel();\n\n return useMemo(() => {\n if (!isAllGroupsMode || !totalItemsSelected || !isNoGroupSelection) {\n return noItemsSelected;\n }\n\n const listingCount = itemSelection[NO_GROUP_ID].items.filter(\n (itemId) => Number(itemId) > 0\n ).length;\n\n const selectedListingsLabel = `${listingCount} ${\n listingCount === 1 ? singleElementLabel : multipleElementsLabel\n }`;\n\n return `${selectedListingsLabel} ${selectedText}`.toLocaleLowerCase();\n }, [\n isAllGroupsMode,\n totalItemsSelected,\n isNoGroupSelection,\n itemSelection,\n singleElementLabel,\n multipleElementsLabel,\n selectedText,\n noItemsSelected,\n ]);\n};\n","import { ReactNode, useEffect } from 'react';\nimport { useEventFlattedViewSelectedLegend } from 'src/components/Events/EventListing/useEventFlattedViewSelectedLegend';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { ContentId } from 'src/utils/constants/contentId';\n\ninterface SetInventoryFlattenedViewSelectionCountLabelProps {\n children: ReactNode;\n}\n\nexport const SetInventoryFlattenedViewSelectionCountLabel = ({\n children,\n}: SetInventoryFlattenedViewSelectionCountLabelProps) => {\n const listingText = useContent(ContentId.Listing);\n const listingsText = useContent(ContentId.Listings);\n const { setSelectedCountLabel, setUsingCustomSelectedCountLabel } =\n useMultiSelectionContext();\n\n useEffect(() => {\n setUsingCustomSelectedCountLabel(true);\n }, [setUsingCustomSelectedCountLabel]);\n\n const selectedLegend = useEventFlattedViewSelectedLegend({\n singleElementLabel: listingText,\n multipleElementsLabel: listingsText,\n });\n\n useEffect(() => {\n setSelectedCountLabel(selectedLegend);\n }, [selectedLegend, setSelectedCountLabel]);\n\n return <>{children};\n};\n","import clsx from 'clsx';\nimport { MouseEvent, ReactNode, useMemo } from 'react';\nimport { useToggle } from 'react-use';\nimport { ExpandCollapsableContentButton } from 'src/components/common/CollapsableContent/ExpandCollapsableContentButton';\nimport { MultiSelectActionBar } from 'src/components/common/MultiSelect/MultiSelectActionBar';\nimport { collapsedRow } from 'src/components/Events/EventListing/InventoryEventListing/InventoryFlattenedView.css';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { useCollapsableViewContext } from 'src/contexts/CollapsableViewContext/CollapsableViewContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { InputPriceFocusProvider } from 'src/contexts/InputPriceFocusContext/InputPriceFocusContext';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { ColumnSettingsModal } from 'src/modals/ColumnSettings/ColumnSettings';\nimport { LayoutIcon } from 'src/svgs';\nimport {\n ListingTableFlattened,\n ListingTableFlattenedProps,\n} from 'src/tables/ListingTable/ListingTableFlattened';\nimport { CustomListingColumn } from 'src/utils/columns/inventory/inventoryCustomColumnUtils.types';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getEventPerformerVenue } from 'src/utils/eventWithDataUtils';\nimport { SectionType } from 'src/utils/types/sectionType';\n\nimport { bulkToolbarContainer } from '../EventListing.css';\nimport { InventoryGlobalBulkActions } from './BulkActions';\nimport * as styles from './InventoryFlattenedView.css';\nimport { SetInventoryFlattenedViewSelectionCountLabel } from './SetInventoryFlattenedViewSelectionCountLabel';\n\ntype InventoryFlattenedViewProps = {\n before?: ReactNode;\n topListItemBefore?: ReactNode;\n /**\n * If provided, the list will scroll to the month containing the event with the given posEventId\n */\n scrollToEventId?: string;\n doNotShowToolbar?: boolean;\n} & Pick<\n ListingTableFlattenedProps,\n | 'alwaysShowCheckbox'\n | 'showSelectAllOnHeader'\n | 'enableColumnFilters'\n | 'ignoreMaxCount'\n>;\n\nexport const InventoryFlattenedView = ({\n before,\n topListItemBefore,\n doNotShowToolbar,\n ...rest\n}: InventoryFlattenedViewProps) => {\n const [isColumnModalOpen, toggleColumnModal] = useToggle(false);\n\n const { isCollapsedView, setIsCollapsedView } = useCollapsableViewContext();\n\n const onColumnSettingButtonClickHandler = (\n e: MouseEvent\n ) => {\n e.stopPropagation();\n if (!isColumnModalOpen) toggleColumnModal(true);\n };\n\n const { data: catalog, eventsTransformed } = useCatalogDataContext();\n const { listingCount, ungroupedListingCount, listingGroupCount } =\n useMemo(() => {\n let listingCount = 0;\n let ungroupedListingCount = 0;\n let listingGroupCount = 0;\n\n (eventsTransformed ?? []).forEach((ev) => {\n listingCount += ev.counts.listCnt ?? 0;\n listingGroupCount += ev.counts.listGrpCnt ?? 0;\n ungroupedListingCount += ev.counts.ungrListCnt ?? 0;\n });\n\n return { listingCount, ungroupedListingCount, listingGroupCount };\n }, [eventsTransformed]);\n\n const listings = useMemo(() => {\n const listingsArray = eventsTransformed?.every(\n (ev) => ev.entities.listings == null\n )\n ? null\n : eventsTransformed?.flatMap((ev) => ev.entities.listings);\n return listingsArray\n ?.map((l) => {\n const { event, performer, venue } = getEventPerformerVenue(\n l?.viagVirtualId,\n catalog\n );\n\n if (event) {\n return { event: event.event, listing: l, performer, venue };\n }\n\n return null;\n })\n .filter((l) => l != null)\n .map((l) => l!);\n }, [catalog, eventsTransformed]);\n\n return (\n \n {isColumnModalOpen ? (\n \n onClose={toggleColumnModal}\n sectionType={SectionType.ListingsFlattened}\n />\n ) : null}\n \n {before}\n
    \n {topListItemBefore}\n {!doNotShowToolbar && (\n \n \n \n \n \n \n {isCollapsedView && (\n setIsCollapsedView(false)}\n />\n )}\n \n \n \n \n \n )}\n \n \n \n \n );\n};\n","import { useCallback, useEffect, useMemo, useState } from 'react';\nimport { useLocation } from 'react-router-dom';\nimport {\n EventAccordionItemProps,\n InventoryEventsAccordion,\n translateEventToInventoryAccordionItem,\n} from 'src/components/Accordions';\nimport * as EmptySectionContent from 'src/components/common/EmptySectionContent';\nimport { MultiSelectActionBar } from 'src/components/common/MultiSelect/MultiSelectActionBar';\nimport { SetInventoryEventAccordionSelectionCountLabel } from 'src/components/Events/EventListing/InventoryEventListing/SetInventoryEventAccordionSelectionCountLabel';\nimport { SetInventoryMetricsSelectionCountLabel } from 'src/components/Events/EventListing/InventoryEventListing/SetInventoryMetricsViewSelectionCountLabel';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { CollapsableViewProvider } from 'src/contexts/CollapsableViewContext/CollapsableViewContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport {\n NO_GROUP_ID,\n useMultiSelectionContext,\n} from 'src/contexts/MultiSelectionContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { SearchSolidIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SomethingWentWrong } from 'src/views';\nimport { InventoryViewMode, Listing, ListingQuery } from 'src/WebApiController';\n\nimport * as styles from '../EventListing.css';\nimport { InventoryGlobalBulkActions } from './BulkActions';\nimport { InventoryDetailedEventView } from './InventoryDetailedEventView';\nimport { InventoryEventSummaryMetrics } from './InventoryEventSummaryMetrics';\nimport { InventoryFlattenedView } from './InventoryFlattenedView';\n\nexport function InventoryEventListing({\n onItemsRendered,\n}: {\n onItemsRendered?: (items: EventAccordionItemProps[]) => void;\n}) {\n const {\n isLoading,\n errorInfo,\n eventsTransformed,\n eventsExpansion: { expandedListItems, toggleListItemExpansion },\n } = useCatalogDataContext();\n const { filterQuery } = useFilterQueryContext();\n const location = useLocation();\n\n const onInventoryEventExpanded = useCallback(\n async (viagVirtualId: string) => {\n toggleListItemExpansion([viagVirtualId]);\n },\n [toggleListItemExpansion]\n );\n\n const [returningFromViagogoEventId, setReturningFromViagogoEventId] =\n useState();\n\n useEffect(() => {\n const fromViagogoEventId = (\n location.state as { fromViagogoEventId?: string }\n )?.fromViagogoEventId;\n if (fromViagogoEventId) {\n setReturningFromViagogoEventId(fromViagogoEventId);\n }\n }, [location.state]);\n\n const scrollToItemIndex = useMemo(() => {\n if (returningFromViagogoEventId == null || eventsTransformed == null) {\n return undefined;\n }\n\n const scrollToIndex = eventsTransformed.findIndex(\n (e) => e.event.viagVirtualId === returningFromViagogoEventId\n );\n // Not found means the event is not in the list, so we don't want to scroll to it any more\n if (scrollToIndex === -1) {\n setReturningFromViagogoEventId(undefined);\n }\n\n return scrollToIndex === -1 ? undefined : scrollToIndex;\n }, [eventsTransformed, returningFromViagogoEventId]);\n\n const eventIdFromHash =\n location.hash.length === 37 ? location.hash.substring(1) : undefined; // UUID 36 chars\n\n useEffect(() => {\n if (eventIdFromHash) {\n toggleListItemExpansion([eventIdFromHash]);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [eventIdFromHash]);\n\n const { setAllGroupsIds, clearShiftKeySelection, setSelectionMode } =\n useMultiSelectionContext();\n\n useEffect(() => {\n clearShiftKeySelection();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [filterQuery.viewMode]);\n\n const listingItems = useMemo(() => {\n return (\n eventsTransformed?.map((e, i) =>\n translateEventToInventoryAccordionItem(e, i)\n ) || []\n );\n }, [eventsTransformed]);\n\n useEffect(() => {\n if (filterQuery.viewMode === InventoryViewMode.FlattenedView) {\n setAllGroupsIds([NO_GROUP_ID]);\n } else {\n const groupIds = listingItems.map((listingItem) => listingItem.itemId);\n setAllGroupsIds(groupIds);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [listingItems, filterQuery.viewMode]);\n\n // Reset and close selection mode when changing view\n useEffect(() => {\n setSelectionMode();\n }, [filterQuery.viewMode, setSelectionMode]);\n\n return (\n <>\n {isLoading && }\n {errorInfo && (\n }\n />\n )}\n {!isLoading &&\n !errorInfo &&\n (eventsTransformed && eventsTransformed.length > 0 ? (\n
    \n {filterQuery.viewMode === InventoryViewMode.MetricView ? (\n }\n topListItemBefore={\n \n \n \n \n \n }\n items={eventsTransformed}\n highlightEvent={eventIdFromHash}\n scrollToEventId={returningFromViagogoEventId}\n />\n ) : filterQuery.viewMode === InventoryViewMode.FlattenedView ? (\n \n }\n enableColumnFilters\n />\n \n ) : (\n }\n topListItemBefore={\n \n \n \n \n \n }\n items={listingItems}\n disablePagination\n scrollToItemIndex={scrollToItemIndex}\n selectedIds={expandedListItems}\n onSelect={onInventoryEventExpanded}\n onItemsRendered={onItemsRendered}\n />\n )}\n
    \n ) : (\n \n \n \n }\n >\n \n \n \n \n \n \n \n ))}\n \n );\n}\n","import { ReactNode, useEffect } from 'react';\nimport { useEventsAccordionSelectedLegend } from 'src/components/Events/EventListing/useEventsAccordionSelectedLegend';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { ContentId } from 'src/utils/constants/contentId';\n\ninterface SetSalesEventAccordionSelectionCountLabelProps {\n children: ReactNode;\n}\n\nexport const SetSalesEventAccordionSelectionCountLabel = ({\n children,\n}: SetSalesEventAccordionSelectionCountLabelProps) => {\n const saleText = useContent(ContentId.Sale);\n const salesText = useContent(ContentId.Sales);\n const { setSelectedCountLabel, setUsingCustomSelectedCountLabel } =\n useMultiSelectionContext();\n\n useEffect(() => {\n setUsingCustomSelectedCountLabel(true);\n }, [setUsingCustomSelectedCountLabel]);\n\n const selectedLegend = useEventsAccordionSelectedLegend({\n singleElementLabel: saleText,\n multipleElementsLabel: salesText,\n });\n\n useEffect(() => {\n setSelectedCountLabel(selectedLegend);\n }, [selectedLegend, setSelectedCountLabel]);\n\n return <>{children};\n};\n","import { ReactNode, useEffect } from 'react';\nimport { useEventFlattedViewSelectedLegend } from 'src/components/Events/EventListing/useEventFlattedViewSelectedLegend';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { ContentId } from 'src/utils/constants/contentId';\n\ninterface SetSalesFlattenedViewSelectionCountLabelProps {\n children: ReactNode;\n}\n\nexport const SetSalesFlattenedViewSelectionCountLabel = ({\n children,\n}: SetSalesFlattenedViewSelectionCountLabelProps) => {\n const listingText = useContent(ContentId.Sale);\n const listingsText = useContent(ContentId.Sales);\n const { setSelectedCountLabel, setUsingCustomSelectedCountLabel } =\n useMultiSelectionContext();\n\n useEffect(() => {\n setUsingCustomSelectedCountLabel(true);\n }, [setUsingCustomSelectedCountLabel]);\n\n const selectedLegend = useEventFlattedViewSelectedLegend({\n singleElementLabel: listingText,\n multipleElementsLabel: listingsText,\n });\n\n useEffect(() => {\n setSelectedCountLabel(selectedLegend);\n }, [selectedLegend, setSelectedCountLabel]);\n\n return <>{children};\n};\n","import { useState } from 'react';\nimport { ExportSalesButton } from 'src/components/Buttons/ExportSalesButton';\nimport { useBulkActionsState } from 'src/components/common/BulkActions/useBulkActionsState';\nimport { useUpdatePurchasesPermissions } from 'src/components/Purchases/BulkActions/useUpdatePurchasesPermissions';\nimport { useBulkEditCommissionAction } from 'src/components/Sales/SalesActionDropdown/components/BulkEditCommissionAction';\nimport { useBulkMarkSaleAsPaid } from 'src/components/Sales/SalesActionDropdown/components/BulkMarkSaleAsPaid';\nimport { useBulkUpdateInternalNotesAction } from 'src/components/Sales/SalesActionDropdown/components/BulkUpdateInternalNotesAction';\nimport { useBulkUpdateSalesSettings } from 'src/components/Sales/SalesActionDropdown/components/BulkUpdateSalesGeneralSettings';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosDropdown, PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { ChevronDownIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { useSalesBulkActionsState } from '../../useSalesBulkActionsState';\nimport { useUpdateSalesSettingsPermissions } from '../../useUpdateSalesSettingsPermissions';\n\nexport const SettingsActions = () => {\n const { areBulkActionsEnabled } = useBulkActionsState();\n const [isLoading, setIsLoading] = useState(false);\n const { filterQueryWithEventIds } = useSalesBulkActionsState();\n\n const bulkUpdateGeneralSettings = useBulkUpdateSalesSettings(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n undefined\n );\n\n const bulkUpdateInternalNotes = useBulkUpdateInternalNotesAction(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n undefined\n );\n\n const bulkEditCommissionAction = useBulkEditCommissionAction(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n undefined\n );\n\n const bulkMarkSaleAsPaid = useBulkMarkSaleAsPaid(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n undefined\n );\n\n const { hasUpdateSalesSettingsPermission } =\n useUpdateSalesSettingsPermissions();\n const {\n hasUpdatePurchasesPermission,\n hasPurchaseUpdateCommissionPermission,\n } = useUpdatePurchasesPermissions();\n\n if (\n !hasUpdateSalesSettingsPermission &&\n !hasUpdatePurchasesPermission &&\n !hasPurchaseUpdateCommissionPermission\n ) {\n return null;\n }\n\n return (\n <>\n \n \n \n \n }\n align=\"start\"\n triggerProps={{ disabled: isLoading || !areBulkActionsEnabled }}\n >\n {bulkUpdateGeneralSettings.dropDown}\n {bulkUpdateInternalNotes.dropDown}\n {bulkEditCommissionAction.dropDown}\n {bulkMarkSaleAsPaid.dropDown}\n \n \n \n \n \n );\n};\n","import { useState } from 'react';\nimport { BulkEditTagsActionPermissionsHandler } from 'src/components/common/BulkActions/BulkEditTagsAction/BulkEditTagsActionPermissionsHandler';\nimport { useBulkActionsState } from 'src/components/common/BulkActions/useBulkActionsState';\nimport { useBulkEditTagsAction } from 'src/components/Sales/SalesActionDropdown/components/BulkEditTagsAction';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosDropdown } from 'src/core/POS/PosDropdown';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { ChevronDownIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ActionOutboxEntityType } from 'src/WebApiController';\n\nimport { useSalesBulkActionsState } from '../../useSalesBulkActionsState';\n\nexport const TagsActions = () => {\n const { areBulkActionsEnabled } = useBulkActionsState();\n const [isLoading, setIsLoading] = useState(false);\n const { filterQueryWithEventIds } = useSalesBulkActionsState();\n const bulkUpdateTags = useBulkEditTagsAction(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n undefined\n );\n\n return (\n \n \n \n \n \n }\n align=\"start\"\n triggerProps={{ disabled: isLoading || !areBulkActionsEnabled }}\n >\n {bulkUpdateTags.dropDown}\n \n \n );\n};\n","import { MultiSelectActionsContainer } from 'src/components/common/MultiSelect/MultiSelectActionsContainer';\nimport { FulfillmentActions } from 'src/components/Sales/BulkActions/SalesGlobalBulkActions/Actions/FulfillmentActions';\nimport { SettingsActions } from 'src/components/Sales/BulkActions/SalesGlobalBulkActions/Actions/SettingsActions';\nimport { TagsActions } from 'src/components/Sales/BulkActions/SalesGlobalBulkActions/Actions/TagsActions';\n\nexport const SalesGlobalBulkActions = () => {\n return (\n \n \n \n \n \n );\n};\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components';\n\nexport const SubfilterContainer = styled.div<{ isSelected?: boolean }>`\n display: flex;\n flex-direction: column;\n row-gap: ${() => vars.spacing['sm']};\n flex-grow: 1;\n background: ${(props) =>\n props.isSelected ? '#f1ebfa' : props.theme.colors.backgroundSecondary};\n border: ${(props) =>\n props.isSelected ? '1px solid #3F1D75' : '1px solid transparent'};\n border-radius: ${() => vars.borderRadius.m};\n padding: ${() => vars.spacing['3xl']};\n cursor: pointer;\n &:hover {\n background: #f1ebfa;\n border-color: ${(props) => (props.isSelected ? undefined : '#f1ebfa')};\n }\n`;\n","import { ReactNode } from 'react';\n\nimport * as styles from './SubfilterGroup.css';\nimport { SubfilterContainer } from './SubfilterGroup.styled';\n\nexport type SubfilterGroupItemProps = {\n name: ReactNode;\n count?: ReactNode;\n isSelected?: boolean;\n onClick?: () => void;\n};\n\nexport function SubfilterGroupItem({\n name,\n count,\n isSelected,\n onClick,\n}: SubfilterGroupItemProps) {\n return (\n \n
    {name}
    \n {count &&
    {count}
    }\n
    See All >
    \n
    \n );\n}\n\nexport const SubfilterGroup = Object.assign(\n function SubfilterGroup({ children }: { children?: ReactNode }) {\n return
    {children}
    ;\n },\n {\n Item: SubfilterGroupItem,\n }\n);\n","import { ReactNode } from 'react';\nimport { useQuickFilterSearchParam } from 'src/hooks/useQuickFilters';\n\nexport type Subfilter = {\n id: string;\n name: ReactNode | string;\n data: D;\n};\n\nexport type UseQuickSubfiltersOptions = {\n quickSubfilters: { [parentQuickFilterId: string]: Subfilter[] };\n initialQuery: D;\n};\n\nexport function useQuickSubfilters({\n quickSubfilters,\n}: UseQuickSubfiltersOptions) {\n const currentQuickFilterId = useQuickFilterSearchParam();\n const filteredQuickSubfilters =\n currentQuickFilterId != null\n ? quickSubfilters[currentQuickFilterId] ?? []\n : [];\n return {\n quickSubfilters: filteredQuickSubfilters,\n };\n}\n","import { ReactNode, useMemo } from 'react';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { Stack } from 'src/core/ui';\nimport {\n SalesTableFlattened,\n SalesTableFlattenedProps,\n} from 'src/tables/SalesTable/SalesTableFlattened';\nimport { SaleQuery } from 'src/WebApiController';\n\ntype SalesFlattenedViewProps = {\n before?: ReactNode;\n topListItemBefore?: ReactNode;\n /**\n * If provided, the list will scroll to the month containing the event with the given posEventId\n */\n scrollToEventId?: string;\n} & Pick<\n SalesTableFlattenedProps,\n | 'alwaysShowCheckbox'\n | 'showSelectAllOnHeader'\n | 'enableColumnFilters'\n | 'ignoreMaxCount'\n>;\n\nexport const SalesFlattenedView = ({\n before,\n topListItemBefore,\n ...rest\n}: SalesFlattenedViewProps) => {\n const { filterQuery } = useFilterQueryContext();\n const { eventsTransformed } = useCatalogDataContext();\n const { salesCount } = useMemo(() => {\n let salesCount = 0;\n\n (eventsTransformed ?? []).forEach((ev) => {\n salesCount += ev.counts.salesCnt ?? 0;\n });\n\n return { salesCount };\n }, [eventsTransformed]);\n\n const sales = useMemo(\n () =>\n eventsTransformed?.every((ev) => ev.entities.sales == null)\n ? null\n : eventsTransformed\n ?.flatMap((ev) => ev.entities.sales)\n ?.filter((s) => s != null)\n ?.map((s) => s!),\n [eventsTransformed]\n );\n\n return (\n \n {before}\n {topListItemBefore}\n\n s != null).map((s) => s!)}\n failedToRetrieveData={false}\n />\n \n );\n};\n","import { isEqual } from 'lodash-es';\nimport { MouseEvent, useCallback, useEffect, useMemo } from 'react';\nimport { useToggle } from 'react-use';\nimport {\n EventAccordionItemProps,\n SaleEventsEmpty,\n SalesEventsAccordion,\n translateEventToSaleAccordionItem,\n} from 'src/components/Accordions';\nimport { MultiSelectActionBar } from 'src/components/common/MultiSelect/MultiSelectActionBar';\nimport { SetSalesEventAccordionSelectionCountLabel } from 'src/components/Events/EventListing/SalesEventListing/SetSalesEventAccordionSelectionCountLabel';\nimport { SetSalesFlattenedViewSelectionCountLabel } from 'src/components/Events/EventListing/SalesEventListing/SetSalesFlattenedViewSelectionCountLabel';\nimport { SalesBulkActionsPermissions } from 'src/components/Sales/BulkActions/SalesBulkActionsPermissions';\nimport { SalesGlobalBulkActions } from 'src/components/Sales/BulkActions/SalesGlobalBulkActions/SalesGlobalBulkActions';\nimport { SubfilterGroup } from 'src/components/SubfilterGroup';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport {\n NO_GROUP_ID,\n useMultiSelectionContext,\n} from 'src/contexts/MultiSelectionContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { useQuickSubfilters } from 'src/hooks/useQuickSubfilters';\nimport { ColumnSettingsModal } from 'src/modals/ColumnSettings/ColumnSettings';\nimport { LayoutIcon } from 'src/svgs';\nimport { CustomSalesColumn } from 'src/utils/columns/sales/salesCustomColumnUtils.types';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n DateRangePresetName,\n getDateRangePresets,\n} from 'src/utils/dateTimeUtils';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport { SomethingWentWrong } from 'src/views';\nimport {\n DateTimeRangeWithRelative,\n Sale,\n SaleQuery,\n SalesViewMode,\n} from 'src/WebApiController';\n\nimport * as styles from '../EventListing.css';\nimport { SalesFlattenedView } from './SalesFlattenedView';\n\nexport function SalesEventListing({\n onItemsRendered,\n}: {\n onItemsRendered?: (items: EventAccordionItemProps[]) => void;\n}) {\n const {\n isLoading,\n errorInfo,\n eventsTransformed,\n eventsExpansion: { expandedListItems, toggleListItemExpansion },\n } = useCatalogDataContext();\n\n const onSalesEventExpanded = useCallback(\n async (viagVirtualId: string) => {\n toggleListItemExpansion([viagVirtualId]);\n },\n [toggleListItemExpansion]\n );\n const { filterQuery, initialQuery, setFilterQuery } =\n useFilterQueryContext();\n\n const [isColumnModalOpen, toggleColumnModal] = useToggle(false);\n\n const onColumnSettingButtonClickHandler = (\n e: MouseEvent\n ) => {\n e.stopPropagation();\n if (!isColumnModalOpen) toggleColumnModal(true);\n };\n\n const quickSubfiltersInit = useMemo(() => {\n const [todayPreset] = getDateRangePresets([DateRangePresetName.Today]);\n const [last7DaysPreset] = getDateRangePresets([\n DateRangePresetName.Last7Days,\n ]);\n const [last30DaysPreset] = getDateRangePresets([\n DateRangePresetName.Last30Days,\n ]);\n return {\n recentlySold: [\n {\n id: 'soldToday',\n name: ,\n data: {\n ...initialQuery,\n eventTimeFrameFilter: null,\n saleDates: {\n start: todayPreset.range.start.toISOString(),\n end: todayPreset.range.end.toISOString(),\n } as DateTimeRangeWithRelative,\n },\n },\n {\n id: 'soldLast7Days',\n name: ,\n data: {\n ...initialQuery,\n eventTimeFrameFilter: null,\n saleDates: {\n start: last7DaysPreset.range.start.toISOString(),\n end: last7DaysPreset.range.end.toISOString(),\n } as DateTimeRangeWithRelative,\n },\n },\n {\n id: 'soldLast30Days',\n name: ,\n data: {\n ...initialQuery,\n eventTimeFrameFilter: null,\n saleDates: {\n start: last30DaysPreset.range.start.toISOString(),\n end: last30DaysPreset.range.end.toISOString(),\n } as DateTimeRangeWithRelative,\n },\n },\n ],\n };\n }, [initialQuery]);\n const { quickSubfilters } = useQuickSubfilters({\n quickSubfilters: quickSubfiltersInit,\n initialQuery,\n });\n\n function Subfilters() {\n if (quickSubfilters.length <= 0) {\n return null;\n }\n return (\n \n {quickSubfilters.map(({ id, name, data: query }) => (\n {\n setFilterQuery(query);\n }}\n />\n ))}\n \n );\n }\n\n const { setAllGroupsIds, clearShiftKeySelection, setSelectionMode } =\n useMultiSelectionContext();\n\n const salesItems = useMemo(() => {\n return (\n eventsTransformed?.map((e, i) =>\n translateEventToSaleAccordionItem(e, i)\n ) || []\n );\n }, [eventsTransformed]);\n\n useEffect(() => {\n if (filterQuery.viewMode === SalesViewMode.FlattenedView) {\n setAllGroupsIds([NO_GROUP_ID]);\n } else {\n setAllGroupsIds(salesItems.map((saleItem) => saleItem.itemId));\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [salesItems, filterQuery.viewMode]);\n\n useEffect(() => {\n clearShiftKeySelection();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [filterQuery.viewMode]);\n\n // Reset and close selection mode when changing view\n useEffect(() => {\n setSelectionMode();\n }, [filterQuery.viewMode, setSelectionMode]);\n\n return (\n <>\n \n {isLoading && }\n {errorInfo && (\n }\n />\n )}\n {!isLoading &&\n !errorInfo &&\n (eventsTransformed && eventsTransformed.length > 0 ? (\n
    \n {filterQuery.viewMode === SalesViewMode.FlattenedView ? (\n \n
    \n \n \n \n \n \n \n \n
    \n \n \n \n \n \n }\n enableColumnFilters\n />\n ) : (\n \n \n \n \n \n \n \n }\n disablePagination\n items={salesItems}\n selectedIds={expandedListItems}\n onSelect={onSalesEventExpanded}\n onItemsRendered={onItemsRendered}\n tableActions={\n \n \n \n \n }\n />\n )}\n
    \n ) : (\n \n ))}\n {isColumnModalOpen ? (\n \n sectionType={\n filterQuery.viewMode === SalesViewMode.FlattenedView\n ? SectionType.SalesFlattened\n : SectionType.Sales\n }\n onClose={toggleColumnModal}\n />\n ) : null}\n \n );\n}\n","import { EventAccordionItemProps } from 'src/components/Accordions';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { MainRoute } from 'src/navigations/Routes/MainRoute';\nimport { Listing, Sale } from 'src/WebApiController';\n\nimport * as styles from './EventListing.css';\nimport { InventoryEventListing } from './InventoryEventListing';\nimport { SalesEventListing } from './SalesEventListing';\n\nexport function EventListing({\n onItemsRendered,\n}: {\n onItemsRendered?: (items: EventAccordionItemProps[]) => void;\n}) {\n const { mainRoute } = useAppContext();\n\n return (\n
    \n {mainRoute === MainRoute.Inventory ? (\n \n onItemsRendered?.(items as unknown as EventAccordionItemProps[])\n }\n />\n ) : (\n \n onItemsRendered?.(items as unknown as EventAccordionItemProps[])\n }\n />\n )}\n
    \n );\n}\n","import { useCallback, useRef } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { EventAccordionItemProps } from 'src/components/Accordions';\nimport { AccountDisabledNotification } from 'src/components/common/AccountDisabledNotification';\nimport { EventListing } from 'src/components/Events/EventListing';\nimport { PerformerVenueList } from 'src/components/Events/PerformerVenueList';\nimport { MainFilterBar } from 'src/components/MainFilterBar';\nimport { SaleFilterBar } from 'src/components/Sales/SaleFilterBar';\nimport { SaleSearchBox } from 'src/components/Sales/SaleFilterBar/SaleSearchBox';\nimport { CatalogMultiSelectionContextProvider } from 'src/contexts/CatalogMultiSelectionContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { DialogProvider } from 'src/contexts/DialogContext/DialogContext';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { MultiSelectionContextProvider } from 'src/contexts/MultiSelectionContext';\nimport { ExplorerLayout } from 'src/core/layouts';\nimport { Button, Stack } from 'src/core/ui';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { LayoutContent } from 'src/navigations/LayoutContent';\nimport { createSaleSearchPageUrl } from 'src/utils/advancedSearchUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n ActionOutboxEntityType,\n CatalogEntity,\n Event,\n EventGroupingType,\n Feature,\n Sale,\n SalesViewMode,\n} from 'src/WebApiController';\nimport Swiper from 'swiper';\n\nimport { MainRoute } from '../MainRoute';\n\nexport function SalesEventsExplorer({\n onPerformerVenueRendered,\n onEventsRendered,\n}: {\n onPerformerVenueRendered?: (\n items: CatalogEntity[],\n itemType: EventGroupingType\n ) => void;\n onEventsRendered?: (items: Event[]) => void;\n}) {\n const routeTitle = useContent(ContentId.Sales);\n const onItemsRendered = (items: EventAccordionItemProps[]) => {\n onEventsRendered?.(items.flatMap((i) => i?.event ?? []));\n };\n\n const { filterQuery } = useFilterQueryContext();\n\n const swiperRef = useRef();\n const mobile = useMatchMedia('mobile');\n\n const hasNewSearchFeature = useUserHasFeature(Feature.SearchView_Sale);\n\n const navigate = useNavigate();\n\n const onAdvancePurchaseSearch = useCallback(() => {\n const searchUrl = createSaleSearchPageUrl();\n\n setTimeout(() => {\n navigate(searchUrl, {\n state: {\n returnUrl: `${location.pathname}${location.search}`,\n },\n });\n }, 10);\n }, [navigate]);\n\n return (\n \n \n \n \n \n \n \n )\n }\n >\n \n \n \n }\n >\n \n {mobile && }\n \n \n \n \n \n \n \n );\n}\n","import { ReactNode, useCallback } from 'react';\nimport { ActivePosEntityProvider } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n CatalogDataContextProvider,\n ExpandedEventData,\n} from 'src/contexts/CatalogDataContext';\nimport { CatalogMetricsContextProvider } from 'src/contexts/CatalogMetricsContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { FilterQueryContextProvider } from 'src/contexts/FilterQueryContext';\nimport { SellerUserSettingsProvider } from 'src/contexts/SellerUserSettingsContext';\nimport { SidePanelProvider } from 'src/contexts/SidePanelContext';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport {\n getPresetFromUiDateTimeRange,\n getUiDateTimeRangeFromPreset,\n InhandDateRangePresetNames,\n StandardDateRangePresetNames,\n} from 'src/utils/dateTimeUtils';\nimport { DefaultSaleQuery, EmptySaleQuery } from 'src/utils/eventQueryUtils';\nimport { transformData } from 'src/utils/eventWithDataUtils';\nimport { addSaleMetrics } from 'src/utils/ticketMetricUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n CatalogClient,\n DateTimeRange,\n Feature,\n PosClientConfig,\n SaleClient,\n SaleDetails,\n SaleMetrics,\n SaleQuery,\n UserSetting,\n} from 'src/WebApiController';\n\nimport { SalesEventsExplorer } from './SalesEventsExplorer';\n\nexport const getCatalogData = async (\n client: CatalogClient,\n filterQuery: SaleQuery,\n includeCounts: boolean\n) => {\n return await client.getCatalogForSales(filterQuery, includeCounts);\n};\n\nexport const SALE_USER_SETTINGS = [\n UserSetting.SaleColumnEditability,\n UserSetting.SaleColumnNumberPrecision,\n UserSetting.SaleColumnOrder,\n UserSetting.SaleColumnsEnabled,\n UserSetting.SaleCustomColumns,\n UserSetting.SaleFlattenedColumnEditability,\n UserSetting.SaleFlattenedColumnNumberPrecision,\n UserSetting.SaleFlattenedColumnOrder,\n UserSetting.SaleFlattenedColumnsEnabled,\n UserSetting.QuickFiltersStateSales,\n UserSetting.SaleColumnWidths,\n UserSetting.SalePageViewMode,\n UserSetting.SalesDefaultTab,\n];\n\nexport const getCatalogDataExpanded = async (\n viagogoVirtualIds: string[],\n filterQuery: SaleQuery,\n useReadonlyDB: boolean,\n {\n activeAccountWebClientConfig,\n onError,\n }: {\n activeAccountWebClientConfig: PosClientConfig;\n onError?: (error: ErrorTypes) => void;\n }\n) => {\n const result = await tryInvokeApi(async () => {\n const allSales = await new SaleClient(\n activeAccountWebClientConfig\n ).getSalesForEvents(\n {\n ...filterQuery,\n // Is is to support the legacy event ID urls\n oldPosEventIds: viagogoVirtualIds\n .filter((id) => id.startsWith('old:'))\n .map((id) => id.substring(4)),\n eventOrMappingIds: viagogoVirtualIds.filter(\n (id) => !id.startsWith('old:')\n ),\n },\n true,\n useReadonlyDB\n );\n\n const emptyResults = viagogoVirtualIds.reduce((results, id) => {\n results[id] = {\n sales: null,\n listings: null,\n ticketGroups: null,\n failedToRetrieveData: false,\n };\n return results;\n }, {} as ExpandedEventData);\n\n return Promise.resolve(\n Object.entries(allSales).reduce((results, [id, sales]) => {\n results[id] = {\n sales: sales,\n listings: null,\n ticketGroups: null,\n failedToRetrieveData: false,\n };\n return results;\n }, emptyResults)\n );\n }, onError);\n\n if (result) {\n return Promise.resolve(result);\n }\n\n return Promise.resolve(\n viagogoVirtualIds.reduce((results, id) => {\n results[id] = {\n failedToRetrieveData: true,\n sales: null,\n listings: null,\n ticketGroups: null,\n };\n return results;\n }, {} as ExpandedEventData)\n );\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const salesQueryValueTransformToUrl = (key: string, value: any) => {\n if (!value) {\n return value;\n }\n\n const salesKey = key as keyof SaleQuery;\n if (salesKey === 'saleDates') {\n const preset = getPresetFromUiDateTimeRange(value as DateTimeRange);\n if (preset && StandardDateRangePresetNames.includes(preset.name)) {\n return preset.name;\n }\n }\n\n if (salesKey === 'inHandDates') {\n const preset = getPresetFromUiDateTimeRange(value as DateTimeRange);\n if (preset && InhandDateRangePresetNames.includes(preset.name)) {\n return preset.name;\n }\n }\n\n return value;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const salesQueryValueTransformFromUrl = (key: string, value: any) => {\n if (!value) {\n return value;\n }\n\n const salesKey = key as keyof SaleQuery;\n if (salesKey === 'saleDates') {\n const preset = getUiDateTimeRangeFromPreset(\n value,\n StandardDateRangePresetNames\n );\n if (preset) {\n return preset;\n }\n } else if (salesKey === 'inHandDates') {\n const preset = getUiDateTimeRangeFromPreset(\n value,\n InhandDateRangePresetNames\n );\n if (preset) {\n return preset;\n }\n }\n\n return value;\n};\n\nexport function SaleContextProvider({\n saveQueryInUrl,\n children,\n}: {\n saveQueryInUrl?: boolean;\n children?: ReactNode;\n}) {\n const { trackError } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n\n const getCatalogDataExpandedCallback = useCallback(\n (ids: string[], filterQuery: SaleQuery) =>\n getCatalogDataExpanded(ids, filterQuery, false, {\n activeAccountWebClientConfig,\n onError: (error) => {\n trackError('SaleClient.getSalesForEvents', error, {\n ...filterQuery,\n eventIds: ids,\n });\n },\n }),\n [activeAccountWebClientConfig, trackError]\n );\n\n return (\n \n \n initialQuery={DefaultSaleQuery}\n emptyQuery={EmptySaleQuery}\n saveQueryInUrl={saveQueryInUrl}\n viewModeSettingId={UserSetting.SalePageViewMode}\n queryValueTransformToUrl={salesQueryValueTransformToUrl}\n queryValueTransformFromUrl={salesQueryValueTransformFromUrl}\n >\n \n entityType={ActionOutboxEntityType.Sale}\n queryKey=\"getCatalogForSales\"\n getCatalogData={(c, f) => getCatalogData(c, f, true)}\n getCatalogDataExpanded={getCatalogDataExpandedCallback}\n transformEventData={transformData}\n >\n {children}\n \n \n \n );\n}\n\nexport function Sales() {\n return (\n \n \n \n );\n}\n\nexport const getCatalogMetrics = (\n client: CatalogClient,\n filterQuery: SaleQuery,\n rowVersion?: number | null,\n hasMetricsV2Feature?: boolean\n) => {\n return hasMetricsV2Feature\n ? client.getCatalogMetricsForSales(filterQuery, rowVersion)\n : client.getCatalogSaleMetrics(filterQuery);\n};\n\nconst SalesRouteBody = () => {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const getActivePosEntity = useCallback(\n async (saleId: number) => {\n const saleDetail = await new SaleClient(\n activeAccountWebClientConfig\n ).getSaleBySaleId(saleId);\n\n if (saleDetail) {\n return {\n posEntityId: saleDetail.id,\n posEntity: saleDetail,\n posEntityDisplayId: saleDetail.idOnMkp,\n };\n }\n\n return {};\n },\n [activeAccountWebClientConfig]\n );\n\n const hasMetricsV2Feature = useUserHasFeature(Feature.CatalogMetricsV2);\n\n return (\n \n queryKey=\"getCatalogSaleMetrics\"\n entityType={ActionOutboxEntityType.Sale}\n getCatalogMetrics={(c, f, r) =>\n getCatalogMetrics(c, f, r, hasMetricsV2Feature)\n }\n addCatalogMetrics={addSaleMetrics}\n >\n \n entityType={ActionOutboxEntityType.Sale}\n getActivePosEntity={getActivePosEntity}\n >\n \n \n \n \n \n );\n};\n","import { createContext, useContext } from 'react';\nimport {\n EventAccordionItemBodyComponentType,\n EventAccordionItemProps,\n MinRowsForUsingVirtuoso,\n SaleEventsEmpty,\n SalesEventsAccordion,\n} from 'src/components/Accordions';\nimport { SeatingInfo } from 'src/components/common/SeatingInfo';\nimport {\n EventItemHeader,\n EventItemHeaderType,\n} from 'src/components/Events/EventItemHeader';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { Button, Stack } from 'src/core/ui';\nimport { useGetEventFullInfo } from 'src/hooks/useGetEventFullInfo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SomethingWentWrong } from 'src/views';\nimport { EventWithData } from 'src/WebApiController';\nimport { Sale } from 'src/WebApiController';\n\nimport * as styles from './SaleSearchAccordionList.css';\n\nconst SaleSearchAccordionListContext = createContext<{\n onSelectSale?: (sale: Sale) => void;\n}>({});\n\n/**\n * Component for displaying sales in ClassifyEmail modal when classifying sales.\n * @param props\n * @returns\n */\nexport function SaleSearchAccordionList({\n onSelectSale,\n}: {\n onSelectSale?: (sale: Sale) => void;\n}) {\n const {\n isLoading,\n errorInfo,\n eventsTransformed,\n eventsExpansion: { expandedListItems, toggleListItemExpansion },\n } = useCatalogDataContext();\n if (isLoading) {\n return ;\n }\n if (errorInfo) {\n return (\n }\n />\n );\n }\n const items = eventsTransformed?.map(translateEventToSaleAccordionItem) ?? [];\n return (\n \n {items.length > 0 ? (\n toggleListItemExpansion([id])}\n disablePagination\n />\n ) : (\n \n )}\n \n );\n}\n\nfunction translateEventToSaleAccordionItem(\n props: EventWithData,\n index: number\n): EventAccordionItemProps {\n return {\n index,\n itemId: props.event.viagVirtualId,\n HeaderComponent: SaleAccordionItemHeader,\n BodyComponent: SaleAccordionItemBody,\n usingVirtuoso: (props.counts.salesCnt ?? 0) > MinRowsForUsingVirtuoso,\n ...props,\n entities: props.entities.sales ?? [],\n entityCount: props.counts.salesCnt ?? 0,\n };\n}\n\nfunction SaleAccordionItemHeader({ event, ...rest }: EventItemHeaderType) {\n const { performer, venue } = useGetEventFullInfo(event);\n\n return (\n \n );\n}\n\nfunction SaleAccordionItemBody({\n entities: sales,\n}: EventAccordionItemBodyComponentType) {\n const { onSelectSale } = useContext(SaleSearchAccordionListContext);\n return (\n
    \n {sales?.map((sale) => (\n \n \n {\n onSelectSale?.(sale);\n }}\n >\n \n \n \n ))}\n
    \n );\n}\n","import { debounce } from 'lodash-es';\nimport { useCallback } from 'react';\nimport { useContent, useFormattedContent } from 'src/contexts/ContentContext';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { PosSearchBox } from 'src/core/POS/PosSearchBox';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { SaleQuery } from 'src/WebApiController';\n\n/**\n * Search box for filtering sales on ClassifyEmail modal when classifying sales.\n * @returns\n */\nexport function SaleSearchBox() {\n const eventsText = useContent(ContentId.Events);\n const searchPlaceholderText = useFormattedContent(\n FormatContentId.SearchItem,\n eventsText\n ) as string;\n\n const { filterQuery: saleQuery, setFilterQuery } =\n useFilterQueryContext();\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const debouncedOnSearchChange = useCallback(\n debounce((text: string) => {\n if (text !== saleQuery.searchText) {\n setFilterQuery({\n ...saleQuery,\n searchText: text || null,\n });\n }\n }, 200),\n [saleQuery, setFilterQuery]\n );\n\n return (\n \n );\n}\n","import { useQuery } from '@tanstack/react-query';\nimport { pickBy } from 'lodash-es';\nimport { useContext, useEffect, useState } from 'react';\nimport { Controller, useForm } from 'react-hook-form';\nimport { useDebounce } from 'react-use';\nimport {\n ConversationType,\n convertEmailClassificationTypeToConversationType,\n} from 'src/components/Messages/ConversationSidePanel/ConversationListItem/ConversationListItem';\nimport { EmailBody } from 'src/components/Messages/EmailBody';\nimport { PurchaseVendorSelector } from 'src/components/Selectors/PurchaseVendorSelector';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n Content,\n FormatContent,\n useContent,\n} from 'src/contexts/ContentContext';\nimport { EmailPurchaseOrderContext } from 'src/contexts/EmailPurchaseOrderContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { Button, ScrollArea } from 'src/core/ui';\nimport { SaleContextProvider } from 'src/navigations/Routes/Sales';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { AUTO_PO_INBOUND_EMAIL_CLASSIFICATION_TYPE_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { getPurchaseOrderDetailsModalConfigWithDeepLink } from 'src/utils/purchaseUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n AutoPoClient,\n AutoPoInboundEmailClassificationType,\n PurchaseClient,\n PurchasingIdInUseResultType,\n} from 'src/WebApiController';\n\nimport * as styles from './ClassifyEmail.css';\nimport { SaleSearchAccordionList } from './SaleSearchAccordionList';\nimport { SaleSearchBox } from './SaleSearchBox';\n\nfunction getClassificationTypeToCid(\n conversationType: ConversationType\n): Record {\n return pickBy(AUTO_PO_INBOUND_EMAIL_CLASSIFICATION_TYPE_TO_CID, (_, key) => {\n return (\n convertEmailClassificationTypeToConversationType(\n key as AutoPoInboundEmailClassificationType\n ) === conversationType\n );\n });\n}\n\ntype ClassifyEmailFieldValues = {\n classificationType?: AutoPoInboundEmailClassificationType;\n orderId?: string;\n purchaseOrderVendorId?: number;\n saleId?: number;\n};\n\nexport type ClassifyEmailProps = {\n conversationType: ConversationType;\n inboundEmailId: number;\n onEmailClassified?: (inboundEmailId: number) => void;\n};\n\nexport function ClassifyEmail({\n conversationType,\n inboundEmailId,\n onEmailClassified,\n}: ClassifyEmailProps) {\n // XXX hack to fix breaking of this message since it uses non-breaking space for some reason\n const orderIdInUseMessage = useContent(ContentId.OrderIdInUse).replaceAll(\n '\\u00a0',\n ' '\n );\n const orderIdInUseSameVendorMessage = useContent(\n ContentId.OrderIdInUseSameVendor\n );\n const orderIdDoesNotExistMessage = useContent(ContentId.OrderIdDoesNotExist);\n const orderIdDoesNotExistForVendorMessage = useContent(\n ContentId.OrderIdDoesNotExistForVendor\n );\n\n const classificationTypeToCid = getClassificationTypeToCid(conversationType);\n const defaultClassificationType = Object.keys(\n classificationTypeToCid\n )[0] as AutoPoInboundEmailClassificationType;\n\n const {\n control,\n formState: { errors },\n register,\n handleSubmit,\n watch,\n setValue,\n setError,\n clearErrors,\n } = useForm({\n defaultValues: {\n classificationType: defaultClassificationType,\n orderId: undefined, // TODO use orderId from partialpurchaseorder\n },\n });\n\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError, showErrorDialog } = useErrorBoundaryContext();\n\n const { setModal, closeModal } = useContext(ModalContext);\n const {\n setOrderId,\n setClassificationType,\n reset: resetEmailPurchaseOrderContext,\n } = useContext(EmailPurchaseOrderContext);\n\n const watchedClassificationType = watch('classificationType');\n const [debouncedOrderId, setDebouncedOrderId] = useState();\n useDebounce(\n () => {\n if (\n watchedClassificationType &&\n convertEmailClassificationTypeToConversationType(\n watchedClassificationType\n ) === ConversationType.Purchase\n ) {\n setDebouncedOrderId(watch('orderId'));\n }\n },\n 200, // lower delay since the api call is relatively cheap\n [watchedClassificationType, watch('orderId')]\n );\n const watchedPurchaseOrderVendorId = watch('purchaseOrderVendorId');\n const orderIdInUseQuery = useQuery({\n queryKey: [\n 'PurchaseClient.getIsPurchasingIdsInUse',\n activeAccountWebClientConfig.activeAccountId,\n conversationType,\n watchedPurchaseOrderVendorId,\n debouncedOrderId,\n ],\n queryFn: async () => {\n if (activeAccountWebClientConfig.activeAccountId == null) {\n return null;\n }\n if (conversationType !== ConversationType.Purchase || !debouncedOrderId) {\n return PurchasingIdInUseResultType.NoneMatching;\n }\n\n const orderId = debouncedOrderId.toString().trim();\n return await new PurchaseClient(\n activeAccountWebClientConfig\n ).getIsPurchasingIdsInUse(orderId, watchedPurchaseOrderVendorId);\n },\n\n enabled: activeAccountWebClientConfig.activeAccountId != null,\n refetchOnWindowFocus: false,\n meta: {\n onError(err: ErrorTypes) {\n trackError('PurchaseClient.getIsPurchasingIdsInUse', err, {\n orderId: debouncedOrderId,\n purchaseOrderVendorId: watchedPurchaseOrderVendorId,\n });\n },\n },\n });\n const orderIdUsedByPurchaseOrderIdsResult = useQuery({\n queryKey: [\n 'PurchaseClient.getPurchaseOrderIdsUsingOrderId',\n activeAccountWebClientConfig.activeAccountId,\n conversationType,\n debouncedOrderId,\n ],\n queryFn: async () => {\n if (activeAccountWebClientConfig.activeAccountId == null) {\n return null;\n }\n if (conversationType !== ConversationType.Purchase || !debouncedOrderId) {\n return [];\n }\n const orderId = debouncedOrderId.toString().trim();\n const purchaseOrderIds = await new PurchaseClient(\n activeAccountWebClientConfig\n ).getPurchaseOrderIdsUsingOrderId(orderId);\n return purchaseOrderIds;\n },\n\n enabled: activeAccountWebClientConfig.activeAccountId != null,\n refetchOnWindowFocus: false,\n meta: {\n onError(err: ErrorTypes) {\n trackError('PurchaseClient.getPurchaseOrderIdsUsingOrderId', err, {\n orderId: debouncedOrderId,\n });\n },\n },\n });\n\n useEffect(() => {\n const purchaseOrderIds = orderIdUsedByPurchaseOrderIdsResult.data;\n if (\n conversationType !== ConversationType.Purchase ||\n !purchaseOrderIds ||\n !debouncedOrderId\n ) {\n return;\n }\n\n if (\n watchedClassificationType ===\n AutoPoInboundEmailClassificationType.NewPurchaseOrder\n ) {\n if (orderIdInUseQuery.data === PurchasingIdInUseResultType.SameOrderId) {\n setError('orderId', {\n type: 'existingOrderId',\n message: orderIdInUseMessage,\n });\n } else if (\n orderIdInUseQuery.data ===\n PurchasingIdInUseResultType.SameOrderIdAndVendorId\n ) {\n setError('orderId', {\n type: 'existingOrderId',\n message: orderIdInUseSameVendorMessage,\n });\n }\n } else {\n if (orderIdInUseQuery.data === PurchasingIdInUseResultType.NoneMatching) {\n setError('orderId', {\n type: 'existingOrderId',\n message: orderIdDoesNotExistMessage,\n });\n } else if (\n orderIdInUseQuery.data === PurchasingIdInUseResultType.SameOrderId\n ) {\n setError('orderId', {\n type: 'existingOrderId',\n message: orderIdDoesNotExistForVendorMessage,\n });\n }\n }\n }, [\n conversationType,\n watchedClassificationType,\n debouncedOrderId,\n orderIdInUseQuery.data,\n orderIdUsedByPurchaseOrderIdsResult.data,\n setError,\n orderIdInUseMessage,\n orderIdInUseSameVendorMessage,\n orderIdDoesNotExistMessage,\n orderIdDoesNotExistForVendorMessage,\n ]);\n\n // if marked as new order, but the order id and vendor already exist,\n // suggest that the user classifies as an existing order\n const classifyNewOrderAsExistingOrder =\n conversationType === ConversationType.Purchase &&\n watchedClassificationType &&\n orderIdInUseQuery.isSuccess &&\n watchedClassificationType ===\n AutoPoInboundEmailClassificationType.NewPurchaseOrder &&\n orderIdInUseQuery.data ===\n PurchasingIdInUseResultType.SameOrderIdAndVendorId;\n // if marked as an existing order, but the order id and vendor combo does not exist,\n // send the user to the create purchase order modal first before classifying\n const createNewOrderForExistingOrder =\n conversationType === ConversationType.Purchase &&\n watchedClassificationType &&\n orderIdInUseQuery.isSuccess &&\n watchedClassificationType !==\n AutoPoInboundEmailClassificationType.NewPurchaseOrder &&\n orderIdInUseQuery.data !==\n PurchasingIdInUseResultType.SameOrderIdAndVendorId;\n\n const onSubmit = handleSubmit(async (data) => {\n if (classifyNewOrderAsExistingOrder) {\n clearErrors(['orderId']);\n setValue(\n 'classificationType',\n AutoPoInboundEmailClassificationType.ExistingPurchaseOrder\n );\n } else if (\n createNewOrderForExistingOrder ||\n data.classificationType ===\n AutoPoInboundEmailClassificationType.NewPurchaseOrder\n ) {\n setOrderId(data.orderId);\n setClassificationType(data.classificationType);\n setModal({\n ...getPurchaseOrderDetailsModalConfigWithDeepLink(),\n onExit: () => {\n resetEmailPurchaseOrderContext();\n },\n });\n } else {\n const purchaseOrderId =\n orderIdUsedByPurchaseOrderIdsResult.data?.[0] ?? null;\n await tryInvokeApi(\n async () => {\n await new AutoPoClient(\n activeAccountWebClientConfig\n ).classifyInboundEmail(\n inboundEmailId,\n data.classificationType,\n purchaseOrderId,\n data.saleId\n );\n onEmailClassified?.(inboundEmailId);\n },\n (error) => {\n showErrorDialog('AutoPoClient.classifyInboundEmail', error, {\n trackErrorData: {\n inboundEmailId,\n },\n });\n }\n );\n\n resetEmailPurchaseOrderContext();\n closeModal();\n }\n });\n\n return (\n
    \n \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n }>\n (\n {\n if (value) {\n const conversationType =\n convertEmailClassificationTypeToConversationType(value);\n if (conversationType !== ConversationType.Purchase) {\n setValue('orderId', undefined);\n }\n if (\n conversationType !== ConversationType.Sale &&\n conversationType !== ConversationType.Transfer\n ) {\n setValue('saleId', undefined);\n }\n }\n clearErrors('orderId');\n onChange(value);\n }}\n {...props}\n />\n )}\n />\n \n {conversationType === ConversationType.Purchase ? (\n <>\n }\n errors={errors.purchaseOrderVendorId?.message}\n >\n (\n {\n clearErrors('orderId');\n onChange(value ? parseInt(value) : undefined);\n }}\n {...props}\n />\n )}\n />\n \n }\n {...(errors.orderId?.message === orderIdInUseMessage\n ? { warnings: errors.orderId?.message }\n : { errors: errors.orderId?.message })}\n >\n \n \n \n ) : conversationType === ConversationType.Sale ||\n conversationType === ConversationType.Transfer ? (\n <>\n }\n warnings={errors.saleId?.message}\n >\n \n \n \n ) : null}\n
    \n \n {classifyNewOrderAsExistingOrder ? (\n }\n />\n ) : createNewOrderForExistingOrder ? (\n \n ) : (\n \n )}\n \n
    \n
    \n {(conversationType === ConversationType.Sale ||\n conversationType === ConversationType.Transfer) && (\n \n
    \n \n
    \n
    \n {\n setValue('saleId', sale.id);\n }}\n />\n
    \n
    \n )}\n
    \n
    \n );\n}\n","import { Content } from 'src/contexts/ContentContext';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { EventEntityHeader } from '../common/EventEntityHeader';\nimport { ModalProps } from '../Modal';\nimport { ClassifyEmail, ClassifyEmailProps } from './ClassifyEmail';\n\nexport * from './ClassifyEmail';\n\nexport const getClassifyEmailModalConfig = (\n props: ClassifyEmailProps\n): ModalProps => ({\n Header: (\n } />\n ),\n Body: ,\n clickOutsideToClose: true,\n size: 'fullscreen',\n});\n","import {\n PropsWithChildren,\n ReactNode,\n useCallback,\n useContext,\n useEffect,\n useState,\n} from 'react';\nimport { useHotkeys } from 'react-hotkeys-hook';\nimport { Link } from 'react-router-dom';\nimport { SwiperButton } from 'src/components/Buttons/SwiperButton';\nimport { MerchantColorBadge } from 'src/components/common/MerchantColorBadge';\nimport { ConversationType } from 'src/components/Messages/ConversationSidePanel/ConversationListItem/ConversationListItem';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { EmailPurchaseOrderContext } from 'src/contexts/EmailPurchaseOrderContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { ConfirmDialog } from 'src/core/interim/dialogs/ConfirmDialog';\nimport { HotkeyDisplay } from 'src/core/POS/HotkeyDisplay';\nimport { vars } from 'src/core/themes';\nimport { Button, DropdownMenu } from 'src/core/ui';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { getClassifyEmailModalConfig } from 'src/modals/ClassifyEmail';\nimport { IconsFill, MoreIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getListingDetailsRelativeUrl } from 'src/utils/inventoryUtils';\nimport { getPurchaseOrderRelativeUrl } from 'src/utils/purchaseUtils';\nimport { getSaleDetailsRelativeUrl } from 'src/utils/saleUtils';\nimport { AutoPoClient, AutoPoInboundEmail } from 'src/WebApiController';\nimport { UAParser } from 'ua-parser-js';\n\nimport * as styles from '../ConversationMainPanel.css';\n\nconst HOTKEY_LETTER_MAP = {\n purchase: 'p',\n sale: 's',\n transfer: 'x',\n private: 'r',\n junk: 'j',\n};\n\nexport type ConversationHeaderDisplayProps = PropsWithChildren<{\n inboundEmail?: AutoPoInboundEmail;\n conversationTitle?: string | null;\n entityId?: ReactNode;\n fromEmailAddress?: string;\n toEmailAddress?: string;\n merchantName?: string | null;\n vendorId?: number | null;\n saleId?: number;\n inventoryId?: string;\n purchaseOrderId?: number;\n showClassifyOptions?: boolean;\n onEmailClassified?: (inboundEmailId: number) => void;\n}>;\n\nexport const ConversationHeaderDisplay = ({\n inboundEmail,\n conversationTitle,\n entityId,\n fromEmailAddress,\n toEmailAddress,\n merchantName,\n vendorId,\n saleId,\n inventoryId,\n purchaseOrderId,\n children,\n showClassifyOptions,\n onEmailClassified,\n}: ConversationHeaderDisplayProps) => {\n const isLargeDesktop = useMatchMedia('largeDesktop');\n\n const { activeAccountWebClientConfig } = useAppContext();\n const { setModal } = useContext(ModalContext);\n const { setPartialPurchaseOrderKey, setInboundEmailId } = useContext(\n EmailPurchaseOrderContext\n );\n\n const [isDropdownOpen, setIsDropdownOpen] = useState(false);\n const [canReprocessEmail, setCanReprocessEmail] = useState(false);\n\n const [showReprocessConfirmDialog, setShowReprocessConfirmDialog] =\n useState(false);\n\n useEffect(() => {\n new AutoPoClient(activeAccountWebClientConfig)\n .canReprocessEmail(\n inboundEmail?.inboundEmailId!,\n inboundEmail?.purchaseOrderId\n )\n .then((canReprocess) => {\n setCanReprocessEmail(canReprocess);\n });\n }, [activeAccountWebClientConfig, inboundEmail]);\n\n const onClassifyPurchase = useCallback(async () => {\n setPartialPurchaseOrderKey({\n partialPurchaseOrderId: inboundEmail?.partialPurchaseOrderId,\n toEmailAddress: inboundEmail?.toEmailAddress ?? undefined,\n purchaseOrderVendorId: inboundEmail?.purchaseOrderVendorId,\n });\n setInboundEmailId(inboundEmail?.inboundEmailId);\n setModal(\n getClassifyEmailModalConfig({\n inboundEmailId: inboundEmail?.inboundEmailId!,\n conversationType: ConversationType.Purchase,\n onEmailClassified,\n })\n );\n }, [\n inboundEmail,\n onEmailClassified,\n setInboundEmailId,\n setModal,\n setPartialPurchaseOrderKey,\n ]);\n\n const onClassifySale = useCallback(async () => {\n setModal(\n getClassifyEmailModalConfig({\n inboundEmailId: inboundEmail?.inboundEmailId!,\n conversationType: ConversationType.Sale,\n onEmailClassified,\n })\n );\n }, [inboundEmail, onEmailClassified, setModal]);\n\n const onClassifyTransfer = useCallback(async () => {\n setModal(\n getClassifyEmailModalConfig({\n inboundEmailId: inboundEmail?.inboundEmailId!,\n conversationType: ConversationType.Transfer,\n onEmailClassified,\n })\n );\n }, [inboundEmail, onEmailClassified, setModal]);\n\n const onClassifyPrivate = useCallback(async () => {\n setModal(\n getClassifyEmailModalConfig({\n inboundEmailId: inboundEmail?.inboundEmailId!,\n conversationType: ConversationType.Private,\n onEmailClassified,\n })\n );\n }, [inboundEmail, onEmailClassified, setModal]);\n\n const onClassifyJunk = useCallback(async () => {\n setModal(\n getClassifyEmailModalConfig({\n inboundEmailId: inboundEmail?.inboundEmailId!,\n conversationType: ConversationType.Junk,\n onEmailClassified,\n })\n );\n }, [inboundEmail, onEmailClassified, setModal]);\n\n const onReprocessEmail = () => {\n setShowReprocessConfirmDialog(true);\n };\n const onConfirmReprocessEmail = async () => {\n await new AutoPoClient(activeAccountWebClientConfig).unclassifyInboundEmail(\n inboundEmail?.inboundEmailId!,\n inboundEmail?.purchaseOrderId\n );\n setShowReprocessConfirmDialog(false);\n };\n\n const [userAgent] = useState(() => new UAParser(navigator.userAgent));\n const hotkeyPrefixText =\n userAgent.getOS().name === 'Mac OS' || userAgent.getOS().name === 'iOS'\n ? '⌘'\n : 'ctrl';\n\n useHotkeys(\n `ctrl+${HOTKEY_LETTER_MAP.purchase}, meta+${HOTKEY_LETTER_MAP.purchase}`,\n () => {\n setIsDropdownOpen(false);\n onClassifyPurchase();\n },\n { preventDefault: true },\n [onClassifyPurchase]\n );\n useHotkeys(\n `ctrl+${HOTKEY_LETTER_MAP.sale}, meta+${HOTKEY_LETTER_MAP.sale}`,\n () => {\n setIsDropdownOpen(false);\n onClassifySale();\n },\n { preventDefault: true },\n [onClassifySale]\n );\n useHotkeys(\n `ctrl+${HOTKEY_LETTER_MAP.transfer}, meta+${HOTKEY_LETTER_MAP.transfer}`,\n () => {\n setIsDropdownOpen(false);\n onClassifyTransfer();\n },\n { preventDefault: true },\n [onClassifyTransfer]\n );\n useHotkeys(\n `ctrl+${HOTKEY_LETTER_MAP.private}, meta+${HOTKEY_LETTER_MAP.private}`,\n () => {\n setIsDropdownOpen(false);\n onClassifyPrivate();\n },\n { preventDefault: true },\n [onClassifyPrivate]\n );\n useHotkeys(\n `ctrl+${HOTKEY_LETTER_MAP.junk}, meta+${HOTKEY_LETTER_MAP.junk}`,\n () => {\n setIsDropdownOpen(false);\n onClassifyJunk();\n },\n { preventDefault: true },\n [onClassifyJunk]\n );\n\n const hasEntityId = !!saleId || !!inventoryId || !!purchaseOrderId;\n\n const menuContent = [];\n\n if (showClassifyOptions) {\n menuContent.push(\n \n \n \n {hotkeyPrefixText} + {HOTKEY_LETTER_MAP.purchase}\n \n \n );\n menuContent.push(\n \n \n \n {hotkeyPrefixText} + {HOTKEY_LETTER_MAP.sale}\n \n \n );\n menuContent.push(\n \n \n \n {hotkeyPrefixText} + {HOTKEY_LETTER_MAP.transfer}\n \n \n );\n menuContent.push(\n \n \n \n {hotkeyPrefixText} + {HOTKEY_LETTER_MAP.private}\n \n \n );\n menuContent.push(\n \n \n \n {hotkeyPrefixText} + {HOTKEY_LETTER_MAP.junk}\n \n \n );\n }\n\n if (canReprocessEmail) {\n menuContent.push(\n \n \n \n );\n }\n\n return (\n
    \n {!isLargeDesktop && (\n
    \n \n
    \n )}\n\n
    \n
    {conversationTitle}
    \n
    \n {entityId && (\n
    \n {entityId}\n
    \n )}\n
    \n {(merchantName || vendorId) && (\n \n )}\n
    \n {menuContent.length > 0 && (\n
    \n \n \n \n \n \n {menuContent}\n \n \n
    \n )}\n
    \n
    \n {children}\n {fromEmailAddress && (\n
    \n \n : {fromEmailAddress}\n \n
    \n )}\n {toEmailAddress && (\n
    \n \n : {toEmailAddress}\n \n
    \n )}\n {hasEntityId && (\n
    \n {saleId && (\n \n \n \n )}\n {inventoryId && (\n \n \n \n )}\n {purchaseOrderId && (\n \n \n \n )}\n
    \n )}\n }\n bodyText={}\n onOkay={onConfirmReprocessEmail}\n onCancel={() => setShowReprocessConfirmDialog(false)}\n />\n
    \n );\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { Fragment, useCallback, useContext, useEffect, useState } from 'react';\nimport { useParams } from 'react-router-dom';\nimport { SeatingInfo } from 'src/components/common/SeatingInfo';\nimport { ConnectedEventInfo } from 'src/components/Events/ConnectedEventInfo';\nimport { EmailThread } from 'src/components/Messages/EmailThread';\nimport { SupportCaseBody } from 'src/components/Messages/SupportCaseBody';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport {\n Content,\n useContent,\n useContentContext,\n} from 'src/contexts/ContentContext';\nimport { ConversationDataContext } from 'src/contexts/ConversationDataContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { SellerSupportCaseDataContext } from 'src/contexts/SellerSupportCaseDataContext';\nimport { HorizontalTextList } from 'src/core/POS/HorizontalTextList';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { useGetSaleWithCatalogData } from 'src/hooks/api/useGetSaleWithCatalogData';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n getEventPerformerVenue,\n lookupEventInCatalog,\n} from 'src/utils/eventWithDataUtils';\nimport { getListingNoteIcon } from 'src/utils/listingNotesUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n AutoPoClient,\n AutoPoInboundEmail,\n Event,\n Feature,\n ListingNote,\n Marketplace,\n Performer,\n Seating,\n SellerSupportCase,\n SellerSupportCaseClient,\n Venue,\n} from 'src/WebApiController';\n\nimport {\n ConversationType,\n convertEmailClassificationTypeToConversationType,\n} from '../ConversationSidePanel/ConversationListItem/ConversationListItem';\nimport { ConversationHeaderDisplay } from './ConversationHeaderDisplay';\nimport * as styles from './ConversationMainPanel.css';\n\nexport const ConversationMainPanel = ({\n onEmailClassified,\n}: {\n onEmailClassified?: (inboundEmailId: number) => void;\n}) => {\n const { inboundEmailId, sellerSupportCaseId } = useParams();\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n\n const shouldQuery =\n activeAccountWebClientConfig.activeAccountId != null &&\n sellerSupportCaseId != null;\n\n const sellerSupportCaseQuery = useQuery({\n queryKey: [\n 'SellerSupportCaseClient.getSellerSupportCases',\n activeAccountWebClientConfig.activeAccountId,\n sellerSupportCaseId,\n ],\n queryFn: async () => {\n if (!shouldQuery) {\n return null;\n }\n return tryInvokeApi(\n async () => {\n const sellerSupportCases = await new SellerSupportCaseClient(\n activeAccountWebClientConfig\n ).getSellerSupportCases(\n {\n isMostRecent: null,\n sellerSupportCaseIds: [Number(sellerSupportCaseId)],\n },\n null,\n null\n );\n return sellerSupportCases[0] ?? null;\n },\n (error) => {\n trackError('SellerSupportCaseClient.getSellerSupportCases', error, {\n sellerSupportCaseId,\n });\n }\n );\n },\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n });\n\n const shouldQuery2 =\n activeAccountWebClientConfig.activeAccountId != null &&\n inboundEmailId != null;\n const inboundEmailQuery = useQuery({\n queryKey: [\n 'AutoPoClient.getInboundEmails',\n activeAccountWebClientConfig.activeAccountId,\n inboundEmailId,\n ],\n queryFn: async () => {\n if (!shouldQuery2) {\n return null;\n }\n return tryInvokeApi(\n async () => {\n const inboundEmails = await new AutoPoClient(\n activeAccountWebClientConfig\n ).getInboundEmails(\n {\n inboundEmailIds: [Number(inboundEmailId)],\n },\n null,\n null\n );\n return inboundEmails[0] ?? null;\n },\n (error) => {\n trackError('AutoPoClient.getInboundEmails', error, {\n inboundEmailId,\n });\n }\n );\n },\n\n enabled: shouldQuery2,\n refetchOnWindowFocus: false,\n });\n\n if (sellerSupportCaseQuery.isLoading || inboundEmailQuery.isLoading) {\n return ;\n }\n return (\n
    \n {sellerSupportCaseQuery.data && (\n \n )}\n {inboundEmailQuery.data && (\n \n )}\n \n
    \n );\n};\n\nconst EmailHeaderDisplay = ({\n inboundEmail,\n onEmailClassified,\n}: {\n inboundEmail: AutoPoInboundEmail;\n onEmailClassified?: (inboundEmailId: number) => void;\n}) => {\n const conversationType = convertEmailClassificationTypeToConversationType(\n inboundEmail.classificationType\n );\n\n const { getPurchaseOrderDetails } = useContext(ConversationDataContext);\n const [orderId, setOrderId] = useState();\n const [merchantName, setMerchantName] = useState();\n\n type EventInfo = {\n event: Event;\n venue: Venue | null;\n performer: Performer | null;\n seatings: Seating[];\n listingNotes?: ListingNote[] | null;\n };\n const [eventInfos, setEventInfos] = useState([]);\n const { data } = useCatalogDataContext();\n\n const fetchDisplayContent = useCallback(async () => {\n let orderId: string | undefined;\n let merchantName: string | undefined;\n let eventInfos: EventInfo[] = [];\n\n if (conversationType === ConversationType.Purchase) {\n if (inboundEmail.purchaseOrderId) {\n const purchaseOrder = await getPurchaseOrderDetails(\n inboundEmail.purchaseOrderId\n );\n if (purchaseOrder) {\n orderId = purchaseOrder.vendOrdId ?? undefined;\n merchantName = purchaseOrder.vendor?.name;\n\n const eventInfoMap: Record = {};\n for (const tg of purchaseOrder.ticketGroups) {\n const { event, venue, performer } = getEventPerformerVenue(\n tg.viagVirtualId,\n data\n );\n if (event?.event) {\n if (!(event.event.viagVirtualId in eventInfoMap)) {\n eventInfoMap[event.event.viagVirtualId] = {\n event: event.event,\n venue: venue ?? null,\n performer: performer ?? null,\n seatings: [],\n listingNotes: tg.seatTraits,\n };\n }\n eventInfoMap[event.event.viagVirtualId].seatings.push(tg.seating);\n }\n }\n eventInfos = Object.values(eventInfoMap).toSorted((a, b) => {\n if (a.event.dates.start && b.event.dates.start) {\n return (\n new Date(a.event.dates.start).getTime() -\n new Date(b.event.dates.start).getTime()\n );\n }\n return a.event.name.localeCompare(b.event.name);\n });\n }\n }\n }\n\n setOrderId(orderId);\n setMerchantName(merchantName);\n setEventInfos(eventInfos);\n }, [\n conversationType,\n inboundEmail.purchaseOrderId,\n getPurchaseOrderDetails,\n data,\n ]);\n\n useEffect(() => {\n fetchDisplayContent();\n }, [inboundEmail, fetchDisplayContent]);\n\n const messageSaleDataQuery = useGetSaleWithCatalogData(inboundEmail.saleId);\n const { sale } = messageSaleDataQuery.data ?? {};\n\n useEffect(() => {\n const { sale, catalog: saleCatalog } = messageSaleDataQuery.data ?? {};\n if (sale && saleCatalog) {\n if (sale.mkp) {\n setMerchantName(sale.mkp);\n }\n const event = lookupEventInCatalog(\n saleCatalog,\n sale.viagVirtualId,\n sale.posEvId\n )?.event;\n if (event) {\n setEventInfos([\n {\n event,\n venue: saleCatalog.venues[event.venueId],\n performer: event.perfId\n ? saleCatalog.performers[event.perfId]\n : null,\n seatings: [sale.seating],\n },\n ]);\n }\n }\n }, [messageSaleDataQuery.data]);\n\n const contentContext = useContentContext();\n const hasListingNotesAdditionalInfoFeature = useUserHasFeature(\n Feature.ListingNotesAdditionalInfo\n );\n\n return (\n \n : {orderId}\n \n ) : sale ? (\n <>\n : {sale.idOnMkp}\n \n ) : undefined\n }\n merchantName={merchantName}\n vendorId={inboundEmail.purchaseOrderVendorId}\n fromEmailAddress={inboundEmail.fromEmailAddress ?? undefined}\n toEmailAddress={inboundEmail.toEmailAddress ?? undefined}\n showClassifyOptions={conversationType === ConversationType.Uncategorized}\n onEmailClassified={onEmailClassified}\n >\n {eventInfos.map(({ event, venue, performer, seatings, listingNotes }) => {\n return (\n \n \n {seatings.map((seating, i) => (\n \n ))}\n {listingNotes?.length ? (\n n.listingNoteText)}\n maxTextsToShowOnHover={listingNotes.length}\n />\n ) : null}\n \n );\n })}\n \n );\n};\n\nconst SupportCaseHeaderDisplay = ({\n sellerSupportCase,\n}: {\n sellerSupportCase: SellerSupportCase;\n}) => {\n const generalMessageContent = useContent(ContentId.GeneralMessage);\n const { getSellerUserDetails } = useContext(SellerSupportCaseDataContext);\n\n const [displayEmail, setDisplayEmail] = useState();\n\n useEffect(() => {\n (async function fetchDisplayEmail() {\n const sellerUserId =\n sellerSupportCase?.impersonatedUserId ??\n sellerSupportCase?.createByUserId;\n\n if (sellerUserId) {\n const sellerUser = await getSellerUserDetails(sellerUserId);\n setDisplayEmail(sellerUser?.email);\n }\n })();\n }, [sellerSupportCase, getSellerUserDetails]);\n\n return (\n \n );\n};\n\nconst ConversationMainDisplay = ({\n sellerSupportCase,\n inboundEmail,\n}: {\n sellerSupportCase?: SellerSupportCase | null;\n inboundEmail?: AutoPoInboundEmail | null;\n}) => {\n return (\n
    \n {sellerSupportCase && (\n \n )}\n {inboundEmail && (\n \n )}\n
    \n );\n};\n","import { useInfiniteQuery } from '@tanstack/react-query';\nimport { useMemo } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { DATA_REFRESH_RATE_IN_MILLIS_FAST } from 'src/utils/constants/constants';\nimport {\n AutoPoClient,\n AutoPoInboundEmail,\n AutoPoInboundEmailClassificationType,\n} from 'src/WebApiController';\n\nconst NUM_TAKE = 500;\n\nexport function useClassifiedInboundEmails(\n classificationTypes?: AutoPoInboundEmailClassificationType[],\n isSortDescending?: boolean | null\n) {\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n\n const inboundEmailsClassifiedQuery = useInfiniteQuery({\n queryKey: [\n 'AutoPoClient.getClassifiedInboundEmails',\n activeAccountWebClientConfig.activeAccountId,\n classificationTypes,\n isSortDescending,\n ],\n queryFn: async ({ pageParam: skip = 0 }) => {\n if (activeAccountWebClientConfig.activeAccountId == null) {\n return null;\n }\n\n if (classificationTypes != null && classificationTypes.length === 0) {\n return {\n results: [],\n skip,\n totalCount: 0,\n };\n }\n\n const results = await new AutoPoClient(\n activeAccountWebClientConfig\n ).getClassifiedInboundEmails(\n classificationTypes ?? [],\n NUM_TAKE,\n skip ?? 0,\n isSortDescending\n );\n\n const totalCount = await new AutoPoClient(\n activeAccountWebClientConfig\n ).getClassifiedInboundEmailsCount(classificationTypes ?? []);\n\n if (results.length === 0) {\n return null;\n }\n return {\n results,\n skip,\n totalCount,\n };\n },\n getNextPageParam: (lastPage) => {\n return lastPage?.results.length\n ? lastPage.skip + lastPage.results.length\n : undefined;\n },\n meta: {\n onError(err: ErrorTypes) {\n trackError('AutoPoClient.getClassifiedInboundEmails', err);\n },\n },\n initialPageParam: 0,\n staleTime: Infinity, // we already do refresh interval\n enabled: activeAccountWebClientConfig.activeAccountId != null,\n refetchOnWindowFocus: true,\n refetchInterval: DATA_REFRESH_RATE_IN_MILLIS_FAST,\n });\n\n const flattenedData = useMemo(() => {\n const flattenedData: AutoPoInboundEmail[] = [];\n if (inboundEmailsClassifiedQuery.data) {\n for (const page of inboundEmailsClassifiedQuery.data.pages) {\n if (page) {\n for (const email of page?.results ?? []) {\n flattenedData.push(email);\n }\n }\n }\n }\n return flattenedData;\n }, [inboundEmailsClassifiedQuery.data]);\n\n return {\n ...inboundEmailsClassifiedQuery,\n inboundEmailsClassified: flattenedData,\n inboundEmailsTotalCount:\n inboundEmailsClassifiedQuery.data?.pages[0]?.totalCount,\n isLoading:\n inboundEmailsClassifiedQuery.isLoading ||\n inboundEmailsClassifiedQuery.isFetchingNextPage,\n isError:\n inboundEmailsClassifiedQuery.isError ||\n (inboundEmailsClassifiedQuery.isLoading &&\n inboundEmailsClassifiedQuery.isPaused),\n };\n}\n","import { useNavigate } from 'react-router-dom';\nimport { FilterToolbar } from 'src/components/FilterToolbar';\nimport { QuickFilterToolbarItem } from 'src/components/FilterToolbar/QuickFilterToolbarItem';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { ConversationType } from './ConversationListItem/ConversationListItem';\nimport * as styles from './ConversationSidePanel.css';\n\nexport type ConversationFilterQuery = {\n isUnread?: boolean | undefined;\n isSortDescending: boolean | null;\n};\n\nexport type ConversationFilterProps = {\n category: string | null;\n currentFilter: ConversationFilterQuery;\n setFilter: (settings: ConversationFilterQuery) => void;\n};\n\nexport const defaultConversationFilter: ConversationFilterQuery = {\n isSortDescending: true,\n};\n\nconst CONVERSATION_FILTER_TYPES_MAP = {\n support: [] as ConversationType[],\n purchases: [ConversationType.Purchase],\n sales: [ConversationType.Sale, ConversationType.Transfer],\n private: [ConversationType.Private],\n junk: [ConversationType.Junk],\n};\n\nexport function getCategoryConversationTypes(category: string | null) {\n if (!category) {\n return [];\n }\n return (\n CONVERSATION_FILTER_TYPES_MAP[\n category as keyof typeof CONVERSATION_FILTER_TYPES_MAP\n ] ?? []\n );\n}\n\nfunction createConversationSearchParam(\n category: keyof typeof CONVERSATION_FILTER_TYPES_MAP\n) {\n return new URLSearchParams({ category });\n}\n\nexport function ConversationFilter({\n category,\n currentFilter,\n setFilter,\n}: ConversationFilterProps) {\n const conversationTypes = getCategoryConversationTypes(category);\n const supportCaseOnly = category === 'support';\n\n const navigate = useNavigate();\n const quickFilters: QuickFilterToolbarItem[] = [\n {\n id: 'support',\n name: ,\n isCustomFilter: false,\n isSelected: supportCaseOnly,\n onClick: () => {\n navigate(\n { search: `?${createConversationSearchParam('support')}` },\n { relative: 'path' }\n );\n },\n },\n {\n id: 'purchases',\n name: ,\n isCustomFilter: false,\n isSelected: conversationTypes.includes(ConversationType.Purchase),\n onClick: () => {\n navigate(\n { search: `?${createConversationSearchParam('purchases')}` },\n { relative: 'path' }\n );\n },\n },\n {\n id: 'sale',\n name: ,\n isCustomFilter: false,\n isSelected:\n conversationTypes.includes(ConversationType.Sale) ||\n conversationTypes.includes(ConversationType.Transfer),\n onClick: () => {\n navigate(\n { search: `?${createConversationSearchParam('sales')}` },\n { relative: 'path' }\n );\n },\n },\n {\n id: 'private',\n name: ,\n isCustomFilter: false,\n isSelected: conversationTypes.includes(ConversationType.Private),\n onClick: () => {\n navigate(\n { search: `?${createConversationSearchParam('private')}` },\n { relative: 'path' }\n );\n },\n },\n {\n id: 'junk',\n name: ,\n isCustomFilter: false,\n isSelected: conversationTypes.includes(ConversationType.Junk),\n onClick: () => {\n navigate(\n { search: `?${createConversationSearchParam('junk')}` },\n { relative: 'path' }\n );\n },\n },\n ];\n\n return (\n
    \n {\n navigate({ search: '' }, { relative: 'path' });\n setFilter({\n ...defaultConversationFilter,\n isSortDescending: currentFilter.isSortDescending,\n });\n }}\n filterAppliedCounts={0}\n filters={[]}\n />\n
    \n );\n}\n","import { useQuery } from '@tanstack/react-query';\nimport {\n ComponentPropsWithRef,\n Dispatch,\n SetStateAction,\n useMemo,\n useState,\n} from 'react';\nimport { useNavigate, useParams, useSearchParams } from 'react-router-dom';\nimport { Components, Virtuoso } from 'react-virtuoso';\nimport { SwiperButton } from 'src/components/Buttons/SwiperButton';\nimport * as EmptySectionContent from 'src/components/common/EmptySectionContent';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { clearIDBCache } from 'src/core/utils/createIndexDBPersister';\nimport { useClassifiedInboundEmails } from 'src/hooks/api/useClassifiedInboundEmails';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { ErrorSolidIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { CONVERSATION_SORT_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { stringToUtcDate } from 'src/utils/dateTimeUtils';\nimport {\n EventUiSort,\n getEventSort,\n getEventUiSort,\n} from 'src/utils/eventQueryUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n AutoPoInboundEmail,\n EventSort,\n Marketplace,\n SellerSupportCase,\n SellerSupportCaseClient,\n} from 'src/WebApiController';\nimport { useSwiper } from 'swiper/react';\n\nimport IconBulletList from '~icons/pos/bulletList';\n\nimport {\n ConversationFilter,\n ConversationFilterQuery,\n defaultConversationFilter,\n getCategoryConversationTypes,\n} from './ConversationFilter';\nimport {\n ConversationInfo,\n ConversationListItem,\n ConversationType,\n convertConversationTypeToEmailClassificationTypes,\n convertEmailClassificationTypeToConversationType,\n} from './ConversationListItem/ConversationListItem';\nimport * as styles from './ConversationSidePanel.css';\n\ntype VirtuosoContext = {\n isLoading?: boolean;\n isError?: boolean;\n filter: ConversationFilterQuery;\n setFilter: Dispatch>;\n allCount?: number;\n unreadCount?: number;\n isFetchingNextPage: boolean;\n};\n\nconst UnreadFilter = ({\n context,\n}: {\n context: VirtuosoContext | undefined;\n}) => {\n const { filter, setFilter, allCount, unreadCount } = context ?? {};\n\n if (filter == null || setFilter == null) {\n return null;\n }\n\n return (\n
    \n
    \n {\n setFilter({ ...filter, isUnread: undefined });\n }}\n >\n \n {allCount != null && ` (${allCount})`}\n
    \n {\n setFilter({ ...filter, isUnread: true });\n }}\n >\n \n {unreadCount != null && ` (${unreadCount})`}\n
    \n
    \n {\n const [, isSortDescending] = getEventSort(sort);\n if (isSortDescending !== filter?.isSortDescending) {\n setFilter({\n ...filter,\n isSortDescending,\n });\n }\n }}\n valueOptionsContent={CONVERSATION_SORT_TO_CID}\n />\n \n );\n};\n\nconst Header: Components['Header'] = ({\n context,\n}: {\n context?: VirtuosoContext;\n}) => {\n const { filter, setFilter } = context ?? {};\n const { inboundEmailId, sellerSupportCaseId } = useParams();\n\n const isLargeDesktop = useMatchMedia('largeDesktop');\n\n const [searchParams] = useSearchParams();\n\n return (\n
    \n {!isLargeDesktop && (inboundEmailId || sellerSupportCaseId) && (\n
    \n \n
    \n )}\n

    \n \n

    \n {filter && setFilter && (\n
    \n \n \n
    \n )}\n
    \n );\n};\n\nconst Item: Components['Item'] = ({\n children,\n ...rest\n}: ComponentPropsWithRef<'div'>) => {\n return (\n
    \n {children}\n
    \n );\n};\n\nconst EmptyPlaceholder: Components<\n unknown,\n VirtuosoContext\n>['EmptyPlaceholder'] = ({ context }: { context?: VirtuosoContext }) => {\n if (context?.isError) {\n return (\n \n }\n >\n \n \n \n {\n clearIDBCache(); // delete the cache storage before reloading\n window.location.reload();\n }}\n >\n \n \n \n );\n }\n if (context?.isLoading) {\n return ;\n }\n return (\n }>\n \n \n );\n};\n\nconst Footer: Components['Footer'] = ({\n context,\n}: {\n context?: VirtuosoContext;\n}) => {\n if (context?.isFetchingNextPage) {\n return ;\n }\n // XXX hack to prevent margin collapse on last element\n\n return
    ;\n};\n\nconst sellerSupportCaseToConversationData = (\n supportCase: SellerSupportCase\n): ConversationInfo => {\n return {\n datetime: stringToUtcDate(supportCase.lastNoteDate),\n merchantName: Marketplace.StubHub,\n conversationType:\n supportCase.entityType === ActionOutboxEntityType.Sale\n ? ConversationType.Sale\n : undefined,\n unread: supportCase.unreadNoteCount > 0,\n sellerSupportCase: supportCase,\n };\n};\n\nconst inboundEmailToConversationData = (\n inboundEmail: AutoPoInboundEmail\n): ConversationInfo => {\n const conversationType = convertEmailClassificationTypeToConversationType(\n inboundEmail.classificationType\n );\n\n return {\n datetime: stringToUtcDate(\n inboundEmail.receiveDate ?? inboundEmail.createDate\n ),\n title: inboundEmail.subject,\n vendorId: inboundEmail.purchaseOrderVendorId,\n unread: false,\n conversationType,\n inboundEmail,\n };\n};\n\nexport function ConversationSidePanel() {\n const {\n inboundEmailId: activeInboundEmailId,\n sellerSupportCaseId: activeSellerSupportCaseId,\n } = useParams();\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n\n const [filter, setFilter] = useState(\n defaultConversationFilter\n );\n const swiper = useSwiper();\n const isLargeDesktop = useMatchMedia('largeDesktop');\n\n const sellerSupportCaseQuery = useQuery({\n queryKey: [\n 'SellerSupportCaseClient.getSellerSupportCases',\n activeAccountWebClientConfig.activeAccountId,\n ],\n queryFn: async () => {\n if (activeAccountWebClientConfig.activeAccountId == null) {\n return null;\n }\n return tryInvokeApi(\n async () => {\n return await new SellerSupportCaseClient(\n activeAccountWebClientConfig\n ).getSellerSupportCases(\n {\n isMostRecent: null,\n sellerSupportCaseIds: null,\n },\n null,\n null\n );\n },\n (error) => {\n trackError('SellerSupportCaseClient.getSellerSupportCases', error);\n }\n );\n },\n\n enabled: activeAccountWebClientConfig.activeAccountId != null,\n refetchOnWindowFocus: false,\n });\n const sellerSupportCases = sellerSupportCaseQuery.data;\n const sellerSupportCasesIsLoading = sellerSupportCaseQuery.isLoading;\n const sellerSupportCasesIsError = sellerSupportCaseQuery.isError;\n\n const generalMessageContent = useContent(ContentId.GeneralMessage);\n\n const [searchParams] = useSearchParams();\n const category = searchParams.get('category');\n const supportCaseOnly = category === 'support';\n const filteredConversationTypes = getCategoryConversationTypes(category);\n\n const {\n isLoading: classifiedEmailIsLoading,\n isError: classifiedEmailIsError,\n inboundEmailsTotalCount,\n inboundEmailsClassified,\n fetchNextPage,\n hasNextPage,\n isFetchingNextPage,\n } = useClassifiedInboundEmails(\n category\n ? convertConversationTypeToEmailClassificationTypes(\n filteredConversationTypes as ConversationType[]\n )\n : undefined,\n filter.isSortDescending\n );\n\n const conversationData = useMemo(() => {\n if (sellerSupportCases == null || inboundEmailsClassified == null) {\n return [];\n }\n\n const supportCasesMapped = sellerSupportCases\n .map(sellerSupportCaseToConversationData)\n .map((c) => {\n c.title = generalMessageContent;\n return c;\n });\n\n const inboundEmailsMapped = inboundEmailsClassified.map(\n inboundEmailToConversationData\n );\n\n return supportCasesMapped.concat(inboundEmailsMapped);\n }, [generalMessageContent, sellerSupportCases, inboundEmailsClassified]);\n\n const filteredDataByType = useMemo(\n () =>\n conversationData.filter(\n (conversation) =>\n (filteredConversationTypes.length === 0 ||\n filteredConversationTypes.includes(\n conversation.conversationType ?? ConversationType.Uncategorized\n )) &&\n (!supportCaseOnly || conversation.sellerSupportCase != null)\n ),\n [conversationData, filteredConversationTypes, supportCaseOnly]\n );\n\n const allCount = useMemo(() => {\n const supportCaseCount = filteredDataByType.filter(\n (d) => d.sellerSupportCase != null\n ).length;\n\n return supportCaseCount + (inboundEmailsTotalCount ?? 0);\n }, [filteredDataByType, inboundEmailsTotalCount]);\n\n // TODO these filters will be eventually passed to the API as query params\n // POS-2210\n const filteredData = useMemo(\n () =>\n conversationData\n .filter(\n (conversation) =>\n (filteredConversationTypes.length === 0 ||\n filteredConversationTypes.includes(\n conversation.conversationType ?? ConversationType.Uncategorized\n )) &&\n (!supportCaseOnly || conversation.sellerSupportCase != null) &&\n (filter.isUnread === undefined ||\n (conversation.unread ?? false) === filter.isUnread)\n )\n .toSorted((a, b) => {\n if (a.datetime == null || b.datetime == null) {\n return 0;\n }\n const cmpResult = a.datetime < b.datetime ? -1 : 1;\n return filter.isSortDescending ? -cmpResult : cmpResult;\n }),\n [\n conversationData,\n filteredConversationTypes,\n filter.isSortDescending,\n filter.isUnread,\n supportCaseOnly,\n ]\n );\n\n const navigate = useNavigate();\n const onConversationClicked = (conversationInfo: ConversationInfo) => {\n if (!isLargeDesktop) {\n swiper?.slideNext();\n }\n\n if (conversationInfo.inboundEmail?.inboundEmailId != null) {\n navigate(\n {\n pathname: `${conversationInfo.inboundEmail.inboundEmailId}`,\n search: window.location.search,\n },\n { relative: 'route' }\n );\n } else if (\n conversationInfo.sellerSupportCase?.sellerSupportCaseId != null\n ) {\n navigate(\n {\n pathname: `support/${conversationInfo.sellerSupportCase.sellerSupportCaseId}`,\n search: window.location.search,\n },\n { relative: 'route' }\n );\n }\n };\n\n return (\n
    \n m.unread === true)\n .length,\n isError: sellerSupportCasesIsError || classifiedEmailIsError,\n isLoading: sellerSupportCasesIsLoading || classifiedEmailIsLoading,\n isFetchingNextPage,\n }}\n endReached={() => !isFetchingNextPage && hasNextPage && fetchNextPage()}\n itemContent={(i, conversationInfo) => {\n const {\n vendorId,\n merchantName,\n title,\n datetime,\n unread,\n conversationType,\n inboundEmail,\n sellerSupportCase,\n } = conversationInfo;\n return (\n onConversationClicked(conversationInfo)}\n />\n );\n }}\n />\n
    \n );\n}\n","import { ReactNode } from 'react';\nimport { Content, FormatContent } from 'src/contexts/ContentContext';\nimport { shared } from 'src/core/themes';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { getCurrentLanguage } from 'src/utils/localeUtils';\n\nimport { MerchantColorBadge } from '../../common/MerchantColorBadge';\nimport * as styles from './PurchaseEmailDisplay.css';\n\nconst dateFormatter = new Intl.DateTimeFormat(getCurrentLanguage(), {\n dateStyle: 'long',\n});\n\nexport type PurchaseEmailDisplayProps = {\n vendorId?: number | null;\n subject?: ReactNode;\n toEmailAddress?: ReactNode;\n fromEmailAddress?: ReactNode;\n emailDate?: Date;\n orderId?: ReactNode;\n order?: ReactNode;\n orderDate?: Date;\n faceValue?: ReactNode;\n};\n\nexport function PurchaseEmailDisplay({\n vendorId,\n subject,\n toEmailAddress,\n fromEmailAddress,\n emailDate,\n ...purchaseOrderDetails\n}: PurchaseEmailDisplayProps) {\n const { orderId, order, orderDate, faceValue } = purchaseOrderDetails;\n return (\n
    \n
    \n {vendorId && }\n
    \n {emailDate && dateFormatter.format(emailDate)}\n
    \n
    \n
    \n
    {subject}
    \n
    \n
    \n
    \n {fromEmailAddress && (\n \n {fromEmailAddress}}\n />\n \n )}\n {fromEmailAddress && toEmailAddress &&
    }\n {toEmailAddress && (\n \n {toEmailAddress}}\n />\n \n )}\n
    \n
    \n {Object.values(purchaseOrderDetails).some((val) => val != null) && (\n
    \n {orderId && (\n }\n >\n {orderId}\n \n )}\n {order && (\n }>\n {order}\n \n )}\n {orderDate && (\n }\n >\n {dateFormatter.format(orderDate)}\n \n )}\n {faceValue && (\n }>\n {faceValue}\n \n )}\n
    \n )}\n
    \n );\n}\n\nfunction PurchaseOrderDetail({\n label,\n children,\n}: {\n label: ReactNode;\n children: ReactNode;\n}) {\n return (\n
    \n
    {label}
    \n
    {children}
    \n
    \n );\n}\n","import { useInfiniteQuery } from '@tanstack/react-query';\nimport { useMemo } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport {\n AutoPoClient,\n AutoPoInboundEmailPartialPurchaseOrderQuery,\n AutoPoPartialPurchaseOrderInboundEmail,\n} from 'src/WebApiController';\n\nconst NUM_TAKE = 100;\n\nexport function usePartialPurchaseOrderInboundEmails({\n query,\n}: {\n query: AutoPoInboundEmailPartialPurchaseOrderQuery;\n}) {\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n const queryResult = useInfiniteQuery({\n queryKey: [\n 'AutoPoClient.getPartialPurchaseOrderInboundEmails',\n activeAccountWebClientConfig.activeAccountId,\n query,\n ],\n async queryFn({ pageParam: skip = 0 }) {\n if (activeAccountWebClientConfig.activeAccountId == null) {\n return null;\n }\n\n const results = await new AutoPoClient(\n activeAccountWebClientConfig\n ).getPartialPurchaseOrderInboundEmails(query, NUM_TAKE, skip);\n if (results.length === 0) {\n return;\n }\n return {\n results,\n skip,\n totalCount: results[0].totalCount,\n };\n },\n getNextPageParam(lastPage) {\n return lastPage && lastPage.skip < lastPage.totalCount\n ? lastPage.skip + NUM_TAKE\n : undefined;\n },\n meta: {\n onError(err: ErrorTypes) {\n trackError('AutoPoClient.getPartialPurchaseOrderInboundEmails', err, {\n query,\n });\n },\n },\n initialPageParam: 0,\n staleTime: 0,\n gcTime: 0,\n enabled: activeAccountWebClientConfig.activeAccountId != null,\n });\n const flattenedData = useMemo(() => {\n const flattenedData: AutoPoPartialPurchaseOrderInboundEmail[] = [];\n if (queryResult.data) {\n for (const page of queryResult.data.pages) {\n if (page) {\n for (const email of page?.results ?? []) {\n flattenedData.push(email);\n }\n }\n }\n }\n return flattenedData;\n }, [queryResult.data]);\n return {\n flattenedData,\n ...queryResult,\n };\n}\n","import clsx from 'clsx';\nimport { useMatches, useNavigate, useParams } from 'react-router-dom';\nimport { Components, Virtuoso } from 'react-virtuoso';\nimport { SwiperButton } from 'src/components/Buttons/SwiperButton';\nimport * as EmptySectionContent from 'src/components/common/EmptySectionContent';\nimport { PurchaseEmailDisplay } from 'src/components/Purchases/PurchaseEmailDisplay';\nimport { Content, FormatContent } from 'src/contexts/ContentContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { vars } from 'src/core/themes';\nimport { usePartialPurchaseOrderInboundEmails } from 'src/hooks/api/usePartialPurchaseOrderInboundEmails';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { getErrorInfoFromStatusCode } from 'src/utils/errorUtils';\nimport { SomethingWentWrong } from 'src/views';\nimport {\n ApiException,\n AutoPoInboundEmailPartialPurchaseOrderQuery,\n} from 'src/WebApiController';\nimport { useSwiper } from 'swiper/react';\n\nimport IconBulletList from '~icons/pos/bulletList';\n\nimport * as styles from './EmailList.css';\n\ntype VirtuosoContext = {\n isLoading: boolean;\n isError: boolean;\n error: unknown;\n isFetchingNextPage: boolean;\n};\n\nconst Header: Components['Header'] = () => {\n const { inboundEmailId, sellerSupportCaseId } = useParams();\n\n const isLargeDesktop = useMatchMedia('largeDesktop');\n\n return (\n
    \n {!isLargeDesktop && (inboundEmailId || sellerSupportCaseId) && (\n
    \n \n
    \n )}\n
    \n );\n};\n\nconst EmptyPlaceholder: Components<\n unknown,\n VirtuosoContext\n>['EmptyPlaceholder'] = ({ context }: { context?: VirtuosoContext }) => {\n if (context?.isLoading) {\n return ;\n }\n if (context?.isError) {\n const errorInfo = getErrorInfoFromStatusCode(\n (context?.error as ApiException)?.status\n );\n return (\n }\n />\n );\n }\n return (\n }>\n \n \n );\n};\n\nconst Footer: Components['Footer'] = ({\n context,\n}: {\n context?: VirtuosoContext;\n}) => {\n if (context?.isFetchingNextPage) {\n return ;\n }\n // XXX hack to prevent margin collapse on last element\n return
    ;\n};\n\nexport function EmailList({\n classifiedInboundEmailIds,\n query,\n}: {\n classifiedInboundEmailIds: Set;\n query: AutoPoInboundEmailPartialPurchaseOrderQuery;\n}) {\n const swiper = useSwiper();\n const isLargeDesktop = useMatchMedia('largeDesktop');\n\n const { inboundEmailId: activeInboundEmailId } = useParams();\n const navigate = useNavigate();\n const matches = useMatches();\n\n const {\n flattenedData,\n isLoading,\n isError,\n error,\n fetchNextPage,\n hasNextPage,\n isFetching,\n isFetchingNextPage,\n } = usePartialPurchaseOrderInboundEmails({ query });\n\n return (\n
    \n \n !classifiedInboundEmailIds.has(inboundEmailId)\n )\n : flattenedData\n }\n context={{\n isLoading: isLoading,\n isError,\n error,\n isFetchingNextPage,\n }}\n components={{ Footer, Header, EmptyPlaceholder }}\n endReached={() => !isFetching && hasNextPage && fetchNextPage()}\n itemContent={(_, partialPurchaseOrderInboundEmail) => {\n const {\n inboundEmailId,\n subject,\n toEmailAddress,\n fromEmailAddress,\n createDate,\n orderId,\n quantity,\n purchaseOrderDate,\n faceValue,\n purchaseOrderVendorId,\n } = partialPurchaseOrderInboundEmail;\n return (\n {\n if (!isLargeDesktop) {\n swiper?.slideNext();\n }\n\n const parentMatch = matches.at(-2);\n navigate({\n pathname: `${parentMatch?.pathname}/${inboundEmailId}`,\n search: window.location.search,\n });\n }}\n >\n
    \n \n ) : undefined\n }\n orderDate={\n purchaseOrderDate ? new Date(purchaseOrderDate) : undefined\n }\n // TODO add currency for faceValue\n faceValue={faceValue}\n />\n
    \n
    \n );\n }}\n />\n
    \n );\n}\n","import { useCallback } from 'react';\nimport { useMatches, useNavigate } from 'react-router-dom';\nimport { useSet } from 'react-use';\nimport { AccountDisabledNotification } from 'src/components/common/AccountDisabledNotification';\nimport { ConversationMainPanel } from 'src/components/Messages/ConversationMainPanel';\nimport { ConversationSidePanel } from 'src/components/Messages/ConversationSidePanel';\nimport { ConversationDataContextProvider } from 'src/contexts/ConversationDataContext';\nimport { SellerSupportCaseDataContextProvider } from 'src/contexts/SellerSupportCaseDataContext';\nimport { SidePanelProvider } from 'src/contexts/SidePanelContext';\nimport { ExplorerLayout } from 'src/core/layouts';\nimport { AutoPoInboundEmailPartialPurchaseOrderQuery } from 'src/WebApiController';\n\nimport { EmailList } from './EmailList';\nimport { EmailNavPageName } from './EmailNavToolbar';\nimport * as styles from './MessagesExplorer.css';\n\nexport function MessagesExplorer({\n query,\n pageName,\n}: {\n query?: AutoPoInboundEmailPartialPurchaseOrderQuery;\n pageName: EmailNavPageName;\n}) {\n // const { inboundEmailId: activeInboundEmailId } = useParams();\n const navigate = useNavigate();\n const matches = useMatches();\n\n const [classifiedInboundEmailIds, { add: addClassifiedInboundEmailId }] =\n useSet();\n const onEmailClassified = useCallback(\n (inboundEmailId: number) => {\n addClassifiedInboundEmailId(inboundEmailId);\n const parentMatch = matches.at(-2);\n parentMatch && navigate(parentMatch.pathname);\n },\n [addClassifiedInboundEmailId, navigate, matches]\n );\n\n return (\n \n \n \n \n \n ) : (\n \n )\n }\n autoHide={false}\n initialSlide={0}\n >\n
    \n \n
    \n \n
    \n
    \n
    \n );\n}\n","import { useQuery } from '@tanstack/react-query';\nimport { sub } from 'date-fns';\nimport { debounce } from 'lodash-es';\nimport { useEffect, useMemo, useState } from 'react';\nimport { Navigate, useMatches } from 'react-router-dom';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { PosSearchBox } from 'src/core/POS/PosSearchBox';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { MessagesAddSourceModal } from 'src/modals/MessagesAddSourceModal/MessagesAddSourceModal';\nimport { LayoutContent } from 'src/navigations/LayoutContent';\nimport { IconsFill, PlusIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n AutoPoClient,\n AutoPoInboundEmailClassificationType,\n AutoPoInboundEmailPartialPurchaseOrderQuery,\n} from 'src/WebApiController';\n\nimport { MainRoute } from '../MainRoute';\nimport * as styles from './Email.css';\nimport { EmailNavPageNameHandle } from './Email.types';\nimport { EMAIL_NAV_PAGE_NAME_MAP, EmailNavToolbar } from './EmailNavToolbar';\nimport { MessagesExplorer } from './MessagesExplorer';\n\nconst SEARCH_DELAY_MS = 1000;\n\nconst DEFAULT_QUERY: AutoPoInboundEmailPartialPurchaseOrderQuery = {\n classificationTypes: null,\n includeUnclassified: null,\n subjectSearchText: null,\n fromEmailAddress: null,\n toEmailAddress: null,\n textBodySearchText: null,\n classificationTypeUpdateDateFrom: null,\n classificationTypeUpdateDateTo: null,\n};\n\n/**\n * Classification types to include in the \"Recently Categorized\" page\n */\nconst RECENTLY_CATEGORIZED_CLASSIFICATION_TYPES = Object.values(\n AutoPoInboundEmailClassificationType\n).filter((type) => type !== AutoPoInboundEmailClassificationType.Junk);\n\nfunction isPageNameHandle(handle: unknown): handle is EmailNavPageNameHandle {\n return (\n handle != null &&\n typeof handle === 'object' &&\n 'pageName' in handle &&\n typeof handle.pageName === 'string' &&\n handle.pageName in EMAIL_NAV_PAGE_NAME_MAP\n );\n}\n\nexport function Email() {\n const matches = useMatches();\n const pageName = matches\n .map(({ handle }) => handle)\n .find(isPageNameHandle)?.pageName;\n\n const messagesText = useContent(ContentId.Messages);\n const searchForMessagePlaceholderText = useContent(\n ContentId.SearchForMessagePlaceholder\n );\n\n const [query, setQuery] =\n useState(DEFAULT_QUERY);\n const setQueryDebounced = useMemo(\n () => debounce(setQuery, SEARCH_DELAY_MS),\n []\n );\n useEffect(() => {\n if (pageName === 'uncategorized') {\n setQuery((prev) => ({\n ...DEFAULT_QUERY,\n subjectSearchText: prev.subjectSearchText,\n textBodySearchText: prev.textBodySearchText,\n classificationTypes: null,\n includeUnclassified: true,\n }));\n } else if (pageName === 'recentlyCategorized') {\n setQuery((prev) => ({\n ...DEFAULT_QUERY,\n subjectSearchText: prev.subjectSearchText,\n textBodySearchText: prev.textBodySearchText,\n classificationTypes: RECENTLY_CATEGORIZED_CLASSIFICATION_TYPES,\n classificationTypeUpdateDateFrom: sub(new Date(), {\n weeks: 1,\n }).toISOString(),\n }));\n } else {\n setQuery(DEFAULT_QUERY);\n }\n }, [pageName]);\n\n const { activeAccountWebClientConfig } = useAppContext();\n const uncategorizedEmailsCountQuery = useQuery({\n queryKey: ['uncategorizedEmailsCount'],\n queryFn() {\n if (activeAccountWebClientConfig.activeAccountId == null) {\n return null;\n }\n return new AutoPoClient(\n activeAccountWebClientConfig\n ).getPartialPurchaseOrderInboundEmailsCount({\n ...DEFAULT_QUERY,\n includeUnclassified: true,\n });\n },\n enabled: activeAccountWebClientConfig.activeAccountId != null,\n refetchOnWindowFocus: false,\n });\n\n const [isAddSourceModalOpen, setIsAddSourceModalOpen] = useState(false);\n\n if (pageName == null) {\n return ;\n }\n return (\n \n
    \n
    \n
    \n \n
    \n {pageName !== 'inbox' && (\n
    \n {\n const searchText = e.currentTarget.value;\n setQueryDebounced((prev) => ({\n ...prev,\n subjectSearchText: searchText,\n }));\n }}\n />\n
    \n )}\n
    \n
    \n \n {\n setIsAddSourceModalOpen(true);\n }}\n >\n \n \n \n
    \n
    \n \n
    \n
    \n {\n setIsAddSourceModalOpen(false);\n }}\n />\n
    \n );\n}\n","import { RenderTreeNodePayload, Tree, TreeNodeData } from '@mantine/core';\nimport clsx from 'clsx';\nimport React, { ComponentPropsWithoutRef, forwardRef, ReactNode } from 'react';\nimport { vars } from 'src/core/themes';\nimport { mergeProps } from 'src/core/utils';\nimport { ChevronDownIcon, ChevronRightIcon, MinusIcon } from 'src/svgs/Viagogo';\n\nimport { Stack } from '../Stack';\nimport * as styles from './DocumentTree.css';\n\nexport const DocumentTree = forwardRef<\n typeof Tree,\n ComponentPropsWithoutRef & {\n onNodeClick?: (e: React.MouseEvent, value: TreeNodeData) => void;\n }\n>(function Trigger({ onNodeClick, ...props }, ref) {\n const renderNode = ({\n node,\n expanded,\n hasChildren,\n elementProps,\n }: RenderTreeNodePayload): ReactNode => {\n return (\n {\n elementProps.onClick(e);\n onNodeClick?.(e, node);\n }}\n >\n {!hasChildren ? (\n \n \n \n ) : !expanded ? (\n \n ) : (\n \n )}\n {node.label}\n \n );\n };\n\n return (\n \n );\n});\n","import { useQuery } from '@tanstack/react-query';\nimport { useCallback, useMemo } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { SellerUserClient } from 'src/WebApiController';\n\nexport const useGetHelpData = () => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n const shouldQueryAvailableData = useMemo(\n () => activeAccountWebClientConfig.activeAccountId != null,\n [activeAccountWebClientConfig.activeAccountId]\n );\n\n const allAvailableData = useQuery({\n queryKey: ['allAvailableData'],\n queryFn: async () => {\n if (!shouldQueryAvailableData) {\n return null;\n }\n return tryInvokeApi(\n async () => {\n const client = new SellerUserClient(activeAccountWebClientConfig);\n const data = await client.getAllTutorialItems(true);\n\n return data;\n },\n (error) => {\n showErrorDialog('SellerUserClient.getAllTutorialItems', error, {\n trackErrorData: {\n activeAccountWebClientConfig,\n },\n });\n }\n );\n },\n staleTime: 0, // we will refetch on mount\n refetchOnWindowFocus: false,\n enabled: shouldQueryAvailableData,\n });\n\n const getDataContent = useCallback(\n (itemId: number) => {\n if (!allAvailableData.data) {\n return null;\n }\n\n const existingItem = allAvailableData.data.find(\n (i) => i.tutorialItemId === itemId\n );\n\n if (!existingItem) {\n return null;\n }\n\n return tryInvokeApi(\n async () => {\n const client = new SellerUserClient(activeAccountWebClientConfig);\n const data = await client.getTutorialItemContents([itemId]);\n\n return data[0];\n },\n (error) => {\n showErrorDialog('SellerUserClient.getTutorialItemContents', error, {\n trackErrorData: { activeAccountWebClientConfig, itemId },\n });\n }\n );\n },\n [activeAccountWebClientConfig, allAvailableData.data, showErrorDialog]\n );\n\n return {\n isLoading: allAvailableData.isLoading,\n allAvailableKbs: allAvailableData.data,\n refreshData: allAvailableData.refetch,\n getDataContent,\n };\n};\n","import { TreeNodeData, useTree } from '@mantine/core';\nimport { useCallback, useMemo, useState } from 'react';\nimport {\n FormatContent,\n useContent,\n useContentContext,\n} from 'src/contexts/ContentContext';\nimport { PosSearchBox } from 'src/core/POS/PosSearchBox';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { DocumentTree } from 'src/core/ui/DocumentTree';\nimport { LayoutContent } from 'src/navigations/LayoutContent';\nimport { NoData } from 'src/tables/Table';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ContentIds } from 'src/utils/constants/contentIdDataMap';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport {\n TutorialItem,\n TutorialItemContent,\n TutorialItemType,\n} from 'src/WebApiController';\n\nimport { MainRoute } from '../MainRoute';\nimport * as styles from './HelpCenter.css';\nimport { useGetHelpData } from './useGetHelpData';\n\ntype TutorialItemTreeNode = TreeNodeData & {\n meta: TutorialItem;\n content?: TutorialItemContent;\n};\n\nexport function HelpCenter() {\n const helpCenterText = useContent(ContentId.HelpCenter);\n\n const { isLoading, allAvailableKbs, getDataContent } = useGetHelpData();\n const { contentResolver } = useContentContext();\n\n const [treeContent, setTreeContent] = useState<\n Record\n >({});\n const [displayContentIsLoading, setDisplayContentIsLoading] = useState(false);\n const [displayContent, setDisplayContent] = useState();\n const [searchText, setSearchText] = useState();\n\n const extractTitle = useCallback(\n (item: TutorialItem) => {\n return (\n (item.titleContentId\n ? contentResolver(\n ContentIds[`cid$#${item.titleContentId}#` as ContentId]\n )\n : undefined) || item.title\n );\n },\n [contentResolver]\n );\n\n const recursiveSearch = useCallback(\n (ti: TutorialItemTreeNode): boolean => {\n if (searchText) {\n const title = extractTitle(ti.meta);\n if (\n (title as string).toLowerCase().includes(searchText.toLowerCase())\n ) {\n return true;\n }\n\n // check children\n if (ti.children?.length) {\n return ti.children.some((child) =>\n recursiveSearch(child as TutorialItemTreeNode)\n );\n }\n\n return false;\n }\n\n return true;\n },\n [extractTitle, searchText]\n );\n\n const treeData = useMemo(() => {\n if (!allAvailableKbs) {\n return [];\n }\n\n const allTreeNodes = allAvailableKbs\n .map(\n (i) =>\n ({\n label: extractTitle(i),\n value: i.tutorialItemId.toString(),\n meta: i,\n content: treeContent[i.tutorialItemId],\n }) as TutorialItemTreeNode\n )\n .toSorted((a, b) => {\n const sortVal =\n (a.meta.tutorialItemType === TutorialItemType.Folder ? 1 : 2) -\n (b.meta.tutorialItemType === TutorialItemType.Folder ? 1 : 2);\n\n if (sortVal !== 0) {\n return sortVal;\n }\n\n return a.meta.title.localeCompare(b.meta.title);\n });\n\n const allTreeNodesMap = {} as Record;\n let tree = [] as TutorialItemTreeNode[];\n allTreeNodes.forEach((i) => {\n if (i.meta.parentTutorialItemId == null) {\n allTreeNodesMap[i.meta.tutorialItemId] = i;\n tree.push(i);\n } else if (i.meta.parentTutorialItemId) {\n if (!allTreeNodesMap[i.meta.parentTutorialItemId]) {\n const parent = allTreeNodes.find(\n (p) => i.meta.tutorialItemId === p.meta.parentTutorialItemId\n );\n if (parent) {\n allTreeNodesMap[parent.meta.tutorialItemId] = parent;\n tree.push(parent);\n\n parent.children = [...(parent.children || []), i];\n } else {\n console.error('HelpCenter: parent not found for', i);\n }\n } else {\n const parent = allTreeNodesMap[i.meta.parentTutorialItemId];\n parent.children = [...(parent.children || []), i];\n }\n }\n });\n\n tree = tree.filter((ti) => recursiveSearch(ti));\n\n return tree;\n }, [allAvailableKbs, extractTitle, recursiveSearch, treeContent]);\n\n const onDocumentClick = useCallback(\n async (_: React.MouseEvent, node: TreeNodeData) => {\n const tutorialNode = node as TutorialItemTreeNode;\n if (tutorialNode.meta) {\n let data: TutorialItemContent | null =\n treeContent[tutorialNode.meta.tutorialItemId];\n if (!data) {\n setDisplayContentIsLoading(true);\n try {\n data = await getDataContent(tutorialNode.meta.tutorialItemId);\n if (data) {\n setTreeContent((prev) => ({\n ...prev,\n [data!.tutorialItemId]: data!,\n }));\n setDisplayContent(data);\n }\n } finally {\n setDisplayContentIsLoading(false);\n }\n } else {\n setDisplayContent(data);\n }\n }\n },\n [getDataContent, treeContent]\n );\n\n const treeHook = useTree();\n\n const onSearchChange = useCallback(\n (value: string) => {\n value = value.trim();\n if (value !== searchText) {\n setSearchText(value);\n\n // Search will expand all to show the search results\n if (\n value &&\n Object.values(treeHook.expandedState).filter((b) => !b).length > 0 // there are unexpanded nodes\n ) {\n treeHook.expandAllNodes();\n } else if (\n // Clear search will collapse all\n !value &&\n Object.values(treeHook.expandedState).filter((b) => b).length > 0 // there are expanded nodes\n ) {\n treeHook.collapseAllNodes();\n }\n }\n },\n [searchText, treeHook]\n );\n\n return (\n \n }\n >\n \n {isLoading ? (\n \n ) : (\n <>\n
    \n {allAvailableKbs ? (\n \n ) : (\n \n \n \n )}\n
    \n\n
    \n {displayContent == null && displayContentIsLoading ? (\n \n ) : displayContent != null ? (\n \n ) : null}\n
    \n \n )}\n \n \n );\n}\n","import 'swiper/swiper-bundle.min.css';\n\nimport { ComponentProps, ReactElement, useMemo, useRef, useState } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { useGetReleaseNoteHtml } from 'src/hooks/api/useGetReleaseNoteHtml';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ReleaseNote, ReleaseNoteType } from 'src/WebApiController';\nimport { Pagination } from 'swiper';\nimport { Swiper, SwiperRef, SwiperSlide } from 'swiper/react';\n\nimport * as styles from './ReleaseNoteDisplayDialog.css';\n\nexport type ReleaseNoteDisplayDialogProps = Omit<\n ComponentProps,\n 'header' | 'footer'\n> & {\n releaseNoteInfos?: ReleaseNote[] | null;\n onReleaseNotesRead?: () => void;\n};\n\nexport function ReleaseNoteDisplayDialog({\n releaseNoteInfos,\n onReleaseNotesRead,\n ...genericDialogProps\n}: ReleaseNoteDisplayDialogProps): ReactElement | null {\n const newFeatures = releaseNoteInfos?.filter(\n (r) => r.releaseNoteType === ReleaseNoteType.NewFeature\n );\n const bugFixes = releaseNoteInfos?.filter(\n (r) => r.releaseNoteType === ReleaseNoteType.BugFix\n );\n\n const swiperRef = useRef(null);\n const [activeIndex, setActiveIndex] = useState(0);\n const totalSlides = useMemo(() => {\n return (newFeatures?.length ?? 0) + (bugFixes?.length ? 1 : 0);\n }, [newFeatures, bugFixes]);\n\n // We could fetch release notes individually, but it will cause the dialog swiper to jump around because\n // the height of the slides will change as the content loads\n // Sacfrice a bit of performance for a better user experience\n const { releaseNoteHtmlByReleaseNoteId = {}, isLoading: htmlIsLoading } =\n useGetReleaseNoteHtml({\n releaseNoteIds: releaseNoteInfos?.map((r) => r.id),\n });\n\n return (\n }\n footer={null}\n onClosed={() => {}}\n {...genericDialogProps}\n onCancel={\n // If user clicks cross icon, we want to mark all release notes as read\n // Otherwise they will pop up again\n // User can go to \"What's New\" page to see them again\n () => onReleaseNotesRead?.()\n }\n >\n {\n setActiveIndex(swiper.activeIndex);\n }}\n className={styles.swiper}\n >\n {newFeatures?.map((releaseNote) => {\n return (\n \n \n \n );\n })}\n\n {bugFixes?.length ? (\n \n \n \n ) : null}\n\n
    \n
    \n {activeIndex > 0 ? (\n swiperRef.current?.swiper.slidePrev()}\n >\n \n \n ) : null}\n
    \n {\n if (activeIndex + 1 === totalSlides) {\n onReleaseNotesRead?.();\n } else {\n swiperRef.current?.swiper.slideNext();\n }\n }}\n disabled={htmlIsLoading}\n >\n {activeIndex + 1 === totalSlides ? (\n \n ) : (\n \n )}\n \n
    \n \n \n );\n}\n\nexport const NewFeatureDisplay = ({\n releaseNote,\n alignLeft,\n releaseNoteHtmlByReleaseNoteId,\n isLoading,\n}: {\n releaseNote: ReleaseNote;\n alignLeft?: boolean;\n releaseNoteHtmlByReleaseNoteId: Record;\n isLoading?: boolean;\n}) => {\n return (\n \n
    \n

    {releaseNote.title}

    \n
    \n ✦ \n
    \n
    \n\n {isLoading ? (\n \n ) : (\n \n )}\n
    \n );\n};\n\nconst BugFixesDisplay = ({\n releaseNotes,\n releaseNoteHtmlByReleaseNoteId,\n isLoading,\n}: {\n releaseNotes: ReleaseNote[];\n releaseNoteHtmlByReleaseNoteId: Record;\n isLoading?: boolean;\n}) => {\n return (\n
    \n
    \n \n
    \n {releaseNotes.map((releaseNote) => {\n return (\n \n

    {releaseNote.title}

    \n\n {isLoading ? (\n \n ) : (\n \n )}\n
    \n );\n })}\n \n );\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { ActivityLogClient } from 'src/WebApiController';\n\nconst GET_RECENT_ACTIVITY_LOG_KEY = `${ActivityLogClient.name}.${ActivityLogClient.prototype.getRecentActivityLog.name}`;\nconst ACTIVITY_LOG_POLLING_INTERVAL = 10000;\n\n/**\n * Fetches activity log items on polling interval.\n * @param count Number of items to fetch\n * @returns Return from `useQuery`.\n */\nexport function useLiveActivityLog(count: number) {\n const { trackError } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const activityLogResult = useQuery({\n queryKey: [\n GET_RECENT_ACTIVITY_LOG_KEY,\n activeAccountWebClientConfig.activeAccountId,\n count,\n ],\n queryFn: async () => {\n if (activeAccountWebClientConfig.activeAccountId == null) {\n return null;\n }\n\n const results = await new ActivityLogClient(\n activeAccountWebClientConfig\n ).getRecentActivityLog(count, true);\n return results\n .toSorted((a, b) => {\n return (\n new Date(b.actionDate).getTime() - new Date(a.actionDate).getTime()\n );\n })\n .slice(0, count);\n },\n\n enabled: activeAccountWebClientConfig.activeAccountId != null,\n retry: 3,\n refetchInterval: (query) =>\n query.state.status === 'error' ? false : ACTIVITY_LOG_POLLING_INTERVAL,\n refetchIntervalInBackground: false,\n refetchOnWindowFocus: false,\n meta: {\n persist: false,\n onError: (error: ErrorTypes) => {\n trackError(GET_RECENT_ACTIVITY_LOG_KEY, error, { count });\n },\n },\n });\n return activityLogResult;\n}\n","import { Link } from 'react-router-dom';\nimport { ActivityLogDisplay } from 'src/components/ActivityLog';\nimport * as EmptySectionContent from 'src/components/common/EmptySectionContent';\nimport { PageSection } from 'src/components/common/PageSection';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { vars } from 'src/core/themes';\nimport { Card } from 'src/core/ui';\nimport { useLiveActivityLog } from 'src/hooks/useLiveActivityLog';\nimport { ErrorSolidIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport IconBulletList from '~icons/pos/bulletList';\n\nimport * as styles from './ActivitySection.css';\n\nconst ACTIVITY_LOG_ITEM_COUNT = 6;\n\nexport function ActivitySection() {\n const activityLogResult = useLiveActivityLog(ACTIVITY_LOG_ITEM_COUNT);\n return (\n \n \n \n \n }\n >\n \n \n \n {activityLogResult.isLoading ? (\n \n \n \n ) : activityLogResult.isError ? (\n \n }\n >\n \n \n \n \n ) : activityLogResult.data?.length === 0 ? (\n }>\n \n \n ) : (\n
    \n {activityLogResult.data?.map((activityLog) => (\n \n \n
    \n ))}\n \n )}\n
    \n
    \n );\n}\n","import { Link } from 'react-router-dom';\nimport { MetricTile } from 'src/components/Metrics';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getNextDateRange } from 'src/utils/dateTimeUtils';\nimport { DateTimeRangeWithRelative, ListingQuery } from 'src/WebApiController';\n\nimport * as styles from './MetricsSection.css';\n\nexport function MetricsSection() {\n const next2WeeksRange = getNextDateRange({ weeks: 2 }, new Date());\n const metrics = [\n {\n key: 'unsoldTickets',\n title: ,\n href: {\n pathname: '/inventory',\n search: new URLSearchParams({\n quickFilterId: 'unsoldTickets',\n mainFilter: JSON.stringify({\n hasUnsoldTickets: true,\n } satisfies Partial),\n }).toString(),\n },\n },\n {\n key: 'unbroadcasted',\n title: ,\n href: {\n pathname: '/inventory',\n search: new URLSearchParams({\n mainFilter: JSON.stringify({\n isListed: false,\n } satisfies Partial),\n }).toString(),\n },\n },\n {\n key: 'next2Weeks',\n title: (\n <>\n 🔥 \n \n ),\n href: {\n pathname: '/inventory',\n search: new URLSearchParams({\n quickFilterId: 'next2Weeks',\n mainFilter: JSON.stringify({\n eventDates: {\n start: next2WeeksRange.start.toISOString(),\n end: next2WeeksRange.end.toISOString(),\n } as DateTimeRangeWithRelative,\n } satisfies Partial),\n }).toString(),\n },\n },\n {\n key: 'broadcastError',\n title: ,\n href: {\n pathname: '/inventory',\n search: new URLSearchParams({\n quickFilterId: 'broadcastError',\n mainFilter: JSON.stringify({\n hasBroadcastError: true,\n } satisfies Partial),\n }).toString(),\n },\n },\n ];\n return (\n \n {metrics.map(({ key, title, href }) => {\n return (\n \n {title}\n \n >\n \n \n );\n })}\n \n );\n}\n","import { MouseEventHandler, ReactNode } from 'react';\nimport { Content, FormatContent } from 'src/contexts/ContentContext';\nimport { Button, Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\n\nimport * as styles from './NotificationDisplay.css';\n\ntype NotificationDisplayProps = {\n notificationIntent: keyof typeof styles.notificationType;\n /**\n * Type of notification.\n *\n * eg. Listing Broadcast Failed\n */\n notificationType?: ReactNode;\n /**\n * When this notification was triggered.\n *\n * eg. 1 day ago\n */\n timeAgo?: ReactNode;\n /**\n * Identifier for the entity this notification represents.\n *\n * eg. Sale #904398\n */\n entity?: ReactNode;\n entityType?: string;\n /**\n * Seating info.\n *\n * eg. 123 Row A Seats 1 - 10\n */\n seating?: ReactNode;\n /**\n * Pass the event header into here.\n */\n children?: ReactNode;\n onGoToEntity?: MouseEventHandler;\n onDismiss?: MouseEventHandler;\n};\n\n/**\n * @param props\n * @returns\n */\nexport function NotificationDisplay({\n notificationIntent,\n notificationType,\n timeAgo,\n entity,\n entityType,\n seating,\n children,\n onGoToEntity,\n onDismiss,\n}: NotificationDisplayProps) {\n return (\n \n \n
    \n {notificationType && (\n \n {notificationType}\n \n )}\n {timeAgo &&   •  {timeAgo}}\n
    \n {entity &&
    {entity}
    }\n
    \n {children}\n {seating}\n {(onGoToEntity || onDismiss) && (\n \n {onGoToEntity && entityType && (\n \n )}\n {onDismiss && (\n \n \n \n )}\n \n )}\n
    \n );\n}\n","import { useCallback, useMemo } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport {\n Content,\n FormatContent,\n isContentId,\n useContent,\n} from 'src/contexts/ContentContext';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n ACTION_OUTBOX_ENTITY_TYPE_TO_CID,\n MARKET_PLACE_TO_CID,\n NOTIFICATION_TYPE_TO_CID,\n} from 'src/utils/constants/contentIdMaps';\nimport { getTimeAgoString, stringToUtcDate } from 'src/utils/dateTimeUtils';\nimport { getListingDetailsRelativeUrl } from 'src/utils/inventoryUtils';\nimport { getPurchaseOrderRelativeUrl } from 'src/utils/purchaseUtils';\nimport { getSaleDetailsRelativeUrl } from 'src/utils/saleUtils';\nimport {\n ActionOutboxEntityType,\n Notification,\n NotificationType,\n} from 'src/WebApiController';\n\nimport { SeatingInfo } from '../common/SeatingInfo';\nimport { ConnectedEventInfo } from '../Events/ConnectedEventInfo';\nimport { NotificationDisplay } from './NotificationDisplay';\n\nconst NOTIFICATION_INTENT_MAP = {\n [NotificationType.SaleNew]: 'success',\n [NotificationType.SaleFulfilmentFailed]: 'error',\n [NotificationType.SaleMarketplaceCancelled]: 'warning',\n [NotificationType.ListingHideSeatsFailed]: 'error',\n [NotificationType.ListingUpdateAllInPriceFailed]: 'error',\n [NotificationType.ListingUpdateInHandDateFailed]: 'error',\n [NotificationType.ListingUpdateSplitTypeFailed]: 'error',\n [NotificationType.ListingUpdateDeliveryTypeFailed]: 'error',\n [NotificationType.ListingUpdateUnitNetProceedsFailed]: 'error',\n [NotificationType.ListingBroadcastFailed]: 'error',\n [NotificationType.ListingUnbroadcastFailed]: 'error',\n [NotificationType.ListingMergeFailed]: 'error',\n [NotificationType.ListingPriceUpdate]: 'success',\n [NotificationType.ListingSplitFailed]: 'error',\n [NotificationType.AutopriceBelowFloor]: 'error',\n [NotificationType.AutopriceInsufficientCompListings]: 'error',\n [NotificationType.AutopriceFirebrake]: 'error',\n [NotificationType.SellerSupportCaseNewReply]: 'success',\n} satisfies {\n [key in NotificationType]: 'success' | 'warning' | 'error';\n};\n\ntype ConnectedNotificationDisplayProps = {\n notification: Notification;\n onDismiss: () => void;\n};\n\n/**\n * Wrapper around `NotificationDisplay` that transforms `Notification` into props for\n * `NotificationDisplay`.\n * @param props\n * @returns\n */\nexport function ConnectedNotificationDisplay({\n notification: {\n notificationType,\n entityType,\n entityId,\n createDateTime,\n event,\n performer,\n venue,\n section,\n row,\n seatFrom,\n seatTo,\n marketplace,\n },\n onDismiss,\n}: ConnectedNotificationDisplayProps) {\n const navigate = useNavigate();\n\n const entityTypeContent = useContent(\n ACTION_OUTBOX_ENTITY_TYPE_TO_CID[entityType]\n );\n const url = useMemo(() => {\n switch (entityType) {\n case ActionOutboxEntityType.Sale:\n return getSaleDetailsRelativeUrl(entityId);\n\n case ActionOutboxEntityType.Listing:\n return getListingDetailsRelativeUrl(entityId);\n\n case ActionOutboxEntityType.Purchase:\n return getPurchaseOrderRelativeUrl(entityId);\n\n case ActionOutboxEntityType.SellerSupportCase:\n return null;\n\n case ActionOutboxEntityType.Document:\n return null;\n }\n }, [entityType, entityId]);\n\n const getNotificationTypeContent = useCallback(\n (notificationType: NotificationType) => {\n const parsedContent = NOTIFICATION_TYPE_TO_CID[notificationType];\n return isContentId(parsedContent) ? (\n \n ) : (\n \n )\n }\n />\n );\n },\n [marketplace]\n );\n\n return (\n \n {entityTypeContent} #{entityId}\n \n }\n entityType={entityTypeContent}\n seating={\n \n }\n onGoToEntity={() => {\n onDismiss();\n if (url) {\n navigate(url);\n }\n }}\n onDismiss={onDismiss}\n >\n \n \n );\n}\n","import { useMemo } from 'react';\nimport { Link } from 'react-router-dom';\nimport * as EmptySectionContent from 'src/components/common/EmptySectionContent';\nimport { PageSection } from 'src/components/common/PageSection';\nimport { ConnectedNotificationDisplay } from 'src/components/ConnectedNotificationDisplay';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useNotificationsContext } from 'src/contexts/NotificationsContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { Card } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport IconAlarmAdd from '~icons/pos/alarmAdd';\n\nimport * as styles from './NotificationsSection.css';\n\nexport function NotificationsSection() {\n const { notifications, notificationsIsInitialLoading, dismissNotification } =\n useNotificationsContext();\n const recentNotifications = useMemo(\n () => notifications.slice(0, 4),\n [notifications]\n );\n\n return (\n \n \n ({notifications.length})\n \n }\n >\n \n \n \n {notificationsIsInitialLoading ? (\n \n \n \n ) : recentNotifications.length === 0 ? (\n }\n >\n \n \n ) : (\n
    \n {recentNotifications.map((notification) => (\n \n {\n dismissNotification(notification.notificationId);\n }}\n />\n
    \n ))}\n \n )}\n
    \n
    \n );\n}\n","import { PaginationState, TableOptions } from '@tanstack/react-table';\nimport { useMemo, useState } from 'react';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { useSeatingColumnSorting } from 'src/tables/common/hooks/useSeatingColumnSorting';\nimport { SALE_TABLE_COLUMNS_CONFIG } from 'src/tables/SalesTable/configs/SaleTableColumnsConfig';\nimport { SALE_TABLE_FLATTENED_COLUMNS_CONFIG } from 'src/tables/SalesTable/configs/SaleTableFlattenedColumnsConfig';\nimport { SaleWithEvent } from 'src/tables/SalesTable/SalesTable.type';\nimport { Table } from 'src/tables/Table';\nimport { RowWrapper } from 'src/tables/Table/Table.types';\nimport { defaultSalesColumnsConfig } from 'src/utils/columns/columnUtils';\nimport {\n SalesTableColumnId,\n SalesTableFlattenedColumnId,\n} from 'src/utils/columns/sales/salesColumnUtils.types';\nimport { getEventPerformerVenue } from 'src/utils/eventWithDataUtils';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport { Feature, Sale } from 'src/WebApiController';\n\nconst PAGE_SIZE = 10;\n\nconst defaultRecentSalesColumns = [\n SalesTableFlattenedColumnId.Event,\n SalesTableFlattenedColumnId.EventDate,\n SalesTableFlattenedColumnId.Venue,\n SalesTableFlattenedColumnId.Location,\n];\n\nexport const RecentSalesTable = ({\n data,\n onRowWrapper,\n}: {\n data: Sale[];\n onRowWrapper: RowWrapper;\n}) => {\n const { data: catalog } = useCatalogDataContext();\n const [pagination, setPagination] = useState({\n pageIndex: 0,\n pageSize: PAGE_SIZE,\n });\n const hasTablePinActionColumnFeature = useUserHasFeature(\n Feature.TablePinActionColumn\n );\n\n const seatingColumnSorting = useSeatingColumnSorting(\n SalesTableColumnId.Seating,\n SectionType.Sales\n );\n\n const options: Partial> = useMemo(\n () => ({\n data: data\n .map((sale) => {\n const { event, performer, venue } = getEventPerformerVenue(\n sale.viagVirtualId,\n catalog\n );\n if (event) {\n return { event: event.event, sale, performer, venue };\n }\n\n return null;\n })\n ?.filter((s) => s != null)\n ?.map((s) => s!),\n columns: Array.from(\n new Set([...defaultRecentSalesColumns, ...defaultSalesColumnsConfig])\n ).map(\n (id) =>\n SALE_TABLE_COLUMNS_CONFIG[id as SalesTableColumnId] ||\n SALE_TABLE_FLATTENED_COLUMNS_CONFIG[id as SalesTableFlattenedColumnId]\n ),\n state: {\n pagination,\n columnPinning: {\n right: hasTablePinActionColumnFeature\n ? [SalesTableColumnId.Actions]\n : undefined,\n },\n },\n onPaginationChange: setPagination,\n sortingFns: { ...seatingColumnSorting },\n }),\n [\n data,\n hasTablePinActionColumnFeature,\n pagination,\n catalog,\n seatingColumnSorting,\n ]\n );\n\n return (\n
    \n );\n};\n","import { useQuery } from '@tanstack/react-query';\nimport clsx from 'clsx';\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { Link } from 'react-router-dom';\nimport { PageSection } from 'src/components/common/PageSection';\nimport { ActivePosEntityProvider } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { CatalogDataContextProvider } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { DialogProvider } from 'src/contexts/DialogContext/DialogContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { FilterQueryContextProvider } from 'src/contexts/FilterQueryContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { ToolbarButton } from 'src/core/POS/ToolbarButton';\nimport { Card } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { SaleWithEvent } from 'src/tables/SalesTable/SalesTable.type';\nimport { RowWrapper } from 'src/tables/Table/Table.types';\nimport { DATA_REFRESH_RATE_IN_MILLIS_SHORT } from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getLastNDaysSaleQuery } from 'src/utils/eventQueryUtils';\nimport { transformData } from 'src/utils/eventWithDataUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n CatalogClient,\n Feature,\n Sale,\n SaleClient,\n SaleDetails,\n SaleQuery,\n UserSetting,\n} from 'src/WebApiController';\n\nimport * as styles from './RecentSalesSection.css';\nimport { RecentSalesTable } from './RecentSalesTable';\n\nconst PREVIOUS_DAYS_TO_PULL = 7;\nconst NEW_ROW_ACTIVE_DURATION = 5_000;\n\nexport const RecentSalesSection = () => {\n const salesFilterQuery = getLastNDaysSaleQuery(PREVIOUS_DAYS_TO_PULL);\n const { activeAccountWebClientConfig } = useAppContext();\n const previousValues = useRef>();\n const [newRows, setNewRows] = useState([]);\n const { trackError } = useErrorBoundaryContext();\n const hasUnprocessedOrdersHoldingPenFeature = useUserHasFeature(\n Feature.AutomatiqUnprocessedOrdersHoldingPen\n );\n const [activeTab, setActiveTab] = useState<\n 'recentSales' | 'unableToProcessSales'\n >('recentSales');\n\n const handleTabChange = (tab: 'recentSales' | 'unableToProcessSales') => {\n if (hasUnprocessedOrdersHoldingPenFeature) {\n setActiveTab(tab);\n }\n };\n\n const { data, isLoading, refetch } = useQuery({\n queryKey: [\n activeTab === 'recentSales'\n ? 'SaleClient.getSalesForEvents.recent'\n : 'SaleClient.getUnableToProcessSales',\n activeAccountWebClientConfig.activeAccountId,\n ],\n queryFn: async () => {\n if (activeAccountWebClientConfig.activeAccountId == null) {\n return null;\n }\n\n if (activeTab === 'recentSales') {\n return tryInvokeApi(\n async () => {\n const client = new SaleClient(activeAccountWebClientConfig);\n return await client.getSalesForEvents(\n salesFilterQuery,\n false,\n false\n );\n },\n (error: ErrorTypes) => {\n trackError('SaleClient.getSalesForEvents.recent', error);\n }\n );\n }\n\n return tryInvokeApi(\n async () => {\n const client = new SaleClient(activeAccountWebClientConfig);\n return await client.getUnableToProcessSales();\n },\n (error: ErrorTypes) => {\n trackError('SaleClient.getUnableToProcessSales', error);\n }\n );\n },\n enabled: activeAccountWebClientConfig.activeAccountId != null,\n refetchOnWindowFocus: false,\n networkMode: 'offlineFirst',\n refetchInterval: DATA_REFRESH_RATE_IN_MILLIS_SHORT,\n });\n\n const flattenedData = useMemo(() => {\n if (!data) return [];\n return Object.values(data)\n .flat()\n .filter(\n (s) =>\n (activeTab === 'recentSales' && !s.isUnprocessedOrdFromPro) ||\n (hasUnprocessedOrdersHoldingPenFeature &&\n activeTab === 'unableToProcessSales' &&\n s.isUnprocessedOrdFromPro)\n )\n .toSorted(\n (a, b) =>\n new Date(b.saleDate).valueOf() - new Date(a.saleDate).valueOf()\n );\n }, [activeTab, data, hasUnprocessedOrdersHoldingPenFeature]);\n\n useEffect(() => {\n if (!data) return;\n const isInitial = !previousValues.current;\n const prev = previousValues.current ?? new Set();\n const newValues = flattenedData\n .filter((sale) => !prev.has(sale.id))\n .map((sale) => sale.id);\n newValues.forEach((id) => prev.add(id));\n if (newValues.length && !isInitial) {\n setNewRows(newValues);\n setTimeout(() => {\n setNewRows([]);\n }, NEW_ROW_ACTIVE_DURATION);\n }\n previousValues.current = prev;\n }, [data, flattenedData]);\n\n const getCatalogData = async (\n client: CatalogClient,\n filterQuery: SaleQuery\n ) => {\n return await client.getCatalogForSales(filterQuery, false);\n };\n\n const getCatalogDataExpanded = async () => ({});\n\n const getActivePosEntity = useCallback(\n async (saleId: number) => {\n const saleDetail = await new SaleClient(\n activeAccountWebClientConfig\n ).getSaleBySaleId(saleId);\n\n if (!saleDetail) return {};\n return {\n posEntityId: saleDetail.id,\n posEntity: saleDetail,\n posEntityDisplayId: saleDetail.idOnMkp,\n };\n },\n [activeAccountWebClientConfig]\n );\n\n const onRowWrapper: RowWrapper = (\n rowData,\n tableRow\n ) => {\n const isNewRow = !!rowData?.sale.id && newRows.includes(rowData?.sale.id);\n return (\n
    \n {tableRow}\n
    \n );\n };\n\n return (\n \n \n \n \n }\n >\n {hasUnprocessedOrdersHoldingPenFeature ? (\n
    \n handleTabChange('recentSales')}\n >\n \n \n handleTabChange('unableToProcessSales')}\n >\n \n \n
    \n ) : (\n \n )}\n \n\n \n \n initialQuery={salesFilterQuery}\n emptyQuery={salesFilterQuery}\n viewModeSettingId={UserSetting.SalePageViewMode}\n >\n \n entityType={ActionOutboxEntityType.Sale}\n queryKey=\"getCatalogForSales\"\n getCatalogData={getCatalogData}\n getCatalogDataExpanded={getCatalogDataExpanded}\n transformEventData={transformData}\n >\n \n entityType={ActionOutboxEntityType.Sale}\n getActivePosEntity={getActivePosEntity}\n onSetActiveItemCompleteCallback={() => refetch()}\n >\n \n {!isLoading ? (\n \n ) : (\n \n )}\n \n \n \n \n \n
    \n );\n};\n","import { useQuery } from '@tanstack/react-query';\nimport clsx from 'clsx';\nimport { useEffect } from 'react';\nimport { SummaryTile } from 'src/components/common/SummaryTile';\nimport { MetricsDisplay } from 'src/components/Metrics';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { Stack } from 'src/core/ui';\nimport { ReleaseNoteDisplayDialog } from 'src/dialogs/ReleaseNoteDisplayDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useReleaseNotes } from 'src/hooks/useReleaseNotes';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { LayoutContent } from 'src/navigations/LayoutContent';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n getInventoryListingMetrics,\n getInventoryListingMetricsDisplayStrings,\n} from 'src/utils/ticketMetricUtils';\nimport {\n ALL_INVENTORY_VIEW_PERMISSIONS,\n ALL_SALES_VIEW_PERMISSIONS,\n hasAccessToRoute,\n} from 'src/utils/userUtils';\nimport { CatalogClient, Feature } from 'src/WebApiController';\n\nimport { MainRoute } from '../MainRoute';\nimport { ActivitySection } from './ActivitySection';\nimport * as styles from './Home.css';\nimport { MetricsSection as MetricTilesSection } from './MetricsSection';\nimport { NotificationsSection } from './NotificationsSection';\nimport { RecentSalesSection } from './RecentSalesSection/RecentSalesSection';\n\nexport function Home() {\n const { trackError } = useErrorBoundaryContext();\n const { loginContext, appContext, activeAccountWebClientConfig } =\n useAppContext();\n const hasViewSalesPermission = useUserHasAnyOfPermissions(\n ...ALL_SALES_VIEW_PERMISSIONS\n );\n const hasViewListingsPermission = useUserHasAnyOfPermissions(\n ...ALL_INVENTORY_VIEW_PERMISSIONS\n );\n const hasNotificationsAccess = hasAccessToRoute(\n loginContext?.user,\n appContext?.features,\n MainRoute.Notifications\n );\n\n const {\n releaseNoteInfos: releaseNotesUnread,\n setReleaseNoteIdsRead,\n releaseNoteIdsRead,\n } = useReleaseNotes({ getUnreadOnly: true });\n const releaseNotesDialog = useBasicDialog();\n const metricsQuery = useQuery({\n queryKey: ['catalogHomeMetrics', activeAccountWebClientConfig],\n queryFn: async () => {\n if (activeAccountWebClientConfig.activeAccountId == null) {\n return null;\n }\n const metrics = await new CatalogClient(\n activeAccountWebClientConfig\n ).getCatalogHomeMetrics();\n return metrics;\n },\n\n enabled: activeAccountWebClientConfig.activeAccountId != null,\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError(\n `${CatalogClient.name}.${CatalogClient.prototype.getCatalogHomeMetrics.name}`,\n error\n );\n },\n },\n });\n const formattedMetrics:\n | ReturnType\n | undefined =\n metricsQuery.isLoading || !metricsQuery.data\n ? undefined\n : getInventoryListingMetricsDisplayStrings(\n metricsQuery.data,\n loginContext?.user?.activeAccount?.currencyCode\n );\n const { mainMetrics, subMetrics } = getInventoryListingMetrics(\n metricsQuery.data,\n loginContext?.user?.activeAccount?.currencyCode\n );\n\n const hasHomePageActivityLogFeature = useUserHasFeature(\n Feature.HomePageActivityLog\n );\n\n const routeTitle = useContent(ContentId.Home);\n\n useEffect(() => {\n if (releaseNotesUnread && releaseNotesUnread.length > 0) {\n if (!releaseNotesDialog.dialogProps.isOpen) {\n releaseNotesDialog.launchDialog();\n }\n } else {\n if (releaseNotesDialog.dialogProps.isOpen) {\n releaseNotesDialog.closeDialog();\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [releaseNotesUnread]);\n\n return (\n \n \n }\n showLoadingPlaceholders={metricsQuery.isLoading}\n >\n {formattedMetrics?.formattedTotalCost}\n \n \n )\n }\n >\n \n {hasViewListingsPermission && }\n {hasViewSalesPermission && }\n\n \n {hasHomePageActivityLogFeature && (\n
    \n \n
    \n )}\n {hasNotificationsAccess && (\n
    \n \n
    \n )}\n
    \n \n {Boolean(releaseNotesUnread?.length) && (\n }\n bodyText={\n \n }\n onReleaseNotesRead={async () => {\n await setReleaseNoteIdsRead([\n ...(releaseNoteIdsRead ?? []),\n ...(releaseNotesUnread?.map((rn) => rn.id) ?? []),\n ]);\n releaseNotesDialog.closeDialog();\n }}\n />\n )}\n \n );\n}\n","import {\n createContext,\n ReactNode,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport { useCatalogMultiSelectionContext } from 'src/contexts/CatalogMultiSelectionContext';\nimport {\n EventSessionRole,\n useEventHubContext,\n} from 'src/contexts/EventHubContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { SectionInfo } from 'src/WebApiController';\n\ntype StubHubListingsManualPricingContextType = {\n onQuantityFilterChanged: (val: number) => void;\n onSectionZoneFilterChanged: (\n sections: SectionInfo[],\n flipOnSameSections?: boolean\n ) => void;\n onSectionFilterChanged: (section: SectionInfo) => void;\n onRowFiltersChanged: (\n rowIdFiltersNew: number[],\n sectionRowIdFiltersNew: { [key: string]: string }\n ) => void;\n resetFilters: () => void;\n quantityFilter: number;\n selectedSections: SectionInfo[];\n sectionIdFilters: number[];\n rowIdFilters: number[];\n sectionRowIdFilters: {\n [key: string]: string;\n };\n hasActiveFilters: boolean;\n};\n\n/**\n * Context for managing the state of the manual pricing filters. Provides components with callbacks to invoke\n * setState functions and also returns the values of the state functions\n *\n * @context\n * @description Provides a context for managing the state of the manual pricing filters\n *\n * @param onQuantityFilterChanged - Callback function to update the quantity filter when it changes.\n * @param onSectionZoneFilterChanged - Callback function to update the section zone filter when it changes.\n * @param onSectionFilterChanged - Callback function to update the section filter when it changes.\n * @param onRowFiltersChanged - Callback function to update the row filters when they change.\n * @param resetFilters - Function to reset all filters to their initial state.\n * @param quantityFilter - The current value of the quantity filter.\n * @param selectedSections - An array of SectionInfo objects representing the currently selected sections.\n * @param sectionIdFilters - An array of numbers representing the section ID filters.\n * @param rowIdFilters - An array of numbers representing the row ID filters.\n * @param sectionRowIdFilters - An object where the keys are section IDs and the values are strings representing the max row ID filters for each section.\n * We need to keep track of this mapping because it allows the UI to render the correct max row filters for each section.\n * The sectionIdFilters and rowIdFilters are alone suffient to determine the final cardinality of listings we want to show,\n * and this mapping object should only be used by the section pills to show the mapping of section to max row filter.\n *\n */\nconst StubHubListingsManualPricingContext =\n createContext({\n onQuantityFilterChanged: () => {},\n onSectionZoneFilterChanged: () => {},\n onSectionFilterChanged: () => {},\n onRowFiltersChanged: () => {},\n resetFilters: () => {},\n quantityFilter: 2,\n selectedSections: [],\n sectionIdFilters: [],\n rowIdFilters: [],\n sectionRowIdFilters: {} as {\n [key: string]: string;\n },\n hasActiveFilters: false,\n });\n\nexport const useStubHubListingManualPricingContext = () =>\n useContext(StubHubListingsManualPricingContext);\n\ntype StubHubListingManualPricingContextProviderProps = {\n children: ReactNode;\n groupId?: string;\n};\n\nexport const StubHubListingManualPricingContextProvider = ({\n children,\n groupId,\n}: StubHubListingManualPricingContextProviderProps) => {\n const [selectedSections, setSelectedSections] = useState([]);\n const [quantityFilter, setQuantityFilter] = useState(2);\n const [rowIdFilters, setRowIdFilters] = useState([]);\n const [sectionRowIdFilters, setSectionRowIdFilters] = useState<{\n [key: string]: string;\n }>({});\n\n const { flattenedIds } = useCatalogMultiSelectionContext();\n\n const { setGroupItems } = useMultiSelectionContext();\n const { venueMapInfo } = useEventMapContext();\n\n const { sessionRole, enabled, selectedVenueMapSections, onSectionsSelected } =\n useEventHubContext();\n\n const clearGroupItems = useCallback(() => {\n if (groupId && flattenedIds) {\n setGroupItems(\n groupId,\n flattenedIds.reduce(\n (acc, id) => {\n acc[id] = false;\n return acc;\n },\n {} as Record\n )\n );\n }\n }, [flattenedIds, groupId, setGroupItems]);\n\n useEffect(() => {\n setSelectedSections([]);\n setRowIdFilters([]);\n setSectionRowIdFilters({});\n setQuantityFilter(2);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [groupId]);\n\n const onSectionZoneFilterChanged = useCallback(\n (sections: SectionInfo[], flipOnSameSections = true) => {\n setSelectedSections((prevSections) => {\n const sectionMap = new Map(\n prevSections.map((section) => [section.id, section])\n );\n\n // If every section passed in already exists in prevSections then we should remove them entirely\n const completelyOverlap = sections.every((section) =>\n sectionMap.has(section.id)\n );\n\n if (completelyOverlap && flipOnSameSections) {\n sections.forEach((section) => sectionMap.delete(section.id));\n\n // We need to remove the associated rows as well\n const rowIdsToRemove = sections\n .map((section) => section.rows.map((r) => r.id))\n .flat();\n\n setRowIdFilters((prevFilters) =>\n prevFilters.filter((id) => !rowIdsToRemove.includes(id))\n );\n\n // Update sectionRowIdFilters to remove the sections that have been removed\n setSectionRowIdFilters((prevFilters) => {\n const newFilters = { ...prevFilters };\n sections.forEach((section) => {\n if (newFilters[section.id]) {\n delete newFilters[section.id];\n }\n });\n\n return newFilters;\n });\n } else {\n // Do an upsert of the sections instead\n sections.forEach((section) => {\n if (sectionMap.has(section.id)) {\n sectionMap.set(section.id, {\n ...sectionMap.get(section.id),\n ...section,\n });\n } else {\n sectionMap.set(section.id, section);\n }\n });\n }\n\n if (enabled && sessionRole === EventSessionRole.SidePanel) {\n const sectionIds = Array.from(sectionMap.values()).map(\n ({ id }) => id\n );\n onSectionsSelected(sectionIds);\n }\n\n return Array.from(sectionMap.values());\n });\n\n clearGroupItems();\n },\n [clearGroupItems, enabled, onSectionsSelected, sessionRole]\n );\n\n const onSectionFilterChanged = useCallback(\n (section: SectionInfo) => {\n setSelectedSections((prevSections) => {\n const idx = prevSections.findIndex(({ id }) => id === section.id);\n\n if (idx === -1) {\n const updated = [section, ...prevSections];\n\n if (enabled && sessionRole === EventSessionRole.SidePanel) {\n const sectionIds = updated.map(({ id }) => id);\n onSectionsSelected(sectionIds);\n }\n return [section, ...prevSections];\n } else {\n const updatedSections = [\n ...prevSections.slice(0, idx),\n ...prevSections.slice(idx + 1),\n ];\n\n // Remove all the associated row ids for this section\n const rowIdsToRemove = section.rows.map((r) => r.id);\n setRowIdFilters((prevFilters) =>\n prevFilters.filter((id) => !rowIdsToRemove.includes(id))\n );\n\n setSectionRowIdFilters((prevFilters) => {\n const newFilters = { ...prevFilters };\n delete newFilters[section.id];\n return newFilters;\n });\n\n if (enabled && sessionRole === EventSessionRole.SidePanel) {\n const sectionIds = updatedSections.map(({ id }) => id);\n onSectionsSelected(sectionIds);\n }\n\n return updatedSections;\n }\n });\n clearGroupItems();\n },\n [clearGroupItems, enabled, onSectionsSelected, sessionRole]\n );\n\n useEffect(() => {\n if (enabled && sessionRole === EventSessionRole.Main) {\n const sections =\n venueMapInfo?.sections.filter(({ id }) =>\n selectedVenueMapSections.includes(id)\n ) ?? [];\n\n setSelectedSections(sections);\n }\n }, [\n enabled,\n onSectionZoneFilterChanged,\n JSON.stringify(selectedVenueMapSections),\n sessionRole,\n venueMapInfo?.sections,\n ]);\n\n const onRowFiltersChanged = useCallback(\n (\n rowIdFiltersNew: number[],\n sectionRowIdFiltersNew: { [key: string]: string }\n ) => {\n setRowIdFilters(rowIdFiltersNew);\n setSectionRowIdFilters(sectionRowIdFiltersNew);\n clearGroupItems();\n },\n [clearGroupItems]\n );\n\n const onQuantityFilterChanged = useCallback(\n (quantityFilterNew: number) => {\n setQuantityFilter(quantityFilterNew);\n clearGroupItems();\n },\n [clearGroupItems]\n );\n\n const resetFilters = () => {\n setSelectedSections([]);\n setRowIdFilters([]);\n setSectionRowIdFilters({});\n setQuantityFilter(2);\n };\n\n const hasActiveFilters =\n selectedSections.length > 0 ||\n rowIdFilters.length > 0 ||\n quantityFilter !== 2 ||\n Object.keys(sectionRowIdFilters).length > 0;\n\n const sectionIdFilters = useMemo(\n () => selectedSections.map((section) => section.id),\n [selectedSections]\n );\n\n return (\n \n {children}\n \n );\n};\n","import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\nimport { isEmpty, sortBy } from 'lodash-es';\nimport { useCallback } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { DATA_REFRESH_RATE_IN_MILLIS_SHORT } from 'src/utils/constants/constants';\nimport { EventConfigClient } from 'src/WebApiController';\n\nexport const useEventLastReviewedDateTime = (viagVirtualIds: string[]) => {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const { trackError, showErrorDialog } = useErrorBoundaryContext();\n\n const queryClient = useQueryClient();\n const queryKey = [\n 'EventConfigClient.getLastReviewedDateTimeForEvent',\n sortBy(viagVirtualIds).join(','),\n ];\n\n const shouldQuery = Boolean(\n activeAccountWebClientConfig.activeAccountId && !isEmpty(viagVirtualIds)\n );\n const eventLastReviewedQuery = useQuery({\n queryKey,\n queryFn: async () => {\n if (!shouldQuery) {\n return null;\n }\n\n const response = await new EventConfigClient(\n activeAccountWebClientConfig\n ).getLastReviewedDateTimeForEvents(viagVirtualIds);\n\n return response;\n },\n\n enabled: shouldQuery,\n staleTime: Infinity,\n refetchOnWindowFocus: false,\n refetchInterval: DATA_REFRESH_RATE_IN_MILLIS_SHORT,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError('EventConfigClient.getLastReviewedDateTimeForEvent', error, {\n viagVirtualIds,\n });\n },\n },\n });\n\n const mutation = useMutation({\n mutationFn: async ({\n lastReviewedDateTime,\n viagVirtualId,\n }: {\n lastReviewedDateTime: string;\n viagVirtualId: string;\n }) => {\n return await new EventConfigClient(\n activeAccountWebClientConfig\n ).updateLastReviewedDateTimeForEvent(\n viagVirtualId ?? undefined,\n lastReviewedDateTime\n );\n },\n onMutate: ({ viagVirtualId, lastReviewedDateTime }) => {\n queryClient.cancelQueries({ queryKey });\n const prevValue: Record | undefined =\n queryClient.getQueryData(queryKey);\n if (prevValue) {\n prevValue[viagVirtualId] = lastReviewedDateTime;\n queryClient.setQueryData(queryKey, prevValue);\n } else {\n queryClient.setQueryData(queryKey, {\n [viagVirtualId]: lastReviewedDateTime,\n });\n }\n return { prevValue };\n },\n onError: (err: ErrorTypes, { lastReviewedDateTime }, context) => {\n queryClient.setQueryData(queryKey, context?.prevValue);\n showErrorDialog(\n 'EventConfigClient.updateLastReviewedDateTimeForEvent',\n err,\n {\n trackErrorData: { lastReviewedDateTime },\n }\n );\n },\n onSettled: () => {\n queryClient.invalidateQueries();\n },\n });\n\n const onUpdateLastReviewedDateTime = useCallback(\n async (viagVirtualId: string | null) => {\n if (viagVirtualId) {\n await mutation.mutateAsync({\n lastReviewedDateTime: new Date().toISOString(),\n viagVirtualId,\n });\n }\n },\n [mutation]\n );\n\n return {\n eventLastReviewed: eventLastReviewedQuery.data,\n onUpdateLastReviewedDateTime,\n isLoading: eventLastReviewedQuery.isPending || mutation.isPending,\n isCompleted: mutation.isSuccess,\n loadEventLastReviewed: eventLastReviewedQuery.refetch,\n };\n};\n","import { isEmpty } from 'lodash-es';\nimport {\n createContext,\n ReactNode,\n useCallback,\n useContext,\n useEffect,\n useState,\n} from 'react';\nimport { useEventLastReviewedDateTime } from 'src/hooks/api/useEventLastReviewedDateTime';\n\ntype IEventLastReviewedContext = {\n eventLastReviewed: Record;\n isLoading: boolean;\n isCompleted: boolean;\n onUpdateLastReviewedDateTime: (virtualViaId: string) => void;\n onSettingVirtualIds: (virtualViaIds: string[]) => void;\n};\n\nexport const EventLastReviewedContext =\n createContext({\n eventLastReviewed: {},\n isLoading: false,\n isCompleted: false,\n onUpdateLastReviewedDateTime: (_: string) => undefined,\n onSettingVirtualIds: (_: string[]) => undefined,\n });\n\nexport const useEventLastReviewedContext = () =>\n useContext(EventLastReviewedContext);\n\nexport const EventLastReviewedContextProvider = ({\n children,\n}: {\n children: ReactNode;\n}) => {\n const [eventLastReviewed, setEventLastReviewedLookup] = useState<\n Record\n >({});\n const [viagogoEventIds, setViagogoEventIds] = useState([]);\n const {\n eventLastReviewed: queryData,\n isLoading,\n isCompleted,\n onUpdateLastReviewedDateTime,\n } = useEventLastReviewedDateTime(viagogoEventIds);\n\n useEffect(() => {\n if (!isEmpty(queryData)) {\n setEventLastReviewedLookup((prev) => ({ ...prev, ...queryData }));\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [JSON.stringify(queryData)]);\n\n const onSettingVirtualIds = useCallback(\n (virtualViaIds: string[]) => {\n const existingIds = Object.entries(eventLastReviewed)\n .filter(([_, viewedAt]) => !!viewedAt)\n .map(([id, _]) => id);\n const filtered = virtualViaIds.filter((id) => !existingIds.includes(id));\n if (!isEmpty(filtered)) {\n setViagogoEventIds(filtered);\n }\n },\n [eventLastReviewed]\n );\n\n return (\n \n {children}\n \n );\n};\n","import { useCallback, useEffect, useMemo, useState } from 'react';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { CheckIcon, LoadingIcon } from 'src/svgs/Viagogo';\n\nimport * as styles from './LoadingButton.css';\n\nconst FadeAnimationDuration = 500;\nconst GracePeriod = 1_500;\n\ntype LoadingButtonProps = {\n isLoading: boolean;\n isCompleted: boolean;\n title?: string;\n onClick?: () => Promise;\n};\n\nexport const LoadingButton: React.FC = ({\n isLoading,\n isCompleted,\n title,\n onClick,\n}) => {\n const [animationStyle, setAnimationStyle] = useState();\n\n // Grace period to allow fade out\n const clearAnimation = useCallback(() => {\n setTimeout(() => setAnimationStyle(null), FadeAnimationDuration);\n }, []);\n\n useEffect(() => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let timeout: any = null;\n if (isCompleted) {\n setAnimationStyle(styles.checkBoxFadeIn);\n timeout = setTimeout(() => {\n setAnimationStyle(styles.checkBoxFadeOut);\n clearAnimation();\n }, GracePeriod);\n }\n\n return () => timeout && clearTimeout(timeout);\n }, [clearAnimation, isCompleted]);\n\n const icon = useMemo(() => {\n if (isLoading || animationStyle) {\n return ;\n }\n return ;\n }, [animationStyle, isLoading]);\n\n return (\n \n {icon}\n \n );\n};\n","import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\nimport { useCallback } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { DATA_REFRESH_RATE_IN_MILLIS_SHORT } from 'src/utils/constants/constants';\nimport { EventConfigClient, SellerEventNoteResult } from 'src/WebApiController';\n\nexport const useSellerEventNote = (viagogoEventId?: number | null) => {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const { trackError, showErrorDialog } = useErrorBoundaryContext();\n const queryClient = useQueryClient();\n\n const queryKey = [\n 'EventConfigClient.getSellerEventNotesByViagogoEventId',\n viagogoEventId,\n ];\n\n const shouldQuery = Boolean(viagogoEventId);\n\n const notesQuery = useQuery({\n queryKey,\n queryFn: async () => {\n if (!viagogoEventId) {\n return null;\n }\n return await new EventConfigClient(\n activeAccountWebClientConfig\n ).getSellerEventNotesByViagogoEventId(viagogoEventId);\n },\n enabled: shouldQuery,\n staleTime: Infinity,\n refetchOnWindowFocus: false,\n refetchInterval: DATA_REFRESH_RATE_IN_MILLIS_SHORT,\n meta: {\n onError: (error: Error) => {\n trackError(\n 'EventConfigClient.getSellerEventNotesByViagogoEventId',\n error,\n {\n viagogoEventId,\n }\n );\n },\n },\n });\n\n const addNoteMutation = useMutation({\n mutationFn: async (newNote: string) => {\n return await new EventConfigClient(\n activeAccountWebClientConfig\n ).insertSellerEventNotes(viagogoEventId ?? undefined, newNote);\n },\n onError: (error: Error, newNote: string, context: any) => {\n queryClient.setQueryData(queryKey, context?.previousNotes);\n showErrorDialog('EventConfigClient.insertSellerEventNotes', error, {\n trackErrorData: { viagogoEventId, newNote },\n });\n },\n onSuccess: (result: SellerEventNoteResult) => {\n queryClient.setQueryData(\n queryKey,\n (old: SellerEventNoteResult[] = []) => [...old, result]\n );\n },\n onSettled: () => {\n queryClient.invalidateQueries({ queryKey });\n },\n });\n\n const addNote = useCallback(\n async (newNote: string) => {\n if (newNote.trim() === '') {\n return;\n }\n await addNoteMutation.mutateAsync(newNote);\n },\n [addNoteMutation]\n );\n\n return {\n notes: notesQuery.data,\n addNote,\n isLoading: notesQuery.isLoading || addNoteMutation.isPending,\n isSuccess: notesQuery.isSuccess && addNoteMutation.isSuccess,\n };\n};\n","import { IconButton } from 'src/components/Buttons';\nimport { vars } from 'src/core/themes';\nimport { ChevronLeftIcon, ChevronRightIcon } from 'src/svgs/Viagogo';\n\nimport { useCatchUpParams } from '../InventoryEventPage.hooks';\n\nexport function InventoryEventCatchUpPrevButton() {\n const { selectedIndex, numberOfEvents, onPrevClick } = useCatchUpParams();\n\n const prevButtonDisabled =\n selectedIndex == null || numberOfEvents == null || selectedIndex <= 0;\n\n return (\n \n }\n style={{ padding: vars.spacing['lg'] }}\n disabled={prevButtonDisabled}\n onClick={onPrevClick}\n />\n );\n}\n\nexport function InventoryEventCatchUpNextButton() {\n const { selectedIndex, numberOfEvents, onNextClick } = useCatchUpParams();\n\n const nextButtonDisabled =\n selectedIndex == null ||\n numberOfEvents == null ||\n selectedIndex >= numberOfEvents - 1;\n\n return (\n \n }\n style={{ padding: vars.spacing['lg'] }}\n disabled={nextButtonDisabled}\n onClick={onNextClick}\n />\n );\n}\n","import clsx from 'clsx';\nimport { useMemo } from 'react';\nimport { ConnectedEventInfo } from 'src/components/Events/ConnectedEventInfo';\nimport { MetricsDisplay } from 'src/components/Metrics';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogMetricsContext } from 'src/contexts/CatalogMetricsContext';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { useGetEventFullInfo } from 'src/hooks/useGetEventFullInfo';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { TagIcon } from 'src/svgs';\nimport { CheckIcon } from 'src/svgs/Viagogo';\nimport {\n getInventoryListingMetrics,\n getInventoryListingMetricsV2,\n} from 'src/utils/ticketMetricUtils';\nimport { Feature, ListingMetrics } from 'src/WebApiController';\n\nimport * as styles from './InventoryEventCatchUp.css';\nimport { InventoryEventCatchUpCardProps } from './InventoryEventCatchUpCard.types';\n\nexport function InventoryEventCatchUpCard({\n event,\n showYear,\n onClick,\n isActive,\n isReviewed,\n}: InventoryEventCatchUpCardProps) {\n const { venue, performer } = useGetEventFullInfo(event);\n const { eventMetrics } = useCatalogMetricsContext();\n const { loginContext } = useAppContext();\n const hasInventoryTileMetricV2Feature = useUserHasFeature(\n Feature.InventoryTileMetricV2\n );\n const getInventoryListingMetricsFn = hasInventoryTileMetricV2Feature\n ? getInventoryListingMetricsV2\n : getInventoryListingMetrics;\n\n const metrics = useMemo(\n () =>\n getInventoryListingMetricsFn(\n eventMetrics?.[event.viagVirtualId],\n loginContext?.user?.activeAccount?.currencyCode\n ),\n [\n getInventoryListingMetricsFn,\n eventMetrics,\n event,\n loginContext?.user?.activeAccount?.currencyCode,\n ]\n );\n\n return (\n \n \n
    \n {metrics && (\n \n {!hasInventoryTileMetricV2Feature && (\n \n )}\n {metrics.mainMetrics}\n
    \n }\n />\n )}\n \n
    \n {isReviewed && (\n \n )}\n
    \n
    \n \n \n );\n}\n","import { ConnectedEventInfo } from 'src/components/Events/ConnectedEventInfo';\nimport { PosDropdown, PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { vars } from 'src/core/themes';\nimport { useGetEventFullInfo } from 'src/hooks/useGetEventFullInfo';\nimport { IconsFill, MoreIcon } from 'src/svgs/Viagogo';\n\nimport { InventoryEventCatchUpCardProps } from './InventoryEventCatchUpCard.types';\n\nexport function InventoryEventCatchUpDropdown({\n cardProps,\n}: {\n cardProps: InventoryEventCatchUpCardProps[];\n}) {\n return (\n \n \n \n }\n align=\"end\"\n >\n {cardProps.map((props, i) => (\n \n ))}\n \n );\n}\n\nfunction InventoryEvehtCatchUpDrodownItem({\n event,\n isActive,\n onClick,\n}: InventoryEventCatchUpCardProps) {\n const { venue, performer } = useGetEventFullInfo(event);\n\n return (\n {\n e.preventDefault();\n e.stopPropagation();\n onClick?.();\n }}\n style={{\n backgroundColor: isActive ? vars.color.backgroundHighlight : '',\n }}\n >\n \n \n );\n}\n","import { useEffect, useMemo } from 'react';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { useEventLastReviewedContext } from 'src/contexts/SellerEventLastReviewContext/SellerEventLastReviewContext';\nimport { Stack } from 'src/core/ui';\nimport { useOverflowX } from 'src/hooks/useOverflowX';\nimport {\n ACTIVE_EVENT_IDS_2_QUERY_PARAM,\n ACTIVE_EVENT_IDS_QUERY_PARAM,\n POS_EVENT_IDS_SEPARATOR,\n} from 'src/navigations/Routes/InventoryEvent/InventoryEvent.constants';\n\nimport { useCatchUpParams } from '../InventoryEventPage.hooks';\nimport * as styles from './InventoryEventCatchUp.css';\nimport {\n InventoryEventCatchUpNextButton,\n InventoryEventCatchUpPrevButton,\n} from './InventoryEventCatchUpBarButtons';\nimport { InventoryEventCatchUpCard } from './InventoryEventCatchUpCard';\nimport { InventoryEventCatchUpCardProps } from './InventoryEventCatchUpCard.types';\nimport { InventoryEventCatchUpDropdown } from './InventoryEventCatchUpDropdown';\n\nexport function InventoryEventCatchUpBar() {\n const { eventsTransformed } = useCatalogDataContext();\n\n const { ref, isOverflowX } = useOverflowX();\n\n const {\n viagVirtualIdsList,\n posEventIdsList,\n activeEventIds,\n activeViagVirtualId,\n setSearchParams,\n numberOfEvents,\n } = useCatchUpParams();\n\n const { eventLastReviewed, onSettingVirtualIds } =\n useEventLastReviewedContext();\n\n useEffect(() => {\n onSettingVirtualIds(viagVirtualIdsList ?? []);\n }, [onSettingVirtualIds, viagVirtualIdsList]);\n\n const selectedIndex = useMemo(() => {\n if (activeEventIds && posEventIdsList) {\n const activePosEventIds = activeEventIds.split(POS_EVENT_IDS_SEPARATOR);\n return posEventIdsList.findIndex((posEventIds) =>\n activePosEventIds.some((posEventId) => posEventIds.includes(posEventId))\n );\n } else if (activeViagVirtualId && viagVirtualIdsList) {\n return viagVirtualIdsList.findIndex(\n (viagId) => activeViagVirtualId === viagId\n );\n }\n }, [\n activeEventIds,\n activeViagVirtualId,\n posEventIdsList,\n viagVirtualIdsList,\n ]);\n\n const cardPropsOld = useMemo(() => {\n return posEventIdsList?.map((posEventIds, i) => {\n const accordionItemProps = eventsTransformed?.find((e) =>\n e.event.posIds.some((id) => posEventIds.includes(id.toLowerCase()))\n );\n\n return {\n event: accordionItemProps?.event ?? [],\n onClick: () => {\n setSearchParams((prev) => {\n prev.set(\n ACTIVE_EVENT_IDS_QUERY_PARAM,\n accordionItemProps?.event.posIds.join(POS_EVENT_IDS_SEPARATOR) ??\n ''\n );\n return prev;\n });\n },\n isActive: i === selectedIndex,\n };\n }) as InventoryEventCatchUpCardProps[];\n }, [eventsTransformed, posEventIdsList, selectedIndex, setSearchParams]);\n\n const cardPropsNew = useMemo(() => {\n return viagVirtualIdsList?.map((viagVirtIds, i) => {\n const accordionItemProps = eventsTransformed?.find((e) =>\n viagVirtIds.includes(e.event.viagVirtualId.toLowerCase())\n );\n\n return {\n event: accordionItemProps?.event ?? [],\n onClick: () => {\n setSearchParams((prev) => {\n prev.set(\n ACTIVE_EVENT_IDS_2_QUERY_PARAM,\n accordionItemProps?.event.viagVirtualId ?? ''\n );\n return prev;\n });\n },\n isActive: i === selectedIndex,\n isReviewed: eventLastReviewed?.[viagVirtIds] != null,\n };\n }) as InventoryEventCatchUpCardProps[];\n }, [\n eventLastReviewed,\n eventsTransformed,\n selectedIndex,\n setSearchParams,\n viagVirtualIdsList,\n ]);\n\n useEffect(() => {\n if (ref.current) {\n const childElements = ref.current.children;\n if (selectedIndex != null && childElements[selectedIndex]) {\n childElements[selectedIndex].scrollIntoView({\n behavior: 'smooth',\n block: 'nearest',\n inline: 'center',\n });\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [selectedIndex]);\n\n const cardProps = cardPropsNew ?? cardPropsOld;\n if (!cardProps) return;\n\n return (\n \n \n \n\n \n {cardProps.map((props, i) => (\n \n ))}\n \n\n \n {isOverflowX && }\n \n\n
    \n {selectedIndex != null && numberOfEvents && (\n {`${selectedIndex + 1} / ${numberOfEvents}`}\n )}\n
    \n \n );\n}\n","import { useQuery } from '@tanstack/react-query';\nimport { useCallback, useMemo, useState } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { DATA_REFRESH_RATE_IN_MILLIS_SHORT } from 'src/utils/constants/constants';\nimport {\n EventSupplyMetricsTimePeriod,\n EventWebsiteMetricsTimePeriod,\n InventoryEventDashboardClient,\n InventoryMetricsQueryId,\n SellerEventDashboardMetricsTimePeriod,\n} from 'src/WebApiController';\n\nexport const useEventSupplyMetrics = (\n posEventId: string | null,\n viagogoEventId: number | null,\n isOnSaleEvent?: boolean,\n disabled?: boolean\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n\n const [timePeriod, setTimePeriod] = useState(\n EventSupplyMetricsTimePeriod.LastSevenDays\n );\n\n const queryKey = useMemo(\n () => [\n 'InventoryEventDashboardClient.getEventSupplyMetrics',\n posEventId,\n viagogoEventId,\n isOnSaleEvent,\n timePeriod,\n ],\n [posEventId, viagogoEventId, isOnSaleEvent, timePeriod]\n );\n\n const shouldQuery =\n !disabled &&\n !!activeAccountWebClientConfig.activeAccountId &&\n Boolean(!!posEventId || (isOnSaleEvent && !!viagogoEventId));\n const supplyMetricsQuery = useQuery({\n queryKey,\n queryFn: async () => {\n if (!shouldQuery) return null;\n\n const queryId: InventoryMetricsQueryId = {\n posEventId: posEventId,\n viagogoEventId: isOnSaleEvent ? viagogoEventId : null,\n };\n const supplyMetrics = await new InventoryEventDashboardClient(\n activeAccountWebClientConfig\n ).getEventSupplyMetrics(queryId, timePeriod);\n\n return supplyMetrics;\n },\n\n enabled: shouldQuery,\n staleTime: Infinity,\n refetchOnWindowFocus: false,\n refetchInterval: DATA_REFRESH_RATE_IN_MILLIS_SHORT,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError(\n 'InventoryEventDashboardClient.getEventSupplyMetrics',\n error,\n {\n posEventId,\n }\n );\n },\n },\n });\n\n const onUpdateTimePeriod = useCallback(\n (timePeriod: EventSupplyMetricsTimePeriod | null) => {\n setTimePeriod(timePeriod ?? EventSupplyMetricsTimePeriod.LastSevenDays);\n },\n []\n );\n\n return {\n supplyMetrics: supplyMetricsQuery.data,\n isLoading: supplyMetricsQuery.isLoading,\n timePeriod,\n onUpdateTimePeriod,\n };\n};\n\nexport const useSellerEventMetrics = (\n posEventId: string | null,\n viagogoEventId: number | null,\n isOnSaleEvent?: boolean,\n disabled?: boolean\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n\n const [timePeriod, setTimePeriod] =\n useState(\n SellerEventDashboardMetricsTimePeriod.AllTime\n );\n\n const shouldQuery =\n !disabled &&\n !!activeAccountWebClientConfig.activeAccountId &&\n Boolean(!!posEventId || (isOnSaleEvent && !!viagogoEventId));\n\n const queryKey = useMemo(\n () => [\n 'InventoryEventDashboardClient.getSellerEventDashboardMetrics',\n posEventId,\n viagogoEventId,\n isOnSaleEvent,\n timePeriod,\n ],\n [posEventId, viagogoEventId, isOnSaleEvent, timePeriod]\n );\n\n const { isLoading, data: sellerPerformanceMetrics } = useQuery({\n queryKey,\n queryFn: async () => {\n if (!shouldQuery) return null;\n\n const queryId: InventoryMetricsQueryId = {\n posEventId: posEventId,\n viagogoEventId: isOnSaleEvent ? viagogoEventId : null,\n };\n const data = await new InventoryEventDashboardClient(\n activeAccountWebClientConfig\n ).getSellerEventDashboardMetrics(queryId, timePeriod);\n\n return data;\n },\n enabled: shouldQuery,\n staleTime: Infinity,\n refetchOnWindowFocus: false,\n refetchInterval: DATA_REFRESH_RATE_IN_MILLIS_SHORT,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError(\n 'InventoryEventDashboardClient.getSellerEventDashboardMetrics',\n error,\n {\n posEventId,\n }\n );\n },\n },\n });\n\n const onUpdateTimePeriod = useCallback(\n (timePeriod: SellerEventDashboardMetricsTimePeriod | null) => {\n setTimePeriod(\n timePeriod ?? SellerEventDashboardMetricsTimePeriod.AllTime\n );\n },\n []\n );\n\n return {\n sellerPerformanceMetrics: sellerPerformanceMetrics,\n isLoading,\n timePeriod,\n onUpdateTimePeriod,\n };\n};\n\nexport const useCrossSellerEventMetrics = (\n posEventId: string | null,\n viagogoEventId: number | null,\n isOnSaleEvent?: boolean,\n disabled?: boolean\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n\n const shouldQuery =\n !disabled &&\n !!activeAccountWebClientConfig.activeAccountId &&\n Boolean(!!posEventId || (isOnSaleEvent && !!viagogoEventId));\n\n const queryKey = useMemo(\n () => [\n 'InventoryEventDashboardClient.getBuyerEventDashboardMetrics',\n posEventId,\n viagogoEventId,\n isOnSaleEvent,\n ],\n [isOnSaleEvent, posEventId, viagogoEventId]\n );\n\n const { isLoading, data: eventPerformanceMetrics } = useQuery({\n queryKey,\n queryFn: async () => {\n if (!shouldQuery) return null;\n\n const queryId: InventoryMetricsQueryId = {\n posEventId: posEventId,\n viagogoEventId: isOnSaleEvent ? viagogoEventId : null,\n };\n const data = await new InventoryEventDashboardClient(\n activeAccountWebClientConfig\n ).getBuyerEventDashboardMetrics(queryId);\n\n return data;\n },\n enabled: shouldQuery,\n staleTime: Infinity,\n refetchOnWindowFocus: false,\n refetchInterval: DATA_REFRESH_RATE_IN_MILLIS_SHORT,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError(\n 'InventoryEventDashboardClient.getBuyerEventDashboardMetrics',\n error,\n {\n posEventId,\n }\n );\n },\n },\n });\n\n return {\n eventPerformanceMetrics,\n isLoading,\n };\n};\n\nexport const useEventWebsiteMetrics = (\n posEventId: string | null,\n viagogoEventId: number | null,\n isOnSaleEvent?: boolean\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n\n const [timePeriod, setTimePeriod] = useState(\n EventWebsiteMetricsTimePeriod.OneHour\n );\n\n const queryKey = useMemo(\n () => [\n 'InventoryEventDashboardClient.getEventWebsiteMetrics',\n activeAccountWebClientConfig.activeAccountId,\n posEventId,\n viagogoEventId,\n isOnSaleEvent,\n timePeriod,\n ],\n [\n activeAccountWebClientConfig.activeAccountId,\n isOnSaleEvent,\n posEventId,\n timePeriod,\n viagogoEventId,\n ]\n );\n\n const shouldQuery =\n !!activeAccountWebClientConfig.activeAccountId &&\n Boolean(!!posEventId || (isOnSaleEvent && !!viagogoEventId));\n\n const { data: websiteMetrics, isLoading } = useQuery({\n queryKey,\n queryFn: async () => {\n const client = new InventoryEventDashboardClient(\n activeAccountWebClientConfig\n );\n const queryId: InventoryMetricsQueryId = {\n posEventId: posEventId,\n viagogoEventId: isOnSaleEvent ? viagogoEventId : null,\n };\n const data = await client.getEventWebsiteMetrics(queryId, timePeriod);\n\n return data;\n },\n enabled: shouldQuery,\n staleTime: Infinity,\n refetchOnWindowFocus: false,\n refetchInterval: DATA_REFRESH_RATE_IN_MILLIS_SHORT,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError(\n 'InventoryEventDashboardClient.getEventWebsiteMetrics',\n error,\n {\n posEventId,\n }\n );\n },\n },\n });\n\n const onUpdateTimePeriod = useCallback(\n (timePeriod: EventWebsiteMetricsTimePeriod | null) => {\n setTimePeriod(timePeriod ?? EventWebsiteMetricsTimePeriod.OneHour);\n },\n []\n );\n\n return {\n websiteMetrics,\n timePeriod,\n onUpdateTimePeriod,\n isLoading,\n };\n};\n","import { sortBy } from 'lodash-es';\nimport { createContext, PropsWithChildren, useContext, useMemo } from 'react';\nimport { vars } from 'src/core/themes';\nimport {\n useCrossSellerEventMetrics,\n useEventSupplyMetrics,\n useEventWebsiteMetrics,\n useSellerEventMetrics,\n} from 'src/hooks/api/useEventMetrics';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getCurrentLanguage } from 'src/utils/localeUtils';\nimport { getInventorySummaryListingMetricsDisplayStrings } from 'src/utils/ticketMetricUtils';\nimport {\n EventSupplyMetricsTimePeriod,\n EventWebsiteMetricsTimePeriod,\n EventWithData,\n ListingMetrics,\n SellerEventDashboardMetricsTimePeriod,\n} from 'src/WebApiController';\n\nimport { useAppContext } from '../AppContext';\nimport { useCatalogMetricsContext } from '../CatalogMetricsContext';\nimport { useContent } from '../ContentContext';\nimport {\n LineChartSeries,\n SellerEventPerformanceMetricsData,\n SupplyMetrics,\n TimeSeriesEntry,\n WebsiteMetrics,\n} from './EventMetricsContext.types';\n\ntype EventMetricsContextType = {\n supplyMetrics: SupplyMetrics;\n websiteMetrics: WebsiteMetrics;\n performanceMetrics: SellerEventPerformanceMetricsData; // The current seller\n};\n\nconst EventMetricsContext = createContext({\n supplyMetrics: {\n ticketCountSeries: [],\n ticketPricesSeries: [],\n currency: 'USD',\n timePeriod: EventSupplyMetricsTimePeriod.LastSevenDays,\n updateTimePeriod: (_: EventSupplyMetricsTimePeriod | null) => void 0,\n isLoading: false,\n today: '',\n },\n websiteMetrics: {\n metrics: null,\n timePeriod: EventWebsiteMetricsTimePeriod.OneHour,\n updateTimePeriod: (_: EventWebsiteMetricsTimePeriod | null) => void 0,\n isLoading: false,\n },\n performanceMetrics: {\n metrics: {\n marketShares: [],\n ticketPricePercentiles: {},\n },\n timePeriod: SellerEventDashboardMetricsTimePeriod.AllTime,\n updateTimePeriod: (_: SellerEventDashboardMetricsTimePeriod | null) =>\n void 0,\n isLoading: false,\n },\n});\n\nexport const EventMetricsProvider = ({\n children,\n event,\n isOnSaleEvent,\n}: PropsWithChildren & { event: EventWithData; isOnSaleEvent?: boolean }) => {\n const { loginContext } = useAppContext();\n const posId = event.event?.posIds[0];\n const viagId = event.event?.viagId;\n const {\n supplyMetrics,\n isLoading: isLoadingSupply,\n timePeriod: supplyTimePeriod,\n onUpdateTimePeriod: onUpdateSupplyTimePeriod,\n } = useEventSupplyMetrics(posId, viagId, isOnSaleEvent);\n\n const {\n sellerPerformanceMetrics,\n isLoading: isLoadingPerformance,\n timePeriod: performanceTimePeriod,\n onUpdateTimePeriod: onUpdatePeroformanceTimePeriod,\n } = useSellerEventMetrics(posId, viagId, isOnSaleEvent);\n\n const {\n websiteMetrics,\n isLoading: isLoadingWebsite,\n timePeriod: websiteTimePeriod,\n onUpdateTimePeriod: onUpdateWebsiteTimePeriod,\n } = useEventWebsiteMetrics(posId, viagId, isOnSaleEvent);\n\n const { eventPerformanceMetrics } = useCrossSellerEventMetrics(\n posId,\n viagId,\n isOnSaleEvent\n );\n\n const { eventMetrics: eventMetricsMap } =\n useCatalogMetricsContext();\n\n const eventMetrics = eventMetricsMap?.[event.event?.viagVirtualId ?? ''];\n const currencyCode =\n eventMetrics?.currency ??\n loginContext?.user?.activeAccount?.currencyCode ??\n 'USD';\n\n const formattedTotalMetrics = eventMetrics\n ? getInventorySummaryListingMetricsDisplayStrings(\n eventMetrics,\n currencyCode\n )\n : undefined;\n\n const currencyFormatter = new Intl.NumberFormat(getCurrentLanguage(), {\n style: 'currency',\n notation: 'compact',\n currency: currencyCode,\n });\n const formattedProfitAndLoss = currencyFormatter.format(\n eventMetrics?.pandL?.amt ?? 0\n );\n\n const ticketQuantity = useContent(ContentId.TicketQuantity);\n\n const supplyData = useMemo(() => {\n const today = new Date().toISOString();\n const ticketCountEntries: TimeSeriesEntry[] = [];\n const minEntries: TimeSeriesEntry[] = [];\n const p25Entries: TimeSeriesEntry[] = [];\n const p50Entries: TimeSeriesEntry[] = [];\n for (const metrics of sortBy(supplyMetrics, 'dateTime')) {\n const { dateTime: date, ticketCount, min, p25, p50, p75, max } = metrics;\n ticketCountEntries.push({ date, value: ticketCount });\n minEntries.push({ date, value: min });\n p25Entries.push({ date, value: p25 });\n p50Entries.push({ date, value: p50 });\n }\n\n // Add Current\n ticketCountEntries.push({\n date: today,\n value: websiteMetrics?.ticketsOnPlatform?.currentValue ?? 0,\n });\n minEntries.push({\n date: today,\n value: eventPerformanceMetrics?.atp?.min ?? 0,\n });\n p25Entries.push({\n date: today,\n value: eventPerformanceMetrics?.atp?.p25 ?? 0,\n });\n p50Entries.push({\n date: today,\n value: eventPerformanceMetrics?.atp?.p50 ?? 0,\n });\n\n const ticketCountSeries: LineChartSeries[] = [\n {\n name: ticketQuantity,\n color: vars.color.backgroundBrandActive,\n data: ticketCountEntries,\n },\n ];\n const ticketPricesSeries: LineChartSeries[] = [\n { name: 'min', data: minEntries },\n { name: 'p25', data: p25Entries },\n { name: 'p50', data: p50Entries },\n ];\n return {\n ticketCountSeries,\n ticketPricesSeries,\n today,\n currency: eventPerformanceMetrics?.atp?.currency ?? 'USD',\n };\n }, [\n websiteMetrics?.ticketsOnPlatform?.currentValue,\n eventPerformanceMetrics?.atp?.min,\n eventPerformanceMetrics?.atp?.p25,\n eventPerformanceMetrics?.atp?.p50,\n eventPerformanceMetrics?.atp?.currency,\n ticketQuantity,\n supplyMetrics,\n ]);\n\n const supplyMetricsData = useMemo(\n () => ({\n ...supplyData,\n timePeriod: supplyTimePeriod,\n updateTimePeriod: onUpdateSupplyTimePeriod,\n isLoading: isLoadingSupply,\n }),\n [isLoadingSupply, onUpdateSupplyTimePeriod, supplyData, supplyTimePeriod]\n );\n\n const websiteMetricsData = useMemo(\n () => ({\n metrics: websiteMetrics ?? null,\n timePeriod: websiteTimePeriod,\n updateTimePeriod: onUpdateWebsiteTimePeriod,\n isLoading: isLoadingWebsite,\n }),\n [\n isLoadingWebsite,\n onUpdateWebsiteTimePeriod,\n websiteMetrics,\n websiteTimePeriod,\n ]\n );\n\n const performanceMetricsData: SellerEventPerformanceMetricsData =\n useMemo(() => {\n return {\n metrics: {\n marketShares: sellerPerformanceMetrics?.mktShares ?? [],\n ticketPricePercentiles: sellerPerformanceMetrics?.atp ?? {},\n ...(formattedTotalMetrics ?? {}),\n formattedProfitAndLoss,\n },\n timePeriod: performanceTimePeriod,\n updateTimePeriod: onUpdatePeroformanceTimePeriod,\n isLoading: isLoadingPerformance,\n };\n }, [\n formattedProfitAndLoss,\n formattedTotalMetrics,\n isLoadingPerformance,\n onUpdatePeroformanceTimePeriod,\n performanceTimePeriod,\n sellerPerformanceMetrics?.atp,\n sellerPerformanceMetrics?.mktShares,\n ]);\n\n return (\n \n {children}\n \n );\n};\n\nexport const useEventMetrics = () => useContext(EventMetricsContext);\n","import Rainbow from 'rainbowvis.js';\nimport { useMemo } from 'react';\nimport { VenueMapContentProps } from 'src/components/Events/VenueMap/VenueMapContent';\nimport { getMedianScoreForSection } from 'src/utils/seatScoreUtils';\nimport { SectionScoreOverride } from 'src/WebApiController';\n\nexport const HeatMapColorSteps = 100; // The heat map will be normalized to values 1 to 100\nexport const HeatMapColors = ['780000', 'C80000', 'FF8200', 'FFFF8C'];\nconst HeatMapColorForNoScore = 'FFFFFF';\n\nexport function createGetColor(\n seatScores?: SectionScoreOverride[] | null\n): NonNullable {\n return ({ sectionId, rowId, useRowColor }) => {\n const rainbow = new Rainbow();\n rainbow.setNumberRange(1, HeatMapColorSteps);\n rainbow.setSpectrumByArray(HeatMapColors);\n\n if (seatScores?.length) {\n const scores = seatScores\n .filter((ss) => ss.score != null)\n .map((ss) => ss.score!);\n // We have seat scores\n const min = Math.min(...scores);\n const max = Math.max(...scores);\n if (max >= min) {\n const range = max - min;\n if (useRowColor && rowId) {\n const rowScore = seatScores.find((ss) => ss.rowId === rowId)?.score;\n if (rowScore != null) {\n const normalizedScore =\n (range === 0 ? rowScore : (rowScore - min) / range) *\n HeatMapColorSteps;\n const color = rainbow.colorAt(HeatMapColorSteps - normalizedScore);\n return { fill: `#${color}`, stroke: 'none' };\n }\n return { fill: 'white', stroke: 'none' };\n }\n\n const score = getMedianScoreForSection(sectionId, seatScores);\n if (score > 0) {\n const normalizedScore =\n (range === 0 ? score : (score - min) / range) * HeatMapColorSteps;\n // We want to flip the color band since we have the 0 as the high-quality\n const color = rainbow.colorAt(HeatMapColorSteps - normalizedScore);\n return { fill: `#${color}`, stroke: 'black' };\n } else {\n // We only use the rainbow when we actually have a score\n const color = HeatMapColorForNoScore;\n return { fill: `#${color}`, stroke: 'black' };\n }\n } else {\n console.log(`Max ${max} < Min ${min}.`);\n }\n }\n\n return { fill: 'white', stroke: 'black' };\n };\n}\n\nexport const useHeatMapColor = (sections?: SectionScoreOverride[] | null) => {\n const getColor = useMemo(() => createGetColor(sections), [sections]);\n return { getColor };\n};\n","import { ReactNode } from 'react';\nimport { PageSection } from 'src/components/common/PageSection';\n\nexport const HeaderWidgetContainer = ({\n title,\n action,\n}: {\n title: string;\n action?: ReactNode;\n}) => {\n return (\n \n {title}\n \n );\n};\n","import { Content } from \"src/contexts/ContentContext\";\nimport { Stack } from \"src/core/ui\";\nimport { ContentId } from \"src/utils/constants/contentId\";\nimport {\n EventSectionClearingPrices,\n SectionInfo,\n UiMoney,\n} from \"src/WebApiController\";\n\nimport * as styles from './EventSectionClearingPriceSectionDisplay.css';\nimport { applyNumberFormatting } from \"src/utils/numberFormatter\";\n\nconst SectionClearingPricePercentile = ({\n percentileLabel,\n percentileValue,\n}: {\n percentileLabel: string,\n percentileValue: UiMoney,\n }) => {\n const percentileDisplayValue =\n applyNumberFormatting({\n inputNumber: percentileValue.amt,\n currencyCode: percentileValue.currency,\n currencyDecimalDigits: 0,\n }) ?? undefined;\n return (\n \n
    \n {percentileLabel}\n
    \n
    \n {percentileDisplayValue}\n
    \n \n );\n};\n\nexport const EventSectionClearingPriceSectionDisplay = ({\n section,\n sectionClearingPricesBySectionId,\n}: {\n section: SectionInfo,\n sectionClearingPricesBySectionId: Record,\n }) => {\n const prices = sectionClearingPricesBySectionId[section.id];\n\n return (\n \n \n
    \n \n
    \n
    \n {section.name}\n
    \n
    \n {prices != null && (\n <>\n \n \n \n \n \n \n )}\n
    \n );\n};","import { CellContext, ColumnDef } from '@tanstack/react-table';\nimport { Content } from 'src/contexts/ContentContext';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { TableShimmeringDiv } from 'src/tables/Table';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { applyNumberFormatting } from 'src/utils/numberFormatter';\nimport { sortByNumericPrefix } from 'src/utils/tableUtils';\nimport { EventSectionClearingPrices, UiMoney } from 'src/WebApiController';\n\nexport enum EventSectionClearingPricesTableColumnId {\n SectionName = 'sectionName',\n P01 = 'p01',\n P25 = 'p25',\n P50 = 'p50',\n P75 = 'p75',\n P99 = 'p99',\n}\n\nconst getMoneyCell = ({\n getValue,\n}: CellContext) => {\n const value = getValue();\n if (!value) {\n return ;\n }\n\n const displayValue =\n applyNumberFormatting({\n inputNumber: value.amt,\n currencyCode: value.currency,\n currencyDecimalDigits: 0,\n }) ?? undefined;\n\n return {displayValue};\n};\n\nexport type EventSectionClearingPricesTableColumnType =\n EventSectionClearingPrices | null;\n\nexport const EVENT_SECTION_CLEARING_PRICES_TABLE_COLUMNS_CONFIG: ColumnDef<\n EventSectionClearingPricesTableColumnType,\n any\n>[] = [\n {\n id: EventSectionClearingPricesTableColumnId.SectionName,\n header: () => (\n \n \n \n ),\n accessorFn: (data) => data?.sectionName,\n cell: ({ getValue }) => (\n {getValue()}\n ),\n sortingFn: sortByNumericPrefix,\n },\n {\n id: EventSectionClearingPricesTableColumnId.P01,\n header: () => 1st,\n accessorFn: (data) => data?.p01,\n cell: getMoneyCell,\n },\n {\n id: EventSectionClearingPricesTableColumnId.P25,\n header: () => 25th,\n accessorFn: (data) => data?.p25,\n cell: getMoneyCell,\n },\n {\n id: EventSectionClearingPricesTableColumnId.P50,\n header: () => 50th,\n accessorFn: (data) => data?.p50,\n cell: getMoneyCell,\n },\n {\n id: EventSectionClearingPricesTableColumnId.P75,\n header: () => 75th,\n accessorFn: (data) => data?.p75,\n cell: getMoneyCell,\n },\n {\n id: EventSectionClearingPricesTableColumnId.P99,\n header: () => 99th,\n accessorFn: (data) => data?.p99,\n cell: getMoneyCell,\n },\n];\n","import {\n InitialTableState,\n PaginationState,\n SortingState,\n TableOptions,\n} from '@tanstack/react-table';\nimport { useMemo, useState } from 'react';\nimport { FormatContent, useContent } from 'src/contexts/ContentContext';\nimport { NoData, Table } from 'src/tables/Table';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { EventSectionClearingPrices } from 'src/WebApiController';\n\nimport {\n EVENT_SECTION_CLEARING_PRICES_TABLE_COLUMNS_CONFIG,\n EventSectionClearingPricesTableColumnId,\n EventSectionClearingPricesTableColumnType,\n} from './EventSectionClearingPricesTableColumnsConfig';\n\nconst PAGE_SIZE = 10;\n\nexport const EventSectionClearingPricesTable = ({\n sectionClearingPrices,\n initState,\n}: {\n sectionClearingPrices: EventSectionClearingPrices[] | undefined;\n initState?: InitialTableState;\n}) => {\n const sectionsText = useContent(ContentId.Sections);\n\n // Enable passing in table state as parameters -- we can remount with the last state the user was on\n const [sorting, setSorting] = useState(\n initState?.sorting || [\n {\n id: EventSectionClearingPricesTableColumnId.SectionName.toString(),\n desc: false,\n },\n ]\n );\n const [{ pageIndex, pageSize }, setPagination] = useState({\n pageIndex: initState?.pagination?.pageIndex || 0,\n pageSize: PAGE_SIZE,\n });\n const pagination = useMemo(\n () => ({\n pageIndex,\n pageSize,\n }),\n [pageIndex, pageSize]\n );\n\n const options: Partial<\n TableOptions\n > = useMemo(\n () => ({\n data: sectionClearingPrices,\n columns: EVENT_SECTION_CLEARING_PRICES_TABLE_COLUMNS_CONFIG,\n state: {\n pagination,\n sorting,\n },\n onPaginationChange: setPagination,\n onSortingChange: setSorting,\n }),\n [sectionClearingPrices, pagination, sorting]\n );\n\n return sectionClearingPrices?.length ? (\n
    \n ) : (\n \n \n \n );\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { useCallback, useMemo } from 'react';\nimport { EventVenueMap } from 'src/components/Events/VenueMap/EventVenueMap';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { Stack } from 'src/core/ui';\nimport { useAutoCompMapSectionHandler } from 'src/hooks/useAutoCompMapSectionHandler';\nimport {\n HeatMapColors,\n HeatMapColorSteps,\n useHeatMapColor,\n} from 'src/hooks/useHeatMapColor';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n Event,\n EventSectionClearingPrices,\n InventoryEventDashboardClient,\n InventoryMetricsQueryId,\n SectionInfo,\n SectionScoreOverride,\n} from 'src/WebApiController';\n\nimport { HeaderWidgetContainer } from '../../HeaderWidgetContainer';\nimport { EventSectionClearingPriceSectionDisplay } from './EventSectionClearingPriceSectionDisplay';\nimport { EventSectionClearingPricesTable } from './EventSectionClearingPricesTable';\n\nconst reversedHeatMapColorsForALeftToRightLegend = [...HeatMapColors].reverse();\n\nexport const EventSectionClearingPricesWidgetsContainer = ({\n event,\n isOnSaleEvent,\n}: {\n event: Event | undefined;\n isOnSaleEvent?: boolean;\n}) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n const { isMapLoading } = useEventMapContext();\n\n const sectionClearingPricesText = useContent(ContentId.SectionClearingPrices);\n\n const posId = useMemo(() => {\n const posIds = event?.posIds;\n return posIds && posIds.length > 0 ? posIds[0] : undefined;\n }, [event]);\n const viagId = useMemo(() => event?.viagId ?? null, [event?.viagId]);\n\n const {\n selectedSectionIds,\n onSectionClicked,\n onToggleMirrors,\n onSelectedSectionsChange,\n } = useAutoCompMapSectionHandler(() => {});\n\n const {\n isPending,\n error,\n data: eventSectionClearingPrices,\n } = useQuery({\n queryKey: ['getEventSectionClearingPrices', posId, viagId, isOnSaleEvent],\n queryFn: () => {\n return tryInvokeApi(\n async () => {\n const client = new InventoryEventDashboardClient(\n activeAccountWebClientConfig\n );\n const queryId: InventoryMetricsQueryId = {\n posEventId: posId ?? null,\n viagogoEventId: isOnSaleEvent ? viagId : null,\n };\n const data = await client.getEventSectionClearingPrices(queryId);\n\n return data;\n },\n (error) => {\n trackError(\n 'InventoryEventDashboardClient.getEventSectionClearingPrices',\n error,\n event\n );\n }\n );\n },\n refetchOnWindowFocus: false,\n meta: {\n persist: false, // we do not want this thing persisted between sessions\n },\n });\n\n const [sectionClearingPricesBySectionId, sectionScoreOverrides] =\n useMemo(() => {\n const sectionClearingPricesBySectionId: Record<\n number,\n EventSectionClearingPrices\n > = {};\n const sectionScoreOverrides: SectionScoreOverride[] = [];\n for (const s of eventSectionClearingPrices ?? []) {\n if (s.sectionId) {\n sectionClearingPricesBySectionId[s.sectionId] = s;\n }\n\n sectionScoreOverrides.push({\n sectionId: s.sectionId,\n rowId: 0,\n score: s.normalizedScore,\n } as SectionScoreOverride);\n }\n return [sectionClearingPricesBySectionId, sectionScoreOverrides];\n }, [eventSectionClearingPrices]);\n\n const onSectionHovered = useCallback(\n (hoveredSection: SectionInfo) => (\n \n ),\n [sectionClearingPricesBySectionId]\n );\n\n const { getColor } = useHeatMapColor(sectionScoreOverrides);\n\n const filteredEventSectionClearingPrices = useMemo(\n () =>\n selectedSectionIds?.length > 0\n ? eventSectionClearingPrices?.filter(\n (s) => s.sectionId && selectedSectionIds.includes(s.sectionId)\n )\n : eventSectionClearingPrices,\n [eventSectionClearingPrices, selectedSectionIds]\n );\n\n return (\n <>\n \n \n {isPending || isMapLoading ? (\n \n ) : (\n <>\n
    \n \n
    \n
    \n \n
    \n \n )}\n
    \n \n );\n};\n","export enum TimeSeriesLineChartUnit {\n Number = 'number',\n Price = 'price',\n}\n\nexport type TimeSeriesLineChartUnitType =\n | {\n type: TimeSeriesLineChartUnit.Number;\n }\n | {\n type: TimeSeriesLineChartUnit.Price;\n currency: string;\n };\n","import { format } from 'date-fns';\nimport * as Highcharts from 'highcharts';\nimport HighchartsReact from 'highcharts-react-official';\nimport { useCallback, useMemo } from 'react';\nimport { UseMeasureRect } from 'react-use/lib/useMeasure';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { LineChartSeries } from 'src/contexts/EventMetricsContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { ContentPlaceholder } from 'src/core/POS/ContentPlaceholder';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { applyNumberFormatting } from 'src/utils/numberFormatter';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\n\nimport * as styles from './TimeSeriesLineChart.css';\nimport {\n TimeSeriesLineChartUnit,\n TimeSeriesLineChartUnitType,\n} from './TimeSeriesLineChart.types';\n\nconst getXAxisRelativeLabel = (\n today: string | undefined,\n value: string | number,\n unit: 'hour' | 'day' | 'week'\n): number => {\n const current = today ? new Date(today) : new Date();\n const temp = new Date(value);\n const diffInMilli = current.getTime() - temp.getTime();\n if (unit === 'hour') {\n return Math.ceil(diffInMilli / (3600 * 1_000));\n }\n\n if (unit === 'day') {\n return Math.ceil(diffInMilli / (24 * 3600 * 1000));\n }\n\n return Math.ceil(diffInMilli / (7 * 24 * 3600 * 1000));\n};\n\nexport type TimeSeriesLineChartProps = {\n series: LineChartSeries[];\n labelUnit?: 'hour' | 'day' | 'week';\n today?: string;\n unitType?: TimeSeriesLineChartUnitType;\n container?: UseMeasureRect;\n isLoading?: boolean;\n};\n\nexport const TimeSeriesLineChart: React.FC = ({\n series,\n today,\n labelUnit = 'day',\n unitType = {\n type: TimeSeriesLineChartUnit.Number,\n },\n container,\n isLoading,\n}) => {\n const { getUiCurrency } = useLocalizationContext();\n const nowText = useContent(ContentId.Now);\n const hourText = useContent(ContentId.Hour);\n const hoursText = useContent(ContentId.Hours);\n const dayText = useContent(ContentId.Day);\n const daysText = useContent(ContentId.Days);\n const weekText = useContent(ContentId.Week);\n const weeksText = useContent(ContentId.Weeks);\n const agoText = useContent(ContentId.Ago);\n\n const { seriesData } = useMemo(() => {\n const colors = series.every(({ color }) => color != null)\n ? series.map(({ color }) => color!)\n : undefined;\n const seriesData = series.map(({ name, data }) => ({\n type: 'spline',\n name,\n data: data.map(({ date, value }) => [new Date(date).getTime(), value]),\n })) as Highcharts.SeriesSplineOptions[];\n return { colors, seriesData };\n }, [series]);\n\n const formatXAxisLabel = useCallback(\n (value: number) => {\n if (today && value === new Date(today).getTime()) {\n return nowText.toLowerCase();\n }\n const diff = getXAxisRelativeLabel(today, value, labelUnit);\n if (labelUnit === 'hour') {\n const unit = diff > 1 ? hoursText : hourText;\n return `${diff} ${unit} ${agoText}`.toLowerCase();\n }\n if (labelUnit === 'day') {\n const unit = diff > 1 ? daysText : dayText;\n return `${diff} ${unit} ${agoText}`.toLowerCase();\n }\n const unit = diff > 1 ? weeksText : weekText;\n return `${diff} ${unit} ${agoText}`.toLowerCase();\n },\n [\n agoText,\n dayText,\n daysText,\n hourText,\n hoursText,\n labelUnit,\n nowText,\n today,\n weekText,\n weeksText,\n ]\n );\n\n const formatYAxisLabel = useCallback(\n (value: number) => {\n if (unitType.type === TimeSeriesLineChartUnit.Price) {\n const currency = getUiCurrency(unitType.currency);\n const decimalDigits = value ?? 0 > 100 ? 0 : 2;\n return (\n applyNumberFormatting({\n inputNumber: value,\n currencyCode: currency.code,\n currencyDecimalDigits: decimalDigits,\n }) ?? ''\n );\n }\n return value.toLocaleString();\n },\n [getUiCurrency, unitType]\n );\n\n const formatTooltip = useCallback(\n ({ x, y }: Highcharts.Point) => {\n const formatter =\n labelUnit === 'hour'\n ? 'yyyy-MM-dd HH:mm:ss'\n : labelUnit === 'day'\n ? 'yyyy-MM-dd HH'\n : 'yyyy-MM-dd';\n const date = format(new Date(x), formatter);\n const value = y && formatYAxisLabel(y);\n return `${date}:\\n ${value}`;\n },\n [formatYAxisLabel, labelUnit]\n );\n\n const isMobile = useMatchMedia('mobile');\n const options: Highcharts.Options = useMemo(\n () => ({\n title: { text: undefined },\n chart: {\n width: container?.width ?? 600,\n height: (isMobile ? 300 : (container?.height ?? 300)) - 10,\n backgroundColor: 'transparent',\n type: 'spline',\n },\n plotOptions: {},\n tooltip: {\n headerFormat: '{series.name}
    ',\n pointFormatter: function () {\n return formatTooltip(this);\n },\n },\n xAxis: {\n type: 'datetime',\n dateTimeLabelFormats: {\n day: '%Y-%m-%d',\n month: '%m',\n year: '%Y',\n },\n labels: {\n enabled: true,\n formatter: function () {\n return formatXAxisLabel(this.value as number);\n },\n style: { color: vars.color.textPrimary },\n },\n },\n yAxis: {\n title: {\n text: undefined,\n },\n gridLineColor: 'transparent',\n labels: {\n enabled: true,\n formatter: function () {\n return formatYAxisLabel(this.value as number);\n },\n style: { color: vars.color.textPrimary },\n },\n },\n legend: { enabled: false },\n series: seriesData,\n credits: { enabled: false },\n }),\n [\n container?.height,\n container?.width,\n formatTooltip,\n formatXAxisLabel,\n formatYAxisLabel,\n seriesData,\n ]\n );\n\n return (\n \n {isLoading ? (\n \n ) : (\n \n )}\n \n );\n};\n","import clsx from 'clsx';\nimport { forwardRef, PropsWithChildren } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ContentPlaceholder } from 'src/core/POS/ContentPlaceholder';\n\nimport * as styles from './DashboardWidgetTile.css';\n\nexport type DashboardWidgetTileProps = {\n titleContentId: string | null | undefined;\n type?: 'chart' | 'ditribution' | 'default';\n} & PropsWithChildren;\n\nexport const DashboardWidgetTile = forwardRef<\n HTMLDivElement,\n DashboardWidgetTileProps\n>(({ titleContentId, type = 'default', children }, ref) => {\n return (\n \n
    \n {titleContentId ? (\n \n ) : (\n \n )}\n
    \n
    {children}
    \n \n );\n});\n\nDashboardWidgetTile.displayName = 'DashboardWidgetTile';\n","import { useMeasure } from 'react-use';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { DashboardWidgetTile } from '../DashboardWidgetTile/DashboardWidgetTile';\nimport {\n TimeSeriesLineChart,\n TimeSeriesLineChartProps,\n} from '../TimeSeriesLineChart';\n\ntype EventSupplyWidgetProps = {\n title: ContentId;\n} & TimeSeriesLineChartProps;\n\nexport const EventSupplyWidget: React.FC = ({\n title,\n ...rest\n}) => {\n const [measureRef, container] = useMeasure();\n return (\n \n \n \n );\n};\n","import { capitalize } from 'lodash-es';\nimport { useMemo } from 'react';\nimport { useContent, useFormattedContent } from 'src/contexts/ContentContext';\nimport { useEventMetrics } from 'src/contexts/EventMetricsContext/EventMetricsContext';\nimport { PosSelect } from 'src/core/POS/PosSelect';\nimport { Stack } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { EventSupplyMetricsTimePeriod, Feature } from 'src/WebApiController';\n\nimport * as styles from '../../DashboardSection.css';\nimport { HeaderWidgetContainer } from '../../HeaderWidgetContainer';\nimport { TimeSeriesLineChartUnit } from '../TimeSeriesLineChart';\nimport { EventSupplyWidget } from './EventSupplyWidget';\n\nexport const EventSupplyWidgetsContainer = () => {\n const { supplyMetrics } = useEventMetrics();\n const supplyText = useContent(ContentId.Supply);\n\n const hasLastDaySupplyMetricsFeature = useUserHasFeature(\n Feature.DemandDashLastDaySupplyMetrics\n );\n\n const lastDay = useFormattedContent(FormatContentId.LastNDays, '1') as string;\n const lastSevenDays = useFormattedContent(\n FormatContentId.LastNDays,\n '7'\n ) as string;\n const lastNinetyDays = useFormattedContent(\n FormatContentId.LastNDays,\n '90'\n ) as string;\n const timePeriodValueOptionsContent: Record = {\n [EventSupplyMetricsTimePeriod.LastSevenDays]: capitalize(lastSevenDays),\n [EventSupplyMetricsTimePeriod.LastNinetyDays]: capitalize(lastNinetyDays),\n };\n\n if (hasLastDaySupplyMetricsFeature) {\n timePeriodValueOptionsContent[EventSupplyMetricsTimePeriod.LastDay] =\n capitalize(lastDay);\n }\n\n const labelUnit = useMemo(() => {\n const timePeriod = supplyMetrics.timePeriod;\n if (timePeriod === EventSupplyMetricsTimePeriod.LastNinetyDays) {\n return 'week';\n }\n if (timePeriod === EventSupplyMetricsTimePeriod.LastSevenDays) {\n return 'day';\n }\n return 'hour';\n }, [supplyMetrics.timePeriod]);\n\n return (\n <>\n \n supplyMetrics.updateTimePeriod(v as EventSupplyMetricsTimePeriod)\n }\n shape=\"none\"\n />\n }\n />\n \n \n \n \n \n );\n};\n","import { MetricTile } from 'src/components/Metrics';\nimport { ContentPlaceholder } from 'src/core/POS/ContentPlaceholder';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getCurrentLanguage } from 'src/utils/localeUtils';\nimport {\n EventMarketplaceWebsiteMetricOfInteger,\n EventMarketplaceWebsiteMetricOfUiMoney,\n} from 'src/WebApiController';\n\nimport { DashboardWidgetTile } from '../DashboardWidgetTile/DashboardWidgetTile';\n\nexport const EventWebsiteMetricWidget = ({\n titleContentId,\n metric,\n}: {\n titleContentId: ContentId;\n metric:\n | EventMarketplaceWebsiteMetricOfInteger\n | EventMarketplaceWebsiteMetricOfUiMoney\n | undefined;\n}) => {\n const MaybePercentageChangeMetric = () => {\n if (!metric) {\n return ;\n }\n\n const numberFormatOptions: Intl.NumberFormatOptions =\n typeof metric.currentValue === 'number'\n ? { style: 'decimal' }\n : {\n style: 'currency',\n notation: 'compact',\n currency: metric.currentValue.currency!,\n };\n const currentValue =\n typeof metric.currentValue === 'number'\n ? metric.currentValue\n : metric.currentValue.amt;\n const previousValue: number =\n typeof metric.previousValue === 'number'\n ? metric.previousValue\n : metric.previousValue.amt;\n\n const numberFormat = Intl.NumberFormat(\n getCurrentLanguage(),\n numberFormatOptions\n );\n const formattedCurrentValue = numberFormat.format(currentValue);\n return (\n \n \n \n );\n };\n\n return (\n \n \n \n );\n};\n","import { useContent, useFormattedContent } from 'src/contexts/ContentContext';\nimport { useEventMetrics } from 'src/contexts/EventMetricsContext';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { EventWebsiteMetricsTimePeriod } from 'src/WebApiController';\n\nimport * as styles from '../../DashboardSection.css';\nimport { HeaderWidgetContainer } from '../../HeaderWidgetContainer';\nimport { EventWebsiteMetricWidget } from './EventWebsiteMetricWidget';\n\nexport const EventWebsiteMetricWidgetsContainer = () => {\n const {\n websiteMetrics: { metrics, timePeriod, updateTimePeriod },\n } = useEventMetrics();\n\n const rightNowText = useContent(ContentId.RightNow);\n const last1HourText = useContent(ContentId.Last1Hour);\n const last24HoursText = useFormattedContent(\n FormatContentId.LastNHours,\n '24'\n ) as string;\n const timePeriodValueOptionsContent = {\n [EventWebsiteMetricsTimePeriod.OneHour]: last1HourText,\n [EventWebsiteMetricsTimePeriod.OneDay]: last24HoursText,\n };\n\n return (\n <>\n \n }\n />\n \n \n \n \n \n \n \n );\n};\n","import * as Highcharts from 'highcharts';\nimport HighchartsReact from 'highcharts-react-official';\nimport { forwardRef, useMemo } from 'react';\nimport { UseMeasureRect } from 'react-use/lib/useMeasure';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ContentIds } from 'src/utils/constants/contentIdDataMap';\n\nimport * as styles from './DistributionPieChart.css';\nimport { DistributionEntry } from './DistributionPieChart.types';\n\nexport type DistributionWidgetProps = {\n titleContentId: ContentId;\n distributions: DistributionEntry[];\n container?: UseMeasureRect;\n};\n\nexport const DistributionPieChartWidget = forwardRef<\n HTMLDivElement,\n DistributionWidgetProps\n>(({ titleContentId, distributions, container }, ref) => {\n const data = useMemo(() => {\n const sum = distributions.reduce((res, { value }) => {\n res += value;\n return res;\n }, 0);\n return distributions\n .toSorted((a, b) => b.value - a.value)\n .map(({ label, value, color }) => ({\n name: label,\n y: (value * 100) / sum,\n color,\n }));\n }, [distributions]);\n\n const options: Highcharts.Options = useMemo(\n () => ({\n title: {\n text: '',\n align: 'left',\n },\n chart: {\n width: container?.width ?? 500,\n height: (container?.height ?? 300) - 30,\n backgroundColor: 'transparent',\n spacingBottom: 0,\n marginTop: 0,\n spacingTop: 0,\n marginBottom: 0,\n spacingRight: 0,\n spacingLeft: 28,\n },\n legend: {\n enabled: true,\n layout: 'horizontal',\n align: 'right',\n verticalAlign: 'middle',\n width: '65%',\n itemStyle: {\n width: 'fit-content' as unknown as never,\n fontSize: vars.typography.fontSize.sm,\n color: vars.color.textStrong,\n },\n itemHoverStyle: {\n color: vars.color.textStrongHover,\n },\n squareSymbol: false,\n symbolWidth: 20,\n symbolRadius: 4,\n },\n plotOptions: {\n pie: {\n dataLabels: {\n enabled: false,\n },\n borderWidth: 2,\n },\n series: {\n allowPointSelect: true,\n },\n },\n tooltip: {\n pointFormat: '{series.name}: {point.percentage:.1f}%',\n },\n series: [\n {\n showInLegend: true,\n type: 'pie',\n innerSize: '60%',\n name: ContentIds[titleContentId].defaultValue,\n data,\n },\n ],\n credits: {\n enabled: false,\n },\n }),\n [container?.height, container?.width, data, titleContentId]\n );\n return (\n \n \n \n );\n});\n\nDistributionPieChartWidget.displayName = 'DistributionPieChartWidget';\n","import { useMemo } from 'react';\nimport { useMeasure } from 'react-use';\nimport { MetricTile } from 'src/components/Metrics';\nimport { Content } from 'src/contexts/ContentContext';\nimport { SellerEventPerformanceMetrics } from 'src/contexts/EventMetricsContext';\nimport { ContentPlaceholder } from 'src/core/POS/ContentPlaceholder';\nimport { Stack } from 'src/core/ui';\nimport { MARKETPLACE_TO_BACKGROUND_COLOR } from 'src/utils/constants/colorMaps';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n Marketplace,\n MarketplaceMarketShare,\n TicketPricePercentiles,\n} from 'src/WebApiController';\n\nimport { DashboardWidgetTile } from '../DashboardWidgetTile/DashboardWidgetTile';\nimport {\n DistributionEntry,\n DistributionPieChartWidget,\n} from '../DistributionPieChart';\nimport * as styles from './SellerEventPerformanceMetricWidgetsContainer.css';\n\nconst TicketsListedAndSoldWidget = ({\n performanceMetrics,\n isLoading,\n}: {\n performanceMetrics: SellerEventPerformanceMetrics;\n isLoading: boolean;\n}) => {\n const progressBarValue = isLoading\n ? 0\n : (performanceMetrics.totalSoldPercentage ?? 0) * 100;\n const progressBarLabel = isLoading\n ? undefined\n : performanceMetrics.formattedTotalSoldPercentage;\n\n return (\n \n
    \n \n {progressBarLabel}\n \n {isLoading ? (\n \n ) : (\n \n \n \n )}\n
    \n
    \n );\n};\n\nconst SalesAndLiftWidget = ({\n performanceMetrics,\n isLoading,\n}: {\n performanceMetrics: SellerEventPerformanceMetrics;\n isLoading: boolean;\n}) => {\n const progressBarValue = isLoading\n ? 0\n : (performanceMetrics.totalGrossMargin ?? 0) * 100;\n const progressBarLabel = isLoading\n ? undefined\n : performanceMetrics.formattedTotalGrossMargin;\n\n return (\n \n
    \n \n {progressBarLabel}\n \n {isLoading ? (\n \n ) : (\n
    \n \n {performanceMetrics?.formattedTotalNetProceeds}\n \n
    \n \n {': ' + performanceMetrics?.formattedProfitAndLoss}\n
    \n
    \n )}\n
    \n
    \n );\n};\n\nconst TempAverageTicketPriceWidget = ({\n ticketPricePercentiles,\n isLoading,\n}: {\n ticketPricePercentiles: Partial;\n isLoading: boolean;\n}) => {\n return (\n \n {isLoading ? (\n \n ) : (\n \n {ticketPricePercentiles?.p50}\n \n )}\n \n );\n};\n\nconst ZERO_STUBHUB_MARKETPLACE_SHARE: MarketplaceMarketShare = {\n mktPlc: Marketplace.StubHub,\n share: 0,\n};\n\nconst MarketShareDistributionChart = ({\n marketShares,\n isLoading,\n}: {\n marketShares: MarketplaceMarketShare[];\n isLoading: boolean;\n}) => {\n const [measureRef, container] = useMeasure();\n\n const marketplaceSharesToRender = useMemo(() => {\n if (isLoading) return [];\n const shares = marketShares;\n if (!shares.map((ms) => ms.mktPlc).includes(Marketplace.StubHub)) {\n shares.push(ZERO_STUBHUB_MARKETPLACE_SHARE);\n }\n return shares;\n }, [isLoading, marketShares]);\n\n return (\n \n ((ms) => {\n return {\n label: ms.mktPlc,\n value: ms.share,\n color: MARKETPLACE_TO_BACKGROUND_COLOR[ms.mktPlc],\n };\n }) ?? []\n }\n container={container}\n />\n \n );\n};\n\nexport const SellerEventPerformanceMetricWidgetsBody = ({\n performanceMetrics,\n isLoading,\n}: {\n performanceMetrics: SellerEventPerformanceMetrics;\n isLoading: boolean;\n}) => {\n return (\n \n \n\n \n\n \n\n \n \n );\n};\n","import { useContent, useFormattedContent } from 'src/contexts/ContentContext';\nimport { useEventMetrics } from 'src/contexts/EventMetricsContext';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect/PosEnumSelect';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { SellerEventDashboardMetricsTimePeriod } from 'src/WebApiController';\n\nimport * as dashboardStyles from '../../DashboardSection.css';\nimport { HeaderWidgetContainer } from '../../HeaderWidgetContainer';\nimport { SellerEventPerformanceMetricWidgetsBody } from './SellerEventPerformanceMetricWidgetsBody';\n\nexport const SellerEventPerformanceMetricWidgetsContainer = () => {\n const { performanceMetrics } = useEventMetrics();\n\n const yourStatsText = useContent(ContentId.YourStats);\n const allTimeText = useContent(ContentId.AllTime);\n const last7DaysText = useFormattedContent(\n FormatContentId.LastNDays,\n '7'\n ) as string;\n const timePeriodValueOptionsContent = {\n [SellerEventDashboardMetricsTimePeriod.Last7Days]: last7DaysText,\n [SellerEventDashboardMetricsTimePeriod.AllTime]: allTimeText,\n };\n\n return (\n <>\n \n }\n />\n\n \n \n );\n};\n","import { useMemo } from 'react';\nimport { EventMetricsProvider } from 'src/contexts/EventMetricsContext/EventMetricsContext';\nimport { Stack } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { EventWithData, Feature } from 'src/WebApiController';\n\nimport * as styles from './DashboardSection.css';\nimport { EventSectionClearingPricesWidgetsContainer } from './Widgets/EventSectionClearingPrices';\nimport { EventSupplyWidgetsContainer } from './Widgets/EventSupply/EventSupplyContainer';\nimport { EventWebsiteMetricWidgetsContainer } from './Widgets/EventWebsiteMetric';\nimport { SellerEventPerformanceMetricWidgetsContainer } from './Widgets/SellerEventPerformanceMetric';\n\nexport const DashboardSection = ({\n event,\n isOnSaleEvent,\n}: {\n event: EventWithData;\n isOnSaleEvent?: boolean;\n}) => {\n const hasBlockInventorySummaryStatsFeature = useUserHasFeature(\n Feature.BlockInventorySummaryStats\n );\n\n const showYourStats = useMemo(() => {\n if (hasBlockInventorySummaryStatsFeature) {\n return false;\n }\n\n return !isOnSaleEvent;\n }, [hasBlockInventorySummaryStatsFeature, isOnSaleEvent]);\n\n return (\n \n \n {showYourStats && }\n \n {/* Removed \"Demand Factors\" until we have more data to populate here. See SUP-639\n \n */}\n \n \n \n \n );\n};\n","import clsx from 'clsx';\nimport { vars } from 'src/core/themes';\nimport { EventWithData } from 'src/WebApiController';\n\nimport { DashboardSection } from '../DashboardSection';\nimport * as styles from '../InventoryEventPage.css';\n\ntype InventoryEventContentProps = {\n accordionItemProps?: EventWithData;\n isOnSaleEvent?: boolean;\n};\n\nexport function InventoryEventDashboardSection({\n accordionItemProps,\n isOnSaleEvent,\n}: InventoryEventContentProps) {\n return (\n
    \n {accordionItemProps && (\n \n \n
    \n )}\n \n );\n}\n","import { useCallback, useState } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content, FormatContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport {\n ConfirmDialog,\n ConfirmDialogProps,\n} from 'src/core/interim/dialogs/ConfirmDialog';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { useGetEventFullInfo } from 'src/hooks/useGetEventFullInfo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { Event, PricingClient } from 'src/WebApiController';\n\nimport { contentWrapper } from './ApplyHeatMapToAllEventsDialog.css';\n\nexport type ApplyHeatMapToAllEventsDialogProps = Omit<\n ConfirmDialogProps,\n 'headerText' | 'bodyText'\n> & {\n event: Event;\n eventIds: number[] | undefined | null;\n eventConfigScoreOverrideId: number | undefined;\n onClose: () => void;\n};\n\nexport const ApplyHeatMapToAllEventsDialog = ({\n event,\n eventIds,\n eventConfigScoreOverrideId,\n onClose,\n ...props\n}: ApplyHeatMapToAllEventsDialogProps) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { performer, venue } = useGetEventFullInfo(event);\n const [isLoading, setIsLoading] = useState(false);\n const { showErrorDialog } = useErrorBoundaryContext();\n const { mapConfigOverridesQuery } = useEventMapContext();\n\n const onApplyToAllEvents = useCallback(\n (eventIds: number[]) => {\n setIsLoading(true);\n tryInvokeApi(\n async () => {\n const client = new PricingClient(activeAccountWebClientConfig);\n\n eventIds!.forEach(\n async (eid) =>\n await client.setEventSeatMapScoreOverride(\n eid,\n eventConfigScoreOverrideId,\n null\n )\n );\n\n mapConfigOverridesQuery.refetch();\n onClose();\n },\n (error) => {\n showErrorDialog('PricingClient.setEventSeatMapScoreOverride', error, {\n trackErrorData: {\n eventIds,\n eventConfigScoreOverrideId,\n },\n });\n },\n () => {\n setIsLoading(false);\n }\n );\n },\n [\n activeAccountWebClientConfig,\n eventConfigScoreOverrideId,\n mapConfigOverridesQuery,\n onClose,\n showErrorDialog,\n ]\n );\n\n if (!eventIds?.length || !eventConfigScoreOverrideId) {\n return null;\n }\n\n return (\n }\n bodyText={\n
    \n {isLoading ? (\n \n ) : (\n \n )}\n
    \n }\n okText={ContentId.AllEvents}\n cancelText={ContentId.ThisEvent}\n {...props}\n onOkay={() => onApplyToAllEvents(eventIds)}\n onCancel={() => onApplyToAllEvents([event.viagId!])}\n />\n );\n};\n","import { forwardRef } from 'react';\nimport { useFormattedContent } from 'src/contexts/ContentContext';\nimport { useSiteTheme } from 'src/contexts/SiteTheme/SiteThemeContext';\nimport { vars } from 'src/core/themes';\nimport { Colors } from 'src/core/themes/constants/colors';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\n\nimport * as styles from './RowRelativeScoreDisplay.css';\n\nexport interface RowRelativeScoreInfo {\n rowId?: number;\n rowName: string | null;\n ordinal: number | null;\n percentage?: number;\n isBase?: boolean;\n}\n\nexport type RowRelativeScoreDisplayProps = {\n rowRelativeScoreInfo: RowRelativeScoreInfo;\n graphWidthPercentage: number;\n};\n\nconst NEGATIVE_BACKGROUND_COLOR = Colors.fuchsia700;\nconst NEGATIVE_FOREGROUND_COLOR = '#d9317c';\nconst POSITIVE_BACKGROUND_COLOR = '#f1ecfa';\nconst POSITIVE_FOREGROUND_COLOR = '#3f2173';\nconst NEGATIVE_TEXT_COLOR = '#db3f84';\nconst POSITIVE_TEXT_COLOR = '#33b2b1';\n\nconst DARKMODE_NEGATIVE_BACKGROUND_COLOR = vars.color.backgroundPrimary;\nconst DARKMODE_POSITIVE_BACKGROUND_COLOR = DARKMODE_NEGATIVE_BACKGROUND_COLOR;\nconst DARKMODE_POSITIVE_FOREGROUND_COLOR = vars.color.backgroundHighlightHover;\n\nexport const RowRelativeScoreDisplay = forwardRef<\n HTMLDivElement,\n RowRelativeScoreDisplayProps\n>(function RowRelativeScoreDisplay(\n { rowRelativeScoreInfo, graphWidthPercentage },\n ref\n) {\n const {\n rowId,\n rowName,\n ordinal,\n percentage,\n isBase = false,\n } = rowRelativeScoreInfo;\n const { isDarkMode } = useSiteTheme();\n const rowOrdinalFormatText = useFormattedContent(\n FormatContentId.Row,\n ordinal?.toString() ?? rowId?.toString()\n );\n\n return (\n
    \n \n {rowName ?? rowOrdinalFormatText}\n
    \n \n \n \n \n \n 0 ? percentage : 0\n }%`,\n height: '100%',\n float: 'left',\n }}\n />\n \n \n 0\n ? POSITIVE_TEXT_COLOR\n : NEGATIVE_TEXT_COLOR,\n }}\n >{`${isBase ? 100 : percentage?.toFixed(1)}%`}\n \n );\n});\n","import { PaperScope } from 'paper';\n\nconst TEXT_COLOR = '#677383';\nconst AXIS_COLOR = '#B1BAC2';\nconst PATH_COLOR = '#3F1D75';\nconst INVALID_COLOR = 'red';\n\ntype HitResultType = 'handle-in' | 'handle-out' | 'segment' | 'stroke';\n\nfunction isHitResultType(type: string): type is HitResultType {\n return (\n type === 'handle-in' ||\n type === 'handle-out' ||\n type === 'segment' ||\n type === 'stroke'\n );\n}\n\n/**\n * Library agnostic point representation. This is used for serializing the bezier path.\n */\nexport type SerializedPoint = {\n x: number;\n y: number;\n};\n\n/**\n * Library agnostic segment representation. This is used for serializing the bezier path.\n */\nexport type SerializedSegment = {\n point: SerializedPoint;\n handleIn?: SerializedPoint;\n handleOut?: SerializedPoint;\n};\n\nexport type CalcOutputFn = (input: number) => number;\n\nexport class BezierGraphManager {\n spacing = 8;\n handleSize = 8;\n labelHeight = 12;\n hitTestOptions = {\n selected: true,\n segments: true,\n handles: true,\n stroke: true,\n tolerance: 4,\n };\n\n scope: paper.PaperScope;\n /**\n * The bounds of the plot relative to the plot.\n *\n * This will be at position (0, 0) with dimensions (100, 100). The values relative to the plot can\n * be thought of as the percentage of each dimension from 0 to 100.\n */\n localPlotBounds: paper.Rectangle;\n\n /**\n * Label for the action the user is about to perform.\n *\n * eg. add segment, delete segment\n */\n actionLabel: paper.PointText;\n verticalAxisLabel: paper.PointText;\n minLabel: paper.PointText;\n maxLabel: paper.PointText;\n midLabel: paper.PointText;\n fixedSegmentAmount: boolean;\n hideAxes: boolean;\n hideActionLabel: boolean;\n horizontalGraph: boolean;\n pathColor: string;\n deltaTransform:\n | undefined\n | ((segment: paper.Segment, delta: paper.Point) => paper.Point);\n axes: paper.Path;\n\n path: paper.Path;\n /**\n * Used to get the intersection with the `path` in order to get the y value for a given x.\n */\n verticalIntersector: paper.Path;\n plot: paper.Group;\n\n constructor(\n canvas: HTMLCanvasElement,\n {\n minLabel,\n maxLabel,\n midLabel,\n }: {\n minLabel: string;\n maxLabel: string;\n midLabel?: string;\n },\n fixedSegmentAmount: boolean,\n hideAxes: boolean,\n hideActionLabel: boolean,\n horizontalGraph: boolean,\n pathColor?: string,\n deltaTransform?: (\n segment: paper.Segment,\n delta: paper.Point\n ) => paper.Point,\n canManageControlPoints?: boolean\n ) {\n this.scope = new PaperScope();\n this.scope.setup(canvas);\n this.scope.settings.handleSize = this.handleSize;\n this.fixedSegmentAmount = fixedSegmentAmount;\n this.hideAxes = hideAxes;\n this.hideActionLabel = hideActionLabel;\n this.horizontalGraph = horizontalGraph;\n this.deltaTransform = deltaTransform;\n this.pathColor = pathColor ?? PATH_COLOR;\n\n new this.scope.Tool();\n const {\n Color,\n Group,\n Path,\n Point,\n PointText,\n Rectangle,\n Segment,\n project,\n view,\n tool,\n } = this.scope;\n\n project.currentStyle.fontFamily = 'Inter';\n project.currentStyle.fontSize = 12;\n project.currentStyle.fontWeight = 500;\n\n this.localPlotBounds = new Rectangle(0, 0, 100, 100);\n\n // initialize graph elements\n (() => {\n this.actionLabel = new PointText(new Point(0, 0));\n this.actionLabel.fillColor = new Color(TEXT_COLOR);\n\n this.verticalAxisLabel = new PointText(new Point(0, 0));\n this.verticalAxisLabel.rotation = -90;\n this.verticalAxisLabel.fillColor = new Color(TEXT_COLOR);\n this.verticalAxisLabel.content = 'VALUE';\n\n this.minLabel = new PointText(new Point(0, 0));\n this.minLabel.fillColor = new Color(TEXT_COLOR);\n this.minLabel.content = minLabel;\n\n this.maxLabel = new PointText(new Point(0, 0));\n this.maxLabel.fillColor = new Color(TEXT_COLOR);\n this.maxLabel.content = maxLabel;\n\n this.midLabel = new PointText(new Point(0, 0));\n this.midLabel.fillColor = new Color(TEXT_COLOR);\n this.midLabel.content = midLabel ?? '';\n\n this.axes = new Path();\n this.axes.strokeColor = new Color(AXIS_COLOR);\n })();\n\n // initialize path\n (() => {\n this.path = new Path();\n this.path.selectedColor = new Color(this.pathColor);\n this.path.strokeColor = new Color(this.pathColor);\n this.path.strokeWidth = 2;\n this.path.strokeScaling = false;\n\n this.verticalIntersector = new Path([\n new Segment(this.localPlotBounds.topLeft),\n new Segment(this.localPlotBounds.bottomLeft),\n ]);\n this.verticalIntersector.visible = false;\n\n this.plot = new Group([this.path, this.verticalIntersector]);\n this.plot.applyMatrix = false;\n })();\n\n let prevMouseMoveEv: paper.MouseEvent | undefined;\n let hitType: HitResultType | undefined;\n let segment: paper.Segment | undefined;\n let startMouseDownPoint: paper.Point | undefined;\n let startSegmentPoint: paper.Point | undefined;\n let startSegmentHandleIn: paper.Point | undefined;\n let startSegmentHandleOut: paper.Point | undefined;\n\n tool.onKeyDown = tool.onKeyUp = (ev: paper.ToolEvent) => {\n if (prevMouseMoveEv) {\n // simulate mouse move event with the modifiers changed\n view.onMouseMove?.({ ...prevMouseMoveEv, modifiers: ev.modifiers });\n }\n };\n\n view.onMouseMove = view.onMouseDown = (ev: paper.MouseEvent) => {\n if (ev.type === 'mousemove') {\n prevMouseMoveEv = ev;\n this.setActionLabel('');\n }\n const hitResult = project.hitTest(ev.point, this.hitTestOptions);\n if (!hitResult || !isHitResultType(hitResult.type)) return;\n\n if (ev.modifiers.shift) {\n const segment = hitResult.segment;\n if (!this.fixedSegmentAmount) {\n switch (hitResult.type) {\n case 'segment':\n // can't delete first or last segment\n if (segment.isFirst() || segment.isLast()) break;\n\n if (ev.type === 'mousemove') {\n this.setActionLabel('Delete');\n } else if (ev.type === 'mousedown') {\n segment.remove();\n }\n break;\n case 'handle-in':\n if (ev.type === 'mousemove') {\n this.setActionLabel('Delete');\n } else if (ev.type === 'mousedown') {\n segment.handleIn = new Point(0, 0);\n }\n break;\n case 'handle-out':\n if (ev.type === 'mousemove') {\n this.setActionLabel('Delete');\n } else if (ev.type === 'mousedown') {\n segment.handleOut = new Point(0, 0);\n }\n break;\n }\n }\n return;\n }\n\n switch (hitResult.type) {\n case 'stroke':\n if (canManageControlPoints === true && !this.fixedSegmentAmount) {\n if (ev.type === 'mousemove') {\n this.setActionLabel('Add');\n } else if (ev.type === 'mousedown') {\n hitType = 'segment';\n const localEvPoint = this.plot.globalToLocal(ev.point);\n\n segment = this.path.insert(\n hitResult.location.index + 1,\n localEvPoint\n );\n segment.selected = true;\n this.path.smooth({\n type: 'catmull-rom',\n factor: 0.5,\n from: segment.previous,\n to: segment.next,\n });\n }\n }\n break;\n case 'segment':\n case 'handle-in':\n case 'handle-out':\n if (ev.type === 'mousemove') {\n this.setActionLabel('Move');\n } else if (ev.type === 'mousedown') {\n hitType = hitResult.type;\n segment = hitResult.segment;\n startMouseDownPoint = ev.point.clone();\n startSegmentPoint = segment.point.clone();\n startSegmentHandleIn = segment.handleIn.clone();\n startSegmentHandleOut = segment.handleOut.clone();\n }\n break;\n }\n };\n\n view.onMouseDrag = (ev: paper.MouseEvent) => {\n if (!segment || !startMouseDownPoint) return;\n\n const localEvPoint = this.plot.globalToLocal(ev.point);\n const localStartMouseDownPoint =\n this.plot.globalToLocal(startMouseDownPoint);\n const localDelta = localEvPoint.subtract(localStartMouseDownPoint);\n switch (hitType) {\n case 'segment': {\n if (!startSegmentPoint) break;\n\n let pointDelta;\n if (this.deltaTransform != null) {\n pointDelta = this.deltaTransform(segment, localDelta);\n } else {\n pointDelta =\n segment.isFirst() || segment.isLast()\n ? new Point(0, localDelta.y)\n : localDelta;\n }\n\n const newPoint = startSegmentPoint.add(pointDelta);\n segment.point = newPoint;\n segment.point.x = Math.min(\n Math.max(\n this.localPlotBounds.left,\n newPoint.x,\n ...(segment.previous\n ? [\n segment.previous.point.x - segment.handleIn.x,\n segment.previous.point.x + segment.previous.handleOut.x,\n ]\n : [])\n ),\n this.localPlotBounds.right,\n ...(segment.next\n ? [\n segment.next.point.x - segment.handleOut.x,\n segment.next.point.x + segment.next.handleIn.x,\n ]\n : [])\n );\n segment.point.y = Math.min(\n Math.max(this.localPlotBounds.top, newPoint.y),\n this.localPlotBounds.bottom\n );\n break;\n }\n case 'handle-in': {\n if (!startSegmentHandleIn) break;\n\n const newPoint = startSegmentHandleIn.add(localDelta);\n const minX = segment.previous\n ? segment.previous.point.x - segment.point.x\n : Number.NEGATIVE_INFINITY;\n segment.handleIn.x = Math.min(Math.max(minX, newPoint.x), 0);\n segment.handleIn.y = newPoint.y;\n break;\n }\n case 'handle-out': {\n if (!startSegmentHandleOut) break;\n\n const newPoint = startSegmentHandleOut.add(localDelta);\n const maxX = segment.next\n ? segment.next.point.x - segment.point.x\n : Number.POSITIVE_INFINITY;\n segment.handleOut.x = Math.min(Math.max(0, newPoint.x), maxX);\n segment.handleOut.y = newPoint.y;\n break;\n }\n }\n\n if (!this.isPathValid()) {\n this.path.selectedColor = new Color(INVALID_COLOR);\n this.path.strokeColor = new Color(INVALID_COLOR);\n } else {\n this.path.selectedColor = new Color(this.pathColor);\n this.path.strokeColor = new Color(this.pathColor);\n }\n };\n\n view.onMouseUp = () => {\n prevMouseMoveEv = undefined;\n hitType = undefined;\n segment = undefined;\n startMouseDownPoint = undefined;\n startSegmentPoint = undefined;\n startSegmentHandleIn = undefined;\n startSegmentHandleOut = undefined;\n };\n\n view.onResize = (_ev: { size: paper.Size; delta: paper.Size }) => {\n this.onResize(_ev.size.width, _ev.size.height);\n };\n this.draw();\n }\n\n getViewSize() {\n return this.scope.view.viewSize;\n }\n\n getSegments() {\n return this.path.segments;\n }\n\n onResize(w: number, h: number) {\n const { view } = this.scope;\n view.viewSize.width = w;\n view.viewSize.height = h;\n this.draw();\n }\n\n private calcScreenCoordOutput(input: number) {\n // just return the output values for the ends in case the intersection algorithm doesn't work correctly\n if (input <= this.path.firstSegment.point.x) {\n return this.path.firstSegment.point.y;\n }\n if (input >= this.path.lastSegment.point.x) {\n return this.path.lastSegment.point.y;\n }\n\n this.verticalIntersector.position.x = input;\n const intersections = this.verticalIntersector.getIntersections(this.path);\n if (intersections.length !== 1) {\n throw new Error(\n `${intersections.length} intersection(s) found. Number of vertical insersections should be exactly 1.`\n );\n }\n return intersections[0].point.y;\n }\n\n /**\n * Treat `path` as a function on a cartesian plane and calculate the output value for a given\n * input value.\n * @param input Input value between 0 and 100 inclusive\n * @returns Output value between 0 and 100 inclusive\n */\n calcOutput(input: number) {\n // convert from screen coordinates to cartesian coordinates\n return 100 - this.calcScreenCoordOutput(input);\n }\n\n setActionLabel(text: string) {\n this.actionLabel.content = this.hideActionLabel ? '' : text;\n this.drawActionLabel();\n }\n\n setLabels({ minLabel, maxLabel }: { minLabel: string; maxLabel: string }) {\n this.minLabel.content = minLabel;\n this.maxLabel.content = maxLabel;\n this.drawLabels();\n }\n\n /**\n * Path is set on a 100x100 plane with screen coordinates (coords start from the top left).\n * @param inputSegments\n */\n setPath(inputSegments: SerializedSegment[]) {\n const { Segment } = this.scope;\n\n this.path.removeSegments();\n inputSegments.forEach(({ point, handleIn, handleOut }) => {\n this.path.add(new Segment(point, handleIn, handleOut));\n });\n this.path.fullySelected = true;\n }\n\n /**\n * Converts path segments into a form that can be serialized more easily and restored from.\n * @returns Array of `SerializedSegment`\n */\n exportPath(): SerializedSegment[] {\n return this.path.segments.map((segment) => {\n const { point, handleIn, handleOut } = segment;\n const serializedSegment: SerializedSegment = {\n point: { x: point.x, y: point.y },\n };\n if (segment.hasHandles()) {\n serializedSegment.handleIn = {\n x: handleIn.x,\n y: handleIn.y,\n };\n serializedSegment.handleOut = {\n x: handleOut.x,\n y: handleOut.y,\n };\n }\n return serializedSegment;\n });\n }\n\n /**\n * @param callback\n * @returns Handler function that can be passed in to `removeMouseUpEventListener`.\n */\n addMouseUpEventListener(\n callback: (\n ev: paper.MouseEvent,\n customEv: {\n calcOutput: CalcOutputFn;\n isPathValid: boolean;\n segments: paper.Segment[];\n }\n ) => void\n ) {\n const handler = (ev: paper.MouseEvent) => {\n callback(ev, {\n calcOutput: (input: number) => this.calcOutput(input),\n isPathValid: this.isPathValid(),\n segments: this.path.segments,\n });\n };\n this.scope.view.on('mouseup', handler);\n return handler;\n }\n\n /**\n * @param handler Pass in the return of `addMouseUpEventListener` in order to remove the listener.\n */\n removeMouseUpEventListener(handler: (ev: paper.MouseEvent) => void) {\n this.scope.view.off('mouseup', handler);\n }\n\n private isPathValid() {\n if (!this.path.isInside(this.localPlotBounds)) {\n return false;\n }\n\n for (const segment of this.path.segments) {\n const { previous, next, point, handleIn, handleOut } = segment;\n if (\n (previous && point.x + handleIn.x < previous.point.x) ||\n (next && point.x + handleOut.x > next.point.x)\n ) {\n return false;\n }\n }\n return true;\n }\n\n private getPlotBounds() {\n const { Rectangle, Point, view } = this.scope;\n\n const left = this.hideAxes ? 0 : this.labelHeight + this.spacing;\n const top = this.hideAxes ? 0 : this.handleSize / 2 + 1;\n const right =\n view.bounds.width - (this.hideAxes ? 0 : this.handleSize / 2 + 1);\n const bottom =\n view.bounds.height -\n (this.hideAxes ? 0 : this.spacing + this.labelHeight);\n return new Rectangle(new Point(left, top), new Point(right, bottom));\n }\n\n private draw() {\n if (!this.hideAxes) {\n this.drawAxes();\n }\n if (!this.hideActionLabel) {\n this.drawActionLabel();\n }\n if (!this.hideAxes) {\n this.drawLabels();\n }\n this.drawPlot();\n }\n\n private drawAxes() {\n const { Point } = this.scope;\n\n const plotBounds = this.getPlotBounds();\n\n this.axes.removeSegments();\n this.axes.add(new Point(plotBounds.left, plotBounds.top));\n this.axes.add(new Point(plotBounds.left, plotBounds.bottom));\n this.axes.add(new Point(plotBounds.left, plotBounds.bottom));\n this.axes.add(new Point(plotBounds.right, plotBounds.bottom));\n }\n\n private drawActionLabel() {\n const { Point, view } = this.scope;\n\n this.actionLabel.position = view.bounds.topRight.add(\n new Point(\n -(this.actionLabel.bounds.width / 2 + this.spacing),\n this.actionLabel.bounds.height / 2 + this.spacing\n )\n );\n }\n\n private drawLabels() {\n const { Point } = this.scope;\n\n const plotBounds = this.getPlotBounds();\n\n this.verticalAxisLabel.position = new Point(\n plotBounds.left - this.labelHeight / 2 - this.spacing,\n plotBounds.top + this.verticalAxisLabel.bounds.height / 2\n );\n\n const horizontalAxisLabelY =\n plotBounds.bottom + this.labelHeight / 2 + this.spacing;\n this.minLabel.position = new Point(\n plotBounds.left + this.minLabel.bounds.width / 2,\n horizontalAxisLabelY\n );\n this.maxLabel.position = new Point(\n plotBounds.right - this.maxLabel.bounds.width / 2,\n horizontalAxisLabelY\n );\n this.midLabel.position = new Point(\n plotBounds.center.x,\n horizontalAxisLabelY\n );\n }\n\n private drawPlot() {\n const { Point } = this.scope;\n const plotBounds = this.getPlotBounds();\n this.plot.matrix.reset();\n this.plot.translate(plotBounds.topLeft);\n this.plot.scale(\n plotBounds.width / 100,\n plotBounds.height / 100,\n plotBounds.topLeft\n );\n if (this.horizontalGraph) {\n this.plot.rotate(90, plotBounds.topLeft);\n this.plot.translate(\n new Point(plotBounds.bottomLeft.y - plotBounds.topLeft.y, 0)\n );\n this.plot.scale(\n plotBounds.width / plotBounds.height,\n plotBounds.height / plotBounds.width,\n plotBounds.topLeft\n );\n }\n }\n}\n","import {\n MutableRefObject,\n RefCallback,\n RefObject,\n useCallback,\n useEffect,\n useRef,\n} from 'react';\nimport { useMeasure } from 'react-use';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { Feature } from 'src/WebApiController';\n\nimport * as styles from './BezierGraph.css';\nimport {\n BezierGraphManager,\n CalcOutputFn,\n SerializedSegment,\n} from './BezierGraphManager';\n\nexport type OnDragEndFn = (customEv: {\n calcOutput: CalcOutputFn;\n /**\n * Whether the path is valid.\n *\n * Will return `false` if path is out of bounds or if it has multiple y values for a single x\n * value.\n */\n isPathValid: boolean;\n segments: paper.Segment[];\n}) => void;\n\nexport type OnResizedFn = (resizedEv: {\n segments: paper.Segment[];\n height: number;\n width: number;\n}) => void;\n\nexport type BezierGraphProps = {\n segments: SerializedSegment[];\n minLabel: string;\n midLabel?: string;\n maxLabel: string;\n /**\n * If set to `true`, the number of segments will be fixed, i.e. disable add/remove segments.\n * Default is `false`.\n */\n fixedSegmentAmount?: boolean;\n hideAxes?: boolean;\n hideActionLabel?: boolean;\n horizontalGraph?: boolean;\n /**\n * Function to transform the delta when dragging a section.\n * @param segment segment being dragging\n * @param delta\n * @returns transformed delta\n */\n deltaTransform?: (segment: paper.Segment, delta: paper.Point) => paper.Point;\n pathColor?: string;\n parentRef?: RefObject;\n /**\n * This ref callback can be used to obtain the `calcOutput` function in case it is needed outside\n * of `onDragEnd` events.\n *\n * @see BezierGraphManager#calcOutput()\n *\n * Alternatively, `calcOutput` will also be passed into the `onDragEnd` callback. Both copies of\n * the function can be used interchangeably.\n * @param calcOutput\n */\n calcOutputRef?:\n | MutableRefObject\n | RefCallback;\n exportPathRef?:\n | MutableRefObject<(() => SerializedSegment[]) | undefined>\n | RefCallback<() => SerializedSegment[]>;\n onPathSetFromSegments?: (ev: { segments: paper.Segment[] }) => void;\n onDragEnd?: OnDragEndFn;\n onResized?: OnResizedFn;\n};\n\nexport function BezierGraph({\n segments,\n minLabel,\n midLabel,\n maxLabel,\n fixedSegmentAmount = false,\n hideAxes = false,\n hideActionLabel = false,\n horizontalGraph = false,\n deltaTransform,\n pathColor,\n calcOutputRef,\n exportPathRef,\n onPathSetFromSegments,\n onDragEnd,\n onResized,\n}: BezierGraphProps) {\n const canManageControlPoints = useUserHasFeature(\n Feature.BezierGraphControlPointsManager\n );\n const managerRef = useRef();\n const [viewportRef, { height: viewportHeight, width: viewportWidth }] =\n useMeasure();\n\n useEffect(() => {\n managerRef.current?.setPath(segments);\n if (onPathSetFromSegments && managerRef.current) {\n onPathSetFromSegments({ segments: managerRef.current.getSegments() });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [segments]);\n\n useEffect(() => {\n managerRef.current?.setLabels({ minLabel, maxLabel });\n }, [minLabel, maxLabel]);\n\n useEffect(() => {\n const manager = managerRef.current;\n if (onDragEnd && manager) {\n const handler = manager.addMouseUpEventListener((_ev, customEv) => {\n onDragEnd(customEv);\n });\n return () => manager.removeMouseUpEventListener(handler);\n }\n }, [onDragEnd]);\n\n const canvasRef = useCallback>((canvas) => {\n if (canvas && !managerRef.current) {\n // XXX Fix for `onResize` not being called when the canvas visibility is changed.\n // When the canvas is not visible in the browser viewport it seems like the dimensions are not\n // properly set. Therefore, we need to call `onResize` manually to properly rerender the\n // graph.\n // TODO this can be revaluated on whether it is still required if we either:\n // 1. Change to a different method for obtaining graph values without having to render the\n // canvas.\n // 2. Change to a different method of hiding the canvas in `SeatScoreConfigCard` that retains\n // the correct canvas size even when hidden.\n const observer = new MutationObserver(() => {\n const bounds = canvas.getBoundingClientRect();\n managerRef.current?.onResize(bounds.width, bounds.height);\n });\n if (canvas.parentElement) {\n // XXX Because viewport visibility is set in `SeatScoreConfigCard`, we pass the parent\n // element here. The correctness of this may change if the html structure of\n // `SeatScoreConfigCard` changes. For example, if the visibility control is moved to another\n // element, we will need to change this to that element.\n // TODO It may be good to change the observed element to an element controlled by this\n // component in the future.\n observer.observe(canvas.parentElement, { attributes: true });\n }\n\n const manager = new BezierGraphManager(\n canvas,\n {\n minLabel,\n midLabel,\n maxLabel,\n },\n fixedSegmentAmount,\n hideAxes,\n hideActionLabel,\n horizontalGraph,\n pathColor,\n deltaTransform,\n canManageControlPoints\n );\n managerRef.current = manager;\n\n if (calcOutputRef) {\n setRef(calcOutputRef, (input: number) => manager.calcOutput(input));\n }\n if (exportPathRef) {\n setRef(exportPathRef, () => manager.exportPath());\n }\n\n return () => {\n observer.disconnect();\n };\n }\n }, []); // eslint-disable-line react-hooks/exhaustive-deps\n\n useEffect(() => {\n if (viewportHeight && viewportWidth) {\n const currentViewSize = managerRef.current?.getViewSize();\n if (\n currentViewSize?.width === viewportWidth &&\n currentViewSize?.height === viewportHeight\n ) {\n return;\n }\n\n managerRef.current?.onResize(viewportWidth, viewportHeight);\n onResized?.({\n segments: managerRef.current?.getSegments() ?? [],\n height: viewportHeight,\n width: viewportWidth,\n });\n }\n }, [onResized, viewportHeight, viewportWidth]);\n\n return (\n
    \n \n
    \n );\n}\n\ntype Ref = MutableRefObject | RefCallback;\n\nfunction setRef(ref: Ref, val: T) {\n if (typeof ref === 'function') {\n ref(val);\n } else {\n ref.current = val;\n }\n}\n","import { Point } from 'paper';\nimport { MutableRefObject } from 'react';\nimport { RowRelativeScoreInfo } from 'src/components/Events/RowRelativeScoreDisplay';\nimport {\n BezierGraph,\n OnResizedFn,\n SerializedSegment,\n} from 'src/core/POS/BezierGraph';\nimport { CalcOutputFn } from 'src/core/POS/BezierGraph/BezierGraphManager';\nimport { roundToPrecision } from 'src/utils/numberFormatter';\n\nimport * as styles from './ChangeRowScoreDialog.css';\n\nexport const GRAPH_WIDTH_PERCENTAGE = 60;\nexport const DEFAULT_ROW_GAP_PX = 10;\n// When the height of a single row is available, we want to set height of\n// gap to ${ROW_HEIGHT * ROW_GAP_RATIO} to keep whole graph proportional\nexport const ROW_GAP_RATIO = 0.42;\nconst PATH_COLOR = '#33b2b1';\nexport const INITIAL_ROW_SCORE_SEGMENTS: SerializedSegment[] = [\n { point: { x: 0.5, y: 50 } },\n {\n point: { x: 50, y: 50 },\n handleIn: { x: -10, y: 0 },\n handleOut: { x: 10, y: 0 },\n },\n { point: { x: 100 - 0.5, y: 50 } },\n];\n\nconst calcCoordinateForRow = (\n i: number,\n rowDataToEdit: RowRelativeScoreInfo[],\n rowHeight: number,\n gapHeight: number,\n totalDivHeight: number\n) => {\n let x;\n if (rowHeight > 0) {\n x = ((i * (gapHeight + rowHeight) + rowHeight / 2) / totalDivHeight) * 100;\n } else {\n x = ((i + 0.5) / rowDataToEdit.length) * 100;\n }\n x = Math.max(Math.min(100, x), 0);\n return x;\n};\n\nexport const calcBoundsForRow = (\n i: number,\n len: number,\n rowHeight: number,\n gapHeight: number,\n totalDivHeight: number\n) => {\n let xMin, xMax;\n if (rowHeight > 0) {\n xMin =\n ((i * (gapHeight + rowHeight) - 0.5 * gapHeight) / totalDivHeight) * 100;\n xMax =\n (((i + 1) * (gapHeight + rowHeight) - 0.5 * gapHeight) / totalDivHeight) *\n 100;\n } else {\n xMin = (i / len) * 100;\n xMax = ((i + 1) / len) * 100;\n }\n xMin = Math.max(0, xMin);\n xMax = Math.min(100, xMax);\n\n return {\n xMin,\n xMax,\n };\n};\n\nconst findRowIndexForX = (\n x: number,\n len: number,\n rowHeight: number,\n gapHeight: number,\n totalDivHeight: number\n) => {\n // Using for loop here to find the index of the row instead of math\n // for better readability\n for (let i = 0; i < len; i++) {\n const { xMin, xMax } = calcBoundsForRow(\n i,\n len,\n rowHeight,\n gapHeight,\n totalDivHeight\n );\n if (x >= xMin && x < xMax) {\n return i;\n }\n }\n return len - 1;\n};\n\nexport const getUpdatedRowData = (\n segments: paper.Segment[],\n calcScoreOutput: CalcOutputFn,\n rowDataToEdit: RowRelativeScoreInfo[],\n rowHeight: number,\n gapHeight: number\n) => {\n const totalDivHeight =\n rowDataToEdit.length * (rowHeight + gapHeight) - gapHeight;\n const baseRowSegmentX = segments[1] != null ? segments[1].point.x : undefined;\n const baseRowIdx =\n baseRowSegmentX != null\n ? findRowIndexForX(\n baseRowSegmentX,\n rowDataToEdit.length,\n rowHeight,\n gapHeight,\n totalDivHeight\n )\n : undefined;\n\n for (let i = 0; i < rowDataToEdit.length; i++) {\n // [0, 100] -> [-100, 100]\n const x = calcCoordinateForRow(\n i,\n rowDataToEdit,\n rowHeight,\n gapHeight,\n totalDivHeight\n );\n const percentage = calcScoreOutput(x) * 2 - 100;\n // Keeping actual value and display value consistent - both rounding to 1 decimal\n rowDataToEdit[i].percentage = roundToPrecision(percentage, 1);\n\n if (baseRowIdx != null) {\n rowDataToEdit[i].isBase = baseRowIdx === i;\n }\n if (baseRowIdx === i) {\n // Always override the base percentage to 0\n rowDataToEdit[i].percentage = 0;\n }\n }\n\n return [...rowDataToEdit];\n};\n\nexport const ChangeRowScoreBody = ({\n rowList,\n initialSegments,\n calcScoreOutputRef,\n exportScorePathRef,\n rowDataToEdit,\n gapHeight,\n onUpdateRowScores,\n onResized,\n}: {\n rowList: JSX.Element[];\n initialSegments: SerializedSegment[];\n calcScoreOutputRef: MutableRefObject;\n exportScorePathRef: MutableRefObject<(() => SerializedSegment[]) | undefined>;\n rowDataToEdit: RowRelativeScoreInfo[];\n gapHeight: number;\n onUpdateRowScores: (segments: paper.Segment[]) => void;\n onResized?: OnResizedFn;\n}) => {\n return (\n \n {rowList}\n \n {rowDataToEdit.length > 1 && (\n {\n if (segment.isFirst() || segment.isLast()) {\n // First and last point should only move horizontally\n return new Point(0, localDelta.y);\n }\n // Middle point should only move vertically\n return new Point(localDelta.x, 0);\n }}\n onDragEnd={({ isPathValid, segments }) => {\n if (isPathValid) {\n onUpdateRowScores(segments);\n }\n }}\n onResized={onResized}\n />\n )}\n \n \n );\n};\n","import { useCallback, useEffect, useMemo, useRef } from 'react';\nimport { useMeasure } from 'react-use';\nimport {\n RowRelativeScoreDisplay,\n RowRelativeScoreInfo,\n} from 'src/components/Events/RowRelativeScoreDisplay';\nimport { SerializedSegment } from 'src/core/POS/BezierGraph';\nimport { CalcOutputFn } from 'src/core/POS/BezierGraph/BezierGraphManager';\nimport { GraphSegments } from 'src/modals/EventSeatMapConfig/EventSeatMapConfigBody';\nimport {\n RowInfo,\n SectionInfo,\n SectionScoreOverride,\n} from 'src/WebApiController';\n\nimport {\n ChangeRowScoreBody,\n DEFAULT_ROW_GAP_PX,\n getUpdatedRowData,\n GRAPH_WIDTH_PERCENTAGE,\n INITIAL_ROW_SCORE_SEGMENTS,\n ROW_GAP_RATIO,\n} from './ChangeRowScoreBody';\nimport * as styles from './ChangeRowScoreDialog.css';\n\nexport const rowScoreFilter = ({ isSpeculative, ordinal }: RowInfo) =>\n !isSpeculative && ordinal != null;\n\nexport const rowScoreOverrideFilter =\n (speculativeRowIds: number[]) =>\n ({ rowId }: SectionScoreOverride) =>\n !speculativeRowIds.includes(rowId);\n\nexport type ChangeRowScoreBodyMultiSectionProps = {\n selectedSections: SectionInfo[];\n rowDataToEdit: RowRelativeScoreInfo[];\n setRowDataToEdit: React.Dispatch<\n React.SetStateAction\n >;\n configPayload: string | null;\n setConfigPayload: (configPayload: string | null) => void;\n initialSegmentsFromConfig: SerializedSegment[] | undefined;\n};\n\nexport const ChangeRowScoreBodyMultiSection = ({\n selectedSections,\n rowDataToEdit,\n setRowDataToEdit,\n configPayload,\n setConfigPayload,\n initialSegmentsFromConfig,\n}: ChangeRowScoreBodyMultiSectionProps) => {\n const [singleRowRef, { height: rowHeight }] = useMeasure();\n const gapHeight: number = useMemo(() => {\n if (!rowHeight) {\n return DEFAULT_ROW_GAP_PX;\n }\n return rowHeight * ROW_GAP_RATIO;\n }, [rowHeight]);\n\n const calcScoreOutputRef = useRef();\n const exportScorePathRef = useRef<() => SerializedSegment[]>();\n\n const onUpdateRowScores = useCallback(\n (segments: paper.Segment[]) => {\n const calcScoreOutput = calcScoreOutputRef.current;\n if (calcScoreOutput) {\n const newRowDataToEdit = getUpdatedRowData(\n segments,\n calcScoreOutput,\n rowDataToEdit,\n rowHeight,\n gapHeight\n );\n setRowDataToEdit(newRowDataToEdit);\n\n const configObj = configPayload\n ? (JSON.parse(configPayload) as GraphSegments)\n : {};\n\n configObj.scoreSegmentsBySection =\n configObj.scoreSegmentsBySection ?? {};\n configObj.activeRowIdsBySection = configObj.activeRowIdsBySection ?? {};\n configObj.baseRowIdBySection = configObj.baseRowIdBySection ?? {};\n\n selectedSections.forEach((s) => {\n const sectionId = s.id;\n const filteredRows = s.rows.filter(rowScoreFilter);\n\n configObj.scoreSegmentsBySection![sectionId.toString()] =\n exportScorePathRef.current?.();\n configObj.activeRowIdsBySection![sectionId.toString()] = rowDataToEdit\n .map(\n (r) => filteredRows.find((row) => row.ordinal === r.ordinal)?.id\n )\n .filter((r) => r !== undefined) as number[];\n\n const baseRowOrdinal = rowDataToEdit.find((r) => r.isBase)?.ordinal;\n const baseRowId = filteredRows.find(\n (r) => r.ordinal === baseRowOrdinal\n )?.id;\n configObj.baseRowIdBySection![sectionId.toString()] = baseRowId;\n });\n\n setConfigPayload(JSON.stringify(configObj));\n }\n },\n [\n configPayload,\n gapHeight,\n rowDataToEdit,\n rowHeight,\n selectedSections,\n setConfigPayload,\n setRowDataToEdit,\n ]\n );\n\n const rowList = rowDataToEdit.map((r, i) => (\n \n ));\n\n const initialSegments = useMemo(() => {\n return initialSegmentsFromConfig ?? INITIAL_ROW_SCORE_SEGMENTS;\n }, [initialSegmentsFromConfig]);\n\n const initializedRef = useRef();\n useEffect(() => {\n if (\n initialSegmentsFromConfig &&\n !initializedRef.current &&\n calcScoreOutputRef.current\n ) {\n onUpdateRowScores(initialSegmentsFromConfig as paper.Segment[]);\n initializedRef.current = true;\n }\n }, [initialSegmentsFromConfig, onUpdateRowScores]);\n\n return (\n
    \n \n
    \n );\n};\n","import { isEmpty } from 'lodash-es';\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { useMeasure } from 'react-use';\nimport {\n RowRelativeScoreDisplay,\n RowRelativeScoreInfo,\n} from 'src/components/Events/RowRelativeScoreDisplay';\nimport { SerializedSegment } from 'src/core/POS/BezierGraph';\nimport { CalcOutputFn } from 'src/core/POS/BezierGraph/BezierGraphManager';\nimport { GraphSegments } from 'src/modals/EventSeatMapConfig/EventSeatMapConfigBody';\n\nimport {\n ChangeRowScoreBody,\n DEFAULT_ROW_GAP_PX,\n getUpdatedRowData,\n GRAPH_WIDTH_PERCENTAGE,\n INITIAL_ROW_SCORE_SEGMENTS,\n ROW_GAP_RATIO,\n} from './ChangeRowScoreBody';\nimport * as styles from './ChangeRowScoreDialog.css';\n\nexport type ChangeRowScoreBodySingleSectionProps = {\n sectionId: number;\n rowDataToEdit: RowRelativeScoreInfo[];\n setRowDataToEdit: React.Dispatch<\n React.SetStateAction\n >;\n configPayload: string | null;\n setConfigPayload: (configPayload: string | null) => void;\n};\n\nexport const ChangeRowScoreBodySingleSection = ({\n sectionId,\n rowDataToEdit,\n setRowDataToEdit,\n configPayload,\n setConfigPayload,\n}: ChangeRowScoreBodySingleSectionProps) => {\n const [singleRowRef, { height: rowHeight }] = useMeasure();\n const gapHeight: number = useMemo(() => {\n if (!rowHeight) {\n return DEFAULT_ROW_GAP_PX;\n }\n return rowHeight * ROW_GAP_RATIO;\n }, [rowHeight]);\n\n const calcScoreOutputRef = useRef();\n const exportScorePathRef = useRef<() => SerializedSegment[]>();\n const [isNumRowsChanged, setIsNumRowsChanged] = useState(false);\n\n const graphSegments = useMemo(() => {\n if (configPayload) {\n try {\n const obj = JSON.parse(configPayload) as GraphSegments;\n return obj;\n } catch (e) {\n console.warn(`Unable to parse as GraphSegments: ${configPayload}`);\n return {};\n }\n }\n }, [configPayload]);\n\n const onUpdateRowScores = useCallback(\n (segments: paper.Segment[]) => {\n const calcScoreOutput = calcScoreOutputRef.current;\n if (calcScoreOutput) {\n const newRowDataToEdit = getUpdatedRowData(\n segments,\n calcScoreOutput,\n rowDataToEdit,\n rowHeight,\n gapHeight\n );\n setRowDataToEdit(newRowDataToEdit);\n\n const configObj = { ...graphSegments };\n\n configObj.scoreSegmentsBySection =\n configObj.scoreSegmentsBySection ?? {};\n configObj.activeRowIdsBySection = configObj.activeRowIdsBySection ?? {};\n configObj.baseRowIdBySection = configObj.baseRowIdBySection ?? {};\n\n configObj.scoreSegmentsBySection[sectionId.toString()] =\n exportScorePathRef.current?.();\n configObj.activeRowIdsBySection[sectionId.toString()] =\n rowDataToEdit.map((r) => r.rowId!);\n configObj.baseRowIdBySection[sectionId.toString()] = rowDataToEdit.find(\n (r) => r.isBase\n )?.rowId;\n\n setConfigPayload(JSON.stringify(configObj));\n }\n },\n [\n gapHeight,\n graphSegments,\n rowDataToEdit,\n rowHeight,\n sectionId,\n setConfigPayload,\n setRowDataToEdit,\n ]\n );\n\n const rowList = rowDataToEdit.map((r, i) => (\n \n ));\n\n const initializedRef = useRef();\n useEffect(() => {\n const segmentsConfig = graphSegments?.scoreSegmentsBySection?.[sectionId];\n if (\n !isEmpty(segmentsConfig) &&\n !initializedRef.current &&\n calcScoreOutputRef.current\n ) {\n onUpdateRowScores(segmentsConfig as paper.Segment[]);\n initializedRef.current = true;\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [JSON.stringify(graphSegments), sectionId, onUpdateRowScores]);\n\n return (\n
    \n {\n if (isNumRowsChanged) {\n setIsNumRowsChanged(false);\n onUpdateRowScores(segments);\n }\n }}\n />\n
    \n );\n};\n","import { max } from 'lodash-es';\nimport {\n ComponentProps,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { RowRelativeScoreInfo } from 'src/components/Events/RowRelativeScoreDisplay';\nimport { Content } from 'src/contexts/ContentContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { Button } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getRowRepresentingSectionMedianScore } from 'src/utils/seatScoreUtils';\nimport { compareByNumericPrefix } from 'src/utils/tableUtils';\nimport { SectionInfo, SectionScoreOverride } from 'src/WebApiController';\n\nimport { rowScoreOverrideFilter } from './ChangeRowScoreBodyMultiSection';\nimport { ChangeRowScoreBodySingleSection } from './ChangeRowScoreBodySingleSection';\nimport * as styles from './ChangeRowScoreDialog.css';\n\nexport type ChangeRowScoreDialogProps = ComponentProps & {\n selectedSection: SectionInfo | null;\n configPayload: string | null;\n scoreOverrides?: SectionScoreOverride[] | null;\n onOkay: (\n newScoreOverrides: SectionScoreOverride[],\n newConfigPayload: string | null\n ) => void;\n onCancel: () => void;\n};\n\nexport const findScoreOverrideByRowId = (\n scoreOverrides: SectionScoreOverride[] | null | undefined,\n rowId: number | undefined\n): SectionScoreOverride | undefined => {\n return scoreOverrides?.find((s) => s.rowId === rowId);\n};\n\nconst sortRowData = (rowDataArr: RowRelativeScoreInfo[]) => {\n const ordinalAvailable = rowDataArr.every((r) => r.ordinal != null);\n const nameAvailable = rowDataArr.every((r) => r.rowName != null);\n if (ordinalAvailable) {\n rowDataArr = rowDataArr.toSorted(\n (a, b) => (a.ordinal ?? 0) - (b.ordinal ?? 0)\n );\n } else if (nameAvailable) {\n rowDataArr = rowDataArr.toSorted((a, b) =>\n compareByNumericPrefix(a.rowName, b.rowName)\n );\n } else {\n rowDataArr = rowDataArr.toSorted((a, b) => (a.rowId ?? 0) - (b.rowId ?? 0));\n }\n return rowDataArr;\n};\n\nexport function ChangeRowScoreDialog({\n selectedSection,\n configPayload,\n scoreOverrides,\n onOkay,\n onCancel,\n ...rest\n}: ChangeRowScoreDialogProps) {\n const [newConfigPayload, setNewConfigPayload] = useState(configPayload);\n const [rowDataToEdit, setRowDataToEdit] = useState(\n []\n );\n\n const sectionScoreOverride = useMemo(\n () =>\n scoreOverrides?.filter(\n ({ sectionId }) => sectionId === selectedSection?.id\n ),\n [scoreOverrides, selectedSection?.id]\n );\n\n const rowToScore = useMemo(\n () =>\n (scoreOverrides ?? [])\n .filter((s) => s.sectionId === selectedSection?.id)\n .reduce(\n (map, override) => {\n map[override.rowId] = override.score;\n return map;\n },\n {} as Record\n ),\n [scoreOverrides, selectedSection]\n );\n\n const rows = useMemo(\n () =>\n sectionScoreOverride?.filter(\n rowScoreOverrideFilter([selectedSection?.specRow?.id ?? 0])\n ) ?? [],\n [sectionScoreOverride, selectedSection?.specRow?.id]\n );\n\n useEffect(() => {\n setNewConfigPayload(configPayload);\n }, [configPayload]);\n\n useEffect(() => {\n if (!selectedSection?.id) {\n setRowDataToEdit([]);\n return;\n }\n\n // Initialize the row items\n const medianRowId = getRowRepresentingSectionMedianScore(\n selectedSection.id,\n scoreOverrides ?? []\n )?.rowId;\n const baseRowScore = medianRowId ? rowToScore[medianRowId] : 0;\n\n const rowScores = rows.map((row) => {\n const isBaseRow = row.rowId === medianRowId;\n const existingRowScore = rowToScore[row.rowId];\n const percentage =\n existingRowScore && baseRowScore && baseRowScore !== 1\n ? (existingRowScore / baseRowScore - 1) * 100\n : 0;\n\n return {\n rowId: row.rowId,\n rowName: row.rowName,\n ordinal: row.rowOrdinal,\n isBaseRow,\n percentage,\n } as RowRelativeScoreInfo;\n });\n sortRowData(rowScores);\n\n const rowData = [];\n for (let i = 0; i < rowScores.length; i++) {\n rowData.push(rowScores[i]);\n }\n setRowDataToEdit(rowData);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [selectedSection?.id, JSON.stringify(rows), JSON.stringify(rowToScore)]);\n\n const onSubmit = useCallback(() => {\n const newScoreOverrides = [...(scoreOverrides ?? [])];\n const newSectionScoreOverrides = newScoreOverrides.filter(\n (s) => s.sectionId === selectedSection?.id\n );\n\n const baseRow = rowDataToEdit.find((r) => r.isBase);\n if (!baseRow?.ordinal || !baseRow.rowId) {\n onOkay(newScoreOverrides, newConfigPayload);\n return;\n }\n\n const { rowId: baseRowId, ordinal: baseOrdinal } = baseRow;\n const baseRowScore = rowToScore[baseRowId];\n\n // all work based off this, so if this doesn't exist, nothing to do\n if (baseRowScore == null) {\n onOkay(newScoreOverrides, newConfigPayload);\n return;\n }\n\n const ordinals = (sectionScoreOverride || [])\n .filter(({ rowOrdinal }) => rowOrdinal && rowOrdinal <= baseOrdinal)\n .map(({ rowOrdinal }) => rowOrdinal);\n // Default to the max ordinal\n const sanitizedOrdinal = ordinals.includes(baseOrdinal)\n ? baseOrdinal\n : max(ordinals);\n const baseRowPercentage =\n rowDataToEdit.find(({ ordinal }) => ordinal === sanitizedOrdinal)\n ?.percentage ?? 0;\n\n for (let i = 0; i < rowDataToEdit.length; i++) {\n const rowId = rowDataToEdit[i].rowId;\n const rowScoreOverrideToEdit = newSectionScoreOverrides.find(\n (s) => s.rowId === rowId\n );\n if (\n rowScoreOverrideToEdit &&\n !rowDataToEdit[i].isBase &&\n rowDataToEdit[i]?.percentage != null\n ) {\n rowScoreOverrideToEdit.score =\n ((100 + (rowDataToEdit[i]?.percentage ?? 0)) /\n (100.0 + baseRowPercentage)) *\n baseRowScore;\n }\n }\n\n // We need to ensure all the speculative rows also set with the score (i'll be the base row score)\n newSectionScoreOverrides\n .filter((r) => r.rowId === selectedSection?.specRow?.id)\n .forEach((r) => (r.score = baseRowScore));\n\n onOkay(newScoreOverrides, newConfigPayload);\n }, [\n newConfigPayload,\n onOkay,\n rowDataToEdit,\n rowToScore,\n scoreOverrides,\n sectionScoreOverride,\n selectedSection?.id,\n selectedSection?.specRow?.id,\n ]);\n\n if (!selectedSection) {\n return null;\n }\n\n return (\n }\n onKeyUp={(e) => {\n if (e.key === 'Enter') {\n onSubmit();\n }\n }}\n footer={\n <>\n \n \n \n }\n onCancel={onCancel}\n >\n
    \n
    \n
    \n \n
    \n {selectedSection.name}\n
    \n
    \n
    \n
    \n \n
    \n
    \n \n );\n}\n","import { groupBy, isEqual, size } from 'lodash-es';\nimport {\n ComponentProps,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { RowRelativeScoreInfo } from 'src/components/Events/RowRelativeScoreDisplay';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ConfirmDialog } from 'src/core/interim/dialogs/ConfirmDialog';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { Button } from 'src/core/ui';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { GraphSegments } from 'src/modals/EventSeatMapConfig/EventSeatMapConfigBody';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SectionInfo, SectionScoreOverride } from 'src/WebApiController';\n\nimport {\n ChangeRowScoreBodyMultiSection,\n rowScoreFilter,\n rowScoreOverrideFilter,\n} from './ChangeRowScoreBodyMultiSection';\nimport { findScoreOverrideByRowId } from './ChangeRowScoreDialog';\nimport * as styles from './ChangeRowScoreDialog.css';\n\nexport type ChangeRowScoreDialogMultiSectionProps = ComponentProps<\n typeof RSModal\n> & {\n selectedSections: SectionInfo[];\n scoreOverrides?: SectionScoreOverride[] | null;\n configPayload: string | null;\n onOkay: (\n newScoreOverrides: SectionScoreOverride[],\n newConfigPayload: string | null\n ) => void;\n onCancel: () => void;\n};\n\nexport function ChangeRowScoreDialogMultiSection({\n selectedSections,\n scoreOverrides,\n configPayload,\n onOkay,\n onCancel,\n ...rest\n}: ChangeRowScoreDialogMultiSectionProps) {\n const confirmDialog = useBasicDialog();\n\n const [newConfigPayload, setNewConfigPayload] = useState(configPayload);\n\n const [rowDataToEdit, setRowDataToEdit] = useState(\n []\n );\n const selectedSectionIds = useMemo(\n () => selectedSections.map(({ id }) => id),\n [selectedSections]\n );\n const speculativeRowIds = useMemo(\n () =>\n selectedSections\n .filter(({ specRow }) => !!specRow)\n .map(({ specRow }) => specRow!.id),\n [selectedSections]\n );\n\n const sectionScoreOverride = useMemo(\n () => groupBy(scoreOverrides, 'sectionId'),\n [scoreOverrides]\n );\n\n // Reset the initial row data, mainly the size, the default value will be reset\n // from initialSegmentsFromConfig\n useEffect(() => {\n let maxRowNumber = 0;\n for (const section of selectedSections) {\n const eligibleRows = section.rows.filter(rowScoreFilter)?.length ?? 0;\n maxRowNumber = Math.max(eligibleRows, maxRowNumber);\n }\n for (const sectionId of selectedSectionIds) {\n const eligibleRows =\n sectionScoreOverride[sectionId]?.filter(\n rowScoreOverrideFilter(speculativeRowIds)\n )?.length ?? 0;\n maxRowNumber = Math.max(eligibleRows, maxRowNumber);\n }\n\n const allRowData: RowRelativeScoreInfo[] = [];\n for (let i = 0; i < maxRowNumber; i++) {\n // here RowRelativeScoreInfo represents a row in a section\n allRowData.push({\n ordinal: i,\n isBase: i === maxRowNumber / 2,\n percentage: 0,\n } as RowRelativeScoreInfo);\n }\n setRowDataToEdit(allRowData);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [selectedSections.length, setRowDataToEdit]);\n\n const configPayloadObj = useMemo(() => {\n if (configPayload) {\n let obj: GraphSegments | undefined = undefined;\n try {\n obj = JSON.parse(configPayload) as GraphSegments;\n } catch (e) {\n console.warn(`Unable to parse as GraphSegments: ${configPayload}`);\n }\n\n if (obj) {\n return obj;\n }\n }\n }, [configPayload]);\n\n // Should be true if all selected sections are configured together at once\n const initialSegmentsFromConfig = useMemo(() => {\n if (!configPayloadObj?.scoreSegmentsBySection) {\n return undefined;\n }\n\n const selectedScoreSegments = Object.entries(\n configPayloadObj.scoreSegmentsBySection\n )\n .filter(([key, _]) => selectedSectionIds.includes(parseInt(key)))\n .map(([_, value]) => value);\n\n if (size(selectedScoreSegments) < 1) {\n return undefined;\n }\n\n const common = selectedScoreSegments[0];\n if (selectedScoreSegments.every((section) => isEqual(section, common))) {\n return common;\n }\n return undefined;\n }, [configPayloadObj, selectedSectionIds]);\n\n const onSubmit = useCallback(() => {\n const newScoreOverrides = [...(scoreOverrides ?? [])];\n const newSectionScoreOverrides = newScoreOverrides.filter((s) =>\n selectedSections.some((ss) => ss.id === s.sectionId)\n );\n const baseRowIndex = rowDataToEdit.findIndex((r) => r.isBase);\n if (baseRowIndex < 0) {\n onOkay(newScoreOverrides, newConfigPayload);\n return;\n }\n\n for (const sectionId of selectedSectionIds) {\n const sectionRows = (sectionScoreOverride[sectionId] ?? [])\n .filter(rowScoreOverrideFilter(speculativeRowIds))\n .toSorted((a, b) => (a.rowOrdinal ?? 0) - (b.rowOrdinal ?? 0));\n const sanitizedIndex = Math.min(baseRowIndex, sectionRows.length - 1);\n\n const baseRowId = sectionRows[sanitizedIndex]?.rowId;\n const baseRowScore = findScoreOverrideByRowId(\n newSectionScoreOverrides,\n baseRowId\n )?.score;\n\n const baseRowPercentage = rowDataToEdit[sanitizedIndex]?.percentage ?? 0;\n\n if (baseRowScore) {\n // all work based off this, so if this doesn't exist, nothing to do\n for (let i = 0; i < rowDataToEdit.length; i++) {\n const rowId = sectionRows[i]?.rowId;\n\n const rowScoreOverrideToEdit = newSectionScoreOverrides.find(\n (s) => s.rowId === rowId\n );\n if (\n rowScoreOverrideToEdit &&\n !rowDataToEdit[i].isBase &&\n rowDataToEdit[i]?.percentage != null\n ) {\n rowScoreOverrideToEdit.score =\n ((100 + (rowDataToEdit[i]?.percentage ?? 0)) /\n (100.0 + baseRowPercentage)) *\n baseRowScore;\n }\n }\n\n // We need to ensure all the speculative rows also set with the score (it'll be the base row score)\n newSectionScoreOverrides\n .filter((r) => speculativeRowIds.includes(r.rowId))\n .forEach((r) => (r.score = baseRowScore));\n }\n\n onOkay(newScoreOverrides, newConfigPayload);\n }\n }, [\n newConfigPayload,\n onOkay,\n rowDataToEdit,\n scoreOverrides,\n sectionScoreOverride,\n selectedSectionIds,\n selectedSections,\n speculativeRowIds,\n ]);\n\n const sectionNameWithEllipsis = useMemo(() => {\n const maxSectionsToShow = 5;\n const sectionNames = selectedSections.map((s) => s.name);\n if (sectionNames.length > maxSectionsToShow) {\n return `${sectionNames.slice(0, maxSectionsToShow).join(', ')}...`;\n }\n return sectionNames.join(', ');\n }, [selectedSections]);\n\n if (!selectedSections.length) {\n return null;\n }\n\n return (\n <>\n }\n onKeyUp={(e) => e.key === 'Enter' && confirmDialog.launchDialog()}\n footer={\n <>\n \n \n \n }\n onCancel={onCancel}\n >\n
    \n
    \n
    \n \n s.name).join(', ')}\n >\n {sectionNameWithEllipsis}\n
    \n
    \n
    \n
    \n \n
    \n \n \n }\n bodyText={}\n onOkay={() => {\n onSubmit();\n confirmDialog.closeDialog();\n }}\n onCancel={() => confirmDialog.closeDialog()}\n />\n \n );\n}\n","/* eslint-disable react-hooks/exhaustive-deps */\nimport { isEmpty } from 'lodash-es';\nimport {\n ChangeEvent,\n ComponentProps,\n KeyboardEvent,\n useCallback,\n useMemo,\n useState,\n} from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { CancelButton } from 'src/components/Buttons';\nimport { OkButton } from 'src/components/Buttons/OkButton';\nimport { Content } from 'src/contexts/ContentContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { PillList } from 'src/core/ui/PillList';\nimport { PillItemProps } from 'src/core/ui/PillList/PillItem';\nimport { CheckIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nexport type AddSectionRowsDialogProps = ComponentProps & {\n onClose: () => void;\n onAddRows: (rows: string[]) => void;\n};\n\nexport const AddSectionRowsDialog: React.FC = ({\n onClose,\n onAddRows,\n ...rest\n}) => {\n const [rowInput, setRowInput] = useState('');\n const [rows, setRows] = useState([]);\n\n const pills = useMemo(() => {\n return rows.map((row) => ({ value: row, display: row }) as PillItemProps);\n }, [rows]);\n\n const onSubmitChange = useCallback(() => {\n onAddRows(rows);\n onClose();\n }, [rows, onAddRows]);\n\n const onRowInputChange = useCallback(\n (event: ChangeEvent) => {\n event.stopPropagation();\n setRowInput(event.target.value);\n },\n []\n );\n\n const onAddRow = useCallback(() => {\n if (!isEmpty(rowInput)) {\n setRows((prev) => {\n if (!prev.includes(rowInput)) {\n return [...prev, rowInput];\n }\n return prev;\n });\n setRowInput('');\n }\n }, [rowInput, setRows, setRowInput]);\n\n const onKeyUp = useCallback(\n (event: KeyboardEvent) => {\n if (event.key === 'Enter') {\n event.stopPropagation();\n if (!isEmpty(rowInput)) {\n setRows((prev) => {\n if (!prev.includes(rowInput)) {\n return [...prev, rowInput];\n }\n return prev;\n });\n setRowInput('');\n }\n }\n },\n [rowInput, setRows, setRowInput]\n );\n\n return (\n }\n footer={\n \n \n \n \n }\n onCancel={onClose}\n >\n \n )\n }\n />\n {rows.length > 0 && (\n \n setRows((prev) => prev.filter((v) => v !== value))\n }\n direction={'row'}\n flexWrap={'grow'}\n />\n )}\n \n );\n};\n","import { useSortable } from '@dnd-kit/sortable';\nimport { CSS } from '@dnd-kit/utilities';\nimport { Cell, flexRender } from '@tanstack/react-table';\nimport { CSSProperties, forwardRef, HTMLAttributes } from 'react';\nimport { vars } from 'src/core/themes';\n\nimport { SectionRowColumnType } from './config/SectionRowTableConfig';\nimport { EnrichedScoreOrverride } from './SectionRowTableDialog.hooks';\n\ntype SortableCellProps = {\n cell: Cell;\n isLargeDesktop?: boolean;\n};\n\nexport const SortableCell: React.FC = ({ cell }) => {\n const {\n isDragging,\n attributes,\n listeners,\n setNodeRef,\n transform,\n transition,\n } = useSortable({ id: cell.id });\n\n const style = {\n transform: CSS.Transform.toString(transform),\n transition: transition || undefined,\n paddingTop: vars.spacing['sm'],\n paddingBottom: vars.spacing['sm'],\n color: ((cell.getValue() ?? {}) as EnrichedScoreOrverride).isNew\n ? vars.color.textWarning\n : undefined,\n };\n\n return (\n \n );\n};\n\ntype CellItemProps = HTMLAttributes & {\n cell: Cell;\n draggable?: boolean;\n isDragging?: boolean;\n};\n\n// eslint-disable-next-line react/display-name\nexport const CellItem = forwardRef(\n ({ cell, draggable = true, isDragging, style, ...props }, ref) => {\n const inlineStyles: CSSProperties = {\n opacity: isDragging ? '0.5' : '1',\n transformOrigin: '50% 50%',\n cursor: draggable ? (isDragging ? 'grabbing' : 'grab') : undefined,\n ...style,\n };\n\n return (\n
    \n );\n }\n);\n","import { ColumnDef } from '@tanstack/react-table';\nimport { Content } from 'src/contexts/ContentContext';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { TableHeaderCellDiv } from 'src/core/ui/TableHeaderCellDiv';\nimport { TableShimmeringDiv } from 'src/tables/Table/Table.styled';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport * as styles from '../SectionRowTableDialog.css';\nimport { EnrichedScoreOrverride } from '../SectionRowTableDialog.hooks';\n\nexport const indexFromCellId = (id?: string) =>\n parseInt(id?.split('_')?.[1] || '0');\n\nexport type SectionRowColumnType = {\n section: string;\n sectionId: number;\n rows: EnrichedScoreOrverride[];\n unordered: EnrichedScoreOrverride[];\n};\n\nconst ordinalWithSuffix = (num: number) => {\n const remaining = num % 10,\n hundreds = num % 100;\n if (remaining === 1 && hundreds !== 11) {\n return num + 'st';\n }\n if (remaining === 2 && hundreds !== 12) {\n return num + 'nd';\n }\n if (remaining === 3 && hundreds !== 13) {\n return num + 'rd';\n }\n return num + 'th';\n};\n\nconst getRowColumns = (maxRowCount: number) => {\n const columns: ColumnDef[] = [];\n for (let index = 1; index <= maxRowCount; index++) {\n columns.push({\n id: `${index}`,\n header: () => (\n \n {ordinalWithSuffix(index)}\n \n ),\n accessorFn: (data) => data?.rows?.[index - 1],\n cell: ({ getValue, row: { original } }) => {\n const row = getValue() as EnrichedScoreOrverride | undefined;\n if (!original) {\n return ;\n }\n const rowName = row?.rowName ?? null;\n return (\n \n {rowName}\n \n );\n },\n enableSorting: false,\n });\n }\n\n return columns;\n};\n\nexport const getSectionColumns = (\n rowCount: number\n): ColumnDef[] => {\n return [\n {\n id: 'section',\n header: () => (\n \n \n \n ),\n accessorFn: (data) => data.section,\n cell: ({ getValue, row: { original } }) => {\n const value = getValue() as string;\n if (!original) {\n return ;\n }\n return (\n \n {value}\n \n );\n },\n enableSorting: false,\n } as ColumnDef,\n ...getRowColumns(rowCount),\n {\n id: 'unordered',\n header: () => (\n \n \n \n ),\n accessorFn: (data) => data?.unordered,\n cell: ({ getValue, row: { original } }) => {\n const value = getValue() as EnrichedScoreOrverride[];\n if (!original) {\n return ;\n }\n const display = value.map(({ rowName }) => rowName).join(',');\n return (\n \n {display}\n \n );\n },\n enableSorting: false,\n } as ColumnDef,\n ];\n};\n","import { Row, RowData } from '@tanstack/react-table';\nimport clsx from 'clsx';\nimport { useRef } from 'react';\nimport { ItemProps } from 'react-virtuoso';\nimport * as styles from 'src/tables/Table/Table.css';\n\nimport { SectionRowTableContext } from './SectionRowTable';\n\ntype TableContextStyle = {\n context?: SectionRowTableContext | undefined;\n};\n\nexport type SectionRowTableRowProps = ItemProps> &\n TableContextStyle;\n\nexport const SectionRowTableRow = ({\n context,\n children,\n ...props\n}: SectionRowTableRowProps) => {\n const { tableRowStyle, onRowSelect } = context || {};\n const inputRef = useRef(null);\n\n const rowProps = {\n className: clsx(styles.tableRow, {\n [styles.isSelectedRow]: props.item.getIsSelected(),\n }),\n style: {\n ...tableRowStyle,\n width: '99%',\n },\n ref: inputRef,\n key: props.item.id,\n onClick: (e: React.MouseEvent) => {\n e.stopPropagation();\n onRowSelect?.(props.item);\n },\n ...props,\n };\n\n return {children};\n};\n","import {\n closestCenter,\n DndContext,\n DragEndEvent,\n DragOverlay,\n DragStartEvent,\n MouseSensor,\n useSensor,\n useSensors,\n} from '@dnd-kit/core';\nimport { rectSortingStrategy, SortableContext } from '@dnd-kit/sortable';\nimport {\n Cell,\n getCoreRowModel,\n Row,\n RowData,\n Table as ReactTable,\n TableOptions,\n useReactTable,\n} from '@tanstack/react-table';\nimport clsx from 'clsx';\nimport React, { useCallback, useRef, useState } from 'react';\nimport { State } from 'react-use/lib/useScroll';\nimport { TableVirtuoso } from 'react-virtuoso';\nimport { ColumnHeader } from 'src/tables/Table/components';\nimport { PosVirtuosoTable } from 'src/tables/Table/PosVirtuosoTableComponent/PosVirtuosoTable';\nimport { PosVirtuosoTableContext } from 'src/tables/Table/PosVirtuosoTableComponent/PosVirtuosoTableContext';\nimport { PosVirtuosoTableHead } from 'src/tables/Table/PosVirtuosoTableComponent/PosVirtuosoTableHead';\nimport * as styles from 'src/tables/Table/Table.css';\nimport { itemSizeDefault } from 'src/tables/Table/Table.utils';\nimport { SectionType } from 'src/utils/types/sectionType';\n\nimport { CellItem, SortableCell } from '../CellItem';\nimport {\n indexFromCellId,\n SectionRowColumnType,\n} from '../config/SectionRowTableConfig';\nimport { EnrichedScoreOrverride } from '../SectionRowTableDialog.hooks';\nimport { SectionRowTableRow } from './SectionRowTableRow';\n\nconst virtuosoTableOverscan = { main: 500, reverse: 500 };\nconst virtuosoTableStyle = { width: '100%', height: '100%' };\n\nexport type SectionRowTableContext =\n PosVirtuosoTableContext & {\n onRowSelect?: (row: Row) => void;\n };\n\nexport interface VirtuosoScrollEvent {\n scrollState: State;\n element: HTMLElement;\n}\n\ndeclare module '@tanstack/table-core' {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface ColumnMeta {\n paddingLeft?: string;\n paddingLeftLargeDesktop?: string;\n styleOverrides?: React.CSSProperties;\n }\n\n interface TableMeta {\n summaryData?: TData | null | undefined;\n sectionType?: SectionType;\n rowSupportsAccordion?: boolean;\n }\n}\n\nexport type TableLayout = 'fixed' | 'auto';\n\nexport type PosTableData = RowData;\n\nexport type TableProps = {\n tableLayout?: TableLayout;\n options: Partial>;\n className?: string;\n onSwapCell: (\n sectionId: number,\n from: EnrichedScoreOrverride,\n to: EnrichedScoreOrverride\n ) => void;\n onSelectSections: (sectionIds: number[]) => void;\n canCustomRows: boolean;\n};\n\nexport const SectionRowTable = ({\n tableLayout,\n options,\n className,\n onSwapCell,\n onSelectSections,\n canCustomRows,\n}: TableProps) => {\n const tableWrapperRef = useRef(null);\n const sensors = useSensors(useSensor(MouseSensor));\n const [activeId, setActiveId] = useState(null);\n\n const table: ReactTable = useReactTable({\n getCoreRowModel: getCoreRowModel(),\n groupedColumnMode: false,\n getRowId: (row, index) => row?.sectionId ?? index,\n ...options,\n state: {\n ...options.state,\n },\n } as TableOptions);\n\n const tableRows = table.getRowModel().rows;\n\n const handleDragStart = useCallback((event: DragStartEvent) => {\n setActiveId(event.active.id + '');\n }, []);\n\n const handleDragEnd = useCallback(\n (event: DragEndEvent, cells: Cell[]) => {\n const { active, over } = event;\n\n const activeIndex = indexFromCellId(active.id + '');\n const overIndex = indexFromCellId(over?.id + '');\n\n if (activeIndex !== overIndex && activeIndex < cells.length) {\n const activeCell = cells[activeIndex];\n const overCell = cells[overIndex];\n const activeRow = activeCell.getValue() as EnrichedScoreOrverride;\n const overRow = overCell?.getValue() as\n | EnrichedScoreOrverride\n | undefined;\n\n if (activeRow && overRow) {\n onSwapCell(activeRow.sectionId, activeRow, overRow);\n }\n }\n\n setActiveId(null);\n },\n [onSwapCell]\n );\n const handleDragCancel = useCallback(() => {\n setActiveId(null);\n }, []);\n\n const renderRowContent = useCallback(\n (row: Row) => {\n const items = row.getVisibleCells();\n return (\n handleDragEnd(event, items)}\n onDragCancel={handleDragCancel}\n >\n {items.length && }\n \n {items.slice(1, items.length - 1).map((cell) => {\n if (cell.getValue() == null || !canCustomRows) {\n return ;\n }\n return ;\n })}\n \n {items.length && (\n \n )}\n \n {activeId ? (\n id === activeId)!} />\n ) : null}\n \n \n );\n },\n [\n activeId,\n canCustomRows,\n handleDragCancel,\n handleDragEnd,\n handleDragStart,\n sensors,\n ]\n );\n\n const onRowSelect = useCallback(\n (row: Row) => {\n if (!canCustomRows) {\n return;\n }\n table.setRowSelection((prev) => {\n const rowId = parseInt(row.id);\n const updated = {\n ...prev,\n [rowId]: !(prev[rowId] ?? true),\n };\n const selected = Object.entries(updated)\n .filter(([_, value]) => value)\n .map(([key, _]) => key)\n .map(Number);\n onSelectSections(selected);\n\n return updated;\n });\n },\n [canCustomRows, onSelectSections, table]\n );\n\n return (\n \n ,\n SectionRowTableContext\n >\n style={virtuosoTableStyle}\n data={tableRows}\n overscan={virtuosoTableOverscan}\n context={{\n tableLayout,\n tableRows,\n onRowSelect,\n }}\n itemSize={itemSizeDefault}\n components={{\n Table: PosVirtuosoTable,\n TableHead: PosVirtuosoTableHead,\n TableRow: SectionRowTableRow,\n }}\n fixedHeaderContent={() => {\n return (\n <>\n {table.getHeaderGroups().map((headerGroup) => (\n \n {headerGroup.headers.map((header) => (\n \n ))}\n \n ))}\n \n );\n }}\n itemContent={(index, row) => renderRowContent(row)}\n />\n \n );\n};\n\nexport default SectionRowTable;\n","import { groupBy, isEmpty, keyBy } from 'lodash-es';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport { SectionInfo, SectionScoreOverride } from 'src/WebApiController';\n\nconst sortSectionName = (a = '', b = '') => {\n const numA = parseInt(a);\n const numB = parseInt(b);\n if (isNaN(numA) || isNaN(numB)) {\n return a.localeCompare(b);\n }\n return numA - numB;\n};\n\nexport type EnrichedScoreOrverride = SectionScoreOverride & {\n sectionName?: string;\n isNew?: boolean;\n};\n\nexport const useTableData = (\n sections: SectionInfo[],\n scoreOverrides?: SectionScoreOverride[]\n) => {\n const idToSection = useMemo(() => keyBy(sections, 'id'), [sections]);\n const sectionToZoneId = useMemo(\n () =>\n scoreOverrides?.reduce(\n (acc, override) => {\n acc[override.sectionId] = override.tkClsId;\n return acc;\n },\n {} as Record\n ) ?? {},\n [scoreOverrides]\n );\n const rowIdToName = useMemo(\n () =>\n sections.reduce(\n (acc, section) => {\n section.rows.forEach((row) => {\n acc[row.id] = row.name;\n });\n return acc;\n },\n {} as Record\n ),\n [sections]\n );\n\n // Captures the original ordinal of the row from catalog\n const rowIdToOrdinal = useMemo(\n () =>\n sections.reduce(\n (acc, section) => {\n section.rows.forEach((row) => {\n acc[row.id] = row.ordinal;\n });\n return acc;\n },\n {} as Record\n ),\n [sections]\n );\n\n const [overrides, setOverrides] = useState(\n scoreOverrides ?? []\n );\n const [selectedSectionIds, setSelectedSectionIds] = useState([]);\n\n useEffect(() => {\n if (!isEmpty(scoreOverrides)) {\n setOverrides(\n scoreOverrides?.map((override) => ({\n ...override,\n rowName: override.rowName ?? rowIdToName[override.rowId],\n })) ?? []\n );\n } else {\n setOverrides(\n sections.flatMap((section) => {\n return section.rows.map((row) => ({\n sectionId: section.id,\n sectionName: section.name,\n rowId: row.id,\n rowName: row.name,\n rowOrdinal: row.ordinal,\n tkClsId: row.tktClass?.id ?? null,\n score: row.seatQualityScore,\n scoreRaw: row.seatQualityScore,\n isManualOverride: false,\n }));\n })\n );\n }\n }, [rowIdToName, scoreOverrides, sections, rowIdToOrdinal]);\n\n const enrichedOverrides: EnrichedScoreOrverride[] = useMemo(() => {\n return overrides.map((override) => ({\n ...override,\n sectionName: idToSection[override.sectionId]?.name,\n isNew: rowIdToName[override.rowId] == null,\n }));\n }, [idToSection, overrides, rowIdToName]);\n\n const data = useMemo(() => {\n const sectionToOverrides = groupBy(enrichedOverrides, 'sectionId');\n return Object.entries(sectionToOverrides)\n .map(([sectionId, scores]) => {\n const rows = scores\n .filter(({ rowOrdinal }) => rowOrdinal != null)\n .toSorted((a, b) => a.rowOrdinal! - b.rowOrdinal!);\n const unordered = scores\n .filter(({ rowOrdinal }) => rowOrdinal == null)\n .toSorted((a, b) => (a.rowName ?? '').localeCompare(b.rowName ?? ''));\n return {\n sectionId: Number(sectionId),\n section: idToSection[sectionId]?.name ?? '',\n rows,\n unordered,\n };\n })\n .toSorted((a, b) => sortSectionName(a.section, b.section));\n }, [enrichedOverrides, idToSection]);\n\n const onAddRows = useCallback(\n (rows: string[]) => {\n setOverrides((prev) => {\n const updated = [...prev];\n let minRowId = 0;\n for (const score of updated) {\n if (minRowId > score.rowId) {\n minRowId = score.rowId;\n }\n }\n let newOverrides: SectionScoreOverride[] = [];\n for (const sectionId of selectedSectionIds) {\n newOverrides = newOverrides.concat(\n rows.map((row, index) => ({\n sectionId: sectionId,\n rowId: minRowId - rows.length + index,\n rowName: row,\n rowOrdinal: index,\n tkClsId: sectionToZoneId[sectionId] ?? null,\n score: 0,\n scoreRaw: 0,\n isManualOverride: true,\n }))\n );\n\n minRowId -= rows.length;\n updated\n .filter((override) => override.sectionId === sectionId)\n .forEach((element) => {\n element.rowOrdinal =\n element.rowOrdinal != null\n ? element.rowOrdinal + rows.length\n : null;\n element.isManualOverride = true;\n });\n }\n\n // Reset manual override if the row is moved to its original position\n const proceeds = [...updated, ...newOverrides];\n proceeds.forEach((override) => {\n if (rowIdToOrdinal[override.rowId] == override.rowOrdinal) {\n override.isManualOverride = false;\n }\n });\n\n return proceeds;\n });\n },\n [rowIdToOrdinal, sectionToZoneId, selectedSectionIds]\n );\n\n const onSwapOrdinals = useCallback(\n (\n sectionId: number,\n from: EnrichedScoreOrverride,\n to: EnrichedScoreOrverride\n ) => {\n if (\n from.rowName == null ||\n from.rowOrdinal == null ||\n to.rowOrdinal == null ||\n to.rowName == null\n ) {\n return;\n }\n if (from.rowOrdinal == to.rowOrdinal) {\n return;\n }\n\n setOverrides((prev) => {\n const sectionRows = prev\n .filter(\n (override) =>\n override.sectionId === sectionId && override.rowOrdinal != null\n )\n .toSorted((a, b) => a.rowOrdinal! - b.rowOrdinal!);\n\n const proceeds = prev.map((override) => {\n if (override.sectionId === sectionId && override.rowOrdinal != null) {\n if (override.rowOrdinal === from.rowOrdinal) {\n const isManualOverride =\n override.isManualOverride ||\n to.rowOrdinal != override.rowOrdinal;\n return {\n ...override,\n rowOrdinal: to.rowOrdinal,\n isManualOverride,\n };\n }\n const currentIndex = sectionRows.findIndex(\n (r) => r.rowName === override.rowName\n );\n if (from.rowOrdinal! < to.rowOrdinal!) {\n if (\n override.rowOrdinal > from.rowOrdinal! &&\n override.rowOrdinal <= to.rowOrdinal!\n ) {\n if (currentIndex <= 0) {\n return override;\n }\n const rowOrdinal = sectionRows[currentIndex - 1].rowOrdinal;\n const isManualOverride =\n override.isManualOverride ||\n rowOrdinal != override.rowOrdinal;\n return {\n ...override,\n rowOrdinal,\n isManualOverride,\n };\n }\n }\n\n if (from.rowOrdinal! > to.rowOrdinal!) {\n if (\n override.rowOrdinal < from.rowOrdinal! &&\n override.rowOrdinal >= to.rowOrdinal!\n ) {\n if (currentIndex <= -1 || currentIndex >= sectionRows.length) {\n return override;\n }\n const rowOrdinal = sectionRows[currentIndex + 1].rowOrdinal;\n const isManualOverride =\n override.isManualOverride ||\n rowOrdinal != override.rowOrdinal;\n return {\n ...override,\n rowOrdinal,\n isManualOverride,\n };\n }\n }\n }\n return override;\n });\n\n // Reset manual override if the row is moved to its original position\n proceeds.forEach((override) => {\n if (rowIdToOrdinal[override.rowId] == override.rowOrdinal) {\n override.isManualOverride = false;\n }\n });\n\n return proceeds;\n });\n },\n [rowIdToOrdinal]\n );\n\n return {\n data,\n overrides,\n selectedSectionIds,\n onAddRows,\n onSwapOrdinals,\n onSelectSections: setSelectedSectionIds,\n };\n};\n","/* eslint-disable react-hooks/exhaustive-deps */\nimport { TableOptions } from '@tanstack/react-table';\nimport { isEmpty, isEqual, max } from 'lodash-es';\nimport { ComponentProps, useCallback, useMemo } from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { CancelButton } from 'src/components/Buttons';\nimport { OkButton } from 'src/components/Buttons/OkButton';\nimport { Content } from 'src/contexts/ContentContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { Stack } from 'src/core/ui';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n Feature,\n SectionInfo,\n SectionScoreOverride,\n} from 'src/WebApiController';\n\nimport { AddSectionRowsDialog } from './components/AddSectionRowsDialog';\nimport SectionRowTable from './components/SectionRowTable';\nimport {\n getSectionColumns,\n SectionRowColumnType,\n} from './config/SectionRowTableConfig';\nimport { useTableData } from './SectionRowTableDialog.hooks';\n\nexport type SectionRowTableDialogProps = ComponentProps & {\n sections: SectionInfo[];\n scoreOverrides?: SectionScoreOverride[];\n onClose: () => void;\n onSectionRowChange: (updated: SectionScoreOverride[]) => void;\n};\n\nexport const SectionRowTableDialog: React.FC = ({\n sections,\n scoreOverrides,\n onClose,\n onSectionRowChange,\n ...rest\n}) => {\n const hasCustomVenueRowsFeature = useUserHasFeature(Feature.CustomVenueRows);\n const addRowsDialog = useBasicDialog();\n const {\n data,\n overrides,\n selectedSectionIds,\n onAddRows,\n onSelectSections,\n onSwapOrdinals,\n } = useTableData(sections, scoreOverrides);\n\n const maxLength = useMemo(() => {\n return (\n max(\n sections.map(\n (section) =>\n section.rows.filter(({ ordinal }) => ordinal != null).length\n )\n ) ?? 0\n );\n }, []);\n\n const options: Partial> = useMemo(\n () => ({\n data,\n columns: getSectionColumns(maxLength),\n }),\n [data]\n );\n\n const hasChange = useMemo(\n () => !isEqual(overrides, scoreOverrides),\n [overrides, scoreOverrides]\n );\n\n const onSubmitChange = useCallback(() => {\n onSectionRowChange(overrides);\n onClose();\n }, [overrides, onSectionRowChange, onClose]);\n\n return (\n <>\n }\n footer={\n hasCustomVenueRowsFeature ? (\n \n addRowsDialog.launchDialog()}\n disabled={isEmpty(selectedSectionIds)}\n textContentId={ContentId.AddRow}\n />\n \n \n \n \n \n ) : (\n \n \n \n \n )\n }\n onCancel={onClose}\n >\n \n \n \n \n );\n};\n","import { isEqual } from 'lodash-es';\nimport {\n ComponentProps,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { IconButton } from 'src/components/Buttons';\nimport {\n BulkEditNumber,\n LanguagePreference,\n} from 'src/components/common/BulkActions/BulkEditNumber';\nimport { Content } from 'src/contexts/ContentContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { Button, SimpleTable } from 'src/core/ui';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { EventScoreUpdate } from 'src/modals/EventPricingSeatMap/EventPricingSeatMapBody';\nimport { CopyIcon } from 'src/svgs';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { roundToPrecision } from 'src/utils/numberFormatter';\nimport { getMedianScoreForSection } from 'src/utils/seatScoreUtils';\nimport { filterSectionByRowType } from 'src/utils/venueConfigUtils';\nimport { SectionInfo, SectionScoreOverride } from 'src/WebApiController';\n\nimport { ChangeRowScoreDialogMultiSection } from '../ChangeRowScoreDialog';\nimport { rowScoreOverrideFilter } from '../ChangeRowScoreDialog/ChangeRowScoreBodyMultiSection';\nimport * as styles from './ChangeMultiSectionsScoresDialog.css';\n\ntype SectionScoreInput = {\n sectionId: number;\n score: number | null;\n};\n\nexport type ChangeMultiSectionsScoresDialogProps = ComponentProps<\n typeof RSModal\n> & {\n selectedSections: SectionInfo[];\n scoreOverrides?: SectionScoreOverride[] | null;\n configPayload: string | null;\n onOkay: (newScores: SectionScoreInput[]) => void;\n onCancel: () => void;\n onSubmitSectionScoreChange: (updates: EventScoreUpdate) => Promise;\n};\n\nexport function ChangeMultiSectionsScoresDialog({\n selectedSections,\n scoreOverrides,\n configPayload,\n onOkay,\n onCancel,\n onSubmitSectionScoreChange,\n ...rest\n}: ChangeMultiSectionsScoresDialogProps) {\n const existingScores = useMemo(\n (): SectionScoreInput[] =>\n selectedSections.map((s) => ({\n sectionId: s.id,\n score: getMedianScoreForSection(s.id, scoreOverrides ?? []),\n })),\n [scoreOverrides, selectedSections]\n );\n\n const changeRowScoreDialog = useBasicDialog();\n\n const [scores, setScores] = useState(() => [\n ...existingScores,\n ]);\n const [isLoading, setIsLoading] = useState(false);\n\n const selectedSectionsMap = useMemo(() => {\n return selectedSections.reduce(\n (r, c) => {\n r[c.id] = c;\n return r;\n },\n {} as Record\n );\n }, [selectedSections]);\n\n useEffect(() => {\n if (scores.length !== existingScores.length) {\n setScores([...existingScores]);\n }\n }, [existingScores, scores.length]);\n\n const onRowSeatScoreChanged = useCallback(\n (\n newScoreOverrides: SectionScoreOverride[],\n newConfigPayload: string | null\n ) => {\n onSubmitSectionScoreChange({\n newScoreOverrides,\n newConfigPayload: newConfigPayload ?? undefined,\n }).then(() => {\n changeRowScoreDialog.closeDialog();\n });\n },\n [onSubmitSectionScoreChange, changeRowScoreDialog]\n );\n\n // Minimum number of configurable rows across all selected sections\n const minNumRowsSelectedSections = useMemo(() => {\n const sanitizedSections = selectedSections.filter(filterSectionByRowType);\n let min = Number.MAX_SAFE_INTEGER;\n for (const selectedSection of sanitizedSections) {\n const scoredRows =\n scoreOverrides?.filter(\n rowScoreOverrideFilter([selectedSection?.specRow?.id ?? 0])\n ) ?? [];\n min = Math.min(min, scoredRows.length);\n }\n return min;\n }, [scoreOverrides, selectedSections]);\n\n const onChangeSingleSectionScore = useCallback(\n (section: SectionScoreInput) =>\n (event: React.ChangeEvent) => {\n const value = parseFloat(event.target.value);\n if (value < 0 || value > 100) return;\n\n const index = scores.findIndex(\n (xs) => xs.sectionId === section.sectionId\n );\n scores[index] = { ...scores[index], score: value };\n setScores([...scores]);\n },\n [scores]\n );\n\n const onBulkChangeSectionScore = useCallback(\n (score: number) => setScores((prev) => prev.map((s) => ({ ...s, score }))),\n []\n );\n\n const onRelativeChangeAllScore = useCallback(\n (value: number, isRelative: boolean, isAbove: boolean) => {\n const percentageChange = 100 + (isAbove ? value : -value);\n const absoluteChange = isAbove ? value : -value;\n setScores((prev) =>\n prev.map((s) => {\n const validScore = s.score ?? 0;\n const newScore = isRelative\n ? (validScore * percentageChange) / 100\n : validScore + absoluteChange;\n const sanitizedScore = Math.min(100, Math.max(0, newScore));\n return { ...s, score: sanitizedScore };\n })\n );\n },\n []\n );\n\n if (!selectedSections.length) {\n return null;\n }\n\n return (\n <>\n }\n onOpened={() => {\n setIsLoading(false);\n setScores([]);\n }}\n footer={\n <>\n \n \n \n {minNumRowsSelectedSections > 0 && (\n {\n // We have to pick the score that was input\n if (scores.length) {\n setIsLoading(true);\n onOkay(scores);\n changeRowScoreDialog.launchDialog();\n }\n }}\n disabled={isLoading || !scores.length}\n >\n \n \n )}\n {\n if (scores.length) setIsLoading(true);\n onOkay(scores);\n }}\n >\n \n \n \n }\n onCancel={onCancel}\n >\n \n \n \n \n \n \n \n \n \n \n \n \n \n {scores\n .filter((s) => selectedSectionsMap[s.sectionId])\n .toSorted((s1, s2) =>\n selectedSectionsMap[s1.sectionId].name.localeCompare(\n selectedSectionsMap[s2.sectionId].name\n )\n )\n .map((s) => (\n \n \n {selectedSectionsMap[s.sectionId].name}\n \n \n \n }\n titleContentId={ContentId.ApplyToAll}\n onClick={onBulkChangeSectionScore.bind(\n null,\n s.score ?? 0\n )}\n />\n }\n />\n \n \n ))}\n \n \n \n \n \n );\n}\n","import { isEmpty } from 'lodash-es';\nimport {\n ComponentProps,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { Content } from 'src/contexts/ContentContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { Button, SimpleTable } from 'src/core/ui';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { EventScoreUpdate } from 'src/modals/EventPricingSeatMap/EventPricingSeatMapBody';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { roundToPrecision } from 'src/utils/numberFormatter';\nimport { getMedianScoreForSection } from 'src/utils/seatScoreUtils';\nimport { SectionInfo, SectionScoreOverride } from 'src/WebApiController';\n\nimport { ChangeRowScoreDialog } from '../ChangeRowScoreDialog';\nimport { rowScoreOverrideFilter } from '../ChangeRowScoreDialog/ChangeRowScoreBodyMultiSection';\nimport * as styles from './ChangeSectionScoreDialog.css';\n\nexport type ChangeSectionScoreDialogProps = ComponentProps & {\n selectedSection: SectionInfo | null;\n configPayload: string | null;\n surroundingSections: SectionInfo[];\n scoreOverrides?: SectionScoreOverride[] | null;\n onOkay: (newScore: number, sectionId: number) => void;\n onCancel: () => void;\n onSubmitSectionScoreChange: (updates: EventScoreUpdate) => Promise;\n};\n\nexport function ChangeSectionScoreDialog({\n selectedSection,\n configPayload,\n surroundingSections,\n scoreOverrides,\n onOkay,\n onCancel,\n onSubmitSectionScoreChange,\n ...rest\n}: ChangeSectionScoreDialogProps) {\n const existingScore = useMemo(\n () =>\n selectedSection &&\n getMedianScoreForSection(selectedSection.id, scoreOverrides ?? []),\n [scoreOverrides, selectedSection]\n );\n\n const changeRowScoreDialog = useBasicDialog();\n\n const [score, setScore] = useState(existingScore ?? undefined);\n const [isLoading, setIsLoading] = useState(false);\n\n useEffect(() => {\n if (score == null && existingScore != null) {\n setScore(existingScore);\n }\n }, [existingScore, score]);\n\n const getSurroundingSections = useCallback(() => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n {surroundingSections\n .toSorted((s1, s2) => s1.name.localeCompare(s2.name))\n .map((s, idx) => {\n const score = getMedianScoreForSection(\n s.id,\n scoreOverrides ?? []\n );\n return (\n \n {s.name}\n \n {score != null ? roundToPrecision(score, 4) : null}\n \n \n );\n })}\n \n \n );\n }, [scoreOverrides, surroundingSections]);\n\n const onRowSeatScoreChanged = useCallback(\n (\n newScoreOverrides: SectionScoreOverride[],\n newConfigPayload: string | null\n ) => {\n onSubmitSectionScoreChange({\n newScoreOverrides,\n newConfigPayload: newConfigPayload ?? undefined,\n }).then(() => {\n changeRowScoreDialog.closeDialog();\n });\n },\n [onSubmitSectionScoreChange, changeRowScoreDialog]\n );\n\n const rows = useMemo(\n () =>\n scoreOverrides?.filter(\n rowScoreOverrideFilter([selectedSection?.specRow?.id ?? 0])\n ) ?? [],\n [scoreOverrides, selectedSection?.specRow?.id]\n );\n\n if (!selectedSection) {\n return null;\n }\n\n return (\n <>\n }\n onOpened={() => {\n setIsLoading(false);\n setScore(undefined);\n }}\n onKeyUp={(e) => {\n if (!isLoading && e.key === 'Enter' && score != null) {\n setIsLoading(true);\n onOkay(score, selectedSection.id);\n }\n }}\n footer={\n <>\n \n \n \n {!isEmpty(rows) && (\n {\n // We have to pick the score that was input\n if (score != null) {\n setIsLoading(true);\n onOkay(score, selectedSection.id);\n changeRowScoreDialog.launchDialog();\n }\n }}\n disabled={isLoading || score == null}\n >\n \n \n )}\n {\n if (score != null) {\n setIsLoading(true);\n onOkay(score, selectedSection.id);\n }\n }}\n >\n \n \n \n }\n onCancel={onCancel}\n >\n
    \n \n }\n style={{ flexBasis: 'max-content' }}\n >\n
    \n {selectedSection.name}\n
    \n \n }>\n {\n const value = parseFloat(e.target.value);\n if (value < 0 || value > 100) return;\n setScore(value);\n }}\n />\n \n
    \n }\n className={styles.similarSectionsContainer}\n >\n
    \n {getSurroundingSections()}\n
    \n \n \n \n \n \n );\n}\n","import { head, uniq } from 'lodash-es';\nimport { useCallback, useMemo, useState } from 'react';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { filterSectionByZone } from 'src/utils/venueConfigUtils';\nimport { SectionInfo } from 'src/WebApiController';\n\nexport const useEventHeatMapSectionHandler = (\n onLaunchingDialog: () => void\n) => {\n const { venueMapInfo } = useEventMapContext();\n const [selectedSection, setSectionSelected] = useState(\n null\n );\n const [surroundingSections, setSurroundingSections] = useState(\n []\n );\n const [selectedSectionIds, setSelectedSectionIds] = useState([]);\n\n const selectedSectionData = useMemo(() => {\n if (!venueMapInfo || !selectedSectionIds?.length) {\n return undefined;\n }\n\n return venueMapInfo?.sections?.filter((s: SectionInfo) =>\n selectedSectionIds.includes(s.id)\n );\n }, [selectedSectionIds, venueMapInfo]);\n\n const onResetSections = useCallback(() => setSelectedSectionIds([]), []);\n\n const onShiftSelect = useCallback(\n (sectionInfo: SectionInfo) => {\n // We are using the ticketClassId to group the sections\n const selectedClassId = head(\n sectionInfo?.rows\n ?.map(({ tktClass: ticketClass }) => ticketClass?.id)\n .filter((id) => !!id)\n );\n const updatedSectionIds = venueMapInfo?.sections\n ?.filter(filterSectionByZone(selectedClassId))\n ?.map((s: SectionInfo) => s.id);\n\n setSelectedSectionIds((prev) => {\n if (prev.includes(sectionInfo.id)) {\n return prev.filter((id) => !updatedSectionIds?.includes(id));\n }\n return uniq([...prev, ...(updatedSectionIds ?? [])]);\n });\n },\n [venueMapInfo?.sections]\n );\n\n const onCtrlSelect = useCallback(\n (sectionInfo: SectionInfo) =>\n setSelectedSectionIds((prev) => {\n if (prev.includes(sectionInfo.id)) {\n return prev.filter((id) => id !== sectionInfo.id);\n }\n return [...prev, sectionInfo.id];\n }),\n []\n );\n\n const onSingleSelect = useCallback(\n (sectionInfo: SectionInfo, surroundingSections?: SectionInfo[]) => {\n setSectionSelected(sectionInfo);\n setSurroundingSections(surroundingSections ?? []);\n onLaunchingDialog();\n },\n [onLaunchingDialog]\n );\n\n const onSectionClicked = useCallback(\n (\n e: MouseEvent,\n sectionInfo: SectionInfo,\n surroundingSections?: SectionInfo[]\n ) => {\n if (e.shiftKey) {\n onShiftSelect(sectionInfo);\n return;\n }\n if (e.ctrlKey || e.metaKey) {\n onCtrlSelect(sectionInfo);\n return;\n }\n\n onSingleSelect(sectionInfo, surroundingSections);\n },\n [onCtrlSelect, onSingleSelect, onShiftSelect]\n );\n\n const onToggleMirrors = useCallback(\n (mirrors: SectionInfo[], exclude?: boolean) => {\n setSelectedSectionIds((prev) => {\n const mirrorIds = mirrors.map(({ id }) => id);\n if (exclude) {\n return [...prev.filter((id) => !mirrorIds.includes(id))];\n } else {\n return uniq([...prev, ...mirrorIds]);\n }\n });\n },\n []\n );\n\n const onSelectedSectionsChange = useCallback((sections: SectionInfo[]) => {\n setSelectedSectionIds(sections.map(({ id }) => id));\n }, []);\n\n return {\n selectedSection,\n selectedSectionIds,\n selectedSectionData,\n surroundingSections,\n onSectionClicked,\n onResetSections,\n onToggleMirrors,\n onSelectedSectionsChange,\n };\n};\n","import { useCallback } from 'react';\nimport {\n MultiSectionsDisplay,\n SectionDisplay,\n} from 'src/components/Events/VenueMap';\nimport { EventVenueMap } from 'src/components/Events/VenueMap/EventVenueMap';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { Button, Stack } from 'src/core/ui';\nimport { ChangeMultiSectionsScoresDialog } from 'src/dialogs/ChangeMultiSectionsScoresDialog';\nimport { ChangeSectionScoreDialog } from 'src/dialogs/ChangeSectionScoreDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useEventHeatMapSectionHandler } from 'src/hooks/useEventHeatMapSectionHandler';\nimport {\n HeatMapColors,\n HeatMapColorSteps,\n useHeatMapColor,\n} from 'src/hooks/useHeatMapColor';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { EventScoreUpdate } from 'src/modals/EventPricingSeatMap/EventPricingSeatMapBody';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n updateScoreForSectionMaintainingRowScoreRatio,\n updateScoreMaintainingRowScoreRatio,\n} from 'src/utils/seatScoreUtils';\nimport {\n Feature,\n SectionInfo,\n SectionScoreOverride,\n} from 'src/WebApiController';\n\nexport const EventVenueHeatMap = ({\n scoreOverrides,\n configPayload,\n onSubmitSectionScoreChange,\n}: {\n scoreOverrides?: SectionScoreOverride[] | null;\n configPayload: string | null;\n onSubmitSectionScoreChange: (updates: EventScoreUpdate) => Promise;\n}) => {\n const { trackError } = useErrorBoundaryContext();\n\n const { getUiCurrency } = useLocalizationContext();\n const { loginContext } = useAppContext();\n const changeSectionScoreDialog = useBasicDialog();\n const changeMultiSectionsScoresDialog = useBasicDialog();\n\n const uiCurrency = getUiCurrency(\n loginContext?.user?.activeAccount?.currencyCode\n );\n const currencyDisplay = uiCurrency?.sym ?? '$';\n const { getColor } = useHeatMapColor(scoreOverrides);\n\n const hasAutoPricingFeature = useUserHasFeature(Feature.AutoPricing);\n\n const onSectionHovered = useCallback(\n (hoveredSection: SectionInfo) => (\n \n ),\n [scoreOverrides]\n );\n\n const onLaunchingSingleSectionDialog = useCallback(\n () => changeSectionScoreDialog.launchDialog(),\n [changeSectionScoreDialog]\n );\n\n const {\n selectedSection,\n selectedSectionIds,\n selectedSectionData,\n surroundingSections,\n onSectionClicked,\n onResetSections,\n onToggleMirrors,\n onSelectedSectionsChange,\n } = useEventHeatMapSectionHandler(onLaunchingSingleSectionDialog);\n\n const onSectionSeatScoreChanged = useCallback(\n (newScore: number, sectionId: number) => {\n const newScoreOverrides = updateScoreForSectionMaintainingRowScoreRatio(\n newScore,\n sectionId,\n scoreOverrides\n );\n\n if (newScoreOverrides?.length) {\n onSubmitSectionScoreChange({ newScoreOverrides }).then(() => {\n changeSectionScoreDialog.closeDialog();\n });\n } else {\n trackError(\n `Cannot update score for section ${sectionId} because it is not a valid section.`,\n null,\n { newScore, sectionId }\n );\n changeSectionScoreDialog.closeDialog();\n }\n },\n [\n scoreOverrides,\n onSubmitSectionScoreChange,\n changeSectionScoreDialog,\n trackError,\n ]\n );\n\n const onMultiSectionsSeatScoresChanged = useCallback(\n (newScores: { sectionId: number; score: number | null }[]) => {\n const newScoreOverrides = [...(scoreOverrides ?? [])];\n\n const notFoundSections: number[] = [];\n newScores.forEach((s) => {\n const overridesToEdit = newScoreOverrides?.filter(\n (so) => so.sectionId === s.sectionId\n );\n\n if (overridesToEdit.length) {\n if (s.score != null) {\n updateScoreMaintainingRowScoreRatio(s.score, overridesToEdit);\n }\n } else {\n notFoundSections.push(s.sectionId);\n }\n });\n\n if (notFoundSections.length === 0) {\n onSubmitSectionScoreChange({ newScoreOverrides }).then(() => {\n changeMultiSectionsScoresDialog.closeDialog();\n });\n } else {\n trackError(\n `Cannot update score for sections ${notFoundSections} because they are not valid overrides.`,\n null,\n { newScores }\n );\n changeMultiSectionsScoresDialog.closeDialog();\n }\n },\n [\n changeMultiSectionsScoresDialog,\n onSubmitSectionScoreChange,\n scoreOverrides,\n trackError,\n ]\n );\n\n return (\n <>\n \n \n changeMultiSectionsScoresDialog.launchDialog()}\n >\n \n \n \n )\n }\n infoIconContent={\n hasAutoPricingFeature ? (\n \n ) : undefined\n }\n getColor={getColor}\n useRowMap={true}\n isHeatMap={true}\n />\n \n \n \n );\n};\n","import { clsx } from 'clsx';\nimport { ReactNode } from 'react';\nimport { Card } from 'src/core/ui';\nimport { CheckIcon, CrossIcon, IconsFill } from 'src/svgs/Viagogo';\n\nimport * as styles from './SeatMapCard.css';\n\nexport const SeatMapCard = ({\n isSelected = false,\n isInteractive = false,\n isSmall = false,\n footer,\n onClick,\n onDelete,\n children,\n}: {\n isSelected?: boolean;\n isInteractive?: boolean;\n isSmall?: boolean;\n onClick?: () => void;\n onDelete?: () => void;\n footer?: ReactNode;\n children?: ReactNode;\n}) => {\n return (\n \n \n {children}\n \n \n {footer}\n \n\n {isSelected ? (\n
    \n \n
    \n ) : (\n onDelete && (\n
    \n {\n e.stopPropagation();\n e.preventDefault();\n onDelete();\n }}\n />\n
    \n )\n )}\n \n );\n};\n","import { Content } from 'src/contexts/ContentContext';\nimport {\n ConfirmDialog,\n ConfirmDialogProps,\n} from 'src/core/interim/dialogs/ConfirmDialog';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { contentWrapper } from './DeleteHeatMapTemplateConfirmDialog.css';\n\nexport type DeleteHeatMapTemplateConfirmDialogProps = Omit<\n ConfirmDialogProps,\n 'headerText' | 'bodyText'\n> & {\n onConfirm: () => void;\n onCancel: () => void;\n};\n\nexport const DeleteHeatMapTemplateConfirmDialog = ({\n onConfirm,\n onCancel,\n ...props\n}: DeleteHeatMapTemplateConfirmDialogProps) => {\n return (\n }\n bodyText={\n
    \n \n
    \n }\n okText={ContentId.Confirm}\n cancelText={ContentId.Cancel}\n {...props}\n onOkay={() => onConfirm()}\n onCancel={() => onCancel()}\n />\n );\n};\n","import { isEqual } from 'lodash-es';\nimport { Point } from 'paper';\nimport { ReactNode, useEffect, useRef, useState } from 'react';\nimport { BezierGraph, SerializedSegment } from 'src/core/POS/BezierGraph';\nimport { CalcOutputFn } from 'src/core/POS/BezierGraph/BezierGraphManager';\nimport { vars } from 'src/core/themes';\nimport { CrossIcon } from 'src/svgs/Viagogo';\nimport { roundToPrecision } from 'src/utils/numberFormatter';\n\nimport * as styles from './RelativeScoreGraph.css';\n\nexport const ROW_HEIGHT = styles.ROW_HEIGHT;\nexport const ROW_GAP_HEIGHT = styles.ROW_GAP_HEIGHT;\n\nconst NEGATIVE_TEXT_COLOR = '#db3f84';\nconst POSITIVE_TEXT_COLOR = '#33b2b1';\n\nexport type RelativeScoreGraphProps = {\n children?: ReactNode;\n};\n\nexport function RelativeScoreGraph({ children }: RelativeScoreGraphProps) {\n return
    {children}
    ;\n}\n\nexport type RelativeScoreGraphRowProps = {\n label?: ReactNode;\n valueDisplay?: ReactNode;\n /**\n * Percentage value from 0 to 1.\n *\n * eg. `0.5` for 50%\n */\n value?: number;\n showRemoveButton?: boolean;\n onRemove?: () => void;\n};\n\nexport function RelativeScoreGraphRow({\n label,\n valueDisplay,\n value,\n showRemoveButton = false,\n onRemove,\n}: RelativeScoreGraphRowProps) {\n const isBase = value === 0;\n const negativeWidth =\n !isBase && value != null && value < 0 ? `${-value * 100}%` : 0;\n const positiveWidth =\n !isBase && value != null && value > 0 ? `${value * 100}%` : 0;\n return (\n
    \n
    {label}
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n 0\n ? POSITIVE_TEXT_COLOR\n : NEGATIVE_TEXT_COLOR,\n }}\n >\n {valueDisplay}\n
    \n
    \n {showRemoveButton && (\n
    \n \n
    \n )}\n
    \n \n );\n}\n\nconst PATH_COLOR = '#33b2b1';\n\nexport type RelativeScoreGraphBezierProps = {\n rowCount: number;\n initialSegments: SerializedSegment[];\n onChange?: (ev: { values: number[]; segments: SerializedSegment[] }) => void;\n};\n\nexport function RelativeScoreGraphBezier({\n initialSegments,\n rowCount,\n onChange,\n}: RelativeScoreGraphBezierProps) {\n const [segments, setSegments] = useState(initialSegments);\n\n useEffect(() => {\n if (!isEqual(segments, initialSegments)) {\n setSegments(initialSegments);\n }\n }, [initialSegments, segments]);\n\n const calcScoreOutputRef = useRef();\n const exportScorePathRef = useRef<() => SerializedSegment[]>();\n\n const onUpdateRowScores = (segments: paper.Segment[]) => {\n const calcScoreOutput = calcScoreOutputRef.current;\n if (calcScoreOutput) {\n const totalHeight =\n rowCount * ROW_HEIGHT + (rowCount - 1) * ROW_GAP_HEIGHT;\n const centerToCenterHeight = ROW_HEIGHT + ROW_GAP_HEIGHT;\n const isBaseRow = (x: number) => {\n const baseRowSegmentX = segments[1]?.point.x;\n if (baseRowSegmentX != null) {\n const xMin = Math.max(\n 0,\n x - (centerToCenterHeight / 2 / totalHeight) * 100\n );\n const xMax = Math.min(\n 100,\n x + (centerToCenterHeight / 2 / totalHeight) * 100\n );\n if (baseRowSegmentX >= xMin && baseRowSegmentX < xMax) {\n return true;\n }\n }\n return false;\n };\n\n const values: number[] = [];\n for (let i = 0; i < rowCount; i++) {\n const x =\n ((ROW_HEIGHT / 2 + i * centerToCenterHeight) / totalHeight) * 100;\n const y = isBaseRow(x) ? 50 : calcScoreOutput(x);\n values.push(roundToPrecision((y * 2 - 100) / 100, 3));\n }\n onChange?.({ values, segments: exportScorePathRef.current?.() ?? [] });\n }\n };\n\n return (\n
    \n {\n return segment.isFirst() || segment.isLast()\n ? new Point(0, localDelta.y)\n : new Point(localDelta.x, 0);\n }}\n onPathSetFromSegments={({ segments }) => {\n onUpdateRowScores(segments);\n }}\n onDragEnd={({ isPathValid, segments }) => {\n if (isPathValid) {\n onUpdateRowScores(segments);\n }\n }}\n />\n
    \n );\n}\n","import { useState } from 'react';\nimport { SerializedSegment } from 'src/core/POS/BezierGraph';\nimport { roundToPrecision } from 'src/utils/numberFormatter';\n\nimport {\n RelativeScoreGraph,\n RelativeScoreGraphBezier,\n RelativeScoreGraphBezierProps,\n RelativeScoreGraphRow,\n ROW_GAP_HEIGHT,\n ROW_HEIGHT,\n} from './RelativeScoreGraph';\n\nconst ROW_COUNT = 10;\n\nexport const INITIAL_SEGMENTS: SerializedSegment[] = (() => {\n const totalHeight = ROW_COUNT * ROW_HEIGHT + (ROW_COUNT - 1) * ROW_GAP_HEIGHT;\n const firstPointX = (ROW_HEIGHT / 2 / totalHeight) * 100;\n return [\n { point: { x: firstPointX, y: 34.5 } },\n {\n point: { x: 100 - firstPointX, y: 50 },\n handleIn: { x: 0, y: -11 },\n handleOut: { x: 0, y: 5 },\n },\n { point: { x: 100 - firstPointX, y: 60 } },\n ];\n})();\n\n/**\n * Reference: https://github.com/stubhub/StubHub.PointOfSale.AutoPricing/blob/1efd01964818286fe07c14af0bec48094f91b068/src/StubHub.PointOfSale.AutoPricing/Models/Strategies/CompListingSetting.cs#L50\n */\nexport type QuantityScoreAdjustment = {\n /**\n * quantity\n */\n q: number;\n /**\n * seat score multiplier\n */\n m: number;\n};\n\nexport type SeatScoreQuantityMultiplerGraphProps = {\n initialSegments?: RelativeScoreGraphBezierProps['initialSegments'];\n onChange?: (ev: {\n overrides: QuantityScoreAdjustment[];\n segments: SerializedSegment[];\n }) => void;\n};\n\nexport function SeatScoreQuantityMultiplerGraph({\n initialSegments = INITIAL_SEGMENTS,\n onChange,\n}: SeatScoreQuantityMultiplerGraphProps) {\n const [values, setValues] = useState(() => {\n return Array(ROW_COUNT).fill(0);\n });\n return (\n \n {values.map((value, i) => (\n \n ))}\n {\n setValues(values);\n\n onChange?.({\n overrides: values.map((val, i) => ({\n q: ROW_COUNT - i,\n m: roundToPrecision(1 + val, 3),\n })),\n segments,\n });\n }}\n />\n \n );\n}\n","import { FormProvider, useForm, useFormContext } from 'react-hook-form';\nimport {\n AutoPricingSettingsFormContent,\n AutoPricingSettingsFormContentCoreProps,\n PricingSetting,\n} from 'src/components/AutoPricing/AutoPricingSettingsFormContent/AutoPricingSettingsFormContent';\nimport { useAutoPricingSettingsFormContext } from 'src/components/AutoPricing/useAutoPricingSettingsFormContext';\nimport { SeatScoreQuantityMultiplerGraph } from 'src/components/Events/RelativeScoreGraph/SeatScoreQuantityMultiplierGraph';\nimport { Content, FormatContent } from 'src/contexts/ContentContext';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { Switch } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { EventPricingSeatMapForm } from 'src/utils/eventWithDataUtils';\nimport {\n AutoPricingCompListingMode,\n AutoPricingInputs,\n} from 'src/WebApiController';\n\ntype EventAutoPricingSettingsFormContentProps =\n AutoPricingSettingsFormContentCoreProps & {\n allowAutoPriceFrequency: boolean;\n };\n\nexport const EventAutoPricingSettingsFormContent = ({\n allowAutoPriceFrequency,\n disabled,\n ...rest\n}: EventAutoPricingSettingsFormContentProps) => {\n const { watch: outerWatch, setValue: outerSetValue } =\n useFormContext();\n\n const { eventAutoPricing, eventWideAutoPricing } = outerWatch();\n\n const innerMethods = useForm({\n defaultValues: eventAutoPricing ?? undefined,\n });\n\n const { watch: innerWatch } = innerMethods;\n\n const { compListingMode } = innerWatch();\n\n innerWatch((eventAutoPricingNew) => {\n outerSetValue('eventAutoPricing', eventAutoPricingNew as AutoPricingInputs);\n return;\n });\n\n return (\n \n <>\n }\n detail={\n e.stopPropagation()}\n onCheckedChange={(isChecked) => {\n if (isChecked !== eventWideAutoPricing) {\n outerSetValue('eventWideAutoPricing', isChecked);\n }\n }}\n />\n }\n />\n }\n priceAgainstSectionChildren={\n allowAutoPriceFrequency && (\n \n )\n }\n advancedSettingsSectionChildren={\n compListingMode == AutoPricingCompListingMode.QualityScore ? (\n \n ) : null\n }\n hideCompListingQuantityFilters={true}\n hideBaseAdvancedSettingElements={true}\n {...rest}\n />\n \n \n );\n};\n\nconst AutoPricingFrequencyInput = ({ disabled }: { disabled: boolean }) => {\n const { setValue, watch } = useAutoPricingSettingsFormContext();\n\n const { autoPriceFrequency } = watch();\n\n return (\n }\n detail={\n \n }\n value={autoPriceFrequency ?? ''}\n onChange={(e) => {\n let v = parseInt(e.target.value);\n if (!isNaN(v)) {\n if (v < 1) {\n v = 1;\n }\n setValue('autoPriceFrequency', v);\n return;\n } else {\n setValue('autoPriceFrequency', null);\n }\n }}\n disabled={disabled}\n />\n }\n />\n );\n};\n\nconst AdvancedSettingsSection = ({ disabled }: { disabled: boolean }) => {\n const { setValue, watch } = useAutoPricingSettingsFormContext();\n\n const {\n compListingMode,\n compListingQuantityScoreAdjustmentEnabled,\n compListingQuantityScoreAdjustmentOverrideJson,\n } = watch();\n\n return (\n <>\n }\n detail={\n e.stopPropagation()}\n onCheckedChange={(isChecked) => {\n const compListingQuantityScoreAdjustmentEnabledNew = isChecked;\n if (\n compListingQuantityScoreAdjustmentEnabledNew !==\n compListingQuantityScoreAdjustmentEnabled\n ) {\n setValue(\n 'compListingQuantityScoreAdjustmentEnabled',\n compListingQuantityScoreAdjustmentEnabledNew\n );\n }\n }}\n />\n }\n />\n\n }\n detail={\n {\n const compListingQuantityScoreAdjustmentOverrideJsonNew =\n JSON.stringify({ overrides, segments });\n setValue(\n 'compListingQuantityScoreAdjustmentOverrideJson',\n compListingQuantityScoreAdjustmentOverrideJsonNew\n );\n }}\n />\n }\n />\n \n );\n};\n","import { useCallback, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { useGetAccountAutoPricingSettings } from 'src/hooks/useGetAccountAutoPricingSettings';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport {\n DEFAULT_COMP_LISTING_CEIL_MORE_THAN_FLOOR,\n DEFAULT_COMP_LISTING_FLOOR,\n DEFAULT_UNDERCUT_ABSOLUTE_AMT,\n DEFAULT_UNDERCUT_RELATIVE_AMT,\n} from 'src/utils/autoPricingUtils';\nimport { EventPricingSeatMapForm } from 'src/utils/eventWithDataUtils';\nimport { getCurrentLanguage } from 'src/utils/localeUtils';\nimport { coalesceUndefinedOnly } from 'src/utils/miscUtils';\nimport {\n mapToSelectedSectionSettings,\n SelectedSectionSettingsWithOptionals,\n} from 'src/utils/types/selectedSectionSettingsWithOptionals';\nimport {\n AutoPricingCompListingMode,\n AutoPricingOutlierMode,\n AutoPricingUndercutMode,\n Feature,\n Permission,\n} from 'src/WebApiController';\n\nexport const useEventAutoPricingSettings = () => {\n const { setValue, watch, clearErrors } =\n useFormContext();\n const hasEventPricingPermission = useUserHasAnyOfPermissions(\n Permission.Events_SetPrice\n );\n const hasAllowSeatScoreCompListingModeFeature = useUserHasFeature(\n Feature.AllowSeatScoreCompListingMode\n );\n\n const defaultCompListingMode = useMemo(() => {\n if (hasAllowSeatScoreCompListingModeFeature) {\n return AutoPricingCompListingMode.QualityScore;\n }\n return AutoPricingCompListingMode.SameEvent;\n }, [hasAllowSeatScoreCompListingModeFeature]);\n\n const canAutoPrice =\n useUserHasFeature(Feature.AutoPricing) && hasEventPricingPermission;\n\n const autoPriceFrequency = watch('eventAutoPricing.autoPriceFrequency');\n\n const undercutMode = watch('eventAutoPricing.undercutMode');\n const undercutAbsoluteAmount = watch(\n 'eventAutoPricing.undercutAbsoluteAmount'\n );\n const undercutRelativeAmount = watch(\n 'eventAutoPricing.undercutRelativeAmount'\n );\n const compListingMode = watch('eventAutoPricing.compListingMode');\n const compListingFloor = watch('eventAutoPricing.compListingFloor');\n const compListingCeiling = watch('eventAutoPricing.compListingCeiling');\n const compListingQuantityScoreAdjustmentEnabled = watch(\n 'eventAutoPricing.compListingQuantityScoreAdjustmentEnabled'\n );\n const compListingQuantityScoreAdjustmentOverrideJson = watch(\n 'eventAutoPricing.compListingQuantityScoreAdjustmentOverrideJson'\n );\n const compListingOnlyForSameZoneEnabled = watch(\n 'eventAutoPricing.compListingOnlyForSameZoneEnabled'\n );\n const compListingOnlyForSelectedSectionsEnabled = watch(\n 'eventAutoPricing.compListingOnlyForSelectedSectionsEnabled'\n );\n const compListingExcludeFanInventory = watch(\n 'eventAutoPricing.compListingExcludeFanInventory'\n );\n const compListingSelectedSectionSettings = watch(\n 'eventAutoPricing.compListingSelectedSectionSettings'\n );\n const circuitBreakerRelativeCeiling = watch(\n 'eventAutoPricing.circuitBreakerRelativeCeiling'\n );\n const circuitBreakerRelativeFloor = watch(\n 'eventAutoPricing.circuitBreakerRelativeFloor'\n );\n const circuitBreakerMaxDiscountVelocityPercent = watch(\n 'eventAutoPricing.circuitBreakerMaxDiscountVelocityPercent'\n );\n const circuitBreakerMaxDiscountVelocityTicksInHours = watch(\n 'eventAutoPricing.circuitBreakerMaxDiscountVelocityTicksInHours'\n );\n const circuitBreakerMinCompListingCount = watch(\n 'eventAutoPricing.circuitBreakerMinCompListingCount'\n );\n const outlierMode = watch('eventAutoPricing.outlierMode');\n const outlierStandardDeviations = watch(\n 'eventAutoPricing.outlierStandardDeviations'\n );\n\n const { loginContext } = useAppContext();\n\n const { getUiCurrency } = useLocalizationContext();\n\n const uiCurrency = useMemo(\n () => getUiCurrency(loginContext?.user?.activeAccount?.currencyCode),\n [getUiCurrency, loginContext?.user?.activeAccount?.currencyCode]\n );\n const currencyNumberFormat = useMemo(\n () =>\n new Intl.NumberFormat(getCurrentLanguage(), {\n style: 'currency',\n currency: uiCurrency.code,\n }),\n [uiCurrency.code]\n );\n\n const { event } = useEventMapContext();\n const { pricingSettings: accountPricingSettings } =\n useGetAccountAutoPricingSettings();\n\n const autoPricingEnabled = watch('eventWideAutoPricing');\n\n const onResetSettings = useCallback(() => {\n setValue('eventAutoPricing.undercutMode', null);\n setValue('eventAutoPricing.undercutAbsoluteAmount', null);\n setValue('eventAutoPricing.undercutRelativeAmount', null);\n\n setValue('eventAutoPricing.compListingMode', null);\n setValue('eventAutoPricing.compListingFloor', null);\n setValue('eventAutoPricing.compListingCeiling', null);\n setValue('eventAutoPricing.compListingSelectedSectionSettings', null);\n setValue(\n 'eventAutoPricing.compListingQuantityScoreAdjustmentOverrideJson',\n null\n );\n setValue('eventAutoPricing.compListingOnlyForSameZoneEnabled', null);\n setValue(\n 'eventAutoPricing.compListingOnlyForSelectedSectionsEnabled',\n null\n );\n }, [setValue]);\n\n const onResetAdvanceSettings = useCallback(() => {\n setValue(\n 'eventAutoPricing.compListingQuantityScoreAdjustmentEnabled',\n null\n );\n setValue('eventAutoPricing.compListingExcludeFanInventory', null);\n\n setValue('eventAutoPricing.circuitBreakerRelativeCeiling', null);\n setValue('eventAutoPricing.circuitBreakerRelativeFloor', null);\n setValue('eventAutoPricing.circuitBreakerMaxDiscountVelocityPercent', null);\n setValue(\n 'eventAutoPricing.circuitBreakerMaxDiscountVelocityTicksInHours',\n null\n );\n setValue('eventAutoPricing.circuitBreakerMinCompListingCount', null);\n\n setValue('eventAutoPricing.outlierMode', null);\n setValue('eventAutoPricing.outlierStandardDeviations', null);\n }, [setValue]);\n\n const circuitBreakerSettings = useMemo(() => {\n if (\n circuitBreakerMaxDiscountVelocityPercent != null ||\n circuitBreakerMaxDiscountVelocityTicksInHours != null ||\n circuitBreakerMinCompListingCount != null ||\n circuitBreakerRelativeCeiling != null ||\n circuitBreakerRelativeFloor != null\n ) {\n // if it has any of these set - use the entire area\n return {\n circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerMaxDiscountVelocityTicksInHours,\n circuitBreakerMinCompListingCount,\n circuitBreakerRelativeCeiling,\n circuitBreakerRelativeFloor,\n };\n }\n\n // if it has any of these set - use the entire area\n return {\n circuitBreakerMaxDiscountVelocityPercent:\n accountPricingSettings?.circuitBreakerMaxDiscountVelocityPercent ??\n null,\n circuitBreakerMaxDiscountVelocityTicksInHours:\n accountPricingSettings?.circuitBreakerMaxDiscountVelocityTicksInHours ??\n null,\n circuitBreakerMinCompListingCount:\n accountPricingSettings?.circuitBreakerMinCompListingCount ?? null,\n circuitBreakerRelativeCeiling:\n accountPricingSettings?.circuitBreakerRelativeCeiling ?? null,\n circuitBreakerRelativeFloor:\n accountPricingSettings?.circuitBreakerRelativeFloor ?? null,\n };\n }, [\n accountPricingSettings?.circuitBreakerMaxDiscountVelocityPercent,\n accountPricingSettings?.circuitBreakerMaxDiscountVelocityTicksInHours,\n accountPricingSettings?.circuitBreakerMinCompListingCount,\n accountPricingSettings?.circuitBreakerRelativeCeiling,\n accountPricingSettings?.circuitBreakerRelativeFloor,\n circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerMaxDiscountVelocityTicksInHours,\n circuitBreakerMinCompListingCount,\n circuitBreakerRelativeCeiling,\n circuitBreakerRelativeFloor,\n ]);\n\n const undercutSettings = useMemo(() => {\n if (\n undercutMode != null ||\n undercutAbsoluteAmount != null ||\n undercutRelativeAmount != null\n ) {\n // if it has any of these set - use the entire area\n return {\n undercutMode,\n undercutAbsoluteAmount,\n undercutRelativeAmount,\n };\n }\n\n // if it has any of these set - use the entire area\n return {\n undercutMode:\n accountPricingSettings?.undercutMode ?? AutoPricingUndercutMode.Simple,\n undercutAbsoluteAmount:\n accountPricingSettings?.undercutAbsoluteAmount ??\n DEFAULT_UNDERCUT_ABSOLUTE_AMT,\n undercutRelativeAmount:\n accountPricingSettings?.undercutRelativeAmount ??\n DEFAULT_UNDERCUT_RELATIVE_AMT,\n };\n }, [\n accountPricingSettings?.undercutAbsoluteAmount,\n accountPricingSettings?.undercutMode,\n accountPricingSettings?.undercutRelativeAmount,\n undercutAbsoluteAmount,\n undercutMode,\n undercutRelativeAmount,\n ]);\n\n const compListingSettings = useMemo(() => {\n if (\n compListingMode != null ||\n compListingFloor != null ||\n compListingCeiling != null ||\n compListingOnlyForSameZoneEnabled != null ||\n compListingOnlyForSelectedSectionsEnabled != null ||\n compListingExcludeFanInventory != null ||\n compListingSelectedSectionSettings != null ||\n compListingQuantityScoreAdjustmentEnabled != null ||\n compListingQuantityScoreAdjustmentOverrideJson != null\n ) {\n // if it has any of these set - use the entire area\n return {\n compListingMode,\n compListingFloor: compListingFloor ?? DEFAULT_COMP_LISTING_FLOOR,\n compListingCeiling:\n compListingCeiling ??\n (compListingFloor ?? DEFAULT_COMP_LISTING_FLOOR) +\n DEFAULT_COMP_LISTING_CEIL_MORE_THAN_FLOOR,\n compListingOnlyForSameZoneEnabled,\n compListingOnlyForSelectedSectionsEnabled,\n compListingExcludeFanInventory,\n compListingSelectedSectionSettings,\n compListingQuantityScoreAdjustmentEnabled,\n compListingQuantityScoreAdjustmentOverrideJson,\n };\n }\n\n // if it has any of these set - use the entire area\n return {\n compListingMode:\n accountPricingSettings?.compListingMode ?? defaultCompListingMode,\n compListingFloor:\n accountPricingSettings?.compListingFloor ?? DEFAULT_COMP_LISTING_FLOOR,\n compListingCeiling:\n accountPricingSettings?.compListingCeiling ??\n (accountPricingSettings?.compListingFloor ??\n DEFAULT_COMP_LISTING_FLOOR) +\n DEFAULT_COMP_LISTING_CEIL_MORE_THAN_FLOOR,\n compListingOnlyForSameZoneEnabled:\n accountPricingSettings?.compListingOnlyForSameZoneEnabled ?? null,\n compListingOnlyForSelectedSectionsEnabled:\n accountPricingSettings?.compListingOnlyForSelectedSectionsEnabled ??\n null,\n compListingExcludeFanInventory:\n accountPricingSettings?.compListingExcludeFanInventory ?? null,\n compListingQuantityScoreAdjustmentEnabled:\n accountPricingSettings?.compListingQuantityScoreAdjustmentEnabled ??\n null,\n compListingQuantityScoreAdjustmentOverrideJson:\n accountPricingSettings?.compListingQuantityScoreAdjustmentOverrideJson ??\n null,\n compListingSelectedSectionSettings:\n accountPricingSettings?.compListingSelectedSectionSettings ?? null,\n };\n }, [\n compListingMode,\n compListingFloor,\n compListingCeiling,\n compListingOnlyForSameZoneEnabled,\n compListingOnlyForSelectedSectionsEnabled,\n compListingExcludeFanInventory,\n compListingSelectedSectionSettings,\n compListingQuantityScoreAdjustmentEnabled,\n compListingQuantityScoreAdjustmentOverrideJson,\n accountPricingSettings?.compListingMode,\n accountPricingSettings?.compListingFloor,\n accountPricingSettings?.compListingCeiling,\n accountPricingSettings?.compListingOnlyForSameZoneEnabled,\n accountPricingSettings?.compListingOnlyForSelectedSectionsEnabled,\n accountPricingSettings?.compListingExcludeFanInventory,\n accountPricingSettings?.compListingQuantityScoreAdjustmentEnabled,\n accountPricingSettings?.compListingQuantityScoreAdjustmentOverrideJson,\n accountPricingSettings?.compListingSelectedSectionSettings,\n defaultCompListingMode,\n ]);\n\n const outlierSettings = useMemo(() => {\n if (outlierMode != null || outlierStandardDeviations != null) {\n // if it has any of these set - use the entire area\n return {\n outlierMode,\n outlierStandardDeviations,\n };\n }\n\n // if it has any of these set - use the entire area\n return {\n outlierMode: accountPricingSettings?.outlierMode ?? null,\n outlierStandardDeviations:\n accountPricingSettings?.outlierStandardDeviations ?? null,\n };\n }, [\n accountPricingSettings?.outlierMode,\n accountPricingSettings?.outlierStandardDeviations,\n outlierMode,\n outlierStandardDeviations,\n ]);\n\n const onUndercutChange = useCallback(\n (\n undercutModeNew?: AutoPricingUndercutMode | null,\n undercutAbsoluteAmountNew?: number | null,\n undercutRelativeAmountNew?: number | null\n ) => {\n if (\n undercutModeNew !== undefined ||\n undercutAbsoluteAmountNew !== undefined ||\n undercutRelativeAmountNew !== undefined\n ) {\n setValue(\n 'eventAutoPricing.undercutMode',\n coalesceUndefinedOnly(undercutModeNew, undercutSettings.undercutMode)!\n );\n setValue(\n 'eventAutoPricing.undercutAbsoluteAmount',\n coalesceUndefinedOnly(\n undercutAbsoluteAmountNew,\n undercutSettings.undercutAbsoluteAmount\n )!\n );\n setValue(\n 'eventAutoPricing.undercutRelativeAmount',\n coalesceUndefinedOnly(\n undercutRelativeAmountNew,\n undercutSettings.undercutRelativeAmount\n )!\n );\n }\n },\n [\n setValue,\n undercutSettings.undercutAbsoluteAmount,\n undercutSettings.undercutMode,\n undercutSettings.undercutRelativeAmount,\n ]\n );\n\n const onCompListingChange = useCallback(\n (input: {\n compListingModeNew?: AutoPricingCompListingMode | null;\n compListingFloorNew?: number | null;\n compListingCeilingNew?: number | null;\n compListingOnlyForSameZoneEnabledNew?: boolean | null;\n compListingOnlyForSelectedSectionsEnabledNew?: boolean | null;\n compListingExcludeFanInventoryNew?: boolean | null;\n compListingQuantityScoreAdjustmentEnabledNew?: boolean | null;\n compListingQuantityScoreAdjustmentOverrideJsonNew?: string | null;\n compListingSelectedSectionSettingsNew?: SelectedSectionSettingsWithOptionals | null;\n }) => {\n const {\n compListingModeNew,\n compListingFloorNew,\n compListingCeilingNew,\n compListingOnlyForSameZoneEnabledNew,\n compListingOnlyForSelectedSectionsEnabledNew,\n compListingExcludeFanInventoryNew,\n compListingQuantityScoreAdjustmentEnabledNew,\n compListingQuantityScoreAdjustmentOverrideJsonNew,\n compListingSelectedSectionSettingsNew,\n } = input;\n\n if (\n compListingModeNew !== undefined ||\n compListingFloorNew !== undefined ||\n compListingCeilingNew !== undefined ||\n compListingOnlyForSameZoneEnabledNew !== undefined ||\n compListingOnlyForSelectedSectionsEnabledNew !== undefined ||\n compListingExcludeFanInventoryNew !== undefined ||\n compListingQuantityScoreAdjustmentEnabledNew !== undefined ||\n compListingQuantityScoreAdjustmentOverrideJsonNew !== undefined ||\n compListingSelectedSectionSettingsNew !== undefined\n ) {\n const sanitizedCompListingOnlyForSameZoneEnabledNew =\n compListingOnlyForSelectedSectionsEnabledNew\n ? false\n : compListingOnlyForSameZoneEnabledNew;\n const sanitizedCompListingOnlyForSelectedSectionsEnabledNew =\n compListingOnlyForSameZoneEnabledNew\n ? false\n : compListingOnlyForSelectedSectionsEnabledNew;\n setValue(\n 'eventAutoPricing.compListingMode',\n coalesceUndefinedOnly(\n compListingModeNew,\n compListingSettings.compListingMode\n )!\n );\n setValue(\n 'eventAutoPricing.compListingFloor',\n coalesceUndefinedOnly(\n compListingFloorNew,\n compListingSettings.compListingFloor\n )!\n );\n setValue(\n 'eventAutoPricing.compListingCeiling',\n coalesceUndefinedOnly(\n compListingCeilingNew,\n compListingSettings.compListingCeiling\n )!\n );\n setValue(\n 'eventAutoPricing.compListingOnlyForSameZoneEnabled',\n coalesceUndefinedOnly(\n sanitizedCompListingOnlyForSameZoneEnabledNew,\n compListingSettings.compListingOnlyForSameZoneEnabled\n )!\n );\n setValue(\n 'eventAutoPricing.compListingOnlyForSelectedSectionsEnabled',\n coalesceUndefinedOnly(\n sanitizedCompListingOnlyForSelectedSectionsEnabledNew,\n compListingSettings.compListingOnlyForSelectedSectionsEnabled\n )!\n );\n setValue(\n 'eventAutoPricing.compListingExcludeFanInventory',\n coalesceUndefinedOnly(\n compListingExcludeFanInventoryNew,\n compListingSettings.compListingExcludeFanInventory\n )!\n );\n setValue(\n 'eventAutoPricing.compListingQuantityScoreAdjustmentEnabled',\n coalesceUndefinedOnly(\n compListingQuantityScoreAdjustmentEnabledNew,\n compListingSettings.compListingQuantityScoreAdjustmentEnabled\n )!\n );\n setValue(\n 'eventAutoPricing.compListingQuantityScoreAdjustmentOverrideJson',\n coalesceUndefinedOnly(\n compListingQuantityScoreAdjustmentOverrideJsonNew,\n compListingSettings.compListingQuantityScoreAdjustmentOverrideJson\n )!\n );\n\n setValue(\n 'eventAutoPricing.compListingSelectedSectionSettings',\n coalesceUndefinedOnly(\n mapToSelectedSectionSettings(compListingSelectedSectionSettingsNew),\n compListingSettings.compListingSelectedSectionSettings\n )!\n );\n }\n },\n [\n compListingSettings.compListingCeiling,\n compListingSettings.compListingFloor,\n compListingSettings.compListingMode,\n compListingSettings.compListingOnlyForSameZoneEnabled,\n compListingSettings.compListingOnlyForSelectedSectionsEnabled,\n compListingSettings.compListingExcludeFanInventory,\n compListingSettings.compListingQuantityScoreAdjustmentEnabled,\n compListingSettings.compListingQuantityScoreAdjustmentOverrideJson,\n compListingSettings.compListingSelectedSectionSettings,\n setValue,\n ]\n );\n\n const onCircuitBreakerChange = useCallback(\n (\n circuitBreakerRelativeCeilingNew?: number | null,\n circuitBreakerRelativeFloorNew?: number | null,\n circuitBreakerMaxDiscountVelocityPercentNew?: number | null,\n circuitBreakerMaxDiscountVelocityTicksInHoursNew?: number | null,\n circuitBreakerMinCompListingCountNew?: number | null\n ) => {\n if (\n circuitBreakerRelativeCeilingNew !== undefined ||\n circuitBreakerRelativeFloorNew !== undefined ||\n circuitBreakerMaxDiscountVelocityPercentNew !== undefined ||\n circuitBreakerMaxDiscountVelocityTicksInHoursNew !== undefined ||\n circuitBreakerMinCompListingCountNew !== undefined\n ) {\n setValue(\n 'eventAutoPricing.circuitBreakerRelativeCeiling',\n coalesceUndefinedOnly(\n circuitBreakerRelativeCeilingNew,\n circuitBreakerSettings.circuitBreakerRelativeCeiling\n ) ?? null\n );\n setValue(\n 'eventAutoPricing.circuitBreakerRelativeFloor',\n coalesceUndefinedOnly(\n circuitBreakerRelativeFloorNew,\n circuitBreakerSettings.circuitBreakerRelativeFloor\n ) ?? null\n );\n setValue(\n 'eventAutoPricing.circuitBreakerMaxDiscountVelocityPercent',\n coalesceUndefinedOnly(\n circuitBreakerMaxDiscountVelocityPercentNew,\n circuitBreakerSettings.circuitBreakerMaxDiscountVelocityPercent\n ) ?? null\n );\n setValue(\n 'eventAutoPricing.circuitBreakerMaxDiscountVelocityTicksInHours',\n coalesceUndefinedOnly(\n circuitBreakerMaxDiscountVelocityTicksInHoursNew,\n circuitBreakerSettings.circuitBreakerMaxDiscountVelocityTicksInHours\n ) ?? null\n );\n setValue(\n 'eventAutoPricing.circuitBreakerMinCompListingCount',\n coalesceUndefinedOnly(\n circuitBreakerMinCompListingCountNew,\n circuitBreakerSettings.circuitBreakerMinCompListingCount\n ) ?? null\n );\n }\n },\n [\n circuitBreakerSettings.circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerSettings.circuitBreakerMaxDiscountVelocityTicksInHours,\n circuitBreakerSettings.circuitBreakerMinCompListingCount,\n circuitBreakerSettings.circuitBreakerRelativeCeiling,\n circuitBreakerSettings.circuitBreakerRelativeFloor,\n setValue,\n ]\n );\n\n const onOutlierChange = useCallback(\n (\n outlierModeNew?: AutoPricingOutlierMode | null,\n outlierStandardDeviationsNew?: number | null\n ) => {\n if (\n outlierModeNew !== undefined ||\n outlierStandardDeviationsNew !== undefined\n ) {\n setValue(\n 'eventAutoPricing.outlierMode',\n coalesceUndefinedOnly(outlierModeNew, outlierSettings.outlierMode) ??\n null\n );\n setValue(\n 'eventAutoPricing.outlierStandardDeviations',\n coalesceUndefinedOnly(\n outlierStandardDeviationsNew,\n outlierSettings.outlierStandardDeviations\n ) ?? null\n );\n }\n },\n [\n outlierSettings.outlierMode,\n outlierSettings.outlierStandardDeviations,\n setValue,\n ]\n );\n\n const onCompListingModeChange = useCallback(\n (mode: AutoPricingCompListingMode | null) => {\n clearErrors('eventAutoPricing.compListingFloor');\n\n if (!mode) {\n onCompListingChange({\n compListingModeNew: null,\n compListingFloorNew: null,\n compListingCeilingNew: null,\n });\n return;\n }\n\n onCompListingChange({\n compListingModeNew: mode,\n // Reset flag on mode change\n compListingOnlyForSameZoneEnabledNew: false,\n compListingOnlyForSelectedSectionsEnabledNew: false,\n });\n\n if (mode === AutoPricingCompListingMode.ParentListing) {\n onUndercutChange(AutoPricingUndercutMode.Simple);\n }\n },\n [clearErrors, onCompListingChange, onUndercutChange]\n );\n\n return {\n canAutoPrice,\n uiCurrency,\n currencyNumberFormat,\n showAutoPricingSettings: !(\n !autoPricingEnabled || !hasEventPricingPermission\n ),\n\n autoPriceFrequency,\n autoPricingEnabled,\n onResetSettings,\n onResetAdvanceSettings,\n accountPricingSettings,\n event,\n\n ...circuitBreakerSettings,\n ...compListingSettings,\n ...undercutSettings,\n ...outlierSettings,\n\n onUndercutChange,\n onCompListingChange,\n onCircuitBreakerChange,\n onOutlierChange,\n onCompListingModeChange,\n };\n};\n","import { ChangeEvent } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Switch } from 'src/core/interim/Switch';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { Stack } from 'src/core/ui';\nimport { Slider } from 'src/core/ui/Slider';\nimport { DetailGroup } from 'src/modals/common';\nimport {\n convertSliderValueFromServer,\n convertSliderValueToServer,\n SLIDER_MAX,\n SLIDER_MIN,\n} from 'src/utils/autoPricingUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { EventPricingSeatMapForm } from 'src/utils/eventWithDataUtils';\nimport { roundToPrecision } from 'src/utils/numberFormatter';\nimport { AutoPricingCompListingMode } from 'src/WebApiController';\n\nimport * as styles from './EventPricingSection.css';\nimport { useEventAutoPricingSettings } from './useEventAutoPricingSettings';\n\nexport const CompListingSameQualitySettings = ({\n disabled,\n}: {\n disabled?: boolean;\n}) => {\n useFormContext();\n\n const {\n compListingMode,\n compListingFloor,\n compListingCeiling,\n compListingQuantityScoreAdjustmentEnabled,\n onCompListingChange,\n } = useEventAutoPricingSettings();\n\n const isCompListingAmountDisabled =\n disabled ||\n !compListingMode ||\n compListingMode === AutoPricingCompListingMode.SameZone ||\n compListingMode === AutoPricingCompListingMode.SameEvent ||\n compListingMode === AutoPricingCompListingMode.ParentListing;\n\n return (\n <>\n \n {!isCompListingAmountDisabled && (\n \n (\n {roundToPrecision(val, 0)}%\n )}\n onValueChange={([floor, ceil]) => {\n onCompListingChange({\n compListingFloorNew: convertSliderValueToServer(floor),\n compListingCeilingNew: convertSliderValueToServer(ceil),\n });\n }}\n />\n
    \n \n
    \n
    \n \n )}\n \n {compListingMode === AutoPricingCompListingMode.QualityScore && (\n \n \n }\n >\n ) => e.stopPropagation()}\n onChange={(e) => {\n const isChecked = e.target.checked;\n if (isChecked !== compListingQuantityScoreAdjustmentEnabled) {\n onCompListingChange({\n compListingQuantityScoreAdjustmentEnabledNew: isChecked,\n });\n }\n }}\n />\n \n \n )}\n \n );\n};\n","import { ChangeEvent, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { ButtonWithIcon } from 'src/components/Buttons';\nimport { SeatScoreQuantityMultiplerGraph } from 'src/components/Events/RelativeScoreGraph/SeatScoreQuantityMultiplierGraph';\nimport { Content, FormatContent } from 'src/contexts/ContentContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { Switch } from 'src/core/interim/Switch';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { getTextFieldState, PosTextField } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { PillList } from 'src/core/ui/PillList';\nimport { ToggleGroup } from 'src/core/ui/ToggleGroup';\nimport { SectionSelectDialog } from 'src/dialogs/SectionSelectDialog';\nimport { useAvailableAutopricingModes } from 'src/hooks/useAvailableAutopricingModes';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { useUndercutAmountSettings } from 'src/hooks/useUndercutAmountSettings';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { DetailGroup, DetailSection, SectionContent } from 'src/modals/common';\nimport { EditIcon, IconsFill, PlusIcon, ResetIcon } from 'src/svgs/Viagogo';\nimport {\n getUndercutPriceRepresentingMode,\n SLIDER_MAX,\n SLIDER_MIN,\n UNDERCUT_PRICE_MODE_OPTIONS,\n UndercutPriceSettingsMode,\n} from 'src/utils/autoPricingUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { EventPricingSeatMapForm } from 'src/utils/eventWithDataUtils';\nimport { roundToPrecision } from 'src/utils/numberFormatter';\nimport {\n AutoPricingCompListingMode,\n AutoPricingUndercutMode,\n Feature,\n} from 'src/WebApiController';\n\nimport { RestrictSelectionType } from '../ListingDetails/components/PricingSection/AutoPricingSection.types';\nimport { CompListingSameQualitySettings } from './components/CompListingSameQualitySettings';\nimport * as styles from './components/EventPricingSection.css';\nimport { useEventAutoPricingSettings } from './components/useEventAutoPricingSettings';\n\nexport const EventAutoPricingSettings = ({\n disabled,\n hasAnyScore,\n}: {\n disabled: boolean;\n hasAnyScore: boolean;\n}) => {\n const { setValue, clearErrors, formState } =\n useFormContext();\n\n const sectionSelectDialog = useBasicDialog();\n\n const {\n canAutoPrice,\n autoPriceFrequency,\n autoPricingEnabled,\n uiCurrency,\n\n onResetSettings,\n onResetAdvanceSettings,\n\n undercutMode,\n undercutAbsoluteAmount,\n undercutRelativeAmount,\n\n compListingMode,\n compListingFloor,\n compListingCeiling,\n compListingSelectedSectionSettings,\n compListingOnlyForSameZoneEnabled,\n compListingOnlyForSelectedSectionsEnabled,\n\n compListingQuantityScoreAdjustmentOverrideJson,\n\n onUndercutChange,\n onCompListingChange,\n onCompListingModeChange,\n } = useEventAutoPricingSettings();\n\n const hasExcludeFanInventory = useUserHasFeature(Feature.ExcludeFanInventory);\n const hasAutoPriceFrequencyFeature = useUserHasFeature(\n Feature.AutoPriceFrequency\n );\n\n const restrictSelection = Boolean(\n compListingOnlyForSameZoneEnabled ||\n compListingOnlyForSelectedSectionsEnabled\n );\n\n const {\n undercutAbsoluteAmountMode,\n setUndercutAbsoluteAmountMode,\n undercutRelativeAmountMode,\n setUndercutRelativeAmountMode,\n } = useUndercutAmountSettings(undercutAbsoluteAmount, undercutRelativeAmount);\n\n const { venueMapInfo } = useEventMapContext();\n\n const compListingFloorError =\n formState.errors.eventAutoPricing?.compListingFloor?.message;\n const compListingSelectedSectionError =\n formState.errors.eventAutoPricing?.compListingSelectedSectionSettings\n ?.message;\n\n const undercutAbsoluteAmountError =\n formState.errors.eventAutoPricing?.undercutAbsoluteAmount?.message;\n const undercutRelativeAmountError =\n formState.errors.eventAutoPricing?.undercutRelativeAmount?.message;\n\n const isMobile = useMatchMedia('mobile');\n\n const {\n compListingModes,\n compListingModesDisabled,\n undercutModes,\n undercutModesDisabled,\n restrictSelectionTypes,\n } = useAvailableAutopricingModes(\n true,\n undercutMode,\n compListingMode,\n hasAnyScore,\n false /* event config won't ever show parent listing */,\n false /* isGlobalEdit */,\n compListingOnlyForSelectedSectionsEnabled\n );\n\n const isDealScoreMode = undercutMode === AutoPricingUndercutMode.Deal;\n\n const isParentListingMode =\n compListingMode === AutoPricingCompListingMode.ParentListing;\n\n const showCompListingRestictSelectionDetails =\n compListingMode != null &&\n (compListingMode === AutoPricingCompListingMode.QualityScore ||\n compListingMode === AutoPricingCompListingMode.SameEvent ||\n compListingMode === AutoPricingCompListingMode.SameZone);\n\n const showCompListingSettingsDetails = !(\n !compListingMode ||\n compListingMode === AutoPricingCompListingMode.SameZone ||\n compListingMode === AutoPricingCompListingMode.SameEvent ||\n compListingMode === AutoPricingCompListingMode.ParentListing\n );\n\n const selectedSectionsPills = useMemo(\n () =>\n compListingSelectedSectionSettings?.sectionIdFilter\n ?.map((sectionId) => {\n const section = venueMapInfo?.sections.find(\n (section) => sectionId === section.id\n );\n return {\n value: section?.id.toString() ?? '',\n display: section?.name ?? '',\n };\n })\n .filter((info) => info.value && info.display) ?? [],\n [\n compListingSelectedSectionSettings?.sectionIdFilter,\n venueMapInfo?.sections,\n ]\n );\n\n return (\n <>\n {canAutoPrice && (\n }>\n \n \n \n \n \n \n {canAutoPrice && (\n \n }\n >\n \n ) =>\n e.stopPropagation()\n }\n onChange={(e) => {\n const isChecked = e.target.checked;\n if (isChecked !== autoPricingEnabled) {\n setValue('eventWideAutoPricing', isChecked);\n }\n }}\n />\n
    \n \n )}\n
    \n \n
    \n \n
    \n e.stopPropagation()}\n onChange={onCompListingModeChange}\n />\n
    \n
    \n {showCompListingSettingsDetails && (\n <>\n \n \n
    \n \n
    \n \n {\n let v = parseFloat(e.target.value);\n v = parseFloat(v.toFixed(2));\n if (isNaN(v)) {\n onCompListingChange({\n compListingFloorNew: null,\n });\n return;\n }\n clearErrors('eventAutoPricing.compListingFloor');\n if (v < SLIDER_MIN) {\n onCompListingChange({\n compListingFloorNew: SLIDER_MIN,\n });\n } else if (v > SLIDER_MAX) {\n onCompListingChange({\n compListingFloorNew: SLIDER_MAX,\n });\n } else {\n onCompListingChange({ compListingFloorNew: v });\n }\n }}\n />\n \n
    \n {' '}\n \n
    \n \n {\n let v = parseFloat(e.target.value);\n v = parseFloat(v.toFixed(2));\n if (isNaN(v)) {\n onCompListingChange({\n compListingCeilingNew: null,\n });\n return;\n }\n\n clearErrors('eventAutoPricing.compListingCeiling');\n if (v < SLIDER_MIN) {\n onCompListingChange({\n compListingCeilingNew: SLIDER_MIN,\n });\n } else if (v > SLIDER_MAX) {\n onCompListingChange({\n compListingCeilingNew: SLIDER_MAX,\n });\n } else {\n onCompListingChange({ compListingCeilingNew: v });\n }\n }}\n />\n \n
    \n \n
    \n
    \n
    \n\n \n \n )}\n {showCompListingRestictSelectionDetails && (\n \n }\n >\n ) =>\n e.stopPropagation()\n }\n onChange={(e) => {\n const isChecked = e.target.checked;\n if (isChecked) {\n if (\n !compListingOnlyForSameZoneEnabled &&\n !compListingOnlyForSelectedSectionsEnabled\n ) {\n // set zone by default\n onCompListingChange({\n compListingOnlyForSameZoneEnabledNew: true,\n compListingOnlyForSelectedSectionsEnabledNew: false,\n });\n }\n } else {\n onCompListingChange({\n compListingOnlyForSameZoneEnabledNew: false,\n compListingOnlyForSelectedSectionsEnabledNew: false,\n });\n }\n }}\n />\n \n {restrictSelection && (\n \n
    \n \n
    \n e.stopPropagation()}\n onChange={(v) => {\n clearErrors('eventAutoPricing.compListingFloor');\n if (v === RestrictSelectionType.SameZone) {\n onCompListingChange({\n compListingOnlyForSameZoneEnabledNew: true,\n compListingOnlyForSelectedSectionsEnabledNew: false,\n });\n } else {\n onCompListingChange({\n compListingOnlyForSameZoneEnabledNew: false,\n compListingOnlyForSelectedSectionsEnabledNew: true,\n });\n }\n }}\n />\n
    \n )}\n {compListingOnlyForSelectedSectionsEnabled && (\n \n \n {compListingSelectedSectionSettings?.sectionIdFilter\n ?.length ? (\n <>\n \n \n \n }\n textContentId={ContentId.EditSections}\n onClick={sectionSelectDialog.launchDialog}\n disabled={disabled}\n style={{ paddingLeft: 0, paddingRight: 0 }}\n />\n \n ) : (\n \n }\n textContentId={ContentId.SelectSections}\n onClick={sectionSelectDialog.launchDialog}\n disabled={disabled}\n style={{ padding: 0 }}\n />\n )}\n \n \n )}\n
    \n )}\n \n \n \n {isParentListingMode ? (\n
    \n \n
    \n ) : (\n <>\n \n \n
    \n \n
    \n e.stopPropagation()}\n onChange={(v) => {\n clearErrors('eventAutoPricing.undercutAbsoluteAmount');\n clearErrors('eventAutoPricing.undercutRelativeAmount');\n if (v) {\n onUndercutChange(v as AutoPricingUndercutMode);\n } else {\n onUndercutChange(null, null, null);\n }\n }}\n />\n
    \n \n
    \n
    \n
    \n {isDealScoreMode && (\n
    \n \n
    \n )}\n \n )}\n \n \n {\n if (!value) return;\n const mode = value as UndercutPriceSettingsMode;\n setUndercutRelativeAmountMode(mode);\n if (undercutRelativeAmount) {\n const curAmountAbs = Math.abs(undercutRelativeAmount);\n onUndercutChange(\n undefined,\n undefined,\n getUndercutPriceRepresentingMode(curAmountAbs, mode)\n );\n }\n }}\n />\n
    \n \n
    \n \n {\n clearErrors('eventAutoPricing.undercutAbsoluteAmount');\n clearErrors('eventAutoPricing.undercutRelativeAmount');\n const v = parseFloat(e.target.value);\n if (v >= 0 && v <= Number.MAX_VALUE) {\n let relativeValue = Math.min(v, 100) / 100;\n relativeValue = getUndercutPriceRepresentingMode(\n relativeValue,\n undercutRelativeAmountMode ??\n UndercutPriceSettingsMode.Discount\n );\n\n onUndercutChange(undefined, undefined, relativeValue);\n } else {\n onUndercutChange(undefined, undefined, null);\n }\n }}\n />\n \n
    then
    \n {\n if (!value) return;\n const mode = value as UndercutPriceSettingsMode;\n setUndercutAbsoluteAmountMode(mode);\n if (undercutAbsoluteAmount) {\n const curAmountAbs = Math.abs(undercutAbsoluteAmount);\n onUndercutChange(\n undefined,\n getUndercutPriceRepresentingMode(curAmountAbs, mode)\n );\n }\n }}\n />\n
    by
    \n \n {\n clearErrors('eventAutoPricing.undercutAbsoluteAmount');\n clearErrors('eventAutoPricing.undercutRelativeAmount');\n let v = parseFloat(e.target.value);\n if (v >= 0 && v <= Number.MAX_VALUE) {\n v = getUndercutPriceRepresentingMode(\n v,\n undercutRelativeAmountMode ??\n UndercutPriceSettingsMode.Discount\n );\n\n onUndercutChange(undefined, undefined, v);\n } else {\n onUndercutChange(undefined, null);\n }\n }}\n />\n \n
    \n
    \n {hasAutoPriceFrequencyFeature ? (\n <>\n \n \n \n \n \n \n \n \n }\n onChange={(e) => {\n let v = parseInt(e.target.value);\n if (!isNaN(v)) {\n if (v < 1) {\n v = 1;\n }\n setValue('eventAutoPricing.autoPriceFrequency', v);\n return;\n } else {\n setValue(\n 'eventAutoPricing.autoPriceFrequency',\n null\n );\n }\n }}\n />\n \n \n \n \n ) : null}\n \n \n \n \n {\n onCompListingChange({\n compListingQuantityScoreAdjustmentOverrideJsonNew:\n JSON.stringify({ overrides, segments }),\n });\n }}\n />\n \n \n }\n textContentId={ContentId.ResetSettings}\n onClick={() => {\n onResetSettings();\n onResetAdvanceSettings();\n }}\n />\n \n \n \n )}\n {\n const compListingSelectedSectionSettingsNew = {\n ...compListingSelectedSectionSettings,\n sectionIdFilter: selectedSections.map((s) => s.id),\n rowIdFilter: compListingSelectedSectionSettings?.rowIdFilter ?? [],\n sectionRowIdFilter:\n compListingSelectedSectionSettings?.sectionRowIdFilter ?? {},\n };\n onCompListingChange({ compListingSelectedSectionSettingsNew });\n sectionSelectDialog.closeDialog();\n clearErrors('eventAutoPricing.compListingSelectedSectionSettings');\n }}\n onClosed={sectionSelectDialog.closeDialog}\n />\n \n );\n};\n","import { isEqual } from 'lodash-es';\nimport { useCallback, useContext, useEffect, useMemo, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { Button, Stack } from 'src/core/ui';\nimport { ChangeRowScoreDialogMultiSection } from 'src/dialogs/ChangeRowScoreDialog';\nimport { SectionRowTableDialog } from 'src/dialogs/SectionRowTableDialog/SectionRowTableDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useGetEventAutoPricingSettings } from 'src/hooks/useGetEventAutoPricingSettings';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { EventPricingSeatMapForm } from 'src/utils/eventWithDataUtils';\nimport {\n getCompleteEventConfigScoreOverrides,\n getEventConfigScoreOverride,\n} from 'src/utils/seatScoreUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n EventConfigScoreOverride,\n Feature,\n PricingClient,\n RowInfo,\n ScoreModel,\n SectionInfo,\n SectionScoreOverride,\n} from 'src/WebApiController';\n\nimport { DetailSection, SectionContent } from '../common';\nimport { EventVenueHeatMap } from '../common/EventSeatMap';\nimport { EventSeatMapSelection } from '../EventSeatMapSelection';\nimport { EventAutoPricingSettingsFormContent } from './components/EventAutoPricingSettingsFormContent/EventAutoPricingSettingsFormContent';\nimport { EventAutoPricingSettings } from './EventAutoPricingSettings';\nimport { EventPricingSeatMap } from './EventPricingSeatMap';\nimport * as styles from './EventPricingSeatMap.css';\n\nexport type EventScoreUpdate = {\n newScoreOverrides?: SectionScoreOverride[];\n newConfigPayload?: string;\n};\n\nexport const EventPricingSeatMapBody = () => {\n const [isLoading, setIsLoading] = useState(false);\n const { watch, setValue, getValues, formState } =\n useFormContext();\n\n const hasScaledSeatScoreFeature = useUserHasFeature(Feature.ScaledSeatScore);\n\n const {\n event,\n venueMapInfo,\n venueMapsByScoreModelQuery,\n activeConfigOverride,\n } = useEventMapContext();\n const { setModal } = useContext(ModalContext);\n const { activeAccountWebClientConfig, loginContext } = useAppContext();\n const { getUiCurrency } = useLocalizationContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const uiCurrency = useMemo(\n () => getUiCurrency(loginContext?.user?.activeAccount?.currencyCode),\n [getUiCurrency, loginContext?.user?.activeAccount?.currencyCode]\n );\n\n const { pricingSettings } = useGetEventAutoPricingSettings(event!, true);\n const hasScoreSectionRowTableFeature = useUserHasFeature(\n Feature.ScoreSectionRowTable\n );\n const hasEditMapInListingTabFeature = useUserHasFeature(\n Feature.EditMapInListingTab\n );\n const hasIntelligibleAutoPricingFeature = useUserHasFeature(\n Feature.IntelligibleAutoPricingSettings\n );\n const hasAllowSeatScoreCompListingModeFeature = useUserHasFeature(\n Feature.AllowSeatScoreCompListingMode\n );\n const hasAutoPriceFrequencyFeature = useUserHasFeature(\n Feature.AutoPriceFrequency\n );\n\n const sanitizedScoreModel = useMemo(() => {\n const scoreModel = pricingSettings?.scoreModel;\n if (scoreModel) return scoreModel;\n\n const { AdvancedVenueGeometry, MergedVenueGeometry } =\n venueMapsByScoreModelQuery.data ?? {};\n if (AdvancedVenueGeometry) return ScoreModel.AdvancedVenueGeometry;\n if (MergedVenueGeometry) return ScoreModel.MergedVenueGeometry;\n return ScoreModel.VenueGeometry;\n }, [pricingSettings?.scoreModel, venueMapsByScoreModelQuery.data]);\n\n const modeledSectionScores = useMemo(() => {\n switch (sanitizedScoreModel) {\n case ScoreModel.AdvancedVenueGeometry:\n return venueMapsByScoreModelQuery.data?.AdvancedVenueGeometry;\n\n case ScoreModel.MergedVenueGeometry:\n return venueMapsByScoreModelQuery.data?.MergedVenueGeometry;\n\n default:\n return venueMapsByScoreModelQuery.data?.VenueGeometry;\n }\n }, [\n sanitizedScoreModel,\n venueMapsByScoreModelQuery.data?.AdvancedVenueGeometry,\n venueMapsByScoreModelQuery.data?.MergedVenueGeometry,\n venueMapsByScoreModelQuery.data?.VenueGeometry,\n ]);\n\n // Hook form fields\n const eventScoreOverride = watch('eventScoreOverride');\n const configPayload = watch('eventScoreOverride.cfgPayload');\n const name = watch('eventScoreOverride.name');\n const scoreOverrides =\n watch('eventScoreOverride.scoreOverrides') ??\n getCompleteEventConfigScoreOverrides(modeledSectionScores?.sectionScores);\n const scoreModel = watch('eventAutoPricing.scoreModel');\n\n useEffect(() => {\n if (sanitizedScoreModel !== scoreModel) {\n setValue('eventAutoPricing.scoreModel', sanitizedScoreModel);\n }\n }, [sanitizedScoreModel, scoreModel, setValue]);\n\n const hasAnyScore = useMemo(\n () => scoreOverrides?.some((s) => s.score),\n [scoreOverrides]\n );\n\n const newModelName = useContent(ContentId.NewModel);\n const changeRowScoreDialog = useBasicDialog();\n const sectionRowDialog = useBasicDialog();\n\n const onSectionSeatScoreChanged = useCallback(\n ({ newScoreOverrides, newConfigPayload }: EventScoreUpdate) => {\n let newOverride: EventConfigScoreOverride | undefined = undefined;\n if (eventScoreOverride) {\n newOverride = { ...eventScoreOverride };\n } else if (activeConfigOverride) {\n newOverride = { ...activeConfigOverride };\n } else {\n newOverride = getEventConfigScoreOverride(\n event!.viagId!,\n modeledSectionScores ?? venueMapInfo!,\n newModelName,\n null\n );\n }\n\n if (newScoreOverrides != null) {\n newOverride.scoreOverrides = newScoreOverrides;\n }\n if (newConfigPayload != null) {\n newOverride.cfgPayload = newConfigPayload;\n }\n\n if (newScoreOverrides != null || newConfigPayload != null) {\n setValue('eventScoreOverride', newOverride);\n }\n\n return Promise.resolve();\n },\n [\n eventScoreOverride,\n activeConfigOverride,\n event,\n modeledSectionScores,\n venueMapInfo,\n newModelName,\n setValue,\n ]\n );\n\n const onSectionRowChange = useCallback(\n (updated: SectionScoreOverride[]) => {\n let newOverride: EventConfigScoreOverride | undefined = undefined;\n if (eventScoreOverride) {\n newOverride = { ...eventScoreOverride };\n } else if (activeConfigOverride) {\n newOverride = { ...activeConfigOverride };\n } else {\n newOverride = getEventConfigScoreOverride(\n event!.viagId!,\n modeledSectionScores ?? venueMapInfo!,\n newModelName,\n null\n );\n }\n newOverride.scoreOverrides = updated;\n setValue('eventScoreOverride', newOverride);\n },\n [\n activeConfigOverride,\n event,\n eventScoreOverride,\n modeledSectionScores,\n newModelName,\n setValue,\n venueMapInfo,\n ]\n );\n\n const onRowSeatScoreChanged = useCallback(\n (\n newScoreOverrides: SectionScoreOverride[],\n newConfigPayload: string | null\n ) => {\n onSectionSeatScoreChanged({\n newScoreOverrides,\n newConfigPayload: newConfigPayload ?? undefined,\n }).then(() => {\n changeRowScoreDialog.closeDialog();\n });\n },\n [onSectionSeatScoreChanged, changeRowScoreDialog]\n );\n\n const onSavingSeatMap = useCallback(() => {\n const eventForm = getValues();\n if (\n eventForm.eventScoreOverride &&\n !isEqual(\n eventForm.eventScoreOverride,\n formState.defaultValues?.eventScoreOverride\n )\n ) {\n return tryInvokeApi(\n async () => {\n setIsLoading(true);\n\n const client = new PricingClient(activeAccountWebClientConfig);\n const newId = await client.upsertEventSeatMapScoreOverride({\n ...eventForm.eventScoreOverride!,\n scoreOverrides: getCompleteEventConfigScoreOverrides(\n modeledSectionScores?.sectionScores,\n eventForm.eventScoreOverride!.scoreOverrides,\n false,\n hasScaledSeatScoreFeature\n )!,\n });\n\n if (event?.viagId && newId !== activeConfigOverride?.id) {\n await client.setEventSeatMapScoreOverride(\n event.viagId,\n newId,\n null\n );\n }\n },\n (error) => {\n showErrorDialog(\n 'PricingClient.upsertEventSeatMapScoreOverride',\n error,\n {\n trackErrorData: { event },\n }\n );\n },\n () => {\n setIsLoading(false);\n }\n );\n }\n\n return Promise.resolve();\n }, [\n activeAccountWebClientConfig,\n activeConfigOverride?.id,\n event,\n formState.defaultValues?.eventScoreOverride,\n getValues,\n hasScaledSeatScoreFeature,\n modeledSectionScores?.sectionScores,\n showErrorDialog,\n ]);\n\n const allSections = useMemo(\n () => venueMapInfo?.sections ?? [],\n [venueMapInfo?.sections]\n );\n\n const sectionWithRowsWithOrdinal = useMemo(() => {\n const sections: SectionInfo[] = [];\n const rows: Record = {};\n allSections.forEach((s) => {\n rows[s.id] = s.rows\n .filter((r) => !r.isSpeculative && r.ordinal != null)\n .toSorted((a, b) => (a.ordinal ?? 0) - (b.ordinal ?? 0));\n });\n\n allSections.forEach((s) => {\n if (rows[s.id].length > 0) {\n sections.push(s);\n }\n });\n return sections;\n }, [allSections]);\n\n const scoreName = useMemo(() => {\n if (name) {\n return name;\n }\n\n if (sanitizedScoreModel === ScoreModel.AdvancedVenueGeometry) {\n return ;\n }\n\n if (sanitizedScoreModel === ScoreModel.MergedVenueGeometry) {\n return ;\n }\n\n if (sanitizedScoreModel === ScoreModel.VenueGeometry) {\n return ;\n }\n\n return ;\n }, [name, sanitizedScoreModel]);\n\n if (!event) {\n return null;\n }\n\n return (\n <>\n {hasIntelligibleAutoPricingFeature ? (\n \n ) : (\n \n )}\n\n {!hasEditMapInListingTabFeature && (\n <>\n }>\n \n {isLoading ? (\n \n ) : (\n \n
    \n \n
    \n
    \n
    \n {sectionWithRowsWithOrdinal.length > 0 && (\n \n \n \n \n {hasScoreSectionRowTableFeature && (\n \n \n \n )}\n \n )}\n
    \n \n
    \n {scoreName}\n {' -'}\n
    \n {\n // We need to save the seat map prior to closing the modal and launch the\n // seat map selection modal\n onSavingSeatMap().then(() =>\n setModal({\n children: (\n \n ),\n clickOutsideToClose: true,\n size: 'slide-in',\n }}\n />\n ),\n clickOutsideToClose: true,\n size: 'slide-in',\n })\n );\n }}\n >\n \n \n
    \n \n
    \n \n
    \n
  • \n \n
  • \n
  • \n \n
  • \n
    \n
    \n
    \n )}\n
    \n
    \n \n \n \n )}\n \n );\n};\n","import { isEqual } from 'lodash-es';\nimport {\n ComponentProps,\n useCallback,\n useContext,\n useEffect,\n useState,\n} from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { OkButton } from 'src/components/Buttons/OkButton';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport {\n EventMapContextProvider,\n useEventMapContext,\n} from 'src/contexts/EventMapContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { ApplyHeatMapToAllEventsDialog } from 'src/dialogs/ApplyHeatMapToAllEventsDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useGetEventAutoPricingSettings } from 'src/hooks/useGetEventAutoPricingSettings';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n EventPricingSeatMapForm,\n validateAutoPricingSettings,\n} from 'src/utils/eventWithDataUtils';\nimport { getCompleteEventConfigScoreOverrides } from 'src/utils/seatScoreUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n Event,\n EventConfigScoreOverride,\n Feature,\n ListingClient,\n PricingClient,\n} from 'src/WebApiController';\n\nimport { CancellableFormFooter } from '../common';\nimport { CancellableFormHeader } from '../common/CancellableFormHeader';\nimport { ConnectedEventEntityHeader } from '../common/EventEntityHeader';\nimport { modalDetails } from '../common/Modals.css';\nimport { ModalBody, ModalFooter } from '../Modal';\nimport { ModalBodyDataContainer } from '../Modal/Modal.styled';\nimport { EventPricingSeatMapBody } from './EventPricingSeatMapBody';\n\ntype EventPricingSeatMapProps = {\n event: Event;\n};\n\nexport const EventPricingSeatMap = ({ event }: EventPricingSeatMapProps) => {\n return (\n \n \n \n );\n};\n\nexport const EventPricingSeatMapFormBody = ({\n event,\n}: EventPricingSeatMapProps) => {\n const { activeConfigOverride, mapConfigOverridesQuery, isMapLoading } =\n useEventMapContext();\n\n const { pricingSettings, allListingEnabledPricing, pricingSettingsQuery } =\n useGetEventAutoPricingSettings(event, true);\n\n const methods = useForm({\n defaultValues: {\n eventAutoPricing: pricingSettings,\n eventWideAutoPricing: allListingEnabledPricing,\n eventScoreOverride: activeConfigOverride,\n },\n });\n\n useEffect(() => {\n if (\n (activeConfigOverride &&\n !isEqual(\n methods.formState.defaultValues?.eventScoreOverride,\n activeConfigOverride\n )) ||\n (pricingSettings &&\n !isEqual(\n methods.formState.defaultValues?.eventAutoPricing,\n pricingSettings\n )) ||\n (allListingEnabledPricing != null &&\n methods.formState.defaultValues?.eventWideAutoPricing !==\n allListingEnabledPricing)\n ) {\n methods.reset({\n eventAutoPricing: pricingSettings,\n eventWideAutoPricing: allListingEnabledPricing,\n eventScoreOverride: activeConfigOverride,\n });\n }\n }, [\n activeConfigOverride,\n allListingEnabledPricing,\n methods,\n pricingSettings,\n ]);\n\n if (\n (!activeConfigOverride &&\n !pricingSettings &&\n mapConfigOverridesQuery.isLoading) ||\n isMapLoading ||\n pricingSettingsQuery.isLoading\n ) {\n return ;\n }\n\n return (\n \n pricingSettingsQuery.refetch()}\n />\n \n );\n};\n\nconst EventPricingSeatMapContent = ({\n watch,\n formState,\n handleSubmit,\n clearErrors,\n setError,\n setValue,\n refreshAutoPricingSettings,\n}: Omit<\n ComponentProps>,\n 'children'\n> & { refreshAutoPricingSettings: () => void }) => {\n const { closeModal } = useContext(ModalContext);\n const { activeAccountWebClientConfig } = useAppContext();\n const [isLoading, setIsLoading] = useState(false);\n const { showErrorDialog } = useErrorBoundaryContext();\n const { event, activeConfigOverride, venueMapInfo, mapConfigOverridesQuery } =\n useEventMapContext();\n const { setActivePosEntity } = useActivePosEntityContext();\n const hasScaledSeatScoreFeature = useUserHasFeature(Feature.ScaledSeatScore);\n\n const curFormValues = watch();\n\n const compListingFloorCeilingError = useContent(\n ContentId.CompListingFloorMustLessThanCeiling\n );\n const requiredMsg = useContent(ContentId.Required);\n\n const [applyToAllEventsForConfig, setApplyToAllEventsForConfig] = useState<\n EventConfigScoreOverride | undefined\n >();\n const { launchDialog, closeDialog, dialogProps } = useBasicDialog();\n\n const onSubmit = useCallback(\n async (eventForm: EventPricingSeatMapForm) => {\n setIsLoading(true);\n tryInvokeApi(\n async () => {\n const client = new PricingClient(activeAccountWebClientConfig);\n const listingClient = new ListingClient(activeAccountWebClientConfig);\n const promises: Promise[] = [];\n\n if (\n eventForm.eventWideAutoPricing !==\n formState.defaultValues?.eventWideAutoPricing\n ) {\n promises.push(\n listingClient.updateAutoPricingEnabledForEvent(\n event!.posIds,\n !!eventForm.eventWideAutoPricing\n )\n );\n }\n\n if (\n event?.viagId &&\n eventForm.eventAutoPricing &&\n !isEqual(\n eventForm.eventAutoPricing,\n formState.defaultValues?.eventAutoPricing\n )\n ) {\n promises.push(\n client.mergeEventPricingSettings(\n event.viagId,\n eventForm.eventAutoPricing!\n )\n );\n }\n\n if (promises.length) {\n await Promise.all(promises);\n setActivePosEntity(0); // This will clear any active listing so it will pick up the latest pricing change here when re-open\n refreshAutoPricingSettings();\n }\n\n if (\n event?.viagId &&\n eventForm.eventScoreOverride &&\n !isEqual(\n eventForm.eventScoreOverride,\n formState.defaultValues?.eventScoreOverride\n )\n ) {\n const newId = await client.upsertEventSeatMapScoreOverride({\n ...eventForm.eventScoreOverride,\n viagogoEventId: event.viagId,\n scoreOverrides: getCompleteEventConfigScoreOverrides(\n venueMapInfo?.sectionScores,\n eventForm.eventScoreOverride.scoreOverrides,\n false,\n hasScaledSeatScoreFeature\n )!,\n });\n\n const oldId = eventForm.eventScoreOverride?.id;\n setValue('eventScoreOverride.id', newId);\n\n const result = await mapConfigOverridesQuery.refetch();\n const newConfig = result.data?.find((ev) => ev.id === newId);\n\n if (\n newId !== activeConfigOverride?.id &&\n oldId <= 0 &&\n (newConfig?.eventIds?.length ?? 0) >= 2\n ) {\n setApplyToAllEventsForConfig(newConfig);\n launchDialog();\n return;\n }\n\n await client.setEventSeatMapScoreOverride(\n event.viagId,\n newId,\n null\n );\n }\n\n closeModal(true);\n },\n (error) => {\n showErrorDialog('PricingClient.updates', error, {\n trackErrorData: eventForm,\n });\n },\n () => {\n setIsLoading(false);\n }\n );\n },\n [\n activeAccountWebClientConfig,\n activeConfigOverride?.id,\n closeModal,\n event,\n formState.defaultValues?.eventAutoPricing,\n formState.defaultValues?.eventScoreOverride,\n formState.defaultValues?.eventWideAutoPricing,\n hasScaledSeatScoreFeature,\n launchDialog,\n mapConfigOverridesQuery,\n refreshAutoPricingSettings,\n setActivePosEntity,\n setValue,\n showErrorDialog,\n venueMapInfo?.sectionScores,\n ]\n );\n\n const hasChanges = useCallback(\n (eventForm: EventPricingSeatMapForm) => {\n // Make sure we only send back the settable props\n return (\n !isEqual(\n formState.defaultValues?.eventAutoPricing,\n eventForm.eventAutoPricing\n ) ||\n !isEqual(\n formState.defaultValues?.eventScoreOverride,\n eventForm.eventScoreOverride\n ) ||\n eventForm.eventWideAutoPricing !==\n formState.defaultValues?.eventWideAutoPricing\n );\n },\n [\n formState.defaultValues?.eventAutoPricing,\n formState.defaultValues?.eventScoreOverride,\n formState.defaultValues?.eventWideAutoPricing,\n ]\n );\n\n const onSubmitHandler = useCallback(() => {\n if (!hasChanges(curFormValues)) return;\n\n if (\n !validateAutoPricingSettings(\n clearErrors,\n setError,\n setValue,\n curFormValues,\n compListingFloorCeilingError,\n requiredMsg\n )\n ) {\n return;\n }\n\n handleSubmit(onSubmit)();\n }, [\n clearErrors,\n compListingFloorCeilingError,\n curFormValues,\n handleSubmit,\n hasChanges,\n onSubmit,\n requiredMsg,\n setError,\n setValue,\n ]);\n\n const formHasChanges = hasChanges(curFormValues);\n\n return (\n <>\n \n }\n />\n \n\n \n
    \n \n \n \n
    \n
    \n\n \n \n \n \n \n\n {\n setApplyToAllEventsForConfig(undefined);\n closeDialog();\n closeModal(true);\n }}\n />\n \n );\n};\n","import { ReactNode } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { shared, vars } from 'src/core/themes';\nimport { Button, Card } from 'src/core/ui';\nimport { IconsFill, MinusIcon, PlusIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport * as styles from './SeatScoreConfigCard.css';\n\nexport type SeatScoreConfigCardProps = {\n label: ReactNode;\n importance: number;\n showChildren: boolean;\n onIncrementImportance?: () => void;\n onDecrementImportance?: () => void;\n /**\n * Pass the BezierGraph as a child\n */\n children?: ReactNode;\n};\n\n/**\n * Card that shows seat score configuration graph for usage in the seat score override editing view.\n * @param props\n * @returns\n */\nexport function SeatScoreConfigCard({\n label,\n importance,\n showChildren,\n onIncrementImportance,\n onDecrementImportance,\n children,\n}: SeatScoreConfigCardProps) {\n return (\n \n
    \n
    {label}
    \n \n \n \n
    \n
    {importance}
    \n
    \n \n
    \n
    \n = 10}\n onClick={onIncrementImportance}\n >\n \n \n
    \n \n {children}\n \n
    \n );\n}\n","import { DownloadButton } from 'src/components/Buttons/DownloadButton';\nimport { OkButton } from 'src/components/Buttons/OkButton';\nimport { Content } from 'src/contexts/ContentContext';\nimport { DnDFileUploader } from 'src/core/POS/DnDFileUploader';\nimport { Stack } from 'src/core/ui';\nimport { WarningOutlineIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport * as modalHeaderStyles from '../MessagesAddSourceModal/MessagesAddSourceModal.css';\nimport { Modal, ModalBody, ModalFooter, ModalHeader } from '../Modal';\n\nexport function UploadSeatScoreModal({\n isOpen,\n isLoading,\n uploadedFile,\n onDownloadTemplateClick,\n onUploadedFileChange,\n onCsvFileUploaded,\n onClose,\n}: {\n isOpen?: boolean;\n isLoading?: boolean;\n uploadedFile?: File | undefined;\n onDownloadTemplateClick: () => void;\n onUploadedFileChange: (file: File) => void;\n onCsvFileUploaded: () => void;\n onClose?: () => void;\n}) {\n return (\n \n \n
    \n
    \n \n
    \n
    \n
    \n \n
    \n \n \n files[0] && onUploadedFileChange(files[0])\n }\n acceptedFileTypes={['.csv']}\n />\n \n \n \n \n
    \n
    \n \n onCsvFileUploaded()}\n />\n \n
    \n );\n}\n","import { isEqual } from 'lodash-es';\nimport {\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useGetSet } from 'react-use';\nimport { SeatScoreConfigCard } from 'src/components/Events/SeatScoreConfigCard';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { Switch } from 'src/core/interim/Switch';\nimport { BezierGraph, SerializedSegment } from 'src/core/POS/BezierGraph';\nimport { CalcOutputFn } from 'src/core/POS/BezierGraph/BezierGraphManager';\nimport { WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { getTextFieldState, PosTextField } from 'src/core/POS/PosTextField';\nimport { Button, Stack } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { downloadFileFromBlob } from 'src/utils/fileUtils';\nimport {\n calcSeatScore,\n getCompleteEventConfigScoreOverrides,\n updateScoreMaintainingRowScoreRatio,\n} from 'src/utils/seatScoreUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n EventConfigScoreOverride,\n Feature,\n PricingClient,\n} from 'src/WebApiController';\n\nimport { EventVenueHeatMap } from '../common/EventSeatMap';\nimport { ModalProps } from '../Modal';\nimport { UploadSeatScoreModal } from '../UploadSeatScoreModal';\nimport * as styles from './EventSeatMapConfig.css';\n\nconst INITIAL_ANGLE_SEGMENTS: SerializedSegment[] = [\n { point: { x: 0, y: 100 - 95 } },\n {\n point: { x: 25, y: 100 - 25 },\n handleIn: { x: -20, y: -20 },\n handleOut: { x: 20, y: 20 },\n },\n { point: { x: 100, y: 100 - 5 } },\n];\nconst INITIAL_DISTANCE_SEGMENTS: SerializedSegment[] = [\n { point: { x: 0, y: 100 - 95 } },\n {\n point: { x: 25, y: 100 - 25 },\n handleIn: { x: -20, y: -20 },\n handleOut: { x: 20, y: 20 },\n },\n { point: { x: 100, y: 100 - 5 } },\n];\nconst INITIAL_HEIGHT_SEGMENTS: SerializedSegment[] = [\n { point: { x: 0, y: 100 - 95 } },\n {\n point: { x: 25, y: 100 - 25 },\n handleIn: { x: -20, y: -20 },\n handleOut: { x: 20, y: 20 },\n },\n { point: { x: 100, y: 100 - 5 } },\n];\n\nexport type GraphSegments = {\n angleImportance?: number;\n angleSegments?: SerializedSegment[];\n distanceImportance?: number;\n distanceSegments?: SerializedSegment[];\n heightImportance?: number;\n heightSegments?: SerializedSegment[];\n scoreSegmentsBySection?: Record;\n activeRowIdsBySection?: Record;\n baseRowIdBySection?: Record;\n};\n\nexport const EventSeatMapConfigBody = ({\n disabled,\n cancelTo,\n isOverrideTemplate = false,\n}: {\n disabled: boolean;\n cancelTo?: ModalProps;\n isOverrideTemplate?: boolean;\n}) => {\n const { getValues, watch, setValue, register, formState, reset } =\n useFormContext();\n\n const { setModal } = useContext(ModalContext);\n\n const eventConfigScoreOverrideId = getValues('id');\n const configId = getValues('cfgId');\n const scoreOverrides = watch('scoreOverrides');\n const configPayload = watch('cfgPayload');\n const name = watch('name');\n const isTemplate = watch('isTemplate');\n\n const nearText = useContent(ContentId.Near);\n const farText = useContent(ContentId.Far);\n const lowText = useContent(ContentId.Low);\n const highText = useContent(ContentId.High);\n\n const hasScaledSeatScoreFeature = useUserHasFeature(Feature.ScaledSeatScore);\n\n const [isAdvancedMode, setIsAdvancedMode] = useState(false);\n\n const {\n event,\n venueMapInfo,\n mapConfigOverridesQuery,\n normalizeConfigOverrideWithUiScore,\n } = useEventMapContext();\n\n const [getAngleImportance, setAngleImportance] = useGetSet(10);\n const [getDistanceImportance, setDistanceImportance] = useGetSet(8);\n const [getHeightImportance, setHeightImportance] = useGetSet(4);\n const calcAngleOutputRef = useRef();\n const calcDistanceOutputRef = useRef();\n const calcHeightOutputRef = useRef();\n\n const exportAnglePathRef = useRef<() => SerializedSegment[]>();\n const exportDistancePathRef = useRef<() => SerializedSegment[]>();\n const exportHeightPathRef = useRef<() => SerializedSegment[]>();\n\n const venueMapMaxScoreRaw = useMemo(\n () =>\n venueMapInfo?.sectionScores.reduce(\n (acc, section) => Math.max(acc, section.scoreRaw ?? 0),\n 0\n ) ?? 0,\n [venueMapInfo]\n );\n\n const graphVariables = useMemo(() => {\n const hasAngle =\n (venueMapInfo?.sections ?? []).findIndex((s) => s.angle != null) >= 0;\n const maxAngle = !hasAngle\n ? 0\n : Math.max(...(venueMapInfo?.sections?.map((s) => s.angle ?? 0) ?? []));\n\n const hasDistance =\n (venueMapInfo?.sections ?? []).findIndex((s) => s.dist != null) >= 0;\n const maxDistance = !hasDistance\n ? 0\n : Math.max(...(venueMapInfo?.sections?.map((s) => s.dist ?? 0) ?? []));\n\n const hasHeight =\n (venueMapInfo?.sections ?? []).findIndex((s) => s.height != null) >= 0;\n const maxHeight = !hasHeight\n ? 0\n : Math.max(...(venueMapInfo?.sections?.map((s) => s.height ?? 0) ?? []));\n\n return {\n hasAngle,\n maxAngle,\n hasDistance,\n maxDistance,\n hasHeight,\n maxHeight,\n };\n }, [venueMapInfo?.sections]);\n\n const graphSegments = useMemo(() => {\n if (configPayload) {\n try {\n const obj = JSON.parse(configPayload) as GraphSegments;\n\n if (\n obj.angleImportance != null &&\n obj.angleImportance !== getAngleImportance()\n )\n setAngleImportance(obj.angleImportance);\n if (\n obj.distanceImportance != null &&\n obj.distanceImportance !== getDistanceImportance()\n )\n setDistanceImportance(obj.distanceImportance);\n if (\n obj.heightImportance != null &&\n obj.heightImportance !== getHeightImportance()\n )\n setHeightImportance(obj.heightImportance);\n\n return obj;\n } catch (_error) {\n console.warn(`Unable to parse as GraphSegments: ${configPayload}`);\n\n return {};\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [configPayload]);\n\n const templateOverrideScores = useMemo(\n () =>\n getCompleteEventConfigScoreOverrides(\n venueMapInfo?.sectionScores,\n scoreOverrides,\n isOverrideTemplate,\n hasScaledSeatScoreFeature\n ),\n [\n hasScaledSeatScoreFeature,\n isOverrideTemplate,\n scoreOverrides,\n venueMapInfo?.sectionScores,\n ]\n );\n\n const onCalculateSeatScores = useCallback(() => {\n const calcAngleOutput = calcAngleOutputRef.current;\n const calcDistanceOutput = calcDistanceOutputRef.current;\n const calcHeightOutput = calcHeightOutputRef.current;\n // functions should all be defined here\n if (\n venueMapInfo?.sections &&\n (!graphVariables.hasAngle || calcAngleOutput) &&\n (!graphVariables.hasDistance || calcDistanceOutput) &&\n (!graphVariables.hasHeight || calcHeightOutput)\n ) {\n const sectionWithScoreOverrides = venueMapInfo.sections.flatMap(\n (section) => {\n // Treat nulls as zero\n const angle = section?.angle ?? 0;\n const distance = section?.dist ?? 0;\n const height = section?.height ?? 0;\n\n let seatScore =\n angle != null || distance != null || height != null\n ? calcSeatScore([\n {\n weight: getAngleImportance(),\n value:\n angle != null && calcAngleOutput\n ? calcAngleOutput(\n (angle / (graphVariables.maxAngle || 1)) * 100\n )\n : null,\n },\n {\n weight: getDistanceImportance(),\n value:\n distance != null && calcDistanceOutput\n ? calcDistanceOutput(\n (distance / (graphVariables.maxDistance || 1)) * 100\n )\n : null,\n },\n {\n weight: getHeightImportance(),\n value:\n height != null && calcHeightOutput\n ? calcHeightOutput(\n (height / (graphVariables.maxHeight || 1)) * 100\n )\n : null,\n },\n ])\n : null;\n\n if (\n hasScaledSeatScoreFeature &&\n seatScore != null &&\n venueMapMaxScoreRaw\n ) {\n // Scale back from 0-100 to 0-venueMapMaxScoreRaw\n seatScore = (seatScore / venueMapMaxScoreRaw) * 100;\n }\n\n const overridesToEdit = scoreOverrides?.filter(\n (so) => so.sectionId === section.id\n );\n\n if (!isOverrideTemplate) {\n updateScoreMaintainingRowScoreRatio(\n seatScore ?? 0,\n overridesToEdit\n );\n }\n\n return overridesToEdit;\n }\n );\n\n const configObj = configPayload\n ? (JSON.parse(configPayload) as GraphSegments)\n : {};\n configObj.angleImportance = getAngleImportance();\n configObj.angleSegments = exportAnglePathRef.current?.();\n configObj.distanceImportance = getDistanceImportance();\n configObj.distanceSegments = exportDistancePathRef.current?.();\n configObj.heightImportance = getHeightImportance();\n configObj.heightSegments = exportHeightPathRef.current?.();\n\n if (!isEqual(sectionWithScoreOverrides, scoreOverrides)) {\n setValue('scoreOverrides', sectionWithScoreOverrides);\n }\n\n const newConfigPayload = JSON.stringify(configObj);\n if (newConfigPayload !== configPayload) {\n setValue('cfgPayload', newConfigPayload);\n }\n }\n }, [\n configPayload,\n getAngleImportance,\n getDistanceImportance,\n getHeightImportance,\n graphVariables.hasAngle,\n graphVariables.hasDistance,\n graphVariables.hasHeight,\n graphVariables.maxAngle,\n graphVariables.maxDistance,\n graphVariables.maxHeight,\n hasScaledSeatScoreFeature,\n scoreOverrides,\n setValue,\n venueMapMaxScoreRaw,\n venueMapInfo?.sections,\n isOverrideTemplate,\n ]);\n\n useEffect(() => {\n const calcAngleOutput = calcAngleOutputRef.current;\n const calcDistanceOutput = calcDistanceOutputRef.current;\n const calcHeightOutput = calcHeightOutputRef.current;\n\n if (\n (!graphVariables.hasAngle || calcAngleOutput) &&\n (!graphVariables.hasDistance || calcDistanceOutput) &&\n (!graphVariables.hasHeight || calcHeightOutput)\n ) {\n if (scoreOverrides) {\n // Init the heat map when all the cal functions are initialized\n onCalculateSeatScores();\n }\n }\n });\n\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const onDownloadTemplateClick = useCallback(() => {\n if (!event?.viagId) return;\n\n tryInvokeApi(\n async () => {\n const file = await new PricingClient(\n activeAccountWebClientConfig\n ).downloadSeatScoreFile(event.viagId!);\n\n if (file) {\n downloadFileFromBlob(\n file.fileName ?? 'seat-score-template.csv',\n file.data\n );\n }\n },\n (error) => {\n showErrorDialog('PricingClient.downloadSeatScoreFile', error);\n }\n );\n }, [activeAccountWebClientConfig, event?.viagId, showErrorDialog]);\n\n const [isUploadSeatScoreModalOpen, setIsUploadSeatScoreModalOpen] =\n useState(false);\n const [isLoading, setIsLoading] = useState(false);\n const [uploadedFile, setUploadedFile] = useState();\n const onCsvFileUploaded = useCallback(() => {\n if (!uploadedFile || !event?.viagId) return;\n\n setIsLoading(true);\n tryInvokeApi(\n async () => {\n const result = await new PricingClient(\n activeAccountWebClientConfig\n ).uploadSeatScoreFile(\n event.viagId!,\n configId,\n eventConfigScoreOverrideId,\n name,\n {\n data: uploadedFile,\n fileName: uploadedFile.name,\n }\n );\n\n if (result) {\n setUploadedFile(undefined);\n cancelTo && setModal(cancelTo);\n\n // Reset the form values\n reset(normalizeConfigOverrideWithUiScore(result));\n mapConfigOverridesQuery.refetch();\n }\n },\n (error) => {\n showErrorDialog('PricingClient.uploadSeatScoreFile', error);\n },\n () => {\n setIsLoading(false);\n setIsUploadSeatScoreModalOpen(false);\n }\n );\n }, [\n activeAccountWebClientConfig,\n cancelTo,\n configId,\n event?.viagId,\n eventConfigScoreOverrideId,\n mapConfigOverridesQuery,\n name,\n normalizeConfigOverrideWithUiScore,\n reset,\n setModal,\n showErrorDialog,\n uploadedFile,\n ]);\n\n const requiredMsg = useContent(ContentId.Required);\n const configNameError = formState.errors.name?.message;\n\n if (!event) {\n return null;\n }\n\n const hasAnyPhysicalMetadata =\n graphVariables.hasAngle ||\n graphVariables.hasDistance ||\n graphVariables.hasHeight;\n\n return (\n \n {/* Instructions */}\n
    \n
    \n }\n errors={configNameError}\n >\n \n \n\n {\n \n {\n const isChecked = !isTemplate;\n setValue('isTemplate', isChecked);\n }}\n />\n \n \n }\n \n \n
    \n
    \n \n
    \n
  • \n \n
  • \n
  • \n \n
  • \n
    \n
    \n {!isOverrideTemplate && (\n
    \n \n
    \n
  • \n \n
  • \n
  • \n \n
  • \n
    \n
    \n )}\n
    \n\n {/* Bezier Graphs */}\n {!isOverrideTemplate && (\n
    \n {\n
    \n \n {\n const isChecked = e.currentTarget.checked;\n setIsAdvancedMode(isChecked);\n }}\n />\n
    \n }\n {\n setIsUploadSeatScoreModalOpen(true);\n }}\n >\n \n \n
    \n {!hasAnyPhysicalMetadata && (\n \n }\n />\n )}\n {\n \n }\n importance={getAngleImportance()}\n onDecrementImportance={() => {\n setAngleImportance((prev) => prev - 1);\n onCalculateSeatScores();\n }}\n onIncrementImportance={() => {\n setAngleImportance((prev) => prev + 1);\n onCalculateSeatScores();\n }}\n >\n {\n if (isPathValid) {\n onCalculateSeatScores();\n }\n }}\n />\n \n {!graphVariables.hasAngle && (\n }\n />\n )}\n \n }\n {\n \n }\n importance={getDistanceImportance()}\n onDecrementImportance={() => {\n setDistanceImportance((prev) => prev - 1);\n onCalculateSeatScores();\n }}\n onIncrementImportance={() => {\n setDistanceImportance((prev) => prev + 1);\n onCalculateSeatScores();\n }}\n >\n {\n if (isPathValid) {\n onCalculateSeatScores();\n }\n }}\n />\n \n {!graphVariables.hasDistance && (\n }\n />\n )}\n \n }\n {\n \n }\n importance={getHeightImportance()}\n onDecrementImportance={() => {\n setHeightImportance((prev) => prev - 1);\n onCalculateSeatScores();\n }}\n onIncrementImportance={() => {\n setHeightImportance((prev) => prev + 1);\n onCalculateSeatScores();\n }}\n >\n {\n if (isPathValid) {\n onCalculateSeatScores();\n }\n }}\n />\n \n {!graphVariables.hasHeight && (\n }\n />\n )}\n \n }\n
    \n
    \n )}\n\n {/* Seat Heatmap Graph */}\n
    \n
    \n {\n if (newScoreOverrides) {\n setValue('scoreOverrides', newScoreOverrides);\n }\n if (newConfigPayload) {\n setValue('cfgPayload', newConfigPayload);\n }\n return Promise.resolve();\n }}\n />\n
    \n
    \n {\n setUploadedFile(file);\n }}\n onCsvFileUploaded={onCsvFileUploaded}\n onClose={() => {\n setIsUploadSeatScoreModalOpen(false);\n }}\n />\n \n );\n};\n","import { isEqual } from 'lodash-es';\nimport {\n ComponentProps,\n useCallback,\n useContext,\n useEffect,\n useState,\n} from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { OkButton } from 'src/components/Buttons/OkButton';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport {\n EventMapContextProvider,\n useEventMapContext,\n} from 'src/contexts/EventMapContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n getCompleteEventConfigScoreOverrides,\n getEventConfigScoreOverride,\n} from 'src/utils/seatScoreUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n Event,\n EventConfigScoreOverride,\n Feature,\n PricingClient,\n} from 'src/WebApiController';\n\nimport { CancellableFormFooter } from '../common';\nimport { CancellableFormHeader } from '../common/CancellableFormHeader';\nimport { ConnectedEventEntityHeader } from '../common/EventEntityHeader';\nimport { modalDetailsMaxHeight } from '../common/Modals.css';\nimport { ModalBody, ModalFooter, ModalProps } from '../Modal';\nimport { EventSeatMapConfigBody } from './EventSeatMapConfigBody';\n\ntype EventSeatMapConfigProps = {\n event: Event;\n eventConfigScoreOverride: EventConfigScoreOverride | null;\n onSaveConfigOverride?: (\n eventConfigScoreOverride: EventConfigScoreOverride\n ) => Promise;\n cancelTo: ModalProps;\n defaultConfigPayload?: string | undefined;\n isOverrideTemplate: boolean;\n};\n\nexport const EventSeatMapConfig = ({\n event,\n eventConfigScoreOverride,\n onSaveConfigOverride,\n cancelTo,\n defaultConfigPayload,\n isOverrideTemplate,\n}: EventSeatMapConfigProps) => {\n const methods = useForm({\n defaultValues: undefined,\n });\n\n return (\n \n \n \n \n \n );\n};\n\nconst EventSeatMapConfigContent = ({\n eventConfigScoreOverride,\n onSaveConfigOverride,\n cancelTo,\n watch,\n getValues,\n formState,\n handleSubmit,\n reset,\n defaultConfigPayload,\n isOverrideTemplate,\n}: Omit<\n ComponentProps>,\n 'children'\n> &\n EventSeatMapConfigProps) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const hasScaledSeatScoreFeature = useUserHasFeature(Feature.ScaledSeatScore);\n const [isLoading, setIsLoading] = useState(false);\n const { showErrorDialog } = useErrorBoundaryContext();\n const { event, venueMapsByScoreModelQuery } = useEventMapContext();\n const { setModal, closeModal } = useContext(ModalContext);\n const newModelName = useContent(ContentId.NewModel);\n\n useEffect(() => {\n if (\n formState.defaultValues === undefined &&\n event &&\n (eventConfigScoreOverride ??\n venueMapsByScoreModelQuery.data?.AdvancedVenueGeometry)\n ) {\n reset(\n getEventConfigScoreOverride(\n event.viagId!,\n venueMapsByScoreModelQuery.data?.AdvancedVenueGeometry!,\n newModelName,\n eventConfigScoreOverride,\n false,\n undefined,\n defaultConfigPayload,\n isOverrideTemplate\n )\n );\n }\n }, [\n eventConfigScoreOverride,\n formState.defaultValues,\n newModelName,\n reset,\n venueMapsByScoreModelQuery.data?.AdvancedVenueGeometry,\n defaultConfigPayload,\n isOverrideTemplate,\n event,\n ]);\n\n const onSubmit = useCallback(\n async (eventForm: EventConfigScoreOverride) => {\n setIsLoading(true);\n tryInvokeApi(\n async () => {\n const client = new PricingClient(activeAccountWebClientConfig);\n\n const newConfigOverride = {\n ...eventForm,\n scoreOverrides: getCompleteEventConfigScoreOverrides(\n venueMapsByScoreModelQuery.data?.AdvancedVenueGeometry\n ?.sectionScores,\n eventForm.scoreOverrides,\n isOverrideTemplate,\n hasScaledSeatScoreFeature\n )!,\n };\n\n const newId =\n await client.upsertEventSeatMapScoreOverride(newConfigOverride);\n\n if (onSaveConfigOverride) {\n eventForm.id = newId;\n await onSaveConfigOverride(eventForm);\n }\n if (cancelTo) {\n setModal(cancelTo);\n } else {\n closeModal(true);\n }\n },\n (error) => {\n showErrorDialog('EventClient.updatePriceSettings', error, {\n trackErrorData: eventForm,\n });\n },\n () => {\n setIsLoading(false);\n }\n );\n },\n [\n activeAccountWebClientConfig,\n cancelTo,\n closeModal,\n hasScaledSeatScoreFeature,\n onSaveConfigOverride,\n setModal,\n showErrorDialog,\n isOverrideTemplate,\n venueMapsByScoreModelQuery.data?.AdvancedVenueGeometry?.sectionScores,\n ]\n );\n\n const hasChanges = useCallback(\n (eventForm: EventConfigScoreOverride) => {\n if (!isEqual(eventForm, formState.defaultValues)) return true;\n\n return false;\n },\n [formState.defaultValues]\n );\n\n const onSubmitHandler = useCallback(() => {\n const eventForm = getValues();\n if (!hasChanges(eventForm)) return;\n\n handleSubmit(onSubmit)();\n }, [getValues, handleSubmit, hasChanges, onSubmit]);\n\n const formHasChanges = hasChanges(watch());\n\n return (\n <>\n \n }\n />\n \n\n \n
    \n \n
    \n
    \n\n \n \n \n \n \n \n );\n};\n","import { formatInTimeZone } from 'date-fns-tz';\nimport { useState } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useSiteTimezoneContext } from 'src/contexts/SiteTimezoneContext/SiteTimezoneContext';\nimport { vars } from 'src/core/themes';\nimport { Card, Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { EventConfigScoreOverride } from 'src/WebApiController';\n\nimport * as styles from './EventSeatMapSelection.css';\n\nexport type GlobalConfigPayloadCardProps = {\n configPayload: string;\n name: string;\n eventId: number | null;\n onClick: (\n eventConfigScoreOverride: EventConfigScoreOverride | null,\n defaultConfigPayload?: string | null\n ) => void;\n createDate: Date;\n updateDate: Date;\n};\n\nexport function GlobalConfigPayloadCard({\n configPayload,\n name,\n eventId,\n onClick,\n createDate,\n updateDate,\n}: GlobalConfigPayloadCardProps) {\n const { timeZone } = useSiteTimezoneContext();\n const [isHovered, setIsHovered] = useState(false);\n\n const createDateFormatted = formatInTimeZone(\n createDate,\n timeZone,\n 'MMM d, yyyy, h:mm a'\n );\n const updateDateFormatted = formatInTimeZone(\n updateDate,\n timeZone,\n 'MMM d, yyyy, h:mm a'\n );\n\n return (\n setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n className={styles.configPayloadCard}\n >\n {\n e.preventDefault();\n e.stopPropagation();\n onClick(null, configPayload);\n }}\n >\n
    {name}
    \n\n {eventId != null ?
    {eventId}
    : undefined}\n\n \n \n \n \n\n \n {createDateFormatted}\n \n\n \n \n \n\n \n {updateDateFormatted}\n \n \n \n \n );\n}\n","import { Content } from 'src/contexts/ContentContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { EventConfigScoreOverride } from 'src/WebApiController';\n\nimport * as styles from './EventSeatMapSelection.css';\nimport { GlobalConfigPayloadCard } from './GlobalConfigPayloadCard';\n\ntype GlobalConfigPayloadSelectionProps = {\n onConfigPayloadSelection: (\n eventConfigScoreOverride: EventConfigScoreOverride | null,\n defaultConfigPayload?: string | null\n ) => void;\n eventConfigScoreOverridesForEvent: EventConfigScoreOverride[] | undefined;\n};\n\nexport function GlobalConfigPayloadSelection({\n onConfigPayloadSelection,\n eventConfigScoreOverridesForEvent,\n}: GlobalConfigPayloadSelectionProps) {\n const { sellerAccountScoreOverridesQuery } = useEventMapContext();\n const sellerConfigPayloadsFromOtherVenueConfigs =\n sellerAccountScoreOverridesQuery.data?.filter(\n (eventConfigScoreOverride) =>\n !eventConfigScoreOverridesForEvent?.some((e) => {\n return e.id == eventConfigScoreOverride.eventConfigScoreOverrideId;\n })\n ) ?? [];\n\n return sellerConfigPayloadsFromOtherVenueConfigs?.length > 0 ? (\n
    \n
    \n \n
    \n \n {sellerConfigPayloadsFromOtherVenueConfigs.map(\n (eventConfigScoreOverride) => {\n return (\n \n );\n }\n )}\n \n
    \n ) : undefined;\n}\n","import { Content } from 'src/contexts/ContentContext';\nimport { Stack } from 'src/core/ui';\nimport { WarningOutlineIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport * as styles from './NewHeatmapAvailableNotification.css';\n\nexport const NewHeatmapAvailableNotification = () => {\n return (\n
    \n \n \n \n \n
    \n );\n};\n","import { useMutation } from '@tanstack/react-query';\nimport { useCallback, useContext, useEffect, useState } from 'react';\nimport { EventVenueMap } from 'src/components/Events/VenueMap/EventVenueMap';\nimport { SeatMapCard } from 'src/components/Listings/InventoryEventPage/Sections/SeatMapCard';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport {\n EventMapContextProvider,\n useEventMapContext,\n} from 'src/contexts/EventMapContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { Stack } from 'src/core/ui';\nimport { Button } from 'src/core/ui';\nimport { ApplyHeatMapToAllEventsDialog } from 'src/dialogs/ApplyHeatMapToAllEventsDialog';\nimport { DeleteHeatMapTemplateConfirmDialog } from 'src/dialogs/DeleteHeapMapTemplateConfirmDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useGetEventAutoPricingSettings } from 'src/hooks/useGetEventAutoPricingSettings';\nimport { createGetColor } from 'src/hooks/useHeatMapColor';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n Event,\n EventConfigScoreOverride,\n PricingClient,\n ScoreModel,\n} from 'src/WebApiController';\n\nimport { CancellableFormFooter } from '../common';\nimport { CancellableFormHeader } from '../common/CancellableFormHeader';\nimport { ConnectedEventEntityHeader } from '../common/EventEntityHeader';\nimport { EventPricingSeatMap } from '../EventPricingSeatMap';\nimport { EventSeatMapConfig } from '../EventSeatMapConfig';\nimport { ModalBody, ModalFooter, ModalProps } from '../Modal';\nimport * as styles from './EventSeatMapSelection.css';\nimport { GlobalConfigPayloadSelection } from './GlobalConfigPayloadSelection';\nimport { NewHeatmapAvailableNotification } from './NewHeatmapAvailableNotification';\n\ntype EventSeatMapSelectionProps = {\n event: Event;\n cancelTo?: ModalProps;\n fromTabView?: boolean;\n};\n\nexport function EventSeatMapSelection({\n event,\n cancelTo,\n fromTabView,\n}: EventSeatMapSelectionProps) {\n return (\n <>\n \n \n \n \n );\n}\n\nexport function EventSeatMapSelectionContent({\n cancelTo,\n fromTabView,\n}: {\n cancelTo?: ModalProps;\n fromTabView?: boolean;\n}) {\n const { setModal } = useContext(ModalContext);\n\n const {\n event,\n isMapLoading,\n venueMapInfo,\n venueMapsByScoreModelQuery,\n mapConfigOverridesQuery,\n sellerAccountScoreOverridesQuery,\n activeConfigOverride,\n } = useEventMapContext();\n\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n const { launchDialog, closeDialog, dialogProps } = useBasicDialog();\n const {\n launchDialog: launchSelectDialog,\n closeDialog: closeSelectDialog,\n dialogProps: selectDialogProps,\n } = useBasicDialog();\n const [selectedMapIdToDelete, setSelectedMapIdToDelete] = useState<\n number | null\n >(null);\n const [applyToAllEventsForConfig, setApplyToAllEventsForConfig] = useState<\n EventConfigScoreOverride | undefined\n >();\n const venueConfigId = venueMapInfo?.venueCfgId;\n\n const { pricingSettings } = useGetEventAutoPricingSettings(event!, true);\n\n const [selectedRecommendedMap, setSelectedRecommendedMap] =\n useState(pricingSettings?.scoreModel ?? null);\n\n const performerVenueSpecific = mapConfigOverridesQuery.data?.filter(\n (o) => o.cfgId == venueConfigId\n );\n\n const venueSpecific = mapConfigOverridesQuery.data?.filter(\n (o) => o.cfgId != venueConfigId && o.categoryId != null && o.venueId != null\n );\n\n const setEventSeatMapScoreOverrideMutation = useMutation({\n mutationFn: (request: {\n eventId?: number | null;\n eventConfigScoreOverrideId?: number | null;\n scoreModel?: ScoreModel | null;\n }) => {\n if (request.eventId) {\n return new PricingClient(\n activeAccountWebClientConfig\n ).setEventSeatMapScoreOverride(\n request.eventId,\n request.eventConfigScoreOverrideId,\n request.scoreModel\n );\n }\n\n return Promise.resolve();\n },\n onError: (err: ErrorTypes, request) => {\n showErrorDialog('PricingClient.setEventSeatMapScoreOverride', err, {\n trackErrorData: request,\n });\n },\n onSettled: () => {\n mapConfigOverridesQuery.refetch();\n },\n });\n\n const deleteEventSeatMapScoreOverrideMutation = useMutation({\n mutationFn: (request: { eventConfigScoreOverrideId?: number | null }) => {\n if (request.eventConfigScoreOverrideId) {\n return new PricingClient(\n activeAccountWebClientConfig\n ).deleteEventSeatMapScoreOverride(request.eventConfigScoreOverrideId);\n }\n\n return Promise.resolve();\n },\n onError: (err: ErrorTypes, request) => {\n showErrorDialog('PricingClient.deleteEventSeatMapScoreOverride', err, {\n trackErrorData: request,\n });\n },\n onSettled: () => {\n mapConfigOverridesQuery.refetch();\n sellerAccountScoreOverridesQuery.refetch();\n },\n });\n\n const isLoading =\n isMapLoading ||\n venueMapsByScoreModelQuery.isLoading ||\n mapConfigOverridesQuery.isPending ||\n mapConfigOverridesQuery.isFetching;\n\n const initialEventConfigScoreOverrideId = isLoading\n ? undefined\n : activeConfigOverride?.id ?? null;\n\n const [\n selectedEventConfigScoreOverrideId,\n setSelectedEventConfigScoreOverrideId,\n ] = useState(initialEventConfigScoreOverrideId);\n\n useEffect(() => {\n if (\n selectedEventConfigScoreOverrideId === undefined &&\n initialEventConfigScoreOverrideId !== undefined\n ) {\n setSelectedEventConfigScoreOverrideId(initialEventConfigScoreOverrideId);\n }\n }, [initialEventConfigScoreOverrideId, selectedEventConfigScoreOverrideId]);\n\n const onSubmit = useCallback(\n (\n eventConfigScoreOverrideId: number | null,\n scoreModel: ScoreModel | null\n ) => {\n if (eventConfigScoreOverrideId) {\n const selectedConfig = mapConfigOverridesQuery.data?.find(\n ({ id }) => id === eventConfigScoreOverrideId\n );\n if (selectedConfig && (selectedConfig.eventIds?.length ?? 0) >= 2) {\n setApplyToAllEventsForConfig(selectedConfig);\n launchSelectDialog();\n return;\n }\n }\n setEventSeatMapScoreOverrideMutation.mutate({\n eventId: event!.viagId,\n eventConfigScoreOverrideId,\n scoreModel,\n });\n setSelectedEventConfigScoreOverrideId(eventConfigScoreOverrideId);\n setSelectedRecommendedMap(scoreModel);\n },\n [\n event,\n launchSelectDialog,\n mapConfigOverridesQuery.data,\n setEventSeatMapScoreOverrideMutation,\n ]\n );\n\n const onEditSeatMap = useCallback(\n (\n eventConfigScoreOverride: EventConfigScoreOverride | null,\n defaultConfigPayload?: string | null,\n isOverrideTemplate?: boolean\n ) => {\n setModal({\n children: (\n ,\n clickOutsideToClose: true,\n size: 'slide-in',\n }\n }\n />\n ),\n clickOutsideToClose: true,\n size: 'slide-in',\n }}\n isOverrideTemplate={isOverrideTemplate ?? false}\n />\n ),\n clickOutsideToClose: true,\n size: 'fullscreen',\n fullscreen: true,\n });\n },\n [event, fromTabView, setModal]\n );\n\n if (!event) {\n return null;\n }\n\n const disabledButtons =\n isLoading ||\n setEventSeatMapScoreOverrideMutation.isPending ||\n deleteEventSeatMapScoreOverrideMutation.isPending;\n\n return (\n <>\n \n }\n />\n \n \n {(pricingSettings?.scoreModel == ScoreModel.VenueGeometry ||\n pricingSettings?.scoreModel == ScoreModel.MergedVenueGeometry) && (\n \n )}\n \n
    \n \n
    \n
    \n {!!venueMapsByScoreModelQuery.data?.AdvancedVenueGeometry && (\n {\n onSubmit(null, ScoreModel.AdvancedVenueGeometry);\n }}\n footer={\n venueMapsByScoreModelQuery.data.AdvancedVenueGeometry.sectionScores?.some(\n (s) => s.score\n ) ? (\n
    \n \n
    \n ) : (\n \n )\n }\n >\n \n \n )}\n {pricingSettings?.scoreModel == ScoreModel.MergedVenueGeometry && (\n {\n onSubmit(null, ScoreModel.MergedVenueGeometry);\n }}\n footer={}\n >\n \n \n )}\n {pricingSettings?.scoreModel == ScoreModel.VenueGeometry && (\n {\n onSubmit(null, ScoreModel.VenueGeometry);\n }}\n footer={}\n >\n \n \n )}\n
    \n
    \n {\n \n
    \n \n
    \n
    \n {performerVenueSpecific?.map((eventConfigScoreOverride) => {\n return (\n {\n setSelectedEventConfigScoreOverrideId(\n eventConfigScoreOverride.id\n );\n setSelectedRecommendedMap(null);\n onSubmit(eventConfigScoreOverride.id, null);\n }}\n onDelete={\n disabledButtons\n ? undefined\n : () => {\n if (eventConfigScoreOverride.isTemplate) {\n setSelectedMapIdToDelete(\n eventConfigScoreOverride.id\n );\n launchDialog();\n } else {\n deleteEventSeatMapScoreOverrideMutation.mutate({\n eventConfigScoreOverrideId:\n eventConfigScoreOverride.id,\n });\n }\n }\n }\n footer={\n <>\n
    {eventConfigScoreOverride.name}
    \n {\n e.preventDefault();\n e.stopPropagation();\n onEditSeatMap(eventConfigScoreOverride);\n }}\n >\n \n \n \n }\n >\n \n \n );\n })}\n {\n e.preventDefault();\n e.stopPropagation();\n onEditSeatMap(null);\n }}\n >\n \n \n }\n >\n ({ fill: 'white', stroke: 'black' })}\n />\n \n
    \n
    \n \n
    \n
    \n {venueSpecific?.length == 0 ? (\n }\n >\n ({ fill: 'white', stroke: 'black' })}\n />\n \n ) : (\n venueSpecific?.map((eventConfigScoreOverride) => {\n return (\n {\n onEditSeatMap(eventConfigScoreOverride, null, true);\n }}\n footer={\n <>\n
    {eventConfigScoreOverride.name}
    \n {\n e.preventDefault();\n e.stopPropagation();\n onEditSeatMap(\n eventConfigScoreOverride,\n null,\n true\n );\n }}\n >\n \n \n \n }\n >\n \n \n );\n })\n )}\n
    \n
    \n }\n\n {!isLoading && (\n \n )}\n
    \n \n \n \n\n {\n setSelectedMapIdToDelete(null);\n closeDialog();\n }}\n onConfirm={() =>\n deleteEventSeatMapScoreOverrideMutation.mutate(\n {\n eventConfigScoreOverrideId: selectedMapIdToDelete,\n },\n {\n onSuccess: () => {\n setSelectedMapIdToDelete(null);\n closeDialog();\n },\n onError: () => {\n setSelectedMapIdToDelete(null);\n closeDialog();\n },\n }\n )\n }\n />\n\n {\n setSelectedEventConfigScoreOverrideId(applyToAllEventsForConfig?.id);\n setApplyToAllEventsForConfig(undefined);\n closeSelectDialog();\n }}\n />\n \n );\n}\n","import { isEqual } from 'lodash-es';\nimport { useCallback, useContext, useEffect, useMemo, useState } from 'react';\nimport { FormProvider, useForm, useFormContext } from 'react-hook-form';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { Button, Stack } from 'src/core/ui';\nimport { ApplyHeatMapToAllEventsDialog } from 'src/dialogs/ApplyHeatMapToAllEventsDialog';\nimport { ChangeRowScoreDialogMultiSection } from 'src/dialogs/ChangeRowScoreDialog';\nimport { SectionRowTableDialog } from 'src/dialogs/SectionRowTableDialog/SectionRowTableDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useGetEventAutoPricingSettings } from 'src/hooks/useGetEventAutoPricingSettings';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { EventVenueHeatMap } from 'src/modals/common/EventSeatMap';\nimport { EventSeatMapSelection } from 'src/modals/EventSeatMapSelection';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { EventPricingSeatMapForm } from 'src/utils/eventWithDataUtils';\nimport {\n getCompleteEventConfigScoreOverrides,\n getEventConfigScoreOverride,\n} from 'src/utils/seatScoreUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n Event,\n EventConfigScoreOverride,\n Feature,\n PricingClient,\n RowInfo,\n ScoreModel,\n SectionInfo,\n SectionScoreOverride,\n} from 'src/WebApiController';\n\nimport * as styles from './InventoryEventEditMapSection.css';\n\ntype EventSeatMapFormType = Pick;\n\nexport type EventScoreUpdate = {\n newScoreOverrides?: SectionScoreOverride[];\n newConfigPayload?: string;\n};\n\ntype InventoryEventEditMapSectionProps = {\n event: Event;\n};\n\nexport const InventoryEventEditMapSection: React.FC<\n InventoryEventEditMapSectionProps\n> = ({ event }) => {\n return ;\n};\n\nexport const InventoryEventEditMapSectionBody = ({\n event,\n}: {\n event: Event;\n}) => {\n const { activeConfigOverride, mapConfigOverridesQuery, isMapLoading } =\n useEventMapContext();\n\n const methods = useForm({\n defaultValues: {\n eventScoreOverride: activeConfigOverride,\n },\n });\n\n useEffect(() => {\n if (\n activeConfigOverride !== null &&\n !isEqual(\n methods.formState.defaultValues?.eventScoreOverride,\n activeConfigOverride\n )\n ) {\n methods.reset({\n eventScoreOverride: activeConfigOverride,\n });\n }\n }, [activeConfigOverride, methods]);\n\n if (\n (!activeConfigOverride && mapConfigOverridesQuery.isLoading) ||\n isMapLoading\n ) {\n return ;\n }\n\n return (\n \n \n \n );\n};\n\nexport const InventoryEventEditMapSectionContent = ({\n event,\n}: {\n event: Event;\n}) => {\n const [isLoading, setIsLoading] = useState(false);\n const { watch, setValue, getValues, formState, handleSubmit } =\n useFormContext();\n\n const hasScaledSeatScoreFeature = useUserHasFeature(Feature.ScaledSeatScore);\n\n const {\n venueMapInfo,\n venueMapsByScoreModelQuery,\n activeConfigOverride,\n mapConfigOverridesQuery,\n } = useEventMapContext();\n const { setModal } = useContext(ModalContext);\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const { pricingSettings } = useGetEventAutoPricingSettings(event!, true);\n const hasScoreSectionRowTableFeature = useUserHasFeature(\n Feature.ScoreSectionRowTable\n );\n\n const sanitizedScoreModel = useMemo(() => {\n const scoreModel = pricingSettings?.scoreModel;\n if (scoreModel) return scoreModel;\n\n const { AdvancedVenueGeometry, MergedVenueGeometry } =\n venueMapsByScoreModelQuery.data ?? {};\n if (AdvancedVenueGeometry) return ScoreModel.AdvancedVenueGeometry;\n if (MergedVenueGeometry) return ScoreModel.MergedVenueGeometry;\n return ScoreModel.VenueGeometry;\n }, [pricingSettings?.scoreModel, venueMapsByScoreModelQuery.data]);\n\n const modeledSectionScores = useMemo(() => {\n switch (sanitizedScoreModel) {\n case ScoreModel.AdvancedVenueGeometry:\n return venueMapsByScoreModelQuery.data?.AdvancedVenueGeometry;\n\n case ScoreModel.MergedVenueGeometry:\n return venueMapsByScoreModelQuery.data?.MergedVenueGeometry;\n\n default:\n return venueMapsByScoreModelQuery.data?.VenueGeometry;\n }\n }, [\n sanitizedScoreModel,\n venueMapsByScoreModelQuery.data?.AdvancedVenueGeometry,\n venueMapsByScoreModelQuery.data?.MergedVenueGeometry,\n venueMapsByScoreModelQuery.data?.VenueGeometry,\n ]);\n\n // Hook form fields\n const eventScoreOverride = watch('eventScoreOverride');\n const configPayload = watch('eventScoreOverride.cfgPayload');\n const name = watch('eventScoreOverride.name');\n const scoreOverrides =\n watch('eventScoreOverride.scoreOverrides') ??\n getCompleteEventConfigScoreOverrides(modeledSectionScores?.sectionScores);\n\n const newModelName = useContent(ContentId.NewModel);\n const changeRowScoreDialog = useBasicDialog();\n const sectionRowDialog = useBasicDialog();\n const applyToAllDialog = useBasicDialog();\n\n const [applyToAllEventsForConfig, setApplyToAllEventsForConfig] = useState<\n EventConfigScoreOverride | undefined\n >();\n\n const onSectionSeatScoreChanged = useCallback(\n ({ newScoreOverrides, newConfigPayload }: EventScoreUpdate) => {\n let newOverride: EventConfigScoreOverride | undefined = undefined;\n if (eventScoreOverride) {\n newOverride = { ...eventScoreOverride };\n } else if (activeConfigOverride) {\n newOverride = { ...activeConfigOverride };\n } else {\n newOverride = getEventConfigScoreOverride(\n event!.viagId!,\n modeledSectionScores ?? venueMapInfo!,\n newModelName,\n null\n );\n }\n\n if (newScoreOverrides != null) {\n newOverride.scoreOverrides = newScoreOverrides;\n }\n if (newConfigPayload != null) {\n newOverride.cfgPayload = newConfigPayload;\n }\n\n if (newScoreOverrides != null || newConfigPayload != null) {\n setValue('eventScoreOverride', newOverride);\n }\n\n return Promise.resolve();\n },\n [\n eventScoreOverride,\n activeConfigOverride,\n event,\n modeledSectionScores,\n venueMapInfo,\n newModelName,\n setValue,\n ]\n );\n\n const onSectionRowChange = useCallback(\n (updated: SectionScoreOverride[]) => {\n let newOverride: EventConfigScoreOverride | undefined = undefined;\n if (eventScoreOverride) {\n newOverride = { ...eventScoreOverride };\n } else if (activeConfigOverride) {\n newOverride = { ...activeConfigOverride };\n } else {\n newOverride = getEventConfigScoreOverride(\n event!.viagId!,\n modeledSectionScores ?? venueMapInfo!,\n newModelName,\n null\n );\n }\n newOverride.scoreOverrides = updated;\n setValue('eventScoreOverride', newOverride);\n },\n [\n activeConfigOverride,\n event,\n eventScoreOverride,\n modeledSectionScores,\n newModelName,\n setValue,\n venueMapInfo,\n ]\n );\n\n const onRowSeatScoreChanged = useCallback(\n (\n newScoreOverrides: SectionScoreOverride[],\n newConfigPayload: string | null\n ) => {\n onSectionSeatScoreChanged({\n newScoreOverrides,\n newConfigPayload: newConfigPayload ?? undefined,\n }).then(() => {\n changeRowScoreDialog.closeDialog();\n });\n },\n [onSectionSeatScoreChanged, changeRowScoreDialog]\n );\n\n const allSections = useMemo(\n () => venueMapInfo?.sections ?? [],\n [venueMapInfo?.sections]\n );\n\n const sectionWithRowsWithOrdinal = useMemo(() => {\n const sections: SectionInfo[] = [];\n const rows: Record = {};\n allSections.forEach((s) => {\n rows[s.id] = s.rows\n .filter((r) => !r.isSpeculative && r.ordinal != null)\n .toSorted((a, b) => (a.ordinal ?? 0) - (b.ordinal ?? 0));\n });\n\n allSections.forEach((s) => {\n if (rows[s.id].length > 0) {\n sections.push(s);\n }\n });\n return sections;\n }, [allSections]);\n\n const scoreName = useMemo(() => {\n if (name) {\n return name;\n }\n\n if (sanitizedScoreModel === ScoreModel.AdvancedVenueGeometry) {\n return ;\n }\n\n if (sanitizedScoreModel === ScoreModel.MergedVenueGeometry) {\n return ;\n }\n\n if (sanitizedScoreModel === ScoreModel.VenueGeometry) {\n return ;\n }\n\n return ;\n }, [name, sanitizedScoreModel]);\n\n const onSubmit = useCallback(\n async (eventForm: EventSeatMapFormType) => {\n tryInvokeApi(\n async () => {\n const client = new PricingClient(activeAccountWebClientConfig);\n\n if (\n event?.viagId &&\n eventForm.eventScoreOverride &&\n !isEqual(\n eventForm.eventScoreOverride,\n formState.defaultValues?.eventScoreOverride\n )\n ) {\n setIsLoading(true);\n const newId = await client.upsertEventSeatMapScoreOverride({\n ...eventForm.eventScoreOverride,\n viagogoEventId: event.viagId,\n scoreOverrides: getCompleteEventConfigScoreOverrides(\n venueMapInfo?.sectionScores,\n eventForm.eventScoreOverride.scoreOverrides,\n false,\n hasScaledSeatScoreFeature\n )!,\n });\n\n setValue('eventScoreOverride.id', newId);\n\n const result = await mapConfigOverridesQuery.refetch();\n const newConfig = result.data?.find((ev) => ev.id === newId);\n\n const oldId = eventForm.eventScoreOverride?.id;\n if (\n newId !== activeConfigOverride?.id &&\n oldId <= 0 &&\n (newConfig?.eventIds?.length ?? 0) >= 2\n ) {\n setApplyToAllEventsForConfig(newConfig);\n applyToAllDialog.launchDialog();\n return;\n }\n\n await client.setEventSeatMapScoreOverride(\n event.viagId,\n newId,\n null\n );\n }\n },\n (error) => {\n showErrorDialog('PricingClient.updates', error, {\n trackErrorData: eventForm,\n });\n },\n () => {\n setIsLoading(false);\n }\n );\n },\n [\n activeAccountWebClientConfig,\n activeConfigOverride?.id,\n applyToAllDialog,\n event.viagId,\n formState.defaultValues?.eventScoreOverride,\n hasScaledSeatScoreFeature,\n mapConfigOverridesQuery,\n setValue,\n showErrorDialog,\n venueMapInfo?.sectionScores,\n ]\n );\n\n const hasChanges = useCallback(\n (eventForm: EventSeatMapFormType) => {\n // Make sure we only send back the settable props\n return !isEqual(\n formState.defaultValues?.eventScoreOverride,\n eventForm.eventScoreOverride\n );\n },\n [formState.defaultValues?.eventScoreOverride]\n );\n\n const onSubmitHandler = useCallback(() => {\n if (!hasChanges(getValues())) return;\n\n handleSubmit(onSubmit)();\n }, [getValues, handleSubmit, hasChanges, onSubmit]);\n\n if (!event) {\n return null;\n }\n\n if (isLoading) {\n return ;\n }\n\n return (\n <>\n \n \n
    \n \n
    \n
    \n
    \n \n {sectionWithRowsWithOrdinal.length > 0 && (\n \n \n \n )}\n {hasScoreSectionRowTableFeature && (\n \n \n \n )}\n \n
    \n \n
    \n {scoreName}\n {' -'}\n
    \n {\n // We need to save the seat map prior to closing the modal and launch the\n // seat map selection modal\n onSubmit(getValues()).then(() =>\n setModal({\n children: (\n \n ),\n clickOutsideToClose: true,\n size: 'slide-in',\n })\n );\n }}\n >\n \n \n
    \n \n
    \n \n \n
    \n
  • \n \n
  • \n
  • \n \n
  • \n
    \n
    \n \n
    \n \n \n \n
    \n \n \n\n {\n setApplyToAllEventsForConfig(undefined);\n applyToAllDialog.closeDialog();\n }}\n />\n \n );\n};\n","import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport {\n EventConfigClient,\n SellerAccountEventSetting,\n} from 'src/WebApiController';\n\nexport const useSellerAccountEventSettings = (\n eventId?: number | null,\n disabled?: boolean\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const { trackError, showErrorDialog } = useErrorBoundaryContext();\n\n const queryClient = useQueryClient();\n const getQueryKey = [\n 'EventConfigClient.getSellerAccountEventSettings',\n eventId,\n ];\n\n const shouldQuery =\n !disabled &&\n Boolean(activeAccountWebClientConfig.activeAccountId && eventId);\n\n const getQuery = useQuery({\n queryKey: getQueryKey,\n queryFn: async () => {\n if (!shouldQuery) {\n return null;\n }\n\n const settings = await new EventConfigClient(\n activeAccountWebClientConfig\n ).getSellerAccountEventSettings(eventId!);\n\n return settings.filter((s) => s.delivType != null);\n },\n\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError('EventConfigClient.getSellerAccountEventSettings', error, {\n eventId,\n });\n },\n },\n });\n\n const updateMutation = useMutation({\n mutationFn: async ({\n settings,\n }: {\n settings: SellerAccountEventSetting[];\n }) => {\n return await new EventConfigClient(\n activeAccountWebClientConfig\n ).mergeSellerAccountEventSettingsForDelivery(settings, eventId!);\n },\n // optimistic ui\n // Reference: https://tanstack.com/query/v3/docs/react/guides/optimistic-updates\n onMutate: ({ settings }) => {\n queryClient.cancelQueries({ queryKey: getQueryKey });\n const prevValue =\n queryClient.getQueryData(getQueryKey);\n\n queryClient.setQueryData(getQueryKey, settings);\n return { prevValue };\n },\n onError: (err: ErrorTypes, { settings }, context) => {\n queryClient.setQueryData(getQueryKey, context?.prevValue);\n showErrorDialog(\n 'EventConfigClient.mergeSellerAccountEventSettingsForDelivery',\n err,\n {\n trackErrorData: { settings },\n }\n );\n },\n onSettled: () => {\n queryClient.invalidateQueries({ queryKey: getQueryKey });\n },\n });\n\n return {\n sellerAccountEventSettings: getQuery.data,\n isLoading: getQuery.isLoading,\n async updateSellerAccountEventSettings(\n settings: SellerAccountEventSetting[]\n ) {\n await updateMutation.mutateAsync({\n settings,\n });\n },\n isMutationLoading: updateMutation.isPending,\n };\n};\n","import { useFormContext } from 'react-hook-form';\nimport { Switch } from 'src/core/ui';\n\nimport { SellerAccountEventSettingsInput } from './FulfillmentSection.types';\n\nexport const AutoFulfillCell = ({\n disabled,\n index,\n}: {\n disabled?: boolean;\n index: number;\n}) => {\n const { watch, setValue } = useFormContext();\n\n const isNoFulfill = watch(`settings.${index}.isNoFulfill`);\n\n return (\n e.stopPropagation()}\n onCheckedChange={(isChecked) => {\n setValue(`settings.${index}.isNoFulfill`, !isChecked, {\n shouldDirty: true,\n });\n }}\n />\n );\n};\n","import { subMinutes } from 'date-fns';\nimport { isEqual } from 'lodash-es';\nimport { useFormContext } from 'react-hook-form';\nimport { InHandDateInput } from 'src/components/Input/InHandDateInput';\nimport { Event } from 'src/WebApiController';\n\nimport { SellerAccountEventSettingsInput } from './FulfillmentSection.types';\n\nexport const InHandCell = ({\n event,\n disabled,\n index,\n}: {\n event?: Event;\n disabled?: boolean;\n index: number;\n}) => {\n const { watch, setValue } = useFormContext();\n\n const inHandAt = watch(`settings.${index}.inHandAt`);\n\n const inHandDate = inHandAt ? new Date(inHandAt) : new Date();\n\n return (\n {\n if (!isEqual(date, inHandDate)) {\n if (date != null) {\n // We need to take off the timezone offset from the date\n // because the InHandDateInput uses same timezome as the event\n date = subMinutes(date, date.getTimezoneOffset());\n }\n setValue(`settings.${index}.inHandAt`, date?.toISOString() ?? null, {\n shouldDirty: true,\n });\n }\n }}\n value={inHandAt}\n targetDate={\n event?.dates?.start ? new Date(event?.dates?.start) : new Date()\n }\n />\n );\n};\n","import { Content, useContent } from 'src/contexts/ContentContext';\nimport { Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { TICKET_TYPE_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { TicketTypePriority } from 'src/WebApiController';\n\nimport * as styles from './FulfillmentSection.css';\n\nexport const TicketTypePriorityPill = ({\n ticketTypePriority,\n}: {\n ticketTypePriority: TicketTypePriority;\n}) => {\n const isBlocked =\n ticketTypePriority.priority === -1 || ticketTypePriority.isBlocked;\n const blockedTxt = useContent(ContentId.Blocked);\n return (\n \n \n \n \n {': '}\n \n {isBlocked ? blockedTxt : ticketTypePriority.priority}\n \n \n );\n};\n","import { useFormContext } from 'react-hook-form';\nimport { TicketTypePriorityInput } from 'src/components/common/TicketTypePriorityInput';\nimport { Content } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { Button, Popover, Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { SellerAccountEventSettingsInput } from './FulfillmentSection.types';\nimport { TicketTypePriorityPill } from './TicketTypePriorityPill';\n\nexport const TicketTypePriorityCell = ({\n disabled,\n index,\n}: {\n disabled?: boolean;\n index: number;\n}) => {\n const { watch, setValue } = useFormContext();\n\n const delivType = watch(`settings.${index}.delivType`);\n const ticketTypeRules = watch(`settings.${index}.tktTypeRules`);\n\n const ticketTypePriorities = ticketTypeRules?.overrides.find(\n (t) => t.deliveryType === delivType\n )?.ticketTypePriorities;\n\n return (\n \n {ticketTypePriorities\n ?.toSorted((a, b) => {\n if (a.priority === -1 || a.isBlocked) return 1;\n if (b.priority === -1 || b.isBlocked) return -1;\n return a.priority - b.priority;\n })\n .map((t, i) => (\n \n ))}\n \n \n \n \n \n \n \n
    \n {\n setValue(`settings.${index}.tktTypeRules`, newRules, {\n shouldDirty: true,\n });\n }}\n disabled={disabled}\n />\n
    \n \n
    \n \n );\n};\n","import { useEffect, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { usePurchaseVendorSelector } from 'src/components/Selectors/PurchaseVendorSelector/usePurchaseVendorSelector';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { PosSelect } from 'src/core/POS/PosSelect';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { SellerAccountEventSettingsInput } from './FulfillmentSection.types';\n\nexport const VendorCell = ({\n disabled,\n index,\n}: {\n disabled?: boolean;\n index: number;\n}) => {\n const { watch, setValue, clearErrors } =\n useFormContext();\n\n const allVendorsText = useContent(ContentId.AllVendors);\n\n const settings = watch('settings');\n const vendorId = watch(`settings.${index}.vendorId`);\n\n const { posSelectProps } = usePurchaseVendorSelector({\n placeholderText: allVendorsText,\n });\n\n const availableVendorOptions = Object.entries(\n posSelectProps.valueOptionsContent\n ).reduce(\n (acc, [key, value]) => {\n if (\n !settings?.some(\n (s, i) =>\n i !== index && s.vendorId != null && s.vendorId.toString() === key\n )\n ) {\n acc[key] = value;\n }\n return acc;\n },\n {} as Record\n );\n\n const isAllVendorsSelectedInOtherRows = useMemo(\n () => settings?.some((s, i) => i !== index && s.vendorId == null),\n [index, settings]\n );\n\n useEffect(() => {\n if (\n (vendorId == null && isAllVendorsSelectedInOtherRows) ||\n (vendorId != null &&\n !Object.keys(availableVendorOptions).includes(vendorId.toString()))\n ) {\n setValue(\n `settings.${index}.vendorId`,\n Number(Object.keys(availableVendorOptions)[0]),\n {\n shouldDirty: true,\n }\n );\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return (\n {\n clearErrors(`settings.${index}.vendorId`);\n setValue(`settings.${index}.vendorId`, value ? Number(value) : null, {\n shouldDirty: true,\n });\n }}\n disabled={disabled}\n {...posSelectProps}\n valueOptionsContent={availableVendorOptions}\n enableEmptySelection={!isAllVendorsSelectedInOtherRows}\n />\n );\n};\n","import { useFormContext } from 'react-hook-form';\nimport { IconButton } from 'src/components/Buttons';\nimport { DeliveryTypeSelector } from 'src/components/Selectors/DeliveryTypeSelector';\nimport { vars } from 'src/core/themes';\nimport { SimpleTable } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { DeleteIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Event, Feature } from 'src/WebApiController';\n\nimport { AutoFulfillCell } from './AutoFulfillCell';\nimport { SellerAccountEventSettingsInput } from './FulfillmentSection.types';\nimport { InHandCell } from './InHandCell';\nimport { TicketTypePriorityCell } from './TicketTypePriorityCell';\nimport { VendorCell } from './VendorCell';\n\nexport const EventSettingForm = ({\n event,\n disabled,\n onDeleteSetting,\n index,\n}: {\n event?: Event;\n disabled?: boolean;\n onDeleteSetting: (index: number) => void;\n index: number;\n}) => {\n const hasAutoFulfillSettingFeature = useUserHasFeature(\n Feature.AutoFulfillSetting\n );\n\n const { watch, setValue } = useFormContext();\n\n const settings = watch('settings');\n const delivType = watch(`settings.${index}.delivType`);\n\n return (\n \n \n \n \n \n {\n if (deliveryType !== delivType) {\n setValue(`settings.${index}.delivType`, deliveryType, {\n shouldDirty: true,\n });\n setValue(`settings.${index}.tktTypeRules`, null, {\n shouldDirty: true,\n });\n }\n }}\n disabled={disabled}\n />\n \n \n \n \n {hasAutoFulfillSettingFeature && (\n \n \n \n )}\n \n \n \n \n \n }\n disabled={disabled}\n titleContentId={ContentId.Delete}\n onClick={() => onDeleteSetting(index)}\n />\n \n \n );\n};\n","import { isEqual } from 'lodash-es';\nimport { SellerAccountEventSetting } from 'src/WebApiController';\n\nexport const hasNoChangeOrIsDeleteOnly = (\n sellerAccountEventSettings: SellerAccountEventSetting[] | null | undefined,\n formValuesettings: SellerAccountEventSetting[] | null | undefined\n): boolean => {\n // Basically return true if every setting in the formValuesettings is contained within the sellerAccountEventSettings\n if (!formValuesettings?.length) {\n return true;\n }\n\n for (const formValueSetting of formValuesettings) {\n const matchingSetting = sellerAccountEventSettings?.find(\n (setting) =>\n setting.vendorId === formValueSetting.vendorId &&\n setting.delivType === formValueSetting.delivType\n );\n\n if (!matchingSetting) {\n return false;\n }\n\n if (!isEqual(matchingSetting, formValueSetting)) {\n return false;\n }\n }\n\n return true;\n};\n","import { useCallback, useEffect, useMemo } from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { EventAccordionItemProps } from 'src/components/Accordions';\nimport { ButtonWithIcon, ReloadButton } from 'src/components/Buttons';\nimport { PURCHASE_BULK_BACKFILL_DELIVERY_SETTINGS_KEY } from 'src/components/Purchases/PurchaseActionDropdown';\nimport { usePurchaseVendorSelector } from 'src/components/Selectors/PurchaseVendorSelector/usePurchaseVendorSelector';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext/ErrorBoundaryContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { vars } from 'src/core/themes';\nimport { Button, SimpleTable, Stack } from 'src/core/ui';\nimport { BulkUpdateDeliveryOverrideDialog } from 'src/dialogs/BulkEdits/BulkUpdateDeliveryOverrideDialog';\nimport { useSellerAccountEventSettings } from 'src/hooks/api/useSellerAccountEventSettings';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { IconsFill, PlusIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { EmptyPurchaseQuery } from 'src/utils/eventQueryUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n BulkEditPreviewWithDetails,\n BulkEditPurchaseClient,\n DeliveryType,\n EventWithData,\n Feature,\n Listing,\n PurchaseOrderQuery,\n PurchaseOrderState,\n SellerAccountEventSetting,\n} from 'src/WebApiController';\n\nimport { EventSettingForm } from '../FulfillmentSection/EventSettingForm';\nimport { SellerAccountEventSettingsInput } from '../FulfillmentSection/FulfillmentSection.types';\nimport * as styles from '../InventoryEventPage.css';\nimport * as sectionStyles from './InventoryEventFulfillmentSection.css';\nimport { hasNoChangeOrIsDeleteOnly } from './InventoryEventFulfillmentSection.utils';\n\ntype InventoryEventContentProps = {\n accordionItemProps?: EventWithData;\n inventoryAccordionItem?: EventAccordionItemProps;\n};\n\nexport function InventoryEventFulfillmentSection({\n accordionItemProps,\n inventoryAccordionItem,\n}: InventoryEventContentProps) {\n const { activeAccountWebClientConfig } = useAppContext();\n const updateKey = PURCHASE_BULK_BACKFILL_DELIVERY_SETTINGS_KEY;\n\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const { BodyComponent } = inventoryAccordionItem || {};\n const event = accordionItemProps?.event;\n\n const hasAutoFulfillSettingFeature = useUserHasFeature(\n Feature.AutoFulfillSetting\n );\n\n const { availableVendors } = usePurchaseVendorSelector({});\n const numVendors = Object.keys(availableVendors).length;\n\n const updateDialog = useBasicDialog();\n\n const { openDialog, closeDialog } = useDialog(\n DialogId.BulkBackfillDeliverySettings,\n BulkUpdateDeliveryOverrideDialog\n );\n\n const {\n sellerAccountEventSettings,\n isLoading,\n updateSellerAccountEventSettings,\n isMutationLoading,\n } = useSellerAccountEventSettings(event?.viagId);\n\n const methods = useForm({\n defaultValues: {\n settings: sellerAccountEventSettings ?? [],\n },\n });\n\n const {\n getValues,\n watch,\n formState: { isDirty },\n } = methods;\n\n useEffect(() => {\n methods.reset({\n settings: sellerAccountEventSettings ?? [],\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [sellerAccountEventSettings]);\n\n const onSubmit = useCallback(async () => {\n const { settings } = getValues();\n await updateSellerAccountEventSettings(settings);\n }, [getValues, updateSellerAccountEventSettings]);\n\n const onReset = useCallback(() => {\n methods.setValue('settings', sellerAccountEventSettings ?? [], {\n shouldDirty: true,\n });\n }, [methods, sellerAccountEventSettings]);\n\n const settings = watch('settings');\n\n const canAddNew = (settings?.length ?? 0) < numVendors + 1;\n\n const onCreateNewSetting = useCallback(() => {\n if (!canAddNew) {\n return;\n }\n\n const newSetting: SellerAccountEventSetting = {\n vendorId: null,\n delivType: Object.values(DeliveryType)[0],\n isNoFulfill: false,\n inHandAt: null,\n tktTypeRules: {\n overrides: [],\n },\n };\n\n methods.setValue('settings', [...settings, newSetting], {\n shouldDirty: true,\n });\n }, [canAddNew, methods, settings]);\n\n const onDeleteSetting = useCallback(\n (index: number) => {\n const newSettings = [...settings];\n newSettings.splice(index, 1);\n methods.setValue('settings', newSettings, { shouldDirty: true });\n },\n [methods, settings]\n );\n\n const purchaseQuery = useMemo(() => {\n return {\n ...EmptyPurchaseQuery,\n purchaseOrderState: PurchaseOrderState.Active,\n eventOrMappingIds: [event!.viagId!.toString()],\n } as PurchaseOrderQuery;\n }, [event]);\n\n const onBulkUpdate = useCallback(\n async (\n updateSalesOfListings: boolean,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => {\n if (onPreviewReceived) {\n await tryInvokeApi(\n async () => {\n const preview = await new BulkEditPurchaseClient(\n activeAccountWebClientConfig\n ).bulkBackfillDeliverySettingsPreview(\n purchaseQuery,\n updateSalesOfListings,\n false\n );\n\n onPreviewReceived(preview);\n },\n (error) => {\n showErrorDialog('bulkBackfillDeliverySettingsPreview', error, {\n trackErrorData: { purchaseQuery },\n });\n }\n );\n } else {\n await tryInvokeApi(\n async () => {\n const succeeded = await new BulkEditPurchaseClient(\n activeAccountWebClientConfig\n ).bulkBackfillDeliverySettingsListingOnly(\n preview!.preview,\n updateSalesOfListings,\n updateKey,\n supportBackgroundProcess\n );\n if (!supportBackgroundProcess) {\n closeDialog();\n }\n },\n (error) => {\n showErrorDialog('bulkBackfillDeliverySettingsListingOnly', error, {\n trackErrorData: {\n preview,\n },\n });\n }\n );\n }\n },\n [\n activeAccountWebClientConfig,\n closeDialog,\n purchaseQuery,\n showErrorDialog,\n updateKey,\n ]\n );\n\n const onSaveHandler = useCallback(() => {\n const { settings } = getValues();\n\n if (hasNoChangeOrIsDeleteOnly(sellerAccountEventSettings, settings)) {\n onSubmit();\n return;\n }\n\n openDialog({\n updateKey: updateKey,\n entityType: ActionOutboxEntityType.Listing,\n skipTicketGroups: true,\n ...updateDialog.dialogProps,\n onSaveOverrideSettings: onSubmit,\n onBulkUpdate: onBulkUpdate,\n onCancel: () => {\n closeDialog();\n },\n backfillDeliveryStrategyFeature:\n Feature.BackfillDeliveryStrategyInventoryEvent,\n backfillDeliveryStrategyToSaleFeature:\n Feature.BackfillDeliveryStrategyInventoryEventToSales,\n });\n }, [\n getValues,\n openDialog,\n updateKey,\n updateDialog.dialogProps,\n onSubmit,\n onBulkUpdate,\n sellerAccountEventSettings,\n closeDialog,\n ]);\n\n return (\n
    \n {BodyComponent && accordionItemProps && (\n
    \n {isLoading ? (\n \n ) : (\n \n \n {settings?.length !== 0 && (\n \n \n \n \n
    \n \n
    \n \n \n
    \n \n
    \n \n
    \n \n \n \n \n \n \n \n \n \n \n {hasAutoFulfillSettingFeature && (\n \n \n \n )}\n \n \n \n \n \n \n \n
    \n \n {settings.map((s, i) => (\n \n ))}\n \n
    \n )}\n
    \n {canAddNew && (\n \n \n }\n disabled={isMutationLoading || isLoading}\n textContentId={ContentId.AddOverride}\n onClick={() => {\n onCreateNewSetting();\n }}\n style={{ width: 'min-content', whiteSpace: 'nowrap' }}\n variant={'text'}\n />\n \n )}\n {isDirty && (\n \n \n \n \n \n \n )}\n
    \n )}\n
    \n )}\n
    \n );\n}\n","import { formatDistance } from 'date-fns';\nimport React, { useEffect, useState } from 'react';\n\nconst DefaultRefreshFrequency = 60 * 1_000; // 1 minute\n\ntype TimeDistanceProps = {\n date: Date | string | number;\n frequency?: number;\n includeSeconds?: boolean;\n addSuffix?: boolean;\n};\n\n/**\n * Simply component to count the date based of now.\n */\nexport const TimeDistance: React.FC = ({\n date,\n frequency = DefaultRefreshFrequency,\n includeSeconds = false,\n addSuffix = true,\n}) => {\n const [timeDistance, setTimeDistance] = useState('');\n\n useEffect(() => {\n const updateAgo = () => {\n setTimeDistance(\n formatDistance(new Date(date).getTime(), new Date().getTime(), {\n addSuffix,\n includeSeconds,\n })\n );\n };\n\n updateAgo();\n const interval = setInterval(updateAgo, frequency);\n\n return () => clearInterval(interval);\n }, [date, frequency, includeSeconds, addSuffix]);\n\n return {timeDistance};\n};\n","import React, { useCallback, useEffect, useMemo, useState } from 'react';\nimport { TimeDistance } from 'src/components/common/TimeDistance';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useEventLastReviewedContext } from 'src/contexts/SellerEventLastReviewContext/SellerEventLastReviewContext';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { CheckIcon, LoadingIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { stringToUtcDate } from 'src/utils/dateTimeUtils';\n\nimport * as styles from './LastReviewedDisplay.css';\n\nconst FadeAnimationDuration = 1_000;\nconst GracePeriod = 3_000;\n\ntype InteractiveButtonProps = {\n isLoading: boolean;\n isCompleted: boolean;\n onClick: () => Promise;\n};\n\nconst InteractiveButton: React.FC = ({\n isLoading,\n isCompleted,\n onClick,\n}) => {\n const [animationStyle, setAnimationStyle] = useState();\n\n // Grace period to allow fade out\n const clearAnimation = useCallback(() => {\n setTimeout(() => setAnimationStyle(null), FadeAnimationDuration);\n }, []);\n\n useEffect(() => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let timeout: any = null;\n if (isCompleted) {\n setAnimationStyle(styles.checkBoxFadeIn);\n timeout = setTimeout(() => {\n setAnimationStyle(styles.checkBoxFadeOut);\n clearAnimation();\n }, GracePeriod);\n }\n\n return () => timeout && clearTimeout(timeout);\n }, [clearAnimation, isCompleted]);\n\n const icon = useMemo(() => {\n if (isLoading) {\n return ;\n }\n if (animationStyle) {\n return (\n \n );\n }\n return null;\n }, [isLoading, animationStyle]);\n\n return (\n \n {icon}\n {!animationStyle && !isLoading ? (\n \n ) : null}\n \n );\n};\n\nconst DateTimeRefreshFrequency = 5_000;\n\ntype LastReviewedDisplayProps = {\n viagVirtualId?: string;\n};\n\nexport const LastReviewedDisplay: React.FC = ({\n viagVirtualId,\n}) => {\n const {\n eventLastReviewed,\n isCompleted,\n isLoading,\n onSettingVirtualIds,\n onUpdateLastReviewedDateTime,\n } = useEventLastReviewedContext();\n\n useEffect(() => {\n if (viagVirtualId) {\n onSettingVirtualIds([viagVirtualId]);\n }\n }, [onSettingVirtualIds, viagVirtualId]);\n\n const lastReviewedDateTime = useMemo(() => {\n if (viagVirtualId && eventLastReviewed) {\n return eventLastReviewed[viagVirtualId];\n }\n return null;\n }, [eventLastReviewed, viagVirtualId]);\n\n const onUpdateLastReviewed = useCallback(async () => {\n if (viagVirtualId) {\n onUpdateLastReviewedDateTime(viagVirtualId);\n }\n }, [onUpdateLastReviewedDateTime, viagVirtualId]);\n\n return (\n
    \n
    \n \n
    \n
    \n {lastReviewedDateTime ? (\n \n ) : (\n \n )}\n \n
    \n
    \n );\n};\n","import clsx from 'clsx';\nimport { Dispatch, SetStateAction } from 'react';\nimport { EventAccordionItemProps } from 'src/components/Accordions';\nimport {\n AverageTicketPriceDisplay,\n SalesAndMarginDisplay,\n TicketsListedAndSoldDisplay,\n} from 'src/components/Listings/InventorySummaryWidgets';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogMetricsContext } from 'src/contexts/CatalogMetricsContext';\nimport { useCollapsableViewContext } from 'src/contexts/CollapsableViewContext/CollapsableViewContext';\nimport {\n MultiSelectScope,\n useMultiSelectionContext,\n} from 'src/contexts/MultiSelectionContext';\nimport { hideMobile } from 'src/core/themes/shared.css';\nimport { Stack } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { getInventorySummaryListingMetricsDisplayStrings } from 'src/utils/ticketMetricUtils';\nimport { EventWithData, Listing } from 'src/WebApiController';\nimport { Feature, ListingMetrics } from 'src/WebApiController';\n\nimport { LastReviewedDisplay } from '../../InventorySummaryWidgets/LastReviewedDisplay';\nimport * as styles from '../InventoryEventPage.css';\nimport { useCatchUpParams } from '../InventoryEventPage.hooks';\n\ntype InventoryEventContentProps = {\n accordionItemProps?: EventWithData;\n inventoryAccordionItem?: EventAccordionItemProps;\n selectedListingIds: number[];\n setSelectedListingIds: Dispatch>;\n};\n\nexport function InventoryEventInfoSection({\n accordionItemProps,\n inventoryAccordionItem,\n selectedListingIds,\n setSelectedListingIds,\n}: InventoryEventContentProps) {\n const event = accordionItemProps?.event;\n const { BodyComponent, AfterHeaderComponent } = inventoryAccordionItem || {};\n const { onScroll, isCollapsedView, isEnabled } = useCollapsableViewContext();\n\n const hasEventListingTableHotkeysFeature = useUserHasFeature(\n Feature.EventListingTableHotkeys\n );\n const hasBlockInventorySummaryStatsFeature = useUserHasFeature(\n Feature.BlockInventorySummaryStats\n );\n\n const { loginContext } = useAppContext();\n const { selectionMode } = useMultiSelectionContext();\n const isSelectionModeOn = !!selectionMode?.mode;\n\n const { isCatchupMode } = useCatchUpParams();\n\n const { eventMetrics: eventMetricsMap } =\n useCatalogMetricsContext();\n\n const eventMetrics = eventMetricsMap?.[event?.viagVirtualId ?? ''];\n const formattedTotalMetrics = eventMetrics\n ? getInventorySummaryListingMetricsDisplayStrings(\n eventMetrics,\n loginContext?.user?.activeAccount?.currencyCode\n )\n : undefined;\n\n return (\n
    \n {BodyComponent && accordionItemProps && (\n \n \n {!hasBlockInventorySummaryStatsFeature && (\n <>\n \n \n \n \n )}\n {!isCatchupMode && (\n \n )}\n \n\n
    \n {AfterHeaderComponent && }\n
    \n \n \n
    \n \n )}\n \n );\n}\n","import { useQuery } from '@tanstack/react-query';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { Event, EventConfigClient } from 'src/WebApiController';\n\nconst DEFAULT_TOP_N_TRANSACTIONS = 10;\n\nexport const useGetMarketTransactionsForEvent = (\n event?: Event | null,\n topN = DEFAULT_TOP_N_TRANSACTIONS\n) => {\n const { trackError } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n\n const shouldQuery =\n activeAccountWebClientConfig.activeAccountId != null &&\n event?.viagId != null;\n const transactionsQuery = useQuery({\n queryKey: [\n 'EventConfigClient.getMarketTransactionsForEvent',\n activeAccountWebClientConfig,\n event?.viagId,\n ],\n queryFn: () => {\n if (!shouldQuery) {\n return null;\n }\n return new EventConfigClient(\n activeAccountWebClientConfig\n ).getMarketTransactionsForEvent(event!.viagId!, topN);\n },\n\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError('EventConfigClient.getMarketTransactionsForEvent', error, {\n trackErrorData: {\n viagogoEventId: event?.viagId,\n },\n });\n },\n },\n });\n\n return {\n transactionsQuery,\n };\n};\n","import { ColumnDef } from '@tanstack/react-table';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { TableHeaderCellDiv } from 'src/core/ui/TableHeaderCellDiv';\nimport { TableShimmeringDiv } from 'src/tables/Table/Table.styled';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getAllInPriceFromListPrice } from 'src/utils/inventoryUtils';\nimport { applyNumberFormatting } from 'src/utils/numberFormatter';\nimport { sortByNumericPrefix } from 'src/utils/tableUtils';\nimport { Marketplace, MarketTransaction } from 'src/WebApiController';\n\nimport * as styles from '../MarketTransactionsTable.css';\n\ntype MarketTransactionTableAdditionalInformation = {\n activeAccountUserId: string | null | undefined;\n};\nexport type MarketTransactionColumnType =\n | (MarketTransaction & MarketTransactionTableAdditionalInformation)\n | null;\n\nexport const MARKET_TRANSACTIONS_TABLE_COLUMNS_CONFIG: ColumnDef[] =\n [\n {\n id: 'yourListing',\n header: () => (\n {/** No header */}\n ),\n accessorFn: (data) => data?.sellerUserId == data?.activeAccountUserId,\n cell: ({ getValue, row: { original } }) => {\n if (!original) {\n return ;\n }\n const value = getValue() as string;\n if (!value) {\n return (\n \n );\n }\n\n return (\n \n
    \n \n
    \n
    \n );\n },\n sortingFn: sortByNumericPrefix,\n },\n {\n id: 'section',\n header: () => (\n \n \n \n ),\n accessorFn: (data) => data?.section,\n cell: ({ getValue, row: { original } }) => {\n const value = getValue() as string;\n if (!original) {\n return ;\n }\n return (\n \n {value}\n \n );\n },\n sortingFn: sortByNumericPrefix,\n },\n {\n id: 'row',\n header: () => (\n \n \n \n ),\n accessorFn: (data) => data?.row,\n cell: ({ getValue, row: { original } }) => {\n const value = getValue() as string;\n if (!original) {\n return ;\n }\n return (\n \n {value}\n \n );\n },\n sortingFn: sortByNumericPrefix,\n },\n {\n id: 'seat',\n header: () => (\n \n \n \n ),\n accessorFn: (data) => {\n if (data?.seatTo) {\n return `${data.seatFrom}-${data.seatTo}`;\n }\n return data?.seatFrom;\n },\n cell: ({ getValue, row: { original } }) => {\n const value = getValue() as string;\n if (!original) {\n return ;\n }\n return (\n \n {value}\n \n );\n },\n },\n {\n id: 'quantity',\n header: () => (\n \n \n \n ),\n accessorFn: (data) => data?.quantityPurchased,\n cell: ({ getValue, row: { original } }) => {\n const value = getValue() as number;\n if (!original) {\n return ;\n }\n return {value};\n },\n },\n {\n id: 'price',\n header: () => (\n \n \n \n ),\n accessorFn: (data) =>\n (data?.sellerNetProceeds ?? 0) / (data?.quantityPurchased ?? 1),\n cell: function Cell({ getValue, row: { original } }) {\n const listPrice = getValue() as number;\n const { getUiCurrency } = useLocalizationContext();\n\n const { loginContext } = useAppContext();\n if (!original) {\n return ;\n }\n\n const sellerFee =\n loginContext?.user?.activeAccount?.marketplaceSettings?.find(\n (m) => m.mkp === Marketplace.StubHub\n )?.sellerFee ?? 0;\n const currency = getUiCurrency(original.sellerCurrencyCode);\n\n const websitePrice = getAllInPriceFromListPrice(\n listPrice,\n null,\n sellerFee\n );\n\n return (\n \n {applyNumberFormatting({\n inputNumber: websitePrice,\n currencyCode: currency.code,\n currencyDecimalDigits: currency.dec,\n })}\n \n );\n },\n },\n ];\n","import {\n InitialTableState,\n PaginationState,\n SortingState,\n TableOptions,\n} from '@tanstack/react-table';\nimport { useEffect, useMemo, useState } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { FormatContent, useContent } from 'src/contexts/ContentContext';\nimport { NoData, Table } from 'src/tables/Table';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { MarketTransaction } from 'src/WebApiController';\n\nimport {\n MARKET_TRANSACTIONS_TABLE_COLUMNS_CONFIG,\n MarketTransactionColumnType,\n} from './configs/MarketTransactionsTableColumnsConfig';\n\nexport type MarketTransactionsTableDataProps = {\n marketTransactions?: MarketTransaction[] | null;\n};\n\nexport type MarketTransactionsTableProps = MarketTransactionsTableDataProps & {\n initState?: InitialTableState;\n};\n\nexport function MarketTransactionsTable({\n marketTransactions,\n initState,\n}: MarketTransactionsTableProps) {\n const { activeAccountUserId, loginContext } = useAppContext();\n const transactionsText = useContent(ContentId.Transactions);\n\n // Enable passing in table state as parameters -- we can remount with the last state the user was on\n const [sorting, setSorting] = useState(\n initState?.sorting || []\n );\n const [{ pageIndex, pageSize }, setPagination] = useState({\n pageIndex: initState?.pagination?.pageIndex || 0,\n pageSize: marketTransactions?.length ?? 0,\n });\n const pagination = useMemo(\n () => ({\n pageIndex,\n pageSize,\n }),\n [pageIndex, pageSize]\n );\n\n useEffect(() => {\n if (pagination.pageSize !== marketTransactions?.length) {\n setPagination((prevState) => ({\n ...prevState,\n pageSize: marketTransactions?.length ?? 0,\n }));\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [marketTransactions]);\n\n let data: MarketTransactionColumnType[] | undefined = undefined;\n if (marketTransactions) {\n data = marketTransactions.map((marketTransaction) => {\n return {\n ...marketTransaction,\n activeAccountUserId:\n loginContext?.user?.activeAccount?.id ?? activeAccountUserId ?? '',\n };\n });\n }\n\n const options: Partial> =\n useMemo(\n () => ({\n data,\n columns: MARKET_TRANSACTIONS_TABLE_COLUMNS_CONFIG,\n state: {\n pagination,\n sorting,\n activeAccountUserId,\n },\n onPaginationChange: setPagination,\n onSortingChange: setSorting,\n }),\n [data, activeAccountUserId, pagination, sorting]\n );\n\n return marketTransactions?.length ? (\n
    \n {flexRender(cell.column.columnDef.cell, cell.getContext())}\n
    \n ) : (\n \n \n \n );\n}\n","import { EventAccordionItemProps } from 'src/components/Accordions';\nimport { FormatContent } from 'src/contexts/ContentContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { useGetMarketTransactionsForEvent } from 'src/hooks/api/useGetMarketTransactionsForEvent';\nimport { MarketTransactionsTable } from 'src/tables/MarketTransactionsTable';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { EventWithData, Listing } from 'src/WebApiController';\n\nimport * as styles from '../InventoryEventPage.css';\n\ntype InventoryEventContentProps = {\n accordionItemProps?: EventWithData;\n inventoryAccordionItem?: EventAccordionItemProps;\n};\n\nexport function InventoryEventTransactionsSection({\n accordionItemProps,\n inventoryAccordionItem,\n}: InventoryEventContentProps) {\n const { BodyComponent } = inventoryAccordionItem || {};\n\n const event = accordionItemProps?.event;\n\n const { transactionsQuery } = useGetMarketTransactionsForEvent(event);\n\n return (\n
    \n {BodyComponent && accordionItemProps && (\n
    \n {transactionsQuery.isLoading ? (\n \n ) : (\n <>\n \n {transactionsQuery.data?.length ? (\n \n ) : null}\n \n )}\n
    \n )}\n
    \n );\n}\n","import { format } from 'date-fns';\nimport { ListingExperiment } from 'src/WebApiController';\n\nexport const toExperimentName = (experiment: ListingExperiment) => {\n const formatedStartDate = format(\n new Date(experiment.startDate),\n 'MM/dd/yyyy'\n );\n const formatedEndDate = format(new Date(experiment.endDate), 'MM/dd/yyyy');\n if (experiment.discountPercentage) {\n return `${experiment.insertBy}:${experiment.discountPercentage}%-${formatedStartDate}-${formatedEndDate}`;\n }\n return `${experiment.insertBy}:${formatedStartDate}-${formatedEndDate}`;\n};\n","import { endOfDay, startOfDay } from 'date-fns';\nimport { ComponentProps, useCallback, useMemo } from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { Modal as RSModal } from 'reactstrap';\nimport { CancelButton } from 'src/components/Buttons';\nimport { Content, useFormattedContent } from 'src/contexts/ContentContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { DatePickerInput } from 'src/core/POS/DateSelector';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosSelect } from 'src/core/POS/PosSelect';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { Button, Stack } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { FieldWrapper } from 'src/modals/common';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { toExperimentName } from 'src/utils/listingExperimentUtils';\nimport { getLocaleFromLanguageOrCurrent } from 'src/utils/localeUtils';\nimport { Feature, ListingExperiment } from 'src/WebApiController';\n\nimport * as styles from './CreateExperimentDialog.css';\n\nexport type ExperimentGroupItem = {\n id: string;\n name: string;\n};\n\nexport type CreateExperimentDialogProps = ComponentProps & {\n defaultValues: ListingExperiment;\n availableGroups: ExperimentGroupItem[];\n isLoading: boolean;\n isUpdate?: boolean;\n onCreateExperiment: (experiment: ListingExperiment) => Promise;\n onUpdateExperiment: (experiment: ListingExperiment) => Promise;\n};\n\nexport const CreateExperimentDialog = ({\n defaultValues,\n ...rest\n}: CreateExperimentDialogProps) => {\n const methods = useForm({\n defaultValues,\n });\n\n return (\n \n \n \n );\n};\n\nfunction CreateExperimentDialogContent({\n defaultValues,\n availableGroups,\n isLoading,\n isUpdate = false,\n onCreateExperiment,\n onUpdateExperiment,\n onClosed,\n onCancel,\n disabled,\n control,\n formState,\n watch,\n clearErrors,\n setError,\n setValue,\n getValues,\n handleSubmit,\n reset,\n ...rest\n}: CreateExperimentDialogProps &\n Omit<\n ComponentProps>,\n 'children'\n >) {\n const onSubmitHandler = useCallback(async () => {\n if (isUpdate) {\n await handleSubmit(onUpdateExperiment)();\n } else {\n await handleSubmit(onCreateExperiment)();\n }\n onClosed && onClosed();\n }, [\n handleSubmit,\n isUpdate,\n onClosed,\n onCreateExperiment,\n onUpdateExperiment,\n ]);\n\n const startDate = watch('startDate');\n const endDate = watch('endDate');\n const discount = watch('discountPercentage');\n const listingGroupId = watch('listingGroupId');\n\n const minDiscountText = useFormattedContent(\n FormatContentId.MinDiscountContent,\n '5%'\n );\n\n const hasFlashSaleDiscountRestriction = useUserHasFeature(\n Feature.FlashSaleDiscountRestriction\n );\n\n const hasBadDiscountValue = useMemo(() => {\n return hasFlashSaleDiscountRestriction && discount && discount < 5;\n }, [discount, hasFlashSaleDiscountRestriction]);\n\n const listingGroupOptions = useMemo(() => {\n const options: Record = {};\n for (const item of availableGroups) {\n options[item.id] = item.name;\n }\n return options;\n }, [availableGroups]);\n\n return (\n <>\n }\n onKeyUp={(e) => {\n if (e.key === 'Enter') {\n onSubmitHandler();\n }\n }}\n onOpened={() => {\n reset(defaultValues);\n }}\n footer={\n \n \n {onCancel && (\n \n )}\n \n \n \n \n \n }\n onCancel={isLoading ? undefined : onCancel}\n >\n \n \n }>\n \n \n \n \n }>\n {\n setValue('listingGroupId', key == 'N/A' ? null : key);\n }}\n value={listingGroupId ?? ''}\n displayText={listingGroupOptions[listingGroupId ?? ''] ?? 'N/A'}\n disabled={disabled || isLoading || isUpdate}\n style={{ width: '100%' }}\n searchable={Object.keys(listingGroupOptions).length > 10}\n valueOptionsContent={listingGroupOptions}\n />\n \n \n\n \n }>\n {\n const value = parseInt(event.target.value ?? '0');\n if (!isNaN(value)) {\n setValue('discountPercentage', value);\n }\n }}\n spellCheck={false}\n trimOnBlur={true}\n postfixDisplay={'%'}\n disabled={isUpdate}\n />\n \n {hasBadDiscountValue && (\n
    {minDiscountText}
    \n )}\n
    \n \n }>\n {\n if (date) {\n clearErrors('startDate');\n const dateStr = startOfDay(date).toISOString();\n if (dateStr !== startDate) {\n setValue('startDate', dateStr);\n }\n }\n }}\n locale={getLocaleFromLanguageOrCurrent()}\n disabled={isUpdate}\n />\n \n \n \n }>\n {\n if (date) {\n clearErrors('endDate');\n const dateStr = endOfDay(date).toISOString();\n if (dateStr !== endDate) {\n setValue('endDate', dateStr);\n }\n }\n }}\n locale={getLocaleFromLanguageOrCurrent()}\n />\n \n \n
    \n \n \n );\n}\n","import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\nimport { useCallback, useMemo } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport {\n ListingExperiment,\n ListingExperimentClient,\n} from 'src/WebApiController';\n\nexport function useListingExperiments(viagogoEventId: number) {\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const queryClient = useQueryClient();\n const queryKey = useMemo(\n () => [\n 'getListingExperimentsByViagogoEventId',\n activeAccountWebClientConfig.activeAccountId,\n viagogoEventId,\n ],\n [activeAccountWebClientConfig.activeAccountId, viagogoEventId]\n );\n\n const listingExperimentQuery = useQuery({\n queryKey,\n queryFn: async () => {\n if (activeAccountWebClientConfig.activeAccountId == null) {\n return null;\n }\n return await new ListingExperimentClient(\n activeAccountWebClientConfig\n ).getListingExperimentsByViagogoEventId(viagogoEventId);\n },\n enabled: activeAccountWebClientConfig.activeAccountId != null,\n refetchOnWindowFocus: false,\n staleTime: Infinity,\n meta: {\n onError: (error: ErrorTypes) => {\n showErrorDialog(\n 'ListingExperimentClient.getListingExperimentsByViagogoEventId',\n error\n );\n },\n },\n });\n\n const createExperimentMutation = useMutation({\n mutationFn: async (experiment: ListingExperiment) => {\n return await new ListingExperimentClient(\n activeAccountWebClientConfig\n ).createListingExperiment(experiment);\n },\n onMutate: (experiment) => {\n queryClient.cancelQueries({ queryKey });\n const prevValue: ListingExperiment[] | undefined =\n queryClient.getQueryData(queryKey);\n if (prevValue) {\n prevValue.push(experiment);\n queryClient.setQueryData(queryKey, prevValue);\n } else {\n queryClient.setQueryData(queryKey, [experiment]);\n }\n return { prevValue };\n },\n onError: (err: ErrorTypes, experiment, context) => {\n queryClient.setQueryData(queryKey, context?.prevValue);\n showErrorDialog('ListingExperimentClient.createListingExperiment', err, {\n trackErrorData: { experiment },\n });\n },\n onSettled: () => {\n queryClient.invalidateQueries({ queryKey });\n },\n });\n\n const updateExperimentMutation = useMutation({\n mutationFn: async (experiment: ListingExperiment) => {\n return await new ListingExperimentClient(\n activeAccountWebClientConfig\n ).updateListingExperiment(experiment);\n },\n onMutate: (experiment) => {\n queryClient.cancelQueries({ queryKey });\n const prevValue: ListingExperiment[] | undefined =\n queryClient.getQueryData(queryKey);\n if (prevValue) {\n const index = prevValue.findIndex(\n (e) =>\n e.viagogoEventId === viagogoEventId &&\n e.listingGroupId === experiment.listingGroupId\n );\n if (index >= 0) {\n prevValue[index] = experiment;\n queryClient.setQueryData(queryKey, prevValue);\n }\n }\n return { prevValue };\n },\n onError: (err: ErrorTypes, experiment, context) => {\n queryClient.setQueryData(queryKey, context?.prevValue);\n showErrorDialog('ListingExperimentClient.updateListingExperiment', err, {\n trackErrorData: { experiment },\n });\n },\n onSettled: () => {\n queryClient.invalidateQueries({ queryKey });\n },\n });\n\n const stopExperimentMutation = useMutation({\n mutationFn: async (listingGroupId: string | null) => {\n return await new ListingExperimentClient(\n activeAccountWebClientConfig\n ).stopListingExperiment(viagogoEventId, listingGroupId);\n },\n onMutate: (listingGroupId: string | null) => {\n queryClient.cancelQueries({ queryKey });\n const prevValue: ListingExperiment[] | undefined =\n queryClient.getQueryData(queryKey);\n if (prevValue) {\n const index = prevValue.findIndex(\n (e) =>\n e.viagogoEventId === viagogoEventId &&\n e.listingGroupId === listingGroupId\n );\n if (index >= 0) {\n const current = prevValue[index];\n prevValue[index] = {\n ...current,\n endDate: new Date().toISOString(),\n discountPercentage: null,\n };\n queryClient.setQueryData(queryKey, prevValue);\n }\n }\n return { prevValue };\n },\n onError: (err: ErrorTypes, viagogoEventId, context) => {\n queryClient.setQueryData(queryKey, context?.prevValue);\n showErrorDialog('ListingExperimentClient.stopListingExperiment', err, {\n trackErrorData: { viagogoEventId },\n });\n },\n onSettled: () => {\n queryClient.invalidateQueries({ queryKey });\n },\n });\n\n const restartExperimentMutation = useMutation({\n mutationFn: async (experiment: ListingExperiment) => {\n return await new ListingExperimentClient(\n activeAccountWebClientConfig\n ).restartListingExperiment(experiment);\n },\n onError: (err: ErrorTypes, viagogoEventId, context) => {\n showErrorDialog('ListingExperimentClient.restartListingExperiment', err, {\n trackErrorData: { viagogoEventId },\n });\n },\n onSettled: () => {\n queryClient.invalidateQueries({ queryKey });\n },\n });\n\n const onCreateExperiment = useCallback(\n async (experiment: ListingExperiment) => {\n await createExperimentMutation.mutateAsync(experiment);\n },\n [createExperimentMutation]\n );\n const onUpdateExperiment = useCallback(\n async (experiment: ListingExperiment) => {\n await updateExperimentMutation.mutateAsync(experiment);\n },\n [updateExperimentMutation]\n );\n const onStopExperiment = useCallback(\n async (listingGroupId: string | null) => {\n await stopExperimentMutation.mutateAsync(listingGroupId);\n },\n [stopExperimentMutation]\n );\n\n const onRestartExperiment = useCallback(\n async (experiment: ListingExperiment) => {\n await restartExperimentMutation.mutateAsync(experiment);\n },\n [restartExperimentMutation]\n );\n\n return {\n experiments: listingExperimentQuery.data,\n onCreateExperiment,\n onUpdateExperiment,\n onStopExperiment,\n onRestartExperiment,\n isLoading:\n listingExperimentQuery.isLoading ||\n createExperimentMutation.isPending ||\n updateExperimentMutation.isPending ||\n stopExperimentMutation.isPending,\n };\n}\n","import { useMemo } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosDropdown, PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { CheckIcon, IconsFill, MoreIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Feature, ListingExperiment } from 'src/WebApiController';\n\ntype ActionCellProps = {\n experiment: ListingExperiment;\n onResumeExperiment: (listingGroupId: string | null) => void;\n onRestartExperiment: (listingGroupId: string | null) => void;\n onStopExperiment: (listingGroupId: string | null) => Promise;\n};\n\nconst enum ExperimentStatus {\n Scheduled = 'scheduled',\n Running = 'running',\n Completed = 'completed',\n}\n\nconst StatusIcon = ({ status }: { status: ExperimentStatus }) => {\n switch (status) {\n case ExperimentStatus.Scheduled:\n return ;\n case ExperimentStatus.Running:\n return ;\n case ExperimentStatus.Completed:\n return ;\n default:\n return null;\n }\n};\n\nexport const ActionCell = ({\n experiment,\n onResumeExperiment,\n onRestartExperiment,\n onStopExperiment,\n}: ActionCellProps) => {\n const status = useMemo(() => {\n const { startDate, endDate } = experiment;\n const now = new Date();\n\n if (new Date(startDate.replace(' ', 'T') + 'Z') > now) {\n return ExperimentStatus.Scheduled;\n }\n if (new Date(endDate.replace(' ', 'T') + 'Z') > now) {\n return ExperimentStatus.Running;\n }\n return ExperimentStatus.Completed;\n }, [experiment]);\n\n const hasFlashSaleDiscountRestriction = useUserHasFeature(\n Feature.FlashSaleDiscountRestriction\n );\n\n return (\n \n \n \n \n \n }\n align=\"end\"\n >\n {\n e.stopPropagation();\n e.preventDefault();\n onStopExperiment(experiment.listingGroupId);\n }}\n disabled={status != ExperimentStatus.Running}\n >\n \n \n {hasFlashSaleDiscountRestriction && (\n {\n e.stopPropagation();\n e.preventDefault();\n onRestartExperiment(experiment.listingGroupId);\n }}\n >\n \n \n )}\n {\n e.stopPropagation();\n e.preventDefault();\n onResumeExperiment(experiment.listingGroupId);\n }}\n disabled={status != ExperimentStatus.Completed}\n >\n \n \n \n \n );\n};\n","import { ColumnDef } from '@tanstack/react-table';\nimport { Content } from 'src/contexts/ContentContext';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { TableHeaderCellDiv } from 'src/core/ui/TableHeaderCellDiv';\nimport { FormatOption } from 'src/modals/EditTableColumns';\nimport { TableShimmeringDiv } from 'src/tables/Table';\nimport { DateCell } from 'src/tables/Table/TableCells';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { toExperimentName } from 'src/utils/listingExperimentUtils';\nimport { ListingExperiment, ListingGroup } from 'src/WebApiController';\n\nimport { ActionCell } from './ActionCell';\n\nexport const getTableColumnDefinitions = (\n onStopExperiment: (listingGroupId: string | null) => Promise,\n onResumeExperiment: (listingGroupId: string | null) => void,\n onRestartExperiment: (listingGroupId: string | null) => void,\n listingGroups: ListingGroup[]\n): ColumnDef[] => [\n {\n id: 'name',\n header: () => (\n \n \n \n ),\n accessorFn: (data) => data,\n cell: ({ getValue, row: { original } }) => {\n const value = getValue() as ListingExperiment;\n if (!original) {\n return ;\n }\n return (\n \n {toExperimentName(value)}\n \n );\n },\n },\n {\n id: 'listingGroupId',\n header: () => (\n \n \n \n ),\n accessorFn: (data) => data.listingGroupId,\n cell: ({ getValue, row: { original } }) => {\n const value = getValue() as string | null;\n if (!original) {\n return ;\n }\n const listingGroup = listingGroups.find(\n ({ ltGrpId }) => ltGrpId === value\n );\n return (\n \n {listingGroup ? listingGroup.groupName : ''}\n \n );\n },\n },\n {\n id: 'startDate',\n header: () => (\n \n \n \n ),\n accessorFn: (data) => data.startDate,\n cell: ({ getValue, row: { original } }) => {\n if (!original) {\n return ;\n }\n const value = getValue() as string;\n const dateValue = value ? new Date(value).toISOString() : value;\n\n return (\n \n );\n },\n },\n {\n id: 'endDate',\n header: () => (\n \n \n \n ),\n accessorFn: (data) => data.endDate,\n cell: ({ getValue, row: { original } }) => {\n if (!original) {\n return ;\n }\n const value = getValue() as string;\n const dateValue = value ? new Date(value).toISOString() : value;\n\n return (\n \n );\n },\n },\n {\n id: 'carts',\n header: () => (\n \n \n \n ),\n accessorFn: (data) => data,\n cell: ({ row: { original } }) => {\n if (!original) {\n return ;\n }\n return Coming Soon;\n },\n },\n {\n id: 'sales',\n header: () => (\n \n \n \n ),\n accessorFn: (data) => data,\n cell: ({ row: { original } }) => {\n if (!original) {\n return ;\n }\n return Coming Soon;\n },\n },\n {\n id: 'discount',\n header: () => (\n \n \n \n ),\n accessorFn: (data) => data.discountPercentage,\n cell: ({ getValue, row: { original } }) => {\n const value = getValue() as number;\n if (!original) {\n return ;\n }\n if (!value) {\n return null;\n }\n return {`${value}%`};\n },\n },\n {\n id: 'actions',\n header: () => (\n \n \n \n ),\n accessorFn: (data) => data,\n cell: ({ getValue, row: { original } }) => {\n const value = getValue() as ListingExperiment;\n if (!original) {\n return ;\n }\n return (\n \n \n \n );\n },\n },\n];\n","import { TableOptions } from '@tanstack/react-table';\nimport { useMemo } from 'react';\nimport { FormatContent, useContent } from 'src/contexts/ContentContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { NoData, Table } from 'src/tables/Table';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { ListingExperiment, ListingGroup } from 'src/WebApiController';\n\nimport { getTableColumnDefinitions } from './configs/ListingExperimentTableColumnsConfig';\n\nexport type ListingExpeirmentTableProps = {\n isLoading: boolean;\n experiments: ListingExperiment[] | null | undefined;\n listingGroups: ListingGroup[];\n onStopExperiment: (listingGroupId: string | null) => Promise;\n onResumeExperiment: (listingGroupId: string | null) => void;\n onRestartExperiment: (listingGroupId: string | null) => void;\n};\n\nexport const ListingExperimentTable: React.FC = ({\n isLoading,\n experiments,\n listingGroups,\n onStopExperiment,\n onResumeExperiment,\n onRestartExperiment,\n}) => {\n const experimentsText = useContent(ContentId.Experiments);\n\n const options: Partial> = useMemo(\n () => ({\n data: experiments ?? [],\n columns: getTableColumnDefinitions(\n onStopExperiment,\n onResumeExperiment,\n onRestartExperiment,\n listingGroups\n ),\n state: {},\n }),\n [\n experiments,\n onStopExperiment,\n onResumeExperiment,\n onRestartExperiment,\n listingGroups,\n ]\n );\n\n if (isLoading) {\n return ;\n }\n\n return experiments?.length ? (\n
    \n ) : (\n \n \n \n );\n};\n","import { endOfDay, startOfDay } from 'date-fns';\nimport { useCallback, useMemo, useState } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n CreateExperimentDialog,\n ExperimentGroupItem,\n} from 'src/dialogs/PricingABTest/CreateExperimentDialog';\nimport { useListingExperiments } from 'src/hooks/api/useListingExperiments';\nimport { BasicDialogProps } from 'src/hooks/useBasicDialog';\nimport { ListingExperimentTable } from 'src/tables/ListingExperimentTable/ListingExperimentTable';\nimport {\n Event,\n Listing,\n ListingExperiment,\n ListingGroup,\n} from 'src/WebApiController';\n\nimport * as styles from '../InventoryEventPage.css';\n\ntype InventoryPricingABTestSectionProps = {\n event: Event;\n listings: Listing[];\n createExperimentDialog: BasicDialogProps;\n};\n\nexport const InventoryPricingABTestSection: React.FC<\n InventoryPricingABTestSectionProps\n> = ({ event, listings, createExperimentDialog }) => {\n const {\n isLoading,\n experiments,\n onUpdateExperiment,\n onCreateExperiment,\n onStopExperiment,\n onRestartExperiment: restartExperimentMutation,\n } = useListingExperiments(event.viagId!);\n\n const { loginContext } = useAppContext();\n\n const [selectedExperiment, setSelectedExperiment] =\n useState(null);\n\n const listingGroups = useMemo(() => {\n return listings.filter(({ isLtGrp }) => isLtGrp) as ListingGroup[];\n }, [listings]);\n\n const availableListingGroups = useMemo((): ExperimentGroupItem[] => {\n const candidates = listingGroups\n .map(\n (group) =>\n ({\n id: (group as ListingGroup).ltGrpId,\n name: (group as ListingGroup).groupName,\n }) as ExperimentGroupItem\n )\n .concat({ id: 'N/A', name: 'N/A' });\n\n if (selectedExperiment) {\n return candidates;\n }\n\n const usedListingGroupIds = experiments?.map(\n ({ listingGroupId }) => listingGroupId ?? 'N/A'\n );\n\n return candidates.filter(({ id }) => !usedListingGroupIds?.includes(id));\n }, [experiments, listingGroups, selectedExperiment]);\n\n const defaultValues = useMemo((): ListingExperiment => {\n if (selectedExperiment) {\n return selectedExperiment;\n }\n const current = new Date();\n const startDate = startOfDay(current).toISOString();\n current.setDate(current.getDate() + 7);\n const endDate = endOfDay(current).toISOString();\n return {\n viagogoEventId: event.viagId!,\n listingGroupId: null,\n listingGroupName: null,\n targetPercentage: null,\n discountPercentage: 10,\n startDate,\n endDate,\n insertBy: loginContext?.user?.displayName || '',\n };\n }, [event.viagId, loginContext?.user?.displayName, selectedExperiment]);\n\n const onResumeExperiment = useCallback(\n (listingGroupId: string | null) => {\n const selected = experiments?.find(\n (experiment) => experiment.listingGroupId === listingGroupId\n );\n setSelectedExperiment(selected ?? null);\n createExperimentDialog.launchDialog();\n },\n [createExperimentDialog, experiments]\n );\n\n const onRestartExperiment = useCallback(\n (listingGroupId: string | null) => {\n const exp = experiments?.find(\n (experiment) => experiment.listingGroupId === listingGroupId\n );\n\n if (exp) {\n restartExperimentMutation(exp);\n }\n },\n [restartExperimentMutation, experiments]\n );\n\n const onCloseDialog = useCallback(() => {\n setSelectedExperiment(null);\n createExperimentDialog.closeDialog();\n }, [createExperimentDialog]);\n\n return (\n <>\n
    \n \n
    \n \n \n );\n};\n","import { ROW_FILTER_MISSING } from 'src/components/common/FilterPill/FilterPillList.constants';\nimport { Listing } from 'src/WebApiController';\n\nexport const filterListingItemsBySectionRow = (\n listing: Listing,\n listingSectionId: number | null,\n sectionIdFilters: number[],\n rowIdFilters: number[],\n sectionRowIdFilters: { [key: string]: string },\n quantityFilter: number\n) => {\n const sectionId = listingSectionId ?? 0;\n const rowId = listing.seating.rowId ?? 0;\n const quantity = listing.availQty ?? 0;\n\n // filter by quantity\n if (quantity < quantityFilter) {\n return false;\n }\n\n // filter by section\n const sectionIncluded =\n sectionIdFilters.length > 0 ? sectionIdFilters.includes(sectionId) : true;\n\n if (!sectionIncluded) {\n return false;\n }\n\n // No row filters for the section, return true\n if (\n sectionRowIdFilters[sectionId] == null ||\n sectionRowIdFilters[sectionId] === ROW_FILTER_MISSING\n ) {\n return true;\n }\n\n // filter by row\n const rowIncluded =\n rowIdFilters.length > 0 ? rowIdFilters.includes(rowId) : true;\n\n return rowIncluded;\n};\n","import { useCallback, useEffect, useMemo } from 'react';\nimport { MultiSelectActionBar } from 'src/components/common/MultiSelect/MultiSelectActionBar';\nimport { InventoryEventBulkActions } from 'src/components/Events/EventListing/InventoryEventListing/BulkActions/InventoryEventBulkActions/InventoryEventBulkActions';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCollapsableViewContext } from 'src/contexts/CollapsableViewContext/CollapsableViewContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { useGetCompListings } from 'src/hooks/useGetCompListings';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport { flattenListingGroup } from 'src/modals/GroupListings/components/groupingUtils';\nimport { ListingTable } from 'src/tables/ListingTable';\nimport { ListingTableColumnId } from 'src/utils/columns/inventory/inventoryColumnUtils.types';\nimport { getAllInPriceFromListPrice } from 'src/utils/inventoryUtils';\nimport { getMatchingSectionRow } from 'src/utils/seatScoreUtils';\nimport { EventWithData } from 'src/WebApiController';\nimport {\n IListingGroupItem,\n Listing,\n Marketplace,\n UserSetting,\n} from 'src/WebApiController';\n\nimport * as styles from '../InventoryEventPage.css';\nimport { useStubHubListingManualPricingContext } from '../MarketListings/StubHubListingsManualPricingContext';\nimport { filterListingItemsBySectionRow } from '../MarketListings/StubHubListingsManualPricingContext.utils';\nimport {\n mapCompListingToListing,\n prependTicketClassColorColumnForFirstTime,\n} from './ManualPricingSection.utils';\n\ntype ManualPricingSectionProps = {\n accordionItemProps?: EventWithData;\n};\n\nexport function ManualPricingSection({\n accordionItemProps,\n}: ManualPricingSectionProps) {\n const { onScroll } = useCollapsableViewContext();\n const { entities, event } = accordionItemProps || {};\n const ownListings = entities?.listings;\n const { compListingsQuery } = useGetCompListings(event);\n const {\n rowIdFilters,\n sectionIdFilters,\n sectionRowIdFilters,\n quantityFilter,\n } = useStubHubListingManualPricingContext();\n\n const {\n value: storedInventoryColumnsEnabledSetting,\n setUserSetting: setInventoryColumnsEnabledSetting,\n } = useServerUserSetting({\n id: UserSetting.InventoryColumnsEnabled,\n });\n\n const {\n value: storedInventoryColumnOrderSetting,\n setUserSetting: setInventoryColumnOrderSetting,\n } = useServerUserSetting({\n id: UserSetting.InventoryColumnOrder,\n });\n\n useEffect(() => {\n // XX Migration to add TicketClassColor column for users\n // When the column becomes available for the first time\n if (\n storedInventoryColumnOrderSetting != null &&\n storedInventoryColumnsEnabledSetting != null\n ) {\n prependTicketClassColorColumnForFirstTime(\n storedInventoryColumnOrderSetting,\n storedInventoryColumnsEnabledSetting,\n setInventoryColumnOrderSetting,\n setInventoryColumnsEnabledSetting\n );\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [storedInventoryColumnOrderSetting, storedInventoryColumnsEnabledSetting]);\n\n const { loginContext } = useAppContext();\n const stubHubMkpSettings =\n loginContext?.user?.activeAccount?.marketplaceSettings?.find(\n (m) => m.mkp === Marketplace.StubHub\n );\n\n const { venueMapInfo } = useEventMapContext();\n\n const ticketClassIdColorMap = useMemo(() => {\n const colorMap = new Map();\n venueMapInfo?.sections.forEach((section) => {\n section.rows.forEach((row) => {\n if (row.tktClass?.id) {\n colorMap.set(row.tktClass.id, row.tktClass.color);\n }\n });\n });\n\n return colorMap;\n }, [venueMapInfo?.sections]);\n\n const filterListingItemsBySectionRowWrapper = useCallback(\n (l: Listing) => {\n const { section } = getMatchingSectionRow(\n l.seating,\n venueMapInfo?.sections\n );\n\n return filterListingItemsBySectionRow(\n l,\n section?.id ?? null,\n sectionIdFilters,\n rowIdFilters,\n sectionRowIdFilters,\n quantityFilter\n );\n },\n [\n quantityFilter,\n rowIdFilters,\n sectionIdFilters,\n sectionRowIdFilters,\n venueMapInfo?.sections,\n ]\n );\n\n const getListingTicketClassColor = useCallback(\n (listing: Listing) => {\n const { ticketClassId } = getMatchingSectionRow(\n listing.seating,\n venueMapInfo?.sections\n );\n\n return ticketClassIdColorMap.get(ticketClassId ?? 0);\n },\n [ticketClassIdColorMap, venueMapInfo?.sections]\n );\n\n const ownListingsMapped: Listing[] = useMemo(() => {\n const ownListingsFlattened =\n ownListings\n ?.flatMap(flattenListingGroup)\n .filter((l) => l.isFull)\n .map((lgi: IListingGroupItem) => {\n const listing = lgi as Listing;\n // Need to recalculate all in price to match display value\n const allInPrice = getAllInPriceFromListPrice(\n listing.listPrice,\n listing,\n stubHubMkpSettings?.sellerFee\n );\n\n return {\n ...listing,\n allInPrice,\n } as Listing;\n })\n .filter(filterListingItemsBySectionRowWrapper) || [];\n return ownListingsFlattened;\n }, [\n filterListingItemsBySectionRowWrapper,\n ownListings,\n stubHubMkpSettings?.sellerFee,\n ]);\n\n const ownListingsStubHubListingIds = useMemo(\n () =>\n ownListingsMapped\n .filter(\n (l) => l.mkpListings?.some((ml) => ml.mkp === Marketplace.StubHub)\n )\n .map(\n (l) =>\n l.mkpListings?.find((ml) => ml.mkp === Marketplace.StubHub)\n ?.mkpListingId ?? ''\n ),\n [ownListingsMapped]\n );\n\n const compListingsMapped = useMemo(\n () =>\n compListingsQuery.data\n ?.map(mapCompListingToListing)\n .filter(\n (cl) => !ownListingsStubHubListingIds.includes(cl.id.toString())\n )\n .filter(filterListingItemsBySectionRowWrapper) || [],\n [\n compListingsQuery.data,\n filterListingItemsBySectionRowWrapper,\n ownListingsStubHubListingIds,\n ]\n );\n\n const initState = useMemo(\n () => ({\n sorting: [{ id: ListingTableColumnId.AllInPrice, desc: false }],\n }),\n []\n );\n\n return (\n
    \n {accordionItemProps && (\n
    \n l.id)}\n >\n \n \n \n
    \n )}\n
    \n );\n}\n","import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { EVENT_DETAILED_METRICS_QUERY_KEY } from 'src/tables/EventsTable/EventsTable.constants';\nimport { EventConfigClient, Tag } from 'src/WebApiController';\n\nexport const useEventTags = (\n viagVirtualId?: string | null,\n disabled?: boolean\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const { trackError, showErrorDialog } = useErrorBoundaryContext();\n\n const queryClient = useQueryClient();\n const queryKey = ['EventConfigClient.getTagsForEvent', viagVirtualId];\n\n const shouldQuery =\n !disabled &&\n Boolean(activeAccountWebClientConfig.activeAccountId && viagVirtualId);\n const tagsQuery = useQuery({\n queryKey,\n queryFn: async () => {\n if (!shouldQuery) return null;\n\n const tags = await new EventConfigClient(\n activeAccountWebClientConfig\n ).getTagsForEvent(viagVirtualId!);\n\n return tags;\n },\n\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError('EventConfigClient.getTagsForEvent', error, {\n viagVirtualId,\n });\n },\n },\n });\n\n const mutation = useMutation({\n mutationFn: async ({\n tags,\n eventId,\n }: {\n tags: Tag[];\n eventId: string | null;\n }) => {\n const res = await new EventConfigClient(\n activeAccountWebClientConfig\n ).updateTagsForEvent(eventId ?? undefined, tags);\n return res;\n },\n // optimistic ui\n // Reference: https://tanstack.com/query/v3/docs/react/guides/optimistic-updates\n onMutate: ({ tags }) => {\n queryClient.cancelQueries({ queryKey });\n const prevValue = queryClient.getQueryData(queryKey);\n queryClient.setQueryData(queryKey, tags);\n return { prevValue };\n },\n onError: (err: ErrorTypes, { tags }, context) => {\n queryClient.setQueryData(queryKey, context?.prevValue);\n showErrorDialog('EventConfigClient.updateTagsForEvent', err, {\n trackErrorData: { tags },\n });\n },\n onSettled: (_data, _error, { tags }) => {\n queryClient.invalidateQueries({ queryKey });\n if (tags.some((t) => t.includeInReport)) {\n queryClient.invalidateQueries({\n queryKey: [`${EVENT_DETAILED_METRICS_QUERY_KEY}-detailed`],\n });\n }\n },\n });\n\n return {\n tags: tagsQuery.data,\n isLoading: tagsQuery.isLoading,\n async updateTags(tags: Tag[], eventId: string | null) {\n await mutation.mutateAsync({ tags, eventId });\n },\n };\n};\n","import { isEqual } from 'lodash-es';\nimport { useCallback, useEffect, useState } from 'react';\nimport { useForm } from 'react-hook-form';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { Button } from 'src/core/ui';\nimport { useEventTags } from 'src/hooks/api/useEventTags';\nimport { useTagsForEntityType } from 'src/hooks/useTagsForEntityType';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { DetailSection } from 'src/modals/common';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { tagHasChanges } from 'src/utils/tagUtils';\nimport { ActionOutboxEntityType, Permission, Tag } from 'src/WebApiController';\n\nimport { CancelButton } from '../../../Buttons';\nimport { TagsFormBodyV2 } from '../../../TagsFormBody';\nimport * as styles from '../InventoryEventPage.css';\n\ntype TagsUpdateInput = {\n tags: Tag[];\n};\n\nexport const TagsSection = ({\n eventId,\n disabled,\n}: {\n eventId: string;\n disabled?: boolean;\n}) => {\n const canCreateTage = useUserHasAnyOfPermissions(\n Permission.Events_AddTagType\n );\n const canEditTags = useUserHasAnyOfPermissions(Permission.Events_UpdateTags);\n\n const { setValue, watch, handleSubmit } = useForm();\n const tags = watch('tags') ?? [];\n const [isSubmitting, setIsSubmitting] = useState(false);\n\n const {\n tags: existingTags,\n updateTags,\n isLoading,\n } = useEventTags(eventId, disabled);\n\n const { tagsMetadata } = useTagsForEntityType(\n ActionOutboxEntityType.SellerEvent\n );\n\n const onSubmitHandler = useCallback(\n async (data: TagsUpdateInput) => {\n setIsSubmitting(true);\n await updateTags(data.tags, eventId);\n setIsSubmitting(false);\n },\n [eventId, updateTags]\n );\n\n useEffect(() => {\n if (existingTags && !isEqual(tags, existingTags)) {\n setValue('tags', existingTags);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [existingTags]);\n\n const hasChanges = tagHasChanges(tags, existingTags, tagsMetadata ?? []);\n\n if (isLoading) {\n return ;\n }\n\n return (\n
    \n }>\n {\n setValue('tags', tags);\n }}\n disabled={disabled || isSubmitting}\n entityType={ActionOutboxEntityType.SellerEvent}\n />\n\n {hasChanges && (\n
    \n {\n handleSubmit(onSubmitHandler)();\n }}\n >\n \n \n\n setValue('tags', existingTags ?? [])}\n disabled={isSubmitting || disabled}\n textContentId={ContentId.Cancel}\n />\n
    \n )}\n
    \n
    \n );\n};\n","import { useSortable } from '@dnd-kit/sortable';\nimport { CSS } from '@dnd-kit/utilities';\n\nimport * as styles from './SortableZoneAreaItem.css';\n\nexport const SortableZoneAreaItem = ({\n label,\n color,\n id,\n}: {\n label: string;\n color: string;\n id: string;\n}) => {\n const { attributes, listeners, setNodeRef, transform, transition } =\n useSortable({ id: id });\n\n const style = {\n transform: CSS.Transform.toString(transform),\n transition,\n };\n\n return (\n \n \n {label}\n \n );\n};\n","import { closestCenter, DndContext, DragEndEvent } from '@dnd-kit/core';\nimport {\n arrayMove,\n SortableContext,\n verticalListSortingStrategy,\n} from '@dnd-kit/sortable';\nimport { useCallback, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { getContent, useContentContext } from 'src/contexts/ContentContext';\nimport { Stack } from 'src/core/ui';\nimport { VENUE_ZONE_SECTION_GROUP_AREA_TYPE_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { SectionSectionGroup } from 'src/WebApiController';\n\nimport { VenueZoneMapFormType } from '../InventoryEventVenueZoneMapSection';\nimport { SortableZoneAreaItem } from './SortableZoneAreaItem';\nimport * as styles from './VenueZoneSectionGroupDraggableList.css';\n\nexport const VenueZoneSectionGroupDraggableList = () => {\n const contentContext = useContentContext();\n const { setValue, watch } = useFormContext();\n\n const sectionSectionGroupLookup = watch('sectionSectionGroupLookup');\n const customSectionGroups = watch('customSectionGroups');\n\n const sectionGroups = Object.values(sectionSectionGroupLookup).reduce<{\n [key: string]: SectionSectionGroup;\n }>((acc, v) => {\n let sectionGroupName = `${v.ticketClassName}: ${v.sectionGroupAreaName}`;\n if (v.sectionGroupAreaType != null) {\n const sectionGroupAreaContentId =\n VENUE_ZONE_SECTION_GROUP_AREA_TYPE_TO_CID[v.sectionGroupAreaType];\n\n sectionGroupName = `${v.ticketClassName}: ${getContent(\n sectionGroupAreaContentId,\n contentContext\n )}`;\n }\n acc[sectionGroupName] = v;\n\n return acc;\n }, {});\n\n const sortabledSectionGroups = useMemo(() => {\n // Sort the sectionGroups by sectionGroupRank and areaRank\n const sortedSectionGroups = Object.entries(sectionGroups).map(\n ([key, value]) => ({\n id: crypto.randomUUID(),\n key,\n ...value,\n })\n );\n\n // Map over customSectionGroups and add unique IDs\n const customGroupsWithId = customSectionGroups.map((csg) => ({\n id: crypto.randomUUID(),\n key: `${csg.ticketClassName}: ${csg.sectionGroupAreaName}`,\n ...csg,\n }));\n\n // Combine the sorted section groups and custom section groups\n return sortedSectionGroups\n .concat(customGroupsWithId)\n .toSorted(\n (a, b) =>\n a.sectionGroupRank - b.sectionGroupRank || a.areaRank - b.areaRank\n );\n }, [sectionGroups, customSectionGroups]);\n\n const handleDragEnd = useCallback(\n (event: DragEndEvent) => {\n const { active, over } = event;\n\n if (over != null && active.id != over.id) {\n const oldIndex = sortabledSectionGroups.findIndex(\n (ro) => ro.id === active.id\n );\n\n const newIndex = sortabledSectionGroups.findIndex(\n (ro) => ro.id === over.id\n );\n\n const shiftedRankOverrides = arrayMove(\n sortabledSectionGroups,\n oldIndex,\n newIndex\n );\n\n // Update ranks based on new positions\n const updatedRankOverrides = shiftedRankOverrides\n .map((item, index) => ({\n ...item,\n sectionGroupRank: index,\n }))\n .reduce<{\n [key: string]: number;\n }>((acc, v) => {\n const ssgId = `${v.ticketClassName ?? ''}:${\n v.ticketClassId ?? ''\n }:${v.sectionGroupAreaName ?? ''}:${v.sectionGroupAreaType ?? ''}`;\n\n acc[ssgId] = v.sectionGroupRank;\n return acc;\n }, {});\n\n // Update the original sectionSectionGroupLookup with the new ranks\n const newSectionSectionGroupLookup = Object.entries(\n sectionSectionGroupLookup\n ).reduce<{\n [key: string]: SectionSectionGroup;\n }>((acc, [sectId, ssg]) => {\n const ssgId = `${ssg.ticketClassName ?? ''}:${\n ssg.ticketClassId ?? ''\n }:${ssg.sectionGroupAreaName ?? ''}:${\n ssg.sectionGroupAreaType ?? ''\n }`;\n\n const sgRank = updatedRankOverrides[ssgId] ?? 1;\n ssg.sectionGroupRank = sgRank;\n\n acc[sectId] = ssg;\n return acc;\n }, {});\n\n setValue('sectionSectionGroupLookup', newSectionSectionGroupLookup);\n\n const newCustomSectionGroups = customSectionGroups.reduce<\n SectionSectionGroup[]\n >((acc, ssg) => {\n const ssgId = `${ssg.ticketClassName ?? ''}:${\n ssg.ticketClassId ?? ''\n }:${ssg.sectionGroupAreaName ?? ''}:${\n ssg.sectionGroupAreaType ?? ''\n }`;\n\n const sgRank = updatedRankOverrides[ssgId] ?? 1;\n ssg.sectionGroupRank = sgRank;\n\n acc.push(ssg);\n return acc;\n }, []);\n\n setValue('customSectionGroups', newCustomSectionGroups);\n }\n },\n [\n customSectionGroups,\n sectionSectionGroupLookup,\n setValue,\n sortabledSectionGroups,\n ]\n );\n\n return (\n \n \n \n {sortabledSectionGroups.map((ssg) => (\n \n ))}\n \n \n \n );\n};\n","import { useFormContext } from 'react-hook-form';\nimport { getContent, useContentContext } from 'src/contexts/ContentContext';\nimport { VENUE_ZONE_SECTION_GROUP_AREA_TYPE_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { SectionSectionGroup } from 'src/WebApiController';\n\nimport { VenueZoneMapFormType } from '../InventoryEventVenueZoneMapSection';\nimport * as styles from './VenueZoneSectionGroup.css';\n\nexport const VenueZoneSectionGroupList = () => {\n const contentContext = useContentContext();\n const { watch } = useFormContext();\n\n const sectionSectionGroupLookup = watch('sectionSectionGroupLookup');\n const customSectionGroups = watch('customSectionGroups');\n\n const sectionGroups = Object.values(sectionSectionGroupLookup).reduce<{\n [key: string]: SectionSectionGroup;\n }>((acc, v) => {\n let sectionGroupName = `${v.ticketClassName}: ${v.sectionGroupAreaName}`;\n if (v.sectionGroupAreaType != null) {\n const sectionGroupAreaContentId =\n VENUE_ZONE_SECTION_GROUP_AREA_TYPE_TO_CID[v.sectionGroupAreaType];\n\n sectionGroupName = `${v.ticketClassName}: ${getContent(\n sectionGroupAreaContentId,\n contentContext\n )}`;\n }\n acc[sectionGroupName] = v;\n\n return acc;\n }, {});\n\n return (\n
    \n {Object.entries(sectionGroups)\n .toSorted(\n ([, a], [, b]) =>\n a.sectionGroupRank - b.sectionGroupRank || a.areaRank - b.areaRank\n )\n .map(([key, value]) => (\n
    \n \n {key}\n
    \n ))}\n\n {customSectionGroups.map((ssg) => (\n \n \n {`${ssg.ticketClassName}: ${ssg.sectionGroupAreaName}`}\n
    \n ))}\n \n );\n};\n","import { useCallback, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Button, Stack, Switch } from 'src/core/ui';\nimport { AddSectionGroupDialog } from 'src/dialogs/AddSectionGroupDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SectionSectionGroup } from 'src/WebApiController';\n\nimport { getRandomColor } from '../../../utils/colorUtils';\nimport { VenueZoneMapFormType } from '../InventoryEventVenueZoneMapSection';\nimport * as styles from './SectionGroupPanel.css';\nimport { VenueZoneSectionGroupDraggableList } from './VenueZoneSectionGroupDraggableList';\nimport { VenueZoneSectionGroupList } from './VenueZoneSectionGroupList';\n\nexport const SectionGroupPanel = () => {\n const { watch, setValue, reset } = useFormContext();\n\n const [useCustomRank, setUseCustomRank] = useState(false);\n\n const addSectionGroupDialog = useBasicDialog();\n\n const customSectionGroups = watch('customSectionGroups');\n\n const onAddSectionGroup = useCallback(\n (ticketClassName: string, sectionGroupName: string) => {\n const newCustomSectionGroup = {\n sectId: 0,\n areaRank: 1,\n sectionGroupRank: 1,\n ticketClassName: ticketClassName,\n sectionGroupAreaName: sectionGroupName,\n sectionGroupAreaType: null,\n ticketClassId: null,\n sectionGroupColor: getRandomColor(customSectionGroups.length),\n } as SectionSectionGroup;\n\n const newCustomSectionGroups = [\n ...(customSectionGroups || []),\n newCustomSectionGroup,\n ];\n setValue('customSectionGroups', newCustomSectionGroups);\n\n addSectionGroupDialog.closeDialog();\n },\n [addSectionGroupDialog, customSectionGroups, setValue]\n );\n\n return (\n
    \n \n \n \n \n e.stopPropagation()}\n onCheckedChange={(isChecked) => {\n if (!isChecked) {\n reset();\n }\n\n setUseCustomRank(isChecked);\n }}\n />\n \n \n {useCustomRank ? (\n \n ) : (\n \n )}\n\n
    \n \n
    \n \n
    \n );\n};\n","import { useCallback } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport {\n Content,\n getContent,\n useContentContext,\n} from 'src/contexts/ContentContext';\nimport {\n PosDropdownAnimated,\n PosDropdownAnimatedItem,\n} from 'src/core/POS/PosDropdownAnimated';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { VENUE_ZONE_SECTION_GROUP_AREA_TYPE_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { SectionSectionGroup } from 'src/WebApiController';\n\nimport { VenueZoneMapFormType } from '../InventoryEventVenueZoneMapSection';\nimport * as styles from './VenueZoneSectionGroupDropdownList.css';\n\nexport type VenueZoneSectionGroupDropdownListProps = {\n selectedSectionSectionGroup: SectionSectionGroup | null;\n setSelectedSectionSectionGroup: React.Dispatch<\n React.SetStateAction\n >;\n};\n\nexport const VenueZoneSectionGroupDropdownList = ({\n selectedSectionSectionGroup,\n setSelectedSectionSectionGroup,\n}: VenueZoneSectionGroupDropdownListProps) => {\n const contentContext = useContentContext();\n\n const { watch } = useFormContext();\n\n const sectionSectionGroupLookup = watch('sectionSectionGroupLookup');\n const customSectionGroups = watch('customSectionGroups');\n\n const sectionGroups = Object.values(sectionSectionGroupLookup).reduce<{\n [key: string]: SectionSectionGroup;\n }>((acc, v) => {\n let sectionGroupName = `${v.ticketClassName}: ${v.sectionGroupAreaName}`;\n if (v.sectionGroupAreaType != null) {\n const sectionGroupAreaContentId =\n VENUE_ZONE_SECTION_GROUP_AREA_TYPE_TO_CID[v.sectionGroupAreaType];\n\n sectionGroupName = `${v.ticketClassName}: ${getContent(\n sectionGroupAreaContentId,\n contentContext\n )}`;\n }\n acc[sectionGroupName] = v;\n\n return acc;\n }, {});\n\n const selectedSectionGroup = useCallback(() => {\n if (selectedSectionSectionGroup == null) {\n return ;\n }\n\n if (selectedSectionSectionGroup.sectionGroupAreaType == null) {\n return (\n <>\n \n \n {`${selectedSectionSectionGroup.ticketClassName}: ${selectedSectionSectionGroup.sectionGroupAreaName}`}\n \n \n );\n }\n\n const sectionGroupAreaContentId =\n VENUE_ZONE_SECTION_GROUP_AREA_TYPE_TO_CID[\n selectedSectionSectionGroup.sectionGroupAreaType\n ];\n\n return (\n <>\n \n \n {`${selectedSectionSectionGroup.ticketClassName}: ${getContent(\n sectionGroupAreaContentId,\n contentContext\n )}`}\n \n \n );\n }, [contentContext, selectedSectionSectionGroup]);\n\n return (\n {selectedSectionGroup()}\n }\n align=\"end\"\n >\n {Object.entries(sectionGroups)\n .toSorted(\n ([, a], [, b]) =>\n a.sectionGroupRank - b.sectionGroupRank || a.areaRank - b.areaRank\n )\n .map(([label, ssg]) => (\n {\n e.preventDefault();\n e.stopPropagation();\n setSelectedSectionSectionGroup(ssg);\n }}\n >\n \n {label}\n \n ))}\n\n {customSectionGroups.map((ssg) => (\n {\n e.preventDefault();\n e.stopPropagation();\n setSelectedSectionSectionGroup(ssg);\n }}\n >\n \n {`${ssg.ticketClassName}: ${ssg.sectionGroupAreaName}`}\n \n ))}\n \n );\n};\n","import { ComponentProps, useEffect, useMemo, useState } from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { VenueZoneSectionGroupDropdownList } from 'src/components/Listings/InventoryEventPage/Sections/VenueZoneMap/components/VenueZoneSectionGroupDropdownList';\nimport { Content } from 'src/contexts/ContentContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { Button } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SectionInfo, SectionSectionGroup } from 'src/WebApiController';\n\nimport * as styles from './ChangeZoneMapSectionGroupDialog.css';\n\nexport type ChangeZoneMapDialogProps = ComponentProps & {\n selectedSections: SectionInfo[] | undefined;\n sectionIdMapping: { [key: string]: SectionSectionGroup } | undefined;\n onOkay: (\n sectionSectionGroup: SectionSectionGroup,\n sectionIds: number[]\n ) => void;\n onCancel: () => void;\n};\n\nexport function ChangeZoneMapSectionGroupDialog({\n selectedSections,\n sectionIdMapping,\n onOkay,\n onCancel,\n ...rest\n}: ChangeZoneMapDialogProps) {\n const [selectedSectionSectionGroup, setSelectedSectionSectionGroup] =\n useState(null);\n\n const selectedSection = useMemo(() => {\n return selectedSections?.[0];\n }, [selectedSections]);\n\n useEffect(() => {\n const sectionId = selectedSection?.id;\n const sectionSectionGroup =\n sectionIdMapping && sectionId ? sectionIdMapping[sectionId] : undefined;\n\n if (sectionSectionGroup) {\n setSelectedSectionSectionGroup(sectionSectionGroup);\n }\n }, [sectionIdMapping, selectedSection?.id]);\n\n if (!selectedSections?.length || !selectedSection) {\n return null;\n }\n\n return (\n <>\n }\n footer={\n <>\n \n {\n if (selectedSectionSectionGroup != null) {\n onOkay(\n selectedSectionSectionGroup,\n selectedSections!.map((s) => s.id)\n );\n }\n }}\n >\n \n \n \n }\n onCancel={onCancel}\n >\n
    \n \n
    \n {\n \n }\n \n \n );\n}\n","import { useCallback } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { MultiSectionsDisplay } from 'src/components/Events/VenueMap';\nimport { EventVenueMap } from 'src/components/Events/VenueMap/EventVenueMap';\nimport { VenueMapContentProps } from 'src/components/Events/VenueMap/VenueMapContent';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Button, Stack } from 'src/core/ui';\nimport { ChangeZoneMapSectionGroupDialog } from 'src/dialogs/ChangeZoneMapSectionGroupDialog';\nimport { useAutoCompMapSectionHandler } from 'src/hooks/useAutoCompMapSectionHandler';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SectionSectionGroup } from 'src/WebApiController';\n\nimport { VenueZoneMapFormType } from '../InventoryEventVenueZoneMapSection';\nimport * as styles from './VenueZoneMap.css';\n\nexport const VenueZoneMap = ({\n createGetColor,\n}: {\n createGetColor: (\n sectionSectionGroupLookup?: {\n [key: string]: SectionSectionGroup;\n } | null\n ) => NonNullable;\n}) => {\n const changeSectionGroupDialog = useBasicDialog();\n const onLaunchingSingleSectionDialog = useCallback(\n () => changeSectionGroupDialog.launchDialog(),\n [changeSectionGroupDialog]\n );\n\n const {\n selectedSectionIds,\n selectedSectionData,\n onSectionClicked,\n onResetSections,\n onToggleMirrors,\n onSelectedSectionsChange,\n } = useAutoCompMapSectionHandler(onLaunchingSingleSectionDialog);\n\n const { watch, setValue } = useFormContext();\n const sectionSectionGroupLookup = watch('sectionSectionGroupLookup');\n\n const onSectionZoneChanged = useCallback(\n (newSectionSectionGroup: SectionSectionGroup, sectionIds: number[]) => {\n const sectionGroupIdMap = sectionSectionGroupLookup;\n\n const newSectionGroupIdMap = {\n ...sectionGroupIdMap,\n ...sectionIds.reduce(\n (acc: { [key: string]: SectionSectionGroup }, sectionId) => {\n acc[sectionId] = newSectionSectionGroup;\n return acc;\n },\n {}\n ),\n };\n\n setValue('sectionSectionGroupLookup', newSectionGroupIdMap);\n\n changeSectionGroupDialog.closeDialog();\n },\n [changeSectionGroupDialog, setValue, sectionSectionGroupLookup]\n );\n\n return (\n
    \n \n \n changeSectionGroupDialog.launchDialog()}\n >\n \n \n \n )\n }\n />\n \n
    \n );\n};\n","import { UseMutationResult, UseQueryResult } from '@tanstack/react-query';\nimport { useCallback } from 'react';\nimport { EventVenueMap } from 'src/components/Events/VenueMap/EventVenueMap';\nimport { VenueMapContentProps } from 'src/components/Events/VenueMap/VenueMapContent';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ErrorTypes } from 'src/contexts/ErrorBoundaryContext';\nimport { useAutoCompMapSectionHandler } from 'src/hooks/useAutoCompMapSectionHandler';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n Event,\n SectionSectionGroup,\n VenueMapZoneConfigInfo,\n VenueZoneConfigOverride,\n VenueZoneConfigType,\n} from 'src/WebApiController';\n\nimport { SeatMapCard } from '../../SeatMapCard';\nimport * as styles from './VenueZoneMapFooter.css';\n\nexport const VenueZoneMapFooter = ({\n event,\n selectedOverrideId,\n setSelectedOverrideId,\n selectedConfigType,\n setSelectedConfigType,\n createGetColor,\n venueZoneMapConfigInfoQuery,\n venueZoneMapConfigOverrideInfoQuery,\n setVenueZoneConfigTypeOverrideMutation,\n}: {\n event: Event;\n selectedOverrideId: number | null;\n setSelectedOverrideId: React.Dispatch>;\n selectedConfigType: VenueZoneConfigType | null;\n setSelectedConfigType: React.Dispatch<\n React.SetStateAction\n >;\n createGetColor: (\n sectionSectionGroupLookup?: {\n [key: string]: SectionSectionGroup;\n } | null\n ) => NonNullable;\n venueZoneMapConfigInfoQuery: UseQueryResult<\n VenueMapZoneConfigInfo | null,\n Error\n >;\n venueZoneMapConfigOverrideInfoQuery: UseQueryResult<\n {\n [key: string]: VenueZoneConfigOverride;\n } | null,\n Error\n >;\n setVenueZoneConfigTypeOverrideMutation: UseMutationResult<\n void,\n ErrorTypes,\n {\n eventId?: number | null;\n venueZoneOverrideId?: number | null;\n venueZoneConfigType?: VenueZoneConfigType | null;\n },\n unknown\n >;\n}) => {\n const changeSectionGroupDialog = useBasicDialog();\n const onLaunchingSingleSectionDialog = useCallback(\n () => changeSectionGroupDialog.launchDialog(),\n [changeSectionGroupDialog]\n );\n\n const { onResetSections } = useAutoCompMapSectionHandler(\n onLaunchingSingleSectionDialog\n );\n\n const onVenueZoneMapClick = useCallback(\n (\n venueZoneOverrideId: number | null,\n venueZoneConfigType: VenueZoneConfigType | null\n ) => {\n setVenueZoneConfigTypeOverrideMutation.mutate({\n eventId: event!.viagId,\n venueZoneOverrideId,\n venueZoneConfigType,\n });\n setSelectedOverrideId(venueZoneOverrideId);\n setSelectedConfigType(venueZoneConfigType);\n onResetSections();\n },\n [\n setVenueZoneConfigTypeOverrideMutation,\n event,\n setSelectedOverrideId,\n setSelectedConfigType,\n onResetSections,\n ]\n );\n\n const disabledButtons = setVenueZoneConfigTypeOverrideMutation.isPending;\n\n return (\n
    \n \n \n \n\n
    \n {\n onVenueZoneMapClick(null, VenueZoneConfigType.Amphitheater);\n }}\n footer={}\n >\n \n \n\n {\n onVenueZoneMapClick(\n null,\n VenueZoneConfigType.ConcertsSectionsBehindStage\n );\n }}\n footer={}\n >\n \n \n\n {\n onVenueZoneMapClick(\n null,\n VenueZoneConfigType.SportsOrConcertsWith360\n );\n }}\n footer={}\n >\n \n \n\n {Object.entries(venueZoneMapConfigOverrideInfoQuery.data ?? {}).map(\n ([k, v], idx) => {\n return (\n {\n onVenueZoneMapClick(Number.parseInt(k), null);\n }}\n footer={v.name}\n >\n \n \n );\n }\n )}\n
    \n
    \n );\n};\n","import { UseQueryResult } from '@tanstack/react-query';\nimport { useCallback, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport {\n getCompleteEventConfigScoreOverrides,\n getEventConfigScoreOverride,\n} from 'src/utils/seatScoreUtils';\nimport {\n AutoPricingInputs,\n Event,\n Feature,\n ScoreModel,\n SectionScoreOverride,\n VenueMapInfo,\n} from 'src/WebApiController';\n\nimport { VenueZoneMapFormType } from '../InventoryEventVenueZoneMapSection';\n\ntype UseVenueSectionRowProps = {\n event: Event;\n pricingSettingsQuery: UseQueryResult;\n};\n\nexport const useVenueSectionRow = ({\n event,\n pricingSettingsQuery,\n}: UseVenueSectionRowProps) => {\n const {\n activeConfigOverride,\n venueMapInfo,\n venueMapsByScoreModelQuery,\n mapConfigOverridesQuery,\n } = useEventMapContext();\n\n const hasScaledSeatScoreFeature = useUserHasFeature(Feature.ScaledSeatScore);\n\n const { watch, setValue } = useFormContext();\n\n const sanitizedScoreModel = useSanitizedScoreModel(\n pricingSettingsQuery.data?.scoreModel,\n venueMapsByScoreModelQuery.data\n );\n\n const modeledSectionScores = useModeledSectionScores(\n sanitizedScoreModel,\n venueMapsByScoreModelQuery.data\n );\n\n const scoreOverrides = useMemo(() => {\n const watchedOverrides = watch('eventScoreOverride.scoreOverrides');\n return (\n watchedOverrides ??\n getCompleteEventConfigScoreOverrides(modeledSectionScores?.sectionScores)\n );\n }, [watch, modeledSectionScores]);\n\n const onSectionRowChange = useCallback(\n (updated: SectionScoreOverride[]) => {\n const newOverride = getEventConfigScoreOverride(\n event.viagId!,\n modeledSectionScores ?? venueMapInfo!,\n 'New Model',\n null\n );\n newOverride.scoreOverrides = updated;\n setValue('eventScoreOverride', newOverride);\n },\n [event, modeledSectionScores, setValue, venueMapInfo]\n );\n\n return {\n mapConfigOverridesQuery,\n hasScaledSeatScoreFeature,\n sanitizedScoreModel,\n modeledSectionScores,\n scoreOverrides,\n onSectionRowChange,\n venueMapInfo,\n };\n};\n\nconst useSanitizedScoreModel = (\n scoreModel?: ScoreModel | null | undefined,\n venueMapData?:\n | {\n readonly VenueGeometry?: VenueMapInfo | undefined;\n readonly MergedVenueGeometry?: VenueMapInfo | undefined;\n readonly AdvancedVenueGeometry?: VenueMapInfo | undefined;\n }\n | null\n | undefined\n) => {\n return useMemo(() => {\n if (scoreModel) return scoreModel;\n\n const { AdvancedVenueGeometry, MergedVenueGeometry } = venueMapData ?? {};\n\n if (AdvancedVenueGeometry) return ScoreModel.AdvancedVenueGeometry;\n if (MergedVenueGeometry) return ScoreModel.MergedVenueGeometry;\n return ScoreModel.VenueGeometry;\n }, [scoreModel, venueMapData]);\n};\n\nconst useModeledSectionScores = (\n sanitizedScoreModel: ScoreModel,\n venueMapData?:\n | {\n readonly VenueGeometry?: VenueMapInfo | undefined;\n readonly MergedVenueGeometry?: VenueMapInfo | undefined;\n readonly AdvancedVenueGeometry?: VenueMapInfo | undefined;\n }\n | null\n | undefined\n) => {\n return useMemo(() => {\n switch (sanitizedScoreModel) {\n case ScoreModel.AdvancedVenueGeometry:\n return venueMapData?.AdvancedVenueGeometry;\n case ScoreModel.MergedVenueGeometry:\n return venueMapData?.MergedVenueGeometry;\n default:\n return venueMapData?.VenueGeometry;\n }\n }, [sanitizedScoreModel, venueMapData]);\n};\n","import { UseMutationResult, UseQueryResult } from '@tanstack/react-query';\nimport { isEqual } from 'lodash-es';\nimport { useCallback, useEffect, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { Button, Stack } from 'src/core/ui';\nimport { SectionRowTableDialog } from 'src/dialogs/SectionRowTableDialog/SectionRowTableDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getCompleteEventConfigScoreOverrides } from 'src/utils/seatScoreUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n AutoPricingInputs,\n Event,\n PricingClient,\n VenueMapZoneConfigInfo,\n VenueZoneConfigOverride,\n VenueZoneConfigType,\n} from 'src/WebApiController';\n\nimport { useVenueSectionRow } from '../hooks/useVenueSectionRow';\nimport { VenueZoneMapFormType } from '../InventoryEventVenueZoneMapSection';\nimport * as styles from './VenueZoneMapSubmitButton.css';\n\nexport const VenueZoneMapSubmitButton = ({\n event,\n pricingSettingsQuery,\n venueZoneMapConfigInfoQuery,\n venueZoneMapConfigOverrideInfoQuery,\n setVenueZoneConfigTypeOverrideMutation,\n selectedOverrideId,\n setSelectedOverrideId,\n setSelectedConfigType,\n}: {\n event: Event;\n pricingSettingsQuery: UseQueryResult;\n venueZoneMapConfigInfoQuery: UseQueryResult<\n VenueMapZoneConfigInfo | null,\n Error\n >;\n venueZoneMapConfigOverrideInfoQuery: UseQueryResult<\n {\n [key: string]: VenueZoneConfigOverride;\n } | null,\n Error\n >;\n setVenueZoneConfigTypeOverrideMutation: UseMutationResult<\n void,\n ErrorTypes,\n {\n eventId?: number | null;\n venueZoneOverrideId?: number | null;\n venueZoneConfigType?: VenueZoneConfigType | null;\n },\n unknown\n >;\n selectedOverrideId: number | null;\n setSelectedOverrideId: React.Dispatch>;\n setSelectedConfigType: React.Dispatch<\n React.SetStateAction\n >;\n}) => {\n const [isLoading, setIsLoading] = useState(false);\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n const { venueZoneConfigs } = useEventMapContext();\n\n const sectionRowDialog = useBasicDialog();\n\n const { setValue, getValues, formState } =\n useFormContext();\n\n const [localName, setLocalName] = useState(null);\n const [isDirty, setIsDirty] = useState(false);\n\n useEffect(() => {\n if (venueZoneConfigs?.name) {\n setLocalName(venueZoneConfigs?.name);\n }\n }, [venueZoneConfigs, setLocalName]);\n\n const handleNameChange = useCallback(\n (newName: string) => {\n setLocalName(newName);\n setIsDirty(newName !== venueZoneConfigs?.name);\n },\n [venueZoneConfigs?.name]\n );\n\n const {\n mapConfigOverridesQuery,\n hasScaledSeatScoreFeature,\n scoreOverrides,\n onSectionRowChange,\n venueMapInfo,\n } = useVenueSectionRow({\n event,\n pricingSettingsQuery,\n });\n\n const hasChanges = useCallback(\n (eventForm: VenueZoneMapFormType) => {\n if (!formState.defaultValues?.sectionSectionGroupLookup) {\n return false;\n }\n\n return (\n !isEqual(\n formState.defaultValues?.sectionSectionGroupLookup,\n eventForm.sectionSectionGroupLookup\n ) || isDirty\n );\n },\n [formState.defaultValues?.sectionSectionGroupLookup, isDirty]\n );\n\n const hasVenueRowChanges = useCallback(\n (eventForm: VenueZoneMapFormType) => {\n const defaultValues = formState.defaultValues?.eventScoreOverride;\n if (!defaultValues) {\n return false;\n }\n\n return !isEqual(defaultValues, eventForm.eventScoreOverride);\n },\n [formState.defaultValues]\n );\n\n const onSubmit = useCallback(\n async (eventForm: VenueZoneMapFormType) => {\n tryInvokeApi(\n async () => {\n const client = new PricingClient(activeAccountWebClientConfig);\n setIsLoading(true);\n\n if (event?.viagId && hasChanges(eventForm)) {\n const newId = await client.upsertVenueZoneSectionGroupOverrides({\n viagogoEventId: event.viagId,\n venueZoneOverrideId: selectedOverrideId,\n name: localName ?? 'Default',\n sectionSectionGroupsJson: JSON.stringify({\n sectionSectionGroupLookup: eventForm.sectionSectionGroupLookup,\n }),\n saveAsNewMap: false,\n });\n\n await venueZoneMapConfigInfoQuery.refetch();\n await venueZoneMapConfigOverrideInfoQuery.refetch();\n await pricingSettingsQuery.refetch();\n\n setVenueZoneConfigTypeOverrideMutation.mutate({\n eventId: event!.viagId,\n venueZoneOverrideId: newId,\n venueZoneConfigType: null,\n });\n\n setSelectedOverrideId(newId);\n setSelectedConfigType(null);\n }\n\n if (\n event?.viagId &&\n eventForm.eventScoreOverride &&\n hasVenueRowChanges(eventForm)\n ) {\n const newId = await client.upsertEventSeatMapScoreOverride({\n ...eventForm.eventScoreOverride,\n viagogoEventId: event.viagId,\n scoreOverrides: getCompleteEventConfigScoreOverrides(\n venueMapInfo?.sectionScores,\n eventForm.eventScoreOverride.scoreOverrides,\n false,\n hasScaledSeatScoreFeature\n )!,\n });\n\n setValue('eventScoreOverride.id', newId);\n\n await mapConfigOverridesQuery.refetch();\n\n await client.setEventSeatMapScoreOverride(\n event.viagId,\n newId,\n null\n );\n }\n },\n (error) => {\n showErrorDialog(\n 'PricingClient.UpsertVenueZoneSectionGroupOverrides',\n error,\n {\n trackErrorData: eventForm,\n }\n );\n },\n async () => {\n setIsLoading(false);\n }\n );\n },\n [\n activeAccountWebClientConfig,\n event,\n hasChanges,\n hasScaledSeatScoreFeature,\n hasVenueRowChanges,\n localName,\n mapConfigOverridesQuery,\n pricingSettingsQuery,\n selectedOverrideId,\n setSelectedConfigType,\n setSelectedOverrideId,\n setValue,\n setVenueZoneConfigTypeOverrideMutation,\n showErrorDialog,\n venueMapInfo?.sectionScores,\n venueZoneMapConfigInfoQuery,\n venueZoneMapConfigOverrideInfoQuery,\n ]\n );\n\n const onSubmitHandler = useCallback(() => {\n const override = { ...getValues(), overrideName: localName };\n if (!hasChanges(override)) {\n return;\n }\n\n onSubmit(override);\n }, [getValues, hasChanges, localName, onSubmit]);\n\n return (\n <>\n \n \n \n \n
    \n {\n handleNameChange(e.target.value);\n }}\n value={localName ?? ''}\n />\n
    \n {hasChanges(getValues()) && (\n \n \n \n )}\n \n \n \n );\n};\n","import { useMutation, UseQueryResult } from '@tanstack/react-query';\nimport { useEffect, useState } from 'react';\nimport { FormProvider, useForm, useFormContext } from 'react-hook-form';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { useGetVenueZoneMapConfigInfo } from 'src/contexts/EventMapContext/useGetVenueZoneMapConfigInfo';\nimport { useGetVenueZoneMapInfoOverrides } from 'src/contexts/EventMapContext/useGetVenueZoneMapConfigInfoOverrides';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { Stack } from 'src/core/ui';\nimport { useGetEventAutoPricingSettings } from 'src/hooks/useGetEventAutoPricingSettings';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n AutoPricingInputs,\n Event,\n EventConfigScoreOverride,\n PricingClient,\n SectionSectionGroup,\n VenueMapZoneConfigInfo,\n VenueZoneConfigOverride,\n VenueZoneConfigType,\n} from 'src/WebApiController';\n\nimport { createGetColor } from '../../utils/colorUtils';\nimport { SectionGroupPanel } from './components/SectionGroupPanel';\nimport { VenueZoneMap } from './components/VenueZoneMap';\nimport { VenueZoneMapFooter } from './components/VenueZoneMapFooter';\nimport { VenueZoneMapSubmitButton } from './components/VenueZoneMapSubmitButton';\nimport * as styles from './InventoryEventVenueZoneMapSection.css';\n\nexport type VenueZoneMapFormType = {\n sectionSectionGroupLookup: { [key: string]: SectionSectionGroup };\n customSectionGroups: SectionSectionGroup[];\n eventScoreOverride?: EventConfigScoreOverride | null;\n customRank: boolean;\n};\n\ntype InventoryEventVenueZoneMapSectionProps = {\n event: Event;\n};\n\nexport const InventoryEventVenueZoneMapSection = ({\n event,\n}: InventoryEventVenueZoneMapSectionProps) => {\n return ;\n};\n\nexport const InventoryEventVenueZoneMapSectionBody = ({\n event,\n}: {\n event: Event;\n}) => {\n const { mapConfigOverridesQuery, isMapLoading } = useEventMapContext();\n const { pricingSettingsQuery } = useGetEventAutoPricingSettings(\n event!,\n false\n );\n\n const venueZoneMapConfigInfoQuery = useGetVenueZoneMapConfigInfo(\n event!.viagId,\n event!.venueCfgId\n );\n\n const venueZoneMapConfigOverrideInfoQuery = useGetVenueZoneMapInfoOverrides(\n event!.viagId,\n event!.venueCfgId\n );\n\n const methods = useForm({\n defaultValues: {\n sectionSectionGroupLookup: {},\n customSectionGroups: [],\n eventScoreOverride: null,\n customRank: false,\n },\n });\n\n if (\n mapConfigOverridesQuery.isLoading ||\n isMapLoading ||\n venueZoneMapConfigInfoQuery.isLoading ||\n venueZoneMapConfigOverrideInfoQuery.isLoading ||\n pricingSettingsQuery.isLoading\n ) {\n return ;\n }\n\n return (\n \n \n \n );\n};\n\nexport const InventoryEventZoneMapSectionContent = ({\n event,\n pricingSettingsQuery,\n venueZoneMapConfigInfoQuery,\n venueZoneMapConfigOverrideInfoQuery,\n}: {\n event: Event;\n pricingSettingsQuery: UseQueryResult;\n venueZoneMapConfigInfoQuery: UseQueryResult<\n VenueMapZoneConfigInfo | null,\n Error\n >;\n venueZoneMapConfigOverrideInfoQuery: UseQueryResult<\n {\n [key: string]: VenueZoneConfigOverride;\n } | null,\n Error\n >;\n}) => {\n const { reset } = useFormContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const { venueZoneConfigs } = useEventMapContext();\n\n const [selectedConfigType, setSelectedConfigType] =\n useState(\n pricingSettingsQuery.data?.venueZoneConfigType ??\n venueZoneMapConfigInfoQuery?.data?.defaultVenueZoneConfigType ??\n null\n );\n\n const [selectedOverrideId, setSelectedOverrideId] = useState(\n pricingSettingsQuery.data?.venueZoneOverrideId ?? null\n );\n\n useEffect(() => {\n if (venueZoneConfigs?.sectionSectionGroupLookup) {\n reset({\n sectionSectionGroupLookup: venueZoneConfigs.sectionSectionGroupLookup,\n customSectionGroups: [],\n eventScoreOverride: null,\n customRank: false,\n });\n }\n }, [reset, venueZoneConfigs]);\n\n const setVenueZoneConfigTypeOverrideMutation = useMutation({\n mutationFn: (request: {\n eventId?: number | null;\n venueZoneOverrideId?: number | null;\n venueZoneConfigType?: VenueZoneConfigType | null;\n }) => {\n if (request.eventId) {\n return new PricingClient(\n activeAccountWebClientConfig\n ).setVenueZoneSelectedConfigType(\n request.eventId,\n request.venueZoneOverrideId,\n request.venueZoneConfigType,\n false\n );\n }\n\n return Promise.resolve();\n },\n onError: (err: ErrorTypes, request) => {\n showErrorDialog('PricingClient.setVenueZoneSelectedConfigType', err, {\n trackErrorData: request,\n });\n },\n onSettled: () => {\n pricingSettingsQuery.refetch();\n },\n });\n\n if (!event) {\n return null;\n }\n\n return (\n <>\n {/* Header */}\n \n \n \n \n \n \n \n \n \n\n {/* Venue Map */}\n
    \n \n
    \n \n \n
    \n
    \n\n {/* Footer */}\n \n
    \n \n );\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { PricingClient } from 'src/WebApiController';\n\nexport const useGetEventSellThroughRates = (viagogoEventId?: number | null) => {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const { trackError } = useErrorBoundaryContext();\n\n const shouldQuery =\n activeAccountWebClientConfig.activeAccountId != null &&\n viagogoEventId != null;\n\n const sellThroughRatesQuery = useQuery({\n queryKey: [\n 'getEventSellThroughRates',\n activeAccountWebClientConfig.activeAccountId,\n viagogoEventId,\n ],\n queryFn: () => {\n if (!shouldQuery) {\n return null;\n }\n return new PricingClient(\n activeAccountWebClientConfig\n ).getEventSellThroughRates(viagogoEventId!);\n },\n\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError('PricingClient.getEventSellThroughRates', error, {\n viagogoEventId,\n });\n },\n },\n });\n\n return sellThroughRatesQuery;\n};\n","import * as Highcharts from 'highcharts';\nimport HighchartsReact from 'highcharts-react-official';\nimport { useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useMeasure } from 'react-use';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { useGetEventSellThroughRates } from 'src/hooks/api/useGetEventSellThroughRates';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SellThroughRateHistory } from 'src/WebApiController';\n\nimport {\n EventSellThroughRateTargetsForm,\n SellThroughRateSectionProps,\n} from './SellThroughRateSection.types';\n\nexport const SellThroughRateGraphBody = ({\n event,\n}: SellThroughRateSectionProps) => {\n const sellThroughRatesQuery = useGetEventSellThroughRates(event.viagId);\n\n const targetText = useContent(ContentId.Target);\n const actualText = useContent(ContentId.Actual);\n const todayText = useContent(ContentId.Today);\n\n const { watch } = useFormContext();\n const strTargets = watch('strTargets');\n\n const [containerRef, { width: containerWidth }] =\n useMeasure();\n\n const todayDate = useMemo(() => {\n const now = new Date(Date.now());\n return new Date(now.getFullYear(), now.getMonth(), now.getDate());\n }, []);\n\n const dataAsTuples = useMemo(() => {\n const { data: sellThroughRates } = sellThroughRatesQuery;\n const sellThroughRateTargets = strTargets\n .filter((r) => r.timelineDate != null && r.sellThroughRate != null)\n .map(\n (r) =>\n ({\n timelineDate: r.timelineDate,\n sellThroughRatePercentage: r.sellThroughRate! * 0.01,\n }) as SellThroughRateHistory\n );\n\n if (!sellThroughRates?.length && !sellThroughRateTargets?.length) return;\n\n const dataMapped: {\n [key: string]: Highcharts.SeriesOptionsType & {\n data: [number, number][];\n };\n } = {};\n\n if (sellThroughRates?.length) {\n const sellThroughRatesSorted = sellThroughRates.toSorted(\n (a, b) =>\n new Date(a.timelineDate!).getTime() -\n new Date(b.timelineDate!).getTime()\n );\n\n // We want to extrapolate the most recent actual value to be shown for today's date\n // By adding a new data point with today's date and the same value\n const needsNewDataPoint =\n new Date(\n sellThroughRatesSorted[sellThroughRatesSorted.length - 1].timelineDate\n ) < todayDate;\n\n const sellThroughRatesExtrapolated = needsNewDataPoint\n ? [\n ...sellThroughRatesSorted,\n {\n ...sellThroughRatesSorted[sellThroughRatesSorted.length - 1],\n timelineDate: todayDate,\n },\n ]\n : [...sellThroughRatesSorted];\n\n const strItem: Highcharts.SeriesOptionsType & {\n data: [number, number][];\n } = {\n data: [],\n type: 'spline',\n name: actualText,\n color: vars.color.textBrand,\n opacity: 1,\n marker: {\n enabled: sellThroughRatesExtrapolated.length < 2,\n },\n visible: true,\n tooltip: {\n valueSuffix: '%',\n valueDecimals: 2,\n },\n };\n\n sellThroughRatesExtrapolated.forEach((rate) => {\n strItem.data.push([\n new Date(rate.timelineDate).getTime(),\n rate.sellThroughRatePercentage * 100,\n ]);\n });\n\n if (strItem.data.length > 0) {\n dataMapped['actual'] = strItem;\n }\n }\n\n if (sellThroughRateTargets?.length) {\n const strTargetItem: Highcharts.SeriesOptionsType & {\n data: [number, number][];\n } = {\n data: [],\n type: 'spline',\n name: targetText,\n color: vars.color.textBrand,\n opacity: 0.5,\n dashStyle: 'Dash',\n marker: {\n lineColor: vars.color.textBrand,\n fillColor: vars.color.textBrand,\n symbol: 'circle',\n },\n visible: true,\n tooltip: {\n valueSuffix: '%',\n },\n };\n\n sellThroughRateTargets\n ?.toSorted(\n (a, b) =>\n new Date(a.timelineDate!).getTime() -\n new Date(b.timelineDate!).getTime()\n )\n ?.forEach((rate) => {\n strTargetItem.data.push([\n new Date(rate.timelineDate).getTime(),\n rate.sellThroughRatePercentage * 100,\n ]);\n });\n\n if (strTargetItem.data.length > 0) {\n dataMapped['target'] = strTargetItem;\n }\n }\n\n return Object.values(dataMapped);\n }, [sellThroughRatesQuery, strTargets, todayDate, actualText, targetText]);\n\n const options: Highcharts.Options = {\n title: { text: '' },\n chart: {\n zooming: { type: 'x' },\n width: 0.9 * (containerWidth ?? 500),\n backgroundColor: 'transparent',\n },\n xAxis: {\n type: 'datetime',\n plotLines: [\n {\n // Today indicator\n color: vars.color.backgroundBrandHover,\n width: 3,\n value: todayDate.getTime(),\n label: {\n text: todayText,\n align: 'right',\n x: -10,\n y: 20,\n rotation: 0,\n style: {\n color: vars.color.textBrand,\n fontSize: vars.typography.fontSize.sm,\n },\n },\n },\n ],\n labels: {\n style: {\n color: vars.color.textPrimary,\n fontSize: vars.typography.fontSize.sm,\n },\n },\n lineColor: vars.color.textBrandActive,\n lineWidth: 1,\n tickColor: undefined,\n },\n yAxis: {\n labels: {\n format: '{text}%',\n style: {\n color: vars.color.textPrimary,\n fontSize: vars.typography.fontSize.sm,\n },\n },\n lineColor: vars.color.textBrandActive,\n lineWidth: 1,\n title: { text: '' },\n gridLineColor: undefined,\n max: 100,\n min: 0,\n },\n legend: { enabled: true, itemStyle: { color: vars.color.textPrimary } },\n plotOptions: {\n spline: {\n color: vars.color.backgroundBrandActive,\n marker: {\n radius: 4,\n lineColor: vars.color.backgroundBrandHover,\n fillColor: '#fff',\n lineWidth: 2,\n },\n lineWidth: 2,\n threshold: null,\n },\n series: {\n animation: false,\n },\n },\n series: dataAsTuples,\n // Watermark\n credits: { enabled: false },\n };\n\n return (\n <>\n {sellThroughRatesQuery?.data?.length || strTargets.length ? (\n \n \n \n ) : null}\n \n );\n};\n","import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport {\n Feature,\n PricingClient,\n SellThroughRateHistory,\n} from 'src/WebApiController';\n\nimport { useUserHasFeature } from '../useUserHasFeature';\n\nexport const useSellerEventSellThroughRateTargets = (\n viagogoEventId?: number | null,\n viagogoMappingId?: string | null\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const { trackError, showErrorDialog } = useErrorBoundaryContext();\n\n const hasAutoPricingFeature = useUserHasFeature(Feature.AutoPricing);\n\n const queryClient = useQueryClient();\n const queryKey = [\n 'getEventSellThroughRateTargets',\n activeAccountWebClientConfig.activeAccountId,\n viagogoEventId,\n viagogoMappingId,\n ];\n\n const shouldQuery =\n hasAutoPricingFeature &&\n activeAccountWebClientConfig.activeAccountId != null &&\n (viagogoEventId != null || viagogoMappingId != null);\n\n const sellThroughRateTargetsQuery = useQuery({\n queryKey,\n queryFn: () => {\n if (!shouldQuery) return null;\n\n return new PricingClient(\n activeAccountWebClientConfig\n ).getEventSellThroughRateTargets(viagogoEventId, viagogoMappingId);\n },\n\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError('PricingClient.getEventSellThroughRateTargets', error, {\n viagogoEventId,\n viagogoMappingId,\n });\n },\n },\n });\n\n const sellThroughRateTargetsMutation = useMutation({\n mutationFn: async ({ input }: { input: SellThroughRateHistory[] }) => {\n return await new PricingClient(\n activeAccountWebClientConfig\n ).setEventSellThroughRateTargets(viagogoEventId, viagogoMappingId, input);\n },\n // optimistic ui\n onMutate: ({ input }) => {\n queryClient.cancelQueries({ queryKey });\n const prevValue = queryClient.getQueryData(queryKey);\n queryClient.setQueryData(queryKey, input);\n return { prevValue };\n },\n onError: (err: ErrorTypes, { input }, context) => {\n queryClient.setQueryData(queryKey, context?.prevValue);\n showErrorDialog('PricingClient.setEventSellThroughRateTargets', err, {\n trackErrorData: { input },\n });\n },\n onSettled: () => {\n queryClient.invalidateQueries({ queryKey });\n },\n });\n\n return {\n sellThroughRateTargetsQuery,\n sellThroughRateTargetsMutation,\n };\n};\n","import { useCallback, useState } from 'react';\nimport { Controller, useFormContext } from 'react-hook-form';\nimport { ButtonWithIcon } from 'src/components/Buttons';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { DatePickerInput } from 'src/core/POS/DateSelector';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { shared, vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { useGetEventSellThroughRates } from 'src/hooks/api/useGetEventSellThroughRates';\nimport { useSellerEventSellThroughRateTargets } from 'src/hooks/api/useSellerEventSellThroughRateTargets';\nimport { CrossIcon, EditIcon, IconsFill, PlusIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getLocaleFromLanguageOrCurrent } from 'src/utils/localeUtils';\nimport { SellThroughRateHistory } from 'src/WebApiController';\n\nimport * as styles from './SellThroughRateSection.css';\nimport {\n EventSellThroughRateTargetsForm,\n SellThroughRateSectionProps,\n} from './SellThroughRateSection.types';\n\nexport const SellThroughRateTargetInput = ({\n event,\n disabled,\n}: SellThroughRateSectionProps) => {\n const requiredMsg = useContent(ContentId.Required);\n\n const sellThroughRatesQuery = useGetEventSellThroughRates(event.viagId);\n const { sellThroughRateTargetsQuery, sellThroughRateTargetsMutation } =\n useSellerEventSellThroughRateTargets(event.viagId, event.mappingId);\n\n const [isLoading, setIsLoading] = useState(false);\n const [isEditing, setIsEditing] = useState(false);\n\n const { watch, setValue, setError, clearErrors, handleSubmit } =\n useFormContext();\n\n const strTargets = watch('strTargets');\n\n const validate = useCallback(\n (formValue: EventSellThroughRateTargetsForm) => {\n clearErrors();\n\n const strTargets = formValue.strTargets;\n\n let hasError = false;\n\n strTargets.forEach((str, index) => {\n if (str.timelineDate === undefined) {\n setError(`strTargets.${index}.timelineDate`, {\n message: requiredMsg,\n });\n hasError = true;\n }\n\n if (str.sellThroughRate === undefined) {\n setError(`strTargets.${index}.sellThroughRate`, {\n message: requiredMsg,\n });\n hasError = true;\n }\n });\n\n return !hasError;\n },\n [clearErrors, requiredMsg, setError]\n );\n\n const onSubmit = useCallback(\n async (formValue: EventSellThroughRateTargetsForm) => {\n setIsLoading(true);\n\n if (!validate(formValue)) {\n setIsLoading(false);\n return;\n }\n\n const input = formValue.strTargets\n .toSorted(\n (a, b) =>\n new Date(a.timelineDate!).getTime() -\n new Date(b.timelineDate!).getTime()\n )\n .map((s) => ({\n timelineDate: s.timelineDate,\n sellThroughRatePercentage: s.sellThroughRate! * 0.01,\n })) as SellThroughRateHistory[];\n\n await sellThroughRateTargetsMutation.mutateAsync({ input });\n\n setIsLoading(false);\n setIsEditing(false);\n },\n [validate, sellThroughRateTargetsMutation]\n );\n\n const onRowRemove = useCallback(\n (index: number) => {\n const newStrTargets = [...strTargets];\n newStrTargets.splice(index, 1);\n setValue('strTargets', newStrTargets);\n },\n [setValue, strTargets]\n );\n\n const onRowAdd = useCallback(() => {\n setValue('strTargets', [\n ...strTargets,\n {\n timelineDate: undefined,\n sellThroughRate: undefined,\n },\n ]);\n }, [setValue, strTargets]);\n\n const onClearAll = useCallback(() => {\n setValue('strTargets', []);\n }, [setValue]);\n\n if (\n sellThroughRatesQuery.isPending ||\n sellThroughRateTargetsQuery.isPending\n ) {\n return ;\n }\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n {strTargets?.map((str, index) => (\n \n ))}\n \n {isEditing && (\n \n \n }\n textContentId={ContentId.AddTarget}\n onClick={onRowAdd}\n disabled={disabled || isLoading}\n style={{ padding: 0 }}\n />\n \n \n \n \n )}\n \n \n {isEditing ? (\n \n \n \n ) : (\n }\n onClick={() => setIsEditing(true)}\n textContentId={ContentId.Edit}\n disabled={disabled || isLoading}\n style={{ padding: 0 }}\n />\n )}\n \n \n );\n};\n\nconst SellThroughRateTargetInputRow = ({\n index,\n onRemove,\n editable,\n disabled,\n}: {\n index: number;\n onRemove: (index: number) => void;\n editable: boolean;\n disabled: boolean;\n}) => {\n const {\n formState: { errors },\n control,\n setValue,\n } = useFormContext();\n const requiredMsg = useContent(ContentId.Required);\n\n return (\n \n \n (\n \n {\n setValue(field.name, d.toISOString());\n }}\n />\n \n )}\n />\n\n (\n \n {\n if (!e.target.value) {\n field.onChange(null);\n return;\n }\n\n const value = parseFloat(e.target.value);\n if (value < 0) return;\n if (value > 100) return;\n\n field.onChange(value);\n }}\n postfixDisplay=\"%\"\n />\n \n )}\n />\n\n {editable && (\n {\n onRemove(index);\n }}\n />\n )}\n \n \n );\n};\n","import { useEffect } from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport {\n EventSellThroughRateTargetsForm,\n SellThroughRateGraphBody,\n SellThroughRateHistoryInput,\n SellThroughRateSectionProps,\n SellThroughRateTargetInput,\n} from 'src/components/Events/SellThroughRateSection';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { shared } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { useGetEventSellThroughRates } from 'src/hooks/api/useGetEventSellThroughRates';\nimport { useSellerEventSellThroughRateTargets } from 'src/hooks/api/useSellerEventSellThroughRateTargets';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport * as styles from './InventoryEventPage.css';\n\nexport const SellThroughRateSection = ({\n event,\n ...rest\n}: SellThroughRateSectionProps) => {\n const { sellThroughRateTargetsQuery } = useSellerEventSellThroughRateTargets(\n event.viagId,\n event.mappingId\n );\n\n const methods = useForm({\n defaultValues: {\n strTargets: sellThroughRateTargetsQuery.data ?? [],\n },\n });\n\n useEffect(() => {\n const strTargets =\n sellThroughRateTargetsQuery.data?.map(\n (t) => ({\n timelineDate: t.timelineDate,\n sellThroughRate: t.sellThroughRatePercentage * 100,\n })\n );\n\n const defaultStrTargets: SellThroughRateHistoryInput[] = [\n { timelineDate: event.dates.start ?? undefined, sellThroughRate: 100 },\n ];\n\n methods.reset({\n strTargets: strTargets?.length ? strTargets : defaultStrTargets,\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [sellThroughRateTargetsQuery.data]);\n\n return (\n \n \n \n );\n};\n\nconst SellThroughRateSectionBody = ({\n event,\n disabled,\n}: SellThroughRateSectionProps) => {\n const sellThroughRatesQuery = useGetEventSellThroughRates(event.viagId);\n const { sellThroughRateTargetsQuery } = useSellerEventSellThroughRateTargets(\n event.viagId,\n event.mappingId\n );\n\n if (\n sellThroughRatesQuery.isLoading ||\n sellThroughRateTargetsQuery.isLoading\n ) {\n return ;\n }\n\n return (\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n );\n};\n","import { StarIcon as StarIconOutline } from '@heroicons/react/24/outline';\nimport { StarIcon as StarIconSolid } from '@heroicons/react/24/solid';\nimport { ReactNode, useState } from 'react';\nimport { Stack } from 'src/core/ui';\n\nimport * as styles from './InventoryEventPage.css';\n\nexport const TABS_NONE = 'none';\n\nexport function TabWithStarIcon({\n children,\n onIconClick,\n defaultTab,\n tabType,\n}: {\n children: ReactNode;\n onIconClick: (value: TTabs) => void;\n defaultTab?: TTabs | undefined;\n tabType: TTabs;\n}) {\n const [iconHovered, setIconHovered] = useState(false);\n\n return (\n \n {children}\n {defaultTab === tabType ? (\n {\n e.stopPropagation();\n e.preventDefault();\n\n onIconClick(TABS_NONE as TTabs);\n }}\n >\n \n \n ) : (\n setIconHovered(true)}\n onMouseLeave={() => setIconHovered(false)}\n onClick={(e) => {\n e.stopPropagation();\n e.preventDefault();\n\n onIconClick(tabType);\n }}\n className={styles.hoverIconContainer}\n >\n {iconHovered ? (\n \n ) : (\n \n )}\n \n )}\n \n );\n}\n","import { isEmpty } from 'lodash-es';\nimport {\n Dispatch,\n SetStateAction,\n useCallback,\n useContext,\n useEffect,\n useState,\n} from 'react';\nimport { useToggle } from 'react-use';\nimport { EventAccordionItemProps } from 'src/components/Accordions';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { InputPriceFocusProvider } from 'src/contexts/InputPriceFocusContext/InputPriceFocusContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport * as Tabs from 'src/core/ui/Tabs';\nimport { BasicDialogProps, useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport { ColumnSettingsModal } from 'src/modals/ColumnSettings/ColumnSettings';\nimport { LayoutIcon } from 'src/svgs';\nimport { PlusIcon } from 'src/svgs/Viagogo';\nimport { CustomListingColumn } from 'src/utils/columns/inventory/inventoryCustomColumnUtils.types';\nimport { InventoryDeeplinkQueryParam } from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getDeepLinkIdFromUrl } from 'src/utils/deepLinkUtils';\nimport { getListingDetailsModalConfigWithDeepLink } from 'src/utils/inventoryUtils';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport {\n EventWithData,\n Feature,\n Listing,\n ListingDetailDataField,\n ListingDetails,\n Permission,\n UserSetting,\n} from 'src/WebApiController';\n\nimport { InventoryEventTabs } from './InventoryEventPage';\nimport * as styles from './InventoryEventPage.css';\nimport { InventoryEventDashboardSection } from './Sections/InventoryEventDashboardSection';\nimport { InventoryEventEditMapSection } from './Sections/InventoryEventEditMapSection';\nimport { InventoryEventFulfillmentSection } from './Sections/InventoryEventFulfillmentSection';\nimport { InventoryEventInfoSection } from './Sections/InventoryEventInfoSection';\nimport { InventoryEventTransactionsSection } from './Sections/InventoryEventTransactionsSection';\nimport { InventoryPricingABTestSection } from './Sections/InventoryPricingABTestSection';\nimport { ManualPricingSection } from './Sections/ManualPricingSection';\nimport { TagsSection } from './Sections/TagsSection';\nimport { InventoryEventVenueZoneMapSection } from './Sections/VenueZoneMap/InventoryEventVenueZoneMapSection';\nimport { SellThroughRateSection } from './SellThroughRateSection';\nimport { TabWithStarIcon } from './TabWithStarIcon';\n\ntype InventoryEventPageContentProps = {\n accordionItemProps?: EventWithData;\n inventoryAccordionItem?: EventAccordionItemProps;\n selectedListingIds: number[];\n setSelectedListingIds: Dispatch>;\n activeTab: InventoryEventTabs;\n setActiveTab: (tab: InventoryEventTabs) => void;\n};\n\nexport const InventoryEventPageContent: React.FC<\n InventoryEventPageContentProps\n> = ({\n accordionItemProps,\n inventoryAccordionItem,\n selectedListingIds,\n setSelectedListingIds,\n activeTab,\n setActiveTab,\n}) => {\n const hasPricingV2DemandDashboard = useUserHasFeature(\n Feature.PricingV2DemandDashboard\n );\n\n const { setModal } = useContext(ModalContext);\n const { posEntity: listing, setActivePosEntity } =\n useActivePosEntityContext();\n\n const hasAutoPricingFeature = useUserHasFeature(Feature.AutoPricing);\n const hasRecentTransactionsAccess = useUserHasFeature(\n Feature.InventoryEventRecentTransactions\n );\n const hasEventDeliveryStrategyFeature = useUserHasFeature(\n Feature.EventDeliveryStrategy\n );\n const hasEditPricingPermission = useUserHasAnyOfPermissions(\n Permission.Inventory_SetPrice,\n Permission.Inventory_SetPriceOnIsPricerOf,\n Permission.Inventory_SetPriceOnPurchasedBy\n );\n const hasPricingABTestFeature = useUserHasFeature(Feature.PricingABTest);\n const hasEditMapInListingTab = useUserHasFeature(Feature.EditMapInListingTab);\n\n const {\n value: defaultInventoryTabUserSetting,\n setUserSetting: setDefaultInventoryTabUserSetting,\n isLoading: defaultInventoryTabLoading,\n } = useServerUserSetting({\n id: UserSetting.InventoryDefaultTab,\n });\n\n const activeId = getDeepLinkIdFromUrl(\n InventoryDeeplinkQueryParam,\n window.location.href\n );\n\n const createExperimentDialog = useBasicDialog();\n\n useEffect(() => {\n if (activeId?.length && !listing) {\n setActivePosEntity(parseInt(activeId), undefined, true, [\n ListingDetailDataField.Basic,\n ]);\n setModal(getListingDetailsModalConfigWithDeepLink(activeId));\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [activeId]);\n\n const [defaultTab, setDefaultTab] = useState(\n defaultInventoryTabUserSetting\n );\n\n useEffect(() => {\n if (\n defaultInventoryTabUserSetting != null &&\n defaultInventoryTabUserSetting !== activeTab &&\n defaultInventoryTabUserSetting !== InventoryEventTabs.None &&\n defaultInventoryTabLoading === false\n ) {\n setActiveTab(defaultInventoryTabUserSetting);\n }\n if (\n defaultInventoryTabUserSetting != null &&\n defaultInventoryTabUserSetting !== defaultTab &&\n defaultInventoryTabUserSetting !== InventoryEventTabs.None &&\n defaultInventoryTabLoading === false\n ) {\n setDefaultTab(defaultInventoryTabUserSetting);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [defaultInventoryTabLoading, defaultInventoryTabUserSetting]);\n\n const onSetDefaultTabClick = useCallback(\n async (tab: InventoryEventTabs) => {\n if (tab !== activeTab && tab !== InventoryEventTabs.None) {\n setActiveTab(tab);\n }\n if (tab !== defaultTab) {\n setDefaultTab(tab);\n }\n setDefaultInventoryTabUserSetting(tab);\n },\n [activeTab, defaultTab, setActiveTab, setDefaultInventoryTabUserSetting]\n );\n\n const event = accordionItemProps?.event!;\n\n return (\n {\n setActiveTab(value as InventoryEventTabs);\n }}\n className={styles.tabsSection}\n >\n \n \n {hasPricingV2DemandDashboard && (\n \n \n \n \n \n )}\n \n \n \n \n \n \n \n \n \n \n {hasAutoPricingFeature && (\n \n \n \n \n \n )}\n {hasEditPricingPermission && (\n \n \n \n \n \n )}\n\n {hasRecentTransactionsAccess && (\n \n \n \n \n \n )}\n {hasEventDeliveryStrategyFeature &&\n accordionItemProps?.event?.viagId != null && (\n \n \n \n \n \n )}\n \n \n \n \n \n {hasPricingABTestFeature && (\n \n \n \n \n \n )}\n \n \n \n\n {hasPricingV2DemandDashboard && (\n \n \n \n )}\n \n \n \n \n \n \n {hasAutoPricingFeature && (\n \n \n \n )}\n {hasEditPricingPermission && (\n \n \n \n \n \n )}\n {hasRecentTransactionsAccess && (\n \n \n \n )}\n\n {hasEventDeliveryStrategyFeature &&\n accordionItemProps?.event?.viagId != null && (\n \n \n \n )}\n\n {hasEditMapInListingTab && accordionItemProps?.event?.viagId != null && (\n \n \n \n )}\n {accordionItemProps?.event?.viagId != null && (\n \n \n \n )}\n\n {hasPricingABTestFeature &&\n accordionItemProps?.event?.viagId != null &&\n !isEmpty(accordionItemProps?.entities?.listings) && (\n \n \n \n )}\n \n );\n};\n\ntype InventoryHeaderActionProps = {\n activeTab: InventoryEventTabs;\n createExperimentDialog: BasicDialogProps;\n};\nexport const InventoryHeaderAction: React.FC = ({\n activeTab,\n createExperimentDialog,\n}) => {\n const [isColumnModalOpen, toggleColumnModal] = useToggle(false);\n\n const onColumnSettingButtonClickHandler = useCallback(\n (e: React.MouseEvent) => {\n e.stopPropagation();\n if (!isColumnModalOpen) toggleColumnModal(true);\n },\n [isColumnModalOpen, toggleColumnModal]\n );\n\n return (\n
    \n {[InventoryEventTabs.Info, InventoryEventTabs.ManualPricing].includes(\n activeTab\n ) && (\n \n \n \n \n \n \n )}\n {activeTab === InventoryEventTabs.PricingABTest && (\n \n createExperimentDialog.launchDialog()}\n >\n \n \n \n \n )}\n\n {isColumnModalOpen && (\n \n onClose={toggleColumnModal}\n sectionType={SectionType.Listings}\n />\n )}\n
    \n );\n};\n","import { format } from 'date-fns';\nimport { ReactNode } from 'react';\nimport { BulkEditStatusPopover } from 'src/components/common/BulkActions/BulkEditStatusPopover';\nimport { ExpandCollapsableContentButton } from 'src/components/common/CollapsableContent/ExpandCollapsableContentButton';\nimport { SummaryTile } from 'src/components/common/SummaryTile';\nimport { useCollapsableViewContext } from 'src/contexts/CollapsableViewContext/CollapsableViewContext';\nimport { Stack } from 'src/core/ui';\nimport { getLocaleFromLanguageOrCurrent } from 'src/utils/localeUtils';\nimport { ActionOutboxEntityType } from 'src/WebApiController';\n\nimport {\n eventDateWrapper,\n eventInfoWrapper,\n metricValueWrapper,\n rootWrapper,\n scrollDownButton,\n} from './InventoryEventPageHeaderCondence.css';\n\ninterface InventoryEventPageHeaderCondenseProps {\n eventDate?: Date;\n eventName: ReactNode;\n eventVenue?: ReactNode;\n metricValue?: string;\n actions?: ReactNode;\n}\n\nconst formatDate = (date?: Date): string | undefined => {\n if (!date) {\n return;\n }\n const currentLocale = getLocaleFromLanguageOrCurrent();\n const month = date.toLocaleString(currentLocale.code, { month: 'numeric' });\n const day = date.toLocaleString(currentLocale.code, { day: '2-digit' });\n const dayOfWeek = date.toLocaleString(currentLocale.code, {\n weekday: 'short',\n });\n return `${month}/${day} - ${dayOfWeek} - ${format(date, 'h aaa')}`;\n};\n\nexport const InventoryEventPageHeaderCondense = ({\n eventName,\n eventDate,\n eventVenue,\n metricValue,\n actions,\n}: InventoryEventPageHeaderCondenseProps) => {\n const { setIsCollapsedView } = useCollapsableViewContext();\n return (\n
    \n setIsCollapsedView(false)}\n />\n \n
    {formatDate(eventDate)}
    \n \n \n {eventName}\n {eventVenue}\n \n \n \n {actions}\n {metricValue && (\n
    {metricValue}
    \n )}\n
    \n
    \n
    \n
    \n );\n};\n","import { isEqual } from 'lodash-es';\nimport { ComponentProps, useCallback, useEffect, useState } from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { Modal as RSModal } from 'reactstrap';\nimport { CancelButton } from 'src/components/Buttons';\nimport { MarketplaceLogo } from 'src/components/common/MarketplaceLogo';\nimport { EventSearch } from 'src/components/Events/EventSearch';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport {\n GenericDialog,\n GenericDialogProps,\n} from 'src/core/interim/dialogs/GenericDialog';\nimport { WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { Button, SimpleTable, Stack } from 'src/core/ui';\nimport { SearchOutlineIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { compareMarketplace } from 'src/utils/eventWithDataUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n Event,\n EventConfigClient,\n Marketplace,\n SellerEventMarketplaceEventInfo,\n} from 'src/WebApiController';\n\nimport * as styles from './MarketplaceEventEditDialog.css';\n\ntype MarketplaceEventEditDialogForm = {\n mkpEventInfos: SellerEventMarketplaceEventInfo[];\n};\n\nexport type MarketplaceEventEditDialogProps = ComponentProps & {\n event: Event;\n mkpEventInfos?: SellerEventMarketplaceEventInfo[];\n};\n\nexport function MarketplaceEventEditDialog({\n mkpEventInfos,\n ...rest\n}: MarketplaceEventEditDialogProps) {\n const methods = useForm({\n defaultValues: {\n mkpEventInfos: mkpEventInfos?.toSorted((a, b) =>\n compareMarketplace(a.marketplace, b.marketplace)\n ),\n },\n });\n\n useEffect(() => {\n const newMkpEventInfos = mkpEventInfos?.toSorted((a, b) =>\n compareMarketplace(a.marketplace, b.marketplace)\n );\n if (\n !isEqual(methods.formState.defaultValues?.mkpEventInfos, newMkpEventInfos)\n ) {\n methods.reset({\n mkpEventInfos: newMkpEventInfos,\n });\n }\n }, [methods, mkpEventInfos]);\n\n return (\n \n \n \n );\n}\n\nconst MarketplaceEventEditDialogBody = ({\n event,\n onClosed,\n getValues,\n register,\n setValue,\n formState,\n clearErrors,\n handleSubmit,\n ...rest\n}: Omit &\n Omit<\n ComponentProps<\n typeof FormProvider\n >,\n 'children'\n > & {\n event: Event;\n }) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n const [isLoading, setIsLoading] = useState(false);\n const [activeMarketPlaceName, setActiveMarketPlaceName] = useState<\n `mkpEventInfos.${number}.eventIdOverride` | undefined\n >(undefined);\n\n const onSubmit = useCallback(\n (formValue: MarketplaceEventEditDialogForm) => {\n setIsLoading(true);\n\n tryInvokeApi(\n async () => {\n const inputs = formValue.mkpEventInfos.map(\n (x) =>\n ({\n ...x,\n viagogoEventId: event.viagId,\n eventMappingId: event.mappingId,\n }) as SellerEventMarketplaceEventInfo\n );\n\n const result = await new EventConfigClient(\n activeAccountWebClientConfig\n ).updateSellerEventMarketplaceEventInfos(inputs);\n\n if (result) {\n onClosed();\n }\n },\n (error) => {\n showErrorDialog(\n 'EventConfigClient.updateSellerEventMarketplaceEventInfos',\n error,\n {\n trackErrorData: formValue,\n }\n );\n },\n () => setIsLoading(false)\n );\n },\n [\n activeAccountWebClientConfig,\n event.mappingId,\n event.viagId,\n onClosed,\n showErrorDialog,\n ]\n );\n\n const mkpEventInfos = getValues().mkpEventInfos;\n\n const onSaveClick = useCallback(() => {\n clearErrors();\n\n handleSubmit(onSubmit)();\n }, [clearErrors, handleSubmit, onSubmit]);\n\n const stripTrailingSlash = (text: string) => {\n return text.endsWith('/') ? text.slice(0, -1) : text;\n };\n\n const isUrl = (str: string) => {\n try {\n new URL(str);\n return true;\n } catch (_) {\n return false;\n }\n };\n\n const handleEventOverrideChange =\n (i: number, mp: Marketplace) =>\n (e: React.ChangeEvent) => {\n if (!isUrl(e.target.value)) {\n return;\n }\n\n const sanitizedString = stripTrailingSlash(e.target.value.trim());\n let eventOverrideId = '';\n const urlComponents = sanitizedString.split('/');\n\n switch (mp) {\n case Marketplace.StubHub:\n case Marketplace.Ticketmaster: {\n const eventIdx = urlComponents.indexOf('event');\n if (eventIdx === -1) {\n return;\n }\n eventOverrideId = urlComponents[eventIdx + 1];\n break;\n }\n case Marketplace.SeatGeek: {\n const eventId = urlComponents[urlComponents.length - 1];\n eventOverrideId = eventId.split('#')[0];\n break;\n }\n case Marketplace.VividSeats: {\n const productionIdx = urlComponents.indexOf('production');\n if (productionIdx === -1) {\n return;\n }\n eventOverrideId = urlComponents[productionIdx + 1];\n break;\n }\n case Marketplace.Gametime: {\n const eventsIdx = urlComponents.indexOf('events');\n if (eventsIdx === -1) {\n return;\n }\n eventOverrideId = urlComponents[eventsIdx + 1];\n break;\n }\n default:\n // we haven't mapped the event ID extraction yet\n eventOverrideId = e.target.value;\n break;\n }\n\n e.target.value = eventOverrideId;\n setValue(`mkpEventInfos.${i}.eventIdOverride`, eventOverrideId, {\n shouldDirty: true,\n });\n };\n\n const isSearchingEvent = !!activeMarketPlaceName;\n\n const mainDialogProps: GenericDialogProps = {\n ...rest,\n header: ,\n footer: (\n <>\n {onClosed && (\n \n )}\n \n \n \n \n ),\n onCancel: onClosed,\n };\n\n const eventSearchDialogProps: GenericDialogProps = {\n isOpen: true,\n header: ,\n footer: (\n setActiveMarketPlaceName(undefined)}\n />\n ),\n };\n\n return (\n \n {isSearchingEvent ? (\n {\n const eventSearchResult = eventsSearchResults[0];\n if (eventSearchResult) {\n setValue(\n activeMarketPlaceName,\n eventSearchResult.event.viagVirtualId,\n {\n shouldDirty: true,\n }\n );\n setActiveMarketPlaceName(undefined);\n }\n }}\n />\n ) : (\n <>\n \n \n \n \n \n \n \n \n \n \n \n \n {mkpEventInfos.map((mp, i) => {\n return (\n \n \n \n \n \n \n \n handleEventOverrideChange(i, mp.marketplace),\n })}\n postfixDisplay={\n {\n setActiveMarketPlaceName(\n `mkpEventInfos.${i}.eventIdOverride`\n );\n }}\n >\n \n \n }\n />\n \n \n \n );\n })}\n \n \n {formState.isDirty && (\n \n }\n />\n \n )}\n \n )}\n \n );\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { PricingClient } from 'src/WebApiController';\n\n\ninterface UseEventMapConfigMetadataProps {\n viagogoEventId: number | null;\n}\n\nexport const useEventMapConfigMetadata = ({\n viagogoEventId,\n}: UseEventMapConfigMetadataProps) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const shouldQuery =\n viagogoEventId != null &&\n activeAccountWebClientConfig?.activeAccountId != null;\n\n const queryKey = ['PricingClient.GetEventMapConfigMetadata', viagogoEventId];\n\n const eventMapConfigQuery = useQuery({\n queryKey,\n queryFn: async () => {\n if (!shouldQuery) {\n return null;\n }\n\n return await new PricingClient(\n activeAccountWebClientConfig\n ).getEventMapConfigMetadata(viagogoEventId!);\n },\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n showErrorDialog('PricingClient.GetEventMapConfigMetadata', error, {\n trackErrorData: {\n viagogoEventId,\n },\n });\n },\n },\n });\n\n return {\n queryKey,\n eventMapConfigQuery,\n };\n};\n","import { UseQueryResult } from '@tanstack/react-query';\nimport { useMemo } from 'react';\nimport { useUnmount } from 'react-use';\nimport {\n Content,\n useContent,\n useFormattedContent,\n} from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport {\n FirstTimeFeature,\n useServerUserSetting,\n} from 'src/hooks/useUserSetting';\nimport { MapIcon } from 'src/svgs';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { VENUE_ZONE_CONFIG_TYPE_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport {\n EventMapConfigMetadata,\n Feature,\n UserSetting,\n VenueZoneConfigType,\n} from 'src/WebApiController';\n\nimport * as styles from './NewEventMapBanner.css';\n\nexport const NewEventMapBanner = ({\n openEventMapView,\n eventMapConfigQuery,\n}: {\n openEventMapView: () => void;\n eventMapConfigQuery: UseQueryResult;\n}) => {\n const hasEventMapRibbonYoloFeature = useUserHasFeature(\n Feature.EventMapRibbonYolo\n );\n const { value: firstTimeFeaturesViewed, setUserSetting } =\n useServerUserSetting({\n id: UserSetting.FirstTimeFeaturesViewed,\n });\n const configTypeContentId = useMemo(() => {\n if (!eventMapConfigQuery.data) {\n return VENUE_ZONE_CONFIG_TYPE_TO_CID[\n VenueZoneConfigType.SportsOrConcertsWith360\n ];\n }\n return VENUE_ZONE_CONFIG_TYPE_TO_CID[\n eventMapConfigQuery.data.selectedVenueMapConfigType ??\n eventMapConfigQuery.data.defaultVenueZoneConfigType\n ];\n }, [eventMapConfigQuery.data]);\n\n const configTypeString = useContent(configTypeContentId);\n const configTypeFormatted = useMemo(() => {\n if (!eventMapConfigQuery?.data) {\n return null;\n }\n\n if (\n eventMapConfigQuery.data.selectedVenueMapConfigType != null &&\n eventMapConfigQuery.data.selectedVenueMapConfigType !=\n VenueZoneConfigType.SportsOrConcertsWith360\n ) {\n return `${configTypeString}`;\n }\n\n return `${configTypeString}°`;\n }, [configTypeString, eventMapConfigQuery]);\n\n const defaultConfigType = useFormattedContent(\n FormatContentId.FirstTimeVenueEventSetup,\n configTypeFormatted ?? ''\n ) as string;\n\n const showBanner = useMemo(() => {\n if (\n hasEventMapRibbonYoloFeature &&\n firstTimeFeaturesViewed &&\n firstTimeFeaturesViewed.includes(FirstTimeFeature.EventMapBanner)\n ) {\n // already viewed\n return false;\n }\n // Wait for the event map config to be loaded\n if (eventMapConfigQuery.isLoading || eventMapConfigQuery.isError) {\n return false;\n }\n\n // There is not yet an event map config override\n return (\n eventMapConfigQuery.data &&\n eventMapConfigQuery.data.selectedOverrideId == null &&\n eventMapConfigQuery.data.selectedVenueMapConfigType == null\n );\n }, [\n eventMapConfigQuery.data,\n eventMapConfigQuery.isError,\n eventMapConfigQuery.isLoading,\n firstTimeFeaturesViewed,\n hasEventMapRibbonYoloFeature,\n ]);\n\n useUnmount(() => {\n if (showBanner && hasEventMapRibbonYoloFeature) {\n // mark viewed when banner presents\n setUserSetting(\n Array.from(\n new Set([\n ...(firstTimeFeaturesViewed ?? []),\n FirstTimeFeature.EventMapBanner,\n ])\n )\n );\n }\n });\n\n if (!showBanner) {\n return null;\n }\n\n return (\n
    \n \n \n \n {defaultConfigType}\n \n\n \n \n
    \n );\n};\n","import { useCallback } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { MultiSectionsDisplay } from 'src/components/Events/VenueMap';\nimport { EventVenueMap } from 'src/components/Events/VenueMap/EventVenueMap';\nimport { VenueMapContentProps } from 'src/components/Events/VenueMap/VenueMapContent';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Button, Stack } from 'src/core/ui';\nimport { ChangeZoneMapSectionGroupDialog } from 'src/dialogs/ChangeZoneMapSectionGroupDialog';\nimport { useAutoCompMapSectionHandler } from 'src/hooks/useAutoCompMapSectionHandler';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SectionSectionGroup } from 'src/WebApiController';\n\nimport { EventVenueMapFormType } from '../EventVenueMapModal';\n\nexport const EventVenueMapContent = ({\n createGetColor,\n}: {\n createGetColor: (\n sectionSectionGroupLookup?: {\n [key: string]: SectionSectionGroup;\n } | null\n ) => NonNullable;\n}) => {\n const changeSectionGroupDialog = useBasicDialog();\n const onLaunchingSingleSectionDialog = useCallback(\n () => changeSectionGroupDialog.launchDialog(),\n [changeSectionGroupDialog]\n );\n\n const {\n selectedSectionIds,\n selectedSectionData,\n onSectionClicked,\n onResetSections,\n onToggleMirrors,\n onSelectedSectionsChange,\n } = useAutoCompMapSectionHandler(onLaunchingSingleSectionDialog);\n\n const { watch, setValue } = useFormContext();\n const sectionSectionGroupLookup = watch('sectionSectionGroupLookup');\n\n const onSectionZoneChanged = useCallback(\n (newSectionSectionGroup: SectionSectionGroup, sectionIds: number[]) => {\n const sectionGroupIdMap = sectionSectionGroupLookup;\n\n const newSectionGroupIdMap = {\n ...sectionGroupIdMap,\n ...sectionIds.reduce(\n (acc: { [key: string]: SectionSectionGroup }, sectionId) => {\n acc[sectionId] = newSectionSectionGroup;\n return acc;\n },\n {}\n ),\n };\n\n setValue('sectionSectionGroupLookup', newSectionGroupIdMap);\n\n changeSectionGroupDialog.closeDialog();\n },\n [changeSectionGroupDialog, setValue, sectionSectionGroupLookup]\n );\n\n return (\n <>\n \n \n changeSectionGroupDialog.launchDialog()}\n >\n \n \n \n )\n }\n isRelocatedStaticInfo={true}\n />\n \n \n );\n};\n","import * as Collapsible from '@radix-ui/react-collapsible';\nimport clsx from 'clsx';\nimport React, { useState } from 'react';\nimport {\n ComponentProps,\n ComponentPropsWithoutRef,\n ComponentType,\n forwardRef,\n ReactNode,\n} from 'react';\nimport { vars } from 'src/core/themes';\nimport { mergeProps, styledComponent } from 'src/core/utils';\nimport { IconsFill, MinusIcon, PlusIcon } from 'src/svgs/Viagogo';\n\nimport * as styles from './CollapsibleSetting.css';\n\nexport type PosCollapsibleProps = Pick<\n ComponentProps,\n 'open' | 'onOpenChange'\n> & {\n trigger?: ReactNode;\n children?: ReactNode;\n};\n\nexport function PosCollapsible({\n open,\n onOpenChange,\n trigger,\n children,\n}: PosCollapsibleProps) {\n return (\n \n {trigger}\n {children}\n \n );\n}\n\nexport const Root = styledComponent(Collapsible.Root, styles.root);\n\nexport const Trigger = forwardRef<\n HTMLButtonElement,\n ComponentPropsWithoutRef & {\n ExpandIcon?: ComponentType<{ size: string; fill: IconsFill }>;\n FoldIcon?: ComponentType<{ size: string; fill: IconsFill }>;\n iconSize?: string;\n }\n>(function Content({ children, ...props }, ref) {\n return (\n \n
    \n
    {children}
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n );\n});\n\nexport const Content = styledComponent(Collapsible.Content, styles.content);\n\ntype CollapsibleSettting = {\n title: React.ReactNode;\n altTitle?: React.ReactNode;\n content: React.ReactNode;\n defaultToOpen?: boolean;\n};\n\nexport const CollapsibleSettting = ({\n title,\n altTitle,\n content,\n defaultToOpen = false,\n}: CollapsibleSettting) => {\n const [open, setOpen] = useState(defaultToOpen);\n return (\n setOpen(!open)}>\n {altTitle && open ? (\n {altTitle}\n ) : (\n {title}\n )}\n {content}\n \n );\n};\n","import { Stack } from 'src/core/ui';\n\nimport * as styles from './EventMapDetailSimpleActionGroup.css';\n\nexport type EventMapDetailSimpleActionGroupProps = {\n header: string;\n subHeader?: string | undefined;\n action: React.ReactNode;\n};\n\nexport const EventMapDetailSimpleActionGroup = ({\n header,\n subHeader,\n action,\n}: EventMapDetailSimpleActionGroupProps) => {\n return (\n \n \n {header}\n {subHeader ? (\n {subHeader}\n ) : undefined}\n \n\n
    {action}
    \n \n );\n};\n","import { UseMutationResult, UseQueryResult } from '@tanstack/react-query';\nimport { isEqual } from 'lodash-es';\nimport { useCallback, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { ErrorTypes } from 'src/contexts/ErrorBoundaryContext';\nimport { Button, Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getCompleteEventConfigScoreOverrides } from 'src/utils/seatScoreUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { PricingClient } from 'src/WebApiController';\nimport {\n AutoPricingInputs,\n Event,\n VenueMapZoneConfigInfo,\n VenueZoneConfigOverride,\n VenueZoneConfigType,\n} from 'src/WebApiController';\n\nimport { useVenueSectionRow } from '../../Sections/VenueZoneMap/hooks/useVenueSectionRow';\nimport { EventVenueMapFormType } from '../EventVenueMapModal';\nimport * as styles from './EventVenueMapDetailsPanelFooter.css';\n\nexport const EventVenueMapDetailsPanelFooter = ({\n event,\n selectedOverrideId,\n setSelectedOverrideId,\n setSelectedConfigType,\n pricingSettingsQuery,\n venueZoneMapConfigInfoQuery,\n venueZoneMapConfigOverrideInfoQuery,\n setVenueZoneConfigTypeOverrideMutation,\n}: {\n event: Event;\n selectedOverrideId: number | null;\n setSelectedOverrideId: React.Dispatch>;\n setSelectedConfigType: React.Dispatch<\n React.SetStateAction\n >;\n pricingSettingsQuery: UseQueryResult;\n venueZoneMapConfigInfoQuery: UseQueryResult<\n VenueMapZoneConfigInfo | null,\n Error\n >;\n venueZoneMapConfigOverrideInfoQuery: UseQueryResult<\n {\n [key: string]: VenueZoneConfigOverride;\n } | null,\n Error\n >;\n setVenueZoneConfigTypeOverrideMutation: UseMutationResult<\n void,\n ErrorTypes,\n {\n eventId?: number | null;\n venueZoneOverrideId?: number | null;\n venueZoneConfigType?: VenueZoneConfigType | null;\n setMapAsDefault?: boolean | null;\n },\n unknown\n >;\n}) => {\n const { reset, setValue, getValues, formState } =\n useFormContext();\n\n const [isLoading, setIsLoading] = useState(false);\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const { mapConfigOverridesQuery, hasScaledSeatScoreFeature, venueMapInfo } =\n useVenueSectionRow({\n event,\n pricingSettingsQuery,\n });\n\n const hasChanges = useCallback(\n (eventForm: EventVenueMapFormType) => {\n if (!formState.defaultValues?.sectionSectionGroupLookup) {\n return false;\n }\n\n return (\n !isEqual(\n formState.defaultValues?.sectionSectionGroupLookup,\n eventForm.sectionSectionGroupLookup\n ) ||\n formState.defaultValues?.name != eventForm.name ||\n formState.defaultValues?.setMapAsDefault != eventForm.setMapAsDefault\n );\n },\n [formState.defaultValues]\n );\n\n const hasVenueRowChanges = useCallback(\n (eventForm: EventVenueMapFormType) => {\n const defaultValues = formState.defaultValues?.eventScoreOverride;\n if (!defaultValues) {\n return false;\n }\n\n return !isEqual(defaultValues, eventForm.eventScoreOverride);\n },\n [formState.defaultValues]\n );\n\n const onSubmit = useCallback(\n async (eventForm: EventVenueMapFormType, saveAsNewMap: boolean) => {\n tryInvokeApi(\n async () => {\n const client = new PricingClient(activeAccountWebClientConfig);\n setIsLoading(true);\n\n if (event?.viagId && hasChanges(eventForm)) {\n const newId = await client.upsertVenueZoneSectionGroupOverrides({\n viagogoEventId: event.viagId,\n venueZoneOverrideId: selectedOverrideId,\n name: eventForm.name ?? 'Default',\n sectionSectionGroupsJson: JSON.stringify({\n sectionSectionGroupLookup: eventForm.sectionSectionGroupLookup,\n }),\n saveAsNewMap: saveAsNewMap,\n });\n\n await venueZoneMapConfigInfoQuery.refetch();\n await venueZoneMapConfigOverrideInfoQuery.refetch();\n await pricingSettingsQuery.refetch();\n\n setVenueZoneConfigTypeOverrideMutation.mutate({\n eventId: event!.viagId,\n venueZoneOverrideId: newId,\n venueZoneConfigType: null,\n setMapAsDefault: eventForm.setMapAsDefault,\n });\n\n setSelectedOverrideId(newId);\n setSelectedConfigType(null);\n }\n\n if (\n event?.viagId &&\n eventForm.eventScoreOverride &&\n hasVenueRowChanges(eventForm)\n ) {\n const newId = await client.upsertEventSeatMapScoreOverride({\n ...eventForm.eventScoreOverride,\n viagogoEventId: event.viagId,\n scoreOverrides: getCompleteEventConfigScoreOverrides(\n venueMapInfo?.sectionScores,\n eventForm.eventScoreOverride.scoreOverrides,\n false,\n hasScaledSeatScoreFeature\n )!,\n });\n\n setValue('eventScoreOverride.id', newId);\n\n await mapConfigOverridesQuery.refetch();\n\n await client.setEventSeatMapScoreOverride(\n event.viagId,\n newId,\n null\n );\n }\n },\n (error) => {\n showErrorDialog(\n 'PricingClient.UpsertVenueZoneSectionGroupOverrides',\n error,\n {\n trackErrorData: eventForm,\n }\n );\n },\n async () => {\n setIsLoading(false);\n }\n );\n },\n [\n activeAccountWebClientConfig,\n event,\n hasChanges,\n hasScaledSeatScoreFeature,\n hasVenueRowChanges,\n mapConfigOverridesQuery,\n pricingSettingsQuery,\n selectedOverrideId,\n setSelectedConfigType,\n setSelectedOverrideId,\n setValue,\n setVenueZoneConfigTypeOverrideMutation,\n showErrorDialog,\n venueMapInfo?.sectionScores,\n venueZoneMapConfigInfoQuery,\n venueZoneMapConfigOverrideInfoQuery,\n ]\n );\n\n const onSubmitHandler = useCallback(\n (saveAsNewMap: boolean) => {\n if (!hasChanges(getValues())) {\n return;\n }\n\n onSubmit(getValues(), saveAsNewMap);\n },\n [getValues, hasChanges, onSubmit]\n );\n\n return (\n
    \n \n {\n reset();\n }}\n >\n
    \n {' '}\n \n \n \n s\n
    \n \n\n {selectedOverrideId != null ? (\n \n {\n onSubmitHandler(true);\n }}\n >\n \n \n {\n onSubmitHandler(false);\n }}\n >\n \n \n \n ) : (\n {\n onSubmitHandler(true);\n }}\n >\n \n \n )}\n
    \n
    \n );\n};\n","import { UseMutationResult, UseQueryResult } from '@tanstack/react-query';\nimport { useCallback } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { EventVenueMap } from 'src/components/Events/VenueMap/EventVenueMap';\nimport { VenueMapContentProps } from 'src/components/Events/VenueMap/VenueMapContent';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ErrorTypes } from 'src/contexts/ErrorBoundaryContext';\nimport { useAutoCompMapSectionHandler } from 'src/hooks/useAutoCompMapSectionHandler';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n Event,\n SectionSectionGroup,\n VenueMapZoneConfigInfo,\n VenueZoneConfigOverride,\n VenueZoneConfigType,\n} from 'src/WebApiController';\n\nimport { SeatMapCard } from '../../Sections/SeatMapCard';\nimport { EventVenueMapFormType } from '../EventVenueMapModal';\nimport * as styles from './EventVenueMapSelector.css';\n\nexport const EventVenueMapSelector = ({\n event,\n selectedOverrideId,\n setSelectedOverrideId,\n selectedConfigType,\n setSelectedConfigType,\n createGetColor,\n venueZoneMapConfigInfoQuery,\n venueZoneMapConfigOverrideInfoQuery,\n setVenueZoneConfigTypeOverrideMutation,\n}: {\n event: Event;\n selectedOverrideId: number | null;\n setSelectedOverrideId: React.Dispatch>;\n selectedConfigType: VenueZoneConfigType | null;\n setSelectedConfigType: React.Dispatch<\n React.SetStateAction\n >;\n createGetColor: (\n sectionSectionGroupLookup?: {\n [key: string]: SectionSectionGroup;\n } | null\n ) => NonNullable;\n venueZoneMapConfigInfoQuery: UseQueryResult<\n VenueMapZoneConfigInfo | null,\n Error\n >;\n venueZoneMapConfigOverrideInfoQuery: UseQueryResult<\n {\n [key: string]: VenueZoneConfigOverride;\n } | null,\n Error\n >;\n setVenueZoneConfigTypeOverrideMutation: UseMutationResult<\n void,\n ErrorTypes,\n {\n eventId?: number | null;\n venueZoneOverrideId?: number | null;\n venueZoneConfigType?: VenueZoneConfigType | null;\n setMapAsDefault?: boolean | null;\n },\n unknown\n >;\n}) => {\n const changeSectionGroupDialog = useBasicDialog();\n const onLaunchingSingleSectionDialog = useCallback(\n () => changeSectionGroupDialog.launchDialog(),\n [changeSectionGroupDialog]\n );\n\n const { watch } = useFormContext();\n const setMapAsDefault = watch('setMapAsDefault');\n\n const { onResetSections } = useAutoCompMapSectionHandler(\n onLaunchingSingleSectionDialog\n );\n\n const onVenueZoneMapClick = useCallback(\n (\n venueZoneOverrideId: number | null,\n venueZoneConfigType: VenueZoneConfigType | null\n ) => {\n setVenueZoneConfigTypeOverrideMutation.mutate({\n eventId: event!.viagId,\n venueZoneOverrideId,\n venueZoneConfigType,\n setMapAsDefault: setMapAsDefault ?? undefined,\n });\n setSelectedOverrideId(venueZoneOverrideId);\n setSelectedConfigType(venueZoneConfigType);\n onResetSections();\n },\n [\n setVenueZoneConfigTypeOverrideMutation,\n event,\n setMapAsDefault,\n setSelectedOverrideId,\n setSelectedConfigType,\n onResetSections,\n ]\n );\n\n const disabledButtons = setVenueZoneConfigTypeOverrideMutation.isPending;\n\n return (\n
    \n
    \n {\n onVenueZoneMapClick(null, VenueZoneConfigType.Amphitheater);\n }}\n footer={}\n >\n \n \n
    \n\n
    \n {\n onVenueZoneMapClick(\n null,\n VenueZoneConfigType.ConcertsSectionsBehindStage\n );\n }}\n footer={}\n >\n \n \n
    \n\n
    \n {\n onVenueZoneMapClick(\n null,\n VenueZoneConfigType.SportsOrConcertsWith360\n );\n }}\n footer={}\n >\n \n \n
    \n\n {Object.entries(venueZoneMapConfigOverrideInfoQuery.data ?? {}).map(\n ([k, v], idx) => {\n return (\n
    \n {\n onVenueZoneMapClick(Number.parseInt(k), null);\n }}\n footer={v.name}\n >\n \n \n
    \n );\n }\n )}\n
    \n );\n};\n","import { closestCenter, DndContext, DragEndEvent } from '@dnd-kit/core';\nimport {\n arrayMove,\n SortableContext,\n verticalListSortingStrategy,\n} from '@dnd-kit/sortable';\nimport { useCallback, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { getContent, useContentContext } from 'src/contexts/ContentContext';\nimport { Stack } from 'src/core/ui';\nimport { VENUE_ZONE_SECTION_GROUP_AREA_TYPE_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { SectionSectionGroup } from 'src/WebApiController';\n\nimport { SortableZoneAreaItem } from '../../Sections/VenueZoneMap/components/SortableZoneAreaItem';\nimport { EventVenueMapFormType } from '../EventVenueMapModal';\nimport * as styles from './VenueZoneSectionGroupDraggableList.css';\n\nexport const VenueZoneSectionGroupDraggableList = () => {\n const contentContext = useContentContext();\n const { setValue, watch } = useFormContext();\n\n const sectionSectionGroupLookup = watch('sectionSectionGroupLookup');\n const customSectionGroups = watch('customSectionGroups');\n\n const sectionGroups = Object.values(sectionSectionGroupLookup).reduce<{\n [key: string]: SectionSectionGroup;\n }>((acc, v) => {\n let sectionGroupName = `${v.ticketClassName}: ${v.sectionGroupAreaName}`;\n if (v.sectionGroupAreaType != null) {\n const sectionGroupAreaContentId =\n VENUE_ZONE_SECTION_GROUP_AREA_TYPE_TO_CID[v.sectionGroupAreaType];\n\n sectionGroupName = `${v.ticketClassName}: ${getContent(\n sectionGroupAreaContentId,\n contentContext\n )}`;\n }\n acc[sectionGroupName] = v;\n\n return acc;\n }, {});\n\n const sortabledSectionGroups = useMemo(() => {\n // Sort the sectionGroups by sectionGroupRank and areaRank\n const sortedSectionGroups = Object.entries(sectionGroups).map(\n ([key, value]) => ({\n id: crypto.randomUUID(),\n key,\n ...value,\n })\n );\n\n // Map over customSectionGroups and add unique IDs\n const customGroupsWithId = customSectionGroups.map((csg) => ({\n id: crypto.randomUUID(),\n key: `${csg.ticketClassName}: ${csg.sectionGroupAreaName}`,\n ...csg,\n }));\n\n // Combine the sorted section groups and custom section groups\n return sortedSectionGroups\n .concat(customGroupsWithId)\n .toSorted(\n (a, b) =>\n a.sectionGroupRank - b.sectionGroupRank || a.areaRank - b.areaRank\n );\n }, [sectionGroups, customSectionGroups]);\n\n const handleDragEnd = useCallback(\n (event: DragEndEvent) => {\n const { active, over } = event;\n\n if (over != null && active.id != over.id) {\n const oldIndex = sortabledSectionGroups.findIndex(\n (ro) => ro.id === active.id\n );\n\n const newIndex = sortabledSectionGroups.findIndex(\n (ro) => ro.id === over.id\n );\n\n const shiftedRankOverrides = arrayMove(\n sortabledSectionGroups,\n oldIndex,\n newIndex\n );\n\n // Update ranks based on new positions\n const updatedRankOverrides = shiftedRankOverrides\n .map((item, index) => ({\n ...item,\n sectionGroupRank: index,\n }))\n .reduce<{\n [key: string]: number;\n }>((acc, v) => {\n const ssgId = `${v.ticketClassName ?? ''}:${\n v.ticketClassId ?? ''\n }:${v.sectionGroupAreaName ?? ''}:${v.sectionGroupAreaType ?? ''}`;\n\n acc[ssgId] = v.sectionGroupRank;\n return acc;\n }, {});\n\n // Update the original sectionSectionGroupLookup with the new ranks\n const newSectionSectionGroupLookup = Object.entries(\n sectionSectionGroupLookup\n ).reduce<{\n [key: string]: SectionSectionGroup;\n }>((acc, [sectId, ssg]) => {\n const ssgId = `${ssg.ticketClassName ?? ''}:${\n ssg.ticketClassId ?? ''\n }:${ssg.sectionGroupAreaName ?? ''}:${\n ssg.sectionGroupAreaType ?? ''\n }`;\n\n const sgRank = updatedRankOverrides[ssgId] ?? 1;\n ssg.sectionGroupRank = sgRank;\n\n acc[sectId] = ssg;\n return acc;\n }, {});\n\n setValue('sectionSectionGroupLookup', newSectionSectionGroupLookup);\n\n const newCustomSectionGroups = customSectionGroups.reduce<\n SectionSectionGroup[]\n >((acc, ssg) => {\n const ssgId = `${ssg.ticketClassName ?? ''}:${\n ssg.ticketClassId ?? ''\n }:${ssg.sectionGroupAreaName ?? ''}:${\n ssg.sectionGroupAreaType ?? ''\n }`;\n\n const sgRank = updatedRankOverrides[ssgId] ?? 1;\n ssg.sectionGroupRank = sgRank;\n\n acc.push(ssg);\n return acc;\n }, []);\n\n setValue('customSectionGroups', newCustomSectionGroups);\n }\n },\n [\n customSectionGroups,\n sectionSectionGroupLookup,\n setValue,\n sortabledSectionGroups,\n ]\n );\n\n return (\n \n \n \n {sortabledSectionGroups.map((ssg) => (\n \n ))}\n \n \n \n );\n};\n","import { useFormContext } from 'react-hook-form';\nimport { getContent, useContentContext } from 'src/contexts/ContentContext';\nimport { VENUE_ZONE_SECTION_GROUP_AREA_TYPE_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { SectionSectionGroup } from 'src/WebApiController';\n\nimport { EventVenueMapFormType } from '../EventVenueMapModal';\nimport * as styles from './VenueZoneSectionGroup.css';\n\nexport const VenueZoneSectionGroupList = () => {\n const contentContext = useContentContext();\n const { watch } = useFormContext();\n\n const sectionSectionGroupLookup = watch('sectionSectionGroupLookup');\n const customSectionGroups = watch('customSectionGroups');\n\n const sectionGroups = Object.values(sectionSectionGroupLookup).reduce<{\n [key: string]: SectionSectionGroup;\n }>((acc, v) => {\n let sectionGroupName = `${v.ticketClassName}: ${v.sectionGroupAreaName}`;\n if (v.sectionGroupAreaType != null) {\n const sectionGroupAreaContentId =\n VENUE_ZONE_SECTION_GROUP_AREA_TYPE_TO_CID[v.sectionGroupAreaType];\n\n sectionGroupName = `${v.ticketClassName}: ${getContent(\n sectionGroupAreaContentId,\n contentContext\n )}`;\n }\n acc[sectionGroupName] = v;\n\n return acc;\n }, {});\n\n return (\n
    \n {Object.entries(sectionGroups)\n .toSorted(\n ([, a], [, b]) =>\n a.sectionGroupRank - b.sectionGroupRank || a.areaRank - b.areaRank\n )\n .map(([key, value]) => (\n
    \n \n {key}\n
    \n ))}\n\n {customSectionGroups.map((ssg) => (\n \n \n {`${ssg.ticketClassName}: ${ssg.sectionGroupAreaName}`}\n
    \n ))}\n \n );\n};\n","import { useCallback, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { Button, Stack, Switch } from 'src/core/ui';\nimport { AddSectionGroupDialog } from 'src/dialogs/AddSectionGroupDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SectionSectionGroup } from 'src/WebApiController';\n\nimport { getRandomColor } from '../../utils/colorUtils';\nimport { EventVenueMapFormType } from '../EventVenueMapModal';\nimport * as styles from './SectionGroupPanel.css';\nimport { VenueZoneSectionGroupDraggableList } from './VenueZoneSectionGroupDraggableList';\nimport { VenueZoneSectionGroupList } from './VenueZoneSectionGroupList';\n\nexport const SectionGroupPanel = () => {\n const { watch, setValue, reset } = useFormContext();\n\n const [useCustomRank, setUseCustomRank] = useState(false);\n\n const addSectionGroupDialog = useBasicDialog();\n\n const customSectionGroups = watch('customSectionGroups');\n const name = watch('name');\n\n const onAddSectionGroup = useCallback(\n (ticketClassName: string, sectionGroupName: string) => {\n const newCustomSectionGroup = {\n sectId: 0,\n areaRank: 1,\n sectionGroupRank: 1,\n ticketClassName: ticketClassName,\n sectionGroupAreaName: sectionGroupName,\n sectionGroupAreaType: null,\n ticketClassId: null,\n sectionGroupColor: getRandomColor(customSectionGroups.length),\n } as SectionSectionGroup;\n\n const newCustomSectionGroups = [\n ...(customSectionGroups || []),\n newCustomSectionGroup,\n ];\n setValue('customSectionGroups', newCustomSectionGroups);\n\n addSectionGroupDialog.closeDialog();\n },\n [addSectionGroupDialog, customSectionGroups, setValue]\n );\n\n return (\n
    \n \n \n \n \n
    \n {\n setValue('name', e.target.value);\n }}\n value={name}\n />\n
    \n
    \n \n \n \n \n \n \n \n \n e.stopPropagation()}\n onCheckedChange={(isChecked) => {\n if (!isChecked) {\n reset();\n }\n\n setUseCustomRank(isChecked);\n }}\n />\n \n \n {useCustomRank ? (\n \n ) : (\n \n )}\n\n
    \n \n
    \n\n \n
    \n );\n};\n","import { UseMutationResult, UseQueryResult } from '@tanstack/react-query';\nimport { useContext } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { VenueMapContentProps } from 'src/components/Events/VenueMap/VenueMapContent';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { ErrorTypes } from 'src/contexts/ErrorBoundaryContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { CollapsibleSettting } from 'src/core/ui/CollapsibleSetting/CollapsibleSetting';\nimport { SectionRowTableDialog } from 'src/dialogs/SectionRowTableDialog/SectionRowTableDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { Summary } from 'src/modals/common/Summary';\nimport { CrossIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n AutoPricingInputs,\n Event,\n SectionSectionGroup,\n VenueMapZoneConfigInfo,\n VenueZoneConfigOverride,\n VenueZoneConfigType,\n} from 'src/WebApiController';\n\nimport { useVenueSectionRow } from '../../Sections/VenueZoneMap/hooks/useVenueSectionRow';\nimport { EventVenueMapFormType } from '../EventVenueMapModal';\nimport { EventMapDetailSimpleActionGroup } from './EventMapDetailSimpleActionGroup';\nimport * as styles from './EventVenueMapDetailsPanel.css';\nimport { EventVenueMapDetailsPanelFooter } from './EventVenueMapDetailsPanelFooter';\nimport { EventVenueMapSelector } from './EventVenueMapSelector';\nimport { SectionGroupPanel } from './SectionGroupPanel';\n\nexport const EventVenueMapDetailsPanel = ({\n event,\n selectedOverrideId,\n setSelectedOverrideId,\n selectedConfigType,\n setSelectedConfigType,\n createGetColor,\n pricingSettingsQuery,\n venueZoneMapConfigInfoQuery,\n venueZoneMapConfigOverrideInfoQuery,\n setVenueZoneConfigTypeOverrideMutation,\n}: {\n event: Event;\n selectedOverrideId: number | null;\n setSelectedOverrideId: React.Dispatch>;\n selectedConfigType: VenueZoneConfigType | null;\n setSelectedConfigType: React.Dispatch<\n React.SetStateAction\n >;\n createGetColor: (\n sectionSectionGroupLookup?: {\n [key: string]: SectionSectionGroup;\n } | null\n ) => NonNullable;\n pricingSettingsQuery: UseQueryResult;\n venueZoneMapConfigInfoQuery: UseQueryResult<\n VenueMapZoneConfigInfo | null,\n Error\n >;\n venueZoneMapConfigOverrideInfoQuery: UseQueryResult<\n {\n [key: string]: VenueZoneConfigOverride;\n } | null,\n Error\n >;\n setVenueZoneConfigTypeOverrideMutation: UseMutationResult<\n void,\n ErrorTypes,\n {\n eventId?: number | null;\n venueZoneOverrideId?: number | null;\n venueZoneConfigType?: VenueZoneConfigType | null;\n setMapAsDefault?: boolean | null;\n },\n unknown\n >;\n}) => {\n const eventMapText = useContent(ContentId.EventMap);\n const zoneMapText = useContent(ContentId.ZoneMap);\n const venueRowDataText = useContent(ContentId.VenueRowData);\n const venueRowDataDescText = useContent(ContentId.RawVenueCatData);\n const setAsDefaultText = useContent(ContentId.SetMapAsDefault);\n const setAsDefaultDescText = useContent(ContentId.SimilarEventsDefaults);\n\n const sectionRowDialog = useBasicDialog();\n\n const { scoreOverrides, onSectionRowChange, venueMapInfo } =\n useVenueSectionRow({\n event,\n pricingSettingsQuery,\n });\n\n const { closeModal } = useContext(ModalContext);\n\n const { watch, setValue } = useFormContext();\n const setMapAsDefault = watch('setMapAsDefault');\n\n return (\n <>\n \n \n \n \n \n \n\n {\n closeModal();\n }}\n />\n \n
    \n \n
    \n \n {eventMapText}: {zoneMapText}\n \n }\n altTitle={\n {eventMapText}\n }\n content={\n \n }\n />\n\n
    \n\n \n\n
    \n\n \n \n \n }\n />\n\n
    \n\n {\n const isChecked = !setMapAsDefault;\n setValue('setMapAsDefault', isChecked);\n }}\n />\n }\n />\n \n \n \n \n \n );\n};\n","import { useMutation, UseQueryResult } from '@tanstack/react-query';\nimport { useEffect, useState } from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport {\n EventMapContextProvider,\n useEventMapContext,\n} from 'src/contexts/EventMapContext';\nimport { useGetVenueZoneMapConfigInfo } from 'src/contexts/EventMapContext/useGetVenueZoneMapConfigInfo';\nimport { useGetVenueZoneMapInfoOverrides } from 'src/contexts/EventMapContext/useGetVenueZoneMapConfigInfoOverrides';\nimport { useVenueZoneMapIntegration } from 'src/contexts/EventMapContext/useVenueZoneMapIntegration';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { useGetEventAutoPricingSettings } from 'src/hooks/useGetEventAutoPricingSettings';\nimport {\n AutoPricingInputs,\n Event,\n EventConfigScoreOverride,\n PricingClient,\n SectionSectionGroup,\n VenueMapZoneConfigInfo,\n VenueZoneConfigOverride,\n VenueZoneConfigType,\n} from 'src/WebApiController';\n\nimport { createGetColor } from '../utils/colorUtils';\nimport { EventVenueMapContent } from './components/EventVenueMapContent';\nimport { EventVenueMapDetailsPanel } from './components/EventVenueMapDetailsPanel';\nimport * as styles from './EventVenueMapModal.css';\n\nexport type EventVenueMapFormType = {\n sectionSectionGroupLookup: { [key: string]: SectionSectionGroup };\n customSectionGroups: SectionSectionGroup[];\n eventScoreOverride?: EventConfigScoreOverride | null;\n customRank: boolean;\n setMapAsDefault: boolean;\n name: string;\n};\n\nexport const EventVenueMapModal = ({ event }: { event: Event }) => {\n const { mapConfigOverridesQuery, isMapLoading } = useEventMapContext();\n\n const { pricingSettingsQuery } = useGetEventAutoPricingSettings(\n event!,\n false\n );\n\n const venueZoneMapConfigInfoQuery = useGetVenueZoneMapConfigInfo(\n event!.viagId,\n event!.venueCfgId\n );\n\n const venueZoneMapConfigOverrideInfoQuery = useGetVenueZoneMapInfoOverrides(\n event!.viagId,\n event!.venueCfgId\n );\n\n const methods = useForm({\n defaultValues: {\n sectionSectionGroupLookup: {},\n customSectionGroups: [],\n eventScoreOverride: null,\n customRank: false,\n setMapAsDefault: false,\n name: undefined,\n },\n });\n\n const venueZoneConfigs = useVenueZoneMapIntegration(event ?? null);\n\n useEffect(() => {\n if (venueZoneConfigs?.sectionSectionGroupLookup) {\n methods.reset({\n sectionSectionGroupLookup: venueZoneConfigs.sectionSectionGroupLookup,\n customSectionGroups: [],\n eventScoreOverride: null,\n customRank: false,\n setMapAsDefault: false,\n name: venueZoneConfigs?.name,\n });\n }\n }, [methods, methods.reset, venueZoneConfigs]);\n\n if (\n mapConfigOverridesQuery.isLoading ||\n isMapLoading ||\n venueZoneMapConfigInfoQuery.isLoading ||\n venueZoneMapConfigOverrideInfoQuery.isLoading ||\n pricingSettingsQuery.isLoading\n ) {\n return ;\n }\n\n return (\n \n \n \n \n \n );\n};\n\nexport const EventVenueMapBody = ({\n event,\n pricingSettingsQuery,\n venueZoneMapConfigInfoQuery,\n venueZoneMapConfigOverrideInfoQuery,\n}: {\n event: Event;\n pricingSettingsQuery: UseQueryResult;\n venueZoneMapConfigInfoQuery: UseQueryResult<\n VenueMapZoneConfigInfo | null,\n Error\n >;\n venueZoneMapConfigOverrideInfoQuery: UseQueryResult<\n {\n [key: string]: VenueZoneConfigOverride;\n } | null,\n Error\n >;\n}) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const [selectedConfigType, setSelectedConfigType] =\n useState(\n pricingSettingsQuery.data?.venueZoneConfigType ??\n venueZoneMapConfigInfoQuery?.data?.defaultVenueZoneConfigType ??\n null\n );\n\n const [selectedOverrideId, setSelectedOverrideId] = useState(\n pricingSettingsQuery.data?.venueZoneOverrideId ?? null\n );\n const setVenueZoneConfigTypeOverrideMutation = useMutation({\n mutationFn: (request: {\n eventId?: number | null;\n venueZoneOverrideId?: number | null;\n venueZoneConfigType?: VenueZoneConfigType | null;\n setMapAsDefault?: boolean | null;\n }) => {\n if (request.eventId) {\n return new PricingClient(\n activeAccountWebClientConfig\n ).setVenueZoneSelectedConfigType(\n request.eventId,\n request.venueZoneOverrideId,\n request.venueZoneConfigType,\n request.setMapAsDefault\n );\n }\n\n return Promise.resolve();\n },\n onError: (err: ErrorTypes, request) => {\n showErrorDialog('PricingClient.setVenueZoneSelectedConfigType', err, {\n trackErrorData: request,\n });\n },\n onSettled: () => {\n pricingSettingsQuery.refetch();\n },\n });\n\n if (!event) {\n return null;\n }\n\n return (\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n );\n};\n","import { UseQueryResult } from '@tanstack/react-query';\nimport clsx from 'clsx';\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { createPortal } from 'react-dom';\nimport { EventVenueMap } from 'src/components/Events/VenueMap/EventVenueMap';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useSiteTheme } from 'src/contexts/SiteTheme/SiteThemeContext';\nimport { vars } from 'src/core/themes';\nimport { hideMobile } from 'src/core/themes/shared.css';\nimport { Button, Stack } from 'src/core/ui';\nimport { MapIcon } from 'src/svgs';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { VENUE_ZONE_CONFIG_TYPE_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport {\n EventMapConfigMetadata,\n VenueZoneConfigType,\n} from 'src/WebApiController';\n\nimport { createGetColor } from '../utils/colorUtils';\nimport * as styles from './EventVenueMapPopup.css';\n\nexport const EventVenueMapPopup = ({\n onClick,\n eventMapConfigQuery,\n inCondensedView = false,\n iconOnly = false,\n}: {\n onClick: () => void;\n eventMapConfigQuery: UseQueryResult;\n inCondensedView?: boolean;\n iconOnly?: boolean;\n}) => {\n const buttonRef = useRef(null);\n const [isHovered, setIsHovered] = useState(false);\n const [isExiting, setIsExiting] = useState(false);\n const [popupPosition, setPopupPosition] = useState<{\n top: number;\n left: number;\n } | null>(null);\n\n const { isDarkMode } = useSiteTheme();\n\n const updatePosition = useCallback(() => {\n if (buttonRef.current) {\n const rect = buttonRef.current.getBoundingClientRect();\n setPopupPosition({\n top: rect.bottom + window.scrollY + 8,\n left: rect.left + rect.width / 2 - 250 / 2 + window.scrollX,\n });\n }\n }, []);\n\n useEffect(() => {\n if (isHovered) {\n window.addEventListener('scroll', updatePosition);\n window.addEventListener('resize', updatePosition);\n\n updatePosition();\n }\n return () => {\n window.removeEventListener('scroll', updatePosition);\n window.removeEventListener('resize', updatePosition);\n };\n }, [isHovered, updatePosition]);\n\n const selectedConfigType = useMemo(() => {\n if (!eventMapConfigQuery?.data) {\n return VenueZoneConfigType.SportsOrConcertsWith360;\n }\n\n return (\n eventMapConfigQuery.data.selectedVenueMapConfigType ??\n eventMapConfigQuery.data.defaultVenueZoneConfigType\n );\n }, [eventMapConfigQuery.data]);\n\n const configTypeContentId = useMemo(() => {\n return VENUE_ZONE_CONFIG_TYPE_TO_CID[selectedConfigType];\n }, [selectedConfigType]);\n\n const configTypeString = useContent(configTypeContentId);\n\n const configTypeFormatted = useMemo(() => {\n if (!eventMapConfigQuery?.data) {\n return null;\n }\n\n if (eventMapConfigQuery.data.selectedOverrideId != null) {\n return eventMapConfigQuery.data.selectedOverrideName;\n }\n\n if (\n eventMapConfigQuery.data.selectedVenueMapConfigType != null &&\n eventMapConfigQuery.data.selectedVenueMapConfigType !=\n VenueZoneConfigType.SportsOrConcertsWith360\n ) {\n return `${configTypeString}`;\n }\n\n return `${configTypeString}°`;\n }, [configTypeString, eventMapConfigQuery]);\n\n return (\n {\n setIsExiting(false);\n setIsHovered(true);\n }}\n onMouseLeave={() => {\n setIsExiting(true);\n setTimeout(() => {\n setIsHovered(false);\n setIsExiting(false);\n }, 200);\n }}\n >\n {inCondensedView ? (\n \n ) : (\n \n )}\n\n {(isHovered || isExiting) &&\n popupPosition &&\n createPortal(\n \n
    \n \n
    \n \n \n \n {configTypeFormatted}\n ,\n document.body\n )}\n
    \n );\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { format } from 'date-fns';\nimport { useCallback, useContext, useMemo } from 'react';\nimport { EventAccordionItemProps } from 'src/components/Accordions';\nimport { BulkEditStatusPopover } from 'src/components/common/BulkActions/BulkEditStatusPopover';\nimport { MarketplaceLogo } from 'src/components/common/MarketplaceLogo';\nimport { MultiSelectionToggleGroup } from 'src/components/common/MultiSelect/Toggle/MultiSelectionToggleGroup';\nimport { SummaryTile } from 'src/components/common/SummaryTile';\nimport {\n EventNameDisplay,\n VenueNameDisplay,\n} from 'src/components/Events/EventInfo';\nimport { EventStatus } from 'src/components/Events/EventStatus';\nimport { InventoryEventActionDropdown } from 'src/components/Listings/InventoryActionDropdown';\nimport { InventoryEventPageHeaderCondense } from 'src/components/Listings/InventoryEventPage/InventoryEventPageHeaderCondense';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogMetricsContext } from 'src/contexts/CatalogMetricsContext';\nimport { useCollapsableViewContext } from 'src/contexts/CollapsableViewContext/CollapsableViewContext';\nimport { Content, isContentId } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { ScrollableToolbar } from 'src/core/ui/ScrollableToolbar';\nimport { MarketplaceEventEditDialog } from 'src/dialogs/MarketplaceEventEditDialog';\nimport { useEventMapConfigMetadata } from 'src/hooks/api/useEventMapConfigMetadata';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useGetEventFullInfo } from 'src/hooks/useGetEventFullInfo';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { EditIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { MAPPING_REJECTION_REASON_ID_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport {\n compareMarketplace,\n getFormattedEventName,\n getIsInternationalEvent,\n} from 'src/utils/eventWithDataUtils';\nimport { getLocaleFromLanguageOrCurrent } from 'src/utils/localeUtils';\nimport { getInventorySummaryListingMetricsDisplayStrings } from 'src/utils/ticketMetricUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n Event,\n EventConfigClient,\n Feature,\n Listing,\n ListingMetrics,\n Marketplace,\n Performer,\n Permission,\n SellerEventMarketplaceEventInfo,\n TopLevelCategory,\n Venue,\n} from 'src/WebApiController';\n\nimport { PerformerCategoryIcon } from '../../common/PerformerCategoryIcon';\nimport { NewEventMapBanner } from './Banners/NewEventMapBanner';\nimport { EventVenueMapModal } from './EventVenueMap/EventVenueMapModal';\nimport { EventVenueMapPopup } from './EventVenueMap/EventVenueMapPopup';\nimport * as styles from './InventoryEventPage.css';\n\nconst visibleMarketPlaces: Readonly = [\n Marketplace.StubHub,\n Marketplace.VividSeats,\n Marketplace.Ticketmaster,\n Marketplace.SeatGeek,\n];\n\nexport const InventoryEventPageHeader = ({\n event,\n venue: eventVenue,\n performer: eventPerformer,\n inventoryAccordionItem,\n isOnSaleEvent = false,\n}: {\n event: Event;\n venue?: Venue;\n performer?: Performer;\n inventoryAccordionItem?: EventAccordionItemProps;\n isOnSaleEvent?: boolean;\n}) => {\n const locale = getLocaleFromLanguageOrCurrent();\n\n const hasEventsEditPermission = useUserHasAnyOfPermissions(\n Permission.Events_Edit\n );\n\n const hasEventStatusDisplay = useUserHasFeature(Feature.EventStatusDisplay);\n const hasCondensedPreviewTabsAndSingleListingFeature = useUserHasFeature(\n Feature.CondensedPreviewTabsAndSingleListing\n );\n const hasBlockInventorySummaryStatsFeature = useUserHasFeature(\n Feature.BlockInventorySummaryStats\n );\n\n const { loginContext } = useAppContext();\n\n const { venue, performer } = useGetEventFullInfo(\n event,\n eventPerformer,\n eventVenue\n );\n\n const isInternationalEvent = getIsInternationalEvent(venue?.country?.code);\n\n const { isCollapsedView } = useCollapsableViewContext();\n\n const eventDate = event?.dates.start\n ? new Date(event.dates.start)\n : undefined;\n\n const eventMappingRejectionReason = event?.mapRejRsnId\n ? (MAPPING_REJECTION_REASON_ID_TO_CID[event.mapRejRsnId] ??\n event?.mapRejDftTxt)\n : undefined;\n\n const [eventName, eventNameConnector, eventSubName] = getFormattedEventName({\n event,\n performer,\n });\n const { eventMetrics: eventMetricsMap } =\n useCatalogMetricsContext();\n\n const eventMetrics = eventMetricsMap?.[event?.viagVirtualId ?? ''];\n const formattedTotalMetrics = eventMetrics\n ? getInventorySummaryListingMetricsDisplayStrings(\n eventMetrics,\n loginContext?.user?.activeAccount?.currencyCode\n )\n : undefined;\n\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n\n const shouldQuery =\n activeAccountWebClientConfig?.activeAccountId != null &&\n event.viagVirtualId != null;\n\n const marketplaceEventInfoQuery = useQuery({\n queryKey: [\n 'EventConfigClient.getSellerEventMarketplaceEventInfo',\n activeAccountWebClientConfig.activeAccountId,\n event?.viagVirtualId,\n ],\n queryFn: async () => {\n if (!shouldQuery) {\n return null;\n }\n\n return tryInvokeApi(\n async () => {\n const result = await new EventConfigClient(\n activeAccountWebClientConfig\n ).getSellerEventMarketplaceEventInfo(event.viagId, event.mappingId);\n\n if (result) {\n return result.reduce(\n (r, m) => {\n r[m.marketplace] = m;\n return r;\n },\n {} as Record\n );\n }\n\n return {};\n },\n (error) => {\n trackError(\n 'EventConfigClient.getSellerEventMarketplaceEventInfo',\n error,\n {\n viagogoEntityId: event.viagId,\n viagogoMappingId: event.mappingId,\n }\n );\n }\n );\n },\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n });\n\n const { launchDialog, closeDialog, dialogProps } = useBasicDialog();\n const { setModal } = useContext(ModalContext);\n\n const onEventIdsEditClick = useCallback(() => {\n launchDialog();\n }, [launchDialog]);\n\n const openEventMapView = useCallback(() => {\n setModal({\n children: ,\n size: 'fullscreen',\n fullscreen: true,\n });\n }, [event, setModal]);\n\n const mkpEventInfos = useMemo(\n () =>\n loginContext?.user?.activeAccount.marketplaceSettings\n .filter((m) => m.mkp !== Marketplace.Automatiq) // Automatiq is not an actual Marketplace for Event viewing\n .map((m) => {\n const minfo = marketplaceEventInfoQuery.data?.[m.mkp];\n return (\n minfo ??\n ({\n marketplace: m.mkp,\n viagogoEventId: event.viagId,\n mappedEventId:\n m.mkp === Marketplace.StubHub ? event.viagId : undefined,\n } as SellerEventMarketplaceEventInfo)\n );\n }),\n [\n event.viagId,\n loginContext?.user?.activeAccount.marketplaceSettings,\n marketplaceEventInfoQuery.data,\n ]\n );\n\n const marketPlaceLogos = useMemo(() => {\n {\n return mkpEventInfos\n ?.filter((marketplace) =>\n visibleMarketPlaces.includes(marketplace.marketplace)\n )\n .toSorted((a, b) => compareMarketplace(a.marketplace, b.marketplace))\n .map((minfo) => {\n const hasEventId =\n minfo.marketplace == Marketplace.StubHub ||\n Boolean(minfo?.eventIdOverride || minfo?.mappedEventId) ||\n (Marketplace.Ticketmaster && minfo.websiteEventId);\n\n if (\n minfo.marketplace !== Marketplace.StubHub &&\n isInternationalEvent\n ) {\n // We only show other marketplaces when the Event is US\n return null;\n }\n\n const onMkpClick =\n hasEventId || !hasEventsEditPermission\n ? undefined\n : onEventIdsEditClick;\n\n if (isCollapsedView) {\n return (\n \n {minfo.marketplace}\n \n );\n }\n\n return (\n \n );\n });\n }\n }, [\n event,\n hasEventsEditPermission,\n isCollapsedView,\n isInternationalEvent,\n mkpEventInfos,\n onEventIdsEditClick,\n ]);\n\n const multiSelectToggle = inventoryAccordionItem && (\n \n );\n\n const inventoryEventDropdown = useMemo(() => {\n return (\n inventoryAccordionItem && (\n \n )\n );\n }, [inventoryAccordionItem, isCollapsedView, marketPlaceLogos]);\n\n const marketplaceEventEditDialog = (\n {\n marketplaceEventInfoQuery.refetch();\n closeDialog();\n }}\n />\n );\n\n const { eventMapConfigQuery } = useEventMapConfigMetadata({\n viagogoEventId: event.viagId,\n });\n\n if (isCollapsedView) {\n return (\n <>\n
    \n \n }\n eventVenue={\n venue && (\n
    \n \n
    \n )\n }\n metricValue={formattedTotalMetrics?.formattedTotalListPrice}\n actions={\n <>\n {multiSelectToggle}\n {inventoryEventDropdown}\n \n }\n />\n
    \n {marketplaceEventEditDialog}\n \n );\n }\n\n return (\n
    \n {!isOnSaleEvent && (\n \n )}\n \n {eventDate && }\n \n \n \n {venue && (\n
    \n \n
    \n )}\n
    \n {eventDate && (\n
    \n {format(eventDate, 'h:mm aaa', { locale })}\n
    \n )}{' '}\n {performer && (\n \n {(performer as Performer).categ && (\n <>\n \n  \n \n )}\n {performer?.descr}\n \n )}\n
    \n {eventMappingRejectionReason && (\n
    \n \n \n {' '}\n {isContentId(eventMappingRejectionReason) ? (\n \n ) : (\n eventMappingRejectionReason\n )}\n \n \n \n \n \n }\n />\n
    \n )}\n
    \n \n \n {inventoryAccordionItem && (\n \n \n {!hasCondensedPreviewTabsAndSingleListingFeature && (\n \n )}\n {multiSelectToggle}\n {inventoryEventDropdown}\n \n )}\n \n {hasEventStatusDisplay && event.eventStatus && (\n
    \n \n
    \n )}\n {!isOnSaleEvent && !hasBlockInventorySummaryStatsFeature && (\n }\n showLoadingPlaceholders={!formattedTotalMetrics}\n >\n {formattedTotalMetrics?.formattedTotalListPrice}\n \n )}\n
    \n
    \n\n {!isOnSaleEvent && (\n \n \n \n {marketPlaceLogos}\n \n \n
    \n {hasEventsEditPermission && (\n \n )}\n
    \n \n )}\n \n
    \n
    \n {marketplaceEventEditDialog}\n
    \n );\n};\n","import { isEmpty } from 'lodash-es';\nimport { useContext, useMemo } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { Button, Stack } from 'src/core/ui';\nimport * as Tabs from 'src/core/ui/Tabs';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { EventPricingSeatMap } from 'src/modals/EventPricingSeatMap';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { isMissingRowData } from 'src/utils/venueConfigUtils';\nimport { Feature } from 'src/WebApiController';\n\nimport * as styles from '../InventoryEventPage.css';\n\nexport enum SidePanelTab {\n LISTINGS = 'listings',\n SALES = 'sales',\n NOTES = 'notes',\n PURCHASES = 'purchases',\n}\n\nconst EventMarketListingTitle = () => {\n const hasHideNavAndFilterBarsFeature = useUserHasFeature(\n Feature.HideNavAndFilterBars\n );\n\n return (\n \n \n \n \n {!hasHideNavAndFilterBarsFeature && (\n \n \n \n )}\n\n {!hasHideNavAndFilterBarsFeature && (\n \n \n \n )}\n\n \n \n \n \n );\n};\n\ntype MarketListingHeaderProps = {\n includeSales?: boolean;\n};\n\nexport const MarketListingHeader: React.FC = () => {\n const { setModal } = useContext(ModalContext);\n\n const {\n event,\n venueMapInfo,\n isMapLoading,\n isGeneralAdmissionOnly,\n mapConfigOverridesQuery,\n venueMapsByScoreModelQuery,\n } = useEventMapContext();\n const hasAutoPricingFeature = useUserHasFeature(Feature.AutoPricing);\n\n const isConfigurable = useMemo(() => {\n // Has score overrides\n if (mapConfigOverridesQuery.data?.length) {\n return true;\n }\n\n // Venue map has configured scores\n if ((venueMapInfo?.sectionScores?.findIndex((s) => s.score) ?? -1) >= 0) {\n return true;\n }\n\n // Has modeled scores\n const { AdvancedVenueGeometry, MergedVenueGeometry, VenueGeometry } =\n venueMapsByScoreModelQuery.data ?? {};\n if (\n !isEmpty(AdvancedVenueGeometry) ||\n !isEmpty(MergedVenueGeometry) ||\n !isEmpty(VenueGeometry)\n ) {\n return true;\n }\n\n return false;\n }, [\n mapConfigOverridesQuery.data?.length,\n venueMapInfo?.sectionScores,\n venueMapsByScoreModelQuery.data,\n ]);\n\n return (\n \n
    \n \n {!hasAutoPricingFeature ? null : venueMapInfo?.venueCfgId &&\n !isGeneralAdmissionOnly ? (\n \n setModal({\n children: ,\n clickOutsideToClose: true,\n size: 'slide-in',\n keyboard: false,\n })\n }\n >\n \n \n ) : isGeneralAdmissionOnly ? (\n }\n />\n ) : !isMapLoading && !venueMapInfo?.venueCfgId ? (\n \n }\n />\n ) : null}\n
    \n {hasAutoPricingFeature &&\n !isGeneralAdmissionOnly &&\n !isMapLoading &&\n venueMapInfo?.venueCfgId &&\n isMissingRowData(venueMapInfo) ? (\n }\n />\n ) : null}\n
    \n );\n};\n","import { UseQueryResult } from '@tanstack/react-query';\nimport { isEmpty, noop, union, uniq } from 'lodash-es';\nimport {\n createContext,\n ReactNode,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { VenueMapContentProps } from 'src/components/Events/VenueMap/VenueMapContent';\nimport { SidePanelTab } from 'src/components/Listings/InventoryEventPage/MarketListings/MarketListingHeader';\nimport { useAutoPricingPreview } from 'src/components/Listings/MapWithCompListingsPreview/MapWithCompListingsPreview.hooks';\nimport { useComparableListingsVenueMapColor } from 'src/hooks/useComparableListingsVenueMapColor';\nimport { useGetCompListings } from 'src/hooks/useGetCompListings';\nimport { useUserCanSetPrice } from 'src/hooks/useUserHasListingPermissions';\nimport { getMatchingSectionRow } from 'src/utils/seatScoreUtils';\nimport {\n CompListing,\n Event,\n Listing,\n ListingDetailsAutoPricingSectionUpdates,\n ListingDetailsPricingUpdates,\n ListingGroup,\n ListingPriceCalculation,\n SectionInfo,\n VenueMapInfo,\n} from 'src/WebApiController';\n\nimport { useEventMapContext } from '../EventMapContext';\n\nexport type IInventoryEventDetailContext = {\n event?: Event | undefined;\n eventListings?: Listing[] | null;\n selectedListingIds: number[];\n selectedListing?: Listing | undefined;\n selectedGroup?: ListingGroup | undefined;\n selectedTab: SidePanelTab;\n onTabClick: (tab: SidePanelTab) => void;\n shouldRepaint: boolean;\n recenterMap: () => void;\n shouldReset: boolean;\n setShouldReset: React.Dispatch>;\n compQuantityFilters: string[];\n setCompQuantityFilters: React.Dispatch>;\n venueMapInfo: VenueMapInfo | null;\n priceCalcQuery: UseQueryResult | null;\n compListings?: CompListing[] | undefined;\n filterSections: SectionInfo[];\n compListingSectionIds: number[];\n getColor: NonNullable;\n splitChoices: Record;\n isLoading: boolean;\n};\n\nconst InventoryEventDetailContext = createContext(\n {\n event: undefined,\n eventListings: null,\n selectedListingIds: [],\n selectedListing: undefined,\n selectedGroup: undefined,\n selectedTab: SidePanelTab.LISTINGS,\n onTabClick: (tab: SidePanelTab) => {},\n shouldRepaint: false,\n recenterMap: () => {},\n shouldReset: false,\n setShouldReset: () => {},\n compQuantityFilters: [],\n setCompQuantityFilters: () => {},\n venueMapInfo: null,\n priceCalcQuery: null,\n compListings: [],\n filterSections: [],\n compListingSectionIds: [],\n getColor: noop,\n splitChoices: {},\n isLoading: false,\n }\n);\n\nexport const useInventoryEventDetailContext = () =>\n useContext(InventoryEventDetailContext);\n\nexport const InventoryEventDetailContextProvider = ({\n event,\n eventListings,\n selectedListingIds,\n selectedListing,\n selectedGroup,\n children,\n}: {\n event: Event;\n eventListings?: Listing[] | null;\n selectedListingIds: number[];\n selectedListing: Listing | undefined;\n selectedGroup: ListingGroup | undefined;\n children: ReactNode;\n}) => {\n // Contexts\n const { venueMapInfo } = useEventMapContext();\n\n // State\n const [shouldRepaint, setShouldRepaint] = useState(false);\n const [shouldReset, setShouldReset] = useState(false);\n const [selectedTab, setSelectedTab] = useState(\n SidePanelTab.LISTINGS\n );\n const [compQuantityFilters, setCompQuantityFilters] = useState([]);\n\n const recenterMap = useCallback(() => {\n requestAnimationFrame(() => {\n setTimeout(() => {\n setShouldRepaint(true);\n\n setTimeout(() => {\n setShouldRepaint(false);\n }, 200);\n }, 50);\n });\n }, []);\n\n useEffect(() => {\n setShouldReset(true);\n requestAnimationFrame(() => {\n setTimeout(() => {\n setShouldReset(true);\n\n setTimeout(() => {\n setShouldReset(false);\n }, 200);\n }, 50);\n });\n }, [selectedListing?.id]);\n\n // Custom hooks and component data\n const onTabClick = useCallback(\n (tab: SidePanelTab) => {\n setSelectedTab(tab);\n recenterMap();\n },\n [recenterMap]\n );\n\n const { watch } = useFormContext();\n\n const { compListingSelectedSectionSettings } = watch();\n const input = watch();\n\n const sanitizedListingInput = useMemo((): ListingDetailsPricingUpdates => {\n const {\n netProceedsFloor,\n netProceedsCeiling,\n autoPricingEnabled,\n currencyCode,\n\n compListingFloor,\n compListingCeiling,\n compListingMode,\n compListingOnlyForSameZoneEnabled,\n compListingOnlyForSelectedSectionsEnabled,\n compListingExcludeFanInventory,\n compListingExcludeDefects,\n compListingQuantityScoreAdjustmentEnabled,\n compListingQuantityScoreAdjustmentOverrideJson,\n compListingSelectedSectionSettings,\n compListingQuantityFilters,\n\n undercutMode,\n undercutAbsoluteAmount,\n undercutRelativeAmount,\n\n circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerMaxDiscountVelocityTicksInHours,\n circuitBreakerMinCompListingCount,\n circuitBreakerRelativeCeiling,\n circuitBreakerRelativeFloor,\n\n outlierMode,\n outlierStandardDeviations,\n outlierKthLowestLimit,\n outlierKthLowestLimitRelativeSpacing,\n outlierKthLowestLimitAbsoluteSpacing,\n } = input ?? {};\n\n return {\n netProceedsFloor,\n netProceedsCeiling,\n autoPricingEnabled,\n currencyCode,\n\n compListingFloor,\n compListingCeiling,\n compListingMode,\n compListingOnlyForSameZoneEnabled,\n compListingOnlyForSelectedSectionsEnabled,\n compListingExcludeFanInventory,\n compListingExcludeDefects,\n compListingQuantityScoreAdjustmentEnabled,\n compListingQuantityScoreAdjustmentOverrideJson,\n compListingSelectedSectionSettings,\n compListingQuantityFilters,\n\n undercutMode,\n undercutAbsoluteAmount,\n undercutRelativeAmount,\n\n circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerMaxDiscountVelocityTicksInHours,\n circuitBreakerMinCompListingCount,\n circuitBreakerRelativeCeiling,\n circuitBreakerRelativeFloor,\n\n outlierMode,\n outlierStandardDeviations,\n outlierKthLowestLimit,\n outlierKthLowestLimitRelativeSpacing,\n outlierKthLowestLimitAbsoluteSpacing,\n } as ListingDetailsPricingUpdates;\n }, [input]);\n\n const { priceCalcQuery } = useAutoPricingPreview(\n event?.viagId ?? null,\n selectedListing?.id,\n sanitizedListingInput\n );\n\n const { compListingsQuery, compListingsGroupQuery } = useGetCompListings(\n event,\n selectedListing?.id,\n selectedListing?.currency,\n selectedGroup?.ltGrpId\n );\n\n const formSectionFilterIds = useMemo(() => {\n return compListingSelectedSectionSettings?.sectionIdFilter ?? [];\n }, [compListingSelectedSectionSettings?.sectionIdFilter]);\n\n const compListings = useMemo(() => {\n if (selectedListing?.id) {\n return priceCalcQuery?.data?.compListings;\n }\n if (isEmpty(formSectionFilterIds)) {\n if (selectedGroup?.ltGrpId) {\n return compListingsGroupQuery.data?.compListings;\n }\n return compListingsQuery.data ?? undefined;\n }\n\n if (selectedGroup?.ltGrpId) {\n return compListingsGroupQuery.data?.compListings?.filter((l) => {\n const { section } = getMatchingSectionRow(l, venueMapInfo?.sections);\n return section && formSectionFilterIds.includes(section.id);\n });\n }\n return compListingsQuery.data?.filter((l) => {\n const { section } = getMatchingSectionRow(l, venueMapInfo?.sections);\n return section && formSectionFilterIds.includes(section.id);\n });\n }, [\n selectedListing?.id,\n formSectionFilterIds,\n venueMapInfo?.sections,\n selectedGroup?.ltGrpId,\n compListingsQuery.data,\n priceCalcQuery?.data?.compListings,\n compListingsGroupQuery.data?.compListings,\n ]);\n\n const filterSections = useMemo(() => {\n const selectedSectionId =\n compListingSelectedSectionSettings?.sectionIdFilter ?? [];\n return (\n venueMapInfo?.sections?.filter(({ id }) =>\n selectedSectionId.includes(id)\n ) ?? []\n );\n }, [\n compListingSelectedSectionSettings?.sectionIdFilter,\n venueMapInfo?.sections,\n ]);\n\n const compListingSectionIds = useMemo(() => {\n if (isEmpty(selectedListingIds)) {\n return formSectionFilterIds;\n }\n\n const sectionNames = (compListings ?? []).map((l) => l.section);\n\n const sectionIds = (venueMapInfo?.sections ?? [])\n .filter((section) => sectionNames.includes(section.name))\n .map(({ id }) => id);\n\n return union(sectionIds, formSectionFilterIds);\n }, [\n selectedListingIds,\n compListings,\n venueMapInfo?.sections,\n formSectionFilterIds,\n ]);\n\n const canSetPrice = useUserCanSetPrice(selectedListing, false);\n\n const compListingsFiltered = useMemo(() => {\n if (isEmpty(compQuantityFilters)) {\n return compListings;\n }\n\n return compListings?.filter(({ validPurchaseQuantities }) => {\n if (isEmpty(validPurchaseQuantities)) {\n return true;\n }\n return validPurchaseQuantities.some(\n (quantity) => compQuantityFilters.indexOf(quantity + '') > -1\n );\n });\n }, [compListings, compQuantityFilters]);\n\n const getColor = useComparableListingsVenueMapColor(\n eventListings ?? [],\n compListingsFiltered,\n compListings\n );\n\n const splitChoices = useMemo(() => {\n return uniq(\n (compListings ?? []).flatMap(\n (listing) => listing.validPurchaseQuantities ?? []\n )\n ).reduce(\n (res, quantity) => {\n const stringQuantity = quantity + '';\n res[stringQuantity] = stringQuantity;\n return res;\n },\n {} as Record\n );\n }, [compListings]);\n\n const isLoading = useMemo(\n () =>\n compListingsQuery.isLoading ||\n priceCalcQuery.isLoading ||\n compListingsGroupQuery.isLoading,\n [\n compListingsGroupQuery.isLoading,\n compListingsQuery.isLoading,\n priceCalcQuery.isLoading,\n ]\n );\n\n if (!canSetPrice) {\n return null;\n }\n\n return (\n \n {children}\n \n );\n};\n","import { useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { ToggleGroup } from 'src/core/ui/ToggleGroup';\nimport { useUndercutAmountSettings } from 'src/hooks/useUndercutAmountSettings';\nimport { MinusIcon, PlusIcon } from 'src/svgs/Viagogo';\nimport { getUndercutPriceRepresentingMode } from 'src/utils/autoPricingUtils';\nimport { UndercutPriceSettingsMode } from 'src/utils/autoPricingUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { roundToPrecision } from 'src/utils/numberFormatter';\nimport { AutoPricingInputs, UiCurrency } from 'src/WebApiController';\n\nimport * as styles from './PricingSetting.css';\n\nconst UNDERCUT_PRICE_MODE_OPTIONS = [\n {\n value: UndercutPriceSettingsMode.Premium,\n children: ,\n },\n {\n value: UndercutPriceSettingsMode.Discount,\n children: ,\n },\n];\n\ntype CompListingPricesProps = {\n useVerticalView: boolean;\n uiCurrency: UiCurrency;\n};\n\nexport const CompListingPrices = ({\n useVerticalView,\n uiCurrency,\n}: CompListingPricesProps) => {\n const { watch, setValue } = useFormContext();\n const { undercutRelativeAmount, undercutAbsoluteAmount } = watch();\n\n const {\n undercutAbsoluteAmountMode,\n setUndercutAbsoluteAmountMode,\n undercutRelativeAmountMode,\n setUndercutRelativeAmountMode,\n } = useUndercutAmountSettings(undercutAbsoluteAmount, undercutRelativeAmount);\n\n const determinPriceText = useContent(ContentId.DeterminePrice);\n const movePriceText = useContent(ContentId.MovePrice);\n const thenText = useContent(ContentId.Then);\n const adjustPriceText = useContent(ContentId.AdjustPrice);\n\n const compListingPriceTextFirst = useMemo(\n () => `${determinPriceText}: ${movePriceText}`,\n [determinPriceText, movePriceText]\n );\n\n const compListingPriceTextThen = useMemo(\n () => `${thenText} ${adjustPriceText.toLowerCase()}`,\n [adjustPriceText, thenText]\n );\n\n if (useVerticalView) {\n return (\n \n
    \n {compListingPriceTextFirst}\n
    \n \n {\n if (!value) {\n return;\n }\n\n const undercutRelativeAmountModeNew =\n value as UndercutPriceSettingsMode;\n\n setUndercutRelativeAmountMode(undercutRelativeAmountModeNew);\n\n if (undercutRelativeAmount) {\n const absUndercutRelativeAmountNew = Math.abs(\n undercutRelativeAmount\n );\n\n const underCutAbsoluteAmountNew =\n getUndercutPriceRepresentingMode(\n absUndercutRelativeAmountNew,\n undercutRelativeAmountModeNew\n );\n\n setValue('undercutRelativeAmount', underCutAbsoluteAmountNew);\n }\n }}\n />\n
    \n \n
    \n {\n const v = parseFloat(e.target.value);\n const absUnderCutRelativeAmountNew =\n v >= 0 && v <= Number.MAX_VALUE ? Math.min(v, 100) / 100 : null;\n const underCutRelativeAmountNew =\n absUnderCutRelativeAmountNew != null\n ? getUndercutPriceRepresentingMode(\n absUnderCutRelativeAmountNew,\n undercutRelativeAmountMode\n )\n : null;\n\n setValue('undercutRelativeAmount', underCutRelativeAmountNew);\n }}\n />\n \n
    \n {compListingPriceTextThen}\n
    \n \n {\n if (!value) {\n return;\n }\n\n const undercutAbsoluteAmountModeNew =\n value as UndercutPriceSettingsMode;\n\n setUndercutAbsoluteAmountMode(undercutAbsoluteAmountModeNew);\n\n if (undercutAbsoluteAmount) {\n const absUndercutAbsoluteAmountNew = Math.abs(\n undercutAbsoluteAmount\n );\n\n const underCutAbsoluteAmountNew =\n getUndercutPriceRepresentingMode(\n absUndercutAbsoluteAmountNew,\n undercutAbsoluteAmountModeNew\n );\n\n setValue('undercutAbsoluteAmount', underCutAbsoluteAmountNew);\n }\n }}\n />\n
    \n \n
    \n {\n const value = parseFloat(e.target.value);\n if (!isNaN(value)) {\n const underCutRelativeAmountNew =\n getUndercutPriceRepresentingMode(\n Math.abs(value),\n undercutAbsoluteAmountMode\n );\n\n setValue('undercutAbsoluteAmount', underCutRelativeAmountNew);\n }\n }}\n />\n \n \n );\n }\n\n return (\n <>\n \n \n {\n if (!value) {\n return;\n }\n\n const undercutRelativeAmountModeNew =\n value as UndercutPriceSettingsMode;\n\n setUndercutRelativeAmountMode(undercutRelativeAmountModeNew);\n\n if (undercutRelativeAmount) {\n const absUndercutRelativeAmountNew = Math.abs(\n undercutRelativeAmount\n );\n\n const underCutAbsoluteAmountNew =\n getUndercutPriceRepresentingMode(\n absUndercutRelativeAmountNew,\n undercutRelativeAmountModeNew\n );\n\n setValue('undercutRelativeAmount', underCutAbsoluteAmountNew);\n }\n }}\n />\n
    \n \n
    \n {\n const v = parseFloat(e.target.value);\n const absUnderCutRelativeAmountNew =\n v >= 0 && v <= Number.MAX_VALUE ? Math.min(v, 100) / 100 : null;\n const underCutRelativeAmountNew =\n absUnderCutRelativeAmountNew != null\n ? getUndercutPriceRepresentingMode(\n absUnderCutRelativeAmountNew,\n undercutRelativeAmountMode\n )\n : null;\n\n setValue('undercutRelativeAmount', underCutRelativeAmountNew);\n }}\n />\n
    \n \n
    \n {\n if (!value) {\n return;\n }\n\n const undercutAbsoluteAmountModeNew =\n value as UndercutPriceSettingsMode;\n\n setUndercutAbsoluteAmountMode(undercutAbsoluteAmountModeNew);\n\n if (undercutAbsoluteAmount) {\n const absUndercutAbsoluteAmountNew = Math.abs(\n undercutAbsoluteAmount\n );\n\n const underCutAbsoluteAmountNew =\n getUndercutPriceRepresentingMode(\n absUndercutAbsoluteAmountNew,\n undercutAbsoluteAmountModeNew\n );\n\n setValue('undercutAbsoluteAmount', underCutAbsoluteAmountNew);\n }\n }}\n />\n {\n const value = parseFloat(e.target.value);\n if (!isNaN(value)) {\n const underCutRelativeAmountNew =\n getUndercutPriceRepresentingMode(\n Math.abs(value),\n undercutAbsoluteAmountMode\n );\n\n setValue('undercutAbsoluteAmount', underCutRelativeAmountNew);\n }\n }}\n />\n \n \n );\n};\n","import clsx from 'clsx';\nimport { useMemo } from 'react';\nimport { useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport {\n OnOutlierSettingsChangeArgs,\n useAutoPricingSettingsFormContext,\n} from 'src/components/AutoPricing/useAutoPricingSettingsFormContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { PosEnumSelect, PosSelect } from 'src/core/POS/PosSelect';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { vars } from 'src/core/themes';\nimport { Button, Popover, Stack } from 'src/core/ui';\nimport { ToggleGroup } from 'src/core/ui/ToggleGroup';\nimport { useAvailableAutopricingModes } from 'src/hooks/useAvailableAutopricingModes';\nimport { ExpandIcon, FoldIcon } from 'src/svgs/Viagogo';\nimport {\n OUTLIER_MODE_KTH_LOWEST_STRATEGY,\n OutlierModeKthLowestStrategy,\n} from 'src/utils/autoPricingUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { STANDARD_DEVIATIONS_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { numberToOrdinal } from 'src/utils/numberFormatter';\nimport { ListingDetailsAutoPricingSectionUpdates } from 'src/WebApiController';\nimport { AutoPricingOutlierMode } from 'src/WebApiController';\n\nimport * as styles from './PricingSetting.css';\n\ntype OutlierSettingsProps = {\n useVerticalView: boolean;\n};\n\nexport const OutlierSettings = ({ useVerticalView }: OutlierSettingsProps) => {\n const { watch } = useFormContext();\n const {\n outlierMode,\n outlierKthLowestLimit,\n outlierKthLowestLimitAbsoluteSpacing,\n outlierKthLowestLimitRelativeSpacing,\n outlierStandardDeviations,\n } = watch();\n const [showOutlierSettings, setShowOutlierSettings] =\n useState(false);\n const { onOutlierSettingsChange } = useAutoPricingSettingsFormContext();\n\n const { outlierModes } = useAvailableAutopricingModes(\n true,\n null,\n null,\n true,\n false,\n false,\n true\n );\n\n if (useVerticalView) {\n return (\n \n \n \n
    \n {' '}\n \n
    \n \n
    \n \n \n \n \n \n }\n onClick={(e) => e.stopPropagation()}\n onChange={(v) =>\n onOutlierSettingsChange({\n outlierModeNew: v as AutoPricingOutlierMode,\n })\n }\n />\n {outlierMode === AutoPricingOutlierMode.KthLowest ? (\n \n ) : outlierMode === AutoPricingOutlierMode.StandardDeviations ? (\n \n ) : null}\n \n \n
    \n );\n }\n\n return (\n
    \n setShowOutlierSettings((prev) => !prev)}\n >\n \n \n \n {showOutlierSettings ? (\n \n ) : (\n \n )}\n \n {showOutlierSettings ? (\n
    \n \n \n \n }\n onClick={(e) => e.stopPropagation()}\n onChange={(v) =>\n onOutlierSettingsChange({\n outlierModeNew: v as AutoPricingOutlierMode,\n })\n }\n />\n {outlierMode === AutoPricingOutlierMode.KthLowest ? (\n \n ) : outlierMode === AutoPricingOutlierMode.StandardDeviations ? (\n \n ) : null}\n
    \n ) : null}\n
    \n );\n};\n\nconst KthLowestOutlierDetectionSettingsInput = ({\n outlierKthLowestLimit,\n outlierKthLowestLimitRelativeSpacing,\n outlierKthLowestLimitAbsoluteSpacing,\n onOutlierSettingsChange,\n}: {\n outlierKthLowestLimit: number | null;\n outlierKthLowestLimitRelativeSpacing: number | null;\n outlierKthLowestLimitAbsoluteSpacing: number | null;\n onOutlierSettingsChange: (args: OnOutlierSettingsChangeArgs) => void;\n}) => {\n const [outlierKthLowestStrategy, setKthLowestOutlierStrategy] = useState(\n OutlierModeKthLowestStrategy.Relative\n );\n\n const ignoreListingsText = useContent(\n ContentId.OutlierSettingsIngoreListings\n );\n const belowTheText = useContent(ContentId.BelowThe);\n const cheapestText = useContent(ContentId.Cheapest);\n\n const lowestLimitOptions = useMemo(() => {\n const options: Record = {};\n for (const [index, _] of Array.from({ length: 100 }).entries()) {\n if (index <= 0) continue;\n const value = index + 1;\n options[index] = `${numberToOrdinal(\n value\n )} ${cheapestText.toLocaleLowerCase()}`;\n }\n return options;\n }, [cheapestText]);\n\n return (\n <>\n \n \n {outlierKthLowestStrategy == OutlierModeKthLowestStrategy.Relative ? (\n {ignoreListingsText}\n }\n min={-1}\n max={100}\n rootProps={{ variant: 'small' }}\n className={clsx(styles.inputInline, styles.textAlignRight)}\n value={outlierKthLowestLimitRelativeSpacing ?? ''}\n onChange={(e) => {\n let v = parseInt(e.target.value);\n if (v < 0) {\n v = 0;\n } else if (v > 100) {\n v = 100;\n }\n\n if (!isNaN(v)) {\n onOutlierSettingsChange({\n outlierModeNew: AutoPricingOutlierMode.KthLowest,\n outlierKthLowestLimitRelativeSpacingNew: v,\n outlierKthLowestLimitAbsoluteSpacingNew: null,\n });\n }\n }}\n />\n ) : (\n {ignoreListingsText}\n }\n rootProps={{ variant: 'small' }}\n className={clsx(styles.inputInline, styles.textAlignRight)}\n value={outlierKthLowestLimitAbsoluteSpacing ?? 0}\n onChange={(e) => {\n const v = parseFloat(e.target.value);\n\n if (!isNaN(v)) {\n onOutlierSettingsChange({\n outlierModeNew: AutoPricingOutlierMode.KthLowest,\n outlierKthLowestLimitRelativeSpacingNew: null,\n outlierKthLowestLimitAbsoluteSpacingNew: v,\n });\n }\n }}\n />\n )}\n {\n if (!value) {\n return;\n }\n\n const strat = value as OutlierModeKthLowestStrategy;\n setKthLowestOutlierStrategy(strat);\n onOutlierSettingsChange({\n outlierModeNew: AutoPricingOutlierMode.KthLowest,\n outlierKthLowestLimitRelativeSpacingNew: null,\n outlierKthLowestLimitAbsoluteSpacingNew: null,\n });\n }}\n />\n \n
    \n e.stopPropagation()}\n prefixDisplay={\n {belowTheText}\n }\n contentProps={{ style: { maxHeight: '400px' } }}\n onChange={(v) => {\n const value = parseInt(v);\n if (!isNaN(value)) {\n onOutlierSettingsChange({\n outlierModeNew: AutoPricingOutlierMode.KthLowest,\n outlierKthLowestLimitNew: value,\n });\n }\n }}\n />\n
    \n
    \n \n );\n};\n\nconst StandardDeviationOutlierDetectionSettingsInput = ({\n outlierStandardDeviations,\n onOutlierSettingsChange,\n}: {\n outlierStandardDeviations: number | null;\n onOutlierSettingsChange: (input: OnOutlierSettingsChangeArgs) => void;\n}) => {\n return (\n e.stopPropagation()}\n onChange={(v) => {\n const value = parseInt(v ?? '');\n if (value != null && !isNaN(value)) {\n onOutlierSettingsChange({\n outlierModeNew: AutoPricingOutlierMode.StandardDeviations,\n outlierStandardDeviationsNew: value,\n });\n } else {\n onOutlierSettingsChange({\n outlierModeNew: AutoPricingOutlierMode.StandardDeviations,\n outlierStandardDeviationsNew: null,\n });\n }\n }}\n />\n );\n};\n","import { ChangeEvent, useCallback, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { FormatContent, useContent } from 'src/contexts/ContentContext';\nimport { useInventoryEventDetailContext } from 'src/contexts/InventoryEventDetailContext/InventoryEventDetailContext';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { vars } from 'src/core/themes';\nimport { InfoOutlineIcon } from 'src/svgs/Viagogo';\nimport { calculatePercentile } from 'src/utils/arrayUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport {\n getAllInPriceFromListPrice,\n getListPriceFromAllinPrice,\n} from 'src/utils/inventoryUtils';\nimport { roundToPrecision } from 'src/utils/numberFormatter';\nimport {\n ListingDetailsAutoPricingSectionUpdates,\n UiCurrency,\n} from 'src/WebApiController';\n\nimport * as styles from './PricingSetting.css';\n\nconst CheckPrice = (\n value: number | null,\n median: number,\n threshold: number\n) => {\n if (!value || !median || threshold <= 0) {\n return null;\n }\n\n const percentDifference = ((value - median) / median) * 100;\n const absolutePercentDifference = Math.abs(percentDifference);\n\n if (absolutePercentDifference <= threshold) {\n return {\n isWithinThreshold: true,\n percentDifference: percentDifference,\n absolutePercentDifference: absolutePercentDifference,\n };\n }\n\n return {\n isWithinThreshold: false,\n isAbove: percentDifference > 0,\n isBelow: percentDifference < 0,\n percentDifference: percentDifference,\n absolutePercentDifference: absolutePercentDifference,\n };\n};\n\nexport const PricingSettingAutoPriceFloorSettings = ({\n uiCurrency,\n sellerFee,\n}: {\n uiCurrency: UiCurrency;\n sellerFee: number | null;\n}) => {\n const aboveText = useContent(ContentId.Above).toLocaleLowerCase();\n const belowText = useContent(ContentId.Below).toLocaleLowerCase();\n const setPriceFloorText = `${useContent(ContentId.SetPriceFloor)}: ${\n uiCurrency.sym\n }`;\n\n const { setValue, watch } =\n useFormContext();\n\n const input = watch();\n const { netProceedsFloor } = input;\n\n const { compListings } = useInventoryEventDetailContext();\n\n const medianListingPrice = useMemo(() => {\n const ticketPrices: number[] = [];\n for (const listing of compListings ?? []) {\n if ((listing.availableTickets ?? 0) > 0) {\n const prices = Array(listing.availableTickets ?? 0).fill(\n listing.sellerAllInPrice?.amt ?? 0\n );\n ticketPrices.push(...prices);\n }\n }\n return calculatePercentile(ticketPrices, 50);\n }, [compListings]);\n\n const priceComparisonResult = useMemo(() => {\n return CheckPrice(netProceedsFloor, medianListingPrice, 25);\n }, [medianListingPrice, netProceedsFloor]);\n\n const onPriceFloorChange = useCallback(\n (e: ChangeEvent) => {\n const v = parseFloat(e.target.value);\n if (v >= 0 && v < Number.MAX_VALUE) {\n const netProceedsValueNew = getListPriceFromAllinPrice(\n v,\n null,\n sellerFee\n )!;\n setValue('netProceedsFloor', netProceedsValueNew);\n } else {\n setValue('netProceedsFloor', null);\n }\n },\n [setValue, sellerFee]\n );\n\n return (\n <>\n {setPriceFloorText}\n }\n value={\n getAllInPriceFromListPrice(netProceedsFloor, null, sellerFee) ?? ''\n }\n onChange={onPriceFloorChange}\n uiCurrency={uiCurrency}\n />\n {priceComparisonResult && !priceComparisonResult.isWithinThreshold && (\n
    \n \n \n \n \n
    \n )}\n \n );\n};\n","import clsx from 'clsx';\nimport { useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { roundToPrecision } from 'src/utils/numberFormatter';\nimport {\n ListingGroupAutoPriceSettings,\n UiCurrency,\n} from 'src/WebApiController';\n\nimport * as styles from './PricingSetting.css';\n\nenum RankPremiumMode {\n Absolute = 'Absolute',\n Relative = 'Relative',\n}\n\nconst RANK_PREMIUM_TO_SYMBOL_MAP = {\n [RankPremiumMode.Absolute]: '$',\n [RankPremiumMode.Relative]: '%',\n};\n\ninterface PricingSettingAutoPriceRankPremiumSettingsProps {\n uiCurrency: UiCurrency;\n}\n\nexport const PricingSettingAutoPriceRankPremiumSettings = ({\n uiCurrency,\n}: PricingSettingAutoPriceRankPremiumSettingsProps) => {\n const addRankPremiumText = useContent(\n ContentId.GroupListingsSettingRankPremium\n );\n const [premiumMode, setPremiumMode] = useState(\n RankPremiumMode.Absolute\n );\n const { watch, setValue } = useFormContext();\n\n const undAbsAmt = watch('undAbsAmt');\n const undRelAmt = watch('undRelAmt');\n\n const currentValue =\n premiumMode === RankPremiumMode.Absolute\n ? undAbsAmt\n : undRelAmt != null\n ? roundToPrecision(Math.abs(undRelAmt) * 100, 8)\n : '';\n\n const handleValueChange = (value: string) => {\n const numericValue = parseFloat(value);\n\n if (!isNaN(numericValue)) {\n if (premiumMode === RankPremiumMode.Absolute) {\n setValue('undAbsAmt', numericValue);\n setValue('undRelAmt', null);\n } else {\n const clampedValue = Math.min(Math.max(numericValue, 0), 100) / 100;\n setValue('undAbsAmt', null);\n setValue('undRelAmt', clampedValue);\n }\n }\n };\n\n return (\n
    \n \n {addRankPremiumText}:\n \n }\n value={currentValue ?? undefined}\n onChange={(e) => handleValueChange(e.target.value)}\n />\n
    \n e.stopPropagation()}\n onChange={(v) => setPremiumMode(v as RankPremiumMode)}\n />\n
    \n
    \n );\n};\n","import { OkButton } from 'src/components/Buttons/OkButton';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { Button } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n AutoPricingCompListingMode,\n AutoPricingOutlierMode,\n AutoPricingUndercutMode,\n UiCurrency,\n} from 'src/WebApiController';\n\nimport { CompListingPrices } from './CompListingPrices';\nimport { OutlierSettings } from './OutlierSettings';\nimport * as styles from './PricingSetting.css';\nimport { PricingSettingAutoPriceFloorSettings } from './PricingSettingAutoPriceFloorSettings';\nimport { PricingSettingAutoPriceRankPremiumSettings } from './PricingSettingAutoPriceRankPremiumSettings';\n\nexport const PricingSettingAutoPriceBody = ({\n sellerFee,\n uiCurrency,\n hasChanges,\n isLoading,\n isListingGroupForm,\n useVerticalView,\n onReset,\n onSubmit,\n}: {\n undercutRelativeAmount: number | null;\n undercutAbsoluteAmount: number | null;\n compListingMode: AutoPricingCompListingMode | null;\n outlierMode: AutoPricingOutlierMode | null;\n undercutMode: AutoPricingUndercutMode | null;\n outlierStandardDeviations: number | null;\n outlierKthLowestLimit: number | null;\n outlierKthLowestLimitAbsoluteSpacing: number | null;\n outlierKthLowestLimitRelativeSpacing: number | null;\n uiCurrency: UiCurrency;\n sellerFee: number | null;\n hasChanges: boolean;\n isLoading: boolean;\n isListingGroupForm?: boolean | null;\n useVerticalView: boolean;\n onReset: () => void;\n onSubmit: () => void;\n}) => {\n const resetText = useContent(ContentId.Reset);\n\n return (\n
    \n
    \n
    \n \n {!isListingGroupForm ? (\n \n ) : (\n \n )}\n
    \n\n \n
    \n
    \n \n {resetText}\n \n \n
    \n
    \n );\n};\n","import { isEqual } from 'lodash-es';\nimport { useCallback, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useToggle } from 'react-use';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { useInventoryEventDetailContext } from 'src/contexts/InventoryEventDetailContext/InventoryEventDetailContext';\nimport { isSuccess } from 'src/utils/errorUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ListingGroupAutoPriceSettings,\n PricingClient,\n UiCurrency,\n} from 'src/WebApiController';\n\nimport { PricingSettingAutoPriceBody } from './PricingSettingAutoPriceBody';\n\ntype PricingSettingAutoPriceGroupProps = {\n uiCurrency: UiCurrency;\n sellerFee: number | null;\n useVerticalView: boolean;\n};\n\nexport const PricingSettingAutoPriceGroup = ({\n uiCurrency,\n sellerFee,\n useVerticalView,\n}: PricingSettingAutoPriceGroupProps) => {\n const { selectedGroup } = useInventoryEventDetailContext();\n const { watch, reset, handleSubmit, formState } =\n useFormContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n\n const [isLoading, setLoading] = useToggle(false);\n\n const onSubmitHandler = useCallback(\n async (autoPricingSectionForm: ListingGroupAutoPriceSettings) => {\n if (selectedGroup?.ltGrpId == null) {\n return;\n }\n\n tryInvokeApi(\n async () => {\n setLoading(true);\n const result = await new PricingClient(\n activeAccountWebClientConfig\n ).updateListingGroupPricingSettings(\n selectedGroup?.ltGrpId ?? undefined,\n autoPricingSectionForm\n );\n\n if (isSuccess(result)) {\n // Reset the form to latest changed\n reset(autoPricingSectionForm);\n refreshExpandedListItems();\n setLoading(false);\n } else {\n showErrorDialog(\n 'PricingClient.updateListingGroupPricingSettings',\n { message: result.message, status: result.status },\n {\n trackErrorData: {\n autoPricingSectionForm,\n },\n }\n );\n }\n },\n (error) => {\n showErrorDialog(\n 'PricingClient.updateListingGroupPricingSettings',\n error,\n {\n trackErrorData: autoPricingSectionForm,\n }\n );\n },\n () => {\n setLoading(false);\n }\n );\n },\n [\n activeAccountWebClientConfig,\n refreshExpandedListItems,\n reset,\n selectedGroup?.ltGrpId,\n setLoading,\n showErrorDialog,\n ]\n );\n\n const onSubmit = useCallback(() => {\n handleSubmit(onSubmitHandler)();\n }, [handleSubmit, onSubmitHandler]);\n\n const onReset = useCallback(() => {\n reset({ ...(formState.defaultValues ?? {}) });\n }, [formState.defaultValues, reset]);\n\n const input = watch();\n\n const hasChanges = useMemo(() => {\n const defaultValues = formState.defaultValues;\n return (\n input.undAbsAmt !== defaultValues?.undAbsAmt ||\n input.undRelAmt !== defaultValues?.undRelAmt ||\n input.compListingFloor !== defaultValues?.compListingFloor ||\n input.compListingCeiling !== defaultValues?.compListingCeiling ||\n input.compListingMode !== defaultValues?.compListingMode ||\n input.compListingOnlyForSameZoneEnabled !==\n defaultValues?.compListingOnlyForSameZoneEnabled ||\n input.compListingOnlyForSelectedSectionsEnabled !==\n defaultValues?.compListingOnlyForSelectedSectionsEnabled ||\n input.compListingExcludeFanInventory !==\n defaultValues?.compListingExcludeFanInventory ||\n input.compListingExcludeDefects !==\n defaultValues?.compListingExcludeDefects ||\n input.compListingQuantityScoreAdjustmentEnabled !==\n defaultValues?.compListingQuantityScoreAdjustmentEnabled ||\n input.compListingQuantityScoreAdjustmentOverrideJson !==\n defaultValues?.compListingQuantityScoreAdjustmentOverrideJson ||\n input.undercutMode !== defaultValues?.undercutMode ||\n input.undercutAbsoluteAmount !== defaultValues?.undercutAbsoluteAmount ||\n input.undercutRelativeAmount !== defaultValues?.undercutRelativeAmount ||\n input.circuitBreakerMaxDiscountVelocityPercent !==\n defaultValues?.circuitBreakerMaxDiscountVelocityPercent ||\n input.circuitBreakerMaxDiscountVelocityTicksInHours !==\n defaultValues?.circuitBreakerMaxDiscountVelocityTicksInHours ||\n input.circuitBreakerMinCompListingCount !==\n defaultValues?.circuitBreakerMinCompListingCount ||\n input.circuitBreakerRelativeCeiling !==\n defaultValues?.circuitBreakerRelativeCeiling ||\n input.circuitBreakerRelativeFloor !==\n defaultValues?.circuitBreakerRelativeFloor ||\n input.outlierMode !== defaultValues?.outlierMode ||\n input.outlierStandardDeviations !==\n defaultValues?.outlierStandardDeviations ||\n input.outlierKthLowestLimit !== defaultValues?.outlierKthLowestLimit ||\n input.outlierKthLowestLimitRelativeSpacing !==\n defaultValues?.outlierKthLowestLimitRelativeSpacing ||\n input.outlierKthLowestLimitAbsoluteSpacing !==\n defaultValues?.outlierKthLowestLimitAbsoluteSpacing ||\n !isEqual(\n input.compListingSelectedSectionSettings,\n defaultValues?.compListingSelectedSectionSettings\n ) ||\n !isEqual(\n input.compListingQuantityFilters,\n defaultValues?.compListingQuantityFilters\n )\n );\n }, [input, formState.defaultValues]);\n\n const {\n compListingMode,\n outlierMode,\n undercutMode,\n undercutRelativeAmount,\n undercutAbsoluteAmount,\n outlierStandardDeviations,\n outlierKthLowestLimit,\n outlierKthLowestLimitAbsoluteSpacing,\n outlierKthLowestLimitRelativeSpacing,\n } = input;\n\n return (\n \n );\n};\n","import { Stack } from 'src/core/ui';\n\nimport * as styles from './StatLabel.css';\n\nexport const StatLabel = ({\n title,\n stat,\n}: {\n title: string | React.ReactNode;\n stat: string;\n}) => {\n return (\n \n {stat}\n {title}\n \n );\n};\n","import { sum } from 'lodash-es';\nimport { useMemo } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Divider } from 'src/modals/common/Summary/Summary.styled';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Listing, ListingStatus } from 'src/WebApiController';\n\nimport { StatLabel } from '../../../Map/StatLabel';\nimport * as styles from './PricingSetting.css';\n\nexport const PricingSettingGroupHeader = ({\n groupName,\n flattenedListingGroup,\n}: {\n groupName: string;\n flattenedListingGroup: Listing[] | undefined;\n}) => {\n const soldQty = useMemo(() => {\n return sum(\n flattenedListingGroup?.filter((l) => !l.isLtGrp).map((l) => l.soldQty)\n );\n }, [flattenedListingGroup]);\n\n const listedQty = useMemo(() => {\n return sum(\n flattenedListingGroup\n ?.filter(\n (l) =>\n !l.isLtGrp &&\n ((l as Listing).status === ListingStatus.Listed ||\n (l as Listing).status === ListingStatus.ListingPending)\n )\n .map((l) => l.availQty)\n );\n }, [flattenedListingGroup]);\n\n const queuedQty = useMemo(() => {\n return sum(\n flattenedListingGroup\n ?.filter(\n (l) =>\n !l.isLtGrp &&\n !(\n (l as Listing).status === ListingStatus.Listed ||\n (l as Listing).status === ListingStatus.ListingPending\n )\n )\n .map((l) => l.availQty)\n );\n }, [flattenedListingGroup]);\n\n return (\n
    \n }\n />\n \n } />\n \n }\n />\n \n }\n />\n
    \n );\n};\n","import clsx from 'clsx';\nimport { useMemo } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { Stack } from 'src/core/ui';\nimport { flattenListingGroup } from 'src/modals/GroupListings/components/groupingUtils';\nimport { Listing, ListingGroup, Marketplace } from 'src/WebApiController';\n\nimport * as styles from './ListingDetailPanel.css';\nimport { PricingSettingAutoPriceGroup } from './PricingSetting/PricingSettingAutoPriceGroup';\nimport { PricingSettingGroupHeader } from './PricingSetting/PricingSettingGroupHeader';\n\nexport const ListingDetailListingGroupHeader = ({\n selectedGroup,\n useVerticalView,\n shouldDetailsSideBySide,\n}: {\n selectedGroup: ListingGroup;\n useVerticalView: boolean;\n shouldDetailsSideBySide: boolean;\n}) => {\n const { loginContext } = useAppContext();\n const { getUiCurrency } = useLocalizationContext();\n const stubHubMkpSettings =\n loginContext?.user?.activeAccount?.marketplaceSettings?.find(\n (m) => m.mkp === Marketplace.StubHub\n );\n\n const uiCurrency = useMemo(\n () =>\n getUiCurrency(\n selectedGroup?.currency ??\n loginContext?.user?.activeAccount?.currencyCode\n ),\n [\n getUiCurrency,\n selectedGroup?.currency,\n loginContext?.user?.activeAccount?.currencyCode,\n ]\n );\n\n const flattenedListingGroup: Listing[] | undefined = useMemo(() => {\n if (!selectedGroup) {\n return;\n }\n\n return flattenListingGroup(selectedGroup).map((l) => l as Listing);\n }, [selectedGroup]);\n\n return (\n \n \n
    \n \n
    \n\n
    \n \n
    \n
    \n
    \n );\n};\n","import { isEqual } from 'lodash-es';\nimport { ChangeEvent, useCallback, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useToggle } from 'react-use';\nimport { OkButton } from 'src/components/Buttons/OkButton';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { FormatContent, useContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { useInventoryEventDetailContext } from 'src/contexts/InventoryEventDetailContext/InventoryEventDetailContext';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { InfoOutlineIcon } from 'src/svgs/Viagogo';\nimport { MinusIcon, PlusIcon } from 'src/svgs/Viagogo';\nimport { calculatePercentile } from 'src/utils/arrayUtils';\nimport { UndercutPriceSettingsMode } from 'src/utils/autoPricingUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { isSuccess } from 'src/utils/errorUtils';\nimport {\n getAllInPriceFromListPrice,\n getListPriceFromAllinPrice,\n} from 'src/utils/inventoryUtils';\nimport { roundToPrecision } from 'src/utils/numberFormatter';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ListingClient,\n ListingDetails,\n ListingDetailsAutoPricingSectionUpdates,\n UiCurrency,\n} from 'src/WebApiController';\n\nimport { CompListingPrices } from './CompListingPrices';\nimport { OutlierSettings } from './OutlierSettings';\nimport * as styles from './PricingSetting.css';\n\nconst UNDERCUT_PRICE_MODE_OPTIONS = [\n {\n value: UndercutPriceSettingsMode.Premium,\n children: ,\n },\n {\n value: UndercutPriceSettingsMode.Discount,\n children: ,\n },\n];\n\nconst CheckPrice = (\n value: number | null,\n median: number,\n threshold: number\n) => {\n if (!value || !median || threshold <= 0) {\n return null;\n }\n\n const percentDifference = ((value - median) / median) * 100;\n const absolutePercentDifference = Math.abs(percentDifference);\n\n if (absolutePercentDifference <= threshold) {\n return {\n isWithinThreshold: true,\n percentDifference: percentDifference,\n absolutePercentDifference: absolutePercentDifference,\n };\n }\n\n return {\n isWithinThreshold: false,\n isAbove: percentDifference > 0,\n isBelow: percentDifference < 0,\n percentDifference: percentDifference,\n absolutePercentDifference: absolutePercentDifference,\n };\n};\n\ntype PricingSettingAutoPriceProps = {\n uiCurrency: UiCurrency;\n sellerFee: number | null;\n useVerticalView: boolean;\n};\n\n/**\n * @deprecated This component is in the process of being deprecated. Please make sure to update\n * PricingSettingAutoPriceListing.tsx during the cutover process.\n */\nexport const PricingSettingAutoPrice = ({\n uiCurrency,\n sellerFee,\n useVerticalView,\n}: PricingSettingAutoPriceProps) => {\n const resetText = useContent(ContentId.Reset);\n const aboveText = useContent(ContentId.Above).toLocaleLowerCase();\n const belowText = useContent(ContentId.Below).toLocaleLowerCase();\n\n const { event, selectedListing, compListings } =\n useInventoryEventDetailContext();\n\n const { watch, reset, setValue, handleSubmit, formState } =\n useFormContext();\n\n const { activeAccountWebClientConfig } = useAppContext();\n\n const { updateActivePosEntityInfo } =\n useActivePosEntityContext();\n\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const [isLoading, setLoading] = useToggle(false);\n\n const onSubmitStart = useCallback(() => {\n setLoading(true);\n }, [setLoading]);\n\n const onSubmitDone = useCallback(\n async (success = true) => {\n if (selectedListing?.id && success) {\n const updatedListing = await new ListingClient(\n activeAccountWebClientConfig\n ).getListingByListingId(selectedListing.id, undefined, undefined);\n\n if (updatedListing) {\n updateActivePosEntityInfo({\n event,\n posEntity: updatedListing,\n posEntityId: updatedListing.id,\n posEntityDisplayId: updatedListing.idOnMkp,\n });\n }\n }\n setLoading(false);\n },\n [\n activeAccountWebClientConfig,\n event,\n selectedListing?.id,\n setLoading,\n updateActivePosEntityInfo,\n ]\n );\n\n const onSubmitHandler = useCallback(\n async (autoPricingSectionForm: ListingDetailsAutoPricingSectionUpdates) => {\n tryInvokeApi(\n async () => {\n onSubmitStart();\n const result = await new ListingClient(\n activeAccountWebClientConfig\n ).updateListingAutoPricingSection(autoPricingSectionForm);\n\n if (isSuccess(result)) {\n // Reset the form to latest changed\n reset(autoPricingSectionForm);\n await onSubmitDone();\n } else {\n showErrorDialog(\n 'ListingClient.updateListingAutoPricingSection',\n { message: result.message, status: result.status },\n {\n trackErrorData: {\n autoPricingSectionForm,\n },\n }\n );\n }\n },\n (error) => {\n showErrorDialog(\n 'ListingClient.updateListingAutoPricingSection',\n error,\n {\n trackErrorData: autoPricingSectionForm,\n }\n );\n },\n () => {\n onSubmitDone(false);\n }\n );\n },\n [\n activeAccountWebClientConfig,\n onSubmitDone,\n onSubmitStart,\n reset,\n showErrorDialog,\n ]\n );\n\n const onSubmit = useCallback(() => {\n handleSubmit(onSubmitHandler)();\n }, [handleSubmit, onSubmitHandler]);\n\n const onReset = useCallback(() => {\n reset({ ...(formState.defaultValues ?? {}) });\n }, [formState.defaultValues, reset]);\n\n const input = watch();\n\n const hasChanges = useMemo(() => {\n const defaultValues = formState.defaultValues;\n return (\n input.netProceedsFloor !== defaultValues?.netProceedsFloor ||\n input.netProceedsCeiling !== defaultValues?.netProceedsCeiling ||\n input.currencyCode !== defaultValues?.currencyCode ||\n input.autoPricingEnabled !== defaultValues?.autoPricingEnabled ||\n input.compListingFloor !== defaultValues?.compListingFloor ||\n input.compListingCeiling !== defaultValues?.compListingCeiling ||\n input.compListingMode !== defaultValues?.compListingMode ||\n input.compListingOnlyForSameZoneEnabled !==\n defaultValues?.compListingOnlyForSameZoneEnabled ||\n input.compListingOnlyForSelectedSectionsEnabled !==\n defaultValues?.compListingOnlyForSelectedSectionsEnabled ||\n input.compListingExcludeFanInventory !==\n defaultValues?.compListingExcludeFanInventory ||\n input.compListingExcludeDefects !==\n defaultValues?.compListingExcludeDefects ||\n input.compListingQuantityScoreAdjustmentEnabled !==\n defaultValues?.compListingQuantityScoreAdjustmentEnabled ||\n input.compListingQuantityScoreAdjustmentOverrideJson !==\n defaultValues?.compListingQuantityScoreAdjustmentOverrideJson ||\n input.undercutMode !== defaultValues?.undercutMode ||\n input.undercutAbsoluteAmount !== defaultValues?.undercutAbsoluteAmount ||\n input.undercutRelativeAmount !== defaultValues?.undercutRelativeAmount ||\n input.circuitBreakerMaxDiscountVelocityPercent !==\n defaultValues?.circuitBreakerMaxDiscountVelocityPercent ||\n input.circuitBreakerMaxDiscountVelocityTicksInHours !==\n defaultValues?.circuitBreakerMaxDiscountVelocityTicksInHours ||\n input.circuitBreakerMinCompListingCount !==\n defaultValues?.circuitBreakerMinCompListingCount ||\n input.circuitBreakerRelativeCeiling !==\n defaultValues?.circuitBreakerRelativeCeiling ||\n input.circuitBreakerRelativeFloor !==\n defaultValues?.circuitBreakerRelativeFloor ||\n input.outlierMode !== defaultValues?.outlierMode ||\n input.outlierStandardDeviations !==\n defaultValues?.outlierStandardDeviations ||\n input.outlierKthLowestLimit !== defaultValues?.outlierKthLowestLimit ||\n input.outlierKthLowestLimitRelativeSpacing !==\n defaultValues?.outlierKthLowestLimitRelativeSpacing ||\n input.outlierKthLowestLimitAbsoluteSpacing !==\n defaultValues?.outlierKthLowestLimitAbsoluteSpacing ||\n input.skipAdvancePricing !== defaultValues?.skipAdvancePricing ||\n input.skipAutoPricing !== defaultValues?.skipAutoPricing ||\n input.skipCompListing !== defaultValues?.skipCompListing ||\n input.skipUndercut !== defaultValues?.skipUndercut ||\n !isEqual(\n input.compListingSelectedSectionSettings,\n defaultValues?.compListingSelectedSectionSettings\n ) ||\n !isEqual(\n input.compListingQuantityFilters,\n defaultValues?.compListingQuantityFilters\n )\n );\n }, [input, formState.defaultValues]);\n\n const { netProceedsFloor } = input;\n\n const setPriceFloorText = `${useContent(ContentId.SetPriceFloor)}: ${\n uiCurrency.sym\n }`;\n\n const medianListingPrice = useMemo(() => {\n const ticketPrices: number[] = [];\n for (const listing of compListings ?? []) {\n if ((listing.availableTickets ?? 0) > 0) {\n const prices = Array(listing.availableTickets ?? 0).fill(\n listing.sellerAllInPrice?.amt ?? 0\n );\n ticketPrices.push(...prices);\n }\n }\n return calculatePercentile(ticketPrices, 50);\n }, [compListings]);\n\n const priceComparisonResult = useMemo(() => {\n return CheckPrice(netProceedsFloor, medianListingPrice, 25);\n }, [medianListingPrice, netProceedsFloor]);\n\n const onPriceFloorChange = useCallback(\n (e: ChangeEvent) => {\n const v = parseFloat(e.target.value);\n if (v >= 0 && v < Number.MAX_VALUE) {\n const netProceedsValueNew = getListPriceFromAllinPrice(\n v,\n null,\n sellerFee\n )!;\n setValue('netProceedsFloor', netProceedsValueNew);\n } else {\n setValue('netProceedsFloor', null);\n }\n },\n [setValue, sellerFee]\n );\n\n return (\n
    \n
    \n
    \n \n {setPriceFloorText}\n }\n value={\n getAllInPriceFromListPrice(netProceedsFloor, null, sellerFee) ??\n ''\n }\n onChange={onPriceFloorChange}\n uiCurrency={uiCurrency}\n />\n {priceComparisonResult &&\n !priceComparisonResult.isWithinThreshold && (\n
    \n \n \n \n \n
    \n )}\n
    \n\n \n
    \n
    \n \n {resetText}\n \n \n
    \n
    \n );\n};\n","import { isEqual } from 'lodash-es';\nimport { useCallback, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useToggle } from 'react-use';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { useInventoryEventDetailContext } from 'src/contexts/InventoryEventDetailContext/InventoryEventDetailContext';\nimport { isSuccess } from 'src/utils/errorUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ListingClient,\n ListingDetails,\n ListingDetailsAutoPricingSectionUpdates,\n UiCurrency,\n} from 'src/WebApiController';\n\nimport { PricingSettingAutoPriceBody } from './PricingSettingAutoPriceBody';\n\ntype PricingSettingAutoPriceListingProps = {\n uiCurrency: UiCurrency;\n sellerFee: number | null;\n useVerticalView: boolean;\n};\n\nexport const PricingSettingAutoPriceListing = ({\n uiCurrency,\n sellerFee,\n useVerticalView,\n}: PricingSettingAutoPriceListingProps) => {\n const { watch, reset, handleSubmit, formState } =\n useFormContext();\n const { event, selectedListing } = useInventoryEventDetailContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n const { updateActivePosEntityInfo } =\n useActivePosEntityContext();\n\n const [isLoading, setLoading] = useToggle(false);\n\n const onSubmitStart = useCallback(() => {\n setLoading(true);\n }, [setLoading]);\n\n const onSubmitDone = useCallback(\n async (success = true) => {\n if (selectedListing?.id && success) {\n const updatedListing = await new ListingClient(\n activeAccountWebClientConfig\n ).getListingByListingId(selectedListing.id, undefined, undefined);\n\n if (updatedListing) {\n updateActivePosEntityInfo({\n event,\n posEntity: updatedListing,\n posEntityId: updatedListing.id,\n posEntityDisplayId: updatedListing.idOnMkp,\n });\n }\n }\n setLoading(false);\n },\n [\n activeAccountWebClientConfig,\n event,\n selectedListing?.id,\n setLoading,\n updateActivePosEntityInfo,\n ]\n );\n\n const onSubmitHandler = useCallback(\n async (autoPricingSectionForm: ListingDetailsAutoPricingSectionUpdates) => {\n tryInvokeApi(\n async () => {\n onSubmitStart();\n const result = await new ListingClient(\n activeAccountWebClientConfig\n ).updateListingAutoPricingSection(autoPricingSectionForm);\n\n if (isSuccess(result)) {\n // Reset the form to latest changed\n reset(autoPricingSectionForm);\n await onSubmitDone();\n } else {\n showErrorDialog(\n 'ListingClient.updateListingAutoPricingSection',\n { message: result.message, status: result.status },\n {\n trackErrorData: {\n autoPricingSectionForm,\n },\n }\n );\n }\n },\n (error) => {\n showErrorDialog(\n 'ListingClient.updateListingAutoPricingSection',\n error,\n {\n trackErrorData: autoPricingSectionForm,\n }\n );\n },\n () => {\n onSubmitDone(false);\n }\n );\n },\n [\n activeAccountWebClientConfig,\n onSubmitDone,\n onSubmitStart,\n reset,\n showErrorDialog,\n ]\n );\n\n const onSubmit = useCallback(() => {\n handleSubmit(onSubmitHandler)();\n }, [handleSubmit, onSubmitHandler]);\n\n const onReset = useCallback(() => {\n reset({ ...(formState.defaultValues ?? {}) });\n }, [formState.defaultValues, reset]);\n\n const input = watch();\n\n const hasChanges = useMemo(() => {\n const defaultValues = formState.defaultValues;\n return (\n input.netProceedsFloor !== defaultValues?.netProceedsFloor ||\n input.netProceedsCeiling !== defaultValues?.netProceedsCeiling ||\n input.currencyCode !== defaultValues?.currencyCode ||\n input.autoPricingEnabled !== defaultValues?.autoPricingEnabled ||\n input.compListingFloor !== defaultValues?.compListingFloor ||\n input.compListingCeiling !== defaultValues?.compListingCeiling ||\n input.compListingMode !== defaultValues?.compListingMode ||\n input.compListingOnlyForSameZoneEnabled !==\n defaultValues?.compListingOnlyForSameZoneEnabled ||\n input.compListingOnlyForSelectedSectionsEnabled !==\n defaultValues?.compListingOnlyForSelectedSectionsEnabled ||\n input.compListingExcludeFanInventory !==\n defaultValues?.compListingExcludeFanInventory ||\n input.compListingExcludeDefects !==\n defaultValues?.compListingExcludeDefects ||\n input.compListingQuantityScoreAdjustmentEnabled !==\n defaultValues?.compListingQuantityScoreAdjustmentEnabled ||\n input.compListingQuantityScoreAdjustmentOverrideJson !==\n defaultValues?.compListingQuantityScoreAdjustmentOverrideJson ||\n input.undercutMode !== defaultValues?.undercutMode ||\n input.undercutAbsoluteAmount !== defaultValues?.undercutAbsoluteAmount ||\n input.undercutRelativeAmount !== defaultValues?.undercutRelativeAmount ||\n input.circuitBreakerMaxDiscountVelocityPercent !==\n defaultValues?.circuitBreakerMaxDiscountVelocityPercent ||\n input.circuitBreakerMaxDiscountVelocityTicksInHours !==\n defaultValues?.circuitBreakerMaxDiscountVelocityTicksInHours ||\n input.circuitBreakerMinCompListingCount !==\n defaultValues?.circuitBreakerMinCompListingCount ||\n input.circuitBreakerRelativeCeiling !==\n defaultValues?.circuitBreakerRelativeCeiling ||\n input.circuitBreakerRelativeFloor !==\n defaultValues?.circuitBreakerRelativeFloor ||\n input.outlierMode !== defaultValues?.outlierMode ||\n input.outlierStandardDeviations !==\n defaultValues?.outlierStandardDeviations ||\n input.outlierKthLowestLimit !== defaultValues?.outlierKthLowestLimit ||\n input.outlierKthLowestLimitRelativeSpacing !==\n defaultValues?.outlierKthLowestLimitRelativeSpacing ||\n input.outlierKthLowestLimitAbsoluteSpacing !==\n defaultValues?.outlierKthLowestLimitAbsoluteSpacing ||\n input.skipAdvancePricing !== defaultValues?.skipAdvancePricing ||\n input.skipAutoPricing !== defaultValues?.skipAutoPricing ||\n input.skipCompListing !== defaultValues?.skipCompListing ||\n input.skipUndercut !== defaultValues?.skipUndercut ||\n !isEqual(\n input.compListingSelectedSectionSettings,\n defaultValues?.compListingSelectedSectionSettings\n ) ||\n !isEqual(\n input.compListingQuantityFilters,\n defaultValues?.compListingQuantityFilters\n )\n );\n }, [input, formState.defaultValues]);\n\n const {\n undercutMode,\n undercutRelativeAmount,\n undercutAbsoluteAmount,\n compListingMode,\n outlierMode,\n outlierStandardDeviations,\n outlierKthLowestLimit,\n outlierKthLowestLimitAbsoluteSpacing,\n outlierKthLowestLimitRelativeSpacing,\n } = input;\n\n return (\n \n );\n};\n","import { useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Switch } from 'src/core/ui';\nimport { Divider } from 'src/modals/common/Summary/Summary.styled';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n Listing,\n ListingDetailsAutoPricingSectionUpdates,\n} from 'src/WebApiController';\n\nimport { StatLabel } from '../../../Map/StatLabel';\nimport * as styles from './PricingSetting.css';\n\nexport const PricingSettingHeader = ({ listing }: { listing: Listing }) => {\n const { watch, setValue } =\n useFormContext();\n const { autoPricingEnabled } = watch();\n\n const sanitizedSeatDisplay = useMemo(() => {\n if (listing.seating?.seatFr === listing.seating?.seatTo) {\n return `${listing.seating?.seatFr}`;\n }\n return `${listing.seating?.seatFr} - ${listing.seating?.seatTo}`;\n }, [listing.seating?.seatFr, listing.seating?.seatTo]);\n\n return (\n
    \n }\n />\n \n }\n />\n \n }\n />\n \n }\n />\n \n e.stopPropagation()}\n onCheckedChange={(isChecked) => {\n const checked = isChecked;\n setValue('autoPricingEnabled', checked);\n }}\n />\n
    \n );\n};\n","import { useCallback, useEffect, useState } from 'react';\nimport { OkButton } from 'src/components/Buttons/OkButton';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { useEventHubContext } from 'src/contexts/EventHubContext';\nimport { useInventoryEventDetailContext } from 'src/contexts/InventoryEventDetailContext/InventoryEventDetailContext';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { Button } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { isSuccess } from 'src/utils/errorUtils';\nimport {\n getAllInPriceFromListPrice,\n getListPriceFromAllinPrice,\n} from 'src/utils/inventoryUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n ListingClient,\n ListingDetailDataField,\n ListingDetails,\n ListingDetailsPricingSectionUpdates,\n UiCurrency,\n} from 'src/WebApiController';\n\nimport * as styles from './PricingSetting.css';\n\ntype PricingSettingManualPriceProps = {\n uiCurrency: UiCurrency;\n sellerFee: number | null;\n};\n\n/**\n * Requires ListingLoadBySection to work\n */\nexport const PricingSettingManualPrice: React.FC<\n PricingSettingManualPriceProps\n> = ({ uiCurrency, sellerFee }) => {\n const setPriceText = useContent(ContentId.Permission_SetPrice);\n const resetText = useContent(ContentId.Reset);\n\n const { activeAccountWebClientConfig } = useAppContext();\n const { selectedListing } = useInventoryEventDetailContext();\n const { updateItemInEvent } = useCatalogDataContext();\n const { onUpdateListing } = useEventHubContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const [listPrice, setListPrice] = useState(\n selectedListing?.listPrice ?? null\n );\n\n // This is to ensure that we use the correct list price when switching selected listing\n useEffect(() => {\n if (selectedListing?.listPrice != null) {\n setListPrice(selectedListing?.listPrice);\n }\n }, [selectedListing?.listPrice]);\n\n const [isSubmitting, setIsSubmitting] = useState(false);\n\n const submitPriceChange = useCallback(() => {\n if (!selectedListing) return;\n\n tryInvokeApi(\n async () => {\n setIsSubmitting(true);\n const client = new ListingClient(activeAccountWebClientConfig);\n\n const input: ListingDetailsPricingSectionUpdates = {\n id: selectedListing.id,\n rowVersion: null,\n listPrice,\n allInPrice: null, // will be inferred from list price\n buyerUserId: null,\n marketplacePriceUpdates: [],\n autoPricingEnabled: false, // updating manual price will disable auto price\n netProceedsFloor: selectedListing.procsFloor,\n pricerSellerUserId: selectedListing.pricerId,\n netProceedsCeiling: selectedListing.procsCeil,\n currencyCode: selectedListing.currency,\n };\n const result = await client.updateListingPricingSection(input);\n if (isSuccess(result)) {\n const updated = await client.getListingByListingId(\n selectedListing.id,\n selectedListing as ListingDetails,\n [ListingDetailDataField.Pricing]\n );\n if (updated) {\n updateItemInEvent(updated, ActionOutboxEntityType.Listing);\n onUpdateListing(updated.id);\n setIsSubmitting(false);\n }\n }\n },\n (error) => {\n showErrorDialog('ListingClient.updateListing(prices)', error, {\n trackErrorData: { listingId: selectedListing.id, listPrice },\n });\n }\n );\n }, [\n selectedListing,\n activeAccountWebClientConfig,\n listPrice,\n updateItemInEvent,\n onUpdateListing,\n showErrorDialog,\n ]);\n\n return (\n
    \n
    \n {`${setPriceText}: ${uiCurrency.sym}`}\n }\n value={getAllInPriceFromListPrice(listPrice, null, sellerFee) ?? ''}\n onChange={(e) => {\n const price = parseFloat(e.target.value);\n if (!isNaN(price)) {\n const listPriceNew = getListPriceFromAllinPrice(\n price,\n null,\n sellerFee\n )!;\n setListPrice(listPriceNew);\n }\n }}\n />\n
    \n
    \n setListPrice(selectedListing?.listPrice ?? null)}\n shape=\"none\"\n >\n {resetText}\n \n \n
    \n
    \n );\n};\n","import clsx from 'clsx';\nimport { useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { Stack } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport {\n Feature,\n Listing,\n ListingDetailsAutoPricingSectionUpdates,\n Marketplace,\n} from 'src/WebApiController';\n\nimport * as styles from './ListingDetailPanel.css';\nimport { PricingSettingAutoPrice } from './PricingSetting/PricingSettingAutoPrice';\nimport { PricingSettingAutoPriceListing } from './PricingSetting/PricingSettingAutoPriceListing';\nimport { PricingSettingHeader } from './PricingSetting/PricingSettingHeader';\nimport { PricingSettingManualPrice } from './PricingSetting/PricingSettingManualPrice';\n\nexport const ListingDetailListingHeader = ({\n selectedListing,\n useVerticalView,\n shouldDetailsSideBySide,\n}: {\n selectedListing: Listing;\n useVerticalView: boolean;\n shouldDetailsSideBySide: boolean;\n}) => {\n const hasGroupSelectionFeature = useUserHasFeature(\n Feature.OnePagerGroupSelectionFunctionality\n );\n const { loginContext } = useAppContext();\n const { getUiCurrency } = useLocalizationContext();\n const stubHubMkpSettings =\n loginContext?.user?.activeAccount?.marketplaceSettings?.find(\n (m) => m.mkp === Marketplace.StubHub\n );\n\n const uiCurrency = useMemo(\n () =>\n getUiCurrency(\n selectedListing?.currency ??\n loginContext?.user?.activeAccount?.currencyCode\n ),\n [\n getUiCurrency,\n selectedListing?.currency,\n loginContext?.user?.activeAccount?.currencyCode,\n ]\n );\n\n const { watch } = useFormContext();\n const { autoPricingEnabled } = watch();\n\n return (\n \n \n
    \n \n
    \n\n
    \n {autoPricingEnabled ? (\n hasGroupSelectionFeature ? (\n \n ) : (\n \n )\n ) : (\n \n )}\n
    \n
    \n
    \n );\n};\n","import clsx from 'clsx';\nimport { useMemo } from 'react';\nimport { useMeasure } from 'react-use';\nimport { ConnectedComparableListings } from 'src/components/Listings/ConnectedComparableListings';\nimport { useInventoryEventDetailContext } from 'src/contexts/InventoryEventDetailContext/InventoryEventDetailContext';\nimport { Stack } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { flattenListingGroup } from 'src/modals/GroupListings/components/groupingUtils';\nimport { getListPriceFromAllinPrice } from 'src/utils/inventoryUtils';\nimport { Feature, Listing } from 'src/WebApiController';\n\nimport { ListingDetailListingGroupHeader } from './ListingDetailListingGroupHeader';\nimport { ListingDetailListingHeader } from './ListingDetailListingHeader';\nimport * as styles from './ListingDetailPanel.css';\n\ntype ListingDetailPanelProps = {\n useVerticalView: boolean;\n};\n\nexport const ListingDetailPanel: React.FC = ({\n useVerticalView,\n}) => {\n const {\n selectedListing,\n selectedGroup,\n compListings,\n priceCalcQuery,\n isLoading,\n } = useInventoryEventDetailContext();\n\n const hasGroupSelectionFeature = useUserHasFeature(\n Feature.OnePagerGroupSelectionFunctionality\n );\n\n const flattenedListingGroup: Listing[] | undefined = useMemo(() => {\n if (!selectedGroup) {\n return;\n }\n\n return flattenListingGroup(selectedGroup).map((l) => l as Listing);\n }, [selectedGroup]);\n\n const listingWithUpdatedPrice = useMemo(() => {\n if (!selectedListing) return;\n\n const listPrice = getListPriceFromAllinPrice(\n priceCalcQuery?.data?.websitePrice?.amt,\n selectedListing\n );\n return {\n ...selectedListing,\n // This is to make sure we use the auto-preview price instead of the listing's price when showing comparables\n // And we have to override listPrice because allIn is calculated from listPrice (instead of being read from the listing)\n listPrice: listPrice ?? selectedListing.listPrice,\n };\n }, [priceCalcQuery?.data?.websitePrice?.amt, selectedListing]);\n\n const [detailsRef, { height }] = useMeasure();\n const shouldDetailsSideBySide = useMemo(() => height < 750, [height]);\n\n return (\n \n {selectedListing ? (\n \n ) : null}\n {selectedGroup && hasGroupSelectionFeature ? (\n \n ) : null}\n
    \n \n
    \n
    \n );\n};\n","import { useCallback, useEffect, useRef, useState } from 'react';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { Button, Stack, TextArea } from 'src/core/ui';\nimport { useSellerEventNote } from 'src/hooks/api/useSellerEventNote';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { stringToUtcDate } from 'src/utils/dateTimeUtils';\nimport { Permission } from 'src/WebApiController';\n\nimport * as styles from './NoteSectionV2.css';\n\nexport const NoteSectionV2 = ({\n eventId,\n disabled,\n}: {\n eventId: number | null;\n disabled?: boolean;\n}) => {\n const hasEventsEditPermission = useUserHasAnyOfPermissions(\n Permission.Events_Edit\n );\n\n const [newNote, setNewNote] = useState('');\n\n const { notes, addNote, isLoading } = useSellerEventNote(eventId);\n\n const handleKeyPress = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.key === 'Enter') {\n if (e.shiftKey) {\n e.preventDefault();\n setNewNote((prevNote) => prevNote + '\\n');\n } else {\n e.preventDefault();\n addNote(newNote);\n setNewNote('');\n }\n }\n },\n [addNote, newNote]\n );\n\n const messagesStartRef = useRef(null);\n const scrollToBottom = () => {\n if (messagesStartRef.current) {\n messagesStartRef.current.scrollIntoView({ behavior: 'smooth' });\n }\n };\n\n useEffect(() => {\n scrollToBottom();\n }, [notes]);\n\n return (\n \n \n \n {\n setNewNote(e.target.value);\n }}\n onKeyDown={handleKeyPress}\n placeholder={useContent(ContentId.TypeYourNoteHere)}\n >\n \n {\n addNote(newNote);\n setNewNote('');\n }}\n disabled={\n !hasEventsEditPermission ||\n disabled ||\n newNote.trim() === '' ||\n isLoading\n }\n >\n \n \n \n
    \n {notes?.map((note) => {\n const localDateString = stringToUtcDate(\n note.createDate\n ).toLocaleString();\n\n return (\n \n
    \n {note.sellerDisplayName} • {localDateString}\n
    \n
    {note.content}
    \n
    \n );\n })}\n
    \n
    \n \n );\n};\n","import { useInventoryEventDetailContext } from 'src/contexts/InventoryEventDetailContext/InventoryEventDetailContext';\n\nimport { NoteSectionV2 } from '../../../Sections/NoteSectionV2';\n\nexport const NotesDetailPanel = () => {\n const { event } = useInventoryEventDetailContext();\n return !event ? null : ;\n};\n","import {\n EventAccordionItemBodyComponentType,\n MinRowsForUsingVirtuoso,\n} from 'src/components/Accordions';\nimport { useCollapsableViewContext } from 'src/contexts/CollapsableViewContext/CollapsableViewContext';\nimport { PurchaseOrderTable } from 'src/tables/PurchaseTable';\nimport {\n PurchaseOrderTicketGroup,\n PurchaseViewMode,\n} from 'src/WebApiController';\n\ntype EventTicketGroupBodyProps =\n EventAccordionItemBodyComponentType;\n\nexport const EventTicketGroupBody = (props: EventTicketGroupBodyProps) => {\n const Body = PurchaseOrderTableEventAccordionWrapper;\n\n return ;\n};\n\nconst PurchaseOrderTableEventAccordionWrapper = (\n props: EventTicketGroupBodyProps\n) => {\n const {\n entities: ticketGroups,\n entityCount: ticketGrpsCnt,\n getDataFail,\n ...rest\n } = props;\n\n const hasVirtuosoMinRows = ticketGrpsCnt > MinRowsForUsingVirtuoso;\n\n const { isEnabled } = useCollapsableViewContext();\n\n return (\n \n );\n};\n","import { ReactNode } from 'react';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { Permission } from 'src/WebApiController';\n\ninterface PurchaseMultiSelectPermissionsProps {\n children: ReactNode;\n}\n\nexport const PurchasesBulkActionsPermissions = ({\n children,\n}: PurchaseMultiSelectPermissionsProps) => {\n const hasPurchaseUpdatePermission = useUserHasAnyOfPermissions(\n Permission.Purchases_Edit,\n Permission.Purchases_EditOwned\n );\n\n if (!hasPurchaseUpdatePermission) {\n return null;\n }\n\n return <>{children};\n};\n","import { useFilterQueryState } from 'src/components/MainFilterBar/useFilterQueryState';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport {\n ActionOutboxEntityType,\n PurchaseOrderQuery,\n} from 'src/WebApiController';\n\nexport const usePurchaseTileBulkActionsState = (\n groupId?: string,\n isEventView?: boolean\n) => {\n const { getSelection, isAllSelected } = useMultiSelectionContext();\n\n const groupSelection = getSelection(groupId);\n\n const { filterQueryWithEventIds } = useFilterQueryState(\n ActionOutboxEntityType.Purchase,\n groupId ? [groupId] : undefined,\n isEventView\n );\n\n return {\n allPurchasesSelected: isAllSelected,\n groupSelection,\n filterQueryWithEventIds,\n };\n};\n","import { HubConnectionState } from '@microsoft/signalr';\nimport { ComponentProps, useCallback, useRef, useState } from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { BulkEditStatus } from 'src/components/common/BulkActions/BulkEditStatus';\nimport {\n IPosEntity,\n useActivePosEntityContext,\n} from 'src/contexts/ActivePosEntityContext';\nimport {\n BulkEditStage,\n useBulkEditHubContext,\n} from 'src/contexts/BulkEditHubContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { useCatalogMetricsContext } from 'src/contexts/CatalogMetricsContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { usePurchaseDataContext } from 'src/contexts/PurchaseDataContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { Stack } from 'src/core/ui';\nimport {\n CancelPurchaseDialogModeRadioGroup,\n PurchaseCancellationType,\n} from 'src/dialogs/CancelPurchaseDialog';\nimport { useBulkEditHub } from 'src/hooks/useBulkEditHub';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n ActionOutboxEntityType,\n BulkActionType,\n BulkEditPreviewWithDetails,\n BulkEditProgress,\n BulkEditStep,\n} from 'src/WebApiController';\n\nimport { BulkEditFooter } from '../common/BulkEditFooter';\nimport { BulkEditHeader } from '../common/BulkEditHeader';\n\nexport type BulkCancelPurchaseDialogProps = ComponentProps & {\n updateKey: string;\n onOkay: (\n cancellationType: PurchaseCancellationType | null,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => void;\n onCancel: () => void;\n};\n\nexport function BulkCancelPurchaseDialog({\n updateKey,\n onOkay,\n onCancel,\n ...rest\n}: BulkCancelPurchaseDialogProps) {\n const [cancellationType, setCancellationType] =\n useState('cancel');\n\n const [isLoading, setIsLoading] = useState(false);\n\n const { setActivePosEntity } = useActivePosEntityContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n refreshCatalog,\n } = useCatalogDataContext();\n const { refreshMetrics } = useCatalogMetricsContext();\n const { refreshData } = usePurchaseDataContext();\n const { setSelectionMode } = useMultiSelectionContext();\n const { setProgress, setPreview, setMainDialogOpened } =\n useBulkEditHubContext();\n\n const onClose = useCallback(\n async (\n newProgress?: BulkEditProgress,\n closeMainDialogForPopover?: boolean\n ) => {\n if (newProgress?.step === BulkEditStep.Done) {\n setIsRefreshing(true);\n setActivePosEntity(0);\n\n await refreshData(true);\n\n // Metrics/events may have changed with TGs being cancelled, so refresh the whole catalog\n refreshMetrics();\n await refreshCatalog();\n await refreshExpandedListItems();\n\n setSelectionMode(undefined);\n if (closeMainDialogForPopover) {\n setMainDialogOpened(false);\n } else {\n setProgress(undefined);\n }\n setIsRefreshing(false);\n // progress kept to allow the BulkEditStatusPopover to show the result\n }\n onCancel();\n },\n [\n onCancel,\n refreshCatalog,\n refreshData,\n refreshExpandedListItems,\n refreshMetrics,\n setActivePosEntity,\n setMainDialogOpened,\n setProgress,\n setSelectionMode,\n ]\n );\n\n const onBulkEditDone = useCallback(\n async (doneProgress: BulkEditProgress, finalErrors: string[]) => {\n if (finalErrors.length === 0 && doneProgress.step === BulkEditStep.Done) {\n onClose(doneProgress, true);\n }\n },\n [onClose]\n );\n\n const { bulkEditHub, progress, preview, initJob, stage } = useBulkEditHub(\n ActionOutboxEntityType.Purchase,\n BulkActionType.CancelPurchase,\n updateKey,\n onBulkEditDone\n );\n\n const hasBackgroundBulkEditFeature =\n bulkEditHub?.state === HubConnectionState.Connected;\n\n const [isSecondScreen, setIsSecondScreen] = useState(false);\n\n const onSubmitHandler = useCallback(\n (onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n onOkay(null, false, onPreviewReceived);\n } else {\n onOkay(\n cancellationType,\n hasBackgroundBulkEditFeature,\n undefined,\n preview\n );\n }\n setIsLoading(false);\n },\n [onOkay, cancellationType, preview, hasBackgroundBulkEditFeature]\n );\n\n const [isRefreshing, setIsRefreshing] = useState(false);\n\n const submittButtonRef = useRef(null);\n\n return (\n <>\n }\n />\n }\n onOpened={() => {\n initJob();\n }}\n onKeyUp={(e) => {\n if (submittButtonRef.current && e.key === 'Enter') {\n submittButtonRef.current.click();\n }\n }}\n onClosed={() => {\n setMainDialogOpened(false);\n if (progress) {\n setSelectionMode(undefined);\n }\n // Call the outside one if there is one\n rest.onClosed?.();\n }}\n footer={\n {\n if (!isSecondScreen) {\n setIsSecondScreen(true);\n return false; // don't proceed to preview\n }\n\n return true; // proceed to preview\n }}\n />\n }\n onCancel={isLoading ? undefined : onCancel}\n >\n \n \n {!isLoading && !progress?.failureCount && (\n <>\n {isSecondScreen ? (\n \n ) : (\n {\n if (value === 'cancel' || value === 'void') {\n setCancellationType(value);\n }\n }}\n value={cancellationType}\n />\n )}\n \n )}\n \n \n \n \n );\n}\n","import { useUpdatePurchasesPermissions } from 'src/components/Purchases/BulkActions/useUpdatePurchasesPermissions';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { Stack } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Feature } from 'src/WebApiController';\n\nexport const LaunchBulkCancelPurchase = ({\n onClick,\n disabled,\n}: {\n onClick: (e: React.MouseEvent) => void;\n disabled?: boolean;\n}) => {\n const { hasUpdatePurchasesPermission } = useUpdatePurchasesPermissions();\n const hasBulkCancelVoidPurchaseFeature = useUserHasFeature(\n Feature.BulkCancelVoidPurchase\n );\n\n if (!hasUpdatePurchasesPermission || !hasBulkCancelVoidPurchaseFeature) {\n return null;\n }\n\n return (\n <>\n \n \n \n \n \n \n );\n};\n","import { useCallback } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { useCatalogMetricsContext } from 'src/contexts/CatalogMetricsContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { usePurchaseDataContext } from 'src/contexts/PurchaseDataContext';\nimport { BulkCancelPurchaseDialog } from 'src/dialogs/BulkEdits/BulkCancelPurchaseDialog';\nimport { PurchaseCancellationType } from 'src/dialogs/CancelPurchaseDialog';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n BulkEditPreviewWithDetails,\n BulkEditPurchaseClient,\n PurchaseOrderQuery,\n} from 'src/WebApiController';\n\nimport { PURCHASE_BULK_CANCEL_UPDATE_KEY } from '../../PurchaseActionDropdown.constants';\nimport { LaunchBulkCancelPurchase } from './LaunchBulkCancelPurchase';\n\nexport const useBulkCancelPurchase = (\n filterQuery: PurchaseOrderQuery,\n setIsLoading: (v: boolean) => void,\n isLoading?: boolean,\n groupId?: string\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const updateKey = groupId\n ? `cancelPurchases-event-${groupId}`\n : PURCHASE_BULK_CANCEL_UPDATE_KEY;\n\n const { showErrorDialog } = useErrorBoundaryContext();\n const { refreshData } = usePurchaseDataContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n refreshCatalog,\n } = useCatalogDataContext();\n const { refreshMetrics } = useCatalogMetricsContext();\n\n const {\n openDialog: openBulkCancelDialog,\n closeDialog: closeBulkCancelDialog,\n } = useDialog(DialogId.BulkCancelPurchase, BulkCancelPurchaseDialog);\n\n const onSubmit = useCallback(\n async (\n cancellationType: PurchaseCancellationType | null,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n await tryInvokeApi(\n async () => {\n const client = new BulkEditPurchaseClient(\n activeAccountWebClientConfig\n );\n\n const preview =\n await client.bulkDeletePurchaseOrderPreview(filterQuery);\n\n onPreviewReceived(preview);\n },\n (error) => {\n showErrorDialog('bulkUpdateTagsPreview', error, {\n trackErrorData: { filterQuery },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n } else if (cancellationType) {\n await tryInvokeApi(\n async () => {\n const succeeded =\n cancellationType === 'cancel'\n ? await new BulkEditPurchaseClient(\n activeAccountWebClientConfig\n ).bulkCancelPurchaseOrder(\n {\n item1: preview!.preview, \n item2: null\n },\n updateKey,\n supportBackgroundProcess,\n null\n )\n : await new BulkEditPurchaseClient(\n activeAccountWebClientConfig\n ).bulkVoidPurchaseOrder(\n preview!.preview,\n updateKey,\n supportBackgroundProcess\n );\n\n if (!supportBackgroundProcess) {\n if (succeeded) {\n await refreshData(true);\n // Metrics/events may have changed with TGs being cancelled, so refresh the whole catalog\n refreshMetrics();\n await refreshCatalog();\n await refreshExpandedListItems();\n }\n\n closeBulkCancelDialog();\n }\n },\n (error) => {\n showErrorDialog('onSubmitCancelPurchase', error, {\n trackErrorData: { preview, cancellationType },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n }\n },\n [\n activeAccountWebClientConfig,\n closeBulkCancelDialog,\n filterQuery,\n refreshCatalog,\n refreshData,\n refreshExpandedListItems,\n refreshMetrics,\n setIsLoading,\n showErrorDialog,\n updateKey,\n ]\n );\n\n return {\n dropDown: (\n {\n e.preventDefault();\n e.stopPropagation();\n openBulkCancelDialog({\n updateKey,\n onOkay: onSubmit,\n onClosed: () => {\n setIsLoading(false);\n },\n onCancel: closeBulkCancelDialog,\n });\n }}\n disabled={isLoading}\n />\n ),\n };\n};\n","import { HubConnectionState } from '@microsoft/signalr';\nimport { ComponentProps, useCallback, useMemo, useRef, useState } from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { BulkEditStatus } from 'src/components/common/BulkActions/BulkEditStatus';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport {\n BulkEditStage,\n useBulkEditHubContext,\n} from 'src/contexts/BulkEditHubContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { useCatalogMetricsContext } from 'src/contexts/CatalogMetricsContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { usePurchaseDataContext } from 'src/contexts/PurchaseDataContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { useBulkEditHub } from 'src/hooks/useBulkEditHub';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n ActionOutboxEntityType,\n BulkActionType,\n BulkEditPreviewWithDetails,\n BulkEditProgress,\n BulkEditStep,\n PurchaseOrderDetails,\n} from 'src/WebApiController';\n\nimport { BulkEditFooter } from '../common/BulkEditFooter';\nimport { BulkEditHeader } from '../common/BulkEditHeader';\n\nexport type BulkDeleteTicketGroupDialogProps = ComponentProps<\n typeof RSModal\n> & {\n updateKey: string;\n onOkay: (\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => void;\n onCancel: () => void;\n};\n\nexport function BulkDeleteTicketGroupDialog({\n updateKey,\n onOkay,\n onCancel,\n ...rest\n}: BulkDeleteTicketGroupDialogProps) {\n const { setActivePosEntity } =\n useActivePosEntityContext();\n const { refreshData } = usePurchaseDataContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n refreshCatalog,\n } = useCatalogDataContext();\n const { refreshMetrics } = useCatalogMetricsContext();\n const { setSelectionMode } = useMultiSelectionContext();\n const { setProgress, setPreview, setMainDialogOpened } =\n useBulkEditHubContext();\n const [isLoading, setIsLoading] = useState(false);\n\n const onClose = useCallback(\n async (\n newProgress?: BulkEditProgress,\n closeMainDialogForPopover?: boolean\n ) => {\n if (newProgress?.step === BulkEditStep.Done) {\n setIsRefreshing(true);\n setActivePosEntity(0);\n\n await refreshData(true);\n\n // Metrics/events may have changed with TGs being cancelled, so refresh the whole catalog\n refreshMetrics();\n await refreshCatalog();\n await refreshExpandedListItems();\n\n setSelectionMode(undefined);\n if (closeMainDialogForPopover) {\n setMainDialogOpened(false);\n } else {\n setProgress(undefined);\n setPreview(undefined);\n }\n setIsRefreshing(false);\n // progress kept to allow the BulkEditStatusPopover to show the result\n }\n onCancel();\n },\n [\n onCancel,\n refreshCatalog,\n refreshData,\n refreshExpandedListItems,\n refreshMetrics,\n setActivePosEntity,\n setMainDialogOpened,\n setPreview,\n setProgress,\n setSelectionMode,\n ]\n );\n\n const onBulkEditDone = useCallback(\n async (doneProgress: BulkEditProgress, finalErrors: string[]) => {\n if (finalErrors.length === 0 && doneProgress.step === BulkEditStep.Done) {\n onClose(doneProgress, true);\n }\n },\n [onClose]\n );\n\n const { bulkEditHub, progress, preview, initJob, stage } = useBulkEditHub(\n ActionOutboxEntityType.TicketGroup,\n BulkActionType.DeleteTicketGroup,\n updateKey,\n onBulkEditDone\n );\n\n const hasBackgroundBulkEditFeature = useMemo(\n () => bulkEditHub?.state === HubConnectionState.Connected,\n [bulkEditHub?.state]\n );\n\n const onSubmitHandler = useCallback(\n (onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n onOkay(false, onPreviewReceived);\n } else {\n onOkay(hasBackgroundBulkEditFeature, undefined, preview);\n }\n setIsLoading(false);\n },\n [onOkay, preview, hasBackgroundBulkEditFeature]\n );\n\n const [isRefreshing, setIsRefreshing] = useState(false);\n const submittButtonRef = useRef(null);\n\n return (\n <>\n }\n />\n }\n onOpened={() => {\n initJob();\n }}\n onKeyUp={(e) => {\n if (submittButtonRef.current && e.key === 'Enter') {\n submittButtonRef.current.click();\n }\n }}\n onClosed={() => {\n setMainDialogOpened(false);\n if (progress) {\n setSelectionMode(undefined);\n }\n // Call the outside one if there is one\n rest.onClosed?.();\n }}\n footer={\n \n }\n onCancel={isLoading ? undefined : onCancel}\n >\n \n \n \n \n \n );\n}\n","import { useUpdatePurchasesPermissions } from 'src/components/Purchases/BulkActions/useUpdatePurchasesPermissions';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { Stack } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Feature } from 'src/WebApiController';\n\nexport const LaunchBulkDeleteTicketGroup = ({\n onClick,\n disabled,\n}: {\n onClick: (e: React.MouseEvent) => void;\n disabled?: boolean;\n}) => {\n const { hasUpdatePurchasesPermission } = useUpdatePurchasesPermissions();\n const hasBulkDeleteTicketGroupFeature = useUserHasFeature(\n Feature.BulkDeleteTicketGroup\n );\n\n if (!hasUpdatePurchasesPermission || !hasBulkDeleteTicketGroupFeature) {\n return null;\n }\n\n return (\n <>\n \n \n \n \n \n \n );\n};\n","import { useCallback } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { useCatalogMetricsContext } from 'src/contexts/CatalogMetricsContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { usePurchaseDataContext } from 'src/contexts/PurchaseDataContext';\nimport { BulkDeleteTicketGroupDialog } from 'src/dialogs/BulkEdits/BulkDeleteTicketGroupDialog';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n BulkEditPreviewWithDetails,\n BulkEditTicketGroupClient,\n PurchaseOrderQuery,\n} from 'src/WebApiController';\n\nimport { TICKET_GROUP_BULK_DELETE_UPDATE_KEY } from '../../PurchaseActionDropdown.constants';\nimport { LaunchBulkDeleteTicketGroup } from './LaunchBulkDeleteTicketGroup';\n\nexport const useBulkDeleteTicketGroup = (\n filterQuery: PurchaseOrderQuery,\n setIsLoading: (v: boolean) => void,\n isLoading?: boolean,\n groupId?: string\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const updateKey = groupId\n ? `deleteTicketGroups-event-${groupId}`\n : TICKET_GROUP_BULK_DELETE_UPDATE_KEY;\n\n const { showErrorDialog } = useErrorBoundaryContext();\n const { refreshData } = usePurchaseDataContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n refreshCatalog,\n } = useCatalogDataContext();\n const { refreshMetrics } = useCatalogMetricsContext();\n\n const {\n openDialog: openBulkDeleteTicketGroupDialog,\n closeDialog: closeBulkDeleteTicketGroupDialog,\n } = useDialog(DialogId.BulkDeleteTicketGroup, BulkDeleteTicketGroupDialog);\n\n const onSubmit = useCallback(\n async (\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n await tryInvokeApi(\n async () => {\n const preview = await new BulkEditTicketGroupClient(\n activeAccountWebClientConfig\n ).bulkDeleteTicketGroupPreview(filterQuery);\n\n onPreviewReceived(preview);\n },\n (error) => {\n showErrorDialog('bulkDeleteTicketGroupPreview', error, {\n trackErrorData: { filterQuery },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n } else {\n await tryInvokeApi(\n async () => {\n const succeeded = await new BulkEditTicketGroupClient(\n activeAccountWebClientConfig\n ).bulkDeleteTicketGroup(\n preview!.preview,\n updateKey,\n supportBackgroundProcess\n );\n\n if (!supportBackgroundProcess) {\n if (succeeded) {\n await refreshData(true);\n // Metrics/events may have changed with TGs being cancelled, so refresh the whole catalog\n refreshMetrics();\n await refreshCatalog();\n await refreshExpandedListItems();\n }\n\n closeBulkDeleteTicketGroupDialog();\n }\n },\n (error) => {\n showErrorDialog('bulkDeleteTicketGroup', error, {\n trackErrorData: { preview },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n }\n },\n [\n activeAccountWebClientConfig,\n closeBulkDeleteTicketGroupDialog,\n filterQuery,\n refreshCatalog,\n refreshData,\n refreshExpandedListItems,\n refreshMetrics,\n setIsLoading,\n showErrorDialog,\n updateKey,\n ]\n );\n\n return {\n dropDown: (\n {\n e.preventDefault();\n e.stopPropagation();\n openBulkDeleteTicketGroupDialog({\n updateKey,\n onOkay: onSubmit,\n onClosed: () => {\n setIsLoading(false);\n },\n onCancel: closeBulkDeleteTicketGroupDialog,\n });\n }}\n disabled={isLoading}\n />\n ),\n };\n};\n","import { useCallback } from 'react';\nimport { LaunchBulkEditCommission } from 'src/components/common/BulkActions/BulkEditCommissionAction';\nimport {\n IPosEntity,\n useActivePosEntityContext,\n} from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { usePurchaseDataContext } from 'src/contexts/PurchaseDataContext/PurchaseDataContext';\nimport { BulkEditCommissionDialog } from 'src/dialogs/BulkEdits/BulkEditCommissionDialog';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n BulkEditPreviewWithDetails,\n BulkEditPurchaseClient,\n Commission,\n PurchaseOrderQuery,\n} from 'src/WebApiController';\n\nimport { PURCHASE_BULK_UPDATE_COMMISSION_UPDATE_KEY } from '../../PurchaseActionDropdown.constants';\n\nexport const useBulkEditCommissionAction = (\n filterQuery: PurchaseOrderQuery,\n setIsLoading: (v: boolean) => void,\n isLoading?: boolean,\n groupId?: string\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { setActivePosEntity } = useActivePosEntityContext();\n const updateKey = groupId\n ? `purchaseCommission-event-${groupId}}`\n : PURCHASE_BULK_UPDATE_COMMISSION_UPDATE_KEY;\n const { refreshData } = usePurchaseDataContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const {\n openDialog: openBulkEditCommissionDialog,\n closeDialog: closeBulkEditCommissionDialog,\n } = useDialog(DialogId.BulkEditCommission, BulkEditCommissionDialog);\n\n const onSubmit = useCallback(\n async (\n commissions: Commission[] | null,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n await tryInvokeApi(\n async () => {\n const preview = await new BulkEditPurchaseClient(\n activeAccountWebClientConfig\n ).bulkUpdatePurchaseCommissionsPreview(filterQuery);\n\n onPreviewReceived(preview);\n },\n (error) => {\n showErrorDialog('bulkUpdatePurchaseCommissionsPreview', error, {\n trackErrorData: { filterQuery },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n } else {\n await tryInvokeApi(\n async () => {\n const succeeded = await new BulkEditPurchaseClient(\n activeAccountWebClientConfig\n ).bulkUpdatePurchaseCommissions(\n {\n item1: preview!.preview,\n item2: commissions ?? [],\n },\n updateKey,\n supportBackgroundProcess\n );\n\n if (!supportBackgroundProcess) {\n if (succeeded) {\n // Invalidate the activePosEntity, so that when clicking on details modal\n // we force re-loading the entity and newest pricing settings can be displayed\n setActivePosEntity(0);\n await refreshData(true);\n await refreshExpandedListItems();\n }\n\n closeBulkEditCommissionDialog();\n }\n },\n (error) => {\n showErrorDialog('onSubmitEditCommissions', error, {\n trackErrorData: { commissions, preview },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n }\n },\n [\n setIsLoading,\n activeAccountWebClientConfig,\n filterQuery,\n showErrorDialog,\n updateKey,\n closeBulkEditCommissionDialog,\n setActivePosEntity,\n refreshData,\n refreshExpandedListItems,\n ]\n );\n\n const onLaunchAction = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n openBulkEditCommissionDialog({\n updateKey,\n onOkay: onSubmit,\n onClosed: () => {\n setIsLoading(false);\n },\n onCancel: closeBulkEditCommissionDialog,\n });\n },\n [\n closeBulkEditCommissionDialog,\n onSubmit,\n openBulkEditCommissionDialog,\n setIsLoading,\n updateKey,\n ]\n );\n\n return {\n dropDown: (\n \n ),\n };\n};\n","import { useUpdatePurchasesPermissions } from 'src/components/Purchases/BulkActions/useUpdatePurchasesPermissions';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nexport const LaunchBulkUpdateDeliveryType = ({\n onClick,\n disabled,\n}: {\n onClick: (e: React.MouseEvent) => void;\n disabled?: boolean;\n}) => {\n const { hasPurchaseUpdateDeliveryTypePermission } =\n useUpdatePurchasesPermissions();\n\n if (!hasPurchaseUpdateDeliveryTypePermission) {\n return null;\n }\n\n return (\n <>\n \n \n \n \n \n \n );\n};\n","import { useCallback } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { usePurchaseDataContext } from 'src/contexts/PurchaseDataContext';\nimport { InfoMessage } from 'src/core/POS/MessageWithIcon/InfoMessage';\nimport { BulkEditDeliveryTypeDialog } from 'src/dialogs/BulkEdits/BulkEditDeliveryTypeDialog';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n BulkEditPreview,\n BulkEditPreviewWithDetails,\n BulkEditPurchaseClient,\n BulkEditTicketGroupClient,\n DeliveryType,\n PurchaseOrderQuery,\n TicketTypeOverride,\n} from 'src/WebApiController';\n\nimport { PURCHASE_BULK_UPDATE_DELIVERY_TYPE_UPDATE_KEY } from '../../PurchaseActionDropdown.constants';\nimport { LaunchBulkUpdateDeliveryType } from './LaunchBulkUpdateDeliveryType';\n\nexport const useBulkUpdateDeliveryType = (\n filterQuery: PurchaseOrderQuery,\n setIsLoading: (v: boolean) => void,\n isLoading?: boolean,\n groupId?: string,\n isEventView?: boolean\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const updateKey = groupId\n ? `purchase-delivery-type-event-${groupId}`\n : PURCHASE_BULK_UPDATE_DELIVERY_TYPE_UPDATE_KEY;\n\n const { showErrorDialog } = useErrorBoundaryContext();\n const { refreshData } = usePurchaseDataContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n\n const {\n openDialog: openBulkEditDeliveryTypeDialog,\n closeDialog: closeBulkEditDeliveryTypeDialog,\n } = useDialog(DialogId.BulkEditDeliveryType, BulkEditDeliveryTypeDialog);\n\n const updatePurchaseOrders = !isEventView;\n\n const onSubmit = useCallback(\n async (\n deliveryType: DeliveryType | null,\n ticketTypeOverride: TicketTypeOverride | null,\n updateSalesOfListings: boolean,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails,\n retryableEntities?: BulkEditPreview\n ) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n await tryInvokeApi(\n async () => {\n const bulkEditClient = updatePurchaseOrders\n ? new BulkEditPurchaseClient(activeAccountWebClientConfig)\n : new BulkEditTicketGroupClient(activeAccountWebClientConfig);\n\n // Resolve the query considering the retryable entities\n const query: PurchaseOrderQuery = {\n ...filterQuery,\n eventOrMappingIds: retryableEntities\n ? []\n : filterQuery.eventOrMappingIds,\n entityIds:\n updatePurchaseOrders && retryableEntities\n ? retryableEntities.bulkEditCountPreview[\n ActionOutboxEntityType.Purchase\n ]?.idsAffected ?? []\n : filterQuery.entityIds,\n ticketGroupIds:\n !updatePurchaseOrders && retryableEntities\n ? retryableEntities.bulkEditCountPreview[\n ActionOutboxEntityType.TicketGroup\n ]?.idsAffected ?? []\n : filterQuery.ticketGroupIds,\n };\n\n const preview = await bulkEditClient.bulkUpdateDeliveryTypePreview(\n query,\n updateSalesOfListings\n );\n\n onPreviewReceived(preview);\n },\n (error) => {\n showErrorDialog('bulkUpdateDeliveryTypePreview', error, {\n trackErrorData: { filterQuery, retryableEntities },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n } else if (deliveryType && ticketTypeOverride) {\n await tryInvokeApi(\n async () => {\n const bulkEditClient = updatePurchaseOrders\n ? new BulkEditPurchaseClient(activeAccountWebClientConfig)\n : new BulkEditTicketGroupClient(activeAccountWebClientConfig);\n\n const succeeded = await bulkEditClient.bulkUpdateDeliveryType(\n {\n item1: preview!.preview,\n item2: deliveryType,\n item3: ticketTypeOverride.overrides[0].ticketTypePriorities,\n },\n updateSalesOfListings,\n updateKey,\n supportBackgroundProcess\n );\n if (!supportBackgroundProcess) {\n if (succeeded) {\n await refreshData(true);\n await refreshExpandedListItems();\n }\n\n closeBulkEditDeliveryTypeDialog();\n }\n },\n (error) => {\n showErrorDialog('bulkUpdateDeliveryType', error, {\n trackErrorData: {\n preview,\n deliveryType,\n ticketTypeOverride,\n updateSalesOfListings,\n },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n }\n },\n [\n activeAccountWebClientConfig,\n closeBulkEditDeliveryTypeDialog,\n filterQuery,\n refreshData,\n refreshExpandedListItems,\n setIsLoading,\n showErrorDialog,\n updateKey,\n updatePurchaseOrders,\n ]\n );\n\n return {\n dropDown: (\n {\n e.preventDefault();\n e.stopPropagation();\n openBulkEditDeliveryTypeDialog({\n updateKey,\n onOkay: onSubmit,\n onClosed: () => {\n setIsLoading(false);\n },\n entityType: ActionOutboxEntityType.TicketGroup, // delivery type only apply to TGs\n infoMessage: (\n \n }\n />\n ),\n onCancel: closeBulkEditDeliveryTypeDialog,\n });\n }}\n disabled={isLoading}\n />\n ),\n };\n};\n","import { useCallback } from 'react';\nimport { LaunchBulkUpdateInternalNotes } from 'src/components/common/BulkActions/BulkUpdateInternalNotesAction';\nimport {\n IPosEntity,\n useActivePosEntityContext,\n} from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { usePurchaseDataContext } from 'src/contexts/PurchaseDataContext';\nimport { BulkUpdateInternalNotesDialog } from 'src/dialogs/BulkEdits/BulkUpdateInternalNotesDialog';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n BulkEditPreviewWithDetails,\n BulkEditPurchaseClient,\n PurchaseOrderQuery,\n} from 'src/WebApiController';\n\nimport { PURCHASE_BULK_UPDATE_INTERNAL_NOTES_UPDATE_KEY } from '../../PurchaseActionDropdown.constants';\n\nexport const useBulkUpdateInternalNotesAction = (\n filterQueryWithEventIds: PurchaseOrderQuery,\n setIsLoading: (v: boolean) => void,\n isLoading?: boolean,\n groupId?: string\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { setActivePosEntity } = useActivePosEntityContext();\n const updateKey = groupId\n ? `purchase-internal-notes-event-${groupId}`\n : PURCHASE_BULK_UPDATE_INTERNAL_NOTES_UPDATE_KEY;\n const { refreshData } = usePurchaseDataContext();\n const {\n eventsExpansion: { setListItemExpansion, refreshExpandedListItems },\n } = useCatalogDataContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const {\n openDialog: openBulkUpdateInternalNotesDialog,\n closeDialog: closeBulkUpdateInternalNotesDialog,\n } = useDialog(\n DialogId.BulkUpdateInternalNotes,\n BulkUpdateInternalNotesDialog\n );\n\n const onSubmit = useCallback(\n async (\n isUpdate: boolean | null,\n searchString: string | null,\n replaceString: string | null,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n await tryInvokeApi(\n async () => {\n const preview = await new BulkEditPurchaseClient(\n activeAccountWebClientConfig\n ).bulkUpdateInternalNotesPreview(filterQueryWithEventIds);\n\n onPreviewReceived(preview);\n },\n (error) => {\n showErrorDialog('bulkUpdateInternalNotesPreview', error, {\n trackErrorData: { filterQueryWithEventIds },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n } else if (\n isUpdate != null &&\n searchString != null &&\n replaceString != null\n ) {\n await tryInvokeApi(\n async () => {\n const purchaseClient = new BulkEditPurchaseClient(\n activeAccountWebClientConfig\n );\n\n const succeeded = await purchaseClient.bulkUpdateInternalNotes(\n preview!.preview,\n updateKey,\n isUpdate,\n searchString,\n replaceString,\n supportBackgroundProcess\n );\n\n if (!supportBackgroundProcess) {\n if (succeeded) {\n // Invalidate the activePosEntity, so that when clicking on listingDetails\n // we force re-loading the listing and newest pricing settings can be displayed\n setActivePosEntity(0);\n await refreshData(true);\n await refreshExpandedListItems();\n }\n\n closeBulkUpdateInternalNotesDialog();\n }\n },\n (error) => {\n showErrorDialog('bulkUpdateInternalNotes', error, {\n trackErrorData: {\n isUpdate,\n searchString,\n replaceString,\n preview,\n },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n }\n },\n [\n setIsLoading,\n activeAccountWebClientConfig,\n filterQueryWithEventIds,\n showErrorDialog,\n updateKey,\n closeBulkUpdateInternalNotesDialog,\n setActivePosEntity,\n refreshData,\n refreshExpandedListItems,\n ]\n );\n\n const onChangeClick = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n if (groupId) {\n setListItemExpansion(true, [groupId]);\n }\n openBulkUpdateInternalNotesDialog({\n updateKey,\n onOkay: onSubmit,\n onCancel: closeBulkUpdateInternalNotesDialog,\n entityType: ActionOutboxEntityType.Purchase,\n });\n },\n [\n closeBulkUpdateInternalNotesDialog,\n groupId,\n onSubmit,\n openBulkUpdateInternalNotesDialog,\n setListItemExpansion,\n updateKey,\n ]\n );\n\n return {\n dropDown: (\n \n ),\n };\n};\n","import { Content } from 'src/contexts/ContentContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { Stack } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Feature } from 'src/WebApiController';\n\nexport const LaunchBulkUpdatePurchaseCurrencyCode = ({\n onClick,\n disabled,\n}: {\n onClick: (e: React.MouseEvent) => void;\n disabled?: boolean;\n}) => {\n const hasBulkUpdatePurchaseCurrencyFeature = useUserHasFeature(\n Feature.BulkUpdatePurchaseCurrency\n );\n\n if (!hasBulkUpdatePurchaseCurrencyFeature) {\n return null;\n }\n\n return (\n <>\n \n \n \n \n \n \n );\n};\n","import { HubConnectionState } from '@microsoft/signalr';\nimport React, { ComponentProps, useCallback, useRef, useState } from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { Modal as RSModal } from 'reactstrap';\nimport { BulkEditStatus } from 'src/components/common/BulkActions/BulkEditStatus';\nimport { CurrencyFilterSelector } from 'src/components/Selectors/CurrencyFilterSelector';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport {\n BulkEditStage,\n useBulkEditHubContext,\n} from 'src/contexts/BulkEditHubContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { usePurchaseDataContext } from 'src/contexts/PurchaseDataContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { InfoMessage } from 'src/core/POS/MessageWithIcon/InfoMessage';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { Stack } from 'src/core/ui';\nimport { useBulkEditHub } from 'src/hooks/useBulkEditHub';\nimport { FieldWrapper } from 'src/modals/common';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { PurchaseOrderDetailsInput } from 'src/utils/purchaseUtils';\nimport {\n ActionOutboxEntityType,\n BulkActionType,\n BulkEditPreviewWithDetails,\n BulkEditProgress,\n BulkEditStep,\n PurchaseOrderDetails,\n} from 'src/WebApiController';\n\nimport { BulkEditFooter } from '../common/BulkEditFooter';\nimport { BulkEditHeader } from '../common/BulkEditHeader';\n\nexport type BulkUpdatePurchaseCurrencyCodeDialogProps = ComponentProps<\n typeof RSModal\n> & {\n updateKey: string;\n onOkay: (\n supportBackgroundProcess: boolean,\n onPreviewReceived:\n | ((preview: BulkEditPreviewWithDetails) => void)\n | undefined,\n preview: BulkEditPreviewWithDetails | undefined,\n currencyCode: string\n ) => void;\n onCancel: () => void;\n};\n\nexport const BulkUpdatePurchaseCurrencyCodeDialog = ({\n purchases,\n ...rest\n}: BulkUpdatePurchaseCurrencyCodeDialogProps) => {\n const methods = useForm();\n\n return (\n \n \n \n );\n};\n\nfunction BulkUpdatePurchaseCurrencyCodeDialogContent({\n updateKey,\n onOkay,\n onCancel,\n watch,\n reset,\n setValue,\n formState,\n ...rest\n}: BulkUpdatePurchaseCurrencyCodeDialogProps &\n Omit<\n ComponentProps>,\n 'children'\n >) {\n const { setActivePosEntity } =\n useActivePosEntityContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n const { refreshData } = usePurchaseDataContext();\n const { setSelectionMode } = useMultiSelectionContext();\n const { setProgress, setPreview, setMainDialogOpened } =\n useBulkEditHubContext();\n const [isLoading, setIsLoading] = useState(false);\n\n const [currencyCode, setCurrencyCode] = useState();\n\n const onClose = useCallback(\n async (\n newProgress?: BulkEditProgress,\n closeMainDialogForPopover?: boolean\n ) => {\n if (newProgress?.step === BulkEditStep.Done) {\n setIsRefreshing(true);\n setActivePosEntity(0);\n\n if (refreshData) {\n await refreshData(true);\n }\n if (refreshExpandedListItems) {\n await refreshExpandedListItems();\n }\n setSelectionMode(undefined);\n if (closeMainDialogForPopover) {\n setMainDialogOpened(false);\n } else {\n setProgress(undefined);\n setPreview(undefined);\n }\n setIsRefreshing(false);\n // progress kept to allow the BulkEditStatusPopover to show the result\n }\n onCancel();\n },\n [\n onCancel,\n refreshData,\n refreshExpandedListItems,\n setActivePosEntity,\n setMainDialogOpened,\n setPreview,\n setProgress,\n setSelectionMode,\n ]\n );\n\n const onBulkEditDone = useCallback(\n async (doneProgress: BulkEditProgress, finalErrors: string[]) => {\n if (finalErrors.length === 0 && doneProgress.step === BulkEditStep.Done) {\n onClose(doneProgress, true);\n }\n },\n [onClose]\n );\n\n const { bulkEditHub, progress, preview, initJob, stage } = useBulkEditHub(\n ActionOutboxEntityType.Purchase,\n BulkActionType.UpdatePurchaseCurrency,\n updateKey,\n onBulkEditDone\n );\n\n const hasBackgroundBulkEditFeature =\n bulkEditHub?.state === HubConnectionState.Connected;\n\n const onSubmitHandler = useCallback(\n async (\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void\n ) => {\n if (!currencyCode) {\n return;\n }\n if (onPreviewReceived) {\n setIsLoading(true);\n onOkay(false, onPreviewReceived, undefined, currencyCode);\n setIsLoading(false);\n } else {\n onOkay(hasBackgroundBulkEditFeature, undefined, preview, currencyCode);\n }\n },\n [onOkay, currencyCode, hasBackgroundBulkEditFeature, preview]\n );\n\n const [isRefreshing, setIsRefreshing] = useState(false);\n\n const submitButtonRef = useRef(null);\n\n return (\n }\n />\n }\n onOpened={() => {\n reset();\n initJob();\n }}\n onKeyUp={(e) => {\n if (submitButtonRef.current && e.key === 'Enter') {\n submitButtonRef.current.click();\n }\n }}\n onClosed={() => {\n setMainDialogOpened(false);\n if (progress) {\n setSelectionMode(undefined);\n }\n // Call the outside one if there is one\n rest.onClosed?.();\n }}\n footer={\n \n }\n onCancel={isLoading ? undefined : onCancel}\n >\n \n \n \n \n \n \n }>\n {\n if (newCurrencyCode && newCurrencyCode !== currencyCode) {\n setCurrencyCode(newCurrencyCode);\n }\n }}\n />\n \n \n \n }\n />\n \n \n \n );\n}\n","import { useCallback } from 'react';\nimport { LaunchBulkUpdatePurchaseCurrencyCode } from 'src/components/Purchases/PurchaseActionDropdown/components/BulkUpdatePurchaseCurrencyCodeAction/LaunchBulkUpdatePurchaseCurrencyCode';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { usePurchaseDataContext } from 'src/contexts/PurchaseDataContext';\nimport { InfoMessage } from 'src/core/POS/MessageWithIcon/InfoMessage';\nimport { BulkUpdatePurchaseCurrencyCodeDialog } from 'src/dialogs/BulkEdits/BulkUpdatePurchaseCurrencyCodeDialog';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n BulkEditPreviewWithDetails,\n BulkEditPurchaseClient,\n PurchaseOrderQuery,\n} from 'src/WebApiController';\n\nimport { PURCHASE_BULK_UPDATE_PURCHASE_CURRENCY_CODE_KEY } from '../../PurchaseActionDropdown.constants';\n\nexport const useBulkUpdatePurchaseCurrencyCode = (\n filterQuery: PurchaseOrderQuery,\n setIsLoading: (v: boolean) => void,\n isLoading?: boolean,\n groupId?: string\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const updateKey = `${PURCHASE_BULK_UPDATE_PURCHASE_CURRENCY_CODE_KEY}${\n groupId ? `-${groupId}` : ''\n }`;\n\n const { showErrorDialog } = useErrorBoundaryContext();\n const { refreshData } = usePurchaseDataContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n\n const {\n openDialog: openBulkUpdatePurchaseCurrencyCode,\n closeDialog: closeBulkMarkPurchaseAsPaidDialog,\n } = useDialog(\n DialogId.BulkUpdatePurchaseCurrencyCode,\n BulkUpdatePurchaseCurrencyCodeDialog\n );\n\n const onSubmit = useCallback(\n async (\n supportBackgroundProcess: boolean,\n onPreviewReceived:\n | ((preview: BulkEditPreviewWithDetails) => void)\n | undefined,\n preview: BulkEditPreviewWithDetails | undefined,\n currencyCode: string\n ) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n await tryInvokeApi(\n async () => {\n const bulkEditClient = new BulkEditPurchaseClient(\n activeAccountWebClientConfig\n );\n\n const preview =\n await bulkEditClient.bulkUpdateCurrencyCodePreview(filterQuery);\n\n onPreviewReceived(preview);\n },\n (error) => {\n showErrorDialog('bulkUpdateCurrencyCodePreview', error, {\n trackErrorData: { filterQuery },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n } else {\n await tryInvokeApi(\n async () => {\n const bulkEditClient = new BulkEditPurchaseClient(\n activeAccountWebClientConfig\n );\n\n const succeeded = await bulkEditClient.bulkUpdateCurrencyCode(\n {\n item1: preview!.preview,\n item2: currencyCode,\n },\n updateKey,\n supportBackgroundProcess\n );\n if (!supportBackgroundProcess) {\n if (succeeded) {\n await refreshData(true);\n await refreshExpandedListItems();\n }\n\n closeBulkMarkPurchaseAsPaidDialog();\n }\n },\n (error) => {\n showErrorDialog('bulkUpdateCurrencyCode', error, {\n trackErrorData: {\n preview,\n },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n }\n },\n [\n activeAccountWebClientConfig,\n filterQuery,\n refreshData,\n refreshExpandedListItems,\n setIsLoading,\n showErrorDialog,\n updateKey,\n closeBulkMarkPurchaseAsPaidDialog,\n ]\n );\n\n return {\n dropDown: (\n {\n e.preventDefault();\n e.stopPropagation();\n openBulkUpdatePurchaseCurrencyCode({\n updateKey,\n onOkay: onSubmit,\n onClosed: () => {\n setIsLoading(false);\n },\n entityType: ActionOutboxEntityType.Purchase,\n infoMessage: (\n }\n />\n ),\n onCancel: closeBulkMarkPurchaseAsPaidDialog,\n });\n }}\n disabled={isLoading}\n />\n ),\n };\n};\n","import { HubConnectionState } from '@microsoft/signalr';\nimport { isEqual } from 'lodash-es';\nimport { ComponentProps, useCallback, useMemo, useRef, useState } from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { Modal as RSModal } from 'reactstrap';\nimport { BulkEditStatus } from 'src/components/common/BulkActions/BulkEditStatus';\nimport { SellerAccountEmployeeSelector } from 'src/components/Selectors/SellerAccountEmployeeSelector';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport {\n BulkEditStage,\n useBulkEditHubContext,\n} from 'src/contexts/BulkEditHubContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { usePurchaseDataContext } from 'src/contexts/PurchaseDataContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { Stack } from 'src/core/ui';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useBulkEditHub } from 'src/hooks/useBulkEditHub';\nimport { DetailSection } from 'src/modals/common';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { posChangedField } from 'src/utils/posFieldUtils';\nimport { PurchaseOrderDetailsInput } from 'src/utils/purchaseUtils';\nimport {\n ActionOutboxEntityType,\n BulkActionType,\n BulkEditPreviewWithDetails,\n BulkEditProgress,\n BulkEditStep,\n DateTimeRange,\n PurchaseOrderDetails,\n} from 'src/WebApiController';\n\nimport { BulkEditFooter } from '../common/BulkEditFooter';\nimport { BulkEditHeader } from '../common/BulkEditHeader';\n\nexport type BulkEditPurchaseSettingsDialogProps = ComponentProps<\n typeof RSModal\n> & {\n updateKey: string;\n monthYear?: DateTimeRange;\n onOkay: (\n purchaseInput: PurchaseOrderDetailsInput | null,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => void;\n onCancel: () => void;\n};\n\nexport const BulkEditPurchaseSettingsDialog = ({\n purchases,\n ...rest\n}: BulkEditPurchaseSettingsDialogProps) => {\n const methods = useForm();\n\n return (\n \n \n \n );\n};\n\nfunction BulkEditPurchaseSettingsDialogContent({\n updateKey,\n onOkay,\n onCancel,\n handleSubmit,\n watch,\n reset,\n setValue,\n formState,\n ...rest\n}: BulkEditPurchaseSettingsDialogProps &\n Omit<\n ComponentProps>,\n 'children'\n >) {\n const { setActivePosEntity } =\n useActivePosEntityContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n const { refreshData } = usePurchaseDataContext();\n const { setSelectionMode } = useMultiSelectionContext();\n const { setProgress, setPreview, setMainDialogOpened } =\n useBulkEditHubContext();\n const [isLoading, setIsLoading] = useState(false);\n const dontChange = useContent(ContentId.DontChange);\n const buyerUserId = watch('buyerUserId');\n\n const input = watch();\n\n const onClose = useCallback(\n async (\n newProgress?: BulkEditProgress,\n closeMainDialogForPopover?: boolean\n ) => {\n if (newProgress?.step === BulkEditStep.Done) {\n setIsRefreshing(true);\n setActivePosEntity(0);\n\n if (refreshData) {\n await refreshData(true);\n }\n if (refreshExpandedListItems) {\n await refreshExpandedListItems();\n }\n setSelectionMode(undefined);\n if (closeMainDialogForPopover) {\n setMainDialogOpened(false);\n } else {\n setProgress(undefined);\n setPreview(undefined);\n }\n setIsRefreshing(false);\n // progress kept to allow the BulkEditStatusPopover to show the result\n }\n onCancel();\n },\n [\n onCancel,\n refreshData,\n refreshExpandedListItems,\n setActivePosEntity,\n setMainDialogOpened,\n setPreview,\n setProgress,\n setSelectionMode,\n ]\n );\n\n const onBulkEditDone = useCallback(\n async (doneProgress: BulkEditProgress, finalErrors: string[]) => {\n if (finalErrors.length === 0 && doneProgress.step === BulkEditStep.Done) {\n onClose(doneProgress, true);\n }\n },\n [onClose]\n );\n\n const { bulkEditHub, progress, preview, initJob, stage } = useBulkEditHub(\n ActionOutboxEntityType.Purchase,\n BulkActionType.UpdateGeneralSettings,\n updateKey,\n onBulkEditDone\n );\n\n const hasBackgroundBulkEditFeature =\n bulkEditHub?.state === HubConnectionState.Connected;\n\n const alertDialog = useBasicDialog();\n\n const onSubmitHandler = useCallback(\n async (\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void\n ) => {\n if (onPreviewReceived) {\n setIsLoading(true);\n await onOkay(null, false, onPreviewReceived);\n setIsLoading(false);\n } else {\n handleSubmit((i) =>\n onOkay(i, hasBackgroundBulkEditFeature, undefined, preview)\n )();\n }\n },\n [onOkay, handleSubmit, preview, hasBackgroundBulkEditFeature]\n );\n\n const [isRefreshing, setIsRefreshing] = useState(false);\n\n const isInputValid = useMemo(() => {\n return !isEqual(input, formState.defaultValues ?? {});\n }, [formState.defaultValues, input]);\n\n const submittButtonRef = useRef(null);\n\n return (\n }\n />\n }\n onOpened={() => {\n reset();\n initJob();\n }}\n onKeyUp={(e) => {\n if (submittButtonRef.current && e.key === 'Enter' && isInputValid) {\n submittButtonRef.current.click();\n }\n }}\n onClosed={() => {\n setMainDialogOpened(false);\n if (progress) {\n setSelectionMode(undefined);\n }\n // Call the outside one if there is one\n rest.onClosed?.();\n }}\n footer={\n \n }\n onCancel={isLoading ? undefined : onCancel}\n >\n \n \n }>\n }>\n {\n if (newId !== buyerUserId?.value) {\n setValue('buyerUserId', posChangedField(newId));\n }\n }}\n style={{ width: '100%' }}\n />\n \n \n \n \n \n );\n}\n","import { useUpdatePurchasesPermissions } from 'src/components/Purchases/BulkActions/useUpdatePurchasesPermissions';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nexport const LaunchUpdatePurchaseSettings = ({\n onClick,\n disabled,\n}: {\n onClick: (e: React.MouseEvent) => void;\n disabled?: boolean;\n}) => {\n const { hasUpdatePurchasesPermission } = useUpdatePurchasesPermissions();\n\n if (!hasUpdatePurchasesPermission) {\n return null;\n }\n\n return (\n <>\n \n \n {/* Now only purchased by is supported. Use ContentId.EditGeneralSettings when multiple settings are supported */}\n \n \n \n \n );\n};\n","import { useCallback } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { usePurchaseDataContext } from 'src/contexts/PurchaseDataContext';\nimport { BulkEditPurchaseSettingsDialog } from 'src/dialogs/BulkEdits/BulkEditPurchaseSettingsDialog';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n BulkEditPreviewWithDetails,\n BulkEditPurchaseClient,\n PurchaseOrderDetailsInput,\n PurchaseOrderQuery,\n} from 'src/WebApiController';\n\nimport { PURCHASE_BULK_UPDATE_GENERAL_SETTINGS_UPDATE_KEY } from '../../PurchaseActionDropdown.constants';\nimport { LaunchUpdatePurchaseSettings } from './LaunchUpdatePurchaseSettings';\n\nexport const useBulkUpdatePurchaseSettings = (\n filterQuery: PurchaseOrderQuery,\n setIsLoading: (v: boolean) => void,\n isLoading?: boolean,\n groupId?: string\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const updateKey = groupId\n ? `purchaseSettings-event-${groupId}`\n : PURCHASE_BULK_UPDATE_GENERAL_SETTINGS_UPDATE_KEY;\n\n const { showErrorDialog } = useErrorBoundaryContext();\n const { refreshData } = usePurchaseDataContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n\n const {\n openDialog: openBulkEditPurchaseSettingsDialog,\n closeDialog: closeBulkEditPurchaseSettingsDialog,\n } = useDialog(\n DialogId.BulkEditPurchaseSettings,\n BulkEditPurchaseSettingsDialog\n );\n\n const onSubmit = useCallback(\n async (\n purchaseInput: PurchaseOrderDetailsInput | null,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n await tryInvokeApi(\n async () => {\n const client = new BulkEditPurchaseClient(\n activeAccountWebClientConfig\n );\n\n const preview =\n await client.bulkUpdateGeneralSettingsPreview(filterQuery);\n\n onPreviewReceived(preview);\n },\n (error) => {\n showErrorDialog('bulkUpdateGeneralSettingsPreview', error, {\n trackErrorData: { filterQuery },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n } else if (purchaseInput?.buyerUserId != null) {\n await tryInvokeApi(\n async () => {\n const succeeded = await new BulkEditPurchaseClient(\n activeAccountWebClientConfig\n ).bulkUpdateGeneralSettings(\n {\n item1: preview!.preview,\n item2: purchaseInput.buyerUserId!,\n },\n updateKey,\n supportBackgroundProcess\n );\n if (!supportBackgroundProcess) {\n if (succeeded) {\n await refreshData(true);\n await refreshExpandedListItems();\n }\n\n closeBulkEditPurchaseSettingsDialog();\n }\n },\n (error) => {\n showErrorDialog('bulkUpdateGeneralSettings', error, {\n trackErrorData: { preview, purchaseInput },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n }\n },\n [\n activeAccountWebClientConfig,\n closeBulkEditPurchaseSettingsDialog,\n filterQuery,\n refreshData,\n refreshExpandedListItems,\n setIsLoading,\n showErrorDialog,\n updateKey,\n ]\n );\n\n return {\n dropDown: (\n {\n e.preventDefault();\n e.stopPropagation();\n openBulkEditPurchaseSettingsDialog({\n updateKey,\n onOkay: onSubmit,\n onClosed: () => {\n setIsLoading(false);\n },\n onCancel: closeBulkEditPurchaseSettingsDialog,\n });\n }}\n disabled={isLoading}\n />\n ),\n };\n};\n","import { useUpdatePurchasesPermissions } from 'src/components/Purchases/BulkActions/useUpdatePurchasesPermissions';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nexport const LaunchBulkUpdateSeatTraits = ({\n onClick,\n disabled,\n labelContentId = ContentId.UpdateSeatTraits,\n}: {\n onClick: (e: React.MouseEvent) => void;\n disabled?: boolean;\n labelContentId?: ContentId;\n}) => {\n const { hasPurchaseUpdateSeatTraitsPermission } =\n useUpdatePurchasesPermissions();\n\n if (!hasPurchaseUpdateSeatTraitsPermission) {\n return null;\n }\n\n return (\n <>\n \n \n \n \n \n \n );\n};\n","import { useCallback } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { usePurchaseDataContext } from 'src/contexts/PurchaseDataContext';\nimport { BulkEditSeatTraitsDialog } from 'src/dialogs/BulkEdits/BulkEditSeatTraitsDialog';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n BulkEditPreviewWithDetails,\n BulkEditPurchaseClient,\n BulkEditTicketGroupClient,\n ListingNote,\n PurchaseOrderQuery,\n} from 'src/WebApiController';\n\nimport { PURCHASE_BULK_UPDATE_SEAT_TRAITS_UPDATE_KEY } from '../../PurchaseActionDropdown.constants';\nimport { LaunchBulkUpdateSeatTraits } from './LaunchBulkUpdateSeatTraits';\n\nexport const useBulkUpdateSeatTraits = (\n filterQuery: PurchaseOrderQuery,\n setIsLoading: (v: boolean) => void,\n isLoading?: boolean,\n groupId?: string,\n isEventView?: boolean\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const updateKey = groupId\n ? `purchase-seat-traits-event-${groupId}`\n : PURCHASE_BULK_UPDATE_SEAT_TRAITS_UPDATE_KEY;\n\n const { showErrorDialog } = useErrorBoundaryContext();\n const { refreshData } = usePurchaseDataContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n\n const {\n openDialog: openBulkEditSeatTraitsDialog,\n closeDialog: closeBulkEditSeatTraitsDialog,\n } = useDialog(DialogId.BulkEditSeatTraits, BulkEditSeatTraitsDialog);\n\n const updatePurchaseOrders = !isEventView;\n\n const onSubmit = useCallback(\n async (\n seatTraits: ListingNote[] | null,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails,\n appendSeatTraits?: boolean\n ) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n await tryInvokeApi(\n async () => {\n const bulkEditClient = updatePurchaseOrders\n ? new BulkEditPurchaseClient(activeAccountWebClientConfig)\n : new BulkEditTicketGroupClient(activeAccountWebClientConfig);\n\n const preview =\n await bulkEditClient.bulkUpdateSeatTraitsPreview(filterQuery);\n\n onPreviewReceived(preview);\n },\n (error) => {\n showErrorDialog('bulkUpdateSeatTraitsPreview', error, {\n trackErrorData: { filterQuery },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n } else if (seatTraits) {\n await tryInvokeApi(\n async () => {\n const bulkEditClient = updatePurchaseOrders\n ? new BulkEditPurchaseClient(activeAccountWebClientConfig)\n : new BulkEditTicketGroupClient(activeAccountWebClientConfig);\n\n const succeeded = await bulkEditClient.bulkUpdateSeatTraits(\n {\n item1: preview!.preview,\n item2: seatTraits,\n },\n updateKey,\n supportBackgroundProcess,\n appendSeatTraits\n );\n if (!supportBackgroundProcess) {\n if (succeeded) {\n await refreshData(true);\n await refreshExpandedListItems();\n }\n\n closeBulkEditSeatTraitsDialog();\n }\n },\n (error) => {\n showErrorDialog('bulkUpdateSeatTraits', error, {\n trackErrorData: {\n preview,\n seatTraits,\n },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n }\n },\n [\n activeAccountWebClientConfig,\n closeBulkEditSeatTraitsDialog,\n filterQuery,\n refreshData,\n refreshExpandedListItems,\n setIsLoading,\n showErrorDialog,\n updateKey,\n updatePurchaseOrders,\n ]\n );\n\n return {\n dropDown: (\n {\n e.preventDefault();\n e.stopPropagation();\n openBulkEditSeatTraitsDialog({\n updateKey,\n onOkay: onSubmit,\n onClosed: () => {\n setIsLoading(false);\n },\n onCancel: closeBulkEditSeatTraitsDialog,\n entityType: ActionOutboxEntityType.TicketGroup,\n });\n }}\n disabled={isLoading}\n labelContentId={ContentId.UpdateSeatTraits}\n />\n ),\n };\n};\n","import { useState } from 'react';\nimport { ExportPurchasesButton } from 'src/components/Buttons';\nimport { useBulkActionsState } from 'src/components/common/BulkActions/useBulkActionsState';\nimport { usePurchaseTileBulkActionsState } from 'src/components/Purchases/BulkActions/PurchasesTileBulkActions/usePurchaseTileBulkActionsState';\nimport { useBulkCancelPurchase } from 'src/components/Purchases/PurchaseActionDropdown/components/BulkCancelPurchase';\nimport { useBulkChangeEventAction } from 'src/components/Purchases/PurchaseActionDropdown/components/BulkChangeEventAction';\nimport { useBulkDeleteTicketGroup } from 'src/components/Purchases/PurchaseActionDropdown/components/BulkDeleteTicketGroup';\nimport { useBulkEditCommissionAction } from 'src/components/Purchases/PurchaseActionDropdown/components/BulkEditCommissionAction';\nimport { useBulkUpdateDeliveryType } from 'src/components/Purchases/PurchaseActionDropdown/components/BulkUpdateDeliveryType';\nimport { useBulkUpdateInternalNotesAction } from 'src/components/Purchases/PurchaseActionDropdown/components/BulkUpdateInternalNotesAction';\nimport { useBulkUpdatePurchaseCurrencyCode } from 'src/components/Purchases/PurchaseActionDropdown/components/BulkUpdatePurchaseCurrencyCodeAction';\nimport { useBulkUpdatePurchaseSettings } from 'src/components/Purchases/PurchaseActionDropdown/components/BulkUpdatePurchaseGeneralSettings';\nimport { useBulkUpdateSeatTraits } from 'src/components/Purchases/PurchaseActionDropdown/components/BulkUpdateSeatTraits';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosDropdown, PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ChevronDownIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Feature } from 'src/WebApiController';\n\nimport { PurchasesBulkActionProps } from '../../PurchasesGlobalBulkActions/PurchasesBulkActions.types';\nimport { useUpdatePurchasesPermissions } from '../../useUpdatePurchasesPermissions';\n\ntype SettingsActionsProps = {\n groupId: string;\n};\n\nexport const SettingsActions = ({\n groupId,\n isEventView,\n}: SettingsActionsProps & PurchasesBulkActionProps) => {\n const { areBulkActionsEnabled } = useBulkActionsState();\n const [isLoading, setIsLoading] = useState(false);\n\n const { filterQueryWithEventIds } = usePurchaseTileBulkActionsState(\n groupId,\n isEventView\n );\n const hasExportPurchasesFeature = useUserHasFeature(Feature.ExportPurchases);\n\n const bulkUpdateGeneralSettings = useBulkUpdatePurchaseSettings(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n groupId\n );\n\n const bulkUpdateDeliveryType = useBulkUpdateDeliveryType(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n groupId,\n isEventView\n );\n\n const bulkUpdateSeatTraits = useBulkUpdateSeatTraits(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n groupId,\n isEventView\n );\n\n const bulkUpdateInternalNotes = useBulkUpdateInternalNotesAction(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n groupId\n );\n\n const bulkEditCommissionAction = useBulkEditCommissionAction(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n groupId\n );\n\n const bulkCancelPurchaseAction = useBulkCancelPurchase(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n groupId\n );\n\n const bulkDeleteTicketGroupAction = useBulkDeleteTicketGroup(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n groupId\n );\n\n const bulkChangeEvent = useBulkChangeEventAction(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n groupId\n );\n\n const bulkUpdatePurchaseCurrencyCode = useBulkUpdatePurchaseCurrencyCode(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n groupId\n );\n\n const {\n hasUpdatePurchasesPermission,\n hasPurchaseUpdateCommissionPermission,\n } = useUpdatePurchasesPermissions();\n\n if (!hasUpdatePurchasesPermission && !hasPurchaseUpdateCommissionPermission) {\n return null;\n }\n\n return (\n <>\n \n \n \n \n }\n align=\"start\"\n triggerProps={{ disabled: isLoading || !areBulkActionsEnabled }}\n >\n {!isEventView && bulkUpdateGeneralSettings.dropDown}\n\n {bulkUpdateDeliveryType.dropDown}\n {bulkUpdateSeatTraits.dropDown}\n\n {!isEventView && bulkUpdateInternalNotes.dropDown}\n {!isEventView && bulkEditCommissionAction.dropDown}\n {!isEventView && bulkCancelPurchaseAction.dropDown}\n\n {isEventView && bulkDeleteTicketGroupAction.dropDown}\n {isEventView && bulkChangeEvent.dropDown}\n\n {hasExportPurchasesFeature && (\n \n \n \n )}\n {!isEventView && bulkUpdatePurchaseCurrencyCode.dropDown}\n \n {isEventView && bulkChangeEvent.dialog}\n \n );\n};\n","import { useCallback } from 'react';\nimport { LaunchBulkEditTags } from 'src/components/common/BulkActions/BulkEditTagsAction';\nimport {\n IPosEntity,\n useActivePosEntityContext,\n} from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { usePurchaseDataContext } from 'src/contexts/PurchaseDataContext';\nimport {\n BulkEditTagAction,\n BulkEditTagDialog,\n} from 'src/dialogs/BulkEdits/BulkEditTagDialog';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n BulkEditPreviewWithDetails,\n BulkEditPurchaseClient,\n PurchaseOrderQuery,\n} from 'src/WebApiController';\n\nimport { PURCHASE_BULK_UPDATE_TAGS_UPDATE_KEY } from '../../PurchaseActionDropdown.constants';\n\nexport const useBulkEditTagsAction = (\n filterQuery: PurchaseOrderQuery,\n setIsLoading: (v: boolean) => void,\n isLoading?: boolean,\n groupId?: string\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { setActivePosEntity } = useActivePosEntityContext();\n const updateKey = groupId\n ? `purchaseTags-event-${groupId}}`\n : PURCHASE_BULK_UPDATE_TAGS_UPDATE_KEY;\n const { refreshData } = usePurchaseDataContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const {\n openDialog: openBulkEditTagDialog,\n closeDialog: closeBulkEditTagDialog,\n } = useDialog(DialogId.BulkEditTags, BulkEditTagDialog);\n\n const onSubmitEditTags = useCallback(\n async (\n action: BulkEditTagAction,\n tagKey: string | null,\n tagValue?: string | undefined,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n await tryInvokeApi(\n async () => {\n const preview = await new BulkEditPurchaseClient(\n activeAccountWebClientConfig\n ).bulkUpdateTagsPreview(filterQuery);\n\n onPreviewReceived(preview);\n },\n (error) => {\n showErrorDialog('bulkUpdateTagsPreview', error, {\n trackErrorData: { filterQuery },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n } else if (tagKey) {\n await tryInvokeApi(\n async () => {\n const client = new BulkEditPurchaseClient(\n activeAccountWebClientConfig\n );\n\n const succeeded =\n action === BulkEditTagAction.Update\n ? await client.bulkUpdateTags(\n preview!.preview,\n tagKey,\n tagValue,\n updateKey,\n supportBackgroundProcess\n )\n : await client.bulkRemoveTags(\n preview!.preview,\n tagKey,\n updateKey,\n supportBackgroundProcess\n );\n\n if (!supportBackgroundProcess) {\n if (succeeded) {\n // Invalidate the activePosEntity, so that when clicking on details modal\n // we force re-loading the entity and newest pricing settings can be displayed\n setActivePosEntity(0);\n await refreshData(true);\n await refreshExpandedListItems();\n }\n\n closeBulkEditTagDialog();\n }\n },\n (error) => {\n showErrorDialog('onSubmitEditTags', error, {\n trackErrorData: { tagKey, tagValue, preview },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n }\n },\n [\n setIsLoading,\n activeAccountWebClientConfig,\n filterQuery,\n showErrorDialog,\n updateKey,\n closeBulkEditTagDialog,\n setActivePosEntity,\n refreshData,\n refreshExpandedListItems,\n ]\n );\n\n const onChangeTagClick = useCallback(\n (e: React.MouseEvent, editTagAction: BulkEditTagAction) => {\n e.preventDefault();\n e.stopPropagation();\n openBulkEditTagDialog({\n updateKey: updateKey,\n action: editTagAction,\n onOkay: onSubmitEditTags,\n entityType: ActionOutboxEntityType.Purchase,\n onClosed: () => {\n setIsLoading(false);\n },\n onCancel: closeBulkEditTagDialog,\n });\n },\n [\n closeBulkEditTagDialog,\n onSubmitEditTags,\n openBulkEditTagDialog,\n setIsLoading,\n updateKey,\n ]\n );\n\n return {\n dropDown: (\n \n ),\n };\n};\n","import { useState } from 'react';\nimport { BulkEditTagsActionPermissionsHandler } from 'src/components/common/BulkActions/BulkEditTagsAction/BulkEditTagsActionPermissionsHandler';\nimport { useBulkActionsState } from 'src/components/common/BulkActions/useBulkActionsState';\nimport { usePurchaseTileBulkActionsState } from 'src/components/Purchases/BulkActions/PurchasesTileBulkActions/usePurchaseTileBulkActionsState';\nimport { useBulkEditTagsAction } from 'src/components/Purchases/PurchaseActionDropdown/components/BulkEditTagsAction';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosDropdown } from 'src/core/POS/PosDropdown';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { ChevronDownIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ActionOutboxEntityType } from 'src/WebApiController';\n\nimport { PurchasesBulkActionProps } from '../../PurchasesGlobalBulkActions/PurchasesBulkActions.types';\n\ntype TagsActionsProps = {\n groupId: string;\n};\n\nexport const TagsActions = ({\n groupId,\n isEventView,\n}: TagsActionsProps & PurchasesBulkActionProps) => {\n const { areBulkActionsEnabled } = useBulkActionsState();\n const [isLoading, setIsLoading] = useState(false);\n\n const { filterQueryWithEventIds } = usePurchaseTileBulkActionsState(\n groupId,\n isEventView\n );\n\n const bulkEditTags = useBulkEditTagsAction(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n groupId\n );\n\n if (isEventView) {\n return null;\n }\n\n return (\n \n \n \n \n \n }\n align=\"start\"\n triggerProps={{ disabled: isLoading || !areBulkActionsEnabled }}\n >\n {bulkEditTags.dropDown}\n \n \n );\n};\n","import { HubConnectionState } from '@microsoft/signalr';\nimport { ComponentProps, useCallback, useMemo, useRef, useState } from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { BulkEditStatus } from 'src/components/common/BulkActions/BulkEditStatus';\nimport { CurrencyFilterSelector } from 'src/components/Selectors/CurrencyFilterSelector';\nimport {\n IPosEntity,\n useActivePosEntityContext,\n} from 'src/contexts/ActivePosEntityContext';\nimport {\n BulkEditStage,\n useBulkEditHubContext,\n} from 'src/contexts/BulkEditHubContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { usePurchaseDataContext } from 'src/contexts/PurchaseDataContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { Stack } from 'src/core/ui';\nimport { useBulkEditHub } from 'src/hooks/useBulkEditHub';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n BulkActionType,\n BulkEditPreviewWithDetails,\n BulkEditProgress,\n BulkEditStep,\n} from 'src/WebApiController';\n\nimport { BulkEditFooter } from '../common/BulkEditFooter';\nimport { BulkEditHeader } from '../common/BulkEditHeader';\n\nexport type BulkConvertPurchasePaymentDialogProps = ComponentProps<\n typeof RSModal\n> & {\n updateKey: string;\n onOkay: (\n fromCurrencyCode: string | null,\n toCurrencyCode: string | null,\n conversionRate: number | null,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => void;\n onCancel: () => void;\n};\n\nexport function BulkConvertPurchasePaymentDialog({\n updateKey,\n onOkay,\n onCancel,\n entityType,\n ...rest\n}: BulkConvertPurchasePaymentDialogProps) {\n const { getUiCurrency } = useLocalizationContext();\n const { setActivePosEntity } = useActivePosEntityContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n const { refreshData } = usePurchaseDataContext();\n const { setSelectionMode } = useMultiSelectionContext();\n const { setProgress, setPreview, setMainDialogOpened } =\n useBulkEditHubContext();\n const [isLoading, setIsLoading] = useState(false);\n\n const [fromCurrencyCode, setFromCurrencyCode] = useState('');\n const [toCurrencyCode, setToCurrencyCode] = useState('');\n const [conversionRate, setConversionRate] = useState(1);\n\n const uiCurrencyFrom = useMemo(\n () => getUiCurrency(fromCurrencyCode),\n [fromCurrencyCode, getUiCurrency]\n );\n\n const uiCurrencyTo = useMemo(\n () => getUiCurrency(toCurrencyCode),\n [toCurrencyCode, getUiCurrency]\n );\n\n const onClose = useCallback(\n async (\n newProgress?: BulkEditProgress,\n closeMainDialogForPopover?: boolean\n ) => {\n if (newProgress?.step === BulkEditStep.Done) {\n setIsRefreshing(true);\n setActivePosEntity(0);\n\n // Depending whether it's Listing, Sales, or Purchase\n // the context would be different here\n if (refreshData) {\n await refreshData(true);\n }\n if (refreshExpandedListItems) {\n await refreshExpandedListItems();\n }\n setSelectionMode(undefined);\n if (closeMainDialogForPopover) {\n setMainDialogOpened(false);\n } else {\n setProgress(undefined);\n setPreview(undefined);\n }\n\n setIsRefreshing(false);\n // progress kept to allow the BulkEditStatusPopover to show the result\n }\n onCancel();\n },\n [\n onCancel,\n refreshData,\n refreshExpandedListItems,\n setActivePosEntity,\n setMainDialogOpened,\n setPreview,\n setProgress,\n setSelectionMode,\n ]\n );\n\n const onBulkEditDone = useCallback(\n async (doneProgress: BulkEditProgress, finalErrors: string[]) => {\n if (finalErrors.length === 0 && doneProgress.step === BulkEditStep.Done) {\n onClose(doneProgress, true);\n }\n },\n [onClose]\n );\n\n const { bulkEditHub, progress, preview, initJob, stage } = useBulkEditHub(\n entityType,\n BulkActionType.ConvertPurchasePayment,\n updateKey,\n onBulkEditDone\n );\n\n const hasBackgroundBulkEditFeature =\n bulkEditHub?.state === HubConnectionState.Connected;\n\n const [isRefreshing, setIsRefreshing] = useState(false);\n\n const isInputValid = useMemo(() => {\n return (\n fromCurrencyCode &&\n toCurrencyCode &&\n conversionRate > 0 &&\n fromCurrencyCode != toCurrencyCode\n );\n }, [fromCurrencyCode, toCurrencyCode, conversionRate]);\n\n const onSubmitHandler = useCallback(\n (onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void) => {\n if (onPreviewReceived) {\n onOkay(null, null, null, false, onPreviewReceived);\n } else {\n onOkay(\n fromCurrencyCode,\n toCurrencyCode,\n conversionRate,\n hasBackgroundBulkEditFeature,\n undefined,\n preview\n );\n }\n setIsLoading(false);\n },\n [\n onOkay,\n fromCurrencyCode,\n toCurrencyCode,\n conversionRate,\n hasBackgroundBulkEditFeature,\n preview,\n ]\n );\n\n const submittButtonRef = useRef(null);\n\n return (\n }\n />\n }\n onOpened={() => {\n setConversionRate(1);\n setFromCurrencyCode('');\n setToCurrencyCode('');\n initJob();\n }}\n onKeyUp={(e) => {\n if (submittButtonRef.current && e.key === 'Enter' && isInputValid) {\n submittButtonRef.current.click();\n }\n }}\n onClick={(e) => {\n // This so that this dialog does not cause event to flow to the EventHeader open/close event\n e.stopPropagation();\n e.preventDefault();\n }}\n onClosed={() => {\n setMainDialogOpened(false);\n if (progress) {\n setSelectionMode(undefined);\n }\n // Call the outside one if there is one\n rest.onClosed?.();\n }}\n footer={\n \n }\n onCancel={isLoading ? undefined : onCancel}\n >\n \n \n void 0}\n disabled={true}\n />\n\n {\n setFromCurrencyCode(e);\n }}\n />\n\n {' > '}\n\n void 0}\n disabled={true}\n />\n {\n setToCurrencyCode(e);\n }}\n />\n\n {\n let value = parseFloat(e.target.value);\n if (isNaN(value) || value < 0) {\n value = 0;\n }\n setConversionRate(value);\n }}\n postfixDisplay={}\n />\n \n \n \n );\n}\n","import { useUpdatePurchasesPermissions } from 'src/components/Purchases/BulkActions/useUpdatePurchasesPermissions';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { Stack } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Feature } from 'src/WebApiController';\n\nexport const LaunchBulkConvertPurchasePayments = ({\n onClick,\n disabled,\n}: {\n onClick: (e: React.MouseEvent) => void;\n disabled?: boolean;\n}) => {\n const { hasUpdatePurchasesPermission } = useUpdatePurchasesPermissions();\n const hasBulkConvertPaymentLinesFeature = useUserHasFeature(\n Feature.BulkConvertPaymentLines\n );\n\n if (!hasUpdatePurchasesPermission || !hasBulkConvertPaymentLinesFeature) {\n return null;\n }\n\n return (\n <>\n \n \n \n \n \n \n );\n};\n","import { useCallback } from 'react';\nimport {\n IPosEntity,\n useActivePosEntityContext,\n} from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { usePurchaseDataContext } from 'src/contexts/PurchaseDataContext';\nimport { BulkConvertPurchasePaymentDialog } from 'src/dialogs/BulkEdits/BulkConvertPurchasePaymentDialog';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n BulkEditPreviewWithDetails,\n BulkEditPurchaseClient,\n PurchaseOrderQuery,\n} from 'src/WebApiController';\n\nimport { PURCHASE_BULK_CONVERT_PAYMENTS_KEY } from '../../PurchaseActionDropdown.constants';\nimport { LaunchBulkConvertPurchasePayments } from './LaunchBulkConvertPurchasePayments';\n\nexport const useBulkConvertPurchasePaymentsAction = (\n filterQueryWithEventIds: PurchaseOrderQuery,\n setIsLoading: (v: boolean) => void,\n isLoading?: boolean,\n groupId?: string\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { setActivePosEntity } = useActivePosEntityContext();\n const updateKey = groupId\n ? `convert-purchase-payments-event-${groupId}`\n : PURCHASE_BULK_CONVERT_PAYMENTS_KEY;\n const { refreshData } = usePurchaseDataContext();\n const {\n eventsExpansion: { setListItemExpansion, refreshExpandedListItems },\n } = useCatalogDataContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const { openDialog: openBulkEditDialog, closeDialog: closeBulkEditDialog } =\n useDialog(\n DialogId.BulkConvertPurchasePayments,\n BulkConvertPurchasePaymentDialog\n );\n\n const onSubmit = useCallback(\n async (\n fromCurrencyCode: string | null,\n toCurrencyCode: string | null,\n conversionRate: number | null,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n await tryInvokeApi(\n async () => {\n const preview = await new BulkEditPurchaseClient(\n activeAccountWebClientConfig\n ).bulkConvertPurchasePaymentPreview(filterQueryWithEventIds);\n\n onPreviewReceived(preview);\n },\n (error) => {\n showErrorDialog('bulkConvertPurchasePaymentPreview', error, {\n trackErrorData: { filterQueryWithEventIds },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n } else if (\n conversionRate &&\n conversionRate > 0 &&\n toCurrencyCode &&\n fromCurrencyCode\n ) {\n await tryInvokeApi(\n async () => {\n const purchaseClient = new BulkEditPurchaseClient(\n activeAccountWebClientConfig\n );\n\n const succeeded = await purchaseClient.bulkConvertPurchasePayment(\n preview!.preview,\n updateKey,\n fromCurrencyCode,\n toCurrencyCode,\n conversionRate,\n supportBackgroundProcess\n );\n\n if (!supportBackgroundProcess) {\n if (succeeded) {\n // Invalidate the activePosEntity, so that when clicking on listingDetails\n // we force re-loading the listing and newest pricing settings can be displayed\n setActivePosEntity(0);\n await refreshData(true);\n await refreshExpandedListItems();\n }\n\n closeBulkEditDialog();\n }\n },\n (error) => {\n showErrorDialog('bulkConvertPurchasePayment', error, {\n trackErrorData: {\n filterQueryWithEventIds,\n fromCurrencyCode,\n toCurrencyCode,\n conversionRate,\n preview,\n },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n }\n },\n [\n setIsLoading,\n activeAccountWebClientConfig,\n filterQueryWithEventIds,\n showErrorDialog,\n updateKey,\n closeBulkEditDialog,\n setActivePosEntity,\n refreshData,\n refreshExpandedListItems,\n ]\n );\n\n const onChangeClick = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n if (groupId) {\n setListItemExpansion(true, [groupId]);\n }\n openBulkEditDialog({\n updateKey,\n onOkay: onSubmit,\n onCancel: closeBulkEditDialog,\n entityType: ActionOutboxEntityType.Purchase,\n });\n },\n [\n closeBulkEditDialog,\n groupId,\n onSubmit,\n openBulkEditDialog,\n setListItemExpansion,\n updateKey,\n ]\n );\n\n return {\n dropDown: (\n \n ),\n };\n};\n","import { useUpdatePurchasesPermissions } from 'src/components/Purchases/BulkActions/useUpdatePurchasesPermissions';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { Stack } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Feature } from 'src/WebApiController';\n\nexport const LaunchBulkMarkPurchaseAsPaid = ({\n onClick,\n disabled,\n}: {\n onClick: (e: React.MouseEvent) => void;\n disabled?: boolean;\n}) => {\n const { hasUpdatePurchasesPermission } = useUpdatePurchasesPermissions();\n const hasMarkPurchaseAsPaidFeature = useUserHasFeature(Feature.MarkPOAsPaid);\n\n if (!hasUpdatePurchasesPermission || !hasMarkPurchaseAsPaidFeature) {\n return null;\n }\n\n return (\n <>\n \n \n \n \n \n \n );\n};\n","import { HubConnectionState } from '@microsoft/signalr';\nimport { ComponentProps, useCallback, useRef, useState } from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { Modal as RSModal } from 'reactstrap';\nimport { BulkEditStatus } from 'src/components/common/BulkActions/BulkEditStatus';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport {\n BulkEditStage,\n useBulkEditHubContext,\n} from 'src/contexts/BulkEditHubContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { usePurchaseDataContext } from 'src/contexts/PurchaseDataContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { InfoMessage } from 'src/core/POS/MessageWithIcon/InfoMessage';\nimport { Stack } from 'src/core/ui';\nimport { useBulkEditHub } from 'src/hooks/useBulkEditHub';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { PurchaseOrderDetailsInput } from 'src/utils/purchaseUtils';\nimport {\n ActionOutboxEntityType,\n BulkActionType,\n BulkEditPreviewWithDetails,\n BulkEditProgress,\n BulkEditStep,\n DateTimeRange,\n PurchaseOrderDetails,\n} from 'src/WebApiController';\n\nimport { BulkEditFooter } from '../common/BulkEditFooter';\nimport { BulkEditHeader } from '../common/BulkEditHeader';\n\nexport type BulkMarkPurchaseAsPaidDialogProps = ComponentProps<\n typeof RSModal\n> & {\n updateKey: string;\n monthYear?: DateTimeRange;\n onOkay: (\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => void;\n onCancel: () => void;\n};\n\nexport const BulkMarkPurchaseAsPaidDialog = ({\n purchases,\n ...rest\n}: BulkMarkPurchaseAsPaidDialogProps) => {\n const methods = useForm();\n\n return (\n \n \n \n );\n};\n\nfunction BulkMarkPurchaseAsPaidDialogContent({\n updateKey,\n onOkay,\n onCancel,\n watch,\n reset,\n setValue,\n formState,\n ...rest\n}: BulkMarkPurchaseAsPaidDialogProps &\n Omit<\n ComponentProps>,\n 'children'\n >) {\n const { setActivePosEntity } =\n useActivePosEntityContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n const { refreshData } = usePurchaseDataContext();\n const { setSelectionMode } = useMultiSelectionContext();\n const { setProgress, setPreview, setMainDialogOpened } =\n useBulkEditHubContext();\n const [isLoading, setIsLoading] = useState(false);\n\n const onClose = useCallback(\n async (\n newProgress?: BulkEditProgress,\n closeMainDialogForPopover?: boolean\n ) => {\n if (newProgress?.step === BulkEditStep.Done) {\n setIsRefreshing(true);\n setActivePosEntity(0);\n\n if (refreshData) {\n await refreshData(true);\n }\n if (refreshExpandedListItems) {\n await refreshExpandedListItems();\n }\n setSelectionMode(undefined);\n if (closeMainDialogForPopover) {\n setMainDialogOpened(false);\n } else {\n setProgress(undefined);\n setPreview(undefined);\n }\n setIsRefreshing(false);\n // progress kept to allow the BulkEditStatusPopover to show the result\n }\n onCancel();\n },\n [\n onCancel,\n refreshData,\n refreshExpandedListItems,\n setActivePosEntity,\n setMainDialogOpened,\n setPreview,\n setProgress,\n setSelectionMode,\n ]\n );\n\n const onBulkEditDone = useCallback(\n async (doneProgress: BulkEditProgress, finalErrors: string[]) => {\n if (finalErrors.length === 0 && doneProgress.step === BulkEditStep.Done) {\n onClose(doneProgress, true);\n }\n },\n [onClose]\n );\n\n const { bulkEditHub, progress, preview, initJob, stage } = useBulkEditHub(\n ActionOutboxEntityType.Purchase,\n BulkActionType.MarkPurchaseAsPaid,\n updateKey,\n onBulkEditDone\n );\n\n const hasBackgroundBulkEditFeature =\n bulkEditHub?.state === HubConnectionState.Connected;\n\n const onSubmitHandler = useCallback(\n async (\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void\n ) => {\n if (onPreviewReceived) {\n setIsLoading(true);\n onOkay(false, onPreviewReceived, undefined);\n setIsLoading(false);\n } else {\n onOkay(hasBackgroundBulkEditFeature, undefined, preview);\n }\n },\n [onOkay, preview, hasBackgroundBulkEditFeature]\n );\n\n const [isRefreshing, setIsRefreshing] = useState(false);\n\n const submittButtonRef = useRef(null);\n\n return (\n }\n />\n }\n onOpened={() => {\n reset();\n initJob();\n }}\n onKeyUp={(e) => {\n if (submittButtonRef.current && e.key === 'Enter') {\n submittButtonRef.current.click();\n }\n }}\n onClosed={() => {\n setMainDialogOpened(false);\n if (progress) {\n setSelectionMode(undefined);\n }\n // Call the outside one if there is one\n rest.onClosed?.();\n }}\n footer={\n \n }\n onCancel={isLoading ? undefined : onCancel}\n >\n \n \n \n \n \n }\n />\n \n \n \n );\n}\n","import { useCallback } from 'react';\nimport { LaunchBulkMarkPurchaseAsPaid } from 'src/components/Purchases/PurchaseActionDropdown/components/BulkMarkPurchaseAsPaid/LaunchBulkMarkPurchaseAsPaid';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { usePurchaseDataContext } from 'src/contexts/PurchaseDataContext';\nimport { InfoMessage } from 'src/core/POS/MessageWithIcon/InfoMessage';\nimport { BulkMarkPurchaseAsPaidDialog } from 'src/dialogs/BulkEdits/BulkMarkPurchaseAsPaidDialog';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n BulkEditPreviewWithDetails,\n BulkEditPurchaseClient,\n PurchaseOrderQuery,\n} from 'src/WebApiController';\n\nimport { PURCHASE_BULK_MARK_AS_PAID_KEY } from '../../PurchaseActionDropdown.constants';\n\nexport const useBulkMarkPurchaseAsPaid = (\n filterQuery: PurchaseOrderQuery,\n setIsLoading: (v: boolean) => void,\n isLoading?: boolean,\n groupId?: string,\n isEventView?: boolean\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const updateKey = groupId\n ? `bulk-mark-purchase-as-paid-event-${groupId}`\n : PURCHASE_BULK_MARK_AS_PAID_KEY;\n\n const { showErrorDialog } = useErrorBoundaryContext();\n const { refreshData } = usePurchaseDataContext();\n const {\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n\n const {\n openDialog: openBulkMarkPurchaseAsPaidDialog,\n closeDialog: closeBulkMarkPurchaseAsPaidDialog,\n } = useDialog(DialogId.BulkMarkPurchaseAsPaid, BulkMarkPurchaseAsPaidDialog);\n\n const updatePurchaseOrders = !isEventView;\n\n const onSubmit = useCallback(\n async (\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => {\n setIsLoading(true);\n if (onPreviewReceived) {\n await tryInvokeApi(\n async () => {\n const bulkEditClient = new BulkEditPurchaseClient(\n activeAccountWebClientConfig\n );\n\n const preview =\n await bulkEditClient.bulkMarkPurchaseAsPaidPreview(filterQuery);\n\n onPreviewReceived(preview);\n },\n (error) => {\n showErrorDialog('bulkMarkPurchaseAsPaidPreview', error, {\n trackErrorData: { filterQuery },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n } else {\n await tryInvokeApi(\n async () => {\n const bulkEditClient = new BulkEditPurchaseClient(\n activeAccountWebClientConfig\n );\n\n const succeeded = await bulkEditClient.bulkMarkPurchaseAsPaid(\n preview!.preview,\n updateKey,\n supportBackgroundProcess\n );\n if (!supportBackgroundProcess) {\n if (succeeded) {\n await refreshData(true);\n await refreshExpandedListItems();\n }\n\n closeBulkMarkPurchaseAsPaidDialog();\n }\n },\n (error) => {\n showErrorDialog('bulkMarkPurchaseAsPaid', error, {\n trackErrorData: {\n preview,\n },\n });\n },\n () => {\n if (!supportBackgroundProcess) {\n setIsLoading(false);\n }\n }\n );\n }\n },\n [\n activeAccountWebClientConfig,\n filterQuery,\n refreshData,\n refreshExpandedListItems,\n setIsLoading,\n showErrorDialog,\n updateKey,\n closeBulkMarkPurchaseAsPaidDialog,\n ]\n );\n\n return {\n dropDown: (\n {\n e.preventDefault();\n e.stopPropagation();\n openBulkMarkPurchaseAsPaidDialog({\n updateKey,\n onOkay: onSubmit,\n onClosed: () => {\n setIsLoading(false);\n },\n entityType: ActionOutboxEntityType.Purchase,\n infoMessage: (\n }\n />\n ),\n onCancel: closeBulkMarkPurchaseAsPaidDialog,\n });\n }}\n disabled={isLoading}\n />\n ),\n };\n};\n","import { ReactNode } from 'react';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { Feature } from 'src/WebApiController';\n\nimport { useUpdatePurchasesPermissions } from '../useUpdatePurchasesPermissions';\n\ninterface BulkEditAccountingActionPermissionsHandlerProps {\n children: ReactNode;\n}\n\nexport const BulkEditAccountingActionPermissionsHandler = ({\n children,\n}: BulkEditAccountingActionPermissionsHandlerProps) => {\n const { hasUpdatePurchasesPermission } = useUpdatePurchasesPermissions();\n const hasBulkConvertPaymentLinesFeature = useUserHasFeature(\n Feature.BulkConvertPaymentLines\n );\n const hasMarkPurchaseAsPaidFeature = useUserHasFeature(Feature.MarkPOAsPaid);\n\n if (\n !hasUpdatePurchasesPermission ||\n (!hasBulkConvertPaymentLinesFeature && !hasMarkPurchaseAsPaidFeature)\n ) {\n return null;\n }\n\n return <>{children};\n};\n","import { useState } from 'react';\nimport { useBulkActionsState } from 'src/components/common/BulkActions/useBulkActionsState';\nimport { usePurchaseTileBulkActionsState } from 'src/components/Purchases/BulkActions/PurchasesTileBulkActions/usePurchaseTileBulkActionsState';\nimport { useBulkConvertPurchasePaymentsAction } from 'src/components/Purchases/PurchaseActionDropdown/components/BulkConvertPurchasePaymentsAction';\nimport { useBulkMarkPurchaseAsPaid } from 'src/components/Purchases/PurchaseActionDropdown/components/BulkMarkPurchaseAsPaid';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosDropdown } from 'src/core/POS/PosDropdown';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { ChevronDownIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { BulkEditAccountingActionPermissionsHandler } from '../../PurchasesGlobalBulkActions/BulkEditAccountingActionPermissionsHandler';\nimport { PurchasesBulkActionProps } from '../../PurchasesGlobalBulkActions/PurchasesBulkActions.types';\n\ntype AccountingActionsProps = {\n groupId: string;\n};\n\nexport const AccountingActions = ({\n groupId,\n isEventView,\n}: AccountingActionsProps & PurchasesBulkActionProps) => {\n const { areBulkActionsEnabled } = useBulkActionsState();\n const [isLoading, setIsLoading] = useState(false);\n\n const { filterQueryWithEventIds } = usePurchaseTileBulkActionsState(\n groupId,\n isEventView\n );\n\n const bulkConvertPayments = useBulkConvertPurchasePaymentsAction(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n groupId\n );\n\n const bulkMarkPurchaseAsPaidAction = useBulkMarkPurchaseAsPaid(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n undefined\n );\n\n return (\n \n \n \n \n \n }\n align=\"start\"\n triggerProps={{ disabled: isLoading || !areBulkActionsEnabled }}\n >\n {!isEventView && bulkConvertPayments.dropDown}\n {bulkMarkPurchaseAsPaidAction.dropDown}\n \n \n );\n};\n","import { MultiSelectActionsContainer } from 'src/components/common/MultiSelect/MultiSelectActionsContainer';\nimport { SettingsActions } from 'src/components/Purchases/BulkActions/PurchasesTileBulkActions/Actions/SettingsActions';\nimport { TagsActions } from 'src/components/Purchases/BulkActions/PurchasesTileBulkActions/Actions/TagsActions';\n\nimport { AccountingActions } from './Actions/AccountingActions';\n\ninterface PurchasesTileBulkActionsProps {\n groupId: string;\n isEventView?: boolean;\n}\n\nexport const PurchasesTileBulkActions = ({\n groupId,\n isEventView,\n}: PurchasesTileBulkActionsProps) => {\n return (\n \n \n \n \n \n );\n};\n","import { MouseEvent, useCallback, useContext } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { PurchaseIcon } from 'src/svgs';\nimport {\n EventIdQueryParam,\n PurchaseDeeplinkQueryParam,\n} from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { addDeepLinkUrlPart } from 'src/utils/deepLinkUtils';\nimport { getPurchaseOrderDetailsModalConfigWithDeepLink } from 'src/utils/purchaseUtils';\nimport { Event } from 'src/WebApiController';\n\ninterface AddPurchaseProps {\n event: Event;\n}\n\nexport const AddPurchaseAction = ({ event }: AddPurchaseProps) => {\n const { setModal } = useContext(ModalContext);\n\n const addPurchase = useCallback(\n (e: MouseEvent) => {\n e.stopPropagation();\n e.preventDefault();\n\n // To display addPurchaseModal for a concrete event,\n // the URL must contain ?eventId=&uniquePurchaseId=0\n addDeepLinkUrlPart(EventIdQueryParam, event.viagVirtualId);\n addDeepLinkUrlPart(PurchaseDeeplinkQueryParam, '0');\n setModal(getPurchaseOrderDetailsModalConfigWithDeepLink());\n },\n [event.viagVirtualId, setModal]\n );\n\n return (\n \n \n \n \n \n \n );\n};\n","import { OpenStubhubDropdownAction } from 'src/components/common/OpenSubhubDropdownAction';\nimport { AddPurchaseAction } from 'src/components/Purchases/PurchaseTileActionDropdown/components/AddPurchase';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { PosDropdown } from 'src/core/POS/PosDropdown';\nimport { vars } from 'src/core/themes';\nimport { IconsFill, MoreIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Event } from 'src/WebApiController';\n\ninterface PurchaseTileActionDropdownProps {\n event: Event;\n}\n\nexport const PurchaseTileActionDropdown = ({\n event,\n}: PurchaseTileActionDropdownProps) => {\n const actionsMsg = useContent(ContentId.Actions);\n return (\n \n \n \n }\n align=\"end\"\n triggerProps={{ disabled: false }}\n >\n \n \n \n );\n};\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport const PurchaseAccordionContent = styled.div`\n height: 100%;\n position: relative;\n display: flex;\n flex-direction: column;\n position: relative;\n .accordion {\n height: 100%;\n }\n`;\n\nexport const PurchaseAccordionItemContainer = styled.div<{\n isExpanded: boolean;\n}>`\n .accordion-item {\n border-radius: 0;\n border: 0;\n padding: ${() => `${vars.spacing.xxs} ${vars.spacing.xl}`};\n\n .accordion-body {\n padding: ${() => vars.spacing.sm};\n width: 100%;\n overflow-x: auto;\n width: 100%;\n border-radius: ${() => `0 0 ${vars.spacing.sm} ${vars.spacing.sm}`};\n border: ${(props) =>\n props.isExpanded\n ? '2px solid ' + props.theme.colors.borderActive\n : '1px solid ' + props.theme.colors.borderDark};\n border-top: 0;\n background: ${({ theme }) => theme.colors.backgroundPrimary};\n }\n\n .accordion-button {\n &:focus {\n box-shadow: none;\n }\n padding: ${() =>\n `${vars.spacing.lg} ${vars.spacing['3xl']} ${vars.spacing.lg} ${vars.spacing.lg}`};\n width: 100%;\n\n border-radius: ${(props) =>\n props.isExpanded\n ? `${vars.borderRadius.m} ${vars.borderRadius.m} 0 0`\n : vars.borderRadius.m};\n\n border: ${(props) =>\n props.isExpanded\n ? '2px solid ' + props.theme.colors.borderActive\n : '1px solid ' + props.theme.colors.borderDark};\n\n ${(props) => props.isExpanded && 'border-bottom: 0'};\n\n background-color: ${(props) =>\n props.isExpanded\n ? props.theme.colors.backgroundSecondary\n : props.theme.colors.backgroundPrimary};\n\n color: ${(props) => props.theme.colors.textPrimary};\n\n &:hover {\n background-color: ${(props) =>\n props.isExpanded\n ? props.theme.colors.backgroundSecondary\n : props.theme.colors.primary700};\n\n color: ${(props) =>\n props.isExpanded\n ? props.theme.colors.textBrand\n : props.theme.colors.textDarker};\n }\n\n ${({ theme: { media } }) =>\n `${media.makeMediaQuery(\n media.breakpoints.md,\n `padding: ${vars.spacing.xl} ${vars.spacing['5xl']} ${vars.spacing.xl} ${vars.spacing.lg};`\n )}`}\n\n &::after {\n position: absolute;\n top: 50%;\n transform: translateY(-50%)\n ${(props) => (!props.isExpanded ? 'rotate(-90deg)' : '')};\n right: ${() => vars.spacing.xxs};\n\n ${({ theme: { media } }) =>\n `${media.makeMediaQuery(\n media.breakpoints.md,\n `right: ${vars.spacing.lg};`\n )}`}\n }\n\n transition: all 0.2s;\n\n .name {\n font-weight: 600;\n }\n }\n }\n`;\n\nexport const PurchaseAccordionDividerContainer = styled.div<{\n showShadow: boolean;\n}>`\n position: absolute;\n overflow: hidden;\n width: 100%;\n background-color: transparent;\n padding-left: ${() => vars.spacing.sm};\n z-index: 2;\n box-shadow: ${(props) =>\n props.showShadow\n ? `0px 8px 8px -4px ${props.theme.colors.textDisabled}`\n : 'none'};\n`;\n\nexport const PurchaseAccordionDividerContainerWithBackground = styled.div<{\n hasScrollBar: boolean;\n}>`\n background-color: white;\n width: calc(100% - ${(props) => (props.hasScrollBar ? '16px' : '0px')});\n height: 40px;\n display: flex;\n justify-content: space-between;\n`;\n\nexport const ItemsCountDiv = styled.div`\n display: flex;\n gap: ${() => vars.spacing.sm};\n font-style: italic;\n text-transform: lowercase;\n ${({\n theme: {\n typography: { getStyles },\n },\n }) => getStyles('caption1')};\n`;\n\nexport const TotalCostDiv = styled.div`\n text-align: right;\n ${({\n theme: {\n typography: { getStyles },\n },\n }) => getStyles('title6')};\n`;\n\nexport const PurchaseItemHeaderDateDisplay = styled.div`\n color: ${(props) => props.theme.colors.textLinkPrimary};\n ${({\n theme: {\n typography: { getStyles },\n },\n }) => getStyles('title5', 'bold')};\n`;\n","import { useMemo } from 'react';\nimport { MultiSelectionToggleGroup } from 'src/components/common/MultiSelect/Toggle/MultiSelectionToggleGroup';\nimport { MetricsDisplayPlaceholder } from 'src/components/Metrics';\nimport { PurchaseTileActionDropdown } from 'src/components/Purchases/PurchaseTileActionDropdown';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { useCatalogMetricsContext } from 'src/contexts/CatalogMetricsContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useGetEventFullInfo } from 'src/hooks/useGetEventFullInfo';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Feature, TicketGroupMetrics } from 'src/WebApiController';\n\nimport {\n EventItemHeader,\n EventItemHeaderType,\n METRICS_PLACEHOLDER_DIMS,\n} from '../../Events/EventItemHeader';\nimport {\n ItemsCountDiv,\n TotalCostDiv,\n} from '../PurchaseDatesAccordion/PurchaseDateAccordion.styled';\nimport { FullPageEventAction } from '../SalesEventsAccordion/FullPageEventAction';\n\nexport const EventTicketGroupHeader = (props: EventItemHeaderType) => {\n const { event, ...rest } = props;\n const { performer, venue } = useGetEventFullInfo(event);\n const { eventMetrics } = useCatalogMetricsContext();\n\n const hasBulkEditInPurchaseEventFeature = useUserHasFeature(\n Feature.BulkEditInPurchaseEvent\n );\n\n const metrics = useMemo(() => {\n return eventMetrics?.[event.viagVirtualId];\n }, [event.viagVirtualId, eventMetrics]);\n\n const totalCostText = useContent(ContentId.TotalCost);\n\n const {\n eventsExpansion: { expandedListItems, toggleListItemExpansion },\n } = useCatalogDataContext();\n\n const onToggleGroup = (groupId: string) => {\n if (!expandedListItems.includes(groupId)) {\n toggleListItemExpansion([groupId]);\n }\n };\n\n return (\n \n \n {hasBulkEditInPurchaseEventFeature\n ? [\n ,\n ]\n : []}\n \n \n }\n headerMetrics={\n metrics ? (\n \n {metrics.ttlCst?.disp}\n \n ) : (\n \n )\n }\n metrics={\n metrics ? (\n \n
    \n {metrics.tktQty}{' '}\n \n
    \n
    \n ) : (\n \n )\n }\n />\n );\n};\n","import clsx from 'clsx';\nimport { useEffect } from 'react';\nimport { EventTicketGroupBody } from 'src/components/Accordions/TicketGroupsEventsAccordion/EventTicketGroupBody';\nimport * as EmptySectionContent from 'src/components/common/EmptySectionContent';\nimport { MultiSelectActionBar } from 'src/components/common/MultiSelect/MultiSelectActionBar';\nimport { multiActionToolBarNoHorizontalPadding } from 'src/components/Events/EventPage/EventPage.css';\nimport { PurchasesBulkActionsPermissions } from 'src/components/Purchases/BulkActions/PurchasesBulkActionsPermissions';\nimport { PurchasesTileBulkActions } from 'src/components/Purchases/BulkActions/PurchasesTileBulkActions/PurchasesTileBulkActions';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { SearchSolidIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { EventWithData, PurchaseOrderTicketGroup } from 'src/WebApiController';\n\nimport { MinRowsForUsingVirtuoso } from '../constants';\nimport {\n EventAccordionItemProps,\n EventsAccordion,\n VirtualizedEventAccordionProps,\n} from '../EventsAccordion';\nimport { EventTicketGroupHeader } from './EventTicketGroupHeader';\n\nexport function translateEventToTicketGroupAccordionItem(\n props: EventWithData,\n index: number,\n noPadding?: boolean\n): EventAccordionItemProps {\n return {\n index,\n itemId: props.event.viagVirtualId,\n HeaderComponent: EventTicketGroupHeader,\n BodyComponent: EventTicketGroupBody,\n AfterHeaderComponent: () => (\n \n \n \n \n \n ),\n usingVirtuoso: (props.counts.tktGrpsCnt ?? 0) > MinRowsForUsingVirtuoso,\n ...props,\n entities: props.entities.ticketGroups ?? [],\n entityCount: props.counts.tktGrpsCnt ?? 0,\n };\n}\n\nexport function TicketGroupsEventsAccordion(\n props: VirtualizedEventAccordionProps\n) {\n const { setAllGroupsIds } = useMultiSelectionContext();\n\n useEffect(() => {\n const itemsIds = props.items.map((item) => item.event.viagVirtualId);\n setAllGroupsIds(itemsIds);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return ;\n}\n\nexport function TicketGroupEventsEmpty() {\n return (\n \n \n \n }\n >\n \n \n \n \n \n \n \n );\n}\n","import { useEffect, useMemo } from 'react';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\n\nexport const useAccordionItem = (viagVirtualId: string) => {\n const {\n isLoading,\n isItemsLoading,\n eventsTransformed,\n eventsExpansion: { setListItemExpansion },\n } = useCatalogDataContext();\n\n useEffect(() => {\n if (viagVirtualId) {\n setListItemExpansion(true, [viagVirtualId]);\n }\n }, [setListItemExpansion, viagVirtualId]);\n\n const accordionItemProps = useMemo(\n () =>\n eventsTransformed?.length\n ? eventsTransformed.find(\n (ev) => ev.event.viagVirtualId === viagVirtualId\n )\n : undefined,\n [eventsTransformed, viagVirtualId]\n );\n\n return { isLoading, isItemsLoading, accordionItemProps };\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport function SwitchIcon(props: Omit) {\n return (\n \n \n \n );\n}\n","import { EventIdQueryParam } from 'src/utils/constants/constants';\nimport { MainFilterQueryParam } from 'src/utils/eventQueryUtils';\nimport { SectionType } from 'src/utils/types/sectionType';\n\nexport const getDefaultReturnUrl = (\n path: string,\n viagVirtualId?: string | null\n) => {\n const queryParams = new URLSearchParams(location.search);\n\n queryParams.delete(EventIdQueryParam);\n queryParams.delete('queryId'); // TODO - this is obsolete and no longer use, but it could still exists\n\n return `/${path}?${queryParams.toString()}${\n viagVirtualId ? `#${viagVirtualId}` : ''\n }`;\n};\n\nexport const getSidePanelSwitchToUrl = ({\n sectionType,\n marketplaceEntityIds,\n hasFullPageEventViewEntitySelection,\n}: {\n sectionType: SectionType;\n marketplaceEntityIds?: number[];\n hasFullPageEventViewEntitySelection: boolean;\n}) => {\n const url = new URL(window.location.href);\n const searchParams = new URLSearchParams(url.search);\n searchParams.delete(MainFilterQueryParam);\n\n let route = '';\n\n switch (sectionType) {\n case SectionType.PurchaseSideTable:\n route = `/purchases/event`;\n break;\n case SectionType.InventorySideTable:\n route = `/inventory/event`;\n break;\n case SectionType.SalesSideTable:\n route = `/sales/event`;\n break;\n default:\n break;\n }\n\n if (\n marketplaceEntityIds &&\n marketplaceEntityIds.length > 0 &&\n hasFullPageEventViewEntitySelection\n ) {\n searchParams.set(\n MainFilterQueryParam,\n JSON.stringify({ marketplaceEntityIds: marketplaceEntityIds.map(String) })\n );\n }\n\n const queryString = searchParams.toString();\n return queryString ? `${route}?${queryString}` : route;\n};\n","import { MouseEvent } from 'react';\nimport { useNavigate, useSearchParams } from 'react-router-dom';\nimport { useToggle } from 'react-use';\nimport { BulkEditStatusPopover } from 'src/components/common/BulkActions/BulkEditStatusPopover';\nimport { MultiSelectionToggleGroup } from 'src/components/common/MultiSelect/Toggle/MultiSelectionToggleGroup';\nimport { Content, FormatContent } from 'src/contexts/ContentContext/Content';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport {\n ColumnSettingsModal,\n TableColumnsSectionType,\n} from 'src/modals/ColumnSettings/ColumnSettings';\nimport { LayoutIcon } from 'src/svgs';\nimport { SwitchIcon } from 'src/svgs/SwitchIcon';\nimport { CustomListingColumn } from 'src/utils/columns/inventory/inventoryCustomColumnUtils.types';\nimport { EventIdQueryParam } from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport { ActionOutboxEntityType, Feature } from 'src/WebApiController';\n\nimport { getSidePanelSwitchToUrl } from '../utils';\n\nconst SwitchToButton = ({\n sectionType,\n onSwitchSection,\n}: {\n sectionType: TableColumnsSectionType;\n onSwitchSection: (sectionType: TableColumnsSectionType) => void;\n}) => {\n const switchContentId = (sectionType: TableColumnsSectionType) => {\n switch (sectionType) {\n case SectionType.PurchaseSideTable:\n return ContentId.Purchases;\n case SectionType.InventorySideTable:\n return ContentId.Inventory;\n case SectionType.SalesSideTable:\n return ContentId.Sales;\n default:\n return '';\n }\n };\n\n return (\n \n );\n};\n\nexport const SidePanelToolbar = ({\n sectionType,\n entityIds,\n filterBar,\n noData,\n}: {\n sectionType: TableColumnsSectionType;\n entityIds?: number[];\n filterBar?: React.ReactNode;\n noData?: boolean;\n}) => {\n const [isColumnModalOpen, toggleColumnModal] = useToggle(false);\n const [searchParams] = useSearchParams();\n const viagEventId = searchParams.get(EventIdQueryParam);\n const hasFullPageEventViewSideTableBulkEdit = useUserHasFeature(\n Feature.FullPageEventViewSideTableBulkEdit\n );\n const hasFullPageEventViewSideTableFilters = useUserHasFeature(\n Feature.FullPageEventViewSideTableFilters\n );\n\n const onColumnSettingButtonClickHandler = (\n e: MouseEvent\n ) => {\n e.stopPropagation();\n if (!isColumnModalOpen) toggleColumnModal(true);\n };\n const navigate = useNavigate();\n const hasFullPageEventViewEntitySelection = useUserHasFeature(\n Feature.FullPageEventViewEntitySelection\n );\n\n const onSwitchSection = (sectionType: TableColumnsSectionType) => {\n const route = getSidePanelSwitchToUrl({\n sectionType,\n marketplaceEntityIds: entityIds,\n hasFullPageEventViewEntitySelection,\n });\n if (route) {\n navigate(route);\n }\n };\n\n const getEntityType = (sectionType: TableColumnsSectionType) => {\n switch (sectionType) {\n case SectionType.PurchaseSideTable:\n return ActionOutboxEntityType.Purchase;\n case SectionType.InventorySideTable:\n return ActionOutboxEntityType.Listing;\n case SectionType.SalesSideTable:\n return ActionOutboxEntityType.Sale;\n default:\n return ActionOutboxEntityType.Listing;\n }\n };\n\n if (noData) {\n return (\n \n {hasFullPageEventViewSideTableFilters && filterBar}\n \n \n );\n }\n\n return (\n \n {hasFullPageEventViewSideTableFilters && filterBar}\n \n {hasFullPageEventViewSideTableBulkEdit && (\n \n \n \n \n )}\n \n \n \n {isColumnModalOpen ? (\n \n onClose={toggleColumnModal}\n sectionType={sectionType}\n />\n ) : null}\n \n );\n};\n","import { useMemo, useState } from 'react';\nimport { MobileFilterToolbar } from 'src/components/FilterToolbar';\nimport * as styles from 'src/components/MainFilterBar/MainFilterBar.css';\nimport { Content } from 'src/contexts/ContentContext/Content';\nimport { ProcessedQuickFilter } from 'src/hooks/useQuickFilters';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { QueryWithViewMode } from 'src/utils/eventQueryUtils';\n\nconst ALL_FILTER_ID = 'all';\nexport const SidePanelFilters = ({\n setFilterQuery,\n quickFilters,\n initialQuery,\n}: {\n setFilterQuery: (query: TQuery) => void;\n quickFilters: ProcessedQuickFilter[];\n initialQuery: TQuery;\n}) => {\n const [selectedQuickFilterId, setSelectedQuickFilterId] =\n useState(ALL_FILTER_ID);\n\n const finalQuickFilters = useMemo(() => {\n return quickFilters.map(\n ({ id, name, isCustomFilter, isHidden, data: query }) => {\n return {\n id,\n name,\n isCustomFilter,\n isHidden,\n isSelected: selectedQuickFilterId === id,\n onClick: () => {\n setFilterQuery(query);\n setSelectedQuickFilterId(id);\n },\n };\n }\n );\n }, [quickFilters, selectedQuickFilterId, setFilterQuery]);\n\n const allFilter = useMemo(\n () => [\n {\n id: ALL_FILTER_ID,\n name: ,\n isHidden: false,\n isSelected: selectedQuickFilterId === ALL_FILTER_ID,\n onClick: () => {\n setSelectedQuickFilterId(ALL_FILTER_ID);\n setFilterQuery(initialQuery);\n },\n isCustomFilter: false,\n },\n ],\n [initialQuery, selectedQuickFilterId, setFilterQuery]\n );\n\n const mergedFilters = useMemo(() => {\n return finalQuickFilters ? [...allFilter, ...finalQuickFilters] : allFilter;\n }, [finalQuickFilters, allFilter]);\n\n return (\n
    \n \n
    \n );\n};\n","import { useEffect } from 'react';\nimport { SidePanelFilters } from 'src/components/Events/EventPage/SidePanel/SidePanelFilters';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { useQuickFilters } from 'src/hooks/useQuickFilters';\nimport { PurchaseOrderQuery, UserSetting } from 'src/WebApiController';\n\nimport { useDefaultPurchaseFilters } from './hooks/useDefaultPurchaseFilters';\n\nexport function PurchaseSideTableFilterBar() {\n const {\n filterQuery: purchaseQuery,\n initialQuery,\n setFilterQuery,\n setTempQuery,\n } = useFilterQueryContext();\n\n useEffect(() => {\n setTempQuery(purchaseQuery);\n }, [purchaseQuery, setTempQuery]);\n\n const defaultQuickFilters = useDefaultPurchaseFilters({\n purchaseQuery,\n initialQuery,\n });\n\n const { quickFilters } = useQuickFilters({\n quickFiltersStateSetting: UserSetting.QuickFiltersStatePurchases,\n customQuickFiltersSetting: UserSetting.QuickFiltersCustomPurchases,\n defaultQuickFilters,\n });\n\n return (\n \n );\n}\n","import { useCallback, useEffect, useMemo } from 'react';\nimport { translateEventToTicketGroupAccordionItem } from 'src/components/Accordions/TicketGroupsEventsAccordion';\nimport { ActivePosEntityProvider } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { BulkEditHubContextProvider } from 'src/contexts/BulkEditHubContext';\nimport { CatalogDataContextProvider } from 'src/contexts/CatalogDataContext';\nimport { CatalogMultiSelectionContextProvider } from 'src/contexts/CatalogMultiSelectionContext';\nimport { Content, FormatContent } from 'src/contexts/ContentContext';\nimport { DialogProvider } from 'src/contexts/DialogContext/DialogContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport {\n FilterQueryContextProvider,\n useFilterQueryContext,\n} from 'src/contexts/FilterQueryContext';\nimport { MultiSelectionContextProvider } from 'src/contexts/MultiSelectionContext';\nimport { PurchaseDataContextProvider } from 'src/contexts/PurchaseDataContext';\nimport { SellerUserSettingsProvider } from 'src/contexts/SellerUserSettingsContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { NoData } from 'src/tables/Table';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { EmptyPurchaseQuery } from 'src/utils/eventQueryUtils';\nimport { transformData } from 'src/utils/eventWithDataUtils';\nimport {\n getCatalogData,\n getCatalogDataExpanded,\n PURCHASE_USER_SETTINGS,\n} from 'src/utils/purchaseUtils';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport {\n ActionOutboxEntityType,\n PurchaseClient,\n PurchaseOrderDetails,\n PurchaseOrderQuery,\n PurchaseOrderState,\n UserSetting,\n} from 'src/WebApiController';\n\nimport * as styles from '../../Events/EventPage/EventPage.css';\nimport { useAccordionItem } from '../../Events/EventPage/hooks/useAccordionItem';\nimport { SidePanelToolbar } from '../../Events/EventPage/SidePanel/SidePanelToolbar';\nimport { PurchaseSideTableFilterBar } from '../PurchaseFilterBar/PurchaseSideTableFilterBar';\n\nconst Purchases = ({\n viagVirtualId,\n queryInput,\n}: {\n viagVirtualId: string;\n queryInput?: Partial>;\n}) => {\n const { isLoading, isItemsLoading, accordionItemProps } =\n useAccordionItem(viagVirtualId);\n\n const { setFilterQuery, isQueryInitialized } =\n useFilterQueryContext();\n\n useEffect(() => {\n setFilterQuery({\n ...EmptyPurchaseQuery,\n ...queryInput,\n eventOrMappingIds: [viagVirtualId],\n purchaseOrderState: PurchaseOrderState.Active,\n });\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [queryInput, setFilterQuery, isQueryInitialized]);\n\n const purchasesAccordionItem = useMemo(\n () =>\n accordionItemProps &&\n translateEventToTicketGroupAccordionItem(accordionItemProps, 0, true),\n [accordionItemProps]\n );\n\n const tgIds = useMemo(\n () => purchasesAccordionItem?.entities?.map((tg) => Number(tg.tgId)) || [],\n [purchasesAccordionItem?.entities]\n );\n\n const hasSelectedEntities =\n (queryInput?.listingIds && queryInput?.listingIds?.length > 0) ||\n (queryInput?.saleIds && queryInput?.saleIds?.length > 0);\n\n const { BodyComponent, AfterHeaderComponent } = purchasesAccordionItem || {};\n const noData =\n (!isLoading && !purchasesAccordionItem) ||\n (!isItemsLoading && !accordionItemProps?.entities);\n return (\n <>\n
    \n }\n noData={noData}\n entityIds={hasSelectedEntities ? tgIds : []}\n />\n {!noData && AfterHeaderComponent && }\n
    \n {isLoading && }\n {noData ? (\n \n }\n />\n \n ) : (\n BodyComponent &&\n accordionItemProps && (\n \n )\n )}\n \n );\n};\n\nexport const PurchasesSideTable = ({\n viagVirtualId,\n queryInput,\n}: {\n viagVirtualId: string;\n queryInput?: Partial>;\n}) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n\n const getCatalogDataExpandedCallback = useCallback(\n (ids: string[], filterQuery: PurchaseOrderQuery) =>\n getCatalogDataExpanded(ids, filterQuery, {\n activeAccountWebClientConfig,\n onError: (error) => {\n trackError('PurchaseClient.getTicketGroupsForEvents', error, {\n ...filterQuery,\n eventIds: ids,\n });\n },\n }),\n [activeAccountWebClientConfig, trackError]\n );\n\n const getActivePosEntity = useCallback(\n async (purchaseId: number) => {\n const purchaseDetails = await new PurchaseClient(\n activeAccountWebClientConfig\n ).getPurchaseOrderByPurchaseOrderId(purchaseId, false);\n if (purchaseDetails) {\n return {\n posEntityId: purchaseDetails.id,\n posEntity: purchaseDetails,\n event: null,\n posEntityDisplayId: purchaseDetails.id.toString(),\n };\n }\n\n return {};\n },\n [activeAccountWebClientConfig]\n );\n\n return (\n \n \n \n initialQuery={{\n ...EmptyPurchaseQuery,\n eventOrMappingIds: [viagVirtualId],\n purchaseOrderState: PurchaseOrderState.Active,\n }}\n emptyQuery={EmptyPurchaseQuery}\n viewModeSettingId={UserSetting.PurchasePageViewMode}\n loadQueryFromUrl={false}\n >\n \n entityType={ActionOutboxEntityType.Purchase}\n queryKey={'getCatalogForPurchaseOrders'}\n getCatalogData={(c, f) => getCatalogData(c, f, true)}\n getCatalogDataExpanded={getCatalogDataExpandedCallback}\n transformEventData={transformData}\n >\n \n entityType={ActionOutboxEntityType.Purchase}\n getActivePosEntity={getActivePosEntity}\n >\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n","import { useMemo } from 'react';\nimport { PurchasesSideTable } from 'src/components/Purchases/PurchaseEventPage/PurchasesSideTable';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { useInventoryEventDetailContext } from 'src/contexts/InventoryEventDetailContext/InventoryEventDetailContext';\nimport { ListingQuery } from 'src/WebApiController';\n\nexport const PurchaseDetailPanel = () => {\n const { event, selectedListingIds } = useInventoryEventDetailContext();\n\n const { filterQuery } = useFilterQueryContext();\n\n const listingIdFilterQuery = useMemo(() => {\n const marketplaceEntityIds = filterQuery?.marketplaceEntityIds?.map(Number);\n\n return {\n listingIds:\n (selectedListingIds?.length > 0 ? selectedListingIds : null) ||\n marketplaceEntityIds,\n };\n }, [filterQuery?.marketplaceEntityIds, selectedListingIds]);\n\n return !event ? null : (\n \n );\n};\n","import { useEffect, useMemo, useState } from 'react';\nimport { SidePanelFilters } from 'src/components/Events/EventPage/SidePanel/SidePanelFilters';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { QuickFilter, useQuickFilters } from 'src/hooks/useQuickFilters';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n DateRangePresetName,\n getDateRangePresets,\n} from 'src/utils/dateTimeUtils';\nimport {\n DateTimeRangeWithRelative,\n SaleQuery,\n UserSetting,\n} from 'src/WebApiController';\n\nimport { useDefaultSaleFilters } from './hooks/useDefaultSaleFilters';\n\nexport function SaleSideTableFilterBar() {\n const {\n filterQuery: saleQuery,\n initialQuery,\n setFilterQuery,\n setTempQuery,\n } = useFilterQueryContext();\n\n useEffect(() => {\n setTempQuery(saleQuery);\n }, [saleQuery, setTempQuery]);\n\n const defaultQuickFilters = useDefaultSaleFilters({\n saleQuery,\n initialQuery,\n });\n\n const { quickFilters } = useQuickFilters({\n quickFiltersStateSetting: UserSetting.QuickFiltersStateSales,\n customQuickFiltersSetting: UserSetting.QuickFiltersCustomSales,\n defaultQuickFilters,\n });\n\n return (\n \n );\n}\n","import { isEmpty } from 'lodash-es';\nimport { useCallback, useEffect, useMemo } from 'react';\nimport { translateEventToSaleAccordionItem } from 'src/components/Accordions';\nimport { useAccordionItem } from 'src/components/Events/EventPage/hooks/useAccordionItem';\nimport { SidePanelToolbar } from 'src/components/Events/EventPage/SidePanel/SidePanelToolbar';\nimport { ActivePosEntityProvider } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { BulkEditHubContextProvider } from 'src/contexts/BulkEditHubContext';\nimport { CatalogDataContextProvider } from 'src/contexts/CatalogDataContext';\nimport { CatalogMultiSelectionContextProvider } from 'src/contexts/CatalogMultiSelectionContext';\nimport { CollapsableViewProvider } from 'src/contexts/CollapsableViewContext/CollapsableViewContext';\nimport { Content, FormatContent } from 'src/contexts/ContentContext';\nimport { DialogProvider } from 'src/contexts/DialogContext/DialogContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport {\n FilterQueryContextProvider,\n useFilterQueryContext,\n} from 'src/contexts/FilterQueryContext';\nimport { MultiSelectionContextProvider } from 'src/contexts/MultiSelectionContext';\nimport { SellerUserSettingsProvider } from 'src/contexts/SellerUserSettingsContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport {\n getCatalogData,\n getCatalogDataExpanded,\n SALE_USER_SETTINGS,\n} from 'src/navigations/Routes/Sales';\nimport { NoData } from 'src/tables/Table';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { DefaultSaleQuery, EmptySaleQuery } from 'src/utils/eventQueryUtils';\nimport { transformData } from 'src/utils/eventWithDataUtils';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport {\n ActionOutboxEntityType,\n Feature,\n SaleClient,\n SaleDetails,\n SaleQuery,\n SectionInfo,\n UserSetting,\n} from 'src/WebApiController';\n\nimport * as styles from '../../Events/EventPage/EventPage.css';\nimport { SaleSideTableFilterBar } from '../SaleFilterBar/SaleSideTableFilterBar';\n\nconst Sales = ({\n viagVirtualId,\n selectedSections,\n queryInput,\n}: {\n viagVirtualId: string;\n selectedSections?: SectionInfo[];\n queryInput?: Partial>;\n}) => {\n const { isLoading, isItemsLoading, accordionItemProps } =\n useAccordionItem(viagVirtualId);\n\n const { setFilterQuery, isQueryInitialized } =\n useFilterQueryContext();\n\n const hasCondensedTabsFeature = useUserHasFeature(\n Feature.CondensedPreviewTabsAndSingleListing\n );\n\n useEffect(() => {\n setFilterQuery({\n ...DefaultSaleQuery,\n ...queryInput,\n eventOrMappingIds: [viagVirtualId],\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [queryInput, setFilterQuery, isQueryInitialized]);\n\n const hasSelectedEntities =\n (queryInput?.listingIds && queryInput?.listingIds?.length > 0) ||\n (queryInput?.purchaseOrderIds && queryInput?.purchaseOrderIds?.length > 0);\n\n const { entities } = accordionItemProps || {};\n const sales = entities?.sales;\n\n const filteredEventSales = useMemo(() => {\n if (!selectedSections || isEmpty(selectedSections)) {\n return sales ?? null;\n }\n const sectionIds = new Set(selectedSections.map(({ id }) => id));\n const sectionNames = new Set(selectedSections.map(({ name }) => name));\n const rowIds = new Set(\n selectedSections.flatMap(({ rows }) => rows.map(({ id }) => id))\n );\n\n return (\n sales?.filter(({ seating }) => {\n return (\n (seating?.sectionId && sectionIds.has(seating?.sectionId)) ||\n (seating?.section && sectionNames.has(seating?.section)) ||\n (seating?.rowId && rowIds.has(seating.rowId))\n );\n }) ?? null\n );\n }, [sales, selectedSections]);\n\n const salesAccordionItem = useMemo(\n () =>\n accordionItemProps &&\n translateEventToSaleAccordionItem(accordionItemProps, 0, true),\n [accordionItemProps]\n );\n\n const saleIds = filteredEventSales?.map(({ id }) => id) ?? [];\n\n const { BodyComponent, AfterHeaderComponent } = salesAccordionItem || {};\n\n const noData =\n (!isLoading && !salesAccordionItem) || (!isItemsLoading && !sales);\n return (\n <>\n
    \n }\n entityIds={hasSelectedEntities ? saleIds : undefined}\n noData={noData}\n />\n {!noData && AfterHeaderComponent && }\n
    \n {isLoading && }\n {noData ? (\n \n }\n />\n \n ) : (\n BodyComponent &&\n accordionItemProps && (\n \n )\n )}\n \n );\n};\nexport const SalesSideTable = ({\n viagVirtualId,\n selectedSections,\n queryInput,\n}: {\n viagVirtualId: string;\n selectedSections?: SectionInfo[];\n queryInput?: Partial>;\n}) => {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const { trackError } = useErrorBoundaryContext();\n\n const getCatalogDataExpandedCallback = useCallback(\n (ids: string[], filterQuery: SaleQuery) =>\n getCatalogDataExpanded(ids, filterQuery, false, {\n activeAccountWebClientConfig,\n onError: (error) => {\n trackError('SaleClient.getSalesForEvents', error, {\n ...filterQuery,\n eventIds: ids,\n });\n },\n }),\n [activeAccountWebClientConfig, trackError]\n );\n\n const getActivePosEntity = useCallback(\n async (saleId: number) => {\n if (activeAccountWebClientConfig.activeAccountId) {\n const saleDetail = await new SaleClient(\n activeAccountWebClientConfig\n ).getSaleBySaleId(saleId);\n\n if (saleDetail) {\n return {\n posEntityId: saleDetail.id,\n posEntity: saleDetail,\n posEntityDisplayId: saleDetail.idOnMkp,\n };\n }\n }\n return {};\n },\n [activeAccountWebClientConfig]\n );\n\n return (\n \n \n \n initialQuery={{\n ...DefaultSaleQuery,\n eventOrMappingIds: [viagVirtualId],\n }}\n emptyQuery={EmptySaleQuery}\n viewModeSettingId={UserSetting.SalePageViewMode}\n loadQueryFromUrl={false}\n >\n \n entityType={ActionOutboxEntityType.Sale}\n queryKey={'getCatalogForSale'}\n getCatalogData={(c, f) => getCatalogData(c, f, true)}\n getCatalogDataExpanded={getCatalogDataExpandedCallback}\n transformEventData={transformData}\n >\n \n \n \n entityType={ActionOutboxEntityType.Sale}\n getActivePosEntity={getActivePosEntity}\n >\n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n","import { useMemo } from 'react';\nimport { SalesSideTable } from 'src/components/Sales/SaleEventPage/SaleSideTable';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { useInventoryEventDetailContext } from 'src/contexts/InventoryEventDetailContext/InventoryEventDetailContext';\nimport { ListingQuery } from 'src/WebApiController';\n\n\nexport const SaleDetailPanel = () => {\n const { event, selectedListingIds, filterSections } =\n useInventoryEventDetailContext();\n\n const { filterQuery } = useFilterQueryContext();\n\n const listingIdFilterQuery = useMemo(() => {\n const marketplaceEntityIds = filterQuery?.marketplaceEntityIds?.map(Number);\n\n return {\n listingIds:\n (selectedListingIds?.length > 0 ? selectedListingIds : null) ||\n marketplaceEntityIds,\n };\n }, [filterQuery?.marketplaceEntityIds, selectedListingIds]);\n\n return !event ? null : (\n \n );\n};\n","import { useInventoryEventDetailContext } from 'src/contexts/InventoryEventDetailContext/InventoryEventDetailContext';\n\nimport { SidePanelTab } from '../../../MarketListings/MarketListingHeader';\nimport * as styles from './DetailPanelBody.css';\nimport { ListingDetailPanel } from './Listing/ListingDetailPanel';\nimport { NotesDetailPanel } from './NotesDetailPanel';\nimport { PurchaseDetailPanel } from './PurchaseDetailPanel';\nimport { SaleDetailPanel } from './SaleDetailPanel';\n\ntype DetailPanelBodyProps = {\n useVerticalView: boolean;\n};\n\nexport const DetailPanelBody: React.FC = ({\n useVerticalView,\n}) => {\n const { selectedTab } = useInventoryEventDetailContext();\n\n const renderBody = () => {\n switch (selectedTab) {\n case SidePanelTab.LISTINGS:\n return ;\n case SidePanelTab.SALES:\n return ;\n case SidePanelTab.PURCHASES:\n return ;\n case SidePanelTab.NOTES:\n return ;\n }\n };\n\n return
    {renderBody()}
    ;\n};\n","import { useInventoryEventDetailContext } from 'src/contexts/InventoryEventDetailContext/InventoryEventDetailContext';\nimport { PosMultiSelect } from 'src/core/POS/PosMultiSelect';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\n\nimport * as styles from './CondensedVenueMapQtyFilter.css';\n\nexport const CondensedVenueMapQtyFilter = () => {\n const { compQuantityFilters, setCompQuantityFilters, splitChoices } =\n useInventoryEventDetailContext();\n\n return (\n \n );\n};\n","import clsx from 'clsx';\nimport { isEmpty, pickBy } from 'lodash-es';\nimport React, { useCallback, useEffect, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { EventVenueMap } from 'src/components/Events/VenueMap/EventVenueMap';\nimport { useVenueMapHandlers } from 'src/components/Listings/MapWithCompListingsPreview/MapWithCompListingsPreview.hooks';\nimport { useInventoryEventDetailContext } from 'src/contexts/InventoryEventDetailContext/InventoryEventDetailContext';\nimport {\n ListingCompsNumberRange,\n ListingCompsSpectrum,\n} from 'src/hooks/useComparableListingsVenueMapColor';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { getMatchingSectionRow } from 'src/utils/seatScoreUtils';\nimport { mapToSelectedSectionSettings } from 'src/utils/types/selectedSectionSettingsWithOptionals';\nimport {\n AutoPricingInputs,\n Feature, SectionInfo,\n SelectedSectionSettings\n} from 'src/WebApiController';\n\nimport { SidePanelTab } from '../../../MarketListings/MarketListingHeader';\nimport { CondensedVenueMapQtyFilter } from './CondensedVenueMapQtyFilter';\nimport * as styles from './MapBody.css';\n\ntype MapBodayProps = {\n useVerticalView: boolean;\n};\n\nexport const MapBody: React.FC = ({ useVerticalView }) => {\n const {\n selectedListing,\n venueMapInfo,\n priceCalcQuery,\n filterSections,\n compListingSectionIds,\n shouldRepaint,\n shouldReset,\n selectedTab,\n getColor,\n } = useInventoryEventDetailContext();\n\n const hasCondensedInventory = useUserHasFeature(\n Feature.CondensedPreviewTabsAndSingleListing\n );\n\n const { setValue, watch } = useFormContext();\n\n const { compListingSelectedSectionSettings } = watch();\n\n const onSelectedSectionsChange = useCallback(\n (selectedSections: SectionInfo[]) => {\n if (selectedTab !== SidePanelTab.LISTINGS) {\n return;\n }\n\n const sectionIdFilter = selectedSections.map((s) => s.id);\n const selectedRowIds = selectedSections\n .flatMap(({ rows }) => rows)\n .map(({ id }) => id);\n const rowIdFilter = [];\n if (isEmpty(compListingSelectedSectionSettings?.rowIdFilter)) {\n rowIdFilter.push(...selectedRowIds);\n } else {\n rowIdFilter.push(\n ...(compListingSelectedSectionSettings?.rowIdFilter?.filter((rowId) =>\n selectedRowIds.includes(rowId)\n ) ?? [])\n );\n }\n const sectionRowIdFilter = pickBy(\n Object.assign(\n {},\n compListingSelectedSectionSettings?.sectionRowIdFilter ?? {}\n ),\n (_, key) => sectionIdFilter.includes(parseInt(key))\n );\n const compListingSelectedSectionSettingsNew = {\n ...compListingSelectedSectionSettings,\n sectionIdFilter,\n rowIdFilter,\n sectionRowIdFilter,\n };\n setValue(\n 'compListingSelectedSectionSettings',\n mapToSelectedSectionSettings(compListingSelectedSectionSettingsNew) ??\n null\n );\n },\n [compListingSelectedSectionSettings, selectedTab, setValue]\n );\n\n useEffect(() => {\n if (selectedListing?.id == undefined && shouldReset) {\n const compListingSelectedSectionSettingsNew: SelectedSectionSettings = {\n sectionIdFilterFromZoneMap: false,\n includeBetterZones: false,\n rowOffset: 0,\n sectionIdFilter: [],\n rowIdFilter: [],\n sectionRowIdFilter: {},\n };\n\n setValue(\n 'compListingSelectedSectionSettings',\n mapToSelectedSectionSettings(compListingSelectedSectionSettingsNew) ??\n null\n );\n }\n }, [onSelectedSectionsChange, selectedListing?.id, setValue, shouldReset]);\n\n const { onSectionClicked, onToggleMirrors, onSectionHovered } =\n useVenueMapHandlers(\n filterSections,\n priceCalcQuery?.data ?? undefined,\n venueMapInfo,\n onSelectedSectionsChange\n );\n\n const selectedSectionIds = useMemo(() => {\n if (!selectedListing?.seating) {\n return [];\n }\n\n const { section } = getMatchingSectionRow(\n selectedListing.seating,\n venueMapInfo?.sections\n );\n return section ? [section.id] : [];\n }, [selectedListing?.seating, venueMapInfo?.sections]);\n\n return (\n
    \n : null\n }\n shouldRepaint={shouldRepaint}\n mapActionContainerClassname={clsx({\n [styles.floatMapActionContainer]: useVerticalView,\n })}\n />\n
    \n );\n};\n","import clsx from 'clsx';\nimport { useCallback, useMemo, useState } from 'react';\nimport { useAutoPricingSettingsSelectedSections } from 'src/components/AutoPricing/AutoPricingSelectedSectionSettingsInput/AutoPricingSelectedSectionSettingsInput.hooks';\nimport { SectionFilterRowNudger } from 'src/components/AutoPricing/components/SectionFilterRowNudger';\nimport { FilterPillList } from 'src/components/common/FilterPill';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { useInventoryEventDetailContext } from 'src/contexts/InventoryEventDetailContext/InventoryEventDetailContext';\nimport { PosMultiSelect } from 'src/core/POS/PosMultiSelect';\nimport { vars } from 'src/core/themes';\nimport { Button, Popover, Stack, Switch, TooltipPopover } from 'src/core/ui';\nimport { useAutoPricingSettings } from 'src/modals/ListingDetails/ListingForms/AutoPricingForm/useAutoPricingSettings';\nimport { ExpandIcon, FoldIcon, InfoOutlineIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { CompListingQuantity } from 'src/WebApiController';\n\nimport * as styles from './CompPricingSettings.css';\n\nconst quantitiesOptions = [\n '1',\n '2',\n '3',\n '4',\n '5',\n '6',\n '7',\n '8',\n '9',\n '10+',\n].reduce(\n (r, c) => {\n r[c] = c;\n return r;\n },\n {} as Record\n);\n\nexport const CompPricingSettings = ({\n useVerticalView,\n}: {\n useVerticalView?: boolean;\n}) => {\n const { selectedListing } = useInventoryEventDetailContext();\n const { venueMapInfo } = useEventMapContext();\n\n const [showAdvancedSettings, setShowAdvancedSettings] =\n useState(false);\n\n const { updateInput: watchValues, setValue } =\n useAutoPricingSettings(selectedListing);\n\n const {\n compListingExcludeFanInventory,\n compListingQuantityScoreAdjustmentOverrideJson,\n compListingQuantityFilters,\n compListingExcludeDefects,\n compListingSelectedSectionSettings,\n } = watchValues;\n\n const { onRowIdFiltersChange, onSectionIdFiltersChange } =\n useAutoPricingSettingsSelectedSections(venueMapInfo?.sections);\n\n const selectedSections = useMemo(() => {\n const formSectionFilterIds =\n compListingSelectedSectionSettings?.sectionIdFilter ?? [];\n return (\n venueMapInfo?.sections?.filter((section) => {\n return formSectionFilterIds.includes(section.id);\n }) ?? []\n );\n }, [compListingSelectedSectionSettings?.sectionIdFilter, venueMapInfo]);\n\n const rowIdFilters = useMemo(() => {\n return compListingSelectedSectionSettings?.rowIdFilter ?? [];\n }, [compListingSelectedSectionSettings]);\n\n const sectionRowIdFilters = useMemo(() => {\n return compListingSelectedSectionSettings?.sectionRowIdFilter ?? {};\n }, [compListingSelectedSectionSettings]);\n\n const toggleShowAdvancedSettings = () => {\n setShowAdvancedSettings((prev) => !prev);\n };\n\n const parsedQuantityOverridesJson = useMemo(() => {\n return compListingQuantityScoreAdjustmentOverrideJson != null\n ? JSON.parse(compListingQuantityScoreAdjustmentOverrideJson)\n : null;\n }, [compListingQuantityScoreAdjustmentOverrideJson]);\n\n const derivedCompListingQuantityFilters =\n useMemo((): CompListingQuantity | null => {\n if (compListingQuantityFilters != null) {\n return compListingQuantityFilters;\n }\n\n if (parsedQuantityOverridesJson == null) {\n return null;\n }\n\n const { exact, gte } =\n parsedQuantityOverridesJson?.quantitiesFilter ?? {};\n return {\n exactQuantities: exact ?? [],\n greaterThanOrEqualToQuantity: gte,\n };\n }, [compListingQuantityFilters, parsedQuantityOverridesJson]);\n\n const selectedQuantitiesValues = useMemo(() => {\n if (!derivedCompListingQuantityFilters) {\n return [];\n }\n\n const { exactQuantities: exact, greaterThanOrEqualToQuantity: gte } =\n derivedCompListingQuantityFilters;\n\n const eligibleQuantities = Object.values(quantitiesOptions)\n .filter((value) => !isNaN(parseInt(value)))\n .map((value) => parseInt(value));\n const selectedQuantitiesInts = eligibleQuantities.filter((quantity) => {\n if (((exact as number[]) ?? []).includes(quantity)) {\n return true;\n }\n if (gte != null && (gte as number) <= quantity) {\n return true;\n }\n return false;\n });\n return Object.values(quantitiesOptions).filter((value) =>\n selectedQuantitiesInts.includes(parseInt(value))\n );\n }, [derivedCompListingQuantityFilters]);\n\n const handleOnChange = useCallback(\n (values: string[]) => {\n const exact = [];\n let gte: number | null = null;\n for (const value of values) {\n const quantity = parseInt(value);\n if (value.indexOf('+') > -1) {\n gte = quantity;\n } else {\n if (!isNaN(quantity)) {\n exact.push(quantity);\n }\n }\n }\n\n const compListingQuantityFiltersNew = {\n exactQuantities: exact,\n greaterThanOrEqualToQuantity: gte,\n };\n const compListingQuantityScoreAdjustmentOverrideJsonNew = JSON.stringify({\n ...parsedQuantityOverridesJson,\n quantitiesFilter: { exact, gte },\n });\n\n setValue('compListingQuantityFilters', compListingQuantityFiltersNew);\n setValue(\n 'compListingQuantityScoreAdjustmentOverrideJson',\n compListingQuantityScoreAdjustmentOverrideJsonNew\n );\n },\n [parsedQuantityOverridesJson, setValue]\n );\n\n return (\n
    \n \n \n {!!Object.entries(sectionRowIdFilters).length && (\n \n )}\n \n\n \n \n :\n
    \n }\n values={selectedQuantitiesValues}\n onChange={handleOnChange}\n valueOptionsContent={quantitiesOptions}\n valuesDisplayText={selectedQuantitiesValues.join(', ')}\n triggerProps={{ style: { width: '100%' } }}\n />\n {useVerticalView && (\n \n \n \n
    \n \n
    \n \n
    \n \n \n \n
    \n \n }\n >\n \n \n \n
    \n e.stopPropagation()}\n onCheckedChange={(isChecked) => {\n const compListingExcludeFanInventoryNew = isChecked;\n if (\n compListingExcludeFanInventoryNew !==\n compListingExcludeFanInventory\n ) {\n setValue(\n 'compListingExcludeFanInventory',\n compListingExcludeFanInventoryNew\n );\n }\n }}\n />\n
    \n \n
    \n \n }\n >\n \n \n \n
    \n e.stopPropagation()}\n onCheckedChange={(isChecked) => {\n const compListingExcludeDefectsNew = !isChecked;\n\n if (\n compListingExcludeDefectsNew !==\n compListingExcludeDefects\n ) {\n setValue(\n 'compListingExcludeDefects',\n compListingExcludeDefectsNew\n );\n }\n }}\n />\n
    \n \n
    \n
    \n )}\n \n\n {!useVerticalView && (\n <>\n \n {showAdvancedSettings ? (\n <>\n \n \n \n ) : (\n <>\n \n \n \n )}\n \n\n {showAdvancedSettings && (\n
    \n
    \n
    \n \n }\n >\n \n \n \n
    \n e.stopPropagation()}\n onCheckedChange={(isChecked) => {\n const compListingExcludeFanInventoryNew = isChecked;\n if (\n compListingExcludeFanInventoryNew !==\n compListingExcludeFanInventory\n ) {\n setValue(\n 'compListingExcludeFanInventory',\n compListingExcludeFanInventoryNew\n );\n }\n }}\n />\n
    \n
    \n
    \n \n }\n >\n \n \n \n
    \n e.stopPropagation()}\n onCheckedChange={(isChecked) => {\n const compListingExcludeDefectsNew = !isChecked;\n\n if (\n compListingExcludeDefectsNew !== compListingExcludeDefects\n ) {\n setValue(\n 'compListingExcludeDefects',\n compListingExcludeDefectsNew\n );\n }\n }}\n />\n
    \n
    \n )}\n \n )}\n \n );\n};\n","import { useCallback, useMemo } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { useInventoryEventDetailContext } from 'src/contexts/InventoryEventDetailContext/InventoryEventDetailContext';\nimport { Divider } from 'src/modals/common/Summary/Summary.styled';\nimport { calculatePercentile } from 'src/utils/arrayUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { applyNumberFormatting } from 'src/utils/numberFormatter';\n\nimport * as styles from './SelectedListingMapStats.css';\nimport { StatLabel } from './StatLabel';\n\nexport interface ListingMapStats {\n listingCount: number;\n ticketCount: number;\n ticketPriceMin: number;\n ticketPriceP25: number;\n ticketPriceAvg: number;\n}\n\nexport const SelectedListingMapStats = () => {\n const { loginContext } = useAppContext();\n const { selectedListing, compListings } = useInventoryEventDetailContext();\n\n const currencyCode = useMemo(() => {\n return (\n selectedListing?.currency ??\n loginContext?.user?.activeAccount.currencyCode ??\n null\n );\n }, [\n loginContext?.user?.activeAccount.currencyCode,\n selectedListing?.currency,\n ]);\n\n const listingQtyText = useContent(ContentId.ListingQty);\n const ticketQtyText = useContent(ContentId.TicketQty);\n const minText = useContent(ContentId.Min);\n const p25Text = useContent(ContentId.P25);\n const p50Text = useContent(ContentId.P50);\n\n const stats = useMemo(() => {\n const listingCount = (compListings ?? []).length;\n let ticketCount = 0;\n const ticketPrices: number[] = [];\n for (const listing of compListings ?? []) {\n if ((listing.availableTickets ?? 0) > 0) {\n ticketCount += listing.availableTickets ?? 0;\n const prices = Array(listing.availableTickets ?? 0).fill(\n listing.sellerAllInPrice?.amt ?? 0\n );\n ticketPrices.push(...prices);\n }\n }\n return {\n listingCount,\n ticketCount,\n ticketPriceMin: calculatePercentile(ticketPrices, 0),\n ticketPriceP25: calculatePercentile(ticketPrices, 25),\n ticketPriceAvg: calculatePercentile(ticketPrices, 50),\n };\n }, [compListings]);\n\n const formatPrice = useCallback(\n (price: number) => {\n return applyNumberFormatting({\n inputNumber: price,\n currencyCode,\n currencyDecimalDigits: 2,\n });\n },\n [currencyCode]\n );\n\n return (\n
    \n \n \n \n \n \n \n \n \n \n
    \n );\n};\n","import React from 'react';\nimport { useInventoryEventDetailContext } from 'src/contexts/InventoryEventDetailContext/InventoryEventDetailContext';\n\nimport { SidePanelTab } from '../../../MarketListings/MarketListingHeader';\nimport { CompPricingSettings } from '../PricingSettings/CompPricingSettings';\nimport * as styles from './MapFooter.css';\nimport { SelectedListingMapStats } from './SelectedListingMapStats';\n\ntype MapFooterProps = {\n useVerticalView: boolean;\n};\n\nexport const MapFooter: React.FC = ({ useVerticalView }) => {\n const { selectedListing, selectedTab } = useInventoryEventDetailContext();\n\n return (\n
    \n {selectedListing != null && selectedTab == SidePanelTab.LISTINGS ? (\n \n ) : (\n \n )}\n
    \n );\n};\n","import { useCallback, useContext } from 'react';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { useEventHubContext } from 'src/contexts/EventHubContext';\nimport { useInventoryEventDetailContext } from 'src/contexts/InventoryEventDetailContext/InventoryEventDetailContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { useEventMapConfigMetadata } from 'src/hooks/api/useEventMapConfigMetadata';\nimport { EventPricingSeatMap } from 'src/modals/EventPricingSeatMap';\nimport { CompanionIcon, ConfigureIcon } from 'src/svgs';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { EventVenueMapModal } from '../../../EventVenueMap/EventVenueMapModal';\nimport { EventVenueMapPopup } from '../../../EventVenueMap/EventVenueMapPopup';\nimport { SidePanelTab } from '../../../MarketListings/MarketListingHeader';\nimport * as styles from './MapHeader.css';\n\ntype MapHeaderProps = {\n useVerticalView: boolean;\n};\n\nexport const MapHeader: React.FC = ({ useVerticalView }) => {\n const { event, selectedTab, onTabClick } = useInventoryEventDetailContext();\n const { setModal } = useContext(ModalContext);\n\n const { onStartSession, onCancelSession, sessionRole, enabled } =\n useEventHubContext();\n\n const onToggleComapnionMode = useCallback(() => {\n if (sessionRole) {\n onCancelSession();\n } else {\n onStartSession();\n }\n }, [onStartSession, onCancelSession, sessionRole]);\n\n const marketListingsText = useContent(ContentId.MarketListings);\n const salesText = useContent(ContentId.Sales);\n const purchasesText = useContent(ContentId.Purchases);\n const notesText = useContent(ContentId.Notes);\n const enterCompanionModeText = useContent(ContentId.EnterCompanionMode);\n\n const tabs = [\n { label: marketListingsText, value: SidePanelTab.LISTINGS },\n { label: salesText, value: SidePanelTab.SALES },\n { label: purchasesText, value: SidePanelTab.PURCHASES },\n { label: notesText, value: SidePanelTab.NOTES },\n ];\n\n const openEventMapView = useCallback(() => {\n setModal({\n children: ,\n size: 'fullscreen',\n fullscreen: true,\n });\n }, [event, setModal]);\n\n const { eventMapConfigQuery } = useEventMapConfigMetadata({\n viagogoEventId: event?.viagId ?? null,\n });\n\n return (\n
    \n \n {tabs.map((tab) => (\n onTabClick(tab.value)}\n className={`${styles.tabButton} ${\n selectedTab === tab.value ? styles.activeTab : ''\n }`}\n >\n {tab.label}\n \n ))}\n \n\n {event && selectedTab == SidePanelTab.LISTINGS && (\n \n {event && (\n \n )}\n \n \n setModal({\n children: ,\n clickOutsideToClose: true,\n size: 'slide-in',\n keyboard: false,\n })\n }\n />\n \n )}\n
    \n );\n};\n","import clsx from 'clsx';\nimport { useEffect, useMemo } from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { useMeasure } from 'react-use';\nimport {\n InventoryEventDetailContextProvider,\n useInventoryEventDetailContext,\n} from 'src/contexts/InventoryEventDetailContext/InventoryEventDetailContext';\nimport { Stack } from 'src/core/ui';\nimport { useListingGroupPricingSettings } from 'src/hooks/api/useListingGroupPricingSettings';\nimport { useGetListingAutoPricingSettings } from 'src/hooks/useGetListingAutoPricingSettings';\nimport { flattenListingGroup } from 'src/modals/GroupListings/components/groupingUtils';\nimport {\n Event,\n Listing,\n ListingDetailsAutoPricingSectionUpdates,\n ListingGroup,\n ListingGroupAutoPriceSettings,\n} from 'src/WebApiController';\n\nimport { SidePanelTab } from '../MarketListings/MarketListingHeader';\nimport { DetailPanelBody } from './components/DetailPanel/DetailPanelBody';\nimport { MapBody } from './components/Map/MapBody';\nimport { MapFooter } from './components/Map/MapFooter';\nimport { MapHeader } from './components/Map/MapHeader';\nimport * as styles from './InventoryEventDetail.css';\n\nexport const InventoryEventDetail = ({\n event,\n eventListings,\n selectedListingIds,\n}: {\n event: Event;\n eventListings?: Listing[] | null;\n selectedListingIds: number[];\n}) => {\n const selectedListing = useMemo(() => {\n if (selectedListingIds.length <= 1) {\n let listing = eventListings?.find((l) => l.id === selectedListingIds[0]);\n if (!listing) {\n listing = eventListings\n ?.flatMap((l) => flattenListingGroup(l))\n .find((l) => l.isFull && l.id === selectedListingIds[0]) as Listing;\n }\n\n if (!listing?.isLtGrp) {\n return listing;\n }\n }\n return undefined;\n }, [eventListings, selectedListingIds]);\n\n const selectedGroup = useMemo(() => {\n return eventListings?.find((l) => {\n const lg = l as ListingGroup;\n\n return (\n lg.isLtGrp &&\n lg.groupType == 'Leader' &&\n selectedListingIds.includes(lg.id)\n );\n }) as ListingGroup | undefined;\n }, [eventListings, selectedListingIds]);\n\n const {\n pricingSettings: listingPricingSettings,\n loaded: listingSettingLoaded,\n } = useGetListingAutoPricingSettings(selectedListing, event);\n\n const { pricingSettings: groupPricingSettings, loaded: groupSettingLoaded } =\n useListingGroupPricingSettings(selectedGroup?.ltGrpId, event);\n\n const listingFormMethods = useForm({\n defaultValues: {},\n });\n\n const listingGroupFormMethods = useForm({\n defaultValues: {\n desiredActiveListings: null,\n deprioritizedQuantities: null,\n undAbsAmt: null,\n undRelAmt: null,\n },\n });\n\n useEffect(() => {\n if (listingSettingLoaded) {\n listingFormMethods.reset(listingPricingSettings ?? {});\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [listingPricingSettings, listingSettingLoaded]);\n\n useEffect(() => {\n if (groupSettingLoaded && selectedGroup) {\n listingGroupFormMethods.reset({\n ...groupPricingSettings,\n deprioritizedQuantities: selectedGroup.deprioritizedQuantities,\n desiredActiveListings: selectedGroup.desiredActiveListings,\n undAbsAmt: selectedGroup.absoluteRankPremium,\n undRelAmt: selectedGroup.relativeRankPremium,\n });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [selectedGroup, groupSettingLoaded, groupPricingSettings]);\n\n return selectedGroup ? (\n \n \n \n \n \n ) : (\n \n \n \n \n \n );\n};\n\nexport const InventoryEventDetailContent = () => {\n const [containerRef, { width }] = useMeasure();\n const { selectedTab, recenterMap } = useInventoryEventDetailContext();\n\n const shouldUseVertical = useMemo(() => {\n return (\n selectedTab === SidePanelTab.PURCHASES ||\n selectedTab === SidePanelTab.SALES ||\n width < 815\n );\n }, [selectedTab, width]);\n\n useEffect(() => {\n recenterMap();\n }, [recenterMap, shouldUseVertical]);\n\n return (\n \n \n \n \n {(selectedTab === SidePanelTab.LISTINGS ||\n selectedTab === SidePanelTab.NOTES) && (\n \n )}\n \n \n \n \n \n );\n};\n","import clsx from 'clsx';\nimport { ComponentProps, ReactNode } from 'react';\nimport { EventVenueMap } from 'src/components/Events/VenueMap/EventVenueMap';\nimport { Content } from 'src/contexts/ContentContext';\nimport {\n EventSessionRole,\n useEventHubContext,\n} from 'src/contexts/EventHubContext';\nimport {\n ListingCompsNumberRange,\n ListingCompsSpectrum,\n} from 'src/hooks/useComparableListingsVenueMapColor';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Feature, SectionInfo } from 'src/WebApiController';\n\nimport * as styles from './InventoryEventPage.css';\n\nexport const InventoryEventPageSeatMapV2 = ({\n selectedListings,\n selectedSectionIds,\n markedSectionIds,\n onSectionClicked,\n onSectionHovered,\n onToggleMirrors,\n setSelectedSections,\n showColorBand,\n getColor,\n statsContent,\n}: {\n onSectionClicked: (e: MouseEvent, section: SectionInfo) => void;\n onSectionHovered?: (hoveredSection: SectionInfo) => ReactNode;\n onToggleMirrors?: (mirrors: SectionInfo[], exclude?: boolean) => void;\n setSelectedSections?: (sections: SectionInfo[]) => void;\n selectedListings: number[];\n selectedSectionIds: number[];\n markedSectionIds: number[];\n showColorBand?: boolean;\n getColor?: ComponentProps['getColor'];\n statsContent?: React.ReactNode;\n}) => {\n const hasAutoPricingFeature = useUserHasFeature(Feature.AutoPricing);\n const { sessionRole, enabled } = useEventHubContext();\n\n return (\n <>\n \n \n ) : undefined\n }\n statsContent={statsContent}\n />\n \n \n );\n};\n","import { isEmpty, uniq } from 'lodash-es';\nimport React, { useCallback, useMemo } from 'react';\nimport {\n Content,\n FormatContent,\n useContent,\n} from 'src/contexts/ContentContext';\nimport { PosMultiSelect } from 'src/core/POS/PosMultiSelect';\nimport { Stack } from 'src/core/ui';\nimport { calculatePercentile } from 'src/utils/arrayUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { applyNumberFormatting } from 'src/utils/numberFormatter';\nimport { CompListing } from 'src/WebApiController';\n\nimport * as styles from './VenueMapStats.css';\nimport { VeneuMapRightNowStats } from './VenueMapStats.types';\n\ntype VenueMapRightNowStatsProps = {\n compListings: CompListing[];\n currencyCode: string | null;\n quantityFilters: string[];\n setQuantityFilters: (filters: string[]) => void;\n showFilter: boolean;\n};\n\nexport const VenueMapRightNowStats: React.FC = ({\n compListings,\n currencyCode,\n quantityFilters,\n setQuantityFilters,\n showFilter,\n}) => {\n const minText = useContent(ContentId.Min);\n const p25Text = useContent(ContentId.P25);\n const p50Text = useContent(ContentId.P50);\n const splitChoices = useMemo(() => {\n return uniq(\n compListings.flatMap((listing) => listing.validPurchaseQuantities ?? [])\n ).reduce(\n (res, quantity) => {\n const stringQuantity = quantity + '';\n res[stringQuantity] = stringQuantity;\n return res;\n },\n {} as Record\n );\n }, [compListings]);\n\n const status = useMemo((): VeneuMapRightNowStats => {\n const listingCount = compListings.length;\n let ticketCount = 0;\n const ticketPrices: number[] = [];\n for (const listing of compListings) {\n if ((listing.availableTickets ?? 0) > 0) {\n ticketCount += listing.availableTickets ?? 0;\n const prices = Array(listing.availableTickets ?? 0).fill(\n listing.sellerAllInPrice?.amt ?? 0\n );\n ticketPrices.push(...prices);\n }\n }\n return {\n listingCount,\n ticketCount,\n ticketPriceMin: calculatePercentile(ticketPrices, 0),\n ticketPriceP25: calculatePercentile(ticketPrices, 25),\n ticketPriceAvg: calculatePercentile(ticketPrices, 50),\n };\n }, [compListings]);\n\n const formatPrice = useCallback(\n (price: number) => {\n return applyNumberFormatting({\n inputNumber: price,\n currencyCode,\n currencyDecimalDigits: 2,\n });\n },\n [currencyCode]\n );\n\n return (\n <>\n {!isEmpty(splitChoices) && showFilter && (\n \n \n \n )}\n \n \n
    \n \n
    \n
    \n {status.listingCount.toLocaleString()}\n
    \n
    \n \n
    \n \n
    \n
    \n {status.ticketCount.toLocaleString()}\n
    \n \n \n
    \n \n
    \n
    \n {formatPrice(status.ticketPriceMin)}\n
    \n \n \n
    \n \n
    \n
    \n {formatPrice(status.ticketPriceP25)}\n
    \n \n \n
    \n \n
    \n
    \n {formatPrice(status.ticketPriceAvg)}\n
    \n \n \n \n );\n};\n","import clsx from 'clsx';\nimport { isEmpty, union } from 'lodash-es';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport { FormProvider, useForm, useFormContext } from 'react-hook-form';\nimport { SwiperButton } from 'src/components/Buttons/SwiperButton';\nimport { PurchasesSideTable } from 'src/components/Purchases/PurchaseEventPage/PurchasesSideTable';\nimport { SalesSideTable } from 'src/components/Sales/SaleEventPage/SaleSideTable';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n EventSessionRole,\n useEventHubContext,\n} from 'src/contexts/EventHubContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { Stack } from 'src/core/ui';\nimport * as Tabs from 'src/core/ui/Tabs';\nimport { useListingGroupPricingSettings } from 'src/hooks/api/useListingGroupPricingSettings';\nimport {\n ListingCompsNumberRange,\n ListingCompsSpectrum,\n useComparableListingsVenueMapColor,\n} from 'src/hooks/useComparableListingsVenueMapColor';\nimport { useGetAccountAutoPricingSettings } from 'src/hooks/useGetAccountAutoPricingSettings';\nimport { useGetCompListings } from 'src/hooks/useGetCompListings';\nimport { useGetListingAutoPricingSettings } from 'src/hooks/useGetListingAutoPricingSettings';\nimport { useListingHasVenueMapInfo } from 'src/hooks/useListingHasVenueMapInfo';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { useUserCanSetPrice } from 'src/hooks/useUserHasListingPermissions';\nimport { flattenListingGroup } from 'src/modals/GroupListings/components/groupingUtils';\nimport { useAutoPricingPreview } from 'src/modals/ListingDetails/components/AutoPricePreview/useAutoPricePreview';\nimport { useListingAutoPricingSettings } from 'src/modals/ListingDetails/components/useListingAutoPricingSettings';\nimport { getSectionInfoDisplay } from 'src/utils/autoPricingUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getListingDetailsUpdateInput } from 'src/utils/inventoryUtils';\nimport {\n getCompleteEventConfigScoreOverrides,\n getMatchingSectionRow,\n getSeatScore,\n} from 'src/utils/seatScoreUtils';\nimport {\n CompListing,\n Event,\n Feature,\n Listing,\n ListingDetailsPricingUpdates,\n ListingDetailsUpdateInput,\n ListingGroup,\n ListingQuery,\n SectionInfo,\n} from 'src/WebApiController';\n\nimport { ListingWithSeatScore } from '../../ConnectedComparableListings';\nimport { MapWithCompListingsPreview } from '../../MapWithCompListingsPreview';\nimport { InventoryEventPageSeatMapV2 } from '../InventoryEventPageSeatMapV2';\nimport { NoteSectionV2 } from '../Sections/NoteSectionV2';\nimport { MarketListingHeader, SidePanelTab } from './MarketListingHeader';\nimport * as styles from './MarketListings.css';\nimport { VenueMapRightNowStats } from './VenueMapStats';\n\ntype MarketListingFormProps = {\n event: Event;\n eventListings?: Listing[] | null;\n selectedListingIds: number[];\n};\n\nexport const MarketListingsForm = ({\n event,\n eventListings,\n selectedListingIds,\n}: MarketListingFormProps) => {\n const hasAllowSeatScoreCompListingModeFeature = useUserHasFeature(\n Feature.AllowSeatScoreCompListingMode\n );\n const selectedListing = useMemo(() => {\n if (selectedListingIds.length <= 1) {\n let listing = eventListings?.find((l) => l.id === selectedListingIds[0]);\n if (!listing) {\n listing = eventListings\n ?.flatMap((l) => flattenListingGroup(l))\n .find((l) => l.isFull && l.id === selectedListingIds[0]) as Listing;\n }\n\n if (!listing?.isLtGrp) {\n return listing;\n }\n }\n return undefined;\n }, [eventListings, selectedListingIds]);\n\n const selectedGroup = useMemo(() => {\n return eventListings?.find((l) => {\n const lg = l as ListingGroup;\n\n return (\n lg.isLtGrp &&\n lg.groupType == 'Leader' &&\n selectedListingIds.includes(lg.id)\n );\n });\n }, [eventListings, selectedListingIds]);\n\n const {\n pricingSettings: listingPricingSettings,\n loaded: listingSettingLoaded,\n } = useGetListingAutoPricingSettings(selectedListing, event);\n const { pricingSettings: groupPricingSettings, loaded: groupSettingLoaded } =\n useListingGroupPricingSettings(selectedListing?.ltGrpId, event);\n const {\n pricingSettings: accountPricingSettings,\n loaded: accountSettingLoaded,\n } = useGetAccountAutoPricingSettings();\n\n // React-hook-form setup\n const methods = useForm({\n defaultValues: getListingDetailsUpdateInput(\n selectedListing,\n null,\n undefined,\n accountPricingSettings,\n groupPricingSettings,\n undefined,\n listingPricingSettings,\n hasAllowSeatScoreCompListingModeFeature\n ),\n });\n\n useEffect(() => {\n if (accountSettingLoaded || groupSettingLoaded || listingSettingLoaded) {\n methods.reset(\n getListingDetailsUpdateInput(\n selectedListing,\n null,\n undefined,\n accountPricingSettings,\n groupPricingSettings,\n undefined,\n listingPricingSettings\n )\n );\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n selectedListing,\n accountSettingLoaded,\n groupSettingLoaded,\n listingSettingLoaded,\n ]);\n\n const canSetPrice = useUserCanSetPrice(selectedListing, false);\n\n return canSetPrice ? (\n \n \n \n ) : undefined;\n};\n\ntype MarketListingsWithAutoPricingProps = {\n event: Event;\n eventListings?: Listing[] | null;\n listing: Listing | undefined;\n listingGroup: Listing | undefined;\n selectedListingIds: number[];\n};\n\nexport const MarketListingsWithAutoPricing = ({\n event,\n eventListings,\n listing,\n listingGroup,\n selectedListingIds,\n}: MarketListingsWithAutoPricingProps) => {\n // State Hooks\n const { mapExists } = useListingHasVenueMapInfo(listing);\n const [compQuantityFilters, setCompQuantityFilters] = useState([]);\n const { watch } = useFormContext();\n const input = watch();\n\n const [activeTab, setActiveTab] = useState(\n SidePanelTab.LISTINGS\n );\n\n const { loginContext } = useAppContext();\n const { filterQuery } = useFilterQueryContext();\n const { venueMapInfo, activeConfigOverride } = useEventMapContext();\n\n const isMobile = useMatchMedia('mobile');\n\n const { compListingsQuery, compListingsGroupQuery } = useGetCompListings(\n event,\n listing?.id,\n listing?.currency,\n listingGroup?.ltGrpId\n );\n\n const { priceCalcQuery } = useAutoPricingPreview(event.viagId, listing?.id);\n\n const { sessionRole, enabled } = useEventHubContext();\n\n const sessionView = sessionRole === EventSessionRole.SidePanel;\n\n const {\n compListingSelectedSectionSettings,\n onCompListingSectionIdFilterChange,\n onCompListingSectionZoneChange,\n onSelectedSectionsChange,\n } = useListingAutoPricingSettings(listing);\n\n const formSectionFilterIds = useMemo(() => {\n return compListingSelectedSectionSettings?.sectionIdFilter ?? [];\n }, [compListingSelectedSectionSettings]);\n\n // Comp listings with section filters\n const compListings = useMemo(() => {\n if (listing?.id) {\n return priceCalcQuery.data?.compListings;\n }\n if (isEmpty(formSectionFilterIds)) {\n if (listingGroup?.ltGrpId) {\n return compListingsGroupQuery.data?.compListings;\n }\n return compListingsQuery.data ?? undefined;\n }\n\n if (listingGroup?.ltGrpId) {\n return compListingsGroupQuery.data?.compListings?.filter((l) => {\n const { section } = getMatchingSectionRow(l, venueMapInfo?.sections);\n return section && formSectionFilterIds.includes(section.id);\n });\n }\n return compListingsQuery.data?.filter((l) => {\n const { section } = getMatchingSectionRow(l, venueMapInfo?.sections);\n return section && formSectionFilterIds.includes(section.id);\n });\n }, [\n listing?.id,\n formSectionFilterIds,\n venueMapInfo?.sections,\n listingGroup?.ltGrpId,\n compListingsQuery.data,\n priceCalcQuery.data?.compListings,\n compListingsGroupQuery.data?.compListings,\n ]);\n\n const selectedSectionIds = useMemo(() => {\n const setionIds: number[] = [];\n if (!listing) {\n return setionIds;\n }\n\n const { section } = getMatchingSectionRow(\n listing.seating,\n venueMapInfo?.sections\n );\n\n if (section) {\n setionIds.push(section.id);\n }\n\n return setionIds;\n }, [listing, venueMapInfo?.sections]);\n\n const filteredSections = useMemo(() => {\n return (\n venueMapInfo?.sections.filter((section) => {\n return formSectionFilterIds?.includes(section.id);\n }) ?? []\n );\n }, [venueMapInfo?.sections, formSectionFilterIds]);\n\n const scoreOverrides = useMemo(\n () =>\n getCompleteEventConfigScoreOverrides(\n venueMapInfo?.sectionScores,\n activeConfigOverride?.scoreOverrides,\n false\n ),\n [activeConfigOverride?.scoreOverrides, venueMapInfo?.sectionScores]\n );\n\n const populateListingWithSeatScore = useCallback(\n (listing: Listing) => {\n const seatScore = getSeatScore(\n listing.seating,\n scoreOverrides,\n venueMapInfo?.sections\n );\n if (seatScore != null) return { ...listing, seatScore };\n\n return listing;\n },\n [scoreOverrides, venueMapInfo?.sections]\n );\n\n const selectedListingFromListingGroupWithSeatScore:\n | ListingWithSeatScore[]\n | undefined = useMemo(() => {\n if (!listingGroup) {\n return;\n }\n\n return flattenListingGroup(listingGroup)\n .map((l) => l as Listing)\n .map(populateListingWithSeatScore);\n }, [populateListingWithSeatScore, listingGroup]);\n\n const showFilter = useMemo(() => {\n if (listing?.id) {\n return false;\n }\n if (listingGroup?.ltGrpId) {\n return false;\n }\n return true;\n }, [listing?.id, listingGroup?.ltGrpId]);\n\n const compListingsWithSeatScore: CompListing[] | undefined = useMemo(() => {\n const compsWithScore =\n compListings?.map((l) => {\n const seatScore = getSeatScore(\n l,\n scoreOverrides,\n venueMapInfo?.sections\n );\n if (seatScore != null) return { ...l, seatScore };\n\n return l;\n }) ?? [];\n\n if (!showFilter || isEmpty(compQuantityFilters)) {\n return compsWithScore;\n }\n return compsWithScore.filter(({ validPurchaseQuantities }) => {\n if (isEmpty(validPurchaseQuantities)) {\n return true;\n }\n return validPurchaseQuantities.some(\n (quantity) => compQuantityFilters.indexOf(quantity + '') > -1\n );\n });\n }, [\n compListings,\n showFilter,\n compQuantityFilters,\n scoreOverrides,\n venueMapInfo?.sections,\n ]);\n\n const getColor = useComparableListingsVenueMapColor(\n eventListings ?? [],\n compListingsWithSeatScore,\n compListingsQuery.data ?? undefined\n );\n\n const onSectionClicked = useCallback(\n (e: MouseEvent, section: SectionInfo) => {\n if (e.shiftKey) {\n if (venueMapInfo && section.rows.length > 0) {\n // Try to just get the ticket class id of the first valid row in the section\n const row = section.rows[0];\n if (row) {\n const ticketClassId = row.tktClass?.id;\n if (ticketClassId) {\n // If we have a valid ticketClassId, then try to get all sections with the same ticketClassId\n const sectionsSameZone = venueMapInfo.sections?.filter((s) =>\n s.rows.some((r) => r.tktClass?.id === ticketClassId)\n );\n onCompListingSectionZoneChange(sectionsSameZone);\n }\n }\n }\n } else {\n onCompListingSectionIdFilterChange(\n section.id,\n filteredSections,\n section,\n listing\n );\n }\n },\n [\n filteredSections,\n listing,\n onCompListingSectionIdFilterChange,\n onCompListingSectionZoneChange,\n venueMapInfo,\n ]\n );\n\n const onSectionHovered = useCallback(\n (hoveredSection: SectionInfo) => {\n return getSectionInfoDisplay(\n hoveredSection,\n compListingsWithSeatScore,\n venueMapInfo?.sectionScores\n );\n },\n [compListingsWithSeatScore, venueMapInfo?.sectionScores]\n );\n\n const onToggleMirrors = useCallback(\n (mirrors: SectionInfo[], exclude?: boolean) => {\n const mirrorIds = mirrors.map(({ id }) => id);\n const filteredIds: number[] = [];\n if (exclude) {\n const filtered = formSectionFilterIds.filter(\n (id) => !mirrorIds.includes(id)\n );\n filteredIds.push(...filtered);\n } else {\n const filtered = formSectionFilterIds.concat(mirrorIds);\n filteredIds.push(...filtered);\n }\n const filteredSections = (venueMapInfo?.sections ?? []).filter(({ id }) =>\n filteredIds.includes(id)\n );\n onCompListingSectionZoneChange(filteredSections);\n },\n [\n formSectionFilterIds,\n onCompListingSectionZoneChange,\n venueMapInfo?.sections,\n ]\n );\n\n const compListingSectionIds = useMemo(() => {\n if (isEmpty(selectedListingIds)) {\n // no listing selected\n return formSectionFilterIds;\n }\n // Section name lookup should be sufficient,\n // update here to also check on rowId when necessary.\n const sectionNames = (priceCalcQuery.data?.compListings ?? []).map(\n (l) => l.section\n );\n const compSections = (venueMapInfo?.sections ?? [])\n .filter((section) => sectionNames.includes(section.name))\n .map(({ id }) => id);\n\n return union(compSections, formSectionFilterIds);\n }, [\n formSectionFilterIds,\n selectedListingIds,\n priceCalcQuery.data?.compListings,\n venueMapInfo?.sections,\n ]);\n\n const listingIdFilterQuery = useMemo(() => {\n const marketplaceEntityIds = filterQuery?.marketplaceEntityIds?.map(Number);\n\n return {\n listingIds:\n (selectedListingIds?.length > 0 ? selectedListingIds : null) ||\n marketplaceEntityIds,\n };\n }, [filterQuery?.marketplaceEntityIds, selectedListingIds]);\n\n const hasHideNavAndFilterBarsFeature = useUserHasFeature(\n Feature.HideNavAndFilterBars\n );\n\n return (\n setActiveTab(value as SidePanelTab)}\n style={{ width: '100%', height: '100%' }}\n >\n \n {isMobile && }\n \n\n \n \n }\n />\n \n {!hasHideNavAndFilterBarsFeature && (\n \n \n \n \n onCompListingSectionZoneChange(sections, false)\n }\n showColorBand={!listing}\n getColor={getColor}\n statsContent={\n \n }\n />\n \n \n \n \n \n \n )}\n {!hasHideNavAndFilterBarsFeature && (\n \n \n \n \n \n )}\n \n \n \n \n \n );\n};\n","import { useCallback } from 'react';\nimport { FilterPillList } from 'src/components/common/FilterPill/FilterPillList';\nimport { useStubHubListingManualPricingContext } from 'src/components/Listings/InventoryEventPage/MarketListings/StubHubListingsManualPricingContext';\nimport { SectionInfo } from 'src/WebApiController';\nexport const ManualSectionRowIdFilter = ({\n disabled,\n}: {\n disabled?: boolean;\n}) => {\n const {\n onSectionFilterChanged,\n onRowFiltersChanged,\n selectedSections,\n rowIdFilters,\n sectionRowIdFilters,\n } = useStubHubListingManualPricingContext();\n\n const selectedSectionChange = useCallback(\n (sectionId: number, selectedSections: SectionInfo[]) => {\n const section: SectionInfo | undefined = selectedSections.find(\n (s) => s.id === sectionId\n );\n\n if (section) {\n onSectionFilterChanged(section);\n }\n },\n [onSectionFilterChanged]\n );\n\n return (\n
    \n \n
    \n );\n};\n","import clsx from 'clsx';\nimport { useCallback, useMemo, useState } from 'react';\nimport { SwiperButton } from 'src/components/Buttons/SwiperButton';\nimport { PurchasesSideTable } from 'src/components/Purchases/PurchaseEventPage/PurchasesSideTable';\nimport { SalesSideTable } from 'src/components/Sales/SaleEventPage/SaleSideTable';\nimport { Content } from 'src/contexts/ContentContext';\nimport {\n EventSessionRole,\n useEventHubContext,\n} from 'src/contexts/EventHubContext';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { PosSelect } from 'src/core/POS/PosSelect';\nimport { Button, Stack } from 'src/core/ui';\nimport * as Tabs from 'src/core/ui/Tabs';\nimport { useGetCompListings } from 'src/hooks/useGetCompListings';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { flattenListingGroup } from 'src/modals/GroupListings/components/groupingUtils';\nimport { getSectionInfoDisplay } from 'src/utils/autoPricingUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n getCompleteEventConfigScoreOverrides,\n getSeatScore,\n} from 'src/utils/seatScoreUtils';\nimport {\n CompListing,\n Event,\n Feature,\n Listing,\n SectionInfo,\n} from 'src/WebApiController';\n\nimport { InventoryEventPageSeatMapV2 } from '../InventoryEventPageSeatMapV2';\nimport { NoteSectionV2 } from '../Sections/NoteSectionV2';\nimport { ManualSectionRowIdFilter } from './ManualSectionRowIdFilter';\nimport { MarketListingHeader, SidePanelTab } from './MarketListingHeader';\nimport * as styles from './MarketListings.css';\nimport { useStubHubListingManualPricingContext } from './StubHubListingsManualPricingContext';\n\nconst QUANTITY_OPTIONS = [\n '1',\n '2',\n '3',\n '4',\n '5',\n '6',\n '7',\n '8',\n '9',\n '10',\n].reduce(\n (r, c) => {\n r[c] = c;\n return r;\n },\n {} as Record\n);\n\ntype StubHubListingsWithManualPricingProps = {\n event: Event;\n eventListings?: Listing[] | null;\n\n selectedListingIds: number[];\n};\n\nexport const StubHubListingsWithManualPricing = ({\n event,\n eventListings,\n selectedListingIds,\n}: StubHubListingsWithManualPricingProps) => {\n const [activeTab, setActiveTab] = useState(\n SidePanelTab.LISTINGS\n );\n\n const { sessionRole, enabled } = useEventHubContext();\n\n const listingIdFilterQuery = useMemo(() => {\n return {\n listingIds: selectedListingIds?.length > 0 ? selectedListingIds : null,\n };\n }, [selectedListingIds]);\n\n const selectedListing = useMemo(() => {\n if (selectedListingIds.length > 1) {\n return undefined;\n }\n let listing = eventListings?.find((l) => l.id === selectedListingIds[0]);\n if (!listing) {\n listing = eventListings\n ?.flatMap((l) => flattenListingGroup(l))\n .find((l) => l.isFull && l.id === selectedListingIds[0]) as Listing;\n }\n\n if (listing?.isLtGrp) {\n return undefined;\n }\n return listing;\n }, [eventListings, selectedListingIds]);\n\n const {\n onQuantityFilterChanged,\n onSectionZoneFilterChanged,\n onSectionFilterChanged,\n resetFilters,\n selectedSections,\n sectionIdFilters,\n rowIdFilters,\n quantityFilter,\n hasActiveFilters,\n } = useStubHubListingManualPricingContext();\n\n const isMobile = useMatchMedia('mobile');\n\n const { compListingsQuery } = useGetCompListings(\n event,\n selectedListing?.id,\n selectedListing?.currency\n );\n\n const { venueMapInfo, activeConfigOverride } = useEventMapContext();\n\n const scoreOverrides = useMemo(\n () =>\n getCompleteEventConfigScoreOverrides(\n venueMapInfo?.sectionScores,\n activeConfigOverride?.scoreOverrides,\n false\n ),\n [activeConfigOverride?.scoreOverrides, venueMapInfo?.sectionScores]\n );\n\n const compListingsWithSeatScore: CompListing[] | undefined = useMemo(() => {\n const compListingData = compListingsQuery.data;\n\n const compListings =\n compListingData?.map((l) => {\n const seatScore = getSeatScore(\n l,\n scoreOverrides,\n venueMapInfo?.sections\n );\n if (seatScore != null) return { ...l, seatScore };\n\n return l;\n }) ?? [];\n\n if (selectedSections.length === 0) {\n return compListings;\n }\n const filterNames = new Set(\n selectedSections.map(({ name }) => name)\n );\n\n const allFilterRowIds = new Set();\n for (const section of selectedSections) {\n for (const row of section.rows) {\n allFilterRowIds.add(row.id);\n }\n }\n\n const formFilterRowIds = new Set(rowIdFilters);\n\n const filterRowIds =\n formFilterRowIds.size > 0 ? formFilterRowIds : allFilterRowIds;\n\n return compListings.filter((l) =>\n l.rowId\n ? filterRowIds.has(l.rowId)\n : l.section\n ? filterNames.has(l.section)\n : false\n );\n }, [\n compListingsQuery.data,\n selectedSections,\n rowIdFilters,\n scoreOverrides,\n venueMapInfo?.sections,\n ]);\n\n const onSectionHovered = useCallback(\n (hoveredSection: SectionInfo) => {\n return getSectionInfoDisplay(\n hoveredSection,\n compListingsWithSeatScore,\n venueMapInfo?.sectionScores\n );\n },\n [compListingsWithSeatScore, venueMapInfo?.sectionScores]\n );\n\n const onSectionClicked = useCallback(\n (e: MouseEvent, section: SectionInfo) => {\n if (e.shiftKey) {\n if (venueMapInfo && section.rows.length > 0) {\n // Try to just get the ticket class id of the first valid row in the section\n const row = section.rows[0];\n if (row) {\n const ticketClassId = row.tktClass?.id;\n if (ticketClassId) {\n // If we have a valid ticketClassId, then try to get all sections with the same ticketClassId\n const sectionsSameZone = venueMapInfo.sections?.filter((s) =>\n s.rows.some((r) => r.tktClass?.id === ticketClassId)\n );\n onSectionZoneFilterChanged(sectionsSameZone);\n }\n }\n }\n } else {\n onSectionFilterChanged(section);\n }\n },\n [onSectionFilterChanged, onSectionZoneFilterChanged, venueMapInfo]\n );\n\n const onToggleMirrors = useCallback(\n (mirrors: SectionInfo[], exclude?: boolean) => {\n const mirrorIds = mirrors.map(({ id }) => id);\n const filteredIds: number[] = [];\n if (exclude) {\n const filtered = sectionIdFilters.filter(\n (id) => !mirrorIds.includes(id)\n );\n filteredIds.push(...filtered);\n } else {\n const filtered = sectionIdFilters.concat(mirrorIds);\n filteredIds.push(...filtered);\n }\n const filteredSections = (venueMapInfo?.sections ?? []).filter(({ id }) =>\n filteredIds.includes(id)\n );\n onSectionZoneFilterChanged(filteredSections);\n },\n [onSectionZoneFilterChanged, sectionIdFilters, venueMapInfo?.sections]\n );\n\n const hasHideNavAndFilterBarsFeature = useUserHasFeature(\n Feature.HideNavAndFilterBars\n );\n\n return (\n setActiveTab(value as SidePanelTab)}\n style={{ width: '100%', height: '100%' }}\n >\n \n {isMobile && }\n \n\n \n \n \n \n onSectionZoneFilterChanged(sections, false)\n }\n showColorBand={false}\n />\n \n \n \n {hasActiveFilters && (\n \n )}\n \n\n \n \n
    \n \n
    \n {\n onQuantityFilterChanged(parseInt(newValue));\n }}\n />\n
    \n
    \n \n \n\n {!hasHideNavAndFilterBarsFeature && (\n \n \n \n \n \n )}\n {!hasHideNavAndFilterBarsFeature && (\n \n \n \n \n \n )}\n\n \n \n \n \n \n );\n};\n","import { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { Event, Feature, Listing } from 'src/WebApiController';\n\nimport { InventoryEventDetail } from './InventoryEventDetail/InventoryEventDetail';\nimport { InventoryEventTabs } from './InventoryEventPage';\nimport { MarketListingsForm } from './MarketListings/MarketListings';\nimport { StubHubListingsWithManualPricing } from './MarketListings/StubHubListingsWithManualPricing';\n\ntype InventoryEventPageRightPanelProps = {\n event: Event;\n listings: Listing[] | null | undefined;\n selectedListingIds: number[];\n activeTab: InventoryEventTabs;\n};\n\nexport const InventoryEventPageRightPanel = ({\n event,\n listings,\n selectedListingIds,\n activeTab,\n}: InventoryEventPageRightPanelProps) => {\n const hasCondensedTabsFeature = useUserHasFeature(\n Feature.CondensedPreviewTabsAndSingleListing\n );\n\n if (activeTab === InventoryEventTabs.ManualPricing) {\n return (\n \n );\n }\n\n return hasCondensedTabsFeature ? (\n \n ) : (\n \n );\n};\n","import {\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport {\n EventAccordionItemProps,\n translateEventToInventoryAccordionItem,\n} from 'src/components/Accordions';\nimport { SwiperButton } from 'src/components/Buttons/SwiperButton';\nimport { BackSection } from 'src/components/common/BackSection';\nimport * as EmptySectionContent from 'src/components/common/EmptySectionContent';\nimport { StubHubListingManualPricingContextProvider } from 'src/components/Listings/InventoryEventPage/MarketListings/StubHubListingsManualPricingContext';\nimport { ActiveFocusContextProvider } from 'src/contexts/ActiveFocusContext/ActiveFocusContext';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { CollapsableViewProvider } from 'src/contexts/CollapsableViewContext/CollapsableViewContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport {\n EventSessionRole,\n useEventHubContext,\n} from 'src/contexts/EventHubContext/EventHubContext';\nimport { EventMapContextProvider } from 'src/contexts/EventMapContext';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { InputPriceFocusProvider } from 'src/contexts/InputPriceFocusContext/InputPriceFocusContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport {\n EventLastReviewedContextProvider,\n useEventLastReviewedContext,\n} from 'src/contexts/SellerEventLastReviewContext/SellerEventLastReviewContext';\nimport {\n SidePanelPage,\n SidePanelProvider,\n} from 'src/contexts/SidePanelContext';\nimport { ExplorerLayout } from 'src/core/layouts';\nimport { LoadingButton } from 'src/core/POS/LoadingButton/LoadingButton';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { useSellerEventNote } from 'src/hooks/api/useSellerEventNote';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { useQuickFilterSearchParam } from 'src/hooks/useQuickFilters';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { SearchSolidIcon } from 'src/svgs/Viagogo';\nimport { InventoryDeeplinkQueryParam } from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getDeepLinkIdFromUrl } from 'src/utils/deepLinkUtils';\nimport { getAppliedFilterCounts } from 'src/utils/eventQueryUtils';\nimport { getListingDetailsModalConfigWithDeepLink } from 'src/utils/inventoryUtils';\nimport {\n EventWithData,\n Feature,\n Listing,\n ListingDetailDataField,\n ListingDetails,\n ListingQuery,\n} from 'src/WebApiController';\nimport Swiper from 'swiper';\n\nimport CommandMenu from './CommandMenu/CommandMenu';\nimport { InventoryEventCatchUpBar } from './InventoryEventCatchUp';\nimport * as styles from './InventoryEventPage.css';\nimport { useCatchUpParams } from './InventoryEventPage.hooks';\nimport { InventoryEventPageContent } from './InventoryEventPageContent';\nimport { InventoryEventPageHeader } from './InventoryEventPageHeader';\nimport { InventoryEventPageRightPanel } from './InventoryEventPageRightPanel';\n\nexport function InventoryEventPage({\n viagVirtualId,\n posEventIds,\n returnUrl,\n}: {\n posEventIds?: string[];\n viagVirtualId?: string;\n returnUrl?: string;\n}) {\n const { activeAccountWebClientConfig } = useAppContext();\n const hasPricingCatchupFeature = useUserHasFeature(Feature.PricingCatchup);\n const {\n eventsTransformed,\n eventsExpansion: { setListItemExpansion },\n } = useCatalogDataContext();\n\n useEffect(() => {\n if (!viagVirtualId && posEventIds?.length) {\n setListItemExpansion(\n true,\n posEventIds.map((id) => `old:${id}`)\n );\n } else if (viagVirtualId) {\n setListItemExpansion(true, [viagVirtualId]);\n }\n }, [\n activeAccountWebClientConfig,\n posEventIds,\n setListItemExpansion,\n viagVirtualId,\n ]);\n\n const { setAllGroupsIds } = useMultiSelectionContext();\n\n const accordionItemProps = useMemo(\n () =>\n eventsTransformed?.length\n ? eventsTransformed.find(\n (ev) =>\n ev.event.viagVirtualId === viagVirtualId ||\n ev.event.posIds.some((id) => posEventIds?.includes(id))\n )\n : undefined,\n [eventsTransformed, posEventIds, viagVirtualId]\n );\n\n const inventoryAccordionItem = useMemo(\n () =>\n accordionItemProps &&\n translateEventToInventoryAccordionItem(accordionItemProps, 0, true),\n [accordionItemProps]\n );\n\n useEffect(() => {\n if (inventoryAccordionItem) {\n setAllGroupsIds([inventoryAccordionItem.itemId]);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [inventoryAccordionItem]);\n\n return (\n \n \n \n \n \n \n \n \n {hasPricingCatchupFeature && }\n \n \n \n \n \n \n \n );\n}\n\ntype InventoryEventContentProps = {\n accordionItemProps?: EventWithData;\n inventoryAccordionItem?: EventAccordionItemProps;\n returnUrl?: string;\n};\n\nexport const enum InventoryEventTabs {\n Info = 'info',\n Tags = 'tags',\n SellThroughRate = 'sellThroughRate',\n ManualPricing = 'manualPricing',\n Transactions = 'transactions',\n Fulfillment = 'fulfillment',\n Dashboard = 'dashboard',\n EditMap = 'editMap',\n ZoneMap = 'zoneMap',\n PricingABTest = 'pricingABTest',\n None = 'none',\n}\n\nfunction InventoryEventContent({\n accordionItemProps,\n inventoryAccordionItem,\n returnUrl,\n}: InventoryEventContentProps) {\n const [selectedListingIds, setSelectedListingIds] = useState([]);\n\n const { isLoading } = useCatalogDataContext();\n\n const isMobile = useMatchMedia('mobile');\n\n const quickFilterSearchParams = useQuickFilterSearchParam();\n const { tempQuery, initialQuery } = useFilterQueryContext();\n\n const { setModal } = useContext(ModalContext);\n const { posEntity: listing, setActivePosEntity } =\n useActivePosEntityContext();\n\n const hasPricingV2DemandDashboard = useUserHasFeature(\n Feature.PricingV2DemandDashboard\n );\n const intialActiveTab = hasPricingV2DemandDashboard\n ? InventoryEventTabs.Dashboard\n : InventoryEventTabs.Info;\n\n const [activeTab, setActiveTab] = useState(intialActiveTab);\n\n const activeId = getDeepLinkIdFromUrl(\n InventoryDeeplinkQueryParam,\n window.location.href\n );\n\n useEffect(() => {\n if (activeId?.length && !listing) {\n setActivePosEntity(parseInt(activeId), undefined, true, [\n ListingDetailDataField.Basic,\n ]);\n setModal(getListingDetailsModalConfigWithDeepLink(activeId));\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [activeId]);\n\n const swiperRef = useRef();\n\n const event = accordionItemProps?.event;\n\n const {\n isCompleted,\n isLoading: isEventReviewedLoading,\n onSettingVirtualIds,\n onUpdateLastReviewedDateTime,\n } = useEventLastReviewedContext();\n\n useEffect(() => {\n onSettingVirtualIds(event?.viagVirtualId ? [event?.viagVirtualId] : []);\n }, [event?.viagVirtualId, onSettingVirtualIds]);\n\n const { addNote, isLoading: isEventNoteLoading } = useSellerEventNote(\n event?.viagId\n );\n const markAsReviewed = useContent(ContentId.MarkAsReviewed);\n const markedAsReviewed = useContent(ContentId.MarkedAsReviewed);\n\n const { onNextClick, isCatchupMode } = useCatchUpParams();\n\n const onMarkAsReviewed = useCallback(async () => {\n if (event?.viagVirtualId) {\n await addNote(markedAsReviewed);\n onUpdateLastReviewedDateTime(event.viagVirtualId);\n onNextClick();\n }\n }, [\n addNote,\n event?.viagVirtualId,\n markedAsReviewed,\n onNextClick,\n onUpdateLastReviewedDateTime,\n ]);\n\n const {\n onSelectListing,\n onUpdateInventoryTab,\n selectedListingId,\n sessionRole,\n inventoryTab,\n enabled,\n } = useEventHubContext();\n\n const onSetInventoryTab = useCallback(\n (tab: InventoryEventTabs) => {\n setActiveTab(tab);\n if (enabled && sessionRole === EventSessionRole.Main) {\n onUpdateInventoryTab(tab);\n }\n },\n [enabled, onUpdateInventoryTab, sessionRole]\n );\n\n useEffect(() => {\n if (enabled && sessionRole === EventSessionRole.SidePanel && inventoryTab) {\n setActiveTab(inventoryTab);\n }\n }, [activeTab, enabled, inventoryTab, sessionRole]);\n\n useEffect(() => {\n if (enabled && selectedListingId) {\n setSelectedListingIds([selectedListingId]);\n }\n }, [enabled, selectedListingId]);\n\n useEffect(() => {\n if (enabled && selectedListingIds?.length == 1) {\n onSelectListing(selectedListingIds[0]);\n }\n }, [enabled, onSelectListing, selectedListingIds]);\n\n if (!event) {\n if (\n quickFilterSearchParams ||\n getAppliedFilterCounts(tempQuery, initialQuery)\n )\n return (\n \n \n \n }\n >\n \n \n \n \n \n \n \n );\n }\n\n if (isLoading || !event) {\n return ;\n }\n\n return (\n
    \n \n \n )\n }\n >\n
    \n {isMobile && (\n \n \n \n \n )}\n \n \n {enabled && sessionRole === EventSessionRole.SidePanel ? (\n \n ) : (\n \n )}\n \n {isCatchupMode && (\n
    \n \n
    \n )}\n
    \n \n
    \n );\n}\n","import { useCallback, useMemo } from 'react';\nimport { useLocation, useSearchParams } from 'react-router-dom';\nimport { InventoryEventPage } from 'src/components/Listings/InventoryEventPage';\nimport { MainFilterBar } from 'src/components/MainFilterBar';\nimport { ActivePosEntityProvider } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n CatalogDataContextProvider,\n ExpandedEventData,\n} from 'src/contexts/CatalogDataContext';\nimport { CatalogMetricsContextProvider } from 'src/contexts/CatalogMetricsContext';\nimport { CatalogMultiSelectionContextProvider } from 'src/contexts/CatalogMultiSelectionContext';\nimport { DialogProvider } from 'src/contexts/DialogContext/DialogContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { EventHubContextProvider } from 'src/contexts/EventHubContext';\nimport { FilterQueryContextProvider } from 'src/contexts/FilterQueryContext';\nimport { ListingNotificationContextProvider } from 'src/contexts/ListingNotificationContext';\nimport { MultiSelectionContextProvider } from 'src/contexts/MultiSelectionContext';\nimport { SellerUserSettingsProvider } from 'src/contexts/SellerUserSettingsContext';\nimport { useGetActiveAccountClientConfig } from 'src/hooks/useGetActiveAccountClientConfig';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { LayoutContent } from 'src/navigations/LayoutContent';\nimport {\n getDefaultReturnUrl,\n INVENTORY_USER_SETTINGS,\n queryIdSearchParam,\n} from 'src/navigations/Routes/InventoryEvent/constants';\nimport {\n EventIdQueryParam,\n InventoryDeeplinkQueryParam,\n} from 'src/utils/constants/constants';\nimport { removeDeepLinkUrlPartsFromRelativeUrl } from 'src/utils/deepLinkUtils';\nimport { EmptyListingQuery } from 'src/utils/eventQueryUtils';\nimport { transformData } from 'src/utils/eventWithDataUtils';\nimport { ListingCatalogQueryKey } from 'src/utils/inventoryUtils';\nimport { addListingMetrics } from 'src/utils/ticketMetricUtils';\nimport { EventPageLocationState } from 'src/utils/types/EventPageLocationState';\nimport {\n ActionOutboxEntityType,\n Feature,\n ListingClient,\n ListingDetailDataField,\n ListingDetails,\n ListingMetrics,\n ListingQuery,\n UserSetting,\n} from 'src/WebApiController';\n\nimport {\n getCatalogData,\n getCatalogDataExpanded,\n getCatalogMetrics,\n getCatalogSectionalDataExpanded,\n listingQueryValueTransformFromUrl,\n listingQueryValueTransformToUrl,\n} from '../Inventory';\nimport { MainRoute } from '../MainRoute';\nimport {\n ACTIVE_EVENT_IDS_2_QUERY_PARAM,\n ACTIVE_EVENT_IDS_QUERY_PARAM,\n POS_EVENT_IDS_SEPARATOR,\n TAB_EVENT_IDS_2_QUERY_PARAM,\n TAB_EVENT_IDS_QUERY_PARAM,\n TAB_EVENT_IDS_SEPARATOR,\n} from './InventoryEvent.constants';\n\nexport function InventoryEvent() {\n const [searchParams] = useSearchParams();\n const oldPosEventId = searchParams.get(queryIdSearchParam);\n const viagEventId = searchParams.get(EventIdQueryParam);\n\n const activeEventIds = searchParams.get(ACTIVE_EVENT_IDS_QUERY_PARAM);\n const tabEventIds = searchParams.get(TAB_EVENT_IDS_QUERY_PARAM);\n\n const activeEventIds2 = searchParams.get(ACTIVE_EVENT_IDS_2_QUERY_PARAM);\n const tabEventIds2 = searchParams.get(TAB_EVENT_IDS_2_QUERY_PARAM);\n\n const location = useLocation();\n\n const posEventIds = useMemo(\n // We need to make sure all the ids in the params are lowercase or else it won't be found in the CatalogDataContext\n () =>\n (tabEventIds != null\n ? activeEventIds?.toLowerCase()?.split(POS_EVENT_IDS_SEPARATOR)\n : oldPosEventId?.toLowerCase()?.split(POS_EVENT_IDS_SEPARATOR)) ?? [],\n [activeEventIds, oldPosEventId, tabEventIds]\n );\n\n const viagogoVirtualId = useMemo(\n // We need to make sure all the ids in the params are lowercase or else it won't be found in the CatalogDataContext\n () =>\n tabEventIds2 != null\n ? activeEventIds2?.toLowerCase()\n : viagEventId?.toLowerCase(),\n [activeEventIds2, tabEventIds2, viagEventId]\n );\n\n const { trackError } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n\n const hasSectionalLoadInListingTable = useUserHasFeature(\n Feature.SectionalLoadInListingTable\n );\n\n const getCatalogDataExpandedCallback = useCallback(\n (ids: string[], filterQuery: ListingQuery) => {\n if (hasSectionalLoadInListingTable) {\n return getCatalogSectionalDataExpanded(\n ids,\n filterQuery,\n [\n ListingDetailDataField.Basic,\n ListingDetailDataField.Pricing,\n ListingDetailDataField.AutoPricing,\n ],\n {\n activeAccountWebClientConfig,\n onError: (error) => {\n trackError(\n 'ListingClient.getListingsSectionalDataForEvents',\n error,\n {\n ...filterQuery,\n eventIds: ids,\n }\n );\n },\n }\n );\n }\n return getCatalogDataExpanded(ids, filterQuery, {\n activeAccountWebClientConfig,\n onError: (error) => {\n trackError('ListingClient.getListingsForEvents', error, {\n ...filterQuery,\n eventIds: ids,\n });\n },\n });\n },\n [activeAccountWebClientConfig, hasSectionalLoadInListingTable, trackError]\n );\n\n const onCatalogDataExpandedCallback = useCallback(\n (\n ids: string[],\n filterQuery: ListingQuery,\n currentData?: ExpandedEventData\n ) =>\n getCatalogSectionalDataExpanded(\n ids,\n filterQuery,\n [ListingDetailDataField.Purchase, ListingDetailDataField.Tags],\n {\n activeAccountWebClientConfig,\n onError: (error) => {\n trackError('ListingClient.getCatalogSectionalDataExpanded', error, {\n ...filterQuery,\n eventIds: ids,\n });\n },\n },\n currentData\n ),\n [activeAccountWebClientConfig, trackError]\n );\n\n const initialQuery = useMemo(() => {\n if (posEventIds.length || tabEventIds?.length) {\n const oldPosEventIds = tabEventIds\n ? tabEventIds\n .split(TAB_EVENT_IDS_SEPARATOR)\n .flatMap((eids) => eids.split(POS_EVENT_IDS_SEPARATOR))\n : posEventIds;\n return { ...EmptyListingQuery, oldPosEventIds };\n } else if (tabEventIds2?.length || viagogoVirtualId) {\n const eventOrMappingIds = tabEventIds2\n ? tabEventIds2.split(TAB_EVENT_IDS_SEPARATOR)\n : [viagogoVirtualId!];\n return { ...EmptyListingQuery, eventOrMappingIds };\n }\n\n return { ...EmptyListingQuery };\n }, [posEventIds, tabEventIds, tabEventIds2, viagogoVirtualId]);\n\n const getActClientCfg = useGetActiveAccountClientConfig(\n 'InventoryEvent.ListingClient.getListingByListingId'\n );\n\n const hasSectionalLoadDataFeature = useUserHasFeature(\n Feature.ListingLoadBySection\n );\n\n const getActivePosEntity = useCallback(\n async (\n posEntityId: number,\n curEntity?: ListingDetails | null,\n dataToGet?: string[] | null\n ) => {\n const actAccountCfg = await getActClientCfg();\n\n const listingDetail = await new ListingClient(\n actAccountCfg\n ).getListingByListingId(\n posEntityId,\n hasSectionalLoadDataFeature ? (curEntity ?? undefined) : undefined,\n hasSectionalLoadDataFeature\n ? (dataToGet?.map((s) => s as ListingDetailDataField) ?? [])\n : undefined\n );\n\n if (listingDetail) {\n return {\n posEntityId: listingDetail.id,\n posEntity: listingDetail,\n posEntityDisplayId: listingDetail.idOnMkp,\n };\n }\n\n return {};\n },\n [getActClientCfg, hasSectionalLoadDataFeature]\n );\n\n // Only use value provided at the first time (should be from '/inventory')\n const returnUrl = useMemo(() => {\n const locationState = (location.state ?? {}) as EventPageLocationState;\n\n if (locationState.returnUrl && locationState.keepReturnUrlUnchanged) {\n return locationState.returnUrl;\n }\n\n const relativeUrl =\n locationState.returnUrl || getDefaultReturnUrl(viagEventId);\n\n return removeDeepLinkUrlPartsFromRelativeUrl(relativeUrl, [\n InventoryDeeplinkQueryParam,\n ACTIVE_EVENT_IDS_QUERY_PARAM,\n TAB_EVENT_IDS_QUERY_PARAM,\n ACTIVE_EVENT_IDS_2_QUERY_PARAM,\n TAB_EVENT_IDS_2_QUERY_PARAM,\n ]);\n }, [location.state, viagEventId]);\n\n const hasMetricsV2Feature = useUserHasFeature(Feature.CatalogMetricsV2);\n\n if (\n !posEventIds.length &&\n !tabEventIds?.length &&\n !tabEventIds2?.length &&\n !viagogoVirtualId\n ) {\n return null;\n }\n\n return (\n \n \n initialQuery={initialQuery}\n emptyQuery={EmptyListingQuery}\n viewModeSettingId={UserSetting.InventoryPageViewMode}\n saveQueryInUrl\n queryValueTransformToUrl={listingQueryValueTransformToUrl}\n queryValueTransformFromUrl={listingQueryValueTransformFromUrl}\n >\n \n entityType={ActionOutboxEntityType.Listing}\n queryKey={ListingCatalogQueryKey}\n getCatalogData={(c, f) => getCatalogData(c, f, true)}\n getCatalogDataExpanded={getCatalogDataExpandedCallback}\n onCatalogDataExpanded={\n hasSectionalLoadInListingTable\n ? onCatalogDataExpandedCallback\n : undefined\n }\n transformEventData={transformData}\n >\n \n queryKey=\"getCatalogListingMetrics\"\n entityType={ActionOutboxEntityType.Listing}\n getCatalogMetrics={(c, f, r) =>\n getCatalogMetrics(c, f, r, hasMetricsV2Feature)\n }\n addCatalogMetrics={addListingMetrics}\n >\n \n entityType={ActionOutboxEntityType.Listing}\n getActivePosEntity={getActivePosEntity}\n >\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n","import { Navigate, useLocation, useParams } from 'react-router-dom';\nimport { createInventoryEventUrl } from 'src/navigations/Routes/InventoryEvent/InventoryEvent.utils';\n\n/**\n * This component is used to redirect old URL with the form\n * /inventory/event/:eventId to the new URL /inventory/event?queryId=eventId\n * to keep users who might have the old URL saved in favourites working.\n * @constructor\n */\nexport const InventoryEventPageRedirect = () => {\n const { eventId: eventIdParam } = useParams();\n const location = useLocation();\n\n if (eventIdParam) {\n return (\n \n );\n }\n\n return ;\n};\n","import { useQueries, useQuery } from '@tanstack/react-query';\nimport { chunk } from 'lodash-es';\nimport { useMemo } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport {\n CatalogClient,\n CatalogResults,\n OnSaleEventQuery,\n} from 'src/WebApiController';\n\nexport const useOnSaleEvents = (\n query: OnSaleEventQuery,\n disable = false,\n eventOnly = false\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { searchText, ...rest } = query;\n\n const { trackError } = useErrorBoundaryContext();\n\n const shouldQueryForSearch =\n !disable &&\n activeAccountWebClientConfig.activeAccountId != null &&\n searchText != null;\n const searchEventsQuery = useQuery({\n queryKey: [\n 'searchEvents',\n activeAccountWebClientConfig.activeAccountId,\n searchText,\n disable,\n ],\n queryFn: () => {\n if (!shouldQueryForSearch) {\n return null;\n }\n return new CatalogClient(activeAccountWebClientConfig).searchOnSaleEvents(\n query\n );\n },\n enabled: shouldQueryForSearch,\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError('CatalogClient.searchOnSaleEvents', error, {\n searchText,\n });\n },\n },\n });\n\n const shouldQueryOnSaleEvents =\n !disable &&\n activeAccountWebClientConfig.activeAccountId != null &&\n !shouldQueryForSearch &&\n rest != null;\n\n const onSaleEventsQuery = useQuery({\n queryKey: [\n 'getCatalogForOnSaleEvents',\n activeAccountWebClientConfig.activeAccountId,\n JSON.stringify(rest),\n disable,\n ],\n queryFn: () => {\n if (!shouldQueryOnSaleEvents) {\n return null;\n }\n return new CatalogClient(\n activeAccountWebClientConfig\n ).getCatalogForOnSaleEvents(query!);\n },\n\n enabled: shouldQueryOnSaleEvents,\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError('CatalogClient.getCatalogForOnSaleEvents', error, {\n query,\n });\n },\n },\n });\n\n const isLoading = useMemo(\n () => onSaleEventsQuery.isLoading || searchEventsQuery.isLoading,\n [onSaleEventsQuery.isLoading, searchEventsQuery.isLoading]\n );\n\n const onSaleEvents = useMemo((): CatalogResults | null => {\n const events = searchEventsQuery.data ?? onSaleEventsQuery.data ?? null;\n for (const key in events?.events ?? {}) {\n if (isNaN(parseInt(key))) {\n delete events?.events[key];\n }\n }\n return events;\n }, [onSaleEventsQuery.data, searchEventsQuery.data]);\n\n const eventIdGroups = useMemo(\n () =>\n chunk(\n Object.keys(onSaleEvents?.events ?? {})\n .map((id) => parseInt(id))\n .filter((id) => !isNaN(id)),\n 1000\n ),\n [onSaleEvents]\n );\n\n const queries = useMemo(() => {\n const client = new CatalogClient(activeAccountWebClientConfig);\n return {\n queries: eventIdGroups.map((idGroup) => {\n const shouldQuery =\n !disable &&\n !eventOnly &&\n idGroup.length > 0 &&\n !!activeAccountWebClientConfig.activeAccountId;\n\n return {\n queryKey: [\n 'getCatalogMetricsForOnSaleEvents',\n activeAccountWebClientConfig.activeAccountId,\n JSON.stringify(idGroup),\n disable,\n eventOnly,\n ],\n queryFn: async () => {\n if (!shouldQuery) {\n return null;\n }\n\n const input: OnSaleEventQuery = {\n ...query,\n eventIds: Array.from(idGroup),\n };\n\n return await client.getCatalogOnSaleEventMetrics(input);\n },\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n onError: (error: ErrorTypes) => {\n trackError(\n 'CatalogClient.getCatalogMetricsForOnSaleEvents',\n error,\n {\n eventIds: idGroup,\n }\n );\n },\n };\n }),\n };\n }, [activeAccountWebClientConfig, eventIdGroups, query, trackError]);\n\n const metricsQueriesFromHook = useQueries(queries);\n\n return {\n onSaleEvents,\n onSaleEventMetrics: metricsQueriesFromHook.flatMap((q) => q.data ?? []),\n isLoading,\n };\n};\n","import { useOnSaleEvents } from 'src/hooks/api/useOnSaleEvents';\nimport {\n EventWithData,\n OnSaleEventQuery,\n Performer,\n Venue,\n} from 'src/WebApiController';\n\nexport const useInventoryDashboardEvent = (\n event?: EventWithData,\n isOnSaleEvent?: boolean,\n onSaleEventId?: number\n): {\n event?: EventWithData;\n venue?: Venue;\n performer?: Performer;\n} => {\n const onSaleEventQuery: OnSaleEventQuery = {\n eventIds: onSaleEventId ? [onSaleEventId] : [],\n onSaleDates: null,\n timezoneOffsetMins: null,\n viewMode: null,\n searchText: null,\n };\n\n const shouldLoadOnSaleEvent = isOnSaleEvent && onSaleEventId;\n const { onSaleEvents } = useOnSaleEvents(\n onSaleEventQuery,\n !shouldLoadOnSaleEvent,\n true\n );\n\n if (shouldLoadOnSaleEvent) {\n if (onSaleEvents?.events && onSaleEvents.events[onSaleEventId]) {\n const eventWithData = onSaleEvents.events[onSaleEventId];\n const event = eventWithData.event;\n const venue = onSaleEvents.venues[event.venueId];\n const performer = event.perfId\n ? onSaleEvents.performers[event.perfId]\n : undefined;\n return {\n event: eventWithData,\n venue: venue,\n performer: performer,\n };\n }\n }\n\n return {\n event: event,\n venue: undefined,\n performer: undefined,\n };\n};\n","import { useMemo } from 'react';\nimport { useSearchParams } from 'react-router-dom';\nimport {\n EventAccordionItemProps,\n translateEventToInventoryAccordionItem,\n} from 'src/components/Accordions';\nimport { SwiperButton } from 'src/components/Buttons/SwiperButton';\nimport { BackSection } from 'src/components/common/BackSection';\nimport { StubHubListingManualPricingContextProvider } from 'src/components/Listings/InventoryEventPage/MarketListings/StubHubListingsManualPricingContext';\nimport { ActiveFocusContextProvider } from 'src/contexts/ActiveFocusContext/ActiveFocusContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { EventMapContextProvider } from 'src/contexts/EventMapContext';\nimport { InputPriceFocusProvider } from 'src/contexts/InputPriceFocusContext/InputPriceFocusContext';\nimport { SidePanelProvider } from 'src/contexts/SidePanelContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport {\n DemandDashboardEventIdQueryParam,\n DemandDashboardIsOnSaleEventQueryParam,\n} from 'src/utils/constants/constants';\nimport {\n EventWithData,\n Feature,\n Listing,\n Performer,\n Venue,\n} from 'src/WebApiController';\n\nimport * as styles from './InventoryEventPage.css';\nimport { InventoryEventPageHeader } from './InventoryEventPageHeader';\nimport { useInventoryDashboardEvent } from './InventoryEventPageV2.hooks';\nimport { InventoryEventDashboardSection } from './Sections/InventoryEventDashboardSection';\n\nexport function InventoryEventPageV2({\n viagVirtualId,\n returnUrl,\n}: {\n viagVirtualId: string;\n returnUrl?: string;\n}) {\n const { eventsTransformed } = useCatalogDataContext();\n const [searchParams, _] = useSearchParams();\n const hasEventDiscoveryPageFeature = useUserHasFeature(\n Feature.EventDiscoveryPage\n );\n const isOnSaleEvent =\n Boolean(searchParams.get(DemandDashboardIsOnSaleEventQueryParam)) &&\n hasEventDiscoveryPageFeature;\n const onSaleEventId = Number(\n searchParams.get(DemandDashboardEventIdQueryParam)\n );\n\n const accordionItemProps = useMemo(\n () =>\n eventsTransformed?.find(\n (e) =>\n e.event.viagVirtualId.toLowerCase() === viagVirtualId.toLowerCase()\n ),\n\n [eventsTransformed, viagVirtualId]\n );\n\n const {\n event: eventWithData,\n venue,\n performer,\n } = useInventoryDashboardEvent(\n accordionItemProps,\n isOnSaleEvent,\n onSaleEventId\n );\n\n const inventoryAccordionItem = useMemo(\n () =>\n accordionItemProps &&\n translateEventToInventoryAccordionItem(accordionItemProps, 0, true),\n [accordionItemProps]\n );\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n\ntype InventoryEventContentProps = {\n accordionItemProps?: EventWithData;\n inventoryAccordionItem?: EventAccordionItemProps;\n venue?: Venue;\n performer?: Performer;\n returnUrl?: string;\n isOnSaleEvent?: boolean;\n};\n\nexport const enum InventoryEventV2Tabs {\n Dashboard = 'dashboard',\n None = 'none',\n}\n\nfunction InventoryEventContent({\n accordionItemProps,\n inventoryAccordionItem,\n venue,\n performer,\n returnUrl,\n isOnSaleEvent,\n}: InventoryEventContentProps) {\n const { isLoading } = useCatalogDataContext();\n const isMobile = useMatchMedia('mobile');\n\n const event = accordionItemProps?.event;\n\n if (isLoading || !event) {\n return ;\n }\n\n return (\n
    \n
    \n {isMobile && (\n \n \n \n \n )}\n \n \n
    \n
    \n );\n}\n","import { useCallback, useMemo } from 'react';\nimport { useLocation, useSearchParams } from 'react-router-dom';\nimport { InventoryEventPageV2 } from 'src/components/Listings/InventoryEventPage/InventoryEventPageV2';\nimport { MainFilterBar } from 'src/components/MainFilterBar';\nimport { ActivePosEntityProvider } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n CatalogDataContextProvider,\n ExpandedEventData,\n} from 'src/contexts/CatalogDataContext';\nimport { CatalogMetricsContextProvider } from 'src/contexts/CatalogMetricsContext';\nimport { CatalogMultiSelectionContextProvider } from 'src/contexts/CatalogMultiSelectionContext';\nimport { DialogProvider } from 'src/contexts/DialogContext/DialogContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { FilterQueryContextProvider } from 'src/contexts/FilterQueryContext';\nimport { ListingNotificationContextProvider } from 'src/contexts/ListingNotificationContext';\nimport { MultiSelectionContextProvider } from 'src/contexts/MultiSelectionContext';\nimport { SellerUserSettingsProvider } from 'src/contexts/SellerUserSettingsContext';\nimport { useGetActiveAccountClientConfig } from 'src/hooks/useGetActiveAccountClientConfig';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { LayoutContent } from 'src/navigations/LayoutContent';\nimport {\n getDefaultReturnUrl,\n INVENTORY_USER_SETTINGS,\n} from 'src/navigations/Routes/InventoryEvent/constants';\nimport {\n EventIdQueryParam,\n InventoryDeeplinkQueryParam,\n} from 'src/utils/constants/constants';\nimport { removeDeepLinkUrlPartsFromRelativeUrl } from 'src/utils/deepLinkUtils';\nimport {\n EmptyListingQuery,\n QueryWithViewMode,\n} from 'src/utils/eventQueryUtils';\nimport { transformData } from 'src/utils/eventWithDataUtils';\nimport { ListingCatalogQueryKey } from 'src/utils/inventoryUtils';\nimport { addListingMetrics } from 'src/utils/ticketMetricUtils';\nimport { EventPageLocationState } from 'src/utils/types/EventPageLocationState';\nimport {\n ActionOutboxEntityType,\n EntityWithTicketsQuery,\n Feature,\n ListingClient,\n ListingDetailDataField,\n ListingDetails,\n ListingMetrics,\n ListingQuery,\n UserSetting,\n} from 'src/WebApiController';\n\nimport {\n getCatalogData,\n getCatalogDataExpanded,\n getCatalogMetrics,\n getCatalogSectionalDataExpanded,\n listingQueryValueTransformFromUrl,\n listingQueryValueTransformToUrl,\n} from '../Inventory';\nimport { MainRoute } from '../MainRoute';\nimport {\n ACTIVE_EVENT_IDS_2_QUERY_PARAM,\n ACTIVE_EVENT_IDS_QUERY_PARAM,\n TAB_EVENT_IDS_2_QUERY_PARAM,\n TAB_EVENT_IDS_QUERY_PARAM,\n} from './InventoryEvent.constants';\n\nexport function InventoryEventV2() {\n const [searchParams] = useSearchParams();\n const viagEventId = searchParams.get(EventIdQueryParam);\n\n const location = useLocation();\n\n const { trackError } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n\n const hasSectionalLoadInListingTable = useUserHasFeature(\n Feature.SectionalLoadInListingTable\n );\n\n const getCatalogDataExpandedCallback = useCallback(\n (ids: string[], filterQuery: ListingQuery) => {\n if (hasSectionalLoadInListingTable) {\n return getCatalogSectionalDataExpanded(\n ids,\n filterQuery,\n [\n ListingDetailDataField.Basic,\n ListingDetailDataField.Pricing,\n ListingDetailDataField.AutoPricing,\n ],\n {\n activeAccountWebClientConfig,\n onError: (error) => {\n trackError(\n 'ListingClient.getListingsSectionalDataForEvents',\n error,\n {\n ...filterQuery,\n eventIds: ids,\n }\n );\n },\n }\n );\n }\n return getCatalogDataExpanded(ids, filterQuery, {\n activeAccountWebClientConfig,\n onError: (error) => {\n trackError('ListingClient.getListingsForEvents', error, {\n ...filterQuery,\n eventIds: ids,\n });\n },\n });\n },\n [activeAccountWebClientConfig, hasSectionalLoadInListingTable, trackError]\n );\n\n const onCatalogDataExpandedCallback = useCallback(\n (\n ids: string[],\n filterQuery: ListingQuery,\n currentData?: ExpandedEventData\n ) =>\n getCatalogSectionalDataExpanded(\n ids,\n filterQuery,\n [ListingDetailDataField.Purchase, ListingDetailDataField.Tags],\n {\n activeAccountWebClientConfig,\n onError: (error) => {\n trackError('ListingClient.getCatalogSectionalDataExpanded', error, {\n ...filterQuery,\n eventIds: ids,\n });\n },\n },\n currentData\n ),\n [activeAccountWebClientConfig, trackError]\n );\n\n const initialQuery = useMemo(\n () => ({\n ...EmptyListingQuery,\n eventOrMappingIds: viagEventId ? [viagEventId] : null,\n }),\n [viagEventId]\n );\n\n const getActClientCfg = useGetActiveAccountClientConfig(\n 'InventoryEventV2.ListingClient.getListingByListingId'\n );\n\n const hasSectionalLoadDataFeature = useUserHasFeature(\n Feature.ListingLoadBySection\n );\n\n const getActivePosEntity = useCallback(\n async (\n posEntityId: number,\n curEntity?: ListingDetails | null,\n dataToGet?: string[] | null\n ) => {\n const activeClientCf = await getActClientCfg();\n const listingDetail = await new ListingClient(\n activeClientCf\n ).getListingByListingId(\n posEntityId,\n hasSectionalLoadDataFeature ? (curEntity ?? undefined) : undefined,\n hasSectionalLoadDataFeature\n ? (dataToGet?.map((s) => s as ListingDetailDataField) ?? [])\n : undefined\n );\n\n if (listingDetail) {\n return {\n posEntityId: listingDetail.id,\n posEntity: listingDetail,\n posEntityDisplayId: listingDetail.idOnMkp,\n };\n }\n\n return {};\n },\n [getActClientCfg, hasSectionalLoadDataFeature]\n );\n\n // Only use value provided at the first time (should be from '/inventory')\n const returnUrl = useMemo(() => {\n const locationState = (location.state ?? {}) as EventPageLocationState;\n\n if (locationState.returnUrl && locationState.keepReturnUrlUnchanged) {\n return locationState.returnUrl;\n }\n\n const relativeUrl =\n locationState.returnUrl || getDefaultReturnUrl(viagEventId);\n\n return removeDeepLinkUrlPartsFromRelativeUrl(relativeUrl, [\n InventoryDeeplinkQueryParam,\n ACTIVE_EVENT_IDS_QUERY_PARAM,\n TAB_EVENT_IDS_QUERY_PARAM,\n ACTIVE_EVENT_IDS_2_QUERY_PARAM,\n TAB_EVENT_IDS_2_QUERY_PARAM,\n ]);\n }, [viagEventId, location.state]);\n\n const hasMetricsV2Feature = useUserHasFeature(Feature.CatalogMetricsV2);\n\n if (!viagEventId) {\n return null;\n }\n\n return (\n \n \n initialQuery={initialQuery}\n emptyQuery={EmptyListingQuery}\n viewModeSettingId={UserSetting.InventoryPageViewMode}\n saveQueryInUrl\n queryValueTransformToUrl={listingQueryValueTransformToUrl}\n queryValueTransformFromUrl={listingQueryValueTransformFromUrl}\n >\n \n entityType={ActionOutboxEntityType.Listing}\n queryKey={ListingCatalogQueryKey}\n getCatalogData={(c, f) => getCatalogData(c, f, true)}\n getCatalogDataExpanded={getCatalogDataExpandedCallback}\n onCatalogDataExpanded={\n hasSectionalLoadInListingTable\n ? onCatalogDataExpandedCallback\n : undefined\n }\n transformEventData={transformData}\n >\n \n queryKey=\"getCatalogListingMetrics\"\n entityType={ActionOutboxEntityType.Listing}\n getCatalogMetrics={(c, f, r) =>\n getCatalogMetrics(c, f, r, hasMetricsV2Feature)\n }\n addCatalogMetrics={addListingMetrics}\n >\n \n entityType={ActionOutboxEntityType.Listing}\n getActivePosEntity={getActivePosEntity}\n >\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n","import { isEqual } from 'lodash-es';\nimport { ComponentProps, useCallback, useEffect } from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { Modal as RSModal } from 'reactstrap';\nimport { CancelButton } from 'src/components/Buttons';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { getTextFieldState, PosTextField } from 'src/core/POS/PosTextField';\nimport { Button } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { newGuidId } from 'src/utils/idUtils';\nimport { SearchResult } from 'src/WebApiController';\n\nexport type EntitySearchConfigDialogProps = {\n searchConfig?: T;\n onSave: (searchConfig: T) => void;\n} & ComponentProps;\n\nexport const EntitySearchConfigDialog = ({\n searchConfig,\n ...rest\n}: EntitySearchConfigDialogProps) => {\n const methods = useForm({\n defaultValues: searchConfig ?? { id: newGuidId() },\n });\n\n useEffect(() => {\n if (\n searchConfig &&\n !isEqual(searchConfig, methods.formState.defaultValues)\n ) {\n methods.reset(searchConfig);\n }\n }, [methods, searchConfig]);\n\n return (\n \n \n \n );\n};\n\nconst EntitySearchConfigDialogBody = ({\n onSave,\n onClosed,\n getValues,\n setValue,\n formState,\n clearErrors,\n setError,\n handleSubmit,\n register,\n reset,\n watch,\n ...rest\n}: Omit, 'searchConfig'> &\n Omit<\n ComponentProps>,\n 'children'\n >) => {\n const { loginContext } = useAppContext();\n const requiredMsg = useContent(ContentId.Required);\n const name = watch('name');\n const ownerUserId = watch('ownerUserId');\n\n const isNotOwned = ownerUserId && ownerUserId !== loginContext?.user?.userId;\n\n const handleClose = useCallback(() => {\n reset();\n onClosed?.();\n }, [onClosed, reset]);\n\n const onSubmit = useCallback(\n (saveCopy?: boolean) => {\n clearErrors();\n\n let hasErrors = false;\n if (!name) {\n setError('name', { message: requiredMsg }, { shouldFocus: true });\n hasErrors = true;\n }\n if (!hasErrors) {\n if (!ownerUserId || isNotOwned || saveCopy) {\n setValue('id', newGuidId());\n }\n handleSubmit(onSave)();\n }\n },\n [\n clearErrors,\n handleSubmit,\n isNotOwned,\n name,\n onSave,\n ownerUserId,\n requiredMsg,\n setError,\n setValue,\n ]\n );\n\n return (\n }\n footer={\n <>\n {onClosed && }\n\n {formState.defaultValues?.ownerUserId && (\n onSubmit(true)}\n disabled={formState.isSubmitting}\n >\n \n \n )}\n {!isNotOwned && (\n onSubmit(false)}\n disabled={formState.isSubmitting}\n >\n \n \n )}\n \n }\n onCancel={handleClose}\n onClosed={handleClose}\n >\n }\n >\n \n \n \n );\n};\n","import { useAppContext } from 'src/contexts/AppContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { ConfirmDialog } from 'src/core/interim/dialogs/ConfirmDialog';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { CopyIcon, DiskSaveIcon } from 'src/svgs';\nimport { DeleteIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SearchResult } from 'src/WebApiController';\n\nimport { EntitySearchConfigDialog } from '../EntitySearchConfigDialog';\n\nexport const EntitySearchConfigActions = ({\n activeSearchConfig,\n disabled,\n onSaveSearchResult,\n onDeleteSearchResult,\n}: {\n activeSearchConfig?: T;\n disabled?: boolean;\n onSaveSearchResult: (searchResult: T) => void;\n onDeleteSearchResult: (searchResult: T) => void;\n}) => {\n const { loginContext } = useAppContext();\n const saveSearchResultDlg = useBasicDialog();\n const deleteConfirmDlg = useBasicDialog();\n\n const isNotOwned =\n activeSearchConfig?.ownerUserId &&\n activeSearchConfig.ownerUserId !== loginContext?.user?.userId;\n\n const saveCopyText = useContent(ContentId.SaveCopy);\n const saveText = useContent(ContentId.SaveSearch);\n const deleteText = useContent(ContentId.Delete);\n\n return (\n \n {\n e.stopPropagation();\n e.preventDefault();\n saveSearchResultDlg.launchDialog();\n }}\n >\n {isNotOwned ? (\n \n ) : (\n \n )}\n \n\n {activeSearchConfig?.id && !isNotOwned && (\n {\n e.stopPropagation();\n e.preventDefault();\n deleteConfirmDlg.launchDialog();\n }}\n >\n \n \n )}\n\n {\n onSaveSearchResult(r);\n saveSearchResultDlg.closeDialog();\n }}\n {...saveSearchResultDlg.dialogProps}\n onClosed={saveSearchResultDlg.closeDialog}\n />\n }\n bodyText={\n \n \n {activeSearchConfig?.name}\n \n }\n onOkay={() => {\n if (activeSearchConfig?.id) {\n onDeleteSearchResult(activeSearchConfig);\n }\n deleteConfirmDlg.closeDialog();\n }}\n onCancel={deleteConfirmDlg.closeDialog}\n />\n \n );\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { useCallback, useMemo } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { PosSelect } from 'src/core/POS/PosSelect';\nimport { ToolbarButton } from 'src/core/POS/ToolbarButton';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { ScrollableToolbar } from 'src/core/ui/ScrollableToolbar';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { SearchClient, SearchResult } from 'src/WebApiController';\n\nimport { EntitySearchConfigActions } from '../EntitySearchConfigActions';\nimport { container } from './EntitySearchConfigsToolbar.css';\n\nexport type EntitySearchConfigsToolbarProps = {\n disabled?: boolean;\n setDisabled?: (disabled: boolean) => void;\n activeSearchConfig?: T;\n setActiveSearchConfig: (config?: T) => void;\n saveActiveSearchConfig: (config: T) => void;\n deleteActiveSearchConfig: (config: T) => void;\n getSearchConfigs: (\n client: SearchClient,\n includeAllUsers: boolean\n ) => Promise;\n getSearchResult: (client: SearchClient, id: string) => Promise;\n additionalActions?: React.ReactNode;\n};\n\nexport const EntitySearchConfigsToolbar = ({\n disabled,\n setDisabled,\n activeSearchConfig,\n setActiveSearchConfig,\n saveActiveSearchConfig,\n deleteActiveSearchConfig,\n getSearchConfigs,\n getSearchResult,\n additionalActions,\n}: EntitySearchConfigsToolbarProps) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError, showErrorDialog } = useErrorBoundaryContext();\n\n const shouldQuery =\n !disabled && activeAccountWebClientConfig.activeAccountId != null;\n\n const userSearchConfigsQuery = useQuery({\n queryKey: [\n 'SearchClient.getSearchConfigsForUser',\n activeAccountWebClientConfig.activeAccountId,\n ],\n queryFn: async () => {\n if (!shouldQuery) {\n return null;\n }\n const client = new SearchClient(activeAccountWebClientConfig);\n\n const r = await getSearchConfigs(client, false);\n if (r) {\n return r.reduce(\n (r, c) => {\n r[c.id!] = c;\n return r;\n },\n {} as Record\n );\n }\n\n return {} as Record;\n },\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError('PricingClient.getSearchConfigsForUser', error, {\n trackErrorData: {\n activeAccountId: activeAccountWebClientConfig.activeAccountId,\n },\n });\n },\n },\n });\n\n const accountSearchConfigsQuery = useQuery({\n queryKey: [\n 'SearchClient.getSearchConfigsForAccount',\n activeAccountWebClientConfig.activeAccountId,\n ],\n queryFn: async () => {\n if (!shouldQuery) {\n return null;\n }\n const client = new SearchClient(activeAccountWebClientConfig);\n\n const r = await getSearchConfigs(client, true);\n if (r) {\n return r.reduce(\n (r, c) => {\n r[c.id!] = c;\n return r;\n },\n {} as Record\n );\n }\n\n return {} as Record;\n },\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError('PricingClient.getSearchConfigsForAccount', error, {\n trackErrorData: {\n activeAccountId: activeAccountWebClientConfig.activeAccountId,\n },\n });\n },\n },\n });\n\n const onSearchConfigClick = useCallback(\n (searchResult: T) => {\n setDisabled?.(true);\n tryInvokeApi(\n async () => {\n if (searchResult.id === activeSearchConfig?.id) {\n // We're clicking on the same item - this is meant for a de-select\n setActiveSearchConfig(undefined);\n return;\n }\n const client = new SearchClient(activeAccountWebClientConfig);\n\n // set a mock search result while waiting for the main result\n setActiveSearchConfig(searchResult);\n\n const result = await getSearchResult(client, searchResult.id!);\n\n if (result) {\n setActiveSearchConfig(result);\n }\n },\n (error) => {\n showErrorDialog('SearchClient.getSearchResult', error, {\n trackErrorData: {\n searchResult,\n },\n });\n },\n () => setDisabled?.(false)\n );\n },\n [\n activeAccountWebClientConfig,\n activeSearchConfig?.id,\n getSearchResult,\n setActiveSearchConfig,\n setDisabled,\n showErrorDialog,\n ]\n );\n\n const otherConfigs = useMemo(() => {\n return Object.values(accountSearchConfigsQuery.data ?? {}).reduce(\n (r, c) => {\n // Only show if it's not already shown as this user's search result\n\n if (!userSearchConfigsQuery.data?.[c.id!]) {\n r[c.id!] = c.name!;\n }\n\n return r;\n },\n {} as Record\n );\n }, [accountSearchConfigsQuery.data, userSearchConfigsQuery.data]);\n\n const otherConfig = useMemo(\n () =>\n activeSearchConfig?.id\n ? otherConfigs[activeSearchConfig.id]\n ? activeSearchConfig.id // we only show selection if the active search config is one of the available items\n : undefined\n : undefined,\n [activeSearchConfig?.id, otherConfigs]\n );\n\n return (\n \n \n \n :\n \n \n \n \n setActiveSearchConfig(undefined)}\n >\n \n \n {!activeSearchConfig?.id && (\n \n )}\n \n\n {Object.values(userSearchConfigsQuery.data ?? {})\n .toSorted((x, y) => (x.name ?? '').localeCompare(y.name ?? ''))\n .map((item, i) => {\n const isSelected = activeSearchConfig?.id === item.id;\n return (\n \n \n isSelected ? null : onSearchConfigClick(item)\n }\n >\n {item.name}\n \n {activeSearchConfig?.id === item.id && (\n \n )}\n \n );\n })}\n \n {Boolean(Object.entries(otherConfigs).length) && (\n \n {\n const newConfig = accountSearchConfigsQuery.data?.[id];\n if (newConfig) {\n onSearchConfigClick(newConfig);\n }\n }}\n valueOptionsContent={otherConfigs}\n />\n {otherConfig && (\n \n )}\n \n )}\n \n \n\n {additionalActions}\n \n );\n};\n","import { debounce } from 'lodash-es';\nimport { CSSProperties, useCallback, useMemo, useState } from 'react';\nimport { FilterDropdownItem, FilterToolbarGroup } from 'src/components/Filters';\nimport {\n Content,\n getContent,\n useContent,\n useContentContext,\n} from 'src/contexts/ContentContext';\nimport { PosDropdown, PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { PosSearchBox } from 'src/core/POS/PosSearchBox';\nimport { vars } from 'src/core/themes';\nimport { Button, ButtonProps, Stack } from 'src/core/ui';\nimport { PlusIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport * as styles from './AddFilterDropdown.css';\n\nexport interface AddFilterDropdownProps {\n filters: FilterToolbarGroup[];\n onFilterSelected: (filterDropdownItem: FilterDropdownItem[]) => void;\n hideLabel?: boolean;\n hideIcon?: boolean;\n triggerVariant?: ButtonProps['variant'];\n triggerShape?: ButtonProps['shape'];\n triggerClassName?: string;\n disabled?: boolean;\n}\n\nconst triggerStyles: CSSProperties = {\n width: '100%',\n};\n\nexport const AddFilterDropdown = ({\n filters,\n onFilterSelected,\n hideLabel,\n hideIcon,\n triggerVariant = 'regular',\n triggerShape = 'rect',\n triggerClassName,\n disabled,\n}: AddFilterDropdownProps) => {\n const [searchText, setSearchText] = useState('');\n const searchPlaceholder = useContent(ContentId.Search);\n const contentContext = useContentContext();\n\n // eslint-disable-next-line react-hooks/rules-of-hooks,react-hooks/exhaustive-deps\n const updateSearchText = useCallback(\n debounce((value: string) => {\n setSearchText(value);\n }, 200),\n []\n );\n\n const filteredFilters = useMemo(() => {\n if (!searchText) {\n return filters;\n }\n const lowercaseSearchText = searchText.toLocaleLowerCase();\n return filters\n .map((filter) => {\n const items = filter.items.filter((filterItem) => {\n const labelValue = getContent(\n filterItem.labelContentId,\n contentContext\n );\n return (\n labelValue.toLocaleLowerCase().indexOf(lowercaseSearchText) !== -1\n );\n });\n return {\n ...filter,\n items,\n };\n })\n .filter((filter) => filter.items.length > 0);\n }, [contentContext, filters, searchText]);\n\n const clearSearch = useCallback(() => {\n setSearchText('');\n }, []);\n\n return (\n \n \n {!hideIcon && (\n \n )}\n\n {!hideLabel && }\n \n \n }\n triggerProps={{\n style: triggerStyles,\n disabled: disabled,\n }}\n align=\"start\"\n >\n \n \n \n\n {filteredFilters.flatMap((filtersToolbarGroup, i) => {\n const items = filtersToolbarGroup.items.map((filterItem) => {\n return (\n {\n onFilterSelected([\n {\n filterId: filterItem.filterId,\n titleContentId: filtersToolbarGroup.titleContentId,\n },\n ]);\n }}\n >\n \n \n );\n });\n return [\n
    \n
    \n \n \n \n {items}\n
    \n
    ,\n ];\n })}\n\n {filteredFilters.length === 0 && (\n \n \n \n )}\n \n );\n};\n","import clsx from 'clsx';\nimport { cloneElement, PropsWithChildren, useMemo } from 'react';\nimport {\n FilterDropdownItem,\n FilterToolbarGroup,\n FilterToolbarItem,\n FilterToolbarItemId,\n} from 'src/components/Filters';\nimport { ReportFilterEditabilityDropdown } from 'src/components/FilterToolbar/FilterDialogV2/FiltersList/ReportFilterEditabilityDropdown';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { Stack, StackProps } from 'src/core/ui';\nimport { ScrollableToolbar } from 'src/core/ui/ScrollableToolbar';\nimport { ScrollAreaRefActions } from 'src/core/ui/ScrollArea/ScrollArea';\nimport { CrossIcon } from 'src/svgs/Viagogo';\nimport {\n DEFAULT_REPORT_FILTER_EDITABILITY,\n ReportFilterEditability,\n} from 'src/utils/reportsFilterUtils';\n\nimport {\n buttonsContainer,\n buttonsContainerRow,\n filterContainer,\n filterContainerHorizontal,\n filterItemLabel,\n filterItemLabelVertical,\n filterItemValueVertical,\n filterItemWrapper,\n filterToolbarListContainerVertical,\n filterValue,\n} from './FiltersList.css';\n\nexport interface FiltersListProp {\n selectedDropdownItems: FilterDropdownItem[];\n filters: FilterToolbarGroup[];\n onFilterRemoved: (filterDropdownItem: FilterDropdownItem) => void;\n mandatoryFiltersToShow: FilterToolbarItemId[];\n filtersListHeader?: React.ReactNode;\n performerVenueFilter?: React.ReactNode;\n resetButton?: React.ReactNode;\n addFilterButton?: React.ReactNode;\n onEditabilityChange?: (\n filterId: FilterToolbarItemId | FilterToolbarItemId[],\n editability: ReportFilterEditability\n ) => void;\n direction?: 'row' | 'column';\n flexWrap?: StackProps['flexWrap'];\n // Used for reporting currently. Display filters according to `reportFilterEditability`\n viewerMode?: boolean;\n disabled?: boolean;\n}\n\nexport const FiltersList = ({\n filters,\n onFilterRemoved,\n mandatoryFiltersToShow,\n selectedDropdownItems,\n performerVenueFilter,\n filtersListHeader,\n resetButton,\n addFilterButton,\n scrollAreaRefActions,\n onEditabilityChange,\n direction = 'row',\n flexWrap,\n viewerMode,\n disabled,\n}: FiltersListProp & ScrollAreaRefActions) => {\n const filterItemsToShow = useMemo(() => {\n return selectedDropdownItems\n .map((dropdownItem) => {\n const group = filters.find((filterToolbarGroup: FilterToolbarGroup) => {\n return (\n filterToolbarGroup.titleContentId === dropdownItem.titleContentId\n );\n });\n\n if (group) {\n const item = group.items.find(\n (item) => item.filterId === dropdownItem.filterId\n );\n if (item) {\n return {\n group,\n item,\n };\n }\n }\n return null;\n })\n .filter(\n (filterItem) =>\n !!filterItem &&\n (viewerMode\n ? (filterItem.item.reportFilterEditability ??\n DEFAULT_REPORT_FILTER_EDITABILITY) !==\n ReportFilterEditability.Hidden\n : true)\n );\n }, [filters, selectedDropdownItems, viewerMode]);\n\n return (\n {addFilterButton &&
    {addFilterButton}
    }}\n resetButton={\n <>\n {resetButton &&\n (performerVenueFilter != null || filterItemsToShow.length > 0) && (\n
    {resetButton}
    \n )}\n \n }\n scrollAreaRefActions={scrollAreaRefActions}\n filtersListHeader={filtersListHeader}\n flexWrap={flexWrap}\n >\n {Boolean(filterItemsToShow?.length) && (\n \n {performerVenueFilter != null && performerVenueFilter}\n {filterItemsToShow.map((item, i) => (\n <>\n {item && (\n \n )}\n \n ))}\n \n )}\n \n );\n};\n\nconst FiltersListLayout = ({\n direction,\n children,\n addFilterButton,\n resetButton,\n scrollAreaRefActions,\n filtersListHeader,\n flexWrap,\n}: PropsWithChildren<{\n filtersListHeader: FiltersListProp['filtersListHeader'];\n direction: FiltersListProp['direction'];\n addFilterButton: FiltersListProp['addFilterButton'];\n resetButton: FiltersListProp['resetButton'];\n scrollAreaRefActions: ScrollAreaRefActions['scrollAreaRefActions'];\n flexWrap?: StackProps['flexWrap'];\n}>) => {\n if (direction === 'column') {\n return (\n \n \n {filtersListHeader}\n \n {resetButton}\n {addFilterButton}\n \n \n {children}\n \n );\n }\n\n if (flexWrap === 'wrap') {\n return (\n \n {children}\n {addFilterButton}\n {resetButton}\n \n );\n }\n\n return (\n \n {children ? (\n \n {children}\n \n ) : null}\n \n {addFilterButton}\n {resetButton}\n \n \n );\n};\n\nconst FilterToolbarListItem = ({\n item,\n filtersListDirection,\n onFilterRemoved,\n mandatoryFiltersToShow,\n selectedDropdownItems,\n onEditabilityChange,\n viewerMode,\n disabled,\n}: {\n item: FilterToolbarItem;\n filtersListDirection: FiltersListProp['direction'];\n selectedDropdownItems: FiltersListProp['selectedDropdownItems'];\n mandatoryFiltersToShow: FiltersListProp['mandatoryFiltersToShow'];\n onFilterRemoved: FiltersListProp['onFilterRemoved'];\n onEditabilityChange: FiltersListProp['onEditabilityChange'];\n viewerMode: FiltersListProp['viewerMode'];\n disabled: FiltersListProp['disabled'];\n}) => {\n const filterDisabled =\n viewerMode && item.reportFilterEditability !== ReportFilterEditability.Edit;\n\n const filterItem =\n disabled || filterDisabled\n ? cloneElement(item.filterItem, { disabled: true })\n : item.filterItem;\n\n const canBeRemoved =\n !viewerMode && !mandatoryFiltersToShow.includes(item.filterId);\n\n const onRemoveFilterHandler = () => {\n const filterDropdownItem = selectedDropdownItems.find(\n (filterDropdownItem) => filterDropdownItem.filterId === item.filterId\n );\n if (filterDropdownItem) {\n onFilterRemoved(filterDropdownItem);\n }\n };\n\n const contentText = useContent(item.labelContentId);\n\n const showReportFilterEditabilityDropdown =\n onEditabilityChange != null && !viewerMode;\n\n return (\n \n \n \n \n \n\n {canBeRemoved && (\n \n )}\n \n \n \n {filterItem}\n \n \n\n {showReportFilterEditabilityDropdown && (\n \n )}\n \n );\n};\n","import { useCallback, useEffect, useMemo, useRef } from 'react';\nimport {\n FilterDropdownItem,\n FilterToolbarGroup,\n FilterToolbarItemId,\n} from 'src/components/Filters';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Button } from 'src/core/ui';\nimport { ScrollAreaActions } from 'src/core/ui/ScrollArea/ScrollArea';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n DEFAULT_REPORT_FILTER_EDITABILITY,\n ReportFilterEditability,\n} from 'src/utils/reportsFilterUtils';\n\nimport {\n mapFiltersToFiltersState,\n useFilterFiltersByPermission,\n} from '../Filters';\nimport { AddFilterDropdown, AddFilterDropdownProps } from './AddFilterDropdown';\nimport { FiltersList, FiltersListProp } from './FilterList';\n\nexport type FilterToolbarEmbeddedProps = {\n filters: FilterToolbarGroup[];\n selectedFilters?: FilterDropdownItem[];\n setSelectedFilters: (sf: FilterDropdownItem[]) => void;\n onResetAll: () => void;\n resetTempQuery?: (keys?: FilterToolbarItemId[]) => void; // TODO: make this not optional\n tempQuery?: Partial>;\n initialQuery?: Partial>;\n appliedFilterIds?: FilterToolbarItemId[];\n mandatoryFiltersToShow?: FilterToolbarItemId[];\n performerVenueFilter?: JSX.Element;\n addFilterDropdownProps?: {\n triggerVariant?: AddFilterDropdownProps['triggerVariant'];\n triggerShape?: AddFilterDropdownProps['triggerShape'];\n triggerClassName?: AddFilterDropdownProps['triggerClassName'];\n };\n} & Pick<\n FiltersListProp,\n | 'onEditabilityChange'\n | 'direction'\n | 'filtersListHeader'\n | 'flexWrap'\n | 'viewerMode'\n | 'disabled'\n>;\n\nexport function FilterToolbarEmbedded({\n filters,\n selectedFilters = [],\n setSelectedFilters,\n onResetAll,\n appliedFilterIds,\n resetTempQuery,\n initialQuery = {},\n mandatoryFiltersToShow = [],\n performerVenueFilter,\n onEditabilityChange,\n direction,\n addFilterDropdownProps,\n filtersListHeader,\n flexWrap,\n viewerMode,\n disabled,\n}: FilterToolbarEmbeddedProps) {\n const scrollAreaRefActions = useRef(null);\n const filteredByPermissionsFilters = useFilterFiltersByPermission({\n filters,\n });\n\n const nonHiddenFilterIds = useMemo(\n () =>\n filteredByPermissionsFilters\n .flatMap((group) => group.items)\n .filter(\n (item) =>\n (item.reportFilterEditability ??\n DEFAULT_REPORT_FILTER_EDITABILITY) !==\n ReportFilterEditability.Hidden\n )\n .map((item) => item.filterId),\n [filteredByPermissionsFilters]\n );\n\n const appliedFilterIdsWithNonHidden = useMemo(\n () =>\n Array.from(new Set([...(appliedFilterIds ?? []), ...nonHiddenFilterIds])),\n [appliedFilterIds, nonHiddenFilterIds]\n );\n\n useEffect(() => {\n if (selectedFilters.length === 0) {\n const newSelectedFilters = mapFiltersToFiltersState({\n filters: filteredByPermissionsFilters,\n appliedFilterIds: appliedFilterIdsWithNonHidden,\n mandatoryFiltersToShow,\n });\n\n setSelectedFilters(Object.values(newSelectedFilters).flat());\n }\n }, [\n appliedFilterIds,\n appliedFilterIdsWithNonHidden,\n filteredByPermissionsFilters,\n mandatoryFiltersToShow,\n selectedFilters,\n setSelectedFilters,\n ]);\n\n const hasNonMandatorySelectedFilters = useMemo(() => {\n return selectedFilters.some(\n (dropdownItem) =>\n !mandatoryFiltersToShow.includes(dropdownItem.filterId) &&\n !initialQuery[dropdownItem.filterId] != null\n );\n }, [initialQuery, mandatoryFiltersToShow, selectedFilters]);\n\n const clearAll = useCallback(() => {\n // Clear all and keep the mandatory fields\n const cleanSelectedFilters: FilterDropdownItem[] = [];\n selectedFilters.forEach((filterDropdownItem) => {\n if (\n mandatoryFiltersToShow.includes(filterDropdownItem.filterId) ||\n initialQuery[filterDropdownItem.filterId] != null\n ) {\n cleanSelectedFilters.push(filterDropdownItem);\n }\n });\n setSelectedFilters(cleanSelectedFilters);\n resetTempQuery?.();\n onResetAll();\n }, [\n initialQuery,\n mandatoryFiltersToShow,\n onResetAll,\n resetTempQuery,\n selectedFilters,\n setSelectedFilters,\n ]);\n\n const onFilterRemoved = useCallback(\n (removedFilterDropdownItem: FilterDropdownItem) => {\n const titleContentId = removedFilterDropdownItem.titleContentId as string;\n\n const filterToolbarGroup = filters.find(\n (group) => group.titleContentId === titleContentId\n );\n\n if (!filterToolbarGroup) {\n return;\n }\n\n const filtersToRemove = filterToolbarGroup.items.filter(\n (filter) => filter.filterId === removedFilterDropdownItem.filterId\n );\n\n const filterIdsToRemove = filtersToRemove.map((f) => f.filterId);\n const filteredDropdownItems = (selectedFilters ?? []).filter(\n (dropdownItem) => !filterIdsToRemove.includes(dropdownItem.filterId)\n );\n\n // all keys to remove from tempQuery\n const filterQueryKeysToRemove = filtersToRemove.flatMap(\n (f) => f.filterQueryKeys ?? []\n );\n\n resetTempQuery?.(filterQueryKeysToRemove);\n setSelectedFilters(filteredDropdownItems);\n onEditabilityChange?.(\n filtersToRemove.map((f) => f.filterId),\n ReportFilterEditability.Hidden\n );\n },\n [\n filters,\n onEditabilityChange,\n resetTempQuery,\n selectedFilters,\n setSelectedFilters,\n ]\n );\n\n const onFilterSelected = useCallback(\n (filterDropdownItems: FilterDropdownItem[]) => {\n const updatedSelectedFilters: FilterDropdownItem[] = [...selectedFilters];\n\n let addedNewFilter = false;\n filterDropdownItems.forEach((filterDropdownItem) => {\n const isSelected = selectedFilters?.some(\n (selectedFilter) =>\n selectedFilter.filterId === filterDropdownItem.filterId\n );\n if (!isSelected) {\n updatedSelectedFilters.push(filterDropdownItem);\n addedNewFilter = true;\n }\n });\n\n if (addedNewFilter) {\n setSelectedFilters(updatedSelectedFilters);\n }\n // On next render, scroll\n setTimeout(() => {\n scrollAreaRefActions.current?.startScroll('right');\n }, 10);\n },\n [selectedFilters, setSelectedFilters]\n );\n\n return (\n \n {viewerMode ? null : (\n \n \n \n )}\n \n }\n addFilterButton={\n <>\n {viewerMode ? null : (\n \n )}\n \n }\n scrollAreaRefActions={scrollAreaRefActions}\n onEditabilityChange={onEditabilityChange}\n direction={direction}\n filtersListHeader={filtersListHeader}\n flexWrap={flexWrap}\n viewerMode={viewerMode}\n disabled={disabled}\n />\n );\n}\n","import { useCallback } from 'react';\nimport {\n FilterDropdownItem,\n FilterToolbarGroup,\n FilterToolbarItemId,\n} from 'src/components/Filters';\nimport { useFiltersHelpers } from 'src/components/FilterToolbar/useFiltersHelpers';\nimport { FilterToolbarEmbedded } from 'src/components/FilterToolbarEmbedded';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { Button, Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { QueryWithViewMode } from 'src/utils/eventQueryUtils';\nimport { EntityWithTicketsQuery, SearchResult } from 'src/WebApiController';\n\nimport * as styles from './EntitySearchFilterBar.css';\n\nexport const EntitySearchFilterBar = ({\n filters,\n activeSearchConfig,\n onSubmitFilter,\n selectedFilters,\n mandatoryFiltersToShow,\n ...rest\n}: {\n filters: FilterToolbarGroup[];\n activeSearchConfig?: SearchResult;\n onSubmitFilter?: (query: T) => void;\n selectedFilters?: FilterDropdownItem[];\n setSelectedFilters: (sf: FilterDropdownItem[]) => void;\n mandatoryFiltersToShow: FilterToolbarItemId[];\n}) => {\n const {\n initialQuery,\n tempQuery,\n setFilterQuery,\n setTempQuery,\n resetTempQuery,\n } = useFilterQueryContext();\n\n const onSubmitFilterHandler = useCallback(() => {\n setFilterQuery(tempQuery);\n onSubmitFilter?.(tempQuery);\n }, [onSubmitFilter, setFilterQuery, tempQuery]);\n\n const { appliedFilters } = useFiltersHelpers({\n filters,\n activeQuery: tempQuery,\n mandatoryFiltersToShow,\n initialQuery,\n });\n\n return (\n \n {\n setTempQuery(initialQuery);\n }}\n filters={filters}\n appliedFilterIds={appliedFilters}\n mandatoryFiltersToShow={mandatoryFiltersToShow}\n resetTempQuery={resetTempQuery}\n tempQuery={tempQuery}\n selectedFilters={selectedFilters}\n {...rest}\n />\n \n \n \n \n );\n};\n","import { format } from 'date-fns';\nimport { Content } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { RotatingWrapper } from 'src/core/ui/AnimatingWrapper';\nimport { IconsFill, ProcessingIcon, ReloadIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SearchResult } from 'src/WebApiController';\n\nexport const EntitySearchRefetcher = ({\n activeSearchConfig,\n disabled,\n onRequeryForTheResult,\n}: {\n activeSearchConfig?: SearchResult;\n disabled?: boolean;\n onRequeryForTheResult: () => void;\n}) => {\n if (activeSearchConfig?.lastFetchDate == null) return null;\n\n return (\n \n \n :\n \n \n {format(new Date(activeSearchConfig.lastFetchDate), 'M/d/yyyy h:mm a')}.\n \n \n \n {disabled ? (\n \n \n \n ) : (\n \n )}\n \n \n );\n};\n","import { isEqual } from 'lodash-es';\nimport { useCallback, useEffect, useState } from 'react';\nimport { FilterDropdownItem } from 'src/components/Filters';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { useCatalogMultiSelectionContext } from 'src/contexts/CatalogMultiSelectionContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { isFilterUnchanged } from 'src/utils/eventQueryUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n InventorySearchResult,\n InventoryViewMode,\n ListingQuery,\n PurchaseOrderQuery,\n PurchaseSearchResult,\n PurchaseViewMode,\n SaleQuery,\n SaleSearchResult,\n SalesViewMode,\n SearchClient,\n} from 'src/WebApiController';\n\nexport type UseEntitySearchReturnType = {\n selectedFilters: FilterDropdownItem[] | undefined;\n setSelectedFilters: React.Dispatch<\n React.SetStateAction\n >;\n onSetActiveSearchConfig: (searchConfig?: S) => void;\n onSaveSearchResult: (searchResult: S) => Promise;\n onDeleteSearchResult: (searchResult: S) => void;\n refetchData: (\n filterQuery: ListingQuery | SaleQuery | PurchaseOrderQuery,\n customRefreshItems?: () => Promise\n ) => Promise;\n onRequeryForTheResult: () => void;\n disabled: boolean;\n setDisabled: (d: boolean) => void;\n};\n\nexport const useEntitySearch = <\n T extends ListingQuery | SaleQuery | PurchaseOrderQuery,\n S extends InventorySearchResult | SaleSearchResult | PurchaseSearchResult,\n>(\n activeSearchConfig: S | undefined,\n setActiveSearchConfig: (a: S | undefined) => void,\n viewMode:\n | InventoryViewMode.FlattenedView\n | SalesViewMode.FlattenedView\n | PurchaseViewMode.FlattenedView,\n getSearchResult: (client: SearchClient, id?: string) => Promise,\n saveSearchResult: (client: SearchClient, searchResult: S) => Promise\n): UseEntitySearchReturnType => {\n const { loginContext, activeAccountWebClientConfig } = useAppContext();\n const { setSelectionMode } = useMultiSelectionContext();\n const [selectedFilters, setSelectedFilters] =\n useState();\n const {\n filterQuery,\n setFilterQuery,\n setTempQuery,\n initialQuery,\n emptyQuery,\n } = useFilterQueryContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const { flattenedIds: newEntityIds } = useCatalogMultiSelectionContext();\n const [disabled, setDisabled] = useState(false);\n\n const onSetActiveSearchConfig = useCallback(\n (searchConfig?: S) => {\n const defaultFilter = {\n ...initialQuery,\n viewMode,\n };\n // If this is already selected, clicking will do unselection\n if (searchConfig && !isEqual(searchConfig, activeSearchConfig)) {\n // Only update the query if the searchConfig has it\n if (searchConfig.query) {\n if (searchConfig.query.eventTimeFrameFilter === undefined) {\n // If the query comes from a search result and it doesn't have a time frame filter\n // that means the value was saved as \"null\" and we have to set it to null\n // otherwise it gets default to the Future one which is not correct\n // This is the only filter with this Nuance, others do not have this issue\n searchConfig.query.eventTimeFrameFilter = null;\n }\n\n // Only change filter when the query came back\n setFilterQuery({\n ...searchConfig.query,\n searchConfigId: searchConfig.id,\n entityIds: searchConfig.entityIds,\n viewMode,\n } as T);\n setTempQuery(searchConfig.query as T);\n }\n setActiveSearchConfig(searchConfig);\n } else {\n setFilterQuery(defaultFilter);\n setTempQuery(defaultFilter);\n setActiveSearchConfig(undefined);\n }\n\n setSelectedFilters(undefined);\n // Clear selections\n setSelectionMode(undefined);\n },\n [\n initialQuery,\n viewMode,\n activeSearchConfig,\n setSelectionMode,\n setActiveSearchConfig,\n setFilterQuery,\n setTempQuery,\n ]\n );\n\n // This use affect allow handling of the URL for a search-result to be pasted in\n // it will come in via the filterQuery.searchConfigId and we will process that\n useEffect(() => {\n if (!disabled && activeAccountWebClientConfig?.activeAccountId) {\n if (filterQuery.searchConfigId) {\n if (filterQuery.searchConfigId !== activeSearchConfig?.id) {\n setDisabled?.(true);\n\n // set a mock search result while waiting for the main result\n setActiveSearchConfig({\n id: filterQuery.searchConfigId,\n name: null,\n query: null,\n ownerUserId: null,\n count: null,\n entityIds: null,\n lastFetchDate: null,\n } as S);\n getSearchResult(\n new SearchClient(activeAccountWebClientConfig),\n filterQuery.searchConfigId\n )\n .then(\n (r) => {\n onSetActiveSearchConfig(r);\n },\n (e) => {\n onSetActiveSearchConfig(undefined);\n showErrorDialog('SearchClient.getSearchResult', e);\n }\n )\n .finally(() => setDisabled?.(false));\n } else if (\n !filterQuery.entityIds?.length &&\n activeSearchConfig?.entityIds?.length\n ) {\n setFilterQuery({\n ...filterQuery,\n entityIds: activeSearchConfig.entityIds,\n });\n }\n } else if (\n // If we don't have a search config yet and the filter query is different from the initial query\n // set it so we start querying for data (this usually comes from set query or URL query)\n activeSearchConfig == null &&\n !isFilterUnchanged(filterQuery, initialQuery)\n ) {\n onSetActiveSearchConfig({\n ...(activeSearchConfig ?? {\n id: null,\n name: null,\n query: null,\n ownerUserId: null,\n count: null,\n entityIds: null,\n lastFetchDate: null,\n }),\n query: { ...filterQuery, entityIds: null },\n } as S);\n }\n }\n }, [\n activeAccountWebClientConfig,\n activeSearchConfig,\n activeSearchConfig?.id,\n disabled,\n initialQuery,\n filterQuery,\n getSearchResult,\n onSetActiveSearchConfig,\n setDisabled,\n setFilterQuery,\n setTempQuery,\n showErrorDialog,\n setActiveSearchConfig,\n ]);\n\n const onSaveSearchResult = useCallback(\n async (searchResult: S) => {\n if (\n !searchResult?.id || // should not save if there is no ID\n !searchResult?.name || // should not save if there is no ID\n // should not save search-result not yours\n (searchResult.ownerUserId &&\n searchResult.ownerUserId !== loginContext?.user?.userId)\n ) {\n return;\n }\n\n const newQuery = {\n ...(searchResult.query ?? activeSearchConfig?.query ?? filterQuery),\n // we don't need to save these, only the raw filter is needed\n entityIds: null as number[] | null,\n marketplaceEntityIds: null as string[] | null,\n searchConfigId: null as string | null,\n };\n\n if (isFilterUnchanged(newQuery, emptyQuery)) {\n console.log('Cannot save search result with empty query.');\n return;\n }\n\n setDisabled?.(true);\n await tryInvokeApi(\n async () => {\n const newSearchConfig = {\n ...searchResult,\n entityIds:\n searchResult.entityIds ??\n activeSearchConfig?.entityIds ??\n newEntityIds ??\n null,\n query: newQuery,\n };\n\n const result = await saveSearchResult(\n new SearchClient(activeAccountWebClientConfig),\n newSearchConfig\n );\n\n if (result) {\n setActiveSearchConfig({\n ...newSearchConfig,\n ...result,\n });\n }\n },\n (error) => {\n showErrorDialog('SearchClient.saveSaleSearchResult', error, {\n trackErrorData: {\n searchResult,\n },\n });\n },\n () => setDisabled?.(false)\n );\n },\n [\n loginContext?.user?.userId,\n activeSearchConfig?.query,\n activeSearchConfig?.entityIds,\n filterQuery,\n emptyQuery,\n newEntityIds,\n saveSearchResult,\n activeAccountWebClientConfig,\n setActiveSearchConfig,\n showErrorDialog,\n ]\n );\n\n const [lastResultEntityIds, setLastResultEntityIds] = useState();\n\n // This useEffect is for handling when the result list changes - if it's for the current search result\n // it will save the current search result automatically for the update ids\n useEffect(() => {\n if (newEntityIds?.length) {\n if (!isEqual(newEntityIds, lastResultEntityIds)) {\n setLastResultEntityIds(newEntityIds as number[]);\n setSelectionMode(undefined);\n\n const idsChanged =\n activeSearchConfig?.entityIds &&\n !isEqual(newEntityIds, activeSearchConfig.entityIds);\n\n if (activeSearchConfig?.id && activeSearchConfig?.name) {\n // If there is an active config - only save if the filter searchConfigId matches the active id\n // and either the filter or new entity ids changed\n if (\n (filterQuery.searchConfigId == null ||\n filterQuery.searchConfigId === activeSearchConfig?.id) &&\n (!isEqual(filterQuery, activeSearchConfig.query) || idsChanged)\n ) {\n // if there is current result\n // then save it\n onSaveSearchResult({\n ...activeSearchConfig,\n count: newEntityIds.length,\n lastFetchDate: idsChanged\n ? new Date().toISOString()\n : activeSearchConfig.lastFetchDate,\n query: filterQuery,\n entityIds: newEntityIds,\n });\n }\n } else {\n setActiveSearchConfig({\n ...(activeSearchConfig ?? {\n id: null,\n name: null,\n ownerUserId: null,\n }),\n count: newEntityIds.length,\n lastFetchDate:\n idsChanged || !activeSearchConfig?.lastFetchDate\n ? new Date().toISOString()\n : activeSearchConfig?.lastFetchDate,\n query: filterQuery,\n entityIds: newEntityIds,\n } as S);\n }\n }\n }\n }, [\n activeSearchConfig,\n filterQuery,\n lastResultEntityIds,\n newEntityIds,\n onSaveSearchResult,\n setActiveSearchConfig,\n setSelectionMode,\n ]);\n\n const onDeleteSearchResult = useCallback(\n (searchResult: S) => {\n if (!searchResult.id) return;\n\n setDisabled?.(true);\n tryInvokeApi(\n async () => {\n await new SearchClient(\n activeAccountWebClientConfig\n ).deleteSearchConfig(searchResult.id!);\n\n setActiveSearchConfig(undefined);\n },\n (error) => {\n showErrorDialog('SearchClient.deleteSearchConfig', error, {\n trackErrorData: {\n searchResult,\n },\n });\n },\n () => setDisabled?.(false)\n );\n },\n [\n activeAccountWebClientConfig,\n setActiveSearchConfig,\n setDisabled,\n showErrorDialog,\n ]\n );\n\n const {\n refreshCatalog,\n eventsExpansion: { refreshExpandedListItems },\n } = useCatalogDataContext();\n\n const refetchData = useCallback(\n async (\n filterQuery: ListingQuery | SaleQuery | PurchaseOrderQuery,\n customRefreshItems?: () => Promise\n ) => {\n setDisabled?.(true);\n\n try {\n if (activeSearchConfig) {\n // Update the last refetch date and save\n await onSaveSearchResult({\n ...activeSearchConfig,\n query: filterQuery,\n lastFetchDate: new Date().toISOString(),\n });\n }\n await refreshCatalog();\n customRefreshItems\n ? await customRefreshItems()\n : await refreshExpandedListItems(true);\n } finally {\n setDisabled?.(false);\n }\n },\n [\n activeSearchConfig,\n onSaveSearchResult,\n refreshCatalog,\n refreshExpandedListItems,\n setDisabled,\n ]\n );\n\n const onRequeryForTheResult = useCallback(() => {\n // First clear the entity ids so the query will re-query the DB\n // else you'll get the same result\n setFilterQuery({ ...filterQuery, searchConfigId: null, entityIds: null });\n refetchData(filterQuery);\n }, [filterQuery, refetchData, setFilterQuery]);\n\n return {\n selectedFilters,\n setSelectedFilters,\n onSetActiveSearchConfig,\n onSaveSearchResult,\n onDeleteSearchResult,\n refetchData,\n onRequeryForTheResult,\n disabled,\n setDisabled,\n };\n};\n","import { EntitySearchFilterBar } from 'src/components/EntitySearch';\nimport { FilterDropdownItem } from 'src/components/Filters';\nimport { useListingFilters } from 'src/components/MainFilterBar';\nimport { InventorySearchResult, ListingQuery } from 'src/WebApiController';\n\nexport const InventorySearchFilterBar = (props: {\n activeSearchConfig?: InventorySearchResult;\n onSubmitFilter?: (query: ListingQuery) => void;\n selectedFilters?: FilterDropdownItem[];\n setSelectedFilters: (sf: FilterDropdownItem[]) => void;\n}) => {\n const { filters } = useListingFilters({\n isHorizontalLayout: true,\n showCatalogFilters: true,\n });\n\n return (\n \n );\n};\n","import { MouseEvent } from 'react';\nimport { useToggle } from 'react-use';\nimport { MultiSelectActionBar } from 'src/components/common/MultiSelect/MultiSelectActionBar';\nimport { InventoryGlobalBulkActions } from 'src/components/Events/EventListing/InventoryEventListing/BulkActions';\nimport { SetInventoryFlattenedViewSelectionCountLabel } from 'src/components/Events/EventListing/InventoryEventListing/SetInventoryFlattenedViewSelectionCountLabel';\nimport { Content } from 'src/contexts/ContentContext';\nimport { NO_GROUP_ID } from 'src/contexts/MultiSelectionContext';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { ColumnSettingsModal } from 'src/modals/ColumnSettings/ColumnSettings';\nimport { LayoutIcon } from 'src/svgs';\nimport { CustomListingColumn } from 'src/utils/columns/inventory/inventoryCustomColumnUtils.types';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport { InventorySearchResult } from 'src/WebApiController';\n\nimport { container } from './InventorySearchToolbar.css';\n\nexport const InventorySearchToolbar = ({\n disabled,\n}: {\n disabled?: boolean;\n setDisabled?: (d: boolean) => void;\n activeSearchConfig?: InventorySearchResult;\n}) => {\n const [isColumnModalOpen, toggleColumnModal] = useToggle(false);\n\n const onColumnSettingButtonClickHandler = (\n e: MouseEvent\n ) => {\n e.stopPropagation();\n if (!isColumnModalOpen) toggleColumnModal(true);\n };\n\n return (\n \n
    \n \n {!disabled && (\n \n \n \n )}\n \n
    \n\n \n \n \n \n \n \n {isColumnModalOpen ? (\n \n onClose={toggleColumnModal}\n sectionType={SectionType.ListingsFlattened}\n showTicketClassColor\n />\n ) : null}\n \n );\n};\n","import { useCallback, useMemo, useState } from 'react';\nimport { useLocation } from 'react-router-dom';\nimport {\n EntitySearchConfigsToolbar,\n EntitySearchRefetcher,\n} from 'src/components/EntitySearch';\nimport { useEntitySearch } from 'src/components/EntitySearch';\nimport { InventoryFlattenedView } from 'src/components/Events/EventListing/InventoryEventListing/InventoryFlattenedView';\nimport { ListingSearchBox } from 'src/components/Listings/ListingFilterBar/ListingSearchBox';\nimport { ActivePosEntityProvider } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n CatalogDataContextProvider,\n useCatalogDataContext,\n} from 'src/contexts/CatalogDataContext';\nimport { CatalogMultiSelectionContextProvider } from 'src/contexts/CatalogMultiSelectionContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { DialogProvider } from 'src/contexts/DialogContext/DialogContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { FilterQueryContextProvider } from 'src/contexts/FilterQueryContext';\nimport {\n MultiSelectionContextProvider,\n MultiSelectScope,\n NO_GROUP_ID,\n} from 'src/contexts/MultiSelectionContext';\nimport { SellerUserSettingsProvider } from 'src/contexts/SellerUserSettingsContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { vars } from 'src/core/themes';\nimport { DividerLine } from 'src/core/ui';\nimport { useGetActiveAccountClientConfig } from 'src/hooks/useGetActiveAccountClientConfig';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { LayoutContent } from 'src/navigations/LayoutContent';\nimport { InventoryDeeplinkQueryParam } from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { removeDeepLinkUrlPartsFromRelativeUrl } from 'src/utils/deepLinkUtils';\nimport {\n DefaultListingQuery,\n EmptyListingQuery,\n} from 'src/utils/eventQueryUtils';\nimport { transformData } from 'src/utils/eventWithDataUtils';\nimport { EventPageLocationState } from 'src/utils/types/EventPageLocationState';\nimport { SomethingWentWrong } from 'src/views';\nimport {\n ActionOutboxEntityType,\n CatalogClient,\n CatalogResults,\n Feature,\n InventorySearchResult,\n InventoryViewMode,\n ListingClient,\n ListingDetailDataField,\n ListingDetails,\n ListingQuery,\n} from 'src/WebApiController';\n\nimport {\n getCatalogData,\n getCatalogDataExpanded,\n listingQueryValueTransformFromUrl,\n listingQueryValueTransformToUrl,\n} from '../Inventory';\nimport {\n getDefaultReturnUrl,\n INVENTORY_USER_SETTINGS,\n} from '../InventoryEvent/constants';\nimport {\n ACTIVE_EVENT_IDS_2_QUERY_PARAM,\n ACTIVE_EVENT_IDS_QUERY_PARAM,\n TAB_EVENT_IDS_2_QUERY_PARAM,\n TAB_EVENT_IDS_QUERY_PARAM,\n} from '../InventoryEvent/InventoryEvent.constants';\nimport { MainRoute } from '../MainRoute';\nimport * as styles from './InventorySearch.css';\nimport { InventorySearchFilterBar } from './InventorySearchFilterBar';\nimport { InventorySearchToolbar } from './InventorySearchToolbar';\n\nexport function InventorySearch() {\n return (\n \n \n initialQuery={{\n ...DefaultListingQuery,\n viewMode: InventoryViewMode.FlattenedView,\n }}\n emptyQuery={EmptyListingQuery}\n queryValueTransformToUrl={listingQueryValueTransformToUrl}\n queryValueTransformFromUrl={listingQueryValueTransformFromUrl}\n saveQueryInUrl\n >\n \n \n \n );\n}\n\nfunction InventorySearchPage() {\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n const [activeSearchConfig, setActiveSearchConfig] =\n useState();\n\n const getCatalogDataExpandedCallback = useCallback(\n (ids: string[], f: ListingQuery) => {\n // Check to see if if is empty filter, query\n if (\n activeSearchConfig == null || // do not start query for items if there is no activeSearchConfig\n (f.searchConfigId && !f.entityIds?.length) // we don't want to query when the filter has the search config id but no entity ids\n ) {\n return Promise.resolve({});\n }\n\n // If we're querying by ids - we want to get the latest greatest\n // We're only using readonly-db if we're filtering\n const useReadOnlyDb = f.entityIds?.length ? false : true;\n return getCatalogDataExpanded(\n ids,\n f,\n {\n activeAccountWebClientConfig,\n onError: (error) => {\n trackError('ListingClient.getListingsForEvents', error, {\n ...f,\n eventIds: ids,\n });\n },\n },\n useReadOnlyDb,\n true /* doNotProcessListingGroups */\n );\n },\n [activeAccountWebClientConfig, activeSearchConfig, trackError]\n );\n\n const getCatalogDataCallback = useCallback(\n async (c: CatalogClient, f: ListingQuery) => {\n // Check to see if if is empty filter, query\n if (\n f.searchConfigId &&\n !f.entityIds?.length // we don't want to query when the filter has the search config id but no entity ids\n ) {\n // If there is no filter (empty query) then don't try to query for anything\n return {\n events: {},\n performers: {},\n venues: {},\n venueCfgs: {},\n } as CatalogResults;\n }\n\n return await getCatalogData(c, f, true);\n },\n []\n );\n\n return (\n \n entityType={ActionOutboxEntityType.Listing}\n queryKey=\"getCatalogForListingOrders\"\n getCatalogData={getCatalogDataCallback}\n getCatalogDataExpanded={getCatalogDataExpandedCallback}\n transformEventData={transformData}\n disableAutoRefresh\n ignoreMaxCount\n >\n \n \n \n \n \n \n );\n}\n\nfunction InventorySearchContent({\n activeSearchConfig,\n setActiveSearchConfig,\n}: {\n activeSearchConfig: InventorySearchResult | undefined;\n setActiveSearchConfig: (a: InventorySearchResult | undefined) => void;\n}) {\n const searchTitle = useContent(ContentId.SearchInventory);\n const hasColumnFilterSearchViewFeature = useUserHasFeature(\n Feature.ColumnFilterSearchView\n );\n\n const location = useLocation();\n const {\n errorInfo,\n isLoading: isCatalogDataLoading,\n isItemsLoading,\n eventsTransformed,\n } = useCatalogDataContext();\n\n const {\n selectedFilters,\n setSelectedFilters,\n onSetActiveSearchConfig,\n onSaveSearchResult,\n onDeleteSearchResult,\n onRequeryForTheResult,\n refetchData,\n disabled,\n setDisabled,\n } = useEntitySearch(\n activeSearchConfig,\n setActiveSearchConfig,\n InventoryViewMode.FlattenedView,\n (client, id) => client.getInventorySearchResult(id),\n (client, r) => client.saveInventorySearchResult(r)\n );\n\n // Only use value provided at the first time (should be from '/purchases')\n const returnUrl = useMemo(() => {\n const locationState = (location.state ?? {}) as EventPageLocationState;\n\n if (locationState.returnUrl && locationState.keepReturnUrlUnchanged) {\n return locationState.returnUrl;\n }\n\n const relativeUrl =\n locationState.returnUrl || getDefaultReturnUrl('purchases');\n\n return removeDeepLinkUrlPartsFromRelativeUrl(relativeUrl, [\n InventoryDeeplinkQueryParam,\n ACTIVE_EVENT_IDS_QUERY_PARAM,\n TAB_EVENT_IDS_QUERY_PARAM,\n ACTIVE_EVENT_IDS_2_QUERY_PARAM,\n TAB_EVENT_IDS_2_QUERY_PARAM,\n ]);\n }, [location.state]);\n\n const getActClientCfg = useGetActiveAccountClientConfig(\n 'Inventory.ListingClient.getListingByListingId'\n );\n const hasSectionalLoadDataFeature = useUserHasFeature(\n Feature.ListingLoadBySection\n );\n\n const getActivePosEntity = useCallback(\n async (\n posEntityId: number,\n curEntity?: ListingDetails | null,\n dataToGet?: string[] | null\n ) => {\n const activeClientCf = await getActClientCfg();\n\n const listingDetail = await new ListingClient(\n activeClientCf\n ).getListingByListingId(\n posEntityId,\n hasSectionalLoadDataFeature ? (curEntity ?? undefined) : undefined,\n hasSectionalLoadDataFeature\n ? (dataToGet?.map((s) => s as ListingDetailDataField) ?? [])\n : undefined\n );\n\n if (listingDetail) {\n return {\n posEntityId: listingDetail.id,\n posEntity: listingDetail,\n posEntityDisplayId: listingDetail.idOnMkp,\n };\n }\n\n return {};\n },\n [getActClientCfg, hasSectionalLoadDataFeature]\n );\n\n const dataIsLoading = isCatalogDataLoading;\n\n return (\n \n entityType={ActionOutboxEntityType.Listing}\n getActivePosEntity={getActivePosEntity}\n >\n \n \n }\n >\n \n client.getInventorySearchConfigs(includeAllUser)\n }\n getSearchResult={(client, id) =>\n client.getInventorySearchResult(id)\n }\n additionalActions={}\n />\n \n {\n if (!activeSearchConfig) {\n // Setting an empty search config so it starts to filter\n onSetActiveSearchConfig({\n id: null,\n name: null,\n query: filter,\n ownerUserId: null,\n count: null,\n entityIds: null,\n lastFetchDate: null,\n });\n }\n refetchData(filter);\n }}\n />\n \n \n \n
    \n {errorInfo && (\n \n )\n }\n />\n )}\n {(dataIsLoading || isItemsLoading) && !eventsTransformed?.length ? (\n \n ) : (\n \n )}\n
    \n \n
    \n \n );\n}\n","import { useCallback, useEffect, useMemo } from 'react';\nimport { useLocation, useNavigate } from 'react-router-dom';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { LayoutContent } from 'src/navigations/LayoutContent';\nimport { getCurrentViewPath } from 'src/utils/deepLinkUtils';\nimport { ApiException, LoginClient, LoginContext } from 'src/WebApiController';\n\nimport { MainRoute } from '../MainRoute';\nimport * as styles from './Login.css';\n\nexport function Login() {\n return (\n \n \n \n );\n}\n\nfunction LoginPage() {\n const location = useMemo(() => new URL(window.location.href), []);\n const reactRouterLocation = useLocation();\n const returnUrl = (reactRouterLocation.state as { returnUrl?: string })\n ?.returnUrl;\n const { trackError } = useErrorBoundaryContext();\n const navigate = useNavigate();\n\n const handleLoginContext = useCallback(\n (loginContext: LoginContext) => {\n if ((loginContext?.authorizationUrl?.length || 0) > 0) {\n window.location.assign(loginContext.authorizationUrl!);\n } else {\n let returnUrl = location?.searchParams?.get('returnUrl');\n if (!returnUrl) {\n returnUrl = getCurrentViewPath(MainRoute.Home);\n }\n if (returnUrl!.startsWith('https://')) {\n // to be safe we should only redirect to full HTTPS\n window.location.assign(returnUrl!);\n } else {\n navigate(returnUrl!);\n }\n }\n },\n [location?.searchParams, navigate]\n );\n\n const onLoggingInUser = useCallback(async () => {\n try {\n const loginContext = await new LoginClient({}).getLoginContext(\n returnUrl || '/home'\n ); // after we authorize we want to return here\n\n handleLoginContext(loginContext);\n } catch (error) {\n // When getting a 401 response, we go this route\n try {\n const defaultLoginContext = JSON.parse(\n (error as ApiException)?.response\n ) as LoginContext;\n\n handleLoginContext(defaultLoginContext);\n } catch (jsonError) {\n trackError('LoginClient.getLoginContext', jsonError as ErrorTypes, {\n error,\n });\n }\n }\n }, [handleLoginContext, returnUrl, trackError]);\n\n useEffect(() => {\n onLoggingInUser();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return
    ;\n}\n","import { useCallback, useEffect, useMemo, useState } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { SellerAccountBasicInfo } from 'src/components/SellerAccountBasicInfo';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { SearchResultPickerDialog } from 'src/dialogs/SearchResultPickerDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { LayoutContent } from 'src/navigations/LayoutContent';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { sortSellerAccount } from 'src/utils/userUtils';\nimport {\n LoginClient,\n SellerAccount,\n SellerAccountClient,\n} from 'src/WebApiController';\n\nimport { MainRoute } from '../MainRoute';\nimport * as styles from './Login.css';\n\nexport function LoginCallback() {\n return (\n \n \n \n );\n}\n\nfunction LoginCallbackPage() {\n const navigate = useNavigate();\n const { showErrorDialog } = useErrorBoundaryContext();\n const location = useMemo(() => new URL(window.location.href), []);\n const [returnUrl, setReturnUrl] = useState(null);\n const [sellerAccounts, setSellerAccounts] = useState(\n null\n );\n const [filteredSellerAccounts, setFilteredSellerAccounts] = useState<\n SellerAccount[]\n >([]);\n\n const { closeDialog, launchDialog, dialogProps } = useBasicDialog();\n\n const onSellerAccountPicked = useCallback(\n async (account: SellerAccount) => {\n await tryInvokeApi(\n async () => {\n await new LoginClient({}).setActiveAccount(\n account.id,\n account.impersonatedUserId\n );\n if (returnUrl) {\n navigate(returnUrl);\n }\n closeDialog();\n },\n (error) => {\n showErrorDialog('AdminClient.setActiveAccount', error, {\n trackErrorData: account,\n });\n }\n );\n },\n [closeDialog, navigate, returnUrl, showErrorDialog]\n );\n\n const onLoginCallback = useCallback(async () => {\n tryInvokeApi(\n async () => {\n const code = location.searchParams.get('code');\n const state = location.searchParams.get('state');\n if (code && state) {\n const loginContext = await new LoginClient(\n {}\n ).getLoginContextAfterAuthorization({\n code: location.searchParams.get('code') || '',\n state: location.searchParams.get('state') || '',\n }); // after we authorize we want to return here\n\n if (loginContext?.user?.hasManyAccounts) {\n const accounts = await new SellerAccountClient({\n activeAccountId: loginContext?.user?.activeAccount?.id,\n }).getCurrentUserSellerAccounts();\n setReturnUrl(loginContext.returnUrl);\n\n if (accounts) {\n const sorted = sortSellerAccount(accounts);\n setSellerAccounts(sorted);\n setFilteredSellerAccounts(sorted);\n launchDialog();\n } else {\n setSellerAccounts([]);\n setFilteredSellerAccounts([]);\n }\n } else if (loginContext?.returnUrl) {\n if (loginContext.returnUrl.startsWith('https://')) {\n // to be safe we should only redirect to full HTTPS\n window.location.assign(loginContext.returnUrl);\n } else {\n navigate(loginContext.returnUrl);\n }\n }\n }\n },\n (error) => {\n showErrorDialog(\n 'LoginClient.getLoginContextAfterAuthorization',\n error,\n {\n onDismissError: () => {\n window.location.assign('/unauthorized');\n },\n trackErrorData: {\n code: location.searchParams.get('code'),\n state: location.searchParams.get('state'),\n },\n }\n );\n }\n );\n }, [launchDialog, location.searchParams, navigate, showErrorDialog]);\n\n const onFilterSellerAccount = useCallback(\n (text: string) => {\n text = text.toLocaleUpperCase();\n const filtered = sellerAccounts?.filter(\n (sa) =>\n sa.accountName.toLocaleUpperCase().includes(text) ||\n sa.impersonatedUsername?.toLocaleUpperCase()?.includes(text) ||\n sa.id.toLocaleUpperCase().includes(text)\n );\n setFilteredSellerAccounts(filtered ?? []);\n },\n [sellerAccounts]\n );\n\n useEffect(() => {\n onLoginCallback();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return (\n
    \n {sellerAccounts == null ? (\n \n ) : (\n sellerAccounts.length == 0 && (\n }\n />\n )\n )}\n }\n resultItems={filteredSellerAccounts || []}\n renderItem={(account: SellerAccount) => (\n \n )}\n onResultItemPicked={onSellerAccountPicked}\n onResultItemSearched={onFilterSellerAccount}\n onCancel={undefined}\n />\n
    \n );\n}\n","import { useNavigate } from 'react-router-dom';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Button } from 'src/core/ui';\nimport { LayoutContent } from 'src/navigations/LayoutContent';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { MainRoute } from '../MainRoute';\nimport * as styles from './Login.css';\n\nexport function LoginFailure() {\n return (\n \n \n \n );\n}\n\nfunction LoginFailurePage() {\n const navigate = useNavigate();\n return (\n
    \n
    \n \n
    \n \n
    \n );\n}\n","import { useCallback, useEffect } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { Content } from 'src/contexts/ContentContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { Button } from 'src/core/ui';\nimport { LayoutContent } from 'src/navigations/LayoutContent';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ApiException, LoginClient, LoginContext } from 'src/WebApiController';\n\nimport { MainRoute } from '../MainRoute';\nimport * as styles from './Login.css';\n\nexport function Logout() {\n return (\n \n \n \n );\n}\n\nfunction LogoutPage() {\n const navigate = useNavigate();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const handleLoginContextForLogout = async (loginContext: LoginContext) => {\n if (loginContext?.user) {\n const loginContext = await new LoginClient({}).logout();\n\n if ((loginContext?.authorizationUrl?.length || 0) > 0) {\n const authUrl = new URL(loginContext.authorizationUrl!);\n\n window.location.assign(\n `${authUrl.protocol}//${authUrl.host}/logout?returnUrl=${window.location.href}`\n );\n }\n }\n };\n\n const onLoggingOut = useCallback(async () => {\n try {\n const existingContext = await new LoginClient({}).getLoginContext(\n '/logout'\n );\n handleLoginContextForLogout(existingContext);\n } catch (error) {\n // When getting a 401 response, we go this route\n try {\n const defaultLoginContext = JSON.parse(\n (error as ApiException)?.response\n ) as LoginContext;\n handleLoginContextForLogout(defaultLoginContext);\n } catch (jsonError) {\n showErrorDialog('LoginClient.logout', error as ErrorTypes, {\n trackErrorData: { jsonError },\n });\n }\n }\n }, [showErrorDialog]);\n\n useEffect(() => {\n onLoggingOut();\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return (\n
    \n \n
    \n );\n}\n","import { ReactNode, useState } from 'react';\nimport { useUnmount } from 'react-use';\nimport { Components, Virtuoso } from 'react-virtuoso';\nimport * as EmptySectionContent from 'src/components/common/EmptySectionContent';\nimport { ConnectedNotificationDisplay } from 'src/components/ConnectedNotificationDisplay';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useNotificationsContext } from 'src/contexts/NotificationsContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { ToolbarButton } from 'src/core/POS/ToolbarButton';\nimport { vars } from 'src/core/themes';\nimport { Card } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { LayoutContent } from 'src/navigations/LayoutContent';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Feature, NotificationType } from 'src/WebApiController';\n\nimport IconAlarmAdd from '~icons/pos/alarmAdd';\n\nimport { MainRoute } from '../MainRoute';\nimport * as styles from './Notifications.css';\n\ntype VirtuosoContext = {\n isLoading?: boolean;\n};\n\nconst notificationTypeSetMap = {\n newSales: new Set([NotificationType.SaleNew]),\n failures: new Set([\n NotificationType.SaleFulfilmentFailed,\n NotificationType.ListingHideSeatsFailed,\n NotificationType.ListingUpdateAllInPriceFailed,\n NotificationType.ListingUpdateInHandDateFailed,\n NotificationType.ListingUpdateSplitTypeFailed,\n NotificationType.ListingUpdateDeliveryTypeFailed,\n NotificationType.ListingUpdateUnitNetProceedsFailed,\n NotificationType.ListingBroadcastFailed,\n NotificationType.ListingUnbroadcastFailed,\n NotificationType.ListingMergeFailed,\n NotificationType.ListingSplitFailed,\n ]),\n autopricing: new Set([\n NotificationType.AutopriceBelowFloor,\n NotificationType.AutopriceInsufficientCompListings,\n NotificationType.AutopriceFirebrake,\n ]),\n messages: new Set([NotificationType.SellerSupportCaseNewReply]),\n cancellations: new Set([NotificationType.SaleMarketplaceCancelled]),\n};\n\nconst Header: Components['Header'] = () => {\n const hasAutoPricingFeature = useUserHasFeature(Feature.AutoPricing);\n\n const { setNotificationFilter } = useNotificationsContext();\n useUnmount(() => {\n setNotificationFilter({});\n });\n\n const [selectedQuickFilterId, setSelectedQuickFilterId] = useState<\n string | null\n >(null);\n\n const quickFilters: {\n id: string;\n name: ReactNode;\n onClick: () => void;\n }[] = [\n {\n id: 'newSales',\n name: ,\n onClick: () => {\n setNotificationFilter({\n type: notificationTypeSetMap.newSales,\n });\n },\n },\n {\n id: 'failures',\n name: ,\n onClick: () => {\n setNotificationFilter({\n type: notificationTypeSetMap.failures,\n });\n },\n },\n {\n id: 'messages',\n name: ,\n onClick: () => {\n setNotificationFilter({\n type: notificationTypeSetMap.messages,\n });\n },\n },\n {\n id: 'cancellations',\n name: ,\n onClick: () => {\n setNotificationFilter({\n type: notificationTypeSetMap.cancellations,\n });\n },\n },\n ];\n\n if (hasAutoPricingFeature) {\n quickFilters.push({\n id: 'autopricing',\n name: ,\n onClick: () => {\n setNotificationFilter({\n type: notificationTypeSetMap.autopricing,\n });\n },\n });\n }\n\n return (\n
    \n

    \n \n

    \n
    \n {\n setSelectedQuickFilterId(null);\n setNotificationFilter({});\n }}\n >\n \n \n {quickFilters.map(({ id, name, onClick }) => (\n {\n setSelectedQuickFilterId(id);\n onClick();\n }}\n >\n {name}\n \n ))}\n
    \n
    \n );\n};\n\n// XXX hack to prevent margin collapse on last element\nconst Footer = () => {\n return
    ;\n};\n\nconst EmptyPlaceholder: Components<\n unknown,\n VirtuosoContext\n>['EmptyPlaceholder'] = ({ context }: { context?: VirtuosoContext }) => {\n const { noResultsForNotificationFilter } = useNotificationsContext();\n if (context?.isLoading) {\n return ;\n }\n return (\n }\n >\n {noResultsForNotificationFilter ? (\n \n ) : (\n \n )}\n \n );\n};\n\nexport function Notifications() {\n const notificationsTitle = useContent(ContentId.Notifications);\n const { notifications, notificationsIsInitialLoading, dismissNotification } =\n useNotificationsContext();\n\n return (\n \n {\n return (\n
    \n \n {\n dismissNotification(notification.notificationId);\n }}\n />\n \n
    \n );\n }}\n />\n \n );\n}\n","import {\n createContext,\n PropsWithChildren,\n useCallback,\n useContext,\n useMemo,\n} from 'react';\nimport { useOnSaleEvents } from 'src/hooks/api/useOnSaleEvents';\nimport { OnSaleEventWithMetrics } from 'src/navigations/Routes/OnSaleEvent/OnSaleEventView.types';\nimport { OnSaleEventMetrics, OnSaleEventQuery } from 'src/WebApiController';\n\nimport { useFilterQueryContext } from '../FilterQueryContext';\n\nexport interface IEventDiscoveryContext {\n onSaleEvents: OnSaleEventWithMetrics[];\n isLoading: boolean;\n searchText: string | undefined;\n setSearchText: (value: string | null) => void;\n}\n\nconst emptyContext: IEventDiscoveryContext = {\n onSaleEvents: [],\n isLoading: false,\n setSearchText: () => {},\n searchText: undefined,\n};\n\nconst EventDiscoveryContext =\n createContext(emptyContext);\n\nexport const useEventDiscoveryContext = () => useContext(EventDiscoveryContext);\n\nexport const EventDiscoveryContextProvider = ({\n children,\n}: PropsWithChildren) => {\n const { filterQuery, setFilterQuery } =\n useFilterQueryContext();\n const { onSaleEventMetrics, onSaleEvents, isLoading } =\n useOnSaleEvents(filterQuery);\n\n const mergedEvents = useMemo(() => {\n if (!onSaleEvents) {\n return [];\n }\n const { events, performers, venues } = onSaleEvents;\n const mergedEvents: OnSaleEventWithMetrics[] = Object.entries(events).map(\n ([_, { event }]) => {\n return {\n event: event,\n performer: event.perfId ? performers[event.perfId] : undefined,\n venue: event.venueId ? venues[event.venueId] : undefined,\n };\n }\n );\n\n if (onSaleEventMetrics) {\n const metricsById = onSaleEventMetrics.reduce(\n (res, metrics) => {\n res[metrics.eventId] = metrics;\n return res;\n },\n {} as Record\n );\n for (const onSaleEvent of mergedEvents) {\n if (onSaleEvent.event.viagId) {\n const metrics = metricsById[onSaleEvent.event.viagId];\n if (metrics) {\n Object.assign(onSaleEvent, {\n metrics,\n });\n }\n }\n }\n }\n\n return mergedEvents;\n }, [onSaleEventMetrics, onSaleEvents]);\n\n const setSearchText = useCallback(\n (text: string | null) => {\n setFilterQuery({\n ...filterQuery,\n searchText: text,\n });\n },\n [filterQuery, setFilterQuery]\n );\n\n return (\n \n {children}\n \n );\n};\n","import * as Sentry from '@sentry/react';\nimport {\n ColumnDef,\n functionalUpdate,\n GroupingState,\n InitialTableState,\n Row,\n RowSelectionState,\n SortingState,\n TableOptions,\n Updater,\n} from '@tanstack/react-table';\nimport { isEmpty } from 'lodash-es';\nimport {\n CSSProperties,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n Content,\n FormatContent,\n useContent,\n} from 'src/contexts/ContentContext';\nimport {\n MultiSelectScope,\n useMultiSelectionContext,\n} from 'src/contexts/MultiSelectionContext';\nimport { useClearShiftSelectionOnSortingChange } from 'src/contexts/MultiSelectionContext/useClearShiftSelectionOnSortingChange';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport { NoData, Table } from 'src/tables/Table';\nimport {\n defaultOnSaleEventsColumnsConfig,\n filterColumnsByFeatures,\n getOnSaleEventsColumnConfigById,\n} from 'src/utils/columns/columnUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport { hasFeatures } from 'src/utils/userUtils';\nimport { SomethingWentWrong } from 'src/views';\nimport { Feature, UserSetting } from 'src/WebApiController';\n\nimport { ON_SALE_EVENTS_TABLE_COLUMNS_CONFIG } from './OnSaleEventView.constants';\nimport {\n OnSaleEventsTableColumnId,\n OnSaleEventWithMetrics,\n} from './OnSaleEventView.types';\n\nexport type OnSaleEventTableProps = {\n highlightedId?: string;\n failedToRetrieveData: boolean;\n onMount?: () => void;\n onUnmount?: (state: object) => void;\n initState?: InitialTableState;\n useVirtuoso?: boolean;\n useDataGrouping?: boolean;\n withOuterPadding?: boolean;\n tableHeadStyle?: CSSProperties;\n isLoading?: boolean;\n events: OnSaleEventWithMetrics[];\n};\n\nconst getRowId = (originalRow: OnSaleEventWithMetrics | null): string => {\n return (originalRow as OnSaleEventWithMetrics)?.event?.viagVirtualId ?? '';\n};\n\nexport const OnSaleEventTable = ({\n highlightedId,\n failedToRetrieveData,\n onMount,\n onUnmount,\n initState,\n useVirtuoso,\n useDataGrouping,\n withOuterPadding,\n tableHeadStyle,\n events,\n isLoading,\n}: OnSaleEventTableProps) => {\n const { appContext, loginContext } = useAppContext();\n const { getSelection, selectionMode, setGroupStates } =\n useMultiSelectionContext();\n const eventSelection = getSelection();\n\n const viewedEventIdsRef = useRef([]);\n\n const hasTablePinActionColumnFeature = useUserHasFeature(\n Feature.TablePinActionColumn\n );\n const eventsText = useContent(ContentId.Events);\n\n // Enable passing in table state as parameters -- we can remount with the last state the user was on\n const [sorting, setSorting] = useState(\n initState?.sorting || []\n );\n const [grouping, setGrouping] = useState(\n initState?.grouping || []\n );\n\n useClearShiftSelectionOnSortingChange({ sortingState: sorting });\n\n useEffect(() => {\n onMount?.();\n });\n\n useEffect(() => {\n /**\n * Intent for `onMount` is use with 'windowing' in order to maintain user state\n * when the component is scrolled back into view.\n * Anything that needs to be persisted in `react-table` state should be added here.\n * Only update on unmount to ensure we aren't doing too many re-renders.\n */\n return () => onUnmount?.({ sorting });\n }, [sorting, onUnmount]);\n\n const {\n value: storedEventsColumnOrderSetting = defaultOnSaleEventsColumnsConfig,\n } = useServerUserSetting({\n id: UserSetting.OnSaleEventColumnsOrder,\n });\n const { value: storedEventsColumnsEnabledSetting } = useServerUserSetting<\n string[]\n >({\n id: UserSetting.OnSaleEventColumnsEnabled,\n });\n\n const displayedColumnsConfig = useMemo(() => {\n const eventsColumnOrder = storedEventsColumnOrderSetting.filter(\n // If storedEventsColumnsEnabledSetting has never been set, default to true\n (c) => storedEventsColumnsEnabledSetting?.includes(c) ?? true\n );\n\n if (\n !hasTablePinActionColumnFeature &&\n !eventsColumnOrder.includes(OnSaleEventsTableColumnId.Action)\n ) {\n eventsColumnOrder.push(OnSaleEventsTableColumnId.Action);\n }\n const columns = new Set([\n // Add unconfigurable columns first\n ...Object.values(ON_SALE_EVENTS_TABLE_COLUMNS_CONFIG)\n .filter((column) => {\n const columnDef = getOnSaleEventsColumnConfigById(\n column.id as OnSaleEventsTableColumnId\n ).personalization;\n const hasFeatureForColumn =\n columnDef.requiredFeatures.length === 0 ||\n hasFeatures(\n loginContext?.user,\n appContext?.features,\n columnDef.requiredFeatures\n );\n\n let isConfigurable = columnDef.isConfigurable;\n if (\n !hasTablePinActionColumnFeature &&\n column.id === OnSaleEventsTableColumnId.Action\n ) {\n isConfigurable = true;\n }\n\n return !isConfigurable && hasFeatureForColumn;\n })\n .map((item) => item.id as OnSaleEventsTableColumnId),\n // Add user defined columns next\n ...filterColumnsByFeatures(\n eventsColumnOrder,\n SectionType.Events,\n undefined,\n loginContext?.user,\n appContext?.features\n ),\n ]);\n\n return Array.from(columns).reduce<\n ColumnDef[]\n >((acc, columnId) => {\n const columnConfig = Object.values(\n ON_SALE_EVENTS_TABLE_COLUMNS_CONFIG\n ).find((column) => column.id === columnId);\n if (columnConfig) acc.push(columnConfig);\n return acc;\n }, []);\n }, [\n appContext?.features,\n hasTablePinActionColumnFeature,\n loginContext?.user,\n storedEventsColumnOrderSetting,\n storedEventsColumnsEnabledSetting,\n ]);\n\n const rowSelection = useMemo(() => {\n if (!selectionMode && highlightedId) {\n return {\n [highlightedId]: true,\n };\n }\n return eventSelection.groupIds.reduce>(\n (acc, eventId) => {\n acc[eventId] = true;\n return acc;\n },\n {}\n );\n }, [highlightedId, eventSelection.groupIds, selectionMode]);\n\n const onRowSelectionChanged = useCallback(\n (updater: Updater) => {\n const newSelections =\n typeof updater === 'function' ? updater(rowSelection) : updater;\n const newSelectedIds = Object.keys(newSelections).filter(\n (r) => newSelections[r] === true\n );\n if (!selectionMode) {\n newSelectedIds.forEach((id) => {\n if (rowSelection[id] && newSelections[id]) {\n // if both of these are the same value and is true, we need to set it to false\n newSelections[id] = false;\n }\n });\n }\n setGroupStates(newSelections);\n },\n [rowSelection, selectionMode, setGroupStates]\n );\n\n const showCheckbox = selectionMode?.mode === MultiSelectScope.AllGroups;\n\n const options: Partial> = useMemo(\n () => ({\n data: events,\n columns: displayedColumnsConfig,\n state: {\n expanded: useDataGrouping ? true : undefined,\n grouping,\n sorting,\n rowSelection,\n columnVisibility: {\n checkbox: showCheckbox,\n },\n columnPinning: {\n right: hasTablePinActionColumnFeature\n ? [OnSaleEventsTableColumnId.Action]\n : undefined,\n },\n },\n onGroupingChange: setGrouping,\n getRowId: getRowId,\n onRowSelectionChange: onRowSelectionChanged,\n onSortingChange: (sortingUpdaterFn: any) => {\n const newSortVal = functionalUpdate(sortingUpdaterFn, sorting);\n setSorting(newSortVal);\n },\n enableRowSelection: showCheckbox,\n enableMultiRowSelection: showCheckbox,\n enableGrouping: !!useDataGrouping,\n }),\n [\n events,\n displayedColumnsConfig,\n useDataGrouping,\n grouping,\n sorting,\n rowSelection,\n showCheckbox,\n hasTablePinActionColumnFeature,\n onRowSelectionChanged,\n ]\n );\n\n const allEventMetricsLoaded = useMemo(\n () => events.every((event) => event.metrics != null),\n [events]\n );\n\n const onItemsRendered = useCallback(\n (rows: Row[]) => {\n // This callback is rendered on the change of what user sees in the vituosso\n // which can be changed with the sorting, even before all metrics are loaded\n // Avoid logging sentry spans when event are not fully loaded\n if (!allEventMetricsLoaded) return;\n\n const viewedEventIds = viewedEventIdsRef.current;\n // Ensure to only log the different event ids\n const renderedEventIds = rows\n .map((row) => row?.original?.event?.viagId ?? null)\n .filter((id: number | null): id is number => id != null)\n .filter((id) => !viewedEventIds.includes(id));\n if (isEmpty(renderedEventIds)) return;\n\n const span = Sentry.startSpan(\n { name: 'Event Discovery', op: 'event_viewed' },\n (span: Sentry.Span) => {\n span.setAttribute('event_ids', Array.from(new Set(renderedEventIds)));\n return span;\n }\n );\n viewedEventIdsRef.current = [...viewedEventIds, ...renderedEventIds];\n span.end();\n },\n [allEventMetricsLoaded]\n );\n\n if (failedToRetrieveData) {\n return (\n }\n />\n );\n }\n\n if (isLoading) {\n return ;\n }\n\n return events.length > 0 ? (\n \n ) : (\n // We should never see this - because the events are filtered to only those that has sales\n // So this is to prevent a crash - but this should be looked at\n \n \n \n );\n};\n","import { CSSProperties, MouseEvent, ReactNode, useEffect } from 'react';\nimport { useToggle } from 'react-use';\nimport { useEventFlattedViewSelectedLegend } from 'src/components/Events/EventListing/useEventFlattedViewSelectedLegend';\nimport { ActiveSortTableColumnProvider } from 'src/contexts/ActiveSortTableColumnContext';\nimport { ColumnResizingContextProvider } from 'src/contexts/ColumnResizingContext/ColumnResizingContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useEventDiscoveryContext } from 'src/contexts/EventDiscoveryContext/EventDiscoveryContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { ColumnSettingsModal } from 'src/modals/ColumnSettings/ColumnSettings';\nimport { LayoutIcon } from 'src/svgs';\nimport { CustomOnSaleEventsColumn } from 'src/utils/columns/events/eventsCustomColumnUtils.types';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport { UserSetting } from 'src/WebApiController';\n\nimport { OnSaleEventTable } from './OnSaleEventTable';\nimport * as styles from './OnSaleEventView.css';\nimport { OnSaleEventsTableColumnId } from './OnSaleEventView.types';\n\ntype OnSaleEventViewProps = {};\n\nexport const OnSaleEventView: React.FC = () => {\n const [isColumnModalOpen, toggleColumnModal] = useToggle(false);\n\n const onColumnSettingButtonClickHandler = (\n e: MouseEvent\n ) => {\n e.stopPropagation();\n if (!isColumnModalOpen) toggleColumnModal(true);\n };\n\n return (\n \n \n {isColumnModalOpen ? (\n \n onClose={toggleColumnModal}\n sectionType={SectionType.OnSaleEvents}\n />\n ) : null}\n\n \n \n \n \n }\n />\n \n \n );\n};\n\nconst posTableHeadStyle: CSSProperties = {\n position: 'sticky',\n top: '0',\n};\n\ninterface EventsTableWithInnerGroupingProps {\n columnSettingButton?: ReactNode;\n}\n\nconst OnSaleEventTableWithInnerGrouping = ({\n columnSettingButton,\n}: EventsTableWithInnerGroupingProps) => {\n const { isLoading, onSaleEvents } = useEventDiscoveryContext();\n return (\n \n {/* \n \n \n \n \n */}\n \n {columnSettingButton}\n \n \n \n );\n};\n\nexport const SetOnSaleEventViewSelectionCountLabel = ({\n children,\n}: React.PropsWithChildren) => {\n const eventText = useContent(ContentId.Event);\n const eventsText = useContent(ContentId.Events);\n const { setSelectedCountLabel, setUsingCustomSelectedCountLabel } =\n useMultiSelectionContext();\n\n useEffect(() => {\n setUsingCustomSelectedCountLabel(true);\n }, [setUsingCustomSelectedCountLabel]);\n\n const selectedLegend = useEventFlattedViewSelectedLegend({\n singleElementLabel: eventText,\n multipleElementsLabel: eventsText,\n });\n\n useEffect(() => {\n setSelectedCountLabel(selectedLegend);\n }, [selectedLegend, setSelectedCountLabel]);\n\n return <>{children};\n};\n","import { MainFilterBar } from 'src/components/MainFilterBar';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { DialogProvider } from 'src/contexts/DialogContext/DialogContext';\nimport { EventDiscoveryContextProvider } from 'src/contexts/EventDiscoveryContext/EventDiscoveryContext';\nimport { FilterQueryContextProvider } from 'src/contexts/FilterQueryContext';\nimport { MultiSelectionContextProvider } from 'src/contexts/MultiSelectionContext';\nimport { SellerUserSettingsProvider } from 'src/contexts/SellerUserSettingsContext';\nimport { LayoutContent } from 'src/navigations/LayoutContent';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n DefaultOnSaleEventQuery,\n EmptyOnSaleEventQuery,\n} from 'src/utils/eventQueryUtils';\nimport { OnSaleEventQuery, UserSetting } from 'src/WebApiController';\n\nimport { MainRoute } from '../MainRoute';\nimport { OnSaleEventView } from './OnSaleEventView';\n\nexport const DISCOVERY_USER_SETTINGS = [\n UserSetting.QuickFiltersStateOnSaleEvent,\n UserSetting.QuickFiltersCustomOnSaleEvent,\n UserSetting.OnSaleEventColumnEditability,\n UserSetting.OnSaleEventColumnNumberPrecision,\n UserSetting.OnSaleEventColumnsEnabled,\n UserSetting.OnSaleEventColumnsOrder,\n UserSetting.OnSaleEventColumnsWidths,\n UserSetting.OnSaleEventCustomColumns,\n];\n\nexport function OnSaleEvent() {\n const title = useContent(ContentId.EventDiscovery);\n return (\n \n \n initialQuery={DefaultOnSaleEventQuery}\n emptyQuery={EmptyOnSaleEventQuery}\n saveQueryInUrl\n >\n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n","import { useMemo } from 'react';\nimport { useMarketplacePaymentsTableColumnsConfig } from 'src/tables/MarketplacePaymentsTable/useMarketplacePaymentsTableColumnsConfig';\nimport { MarketplacePaymentsTableColumnId } from 'src/utils/columns/marketplacePayments/marketplacePaymentsColumnsUtils.types';\n\nexport const useGetMarketplaceDefaultColumnsConfig =\n (): MarketplacePaymentsTableColumnId[] => {\n const paymentsTableColumnConfig =\n useMarketplacePaymentsTableColumnsConfig();\n return useMemo(\n () =>\n Object.values(paymentsTableColumnConfig).map(\n (column) => column.id as MarketplacePaymentsTableColumnId\n ),\n [paymentsTableColumnConfig]\n );\n };\n","import { ColumnDef } from '@tanstack/react-table';\nimport { useMemo } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport { useGetMarketplaceDefaultColumnsConfig } from 'src/tables/MarketplacePaymentsTable/useGetMarketplaceDefaultColumnsConfig';\nimport { useMarketplacePaymentsTableColumnsConfig } from 'src/tables/MarketplacePaymentsTable/useMarketplacePaymentsTableColumnsConfig';\nimport {\n filterColumnsByFeatures,\n getMarketplacePaymentColumnConfigById,\n} from 'src/utils/columns/columnUtils';\nimport { MarketplacePaymentsTableColumnId } from 'src/utils/columns/marketplacePayments/marketplacePaymentsColumnsUtils.types';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport { hasFeatures } from 'src/utils/userUtils';\nimport {\n Feature,\n MarketplaceSalePayment,\n UserSetting,\n} from 'src/WebApiController';\n\nexport const useGetDisplayMarketplacePaymentsTableColumns = () => {\n const defaultMarketplaceColumnsConfig =\n useGetMarketplaceDefaultColumnsConfig();\n const paymentsTableColumnConfig = useMarketplacePaymentsTableColumnsConfig();\n const { appContext, loginContext } = useAppContext();\n const hasTablePinActionColumnFeature = useUserHasFeature(\n Feature.TablePinActionColumn\n );\n const {\n value:\n storedMarketplacePaymentsColumnOrderSetting = defaultMarketplaceColumnsConfig,\n } = useServerUserSetting({\n id: UserSetting.MarketplacePaymentsTableColumnOrder,\n });\n\n const { value: storedMarketplacePaymentsColumnsEnabledSetting } =\n useServerUserSetting({\n id: UserSetting.MarketplacePaymentsTableColumnsEnabled,\n });\n\n return useMemo(() => {\n const marketplacePaymentColumnOrder =\n storedMarketplacePaymentsColumnOrderSetting.filter(\n (c) =>\n storedMarketplacePaymentsColumnsEnabledSetting?.includes(c) ?? true\n );\n\n const marketplacePaymentsTableColumnsConfig = Object.values(\n paymentsTableColumnConfig\n );\n\n const columns = new Set([\n // Add unconfigurable columns first\n ...marketplacePaymentsTableColumnsConfig\n .filter((column) => {\n const columnDef = getMarketplacePaymentColumnConfigById(\n column.id as MarketplacePaymentsTableColumnId\n ).personalization;\n const hasFeatureForColumn =\n columnDef.requiredFeatures.length === 0 ||\n hasFeatures(\n loginContext?.user,\n appContext?.features,\n columnDef.requiredFeatures\n );\n\n let isConfigurable = columnDef.isConfigurable;\n if (\n !hasTablePinActionColumnFeature &&\n column.id === MarketplacePaymentsTableColumnId.Actions\n ) {\n isConfigurable = true;\n }\n\n return !isConfigurable && hasFeatureForColumn;\n })\n .map((item) => item.id as MarketplacePaymentsTableColumnId),\n // Add user defined columns next\n ...filterColumnsByFeatures(\n marketplacePaymentColumnOrder,\n SectionType.MarketplacePaymentsTable,\n [],\n loginContext?.user,\n appContext?.features,\n []\n ),\n ]);\n\n return Array.from(columns).reduce<\n ColumnDef[]\n >((acc, columnId) => {\n const columnConfig = marketplacePaymentsTableColumnsConfig.find(\n (column) => column.id === columnId\n );\n if (columnConfig) acc.push(columnConfig);\n\n return acc;\n }, []);\n }, [\n appContext?.features,\n hasTablePinActionColumnFeature,\n loginContext?.user,\n paymentsTableColumnConfig,\n storedMarketplacePaymentsColumnOrderSetting,\n storedMarketplacePaymentsColumnsEnabledSetting,\n ]);\n};\n","import {\n functionalUpdate,\n SortingState,\n TableOptions,\n} from '@tanstack/react-table';\nimport { useMemo, useState } from 'react';\nimport { ColumnResizingContextProvider } from 'src/contexts/ColumnResizingContext/ColumnResizingContext';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { useGetDisplayMarketplacePaymentsTableColumns } from 'src/tables/MarketplacePaymentsTable/useGetDisplayMarketplacePaymentsTableColumns';\nimport { Table } from 'src/tables/Table';\nimport { MarketplacePaymentsTableColumnId } from 'src/utils/columns/marketplacePayments/marketplacePaymentsColumnsUtils.types';\nimport {\n Feature,\n MarketplaceSalePayment,\n UserSetting,\n} from 'src/WebApiController';\n\nconst getRowId = (row: MarketplaceSalePayment | null, index: number) =>\n (row?.id ?? index).toString();\n\ninterface PaymentsTableProps {\n tableData: MarketplaceSalePayment[] | null;\n}\n\nexport const MarketplacePaymentsTable = ({ tableData }: PaymentsTableProps) => {\n const hasTablePinActionColumnFeature = useUserHasFeature(\n Feature.TablePinActionColumn\n );\n const paymentsTableColumnConfig =\n useGetDisplayMarketplacePaymentsTableColumns();\n const [sorting, setSorting] = useState([\n {\n id: MarketplacePaymentsTableColumnId.PaymentDate,\n desc: true,\n },\n ]);\n\n const options: Partial> = useMemo(\n () => ({\n data: tableData ?? [],\n columns: Object.values(paymentsTableColumnConfig),\n state: {\n sorting,\n columnPinning: {\n right: hasTablePinActionColumnFeature\n ? [MarketplacePaymentsTableColumnId.Actions]\n : undefined,\n },\n },\n getRowId: getRowId,\n onSortingChange: (sortingUpdaterFn) => {\n const newSortVal = functionalUpdate(sortingUpdaterFn, sorting);\n setSorting(newSortVal);\n },\n sortingFns: {},\n }),\n [\n tableData,\n paymentsTableColumnConfig,\n sorting,\n hasTablePinActionColumnFeature,\n ]\n );\n\n return (\n \n \n \n );\n};\n","import { format } from 'date-fns';\nimport { useMemo } from 'react';\nimport { useSingleMonthMarketplacePaymentsQuery } from 'src/contexts/MarketplacePaymentDataContext';\nimport { MarketplacePaymentsTable } from 'src/tables/MarketplacePaymentsTable/MarketplacePaymentsTable';\n\ninterface GroupedPaymentsAccordionBodyProps {\n firstOfMonth: string;\n}\n\nexport const GroupedPaymentsAccordionBody = ({\n firstOfMonth,\n}: GroupedPaymentsAccordionBodyProps) => {\n const queryDate = useMemo(\n () => format(new Date(firstOfMonth), 'yyyy-MM-dd'),\n [firstOfMonth]\n );\n\n const { singleMonthPaymentQuery } = useSingleMonthMarketplacePaymentsQuery(\n queryDate,\n true\n );\n\n return (\n \n );\n};\n","import { format } from 'date-fns';\nimport { useMemo } from 'react';\nimport { Stack } from 'src/core/ui';\nimport { formatCurrency } from 'src/utils/numberFormatter';\nimport { MonthContainingMarketplacePaymentsResult } from 'src/WebApiController';\n\nimport * as styles from './GroupedPaymentsAccordionHeader.css';\n\ninterface PaymentsAccordionHeaderProps {\n monthContainingMarketplacePayment: MonthContainingMarketplacePaymentsResult;\n}\n\nexport const GroupedPaymentsAccordionHeader = ({\n monthContainingMarketplacePayment,\n}: PaymentsAccordionHeaderProps) => {\n const displayText = useMemo(() => {\n const { totalPaymentAmount } = monthContainingMarketplacePayment;\n return {\n displayDate: format(\n new Date(monthContainingMarketplacePayment.firstOfMonth),\n 'MMMM, yyyy'\n ),\n formattedAmount: formatCurrency(\n totalPaymentAmount?.amt,\n totalPaymentAmount?.currency,\n totalPaymentAmount?.dec\n ),\n };\n }, [monthContainingMarketplacePayment]);\n\n return (\n \n
    {displayText.displayDate}
    \n
    {displayText.formattedAmount}
    \n
    \n );\n};\n","import { useCallback, useMemo } from 'react';\nimport { GroupedPaymentsAccordionBody } from 'src/components/MarketplacePayments/Tabs/components/GroupedPaymentsAccordionBody';\nimport { GroupedPaymentsAccordionHeader } from 'src/components/MarketplacePayments/Tabs/components/GroupedPaymentsAccordionHeader';\nimport * as PosCollapsible from 'src/core/POS/PosCollapsible';\nimport { MonthContainingMarketplacePaymentsResult } from 'src/WebApiController';\nimport * as styles from './GroupedPaymentsAccordion.css';\n\nexport type GroupedPaymentsAccordionProps = {\n item: MonthContainingMarketplacePaymentsResult;\n selectedIds: string[];\n onSelect: (id: string) => void;\n};\n\nexport const GroupedPaymentsAccordion = ({\n item,\n selectedIds,\n onSelect,\n}: GroupedPaymentsAccordionProps) => {\n const { firstOfMonth } = item;\n\n const isAccordionOpen = useMemo(\n () => selectedIds.includes(firstOfMonth),\n [firstOfMonth, selectedIds]\n );\n\n const onOpenChange = useCallback(() => {\n onSelect(firstOfMonth);\n }, [firstOfMonth, onSelect]);\n\n return (\n
    \n \n \n \n \n \n \n \n \n
    \n );\n};\n","import { Virtuoso } from 'react-virtuoso';\nimport * as EmptySectionContent from 'src/components/common/EmptySectionContent';\nimport { GroupedPaymentsAccordion } from 'src/components/MarketplacePayments/Tabs/components/GroupedPaymentsAccordion';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { useMarketplacePaymentDataContext } from 'src/contexts/MarketplacePaymentDataContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { SearchSolidIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SomethingWentWrong } from 'src/views';\nimport { MarketplacePaymentQuery } from 'src/WebApiController';\n\nexport const MarketplacePaymentsTabContent = () => {\n const { isQueryInitialized } =\n useFilterQueryContext();\n\n const { monthPaymentsQuery, errorInfo, selectedIds, onSelect } =\n useMarketplacePaymentDataContext();\n\n const dataIsLoading =\n !isQueryInitialized ||\n monthPaymentsQuery.isLoading ||\n monthPaymentsQuery.data == null;\n\n const hasData = monthPaymentsQuery.data?.length;\n\n return (\n <>\n {dataIsLoading && }\n {errorInfo && (\n \n )\n }\n />\n )}\n {!dataIsLoading && !errorInfo && (\n <>\n {hasData ? (\n <>\n {monthPaymentsQuery.data && (\n (\n \n )}\n />\n )}\n \n ) : (\n \n \n \n }\n >\n \n \n \n \n )}\n \n )}\n \n );\n};\n","import { MarketplacePaymentsTabContent } from 'src/components/MarketplacePayments/Tabs/MarketplacePaymentsTabContent';\nimport { MarketplacePaymentDataContextProvider } from 'src/contexts/MarketplacePaymentDataContext';\n\nexport const MarketplacePaymentsTab = () => {\n return (\n \n \n \n );\n};\n","import { ReactNode, useContext, useEffect, useRef } from 'react';\nimport { useGetMarketplacePaymentIdQueryParam } from 'src/components/MarketplacePayments/hooks/useGetMarketplacePaymentIdQueryParam';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { getMarketplacePaymentDetailsModalConfigWithDeepLink } from 'src/utils/marketplacePaymentUtils';\n\ninterface ModalRefProps {\n isModalOpen: boolean;\n closeModal: () => void;\n}\n\ninterface MarketplacePaymentDeeplinkListenerProps {\n children: ReactNode;\n}\n\nexport const MarketplacePaymentDeeplinkListener = ({\n children,\n}: MarketplacePaymentDeeplinkListenerProps) => {\n const { setModal, closeModal, isModalOpen } = useContext(ModalContext);\n const marketplacePaymentId = useGetMarketplacePaymentIdQueryParam();\n const modalRefProps: ModalRefProps = {\n isModalOpen,\n closeModal,\n };\n\n const ref = useRef(modalRefProps);\n ref.current = modalRefProps;\n\n useEffect(() => {\n if (marketplacePaymentId && !isModalOpen) {\n setModal(\n getMarketplacePaymentDetailsModalConfigWithDeepLink(\n marketplacePaymentId\n )\n );\n }\n }, [closeModal, isModalOpen, marketplacePaymentId, setModal]);\n\n // Close modal on unmount\n useEffect(() => {\n return () => {\n if (ref.current?.isModalOpen) {\n ref.current?.closeModal();\n }\n };\n }, []);\n\n return <>{children};\n};\n","import { isEqual } from 'lodash-es';\nimport { useMemo } from 'react';\nimport { FilterToolbarItemId } from 'src/components/Filters';\nimport { CurrencyFilterMultiSelector } from 'src/components/Selectors/CurrencyFilterSelector';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { DateRangeSelector } from 'src/core/POS/DateRangeSelector';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n MARKET_PLACE_TO_CID,\n MARKETPLACE_SALE_PAYMENT_STATE_TO_CID,\n YES_NO_ENUM_FILTER_TO_CID,\n} from 'src/utils/constants/contentIdMaps';\nimport { PurchaseDateRangePresetNames } from 'src/utils/dateTimeUtils';\nimport { FromYesNoEnum, ToYesNoEnum } from 'src/utils/eventQueryUtils';\nimport {\n Feature,\n Marketplace,\n MarketplacePaymentQuery,\n} from 'src/WebApiController';\n\nexport const useMarketplacePaymentsFilters = () => {\n const { loginContext } = useAppContext();\n const { tempQuery, setTempQuery } =\n useFilterQueryContext();\n\n const hasMarketplacePaymentFilterUnlinkedFeature = useUserHasFeature(\n Feature.MarketplacePaymentFilterUnlinked\n );\n\n return useMemo(() => {\n return {\n filters: [\n {\n titleContentId: ContentId.Payment,\n type: 'row',\n items: [\n {\n labelContentId: ContentId.PaymentDate,\n filterId: 'paymentDates' as FilterToolbarItemId,\n filterQueryKeys: ['paymentDates'] as FilterToolbarItemId[],\n filterItem: (\n \n setTempQuery({\n ...tempQuery,\n paymentDates: value,\n })\n }\n useRelativePresets\n />\n ),\n },\n ...(hasMarketplacePaymentFilterUnlinkedFeature\n ? [\n {\n labelContentId: ContentId.HasUnmappedSales,\n filterId:\n 'hasPaymentLineUnmappedToSale' as FilterToolbarItemId,\n filterQueryKeys: [\n 'hasPaymentLineUnmappedToSale',\n ] as FilterToolbarItemId[],\n filterItem: (\n {\n if (\n yesNoEnumValue !==\n ToYesNoEnum(tempQuery.hasPaymentLineUnmappedToSale)\n ) {\n setTempQuery({\n ...tempQuery,\n hasPaymentLineUnmappedToSale:\n FromYesNoEnum(yesNoEnumValue),\n });\n }\n }}\n valueOptionsContent={YES_NO_ENUM_FILTER_TO_CID}\n />\n ),\n },\n {\n labelContentId: ContentId.HasUnlinkedChargesCredits,\n filterId:\n 'hasPaymentLineUnmappedToSaleLineItem' as FilterToolbarItemId,\n filterQueryKeys: [\n 'hasPaymentLineUnmappedToSaleLineItem',\n ] as FilterToolbarItemId[],\n filterItem: (\n {\n if (\n yesNoEnumValue !==\n ToYesNoEnum(\n tempQuery.hasPaymentLineUnmappedToSaleLineItem\n )\n ) {\n setTempQuery({\n ...tempQuery,\n hasPaymentLineUnmappedToSaleLineItem:\n FromYesNoEnum(yesNoEnumValue),\n });\n }\n }}\n valueOptionsContent={YES_NO_ENUM_FILTER_TO_CID}\n />\n ),\n },\n ]\n : []),\n {\n filterId: 'marketplace' as FilterToolbarItemId,\n labelContentId: ContentId.Marketplace,\n filterQueryKeys: ['marketplace'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (marketplace !== tempQuery.marketplace) {\n setTempQuery({\n ...tempQuery,\n marketplace,\n });\n }\n }}\n valueOptionsContent={(\n loginContext?.user?.activeAccount?.marketplaceSettings?.map(\n (m) => m.mkp\n ) ?? [Marketplace.StubHub]\n )\n .concat(Marketplace.Offline)\n .reduce(\n (cur, m) => {\n cur[m] = MARKET_PLACE_TO_CID[m];\n return cur;\n },\n {} as Record\n )}\n />\n ),\n },\n {\n filterId: 'marketplacePaymentState' as FilterToolbarItemId,\n labelContentId: ContentId.PaymentState,\n filterQueryKeys: [\n 'marketplacePaymentState',\n ] as FilterToolbarItemId[],\n filterItem: (\n {\n if (\n marketplacePaymentState !==\n tempQuery.marketplacePaymentState\n ) {\n setTempQuery({\n ...tempQuery,\n marketplacePaymentState,\n });\n }\n }}\n valueOptionsContent={MARKETPLACE_SALE_PAYMENT_STATE_TO_CID}\n />\n ),\n },\n {\n filterId: 'currencyCodes' as FilterToolbarItemId,\n labelContentId: ContentId.Currency,\n filterQueryKeys: ['currencyCodes'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (!isEqual(tempQuery.currencyCodes, newCurrencyCodes)) {\n setTempQuery({\n ...tempQuery,\n currencyCodes: newCurrencyCodes?.length\n ? newCurrencyCodes\n : null,\n });\n }\n }}\n enableEmptySelection\n />\n ),\n },\n ],\n },\n ],\n };\n }, [\n hasMarketplacePaymentFilterUnlinkedFeature,\n loginContext?.user?.activeAccount?.marketplaceSettings,\n setTempQuery,\n tempQuery,\n ]);\n};\n","import { useCallback } from 'react';\nimport { FilterToolbarItemId } from 'src/components/Filters';\nimport { FilterToolbar } from 'src/components/FilterToolbar';\nimport { useFiltersHelpers } from 'src/components/FilterToolbar/useFiltersHelpers';\nimport { useMarketplacePaymentsFilters } from 'src/components/MainFilterBar/useMarketplacePaymentsFilters';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport {\n DefaultQuickFilter,\n useFilterToolbarQuickFilters,\n} from 'src/hooks/useQuickFilters';\nimport { MarketplacePaymentQuery, UserSetting } from 'src/WebApiController';\n\nconst mandatoryFiltersToShow: FilterToolbarItemId[] = ['paymentDates'];\nconst defaultQuickFilters: DefaultQuickFilter[] = [];\n\nexport const MarketplacePaymentsFilterBar = () => {\n const {\n initialQuery,\n tempQuery,\n resetTempQuery,\n setFilterQuery,\n filterQuery: marketplacePaymentsQuery,\n } = useFilterQueryContext();\n\n const { filters } = useMarketplacePaymentsFilters();\n\n const { appliedFilters } = useFiltersHelpers({\n filters,\n activeQuery: marketplacePaymentsQuery,\n mandatoryFiltersToShow: mandatoryFiltersToShow,\n initialQuery,\n });\n\n const onQuickFilterSelect = useCallback(\n ({ query }: { id: string; query: MarketplacePaymentQuery }) => {\n setFilterQuery(query);\n },\n [setFilterQuery]\n );\n\n const filterToolbarProps = useFilterToolbarQuickFilters({\n quickFiltersStateSetting: UserSetting.QuickFiltersStateMarketplacePayments,\n customQuickFiltersSetting:\n UserSetting.QuickFiltersCustomMarketplacePayments,\n defaultQuickFilters,\n currentQuery: marketplacePaymentsQuery,\n initialQuery,\n onSelect: onQuickFilterSelect,\n });\n\n return (\n
    \n setFilterQuery(tempQuery)}\n filters={filters}\n resetTempQuery={resetTempQuery}\n tempQuery={tempQuery}\n mandatoryFiltersToShow={mandatoryFiltersToShow}\n />\n
    \n );\n};\n","import { MouseEvent } from 'react';\nimport { MarketplacePaymentsFilterBar } from 'src/components/MarketplacePayments/MarketplacePaymentsFilterBar';\nimport { Content } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { LayoutIcon } from 'src/svgs';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Feature } from 'src/WebApiController';\n\nimport * as styles from './PaymentsToolbar.css';\n\ninterface PaymentsToolbarProps {\n onColumnSettingButtonClickHandler?: (\n e: MouseEvent\n ) => void;\n}\n\nexport const MarketplacePaymentsToolbar = ({\n onColumnSettingButtonClickHandler,\n}: PaymentsToolbarProps) => {\n const hasMarketplacePaymentsFiltersFeature = useUserHasFeature(\n Feature.MarketplacePaymentsFilters\n );\n\n return (\n \n {hasMarketplacePaymentsFiltersFeature && }\n \n \n );\n};\n","import {\n DateRangePresetName,\n getUiDateTimeRangeFromPreset,\n PurchaseDateRangePresetNames,\n} from 'src/utils/dateTimeUtils';\nimport {\n DateTimeRangeWithRelative,\n EventSort,\n MarketplacePaymentQuery,\n} from 'src/WebApiController';\n\nexport const EmptyMarketplacePaymentQuery = {\n marketplace: null,\n paymentDates: null,\n marketplacePaymentState: null,\n isSortDescending: false,\n viewMode: null,\n sortBy: null,\n timezoneOffsetMins: new Date().getTimezoneOffset(),\n currencyCodes: null,\n hasPaymentLineUnmappedToSale: null,\n hasPaymentLineUnmappedToSaleLineItem: null,\n} satisfies MarketplacePaymentQuery;\n\nexport const DefaultMarketplacePaymentQuery = {\n ...EmptyMarketplacePaymentQuery,\n paymentDates:\n (getUiDateTimeRangeFromPreset(\n DateRangePresetName.ThisYear,\n PurchaseDateRangePresetNames\n ) as DateTimeRangeWithRelative) ?? null,\n sortBy: EventSort.Date,\n isSortDescending: true,\n} satisfies MarketplacePaymentQuery;\n\nexport enum PaymentTab {\n MarketplacePayments = 'MarketplacePayments',\n VendorPayments = 'VendorPayments',\n CommissionPayment = 'CommissionPayments',\n}\n","import {\n getPresetFromUiDateTimeRange,\n getUiDateTimeRangeFromPreset,\n StandardDateRangePresetNames,\n} from 'src/utils/dateTimeUtils';\nimport { DateTimeRange, MarketplacePaymentQuery } from 'src/WebApiController';\n\nexport const marketplacePaymentQueryValueTransformToUrl = (\n key: string,\n value: DateTimeRange\n) => {\n if (!value) {\n return value;\n }\n\n const queryKey = key as keyof MarketplacePaymentQuery;\n\n if (queryKey === 'paymentDates') {\n const preset = getPresetFromUiDateTimeRange(value);\n if (preset && StandardDateRangePresetNames.includes(preset.name)) {\n return preset.name;\n }\n }\n\n return value;\n};\n\nexport const marketplacePaymentValueTransformFromUrl = (\n key: string,\n value: string\n) => {\n if (!value) {\n return value;\n }\n\n const queryKey = key as keyof MarketplacePaymentQuery;\n if (queryKey === 'paymentDates') {\n const preset = getUiDateTimeRangeFromPreset(\n value,\n StandardDateRangePresetNames\n );\n if (preset) {\n return preset;\n }\n }\n\n return value;\n};\n","import { MouseEvent, useCallback } from 'react';\nimport { useToggle } from 'react-use';\nimport { MarketplacePaymentsTab } from 'src/components/MarketplacePayments';\nimport { MarketplacePaymentDeeplinkListener } from 'src/components/MarketplacePayments/MarketplacePaymentDeeplinkListener';\nimport { MarketplacePaymentsToolbar } from 'src/components/MarketplacePayments/PaymentsToolbar/MarketplacePaymentsToolbar';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { FilterQueryContextProvider } from 'src/contexts/FilterQueryContext';\nimport * as Tabs from 'src/core/ui/Tabs';\nimport { ColumnSettingsModal } from 'src/modals/ColumnSettings/ColumnSettings';\nimport { LayoutContent } from 'src/navigations/LayoutContent';\nimport {\n DefaultMarketplacePaymentQuery,\n EmptyMarketplacePaymentQuery,\n PaymentTab,\n} from 'src/navigations/Routes/Payments/Payments.constants';\nimport {\n marketplacePaymentQueryValueTransformToUrl,\n marketplacePaymentValueTransformFromUrl,\n} from 'src/navigations/Routes/Payments/Payments.utils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport { MarketplacePaymentQuery, UserSetting } from 'src/WebApiController';\n\nimport { MainRoute } from '../MainRoute';\nimport * as styles from './Payments.css';\n\nexport function Payments() {\n const paymentsTitle = useContent(ContentId.Payments);\n\n const [isColumnModalOpen, toggleColumnModal] = useToggle(false);\n\n const onColumnSettingButtonClickHandler = useCallback(\n (e: MouseEvent) => {\n e.stopPropagation();\n if (!isColumnModalOpen) {\n toggleColumnModal(true);\n }\n },\n [isColumnModalOpen, toggleColumnModal]\n );\n\n return (\n \n \n initialQuery={DefaultMarketplacePaymentQuery}\n viewModeSettingId={UserSetting.PurchasePageViewMode}\n emptyQuery={EmptyMarketplacePaymentQuery}\n queryValueTransformToUrl={marketplacePaymentQueryValueTransformToUrl}\n queryValueTransformFromUrl={marketplacePaymentValueTransformFromUrl}\n saveQueryInUrl\n >\n \n \n \n \n \n \n \n\n \n\n \n \n \n \n {isColumnModalOpen && (\n \n )}\n \n \n \n );\n}\n","import React from 'react';\nimport { TabWithStarIcon } from 'src/components/Listings/InventoryEventPage/TabWithStarIcon';\nimport { vars } from 'src/core/themes';\nimport * as Tabs from 'src/core/ui/Tabs';\n\nimport * as styles from './EventPage.css';\n\nexport interface TabItem {\n value: TabType;\n label: React.ReactNode;\n content: React.ReactNode;\n className?: string;\n isVisible?: boolean;\n}\n\ninterface EventPageTabsProps {\n activeTab: TabType;\n setActiveTab: React.Dispatch>;\n defaultTab?: TabType;\n onSetDefaultTabClick: (tab: TabType) => void;\n tabs: TabItem[];\n}\n\nexport const EventPageTabs = ({\n activeTab,\n setActiveTab,\n defaultTab,\n onSetDefaultTabClick,\n tabs,\n}: EventPageTabsProps) => {\n return (\n setActiveTab(value as TabType)}\n className={styles.tabsSection}\n >\n \n {tabs\n .filter((tab) => tab.isVisible !== false)\n .map((tab) => (\n \n \n {tab.label}\n \n \n ))}\n \n {tabs\n .filter((tab) => tab.isVisible !== false)\n .map((tab) => (\n \n {tab.content}\n \n ))}\n \n );\n};\n","import { useEffect } from 'react';\nimport { SidePanelFilters } from 'src/components/Events/EventPage/SidePanel/SidePanelFilters';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { useQuickFilters } from 'src/hooks/useQuickFilters';\nimport { ListingQuery, UserSetting } from 'src/WebApiController';\n\nimport { useDefaultListingFilter } from './hooks/useDefaultListingFilter';\n\nexport function ListingSideTableFilterBar() {\n const {\n filterQuery: listingQuery,\n initialQuery,\n setFilterQuery,\n setTempQuery,\n } = useFilterQueryContext();\n\n useEffect(() => {\n setTempQuery(listingQuery);\n }, [listingQuery, setTempQuery]);\n\n const defaultQuickFilters = useDefaultListingFilter({\n initialQuery,\n listingQuery,\n });\n\n const { quickFilters } = useQuickFilters({\n quickFiltersStateSetting: UserSetting.QuickFiltersStateInventory,\n customQuickFiltersSetting: UserSetting.QuickFiltersCustomInventory,\n defaultQuickFilters,\n });\n\n return (\n \n );\n}\n","import { useCallback, useEffect, useMemo } from 'react';\nimport { translateEventToInventoryAccordionItem } from 'src/components/Accordions';\nimport { ActivePosEntityProvider } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { BulkEditHubContextProvider } from 'src/contexts/BulkEditHubContext';\nimport {\n CatalogDataContextProvider,\n ExpandedEventData,\n} from 'src/contexts/CatalogDataContext';\nimport { CatalogMultiSelectionContextProvider } from 'src/contexts/CatalogMultiSelectionContext';\nimport { CollapsableViewProvider } from 'src/contexts/CollapsableViewContext/CollapsableViewContext';\nimport { Content, FormatContent } from 'src/contexts/ContentContext';\nimport { DialogProvider } from 'src/contexts/DialogContext/DialogContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport {\n FilterQueryContextProvider,\n useFilterQueryContext,\n} from 'src/contexts/FilterQueryContext';\nimport { MultiSelectionContextProvider } from 'src/contexts/MultiSelectionContext';\nimport { SellerUserSettingsProvider } from 'src/contexts/SellerUserSettingsContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport {\n getCatalogData as getCatalogDataForListing,\n getCatalogDataExpanded,\n getCatalogSectionalDataExpanded,\n} from 'src/navigations/Routes/Inventory';\nimport { INVENTORY_USER_SETTINGS } from 'src/navigations/Routes/InventoryEvent/constants';\nimport { NoData } from 'src/tables/Table';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport {\n DefaultListingQuery,\n EmptyListingQuery,\n} from 'src/utils/eventQueryUtils';\nimport { transformData } from 'src/utils/eventWithDataUtils';\nimport { ListingCatalogQueryKey } from 'src/utils/inventoryUtils';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport {\n ActionOutboxEntityType,\n Feature,\n ListingClient,\n ListingDetailDataField,\n ListingDetails,\n ListingQuery,\n UserSetting,\n} from 'src/WebApiController';\n\nimport * as styles from '../../Events/EventPage/EventPage.css';\nimport { useAccordionItem } from '../../Events/EventPage/hooks/useAccordionItem';\nimport { SidePanelToolbar } from '../../Events/EventPage/SidePanel/SidePanelToolbar';\nimport { ListingSideTableFilterBar } from '../ListingFilterBar/ListingSideTableFilterBar';\n\nconst Inventory = ({\n viagVirtualId,\n queryInput,\n}: {\n viagVirtualId: string;\n queryInput?: Partial>;\n}) => {\n const { isLoading, isItemsLoading, accordionItemProps } =\n useAccordionItem(viagVirtualId);\n\n const { setFilterQuery } = useFilterQueryContext();\n\n useEffect(() => {\n setFilterQuery({\n ...DefaultListingQuery,\n ...queryInput,\n eventOrMappingIds: [viagVirtualId],\n });\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [queryInput, setFilterQuery]);\n\n const inventoryAccordionItem = useMemo(\n () =>\n accordionItemProps &&\n translateEventToInventoryAccordionItem(accordionItemProps, 0, true),\n [accordionItemProps]\n );\n\n const { BodyComponent, AfterHeaderComponent } = inventoryAccordionItem || {};\n\n const listingIds = inventoryAccordionItem?.entities?.map((l) => l.id) || [];\n\n const noData =\n (!isLoading && !inventoryAccordionItem) ||\n (!isItemsLoading && !accordionItemProps?.entities?.listings);\n\n const hasSelectedEntities =\n (queryInput?.saleIds && queryInput?.saleIds?.length > 0) ||\n (queryInput?.purchaseOrderIds && queryInput?.purchaseOrderIds?.length > 0);\n\n return (\n <>\n
    \n }\n noData={noData}\n entityIds={hasSelectedEntities ? listingIds : undefined}\n />\n {!noData && AfterHeaderComponent && }\n
    \n {isLoading && }\n {noData ? (\n \n }\n />\n \n ) : (\n BodyComponent &&\n accordionItemProps && (\n \n )\n )}\n \n );\n};\n\nexport const InventorySideTable = ({\n viagVirtualId,\n queryInput,\n}: {\n viagVirtualId: string;\n queryInput?: Partial>;\n}) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n\n const hasSectionalLoadDataFeature = useUserHasFeature(\n Feature.ListingLoadBySection\n );\n\n const hasSectionalLoadInListingTable = useUserHasFeature(\n Feature.SectionalLoadInListingTable\n );\n\n const getCatalogDataExpandedCallback = useCallback(\n (ids: string[], filterQuery: ListingQuery) => {\n if (hasSectionalLoadInListingTable) {\n return getCatalogSectionalDataExpanded(\n ids,\n filterQuery,\n [\n ListingDetailDataField.Basic,\n ListingDetailDataField.Pricing,\n ListingDetailDataField.AutoPricing,\n ],\n {\n activeAccountWebClientConfig,\n onError: (error) => {\n trackError(\n 'ListingClient.getListingsSectionalDataForEvents',\n error,\n {\n ...filterQuery,\n eventIds: ids,\n }\n );\n },\n }\n );\n }\n return getCatalogDataExpanded(ids, filterQuery, {\n activeAccountWebClientConfig,\n onError: (error) => {\n trackError('ListingClient.getListingsForEvents', error, {\n ...filterQuery,\n eventIds: ids,\n });\n },\n });\n },\n [activeAccountWebClientConfig, hasSectionalLoadInListingTable, trackError]\n );\n\n const onCatalogDataExpandedCallback = useCallback(\n (\n ids: string[],\n filterQuery: ListingQuery,\n currentData?: ExpandedEventData\n ) =>\n getCatalogSectionalDataExpanded(\n ids,\n filterQuery,\n [ListingDetailDataField.Purchase, ListingDetailDataField.Tags],\n {\n activeAccountWebClientConfig,\n onError: (error) => {\n trackError('ListingClient.getCatalogSectionalDataExpanded', error, {\n ...filterQuery,\n eventIds: ids,\n });\n },\n },\n currentData\n ),\n [activeAccountWebClientConfig, trackError]\n );\n\n const getActivePosEntity = useCallback(\n async (\n posEntityId: number,\n curEntity?: ListingDetails | null,\n dataToGet?: string[] | null\n ) => {\n if (activeAccountWebClientConfig.activeAccountId) {\n const listingDetail = await new ListingClient(\n activeAccountWebClientConfig\n ).getListingByListingId(\n posEntityId,\n hasSectionalLoadDataFeature ? (curEntity ?? undefined) : undefined,\n hasSectionalLoadDataFeature\n ? (dataToGet?.map((s) => s as ListingDetailDataField) ?? [])\n : undefined\n );\n\n if (listingDetail) {\n return {\n posEntityId: listingDetail.id,\n posEntity: listingDetail,\n posEntityDisplayId: listingDetail.idOnMkp,\n };\n }\n }\n return {};\n },\n [activeAccountWebClientConfig, hasSectionalLoadDataFeature]\n );\n\n return (\n \n \n \n initialQuery={{\n ...DefaultListingQuery,\n eventOrMappingIds: [viagVirtualId],\n }}\n emptyQuery={EmptyListingQuery}\n viewModeSettingId={UserSetting.InventoryPageViewMode}\n loadQueryFromUrl={false}\n >\n \n entityType={ActionOutboxEntityType.Listing}\n queryKey={ListingCatalogQueryKey}\n getCatalogData={(c, f) => getCatalogDataForListing(c, f, true)}\n getCatalogDataExpanded={getCatalogDataExpandedCallback}\n onCatalogDataExpanded={\n hasSectionalLoadInListingTable\n ? onCatalogDataExpandedCallback\n : undefined\n }\n transformEventData={transformData}\n >\n \n \n \n entityType={ActionOutboxEntityType.Listing}\n getActivePosEntity={getActivePosEntity}\n >\n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n","import { isEmpty } from 'lodash-es';\nimport { useContext, useMemo } from 'react';\nimport { useEventMapContext } from 'src/contexts/EventMapContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { Stack } from 'src/core/ui';\nimport * as Tabs from 'src/core/ui/Tabs';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { Feature } from 'src/WebApiController';\n\nimport * as styles from '../EventPage.css';\n\nexport enum SidePanelTab {\n LISTINGS = 'listings',\n SALES = 'sales',\n NOTES = 'notes',\n PURCHASES = 'purchases',\n INVENTORY = 'inventory',\n}\n\nconst HeaderTabs = ({\n tabs,\n}: {\n tabs: (\n | {\n label: JSX.Element;\n value: SidePanelTab;\n content: JSX.Element;\n }\n | {\n label: JSX.Element;\n value: SidePanelTab;\n content?: undefined;\n }\n )[];\n}) => {\n return (\n \n {tabs.map((tab) => (\n \n {tab.label}\n \n ))}\n \n );\n};\n\ntype SidePanelHeaderProps = {\n tabs: (\n | {\n label: JSX.Element;\n value: SidePanelTab;\n content: JSX.Element;\n }\n | {\n label: JSX.Element;\n value: SidePanelTab;\n content?: undefined;\n }\n )[];\n};\n\nexport const SidePanelHeader: React.FC = ({ tabs }) => {\n const { setModal } = useContext(ModalContext);\n\n const {\n event,\n venueMapQuery,\n isGeneralAdmissionOnly,\n mapConfigOverridesQuery,\n venueMapsByScoreModelQuery,\n } = useEventMapContext();\n const hasAutoPricingFeature = useUserHasFeature(Feature.AutoPricing);\n\n const isConfigurable = useMemo(() => {\n // Has score overrides\n if (mapConfigOverridesQuery.data?.length) {\n return true;\n }\n\n // Venue map has configured scores\n if (\n (venueMapQuery.data?.sectionScores?.findIndex((s) => s.score) ?? -1) >= 0\n ) {\n return true;\n }\n\n // Has modeled scores\n const { AdvancedVenueGeometry, MergedVenueGeometry, VenueGeometry } =\n venueMapsByScoreModelQuery.data ?? {};\n if (\n !isEmpty(AdvancedVenueGeometry) ||\n !isEmpty(MergedVenueGeometry) ||\n !isEmpty(VenueGeometry)\n ) {\n return true;\n }\n\n return false;\n }, [\n mapConfigOverridesQuery.data?.length,\n venueMapQuery.data?.sectionScores,\n venueMapsByScoreModelQuery.data,\n ]);\n\n return (\n \n
    \n \n
    \n
    \n );\n};\n","/* eslint-disable react-hooks/exhaustive-deps */\nimport { useMemo, useState } from 'react';\nimport { SwiperButton } from 'src/components/Buttons/SwiperButton';\nimport * as styles from 'src/components/Events/EventPage/EventPage.css';\nimport { InventorySideTable } from 'src/components/Listings/InventoryEventPage/InventorySideTable';\nimport { NoteSectionV2 } from 'src/components/Listings/InventoryEventPage/Sections/NoteSectionV2';\nimport { PurchasesSideTable } from 'src/components/Purchases/PurchaseEventPage/PurchasesSideTable';\nimport { SalesSideTable } from 'src/components/Sales/SaleEventPage/SaleSideTable';\nimport { Content } from 'src/contexts/ContentContext/Content';\nimport { Stack } from 'src/core/ui';\nimport * as Tabs from 'src/core/ui/Tabs';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { EntityWithTicketsQuery, Event, Feature } from 'src/WebApiController';\n\nimport { SidePanelHeader, SidePanelTab } from './SidePanelHeader';\n\ntype SidePanelProps = {\n event: Event;\n pageType: 'Inventory' | 'Sales' | 'Purchases';\n selectedEntityIds?: number[];\n filterQuery?: EntityWithTicketsQuery;\n};\n\nexport const SidePanel = ({\n event,\n pageType,\n selectedEntityIds,\n filterQuery,\n}: SidePanelProps) => {\n // State Hooks\n const [activeTab, setActiveTab] = useState(() => {\n switch (pageType) {\n case 'Sales':\n return SidePanelTab.PURCHASES;\n case 'Purchases':\n return SidePanelTab.INVENTORY;\n // Add more cases as needed\n default:\n return SidePanelTab.SALES;\n }\n });\n\n const hasHideNavAndFilterBarsFeature = useUserHasFeature(\n Feature.HideNavAndFilterBars\n );\n\n const isMobile = useMatchMedia('mobile');\n\n const tabs = useMemo(() => {\n const marketplaceEntityIds = filterQuery?.marketplaceEntityIds?.map(Number);\n switch (pageType) {\n case 'Sales': {\n const saleIdsQuery = {\n saleIds:\n (selectedEntityIds && selectedEntityIds?.length > 0\n ? selectedEntityIds\n : null) || marketplaceEntityIds,\n };\n\n return [\n ...(hasHideNavAndFilterBarsFeature\n ? []\n : [\n {\n label: ,\n value: SidePanelTab.PURCHASES,\n content: (\n \n \n \n ),\n },\n {\n label: ,\n value: SidePanelTab.INVENTORY,\n content: (\n \n \n \n ),\n },\n ]),\n {\n label: ,\n value: SidePanelTab.NOTES,\n content: ,\n },\n ];\n }\n case 'Purchases': {\n const purchaseOrderIdsQuery = {\n purchaseOrderIds:\n (selectedEntityIds && selectedEntityIds?.length > 0\n ? selectedEntityIds\n : null) || marketplaceEntityIds,\n };\n\n return [\n ...(hasHideNavAndFilterBarsFeature\n ? []\n : [\n {\n label: ,\n value: SidePanelTab.INVENTORY,\n content: (\n \n \n \n ),\n },\n {\n label: ,\n value: SidePanelTab.SALES,\n content: (\n \n \n \n ),\n },\n ]),\n {\n label: ,\n value: SidePanelTab.NOTES,\n content: ,\n },\n ];\n }\n default: // 'Inventory'\n return [];\n }\n }, [pageType, selectedEntityIds, filterQuery]);\n\n return (\n setActiveTab(value as SidePanelTab)}\n style={{ width: '100%' }}\n >\n \n {isMobile && }\n \n {tabs.map((tab) => (\n \n {tab.content}\n \n ))}\n \n \n );\n};\n","import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { PurchaseClient, PurchaseEventOverride } from 'src/WebApiController';\n\nexport const usePurchaseEventOverrides = (\n eventId?: number | null,\n disabled?: boolean\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const { trackError, showErrorDialog } = useErrorBoundaryContext();\n\n const queryClient = useQueryClient();\n const getQueryKey = ['PurchaseClient.getPurchaseEventOverrides', eventId];\n\n const shouldQuery =\n !disabled &&\n Boolean(activeAccountWebClientConfig.activeAccountId && eventId);\n\n const getQuery = useQuery({\n queryKey: getQueryKey,\n queryFn: async () => {\n if (!shouldQuery) {\n return null;\n }\n\n return await new PurchaseClient(\n activeAccountWebClientConfig\n ).getPurchaseEventOverrides(eventId!);\n },\n\n enabled: shouldQuery,\n staleTime: Infinity, // We invalidate on settings changed, so we don't need to make this stale\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError('PurchaseClient.getPurchaseEventOverrides', error, {\n eventId,\n });\n },\n },\n });\n\n const updateMutation = useMutation({\n mutationFn: async ({ settings }: { settings: PurchaseEventOverride[] }) => {\n return await new PurchaseClient(\n activeAccountWebClientConfig\n ).mergePurchaseEventOverrides(settings, eventId!);\n },\n // optimistic ui\n // Reference: https://tanstack.com/query/v3/docs/react/guides/optimistic-updates\n onMutate: ({ settings }) => {\n queryClient.cancelQueries({ queryKey: getQueryKey });\n const prevValue =\n queryClient.getQueryData(getQueryKey);\n\n queryClient.setQueryData(getQueryKey, settings);\n return { prevValue };\n },\n onError: (err: ErrorTypes, { settings }, context) => {\n queryClient.setQueryData(getQueryKey, context?.prevValue);\n showErrorDialog('PurchaseClient.mergePurchaseEventOverrides', err, {\n trackErrorData: { settings },\n });\n },\n onSettled: () => {\n queryClient.invalidateQueries({ queryKey: getQueryKey });\n },\n });\n\n return {\n purchaseEventOverrides: getQuery.data,\n isLoading: getQuery.isLoading,\n async updatePurchaseEventOverrides(settings: PurchaseEventOverride[]) {\n await updateMutation.mutateAsync({\n settings,\n });\n },\n isMutationLoading: updateMutation.isPending,\n };\n};\n","import { useEffect, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { usePurchaseVendorSelector } from 'src/components/Selectors/PurchaseVendorSelector/usePurchaseVendorSelector';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { PosSelect } from 'src/core/POS/PosSelect';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { PurchaseEventOverridesInput } from './FulfillmentSection.types';\n\nexport const VendorCell = ({\n disabled,\n index,\n}: {\n disabled?: boolean;\n index: number;\n}) => {\n const { watch, setValue, clearErrors } =\n useFormContext();\n\n const allVendorsText = useContent(ContentId.AllVendors);\n\n const settings = watch('settings');\n const vendorId = watch(`settings.${index}.vendorId`);\n\n const { posSelectProps } = usePurchaseVendorSelector({\n placeholderText: allVendorsText,\n });\n\n const availableVendorOptions = Object.entries(\n posSelectProps.valueOptionsContent\n ).reduce(\n (acc, [key, value]) => {\n if (\n !settings?.some(\n (s, i) =>\n i !== index && s.vendorId != null && s.vendorId.toString() === key\n )\n ) {\n acc[key] = value;\n }\n return acc;\n },\n {} as Record\n );\n\n const isAllVendorsSelectedInOtherRows = useMemo(\n () => settings?.some((s, i) => i !== index && s.vendorId == null),\n [index, settings]\n );\n\n useEffect(() => {\n if (\n (vendorId == null && isAllVendorsSelectedInOtherRows) ||\n (vendorId != null &&\n !Object.keys(availableVendorOptions).includes(vendorId.toString()))\n ) {\n setValue(\n `settings.${index}.vendorId`,\n Number(Object.keys(availableVendorOptions)[0]),\n {\n shouldDirty: true,\n }\n );\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return (\n {\n clearErrors(`settings.${index}.vendorId`);\n setValue(`settings.${index}.vendorId`, value ? Number(value) : null, {\n shouldDirty: true,\n });\n }}\n disabled={disabled}\n {...posSelectProps}\n valueOptionsContent={availableVendorOptions}\n enableEmptySelection={!isAllVendorsSelectedInOtherRows}\n />\n );\n};\n","import { useFormContext } from 'react-hook-form';\nimport { IconButton } from 'src/components/Buttons';\nimport { DeliveryTypeSelector } from 'src/components/Selectors/DeliveryTypeSelector';\nimport { vars } from 'src/core/themes';\nimport { SimpleTable } from 'src/core/ui';\nimport { DeleteIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { PurchaseEventOverridesInput } from './FulfillmentSection.types';\nimport { VendorCell } from './VendorCell';\n\nexport const OverrideSettingForm = ({\n disabled,\n onDeleteSetting,\n index,\n}: {\n disabled?: boolean;\n onDeleteSetting: (index: number) => void;\n index: number;\n}) => {\n const { watch, setValue } = useFormContext();\n\n const delivType = watch(`settings.${index}.delivType`);\n\n return (\n \n \n \n \n \n {\n if (deliveryType && deliveryType !== delivType) {\n setValue(`settings.${index}.delivType`, deliveryType, {\n shouldDirty: true,\n });\n }\n }}\n disabled={disabled}\n />\n \n \n \n }\n disabled={disabled}\n titleContentId={ContentId.Delete}\n onClick={() => onDeleteSetting(index)}\n />\n \n \n );\n};\n","import { isEqual } from 'lodash-es';\nimport { PurchaseEventOverride } from 'src/WebApiController';\n\nexport const hasNoChangeOrIsDeleteOnly = (\n purchaseEventOverrides: PurchaseEventOverride[] | null | undefined,\n formValuesettings: PurchaseEventOverride[] | null | undefined\n): boolean => {\n // Basically return true if every setting in the formValuesettings is contained within the purchaseEventOverrides\n if (!formValuesettings?.length) {\n return true;\n }\n\n for (const formValueSetting of formValuesettings) {\n const matchingSetting = purchaseEventOverrides?.find(\n (setting) => setting.vendorId === formValueSetting.vendorId\n );\n\n if (!matchingSetting) {\n return false;\n }\n\n if (!isEqual(matchingSetting, formValueSetting)) {\n return false;\n }\n }\n\n return true;\n};\n","import { useCallback, useEffect, useMemo } from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { EventAccordionItemProps } from 'src/components/Accordions';\nimport { ButtonWithIcon, ReloadButton } from 'src/components/Buttons';\nimport { usePurchaseVendorSelector } from 'src/components/Selectors/PurchaseVendorSelector/usePurchaseVendorSelector';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { DialogId } from 'src/contexts/DialogContext/DialogContext';\nimport { useDialog } from 'src/contexts/DialogContext/useDialog';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { vars } from 'src/core/themes';\nimport { Button, SimpleTable, Stack } from 'src/core/ui';\nimport { BulkUpdateDeliveryOverrideDialog } from 'src/dialogs/BulkEdits/BulkUpdateDeliveryOverrideDialog';\nimport { usePurchaseEventOverrides } from 'src/hooks/api/usePurchaseEventOverrides';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { IconsFill, PlusIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { EmptyPurchaseQuery } from 'src/utils/eventQueryUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ActionOutboxEntityType,\n BulkEditPreviewWithDetails,\n BulkEditPurchaseClient,\n DeliveryType,\n EventWithData,\n Feature,\n PurchaseEventOverride,\n PurchaseOrderQuery,\n PurchaseOrderState,\n PurchaseOrderTicketGroup,\n} from 'src/WebApiController';\n\nimport * as styles from '../../Events/EventPage/EventPage.css';\nimport { PURCHASE_BULK_BACKFILL_DELIVERY_SETTINGS_KEY } from '../PurchaseActionDropdown';\nimport { PurchaseEventOverridesInput } from './FulfillmentSection/FulfillmentSection.types';\nimport { OverrideSettingForm } from './FulfillmentSection/OverrideSettingForm';\nimport * as sectionStyles from './PurchaseEventFulfillmentSection.css';\nimport { hasNoChangeOrIsDeleteOnly } from './PurchaseEventFulfillmentSection.utils';\n\ntype PurchaseEventContentProps = {\n accordionItemProps?: EventWithData;\n purchaseOrderAccordionItem?: EventAccordionItemProps;\n};\n\nexport function PurchaseEventFulfillmentSection({\n accordionItemProps,\n purchaseOrderAccordionItem,\n}: PurchaseEventContentProps) {\n const { activeAccountWebClientConfig } = useAppContext();\n const updateKey = PURCHASE_BULK_BACKFILL_DELIVERY_SETTINGS_KEY;\n\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const { BodyComponent } = purchaseOrderAccordionItem || {};\n const event = accordionItemProps?.event;\n\n const { availableVendors } = usePurchaseVendorSelector({});\n const numVendors = Object.keys(availableVendors).length;\n\n const updateDialog = useBasicDialog();\n\n const { openDialog, closeDialog } = useDialog(\n DialogId.BulkBackfillDeliverySettings,\n BulkUpdateDeliveryOverrideDialog\n );\n\n const {\n purchaseEventOverrides,\n isLoading,\n updatePurchaseEventOverrides,\n isMutationLoading,\n } = usePurchaseEventOverrides(event?.viagId);\n\n const methods = useForm({\n defaultValues: {\n settings: purchaseEventOverrides ?? [],\n },\n });\n\n const {\n getValues,\n watch,\n formState: { isDirty },\n } = methods;\n\n useEffect(() => {\n methods.reset({\n settings: purchaseEventOverrides ?? [],\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [purchaseEventOverrides]);\n\n const onSubmit = useCallback(async () => {\n const { settings } = getValues();\n await updatePurchaseEventOverrides(settings);\n }, [getValues, updatePurchaseEventOverrides]);\n\n const onReset = useCallback(() => {\n methods.setValue('settings', purchaseEventOverrides ?? [], {\n shouldDirty: true,\n });\n }, [methods, purchaseEventOverrides]);\n\n const settings = watch('settings');\n\n const canAddNew = (settings?.length ?? 0) < numVendors + 1;\n\n const onCreateNewSetting = useCallback(() => {\n if (!canAddNew) {\n return;\n }\n\n const newSetting: PurchaseEventOverride = {\n vendorId: null,\n delivType: Object.values(DeliveryType)[0],\n };\n\n methods.setValue('settings', [...settings, newSetting], {\n shouldDirty: true,\n });\n }, [canAddNew, methods, settings]);\n\n const onDeleteSetting = useCallback(\n (index: number) => {\n const newSettings = [...settings];\n newSettings.splice(index, 1);\n methods.setValue('settings', newSettings, { shouldDirty: true });\n },\n [methods, settings]\n );\n\n const purchaseQuery = useMemo(() => {\n return {\n ...EmptyPurchaseQuery,\n purchaseOrderState: PurchaseOrderState.Active,\n eventOrMappingIds: [event!.viagId!.toString()],\n } as PurchaseOrderQuery;\n }, [event]);\n\n const onBulkUpdate = useCallback(\n async (\n updateSalesOfListings: boolean,\n supportBackgroundProcess?: boolean,\n onPreviewReceived?: (preview: BulkEditPreviewWithDetails) => void,\n preview?: BulkEditPreviewWithDetails\n ) => {\n if (onPreviewReceived) {\n await tryInvokeApi(\n async () => {\n const preview = await new BulkEditPurchaseClient(\n activeAccountWebClientConfig\n ).bulkBackfillDeliverySettingsPreview(\n purchaseQuery,\n updateSalesOfListings,\n false\n );\n\n onPreviewReceived(preview);\n },\n (error) => {\n showErrorDialog('bulkBackfillDeliverySettingsPreview', error, {\n trackErrorData: { purchaseQuery },\n });\n }\n );\n } else {\n await tryInvokeApi(\n async () => {\n const succeeded = await new BulkEditPurchaseClient(\n activeAccountWebClientConfig\n ).bulkBackfillDeliverySettings(\n preview!.preview,\n updateSalesOfListings,\n updateKey,\n supportBackgroundProcess\n );\n if (!supportBackgroundProcess) {\n closeDialog();\n }\n },\n (error) => {\n showErrorDialog('bulkBackfillDeliverySettings', error, {\n trackErrorData: {\n preview,\n },\n });\n }\n );\n }\n },\n [\n activeAccountWebClientConfig,\n closeDialog,\n purchaseQuery,\n showErrorDialog,\n updateKey,\n ]\n );\n\n const onSaveHandler = useCallback(() => {\n if (hasNoChangeOrIsDeleteOnly(purchaseEventOverrides, settings)) {\n onSubmit();\n return;\n }\n\n openDialog({\n updateKey: updateKey,\n entityType: ActionOutboxEntityType.TicketGroup,\n ...updateDialog.dialogProps,\n onSaveOverrideSettings: onSubmit,\n onBulkUpdate: onBulkUpdate,\n onCancel: () => {\n closeDialog();\n },\n backfillDeliveryStrategyFeature:\n Feature.BackfillDeliveryStrategyPurchaseEvent,\n backfillDeliveryStrategyToSaleFeature:\n Feature.BackfillDeliveryStrategyPurchaseEventToSales,\n disableBackfill: hasNoChangeOrIsDeleteOnly(\n purchaseEventOverrides,\n settings\n ),\n });\n }, [\n closeDialog,\n onBulkUpdate,\n onSubmit,\n openDialog,\n purchaseEventOverrides,\n settings,\n updateDialog.dialogProps,\n updateKey,\n ]);\n\n return (\n
    \n {BodyComponent && accordionItemProps && (\n
    \n {isLoading ? (\n \n ) : (\n \n \n {settings?.length !== 0 && (\n \n \n \n \n
    \n \n
    \n \n \n
    \n \n
    \n \n
    \n \n \n \n \n \n \n \n \n
    \n \n {settings.map((s, i) => (\n \n ))}\n \n
    \n )}\n
    \n {canAddNew && (\n \n \n }\n disabled={isMutationLoading || isLoading}\n textContentId={ContentId.AddOverride}\n onClick={() => {\n onCreateNewSetting();\n }}\n style={{ width: 'min-content', whiteSpace: 'nowrap' }}\n variant={'text'}\n />\n \n )}\n {isDirty && (\n \n \n\n \n \n \n \n )}\n
    \n )}\n
    \n )}\n
    \n );\n}\n","import clsx from 'clsx';\nimport { Dispatch, SetStateAction, useCallback } from 'react';\nimport { useToggle } from 'react-use';\nimport { EventAccordionItemProps } from 'src/components/Accordions';\nimport { useCollapsableViewContext } from 'src/contexts/CollapsableViewContext/CollapsableViewContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport {\n MultiSelectScope,\n useMultiSelectionContext,\n} from 'src/contexts/MultiSelectionContext';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ColumnSettingsModal } from 'src/modals/ColumnSettings/ColumnSettings';\nimport { LayoutIcon } from 'src/svgs';\nimport { CustomPurchasesColumn } from 'src/utils/columns/purchases/purchasesCustomColumnUtils.types';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport { EventWithData, PurchaseOrderTicketGroup } from 'src/WebApiController';\nimport { Feature } from 'src/WebApiController';\n\nimport * as styles from '../../Events/EventPage/EventPage.css';\n\ntype PurchaseEventContentProps = {\n accordionItemProps?: EventWithData;\n purchaseOrderAccordionItem?: EventAccordionItemProps;\n selectedPurchaseOrderIds: number[];\n setSelectedPurchaseOrderIds: Dispatch>;\n};\n\nexport function PurchaseEventInfoSection({\n accordionItemProps,\n purchaseOrderAccordionItem,\n selectedPurchaseOrderIds,\n setSelectedPurchaseOrderIds,\n}: PurchaseEventContentProps) {\n const { BodyComponent, AfterHeaderComponent } =\n purchaseOrderAccordionItem || {};\n const { onScroll, isCollapsedView, isEnabled } = useCollapsableViewContext();\n\n const hasEventListingTableHotkeysFeature = useUserHasFeature(\n Feature.EventListingTableHotkeys\n );\n const { selectionMode } = useMultiSelectionContext();\n const isSelectionModeOn = !!selectionMode?.mode;\n\n const [isColumnModalOpen, toggleColumnModal] = useToggle(false);\n\n const onColumnSettingButtonClickHandler = useCallback(\n (e: React.MouseEvent) => {\n e.stopPropagation();\n if (!isColumnModalOpen) toggleColumnModal(true);\n },\n [isColumnModalOpen, toggleColumnModal]\n );\n\n return (\n
    \n {BodyComponent && accordionItemProps && (\n \n \n {isColumnModalOpen ? (\n \n onClose={toggleColumnModal}\n sectionType={SectionType.PurchaseEvent}\n />\n ) : null}\n \n \n \n \n \n \n \n\n
    \n {AfterHeaderComponent && }\n
    \n \n {\n setSelectedPurchaseOrderIds(newSelectedIds);\n }}\n selectionMode={{ mode: MultiSelectScope.SingleItem }}\n disablePagination\n useTableNavKeys={hasEventListingTableHotkeysFeature}\n useVirtuoso\n withOuterPadding={false}\n onVirtuosoTableScroll={onScroll}\n />\n
    \n
    \n )}\n \n );\n}\n","import { useQuery } from '@tanstack/react-query';\nimport { format } from 'date-fns';\nimport React, { useCallback, useMemo } from 'react';\nimport { EventAccordionItemProps } from 'src/components/Accordions';\nimport { ActionOutboxEntityTypeForBulkEdit } from 'src/components/common/BulkActions/BulkEditStatus';\nimport { BulkEditStatusPopover } from 'src/components/common/BulkActions/BulkEditStatusPopover';\nimport { MarketplaceLogo } from 'src/components/common/MarketplaceLogo';\nimport { MultiSelectionToggleGroup } from 'src/components/common/MultiSelect/Toggle/MultiSelectionToggleGroup';\nimport { SummaryTile } from 'src/components/common/SummaryTile';\nimport {\n EventNameDisplay,\n VenueNameDisplay,\n} from 'src/components/Events/EventInfo';\nimport { EventStatus } from 'src/components/Events/EventStatus';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content, isContentId } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { ScrollableToolbar } from 'src/core/ui/ScrollableToolbar';\nimport { MarketplaceEventEditDialog } from 'src/dialogs/MarketplaceEventEditDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useGetEventFullInfo } from 'src/hooks/useGetEventFullInfo';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { EditIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { MAPPING_REJECTION_REASON_ID_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport {\n compareMarketplace,\n getFormattedEventName,\n getIsInternationalEvent,\n} from 'src/utils/eventWithDataUtils';\nimport { getLocaleFromLanguageOrCurrent } from 'src/utils/localeUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n Event,\n EventConfigClient,\n Feature,\n Marketplace,\n Performer,\n Permission,\n SellerEventMarketplaceEventInfo,\n TopLevelCategory,\n} from 'src/WebApiController';\n\nimport { PerformerCategoryIcon } from '../../common/PerformerCategoryIcon';\nimport * as styles from './EventPage.css';\n\nconst visibleMarketPlaces: Readonly = [\n Marketplace.StubHub,\n Marketplace.VividSeats,\n Marketplace.Ticketmaster,\n Marketplace.SeatGeek,\n];\n\ninterface EventPageHeaderBaseProps {\n event: Event;\n eventAccordionItem?: EventAccordionItemProps;\n entityType: ActionOutboxEntityTypeForBulkEdit;\n eventMetrics?: (\n | {\n name: JSX.Element;\n value: string;\n }\n | {\n name: JSX.Element;\n value: number | undefined;\n }\n )[];\n extraActions?: React.ReactNode;\n isCollapsedView?: boolean;\n CollapsedView?: React.ReactNode;\n}\n\nexport const EventPageHeaderBase = ({\n event,\n eventAccordionItem,\n entityType,\n eventMetrics,\n extraActions,\n isCollapsedView,\n CollapsedView,\n}: EventPageHeaderBaseProps) => {\n const locale = getLocaleFromLanguageOrCurrent();\n const hasEventsEditPermission = useUserHasAnyOfPermissions(\n Permission.Events_Edit\n );\n const hasEventStatusDisplay = useUserHasFeature(Feature.EventStatusDisplay);\n const { loginContext, activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n const { venue, performer } = useGetEventFullInfo(event);\n const isInternationalEvent = getIsInternationalEvent(venue?.country?.code);\n const eventDate = event?.dates.start\n ? new Date(event.dates.start)\n : undefined;\n const eventMappingRejectionReason = event?.mapRejRsnId\n ? (MAPPING_REJECTION_REASON_ID_TO_CID[event.mapRejRsnId] ??\n event?.mapRejDftTxt)\n : undefined;\n const [eventName, eventNameConnector, eventSubName] = getFormattedEventName({\n event,\n performer,\n });\n const shouldQuery =\n activeAccountWebClientConfig?.activeAccountId != null &&\n event.viagVirtualId != null;\n\n const marketplaceEventInfoQuery = useQuery({\n queryKey: [\n 'EventConfigClient.getSellerEventMarketplaceEventInfo',\n activeAccountWebClientConfig.activeAccountId,\n event?.viagVirtualId,\n ],\n queryFn: async () => {\n if (!shouldQuery) {\n return null;\n }\n return tryInvokeApi(\n async () => {\n const result = await new EventConfigClient(\n activeAccountWebClientConfig\n ).getSellerEventMarketplaceEventInfo(event.viagId, event.mappingId);\n if (result) {\n return result.reduce(\n (r, m) => {\n r[m.marketplace] = m;\n return r;\n },\n {} as Record\n );\n }\n return {};\n },\n (error) => {\n trackError(\n 'EventConfigClient.getSellerEventMarketplaceEventInfo',\n error,\n {\n viagogoEntityId: event.viagId,\n viagogoMappingId: event.mappingId,\n }\n );\n }\n );\n },\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n });\n\n const { launchDialog, closeDialog, dialogProps } = useBasicDialog();\n\n const onEventIdsEditClick = useCallback(() => {\n launchDialog();\n }, [launchDialog]);\n\n const mkpEventInfos = useMemo(\n () =>\n loginContext?.user?.activeAccount.marketplaceSettings\n .filter((m) => m.mkp !== Marketplace.Automatiq)\n .map((m) => {\n const minfo = marketplaceEventInfoQuery.data?.[m.mkp];\n return (\n minfo ??\n ({\n marketplace: m.mkp,\n viagogoEventId: event.viagId,\n mappedEventId:\n m.mkp === Marketplace.StubHub ? event.viagId : undefined,\n } as SellerEventMarketplaceEventInfo)\n );\n }),\n [\n event.viagId,\n loginContext?.user?.activeAccount.marketplaceSettings,\n marketplaceEventInfoQuery.data,\n ]\n );\n\n const marketPlaceLogos = useMemo(() => {\n return mkpEventInfos\n ?.filter((marketplace) =>\n visibleMarketPlaces.includes(marketplace.marketplace)\n )\n .toSorted((a, b) => compareMarketplace(a.marketplace, b.marketplace))\n .map((minfo) => {\n const hasEventId =\n minfo.marketplace == Marketplace.StubHub ||\n Boolean(minfo?.eventIdOverride || minfo?.mappedEventId) ||\n (Marketplace.Ticketmaster && minfo.websiteEventId);\n if (minfo.marketplace !== Marketplace.StubHub && isInternationalEvent) {\n return null;\n }\n const onMkpClick =\n hasEventId || !hasEventsEditPermission\n ? undefined\n : onEventIdsEditClick;\n return (\n \n );\n });\n }, [\n event,\n hasEventsEditPermission,\n isInternationalEvent,\n mkpEventInfos,\n onEventIdsEditClick,\n ]);\n\n const marketplaceEventEditDialog = (\n {\n marketplaceEventInfoQuery.refetch();\n closeDialog();\n }}\n />\n );\n\n // Conditionally render based on isCollapsedView\n if (isCollapsedView) {\n // Use a condensed header component or adjust rendering as needed\n return CollapsedView;\n }\n\n // Existing detailed header rendering\n return (\n
    \n \n {eventDate && }\n \n \n \n {venue && (\n
    \n \n
    \n )}\n
    \n {eventDate && (\n
    \n {format(eventDate, 'h:mm aaa', { locale })}\n
    \n )}{' '}\n {performer && (\n \n {(performer as Performer).categ && (\n <>\n \n  \n \n )}\n {performer?.descr}\n \n )}\n
    \n {eventMappingRejectionReason && (\n
    \n \n \n {' '}\n {isContentId(eventMappingRejectionReason) ? (\n \n ) : (\n eventMappingRejectionReason\n )}\n \n \n \n \n \n }\n />\n
    \n )}\n
    \n \n \n {eventAccordionItem && (\n \n \n {\n \n }\n {extraActions}\n \n )}\n \n {hasEventStatusDisplay && event.eventStatus && (\n
    \n \n
    \n )}\n {eventMetrics?.map((metric, index) => (\n \n {metric.value}\n \n ))}\n
    \n
    \n \n \n \n {marketPlaceLogos}\n \n \n
    \n {hasEventsEditPermission && (\n \n )}\n
    \n \n \n
    \n
    \n {marketplaceEventEditDialog}\n
    \n );\n};\n","import { EventAccordionItemProps } from 'src/components/Accordions';\nimport { uppercasedMetric } from 'src/components/Events/EventPage/EventPage.css';\nimport { EventPageHeaderBase } from 'src/components/Events/EventPage/EventPageHeader';\nimport { PurchaseTileActionDropdown } from 'src/components/Purchases/PurchaseTileActionDropdown';\nimport { useCatalogMetricsContext } from 'src/contexts/CatalogMetricsContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n ActionOutboxEntityType,\n Event,\n PurchaseOrderTicketGroup,\n TicketGroupMetrics,\n} from 'src/WebApiController';\n\nexport const PurchaseEventPageHeader = ({\n event,\n purchaseOrderAccordionItem,\n}: {\n event: Event;\n purchaseOrderAccordionItem?: EventAccordionItemProps;\n}) => {\n const { eventMetrics: eventMetricsMap } =\n useCatalogMetricsContext();\n\n const eventMetrics = eventMetricsMap?.[event?.viagVirtualId ?? ''];\n\n const formattedMetrics = [\n {\n name: (\n
    \n \n
    \n ),\n value: eventMetrics?.tktQty,\n },\n ];\n\n return (\n }\n />\n );\n};\n","import {\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { EventAccordionItemProps } from 'src/components/Accordions';\nimport { translateEventToTicketGroupAccordionItem } from 'src/components/Accordions/TicketGroupsEventsAccordion';\nimport { SwiperButton } from 'src/components/Buttons/SwiperButton';\nimport { BackSection } from 'src/components/common/BackSection';\nimport * as EmptySectionContent from 'src/components/common/EmptySectionContent';\nimport {\n EventPageTabs,\n TabItem,\n} from 'src/components/Events/EventPage/EventPageTabs';\nimport { SidePanel } from 'src/components/Events/EventPage/SidePanel/SidePanel';\nimport { ActiveFocusContextProvider } from 'src/contexts/ActiveFocusContext/ActiveFocusContext';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { CollapsableViewProvider } from 'src/contexts/CollapsableViewContext/CollapsableViewContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { EventMapContextProvider } from 'src/contexts/EventMapContext';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport {\n EventLastReviewedContextProvider,\n useEventLastReviewedContext,\n} from 'src/contexts/SellerEventLastReviewContext/SellerEventLastReviewContext';\nimport {\n SidePanelPage,\n SidePanelProvider,\n} from 'src/contexts/SidePanelContext';\nimport { ExplorerLayout } from 'src/core/layouts';\nimport { LoadingButton } from 'src/core/POS/LoadingButton/LoadingButton';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { useSellerEventNote } from 'src/hooks/api/useSellerEventNote';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { useQuickFilterSearchParam } from 'src/hooks/useQuickFilters';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport { SearchSolidIcon } from 'src/svgs/Viagogo';\nimport { PurchaseDeeplinkQueryParam } from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getDeepLinkIdFromUrl } from 'src/utils/deepLinkUtils';\nimport { getAppliedFilterCounts } from 'src/utils/eventQueryUtils';\nimport { getPurchaseOrderDetailsModalConfigWithDeepLink } from 'src/utils/purchaseUtils';\nimport {\n EventWithData,\n PurchaseOrderDetails,\n PurchaseOrderQuery,\n PurchaseOrderTicketGroup,\n UserSetting,\n} from 'src/WebApiController';\nimport Swiper from 'swiper';\n\nimport * as styles from '../../Listings/InventoryEventPage/InventoryEventPage.css';\nimport { useCatchUpParams } from '../../Listings/InventoryEventPage/InventoryEventPage.hooks';\nimport { TagsSection } from '../../Listings/InventoryEventPage/Sections/TagsSection';\nimport { PurchaseEventFulfillmentSection } from './PurchaseEventFulfillmentSection';\nimport { PurchaseEventInfoSection } from './PurchaseEventInfoSection';\nimport { PurchaseEventPageHeader } from './PurchaseEventPageHeader';\n\nexport function PurchaseEventPage({\n viagVirtualId,\n posEventIds,\n returnUrl,\n}: {\n posEventIds?: string[];\n viagVirtualId?: string;\n returnUrl?: string;\n}) {\n const { activeAccountWebClientConfig } = useAppContext();\n const {\n eventsTransformed,\n eventsExpansion: { setListItemExpansion },\n } = useCatalogDataContext();\n\n useEffect(() => {\n if (!viagVirtualId && posEventIds?.length) {\n setListItemExpansion(\n true,\n posEventIds.map((id) => `old:${id}`)\n );\n } else if (viagVirtualId) {\n setListItemExpansion(true, [viagVirtualId]);\n }\n }, [\n activeAccountWebClientConfig,\n posEventIds,\n setListItemExpansion,\n viagVirtualId,\n ]);\n\n const { setAllGroupsIds } = useMultiSelectionContext();\n\n const accordionItemProps = useMemo(\n () =>\n eventsTransformed?.length\n ? eventsTransformed.find(\n (ev) =>\n ev.event.viagVirtualId === viagVirtualId ||\n ev.event.posIds.some((id) => posEventIds?.includes(id))\n )\n : undefined,\n [eventsTransformed, posEventIds, viagVirtualId]\n );\n\n const purchaseOrderAccordionItem = useMemo(\n () =>\n accordionItemProps &&\n translateEventToTicketGroupAccordionItem(accordionItemProps, 0, true),\n [accordionItemProps]\n );\n\n useEffect(() => {\n if (purchaseOrderAccordionItem) {\n setAllGroupsIds([purchaseOrderAccordionItem.itemId]);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [purchaseOrderAccordionItem]);\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n );\n}\n\ntype PurchaseEventContentProps = {\n accordionItemProps?: EventWithData;\n purchaseOrderAccordionItem?: EventAccordionItemProps;\n returnUrl?: string;\n};\n\nexport const enum PurchaseEventTabs {\n Purchases = 'purchases',\n Tags = 'tags',\n Fulfillment = 'fulfillment',\n None = 'none',\n}\n\nfunction PurchaseEventContent({\n accordionItemProps,\n purchaseOrderAccordionItem,\n returnUrl,\n}: PurchaseEventContentProps) {\n const intialActiveTab = PurchaseEventTabs.Purchases;\n\n const [selectedPurchaseOrderIds, setSelectedPurchaseOrderIds] = useState<\n number[]\n >([]);\n const [activeTab, setActiveTab] = useState(intialActiveTab);\n\n const { isLoading } = useCatalogDataContext();\n const isMobile = useMatchMedia('mobile');\n\n const quickFilterSearchParams = useQuickFilterSearchParam();\n const { tempQuery, initialQuery, filterQuery } =\n useFilterQueryContext();\n\n const { setModal } = useContext(ModalContext);\n const { posEntity: purchaseOrder, setActivePosEntity } =\n useActivePosEntityContext();\n\n const {\n value: defaultPurchasesTabUserSetting,\n setUserSetting: setDefaultPurchasesTabUserSetting,\n isLoading: defaultPurchasesTabLoading,\n } = useServerUserSetting({\n id: UserSetting.PurchasesDefaultTab,\n });\n\n const activeId = getDeepLinkIdFromUrl(\n PurchaseDeeplinkQueryParam,\n window.location.href\n );\n\n useEffect(() => {\n if (activeId?.length && !purchaseOrder) {\n setActivePosEntity(parseInt(activeId), undefined, true);\n setModal(getPurchaseOrderDetailsModalConfigWithDeepLink(activeId));\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [activeId]);\n\n const [defaultTab, setDefaultTab] = useState(\n defaultPurchasesTabUserSetting\n );\n\n useEffect(() => {\n if (\n defaultPurchasesTabUserSetting != null &&\n defaultPurchasesTabUserSetting !== activeTab &&\n defaultPurchasesTabUserSetting !== PurchaseEventTabs.None &&\n defaultPurchasesTabLoading === false\n ) {\n setActiveTab(defaultPurchasesTabUserSetting);\n }\n if (\n defaultPurchasesTabUserSetting != null &&\n defaultPurchasesTabUserSetting !== defaultTab &&\n defaultPurchasesTabUserSetting !== PurchaseEventTabs.None &&\n defaultPurchasesTabLoading === false\n ) {\n setDefaultTab(defaultPurchasesTabUserSetting);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [defaultPurchasesTabLoading, defaultPurchasesTabUserSetting]);\n\n const onSetDefaultTabClick = useCallback(\n async (tab: PurchaseEventTabs) => {\n if (tab !== activeTab && tab !== PurchaseEventTabs.None) {\n setActiveTab(tab);\n }\n if (tab !== defaultTab) {\n setDefaultTab(tab);\n }\n setDefaultPurchasesTabUserSetting(tab);\n },\n [activeTab, defaultTab, setDefaultPurchasesTabUserSetting]\n );\n\n const swiperRef = useRef();\n\n const event = accordionItemProps?.event;\n const {\n isCompleted,\n isLoading: isEventReviewedLoading,\n onSettingVirtualIds,\n onUpdateLastReviewedDateTime,\n } = useEventLastReviewedContext();\n\n useEffect(() => {\n onSettingVirtualIds(event?.viagVirtualId ? [event?.viagVirtualId] : []);\n }, [event?.viagVirtualId, onSettingVirtualIds]);\n\n const { addNote, isLoading: isEventNoteLoading } = useSellerEventNote(\n event?.viagId\n );\n const markAsReviewed = useContent(ContentId.MarkAsReviewed);\n const markedAsReviewed = useContent(ContentId.MarkedAsReviewed);\n\n const { onNextClick, isCatchupMode } = useCatchUpParams();\n\n const onMarkAsReviewed = useCallback(async () => {\n if (event?.viagVirtualId) {\n await addNote(markedAsReviewed);\n onUpdateLastReviewedDateTime(event.viagVirtualId);\n onNextClick();\n }\n }, [\n addNote,\n event?.viagVirtualId,\n markedAsReviewed,\n onNextClick,\n onUpdateLastReviewedDateTime,\n ]);\n\n const poIds = useMemo(() => {\n return (\n purchaseOrderAccordionItem?.entities?.map((tg) => String(tg.id)) || []\n );\n }, [purchaseOrderAccordionItem?.entities]);\n\n const tabs: TabItem[] = [\n {\n value: PurchaseEventTabs.Purchases,\n label: ,\n content: (\n \n ),\n className: styles.tabContent,\n },\n {\n value: PurchaseEventTabs.Tags,\n label: ,\n content: event?.viagVirtualId && (\n \n ),\n },\n ...(event?.viagId\n ? [\n {\n value: PurchaseEventTabs.Fulfillment,\n label: ,\n content: (\n \n ),\n },\n ]\n : []),\n ];\n\n if (!event) {\n if (\n quickFilterSearchParams ||\n getAppliedFilterCounts(tempQuery, initialQuery)\n )\n return (\n \n \n \n }\n >\n \n \n \n \n \n \n \n );\n }\n\n if (isLoading || !event) {\n return ;\n }\n\n return (\n
    \n 0\n ? poIds\n : null, // We have to pass in poIds cause we use tktGrpIds for filtering since this is a purchase event\n }}\n />\n }\n >\n
    \n {isMobile && (\n \n \n \n \n )}\n \n \n \n \n {isCatchupMode && (\n
    \n \n
    \n )}\n
    \n \n
    \n );\n}\n","import { useCallback, useMemo } from 'react';\nimport { useLocation, useSearchParams } from 'react-router-dom';\nimport { getDefaultReturnUrl } from 'src/components/Events/EventPage/utils';\nimport { MainFilterBar } from 'src/components/MainFilterBar';\nimport { PurchaseEventPage } from 'src/components/Purchases/PurchaseEventPage/PurchaseEventPage';\nimport { ActivePosEntityProvider } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { CatalogDataContextProvider } from 'src/contexts/CatalogDataContext';\nimport { CatalogMetricsContextProvider } from 'src/contexts/CatalogMetricsContext';\nimport { CatalogMultiSelectionContextProvider } from 'src/contexts/CatalogMultiSelectionContext';\nimport { DialogProvider } from 'src/contexts/DialogContext/DialogContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { FilterQueryContextProvider } from 'src/contexts/FilterQueryContext';\nimport { MultiSelectionContextProvider } from 'src/contexts/MultiSelectionContext';\nimport { SellerUserSettingsProvider } from 'src/contexts/SellerUserSettingsContext';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { LayoutContent } from 'src/navigations/LayoutContent';\nimport { queryIdSearchParam } from 'src/navigations/Routes/InventoryEvent/constants';\nimport {\n EventIdQueryParam,\n PurchaseDeeplinkQueryParam,\n} from 'src/utils/constants/constants';\nimport { removeDeepLinkUrlPartsFromRelativeUrl } from 'src/utils/deepLinkUtils';\nimport { EmptyPurchaseQuery } from 'src/utils/eventQueryUtils';\nimport { transformData } from 'src/utils/eventWithDataUtils';\nimport {\n getCatalogData,\n getCatalogDataExpanded,\n getCatalogMetrics,\n PURCHASE_USER_SETTINGS,\n purchaseQueryValueTransformFromUrl,\n purchaseQueryValueTransformToUrl,\n} from 'src/utils/purchaseUtils';\nimport { addTicketGroupMetrics } from 'src/utils/ticketMetricUtils';\nimport { EventPageLocationState } from 'src/utils/types/EventPageLocationState';\nimport {\n ActionOutboxEntityType,\n Feature,\n PurchaseClient,\n PurchaseOrderDetails,\n PurchaseOrderQuery,\n TicketGroupMetrics,\n UserSetting,\n} from 'src/WebApiController';\n\nimport {\n ACTIVE_EVENT_IDS_2_QUERY_PARAM,\n ACTIVE_EVENT_IDS_QUERY_PARAM,\n POS_EVENT_IDS_SEPARATOR,\n TAB_EVENT_IDS_2_QUERY_PARAM,\n TAB_EVENT_IDS_QUERY_PARAM,\n TAB_EVENT_IDS_SEPARATOR,\n} from '../InventoryEvent/InventoryEvent.constants';\nimport { MainRoute } from '../MainRoute';\n\nexport function PurchaseEvent() {\n const [searchParams] = useSearchParams();\n const oldPosEventId = searchParams.get(queryIdSearchParam);\n const viagEventId = searchParams.get(EventIdQueryParam);\n\n const activeEventIds = searchParams.get(ACTIVE_EVENT_IDS_QUERY_PARAM);\n const tabEventIds = searchParams.get(TAB_EVENT_IDS_QUERY_PARAM);\n\n const activeEventIds2 = searchParams.get(ACTIVE_EVENT_IDS_2_QUERY_PARAM);\n const tabEventIds2 = searchParams.get(TAB_EVENT_IDS_2_QUERY_PARAM);\n\n const location = useLocation();\n\n const posEventIds = useMemo(\n // We need to make sure all the ids in the params are lowercase or else it won't be found in the CatalogDataContext\n () =>\n (tabEventIds != null\n ? activeEventIds?.toLowerCase()?.split(POS_EVENT_IDS_SEPARATOR)\n : oldPosEventId?.toLowerCase()?.split(POS_EVENT_IDS_SEPARATOR)) ?? [],\n [activeEventIds, oldPosEventId, tabEventIds]\n );\n\n const viagogoVirtualId = useMemo(\n // We need to make sure all the ids in the params are lowercase or else it won't be found in the CatalogDataContext\n () =>\n tabEventIds2 != null\n ? activeEventIds2?.toLowerCase()\n : viagEventId?.toLowerCase(),\n [activeEventIds2, tabEventIds2, viagEventId]\n );\n\n const initialQuery = useMemo(() => {\n if (posEventIds.length || tabEventIds?.length) {\n const oldPosEventIds = tabEventIds\n ? tabEventIds\n .split(TAB_EVENT_IDS_SEPARATOR)\n .flatMap((eids) => eids.split(POS_EVENT_IDS_SEPARATOR))\n : posEventIds;\n return { ...EmptyPurchaseQuery, oldPosEventIds };\n } else if (tabEventIds2?.length || viagogoVirtualId) {\n const eventOrMappingIds = tabEventIds2\n ? tabEventIds2.split(TAB_EVENT_IDS_SEPARATOR)\n : [viagogoVirtualId!];\n return { ...EmptyPurchaseQuery, eventOrMappingIds };\n }\n\n return { ...EmptyPurchaseQuery };\n }, [posEventIds, tabEventIds, tabEventIds2, viagogoVirtualId]);\n\n const { trackError } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n\n const getCatalogDataExpandedCallback = useCallback(\n (ids: string[], filterQuery: PurchaseOrderQuery) =>\n getCatalogDataExpanded(ids, filterQuery, {\n activeAccountWebClientConfig,\n onError: (error) => {\n trackError('PurchaseClient.getTicketGroupsForEvents', error, {\n ...filterQuery,\n eventIds: ids,\n });\n },\n }),\n [activeAccountWebClientConfig, trackError]\n );\n\n const getActivePosEntity = useCallback(\n async (purchaseId: number) => {\n const purchaseDetails = await new PurchaseClient(\n activeAccountWebClientConfig\n ).getPurchaseOrderByPurchaseOrderId(purchaseId, false);\n if (purchaseDetails) {\n return {\n posEntityId: purchaseDetails.id,\n posEntity: purchaseDetails,\n event: null,\n posEntityDisplayId: purchaseDetails.id.toString(),\n };\n }\n\n return {};\n },\n [activeAccountWebClientConfig]\n );\n\n // Only use value provided at the first time (should be from '/purchases')\n const returnUrl = useMemo(() => {\n const locationState = (location.state ?? {}) as EventPageLocationState;\n\n if (locationState.returnUrl && locationState.keepReturnUrlUnchanged) {\n return locationState.returnUrl;\n }\n\n const relativeUrl =\n locationState.returnUrl || getDefaultReturnUrl('purchases', viagEventId);\n\n return removeDeepLinkUrlPartsFromRelativeUrl(relativeUrl, [\n PurchaseDeeplinkQueryParam,\n ACTIVE_EVENT_IDS_QUERY_PARAM,\n TAB_EVENT_IDS_QUERY_PARAM,\n ACTIVE_EVENT_IDS_2_QUERY_PARAM,\n TAB_EVENT_IDS_2_QUERY_PARAM,\n ]);\n }, [location.state, viagEventId]);\n\n const hasMetricsV2Feature = useUserHasFeature(Feature.CatalogMetricsV2);\n\n if (\n !posEventIds.length &&\n !tabEventIds?.length &&\n !tabEventIds2?.length &&\n !viagogoVirtualId\n ) {\n return null;\n }\n\n return (\n \n \n initialQuery={initialQuery}\n emptyQuery={EmptyPurchaseQuery}\n viewModeSettingId={UserSetting.PurchasePageViewMode}\n saveQueryInUrl\n queryValueTransformToUrl={purchaseQueryValueTransformToUrl}\n queryValueTransformFromUrl={purchaseQueryValueTransformFromUrl}\n >\n \n entityType={ActionOutboxEntityType.Purchase}\n queryKey=\"getCatalogForPurchaseOrders\"\n getCatalogData={(c, f) => getCatalogData(c, f, true)}\n getCatalogDataExpanded={getCatalogDataExpandedCallback}\n transformEventData={transformData}\n >\n \n queryKey=\"getCatalogTicketGroupMetrics\"\n entityType={ActionOutboxEntityType.Purchase}\n getCatalogMetrics={(c, f, r) =>\n getCatalogMetrics(c, f, r, hasMetricsV2Feature)\n }\n addCatalogMetrics={addTicketGroupMetrics}\n >\n \n entityType={ActionOutboxEntityType.Purchase}\n getActivePosEntity={getActivePosEntity}\n >\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n","import { Temporal } from '@js-temporal/polyfill';\nimport { useQuery } from '@tanstack/react-query';\nimport { max, min } from 'lodash-es';\nimport { useMemo } from 'react';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { DATA_REFRESH_RATE_IN_MILLIS_LONG } from 'src/utils/constants/constants';\nimport {\n roundRelativeDateDown,\n roundRelativeDateUp,\n} from 'src/utils/dateTimeUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n DateTimeRangeWithRelative,\n Feature,\n PurchaseClient,\n PurchaseOrderQuery,\n TimePeriodType,\n} from 'src/WebApiController';\n\nimport { useAppContext } from '../AppContext';\nimport { useCatalogDataContext } from '../CatalogDataContext';\nimport { useErrorBoundaryContext } from '../ErrorBoundaryContext';\nimport { useFilterQueryContext } from '../FilterQueryContext';\nimport { usePurchaseDataContext } from './PurchaseDataContext';\nimport { PURCHASE_SINGLE_TIME_PERIOD_QUERY_KEY } from './PurchaseDataContext.constants';\n\nexport const useSingleTimePeriodPurchasesQuery = (\n firstOfTimePeriod: string,\n isExpanded: boolean\n) => {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const { filterQuery } = useFilterQueryContext();\n const { trackError } = useErrorBoundaryContext();\n\n const { allEventIds } = useCatalogDataContext();\n\n const { purchaseGroupTimePeriod } = usePurchaseDataContext();\n\n const firstOfTimePeriodPlainDateTime =\n Temporal.PlainDateTime.from(firstOfTimePeriod);\n\n const timePeriodType = purchaseGroupTimePeriod;\n\n const lastOfTimePeriodPlainDateTime = (() => {\n switch (timePeriodType) {\n // TODO: To enable this we need to fix how we handle grouping time periods in the backend with timezones\n // case 'Daily':\n // return firstOfTimePeriodPlainDateTime\n // .with({\n // hour: 23,\n // minute: 59,\n // second: 59,\n // millisecond: 999,\n // })\n // .toString();\n case 'Weekly':\n return firstOfTimePeriodPlainDateTime\n .add({ days: 7 - firstOfTimePeriodPlainDateTime.dayOfWeek })\n .with({\n hour: 23,\n minute: 59,\n second: 59,\n millisecond: 999,\n })\n .toString();\n\n case 'Monthly':\n return firstOfTimePeriodPlainDateTime\n .with({\n day: firstOfTimePeriodPlainDateTime.daysInMonth,\n hour: 23,\n minute: 59,\n second: 59,\n millisecond: 999,\n })\n .toString();\n\n default:\n throw new Error(`Unsupported time period type: ${timePeriodType}`);\n }\n })();\n\n const timePeriodDateRange: DateTimeRangeWithRelative = useMemo(() => {\n let filterDateStart = '';\n let filterDateEnd = '';\n if (filterQuery.purchaseDates) {\n if (filterQuery.purchaseDates.start) {\n filterDateStart = filterQuery.purchaseDates.start;\n }\n if (filterQuery.purchaseDates.relativeStartSecs != null) {\n const relativeDateStart = new Date(\n new Date().getTime() +\n filterQuery.purchaseDates.relativeStartSecs * 1000\n );\n\n filterDateStart = roundRelativeDateUp(\n relativeDateStart,\n filterQuery.purchaseDates.roundingMode\n ).toISOString();\n }\n\n if (filterQuery.purchaseDates.end) {\n filterDateEnd = filterQuery.purchaseDates.end;\n }\n if (filterQuery.purchaseDates.relativeEndSecs != null) {\n const relativeDateEnd = new Date(\n new Date().getTime() +\n filterQuery.purchaseDates.relativeEndSecs * 1000\n );\n\n filterDateEnd = roundRelativeDateDown(\n relativeDateEnd,\n filterQuery.purchaseDates.roundingMode\n ).toISOString();\n }\n }\n\n return {\n start:\n max([firstOfTimePeriodPlainDateTime.toString(), filterDateStart]) ??\n null,\n end:\n min([lastOfTimePeriodPlainDateTime.toString(), filterDateEnd]) ?? null,\n } as DateTimeRangeWithRelative;\n }, [\n filterQuery.purchaseDates,\n firstOfTimePeriodPlainDateTime,\n lastOfTimePeriodPlainDateTime,\n ]);\n\n const moddedFilterQuery = {\n ...filterQuery,\n purchaseDates: timePeriodDateRange,\n };\n\n const singleTimePeriodPurchaseQuery = useQuery({\n queryKey: [\n PURCHASE_SINGLE_TIME_PERIOD_QUERY_KEY,\n isExpanded,\n moddedFilterQuery,\n allEventIds,\n ],\n queryFn: async () => {\n if (activeAccountWebClientConfig.activeAccountId == null) {\n return null;\n }\n\n const filterQueryWithEventIds = {\n ...moddedFilterQuery,\n eventOrMappingIds: (allEventIds ?? []).map((ev) => ev.viagVirtualId),\n performerIds: (allEventIds ?? [])\n .filter((ev) => ev.performerId != null)\n .map((ev) => ev.performerId!),\n venueIds: (allEventIds ?? []).map((ev) => ev.venueId),\n };\n\n // XXX Workaround for the backend\n // because backend treats empty arrays as \"no filter\" for backwards compatibility\n if (allEventIds?.length === 0) {\n return [];\n }\n\n return tryInvokeApi(\n async () => {\n const client = new PurchaseClient(activeAccountWebClientConfig);\n const filterQuery = filterQueryWithEventIds;\n\n const data =\n await client.getPurchaseOrdersWithTicketGroups(filterQuery);\n return data;\n },\n (error) => {\n trackError(\n PURCHASE_SINGLE_TIME_PERIOD_QUERY_KEY,\n error,\n moddedFilterQuery\n );\n }\n );\n },\n enabled: isExpanded && activeAccountWebClientConfig.activeAccountId != null,\n staleTime: Infinity, // Since we're always refetching on an interval, we don't want query to calculate whether the data is stale\n refetchOnWindowFocus: false,\n networkMode: 'offlineFirst',\n refetchInterval: DATA_REFRESH_RATE_IN_MILLIS_LONG,\n });\n\n return {\n singleTimePeriodPurchaseQuery,\n filterQuery: moddedFilterQuery as PurchaseOrderQuery,\n };\n};\n","import { useCallback, useMemo } from 'react';\nimport { MinRowsForUsingVirtuoso } from 'src/components/Accordions';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { useSingleTimePeriodPurchasesQuery } from 'src/contexts/PurchaseDataContext/useSingleTimePeriodPurchaseQuery';\nimport { PurchaseOrderTable } from 'src/tables/PurchaseTable';\nimport {\n PurchaseOrder,\n PurchaseOrderQuery,\n PurchaseOrderTicketGroup,\n TimePeriodContainingPurchaseOrderResult,\n} from 'src/WebApiController';\n\ntype VirtualizedPurchaseAccordionItemProps =\n TimePeriodContainingPurchaseOrderResult & {\n isExpanded: boolean;\n };\n\nexport function PurchaseDateItemBody({\n firstOfTimePeriod,\n isExpanded,\n ...rest\n}: VirtualizedPurchaseAccordionItemProps) {\n const { filterQuery } = useFilterQueryContext();\n\n const filterPurchaseOrders = useCallback(\n (purchaseOrders: PurchaseOrder[] | null | undefined) => {\n if (purchaseOrders && filterQuery.purchaseOrderState) {\n return purchaseOrders.filter(\n (po) => po.poState === filterQuery.purchaseOrderState\n );\n }\n\n return purchaseOrders;\n },\n [filterQuery.purchaseOrderState]\n );\n\n const { singleTimePeriodPurchaseQuery } = useSingleTimePeriodPurchasesQuery(\n firstOfTimePeriod,\n true // isExpanded should be true - as long as this is rendered, it is expanded. Otherwise UI will be laggy\n );\n\n const purchaseOrders = useMemo(\n () => filterPurchaseOrders(singleTimePeriodPurchaseQuery.data),\n [filterPurchaseOrders, singleTimePeriodPurchaseQuery.data]\n );\n\n const usingVirtuoso =\n (purchaseOrders?.length ?? rest.purchaseCount) > MinRowsForUsingVirtuoso;\n\n return (\n p as PurchaseOrderTicketGroup\n )}\n entityCount={rest.purchaseCount}\n useVirtuoso={usingVirtuoso}\n disablePagination\n enableColumnFilters\n />\n );\n}\n","import { format } from 'date-fns';\nimport { MultiSelectionToggleGroup } from 'src/components/common/MultiSelect/Toggle/MultiSelectionToggleGroup';\nimport { PurchasesBulkActionsPermissions } from 'src/components/Purchases/BulkActions/PurchasesBulkActionsPermissions';\nimport { Content } from 'src/contexts/ContentContext';\nimport { usePurchaseDataContext } from 'src/contexts/PurchaseDataContext';\nimport { Stack } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n Feature,\n TimePeriodContainingPurchaseOrderResult,\n TimePeriodType,\n} from 'src/WebApiController';\n\nimport * as styles from './PurchaseDateAccordion.css';\nimport {\n ItemsCountDiv,\n PurchaseItemHeaderDateDisplay,\n TotalCostDiv,\n} from './PurchaseDateAccordion.styled';\n\ntype PurchaseDateItemHeaderProps = TimePeriodContainingPurchaseOrderResult & {\n onToggleMultiSelect: (groupId: string, isChecked: boolean) => void;\n};\n\nexport const PurchaseDateItemHeader = (props: PurchaseDateItemHeaderProps) => {\n const { firstOfTimePeriod, purchaseCount, numOfTickets, totalCost } = props;\n\n const { purchaseGroupTimePeriod } = usePurchaseDataContext();\n\n const date = new Date(firstOfTimePeriod);\n const dateDisplay =\n purchaseGroupTimePeriod === TimePeriodType.Monthly\n ? format(date, 'MMM, yyyy')\n : format(date, 'MMM dd, yyyy');\n\n return (\n \n \n {dateDisplay}\n \n \n \n \n \n
    \n {totalCost?.disp}\n \n
    \n {purchaseCount}{' '}\n \n
    \n
    \n {numOfTickets}{' '}\n \n
    \n
    \n
    \n
    \n
    \n );\n};\n","import { useEffect, useMemo, useRef } from 'react';\nimport { MinRowsForUsingVirtuoso } from 'src/components/Accordions';\nimport {\n PosEventsAccordionBodyHeight,\n useSetEventsAccordionMaxHeight,\n} from 'src/components/Accordions/useSetEventsAccordionMaxHeight';\nimport { MultiSelectActionBar } from 'src/components/common/MultiSelect/MultiSelectActionBar';\nimport { PurchasesBulkActionsPermissions } from 'src/components/Purchases/BulkActions/PurchasesBulkActionsPermissions';\nimport { PurchasesTileBulkActions } from 'src/components/Purchases/BulkActions/PurchasesTileBulkActions/PurchasesTileBulkActions';\nimport {\n MultiSelectScope,\n useMultiSelectionContext,\n} from 'src/contexts/MultiSelectionContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport * as PosCollapsible from 'src/core/POS/PosCollapsible';\nimport { TimePeriodContainingPurchaseOrderResult } from 'src/WebApiController';\n\nimport * as eventStyles from '../EventsAccordion/EventsAccordion.css';\nimport * as styles from './PurchaseDateAccordion.css';\nimport { PurchaseDateItemBody } from './PurchaseDateItemBody';\nimport { PurchaseDateItemHeader } from './PurchaseDateItemHeader';\n\nexport type PurchaseDateAccordionMonthGroupItemProps = {\n item: TimePeriodContainingPurchaseOrderResult;\n selectedIds?: string[];\n onSelect: (id: string) => void;\n};\n\nexport const PurchaseDateAccordionMonthGroupItem = ({\n item,\n selectedIds,\n onSelect,\n}: PurchaseDateAccordionMonthGroupItemProps) => {\n const accordionBodyRef = useRef(null);\n const accordionHeaderRef = useRef(null);\n const { getGroupToggleState, selectionMode, toggleGroup, setSelectionMode } =\n useMultiSelectionContext();\n const groupId = item.firstOfTimePeriod;\n const isSelected = getGroupToggleState(groupId).isGroupSelected;\n\n const isAccordionOpen = useMemo(\n () => !!selectedIds?.includes(item.firstOfTimePeriod),\n [item.firstOfTimePeriod, selectedIds]\n );\n\n useSetEventsAccordionMaxHeight({\n enabled: item.purchaseCount > MinRowsForUsingVirtuoso,\n isExpanded: isAccordionOpen,\n accordionBodyRef,\n accordionHeaderRef,\n });\n\n useEffect(() => {\n if (\n !isAccordionOpen &&\n selectionMode &&\n selectionMode.groupId === item.firstOfTimePeriod &&\n selectionMode.mode === MultiSelectScope.SingleGroup\n ) {\n setSelectionMode();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isAccordionOpen, item.firstOfTimePeriod, selectionMode]);\n\n return (\n
    \n {selectionMode?.mode === MultiSelectScope.AllGroups && (\n
    \n toggleGroup(groupId)}\n />\n
    \n )}\n {\n onSelect(item.firstOfTimePeriod);\n }}\n >\n
    \n \n
    \n {\n if (selectedIds && !selectedIds.includes(groupId)) {\n onSelect(groupId);\n }\n }}\n />\n
    \n
    \n \n \n \n \n \n
    \n \n \n \n
    \n \n \n \n );\n};\n","import { format } from 'date-fns';\nimport { ReactNode, useEffect, useMemo, useRef } from 'react';\nimport { useScroll } from 'react-use';\nimport {\n Components,\n GroupedVirtuoso,\n GroupedVirtuosoHandle,\n} from 'react-virtuoso';\nimport { ListOnScrollProps } from 'react-window';\nimport { PageSection } from 'src/components/common/PageSection';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport {\n VirtuosoContext,\n VirtuosoTopListItemWrapper,\n} from 'src/core/ui/Virtuoso';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { PURCHASE_SORT_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport {\n EventUiSort,\n getEventSort,\n getEventUiSort,\n} from 'src/utils/eventQueryUtils';\nimport { getLocaleFromLanguageOrCurrent } from 'src/utils/localeUtils';\nimport {\n EventSort,\n PurchaseOrderQuery,\n TimePeriodContainingPurchaseOrderResult,\n} from 'src/WebApiController';\n\nimport * as eventStyles from '../EventsAccordion/EventsAccordion.css';\nimport * as styles from './PurchaseDateAccordion.css';\nimport { PurchaseDateAccordionMonthGroupItem } from './PurchaseDatesAccordionMonthGroupItem';\n\nconst PurchasesVirtuosoID = 'purchases-virtuoso';\n\nconst Header: Components['Header'] = ({\n context,\n}: {\n context?: VirtuosoContext;\n}) => {\n return <>{context?.before};\n};\n\nexport type VirtualizedPurchaseDatesAccordionProps = {\n before?: ReactNode;\n topListItemBefore?: ReactNode;\n onSelect: (id: string) => void;\n selectedIds?: string[];\n items: TimePeriodContainingPurchaseOrderResult[];\n scrollToId?: string;\n onScroll?: (props: ListOnScrollProps) => void;\n tableActions?: React.ReactElement;\n};\n\nexport const PurchaseDatesAccordion = ({\n before,\n onSelect,\n selectedIds,\n items,\n topListItemBefore,\n tableActions,\n}: VirtualizedPurchaseDatesAccordionProps) => {\n const scrollRef = useRef(null);\n const { y: scrollY } = useScroll(scrollRef);\n const { setAllGroupsIds } = useMultiSelectionContext();\n\n const { groups, groupCounts } = useMemo(() => {\n const groups: string[] = [];\n const groupCounts: number[] = [];\n for (const item of items) {\n const dividerText = format(new Date(item.firstOfTimePeriod), 'yyyy', {\n locale: getLocaleFromLanguageOrCurrent(),\n });\n if (groups.length === 0 || groups[groups.length - 1] !== dividerText) {\n groups.push(dividerText);\n groupCounts.push(1);\n } else {\n groupCounts[groupCounts.length - 1] += 1;\n }\n }\n return { groups, groupCounts };\n }, [items]);\n\n useEffect(() => {\n const itemsIds = items.map((item) => item.firstOfTimePeriod);\n setAllGroupsIds(itemsIds);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [items]);\n\n const virtuosoRef = useRef(null);\n const isLargeDesktop = useMatchMedia('largeDesktop');\n\n const { filterQuery, setFilterQuery } =\n useFilterQueryContext();\n\n return (\n {\n if (el instanceof HTMLElement) scrollRef.current = el;\n }}\n className={eventStyles.root}\n context={\n {\n before,\n scrollY,\n topListItemBefore,\n virtuosoId: PurchasesVirtuosoID,\n } satisfies VirtuosoContext\n }\n components={{\n Header,\n TopItemList: VirtuosoTopListItemWrapper,\n }}\n groupCounts={groupCounts}\n groupContent={(index) => {\n return (\n
    \n {\n virtuosoRef.current?.scrollToIndex({ groupIndex: index });\n }}\n action={\n
    \n {!isLargeDesktop && (\n {\n const [, isSortDescending] = getEventSort(sort);\n if (\n isSortDescending !== filterQuery?.isSortDescending\n ) {\n setFilterQuery({\n ...(filterQuery ?? {}),\n isSortDescending,\n });\n }\n }}\n valueOptionsContent={PURCHASE_SORT_TO_CID}\n />\n )}\n {tableActions}\n
    \n }\n >\n
    \n {(() => {\n const [month, year] = groups[index].split(' ');\n return (\n <>\n {month}\n  \n {year}\n \n );\n })()}\n
    \n \n
    \n );\n }}\n itemContent={(index) => (\n \n )}\n />\n );\n};\n","import { useState } from 'react';\nimport { ExportPurchasesButton } from 'src/components/Buttons';\nimport { useBulkActionsState } from 'src/components/common/BulkActions/useBulkActionsState';\nimport { useBulkCancelPurchase } from 'src/components/Purchases/PurchaseActionDropdown/components/BulkCancelPurchase';\nimport { useBulkDeleteTicketGroup } from 'src/components/Purchases/PurchaseActionDropdown/components/BulkDeleteTicketGroup';\nimport { useBulkEditCommissionAction } from 'src/components/Purchases/PurchaseActionDropdown/components/BulkEditCommissionAction';\nimport { useBulkUpdateDeliveryType } from 'src/components/Purchases/PurchaseActionDropdown/components/BulkUpdateDeliveryType';\nimport { useBulkUpdateInternalNotesAction } from 'src/components/Purchases/PurchaseActionDropdown/components/BulkUpdateInternalNotesAction';\nimport { useBulkUpdatePurchaseCurrencyCode } from 'src/components/Purchases/PurchaseActionDropdown/components/BulkUpdatePurchaseCurrencyCodeAction';\nimport { useBulkUpdatePurchaseSettings } from 'src/components/Purchases/PurchaseActionDropdown/components/BulkUpdatePurchaseGeneralSettings';\nimport { useBulkUpdateSeatTraits } from 'src/components/Purchases/PurchaseActionDropdown/components/BulkUpdateSeatTraits';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosDropdown, PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ChevronDownIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Feature } from 'src/WebApiController';\n\nimport { usePurchaseTileBulkActionsState } from '../../PurchasesTileBulkActions/usePurchaseTileBulkActionsState';\nimport { useUpdatePurchasesPermissions } from '../../useUpdatePurchasesPermissions';\nimport { PurchasesBulkActionProps } from '../PurchasesBulkActions.types';\n\nexport const SettingsActions = ({ isEventView }: PurchasesBulkActionProps) => {\n const { areBulkActionsEnabled } = useBulkActionsState();\n const [isLoading, setIsLoading] = useState(false);\n const { filterQueryWithEventIds } = usePurchaseTileBulkActionsState(\n undefined,\n isEventView\n );\n\n const hasExportPurchasesFeature = useUserHasFeature(Feature.ExportPurchases);\n\n const bulkUpdateGeneralSettings = useBulkUpdatePurchaseSettings(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n undefined\n );\n\n const bulkUpdateDeliveryType = useBulkUpdateDeliveryType(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n undefined,\n isEventView\n );\n\n const bulkUpdateSeatTraits = useBulkUpdateSeatTraits(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n undefined,\n isEventView\n );\n\n const bulkUpdateInternalNotes = useBulkUpdateInternalNotesAction(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n undefined\n );\n\n const bulkEditCommissionAction = useBulkEditCommissionAction(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n undefined\n );\n\n const bulkCancelPurchaseAction = useBulkCancelPurchase(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n undefined\n );\n\n const bulkDeleteTicketGroupAction = useBulkDeleteTicketGroup(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n undefined\n );\n\n const bulkUpdatePurchaseCurrencyCode = useBulkUpdatePurchaseCurrencyCode(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n undefined\n );\n\n const {\n hasUpdatePurchasesPermission,\n hasPurchaseUpdateCommissionPermission,\n } = useUpdatePurchasesPermissions();\n\n if (!hasUpdatePurchasesPermission && !hasPurchaseUpdateCommissionPermission) {\n return null;\n }\n\n return (\n <>\n \n \n \n \n }\n align=\"start\"\n triggerProps={{ disabled: isLoading || !areBulkActionsEnabled }}\n >\n {!isEventView && bulkUpdateGeneralSettings.dropDown}\n\n {bulkUpdateDeliveryType.dropDown}\n {bulkUpdateSeatTraits.dropDown}\n\n {!isEventView && bulkUpdateInternalNotes.dropDown}\n {!isEventView && bulkEditCommissionAction.dropDown}\n {!isEventView && bulkCancelPurchaseAction.dropDown}\n\n {isEventView && bulkDeleteTicketGroupAction.dropDown}\n\n {hasExportPurchasesFeature && (\n \n \n \n )}\n\n {!isEventView && bulkUpdatePurchaseCurrencyCode.dropDown}\n \n \n );\n};\n","import { useState } from 'react';\nimport { BulkEditTagsActionPermissionsHandler } from 'src/components/common/BulkActions/BulkEditTagsAction/BulkEditTagsActionPermissionsHandler';\nimport { useBulkActionsState } from 'src/components/common/BulkActions/useBulkActionsState';\nimport { useFilterQueryState } from 'src/components/MainFilterBar/useFilterQueryState';\nimport { useBulkEditTagsAction } from 'src/components/Purchases/PurchaseActionDropdown/components/BulkEditTagsAction';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosDropdown } from 'src/core/POS/PosDropdown';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { ChevronDownIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n ActionOutboxEntityType,\n PurchaseOrderQuery,\n} from 'src/WebApiController';\n\nimport { PurchasesBulkActionProps } from '../PurchasesBulkActions.types';\n\nexport const TagsActions = ({ isEventView }: PurchasesBulkActionProps) => {\n const { areBulkActionsEnabled } = useBulkActionsState();\n const [isLoading, setIsLoading] = useState(false);\n const { filterQueryWithEventIds } = useFilterQueryState(\n ActionOutboxEntityType.Purchase,\n undefined,\n isEventView\n );\n const bulkEditTags = useBulkEditTagsAction(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n undefined\n );\n\n if (isEventView) {\n return null;\n }\n\n return (\n \n \n \n \n \n }\n align=\"start\"\n triggerProps={{ disabled: isLoading || !areBulkActionsEnabled }}\n >\n {bulkEditTags.dropDown}\n \n \n );\n};\n","import { useState } from 'react';\nimport { useBulkActionsState } from 'src/components/common/BulkActions/useBulkActionsState';\nimport { useBulkConvertPurchasePaymentsAction } from 'src/components/Purchases/PurchaseActionDropdown/components/BulkConvertPurchasePaymentsAction';\nimport { useBulkMarkPurchaseAsPaid } from 'src/components/Purchases/PurchaseActionDropdown/components/BulkMarkPurchaseAsPaid';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosDropdown } from 'src/core/POS/PosDropdown';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { ChevronDownIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { usePurchaseTileBulkActionsState } from '../../PurchasesTileBulkActions/usePurchaseTileBulkActionsState';\nimport { BulkEditAccountingActionPermissionsHandler } from '../BulkEditAccountingActionPermissionsHandler';\nimport { PurchasesBulkActionProps } from '../PurchasesBulkActions.types';\n\nexport const AccountingActions = ({\n isEventView,\n}: PurchasesBulkActionProps) => {\n const { areBulkActionsEnabled } = useBulkActionsState();\n const [isLoading, setIsLoading] = useState(false);\n\n const { filterQueryWithEventIds } = usePurchaseTileBulkActionsState(\n undefined,\n isEventView\n );\n\n const bulkConvertPayments = useBulkConvertPurchasePaymentsAction(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n undefined\n );\n\n const bulkMarkPurchaseAsPaidAction = useBulkMarkPurchaseAsPaid(\n filterQueryWithEventIds,\n setIsLoading,\n isLoading,\n undefined\n );\n\n return (\n \n \n \n \n \n }\n align=\"start\"\n triggerProps={{ disabled: isLoading || !areBulkActionsEnabled }}\n >\n {!isEventView && bulkConvertPayments.dropDown}\n {bulkMarkPurchaseAsPaidAction.dropDown}\n \n \n );\n};\n","import { MultiSelectActionsContainer } from 'src/components/common/MultiSelect/MultiSelectActionsContainer';\nimport { SettingsActions } from 'src/components/Purchases/BulkActions/PurchasesGlobalBulkActions/Actions/SettingsActions';\nimport { TagsActions } from 'src/components/Purchases/BulkActions/PurchasesGlobalBulkActions/Actions/TagsActions';\n\nimport { AccountingActions } from './Actions/AccountingActions';\nimport { PurchasesBulkActionProps } from './PurchasesBulkActions.types';\n\nexport const PurchasesGlobalBulkActions = ({\n ...props\n}: PurchasesBulkActionProps) => {\n return (\n \n \n \n \n \n );\n};\n","import { ReactNode, useEffect, useMemo } from 'react';\nimport { useGetNoSelectedItemsLabel } from 'src/components/common/MultiSelect/useGetNoSelectedItemsLabel';\nimport { useContent } from 'src/contexts/ContentContext';\nimport {\n MultiSelectScope,\n useMultiSelectionContext,\n} from 'src/contexts/MultiSelectionContext';\nimport { unpackNumericIds } from 'src/contexts/MultiSelectionContext/MultiSelectionContext.utils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { EventWithData } from 'src/WebApiController';\n\ninterface SetPurchasesAccordionSelectionCountLabelProps {\n children: ReactNode;\n events: EventWithData[] | undefined;\n}\nexport const SetPurchasesAccordionSelectionCountLabel = ({\n children,\n events,\n}: SetPurchasesAccordionSelectionCountLabelProps) => {\n const {\n getSelection,\n totalItemsSelected,\n selectionMode,\n setSelectedCountLabel,\n setUsingCustomSelectedCountLabel,\n } = useMultiSelectionContext();\n\n const noItemsSelected = useGetNoSelectedItemsLabel();\n const isAllGroupsMode = selectionMode?.mode === MultiSelectScope.AllGroups;\n\n const eventText = useContent(ContentId.Event);\n const eventsText = useContent(ContentId.Events);\n const ticketGroupText = useContent(ContentId.TicketGroup);\n const ticketGroupsText = useContent(ContentId.TicketGroups);\n const selectedText = useContent(ContentId.Selected);\n const fromText = useContent(ContentId.From);\n\n useEffect(() => {\n setUsingCustomSelectedCountLabel(true);\n }, [setUsingCustomSelectedCountLabel]);\n\n const eventWithDataMap = useMemo>(() => {\n const map: Record = {};\n events?.forEach((item) => {\n const id = item.event.viagVirtualId;\n map[id] = item;\n });\n return map;\n }, [events]);\n\n const selectedCountLabel = useMemo(() => {\n if (!totalItemsSelected) {\n return noItemsSelected;\n }\n\n const selection = getSelection();\n\n let eventsCount = 0;\n let ticketGroupsCount = 0;\n\n if (isAllGroupsMode) {\n eventsCount = new Set([\n ...selection.groupIds,\n ...selection.items.groupIds,\n ]).size;\n }\n\n // Ticket groups count & purchase orders count\n // All group selected\n selection.groupIds.forEach((eventId) => {\n ticketGroupsCount += eventWithDataMap[eventId]?.counts?.tktGrpsCnt ?? 0;\n });\n\n // Single elements selected - Ticket Group & Purchase Orders count\n const ticketGroupIdsSet = new Set();\n selection.items.itemIds.forEach((id) => {\n const [poId, tckGroupId] = unpackNumericIds(id);\n ticketGroupIdsSet.add(tckGroupId);\n });\n\n ticketGroupsCount += ticketGroupIdsSet.size;\n\n const eventsLabel = eventsCount === 1 ? eventText : eventsText;\n const ticketsGroupLabel =\n ticketGroupsCount === 1 ? ticketGroupText : ticketGroupsText;\n\n return (\n isAllGroupsMode\n ? `${ticketGroupsCount} ${ticketsGroupLabel} ${selectedText} ${fromText} ${eventsCount} ${eventsLabel}`\n : `${ticketGroupsCount} ${ticketsGroupLabel} ${selectedText}`\n ).toLocaleLowerCase();\n }, [\n eventText,\n eventWithDataMap,\n eventsText,\n fromText,\n getSelection,\n isAllGroupsMode,\n noItemsSelected,\n selectedText,\n ticketGroupText,\n ticketGroupsText,\n totalItemsSelected,\n ]);\n\n useEffect(() => {\n setSelectedCountLabel(selectedCountLabel);\n }, [selectedCountLabel, setSelectedCountLabel]);\n\n return <>{children};\n};\n","import { ReactNode, useEffect, useMemo } from 'react';\nimport { useGetNoSelectedItemsLabel } from 'src/components/common/MultiSelect/useGetNoSelectedItemsLabel';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { ContentId } from 'src/utils/constants/contentId';\n\ninterface SetPurchasesFlattenedViewSelectionCountLabelProps {\n children: ReactNode;\n}\n\nexport const SetPurchasesFlattenedViewSelectionCountLabel = ({\n children,\n}: SetPurchasesFlattenedViewSelectionCountLabelProps) => {\n const purchaseText = useContent(ContentId.Purchase);\n const purchasesText = useContent(ContentId.Purchases);\n const selectedText = useContent(ContentId.Selected);\n const {\n setSelectedCountLabel,\n totalItemsSelected,\n setUsingCustomSelectedCountLabel,\n } = useMultiSelectionContext();\n\n const noSelectedItemsLabel = useGetNoSelectedItemsLabel();\n\n useEffect(() => {\n setUsingCustomSelectedCountLabel(true);\n }, [setUsingCustomSelectedCountLabel]);\n\n const selectedCountLabel = useMemo(() => {\n if (!totalItemsSelected) {\n return noSelectedItemsLabel;\n }\n\n const selectedItemsLabel =\n totalItemsSelected === 1 ? purchaseText : purchasesText;\n return `${totalItemsSelected} ${selectedItemsLabel} ${selectedText}`.toLocaleLowerCase();\n }, [\n noSelectedItemsLabel,\n purchaseText,\n purchasesText,\n selectedText,\n totalItemsSelected,\n ]);\n\n useEffect(() => {\n setSelectedCountLabel(selectedCountLabel);\n }, [selectedCountLabel, setSelectedCountLabel]);\n\n return <>{children};\n};\n","import { ReactNode, useEffect, useMemo } from 'react';\nimport { useGetNoSelectedItemsLabel } from 'src/components/common/MultiSelect/useGetNoSelectedItemsLabel';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport { ContentId } from 'src/utils/constants/contentId';\n\ninterface SetPurchasesTimeViewSelectionCountLabelProps {\n children: ReactNode;\n}\n\nexport const SetPurchasesTimeViewSelectionCountLabel = ({\n children,\n}: SetPurchasesTimeViewSelectionCountLabelProps) => {\n const purchaseText = useContent(ContentId.Purchase);\n const purchasesText = useContent(ContentId.Purchases);\n const selectedText = useContent(ContentId.Selected);\n const {\n setSelectedCountLabel,\n totalItemsSelected,\n getSelection,\n setUsingCustomSelectedCountLabel,\n getGroupSelectableGroupMetadata,\n } = useMultiSelectionContext();\n\n const noSelectedItemsLabel = useGetNoSelectedItemsLabel();\n\n useEffect(() => {\n setUsingCustomSelectedCountLabel(true);\n }, [setUsingCustomSelectedCountLabel]);\n\n const selectedCountLabel = useMemo(() => {\n if (!totalItemsSelected) {\n return noSelectedItemsLabel;\n }\n\n const selection = getSelection();\n\n let purchasesCount = 0;\n\n const singleSelectedItems = new Set(\n selection.items.itemIds.filter((itemId) => parseInt(itemId) > 0) ?? []\n );\n\n purchasesCount += singleSelectedItems.size;\n\n selection.groupIds.forEach((groupId) => {\n const g = getGroupSelectableGroupMetadata(groupId);\n purchasesCount += g?.itemCount ?? 0;\n });\n\n const selectedPurchasesLabel =\n purchasesCount === 1 ? purchaseText : purchasesText;\n\n return `${purchasesCount} ${selectedPurchasesLabel} ${selectedText}`.toLocaleLowerCase();\n }, [\n totalItemsSelected,\n getSelection,\n purchaseText,\n purchasesText,\n selectedText,\n noSelectedItemsLabel,\n getGroupSelectableGroupMetadata,\n ]);\n\n useEffect(() => {\n setSelectedCountLabel(selectedCountLabel);\n }, [selectedCountLabel, setSelectedCountLabel]);\n\n return <>{children};\n};\n","import { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport { useDefaultPaymentsColumnConfig } from 'src/tables/PaymentsTable/useDefaultPaymentsColumnConfig';\nimport {\n defaultEventsColumnsConfig,\n defaultListingColumnsConfig,\n defaultListingFlattenedColumnsConfig,\n defaultOnSaleEventsColumnsConfig,\n defaultPurchaseEventEnabledColumnsConfig,\n defaultPurchasesColumnsConfig,\n defaultSalesColumnsConfig,\n defaultSalesFlattenedColumnsConfig,\n} from 'src/utils/columns/columnUtils';\nimport {\n CustomEventsColumn,\n CustomOnSaleEventsColumn,\n} from 'src/utils/columns/events/eventsCustomColumnUtils.types';\nimport { CustomListingColumn } from 'src/utils/columns/inventory/inventoryCustomColumnUtils.types';\nimport { CustomMarketplacePaymentsColumn } from 'src/utils/columns/payments/paymentsCustomColumnUtils.types';\nimport { CustomPurchasesColumn } from 'src/utils/columns/purchases/purchasesCustomColumnUtils.types';\nimport { CustomSalesColumn } from 'src/utils/columns/sales/salesCustomColumnUtils.types';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport { UserSetting } from 'src/WebApiController';\n\nexport const useColumnServerUserSettings = <\n T extends\n | CustomEventsColumn\n | CustomListingColumn\n | CustomPurchasesColumn\n | CustomSalesColumn\n | CustomMarketplacePaymentsColumn\n | CustomOnSaleEventsColumn,\n>({\n sectionType,\n}: {\n sectionType: SectionType;\n}) => {\n const {\n value: storedEventsColumnOrderSetting = defaultEventsColumnsConfig,\n setUserSetting: setEventsColumnOrderSetting,\n } = useServerUserSetting({\n id: UserSetting.EventsColumnOrder,\n });\n const {\n value: storedInventoryColumnOrderSetting = defaultListingColumnsConfig,\n setUserSetting: setInventoryColumnOrderSetting,\n } = useServerUserSetting({\n id: UserSetting.InventoryColumnOrder,\n });\n const {\n value:\n storedInventoryFlattenedColumnOrderSetting = defaultListingFlattenedColumnsConfig,\n setUserSetting: setInventoryFlattenedColumnOrderSetting,\n } = useServerUserSetting({\n id: UserSetting.InventoryFlattenedColumnOrder,\n });\n const {\n value:\n storedInventorySideTableColumnOrderSetting = defaultListingColumnsConfig,\n setUserSetting: setInventorySideTableColumnOrderSetting,\n } = useServerUserSetting({\n id: UserSetting.InventorySideTableColumnOrder,\n });\n const {\n value: storedSaleColumnOrderSetting = defaultSalesColumnsConfig,\n setUserSetting: setSaleColumnOrderSetting,\n } = useServerUserSetting({\n id: UserSetting.SaleColumnOrder,\n });\n const {\n value:\n storedSaleFlattenedColumnOrderSetting = defaultSalesFlattenedColumnsConfig,\n setUserSetting: setSaleFlattenedColumnOrderSetting,\n } = useServerUserSetting({\n id: UserSetting.SaleFlattenedColumnOrder,\n });\n const {\n value: storedSaleSideTableColumnOrderSetting = defaultSalesColumnsConfig,\n setUserSetting: setSaleSideTableColumnOrderSetting,\n } = useServerUserSetting({\n id: UserSetting.SalesSideTableColumnOrder,\n });\n const {\n value: storedPurchaseColumnOrderSetting = defaultPurchasesColumnsConfig,\n setUserSetting: setPurchaseColumnOrderSetting,\n } = useServerUserSetting({\n id: UserSetting.PurchaseColumnOrder,\n });\n const {\n value:\n storedPurchaseEventColumnOrderSetting = defaultPurchaseEventEnabledColumnsConfig,\n setUserSetting: setPurchaseEventColumnOrderSetting,\n } = useServerUserSetting({\n id: UserSetting.PurchaseEventColumnOrder,\n });\n const {\n value: storedPurchaseSideTableOrderSetting = defaultPurchasesColumnsConfig,\n setUserSetting: setPurchaseSideTableOrderSetting,\n } = useServerUserSetting({\n id: UserSetting.PurchaseSideTableColumnOrder,\n });\n\n const defaultPaymentsColumnsConfig = useDefaultPaymentsColumnConfig();\n const {\n value: storedPaymentsTableOrderSetting = defaultPaymentsColumnsConfig,\n setUserSetting: setPaymentsTableOrderSetting,\n } = useServerUserSetting({\n id: UserSetting.MarketplacePaymentsTableColumnOrder,\n });\n const {\n value:\n storedOnSaleEventTableOrderSetting = defaultOnSaleEventsColumnsConfig,\n setUserSetting: setOnSaleEventTableOrderSetting,\n } = useServerUserSetting({\n id: UserSetting.OnSaleEventColumnsOrder,\n });\n\n const storedColumnOrderSetting = {\n [SectionType.Events]: storedEventsColumnOrderSetting,\n [SectionType.Listings]: storedInventoryColumnOrderSetting,\n [SectionType.ListingsFlattened]: storedInventoryFlattenedColumnOrderSetting,\n [SectionType.InventorySideTable]:\n storedInventorySideTableColumnOrderSetting,\n [SectionType.ListingsReport]: [],\n [SectionType.Sales]: storedSaleColumnOrderSetting,\n [SectionType.SalesFlattened]: storedSaleFlattenedColumnOrderSetting,\n [SectionType.SalesReport]: [],\n [SectionType.SalesSideTable]: storedSaleSideTableColumnOrderSetting,\n [SectionType.Purchases]: storedPurchaseColumnOrderSetting,\n [SectionType.PurchaseEvent]: storedPurchaseEventColumnOrderSetting,\n [SectionType.PurchaseSideTable]: storedPurchaseSideTableOrderSetting,\n [SectionType.MarketplacePaymentsTable]: storedPaymentsTableOrderSetting,\n [SectionType.OnSaleEvents]: storedOnSaleEventTableOrderSetting,\n }[sectionType];\n\n const setColumnOrderSetting = {\n [SectionType.Events]: setEventsColumnOrderSetting,\n [SectionType.Listings]: setInventoryColumnOrderSetting,\n [SectionType.ListingsFlattened]: setInventoryFlattenedColumnOrderSetting,\n [SectionType.ListingsReport]: () => console.log('Unused'),\n [SectionType.InventorySideTable]: setInventorySideTableColumnOrderSetting,\n [SectionType.Sales]: setSaleColumnOrderSetting,\n [SectionType.SalesFlattened]: setSaleFlattenedColumnOrderSetting,\n [SectionType.SalesReport]: () => console.log('Unused'),\n [SectionType.SalesSideTable]: setSaleSideTableColumnOrderSetting,\n [SectionType.Purchases]: setPurchaseColumnOrderSetting,\n [SectionType.PurchaseEvent]: setPurchaseEventColumnOrderSetting,\n [SectionType.PurchaseSideTable]: setPurchaseSideTableOrderSetting,\n [SectionType.MarketplacePaymentsTable]: setPaymentsTableOrderSetting,\n [SectionType.OnSaleEvents]: setOnSaleEventTableOrderSetting,\n }[sectionType];\n\n const {\n value: customEventsColumns = [],\n setUserSetting: setCustomEventsColumns,\n } = useServerUserSetting({\n id: UserSetting.EventsCustomColumns,\n });\n const {\n value: customListingColumns = [],\n setUserSetting: setCustomListingColumns,\n } = useServerUserSetting({\n id: UserSetting.InventoryCustomColumns,\n });\n const {\n value: customSaleColumns = [],\n setUserSetting: setCustomSaleColumns,\n } = useServerUserSetting({\n id: UserSetting.SaleCustomColumns,\n });\n const {\n value: customPurchaseColumns = [],\n setUserSetting: setCustomPurchaseColumns,\n } = useServerUserSetting({\n id: UserSetting.PurchaseCustomColumns,\n });\n const {\n value: customPaymentsColumns = [],\n setUserSetting: setCustomPaymentsColumns,\n } = useServerUserSetting({\n id: UserSetting.MarketplacePaymentsCustomColumns,\n });\n const {\n value: customDiscoveryColumns = [],\n setUserSetting: setCustomDiscoveryColumns,\n } = useServerUserSetting({\n id: UserSetting.MarketplacePaymentsCustomColumns,\n });\n\n const setCustomColumns = {\n [SectionType.Events]: setCustomEventsColumns,\n [SectionType.Listings]: setCustomListingColumns,\n [SectionType.ListingsFlattened]: setCustomListingColumns,\n [SectionType.ListingsReport]: () => console.log('Unused'),\n [SectionType.InventorySideTable]: setCustomListingColumns,\n [SectionType.Sales]: setCustomSaleColumns,\n [SectionType.SalesFlattened]: setCustomSaleColumns,\n [SectionType.SalesReport]: () => console.log('Unused'),\n [SectionType.SalesSideTable]: setCustomSaleColumns,\n [SectionType.Purchases]: setCustomPurchaseColumns,\n [SectionType.PurchaseEvent]: setCustomPurchaseColumns,\n [SectionType.PurchaseSideTable]: setCustomPurchaseColumns,\n [SectionType.MarketplacePaymentsTable]: setCustomPaymentsColumns,\n [SectionType.OnSaleEvents]: setCustomDiscoveryColumns,\n }[sectionType] as (value: T[]) => void;\n\n const customColumns = {\n [SectionType.Events]: customEventsColumns,\n [SectionType.Listings]: customListingColumns,\n [SectionType.ListingsFlattened]: customListingColumns,\n [SectionType.ListingsReport]: [], // Unused\n [SectionType.InventorySideTable]: customListingColumns,\n [SectionType.Sales]: customSaleColumns,\n [SectionType.SalesFlattened]: customSaleColumns,\n [SectionType.SalesReport]: [], // Unused\n [SectionType.SalesSideTable]: customSaleColumns,\n [SectionType.Purchases]: customPurchaseColumns,\n [SectionType.PurchaseEvent]: customPurchaseColumns,\n [SectionType.PurchaseSideTable]: customPurchaseColumns,\n [SectionType.MarketplacePaymentsTable]: customPaymentsColumns,\n [SectionType.OnSaleEvents]: customDiscoveryColumns,\n };\n\n const {\n value: storedEventsColumnsEnabledSetting,\n setUserSetting: setEventsColumnsEnabledSetting,\n } = useServerUserSetting({\n id: UserSetting.EventsColumnsEnabled,\n });\n const {\n value: storedInventoryColumnsEnabledSetting,\n setUserSetting: setInventoryColumnsEnabledSetting,\n } = useServerUserSetting({\n id: UserSetting.InventoryColumnsEnabled,\n });\n const {\n value: storedInventoryFlattenedColumnsEnabledSetting,\n setUserSetting: setInventoryFlattenedColumnsEnabledSetting,\n } = useServerUserSetting({\n id: UserSetting.InventoryFlattenedColumnsEnabled,\n });\n const {\n value: storedInventorySideTableColumnsEnabledSetting,\n setUserSetting: setInventorySideTableColumnsEnabledSetting,\n } = useServerUserSetting({\n id: UserSetting.InventorySideTableColumnsEnabled,\n });\n const {\n value: storedSaleColumnsEnabledSetting,\n setUserSetting: setSaleColumnsEnabledSetting,\n } = useServerUserSetting({\n id: UserSetting.SaleColumnsEnabled,\n });\n const {\n value: storedSaleFlattenedColumnsEnabledSetting,\n setUserSetting: setSaleFlattenedColumnsEnabledSetting,\n } = useServerUserSetting({\n id: UserSetting.SaleFlattenedColumnsEnabled,\n });\n const {\n value: storedSaleSideTableColumnsEnabledSetting,\n setUserSetting: setSaleSideTableColumnsEnabledSetting,\n } = useServerUserSetting({\n id: UserSetting.SalesSideTableColumnsEnabled,\n });\n const {\n value: storedPurchaseColumnsEnabledSetting,\n setUserSetting: setPurchaseColumnsEnabledSetting,\n } = useServerUserSetting({\n id: UserSetting.PurchaseColumnsEnabled,\n });\n const {\n value:\n storedPurchaseEventColumnsEnabledSetting = defaultPurchaseEventEnabledColumnsConfig,\n setUserSetting: setPurchaseEventColumnsEnabledSetting,\n } = useServerUserSetting({\n id: UserSetting.PurchaseEventColumnsEnabled,\n });\n const {\n value: storedPurchaseSideTableColumnsEnabledSetting,\n setUserSetting: setPurchaseSideTableColumnsEnabledSetting,\n } = useServerUserSetting({\n id: UserSetting.PurchaseSideTableColumnsEnabled,\n });\n const {\n value: storedPaymentsTableColumnsEnabledSetting,\n setUserSetting: setPaymentsTableColumnsEnabledSetting,\n } = useServerUserSetting({\n id: UserSetting.MarketplacePaymentsTableColumnsEnabled,\n });\n const {\n value: storedDiscoveryTableColumnsEnabledSetting,\n setUserSetting: setDiscoveryTableColumnsEnabledSetting,\n } = useServerUserSetting({\n id: UserSetting.OnSaleEventColumnsEnabled,\n });\n\n const storedColumnsEnabledSetting = {\n [SectionType.Events]: storedEventsColumnsEnabledSetting,\n [SectionType.Listings]: storedInventoryColumnsEnabledSetting,\n [SectionType.ListingsFlattened]:\n storedInventoryFlattenedColumnsEnabledSetting,\n [SectionType.ListingsReport]: [],\n [SectionType.InventorySideTable]:\n storedInventorySideTableColumnsEnabledSetting,\n [SectionType.Sales]: storedSaleColumnsEnabledSetting,\n [SectionType.SalesFlattened]: storedSaleFlattenedColumnsEnabledSetting,\n [SectionType.SalesReport]: [],\n [SectionType.SalesSideTable]: storedSaleSideTableColumnsEnabledSetting,\n [SectionType.Purchases]: storedPurchaseColumnsEnabledSetting,\n [SectionType.PurchaseEvent]: storedPurchaseEventColumnsEnabledSetting,\n [SectionType.PurchaseSideTable]:\n storedPurchaseSideTableColumnsEnabledSetting,\n [SectionType.MarketplacePaymentsTable]:\n storedPaymentsTableColumnsEnabledSetting,\n [SectionType.OnSaleEvents]: storedDiscoveryTableColumnsEnabledSetting,\n }[sectionType];\n\n const setColumnsEnabledSetting = {\n [SectionType.Events]: setEventsColumnsEnabledSetting,\n [SectionType.Listings]: setInventoryColumnsEnabledSetting,\n [SectionType.ListingsFlattened]: setInventoryFlattenedColumnsEnabledSetting,\n [SectionType.ListingsReport]: () => console.log('Unused'),\n [SectionType.InventorySideTable]:\n setInventorySideTableColumnsEnabledSetting,\n [SectionType.Sales]: setSaleColumnsEnabledSetting,\n [SectionType.SalesFlattened]: setSaleFlattenedColumnsEnabledSetting,\n [SectionType.SalesReport]: () => console.log('Unused'),\n [SectionType.SalesSideTable]: setSaleSideTableColumnsEnabledSetting,\n [SectionType.Purchases]: setPurchaseColumnsEnabledSetting,\n [SectionType.PurchaseEvent]: setPurchaseEventColumnsEnabledSetting,\n [SectionType.PurchaseSideTable]: setPurchaseSideTableColumnsEnabledSetting,\n [SectionType.MarketplacePaymentsTable]:\n setPaymentsTableColumnsEnabledSetting,\n [SectionType.OnSaleEvents]: setDiscoveryTableColumnsEnabledSetting,\n }[sectionType];\n\n return {\n storedColumnOrderSetting,\n setColumnOrderSetting,\n customColumns,\n setCustomColumns,\n storedColumnsEnabledSetting,\n setColumnsEnabledSetting,\n };\n};\n","import { UniqueIdentifier } from '@dnd-kit/core';\nimport { AnimateLayoutChanges, useSortable } from '@dnd-kit/sortable';\nimport { CSS } from '@dnd-kit/utilities';\nimport { ReactNode } from 'react';\nimport { PlaceholderColumnGroupListItem } from 'src/modals/ColumnSettings/ColumnGroupListItem';\n\n/**\n * Extends functionality of any group component to inherit sort functionality\n */\nexport const DropGroupWrapper = ({\n children,\n id,\n columnIdDisplayNameMapping,\n}: {\n children: ReactNode;\n id: UniqueIdentifier;\n columnIdDisplayNameMapping: Record;\n}) => {\n const animateLayoutChanges: AnimateLayoutChanges = ({\n isSorting,\n wasDragging,\n }) => (isSorting || wasDragging ? false : true);\n\n const {\n attributes,\n listeners,\n setNodeRef,\n transform,\n transition,\n isDragging,\n } = useSortable({ id, animateLayoutChanges });\n\n // When dragging, collapse the children to show one item only\n return (\n \n {isDragging ? (\n \n ) : (\n children\n )}\n \n );\n};\n","import { SortableContext } from '@dnd-kit/sortable';\nimport clsx from 'clsx';\nimport { DropWrapper } from 'src/core/POS/DragAndDropSort/DragAndDrop';\nimport { DropGroupWrapper } from 'src/core/POS/DragAndDropSort/DragAndDropGroup';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { HamburgerMenuIcon } from 'src/svgs/HamburgerMenuIcon';\n\nimport { ColumnListItem } from '../InventoryTableColumns/ColumnListItem/ColumnListItem';\nimport * as styles from './ColumnGroupListItem.css';\n\nexport const PlaceholderColumnGroupListItem = ({\n displayName,\n}: {\n displayName: string;\n}) => {\n return (\n \n \n \n {displayName}\n \n \n \n );\n};\n\nexport const ColumnGroupListItem = ({\n id,\n groupIndex,\n items,\n columnIdDisplayNameMapping,\n highlightIndex,\n renderActions,\n}: {\n id: string;\n groupIndex: number;\n items: string[];\n columnIdDisplayNameMapping: Record;\n highlightIndex?: number;\n renderActions: (id: string) => JSX.Element;\n}) => {\n return (\n \n \n
    \n
    \n \n \n {columnIdDisplayNameMapping[id]}\n \n
    \n
    \n {items.map((item, index) => {\n return (\n \n \n \n {columnIdDisplayNameMapping[item]}\n \n \n \n );\n })}\n
    \n
    \n
    \n \n );\n};\n","import { useCallback, useMemo } from 'react';\nimport { PurchasesTableColumnId } from 'src/utils/columns/purchases/purchasesColumnUtils.types';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport { PurchaseViewMode } from 'src/WebApiController';\n\nimport { ColumnItem } from '../ColumnsSectionV2';\n\ntype ColumnGroupConfig = {\n id: string;\n columns: string[];\n} | null;\n\nfunction adaptColumnToGroups(\n columns: string[],\n ticketGroupColumns: ColumnGroupConfig\n): ColumnItem[] {\n if (!ticketGroupColumns) {\n return columns.map((column) => ({ id: column, children: [] }));\n }\n\n const adaptedColumns: ColumnItem[] = [];\n const ticketGroup: ColumnItem = {\n id: ticketGroupColumns.id || '',\n children: [],\n };\n let firstTicketGroupColumnIndex = -1;\n columns.forEach((column, index) => {\n if (ticketGroupColumns.columns.includes(column)) {\n if (firstTicketGroupColumnIndex === -1) {\n firstTicketGroupColumnIndex = index;\n }\n ticketGroup.children?.push(column);\n } else {\n adaptedColumns.push({ id: column, children: [] });\n }\n });\n\n if (\n ticketGroup.id &&\n ticketGroup.children &&\n ticketGroup.children.length > 0\n ) {\n adaptedColumns.splice(firstTicketGroupColumnIndex, 0, ticketGroup);\n }\n\n return adaptedColumns;\n}\n\n/**\n * Hook to adapt columns to groups\n * @param columns\n * @param sectionType\n * @param viewMode Only supported for Purchase for now, used for filtering visible columns\n * @returns\n * - adaptedColumns: columns adapted to groups\n * - flattenColumns: flatten columns\n * - columnGroup: column group config\n **/\nexport const useAdaptedColumns = ({\n columns,\n sectionType,\n viewMode,\n}: {\n columns: string[];\n sectionType: SectionType;\n viewMode?: string | null;\n}) => {\n const COLUMN_GROUPS = useMemo(\n () => ({\n [SectionType.Listings]: null,\n [SectionType.Sales]: null,\n [SectionType.ListingsReport]: null,\n [SectionType.SalesReport]: null,\n [SectionType.Events]: null,\n [SectionType.ListingsFlattened]: null,\n [SectionType.SalesFlattened]: null,\n [SectionType.SalesSideTable]: null,\n [SectionType.InventorySideTable]: null,\n [SectionType.PurchaseSideTable]: null,\n [SectionType.Purchases]:\n viewMode === PurchaseViewMode.TileView\n ? {\n id: 'ticketGroup',\n columns: [\n PurchasesTableColumnId.Event,\n PurchasesTableColumnId.Venue,\n PurchasesTableColumnId.EventDate,\n PurchasesTableColumnId.Seating,\n PurchasesTableColumnId.Row,\n PurchasesTableColumnId.Seats,\n PurchasesTableColumnId.SeatTraits,\n ],\n }\n : null,\n [SectionType.PurchaseEvent]: null,\n [SectionType.MarketplacePaymentsTable]: null,\n [SectionType.OnSaleEvents]: null,\n }),\n [viewMode]\n );\n\n const adaptedColumns = useMemo(() => {\n return adaptColumnToGroups(columns, COLUMN_GROUPS[sectionType]);\n }, [columns, sectionType, COLUMN_GROUPS]);\n\n const flattenColumns = useCallback((columns: ColumnItem[]): string[] => {\n return columns.flatMap((column) =>\n column.children && column.children.length > 0\n ? column.children\n : column.id\n );\n }, []);\n\n return {\n adaptedColumns,\n flattenColumns,\n columnGroup: COLUMN_GROUPS[sectionType],\n };\n};\n","import {\n DndContext,\n DragEndEvent,\n DragOverlay,\n UniqueIdentifier,\n} from '@dnd-kit/core';\nimport {\n SortableContext,\n verticalListSortingStrategy,\n} from '@dnd-kit/sortable';\nimport { useState } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { DropWrapper } from 'src/core/POS/DragAndDropSort/DragAndDrop';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SectionType } from 'src/utils/types/sectionType';\n\nimport { ColumnListItem } from '../InventoryTableColumns/ColumnListItem/ColumnListItem';\nimport { useColumnDisplayName } from '../InventoryTableColumns/useColumnDisplayName';\nimport {\n ColumnGroupListItem,\n PlaceholderColumnGroupListItem,\n} from './ColumnGroupListItem';\nimport * as styles from './ColumnsSection.css';\nimport { useAdaptedColumns } from './hooks/useAdaptedColumns';\n\nexport type ColumnItem = {\n id: string;\n children?: string[];\n};\n\ntype ColumnsSelectionProps = {\n titleContentId?: ContentId;\n items?: string[];\n renderActions: (id: string) => JSX.Element;\n onDragEnd?: (event: DragEndEvent) => void;\n sectionType: SectionType;\n highlightIndex?: number;\n shouldHideItem?: (id: string) => boolean;\n viewMode?: string | null;\n};\n\n/**\n * The sections that represent the Add Columns and Current Columns for the Edit Columns experience\n */\nexport const ColumnsSection = ({\n titleContentId,\n items = [],\n renderActions,\n onDragEnd,\n sectionType,\n highlightIndex,\n shouldHideItem,\n viewMode,\n}: ColumnsSelectionProps) => {\n const { adaptedColumns, columnGroup } = useAdaptedColumns({\n columns: items,\n sectionType,\n viewMode,\n });\n\n const { columnIdDisplayNameMapping } = useColumnDisplayName({\n columnIds: [...items, columnGroup?.id || ''],\n sectionType,\n });\n\n const [activeId, setActiveId] = useState(null);\n\n const renderColumnListItem = (\n id: string,\n index: number,\n isPlaceholder = false\n ) => {\n return (\n \n \n {columnIdDisplayNameMapping[id]}\n \n \n );\n };\n\n return (\n
    \n {titleContentId && (\n
    \n \n
    \n )}\n
    \n {onDragEnd ? (\n setActiveId(event.active.id)}\n onDragEnd={onDragEnd}\n >\n item.id)}\n strategy={verticalListSortingStrategy}\n >\n {adaptedColumns.map((item, index) => {\n if (shouldHideItem?.(item.id)) {\n return null;\n } else if (item.children && item.children.length > 0) {\n return (\n \n );\n } else {\n return (\n \n {renderColumnListItem(item.id, items.indexOf(item.id))}\n \n );\n }\n })}\n \n \n {activeId && columnGroup?.id === activeId ? (\n \n ) : (\n renderColumnListItem(\n activeId as string,\n adaptedColumns.findIndex((col) => col.id === activeId),\n true\n )\n )}\n \n \n ) : (\n <>\n {items.map((item, i) => (\n \n \n {columnIdDisplayNameMapping[item]}\n \n \n ))}\n \n )}\n
    \n
    \n );\n};\n","import { DragEndEvent } from '@dnd-kit/core';\nimport { arrayMove } from '@dnd-kit/sortable';\nimport { MouseEvent, useCallback, useMemo, useState } from 'react';\nimport { useToggle } from 'react-use';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { ConfirmDialog } from 'src/core/interim/dialogs/ConfirmDialog';\nimport { vars } from 'src/core/themes';\nimport { Button, Switch } from 'src/core/ui';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport {\n FormatOption,\n FormatOptionEntries,\n FormatOptionPill,\n LISTING_TABLE_COLUMN_DEFAULT_PRECISION,\n} from 'src/modals/EditTableColumns';\nimport { DeleteIcon, EditIcon, IconsFill, PlusIcon } from 'src/svgs/Viagogo';\nimport { getColumnConfigById } from 'src/utils/columns/columnUtils';\nimport { CustomEventsColumn } from 'src/utils/columns/events/eventsCustomColumnUtils.types';\nimport { GROUP_BY_TO_PRIMARY_COLUMN_ID } from 'src/utils/columns/inventory/inventoryColumnUtils.constants';\nimport { ListingTableColumnId } from 'src/utils/columns/inventory/inventoryColumnUtils.types';\nimport { CustomListingColumn } from 'src/utils/columns/inventory/inventoryCustomColumnUtils.types';\nimport { CustomMarketplacePaymentsColumn } from 'src/utils/columns/payments/paymentsCustomColumnUtils.types';\nimport { CustomPurchasesColumn } from 'src/utils/columns/purchases/purchasesCustomColumnUtils.types';\nimport { CustomSalesColumn } from 'src/utils/columns/sales/salesCustomColumnUtils.types';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport { ReportGroupBy, Tag, UserSetting } from 'src/WebApiController';\n\nimport { ColumnsSection } from './ColumnsSectionV2';\nimport { useAdaptedColumns } from './hooks/useAdaptedColumns';\nimport * as styles from './TableColumns.css';\nimport { TableCustomColumnModal } from './TableCustomColumnModal';\n\ntype TableColumnsInputProps = {\n // Override of required column ids - additive to the default required columns\n requiredColumns?: string[];\n userColumnSelection: string[];\n onUserColumnSelectionChange: (newSelection: string[]) => void;\n userColumnSorting: string[];\n onUserColumnSortingChange: (newSorting: string[]) => void;\n userEditableColumns?: string[];\n onUserEditableColumnsChange?: (newEditableColumns: string[]) => void;\n customColumns: T[];\n onCustomColumnsChange?: (newCustomColumns: T[]) => void;\n reportingTags?: Tag[];\n enableConfigureEditability?: boolean;\n sectionType?: SectionType;\n groupBy?: ReportGroupBy;\n // Only used with SectionType.Listings\n // We only want to show this column for setting if it's visible in the current view\n showTicketClassColor?: boolean;\n style?: React.CSSProperties;\n // Only supported for Purchase for now, used for filtering visible columns\n viewMode?: string | null;\n};\n\nexport function TableColumnsInput<\n T extends\n | CustomListingColumn\n | CustomSalesColumn\n | CustomEventsColumn\n | CustomPurchasesColumn\n | CustomMarketplacePaymentsColumn,\n>({\n requiredColumns,\n userColumnSelection,\n onUserColumnSelectionChange,\n userColumnSorting,\n onUserColumnSortingChange,\n userEditableColumns,\n onUserEditableColumnsChange,\n customColumns,\n onCustomColumnsChange,\n reportingTags,\n enableConfigureEditability,\n sectionType = SectionType.Listings,\n groupBy,\n showTicketClassColor,\n viewMode,\n style,\n}: TableColumnsInputProps) {\n const [isCustomColumnModalOpen, toggleCustomColumnModal] = useToggle(false);\n const [customColumnToEditId, setCustomColumnToEditId] = useState();\n const [customColumnToDeleteId, setCustomColumnToDeleteId] =\n useState();\n const [highlightedItemIndex, setHighlightedItemIndex] = useState(-1);\n\n const deleteCustomColumnConfirmDialog = useBasicDialog();\n\n const columnNumberPrecisionSettingId = {\n [SectionType.Events]: UserSetting.EventsColumnNumberPrecision,\n [SectionType.Listings]: UserSetting.InventoryColumnNumberPrecision,\n [SectionType.ListingsFlattened]:\n UserSetting.InventoryFlattenedColumnNumberPrecision,\n [SectionType.ListingsReport]: UserSetting.InventoryColumnNumberPrecision,\n [SectionType.InventorySideTable]:\n UserSetting.InventorySideTableColumnNumberPrecision,\n [SectionType.Sales]: UserSetting.SaleColumnNumberPrecision,\n [SectionType.SalesFlattened]:\n UserSetting.SaleFlattenedColumnNumberPrecision,\n [SectionType.SalesReport]: UserSetting.SaleColumnNumberPrecision,\n [SectionType.SalesSideTable]:\n UserSetting.SalesSideTableColumnNumberPrecision,\n [SectionType.Purchases]: UserSetting.PurchaseColumnNumberPrecision,\n [SectionType.PurchaseEvent]: UserSetting.PurchaseEventColumnNumberPrecision,\n [SectionType.PurchaseSideTable]:\n UserSetting.PurchaseSideTableColumnNumberPrecision,\n [SectionType.MarketplacePaymentsTable]:\n UserSetting.MarketplacePaymentsColumnNumberPrecision,\n [SectionType.OnSaleEvents]: UserSetting.OnSaleEventColumnNumberPrecision,\n }[sectionType];\n\n const { adaptedColumns, flattenColumns } = useAdaptedColumns({\n columns: userColumnSorting,\n sectionType,\n viewMode,\n });\n\n const {\n value: storedColumnNumberPrecisions = {},\n setUserSetting: setNumberPrecisionSetting,\n } = useServerUserSetting({\n id: columnNumberPrecisionSettingId,\n });\n\n const updateNumberPrecisionSetting = useCallback(\n (id: string, precision: FormatOption) => {\n setNumberPrecisionSetting({\n ...storedColumnNumberPrecisions,\n [id]: precision,\n });\n },\n [setNumberPrecisionSetting, storedColumnNumberPrecisions]\n );\n\n const isTagColumn = useCallback(\n (tagName: string) => (reportingTags ?? []).some((t) => t.key === tagName),\n [reportingTags]\n );\n\n const moveColumnUnderLastEnabled = useCallback(\n (id: string) => {\n let updatedItems = [...adaptedColumns];\n let currentPosition: number | null = null;\n let lastEnabledPosition: number | null = null;\n\n // Check if the column is part of a group\n const activeGroupIndex = adaptedColumns.findIndex(\n (item) =>\n item.children &&\n item.children.length > 0 &&\n item.children.includes(id)\n );\n\n if (activeGroupIndex !== -1) {\n // The item is part of a group\n const group = updatedItems[activeGroupIndex];\n if (group.children) {\n currentPosition = group.children.indexOf(id);\n\n lastEnabledPosition = group.children.findLastIndex((col) =>\n userColumnSelection.includes(col)\n );\n\n if (\n currentPosition === -1 ||\n lastEnabledPosition === -1 ||\n currentPosition === lastEnabledPosition\n ) {\n return;\n }\n\n const newPosition =\n currentPosition < lastEnabledPosition\n ? lastEnabledPosition\n : lastEnabledPosition + 1;\n\n const updatedGroup = arrayMove(\n group.children,\n currentPosition,\n newPosition\n );\n\n updatedItems[activeGroupIndex].children = updatedGroup;\n }\n } else {\n // The item is a top-level item (not in a group)\n currentPosition = adaptedColumns.findIndex((item) => item.id === id);\n\n lastEnabledPosition = adaptedColumns.findLastIndex((item) =>\n userColumnSelection.includes(item.id)\n );\n\n if (\n currentPosition === -1 ||\n lastEnabledPosition === -1 ||\n currentPosition === lastEnabledPosition\n ) {\n return;\n }\n\n const newPosition =\n currentPosition < lastEnabledPosition\n ? lastEnabledPosition\n : lastEnabledPosition + 1;\n\n updatedItems = arrayMove(adaptedColumns, currentPosition, newPosition);\n }\n\n const flattenedColumns = flattenColumns(updatedItems);\n\n // Flatten the updated structure and apply the changes\n onUserColumnSortingChange(flattenedColumns);\n\n // Highlight the moved item\n const flatIndex = flattenedColumns.indexOf(id);\n setHighlightedItemIndex(flatIndex);\n\n // Reset the highlight after a timeout\n setTimeout(() => {\n setHighlightedItemIndex(-1);\n }, 1100);\n },\n [\n onUserColumnSortingChange,\n userColumnSelection,\n adaptedColumns,\n flattenColumns,\n ]\n );\n\n const addColumn = useCallback(\n (id: string) => {\n moveColumnUnderLastEnabled(id);\n onUserColumnSelectionChange([...userColumnSelection, id]);\n },\n [\n moveColumnUnderLastEnabled,\n onUserColumnSelectionChange,\n userColumnSelection,\n ]\n );\n\n const removeColumn = useCallback(\n (id: string) => {\n moveColumnUnderLastEnabled(id);\n onUserColumnSelectionChange(\n userColumnSelection?.filter((cId) => cId !== id)\n );\n },\n [\n moveColumnUnderLastEnabled,\n onUserColumnSelectionChange,\n userColumnSelection,\n ]\n );\n\n const deleteCustomColumn = useCallback(\n (id: string) => {\n removeColumn(id);\n const remainingColumns = customColumns.filter(\n (c) => (c as T & { id: string }).id !== id\n ) as T[];\n onCustomColumnsChange?.(remainingColumns);\n },\n [customColumns, removeColumn, onCustomColumnsChange]\n );\n\n const editCustomColumn = useCallback(\n (id: string) => {\n if (!isCustomColumnModalOpen) {\n setCustomColumnToEditId(id);\n toggleCustomColumnModal();\n }\n },\n [isCustomColumnModalOpen, toggleCustomColumnModal]\n );\n\n const renderColumnRowActions = useCallback(\n (id: string /*isColumnAdded?: boolean*/) => {\n const personalization = getColumnConfigById({\n id,\n customColumns,\n sectionType,\n reportingTags,\n }).personalization;\n\n const {\n isNumeric,\n isDateTime,\n isCurrency,\n isPercent,\n isEditabilityConfigurable,\n isInteger,\n } = personalization;\n\n let isRequired = personalization.isRequired;\n if (groupBy) {\n if (sectionType === SectionType.ListingsReport) {\n isRequired = GROUP_BY_TO_PRIMARY_COLUMN_ID[groupBy] === id;\n }\n }\n if (requiredColumns?.includes(id)) {\n isRequired = true;\n }\n\n const isCustom = customColumns.find(\n (c) => (c as T & { id: string }).id === id\n );\n\n const toggleColumn = (isChecked: boolean) => {\n if (isChecked) {\n if (!userColumnSelection.includes(id)) {\n addColumn(id);\n }\n } else {\n if (!isRequired) removeColumn(id);\n }\n };\n\n return (\n {\n e.stopPropagation();\n }}\n >\n {isCustom && (\n
    \n \n
    \n )}\n {isTagColumn(id) && (\n
    \n \n
    \n )}\n {isEditabilityConfigurable && enableConfigureEditability ? (\n \n {\n e.stopPropagation();\n const isChecked = e.target.checked;\n if (isChecked) {\n onUserEditableColumnsChange?.([\n ...userEditableColumns!,\n id,\n ]);\n } else {\n onUserEditableColumnsChange?.(\n userEditableColumns!.filter((cId) => cId !== id)\n );\n }\n }}\n label={\n userEditableColumns!.includes(id) ? (\n \n ) : (\n \n )\n }\n labelPosition=\"right\"\n />\n \n ) : null}\n {isNumeric || isDateTime ? (\n \n ) : null}\n\n {isCustom && onCustomColumnsChange && (\n <>\n {\n editCustomColumn(id);\n }}\n />\n {\n setCustomColumnToDeleteId(id);\n deleteCustomColumnConfirmDialog.launchDialog();\n }}\n />\n \n )}\n\n \n \n );\n },\n [\n addColumn,\n customColumns,\n deleteCustomColumnConfirmDialog,\n editCustomColumn,\n enableConfigureEditability,\n groupBy,\n isTagColumn,\n onCustomColumnsChange,\n onUserEditableColumnsChange,\n removeColumn,\n reportingTags,\n requiredColumns,\n sectionType,\n storedColumnNumberPrecisions,\n updateNumberPrecisionSetting,\n userColumnSelection,\n userEditableColumns,\n ]\n );\n\n const renderToggleButton = useCallback(\n (id: string) => renderColumnRowActions(id),\n [renderColumnRowActions]\n );\n\n /**\n * Handler that sets the column order based on the drag drop event\n */\n const onDragEndHandler = useCallback(\n (event: DragEndEvent) => {\n const { active, over } = event;\n if (!over) return;\n\n const activeId = active.id as string;\n const overId = over.id as string;\n\n // Determine if the dragged item is in a group\n const activeGroup = adaptedColumns.findIndex(\n (item) =>\n item.children &&\n item.children.length > 0 &&\n item.children.includes(activeId)\n );\n const overGroup = adaptedColumns.findIndex(\n (item) =>\n item.children &&\n item.children.length > 0 &&\n item.children.includes(overId)\n );\n\n let updatedItems = [...adaptedColumns];\n\n if (activeGroup !== -1 && activeGroup === overGroup) {\n const group = updatedItems[activeGroup];\n if (group.children) {\n // Move within the same group\n const updatedGroup = arrayMove(\n group.children,\n group.children.indexOf(activeId),\n group.children.indexOf(overId)\n );\n\n updatedItems[activeGroup].children = updatedGroup;\n }\n // Update items with the new order\n } else if (activeGroup === -1 && overGroup === -1) {\n // Move top-level items (including entire groups)\n updatedItems = arrayMove(\n adaptedColumns,\n adaptedColumns.findIndex((item) => item.id === activeId),\n adaptedColumns.findIndex((item) => item.id === overId)\n );\n }\n // Update items with the new order\n onUserColumnSortingChange(flattenColumns(updatedItems));\n },\n [onUserColumnSortingChange, adaptedColumns, flattenColumns]\n );\n\n const openAddColumnModal = useCallback(\n (e: MouseEvent) => {\n e.stopPropagation();\n if (!isCustomColumnModalOpen) {\n setCustomColumnToEditId(undefined);\n toggleCustomColumnModal();\n }\n },\n [isCustomColumnModalOpen, toggleCustomColumnModal]\n );\n\n const hiddenItemIds = useMemo(() => {\n if (showTicketClassColor) {\n return [];\n }\n\n return [ListingTableColumnId.TicketClassColor.toString()];\n }, [showTicketClassColor]);\n\n const shouldHideItem = useCallback(\n (id: string) => {\n if (hiddenItemIds?.includes(id)) {\n return true;\n }\n\n const { visibleViewModes } = getColumnConfigById({\n id,\n customColumns,\n sectionType,\n reportingTags,\n }).personalization;\n\n if (\n visibleViewModes.length > 0 &&\n viewMode &&\n !visibleViewModes.includes(viewMode)\n ) {\n return true;\n }\n\n return false;\n },\n [customColumns, hiddenItemIds, reportingTags, sectionType, viewMode]\n );\n\n return (\n <>\n
    \n \n {onCustomColumnsChange && (\n \n \n \n \n )}\n
    \n {isCustomColumnModalOpen && (\n {\n onCustomColumnsChange?.(newColumns);\n }}\n sectionType={sectionType}\n />\n )}\n }\n bodyText={}\n onOkay={() => {\n if (customColumnToDeleteId) {\n deleteCustomColumn(customColumnToDeleteId);\n setCustomColumnToDeleteId(undefined);\n }\n\n deleteCustomColumnConfirmDialog.closeDialog();\n }}\n onCancel={() => deleteCustomColumnConfirmDialog.closeDialog()}\n />\n \n );\n}\n","import clsx from 'clsx';\nimport { isEqual, uniq } from 'lodash-es';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport { useToggle } from 'react-use';\nimport { CancelButton } from 'src/components/Buttons';\nimport { OkButton } from 'src/components/Buttons/OkButton';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { typography } from 'src/core/themes/shared.css';\nimport { useTagsForEntityType } from 'src/hooks/useTagsForEntityType';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport { PURCHASE_TABLE_COLUMNS_CONFIG } from 'src/tables/PurchaseTable/configs/PurchaseTableColumnsConfig';\nimport { getColumnPersonalization } from 'src/utils/columns/columnPersonalizationUtils';\nimport { filterColumnsByFeatures } from 'src/utils/columns/columnUtils';\nimport { CustomPurchasesColumn } from 'src/utils/columns/purchases/purchasesCustomColumnUtils.types';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport {\n ActionOutboxEntityType,\n Feature,\n UserSetting,\n} from 'src/WebApiController';\n\nimport { Modal, ModalBody, ModalFooter, ModalHeader } from '../Modal';\nimport * as styles from './ColumnSettings.css';\nimport { useColumnServerUserSettings } from './hooks/useColumnServerUserSettings';\nimport { TableColumnsInput } from './TableColumnsInputV2';\n\ntype TableColumnsModalContainerProps = {\n onClose: () => void;\n // Not fully supporting reporting yet\n sectionType: SectionType.Purchases | SectionType.PurchaseEvent;\n // Only supported for Purchase for now, used for filtering visible columns\n viewMode?: string | null;\n // Only used with SectionType.Listings\n // We only want to show this column for setting if it's visible in the current view\n showTicketClassColor?: boolean;\n};\n\nexport function PurchaseColumnSettingsModal({\n onClose,\n sectionType,\n viewMode,\n showTicketClassColor,\n}: TableColumnsModalContainerProps) {\n const { appContext, loginContext } = useAppContext();\n const hasTablePinActionColumnFeature = useUserHasFeature(\n Feature.TablePinActionColumn\n );\n const [isOpen, toggleIsOpen] = useToggle(true);\n const {\n storedColumnOrderSetting,\n setColumnOrderSetting,\n customColumns,\n storedColumnsEnabledSetting,\n setColumnsEnabledSetting,\n } = useColumnServerUserSettings({ sectionType });\n\n const {\n value: customPurchaseColumns = [],\n setUserSetting: setCustomPurchaseColumns,\n } = useServerUserSetting({\n id: UserSetting.PurchaseCustomColumns,\n });\n\n const { tagsMetadata } = useTagsForEntityType(\n ActionOutboxEntityType.Purchase,\n true\n );\n\n const presetColumnIds = Object.values(PURCHASE_TABLE_COLUMNS_CONFIG)\n .map((i) => i.id)\n .filter((id): id is string => id !== undefined);\n\n const filterColumns = useCallback(\n (columnList: string[]) => {\n // Filter out reporting tags that are later turned off reporting\n const activeTagNames = tagsMetadata?.map((t) => t.key) ?? [];\n const customColumnIds = customPurchaseColumns.map(\n (c) => (c as T & { id: string }).id\n );\n\n return columnList.filter((columnId) => {\n // Don't show inconfigurable columns - like checkbox\n if (presetColumnIds.includes(columnId)) {\n const isConfigurable = getColumnPersonalization({\n id: columnId,\n sectionType,\n }).isConfigurable;\n\n // With this new feature, we set action column as a column always showing at the right, thus inconfigurable\n // Without the feature, we treat the column as configurable\n if (!hasTablePinActionColumnFeature) {\n if (columnId === 'action' || columnId === 'actions') {\n return true;\n }\n }\n\n return isConfigurable;\n }\n return (\n activeTagNames.includes(columnId) ||\n customColumnIds.includes(columnId)\n );\n });\n },\n [\n customPurchaseColumns,\n hasTablePinActionColumnFeature,\n presetColumnIds,\n sectionType,\n tagsMetadata,\n ]\n );\n\n const storedColumnOrderSettingFiltered = useMemo(() => {\n const allColumnIdsAvailable = filterColumns(\n uniq([\n ...storedColumnOrderSetting.filter(\n (id): id is string => id !== undefined\n ),\n ...presetColumnIds.toSorted((a, b) => a.localeCompare(b)),\n ...customPurchaseColumns.map((c) => c.id),\n ...(tagsMetadata?.map((t) => t.key) ?? []),\n ])\n );\n\n const existingColumnsOrderSetting = filterColumns(\n storedColumnOrderSetting as string[]\n );\n\n allColumnIdsAvailable.forEach((columnId) => {\n if (!existingColumnsOrderSetting.includes(columnId)) {\n existingColumnsOrderSetting.push(columnId);\n }\n });\n\n return existingColumnsOrderSetting;\n }, [\n customPurchaseColumns,\n filterColumns,\n presetColumnIds,\n storedColumnOrderSetting,\n tagsMetadata,\n ]);\n\n const storedColumnEnabledSettingFiltered = useMemo(() => {\n if (\n Array.isArray(storedColumnsEnabledSetting) &&\n storedColumnsEnabledSetting.length > 0\n ) {\n return filterColumns(storedColumnsEnabledSetting as string[]);\n } else {\n return filterColumns(storedColumnOrderSetting);\n }\n }, [filterColumns, storedColumnsEnabledSetting, storedColumnOrderSetting]);\n\n const editabilityId = {\n [SectionType.Purchases]: UserSetting.PurchaseColumnEditability,\n [SectionType.PurchaseEvent]: UserSetting.PurchaseEventColumnEditability,\n }[sectionType];\n\n const { value: editableColumns = [], setUserSetting: setEditableColumns } =\n useServerUserSetting({\n id: editabilityId,\n });\n\n const [userColumnSelection, setUserColumnSelection] = useState(\n filterColumnsByFeatures(\n storedColumnEnabledSettingFiltered,\n sectionType,\n customColumns[sectionType],\n loginContext?.user,\n appContext?.features\n )\n );\n\n const [userColumnSorting, setUserColumnSorting] = useState(\n filterColumnsByFeatures(\n storedColumnOrderSettingFiltered,\n sectionType,\n customColumns[sectionType],\n loginContext?.user,\n appContext?.features\n )\n );\n const [userEditableColumns, setUserEditableColumns] =\n useState(editableColumns);\n const [userColumnIsDirty, setUserColumnIsDirty] = useState(false);\n\n const onSaveHandler = () => {\n if (!userColumnSelection) {\n // TODO: show error\n return;\n }\n setColumnsEnabledSetting(userColumnSelection);\n setColumnOrderSetting(userColumnSorting);\n setEditableColumns(userEditableColumns);\n toggleIsOpen();\n };\n\n // Sync the user setting to the default if the user has never set it\n useEffect(() => {\n const newColumns = filterColumnsByFeatures(\n storedColumnOrderSettingFiltered,\n sectionType,\n customColumns[sectionType],\n loginContext?.user,\n appContext?.features,\n tagsMetadata ?? []\n );\n const newEnabledColumns = filterColumnsByFeatures(\n storedColumnEnabledSettingFiltered,\n sectionType,\n customColumns[sectionType],\n loginContext?.user,\n appContext?.features\n );\n if (!userColumnIsDirty) {\n if (!isEqual(newColumns, userColumnSorting)) {\n setUserColumnSorting(newColumns);\n }\n if (!isEqual(editableColumns, userEditableColumns)) {\n setUserEditableColumns(editableColumns);\n }\n if (!isEqual(newEnabledColumns, userColumnSelection)) {\n setUserColumnSelection(newEnabledColumns);\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n appContext?.features,\n editableColumns,\n loginContext?.user,\n storedColumnOrderSettingFiltered,\n storedColumnEnabledSettingFiltered,\n ]);\n\n // Keep the columns up to date in case the user changes the settings (e.g. adds/deletes custom column)\n useEffect(() => {\n const allColumnIdsAvailable = filterColumns(\n uniq([\n ...storedColumnOrderSetting.filter(\n (id): id is string => id !== undefined\n ),\n ...presetColumnIds.toSorted((a, b) => a.localeCompare(b)),\n ...customPurchaseColumns.map((c) => c.id),\n ...(tagsMetadata?.map((t) => t.key) ?? []),\n ])\n );\n\n let userColumnSortingFiltered = filterColumns(userColumnSorting);\n\n allColumnIdsAvailable.forEach((columnId) => {\n if (!userColumnSortingFiltered.includes(columnId)) {\n userColumnSortingFiltered.push(columnId);\n }\n });\n\n userColumnSortingFiltered = filterColumnsByFeatures(\n userColumnSortingFiltered,\n sectionType,\n customColumns[sectionType],\n loginContext?.user,\n appContext?.features,\n tagsMetadata ?? []\n );\n\n if (\n !isEqual(new Set(userColumnSortingFiltered), new Set(userColumnSorting))\n ) {\n setUserColumnSorting(userColumnSortingFiltered);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [customPurchaseColumns]);\n\n useEffect(() => {\n if (!isOpen) setTimeout(onClose, 300);\n }, [isOpen, onClose]);\n\n return (\n \n \n
    \n
    \n \n
    \n
    \n
    \n \n \n userColumnSelection={userColumnSelection}\n onUserColumnSelectionChange={(newSelection) => {\n setUserColumnSelection(newSelection);\n setUserColumnIsDirty(true);\n }}\n userColumnSorting={userColumnSorting}\n onUserColumnSortingChange={(newSorting) => {\n setUserColumnSorting(newSorting);\n setUserColumnIsDirty(true);\n }}\n userEditableColumns={userEditableColumns}\n onUserEditableColumnsChange={(newEditableColumns) => {\n setUserEditableColumns(newEditableColumns);\n setUserColumnIsDirty(true);\n }}\n customColumns={customPurchaseColumns}\n onCustomColumnsChange={setCustomPurchaseColumns}\n reportingTags={tagsMetadata ?? []}\n enableConfigureEditability\n sectionType={sectionType}\n showTicketClassColor={showTicketClassColor}\n viewMode={viewMode}\n />\n \n \n \n \n \n \n );\n}\n","import { ReactNode, useEffect } from 'react';\nimport {\n NO_GROUP_ID,\n useMultiSelectionContext,\n} from 'src/contexts/MultiSelectionContext';\nimport { usePurchaseDataContext } from 'src/contexts/PurchaseDataContext';\nimport { Stack } from 'src/core/ui';\nimport { PurchaseOrderTable } from 'src/tables/PurchaseTable';\nimport { PurchaseOrderTableProps } from 'src/tables/PurchaseTable/PurchaseTable.types';\nimport {\n PurchaseOrderTicketGroup,\n PurchaseViewMode,\n} from 'src/WebApiController';\n\ntype PurchaseFlattenedViewProps = {\n before?: ReactNode;\n topListItemBefore?: ReactNode;\n} & Pick<\n PurchaseOrderTableProps,\n | 'alwaysShowCheckbox'\n | 'showSelectAllOnHeader'\n | 'enableColumnFilters'\n | 'ignoreMaxCount'\n>;\n\nexport const PurchaseFlattenedView = ({\n before,\n topListItemBefore,\n ...rest\n}: PurchaseFlattenedViewProps) => {\n const { allPurchasesQuery, allPurchasesFiltered, purchaseCount } =\n usePurchaseDataContext();\n const { setAllGroupsIds } = useMultiSelectionContext();\n\n useEffect(() => {\n setAllGroupsIds([NO_GROUP_ID]);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return (\n \n {before}\n {topListItemBefore}\n p as PurchaseOrderTicketGroup\n )}\n getDataFail={Boolean(allPurchasesQuery.error)}\n isItemsLoading={allPurchasesQuery.isLoading}\n viewMode={PurchaseViewMode.FlattenedView}\n />\n \n );\n};\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport const PurchaseToolbarDiv = styled.div`\n display: flex;\n justify-content: space-between;\n align-items: center;\n border-bottom: 1px solid ${(props) => props.theme.colors.borderPrimary};\n padding: ${() =>\n `${vars.spacing.sm} ${vars.spacing.lg} ${vars.spacing.sm} ${vars.spacing.m}`};\n\n ${({ theme: { media } }) =>\n `${media.makeMediaQuery(\n media.breakpoints.md,\n `padding: ${vars.spacing.sm} ${vars.spacing['3xl']} ${vars.spacing.sm} ${vars.spacing.xl};`\n )}`}\n\n .add-purchase {\n white-space: nowrap;\n width: fit-content;\n }\n`;\n\nexport const FilterBarLeftSide = styled.div`\n display: flex;\n flex-grow: 1;\n align-items: center;\n gap: ${() => vars.spacing.sm};\n\n > div {\n flex-grow: 1;\n }\n`;\n\nexport const FilterBarRightSide = styled.div`\n display: flex;\n align-items: center;\n padding-inline-start: ${() => vars.spacing.sm};\n\n ${({ theme: { media } }) =>\n `${media.makeMediaQuery(\n media.breakpoints.md,\n `padding-inline-start: ${vars.spacing.lg};`\n )}`}\n`;\n","import { MouseEvent, useContext } from 'react';\nimport { useToggle } from 'react-use';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { usePurchaseDataContext } from 'src/contexts/PurchaseDataContext';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { LaunchBulkUploadPurchaseDialog } from 'src/dialogs/BulkEdits/BulkUploadPurchaseDialog';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { MessagesAddSourceModal } from 'src/modals/MessagesAddSourceModal/MessagesAddSourceModal';\nimport { PurchaseWizardModalConfig } from 'src/modals/PurchaseWizard/PurchaseWizardModalConfig';\nimport { LayoutIcon } from 'src/svgs';\nimport { IconsFill, SettingsIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n PURCHASE_SORT_TO_CID,\n TIME_PERIOD_TO_CID,\n} from 'src/utils/constants/contentIdMaps';\nimport {\n EventUiSort,\n getEventSort,\n getEventUiSort,\n} from 'src/utils/eventQueryUtils';\nimport {\n EventSort,\n Permission,\n PurchaseOrderQuery,\n PurchaseViewMode,\n TimePeriodType,\n} from 'src/WebApiController';\n\nimport * as styles from './PurchaseToolbar.css';\nimport {\n FilterBarLeftSide,\n FilterBarRightSide,\n PurchaseToolbarDiv,\n} from './PurchaseToolbar.styled';\n\nexport type PurchaseToolbarType = {\n disabled?: boolean;\n viewMode?: PurchaseViewMode | null;\n onColumnSettingButtonClickHandler?: (\n e: MouseEvent\n ) => void;\n};\n\nexport function PurchaseToolbar({\n viewMode,\n onColumnSettingButtonClickHandler,\n disabled,\n}: PurchaseToolbarType) {\n const { setActivePosEntity } = useActivePosEntityContext();\n const [isAddSourceModalOpen, setIsAddSourceModalOpen] = useToggle(false);\n const { filterQuery, setFilterQuery } =\n useFilterQueryContext();\n const { setModal } = useContext(ModalContext);\n\n const { purchaseGroupTimePeriod, setPurchaseGroupTimePeriod } =\n usePurchaseDataContext();\n\n const onAddPurchase = () => {\n setActivePosEntity(0);\n setModal(PurchaseWizardModalConfig);\n };\n\n const onCloseAddSourceModal = () => {\n setIsAddSourceModalOpen(false);\n };\n\n const hasCreatePermission = useUserHasAnyOfPermissions(\n Permission.Purchases_Create\n );\n\n return (\n \n \n {hasCreatePermission && (\n <>\n \n \n \n\n \n\n \n\n \n \n )}\n \n \n {viewMode === PurchaseViewMode.FlattenedView && (\n \n \n \n \n )}\n\n {\n if (!tp) return;\n setPurchaseGroupTimePeriod(tp);\n }}\n valueOptionsContent={TIME_PERIOD_TO_CID}\n style={{ marginRight: '12px' }}\n />\n\n {viewMode !== PurchaseViewMode.EventTileView && (\n {\n const [, isSortDescending] = getEventSort(sort);\n if (isSortDescending !== filterQuery?.isSortDescending) {\n setFilterQuery({\n ...(filterQuery ?? {}),\n isSortDescending,\n });\n }\n }}\n valueOptionsContent={PURCHASE_SORT_TO_CID}\n />\n )}\n \n \n );\n}\n","import { MouseEvent, useCallback, useEffect, useMemo } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { useToggle } from 'react-use';\nimport { PurchaseDatesAccordion } from 'src/components/Accordions/PurchaseDatesAccordion';\nimport {\n TicketGroupsEventsAccordion,\n translateEventToTicketGroupAccordionItem,\n} from 'src/components/Accordions/TicketGroupsEventsAccordion';\nimport * as EmptySectionContent from 'src/components/common/EmptySectionContent';\nimport { MultiSelectActionBar } from 'src/components/common/MultiSelect/MultiSelectActionBar';\nimport { MainFilterBar } from 'src/components/MainFilterBar';\nimport { PurchasesGlobalBulkActions } from 'src/components/Purchases/BulkActions/PurchasesGlobalBulkActions/PurchasesGlobalBulkActions';\nimport { PurchaseGlobalActionsPermissionsWrapper } from 'src/components/Purchases/PurchaseFilterBar/PurchaseGlobalActionsPermissionsWrapper';\nimport { PurchaseSearchBox } from 'src/components/Purchases/PurchaseFilterBar/PurchaseSearchBox';\nimport {\n SetPurchasesAccordionSelectionCountLabel,\n SetPurchasesFlattenedViewSelectionCountLabel,\n SetPurchasesTimeViewSelectionCountLabel,\n} from 'src/components/Purchases/SelectedItemsLabel';\nimport { ActivePosEntityProvider } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n CatalogDataContextProvider,\n useCatalogDataContext,\n} from 'src/contexts/CatalogDataContext';\nimport { CatalogMetricsContextProvider } from 'src/contexts/CatalogMetricsContext';\nimport { CatalogMultiSelectionContextProvider } from 'src/contexts/CatalogMultiSelectionContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { DialogProvider } from 'src/contexts/DialogContext/DialogContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport {\n FilterQueryContextProvider,\n useFilterQueryContext,\n} from 'src/contexts/FilterQueryContext';\nimport {\n MultiSelectionContextProvider,\n useMultiSelectionContext,\n} from 'src/contexts/MultiSelectionContext';\nimport {\n PurchaseDataContextProvider,\n usePurchaseDataContext,\n} from 'src/contexts/PurchaseDataContext';\nimport { SellerUserSettingsProvider } from 'src/contexts/SellerUserSettingsContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { PurchaseColumnSettingsModal } from 'src/modals/ColumnSettings/PurchaseColumnSettings';\nimport { LayoutContent } from 'src/navigations/LayoutContent';\nimport { LayoutIcon } from 'src/svgs';\nimport { SearchSolidIcon } from 'src/svgs/Viagogo';\nimport { createPurchaseSearchPageUrl } from 'src/utils/advancedSearchUtils';\nimport { MAX_NUM_OF_ITEMS_FOR_FLATTENED_VIEWS } from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n DefaultPurchaseQuery,\n EmptyPurchaseQuery,\n} from 'src/utils/eventQueryUtils';\nimport { transformData } from 'src/utils/eventWithDataUtils';\nimport {\n getCatalogData,\n getCatalogDataExpanded,\n getCatalogMetrics,\n PURCHASE_USER_SETTINGS,\n purchaseQueryValueTransformFromUrl,\n purchaseQueryValueTransformToUrl,\n} from 'src/utils/purchaseUtils';\nimport { addTicketGroupMetrics } from 'src/utils/ticketMetricUtils';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport { SomethingWentWrong } from 'src/views';\nimport {\n ActionOutboxEntityType,\n Feature,\n PurchaseClient,\n PurchaseOrderDetails,\n PurchaseOrderQuery,\n PurchaseViewMode,\n TicketGroupMetrics,\n UserSetting,\n} from 'src/WebApiController';\n\nimport { MainRoute } from '../MainRoute';\nimport { PurchaseFlattenedView } from './PurchaseFlattenedView';\nimport * as styles from './Purchases.css';\nimport { PurchaseToolbar } from './PurchaseToolbar';\n\nexport function Purchases() {\n return (\n \n \n initialQuery={DefaultPurchaseQuery}\n viewModeSettingId={UserSetting.PurchasePageViewMode}\n emptyQuery={EmptyPurchaseQuery}\n queryValueTransformToUrl={purchaseQueryValueTransformToUrl}\n queryValueTransformFromUrl={purchaseQueryValueTransformFromUrl}\n saveQueryInUrl\n >\n \n \n \n );\n}\n\nfunction PurchasePage() {\n const { trackError } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const { filterQuery } = useFilterQueryContext();\n\n const getCatalogDataExpandedCallback = useCallback(\n (viagVirtualIds: string[], transformedFilterQuery: PurchaseOrderQuery) => {\n if (filterQuery.viewMode !== PurchaseViewMode.EventTileView) {\n return Promise.resolve({});\n }\n\n return getCatalogDataExpanded(viagVirtualIds, transformedFilterQuery, {\n activeAccountWebClientConfig,\n onError: (error) => {\n trackError('PurchaseClient.getTicketGroupsForEvents', error, {\n ...transformedFilterQuery,\n eventIds: viagVirtualIds,\n });\n },\n });\n },\n [activeAccountWebClientConfig, filterQuery.viewMode, trackError]\n );\n\n const hasMetricsV2Feature = useUserHasFeature(Feature.CatalogMetricsV2);\n\n return (\n \n entityType={ActionOutboxEntityType.Purchase}\n queryKey=\"getCatalogForPurchaseOrders\"\n getCatalogData={(c, f) => getCatalogData(c, f, true)}\n getCatalogDataExpanded={getCatalogDataExpandedCallback}\n transformEventData={transformData}\n >\n \n \n \n \n queryKey=\"getCatalogTicketGroupMetrics\"\n entityType={ActionOutboxEntityType.Purchase}\n getCatalogMetrics={(c, f, r) =>\n getCatalogMetrics(c, f, r, hasMetricsV2Feature)\n }\n addCatalogMetrics={addTicketGroupMetrics}\n disabled={filterQuery.viewMode !== PurchaseViewMode.EventTileView}\n >\n \n \n \n \n \n \n );\n}\n\nfunction PurchasesContent() {\n const purchasesTitle = useContent(ContentId.Purchases);\n const { filterQuery, isQueryInitialized } =\n useFilterQueryContext();\n\n const { activeAccountWebClientConfig } = useAppContext();\n\n const {\n eventsTransformed,\n isLoading: isCatalogDataLoading,\n eventsExpansion: { expandedListItems, toggleListItemExpansion },\n } = useCatalogDataContext();\n const onTicketGroupsEventExpanded = useCallback(\n async (viagVirtualId: string) => {\n toggleListItemExpansion([viagVirtualId]);\n },\n [toggleListItemExpansion]\n );\n\n const {\n timePeriodPurchasesQuery,\n allPurchasesQuery,\n purchaseCount,\n errorInfo,\n selectedIds,\n onSelect,\n scrollToId,\n setScrollToId,\n onSetActivePurchaseOrderCallback,\n } = usePurchaseDataContext();\n\n const isMobile = useMatchMedia('mobile');\n\n const [isColumnModalOpen, toggleColumnModal] = useToggle(false);\n\n const onColumnSettingButtonClickHandler = (\n e: MouseEvent\n ) => {\n e.stopPropagation();\n if (!isColumnModalOpen) toggleColumnModal(true);\n };\n\n const getActivePosEntity = useCallback(\n async (purchaseId: number) => {\n const purchaseDetails = await new PurchaseClient(\n activeAccountWebClientConfig\n ).getPurchaseOrderByPurchaseOrderId(purchaseId, false);\n if (purchaseDetails) {\n return {\n posEntityId: purchaseDetails.id,\n posEntity: purchaseDetails,\n event: null,\n posEntityDisplayId: purchaseDetails.id.toString(),\n };\n }\n\n return {};\n },\n [activeAccountWebClientConfig]\n );\n\n const ticketGroupItems = useMemo(() => {\n // Don't transform events if they are not used in the current view mode\n if (\n !filterQuery.viewMode ||\n filterQuery.viewMode !== PurchaseViewMode.EventTileView\n ) {\n return [];\n }\n // Only for PurchaseViewMode.EventTileView\n return (\n eventsTransformed?.map((e, i) =>\n translateEventToTicketGroupAccordionItem(e, i)\n ) || []\n );\n }, [eventsTransformed, filterQuery.viewMode]);\n\n const { clearShiftKeySelection, setSelectionMode } =\n useMultiSelectionContext();\n\n useEffect(() => {\n clearShiftKeySelection();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [filterQuery.viewMode]);\n\n const dataIsLoading =\n !isQueryInitialized ||\n filterQuery.viewMode === PurchaseViewMode.EventTileView\n ? isCatalogDataLoading || eventsTransformed == null\n : filterQuery.viewMode === PurchaseViewMode.FlattenedView\n ? isCatalogDataLoading ||\n eventsTransformed == null ||\n allPurchasesQuery.isLoading\n : timePeriodPurchasesQuery.isLoading ||\n timePeriodPurchasesQuery.data == null;\n\n const hasData =\n filterQuery.viewMode === PurchaseViewMode.EventTileView\n ? ticketGroupItems.length\n : filterQuery.viewMode === PurchaseViewMode.FlattenedView\n ? purchaseCount > MAX_NUM_OF_ITEMS_FOR_FLATTENED_VIEWS ||\n allPurchasesQuery.data?.length\n : timePeriodPurchasesQuery.data?.length;\n\n // Reset and close selection mode when changing view\n useEffect(() => {\n setSelectionMode();\n }, [filterQuery.viewMode, setSelectionMode]);\n\n const hasNewSearchFeature = useUserHasFeature(Feature.SearchView_Purchase);\n const navigate = useNavigate();\n\n const onAdvancePurchaseSearch = useCallback(() => {\n const searchUrl = createPurchaseSearchPageUrl();\n\n setTimeout(() => {\n navigate(searchUrl, {\n state: {\n returnUrl: `${location.pathname}${location.search}`,\n },\n });\n }, 10);\n }, [navigate]);\n\n return (\n \n entityType={ActionOutboxEntityType.Purchase}\n getActivePosEntity={getActivePosEntity}\n onSetActiveItemCompleteCallback={onSetActivePurchaseOrderCallback}\n >\n \n \n \n \n \n )\n }\n >\n \n
    \n {dataIsLoading && }\n {errorInfo && (\n \n )\n }\n />\n )}\n {!dataIsLoading && !errorInfo && (\n <>\n {!isMobile && (\n \n )}\n {hasData ? (\n filterQuery.viewMode === PurchaseViewMode.FlattenedView ? (\n \n \n \n \n \n \n \n }\n enableColumnFilters\n />\n ) : filterQuery.viewMode ===\n PurchaseViewMode.EventTileView ? (\n \n \n \n \n \n \n \n }\n disablePagination\n items={ticketGroupItems}\n selectedIds={expandedListItems}\n onSelect={onTicketGroupsEventExpanded}\n tableActions={\n \n \n \n \n }\n />\n ) : (\n \n \n \n \n \n \n \n }\n selectedIds={selectedIds}\n onSelect={onSelect}\n items={timePeriodPurchasesQuery.data ?? []}\n scrollToId={scrollToId}\n onScroll={() => {\n if (scrollToId) setScrollToId(undefined);\n }}\n tableActions={\n \n \n \n \n }\n />\n )\n ) : (\n \n \n \n }\n >\n \n \n \n \n \n \n \n )}\n {isColumnModalOpen ? (\n \n ) : null}\n \n )}\n
    \n \n
    \n \n );\n}\n","import * as EmptySectionContent from 'src/components/common/EmptySectionContent';\nimport { Content } from 'src/contexts/ContentContext';\nimport { SearchSolidIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\ninterface NoResultsFoundProps {\n detailMessage?: ContentId;\n}\n\nexport const PosNoResultsFound = ({ detailMessage }: NoResultsFoundProps) => {\n return (\n \n \n \n }\n >\n \n \n \n {detailMessage && (\n \n \n \n )}\n \n );\n};\n","import { EntitySearchFilterBar } from 'src/components/EntitySearch';\nimport { FilterDropdownItem } from 'src/components/Filters';\nimport { usePurchaseFilters } from 'src/components/MainFilterBar/usePurchaseFilters';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport {\n Feature,\n PurchaseOrderQuery,\n PurchaseSearchResult,\n} from 'src/WebApiController';\n\nexport const PurchaseSearchFilterBar = (props: {\n activeSearchConfig?: PurchaseSearchResult;\n onSubmitFilter?: (query: PurchaseOrderQuery) => void;\n selectedFilters?: FilterDropdownItem[];\n setSelectedFilters: (sf: FilterDropdownItem[]) => void;\n}) => {\n const hasPurchaseCommissionFilterInSearchViewFeature = useUserHasFeature(\n Feature.PurchaseCommissionFilterInSearchView\n );\n const hasConsignmentFilterPurchaseSearchViewFeature = useUserHasFeature(\n Feature.ConsignmentFilterPurchaseSearchView\n );\n const hasConsignmentDealFeature = useUserHasFeature(Feature.ConsignmentDeal);\n\n const filters = usePurchaseFilters({\n isHorizontalLayout: true,\n showCommissionerFilter: hasPurchaseCommissionFilterInSearchViewFeature,\n showConsignmentFilter:\n hasConsignmentDealFeature &&\n hasConsignmentFilterPurchaseSearchViewFeature,\n showCatalogFilters: true,\n });\n\n return (\n \n );\n};\n","import { MouseEvent } from 'react';\nimport { useToggle } from 'react-use';\nimport { MultiSelectActionBar } from 'src/components/common/MultiSelect/MultiSelectActionBar';\nimport { PurchasesGlobalBulkActions } from 'src/components/Purchases/BulkActions/PurchasesGlobalBulkActions/PurchasesGlobalBulkActions';\nimport { PurchaseGlobalActionsPermissionsWrapper } from 'src/components/Purchases/PurchaseFilterBar/PurchaseGlobalActionsPermissionsWrapper';\nimport { SetPurchasesFlattenedViewSelectionCountLabel } from 'src/components/Purchases/SelectedItemsLabel';\nimport { Content } from 'src/contexts/ContentContext';\nimport { NO_GROUP_ID } from 'src/contexts/MultiSelectionContext';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { PurchaseColumnSettingsModal } from 'src/modals/ColumnSettings/PurchaseColumnSettings';\nimport { LayoutIcon } from 'src/svgs';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport { PurchaseViewMode } from 'src/WebApiController';\n\nimport { container } from './PurchaseSearchToolbar.css';\n\nexport const PurchaseSearchToolbar = ({ disabled }: { disabled?: boolean }) => {\n const [isColumnModalOpen, toggleColumnModal] = useToggle(false);\n\n const onColumnSettingButtonClickHandler = (\n e: MouseEvent\n ) => {\n e.stopPropagation();\n if (!isColumnModalOpen) toggleColumnModal(true);\n };\n\n return (\n \n
    \n \n \n {!disabled && (\n \n \n \n )}\n \n \n
    \n\n \n \n \n \n\n {isColumnModalOpen ? (\n \n ) : null}\n \n );\n};\n","import { useCallback, useMemo, useState } from 'react';\nimport { useLocation } from 'react-router-dom';\nimport {\n EntitySearchConfigsToolbar,\n EntitySearchRefetcher,\n useEntitySearch,\n} from 'src/components/EntitySearch';\nimport { PurchaseSearchBox } from 'src/components/Purchases/PurchaseFilterBar/PurchaseSearchBox';\nimport { ActivePosEntityProvider } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n CatalogDataContextProvider,\n useCatalogDataContext,\n} from 'src/contexts/CatalogDataContext';\nimport { CatalogMultiSelectionContextProvider } from 'src/contexts/CatalogMultiSelectionContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { DialogProvider } from 'src/contexts/DialogContext/DialogContext';\nimport {\n FilterQueryContextProvider,\n useFilterQueryContext,\n} from 'src/contexts/FilterQueryContext';\nimport {\n MultiSelectionContextProvider,\n MultiSelectScope,\n NO_GROUP_ID,\n} from 'src/contexts/MultiSelectionContext';\nimport {\n PurchaseDataContextProvider,\n usePurchaseDataContext,\n} from 'src/contexts/PurchaseDataContext';\nimport { SellerUserSettingsProvider } from 'src/contexts/SellerUserSettingsContext';\nimport { PosNoResultsFound } from 'src/core/POS/PosNoResultsFound';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { vars } from 'src/core/themes';\nimport { DividerLine } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { LayoutContent } from 'src/navigations/LayoutContent';\nimport { PurchaseDeeplinkQueryParam } from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { removeDeepLinkUrlPartsFromRelativeUrl } from 'src/utils/deepLinkUtils';\nimport {\n DefaultPurchaseQuery,\n EmptyPurchaseQuery,\n} from 'src/utils/eventQueryUtils';\nimport { transformData } from 'src/utils/eventWithDataUtils';\nimport {\n getCatalogData,\n PURCHASE_USER_SETTINGS,\n purchaseQueryValueTransformFromUrl,\n purchaseQueryValueTransformToUrl,\n} from 'src/utils/purchaseUtils';\nimport { EventPageLocationState } from 'src/utils/types/EventPageLocationState';\nimport { SomethingWentWrong } from 'src/views';\nimport {\n ActionOutboxEntityType,\n CatalogClient,\n CatalogResults,\n Feature,\n PurchaseClient,\n PurchaseOrderDetails,\n PurchaseOrderQuery,\n PurchaseSearchResult,\n PurchaseViewMode,\n} from 'src/WebApiController';\n\nimport { getDefaultReturnUrl } from '../InventoryEvent/constants';\nimport {\n ACTIVE_EVENT_IDS_2_QUERY_PARAM,\n ACTIVE_EVENT_IDS_QUERY_PARAM,\n TAB_EVENT_IDS_2_QUERY_PARAM,\n TAB_EVENT_IDS_QUERY_PARAM,\n} from '../InventoryEvent/InventoryEvent.constants';\nimport { MainRoute } from '../MainRoute';\nimport { PurchaseFlattenedView } from '../Purchases/PurchaseFlattenedView';\nimport * as styles from './PurchaseSearch.css';\nimport { PurchaseSearchFilterBar } from './PurchaseSearchFilterBar';\nimport { PurchaseSearchToolbar } from './PurchaseSearchToolbar';\n\nexport function PurchaseSearch() {\n return (\n \n \n initialQuery={{\n ...DefaultPurchaseQuery,\n viewMode: PurchaseViewMode.FlattenedView,\n }}\n emptyQuery={EmptyPurchaseQuery}\n queryValueTransformToUrl={purchaseQueryValueTransformToUrl}\n queryValueTransformFromUrl={purchaseQueryValueTransformFromUrl}\n saveQueryInUrl\n >\n \n \n \n );\n}\n\nfunction PurchaseSearchPage() {\n const [activeSearchConfig, setActiveSearchConfig] =\n useState();\n\n const getCatalogDataExpandedCallback = useCallback(\n (_1: string[], _2: PurchaseOrderQuery) => {\n return Promise.resolve({});\n },\n []\n );\n\n const getCatalogDataCallback = useCallback(\n async (c: CatalogClient, f: PurchaseOrderQuery) => {\n // Check to see if if is empty filter, query\n if (\n f.searchConfigId &&\n !f.entityIds?.length // we don't want to query when the filter has the search config id but no entity ids\n ) {\n // If there is no filter (empty query) then don't try to query for anything\n return {\n events: {},\n performers: {},\n venues: {},\n venueCfgs: {},\n } as CatalogResults;\n }\n\n return await getCatalogData(c, f, true);\n },\n []\n );\n\n const { filterQuery } = useFilterQueryContext();\n\n // If we're querying by ids - we want to get the latest greatest\n // We're only using readonly-db if we're filtering\n const useReadonlyDB = filterQuery.entityIds?.length ? false : true;\n\n return (\n \n entityType={ActionOutboxEntityType.Purchase}\n queryKey=\"getCatalogForPurchaseOrders\"\n getCatalogData={getCatalogDataCallback}\n getCatalogDataExpanded={getCatalogDataExpandedCallback}\n transformEventData={transformData}\n disableAutoRefresh\n ignoreMaxCount\n >\n \n \n \n \n \n \n \n \n );\n}\n\nfunction PurchaseSearchContent({\n activeSearchConfig,\n setActiveSearchConfig,\n}: {\n activeSearchConfig: PurchaseSearchResult | undefined;\n setActiveSearchConfig: (a: PurchaseSearchResult | undefined) => void;\n}) {\n const purchaseSearchTitle = useContent(ContentId.SearchPurchases);\n\n const { activeAccountWebClientConfig } = useAppContext();\n const location = useLocation();\n const { isLoading: isCatalogDataLoading } = useCatalogDataContext();\n\n const {\n selectedFilters,\n setSelectedFilters,\n onSetActiveSearchConfig,\n onSaveSearchResult,\n onDeleteSearchResult,\n onRequeryForTheResult,\n refetchData,\n disabled,\n setDisabled,\n } = useEntitySearch(\n activeSearchConfig,\n setActiveSearchConfig,\n PurchaseViewMode.FlattenedView,\n (client, id) => client.getPurchaseSearchResult(id),\n (client, r) => client.savePurchaseSearchResult(r)\n );\n\n const hasColumnFilterSearchViewFeature = useUserHasFeature(\n Feature.ColumnFilterSearchView\n );\n\n // Only use value provided at the first time (should be from '/purchases')\n const returnUrl = useMemo(() => {\n const locationState = (location.state ?? {}) as EventPageLocationState;\n\n if (locationState.returnUrl && locationState.keepReturnUrlUnchanged) {\n return locationState.returnUrl;\n }\n\n const relativeUrl =\n locationState.returnUrl || getDefaultReturnUrl('purchases');\n\n return removeDeepLinkUrlPartsFromRelativeUrl(relativeUrl, [\n PurchaseDeeplinkQueryParam,\n ACTIVE_EVENT_IDS_QUERY_PARAM,\n TAB_EVENT_IDS_QUERY_PARAM,\n ACTIVE_EVENT_IDS_2_QUERY_PARAM,\n TAB_EVENT_IDS_2_QUERY_PARAM,\n ]);\n }, [location.state]);\n\n const {\n allPurchasesQuery,\n errorInfo,\n onSetActivePurchaseOrderCallback,\n allPurchasesFiltered,\n } = usePurchaseDataContext();\n\n const hasPurchasesResults = (allPurchasesFiltered ?? []).length > 0;\n\n const getActivePosEntity = useCallback(\n async (purchaseId: number) => {\n const purchaseDetails = await new PurchaseClient(\n activeAccountWebClientConfig\n ).getPurchaseOrderByPurchaseOrderId(purchaseId, false);\n if (purchaseDetails) {\n return {\n posEntityId: purchaseDetails.id,\n posEntity: purchaseDetails,\n event: null,\n posEntityDisplayId: purchaseDetails.id.toString(),\n };\n }\n\n return {};\n },\n [activeAccountWebClientConfig]\n );\n\n const dataIsLoading = isCatalogDataLoading;\n\n return (\n \n entityType={ActionOutboxEntityType.Purchase}\n getActivePosEntity={getActivePosEntity}\n onSetActiveItemCompleteCallback={onSetActivePurchaseOrderCallback}\n >\n \n \n }\n >\n \n client.getPurchaseSearchConfigs(includeAllUser)\n }\n getSearchResult={(client, id) => client.getPurchaseSearchResult(id)}\n additionalActions={}\n />\n \n {\n if (!activeSearchConfig) {\n // Setting an empty search config so it starts to filter\n onSetActiveSearchConfig({\n id: null,\n name: null,\n query: filter,\n ownerUserId: null,\n count: null,\n entityIds: null,\n lastFetchDate: null,\n });\n }\n refetchData(filter, allPurchasesQuery.refetch);\n }}\n />\n \n \n \n
    \n {errorInfo && (\n \n )\n }\n />\n )}\n {(dataIsLoading || allPurchasesQuery.isLoading) &&\n !allPurchasesFiltered?.length ? (\n \n ) : (\n !errorInfo && (\n <>\n {hasPurchasesResults ? (\n \n ) : (\n \n )}\n \n )\n )}\n
    \n \n
    \n \n );\n}\n","import { useEffect, useState } from 'react';\nimport { Content, FormatContent } from 'src/contexts/ContentContext';\nimport { Button } from 'src/core/ui';\nimport { MainNavTopBarEmpty } from 'src/navigations/MainNav/MainNavTopBar';\nimport { REACT_APP_STUBHUB_UK_URL } from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\n\nimport * as styles from './RedirectToStubHubUk.css';\n\nexport const RedirectToStubHubUk = () => {\n const [curSecond, setCurSecond] = useState(10); // 10 seconds\n useEffect(() => {\n if (curSecond <= 0) {\n window.location.href = REACT_APP_STUBHUB_UK_URL!;\n }\n const timer = setTimeout(() => {\n setCurSecond(curSecond - 1);\n }, 1000);\n\n // Clear timeout if the component is unmounted\n return () => clearTimeout(timer);\n });\n\n return (\n <>\n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n (window.location.href = REACT_APP_STUBHUB_UK_URL!)}\n >\n \n \n
    \n
    \n \n );\n};\n","import { ReportGroupBy } from 'src/WebApiController';\n\nimport {\n GROUP_BY_TO_PRIMARY_COLUMN_ID,\n GROUP_BY_TO_VISIBLE_COLUMN_IDS,\n NON_METRIC_LISTING_REPORT_TABLE_COLUMN_IDS,\n} from './inventoryColumnUtils.constants';\nimport { ListingReportTableColumnId } from './inventoryColumnUtils.types';\n\nexport const isMetricConfigurableByGroupBy = (\n id: string,\n groupBy?: ReportGroupBy\n) => {\n if (!groupBy) {\n return true;\n }\n\n if (GROUP_BY_TO_PRIMARY_COLUMN_ID[groupBy] === id) return true;\n\n if (\n !NON_METRIC_LISTING_REPORT_TABLE_COLUMN_IDS.includes(\n id as ListingReportTableColumnId\n )\n )\n return true;\n\n if (\n GROUP_BY_TO_VISIBLE_COLUMN_IDS[groupBy]?.includes(\n id as ListingReportTableColumnId\n )\n ) {\n return true;\n }\n return false;\n};\n","import { ReportGroupBy } from 'src/WebApiController';\n\nimport { SalesReportTableColumnId } from './salesColumnUtils.types';\nimport {\n GROUP_BY_TO_PRIMARY_COLUMN_ID,\n GROUP_BY_TO_VISIBLE_COLUMN_IDS,\n NON_METRIC_SALES_REPORT_TABLE_COLUMN_IDS,\n} from './salesReportColumnUtils.constants';\n\nexport const isMetricConfigurableByGroupBy = (\n id: string,\n groupBy?: ReportGroupBy\n) => {\n if (!groupBy) {\n return true;\n }\n\n if (GROUP_BY_TO_PRIMARY_COLUMN_ID[groupBy] === id) return true;\n\n if (\n !NON_METRIC_SALES_REPORT_TABLE_COLUMN_IDS.includes(\n id as SalesReportTableColumnId\n )\n )\n return true;\n\n if (\n GROUP_BY_TO_VISIBLE_COLUMN_IDS[groupBy]?.includes(\n id as SalesReportTableColumnId\n )\n ) {\n return true;\n }\n return false;\n};\n","import { useCallback, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ConfirmDialog } from 'src/core/interim/dialogs/ConfirmDialog';\nimport { PosSelect } from 'src/core/POS/PosSelect';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { ReportConfig } from 'src/hooks/useReportConfigs';\nimport { LISTING_REPORT_TABLE_COLUMNS_CONFIG } from 'src/tables/ListingTable/configs/ListingReportTableColumnsConfig';\nimport { SALE_REPORT_TABLE_COLUMNS_CONFIG } from 'src/tables/SalesTable/configs/SaleReportTableColumnsConfig';\nimport { isMetricConfigurableByGroupBy as isListingMetricConfigurableByGroupBy } from 'src/utils/columns/inventory/inventoryColumnUtils';\nimport { GROUP_BY_TO_PRIMARY_COLUMN_ID as GROUP_BY_TO_PRIMARY_COLUMN_ID_LISTING } from 'src/utils/columns/inventory/inventoryColumnUtils.constants';\nimport { isMetricConfigurableByGroupBy as isSaleMetricConfigurableByGroupBy } from 'src/utils/columns/sales/salesColumnUtils';\nimport { GROUP_BY_TO_PRIMARY_COLUMN_ID as GROUP_BY_TO_PRIMARY_COLUMN_ID_SALES } from 'src/utils/columns/sales/salesReportColumnUtils.constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ReportTypes } from 'src/utils/reportsUtils';\nimport { ReportGroupBy } from 'src/WebApiController';\n\ninterface GroupBySelectorProps {\n options: Record;\n reportType: ReportTypes;\n metricsFiltered: string[];\n}\n\nexport const GroupBySelector = ({\n options,\n reportType,\n metricsFiltered = [],\n}: GroupBySelectorProps) => {\n const [newGroupBy, setNewGroupBy] = useState();\n const { watch, clearErrors, setValue } = useFormContext();\n const changeGroupByConfirmDialog = useBasicDialog();\n\n const groupBy = watch('groupBy');\n const metrics = watch('metrics');\n\n const filterColumnByGroupBy = useCallback(\n (columnId: string, groupBy: ReportGroupBy) => {\n if (reportType === ReportTypes.Inventory) {\n return isListingMetricConfigurableByGroupBy(columnId, groupBy);\n } else if (reportType === ReportTypes.Sale) {\n return isSaleMetricConfigurableByGroupBy(columnId, groupBy);\n }\n\n return true;\n },\n [reportType]\n );\n\n const updateGroupBy = useCallback(\n (newGroupBy: ReportGroupBy) => {\n clearErrors('groupBy');\n setValue('groupBy', newGroupBy);\n\n // Bring the primary columns to the front if they are not already there\n const GROUP_BY_TO_PRIMARY_COLUMN_ID =\n reportType === ReportTypes.Inventory\n ? GROUP_BY_TO_PRIMARY_COLUMN_ID_LISTING\n : GROUP_BY_TO_PRIMARY_COLUMN_ID_SALES;\n const primaryColumnId = GROUP_BY_TO_PRIMARY_COLUMN_ID[newGroupBy];\n\n if (!primaryColumnId || metrics.includes(primaryColumnId)) {\n return;\n }\n\n setValue('metrics', [primaryColumnId, ...metrics]);\n },\n [clearErrors, metrics, reportType, setValue]\n );\n\n const onTileClick = useCallback(\n (newGrpType: ReportGroupBy) => {\n if (newGrpType && newGrpType !== groupBy) {\n const presetColumnIdsUnfiltered = Object.values(\n reportType === ReportTypes.Inventory\n ? LISTING_REPORT_TABLE_COLUMNS_CONFIG\n : SALE_REPORT_TABLE_COLUMNS_CONFIG\n ).map((i) => i.id);\n\n const presetColumnIdsBeforeChange = presetColumnIdsUnfiltered.filter(\n (id) =>\n metricsFiltered.includes(id) && filterColumnByGroupBy(id, groupBy)\n );\n const presetColumnIdsAfterChange = presetColumnIdsUnfiltered.filter(\n (id) =>\n metricsFiltered.includes(id) &&\n filterColumnByGroupBy(id, newGrpType)\n );\n\n if (\n presetColumnIdsAfterChange.length < presetColumnIdsBeforeChange.length\n ) {\n setNewGroupBy(newGrpType);\n changeGroupByConfirmDialog.launchDialog();\n return;\n }\n\n updateGroupBy(newGrpType);\n }\n },\n [\n changeGroupByConfirmDialog,\n filterColumnByGroupBy,\n groupBy,\n metricsFiltered,\n reportType,\n updateGroupBy,\n ]\n );\n\n const onChangeGroupByConfirm = useCallback(() => {\n if (newGroupBy) {\n updateGroupBy(newGroupBy);\n setNewGroupBy(undefined);\n }\n changeGroupByConfirmDialog.closeDialog();\n }, [changeGroupByConfirmDialog, newGroupBy, updateGroupBy]);\n\n return (\n <>\n {\n onTileClick(value as ReportGroupBy);\n }}\n valueOptionsContent={options}\n placeholderText={'Placeholder'}\n />\n }\n bodyText={}\n onOkay={onChangeGroupByConfirm}\n onCancel={() => changeGroupByConfirmDialog.closeDialog()}\n />\n \n );\n};\n","import { useCallback, useMemo } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useTagsForEntityType } from 'src/hooks/useTagsForEntityType';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport {\n FormatOptionEntries,\n FormatOptionPill,\n LISTING_TABLE_COLUMN_DEFAULT_PRECISION,\n SALE_TABLE_COLUMN_DEFAULT_PRECISION,\n} from 'src/modals/EditTableColumns';\nimport { LISTING_REPORT_TABLE_COLUMNS_CONFIG } from 'src/tables/ListingTable/configs/ListingReportTableColumnsConfig';\nimport { getListingTableColumnConfigs } from 'src/tables/ListingTable/configs/ListingTableColumnsConfig';\nimport { LISTING_TABLE_FLATTENED_COLUMNS_CONFIG } from 'src/tables/ListingTable/configs/ListingTableFlattenedColumnsConfig';\nimport { PURCHASE_TABLE_COLUMNS_CONFIG } from 'src/tables/PurchaseTable/configs/PurchaseTableColumnsConfig';\nimport { SALE_REPORT_TABLE_COLUMNS_CONFIG } from 'src/tables/SalesTable/configs/SaleReportTableColumnsConfig';\nimport { SALE_TABLE_FLATTENED_COLUMNS_CONFIG } from 'src/tables/SalesTable/configs/SaleTableFlattenedColumnsConfig';\nimport {\n getListingColumnConfigById,\n getListingReportColumnConfigById,\n getPurchasesColumnConfigById,\n getSaleColumnConfigById,\n getSaleReportColumnConfigById,\n} from 'src/utils/columns/columnUtils';\nimport { CustomListingColumn } from 'src/utils/columns/inventory/inventoryCustomColumnUtils.types';\nimport { CustomPurchasesColumn } from 'src/utils/columns/purchases/purchasesCustomColumnUtils.types';\nimport { CustomSalesColumn } from 'src/utils/columns/sales/salesCustomColumnUtils.types';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport {\n ActionOutboxEntityType,\n Feature,\n UserSetting,\n} from 'src/WebApiController';\n\nimport { SALE_TABLE_COLUMNS_CONFIG } from '../../tables/SalesTable/configs/SaleTableColumnsConfig';\nimport { ColumnsSection } from './ColumnsSection';\nimport * as styles from './TableColumns.css';\n\ntype TableColumnsDisplayProps = {\n items: string[];\n sectionType?: SectionType;\n tableType: 'inventory' | 'sales';\n};\n\nexport const TableColumnsDisplay = ({\n items,\n sectionType = SectionType.Listings,\n tableType,\n}: TableColumnsDisplayProps) => {\n const hasSortListingsInGroupFeature = useUserHasFeature(\n Feature.SortListingsInGroup\n );\n const hasSectionalLoadInListingTableFeature = useUserHasFeature(\n Feature.SectionalLoadInListingTable\n );\n const { value: storedColumnNumberPrecisions = {} } =\n useServerUserSetting({\n id:\n tableType === 'inventory'\n ? UserSetting.InventoryColumnNumberPrecision\n : UserSetting.SaleColumnNumberPrecision,\n });\n\n const { value: customColumns = [] } = useServerUserSetting({\n id: UserSetting.InventoryCustomColumns,\n });\n\n const { tagsMetadata } = useTagsForEntityType(\n tableType === 'inventory'\n ? ActionOutboxEntityType.Listing\n : ActionOutboxEntityType.Sale,\n true\n );\n const { tagsMetadata: tagsMetadataEvent } = useTagsForEntityType(\n ActionOutboxEntityType.SellerEvent,\n true\n );\n\n const { tagsMetadata: tagsMetadataPurchase } = useTagsForEntityType(\n ActionOutboxEntityType.Purchase,\n true\n );\n\n const allColumnConfigs = useMemo(\n () =>\n getListingTableColumnConfigs(\n hasSortListingsInGroupFeature,\n false,\n hasSectionalLoadInListingTableFeature\n ),\n [hasSectionalLoadInListingTableFeature, hasSortListingsInGroupFeature]\n );\n\n const itemsFiltered = useMemo(() => {\n // Filter out reporting tags that were later turned off reporting\n const presetColumnIds = Object.values(\n sectionType === SectionType.Listings\n ? allColumnConfigs\n : sectionType === SectionType.ListingsFlattened\n ? {\n ...LISTING_TABLE_FLATTENED_COLUMNS_CONFIG,\n ...allColumnConfigs,\n }\n : sectionType === SectionType.ListingsReport\n ? LISTING_REPORT_TABLE_COLUMNS_CONFIG\n : sectionType === SectionType.Sales\n ? SALE_TABLE_COLUMNS_CONFIG\n : sectionType === SectionType.PurchaseEvent ||\n sectionType === SectionType.Purchases\n ? PURCHASE_TABLE_COLUMNS_CONFIG\n : sectionType === SectionType.SalesFlattened\n ? {\n ...SALE_TABLE_FLATTENED_COLUMNS_CONFIG,\n ...SALE_TABLE_COLUMNS_CONFIG,\n }\n : SALE_REPORT_TABLE_COLUMNS_CONFIG\n ).map((i) => i.id);\n const activeTagNames = tagsMetadata?.map((t) => t.key) ?? [];\n const activeEventTagNames = tagsMetadataEvent?.map((t) => t.key) ?? [];\n const activePurchaseTagNames =\n tagsMetadataPurchase?.map((t) => t.key) ?? [];\n const customColumnIds = customColumns.map(\n (c) => (c as T & { id: string }).id\n );\n\n return items.filter(\n (m) =>\n presetColumnIds.includes(m) ||\n activeTagNames.includes(m) ||\n activeEventTagNames.includes(m) ||\n activePurchaseTagNames.includes(m) ||\n customColumnIds.includes(m)\n );\n }, [\n allColumnConfigs,\n customColumns,\n items,\n sectionType,\n tagsMetadata,\n tagsMetadataEvent,\n tagsMetadataPurchase,\n ]);\n\n const isTagColumn = useCallback(\n (tagName: string) =>\n [\n ...(tagsMetadata ?? []),\n ...(tagsMetadataEvent ?? []),\n ...(tagsMetadataPurchase ?? []),\n ].some((t) => t.key === tagName),\n [tagsMetadata, tagsMetadataEvent, tagsMetadataPurchase]\n );\n\n const renderColumnRowActions = useCallback(\n (id: string) => {\n const { isNumeric, isCurrency, isPercent, isDateTime } =\n sectionType === SectionType.Listings\n ? getListingColumnConfigById(\n id,\n customColumns as CustomListingColumn[]\n ).personalization\n : sectionType === SectionType.ListingsReport\n ? getListingReportColumnConfigById(\n id,\n customColumns as CustomListingColumn[]\n ).personalization\n : sectionType === SectionType.PurchaseEvent ||\n sectionType === SectionType.Purchases\n ? getPurchasesColumnConfigById(\n id,\n customColumns as CustomPurchasesColumn[]\n ).personalization\n : sectionType === SectionType.Sales\n ? getSaleColumnConfigById(id, customColumns as CustomSalesColumn[])\n .personalization\n : getSaleReportColumnConfigById(\n id,\n customColumns as CustomSalesColumn[]\n ).personalization;\n\n const isCustom = customColumns.find(\n (c) => (c as T & { id: string }).id === id\n );\n\n return (\n {\n e.stopPropagation();\n }}\n >\n {isCustom && (\n
    \n \n
    \n )}\n {isTagColumn(id) && (\n
    \n \n
    \n )}\n\n {isNumeric || isDateTime ? (\n \n ) : null}\n \n );\n },\n [\n customColumns,\n isTagColumn,\n sectionType,\n storedColumnNumberPrecisions,\n tableType,\n ]\n );\n\n return (\n \n );\n};\n","import { useQuery } from '@tanstack/react-query';\nimport {\n createContext,\n ReactNode,\n useCallback,\n useContext,\n useMemo,\n} from 'react';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport {\n PERMISSION_TO_CID,\n ROLE_TO_CID,\n} from 'src/utils/constants/contentIdMaps';\nimport {\n Feature,\n Permission,\n Role,\n SellerAccountClient,\n SellerPermissionInfo,\n SellerRoleInfo,\n} from 'src/WebApiController';\n\nimport { useAppContext } from '../AppContext';\nimport { getContent, useContentContext } from '../ContentContext';\n\nconst PermissionsRequiringFeatures: Record = {\n [Permission.Inventory_AddSeatSaver]: [Feature.SeatSaver],\n [Permission.Inventory_ManageSeatSaver]: [Feature.SeatSaver],\n [Permission.Inventory_ManageSeatSaverCreatedBy]: [Feature.SeatSaver],\n};\n\ntype ISellerRoleContext = {\n allSellerRoles?: Record | null;\n allPermissions?: Record | null;\n allSellerRolesForSelection?: Record | null;\n allPermissionsForSelection?: Record | null;\n isLoading?: boolean;\n getSellerRole: (id: number) => SellerRoleInfo | null;\n refetchSellerRoleInfos: () => void;\n};\n\nexport const SellerRoleContext = createContext({\n allSellerRoles: {},\n allSellerRolesForSelection: {},\n allPermissions: {} as Record,\n allPermissionsForSelection: {} as Record,\n isLoading: false,\n getSellerRole: () => null,\n refetchSellerRoleInfos: () => {},\n});\n\nexport const useSellerRoleContext = () => useContext(SellerRoleContext);\n\n/**\n * Adds a modal to the page where the provider is added\n * Provides utils to set all or update part of the modal\n * The modal is assumed to be open when it contains content\n */\nexport const SellerRoleContextProvider = ({\n children,\n}: {\n children: ReactNode;\n}) => {\n const { loginContext, activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n const contentContext = useContentContext();\n const showAutoPricerRole = useUserHasFeature(Feature.AutoPricing);\n\n const rolesQuery = useQuery({\n queryKey: [\n 'SellerAccountClient.getSelleRolesForSellerAccount',\n activeAccountWebClientConfig.activeAccountId,\n ],\n queryFn: async () => {\n if (activeAccountWebClientConfig.activeAccountId == null) {\n return null;\n }\n const results = await new SellerAccountClient(\n activeAccountWebClientConfig\n ).getSelleRolesForSellerAccount();\n\n const resultsMap = results?.reduce>(\n (r, cur) => {\n if (cur.prefinedRole) {\n if (cur.prefinedRole == Role.AutoPricer && !showAutoPricerRole) {\n return r;\n }\n\n const roleContentId = ROLE_TO_CID[cur.prefinedRole];\n // In case a predefined role (one that has no SellerAccountId) was created without proper Enum and translation, just use it raw\n if (roleContentId?.length === 2) {\n const roleText = getContent(roleContentId[0], contentContext);\n cur.name = roleText ?? cur.name;\n\n const roleDetails = getContent(roleContentId[1], contentContext);\n cur.details = roleDetails ?? cur.details;\n }\n }\n\n r[cur.id] = cur;\n return r;\n },\n {}\n );\n\n return resultsMap;\n },\n\n enabled: activeAccountWebClientConfig.activeAccountId != null,\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError('SellerAccountClient.getSelleRolesForSellerAccount', error);\n },\n },\n });\n\n const permissionsQuery = useQuery({\n queryKey: ['SellerAccountClient.getAllSellerPermissions'],\n queryFn: async () => {\n if (activeAccountWebClientConfig.activeAccountId == null) {\n return null;\n }\n\n const results = await new SellerAccountClient(\n activeAccountWebClientConfig\n ).getAllSellerPermissions();\n\n const resultsMap = results?.reduce(\n (r, cur) => {\n const permContentId = PERMISSION_TO_CID[cur.permission];\n const permText = getContent(permContentId[0], contentContext);\n cur.name = permText;\n\n r[cur.permission] = cur;\n return r;\n },\n {} as Record\n );\n\n return resultsMap;\n },\n\n enabled: activeAccountWebClientConfig.activeAccountId != null,\n staleTime: Infinity, // permissions don't change without redeploying, so it's ok to set Infinity here\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError('SellerAccountClient.getAllSellerPermissions', error);\n },\n },\n });\n\n const getSellerRole = useCallback(\n (roleId: number) => {\n if (!roleId || !rolesQuery.data) {\n return null;\n }\n\n return rolesQuery.data[roleId];\n },\n [rolesQuery.data]\n );\n\n const allSellerRolesForSelection = useMemo(\n () =>\n Object.values(rolesQuery.data ?? {})\n .filter((r) => !r.isDeleted)\n .reduce(\n (r, cur) => {\n r[cur.id] = cur.name;\n return r;\n },\n {} as Record\n ),\n [rolesQuery.data]\n );\n\n const allPermissionsFiltered = useMemo(\n () =>\n Object.values(permissionsQuery.data ?? {}).reduce(\n (r, cur) => {\n const features = PermissionsRequiringFeatures[cur.permission];\n let hasAllFeatures = true;\n if (features) {\n hasAllFeatures = features.every((f) =>\n loginContext?.user?.features.includes(f)\n );\n }\n\n if (hasAllFeatures) {\n r[cur.permission] = cur;\n }\n return r;\n },\n {} as Record\n ),\n [loginContext?.user?.features, permissionsQuery.data]\n );\n\n const allPermissionsForSelection = useMemo(\n () =>\n Object.values(allPermissionsFiltered ?? {}).reduce(\n (r, cur) => {\n r[cur.permission] = cur.permission;\n\n return r;\n },\n {} as Record\n ),\n [allPermissionsFiltered]\n );\n\n return (\n \n {children}\n \n );\n};\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport const FieldLabelWrapper = styled.div`\n font-weight: 600;\n ${({\n theme: {\n media,\n typography: { getStyles },\n },\n }) => `\n${getStyles('body1')}\n padding-left: 0;\n ${media.makeMediaQuery(\n media.breakpoints.md,\n `padding-left: 0px;` // reset padding for tablets and above\n )}\n`}\n`;\n\nexport const FieldWrapper = styled.div`\n padding-block-end: ${() => vars.spacing.m};\n\n label {\n width: 100%;\n margin-bottom: 0;\n }\n`;\n","import { useCallback, useMemo } from 'react';\nimport { ButtonWithIcon } from 'src/components/Buttons';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useSellerAccountContext } from 'src/contexts/SellerAccountContext';\nimport { useSellerRoleContext } from 'src/contexts/SellerRoleContext';\nimport { PosMultiSelect } from 'src/core/POS/PosMultiSelect';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { shared, vars } from 'src/core/themes';\nimport { CrossIcon, ProfileOutlineIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport * as styles from './ShareReportDialog.css';\nimport { FieldLabelWrapper, FieldWrapper } from './ShareReportDialog.styled';\n\nexport type ShareReportBodyProps = {\n roleIds: number[];\n sellerUserIds: string[];\n onRoleIdsChange: (roleIds: number[]) => void;\n onSellerUserIdsChange: (sellerUserIds: string[]) => void;\n isLoading?: boolean;\n};\n\nexport function ShareReportBody({\n roleIds,\n sellerUserIds,\n onRoleIdsChange,\n onSellerUserIdsChange,\n isLoading,\n}: ShareReportBodyProps) {\n const { allActiveUserInfos } = useSellerAccountContext();\n const { activeAccountUserId } = useAppContext();\n const addUserAndGroupContent = useContent(ContentId.AddUsersAndGroups);\n\n const valuesAggregated = useMemo(() => {\n const values = [...roleIds.map((rid) => rid.toString()), ...sellerUserIds];\n return values;\n }, [roleIds, sellerUserIds]);\n\n const { allSellerRoles } = useSellerRoleContext();\n\n const isRole = useCallback(\n (value: string) => {\n return Object.values(allSellerRoles ?? {}).some(\n (r) => r.id === Number(value)\n );\n },\n [allSellerRoles]\n );\n\n const keyOptionsContent = useMemo(() => {\n if (allActiveUserInfos == null) return {};\n\n let keyOptions: Record = {};\n\n if (allActiveUserInfos) {\n keyOptions = Object.entries(allActiveUserInfos)\n .toSorted((r1, r2) => r1[1].email.localeCompare(r2[1].email))\n .reduce>((re, r) => {\n if (r[0] === activeAccountUserId) return re;\n\n re[r[0]] = r[1].email;\n return re;\n }, {});\n }\n\n if (allSellerRoles) {\n Object.entries(allSellerRoles).forEach((r) => {\n keyOptions[r[0]] = r[1].name;\n });\n }\n\n return keyOptions;\n }, [activeAccountUserId, allActiveUserInfos, allSellerRoles]);\n\n const onSelectionUpdated = useCallback(\n (newValues: string[]) => {\n const newRoleIds = newValues\n .filter((v) => isRole(v))\n .map((v) => Number(v)) as number[];\n const newSellerUserIds = newValues.filter((v) => !isRole(v));\n\n onRoleIdsChange(newRoleIds);\n onSellerUserIdsChange(newSellerUserIds);\n },\n [isRole, onRoleIdsChange, onSellerUserIdsChange]\n );\n\n const removeRole = useCallback(\n (role: string) => {\n onRoleIdsChange(roleIds.filter((r) => r !== Number(role)));\n },\n [onRoleIdsChange, roleIds]\n );\n\n const removeSellerUser = useCallback(\n (sellerUserId: string) => {\n onSellerUserIdsChange(sellerUserIds.filter((r) => r !== sellerUserId));\n },\n [onSellerUserIdsChange, sellerUserIds]\n );\n\n return (\n
    \n \n \n \n\n {roleIds.length || sellerUserIds.length ? (\n
    \n \n \n \n \n \n {roleIds.map((value) => (\n \n ))}\n {sellerUserIds.map((value) => (\n \n ))}\n
    \n ) : null}\n\n {isLoading && (\n \n \n \n )}\n
    \n );\n}\n\ntype SharedPeopleListItemProps = {\n sellerUserId?: string;\n role?: number;\n onDelete?: (value: string) => void;\n};\n\nconst SharedPeopleListItem = ({\n sellerUserId,\n role,\n onDelete,\n}: SharedPeopleListItemProps) => {\n const { allActiveUserInfos } = useSellerAccountContext();\n const { getSellerRole } = useSellerRoleContext();\n\n const roleInfo = role ? getSellerRole(role) : null;\n const userEmail = useMemo(() => {\n if (!sellerUserId || !allActiveUserInfos) return undefined;\n\n return allActiveUserInfos[sellerUserId]?.email;\n }, [allActiveUserInfos, sellerUserId]);\n\n const textDisplay =\n userEmail ?? (roleInfo ? `${roleInfo.name}: ${roleInfo.id}` : '');\n const value = sellerUserId ?? roleInfo?.id?.toString() ?? '';\n\n const isUser = sellerUserId != null;\n\n return (\n
    \n \n {isUser && }\n \n {textDisplay}\n \n
    \n \n }\n onClick={() => {\n onDelete?.(value);\n }}\n textContentId={ContentId.RemoveAccess}\n style={{\n fontSize: vars.typography.fontSize.sm,\n whiteSpace: 'nowrap',\n }}\n startWithText\n />\n \n );\n};\n","import { ComponentProps, useState } from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { Content, FormatContent } from 'src/contexts/ContentContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { Button, Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\n\nimport { ShareReportBody } from './ShareReportBody';\n\nexport type ShareReportDialogProps = ComponentProps & {\n reportName: string;\n roleIdsShared: number[];\n sellerUserIdsShared: string[];\n isLoading?: boolean;\n onOkay: (roleIds: number[], sellerUserIds: string[]) => void;\n onCancel: () => void;\n};\n\nexport function ShareReportDialog({\n reportName,\n roleIdsShared,\n sellerUserIdsShared,\n isLoading,\n onOkay,\n onCancel,\n ...rest\n}: ShareReportDialogProps) {\n const [newRoleIds, setNewRoleIds] = useState([]);\n const [newSellerUserIds, setNewSellerUserIds] = useState([]);\n\n return (\n \n }\n onOpened={() => {\n setNewRoleIds(roleIdsShared);\n setNewSellerUserIds(sellerUserIdsShared);\n }}\n onClick={(e) => {\n // This so that this dialog does not cause event to flow to the EventHeader open/close event\n e.stopPropagation();\n e.preventDefault();\n }}\n footer={\n <>\n {\n onCancel();\n }}\n >\n \n \n\n {\n onOkay(newRoleIds, newSellerUserIds);\n }}\n >\n \n \n \n }\n onCancel={isLoading ? undefined : onCancel}\n >\n \n \n \n \n );\n}\n","import clsx from 'clsx';\nimport { isEqual, uniq } from 'lodash-es';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useToggle } from 'react-use';\nimport { CancelButton } from 'src/components/Buttons';\nimport { OkButton } from 'src/components/Buttons/OkButton';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { typography } from 'src/core/themes/shared.css';\nimport { ReportConfig } from 'src/hooks/useReportConfigs';\nimport { useTagsForEntityType } from 'src/hooks/useTagsForEntityType';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport { TableColumnsInput } from 'src/modals/ColumnSettings/TableColumnsInput';\nimport { LISTING_REPORT_TABLE_COLUMNS_CONFIG } from 'src/tables/ListingTable/configs/ListingReportTableColumnsConfig';\nimport { filterColumnsByFeatures } from 'src/utils/columns/columnUtils';\nimport { isMetricConfigurableByGroupBy } from 'src/utils/columns/inventory/inventoryColumnUtils';\nimport { CustomListingColumn } from 'src/utils/columns/inventory/inventoryCustomColumnUtils.types';\nimport { filterCustomColumnsForListingReport } from 'src/utils/columns/inventory/inventoryReportCustomColumnUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport {\n ActionOutboxEntityType,\n ReportGroupBy,\n UserSetting,\n} from 'src/WebApiController';\n\nimport {\n Modal,\n ModalBody,\n ModalFooter,\n ModalHeader,\n} from '../../../modals/Modal';\nimport * as styles from './MetricsSelectionInputModal.css';\n\nexport const InventoryMetricsSelectionInputModal = ({\n onClose,\n headerContentId,\n groupBy,\n}: {\n onClose: () => void;\n headerContentId?: ContentId;\n groupBy?: ReportGroupBy;\n}) => {\n const { appContext, loginContext } = useAppContext();\n const { setValue, watch, clearErrors } = useFormContext();\n const [isOpen, toggleIsOpen] = useToggle(true);\n\n const {\n value: customListingColumns = [],\n setUserSetting: setCustomListingColumns,\n } = useServerUserSetting({\n id: UserSetting.InventoryCustomColumns,\n });\n\n const { tagsMetadataNumeric } = useTagsForEntityType(\n ActionOutboxEntityType.Listing,\n true\n );\n\n const { tagsMetadata: tagsMetadataEvent } = useTagsForEntityType(\n ActionOutboxEntityType.SellerEvent,\n true\n );\n\n const { tagsMetadata: tagsMetadataPurchase } = useTagsForEntityType(\n ActionOutboxEntityType.Purchase,\n true\n );\n\n const customListingColumnsFiltered = filterCustomColumnsForListingReport(\n customListingColumns,\n tagsMetadataNumeric\n );\n\n const reportingTags = useMemo(() => {\n if (groupBy === ReportGroupBy.Event) {\n return [...(tagsMetadataNumeric ?? []), ...(tagsMetadataEvent ?? [])];\n } else if (groupBy === ReportGroupBy.PurchaseId) {\n return [...(tagsMetadataNumeric ?? []), ...(tagsMetadataPurchase ?? [])];\n }\n\n return tagsMetadataNumeric;\n }, [groupBy, tagsMetadataEvent, tagsMetadataNumeric, tagsMetadataPurchase]);\n\n const metrics = watch('metrics');\n\n const presetColumnIds = Object.values(LISTING_REPORT_TABLE_COLUMNS_CONFIG)\n .map((i) => i.id)\n .filter((id) => {\n if (!id) return false;\n\n return isMetricConfigurableByGroupBy(id, groupBy);\n }) as string[];\n\n const activeTagNames = useMemo(\n () => reportingTags?.map((t) => t.key) ?? [],\n [reportingTags]\n );\n\n const customColumnIds = customListingColumnsFiltered.map((c) => c.id);\n\n const filterColumns = useCallback(\n (columnList: string[]) => {\n return columnList.filter(\n (m) =>\n presetColumnIds.includes(m) ||\n activeTagNames.includes(m) ||\n customColumnIds.includes(m)\n );\n },\n [activeTagNames, customColumnIds, presetColumnIds]\n );\n\n const metricsFiltered = useMemo(\n () => filterColumns(metrics),\n [filterColumns, metrics]\n );\n\n const [userColumnSelection, setUserColumnSelection] = useState(\n metricsFiltered ?? []\n );\n\n const storedColumnOrderSettingFiltered = useMemo(() => {\n const allColumnIdsAvailable = filterColumns(\n uniq([\n ...metricsFiltered,\n ...presetColumnIds.toSorted((a, b) => a.localeCompare(b)),\n ...customColumnIds.toSorted((a, b) => a.localeCompare(b)),\n ...activeTagNames.toSorted((a, b) => a.localeCompare(b)),\n ])\n );\n\n const existingColumnsOrderSetting = filterColumns(\n metricsFiltered as string[]\n );\n\n allColumnIdsAvailable.forEach((columnId) => {\n if (!existingColumnsOrderSetting.includes(columnId)) {\n existingColumnsOrderSetting.push(columnId);\n }\n });\n\n return existingColumnsOrderSetting;\n }, [\n activeTagNames,\n customColumnIds,\n filterColumns,\n metricsFiltered,\n presetColumnIds,\n ]);\n\n const [userColumnSorting, setUserColumnSorting] = useState(\n filterColumnsByFeatures(\n storedColumnOrderSettingFiltered,\n SectionType.ListingsReport,\n customListingColumns,\n loginContext?.user,\n appContext?.features,\n reportingTags,\n groupBy\n )\n );\n\n const [userColumnIsDirty, setUserColumnIsDirty] = useState(false);\n\n const onSaveHandler = () => {\n const sortedColumnSelection = userColumnSorting.filter((c) =>\n userColumnSelection.includes(c)\n );\n setValue('metrics', sortedColumnSelection);\n clearErrors('metrics');\n toggleIsOpen();\n };\n\n useEffect(() => {\n if (!isOpen) setTimeout(onClose, 300);\n }, [isOpen, onClose]);\n\n // Sync the user setting to the default if the user has never set it\n useEffect(() => {\n const newColumns = filterColumnsByFeatures(\n storedColumnOrderSettingFiltered,\n SectionType.ListingsReport,\n customListingColumns,\n loginContext?.user,\n appContext?.features,\n reportingTags,\n groupBy\n );\n\n if (!userColumnIsDirty) {\n if (!isEqual(newColumns, userColumnSorting)) {\n setUserColumnSorting(newColumns);\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [customListingColumns, activeTagNames, storedColumnOrderSettingFiltered]);\n\n // Keep the columns up to date in case the user changes the settings (e.g. deletes custom column)\n useEffect(() => {\n const allColumnIdsAvailable = filterColumns(\n uniq([\n ...metricsFiltered,\n ...presetColumnIds.toSorted((a, b) => a.localeCompare(b)),\n ...customColumnIds.toSorted((a, b) => a.localeCompare(b)),\n ...activeTagNames.toSorted((a, b) => a.localeCompare(b)),\n ])\n );\n\n let userColumnSortingFiltered = filterColumns(userColumnSorting);\n\n allColumnIdsAvailable.forEach((columnId) => {\n if (!userColumnSortingFiltered.includes(columnId)) {\n userColumnSortingFiltered.push(columnId);\n }\n });\n\n userColumnSortingFiltered = filterColumnsByFeatures(\n storedColumnOrderSettingFiltered,\n SectionType.ListingsReport,\n customListingColumns,\n loginContext?.user,\n appContext?.features,\n reportingTags,\n groupBy\n );\n\n if (\n !isEqual(new Set(userColumnSortingFiltered), new Set(userColumnSorting))\n ) {\n setUserColumnSorting(userColumnSortingFiltered);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [customColumnIds]);\n\n return (\n <>\n \n \n
    \n
    \n \n
    \n
    \n
    \n \n \n userColumnSelection={userColumnSelection}\n onUserColumnSelectionChange={(newSelection) => {\n setUserColumnSelection(newSelection);\n setUserColumnIsDirty(true);\n }}\n userColumnSorting={userColumnSorting}\n onUserColumnSortingChange={(newSorting) => {\n setUserColumnSorting(newSorting);\n setUserColumnIsDirty(true);\n }}\n onCustomColumnsChange={setCustomListingColumns}\n customColumns={customListingColumnsFiltered}\n reportingTags={reportingTags}\n sectionType={SectionType.ListingsReport}\n groupBy={groupBy}\n />\n \n \n \n \n \n \n \n );\n};\n","import clsx from 'clsx';\nimport { isEqual, uniq } from 'lodash-es';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useToggle } from 'react-use';\nimport { CancelButton } from 'src/components/Buttons';\nimport { OkButton } from 'src/components/Buttons/OkButton';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { typography } from 'src/core/themes/shared.css';\nimport { ReportConfig } from 'src/hooks/useReportConfigs';\nimport { useTagsForEntityType } from 'src/hooks/useTagsForEntityType';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport { TableColumnsInput } from 'src/modals/ColumnSettings/TableColumnsInput';\nimport { SALE_REPORT_TABLE_COLUMNS_CONFIG } from 'src/tables/SalesTable/configs/SaleReportTableColumnsConfig';\nimport { filterColumnsByFeatures } from 'src/utils/columns/columnUtils';\nimport { isMetricConfigurableByGroupBy } from 'src/utils/columns/sales/salesColumnUtils';\nimport { filterCustomColumnsForSale } from 'src/utils/columns/sales/salesCustomColumnUtils';\nimport { CustomSalesColumn } from 'src/utils/columns/sales/salesCustomColumnUtils.types';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport {\n ActionOutboxEntityType,\n ReportGroupBy,\n UserSetting,\n} from 'src/WebApiController';\n\nimport {\n Modal,\n ModalBody,\n ModalFooter,\n ModalHeader,\n} from '../../../modals/Modal';\nimport * as styles from './MetricsSelectionInputModal.css';\n\nexport const SalesMetricsSelectionInputModal = ({\n onClose,\n headerContentId,\n groupBy,\n}: {\n onClose: () => void;\n headerContentId?: ContentId;\n groupBy?: ReportGroupBy;\n}) => {\n const { appContext, loginContext } = useAppContext();\n const { setValue, watch, clearErrors } = useFormContext();\n const [isOpen, toggleIsOpen] = useToggle(true);\n\n const {\n value: customSaleColumns = [],\n setUserSetting: setCustomSaleColumns,\n } = useServerUserSetting({\n id: UserSetting.SaleCustomColumns,\n });\n\n const { tagsMetadataNumeric } = useTagsForEntityType(\n ActionOutboxEntityType.Sale,\n true\n );\n\n const { tagsMetadata: tagsMetadataEvent } = useTagsForEntityType(\n ActionOutboxEntityType.SellerEvent,\n true\n );\n\n const customSaleColumnsFiltered = filterCustomColumnsForSale(\n customSaleColumns,\n tagsMetadataNumeric\n );\n\n const reportingTags = useMemo(() => {\n if (groupBy === ReportGroupBy.Event) {\n return [...(tagsMetadataNumeric ?? []), ...(tagsMetadataEvent ?? [])];\n }\n\n return tagsMetadataNumeric;\n }, [groupBy, tagsMetadataEvent, tagsMetadataNumeric]);\n\n const metrics = watch('metrics');\n\n const presetColumnIds = Object.values(SALE_REPORT_TABLE_COLUMNS_CONFIG)\n .map((i) => i.id)\n .filter((id) => {\n if (!id) return false;\n\n return isMetricConfigurableByGroupBy(id, groupBy);\n }) as string[];\n\n const activeTagNames = useMemo(\n () => reportingTags?.map((t) => t.key) ?? [],\n [reportingTags]\n );\n const customColumnIds = customSaleColumnsFiltered.map((c) => c.id);\n\n const filterColumns = useCallback(\n (columnList: string[]) => {\n return columnList.filter(\n (m) =>\n presetColumnIds.includes(m) ||\n activeTagNames.includes(m) ||\n customColumnIds.includes(m)\n );\n },\n [activeTagNames, customColumnIds, presetColumnIds]\n );\n\n const metricsFiltered = useMemo(\n () => filterColumns(metrics),\n [filterColumns, metrics]\n );\n\n const [userColumnSelection, setUserColumnSelection] = useState(\n metricsFiltered ?? []\n );\n\n const storedColumnOrderSettingFiltered = useMemo(() => {\n const allColumnIdsAvailable = filterColumns(\n uniq([\n ...metricsFiltered,\n ...presetColumnIds.toSorted((a, b) => a.localeCompare(b)),\n ...customColumnIds.toSorted((a, b) => a.localeCompare(b)),\n ...activeTagNames.toSorted((a, b) => a.localeCompare(b)),\n ])\n );\n\n const existingColumnsOrderSetting = filterColumns(\n metricsFiltered as string[]\n );\n\n allColumnIdsAvailable.forEach((columnId) => {\n if (!existingColumnsOrderSetting.includes(columnId)) {\n existingColumnsOrderSetting.push(columnId);\n }\n });\n\n return existingColumnsOrderSetting;\n }, [\n activeTagNames,\n customColumnIds,\n filterColumns,\n metricsFiltered,\n presetColumnIds,\n ]);\n\n const [userColumnSorting, setUserColumnSorting] = useState(\n filterColumnsByFeatures(\n storedColumnOrderSettingFiltered,\n SectionType.SalesReport,\n customSaleColumns,\n loginContext?.user,\n appContext?.features,\n reportingTags,\n groupBy\n )\n );\n\n const [userColumnIsDirty, setUserColumnIsDirty] = useState(false);\n\n const onSaveHandler = () => {\n const sortedColumnSelection = userColumnSorting.filter((c) =>\n userColumnSelection.includes(c)\n );\n setValue('metrics', sortedColumnSelection);\n clearErrors('metrics');\n toggleIsOpen();\n };\n\n useEffect(() => {\n if (!isOpen) setTimeout(onClose, 300);\n }, [isOpen, onClose]);\n\n // Sync the user setting to the default if the user has never set it\n useEffect(() => {\n const newColumns = filterColumnsByFeatures(\n storedColumnOrderSettingFiltered,\n SectionType.SalesReport,\n customSaleColumns,\n loginContext?.user,\n appContext?.features,\n reportingTags,\n groupBy\n );\n\n if (!userColumnIsDirty) {\n if (!isEqual(newColumns, userColumnSorting)) {\n setUserColumnSorting(newColumns);\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [customSaleColumns, activeTagNames, storedColumnOrderSettingFiltered]);\n\n // Keep the columns up to date in case the user changes the settings (e.g. deletes custom column)\n useEffect(() => {\n const allColumnIdsAvailable = filterColumns(\n uniq([\n ...metricsFiltered,\n ...presetColumnIds.toSorted((a, b) => a.localeCompare(b)),\n ...customColumnIds.toSorted((a, b) => a.localeCompare(b)),\n ...activeTagNames.toSorted((a, b) => a.localeCompare(b)),\n ])\n );\n\n let userColumnSortingFiltered = filterColumns(userColumnSorting);\n\n allColumnIdsAvailable.forEach((columnId) => {\n if (!userColumnSortingFiltered.includes(columnId)) {\n userColumnSortingFiltered.push(columnId);\n }\n });\n\n userColumnSortingFiltered = filterColumnsByFeatures(\n storedColumnOrderSettingFiltered,\n SectionType.SalesReport,\n customSaleColumns,\n loginContext?.user,\n appContext?.features,\n reportingTags,\n groupBy\n );\n\n if (\n !isEqual(new Set(userColumnSortingFiltered), new Set(userColumnSorting))\n ) {\n setUserColumnSorting(userColumnSortingFiltered);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [customColumnIds]);\n\n return (\n <>\n \n \n
    \n
    \n \n
    \n
    \n
    \n \n \n userColumnSelection={userColumnSelection}\n onUserColumnSelectionChange={(newSelection) => {\n setUserColumnSelection(newSelection);\n setUserColumnIsDirty(true);\n }}\n userColumnSorting={userColumnSorting}\n onUserColumnSortingChange={(newSorting) => {\n setUserColumnSorting(newSorting);\n setUserColumnIsDirty(true);\n }}\n onCustomColumnsChange={setCustomSaleColumns}\n customColumns={customSaleColumnsFiltered}\n reportingTags={reportingTags}\n sectionType={SectionType.SalesReport}\n groupBy={groupBy}\n />\n \n \n \n \n \n \n \n );\n};\n","import {\n DEFAULT_REPORT_FILTER_EDITABILITY,\n ReportFilterEditability,\n} from 'src/utils/reportsFilterUtils';\n\nexport const getEditability = (\n editableFilterItemIds: string[] | undefined | null,\n viewableFilterItemIds: string[] | undefined | null,\n hiddenFilterItemIds: string[] | undefined | null,\n reportFilterId: string | null | undefined\n) => {\n if (!reportFilterId) {\n return DEFAULT_REPORT_FILTER_EDITABILITY;\n }\n\n if (viewableFilterItemIds?.includes(reportFilterId)) {\n return ReportFilterEditability.View;\n }\n if (editableFilterItemIds?.includes(reportFilterId)) {\n return ReportFilterEditability.Edit;\n }\n if (hiddenFilterItemIds?.includes(reportFilterId)) {\n return ReportFilterEditability.Hidden;\n }\n return DEFAULT_REPORT_FILTER_EDITABILITY;\n};\n\nexport const updateFilterItemIds = (\n editableFilterItemIds: string[] | undefined | null,\n viewableFilterItemIds: string[] | undefined | null,\n hiddenFilterItemIds: string[] | undefined | null,\n reportFilterIds: string[],\n editability: ReportFilterEditability\n) => {\n const isNotIncluded = (id: string) => !reportFilterIds.includes(id);\n\n const newHiddenFilterItemIds = hiddenFilterItemIds\n ? hiddenFilterItemIds.filter(isNotIncluded)\n : [];\n const newViewableFilterItemIds = viewableFilterItemIds\n ? viewableFilterItemIds.filter(isNotIncluded)\n : [];\n const newEditableFilterItemIds = editableFilterItemIds\n ? editableFilterItemIds.filter(isNotIncluded)\n : [];\n\n if (editability === ReportFilterEditability.Hidden) {\n newHiddenFilterItemIds.push(...reportFilterIds);\n } else if (editability === ReportFilterEditability.View) {\n newViewableFilterItemIds.push(...reportFilterIds);\n } else if (editability === ReportFilterEditability.Edit) {\n newEditableFilterItemIds.push(...reportFilterIds);\n }\n\n return {\n newHiddenFilterItemIds: newHiddenFilterItemIds.toSorted(),\n newViewableFilterItemIds: newViewableFilterItemIds.toSorted(),\n newEditableFilterItemIds: newEditableFilterItemIds.toSorted(),\n };\n};\n","import { useCallback, useEffect, useMemo } from 'react';\nimport isEqual from 'react-fast-compare';\nimport { useFormContext } from 'react-hook-form';\nimport { PerformerVenueList } from 'src/components/Events/PerformerVenueList';\nimport {\n FilterToolbar,\n FilterToolbarProps,\n} from 'src/components/FilterToolbar';\nimport { useFiltersHelpers } from 'src/components/FilterToolbar/useFiltersHelpers';\nimport {\n listingsMandatoryFiltersToShow,\n useListingFilters,\n} from 'src/components/MainFilterBar/useListingFilters';\nimport {\n saleMandatoryFiltersToShow,\n useSaleFilters,\n} from 'src/components/MainFilterBar/useSaleFilters';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { Button, Popover, Stack } from 'src/core/ui';\nimport { ReportConfig } from 'src/hooks/useReportConfigs';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n DefaultListingQuery,\n DefaultSaleQuery,\n} from 'src/utils/eventQueryUtils';\nimport {\n DEFAULT_REPORT_FILTER_EDITABILITY,\n ReportFilterEditability,\n ReportPerformerVenueFilterItemId,\n} from 'src/utils/reportsFilterUtils';\nimport { ReportTypes } from 'src/utils/reportsUtils';\nimport {\n ActionOutboxEntityType,\n ListingQuery,\n SaleQuery,\n} from 'src/WebApiController';\n\nimport * as styles from './ReportBuilderDialog.css';\nimport {\n getEditability,\n updateFilterItemIds,\n} from './ReportBuilderFilterInput.utils';\n\ntype ReportFilterInputProps = {\n onSubmitFilter?: () => void;\n showAllButton?: boolean;\n filterAppliedMessage?: React.ReactNode;\n} & Pick;\n\nexport function ReportBuilderFilterInput({\n reportType,\n onSubmitFilter,\n showAllButton = true,\n filterAppliedMessage,\n embeddedDisplayOnly,\n}: {\n reportType: ReportTypes;\n} & ReportFilterInputProps) {\n const { watch } = useFormContext();\n\n const hiddenFilterItemIds = watch('hiddenFilterItemIds');\n const viewableFilterItemIds = watch('viewableFilterItemIds');\n const editableFilterItemIds = watch('editableFilterItemIds');\n\n const performerFilterEditability = getEditability(\n editableFilterItemIds,\n viewableFilterItemIds,\n hiddenFilterItemIds,\n ReportPerformerVenueFilterItemId.PerformerIds\n );\n const venueFilterEditability = getEditability(\n editableFilterItemIds,\n viewableFilterItemIds,\n hiddenFilterItemIds,\n ReportPerformerVenueFilterItemId.VenueIds\n );\n\n const hidePerformerVenueFilter =\n embeddedDisplayOnly &&\n (performerFilterEditability ?? DEFAULT_REPORT_FILTER_EDITABILITY) ===\n ReportFilterEditability.Hidden &&\n (venueFilterEditability ?? DEFAULT_REPORT_FILTER_EDITABILITY) ===\n ReportFilterEditability.Hidden;\n\n return (\n \n {reportType === ReportTypes.Inventory ? (\n <>\n {!embeddedDisplayOnly && (\n \n )}\n \n )\n }\n />\n \n ) : (\n <>\n {!embeddedDisplayOnly && (\n \n )}\n \n )\n }\n />\n \n )}\n \n );\n}\n\nconst ListingFilterInput = ({\n onSubmitFilter,\n showAllButton = true,\n filterAppliedMessage,\n embeddedDisplayOnly,\n performerVenueFilter,\n}: ReportFilterInputProps) => {\n const { setValue, watch } = useFormContext();\n\n const formFilter = watch('filter');\n const hiddenFilterItemIds = watch('hiddenFilterItemIds');\n const viewableFilterItemIds = watch('viewableFilterItemIds');\n const editableFilterItemIds = watch('editableFilterItemIds');\n\n const {\n initialQuery,\n tempQuery,\n filterQuery,\n setFilterQuery,\n setTempQuery,\n resetTempQuery,\n } = useFilterQueryContext();\n const { filters } = useListingFilters({\n isReportsPage: true,\n });\n\n const onSubmitFilterHandler = useCallback(() => {\n setFilterQuery(tempQuery);\n onSubmitFilter?.();\n }, [onSubmitFilter, setFilterQuery, tempQuery]);\n\n useEffect(() => {\n if (formFilter != null && !isEqual(formFilter as ListingQuery, tempQuery)) {\n setTempQuery(formFilter as ListingQuery);\n setFilterQuery(formFilter as ListingQuery);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n useEffect(() => {\n if (embeddedDisplayOnly) {\n // We don't have apply button for embedded view. So, we need to submit filter on every change\n onSubmitFilterHandler();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [tempQuery]);\n\n useEffect(() => {\n if (!isEqual(formFilter as ListingQuery, filterQuery)) {\n setValue('filter', filterQuery);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [filterQuery]);\n\n const { appliedFilters } = useFiltersHelpers({\n filters,\n activeQuery: filterQuery,\n mandatoryFiltersToShow: listingsMandatoryFiltersToShow,\n initialQuery,\n });\n\n const { appliedFilters: appliedFiltersRelativeToEmpty } = useFiltersHelpers({\n filters,\n activeQuery: tempQuery,\n mandatoryFiltersToShow: listingsMandatoryFiltersToShow,\n initialQuery: DefaultListingQuery,\n });\n\n const filtersWithEditability = useMemo(\n () =>\n filters.map((filterGroup) => ({\n ...filterGroup,\n items: filterGroup.items.map((filterItem) => ({\n ...filterItem,\n reportFilterEditability: getEditability(\n editableFilterItemIds,\n viewableFilterItemIds,\n hiddenFilterItemIds,\n filterItem.filterId\n ),\n })),\n })),\n [editableFilterItemIds, filters, hiddenFilterItemIds, viewableFilterItemIds]\n );\n\n const onEditabilityChange = useCallback(\n (filterId: string | string[], editability: ReportFilterEditability) => {\n const filterIds = Array.isArray(filterId) ? filterId : [filterId];\n\n const {\n newHiddenFilterItemIds,\n newViewableFilterItemIds,\n newEditableFilterItemIds,\n } = updateFilterItemIds(\n editableFilterItemIds,\n viewableFilterItemIds,\n hiddenFilterItemIds,\n filterIds,\n editability\n );\n\n setValue('hiddenFilterItemIds', newHiddenFilterItemIds);\n setValue('viewableFilterItemIds', newViewableFilterItemIds);\n setValue('editableFilterItemIds', newEditableFilterItemIds);\n },\n [\n editableFilterItemIds,\n hiddenFilterItemIds,\n setValue,\n viewableFilterItemIds,\n ]\n );\n\n return (\n {\n setTempQuery(initialQuery);\n setFilterQuery(initialQuery);\n }}\n isAllSelected={false}\n showCustomFilterButton={false}\n filterAppliedCounts={appliedFilters.length}\n allContentId={ContentId.ResetAll}\n filters={filtersWithEditability}\n filterAppliedIds={appliedFiltersRelativeToEmpty}\n onSubmitFilter={onSubmitFilterHandler}\n showAllButton={showAllButton}\n mandatoryFiltersToShow={listingsMandatoryFiltersToShow}\n filterAppliedMessage={filterAppliedMessage}\n resetTempQuery={resetTempQuery}\n tempQuery={tempQuery}\n onEditabilityChange={onEditabilityChange}\n embeddedDisplayOnly={embeddedDisplayOnly}\n performerVenueFilter={performerVenueFilter}\n />\n );\n};\n\nconst SaleFilterInput = ({\n onSubmitFilter,\n showAllButton = true,\n filterAppliedMessage,\n embeddedDisplayOnly,\n performerVenueFilter,\n}: ReportFilterInputProps) => {\n const { setValue, watch } = useFormContext();\n\n const formFilter = watch('filter');\n const hiddenFilterItemIds = watch('hiddenFilterItemIds');\n const viewableFilterItemIds = watch('viewableFilterItemIds');\n const editableFilterItemIds = watch('editableFilterItemIds');\n\n const {\n initialQuery,\n tempQuery,\n filterQuery,\n setFilterQuery,\n setTempQuery,\n resetTempQuery,\n } = useFilterQueryContext();\n const { filters } = useSaleFilters({ isReportsPage: true });\n\n const onSubmitFilterHandler = useCallback(() => {\n setFilterQuery(tempQuery);\n onSubmitFilter?.();\n }, [onSubmitFilter, setFilterQuery, tempQuery]);\n\n useEffect(() => {\n if (formFilter != null && !isEqual(formFilter as SaleQuery, tempQuery)) {\n setTempQuery(formFilter as SaleQuery);\n setFilterQuery(formFilter as SaleQuery);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n useEffect(() => {\n if (embeddedDisplayOnly) {\n // We don't have apply button for embedded view. So, we need to submit filter on every change\n onSubmitFilterHandler();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [tempQuery]);\n\n useEffect(() => {\n if (!isEqual(formFilter as SaleQuery, filterQuery)) {\n setValue('filter', filterQuery);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [filterQuery]);\n\n const { appliedFilters } = useFiltersHelpers({\n filters,\n activeQuery: filterQuery,\n mandatoryFiltersToShow: saleMandatoryFiltersToShow,\n initialQuery,\n });\n\n const { appliedFilters: appliedFiltersRelativeToEmpty } = useFiltersHelpers({\n filters,\n activeQuery: tempQuery,\n mandatoryFiltersToShow: saleMandatoryFiltersToShow,\n initialQuery: DefaultSaleQuery,\n });\n\n const filtersWithEditability = useMemo(\n () =>\n filters.map((filterGroup) => ({\n ...filterGroup,\n items: filterGroup.items.map((filterItem) => ({\n ...filterItem,\n reportFilterEditability: getEditability(\n editableFilterItemIds,\n viewableFilterItemIds,\n hiddenFilterItemIds,\n filterItem.filterId\n ),\n })),\n })),\n [editableFilterItemIds, filters, hiddenFilterItemIds, viewableFilterItemIds]\n );\n\n const onEditabilityChange = useCallback(\n (filterId: string | string[], editability: ReportFilterEditability) => {\n const filterIds = Array.isArray(filterId) ? filterId : [filterId];\n\n const {\n newHiddenFilterItemIds,\n newViewableFilterItemIds,\n newEditableFilterItemIds,\n } = updateFilterItemIds(\n editableFilterItemIds,\n viewableFilterItemIds,\n hiddenFilterItemIds,\n filterIds,\n editability\n );\n\n setValue('hiddenFilterItemIds', newHiddenFilterItemIds);\n setValue('viewableFilterItemIds', newViewableFilterItemIds);\n setValue('editableFilterItemIds', newEditableFilterItemIds);\n },\n [\n editableFilterItemIds,\n hiddenFilterItemIds,\n setValue,\n viewableFilterItemIds,\n ]\n );\n\n return (\n {\n setTempQuery(initialQuery);\n setFilterQuery(initialQuery);\n }}\n isAllSelected={false}\n showCustomFilterButton={false}\n filterAppliedCounts={appliedFilters.length}\n allContentId={ContentId.ResetAll}\n filters={filtersWithEditability}\n filterAppliedIds={appliedFiltersRelativeToEmpty}\n onSubmitFilter={onSubmitFilterHandler}\n showAllButton={showAllButton}\n mandatoryFiltersToShow={saleMandatoryFiltersToShow}\n filterAppliedMessage={filterAppliedMessage}\n resetTempQuery={resetTempQuery}\n tempQuery={tempQuery}\n onEditabilityChange={onEditabilityChange}\n embeddedDisplayOnly={embeddedDisplayOnly}\n performerVenueFilter={performerVenueFilter}\n />\n );\n};\n\nconst PerformerVenuePopover = ({\n entityType,\n onSubmitFilter,\n embeddedDisplayOnly,\n}: {\n entityType: ActionOutboxEntityType.Listing | ActionOutboxEntityType.Sale;\n onSubmitFilter?: () => void;\n embeddedDisplayOnly?: boolean;\n}) => {\n const { setValue, watch } = useFormContext();\n\n const hiddenFilterItemIds = watch('hiddenFilterItemIds');\n const viewableFilterItemIds = watch('viewableFilterItemIds');\n const editableFilterItemIds = watch('editableFilterItemIds');\n\n const performerFilterEditability = getEditability(\n editableFilterItemIds,\n viewableFilterItemIds,\n hiddenFilterItemIds,\n ReportPerformerVenueFilterItemId.PerformerIds\n );\n const venueFilterEditability = getEditability(\n editableFilterItemIds,\n viewableFilterItemIds,\n hiddenFilterItemIds,\n ReportPerformerVenueFilterItemId.VenueIds\n );\n\n const onEditabilityChange = useCallback(\n (reportFilterId: string, editability: ReportFilterEditability) => {\n const newHiddenFilterItemIds = hiddenFilterItemIds\n ? hiddenFilterItemIds.filter((id) => id !== reportFilterId)\n : [];\n const newViewableFilterItemIds = viewableFilterItemIds\n ? viewableFilterItemIds.filter((id) => id !== reportFilterId)\n : [];\n const newEditableFilterItemIds = editableFilterItemIds\n ? editableFilterItemIds.filter((id) => id !== reportFilterId)\n : [];\n\n if (editability === ReportFilterEditability.Hidden) {\n newHiddenFilterItemIds.push(reportFilterId);\n } else if (editability === ReportFilterEditability.View) {\n newViewableFilterItemIds.push(reportFilterId);\n } else if (editability === ReportFilterEditability.Edit) {\n newEditableFilterItemIds.push(reportFilterId);\n }\n\n setValue('hiddenFilterItemIds', newHiddenFilterItemIds.toSorted());\n setValue('viewableFilterItemIds', newViewableFilterItemIds.toSorted());\n setValue('editableFilterItemIds', newEditableFilterItemIds.toSorted());\n },\n [\n editableFilterItemIds,\n hiddenFilterItemIds,\n setValue,\n viewableFilterItemIds,\n ]\n );\n\n return (\n \n \n \n \n \n \n \n
    \n {}}\n hideMetrics\n // Have to update tempQuery instead of filterQuery to sync with the main filter bar here\n updateTempQuery\n onEditabilityChange={onEditabilityChange}\n performerFilterEditability={performerFilterEditability}\n venueFilterEditability={venueFilterEditability}\n embeddedDisplayOnly={embeddedDisplayOnly}\n />\n
    \n
    \n
    \n );\n};\n","import { ComponentProps, useCallback } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { MultiSelectDropBoxWithPills } from 'src/core/POS/MultiSelectDropBoxWithPills';\nimport { ReportConfig } from 'src/hooks/useReportConfigs';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { INVENTORY_REPORT_WIDGETS_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { ReportWidgetTypesInventory } from 'src/WebApiController';\n\nexport type WidgetsSelectionInputProps = Omit<\n ComponentProps,\n 'values' | 'onChange' | 'valueOptionsContent'\n>;\n\nexport const WidgetsSelectionInput = ({\n disabled,\n ...multiSelectorProps\n}: WidgetsSelectionInputProps) => {\n const { setValue, watch } = useFormContext();\n\n const widgets = watch('widgets');\n\n const onSelectionChanged = useCallback(\n (newWidgets: string[]) => {\n setValue('widgets', newWidgets as ReportWidgetTypesInventory[]);\n },\n [setValue]\n );\n\n return (\n <>\n \n \n );\n};\n","import { ComponentProps, useCallback, useMemo, useState } from 'react';\nimport { FormProvider } from 'react-hook-form';\nimport { useToggle } from 'react-use';\nimport { Modal as RSModal } from 'reactstrap';\nimport { CancelButton } from 'src/components/Buttons';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosSelect } from 'src/core/POS/PosSelect';\nimport { getTextFieldState, PosTextField } from 'src/core/POS/PosTextField';\nimport { shared } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport {\n PosAccordionContent,\n PosAccordionItem,\n PosAccordionRoot,\n PosAccordionTrigger,\n} from 'src/core/ui/Accordion';\nimport { GroupBySelector } from 'src/dialogs/ReportBuilderDialog/GroupBySelector';\nimport { ReportConfig, useReportConfigs } from 'src/hooks/useReportConfigs';\nimport { useTagsForEntityType } from 'src/hooks/useTagsForEntityType';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport { TableColumnsDisplay } from 'src/modals/ColumnSettings/TableColumnsDisplay';\nimport { FieldWrapper } from 'src/modals/common/Purchase';\nimport { useColumnDisplayName } from 'src/modals/InventoryTableColumns/useColumnDisplayName';\nimport { LISTING_REPORT_TABLE_COLUMNS_CONFIG } from 'src/tables/ListingTable/configs/ListingReportTableColumnsConfig';\nimport { SALE_REPORT_TABLE_COLUMNS_CONFIG } from 'src/tables/SalesTable/configs/SaleReportTableColumnsConfig';\nimport { isMetricConfigurableByGroupBy as isListingMetricConfigurableByGroupBy } from 'src/utils/columns/inventory/inventoryColumnUtils';\nimport { GROUP_BY_TO_PRIMARY_COLUMN_ID as GROUP_BY_TO_PRIMARY_COLUMN_ID_LISTING } from 'src/utils/columns/inventory/inventoryColumnUtils.constants';\nimport { CustomListingColumn } from 'src/utils/columns/inventory/inventoryCustomColumnUtils.types';\nimport { filterCustomColumnsForListingReport } from 'src/utils/columns/inventory/inventoryReportCustomColumnUtils';\nimport { isMetricConfigurableByGroupBy as isSaleMetricConfigurableByGroupBy } from 'src/utils/columns/sales/salesColumnUtils';\nimport { filterCustomColumnsForSale } from 'src/utils/columns/sales/salesCustomColumnUtils';\nimport { CustomSalesColumn } from 'src/utils/columns/sales/salesCustomColumnUtils.types';\nimport { GROUP_BY_TO_PRIMARY_COLUMN_ID as GROUP_BY_TO_PRIMARY_COLUMN_ID_SALES } from 'src/utils/columns/sales/salesReportColumnUtils.constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n REPORT_INVENTORY_GROUP_BY_TO_CID,\n REPORT_IS_SORT_DESCENDING_TO_CID,\n REPORT_SALE_GROUP_BY_TO_CID,\n} from 'src/utils/constants/contentIdMaps';\nimport { ReportTypes } from 'src/utils/reportsUtils';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport {\n ActionOutboxEntityType,\n ReportGroupBy,\n UserSetting,\n} from 'src/WebApiController';\n\nimport { ShareReportBody } from '../ShareReportDialog';\nimport {\n InventoryMetricsSelectionInputModal,\n SalesMetricsSelectionInputModal,\n} from './MetricsSelectionInputModal';\nimport * as styles from './ReportBuilderDialog.css';\nimport { ReportBuilderFilterInput } from './ReportBuilderFilterInput';\nimport { WidgetsSelectionInput } from './WidgetsSelectionInput';\n\nexport type ReportBuilderDialogProps = {\n report: ReportConfig;\n onSave: (data: ReportConfig) => void;\n} & ComponentProps;\n\nconst AdvancedSettingsId = 'advanced-settings';\n\ntype AdvancedSettingsAccordion = typeof AdvancedSettingsId | undefined;\n\nexport function ReportBuilderDialogBody({\n onSave,\n onClosed,\n register,\n setError,\n setValue,\n handleSubmit,\n formState,\n watch,\n reportType,\n ...rest\n}: Omit &\n Omit<\n ComponentProps>,\n 'children' | 'trigger' | 'reset' | 'unregister'\n > & {\n reportType: ReportTypes;\n }) {\n const { reportConfigs: existingReports } = useReportConfigs({\n reportType,\n });\n\n const requiredMsg = useContent(ContentId.Required);\n const duplicateNameMsg = useContent(ContentId.DuplicatedReportName);\n\n const nameError = formState.errors.reportName?.message;\n const numberOfItemsPerPageError =\n formState.errors.numberOfItemsPerPage?.message;\n const widgetsError = formState.errors.widgets?.message;\n const filtersError = formState.errors.filter?.message;\n const metricsError = formState.errors.metrics?.message;\n const groupByError = formState.errors.groupBy?.message;\n\n const reportId = watch('reportId');\n const reportName = watch('reportName');\n const groupBy = watch('groupBy');\n const metrics = watch('metrics');\n const numberOfItemsPerPage = watch('numberOfItemsPerPage');\n const sortBy = watch('sortBy');\n const isSortDescending = watch('isSortDescending');\n const roleIdsToShare = watch('roleIdsToShare');\n const sellerUserIdsToShare = watch('sellerUserIdsToShare');\n\n const [isMetricModalOpen, toggleMetricModal] = useToggle(false);\n const [advancedSettingsExpandedItem, setAdvancedSettingsExpandedItem] =\n useState(undefined);\n\n const onSubmit = useCallback(() => {\n let hasErrors = false;\n if (!reportName) {\n setError('reportName', { message: requiredMsg }, { shouldFocus: true });\n hasErrors = true;\n }\n\n if (metrics == null || metrics.length === 0) {\n setError('metrics', { message: requiredMsg }, { shouldFocus: true });\n hasErrors = true;\n }\n\n if (\n existingReports\n ?.filter((r) => r.reportId !== reportId)\n .some(\n (r) =>\n r.reportName.toLocaleUpperCase() === reportName.toLocaleUpperCase()\n )\n ) {\n setError(\n 'reportName',\n { message: duplicateNameMsg },\n { shouldFocus: true }\n );\n hasErrors = true;\n }\n\n if (!hasErrors) {\n handleSubmit(onSave)();\n }\n }, [\n reportName,\n metrics,\n reportId,\n existingReports,\n setError,\n requiredMsg,\n duplicateNameMsg,\n handleSubmit,\n onSave,\n ]);\n\n const { tagsMetadataNumeric } = useTagsForEntityType(\n reportType === ReportTypes.Inventory\n ? ActionOutboxEntityType.Listing\n : ActionOutboxEntityType.Sale,\n true\n );\n\n const { tagsMetadata: tagsMetadataEvent } = useTagsForEntityType(\n ActionOutboxEntityType.SellerEvent,\n true\n );\n\n const { tagsMetadata: tagsMetadataPurchase } = useTagsForEntityType(\n ActionOutboxEntityType.Purchase,\n true\n );\n\n const reportingTags = useMemo(() => {\n if (groupBy === ReportGroupBy.Event) {\n return [...(tagsMetadataNumeric ?? []), ...(tagsMetadataEvent ?? [])];\n } else if (groupBy === ReportGroupBy.PurchaseId) {\n return [...(tagsMetadataNumeric ?? []), ...(tagsMetadataPurchase ?? [])];\n }\n\n return tagsMetadataNumeric;\n }, [groupBy, tagsMetadataEvent, tagsMetadataNumeric, tagsMetadataPurchase]);\n\n const { value: customListingColumns = [] } = useServerUserSetting<\n CustomListingColumn[]\n >({\n id: UserSetting.InventoryCustomColumns,\n });\n const { value: customSaleColumns = [] } = useServerUserSetting<\n CustomSalesColumn[]\n >({\n id: UserSetting.SaleCustomColumns,\n });\n\n const { displayNames: metricDisplayNames } = useColumnDisplayName({\n columnIds: metrics ?? [],\n sectionType:\n reportType === ReportTypes.Inventory\n ? SectionType.ListingsReport\n : SectionType.SalesReport,\n });\n\n const filterColumnByGroupBy = useCallback(\n (columnId: string, groupBy: ReportGroupBy) => {\n if (reportType === ReportTypes.Inventory) {\n return isListingMetricConfigurableByGroupBy(columnId, groupBy);\n } else if (reportType === ReportTypes.Sale) {\n return isSaleMetricConfigurableByGroupBy(columnId, groupBy);\n }\n\n return true;\n },\n [reportType]\n );\n\n const metricsFiltered = useMemo(() => {\n // Filter out reporting tags that are later turned off reporting\n const customColumnsFiltered =\n reportType === ReportTypes.Inventory\n ? filterCustomColumnsForListingReport(\n customListingColumns,\n tagsMetadataNumeric\n )\n : filterCustomColumnsForSale(customSaleColumns, tagsMetadataNumeric);\n\n const presetColumnIds = Object.values(\n reportType === ReportTypes.Inventory\n ? LISTING_REPORT_TABLE_COLUMNS_CONFIG\n : SALE_REPORT_TABLE_COLUMNS_CONFIG\n )\n .map((i) => i.id)\n .filter((id) => filterColumnByGroupBy(id, groupBy));\n\n const activeTagNames = reportingTags?.map((t) => t.key) ?? [];\n const customColumnIds = customColumnsFiltered.map((c) => c.id);\n\n return metrics.filter(\n (m) =>\n presetColumnIds.includes(m) ||\n activeTagNames.includes(m) ||\n customColumnIds.includes(m)\n );\n }, [\n reportType,\n customListingColumns,\n tagsMetadataNumeric,\n customSaleColumns,\n reportingTags,\n metrics,\n filterColumnByGroupBy,\n groupBy,\n ]);\n\n const primaryColumnId = useMemo(() => {\n const GROUP_BY_TO_PRIMARY_COLUMN_ID =\n reportType === ReportTypes.Inventory\n ? GROUP_BY_TO_PRIMARY_COLUMN_ID_LISTING\n : GROUP_BY_TO_PRIMARY_COLUMN_ID_SALES;\n return GROUP_BY_TO_PRIMARY_COLUMN_ID[groupBy];\n }, [groupBy, reportType]);\n\n const groupByOptions =\n reportType === ReportTypes.Inventory\n ? REPORT_INVENTORY_GROUP_BY_TO_CID\n : REPORT_SALE_GROUP_BY_TO_CID;\n\n const sortByOptions = useMemo(() => {\n const options = metrics.reduce>((acc, metric, i) => {\n acc[metric] = metricDisplayNames[i];\n return acc;\n }, {});\n\n return options ?? {};\n }, [metricDisplayNames, metrics]);\n\n const onSortByChange = useCallback(\n (newValue: string) => {\n if (newValue !== groupBy) {\n setValue('sortBy', newValue);\n } else {\n // Special case: sort by groupBy (performer, venue, event)\n setValue('sortBy', null);\n }\n },\n [groupBy, setValue]\n );\n\n const onIsSortDescendingChange = useCallback(\n (newValue: string) => {\n setValue('isSortDescending', newValue === 'true');\n },\n [setValue]\n );\n\n return (\n <>\n \n }\n footer={\n <>\n {onClosed && (\n \n )}\n \n \n \n \n }\n onCancel={onClosed}\n >\n
    \n \n \n \n \n }\n >\n \n \n \n \n \n \n \n }\n >\n \n \n \n\n \n \n \n \n }\n >\n \n \n \n \n \n \n \n }\n >\n
    \n {metricsFiltered != null && metricsFiltered.length > 0 ? (\n <>\n {reportType === ReportTypes.Inventory ? (\n \n items={metricsFiltered ?? []}\n sectionType={SectionType.ListingsReport}\n tableType=\"inventory\"\n />\n ) : (\n \n items={metricsFiltered ?? []}\n sectionType={SectionType.SalesReport}\n tableType=\"sales\"\n />\n )}\n \n ) : (\n
    \n \n
    \n )}\n\n \n \n \n
    \n \n
    \n \n \n \n \n }\n >\n
    \n \n setValue('roleIdsToShare', value)}\n onSellerUserIdsChange={(value) =>\n setValue('sellerUserIdsToShare', value)\n }\n />\n
    \n \n
    \n \n {\n setAdvancedSettingsExpandedItem(\n activeExpandedItem as AdvancedSettingsAccordion\n );\n }}\n >\n \n \n \n \n \n {reportType === ReportTypes.Inventory && (\n \n \n \n \n }\n >\n \n \n \n )}\n \n }\n >\n {\n const v = parseInt(e.target.value);\n if (!isNaN(v) && v > 0) {\n if (v !== numberOfItemsPerPage) {\n setValue('numberOfItemsPerPage', v);\n }\n } else {\n setValue('numberOfItemsPerPage', null);\n }\n }}\n />\n \n \n\n \n \n \n \n }\n >\n
    \n \n \n
    \n \n
    \n
    \n
    \n \n
    \n
    \n \n {isMetricModalOpen && (\n <>\n {reportType === ReportTypes.Inventory ? (\n \n ) : (\n \n )}\n \n )}\n \n );\n}\n","import { ComponentProps, useEffect } from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { Modal as RSModal } from 'reactstrap';\nimport { CatalogDataContextProvider } from 'src/contexts/CatalogDataContext';\nimport { FilterQueryContextProvider } from 'src/contexts/FilterQueryContext';\nimport { ReportConfig } from 'src/hooks/useReportConfigs';\nimport { getCatalogData as getCatalogDataForListing } from 'src/navigations/Routes/Inventory';\nimport { getCatalogData as getCatalogDataForSales } from 'src/navigations/Routes/Sales';\nimport {\n DefaultListingQuery,\n DefaultSaleQuery,\n EmptyListingQuery,\n EmptySaleQuery,\n} from 'src/utils/eventQueryUtils';\nimport { transformData } from 'src/utils/eventWithDataUtils';\nimport { ReportTypes } from 'src/utils/reportsUtils';\nimport {\n ActionOutboxEntityType,\n ListingQuery,\n SaleQuery,\n UserSetting,\n} from 'src/WebApiController';\n\nimport { ReportBuilderDialogBody } from './ReportBuilderDialogBody';\n\nexport type ReportBuilderDialogProps = {\n report: ReportConfig;\n onSave: (data: ReportConfig) => void;\n} & ComponentProps;\n\nexport function ReportBuilderDialog({\n report,\n ...rest\n}: ReportBuilderDialogProps) {\n const methods = useForm({\n defaultValues: report,\n });\n\n useEffect(() => {\n methods.reset(report);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [report.reportId]);\n\n if (report.reportType === ReportTypes.Inventory) {\n return (\n \n initialQuery={DefaultListingQuery}\n emptyQuery={EmptyListingQuery}\n viewModeSettingId={UserSetting.InventoryPageViewMode}\n >\n \n entityType={ActionOutboxEntityType.Listing}\n queryKey=\"getCatalogForListing\"\n getCatalogData={(c, f) => getCatalogDataForListing(c, f, false)}\n transformEventData={transformData}\n >\n \n \n {...methods}\n {...rest}\n reportType={report.reportType}\n />\n \n \n \n );\n }\n\n return (\n \n initialQuery={DefaultSaleQuery}\n emptyQuery={EmptySaleQuery}\n viewModeSettingId={UserSetting.SalePageViewMode}\n >\n \n entityType={ActionOutboxEntityType.Sale}\n queryKey=\"getCatalogForSales\"\n getCatalogData={(c, f) => getCatalogDataForSales(c, f, false)}\n transformEventData={transformData}\n >\n \n \n {...methods}\n {...rest}\n reportType={report.reportType}\n />\n \n \n \n );\n}\n","import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\nimport { id } from 'date-fns/locale';\nimport { castDraft, produce } from 'immer';\nimport { isEqual } from 'lodash-es';\nimport { useCallback, useMemo } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useContentContext } from 'src/contexts/ContentContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { FormatContentIds } from 'src/utils/constants/formatContentIdDataMap';\nimport { ReportTypesV2 } from 'src/utils/reportsUtils';\nimport {\n ReportV2ConfigClient,\n ReportV2ConfigOfCommissionReportV2RequestAndReportWidgetTypesCommission,\n ReportV2ConfigOfInventoryReportV2RequestAndReportWidgetTypesInventory,\n ReportV2ConfigOfSalesReportV2RequestAndReportWidgetTypesSale,\n ReportV2ConfigOverride,\n} from 'src/WebApiController';\n\nexport const REPORT_CONFIG_V2_SCHEMA_VERSION = '2.0.0';\n\n/**\n * Map report config settings to their data types.\n *\n * Add to this type if new settings are added.\n */\ntype ReportConfigMap = {\n [ReportTypesV2.InventoryV2]: ReportV2ConfigOfInventoryReportV2RequestAndReportWidgetTypesInventory;\n [ReportTypesV2.SaleV2]: ReportV2ConfigOfSalesReportV2RequestAndReportWidgetTypesSale;\n [ReportTypesV2.Commission]: ReportV2ConfigOfCommissionReportV2RequestAndReportWidgetTypesCommission;\n};\n\n/**\n * Internal type to unify the different report config types.\n */\ntype ReportConfigTypeBase =\n | ReportV2ConfigOfInventoryReportV2RequestAndReportWidgetTypesInventory\n | ReportV2ConfigOfSalesReportV2RequestAndReportWidgetTypesSale\n | ReportV2ConfigOfCommissionReportV2RequestAndReportWidgetTypesCommission;\n\ntype ReportConfigType = ReportConfigMap[S];\n\n/**\n * Helper type for consumers of this hook to use for typing report configs more easily.\n */\nexport type ReportConfigV2 = ReportConfigTypeBase & {\n reportType: ReportTypesV2;\n};\n\ntype UseReportConfigsOptions = {\n reportType: ReportTypesV2;\n};\n\ntype ReportConfigInput = Omit<\n ReportConfigV2,\n 'schemaVersion' | 'reportId' | 'reportType'\n>;\n\n/**\n * Data and functions returned by the hook to help with CRUD of report config with different types\n */\ntype UseReportConfigs = {\n reportConfigs: ReportConfigV2[];\n isLoading: boolean;\n isFetching: boolean;\n deleteReportConfig: (reportId: number) => void;\n upsertReportConfig: (\n reportId: number | null,\n updatedConfig: Partial,\n isTemporary?: boolean\n ) => Promise;\n upsertReportOverride: (\n configOverride: ReportV2ConfigOverride,\n originalReportConfig:\n | ReportV2ConfigOfInventoryReportV2RequestAndReportWidgetTypesInventory\n | ReportV2ConfigOfSalesReportV2RequestAndReportWidgetTypesSale\n | ReportV2ConfigOfCommissionReportV2RequestAndReportWidgetTypesCommission\n ) => void;\n getReportConfigNameForDuplicate: (reportName: string) => string;\n};\n\nconst addTimezoneOffsetToSaleReportConfig = (\n reportNoOffset: ReportV2ConfigOfSalesReportV2RequestAndReportWidgetTypesSale\n): ReportV2ConfigOfSalesReportV2RequestAndReportWidgetTypesSale => {\n return {\n ...reportNoOffset,\n request: {\n ...reportNoOffset.request,\n filters: {\n ...reportNoOffset.request.filters,\n timezoneOffsetMins: new Date().getTimezoneOffset(),\n },\n },\n };\n};\n\nconst addTimezoneOffsetToListingReportConfig = (\n reportNoOffset: ReportV2ConfigOfInventoryReportV2RequestAndReportWidgetTypesInventory\n): ReportV2ConfigOfInventoryReportV2RequestAndReportWidgetTypesInventory => {\n return {\n ...reportNoOffset,\n request: {\n ...reportNoOffset.request,\n filters: {\n ...reportNoOffset.request.filters,\n timezoneOffsetMins: new Date().getTimezoneOffset(),\n },\n },\n };\n};\n\nconst addTimezoneOffsetToCommissionReportConfig = (\n reportNoOffset: ReportV2ConfigOfCommissionReportV2RequestAndReportWidgetTypesCommission\n): ReportV2ConfigOfCommissionReportV2RequestAndReportWidgetTypesCommission => {\n return {\n ...reportNoOffset,\n request: {\n ...reportNoOffset.request,\n filters: {\n ...reportNoOffset.request.filters,\n timezoneOffsetMins: new Date().getTimezoneOffset(),\n },\n },\n };\n};\n\n/**\n * Hook to help with CRUD of report config with different types\n * @param options\n * @returns\n */\nexport function useReportConfigsV2({\n reportType,\n}: UseReportConfigsOptions): UseReportConfigs {\n const { showErrorDialog, trackError } = useErrorBoundaryContext();\n const { formattedContentResolver } = useContentContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const reportClient = useMemo(\n () => new ReportV2ConfigClient(activeAccountWebClientConfig),\n [activeAccountWebClientConfig]\n );\n\n const queryClient = useQueryClient();\n const queryKey = useMemo(\n () => [\n 'useReportConfigsV2',\n activeAccountWebClientConfig.activeAccountId,\n reportType,\n ],\n [activeAccountWebClientConfig.activeAccountId, reportType]\n );\n\n // Query to get all report configs\n const reportConfigQuery = useQuery[] | null>({\n queryKey,\n queryFn: async () => {\n if (activeAccountWebClientConfig?.activeAccountId == null) {\n return null;\n }\n\n if (reportType === ReportTypesV2.InventoryV2) {\n return (await reportClient.getAvailableInventoryReportConfig())\n .filter((r) => r.schemaVersion === REPORT_CONFIG_V2_SCHEMA_VERSION)\n .map(addTimezoneOffsetToListingReportConfig) as ReportConfigType[];\n } else if (reportType === ReportTypesV2.Commission) {\n return (await reportClient.getAvailableCommissionReportConfig())\n .filter((r) => r.schemaVersion === REPORT_CONFIG_V2_SCHEMA_VERSION)\n .map(\n addTimezoneOffsetToCommissionReportConfig\n ) as ReportConfigType[];\n } else {\n return (await reportClient.getAvailableSaleReportConfig())\n .filter((r) => r.schemaVersion === REPORT_CONFIG_V2_SCHEMA_VERSION)\n .map(addTimezoneOffsetToSaleReportConfig) as ReportConfigType[];\n }\n },\n\n enabled: activeAccountWebClientConfig?.activeAccountId != null,\n meta: {\n onError: (err: ErrorTypes) => {\n trackError('ReportV2ConfigClient.getAvailableReportConfig', err, {\n trackErrorData: { reportType },\n });\n },\n },\n networkMode: 'offlineFirst',\n refetchOnWindowFocus: false,\n });\n\n const _reportConfigs = useMemo(() => {\n if (reportConfigQuery.data == null) {\n return [];\n }\n return reportConfigQuery.data;\n }, [reportConfigQuery.data]);\n\n // Mutation to upsert report config\n const upsertMutation = useMutation({\n mutationFn: async ({\n value,\n isTemporary,\n }: {\n value: ReportConfigType;\n isTemporary?: boolean;\n }) => {\n if (isTemporary) {\n // Do nothing, just let onMutate handle the optimistic update\n return value.reportId!;\n }\n\n if (reportType === ReportTypesV2.InventoryV2) {\n return await reportClient.upsertInventoryReportConfig(\n value as ReportV2ConfigOfInventoryReportV2RequestAndReportWidgetTypesInventory\n );\n } else if (reportType === ReportTypesV2.Commission) {\n throw new Error(\n 'Creating commission report config is not supported yet'\n );\n }\n return await reportClient.upsertSaleReportConfig(\n value as ReportV2ConfigOfSalesReportV2RequestAndReportWidgetTypesSale\n );\n },\n // optimistic ui\n // Reference: https://tanstack.com/query/v3/docs/react/guides/optimistic-updates\n onMutate: ({ value }) => {\n queryClient.cancelQueries({ queryKey });\n const prevValue =\n queryClient.getQueryData[]>(queryKey);\n\n const newValue =\n value.reportId == null\n ? [...(prevValue ?? []), value]\n : prevValue?.map((r) => (r.reportId === value.reportId ? value : r));\n queryClient.setQueryData[]>(queryKey, newValue);\n return { prevValue };\n },\n onError: (err: ErrorTypes, { value }, context) => {\n queryClient.setQueryData(queryKey, context?.prevValue);\n showErrorDialog('ReportV2ConfigClient.upsertReportConfig', err, {\n trackErrorData: { id, value },\n });\n },\n onSettled: (_data, _error, { isTemporary }) => {\n if (!isTemporary) {\n queryClient.invalidateQueries({ queryKey });\n }\n },\n });\n\n const upsertOverrideMutation = useMutation({\n mutationFn: async ({\n configOverride,\n originalReportConfig,\n }: {\n configOverride: ReportV2ConfigOverride;\n originalReportConfig:\n | ReportV2ConfigOfInventoryReportV2RequestAndReportWidgetTypesInventory\n | ReportV2ConfigOfSalesReportV2RequestAndReportWidgetTypesSale\n | ReportV2ConfigOfCommissionReportV2RequestAndReportWidgetTypesCommission;\n }) => {\n const reportConfigId = originalReportConfig.reportId!;\n configOverride.schemaVersion = originalReportConfig.schemaVersion;\n\n // Set override to null if it is the same as the original report config\n // and the original report config does not have an override.\n if (!originalReportConfig.hasMetricsOverride) {\n if (\n isEqual(\n originalReportConfig.request.aggregations,\n configOverride.request.aggregations\n )\n ) {\n configOverride.request.aggregations = null;\n }\n if (\n isEqual(\n originalReportConfig.request.rowGroupings,\n configOverride.request.rowGroupings\n )\n ) {\n configOverride.request.rowGroupings = null;\n }\n }\n\n await reportClient.upsertReportConfigOverride(\n reportConfigId,\n configOverride as ReportV2ConfigOverride\n );\n },\n // optimistic ui\n // Reference: https://tanstack.com/query/v3/docs/react/guides/optimistic-updates\n onMutate: ({ originalReportConfig, configOverride }) => {\n queryClient.cancelQueries({ queryKey });\n const prevValue =\n queryClient.getQueryData[]>(queryKey);\n\n const newReportConfig = {\n ...originalReportConfig,\n request: {\n ...originalReportConfig.request,\n aggregations:\n configOverride.request.aggregations ??\n originalReportConfig.request.aggregations,\n rowGroupings:\n configOverride.request.rowGroupings ??\n originalReportConfig.request.rowGroupings,\n },\n } as ReportConfigType;\n\n const newValue = prevValue?.map((r) =>\n r.reportId === newReportConfig.reportId ? newReportConfig : r\n );\n queryClient.setQueryData[]>(queryKey, newValue);\n return { prevValue };\n },\n onError: (\n err: ErrorTypes,\n { originalReportConfig, configOverride },\n context\n ) => {\n queryClient.setQueryData(queryKey, context?.prevValue);\n showErrorDialog('reportClient.upsertReportConfig', err, {\n trackErrorData: { id, originalReportConfig, configOverride },\n });\n },\n onSettled: () => {\n queryClient.invalidateQueries({ queryKey });\n },\n });\n\n // Mutation to upsert report config\n const upsertReportOverride = useCallback(\n async (\n configOverride: ReportV2ConfigOverride,\n originalReportConfig:\n | ReportV2ConfigOfInventoryReportV2RequestAndReportWidgetTypesInventory\n | ReportV2ConfigOfSalesReportV2RequestAndReportWidgetTypesSale\n | ReportV2ConfigOfCommissionReportV2RequestAndReportWidgetTypesCommission\n ) => {\n return await upsertOverrideMutation.mutateAsync({\n configOverride: {\n ...configOverride,\n schemaVersion: REPORT_CONFIG_V2_SCHEMA_VERSION,\n },\n originalReportConfig,\n });\n },\n [upsertOverrideMutation]\n );\n\n const upsertReportConfig = (\n reportConfig: ReportConfigType,\n isTemporary?: boolean\n ) => {\n return upsertMutation.mutateAsync({ value: reportConfig, isTemporary });\n };\n\n // Mutation to delete report config\n const deleteMutation = useMutation({\n mutationFn: async ({ reportId }: { reportId: number }) => {\n return await reportClient.deleteReportConfig(reportId);\n },\n // optimistic ui\n // Reference: https://tanstack.com/query/v3/docs/react/guides/optimistic-updates\n onMutate: ({ reportId }) => {\n queryClient.cancelQueries({ queryKey });\n const prevValue =\n queryClient.getQueryData[]>(queryKey);\n\n queryClient.setQueryData[]>(\n queryKey,\n prevValue?.filter((r) => r.reportId !== reportId)\n );\n return { prevValue };\n },\n onError: (err: ErrorTypes, { reportId }, context) => {\n queryClient.setQueryData(queryKey, context?.prevValue);\n showErrorDialog('ReportV2ConfigClient.deleteReportConfig', err, {\n trackErrorData: { id, reportId },\n });\n },\n onSettled: () => {\n queryClient.invalidateQueries({ queryKey });\n },\n });\n\n const deleteReportConfig = (reportId: number) => {\n deleteMutation.mutateAsync({ reportId });\n };\n\n // Array of report config only used within the hook that has the type\n // which can be directly set to the user setting.\n const reportConfigsInternal: ReportConfigType[] = _reportConfigs;\n\n const reportConfigs: ReportConfigV2[] = reportConfigsInternal.map(\n (r) =>\n ({\n ...r,\n reportType,\n }) satisfies ReportConfigV2\n );\n\n const getReportConfigNameForDuplicate = useCallback(\n (reportName: string) => {\n const reportNames = reportConfigsInternal.map((r) => r.reportName);\n const defaultName = formattedContentResolver(\n FormatContentIds[FormatContentId.CopyOf].id,\n reportName,\n FormatContentIds[FormatContentId.CopyOf].defaultValue\n ) as string;\n if (!reportNames.includes(defaultName)) {\n return defaultName;\n }\n\n let newName = defaultName;\n let i = 2;\n while (reportNames.includes(newName)) {\n newName = `${defaultName} (${i})`;\n i++;\n }\n return newName;\n },\n [formattedContentResolver, reportConfigsInternal]\n );\n\n return {\n reportConfigs,\n isLoading: reportConfigQuery.isLoading,\n isFetching: reportConfigQuery.isFetching,\n deleteReportConfig: (reportId: number) => {\n deleteReportConfig(reportId);\n },\n upsertReportConfig: (\n reportId: number | null,\n configInput: Partial,\n isTemporary?: boolean\n ) => {\n // Create new\n if (reportId == null) {\n // Force conversion is applied here because the type of the report config\n // Depends on the consumer to pass in the right set of widgets and filter types.\n const newConfig = castDraft({\n ...configInput,\n schemaVersion: REPORT_CONFIG_V2_SCHEMA_VERSION,\n reportId: null,\n } as ReportConfigType);\n\n return upsertReportConfig(newConfig as ReportConfigType);\n }\n\n // Update existing\n const configToUpdate = reportConfigsInternal.find(\n (r) => r.reportId === reportId\n );\n if (!configToUpdate) {\n return new Promise((resolve) => resolve(null));\n }\n const initDraft = castDraft(configToUpdate as ReportConfigType);\n\n const updatedDraft = produce(initDraft, (draft) => {\n if (configInput.reportName != null) {\n draft.reportName = configInput.reportName;\n }\n\n draft.ownerDisplayName = configInput.ownerDisplayName ?? '';\n draft.widgets = castDraft(configInput.widgets ?? null);\n\n draft.request = castDraft(configInput.request!);\n draft.sellerUserIdsToShare = configInput.sellerUserIdsToShare ?? [];\n draft.roleIdsToShare = configInput.roleIdsToShare ?? [];\n draft.viewableFilterItemIds = configInput.viewableFilterItemIds ?? [];\n draft.editableFilterItemIds = configInput.editableFilterItemIds ?? [];\n draft.hiddenFilterItemIds = configInput.hiddenFilterItemIds ?? [];\n });\n\n return upsertReportConfig(\n updatedDraft as ReportConfigType,\n isTemporary\n );\n },\n upsertReportOverride,\n getReportConfigNameForDuplicate,\n };\n}\n","import { isEqual } from 'lodash-es';\nimport { useMemo } from 'react';\nimport { FilterToolbarItemId } from 'src/components/Filters';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { DateRangeSelector } from 'src/core/POS/DateRangeSelector';\nimport { PosEnumMultiSelect } from 'src/core/POS/PosMultiSelect/PosEnumMultiSelect';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n MARKET_PLACE_TO_CID,\n SALES_STATUS_TO_CID,\n YES_NO_ENUM_FILTER_TO_CID,\n} from 'src/utils/constants/contentIdMaps';\nimport {\n getDisabledDatesForTimeFrameFilter,\n SaleDateRangeRelativePresetNames,\n StandardDateRangePresetNames,\n} from 'src/utils/dateTimeUtils';\nimport { FromYesNoEnum, ToYesNoEnum } from 'src/utils/eventQueryUtils';\nimport {\n EventTimeFrameFilter,\n Marketplace,\n Permission,\n UIReportCommissionQuery,\n} from 'src/WebApiController';\n\nimport { EventDateSelector } from '../Events/EventDateSelector/EventDateSelector';\nimport { SellerAccountEmployeeSelector } from '../Selectors/SellerAccountEmployeeSelector';\n\nexport const commissionMandatoryFiltersToShow: FilterToolbarItemId[] = [\n 'eventDates',\n];\n\nexport function useCommissionFilters() {\n const { loginContext } = useAppContext();\n\n const { initialQuery, tempQuery, setTempQuery } =\n useFilterQueryContext();\n\n const commissionFilters = useMemo(() => {\n return {\n titleContentId: ContentId.Commission,\n type: 'row',\n items: [\n {\n filterId: 'purchaseCommissionUserId' as FilterToolbarItemId,\n labelContentId: ContentId.Commissioner,\n filterQueryKeys: [\n 'purchaseCommissionUserId',\n ] as FilterToolbarItemId[],\n filterItem: (\n {\n if (\n purchaseCommissionUserId !==\n tempQuery.purchaseCommissionUserId\n ) {\n setTempQuery({\n ...tempQuery,\n purchaseCommissionUserId,\n });\n }\n }}\n />\n ),\n },\n {\n filterId: 'isCommissionEligible' as const,\n labelContentId: ContentId.CommissionEligible,\n filterQueryKeys: ['isCommissionEligible'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (\n yesNoEnumValue !== ToYesNoEnum(tempQuery.isCommissionEligible)\n ) {\n setTempQuery({\n ...tempQuery,\n isCommissionEligible: FromYesNoEnum(yesNoEnumValue),\n });\n }\n }}\n valueOptionsContent={YES_NO_ENUM_FILTER_TO_CID}\n />\n ),\n },\n {\n filterId: 'commissionEligibilityDates' as FilterToolbarItemId,\n labelContentId: ContentId.CommissionEligibilityDate,\n filterQueryKeys: [\n 'commissionEligibilityDates',\n ] as FilterToolbarItemId[],\n filterItem: (\n \n setTempQuery({\n ...tempQuery,\n commissionEligibilityDates: value,\n })\n }\n />\n ),\n },\n ],\n };\n }, [initialQuery.commissionEligibilityDates, setTempQuery, tempQuery]);\n\n const eventFilters = useMemo(() => {\n return {\n titleContentId: ContentId.Events,\n items: [\n {\n filterId: 'eventDates' as FilterToolbarItemId,\n labelContentId: ContentId.EventDate,\n filterQueryKeys: [\n 'eventDates',\n 'eventTimeFrameFilter',\n ] as FilterToolbarItemId[],\n filterItem: (\n {\n if (\n eventTimeFrameFilter !== tempQuery.eventTimeFrameFilter ||\n !isEqual(dateRange, tempQuery.eventDates)\n ) {\n let isSortDescending = tempQuery.isSortDescending;\n if (eventTimeFrameFilter !== EventTimeFrameFilter.Future) {\n // When sorting by past or by all - we do not want to sort by date asc (as that would put the oldest event first)\n // Changing this to desc\n isSortDescending = true;\n } else {\n isSortDescending = initialQuery.isSortDescending;\n }\n\n setTempQuery({\n ...tempQuery,\n eventTimeFrameFilter: eventTimeFrameFilter ?? null,\n eventDates: dateRange ?? null,\n isSortDescending,\n });\n }\n }}\n />\n ),\n },\n {\n filterId: 'lastSaleDates' as FilterToolbarItemId,\n labelContentId: ContentId.LastSaleDates,\n filterQueryKeys: ['lastSaleDates'] as FilterToolbarItemId[],\n filterItem: (\n \n setTempQuery({\n ...tempQuery,\n saleDates: value,\n })\n }\n disabledDay={(d) =>\n getDisabledDatesForTimeFrameFilter(\n d,\n tempQuery.eventTimeFrameFilter\n )\n }\n />\n ),\n },\n ],\n };\n }, [\n initialQuery.isSortDescending,\n initialQuery.saleDates,\n setTempQuery,\n tempQuery,\n ]);\n\n return {\n filters: [\n eventFilters,\n {\n titleContentId: ContentId.Fulfillment,\n items: [\n {\n filterId: 'saleStatuses' as FilterToolbarItemId,\n labelContentId: ContentId.Status,\n filterQueryKeys: ['saleStatuses'] as FilterToolbarItemId[],\n filterItem: (\n {\n setTempQuery({\n ...tempQuery,\n saleStatuses,\n });\n }}\n />\n ),\n },\n {\n filterId: 'fulfillmentDates' as FilterToolbarItemId,\n labelContentId: ContentId.FulfillmentDate,\n filterQueryKeys: ['fulfillmentDates'] as FilterToolbarItemId[],\n filterItem: (\n \n setTempQuery({\n ...tempQuery,\n fulfillmentDates: value,\n })\n }\n />\n ),\n },\n ],\n },\n {\n titleContentId: ContentId.WhenAndWhere,\n type: 'row',\n items: [\n {\n filterId: 'soldOnMarketplace' as FilterToolbarItemId,\n labelContentId: ContentId.Marketplace,\n filterQueryKeys: ['soldOnMarketplace'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (soldOnMarketplace !== tempQuery.soldOnMarketplace) {\n setTempQuery({\n ...tempQuery,\n soldOnMarketplace,\n });\n }\n }}\n valueOptionsContent={(\n loginContext?.user?.activeAccount?.marketplaceSettings?.map(\n (m) => m.mkp\n ) ?? [Marketplace.StubHub]\n )\n .concat(Marketplace.Offline)\n .reduce(\n (cur, m) => {\n cur[m] = MARKET_PLACE_TO_CID[m];\n return cur;\n },\n {} as Record\n )}\n />\n ),\n },\n {\n filterId: 'saleDates' as FilterToolbarItemId,\n labelContentId: ContentId.SaleDate,\n filterQueryKeys: ['saleDates'] as FilterToolbarItemId[],\n filterItem: (\n {\n setTempQuery({\n ...tempQuery,\n saleDates: value,\n });\n }}\n useRelativePresets\n />\n ),\n },\n ],\n },\n {\n titleContentId: ContentId.Payment,\n requiredPermissions: [Permission.Sales_ViewPaymentState],\n type: 'row',\n items: [\n {\n filterId: 'paymentDates' as FilterToolbarItemId,\n labelContentId: ContentId.PaymentDate,\n filterQueryKeys: ['paymentDates'] as FilterToolbarItemId[],\n filterItem: (\n \n setTempQuery({\n ...tempQuery,\n paymentDates: value,\n })\n }\n />\n ),\n },\n ],\n },\n commissionFilters,\n ],\n };\n}\n","import { isEqual } from 'lodash-es';\nimport { useMemo } from 'react';\nimport { useInternalNotesFilter } from 'src/components/Filters/InternalNotesFilter';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { DateRangeSelector } from 'src/core/POS/DateRangeSelector';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n YES_NO_ENUM_FILTER_TO_CID,\n YES_NO_INVERTED_ENUM_FILTER_TO_CID,\n} from 'src/utils/constants/contentIdMaps';\nimport { InhandDateRangePresetNames } from 'src/utils/dateTimeUtils';\nimport { FromYesNoEnum, ToYesNoEnum } from 'src/utils/eventQueryUtils';\nimport {\n ActionOutboxEntityType,\n Feature,\n ListingQuery,\n UIReportV2ListingQuery,\n} from 'src/WebApiController';\n\nimport {\n FilterToolbarGroup,\n FilterToolbarItem,\n FilterToolbarItemId,\n} from '../Filters';\nimport { RowFilter } from '../Filters/RowFilter';\nimport { SectionFilter } from '../Filters/SectionFilter';\nimport { PriceUpdatedDateStackedFilter } from '../Filters/StackedFilter/PriceUpdatedDateStackedFilter';\nimport { CurrencyFilterMultiSelector } from '../Selectors/CurrencyFilterSelector';\nimport { useCommonEventFilters } from './useCommonEventFilters';\nimport { usePurchaseInfoFilters } from './usePurchaseInfoFilters';\n\nexport const listingsReportMandatoryFiltersToShow: FilterToolbarItemId[] = [\n 'eventDates',\n];\n\nconst PurchaseInfoFilterIdsToShow: FilterToolbarItemId[] = [\n 'purchaseVendorId',\n 'purchaseVendorAccountIds',\n 'purchaseBuyerId',\n 'purchaseDates',\n];\n\nexport function useListingReportFilters({\n isHorizontalLayout,\n showCatalogFilters,\n}: {\n isHorizontalLayout?: boolean;\n showCatalogFilters?: boolean;\n}) {\n const { initialQuery, tempQuery, setTempQuery } =\n useFilterQueryContext();\n\n const hasAutoPricingFeature = useUserHasFeature(Feature.AutoPricing);\n\n const hasAutoFulfillSetting = useUserHasFeature(Feature.AutoFulfillSetting);\n\n const purchaseInfoFilters = usePurchaseInfoFilters({\n query: tempQuery,\n setQuery: setTempQuery,\n });\n\n const supportedPurchaseInfoFilters = useMemo(() => {\n const items = purchaseInfoFilters.items.filter((item) =>\n PurchaseInfoFilterIdsToShow.includes(item.filterId)\n );\n\n return {\n ...purchaseInfoFilters,\n items,\n };\n }, [purchaseInfoFilters]);\n\n const autoPricingFilter = useMemo(\n () => [\n {\n filterId: 'isAutoPricingEnabled',\n labelContentId: ContentId.AutoPricingEnabled,\n filterQueryKeys: ['isAutoPricingEnabled'],\n filterItem: (\n {\n if (\n yesNoEnumValue !== ToYesNoEnum(tempQuery.isAutoPricingEnabled)\n ) {\n setTempQuery({\n ...tempQuery,\n isAutoPricingEnabled: FromYesNoEnum(yesNoEnumValue),\n });\n }\n }}\n valueOptionsContent={YES_NO_ENUM_FILTER_TO_CID}\n />\n ),\n },\n ],\n [setTempQuery, tempQuery]\n );\n\n const adminHoldFilter = useMemo(\n () =>\n [\n {\n filterId: 'isAdminHold',\n labelContentId: ContentId.Hold,\n filterQueryKeys: ['isAdminHold'],\n filterItem: (\n {\n if (yesNoEnumValue !== ToYesNoEnum(tempQuery.isAdminHold)) {\n setTempQuery({\n ...tempQuery,\n isAdminHold: FromYesNoEnum(yesNoEnumValue),\n });\n }\n }}\n valueOptionsContent={YES_NO_ENUM_FILTER_TO_CID}\n />\n ),\n },\n ] as FilterToolbarItem[],\n [setTempQuery, tempQuery]\n );\n\n const seatingFilters = useMemo(\n () => ({\n titleContentId: ContentId.Seating,\n type: 'row',\n items: [\n {\n filterId: 'sectionContains',\n labelContentId: ContentId.Section,\n filterQueryKeys: ['sectionEquals', 'sectionContains'],\n filterItem: (\n \n ),\n },\n {\n filterId: 'rowContains',\n labelContentId: ContentId.Row,\n filterQueryKeys: ['rowEquals', 'rowContains'],\n filterItem: (\n \n ),\n },\n ],\n }),\n [isHorizontalLayout, setTempQuery, tempQuery]\n );\n\n const eventFilters = useCommonEventFilters({\n showCatalogFilters,\n additionalFilters: [],\n });\n\n const notesFilters = useInternalNotesFilter({\n entityType: ActionOutboxEntityType.Listing,\n isHorizontalLayout,\n });\n\n const filters = useMemo(\n () =>\n [\n eventFilters,\n {\n titleContentId: ContentId.Pricing,\n type: 'row',\n items: [\n ...(hasAutoPricingFeature ? autoPricingFilter : []),\n\n {\n filterId: 'lastPriceUpdateDates' as FilterToolbarItemId,\n filterQueryKeys: [\n 'lastPriceUpdateDates',\n 'lastPriceNoUpdateDates',\n ] as FilterToolbarItemId[],\n labelContentId: ContentId.PriceDateFilterTitle,\n filterItem: ,\n },\n\n {\n labelContentId: ContentId.IsPricedByMarketplace,\n filterId: 'isPricedByMarketplace' as FilterToolbarItemId,\n filterQueryKeys: [\n 'isPricedByMarketplace',\n ] as FilterToolbarItemId[],\n filterItem: (\n {\n if (\n yesNoEnumValue !==\n ToYesNoEnum(tempQuery.isPricedByMarketplace)\n ) {\n setTempQuery({\n ...tempQuery,\n isPricedByMarketplace: FromYesNoEnum(yesNoEnumValue),\n });\n }\n }}\n valueOptionsContent={YES_NO_ENUM_FILTER_TO_CID}\n />\n ),\n },\n\n {\n filterId: 'currencyCodes' as FilterToolbarItemId,\n labelContentId: ContentId.Currency,\n filterQueryKeys: ['currencyCodes'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (!isEqual(tempQuery.currencyCodes, newCurrencyCodes)) {\n setTempQuery({\n ...tempQuery,\n currencyCodes: newCurrencyCodes?.length\n ? newCurrencyCodes\n : null,\n });\n }\n }}\n enableEmptySelection\n />\n ),\n },\n ],\n },\n\n {\n titleContentId: ContentId.Broadcast,\n type: 'row',\n items: [\n {\n filterId: 'isListed' as FilterToolbarItemId,\n labelContentId: ContentId.Broadcasted,\n filterQueryKeys: ['isListed'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (yesNoEnumValue !== ToYesNoEnum(tempQuery.isListed)) {\n setTempQuery({\n ...tempQuery,\n isListed: FromYesNoEnum(yesNoEnumValue),\n });\n }\n }}\n valueOptionsContent={YES_NO_ENUM_FILTER_TO_CID}\n />\n ),\n },\n ...adminHoldFilter,\n {\n filterId: 'isDuplicate' as FilterToolbarItemId,\n labelContentId: ContentId.IsDuplicate,\n filterQueryKeys: ['isDuplicate'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (yesNoEnumValue !== ToYesNoEnum(tempQuery.isDuplicate)) {\n setTempQuery({\n ...tempQuery,\n isDuplicate: FromYesNoEnum(yesNoEnumValue),\n });\n }\n }}\n valueOptionsContent={YES_NO_ENUM_FILTER_TO_CID}\n />\n ),\n },\n ],\n },\n {\n titleContentId: ContentId.Fulfillment,\n type: 'row',\n items: [\n {\n filterId: 'isPredelivered' as FilterToolbarItemId,\n labelContentId: ContentId.PreDelivered,\n type: 'row',\n filterQueryKeys: ['isPredelivered'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (\n yesNoEnumValue !== ToYesNoEnum(tempQuery.isPredelivered)\n ) {\n setTempQuery({\n ...tempQuery,\n isPredelivered: FromYesNoEnum(yesNoEnumValue),\n });\n }\n }}\n valueOptionsContent={YES_NO_ENUM_FILTER_TO_CID}\n />\n ),\n },\n {\n filterId: 'inHandDates' as const,\n labelContentId: ContentId.InHand,\n filterQueryKeys: ['inHandDates'] as FilterToolbarItemId[],\n filterItem: (\n \n setTempQuery({\n ...tempQuery,\n inHandDates: value,\n })\n }\n />\n ),\n },\n {\n filterId: 'isSeatSaver' as const,\n labelContentId: ContentId.Placeholder,\n filterQueryKeys: ['isSeatSaver'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (yesNoEnumValue !== ToYesNoEnum(tempQuery.isSeatSaver)) {\n setTempQuery({\n ...tempQuery,\n isSeatSaver: FromYesNoEnum(yesNoEnumValue),\n });\n }\n }}\n valueOptionsContent={YES_NO_ENUM_FILTER_TO_CID}\n />\n ),\n },\n ],\n },\n {\n titleContentId: ContentId.Mappings,\n type: 'row',\n items: [\n {\n filterId: 'isMapped' as FilterToolbarItemId,\n labelContentId: ContentId.EventMapped,\n filterQueryKeys: ['isMapped'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (yesNoEnumValue !== ToYesNoEnum(tempQuery.isMapped)) {\n setTempQuery({\n ...tempQuery,\n isMapped: FromYesNoEnum(yesNoEnumValue),\n });\n }\n }}\n valueOptionsContent={YES_NO_ENUM_FILTER_TO_CID}\n />\n ),\n },\n {\n filterId: 'isSeatingUnmapped' as FilterToolbarItemId,\n labelContentId: ContentId.SeatingMapped,\n filterQueryKeys: ['isSeatingUnmapped'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (\n yesNoEnumValue !==\n ToYesNoEnum(tempQuery.isSeatingUnmapped)\n ) {\n setTempQuery({\n ...tempQuery,\n isSeatingUnmapped: FromYesNoEnum(yesNoEnumValue),\n });\n }\n }}\n valueOptionsContent={YES_NO_INVERTED_ENUM_FILTER_TO_CID}\n />\n ),\n },\n ],\n },\n seatingFilters,\n supportedPurchaseInfoFilters,\n notesFilters,\n ]\n .filter((f) => f)\n .map((f) => f!),\n [\n eventFilters,\n hasAutoPricingFeature,\n autoPricingFilter,\n tempQuery,\n adminHoldFilter,\n initialQuery.inHandDates,\n seatingFilters,\n supportedPurchaseInfoFilters,\n notesFilters,\n setTempQuery,\n ]\n );\n\n return { filters };\n}\n","import { isEqual } from 'lodash-es';\nimport { useMemo } from 'react';\nimport {\n FilterToolbarGroup,\n FilterToolbarItemId,\n} from 'src/components/Filters';\nimport { useInternalNotesFilter } from 'src/components/Filters/InternalNotesFilter';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { DateRangeSelector } from 'src/core/POS/DateRangeSelector';\nimport { PosEnumMultiSelect } from 'src/core/POS/PosMultiSelect/PosEnumMultiSelect';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n MARKET_PLACE_TO_CID,\n MARKETPLACE_SALE_PAYMENT_STATE_TO_CID,\n SALES_STATUS_TO_CID,\n YES_NO_ENUM_FILTER_TO_CID,\n} from 'src/utils/constants/contentIdMaps';\nimport {\n InhandDateRangePresetNames,\n SaleDateRangeRelativePresetNames,\n StandardDateRangePresetNames,\n} from 'src/utils/dateTimeUtils';\nimport { FromYesNoEnum, ToYesNoEnum } from 'src/utils/eventQueryUtils';\nimport {\n ActionOutboxEntityType,\n Feature,\n Marketplace,\n Permission,\n UIReportV2SaleQuery,\n} from 'src/WebApiController';\n\nimport { RowFilter } from '../Filters/RowFilter';\nimport { SectionFilter } from '../Filters/SectionFilter';\nimport { CurrencyFilterMultiSelector } from '../Selectors/CurrencyFilterSelector';\nimport { SellerAccountEmployeeSelector } from '../Selectors/SellerAccountEmployeeSelector';\nimport { useCommonEventFilters } from './useCommonEventFilters';\n\nexport const saleReportMandatoryFiltersToShow: FilterToolbarItemId[] = [\n 'eventDates',\n 'saleStatuses',\n];\n\nexport function useSaleReportFilters({\n isHorizontalLayout,\n showCatalogFilters,\n}: {\n isHorizontalLayout?: boolean;\n showCatalogFilters?: boolean;\n}) {\n const { loginContext } = useAppContext();\n\n const hasAutoFulfillSetting = useUserHasFeature(Feature.AutoFulfillSetting);\n\n const { initialQuery, tempQuery, setTempQuery } =\n useFilterQueryContext();\n\n const notesFilters = useInternalNotesFilter({\n entityType: ActionOutboxEntityType.Sale,\n isHorizontalLayout,\n });\n\n const seatingFilters = useMemo(\n () => ({\n titleContentId: ContentId.Seating,\n type: 'row',\n items: [\n {\n filterId: 'sectionContains',\n labelContentId: ContentId.Section,\n filterQueryKeys: ['sectionEquals', 'sectionContains'],\n filterItem: (\n \n ),\n },\n {\n filterId: 'rowContains',\n labelContentId: ContentId.Row,\n filterQueryKeys: ['rowEquals', 'rowContains'],\n filterItem: (\n \n ),\n },\n ],\n }),\n [isHorizontalLayout, setTempQuery, tempQuery]\n );\n\n const eventFilters = useCommonEventFilters({\n showCatalogFilters,\n additionalFilters: [],\n });\n\n return {\n filters: [\n eventFilters,\n {\n titleContentId: ContentId.Fulfillment,\n items: [\n {\n filterId: 'saleStatuses' as FilterToolbarItemId,\n labelContentId: ContentId.Status,\n filterQueryKeys: ['saleStatuses'] as FilterToolbarItemId[],\n filterItem: (\n {\n setTempQuery({\n ...tempQuery,\n saleStatuses,\n });\n }}\n />\n ),\n },\n {\n filterId: 'inHandDates' as FilterToolbarItemId,\n labelContentId: ContentId.InHand,\n filterQueryKeys: ['inHandDates'] as FilterToolbarItemId[],\n filterItem: (\n \n setTempQuery({\n ...tempQuery,\n inHandDates: value,\n })\n }\n />\n ),\n },\n {\n filterId: 'fulfillerId' as FilterToolbarItemId,\n labelContentId: ContentId.FulfilledBy,\n filterQueryKeys: ['fulfillerSellerUserId'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (newId !== tempQuery.fulfillerSellerUserId) {\n setTempQuery({\n ...tempQuery,\n fulfillerSellerUserId: newId,\n });\n }\n }}\n />\n ),\n },\n {\n filterId: 'isSeatSaver' as FilterToolbarItemId,\n labelContentId: ContentId.Placeholder,\n filterQueryKeys: ['isSeatSaver'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (yesNoEnumValue !== ToYesNoEnum(tempQuery.isSeatSaver)) {\n setTempQuery({\n ...tempQuery,\n isSeatSaver: FromYesNoEnum(yesNoEnumValue),\n });\n }\n }}\n valueOptionsContent={YES_NO_ENUM_FILTER_TO_CID}\n />\n ),\n },\n {\n filterId: 'fulfillmentDates' as FilterToolbarItemId,\n labelContentId: ContentId.FulfillmentDate,\n filterQueryKeys: ['fulfillmentDates'] as FilterToolbarItemId[],\n filterItem: (\n \n setTempQuery({\n ...tempQuery,\n fulfillmentDates: value,\n })\n }\n />\n ),\n },\n ...(hasAutoFulfillSetting\n ? [\n {\n filterId: 'isNoFulfill' as FilterToolbarItemId,\n labelContentId: ContentId.AutoFulfill,\n type: 'row',\n filterQueryKeys: ['isNoFulfill'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (\n yesNoEnumValue !==\n ToYesNoEnum(\n // the ui is the inverse of isNoFulfil\n tempQuery.isNoFulfill == null\n ? null\n : !tempQuery.isNoFulfill\n )\n ) {\n const v = FromYesNoEnum(yesNoEnumValue);\n setTempQuery({\n ...tempQuery,\n isNoFulfill: v == null ? null : !v, // the ui is the inverse of isNoFulfil\n });\n }\n }}\n valueOptionsContent={YES_NO_ENUM_FILTER_TO_CID}\n />\n ),\n },\n ]\n : []),\n {\n filterId: 'cancellationDates' as FilterToolbarItemId,\n labelContentId: ContentId.CancellationDate,\n filterQueryKeys: ['cancellationDates'] as FilterToolbarItemId[],\n filterItem: (\n \n setTempQuery({\n ...tempQuery,\n cancellationDates: value,\n })\n }\n />\n ),\n },\n ],\n },\n {\n titleContentId: ContentId.WhenAndWhere,\n type: 'row',\n items: [\n {\n filterId: 'soldOnMarketplace' as FilterToolbarItemId,\n labelContentId: ContentId.Marketplace,\n filterQueryKeys: ['soldOnMarketplace'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (soldOnMarketplace !== tempQuery.soldOnMarketplace) {\n setTempQuery({\n ...tempQuery,\n soldOnMarketplace,\n });\n }\n }}\n valueOptionsContent={(\n loginContext?.user?.activeAccount?.marketplaceSettings?.map(\n (m) => m.mkp\n ) ?? [Marketplace.StubHub]\n )\n .concat(Marketplace.Offline)\n .reduce(\n (cur, m) => {\n cur[m] = MARKET_PLACE_TO_CID[m];\n return cur;\n },\n {} as Record\n )}\n />\n ),\n },\n {\n filterId: 'saleDates' as FilterToolbarItemId,\n labelContentId: ContentId.SaleDate,\n filterQueryKeys: ['saleDates'] as FilterToolbarItemId[],\n filterItem: (\n {\n setTempQuery({\n ...tempQuery,\n saleDates: value,\n });\n }}\n useRelativePresets\n />\n ),\n },\n ],\n },\n {\n titleContentId: ContentId.Payment,\n requiredPermissions: [Permission.Sales_ViewPaymentState],\n type: 'row',\n items: [\n {\n filterId: 'marketplacePaymentState' as FilterToolbarItemId,\n labelContentId: ContentId.Payment,\n filterQueryKeys: [\n 'marketplacePaymentState',\n ] as FilterToolbarItemId[],\n filterItem: (\n {\n if (\n marketplacePaymentState !==\n tempQuery.marketplacePaymentState\n ) {\n setTempQuery({\n ...tempQuery,\n marketplacePaymentState: marketplacePaymentState,\n });\n }\n }}\n valueOptionsContent={MARKETPLACE_SALE_PAYMENT_STATE_TO_CID}\n />\n ),\n },\n {\n filterId: 'paymentDates' as FilterToolbarItemId,\n labelContentId: ContentId.PaymentDate,\n filterQueryKeys: ['paymentDates'] as FilterToolbarItemId[],\n filterItem: (\n \n setTempQuery({\n ...tempQuery,\n paymentDates: value,\n })\n }\n />\n ),\n },\n {\n filterId: 'currencyCodes' as FilterToolbarItemId,\n labelContentId: ContentId.Currency,\n filterQueryKeys: ['currencyCodes'] as FilterToolbarItemId[],\n filterItem: (\n {\n if (!isEqual(tempQuery.currencyCodes, newCurrencyCodes)) {\n setTempQuery({\n ...tempQuery,\n currencyCodes: newCurrencyCodes?.length\n ? newCurrencyCodes\n : null,\n });\n }\n }}\n enableEmptySelection\n />\n ),\n },\n ],\n },\n seatingFilters,\n ...(notesFilters ? [notesFilters] : []),\n ],\n };\n}\n","import { useCallback, useEffect, useMemo, useState } from 'react';\nimport isEqual from 'react-fast-compare';\nimport { useFormContext } from 'react-hook-form';\nimport { PerformerVenueList } from 'src/components/Events/PerformerVenueList';\nimport { FilterDropdownItem } from 'src/components/Filters';\nimport { useFiltersHelpers } from 'src/components/FilterToolbar/useFiltersHelpers';\nimport {\n FilterToolbarEmbedded,\n FilterToolbarEmbeddedProps,\n} from 'src/components/FilterToolbarEmbedded';\nimport {\n commissionMandatoryFiltersToShow,\n useCommissionFilters,\n} from 'src/components/MainFilterBar/useCommissionFilters';\nimport { listingsMandatoryFiltersToShow } from 'src/components/MainFilterBar/useListingFilters';\nimport {\n listingsReportMandatoryFiltersToShow,\n useListingReportFilters,\n} from 'src/components/MainFilterBar/useListingReportFilters';\nimport { saleMandatoryFiltersToShow } from 'src/components/MainFilterBar/useSaleFilters';\nimport {\n saleReportMandatoryFiltersToShow,\n useSaleReportFilters,\n} from 'src/components/MainFilterBar/useSaleReportFilters';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { Button, Popover, Stack } from 'src/core/ui';\nimport { ReportConfigV2 } from 'src/hooks/useReportConfigsV2';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n DefaultCommissionQuery,\n DefaultReportV2ListingQuery,\n DefaultReportV2SaleQuery,\n} from 'src/utils/eventQueryUtils';\nimport {\n ReportFilterEditability,\n ReportPerformerVenueFilterItemId,\n} from 'src/utils/reportsFilterUtils';\nimport { ReportTypesV2 } from 'src/utils/reportsUtils';\nimport {\n ActionOutboxEntityType,\n UIReportCommissionQuery,\n UIReportV2ListingQuery,\n UIReportV2SaleQuery,\n} from 'src/WebApiController';\n\nimport * as styles from './ReportBuilderDialog.css';\nimport {\n getEditability,\n updateFilterItemIds,\n} from './ReportBuilderFilterInput.utils';\n\ntype ReportFilterInputProps = {\n onSubmitFilter?: () => void;\n} & Pick<\n FilterToolbarEmbeddedProps,\n | 'direction'\n | 'performerVenueFilter'\n | 'filtersListHeader'\n | 'addFilterDropdownProps'\n | 'flexWrap'\n | 'viewerMode'\n | 'disabled'\n>;\n\nconst FILTERS_FIELD = 'request.filters';\n\nexport function ReportBuilderFilterInputV2({\n reportType,\n direction,\n ...filterInputProps\n}: {\n reportType: ReportTypesV2;\n} & ReportFilterInputProps) {\n const { watch } = useFormContext();\n\n const hiddenFilterItemIds = watch('hiddenFilterItemIds');\n const viewableFilterItemIds = watch('viewableFilterItemIds');\n const editableFilterItemIds = watch('editableFilterItemIds');\n\n const performerFilterEditability = getEditability(\n editableFilterItemIds,\n viewableFilterItemIds,\n hiddenFilterItemIds,\n ReportPerformerVenueFilterItemId.PerformerIds\n );\n const venueFilterEditability = getEditability(\n editableFilterItemIds,\n viewableFilterItemIds,\n hiddenFilterItemIds,\n ReportPerformerVenueFilterItemId.VenueIds\n );\n\n // const hidePerformerVenueFilter =\n // embeddedDisplayOnly &&\n // (performerFilterEditability ?? DEFAULT_REPORT_FILTER_EDITABILITY) ===\n // ReportFilterEditability.Hidden &&\n // (venueFilterEditability ?? DEFAULT_REPORT_FILTER_EDITABILITY) ===\n // ReportFilterEditability.Hidden;\n\n return (\n \n {reportType === ReportTypesV2.InventoryV2 ? (\n <>\n \n \n ) : reportType === ReportTypesV2.Commission ? (\n <>\n \n \n ) : (\n <>\n {/* {!embeddedDisplayOnly && (\n \n )} */}\n \n // )\n // }\n />\n \n )}\n \n );\n}\n\nconst ListingFilterInput = ({\n onSubmitFilter,\n ...filterToolbarProps\n}: ReportFilterInputProps) => {\n const { setValue, watch } = useFormContext();\n\n const formFilter = watch(FILTERS_FIELD);\n const hiddenFilterItemIds = watch('hiddenFilterItemIds');\n const viewableFilterItemIds = watch('viewableFilterItemIds');\n const editableFilterItemIds = watch('editableFilterItemIds');\n\n const [selectedFilters, setSelectedFilters] =\n useState();\n\n const {\n initialQuery,\n tempQuery,\n filterQuery,\n setFilterQuery,\n setTempQuery,\n resetTempQuery,\n } = useFilterQueryContext();\n const { filters } = useListingReportFilters({});\n\n const onSubmitFilterHandler = useCallback(() => {\n setFilterQuery(tempQuery);\n onSubmitFilter?.();\n }, [onSubmitFilter, setFilterQuery, tempQuery]);\n\n useEffect(() => {\n if (\n formFilter != null &&\n !isEqual(formFilter as UIReportV2ListingQuery, tempQuery)\n ) {\n setTempQuery(formFilter as UIReportV2ListingQuery);\n setFilterQuery(formFilter as UIReportV2ListingQuery);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n useEffect(() => {\n onSubmitFilterHandler();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [tempQuery]);\n\n useEffect(() => {\n if (!isEqual(formFilter as UIReportV2ListingQuery, filterQuery)) {\n setValue(FILTERS_FIELD, filterQuery);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [filterQuery]);\n\n const { appliedFilters } = useFiltersHelpers({\n filters,\n activeQuery: tempQuery,\n mandatoryFiltersToShow: listingsReportMandatoryFiltersToShow,\n initialQuery: DefaultReportV2ListingQuery,\n });\n\n const filtersWithEditability = useMemo(\n () =>\n filters.map((filterGroup) => ({\n ...filterGroup,\n items: filterGroup.items.map((filterItem) => ({\n ...filterItem,\n reportFilterEditability: getEditability(\n editableFilterItemIds,\n viewableFilterItemIds,\n hiddenFilterItemIds,\n filterItem.filterId\n ),\n })),\n })),\n [editableFilterItemIds, filters, hiddenFilterItemIds, viewableFilterItemIds]\n );\n\n const onEditabilityChange = useCallback(\n (filterId: string | string[], editability: ReportFilterEditability) => {\n const filterIds = Array.isArray(filterId) ? filterId : [filterId];\n\n const {\n newHiddenFilterItemIds,\n newViewableFilterItemIds,\n newEditableFilterItemIds,\n } = updateFilterItemIds(\n editableFilterItemIds,\n viewableFilterItemIds,\n hiddenFilterItemIds,\n filterIds,\n editability\n );\n\n setValue('hiddenFilterItemIds', newHiddenFilterItemIds);\n setValue('viewableFilterItemIds', newViewableFilterItemIds);\n setValue('editableFilterItemIds', newEditableFilterItemIds);\n },\n [\n editableFilterItemIds,\n hiddenFilterItemIds,\n setValue,\n viewableFilterItemIds,\n ]\n );\n\n return (\n {\n setTempQuery(DefaultReportV2ListingQuery);\n setFilterQuery(DefaultReportV2ListingQuery);\n }}\n filters={filtersWithEditability}\n appliedFilterIds={appliedFilters}\n mandatoryFiltersToShow={listingsMandatoryFiltersToShow}\n resetTempQuery={resetTempQuery}\n tempQuery={tempQuery}\n onEditabilityChange={onEditabilityChange}\n selectedFilters={selectedFilters}\n setSelectedFilters={setSelectedFilters}\n {...filterToolbarProps}\n />\n );\n};\n\nconst SaleFilterInput = ({\n onSubmitFilter,\n ...filterToolbarProps\n}: ReportFilterInputProps) => {\n const { setValue, watch } = useFormContext();\n\n const formFilter = watch(FILTERS_FIELD);\n const hiddenFilterItemIds = watch('hiddenFilterItemIds');\n const viewableFilterItemIds = watch('viewableFilterItemIds');\n const editableFilterItemIds = watch('editableFilterItemIds');\n\n const [selectedFilters, setSelectedFilters] =\n useState();\n\n const {\n initialQuery,\n tempQuery,\n filterQuery,\n setFilterQuery,\n setTempQuery,\n resetTempQuery,\n } = useFilterQueryContext();\n const { filters } = useSaleReportFilters({});\n\n const onSubmitFilterHandler = useCallback(() => {\n setFilterQuery(tempQuery);\n onSubmitFilter?.();\n }, [onSubmitFilter, setFilterQuery, tempQuery]);\n\n useEffect(() => {\n if (\n formFilter != null &&\n !isEqual(formFilter as UIReportV2SaleQuery, tempQuery)\n ) {\n setTempQuery(formFilter as UIReportV2SaleQuery);\n setFilterQuery(formFilter as UIReportV2SaleQuery);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n useEffect(() => {\n onSubmitFilterHandler();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [tempQuery]);\n\n useEffect(() => {\n if (!isEqual(formFilter as UIReportV2SaleQuery, filterQuery)) {\n setValue(FILTERS_FIELD, filterQuery);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [filterQuery]);\n\n const { appliedFilters } = useFiltersHelpers({\n filters,\n activeQuery: tempQuery,\n mandatoryFiltersToShow: saleReportMandatoryFiltersToShow,\n initialQuery: DefaultReportV2SaleQuery,\n });\n const filtersWithEditability = useMemo(\n () =>\n filters.map((filterGroup) => ({\n ...filterGroup,\n items: filterGroup.items.map((filterItem) => ({\n ...filterItem,\n reportFilterEditability: getEditability(\n editableFilterItemIds,\n viewableFilterItemIds,\n hiddenFilterItemIds,\n filterItem.filterId\n ),\n })),\n })),\n [editableFilterItemIds, filters, hiddenFilterItemIds, viewableFilterItemIds]\n );\n\n const onEditabilityChange = useCallback(\n (filterId: string | string[], editability: ReportFilterEditability) => {\n const filterIds = Array.isArray(filterId) ? filterId : [filterId];\n\n const {\n newHiddenFilterItemIds,\n newViewableFilterItemIds,\n newEditableFilterItemIds,\n } = updateFilterItemIds(\n editableFilterItemIds,\n viewableFilterItemIds,\n hiddenFilterItemIds,\n filterIds,\n editability\n );\n\n setValue('hiddenFilterItemIds', newHiddenFilterItemIds);\n setValue('viewableFilterItemIds', newViewableFilterItemIds);\n setValue('editableFilterItemIds', newEditableFilterItemIds);\n },\n [\n editableFilterItemIds,\n hiddenFilterItemIds,\n setValue,\n viewableFilterItemIds,\n ]\n );\n\n return (\n {\n setTempQuery(DefaultReportV2SaleQuery);\n setFilterQuery(DefaultReportV2SaleQuery);\n }}\n filters={filtersWithEditability}\n appliedFilterIds={appliedFilters}\n mandatoryFiltersToShow={saleMandatoryFiltersToShow}\n resetTempQuery={resetTempQuery}\n tempQuery={tempQuery}\n onEditabilityChange={onEditabilityChange}\n selectedFilters={selectedFilters}\n setSelectedFilters={setSelectedFilters}\n {...filterToolbarProps}\n />\n );\n};\n\nconst CommissionFilterInput = ({\n onSubmitFilter,\n ...filterToolbarProps\n}: ReportFilterInputProps) => {\n const { setValue, watch } = useFormContext();\n\n const formFilter = watch(FILTERS_FIELD);\n const hiddenFilterItemIds = watch('hiddenFilterItemIds');\n const viewableFilterItemIds = watch('viewableFilterItemIds');\n const editableFilterItemIds = watch('editableFilterItemIds');\n\n const [selectedFilters, setSelectedFilters] =\n useState();\n\n const {\n initialQuery,\n tempQuery,\n filterQuery,\n setFilterQuery,\n setTempQuery,\n resetTempQuery,\n } = useFilterQueryContext();\n const { filters } = useCommissionFilters();\n\n const onSubmitFilterHandler = useCallback(() => {\n setFilterQuery(tempQuery);\n onSubmitFilter?.();\n }, [onSubmitFilter, setFilterQuery, tempQuery]);\n\n useEffect(() => {\n if (\n formFilter != null &&\n !isEqual(formFilter as UIReportCommissionQuery, tempQuery)\n ) {\n setTempQuery(formFilter as UIReportCommissionQuery);\n setFilterQuery(formFilter as UIReportCommissionQuery);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n useEffect(() => {\n onSubmitFilterHandler();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [tempQuery]);\n\n useEffect(() => {\n if (!isEqual(formFilter as UIReportCommissionQuery, filterQuery)) {\n setValue(FILTERS_FIELD, filterQuery);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [filterQuery]);\n\n const { appliedFilters } = useFiltersHelpers({\n filters,\n activeQuery: tempQuery,\n mandatoryFiltersToShow: commissionMandatoryFiltersToShow,\n initialQuery: DefaultCommissionQuery,\n });\n const filtersWithEditability = useMemo(\n () =>\n filters.map((filterGroup) => ({\n ...filterGroup,\n items: filterGroup.items.map((filterItem) => ({\n ...filterItem,\n reportFilterEditability: getEditability(\n editableFilterItemIds,\n viewableFilterItemIds,\n hiddenFilterItemIds,\n filterItem.filterId\n ),\n })),\n })),\n [editableFilterItemIds, filters, hiddenFilterItemIds, viewableFilterItemIds]\n );\n\n const onEditabilityChange = useCallback(\n (filterId: string | string[], editability: ReportFilterEditability) => {\n const filterIds = Array.isArray(filterId) ? filterId : [filterId];\n\n const {\n newHiddenFilterItemIds,\n newViewableFilterItemIds,\n newEditableFilterItemIds,\n } = updateFilterItemIds(\n editableFilterItemIds,\n viewableFilterItemIds,\n hiddenFilterItemIds,\n filterIds,\n editability\n );\n\n setValue('hiddenFilterItemIds', newHiddenFilterItemIds);\n setValue('viewableFilterItemIds', newViewableFilterItemIds);\n setValue('editableFilterItemIds', newEditableFilterItemIds);\n },\n [\n editableFilterItemIds,\n hiddenFilterItemIds,\n setValue,\n viewableFilterItemIds,\n ]\n );\n\n return (\n {\n setTempQuery(DefaultCommissionQuery);\n setFilterQuery(DefaultCommissionQuery);\n }}\n filters={filtersWithEditability}\n appliedFilterIds={appliedFilters}\n mandatoryFiltersToShow={saleMandatoryFiltersToShow}\n resetTempQuery={resetTempQuery}\n tempQuery={tempQuery}\n onEditabilityChange={onEditabilityChange}\n selectedFilters={selectedFilters}\n setSelectedFilters={setSelectedFilters}\n {...filterToolbarProps}\n />\n );\n};\n\nconst PerformerVenuePopover = ({\n entityType,\n onSubmitFilter,\n embeddedDisplayOnly,\n}: {\n entityType: ActionOutboxEntityType.Listing | ActionOutboxEntityType.Sale;\n onSubmitFilter?: () => void;\n embeddedDisplayOnly?: boolean;\n}) => {\n const { setValue, watch } = useFormContext();\n\n const hiddenFilterItemIds = watch('hiddenFilterItemIds');\n const viewableFilterItemIds = watch('viewableFilterItemIds');\n const editableFilterItemIds = watch('editableFilterItemIds');\n\n const performerFilterEditability = getEditability(\n editableFilterItemIds,\n viewableFilterItemIds,\n hiddenFilterItemIds,\n ReportPerformerVenueFilterItemId.PerformerIds\n );\n const venueFilterEditability = getEditability(\n editableFilterItemIds,\n viewableFilterItemIds,\n hiddenFilterItemIds,\n ReportPerformerVenueFilterItemId.VenueIds\n );\n\n const onEditabilityChange = useCallback(\n (reportFilterId: string, editability: ReportFilterEditability) => {\n const newHiddenFilterItemIds = hiddenFilterItemIds\n ? hiddenFilterItemIds.filter((id) => id !== reportFilterId)\n : [];\n const newViewableFilterItemIds = viewableFilterItemIds\n ? viewableFilterItemIds.filter((id) => id !== reportFilterId)\n : [];\n const newEditableFilterItemIds = editableFilterItemIds\n ? editableFilterItemIds.filter((id) => id !== reportFilterId)\n : [];\n\n if (editability === ReportFilterEditability.Hidden) {\n newHiddenFilterItemIds.push(reportFilterId);\n } else if (editability === ReportFilterEditability.View) {\n newViewableFilterItemIds.push(reportFilterId);\n } else if (editability === ReportFilterEditability.Edit) {\n newEditableFilterItemIds.push(reportFilterId);\n }\n\n setValue('hiddenFilterItemIds', newHiddenFilterItemIds.toSorted());\n setValue('viewableFilterItemIds', newViewableFilterItemIds.toSorted());\n setValue('editableFilterItemIds', newEditableFilterItemIds.toSorted());\n },\n [\n editableFilterItemIds,\n hiddenFilterItemIds,\n setValue,\n viewableFilterItemIds,\n ]\n );\n\n return (\n \n \n \n \n \n
    \n {}}\n hideMetrics\n // Have to update tempQuery instead of filterQuery to sync with the main filter bar here\n updateTempQuery\n onEditabilityChange={onEditabilityChange}\n performerFilterEditability={performerFilterEditability}\n venueFilterEditability={venueFilterEditability}\n embeddedDisplayOnly={embeddedDisplayOnly}\n />\n
    \n
    \n
    \n );\n};\n","import { ComponentProps, PropsWithChildren, useCallback, useMemo } from 'react';\nimport { FormProvider, useFormContext } from 'react-hook-form';\nimport { Modal as RSModal } from 'reactstrap';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { FilterQueryContextProvider } from 'src/contexts/FilterQueryContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { getTextFieldState, PosTextField } from 'src/core/POS/PosTextField';\nimport { shared, vars } from 'src/core/themes';\nimport { Button, Radio, RadioGroup, Stack } from 'src/core/ui';\nimport {\n ReportConfigV2,\n useReportConfigsV2,\n} from 'src/hooks/useReportConfigsV2';\nimport { FieldWrapper } from 'src/modals/common/Purchase';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n DefaultReportV2ListingQuery,\n DefaultReportV2SaleQuery,\n EmptyReportV2ListingQuery,\n EmptyReportV2SaleQuery,\n} from 'src/utils/eventQueryUtils';\nimport { ReportTypesV2 } from 'src/utils/reportsUtils';\nimport {\n UIReportV2ListingQuery,\n UIReportV2SaleQuery,\n} from 'src/WebApiController';\n\nimport * as styles from './ReportBuilderDialog.css';\nimport { ReportBuilderFilterInputV2 } from './ReportBuilderFilterInputV2';\n\nexport type ReportBuilderDialogProps = {\n report: ReportConfigV2;\n onSave: (data: ReportConfigV2) => void;\n} & ComponentProps;\n\nexport function ReportBuilderDialogBodyV2({\n onSave,\n onClosed,\n register,\n setError,\n setValue,\n handleSubmit,\n formState,\n watch,\n resetField,\n ...rest\n}: Omit &\n Omit<\n ComponentProps>,\n 'children' | 'trigger' | 'reset' | 'unregister'\n >) {\n const { reportConfigs: existingInventoryReports } =\n useReportConfigsV2({\n reportType: ReportTypesV2.InventoryV2,\n });\n const { reportConfigs: existingSaleReports } =\n useReportConfigsV2({\n reportType: ReportTypesV2.SaleV2,\n });\n\n const requiredMsg = useContent(ContentId.Required);\n const duplicateNameMsg = useContent(ContentId.DuplicatedReportName);\n\n const nameError = formState.errors.reportName?.message;\n const filtersError = formState.errors.request?.filters?.message;\n\n const reportId = watch('reportId');\n const reportName = watch('reportName');\n const reportType = watch('reportType');\n\n const existingReportNames = useMemo(() => {\n return existingInventoryReports\n ?.concat(existingSaleReports ?? [])\n .filter((r) => r.reportId !== reportId)\n .map((r) => r.reportName);\n }, [existingInventoryReports, existingSaleReports, reportId]);\n\n const onSubmit = useCallback(() => {\n let hasErrors = false;\n if (!reportName) {\n setError('reportName', { message: requiredMsg }, { shouldFocus: true });\n hasErrors = true;\n }\n\n if (\n existingReportNames.some(\n (name) => name.toLocaleUpperCase() === reportName.toLocaleUpperCase()\n )\n ) {\n setError(\n 'reportName',\n { message: duplicateNameMsg },\n { shouldFocus: true }\n );\n hasErrors = true;\n }\n\n if (!hasErrors) {\n handleSubmit(onSave)();\n }\n }, [\n reportName,\n existingReportNames,\n setError,\n requiredMsg,\n duplicateNameMsg,\n handleSubmit,\n onSave,\n ]);\n\n return (\n <>\n \n }\n footer={\n \n {reportId == null ? (\n \n ) : (\n \n )}\n \n }\n onCancel={onClosed}\n >\n
    \n \n }>\n \n \n \n\n \n }>\n {\n const newValue = value as ReportTypesV2;\n if (newValue === reportType) {\n // Nothing to do\n return;\n }\n\n if (formState.defaultValues?.reportType === newValue) {\n const defaultValues =\n formState.defaultValues as ReportConfigV2;\n const defaultRequest = defaultValues.request;\n // Restore filters and metrics\n setValue(\n 'request.aggregations',\n defaultRequest.aggregations\n );\n setValue(\n 'request.columnGroupings',\n defaultRequest.columnGroupings\n );\n setValue(\n 'request.rowGroupings',\n defaultRequest.rowGroupings\n );\n setValue('request.filters', defaultRequest.filters);\n setValue(\n 'hiddenFilterItemIds',\n defaultValues.hiddenFilterItemIds\n );\n setValue(\n 'viewableFilterItemIds',\n defaultValues.viewableFilterItemIds\n );\n setValue(\n 'editableFilterItemIds',\n defaultValues.editableFilterItemIds\n );\n } else {\n // Clear filters and metrics\n setValue('request.aggregations', []);\n setValue('request.columnGroupings', []);\n setValue('request.rowGroupings', []);\n setValue('hiddenFilterItemIds', []);\n setValue('viewableFilterItemIds', []);\n setValue('editableFilterItemIds', []);\n\n if (newValue === ReportTypesV2.InventoryV2) {\n setValue('request.filters', DefaultReportV2ListingQuery);\n } else {\n // SaleV2\n setValue('request.filters', DefaultReportV2SaleQuery);\n }\n }\n setValue('reportType', newValue);\n }}\n value={reportType}\n >\n \n \n \n \n \n \n \n \n \n }\n variant=\"outline\"\n />\n \n \n \n \n \n \n \n \n }\n variant=\"outline\"\n />\n \n \n \n \n\n \n } />\n
    \n \n
    \n
    \n
    \n \n \n );\n}\n\nconst FilterInput = ({ disabled }: { disabled?: boolean }) => {\n const { watch } = useFormContext();\n const reportType = watch('reportType');\n\n return (\n \n \n \n \n }\n addFilterDropdownProps={{\n triggerShape: 'pill',\n triggerVariant: 'outline',\n triggerClassName: styles.addFilterButton,\n }}\n disabled={disabled}\n />\n \n );\n};\n\nconst FilterInputContextWrapper = ({ children }: PropsWithChildren) => {\n const { watch } = useFormContext();\n const reportType = watch('reportType');\n const reportFilter = watch('request.filters');\n\n if (reportType === ReportTypesV2.InventoryV2) {\n return (\n \n initialQuery={reportFilter as UIReportV2ListingQuery}\n emptyQuery={EmptyReportV2ListingQuery}\n >\n {children}\n \n );\n }\n\n return (\n \n initialQuery={reportFilter as UIReportV2SaleQuery}\n emptyQuery={EmptyReportV2SaleQuery}\n >\n {children}\n \n );\n};\n","import { ComponentProps, useEffect } from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { Modal as RSModal } from 'reactstrap';\nimport { ReportConfigV2 } from 'src/hooks/useReportConfigsV2';\n\nimport { ReportBuilderDialogBodyV2 } from './ReportBuilderDialogBodyV2';\n\nexport type ReportBuilderDialogV2Props = {\n report: ReportConfigV2;\n onSave: (data: ReportConfigV2) => void;\n} & ComponentProps;\n\nexport function ReportBuilderDialogV2({\n report,\n ...rest\n}: ReportBuilderDialogV2Props) {\n const methods = useForm({\n defaultValues: report,\n });\n\n useEffect(() => {\n methods.reset(report);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [report.reportId]);\n\n return (\n \n \n \n );\n}\n","import {\n ColumnDef,\n InitialTableState,\n PaginationState,\n SortingState,\n TableOptions,\n} from '@tanstack/react-table';\nimport { formatInTimeZone } from 'date-fns-tz';\nimport { useCallback, useMemo, useState } from 'react';\nimport {\n Content,\n FormatContent,\n useContent,\n} from 'src/contexts/ContentContext';\nimport { useSiteTimezoneContext } from 'src/contexts/SiteTimezoneContext/SiteTimezoneContext';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { TableHeaderCellDiv } from 'src/core/ui/TableHeaderCellDiv';\nimport { DownloadIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { NoData, Table } from 'src/tables/Table';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { stringToUtcDate } from 'src/utils/dateTimeUtils';\nimport { downloadFileFromUrl } from 'src/utils/fileUtils';\nimport { getLocaleFromLanguageOrCurrent } from 'src/utils/localeUtils';\nimport { ReportSnapshotInfo } from 'src/WebApiController';\n\ninterface ReportHistoryTableProps {\n reportConfigId: number;\n reportSnapshotInfos: ReportSnapshotInfo[];\n initState?: InitialTableState;\n}\nconst PAGE_SIZE = 15;\n\nconst getHistorySnapshotTableColumnsConfig = (\n reportId: number\n): ColumnDef[] => {\n return [\n {\n id: 'date',\n header: () => (\n \n \n \n ),\n accessorKey: 'createdDate',\n cell: function Cell({ row }) {\n const { timeZone } = useSiteTimezoneContext();\n const curLocale = getLocaleFromLanguageOrCurrent();\n const formattedDate = formatInTimeZone(\n stringToUtcDate(row.original.createdDate),\n timeZone,\n 'yyyy/MM/dd hh:mm a',\n {\n locale: curLocale,\n }\n );\n return (\n \n {formattedDate}\n \n );\n },\n enableSorting: true,\n },\n {\n id: 'actions',\n enableSorting: false,\n header: () => (\n \n \n \n ),\n minSize: 50,\n maxSize: 50,\n cell: function Cell({ row: { original } }) {\n const onDownloadClick = useCallback(() => {\n downloadFileFromUrl(original.name, original.downloadUri);\n }, [original.downloadUri, original.name]);\n\n return (\n \n \n \n );\n },\n },\n ];\n};\n\nexport const ReportHistoryTable = ({\n reportSnapshotInfos,\n reportConfigId,\n\n initState,\n}: ReportHistoryTableProps) => {\n const [sorting, setSorting] = useState(\n initState?.sorting ?? [{ id: 'date', desc: true }]\n );\n const [{ pageIndex, pageSize }, setPagination] = useState({\n pageIndex: initState?.pagination?.pageIndex || 0,\n pageSize: PAGE_SIZE,\n });\n const pagination = useMemo(\n () => ({\n pageIndex,\n pageSize,\n }),\n [pageIndex, pageSize]\n );\n\n const reportHistoryText = useContent(ContentId.ReportHistory);\n const options: Partial> = useMemo(\n () => ({\n data: reportSnapshotInfos,\n columns: getHistorySnapshotTableColumnsConfig(reportConfigId),\n state: {\n pagination,\n sorting,\n },\n onPaginationChange: setPagination,\n onSortingChange: setSorting,\n }),\n [pagination, reportConfigId, reportSnapshotInfos, sorting]\n );\n\n return (\n <>\n {reportSnapshotInfos?.length ? (\n
    \n ) : (\n \n \n \n )}\n \n );\n};\n","import { useQuery, UseQueryResult } from '@tanstack/react-query';\nimport { useMemo } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { ReportClient, ReportSnapshotInfo } from 'src/WebApiController';\n\ninterface UseReportSnapshotInfoProps {\n reportConfigId: number | undefined;\n}\n\nexport const useFetchReportSnapshotsInfo = ({\n reportConfigId,\n}: UseReportSnapshotInfoProps): UseQueryResult<\n ReportSnapshotInfo[] | null,\n Error\n> => {\n const { showErrorDialog } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const reportClient = useMemo(\n () => new ReportClient(activeAccountWebClientConfig),\n [activeAccountWebClientConfig]\n );\n\n const queryKey = useMemo(\n () => ['reportSnapshotsInfo', reportConfigId],\n [reportConfigId]\n );\n\n // Query to get all report snapshots info\n return useQuery({\n queryKey,\n queryFn: async () => {\n return reportClient.getReportSnapshotInfos(reportConfigId);\n },\n\n enabled: !!reportConfigId,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n meta: {\n onError: (err: any) => {\n showErrorDialog('ReportClient.getReportSnapshotInfos', err, {\n trackErrorData: { reportConfigId },\n });\n },\n persist: true,\n },\n refetchOnWindowFocus: false,\n staleTime: Infinity, // We don't want useQuery to auto-refresh base on stale, we control our own refetch\n gcTime: 0, // we don't want to cache this data\n });\n};\n","import { ComponentProps } from 'react';\nimport { Modal as RSModal } from 'reactstrap';\nimport { Content } from 'src/contexts/ContentContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { ReportHistoryTable } from 'src/dialogs/ReportHistoryDialog/ReportHistoryTable';\nimport { useFetchReportSnapshotsInfo } from 'src/dialogs/ReportHistoryDialog/useFetchReportSnapshotsInfo';\nimport { ReportConfig } from 'src/hooks/useReportConfigs';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nexport type ReportHistoryDialog = {\n reportConfig: ReportConfig | undefined;\n} & ComponentProps;\n\nexport function ReportHistoryDialog({\n reportConfig,\n isOpen,\n onCancel,\n}: ReportHistoryDialog) {\n const reportId = reportConfig?.reportId;\n\n const { isFetching, data: reportSnapshotInfos } = useFetchReportSnapshotsInfo(\n {\n reportConfigId: reportId ?? undefined,\n }\n );\n\n if (!reportId) {\n return null;\n }\n\n return (\n }\n footer={null}\n isOpen={isOpen}\n onCancel={onCancel}\n >\n {isFetching ? (\n \n ) : (\n reportSnapshotInfos && (\n \n )\n )}\n \n );\n}\n","import { EventWithData } from 'src/WebApiController';\nimport { CatalogResults, ListingReportMetrics } from 'src/WebApiController';\n\nexport const mapReportMetrics = (\n reportMetrics: ListingReportMetrics[] | undefined,\n eventsTransformed: EventWithData[] | undefined,\n data: CatalogResults | undefined\n) => {\n const metricsMapped = reportMetrics?.map((r) => {\n const event = r.eventId\n ? eventsTransformed?.find(\n (e) =>\n e.event.viagId?.toString() === r.eventId ||\n e.event.mappingId === r.eventId\n )?.event\n : undefined;\n\n const performerId = r.perfId ?? event?.perfId;\n const performer = performerId ? data?.performers?.[performerId] : undefined;\n\n const venueId = r.venueId ?? event?.venueId;\n const venue = venueId ? data?.venues?.[venueId] : undefined;\n return {\n ...r,\n performer,\n venue,\n event,\n };\n });\n\n return metricsMapped;\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { once } from 'lodash-es';\nimport React, {\n PropsWithChildren,\n useCallback,\n useContext,\n useMemo,\n useState,\n} from 'react';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport {\n DATA_REFRESH_RATE_IN_MILLIS_LONG,\n MAX_NUM_OF_ITEMS_FOR_REPORT_VIEWS,\n} from 'src/utils/constants/constants';\nimport { QueryWithViewMode } from 'src/utils/eventQueryUtils';\nimport { getServerSideOnlyMetricsQuery } from 'src/utils/getServerSideOnlyMetricsQuery';\nimport {\n EntityWithTicketsQuery,\n Feature,\n ReportGroupBy,\n ReportMetricsBase,\n} from 'src/WebApiController';\n\nimport { useAppContext } from '../AppContext';\nimport { useCatalogDataContext } from '../CatalogDataContext';\nimport { useFilterQueryContext } from '../FilterQueryContext';\n\nexport type IReportMetricsContext = {\n hasTimeout?: boolean;\n hasUnknownError?: boolean;\n isLoading: boolean;\n isRefreshing?: boolean;\n reportMetrics?: TMetrics[];\n reportSummary?: TMetrics;\n totalCount?: number;\n refreshMetrics: (overrideMax: boolean) => void;\n isAllReportMetricsLoaded?: boolean;\n};\n\nexport const createReportMetricsContext = once(<\n TMetrics extends ReportMetricsBase,\n>() => React.createContext({} as IReportMetricsContext));\n\nexport function useReportMetricsContext() {\n return useContext(createReportMetricsContext());\n}\ntype ReportMetricsResponse = {\n metrics: TMetrics[];\n summary: TMetrics;\n totalCount: number;\n hasTimeout: boolean;\n hasUnknownError: boolean;\n};\n\nexport function ReportMetricsContextProvider<\n TMetrics extends ReportMetricsBase,\n TQuery extends EntityWithTicketsQuery & QueryWithViewMode,\n>({\n queryKey,\n getReportMetrics,\n groupBy,\n reportMetricsRequested,\n children,\n disabled,\n applyMaxRowLimitByDefault = true,\n}: PropsWithChildren<{\n queryKey: string;\n getReportMetrics?: (\n filterQuery: TQuery,\n groupBy: ReportGroupBy,\n reportMetricsRequested?: string[],\n maxResultSize?: number\n ) => Promise>;\n groupBy?: ReportGroupBy;\n reportMetricsRequested?: string[];\n disabled?: boolean;\n applyMaxRowLimitByDefault?: boolean;\n}>) {\n const ReportMetricsContext = createReportMetricsContext();\n\n const [reportConfigMaxSizeOverride, setReportConfigMaxSizeOverride] =\n useState(!applyMaxRowLimitByDefault);\n\n const hasMaxRowLimitFeature = useUserHasFeature(Feature.ReportMaxRowLimit);\n\n const { trackError } = useErrorBoundaryContext();\n\n const { isLoading, allEventIds } = useCatalogDataContext();\n const { filterQuery } = useFilterQueryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n\n // Removing the client-side queries\n const transformedQuery = getServerSideOnlyMetricsQuery(filterQuery) as TQuery;\n\n const shouldQuery =\n !disabled &&\n !(\n !getReportMetrics ||\n !transformedQuery ||\n !groupBy ||\n !activeAccountWebClientConfig.activeAccountId ||\n !allEventIds\n );\n const maxResultSize = useMemo(\n () =>\n // has no max row feature or has bypassed limit\n !hasMaxRowLimitFeature || reportConfigMaxSizeOverride\n ? undefined\n : MAX_NUM_OF_ITEMS_FOR_REPORT_VIEWS,\n [hasMaxRowLimitFeature, reportConfigMaxSizeOverride]\n );\n\n const reportMetricsQuery = useQuery({\n queryKey: [\n `${queryKey}-report-metrics`,\n transformedQuery,\n allEventIds,\n activeAccountWebClientConfig,\n groupBy,\n disabled,\n allEventIds == null,\n reportMetricsRequested,\n maxResultSize,\n ],\n queryFn: async () => {\n if (!shouldQuery) {\n return null;\n }\n\n const reportMetricsData = await getReportMetrics!(\n {\n ...transformedQuery,\n eventOrMappingIds: allEventIds.map((ev) => ev.viagVirtualId),\n performerIds: allEventIds\n .filter((ev) => ev.performerId != null)\n .map((ev) => ev.performerId!),\n venueIds: allEventIds.map((ev) => ev.venueId),\n },\n groupBy!,\n reportMetricsRequested,\n maxResultSize\n );\n\n return reportMetricsData;\n },\n\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n meta: {\n persist: !reportConfigMaxSizeOverride, // only persist if this is not a bypass max-size report\n\n onError: (error: ErrorTypes) => {\n trackError('getReportMetrics', error, {\n ...transformedQuery,\n eventIds: allEventIds,\n });\n },\n },\n refetchInterval: DATA_REFRESH_RATE_IN_MILLIS_LONG,\n });\n\n const refreshMetrics = useCallback(\n (overrideMax: boolean) => {\n if (reportConfigMaxSizeOverride !== overrideMax) {\n setReportConfigMaxSizeOverride(overrideMax);\n\n return; // we will let useQuery key-change do the re-query\n }\n\n // If we didn't update the overrideMax, just refetch the current result here\n reportMetricsQuery.refetch();\n },\n [reportConfigMaxSizeOverride, reportMetricsQuery]\n );\n\n const isAllReportMetricsLoaded =\n reportMetricsQuery.data?.totalCount != null &&\n reportMetricsQuery.data?.totalCount <=\n reportMetricsQuery.data?.metrics.length;\n\n return (\n \n {children}\n \n );\n}\n","import { ColumnDef } from '@tanstack/react-table';\nimport { createContext, PropsWithChildren, useContext, useMemo } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { ReportConfig } from 'src/hooks/useReportConfigs';\nimport { useTagsForEntityType } from 'src/hooks/useTagsForEntityType';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport {\n filterColumnsByFeatures,\n getListingReportColumnConfigById,\n} from 'src/utils/columns/columnUtils';\nimport { ListingReportTableColumnId } from 'src/utils/columns/inventory/inventoryColumnUtils.types';\nimport { CustomListingColumn } from 'src/utils/columns/inventory/inventoryCustomColumnUtils.types';\nimport { filterCustomColumnsForListingReport } from 'src/utils/columns/inventory/inventoryReportCustomColumnUtils';\nimport { ListingReportMetricsWithGroupBy } from 'src/utils/reportsUtils';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport { hasFeatures } from 'src/utils/userUtils';\nimport { ActionOutboxEntityType, UserSetting } from 'src/WebApiController';\n\nimport {\n customColumnDef,\n eventTagColumnDef,\n LISTING_REPORT_TABLE_COLUMNS_CONFIG,\n tagColumnDef,\n} from './configs/ListingReportTableColumnsConfig';\n\ntype ListingReportTableColumnDefContextType = {\n displayedColumnsConfig:\n | ColumnDef[]\n | undefined;\n isLoading?: boolean;\n};\n\nconst ListingReportTableColumnDefContext =\n createContext({\n displayedColumnsConfig: undefined,\n });\n\nexport const ListingReportTableColumnDefContextProvider = ({\n report,\n children,\n}: PropsWithChildren<{\n report: ReportConfig;\n}>) => {\n const { appContext, loginContext } = useAppContext();\n const { tagsMetadataNumeric, isLoading: listingTagIsLoading } =\n useTagsForEntityType(ActionOutboxEntityType.Listing, true);\n\n const { tagsMetadata: tagsMetadataEvent, isLoading: eventTagIsLoading } =\n useTagsForEntityType(ActionOutboxEntityType.SellerEvent, true);\n\n const {\n tagsMetadata: tagsMetadataPurchase,\n isLoading: purchaseTagIsLoading,\n } = useTagsForEntityType(ActionOutboxEntityType.Purchase, true);\n\n const { value: customListingColumns = [], isLoading: customColumnIsLoading } =\n useServerUserSetting({\n id: UserSetting.InventoryCustomColumns,\n });\n\n const customListingColumnsFiltered = filterCustomColumnsForListingReport(\n customListingColumns,\n tagsMetadataNumeric\n );\n\n const displayedColumnsConfig = useMemo(() => {\n const columns = new Set([\n // Add unconfigurable columns first\n ...Object.values(LISTING_REPORT_TABLE_COLUMNS_CONFIG)\n .filter((column) => {\n const columnDef = getListingReportColumnConfigById(\n column.id as ListingReportTableColumnId\n ).personalization;\n const hasFeatureForColumn =\n columnDef.requiredFeatures.length === 0 ||\n hasFeatures(\n loginContext?.user,\n appContext?.features,\n columnDef.requiredFeatures\n );\n\n return !columnDef.isConfigurable && hasFeatureForColumn;\n })\n .map((item) => item.id as ListingReportTableColumnId),\n // Add user defined columns next\n ...filterColumnsByFeatures(\n report.metrics,\n SectionType.ListingsReport,\n customListingColumnsFiltered,\n loginContext?.user,\n appContext?.features,\n tagsMetadataNumeric,\n report.groupBy\n ),\n ]);\n\n return Array.from(columns).reduce<\n ColumnDef[]\n >((acc, columnId) => {\n if (tagsMetadataNumeric?.find((t) => t.key === columnId)) {\n acc.push(tagColumnDef(columnId));\n } else if (tagsMetadataPurchase?.find((t) => t.key === columnId)) {\n acc.push(tagColumnDef(columnId));\n } else if (tagsMetadataEvent?.find((t) => t.key === columnId)) {\n acc.push(eventTagColumnDef(columnId));\n } else if (customListingColumnsFiltered.find((c) => c.id === columnId)) {\n acc.push(\n customColumnDef(\n columnId,\n customListingColumnsFiltered.find((c) => c.id === columnId)?.formula\n )\n );\n } else {\n const columnConfig = Object.values(\n LISTING_REPORT_TABLE_COLUMNS_CONFIG\n ).find((column) => column.id === columnId);\n if (columnConfig)\n acc.push(\n columnConfig as ColumnDef\n );\n }\n\n return acc;\n }, []);\n }, [\n appContext?.features,\n customListingColumnsFiltered,\n loginContext?.user,\n report.groupBy,\n report.metrics,\n tagsMetadataEvent,\n tagsMetadataNumeric,\n tagsMetadataPurchase,\n ]);\n\n const isLoading =\n listingTagIsLoading ||\n eventTagIsLoading ||\n purchaseTagIsLoading ||\n customColumnIsLoading;\n\n return (\n \n {children}\n \n );\n};\n\nexport const useListingReportTableColumnDef = () =>\n useContext(ListingReportTableColumnDefContext);\n","import { PropsWithChildren, useCallback, useMemo } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { CatalogDataContextProvider } from 'src/contexts/CatalogDataContext';\nimport { FilterQueryContextProvider } from 'src/contexts/FilterQueryContext';\nimport { ReportMetricsContextProvider } from 'src/contexts/ReportMetricsContext';\nimport { ReportConfig } from 'src/hooks/useReportConfigs';\nimport { isMetricConfigurableByGroupBy } from 'src/utils/columns/inventory/inventoryColumnUtils';\nimport {\n DefaultListingQuery,\n EmptyListingQuery,\n} from 'src/utils/eventQueryUtils';\nimport { transformData } from 'src/utils/eventWithDataUtils';\nimport {\n isReportFilterOverriden,\n listingMetricsToReportMetricRequest,\n} from 'src/utils/reportsUtils';\nimport {\n ActionOutboxEntityType,\n ListingQuery,\n ListingReportMetricColumn,\n ListingReportMetrics,\n ReportClient,\n ReportGroupBy,\n UserSetting,\n} from 'src/WebApiController';\n\nimport { getCatalogData } from '../Inventory';\n\nexport function ReportsInventoryContextProvider({\n reportConfig,\n children,\n applyMaxRowLimitByDefault = true,\n}: PropsWithChildren<{\n reportConfig: ReportConfig;\n applyMaxRowLimitByDefault?: boolean;\n}>) {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const reportMetricsRequested = useMemo(() => {\n return reportConfig.metrics\n .filter((m) => isMetricConfigurableByGroupBy(m, reportConfig.groupBy))\n .map((metric) => listingMetricsToReportMetricRequest(metric))\n .filter((m) => !!m) as string[];\n }, [reportConfig.metrics, reportConfig.groupBy]);\n\n const getReportMetrics = useCallback(\n (\n filterQuery: ListingQuery,\n groupBy: ReportGroupBy,\n reportMetricsRequested?: string[],\n maxResultSize?: number\n ) => {\n return new ReportClient(\n activeAccountWebClientConfig\n ).getListingReportMetrics(\n {\n query: filterQuery,\n groupBy,\n globalReportTypeId: reportConfig.globalReportTypeId,\n isUsingFilterOverride:\n reportConfig.hasFilterOverride ||\n isReportFilterOverriden(filterQuery, reportConfig.filter),\n listingReportMetricsRequested:\n reportMetricsRequested as ListingReportMetricColumn[],\n },\n maxResultSize\n );\n },\n [\n activeAccountWebClientConfig,\n reportConfig.filter,\n reportConfig.globalReportTypeId,\n reportConfig.hasFilterOverride,\n ]\n );\n\n return (\n \n initialQuery={\n (reportConfig.filter as ListingQuery) ?? DefaultListingQuery\n }\n emptyQuery={EmptyListingQuery}\n viewModeSettingId={UserSetting.InventoryPageViewMode}\n >\n \n entityType={ActionOutboxEntityType.Listing}\n queryKey=\"getCatalogForListing\"\n getCatalogData={(c, f) => getCatalogData(c, f, false)}\n transformEventData={transformData}\n >\n \n queryKey=\"getReportListingMetrics\"\n getReportMetrics={getReportMetrics}\n groupBy={reportConfig.groupBy}\n reportMetricsRequested={reportMetricsRequested}\n applyMaxRowLimitByDefault={applyMaxRowLimitByDefault}\n >\n {children}\n \n \n \n );\n}\n","import { ColumnDef, Row } from '@tanstack/react-table';\nimport { format } from 'date-fns';\nimport { jsPDF } from 'jspdf';\nimport autoTable from 'jspdf-autotable';\nimport { uniq } from 'lodash-es';\nimport { ReportConfig } from 'src/hooks/useReportConfigs';\nimport { getUserDisplayName, UseGetUserInfo } from 'src/hooks/userGetUserInfo';\nimport { formatPercent } from 'src/utils/numberFormatter';\nimport {\n Money,\n PurchaseBuyerInfo,\n ReportFileType,\n UiMoney,\n} from 'src/WebApiController';\nimport * as XLSX from 'xlsx';\n\nimport { AccessorReturn, AccessorReturnType } from './ReportsExport.types';\n\nexport function sortReportMetrics(\n a: T,\n b: T,\n sortByColumnConfig: ColumnDef | undefined,\n isSortDescending: boolean\n) {\n if (sortByColumnConfig) {\n let result = 0;\n // @ts-expect-error accessorFn is available\n const aVal = sortByColumnConfig.accessorFn(a);\n // @ts-expect-error accessorFn is available\n const bVal = sortByColumnConfig.accessorFn(b);\n if (aVal === bVal) {\n result = 0;\n } else if (aVal == null) {\n result = 1;\n } else if (bVal == null) {\n result = -1;\n } else if (\n sortByColumnConfig.sortingFn &&\n typeof sortByColumnConfig.sortingFn === 'function'\n ) {\n result = sortByColumnConfig.sortingFn(\n { getValue: () => aVal } as unknown as Row,\n { getValue: () => bVal } as unknown as Row,\n sortByColumnConfig.id ?? ''\n );\n } else if (typeof aVal === 'string' && typeof bVal === 'string') {\n result = aVal.localeCompare(bVal);\n } else {\n result = aVal > bVal ? 1 : -1;\n }\n\n return isSortDescending ? -result : result;\n }\n return 0;\n}\n\nexport function mapReportMetricToUserIds(\n reportMetric: T,\n displayedColumnsConfig: ColumnDef[]\n) {\n const userIds: string[] = [];\n\n displayedColumnsConfig.forEach((column) => {\n // @ts-expect-error accessorFn is available\n const value = column.accessorFn(reportMetric) as unknown;\n\n if (\n (value as AccessorReturn)?.stringValueType ===\n AccessorReturnType.SELLER_USER_ID\n ) {\n const stringValues =\n (value as AccessorReturn).stringValues ??\n ((value as AccessorReturn).value as\n | string[]\n | string\n | null\n | undefined);\n\n if (typeof stringValues === 'string' && stringValues) {\n userIds.push(stringValues);\n } else if (Array.isArray(stringValues)) {\n userIds.push(...stringValues);\n }\n } else if (\n (value as AccessorReturn)?.stringValueType ===\n AccessorReturnType.PURCHASE_BUYER_INFOS\n ) {\n const buyerInfos = (\n value as AccessorReturn\n ).value;\n\n userIds.push(...(buyerInfos?.map((bi) => bi.buyerUserId) ?? []));\n }\n });\n\n return uniq(userIds);\n}\n\n// The underlying value from the table cell is seller user id -\n// we need to retrieve the display name from the user info\n// we already have all user info in the context, just need to match them\nfunction resolveSellerUserId(\n value: AccessorReturn,\n allActiveUserInfos?: Record,\n deactivatedText?: string\n): string | undefined {\n const stringValues =\n (value as AccessorReturn).stringValues ??\n ((value as AccessorReturn).value as\n | string[]\n | string\n | null\n | undefined);\n\n const stringValueList = [];\n if (typeof stringValues === 'string' && stringValues) {\n stringValueList.push(stringValues);\n } else if (Array.isArray(stringValues)) {\n stringValueList.push(...stringValues);\n }\n\n if (!stringValueList.length) {\n return;\n }\n\n return stringValueList\n .map((userId) =>\n allActiveUserInfos?.[userId]\n ? getUserDisplayName(allActiveUserInfos[userId], deactivatedText)\n : undefined\n )\n .filter((name) => name != null)\n .join(', ');\n}\n\nfunction resolvePurchaseBuyerInfos(\n value: AccessorReturn,\n allActiveUserInfos?: Record,\n deactivatedText?: string\n): string | undefined {\n const buyerInfos = (value as AccessorReturn)\n .value;\n\n if (!buyerInfos?.length) {\n return;\n }\n\n return buyerInfos\n .map((bi) => {\n const userId = bi.buyerUserId;\n if (!allActiveUserInfos?.[userId]) {\n return undefined;\n }\n\n let displayString = getUserDisplayName(\n allActiveUserInfos[userId],\n deactivatedText\n );\n\n if (bi.averageBuyerCommissionPercent) {\n displayString += ` (${formatPercent(\n bi.averageBuyerCommissionPercent,\n 2\n )})`;\n }\n\n return displayString;\n })\n .filter((name) => name != null)\n .join(', ');\n}\n\nexport function mapReportMetricToTableString(\n reportMetric: T,\n displayedColumnsConfig: ColumnDef[],\n allActiveUserInfos?: Record,\n deactivatedText?: string\n) {\n const row = displayedColumnsConfig.map((column) => {\n // @ts-expect-error error complains that `accessorFn` does not exist, but actually it does\n let value = column.accessorFn(reportMetric) as unknown;\n\n if ((value as UiMoney)?.disp != null) {\n // UiMoney type\n value = (value as UiMoney).disp;\n } else if ((value as Money)?.display != null) {\n // Money type\n value = (value as Money).display;\n } else if (\n (value as AccessorReturn)?.stringValueType ===\n AccessorReturnType.SELLER_USER_ID\n ) {\n // Seller user id\n value = resolveSellerUserId(\n value as AccessorReturn,\n allActiveUserInfos,\n deactivatedText\n );\n } else if (\n (value as AccessorReturn)?.stringValueType ===\n AccessorReturnType.PURCHASE_BUYER_INFOS\n ) {\n // Purchase buyer infos\n value = resolvePurchaseBuyerInfos(\n value as AccessorReturn,\n allActiveUserInfos,\n deactivatedText\n );\n } else if (\n (value as AccessorReturn)?.stringValueType ===\n AccessorReturnType.STRING\n ) {\n value = (value as AccessorReturn).stringValues;\n }\n\n let stringValue = value != null ? value.toString() : '';\n // Floating point number: hardcode to 2 decimal places for now\n if (\n stringValue &&\n stringValue?.includes('.') &&\n !isNaN(parseFloat(stringValue))\n ) {\n if (parseInt(stringValue) !== parseFloat(stringValue)) {\n stringValue = parseFloat(stringValue).toFixed(2);\n }\n }\n\n return stringValue;\n });\n\n return row;\n}\n\nexport const getPdfPageSize = (columnCount: number) => {\n return columnCount > 25\n ? 'a0'\n : columnCount > 15\n ? 'a2'\n : columnCount > 9\n ? 'a3'\n : 'a4';\n};\n\nexport const getReportExportFileBasename = (reportName: string) => {\n const now = new Date();\n\n return `${reportName.replace(/\\s/g, '_')}_${format(now, 'yyyy-MM-dd')}`;\n};\n\nexport const exportReport = (\n report: ReportConfig,\n fileType: ReportFileType,\n tableHeader: string[],\n tableData: string[][],\n tableFoot: string[]\n) => {\n if (fileType === ReportFileType.PDF) {\n const doc = new jsPDF(\n 'landscape',\n 'mm',\n getPdfPageSize(report.metrics.length)\n );\n autoTable(doc, {\n head: [tableHeader],\n body: tableData,\n foot: [tableFoot],\n theme: 'striped',\n margin: 5,\n styles: {\n fontSize: 8,\n },\n });\n doc.save(`${getReportExportFileBasename(report.reportName)}.pdf`);\n } else if (\n fileType === ReportFileType.CSV ||\n fileType === ReportFileType.XLSX\n ) {\n const aoa = [tableHeader, ...tableData, tableFoot];\n const workbook = XLSX.utils.book_new();\n const worksheet = XLSX.utils.aoa_to_sheet(aoa);\n XLSX.utils.book_append_sheet(workbook, worksheet, 'Sheet1');\n if (fileType === ReportFileType.CSV) {\n XLSX.writeFile(\n workbook,\n `${getReportExportFileBasename(report.reportName)}.csv`,\n { bookType: 'csv' }\n );\n } else if (fileType === ReportFileType.XLSX) {\n XLSX.writeFileXLSX(\n workbook,\n `${getReportExportFileBasename(report.reportName)}.xlsx`\n );\n }\n } else {\n console.warn('Unsupported file type', fileType);\n }\n};\n","import { uniq } from 'lodash-es';\nimport { useEffect, useMemo } from 'react';\nimport { mapReportMetrics } from 'src/components/ReportsInventoryPage/ReportsInventoryPage.utils';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { useContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { useReportMetricsContext } from 'src/contexts/ReportMetricsContext';\nimport { useGetUserInfos } from 'src/hooks/userGetUserInfo';\nimport { useColumnDisplayName } from 'src/modals/InventoryTableColumns/useColumnDisplayName';\nimport {\n ListingReportTableColumnDefContextProvider,\n useListingReportTableColumnDef,\n} from 'src/tables/ListingTable/ListingReportTableColumnDefContext';\nimport { isMetricConfigurableByGroupBy } from 'src/utils/columns/inventory/inventoryColumnUtils';\nimport { GROUP_BY_TO_PRIMARY_COLUMN_ID } from 'src/utils/columns/inventory/inventoryColumnUtils.constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { QueryWithViewMode } from 'src/utils/eventQueryUtils';\nimport { downloadFileFromBlob } from 'src/utils/fileUtils';\nimport {\n isReportFilterOverriden,\n listingMetricsToReportMetricRequest,\n ListingReportMetricsWithGroupBy,\n} from 'src/utils/reportsUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport {\n EntityWithTicketsQuery,\n ListingQuery,\n ListingReportMetricColumn,\n ListingReportMetrics,\n ReportClient,\n} from 'src/WebApiController';\n\nimport { ReportsInventoryContextProvider } from '../../../navigations/Routes/ReportsInventory/ReportsInventoryContextProvider';\nimport { ReportExportOptions } from './ReportsExport.types';\nimport {\n exportReport,\n getReportExportFileBasename,\n mapReportMetricToTableString,\n mapReportMetricToUserIds,\n sortReportMetrics,\n} from './ReportsExport.utils';\n\nexport function ReportsInventoryExport({\n reportExportOptions,\n onReportExported,\n}: {\n reportExportOptions: ReportExportOptions | null;\n onReportExported: () => void;\n}) {\n // Loading report metrics depend on the context provider (need to wait for the context provider to load the report metrics)\n\n // If reportToExport is null,\n // no reports need to be exported, so not rendering the \n {reportExportOptions?.serverSideExport ? (\n \n ) : (\n \n \n \n )}\n \n );\n}\n\nfunction ReportsListingServerSideExportInner({\n reportExportOptions: { reportToExport: reportConfig, fileType },\n onReportExported,\n}: {\n reportExportOptions: ReportExportOptions;\n onReportExported: () => void;\n}) {\n const { activeAccountWebClientConfig } = useAppContext();\n const { allEventIds } = useCatalogDataContext();\n const { filterQuery } = useFilterQueryContext<\n EntityWithTicketsQuery & QueryWithViewMode\n >();\n const { trackError } = useErrorBoundaryContext();\n\n const reportMetricsRequested = useMemo(() => {\n return reportConfig.metrics\n .filter((m) => isMetricConfigurableByGroupBy(m, reportConfig.groupBy))\n .map((metric) => listingMetricsToReportMetricRequest(metric))\n .filter((m) => !!m) as string[];\n }, [reportConfig.metrics, reportConfig.groupBy]);\n\n const downloadReport = async () => {\n await tryInvokeApi(\n async () => {\n const result = await new ReportClient(\n activeAccountWebClientConfig\n ).downloadListingReportMetrics({\n query: {\n ...(reportConfig.filter as ListingQuery),\n eventOrMappingIds: allEventIds!.map((ev) => ev.viagVirtualId),\n performerIds: allEventIds!\n .filter((ev) => ev.performerId != null)\n .map((ev) => ev.performerId!),\n venueIds: allEventIds!.map((ev) => ev.venueId),\n },\n groupBy: reportConfig.groupBy,\n globalReportTypeId: reportConfig.globalReportTypeId,\n metrics: reportConfig.metrics,\n isUsingFilterOverride:\n reportConfig.hasFilterOverride ||\n isReportFilterOverriden(filterQuery, reportConfig.filter),\n fileType,\n listingReportMetricsRequested:\n reportMetricsRequested as ListingReportMetricColumn[],\n });\n\n if (result.data) {\n downloadFileFromBlob(\n `${getReportExportFileBasename(\n reportConfig.reportName\n )}.${fileType.toLowerCase()}`,\n result.data\n );\n }\n },\n (error) => {\n trackError('ReportClient.downloadListingReportMetrics', error);\n },\n () => onReportExported()\n );\n };\n\n useEffect(() => {\n if (allEventIds != null) {\n downloadReport();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [allEventIds]);\n\n return <>;\n}\n\nfunction ReportsInventoryClientSideExportInner({\n reportExportOptions: { reportToExport: reportConfig, fileType },\n onReportExported,\n}: {\n reportExportOptions: ReportExportOptions;\n onReportExported: () => void;\n}) {\n const { reportMetrics, isLoading, reportSummary } =\n useReportMetricsContext();\n const { data, eventsTransformed } = useCatalogDataContext();\n const { displayedColumnsConfig } = useListingReportTableColumnDef();\n const { displayNames: columnDisplayNames } = useColumnDisplayName({\n columnIds: reportConfig.metrics,\n sectionType: SectionType.ListingsReport,\n });\n const deactivatedText = useContent(ContentId.Deactivated);\n\n const reportMetricsMapped: ListingReportMetricsWithGroupBy[] | undefined =\n useMemo(() => {\n if (!isLoading) {\n return mapReportMetrics(reportMetrics, eventsTransformed, data);\n }\n }, [data, eventsTransformed, isLoading, reportMetrics]);\n\n const userIds = useMemo(() => {\n if (!reportMetricsMapped || !displayedColumnsConfig?.length) {\n return undefined;\n }\n\n const userIds: string[] = [];\n\n reportMetricsMapped.forEach((reportMetric) => {\n const userIdsInRow = mapReportMetricToUserIds(\n reportMetric,\n displayedColumnsConfig\n );\n userIds.push(...userIdsInRow);\n });\n\n return uniq(userIds);\n }, [displayedColumnsConfig, reportMetricsMapped]);\n\n const useGetUserInfosQuery = useGetUserInfos(userIds);\n\n const allActiveUserInfos = useMemo(() => {\n if (userIds != null && userIds.length === 0) {\n return {};\n }\n return useGetUserInfosQuery.data;\n }, [useGetUserInfosQuery.data, userIds]);\n\n // Main data to be exported\n const tableData = useMemo(() => {\n if (\n !reportMetricsMapped ||\n !displayedColumnsConfig?.length ||\n !allActiveUserInfos ||\n !deactivatedText\n ) {\n return undefined;\n }\n\n const result: string[][] = [];\n\n const sortBy =\n reportConfig.sortBy ??\n GROUP_BY_TO_PRIMARY_COLUMN_ID[reportConfig.groupBy];\n const sortByColumnConfig = displayedColumnsConfig.find(\n (c) => c.id === sortBy\n );\n\n const dataSorted = reportMetricsMapped.toSorted((a, b) =>\n sortReportMetrics(\n a,\n b,\n sortByColumnConfig,\n reportConfig.isSortDescending ?? false\n )\n );\n\n dataSorted.forEach((reportMetric) => {\n const row = mapReportMetricToTableString(\n reportMetric,\n displayedColumnsConfig,\n allActiveUserInfos,\n deactivatedText\n );\n result.push(row);\n });\n\n return result;\n }, [\n allActiveUserInfos,\n deactivatedText,\n displayedColumnsConfig,\n reportConfig.groupBy,\n reportConfig.isSortDescending,\n reportConfig.sortBy,\n reportMetricsMapped,\n ]);\n\n // Summary data\n const tableFoot = useMemo(() => {\n if (\n !reportSummary ||\n !displayedColumnsConfig?.length ||\n !allActiveUserInfos\n ) {\n return undefined;\n }\n\n const dataMapped = mapReportMetrics(\n [reportSummary],\n eventsTransformed,\n data\n );\n\n if (dataMapped?.length) {\n return mapReportMetricToTableString(\n dataMapped[0],\n displayedColumnsConfig,\n allActiveUserInfos\n );\n }\n }, [\n allActiveUserInfos,\n data,\n displayedColumnsConfig,\n eventsTransformed,\n reportSummary,\n ]);\n\n // Table header\n const tableHeader = useMemo(() => {\n if (!columnDisplayNames.length || !displayedColumnsConfig) {\n return undefined;\n }\n\n return displayedColumnsConfig.map((c) => {\n const index = reportConfig.metrics.indexOf(c.id ?? '');\n if (index < 0) {\n return '';\n }\n return columnDisplayNames[index];\n });\n }, [columnDisplayNames, displayedColumnsConfig, reportConfig.metrics]);\n\n const onDataLoaded = (\n tableHeader: string[],\n tableData: string[][],\n tableFoot: string[]\n ) => {\n if (tableData.length > 0) {\n exportReport(reportConfig, fileType, tableHeader, tableData, tableFoot);\n }\n\n onReportExported();\n };\n\n useEffect(() => {\n if (\n data != null &&\n eventsTransformed != null &&\n tableData != null &&\n tableHeader != null &&\n tableFoot != null\n ) {\n onDataLoaded(tableHeader, tableData, tableFoot);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [tableData, tableHeader, tableFoot]);\n\n return <>;\n}\n","import { cloneDeep } from 'lodash-es';\nimport { ReportConfig } from 'src/hooks/useReportConfigs';\nimport {\n ArTimeBucketWithData,\n SaleReportMetricsWithGroupBy,\n} from 'src/utils/reportsUtils';\nimport { addMoneySameCurrency } from 'src/utils/ticketMetricUtils';\nimport { EventWithData } from 'src/WebApiController';\nimport {\n CatalogResults,\n Marketplace,\n ReportGroupBy,\n SaleReportMetrics,\n} from 'src/WebApiController';\n\nexport const mapReportMetrics = (\n reportMetrics: SaleReportMetrics[] | undefined,\n eventsTransformed: EventWithData[] | undefined,\n data: CatalogResults | undefined\n): SaleReportMetricsWithGroupBy[] | undefined => {\n const isArAgingReport =\n reportMetrics != null && reportMetrics.every((r) => r.timeBkt != null);\n\n const getGroupByData = (r: SaleReportMetrics) => {\n const event = r.eventId\n ? eventsTransformed?.find(\n (e) =>\n e.event.viagId?.toString() === r.eventId ||\n e.event.mappingId === r.eventId\n )?.event\n : undefined;\n\n const performerId = r.perfId ?? event?.perfId;\n const performer = performerId ? data?.performers?.[performerId] : undefined;\n\n const venueId = r.venueId ?? event?.venueId;\n const venue = venueId ? data?.venues?.[venueId] : undefined;\n\n return { event, performer, venue };\n };\n\n let metricsMapped: SaleReportMetricsWithGroupBy[] | undefined;\n\n // For now assume that metrics are grouped by marketplace\n if (isArAgingReport) {\n // Group by marketplace, then reduce to get the timeBucketsWithData\n const metricsByMarketplace = reportMetrics.reduce(\n (acc, r) => {\n const key = r.mkp!;\n const existing = acc[key] ?? [];\n return {\n ...acc,\n [key]: [...existing, r],\n };\n },\n {} as Record\n );\n\n metricsMapped = Object.values(metricsByMarketplace).map((metrics) => {\n const timeBucketsWithData = metrics.reduce((acc, r) => {\n return [\n ...acc,\n {\n timeBkt: r.timeBkt!,\n ttlOutsBal: r.ttlOutsBal!,\n },\n ];\n }, [] as ArTimeBucketWithData[]);\n\n const { event, performer, venue } = getGroupByData(metrics[0]);\n return {\n ...metrics[0],\n performer,\n venue,\n event,\n timeBucketsWithData,\n } as SaleReportMetricsWithGroupBy;\n });\n } else {\n metricsMapped = reportMetrics?.map((r) => {\n const { event, performer, venue } = getGroupByData(r);\n\n return {\n ...r,\n performer,\n venue,\n event,\n } as SaleReportMetricsWithGroupBy;\n });\n }\n\n return metricsMapped;\n};\n\nexport const mapReportMetricsSummary = (\n reportConfig: ReportConfig,\n reportSummary: SaleReportMetrics | undefined,\n reportMetricsMapped: SaleReportMetricsWithGroupBy[] | undefined\n): SaleReportMetricsWithGroupBy | undefined => {\n if (reportConfig.groupBy !== ReportGroupBy.ArAgingMarketplace) {\n return reportSummary as SaleReportMetricsWithGroupBy;\n }\n\n const timeBucketsWithData = reportMetricsMapped?.reduce((acc, metric) => {\n if (acc.length === 0) {\n acc.push(...cloneDeep(metric.timeBucketsWithData!));\n return acc;\n }\n\n metric.timeBucketsWithData?.forEach((d) => {\n const existingIndex = acc.findIndex(\n (a) =>\n a.timeBkt?.relativeEndSecs === d.timeBkt?.relativeEndSecs &&\n a.timeBkt?.relativeStartSecs === d.timeBkt?.relativeStartSecs\n );\n if (existingIndex !== -1) {\n acc[existingIndex].ttlOutsBal = addMoneySameCurrency(\n acc[existingIndex].ttlOutsBal,\n d.ttlOutsBal,\n undefined,\n undefined\n )!;\n } else {\n acc.push(d);\n }\n });\n\n return acc;\n }, [] as ArTimeBucketWithData[]);\n\n return {\n ...reportSummary,\n timeBucketsWithData,\n } as SaleReportMetricsWithGroupBy;\n};\n","import { ColumnDef } from '@tanstack/react-table';\nimport { createContext, PropsWithChildren, useContext, useMemo } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { ReportConfig } from 'src/hooks/useReportConfigs';\nimport { useTagsForEntityType } from 'src/hooks/useTagsForEntityType';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport {\n filterColumnsByFeatures,\n getSaleReportColumnConfigById,\n} from 'src/utils/columns/columnUtils';\nimport { filterCustomColumnsForSale } from 'src/utils/columns/sales/salesCustomColumnUtils';\nimport { CustomSalesColumn } from 'src/utils/columns/sales/salesCustomColumnUtils.types';\nimport { SaleReportMetricsWithGroupBy } from 'src/utils/reportsUtils';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport { hasFeatures } from 'src/utils/userUtils';\nimport {\n ActionOutboxEntityType,\n ReportGroupBy,\n UserSetting,\n} from 'src/WebApiController';\n\nimport { SalesReportTableColumnId } from '../../utils/columns/sales/salesColumnUtils.types';\nimport {\n arTimeBucketColumnDef,\n customColumnDef,\n eventTagColumnDef,\n SALE_REPORT_TABLE_COLUMNS_CONFIG,\n tagColumnDef,\n} from './configs/SaleReportTableColumnsConfig';\n\ntype SaleReportTableColumnDefContextType = {\n displayedColumnsConfig:\n | ColumnDef[]\n | undefined;\n isLoading?: boolean;\n};\n\nconst SaleReportTableColumnDefContext =\n createContext({\n displayedColumnsConfig: undefined,\n });\n\nexport const SaleReportTableColumnDefContextProvider = ({\n report,\n children,\n}: PropsWithChildren<{\n report: ReportConfig;\n}>) => {\n const { appContext, loginContext } = useAppContext();\n const { tagsMetadataNumeric, isLoading: saleTagIsLoading } =\n useTagsForEntityType(ActionOutboxEntityType.Sale, true);\n\n const { tagsMetadata: tagsMetadataEvent, isLoading: eventTagIsLoading } =\n useTagsForEntityType(ActionOutboxEntityType.SellerEvent, true);\n\n const { value: customSaleColumns = [], isLoading: customColumnIsLoading } =\n useServerUserSetting({\n id: UserSetting.SaleCustomColumns,\n });\n\n const customSaleColumnsFiltered = filterCustomColumnsForSale(\n customSaleColumns,\n tagsMetadataNumeric\n );\n\n const displayedColumnsConfig = useMemo(() => {\n const columns = new Set([\n // Add unconfigurable columns first\n ...Object.values(SALE_REPORT_TABLE_COLUMNS_CONFIG)\n .filter((column) => {\n const columnDef = getSaleReportColumnConfigById(\n column.id as SalesReportTableColumnId\n ).personalization;\n const hasFeatureForColumn =\n columnDef.requiredFeatures.length === 0 ||\n hasFeatures(\n loginContext?.user,\n appContext?.features,\n columnDef.requiredFeatures\n );\n return !columnDef.isConfigurable && hasFeatureForColumn;\n })\n .map((item) => item.id as SalesReportTableColumnId),\n // Add user defined columns next\n ...filterColumnsByFeatures(\n report.metrics,\n SectionType.SalesReport,\n customSaleColumnsFiltered,\n loginContext?.user,\n appContext?.features,\n tagsMetadataNumeric,\n report.groupBy\n ),\n ]);\n\n const displayedColumns = Array.from(columns).reduce<\n ColumnDef[]\n >((acc, columnId) => {\n if (tagsMetadataNumeric?.find((t) => t.key === columnId)) {\n acc.push(tagColumnDef(columnId));\n } else if (tagsMetadataEvent?.find((t) => t.key === columnId)) {\n acc.push(eventTagColumnDef(columnId));\n } else if (customSaleColumnsFiltered.find((c) => c.id === columnId)) {\n acc.push(\n customColumnDef(\n columnId,\n customSaleColumnsFiltered.find((c) => c.id === columnId)?.formula\n )\n );\n } else {\n const columnConfig = Object.values(\n SALE_REPORT_TABLE_COLUMNS_CONFIG\n ).find((column) => column.id === columnId);\n if (columnConfig)\n acc.push(\n columnConfig as ColumnDef\n );\n }\n\n return acc;\n }, []);\n\n // Add time bucket columns for AR Aging reports\n if (report.groupBy === ReportGroupBy.ArAgingMarketplace) {\n report.arAgingTimeBuckets?.forEach((bucket) => {\n displayedColumns.push(arTimeBucketColumnDef(bucket));\n });\n }\n\n return displayedColumns;\n }, [\n appContext?.features,\n customSaleColumnsFiltered,\n loginContext?.user,\n report.arAgingTimeBuckets,\n report.groupBy,\n report.metrics,\n tagsMetadataEvent,\n tagsMetadataNumeric,\n ]);\n\n const isLoading =\n saleTagIsLoading || eventTagIsLoading || customColumnIsLoading;\n\n return (\n \n {children}\n \n );\n};\n\nexport const useSaleReportTableColumnDef = () =>\n useContext(SaleReportTableColumnDefContext);\n","import { PropsWithChildren, useCallback } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { CatalogDataContextProvider } from 'src/contexts/CatalogDataContext';\nimport { FilterQueryContextProvider } from 'src/contexts/FilterQueryContext';\nimport { ReportMetricsContextProvider } from 'src/contexts/ReportMetricsContext';\nimport { ReportConfig } from 'src/hooks/useReportConfigs';\nimport { DefaultSaleQuery, EmptySaleQuery } from 'src/utils/eventQueryUtils';\nimport { transformData } from 'src/utils/eventWithDataUtils';\nimport { isReportFilterOverriden } from 'src/utils/reportsUtils';\nimport {\n ActionOutboxEntityType,\n ReportClient,\n ReportGroupBy,\n SaleQuery,\n SaleReportMetrics,\n UserSetting,\n} from 'src/WebApiController';\n\nimport { getCatalogData } from '../Sales';\n\nexport function ReportsSaleContextProvider({\n reportConfig,\n children,\n applyMaxRowLimitByDefault = true,\n}: PropsWithChildren<{\n reportConfig: ReportConfig;\n applyMaxRowLimitByDefault?: boolean;\n}>) {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const getReportMetrics = useCallback(\n (\n filterQuery: SaleQuery,\n groupBy: ReportGroupBy,\n maxResultSize?: number\n ) => {\n return new ReportClient(\n activeAccountWebClientConfig\n ).getSaleReportMetrics(\n {\n query: filterQuery,\n groupBy,\n globalReportTypeId: reportConfig.globalReportTypeId,\n isUsingFilterOverride:\n reportConfig.hasFilterOverride ||\n isReportFilterOverriden(filterQuery, reportConfig.filter),\n arAgingTimeBuckets: reportConfig.arAgingTimeBuckets ?? [],\n },\n maxResultSize\n );\n },\n [\n activeAccountWebClientConfig,\n reportConfig.arAgingTimeBuckets,\n reportConfig.filter,\n reportConfig.globalReportTypeId,\n reportConfig.hasFilterOverride,\n ]\n );\n\n return (\n \n initialQuery={(reportConfig.filter as SaleQuery) ?? DefaultSaleQuery}\n emptyQuery={EmptySaleQuery}\n loadQueryFromUrl={false}\n viewModeSettingId={UserSetting.SalePageViewMode}\n >\n \n entityType={ActionOutboxEntityType.Sale}\n queryKey=\"getCatalogForSale\"\n getCatalogData={(c, f) => getCatalogData(c, f, false)}\n transformEventData={transformData}\n >\n \n queryKey=\"getReportSaleMetrics\"\n getReportMetrics={(f, g, _, m) => getReportMetrics(f, g, m)}\n groupBy={reportConfig.groupBy}\n applyMaxRowLimitByDefault={applyMaxRowLimitByDefault}\n >\n {children}\n \n \n \n );\n}\n","import { uniq } from 'lodash-es';\nimport { useEffect, useMemo } from 'react';\nimport {\n mapReportMetrics,\n mapReportMetricsSummary,\n} from 'src/components/ReportsSalePage/ReportsSalePage.utils';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { useContent } from 'src/contexts/ContentContext/Content';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { useReportMetricsContext } from 'src/contexts/ReportMetricsContext';\nimport { useGetUserInfos } from 'src/hooks/userGetUserInfo';\nimport { useColumnDisplayName } from 'src/modals/InventoryTableColumns/useColumnDisplayName';\nimport {\n timeBucketToColumnId,\n timeBucketToDayString,\n} from 'src/tables/SalesTable/configs/SaleReportTableColumnsConfig.utils';\nimport {\n SaleReportTableColumnDefContextProvider,\n useSaleReportTableColumnDef,\n} from 'src/tables/SalesTable/SaleReportTableColumnDefContext';\nimport { GROUP_BY_TO_PRIMARY_COLUMN_ID } from 'src/utils/columns/sales/salesReportColumnUtils.constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { QueryWithViewMode } from 'src/utils/eventQueryUtils';\nimport { downloadFileFromBlob } from 'src/utils/fileUtils';\nimport {\n isReportFilterOverriden,\n SaleReportMetricsWithGroupBy,\n} from 'src/utils/reportsUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport {\n DateTimeRangeWithRelative,\n EntityWithTicketsQuery,\n ReportClient,\n SaleQuery,\n SaleReportMetrics,\n} from 'src/WebApiController';\n\nimport { ReportsSaleContextProvider } from '../../../navigations/Routes/ReportsSale/ReportsSaleContextProvider';\nimport { ReportExportOptions } from './ReportsExport.types';\nimport {\n exportReport,\n getReportExportFileBasename,\n mapReportMetricToTableString,\n mapReportMetricToUserIds,\n sortReportMetrics,\n} from './ReportsExport.utils';\n\nexport function ReportsSaleExport({\n reportExportOptions,\n onReportExported,\n}: {\n reportExportOptions: ReportExportOptions | null;\n onReportExported: () => void;\n}) {\n // Loading report metrics depend on the context provider (need to wait for the context provider to load the report metrics)\n\n // If reportToExport is null,\n // no reports need to be exported, so not rendering the \n {reportExportOptions?.serverSideExport ? (\n \n ) : (\n \n \n \n )}\n \n );\n}\n\nfunction ReportsSaleServerSideExportInner({\n reportExportOptions: { reportToExport: reportConfig, fileType },\n onReportExported,\n}: {\n reportExportOptions: ReportExportOptions;\n onReportExported: () => void;\n}) {\n const { activeAccountWebClientConfig } = useAppContext();\n const { allEventIds } = useCatalogDataContext();\n const { filterQuery } = useFilterQueryContext<\n EntityWithTicketsQuery & QueryWithViewMode\n >();\n const { trackError } = useErrorBoundaryContext();\n\n const downloadReport = async () => {\n await tryInvokeApi(\n async () => {\n const result = await new ReportClient(\n activeAccountWebClientConfig\n ).downloadSaleReportMetrics({\n query: {\n ...(reportConfig.filter as SaleQuery),\n eventOrMappingIds: allEventIds!.map((ev) => ev.viagVirtualId),\n performerIds: allEventIds!\n .filter((ev) => ev.performerId != null)\n .map((ev) => ev.performerId!),\n venueIds: allEventIds!.map((ev) => ev.venueId),\n },\n groupBy: reportConfig.groupBy,\n globalReportTypeId: reportConfig.globalReportTypeId,\n metrics: reportConfig.metrics,\n isUsingFilterOverride:\n reportConfig.hasFilterOverride ||\n isReportFilterOverriden(filterQuery, reportConfig.filter),\n fileType,\n arAgingTimeBuckets: reportConfig.arAgingTimeBuckets ?? [],\n });\n\n if (result.data) {\n downloadFileFromBlob(\n `${getReportExportFileBasename(\n reportConfig.reportName\n )}.${fileType.toLowerCase()}`,\n result.data\n );\n }\n },\n (error) => {\n trackError('ReportClient.downloadSaleReportMetrics', error);\n },\n () => onReportExported()\n );\n };\n\n useEffect(() => {\n if (allEventIds != null) {\n downloadReport();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [allEventIds]);\n\n return <>;\n}\n\nfunction ReportsSaleClientSideExportInner({\n reportExportOptions: { reportToExport: reportConfig, fileType },\n onReportExported,\n}: {\n reportExportOptions: ReportExportOptions;\n onReportExported: () => void;\n}) {\n const { reportMetrics, isLoading, reportSummary } =\n useReportMetricsContext();\n const { data, eventsTransformed } = useCatalogDataContext();\n const { displayedColumnsConfig } = useSaleReportTableColumnDef();\n const { displayNames: columnDisplayNames } = useColumnDisplayName({\n columnIds: reportConfig.metrics,\n sectionType: SectionType.SalesReport,\n });\n const deactivatedText = useContent(ContentId.Deactivated);\n const daysText = useContent(ContentId.Days);\n const totalText = useContent(ContentId.Total);\n\n const reportMetricsMapped: SaleReportMetricsWithGroupBy[] | undefined =\n useMemo(() => {\n if (!isLoading) {\n return mapReportMetrics(reportMetrics, eventsTransformed, data);\n }\n }, [data, eventsTransformed, isLoading, reportMetrics]);\n\n const userIds = useMemo(() => {\n if (!reportMetricsMapped || !displayedColumnsConfig?.length) {\n return undefined;\n }\n\n const userIds: string[] = [];\n\n reportMetricsMapped.forEach((reportMetric) => {\n const userIdsInRow = mapReportMetricToUserIds(\n reportMetric,\n displayedColumnsConfig\n );\n userIds.push(...userIdsInRow);\n });\n\n return uniq(userIds);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [displayedColumnsConfig?.length, reportMetricsMapped]);\n\n const useGetUserInfosQuery = useGetUserInfos(userIds);\n\n const allActiveUserInfos = useMemo(() => {\n if (userIds != null && userIds.length === 0) {\n return {};\n }\n return useGetUserInfosQuery.data;\n }, [useGetUserInfosQuery.data, userIds]);\n\n // Main data to be exported\n const tableData = useMemo(() => {\n if (\n !reportMetricsMapped ||\n !displayedColumnsConfig?.length ||\n !allActiveUserInfos ||\n !deactivatedText\n ) {\n return undefined;\n }\n\n const result: string[][] = [];\n\n const sortBy =\n reportConfig.sortBy ??\n GROUP_BY_TO_PRIMARY_COLUMN_ID[reportConfig.groupBy];\n const sortByColumnConfig = displayedColumnsConfig.find(\n (c) => c.id === sortBy\n );\n\n const dataSorted = reportMetricsMapped.toSorted((a, b) =>\n sortReportMetrics(\n a,\n b,\n sortByColumnConfig,\n reportConfig.isSortDescending ?? false\n )\n );\n\n dataSorted.forEach((reportMetric) => {\n const row = mapReportMetricToTableString(\n reportMetric,\n displayedColumnsConfig,\n allActiveUserInfos,\n deactivatedText\n );\n result.push(row);\n });\n\n return result;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n allActiveUserInfos,\n deactivatedText,\n displayedColumnsConfig?.length,\n reportConfig.groupBy,\n reportConfig.isSortDescending,\n reportConfig.sortBy,\n reportMetricsMapped,\n ]);\n\n // Summary data\n const tableFoot = useMemo(() => {\n if (\n !reportSummary ||\n !displayedColumnsConfig?.length ||\n !allActiveUserInfos ||\n !reportMetricsMapped\n ) {\n return undefined;\n }\n\n const dataMapped = mapReportMetricsSummary(\n reportConfig,\n reportSummary,\n reportMetricsMapped\n );\n\n if (dataMapped) {\n return mapReportMetricToTableString(\n dataMapped,\n displayedColumnsConfig,\n allActiveUserInfos\n );\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n allActiveUserInfos,\n displayedColumnsConfig?.length,\n reportConfig,\n reportMetricsMapped,\n reportSummary,\n ]);\n\n // Table header\n const tableHeader = useMemo(() => {\n if (\n !columnDisplayNames.length ||\n !displayedColumnsConfig ||\n !reportMetricsMapped ||\n !daysText ||\n !totalText\n ) {\n return undefined;\n }\n\n let timeBuckets: DateTimeRangeWithRelative[] = [];\n if (reportConfig.arAgingTimeBuckets) {\n timeBuckets = reportConfig.arAgingTimeBuckets.map(\n (t) =>\n ({\n relativeStartSecs: t.relativeStartSecs,\n relativeEndSecs: t.relativeEndSecs,\n }) as DateTimeRangeWithRelative\n );\n }\n\n return displayedColumnsConfig.map((c) => {\n const index = reportConfig.metrics.indexOf(c.id ?? '');\n if (index < 0) {\n const timeBucket = timeBuckets.find(\n (t) => c.id === timeBucketToColumnId(t)\n );\n if (timeBucket) {\n return timeBucketToDayString(timeBucket, daysText, totalText);\n }\n return '';\n }\n return columnDisplayNames[index];\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n columnDisplayNames,\n displayedColumnsConfig?.length,\n reportMetricsMapped,\n daysText,\n totalText,\n reportConfig.arAgingTimeBuckets,\n reportConfig.metrics,\n ]);\n\n const onDataLoaded = (\n tableHeader: string[],\n tableData: string[][],\n tableFoot: string[]\n ) => {\n exportReport(reportConfig, fileType, tableHeader, tableData, tableFoot);\n\n onReportExported();\n };\n\n useEffect(() => {\n if (\n data != null &&\n eventsTransformed != null &&\n tableData != null &&\n tableHeader != null &&\n tableFoot != null\n ) {\n onDataLoaded(tableHeader, tableData, tableFoot);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [tableData, tableHeader, tableFoot]);\n\n return <>;\n}\n","import { ColumnDef } from '@tanstack/react-table';\nimport { useState } from 'react';\nimport { ButtonWithIcon } from 'src/components/Buttons';\nimport { ReportsInventoryExport } from 'src/components/Reports/ReportsExport';\nimport { ReportExportOptions } from 'src/components/Reports/ReportsExport/ReportsExport.types';\nimport { ReportsSaleExport } from 'src/components/Reports/ReportsExport/ReportsSaleExport';\nimport { Content } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { DropdownMenu, Stack } from 'src/core/ui';\nimport { RotatingWrapper } from 'src/core/ui/AnimatingWrapper';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { TableHeaderCellDiv } from 'src/core/ui/TableHeaderCellDiv';\nimport { ReportConfig } from 'src/hooks/useReportConfigs';\nimport { ReportConfigV2 } from 'src/hooks/useReportConfigsV2';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { CopyIcon } from 'src/svgs';\nimport { OpenLinkIcon } from 'src/svgs/OpenLinkIcon';\nimport {\n DeleteIcon,\n DownloadIcon,\n EditIcon,\n GenericDisclosuresIcon,\n HistoryIcon,\n IconsFill,\n MoreIcon,\n ProcessingIcon,\n ShareIcon,\n} from 'src/svgs/Viagogo';\nimport { TableShimmeringDiv } from 'src/tables/Table/Table.styled';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ReportTypes, ReportTypesV2 } from 'src/utils/reportsUtils';\nimport { GridActionType } from 'src/utils/tableUtils';\nimport {\n Feature,\n Permission,\n ReportFileType,\n ReportGroupBy,\n} from 'src/WebApiController';\n\nexport type ReportWithHandlers = {\n report?: ReportConfig;\n reportV2?: ReportConfigV2;\n onReportAction?: (\n report: ReportConfig | undefined,\n reportV2: ReportConfigV2 | undefined,\n actionType: GridActionType,\n event?: React.MouseEvent\n ) => void;\n};\n\nexport const REPORTS_TABLE_COLUMNS_CONFIG: ColumnDef[] =\n [\n {\n id: 'reportName',\n header: () => (\n \n \n \n ),\n minSize: 50,\n maxSize: 200,\n accessorFn: (data) =>\n data?.report?.reportName ?? data?.reportV2?.reportName,\n cell: ({ getValue, row: { original } }) => {\n const value = getValue() as string;\n if (!original) {\n return ;\n }\n return (\n \n \n {value}\n \n );\n },\n },\n {\n id: 'ownerDisplayName',\n header: () => (\n \n \n \n ),\n accessorFn: (data) =>\n data?.report?.ownerDisplayName ?? data?.reportV2?.ownerDisplayName,\n cell: ({ getValue, row: { original } }) => {\n const value = getValue() as string | null | undefined;\n if (!original) {\n return ;\n }\n return (\n \n <>\n {(original.report?.globalReportTypeId ??\n original.reportV2?.globalReportTypeId) != null ? (\n \n ) : (\n <>{value}\n )}\n \n \n );\n },\n },\n {\n id: 'actions',\n enableSorting: false,\n header: () => (\n \n \n \n ),\n minSize: 50,\n maxSize: 50,\n cell: function Cell({ row: { original } }) {\n const canCreateReport = useUserHasAnyOfPermissions(\n Permission.Reports_CreateReports\n );\n const canUpdateReport = useUserHasAnyOfPermissions(\n Permission.Reports_UpdateReports\n );\n const canUpdateOwnReports = useUserHasAnyOfPermissions(\n Permission.Reports_UpdateReportsOwned\n );\n const canViewHistory = useUserHasFeature(Feature.ReportSnapshot);\n const hasExportInventoryFeature = useUserHasFeature(\n Feature.ExportInventory\n );\n\n const [reportExportOptions, setReportExportOptions] =\n useState(null);\n\n const onReportExported = () => {\n setReportExportOptions(null);\n };\n\n if (!original) {\n return ;\n }\n\n const isOwner =\n (original.report?.isOwner ?? original.reportV2?.isOwner) === true;\n\n const canUpdate =\n original && (canUpdateReport || (isOwner && canUpdateOwnReports));\n\n const actions = [\n isOwner && (\n <>\n \n original.onReportAction &&\n original.onReportAction(\n original.report,\n original.reportV2,\n GridActionType.Share\n )\n }\n >\n \n \n \n \n \n {canUpdate && (\n \n original.onReportAction &&\n original.onReportAction(\n original.report,\n original.reportV2,\n GridActionType.Edit\n )\n }\n >\n \n \n \n \n \n )}\n \n ),\n original &&\n original.report?.reportIdRedirect == null &&\n original.reportV2 == null && // not supported for v2 yet\n (hasExportInventoryFeature ||\n original.report?.groupBy !== ReportGroupBy.ListingId) && (\n \n \n \n \n \n \n \n \n setReportExportOptions({\n reportToExport: original.report!,\n fileType: ReportFileType.XLSX,\n serverSideExport:\n original.report!.groupBy !==\n ReportGroupBy.ArAgingMarketplace,\n })\n }\n >\n \n \n \n setReportExportOptions({\n reportToExport: original.report!,\n fileType: ReportFileType.CSV,\n serverSideExport:\n original.report?.groupBy !==\n ReportGroupBy.ArAgingMarketplace,\n })\n }\n >\n \n \n {/*\n We don't support server side PDF export so we hide it for now\n Need to be determined on https://thestubhub.atlassian.net/browse/POS-4291 on how we want to handle this\n \n setReportExportOptions({\n reportToExport: original.report,\n fileType: ReportFileType.PDF,\n })\n }\n >\n \n */}\n \n \n ),\n canCreateReport &&\n original.report?.reportIdRedirect == null && // not supported for redirected reports yet\n original.report?.groupBy !==\n ReportGroupBy.SaleIdTicketIdCommissionUser &&\n original.reportV2?.reportType !== ReportTypesV2.Commission &&\n original.report?.groupBy !== ReportGroupBy.ArAgingMarketplace && (\n \n original.onReportAction &&\n original.onReportAction(\n original.report,\n original.reportV2,\n GridActionType.Duplicate\n )\n }\n >\n \n \n \n \n \n ),\n isOwner && canUpdate && (\n \n original.onReportAction &&\n original.onReportAction(\n original.report,\n original.reportV2,\n GridActionType.Delete\n )\n }\n >\n \n \n \n \n \n ),\n canViewHistory &&\n original.report?.globalReportTypeId != null &&\n original.reportV2 == null && // not supported for v2 yet\n original.report?.reportIdRedirect == null && (\n \n original.onReportAction &&\n original.onReportAction(\n original.report,\n original.reportV2,\n GridActionType.History\n )\n }\n >\n \n \n \n \n \n ),\n ];\n\n const visibleActions = actions.filter((a) => !!a);\n\n return (\n <>\n \n {reportExportOptions && (\n \n \n \n )}\n }\n onClick={(event: React.MouseEvent) =>\n original.onReportAction &&\n original.onReportAction(\n original.report,\n original.reportV2,\n GridActionType.Select,\n event\n )\n }\n textContentId={ContentId.OpenReport}\n style={{\n fontSize: vars.typography.fontSize.xs,\n }}\n startWithText\n />\n {visibleActions.length > 0 && (\n \n \n \n \n \n \n \n \n {...visibleActions}\n \n \n \n )}\n \n {original.report &&\n original.report.reportType === ReportTypes.Inventory ? (\n \n ) : (\n \n )}\n \n );\n },\n },\n ];\n","import {\n InitialTableState,\n PaginationState,\n SortingState,\n TableOptions,\n} from '@tanstack/react-table';\nimport { useEffect, useMemo, useState } from 'react';\nimport { FormatContent, useContent } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { ReportConfig } from 'src/hooks/useReportConfigs';\nimport { ReportConfigV2 } from 'src/hooks/useReportConfigsV2';\nimport { NoData, Table } from 'src/tables/Table';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\n\nimport {\n REPORTS_TABLE_COLUMNS_CONFIG,\n ReportWithHandlers,\n} from './configs/ReportsTableColumnsConfig';\n\nexport type ReportsTableDataProps = {\n reports?: ReportConfig[];\n reportsV2?: ReportConfigV2[];\n};\n\nexport type ReportsTableProps = ReportsTableDataProps & {\n onMount?: () => void;\n onUnmount?: (state: object) => void;\n initState?: InitialTableState;\n isGlobalSection?: boolean;\n};\n\nexport function ReportsTable({\n reports,\n reportsV2,\n onReportAction,\n onMount,\n onUnmount,\n initState,\n isGlobalSection,\n}: ReportsTableProps & Pick) {\n const reportText = useContent(ContentId.Reports);\n // Enable passing in table state as parameters -- we can remount with the last state the user was on\n const [sorting, setSorting] = useState(\n initState?.sorting || []\n );\n const [{ pageIndex, pageSize }, setPagination] = useState({\n pageIndex: initState?.pagination?.pageIndex || 0,\n pageSize: (reports?.length ?? 0) + (reportsV2?.length ?? 0),\n });\n const pagination = useMemo(\n () => ({\n pageIndex,\n pageSize,\n }),\n [pageIndex, pageSize]\n );\n\n useEffect(() => {\n onMount?.();\n });\n\n useEffect(() => {\n /**\n * Intent for `onMount` is use with 'windowing' in order to maintain user state\n * when the component is scrolled back into view.\n * Anything that needs to be persisted in `react-table` state should be added here.\n * Only update on unmount to ensure we aren't doing too many re-renders.\n */\n return () => onUnmount?.({ pagination, sorting });\n }, [pagination, sorting, onUnmount]);\n\n useEffect(() => {\n if (pagination.pageSize !== reports?.length) {\n setPagination((prevState) => ({\n ...prevState,\n pageSize: (reports?.length ?? 0) + (reportsV2?.length ?? 0),\n }));\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [reports, reportsV2]);\n\n const data = useMemo(\n () =>\n (reports ?? [])\n .map(\n (r) =>\n ({\n report: r,\n onReportAction,\n }) as ReportWithHandlers\n )\n .concat(\n (reportsV2 ?? []).map(\n (r) =>\n ({\n reportV2: r,\n onReportAction,\n }) as ReportWithHandlers\n )\n ),\n [reports, reportsV2, onReportAction]\n );\n\n const options: Partial> = useMemo(\n () => ({\n data,\n columns: REPORTS_TABLE_COLUMNS_CONFIG,\n state: {\n pagination,\n sorting,\n columnVisibility: {\n ownerDisplayName: !isGlobalSection,\n },\n },\n onPaginationChange: setPagination,\n onSortingChange: setSorting,\n enableRowSelection: true,\n }),\n [data, isGlobalSection, pagination, sorting]\n );\n\n return data.length ? (\n \n ) : (\n \n \n \n );\n}\n","import { Content } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { ReportConfig } from 'src/hooks/useReportConfigs';\nimport { ReportConfigV2 } from 'src/hooks/useReportConfigsV2';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { GridActionType } from 'src/utils/tableUtils';\n\nimport { ReportsTable } from './ReportsTable';\nimport * as styles from './ReportsTableContainer.css';\n\nexport function ReportsTableContainer({\n reports,\n reportsV2,\n onReportAction,\n}: {\n reports?: ReportConfig[];\n reportsV2?: ReportConfigV2[];\n onReportAction: (\n report: ReportConfig | undefined,\n reportV2: ReportConfigV2 | undefined,\n actionType: GridActionType,\n event?: React.MouseEvent\n ) => void;\n}) {\n const reportsV2Default = reportsV2?.filter((r) => r.globalReportTypeId) ?? [];\n const reportsV2Custom = reportsV2?.filter((r) => !r.globalReportTypeId) ?? [];\n\n const reportsDefault =\n reports?.filter(\n (r) =>\n r.globalReportTypeId &&\n !reportsV2Default.some(\n (rv2) => rv2.globalReportTypeId === r.globalReportTypeId\n ) // Avoid duplicates in V2 reports. Show v2 reports when possible\n ) ?? [];\n const reportsCustom = reports?.filter((r) => !r.globalReportTypeId) ?? [];\n\n return (\n
    \n
    \n {reportsDefault.length + reportsV2Default.length > 0 && (\n \n \n \n \n \n \n )}\n\n \n \n \n \n \n \n
    \n
    \n );\n}\n","import { ComponentProps, useCallback, useState } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { ShareReportDialog } from 'src/dialogs/ShareReportDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { ReportConfig, useReportConfigs } from 'src/hooks/useReportConfigs';\nimport { GROUP_BY_TO_PRIMARY_COLUMN_ID as GROUP_BY_TO_PRIMARY_COLUMN_ID_LISTING } from 'src/utils/columns/inventory/inventoryColumnUtils.constants';\nimport { GROUP_BY_TO_PRIMARY_COLUMN_ID as GROUP_BY_TO_PRIMARY_COLUMN_ID_SALES } from 'src/utils/columns/sales/salesReportColumnUtils.constants';\nimport { ReportTypes } from 'src/utils/reportsUtils';\nimport { GridActionType } from 'src/utils/tableUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { ReportGroupBy } from 'src/WebApiController';\n\nconst DEFAULT_GROUP_BY_INVENTORY = ReportGroupBy.ListingId;\nconst DEFAULT_GROUP_BY_SALE = ReportGroupBy.SaleId;\n\nconst emptyReport: ReportConfig = {\n schemaVersion: '1',\n reportId: null,\n reportIdRedirect: null,\n reportName: '',\n reportType: ReportTypes.Inventory,\n ownerDisplayName: '',\n widgets: null,\n groupBy: ReportGroupBy.Performer,\n filter: null,\n metrics: [],\n numberOfItemsPerPage: null,\n sortBy: null,\n isSortDescending: null,\n globalReportTypeId: null,\n isOwner: true,\n roleIdsToShare: [],\n sellerUserIdsToShare: [],\n allowReaderEditMetrics: false,\n hasFilterOverride: null,\n hasMetricsOverride: null,\n arAgingTimeBuckets: null,\n viewableFilterItemIds: null,\n editableFilterItemIds: null,\n hiddenFilterItemIds: null,\n};\n\nexport function useReportV1Actions() {\n const navigate = useNavigate();\n const { loginContext } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n const [currentReport, setCurrentReport] = useState();\n const reportBuilderDialogInventory = useBasicDialog();\n const reportBuilderDialogSale = useBasicDialog();\n const shareDialog = useBasicDialog();\n\n const deleteDialog = useBasicDialog();\n const reportHistoryDialog = useBasicDialog();\n\n const onAddNewReport = useCallback(\n (reportType: ReportTypes) => {\n const defaultMetrics =\n reportType === ReportTypes.Inventory\n ? [GROUP_BY_TO_PRIMARY_COLUMN_ID_LISTING[DEFAULT_GROUP_BY_INVENTORY]]\n : [GROUP_BY_TO_PRIMARY_COLUMN_ID_SALES[DEFAULT_GROUP_BY_SALE]];\n\n setCurrentReport({\n ...emptyReport,\n reportType,\n ownerDisplayName: loginContext?.user?.displayName ?? '',\n groupBy:\n reportType === ReportTypes.Inventory\n ? DEFAULT_GROUP_BY_INVENTORY\n : DEFAULT_GROUP_BY_SALE,\n metrics: defaultMetrics,\n });\n\n if (reportType === ReportTypes.Inventory) {\n reportBuilderDialogInventory.launchDialog();\n } else if (reportType === ReportTypes.Sale) {\n reportBuilderDialogSale.launchDialog();\n }\n },\n [\n loginContext?.user?.displayName,\n reportBuilderDialogInventory,\n reportBuilderDialogSale,\n ]\n );\n\n const {\n deleteReportConfig: deleteReportConfigInventory,\n upsertReportConfig: upsertReportConfigInventory,\n getReportConfigNameForDuplicate: getReportConfigNameForDuplicateInventory,\n } = useReportConfigs({\n reportType: ReportTypes.Inventory,\n });\n\n const {\n deleteReportConfig: deleteReportConfigSale,\n upsertReportConfig: upsertReportConfigSale,\n getReportConfigNameForDuplicate: getReportConfigNameForDuplicateSale,\n } = useReportConfigs({\n reportType: ReportTypes.Sale,\n });\n\n const invokeUpsertReport = useCallback(\n async (report: ReportConfig) => {\n await tryInvokeApi(\n async () => {\n if (report.reportType === ReportTypes.Inventory) {\n upsertReportConfigInventory(report.reportId, report);\n } else if (report.reportType === ReportTypes.Sale) {\n upsertReportConfigSale(report.reportId, report);\n }\n },\n (error) => {\n showErrorDialog('ReportClient.mergeReport', error, {\n trackErrorData: report,\n });\n }\n );\n },\n [showErrorDialog, upsertReportConfigInventory, upsertReportConfigSale]\n );\n\n const onReportShareSubmit = useCallback<\n ComponentProps['onOkay']\n >(\n async (roleIds, sellerUserIds) => {\n const updatedReport = {\n ...currentReport!,\n roleIdsToShare: roleIds,\n sellerUserIdsToShare: sellerUserIds,\n };\n await invokeUpsertReport(updatedReport);\n shareDialog.closeDialog();\n },\n [currentReport, invokeUpsertReport, shareDialog]\n );\n\n const onReportSaveSubmit = useCallback(\n async (report: ReportConfig) => {\n await invokeUpsertReport(report);\n if (report.reportType === ReportTypes.Inventory) {\n reportBuilderDialogInventory.closeDialog();\n } else if (report.reportType === ReportTypes.Sale) {\n reportBuilderDialogSale.closeDialog();\n }\n },\n [reportBuilderDialogInventory, reportBuilderDialogSale, invokeUpsertReport]\n );\n\n const onReportAction = useCallback(\n (\n reportConfig: ReportConfig,\n actionType: GridActionType,\n event?: React.MouseEvent\n ) => {\n switch (actionType) {\n case GridActionType.Select:\n if (reportConfig.reportId) {\n let navUrl =\n reportConfig.reportType === ReportTypes.Inventory\n ? `/reports/inventory/${reportConfig.reportId}`\n : `/reports/sale/${reportConfig.reportId}`;\n\n if (reportConfig.reportIdRedirect) {\n navUrl =\n reportConfig.reportType === ReportTypes.Inventory\n ? `/reports/inventory/v2/${reportConfig.reportIdRedirect}`\n : reportConfig.globalReportTypeId === 9 // Commission, from GlobalReportType\n ? `/reports/commission/v2/${reportConfig.reportIdRedirect}`\n : `/reports/sale/v2/${reportConfig.reportIdRedirect}`;\n }\n\n if (event?.metaKey || event?.ctrlKey) {\n // Open in new tab when holding down the meta/control key\n window.open(navUrl, '_blank', 'ref=noopener noreferrer');\n } else {\n if (reportConfig.reportIdRedirect) {\n navigate(navUrl, {\n state: { isFromV1Page: true },\n });\n } else {\n navigate(navUrl);\n }\n }\n }\n break;\n case GridActionType.Edit:\n setCurrentReport(reportConfig);\n if (reportConfig.reportType === ReportTypes.Inventory) {\n reportBuilderDialogInventory.launchDialog();\n } else if (reportConfig.reportType === ReportTypes.Sale) {\n reportBuilderDialogSale.launchDialog();\n }\n break;\n case GridActionType.Delete:\n setCurrentReport(reportConfig);\n deleteDialog.launchDialog();\n break;\n case GridActionType.Share:\n setCurrentReport(reportConfig);\n shareDialog.launchDialog();\n break;\n case GridActionType.Duplicate:\n invokeUpsertReport({\n ...reportConfig,\n reportId: null,\n reportName:\n reportConfig!.reportType === ReportTypes.Inventory\n ? getReportConfigNameForDuplicateInventory(\n reportConfig.reportName\n )\n : getReportConfigNameForDuplicateSale(reportConfig!.reportName),\n isOwner: true,\n globalReportTypeId: null,\n });\n break;\n case GridActionType.History:\n setCurrentReport(reportConfig);\n reportHistoryDialog.launchDialog();\n break;\n default:\n break;\n }\n },\n [\n deleteDialog,\n getReportConfigNameForDuplicateInventory,\n getReportConfigNameForDuplicateSale,\n invokeUpsertReport,\n navigate,\n reportBuilderDialogInventory,\n reportBuilderDialogSale,\n reportHistoryDialog,\n shareDialog,\n ]\n );\n\n const onReportDelete = useCallback(async () => {\n await tryInvokeApi(\n async () => {\n if (currentReport) {\n if (currentReport.reportType === ReportTypes.Inventory) {\n deleteReportConfigInventory(currentReport.reportId!);\n } else if (currentReport.reportType === ReportTypes.Sale) {\n deleteReportConfigSale(currentReport.reportId!);\n }\n }\n deleteDialog.closeDialog();\n },\n (error) => {\n showErrorDialog('UserSetting.deleteReport', error, {\n trackErrorData: currentReport,\n });\n }\n );\n }, [\n currentReport,\n deleteDialog,\n deleteReportConfigInventory,\n deleteReportConfigSale,\n showErrorDialog,\n ]);\n\n return {\n onAddNewReport,\n currentReport,\n setCurrentReport,\n onReportSaveSubmit,\n onReportShareSubmit,\n onReportDelete,\n onReportAction,\n reportBuilderDialogInventory,\n reportBuilderDialogSale,\n shareDialog,\n deleteDialog,\n reportHistoryDialog,\n };\n}\n","import { useCallback } from 'react';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { ReportTypesV2 } from 'src/utils/reportsUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\n\nimport { ReportConfigV2, useReportConfigsV2 } from './useReportConfigsV2';\n\nexport function useReportConfigActionsV2() {\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const {\n deleteReportConfig: deleteReportConfigInventory,\n upsertReportConfig: upsertReportConfigInventory,\n getReportConfigNameForDuplicate: getReportConfigNameForDuplicateInventory,\n } = useReportConfigsV2({\n reportType: ReportTypesV2.InventoryV2,\n });\n\n const {\n deleteReportConfig: deleteReportConfigSale,\n upsertReportConfig: upsertReportConfigSale,\n getReportConfigNameForDuplicate: getReportConfigNameForDuplicateSale,\n } = useReportConfigsV2({\n reportType: ReportTypesV2.SaleV2,\n });\n\n const upsertReportConfig = useCallback(\n async (report: ReportConfigV2) => {\n return await tryInvokeApi(\n async () => {\n if (report.reportType === ReportTypesV2.InventoryV2) {\n return await upsertReportConfigInventory(report.reportId, report);\n } else if (report.reportType === ReportTypesV2.SaleV2) {\n return await upsertReportConfigSale(report.reportId, report);\n }\n },\n (error) => {\n showErrorDialog('ReportV2Client.mergeReport', error, {\n trackErrorData: report,\n });\n }\n );\n },\n [showErrorDialog, upsertReportConfigInventory, upsertReportConfigSale]\n );\n\n const deleteReportConfig = useCallback(\n async (reportType: ReportTypesV2, reportId: number) => {\n await tryInvokeApi(\n async () => {\n if (reportType === ReportTypesV2.InventoryV2) {\n deleteReportConfigInventory(reportId);\n } else if (reportType === ReportTypesV2.SaleV2) {\n deleteReportConfigSale(reportId);\n }\n },\n (error) => {\n showErrorDialog('UserSetting.deleteReport', error, {\n trackErrorData: {\n reportType,\n reportId,\n },\n });\n }\n );\n },\n [deleteReportConfigInventory, deleteReportConfigSale, showErrorDialog]\n );\n const getReportConfigNameForDuplicate = useCallback(\n (reportType: ReportTypesV2, reportName: string) =>\n reportType === ReportTypesV2.InventoryV2\n ? getReportConfigNameForDuplicateInventory(reportName)\n : getReportConfigNameForDuplicateSale(reportName),\n [\n getReportConfigNameForDuplicateInventory,\n getReportConfigNameForDuplicateSale,\n ]\n );\n\n return {\n upsertReportConfig,\n deleteReportConfig,\n getReportConfigNameForDuplicate,\n };\n}\n","import { ComponentProps, useCallback, useState } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { ShareReportDialog } from 'src/dialogs/ShareReportDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useReportConfigActionsV2 } from 'src/hooks/useReportConfigActionsV2';\nimport {\n REPORT_CONFIG_V2_SCHEMA_VERSION,\n ReportConfigV2,\n} from 'src/hooks/useReportConfigsV2';\nimport { DefaultReportV2ListingQuery } from 'src/utils/eventQueryUtils';\nimport { ReportTypesV2 } from 'src/utils/reportsUtils';\nimport { GridActionType } from 'src/utils/tableUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\n\nimport { ReportsV2LocationState } from './ReportsV2.types';\n\nconst emptyReport: ReportConfigV2 = {\n schemaVersion: REPORT_CONFIG_V2_SCHEMA_VERSION,\n reportId: null,\n reportName: '',\n request: {\n groupings: [],\n aggregations: [],\n orderBy: '',\n orderByAsc: true,\n pageNumber: 0,\n filters: DefaultReportV2ListingQuery,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n } as any,\n reportType: ReportTypesV2.InventoryV2,\n ownerDisplayName: '',\n widgets: null,\n isOwner: true,\n roleIdsToShare: [] as number[],\n sellerUserIdsToShare: [] as string[],\n hasMetricsOverride: null,\n globalReportTypeId: null,\n viewableFilterItemIds: null,\n editableFilterItemIds: null,\n hiddenFilterItemIds: null,\n};\n\nconst getReportNavUrl = (reportType: ReportTypesV2, reportId: number) => {\n if (reportType === ReportTypesV2.InventoryV2) {\n return `/reports/inventory/v2/${reportId}`;\n } else if (reportType === ReportTypesV2.Commission) {\n return `/reports/commission/v2/${reportId}`;\n } else if (reportType === ReportTypesV2.SaleV2) {\n return `/reports/sale/v2/${reportId}`;\n }\n return '';\n};\n\nexport function useReportV2Actions() {\n const { loginContext } = useAppContext();\n const [currentReport, setCurrentReport] = useState();\n\n const navigate = useNavigate();\n\n const reportBuilderDialog = useBasicDialog();\n const deleteDialog = useBasicDialog();\n const shareDialog = useBasicDialog();\n const reportHistoryDialog = useBasicDialog();\n\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const onAddNewReport = useCallback(() => {\n setCurrentReport({\n ...emptyReport,\n ownerDisplayName: loginContext?.user?.displayName ?? '',\n request: {\n ...emptyReport.request,\n groupings: [],\n aggregations: [],\n orderByAsc: true,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n } as any,\n });\n\n reportBuilderDialog.launchDialog();\n }, [loginContext?.user?.displayName, reportBuilderDialog]);\n\n const {\n upsertReportConfig,\n deleteReportConfig,\n getReportConfigNameForDuplicate,\n } = useReportConfigActionsV2();\n\n const onReportSaveSubmit = useCallback(\n async (report: ReportConfigV2) => {\n const isNewReport = report.reportId == null;\n const reportId = await upsertReportConfig(report);\n reportBuilderDialog.closeDialog();\n if (isNewReport && reportId != null) {\n const navUrl = getReportNavUrl(report.reportType, reportId);\n navigate(navUrl, {\n state: {\n isCreateNewReport: true,\n } satisfies ReportsV2LocationState,\n });\n }\n },\n [upsertReportConfig, reportBuilderDialog, navigate]\n );\n\n const onReportAction = (\n reportConfig: ReportConfigV2,\n actionType: GridActionType,\n event?: React.MouseEvent\n ) => {\n switch (actionType) {\n case GridActionType.Select:\n if (reportConfig.reportId != null) {\n const navUrl = getReportNavUrl(\n reportConfig.reportType,\n reportConfig.reportId!\n );\n if (event?.metaKey || event?.ctrlKey) {\n // Open in new tab when holding down the meta/control key\n window.open(navUrl, '_blank', 'ref=noopener noreferrer');\n } else {\n navigate(navUrl);\n }\n }\n break;\n case GridActionType.Edit:\n setCurrentReport(reportConfig);\n reportBuilderDialog.launchDialog();\n break;\n case GridActionType.Delete:\n setCurrentReport(reportConfig);\n deleteDialog.launchDialog();\n break;\n case GridActionType.Share:\n setCurrentReport(reportConfig);\n shareDialog.launchDialog();\n break;\n case GridActionType.Duplicate:\n upsertReportConfig({\n ...reportConfig,\n reportId: null,\n reportName: getReportConfigNameForDuplicate(\n reportConfig.reportType,\n reportConfig.reportName\n ),\n isOwner: true,\n globalReportTypeId: null,\n });\n break;\n case GridActionType.History:\n setCurrentReport(reportConfig);\n reportHistoryDialog.launchDialog();\n break;\n default:\n break;\n }\n };\n\n const onReportDelete = useCallback(async () => {\n await tryInvokeApi(\n async () => {\n if (currentReport) {\n deleteReportConfig(currentReport.reportType, currentReport.reportId!);\n }\n deleteDialog.closeDialog();\n },\n (error) => {\n showErrorDialog('UserSetting.deleteReport', error, {\n trackErrorData: currentReport,\n });\n }\n );\n }, [currentReport, deleteDialog, deleteReportConfig, showErrorDialog]);\n\n const onReportShareSubmit = useCallback<\n ComponentProps['onOkay']\n >(\n async (roleIds, sellerUserIds) => {\n const updatedReport = {\n ...currentReport!,\n roleIdsToShare: roleIds,\n sellerUserIdsToShare: sellerUserIds,\n };\n await upsertReportConfig(updatedReport);\n shareDialog.closeDialog();\n },\n [currentReport, upsertReportConfig, shareDialog]\n );\n\n return {\n currentReport,\n setCurrentReport,\n onAddNewReport,\n onReportSaveSubmit,\n onReportAction,\n onReportShareSubmit,\n onReportDelete,\n reportBuilderDialog,\n deleteDialog,\n shareDialog,\n reportHistoryDialog,\n };\n}\n","import { useMemo } from 'react';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { ConfirmDialog } from 'src/core/interim/dialogs/ConfirmDialog';\nimport { PosDropdown, PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { Button } from 'src/core/ui';\nimport { ReportBuilderDialog } from 'src/dialogs/ReportBuilderDialog';\nimport { ReportBuilderDialogV2 } from 'src/dialogs/ReportBuilderDialog/ReportBuilderDialogV2';\nimport { ReportHistoryDialog } from 'src/dialogs/ReportHistoryDialog';\nimport { ShareReportDialog } from 'src/dialogs/ShareReportDialog';\nimport { ReportConfig, useReportConfigs } from 'src/hooks/useReportConfigs';\nimport {\n ReportConfigV2,\n useReportConfigsV2,\n} from 'src/hooks/useReportConfigsV2';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { LayoutContent } from 'src/navigations/LayoutContent';\nimport { ReportsTableContainer } from 'src/tables/ReportsTable/ReportsTableContainer';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ReportTypes, ReportTypesV2 } from 'src/utils/reportsUtils';\nimport { GridActionType } from 'src/utils/tableUtils';\nimport { Feature, Permission } from 'src/WebApiController';\n\nimport { MainRoute } from '../MainRoute';\nimport * as styles from './Reports.css';\nimport { useReportV1Actions } from './useReportV1Actions';\nimport { useReportV2Actions } from './useReportV2Actions';\n\nexport function Reports() {\n const reportsTitle = useContent(ContentId.Reports);\n let canCreateReport = useUserHasAnyOfPermissions(\n Permission.Reports_CreateReports\n );\n const hasReportV2BuilderFeature = useUserHasFeature(Feature.ReportV2Builder);\n const hasReportSinglePagedV1V2Feature = useUserHasFeature(\n Feature.ReportSinglePagedV1V2\n );\n\n if (hasReportSinglePagedV1V2Feature) {\n canCreateReport &&= hasReportV2BuilderFeature;\n }\n\n const {\n onAddNewReport,\n currentReport,\n setCurrentReport,\n onReportSaveSubmit,\n onReportShareSubmit,\n onReportDelete,\n onReportAction: onReportActionV1,\n reportBuilderDialogInventory,\n reportBuilderDialogSale,\n shareDialog,\n deleteDialog,\n reportHistoryDialog,\n } = useReportV1Actions();\n\n const {\n currentReport: currentReportV2,\n setCurrentReport: setCurrentReportV2,\n onAddNewReport: onAddNewReportV2,\n onReportSaveSubmit: onReportSaveSubmitV2,\n onReportAction: onReportActionV2,\n onReportShareSubmit: onReportShareSubmitV2,\n onReportDelete: onReportDeleteV2,\n reportBuilderDialog: reportBuilderDialogV2,\n deleteDialog: deleteDialogV2,\n shareDialog: shareDialogV2,\n } = useReportV2Actions();\n\n const onReportAction = (\n reportConfig: ReportConfig | undefined,\n reportConfigV2: ReportConfigV2 | undefined,\n actionType: GridActionType,\n event?: React.MouseEvent\n ) => {\n if (reportConfig) {\n onReportActionV1(reportConfig, actionType, event);\n } else if (reportConfigV2) {\n onReportActionV2(reportConfigV2, actionType, event);\n }\n };\n\n return (\n \n {hasReportSinglePagedV1V2Feature ? (\n \n \n \n ) : (\n \n \n \n }\n align=\"end\"\n >\n onAddNewReport(ReportTypes.Inventory)}\n >\n \n \n onAddNewReport(ReportTypes.Sale)}\n >\n \n \n \n )}\n \n )\n }\n >\n \n\n {currentReport && (\n <>\n \n {...reportBuilderDialogInventory.dialogProps}\n unmountOnClose\n report={currentReport}\n onClosed={() => {\n setCurrentReport(undefined);\n reportBuilderDialogInventory.closeDialog();\n }}\n onSave={onReportSaveSubmit}\n />\n \n {...reportBuilderDialogSale.dialogProps}\n unmountOnClose\n report={currentReport}\n onClosed={() => {\n setCurrentReport(undefined);\n reportBuilderDialogSale.closeDialog();\n }}\n onSave={onReportSaveSubmit}\n />\n {\n setCurrentReport(undefined);\n shareDialog.closeDialog();\n }}\n />\n \n )}\n {currentReportV2 && (\n <>\n {\n setCurrentReportV2(undefined);\n reportBuilderDialogV2.closeDialog();\n }}\n onSave={onReportSaveSubmitV2}\n />\n {\n setCurrentReportV2(undefined);\n shareDialogV2.closeDialog();\n }}\n />\n \n )}\n }\n bodyText={}\n onOkay={onReportDelete}\n onCancel={deleteDialog.closeDialog}\n okText={ContentId.Yes}\n cancelText={ContentId.No}\n />\n {\n setCurrentReport(undefined);\n reportHistoryDialog.closeDialog();\n }}\n />\n }\n bodyText={}\n onOkay={onReportDeleteV2}\n onCancel={deleteDialogV2.closeDialog}\n okText={ContentId.Yes}\n cancelText={ContentId.No}\n />\n \n );\n}\n\nfunction ReportsPage(props: {\n onReportAction: (\n report: ReportConfig | undefined,\n reportV2: ReportConfigV2 | undefined,\n actionType: GridActionType,\n event?: React.MouseEvent\n ) => void;\n}) {\n const hasReportSinglePagedV1V2Feature = useUserHasFeature(\n Feature.ReportSinglePagedV1V2\n );\n\n const {\n reportConfigs: reportConfigsInventory,\n isLoading: reportInventoryLoading,\n } = useReportConfigs({\n reportType: ReportTypes.Inventory,\n });\n const { reportConfigs: reportConfigsSale, isLoading: reportSaleLoading } =\n useReportConfigs({\n reportType: ReportTypes.Sale,\n });\n\n const reports: ReportConfig[] = useMemo(() => {\n const reportsInventoryWithType = reportConfigsInventory.map((r) => ({\n ...r,\n reportType: ReportTypes.Inventory,\n }));\n const reportsSaleWithType = reportConfigsSale.map((r) => ({\n ...r,\n reportType: ReportTypes.Sale,\n }));\n return [...reportsInventoryWithType, ...reportsSaleWithType];\n }, [reportConfigsInventory, reportConfigsSale]);\n\n const {\n reportConfigs: reportConfigsV2Inventory,\n isLoading: reportV2InventoryLoading,\n } = useReportConfigsV2({\n reportType: ReportTypesV2.InventoryV2,\n });\n const { reportConfigs: reportConfigsV2Sale, isLoading: reportV2SaleLoading } =\n useReportConfigsV2({\n reportType: ReportTypesV2.SaleV2,\n });\n const {\n reportConfigs: reportConfigsV2Commission,\n isLoading: reportV2SaleCommission,\n } = useReportConfigsV2({\n reportType: ReportTypesV2.Commission,\n });\n\n const reportsV2: ReportConfigV2[] = useMemo(() => {\n const reportsV2InventoryWithType = reportConfigsV2Inventory.map((r) => ({\n ...r,\n reportType: ReportTypesV2.InventoryV2,\n }));\n const reportsV2SaleWithType = reportConfigsV2Sale.map((r) => ({\n ...r,\n reportType: ReportTypesV2.SaleV2,\n }));\n const reportsV2CommissionWithType = reportConfigsV2Commission.map((r) => ({\n ...r,\n reportType: ReportTypesV2.Commission,\n }));\n return [\n ...reportsV2InventoryWithType,\n ...reportsV2SaleWithType,\n ...reportsV2CommissionWithType,\n ];\n }, [\n reportConfigsV2Commission,\n reportConfigsV2Inventory,\n reportConfigsV2Sale,\n ]);\n\n const isLoading =\n reportInventoryLoading ||\n reportSaleLoading ||\n reportV2InventoryLoading ||\n reportV2SaleLoading ||\n reportV2SaleCommission;\n\n return (\n
    \n {isLoading ? (\n \n ) : (\n \n )}\n
    \n );\n}\n","import { useInfiniteQuery, useQuery } from '@tanstack/react-query';\nimport { once } from 'lodash-es';\nimport React, {\n PropsWithChildren,\n useCallback,\n useContext,\n useMemo,\n} from 'react';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { ReportConfigV2 } from 'src/hooks/useReportConfigsV2';\nimport { DATA_REFRESH_RATE_IN_MILLIS_LONG } from 'src/utils/constants/constants';\nimport { QueryWithViewMode } from 'src/utils/eventQueryUtils';\nimport {\n ReportMetricsSummaryV2,\n ReportMetricsV2,\n ReportValueType,\n} from 'src/WebApiController';\n\nimport { useAppContext } from '../AppContext';\nimport { useFilterQueryContext } from '../FilterQueryContext';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type ReportMetricsResponse = { [key: string]: any };\n\nexport type ReportValueTypesReponse = { [key: string]: ReportValueType };\n\nexport type IReportMetricsContext = {\n isLoading: boolean;\n reportMetrics?: ReportMetricsResponse[];\n reportSummary?: ReportMetricsResponse;\n reportValueTypes?: ReportValueTypesReponse;\n refreshMetrics: () => void;\n fetchNextPage: () => void;\n hasNextPage?: boolean;\n isFetchingNextPage: boolean;\n isReportConfigEmpty?: boolean;\n};\n\nexport const createReportMetricsContextV2 = once(() =>\n React.createContext({} as IReportMetricsContext)\n);\n\nexport function useReportMetricsContextV2() {\n return useContext(createReportMetricsContextV2());\n}\n\nexport function ReportMetricsContextProviderV2<\n TQuery extends QueryWithViewMode,\n>({\n reportConfig,\n queryKey,\n getReportMetrics,\n getReportMetricsSummary,\n children,\n disabled,\n}: PropsWithChildren<{\n reportConfig: ReportConfigV2;\n queryKey: string;\n getReportMetrics?: (\n query: TQuery,\n pageNumber: number\n ) => Promise;\n getReportMetricsSummary?: (query: TQuery) => Promise;\n disabled?: boolean;\n}>) {\n const ReportMetricsContext = createReportMetricsContextV2();\n\n const { trackError } = useErrorBoundaryContext();\n\n const { filterQuery } = useFilterQueryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n\n const isReportConfigEmpty = useMemo(() => {\n return (\n reportConfig.request.orderBy == null ||\n !reportConfig.request.aggregations?.length ||\n (!reportConfig.request.rowGroupings?.length &&\n !reportConfig.request.columnGroupings?.length)\n );\n }, [\n reportConfig.request.aggregations?.length,\n reportConfig.request.columnGroupings?.length,\n reportConfig.request.orderBy,\n reportConfig.request.rowGroupings?.length,\n ]);\n\n const shouldQuery =\n !disabled &&\n !(!getReportMetrics || !activeAccountWebClientConfig.activeAccountId) &&\n !isReportConfigEmpty;\n\n const reportMetricsQuery = useInfiniteQuery({\n queryKey: [\n `${queryKey}-report-metrics`,\n activeAccountWebClientConfig,\n filterQuery,\n disabled,\n reportConfig.request.aggregations,\n reportConfig.request.rowGroupings,\n reportConfig.request.columnGroupings,\n ],\n queryFn: async ({ pageParam: pageNumber = 0 }) => {\n if (!shouldQuery) {\n return null;\n }\n\n const reportMetricsData = await getReportMetrics!(\n filterQuery,\n pageNumber\n );\n\n return {\n reportMetricsData,\n pageNumber,\n };\n },\n getNextPageParam(lastPage) {\n return lastPage?.reportMetricsData.rows.length\n ? lastPage.pageNumber + 1\n : undefined;\n },\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n initialPageParam: 0,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError('getReportMetrics', error, {\n ...filterQuery,\n });\n },\n },\n refetchInterval: DATA_REFRESH_RATE_IN_MILLIS_LONG,\n });\n\n const reportMetricsSummaryQuery = useQuery({\n queryKey: [\n `${queryKey}-report-metrics-summary`,\n activeAccountWebClientConfig,\n filterQuery,\n disabled,\n reportConfig.request.aggregations,\n reportConfig.request.rowGroupings,\n reportConfig.request.columnGroupings,\n ],\n queryFn: async () => {\n if (!shouldQuery) {\n return null;\n }\n\n const reportMetricsData = await getReportMetricsSummary!(filterQuery);\n\n return {\n reportMetricsData,\n };\n },\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError('getReportMetricsSummary', error, {\n ...filterQuery,\n });\n },\n },\n refetchInterval: DATA_REFRESH_RATE_IN_MILLIS_LONG,\n });\n\n const refreshMetrics = useCallback(\n () => reportMetricsQuery.refetch(),\n [reportMetricsQuery]\n );\n\n const flattenedData = useMemo(\n () =>\n reportMetricsQuery.data?.pages?.flatMap(\n (m) => m?.reportMetricsData?.rows ?? []\n ),\n [reportMetricsQuery.data]\n );\n\n return (\n \n {children}\n \n );\n}\n","import { PropsWithChildren, useCallback } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { FilterQueryContextProvider } from 'src/contexts/FilterQueryContext';\nimport { ReportMetricsContextProviderV2 } from 'src/contexts/ReportMetricsContext/ReportMetricsContextV2';\nimport { ReportConfigV2 } from 'src/hooks/useReportConfigsV2';\nimport { EmptyReportV2ListingQuery } from 'src/utils/eventQueryUtils';\nimport { ReportV2Client, UIReportV2ListingQuery } from 'src/WebApiController';\n\nexport function ReportsInventoryContextProviderV2({\n reportConfig,\n isExport,\n children,\n}: PropsWithChildren<{\n reportConfig: ReportConfigV2;\n isExport?: boolean;\n}>) {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const getReportMetrics = useCallback(\n (filters: UIReportV2ListingQuery, pageNumber: number) => {\n return new ReportV2Client(\n activeAccountWebClientConfig\n ).getInventoryReportMetrics({\n ...reportConfig.request,\n pageNumber,\n filters,\n });\n },\n [activeAccountWebClientConfig, reportConfig]\n );\n\n const getReportMetricsSummary = useCallback(\n (filters: UIReportV2ListingQuery) => {\n return new ReportV2Client(\n activeAccountWebClientConfig\n ).getInventoryReportSummary({\n ...reportConfig.request,\n filters,\n });\n },\n [activeAccountWebClientConfig, reportConfig]\n );\n\n return (\n \n initialQuery={reportConfig.request.filters as UIReportV2ListingQuery}\n emptyQuery={EmptyReportV2ListingQuery}\n loadQueryFromUrl={false}\n >\n \n queryKey=\"getReportListingMetricsV2\"\n getReportMetrics={getReportMetrics}\n getReportMetricsSummary={getReportMetricsSummary}\n disabled={isExport}\n reportConfig={reportConfig}\n >\n {children}\n \n \n );\n}\n","import { useEffect } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { ReportsInventoryContextProviderV2 } from 'src/navigations/Routes/ReportsInventory/ReportsInventoryContextProviderV2';\nimport { downloadFileFromBlob } from 'src/utils/fileUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { ReportV2Client, UIReportV2ListingQuery } from 'src/WebApiController';\n\nimport { ReportExportOptionsV2 } from './ReportsExport.types';\nimport { getReportExportFileBasename } from './ReportsExport.utils';\n\nexport function ReportsInventoryExportV2({\n reportExportOptions,\n onReportExported,\n}: {\n reportExportOptions: ReportExportOptionsV2 | null;\n onReportExported: () => void;\n}) {\n // Loading report metrics depend on the context provider (need to wait for the context provider to load the report metrics)\n\n // If reportToExport is null,\n // no reports need to be exported, so not rendering the \n \n \n );\n}\n\nfunction ReportsListingServerSideExportInner({\n reportExportOptions: { reportToExport: reportConfig, fileType },\n onReportExported,\n}: {\n reportExportOptions: ReportExportOptionsV2;\n onReportExported: () => void;\n}) {\n const { activeAccountWebClientConfig } = useAppContext();\n const { eventsTransformed } = useCatalogDataContext();\n const { filterQuery } = useFilterQueryContext();\n const { trackError } = useErrorBoundaryContext();\n\n const allEventIds = (eventsTransformed ?? []).flatMap((ev) => ({\n viagVirtualId: ev.event.viagVirtualId,\n performerId: ev.event.perfId,\n venueId: ev.event.venueId,\n }));\n\n const downloadReport = async () => {\n await tryInvokeApi(\n async () => {\n const queryWithCatalog = {\n ...filterQuery,\n eventOrMappingIds: allEventIds.map((ev) => ev.viagVirtualId),\n performerIds: allEventIds\n .filter((ev) => ev.performerId != null)\n .map((ev) => ev.performerId!),\n venueIds: allEventIds.map((ev) => ev.venueId),\n } as UIReportV2ListingQuery;\n\n const result = await new ReportV2Client(\n activeAccountWebClientConfig\n ).downloadListingReportMetrics(\n {\n ...reportConfig.request,\n filters: queryWithCatalog,\n },\n fileType\n );\n\n if (result.data) {\n downloadFileFromBlob(\n `${getReportExportFileBasename(\n reportConfig.reportName\n )}.${fileType.toLowerCase()}`,\n result.data\n );\n }\n },\n (error) => {\n trackError('ReportV2Client.downloadListingReportMetrics', error);\n },\n () => onReportExported()\n );\n };\n\n useEffect(() => {\n if (eventsTransformed != null) {\n downloadReport();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [eventsTransformed]);\n\n return <>;\n}\n","import { PropsWithChildren, useCallback } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { FilterQueryContextProvider } from 'src/contexts/FilterQueryContext';\nimport { ReportMetricsContextProviderV2 } from 'src/contexts/ReportMetricsContext/ReportMetricsContextV2';\nimport { ReportConfigV2 } from 'src/hooks/useReportConfigsV2';\nimport { EmptyReportV2SaleQuery } from 'src/utils/eventQueryUtils';\nimport { ReportV2Client, UIReportV2SaleQuery } from 'src/WebApiController';\n\nexport function ReportsSaleContextProviderV2({\n reportConfig,\n isExport,\n children,\n}: PropsWithChildren<{\n reportConfig: ReportConfigV2;\n isExport?: boolean;\n}>) {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const getReportMetrics = useCallback(\n (filters: UIReportV2SaleQuery, pageNumber: number) => {\n return new ReportV2Client(\n activeAccountWebClientConfig\n ).getSaleReportMetrics({\n ...reportConfig.request,\n pageNumber,\n filters,\n });\n },\n [activeAccountWebClientConfig, reportConfig]\n );\n\n const getReportMetricsSummary = useCallback(\n (filters: UIReportV2SaleQuery) => {\n return new ReportV2Client(\n activeAccountWebClientConfig\n ).getSaleReportSummary({\n ...reportConfig.request,\n filters,\n });\n },\n [activeAccountWebClientConfig, reportConfig]\n );\n\n return (\n \n initialQuery={reportConfig.request.filters as UIReportV2SaleQuery}\n emptyQuery={EmptyReportV2SaleQuery}\n loadQueryFromUrl={false}\n >\n \n queryKey=\"getReportSaleMetricsV2\"\n getReportMetrics={getReportMetrics}\n getReportMetricsSummary={getReportMetricsSummary}\n disabled={isExport}\n reportConfig={reportConfig}\n >\n {children}\n \n \n );\n}\n","import { useEffect } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { ReportsSaleContextProviderV2 } from 'src/navigations/Routes/ReportsSale/ReportsSaleContextProviderV2';\nimport { downloadFileFromBlob } from 'src/utils/fileUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { ReportV2Client, UIReportV2SaleQuery } from 'src/WebApiController';\n\nimport { ReportExportOptionsV2 } from './ReportsExport.types';\nimport { getReportExportFileBasename } from './ReportsExport.utils';\n\nexport function ReportsSaleExportV2({\n reportExportOptions,\n onReportExported,\n}: {\n reportExportOptions: ReportExportOptionsV2 | null;\n onReportExported: () => void;\n}) {\n // Loading report metrics depend on the context provider (need to wait for the context provider to load the report metrics)\n\n // If reportToExport is null,\n // no reports need to be exported, so not rendering the \n \n \n );\n}\n\nfunction ReportsSaleServerSideExportInner({\n reportExportOptions: { reportToExport: reportConfig, fileType },\n onReportExported,\n}: {\n reportExportOptions: ReportExportOptionsV2;\n onReportExported: () => void;\n}) {\n const { activeAccountWebClientConfig } = useAppContext();\n const { eventsTransformed } = useCatalogDataContext();\n const { filterQuery } = useFilterQueryContext();\n const { trackError } = useErrorBoundaryContext();\n\n const allEventIds = (eventsTransformed ?? []).flatMap((ev) => ({\n viagVirtualId: ev.event.viagVirtualId,\n performerId: ev.event.perfId,\n venueId: ev.event.venueId,\n }));\n\n const downloadReport = async () => {\n await tryInvokeApi(\n async () => {\n const queryWithCatalog = {\n ...filterQuery,\n eventIds: allEventIds.map((ev) => ev.viagVirtualId),\n performerIds: allEventIds\n .filter((ev) => ev.performerId != null)\n .map((ev) => ev.performerId!),\n venueIds: allEventIds.map((ev) => ev.venueId),\n } as UIReportV2SaleQuery;\n\n const result = await new ReportV2Client(\n activeAccountWebClientConfig\n ).downloadSaleReportMetrics(\n {\n ...reportConfig.request,\n filters: queryWithCatalog,\n },\n fileType\n );\n\n if (result.data) {\n downloadFileFromBlob(\n `${getReportExportFileBasename(\n reportConfig.reportName\n )}.${fileType.toLowerCase()}`,\n result.data\n );\n }\n },\n (error) => {\n trackError('ReportV2Client.downloadSaleReportMetrics', error);\n },\n () => onReportExported()\n );\n };\n\n useEffect(() => {\n if (eventsTransformed != null) {\n downloadReport();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [eventsTransformed]);\n\n return <>;\n}\n","import { ColumnDef } from '@tanstack/react-table';\nimport { useState } from 'react';\nimport { ButtonWithIcon } from 'src/components/Buttons';\nimport { ReportExportOptionsV2 } from 'src/components/Reports/ReportsExport/ReportsExport.types';\nimport { ReportsInventoryExportV2 } from 'src/components/Reports/ReportsExport/ReportsInventoryExportV2';\nimport { ReportsSaleExportV2 } from 'src/components/Reports/ReportsExport/ReportsSaleExportV2';\nimport { Content } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { DropdownMenu, Stack } from 'src/core/ui';\nimport { RotatingWrapper } from 'src/core/ui/AnimatingWrapper';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { TableHeaderCellDiv } from 'src/core/ui/TableHeaderCellDiv';\nimport { ReportConfigV2 } from 'src/hooks/useReportConfigsV2';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { CopyIcon } from 'src/svgs';\nimport { OpenLinkIcon } from 'src/svgs/OpenLinkIcon';\nimport {\n DeleteIcon,\n EditIcon,\n GenericDisclosuresIcon,\n IconsFill,\n MoreIcon,\n ProcessingIcon,\n ShareIcon,\n} from 'src/svgs/Viagogo';\nimport { TableShimmeringDiv } from 'src/tables/Table/Table.styled';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ReportTypesV2 } from 'src/utils/reportsUtils';\nimport { GridActionType } from 'src/utils/tableUtils';\nimport { Feature, Permission } from 'src/WebApiController';\n\nexport type ReportWithHandlersV2 = {\n report: ReportConfigV2;\n onReportAction?: (\n report: ReportConfigV2,\n actionType: GridActionType,\n event?: React.MouseEvent\n ) => void;\n};\n\nexport const REPORTS_TABLE_COLUMNS_CONFIG_V2: ColumnDef[] =\n [\n {\n id: 'reportName',\n header: () => (\n \n \n \n ),\n minSize: 50,\n maxSize: 200,\n accessorFn: (data) => data?.report?.reportName,\n cell: ({ getValue, row: { original } }) => {\n const value = getValue() as string;\n if (!original) {\n return ;\n }\n return (\n \n \n {value}\n \n );\n },\n },\n {\n id: 'ownerDisplayName',\n header: () => (\n \n \n \n ),\n accessorFn: (data) => data?.report?.ownerDisplayName,\n cell: ({ getValue, row: { original } }) => {\n const value = getValue() as string | null | undefined;\n if (!original) {\n return ;\n }\n return (\n \n <>\n {original.report.globalReportTypeId ? (\n \n ) : (\n <>{value}\n )}\n \n \n );\n },\n },\n {\n id: 'actions',\n enableSorting: false,\n header: () => (\n \n \n \n ),\n minSize: 50,\n maxSize: 50,\n cell: function Cell({ row: { original } }) {\n const canCreateReport = useUserHasAnyOfPermissions(\n Permission.Reports_CreateReports\n );\n const canUpdateReport = useUserHasAnyOfPermissions(\n Permission.Reports_UpdateReports\n );\n const canUpdateOwnReports = useUserHasAnyOfPermissions(\n Permission.Reports_UpdateReportsOwned\n );\n const canViewHistory = useUserHasFeature(Feature.ReportSnapshot);\n const hasExportInventoryFeature = useUserHasFeature(\n Feature.ExportInventory\n );\n\n const [reportExportOptions, setReportExportOptions] =\n useState(null);\n\n const onReportExported = () => {\n setReportExportOptions(null);\n };\n\n if (!original) {\n return ;\n }\n const canUpdate =\n original &&\n (canUpdateReport || (original.report.isOwner && canUpdateOwnReports));\n\n const actions = [\n original.report.isOwner && (\n <>\n \n original.onReportAction &&\n original.onReportAction(original.report, GridActionType.Share)\n }\n >\n \n \n \n \n \n {canUpdate && (\n \n original.onReportAction &&\n original.onReportAction(\n original.report,\n GridActionType.Edit\n )\n }\n >\n \n \n \n \n \n )}\n \n ),\n // original &&\n // (hasExportInventoryFeature ||\n // original.report.request.rowGroupings?.some(\n // (g) => g.columnName === ListingReportTableColumnId.ListingId\n // )) && (\n // \n // \n // \n // \n // \n // \n // \n // \n // setReportExportOptions({\n // reportToExport: original.report,\n // fileType: ReportFileType.CSV,\n // })\n // }\n // >\n // \n // \n // \n // setReportExportOptions({\n // reportToExport: original.report,\n // fileType: ReportFileType.XLSX,\n // })\n // }\n // >\n // \n // \n // \n // \n // ),\n canCreateReport && (\n \n original.onReportAction &&\n original.onReportAction(\n original.report,\n GridActionType.Duplicate\n )\n }\n >\n \n \n \n \n \n ),\n original.report.isOwner && canUpdate && (\n \n original.onReportAction &&\n original.onReportAction(original.report, GridActionType.Delete)\n }\n >\n \n \n \n \n \n ),\n // canViewHistory && (\n // \n // original.onReportAction &&\n // original.onReportAction(original.report, GridActionType.History)\n // }\n // >\n // \n // \n // \n // \n // \n // ),\n ];\n\n const visibleActions = actions.filter((a) => !!a);\n\n return (\n <>\n \n {reportExportOptions && (\n \n \n \n )}\n }\n onClick={(event: React.MouseEvent) =>\n original.onReportAction &&\n original.onReportAction(\n original.report,\n GridActionType.Select,\n event\n )\n }\n textContentId={ContentId.OpenReport}\n style={{\n fontSize: vars.typography.fontSize.xs,\n }}\n startWithText\n />\n {visibleActions.length > 0 &&\n original.report?.reportType !== ReportTypesV2.Commission && (\n \n \n
    \n \n
    \n \n \n \n {...visibleActions}\n \n \n
    \n )}\n \n {original.report.reportType === ReportTypesV2.InventoryV2 ? (\n \n ) : (\n \n )}\n \n );\n },\n },\n ];\n","import {\n InitialTableState,\n PaginationState,\n SortingState,\n TableOptions,\n} from '@tanstack/react-table';\nimport { useEffect, useMemo, useState } from 'react';\nimport { FormatContent, useContent } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { ReportConfigV2 } from 'src/hooks/useReportConfigsV2';\nimport { NoData, Table } from 'src/tables/Table';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\n\nimport {\n REPORTS_TABLE_COLUMNS_CONFIG_V2,\n ReportWithHandlersV2,\n} from './configs/ReportsTableColumnsConfigV2';\n\nexport type ReportsTableV2DataProps = {\n reports?: ReportConfigV2[];\n};\n\nexport type ReportsTableV2Props = ReportsTableV2DataProps & {\n onMount?: () => void;\n onUnmount?: (state: object) => void;\n initState?: InitialTableState;\n isGlobalSection?: boolean;\n};\n\nexport function ReportsTableV2({\n reports,\n onReportAction,\n onMount,\n onUnmount,\n initState,\n isGlobalSection,\n}: ReportsTableV2Props & Pick) {\n const reportText = useContent(ContentId.Reports);\n // Enable passing in table state as parameters -- we can remount with the last state the user was on\n const [sorting, setSorting] = useState(\n initState?.sorting || []\n );\n const [{ pageIndex, pageSize }, setPagination] = useState({\n pageIndex: initState?.pagination?.pageIndex || 0,\n pageSize: reports?.length ?? 0,\n });\n const pagination = useMemo(\n () => ({\n pageIndex,\n pageSize,\n }),\n [pageIndex, pageSize]\n );\n\n useEffect(() => {\n onMount?.();\n });\n\n useEffect(() => {\n /**\n * Intent for `onMount` is use with 'windowing' in order to maintain user state\n * when the component is scrolled back into view.\n * Anything that needs to be persisted in `react-table` state should be added here.\n * Only update on unmount to ensure we aren't doing too many re-renders.\n */\n return () => onUnmount?.({ pagination, sorting });\n }, [pagination, sorting, onUnmount]);\n\n useEffect(() => {\n if (pagination.pageSize !== reports?.length) {\n setPagination((prevState) => ({\n ...prevState,\n pageSize: reports?.length ?? 0,\n }));\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [reports]);\n\n const data = useMemo(\n () =>\n reports?.map(\n (r) =>\n ({\n report: r,\n onReportAction,\n }) as ReportWithHandlersV2\n ),\n [reports, onReportAction]\n );\n\n const options: Partial> = useMemo(\n () => ({\n data,\n columns: REPORTS_TABLE_COLUMNS_CONFIG_V2,\n state: {\n pagination,\n sorting,\n columnVisibility: {\n ownerDisplayName: !isGlobalSection,\n },\n },\n onPaginationChange: setPagination,\n onSortingChange: setSorting,\n enableRowSelection: true,\n }),\n [data, isGlobalSection, pagination, sorting]\n );\n\n return reports?.length ? (\n \n ) : (\n \n \n \n );\n}\n","import { Content } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { ReportConfigV2 } from 'src/hooks/useReportConfigsV2';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { GridActionType } from 'src/utils/tableUtils';\n\nimport * as styles from './ReportsTableContainer.css';\nimport { ReportsTableV2 } from './ReportsTableV2';\n\nexport function ReportsTableContainerV2({\n reports,\n onReportAction,\n}: {\n reports?: ReportConfigV2[];\n onReportAction: (\n report: ReportConfigV2,\n actionType: GridActionType,\n event?: React.MouseEvent\n ) => void;\n}) {\n const reportsDefault = reports?.filter((r) => r.globalReportTypeId) ?? [];\n const reportsCustom = reports?.filter((r) => !r.globalReportTypeId) ?? [];\n\n return (\n
    \n
    \n {reportsDefault.length > 0 && (\n \n \n \n \n \n \n )}\n\n \n \n \n \n \n \n
    \n
    \n );\n}\n","import { useMemo } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ConfirmDialog } from 'src/core/interim/dialogs/ConfirmDialog';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { Button } from 'src/core/ui';\nimport { ReportBuilderDialogV2 } from 'src/dialogs/ReportBuilderDialog/ReportBuilderDialogV2';\nimport { ShareReportDialog } from 'src/dialogs/ShareReportDialog';\nimport {\n ReportConfigV2,\n useReportConfigsV2,\n} from 'src/hooks/useReportConfigsV2';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { LayoutContent } from 'src/navigations/LayoutContent';\nimport { ReportsTableContainerV2 } from 'src/tables/ReportsTable/ReportsTableContainerV2';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ReportTypesV2 } from 'src/utils/reportsUtils';\nimport { GridActionType } from 'src/utils/tableUtils';\nimport { Feature, Permission } from 'src/WebApiController';\n\nimport { MainRoute } from '../MainRoute';\nimport * as styles from './Reports.css';\nimport { useReportV2Actions } from './useReportV2Actions';\n\nexport function ReportsV2() {\n const reportsTitle = 'Reports V2'; // no need to translate - once we release - we will need to use ContentId.Report again\n const hasCreateReportsPermission = useUserHasAnyOfPermissions(\n Permission.Reports_CreateReports\n );\n const hasReportV2BuilderFeature = useUserHasFeature(Feature.ReportV2Builder);\n\n const canCreateReport =\n hasCreateReportsPermission && hasReportV2BuilderFeature;\n\n const {\n currentReport,\n setCurrentReport,\n onAddNewReport,\n onReportSaveSubmit,\n onReportAction,\n onReportShareSubmit,\n onReportDelete,\n reportBuilderDialog,\n deleteDialog,\n shareDialog,\n } = useReportV2Actions();\n\n return (\n \n \n \n )\n }\n >\n \n {currentReport && (\n <>\n {\n setCurrentReport(undefined);\n reportBuilderDialog.closeDialog();\n }}\n onSave={onReportSaveSubmit}\n />\n {\n setCurrentReport(undefined);\n shareDialog.closeDialog();\n }}\n />\n \n )}\n }\n bodyText={}\n onOkay={onReportDelete}\n onCancel={deleteDialog.closeDialog}\n okText={ContentId.Yes}\n cancelText={ContentId.No}\n />\n {/* {\n setCurrentReport(undefined);\n reportHistoryDialog.closeDialog();\n }}\n /> */}\n \n );\n}\n\nfunction ReportsPageV2(props: {\n onReportAction: (\n report: ReportConfigV2,\n actionType: GridActionType,\n event?: React.MouseEvent\n ) => void;\n}) {\n const {\n reportConfigs: reportConfigsInventory,\n isLoading: reportInventoryLoading,\n } = useReportConfigsV2({\n reportType: ReportTypesV2.InventoryV2,\n });\n const { reportConfigs: reportConfigsSale, isLoading: reportSaleLoading } =\n useReportConfigsV2({\n reportType: ReportTypesV2.SaleV2,\n });\n const {\n reportConfigs: reportConfigsCommission,\n isLoading: reportCommissionLoading,\n } = useReportConfigsV2({\n reportType: ReportTypesV2.Commission,\n });\n\n const reports: ReportConfigV2[] = useMemo(() => {\n const reportsInventoryWithType = reportConfigsInventory.map((r) => ({\n ...r,\n reportType: ReportTypesV2.InventoryV2,\n }));\n const reportsSaleWithType = reportConfigsSale.map((r) => ({\n ...r,\n reportType: ReportTypesV2.SaleV2,\n }));\n const reportsCommissionWithType = reportConfigsCommission.map((r) => ({\n ...r,\n reportType: ReportTypesV2.Commission,\n }));\n return [\n ...reportsInventoryWithType,\n ...reportsSaleWithType,\n ...reportsCommissionWithType,\n ];\n }, [reportConfigsInventory, reportConfigsSale, reportConfigsCommission]);\n\n return (\n
    \n {reportInventoryLoading ||\n reportSaleLoading ||\n reportCommissionLoading ? (\n \n ) : (\n \n )}\n
    \n );\n}\n","import { ReportMetricsResponse } from 'src/contexts/ReportMetricsContext/ReportMetricsContextV2';\n\nexport const reportV2AccessorFn = (columnId: string) => {\n return (data: ReportMetricsResponse | null) =>\n data?.[columnId.toUpperCase()] ?? '';\n};\n","import { ColumnHelper } from '@tanstack/react-table';\nimport {\n COLUMN_DEFAULT_SIZE_BASE,\n COLUMN_MAX_SIZE,\n COLUMN_MIN_SIZE,\n} from 'src/contexts/ColumnResizingContext/ColumnResizingContext.types';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ReportMetricsResponse } from 'src/contexts/ReportMetricsContext/ReportMetricsContextV2';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { TableHeaderCellDiv } from 'src/core/ui/TableHeaderCellDiv';\nimport { FormatOption } from 'src/modals/EditTableColumns';\nimport { TableShimmeringDiv } from 'src/tables/Table/Table.styled';\nimport { ListingReportTableColumnId } from 'src/utils/columns/inventory/inventoryColumnUtils.types';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { YES_NO_ENUM_FILTER_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { ToYesNoEnum } from 'src/utils/eventQueryUtils';\nimport { applyNumberFormatting } from 'src/utils/numberFormatter';\nimport {\n getReportValueTypeDisplayConfig,\n sortMoney,\n} from 'src/utils/tableUtils';\nimport { Money, ReportValueType } from 'src/WebApiController';\n\nimport { DateCell } from '../Table/TableCells';\nimport { SHIMMERING_DIV_HEIGHT_REPORT } from './ReportTableCommon.constants';\nimport { reportV2AccessorFn } from './ReportTableCommon.utils';\nimport { TextCell } from './TextCell';\n\nexport const defaultColumnHelperAccessor = (\n columnHelper: ColumnHelper,\n columnId: string,\n headerContentId: ContentId,\n valueType: ReportValueType | undefined\n) => {\n const { isNumeric, isCurrency, isPercent, isDateTime, isBoolean, isArray } =\n getReportValueTypeDisplayConfig(valueType);\n\n const align = isNumeric ? 'right' : 'left';\n\n return columnHelper.accessor(reportV2AccessorFn(columnId), {\n id: columnId,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell(params) {\n const value = params.getValue();\n const valueAsArray = params.getValue();\n const valueAsMoney = params.getValue();\n\n if (!params.row.original) {\n return ;\n }\n\n // Handle columns with personalization\n if (isCurrency || valueAsMoney?.display != null) {\n return (\n \n {valueAsMoney.display ?? }\n \n );\n }\n\n if (isNumeric) {\n return (\n \n {value != null && !isNaN(Number(value))\n ? applyNumberFormatting({\n precision: FormatOption.Percent_RoundToTwo,\n inputNumber: value,\n isPercent: isPercent,\n })\n : (value ?? )}\n \n );\n }\n\n if (isDateTime) {\n const dateValue = isArray\n ? valueAsArray\n : value\n ? new Date(value).toISOString()\n : value;\n return (\n \n );\n }\n\n if (isBoolean) {\n const yesNoEnum = ToYesNoEnum(value as boolean | null);\n\n return (\n \n \n \n );\n }\n\n return (\n \n );\n },\n footer: function Footer(params) {\n const original = params.table.options.meta?.summaryData;\n\n if (!original) {\n return ;\n }\n const value = params.column.accessorFn?.(original, -1);\n\n if (isArray) {\n return null;\n }\n\n if (isCurrency) {\n const valueAsMoney = value as Money | null;\n return (\n \n {valueAsMoney ? (\n <>{valueAsMoney.display}\n ) : (\n \n )}\n \n );\n }\n\n if (isNumeric) {\n return (\n \n {value != null\n ? applyNumberFormatting({\n precision: FormatOption.Percent_RoundToTwo,\n inputNumber: value,\n isPercent: isPercent,\n })\n : (value ?? )}\n \n );\n }\n\n return {value};\n },\n sortingFn: isCurrency ? sortMoney : 'alphanumeric',\n });\n};\n","import { createColumnHelper } from '@tanstack/react-table';\nimport {\n COLUMN_MAX_SIZE,\n COLUMN_MIN_SIZE,\n} from 'src/contexts/ColumnResizingContext/ColumnResizingContext.types';\nimport {\n COLUMN_DEFAULT_SIZE_LG,\n COLUMN_DEFAULT_SIZE_XL,\n} from 'src/contexts/ColumnResizingContext/ColumnResizingContext.types';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ReportMetricsResponse } from 'src/contexts/ReportMetricsContext/ReportMetricsContextV2';\nimport { TableHeaderCellDiv } from 'src/core/ui/TableHeaderCellDiv';\nimport { useColumnUserSetting } from 'src/hooks/useColumnUserSetting';\nimport { FormatOption } from 'src/modals/EditTableColumns';\nimport { defaultColumnHelperAccessor } from 'src/tables/ReportTableCommon/DefaultColumnHelperAccessor';\nimport { LinkCell } from 'src/tables/ReportTableCommon/LinkCell';\nimport { SHIMMERING_DIV_HEIGHT_REPORT } from 'src/tables/ReportTableCommon/ReportTableCommon.constants';\nimport { reportV2AccessorFn } from 'src/tables/ReportTableCommon/ReportTableCommon.utils';\nimport { TextCell } from 'src/tables/ReportTableCommon/TextCell';\nimport { TableShimmeringDiv } from 'src/tables/Table/Table.styled';\nimport { DateCell } from 'src/tables/Table/TableCells';\nimport { CommissionReportTableValueColumnId } from 'src/utils/columns/commission/commissionColumnUtils.types';\nimport { CommissionReportTableGroupingColumnId } from 'src/utils/columns/commission/commissionColumnUtils.types';\nimport {\n COMMISSION_REPORT_TABLE_GROUPING_COLUMN_ID_TO_CONTENT_ID,\n COMMISSION_REPORT_TABLE_VALUE_COLUMN_ID_TO_CONTENT_ID,\n} from 'src/utils/constants/contentIdMaps';\nimport {\n createSaleEventPageUrl,\n getSaleDetailsRelativeUrl,\n} from 'src/utils/saleUtils';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport { ReportValueType } from 'src/WebApiController';\n\nconst columnHelper = createColumnHelper();\n\nconst SECTION_TYPE = SectionType.SalesReport;\n\nexport const COMMISSION_REPORT_SPECIAL_TABLE_COLUMNS_CONFIG = {\n [CommissionReportTableGroupingColumnId.EventDateLocal]: columnHelper.accessor(\n reportV2AccessorFn(CommissionReportTableGroupingColumnId.EventDateLocal),\n {\n id: CommissionReportTableGroupingColumnId.EventDateLocal,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_XL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n }) {\n const value = getValue();\n const { userDefinedPrecision = FormatOption.DateTime_MMDD } =\n useColumnUserSetting(columnId, SECTION_TYPE);\n\n if (!original) {\n return ;\n }\n\n const dateValue = value ? new Date(value).toISOString() : value;\n\n return (\n \n );\n },\n }\n ),\n [CommissionReportTableGroupingColumnId.SaleId]: columnHelper.accessor(\n reportV2AccessorFn(CommissionReportTableGroupingColumnId.SaleId),\n {\n id: CommissionReportTableGroupingColumnId.SaleId,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ getValue }) => {\n const saleId = getValue();\n\n if (!saleId) {\n return ;\n }\n\n const saleIds = [Number(saleId)];\n\n return (\n `#${saleId}`)}\n url={saleIds.map((saleId) => getSaleDetailsRelativeUrl(saleId))}\n separator={{', '}}\n openInNewTab\n align=\"left\"\n style={{ fontWeight: 600 }}\n />\n );\n },\n }\n ),\n [CommissionReportTableGroupingColumnId.EventId]: columnHelper.accessor(\n reportV2AccessorFn(CommissionReportTableGroupingColumnId.EventId),\n {\n id: CommissionReportTableGroupingColumnId.EventId,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: (params) => {\n const eventId = params.getValue();\n if (!eventId) {\n return ;\n }\n const eventUrl = createSaleEventPageUrl(eventId.toString());\n\n return (\n \n );\n },\n }\n ),\n} as const;\n\nexport const commissionReportTableColumnDef = (\n columnId: string,\n valueType: ReportValueType | undefined\n) => {\n const specialConfig = Object.entries(\n COMMISSION_REPORT_SPECIAL_TABLE_COLUMNS_CONFIG\n ).find(([key]) => key === columnId)?.[1];\n\n if (specialConfig) {\n return specialConfig;\n }\n\n const headerContentId =\n COMMISSION_REPORT_TABLE_GROUPING_COLUMN_ID_TO_CONTENT_ID[\n columnId as unknown as CommissionReportTableGroupingColumnId\n ] ||\n COMMISSION_REPORT_TABLE_VALUE_COLUMN_ID_TO_CONTENT_ID[\n columnId as unknown as CommissionReportTableValueColumnId\n ];\n\n return defaultColumnHelperAccessor(\n columnHelper,\n columnId,\n headerContentId,\n valueType\n );\n};\n","import { ColumnDef } from '@tanstack/react-table';\nimport { createContext, PropsWithChildren, useContext, useMemo } from 'react';\nimport {\n ReportMetricsResponse,\n ReportValueTypesReponse,\n} from 'src/contexts/ReportMetricsContext/ReportMetricsContextV2';\nimport { ReportConfigV2 } from 'src/hooks/useReportConfigsV2';\n\nimport { commissionReportTableColumnDef } from './configs/CommissionReportTableColumnsConfig';\n\ntype CommissionReportTableColumnDefContextType = {\n displayedColumnsConfig: ColumnDef[] | undefined;\n};\n\nconst CommissionReportTableColumnDefContext =\n createContext({\n displayedColumnsConfig: undefined,\n });\n\nexport const CommissionReportTableColumnDefContextV2 = ({\n report,\n reportValueTypes,\n children,\n}: PropsWithChildren<{\n report: ReportConfigV2;\n reportValueTypes: ReportValueTypesReponse | undefined;\n}>) => {\n const displayedColumnsConfig = useMemo(() => {\n const columns = [\n ...(report.request.rowGroupings?.map((c) => c.columnName) ?? []),\n ...(report.request.aggregations?.map((c) => c.columnName) ?? []),\n ];\n\n return columns.map((columnId) =>\n commissionReportTableColumnDef(\n columnId,\n reportValueTypes?.[columnId.toUpperCase()]\n )\n );\n }, [\n report.request.aggregations,\n report.request.rowGroupings,\n reportValueTypes,\n ]);\n\n return (\n \n {children}\n \n );\n};\n\nexport const useCommissionReportTableColumnDefV2 = () =>\n useContext(CommissionReportTableColumnDefContext);\n","import {\n functionalUpdate,\n PaginationState,\n SortingState,\n TableOptions,\n} from '@tanstack/react-table';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport { useActiveSortTableColumnContext } from 'src/contexts/ActiveSortTableColumnContext';\nimport { ColumnResizingContextProvider } from 'src/contexts/ColumnResizingContext/ColumnResizingContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport {\n ReportMetricsResponse,\n useReportMetricsContextV2,\n} from 'src/contexts/ReportMetricsContext/ReportMetricsContextV2';\nimport { NoData, Table, VirtuosoScrollEvent } from 'src/tables/Table';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { ReportTableV2Props } from '../ReportTableCommon/ReportTableCommon.types';\nimport {\n CommissionReportTableColumnDefContextV2,\n useCommissionReportTableColumnDefV2,\n} from './CommissionReportTableColumnDefContextV2';\n\nexport const CommissionReportTableV2 = ({\n report,\n reportValueTypes,\n ...rest\n}: ReportTableV2Props) => {\n return (\n \n \n \n );\n};\n\nconst ReportTableInternal = ({\n metricsData,\n summaryData,\n report,\n onMount,\n onUnmount,\n initState,\n className,\n}: ReportTableV2Props) => {\n const {\n isFetchingNextPage,\n fetchNextPage,\n hasNextPage,\n isReportConfigEmpty,\n } = useReportMetricsContextV2();\n\n // Enable passing in table state as parameters -- we can remount with the last state the user was on\n const { activeSortTableColumn, setActiveSortTableColumn } =\n useActiveSortTableColumnContext();\n const [sorting, setSorting] = useState(\n activeSortTableColumn || initState?.sorting || []\n );\n\n const data = useMemo(() => {\n const shimmeringDivCount = 500;\n return metricsData ?? Array(shimmeringDivCount).fill(null);\n }, [metricsData]);\n\n const [pagination, setPagination] = useState({\n pageIndex: 0,\n pageSize: Math.max(1, data.length),\n });\n\n useEffect(() => {\n if (pagination.pageSize !== data.length) {\n setPagination((prevState) => ({\n ...prevState,\n pageSize: data.length,\n }));\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [data, report]);\n\n useEffect(() => {\n onMount?.();\n });\n\n useEffect(() => {\n /**\n * Intent for `onMount` is use with 'windowing' in order to maintain user state\n * when the component is scrolled back into view.\n * Anything that needs to be persisted in `react-table` state should be added here.\n * Only update on unmount to ensure we aren't doing too many re-renders.\n */\n return () => onUnmount?.({ pagination, sorting });\n }, [pagination, sorting, onUnmount]);\n\n const { displayedColumnsConfig = [] } = useCommissionReportTableColumnDefV2();\n\n const onScroll = useCallback(\n (virtuosoScrollEvent: VirtuosoScrollEvent) => {\n const { element } = virtuosoScrollEvent;\n const { scrollHeight, scrollTop, clientHeight } = element;\n // once the user has scrolled within 500px of the bottom of the table, fetch more data if we can\n // TODO change this to constant\n if (\n scrollHeight - scrollTop - clientHeight < 500 &&\n !isFetchingNextPage &&\n hasNextPage\n ) {\n fetchNextPage();\n }\n },\n [fetchNextPage, hasNextPage, isFetchingNextPage]\n );\n\n const options: Partial> = useMemo(\n () => ({\n data,\n meta: {\n summaryData,\n },\n columns: displayedColumnsConfig,\n state: {\n pagination,\n sorting,\n },\n onPaginationChange: setPagination,\n onSortingChange: (sortingUpdaterFn) => {\n const newSortVal = functionalUpdate(sortingUpdaterFn, sorting);\n setSorting(newSortVal);\n setActiveSortTableColumn(newSortVal);\n },\n enableRowSelection: true,\n }),\n [\n data,\n summaryData,\n displayedColumnsConfig,\n pagination,\n sorting,\n setActiveSortTableColumn,\n ]\n );\n\n return isReportConfigEmpty ? (\n <>\n ) : data?.length > 0 ? (\n \n \n \n ) : (\n \n \n \n );\n};\n\nexport default CommissionReportTableV2;\n","import { Feature, Permission } from 'src/WebApiController';\n\nimport { ReportConfigV2 } from './useReportConfigsV2';\nimport { useUserHasAnyOfPermissions } from './useUserHasAnyOfPermissions';\nimport { useUserHasFeature } from './useUserHasFeature';\n\nexport const useReportPermissions = (reportConfig?: ReportConfigV2) => {\n const hasUpdateReportPermission = useUserHasAnyOfPermissions(\n Permission.Reports_UpdateReports\n );\n\n const hasReportingV2Feature = useUserHasFeature(Feature.ReportingV2);\n const hasReportSinglePagedV1V2Feature = useUserHasFeature(\n Feature.ReportSinglePagedV1V2\n );\n\n const hasViewReportPermissions = useUserHasAnyOfPermissions(\n Permission.Reports_ViewAll,\n Permission.Reports_ViewGlobalReports,\n Permission.Reports_ViewInventoryReports,\n Permission.Reports_ViewSalesReports\n );\n\n const hasUpdateOwnReportPermission =\n useUserHasAnyOfPermissions(Permission.Reports_UpdateReportsOwned) &&\n (reportConfig?.isOwner ?? false);\n\n const isGlobalReport = reportConfig?.globalReportTypeId !== undefined;\n\n const canUpdateReport =\n reportConfig != null &&\n (hasUpdateReportPermission || hasUpdateOwnReportPermission) &&\n !isGlobalReport;\n\n const hasAccessToReportingV2 =\n hasReportingV2Feature &&\n hasViewReportPermissions &&\n !hasReportSinglePagedV1V2Feature;\n\n return {\n canUpdateReport,\n canViewReport: hasViewReportPermissions,\n hasAccessToReportingV2,\n hasReportSinglePagedV1V2Feature,\n };\n};\n","import { debounce } from 'lodash-es';\nimport { useCallback, useEffect } from 'react';\nimport isEqual from 'react-fast-compare';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { ReportBuilderFilterInputV2 } from 'src/dialogs/ReportBuilderDialog/ReportBuilderFilterInputV2';\nimport { useReportConfigActionsV2 } from 'src/hooks/useReportConfigActionsV2';\nimport { ReportConfigV2 } from 'src/hooks/useReportConfigsV2';\nimport { useReportPermissions } from 'src/hooks/useReportPermissions';\n\nimport * as styles from './ReportsFilterToolbar.css';\n\nexport const ReportsFilterToolbarV2 = ({\n reportConfig,\n}: {\n reportConfig: ReportConfigV2;\n}) => {\n const methods = useForm({\n defaultValues: reportConfig,\n });\n\n const { canUpdateReport } = useReportPermissions(reportConfig);\n\n // Report config can be changed elsewhere like the table editor\n useEffect(() => {\n if (!isEqual(methods.formState.defaultValues, reportConfig)) {\n methods.reset(reportConfig);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [reportConfig]);\n\n const { upsertReportConfig } = useReportConfigActionsV2();\n\n const filters = methods.watch('request.filters');\n const hiddenFilterItemIds = methods.watch('hiddenFilterItemIds');\n const viewableFilterItemIds = methods.watch('viewableFilterItemIds');\n const editableFilterItemIds = methods.watch('editableFilterItemIds');\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const debouncedUpsertReportConfig = useCallback(\n debounce((report: ReportConfigV2) => {\n upsertReportConfig(report);\n }, 500),\n [upsertReportConfig]\n );\n\n const onSubmit = (data: ReportConfigV2) => {\n if (\n canUpdateReport &&\n (!isEqual(data.request.filters, reportConfig.request.filters) ||\n !isEqual(data.hiddenFilterItemIds, reportConfig.hiddenFilterItemIds) ||\n !isEqual(\n data.viewableFilterItemIds,\n reportConfig.viewableFilterItemIds\n ) ||\n !isEqual(\n data.editableFilterItemIds,\n reportConfig.editableFilterItemIds\n ))\n ) {\n debouncedUpsertReportConfig(data);\n }\n };\n\n useEffect(() => {\n methods.handleSubmit(onSubmit)();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n filters,\n hiddenFilterItemIds,\n viewableFilterItemIds,\n editableFilterItemIds,\n ]);\n\n return (\n \n
    \n \n
    \n
    \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const ReportEditTableIcon = (props: PosIconProps) => {\n return (\n // It's import for the viewbox fo this SVG to stay 20 else it won't resize properly\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n","import { ComponentProps, useCallback, useMemo, useState } from 'react';\nimport { ButtonWithIcon } from 'src/components/Buttons';\nimport { ReportExportOptionsV2 } from 'src/components/Reports/ReportsExport/ReportsExport.types';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { vars } from 'src/core/themes';\nimport { DropdownMenu, Stack } from 'src/core/ui';\nimport { RotatingWrapper } from 'src/core/ui/AnimatingWrapper';\nimport { ShareReportDialog } from 'src/dialogs/ShareReportDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport {\n ReportConfigV2,\n useReportConfigsV2,\n} from 'src/hooks/useReportConfigsV2';\nimport { useReportPermissions } from 'src/hooks/useReportPermissions';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { CopyIcon } from 'src/svgs';\nimport { ReportEditTableIcon } from 'src/svgs/ReportEditTableIcon';\nimport {\n IconsFill,\n MoreIcon,\n ProcessingIcon,\n ShareIcon,\n} from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { QueryWithViewMode } from 'src/utils/eventQueryUtils';\nimport { ReportTypesV2 } from 'src/utils/reportsUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { Feature, Permission } from 'src/WebApiController';\n\nimport { ReportsInventoryExportV2 } from '../ReportsExport/ReportsInventoryExportV2';\nimport { ReportsSaleExportV2 } from '../ReportsExport/ReportsSaleExportV2';\nimport * as styles from './ReportsPageToolbar.css';\n\nexport const ReportsPageToolbarV2 = ({\n reportConfig,\n isEditTable,\n setIsEditTable,\n}: {\n reportConfig: ReportConfigV2 | undefined;\n isEditTable: boolean;\n setIsEditTable: (isEditTable: boolean) => void;\n}) => {\n const shareDialog = useBasicDialog();\n const { showErrorDialog } = useErrorBoundaryContext();\n const { filterQuery } = useFilterQueryContext();\n\n const { canUpdateReport } = useReportPermissions(reportConfig);\n const hasExportInventoryFeature = useUserHasFeature(Feature.ExportInventory);\n const hasReportingV2Feature = useUserHasFeature(Feature.ReportingV2);\n const hasCreateReportFeature = useUserHasAnyOfPermissions(\n Permission.Reports_CreateReports\n );\n\n const [reportExportOptions, setReportExportOptions] =\n useState(null);\n\n const onReportExported = () => {\n setReportExportOptions(null);\n };\n\n const reportConfigWithTempQuery = useMemo(() => {\n if (!reportConfig) {\n return reportConfig;\n }\n return {\n ...reportConfig,\n request: {\n ...reportConfig.request,\n filters: filterQuery,\n },\n } as ReportConfigV2;\n }, [filterQuery, reportConfig]);\n\n const {\n upsertReportConfig: upsertReportConfigInventory,\n getReportConfigNameForDuplicate: getReportConfigNameForDuplicateInventory,\n } = useReportConfigsV2({\n reportType: ReportTypesV2.InventoryV2,\n });\n\n const {\n upsertReportConfig: upsertReportConfigSale,\n getReportConfigNameForDuplicate: getReportConfigNameForDuplicateSale,\n } = useReportConfigsV2({\n reportType: ReportTypesV2.SaleV2,\n });\n\n const invokeUpsertReport = useCallback(\n async (report: ReportConfigV2) => {\n return await tryInvokeApi(\n async () => {\n if (report.reportType === ReportTypesV2.InventoryV2) {\n return await upsertReportConfigInventory(report.reportId, report);\n } else {\n // report.reportType === ReportTypesV2.SaleV2\n return await upsertReportConfigSale(report.reportId, report);\n }\n },\n (error) => {\n showErrorDialog('ReportClient.mergeReport', error, {\n trackErrorData: report,\n });\n }\n );\n },\n [showErrorDialog, upsertReportConfigInventory, upsertReportConfigSale]\n );\n\n const onReportShareSubmit = useCallback<\n ComponentProps['onOkay']\n >(\n async (roleIds, sellerUserIds) => {\n const updatedReport = {\n ...reportConfig!,\n roleIdsToShare: roleIds,\n sellerUserIdsToShare: sellerUserIds,\n };\n await invokeUpsertReport(updatedReport);\n shareDialog.closeDialog();\n },\n [reportConfig, invokeUpsertReport, shareDialog]\n );\n\n const onReportDuplicateSubmit = useCallback(async () => {\n const newReport = {\n ...reportConfigWithTempQuery!,\n reportId: null,\n reportName:\n reportConfig!.reportType === ReportTypesV2.InventoryV2\n ? getReportConfigNameForDuplicateInventory(reportConfig!.reportName)\n : getReportConfigNameForDuplicateSale(reportConfig!.reportName),\n } as ReportConfigV2;\n const newReportId = await invokeUpsertReport(newReport);\n if (newReportId) {\n if (reportConfig!.reportType === ReportTypesV2.InventoryV2) {\n window.open(\n `/reports/inventory/${newReportId}`,\n '_blank',\n 'noreferrer'\n );\n } else {\n // report.reportType === ReportTypesV2.SaleV2\n window.open(`/reports/sale/${newReportId}`, '_blank', 'noreferrer');\n }\n }\n }, [\n reportConfigWithTempQuery,\n reportConfig,\n getReportConfigNameForDuplicateInventory,\n getReportConfigNameForDuplicateSale,\n invokeUpsertReport,\n ]);\n\n return (\n <>\n
    \n {reportConfig?.reportName ? (\n

    {reportConfig.reportName}

    \n ) : null}\n \n {Boolean(!isEditTable && canUpdateReport) && (\n }\n textContentId={ContentId.EditTable}\n onClick={() => setIsEditTable(true)}\n />\n )}\n {reportConfig &&\n hasReportingV2Feature && // If they come from V1, we don't allow any actions yet\n reportConfig.reportType != ReportTypesV2.Commission && (\n <>\n {reportExportOptions ? (\n \n \n \n ) : (\n \n \n
    \n \n
    \n
    \n \n \n {reportConfig.isOwner && (\n <>\n \n \n \n \n \n \n \n )}\n {/* {(hasExportInventoryFeature ||\n reportConfig.request.rowGroupings?.some(\n (g) =>\n g.columnName ===\n ListingReportTableColumnId.ListingId\n )) && (\n \n \n \n \n \n \n \n \n setReportExportOptions({\n reportToExport: reportConfigWithTempQuery!,\n fileType: ReportFileType.CSV,\n })\n }\n >\n \n \n \n setReportExportOptions({\n reportToExport: reportConfigWithTempQuery!,\n fileType: ReportFileType.XLSX,\n })\n }\n >\n \n \n \n \n )} */}\n {hasCreateReportFeature && (\n \n \n \n \n \n \n )}\n \n \n
    \n )}\n \n )}\n
    \n
    \n {\n shareDialog.closeDialog();\n }}\n centered\n />\n {reportConfig && (\n <>\n {reportConfig.reportType === ReportTypesV2.InventoryV2 ? (\n \n ) : (\n \n )}\n \n )}\n \n );\n};\n","import { Colors } from 'src/core/themes/constants/colors';\n\nimport { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const DragHandleIcon = (props: PosIconProps) => {\n return (\n \n \n \n );\n};\n","import clsx from 'clsx';\nimport { ReactNode } from 'react';\nimport { DropWrapper } from 'src/core/POS/DragAndDropSort/DragAndDrop';\nimport { DragHandleIcon } from 'src/svgs/DragHandleIcon';\n\nimport * as styles from './MetricsOptionsListItem.css';\n\ntype ColumnListItemProps = {\n id: string;\n children: ReactNode;\n actionButton?: ReactNode;\n highlighted?: boolean;\n disabled?: boolean;\n};\n\nexport const SortableMetricsOptionsListItem = ({\n id,\n children,\n actionButton,\n highlighted,\n disabled,\n}: ColumnListItemProps) => {\n return (\n \n \n {children}\n \n \n );\n};\n\nexport const MetricsOptionsListItem = ({\n children,\n actionButton,\n highlighted,\n isDragging,\n}: ColumnListItemProps & {\n isDragging?: boolean;\n}) => {\n return (\n \n
    \n \n {children}\n
    \n {actionButton &&
    {actionButton}
    }\n \n );\n};\n","import { useDroppable } from '@dnd-kit/core';\nimport { SortableContext } from '@dnd-kit/sortable';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { SortableMetricsOptionsListItem } from './MetricsOptionsListItem';\nimport * as styles from './ReportsTableEditor.css';\n\nexport const MetricsInputDroppable = ({\n id,\n placeholderContentId,\n valueOptionsContent,\n selectedValues,\n disabled,\n}: {\n id: string;\n placeholderContentId?: ContentId;\n valueOptionsContent: Record;\n disabled?: boolean;\n selectedValues: string[];\n}) => {\n const { isOver, setNodeRef } = useDroppable({\n id: id,\n });\n\n return (\n \n \n \n {selectedValues.map((value) => (\n \n \n \n ))}\n {placeholderContentId && (\n \n \n \n \n \n )}\n \n \n \n );\n};\n","import { useDroppable } from '@dnd-kit/core';\nimport { SortableContext } from '@dnd-kit/sortable';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { SortableMetricsOptionsListItem } from './MetricsOptionsListItem';\nimport * as styles from './ReportsTableEditor.css';\n\n/**\n * The sections that represent the Add Columns and Current Columns for the Edit Columns experience\n */\nexport const MetricsOptionsList = ({\n id,\n titleContentId,\n availableValues,\n groupByOptionsContent,\n valueOptionsContent,\n disabled,\n}: {\n id: string;\n titleContentId?: ContentId;\n availableValues: string[];\n groupByOptionsContent: Record;\n valueOptionsContent: Record;\n disabled?: boolean;\n}) => {\n const { isOver, setNodeRef } = useDroppable({\n id,\n });\n\n return (\n \n
    \n {titleContentId && }\n \n {availableValues.map((value) => (\n \n {Object.keys(valueOptionsContent).includes(value) && (\n
    \n \n
    \n )}\n \n }\n >\n \n \n ))}\n \n
    \n
    \n );\n};\n","import {\n closestCorners,\n DndContext,\n DragOverEvent,\n DragOverlay,\n DragStartEvent,\n} from '@dnd-kit/core';\nimport { debounce } from 'lodash-es';\nimport {\n ComponentProps,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport isEqual from 'react-fast-compare';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport {\n Content,\n getContent,\n useContentContext,\n} from 'src/contexts/ContentContext';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { shared } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { useReportConfigActionsV2 } from 'src/hooks/useReportConfigActionsV2';\nimport { ReportConfigV2 } from 'src/hooks/useReportConfigsV2';\nimport { ListingReportArrayAggregateColumnIds } from 'src/utils/columns/inventory/inventoryColumnUtils.types';\nimport { SalesReportTableValueColumnId } from 'src/utils/columns/sales/salesColumnUtils.types';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n LISTING_REPORT_TABLE_GROUPING_COLUMN_ID_TO_CONTENT_ID,\n LISTING_REPORT_TABLE_VALUE_COLUMN_ID_TO_CONTENT_ID,\n SALES_REPORT_TABLE_GROUPING_COLUMN_ID_TO_CONTENT_ID,\n SALES_REPORT_TABLE_VALUE_COLUMN_ID_TO_CONTENT_ID,\n} from 'src/utils/constants/contentIdMaps';\nimport { ReportTypesV2 } from 'src/utils/reportsUtils';\nimport { ReportColumn } from 'src/WebApiController';\n\nimport { MetricsInputDroppable } from './MetricsInputDroppable';\nimport { MetricsOptionsList } from './MetricsOptionsList';\nimport { MetricsOptionsListItem } from './MetricsOptionsListItem';\nimport * as styles from './ReportsTableEditor.css';\n\nexport const ReportsTableEditorForm = ({\n reportConfig,\n disabled,\n}: {\n reportConfig: ReportConfigV2;\n disabled?: boolean;\n}) => {\n const methods = useForm({\n defaultValues: reportConfig,\n });\n\n // Report config can be changed elsewhere like the filter bar\n useEffect(() => {\n if (!isEqual(methods.formState.defaultValues, reportConfig)) {\n methods.reset(reportConfig);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [reportConfig]);\n\n return (\n \n \n \n );\n};\n\nconst ROWS_INPUT_KEY = 'rows-input';\nconst VALUES_INPUT_KEY = 'values-input';\nconst OPTIONS_LIST_KEY = 'metrics-options-list';\n\nconst ReportsTableEditorContent = ({\n watch,\n formState,\n handleSubmit,\n setValue,\n disabled,\n}: Omit<\n ComponentProps>,\n 'children' | 'trigger' | 'reset' | 'unregister'\n> & {\n disabled?: boolean;\n}) => {\n const metricsError = formState.errors.request?.aggregations?.message;\n const contentContext = useContentContext();\n\n const groupbyField = 'request.rowGroupings';\n const sortByField = 'request.orderBy';\n const metricsField = 'request.aggregations';\n\n const reportType = watch('reportType');\n const groupBy = watch(groupbyField);\n const metrics = watch(metricsField);\n const sortBy = watch(sortByField);\n\n const { upsertReportConfig } = useReportConfigActionsV2();\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const debouncedUpsertReportConfig = useCallback(\n debounce((report: ReportConfigV2) => {\n if (disabled) {\n return;\n }\n upsertReportConfig(report);\n }, 1000),\n [disabled, upsertReportConfig]\n );\n\n const onSubmit = useCallback(\n async (report: ReportConfigV2) => {\n if (disabled) {\n return;\n }\n\n if (\n !isEqual(\n report.request.rowGroupings,\n formState.defaultValues?.request?.rowGroupings\n ) ||\n !isEqual(\n report.request.orderBy,\n formState.defaultValues?.request?.orderBy\n ) ||\n !isEqual(\n report.request.columnGroupings,\n formState.defaultValues?.request?.columnGroupings\n ) ||\n !isEqual(\n report.request.aggregations,\n formState.defaultValues?.request?.aggregations\n )\n ) {\n await debouncedUpsertReportConfig(report);\n }\n },\n [\n debouncedUpsertReportConfig,\n disabled,\n formState.defaultValues?.request?.aggregations,\n formState.defaultValues?.request?.columnGroupings,\n formState.defaultValues?.request?.orderBy,\n formState.defaultValues?.request?.rowGroupings,\n ]\n );\n\n useEffect(() => {\n handleSubmit(onSubmit)();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [groupBy, metrics]);\n\n const groupingOptions = useMemo(() => {\n if (reportType === ReportTypesV2.InventoryV2) {\n return LISTING_REPORT_TABLE_GROUPING_COLUMN_ID_TO_CONTENT_ID;\n } else {\n return SALES_REPORT_TABLE_GROUPING_COLUMN_ID_TO_CONTENT_ID;\n }\n }, [reportType]);\n\n const valueOptions = useMemo(() => {\n if (reportType === ReportTypesV2.InventoryV2) {\n return LISTING_REPORT_TABLE_VALUE_COLUMN_ID_TO_CONTENT_ID;\n } else {\n return SALES_REPORT_TABLE_VALUE_COLUMN_ID_TO_CONTENT_ID;\n }\n }, [reportType]);\n\n const allOptions = useMemo(() => {\n const groupingOptionsSortedByContent = Object.entries(groupingOptions)\n .toSorted(([, a], [, b]) =>\n getContent(a, contentContext).localeCompare(\n getContent(b, contentContext)\n )\n )\n .map(([key, value]) => key);\n\n const valueOptionsSortedByContent = Object.entries(valueOptions)\n .toSorted(([, a], [, b]) =>\n getContent(a, contentContext).localeCompare(\n getContent(b, contentContext)\n )\n )\n .map(([key, value]) => key);\n\n return [...groupingOptionsSortedByContent, ...valueOptionsSortedByContent];\n }, [contentContext, groupingOptions, valueOptions]);\n\n const [items, setItems] = useState>({\n [ROWS_INPUT_KEY]: [],\n [VALUES_INPUT_KEY]: [],\n [OPTIONS_LIST_KEY]: [],\n });\n\n const [activeId, setActiveId] = useState(null);\n\n useEffect(() => {\n setItems({\n [ROWS_INPUT_KEY]: (groupBy || []).map((c: ReportColumn) => c.columnName),\n [VALUES_INPUT_KEY]: (metrics || []).map(\n (c: ReportColumn) => c.columnName\n ),\n [OPTIONS_LIST_KEY]: allOptions.filter(\n (columnName) =>\n !(\n (groupBy || []).some(\n (g: ReportColumn) => g.columnName === columnName\n ) ||\n (metrics || []).some(\n (m: ReportColumn) => m.columnName === columnName\n )\n )\n ),\n });\n }, [metrics, groupBy, allOptions]);\n\n const findContainerKey = useCallback(\n (overId: string) => {\n if (items[ROWS_INPUT_KEY].includes(overId) || overId === ROWS_INPUT_KEY) {\n return ROWS_INPUT_KEY;\n }\n if (\n items[VALUES_INPUT_KEY].includes(overId) ||\n overId === VALUES_INPUT_KEY\n ) {\n return VALUES_INPUT_KEY;\n }\n if (\n items[OPTIONS_LIST_KEY].includes(overId) ||\n overId === OPTIONS_LIST_KEY\n ) {\n return OPTIONS_LIST_KEY;\n }\n return null;\n },\n [items]\n );\n\n const moveOver = (activeId: string, overId: string) => {\n const overContainerKey = findContainerKey(overId);\n if (!overContainerKey) {\n return;\n }\n const activeContainerKey = findContainerKey(activeId);\n if (!activeContainerKey) {\n return;\n }\n\n // Stop-gap to prevent moving grouping options to values and vice versa\n if (activeContainerKey !== overContainerKey) {\n if (\n overContainerKey === ROWS_INPUT_KEY &&\n !Object.keys(groupingOptions).includes(activeId)\n ) {\n return; // Prevent moving non-grouping options to rows\n }\n\n if (\n overContainerKey === VALUES_INPUT_KEY &&\n !Object.keys(valueOptions).includes(activeId)\n ) {\n return; // Prevent moving non-value options to values\n }\n }\n\n const newItems = { ...items };\n const activeIndex = newItems[activeContainerKey].indexOf(activeId);\n const activeItems = newItems[activeContainerKey].filter(\n (item) => item !== activeId\n );\n newItems[activeContainerKey] = activeItems;\n\n let overIndex = newItems[overContainerKey].indexOf(overId);\n if (overIndex === -1) {\n // If overId is the container itself, set it to the end of the list\n overIndex = newItems[overContainerKey].length;\n }\n\n // Move down the overIndex if the active item is before it in the same container\n if (activeIndex <= overIndex && activeContainerKey === overContainerKey) {\n overIndex++;\n }\n\n const overItems = [\n ...newItems[overContainerKey].slice(0, overIndex),\n activeId,\n ...newItems[overContainerKey].slice(overIndex),\n ];\n newItems[overContainerKey] = overItems;\n\n setItems(newItems);\n };\n\n const recalculateReportColumns = useCallback(() => {\n const newGroupBy = items[ROWS_INPUT_KEY].map((columnName) => ({\n columnName,\n columnValue: columnName, // Assume columnValue is the same as columnName\n }));\n\n const newSortBy = items[ROWS_INPUT_KEY][0];\n if (sortBy !== newSortBy) {\n setValue(sortByField, newSortBy);\n }\n\n if (!isEqual(newGroupBy, groupBy)) {\n setValue(groupbyField, newGroupBy);\n }\n\n const newMetrics = items[VALUES_INPUT_KEY].map((columnName) => {\n const columnValue =\n columnName.toLocaleLowerCase() ===\n SalesReportTableValueColumnId.Margin.toLocaleLowerCase()\n ? columnName\n : ListingReportArrayAggregateColumnIds.includes(columnName)\n ? `ARRAY_UNION_AGG(${columnName})`\n : `SUM(${columnName})`;\n return { columnName, columnValue };\n });\n\n if (!isEqual(newMetrics, metrics)) {\n setValue(metricsField, newMetrics);\n }\n }, [items, sortBy, groupBy, metrics, setValue]);\n\n const onDragOver = (event: DragOverEvent) => {\n const { active, over } = event;\n if (!active || !over) {\n return;\n }\n\n const activeId = active.id as string;\n const overId = over.id as string;\n\n // Prevent dragging over itself\n if (activeId === overId) {\n return;\n }\n\n moveOver(activeId, overId);\n };\n\n const onDragEnd = (event: DragOverEvent) => {\n recalculateReportColumns();\n setActiveId(null);\n };\n\n const onDragStart = (event: DragStartEvent) => {\n const { active } = event;\n if (!active) {\n return;\n }\n\n const activeId = active.id as string;\n setActiveId(activeId);\n };\n\n return (\n \n \n
    \n \n \n \n \n }\n />\n
    \n \n
    \n
    \n \n \n \n \n }\n />\n
    \n \n
    \n
    \n
    \n \n
    \n \n {activeId ? (\n \n )[activeId] ||\n (groupingOptions as Record)[activeId]\n }\n />\n \n ) : null}\n \n \n );\n};\n","import { Content } from 'src/contexts/ContentContext';\nimport { shared } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { ReportConfigV2 } from 'src/hooks/useReportConfigsV2';\nimport { CrossIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport * as styles from './ReportsTableEditor.css';\nimport { ReportsTableEditorForm } from './ReportsTableEditorForm';\n\nexport const ReportsTableEditor = ({\n reportConfig,\n disabled,\n onClose,\n}: {\n reportConfig: ReportConfigV2;\n disabled?: boolean;\n onClose: () => void;\n}) => {\n return (\n \n \n \n \n \n \n \n \n \n );\n};\n","import { ReactNode, useEffect, useState } from 'react';\nimport { useLocation } from 'react-router-dom';\nimport { useReportMetricsContextV2 } from 'src/contexts/ReportMetricsContext/ReportMetricsContextV2';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { Stack } from 'src/core/ui';\nimport { ReportConfigV2 } from 'src/hooks/useReportConfigsV2';\nimport { ReportsV2LocationState } from 'src/navigations/Routes/Reports/ReportsV2.types';\n\nimport { ReportsFilterToolbarV2 } from '../ReportsFilterToolbar/ReportsFilterToolbarV2';\nimport { ReportsPageToolbarV2 } from '../ReportsPageToolbar/ReportsPageToolbarV2';\nimport { ReportsTableEditor } from '../ReportsTableEditor';\nimport * as styles from './ReportsPageLayout.css';\n\nexport const ReportsPageLayout = ({\n reportConfig,\n reportTable,\n}: {\n reportConfig: ReportConfigV2;\n reportTable: ReactNode;\n}) => {\n const { isLoading } = useReportMetricsContextV2();\n const [isEditTable, setIsEditTable] = useState(false);\n\n const location = useLocation();\n\n useEffect(() => {\n // Check if the location state has a value for isCreateNewReport\n const isCreateNewReport = (location.state as ReportsV2LocationState)\n ?.isCreateNewReport;\n\n if (isCreateNewReport) {\n setIsEditTable(true);\n } else {\n // Default to false if no state is provided\n setIsEditTable(false);\n }\n }, [location]);\n\n return (\n
    \n \n \n\n \n {isLoading ? (\n \n ) : (\n
    {reportTable}
    \n )}\n
    \n {isEditTable && (\n setIsEditTable(false)}\n />\n )}\n
    \n );\n};\n","import { useReportMetricsContextV2 } from 'src/contexts/ReportMetricsContext/ReportMetricsContextV2';\nimport { ReportConfigV2 } from 'src/hooks/useReportConfigsV2';\nimport CommissionReportTableV2 from 'src/tables/SalesTable/CommissionReportTableV2';\n\nimport { ReportsPageLayout } from '../Reports/ReportsPageLayout';\nimport * as styles from './ReportsCommissionPage.css';\n\nexport function ReportsCommissionPage({\n reportConfig,\n}: {\n reportConfig: ReportConfigV2;\n}) {\n const { reportMetrics, reportSummary, isLoading, reportValueTypes } =\n useReportMetricsContextV2();\n\n return (\n \n }\n />\n );\n}\n","import { PropsWithChildren, useCallback } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { FilterQueryContextProvider } from 'src/contexts/FilterQueryContext';\nimport { ReportMetricsContextProviderV2 } from 'src/contexts/ReportMetricsContext/ReportMetricsContextV2';\nimport { ReportConfigV2 } from 'src/hooks/useReportConfigsV2';\nimport { EmptyCommissionQuery } from 'src/utils/eventQueryUtils';\nimport { ReportV2Client, UIReportCommissionQuery } from 'src/WebApiController';\n\nexport function ReportsCommissionContextProviderV2({\n reportConfig,\n isExport,\n children,\n}: PropsWithChildren<{\n reportConfig: ReportConfigV2;\n isExport?: boolean;\n}>) {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const getReportMetrics = useCallback(\n (filters: UIReportCommissionQuery, pageNumber: number) => {\n return new ReportV2Client(\n activeAccountWebClientConfig\n ).getCommissionReportMetrics({\n ...reportConfig.request,\n pageNumber,\n filters,\n });\n },\n [activeAccountWebClientConfig, reportConfig]\n );\n\n const getReportMetricsSummary = useCallback(\n (filters: UIReportCommissionQuery) => {\n return new ReportV2Client(\n activeAccountWebClientConfig\n ).getCommissionReportSummary({\n ...reportConfig.request,\n filters,\n });\n },\n [activeAccountWebClientConfig, reportConfig]\n );\n\n return (\n \n initialQuery={reportConfig.request.filters as UIReportCommissionQuery}\n emptyQuery={EmptyCommissionQuery}\n loadQueryFromUrl={false}\n >\n \n queryKey=\"getReportCommissionMetricsV2\"\n getReportMetrics={getReportMetrics}\n getReportMetricsSummary={getReportMetricsSummary}\n disabled={isExport}\n reportConfig={reportConfig}\n >\n {children}\n \n \n );\n}\n","import { useLocation, useParams } from 'react-router-dom';\nimport { ReportsCommissionPage } from 'src/components/ReportsCommissionPage';\nimport { Content } from 'src/contexts/ContentContext';\nimport { DialogProvider } from 'src/contexts/DialogContext/DialogContext';\nimport { WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { useReportConfigsV2 } from 'src/hooks/useReportConfigsV2';\nimport { useReportPermissions } from 'src/hooks/useReportPermissions';\nimport { LayoutContent } from 'src/navigations/LayoutContent';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ReportTypesV2 } from 'src/utils/reportsUtils';\n\nimport { MainRoute } from '../MainRoute';\nimport { ReportsCommissionContextProviderV2 } from './ReportsCommissionContextProviderV2';\n\nexport function ReportsCommission() {\n const { hasAccessToReportingV2, hasReportSinglePagedV1V2Feature } =\n useReportPermissions();\n\n const location = useLocation();\n\n const isFromV1Page = location.state?.isFromV1Page === true;\n\n const mainRoute =\n !hasAccessToReportingV2 || isFromV1Page || hasReportSinglePagedV1V2Feature\n ? MainRoute.Reports\n : MainRoute.ReportsV2;\n\n return (\n \n \n \n );\n}\n\nfunction ReportsCommissionContentV2() {\n const { reportId } = useParams();\n const location = useLocation();\n\n const { reportConfigs, isLoading, isFetching } =\n useReportConfigsV2({\n reportType: ReportTypesV2.Commission,\n });\n\n const reportConfig = reportConfigs?.find(\n (r) => r.reportId?.toString() === reportId\n );\n\n if (reportConfig == null) {\n return isLoading || isFetching ? (\n \n ) : (\n \n }\n />\n \n );\n }\n\n return (\n \n \n \n \n \n );\n}\n","import { ReactNode } from 'react';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\n\nimport { PosSpinner } from '../PosSpinner';\nimport * as styles from './PosFloatingSpinner.css';\n\nexport const PosFloatingSpinner = ({ message }: { message?: ReactNode }) => {\n return (\n \n
    \n \n
    \n {message &&
    {message}
    }\n \n );\n};\n","import { useState } from 'react';\nimport { Content, FormatContent } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { RotatingWrapper } from 'src/core/ui/AnimatingWrapper';\nimport { IconsFill, LoadingIcon, WarningOutlineIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\n\nimport * as styles from './ReportsMaxSizeMessage.css';\n\nexport const ReportsMaxSizeMessage = ({\n count,\n totalCount,\n onBypassLimit,\n}: {\n count: number;\n totalCount?: number | null;\n onBypassLimit: () => void;\n}) => {\n const [isLoading, setIsLoading] = useState(false);\n\n if (count >= (totalCount ?? -1)) {\n return null;\n }\n\n return (\n \n \n
    \n \n
    \n \n \n \n\n {\n setIsLoading(true);\n onBypassLimit();\n }}\n variant=\"outline\"\n >\n {' '}\n {isLoading && (\n \n \n \n )}\n \n \n );\n};\n","import React from 'react';\nimport { vars } from 'src/core/themes';\n\ninterface CircleIconProps {\n icon: React.ReactNode;\n size?: number | string;\n backgroundColor?: string;\n styleOverride?: React.CSSProperties;\n className?: string;\n}\n\nconst CircleIcon: React.FC = ({\n icon,\n size = 80,\n backgroundColor = vars.color.backgroundDisabled,\n styleOverride = {},\n className = '',\n}) => (\n \n {icon}\n \n);\n\nexport default CircleIcon;\n","import { PosIconProps } from './SvgWrapper';\n\nexport const ReportGroupIcon = (props: Omit) => {\n return (\n \n \n \n \n );\n};\n","import { PosIconProps } from './SvgWrapper';\n\nexport function TimeoutIcon(props: Omit) {\n return (\n \n \n \n \n \n \n \n \n );\n}\n","import React from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport CircleIcon from 'src/core/ui/CircleIcon/CircleIcon';\nimport { Stack } from 'src/core/ui/Stack';\nimport { ReportGroupIcon } from 'src/svgs/ReportGroupIcon';\nimport { TimeoutIcon } from 'src/svgs/TimeoutIcon';\nimport { ClockIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { QueryWithViewMode } from 'src/utils/eventQueryUtils';\n\nimport { TableErrorStateHeader } from './Table.css';\nimport { NoData } from './Table.styled';\n\ninterface TableStateWrapperProps {\n isLoading: boolean;\n hasError: boolean;\n hasTimeout: boolean;\n hasData: boolean;\n children: React.ReactNode;\n}\n\nconst TableStateWrapper = ({\n isLoading,\n hasError,\n hasTimeout,\n hasData,\n children,\n}: TableStateWrapperProps) => {\n const { initialQuery, setFilterQuery, setTempQuery } =\n useFilterQueryContext();\n\n if (isLoading) {\n return ;\n }\n\n if (hasError) {\n return (\n \n \n }\n styleOverride={{ marginBottom: vars.spacing.sm }}\n />\n
    \n \n
    \n\n \n
    \n
    \n );\n }\n\n if (hasTimeout) {\n return (\n \n \n }\n styleOverride={{ marginBottom: vars.spacing.sm }}\n />\n
    \n \n
    \n \n
    \n
    \n );\n }\n\n if (!hasData) {\n return (\n \n \n }\n styleOverride={{ marginBottom: vars.spacing.sm }}\n />\n
    \n \n
    \n
    \n \n {'. '}\n \n
    \n {\n setFilterQuery(initialQuery);\n setTempQuery(initialQuery);\n }}\n style={{ marginTop: vars.spacing.xl }}\n >\n \n \n
    \n
    \n );\n }\n\n return <>{children};\n};\n\nexport default TableStateWrapper;\n","import {\n functionalUpdate,\n PaginationState,\n SortingState,\n TableOptions,\n} from '@tanstack/react-table';\nimport { useEffect, useMemo, useState } from 'react';\nimport { ReportsMaxSizeMessage } from 'src/components/Reports/ReportsMaxSizeMessage';\nimport { useActiveSortTableColumnContext } from 'src/contexts/ActiveSortTableColumnContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { ColumnResizingContextProvider } from 'src/contexts/ColumnResizingContext/ColumnResizingContext';\nimport { useReportMetricsContext } from 'src/contexts/ReportMetricsContext';\nimport { Stack } from 'src/core/ui';\nimport { Table } from 'src/tables/Table';\nimport { ListingReportMetricsWithGroupBy } from 'src/utils/reportsUtils';\nimport {\n ListingQuery,\n ListingReportMetrics,\n ReportGroupBy,\n UserSetting,\n} from 'src/WebApiController';\n\nimport TableStateWrapper from '../Table/TableStateWrapper';\nimport { ListingReportTableProps } from './ListingReportTable.types';\nimport {\n ListingReportTableColumnDefContextProvider,\n useListingReportTableColumnDef,\n} from './ListingReportTableColumnDefContext';\n\nexport const ListingReportTable = ({\n report,\n ...rest\n}: ListingReportTableProps) => {\n return (\n \n \n \n );\n};\n\nconst ListingReportTableInternal = ({\n metricsData,\n summaryData,\n totalCount,\n report,\n refreshMetrics,\n onMount,\n onUnmount,\n initState,\n className,\n}: ListingReportTableProps) => {\n const { data: catalogData } = useCatalogDataContext();\n const { hasTimeout: metricsHasTimeout, hasUnknownError: metricsHasError } =\n useReportMetricsContext();\n\n // Enable passing in table state as parameters -- we can remount with the last state the user was on\n const { activeSortTableColumn, setActiveSortTableColumn } =\n useActiveSortTableColumnContext();\n const [sorting, setSorting] = useState(\n activeSortTableColumn || initState?.sorting || []\n );\n\n const data = useMemo(() => {\n const performerCount = Object.keys(catalogData?.performers ?? {}).length;\n const venueCount = Object.keys(catalogData?.venues ?? {}).length;\n const eventCount = Object.keys(catalogData?.events ?? {}).length;\n\n const shimmeringDivCount =\n report.groupBy === ReportGroupBy.Performer\n ? performerCount\n : report.groupBy === ReportGroupBy.Venue\n ? venueCount\n : eventCount;\n return metricsData ?? Array(shimmeringDivCount).fill(null);\n }, [\n catalogData?.events,\n catalogData?.performers,\n catalogData?.venues,\n metricsData,\n report.groupBy,\n ]);\n\n const disablePagination = report.numberOfItemsPerPage == null;\n\n const [pagination, setPagination] = useState({\n pageIndex: 0,\n pageSize: Math.max(\n 1,\n disablePagination ? data.length : report.numberOfItemsPerPage!\n ),\n });\n\n useEffect(() => {\n if (disablePagination) {\n if (pagination.pageSize !== data.length) {\n setPagination((prevState) => ({\n ...prevState,\n pageSize: data.length,\n }));\n }\n } else {\n setPagination((prevState) => ({\n ...prevState,\n pageSize: report.numberOfItemsPerPage!,\n }));\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [data, report]);\n\n useEffect(() => {\n onMount?.();\n });\n\n useEffect(() => {\n /**\n * Intent for `onMount` is use with 'windowing' in order to maintain user state\n * when the component is scrolled back into view.\n * Anything that needs to be persisted in `react-table` state should be added here.\n * Only update on unmount to ensure we aren't doing too many re-renders.\n */\n return () => onUnmount?.({ pagination, sorting });\n }, [pagination, sorting, onUnmount]);\n\n const { displayedColumnsConfig = [], isLoading: tableColumnIsLoading } =\n useListingReportTableColumnDef();\n\n const options: Partial> =\n useMemo(\n () => ({\n data,\n meta: {\n summaryData,\n },\n columns: displayedColumnsConfig,\n state: {\n pagination,\n sorting,\n },\n onPaginationChange: setPagination,\n onSortingChange: (sortingUpdaterFn) => {\n const newSortVal = functionalUpdate(sortingUpdaterFn, sorting);\n setSorting(newSortVal);\n setActiveSortTableColumn(newSortVal);\n },\n enableRowSelection: true,\n }),\n [\n data,\n summaryData,\n displayedColumnsConfig,\n pagination,\n sorting,\n setActiveSortTableColumn,\n ]\n );\n\n return (\n \n hasData={data?.length > 0}\n isLoading={tableColumnIsLoading || false}\n hasError={metricsHasError || false}\n hasTimeout={metricsHasTimeout || false}\n >\n \n refreshMetrics(true)}\n />\n \n \n \n \n \n );\n};\n\nexport default ListingReportTable;\n","import { useCallback, useMemo, useState } from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport {\n InventoryMetricsSelectionInputModal,\n SalesMetricsSelectionInputModal,\n} from 'src/dialogs/ReportBuilderDialog/MetricsSelectionInputModal';\nimport { ReportBuilderFilterInput } from 'src/dialogs/ReportBuilderDialog/ReportBuilderFilterInput';\nimport { ReportConfig, useReportConfigs } from 'src/hooks/useReportConfigs';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { LayoutIcon } from 'src/svgs';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ReportTypes } from 'src/utils/reportsUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n Permission,\n ReportConfigOverrideOfListingQuery,\n ReportConfigOverrideOfSaleQuery,\n ReportGroupBy,\n} from 'src/WebApiController';\n\nimport * as styles from './ReportsFilterToolbar.css';\n\nexport const ReportsFilterToolbar = ({\n reportConfig,\n}: {\n reportConfig: ReportConfig;\n}) => {\n const methods = useForm({\n defaultValues: reportConfig,\n });\n const { handleSubmit } = methods;\n const { showErrorDialog } = useErrorBoundaryContext();\n const [isColumnModalOpen, setColumnModalOpen] = useState(false);\n\n const {\n upsertReportConfig: upsertReportConfigInventory,\n upsertReportOverride: upsertReportOverrideInventory,\n } = useReportConfigs({\n reportType: ReportTypes.Inventory,\n });\n\n const {\n upsertReportConfig: upsertReportConfigSale,\n upsertReportOverride: upsertReportOverrideSale,\n } = useReportConfigs({\n reportType: ReportTypes.Sale,\n });\n\n const hasUpdateReportFeature = useUserHasAnyOfPermissions(\n Permission.Reports_UpdateReports\n );\n\n const hasUpdateOwnReportFeature =\n useUserHasAnyOfPermissions(Permission.Reports_UpdateReportsOwned) &&\n reportConfig.isOwner;\n\n const invokeUpsertReport = useCallback(\n async (reportConfigNew: ReportConfig) => {\n await tryInvokeApi(\n async () => {\n if (reportConfigNew!.globalReportTypeId) {\n if (!hasUpdateReportFeature) {\n // Don't update since the user has no config\n return;\n }\n\n if (reportConfigNew.reportType === ReportTypes.Inventory) {\n return await upsertReportOverrideInventory(\n {\n // At the moment we don't supprt persisting filter override for global reports (POS-3604)\n filter: null,\n metrics: reportConfigNew.metrics,\n } as ReportConfigOverrideOfListingQuery,\n reportConfig!\n );\n } else {\n // report.reportType === ReportTypes.Sale\n return await upsertReportOverrideSale(\n {\n filter: null,\n metrics: reportConfigNew.metrics,\n } as ReportConfigOverrideOfSaleQuery,\n reportConfig!\n );\n }\n } else {\n if (!hasUpdateReportFeature && !hasUpdateOwnReportFeature) {\n // Don't update since the user has no config\n return;\n }\n\n if (reportConfigNew.reportType === ReportTypes.Inventory) {\n return await upsertReportConfigInventory(\n reportConfigNew.reportId,\n reportConfigNew,\n !reportConfigNew.isOwner\n );\n } else {\n // report.reportType === ReportTypes.Sale\n return await upsertReportConfigSale(\n reportConfigNew.reportId,\n reportConfigNew,\n !reportConfigNew.isOwner\n );\n }\n }\n },\n (error) => {\n showErrorDialog('ReportClient.mergeReport', error, {\n trackErrorData: reportConfigNew,\n });\n }\n );\n },\n [\n hasUpdateOwnReportFeature,\n hasUpdateReportFeature,\n reportConfig,\n showErrorDialog,\n upsertReportConfigInventory,\n upsertReportConfigSale,\n upsertReportOverrideInventory,\n upsertReportOverrideSale,\n ]\n );\n\n const onReportSaveSubmit = useCallback(\n (report: ReportConfig) => {\n invokeUpsertReport(report);\n },\n [invokeUpsertReport]\n );\n\n const onColumnSettingButtonClickHandler = useCallback(\n (e: React.MouseEvent) => {\n e.stopPropagation();\n if (!isColumnModalOpen) setColumnModalOpen(true);\n },\n [isColumnModalOpen, setColumnModalOpen]\n );\n\n const onMetrisSelectionModalClose = useCallback(() => {\n handleSubmit(onReportSaveSubmit)();\n setColumnModalOpen(false);\n }, [handleSubmit, onReportSaveSubmit]);\n\n const filterChangeMessageContentId = useMemo(() => {\n if (reportConfig.globalReportTypeId != null) {\n if (\n reportConfig.groupBy === ReportGroupBy.SaleIdTicketIdCommissionUser ||\n reportConfig.groupBy === ReportGroupBy.ArAgingMarketplace\n ) {\n return ContentId.GlobalReportFilterChangeMessage;\n }\n return ContentId.GlobalReportFilterChangeCopyMessage;\n }\n return undefined;\n }, [reportConfig.globalReportTypeId, reportConfig.groupBy]);\n\n return (\n (hasUpdateReportFeature || hasUpdateOwnReportFeature) && (\n \n
    \n \n }\n />\n )\n }\n embeddedDisplayOnly\n />\n\n {reportConfig.groupBy !== ReportGroupBy.ArAgingMarketplace ? (\n \n \n \n \n ) : (\n \n )}\n \n
    \n {isColumnModalOpen && (\n <>\n {reportConfig.reportType === ReportTypes.Inventory ? (\n \n ) : (\n \n )}\n \n )}\n
    \n )\n );\n};\n","import { useMemo } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { CatalogMetricsContextProvider } from 'src/contexts/CatalogMetricsContext';\nimport { groupAndAggregateMetrics } from 'src/contexts/CatalogMetricsContext/CatalogMetrics.utils';\nimport { useGeSummaryMetricsQuery } from 'src/contexts/CatalogMetricsContext/useGetSummaryMetricsQuery';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useReportMetricsContext } from 'src/contexts/ReportMetricsContext';\nimport { PosFloatingSpinner } from 'src/core/POS/PosFloatingSpinner';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { Stack } from 'src/core/ui';\nimport { ReportConfig } from 'src/hooks/useReportConfigs';\nimport { getCatalogSummaryMetrics } from 'src/navigations/Routes/Inventory';\nimport ListingReportTable from 'src/tables/ListingTable/ListingReportTable';\nimport { GROUP_BY_TO_PRIMARY_COLUMN_ID } from 'src/utils/columns/inventory/inventoryColumnUtils.constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ListingCatalogMetricsQueryKey } from 'src/utils/inventoryUtils';\nimport { ListingReportMetricsWithGroupBy } from 'src/utils/reportsUtils';\nimport {\n addListingMetrics,\n getInventorySummaryListingMetricsDisplayStrings,\n} from 'src/utils/ticketMetricUtils';\nimport {\n ActionOutboxEntityType,\n ListingMetrics,\n ListingQuery,\n ListingReportMetrics,\n ReportWidgetTypesCommission,\n ReportWidgetTypesInventory,\n ReportWidgetTypesSale,\n} from 'src/WebApiController';\n\nimport {\n AverageTicketPriceDisplay,\n SalesAndMarginDisplay,\n TicketsListedAndSoldDisplay,\n} from '../Listings/InventorySummaryWidgets';\nimport { ReportsFilterToolbar } from '../Reports/ReportsFilterToolbar';\nimport * as styles from './ReportsInventoryPage.css';\nimport { mapReportMetrics } from './ReportsInventoryPage.utils';\n\nexport function ReportsInventoryPage({\n reportConfig,\n}: {\n reportConfig: ReportConfig;\n}) {\n const {\n reportMetrics,\n reportSummary,\n totalCount,\n isLoading,\n isRefreshing,\n refreshMetrics,\n } = useReportMetricsContext();\n const { data, eventsTransformed } = useCatalogDataContext();\n\n const reportMetricsMapped: ListingReportMetricsWithGroupBy[] | undefined =\n useMemo(\n () => mapReportMetrics(reportMetrics, eventsTransformed, data),\n [data, eventsTransformed, reportMetrics]\n );\n\n const initSorting = useMemo(() => {\n const sortBy =\n reportConfig.sortBy ??\n GROUP_BY_TO_PRIMARY_COLUMN_ID[reportConfig.groupBy];\n\n return [\n {\n id: sortBy,\n desc: reportConfig.isSortDescending ?? false,\n },\n ];\n }, [\n reportConfig.groupBy,\n reportConfig.isSortDescending,\n reportConfig.sortBy,\n ]);\n\n return (\n
    \n {reportConfig.reportName && (\n

    {reportConfig.reportName}

    \n )}\n \n \n {isLoading ? (\n \n ) : (\n
    \n \n {isRefreshing && (\n }\n />\n )}\n
    \n )}\n
    \n );\n}\n\nexport const WidgetSection = ({\n widgets,\n}: {\n widgets?:\n | ReportWidgetTypesInventory[]\n | ReportWidgetTypesSale[]\n | ReportWidgetTypesCommission[]\n | null;\n}) => {\n if (!widgets?.length) {\n return null;\n }\n\n return (\n \n queryKey={ListingCatalogMetricsQueryKey}\n entityType={ActionOutboxEntityType.Listing}\n getCatalogMetrics={(c, f) => c.getCatalogListingMetrics(f)}\n addCatalogMetrics={addListingMetrics}\n >\n \n \n );\n};\n\nexport const WidgetSectionContent = ({\n widgets,\n}: {\n widgets?:\n | ReportWidgetTypesInventory[]\n | ReportWidgetTypesSale[]\n | ReportWidgetTypesCommission[]\n | null;\n}) => {\n const { eventsTransformed } = useCatalogDataContext();\n const { loginContext } = useAppContext();\n\n const { summaryMetrics, isLoading } =\n useGeSummaryMetricsQuery(\n 'ListingMetrics',\n eventsTransformed\n ?.map((ev) => ev.event.perfId)\n .filter((id) => id != null)\n .map((id) => id!),\n eventsTransformed?.map((ev) => ev.event.venueId),\n (metrics: ListingMetrics[]) =>\n groupAndAggregateMetrics(metrics, addListingMetrics),\n getCatalogSummaryMetrics\n );\n\n const formattedTotalMetrics = summaryMetrics\n ? getInventorySummaryListingMetricsDisplayStrings(\n summaryMetrics,\n loginContext?.user?.activeAccount?.currencyCode\n )\n : null;\n\n if (\n !widgets?.length ||\n (eventsTransformed != null && !isLoading && !summaryMetrics)\n ) {\n return null;\n }\n widgets = widgets as ReportWidgetTypesInventory[];\n\n return (\n
    \n \n {widgets.includes(ReportWidgetTypesInventory.TicketsListedAndSold) && (\n \n )}\n {widgets.includes(ReportWidgetTypesInventory.SalesAndMargin) && (\n \n )}\n {widgets.includes(ReportWidgetTypesInventory.AverageTicketPrice) && (\n \n )}\n \n
    \n );\n};\n","import { ComponentProps, useCallback, useMemo, useState } from 'react';\nimport { BackSection } from 'src/components/common/BackSection';\nimport { ReportsInventoryExport } from 'src/components/Reports/ReportsExport';\nimport { ReportExportOptions } from 'src/components/Reports/ReportsExport/ReportsExport.types';\nimport { ReportsSaleExport } from 'src/components/Reports/ReportsExport/ReportsSaleExport';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { useReportMetricsContext } from 'src/contexts/ReportMetricsContext';\nimport { vars } from 'src/core/themes';\nimport { DropdownMenu, Stack } from 'src/core/ui';\nimport { RotatingWrapper } from 'src/core/ui/AnimatingWrapper';\nimport { ShareReportDialog } from 'src/dialogs/ShareReportDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { ReportConfig, useReportConfigs } from 'src/hooks/useReportConfigs';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { CopyIcon } from 'src/svgs';\nimport {\n DownloadIcon,\n IconsFill,\n MoreIcon,\n ProcessingIcon,\n ShareIcon,\n} from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { QueryWithViewMode } from 'src/utils/eventQueryUtils';\nimport { isReportFilterOverriden, ReportTypes } from 'src/utils/reportsUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n EntityWithTicketsQuery,\n Feature,\n Permission,\n ReportFileType,\n ReportGroupBy,\n} from 'src/WebApiController';\n\nimport * as styles from './ReportsPageToolbar.css';\n\nexport const ReportsPageToolbar = ({\n reportConfig,\n returnUrl,\n}: {\n reportConfig: ReportConfig | undefined;\n returnUrl: string;\n}) => {\n const shareDialog = useBasicDialog();\n const { showErrorDialog } = useErrorBoundaryContext();\n const { filterQuery } = useFilterQueryContext<\n EntityWithTicketsQuery & QueryWithViewMode\n >();\n const { isAllReportMetricsLoaded, totalCount } = useReportMetricsContext();\n\n const hasExportInventoryFeature = useUserHasFeature(Feature.ExportInventory);\n const hasCreateReportFeature = useUserHasAnyOfPermissions(\n Permission.Reports_CreateReports\n );\n\n const [reportExportOptions, setReportExportOptions] =\n useState(null);\n\n const onReportExported = () => {\n setReportExportOptions(null);\n };\n\n const reportConfigWithTempQuery = useMemo(() => {\n if (!reportConfig) {\n return reportConfig;\n }\n return {\n ...reportConfig,\n filter: filterQuery,\n hasFilterOverride:\n reportConfig.hasFilterOverride ||\n isReportFilterOverriden(filterQuery, reportConfig.filter),\n } as ReportConfig;\n }, [filterQuery, reportConfig]);\n\n const {\n upsertReportConfig: upsertReportConfigInventory,\n getReportConfigNameForDuplicate: getReportConfigNameForDuplicateInventory,\n } = useReportConfigs({\n reportType: ReportTypes.Inventory,\n });\n\n const {\n upsertReportConfig: upsertReportConfigSale,\n getReportConfigNameForDuplicate: getReportConfigNameForDuplicateSale,\n } = useReportConfigs({\n reportType: ReportTypes.Sale,\n });\n\n const invokeUpsertReport = useCallback(\n async (report: ReportConfig) => {\n return await tryInvokeApi(\n async () => {\n if (report.reportType === ReportTypes.Inventory) {\n return await upsertReportConfigInventory(report.reportId, report);\n } else {\n // report.reportType === ReportTypes.Sale\n return await upsertReportConfigSale(report.reportId, report);\n }\n },\n (error) => {\n showErrorDialog('ReportClient.mergeReport', error, {\n trackErrorData: report,\n });\n }\n );\n },\n [showErrorDialog, upsertReportConfigInventory, upsertReportConfigSale]\n );\n\n const onReportShareSubmit = useCallback<\n ComponentProps['onOkay']\n >(\n async (roleIds, sellerUserIds) => {\n const updatedReport = {\n ...reportConfig!,\n roleIdsToShare: roleIds,\n sellerUserIdsToShare: sellerUserIds,\n };\n await invokeUpsertReport(updatedReport);\n shareDialog.closeDialog();\n },\n [reportConfig, invokeUpsertReport, shareDialog]\n );\n\n const onReportDuplicateSubmit = useCallback(async () => {\n const newReport = {\n ...reportConfigWithTempQuery!,\n reportId: null,\n reportName:\n reportConfig!.reportType === ReportTypes.Inventory\n ? getReportConfigNameForDuplicateInventory(reportConfig!.reportName)\n : getReportConfigNameForDuplicateSale(reportConfig!.reportName),\n } as ReportConfig;\n const newReportId = await invokeUpsertReport(newReport);\n if (newReportId) {\n if (reportConfig!.reportType === ReportTypes.Inventory) {\n window.open(\n `/reports/inventory/${newReportId}`,\n '_blank',\n 'noreferrer'\n );\n } else {\n // report.reportType === ReportTypes.Sale\n window.open(`/reports/sale/${newReportId}`, '_blank', 'noreferrer');\n }\n }\n }, [\n reportConfigWithTempQuery,\n reportConfig,\n getReportConfigNameForDuplicateInventory,\n getReportConfigNameForDuplicateSale,\n invokeUpsertReport,\n ]);\n\n return (\n <>\n
    \n \n \n {reportConfig && (\n <>\n {reportExportOptions ? (\n \n \n \n ) : (\n \n \n \n \n
    \n \n \n \n {reportConfig.isOwner && (\n <>\n \n \n \n \n \n \n \n )}\n {(hasExportInventoryFeature ||\n reportConfig.groupBy !== ReportGroupBy.ListingId) && (\n \n \n \n \n \n \n \n \n setReportExportOptions({\n reportToExport: reportConfigWithTempQuery!,\n fileType: ReportFileType.XLSX,\n serverSideExport: !isAllReportMetricsLoaded,\n })\n }\n >\n \n \n \n setReportExportOptions({\n reportToExport: reportConfigWithTempQuery!,\n fileType: ReportFileType.CSV,\n serverSideExport: !isAllReportMetricsLoaded,\n })\n }\n >\n \n \n {isAllReportMetricsLoaded && (\n // We don't support server side PDF export so we hide it for now\n // Need to be determined on https://thestubhub.atlassian.net/browse/POS-4291 on how we want to handle this\n \n setReportExportOptions({\n reportToExport: reportConfigWithTempQuery!,\n fileType: ReportFileType.PDF,\n })\n }\n >\n \n \n )}\n\n \n \n )}\n {hasCreateReportFeature &&\n reportConfig.groupBy !==\n ReportGroupBy.SaleIdTicketIdCommissionUser &&\n reportConfig.groupBy !==\n ReportGroupBy.ArAgingMarketplace && (\n \n \n \n \n \n \n )}\n \n \n \n )}\n \n )}\n \n \n {\n shareDialog.closeDialog();\n }}\n centered\n />\n {reportConfig && (\n <>\n {reportConfig.reportType === ReportTypes.Inventory ? (\n \n ) : (\n \n )}\n \n )}\n \n );\n};\n","import { useMemo } from 'react';\nimport { useLocation, useParams } from 'react-router-dom';\nimport { ReportsInventoryPage } from 'src/components/ReportsInventoryPage';\nimport { Content } from 'src/contexts/ContentContext';\nimport { DialogProvider } from 'src/contexts/DialogContext/DialogContext';\nimport { WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { useReportConfigs } from 'src/hooks/useReportConfigs';\nimport { LayoutContent } from 'src/navigations/LayoutContent';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ReportTypes } from 'src/utils/reportsUtils';\n\nimport { ReportsPageToolbar } from '../../../components/Reports/ReportsPageToolbar';\nimport { MainRoute } from '../MainRoute';\nimport { ReportsInventoryContextProvider } from './ReportsInventoryContextProvider';\n\nexport function ReportsInventory() {\n return (\n \n \n \n );\n}\n\nfunction ReportsInventoryContent() {\n const { reportId } = useParams();\n const location = useLocation();\n\n const { reportConfigs, isLoading } = useReportConfigs({\n reportType: ReportTypes.Inventory,\n });\n\n const reportConfig = reportConfigs?.find(\n (r) => r.reportId?.toString() === reportId\n );\n\n // Only use value provided at the first time (should be from '/reports')\n const returnUrl = useMemo(() => {\n return (location.state as { returnUrl?: string })?.returnUrl;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n if (reportConfig == null) {\n return isLoading ? (\n \n ) : (\n \n }\n />\n \n );\n }\n\n return (\n \n \n \n {' '}\n \n \n );\n}\n","import { createColumnHelper } from '@tanstack/react-table';\nimport {\n COLUMN_MAX_SIZE,\n COLUMN_MIN_SIZE,\n} from 'src/contexts/ColumnResizingContext/ColumnResizingContext.types';\nimport {\n COLUMN_DEFAULT_SIZE_LG,\n COLUMN_DEFAULT_SIZE_XL,\n} from 'src/contexts/ColumnResizingContext/ColumnResizingContext.types';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ReportMetricsResponse } from 'src/contexts/ReportMetricsContext/ReportMetricsContextV2';\nimport { TableHeaderCellDiv } from 'src/core/ui/TableHeaderCellDiv';\nimport { useColumnUserSetting } from 'src/hooks/useColumnUserSetting';\nimport { FormatOption } from 'src/modals/EditTableColumns';\nimport { createInventoryEventUrl } from 'src/navigations/Routes/InventoryEvent/InventoryEvent.utils';\nimport { defaultColumnHelperAccessor } from 'src/tables/ReportTableCommon/DefaultColumnHelperAccessor';\nimport { LinkCell } from 'src/tables/ReportTableCommon/LinkCell';\nimport { SHIMMERING_DIV_HEIGHT_REPORT } from 'src/tables/ReportTableCommon/ReportTableCommon.constants';\nimport { reportV2AccessorFn } from 'src/tables/ReportTableCommon/ReportTableCommon.utils';\nimport { TextCell } from 'src/tables/ReportTableCommon/TextCell';\nimport { TableShimmeringDiv } from 'src/tables/Table/Table.styled';\nimport { DateCell } from 'src/tables/Table/TableCells';\nimport {\n ListingReportTableGroupingColumnId,\n ListingReportTableValueColumnId,\n} from 'src/utils/columns/inventory/inventoryColumnUtils.types';\nimport {\n LISTING_REPORT_TABLE_GROUPING_COLUMN_ID_TO_CONTENT_ID,\n LISTING_REPORT_TABLE_VALUE_COLUMN_ID_TO_CONTENT_ID,\n} from 'src/utils/constants/contentIdMaps';\nimport { getListingDetailsRelativeUrl } from 'src/utils/inventoryUtils';\nimport { getPurchaseOrderRelativeUrl } from 'src/utils/purchaseUtils';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport { ReportValueType } from 'src/WebApiController';\n\nconst SECTION_TYPE = SectionType.ListingsReport;\n\nconst columnHelper = createColumnHelper();\n\nexport const LISTING_REPORT_SPECIAL_TABLE_COLUMNS_CONFIG = {\n [ListingReportTableGroupingColumnId.EventId]: columnHelper.accessor(\n reportV2AccessorFn(ListingReportTableGroupingColumnId.EventId),\n {\n id: ListingReportTableGroupingColumnId.EventId,\n header: (params) => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: (params) => {\n const eventId = params.row.original?.eventId;\n if (!eventId) {\n return ;\n }\n const eventUrl = createInventoryEventUrl(eventId);\n return (\n \n );\n },\n }\n ),\n [ListingReportTableGroupingColumnId.LocalEventDateTime]:\n columnHelper.accessor(\n reportV2AccessorFn(ListingReportTableGroupingColumnId.LocalEventDateTime),\n {\n id: ListingReportTableGroupingColumnId.LocalEventDateTime,\n header: (params) => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_XL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n }) {\n const value = getValue();\n const { userDefinedPrecision = FormatOption.DateTime_MMDD } =\n useColumnUserSetting(columnId, SECTION_TYPE);\n\n if (!original) {\n return ;\n }\n\n const dateValue = value ? new Date(value).toISOString() : value;\n\n return (\n \n );\n },\n }\n ),\n [ListingReportTableGroupingColumnId.ListingId]: columnHelper.accessor(\n reportV2AccessorFn(ListingReportTableGroupingColumnId.ListingId),\n {\n id: ListingReportTableGroupingColumnId.ListingId,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ getValue }) => {\n const listingId = getValue();\n\n if (!listingId) {\n return ;\n }\n\n const url = getListingDetailsRelativeUrl(listingId!);\n return (\n \n );\n },\n }\n ),\n [ListingReportTableValueColumnId.PurchaseOrderId]: columnHelper.accessor(\n reportV2AccessorFn(ListingReportTableValueColumnId.PurchaseOrderId),\n {\n id: ListingReportTableValueColumnId.PurchaseOrderId,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ getValue }) => {\n const purchaseIds = getValue();\n\n if (!purchaseIds) {\n return ;\n }\n\n return (\n `#${purchaseId}`)}\n url={purchaseIds.map((purchaseId) =>\n getPurchaseOrderRelativeUrl(purchaseId)\n )}\n separator={{', '}}\n openInNewTab\n align=\"left\"\n style={{ fontWeight: 600 }}\n />\n );\n },\n }\n ),\n} as const;\n\nexport const listingReportV2TableColumnDef = (\n columnId: string,\n valueType: ReportValueType | undefined\n) => {\n const specialConfig = Object.entries(\n LISTING_REPORT_SPECIAL_TABLE_COLUMNS_CONFIG\n ).find(([key]) => key === columnId)?.[1];\n\n if (specialConfig) {\n return specialConfig;\n }\n\n const headerContentId =\n LISTING_REPORT_TABLE_GROUPING_COLUMN_ID_TO_CONTENT_ID[\n columnId as ListingReportTableGroupingColumnId\n ] ??\n LISTING_REPORT_TABLE_VALUE_COLUMN_ID_TO_CONTENT_ID[\n columnId as ListingReportTableValueColumnId\n ];\n\n return defaultColumnHelperAccessor(\n columnHelper,\n columnId,\n headerContentId,\n valueType\n );\n};\n","import { ColumnDef } from '@tanstack/react-table';\nimport { createContext, PropsWithChildren, useContext, useMemo } from 'react';\nimport {\n ReportMetricsResponse,\n ReportValueTypesReponse,\n} from 'src/contexts/ReportMetricsContext/ReportMetricsContextV2';\nimport { ReportConfigV2 } from 'src/hooks/useReportConfigsV2';\nimport { ListingReportTableColumnId } from 'src/utils/columns/inventory/inventoryColumnUtils.types';\n\nimport { listingReportV2TableColumnDef } from './configs/ListingReportTableColumnsConfigV2';\n\ntype ListingReportTableColumnDefContextType = {\n displayedColumnsConfig: ColumnDef[] | undefined;\n};\n\nconst ListingReportTableColumnDefContext =\n createContext({\n displayedColumnsConfig: undefined,\n });\n\nexport const ListingReportTableColumnDefContextProviderV2 = ({\n report,\n reportValueTypes,\n children,\n}: PropsWithChildren<{\n report: ReportConfigV2;\n reportValueTypes: ReportValueTypesReponse | undefined;\n}>) => {\n const displayedColumnsConfig = useMemo(() => {\n const columns = [\n ...(report.request.rowGroupings?.map((c) => c.columnName) ?? []),\n ...(report.request.aggregations?.map((c) => c.columnName) ?? []),\n ];\n\n return columns.map((columnId) =>\n listingReportV2TableColumnDef(\n columnId as ListingReportTableColumnId,\n reportValueTypes?.[columnId.toUpperCase()]\n )\n );\n }, [\n report.request.aggregations,\n report.request.rowGroupings,\n reportValueTypes,\n ]);\n\n return (\n \n {children}\n \n );\n};\n\nexport const useListingReportTableColumnDefV2 = () =>\n useContext(ListingReportTableColumnDefContext);\n","import {\n functionalUpdate,\n PaginationState,\n SortingState,\n TableOptions,\n} from '@tanstack/react-table';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport { useActiveSortTableColumnContext } from 'src/contexts/ActiveSortTableColumnContext';\nimport { ColumnResizingContextProvider } from 'src/contexts/ColumnResizingContext/ColumnResizingContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport {\n ReportMetricsResponse,\n useReportMetricsContextV2,\n} from 'src/contexts/ReportMetricsContext/ReportMetricsContextV2';\nimport { NoData, Table, VirtuosoScrollEvent } from 'src/tables/Table';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { ReportTableV2Props } from '../ReportTableCommon/ReportTableCommon.types';\nimport {\n ListingReportTableColumnDefContextProviderV2,\n useListingReportTableColumnDefV2,\n} from './ListingReportTableColumnDefContextV2';\n\nexport const ListingReportTableV2 = ({\n report,\n reportValueTypes,\n ...rest\n}: ReportTableV2Props) => {\n return (\n \n \n \n );\n};\n\nconst ListingReportTableInternal = ({\n metricsData,\n summaryData,\n report,\n onMount,\n onUnmount,\n initState,\n className,\n}: ReportTableV2Props) => {\n const {\n isFetchingNextPage,\n fetchNextPage,\n hasNextPage,\n isReportConfigEmpty,\n } = useReportMetricsContextV2();\n\n // Enable passing in table state as parameters -- we can remount with the last state the user was on\n const { activeSortTableColumn, setActiveSortTableColumn } =\n useActiveSortTableColumnContext();\n const [sorting, setSorting] = useState(\n activeSortTableColumn || initState?.sorting || []\n );\n\n const data = useMemo(() => {\n const shimmeringDivCount = 500;\n return metricsData ?? Array(shimmeringDivCount).fill(null);\n }, [metricsData]);\n\n const [pagination, setPagination] = useState({\n pageIndex: 0,\n pageSize: Math.max(1, data.length),\n });\n\n useEffect(() => {\n if (pagination.pageSize !== data.length) {\n setPagination((prevState) => ({\n ...prevState,\n pageSize: data.length,\n }));\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [data, report]);\n\n useEffect(() => {\n onMount?.();\n });\n\n useEffect(() => {\n /**\n * Intent for `onMount` is use with 'windowing' in order to maintain user state\n * when the component is scrolled back into view.\n * Anything that needs to be persisted in `react-table` state should be added here.\n * Only update on unmount to ensure we aren't doing too many re-renders.\n */\n return () => onUnmount?.({ pagination, sorting });\n }, [pagination, sorting, onUnmount]);\n\n const { displayedColumnsConfig = [] } = useListingReportTableColumnDefV2();\n\n const onScroll = useCallback(\n (virtuosoScrollEvent: VirtuosoScrollEvent) => {\n const { element } = virtuosoScrollEvent;\n const { scrollHeight, scrollTop, clientHeight } = element;\n // once the user has scrolled within 500px of the bottom of the table, fetch more data if we can\n // TODO change this to constant\n if (\n scrollHeight - scrollTop - clientHeight < 500 &&\n !isFetchingNextPage &&\n hasNextPage\n ) {\n fetchNextPage();\n }\n },\n [fetchNextPage, hasNextPage, isFetchingNextPage]\n );\n\n const options: Partial> = useMemo(\n () => ({\n data,\n meta: {\n summaryData,\n },\n columns: displayedColumnsConfig,\n state: {\n pagination,\n sorting,\n },\n onPaginationChange: setPagination,\n onSortingChange: (sortingUpdaterFn) => {\n const newSortVal = functionalUpdate(sortingUpdaterFn, sorting);\n setSorting(newSortVal);\n setActiveSortTableColumn(newSortVal);\n },\n enableRowSelection: true,\n }),\n [\n data,\n summaryData,\n displayedColumnsConfig,\n pagination,\n sorting,\n setActiveSortTableColumn,\n ]\n );\n\n return isReportConfigEmpty ? (\n <>\n ) : data?.length > 0 ? (\n \n \n \n ) : (\n \n \n \n );\n};\n\nexport default ListingReportTableV2;\n","import { useReportMetricsContextV2 } from 'src/contexts/ReportMetricsContext/ReportMetricsContextV2';\nimport { ReportConfigV2 } from 'src/hooks/useReportConfigsV2';\nimport { ListingReportTableV2 } from 'src/tables/ListingTable/ListingReportTableV2';\n\nimport { ReportsPageLayout } from '../Reports/ReportsPageLayout';\nimport * as styles from './ReportsInventoryPage.css';\n\nexport function ReportsInventoryPageV2({\n reportConfig,\n}: {\n reportConfig: ReportConfigV2;\n}) {\n const { reportMetrics, reportSummary, reportValueTypes } =\n useReportMetricsContextV2();\n\n return (\n \n }\n />\n );\n}\n","import { useLocation, useParams } from 'react-router-dom';\nimport { ReportsInventoryPageV2 } from 'src/components/ReportsInventoryPage/ReportsInventoryPageV2';\nimport { Content } from 'src/contexts/ContentContext';\nimport { DialogProvider } from 'src/contexts/DialogContext/DialogContext';\nimport { WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { useReportConfigsV2 } from 'src/hooks/useReportConfigsV2';\nimport { useReportPermissions } from 'src/hooks/useReportPermissions';\nimport { LayoutContent } from 'src/navigations/LayoutContent';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ReportTypesV2 } from 'src/utils/reportsUtils';\n\nimport { MainRoute } from '../MainRoute';\nimport { ReportsInventoryContextProviderV2 } from './ReportsInventoryContextProviderV2';\n\nexport function ReportsInventoryV2() {\n const { hasAccessToReportingV2, hasReportSinglePagedV1V2Feature } =\n useReportPermissions();\n\n const location = useLocation();\n\n const isFromV1Page = location.state?.isFromV1Page === true;\n\n const mainRoute =\n !hasAccessToReportingV2 || isFromV1Page || hasReportSinglePagedV1V2Feature\n ? MainRoute.Reports\n : MainRoute.ReportsV2;\n\n return (\n \n \n \n );\n}\n\nfunction ReportsInventoryContentV2() {\n const { reportId } = useParams();\n\n const { reportConfigs, isLoading, isFetching } =\n useReportConfigsV2({\n reportType: ReportTypesV2.InventoryV2,\n });\n\n const reportConfig = reportConfigs?.find(\n (r) => r.reportId?.toString() === reportId\n );\n\n if (reportConfig == null) {\n return isLoading || isFetching ? (\n \n ) : (\n \n }\n />\n \n );\n }\n\n return (\n \n \n \n \n \n );\n}\n","import {\n functionalUpdate,\n PaginationState,\n SortingState,\n TableOptions,\n} from '@tanstack/react-table';\nimport { useEffect, useMemo, useState } from 'react';\nimport { ReportsMaxSizeMessage } from 'src/components/Reports/ReportsMaxSizeMessage';\nimport { useActiveSortTableColumnContext } from 'src/contexts/ActiveSortTableColumnContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { ColumnResizingContextProvider } from 'src/contexts/ColumnResizingContext/ColumnResizingContext';\nimport { useReportMetricsContext } from 'src/contexts/ReportMetricsContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { Stack } from 'src/core/ui';\nimport { Table } from 'src/tables/Table';\nimport { SaleReportMetricsWithGroupBy } from 'src/utils/reportsUtils';\nimport {\n ReportGroupBy,\n SaleQuery,\n SaleReportMetrics,\n UserSetting,\n} from 'src/WebApiController';\n\nimport TableStateWrapper from '../Table/TableStateWrapper';\nimport { SaleReportTableProps } from './SaleReportTable.types';\nimport {\n SaleReportTableColumnDefContextProvider,\n useSaleReportTableColumnDef,\n} from './SaleReportTableColumnDefContext';\n\nexport const SaleReportTable = ({ report, ...rest }: SaleReportTableProps) => {\n return (\n \n \n \n );\n};\n\nconst SaleReportTableInternal = ({\n metricsData,\n summaryData,\n totalCount,\n report,\n refreshMetrics,\n onMount,\n onUnmount,\n initState,\n className,\n}: SaleReportTableProps) => {\n const { data: catalogData } = useCatalogDataContext();\n const { hasTimeout: metricsHasTimeout, hasUnknownError: metricsHasError } =\n useReportMetricsContext();\n\n // Enable passing in table state as parameters -- we can remount with the last state the user was on\n const { activeSortTableColumn, setActiveSortTableColumn } =\n useActiveSortTableColumnContext();\n const [sorting, setSorting] = useState(\n activeSortTableColumn || initState?.sorting || []\n );\n\n const data = useMemo(() => {\n const performerCount = Object.keys(catalogData?.performers ?? {}).length;\n const venueCount = Object.keys(catalogData?.venues ?? {}).length;\n const eventCount = Object.keys(catalogData?.events ?? {}).length;\n\n const shimmeringDivCount =\n report.groupBy === ReportGroupBy.Performer\n ? performerCount\n : report.groupBy === ReportGroupBy.Venue\n ? venueCount\n : eventCount;\n return metricsData ?? Array(shimmeringDivCount).fill(null);\n }, [\n catalogData?.events,\n catalogData?.performers,\n catalogData?.venues,\n metricsData,\n report.groupBy,\n ]);\n\n const disablePagination = report.numberOfItemsPerPage == null;\n\n const [pagination, setPagination] = useState({\n pageIndex: 0,\n pageSize: Math.max(\n 1,\n disablePagination ? data.length : report.numberOfItemsPerPage!\n ),\n });\n\n useEffect(() => {\n if (disablePagination) {\n if (pagination.pageSize !== data.length) {\n setPagination((prevState) => ({\n ...prevState,\n pageSize: data.length,\n }));\n }\n } else {\n setPagination((prevState) => ({\n ...prevState,\n pageSize: report.numberOfItemsPerPage!,\n }));\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [data, report]);\n\n useEffect(() => {\n onMount?.();\n });\n\n useEffect(() => {\n /**\n * Intent for `onMount` is use with 'windowing' in order to maintain user state\n * when the component is scrolled back into view.\n * Anything that needs to be persisted in `react-table` state should be added here.\n * Only update on unmount to ensure we aren't doing too many re-renders.\n */\n return () => onUnmount?.({ pagination, sorting });\n }, [pagination, sorting, onUnmount]);\n\n const { displayedColumnsConfig = [], isLoading: tableColumnIsLoading } =\n useSaleReportTableColumnDef();\n\n const options: Partial> =\n useMemo(\n () => ({\n data,\n columns: displayedColumnsConfig,\n meta: {\n summaryData,\n },\n state: {\n pagination,\n sorting,\n },\n onPaginationChange: setPagination,\n onSortingChange: (sortingUpdaterFn) => {\n const newSortVal = functionalUpdate(sortingUpdaterFn, sorting);\n setSorting(newSortVal);\n setActiveSortTableColumn(newSortVal);\n },\n enableRowSelection: true,\n }),\n [\n data,\n displayedColumnsConfig,\n summaryData,\n pagination,\n sorting,\n setActiveSortTableColumn,\n ]\n );\n\n if (tableColumnIsLoading) {\n return ;\n }\n\n return (\n \n isLoading={tableColumnIsLoading || false}\n hasError={metricsHasError || false}\n hasTimeout={metricsHasTimeout || false}\n hasData={data?.length > 0}\n >\n \n refreshMetrics(true)}\n />\n \n \n \n \n \n );\n};\n\nexport default SaleReportTable;\n","import { useMemo } from 'react';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useReportMetricsContext } from 'src/contexts/ReportMetricsContext';\nimport { PosFloatingSpinner } from 'src/core/POS/PosFloatingSpinner';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { ReportConfig } from 'src/hooks/useReportConfigs';\nimport SaleReportTable from 'src/tables/SalesTable/SaleReportTable';\nimport { GROUP_BY_TO_PRIMARY_COLUMN_ID } from 'src/utils/columns/sales/salesReportColumnUtils.constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SaleReportMetricsWithGroupBy } from 'src/utils/reportsUtils';\nimport { SaleReportMetrics } from 'src/WebApiController';\n\nimport { ReportsFilterToolbar } from '../Reports/ReportsFilterToolbar';\nimport * as styles from './ReportsSalePage.css';\nimport {\n mapReportMetrics,\n mapReportMetricsSummary,\n} from './ReportsSalePage.utils';\n\nexport function ReportsSalePage({\n reportConfig,\n}: {\n reportConfig: ReportConfig;\n}) {\n const {\n reportMetrics,\n reportSummary,\n totalCount,\n isLoading,\n isRefreshing,\n refreshMetrics,\n } = useReportMetricsContext();\n const { data, eventsTransformed } = useCatalogDataContext();\n\n const reportMetricsMapped: SaleReportMetricsWithGroupBy[] | undefined =\n useMemo(\n () => mapReportMetrics(reportMetrics, eventsTransformed, data),\n [data, eventsTransformed, reportMetrics]\n );\n\n const reportSummaryMapped: SaleReportMetricsWithGroupBy | undefined = useMemo(\n () =>\n mapReportMetricsSummary(reportConfig, reportSummary, reportMetricsMapped),\n [reportConfig, reportMetricsMapped, reportSummary]\n );\n\n const initSorting = useMemo(() => {\n const sortBy =\n reportConfig.sortBy ??\n GROUP_BY_TO_PRIMARY_COLUMN_ID[reportConfig.groupBy];\n\n return [\n {\n id: sortBy,\n desc: reportConfig.isSortDescending ?? false,\n },\n ];\n }, [\n reportConfig.groupBy,\n reportConfig.isSortDescending,\n reportConfig.sortBy,\n ]);\n\n return (\n
    \n {reportConfig.reportName && (\n

    {reportConfig.reportName}

    \n )}\n \n {isLoading || !reportConfig ? (\n \n ) : (\n
    \n \n {isRefreshing && (\n }\n />\n )}\n
    \n )}\n
    \n );\n}\n","import { useMemo } from 'react';\nimport { useLocation, useParams } from 'react-router-dom';\nimport { ReportsPageToolbar } from 'src/components/Reports/ReportsPageToolbar';\nimport { ReportsSalePage } from 'src/components/ReportsSalePage';\nimport { Content } from 'src/contexts/ContentContext';\nimport { DialogProvider } from 'src/contexts/DialogContext/DialogContext';\nimport { WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { useReportConfigs } from 'src/hooks/useReportConfigs';\nimport { LayoutContent } from 'src/navigations/LayoutContent';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ReportTypes } from 'src/utils/reportsUtils';\n\nimport { MainRoute } from '../MainRoute';\nimport { ReportsSaleContextProvider } from './ReportsSaleContextProvider';\n\nexport function ReportsSale() {\n return (\n \n \n \n );\n}\n\nfunction ReportsSaleContent() {\n const { reportId } = useParams();\n const location = useLocation();\n\n const { reportConfigs, isLoading } = useReportConfigs({\n reportType: ReportTypes.Sale,\n });\n\n const reportConfig = reportConfigs?.find(\n (r) => r.reportId?.toString() === reportId\n );\n\n // Only use value provided at the first time (should be from '/reports')\n const returnUrl = useMemo(() => {\n return (location.state as { returnUrl?: string })?.returnUrl;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n if (reportConfig == null) {\n return isLoading ? (\n \n ) : (\n \n }\n />\n \n );\n }\n\n return (\n \n \n \n \n \n \n );\n}\n","import { createColumnHelper } from '@tanstack/react-table';\nimport { formatInTimeZone } from 'date-fns-tz';\nimport {\n COLUMN_MAX_SIZE,\n COLUMN_MIN_SIZE,\n} from 'src/contexts/ColumnResizingContext/ColumnResizingContext.types';\nimport {\n COLUMN_DEFAULT_SIZE_BASE,\n COLUMN_DEFAULT_SIZE_LG,\n COLUMN_DEFAULT_SIZE_XL,\n} from 'src/contexts/ColumnResizingContext/ColumnResizingContext.types';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ReportMetricsResponse } from 'src/contexts/ReportMetricsContext/ReportMetricsContextV2';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { TableHeaderCellDiv } from 'src/core/ui/TableHeaderCellDiv';\nimport { useColumnUserSetting } from 'src/hooks/useColumnUserSetting';\nimport { FormatOption } from 'src/modals/EditTableColumns';\nimport { createInventoryEventUrl } from 'src/navigations/Routes/InventoryEvent/InventoryEvent.utils';\nimport { defaultColumnHelperAccessor } from 'src/tables/ReportTableCommon/DefaultColumnHelperAccessor';\nimport { LinkCell } from 'src/tables/ReportTableCommon/LinkCell';\nimport { SHIMMERING_DIV_HEIGHT_REPORT } from 'src/tables/ReportTableCommon/ReportTableCommon.constants';\nimport { TableHeader } from 'src/tables/ReportTableCommon/TableHeader';\nimport { TextCell } from 'src/tables/ReportTableCommon/TextCell';\nimport { TableShimmeringDiv } from 'src/tables/Table/Table.styled';\nimport { DateCell } from 'src/tables/Table/TableCells';\nimport { InHandCell } from 'src/tables/Table/TableCells';\nimport {\n SalesReportTableGroupingColumnId,\n SalesReportTableValueColumnId,\n} from 'src/utils/columns/sales/salesColumnUtils.types';\nimport {\n SALES_REPORT_TABLE_GROUPING_COLUMN_ID_TO_CONTENT_ID,\n SALES_REPORT_TABLE_VALUE_COLUMN_ID_TO_CONTENT_ID,\n} from 'src/utils/constants/contentIdMaps';\nimport { getSaleDetailsRelativeUrl } from 'src/utils/saleUtils';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport { PointOfSaleSaleStatus, ReportValueType } from 'src/WebApiController';\n\nconst SECTION_TYPE = SectionType.SalesReport;\n\nconst columnHelper = createColumnHelper();\n\nconst accessorFn = (columnId: SalesReportTableGroupingColumnId) => {\n return (data: ReportMetricsResponse | null) =>\n data?.[columnId.toUpperCase()] ?? '';\n};\n\nconst SALE_REPORT_SPECIAL_TABLE_COLUMNS_CONFIG = {\n [SalesReportTableGroupingColumnId.SaleMonth]: columnHelper.accessor(\n accessorFn(SalesReportTableGroupingColumnId.SaleMonth),\n {\n id: SalesReportTableGroupingColumnId.SaleMonth,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n if (!original) {\n return ;\n }\n\n const dateValue = getValue();\n\n return (\n \n
    \n {/* Already converted to account timezone */}\n {dateValue\n ? formatInTimeZone(new Date(dateValue), 'UTC', 'MMMM yyyy')\n : ''}\n
    \n
    \n );\n },\n }\n ),\n [SalesReportTableGroupingColumnId.SaleWeek]: columnHelper.accessor(\n accessorFn(SalesReportTableGroupingColumnId.SaleWeek),\n {\n id: SalesReportTableGroupingColumnId.SaleWeek,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n if (!original) {\n return ;\n }\n\n const dateValue = getValue();\n\n const dateEndOfWeek = dateValue ? new Date(dateValue) : null;\n if (dateEndOfWeek) {\n dateEndOfWeek.setDate(dateEndOfWeek.getDate() + 6);\n }\n\n return (\n \n
    \n {/* Already converted to account timezone */}\n {dateValue && dateEndOfWeek\n ? formatInTimeZone(new Date(dateValue), 'UTC', 'yyyy/MM/dd') +\n ' - ' +\n formatInTimeZone(dateEndOfWeek, 'UTC', 'yyyy/MM/dd')\n : ''}\n
    \n
    \n );\n },\n }\n ),\n [SalesReportTableGroupingColumnId.SaleDay]: columnHelper.accessor(\n accessorFn(SalesReportTableGroupingColumnId.SaleDay),\n {\n id: SalesReportTableGroupingColumnId.SaleDay,\n header: (params) => (\n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n if (!original) {\n return ;\n }\n\n const dateValue = getValue();\n\n return (\n \n
    \n {/* Already converted to account timezone */}\n {dateValue\n ? formatInTimeZone(new Date(dateValue), 'UTC', 'yyyy/MM/dd')\n : ''}\n
    \n
    \n );\n },\n }\n ),\n [SalesReportTableGroupingColumnId.EventId]: columnHelper.accessor(\n accessorFn(SalesReportTableGroupingColumnId.EventId),\n {\n id: SalesReportTableGroupingColumnId.EventId,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: (params) => {\n const eventId = params.row.original?.eventId;\n if (!eventId) {\n return ;\n }\n const eventUrl = createInventoryEventUrl(eventId);\n return (\n \n );\n },\n }\n ),\n [SalesReportTableGroupingColumnId.LocalEventDateTime]: columnHelper.accessor(\n accessorFn(SalesReportTableGroupingColumnId.LocalEventDateTime),\n {\n id: SalesReportTableGroupingColumnId.LocalEventDateTime,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_XL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({\n getValue,\n row: { original },\n column: { id: columnId },\n }) {\n const value = getValue();\n const { userDefinedPrecision = FormatOption.DateTime_MMDD_Time_Day } =\n useColumnUserSetting(columnId, SECTION_TYPE);\n\n if (!original) {\n return ;\n }\n const dateValue = value ? new Date(value).toISOString() : value;\n\n return (\n \n );\n },\n }\n ),\n [SalesReportTableGroupingColumnId.SaleId]: columnHelper.accessor(\n accessorFn(SalesReportTableGroupingColumnId.SaleId),\n {\n id: SalesReportTableGroupingColumnId.SaleId,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ getValue }) => {\n const saleId = getValue();\n\n if (!saleId) {\n return ;\n }\n\n const url = getSaleDetailsRelativeUrl(saleId!);\n return (\n \n );\n },\n }\n ),\n [SalesReportTableGroupingColumnId.InHandDate]: columnHelper.accessor(\n accessorFn(SalesReportTableGroupingColumnId.InHandDate),\n {\n id: SalesReportTableGroupingColumnId.InHandDate,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_XL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ getValue, row: { original } }) => {\n const value = getValue();\n if (!original) {\n return ;\n }\n return (\n \n \n \n );\n },\n sortingFn: 'datetime',\n }\n ),\n} as const;\n\nexport const saleReportV2TableColumnDef = (\n columnId: string,\n valueType: ReportValueType | undefined\n) => {\n const specialConfig = Object.entries(\n SALE_REPORT_SPECIAL_TABLE_COLUMNS_CONFIG\n ).find(([key]) => key === columnId)?.[1];\n\n if (specialConfig) {\n return specialConfig;\n }\n\n const headerContentId =\n SALES_REPORT_TABLE_GROUPING_COLUMN_ID_TO_CONTENT_ID[\n columnId as SalesReportTableGroupingColumnId\n ] ??\n SALES_REPORT_TABLE_VALUE_COLUMN_ID_TO_CONTENT_ID[\n columnId as SalesReportTableValueColumnId\n ];\n\n return defaultColumnHelperAccessor(\n columnHelper,\n columnId,\n headerContentId,\n valueType\n );\n};\n","import { ColumnDef } from '@tanstack/react-table';\nimport { createContext, PropsWithChildren, useContext, useMemo } from 'react';\nimport {\n ReportMetricsResponse,\n ReportValueTypesReponse,\n} from 'src/contexts/ReportMetricsContext/ReportMetricsContextV2';\nimport { ReportConfigV2 } from 'src/hooks/useReportConfigsV2';\nimport { SalesReportTableColumnId } from 'src/utils/columns/sales/salesColumnUtils.types';\n\nimport { saleReportV2TableColumnDef } from './configs/SaleReportTableColumnsConfigV2';\n\ntype SaleReportTableColumnDefContextType = {\n displayedColumnsConfig: ColumnDef[] | undefined;\n};\n\nconst SaleReportTableColumnDefContext =\n createContext({\n displayedColumnsConfig: undefined,\n });\n\nexport const SaleReportTableColumnDefContextProviderV2 = ({\n report,\n reportValueTypes,\n children,\n}: PropsWithChildren<{\n report: ReportConfigV2;\n reportValueTypes: ReportValueTypesReponse | undefined;\n}>) => {\n const displayedColumnsConfig = useMemo(() => {\n const columns = [\n ...(report.request.rowGroupings?.map((c) => c.columnName) ?? []),\n ...(report.request.aggregations?.map((c) => c.columnName) ?? []),\n ];\n\n return columns.map((columnId) =>\n saleReportV2TableColumnDef(\n columnId as SalesReportTableColumnId,\n reportValueTypes?.[columnId.toUpperCase()]\n )\n );\n }, [\n report.request.aggregations,\n report.request.rowGroupings,\n reportValueTypes,\n ]);\n\n return (\n \n {children}\n \n );\n};\n\nexport const useSaleReportTableColumnDefV2 = () =>\n useContext(SaleReportTableColumnDefContext);\n","import {\n functionalUpdate,\n PaginationState,\n SortingState,\n TableOptions,\n} from '@tanstack/react-table';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport { useActiveSortTableColumnContext } from 'src/contexts/ActiveSortTableColumnContext';\nimport { ColumnResizingContextProvider } from 'src/contexts/ColumnResizingContext/ColumnResizingContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport {\n ReportMetricsResponse,\n useReportMetricsContextV2,\n} from 'src/contexts/ReportMetricsContext/ReportMetricsContextV2';\nimport { NoData, Table, VirtuosoScrollEvent } from 'src/tables/Table';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { ReportTableV2Props } from '../ReportTableCommon/ReportTableCommon.types';\nimport {\n SaleReportTableColumnDefContextProviderV2,\n useSaleReportTableColumnDefV2,\n} from './SaleReportTableColumnDefContextV2';\n\nexport const SaleReportTableV2 = ({\n report,\n reportValueTypes,\n ...rest\n}: ReportTableV2Props) => {\n return (\n \n \n \n );\n};\n\nconst SaleReportTableInternal = ({\n metricsData,\n summaryData,\n report,\n onMount,\n onUnmount,\n initState,\n className,\n}: ReportTableV2Props) => {\n const {\n isFetchingNextPage,\n fetchNextPage,\n hasNextPage,\n isReportConfigEmpty,\n } = useReportMetricsContextV2();\n\n // Enable passing in table state as parameters -- we can remount with the last state the user was on\n const { activeSortTableColumn, setActiveSortTableColumn } =\n useActiveSortTableColumnContext();\n const [sorting, setSorting] = useState(\n activeSortTableColumn || initState?.sorting || []\n );\n\n const data = useMemo(() => {\n const shimmeringDivCount = 500;\n return metricsData ?? Array(shimmeringDivCount).fill(null);\n }, [metricsData]);\n\n const [pagination, setPagination] = useState({\n pageIndex: 0,\n pageSize: Math.max(1, data.length),\n });\n\n useEffect(() => {\n if (pagination.pageSize !== data.length) {\n setPagination((prevState) => ({\n ...prevState,\n pageSize: data.length,\n }));\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [data, report]);\n\n useEffect(() => {\n onMount?.();\n });\n\n useEffect(() => {\n /**\n * Intent for `onMount` is use with 'windowing' in order to maintain user state\n * when the component is scrolled back into view.\n * Anything that needs to be persisted in `react-table` state should be added here.\n * Only update on unmount to ensure we aren't doing too many re-renders.\n */\n return () => onUnmount?.({ pagination, sorting });\n }, [pagination, sorting, onUnmount]);\n\n const { displayedColumnsConfig = [] } = useSaleReportTableColumnDefV2();\n\n const onScroll = useCallback(\n (virtuosoScrollEvent: VirtuosoScrollEvent) => {\n const { element } = virtuosoScrollEvent;\n const { scrollHeight, scrollTop, clientHeight } = element;\n // once the user has scrolled within 500px of the bottom of the table, fetch more data if we can\n // TODO change this to constant\n if (\n scrollHeight - scrollTop - clientHeight < 500 &&\n !isFetchingNextPage &&\n hasNextPage\n ) {\n fetchNextPage();\n }\n },\n [fetchNextPage, hasNextPage, isFetchingNextPage]\n );\n\n const options: Partial> = useMemo(\n () => ({\n data,\n meta: {\n summaryData,\n },\n columns: displayedColumnsConfig,\n state: {\n pagination,\n sorting,\n },\n onPaginationChange: setPagination,\n onSortingChange: (sortingUpdaterFn) => {\n const newSortVal = functionalUpdate(sortingUpdaterFn, sorting);\n setSorting(newSortVal);\n setActiveSortTableColumn(newSortVal);\n },\n enableRowSelection: true,\n }),\n [\n data,\n summaryData,\n displayedColumnsConfig,\n pagination,\n sorting,\n setActiveSortTableColumn,\n ]\n );\n\n return isReportConfigEmpty ? (\n <>\n ) : data?.length > 0 ? (\n \n \n \n ) : (\n \n \n \n );\n};\n\nexport default SaleReportTableV2;\n","import { useReportMetricsContextV2 } from 'src/contexts/ReportMetricsContext/ReportMetricsContextV2';\nimport { ReportConfigV2 } from 'src/hooks/useReportConfigsV2';\nimport SaleReportTableV2 from 'src/tables/SalesTable/SaleReportTableV2';\n\nimport { ReportsPageLayout } from '../Reports/ReportsPageLayout';\nimport * as styles from './ReportsSalePage.css';\n\nexport function ReportsSalePageV2({\n reportConfig,\n}: {\n reportConfig: ReportConfigV2;\n}) {\n const { reportMetrics, reportSummary, isLoading, reportValueTypes } =\n useReportMetricsContextV2();\n\n return (\n \n }\n />\n );\n}\n","import { useLocation, useParams } from 'react-router-dom';\nimport { ReportsSalePageV2 } from 'src/components/ReportsSalePage/ReportsSalePageV2';\nimport { Content } from 'src/contexts/ContentContext';\nimport { DialogProvider } from 'src/contexts/DialogContext/DialogContext';\nimport { WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { useReportConfigsV2 } from 'src/hooks/useReportConfigsV2';\nimport { useReportPermissions } from 'src/hooks/useReportPermissions';\nimport { LayoutContent } from 'src/navigations/LayoutContent';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ReportTypesV2 } from 'src/utils/reportsUtils';\n\nimport { MainRoute } from '../MainRoute';\nimport { ReportsSaleContextProviderV2 } from './ReportsSaleContextProviderV2';\n\nexport function ReportsSaleV2() {\n const { hasAccessToReportingV2, hasReportSinglePagedV1V2Feature } =\n useReportPermissions();\n\n const location = useLocation();\n\n const isFromV1Page = location.state?.isFromV1Page === true;\n\n const mainRoute =\n !hasAccessToReportingV2 || isFromV1Page || hasReportSinglePagedV1V2Feature\n ? MainRoute.Reports\n : MainRoute.ReportsV2;\n\n return (\n \n \n \n );\n}\n\nfunction ReportsSaleContentV2() {\n const { reportId } = useParams();\n\n const { reportConfigs, isLoading, isFetching } =\n useReportConfigsV2({\n reportType: ReportTypesV2.SaleV2,\n });\n\n const reportConfig = reportConfigs?.find(\n (r) => r.reportId?.toString() === reportId\n );\n\n if (reportConfig == null) {\n return isLoading || isFetching ? (\n \n ) : (\n \n }\n />\n \n );\n }\n\n return (\n \n \n \n \n \n );\n}\n","import { EntitySearchFilterBar } from 'src/components/EntitySearch';\nimport { FilterDropdownItem } from 'src/components/Filters';\nimport { useSaleFilters } from 'src/components/MainFilterBar';\nimport { SaleQuery, SaleSearchResult } from 'src/WebApiController';\n\nexport const SaleSearchFilterBar = (props: {\n activeSearchConfig?: SaleSearchResult;\n onSubmitFilter?: (query: SaleQuery) => void;\n selectedFilters?: FilterDropdownItem[];\n setSelectedFilters: (sf: FilterDropdownItem[]) => void;\n}) => {\n const { filters } = useSaleFilters({\n showCatalogFilters: true,\n isHorizontalLayout: true,\n });\n\n return (\n \n );\n};\n","import { MouseEvent } from 'react';\nimport { useToggle } from 'react-use';\nimport { MultiSelectActionBar } from 'src/components/common/MultiSelect/MultiSelectActionBar';\nimport { SetSalesFlattenedViewSelectionCountLabel } from 'src/components/Events/EventListing/SalesEventListing/SetSalesFlattenedViewSelectionCountLabel';\nimport { SalesBulkActionsPermissions } from 'src/components/Sales/BulkActions/SalesBulkActionsPermissions';\nimport { SalesGlobalBulkActions } from 'src/components/Sales/BulkActions/SalesGlobalBulkActions/SalesGlobalBulkActions';\nimport { Content } from 'src/contexts/ContentContext';\nimport { NO_GROUP_ID } from 'src/contexts/MultiSelectionContext';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { ColumnSettingsModal } from 'src/modals/ColumnSettings/ColumnSettings';\nimport { LayoutIcon } from 'src/svgs';\nimport { CustomSalesColumn } from 'src/utils/columns/sales/salesCustomColumnUtils.types';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport { SaleSearchResult } from 'src/WebApiController';\n\nimport { container } from './SaleSearchToolbar.css';\n\nexport const SaleSearchToolbar = ({\n disabled,\n}: {\n disabled?: boolean;\n setDisabled?: (d: boolean) => void;\n activeSearchConfig?: SaleSearchResult;\n}) => {\n const [isColumnModalOpen, toggleColumnModal] = useToggle(false);\n\n const onColumnSettingButtonClickHandler = (\n e: MouseEvent\n ) => {\n e.stopPropagation();\n if (!isColumnModalOpen) toggleColumnModal(true);\n };\n\n return (\n \n
    \n \n \n {!disabled && (\n \n \n \n )}\n \n \n
    \n\n \n \n \n \n \n \n {isColumnModalOpen ? (\n \n onClose={toggleColumnModal}\n sectionType={SectionType.SalesFlattened}\n showTicketClassColor\n />\n ) : null}\n \n );\n};\n","import { useCallback, useMemo, useState } from 'react';\nimport { useLocation } from 'react-router-dom';\nimport {\n EntitySearchConfigsToolbar,\n EntitySearchRefetcher,\n useEntitySearch,\n} from 'src/components/EntitySearch';\nimport { SalesFlattenedView } from 'src/components/Events/EventListing/SalesEventListing/SalesFlattenedView';\nimport { SaleSearchBox } from 'src/components/Sales/SaleFilterBar/SaleSearchBox';\nimport { ActivePosEntityProvider } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n CatalogDataContextProvider,\n useCatalogDataContext,\n} from 'src/contexts/CatalogDataContext';\nimport { CatalogMultiSelectionContextProvider } from 'src/contexts/CatalogMultiSelectionContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { DialogProvider } from 'src/contexts/DialogContext/DialogContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { FilterQueryContextProvider } from 'src/contexts/FilterQueryContext';\nimport {\n MultiSelectionContextProvider,\n MultiSelectScope,\n NO_GROUP_ID,\n} from 'src/contexts/MultiSelectionContext';\nimport { SellerUserSettingsProvider } from 'src/contexts/SellerUserSettingsContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { vars } from 'src/core/themes';\nimport { DividerLine } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { LayoutContent } from 'src/navigations/LayoutContent';\nimport { SaleDeeplinkQueryParam } from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { removeDeepLinkUrlPartsFromRelativeUrl } from 'src/utils/deepLinkUtils';\nimport { DefaultSaleQuery, EmptySaleQuery } from 'src/utils/eventQueryUtils';\nimport { transformData } from 'src/utils/eventWithDataUtils';\nimport { EventPageLocationState } from 'src/utils/types/EventPageLocationState';\nimport { SomethingWentWrong } from 'src/views';\nimport {\n ActionOutboxEntityType,\n CatalogClient,\n CatalogResults,\n Feature,\n SaleClient,\n SaleDetails,\n SaleQuery,\n SaleSearchResult,\n SalesViewMode,\n} from 'src/WebApiController';\n\nimport { getDefaultReturnUrl } from '../InventoryEvent/constants';\nimport {\n ACTIVE_EVENT_IDS_2_QUERY_PARAM,\n ACTIVE_EVENT_IDS_QUERY_PARAM,\n TAB_EVENT_IDS_2_QUERY_PARAM,\n TAB_EVENT_IDS_QUERY_PARAM,\n} from '../InventoryEvent/InventoryEvent.constants';\nimport { MainRoute } from '../MainRoute';\nimport {\n getCatalogData,\n getCatalogDataExpanded,\n SALE_USER_SETTINGS,\n salesQueryValueTransformFromUrl,\n salesQueryValueTransformToUrl,\n} from '../Sales/Sales';\nimport * as styles from './SaleSearch.css';\nimport { SaleSearchFilterBar } from './SaleSearchFilterBar';\nimport { SaleSearchToolbar } from './SaleSearchToolbar';\n\nexport function SaleSearch() {\n return (\n \n \n initialQuery={{\n ...DefaultSaleQuery,\n viewMode: SalesViewMode.FlattenedView,\n }}\n emptyQuery={EmptySaleQuery}\n queryValueTransformToUrl={salesQueryValueTransformToUrl}\n queryValueTransformFromUrl={salesQueryValueTransformFromUrl}\n saveQueryInUrl\n >\n \n \n \n );\n}\n\nfunction SaleSearchPage() {\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n\n const [activeSearchConfig, setActiveSearchConfig] =\n useState();\n\n const getCatalogDataExpandedCallback = useCallback(\n (ids: string[], f: SaleQuery) => {\n // Check to see if if is empty filter, query\n if (\n activeSearchConfig == null || // do not start query for items if there is no activeSearchConfig\n (f.searchConfigId && !f.entityIds?.length) // we don't want to query when the filter has the search config id but no entity ids\n ) {\n return Promise.resolve({});\n }\n\n // If we're querying by ids - we want to get the latest greatest\n // We're only using readonly-db if we're filtering\n const useReadOnlyDb = f.entityIds?.length ? false : true;\n return getCatalogDataExpanded(ids, f, useReadOnlyDb, {\n activeAccountWebClientConfig,\n onError: (error) => {\n trackError('SaleClient.getSalesForEvents', error, {\n ...f,\n eventIds: ids,\n });\n },\n });\n },\n [activeAccountWebClientConfig, activeSearchConfig, trackError]\n );\n\n const getCatalogDataCallback = useCallback(\n async (c: CatalogClient, f: SaleQuery) => {\n // Check to see if if is empty filter, query\n if (\n f.searchConfigId &&\n !f.entityIds?.length // we don't want to query when the filter has the search config id but no entity ids\n ) {\n // If there is no filter (empty query) then don't try to query for anything\n return {\n events: {},\n performers: {},\n venues: {},\n venueCfgs: {},\n } as CatalogResults;\n }\n\n return await getCatalogData(c, f, true);\n },\n []\n );\n\n return (\n \n entityType={ActionOutboxEntityType.Sale}\n queryKey=\"getCatalogForSaleOrders\"\n getCatalogData={getCatalogDataCallback}\n getCatalogDataExpanded={getCatalogDataExpandedCallback}\n transformEventData={transformData}\n disableAutoRefresh\n ignoreMaxCount\n >\n \n \n \n \n \n \n );\n}\n\nfunction SaleSearchContent({\n activeSearchConfig,\n setActiveSearchConfig,\n}: {\n activeSearchConfig: SaleSearchResult | undefined;\n setActiveSearchConfig: (a: SaleSearchResult | undefined) => void;\n}) {\n const searchTitle = useContent(ContentId.SearchSales);\n const hasColumnFilterSearchViewFeature = useUserHasFeature(\n Feature.ColumnFilterSearchView\n );\n\n const { activeAccountWebClientConfig } = useAppContext();\n const location = useLocation();\n const {\n errorInfo,\n isLoading: isCatalogDataLoading,\n isItemsLoading,\n eventsTransformed,\n } = useCatalogDataContext();\n\n const {\n selectedFilters,\n setSelectedFilters,\n onSetActiveSearchConfig,\n onSaveSearchResult,\n onDeleteSearchResult,\n onRequeryForTheResult,\n refetchData,\n disabled,\n setDisabled,\n } = useEntitySearch(\n activeSearchConfig,\n setActiveSearchConfig,\n SalesViewMode.FlattenedView,\n (client, id) => client.getSaleSearchResult(id),\n (client, r) => client.saveSaleSearchResult(r)\n );\n\n // Only use value provided at the first time (should be from '/purchases')\n const returnUrl = useMemo(() => {\n const locationState = (location.state ?? {}) as EventPageLocationState;\n\n if (locationState.returnUrl && locationState.keepReturnUrlUnchanged) {\n return locationState.returnUrl;\n }\n\n const relativeUrl =\n locationState.returnUrl || getDefaultReturnUrl('purchases');\n\n return removeDeepLinkUrlPartsFromRelativeUrl(relativeUrl, [\n SaleDeeplinkQueryParam,\n ACTIVE_EVENT_IDS_QUERY_PARAM,\n TAB_EVENT_IDS_QUERY_PARAM,\n ACTIVE_EVENT_IDS_2_QUERY_PARAM,\n TAB_EVENT_IDS_2_QUERY_PARAM,\n ]);\n }, [location.state]);\n\n const getActivePosEntity = useCallback(\n async (saleId: number) => {\n const saleDetails = await new SaleClient(\n activeAccountWebClientConfig\n ).getSaleBySaleId(saleId);\n if (saleDetails) {\n return {\n posEntityId: saleDetails.id,\n posEntity: saleDetails,\n event: null,\n posEntityDisplayId: saleDetails.id.toString(),\n };\n }\n\n return {};\n },\n [activeAccountWebClientConfig]\n );\n\n const dataIsLoading = isCatalogDataLoading;\n\n return (\n \n entityType={ActionOutboxEntityType.Sale}\n getActivePosEntity={getActivePosEntity}\n >\n \n \n }\n >\n \n client.getSaleSearchConfigs(includeAllUser)\n }\n getSearchResult={(client, id) => client.getSaleSearchResult(id)}\n additionalActions={}\n />\n \n {\n if (!activeSearchConfig) {\n // Setting an empty search config so it starts to filter\n onSetActiveSearchConfig({\n id: null,\n name: null,\n query: filter,\n ownerUserId: null,\n count: null,\n entityIds: null,\n lastFetchDate: null,\n });\n }\n refetchData(filter);\n }}\n />\n \n \n \n
    \n {errorInfo && (\n \n )\n }\n />\n )}\n {(dataIsLoading || isItemsLoading) && !eventsTransformed?.length ? (\n \n ) : (\n \n )}\n
    \n \n
    \n \n );\n}\n","import clsx from 'clsx';\nimport { Dispatch, SetStateAction, useCallback } from 'react';\nimport { useToggle } from 'react-use';\nimport { EventAccordionItemProps } from 'src/components/Accordions';\nimport { useCollapsableViewContext } from 'src/contexts/CollapsableViewContext/CollapsableViewContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport {\n MultiSelectScope,\n useMultiSelectionContext,\n} from 'src/contexts/MultiSelectionContext';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ColumnSettingsModal } from 'src/modals/ColumnSettings/ColumnSettings';\nimport { LayoutIcon } from 'src/svgs';\nimport { CustomSalesColumn } from 'src/utils/columns/sales/salesCustomColumnUtils.types';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SectionType } from 'src/utils/types/sectionType';\nimport { EventWithData, Sale } from 'src/WebApiController';\nimport { Feature } from 'src/WebApiController';\n\nimport * as styles from '../../Events/EventPage/EventPage.css';\n\ntype SaleEventContentProps = {\n accordionItemProps?: EventWithData;\n saleAccordionItem?: EventAccordionItemProps;\n selectedSaleIds: number[];\n setSelectedSaleIds: Dispatch>;\n};\n\nexport function SaleEventInfoSection({\n accordionItemProps,\n saleAccordionItem,\n selectedSaleIds,\n setSelectedSaleIds,\n}: SaleEventContentProps) {\n const { BodyComponent, AfterHeaderComponent } = saleAccordionItem || {};\n const { onScroll, isCollapsedView, isEnabled } = useCollapsableViewContext();\n\n const hasEventListingTableHotkeysFeature = useUserHasFeature(\n Feature.EventListingTableHotkeys\n );\n const { selectionMode } = useMultiSelectionContext();\n const isSelectionModeOn = !!selectionMode?.mode;\n\n const [isColumnModalOpen, toggleColumnModal] = useToggle(false);\n\n const onColumnSettingButtonClickHandler = useCallback(\n (e: React.MouseEvent) => {\n e.stopPropagation();\n if (!isColumnModalOpen) toggleColumnModal(true);\n },\n [isColumnModalOpen, toggleColumnModal]\n );\n\n return (\n
    \n {BodyComponent && accordionItemProps && (\n \n \n {isColumnModalOpen ? (\n \n onClose={toggleColumnModal}\n sectionType={SectionType.Sales}\n />\n ) : null}\n \n \n \n \n \n \n \n\n
    \n {AfterHeaderComponent && }\n
    \n \n \n
    \n \n )}\n \n );\n}\n","import { EventAccordionItemProps } from 'src/components/Accordions';\nimport { EventPageHeaderBase } from 'src/components/Events/EventPage/EventPageHeader';\nimport { useCatalogMetricsContext } from 'src/contexts/CatalogMetricsContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { formatPercent } from 'src/utils/numberFormatter';\nimport {\n ActionOutboxEntityType,\n Event,\n Sale,\n SaleMetrics,\n} from 'src/WebApiController';\n\nexport const SaleEventPageHeader = ({\n event,\n saleAccordionItem,\n}: {\n event: Event;\n saleAccordionItem?: EventAccordionItemProps;\n}) => {\n const { eventMetrics: eventMetricsMap } =\n useCatalogMetricsContext();\n\n const eventMetrics = eventMetricsMap?.[event?.viagVirtualId ?? ''];\n\n const formattedMetrics = [\n {\n name: ,\n value: formatPercent(eventMetrics?.marg || 0),\n },\n {\n name: ,\n value: `${\n eventMetrics?.qtySold || 0 / (eventMetrics?.saleUnfilled || 0)\n }/${eventMetrics?.qtySold}`,\n },\n {\n name: ,\n value: eventMetrics?.qtySold,\n },\n ];\n return (\n \n );\n};\n","import {\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport {\n EventAccordionItemProps,\n translateEventToSaleAccordionItem,\n} from 'src/components/Accordions';\nimport { SwiperButton } from 'src/components/Buttons/SwiperButton';\nimport { BackSection } from 'src/components/common/BackSection';\nimport * as EmptySectionContent from 'src/components/common/EmptySectionContent';\nimport {\n EventPageTabs,\n TabItem,\n} from 'src/components/Events/EventPage/EventPageTabs';\nimport { SidePanel } from 'src/components/Events/EventPage/SidePanel/SidePanel';\nimport { TagsSection } from 'src/components/Listings/InventoryEventPage/Sections/TagsSection';\nimport { ActiveFocusContextProvider } from 'src/contexts/ActiveFocusContext/ActiveFocusContext';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useCatalogDataContext } from 'src/contexts/CatalogDataContext';\nimport { CollapsableViewProvider } from 'src/contexts/CollapsableViewContext/CollapsableViewContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { EventMapContextProvider } from 'src/contexts/EventMapContext';\nimport { useFilterQueryContext } from 'src/contexts/FilterQueryContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { useMultiSelectionContext } from 'src/contexts/MultiSelectionContext';\nimport {\n EventLastReviewedContextProvider,\n useEventLastReviewedContext,\n} from 'src/contexts/SellerEventLastReviewContext/SellerEventLastReviewContext';\nimport {\n SidePanelPage,\n SidePanelProvider,\n} from 'src/contexts/SidePanelContext';\nimport { ExplorerLayout } from 'src/core/layouts';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { useQuickFilterSearchParam } from 'src/hooks/useQuickFilters';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport { SearchSolidIcon } from 'src/svgs/Viagogo';\nimport { SaleDeeplinkQueryParam } from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getDeepLinkIdFromUrl } from 'src/utils/deepLinkUtils';\nimport { getAppliedFilterCounts } from 'src/utils/eventQueryUtils';\nimport { getSaleDetailsModalConfigWithDeepLink } from 'src/utils/saleUtils';\nimport {\n EventWithData,\n Sale,\n SaleDetails,\n SaleQuery,\n UserSetting,\n} from 'src/WebApiController';\nimport Swiper from 'swiper';\n\nimport * as styles from '../../Events/EventPage/EventPage.css';\nimport { SaleEventInfoSection } from './SaleEventInfoSection';\nimport { SaleEventPageHeader } from './SaleEventPageHeader';\n\nexport function SaleEventPage({\n viagVirtualId,\n posEventIds,\n returnUrl,\n}: {\n posEventIds?: string[];\n viagVirtualId?: string;\n returnUrl?: string;\n}) {\n const { activeAccountWebClientConfig } = useAppContext();\n const {\n eventsTransformed,\n eventsExpansion: { setListItemExpansion },\n } = useCatalogDataContext();\n\n useEffect(() => {\n if (!viagVirtualId && posEventIds?.length) {\n setListItemExpansion(\n true,\n posEventIds.map((id) => `old:${id}`)\n );\n } else if (viagVirtualId) {\n setListItemExpansion(true, [viagVirtualId]);\n }\n }, [\n activeAccountWebClientConfig,\n posEventIds,\n setListItemExpansion,\n viagVirtualId,\n ]);\n\n const { setAllGroupsIds } = useMultiSelectionContext();\n\n const accordionItemProps = useMemo(\n () =>\n eventsTransformed?.length\n ? eventsTransformed.find(\n (ev) =>\n ev.event.viagVirtualId === viagVirtualId ||\n ev.event.posIds.some((id) => posEventIds?.includes(id))\n )\n : undefined,\n [eventsTransformed, posEventIds, viagVirtualId]\n );\n\n const salesAccordionItem = useMemo(\n () =>\n accordionItemProps &&\n translateEventToSaleAccordionItem(accordionItemProps, 0, true),\n [accordionItemProps]\n );\n\n useEffect(() => {\n if (salesAccordionItem) {\n setAllGroupsIds([salesAccordionItem.itemId]);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [salesAccordionItem]);\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n );\n}\n\ntype SalesEventContentProps = {\n accordionItemProps?: EventWithData;\n saleAccordionItem?: EventAccordionItemProps;\n returnUrl?: string;\n};\n\nexport const enum SaleEventTabs {\n Sales = 'sales',\n Tags = 'tags',\n None = 'none',\n}\n\nfunction SaleEventContent({\n accordionItemProps,\n saleAccordionItem,\n returnUrl,\n}: SalesEventContentProps) {\n const intialActiveTab = SaleEventTabs.Sales;\n\n const [selectedSaleIds, setSelectedSaleIds] = useState([]);\n const [activeTab, setActiveTab] = useState(intialActiveTab);\n\n const { isLoading } = useCatalogDataContext();\n const isMobile = useMatchMedia('mobile');\n\n const quickFilterSearchParams = useQuickFilterSearchParam();\n const { tempQuery, initialQuery, filterQuery } =\n useFilterQueryContext();\n\n const { setModal } = useContext(ModalContext);\n const { posEntity: sale, setActivePosEntity } =\n useActivePosEntityContext();\n\n const {\n value: defaultSalesTabUserSetting,\n setUserSetting: setDefaultSalesTabUserSetting,\n isLoading: defaultSalesTabLoading,\n } = useServerUserSetting({\n id: UserSetting.SalesDefaultTab,\n });\n\n const activeId = getDeepLinkIdFromUrl(\n SaleDeeplinkQueryParam,\n window.location.href\n );\n\n useEffect(() => {\n if (activeId?.length && !sale) {\n setActivePosEntity(parseInt(activeId), undefined, true);\n setModal(getSaleDetailsModalConfigWithDeepLink(activeId));\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [activeId]);\n\n const [defaultTab, setDefaultTab] = useState(\n defaultSalesTabUserSetting\n );\n\n useEffect(() => {\n if (\n defaultSalesTabUserSetting != null &&\n defaultSalesTabUserSetting !== activeTab &&\n defaultSalesTabUserSetting !== SaleEventTabs.None &&\n defaultSalesTabLoading === false\n ) {\n setActiveTab(defaultSalesTabUserSetting);\n }\n if (\n defaultSalesTabUserSetting != null &&\n defaultSalesTabUserSetting !== defaultTab &&\n defaultSalesTabUserSetting !== SaleEventTabs.None &&\n defaultSalesTabLoading === false\n ) {\n setDefaultTab(defaultSalesTabUserSetting);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [defaultSalesTabLoading, defaultSalesTabUserSetting]);\n\n const onSetDefaultTabClick = useCallback(\n async (tab: SaleEventTabs) => {\n if (tab !== activeTab && tab !== SaleEventTabs.None) {\n setActiveTab(tab);\n }\n if (tab !== defaultTab) {\n setDefaultTab(tab);\n }\n setDefaultSalesTabUserSetting(tab);\n },\n [activeTab, defaultTab, setDefaultSalesTabUserSetting]\n );\n\n const swiperRef = useRef();\n\n const event = accordionItemProps?.event;\n\n const { onSettingVirtualIds } = useEventLastReviewedContext();\n\n useEffect(() => {\n onSettingVirtualIds(event?.viagVirtualId ? [event?.viagVirtualId] : []);\n }, [event?.viagVirtualId, onSettingVirtualIds]);\n\n const tabs: TabItem[] = [\n {\n value: SaleEventTabs.Sales,\n label: ,\n content: (\n \n ),\n className: styles.tabContent,\n },\n {\n value: SaleEventTabs.Tags,\n label: ,\n content: event?.viagVirtualId && (\n \n ),\n },\n ];\n\n if (!event) {\n if (\n quickFilterSearchParams ||\n getAppliedFilterCounts(tempQuery, initialQuery)\n )\n return (\n \n \n \n }\n >\n \n \n \n \n \n \n \n );\n }\n\n if (isLoading || !event) {\n return ;\n }\n\n return (\n
    \n \n }\n >\n
    \n {isMobile && (\n \n \n \n \n )}\n \n \n \n \n
    \n \n
    \n );\n}\n","import { useCallback, useMemo } from 'react';\nimport { useLocation, useSearchParams } from 'react-router-dom';\nimport { getDefaultReturnUrl } from 'src/components/Events/EventPage/utils';\nimport { MainFilterBar } from 'src/components/MainFilterBar';\nimport { SaleEventPage } from 'src/components/Sales/SaleEventPage/SaleEventPage';\nimport { ActivePosEntityProvider } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { CatalogDataContextProvider } from 'src/contexts/CatalogDataContext';\nimport { CatalogMetricsContextProvider } from 'src/contexts/CatalogMetricsContext';\nimport { CatalogMultiSelectionContextProvider } from 'src/contexts/CatalogMultiSelectionContext';\nimport { DialogProvider } from 'src/contexts/DialogContext/DialogContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { FilterQueryContextProvider } from 'src/contexts/FilterQueryContext';\nimport { MultiSelectionContextProvider } from 'src/contexts/MultiSelectionContext';\nimport { SellerUserSettingsProvider } from 'src/contexts/SellerUserSettingsContext';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { LayoutContent } from 'src/navigations/LayoutContent';\nimport { queryIdSearchParam } from 'src/navigations/Routes/InventoryEvent/constants';\nimport {\n EventIdQueryParam,\n SaleDeeplinkQueryParam,\n} from 'src/utils/constants/constants';\nimport { removeDeepLinkUrlPartsFromRelativeUrl } from 'src/utils/deepLinkUtils';\nimport { EmptySaleQuery } from 'src/utils/eventQueryUtils';\nimport { transformData } from 'src/utils/eventWithDataUtils';\nimport { addSaleMetrics } from 'src/utils/ticketMetricUtils';\nimport { EventPageLocationState } from 'src/utils/types/EventPageLocationState';\nimport {\n ActionOutboxEntityType,\n Feature,\n SaleClient,\n SaleDetails,\n SaleMetrics,\n SaleQuery,\n UserSetting,\n} from 'src/WebApiController';\n\nimport {\n ACTIVE_EVENT_IDS_2_QUERY_PARAM,\n ACTIVE_EVENT_IDS_QUERY_PARAM,\n POS_EVENT_IDS_SEPARATOR,\n TAB_EVENT_IDS_2_QUERY_PARAM,\n TAB_EVENT_IDS_QUERY_PARAM,\n TAB_EVENT_IDS_SEPARATOR,\n} from '../InventoryEvent/InventoryEvent.constants';\nimport { MainRoute } from '../MainRoute';\nimport {\n getCatalogData,\n getCatalogDataExpanded,\n getCatalogMetrics,\n SALE_USER_SETTINGS,\n salesQueryValueTransformFromUrl,\n salesQueryValueTransformToUrl,\n} from '../Sales/Sales';\n\nexport function SalesEvent() {\n const [searchParams] = useSearchParams();\n const oldPosEventId = searchParams.get(queryIdSearchParam);\n const viagEventId = searchParams.get(EventIdQueryParam);\n\n const activeEventIds = searchParams.get(ACTIVE_EVENT_IDS_QUERY_PARAM);\n const tabEventIds = searchParams.get(TAB_EVENT_IDS_QUERY_PARAM);\n\n const activeEventIds2 = searchParams.get(ACTIVE_EVENT_IDS_2_QUERY_PARAM);\n const tabEventIds2 = searchParams.get(TAB_EVENT_IDS_2_QUERY_PARAM);\n\n const location = useLocation();\n\n const posEventIds = useMemo(\n // We need to make sure all the ids in the params are lowercase or else it won't be found in the CatalogDataContext\n () =>\n (tabEventIds != null\n ? activeEventIds?.toLowerCase()?.split(POS_EVENT_IDS_SEPARATOR)\n : oldPosEventId?.toLowerCase()?.split(POS_EVENT_IDS_SEPARATOR)) ?? [],\n [activeEventIds, oldPosEventId, tabEventIds]\n );\n\n const viagogoVirtualId = useMemo(\n // We need to make sure all the ids in the params are lowercase or else it won't be found in the CatalogDataContext\n () =>\n tabEventIds2 != null\n ? activeEventIds2?.toLowerCase()\n : viagEventId?.toLowerCase(),\n [activeEventIds2, tabEventIds2, viagEventId]\n );\n\n const { trackError } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n\n const getCatalogDataExpandedCallback = useCallback(\n (ids: string[], filterQuery: SaleQuery) =>\n getCatalogDataExpanded(ids, filterQuery, false, {\n activeAccountWebClientConfig,\n onError: (error) => {\n trackError('SaleClient.getSalesForEvents', error, {\n ...filterQuery,\n eventIds: ids,\n });\n },\n }),\n [activeAccountWebClientConfig, trackError]\n );\n\n const initialQuery = useMemo(() => {\n if (posEventIds.length || tabEventIds?.length) {\n const oldPosEventIds = tabEventIds\n ? tabEventIds\n .split(TAB_EVENT_IDS_SEPARATOR)\n .flatMap((eids) => eids.split(POS_EVENT_IDS_SEPARATOR))\n : posEventIds;\n return { ...EmptySaleQuery, oldPosEventIds };\n } else if (tabEventIds2?.length || viagogoVirtualId) {\n const eventOrMappingIds = tabEventIds2\n ? tabEventIds2.split(TAB_EVENT_IDS_SEPARATOR)\n : [viagogoVirtualId!];\n return { ...EmptySaleQuery, eventOrMappingIds };\n }\n\n return { ...EmptySaleQuery };\n }, [posEventIds, tabEventIds, tabEventIds2, viagogoVirtualId]);\n\n const getActivePosEntity = useCallback(\n async (saleId: number) => {\n if (activeAccountWebClientConfig.activeAccountId) {\n const saleDetail = await new SaleClient(\n activeAccountWebClientConfig\n ).getSaleBySaleId(saleId);\n\n if (saleDetail) {\n return {\n posEntityId: saleDetail.id,\n posEntity: saleDetail,\n posEntityDisplayId: saleDetail.idOnMkp,\n };\n }\n }\n return {};\n },\n [activeAccountWebClientConfig]\n );\n\n // Only use value provided at the first time (should be from '/inventory')\n const returnUrl = useMemo(() => {\n const locationState = (location.state ?? {}) as EventPageLocationState;\n\n if (locationState.returnUrl && locationState.keepReturnUrlUnchanged) {\n return locationState.returnUrl;\n }\n\n const relativeUrl =\n locationState.returnUrl || getDefaultReturnUrl('sales', viagEventId);\n\n return removeDeepLinkUrlPartsFromRelativeUrl(relativeUrl, [\n SaleDeeplinkQueryParam,\n ACTIVE_EVENT_IDS_QUERY_PARAM,\n TAB_EVENT_IDS_QUERY_PARAM,\n ACTIVE_EVENT_IDS_2_QUERY_PARAM,\n TAB_EVENT_IDS_2_QUERY_PARAM,\n ]);\n }, [location.state, viagEventId]);\n\n const hasMetricsV2Feature = useUserHasFeature(Feature.CatalogMetricsV2);\n\n if (\n !posEventIds.length &&\n !tabEventIds?.length &&\n !tabEventIds2?.length &&\n !viagogoVirtualId\n ) {\n return null;\n }\n\n return (\n \n \n initialQuery={initialQuery}\n emptyQuery={EmptySaleQuery}\n viewModeSettingId={UserSetting.SalePageViewMode}\n saveQueryInUrl\n queryValueTransformToUrl={salesQueryValueTransformToUrl}\n queryValueTransformFromUrl={salesQueryValueTransformFromUrl}\n >\n \n entityType={ActionOutboxEntityType.Sale}\n queryKey={'getCatalogForSale'}\n getCatalogData={(c, f) => getCatalogData(c, f, true)}\n getCatalogDataExpanded={getCatalogDataExpandedCallback}\n transformEventData={transformData}\n >\n \n queryKey=\"getCatalogSaleMetrics\"\n entityType={ActionOutboxEntityType.Sale}\n getCatalogMetrics={(c, f, r) =>\n getCatalogMetrics(c, f, r, hasMetricsV2Feature)\n }\n addCatalogMetrics={addSaleMetrics}\n >\n \n entityType={ActionOutboxEntityType.Sale}\n getActivePosEntity={getActivePosEntity}\n >\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n","import clsx from 'clsx';\nimport { useCallback, useMemo } from 'react';\nimport { matchPath, NavLink, Outlet, useLocation } from 'react-router-dom';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { useUserHasAutopricingFeature } from 'src/hooks/useUserHasAutopricingFeature';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { LayoutContent } from 'src/navigations/LayoutContent';\nimport { UnauthorizedAccessMessageContainer } from 'src/navigations/LayoutContent/LayoutContent.styled';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SETTINGS_VIEWS_TO_CONTENT_ID_MAP } from 'src/utils/constants/contentIdMaps';\nimport { Feature, Permission } from 'src/WebApiController';\n\nimport { MainRoute } from '../MainRoute';\nimport * as reportsStyles from '../Reports/Reports.css';\nimport { SettingsTree, SettingTab } from './constants';\nimport * as styles from './Settings.css';\n\nexport const Settings = () => {\n const { appContext } = useAppContext();\n\n const settingsText = useContent(ContentId.Settings);\n const { pathname } = useLocation();\n\n const hasSiteVersionFeature = useUserHasFeature(Feature.DisplayBuildVersion);\n const hasPurchaseSettingsTabFeature = useUserHasFeature(\n Feature.PurchaseSettingsTab\n );\n const hasTeamManagementFeature = useUserHasFeature(Feature.TeamManagement);\n const hasCurrencyConversionSettingsTabFeature = useUserHasFeature(\n Feature.CurrencyConversionSettingsTab\n );\n const hasAdminPermission = useUserHasAnyOfPermissions(\n Permission.SellerAccount_Admin\n );\n const hasFulfillmentProvidersFeature = useUserHasFeature(\n Feature.FulfillmentProviders\n );\n\n const hasVendorAccountV2 = useUserHasFeature(Feature.VendorAccountV2);\n\n const hasAutoPricingTabFeature = useUserHasAutopricingFeature(\n Feature.AutoPricingTabInAccountSettings\n );\n\n const hasVendorManagementPermission = useUserHasAnyOfPermissions(\n Permission.Purchases_Edit,\n Permission.Purchases_EditOwned,\n Permission.Purchases_EditVendor\n );\n\n const isAuthorized = useMemo(\n () => ({\n [SettingTab.UserManagement]: hasAdminPermission,\n [SettingTab.UserManagement_Users]: hasAdminPermission,\n [SettingTab.UserManagement_Roles]: hasAdminPermission,\n [SettingTab.UserManagement_Teams]:\n hasAdminPermission && hasTeamManagementFeature,\n [SettingTab.SellerAccount]: !hasVendorAccountV2 && hasAdminPermission,\n [SettingTab.VendorManagement]:\n hasVendorAccountV2 && hasVendorManagementPermission,\n [SettingTab.VendorManagement_Payments]:\n hasVendorAccountV2 && hasVendorManagementPermission,\n [SettingTab.VendorManagement_Vendors]:\n hasVendorAccountV2 && hasVendorManagementPermission,\n [SettingTab.MyAccount]: true,\n [SettingTab.SyncCenter]: hasAdminPermission,\n [SettingTab.CurrencyConversion]:\n hasAdminPermission && hasCurrencyConversionSettingsTabFeature,\n [SettingTab.PurchaseOrder]:\n hasAdminPermission && hasPurchaseSettingsTabFeature,\n [SettingTab.FulfillmentProviders]:\n hasAdminPermission && hasFulfillmentProvidersFeature,\n [SettingTab.AutoPricing]: hasAdminPermission && hasAutoPricingTabFeature,\n [SettingTab.Accounting]: hasAdminPermission,\n }),\n [\n hasAdminPermission,\n hasAutoPricingTabFeature,\n hasCurrencyConversionSettingsTabFeature,\n hasFulfillmentProvidersFeature,\n hasPurchaseSettingsTabFeature,\n hasTeamManagementFeature,\n hasVendorAccountV2,\n hasVendorManagementPermission,\n ]\n );\n\n const isPathActive = useCallback(\n (id: SettingTab) =>\n matchPath(pathname, `/settings/${SettingsTree[id]}${id}`),\n [pathname]\n );\n\n const hasPermissionsForActiveView = useMemo(() => {\n const activePath = Object.keys(isAuthorized).find((key) =>\n isPathActive(key as SettingTab)\n );\n\n const isRootPathActive = matchPath(pathname, '/settings');\n\n const hasPermissionsForActiveView =\n isRootPathActive || (isAuthorized[activePath as SettingTab] ?? false);\n\n return hasPermissionsForActiveView;\n }, [isAuthorized, pathname, isPathActive]);\n\n return (\n \n : {appContext.version}\n \n ) : null\n }\n >\n
    \n
    \n \n {(\n Object.entries(SETTINGS_VIEWS_TO_CONTENT_ID_MAP) as [\n SettingTab,\n ContentId,\n ][]\n ).map(([id, contentId]) => {\n const parent = SettingsTree[id as string];\n return isAuthorized[id] ? (\n {\n return clsx(\n reportsStyles.navTitle,\n reportsStyles.textPrimary,\n {\n [reportsStyles.navTitleActive]: isActive,\n [reportsStyles.navTitleSecondary]: parent !== '',\n }\n );\n }}\n >\n \n \n ) : null;\n })}\n
    \n \n {hasPermissionsForActiveView ? (\n \n ) : (\n \n \n \n )}\n
    \n \n \n \n );\n};\n","import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport {\n AutoCurrencyConversionSettings,\n SellerAccountClient,\n} from 'src/WebApiController';\n\nexport const useAutoCurrencyConversionSettings = () => {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const { trackError, showErrorDialog } = useErrorBoundaryContext();\n\n const queryClient = useQueryClient();\n const queryKey = [\n 'getAutoCurrencyConversionSettings',\n activeAccountWebClientConfig.activeAccountId,\n ];\n\n const shouldQuery = activeAccountWebClientConfig.activeAccountId != null;\n const query = useQuery({\n queryKey,\n queryFn: () => {\n if (!shouldQuery) {\n return null;\n }\n return new SellerAccountClient(\n activeAccountWebClientConfig\n ).getAutoCurrencyConversionSettings();\n },\n\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError(\n 'SellerAccountClient.getAutoCurrencyConversionSettings',\n error\n );\n },\n },\n });\n\n const mutation = useMutation({\n mutationFn: async ({\n input,\n }: {\n input: AutoCurrencyConversionSettings;\n }) => {\n return await new SellerAccountClient(\n activeAccountWebClientConfig\n ).mergeAutoCurrencyConversionSettings(input);\n },\n // optimistic ui\n onMutate: ({ input }) => {\n queryClient.cancelQueries({ queryKey });\n const prevValue = queryClient.getQueryData(queryKey);\n queryClient.setQueryData(queryKey, input);\n return { prevValue };\n },\n onError: (err: ErrorTypes, { input }, context) => {\n queryClient.setQueryData(queryKey, context?.prevValue);\n showErrorDialog(\n 'SellerAccountClient.mergeAutoCurrencyConversionSettings',\n err,\n {\n trackErrorData: { input },\n }\n );\n },\n onSettled: () => {\n queryClient.invalidateQueries({ queryKey });\n },\n });\n\n return {\n autoCurrencyConversionSettings: query.data,\n isLoading: query.isLoading,\n mergeAutoCurrencyConversionSettings: mutation.mutateAsync,\n };\n};\n","import { useCallback, useMemo } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { Switch } from 'src/core/interim/Switch';\nimport { MultiSelectDropBoxWithPills } from 'src/core/POS/MultiSelectDropBoxWithPills';\nimport { PosSelect } from 'src/core/POS/PosSelect';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { useAutoCurrencyConversionSettings } from 'src/hooks/api/useAutoCurrencyConversionSettings';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport * as styles from './MyAccount.css';\n\nexport const CurrencySection = () => {\n const { currencyCache } = useLocalizationContext();\n const {\n autoCurrencyConversionSettings,\n mergeAutoCurrencyConversionSettings,\n } = useAutoCurrencyConversionSettings();\n\n const onDefaultCurrencyChange = useCallback(\n (currencyCode: string) => {\n if (!autoCurrencyConversionSettings) return;\n\n mergeAutoCurrencyConversionSettings({\n input: {\n ...autoCurrencyConversionSettings,\n defaultCurrencyCode: currencyCode,\n ignoredCurrencyCodes:\n autoCurrencyConversionSettings?.ignoredCurrencyCodes?.filter(\n (code) => code !== currencyCode\n ) ?? [],\n },\n });\n },\n [autoCurrencyConversionSettings, mergeAutoCurrencyConversionSettings]\n );\n\n const onIgnoredCurrencyCodesChange = useCallback(\n (values: string[]) => {\n if (!autoCurrencyConversionSettings) return;\n\n mergeAutoCurrencyConversionSettings({\n input: {\n ...autoCurrencyConversionSettings,\n ignoredCurrencyCodes: values,\n },\n });\n },\n [autoCurrencyConversionSettings, mergeAutoCurrencyConversionSettings]\n );\n\n const onEnabledToggle = useCallback(() => {\n if (!autoCurrencyConversionSettings) return;\n\n mergeAutoCurrencyConversionSettings({\n input: {\n ...autoCurrencyConversionSettings,\n enabled: !(autoCurrencyConversionSettings?.enabled ?? false),\n },\n });\n }, [autoCurrencyConversionSettings, mergeAutoCurrencyConversionSettings]);\n\n const availableCurrenciesOptions = useMemo(\n () =>\n Object.values(currencyCache || []).reduce(\n (result, cur) => {\n result[cur.code] = cur.code;\n return result;\n },\n {} as Record\n ),\n [currencyCache]\n );\n\n const availableCurrenciesOptionsWithoutDefault = useMemo(\n () =>\n Object.values(currencyCache || []).reduce(\n (result, cur) => {\n if (\n cur.code !== autoCurrencyConversionSettings?.defaultCurrencyCode\n ) {\n result[cur.code] = cur.code;\n }\n return result;\n },\n {} as Record\n ),\n [autoCurrencyConversionSettings?.defaultCurrencyCode, currencyCache]\n );\n\n return (\n \n
    \n \n
    \n\n \n
    \n \n
    \n

    \n \n

    \n \n
    \n\n \n \n \n
    \n \n
    \n
    \n

    \n \n

    \n
    \n {autoCurrencyConversionSettings?.enabled && (\n \n
    \n \n
    \n

    \n \n

    \n \n
    \n )}\n \n );\n};\n","import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\nimport { id } from 'date-fns/locale';\nimport { useMemo } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport {\n CurrencyConversionOverride,\n CurrencyConversionOverrideRequest,\n Feature,\n PurchaseClient,\n} from 'src/WebApiController';\n\nimport { useUserHasFeature } from './useUserHasFeature';\n\n/**\n * Data and functions returned by the hook to help with CRUD of CurrencyConversionOverride\n */\ntype UseCurrencyConversionOverrides = {\n currencyConversionOverrides: CurrencyConversionOverride[] | null | undefined;\n isLoading: boolean;\n deleteCurrencyConversionOverride: (\n currencyConversionOverrideId: number\n ) => Promise;\n createCurrencyConversionOverride: (\n userGroupInput: CurrencyConversionOverrideRequest\n ) => Promise;\n updateCurrencyConversionOverride: (\n userGroupInput: CurrencyConversionOverrideRequest\n ) => Promise;\n};\n\n/**\n * Hook to help with CRUD of CurrencyConversionOverride\n * @param options\n * @returns\n */\nexport function useCurrencyConversionOverrides(): UseCurrencyConversionOverrides {\n const { showErrorDialog, trackError } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const client = useMemo(\n () => new PurchaseClient(activeAccountWebClientConfig),\n [activeAccountWebClientConfig]\n );\n\n const hasOverrideDailyFxRateFeature = useUserHasFeature(\n Feature.OverrideDailyFxRate\n );\n\n const queryClient = useQueryClient();\n const queryKey = [\n 'useCurrencyConversionOverrides',\n activeAccountWebClientConfig.activeAccountId,\n ];\n\n const shouldQuery =\n activeAccountWebClientConfig?.activeAccountId != null &&\n hasOverrideDailyFxRateFeature;\n\n const getAllQuery = useQuery({\n queryKey,\n queryFn: async () => {\n if (!shouldQuery) {\n return null;\n }\n\n return await client.getAllCurrencyConversionOverride();\n },\n\n enabled: shouldQuery,\n meta: {\n onError: (err: ErrorTypes) => {\n trackError('PurchaseClient.getAllCurrencyConversionOverride', err);\n },\n },\n refetchOnWindowFocus: false,\n });\n\n const updateMutation = useMutation({\n mutationFn: async ({\n value,\n }: {\n value: CurrencyConversionOverrideRequest;\n }) => {\n return await client.updateCurrencyConversionOverride(value);\n },\n // optimistic ui\n // Reference: https://tanstack.com/query/v3/docs/react/guides/optimistic-updates\n\n onMutate: ({ value }) => {\n queryClient.cancelQueries({ queryKey });\n const prevValue = queryClient.getQueryData<\n CurrencyConversionOverride[] | null\n >(queryKey);\n\n const newValue = prevValue?.map((r) =>\n r.currencyConversionOverrideId === value.currencyConversionOverrideId\n ? (value as CurrencyConversionOverride)\n : r\n );\n\n queryClient.setQueryData(\n queryKey,\n newValue\n );\n return { prevValue };\n },\n onError: (err: ErrorTypes, { value }, context) => {\n queryClient.setQueryData(queryKey, context?.prevValue);\n showErrorDialog('client.updateCurrencyConversionOverride', err, {\n trackErrorData: { id, value },\n });\n },\n onSettled: () => {\n queryClient.invalidateQueries({ queryKey });\n },\n });\n\n const updateCurrencyConversionOverride = async (\n userGroupInput: CurrencyConversionOverrideRequest\n ) => {\n return await updateMutation.mutateAsync({\n value: userGroupInput,\n });\n };\n\n const createMutation = useMutation({\n mutationFn: async ({\n value,\n }: {\n value: CurrencyConversionOverrideRequest;\n }) => {\n return await client.insertCurrencyConversionOverride(value);\n },\n // optimistic ui\n // Reference: https://tanstack.com/query/v3/docs/react/guides/optimistic-updates\n\n onMutate: ({ value }) => {\n queryClient.cancelQueries({ queryKey });\n const prevValue = queryClient.getQueryData<\n CurrencyConversionOverride[] | null\n >(queryKey);\n\n const newValue = [\n ...(prevValue ?? []),\n value as CurrencyConversionOverride,\n ];\n\n queryClient.setQueryData(\n queryKey,\n newValue\n );\n return { prevValue };\n },\n onError: (err: ErrorTypes, { value }, context) => {\n queryClient.setQueryData(queryKey, context?.prevValue);\n showErrorDialog('client.insertCurrencyConversionOverride', err, {\n trackErrorData: { id, value },\n });\n },\n onSettled: () => {\n queryClient.invalidateQueries({ queryKey });\n },\n });\n\n const createCurrencyConversionOverride = async (\n userGroupInput: CurrencyConversionOverrideRequest\n ) => {\n return await createMutation.mutateAsync({ value: userGroupInput });\n };\n\n const deleteMutation = useMutation({\n mutationFn: async (currencyConversionOverrideId: number) => {\n return await client.deleteCurrencyConversionOverride(\n currencyConversionOverrideId\n );\n },\n // optimistic ui\n // Reference: https://tanstack.com/query/v3/docs/react/guides/optimistic-updates\n\n onMutate: (currencyConversionOverrideId) => {\n queryClient.cancelQueries({ queryKey });\n const prevValue = queryClient.getQueryData<\n CurrencyConversionOverride[] | null\n >(queryKey);\n\n const newValue = prevValue?.filter(\n (r) => r.currencyConversionOverrideId !== currencyConversionOverrideId\n );\n\n queryClient.setQueryData(\n queryKey,\n newValue\n );\n return { prevValue };\n },\n onError: (err: ErrorTypes, currencyConversionOverrideId, context) => {\n queryClient.setQueryData(queryKey, context?.prevValue);\n showErrorDialog('client.deleteCurrencyConversionOverride', err, {\n trackErrorData: { id, currencyConversionOverrideId },\n });\n },\n onSettled: () => {\n queryClient.invalidateQueries({ queryKey });\n },\n });\n\n const deleteCurrencyConversionOverride = (\n currencyConversionOverrideId: number\n ) => {\n return deleteMutation.mutateAsync(currencyConversionOverrideId);\n };\n\n return {\n currencyConversionOverrides: getAllQuery.data,\n isLoading: getAllQuery.isLoading,\n deleteCurrencyConversionOverride,\n createCurrencyConversionOverride,\n updateCurrencyConversionOverride,\n };\n}\n","import {\n ComponentProps,\n ReactElement,\n useCallback,\n useEffect,\n useMemo,\n} from 'react';\nimport { Controller, useForm } from 'react-hook-form';\nimport { CancelButton } from 'src/components/Buttons';\nimport { CurrencyFilterSelector } from 'src/components/Selectors/CurrencyFilterSelector';\nimport { usePurchasePaymentMethodSelector } from 'src/components/Selectors/PurchasePaymentMethodSelector';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { DatePickerInput } from 'src/core/POS/DateSelector';\nimport { WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosSelect } from 'src/core/POS/PosSelect';\nimport { getTextFieldState, PosTextField } from 'src/core/POS/PosTextField';\nimport { Button } from 'src/core/ui';\nimport {\n FieldError,\n FieldLabel,\n FieldWrapper,\n} from 'src/modals/common/Purchase';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { PAYMENT_METHOD_NAME_REGEX_TO_CONTENT_ID } from 'src/utils/constants/contentIdMaps';\nimport { getLocaleFromLanguageOrCurrent } from 'src/utils/localeUtils';\nimport {\n CurrencyConversionOverride,\n CurrencyConversionOverrideRequest,\n PaymentMethodNameKnownRegex,\n} from 'src/WebApiController';\n\nexport type CurrencyConversionOverrideDialogProps = Omit<\n ComponentProps,\n 'header' | 'footer'\n> & {\n onSave?: (data: CurrencyConversionOverrideRequest) => void | Promise;\n onCancel?: () => void;\n currencyConversionOverride: CurrencyConversionOverrideRequest | undefined;\n otherExistingCurrencyConversionOverrides: CurrencyConversionOverride[];\n};\n\nexport function CurrencyConversionOverrideDialog({\n onSave,\n onCancel,\n currencyConversionOverride,\n otherExistingCurrencyConversionOverrides,\n ...genericDialogProps\n}: CurrencyConversionOverrideDialogProps): ReactElement | null {\n const requiredText = useContent(ContentId.Required);\n const duplicateText = useContent(ContentId.SameOverrideExists);\n const sameCurrencyCodeText = useContent(\n ContentId.DifferentCurrencyCodesRequired\n );\n const conversionRateGreaterThanZeroText = useContent(\n ContentId.ConversionRateMustBeGreaterThanZero\n );\n const allText = useContent(ContentId.All);\n\n const additionalOptions = useMemo(() => {\n return Object.values(PAYMENT_METHOD_NAME_REGEX_TO_CONTENT_ID).reduce(\n (options, contentId) => ({ ...options, [contentId]: contentId }),\n {} as Record\n );\n }, []);\n\n const contentIdToPresetRegexIdMap = useMemo(() => {\n return Object.entries(PAYMENT_METHOD_NAME_REGEX_TO_CONTENT_ID).reduce(\n (map, [presetRegexId, contentId]) => ({\n ...map,\n [contentId]: presetRegexId,\n }),\n {} as Record\n );\n }, []);\n\n const { posSelectProps: paymentMethodSelectProps } =\n usePurchasePaymentMethodSelector({\n additionalOptions,\n });\n\n const {\n control,\n register,\n reset,\n handleSubmit,\n watch,\n setError,\n setValue,\n getValues,\n clearErrors,\n formState: { isSubmitting, errors },\n } = useForm({\n defaultValues: currencyConversionOverride,\n });\n\n /**\n * Return true if there are no validation errors\n */\n const validateInput = useCallback(\n (formData: CurrencyConversionOverrideRequest): boolean => {\n clearErrors();\n\n // Double check for required\n if (!formData.fromCurrencyCode) {\n setError('fromCurrencyCode', { message: requiredText });\n return false;\n }\n if (!formData.toCurrencyCode) {\n setError('toCurrencyCode', { message: requiredText });\n return false;\n }\n if (formData.conversionRate == null) {\n setError('conversionRate', { message: requiredText });\n return false;\n }\n if (!formData.conversionRateDate) {\n setError('conversionRateDate', { message: requiredText });\n return false;\n }\n\n // Don't allow conflicting currency conversion overrides\n if (\n otherExistingCurrencyConversionOverrides.some((c) => {\n const dateInput = new Date(formData.conversionRateDate);\n const dateExisting = new Date(c.conversionRateDate);\n\n return (\n c.fromCurrencyCode === formData.fromCurrencyCode &&\n c.toCurrencyCode === formData.toCurrencyCode &&\n c.purchasePaymentMethodId === formData.purchasePaymentMethodId &&\n dateInput.toDateString() === dateExisting.toDateString()\n );\n })\n ) {\n setError('fromCurrencyCode', { message: duplicateText });\n return false;\n }\n\n // Don't allow same currency code\n if (formData.fromCurrencyCode === formData.toCurrencyCode) {\n setError('fromCurrencyCode', { message: sameCurrencyCodeText });\n setError('toCurrencyCode', { message: sameCurrencyCodeText });\n return false;\n }\n\n // Don't allow zero\n if (formData.conversionRate <= 0) {\n setError('conversionRate', {\n message: conversionRateGreaterThanZeroText,\n });\n return false;\n }\n\n return true;\n },\n [\n clearErrors,\n conversionRateGreaterThanZeroText,\n duplicateText,\n otherExistingCurrencyConversionOverrides,\n requiredText,\n sameCurrencyCodeText,\n setError,\n ]\n );\n\n const onSaveHandler = useCallback(() => {\n if (!validateInput(getValues())) {\n return;\n }\n\n if (onSave) {\n handleSubmit(onSave)();\n }\n }, [getValues, handleSubmit, onSave, validateInput]);\n\n const currencyConversionOverrideId = watch('currencyConversionOverrideId');\n const conversionRate = watch('conversionRate');\n const purchasePaymentMethodId = watch('purchasePaymentMethodId');\n const paymentMethodNameKnownRegexId = watch('paymentMethodNameKnownRegexId');\n\n const paymentMethodSelectValue = useMemo(() => {\n if (paymentMethodNameKnownRegexId != null) {\n return PAYMENT_METHOD_NAME_REGEX_TO_CONTENT_ID[\n paymentMethodNameKnownRegexId\n ];\n }\n\n return purchasePaymentMethodId !== undefined\n ? String(purchasePaymentMethodId)\n : undefined;\n }, [paymentMethodNameKnownRegexId, purchasePaymentMethodId]);\n\n const paymentMethodSelectOnChange = useCallback(\n (value: string) => {\n if (\n Object.values(PAYMENT_METHOD_NAME_REGEX_TO_CONTENT_ID).includes(\n value as ContentId\n )\n ) {\n setValue(\n 'paymentMethodNameKnownRegexId',\n contentIdToPresetRegexIdMap[value] as PaymentMethodNameKnownRegex\n );\n setValue('purchasePaymentMethodId', null);\n } else {\n const valueAsNumber = parseInt(value);\n if (value != null && !isNaN(valueAsNumber)) {\n setValue('purchasePaymentMethodId', valueAsNumber);\n } else {\n setValue('purchasePaymentMethodId', null);\n }\n setValue('paymentMethodNameKnownRegexId', null);\n }\n },\n [contentIdToPresetRegexIdMap, setValue]\n );\n\n useEffect(() => {\n reset(currencyConversionOverride);\n }, [currencyConversionOverride, reset]);\n\n return (\n \n }\n footer={\n <>\n \n \n \n \n \n }\n onClosed={() => {\n reset();\n }}\n {...genericDialogProps}\n onCancel={onCancel}\n >\n \n \n \n \n (\n {\n clearErrors('fromCurrencyCode');\n clearErrors('toCurrencyCode');\n field.onChange(e);\n }}\n />\n )}\n />\n {errors.fromCurrencyCode && (\n {errors.fromCurrencyCode?.message}\n )}\n \n \n \n \n \n (\n {\n clearErrors('fromCurrencyCode');\n clearErrors('toCurrencyCode');\n field.onChange(e);\n }}\n />\n )}\n />\n {errors.toCurrencyCode && (\n {errors.toCurrencyCode?.message}\n )}\n \n\n \n }\n >\n {\n clearErrors('conversionRate');\n let value = parseFloat(e.target.value);\n if (isNaN(value) || value < 0) {\n value = 0;\n }\n setValue('conversionRate', value);\n }}\n />\n \n \n\n \n \n \n \n (\n {\n clearErrors(field.name);\n setValue(field.name, d.toDateString());\n }}\n />\n )}\n />\n {errors.conversionRateDate && (\n {errors.conversionRateDate?.message}\n )}\n \n\n \n \n \n \n \n\n {errors.purchasePaymentMethodId && (\n {errors.purchasePaymentMethodId?.message}\n )}\n \n \n }\n />\n \n \n );\n}\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport const VendorTableContainer = styled.div`\n border: 1px solid ${(props) => props.theme.colors.borderPrimary};\n border-radius: ${() => vars.spacing.sm};\n overflow: hidden;\n`;\n","import { ColumnDef } from '@tanstack/react-table';\nimport { IconButton } from 'src/components/Buttons';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { TableHeaderCellDiv } from 'src/core/ui/TableHeaderCellDiv';\nimport { FormatOption } from 'src/modals/EditTableColumns';\nimport { DeleteIcon, EditIcon } from 'src/svgs/Viagogo';\nimport { TableShimmeringDiv } from 'src/tables/Table/Table.styled';\nimport { DateCell } from 'src/tables/Table/TableCells';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { PAYMENT_METHOD_NAME_REGEX_TO_CONTENT_ID } from 'src/utils/constants/contentIdMaps';\nimport { GridActionType } from 'src/utils/tableUtils';\nimport { CurrencyConversionOverride } from 'src/WebApiController';\n\nexport type CurrencyConversionOverrideWithHandlers = {\n currencyConversionOverride: CurrencyConversionOverride;\n onCurrencyConversionOverrideAction?: (\n currencyConversionOverride: CurrencyConversionOverride,\n actionType: GridActionType\n ) => void;\n};\n\nexport const CURRENCY_CONVERSION_OVERRIDE_TABLE_COLUMNS_CONFIG: ColumnDef[] =\n [\n {\n id: 'currencyConversionOverrideFromCurrency',\n header: () => (\n \n \n \n ),\n accessorFn: (data) => data?.currencyConversionOverride?.fromCurrencyCode,\n cell: ({ getValue, row: { original } }) => {\n const value = getValue();\n if (!original) {\n return ;\n }\n return {value};\n },\n },\n {\n id: 'currencyConversionOverrideToCurrency',\n header: () => (\n \n \n \n ),\n accessorFn: (data) => data?.currencyConversionOverride?.toCurrencyCode,\n cell: ({ getValue, row: { original } }) => {\n const value = getValue();\n if (!original) {\n return ;\n }\n return {value};\n },\n },\n {\n id: 'currencyConversionOverrideConversionRate',\n header: () => (\n \n \n \n ),\n accessorFn: (data) => data?.currencyConversionOverride?.conversionRate,\n cell: ({ getValue, row: { original } }) => {\n const value = getValue();\n if (!original) {\n return ;\n }\n return {value};\n },\n },\n {\n id: 'currencyConversionOverrideConversionRateDate',\n header: () => (\n \n \n \n ),\n accessorFn: (data) =>\n data?.currencyConversionOverride?.conversionRateDate,\n cell: ({ getValue, row: { original } }) => {\n const value = getValue();\n if (!original) {\n return ;\n }\n return (\n \n );\n },\n },\n {\n id: 'currencyConversionPaymentMethodName',\n header: () => (\n \n \n \n ),\n accessorFn: (data) =>\n data?.currencyConversionOverride?.purchasePaymentMethodName,\n cell: function Cell({ getValue, row: { original } }) {\n const allText = useContent(ContentId.All);\n if (!original) {\n return ;\n }\n\n const { purchasePaymentMethodName, paymentMethodNameKnownRegexId } =\n original.currencyConversionOverride;\n\n return (\n \n {purchasePaymentMethodName == null &&\n paymentMethodNameKnownRegexId != null ? (\n \n ) : (\n <>{purchasePaymentMethodName ?? allText}\n )}\n \n );\n },\n },\n {\n id: 'actions',\n enableSorting: false,\n header: () => (\n \n \n \n ),\n minSize: 100,\n maxSize: 100,\n cell: ({ row: { original } }) => {\n return !original ? (\n \n ) : (\n \n }\n onClick={() =>\n original.onCurrencyConversionOverrideAction &&\n original.onCurrencyConversionOverrideAction(\n original.currencyConversionOverride,\n GridActionType.Edit\n )\n }\n titleContentId={ContentId.EditPurchaseVendorAccount}\n />\n }\n onClick={() =>\n original.onCurrencyConversionOverrideAction &&\n original.onCurrencyConversionOverrideAction(\n original.currencyConversionOverride,\n GridActionType.Delete\n )\n }\n titleContentId={ContentId.DeletePurchaseVendorAccount}\n />\n \n );\n },\n },\n ];\n","import {\n InitialTableState,\n PaginationState,\n SortingState,\n TableOptions,\n} from '@tanstack/react-table';\nimport { useEffect, useMemo, useState } from 'react';\nimport { FormatContent, useContent } from 'src/contexts/ContentContext';\nimport { NoData, Table } from 'src/tables/Table';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { CurrencyConversionOverride } from 'src/WebApiController';\n\nimport {\n CURRENCY_CONVERSION_OVERRIDE_TABLE_COLUMNS_CONFIG,\n CurrencyConversionOverrideWithHandlers,\n} from './configs/CurrencyConversionOverridesTableColumnsConfig';\n\nexport type CurrencyConversionOverridesTableDataProps = {\n currencyConversionOverrides?: CurrencyConversionOverride[] | null;\n};\n\nexport type CurrencyConversionOverridesTableProps =\n CurrencyConversionOverridesTableDataProps & {\n onMount?: () => void;\n onUnmount?: (state: object) => void;\n initState?: InitialTableState;\n };\n\nconst PAGE_SIZE = 10;\n\nexport function CurrencyConversionOverridesTable({\n currencyConversionOverrides,\n onCurrencyConversionOverrideAction,\n onMount,\n onUnmount,\n initState,\n}: CurrencyConversionOverridesTableProps &\n Pick<\n CurrencyConversionOverrideWithHandlers,\n 'onCurrencyConversionOverrideAction'\n >) {\n const currencyConversionOverridesText = useContent(ContentId.Override);\n\n const [sorting, setSorting] = useState(\n initState?.sorting || [\n { id: 'currencyConversionOverrideConversionRateDate', desc: false },\n ]\n );\n const [{ pageIndex, pageSize }, setPagination] = useState({\n pageIndex: initState?.pagination?.pageIndex || 0,\n pageSize: PAGE_SIZE,\n });\n const pagination = useMemo(\n () => ({\n pageIndex,\n pageSize,\n }),\n [pageIndex, pageSize]\n );\n\n useEffect(() => {\n onMount?.();\n });\n\n useEffect(() => {\n /**\n * Intent for `onMount` is use with 'windowing' in order to maintain user state\n * when the component is scrolled back into view.\n * Anything that needs to be persisted in `react-table` state should be added here.\n * Only update on unmount to ensure we aren't doing too many re-renders.\n */\n return () => onUnmount?.({ pagination, sorting });\n }, [pagination, sorting, onUnmount]);\n\n const data = useMemo(\n () =>\n currencyConversionOverrides?.map(\n (v) =>\n ({\n currencyConversionOverride: v,\n onCurrencyConversionOverrideAction,\n }) as CurrencyConversionOverrideWithHandlers\n ),\n [currencyConversionOverrides, onCurrencyConversionOverrideAction]\n );\n\n const options: Partial<\n TableOptions\n > = useMemo(\n () => ({\n data,\n columns: CURRENCY_CONVERSION_OVERRIDE_TABLE_COLUMNS_CONFIG,\n state: {\n pagination,\n sorting,\n },\n onPaginationChange: setPagination,\n onSortingChange: setSorting,\n }),\n [data, pagination, sorting]\n );\n\n return currencyConversionOverrides?.length ? (\n
    \n ) : (\n \n \n \n );\n}\n","import { useCallback, useMemo, useState } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ConfirmDialog } from 'src/core/interim/dialogs/ConfirmDialog';\nimport { Button, Stack } from 'src/core/ui';\nimport { CurrencyConversionOverrideDialog } from 'src/dialogs/CurrencyConversionOverrideDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useCurrencyConversionOverrides } from 'src/hooks/useCurrencyConversionOverrides';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { GridActionType } from 'src/utils/tableUtils';\nimport {\n CurrencyConversionOverride,\n CurrencyConversionOverrideRequest,\n PaymentMethodNameKnownRegex,\n} from 'src/WebApiController';\n\nimport { VendorTableContainer } from '../VendorsTable/VendorsTableContainer.styled';\nimport { CurrencyConversionOverridesTable } from './CurrencyConversionOverridesTable';\n\nconst EMPTY_CURRENCY_CONVERSION_OVERRIDE_INPUT: CurrencyConversionOverrideRequest =\n {\n currencyConversionOverrideId: null,\n fromCurrencyCode: '',\n toCurrencyCode: '',\n conversionRateDate: '',\n purchasePaymentMethodId: null,\n paymentMethodNameKnownRegexId: PaymentMethodNameKnownRegex.All,\n } as CurrencyConversionOverrideRequest;\n\nexport function CurrencyConversionOverridesTableContainer({\n currencyConversionOverrides,\n}: {\n currencyConversionOverrides?: CurrencyConversionOverride[] | null;\n}) {\n const { closeDialog, launchDialog, dialogProps } = useBasicDialog();\n const deleteDialog = useBasicDialog();\n const [\n currentCurrencyConversionOverride,\n setCurrentCurrencyConversionOverride,\n ] = useState();\n\n const otherExistingCurrencyConversionOverrides = useMemo(() => {\n return currencyConversionOverrides?.filter(\n (c) =>\n c.currencyConversionOverrideId !==\n currentCurrencyConversionOverride?.currencyConversionOverrideId\n );\n }, [\n currencyConversionOverrides,\n currentCurrencyConversionOverride?.currencyConversionOverrideId,\n ]);\n\n const {\n createCurrencyConversionOverride,\n updateCurrencyConversionOverride,\n deleteCurrencyConversionOverride,\n } = useCurrencyConversionOverrides();\n\n const onAddNewCurrencyConversionOverride = useCallback(() => {\n setCurrentCurrencyConversionOverride(\n EMPTY_CURRENCY_CONVERSION_OVERRIDE_INPUT\n );\n launchDialog();\n }, [launchDialog]);\n\n const onSaveCurrencyConversionOverride = useCallback(\n async (currencyConversionOverride: CurrencyConversionOverrideRequest) => {\n if (currencyConversionOverride.currencyConversionOverrideId == null) {\n await createCurrencyConversionOverride(currencyConversionOverride);\n } else {\n await updateCurrencyConversionOverride(currencyConversionOverride);\n }\n closeDialog();\n },\n [\n closeDialog,\n createCurrencyConversionOverride,\n updateCurrencyConversionOverride,\n ]\n );\n\n const onCurrencyConversionOverrideCancel = useCallback(() => {\n setCurrentCurrencyConversionOverride(undefined);\n closeDialog();\n }, [closeDialog]);\n\n const onCurrencyConversionOverrideAction = (\n currencyConversionOverride: CurrencyConversionOverride,\n actionType: GridActionType\n ) => {\n switch (actionType) {\n case GridActionType.Edit:\n setCurrentCurrencyConversionOverride(currencyConversionOverride);\n launchDialog();\n break;\n case GridActionType.Delete:\n setCurrentCurrencyConversionOverride(currencyConversionOverride);\n deleteDialog.launchDialog();\n break;\n default:\n break;\n }\n };\n\n const onCurrencyConversionOverrideDelete = useCallback(async () => {\n if (\n currentCurrencyConversionOverride?.currencyConversionOverrideId != null\n ) {\n await deleteCurrencyConversionOverride(\n currentCurrencyConversionOverride?.currencyConversionOverrideId\n );\n }\n setCurrentCurrencyConversionOverride(undefined);\n deleteDialog.closeDialog();\n }, [\n currentCurrencyConversionOverride?.currencyConversionOverrideId,\n deleteDialog,\n deleteCurrencyConversionOverride,\n ]);\n\n return (\n <>\n \n \n \n \n \n \n \n \n \n }\n bodyText={}\n onOkay={onCurrencyConversionOverrideDelete}\n onCancel={deleteDialog.closeDialog}\n okText={ContentId.Yes}\n cancelText={ContentId.No}\n />\n \n );\n}\n","import { Content } from 'src/contexts/ContentContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { useCurrencyConversionOverrides } from 'src/hooks/useCurrencyConversionOverrides';\nimport { BodySectionTitle } from 'src/modals/common/Purchase';\nimport { CurrencyConversionOverridesTableContainer } from 'src/tables/CurrencyConversionOverridesTable/CurrencyConversionOverridesTableContainer';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nexport const SellerAccountSettingCurrencyConversionOverrides = () => {\n const { currencyConversionOverrides, isLoading } =\n useCurrencyConversionOverrides();\n\n return (\n <>\n \n \n \n {isLoading ? (\n \n ) : (\n \n )}\n \n );\n};\n","import { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { Feature } from 'src/WebApiController';\n\nimport { CurrencySection } from '../MyAccount/CurrencySection';\nimport { SellerAccountSettingCurrencyConversionOverrides } from '../SellerAccountSetting/SellerAccountSettingCurrencyConversionOverrides';\nimport * as styles from './CurrencyConversion.css';\n\nexport const CurrencyConversion = () => {\n const hasDailyFxRateOverrideFeature = useUserHasFeature(\n Feature.OverrideDailyFxRate\n );\n\n return (\n
    \n \n {hasDailyFxRateOverrideFeature && (\n <>\n
    \n \n \n )}\n
    \n );\n};\n","import { useCallback, useMemo } from 'react';\nimport {\n allTimezones,\n ILabelStyle,\n useTimezoneSelect,\n} from 'react-timezone-select';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosSelect } from 'src/core/POS/PosSelect';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { useCustomTimeZoneSettings } from 'src/hooks/api/useCustomTimeZoneSettings';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport * as styles from './MyAccount.css';\n\nexport const TimezoneSection = () => {\n const { customTimeZoneSettings, mergeCustomTimeZoneSettings } =\n useCustomTimeZoneSettings();\n\n const selectOptions = {\n labelStyle: 'original' as ILabelStyle,\n timezones: allTimezones,\n };\n\n const { options, parseTimezone } = useTimezoneSelect(selectOptions);\n\n const onTimezoneChange = useCallback(\n (timezoneValue: string) => {\n if (!timezoneValue) {\n mergeCustomTimeZoneSettings({ input: undefined });\n }\n\n const timezone = parseTimezone(timezoneValue);\n if (\n timezone.offset != null &&\n timezone.value != null &&\n customTimeZoneSettings?.value !== timezone.value\n ) {\n mergeCustomTimeZoneSettings({\n input: {\n timezoneOffsetMins: -timezone.offset * 60,\n value: timezone.value,\n },\n });\n }\n },\n [parseTimezone, mergeCustomTimeZoneSettings, customTimeZoneSettings?.value]\n );\n\n const timezoneOptions = useMemo(\n () =>\n Object.values(options || []).reduce(\n (result, cur) => {\n result[cur.value] = cur.label;\n return result;\n },\n {} as Record\n ),\n [options]\n );\n\n return (\n \n
    \n \n
    \n\n \n

    \n \n

    \n
    \n \n
    \n\n \n
    \n
    \n );\n};\n","import { Label } from '@radix-ui/react-label';\nimport { useQueryClient } from '@tanstack/react-query';\nimport { useCallback } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport {\n SITE_THEME_MODE_STORAGE_KEY,\n SiteThemeOption,\n SiteZoomOption,\n useSiteTheme,\n} from 'src/contexts/SiteTheme/SiteThemeContext';\nimport { PosSelect } from 'src/core/POS/PosSelect';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { Button, Stack, TooltipPopover } from 'src/core/ui';\nimport { clearIDBCache } from 'src/core/utils/createIndexDBPersister';\nimport { useUserHasAnyOfPermissions } from 'src/hooks/useUserHasAnyOfPermissions';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { IconsFill, InfoOutlineIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SITE_THEME_OPTION_TO_CID_MAP } from 'src/utils/constants/contentIdMaps';\nimport { Feature, Permission } from 'src/WebApiController';\n\nimport { CurrencySection } from './CurrencySection';\nimport * as styles from './MyAccount.css';\nimport { TimezoneSection } from './TimezoneSection';\n\n// TODO: Will convert elements to form\nexport const MyAccount = () => {\n const { loginContext } = useAppContext();\n const { isZoomSupported, selectedZoom, setSiteZoom } = useSiteTheme();\n const { selectedMode, setSiteMode } = useSiteTheme();\n const hasPOSTimezoneFeature = useUserHasFeature(Feature.POSTimezone);\n const hasCurrencyConversionSettingsTabFeature = useUserHasFeature(\n Feature.CurrencyConversionSettingsTab\n );\n const userInformation = {\n name: loginContext?.user?.activeAccount?.accountName,\n email: loginContext?.user?.userName,\n };\n\n const hasAdminPermission = useUserHasAnyOfPermissions(\n Permission.SellerAccount_Admin\n );\n\n const queryClient = useQueryClient();\n\n const onZoomChange = useCallback(\n (value: string) => {\n if (value !== selectedZoom) setSiteZoom(value as SiteZoomOption);\n },\n [selectedZoom, setSiteZoom]\n );\n\n const onThemeChange = useCallback(\n (value: string) => {\n if (value !== selectedMode) setSiteMode(value as SiteThemeOption);\n },\n [selectedMode, setSiteMode]\n );\n\n const zoomOptions = Object.values(SiteZoomOption).reduce(\n (options, current) => ({ ...options, [current]: current }),\n {}\n );\n return (\n
    \n
    \n
    \n \n
    \n \n \n
    \n
    \n
    \n
    \n
    \n \n
    \n

    \n \n

    \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n

    \n \n

    \n {isZoomSupported && (\n \n )}\n \n {hasPOSTimezoneFeature && hasAdminPermission && (\n <>\n
    \n \n \n )}\n\n
    \n \n \n
    \n
    \n {!hasCurrencyConversionSettingsTabFeature && (\n <>\n \n
    \n \n )}\n
    \n
    \n \n
    \n

    \n \n

    \n
    \n
    \n );\n};\n","import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport {\n AutoPoClient,\n AutoPoSellerAccountCountryRestriction,\n AutoPoSellerAccountVendorRestriction,\n} from 'src/WebApiController';\n\nexport function useAutoPoRestrictionSettings() {\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n const queryClient = useQueryClient();\n\n const countryQueryKey = [\n 'getSellerAccountCountryRestrictions',\n activeAccountWebClientConfig.activeAccountId,\n ];\n\n const vendorQueryKey = [\n 'getSellerAccountVendorRestrictions',\n activeAccountWebClientConfig.activeAccountId,\n ];\n\n const countryRestrictionQuery = useQuery({\n queryKey: countryQueryKey,\n queryFn: () => {\n if (activeAccountWebClientConfig.activeAccountId == null) {\n return null;\n }\n return new AutoPoClient(\n activeAccountWebClientConfig\n ).getSellerAccountCountryRestrictions();\n },\n\n enabled: activeAccountWebClientConfig.activeAccountId != null,\n refetchOnWindowFocus: false,\n staleTime: Infinity,\n meta: {\n onError: (error: ErrorTypes) => {\n showErrorDialog(\n 'AutoPoClient.getSellerAccountCountryRestrictions',\n error\n );\n },\n },\n });\n\n const countryRestrictionMutation = useMutation({\n mutationFn: async ({\n restrictions,\n }: {\n restrictions: AutoPoSellerAccountCountryRestriction[];\n }) => {\n return await new AutoPoClient(\n activeAccountWebClientConfig\n ).upsertSellerAccountCountryRestrictions(restrictions);\n },\n // optimistic ui\n // Reference: https://tanstack.com/query/v3/docs/react/guides/optimistic-updates\n onMutate: ({ restrictions }) => {\n queryClient.cancelQueries({ queryKey: countryQueryKey });\n const prevValue = queryClient.getQueryData(countryQueryKey);\n queryClient.setQueryData(countryQueryKey, restrictions);\n return { prevValue };\n },\n onError: (err: ErrorTypes, { restrictions }, context) => {\n queryClient.setQueryData(countryQueryKey, context?.prevValue);\n showErrorDialog(\n 'AutoPoClient.upsertSellerAccountCountryRestrictions',\n err,\n {\n trackErrorData: { restrictions },\n }\n );\n },\n onSettled: () => {\n queryClient.invalidateQueries({ queryKey: countryQueryKey });\n },\n });\n\n const vendorRestrictionQuery = useQuery({\n queryKey: vendorQueryKey,\n queryFn: () => {\n if (activeAccountWebClientConfig.activeAccountId == null) {\n return null;\n }\n return new AutoPoClient(\n activeAccountWebClientConfig\n ).getSellerAccountVendorRestrictions();\n },\n\n enabled: activeAccountWebClientConfig.activeAccountId != null,\n refetchOnWindowFocus: false,\n staleTime: Infinity,\n meta: {\n onError: (error: ErrorTypes) => {\n showErrorDialog(\n 'AutoPoClient.getSellerAccountVendorRestrictions',\n error\n );\n },\n },\n });\n\n const vendorRestrictionMutation = useMutation({\n mutationFn: async ({\n restrictions,\n }: {\n restrictions: AutoPoSellerAccountVendorRestriction[];\n }) => {\n return await new AutoPoClient(\n activeAccountWebClientConfig\n ).upsertSellerAccountVendorRestrictions(restrictions);\n },\n // optimistic ui\n // Reference: https://tanstack.com/query/v3/docs/react/guides/optimistic-updates\n onMutate: ({ restrictions }) => {\n queryClient.cancelQueries({ queryKey: vendorQueryKey });\n const prevValue = queryClient.getQueryData(vendorQueryKey);\n queryClient.setQueryData(vendorQueryKey, restrictions);\n return { prevValue };\n },\n onError: (err: ErrorTypes, { restrictions }, context) => {\n queryClient.setQueryData(vendorQueryKey, context?.prevValue);\n showErrorDialog(\n 'AutoPoClient.upsertSellerAccountVendorRestrictions',\n err,\n {\n trackErrorData: { restrictions },\n }\n );\n },\n onSettled: () => {\n queryClient.invalidateQueries({ queryKey: vendorQueryKey });\n },\n });\n\n return {\n countryRestrictionQuery,\n countryRestrictionMutation,\n vendorRestrictionQuery,\n vendorRestrictionMutation,\n };\n}\n","import {\n AutoPoSellerAccountCountryRestriction,\n AutoPoSellerAccountVendorRestriction,\n} from 'src/WebApiController';\n\nexport const sortCountryRestrictions = (\n a: AutoPoSellerAccountCountryRestriction,\n b: AutoPoSellerAccountCountryRestriction\n) => {\n if (a.isEnabled !== b.isEnabled) {\n return a.isEnabled ? -1 : 1;\n }\n return a.country.localeCompare(b.country);\n};\n\nexport const sortVendorRestrictions = (\n a: AutoPoSellerAccountVendorRestriction,\n b: AutoPoSellerAccountVendorRestriction\n) => {\n if (a.isIncluded !== b.isIncluded) {\n return a.isIncluded ? -1 : 1;\n }\n return a.vendorId > b.vendorId ? -1 : 1;\n};\n","import clsx from 'clsx';\nimport { isEqual } from 'lodash-es';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport { useForm } from 'react-hook-form';\nimport { usePurchaseVendorSelector } from 'src/components/Selectors/PurchaseVendorSelector/usePurchaseVendorSelector';\nimport { Content } from 'src/contexts/ContentContext';\nimport { MultiSelectDropBoxWithPills } from 'src/core/POS/MultiSelectDropBoxWithPills';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { shared, vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { ToggleGroup } from 'src/core/ui/ToggleGroup';\nimport { useAutoPoRestrictionSettings } from 'src/hooks/api/useAutoPoRestrictionSettings';\nimport { useKnownCountries } from 'src/hooks/api/useKnownCountries';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n AutoPoSellerAccountCountryRestriction,\n AutoPoSellerAccountVendorRestriction,\n} from 'src/WebApiController';\n\nimport * as styles from './PurchaseOrderSetting.css';\nimport {\n sortCountryRestrictions,\n sortVendorRestrictions,\n} from './PurchaseOrderSetting.utils';\n\ntype RestictionFormFieldValues = {\n countryRestrictions: AutoPoSellerAccountCountryRestriction[];\n vendorRestrictions: AutoPoSellerAccountVendorRestriction[];\n};\n\nconst enum IncludeExcludeOptions {\n Include = 'include',\n Exclude = 'exclude',\n}\n\nconst getIncludeExcludeOptions = () => {\n const includeText = ;\n const excludeText = ;\n return [\n { value: IncludeExcludeOptions.Include, children: includeText },\n { value: IncludeExcludeOptions.Exclude, children: excludeText },\n ];\n};\n\nexport function AutoPoRestictionForm() {\n const {\n countryRestrictionMutation,\n countryRestrictionQuery,\n vendorRestrictionMutation,\n vendorRestrictionQuery,\n } = useAutoPoRestrictionSettings();\n\n const [isLoading, setIsLoading] = useState(false);\n\n const [includeExclude, setIncludeExclude] = useState(\n IncludeExcludeOptions.Include\n );\n\n const { query: vendorQuery, posSelectProps: vendorSelectProps } =\n usePurchaseVendorSelector({});\n\n const knownCountriesQuery = useKnownCountries();\n\n const knownCountriesOption = useMemo(() => {\n if (knownCountriesQuery.data == null) {\n return {};\n }\n\n return Object.entries(knownCountriesQuery.data).reduce(\n (r, [key, value]) => {\n r[key] = value;\n return r;\n },\n {} as Record\n );\n }, [knownCountriesQuery.data]);\n\n const formDefaultValues = useMemo(() => {\n return {\n countryRestrictions: (countryRestrictionQuery.data ?? []).toSorted(\n sortCountryRestrictions\n ),\n vendorRestrictions: (vendorRestrictionQuery.data ?? []).toSorted(\n sortVendorRestrictions\n ),\n };\n }, [countryRestrictionQuery.data, vendorRestrictionQuery.data]);\n\n useEffect(() => {\n if (vendorRestrictionQuery.data) {\n let newIncludeExclude = IncludeExcludeOptions.Include;\n if (\n vendorRestrictionQuery.data.every((r) => !r.isIncluded) &&\n vendorRestrictionQuery.data.length > 0\n ) {\n newIncludeExclude = IncludeExcludeOptions.Exclude;\n }\n\n if (newIncludeExclude !== includeExclude) {\n setIncludeExclude(newIncludeExclude);\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [vendorRestrictionQuery.data]);\n\n const {\n handleSubmit,\n watch,\n setValue,\n reset,\n formState: { defaultValues },\n } = useForm({\n defaultValues: formDefaultValues,\n });\n\n useEffect(() => {\n reset(formDefaultValues);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [formDefaultValues]);\n\n const countryRestrictions = watch('countryRestrictions');\n const vendorRestrictions = watch('vendorRestrictions');\n\n const onSubmitHandler = useCallback(\n async (data: RestictionFormFieldValues) => {\n setIsLoading(true);\n try {\n // if country dirty, then update country\n if (\n !isEqual(data.countryRestrictions, defaultValues?.countryRestrictions)\n ) {\n await countryRestrictionMutation.mutateAsync({\n restrictions: data.countryRestrictions,\n });\n }\n\n // We only trim the data when submitting, so that we keep the data when user is switching between include/exclude\n const vendorRestrictionsForSumbit = data.vendorRestrictions\n .filter((r) => {\n if (includeExclude === IncludeExcludeOptions.Include) {\n return r.isIncluded;\n }\n return !r.isIncluded;\n })\n .toSorted(sortVendorRestrictions);\n\n // if vendor dirty, then update vendor\n if (\n !isEqual(\n vendorRestrictionsForSumbit,\n defaultValues?.vendorRestrictions\n )\n ) {\n await vendorRestrictionMutation.mutateAsync({\n restrictions: vendorRestrictionsForSumbit,\n });\n }\n } finally {\n setIsLoading(false);\n }\n },\n [\n countryRestrictionMutation,\n defaultValues?.countryRestrictions,\n defaultValues?.vendorRestrictions,\n includeExclude,\n vendorRestrictionMutation,\n ]\n );\n\n const includedCountryCodes = useMemo(() => {\n return countryRestrictions.filter((r) => r.isEnabled).map((r) => r.country);\n }, [countryRestrictions]);\n\n const includedVendorIds = useMemo(() => {\n return vendorRestrictions\n .filter((r) => r.isIncluded)\n .map((r) => r.vendorId.toString());\n }, [vendorRestrictions]);\n\n const excludedVendorIds = useMemo(() => {\n return vendorRestrictions\n .filter((r) => !r.isIncluded)\n .map((r) => r.vendorId.toString());\n }, [vendorRestrictions]);\n\n const onIncludedVendorChange = useCallback(\n (values: string[]) => {\n // If select all, then we clear the list\n const isAllSelected =\n values.length >=\n Object.keys(vendorSelectProps.valueOptionsContent).length;\n\n const newVendorRestrictions = [\n ...(isAllSelected\n ? []\n : values.map((id) => ({\n vendorId: parseInt(id),\n isIncluded: true,\n }))),\n // Remove them from excluded list\n ...vendorRestrictions.filter(\n (r) => !r.isIncluded && !values.includes(r.vendorId.toString())\n ),\n ].toSorted(sortVendorRestrictions);\n\n setValue('vendorRestrictions', newVendorRestrictions);\n },\n [setValue, vendorRestrictions, vendorSelectProps.valueOptionsContent]\n );\n\n const onExcludedVendorChange = useCallback(\n (values: string[]) => {\n const newVendorRestrictions = [\n // Remove them from included list\n ...vendorRestrictions.filter(\n (r) => r.isIncluded && !values.includes(r.vendorId.toString())\n ),\n ...values.map((id) => ({\n vendorId: parseInt(id),\n isIncluded: false,\n })),\n ].toSorted(sortVendorRestrictions);\n\n setValue('vendorRestrictions', newVendorRestrictions);\n },\n [setValue, vendorRestrictions]\n );\n\n const onIncludedCountryChange = useCallback(\n (values: string[]) => {\n // If select all, then we clear the list\n const isAllSelected =\n values.length >= Object.keys(knownCountriesOption).length;\n\n const newCountryRestrictions = isAllSelected\n ? []\n : values\n .map((countryCode) => ({\n country: countryCode,\n isEnabled: true,\n }))\n .toSorted(sortCountryRestrictions);\n\n setValue('countryRestrictions', newCountryRestrictions);\n },\n [knownCountriesOption, setValue]\n );\n\n const onIncludeExcludeChange = useCallback((value: string) => {\n if (!value) {\n return;\n }\n\n setIncludeExclude(value as IncludeExcludeOptions);\n }, []);\n\n if (\n countryRestrictionQuery.isLoading ||\n vendorQuery.isLoading ||\n knownCountriesQuery.isLoading\n ) {\n return ;\n }\n\n return (\n
    \n
    \n \n
    \n
    \n

    \n \n

    \n

    \n \n

    \n

    \n \n

    \n \n\n {includeExclude === IncludeExcludeOptions.Include ? (\n \n \n \n ) : (\n \n \n \n )}\n\n

    \n \n

    \n\n

    \n \n

    \n \n \n \n\n
    \n \n
    \n
    \n
    \n );\n}\n","import { useMutation } from '@tanstack/react-query';\nimport { cloneDeep } from 'lodash-es';\nimport { useEffect, useMemo } from 'react';\nimport { Controller, useForm } from 'react-hook-form';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { Button } from 'src/core/ui';\nimport { useSyncCenterSettings } from 'src/hooks/api/useSyncCenterSetting';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SellerAccountClient, SyncCenterSettings } from 'src/WebApiController';\n\nimport { SyncCenterFieldValues } from '../SyncCenter/SyncCenter.types';\nimport {\n setValueAsNumber,\n toSyncCenterFieldValues,\n toSyncCenterSettings,\n} from '../SyncCenter/SyncCenter.utils';\nimport * as styles from './PurchaseOrderSetting.css';\n\nexport function PurchaseOrderGeneralSettingForm() {\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const query = useSyncCenterSettings();\n\n const formDefaultValues = useMemo(() => {\n if (query.data) {\n return toSyncCenterFieldValues(cloneDeep(query.data));\n }\n return undefined;\n }, [query.data]);\n\n const mutation = useMutation({\n mutationFn: async (data: SyncCenterSettings) => {\n return new SellerAccountClient(activeAccountWebClientConfig)\n .mergeSyncCenterSettings(data)\n .then(() => query.refetch());\n },\n onError: (err: ErrorTypes, data) => {\n showErrorDialog('SellerAccountClient.mergeSyncCenterSettings', err, {\n trackErrorData: { data },\n });\n },\n });\n\n const { control, register, handleSubmit, reset } =\n useForm({\n defaultValues: formDefaultValues,\n });\n\n useEffect(() => {\n reset(formDefaultValues);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [formDefaultValues]);\n\n if (query.isLoading) {\n return ;\n }\n\n return (\n
    \n
    \n \n
    \n
    \n }\n className={styles.textField}\n >\n \n \n\n (\n }\n checked={Boolean(value)}\n onChange={(e) => {\n onChange(e.currentTarget.checked);\n }}\n {...field}\n />\n )}\n />\n\n
    \n {\n mutation.mutate(toSyncCenterSettings(data));\n })}\n >\n \n \n
    \n
    \n
    \n );\n}\n","import { Content } from 'src/contexts/ContentContext';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { AutoPoRestictionForm } from './AutoPoRestictionForm';\nimport { PurchaseOrderGeneralSettingForm } from './PurchaseOrderGeneralSettingForm';\nimport * as styles from './PurchaseOrderSetting.css';\n\nexport function PurchaseOrderSettingsContent() {\n return (\n
    \n
    \n

    \n \n

    \n \n \n
    \n
    \n );\n}\n","import {useAppContext} from \"src/contexts/AppContext\";\nimport {ErrorTypes, useErrorBoundaryContext} from \"src/contexts/ErrorBoundaryContext\";\nimport {useSyncCenterSettings} from \"src/hooks/api/useSyncCenterSetting\";\nimport {useMutation} from \"@tanstack/react-query\";\nimport {SellerAccountClient} from \"src/WebApiController\";\nimport {PosSpinner} from \"src/core/POS/PosSpinner\";\nimport * as styles from \"./AccountSetting.css\";\nimport {Content} from \"src/contexts/ContentContext\";\nimport {ContentId} from \"src/utils/constants/contentId\";\nimport {Button, Stack} from \"src/core/ui\";\nimport {Switch} from \"src/core/interim/Switch\";\nimport {vars} from \"src/core/themes\";\n\n\n\nexport function AccountingSetting() {\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const query = useSyncCenterSettings();\n\n const mutation = useMutation({\n mutationFn: async (isAutoAddCancelledProceed: boolean) => {\n if (query.data == undefined) {\n showErrorDialog('SellerAccountClient.mergeSyncCenterSettings', null, {\n trackErrorData: query,\n });\n return;\n }\n return new SellerAccountClient(activeAccountWebClientConfig)\n .mergeSyncCenterSettings({\n ...query.data,\n isAutoAddCancelledProceedsEnabled: isAutoAddCancelledProceed\n })\n .then(() => query.refetch());\n },\n onError: (err: ErrorTypes, data) => {\n showErrorDialog('SellerAccountClient.mergeSyncCenterSettings', err, {\n trackErrorData: { data },\n });\n },\n });\n\n if (query.isLoading) {\n return ;\n }\n\n return (\n \n
    \n \n
    \n \n
    \n \n
    \n

    \n \n

    \n \n {\n mutation.mutate(e.currentTarget.checked);\n }}\n />\n
    \n \n
    \n
    \n
    \n
    \n );\n}\n","import { useQuery } from '@tanstack/react-query';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { PurchaseClient } from 'src/WebApiController';\n\nexport function useGetAccessiblePurchasePaymentMethodsQuery() {\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n return useQuery({\n queryKey: [\n 'getAccessiblePurchasePaymentMethods',\n activeAccountWebClientConfig.activeAccountId,\n ],\n queryFn: () => {\n if (activeAccountWebClientConfig.activeAccountId == null) {\n return null;\n }\n return new PurchaseClient(\n activeAccountWebClientConfig\n ).getAccessiblePurchasePaymentMethods();\n },\n\n enabled: activeAccountWebClientConfig.activeAccountId != null,\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError('PurchaseClient.getAccessiblePurchasePaymentMethods', error);\n },\n },\n });\n}\n","import { ComponentProps, ReactElement, useEffect } from 'react';\nimport { Controller, useForm } from 'react-hook-form';\nimport { CancelButton } from 'src/components/Buttons';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { GenericDialog } from 'src/core/interim/dialogs/GenericDialog';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosSelect } from 'src/core/POS/PosSelect';\nimport { getTextFieldState, PosTextField } from 'src/core/POS/PosTextField';\nimport { Button } from 'src/core/ui';\nimport {\n FieldError,\n FieldLabel,\n FieldWrapper,\n} from 'src/modals/common/Purchase';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { PAYMENT_METHOD_TYPE_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { PurchasePaymentMethod } from 'src/WebApiController';\n\nexport type PurchasePaymentMethodDialogProps = Omit<\n ComponentProps,\n 'header' | 'footer'\n> & {\n onSave?: (data: PurchasePaymentMethod) => void | Promise;\n onCancel?: () => void;\n paymentMethod: PurchasePaymentMethod | undefined;\n};\n\nexport function PurchasePaymentMethodDialog({\n onSave,\n onCancel,\n paymentMethod,\n ...genericDialogProps\n}: PurchasePaymentMethodDialogProps): ReactElement | null {\n const requiredText = useContent(ContentId.Required);\n\n const {\n control,\n register,\n reset,\n handleSubmit,\n getValues,\n formState: { isSubmitting, errors },\n } = useForm({\n defaultValues: paymentMethod,\n });\n\n const { id } = getValues();\n\n useEffect(() => {\n reset(paymentMethod);\n }, [paymentMethod, reset]);\n\n return (\n \n }\n footer={\n <>\n \n \n \n \n \n }\n onClosed={() => {\n reset();\n }}\n {...genericDialogProps}\n onCancel={onCancel}\n >\n \n \n \n \n (\n \n )}\n />\n {errors.type && {errors.type?.message}}\n \n \n }\n >\n \n \n \n \n }\n >\n \n \n \n \n );\n}\n","import { ColumnDef } from '@tanstack/react-table';\nimport { IconButton } from 'src/components/Buttons';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Stack } from 'src/core/ui';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { TableHeaderCellDiv } from 'src/core/ui/TableHeaderCellDiv';\nimport { DeleteIcon, EditIcon, PlusIcon } from 'src/svgs/Viagogo';\nimport { TableShimmeringDiv } from 'src/tables/Table/Table.styled';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n PurchasePaymentMethod,\n PurchasePaymentMethodType,\n} from 'src/WebApiController';\n\nexport type PurchasePaymentActions = {\n editPurchasePayment?: (purchasePayment: PurchasePaymentMethod) => void;\n deletePurchasePayment: (purchasePaymentMethodId: number) => void;\n};\n\nexport type PurchasePaymentMethodWithHandlers = {\n purchasePaymentMethod: PurchasePaymentMethod;\n purchasePaymentActions: PurchasePaymentActions;\n};\n\nexport const PAYMENT_METHOD_TABLE_COLUMNS_CONFIG: ColumnDef[] =\n [\n {\n id: 'paymentMethodDisplay',\n header: () => (\n \n \n \n ),\n accessorFn: (data) => data?.purchasePaymentMethod?.display,\n cell: ({ getValue, row: { original } }) => {\n const value = getValue() as string;\n if (!original) {\n return ;\n }\n return {value};\n },\n },\n {\n id: 'paymentMethodName',\n header: () => (\n \n \n \n ),\n accessorFn: (data) => data?.purchasePaymentMethod?.name,\n cell: ({ getValue, row: { original } }) => {\n const value = getValue() as string;\n if (!original) {\n return ;\n }\n return {value};\n },\n },\n {\n id: 'paymentMethodType',\n header: () => (\n \n \n \n ),\n accessorFn: (data) => data?.purchasePaymentMethod?.type,\n cell: ({ getValue, row: { original } }) => {\n const value = getValue() as PurchasePaymentMethodType;\n if (!original) {\n return ;\n }\n return {value};\n },\n },\n {\n id: 'paymentMethodActions',\n header: () => (\n \n \n \n ),\n cell: ({ row: { original } }) => {\n return (\n \n \n }\n onClick={() =>\n original?.purchasePaymentActions.editPurchasePayment?.(\n original.purchasePaymentMethod\n )\n }\n titleContentId={ContentId.Edit}\n />\n }\n onClick={() =>\n original?.purchasePaymentActions.deletePurchasePayment(\n original.purchasePaymentMethod.id\n )\n }\n titleContentId={ContentId.Edit}\n />\n \n \n );\n },\n },\n ];\n","import {\n InitialTableState,\n PaginationState,\n SortingState,\n TableOptions,\n} from '@tanstack/react-table';\nimport { useEffect, useMemo, useState } from 'react';\nimport {\n Content,\n FormatContent,\n useContent,\n} from 'src/contexts/ContentContext';\nimport { useConfirmDialog } from 'src/core/interim/dialogs/ConfirmDialog/useConfirmDialog';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { NoData, Table } from 'src/tables/Table';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { Feature, PurchasePaymentMethod } from 'src/WebApiController';\n\nimport {\n PAYMENT_METHOD_TABLE_COLUMNS_CONFIG,\n PurchasePaymentMethodWithHandlers,\n} from './configs/PurchasePaymentMethodsTableColumnsConfig';\n\nexport type PurchasePaymentMethodsTableDataProps = {\n purchasePaymentMethods?: PurchasePaymentMethod[];\n onEditPaymentMethod?: (purchasePayment: PurchasePaymentMethod) => void;\n onDeletePaymentMethod?: (\n purchasePaymentMethodId: number,\n closeConfirmDeleteDialog: () => void\n ) => Promise;\n};\n\nexport type PurchasePaymentMethodsTableProps =\n PurchasePaymentMethodsTableDataProps & {\n onMount?: () => void;\n onUnmount?: (state: object) => void;\n initState?: InitialTableState;\n withOuterPadding?: boolean;\n };\n\nconst PAGE_SIZE = 10;\n\nexport function PurchasePaymentMethodsTable({\n purchasePaymentMethods,\n onEditPaymentMethod,\n onDeletePaymentMethod,\n onMount,\n onUnmount,\n initState,\n withOuterPadding,\n}: PurchasePaymentMethodsTableProps) {\n const hasPurchasePaymentEditFeature = useUserHasFeature(\n Feature.PurchasePaymentMethodEdit\n );\n const purchasePaymentMethodsText = useContent(ContentId.PaymentMethods);\n // Enable passing in table state as parameters -- we can remount with the last state the user was on\n const [sorting, setSorting] = useState(\n initState?.sorting || []\n );\n const [{ pageIndex, pageSize }, setPagination] = useState({\n pageIndex: initState?.pagination?.pageIndex || 0,\n pageSize: PAGE_SIZE,\n });\n\n const pagination = useMemo(\n () => ({\n pageIndex,\n pageSize,\n }),\n [pageIndex, pageSize]\n );\n\n useEffect(() => {\n onMount?.();\n });\n\n useEffect(() => {\n /**\n * Intent for `onMount` is use with 'windowing' in order to maintain user state\n * when the component is scrolled back into view.\n * Anything that needs to be persisted in `react-table` state should be added here.\n * Only update on unmount to ensure we aren't doing too many re-renders.\n */\n return () => onUnmount?.({ pagination, sorting });\n }, [pagination, sorting, onUnmount]);\n\n const {\n openConfirmDialog: openConfirmDeleteDialog,\n closeConfirmDialog: closeConfirmDeleteDialog,\n } = useConfirmDialog();\n\n const data = useMemo(() => {\n const purchasePaymentActions = {\n editPurchasePayment: onEditPaymentMethod,\n deletePurchasePayment: (purchasePaymentMethodId: number) => {\n openConfirmDeleteDialog({\n size: 's',\n headerText: ,\n bodyText: ,\n onOkay: () => {\n onDeletePaymentMethod?.(\n purchasePaymentMethodId,\n closeConfirmDeleteDialog\n );\n },\n onCancel: closeConfirmDeleteDialog,\n okText: ContentId.Yes,\n cancelText: ContentId.No,\n });\n },\n };\n return purchasePaymentMethods?.map((v) => ({\n purchasePaymentMethod: v,\n purchasePaymentActions,\n }));\n }, [\n closeConfirmDeleteDialog,\n onDeletePaymentMethod,\n onEditPaymentMethod,\n openConfirmDeleteDialog,\n purchasePaymentMethods,\n ]);\n\n const options: Partial<\n TableOptions\n > = useMemo(\n () => ({\n data,\n columns: hasPurchasePaymentEditFeature\n ? PAYMENT_METHOD_TABLE_COLUMNS_CONFIG\n : PAYMENT_METHOD_TABLE_COLUMNS_CONFIG.filter(\n (column) => column.id !== 'paymentMethodActions'\n ),\n state: {\n pagination,\n sorting,\n },\n onPaginationChange: setPagination,\n onSortingChange: setSorting,\n }),\n [data, hasPurchasePaymentEditFeature, pagination, sorting]\n );\n\n return purchasePaymentMethods?.length ? (\n
    \n ) : (\n \n \n \n );\n}\n","import { UseQueryResult } from '@tanstack/react-query';\nimport {\n MutableRefObject,\n useCallback,\n useImperativeHandle,\n useState,\n} from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { Button, Card, Stack } from 'src/core/ui';\nimport { PurchasePaymentMethodDialog } from 'src/dialogs/PurchasePaymentMethodDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ApiException,\n PurchaseClient,\n PurchasePaymentMethod,\n PurchasePaymentMethodType,\n} from 'src/WebApiController';\n\nimport { VendorTableContainer } from '../VendorsTable/VendorsTableContainer.styled';\nimport { PurchasePaymentMethodsTable } from './PurchasePaymentMethodsTable';\n\nexport interface PurchasePaymentMethodsImperativeRef {\n onAddNewPaymentMethod: () => void;\n}\n\nexport function PurchasePaymentMethodsTableContainer({\n purchasePaymentMethods,\n paymentMethodsQuery,\n purchasePaymentMethodsImperativeRef,\n useNewStyles = false,\n}: {\n purchasePaymentMethods?: PurchasePaymentMethod[];\n paymentMethodsQuery: UseQueryResult;\n purchasePaymentMethodsImperativeRef?: MutableRefObject;\n useNewStyles?: boolean;\n}) {\n const { activeAccountWebClientConfig } = useAppContext();\n const { closeDialog, launchDialog, dialogProps } = useBasicDialog();\n const [currentPaymentMethod, setCurrentPaymentMethod] =\n useState();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const onAddNewPaymentMethod = useCallback(() => {\n setCurrentPaymentMethod({\n display: '',\n id: -1,\n name: '',\n type: PurchasePaymentMethodType.Other,\n });\n launchDialog();\n }, [launchDialog]);\n\n const onEditPaymentMethod = useCallback(\n (paymentMethod: PurchasePaymentMethod) => {\n setCurrentPaymentMethod({ ...paymentMethod });\n launchDialog();\n },\n [launchDialog]\n );\n\n const onDeletePaymentMethod = useCallback(\n async (\n purchasePaymentMethodId: number,\n closeConfirmDeleteDialog: () => void\n ) => {\n await tryInvokeApi(\n async () => {\n const isDeleted = await new PurchaseClient(\n activeAccountWebClientConfig\n ).deletePurchasePaymentMethod(purchasePaymentMethodId);\n\n if (isDeleted) {\n paymentMethodsQuery.refetch();\n closeConfirmDeleteDialog();\n }\n },\n (error) => {\n showErrorDialog('PurchaseClient.deletePurchasePaymentMethod', error, {\n trackErrorData: { purchasePaymentMethodId },\n });\n }\n );\n },\n [activeAccountWebClientConfig, paymentMethodsQuery, showErrorDialog]\n );\n\n const onSavePaymentMethod = useCallback(\n async (paymentMethod: PurchasePaymentMethod) => {\n await tryInvokeApi(\n async () => {\n if (paymentMethod.id > 0) {\n const updatedPaymentMethod = await new PurchaseClient(\n activeAccountWebClientConfig\n ).updatePurchasePaymentMethod(paymentMethod);\n\n if (updatedPaymentMethod) {\n paymentMethodsQuery.refetch();\n closeDialog();\n }\n } else {\n const newId = await new PurchaseClient(\n activeAccountWebClientConfig\n ).insertPurchasePaymentMethod(paymentMethod);\n\n if (newId) {\n paymentMethodsQuery.refetch();\n closeDialog();\n } else {\n // This should never happen\n // Normal errors would have fallen to the error catch\n showErrorDialog(\n 'PurchaseClient.insertPurchasePaymentMethod',\n {\n message:\n 'Unable to create payment method ' + paymentMethod.id,\n status: 500,\n } as ApiException,\n {\n trackErrorData: paymentMethod,\n }\n );\n }\n }\n },\n (error) => {\n showErrorDialog('PurchaseClient.insertPurchasePaymentMethod', error, {\n trackErrorData: paymentMethod,\n });\n }\n );\n },\n [\n activeAccountWebClientConfig,\n closeDialog,\n paymentMethodsQuery,\n showErrorDialog,\n ]\n );\n\n const onPaymentMethodCancel = useCallback(() => {\n setCurrentPaymentMethod(undefined);\n closeDialog();\n }, [closeDialog]);\n\n useImperativeHandle(\n purchasePaymentMethodsImperativeRef,\n () => {\n return {\n onAddNewPaymentMethod,\n };\n },\n [onAddNewPaymentMethod]\n );\n\n const table = (\n \n );\n return (\n <>\n \n \n {!useNewStyles && (\n \n )}\n {useNewStyles ? {table} : <>{table}}\n \n \n \n \n );\n}\n","import { Content } from 'src/contexts/ContentContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { useGetAccessiblePurchasePaymentMethodsQuery } from 'src/hooks/api/useGetAccessiblePurchasePaymentMethodsQuery';\nimport { BodySectionTitle } from 'src/modals/common/Purchase';\nimport { PurchasePaymentMethodsTableContainer } from 'src/tables/PurchasePaymentMethodsTable/PurchasePaymentMethodsTableContainer';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nexport const SellerAccountSettingPaymentMethods = () => {\n const purchasePaymentMethodsQuery =\n useGetAccessiblePurchasePaymentMethodsQuery();\n\n const purchasePaymentMethods = purchasePaymentMethodsQuery.data;\n\n return (\n <>\n \n \n \n {purchasePaymentMethodsQuery.isLoading ? (\n \n ) : (\n \n )}\n \n );\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { PurchaseClient } from 'src/WebApiController';\n\nexport const GET_ACCESSIBLE_VENDOR_ACCOUNTS_KEY = 'getAccessibleVendorAccounts';\n\nexport function useGetAccessibleVendorAccountsQuery(\n purchaseOrderVendorIds: number[] | null | undefined\n) {\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n return useQuery({\n queryKey: [\n GET_ACCESSIBLE_VENDOR_ACCOUNTS_KEY,\n activeAccountWebClientConfig.activeAccountId,\n purchaseOrderVendorIds,\n ],\n queryFn: () => {\n if (!purchaseOrderVendorIds?.length) {\n // If all of these are nulls, return nothing\n return null;\n }\n\n return new PurchaseClient(\n activeAccountWebClientConfig\n ).getAccessibleVendorAccounts(\n { item1: purchaseOrderVendorIds, item2: [] },\n null,\n null,\n null\n );\n },\n\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError('PurchaseClient.getAccessibleVendorAccounts', error, {\n vendorIdSelected: purchaseOrderVendorIds,\n });\n },\n },\n });\n}\n","import { useQuery } from '@tanstack/react-query';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { PurchaseClient } from 'src/WebApiController';\n\nexport const GET_ACCESSIBLE_VENDORS_QUERY_KEY = 'getAccessibleVendors';\n\ninterface UseGetAccessibleVendorsQueryProps {\n getOverride: boolean;\n getVendorAccountsCount: boolean;\n}\n\nexport function useGetAccessibleVendorsQuery({\n getOverride,\n getVendorAccountsCount,\n}: UseGetAccessibleVendorsQueryProps) {\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n return useQuery({\n queryKey: [\n GET_ACCESSIBLE_VENDORS_QUERY_KEY,\n activeAccountWebClientConfig.activeAccountId,\n getOverride,\n ],\n queryFn: () => {\n if (activeAccountWebClientConfig.activeAccountId == null) {\n return null;\n }\n return tryInvokeApi(\n () => {\n return new PurchaseClient(\n activeAccountWebClientConfig\n ).getAccessibleVendors(getOverride, getVendorAccountsCount);\n },\n (error) => {\n trackError('PurchaseClient.getAccessibleVendors', error);\n }\n );\n },\n\n enabled: activeAccountWebClientConfig.activeAccountId != null,\n refetchOnWindowFocus: false,\n });\n}\n","import clsx from 'clsx';\nimport { ReactNode, useCallback, useState } from 'react';\nimport { Virtuoso } from 'react-virtuoso';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { ConfirmDialog } from 'src/core/interim/dialogs/ConfirmDialog';\nimport { PosDropdown, PosDropdownItem } from 'src/core/POS/PosDropdown';\nimport { shared, vars } from 'src/core/themes';\nimport { Button, Card } from 'src/core/ui';\nimport { PurchaseVendorAccountDialog } from 'src/dialogs/PurchaseVendorAccountDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { EditIcon, IconsFill, MoreIcon, PlusIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ApiException,\n PurchaseClient,\n PurchaseVendorAccount,\n PurchaseVendorAccountDetails,\n} from 'src/WebApiController';\n\nimport { VendorAccountEditInfo } from '../../VendorManagement/Vendors/hooks/useAddVendorAccount';\nimport * as styles from './SellerAccountSettingVendorAccounts.css';\n\nconst EMPTY_INFO_PLACEHOLDER = '-';\n\nexport type SellerAccountSettingVendorAccountsProps = {\n vendorId: number;\n vendorAccounts: PurchaseVendorAccount[] | undefined;\n refetchVendorAccounts: () => Promise;\n};\n\nexport function SellerAccountSettingVendorAccounts({\n vendorId,\n vendorAccounts,\n refetchVendorAccounts,\n}: SellerAccountSettingVendorAccountsProps) {\n const { activeAccountWebClientConfig } = useAppContext();\n const venderAccountDialog = useBasicDialog();\n const deleteDialog = useBasicDialog();\n const [currentVendorAccount, setCurrentVendorAccount] =\n useState();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const onAddNewVendorAccount = useCallback(() => {\n setCurrentVendorAccount({\n vendorId: vendorId,\n id: '',\n });\n venderAccountDialog.launchDialog();\n }, [venderAccountDialog, vendorId]);\n\n const onSaveVendorAccount = useCallback(\n async (vendorAccount: PurchaseVendorAccountDetails) => {\n await tryInvokeApi(\n async () => {\n const newId = await new PurchaseClient(\n activeAccountWebClientConfig\n ).mergeVendorAccount(vendorAccount);\n\n if (newId) {\n refetchVendorAccounts();\n venderAccountDialog.closeDialog();\n } else {\n // This should never happen\n // Normal errors would have fallen to the error catch\n showErrorDialog(\n 'PurchaseClient.mergeVendorAccount',\n {\n message:\n 'Unable to create or save vendorAccount ' + vendorAccount.id,\n status: 500,\n } as ApiException,\n {\n trackErrorData: vendorAccount,\n }\n );\n }\n },\n (error) => {\n showErrorDialog('PurchaseClient.mergeVendorAccount', error, {\n trackErrorData: vendorAccount,\n });\n }\n );\n },\n [\n activeAccountWebClientConfig,\n refetchVendorAccounts,\n venderAccountDialog,\n showErrorDialog,\n ]\n );\n\n const onVendorAccountCancel = useCallback(() => {\n setCurrentVendorAccount(undefined);\n venderAccountDialog.closeDialog();\n }, [venderAccountDialog]);\n\n const onVendorAccountDelete = useCallback(async () => {\n await tryInvokeApi(\n async () => {\n const newId = await new PurchaseClient(\n activeAccountWebClientConfig\n ).deleteVendorAccount(currentVendorAccount?.id);\n\n if (newId) {\n refetchVendorAccounts();\n deleteDialog.closeDialog();\n } else {\n // This should never happen\n // Normal errors would have fallen to the error catch\n showErrorDialog(\n 'PurchaseClient.deleteVendorAccount',\n {\n message:\n 'Unable to delete vendor account ' + currentVendorAccount?.id,\n status: 500,\n } as ApiException,\n {\n trackErrorData: currentVendorAccount,\n }\n );\n }\n },\n (error) => {\n showErrorDialog('PurchaseClient.deleteVendorAccount', error, {\n trackErrorData: currentVendorAccount,\n });\n }\n );\n }, [\n activeAccountWebClientConfig,\n currentVendorAccount,\n refetchVendorAccounts,\n deleteDialog,\n showErrorDialog,\n ]);\n\n return (\n <>\n
    \n
    \n \n
    \n {\n const { id, name, email } = vendorAccount;\n return (\n \n }>\n {name || EMPTY_INFO_PLACEHOLDER}\n \n }>\n {email || EMPTY_INFO_PLACEHOLDER}\n \n
    \n \n }\n align=\"end\"\n >\n {\n setCurrentVendorAccount(vendorAccount);\n venderAccountDialog.launchDialog();\n }}\n >\n \n \n \n
    \n \n {/*\n Endpoints are not available (DeleteVendorAccount) - TODO on POS-518\n {\n setCurrentVendorAccount(vendorAccount);\n deleteDialog.launchDialog();\n }}\n >\n \n \n \n
    \n */}\n \n \n \n );\n }}\n />\n \n \n \n \n \n {currentVendorAccount && (\n \n )}\n }\n bodyText={}\n onOkay={onVendorAccountDelete}\n onCancel={deleteDialog.closeDialog}\n okText={ContentId.Yes}\n cancelText={ContentId.No}\n />\n \n );\n}\n\nfunction InfoEntry({\n label,\n children,\n}: {\n label: ReactNode;\n children: ReactNode;\n}) {\n return (\n
    \n
    \n {label}\n
    \n
    {children}
    \n
    \n );\n}\n","import { debounce } from 'lodash-es';\nimport { useCallback, useMemo, useState } from 'react';\nimport { Virtuoso } from 'react-virtuoso';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n Content,\n useContent,\n useFormattedContent,\n} from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { ConfirmDialog } from 'src/core/interim/dialogs/ConfirmDialog';\nimport { PosSearchBox } from 'src/core/POS/PosSearchBox';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { shared, vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { PurchaseVendorDialog } from 'src/dialogs/PurchaseVendorDialog';\nimport { useGetAccessibleVendorAccountsQuery } from 'src/hooks/api/useGetAccessibleVendorAccountsQuery';\nimport { useGetAccessibleVendorsQuery } from 'src/hooks/api/useGetAccessibleVendorsQuery';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useFlexSearchIndex } from 'src/hooks/useFlexSearchIndex';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { EditIcon, IconsFill, PlusIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { SomethingWentWrong } from 'src/views/SomethingWentWrong';\nimport {\n ApiException,\n Feature,\n PurchaseClient,\n PurchaseVendor,\n PurchaseVendorAccount,\n} from 'src/WebApiController';\n\nimport { SellerAccountSettingVendorAccounts } from '../SellerAccountSettingVendorAccounts';\nimport * as styles from './SellerAccountSettingVendors.css';\n\nexport function SellerAccountSettingVendors() {\n const vendorsText = useContent(ContentId.Vendors);\n\n const hasSellerAccountPurchaseVendorOverrideFeature = useUserHasFeature(\n Feature.SellerAccountPurchaseVendorOverride\n );\n\n const searchPlaceholderText = useFormattedContent(\n FormatContentId.SearchItem,\n vendorsText\n ) as string;\n\n const vendorsQuery = useGetAccessibleVendorsQuery({\n getOverride: true,\n getVendorAccountsCount: true,\n });\n\n const vendorAccountsQuery = useGetAccessibleVendorAccountsQuery(\n vendorsQuery.data?.map((v) => v.id)\n );\n\n const vendorDialog = useBasicDialog();\n const deleteDialog = useBasicDialog();\n const [currentVendor, setCurrentVendor] = useState();\n const [searchText, setSearchText] = useState('');\n\n const vendorVenueOptionsContent = useMemo(() => {\n return (\n vendorsQuery.data?.reduce(\n (r, cur) => {\n r[cur.id.toString()] = cur.name;\n return r;\n },\n {} as Record\n ) ?? {}\n );\n }, [vendorsQuery.data]);\n\n const { flexSearchIndex } = useFlexSearchIndex(\n vendorVenueOptionsContent,\n Object.keys(vendorVenueOptionsContent).length > 0,\n true\n );\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const debouncedOnSearchChange = useCallback(\n debounce((text: string) => {\n const newText = text.trim();\n if (newText !== searchText) {\n setSearchText(newText);\n }\n }, 200),\n [searchText]\n );\n\n const vendorData = useMemo(() => {\n const vendorsData = vendorsQuery.data ?? undefined;\n if (!searchText || !flexSearchIndex) {\n return vendorsData;\n }\n\n const keysToRender = new Set(\n (flexSearchIndex.search(searchText) as string[]).map(Number)\n );\n\n return vendorsData?.filter((v) => keysToRender.has(v.id));\n }, [flexSearchIndex, searchText, vendorsQuery.data]);\n\n const onAddNewVendor = useCallback(() => {\n setCurrentVendor({\n id: -1,\n name: '',\n isGlobal: false,\n delivType: null,\n isNoFulfill: null,\n tktTypeRules: null,\n vendAccCounts: 0,\n });\n vendorDialog.launchDialog();\n }, [vendorDialog]);\n\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n const onSaveVendor = useCallback(\n async (vendor: PurchaseVendor) => {\n await tryInvokeApi(\n async () => {\n const newId = await new PurchaseClient(\n activeAccountWebClientConfig\n ).mergeVendor(vendor);\n\n if (newId) {\n vendorsQuery.refetch();\n vendorDialog.closeDialog();\n } else {\n // This should never happen\n // Normal errors would have fallen to the error catch\n showErrorDialog(\n 'PurchaseClient.mergeVendor',\n {\n message: 'Unable to create or save vendor ' + vendor.id,\n status: 500,\n } as ApiException,\n {\n trackErrorData: vendor,\n }\n );\n }\n },\n (error) => {\n showErrorDialog('PurchaseClient.mergeVendor', error, {\n trackErrorData: vendor,\n });\n }\n );\n },\n [activeAccountWebClientConfig, vendorDialog, vendorsQuery, showErrorDialog]\n );\n\n const onVendorCancel = useCallback(() => {\n setCurrentVendor(undefined);\n vendorDialog.closeDialog();\n }, [vendorDialog]);\n\n const onVendorDelete = useCallback(async () => {\n await tryInvokeApi(\n async () => {\n const newId = await new PurchaseClient(\n activeAccountWebClientConfig\n ).deleteVendor(currentVendor?.id);\n\n if (newId) {\n vendorsQuery.refetch();\n deleteDialog.closeDialog();\n } else {\n // This should never happen\n // Normal errors would have fallen to the error catch\n showErrorDialog(\n 'PurchaseClient.deleteVendor',\n {\n message: 'Unable to delete vendor ' + currentVendor?.id,\n status: 500,\n } as ApiException,\n {\n trackErrorData: currentVendor,\n }\n );\n }\n },\n (error) => {\n showErrorDialog('PurchaseClient.deleteVendor', error, {\n trackErrorData: currentVendor,\n });\n }\n );\n }, [\n activeAccountWebClientConfig,\n deleteDialog,\n vendorsQuery,\n showErrorDialog,\n currentVendor,\n ]);\n\n const vendorAccountsByVendorId = useMemo(() => {\n return vendorAccountsQuery.data?.reduce(\n (r, cur) => {\n if (!r[cur.vendorId]) {\n r[cur.vendorId] = [];\n }\n r[cur.vendorId].push(cur);\n return r;\n },\n {} as Record\n );\n }, [vendorAccountsQuery.data]);\n\n return (\n <>\n \n \n
    \n \n
    \n \n \n \n \n \n {vendorsQuery.isLoading || vendorAccountsQuery.isLoading ? (\n \n ) : vendorsQuery.isError || vendorAccountsQuery.isError ? (\n }\n />\n ) : (\n {\n const { id, name } = vendor;\n return (\n \n
    \n
    {name}
    \n {\n setCurrentVendor(vendor);\n vendorDialog.launchDialog();\n }}\n />\n {/* {\n setCurrentVendor(vendor);\n deleteDialog.launchDialog();\n }}\n /> */}\n
    \n \n \n );\n }}\n />\n )}\n \n {currentVendor && (\n \n )}\n }\n bodyText={}\n onOkay={onVendorDelete}\n onCancel={deleteDialog.closeDialog}\n okText={ContentId.Yes}\n cancelText={ContentId.No}\n />\n \n );\n}\n","import { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport * as styles from 'src/modals/common/Purchase/PurchaseModal.css';\nimport { Feature } from 'src/WebApiController';\n\nimport { SellerAccountSettingCurrencyConversionOverrides } from '../SellerAccountSettingCurrencyConversionOverrides';\nimport { SellerAccountSettingPaymentMethods } from '../SellerAccountSettingPaymentMethods';\nimport { SellerAccountSettingVendors } from '../SellerAccountSettingVendors';\n\nexport const SellerAccountSettingBody = () => {\n const hasDailyFxRateOverrideFeature = useUserHasFeature(\n Feature.OverrideDailyFxRate\n );\n const hasCurrencyConversionSettingsTabFeature = useUserHasFeature(\n Feature.CurrencyConversionSettingsTab\n );\n\n return (\n <>\n
    \n \n
    \n\n {hasDailyFxRateOverrideFeature &&\n !hasCurrencyConversionSettingsTabFeature && (\n
    \n \n
    \n )}\n\n
    \n \n
    \n \n );\n};\n","import { vars } from 'src/core/themes';\nimport styled from 'styled-components/macro';\n\nexport const HeaderSection = styled.header<{ muted?: boolean }>`\n background-color: ${(props) =>\n props.muted\n ? props.theme.colors.backgroundSecondary\n : props.theme.colors.backgroundInfo};\n color: ${(props) => props.theme.colors.textPrimary};\n padding: ${() =>\n `${vars.spacing.xl} ${vars.spacing.lg} ${vars.spacing.sm} ${vars.spacing.lg}`};\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n\n ${({ theme: { media } }) =>\n `${media.makeMediaQuery(\n media.breakpoints.md,\n `\n padding: ${vars.spacing.xl} ${vars.spacing.xl} ${vars.spacing.lg} ${vars.spacing.xl};\n `\n )}`}\n`;\n\nexport const HeaderRightGroup = styled.div`\n display: flex;\n flex-direction: column;\n width: 100%;\n\n ${({ theme: { media } }) =>\n `${media.makeMediaQuery(\n media.breakpoints.md,\n `\n text-align: right;\n max-width: 300px;\n align-items: flex-end;\n `\n )}`}\n`;\n\nexport const HeaderLeftGroup = styled.div`\n display: flex;\n flex-direction: column;\n width: 100%;\n\n ${({ theme: { media } }) =>\n `${media.makeMediaQuery(\n media.breakpoints.md,\n `\n max-width: 300px;\n `\n )}`}\n`;\n\nexport const VendorContainer = styled.div`\n ${({\n theme: {\n typography: { getStyles },\n },\n }) => getStyles('title4')};\n padding-block-end: ${() => vars.spacing.lg};\n\n white-space: nowrap;\n text-overflow: ellipsis;\n`;\n\nexport const PurchaseOrderStateContainer = styled.div`\n ${({\n theme: {\n typography: { getStyles },\n },\n }) => getStyles('title4')};\n\n color: ${(props) => props.theme.colors.textNegative};\n padding-block-end: ${() => vars.spacing.lg};\n width: min-content;\n border: 1px solid ${(props) => props.theme.colors.textNegative};\n border-radius: ${() => vars.spacing.sm};\n display: flex;\n align-items: center;\n justify-content: center;\n padding: ${() => vars.spacing.sm};\n`;\n","import { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { FieldLabel, FieldWrapper } from 'src/modals/common/Purchase';\nimport { fieldText } from 'src/modals/common/Purchase/Purchase.css';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport * as styles from './SellerAccountSettingHeader.css';\nimport {\n HeaderLeftGroup,\n HeaderRightGroup,\n HeaderSection,\n VendorContainer,\n} from './SellerAccountSettingHeader.styled';\n\nexport const SellerAccountSettingHeader = () => {\n const { loginContext } = useAppContext();\n const sellerAccountName = loginContext?.user?.displayName;\n const userInformation = {\n name: loginContext?.user?.activeAccount?.accountName,\n email: loginContext?.user?.userName,\n };\n\n return (\n \n
    \n \n \n
    {sellerAccountName}
    \n
    \n \n \n \n \n
    {userInformation.name}
    \n
    \n \n \n \n \n
    {userInformation.email}
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n );\n};\n","import { Stack } from 'src/core/ui';\n\nimport { SellerAccountSettingBody } from './SellerAccountSettingBody';\nimport { SellerAccountSettingHeader } from './SellerAccountSettingHeader';\n\nexport const SellerAccountSetting = () => {\n return (\n \n \n\n \n \n );\n};\n","import { moveElements } from 'src/utils/arrayUtils';\nimport { BLOCKED_PRIORITY } from 'src/utils/ticketTypeUtils';\nimport { DeliveryType, TicketType } from 'src/WebApiController';\n\nimport { SyncCenterTicketTypeRules } from '../SyncCenter.types';\nimport { TicketTypeWithPriority } from './ticketTypeOverrideInputForm.types';\n\nexport const sortTicketTypePriority = (a: number, b: number) => {\n if (a === BLOCKED_PRIORITY) {\n return 1;\n }\n if (b === BLOCKED_PRIORITY) {\n return -1;\n }\n return a - b;\n};\n\nconst sortTicketTypeWithPriority = (\n a: TicketTypeWithPriority,\n b: TicketTypeWithPriority\n) => {\n if (a.priority == BLOCKED_PRIORITY) {\n return 1;\n }\n if (b.priority == BLOCKED_PRIORITY) {\n return -1;\n }\n return a.priority - b.priority;\n};\n\nexport const mapTicketTypeWithPriorityList = (\n ticketTypes: TicketType[],\n deliveryType: DeliveryType,\n ticketTypeRules: SyncCenterTicketTypeRules | undefined\n): TicketTypeWithPriority[] => {\n return ticketTypes.map((tt, i) => {\n if (ticketTypeRules?.[deliveryType]?.[tt] != null) {\n return {\n ticketType: tt,\n priority: ticketTypeRules[deliveryType]![tt]!,\n };\n } else {\n return {\n ticketType: tt,\n // For those missing value we put to the end\n priority: i + ticketTypes.length,\n };\n }\n });\n};\n\nexport const shiftTicketTypePriority = (\n priorityOrderBefore: TicketTypeWithPriority[],\n ticketType: TicketType,\n priority: number // starting from one\n): TicketTypeWithPriority[] => {\n priorityOrderBefore = priorityOrderBefore.toSorted(\n sortTicketTypeWithPriority\n );\n\n const isBlocked = priority === BLOCKED_PRIORITY;\n const fromIndex = priorityOrderBefore.findIndex(\n (p) => p.ticketType === ticketType\n );\n\n const toIndex = isBlocked ? priorityOrderBefore.length - 1 : priority - 1;\n\n priorityOrderBefore[fromIndex].priority = priority;\n\n const priorityOrderAfter = moveElements(\n priorityOrderBefore,\n fromIndex,\n toIndex\n ).map((to, i) => {\n if (to.priority == BLOCKED_PRIORITY) {\n return to;\n }\n return {\n ...to,\n priority: i + 1,\n };\n });\n\n return priorityOrderAfter;\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { cloneDeep } from 'lodash-es';\nimport { Fragment, useCallback } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content, FormatContent } from 'src/contexts/ContentContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { PosSelect } from 'src/core/POS/PosSelect';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { DELIVERY_OPTIONS_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport {\n DeliveryType,\n Feature,\n TicketClient,\n TicketType,\n} from 'src/WebApiController';\n\nimport * as styles from '../SyncCenter.css';\nimport {\n SyncCenterFieldValues,\n SyncCenterTicketTypeRules,\n} from '../SyncCenter.types';\nimport { getTicketTypePriorityOptions } from '../SyncCenter.utils';\nimport {\n mapTicketTypeWithPriorityList,\n shiftTicketTypePriority,\n sortTicketTypePriority,\n} from './ticketTypeOverrideInputForm.utils';\n\nexport function TicketTypeOverrideInputForm({\n disabled,\n}: {\n disabled?: boolean;\n}) {\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n const hasDisplayTicketOrderedByPriorityFeature = useUserHasFeature(\n Feature.DisplayTicketOrderedByPriority\n );\n const mappingsQuery = useQuery({\n queryKey: [\n 'getAllDeliveryTypeTicketTypeMappings',\n activeAccountWebClientConfig.activeAccountId,\n ],\n queryFn: () => {\n if (activeAccountWebClientConfig.activeAccountId == null) {\n return null;\n }\n return new TicketClient(\n activeAccountWebClientConfig\n ).getAllDeliveryTypeTicketTypeMappings();\n },\n\n enabled: activeAccountWebClientConfig.activeAccountId != null,\n refetchOnWindowFocus: false,\n meta: {\n onError: (error: ErrorTypes) => {\n showErrorDialog(\n 'TicketClient.getAllDeliveryTypeTicketTypeMappings',\n error\n );\n },\n },\n });\n\n const { watch, setValue, getValues } =\n useFormContext();\n\n const ticketTypeRules = watch('ticketTypeRules');\n\n const onOnlyThisChange = useCallback(\n (\n deliveryType: DeliveryType,\n ticketTypes: TicketType[],\n selectedTicketType: TicketType\n ) => {\n const values = getValues();\n const ticketTypeRules = cloneDeep(values.ticketTypeRules);\n const priorities = ticketTypeRules?.[deliveryType] ?? {};\n ticketTypes.forEach((ticketType) => {\n priorities[ticketType] = ticketType === selectedTicketType ? 1 : -1;\n });\n\n ticketTypeRules![deliveryType] = priorities;\n setValue('ticketTypeRules', ticketTypeRules);\n },\n [getValues, setValue]\n );\n\n if (mappingsQuery.isLoading) {\n return ;\n }\n\n return (\n <>\n {mappingsQuery.data &&\n mappingsQuery.data\n // only allow ordering delivery types with more than 1 ticket type since it's\n // pointless if there's only 1 or less since the order is obvious in that case\n .filter(({ ticketTypes }) => Object.keys(ticketTypes).length > 1)\n .map(({ deliveryType, ticketTypes: tts }) => {\n if (deliveryType === DeliveryType.Wallet) {\n return null;\n }\n\n const deliveryTypeContentId = DELIVERY_OPTIONS_TO_CID[deliveryType];\n\n const ticketTypes = Object.keys(tts).map((k) => k as TicketType);\n\n const numBlockedTicketTypes =\n Object.values(ticketTypeRules?.[deliveryType] ?? {}).filter(\n (to) => to == -1\n ).length ?? 0;\n\n const allTicketTypesHavePriority = ticketTypes.every(\n (tt) => ticketTypeRules?.[deliveryType]?.[tt] != null\n );\n\n // This is used for display only - the ticketTypes variable is ordered by default priority\n // so we don't want to alter that\n const ticketTypesOrdered =\n allTicketTypesHavePriority &&\n hasDisplayTicketOrderedByPriorityFeature\n ? ticketTypes.toSorted((a, b) => {\n const aPriority = ticketTypeRules?.[deliveryType]?.[a] ?? 0;\n const bPriority = ticketTypeRules?.[deliveryType]?.[b] ?? 0;\n return sortTicketTypePriority(aPriority, bPriority);\n })\n : ticketTypes;\n\n return (\n
    \n
    \n ,\n ]}\n />\n
    \n
    \n {ticketTypesOrdered.map((ticketType) => (\n \n setValue('ticketTypeRules', rules)\n }\n onOnlyThisChange={onOnlyThisChange}\n />\n ))}\n
    \n
    \n );\n })}\n \n );\n}\n\nfunction TicketTypeOverrideInputFormSingleTicketType({\n disabled,\n ticketType,\n ticketTypes,\n deliveryType,\n ticketTypeRules,\n numBlockedTicketTypes,\n setTicketTypeRules,\n onOnlyThisChange,\n}: {\n disabled?: boolean;\n ticketType: TicketType;\n ticketTypes: TicketType[];\n deliveryType: DeliveryType;\n ticketTypeRules?: SyncCenterTicketTypeRules;\n numBlockedTicketTypes: number;\n setTicketTypeRules: (rules?: SyncCenterTicketTypeRules) => void;\n onOnlyThisChange: (\n deliveryType: DeliveryType,\n ticketTypes: TicketType[],\n selectedTicketType: TicketType\n ) => void;\n}) {\n const onResetAll = useCallback(() => {\n if (ticketTypeRules == null) {\n return;\n }\n\n const ticketTypeRulesNew = cloneDeep(ticketTypeRules ?? {});\n ticketTypeRulesNew[deliveryType] = undefined;\n\n setTicketTypeRules(ticketTypeRulesNew);\n }, [deliveryType, ticketTypeRules, setTicketTypeRules]);\n\n const getDraftTicketTypeRules = useCallback(() => {\n const ticketTypeRulesNew = cloneDeep(ticketTypeRules ?? {});\n ticketTypeRulesNew[deliveryType] = ticketTypeRulesNew[deliveryType] ?? {};\n return ticketTypeRulesNew;\n }, [deliveryType, ticketTypeRules]);\n\n return (\n \n
    {ticketType}
    \n
    \n {\n if (val === ContentId.OnlyThis) {\n onOnlyThisChange(deliveryType, ticketTypes, ticketType);\n return;\n }\n if (val === ContentId.ResetAll) {\n onResetAll();\n return;\n }\n\n const priorityOrderBefore = mapTicketTypeWithPriorityList(\n ticketTypes,\n deliveryType,\n ticketTypeRules\n );\n\n const priorityOrderAfter = shiftTicketTypePriority(\n priorityOrderBefore,\n ticketType,\n Number(val)\n );\n\n const ticketTypeRulesNew = getDraftTicketTypeRules();\n\n priorityOrderAfter.forEach((to) => {\n ticketTypeRulesNew[deliveryType]![to.ticketType] = to.priority;\n });\n\n // This should never happen, but just in case\n ticketTypes.forEach((tt, i) => {\n if (ticketTypeRulesNew[deliveryType]![tt] == null) {\n ticketTypeRulesNew[deliveryType]![tt] = i + ticketTypes.length;\n }\n });\n\n setTicketTypeRules(ticketTypeRulesNew);\n }}\n />\n
    \n
    \n );\n}\n","import { ReactNode } from 'react';\n\nimport * as styles from './InstructionsList.css';\n\nexport function InstructionsList({ children }: { children?: ReactNode }) {\n return
      {children}
    ;\n}\n\nexport function InstructionsListItem({\n containerClassName,\n children,\n}: {\n containerClassName?: string;\n children?: ReactNode;\n}) {\n return (\n
  • \n
    {children}
    \n
  • \n );\n}\n","import { useMutation } from '@tanstack/react-query';\nimport genPassword from 'browser-generate-password';\nimport {Marketplace, PosUiActionResult, SellerAccountClient} from 'src/WebApiController';\nimport {isSuccess} from \"src/utils/errorUtils\";\n\nasync function handleResponse(response: PosUiActionResult) {\n return isSuccess(response) ? response : Promise.reject(new Error(`Response failure ${response.status} ${response.message}`));\n}\n\n/**\n * https://app.ticketmaster.com/tradedeskapi/user/docs/index.html\n * @returns Mutation\n */\nexport function useTradeDeskSendResetPasswordCodeMutation(activeAccountId?: string) {\n return useMutation({\n async mutationFn({ username }: { username: string }) {\n if (!activeAccountId) {\n throw new Error('activeAccountId is undefined');\n }\n\n return new SellerAccountClient({activeAccountId}).initiateTradeDeskReset(username).then(handleResponse);\n },\n });\n}\n\n/**\n * https://app.ticketmaster.com/tradedeskapi/user/docs/index.html\n * @returns Mutation\n */\nexport function useTradeDeskResetPasswordMutation(activeAccountId?: string) {\n return useMutation({\n async mutationFn({\n username,\n oldPassword,\n newPassword = genPassword(10, true),\n code,\n }: {\n username: string;\n oldPassword?: string;\n /**\n * New password is automatically generated if not passed in.\n */\n newPassword?: string;\n code?: string;\n }) {\n if (!activeAccountId) {\n throw new Error('activeAccountId is undefined');\n }\n\n if (!code)\n {\n throw new Error('Code is required');\n }\n\n var sellerAccountClient: SellerAccountClient = new SellerAccountClient({activeAccountId});\n\n const resp = await sellerAccountClient.resetTradeDeskPassword({\n username: username,\n oldPassword: oldPassword ?? null,\n newPassword: newPassword,\n code: code\n }).then(handleResponse);\n\n await sellerAccountClient.updateMarketplaceSellerAccountPassword(\n Marketplace.Ticketmaster,\n newPassword\n );\n return resp;\n },\n });\n}\n","import { UseMutationResult } from '@tanstack/react-query';\nimport { useState } from 'react';\nimport {\n InstructionsList,\n InstructionsListItem,\n} from 'src/components/InstructionsList';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { shared, vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui/Button';\nimport {\n useTradeDeskResetPasswordMutation,\n useTradeDeskSendResetPasswordCodeMutation,\n} from 'src/hooks/api/useTradeDeskResetPasswordMutation';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport * as syncCenterStyles from './SyncCenter.css';\nimport * as styles from './TradeDeskApiResetInstructions.css';\nimport {useAppContext} from \"src/contexts/AppContext\";\n\nexport function TradeDeskApiResetInstructions({\n marketplaceUserName,\n}: {\n marketplaceUserName: string;\n}) {\n const { activeAccountWebClientConfig } = useAppContext();\n\n const enterResetCodeFromEmailText = useContent(\n ContentId.EnterResetCodeFromEmail\n );\n\n const sendResetPasswordCodeMutation =\n useTradeDeskSendResetPasswordCodeMutation(activeAccountWebClientConfig.activeAccountId);\n const resetPasswordMutation = useTradeDeskResetPasswordMutation(activeAccountWebClientConfig.activeAccountId);\n const [resetCode, setResetCode] = useState('');\n return (\n
    \n
    \n \n \n \n
    \n \n
    \n \n \n
    \n {' '}\n {marketplaceUserName}\n
    \n
    \n {\n sendResetPasswordCodeMutation.mutate({\n username: marketplaceUserName,\n });\n }}\n >\n \n \n \n
    \n \n \n
    \n \n
    \n
    \n {\n const value = e.currentTarget.value;\n setResetCode(value);\n }}\n />\n
    \n \n \n
    \n \n
    \n
    \n {\n resetPasswordMutation.mutate({\n username: marketplaceUserName,\n code: resetCode,\n });\n }}\n >\n \n \n \n
    \n \n \n \n \n
    \n
    \n );\n}\n\nfunction MutationStatus({\n mutation,\n}: {\n mutation: Pick<\n UseMutationResult,\n 'isPending' | 'isSuccess' | 'isError' | 'error'\n >;\n}) {\n return mutation.isPending ? (\n \n ) : mutation.isError && mutation.error instanceof Error ? (\n
    {mutation.error.message}
    \n ) : mutation.isSuccess ? (\n
    \n \n
    \n ) : null;\n}\n","import { useMutation } from '@tanstack/react-query';\nimport { cloneDeep, isEqual } from 'lodash-es';\nimport { useCallback, useEffect } from 'react';\nimport { Controller, FormProvider, useForm } from 'react-hook-form';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n Content,\n useContent,\n useContentContext,\n} from 'src/contexts/ContentContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { ConfirmDialog } from 'src/core/interim/dialogs/ConfirmDialog';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosEnumSelect } from 'src/core/POS/PosSelect';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { Button, Stack } from 'src/core/ui';\nimport { useSyncCenterSettings } from 'src/hooks/api/useSyncCenterSetting';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useUserHasAutopricingFeature } from 'src/hooks/useUserHasAutopricingFeature';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { LayoutContent } from 'src/navigations/LayoutContent';\nimport { CheckIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n MARKETPLACE_PAYMENT_TERM_TO_CID,\n SPLIT_TYPE_TO_CID,\n YES_NO_ENUM_FILTER_TO_CID,\n} from 'src/utils/constants/contentIdMaps';\nimport { FromYesNoEnum, ToYesNoEnum } from 'src/utils/eventQueryUtils';\nimport {\n Feature,\n Marketplace,\n MarketplacePaymentTerm,\n SellerAccountClient,\n SplitType,\n SyncCenterSettings,\n} from 'src/WebApiController';\n\nimport { MainRoute } from '../../../MainRoute';\nimport { TicketTypeOverrideInputForm } from './Components/TicketTypeOverrideInputForm';\nimport * as styles from './SyncCenter.css';\nimport { SyncCenterFieldValues } from './SyncCenter.types';\nimport {\n setValueAsNumber,\n toSyncCenterFieldValues,\n toSyncCenterSettings,\n} from './SyncCenter.utils';\nimport { TradeDeskApiResetInstructions } from './TradeDeskApiResetInstructions';\n\nexport function SyncCenterContent() {\n const query = useSyncCenterSettings();\n return (\n
    \n
    \n

    \n \n

    \n {query.isLoading ? (\n \n ) : (\n query.refetch()}\n />\n )}\n
    \n
    \n );\n}\n\nexport function SyncCenter() {\n const syncCenterTitle = useContent(ContentId.SyncCenter);\n return (\n \n \n \n );\n}\n\nfunction SyncCenterForm({\n disabled,\n defaultValues,\n onSaved,\n}: {\n disabled?: boolean;\n defaultValues?: SyncCenterSettings | null;\n onSaved?: () => void;\n}) {\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n const contentContext = useContentContext();\n const hasPurchaseSettingsTabFeature = useUserHasFeature(\n Feature.PurchaseSettingsTab\n );\n const hasMarketplaceTermFeature = useUserHasFeature(\n Feature.MarketplacePaymentTerms\n );\n const hasMarketplaceEnableDisableFeature = useUserHasFeature(\n Feature.EnableDisableMarketplaces\n );\n const hasSeatSaverFeature = useUserHasFeature(Feature.SeatSaver);\n\n const hasMarketplacePreventInitialBroadcastFeature = useUserHasFeature(\n Feature.PreventInitialBroadcastForXDays\n );\n\n const hasAutoPricingTabFeature = useUserHasAutopricingFeature(\n Feature.AutoPricingTabInAccountSettings\n );\n\n const mutation = useMutation({\n mutationFn: async (data: SyncCenterSettings) => {\n return new SellerAccountClient(activeAccountWebClientConfig)\n .mergeSyncCenterSettings(data)\n .then(() => onSaved?.());\n },\n onError: (err: ErrorTypes, data) => {\n showErrorDialog('SellerAccountClient.mergeSyncCenterSettings', err, {\n trackErrorData: { data },\n });\n },\n });\n\n const marketplaceEnableDisableConfirmDlg = useBasicDialog();\n\n const methods = useForm({\n defaultValues: defaultValues\n ? toSyncCenterFieldValues(cloneDeep(defaultValues))\n : undefined,\n });\n\n const {\n control,\n register,\n handleSubmit,\n watch,\n setValue,\n getValues,\n formState,\n reset,\n } = methods;\n\n // If the defaultValues changed - we need to ensure the form is reset - otherwise it will keep the old values\n // and it will re-submit with the old values\n useEffect(() => {\n const newDefaultValues =\n defaultValues && toSyncCenterFieldValues(cloneDeep(defaultValues));\n if (\n newDefaultValues &&\n !isEqual(newDefaultValues, formState.defaultValues)\n ) {\n reset(newDefaultValues);\n }\n }, [defaultValues, formState.defaultValues, reset]);\n\n const marketplaceSettings = watch('marketplaceSettings');\n\n const noneTxt = useContent(ContentId.None);\n const getMarketplaceEnableDisable = useCallback(\n (enable: boolean) => {\n const data = getValues('marketplaceSettings');\n const mkps = data?.filter((m) => m.isEnabled === enable);\n\n return mkps?.length\n ? mkps\n .map((m) => m.marketplace)\n .toSorted()\n .join(', ')\n : noneTxt;\n },\n [getValues, noneTxt]\n );\n\n return (\n \n <>\n
    \n
    \n {marketplaceSettings?.map((settings, i) => {\n return settings.marketplace === Marketplace.StubHub ||\n settings.marketplace === Marketplace.Offline ? null : (\n \n
    \n {settings.marketplace}\n
    \n
    \n }\n className={styles.textField}\n >\n \n \n }\n className={styles.textField}\n >\n \n \n }\n className={styles.textField}\n >\n \n }\n {...register(\n `marketplaceSettings.${i}.maxHoldDurationInHours`,\n {\n setValueAs: setValueAsNumber,\n }\n )}\n />\n \n\n {hasMarketplaceTermFeature && (\n (\n \n }\n className={styles.enumSelect}\n >\n \n disabled={disabled || mutation.isPending}\n valueOptionsContent={\n MARKETPLACE_PAYMENT_TERM_TO_CID\n }\n {...field}\n />\n \n )}\n />\n )}\n\n {hasMarketplacePreventInitialBroadcastFeature && (\n \n }\n className={styles.textField}\n >\n \n \n )}\n\n {hasMarketplaceEnableDisableFeature ? (\n (\n \n }\n checked={!value}\n onChange={(e) => {\n onChange(!e.currentTarget.checked);\n }}\n {...field}\n />\n )}\n />\n ) : settings.isEnabled ? (\n \n \n \n \n ) : (\n \n \n \n \n )}\n
    \n
    \n );\n })}\n
    \n
    \n
    \n \n
    \n
    \n (\n }\n >\n \n disabled={disabled || mutation.isPending}\n placeholderText={ContentId.SelectSplitType}\n valueOptionsContent={SPLIT_TYPE_TO_CID}\n {...field}\n />\n \n )}\n />\n {hasSeatSaverFeature && (\n (\n \n }\n >\n \n disabled={disabled || mutation.isPending}\n placeholderText={ContentId.SelectSplitType}\n valueOptionsContent={SPLIT_TYPE_TO_CID}\n {...field}\n />\n \n )}\n />\n )}\n (\n }\n >\n {\n onChange(FromYesNoEnum(yesNoEnumValue));\n }}\n />\n \n )}\n />\n }\n className={styles.textField}\n >\n }\n {...register('inHandDatePaddingInDays', {\n setValueAs: setValueAsNumber,\n })}\n />\n \n {!hasAutoPricingTabFeature && (\n }\n className={styles.textField}\n >\n \n \n )}\n }\n className={styles.textField}\n >\n \n \n \n
    \n
    \n {!hasPurchaseSettingsTabFeature && (\n
    \n
    \n \n
    \n
    \n }\n className={styles.textField}\n >\n \n \n (\n \n }\n checked={Boolean(value)}\n onChange={(e) => {\n onChange(e.currentTarget.checked);\n }}\n {...field}\n />\n )}\n />\n
    \n
    \n )}\n {marketplaceSettings?.map((settings) => {\n // Only show instructions for ticketmaster accounts where the token version is 1\n // and username exists\n if (\n settings.marketplace !== Marketplace.Ticketmaster ||\n settings.tokenVersion !== 1 ||\n !settings.userName\n ) {\n return null;\n }\n return (\n \n
    \n \n
    \n \n \n );\n })}\n \n
    \n {\n if (\n !isEqual(\n data.marketplaceSettings?.map((m) => m.isEnabled),\n formState.defaultValues?.marketplaceSettings?.map(\n (m) => m?.isEnabled\n )\n )\n ) {\n marketplaceEnableDisableConfirmDlg.launchDialog();\n } else {\n mutation.mutate(toSyncCenterSettings(data));\n }\n })}\n >\n \n \n
    \n \n }\n bodyText={\n \n \n \n \n \n \n {getMarketplaceEnableDisable(true)}\n \n \n \n \n \n \n \n {getMarketplaceEnableDisable(false)}\n \n \n \n \n \n \n }\n onOkay={handleSubmit((data) => {\n mutation.mutate(toSyncCenterSettings(data));\n marketplaceEnableDisableConfirmDlg.closeDialog();\n })}\n onCancel={marketplaceEnableDisableConfirmDlg.closeDialog}\n okText={ContentId.Yes}\n />\n \n
    \n );\n}\n","import { SellerRoleInfo, SellerRoleInput } from 'src/WebApiController';\n\nexport const mapToSellerRoleInput = (\n role?: SellerRoleInfo | null,\n userIds?: string[] | null\n) => {\n return {\n id: role?.id ?? -1,\n details: role?.details,\n name: role?.name,\n permissions: [...(role?.permissions ?? [])],\n userIds: userIds,\n } as SellerRoleInput;\n};\n","import { ModalProps } from 'src/modals/Modal';\nimport { SellerRoleInfo } from 'src/WebApiController';\n\nexport const MAX_ROLE_DETAILS_LENGTH = 200;\n\nexport type SellerRoleModalProps = {\n cancelTo?: ModalProps;\n roleInfo?: SellerRoleInfo | null;\n};\n","import { useContent } from 'src/contexts/ContentContext';\nimport { Checkbox } from 'src/core/interim/Checkbox';\nimport { vars } from 'src/core/themes';\nimport { Stack, TooltipPopover } from 'src/core/ui';\nimport { InfoOutlineIcon } from 'src/svgs/Viagogo';\nimport { PERMISSION_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { SellerPermissionInfo } from 'src/WebApiController';\n\nexport const SellerPermissionDisplay = ({\n disabled,\n isSelected,\n toggleSelect,\n permissionInfo,\n part,\n}: {\n disabled?: boolean;\n isSelected?: boolean;\n toggleSelect: () => void;\n permissionInfo: SellerPermissionInfo;\n part: 'view' | 'action';\n}) => {\n const permissionContent = PERMISSION_TO_CID[permissionInfo.permission];\n const title = useContent(permissionContent[0]);\n const details = useContent(permissionContent[1]);\n const permPart = permissionContent[2];\n\n if (permPart !== part) {\n return null;\n }\n\n return (\n \n toggleSelect()}\n label={title}\n labelPosition=\"right\"\n />\n\n \n }\n title={details}\n contentVariant=\"dark\"\n >\n {details}\n \n \n );\n};\n","import { useCallback } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport {\n Content,\n getContent,\n useContentContext,\n} from 'src/contexts/ContentContext';\nimport { useSellerRoleContext } from 'src/contexts/SellerRoleContext';\nimport { Switch } from 'src/core/interim/Switch';\nimport { DividerLine, Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n PERMISSION_ACCESS_AREA_TO_CID,\n PERMISSION_TO_CID,\n} from 'src/utils/constants/contentIdMaps';\nimport {\n Permission,\n PermissionAccessArea,\n SellerRoleInput,\n} from 'src/WebApiController';\n\nimport * as styles from '../SellerRoleModal.css';\nimport { SellerPermissionDisplay } from './SellerPermissionDisplay';\n\nexport const SellerPermissionSelectionSection = ({\n area,\n disabled,\n}: {\n area: PermissionAccessArea;\n disabled?: boolean;\n}) => {\n const { watch, setValue, clearErrors } = useFormContext();\n const permissions = watch('permissions');\n const contentContext = useContentContext();\n\n const { allPermissions } = useSellerRoleContext();\n const permissionInfosOfArea = Object.values(allPermissions ?? {})\n .filter((p) => p.area === area)\n .toSorted((a, b) =>\n (\n getContent(PERMISSION_TO_CID[a.permission][0], contentContext) ??\n a.permission\n ).localeCompare(\n getContent(PERMISSION_TO_CID[b.permission][0], contentContext) ??\n b.permission\n )\n );\n const permissionsOfArea = permissionInfosOfArea.map((pa) => pa.permission);\n\n const allSelected = permissionsOfArea.every((pa) =>\n permissions?.includes(pa)\n );\n\n const onEnableAllForArea = useCallback(\n (checkAll: boolean) => {\n const permissionsNotInArea =\n permissions?.filter((p) => !permissionsOfArea.includes(p)) ?? [];\n if (checkAll) {\n clearErrors('permissions');\n setValue('permissions', [\n ...permissionsNotInArea,\n ...permissionsOfArea,\n ]);\n } else {\n setValue('permissions', permissionsNotInArea);\n }\n },\n [clearErrors, permissions, permissionsOfArea, setValue]\n );\n\n const onTogglePermissionSelect = useCallback(\n (permission: Permission, selected: boolean) => {\n const permissionsExcluding =\n permissions?.filter((p) => p !== permission) ?? [];\n if (selected) {\n clearErrors('permissions');\n setValue('permissions', [...permissionsExcluding, permission]);\n } else {\n setValue('permissions', permissionsExcluding);\n }\n },\n [clearErrors, permissions, setValue]\n );\n\n if (permissionsOfArea.length === 0) {\n return null;\n }\n\n return (\n \n \n \n \n \n {\n e.stopPropagation();\n e.preventDefault();\n onEnableAllForArea(!allSelected);\n }\n }\n >\n {!disabled && (\n <>\n {\n e.stopPropagation();\n e.preventDefault();\n onEnableAllForArea(!allSelected);\n }}\n />\n \n \n )}\n \n \n
    \n \n \n \n \n {permissionInfosOfArea.map((pa) => {\n const isSelected = permissions?.includes(pa.permission);\n return (\n \n onTogglePermissionSelect(pa.permission, !isSelected)\n }\n key={pa.permission}\n permissionInfo={pa}\n part=\"view\"\n />\n );\n })}\n \n \n \n \n \n {permissionInfosOfArea.map((pa) => {\n const isSelected = permissions?.includes(pa.permission);\n return (\n \n onTogglePermissionSelect(pa.permission, !isSelected)\n }\n key={pa.permission}\n permissionInfo={pa}\n part=\"action\"\n />\n );\n })}\n \n
    \n \n \n );\n};\n","import { isEqual } from 'lodash-es';\nimport { useCallback } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Button, Stack } from 'src/core/ui';\nimport { CrossIcon, ProfileOutlineIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SellerRoleInput, SellerUserAccountInfo } from 'src/WebApiController';\n\nexport const SellerUserDisplay = ({\n user,\n userIds,\n disabled,\n}: {\n user: SellerUserAccountInfo;\n userIds: string[] | null;\n disabled?: boolean;\n}) => {\n const { setValue } = useFormContext();\n\n const onRemoveUserFromRole = useCallback(() => {\n if (!userIds)\n // nothing to remove from\n return;\n\n const newUserIds = userIds.filter((uid) => uid !== user.userId);\n if (!isEqual(newUserIds.toSorted(), userIds.toSorted())) {\n setValue('userIds', newUserIds);\n }\n }, [setValue, user.userId, userIds]);\n\n return (\n \n \n \n {user.displayName} ({user.email})\n \n\n \n \n );\n};\n","import { isEqual } from 'lodash-es';\nimport { useCallback, useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { SellerAccountEmployeeMultiSelector } from 'src/components/Selectors/SellerAccountEmployeeSelector';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useSellerAccountContext } from 'src/contexts/SellerAccountContext';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SellerRoleInfo, SellerRoleInput } from 'src/WebApiController';\n\nimport * as styles from '../SellerRoleModal.css';\nimport { SellerUserDisplay } from './SellerUserDisplay';\n\nexport const SellerRoleUsersSection = ({\n disabled,\n}: {\n roleInfo?: SellerRoleInfo | null;\n disabled?: boolean;\n}) => {\n const { watch, setValue } = useFormContext();\n const userIds = watch('userIds');\n\n const { allActiveUserInfos } = useSellerAccountContext();\n const usersOfRole = useMemo(\n () =>\n Object.values(allActiveUserInfos ?? {}).filter((u) =>\n userIds?.includes(u.userId)\n ),\n [allActiveUserInfos, userIds]\n );\n\n const onUserIdsChange = useCallback(\n (newUserIds: string[]) => {\n if (!isEqual(userIds?.toSorted(), newUserIds.toSorted()))\n setValue('userIds', newUserIds);\n },\n [setValue, userIds]\n );\n\n return (\n \n }>\n \n \n \n \n \n \n {usersOfRole.map((u) => (\n \n ))}\n \n \n );\n};\n","import { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport {\n Content,\n FormatContent,\n useContent,\n} from 'src/contexts/ContentContext';\nimport { useSellerRoleContext } from 'src/contexts/SellerRoleContext';\nimport { ErrorMessage } from 'src/core/POS/ErrorMessage';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosSelect } from 'src/core/POS/PosSelect';\nimport { PosTextArea } from 'src/core/POS/PosTextArea';\nimport { getTextFieldState, PosTextField } from 'src/core/POS/PosTextField';\nimport { Stack } from 'src/core/ui';\nimport { TabPanel } from 'src/core/ui/TabPanel';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport {\n PermissionAccessArea,\n SellerRoleInfo,\n SellerRoleInput,\n} from 'src/WebApiController';\n\nimport * as styles from '../SellerRoleModal.css';\nimport { MAX_ROLE_DETAILS_LENGTH } from '../SellerRoleModal.types';\nimport { SellerPermissionSelectionSection } from './SellerPermissionSelectionSection';\nimport { SellerRoleUsersSection } from './SellerRoleUsersSection';\n\nexport const SellerRoleDetails = ({\n roleInfo,\n disabled,\n}: {\n roleInfo?: SellerRoleInfo | null;\n disabled?: boolean;\n}) => {\n const { register, formState, watch, setValue } =\n useFormContext();\n const requiredTxt = useContent(ContentId.Required);\n\n const [selectedRoleTemplate, setSelectedRoleTemplate] = useState<\n number | undefined\n >(undefined);\n\n const { allPermissions, allSellerRolesForSelection, getSellerRole } =\n useSellerRoleContext();\n\n const nameError = formState.errors.name?.message;\n const detailsError = formState.errors.details?.message;\n const details = watch('details');\n\n const onRoleTemplateSelected = useCallback(\n (role: string) => {\n const roleId = parseInt(role);\n if (roleId) {\n const roleInfo = getSellerRole(roleId);\n\n if (roleInfo) {\n const copyPermissions = roleInfo.permissions.filter(\n (p) => allPermissions?.[p]\n );\n\n // Only copy over the visible\n if (copyPermissions.length) {\n setSelectedRoleTemplate(roleId);\n setValue('permissions', copyPermissions);\n }\n }\n }\n },\n [allPermissions, getSellerRole, setValue]\n );\n\n const [tabIndex, setTabIndex] = useState(0);\n const tabs = useMemo(\n () => [\n {\n value: ContentId.Permissions,\n title: ,\n content: (\n \n ),\n },\n {\n value: ContentId.Access,\n title: ,\n content: (\n \n \n \n ),\n },\n ],\n // careful adding dependency here - causing this to re-calculate will cause a re-render\n // and it can cause losing focus to inputs on every key stroke, etc\n [disabled, roleInfo]\n );\n\n return (\n \n }\n errors={nameError}\n >\n \n \n \n }\n errors={detailsError}\n >\n \n \n \n \n \n \n\n {!roleInfo?.prefinedRole && allSellerRolesForSelection && (\n // We only show this if it's not a predefined Role\n \n \n \n \n \n \n \n \n \n \n \n )}\n\n {\n switch (value) {\n case ContentId.Access:\n setTabIndex(1);\n break;\n case ContentId.Permissions:\n default:\n setTabIndex(0);\n break;\n }\n }}\n />\n \n );\n};\n\nconst PermissionsTabContent = ({ disabled }: { disabled?: boolean }) => {\n const { getFieldState } = useFormContext();\n const permissionErrors = getFieldState('permissions').error?.message;\n\n const ref = useRef(null);\n\n // Make sure the error focuses when it becomes visible\n useEffect(() => {\n if (permissionErrors) {\n ref.current?.focus();\n }\n }, [permissionErrors]);\n\n return (\n \n {permissionErrors && (\n \n {permissionErrors}\n \n )}\n\n {Object.keys(PermissionAccessArea).map((area) => (\n \n ))}\n \n );\n};\n","import { useCallback, useContext } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { useSellerAccountContext } from 'src/contexts/SellerAccountContext';\nimport { useSellerRoleContext } from 'src/contexts/SellerRoleContext';\nimport { ConfirmDialog } from 'src/core/interim/dialogs/ConfirmDialog';\nimport { WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { Button, Stack } from 'src/core/ui';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { DeleteIcon, IconsFill } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { isSuccess } from 'src/utils/errorUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ApiException,\n SellerAccountClient,\n SellerRoleInfo,\n} from 'src/WebApiController';\n\nexport const LaunchDeleteRole = ({\n roleInfo,\n disabled,\n setIsLoading,\n}: {\n roleInfo: SellerRoleInfo;\n disabled?: boolean;\n setIsLoading?: (isLoading: boolean) => void;\n}) => {\n const { closeModal } = useContext(ModalContext);\n const { showErrorDialog, genericError } = useErrorBoundaryContext();\n\n const { activeAccountWebClientConfig } = useAppContext();\n const { refetchSellerRoleInfos } = useSellerRoleContext();\n const { allUserInfos } = useSellerAccountContext();\n\n const userCount = Object.values(allUserInfos ?? {}).filter((u) =>\n u.roles.includes(roleInfo.id)\n ).length;\n\n const dialogProps = useBasicDialog();\n\n const onDeleteRole = useCallback(async () => {\n setIsLoading?.(true);\n dialogProps.closeDialog();\n\n await tryInvokeApi(\n async () => {\n const r = await new SellerAccountClient(\n activeAccountWebClientConfig\n ).deleteSellerRole(roleInfo.id);\n\n if (isSuccess(r)) {\n refetchSellerRoleInfos();\n closeModal(true);\n } else {\n showErrorDialog(\n 'SellerAccountClient.deleteSellerRole',\n {\n message: r.message ?? genericError,\n status: r.status!,\n } as ApiException,\n {\n trackErrorData: {\n roleInfo,\n },\n }\n );\n }\n },\n (error) => {\n showErrorDialog('SellerAccountClient.deleteSellerRole', error);\n },\n () => setIsLoading?.(false)\n );\n }, [\n activeAccountWebClientConfig,\n closeModal,\n dialogProps,\n genericError,\n refetchSellerRoleInfos,\n roleInfo,\n setIsLoading,\n showErrorDialog,\n ]);\n\n return (\n <>\n dialogProps.launchDialog()}\n disabled={disabled}\n >\n \n \n \n \n \n\n }\n bodyText={\n userCount > 0 ? (\n }\n />\n ) : (\n \n )\n }\n {...dialogProps.dialogProps}\n centered\n disabled={disabled}\n onOkay={userCount > 0 ? undefined : onDeleteRole}\n onClosed={dialogProps.closeDialog}\n onCancel={dialogProps.closeDialog}\n />\n \n );\n};\n","import { useContext } from 'react';\nimport { CancelButton } from 'src/components/Buttons';\nimport { OkButton } from 'src/components/Buttons/OkButton';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { Stack } from 'src/core/ui';\nimport { ModalFooter } from 'src/modals/Modal/Modal.styled';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SellerRoleInfo } from 'src/WebApiController';\n\nimport { LaunchDeleteRole } from './components/LaunchDeleteRole';\n\nexport const SellerRoleModalFooter = ({\n roleInfo,\n onSubmit,\n disabled,\n setIsLoading,\n hasChanges,\n}: {\n roleInfo?: SellerRoleInfo | null;\n onSubmit?: () => void;\n disabled?: boolean;\n setIsLoading?: (isLoading: boolean) => void;\n hasChanges?: boolean;\n}) => {\n const { closeModal } = useContext(ModalContext);\n\n return (\n \n \n {!roleInfo?.prefinedRole && roleInfo?.id && !roleInfo?.isDeleted ? (\n \n ) : (\n \n )}\n \n \n \n \n \n \n );\n};\n","import { isEqual } from 'lodash-es';\nimport { ComponentProps, useCallback, useContext, useState } from 'react';\nimport { FormProvider } from 'react-hook-form';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { useSellerAccountContext } from 'src/contexts/SellerAccountContext';\nimport { useSellerRoleContext } from 'src/contexts/SellerRoleContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { Stack } from 'src/core/ui';\nimport { CancellableFormHeader } from 'src/modals/common/CancellableFormHeader';\nimport { ConnectedEventEntityHeader } from 'src/modals/common/EventEntityHeader';\nimport {\n ModalBody,\n ModalBodyDataContainer,\n} from 'src/modals/Modal/Modal.styled';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { isSuccess } from 'src/utils/errorUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ApiException,\n SellerAccountClient,\n SellerRoleInput,\n} from 'src/WebApiController';\n\nimport * as styles from '../UsersManagement.css';\nimport { SellerRoleDetails } from './components/SellerRoleDetails';\nimport { SellerRoleModalProps } from './SellerRoleModal.types';\nimport { SellerRoleModalFooter } from './SellerRoleModalFooter';\n\nexport const SellerRoleModalBody = ({\n disabled,\n roleInfo,\n cancelTo,\n formState,\n handleSubmit,\n watch,\n getValues,\n setError,\n clearErrors,\n}: Omit<\n ComponentProps>,\n 'children'\n> & { disabled?: boolean } & SellerRoleModalProps) => {\n const { allPermissions, refetchSellerRoleInfos } = useSellerRoleContext();\n const { refetchUserInfos } = useSellerAccountContext();\n\n const { showErrorDialog, genericError } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const { closeModal, setModal } = useContext(ModalContext);\n const [isLoading, setIsLoading] = useState(false);\n const { isSubmitting } = formState;\n\n const onSubmit = useCallback(\n async (formValue: SellerRoleInput) => {\n const usersHasChanged = !isEqual(\n formState.defaultValues?.userIds?.toSorted(),\n formValue.userIds?.toSorted()\n );\n\n setIsLoading(true);\n tryInvokeApi(\n async () => {\n const client = new SellerAccountClient(activeAccountWebClientConfig);\n\n const result =\n formValue.id > 0\n ? await client.updateSellerRole(formValue)\n : await client.createSellerRole(formValue);\n\n if (isSuccess(result)) {\n refetchSellerRoleInfos();\n if (usersHasChanged) {\n refetchUserInfos();\n }\n closeModal(true);\n } else {\n showErrorDialog(\n formValue.id > 0\n ? 'SellerAccountClietn.updateSellerRole'\n : 'SellerAccountClient.createSeatSaver',\n {\n message: result.message ?? genericError,\n status: result.status!,\n } as ApiException,\n {\n onDismissError: () => cancelTo && setModal(cancelTo),\n trackErrorData: formValue,\n }\n );\n }\n },\n (error) => {\n showErrorDialog(\n formValue.id > 0\n ? 'SellerAccountClietn.updateSellerRole'\n : 'SellerAccountClient.createSeatSaver',\n error,\n {\n trackErrorData: formValue,\n }\n );\n },\n () => {\n setIsLoading(false);\n }\n );\n },\n [\n activeAccountWebClientConfig,\n cancelTo,\n closeModal,\n formState.defaultValues?.userIds,\n genericError,\n refetchSellerRoleInfos,\n refetchUserInfos,\n setModal,\n showErrorDialog,\n ]\n );\n\n const hasChanges = useCallback(\n (formValue: SellerRoleInput) => {\n if (\n roleInfo?.isDeleted ||\n (formState.defaultValues?.name ?? '') !== (formValue.name ?? '') ||\n (formState.defaultValues?.details ?? '') !==\n (formValue.details ?? '') ||\n !isEqual(\n formState.defaultValues?.permissions?.toSorted(),\n formValue.permissions?.toSorted()\n ) ||\n !isEqual(\n formState.defaultValues?.userIds?.toSorted(),\n formValue.userIds?.toSorted()\n )\n ) {\n return true;\n }\n\n return false;\n },\n [\n formState.defaultValues?.details,\n formState.defaultValues?.name,\n formState.defaultValues?.permissions,\n formState.defaultValues?.userIds,\n roleInfo?.isDeleted,\n ]\n );\n\n const permissionErrorText = useContent(ContentId.PermissionsRequiredMessage);\n\n const onSubmitHandler = useCallback(() => {\n const formValues = getValues();\n\n const changed = hasChanges(formValues);\n if (!changed) return;\n\n let hasErrors = false;\n\n const visiblePermissions = formValues.permissions?.filter(\n (p) => allPermissions?.[p]\n );\n if (!visiblePermissions?.length) {\n setError('permissions', { message: permissionErrorText });\n hasErrors = true;\n } else {\n clearErrors('permissions');\n }\n\n if (!hasErrors) {\n handleSubmit(onSubmit)();\n }\n }, [\n getValues,\n hasChanges,\n allPermissions,\n setError,\n permissionErrorText,\n clearErrors,\n handleSubmit,\n onSubmit,\n ]);\n\n const formHasChanges = hasChanges(watch());\n\n return (\n <>\n \n \n \n {roleInfo?.isDeleted && (\n \n \n \n )}\n \n }\n />\n \n\n \n \n {isLoading ? (\n \n ) : (\n \n )}\n \n \n\n \n \n );\n};\n","import { useEffect, useMemo } from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { useSellerAccountContext } from 'src/contexts/SellerAccountContext';\nimport { SellerRoleInfo, SellerRoleInput } from 'src/WebApiController';\n\nimport { mapToSellerRoleInput } from './SellerRoleModal.utils';\nimport { SellerRoleModalBody } from './SellerRoleModalBody';\n\nexport const SellerRoleModal = ({\n roleInfo,\n}: {\n roleInfo?: SellerRoleInfo | null;\n}) => {\n const { allActiveUserInfos } = useSellerAccountContext();\n\n const userIdsOfRoles = useMemo(() => {\n if (!roleInfo?.id || !allActiveUserInfos) return null;\n\n const usersOfRole =\n roleInfo &&\n Object.values(allActiveUserInfos).filter((u) =>\n u.roles.includes(roleInfo.id)\n );\n return usersOfRole?.map((u) => u.userId);\n }, [allActiveUserInfos, roleInfo]);\n\n const methods = useForm({\n defaultValues: mapToSellerRoleInput(roleInfo, userIdsOfRoles),\n });\n\n useEffect(() => {\n if (\n (roleInfo?.id && (methods.formState.defaultValues?.id ?? 0) < 0) ||\n userIdsOfRoles?.length !==\n methods.formState.defaultValues?.userIds?.length\n ) {\n methods.reset(mapToSellerRoleInput(roleInfo, userIdsOfRoles));\n }\n }, [methods, roleInfo, userIdsOfRoles]);\n\n return (\n \n \n \n );\n};\n","import { SellerRoleInfo } from 'src/WebApiController';\n\nimport { SellerRoleModal } from './SellerRoleModal';\n\nexport const getSellerRoleModalConfig = (roleInfo?: SellerRoleInfo | null) => ({\n children: ,\n clickOutsideToClose: true,\n size: 'slide-in',\n});\n","import { createColumnHelper } from '@tanstack/react-table';\nimport { useContext } from 'react';\nimport { ButtonWithIcon } from 'src/components/Buttons';\nimport {\n Content,\n getContents,\n useContentContext,\n} from 'src/contexts/ContentContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { useSellerAccountContext } from 'src/contexts/SellerAccountContext';\nimport { useSellerRoleContext } from 'src/contexts/SellerRoleContext';\nimport { Stack } from 'src/core/ui';\nimport { BadgeWithCounts } from 'src/core/ui/Badge';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { OpenLinkIcon } from 'src/svgs';\nimport { EditIcon } from 'src/svgs/Viagogo';\nimport { TableShimmeringDiv } from 'src/tables/Table';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n PERMISSION_ACCESS_AREA_TO_CID,\n PERMISSION_TO_CID,\n} from 'src/utils/constants/contentIdMaps';\nimport { PermissionAccessArea, SellerRoleInfo } from 'src/WebApiController';\n\nimport { getSellerRoleModalConfig } from '../SellerRoleModal';\nimport * as styles from '../UsersManagement.css';\n\nconst columnHelper = createColumnHelper();\nconst SHIMMERING_DIV_HEIGHT_SINGLE_ROW = '30px';\n\nexport const ROLES_TABLE_COLUMNS_CONFIG = [\n columnHelper.accessor('name', {\n id: 'name',\n enableSorting: true,\n sortingFn: 'text',\n header: () => (\n \n \n \n ),\n cell: ({ getValue }) => (\n {getValue()}\n ),\n }),\n columnHelper.accessor('permissions', {\n id: 'permissions',\n header: () => (\n \n \n \n ),\n cell: function Cell({ getValue }) {\n const contentContext = useContentContext();\n const { allSellerRoles, allPermissions } = useSellerRoleContext();\n if (!allSellerRoles) {\n return ;\n }\n const permissions = getValue();\n const permissionsByAreas = permissions.reduce(\n (r, p) => {\n const permInfo = allPermissions?.[p];\n if (permInfo) {\n r[permInfo.area] = (r[permInfo.area] ?? 0) + 1;\n }\n return r;\n },\n {} as Record\n );\n return (\n \n \n {Object.keys(permissionsByAreas).map((pa) => (\n PERMISSION_TO_CID[p])\n .map((p) => PERMISSION_TO_CID[p][0]),\n contentContext\n ).join(', ')}\n >\n {\n \n }\n \n ))}\n \n \n );\n },\n }),\n columnHelper.accessor((data) => data?.id, {\n id: 'users',\n header: () => (\n \n \n \n ),\n minSize: 50,\n maxSize: 100,\n cell: function Cell({ getValue }) {\n const { allUserInfos } = useSellerAccountContext();\n const roleId = getValue() ?? -1;\n const count = Object.values(allUserInfos ?? {}).filter((u) =>\n u.roles.includes(roleId)\n ).length;\n\n return {count};\n },\n }),\n columnHelper.accessor(\n (data) =>\n data?.isDeleted ? 'deleted' : data?.prefinedRole ? 'default' : 'custom',\n {\n id: 'status',\n enableSorting: true,\n sortingFn: 'alphanumeric',\n header: () => (\n \n \n \n ),\n cell: ({ getValue }) => {\n const status = getValue();\n return (\n \n {status === 'deleted' ? (\n
    \n \n
    \n ) : (\n \n \n \n )}\n
    \n );\n },\n }\n ),\n columnHelper.accessor((data) => data, {\n id: 'action',\n header: () => (\n \n \n \n ),\n minSize: 50,\n maxSize: 100,\n cell: function Cell({ getValue }) {\n const { setModal } = useContext(ModalContext);\n const role = getValue();\n\n return (\n \n \n ) : (\n \n )\n }\n onClick={() => setModal(getSellerRoleModalConfig(role))}\n />\n \n );\n },\n }),\n];\n","import {\n functionalUpdate,\n PaginationState,\n SortingState,\n TableOptions,\n} from '@tanstack/react-table';\nimport { useMemo, useState } from 'react';\nimport { DialogProvider } from 'src/contexts/DialogContext/DialogContext';\nimport { useSellerRoleContext } from 'src/contexts/SellerRoleContext';\nimport { Table } from 'src/tables/Table';\nimport { SellerRoleInfo } from 'src/WebApiController';\n\nimport { ROLES_TABLE_COLUMNS_CONFIG } from './RolesTableColumnsConfig';\n\nexport const PAGE_SIZE = 10;\n\nexport const RolesTable = () => {\n const [pagination, setPagination] = useState({\n pageIndex: 0,\n pageSize: PAGE_SIZE,\n });\n const [sorting, setSorting] = useState([\n { id: 'name', desc: false },\n ]);\n const { allSellerRoles } = useSellerRoleContext();\n\n const data = useMemo(() => {\n return Object.values(allSellerRoles ?? {});\n }, [allSellerRoles]);\n\n const options: Partial> = {\n data,\n columns: ROLES_TABLE_COLUMNS_CONFIG,\n state: {\n pagination,\n sorting,\n },\n onPaginationChange: setPagination,\n onSortingChange: (sortingUpdaterFn) => {\n const newSortVal = functionalUpdate(sortingUpdaterFn, sorting);\n setSorting(newSortVal);\n },\n };\n\n return (\n \n
    \n \n );\n};\n","import { useContext } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { IconsFill, PlusIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport { RolesTable } from './RolesTable';\nimport { getSellerRoleModalConfig } from './SellerRoleModal/SellerRoleModalConfig';\nimport * as styles from './UsersManagement.css';\n\nexport const Roles = () => {\n const { setModal } = useContext(ModalContext);\n\n return (\n \n \n
    \n \n
    \n setModal(getSellerRoleModalConfig())}\n >\n \n \n \n
    \n \n
    \n );\n};\n","import clsx from 'clsx';\nimport { useMemo } from 'react';\nimport { useSellerAccountContext } from 'src/contexts/SellerAccountContext';\nimport { shared, vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { CrossIcon, ProfileOutlineIcon } from 'src/svgs/Viagogo';\n\nimport * as styles from './SellerUserListItem.css';\n\ntype SellerUserListItemProps = {\n sellerUserId?: string;\n onDelete?: (value: string) => void;\n};\n\nexport const SellerUserListItem = ({\n sellerUserId,\n onDelete,\n}: SellerUserListItemProps) => {\n const { allActiveUserInfos } = useSellerAccountContext();\n\n const userInfo = useMemo(() => {\n if (!sellerUserId || !allActiveUserInfos) return undefined;\n\n return allActiveUserInfos[sellerUserId];\n }, [allActiveUserInfos, sellerUserId]);\n\n return (\n
    \n \n \n \n \n {userInfo?.displayName}\n \n \n {userInfo?.email}\n \n \n \n {onDelete && (\n {\n onDelete(sellerUserId ?? '');\n }}\n />\n )}\n
    \n );\n};\n","import { Controller, useFormContext } from 'react-hook-form';\nimport { SellerUserListItem } from 'src/components/common/SellerUserListItem';\nimport { SellerAccountEmployeeMultiSelector } from 'src/components/Selectors/SellerAccountEmployeeSelector';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosTextArea } from 'src/core/POS/PosTextArea';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { shared } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { UserGroup } from 'src/WebApiController';\n\nimport * as styles from './EditTeamModal.css';\n\nexport const TeamInput = () => {\n const requiredMsg = useContent(ContentId.Required);\n\n const {\n formState: { errors },\n control,\n setValue,\n watch,\n } = useFormContext();\n\n const sellerUserIds = watch('sellerUserIds');\n\n return (\n
    \n \n (\n \n \n \n }\n >\n \n \n )}\n />\n (\n \n \n \n }\n >\n \n \n )}\n />\n (\n \n \n \n }\n >\n \n \n )}\n />\n\n \n \n \n }\n >\n \n {sellerUserIds.map((sellerUserId) => (\n {\n setValue(\n 'sellerUserIds',\n sellerUserIds.filter((id) => id !== value)\n );\n }}\n />\n ))}\n \n \n \n
    \n );\n};\n","import { useCallback, useState } from 'react';\nimport { FormProvider, useForm, useFormContext } from 'react-hook-form';\nimport { useToggle } from 'react-use';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { Button } from 'src/core/ui';\nimport { UserGroupInput, useUserGroups } from 'src/hooks/useUserGroups';\nimport { Modal, ModalBody, ModalFooter, ModalHeader } from 'src/modals/Modal';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { UserGroup } from 'src/WebApiController';\n\nimport * as styles from './EditTeamModal.css';\nimport { TeamInput } from './TeamInput';\n\ntype AddTeamModalFooterProps = { onClose: () => void };\n\nexport const AddTeamModal = ({ onClose }: { onClose: () => void }) => {\n const methods = useForm({\n defaultValues: {\n userGroupName: '',\n sellerUserIds: [],\n },\n });\n\n return (\n \n \n \n );\n};\n\nexport const AddTeamModalContent = ({ onClose }: { onClose: () => void }) => {\n const [isOpen, toggleIsOpen] = useToggle(true);\n\n return (\n {\n toggleIsOpen();\n onClose();\n }}\n unmountOnClose\n clickOutsideToClose\n centered\n size=\"sm\"\n >\n {\n toggleIsOpen();\n onClose();\n }}\n >\n \n \n \n \n \n \n {\n toggleIsOpen();\n onClose();\n }}\n />\n \n \n );\n};\n\nexport const AddTeamModalHeader = () => {\n return (\n
    \n
    \n \n
    \n
    \n );\n};\n\nexport const AddTeamModalFooter = ({ onClose }: AddTeamModalFooterProps) => {\n const { createUserGroup } = useUserGroups();\n const cancelText = useContent(ContentId.Cancel);\n const saveText = useContent(ContentId.Save);\n\n const { handleSubmit } = useFormContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n const [isLoading, setIsLoading] = useState(false);\n\n const onCreateSubmit = useCallback(\n async (formValue: UserGroup) => {\n setIsLoading(true);\n tryInvokeApi(\n async () => {\n const result = await createUserGroup(formValue);\n\n if (result) {\n onClose();\n }\n },\n (error) => {\n showErrorDialog('UserGroupClient.createUserGroup', error, {\n trackErrorData: formValue,\n });\n },\n () => {\n setIsLoading(false);\n }\n );\n },\n [onClose, showErrorDialog, createUserGroup]\n );\n\n const onCreateSubmitHandler = useCallback(() => {\n // TODO: Add validation for user if needed\n\n // const formValue = getValues();\n // const { userGroupName } = formValue;\n // clearErrors('userGroupName');\n // let hasErrors = false;\n // if (!roles || !roles.length) {\n // setError('roles', { message: requiredMsg });\n // hasErrors = true;\n // }\n\n // if (hasErrors) {\n // return;\n // }\n\n handleSubmit(onCreateSubmit)();\n }, [handleSubmit, onCreateSubmit]);\n\n return (\n
    \n \n
    \n \n
    \n
    \n );\n};\n","import { useCallback, useState } from 'react';\nimport { FormProvider, useForm, useFormContext } from 'react-hook-form';\nimport { useToggle } from 'react-use';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { ConfirmDialog } from 'src/core/interim/dialogs/ConfirmDialog';\nimport { Button } from 'src/core/ui';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useUserGroups } from 'src/hooks/useUserGroups';\nimport { Modal, ModalBody, ModalFooter, ModalHeader } from 'src/modals/Modal';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { UserGroup } from 'src/WebApiController';\n\nimport * as styles from './EditTeamModal.css';\nimport { TeamInput } from './TeamInput';\n\ntype EditTeamModalFooterProps = { onClose: () => void };\n\nexport const EditTeamModal = ({\n userGroup,\n onClose,\n}: {\n userGroup: UserGroup;\n onClose: () => void;\n}) => {\n const methods = useForm({\n defaultValues: userGroup,\n });\n\n return (\n \n \n \n );\n};\n\nexport const EditTeamModalContent = ({ onClose }: { onClose: () => void }) => {\n const [isOpen, toggleIsOpen] = useToggle(true);\n\n return (\n {\n toggleIsOpen();\n onClose();\n }}\n unmountOnClose\n clickOutsideToClose\n centered\n size=\"sm\"\n >\n {\n toggleIsOpen();\n onClose();\n }}\n >\n \n \n \n \n \n \n {\n toggleIsOpen();\n onClose();\n }}\n />\n \n \n );\n};\n\nexport const EditTeamModalHeader = () => {\n return (\n
    \n
    \n \n
    \n
    \n );\n};\n\nexport const EditTeamModalFooter = ({ onClose }: EditTeamModalFooterProps) => {\n const { updateUserGroup, deleteUserGroup } = useUserGroups();\n const deleteText = useContent(ContentId.Delete);\n const cancelText = useContent(ContentId.Cancel);\n const saveText = useContent(ContentId.Save);\n\n const { handleSubmit } = useFormContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n const [isLoading, setIsLoading] = useState(false);\n const deleteConfirmDialog = useBasicDialog();\n\n const onUpdateSubmit = useCallback(\n async (formValue: UserGroup) => {\n setIsLoading(true);\n tryInvokeApi(\n async () => {\n const result = await updateUserGroup(\n formValue.userGroupId,\n formValue\n );\n\n if (result) {\n onClose();\n }\n },\n (error) => {\n showErrorDialog('UserGroupClient.updateUserGroup', error, {\n trackErrorData: formValue,\n });\n },\n () => {\n setIsLoading(false);\n }\n );\n },\n [onClose, showErrorDialog, updateUserGroup]\n );\n\n const onUpdateSubmitHandler = useCallback(() => {\n handleSubmit(onUpdateSubmit)();\n }, [handleSubmit, onUpdateSubmit]);\n\n const onDeleteSubmit = useCallback(\n async (formValue: UserGroup) => {\n setIsLoading(true);\n tryInvokeApi(\n async () => {\n const result = await deleteUserGroup(formValue.userGroupId);\n\n if (result) {\n onClose();\n }\n },\n (error) => {\n showErrorDialog('UserGroupClient.deleteUserGroup', error, {\n trackErrorData: formValue,\n });\n },\n () => {\n setIsLoading(false);\n }\n );\n },\n [deleteUserGroup, onClose, showErrorDialog]\n );\n\n return (\n <>\n
    \n
    \n {\n deleteConfirmDialog.launchDialog();\n }}\n disabled={isLoading}\n >\n {deleteText}\n \n
    \n
    \n \n \n
    \n
    \n }\n bodyText={}\n onOkay={handleSubmit(onDeleteSubmit)}\n disabled={isLoading}\n onCancel={() => deleteConfirmDialog.closeDialog()}\n />\n \n );\n};\n","import { createColumnHelper } from '@tanstack/react-table';\nimport { useCallback, useContext } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { ConfirmDialog } from 'src/core/interim/dialogs/ConfirmDialog';\nimport { vars } from 'src/core/themes';\nimport { DropdownMenu, Stack } from 'src/core/ui';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { useUserGroups } from 'src/hooks/useUserGroups';\nimport { DeleteIcon, EditIcon, IconsFill, MoreIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { UserGroup } from 'src/WebApiController';\n\nimport { EditTeamModal } from '../EditTeam/EditTeamModal';\n\nconst columnHelper = createColumnHelper();\n\nexport const TEAMS_TABLE_COLUMNS_CONFIG = [\n columnHelper.accessor('userGroupName', {\n id: 'name',\n minSize: 50,\n maxSize: 100,\n enableSorting: true,\n sortingFn: 'text',\n header: () => (\n \n \n \n ),\n cell: ({ getValue }) => (\n {getValue()}\n ),\n }),\n columnHelper.accessor((data) => data?.sellerUserIds.length, {\n id: 'members',\n minSize: 50,\n maxSize: 50,\n enableSorting: true,\n sortingFn: 'text',\n header: () => (\n \n \n \n ),\n cell: ({ getValue }) => (\n {getValue()}\n ),\n }),\n\n columnHelper.accessor('userGroupDescription', {\n id: 'description',\n minSize: 50,\n maxSize: 200,\n enableSorting: true,\n sortingFn: 'text',\n header: () => (\n \n \n \n ),\n cell: ({ getValue }) => (\n {getValue()}\n ),\n }),\n columnHelper.accessor((data) => data, {\n id: 'action',\n header: () => (\n \n \n \n ),\n minSize: 50,\n maxSize: 50,\n cell: function Cell({ row: { original } }) {\n const { setModal, closeModal } = useContext(ModalContext);\n const { deleteUserGroup } = useUserGroups();\n const deleteConfirmDialog = useBasicDialog();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const onDeleteUserGroup = useCallback(async () => {\n deleteConfirmDialog.closeDialog();\n tryInvokeApi(\n async () => {\n await deleteUserGroup(original!.userGroupId);\n },\n (error) => {\n showErrorDialog('UserGroupClient.deleteUserGroup', error, {\n trackErrorData: { ...original },\n });\n }\n );\n }, [deleteConfirmDialog, deleteUserGroup, original, showErrorDialog]);\n\n if (!original) return null;\n\n return (\n \n \n \n \n \n \n \n \n \n \n setModal({\n children: (\n \n ),\n clickOutsideToClose: true,\n centered: true,\n size: 'sm',\n })\n }\n >\n \n \n \n \n \n\n deleteConfirmDialog.launchDialog()}\n >\n \n \n \n \n \n \n \n \n\n }\n bodyText={}\n onOkay={() => onDeleteUserGroup()}\n onCancel={() => deleteConfirmDialog.closeDialog()}\n />\n \n );\n },\n }),\n];\n","import {\n functionalUpdate,\n PaginationState,\n SortingState,\n TableOptions,\n} from '@tanstack/react-table';\nimport { useMemo, useState } from 'react';\nimport { FormatContent, useContent } from 'src/contexts/ContentContext';\nimport { DialogProvider } from 'src/contexts/DialogContext/DialogContext';\nimport { useUserGroups } from 'src/hooks/useUserGroups';\nimport { NoData, Table } from 'src/tables/Table';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { UserGroup } from 'src/WebApiController';\nimport { TEAMS_TABLE_COLUMNS_CONFIG } from './TeamsTableColumnsConfig';\n\nexport const PAGE_SIZE = 10;\n\nexport const TeamsTable = () => {\n const teamsText = useContent(ContentId.Teams);\n const [pagination, setPagination] = useState({\n pageIndex: 0,\n pageSize: PAGE_SIZE,\n });\n const [sorting, setSorting] = useState([\n { id: 'name', desc: false },\n ]);\n const { userGroups } = useUserGroups();\n\n const data = useMemo(() => {\n return Object.values(userGroups ?? {});\n }, [userGroups]);\n\n const options: Partial> = {\n data,\n columns: TEAMS_TABLE_COLUMNS_CONFIG,\n state: {\n pagination,\n sorting,\n },\n onPaginationChange: setPagination,\n onSortingChange: (sortingUpdaterFn) => {\n const newSortVal = functionalUpdate(sortingUpdaterFn, sorting);\n setSorting(newSortVal);\n },\n };\n\n return (\n \n {data.length > 0 ? (\n
    \n ) : (\n \n \n \n )}\n \n );\n};\n","import { useContext } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { IconsFill, PlusIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Feature } from 'src/WebApiController';\n\nimport { AddTeamModal } from './EditTeam/AddTeamModal';\nimport { TeamsTable } from './TeamsTable';\nimport * as styles from './UsersManagement.css';\n\nexport const Teams = () => {\n const { setModal, closeModal } = useContext(ModalContext);\n const hasTeamManagementFeature = useUserHasFeature(Feature.TeamManagement);\n if (!hasTeamManagementFeature) return null;\n\n return (\n \n \n
    \n \n
    \n \n setModal({\n children: ,\n clickOutsideToClose: true,\n centered: true,\n size: 'sm',\n })\n }\n >\n \n \n \n
    \n \n
    \n );\n};\n","import { debounce } from 'lodash-es';\nimport { useCallback, useState } from 'react';\nimport { useFormattedContent } from 'src/contexts/ContentContext';\nimport { PosSearchBox } from 'src/core/POS/PosSearchBox';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\n\ninterface FilterVendorAccountProps {\n disable?: boolean;\n onSearchTextChanged: (searchText: string) => void;\n searchEntityLabel: string;\n}\n\nexport const FilterInput = ({\n disable,\n onSearchTextChanged,\n searchEntityLabel,\n}: FilterVendorAccountProps) => {\n const [searchText, setSearchText] = useState('');\n\n const searchPlaceholderText = useFormattedContent(\n FormatContentId.SearchItem,\n searchEntityLabel\n ) as string;\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const debouncedOnSearchChange = useCallback(\n debounce((text: string) => {\n const newText = text.trim();\n if (newText !== searchText) {\n setSearchText(newText);\n onSearchTextChanged(newText);\n }\n }, 250),\n [searchText, onSearchTextChanged]\n );\n\n return (\n \n );\n};\n","import * as Label from '@radix-ui/react-label';\nimport { useCallback, useState } from 'react';\nimport { FormProvider, useForm, useFormContext } from 'react-hook-form';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { useSellerAccountContext } from 'src/contexts/SellerAccountContext';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { Button } from 'src/core/ui';\nimport { Modal, ModalBody, ModalFooter, ModalHeader } from 'src/modals/Modal';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { SellerAccountClient } from 'src/WebApiController';\n\nimport * as styles from './EditUserModal.css';\n\nconst AddUserModalHeader = () => {\n return (\n
    \n
    \n \n
    \n
    \n );\n};\n\ntype AddUserInput = {\n email: string;\n};\n\ntype AddUserModalFooterProps = { onClose: () => void };\n\nconst AddUserModalFooter = ({ onClose }: AddUserModalFooterProps) => {\n const { handleSubmit, setError, getValues, clearErrors, resetField } =\n useFormContext();\n const requiredMsg = useContent(ContentId.Required);\n const stubhubLoginMsg = useContent(ContentId.StubHubLoginRequired);\n const { showErrorDialog } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const [isLoading, setIsLoading] = useState(false);\n const { refetchUserInfos, allUserInfos } = useSellerAccountContext();\n\n const onSubmit = useCallback(\n async (formValue: AddUserInput) => {\n setIsLoading(true);\n tryInvokeApi(\n async () => {\n if (\n Object.values(allUserInfos ?? {}).some(\n (u) => u.email === formValue.email\n )\n ) {\n onClose();\n resetField('email');\n return;\n }\n\n const result = await new SellerAccountClient(\n activeAccountWebClientConfig\n ).activateUserForSellerAccountByEmail(formValue.email);\n\n if (result) {\n refetchUserInfos();\n resetField('email');\n onClose();\n } else {\n setError('email', { message: stubhubLoginMsg });\n }\n },\n (error) => {\n showErrorDialog(\n 'SellerAccountClient.activateUserForSellerAccount',\n error,\n {\n trackErrorData: formValue,\n }\n );\n },\n () => {\n setIsLoading(false);\n }\n );\n },\n [\n activeAccountWebClientConfig,\n allUserInfos,\n onClose,\n refetchUserInfos,\n resetField,\n setError,\n showErrorDialog,\n stubhubLoginMsg,\n ]\n );\n\n const onSubmitHandler = useCallback(() => {\n const formValue = getValues();\n\n const { email } = formValue;\n\n clearErrors('email');\n\n let hasErrors = false;\n\n if (!email) {\n setError('email', { message: requiredMsg });\n hasErrors = true;\n }\n\n if (hasErrors) {\n return;\n }\n\n handleSubmit(onSubmit)();\n }, [getValues, clearErrors, handleSubmit, onSubmit, setError, requiredMsg]);\n\n const cancelText = useContent(ContentId.Cancel);\n const saveText = useContent(ContentId.Add);\n return (\n
    \n
    \n \n \n
    \n
    \n );\n};\n\nexport const AddUserModal = ({\n isOpen,\n onClose,\n}: {\n isOpen: boolean;\n onClose: () => void;\n}) => {\n const methods = useForm();\n\n return (\n \n \n \n );\n};\n\nconst AddUserModalContent = ({\n isOpen,\n onClose,\n}: {\n isOpen: boolean;\n onClose: () => void;\n}) => {\n const {\n register,\n formState: { errors },\n watch,\n setValue,\n clearErrors,\n } = useFormContext();\n\n const email = watch('email');\n\n return (\n \n \n \n \n \n
    \n
    \n \n \n \n \n {\n clearErrors('email');\n setValue('email', e.target.value);\n }}\n />\n \n
    \n
    \n
    \n \n \n \n
    \n );\n};\n","import { useMemo } from 'react';\nimport { useFlexSearchIndex } from 'src/hooks/useFlexSearchIndex';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { Feature, SellerUserAccountInfo } from 'src/WebApiController';\n\nexport const useGetFilteredUsers = ({\n users,\n searchText,\n}: {\n users: SellerUserAccountInfo[];\n searchText: string;\n}) => {\n const hasUserSearchBar = useUserHasFeature(Feature.UserSearchBar);\n\n const { userOptionsContent, userIdsMap } = useMemo(() => {\n const userOptionsContent: Record = {};\n const userIdsMap: Record = {};\n users?.forEach((user: SellerUserAccountInfo) => {\n const userId = user.userId;\n userOptionsContent[userId] = user.email;\n userIdsMap[userId] = user;\n });\n\n return {\n userOptionsContent,\n userIdsMap,\n };\n }, [users]);\n\n const { flexSearchIndex } = useFlexSearchIndex(\n userOptionsContent,\n hasUserSearchBar && Object.keys(userOptionsContent).length > 0,\n true\n );\n\n const filterdUserIds = useMemo(() => {\n if (!searchText || !flexSearchIndex || !users || !hasUserSearchBar) {\n return [];\n }\n\n return flexSearchIndex.search(searchText) as string[];\n }, [flexSearchIndex, hasUserSearchBar, searchText, users]);\n\n return useMemo(() => {\n if (!searchText || !hasUserSearchBar) {\n return users;\n }\n\n if (filterdUserIds.length === 0) {\n return [];\n }\n\n const filteredUsers: SellerUserAccountInfo[] = [];\n for (const vendorId of filterdUserIds) {\n filteredUsers.push(userIdsMap[vendorId]);\n }\n return filteredUsers;\n }, [filterdUserIds, hasUserSearchBar, searchText, userIdsMap, users]);\n};\n","import * as Label from '@radix-ui/react-label';\nimport { useCallback, useState } from 'react';\nimport { FormProvider, useForm, useFormContext } from 'react-hook-form';\nimport { useToggle } from 'react-use';\nimport { UserGroupMultiSelector } from 'src/components/Selectors/UserGroupSelector';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { useSellerAccountContext } from 'src/contexts/SellerAccountContext';\nimport { useSellerRoleContext } from 'src/contexts/SellerRoleContext';\nimport { ConfirmDialog } from 'src/core/interim/dialogs/ConfirmDialog';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { PosMultiSelect } from 'src/core/POS/PosMultiSelect';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { Button } from 'src/core/ui';\nimport { Root as Input } from 'src/core/ui/TextField/TextField';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { Modal, ModalBody, ModalFooter, ModalHeader } from 'src/modals/Modal';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n SellerAccountClient,\n SellerUserAccountInfo,\n} from 'src/WebApiController';\n\nimport { activeBadge, inactiveBadge } from '../UsersManagement.css';\nimport * as styles from './EditUserModal.css';\n\nexport const EditUserModalHeader = () => {\n return (\n
    \n
    \n \n
    \n
    \n );\n};\n\ntype EditUserModalFooterProps = { onClose: () => void };\n\ntype EditUserInput = {\n userId: string;\n displayName: string;\n email: string;\n roles: number[];\n userGroupIds: number[];\n isDeactivated: boolean;\n};\n\nexport const EditUserModalFooter = ({ onClose }: EditUserModalFooterProps) => {\n const deactivateUserText = useContent(ContentId.DeactivateUser);\n const activateUserText = useContent(ContentId.ActivateUser);\n const cancelText = useContent(ContentId.Cancel);\n const saveText = useContent(ContentId.Save);\n\n const { loginContext } = useAppContext();\n\n const { handleSubmit, setError, getValues, clearErrors, watch } =\n useFormContext();\n const requiredMsg = useContent(ContentId.Required);\n const { showErrorDialog } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const [isLoading, setIsLoading] = useState(false);\n const deleteConfirmDialog = useBasicDialog();\n const { refetchUserInfos } = useSellerAccountContext();\n\n const deactivated = watch('isDeactivated');\n const isCurrentUser = loginContext?.user?.userId === getValues().userId;\n\n const onActivateSubmit = useCallback(\n async (formValue: EditUserInput) => {\n setIsLoading(true);\n tryInvokeApi(\n async () => {\n const result = await new SellerAccountClient(\n activeAccountWebClientConfig\n ).activateUserForSellerAccount({ sellerUserId: formValue.userId });\n\n if (result) {\n refetchUserInfos();\n onClose();\n }\n },\n (error) => {\n showErrorDialog('SellerAccountClient.getSellerUserByEmail', error, {\n trackErrorData: formValue,\n });\n },\n () => {\n setIsLoading(false);\n }\n );\n },\n [activeAccountWebClientConfig, onClose, refetchUserInfos, showErrorDialog]\n );\n\n const onUpdateSubmit = useCallback(\n async (formValue: EditUserInput) => {\n setIsLoading(true);\n tryInvokeApi(\n async () => {\n const result = await new SellerAccountClient(\n activeAccountWebClientConfig\n ).updateSellerUser({\n sellerUserId: formValue.userId,\n displayName: formValue.displayName,\n roles: formValue.roles,\n userGroupIds: formValue.userGroupIds,\n });\n\n if (result) {\n refetchUserInfos();\n onClose();\n }\n },\n (error) => {\n showErrorDialog('SellerAccountClient.updateSellerUser', error, {\n trackErrorData: formValue,\n });\n },\n () => {\n setIsLoading(false);\n }\n );\n },\n [activeAccountWebClientConfig, refetchUserInfos, onClose, showErrorDialog]\n );\n\n const onUpdateSubmitHandler = useCallback(() => {\n const formValue = getValues();\n\n const { displayName, roles } = formValue;\n\n clearErrors('displayName');\n clearErrors('roles');\n\n let hasErrors = false;\n\n if (!displayName) {\n setError('displayName', { message: requiredMsg });\n hasErrors = true;\n }\n\n if (!roles || !roles.length) {\n setError('roles', { message: requiredMsg });\n hasErrors = true;\n }\n\n if (hasErrors) {\n return;\n }\n\n handleSubmit(onUpdateSubmit)();\n }, [\n getValues,\n clearErrors,\n handleSubmit,\n onUpdateSubmit,\n setError,\n requiredMsg,\n ]);\n\n const onDeleteSubmit = useCallback(\n async (formValue: EditUserInput) => {\n setIsLoading(true);\n tryInvokeApi(\n async () => {\n const result = await new SellerAccountClient(\n activeAccountWebClientConfig\n ).deactivateUserForSellerAccount({ sellerUserId: formValue.userId });\n\n if (result) {\n refetchUserInfos();\n onClose();\n }\n },\n (error) => {\n showErrorDialog(\n 'SellerAccountClient.removeUserFromSellerAccount',\n error,\n {\n trackErrorData: formValue,\n }\n );\n },\n () => {\n setIsLoading(false);\n }\n );\n },\n [activeAccountWebClientConfig, refetchUserInfos, onClose, showErrorDialog]\n );\n\n return (\n <>\n
    \n
    \n {deactivated ? (\n {\n handleSubmit(onActivateSubmit)();\n }}\n disabled={isLoading}\n >\n {activateUserText}\n \n ) : (\n {\n deleteConfirmDialog.launchDialog();\n }}\n disabled={isLoading || isCurrentUser}\n >\n {deactivateUserText}\n \n )}\n
    \n
    \n \n \n
    \n
    \n }\n bodyText={}\n onOkay={handleSubmit(onDeleteSubmit)}\n disabled={isLoading}\n onCancel={() => deleteConfirmDialog.closeDialog()}\n />\n \n );\n};\n\nexport const EditUserModal = ({\n userId,\n displayName,\n email,\n roles,\n userGroupIds,\n isDeactivated,\n onClose,\n}: SellerUserAccountInfo & { onClose: () => void }) => {\n const methods = useForm({\n defaultValues: {\n userId,\n displayName,\n email,\n roles,\n userGroupIds,\n isDeactivated,\n },\n });\n\n return (\n \n \n \n );\n};\n\nexport const EditUserModalContent = ({ onClose }: { onClose: () => void }) => {\n const [isOpen, toggleIsOpen] = useToggle(true);\n\n const {\n formState: { errors },\n watch,\n register,\n clearErrors,\n setValue,\n } = useFormContext();\n\n const { allSellerRolesForSelection } = useSellerRoleContext();\n const displayName = watch('displayName');\n const email = watch('email');\n const roles = watch('roles');\n const isDeactivated = watch('isDeactivated');\n const userGroupIds = watch('userGroupIds');\n\n return (\n {\n toggleIsOpen();\n onClose();\n }}\n unmountOnClose\n clickOutsideToClose\n centered\n size=\"sm\"\n >\n {\n toggleIsOpen();\n onClose();\n }}\n >\n \n \n \n
    \n
    \n \n \n \n \n {\n clearErrors('displayName');\n setValue('displayName', e.target.value);\n }}\n />\n \n
    \n
    \n \n \n \n \n {email}\n \n
    \n
    \n \n \n \n {allSellerRolesForSelection ? (\n \n r.toString())}\n valueOptionsContent={allSellerRolesForSelection}\n onChange={(newValues) => {\n clearErrors('roles');\n setValue(\n 'roles',\n newValues.map((v) => parseInt(v))\n );\n }}\n />\n \n ) : (\n \n )}\n
    \n\n
    \n \n \n \n \n r.toString())}\n onChange={(newValues) => {\n clearErrors('userGroupIds');\n setValue(\n 'userGroupIds',\n newValues.map((v) => parseInt(v))\n );\n }}\n />\n \n
    \n\n
    \n \n \n \n
    \n {!isDeactivated ? (\n
    \n \n
    \n ) : (\n
    \n \n
    \n )}\n
    \n
    \n
    \n
    \n \n {\n toggleIsOpen();\n onClose();\n }}\n />\n \n \n );\n};\n","import { SellerRoleInfo, SellerRoleInput } from 'src/WebApiController';\n\nexport const mapToSellerRoleInput = (roles?: SellerRoleInfo[] | null) => {\n return {\n id: -1,\n permissions: [...(roles?.flatMap((role) => role.permissions) ?? [])],\n } as SellerRoleInput;\n};\n","import { ComponentProps, useContext } from 'react';\nimport { FormProvider } from 'react-hook-form';\nimport { CancelButton } from 'src/components/Buttons';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { typography } from 'src/core/themes/shared.css';\nimport { Stack } from 'src/core/ui';\nimport { CancellableFormHeader } from 'src/modals/common/CancellableFormHeader';\nimport { ConnectedEventEntityHeader } from 'src/modals/common/EventEntityHeader';\nimport {\n ModalBody,\n ModalBodyDataContainer,\n ModalFooter,\n} from 'src/modals/Modal/Modal.styled';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { PermissionAccessArea, SellerRoleInput } from 'src/WebApiController';\n\nimport { SellerPermissionSelectionSection } from '../SellerRoleModal/components/SellerPermissionSelectionSection';\nimport * as styles from './SellerPermissionDisplayModal.css';\nimport { SellerPermissionDisplayModalProps } from './SellerPermissionDisplayModal.types';\n\nexport const SellerPermissionDisplayModalBody = ({\n cancelTo,\n isLoading,\n}: Omit<\n ComponentProps>,\n 'children'\n> &\n SellerPermissionDisplayModalProps) => {\n const { closeModal } = useContext(ModalContext);\n\n return (\n <>\n \n \n \n \n }\n />\n \n\n \n \n {isLoading ? (\n \n ) : (\n \n \n \n \n\n {Object.keys(PermissionAccessArea).map((area) => (\n \n ))}\n \n )}\n \n \n\n \n \n \n \n \n \n );\n};\n","import { useEffect, useMemo } from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { useSellerRoleContext } from 'src/contexts/SellerRoleContext';\nimport { SellerRoleInput } from 'src/WebApiController';\n\nimport { mapToSellerRoleInput } from './SellerPermissionDisplayModal.utils';\nimport { SellerPermissionDisplayModalBody } from './SellerPermissionDisplayModalBody';\n\nexport const SellerPermissionDisplayModal = ({\n roleIds,\n}: {\n roleIds?: number[] | null;\n}) => {\n const { allSellerRoles, isLoading } = useSellerRoleContext();\n\n const roleInfos = useMemo(() => {\n if (!roleIds || !allSellerRoles) return null;\n\n return roleIds.map((roleId) => allSellerRoles[roleId]);\n }, [allSellerRoles, roleIds]);\n\n const methods = useForm({\n defaultValues: mapToSellerRoleInput(roleInfos),\n });\n\n useEffect(() => {\n methods.reset(mapToSellerRoleInput(roleInfos));\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [roleInfos]);\n\n return (\n \n \n \n );\n};\n","import { SellerPermissionDisplayModal } from './SellerPermissionDisplayModal';\n\nexport const getSellerPermissionDisplayModalConfig = (\n roleIds?: number[] | null\n) => ({\n children: ,\n clickOutsideToClose: true,\n size: 'slide-in',\n});\n","import { createColumnHelper } from '@tanstack/react-table';\nimport { useCallback, useContext } from 'react';\nimport { IconButton } from 'src/components/Buttons';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { useSellerRoleContext } from 'src/contexts/SellerRoleContext';\nimport { ContentPlaceholder } from 'src/core/POS/ContentPlaceholder';\nimport { Stack } from 'src/core/ui';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { EditIcon, UnHideIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SellerUserAccountInfo } from 'src/WebApiController';\n\nimport { EditUserModal } from '../EditUser/EditUserModal';\nimport { getSellerPermissionDisplayModalConfig } from '../SellerPermissionDisplayModal';\nimport * as styles from '../UsersManagement.css';\n\nconst columnHelper = createColumnHelper();\n\nexport const USERS_TABLE_COLUMNS_CONFIG = [\n columnHelper.accessor('displayName', {\n id: 'name',\n enableSorting: true,\n sortingFn: 'text',\n header: () => (\n \n \n \n ),\n cell: ({ getValue }) => (\n {getValue()}\n ),\n }),\n columnHelper.accessor('email', {\n id: 'email',\n header: () => (\n \n \n \n ),\n cell: ({ getValue }) => (\n \n
    {getValue()}
    \n
    \n ),\n }),\n columnHelper.accessor('isDeactivated', {\n id: 'status',\n header: () => (\n \n {' '}\n \n \n ),\n cell: ({ getValue }) => (\n \n {!getValue() ? (\n
    \n \n
    \n ) : (\n
    \n \n
    \n )}\n
    \n ),\n }),\n columnHelper.accessor('roles', {\n id: 'role',\n header: () => (\n \n \n \n ),\n cell: function Cell({ getValue }) {\n const roles = getValue();\n const { allSellerRoles } = useSellerRoleContext();\n\n if (!allSellerRoles) {\n return ;\n }\n\n // TODO - get content for those predefined roles\n\n const roleNames = roles\n .map((r) => allSellerRoles[r]?.name)\n .filter((n) => n);\n\n return {roleNames.join(', ')};\n },\n }),\n columnHelper.accessor((data) => data, {\n id: 'actions',\n header: () => (\n \n \n \n ),\n enableSorting: false,\n size: 40,\n cell: function Cell({ getValue }) {\n const { setModal, closeModal } = useContext(ModalContext);\n const data = getValue();\n\n const onViewPermissionClick = useCallback(() => {\n setModal(getSellerPermissionDisplayModalConfig(data.roles));\n }, [data.roles, setModal]);\n\n const onEditClick = useCallback(() => {\n setModal({\n children: ,\n clickOutsideToClose: true,\n centered: true,\n size: 'sm',\n });\n }, [closeModal, data, setModal]);\n\n return (\n \n \n }\n onClick={onViewPermissionClick}\n />\n }\n onClick={onEditClick}\n />\n \n \n );\n },\n }),\n];\n","import {\n functionalUpdate,\n PaginationState,\n SortingState,\n TableOptions,\n} from '@tanstack/react-table';\nimport { useMemo, useState } from 'react';\nimport { DialogProvider } from 'src/contexts/DialogContext/DialogContext';\nimport { useSellerAccountContext } from 'src/contexts/SellerAccountContext';\nimport { Table } from 'src/tables/Table';\nimport { SellerUserAccountInfo } from 'src/WebApiController';\nimport { useGetFilteredUsers } from './hooks/useGetFilteredUsers';\nimport { USERS_TABLE_COLUMNS_CONFIG } from './UsersTableColumnsConfig';\n\nexport const PAGE_SIZE = 10;\n\nexport const UsersTable = ({ searchText }: { searchText: string }) => {\n const [pagination, setPagination] = useState({\n pageIndex: 0,\n pageSize: PAGE_SIZE,\n });\n const [sorting, setSorting] = useState([\n { id: 'name', desc: false },\n ]);\n const { allUserInfos } = useSellerAccountContext();\n\n const data = useMemo(() => {\n return Object.values(allUserInfos ?? {});\n }, [allUserInfos]);\n\n const filteredUsers = useGetFilteredUsers({\n users: data,\n searchText,\n });\n\n const options: Partial> = {\n data: filteredUsers,\n columns: USERS_TABLE_COLUMNS_CONFIG,\n state: {\n pagination,\n sorting,\n },\n onPaginationChange: setPagination,\n onSortingChange: (sortingUpdaterFn) => {\n const newSortVal = functionalUpdate(sortingUpdaterFn, sorting);\n setSorting(newSortVal);\n },\n };\n\n return (\n \n
    \n \n );\n};\n","import { useState } from 'react';\nimport { useToggle } from 'react-use';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { IconsFill, PlusIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Feature } from 'src/WebApiController';\n\nimport { FilterInput } from '../VendorManagement/Vendors/components/FilterInput';\nimport { AddUserModal } from './EditUser/AddUserModal';\nimport * as styles from './UsersManagement.css';\nimport { UsersTable } from './UsersTable';\n\nexport const Users = () => {\n const [isAddUserModalOpen, toggleAddUserModalOpen] = useToggle(false);\n const users = useContent(ContentId.Users);\n const [searchText, setSearchText] = useState('');\n const hasUserSearchBar = useUserHasFeature(Feature.UserSearchBar);\n\n return (\n \n \n
    \n \n
    \n \n {hasUserSearchBar && (\n \n )}\n \n \n \n \n \n \n \n
    \n \n \n
    \n );\n};\n","import { Outlet } from 'react-router-dom';\n\nexport const UsersManagement = () => {\n return ;\n};\n","import { useRef } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { shared, vars } from 'src/core/themes';\nimport { Button, Stack } from 'src/core/ui';\nimport { useGetAccessiblePurchasePaymentMethodsQuery } from 'src/hooks/api/useGetAccessiblePurchasePaymentMethodsQuery';\nimport { paymentsWrapper } from 'src/navigations/Routes/Settings/Views/VendorManagement/Payments/Payment.css';\nimport { IconsFill, PlusIcon } from 'src/svgs/Viagogo';\nimport {\n PurchasePaymentMethodsImperativeRef,\n PurchasePaymentMethodsTableContainer,\n} from 'src/tables/PurchasePaymentMethodsTable/PurchasePaymentMethodsTableContainer';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nexport const Payments = () => {\n const purchasePaymentMethodsQuery =\n useGetAccessiblePurchasePaymentMethodsQuery();\n\n const purchasePaymentMethods = purchasePaymentMethodsQuery.data;\n\n const purchasePaymentMethodsRef =\n useRef(null);\n\n return (\n
    \n
    \n \n
    \n \n
    \n \n purchasePaymentMethodsRef.current?.onAddNewPaymentMethod()\n }\n >\n \n \n \n \n \n
    \n
    \n {purchasePaymentMethodsQuery.isLoading ? (\n \n ) : (\n \n )}\n
    \n );\n};\n","import { Outlet } from 'react-router-dom';\n\nexport const VendorManagement = () => {\n return ;\n};\n","import { useMemo } from 'react';\nimport { VendorIdQueryParam } from 'src/utils/constants/constants';\nimport { getDeepLinkIdFromUrl } from 'src/utils/deepLinkUtils';\n\nexport const useGetVendorIdFromUrl = (): number | undefined => {\n return useMemo(() => {\n const vendorId = getDeepLinkIdFromUrl(\n VendorIdQueryParam,\n window.location.href\n );\n return vendorId ? Number(vendorId) : undefined;\n }, []);\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { PurchaseClient } from 'src/WebApiController';\n\nexport const GET_VENDOR_QUERY_KEY = 'getVendor';\n\nexport const useGetVendor = (vendorId: number | undefined) => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n\n return useQuery({\n queryKey: [\n GET_VENDOR_QUERY_KEY,\n activeAccountWebClientConfig.activeAccountId,\n vendorId,\n ],\n queryFn: () => {\n if (activeAccountWebClientConfig.activeAccountId == null) {\n return null;\n }\n return tryInvokeApi(\n () => {\n return new PurchaseClient(activeAccountWebClientConfig).getVendor(\n vendorId\n );\n },\n (error) => {\n trackError('PurchaseClient.getVendor', error);\n }\n );\n },\n enabled: vendorId != null,\n refetchOnWindowFocus: false,\n });\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { useCallback, useEffect, useState } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { PurchaseClient, PurchaseVendorAccount } from 'src/WebApiController';\n\nexport const GET_ACCESSIBLE_VENDOR_ACCOUNTS_KEY = 'getAccessibleVendorAccounts';\n\nconst PAGE_SIZE = 1000;\n\ninterface RequestPage {\n skip: number;\n searchText: string;\n hasNextPage: boolean;\n}\n\nconst defaultRequestPage: RequestPage = {\n skip: 0,\n searchText: '',\n hasNextPage: true,\n};\n\nexport function useGetFilteredAccessibleVendorAccountsQuery(\n purchaseOrderVendorIds: number[] | null | undefined,\n searchText: string\n) {\n const { activeAccountWebClientConfig } = useAppContext();\n const { trackError } = useErrorBoundaryContext();\n const [allVendorAccounts, setAllVendorAccounts] = useState<\n PurchaseVendorAccount[]\n >([]);\n\n const [requestPage, setRequestPage] =\n useState(defaultRequestPage);\n\n useEffect(() => {\n const cleanSearchText = searchText || '';\n if (cleanSearchText !== requestPage.searchText) {\n setAllVendorAccounts([]);\n setRequestPage({\n ...defaultRequestPage,\n searchText: cleanSearchText,\n });\n }\n }, [requestPage.searchText, searchText]);\n\n const getVendorAccountsQuery = useQuery({\n queryKey: [\n GET_ACCESSIBLE_VENDOR_ACCOUNTS_KEY,\n activeAccountWebClientConfig.activeAccountId,\n purchaseOrderVendorIds,\n requestPage,\n ],\n queryFn: async () => {\n if (!purchaseOrderVendorIds?.length) {\n // If all of these are nulls, return nothing\n return allVendorAccounts;\n }\n\n const { skip, hasNextPage, searchText } = requestPage;\n\n // No next page\n if (!hasNextPage) {\n return allVendorAccounts;\n }\n\n const vendorAccounts = await new PurchaseClient(\n activeAccountWebClientConfig\n ).getAccessibleVendorAccounts(\n { item1: purchaseOrderVendorIds, item2: [] },\n searchText || null,\n PAGE_SIZE,\n skip\n );\n\n if (vendorAccounts.length === 0) {\n setRequestPage({\n ...requestPage,\n hasNextPage: false,\n });\n return allVendorAccounts;\n }\n\n const mergedVendors = [...allVendorAccounts, ...vendorAccounts];\n setAllVendorAccounts(mergedVendors);\n return mergedVendors;\n },\n\n refetchOnWindowFocus: false,\n enabled: !!purchaseOrderVendorIds?.length,\n meta: {\n onError: (error: ErrorTypes) => {\n trackError('PurchaseClient.getAccessibleVendorAccounts', error, {\n vendorIdSelected: purchaseOrderVendorIds,\n });\n },\n },\n });\n\n const loadNextVendorAccountsPage = useCallback(() => {\n const nextRequestPage: RequestPage = {\n skip: allVendorAccounts.length,\n hasNextPage: true,\n searchText: requestPage.searchText,\n };\n\n setRequestPage(nextRequestPage);\n }, [allVendorAccounts.length, requestPage.searchText]);\n\n const updateVendorAccount = useCallback(\n (vendorAccount: PurchaseVendorAccount) => {\n const vendorAccountIndex = allVendorAccounts.findIndex(\n (va) => va.id === vendorAccount.id\n );\n\n if (vendorAccountIndex === -1) {\n return;\n }\n\n const allVendorVendorAccountsUpdated = [...allVendorAccounts];\n allVendorVendorAccountsUpdated[vendorAccountIndex] = vendorAccount;\n setAllVendorAccounts(allVendorVendorAccountsUpdated);\n },\n [allVendorAccounts]\n );\n\n const refreshSearch = useCallback(() => {\n setAllVendorAccounts([]);\n setRequestPage({\n ...requestPage,\n hasNextPage: true,\n skip: 0, // Start from the begging\n });\n getVendorAccountsQuery.refetch();\n }, [getVendorAccountsQuery, requestPage]);\n\n return {\n ...getVendorAccountsQuery,\n data: allVendorAccounts,\n loadNextVendorAccountsPage,\n updateVendorAccount,\n refreshSearch,\n };\n}\n","import { useQueryClient } from '@tanstack/react-query';\nimport { useCallback } from 'react';\nimport { GET_VENDOR_QUERY_KEY } from 'src/hooks/api/useGetVendor';\n\nexport const useInvalidateGetVendorQuery = () => {\n const queryClient = useQueryClient();\n\n return useCallback(async () => {\n await queryClient.invalidateQueries({\n queryKey: [GET_VENDOR_QUERY_KEY],\n // type: 'active',\n });\n }, [queryClient]);\n};\n","import { useContent } from 'src/contexts/ContentContext';\nimport { FilterInput } from 'src/navigations/Routes/Settings/Views/VendorManagement/Vendors/components/FilterInput';\nimport { ContentId } from 'src/utils/constants/contentId';\n\ninterface FilterVendorAccountsInputProps {\n disable?: boolean;\n onSearchTextChanged: (searchText: string) => void;\n}\n\nexport const FilterVendorAccountsInput = ({\n disable,\n onSearchTextChanged,\n}: FilterVendorAccountsInputProps) => {\n const vendorAccounts = useContent(ContentId.VendorAccounts);\n return (\n \n );\n};\n","import { useQueryClient } from '@tanstack/react-query';\nimport { useCallback } from 'react';\nimport { GET_ACCESSIBLE_VENDORS_QUERY_KEY } from 'src/hooks/api/useGetAccessibleVendorsQuery';\n\nexport const useInvalidateGetAccessibleVendorsQuery = () => {\n const queryClient = useQueryClient();\n\n return useCallback(async () => {\n await queryClient.invalidateQueries({\n queryKey: [GET_ACCESSIBLE_VENDORS_QUERY_KEY],\n type: 'active',\n });\n }, [queryClient]);\n};\n","import { useCallback, useState } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { EmptyVendorAccountId } from 'src/dialogs/PurchaseVendorAccountDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ApiException,\n PurchaseClient,\n PurchaseVendorAccount,\n PurchaseVendorAccountDetails,\n} from 'src/WebApiController';\n\nexport type OnVendorAccountSaveArgs = {\n vendorAccount: PurchaseVendorAccount;\n isNew: boolean;\n};\n\nexport type VendorAccountEditInfo = {\n vendorId: number;\n id: string;\n};\n\nexport type OnVendorAccountSavedFn = (value: OnVendorAccountSaveArgs) => void;\n\ninterface UseAddVendorAccountProps {\n onVendorAccountSaved?: OnVendorAccountSavedFn;\n}\n\nexport const useAddVendorAccount = (props?: UseAddVendorAccountProps) => {\n const onVendorAccountSaved = props?.onVendorAccountSaved;\n\n // Purchase Vendor Account\n const [currentVendorAccount, setCurrentVendorAccount] =\n useState();\n const venderAccountDialog = useBasicDialog();\n const { closeDialog, launchDialog } = venderAccountDialog;\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const onVendorAccountCancel = useCallback(() => {\n setCurrentVendorAccount(undefined);\n closeDialog();\n }, [closeDialog]);\n\n const onSaveVendorAccount = useCallback(\n async (vendorAccount: PurchaseVendorAccountDetails) => {\n await tryInvokeApi(\n async () => {\n const newId = await new PurchaseClient(\n activeAccountWebClientConfig\n ).mergeVendorAccount(vendorAccount);\n\n if (newId) {\n const va = {\n ...vendorAccount,\n id: newId,\n };\n onVendorAccountSaved?.({\n vendorAccount: va,\n isNew: vendorAccount.id === EmptyVendorAccountId,\n });\n } else {\n // This should never happen\n // Normal errors would have fallen to the error catch\n showErrorDialog(\n 'PurchaseClient.mergeVendorAccount',\n {\n message:\n 'Unable to create or save vendorAccount ' + vendorAccount.id,\n status: 500,\n } as ApiException,\n {\n trackErrorData: vendorAccount,\n }\n );\n }\n },\n (error) => {\n showErrorDialog('PurchaseClient.mergeVendorAccount', error, {\n trackErrorData: vendorAccount,\n });\n },\n onVendorAccountCancel\n );\n },\n [\n onVendorAccountCancel,\n activeAccountWebClientConfig,\n onVendorAccountSaved,\n showErrorDialog,\n ]\n );\n\n const onAddNewVendorAccount = useCallback(\n (vendorId: number) => {\n setCurrentVendorAccount({\n vendorId: vendorId,\n id: EmptyVendorAccountId,\n });\n venderAccountDialog.launchDialog();\n },\n [venderAccountDialog]\n );\n\n const onEditVendorAccount = useCallback(\n (vendorAccount: PurchaseVendorAccount) => {\n setCurrentVendorAccount(vendorAccount);\n launchDialog();\n },\n [launchDialog]\n );\n\n return {\n currentVendorAccount,\n onAddNewVendorAccount,\n onEditVendorAccount,\n onSaveVendorAccount,\n onVendorAccountCancel,\n venderAccountDialog,\n };\n};\n","import { useCallback } from 'react';\nimport { useInvalidateGetAccessibleVendorsQuery } from 'src/hooks/api/useInvalidateGetAccessibleVendorsQuery';\nimport {\n OnVendorAccountSaveArgs,\n OnVendorAccountSavedFn,\n useAddVendorAccount,\n} from 'src/navigations/Routes/Settings/Views/VendorManagement/Vendors/hooks/useAddVendorAccount';\n\ninterface UseAddVendorAccountActionsProps {\n onVendorAccountSaved: OnVendorAccountSavedFn;\n}\n\nexport const useAddVendorAccountActions = (\n props?: UseAddVendorAccountActionsProps\n) => {\n const onVendorAccountSavedProp = props?.onVendorAccountSaved;\n const invalidateGetAccessibleVendorsQuery =\n useInvalidateGetAccessibleVendorsQuery();\n\n const onVendorAccountSaved = useCallback(\n async (value: OnVendorAccountSaveArgs) => {\n await Promise.all([\n invalidateGetAccessibleVendorsQuery(),\n onVendorAccountSavedProp?.(value),\n ]);\n },\n [invalidateGetAccessibleVendorsQuery, onVendorAccountSavedProp]\n );\n\n return useAddVendorAccount({\n onVendorAccountSaved,\n });\n};\n","import { MutableRefObject, useImperativeHandle } from 'react';\nimport { PurchaseVendorAccountDialog } from 'src/dialogs/PurchaseVendorAccountDialog';\nimport { PurchaseVendorAccountActions } from 'src/modals/VendorDetails/components/VendorAccounts/components/VendorAccountsTable/VendorsAccountsTableColumnsConfig';\nimport { useAddVendorAccountActions } from 'src/navigations/Routes/Settings/Views/VendorManagement/Vendors/components/VendorActions/useAddVendorAccountActions';\nimport { OnVendorAccountSavedFn } from 'src/navigations/Routes/Settings/Views/VendorManagement/Vendors/hooks/useAddVendorAccount';\nimport { PurchaseVendorAccount } from 'src/WebApiController';\n\nexport type VendorAccountActionsImperativeRef = PurchaseVendorAccountActions;\n\ninterface VendorAccountsActionsProps {\n vendorAccountsActionsRef: MutableRefObject;\n onVendorAccountSaved: OnVendorAccountSavedFn;\n}\n\nexport const VendorAccountsActions = ({\n vendorAccountsActionsRef,\n onVendorAccountSaved,\n}: VendorAccountsActionsProps) => {\n const {\n onEditVendorAccount,\n venderAccountDialog,\n currentVendorAccount,\n onVendorAccountCancel,\n onSaveVendorAccount,\n } = useAddVendorAccountActions({ onVendorAccountSaved });\n\n useImperativeHandle(\n vendorAccountsActionsRef,\n () => {\n return {\n editVendorAccount: (vendorAccount: PurchaseVendorAccount) => {\n onEditVendorAccount(vendorAccount);\n },\n };\n },\n [onEditVendorAccount]\n );\n\n return (\n <>\n {currentVendorAccount && (\n \n )}\n \n );\n};\n","import { IconButton } from 'src/components/Buttons';\nimport { Stack } from 'src/core/ui';\nimport { PurchaseVendorAccountWithActions } from 'src/modals/VendorDetails/components/VendorAccounts/components/VendorAccountsTable/VendorsAccountsTableColumnsConfig';\nimport { EditIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\ninterface VendorAccountsActionsCellProps {\n vendorAccountWithActions: PurchaseVendorAccountWithActions | null;\n}\n\nexport const VendorAccountsActionsCell = ({\n vendorAccountWithActions,\n}: VendorAccountsActionsCellProps) => {\n if (!vendorAccountWithActions) {\n return null;\n }\n\n return (\n \n }\n onClick={() =>\n vendorAccountWithActions?.vendorAccountActions.editVendorAccount(\n vendorAccountWithActions.vendorAccount\n )\n }\n titleContentId={ContentId.Edit}\n />\n \n );\n};\n","export enum VendorsAccountsTableColumnId {\n VendorAccount = 'name',\n Email = 'email',\n Actions = 'actions',\n Password = 'password',\n}\n","import { createColumnHelper } from '@tanstack/react-table';\nimport React, { useState } from 'react';\nimport {\n COLUMN_DEFAULT_SIZE_BASE,\n COLUMN_DEFAULT_SIZE_SM,\n} from 'src/contexts/ColumnResizingContext/ColumnResizingContext.types';\nimport { Content } from 'src/contexts/ContentContext';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { TableHeaderCellDiv } from 'src/core/ui/TableHeaderCellDiv';\nimport { VendorAccountsActionsCell } from 'src/modals/VendorDetails/components/VendorAccounts/components/VendorAccountsTable/VendorAccountsActionsCell';\nimport { VendorsAccountsTableColumnId } from 'src/modals/VendorDetails/components/VendorAccounts/components/VendorAccountsTable/vendorsAccountsColumnUtils.types';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { PurchaseVendorAccount } from 'src/WebApiController';\nimport { HideIcon, UnHideIcon } from 'src/svgs/Viagogo';\n\nexport type PurchaseVendorAccountActions = {\n editVendorAccount: (vendorAccount: PurchaseVendorAccount) => void;\n};\n\nexport type PurchaseVendorAccountWithActions = {\n vendorAccount: PurchaseVendorAccount;\n vendorAccountActions: PurchaseVendorAccountActions;\n};\n\nconst columnHelper =\n createColumnHelper();\nexport const VENDORS_ACCOUNTS_TABLE_COLUMNS_CONFIG = {\n [VendorsAccountsTableColumnId.VendorAccount]: columnHelper.accessor(\n (data) => data?.vendorAccount?.name,\n {\n id: VendorsAccountsTableColumnId.VendorAccount,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_DEFAULT_SIZE_BASE,\n maxSize: COLUMN_DEFAULT_SIZE_BASE,\n enableSorting: false,\n enableResizing: false,\n cell: function Cell({ getValue }) {\n return {getValue()};\n },\n }\n ),\n [VendorsAccountsTableColumnId.Email]: columnHelper.accessor(\n (data) => data?.vendorAccount?.email,\n {\n id: VendorsAccountsTableColumnId.Email,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_DEFAULT_SIZE_BASE,\n maxSize: COLUMN_DEFAULT_SIZE_BASE,\n enableSorting: false,\n enableResizing: false,\n cell: function Cell({ getValue }) {\n return {getValue()};\n },\n }\n ),\n [VendorsAccountsTableColumnId.Password]: columnHelper.accessor(\n (data) => data?.vendorAccount?.password,\n {\n id: VendorsAccountsTableColumnId.Password,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_DEFAULT_SIZE_BASE,\n maxSize: COLUMN_DEFAULT_SIZE_BASE,\n enableSorting: false,\n enableResizing: false,\n cell: function Cell({ getValue }) {\n const [showPassword, setShowPassword] = React.useState(false);\n const password = getValue();\n return (\n \n {password ? (\n <>\n \n {showPassword ? password : '••••••'}\n \n setShowPassword(!showPassword)}\n style={{\n marginLeft: '8px',\n background: 'none',\n border: 'none',\n cursor: 'pointer'\n }}\n >\n {showPassword ? : }\n \n ) : ('')\n }\n \n );\n },\n }\n ),\n [VendorsAccountsTableColumnId.Actions]: columnHelper.accessor(() => null, {\n id: VendorsAccountsTableColumnId.Actions,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_SM,\n minSize: COLUMN_DEFAULT_SIZE_SM,\n maxSize: COLUMN_DEFAULT_SIZE_SM,\n enableSorting: false,\n enableResizing: false,\n cell: function Cell({ row: { original } }) {\n return (\n \n \n \n );\n },\n }),\n};\n","import { TableOptions } from '@tanstack/react-table';\nimport { CSSProperties, useMemo, useRef } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { Stack } from 'src/core/ui';\nimport { useGetFilteredAccessibleVendorAccountsQuery } from 'src/hooks/api/useGetFilteredAccessibleVendorAccountsQuery';\nimport {\n VendorAccountActionsImperativeRef,\n VendorAccountsActions,\n} from 'src/modals/VendorDetails/components/VendorAccounts/components/VendorAccountsTable/VendorAccountActions';\nimport {\n PurchaseVendorAccountWithActions,\n VENDORS_ACCOUNTS_TABLE_COLUMNS_CONFIG,\n} from 'src/modals/VendorDetails/components/VendorAccounts/components/VendorAccountsTable/VendorsAccountsTableColumnsConfig';\nimport { OnVendorAccountSavedFn } from 'src/navigations/Routes/Settings/Views/VendorManagement/Vendors/hooks/useAddVendorAccount';\nimport { Table } from 'src/tables/Table';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { PurchaseVendorAccount } from 'src/WebApiController';\n\nconst getRowId = (\n row: PurchaseVendorAccountWithActions | null,\n index: number\n) => (row?.vendorAccount?.id ?? index).toString();\n\nconst columns = Object.values(VENDORS_ACCOUNTS_TABLE_COLUMNS_CONFIG);\n\nconst tableWrapperStyle: CSSProperties = { height: '100% ' };\nconst disabledPaginationStyles: CSSProperties = {\n position: 'sticky',\n top: '0',\n zIndex: '10',\n};\n\ninterface VendorAccountsTableProps {\n vendorAccountsQuery: ReturnType<\n typeof useGetFilteredAccessibleVendorAccountsQuery\n >;\n onVendorAccountSaved: OnVendorAccountSavedFn;\n}\n\nexport const VendorAccountsTable = ({\n vendorAccountsQuery,\n onVendorAccountSaved,\n}: VendorAccountsTableProps) => {\n const vendorAccounts = vendorAccountsQuery.data;\n\n const refActions = useRef(null);\n\n const purchaseVendorAccountWithActions = useMemo<\n PurchaseVendorAccountWithActions[]\n >(() => {\n return (vendorAccounts ?? []).map((va: PurchaseVendorAccount) => ({\n vendorAccount: va,\n vendorAccountActions: {\n editVendorAccount: (vendorAccount: PurchaseVendorAccount) => {\n refActions.current?.editVendorAccount(vendorAccount);\n },\n },\n }));\n }, [vendorAccounts]);\n\n const options: Partial<\n TableOptions\n > = useMemo(\n () => ({\n data: purchaseVendorAccountWithActions,\n columns: columns,\n getRowId: getRowId,\n }),\n [purchaseVendorAccountWithActions]\n );\n\n if (!vendorAccountsQuery.isFetching && (vendorAccounts ?? []).length === 0) {\n return (\n \n \n \n );\n }\n\n return (\n
    \n \n {vendorAccountsQuery.isFetching && (\n
    \n \n \n )}\n \n }\n />\n \n \n );\n};\n","import { useCallback } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { PurchaseVendorAccountDialog } from 'src/dialogs/PurchaseVendorAccountDialog';\nimport { useAddVendorAccountActions } from 'src/navigations/Routes/Settings/Views/VendorManagement/Vendors/components/VendorActions/useAddVendorAccountActions';\nimport { OnVendorAccountSavedFn } from 'src/navigations/Routes/Settings/Views/VendorManagement/Vendors/hooks/useAddVendorAccount';\nimport { IconsFill, PlusIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { PurchaseVendor } from 'src/WebApiController';\n\ninterface AddVendorAccountProps {\n vendor: PurchaseVendor;\n onVendorAccountSaved: OnVendorAccountSavedFn;\n}\n\nexport const AddVendorAccount = ({\n vendor,\n onVendorAccountSaved,\n}: AddVendorAccountProps) => {\n const {\n currentVendorAccount,\n onAddNewVendorAccount,\n onSaveVendorAccount,\n onVendorAccountCancel,\n venderAccountDialog,\n } = useAddVendorAccountActions({ onVendorAccountSaved });\n\n const vendorId = vendor.id;\n const addVendorAccount = useCallback(() => {\n onAddNewVendorAccount(vendorId);\n }, [onAddNewVendorAccount, vendorId]);\n\n return (\n <>\n \n {currentVendorAccount && (\n \n )}\n \n );\n};\n","import { useCallback, useState } from 'react';\nimport { BulkEditStatusPopover } from 'src/components/common/BulkActions/BulkEditStatusPopover';\nimport { Content } from 'src/contexts/ContentContext';\nimport { shared } from 'src/core/themes';\nimport { Card, Stack } from 'src/core/ui';\nimport { useGetFilteredAccessibleVendorAccountsQuery } from 'src/hooks/api/useGetFilteredAccessibleVendorAccountsQuery';\nimport { useInvalidateGetVendorQuery } from 'src/hooks/api/useInvalidateGetVendorQuery';\nimport { FilterVendorAccountsInput } from 'src/modals/VendorDetails/components/VendorAccounts/components/FilterVendorAccountsInput';\nimport { VendorAccountsTable } from 'src/modals/VendorDetails/components/VendorAccounts/components/VendorAccountsTable/VendorAccountsTable';\nimport { vendorsPageHeaderWrapper } from 'src/navigations/Routes/Settings/Views/VendorManagement/Vendors/components/VendorsPageHeader/VendorsPageHeader.css';\nimport { OnVendorAccountSavedFn } from 'src/navigations/Routes/Settings/Views/VendorManagement/Vendors/hooks/useAddVendorAccount';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ActionOutboxEntityType, PurchaseVendor } from 'src/WebApiController';\n\nimport { AddVendorAccount } from './components/AddVendorAccount';\nimport * as styles from './VendorAccounts.css';\n\ninterface VendorAccountsProps {\n vendor: PurchaseVendor;\n}\n\nexport const VendorAccounts = ({ vendor }: VendorAccountsProps) => {\n const [vendorAccountsSerchText, setVendorAccountsSerchText] =\n useState('');\n const vendorAccountsQuery = useGetFilteredAccessibleVendorAccountsQuery(\n [vendor.id],\n vendorAccountsSerchText\n );\n const invalidateGetVendorQuery = useInvalidateGetVendorQuery();\n\n const { refreshSearch, updateVendorAccount } = vendorAccountsQuery;\n\n const onVendorAccountSaved = useCallback(\n ({ vendorAccount, isNew }) => {\n if (isNew) {\n refreshSearch();\n invalidateGetVendorQuery();\n return;\n }\n updateVendorAccount(vendorAccount);\n },\n [invalidateGetVendorQuery, refreshSearch, updateVendorAccount]\n );\n\n return (\n \n
    \n \n
    \n {' '}\n \n ({vendor.vendAccCounts})\n \n
    \n \n \n \n \n \n
    \n
    \n \n \n \n
    \n );\n};\n","import { useQueryClient } from '@tanstack/react-query';\nimport { useCallback, useState } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { GET_VENDOR_QUERY_KEY } from 'src/hooks/api/useGetVendor';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ApiException,\n PurchaseClient,\n PurchaseVendor,\n} from 'src/WebApiController';\n\ninterface UseAddVendorProps {\n onVendorSaved: (vendor: PurchaseVendor) => void;\n}\n\nexport const useAddVendor = (props?: UseAddVendorProps) => {\n const onVendorSaved = props?.onVendorSaved;\n const [currentVendor, setCurrentVendor] = useState();\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n const vendorDialog = useBasicDialog();\n const { launchDialog, closeDialog } = vendorDialog;\n const [isLoading, setIsLoading] = useState(false);\n const queryClient = useQueryClient();\n\n const onVendorCancel = useCallback(() => {\n closeDialog();\n setCurrentVendor(undefined);\n }, [closeDialog]);\n\n const onSaveVendor = useCallback(\n async (vendor: PurchaseVendor) => {\n setIsLoading(true);\n await tryInvokeApi(\n async () => {\n const newId = await new PurchaseClient(\n activeAccountWebClientConfig\n ).mergeVendor(vendor);\n\n if (newId) {\n await onVendorSaved?.(vendor);\n queryClient.invalidateQueries({\n queryKey: [\n GET_VENDOR_QUERY_KEY,\n activeAccountWebClientConfig.activeAccountId,\n newId,\n ],\n });\n } else {\n // This should never happen\n // Normal errors would have fallen to the error catch\n showErrorDialog(\n 'PurchaseClient.mergeVendor',\n {\n message: 'Unable to create or save vendor ' + vendor.id,\n status: 500,\n } as ApiException,\n {\n trackErrorData: vendor,\n }\n );\n }\n },\n (error) => {\n showErrorDialog('PurchaseClient.mergeVendor', error, {\n trackErrorData: vendor,\n });\n },\n () => {\n setIsLoading(false);\n onVendorCancel();\n }\n );\n },\n [\n activeAccountWebClientConfig,\n onVendorSaved,\n queryClient,\n showErrorDialog,\n onVendorCancel,\n ]\n );\n\n const onEditVendor = useCallback(\n (vendor: PurchaseVendor) => {\n setCurrentVendor(vendor);\n launchDialog();\n },\n [launchDialog]\n );\n\n return {\n currentVendor,\n onEditVendor,\n onSaveVendor,\n onVendorCancel,\n vendorDialog,\n isLoading,\n };\n};\n","import { useCallback } from 'react';\nimport { useInvalidateGetAccessibleVendorsQuery } from 'src/hooks/api/useInvalidateGetAccessibleVendorsQuery';\nimport { useInvalidateGetVendorQuery } from 'src/hooks/api/useInvalidateGetVendorQuery';\nimport { useAddVendor } from 'src/navigations/Routes/Settings/Views/VendorManagement/Vendors/hooks/useAddVendor';\n\nexport const useAddVendorActions = () => {\n const invalidateGetAccessibleVendorsQuery =\n useInvalidateGetAccessibleVendorsQuery();\n const invalidateGetVendorQuery = useInvalidateGetVendorQuery();\n\n const onVendorSaved = useCallback(async () => {\n await Promise.all([\n invalidateGetAccessibleVendorsQuery(),\n invalidateGetVendorQuery(),\n ]);\n }, [invalidateGetAccessibleVendorsQuery, invalidateGetVendorQuery]);\n\n return useAddVendor({ onVendorSaved });\n};\n","import clsx from 'clsx';\nimport { IconButton } from 'src/components/Buttons';\nimport { typography } from 'src/core/themes/shared.css';\nimport { Stack } from 'src/core/ui';\nimport { PurchaseVendorDialog } from 'src/dialogs/PurchaseVendorDialog';\nimport * as styles from 'src/modals/ColumnSettings/ColumnSettings.css';\nimport { SummaryWrapper } from 'src/modals/common/Summary/SummaryWrapper';\nimport { useAddVendorActions } from 'src/navigations/Routes/Settings/Views/VendorManagement/Vendors/components/VendorActions/useAddVendorActions';\nimport { EditIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { PurchaseVendor } from 'src/WebApiController';\n\nimport * as vendorSummaryStyles from './VendorSummary.css';\n\ninterface VendorSummaryProps {\n vendor: PurchaseVendor;\n onVendorDeleted: () => void;\n}\n\nexport const VendorSummary = ({\n vendor,\n onVendorDeleted,\n}: VendorSummaryProps) => {\n const {\n onEditVendor,\n currentVendor,\n vendorDialog,\n onVendorCancel,\n onSaveVendor,\n } = useAddVendorActions();\n\n return (\n <>\n \n \n
    \n {vendor.name}\n
    \n\n \n onEditVendor(vendor)}\n icon={}\n titleContentId={ContentId.Edit}\n />\n {/* NOT IMPLEMENTED IN THE BE YET */}\n {/**/}\n \n \n
    \n {currentVendor && (\n \n )}\n \n );\n};\n","import { useCallback, useEffect } from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { ReloadButton } from 'src/components/Buttons';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Button, Stack } from 'src/core/ui';\nimport { PurchaseVendorDeliveryOverrideInput } from 'src/dialogs/PurchaseVendorDialog';\nimport { useGetVendor } from 'src/hooks/api/useGetVendor';\nimport { useAddVendor } from 'src/navigations/Routes/Settings/Views/VendorManagement/Vendors/hooks/useAddVendor';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { PurchaseVendor } from 'src/WebApiController';\n\ninterface VendorAutoFulfillProps {\n vendor: PurchaseVendor;\n}\n\nexport const VendorDeliveryOverrideForm = ({\n vendor,\n}: VendorAutoFulfillProps) => {\n const methods = useForm({\n defaultValues: vendor,\n values: vendor,\n });\n\n useEffect(() => {\n methods.reset(vendor);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [vendor]);\n\n const { isFetching } = useGetVendor(vendor.id);\n const { onSaveVendor, isLoading: isMutationLoading } = useAddVendor();\n\n const onReset = useCallback(() => {\n methods.reset();\n }, [methods]);\n\n const {\n formState: { isDirty },\n } = methods;\n\n return (\n \n \n \n {isDirty && (\n \n \n\n {\n onSaveVendor(methods.getValues());\n }}\n disabled={isMutationLoading || isFetching}\n >\n \n \n \n )}\n \n \n );\n};\n","import { useContext } from 'react';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { Stack } from 'src/core/ui';\nimport { VendorAccounts } from 'src/modals/VendorDetails/components/VendorAccounts/VendorAccounts';\nimport { VendorSummary } from 'src/modals/VendorDetails/VendorSummary';\nimport { PurchaseVendor } from 'src/WebApiController';\n\nimport { VendorDeliveryOverrideForm } from './VendorDeliveryOverrideForm';\n\ninterface VendorDetailsBodyContentProps {\n vendor: PurchaseVendor;\n}\n\nexport const VendorDetailsBodyContent = ({\n vendor,\n}: VendorDetailsBodyContentProps) => {\n const { closeModal } = useContext(ModalContext);\n\n return (\n \n \n \n \n \n );\n};\n","import clsx from 'clsx';\nimport { useContext } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { typography } from 'src/core/themes/shared.css';\nimport * as styles from 'src/modals/ColumnSettings/ColumnSettings.css';\nimport { ModalHeader } from 'src/modals/Modal';\nimport * as vendorDetailsStyles from 'src/modals/VendorDetails/VendorDetails.css';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nexport const VendorDetailsModalHeader = () => {\n const { closeModal } = useContext(ModalContext);\n\n return (\n \n
    \n
    \n \n
    \n
    \n
    \n );\n};\n","import { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { useGetVendor } from 'src/hooks/api/useGetVendor';\nimport { ModalBody } from 'src/modals/Modal';\nimport { ModalBodyDataContainer } from 'src/modals/Modal/Modal.styled';\nimport { VendorDetailsBodyContent } from 'src/modals/VendorDetails/VendorDetailsBodyContent';\nimport { VendorDetailsModalHeader } from 'src/modals/VendorDetails/VendorDetailsModalHeader';\nimport { useGetVendorIdFromUrl } from 'src/navigations/Routes/Settings/Views/VendorManagement/Vendors/hooks/useGetVendorIdFromUrl';\n\nexport const VendorDetailsModalBody = () => {\n const vendorId = useGetVendorIdFromUrl();\n const { isLoading, data: vendor } = useGetVendor(vendorId);\n const hasData = !!vendor;\n\n return (\n \n \n \n {isLoading ? (\n \n ) : (\n hasData && \n )}\n \n \n );\n};\n","import { VendorDetailsModalBody } from 'src/modals/VendorDetails/VendorDetailsModalBody';\nimport { VendorIdQueryParam } from 'src/utils/constants/constants';\n\nexport const VendorDetailsModalConfig = {\n children: ,\n clickOutsideToClose: true,\n deepLinkKey: VendorIdQueryParam,\n deepLinkValue: undefined,\n size: 'slide-in',\n};\n","import { VendorDetailsModalConfig } from 'src/modals/VendorDetails';\n\nexport const getVendorDetailsModalConfigWithDeepLink = (vendorId: number) => {\n return {\n ...VendorDetailsModalConfig,\n deepLinkValue: vendorId,\n };\n};\n","import { useCallback, useContext } from 'react';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { useGetVendorIdFromUrl } from 'src/navigations/Routes/Settings/Views/VendorManagement/Vendors/hooks/useGetVendorIdFromUrl';\nimport { getVendorDetailsModalConfigWithDeepLink } from 'src/utils/vendorUtils';\n\nexport const useOpenVendorDetailsModal = () => {\n const { setModal } = useContext(ModalContext);\n const activeVendorId = useGetVendorIdFromUrl();\n\n const openVendorDetailsModal = useCallback(\n (vendorId: number) => {\n setModal(getVendorDetailsModalConfigWithDeepLink(vendorId));\n },\n [setModal]\n );\n\n const openVendorDetailsModalFromUrl = useCallback(() => {\n if (activeVendorId) {\n openVendorDetailsModal(activeVendorId);\n }\n }, [activeVendorId, openVendorDetailsModal]);\n\n return {\n openVendorDetailsModal,\n openVendorDetailsModalFromUrl,\n };\n};\n","import { MutableRefObject, useImperativeHandle } from 'react';\nimport { PurchaseVendorAccountDialog } from 'src/dialogs/PurchaseVendorAccountDialog';\nimport { PurchaseVendorDialog } from 'src/dialogs/PurchaseVendorDialog';\nimport { useAddVendorAccountActions } from 'src/navigations/Routes/Settings/Views/VendorManagement/Vendors/components/VendorActions/useAddVendorAccountActions';\nimport { useAddVendorActions } from 'src/navigations/Routes/Settings/Views/VendorManagement/Vendors/components/VendorActions/useAddVendorActions';\nimport { useOpenVendorDetailsModal } from 'src/navigations/Routes/Settings/Views/VendorManagement/Vendors/components/VendorActions/useOpenVendorDetailsModal';\nimport { PurchaseVendorActions } from 'src/navigations/Routes/Settings/Views/VendorManagement/Vendors/components/VendorsTable/VendorsTableColumnsConfig';\nimport { PurchaseVendor } from 'src/WebApiController';\n\nexport type PurchaseVendorActionsImperativeRef = PurchaseVendorActions;\n\ninterface PurchaseVendorActionsProps {\n vendorActionsRef: MutableRefObject;\n}\n\nexport const VendorActions = ({\n vendorActionsRef,\n}: PurchaseVendorActionsProps) => {\n const {\n onVendorCancel,\n onSaveVendor,\n vendorDialog,\n currentVendor,\n onEditVendor,\n } = useAddVendorActions();\n\n const {\n currentVendorAccount,\n onSaveVendorAccount,\n onVendorAccountCancel,\n venderAccountDialog,\n onAddNewVendorAccount,\n } = useAddVendorAccountActions();\n\n const { openVendorDetailsModal } = useOpenVendorDetailsModal();\n\n useImperativeHandle(\n vendorActionsRef,\n () => {\n return {\n editVendor: onEditVendor,\n viewVendorDetails: (vendor: PurchaseVendor) => {\n openVendorDetailsModal(vendor.id);\n },\n addNewVendorAccount: (vendor: PurchaseVendor) => {\n onAddNewVendorAccount(vendor.id);\n },\n };\n },\n [onAddNewVendorAccount, onEditVendor, openVendorDetailsModal]\n );\n\n return (\n <>\n {currentVendor && (\n \n )}\n {currentVendorAccount && (\n \n )}\n \n );\n};\n","import { useCallback, useState } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { vars } from 'src/core/themes';\nimport { Button } from 'src/core/ui';\nimport { PurchaseVendorDialog } from 'src/dialogs/PurchaseVendorDialog';\nimport { useBasicDialog } from 'src/hooks/useBasicDialog';\nimport { IconsFill, PlusIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ApiException,\n PurchaseClient,\n PurchaseVendor,\n} from 'src/WebApiController';\n\ninterface AddVendorAccountProps {\n onVendorAdded?: () => void;\n}\n\nexport const AddVendorButton = ({ onVendorAdded }: AddVendorAccountProps) => {\n const vendorDialog = useBasicDialog();\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n const [currentVendor, setCurrentVendor] = useState();\n\n const onAddNewVendor = useCallback(() => {\n setCurrentVendor({\n id: -1,\n name: '',\n isGlobal: false,\n delivType: null,\n isNoFulfill: null,\n tktTypeRules: null,\n vendAccCounts: 0,\n });\n vendorDialog.launchDialog();\n }, [vendorDialog]);\n\n const onSaveVendor = useCallback(\n async (vendor: PurchaseVendor) => {\n await tryInvokeApi(\n async () => {\n const newId = await new PurchaseClient(\n activeAccountWebClientConfig\n ).mergeVendor(vendor);\n\n if (newId) {\n onVendorAdded?.();\n vendorDialog.closeDialog();\n setCurrentVendor(undefined);\n } else {\n // This should never happen\n // Normal errors would have fallen to the error catch\n showErrorDialog(\n 'PurchaseClient.mergeVendor',\n {\n message: 'Unable to create or save vendor ' + vendor.id,\n status: 500,\n } as ApiException,\n {\n trackErrorData: vendor,\n }\n );\n }\n },\n (error) => {\n showErrorDialog('PurchaseClient.mergeVendor', error, {\n trackErrorData: vendor,\n });\n }\n );\n },\n [activeAccountWebClientConfig, onVendorAdded, vendorDialog, showErrorDialog]\n );\n\n const onVendorCancel = useCallback(() => {\n setCurrentVendor(undefined);\n vendorDialog.closeDialog();\n }, [vendorDialog]);\n\n return (\n <>\n \n {currentVendor && (\n \n )}\n \n );\n};\n","import { Content, useContent } from 'src/contexts/ContentContext';\nimport { shared } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { AddVendorButton } from 'src/navigations/Routes/Settings/Views/VendorManagement/Vendors/components/AddVendorButton';\nimport { FilterInput } from 'src/navigations/Routes/Settings/Views/VendorManagement/Vendors/components/FilterInput';\nimport { vendorsPageHeaderWrapper } from 'src/navigations/Routes/Settings/Views/VendorManagement/Vendors/components/VendorsPageHeader/VendorsPageHeader.css';\nimport { ContentId } from 'src/utils/constants/contentId';\n\ninterface VendorsPageHeaderProps {\n disableSearch: boolean;\n onVendorAdded: () => void;\n onSearchTextChanged: (searchText: string) => void;\n}\n\nexport const VendorsPageHeader = ({\n disableSearch,\n onVendorAdded,\n onSearchTextChanged,\n}: VendorsPageHeaderProps) => {\n const vendors = useContent(ContentId.Vendors);\n return (\n
    \n \n
    \n \n
    \n \n \n \n \n
    \n
    \n );\n};\n","export enum VendorsTableColumnId {\n Vendor = 'name',\n TotalAccounts = 'totalAccounts',\n AccountType = 'accountType',\n Actions = 'actions',\n}\n","import { Content } from 'src/contexts/ContentContext';\nimport { PosPill } from 'src/core/POS/PosPill';\nimport { PosPillVariant } from 'src/core/POS/PosPill/PosPill';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nexport type type = 'custom' | 'system';\n\ninterface AccountTypeProps {\n type: type;\n}\n\nexport const AccountType = ({ type }: AccountTypeProps) => {\n return (\n \n \n \n );\n};\n","import { IconButton } from 'src/components/Buttons';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { PurchaseVendorsWithActions } from 'src/navigations/Routes/Settings/Views/VendorManagement/Vendors/components/VendorsTable/VendorsTableColumnsConfig';\nimport { OpenLinkIcon } from 'src/svgs';\nimport { EditIcon, PlusIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\ninterface VendorActionsCellProps {\n vendorWithActions: PurchaseVendorsWithActions | null;\n}\n\nexport const VendorActionsCell = ({\n vendorWithActions,\n}: VendorActionsCellProps) => {\n if (!vendorWithActions) {\n return null;\n }\n\n return (\n \n }\n onClick={() =>\n vendorWithActions.vendorActions.addNewVendorAccount(\n vendorWithActions.vendor\n )\n }\n titleContentId={ContentId.AddAccountAction}\n />\n \n }\n onClick={() =>\n vendorWithActions.vendorActions.viewVendorDetails(\n vendorWithActions.vendor\n )\n }\n titleContentId={ContentId.ViewDetails}\n />\n }\n onClick={() =>\n vendorWithActions.vendorActions.editVendor(vendorWithActions.vendor)\n }\n titleContentId={ContentId.Edit}\n />\n \n );\n};\n","import { createColumnHelper } from '@tanstack/react-table';\nimport {\n COLUMN_DEFAULT_SIZE_BASE,\n COLUMN_DEFAULT_SIZE_SM,\n COLUMN_DEFAULT_SIZE_XS,\n COLUMN_MAX_SIZE,\n COLUMN_MIN_SIZE,\n} from 'src/contexts/ColumnResizingContext/ColumnResizingContext.types';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { TableHeaderCellDiv } from 'src/core/ui/TableHeaderCellDiv';\nimport { AccountType } from 'src/navigations/Routes/Settings/Views/VendorManagement/Vendors/components/AccountStatus/AccountType';\nimport { VendorActionsCell } from 'src/navigations/Routes/Settings/Views/VendorManagement/Vendors/components/VendorsTable/VendorActionsCell';\nimport { VendorsTableColumnId } from 'src/navigations/Routes/Settings/Views/VendorManagement/Vendors/components/VendorsTable/vendorsColumnUtils.types';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { PurchaseVendor } from 'src/WebApiController';\n\nexport type PurchaseVendorActions = {\n addNewVendorAccount: (vendor: PurchaseVendor) => void;\n viewVendorDetails: (vendor: PurchaseVendor) => void;\n editVendor: (vendor: PurchaseVendor) => void;\n};\n\nexport type PurchaseVendorsWithActions = {\n vendor: PurchaseVendor;\n vendorActions: PurchaseVendorActions;\n};\n\nconst columnHelper = createColumnHelper();\nexport const VENDORS_TABLE_COLUMNS_CONFIG = {\n [VendorsTableColumnId.Vendor]: columnHelper.accessor(\n (data) => data?.vendor?.name,\n {\n id: VendorsTableColumnId.Vendor,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue }) {\n return {getValue()};\n },\n }\n ),\n [VendorsTableColumnId.TotalAccounts]: columnHelper.accessor(\n (data) => data?.vendor?.vendAccCounts ?? 0,\n {\n id: VendorsTableColumnId.TotalAccounts,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_XS,\n minSize: COLUMN_DEFAULT_SIZE_XS,\n maxSize: COLUMN_MIN_SIZE,\n cell: function Cell({ getValue }) {\n return {getValue()};\n },\n }\n ),\n [VendorsTableColumnId.AccountType]: columnHelper.accessor(\n (data) => data?.vendor?.isGlobal ?? false,\n {\n id: VendorsTableColumnId.AccountType,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_SM,\n minSize: COLUMN_DEFAULT_SIZE_SM,\n maxSize: COLUMN_MIN_SIZE,\n cell: function Cell({ getValue }) {\n const systemText = useContent(ContentId.System);\n const customText = useContent(ContentId.Custom);\n return (\n \n \n \n );\n },\n }\n ),\n [VendorsTableColumnId.Actions]: columnHelper.accessor(() => null, {\n id: VendorsTableColumnId.Actions,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_SM,\n minSize: COLUMN_DEFAULT_SIZE_XS,\n maxSize: COLUMN_DEFAULT_SIZE_SM,\n enableSorting: false,\n enableResizing: false,\n cell: function Cell({ row: { original } }) {\n return (\n \n \n \n );\n },\n }),\n};\n","import {\n functionalUpdate,\n SortingState,\n TableOptions,\n} from '@tanstack/react-table';\nimport { useMemo, useState } from 'react';\nimport { VendorsTableColumnId } from 'src/navigations/Routes/Settings/Views/VendorManagement/Vendors/components/VendorsTable/vendorsColumnUtils.types';\nimport {\n PurchaseVendorsWithActions,\n VENDORS_TABLE_COLUMNS_CONFIG,\n} from 'src/navigations/Routes/Settings/Views/VendorManagement/Vendors/components/VendorsTable/VendorsTableColumnsConfig';\nimport { Table } from 'src/tables/Table';\n\nconst getRowId = (row: PurchaseVendorsWithActions | null, index: number) =>\n (row?.vendor?.id ?? index).toString();\n\nconst columns = Object.values(VENDORS_TABLE_COLUMNS_CONFIG);\n\ninterface VendorsTableProps {\n vendors: PurchaseVendorsWithActions[];\n}\n\nexport const VendorsTable = ({ vendors }: VendorsTableProps) => {\n const [sorting, setSorting] = useState([\n { id: VendorsTableColumnId.TotalAccounts, desc: true },\n ]);\n\n const options: Partial> =\n useMemo(\n () => ({\n data: vendors,\n columns: columns,\n state: {\n sorting,\n },\n onSortingChange: (sortingUpdaterFn) => {\n const newSortVal = functionalUpdate(sortingUpdaterFn, sorting);\n setSorting(newSortVal);\n },\n getRowId: getRowId,\n }),\n [sorting, vendors]\n );\n\n return
    \n \n \n \n
    ;\n};\n","import { useMemo } from 'react';\nimport { useFlexSearchIndex } from 'src/hooks/useFlexSearchIndex';\nimport { PurchaseVendorsWithActions } from 'src/navigations/Routes/Settings/Views/VendorManagement/Vendors/components/VendorsTable/VendorsTableColumnsConfig';\n\ninterface UseGetFilteredVendorsProps {\n vendors: PurchaseVendorsWithActions[] | undefined;\n searchText: string;\n}\n\nexport const useGetFilteredVendors = ({\n vendors = [],\n searchText,\n}: UseGetFilteredVendorsProps): PurchaseVendorsWithActions[] => {\n const { vendorOptionsContent, vendorIdsMap } = useMemo(() => {\n const vendorIdsMap: Record = {};\n const vendorOptionsContent: Record = {};\n\n vendors?.forEach((vendorWithActions) => {\n const vendorId = vendorWithActions.vendor.id;\n vendorOptionsContent[vendorId] = vendorWithActions.vendor.name;\n vendorIdsMap[vendorId] = vendorWithActions;\n });\n\n return {\n vendorIdsMap,\n vendorOptionsContent,\n };\n }, [vendors]);\n\n const { flexSearchIndex } = useFlexSearchIndex(\n vendorOptionsContent,\n Object.keys(vendorOptionsContent).length > 0,\n true\n );\n\n const filteredVendorIds = useMemo(() => {\n if (!searchText || !flexSearchIndex || !vendors) {\n return [];\n }\n\n return (flexSearchIndex.search(searchText) as string[]).map(Number);\n }, [flexSearchIndex, searchText, vendors]);\n\n return useMemo(() => {\n if (!searchText) {\n return vendors;\n }\n\n if (filteredVendorIds.length === 0) {\n return [];\n }\n\n const filteredVendors: PurchaseVendorsWithActions[] = [];\n for (const vendorId of filteredVendorIds) {\n filteredVendors.push(vendorIdsMap[vendorId]);\n }\n return filteredVendors;\n }, [filteredVendorIds, searchText, vendorIdsMap, vendors]);\n};\n","import { useEffect, useMemo, useRef, useState } from 'react';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { Card } from 'src/core/ui';\nimport { useGetAccessibleVendorsQuery } from 'src/hooks/api/useGetAccessibleVendorsQuery';\nimport { useOpenVendorDetailsModal } from 'src/navigations/Routes/Settings/Views/VendorManagement/Vendors/components/VendorActions/useOpenVendorDetailsModal';\nimport {\n PurchaseVendorActionsImperativeRef,\n VendorActions,\n} from 'src/navigations/Routes/Settings/Views/VendorManagement/Vendors/components/VendorActions/VendorActions';\nimport { VendorsPageHeader } from 'src/navigations/Routes/Settings/Views/VendorManagement/Vendors/components/VendorsPageHeader/VendorsPageHeader';\nimport { VendorsTable } from 'src/navigations/Routes/Settings/Views/VendorManagement/Vendors/components/VendorsTable/VendorsTable';\nimport {\n PurchaseVendorActions,\n PurchaseVendorsWithActions,\n} from 'src/navigations/Routes/Settings/Views/VendorManagement/Vendors/components/VendorsTable/VendorsTableColumnsConfig';\nimport { useGetFilteredVendors } from 'src/navigations/Routes/Settings/Views/VendorManagement/Vendors/hooks/useGetFilteredVendors';\nimport { PurchaseVendor } from 'src/WebApiController';\n\nexport const Vendors = () => {\n const refActions = useRef(null);\n const [searchText, setSearchText] = useState('');\n const vendorsQuery = useGetAccessibleVendorsQuery({\n getOverride: false,\n getVendorAccountsCount: true,\n });\n const allVendors = vendorsQuery.data;\n\n const { openVendorDetailsModalFromUrl } = useOpenVendorDetailsModal();\n\n useEffect(() => {\n openVendorDetailsModalFromUrl();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const vendorsWithActions: PurchaseVendorsWithActions[] = useMemo(() => {\n const purchaseVendorActions: PurchaseVendorActions = {\n editVendor: (vendor: PurchaseVendor) => {\n refActions.current?.editVendor(vendor);\n },\n viewVendorDetails: (vendor: PurchaseVendor) => {\n refActions.current?.viewVendorDetails(vendor);\n },\n addNewVendorAccount: (vendor: PurchaseVendor) => {\n refActions.current?.addNewVendorAccount(vendor);\n },\n };\n\n return (allVendors ?? []).map(\n (vendor: PurchaseVendor): PurchaseVendorsWithActions => ({\n vendor,\n vendorActions: purchaseVendorActions,\n })\n );\n }, [allVendors]);\n\n const filteredVendors = useGetFilteredVendors({\n vendors: vendorsWithActions,\n searchText,\n });\n\n const isLoading = vendorsQuery.isLoading;\n\n return (\n <>\n \n {isLoading ? (\n \n ) : (\n \n \n \n )}\n \n \n );\n};\n","import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\nimport { useCallback } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n ErrorTypes,\n useErrorBoundaryContext,\n} from 'src/contexts/ErrorBoundaryContext';\nimport { AccountAutoPricingSettingsInputs, SellerAccountClient } from 'src/WebApiController';\n\nexport const useAccountAutoPricingSettings = () => {\n const { activeAccountWebClientConfig } = useAppContext();\n const { showErrorDialog } = useErrorBoundaryContext();\n\n const queryClient = useQueryClient();\n const getQueryKey = [\n 'SellerAccountClient.getAccountAutoPricingSettings',\n activeAccountWebClientConfig.activeAccountId,\n ];\n\n const shouldQuery = activeAccountWebClientConfig.activeAccountId != null;\n const getAccountAutoPricingSettingsQuery = useQuery({\n queryKey: getQueryKey,\n queryFn: async () => {\n if (!shouldQuery) {\n return null;\n }\n const pricingSettings = await new SellerAccountClient(\n activeAccountWebClientConfig\n ).getAccountAutoPricingSettings();\n\n return pricingSettings;\n },\n enabled: shouldQuery,\n refetchOnWindowFocus: false,\n staleTime: 0,\n meta: {\n persist: false,\n\n onError: (error: ErrorTypes) => {\n showErrorDialog('SellerAccountClient.getAccountAutoPricingSettings', error, {\n trackErrorData: {\n activeAccountId: activeAccountWebClientConfig.activeAccountId,\n },\n });\n },\n },\n });\n\n const mergeAccountAutoPricingSettingsMutation = useMutation({\n mutationFn: async ({\n inputs,\n }: {\n inputs: AccountAutoPricingSettingsInputs,\n }) => {\n return await new SellerAccountClient(\n activeAccountWebClientConfig,\n ).mergeAccountAutoPricingSettings(inputs);\n },\n // optimistic ui\n // Reference: https://tanstack.com/query/v3/docs/react/guides/optimistic-updates\n onMutate: ({ inputs }) => {\n queryClient.cancelQueries({ queryKey: getQueryKey });\n const prevValue =\n queryClient.getQueryData(getQueryKey);\n\n queryClient.setQueryData(getQueryKey, inputs);\n return { prevValue };\n },\n onError: (err: ErrorTypes, { inputs }, context) => {\n queryClient.setQueryData(getQueryKey, context?.prevValue);\n showErrorDialog('SellerAccountClient.mergeAccountAutoPricingSettings', err, {\n trackErrorData: { inputs },\n });\n },\n onSettled: () => {\n queryClient.invalidateQueries({ queryKey: getQueryKey });\n },\n });\n\n const onMergeAccountAutoPricingSettings = useCallback(\n async (inputs?: AccountAutoPricingSettingsInputs) => {\n if (!inputs) {\n return;\n }\n\n await mergeAccountAutoPricingSettingsMutation.mutateAsync({\n inputs,\n });\n getAccountAutoPricingSettingsQuery.refetch();\n },\n [mergeAccountAutoPricingSettingsMutation]\n );\n\n return {\n accountAutoPricingSettings: getAccountAutoPricingSettingsQuery.data,\n onMergeAccountAutoPricingSettings,\n isLoading: getAccountAutoPricingSettingsQuery.isLoading,\n isPending:\n getAccountAutoPricingSettingsQuery.isFetching ||\n mergeAccountAutoPricingSettingsMutation.isPending,\n loaded: getAccountAutoPricingSettingsQuery.isFetched,\n };\n};","import { Content } from 'src/contexts/ContentContext';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { Stack } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport * as styles from '../AutoPricing.css';\nimport { useAutoPricingSettingsFormContext } from '../useAutoPricingSettingsFormContext';\n\nexport const AutoPricingCircuitBreakerMaxDiscountVelocityInput = ({\n disabled,\n}: {\n disabled: boolean;\n}) => {\n const { setValue, watch } = useAutoPricingSettingsFormContext();\n\n const {\n circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerMaxDiscountVelocityTicksInHours,\n } = watch();\n\n return (\n \n \n {\n const v = parseFloat(e.target.value);\n if (!isNaN(v)) {\n setValue('circuitBreakerMaxDiscountVelocityPercent', v / 100);\n }\n }}\n />\n \n {\n const v = parseFloat(e.target.value);\n if (!isNaN(v)) {\n setValue('circuitBreakerMaxDiscountVelocityTicksInHours', v);\n }\n }}\n />\n \n \n );\n};\n","import {\n FieldPath,\n FormProvider,\n useForm,\n useFormContext,\n} from 'react-hook-form';\nimport { FormatContent } from 'src/contexts/ContentContext';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport {\n AccountAutoPricingSettingsInputs,\n AutoPricingInputs,\n CompListingQuantityFilters,\n} from 'src/WebApiController';\n\nimport * as styles from '../AutoPricing.css';\nimport { AutoPricingCompQuantitiesSelector } from '../AutoPricingCompQuantitiesSelector/AutoPricingCompQuantitiesSelector';\n\nconst exactMatchPosListingQuantities = [\n ...Array(9)\n .fill(0)\n .map((_, i) => i + 1),\n];\nconst greaterThanOrEqualToPosListingQuantity = 10;\n\nexport const AutoPricingDefaultCompQuantitiesInput = ({\n disabled,\n}: {\n disabled: boolean;\n}) => {\n return (\n
    \n {exactMatchPosListingQuantities.map((posListingQuantity, index) => {\n return (\n \n );\n })}\n\n \n
    \n );\n};\n\nconst AutoPricingDefaultCompQuantitiesPackSelector = ({\n quantityFilterFieldPath,\n posListingQuantity,\n packLabelText,\n disabled,\n}: {\n quantityFilterFieldPath: FieldPath;\n posListingQuantity: number;\n packLabelText: string;\n disabled: boolean;\n}) => {\n const { setValue: outerSetValue, watch: outerWatch } =\n useFormContext();\n\n const quantityFilter = outerWatch(\n quantityFilterFieldPath\n ) as CompListingQuantityFilters;\n\n const {\n control: innerControl,\n watch: innerWatch,\n ...innerMethods\n } = useForm({\n defaultValues: {\n compListingQuantityFilters: quantityFilter?.compQuantityFilters,\n },\n });\n\n innerWatch((autoPricingInputsNew) => {\n outerSetValue(quantityFilterFieldPath, {\n posListingQuantity: posListingQuantity,\n compQuantityFilters:\n autoPricingInputsNew?.compListingQuantityFilters ?? null,\n } as CompListingQuantityFilters);\n });\n\n return (\n \n <>\n
    \n \n
    \n
    \n \n
    \n \n
    \n );\n};\n","import { Slider } from 'src/core/ui/Slider';\n\nimport { useAutoPricingSettingsFormContext } from '../useAutoPricingSettingsFormContext';\n\nexport const AutoPricingMinCompListingsSlider = ({\n disabled,\n}: {\n disabled: boolean;\n}) => {\n const { watch, setValue } = useAutoPricingSettingsFormContext();\n\n const { circuitBreakerMinCompListingCount } = watch();\n\n return (\n {\n setValue('circuitBreakerMinCompListingCount', Math.round(count));\n }}\n disabled={disabled}\n />\n );\n};\n","import { cloneDeep } from 'lodash-es';\nimport { useMemo } from 'react';\nimport { FormProvider, useForm, useFormContext } from 'react-hook-form';\nimport { AutoPricingCircuitBreakerMaxDiscountVelocityInput } from 'src/components/AutoPricing/AutoPricingCircuitBreakerMaxDiscountVelocityInput/AutoPricingCircuitBreakerMaxDiscountVelocityInput';\nimport { AutoPricingDefaultCompQuantitiesInput } from 'src/components/AutoPricing/AutoPricingDefaultCompQuantitiesInput/AutoPricingDefaultCompQuantitiesInput';\nimport { AutoPricingMinCompListingsSlider } from 'src/components/AutoPricing/AutoPricingMinCompListingsSlider/AutoPricingMinCompListingsSlider';\nimport {\n AutoPricingSettingsFormContent,\n PricingSetting,\n} from 'src/components/AutoPricing/AutoPricingSettingsFormContent/AutoPricingSettingsFormContent';\nimport { AutoPricingUnderCutRelativeAndAbsoluteAmountsInput } from 'src/components/AutoPricing/AutoPricingUnderCutRelativeAndAbsoluteAmountsInput/AutoPricingUnderCutRelativeAndAbsoluteAmountsInput';\nimport { Content } from 'src/contexts/ContentContext';\nimport { PosTextField } from 'src/core/POS/PosTextField';\nimport { Switch } from 'src/core/ui';\nimport { Button } from 'src/core/ui';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport {\n AccountAutoPricingSettingsInputs,\n UiCurrency,\n} from 'src/WebApiController';\n\nimport { setValueAsDecimalNumber } from '../../SyncCenter/SyncCenter.utils';\nimport * as styles from './AccountAutoPricingSettingsForm.css';\n\nexport const AccountAutoPricingSettingsForm = ({\n pricingSettings,\n onSaved,\n uiCurrency,\n disabled: disabledProp,\n allowSeatScoreCompListingMode,\n}: {\n pricingSettings: AccountAutoPricingSettingsInputs | null | undefined;\n onSaved?: (\n pricingSettingsNew: AccountAutoPricingSettingsInputs\n ) => Promise;\n uiCurrency: UiCurrency;\n disabled: boolean;\n allowSeatScoreCompListingMode: boolean;\n}) => {\n const methods = useForm({\n defaultValues: pricingSettings ? cloneDeep(pricingSettings) : undefined,\n });\n\n const { handleSubmit } = methods;\n\n const disabled = disabledProp;\n return (\n \n \n \n \n \n }\n headerStyle={{ alignSelf: 'start' }}\n detail={\n \n }\n />\n\n \n \n \n }\n detail={}\n />\n\n }\n detail={\n \n }\n />\n \n }\n pricingProtectionSectionChildren={\n \n }\n advancedSettingsSectionChildren={\n \n }\n />\n\n
    \n onSaved?.(data))}\n >\n \n \n
    \n
    \n );\n};\n\nconst PricingProtectionSettings = ({ disabled }: { disabled: boolean }) => {\n const { register } = useFormContext();\n\n return (\n <>\n }\n detail={\n \n }\n />\n \n );\n};\n\nconst VelocityCircuitBreakerSettings = ({\n disabled,\n}: {\n disabled: boolean;\n}) => {\n const { setValue, watch } =\n useFormContext();\n\n const {\n circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerMaxDiscountVelocityTicksInHours,\n } = watch();\n\n const restrictVelocityOfPriceUpdates = useMemo(() => {\n return (\n !!circuitBreakerMaxDiscountVelocityPercent &&\n !!circuitBreakerMaxDiscountVelocityTicksInHours\n );\n }, [\n circuitBreakerMaxDiscountVelocityPercent,\n circuitBreakerMaxDiscountVelocityTicksInHours,\n ]);\n\n return (\n <>\n }\n detail={\n e.stopPropagation()}\n onCheckedChange={(isChecked) => {\n const restrictVelocityOfPriceUpdatesNew = isChecked;\n if (\n restrictVelocityOfPriceUpdatesNew !==\n restrictVelocityOfPriceUpdates\n ) {\n const circuitBreakerMaxDiscountVelocityPercentNew =\n restrictVelocityOfPriceUpdatesNew ? 0.8 : null;\n const circuitBreakerMaxDiscountVelocityTicksInHours =\n restrictVelocityOfPriceUpdatesNew ? 1 : null;\n setValue(\n 'circuitBreakerMaxDiscountVelocityPercent',\n circuitBreakerMaxDiscountVelocityPercentNew\n );\n setValue(\n 'circuitBreakerMaxDiscountVelocityTicksInHours',\n circuitBreakerMaxDiscountVelocityTicksInHours\n );\n }\n }}\n />\n }\n />\n\n {restrictVelocityOfPriceUpdates && (\n }\n detail={\n \n }\n />\n )}\n \n );\n};\n","import { useAppContext } from 'src/contexts/AppContext';\nimport { Content } from 'src/contexts/ContentContext/Content';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { useUserHasFeature } from 'src/hooks/useUserHasFeature';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { Feature } from 'src/WebApiController';\n\nimport * as styles from './AccountAutoPricingSettings.css';\nimport { useAccountAutoPricingSettings } from './AccountAutoPricingSettings.hooks';\nimport { AccountAutoPricingSettingsForm } from './AccountAutoPricingSettingsForm';\n\nexport const AccountAutoPricingSettings = () => {\n const { loginContext } = useAppContext();\n const { getUiCurrency } = useLocalizationContext();\n\n const {\n accountAutoPricingSettings,\n onMergeAccountAutoPricingSettings,\n isLoading,\n isPending,\n } = useAccountAutoPricingSettings();\n\n const hasAllowSeatScoreCompListingModeFeature = useUserHasFeature(\n Feature.AllowSeatScoreCompListingMode\n );\n\n const uiCurrency = getUiCurrency(\n loginContext?.user?.activeAccount?.currencyCode\n );\n\n return (\n
    \n
    \n

    \n \n

    \n {isLoading ? (\n \n ) : (\n \n )}\n
    \n
    \n );\n};\n","export default \"__VITE_ASSET__be864f53__\"","import { debounce } from 'lodash-es';\nimport React, { createContext, useCallback, useContext, useState } from 'react';\n\nexport interface ISignUpContext {\n hasSignedUp: boolean;\n isSignupSubmitted: boolean;\n setIsSignupSubmitted: (hasSignedUp: boolean) => void;\n\n hasCheckedSignUpRedirect: boolean;\n setHasCheckedSignUpRedirect: (setHasCheckedSignUpRedirect: boolean) => void;\n}\n\nconst defaultSignUpContext: ISignUpContext = {\n hasSignedUp: false,\n isSignupSubmitted: false,\n setIsSignupSubmitted: () => undefined,\n hasCheckedSignUpRedirect: false,\n setHasCheckedSignUpRedirect: () => undefined,\n};\n\nexport const SignUpContext =\n createContext(defaultSignUpContext);\n\nexport const useSignUpContext = () => useContext(SignUpContext);\n\nexport const SignUpContextProvider = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\n const [isSignupSubmitted, setIsSignupSubmitted] = useState(false);\n const [hasSignedUp, setHasSignedUp] = useState(false);\n const [hasCheckedSignUpRedirect, setHasCheckedSignUpRedirect] =\n useState(false);\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const debouncedSetHasSignedUp = useCallback(\n debounce((value: boolean) => {\n setHasSignedUp(value);\n }, 500),\n []\n );\n\n const handleSetIsSignupSubmitted = useCallback(() => {\n setIsSignupSubmitted(true);\n debouncedSetHasSignedUp(true);\n }, [debouncedSetHasSignedUp]);\n\n return (\n \n {children}\n \n );\n};\n","import { useFormContext } from 'react-hook-form';\nimport { SignUpForm } from 'src/components/SignUp/EmailForm/EmailForm';\nimport * as styles from 'src/components/SignUp/EmailForm/Input/Input.css';\nimport { useSignUpContext } from 'src/contexts/SignUpContext/SignUpContext';\n\nexport const Input = () => {\n const { register } = useFormContext();\n const { isSignupSubmitted } = useSignUpContext();\n return (\n \n );\n};\n","import { PosIconProps, SvgWrapper } from 'src/svgs/SvgWrapper';\n\nexport const ArrowRight = (props: PosIconProps) => {\n return (\n \n \n \n \n );\n};\n","import { submitButton } from 'src/components/SignUp/EmailForm/SubmitButton/SubmitButton.css';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useSignUpContext } from 'src/contexts/SignUpContext/SignUpContext';\nimport { RotatingWrapper } from 'src/core/ui/AnimatingWrapper';\nimport { ArrowRight } from 'src/svgs/ArrowRight';\nimport { IconsFill, LoadingIcon } from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nexport const SubmitButton = () => {\n const { isSignupSubmitted } = useSignUpContext();\n return (\n \n );\n};\n","import { FormProvider, useForm } from 'react-hook-form';\nimport { container, form } from 'src/components/SignUp/EmailForm/EmailForm.css';\nimport { Input } from 'src/components/SignUp/EmailForm/Input/Input';\nimport { SubmitButton } from 'src/components/SignUp/EmailForm/SubmitButton/SubmitButton';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useSignUpContext } from 'src/contexts/SignUpContext/SignUpContext';\nimport { Stack } from 'src/core/ui';\nimport { useMatchMedia } from 'src/hooks/useMatchMedia';\nimport { REACT_APP_NAME } from 'src/utils/constants/constants';\nimport { ClientLogClient, LogLevel } from 'src/WebApiController';\n\nexport interface SignUpForm {\n email: string;\n}\n\nexport const EmailForm = () => {\n const isMobile = useMatchMedia('mobile');\n const { setIsSignupSubmitted } = useSignUpContext();\n const { activeAccountWebClientConfig } = useAppContext();\n\n const methods = useForm();\n const { handleSubmit } = methods;\n\n const onSubmit = (formValue: SignUpForm) => {\n new ClientLogClient(activeAccountWebClientConfig).log({\n logLevel: LogLevel.Information,\n pageUrl: window.location.href,\n componentStack: 'signup',\n applicationSource: REACT_APP_NAME,\n errorId: null,\n error: `new sign-up request: ${formValue.email}`,\n additionalInfo: { email: formValue.email },\n });\n setIsSignupSubmitted(true);\n };\n\n return (\n \n
    \n \n \n \n {!isMobile && }\n \n {isMobile && (\n
    \n \n
    \n )}\n \n \n
    \n );\n};\n","import { byLogo } from 'src/components/SignUp/Footer/Footer.css';\nimport { Stack } from 'src/core/ui';\nimport { StubHubLogo } from 'src/svgs';\n\nexport const Footer = () => {\n return (\n \n By\n \n \n );\n};\n","import { Content } from 'src/contexts/ContentContext';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport * as styles from './Title.css';\n\nexport const Titles = () => {\n return (\n
    \n
    \n REACH\n pro\n
    \n \n \n \n
    \n );\n};\n","import {\n inviteOnlyBannerWrapper,\n subtitle,\n title,\n} from 'src/components/SignUp/InviteOnlyBanner/InviteOnlyBanner.css';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nexport const InviteOnlyBanner = () => {\n return (\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n );\n};\n","export const SignUpPathname = '/access';\n","import { ReactNode, useEffect } from 'react';\nimport { Navigate } from 'react-router-dom';\nimport { useSignUpContext } from 'src/contexts/SignUpContext/SignUpContext';\nimport { SignUpPathname } from 'src/navigations/Routes/SignUp/constants';\n\nconst allowedHostnames = ['reachpro.com', 'www.reachpro.com'];\n\nexport const isReachProDomain = () => {\n const { hostname } = window.location;\n return allowedHostnames.includes(hostname);\n};\n\nexport const isAllowedToSignUp = () => {\n return isReachProDomain();\n};\n\ninterface SignUpValidatorProps {\n children: ReactNode;\n}\n\nexport const SignUpRedirect = ({ children }: SignUpValidatorProps) => {\n const { hasCheckedSignUpRedirect, setHasCheckedSignUpRedirect } =\n useSignUpContext();\n\n useEffect(() => {\n setHasCheckedSignUpRedirect(true);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n if (isAllowedToSignUp() && !hasCheckedSignUpRedirect) {\n if (location.pathname !== SignUpPathname) {\n return ;\n }\n }\n\n return <>{children};\n};\n","import { ReactNode, useEffect, useState } from 'react';\nimport { Navigate, useNavigate } from 'react-router-dom';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useFetchLoginContext } from 'src/hooks/useFetchLoginContext';\nimport { SignUpPathname } from 'src/navigations/Routes/SignUp/constants';\nimport { LoginContext } from 'src/WebApiController';\n\nimport { isAllowedToSignUp } from './SignUpRedirect';\n\ninterface SignUpDisplayValidatorProps {\n children: ReactNode;\n}\n\nexport const SignUpValidator = ({ children }: SignUpDisplayValidatorProps) => {\n const [loginContextLoaded, setLoginContextLoaded] = useState(false);\n const { loginContext, setLoginContext } = useAppContext();\n const { fetchLoginContext } = useFetchLoginContext();\n\n const navigate = useNavigate();\n\n useEffect(() => {\n fetchLoginContext(\n (loginContext: LoginContext) => {\n setLoginContext(loginContext);\n setLoginContextLoaded(true);\n },\n () => {\n setLoginContextLoaded(true);\n }\n );\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n if (!loginContextLoaded) {\n return null;\n }\n\n const hasSession = !!loginContext;\n\n // If there is currently a login context - navigate to home\n if (hasSession) {\n return ;\n }\n\n if (location.pathname !== SignUpPathname) {\n if (isAllowedToSignUp()) {\n navigate('/access', { replace: true });\n } else {\n // If the pathname == start, and it's not allowing to sign-up, it will redirect to login\n return ;\n }\n }\n\n // Else, render signup\n return <>{children};\n};\n","import signupVideo from 'src/assets/signup.mp4';\nimport { EmailForm, Footer, Titles } from 'src/components/SignUp';\nimport { InviteOnlyBanner } from 'src/components/SignUp/InviteOnlyBanner/InviteOnlyBanner';\nimport { SignUpValidator } from 'src/components/SignUp/SignUpValidator';\nimport { useSignUpContext } from 'src/contexts/SignUpContext/SignUpContext';\nimport { SiteZoomOption } from 'src/contexts/SiteTheme/SiteThemeContext';\nimport { Stack } from 'src/core/ui';\nimport { useServerUserSetting } from 'src/hooks/useUserSetting';\nimport {\n signupContent,\n signUpFooter,\n signupPage,\n video,\n} from 'src/navigations/Routes/SignUp/SignUp.css';\nimport { UserSetting } from 'src/WebApiController';\n\nexport const SignUp = () => {\n const { hasSignedUp } = useSignUpContext();\n\n const { value: serverSiteZoomValue } = useServerUserSetting({\n id: UserSetting.SiteZoom,\n currentLoginUserOnly: true,\n });\n\n return (\n \n \n \n
    \n \n \n {hasSignedUp ? : }\n \n
    \n
    \n
    \n
    \n
    \n
    \n );\n};\n","import { AdCampaignEntity, UiMoney } from 'src/WebApiController';\n\nexport const SHIMMERING_DIV_HEIGHT_SINGLE_ADCAMPAIGNS = '40px';\n\ntype ReportingMetrics = {\n adSpend: UiMoney | null | undefined;\n salesProceeds: UiMoney | null | undefined;\n qtySold: number | null | undefined;\n};\n\nexport type AdCampaignEntityWithMetrics = AdCampaignEntity & ReportingMetrics;\n","\nimport { AdCampaignQueryParam } from './constants/constants';\n\nexport const getAdCampaignUrl = (\n adCampaignId: string,\n includeSearchParams = true\n): string => {\n let searchParams = '';\n if (includeSearchParams) {\n const url = new URL(window.location.href);\n url.searchParams.set(AdCampaignQueryParam, adCampaignId);\n searchParams = `?${url.searchParams.toString()}`;\n }\n return `/sponsoredlistings/adcampaign${searchParams}`;\n};\n","import { useCallback } from 'react';\nimport { Link, useNavigate } from 'react-router-dom';\nimport { IconButton } from 'src/components/Buttons';\nimport { vars } from 'src/core/themes';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { FullPageIcon } from 'src/svgs';\nimport { getAdCampaignUrl } from 'src/utils/adCampaignUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nexport const AdCampaignActionsCell = ({\n adCampaignId,\n}: {\n adCampaignId: string;\n}) => {\n const navigate = useNavigate();\n\n const onViewClick = useCallback(\n (url: string) => {\n setTimeout(() => {\n navigate(url, {\n state: {\n returnUrl: `${location.pathname}${location.search}`,\n },\n });\n }, 10);\n },\n [navigate]\n );\n\n return (\n \n {\n if (e.button === 0 && e.getModifierState('Control') === false) {\n // Perform like a button click when it's a left-click (and no Ctrl)\n // Else the click will be whatever does\n e.preventDefault();\n e.stopPropagation();\n\n onViewClick(getAdCampaignUrl(adCampaignId));\n }\n }}\n >\n \n }\n titleContentId={ContentId.ViewDetails}\n />\n \n \n );\n};\n","import { formatInTimeZone } from 'date-fns-tz';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useSiteTimezoneContext } from 'src/contexts/SiteTimezoneContext/SiteTimezoneContext';\nimport { DivWithTitle } from 'src/core/ui/DivWithTitle';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport * as styles from './AdCampaignsTableColumnsConfig.css';\n\nexport function AdCampaignsDateCell({ date }: { date: Date | null }) {\n const { timeZone } = useSiteTimezoneContext();\n const formattedDate = date ? (\n <>\n {formatInTimeZone(date, timeZone, 'LLL d, yyyy')}\n {formatInTimeZone(date, timeZone, 'EEEE')}\n \n ) : (\n \n );\n return (\n {formattedDate}\n );\n}\n","import { ColumnDef, createColumnHelper } from '@tanstack/react-table';\nimport {\n COLUMN_DEFAULT_SIZE_BASE,\n COLUMN_DEFAULT_SIZE_LG,\n COLUMN_DEFAULT_SIZE_XL,\n COLUMN_MAX_SIZE,\n COLUMN_MIN_SIZE,\n} from 'src/contexts/ColumnResizingContext/ColumnResizingContext.types';\nimport { Content } from 'src/contexts/ContentContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport * as PosCollapsible from 'src/core/POS/PosCollapsible';\nimport { vars } from 'src/core/themes';\nimport { Stack } from 'src/core/ui';\nimport { TableCellDiv } from 'src/core/ui/TableCellDiv';\nimport { TableHeaderCellDiv } from 'src/core/ui/TableHeaderCellDiv';\nimport { ForwardIcon } from 'src/svgs/Viagogo';\nimport { TableShimmeringDiv } from 'src/tables/Table';\nimport { AdCampaignsTableColumnId } from 'src/utils/columns/adCampaigns/adCampaignsColumnUtils.types';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { ADCAMPAIGNS_TABLE_COLUMN_ID_TO_CONTENT_ID as ADCAMPAIGNS_TABLE_COLUMN_ID_TO_CONTENT_ID } from 'src/utils/constants/contentIdMaps';\nimport { applyNumberFormatting } from 'src/utils/numberFormatter';\nimport { MoneyType, UiMoney } from 'src/WebApiController';\n\nimport {\n AdCampaignEntityWithMetrics,\n SHIMMERING_DIV_HEIGHT_SINGLE_ADCAMPAIGNS as SHIMMERING_DIV_HEIGHT_SINGLE_ADCAMPAIGNS,\n} from '../AdCampaignsTable.type';\nimport { AdCampaignActionsCell } from './AdCampaignsActionsCell';\nimport { AdCampaignsDateCell } from './AdCampaignsDateCell';\nimport * as styles from './AdCampaignsTableColumnsConfig.css';\n\nconst columnHelper = createColumnHelper();\n\nexport const ADCAMPAIGNS_TABLE_COLUMNS_CONFIG: ColumnDef<\n AdCampaignEntityWithMetrics | null,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n any\n>[] = [\n columnHelper.accessor((data) => (data ? data.name || '' : null), {\n id: AdCampaignsTableColumnId.Name,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n if (!original) {\n return (\n \n );\n }\n\n return {getValue()};\n },\n }),\n columnHelper.accessor((data) => (data ? data.startDateTime || '' : null), {\n id: AdCampaignsTableColumnId.StartDateTime,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_XL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n enableSorting: true,\n cell: ({\n getValue,\n row: { original },\n table: {\n options: { meta },\n },\n }) => {\n const rowSupportsAccordion = meta?.rowSupportsAccordion;\n\n const value = getValue();\n if (!original) {\n return (\n \n );\n }\n\n return (\n \n \n {rowSupportsAccordion && (\n e.stopPropagation()}\n className={styles.adCampaignEntityTableCollapseTrigger}\n FoldIcon={ForwardIcon}\n iconSize={vars.iconSize.s}\n />\n )}\n \n \n \n );\n },\n sortingFn: 'datetime',\n }),\n columnHelper.accessor((data) => (data ? data.endDateTime || '' : null), {\n id: AdCampaignsTableColumnId.EndDateTime,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_XL,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n enableSorting: true,\n cell: ({\n getValue,\n row: { original },\n table: {\n options: { meta },\n },\n }) => {\n const rowSupportsAccordion = meta?.rowSupportsAccordion;\n\n const value = getValue();\n if (!original) {\n return (\n \n );\n }\n\n return (\n \n \n {rowSupportsAccordion && (\n e.stopPropagation()}\n className={styles.adCampaignEntityTableCollapseTrigger}\n FoldIcon={ForwardIcon}\n iconSize={vars.iconSize.s}\n />\n )}\n \n \n \n );\n },\n sortingFn: 'datetime',\n }),\n columnHelper.accessor((data) => (data ? data.budget : null), {\n id: AdCampaignsTableColumnId.Budget,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n const value = getValue();\n const { getUiCurrency } = useLocalizationContext();\n const currency = getUiCurrency(value?.currencyCode);\n\n if (!original) {\n return (\n \n );\n }\n\n if (value == null || value == undefined)\n return ;\n\n return (\n \n {applyNumberFormatting({\n inputNumber: value.amount,\n currencyCode: currency.code,\n currencyDecimalDigits: currency.dec,\n })}\n \n );\n },\n }),\n columnHelper.accessor((data) => (data ? data.state || '' : null), {\n id: AdCampaignsTableColumnId.State,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n // TODO\n const value = getValue() as string;\n\n if (!original) {\n return (\n \n );\n }\n\n return {value};\n },\n }),\n columnHelper.accessor((data) => (data ? data.adSpend : null), {\n id: AdCampaignsTableColumnId.AdSpend,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n const value = getValue();\n const { getUiCurrency } = useLocalizationContext();\n const currency = getUiCurrency(value?.currency);\n\n if (!original || value === undefined) {\n return (\n \n );\n }\n\n if (value === null) return ;\n\n return (\n \n {applyNumberFormatting({\n inputNumber: value.amt,\n currencyCode: currency.code,\n currencyDecimalDigits: currency.dec,\n })}\n \n );\n },\n }),\n columnHelper.accessor((data) => (data ? data.salesProceeds : null), {\n id: AdCampaignsTableColumnId.SoldProceeds,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: function Cell({ getValue, row: { original } }) {\n const value = getValue();\n const { getUiCurrency } = useLocalizationContext();\n const currency = getUiCurrency(value?.currency);\n\n if (!original || value === undefined) {\n return (\n \n );\n }\n\n if (value === null) return ;\n\n return (\n \n {applyNumberFormatting({\n inputNumber: value.amt,\n currencyCode: currency.code,\n currencyDecimalDigits: currency.dec,\n })}\n \n );\n },\n }),\n columnHelper.accessor((data) => (data ? data.qtySold : null), {\n id: AdCampaignsTableColumnId.SoldQty,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_LG,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ getValue, row: { original } }) => {\n const value = getValue();\n if (!original || value === undefined) {\n return (\n \n );\n }\n\n if (value === null) return ;\n\n return {value};\n },\n }),\n // columnHelper.accessor((data) => (data ? data.currencyCode : null), {\n // id: AdCampaignsTableColumnId.CurrencyCode,\n // header: () => (\n // \n // \n // \n // ),\n // size: COLUMN_DEFAULT_SIZE_BASE,\n // minSize: COLUMN_MIN_SIZE,\n // maxSize: COLUMN_MAX_SIZE,\n // cell: ({ getValue, row: { original } }) => {\n // const value = getValue();\n // if (!original) {\n // return (\n // \n // );\n // }\n // return {value ?? 0};\n // },\n // }),\n columnHelper.display({\n id: AdCampaignsTableColumnId.Actions,\n enableSorting: false,\n header: () => (\n \n \n \n ),\n size: COLUMN_DEFAULT_SIZE_BASE,\n minSize: COLUMN_MIN_SIZE,\n maxSize: COLUMN_MAX_SIZE,\n cell: ({ row: { original } }) => {\n return !original ? (\n \n ) : (\n \n );\n },\n }),\n];\n","import { ColumnDef } from '@tanstack/react-table';\nimport { useMemo } from 'react';\nimport { ADCAMPAIGNS_TABLE_COLUMNS_CONFIG } from 'src/tables/AdCampaignsTable/configs/AdCampaignsTableColumnConfig';\nimport { AdCampaignsTableColumnId } from 'src/utils/columns/adCampaigns/adCampaignsColumnUtils.types';\n\nimport { AdCampaignEntityWithMetrics } from './AdCampaignsTable.type';\n\nexport const useGetAdCampaignsTableColumns = () => {\n return useMemo(() => {\n // TODO: Filter out reporting columns until we enabled this on AdCampaign side\n const columns = ADCAMPAIGNS_TABLE_COLUMNS_CONFIG.filter(\n (item) =>\n ![\n AdCampaignsTableColumnId.AdSpend,\n AdCampaignsTableColumnId.SoldProceeds,\n AdCampaignsTableColumnId.SoldQty,\n ].includes(item.id as AdCampaignsTableColumnId)\n ).map((item) => item.id as AdCampaignsTableColumnId);\n\n return Array.from(columns).reduce<\n ColumnDef[]\n >((acc, columnId) => {\n const columnConfig = Object.values(ADCAMPAIGNS_TABLE_COLUMNS_CONFIG).find(\n (column) => column.id === columnId\n );\n if (columnConfig) {\n acc.push(columnConfig);\n }\n return acc;\n }, []);\n }, []);\n};\n","import {\n InitialTableState,\n SortingState,\n TableOptions,\n} from '@tanstack/react-table';\nimport { useEffect, useMemo, useState } from 'react';\nimport {\n Content,\n FormatContent,\n useContent,\n} from 'src/contexts/ContentContext';\nimport { WarningMessage } from 'src/core/POS/MessageWithIcon';\nimport { useSyncCenterSettings } from 'src/hooks/api/useSyncCenterSetting';\nimport { NoData, Table, TableProps } from 'src/tables/Table';\nimport { MAX_NUM_OF_ITEMS_FOR_FLATTENED_VIEWS } from 'src/utils/constants/constants';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { generateShimmeringRows } from 'src/utils/dataTableUtils';\nimport { SomethingWentWrong } from 'src/views';\n\nimport { usePaginationSettings } from '../Table/hooks/usePaginationSettings';\nimport { AdCampaignEntityWithMetrics } from './AdCampaignsTable.type';\nimport { useGetAdCampaignsTableColumns } from './useGetAdCampaignsTableColumns';\n\nexport type AdCampaignsTableDataProps = {\n adCampaignEntities?: AdCampaignEntityWithMetrics[] | null;\n failedToRetrieveData: boolean;\n disablePagination?: boolean;\n useVirtuoso?: boolean;\n};\n\ntype AdCampaignsTableProps = AdCampaignsTableDataProps & {\n failedToRetrieveData: boolean;\n onMount?: () => void;\n onUnmount?: (state: object) => void;\n initState?: InitialTableState;\n isItemsLoading?: boolean;\n} & Pick<\n TableProps,\n 'RowComponent' | 'virtuosoItemSize'\n >;\n\nconst PAGE_SIZE = 10;\n\nconst getRowId = (\n originalRow: AdCampaignEntityWithMetrics | null,\n index: number\n) => (originalRow?.campaignId ?? index).toString();\n\nexport function AdCampaignsTable({\n adCampaignEntities,\n failedToRetrieveData,\n onMount,\n onUnmount,\n initState,\n disablePagination,\n isItemsLoading,\n RowComponent,\n virtuosoItemSize,\n}: AdCampaignsTableProps) {\n const settings = useSyncCenterSettings();\n\n const adCampaignsText = useContent(ContentId.AdCampaigns);\n\n const [sorting, setSorting] = useState(\n initState?.sorting || [{ id: 'name', desc: true }]\n );\n\n const { pagination, setPagination } = usePaginationSettings(\n adCampaignEntities?.length ?? 0,\n -1,\n PAGE_SIZE,\n disablePagination,\n initState\n );\n\n useEffect(() => {\n onMount?.();\n });\n\n useEffect(() => {\n return () => onUnmount?.({ pagination, sorting });\n }, [pagination, sorting, onUnmount]);\n\n const { data, hasNoDataLoad } = useMemo(() => {\n const data = adCampaignEntities?.length\n ? adCampaignEntities\n : adCampaignEntities == null || isItemsLoading\n ? (generateShimmeringRows(0) as null[])\n : adCampaignEntities;\n\n const hasNoDataLoad =\n adCampaignEntities == null\n ? true\n : adCampaignEntities.length > MAX_NUM_OF_ITEMS_FOR_FLATTENED_VIEWS;\n\n return { data, hasNoDataLoad };\n }, [isItemsLoading, adCampaignEntities]);\n\n const columns = useGetAdCampaignsTableColumns();\n\n const options = useMemo<\n Partial>\n >(\n () => ({\n data,\n columns: columns,\n state: {\n pagination,\n sorting,\n },\n enableRowSelection: false,\n enableMultiRowSelection: false,\n enableSubRowSelection: false,\n getRowId: getRowId,\n onPaginationChange: setPagination,\n onSortingChange: setSorting,\n }),\n [data, columns, pagination, sorting, setPagination]\n );\n\n return failedToRetrieveData ? (\n }\n />\n ) : hasNoDataLoad ? (\n \n \n }\n />\n \n ) : data?.length > 0 ? (\n \n ) : (\n \n \n \n );\n}\n","import { isEqual } from 'lodash-es';\nimport {\n ComponentProps,\n useCallback,\n useContext,\n useMemo,\n useState,\n} from 'react';\nimport { FormProvider, useForm, useFormContext } from 'react-hook-form';\nimport { OkButton } from 'src/components/Buttons/OkButton';\nimport { AdCampaignsDataContext } from 'src/contexts/AdCampaignsDataContext/AdCampaignsDataContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { useErrorBoundaryContext } from 'src/contexts/ErrorBoundaryContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { useSiteTimezoneContext } from 'src/contexts/SiteTimezoneContext/SiteTimezoneContext';\nimport { DatePickerInput } from 'src/core/POS/DateSelector';\nimport { PosCurrencyField } from 'src/core/POS/PosCurrencyField';\nimport { PosFormField } from 'src/core/POS/PosFormField';\nimport { getTextFieldState, PosTextField } from 'src/core/POS/PosTextField';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { getLocaleFromLanguageOrCurrent } from 'src/utils/localeUtils';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport { AdCampaignState, CampaignManagerClient } from 'src/WebApiController';\n\nimport { CancellableFormFooter, FieldWrapper } from '../common';\nimport { CancellableFormHeader } from '../common/CancellableFormHeader';\nimport { ConnectedEventEntityHeader } from '../common/EventEntityHeader';\nimport { modalDetails } from '../common/Modals.css';\nimport { summaryWrapper } from '../common/Summary/Summary.css';\nimport { ModalBody } from '../Modal';\nimport { ModalBodyDataContainer, ModalFooter } from '../Modal/Modal.styled';\nimport * as styles from './AdCampaignCreate.css';\n\ntype AdCampaignCreateInput = {\n name: string;\n budget: number;\n startDateTime: string;\n endDateTime: string | null;\n currencyCode: string | null;\n};\n\nexport const AdCampaignCreateForm = () => {\n const { loginContext } = useAppContext();\n\n const defaultValues = useMemo(() => {\n return {\n name: '',\n budget: 0,\n startDateTime: new Date().toISOString(),\n endDateTime: null,\n currencyCode: loginContext?.user?.activeAccount?.currencyCode,\n } as AdCampaignCreateInput;\n }, [loginContext?.user?.activeAccount?.currencyCode]);\n\n const methods = useForm({\n defaultValues,\n });\n\n return (\n \n \n \n );\n};\n\nexport function AdCampaignCreateFormContent({\n formState,\n handleSubmit,\n watch,\n}: Omit<\n ComponentProps>,\n 'children'\n>) {\n const curFormValues = watch();\n\n const { closeModal } = useContext(ModalContext);\n const { showErrorDialog } = useErrorBoundaryContext();\n const { activeAccountWebClientConfig } = useAppContext();\n const { refreshData } = useContext(AdCampaignsDataContext);\n\n const [isLoading, setIsLoading] = useState(false);\n\n const onSubmit = useCallback(\n async (adCampaignCreateInput: AdCampaignCreateInput) => {\n setIsLoading(true);\n\n tryInvokeApi(\n async () => {\n setIsLoading(true);\n\n const client = new CampaignManagerClient(\n activeAccountWebClientConfig\n );\n const response = await client.createCampaign(\n adCampaignCreateInput.name,\n AdCampaignState.Active,\n {\n amount: adCampaignCreateInput.budget,\n currencyCode: adCampaignCreateInput.currencyCode!,\n },\n adCampaignCreateInput.startDateTime,\n adCampaignCreateInput.endDateTime,\n adCampaignCreateInput.currencyCode!\n );\n\n if (response.success) {\n await refreshData(undefined);\n } else {\n const errorMessage = 'Failed to create Ad Campaign';\n\n showErrorDialog(\n 'CampaignManagerClient.createCampaign',\n { message: errorMessage, status: 500 },\n {\n trackErrorData: adCampaignCreateInput,\n }\n );\n return;\n }\n\n closeModal(true);\n },\n (error) => {\n showErrorDialog('CampaignManagerClient.createCampaign', error, {\n trackErrorData: adCampaignCreateInput,\n });\n },\n () => {\n setIsLoading(false);\n }\n );\n },\n [activeAccountWebClientConfig, closeModal, refreshData, showErrorDialog]\n );\n\n const hasChanges = useCallback(\n (form: AdCampaignCreateInput) => {\n return (\n !isEqual(formState.defaultValues?.name, form.name) ||\n !isEqual(formState.defaultValues?.budget, form.budget) ||\n !isEqual(formState.defaultValues?.startDateTime, form.startDateTime) ||\n !isEqual(formState.defaultValues?.endDateTime, form.endDateTime) ||\n !isEqual(formState.defaultValues?.currencyCode, form.currencyCode)\n );\n },\n [\n formState.defaultValues?.name,\n formState.defaultValues?.budget,\n formState.defaultValues?.startDateTime,\n formState.defaultValues?.endDateTime,\n formState.defaultValues?.currencyCode,\n ]\n );\n\n const onSubmitHandler = useCallback(() => {\n if (!hasChanges(curFormValues)) return;\n handleSubmit(onSubmit)();\n }, [hasChanges, curFormValues, handleSubmit, onSubmit]);\n\n const formHasChanges = hasChanges(curFormValues);\n\n return (\n <>\n \n }\n />\n \n\n \n
    \n \n \n \n
    \n
    \n\n \n \n \n \n \n \n );\n}\n\nexport const AdCampaignCreateModal = {\n children: ,\n clickOutsideToClose: true,\n size: 'slide-in',\n};\n\nexport const AdCampaignCreateFormBody = () => {\n const { timeZone } = useSiteTimezoneContext();\n const { register, getValues, setValue, formState, clearErrors } =\n useFormContext();\n\n const { name, budget, startDateTime, endDateTime } = getValues();\n\n const namePlaceholder = useContent(ContentId.EnterAdCampaignName);\n\n const requiredMsg = useContent(ContentId.Required);\n\n const { getUiCurrency } = useLocalizationContext();\n const { loginContext } = useAppContext();\n\n const uiCurrency = getUiCurrency(\n loginContext?.user?.activeAccount?.currencyCode\n );\n\n const setBudget = useCallback(\n (budget: number) => {\n if (budget >= 0 && budget <= Number.MAX_VALUE) {\n clearErrors('budget');\n setValue('budget', budget);\n }\n },\n [clearErrors, setValue]\n );\n\n return (\n <>\n
    \n
    \n
    \n \n }\n >\n {\n return fieldVal?.length ? undefined : requiredMsg;\n },\n },\n onChange: (event) => {\n if (event.target.value) {\n clearErrors('name');\n }\n },\n })}\n />\n \n \n \n }\n >\n {\n const v = parseFloat(e.target.value) || 0;\n setBudget(v);\n }}\n />\n \n \n \n }\n errors={formState.errors.startDateTime?.message}\n >\n {\n if (date) {\n clearErrors('startDateTime');\n const dateStr = date.toISOString();\n if (dateStr !== startDateTime) {\n setValue('startDateTime', dateStr);\n }\n }\n }}\n locale={getLocaleFromLanguageOrCurrent()}\n />\n \n \n \n }\n errors={formState.errors.endDateTime?.message}\n >\n {\n if (date) {\n clearErrors('endDateTime');\n const dateStr = date.toISOString();\n if (dateStr !== endDateTime) {\n setValue('endDateTime', dateStr);\n }\n }\n }}\n locale={getLocaleFromLanguageOrCurrent()}\n />\n \n \n
    \n
    \n
    \n \n );\n};\n","import styled from 'styled-components/macro';\n\nexport const AdCampaignsToolbarDiv = styled.div`\n display: flex;\n justify-content: space-between;\n align-items: center;\n border-bottom: 1px solid ${(props) => props.theme.colors.borderPrimary};\n padding: ${(props) => props.theme.spacing(2, 4, 2, 3)};\n\n ${({ theme: { media, spacing } }) =>\n `${media.makeMediaQuery(\n media.breakpoints.md,\n `padding: ${spacing(2, 8, 2, 6)};`\n )}`}\n\n .add-adCampaigns {\n white-space: nowrap;\n width: fit-content;\n }\n`;\n\nexport const FilterBarLeftSide = styled.div`\n display: flex;\n flex-grow: 1;\n align-items: center;\n gap: 8px;\n\n > div {\n flex-grow: 1;\n }\n`;\n\nexport const FilterBarRightSide = styled.div`\n display: flex;\n align-items: center;\n padding-inline-start: ${(props) => props.theme.spacing(2)};\n\n ${({ theme: { media, spacing } }) =>\n `${media.makeMediaQuery(\n media.breakpoints.md,\n `padding-inline-start: ${spacing(4)};`\n )}`}\n`;\n","import { MouseEvent, useContext } from 'react';\nimport { Content } from 'src/contexts/ContentContext';\nimport { ModalContext } from 'src/contexts/ModalContext';\nimport { Button } from 'src/core/ui';\nimport { AdCampaignCreateModal } from 'src/modals/AdCampaignCreate/AdCampaignCreate';\nimport { ContentId } from 'src/utils/constants/contentId';\n\nimport * as styles from './AdCampaignsToolbar.css';\nimport {\n AdCampaignsToolbarDiv,\n FilterBarLeftSide,\n FilterBarRightSide,\n} from './AdCampaignsToolbar.styled';\n\nexport type AdCampaignsToolbarType = {\n disabled?: boolean;\n onColumnSettingButtonClickHandler?: (\n e: MouseEvent\n ) => void;\n};\n\nexport function AdCampaignsToolbar() {\n const { setModal } = useContext(ModalContext);\n\n return (\n \n \n \n setModal(AdCampaignCreateModal)}\n >\n \n \n \n \n );\n}\n","import { ReactNode, useContext, useMemo } from 'react';\nimport * as EmptySectionContent from 'src/components/common/EmptySectionContent';\nimport { AdCampaignIdProvider } from 'src/contexts/AdCampaignIdContext/AdCampaignIdContext';\nimport {\n AdCampaignsDataContext,\n AdCampaignsDataContextProvider,\n} from 'src/contexts/AdCampaignsDataContext/AdCampaignsDataContext';\nimport {\n AdPlatformReportingContext,\n AdPlatformReportingContextProvider,\n} from 'src/contexts/AdPlatformReportingContext/AdPlatformReportingContext';\nimport { Content, useContent } from 'src/contexts/ContentContext';\nimport { DialogProvider } from 'src/contexts/DialogContext/DialogContext';\nimport { SellerUserSettingsProvider } from 'src/contexts/SellerUserSettingsContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport { Stack } from 'src/core/ui';\nimport { LayoutContent } from 'src/navigations/LayoutContent';\nimport { SearchSolidIcon } from 'src/svgs/Viagogo';\nimport { AdCampaignsTable } from 'src/tables/AdCampaignsTable';\nimport { AdCampaignEntityWithMetrics } from 'src/tables/AdCampaignsTable/AdCampaignsTable.type';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { SomethingWentWrong } from 'src/views';\nimport {\n AdPlatformTransactionAgg,\n TransactionAggType,\n UserSetting,\n} from 'src/WebApiController';\n\nimport { MainRoute } from '../MainRoute';\nimport { AdCampaignsToolbar } from './AdCampaignsToolbar/AdCampaignsToolbar';\n\nconst SPONSOREDLISTINGS_USER_SETTINGS: UserSetting[] = [];\n\nexport function SponsoredListings() {\n return (\n \n \n \n \n \n \n \n );\n}\n\nfunction SponsoredListingsContent() {\n const sponsoredListingsTitle = useContent(ContentId.SponsoredListings);\n\n const { adCampaignsDataQuery: adCampaignsDataQuery, errorInfo } = useContext(\n AdCampaignsDataContext\n );\n\n return (\n \n \n \n \n {adCampaignsDataQuery.isLoading && }\n {errorInfo && (\n \n )\n }\n />\n )}\n {!adCampaignsDataQuery.isLoading && !errorInfo && (\n <>\n \n {adCampaignsDataQuery.data?.length ? (\n \n ) : (\n \n \n \n }\n >\n \n \n \n \n \n \n \n )}\n \n )}\n \n \n \n \n );\n}\n\ntype AdCampaignsFlattenedViewProps = {\n before?: ReactNode;\n topListItemBefore?: ReactNode;\n};\n\nexport const AdCampaignsFlattenedView = ({\n before,\n topListItemBefore,\n}: AdCampaignsFlattenedViewProps) => {\n const { adCampaignsDataQuery: campaignDataQuery, allCampaignData } =\n useContext(AdCampaignsDataContext);\n\n const { reportData, errorInfo } = useContext(AdPlatformReportingContext);\n\n const campaignEntitiesWithMetrics = useMemo(() => {\n if (!allCampaignData) {\n return;\n }\n\n // TODO: Rather than building a dictionary here, we should get the data pre-indexed by id.\n const reportDataByAdCampaignId = reportData?.reduce<{\n [key: string]: AdPlatformTransactionAgg;\n }>((acc, entity) => {\n if (entity.adCampaignId) {\n acc[entity.adCampaignId] = entity;\n }\n return acc;\n }, {});\n\n const items: AdCampaignEntityWithMetrics[] = allCampaignData.map((item) => {\n const metric = reportDataByAdCampaignId?.[item.campaignId];\n return {\n ...item,\n adSpend:\n metric?.adSpend ??\n (reportDataByAdCampaignId || errorInfo ? null : undefined),\n salesProceeds:\n metric?.salesProceeds ??\n (reportDataByAdCampaignId || errorInfo ? null : undefined),\n qtySold:\n metric?.qtySold ??\n (reportDataByAdCampaignId || errorInfo ? null : undefined),\n };\n });\n\n return items;\n }, [allCampaignData, errorInfo, reportData]);\n\n return (\n \n {before}\n {topListItemBefore}\n \n \n );\n};\n","import { PosIconProps, SvgWrapper } from './SvgWrapper';\n\nexport const PaymentsIcon = (props: PosIconProps) => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {/**/}\n \n );\n};\n","export default \"__VITE_ASSET__bfc9223b__\"","export default \"__VITE_ASSET__df4187d3__\"","import { ReactNode } from 'react';\nimport { Helmet } from 'react-helmet';\nimport reachDarkIcon from 'src/assets/icons/reach_pro/reach_pro_dark.ico';\nimport reachLightIcon from 'src/assets/icons/reach_pro/reach_pro_light.ico';\nimport { isReachProDomain } from 'src/components/SignUp/SignUpRedirect';\n\ninterface ReachProDocumentInfoProps {\n children: ReactNode;\n}\n\nexport const DocumentInfo = ({ children }: ReachProDocumentInfoProps) => {\n const isReachProDomainActive = isReachProDomain();\n const isDarkTheme =\n window.matchMedia &&\n window.matchMedia('(prefers-color-scheme: dark)').matches;\n\n const reachPropIco = isDarkTheme ? reachLightIcon : reachDarkIcon;\n\n return (\n <>\n {isReachProDomainActive ? (\n \n Reach Pro\n \n \n ) : (\n \n StubHub Pro\n \n \n \n )}\n {children}\n \n );\n};\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { useCallback, useEffect, useMemo } from 'react';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { REACT_APP_NAME } from 'src/utils/constants/constants';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ClientLogClient,\n ClientLogRequest,\n LogLevel,\n} from 'src/WebApiController';\n\nfunction getTabId() {\n return sessionStorage.tabId\n ? sessionStorage.tabId\n : (sessionStorage.tabId = Math.random());\n}\n\nconst useMeasurement = () => {\n const { activeAccountWebClientConfig } = useAppContext();\n const logClient = useMemo(\n () => new ClientLogClient(activeAccountWebClientConfig),\n [activeAccountWebClientConfig]\n );\n\n return useCallback(async () => {\n if ((window.performance as any).memory) {\n const logRequest: ClientLogRequest = {\n logLevel: LogLevel.Information,\n applicationSource: REACT_APP_NAME,\n errorId: null,\n error: 'MemoryStat',\n pageUrl: window.location.href,\n componentStack: null,\n additionalInfo: {\n tabId: getTabId(),\n //memory: await performance.measureUserAgentSpecificMemory(), // TODO:: can't use this as window.crossOriginIsolated is false\n memory: {\n usedJSHeapSize: (window.performance as any).memory.usedJSHeapSize,\n totalJSHeapSize: (window.performance as any).memory.totalJSHeapSize,\n jsHeapSizeLimit: (window.performance as any).memory.jsHeapSizeLimit,\n },\n },\n };\n\n await tryInvokeApi(\n async () => {\n await logClient.log(logRequest);\n },\n () => {\n console.warn('Failed to log memory metrics to server');\n }\n );\n }\n }, [logClient]);\n};\n\nexport const useMemoryTelemetry = () => {\n const INTERVAL_SECONDS = 300;\n const getMeasurement = useMeasurement();\n\n useEffect(() => {\n const timerId = setInterval(getMeasurement, 1000 * INTERVAL_SECONDS);\n return () => clearInterval(timerId);\n }, [getMeasurement]);\n};\n","import styled from 'styled-components/macro';\n\nexport const AppLayout = styled.div`\n .content-container {\n flex-grow: 1;\n overflow: hidden;\n }\n`;\n","import {\n matchQuery,\n Query,\n QueryCache,\n QueryClient,\n QueryFunctionContext,\n QueryKey,\n} from '@tanstack/react-query';\nimport {\n PERSISTER_KEY_PREFIX,\n StoragePersisterOptions,\n} from '@tanstack/react-query-persist-client';\nimport { parse, stringify } from 'flatted';\nimport {\n clearIDBCache,\n createIDBAsyncStorage,\n} from 'src/core/utils/createIndexDBPersister';\nimport { REACT_QUERY_CACHE_MAX_AGE_IN_MS } from 'src/utils/constants/constants';\nimport { ApiException } from 'src/WebApiController';\n\ninterface QueryMeta {\n onError?: (error: Error) => void;\n}\n\n/**\n * This is copied from https://github.com/TanStack/query/blob/683c85e02c58c988cb520958941fcd163bd00eee/packages/query-persist-client-core/src/createPersister.ts#L81\n * We need to override the fact that all query.fetch() regardless of Stale or not\n */\nexport function experimental_createPersister({\n storage,\n buster = '',\n maxAge = 1000 * 60 * 60 * 24,\n serialize = stringify as Required<\n StoragePersisterOptions\n >['serialize'],\n deserialize = parse as Required<\n StoragePersisterOptions\n >['deserialize'],\n prefix = PERSISTER_KEY_PREFIX,\n filters,\n}: StoragePersisterOptions) {\n return async function persisterFn(\n queryFn: (context: QueryFunctionContext) => T | Promise,\n context: QueryFunctionContext,\n query: Query\n ) {\n const storageKey = `${prefix}-${query.queryHash}`;\n const matchesFilter = filters ? matchQuery(filters, query) : true;\n\n // Try to restore only if we do not have any data in the cache and we have persister defined\n if (matchesFilter && query.state.data === undefined && storage != null) {\n try {\n const storedData = await storage.getItem(storageKey);\n if (storedData) {\n const persistedQuery = await deserialize(storedData);\n\n if (persistedQuery.state.dataUpdatedAt) {\n const queryAge = Date.now() - persistedQuery.state.dataUpdatedAt;\n const expired = queryAge > maxAge;\n const busted = persistedQuery.buster !== buster;\n if (expired || busted) {\n await storage.removeItem(storageKey);\n } else {\n // Just after restoring we want to get fresh data from the server always\n setTimeout(() => {\n // Set proper updatedAt, since resolving in the first pass overrides those values\n query.setState({\n dataUpdatedAt: persistedQuery.state.dataUpdatedAt,\n errorUpdatedAt: persistedQuery.state.errorUpdatedAt,\n });\n\n // Fetch the latest data\n query.fetch();\n }, 0);\n // We must resolve the promise here, as otherwise we will have `loading` state in the app until `queryFn` resolves\n return Promise.resolve(persistedQuery.state.data as T);\n }\n } else {\n await storage.removeItem(storageKey);\n }\n }\n } catch (err) {\n if (process.env.NODE_ENV === 'development') {\n console.error(err);\n console.warn(\n 'Encountered an error attempting to restore query cache from persisted location.'\n );\n }\n await storage.removeItem(storageKey);\n }\n }\n\n // If we did not restore, or restoration failed - fetch\n const queryFnResult = await queryFn(context);\n\n if (matchesFilter && storage != null) {\n // Persist if we have storage defined, we use timeout to get proper state to be persisted\n setTimeout(async () => {\n storage.setItem(\n storageKey,\n await serialize({\n state: query.state,\n queryKey: query.queryKey,\n queryHash: query.queryHash,\n buster: buster,\n })\n );\n }, 0);\n }\n\n return Promise.resolve(queryFnResult);\n };\n}\n\nconst createClient = () => {\n const persister = experimental_createPersister({\n storage: createIDBAsyncStorage(),\n // this is the age of the persisted cache - if a stored cache is older than 24 hrs, it will not be loaded\n // only time this happens is if the user hasn't used the app for a prolonged period of time\n // Nuance: this needs to be less than or equal to the cacheTime above\n // https://tanstack.com/query/v5/docs/framework/react/plugins/createPersister\n maxAge: REACT_QUERY_CACHE_MAX_AGE_IN_MS,\n buster: '12', // NOTE - update this if you release some breaking change and want the app to start fresh (rather than loading from caches)\n filters: {\n predicate: (query) => {\n // Only include queries that satisfy the following\n return (\n (query.state.data != null && query.state.error == null) ||\n query.meta?.persist !== false\n );\n },\n },\n });\n\n const client = new QueryClient({\n defaultOptions: {\n queries: {\n // gcTime is the time a query gets garbage collected if it hasn't been used for this amount of time\n gcTime: REACT_QUERY_CACHE_MAX_AGE_IN_MS,\n persister: persister,\n structuralSharing: (oldData, newData) => {\n if (stringify(oldData) === stringify(newData)) {\n return oldData;\n }\n return newData;\n },\n },\n },\n queryCache: new QueryCache({\n onError(error, query) {\n const meta = query.meta as QueryMeta;\n\n if (meta?.onError) {\n meta.onError(error);\n }\n\n if (ApiException.isApiException(error) && error.status === 401) {\n clearIDBCache(); // delete the cache storage before reloading\n window.location.reload();\n }\n },\n }),\n });\n\n return { client, persister };\n};\n\nexport const MainQueryClient = createClient();\n","import { MantineProvider } from '@mantine/core';\nimport { Worker } from '@react-pdf-viewer/core';\nimport { QueryClientProvider } from '@tanstack/react-query';\nimport { ReactQueryDevtools } from '@tanstack/react-query-devtools';\nimport clsx from 'clsx';\nimport { useEffect } from 'react';\nimport { DndProvider } from 'react-dnd';\nimport { TouchBackend } from 'react-dnd-touch-backend';\nimport { Outlet } from 'react-router-dom';\nimport { dataThemeAttributeName } from 'src/app/constants';\nimport { DocumentInfo } from 'src/components/SignUp/DocumentInfo';\nimport { SignUpRedirect } from 'src/components/SignUp/SignUpRedirect';\nimport {\n AppContextProvider,\n AppTelemetryProvider,\n useAppContext,\n} from 'src/contexts/AppContext';\nimport { BulkEditHubContextProvider } from 'src/contexts/BulkEditHubContext';\nimport { SiteContentProvider } from 'src/contexts/ContentContext';\nimport { DialogProvider } from 'src/contexts/DialogContext/DialogContext';\nimport { EmailPurchaseOrderContextProvider } from 'src/contexts/EmailPurchaseOrderContext/EmailPurchaseOrderContext';\nimport { ErrorBoundaryContextProvider } from 'src/contexts/ErrorBoundaryContext';\nimport { GenericDialogProvider } from 'src/contexts/GenericDialogContext/GenericDialogContext';\nimport { LocalizationContextProvider } from 'src/contexts/LocalizationContext';\nimport { MenuContextProvider } from 'src/contexts/MenuContext/MenuContext';\nimport { NotificationsContextProvider } from 'src/contexts/NotificationsContext';\nimport { ScreenSizeProvider } from 'src/contexts/ScreenSizeContext/ScreenSizeContext';\nimport { SellerAccountContextProvider } from 'src/contexts/SellerAccountContext';\nimport { SellerRoleContextProvider } from 'src/contexts/SellerRoleContext';\nimport { SignUpContextProvider } from 'src/contexts/SignUpContext/SignUpContext';\nimport {\n SiteThemeContextProvider,\n useSiteTheme,\n} from 'src/contexts/SiteTheme/SiteThemeContext';\nimport { SiteTimezoneContextProvider } from 'src/contexts/SiteTimezoneContext/SiteTimezoneContext';\nimport { PosSpinner } from 'src/core/POS/PosSpinner';\nimport {\n PurpleLegacyTheme,\n purpleTheme,\n TicketUtilLegacyTheme,\n ticketUtilTheme,\n} from 'src/core/themes';\nimport { DarkLegacyTheme } from 'src/core/themes/darkLegacyTheme';\nimport { darkTheme } from 'src/core/themes/darkTheme.css';\nimport { useMemoryTelemetry } from 'src/hooks/useMemoryTelemetry';\nimport { useNetworkState } from 'src/hooks/useNetworkState';\nimport { MainRoute } from 'src/navigations/Routes/MainRoute';\nimport { Offline } from 'src/navigations/Routes/Offline';\nimport { CoBrandId } from 'src/WebApiController';\nimport { ThemeProvider } from 'styled-components/macro';\n\nimport * as styles from './App.css';\nimport { AppLayout } from './App.styled';\nimport { MainQueryClient } from './QueryClients';\n\nconst touchBackendOptions = { enableMouseEvents: true };\n\nfunction AppContent() {\n const { appContext, cobrandId, mainRoute } = useAppContext();\n const isOnline = useNetworkState();\n const { isDarkMode } = useSiteTheme();\n useMemoryTelemetry();\n\n useEffect(() => {\n document.body.setAttribute(dataThemeAttributeName, 'light');\n\n if (cobrandId === CoBrandId.TicketUtil) {\n document.body.classList.toggle(ticketUtilTheme, true);\n document.body.classList.remove(purpleTheme);\n document.body.classList.remove(darkTheme);\n } else if (isDarkMode) {\n document.body.classList.toggle(darkTheme, true);\n document.body.setAttribute(dataThemeAttributeName, 'dark');\n document.body.classList.remove(ticketUtilTheme);\n document.body.classList.remove(purpleTheme);\n } else {\n document.body.classList.toggle(purpleTheme, true);\n document.body.classList.remove(ticketUtilTheme);\n document.body.classList.remove(darkTheme);\n }\n }, [cobrandId, isDarkMode]);\n\n if (!appContext) {\n return null;\n }\n\n return (\n \n \n \n \n \n \n \n \n {/* See https://github.com/react-dnd/react-dnd/issues/3257#issuecomment-1239254032 */}\n \n \n \n \n \n \n {/* Required for pdf viewer to work https://react-pdf-viewer.dev/docs/basic-usage/ */}\n \n \n \n \n \n {appContext === undefined ? (\n isOnline ? (\n \n \n \n ) : (\n \n )\n ) : (\n \n )}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n\nexport function App() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n\nexport default App;\n","import * as Sentry from '@sentry/react';\nimport { createBrowserRouter, Navigate, redirect } from 'react-router-dom';\nimport { Content } from 'src/contexts/ContentContext';\nimport { Stack } from 'src/core/ui';\nimport { Activity } from 'src/navigations/Routes/Activity';\nimport { AdCampaign } from 'src/navigations/Routes/AdCampaign';\nimport { AdGroupListings } from 'src/navigations/Routes/AdGroupListings';\nimport { Email, EmailNavPageNameHandle } from 'src/navigations/Routes/Email';\nimport { HelpCenter } from 'src/navigations/Routes/HelpCenter';\nimport { Home } from 'src/navigations/Routes/Home';\nimport { Inventory } from 'src/navigations/Routes/Inventory';\nimport { InventoryEvent } from 'src/navigations/Routes/InventoryEvent';\nimport { InventoryEventPageRedirect } from 'src/navigations/Routes/InventoryEvent/InventoryEventPageRedirect';\nimport { InventoryEventV2 } from 'src/navigations/Routes/InventoryEvent/InventoryEventV2';\nimport { InventorySearch } from 'src/navigations/Routes/InventorySearch';\nimport {\n Login,\n LoginCallback,\n LoginFailure,\n Logout,\n} from 'src/navigations/Routes/Login';\nimport { MainRoute } from 'src/navigations/Routes/MainRoute';\nimport { Notifications } from 'src/navigations/Routes/Notifications';\nimport { OnSaleEvent } from 'src/navigations/Routes/OnSaleEvent';\nimport { Payments } from 'src/navigations/Routes/Payments';\nimport { PurchaseEvent } from 'src/navigations/Routes/PurchaseEvent/PurchaseEvent';\nimport { Purchases } from 'src/navigations/Routes/Purchases';\nimport { PurchaseSearch } from 'src/navigations/Routes/PurchaseSearch/PurchaseSearch';\nimport { RedirectToStubHubUk } from 'src/navigations/Routes/RedirectToStubHubUk';\nimport { ReleaseNotes } from 'src/navigations/Routes/ReleaseNotes';\nimport { Reports, ReportsV2 } from 'src/navigations/Routes/Reports';\nimport { ReportsCommission } from 'src/navigations/Routes/ReportsCommission';\nimport { ReportsInventory } from 'src/navigations/Routes/ReportsInventory';\nimport { ReportsInventoryV2 } from 'src/navigations/Routes/ReportsInventory/ReportsInventoryV2';\nimport { ReportsSale } from 'src/navigations/Routes/ReportsSale';\nimport { ReportsSaleV2 } from 'src/navigations/Routes/ReportsSale/ReportsSaleV2';\nimport { Sales } from 'src/navigations/Routes/Sales';\nimport { SaleSearch } from 'src/navigations/Routes/SaleSearch';\nimport { SalesEvent } from 'src/navigations/Routes/SalesEvent/SalesEvent';\nimport { Settings, SettingsViews } from 'src/navigations/Routes/Settings';\nimport { SettingTab } from 'src/navigations/Routes/Settings/constants';\nimport { SyncCenter } from 'src/navigations/Routes/Settings/Views/SyncCenter';\nimport { SignUp } from 'src/navigations/Routes/SignUp';\nimport { SignUpPathname } from 'src/navigations/Routes/SignUp/constants';\nimport { SponsoredListings } from 'src/navigations/Routes/SponsoredListings';\nimport { SaleAlertIcon } from 'src/svgs';\nimport { PaymentsIcon } from 'src/svgs/PaymentsIcon';\nimport {\n ChatIcon,\n ConnectedIcon,\n DollarIcon,\n HomeOutlineIcon,\n PaperTicketsOutlineIcon,\n SearchSolidIcon,\n SellOutlineIcon,\n SettingsIcon,\n} from 'src/svgs/Viagogo';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { DeviceAwareContentWrapper } from 'src/utils/contentUtils';\nimport { RootErrorPage } from 'src/views';\n\nimport App from './App';\n\nexport const AppRouteConfigs = {\n [MainRoute.Home]: {\n view: MainRoute.Home,\n path: '/home',\n label: ,\n icon: HomeOutlineIcon,\n },\n [MainRoute.Inventory]: {\n view: MainRoute.Inventory,\n path: '/inventory',\n label: ,\n icon: PaperTicketsOutlineIcon,\n },\n [MainRoute.Sales]: {\n view: MainRoute.Sales,\n path: '/sales',\n label: (\n \n ),\n icon: SaleAlertIcon,\n },\n [MainRoute.Purchases]: {\n view: MainRoute.Purchases,\n path: '/purchases',\n label: ,\n icon: SellOutlineIcon,\n },\n [MainRoute.Payments]: {\n view: MainRoute.Payments,\n path: '/payments',\n label: ,\n icon: PaymentsIcon,\n },\n [MainRoute.Reports]: {\n view: MainRoute.Reports,\n path: '/reports',\n label: ,\n icon: ConnectedIcon,\n },\n [MainRoute.ReportsV2]: {\n view: MainRoute.ReportsV2,\n path: '/reports/v2',\n label: 'Reports V2', // no need to translate - once we release - we will need to use ContentId.Report again\n icon: ConnectedIcon,\n },\n [MainRoute.SponsoredListings]: {\n view: MainRoute.SponsoredListings,\n path: '/sponsoredlistings',\n label: ,\n icon: DollarIcon,\n },\n [MainRoute.Discovery]: {\n view: MainRoute.Discovery,\n path: '/discovery',\n label: ,\n icon: SearchSolidIcon,\n },\n};\n\nexport const MenuItems = {\n [MainRoute.Email]: {\n view: MainRoute.Email,\n path: '/messages',\n label: ,\n icon: ChatIcon,\n },\n [MainRoute.Settings]: {\n view: MainRoute.Settings,\n path: '/settings',\n label: ,\n icon: SettingsIcon,\n },\n} as const;\n\nconst sentryCreateBrowserRouter =\n Sentry.wrapCreateBrowserRouter(createBrowserRouter);\n\nexport const router = sentryCreateBrowserRouter([\n {\n element: ,\n errorElement: (\n
    \n \n
    \n ),\n children: [\n {\n path: '/',\n loader() {\n return redirect('/start');\n },\n },\n {\n path: '/start',\n element: ,\n },\n {\n path: SignUpPathname,\n element: ,\n },\n {\n path: '/login',\n element: ,\n },\n {\n path: '/login/callback',\n element: ,\n },\n {\n path: '/logout',\n element: ,\n },\n {\n path: '/unauthorized',\n element: ,\n },\n {\n path: AppRouteConfigs[MainRoute.Home].path,\n element: ,\n },\n {\n path: AppRouteConfigs[MainRoute.Inventory].path,\n element: ,\n },\n {\n path: '/inventory/event/v2',\n element: ,\n },\n {\n path: '/inventory/event',\n element: ,\n },\n {\n path: '/inventory/event/:eventId',\n element: ,\n },\n {\n path: '/inventory/search',\n element: ,\n },\n {\n path: AppRouteConfigs[MainRoute.Discovery].path,\n element: ,\n },\n {\n path: AppRouteConfigs[MainRoute.Sales].path,\n element: ,\n },\n {\n path: '/sales/event',\n element: ,\n },\n {\n path: '/sales/search',\n element: ,\n },\n {\n path: AppRouteConfigs[MainRoute.Purchases].path,\n element: ,\n },\n {\n path: AppRouteConfigs[MainRoute.Payments].path,\n element: ,\n },\n {\n path: '/purchases/event',\n element: ,\n },\n {\n path: '/purchases/search',\n element: ,\n },\n {\n path: '/redirect-uk',\n element: ,\n },\n {\n path: '/notifications',\n element: ,\n },\n {\n path: '/release-notes',\n element: ,\n },\n {\n path: '/help',\n element: ,\n },\n {\n path: '/reports/v2',\n element: ,\n },\n {\n path: '/reports',\n element: ,\n },\n {\n path: '/reports/inventory/:reportId',\n element: ,\n },\n {\n path: '/reports/sale/:reportId',\n element: ,\n },\n {\n path: '/reports/inventory/v2/:reportId',\n element: ,\n },\n {\n path: '/reports/commission/v2/:reportId',\n element: ,\n },\n {\n path: '/reports/sale/v2/:reportId',\n element: ,\n },\n {\n path: '/activity',\n element: ,\n },\n {\n path: '/sync-center',\n element: ,\n },\n {\n path: AppRouteConfigs[MainRoute.SponsoredListings].path,\n element: ,\n },\n {\n path: '/sponsoredlistings/adcampaign',\n element: ,\n },\n {\n path: '/sponsoredlistings/adgrouplistings',\n element: ,\n },\n /**\n * Settings Routes\n */\n {\n path: '/settings',\n element: ,\n children: [\n {\n index: true,\n element: (\n \n ),\n },\n {\n path: SettingTab.MyAccount,\n element: ,\n },\n {\n path: SettingTab.CurrencyConversion,\n element: ,\n },\n {\n path: SettingTab.FulfillmentProviders,\n element: ,\n },\n {\n path: SettingTab.PurchaseOrder,\n element: ,\n },\n {\n path: SettingTab.Accounting,\n element: ,\n },\n {\n path: SettingTab.UserManagement,\n element: ,\n children: [\n {\n path: '',\n element: (\n \n \n \n \n \n ),\n },\n {\n path: SettingTab.UserManagement_Users,\n element: ,\n },\n {\n path: SettingTab.UserManagement_Roles,\n element: ,\n },\n {\n path: SettingTab.UserManagement_Teams,\n element: ,\n },\n ],\n },\n {\n path: SettingTab.VendorManagement,\n element: ,\n children: [\n {\n path: '',\n element: (\n \n \n \n \n ),\n },\n {\n path: SettingTab.VendorManagement_Vendors,\n element: ,\n },\n {\n path: SettingTab.VendorManagement_Payments,\n element: ,\n },\n ],\n },\n {\n path: SettingTab.SyncCenter,\n element: ,\n },\n {\n path: SettingTab.SellerAccount,\n element: ,\n },\n {\n path: SettingTab.AutoPricing,\n element: ,\n },\n ],\n },\n {\n path: '/messages',\n element: ,\n children: [\n {\n children: [\n { index: true },\n { path: 'support/:sellerSupportCaseId' },\n { path: ':inboundEmailId' },\n ],\n handle: {\n pageName: 'inbox',\n } satisfies EmailNavPageNameHandle,\n },\n {\n path: 'uncategorized',\n children: [{ index: true }, { path: ':inboundEmailId' }],\n handle: {\n pageName: 'uncategorized',\n } satisfies EmailNavPageNameHandle,\n },\n {\n path: 'recently-categorized',\n children: [{ index: true }, { path: ':inboundEmailId' }],\n handle: {\n pageName: 'recentlyCategorized',\n } satisfies EmailNavPageNameHandle,\n },\n ],\n },\n ],\n },\n]);\n","import * as Sentry from '@sentry/react';\nimport React from 'react';\nimport {\n createRoutesFromChildren,\n matchRoutes,\n useLocation,\n useNavigationType,\n} from 'react-router-dom';\nimport { ReactAppContext } from 'src/WebApiController';\n\nexport const initSentry = (appContext: ReactAppContext) => {\n Sentry.init({\n dsn: 'https://530f5d7e8881f403994c55895d5b1248@o4507805351280640.ingest.us.sentry.io/4508122587529216',\n environment: appContext?.environment || 'unknown-env', // DEV, QA, BETA, PROD,\n release: appContext?.version || 'unknown', // UI release number\n integrations: [\n Sentry.reactRouterV6BrowserTracingIntegration({\n useEffect: React.useEffect,\n useLocation,\n useNavigationType,\n createRoutesFromChildren,\n matchRoutes,\n }),\n Sentry.browserProfilingIntegration(),\n ],\n // Tracing\n tracesSampleRate: 0.5,\n profilesSampleRate: 0.5,\n\n // Session Replay\n replaysSessionSampleRate: 0.0,\n replaysOnErrorSampleRate: 0.0,\n });\n};\n","import 'bootstrap/dist/css/bootstrap.css';\nimport './index.css';\n\nimport { createRoot } from 'react-dom/client';\nimport { RouterProvider } from 'react-router-dom';\n\nimport { router } from './app/AppRoutes';\nimport { initSentry } from './utils/sentry';\nimport { AdminClient } from './WebApiController';\n\nnew AdminClient({})\n .getAppContext()\n .then((appContext) => initSentry(appContext));\n\nconst container = document.getElementById('root');\nconst root = createRoot(container!);\nroot.render();\n"],"names":["MainRoute","SignUp","Login","LoginCallback","Logout","LoginFailure","Home","Inventory","InventorySearch","Sales","SalesSearch","Purchases","PurchaseSearch","RedirectToUK","SellerAccountSetting","Activity","Notifications","ReleaseNotes","Reports","ReportsV2","SyncCenter","Email","Settings","SponsoredListings","Payments","Discovery","HelpCenter","InventoryEvent","PurchasesEvent","SalesEvent","getCurrentLanguage","navigator","languages","length","language","getCurrentLanguages","generateAcceptLanguage","join","getLocaleFromLanguage","getDateFnsLocale","replaceAll","getLocaleFromLanguageOrCurrent","locale","Locales","compareLocaleLowercased","a","b","aL","toLocaleLowerCase","bL","PosClientBase","constructor","configuration","transformOptions","options","headers","activeAccountId","Promise","resolve","ActivityLogClient","baseUrl","http","jsonParseReviver","window","getActivityLog","entityId","entityType","url_","Error","undefined","encodeURIComponent","replace","options_","method","then","transformedOptions_","fetch","_response","processGetActivityLog","response","status","_headers","forEach","v","k","text","_responseText","result200","JSON","parse","throwException","getActivityLogByFilter","query","body","stringify","processGetActivityLogByFilter","getActivityLogWithAuditByFilter","processGetActivityLogWithAuditByFilter","getActivityLogTagNamesByEntityId","processGetActivityLogTagNamesByEntityId","getRecentActivityLog","count","includeEventInfo","processGetRecentActivityLog","trackEntityView","processTrackEntityView","trackListingCompsView","listingId","processTrackListingCompsView","trackListingDocumentView","documentId","documentType","processTrackListingDocumentView","trackListingDocumentDownload","processTrackListingDocumentDownload","AddressClient","getKnownCountries","processGetKnownCountries","getStateProvinces","processGetStateProvinces","getCitiesWithStateProvince","processGetCitiesWithStateProvince","getCitiesWithoutStateProvince","processGetCitiesWithoutStateProvince","AdminClient","getAppContext","processGetAppContext","AdPlatformCatalogClient","getCatalogForSeller","processGetCatalogForSeller","AutoPoClient","getInboundEmails","take","skip","processGetInboundEmails","getClassifiedInboundEmails","classificationTypes","isSortDescending","processGetClassifiedInboundEmails","getClassifiedInboundEmailsCount","processGetClassifiedInboundEmailsCount","getPartialPurchaseOrderInboundEmails","processGetPartialPurchaseOrderInboundEmails","getPartialPurchaseOrderInboundEmailsCount","processGetPartialPurchaseOrderInboundEmailsCount","getPartialPurchaseOrder","partialPurchaseOrderId","processGetPartialPurchaseOrder","getSingleInboundEmailThread","inboundEmailId","processGetSingleInboundEmailThread","getPurchaseInboundEmailThread","purchaseOrderId","isClassified","processGetPurchaseInboundEmailThread","getSaleInboundEmailThread","saleId","processGetSaleInboundEmailThread","getPrivateInboundEmailThread","toEmailAddress","classificationType","processGetPrivateInboundEmailThread","getInboundEmailBody","processGetInboundEmailBody","getAutoPoClassifiedInboundEmailIdForEntity","processGetAutoPoClassifiedInboundEmailIdForEntity","classifyInboundEmail","processClassifyInboundEmail","unclassifyInboundEmail","processUnclassifyInboundEmail","canReprocessEmail","processCanReprocessEmail","getInboundEmailSellerGuidIds","processGetInboundEmailSellerGuidIds","getSellerAccountCountryRestrictions","processGetSellerAccountCountryRestrictions","getSellerAccountVendorRestrictions","processGetSellerAccountVendorRestrictions","upsertSellerAccountCountryRestrictions","countryRestrictions","processUpsertSellerAccountCountryRestrictions","upsertSellerAccountVendorRestrictions","vendorRestrictions","processUpsertSellerAccountVendorRestrictions","BulkEditListingClient","cancelBackgroundTask","updateKey","processCancelBackgroundTask","bulkUpdateListingsPricesPreview","processBulkUpdateListingsPricesPreview","bulkUpdateListingsPricesByPercent","preview","percent","supportBackgroundProgress","processBulkUpdateListingsPricesByPercent","bulkUpdateListingsPrices","priceChange","processBulkUpdateListingsPrices","bulkUpdatePriceFloorCeilingPreview","processBulkUpdatePriceFloorCeilingPreview","bulkUpdatePriceFloor","amount","isRelative","adjustmentType","processBulkUpdatePriceFloor","bulkUpdatePriceCeiling","percentMarketPrice","processBulkUpdatePriceCeiling","bulkUngroupListingsPreview","processBulkUngroupListingsPreview","bulkUngroupListings","processBulkUngroupListings","bulkRemovePredeliveryPreview","processBulkRemovePredeliveryPreview","bulkRemovePredelivery","removeBarcodes","removePdfs","processBulkRemovePredelivery","bulkUpdateMarketplaceSeatingOverridesPreview","processBulkUpdateMarketplaceSeatingOverridesPreview","bulkUpdateMarketplaceSeatingOverrides","input","processBulkUpdateMarketplaceSeatingOverrides","bulkChangeEventPreview","processBulkChangeEventPreview","bulkChangeEvent","posEventId","viagogoEventId","eventMappingId","deallocateSales","reason","processBulkChangeEvent","bulkUpdateAutoPricingSettingsPreview","processBulkUpdateAutoPricingSettingsPreview","bulkUpdateAutoPricingSettings","processBulkUpdateAutoPricingSettings","bulkUpdateAutoPricingSettingsV2","processBulkUpdateAutoPricingSettingsV2","bulkGetListingPriceCalculationsInEvent","processBulkGetListingPriceCalculationsInEvent","bulkUpdateGeneralSettingsPreview","hasPurchaseUpdates","processBulkUpdateGeneralSettingsPreview","bulkUpdateGeneralSettings","processBulkUpdateGeneralSettings","bulkUpdateMarketplacePrices","processBulkUpdateMarketplacePrices","bulkUpdateMarketplacePricesPreview","processBulkUpdateMarketplacePricesPreview","bulkBroadcastListingsPreview","processBulkBroadcastListingsPreview","bulkBroadcastListings","processBulkBroadcastListings","bulkUpdateAdminHoldPreview","processBulkUpdateAdminHoldPreview","bulkUpdateAdminHold","adminHoldExpirationDate","adminHoldNotes","processBulkUpdateAdminHold","bulkUpdateTicketTypeRulesPreview","updateSalesOfListings","processBulkUpdateTicketTypeRulesPreview","bulkUpdateTicketTypeRules","processBulkUpdateTicketTypeRules","bulkUpdateTagsPreview","processBulkUpdateTagsPreview","bulkUpdateTags","tagName","tagValue","processBulkUpdateTags","bulkRemoveTags","processBulkRemoveTags","bulkCreateListingGroups","processBulkCreateListingGroups","bulkAutoCompAndGroupListingsV2","processBulkAutoCompAndGroupListingsV2","bulkUpdatePurchaseCommissionsPreview","processBulkUpdatePurchaseCommissionsPreview","bulkUpdatePurchaseCommissions","processBulkUpdatePurchaseCommissions","bulkDeleteSeatSaversPreview","processBulkDeleteSeatSaversPreview","bulkDeleteSeatSavers","processBulkDeleteSeatSavers","bulkUpdateInternalNotesPreview","processBulkUpdateInternalNotesPreview","bulkUpdateInternalNotes","isUpdate","searchString","replaceString","processBulkUpdateInternalNotes","bulkUpdateIsNoFulfillPreview","processBulkUpdateIsNoFulfillPreview","bulkUpdateIsNoFulfill","isNoFulfill","processBulkUpdateIsNoFulfill","bulkUpdateDeliveryTypePreview","processBulkUpdateDeliveryTypePreview","bulkUpdateDeliveryType","processBulkUpdateDeliveryType","bulkUpdateSeatTraitsPreview","processBulkUpdateSeatTraitsPreview","bulkUpdateSeatTraits","appendSeatTraits","processBulkUpdateSeatTraits","bulkWasteTicketsPreview","processBulkWasteTicketsPreview","bulkWasteTickets","processBulkWasteTickets","BulkEditListingGroupClient","bulkEditListingsGroupSettingsPreview","processBulkEditListingsGroupSettingsPreview","bulkEditListingGroupSettings","processBulkEditListingGroupSettings","BulkEditPurchaseClient","bulkUpdateCurrencyCodePreview","processBulkUpdateCurrencyCodePreview","bulkUpdateCurrencyCode","processBulkUpdateCurrencyCode","bulkDeletePurchaseOrderPreview","processBulkDeletePurchaseOrderPreview","bulkVoidPurchaseOrder","processBulkVoidPurchaseOrder","bulkCancelPurchaseOrder","rejectSale","processBulkCancelPurchaseOrder","bulkConvertPurchasePaymentPreview","processBulkConvertPurchasePaymentPreview","bulkConvertPurchasePayment","fromCurrencyCode","toCurrencyCode","conversionRate","processBulkConvertPurchasePayment","bulkBackfillDeliverySettingsPreview","applyToAllEvents","processBulkBackfillDeliverySettingsPreview","bulkBackfillDeliverySettings","processBulkBackfillDeliverySettings","bulkBackfillDeliverySettingsListingOnly","processBulkBackfillDeliverySettingsListingOnly","importPurchaseFromFile","file","content_","FormData","append","data","fileName","processImportPurchaseFromFile","bulkMarkPurchaseAsPaidPreview","processBulkMarkPurchaseAsPaidPreview","bulkMarkPurchaseAsPaid","processBulkMarkPurchaseAsPaid","BulkEditSaleClient","bulkUpdatePaymentFieldsPreview","processBulkUpdatePaymentFieldsPreview","bulkUpdatePaymentFields","paymentReceived","paymentReferenceId","processBulkUpdatePaymentFields","bulkUpdateMarkAsFulfilledPreview","processBulkUpdateMarkAsFulfilledPreview","bulkUpdateMarkAsFulfilled","processBulkUpdateMarkAsFulfilled","bulkMarkSaleAsPaidPreview","processBulkMarkSaleAsPaidPreview","bulkMarkSaleAsPaid","paymentRefId","paymentDate","marketplace","processBulkMarkSaleAsPaid","bulkCancelSalePreview","processBulkCancelSalePreview","bulkCancelSale","keepAllocatedTickets","processBulkCancelSale","BulkEditTicketGroupClient","bulkDeleteTicketGroupPreview","processBulkDeleteTicketGroupPreview","bulkDeleteTicketGroup","processBulkDeleteTicketGroup","CampaignManagerClient","createCampaign","name","state","budget","startDateTime","endDateTime","currencyCode","processCreateCampaign","createAdGroup","request","processCreateAdGroup","archiveCampaign","campaignId","processArchiveCampaign","archiveAdGroup","adGroupId","processArchiveAdGroup","retrieveCampaigns","processRetrieveCampaigns","retrieveAdGroups","processRetrieveAdGroups","CatalogClient","getCatalogForSales","includeCounts","processGetCatalogForSales","getCatalogForPurchaseOrders","processGetCatalogForPurchaseOrders","getCatalogForSaleBySaleId","processGetCatalogForSaleBySaleId","getCatalogBySaleIds","saleIds","processGetCatalogBySaleIds","getCatalogSaleMetrics","processGetCatalogSaleMetrics","getCatalogTicketGroupMetrics","processGetCatalogTicketGroupMetrics","getDefaultEventGroupingQuery","processGetDefaultEventGroupingQuery","searchEvents","processSearchEvents","getSearchEventsAutoCompleteResult","searchText","maxCount","timeFrame","processGetSearchEventsAutoCompleteResult","getCatalogForListing","processGetCatalogForListing","getCatalogForListingByListingId","processGetCatalogForListingByListingId","getCatalogListingMetrics","processGetCatalogListingMetrics","getEventDetailedListingMetrics","processGetEventDetailedListingMetrics","getSummaryMetricsForListings","allMetrics","processGetSummaryMetricsForListings","getCatalogHomeMetrics","processGetCatalogHomeMetrics","requestEventMapping","processRequestEventMapping","getCatalogForUpcomingOnSales","processGetCatalogForUpcomingOnSales","getCatalogForOnSaleEvents","processGetCatalogForOnSaleEvents","getCatalogOnSaleEventMetrics","processGetCatalogOnSaleEventMetrics","searchOnSaleEvents","processSearchOnSaleEvents","getCatalog","viagogoVirtualIds","processGetCatalog","getCatalogCountForSales","processGetCatalogCountForSales","getCatalogCountForPurchaseOrders","processGetCatalogCountForPurchaseOrders","getCatalogCountForListings","processGetCatalogCountForListings","getCatalogMetricsForTicketGroups","rowVersion","processGetCatalogMetricsForTicketGroups","getCatalogMetricsForSales","processGetCatalogMetricsForSales","getCatalogMetricsForListings","processGetCatalogMetricsForListings","getCatalogDetailedMetricsForListings","processGetCatalogDetailedMetricsForListings","ClientLogClient","log","logRequest","processLog","ContentClient","getContentDataMap","processGetContentDataMap","DocumentProcessorClient","getDocumentUploadInfo","contentType","processGetDocumentUploadInfo","uploadDocumentForSale","blobName","processUploadDocumentForSale","uploadDocumentForListing","processUploadDocumentForListing","uploadDocumentWithoutProcessing","processUploadDocumentWithoutProcessing","getDocumentPages","processGetDocumentPages","result204","result202","EventConfigClient","getVenueMapForEvent","eventId","processGetVenueMapForEvent","getVenueMapsByScoreModelForEvent","processGetVenueMapsByScoreModelForEvent","getListingConstraintsForEvents","eventIds","processGetListingConstraintsForEvents","getSellerEventMarketplaceEventInfo","processGetSellerEventMarketplaceEventInfo","updateSellerEventMarketplaceEventInfos","marketplaceEventInfos","processUpdateSellerEventMarketplaceEventInfos","getTagsForEvent","viagogoVirtualId","processGetTagsForEvent","getMarketTransactionsForEvent","topN","processGetMarketTransactionsForEvent","updateTagsForEvent","tags","processUpdateTagsForEvent","getInternalNotesForEvent","processGetInternalNotesForEvent","updateInternalNotesForEvent","internalNote","processUpdateInternalNotesForEvent","getLastReviewedDateTimeForEvents","processGetLastReviewedDateTimeForEvents","updateLastReviewedDateTimeForEvent","lastReviewedDateTime","processUpdateLastReviewedDateTimeForEvent","getSellerEventNotesByViagogoEventId","processGetSellerEventNotesByViagogoEventId","insertSellerEventNotes","content","processInsertSellerEventNotes","updateSellerEventGroupingMethods","groupingMethods","processUpdateSellerEventGroupingMethods","mergeSellerAccountEventSettingsForDelivery","sellerAccountEventSettings","processMergeSellerAccountEventSettingsForDelivery","getSellerAccountEventSettings","processGetSellerAccountEventSettings","FulfillmentProviderClient","getFulfillmentProviderSettings","processGetFulfillmentProviderSettings","toggleFulfillmentProviderSetting","fulfillmentProviderSellerUserId","newState","processToggleFulfillmentProviderSetting","InventoryEventDashboardClient","getEventWebsiteMetrics","queryId","timePeriod","processGetEventWebsiteMetrics","getEventDemandFactors","processGetEventDemandFactors","getSellerEventDashboardMetrics","processGetSellerEventDashboardMetrics","getBuyerEventDashboardMetrics","processGetBuyerEventDashboardMetrics","getEventSectionClearingPrices","processGetEventSectionClearingPrices","getEventSupplyMetrics","processGetEventSupplyMetrics","ListingClient","getListingByListingId","inventoryId","current","dataToInclude","item","processGetListingByListingId","getListingAvailableQuantitiesByListingIds","inventoryIds","processGetListingAvailableQuantitiesByListingIds","getListingByMarketplaceListingId","marketplaceListingId","processGetListingByMarketplaceListingId","getListingsForEvents","useReadonlyDB","doNotProcessListingGroups","processGetListingsForEvents","getListingsSectionalDataForEvents","processListingGroup","processGetListingsSectionalDataForEvents","getListingsCanBeWasted","processGetListingsCanBeWasted","getDuplicateListingsForListingId","processGetDuplicateListingsForListingId","getListingEnabledForAutoPricing","posEventIds","processGetListingEnabledForAutoPricing","updateAutoPricingEnabledForEvent","autoPricingState","processUpdateAutoPricingEnabledForEvent","createMarketplaceListings","marketplaces","processCreateMarketplaceListings","deleteMarketplaceListings","processDeleteMarketplaceListings","updateListingAdminHold","processUpdateListingAdminHold","updateListingIgnoreDuplicate","ignoreDuplicate","processUpdateListingIgnoreDuplicate","updateListing","processUpdateListing","updateListingPrices","listPrice","netProceedsFloor","processUpdateListingPrices","updateListingsPricingSettings","processUpdateListingsPricingSettings","mergeListings","processMergeListings","bulkMergeListings","processBulkMergeListings","getListingMergeSuggestionsByEvent","excludeHeldListings","processGetListingMergeSuggestionsByEvent","getListingMergeSuggestions","processGetListingMergeSuggestions","splitListings","processSplitListings","updateBarcodesForListing","barcodes","processUpdateBarcodesForListing","updateETicketsForListing","etickets","processUpdateETicketsForListing","updateMobileQRCodesForListing","mobileQRCodes","processUpdateMobileQRCodesForListing","updateExternalIdsForListing","externalIds","processUpdateExternalIdsForListing","updateTicketUrlsForListing","ticketUrls","processUpdateTicketUrlsForListing","updateProofOfPurchaseForListing","proofDocs","processUpdateProofOfPurchaseForListing","getPriceHistoryByListingId","processGetPriceHistoryByListingId","getCompListingsByEventId","currency","processGetCompListingsByEventId","getListingPriceCalculation","processGetListingPriceCalculation","exportListings","processExportListings","contentDisposition","get","fileNameMatch","exec","decodeURIComponent","blob","createSeatSaver","inputs","processCreateSeatSaver","deleteSeatSaver","processDeleteSeatSaver","batchSwapListingGroup","processBatchSwapListingGroup","reorderListingInGroup","processReorderListingInGroup","updateListingBroadcastSection","processUpdateListingBroadcastSection","updateListingTicketSection","processUpdateListingTicketSection","updateListingPricingSection","processUpdateListingPricingSection","updateListingAutoPricingSection","processUpdateListingAutoPricingSection","updateListingAutoPricingSectionV2","processUpdateListingAutoPricingSectionV2","updateListingTagSection","processUpdateListingTagSection","downloadMergedUserDocumentsPdf","processDownloadMergedUserDocumentsPdf","getListingStatusByListingId","processGetListingStatusByListingId","ListingExperimentClient","getListingExperimentsByViagogoEventId","processGetListingExperimentsByViagogoEventId","createListingExperiment","listingExperiment","processCreateListingExperiment","updateListingExperiment","processUpdateListingExperiment","restartListingExperiment","processRestartListingExperiment","stopListingExperiment","listingGroupId","processStopListingExperiment","ListingGroupClient","ungroupListings","processUngroupListings","setListingActiveInGroup","isActive","processSetListingActiveInGroup","createListingGroup","processCreateListingGroup","updateListingGroup","processUpdateListingGroup","getEmptyListingGroup","processGetEmptyListingGroup","autoCompSettingsPreview","processAutoCompSettingsPreview","autoGroupListingsPreview","processAutoGroupListingsPreview","autoGroupListingsPreviewV2","processAutoGroupListingsPreviewV2","addListingsToListingGroup","processAddListingsToListingGroup","getListingGroupCompData","processGetListingGroupCompData","ListingNoteClient","getAccessibleListingNotes","processGetAccessibleListingNotes","LoginClient","getLoginContext","returnUrl","processGetLoginContext","getLoginContextAfterAuthorization","processGetLoginContextAfterAuthorization","setActiveAccount","accountId","impersonatedUserId","processSetActiveAccount","logout","processLogout","MarketplacePaymentClient","getMarketplacePayments","processGetMarketplacePayments","getMarketplacePaymentById","marketplacePaymentId","processGetMarketplacePaymentById","getMonthsContainerMarketplacePayments","processGetMonthsContainerMarketplacePayments","getPaymentLinesWithSales","processGetPaymentLinesWithSales","convertMarketplacePaymentAmount","convertedPaymentAmount","convertedPaymentCurrencyCode","processConvertMarketplacePaymentAmount","addMarketplacePaymentLineToSaleLineItems","marketplacePaymentLineId","saleLineItems","processAddMarketplacePaymentLineToSaleLineItems","removeMarketplacePaymentLineFromSaleLineItems","processRemoveMarketplacePaymentLineFromSaleLineItems","linkMarketplacePaymentLine","processLinkMarketplacePaymentLine","unlinkMarketplacePaymentLine","processUnlinkMarketplacePaymentLine","MoneyClient","getConvertedMoneyAmount","valuesToConvert","processGetConvertedMoneyAmount","getAvailableCurrencies","processGetAvailableCurrencies","NotificationClient","getActiveNotifications","processGetActiveNotifications","getNotification","notificationId","processGetNotification","dismissNotification","processDismissNotification","PricingClient","mergeListingGroupPricingSettings","processMergeListingGroupPricingSettings","updateListingGroupPricingSettings","processUpdateListingGroupPricingSettings","getListingGroupAutoPricingSettings","processGetListingGroupAutoPricingSettings","mergeEventPricingSettings","processMergeEventPricingSettings","getEventAutoPricingSettings","processGetEventAutoPricingSettings","getAccountAutoPricingSettings","processGetAccountAutoPricingSettings","getEventSeatMapScoreOverrides","venueConfigId","processGetEventSeatMapScoreOverrides","getEventSeatMapScoreOverridesForSellerAccount","processGetEventSeatMapScoreOverridesForSellerAccount","getEventSellThroughRates","processGetEventSellThroughRates","getListingGroupSellThroughRates","processGetListingGroupSellThroughRates","getEventSellThroughRateTargets","processGetEventSellThroughRateTargets","setEventSellThroughRateTargets","sellThroughRateTargets","processSetEventSellThroughRateTargets","getAutoPricingStrategies","processGetAutoPricingStrategies","upsertAutoPricingStrategy","processUpsertAutoPricingStrategy","deleteAutoPricingStrategy","autoPricingSettingsCollectionId","processDeleteAutoPricingStrategy","setEventSeatMapScoreOverride","eventConfigScoreOverrideId","scoreModel","processSetEventSeatMapScoreOverride","upsertEventSeatMapScoreOverride","processUpsertEventSeatMapScoreOverride","deleteEventSeatMapScoreOverride","processDeleteEventSeatMapScoreOverride","downloadSeatScoreFile","processDownloadSeatScoreFile","uploadSeatScoreFile","toString","processUploadSeatScoreFile","resetListingAutoPricingSettingsInGroup","processResetListingAutoPricingSettingsInGroup","upsertAutoCompSettings","processUpsertAutoCompSettings","getAutoCompSettings","processGetAutoCompSettings","getListingAutoPricingSettings","processGetListingAutoPricingSettings","getVenueMapZoneConfigInfo","configId","processGetVenueMapZoneConfigInfo","getPricingConfigFromEventIds","processGetPricingConfigFromEventIds","setVenueZoneSelectedConfigType","venueZoneOverrideId","venueZoneConfigType","setMapAsDefault","processSetVenueZoneSelectedConfigType","getVenueMapZoneInfoOverrides","processGetVenueMapZoneInfoOverrides","getActiveVenueZoneMapSectionGroups","processGetActiveVenueZoneMapSectionGroups","upsertVenueZoneSectionGroupOverrides","processUpsertVenueZoneSectionGroupOverrides","getEventMapConfigMetadata","processGetEventMapConfigMetadata","PurchaseClient","getPurchaseOrderByPurchaseOrderId","processGetPurchaseOrderByPurchaseOrderId","getPurchaseOrdersByVendorOrderId","orderId","processGetPurchaseOrdersByVendorOrderId","getPurchaseOrders","processGetPurchaseOrders","getPurchaseOrdersWithTicketGroups","processGetPurchaseOrdersWithTicketGroups","getTicketGroupsForEvents","processGetTicketGroupsForEvents","getAccessibleVendors","getDeliveryOverride","getVendorAccountsCount","processGetAccessibleVendors","getAccessibleAccessControlProviders","processGetAccessibleAccessControlProviders","getAccessibleVendorAccounts","processGetAccessibleVendorAccounts","getVendorAccountDetails","purchaseOrderVendorAccountId","processGetVendorAccountDetails","getPurchaseOrderIdsUsingOrderId","processGetPurchaseOrderIdsUsingOrderId","getIsPurchasingIdsInUse","purchaseOrderVendorId","processGetIsPurchasingIdsInUse","getMonthsContainerPurchaseOrders","processGetMonthsContainerPurchaseOrders","getTimePeriodContainerPurchaseOrders","timePeriodType","processGetTimePeriodContainerPurchaseOrders","insertPurchaseOrder","isManual","processInsertPurchaseOrder","downloadPurchaseFileTemplate","includeEventIdFields","processDownloadPurchaseFileTemplate","updatePurchaseOrder","processUpdatePurchaseOrder","updatePurchasesQualityControlState","processUpdatePurchasesQualityControlState","getVendor","vendorId","processGetVendor","mergeVendor","vendor","processMergeVendor","deleteVendor","processDeleteVendor","mergeVendorAccount","vendorAccount","processMergeVendorAccount","deleteVendorAccount","vendorAccountId","processDeleteVendorAccount","getAllCurrencyConversionOverride","processGetAllCurrencyConversionOverride","insertCurrencyConversionOverride","conversionOverrideRequest","processInsertCurrencyConversionOverride","updateCurrencyConversionOverride","processUpdateCurrencyConversionOverride","deleteCurrencyConversionOverride","currencyConversionOverrideId","processDeleteCurrencyConversionOverride","getAccessiblePurchasePaymentMethods","processGetAccessiblePurchasePaymentMethods","getPurchasePaymentMethodsByName","paymentMethodName","processGetPurchasePaymentMethodsByName","insertPurchasePaymentMethod","processInsertPurchasePaymentMethod","updatePurchasePaymentMethod","processUpdatePurchasePaymentMethod","deletePurchasePaymentMethod","purchasePaymentMethodId","processDeletePurchasePaymentMethod","cancelPurchaseOrder","saleCancellationReason","processCancelPurchaseOrder","voidPurchaseOrder","processVoidPurchaseOrder","restorePurchaseOrder","processRestorePurchaseOrder","getDeliveryOverrideForNewTicketGroup","processGetDeliveryOverrideForNewTicketGroup","mergePurchaseEventOverrides","purchaseEventOverrides","processMergePurchaseEventOverrides","getPurchaseEventOverrides","processGetPurchaseEventOverrides","exportPurchases","selectedTicketGroupsOnly","processExportPurchases","ticketGroupId","ReportClient","getAvailableInventoryReportConfig","processGetAvailableInventoryReportConfig","upsertInventoryReportConfig","reportConfig","processUpsertInventoryReportConfig","upsertInventoryReportConfigOverride","reportConfigId","reportConfigOverride","processUpsertInventoryReportConfigOverride","getAvailableSaleReportConfig","processGetAvailableSaleReportConfig","upsertSaleReportConfig","processUpsertSaleReportConfig","upsertSaleReportConfigOverride","processUpsertSaleReportConfigOverride","deleteReportConfig","processDeleteReportConfig","getListingReportMetrics","maxResultsize","processGetListingReportMetrics","getSaleReportMetrics","processGetSaleReportMetrics","getReportSnapshotInfos","processGetReportSnapshotInfos","downloadSaleReportMetrics","processDownloadSaleReportMetrics","downloadListingReportMetrics","processDownloadListingReportMetrics","ReportV2ConfigClient","getAvailableCommissionReportConfig","processGetAvailableCommissionReportConfig","upsertReportConfigOverride","processUpsertReportConfigOverride","ReportV2Client","getInventoryReportMetrics","processGetInventoryReportMetrics","getInventoryReportSummary","processGetInventoryReportSummary","getSaleReportSummary","processGetSaleReportSummary","getCommissionReportMetrics","processGetCommissionReportMetrics","getCommissionReportSummary","processGetCommissionReportSummary","fileType","downloadCommissionReportMetrics","processDownloadCommissionReportMetrics","SaleClient","getSalesForEvents","requireEventIds","processGetSalesForEvents","getUnableToProcessSales","processGetUnableToProcessSales","getSalesByMarketplaceSaleId","marketplaceSaleId","processGetSalesByMarketplaceSaleId","getSaleBySaleId","processGetSaleBySaleId","confirmAllocationSale","seatingToAllocate","skipAllocationValidation","processConfirmAllocationSale","cancellationReason","processRejectSale","deallocateSale","adminHold","processDeallocateSale","saveETicketAssignments","eticketImages","processSaveETicketAssignments","saveQRCodeAssignments","qrCodes","processSaveQRCodeAssignments","updateBarcodesForSale","ticketBarcodes","processUpdateBarcodesForSale","saveTicketTransferInfo","processSaveTicketTransferInfo","resetFulfillment","removeArtifacts","hasResetFulfillmentKeepArtifactsFeature","processResetFulfillment","markAsFulfilled","processMarkAsFulfilled","getBarcodesAlreadyInUse","processGetBarcodesAlreadyInUse","getTicketExternalIdsAlreadyInUse","processGetTicketExternalIdsAlreadyInUse","getTicketUrlsAlreadyInUse","urls","processGetTicketUrlsAlreadyInUse","expireHold","processExpireHold","getSeatingsForSaleAllocation","allPossibleSeatings","isAllocateSingleTickets","processGetSeatingsForSaleAllocation","exportSales","processExportSales","updateSale","saleInput","processUpdateSale","updateSaleIsNoFulfill","processUpdateSaleIsNoFulfill","mergePosManagedMarketplaceSale","processMergePosManagedMarketplaceSale","createMarketplaceSale","processCreateMarketplaceSale","getAllAvailableBuyers","processGetAllAvailableBuyers","wasteListingTickets","processWasteListingTickets","unwasteSale","processUnwasteSale","getSaleLineItemsBySaleId","processGetSaleLineItemsBySaleId","SearchClient","getPurchaseSearchConfigs","includeAllUsers","processGetPurchaseSearchConfigs","getPurchaseSearchResult","searchConfigId","processGetPurchaseSearchResult","savePurchaseSearchResult","r","processSavePurchaseSearchResult","getSaleSearchConfigs","processGetSaleSearchConfigs","getSaleSearchResult","processGetSaleSearchResult","saveSaleSearchResult","processSaveSaleSearchResult","getInventorySearchConfigs","processGetInventorySearchConfigs","getInventorySearchResult","processGetInventorySearchResult","saveInventorySearchResult","processSaveInventorySearchResult","deleteSearchConfig","processDeleteSearchConfig","SellerAccountClient","getCurrentUserSellerAccounts","processGetCurrentUserSellerAccounts","getSellerUsersForSellerAccount","processGetSellerUsersForSellerAccount","getSelleRolesForSellerAccount","processGetSelleRolesForSellerAccount","getAllSellerPermissions","processGetAllSellerPermissions","updateSellerUser","processUpdateSellerUser","getSellerUser","stubHubLoginId","processGetSellerUser","mergeRolesToSellerUser","processMergeRolesToSellerUser","activateUserForSellerAccountByEmail","email","processActivateUserForSellerAccountByEmail","activateUserForSellerAccount","processActivateUserForSellerAccount","deactivateUserForSellerAccount","processDeactivateUserForSellerAccount","getSyncCenterSettings","processGetSyncCenterSettings","mergeSyncCenterSettings","settings","processMergeSyncCenterSettings","mergeAccountAutoPricingSettings","processMergeAccountAutoPricingSettings","getAutoCurrencyConversionSettings","processGetAutoCurrencyConversionSettings","mergeAutoCurrencyConversionSettings","processMergeAutoCurrencyConversionSettings","getCustomTimeZoneSettings","processGetCustomTimeZoneSettings","mergeCustomTimeZoneSettings","processMergeCustomTimeZoneSettings","updateMarketplaceSellerAccountPassword","password","processUpdateMarketplaceSellerAccountPassword","createSellerRole","processCreateSellerRole","updateSellerRole","processUpdateSellerRole","deleteSellerRole","roleId","processDeleteSellerRole","initiateTradeDeskReset","username","processInitiateTradeDeskReset","resetTradeDeskPassword","processResetTradeDeskPassword","SellerSupportCaseClient","getSellerSupportCaseNotesByCaseId","sellerSupportCaseId","markAsRead","processGetSellerSupportCaseNotesByCaseId","getSellerSupportCases","processGetSellerSupportCases","createSellerSupportCase","processCreateSellerSupportCase","createSellerSupportCaseReply","noteContent","attachments","item_","processCreateSellerSupportCaseReply","updateSellerSupportCasesReadDate","sellerSupportCaseIds","readDate","processUpdateSellerSupportCasesReadDate","retrieveSellerSupportCaseNoteAttachments","attachmentRequests","retrieveContent","processRetrieveSellerSupportCaseNoteAttachments","SellerUserClient","getSellerUserSetting","userSetting","currentLoginUserOnly","processGetSellerUserSetting","getSellerUserSettings","userSettings","processGetSellerUserSettings","setSellerUserSetting","userSettingValue","processSetSellerUserSetting","getCustomInventoryQuickFiltersSetting","processGetCustomInventoryQuickFiltersSetting","setCustomInventoryQuickFiltersSetting","value","processSetCustomInventoryQuickFiltersSetting","getCustomOnSaleEventQuickFiltersSetting","processGetCustomOnSaleEventQuickFiltersSetting","setCustomOnSaleEventQuickFiltersSetting","processSetCustomOnSaleEventQuickFiltersSetting","getCustomSalesQuickFiltersSetting","processGetCustomSalesQuickFiltersSetting","setCustomSalesQuickFiltersSetting","processSetCustomSalesQuickFiltersSetting","getCustomPurchasesQuickFiltersSetting","processGetCustomPurchasesQuickFiltersSetting","setCustomPurchasesQuickFiltersSetting","processSetCustomPurchasesQuickFiltersSetting","getCustomMarketplacePaymentsQuickFiltersSetting","processGetCustomMarketplacePaymentsQuickFiltersSetting","setCustomMarketplacePaymentsQuickFiltersSetting","processSetCustomMarketplacePaymentsQuickFiltersSetting","getAvailableReleaseNoteInfos","getUnreadOnly","processGetAvailableReleaseNoteInfos","getHasReleaseNotesUnread","processGetHasReleaseNotesUnread","getReleaseNoteHtmlByReleaseNoteIds","releaseNoteIds","processGetReleaseNoteHtmlByReleaseNoteIds","getAllTutorialItems","processGetAllTutorialItems","getTutorialItemContents","tutorialItemIds","processGetTutorialItemContents","TagClient","getTagsByEntityTypeId","includeInReport","processGetTagsByEntityTypeId","getTagsWithValueByEntityTypeId","processGetTagsWithValueByEntityTypeId","upsertEntityTagsMetadata","processUpsertEntityTagsMetadata","deleteEntityTagsMetadata","tagNames","processDeleteEntityTagsMetadata","TicketClient","getAllDeliveryTypeTicketTypeMappings","processGetAllDeliveryTypeTicketTypeMappings","mergeTicketGroups","processMergeTicketGroups","UserGroupClient","getUserGroups","processGetUserGroups","insertUserGroup","userGroupName","userGroupDescription","sellerUserIds","processInsertUserGroup","updateUserGroup","userGroupId","processUpdateUserGroup","deleteUserGroup","processDeleteUserGroup","ActionOutboxEntityType","Sale","Listing","Purchase","SellerSupportCase","Document","SellerEvent","InboundEmail","TicketGroup","ActionType","SaleConfirm","SaleReject","SaleUploadBarcodes","SaleUploadTicketUrls","SaleUploadProofOfTransfer","SaleUploadEtickets","SaleMarketplaceInsert","SaleMarketplaceUpdate","SaleBroadcastConfirmSale","SaleBroadcastRejectSale","SaleBroadcastUploadBarcodes","SaleBroadcastUploadETickets","SaleBroadcastUploadTransferProof","SaleBroadcastUploadTransferUrls","SaleViewed","SaleDeallocate","SaleMarketplaceUpdateTicketType","SaleHoldTickets","SaleHoldExpire","SaleHoldCreate","SaleUploadTransferProofId","SaleBroadcastUploadTransferProofId","SaleUpdateTicketType","SaleTicketMasterBarcodeTransfer","SaleCostUpdate","SaleCostInsert","SaleCostDelete","SaleBroadcastUpdateTicketType","SaleConfirmTransferWithoutProof","SaleResetFulfillment","SaleTotalProceedsUpdate","SaleDocumentUploadActivity","SaleFulfillWithoutArtifacts","SaleNoFulfillUpdate","SaleTicketsAllocatedAction","SaleCommissionsUpdate","SaleRemoveTicketUserDocuments","SaleUpdatePaymentState","ListingInsert","ListingUpdateUnitNetProceeds","ListingUpdateAllInPrice","ListingUpdateDeliveryType","ListingUpdateSplitType","ListingUpdateInHandDate","ListingUpdateHideSeats","ListingSplit","ListingMerge","ListingBroadcast","ListingUnbroadcast","ListingMarketplaceInsert","ListingMarketplaceUpdate","ListingMarketplaceDelete","ListingUpdatePricerUserId","BroadcastMarketplaceListing","UnbroadcastMarketplaceListing","ListingBroadcastMergeListing","ListingBroadcastSplitListing","ListingBroadcastUpdateInHandDate","ListingBroadcastUpdateAllInPrice","ListingBroadcastUpdateUnitNetProceeds","ListingBroadcastUpdateSplitType","ListingBroadcastUpdateDeliveryType","ListingViewed","ListingDelete","ListingUpdateQuantity","ListingBroadcastUpdateQuantity","ListingUpdateListingNotes","ListingBroadcastUpdateListingNotes","ListingUpdateSeating","ListingBroadcastUpdateSeating","ListingPreDeliverBarcodes","ListingPreDeliverETickets","ListingRebroadcast","ListingSyncUpdate","ListingUpdateNetProceedsFloor","ListingAutoPricingConfig","ListingAutoPricingResultUpdate","ListingPreDeliverTicketExternalIds","ListingPreDeliverTicketUrls","ListingMarketplaceSeatingOverrideUpdate","ListingRemoveTicketBarcodes","ListingRemoveTicketUserDocuments","ListingUploadVerificationDocumentAction","ListingCompsViewed","ListingOfflineSaleAdded","ListingDocumentViewed","ListingDocumentDownloaded","ListingBroadcastUploadVerificationDocument","ListingBroadcastUpdateHideSeats","ListingDocumentUploadActivity","ListingUpdateUnitCost","ListingUpdateInternalNotes","ListingNoFulfillUpdate","ListingUpdateAdminHold","ListingListingGroupUpdate","ListingSaleConfirm","ListingSaleDeallocate","ListingSaleMarketplaceInsert","ListingUpdateTopTicketType","ListingUpdateDuplicateAttribute","SellerSupportCaseCreate","SellerSupportCaseReply","PurchaseInsert","PurchaseTicketGroupsMerge","PurchasePaymentsMerge","PurchaseCostsMerge","PurchaseUpdate","PurchaseTicketGroupUpdate","PurchaseTicketGroupInsert","PurchaseTicketGroupDelete","PurchasePaymentUpdate","PurchasePaymentInsert","PurchasePaymentDelete","PurchaseCostUpdate","PurchaseCostInsert","PurchaseCostDelete","PurchaseCancel","PurchaseVoid","PurchaseResetListings","PurchaseOrderQualityStateUpdate","SaleDocumentUpload","ListingDocumentUpload","InboundEmailReprocess","AuditActionType","TagCreate","TagUpdate","TagDelete","TagTypeCreate","TagTypeUpdate","SaleInternalNotesUpdate","SaleInternalNotesInsert","ListingSellerEventUpdate","PurchaseCommissionUpdate","PurchaseCommissionInsert","PurchaseInternalNotesUpdate","PurchaseInternalNotesInsert","MarketplaceOperationResultState","Succeeded","FailedWithRetryableError","FailedWithNonRetryableError","FailedAndRequiresSellerAction","NotImplemented","Skipped","ApiEventStatus","Normal","Postponed","Cancelled","Rescheduled","Relocated","RelocatedAndRescheduled","Draft","Deleted","Contingent","TopLevelCategory","Theatre","Sports","Concert","Festival","DocumentType","ETicket","TicketTransfer","AirBill","PKPass","GoogleWallet","ListingVerification","QRCode","CoBrandId","Viagogo","TicketUtil","Starburst","StubHub","Feature","AutoPricing","HomePageActivityLog","OneTicketTransferApi","AdvanceAutopricingModes","CompListingMode_ParentListing","ExportInventory","ListingIdForCompListings","InventoryEventRecentTransactions","ScaledSeatScore","SaleEditChargesAndCredits","SeatSaver","MarketplacePaymentTerms","BulkDownloadEventPrompt","ConfirmTransferWithoutProof","TeamManagement","BezierGraphControlPointsManager","UndercutByRankListingGroup","UpdatedVenueMapPrompt","ReportSnapshot","ReportFilterByCommissionUser","DisplayBuildVersion","OverrideDailyFxRate","PricedAtZeroFilter","POSTimezone","PricingCatchup","PriceByWebsitePrice","InventoryTileMetricV2","ExcludeFanInventory","PurchaseSettingsTab","CurrencyConversionSettingsTab","SalesInEventPage","BulkUpdateInternalNotes","AutoPriceFrequency","TagTypesUserGroup","DisableAutoSourcing","FilterPOByPaymentMethodId","ArAgingReport","MarketplacePaymentLinesDisplay","InventoryEventPageV2","DynamicPricingBySTR","GroupingDrip","AutoPricingGroupSettings","ReportMaxRowLimit","SaleSkyboxNotesSection","EnableDisableMarketplaces","SaleMarkedAsFulfilled","AutoCompAndGroup","ExcludeFullySoldInGroup","ReportingV2","AutoFulfillSetting","BulkCancelVoidPurchase","PurchasePredelivery","PricingSettingsInTable","VenueMapCtrlPlusM","ScoreSectionRowTable","BulkEditInPurchaseEvent","HandlingListingSignalR","UpdateSalesOfListingsDeliveryInfo","VenueMapRectSelect","ViewListingOriginalSeating","BulkDeleteTicketGroup","FulfillmentProviders","EventDeliveryStrategy","EventListingTableHotkeys","AutoGroupAndCompV2","ListingGroupingMethods","SidePanelWidths","GroupSoldListings","PricingV2DemandDashboard","TablePinActionColumn","FilterEventByLocation","CustomVenueRows","EventStatusDisplay","BulkActionGroupListings","SellerAccountPurchaseVendorOverride","PricingABTest","EnableNativeSyncToggle","BulkUpdateIndividualTicketGroup","AutoCompRankOverrides","VendorAccountV2","UpgradedGroupListingView","FullPageEventView","SaleSeatsSoldAs","UpcomingOnSalesPage","RemoveUiGateOnUnmap","VendorAccountDeliveryStrategy","SortListingsInGroup","ReorderListingInGroup","EditMapInListingTab","BackfillDeliveryStrategyInventoryEvent","BackfillDeliveryStrategyPurchaseEvent","BackfillDeliveryStrategyVendorAccount","BackfillDeliveryStrategyInventoryEventToSales","BackfillDeliveryStrategyPurchaseEventToSales","BackfillDeliveryStrategyVendorAccountToSales","FullPageEventViewEntitySelection","CompQuantitiesFilter","FullPageEventViewSideTableBulkEdit","DefaultNotToMergeHoldListings","CustomDeliveryType","ListingNotesAdditionalInfo","TicketTypeIconOverlay","FullPageEventViewSideTableFilters","BulkEditsToListingGroups","SplitListingToOriginal","ExportPurchases","GroupedActivityLog","ExcludeDefects","DownloadETickets","AllocateSingleTickets","PdfViewerToolbar","ResetFulfillmentKeepArtifacts","FufillmentMismatchDisplay","DisplayTicketOrderedByPriority","ShowSeatTraitOnMerge","EventMultiScreen","DefaultFilterRows","RowSeatColumnSalePurchase","ReconcileOrphanTickets","UseSelectedRowIdForMarketplaceSeatingOverride","SelectDeliveryStrategyInSeatSaver","ListingGroupCompUi","YourListingsInComps","NewListingDefaultToSpeculativeRowId","UploadTicketFilesFlowV2","RightNowStatsInMap","ConsignmentDeal","FilterByCurrencyCodeMulti","FilterByPaymentCurrencyCodeMulti","AutoPricingTabInAccountSettings","BulkConvertPaymentLines","AttemptFulfillWhenToggleOnAutoFulfill","ConvertPaymentLines","SaleDetailDisplayTicketUrl","PreventInitialBroadcastForXDays","AutoCompPersistAllConfigChanges","ManageMarketplacePayment","PurchasePaymentColumns","HideAutoCompOnlyBulkEditOption","PreventDraftPOinUI","MarkPOAsPaid","MarketplacePaymentsTab","AllowSeatScoreCompListingMode","IntelligiblePricePreview","DemandDashLastDaySupplyMetrics","IntelligibleAutoPricingSettings","LinkEventName","GroupingWizard","IntelligiblePricePreviewForListingGroup","SimplifiedAutoPricingUiV2","MoveToGroup","IgnoreDuplicate","QuickFloorToolbar","BulkUpdatePurchaseCurrency","BulkWasteTickets","MarketplacePaymentsFilters","ListingLoadBySection","AutoPricingBulkEditToDrawerWithPreview","PurchasePaymentMethodEdit","CancelSaleKeepTickets","ConvertSaleCurrency","DisplayDeactivatedUser","SVGVenueMapV3","LockCommissionsOnPo","SearchView_Purchase","SearchView_Inventory","SearchView_Sale","SaleEarningsTableV2","SectionalUpdateListingInBulk","SectionalLoadInListingTable","SaleDetailsMarketplaceTerms","UserSearchBar","CleanupWhiteSpace","AddMarketplaceChargeCreditToSale","LinkPaymentLine","PricingSectionSettingsAcrossEvents","PurchaseCommissionFilterInSearchView","SaleCancellationReason","SaleHasMarketplaceProblem","HideSalePaymentReceivedFilter","CondensedPreviewTabsAndSingleListing","MarketplacePaymentFilterUnlinked","BulkMarkSalesAsPaid","CatalogCacheStrategyV2","MultiTicketGroupTable","TableColumnFilter","EventDiscoveryPage","SeatTraitsColumn","EventSelectorFilter","BlockEventDiscoveryData","BulkUploadPurchaseV2Perf","ColumnFilterSearchView","ListingTableSplitTypeColumn","BulkUploadPurchaseTags","CompListingDisplayUpdate","CatalogMetricsV2","HideSalePaymentConversionSection","FlashSaleDiscountRestriction","EventMapRibbonYolo","ReportV2Builder","ReportV2CommissionsReport","KnowledgePortalPage","KnowledgePortalPageTestData","SearchView_ReadOnlyDB","BulkEditPricingSettingsUpdate","HomePageNotifications","EventsDetailedViewGrouping","GlobalReportV1RedirectV2","BlockInventorySummaryStats","GroupListingsWithRangedQuantityCost","AllocateSingleTicketListingRestrictionRemoval","OnePagerGroupSelectionFunctionality","ConsignmentFilterPurchaseSearchView","HideNavAndFilterBars","ReportSinglePagedV1V2","BackfillListingTicketTypeOverrideToSale","AutomatiqUnprocessedOrdersHoldingPen","ReEvaluatePredeliveryStateAndTopTicketType","AddPurchasePaymentRefundStates","PurchasePaymentConversion","EnforcePurchasePaymentCurrency","MarketplacePaymentConversion","WasteSale","UseShLnLookup","BlockPricingCompListingEndpoint","BlockPricingCalculationEndpoint","BlockEventDashboardEndpoint","AlwaysGetEventLevelSettingsFromAutoPricer","WriteAutopriceConfigUpdateToSbt","SetAsDefaultAllNewEvents","AccountLevelFeatureCheck","FeatureState","Disabled","Restricted","GeneralAvailability","LimitedAvailability","InDevelopment","ListingDetailDataField","Basic","Tickets","Pricing","Tags","ListingStatus","FullySold","DelistingPending","DelistingFailed","Delisted","ListingPending","ListingFailed","Listed","ListingBroadcastStatus","Unknown","Broadcast","BroadcastFailed","BroadcastWithError","Unbroadcast","UnbroadcastFailed","UnbroadcastWithError","PreDeliveryState","NotPreDelivered","PreDelivered","DeliveryType","InApp","PDF","Paper","MemberCard","Wallet","Custom","TicketType","ETicketUrl","Transfer","Barcode","Season","SMPWallet","ListingActionType","Split","SplitToOriginal","AddOfflineSale","AddMarketplaceSale","PredeliverBarcodes","PredeliverETickets","PredeliverQRCode","PredeliverExternalIds","PredeliverTicketUrls","RedeliverBarcodes","RedeliverETickets","RedeliverQRCode","RedeliverExternalIds","RedeliverTicketUrls","DownloadUserDocuments","FullySoldNoAction","AddAdminHold","RemoveAdminHold","Waste","Marketplace","VividSeats","SeatGeek","TickPick","Ticketmaster","Offline","AXS","FanXchange","Gametime","TicketEvolution","TicketNetwork","Automatiq","Lyte","GoTickets","B2BSales","TicketNetworkMercury","BroadcastErrorCode","UpdatePrice","UpdateTicketType","UpdateSplitType","UpdateInHandDate","SplitListing","MergeListing","BroadcastListing","UnbroadcastListing","UpdateQuantity","HideSeats","UpdateListingNotes","UpdateSeating","MarketplaceResaleRestricted","MarketplaceManifestMismatch","MarketplacePriceBelowFloor","PendingProofState","PendingProof","PendingReview","Approved","QualityControlState","Pending","Rejected","VenueMapSectionType","ForcedRow","OptionalRow","NoRow","GeneralAdmission","NoRowPairs","OptionalRowPairs","ForcedRowPairs","GeneralAdmissionWithQueueNumber","GeneralAdmissionStanding","GeneralAdmissionSeating","TagsValueType","String","Decimal","Int","Boolean","Json","Url","Date","POSUser","Vendor","UserGroup","SplitType","Any","None","AvoidOne","AvoidOneAndThree","Pairs","AutoPricingUndercutMode","Simple","RowExtrapolation","Deal","AutoPricingCompListingMode","QualityScore","SameSection","SameZone","SameEvent","ParentListing","AutoPricingOutlierMode","StandardDeviations","SkipLogic","KthLowest","AutoPricingResultType","PriceSuccess","PriceBelowFloor","InsufficientComparables","PriceBelowMaxAllowedDrop","PriceAboveCeiling","MissingUnitCost","MissingSeatScore","MissingZone","CannotCalculateUndercut","EffectiveCeilingBelowFloor","PriceHitHardFloor","PriceHitRelativeFloor","PriceHitMaxAllowedDrop","ConfigRowMissing","SectionUnmapped","ListingNoteType","Defect","RestrictionOnUse","Perk","Information","ConnectedSeller","InternallyGenerated","PointOfSalePaymentState","Unpaid","Queued","Paid","PartiallyPaid","PendingReversal","Reversed","MarketplacePaymentState","Ineligible","MarketplaceFulfillmentState","Processing","PendingPickup","InTransit","Fulfilled","Failed","PendingReshipment","PointOfSaleFulfillmentState","Resetted","SaleActionType","Confirm","Fulfill","Reject","Deallocate","ExpireHold","Refulfill","EditOffline","Allocate","ResetFulfillment","RejectAllocation","ConfirmAllocation","MarkAsFulfilled","Unwaste","PointOfSaleSaleStatus","PendingConfirmation","PendingFulfillment","ProcessingFulfillment","FulfillmentFailed","PendingRejection","Hold","CancelledHold","PendingAllocation","ProvisionalAllocation","Wasted","MarketplaceContractState","Provisional","CancelledProvisional","Contracted","MarketplaceDispute","Complete","CancelledUnknownFault","CancelledSellerFault","CancelledMutual","CancelledMarketplaceFault","EventCancellation","SellerFault","MarketplaceFault","NoFault","Other","PurchaseOrderState","Active","Void","Drafted","PurchasePaymentStatus","RefundNeeded","Refunded","PartiallyRefunded","PurchasePaymentMethodType","PayPal","ECheck","Check","MoneyOrder","Card","Cash","Credit","COD","BankTransfer","DebitCard","CreditMemo","DebitNote","TransactionAggType","SellerId","CampaignId","AdGroupId","AutoPoInboundEmailClassificationType","NewPurchaseOrder","ExistingPurchaseOrder","Junk","OneTimePass","Password","TicketsAvailable","PurchaseCancelled","EventCancelled","EventPostponed","EnjoyTheEvent","TransferSent","TransferAccepted","TransferExpired","NewSale","ConfirmationDeadline","ShippingDeadline","SaleCancelled","OtherMarketplaceContact","RelativeTimeRoundingMode","Day","Week","Month","Year","InventoryViewMode","TileView","MetricView","FlattenedView","EventUnpricedStatus","AllUnpriced","NoneUnpriced","AnyUnpriced","EventTimeFrameFilter","Future","Past","EventSort","MainDisplay","BulkEditStep","Initializing","InProgress","Done","DoneWithRetryableEntities","PricingFloorCeilingAdjustmentType","MarketPrice","UnitCost","CurrentFloor","GroupingType","Zone","Section","Row","SeatScore","Quantity","BucketType","Clusters","SameSize","RowGroupSetting","SingleTwoToFiveSixPlus","OneToFiveSixPlus","OneToTenElevenPlus","AllRows","OneTwoToFiveSixToTwelveThirteenPlus","VenueZoneConfigType","Amphitheater","ConcertsSectionsBehindStage","SportsOrConcertsWith360","ScoreModel","Model1","Model2","Model3","Model4","VenueGeometry","MergedVenueGeometry","Bezier","AdvancedVenueGeometry","BespokeBaseball","SqsClassifier","BulkActionType","GroupListings","ChangeEvent","AdminHold","CancelPurchase","DeleteTicketGroup","UploadPurchaseFile","BackfillDeliverySettings","ConvertPurchasePayment","WasteTickets","UpdateBroadcastSettings","UpdatePrices","UpdateTagValues","UpdatePriceFloorCeiling","UpdateAutoPricingSettings","UpdateGeneralSettings","UpdateMarketplaceSeating","UpdateTicketTypeRules","UpdateBuyerCommissions","UpdateInternalNotes","UpdateIsNoFulfill","UpdateDeliveryType","UpdateSeatTraits","UpdateMarketplacePrices","UpdatePurchaseCurrency","DeleteSeatSavers","RemovePredelivery","UngroupListings","EditListingGroupSetting","MarkPurchaseAsPaid","MarkSaleAsPaid","CancelSale","PurchaseViewMode","EventTileView","SalesViewMode","SaleLineItemStatus","SaleCostType","Charge","Proceeds","Taxes","SaleLineItemChargeReason","CancelledProceeds","DroppedOrderPenalty","Compensation","SaleLineItemCreditReason","ReversedPenalty","ReversedCharge","ProceedRepayment","MarketplacePaymentLineType","FullPrice","SellerFee","Penalty","AlternativeTickets","OrderNotFulfilled","CancelledEvent","WitheldFunds","LastMinuteSalesLateDelivery","ExpiredShippingLabel","DeliveryMethodChange","BuyerDeniedEntry","WrongTicketsReturnShippingCost","EarlyShippingLabelGeneration","WrongTrackingNumber","ExcessiveFailureRate","SellerError","AlternativeTicketsBuyerCompensation","RAGSellerFaultNoResponse","OverchargedSeller","ShippingRefund","SellerRelationship","RAGDeliveryDispute","CSError","LMSError","TaxRefund","AdCampaignState","Paused","Archived","AdGroupState","EventGroupingType","Performer","Venue","EventGroupingSortBy","Name","OnSaleEventViewMode","LogLevel","Trace","Verbose","Warning","Critical","EventWebsiteMetricsTimePeriod","OneHour","OneDay","EventDemandFactorType","Opponent","Weather","Standing","Stakes","SpotifyPopularity","HomeTeamOdds","SellerEventDashboardMetricsTimePeriod","Last7Days","AllTime","EventSupplyMetricsTimePeriod","LastDay","LastSevenDays","LastNinetyDays","ArtifactType","TicketUrl","ExternalId","TransferProof","GroupType","Invisible","Inactive","Leader","Permission","Sales_ViewAll","Sales_ViewRecent","Sales_ViewRecentFromExternalMarketplace","Sales_ConfirmReject","Sales_Fulfill","Sales_CreateForExternalMarketplaces","Sales_ViewProceeds","Sales_ViewRecentProceeds","Sales_ViewCostAndMargin","Sales_ViewPaymentState","Sales_ViewFulfillmentArtifacts","Sales_ManageHold","Sales_AddTagType","Sales_UpdateTags","Sales_ViewSalesOnIsPricerOf","Sales_UpdateSalesInfo","Sales_UpdateSalesInfoOnIsPricerOf","Sales_UpdateSalesInfoOnIsFulfillerOf","Sales_FulfillOnIsFulfillerOf","Sales_ViewSalesOnPurchasedBy","Sales_UpdateSaleOnPurchasedBy","Sales_FulfillOnPurchasedBy","Sales_FulfillOnPricerOf","Sales_UpdateTagsOnPurchasedBy","Sales_UpdateTagsOnIsPricerOf","Sales_UpdateTagsOnIsFulfillerOf","Sales_ConfirmRejectOnIsPricerOf","Sales_ConfirmRejectOnPurchasedBy","Sales_ViewFulfillmentArtifactsOnPurchasedBy","Sales_ViewFulfillmentArtifactsOnIsPricerOf","Sales_ConfirmRejectOnIsFulfillerOf","Sales_ViewSalesOnIsFulfillerOf","Sales_ViewFulfillmentArtifactsOnIsFulfillerOf","Sales_CreateOfflineSale","Sales_ManageOfflineSale","Sales_ManageOfflineSaleCreatedBy","Sales_ConfirmTransferWithoutProof","Sales_ResetFulfillment","Inventory_ViewAll","Inventory_ViewRecent","Inventory_ViewRecentFromExternalMarketplace","Inventory_ViewAllMarketplaceAttributes","Inventory_ViewExternalMarketplaceAttributes","Inventory_ViewFulfillmentArtifacts","Inventory_SetPrice","Inventory_SetPriceOnPurchasedBy","Inventory_SetPriceOnIsPricerOf","Inventory_Predelivery","Inventory_BroadcastUnbroadcast","Inventory_BroadcastUnbroadcastOnPurchasedBy","Inventory_EditPricing","Inventory_UpdateListingInfo","Inventory_UpdateListingInfoOnPurchasedBy","Inventory_AddTagType","Inventory_UpdateTags","Inventory_UpdateTagsOnPurchasedBy","Inventory_ViewListingOnIsPricerOf","Inventory_UpdateListingInfoOnIsPricerOf","Inventory_UpdateTagsOnIsPricerOf","Inventory_PredeliveryOnPurchasedBy","Inventory_PredeliveryOnIsPricerOf","Inventory_ViewListingsOnPurchasedBy","Inventory_ViewFulfillmentArtifactsOnPurchasedBy","Inventory_ViewFulfillmentArtifactsOnIsPricerOf","Inventory_BroadcastUnbroadcastOnIsPricerOf","Inventory_AddSeatSaver","Inventory_ManageSeatSaver","Inventory_ManageSeatSaverCreatedBy","Inventory_UpdateDeliveryStrategy","Inventory_UpdateDeliveryStrategyOnIsPricerOf","Inventory_UpdateDeliveryStrategyOnPurchasedBy","SellerAccount_Admin","SellerSupportCase_Create","SellerSupportCase_View","Purchases_ViewAll","Purchases_ViewRecent","Purchases_Edit","Purchases_EditOwned","Purchases_Create","Purchases_AddTagType","Purchases_UpdateTags","Purchases_UpdateTagsOwned","Purchases_ViewOwned","Purchases_UpdateBuyerCommission","Purchases_UpdateBuyerCommissionOwned","Purchases_UpdateDeliveryType","Purchases_UpdateDeliveryTypeOwned","Purchases_UpdateCustomDeliveryType","Purchases_UpdateCustomDeliveryTypeOwned","Purchases_UpdateSeatTraits","Purchases_UpdateSeatTraitsOwned","Purchases_LockUnlockCommission","Purchases_LockUnlockCommissionOwned","Purchases_EditVendor","Events_ViewAll","Events_AddTagType","Events_UpdateTags","Events_SetPrice","Events_Edit","Accounts_ViewAll","Account_SetPrice","TicketGroups_ViewAll","Webhook_View","Webhook_Create","Webhook_Edit","EventConfig_Edit","EventConfig_Create","EventConfig_View","Reports_CreateReports","Reports_UpdateReports","Reports_UpdateReportsOwned","Reports_ViewInventoryReports","Reports_ViewSalesReports","Reports_ViewAll","Reports_ViewGlobalReports","Accounting_ViewAll","Accounting_ViewPaymentsOnSale","Accounting_ViewStubhubPayments","AdPlatform_Edit","General_ViewReleaseNotes","General_ViewNotifications","MarketplacePaymentTerm","PaymentUponSaleConfirmation","PaymentUponDelivery","PaymentPostEvent","NotificationType","SaleNew","SaleFulfilmentFailed","SaleMarketplaceCancelled","ListingHideSeatsFailed","ListingUpdateAllInPriceFailed","ListingUpdateInHandDateFailed","ListingUpdateSplitTypeFailed","ListingUpdateDeliveryTypeFailed","ListingUpdateUnitNetProceedsFailed","ListingBroadcastFailed","ListingUnbroadcastFailed","ListingMergeFailed","ListingSplitFailed","ListingPriceUpdate","AutopriceBelowFloor","AutopriceInsufficientCompListings","AutopriceFirebrake","SellerSupportCaseNewReply","NotificationState","SectionGroupAreaType","Center","LeftRight","FarLeftFarRight","Front","Sides","SideT1","SideT2","Ends","Rear","Corners","PurchaseOrderCostType","Tax","Shipping","CreditCardFee","BulkDiscount","DealType","Sor","Guaranteed","DealSplitType","DealThresholdSplitDirection","Above","Below","PurchasingIdInUseResultType","NoneMatching","SameOrderId","SameOrderIdAndVendorId","TimePeriodType","Daily","Weekly","Monthly","PaymentMethodNameKnownRegex","All","AllAmex","AllVisa","AllMastercard","ReportGroupBy","Event","EventGenre","EventCountry","EventCity","SeatingSection","SeatingRow","SaleMarketplace","SaleMonth","SaleWeek","SaleDay","SaleId","ListingId","PurchaseId","PurchasedBy","PricedBy","FulfilledBy","SaleIdTicketIdCommissionUser","ArAgingMarketplace","ReportWidgetTypesInventory","TicketsListedAndSold","SalesAndMargin","AverageTicketPrice","ListingReportMetricColumn","ReportFileType","CSV","XLSX","ReportValueType","Guid","Integer","Money","DateTime","User","DateTimeList","IntegerList","GuidList","UserList","StringList","BooleanList","TransferTicketType","ImageProof","URL","IdProof","ApiTransferTicketmaster","ApiTransfer1Ticket","Role","Owner","Buyer","FinanceAPI","Fulfillment","Pricer","Processor","AutoPO","AutoFulfill","AutoPricer","Reporter","Finance","PermissionAccessArea","General","Events","Account","Reporting","Messages","Accounting","AdPlatform","UserSetting","QuickFiltersStateInventory","QuickFiltersCustomInventory","QuickFiltersStateSales","QuickFiltersCustomSales","QuickFiltersStatePurchases","QuickFiltersCustomPurchases","SalesViewSelected","SuspiciousPriceChange","InternationalCompliance","InventoryPageViewMode","InventoryColumnOrder","InventoryColumnNumberPrecision","InventoryColumnWidths","InventoryCustomColumns","InventoryColumnEditability","SaleColumnOrder","SaleCustomColumns","SaleColumnEditability","SaleColumnNumberPrecision","ReportConfigInventory","ReportConfigSale","EventsColumnOrder","EventsCustomColumns","EventsColumnEditability","EventsColumnNumberPrecision","SiteTheme","ReportingColumnLimit","PriceFloorCeilingMode","ReleaseNoteIdsRead","EventsColumnsEnabled","InventoryColumnsEnabled","SaleColumnsEnabled","SiteZoom","InventoryDefaultTab","PurchaseColumnOrder","PurchaseCustomColumns","PurchaseColumnEditability","PurchaseColumnNumberPrecision","PurchaseColumnsEnabled","InventoryFlattenedColumnOrder","InventoryFlattenedColumnsEnabled","InventoryFlattenedColumnEditability","InventoryFlattenedColumnNumberPrecision","SaleFlattenedColumnOrder","SaleFlattenedColumnsEnabled","SaleFlattenedColumnEditability","SaleFlattenedColumnNumberPrecision","SaleColumnWidths","PurchaseColumnWidths","InventoryV2DefaultTab","SalePageViewMode","PurchasePageViewMode","InventoryReportColumnWidths","SaleReportColumnWidths","EventsColumnWidths","PurchaseEventColumnOrder","PurchaseEventColumnsEnabled","PurchaseEventColumnEditability","PurchaseEventColumnNumberPrecision","PurchaseEventColumnWidths","SalesDefaultTab","PurchasesDefaultTab","SalesSideTableColumnOrder","SalesSideTableColumnsEnabled","SalesSideTableColumnEditability","SalesSideTableColumnNumberPrecision","PurchaseSideTableColumnOrder","PurchaseSideTableColumnsEnabled","PurchaseSideTableColumnEditability","PurchaseSideTableColumnNumberPrecision","InventorySideTableColumnOrder","InventorySideTableColumnsEnabled","InventorySideTableColumnEditability","InventorySideTableColumnNumberPrecision","MarketplacePaymentsTableColumnOrder","MarketplacePaymentsCustomColumns","MarketplacePaymentsTableColumnsEnabled","MarketplacePaymentsColumnNumberPrecision","MarketplacePaymentsColumnEditability","MarketplacePaymentsColumnsWidth","QuickFloorPromptDismissal","QuickFiltersCustomMarketplacePayments","QuickFiltersStateMarketplacePayments","QuickFiltersStateOnSaleEvent","QuickFiltersCustomOnSaleEvent","OnSaleEventColumnsOrder","OnSaleEventColumnsWidths","OnSaleEventColumnNumberPrecision","OnSaleEventCustomColumns","OnSaleEventColumnEditability","OnSaleEventColumnsEnabled","FirstTimeFeaturesViewed","ReleaseNoteType","NewFeature","BugFix","TutorialItemType","Folder","TicketGroupEditReason","AmendTickets","CancelTickets","AddTickets","ExchangeTickets","EditEvent","ApiException","message","result","isApiException","obj","ContentId","AbsoluteAmount","AbsoluteDollarValue","AbsoluteRankPremium","ABTest","Access","AccessToViewUnauthorized","AccordianToggle","Account_SetPrice_Details","AccountEmail","AccountInformation","Accounting_ViewAll_Details","Accounting_ViewPaymentsOnSale_Details","Accounting_ViewStubhubPayments_Details","AccountName","AccountNotSetupForAnyMarketplace","Accounts","Accounts_ViewAll_Details","Actions","ActivateRole","ActivateUser","ActiveListingsHeader","ActiveListingsDescription","ActivityLogActionType","ActivityLogAdditionalInfo","ActivityLogDate","ActivityLogInitiatedBy","ActivityLogLaunchButtonText","Actual","ActualSellThroughRate","ActualSTR","AdCampaigns","AddABTest","AddAnotherSplit","AddedToSale","AddFilterToShowResult","AddHurdle","AddNameToCreateGroup","AddNewDeal","AddNewSection","AddOverride","AddRow","AddRule","AddSplit","AddToGroup","AddToSale","AddValues","AdGroups","Add","AddAccountAction","AddChargeOrCredit","AddColumns","AddCommission","AddCostAction","AddCostCredit","AddCustomColumn","AddFilter","AddGroup","AddInventoryReport","AddLineItem","AddMembersToThisTeam","AddMessagingSource","AddMessagingSourceDescription","AddMessagingSourceStep1","AddMessagingSourceStep2","AddMessagingSourceStep3","AddNewBuyer","AddNewOverrideFxRate","AddNewTeam","AddNote","AddOrUpdateFxOverrideWarning","AddOverrideFxRate","AddPayment","AddPaymentMethodAction","AddPlaceholder","AddPlaceholderAdditionalInfoMessage","AddPurchase","AddPurchasePaymentMethod","AddPurchaseVendor","AddPurchaseVendorAccount","AddReport","AddSalesReport","AddSeatSaver","AddSeatSaveEventSearchMessage","AddSeatSaverAdditionalInfoMessage","AddSection","AddSource","AddTag","AddTagValues","AddTagValuesSelected","AddTagValuesAllVisible","AddTarget","AddTicketsForAnotherEvent","AddTicketsForThisEvent","AddUrl","AddUser","AddUsersAndGroups","AddUserToRole","AddValue","AddVendorAction","AdjustFiltersSuggestion","AdjustFloor","AdjustMyPrice","AdjustPrice","AdjustPricesBy","AdjustPricingCeilingAllVisible","AdjustPricingFloorAllVisible","AdjustPricingFloorSelected","AdjustPricingCeilingSelected","AdjustPricingFloor","AdjustPricingCeiling","AdjustProceedsFloor","AdjustProceedsCeiling","Advanced","AdPlatform_Edit_Details","AdvancedAutopricingSettings","AdvancedSearch","AdvancedSettings","AggressiveOption","Ago","AISuggestion","AllAvailableMerges","AllDeliveryOptions","AllEvents","AllFulfillmentStates","AllGenres","AllIn","AllInPriceAutoCalculationInfo","AllListings","AllMarketplaces","AllMerchants","AllMessages","AllocatedListing","AllocateToAnyAvailableSeats","Allocation","AllowBroadcast","AllowMutipleValues","AllPaymentMethods","AllPayments","AllPaymentStates","AllPaymentTypes","AllSaleStatuses","AllSubGenres","AllTicketTypes","AllVendorAccounts","AllVendors","AllocateTickets","AllocateToDifferentTickets","AllocateToListingTickets","AllocatedSeats","AlreadyInHand","Amount","AmountPaid","AmountType","Ampitheater","And","Angle","AnUploadedDocumentIsRequired","App","AppendSeatTraits","ApplicationTempData","Apply","ApplyCompListingSettings","ApplyAdvancedPricingSettings","ApplyFilter","ApplyGroupingTemplatesToAllEventsPrompt","ApplyAutoPricingSettings","ApplyPricingProtectionSettings","ApplyToAll","ApplyToAllEvents","ApplyUndercutSettings","ApprovedForQualityControl","AppVersion","Area","AreYouSure","AreYouSureEditRowsMultipleSections","AreYouSureYouWantToRestoreThisPurchase","AscendingAbbreviated","AutopricingInfo","AutoPricingResult","BelowThe","BetterZonesDetail","BuildReport","BulkAppendSeatTraitInfoMessage","BulkEditGettingPreview","BulkEditListingGroupSettings","BulkEditListingGroupSettingsWarning","BulkEditNoCommissionProvidedWarning","BulkEditNoSeatTraitsProvidedWarning","AutoComp","AutoFulfillWithSpace","AutoGroup","BulkEditDeliveryTypePurchaseMessage","BulkEditSuccessWithWarnings","BulkEditTicketTypePriorityInstruction","BulkMarkPurchaseAsPaid","BulkMarkPurchaseAsPaidMessage","BulkMarkPurchaseAsPaidWarning","BulkReplaceAndOverrideSeatTraitInfoMessage","BulkUpdatePlaceholdersMessage","BulkUpdatePurchaseCurrencyActionText","BulkUpdatePurchaseCurrencyInfoText","BulkUpdateSeatTraitInfoMessage","BulkWasteTicketsConfirmation","BuyerAccount","BuyerDelivery","CancelBulkTicketGroupWarning","CancelBulkPurchaseWarning","CancellationReason","CancelledOrders","CancelledProceedsSettingDescription","CancelledProceedsSettingToggle","CancelPurchases","CancelSingleTicketGroupWarning","CancelTicketGroupsParenth","CancelPurchasesParenth","CantAllocateMore100Commission","Carts","Ceiling","ChargeAmount","ChargeReasons","Cheaper","ChooseListing","ChooseSpecificSections","ChooseTickets","Clear","CombineCornersAndEnds","Commands","CommissionEligibilityDate","CommissionEligible","CommissionerCostsAndCharges","CommissionerProceedsAndCredits","CommissionerProfitAndLoss","Commissions","CompletedOn","ConfirmRemovePaymentReference","ConfirmResetOverride","ConfirmUnLinkPaymentAndSaleTitle","ConfirmUnLinkPaymentAndSaleBody","ConfirmWaste","Conflict","CommissionPayments","Consignment","Converted","ConvertedPaymentsAmount","ConvertPayment","ConvertCurrency","ConvertedPayment","ConvertedPaymentAmountMustBeGreaterThanZero","ConvertedTo","ConvPmtAmt","CreateNewGroup","CreditAmount","CreditReasons","CustomRanks","DateAdded","DateRange","DeallocateSalesOfAffectedTicketsWarning","ChangeGroup","ChangeZone","CheckVenueRows","CompListingMinCount","CompListingMinQuantity","CopiedWithExclamationMark","DefaultDelivery","DefaultDeliveryConfigurations","DefaultDeliveryConfigurationsDescription","DelayBroadcastAfterInitialCreation","DeletePlaceholders","DeleteSearchResultConfirm","DeliveryInfoChangePropagateToSalesConfirmation","DeliveryInfoChangePropagateToUnfulfilledSalesConfirmation","DeliveryOverrideInfo","DeliveryStrategy","DeprecatingHeatMaps","Deprioritize","DeprioritizeQuantitiesHeader","DeprioritizeQuantitiesDescription","DescendingAbbreviated","Details","DetectionMode","DeterminePrice","DiscountApplied","DonotDropMoreThan","DontUpdateExistingListings","DontUpdateExistingListingsOrSales","DontUpdateExistingPurchasesOrListings","DropYourFileAnywhereToUpload","Edited","EditEventWarning3","EditMap","EditTable","EditZone","EmptyPurchaseCommissions","EnableAutoAddCancelledProceeds","EnableAutoFulfillOverride","EnableDeliveryOverride","EnableNativeSyncLabel","EnableNativeSyncExplanation","EnterCompanionMode","EventConfig_Create_Details","EventConfig_Edit_Details","EventConfig_View_Details","EventDiscovery","EventMap","EventNotReviewedSince","EventState","ExcludeFanInventoryInfo","ExcludeDefectsInfo","ExistingSections","ExitCompanionMode","ExperimentName","Experiments","ExternalPaymentId","ExternalPurchaseIdAbbreviated","FallbackSplit","FallbackSplitInfo","FarLeftAndFarRight","Filled","FilterQty","FilterReportOptional","FlashSales","FlashSale","FuturePayments","FX","FXRate","General_ViewNotifications_Details","General_ViewReleaseNotes_Details","GeneratingPreview","GroupInventory","GroupListingsSettingRankPremium","GroupListingsSettingQueuingLogic","GroupListingsSettingBroadcasting","HasUnmappedSales","HasUnlinkedChargesCredits","HasUnpricedListings","GUR","Help","HideZoneMap","Hour","Hours","IfPurchaseIsCreatedWith","IncludeBetterZones","IncludeDefects","IncludeHeldListings","IncompatiblePricingMode","Inferred","Inventory_UpdateDeliveryStrategy_Details","Inventory_UpdateDeliveryStrategyOnIsPricerOf_Details","Inventory_UpdateDeliveryStrategyOnPurchasedBy_Details","InventoryReportDescription","InventoryStatus","ItemsWillBeUpdatedIfApplicable","KeepExistingTicketsOption","KeepPaymentReference","Last3Days","Last2Weeks","LeftAndRight","LinkSale","ListingHasNoCurrentFloor","ListingHasNoMarketprice","ListingHasNoUnitCost","ListingQty","ListingQuantity","ListingsSortByHeader","ListingsGroupSortByDescription","ListingUpdateConfirmation","ListingWillBeSplitInto","LockCommission","MappingError","MapTitle","MarkAsPaid","MarkAsUnpaid","MarkedAsReviewed","MarketplaceDelivery","MarketplacePaymentId","MarketplacePayments","MarketplaceTerms","MarketShare","MarkAsFulfilledWarning","MarkLineItemAsUnpaidConfirmation","MarkProceedsAsUnpaidConfirmation","MarkSalesAsPaid","MergedGroupListingWarning","MergeListingGroupTooltip","MinCommissionValue","MinListingsRequired","MoreExpensive","MovePrice","MoveTo","MoveToExistingGroup","Multiple","Empty","NetCommissionRate","NetCommissionRateOverride","New","NewCustomReport","NewFlashSale","NextTicket","NoHurdle","NoItemsWereEligibleForUpdate","NoResults","NoTicketsToWaste","NotificationTypeListingPriceUpdate","NotMapped","Of","OnSaleDate","OpenEventPageV2InDevelopment","OriginalProceeds","OriginalSeating","OriginatedListing","OtherZoneMap","OutlierLimit","OutlierSettingsIngoreListings","OutlierSpacing","P25","P50","Page","PastPayments","PaymentAmount","PaymentDetails","PaymentLine","PaymentLineId","PaymentReferenceID","PaymentsAmount","PayRef","PayRec","PayState","PerformerVenueSpecific","AssignETicketsIns","AssignQRCodesIns","AssignToDefaultPurchaser","at","AtLeastOneUrlRequired","AtoZ","AtoZArrow","ATP","Attachment","AutoBroadcastNewListing","AutoBroadcastRequiredFaceValue","AutoCompAndGroupListings","AutoConversion","AutoConversionSubtitle","Automations","AutoPoConfiguration","AutoPoConfigurationDescription","AutoPoVendorConfigutationDescription","AutoPricePreview","AutoPricePreviewSubTitle","Autopricing","AutoPricingAllListingsForEvent","AutoPricingAllResultTypeOption","AutoPricingDisclaimer","AutoPricingEnabled","AutopricingNotAvailableForGA","AutopricingNotAvailableMissingMap","AutopricingNotAvailableNoScoresGeneral","AutopricingNotAvailableNoScores","AutopricingSettings","AutopricingSettingsAll","AutopricingSettingsAllVisible","AutopricingSettingsSelected","AutopricingStrategy","AutoSetup","AutoSourceTickets","Available","AvailableInstruction","AvailableSeats","Back","BarcodeAlreadyInUsed","BarcodeRequired","BelowTheNextCheapest","BestRowExtrapolation","BestDealScore","Between","Better","BestDealScorePrompt","Blocked","BroadcastAll","BroadcastAllVisible","BroadcastByDefault","BroadcastDisabled","Broadcasted","BroadcastError","BroadcastErrorCode_BroadcastListing","BroadcastErrorCode_Unknown","BroadcastErrorCode_UpdatePrice","BroadcastErrorCode_UpdateTicketType","BroadcastErrorCode_UpdateSplitType","BroadcastErrorCode_UpdateInHandDate","BroadcastErrorCode_SplitListing","BroadcastErrorCode_MergeListing","BroadcastErrorCode_UnbroadcastListing","BroadcastErrorCode_UpdateQuantity","BroadcastErrorCode_HideSeats","BroadcastErrorCode_UpdateListingNotes","BroadcastErrorCode_UpdateSeating","BroadcastErrorCode_MarketplaceResaleRestricted","BroadcastErrorCode_MarketplaceManifestMismatch","BroadcastErrorCode_MarketplacePriceBelowFloor","BroadcastSelected","BroadcastSettings","BroadcastSettingsAllVisible","BroadcastSettingsForAll","BroadcastSettingsForSelected","BrowseFile","BrowseFiles","BucketOptions","Budget","BugFixes","BuildACustomRole","BulkActions","BulkDeleteSelectedPlaceholderWarning","BulkEditCancelled","BulkEditDone","BulkEditFailed","BulkEditFloorCeilingCurrentFloorWarning","BulkEditFloorCeilingUnitCostWarning","BulkEditFloorCeilingWarning","BulkEditInProgress","BulkEditListPriceAdjustingFloorCeilingWarning","BulkEditPartialFailure","BulkEditPriceFloorCeilingWarning","BulkEditPricesWarning","BulkEditStarting","BulkEditSuccess","BulkEntry","BulkUpload","BuyerAccounts","BuyerCommission","By","BypassLimit","CalculatePrice","CancellationDate","Cancellations","CancelledHoldOnMarketplace","CancelSelectMultiple","Catchup","Category","Category1007","Category1009","Category4286","Category5099","Category6401","Category6404","Category6451","Category6452","Category12567","Category263024","Category272988","Category272989","Category273013","Category273026","Category273031","Category273034","Category273055","Category273057","Category273089","Category273137","Category273138","Category273164","Category273171","Category273393","Category273409","Category273431","Category273485","Category273529","Category273657","Category274164","Category274701","Category274794","Category275344","Category275641","Category276077","Category276281","Category276306","Category276308","Category276311","Category276861","Category278221","Category278837","Category279267","Category279563","Category289352","Category150012246","Category1013","Category1015","Category1017","Category2294","Category4551","Category6403","Category55548","Category259716","Category356361","Category356453","Category356499","Category356585","Category357019","Category357036","Category358121","Category358959","Category366262","Category366288","Category366529","Category366888","Category375100","Category379731","Category379991","Category380480","Category381561","Category150002820","Category1014","Category1022","Category1023","Category1026","Category1027","Category1059","Category1205","Category14858","Category259810","Category259815","Category259819","Category259820","Category259822","Category259823","Category259824","Category259827","Category259828","Category259829","Category259833","Category259921","Category259922","Category260261","Category260263","Category260264","Category260265","Category260266","Category260267","Category260268","Category260270","Category260271","Category260275","Category260347","Category260357","Category260385","Category260389","Category260392","Category260421","Category260478","Category260483","Category260492","Category260530","Category260539","Category260542","Category260601","Category260624","Category260628","Category260637","Category260644","Category261289","Category261291","Category308335","Category308336","Category308341","Category308342","Category308344","Category308345","Category308350","Category308351","Category308352","Category308353","Category308355","Category308357","Category308358","Category308363","Category308364","Category308365","Category308385","Category321834","Category1024","CeilingRelativeToUnitCost","ChangeEventAll","ChangeEventSelected","ChangeGroupBy","ChangeGroupByWarning","ChangePassword","ChangeSectionScore","ChangeTagValueTypeWarning","ChangeValueType","ChangeVendorAccount","Charges","CharityEvent","Cheapest","Checkbox","ChooseBuyer","ChooseSection","ChooseRow","ChooseWidgets","ChooseYourDisplaySettings","ChooseZone","ClassifyMessage","ClearAll","ClearAndOverwrite","ClearBrowsingData","ClearBrowsingDataHelp","ClearData","ClearListingAutoPricingSettings","Columns","ColumnSettings","ColumnWithSameNameExists","CombinedPermissionViewDescription","CommaSeparatedValuesExt","Comments","Commission","Commissioner","Comparables","CompCeiling","CompFloor","CompListingCeiling","CompListingFloorMustLessThanCeiling","CompListingModePrompt","CompListingOnlyForSameZone","CompListingQuantityScoreAdjustment","CompMode","Configure","ConfigureColumnTags","ConfigureColumnVariables","ConfigureHeatMap","ConfiguringYourHeatMap","ConfiguringHeatMapInstruction1","ConfiguringHeatMapInstruction2","ConfirmDeletion","ConfirmVendorAccountChange","ConfirmWithoutAllocation","Contains","ConversionRate","ConversionRateMustBeGreaterThanZero","CopyEmailAddress","CopyExternalId","Create","CreateACustomColumn","CreateAHeatMap","CreateANewTeam","CreatedBy","CreatedOn","CreateNew","CreateNewField","CreateNewFromTemplateConfigPayload","CreateNewInventoryReport","CreateNewOrder","CreateNewReport","CreateNewSaleReport","CreateNewTag","CreatePricingStrategy","Credits","CurrencyConversion","CurrencySectionSubtitle","Current","CurrentColumns","CustomEventId","CustomReports","DailyOverrideFxRates","Dark","DarkMode","Dashboard","DataIsRefreshing","Days","DeactivateUser","DealScore","DecimalNumber","Decrease","DecreasePrice","DecreasePriceByPercentAllVisible","DecreasePriceForAll","DecreasePriceForSelected","DefaultBuyer","DefaultCurrency","DefaultPaymentMethod","DefaultQuantity","DefaultQuantityFilters","DefaultReports","DefaultSplitTypeForSeatSaver","DefineTargets","DefineTargetsSubtitle","Delete","DeleteAllTemplates","DeleteCustomColumn","DeleteFxOverrideWarning","DeleteOverrideFxRate","DeletePlaceholder","DeletePlaceholderAll","DeletePlaceholderAllVisible","DeletePlaceholderListing","DeletePlaceholderSelected","DeletePricingStrategy","DeleteReport","DeleteRole","DeleteSeatSaver","DeleteSeatSaverAll","DeleteSeatSaverAllVisible","DeleteSeatSaverSelected","DeleteTag","DeleteTagConfirmation1","DeleteTagConfirmation2","DeleteTeam","DeleteUser","DelistedClickToList","DelistedSyncFailed","DeliveryDocuments","DemandFactors","Description","DescriptionOfPurpose","DeselectAll","DesiredActiveListings","DecreasePriceByPercentAll","DecreasePriceByPercentSelected","DesiredNumberOfGroups","DigitalWallet","DirectToStubHubInternationalMessage","DirectToStubHubInternationalTitle","DifferentCurrencyCodesRequired","DisableDarkMode","Discount","Display","DisplayName","Distance","DontChange","DontPriceBelow","Download","DownloadTemplate","DoYouWantToContinue","Duplicate","DuplicatedListing","DuplicatedReportName","DuplicateEventNeedsToBeRescheduled","DuplicateEventPerformerVenueDateAndTimeMatch","Duplicates","DuplicateTicketId","each","EachTicketUrlOnNewLine","EachTicketIdOnNewLine","Earnings","Editable","EditATeam","EditColumns","EditEditabilityDescription","EditEventWarning","EditEventWarning2","EditGeneralSettings","EditMarketplaceEvent","EditACustomColumn","EditMetrics","EditNote","EditOverrideFxRate","EditPricing","EditPricingStrategy","EditReport","EditRowScore","EditRowScores","EditScores","EditSections","EditTagTypes","EditUser","EmailPreview","EnableAll","EnableAndDisableExperimentalFeatures","EnableAutoPricing","Enabled","EnableDarkMode","EnableQualityControlForAutoPo","EnterBarcodesForTransferIns","EnterResetCodeFromEmail","EnterStubHubEmailPrompt","EnterTicketUrlsIns","EnterTicketIdsIns","EnterValuesFor","Equals","EventHasPassed","EventId","EventMapped","Events_AddTagType_Details","Events_Edit_Details","Events_SetPrice_Details","Events_UpdateTags_Details","Events_ViewAll_Details","EventTag","EventTags","EventView","Example","Exclude","ExcludeFullySoldListings","ExclusionCurrencies","ExclusionCurrenciesSubtitle","ExistingOrder","ExistingTagName","ExistingTagValue","Exit","ExpectedProceeds","ExpectedProfit","ExpectedSTR","ExperimentalFeatures","ExperimentalFeaturesComingSoon","ExploreComparables","ExportListings","ExportSales","ExternalPurchaseId","ExternalSaleId","Far","FindThe","FulfillmentProvidersSubText","HasUnsoldListings","Hidden","HiddenEditabilityDescription","HowToDeterminePrice","Include","IncludeAllCountries","IncludeAllVendors","IncludedCountries","InventoryTag","GlobalReportFilterChangeCopyMessage","GlobalReportFilterChangeMessage","LastReviewed","ListedDelistFailed","ListedSyncFailed","ListingGroupSummaryActiveAndActive","ListingGroupSummaryActiveButNotListed","ListingGroupSummaryQueued","Mappings","MarkAsReviewed","MarketplaceEnableDisableConfirm","MaxReportSizeWarningLabel","MaxActiveListings","NoGroupsAvailableForVenueConfig","MinActiveListings","NoFulfillmentProviders","NoItemsWereChanged","NotContains","NumberOfUnsoldTickets","NumberOfListedTicketsDescription","NumberOfUnlistedTicketsDescription","OnlyThis","OriginatedBy","PandLTitle","PaymentId","Permission_AdPlatformEdit","Permission_EditVendor","Permission_EventConfig_Create","Permission_EventConfig_Edit","Permission_EventConfig_View","Permission_LockUnlockCommission","Permission_LockUnlockCommissionOwned","Permission_UpdateDeliveryStrategyOnPurchasedListings","Permission_UpdateDeliveryStrategyOnPricedListings","Permission_UpdateDeliveryStrategy","Permission_UpdateDeliveryType","Permission_UpdateDeliveryTypeOwned","Permission_UpdateSeatTraits","Permission_UpdateSeatTraitsOwned","Permission_UpdateCustomDeliveryType","Permission_UpdateCustomDeliveryTypeOwned","Permission_ViewNotifications","Permission_ViewPaymentsOnSale","Permission_ViewStubhubPayments","Permission_ViewReleaseNotes","PmtAmount","PmtLineId","PmtMethod","PmtState","PmtType","PmtStatus","PoId","PoDate","POPaymentState","PreSaleDate","Prev","PreviousTicket","PriceAgainst","PriceDateFilterTitle","PriceDateFilterChanged","PriceDateFilterUnchanged","PriceMin","PriceP25","PriceP50","PriceToMarket","PricingAgainst","PricingSettingsListingsConflictWarning","PrivateInventoryNotes","PrivateSaleNotes","PrivatePurchaseNotes","ProceedsAmount","Purchases_EditVendor_Details","Purchases_LockUnlockCommission_Details","Purchases_LockUnlockCommissionOwned_Details","Purchases_UpdateDeliveryType_Details","Purchases_UpdateDeliveryTypeOwned_Details","Purchases_UpdateCustomDeliveryType_Details","Purchases_UpdateCustomDeliveryTypeOwned_Details","Purchases_UpdateSeatTraits_Details","Purchases_UpdateSeatTraitsOwned_Details","Proceed","PurchaseTag","PutSaleListingOnHold","Quantities","QuantitiesFilter","QuantitiesForcedToBottom","RankPremiumTips","RawVenueCatData","ReceivedDate","Received","RemainingSeatingOnly","RemoveExistingTicketsOption","RemoveFromGroup","RemoveFromSale","RemoveHoldConfirmation","RemovePaymentReference","ReplaceAndOverrideSeatTraits","ReplaceWith","ReportNotAvailable","ResetFilters","ResetFulfillmentWarningV2","ResetOverride","ResetToOriginal","RestartExperiment","Restrictions","ResumeExperiment","ResultTimeout","ResultTimeoutDescription","RetrySkipped","ReuploadDocumentWarning","RevenueSplitHurdle","Role_FinanceAPI_Details","RowCompOverrides","RowComps","RowCompSettingExactMatch","RowGroups","RowRanges","RowRangesInputTip","RowsAscToDesc","RowsDescToAsc","RowsGroupBy","SaleBasisShare","SaleCharges","SaleCredits","SaleDateFilterTitle","SaleDateFilterOccured","SaleDateFilterNotOccured","SaleForEditTickets","SaleForRemovedTickets","SaleHasMarketplaceProblemHoverText","SaleIsFulfilledOnMarketplace","SalePaymentConversionWarning","SaleIsFulfilledOnMarketplace2","SaleReportDescription","SaleTag","SameEventsShareSameVenueConfigTitle","SameEventsShareSameVenueConfigHeader","SameEventsShareSameVenueConfigMessage1","SameEventsShareSameVenueConfigMessage2","FlatView","Floor","FloorMustBeLessThanCeiling","Change","Classify","ClickToViewCompsInstruction","Calculate","Cancel","CancelPurchaseDescription","CancelVoidPurchase","ChooseAccount","ChooseIncrementType","ChoosePaymentMethodPlaceholder","ChoosePaymentMethodTypePlaceholder","ChooseSeatingNotes","ChooseVendor","City","ClickToTakeAction","Close","CompListingMode","CompListingFloor","CompListingFloorMustBeSetError","ConfirmETicketsIns","ConfirmSale","Contact","ContentView","Copied","Cost","CostAndCredits","CostBasis","CostPerTicket","Country","CreateCustomFilter","CreditBalance","CreditCard","Currency","CurrencyCode","CustomDate","CustomDateRange","CustomFilter","DateAscArrow","DateDescArrow","DateDue","DateIncurred","DatePaid","DateRangeDisplayText","DateRangeSuggestionsTitle","DaysPostfix","Deactivated","DeallocateSale","DeallocateSaleWarning","DecreasePriceByPercent","Default","DefaultHideSeatNumbers","DefaultInHandDateOffset","DefaultSplitType","DeletePurchasePaymentMethod","DeletePurchasePaymentMethodWarning","DeletePurchaseVendor","DeletePurchaseVendorWarning","DeletePurchaseVendorAccount","DeletePurchaseVendorAccountWarning","DelistedClickToRelist","DelistingClickToCancel","DelistingFailedClickToTryAgain","DeliverTicket","DeliverToAlternativeAccount","Delivery","DeliveryAccount","DeliveryCost","DeliveryWebsite","DetailView","DirectOffline","DisableThisMarketplace","Dismiss","DollarsInBasket","DoTheseTicketsHaveAnyRestrictions","DoYouWorkForEventOrganizerOrViagogo","DragNAssignToSeats","DragNDropFiles","Due","DuplicateBarcode","DuplicateSeat","DuplicateUrl","EditOfflineSale","EmailDetails","EndDateTime","Entity","EachBarcodeOnNewLine","Economics","Edit","EditCostCredit","EditCustomFilter","EditPayment","EditPaymentMethod","EditPurchaseDetails","EditPurchaseVendor","EditPurchaseVendorAccount","EditTicketNotes","Employee","EmployeeManagement","EmptyContent","EndDateBeforeStartDate","EnterBarcodesIns","EnterTransferIdForPurchase","EnterPurchaseOrderIdFromVendor","Error_BadGatewayError_GenericMessage","Error_BadGatewayError_Header","Error_BadRequest_GenericMessage","Error_BadRequest_Header","Error_Forbidden_GenericMessage","Error_Forbidden_Header","Error_InternalServerError_GenericMessage","Error_InternalServerError_Header","Error_NotFound_GenericMessage","Error_NotFound_Header","Error_NotImplemented_GenericMessage","Error_NotImplemented_Header","Error_RequestTimeout_GenericMessage","Error_RequestTimeout_Header","Error_Unauthorized_GenericMessage","Error_Unauthorized_Header","EventDate","EventDateAsc","EventDateDesc","EventName","EventTime","EventVisitors","Everyone","ExpectedValue","ExpectedValuePerTicket","ExpireHoldWarning","Export","FaceValue","FailToLoadListContent","FailedToStartupTheApp","Failures","FarthestEvent","Filters","FinalQuestionsOnYourTickets","Finish","FloorRelativeToUnitCost","Format","FormulaBuilder","FormulaBuilderInfoLine1","FormulaBuilderInfoLine2","FormulaBuilderInfoLine3","FormulaBuilderInfoLine4","FormulaBuilderInfoLine5","FormulaBuilderInfoLine6","ForTheEvent","FreeEvent","From","FromDate","FulfillActionNotAvailable","Fulfiller","FulfillmentDate","FulfillmentRestrictions","FulfillmentState","FullEventInfo","History","IgnoreTheFirst","InCheckout","IncorrectPerfomerOrGrouping","IncreaseDecreasePrice","IncreasePrice","InsightsView","InvalidBaseRow","IsDuplicate","IsPricedByMarketplace","ListedAndSold","ListView","KeepCurrentPurchaser","MembersOnThisTeam","MergeListings_ListingMismatchWarning","MinQty","MinQuantity","MoreThan","NewAppVersion","NewHeatMap","NotEnoughInformationToCreate","NotFoundOnPrimary","NotMappedYet","NumberOfBuckets","OfMyListingQuality","OnHoldBroadcastDisabled","PandL","PaymentAmountReceived","PaymentCurrency","PaymentReceived","PaymentReference","Override","OverrideDate","PendingPartnerIntegrations","IncorrectCountryCode","Members","Permission_UpdateBuyerCommission","Permission_UpdateBuyerCommissionOwned","Permission_ConfirmRejectOnAssignedSales","Permission_ConfirmRejectSale","Permission_ConfirmRejectSaleOnPricedListings","Permission_ConfirmRejectSalesFromPurchasedListings","Permission_CreatePO","Permission_FulfillSale","Permission_FulfillSaleOnPricedListings","Permission_FulfillSalesFromPurchasedListings","Permission_ManageCreatedPlaceholderListings","Permission_ManageOfflineSalesOnPurchasedListings","Permission_ManagePlaceholderListings","Permission_Predeliver","Permission_PredeliverOnAssignedListings","Permission_BroadcastUnbroadcastOnAssignedListings","Permission_PredeliverPurchasedListings","Permission_SetPriceOnAssignedListings","Permission_UpdateCreatedReports","Permission_UpdateInfoFromPurchasedListings","Permission_UpdateInfoOnAssignedListings","Permission_UpdateInfoOnAssignedSales","Permission_UpdateInfoOnPricedListings","Permission_UpdateInfoOnPurchasedListings","Permission_UpdateTagsFromPricedListings","Permission_UpdateTagsFromPurchasedListings","Permission_UpdateTagsOnAssignedListings","Permission_SetPriceOnPurchasedListings","Permission_UpdateTagsOnAssignedSales","Permission_UpdateTagsOnOwnedPurchasedOrder","Permission_UpdateTagsOnPurchasedListings","Permission_FulfillSalesOnAssignedSales","Permission_ViewAssignedListings","Permission_ViewAssignedSales","Permission_ViewFulfillmentArtifactsOnAssignedListings","Permission_ViewFulfillmentArtifactsOnAssignedSales","Permission_ViewFulfillmentArtifactsOnPricedListings","Permission_ViewFulfillmentArtifactsOnPurchasedListings","Permission_ViewFulfillmentArtifactsOnSaleFromPricedListings","Permission_ViewFulfillmentArtifactsOnSaleFromPurchasedListings","Permission_ViewGlobalReports","Permission_ViewOwnedPurchasedOrders","Permission_ViewSaleFromPricedListings","Permission_ViewPurchasedListings","Permission_ViewRecentListings","Permission_ViewRecentSales","Permission_ViewSaleOnPurchasedListings","Permission_Webhook_View","Permission_Webhook_Create","Permission_Webhook_Edit","Placeholder","PlaceholderPurchaseMessage","POCreatedBy","Priced","ProvisionallySourced","Purchases_UpdateBuyerCommissionOwned_Details","Purchases_UpdateBuyerCommission_Details","PutOnHold","PutOnHoldAll","PutOnHoldSelected","RankPremium","Reason","RefreshNow","RejectAllocationWarning","RejectionReasonInfoText1","RejectionReasonInfoText2","RelativeRankPremium","RelativeTo","RemoveHold","RemoveTagValue","RemoveTagValues","ReportHistory","SameOverrideExists","Reports_ViewGlobalReports_Details","SameZoneOrBetter","SaveCopy","Saved","SaveMapAs","SaveSearch","SaveSettingsToViewUpdatedComps","SearchAndReplace","SearchEventOrLookupId","SearchFor","SearchPurchases","SearchInventory","SearchSales","SeatingMapped","SeatRange","SectionClearingPrices","SectionGroups","SectionsAscToDesc","SectionsDescToAsc","SelectCountry","SelectCity","SelectedFrom","SelectGroupToMoveTo","SelectItemsForBulkEdit","SelectQuantities","SelectStateProvince","SelectTag","SetActiveInGroup","SetAFloor","SetAPriceFloor","SetDefaultDeliveryForNewPurchases","SetDeliveryStrategy","SetMapAsDefault","SetMinimumGroupSize","SetPriceFloor","SetTicketTypePriority","ShowDetailedSettings","Shown","ShownQty","ShowSections","ShowSectionsInfo","ShuffleRanks","SearchEvent","SaveFilter","SelectFilterValue","SideTier1","SideTier2","SignUpBannerTitle","SignUpBannerSubTitle","SignUpWelcomeSubtitle","SimilarEventsDefaults","SimulateWebsiteDiscount","SOR","Spacing","SplitListing_AllowSplitSoldTickets","SplitListing_DoNotAllowSplittingSoldTickets","SplitZonesBy","StopExperiment","StubHubListings","StubhubRecommended","Submit","Supply","SuppressFor1HourV2","SyncFailedClickToRelist","SyncFailedClickToDelist","TableEditor","TagNameNotAllowed","TargetPercentage","Team","TeamName","Teams","ThenBy","ThenDefaultListingsTo","ThenDefaultThePurchaseTo","TheNextCheapest","ThenSplitGroupsBy","ThisFilterWillChangeMetrics","TicketCost","TicketDelivery","TicketGroupBulkEditPurchaseWarning","TicketId","TicketGroupId","TicketPrices","TicketQty","TicketQuantity","TicketsAllocated","TicketsSoldAs","TimeView","Timezone","TimezoneDefaultOption","TimezoneDescription","ToggleSelectionMode","TooManyResultPerformanceWarning","TotalCostOfUnsoldTickets","TotalSplitInfo","TurnOnAutoFulfillPrompt","TypeYourNoteHere","UnableToFindSale","UndoCancel","Ungrouped","UnknownError","UnexpectedErrorOccured","UnlinkSale","UnlinkSaleAndPayment","UnlockCommission","Unordered","Unsold","UnsoldEvents","UnsoldProceeds","UnsoldQuantitiesLowToHigh","UnsoldQuantitiesHighToLow","UnwasteTickets","UnwasteTicketsConfirmation","Update","UpdateAllTicketGroupsUnderAssociatedPurchaseOrders","UpdateAutoFulfill","UpdateBuyerCommission","UpdatedBy","UpdateDeal","UpdateDeliveryTypeForPlaceholders","UpdateEventIdWarning","UpdateExistingListings","UpdateExistingPurchasesAndListings","UpdateFulfillmentSettings","UpdateFulfillmentSettingsMessage","UpdateExistingListingsAndAssociatedSales","UpdateFulfillmentSettingsMessagePurchase","UpdateMode","UpdatePriceEvery","UpdatePrivateNotes","UpdatePurchasedBy","UpdatePurchaseWithMergedListing","UpdatePurchaseWithMergedListingWarning","UpdateAssociatedSales","UpdateSeatTraitsForPlaceholders","UpdateSelectedTicketGroupsOnly","UpdateTagValue","UpdateTagValuesSelected","UpdateTagValueWarning","UploadPredelivery","UploadSeatScoreModelInfo","UseAbsoluteFloors","UseAsTemplate","UserAlreadySelected","UseZoneMap","UseZoneMapDisabledTip","Values","Velocity","VelocityHours","VendorGroup","VendorManagement","VendorPayments","VenueConfiguration","VenueRowData","VenueSpecific","VersionMismatch","VersionMismatchExplanation","HideAdvancedSettings","MissingHeightData","MissingDistanceData","MissingAngleData","RequestState","SeeAdvancedSettings","FulfillOnStubHub","FulfillOnViagogo","FulfilledExternalMarketplace","FullSeating","FutureEvents","GeneralAdmissionEvent","GeneralAdmissionMessage","GeneralMessage","GeneralSettingsAll","GeneralSettingsSelected","GenericActionFailure","Genre","GoBack","GoTo","GoToMessageThread","Group","GroupBy","GroupingDefault","GroupingTemplate","HasBroadcastError","HasUnsoldTickets","HeatMap","HeatMapInstruction1","HeatMapInstruction2","Height","HeldUntil","HeldUntilDate","HiddenDueToFilter","High","Highest","HistoricalPricing","HoldExpiration","HoldId","HoldNote","HoverZoomETicketIns","HoverZoomQRCodeIns","HowDidYouPay","HowItWorks","Hyperlink","Icon","Id","Importance","In","InactiveListings","Inbox","IncludeInColumns","IncludeInReport","InclusiveOption","InComparableZones","Increase","IncreaseDecreasePriceByPercentAllVisible","IncreasePriceByPercent","IncreasePriceByPercentAll","IncreasePriceByPercentAllVisible","IncreasePriceByPercentSelected","IncreasePriceForAll","IncreasePriceForSelected","Info","InHandDate","InHandDateMustBeBeforeEventDate","Inherit","InSection","InMyGroup","Insert","InUse","InvalidFormula","Inventory_AddSeatSaver_Details","Inventory_AddTagType_Details","Inventory_BroadcastUnbroadcast_Details","Inventory_BroadcastUnbroadcastOnIsPricerOf_Details","Inventory_BroadcastUnbroadcastOnPurchasedBy_Details","Inventory_EditPricing_Details","Inventory_ManageSeatSaver_Details","Inventory_ManageSeatSaverCreatedBy_Details","Inventory_Predelivery_Details","Inventory_PredeliveryOnIsPricerOf_Details","Inventory_PredeliveryOnPurchasedBy_Details","Inventory_SetPrice_Details","Inventory_SetPriceOnIsPricerOf_Details","Inventory_SetPriceOnPurchasedBy_Details","Inventory_UpdateListingInfo_Details","Inventory_UpdateListingInfoOnIsPricerOf_Details","Inventory_UpdateListingInfoOnPurchasedBy_Details","Inventory_UpdateTags_Details","Inventory_UpdateTagsOnIsPricerOf_Details","Inventory_UpdateTagsOnPurchasedBy_Details","Inventory_ViewAll_Details","Inventory_ViewAllMarketplaceAttributes_Details","Inventory_ViewExternalMarketplaceAttributes_Details","Inventory_ViewFulfillmentArtifacts_Details","Inventory_ViewFulfillmentArtifactsOnIsPricerOf_Details","Inventory_ViewFulfillmentArtifactsOnPurchasedBy_Details","Inventory_ViewListingOnIsPricerOf_Details","Inventory_ViewListingsOnPurchasedBy_Details","Inventory_ViewRecent_Details","Inventory_ViewRecentFromExternalMarketplace_Details","Invited","InZone","IPaidFace","IgnoreSoldTickets","ImPricing","Impersonate","InHand","InHandDaysBeforeEvent","InOneDay","IncompatibleForMergingWithSelectedListings","InvalidEndDate","InvalidStartDate","InvalidUrl","IsGlobal","ItemName","ItemsPerPage","IWorkForViagogo","IWorkForEventOrganizer","IsThisASpeculativeListing","JustNow","Key","Language","Last1Hour","Last30Days","LastPriceUpdatedDate","LastSaleDates","LastUpdatedOn","LastWeek","LastYear","LeastRecent","LeftToSell","LessSales","LiftPercentage","Light","Link","LinkCopied","LinkHasBeenCopiedToClipboard","List","ListAndAllInPriceError","ListedAverageTicketPrice","ListedQty","ListedATP","ListedQuantity","ListedToViagogoSuccessfully","ListingConfirmation","ListedClickToDelist","ListingClickToCancel","ListingFailedClickToTryAgain","ListingFullSoldNoActionAvailable","ListingNumberUsedRequired","Listings","ListingSettings","ListingSettingsAllVisible","ListPrice","ListPriceAutoCalculationInfo","ListPriceLessThanPriceFloorWarning","ListPricePerTicket","Location","LookupByListingId","LookupByOrderId","LookupBySaleId","Low","Lowest","ManualPriceWarning","ManualPriceDisableAutoPricingWarning","ManualPriceAdjustFloorWarning","ManualPriceAdjustCeilingWarning","Mapped","MappedEventId","MappedTo","MapUnavailable","Margin","MarkAsPurchase","MarkAsPrivate","MarkAsJunk","MarkAsSale","MarkAsTransfer","MarketListings","MarketplaceEnableConfirmMessage","MarketplaceDisableConfirmMessage","MarketplaceSeatingForAll","MarketplaceInhandDate","MarketplaceSeatingForAllVisible","MarketplaceSeatingForSelected","MarketplaceVisibility","Markup","Max","MaxDiscountInputPrompt1","MaxDiscountInputPrompt2","MaxDiscountInputPrompt3","MaxHoldDuration","MaxHoldDurationUnit","MaxValueLengthExceeded","Median","Merchant","Merge","MergeListings","MergeListings_DeliveryDifference","MergeListings_GroupedListings","MergeListings_RowDifference","MergeListings_SectionDifference","Merges","MergeSelected","MergeSuggested","Metrics","MicrosoftExcelExt","Min","MinCompListingCount","MissingRowDataWarning","MissingSectionFilter","MLB","MoreSales","MostRecent","MultiplePayments","MultipleSelections","MyAccount","MyListings","MyTicketsHaveRowsAndSeats","NA","NameColumnPlaceholder","Near","NearestEvent","NeverShareYourPasswordWithAnyone","NewGroup","NewModel","NewOrder","NewRole","NewRow","NewSales","NewUser","NewVendor","Next2Weeks","NextWeek","NextMonth","NextYear","NeedFulfillment","NeedToMergeToTwoOrMoreListings","NeedToSplitToTwoOrMoreListings","Next","No","NoActiveAccountsForLogin","NoActivityLog","NoAutoPricing_MissingPermission","NoAutoPricing_MissingRowId","NoAutoPricing_NoVenueConfig","NoConversation","NoEventsMatching","NoFilteredNotifications","NoGroupingAvailableForDefault","NoMergesAvailable","NoneSelected","NoNotifications","NoPerformersMatching","NoReportText","NoResultFound","NormalOption","NoSeatingsAvailableForAllocation","NoTagsExist","NoTaxes","NotificationTypeAutopriceBelowFloor","NotificationTypeAutopriceInsufficientCompListings","NotificationTypeAutopriceFirebrake","NoToAll","NoVenueMetadataForAutopricing","NoVenuesMatching","NotBroadcastOnAnyMarketplace","Notes","NotificationTypeListingHideSeatsFailed","NotificationTypeListingMergeFailed","NotificationTypeListingSplitFailed","NotificationTypeListingUpdateDeliveryTypeFailed","NotificationTypeSaleFulfilmentFailed","NotificationTypeSaleMarketplaceCancelled","NotificationTypeSaleNew","Now","NumberFormat","NumberOfItemsPerPage","NumberOfTicketsHeld","NumOfListingsToCreate","Odds","Off","OfSimilarQuality","OfSimilarQualityInZone","OfSimilarQualityQuantityAdjusted","OfTheComparableListings","OK","OlderThanLastYear","On","OneDayBeforeEvent","OnePayment","OneWeekBeforeEvent","OnlySingleValueIsAllowed","Oops","OpenEventPage","OpenReport","Or","OrAbove","OrderDate","OrderId","OrderIdDoesNotExist","OrderIdDoesNotExistForVendor","OrderIdInUse","OrderIdInUseSameVendor","Orders","Original","Outlier","OutlierFiltering","OutlierMode","OutstandingBalance","Overview","Pagination","PaidOffline","PastEvents","PastWeek","PastMonth","PastYear","Payment","PaymentAccount","PaymentDate","PaymentMethod","PaymentMethodUsed","PaymentMethods","PaymentState","PaymentType","PdfExt","PaymentPending","PendingQC","PendingRefulfillment","PendingSourcing","PeopleWithAccess","Percentage","PerformerAndVenue","PerformerAtVenue","Permission_AddSeatSaver","Permission_AddTagType","Permission_CreateOfflineSale","Permission_ManageOfflineSale","Permission_ConfirmTransferWithoutProof","Permission_ResetFulfillment","Permission_ConfigurePricing","Permission_UpdateTags","Permission_CreateReports","Permission_UpdateReports","Permission_UpdateReportsOwned","Permission_ViewAll","Permission_ViewExternalMarketplaceAttributes","Permission_ViewInventoryReports","Permission_ViewRecent","Permission_ViewRecentFromExternalMarketplace","Permission_CreateForExternalMarketplaces","Permission_ViewProceeds","Permission_ViewRecentProceeds","Permission_ViewCostAndMargin","Permission_ViewPaymentState","Permission_ViewFulfillmentArtifacts","Permission_ViewAllMarketplaceAttributes","Permission_SetPrice","Permission_BroadcastUnbroadcast","Permission_BroadcastUnbroadcastOnPurchasedBy","Permission_UpdateInfo","Permission_Administration","Permission_Create","Permission_ManageHolds","Permission_ViewSalesReports","Permissions","PermissionsRequiredMessage","PerPayment","Performers","Phone","Premium","Preview","Price","PriceBy","PriceByMarketplace","PriceMustBeBetweenFloorAndCeiling","PriceCeiling","PriceEqualsLastPrice","PriceFloor","Prices","PriceZeroUnbroadcastWarning","PricingDetails","PricingHistory","PricingProtection","Private","PrivateNote","ProceedsFloor","ProceedsCeiling","ProceedsPerTicket","Profit","ProofOfPurchase","ProofOfPurchasedInstruction","ProofOfPurchasedRequired","ProofOfPurchasedRequiredMessage","ProvideTransferImageProofInstruction","ProvideTransferProofIdInstruction","ProvideTransferUrlInstruction","PurchaseDate","PurchaseDates","PurchaseDetails","PurchaseHaveNoListings","PurchaseHaveNoSales","Purchases_AddTagType_Details","Purchases_Create_Details","Purchases_Edit_Details","Purchases_EditOwned_Details","Purchases_UpdateTags_Details","Purchases_UpdateTagsOwned_Details","Purchases_ViewAll_Details","Purchases_ViewOwned_Details","Purchases_ViewRecent_Details","PurchaseSettings","PurchaseSettingsAllVisible","QualityControl","QualityOfComparableListings","QuantityAbbreviated","QuantityAdjustedVenueWideQualityScore","QuantityAvailablePremiums","QuantityScore","QueuedForPayment","QuickFilters","RandomizeRankForEachEvents","Rank","Readonly","RecentlyCategorized","RecentlySold","RecentSales","Recommended","Reduce","Reference","RejectSale","RejectSaleWarning","Reload","Remaining","Remove","RemoveAccess","RemoveBarcodes","RemoveHoldAll","RemoveHoldSelected","RemoveHoldVisible","RemovePayment","RemovePredeliveredArtifacts","RemovePdfs","RemovePredeliveredArtifactsAll","RemovePredeliveredArtifactsAllVisible","RemovePredeliveredArtifactsSelected","RemovePredeliveredArtifactsWarning","RemoveTag","RemoveTagValuesAllVisible","RemoveTagValuesSelected","RenewAccessToken","Reply","ReportName","Reports_CreateReports_Details","Reports_UpdateReports_Details","Reports_UpdateReportsOwned_Details","Reports_ViewAll_Details","Reports_ViewInventoryReports_Details","Reports_ViewSalesReports_Details","ReprocessEmail","RequestEvent","RequestPasswordResetEmail","Required","RequiredFieldsError","Reset","ResetAll","ResetFulfillmentWarning","ResetListings","ResetListingsDeleteWarning","ResetSettings","RestorePurchase","RestrictTo","RestrictSelection","RestrictToSameZone","RestrictPriceDropVelocity","RetrievingBuyersInfo","Retry","ReuploadBarcodes","ReuploadETickets","ReuploadProof","ReuploadQRCodes","ReuploadTicketUrls","ReuploadTicketIds","Revenue","ReviewAllocation","RightNow","Role_AutoFulfill_Details","Role_AutoPO_Details","Role_AutoPricer_Details","Role_Buyer_Details","Role_Finance_Details","Role_Fulfillment_Details","Role_Owner_Details","Role_Pricer_Details","Role_Processor_Details","Role_Reporter_Details","Roles","RoleWithUsersCannotBeDeleted","RowScore","SaleConflictWarning","SaleDate","Sales_AddTagType_Details","Sales_ConfirmReject_Details","Sales_ConfirmRejectOnIsFulfillerOf_Details","Sales_ConfirmRejectOnIsPricerOf_Details","Sales_ConfirmRejectOnPurchasedBy_Details","Sales_ConfirmTransferWithoutProof_Details","Sales_CreateForExternalMarketplaces_Details","Sales_CreateOfflineSale_Details","Sales_Fulfill_Details","Sales_FulfillOnIsFulfillerOf_Details","Sales_FulfillOnPricerOf_Details","Sales_FulfillOnPurchasedBy_Details","Sales_ManageHold_Details","Sales_ManageOfflineSaleCreatedBy_Details","Sales_ManageOfflineSale_Details","Sales_ResetFulfillment_Details","Sales_UpdateSaleOnPurchasedBy_Details","Sales_UpdateSalesInfo_Details","Sales_UpdateSalesInfoOnIsFulfillerOf_Details","Sales_UpdateSalesInfoOnIsPricerOf_Details","Sales_UpdateTags_Details","Sales_UpdateTagsOnIsFulfillerOf_Details","Sales_UpdateTagsOnIsPricerOf_Details","Sales_UpdateTagsOnPurchasedBy_Details","Sales_ViewAll_Details","Sales_ViewCostAndMargin_Details","Sales_ViewFulfillmentArtifacts_Details","Sales_ViewFulfillmentArtifactsOnIsFulfillerOf_Details","Sales_ViewFulfillmentArtifactsOnIsPricerOf_Details","Sales_ViewFulfillmentArtifactsOnPurchasedBy_Details","Sales_ViewPaymentState_Details","Sales_ViewProceeds_Details","Sales_ViewRecent_Details","Sales_ViewRecentFromExternalMarketplace_Details","Sales_ViewRecentProceeds_Details","Sales_ViewSalesOnIsFulfillerOf_Details","Sales_ViewSalesOnIsPricerOf_Details","Sales_ViewSalesOnPurchasedBy_Details","SalesAndLift","SaleSettings","SaleSettingsAllVisible","SalesReports","SalesSummary","SaleStatus","SaleTicketTypeBulkEditWarning","SaleTicketTypeWarning","SameTicketsForAllEventsTitle","SameTicketsForAllEventsHeader","SameTicketsForAllEventsMessage1","SameTicketsForAllEventsMessage2","Save","SaveBarcodes","SavePricingStrategyInfo","SaveThisFilter","SaveTicketIds","SaveTicketUrls","Score","ScreenshotsOfTransfer","Search","SearchAndSelectAnEvent","SearchEmptyResult","SearchEventPlaceholderText","SearchForMessagePlaceholder","SearchOrEnter","SearchVenueConfigOrEvent","Seat","SeatAllocationChangeWarning","SeatFrom","SeatHeatmap","SeatIncrementType","SeatingInfoNotMatchStubHub","SeatingUnmapped","SeatSaverPurchaseMessage","SeatTo","SeatTraits","Seating","Seats","Sections","SectionOnly","SeeAll","SeeAllResultsFor","SeeMoreEllipses","Select","SelectAccountToSignIn","SelectAccountToSwitch","SelectAll","SelectDatePlaceholder","SelectedListing","SelectedSection","SelectedSections","SelectFilter","SelectInboxPlaceholder","SelectListingsToMerge","SelectMultiple","SelectNone","SelectSeatFrom","SelectSections","SelectSectionsToPriceAgainst","SelectSortPlaceholder","SelectSplitType","SelectSubjectPlaceholder","SelectTags","SelectTemplate","SelectUsersAndGroups","SelectValueType","SelectVariables","SelectVendor","SelectVendorShowAccounts","SelectYourFilters","Selected","SellAsTicketTypePriority","SellerAccount","SellerAccount_Admin_Details","SellerOwnTickets","SellerSupportCase_Create_Details","SellerSupportCase_View_Details","SellThroughRate","SellThroughRateLowercase","SellThroughRateSubtitle","SendInhandDateToMarketplace","SetAsPaid","SetPriority","Share","ShareReport","Sharing","SharingReportDescription","Shipment","ShowAdvancedSettings","ShowAllListings","ShownQuantity","ShowParkingTickets","ShowRelatedListings","ShowSimpleSettings","ShowVoidCancelledPurchases","SignIn","SignInAgain","SignOut","SignupDate","SinglePayment","SingleValueOnly","Sold","SoldATP","SoldAverageTicketPrice","SoldCost","SoldAs","SoldLast7Days","SoldProceeds","SoldProfit","SoldQty","SoldQuantity","SoldSeats","SoldTicketCost","SoldTickets","SoldToday","SomethingWentWrong","SomethingWentWrongTryAgain","Sort","SortAtoZ","SortBy","SortByDate","SortByTitle","SortNewToOld","SortOldToNew","SortZtoA","SpecialCharactersNotAllowed","SpecificSections","StartDateTime","StateProvince","State","Status","Stop","STR","StrategyName","StubhubEventIdKnown","StubHubLoginRequired","SubGenre","Subject","Success","Suggestions","Support","SupportCaseId","SuppressFor1Hour","SimilarSections","SuspiciousPriceChangeWarning","Summary","SwapTag","SwapTagValues","SwapTagValuesAllVisible","SwapTagValuesSelected","SwitchAccount","SyncWithSystemSettings","System","Tag","TagsToIncludeInColumns","TakeMyParentListingAnd","Target","TaxExempt","TaxPaid","Text","ThanMineAnd","Theme","Then","ThisEvent","ThisMonth","ThisWasTaxExempt","ThisWeek","ThisYear","Ticket","TicketGroupHasErrors","TicketGroups","TicketGroups_ViewAll_Details","TicketIdAlreadyInUsed","TicketmasterBarcodeTransferInstruction","TicketmasterBarcodeTransferViaOneTicketInstruction","TicketmasterBarcodeTransferViaTradeDeskInstruction","TicketmasterTradeDeskApi","TicketTypePriority","TicketsOnPlatform","TicketsPurchased","TicketTypePriorityForSelected","TicketTypePriorityForAll","TicketUrlAlreadyInUsed","Time","TitleName","To","ToBeListed","ToBeDelisted","ToDate","Today","Total","TotalAllInPrice","TotalATP","TotalCost","TotalDeliveryCharge","TotalDue","TotalGrossProfit","TotalListedQuantity","TotalListPrice","TotalNetProceeds","TotalOriginal","TotalPerTicketCost","TotalProceeds","TotalProfit","TotalPurchaseCost","TotalQty","TotalQuantity","TotalRemaining","TotalSoldCost","TotalSoldQuantity","TotalTicketCost","TotalTicketEarnings","TotalTicketQuantity","TotalTickets","TotalUnitCost","TotalUnsoldListPrice","TotalUnsoldProceeds","TotalUnsoldQuantity","TotalValueListed","TotalWebsitePrice","TradeDeskResetSummaryTitle","TradeDeskResetSummaryBody","TradeDeskResetInstructionsStep1","TradeDeskResetInstructionsStep2","TradeDeskResetInstructionsStep3","TradeDeskResetInstructionsStep4","Transactions","TransferFrom","TransferId","TransferIdNote","TransferProofId","TransferTicketsChoice","TransferTicketsIns","TransferTo","TrueFalse","TurnOffReporting","TurnOffReportingWarning","Type","UnableToProcess","UnableToRetrieveBuyersInfo","UnbroadcastAll","UnbroadcastAllVisible","Unbroadcasted","Uncategorized","Undeliverable","UndercutAmount","UndercutMode","UndercutAbsoluteAmount","UndercutAbsoluteOrRelativeAmountMustBeSetError","UnderCutModePrompt","UndercutRelativeAmount","Ungroup","UngroupListingsAll","UngroupListingsAllVisible","UngroupListingsConfirmation","UngroupListingsSelected","UniqueId","Unread","UnbroadcastSelected","UnsavedChanges","UnsavedChangesWarning","Unset","UnsoldCost","UnsoldQty","UnsoldQuantity","UnsoldTickets","UpdateCurrency","UpdatePurchaseCurrencyWarning","UpdateSeatingInformation","Upload","UploadBarcodes","UploadETickets","UploadFailureMessage","UploadProof","UploadProofOfPurchase","UploadQRCodes","UploadSeatScoreFile","UploadTicketUrls","UploadTicketIds","UrlsToAcceptTickets","UseExistingRoleAsTemplateTitle","UseExistingRoleAsTemplateExplanation","UserManagement","UserNotFound","Users","UsersWithAccess","UseThisAnswerForNext24Hours","Value","ValueDoesNotSatisfyType","ValueType","Variables","VariablesToIncludeInColumns","VendorAccount","VendorAccounts","Vendors","VenueConfigs","VenueMapWelcomeMessage","VenueName","Venues","VenueWideQualityScore","VenueWideInSectionPriority","VenueWideQualityScoreSameZone","VerifyBuyerInfo","VeryAggressive","View","ViewAllAccessiblePermissions","ViewBarcodes","ViewComps","ViewDetails","ViewDuplicates","ViewEditabilityDescription","ViewEmailDetails","ViewETickets","ViewETicketUrls","ViewEventMap","ViewInventory","ViewPurchase","ViewQRCodes","ViewSale","ViewSales","ViewTicketIds","ViewTransferProof","ViewTransferTicket","ViewWallet","ViewZoneMap","Visibility","Visible","VoidBulkPurchaseWarning","VoidPurchase","VoidPurchaseDescription","VoidSinglePurchaseWarning","WasTaxExempt","WastedCost","WastedQty","WastedTickets","WasteUnsoldTickets","Webhook_View_Details","Webhook_Create_Details","Webhook_Edit_Details","Website","WebsiteFloor","WebsiteCeiling","WebsitePrice","WeekOfYear","Weeks","WhatIsAPlacholder","WhatIsASeatSaver","WhatSeatToFulfill","WhatsNew","WhatTicketsDidYouBuy","WhenAndWhere","WhenWhereWho","WhereTicketsWerePurchased","WholeNumber","Widgets","WillCall","Worse","Yes","YesToSome","YourAutoPriceResults","YourBuyer","YourListing","YoureCheaper","YoureMoreExpensive","YourSale","YourSaleMetricsPart1","YourStats","YourSummaryMessage","YourTickets","ZoneMap","ZoneMapDescription","Zones","Zoom","ZoomInstruction","ZtoA","ZtoAArrow","BaseBid","MaxBid","DailyBudget","AddAdCampaign","AddAdGroup","EnterAdCampaignName","EnterAdGroupName","ManageAdGroups","BidModifierDimension","EventBidModifierValue","TicketClass","BidModifier","ViewApplicableListings","AdSpend","AddGenre","AddPerformer","AddEvent","AddTicketClass","AddListings","AddVenue","MaxBidLessThanBaseBidMsg","DailyBudgetLessThanMaxBidMsg","ContentIds","id","defaultValue","FormatContentId","ActivityLogChangeFromTo","ActivityLogChangeFrom","ActivityLogChangeTo","AddAnother","AndXMore","ApplyFilterToReduceCountsToSeeData","ApplyToAllEventsConfirmation","BulkEditMaxItemPreviewDisplayMessage","BulkEditSkippedItemsPrompt","ClassifyAs","CompletedNSecondsAgo","CompletedNMinutesAgo","CompletedNHoursAgo","CopyOf","CouldNotFindListingId","CouldNotFindOrderId","CouldNotFindSaleId","DaysBeforeEvent","DuplicateListingDetails","DuplicatingSeats","EmailAddressFrom","EmailAddressTo","EventsSelected","ExtraBarcodes","ExtraTicketIds","ExtraTicketUrls","FirstTimeVenueEventSetup","HurdleN","InNDays","InNHours","InNMinutes","InvalidTagCharacter","ItemsSelected","LastNDays","LastNHours","LastNMinutes","LastNMonths","ListingInUKNotification","LoadingListingId","LoadingOrderId","LoadingSaleId","MarketplaceListings","MaxAllowedFileSizeMb","MaxReportSizeWarningMessage","MedianPriceWarning","MinDiscountContent","MissingBarcodes","MissingTicketIds","MissingTicketUrls","NCharactersRemaining","NCompleted","NFailed","NIncreaseBy","NDays","NDaysBefore","NHours","NHoursBefore","NMinutes","NMinutesBefore","NoDataAvailable","NotificationTypeListingBroadcastFailed","NotificationTypeListingUnbroadcastFailed","NotificationTypeListingUpdateAllInPriceFailed","NotificationTypeListingUpdateInHandDateFailed","NotificationTypeListingUpdateSplitTypeFailed","NotificationTypeListingUpdateTicketTypeFailed","NotificationTypeListingUpdateUnitNetProceedsFailed","NotificationTypeSellerSupportCaseNewReply","NotUnique","NSelected","NSelectedSections","NUpdated","NWarnings","OnlyForMarketplaces","PacksOf","PageNum","PercentageRelativeTo","ProofOfPurchasedRequiredDetailMessage","RowRangeInputError","SalesForEditTickets","SalesForRemovedTickets","SearchingForListingId","SearchingForOrderId","SearchingForSaleId","SearchItem","SearchResultPick","SeatNumber","ShareQuoted","SwitchTo","TakeMeThereInSeconds","TheseAreThePastSalesOnTheWebsiteAndApp","TicketCount","TicketNumber","TicketPricePercentile","TransactionsLastNHour","TransactionsLastNDay","Uploading","UpToXTagsCanBeIncluded","UrlNumber","VisitsLastNHour","VisitsLastNDay","WelcomeUserMessage","WillDeliverToSecondaryAccount","YourSaleMetricsPart2","YourSaleWithStatus","FormatContentIds","screenSizeState","mobile","tablet","desktop","largeDesktop","ScreenSizeContext","createContext","useScreenSizeContent","useContext","ScreenSizeProvider","children","screenSiseState","setScreenSiseState","useState","isMobile","useMatchMediaQuery","mediaQuery","isTablet","isDesktop","isLargeDesktop","useEffect","breakpoints","mapValues","omit","bp","makeMediaQuery","min","max","mqlRef","useRef","matchMedia","match","setMatching","matches","mql","media","listenerFunc","e","addEventListener","addListener","removeEventListener","removeListener","useMatchMedia","DeviceAwareContentWrapper","defaultId","mobileId","jsx","Content","splitFormatContent","s","replacer","curS","i","foundPlaceholder","placeholder","substring","push","memObj","buildKey","key","entityName","set","contains","truncate","initVal","isEnabled","memoryStore","sessionStorage","setItem","console","str","getItem","removeItem","sessionStorageStore","CONTENT_NOT_FOUND_ENTITY","emptyContentResolver","args","Array","isArray","emptyAppContext","isLoading","contentCache","hasValue","contentResolver","formattedContentResolver","_","params","format","ContentContext","store","useContentContext","ContentProvider","cacheResolver","useCallback","contentsArray","every","invalidContentIDs","includes","map","rawValue","formattedValue","some","React","isValidElement","p","parts","Fragment","raw","FormatContent","BaseContent","formatted","resolved","isString","__html","DOMPurify","sanitize","useContent","contentContext","getContent","useContents","ids","getContents","results","contents","c","concat","useFormattedContent","contentId","getFormattedContent","isContentId","isFormatContentId","contentComparator","contentA","contentB","toLocaleUpperCase","localeCompare","RADIX_SIDE_OFFSET","RADIX_COLLISION_PADDING","MAX_ALLOWED_UPLOAD_FILE_SIZE","mergeProps","defaultProps","props","resultProps","defaultProp","resultProp","clsx","charCodeAt","mergeRefs","refs","val","ref","styled","type","className","Object","assign","forwardRef","createElement","displayName","styledComponent","Component","addClassNameToProps","Button","variant","textColor","shape","size","justifyContent","fontWeight","styles","root","CountBadge","color","badge","DividerLine","Root","DropdownMenu","Trigger","Portal","DropdownMenu.Portal","DropdownMenu.SubContent","DropdownMenu.Content","Item","Separator","DropdownMenu.Separator","separator","Label","DropdownMenu.Label","label","Popover","Popover.Portal","Popover.Content","Arrow","Stack","direction","gap","flexWrap","alignItems","width","height","flexShrink","alignSelf","RadioGroup","RadixRadioGroup.Root","Radio","disabled","containerClassName","RadixRadioGroup.Item","RadixRadioGroup.Indicator","Colors","green075","green100","green150","green200","green300","green400","green450","green500","green600","green700","gray100","gray200","gray250","gray300","gray400","gray450","gray500","gray600","gray700","gray800","gray900","gray1000","blue075","blue075Light","blue100","blue200","blue300","blue500","blue600","blue700","magenta300","yellow100","red100","red200","red300","red400","red500","red600","black","white","darkBlue250","darkBlue300","darkBlue700","dark060","indigo025","indigo050","indigo060","indigo070","indigo075","indigo100","indigo200","indigo300","indigo500","indigo600","indigo700","tuBlue025","tuBlue100","tuBlue200","tuBlue300","tuBlue400","tuBlue500","tuBlue600","fuchsia075","fuchsia100","fuchsia200","fuchsia500","fuchsia600","fuchsia700","aqua075","aqua100","aqua200","aqua500","aqua600","aqua700","neutral000","neutral025","neutral050","neutral075","neutral100","neutral200","neutral300","neutral400","neutral500","neutral600","neutral700","neutral1000","negative075","negative100","negative200","negative500","success075","success100","success500","warning075","warning100","warning500","info075","info100","info200","info500","info700","darkInfo","brandAxs","brandVivid","brandSeatgeek","brandTickPick","brandTicketmaster","brandFanXchange","brandTicketEvolution","brandTicketNetwork","brandTelecharge","brandTicketon","brandSeetickets","brandMgmResorts","brandSmithCenterImport","brandComputicket","brandLyte","brandGoTickets","brandB2BSales","textSeatgeek","textFanXchange","textEventbrite","textTicketon","textEtix","textMgmResorts","backgroundStubhubSeatmap","seatCardBackgroundColor","xs","sm","md","ml","lg","xl","phone","xlDesktop","fontWeightConfig","regular","medium","semiBold","bold","VariantConfig","title1","ScreenVariant","fontSize","sizing","typography","defaultfontWeight","lineHeight","title2","title3","title4","title5","title6","subtitle1","subtitle2","body1","body2","caption1","caption2","multiplier","getStyles","weight","letterSpacing","green025","green050","BASE_LIGHT_PALETTE","neutralPrimary","neutralPrimaryHover","neutralPrimaryActive","textOnNeutralPrimary","borderNeutralPrimary","neutralSecondary","neutralSecondaryHover","neutralSecondaryActive","textOnNeutralSecondary","textOnDisabled","borderDisabled","textDisabledOnSurface","accentPrimary","textOnAccentPrimary","borderAccentPrimary","accentSecondary","textOnAccentSecondary","textAccentOnSurface","errorPrimary","errorPrimaryHover","errorPrimaryActive","textOnErrorPrimary","borderErrorPrimary","errorSecondary","errorSecondaryHover","errorSecondaryActive","textOnErrorSecondary","textErrorOnSurface","successPrimary","textOnSuccessPrimary","borderSuccessPrimary","successSecondary","textOnSuccessSecondary","textSuccessOnSurface","warningPrimary","textOnWarningPrimary","borderWarningPrimary","warningSecondary","textOnWarningSecondary","infoPrimary","textOnInfoPrimary","borderInfoPrimary","infoSecondary","textOnInfoSecondary","textInfoOnSurface","surfacePrimary","surfaceSecondary","textPrimaryOnSurface","textSecondaryOnSurface","textLinkOnSurface","textLinkHoverOnSurface","textLinkActiveOnSurface","textLinkVisitedOnSurface","borderPrimary","borderSecondary","elevated","textPrimaryOnElevated","textSecondaryOnElevated","scrim","STUBHUB_LIGHT","brandPrimary","brandPrimaryHover","brandPrimaryActive","textOnBrandPrimary","borderBrandPrimary","brandSecondary","brandSecondaryHover","brandSecondaryActive","textOnBrandSecondary","textBrandOnSurface","textBrandOnElevated","borderRadius","m","l","xxl","circle","squared","shadowConfig","shadow","level","shadowPosition","shadowBlur","offset","spacing","multipliers","purpleBranding","primary100","primary200","primary700","secondary075","secondary100","BaseTheme","rounded","floatingInputLabel","filledInLoading","logoPath","colors","primary025","primary050","primary060","primary070","primary075","primary150","primary300","primary400","primary500","primary600","secondary","secondary200","secondary300","secondary400","secondary450","secondary500","secondary600","secondary700","secondary800","secondary900","secondary1000","secondary1200","newSecondary075","newSecondary100","newSecondary200","newSecondary500","newSecondary600","newSecondary700","accent075","accent100","accent200","accent500","accent600","accent700","info300","info1000","textPrimary","textPrimaryHover","textSecondary","textBrand","textBrandHover","textDisabled","textInverted","textStrong","textDarker","textDarkest","textHighlight","textLinkPrimary","textLinkActive","textLinkHover","textLinkVisited","textLinksGroupPrimary","textOnBrandBg","textOnBrandBgLink","textOnBrandBgHover","textNavPrimary","textNavActive","textNavHover","textNavVisited","textNegative","textSuccess","textInfo","textWarning","textLogoVggGray","textLogoVggGreen","backgroundNegative","backgroundNegativeDark","backgroundNegativeHover","backgroundSuccess","backgroundWarning","backgroundInfo","backgroundPrimary","backgroundSecondary","backgroundInteraction","backgroundHover","backgroundDark","backgroundNeutral","backgroundDisabled","backgroundActiveDisabled","backgroundAccent100","backgroundAccent700","overlayPrimary","backgroundBrandActive","backgroundBrandHover","backgroundBrandLight","iconPrimary","iconHover","iconDisabled","borderActive","borderInverted","borderDark","borderNeutral","borderActiveDisabled","borderNegative","link100","highlight100","highlight200","highlight300","highlight400","highlight450","highlight500","highlight600","highlight700","urgency100","urgency200","urgency250","urgency300","urgency500","warning","danger200","error100","palette","PurpleTheme","OldTheme","PurpleLegacyTheme","TicketUtilLegacyTheme","vars","IconsFill","currentColor","PaymentSize","PaymentViewbox","square","rect","SvgWrapper","iconSize","fill","title","align","withHoverEffect","onClick","onMouseDown","onMouseEnter","onMouseLeave","role","ariaHidden","stroke","newUniqueId","uniqueId","StyledSvg","svg","theme","AccessibilityIcon","AisleSeatIcon","ArtistIcon","BackIcon","BarcodeIcon","CalendarOutlineIcon","ChatIcon","CheckIcon","ClockIcon","noOutline","fillColor","jsxs","ConnectedIcon","CrossIcon","DeleteIcon","DollarIcon","DownloadIcon","EditIcon","ErrorOutlineIcon","ErrorSolidIcon","ExpandIcon","FilterIcon","FoldIcon","ForwardIcon","GenericDisclosuresIcon","GenericFeatureIcon","HideIcon","HistoryIcon","HomeOutlineIcon","InfoOutlineIcon","InfoSolidIcon","ListIcon","LoadingIcon","LocationOutlineIcon","LockIcon","MailIcon","MinusIcon","MobileTicketIcon","MobileTransferIcon","MoreIcon","MyTicketsOutlineIcon","NotifyIcon","ObstructedViewIcon","PaperTicketOutlineIcon","PaperTicketsOutlineIcon","ParkingPassIcon","PdfIcon","PlusIcon","PrintAtHomeIcon","ProcessingIcon","ProfileOutlineIcon","ReloadIcon","ResetIcon","SearchOutlineIcon","SearchSolidIcon","SeatIcon","SeatMapIcon","SellOutlineIcon","SettingsIcon","ShareIcon","SuccessOutlineIcon","parsedWidth","parsedHeight","attr","parseInt","inheritedWidth","inheritedHeight","hoverEffect","cursor","TicketAlertOutlineIcon","ToBeDeterminedIcon","UnHideIcon","UploadIcon","WalletOutlineIcon","WarningOutlineIcon","WarningSolidIcon","ArrowDownIcon","ArrowDownIcon7","ArrowUpIcon","ArrowUpIcon7","CalendarIcon","ChevronDownIcon","ChevronLeftIcon","ChevronRightIcon","ChevronUpIcon","SigninIcon","SignoutIcon","sizes","isSquare","BankAccountIcon","GeneralIcon","PaypalIcon","WalletIcon","WireIcon","defaultTimingFn","elapsed","Math","pow","useAnimateScroll","pxPerSecond","timingFn","scrollDirection","rafHandle","startScrollState","startTimestamp","prevTimestamp","animateScroll","timestamp","scrollTop","startScrollTop","scrollLeft","startScrollLeft","maxScrollTop","scrollHeight","clientHeight","maxScrollLeft","scrollWidth","clientWidth","requestAnimationFrame","startScroll","endScroll","cancelAnimationFrame","EDGE_THRESHOLD","getScrollEdgesState","el","atTop","atBottom","abs","atLeft","atRight","useScrollEdges","scrollEdgesState","_setScrollEdgesState","setScrollEdgesState","prev","isEqual","resizeObserver","ResizeObserver","observe","disconnect","handleScroll","capture","passive","ScrollAreaContext","viewportRef","RadixScrollArea","Viewport","Scrollbar","Thumb","Corner","ScrollArea","showScrollEdges","scrollAreaRefActions","scrollButtonClassName","ScrollEdges","edges","useImperativeHandle","SelectContext","isDefaultValueSelected","setIsDefaultValueSelected","Select.Root","onValueChange","hideFoldButton","Select.Trigger","trigger","Select.Icon","style","Select.Value","contentRef","onTouchEnd","preventDefault","Select.Portal","Select.Content","elem","Select.ScrollUpButton","Select.Viewport","Select.ScrollDownButton","prefixIcon","Select.Item","Select.ItemText","Select.ItemIndicator","Table","Thead","showBottomBorder","Tbody","Tr","Th","Td","Switch","RadixSwitch.Root","RadixSwitch.Thumb","textArea","alignment","textBox","Input","onKeyDown","stopPropagation","Provider","RadixTooltip","contentVariant","RadixTooltip.Portal","RadixTooltip.Content","RadixTooltip.Arrow","Tooltip","triggerContent","delayDuration","contentStyle","open","rest","TooltipPopover","onClosed","Popover.Root","Popover.Trigger","Popover.Arrow","UpDownComboButton","onUpClick","onDownClick","isCondensedView","xxs","OkButton","textContentId","GenericDialogContext","isDialogOpen","setIsDialogOpen","useGenericDialogContext","GenericDialogProvider","useDefaultZoomOption","defaultZoomOption","SiteZoomOption","tryInvokeApi","f","onError","onFinally","error","Sentry","err","warn","appContext","mainRoute","loginContext","activeAccountWebClientConfig","setLoginContext","setMainRoute","cobrandId","overrideCoBrandId","AppContext","useAppContext","AppContextProvider","showErrorDialog","useErrorBoundaryContext","loadingAppContext","setLoadingAppContext","reactAppContext","setReactAppContext","cobrandIdOverride","setCobrandIdOverride","initAppContextIfNeeded","setLoginContextWrapper","newLC","isSuccess","user","activeAccount","accountName","userId","userName","impersonatedUsername","useMemo","activeAccountUserId","STUBHUB_LOGO_IMAGE","URL_REGEX","SEAT_RANGE_REGEX","SaleDeeplinkQueryParam","InventoryDeeplinkQueryParam","PurchaseDeeplinkQueryParam","AdCampaignQueryParam","AdGroupListingsQueryParam","PurchaseFromEmailPoQueryParam","EventIdQueryParam","SearchResultIdQueryParam","VendorIdQueryParam","MarketplacePaymentIdDeeplinkQueryParam","EventSessionIdQueryParam","EventSessionRoleQueryParam","DemandDashboardIsOnSaleEventQueryParam","DemandDashboardEventIdQueryParam","TICKETMASTER_APP_ID","EMPTY_SELLER_USER_ID","FULFILLMENT_PROVIDER_SELLER_USER_IDS","Set","REACT_QUERY_CACHE_MAX_AGE_IN_MS","MAX_DATE","MIN_DATE","DATA_REFRESH_RATE_IN_MILLIS_FAST","DATA_REFRESH_RATE_IN_MILLIS_SHORT","DATA_REFRESH_RATE_IN_MILLIS_LONG","UK_COUNTRY_CODES","US_COUNTRY_CODES","SuspiciousPriceChangeThreshold","MAX_NUM_OF_ITEMS_FOR_FLATTENED_VIEWS","process","MAX_NUM_OF_ITEMS_FOR_REPORT_VIEWS","VenueMapConfigPlaceholder","VenueMapVersionPlaceholder","VenueMapUrl","VenueMapV3Url","REACT_APP_STUBHUB_BASE_URL","REACT_APP_VIAGOGO_BASE_URL","REACT_APP_APP_INSIGHTS","REACT_APP_NAME","REACT_APP_STUBHUB_MY_HUB_BASE_URL","REACT_APP_STUBHUB_UK_URL","REACT_APP_REPORTS_BRIDGE_URL","DEFAULT_AUTO_GENERATED_PAYMENT_METHOD","MarketplaceEventIdPlaceholder","MarketplaceEventUrlTemplate","AppTelemetryProvider","instrumentationKey","pageId","disableFetchTracking","SellerUserSettingsContext","SellerUserSettingsProvider","initialUserSettingIds","trackError","sellerUserClient","queryKey","queryResult","useQuery","queryFn","meta","persist","trackErrorData","enabled","staleTime","Infinity","refetchOnWindowFocus","contextSettingIds","contextQueryKey","FirstTimeFeature","EventMapBanner","useServerUserSetting","sellerUserSettingsContext","userSettingsContextQueryResult","contextIsReady","isFetched","isRefetching","isPending","defaultGetSellerUserSetting","defaultSetSellerUserSetting","queryClient","useQueryClient","setUserSetting","newData","setQueryData","success","invalidateQueries","DEFAULT_ZOOM_OPTION","SiteThemeOption","SITE_THEME_MODE_STORAGE_KEY","SITE_ZOOM_STORAGE_KEY","siteThemeContextDefaults","isDarkMode","setSiteMode","setSiteZoom","selectedMode","selectedZoom","isZoomSupported","SiteThemeContext","SiteThemeContextProvider","modeToThemeMap","setIsZoomSupported","setSelectedZoom","setSelectedMode","serverSiteThemeValue","setThemeUserSetting","serverSiteZoomValue","setZoomUserSetting","mode","zoom","lsScheme","localStorage","lsZoom","hasFeature","useSiteTheme","useKeyPress","targetKey","isPressed","setPressed","downHandler","upHandler","useListenForEscapeKeyPressed","DialogHeader","ModalHeader","DialogFooter","ModalFooter","DialogBody","ModalBody","CrossIconContainer","span","GenericDialog","header","footer","isFullHeight","contentClassName","includeCloseButton","scrollable","isOpen","onCancel","isEscapeKeyPressed","setTimeout","RSModal","darkModeRoot","getErrorInfoFromStatusCode","statusCode","messageText","headerDisplay","messageDisplay","KnownGenericErrors","uiResult","StatusCodes","ErrorDialog","headerText","onOkay","useBasicDialog","showDialog","setShowDialog","openByDefault","launchDialog","closeDialog","handleOkay","handleCancel","dialogProps","ErrorBoundaryContext","genericError","ErrorBoundaryContextProvider","useErrorTracker","setMessage","setStatusCode","customerHeader","setCustomerHeader","onDismissError","setOnDismissError","logClient","trackErrorWrapper","errorId","location","getLogLevel","statusStr","dataSerialized","logLevel","applicationSource","pageUrl","href","componentStack","additionalInfo","responseStatus","newLoginContext","additionalOptions","onErrorOk","SiteContentProvider","contentQuery","networkMode","hasAnyOfPermissions","userDetail","permissions","userPermissions","filter","hasPermissionForListing","listing","forBulkEdit","isPricerOf","isPurchasedBy","pricerId","isCurUserPo","poBys","hasPermissionForSale","sale","isFulfillerOf","fulfillerId","owners","pricerIds","buyerIds","hasPermissionForPurchase","purchase","allowForNewCreate","perms","ALL_INVENTORY_VIEW_PERMISSIONS","ALL_SALES_VIEW_PERMISSIONS","checkFeatureState","feature","featureDetails","fDetails","find","fd","isMarketplaceActive","marketplaceSetting","hasApiToken","hasApiRefreshToken","tokenExpired","hasAccessToRoute","route","hasInventoryView","hasSalesView","hasHomePageNotifFeature","canViewNotifications","features","reportingV2FeatureAvailable","reportSinglePagedV1V2FeatureAvailable","getHasAccessToRoutes","featuresOverride","sortSellerAccount","accounts","toSorted","aTag","bTag","hasFeatures","useUserHasFeature","hasFeatureResult","PosTablePaginationFooterHeight","ActiveFocusContext","activeItem","setActiveItem","onKeyDownHandler","ActiveFocusContextProvider","rows","setRows","index","inputRows","isArrowDown","isArrowUp","effectiveRows","newIndex","useActiveFocusContext","IconButtonContainer","div","withConfig","componentId","IconButton","icon","titleContentId","ButtonWithIcon","iconOnlyMode","startWithText","defaultStyle","CancelButton","effectiveVariant","ConfirmButton","ExpireHoldButton","useListExpansion","initialExpandedItems","expandedListItems","setExpandedListItems","isListItemExpanded","itemId","indexOf","toggleListItemExpansion","itemIds","curCount","newLists","setListItemExpansion","items","hasChanged","refreshExpandedListItems","getFlattenedListings","listings","groupIdNameMap","flattenGroupItems","isLtGrp","groupType","ltGrpId","groupName","groupItems","flatMap","updateCatalogResults","catalogResults","expandedEventsData","finalCatalogResults","events","expandedEventData","curEvent","listGrpCnt","ungrListCnt","listCnt","sales","salesCnt","ticketGroups","tktGrpsCnt","entities","counts","getEventsWithNonZeroCounts","requireEventNotNull","ev","event","poCnt","hasEventsWithFullLoadedData","removeSpecialChars","removeAccents","DEFAULT_TIMEZONE_LOCAL","Intl","DateTimeFormat","resolvedOptions","timeZone","FormatOption_Standard","Millions","Thousands","Whole","Precise","FormatOption_Seating","Seating_OriginalSeating","Seating_FullSeating","Seating_SectionOnly","FormatOption_Event","Event_FullInfo","Event_EventName","FormatOption_DateTime","DateTime_MMDD","DateTime_MMDD_Time","DateTime_MMDD_Time_Day","DateTime_MMDDYY","DateTime_MonthDD","DateTime_MonthDD_Time","DateTime_MonthDD_Time_Day","DateTime_Month_DD_YY","DateTime_Month_DD_YY_Time","DateTime_Month_DD_YY_Time_Day","FormatOption_EnumDisplay","EnumDisplay_Icon","EnumDisplay_Text","FormatOption_Percent","Percent_RoundToTwo","Percent_RoundToOne","Percent_RoundToWhole","Percent_AsDecimal_RoundToOne","Percent_AsDecimal_RoundToTwo","Percent_AsDecimal_RoundToThree","FormatOption_HiddenCustomFormat","Actions_LinkOnly","Id_RawIdOnly","FormatOption","getLastDateRange","duration","end","start","startOfDay","sub","endOfDay","getNextDateRange","add","getLastDateRangeRelative","roundingMode","now","relativeStartSecs","getTime","relativeEndSecs","getNextDateRangeRelative","DateRangePresetName","Last90Days","StandardDateRangePresetNames","SaleDateRangeRelativePresetNames","InhandDateRangePresetNames","EventDateRangePresetNames","NextDateRangePresetNames","PastDateRangePresetNames","PurchaseDateRangePresetNames","DateRangePresetsMap","range","days","startOfWeek","endOfWeek","startOfMonth","endOfMonth","startOfYear","endOfYear","weeks","months","years","subYears","subDays","DateRangePresets","values","getDateRangePresets","presetNames","drp","DateRangeRelativePresetsMap","DateRangeRelativePresets","getDateRangeRelativePresets","DatePresetName","getDatePresets","targetDate","inHandDaysBeforeEvent","DatePresets","dp","StandardDatePresetNames","subWeeks","formatDate","dateString","intlFormat","month","day","year","formatDateRange","differenceInDays","toISOString","from","to","toDateTimeRange","date","startRel","endRel","formatRelativeDateRange","dateRage","startDate","endDate","getDateRangeRelativePresetDisplayText","preset","textOverflow","overflow","getDateRangePresetDisplayText","getDatePresetDisplayText","toZonedTime","daysBeforeEventLabel","getPresetFromUiDateTimeRange","getRelativePresetFromUiDateTimeRange","getPresetFromDate","selectedDate","getUiDateTimeRangeFromPreset","onlyIncludes","presetEnum","tryGetDateRangePresetSuggestionText","tryGetDateRangeRelativePresetSuggestionText","tryGetDatePresetSuggestionText","stringToUtcDate","inputStringWithTimeZone","isValid","parseISO","split","divideDateInterval","interval","n","toTemporalInstant","call","fromDate","toZonedDateTimeISO","Temporal","timeZoneId","toDate","durationUntil","until","durationMonths","round","largestUnit","smallestUnit","relativeTo","period","Duration","compare","floor","total","dates","curr","epochMilliseconds","getDisabledDatesForTimeFrameFilter","timeFrameFilter","addDays","isDatePassedHours","dateTime","hours","differenceInHours","getTimeAgoString","formatDistance","addSuffix","convertDateToTemporalPlainDateTime","toPlainDateTime","getEventDateDisplayStrings","dateFormat","subDateFormat","formattedEventDate","formattedEventSubDate","SQL_MAX_DATEITME","isSqlMaxDate","getFullYear","getMonth","getDate","validateDate","dateObj","errorConfig","errors","parsedStartDate","parsedEndDate","invalidStartDate","invalidEndDate","endDateBeforeStartDate","getEventTimeFrameFromDateTimeRange","roundRelativeDateUp","roundRelativeDateDown","INT_MAX_VALUE","roundToPrecision","decimalPlaces","factor","formatNumber","decimal","isUnbounded","toLocaleString","minimumFractionDigits","maximumFractionDigits","formatPercent","formatCurrency","precisionOptionMappings","suffix","roundToDigits","DECIMAL_OPTION_MAPPINGS","displayAsDecimal","applyNumberFormatting","inputNumber","isDateTime","currencyDecimalDigits","isPercent","enableUtcFallback","localeText","precision","inputDate","formatStr","formatInTimeZone","defaultDecimalOption","precisionValue","MILLISECONDS_IN_SECOND","SECONDS_IN_MINUTE","MINUTES_IN_HOUR","HOURS_IN_DAY","DAYS_IN_WEEK","getTimeDateDifferenceAsShorthand","dateToCompareTo","hideRelativeTerms","ago","in","agoText","inText","nowText","difference","isDateInFuture","relativeSeconds","relativeMinutes","relativeHours","relativeDays","relativeWeeks","returnWrapper","numberToOrdinal","calcSeatScore","sum","getCompleteEventConfigScoreOverrides","defaultScoreOverrides","scoreOverrides","defaultAllScoresToZero","scaleScoreRaw","so","scoreRaw","score","maxDefaultScoreRaw","reduce","curOverridesMap","cur","sectionId","rowId","dfScore","getEventConfigScoreOverride","venueMapConfig","newName","eventConfigScoreOverride","defaultConfigPayload","isOverrideTemplate","cfgId","venueCfgId","cfgPayload","sectionScores","isTemplate","getRowRepresentingSectionMedianScore","seatScores","s1","s2","getMedianScoreForSection","median","getMatchingSectionRow","sections","sectionName","section","trim","rowName","row","specRow","ticketClassId","tktClass","getSectionsSameZone","getSeatScore","seatScore","sso","updateScoreForSectionMaintainingRowScoreRatio","newScore","newScoreOverrides","overridesToEdit","updateScoreMaintainingRowScoreRatio","scores","med","ratio","half","SectionDisplay","lowestPrice","medianPrice","highestPrice","sectionAreaName","seatQualityScore","MultiSectionsDisplay","onClearSelection","GeneralAdmissionContainer","GeneralAdmissionHeader","GeneralAdmissionText","rawFetch","url","ok","contentTypeHeader","entries","json","statusText","ColorBand","numOfSteps","spectrum","labels","colorSteps","rainbow","Rainbow","setNumberRange","setSpectrumByArray","colorAt","ColorStep","backgroundColor","addFocalPoint","svgElement","focalPoint","x","y","getElementById","document","createElementNS","setAttribute","appendChild","image","angleDeg","isDirectional","CircleArrowUp","circle2","VenueMapContentContainer","isWhiteBackground","StyledDiv","isRelocatedStaticInfo","removePinchZoom","setTransitionAnimation","blurMap","hideMap","StyledResetVariant","showFiltersOnTop","IconParent","button","StyledIconParentVariant","StyledBorderDiv","StyledHoverDiv","isSeatingMatchSectionInfo","sectionText","SECTION_TYPES_WITH_ROWS","isMissingRowData","venueMap","sectionsWithRow","sectionType","hasNonSpeculativeRows","isSpeculative","findTicketClass","seating","sectionInfo","filterSectionByZone","classId","ticketClass","filterSectionByRowType","isMissiongSectionData","ordinal","checkIntersection","pointA","pointB","topLeft","left","top","topRight","right","bottomLeft","bottom","bottomRight","lineIntersects","compareA","compareB","denominator","t","u","crossesPoints","points","drawLines","context","clearRect","canvas","strokeStyle","beginPath","moveTo","lineTo","closePath","registerDrawLine","svgElementRef","onDoubleClickStart","onDoubleClickDone","allowDrawLine","parentElement","element","rectPoints","resetCanvas","curreParent","removeChild","onDoubleClick","shiftKey","ctrlKey","altKey","metaKey","offsetX","offsetY","getBoundingClientRect","clientX","clientY","position","getContext","onMouseMove","currentPoint","outline","moved","sqrt","registerPanningListners","isPanning","willClick","downEvent","panningHandlers","mousedown","mousemove","mouseup","eventName","AddFileIcon","SignalStep0Icon","SignalStep1Icon","SignalStep2Icon","SignalStep3Icon","AnimatedBroadcastIcon","step","setStep","timer","setInterval","clearInterval","AnimatedUnbroadcastIcon","AxsLogo","BroadcastFailedIcon","BroadcastIcon","BroadcastIconInverted","BroadcastWithErrorIcon","CompanionIcon","ConfigureIcon","CopyIcon","DiskSaveIcon","DotIcon","DuplicateOutlinedIcon","FlattenedViewIcon","FullPageIcon","FullySoldIcon","GametimeLogo","darkLogo","GroupItemIcon","HamburgerMenuIcon","LayoutIcon","ListingGroupIcon","ListingIcon","MapIcon","MarginMetricIcon","MergeIcon","MobileQRIcon","MoneyIcon","OpenLinkIcon","PurchaseIcon","RecenterIcon","SaleAlertIcon","SalesMetricIcon","SeatGeekLogo","SeatSaverIcon","SignalIcon","SplitIcon","StubHubLogo","colorMode","letterColor","StubHubProLogo","TagIcon","TicketmasterLogo","TicketUtilLogo","TickPickLogo","UnbroadcastIcon","ViagogoLogo","VividSeatsLogo","CondensedColorBand","startLabelContentId","endLabelContentId","startText","endText","VenueMapContentCondensed","localRef","colorBandProps","statsContent","mapActionContainerClassname","v3","onZoom","onReset","containerRef","useMeasure","useDebounce","minHeight","clickEvents","MaxSimilarSectionsToGetForSelectedSections","ZOOM_SCALE_SENSITIVITY","defaultBackground","defaultForeground","defaultHoverBackground","backgroundPrimaryHover","defaultHoverForeground","selectedBackground","backgroundHighlight","selectedForeground","selectedHoverBackground","backgroundHighlightHover","selectedHoverForeground","VenueMapContent","selectedSections","markedSectionIds","onSectionClicked","onSectionHovered","setSelectedSections","staticInfoContent","infoIconContent","availableSections","isZoomEnabled","isPanEnabled","showDefaultMapColors","getColor","isHeatMap","shouldRepaint","disableHoverEffect","onRemoveEventListenersRef","onDoulbeClickDoneRef","mapLoaded","setMapLoaded","deregisterDrawLine","hoveredContent","setHoverContent","zoomFlag","setZoomFlag","setBlurMap","setHideMap","sectionIdsMissingRowOrder","getElementsByTagName","venueMapSvg","svgPanZoom","fit","contain","zoomScaleSensitivity","resize","center","clearTimeout","sprites","querySelectorAll","getSpriteIdentifier","isEmpty","zoomEnabled","panEnabled","dblClickZoomEnabled","onPan","debounceOnResize","debounce","onResize","mouseEnter","target","htmlTarget","localName","child","getAttribute","selectedSectionId","sectionIndex","findIndex","mouseLeave","setSelectedHandler","mouseEvent","selectedTicketClassId","selectedSection","selectedSectionIndex","filteredSprites","g","lookDistance","surroundingSections","fs","ss","path","spriteIdentifier","missingRowOrder","textSiblings","sibling","textContent","isSelected","isMarked","knownSection","knownRow","strokeWidth","slice","borderWarning","clickFunc","filteredSpritesByTicketClass","onAddingEventListeners","onRemoveEventListeners","selectedIds","updatedSections","has","uniqBy","deregisterPanEvents","zoomIn","zoomOut","flexGrow","domParser","DOMParser","VenueMap","isGeneralAdmissionOnly","svgMapUrl","mapQuery","parseFromString","isNewMap","XMLSerializer","serializeToString","DealUndercutIcon","ParentListingModeIcon","QualityScoreModeIcon","RowExtrapolationUndercutIcon","SameEventModeIcon","SameSectionModeIcon","SameZoneModeIcon","SimpleUndercutIcon","UndercutPriceSettingsMode","UNDERCUT_PRICE_MODE_OPTIONS","PRICE_FLOOR_CEILING_MODE_OPTIONS","OutlierModeKthLowestStrategy","Relative","Absolute","OUTLIER_MODE_KTH_LOWEST_STRATEGY","display","validateCompListingSettings","clearErrors","setError","setValue","listForm","compListingFloorCeilingError","requiredMsg","errorField","isStrategy","hasErrors","compListingMode","compListingFloor","compListingCeiling","compListingOnlyForSelectedSectionsEnabled","compListingSelectedSectionSettings","autoPricingEnabled","skipCompListing","shouldFocus","DEFAULT_COMP_LISTING_FLOOR","sectionIdFilter","validateUndercutSettings","undercutMode","undercutAbsoluteAmount","undercutRelativeAmount","skipUndercut","DEFAULT_UNDERCUT_ABSOLUTE_AMT","DEFAULT_UNDERCUT_RELATIVE_AMT","validateNetProceedsSettings","floorMustBeLessThanCeilingError","netProceedsCeiling","validateAutoPricingSettings","getUndercutPriceSettingMode","getUndercutPriceRepresentingMode","absValue","DEFAULT_COMP_LISTING_CEIL_MORE_THAN_FLOOR","SLIDER_MIN","SLIDER_MAX","convertSliderValueToServer","convertSliderValueFromServer","getCompListingModeIcon","getUndercutModeIcon","getSectionInfoDisplay","hoveredSection","compListings","filteredCompListings","sellerAllInPrice","amt","l1","l2","sellerNetProceeds","disp","medianIndex","median1","median2","avgMedian","dec","quantityFiltersFromJson","quantitiesFilterJson","quantitiesFilter","exactQuantities","exact","greaterThanOrEqualToQuantity","gte","EVENT_TYPE_PARKING","getEventPerformerVenue","viagVirtId","catalog","performer","venue","lookupEventInCatalog","getPerformerAndVenueForEvent","perfId","performers","venues","venueId","getIsInternationalEvent","countryCode","countryList","getLabel","toUpperCase","getFormattedEventName","slimMode","useShortName","shortName","boldText","dimText","normalText","vsText","atText","cat","genre","lowerCasedEventName","lowerCasedPerformer","descr","indexOfVs","team1","team2","team1Text","team2Text","homeTeam","awayTeam","getEventDisplayText","eventNameConnector","eventSubName","eventDisplayName","performerIds","venueIds","eventTimeFrameFilter","filteredData","startDateObj","setHours","getHours","endDateObj","searchTerms","formattedVenuesNames","formattedEventName","formattedVenueName","term","sortEvents","sortBy","ap","aText","bText","sortEventsByDate","aStart","bStart","sortEventsByName","transformData","isExpandedDataLoading","filterZeroCounts","setExpandedEventData","viagVirtualId","eventData","getDataFail","failedToRetrieveData","posEvIds","realId","viagIdToLatestIdLookup","posIdToViagIdLookup","compareEventsByDateStr","e1","e2","colId","d1","getValue","d2","compareEventsByDate","compareEventsByName","data1","data2","name1","name2","compareEventsByVenue","venueName1","venueName2","compareEventsByLocation","locationName1","locationName2","getInHandDateBasedOnEvent","daysBeforeEvent","eventStartDate","threeDaysAgo","setDate","eventForm","eventAutoPricing","compareMarketplace","useCustomTimeZoneSettings","hasTimeZoneFeature","shouldQuery","mutation","useMutation","mutationFn","onMutate","cancelQueries","prevValue","getQueryData","onSettled","customTimeZoneSettings","mutateAsync","SiteTimezoneContextDefaults","timezoneOffsetMins","getTimezoneOffset","fromZonedTime","SiteTimezoneContext","SiteTimezoneContextProvider","toZonedTimeWrapper","fromZonedTimeWrapper","useSiteTimezoneContext","AdminHoldIcon","AdminHoldBadge","showDetailOnHover","holdTxt","padding","PosDropdown","rootProps","triggerProps","cloneElement","PosDropdownItem","keepOpenAfterSelection","closeRef","click","Popover.Close","createActivePosEntityContext","once","useActivePosEntityContext","ActivePosEntityProvider","getActivePosEntity","onSetActiveItemCompleteCallback","errorInfo","setErrorInfo","setIsLoading","ActivePosEntityContext","posEntityInfo","setPosEntityInfo","updateItemInEvent","useCatalogDataContext","getAndUpdateCatalogDataForEntity","posEvId","client","updateActivePosEntityInfo","posEntity","posEntityId","setActivePosEntity","posEntityDisplayId","forceRefresh","dataToGet","resetData","isSameEntity","errorHeader","errorMessage","useGetEventMapConfig","venueMapQuery","useGetEventMapConfigOverrides","seatScoreOverridesQuery","shouldQuery2","sellerAccountScoreOverridesQuery","useGetEventMapsByScoreModelConfig","venueMapsByScoreModelQuery","useGetEventAutoPricingSettings","getIsAllListingEnabledForAutoPricing","hasAutoPricingFeature","viagId","pricingSettingsQuery","retry","retryDelay","attemptIndex","allListingEnabledPricingQuery","posIds","pricingSettings","allListingEnabledPricing","EventMappingStateFilter","DefaultEventGroupingQuery","groupingType","VIEW_MODE_SETTING_ID_TO_DEFAULT","EmptyEntityWithTicketsQuery","entityIds","eventOrMappingIds","oldPosEventIds","marketplaceEntityIds","countryCodes","stateProvinceIds","cityIds","purchaseOrderIds","listingIds","purchaseVendorId","vendorAccessControlProviderId","purchaseVendorOrderId","purchaseVendorAccountIds","purchaseBuyerId","inHandDates","eventDates","eventNotReviewedSinceDate","sectionContains","sectionEquals","rowContains","rowEquals","sectionNotContains","rowNotContains","eventTagName","eventTagValue","topLevelCategories","parentCategories","numberOfTicketsHeld","lastSaleDates","noSaleDates","isSeatSaver","purchaseDates","purchaseOrderCreatedBy","purchaseCommissionUserId","internalNotes","internalNotesContains","internalNotesEquals","internalNotesNotContains","eventStatuses","currencyCodes","isMapped","isMappingRejected","EmptySaleQuery","saleStatus","saleStatuses","paymentState","marketplacePaymentState","saleDates","ticketType","soldOnMarketplace","fulfillerSellerUserId","paymentDates","fulfillmentDates","cancellationDates","fulfillmentStates","listingInsertBy","viewMode","DefaultSaleQuery","EmptyListingQuery","pricerSellerUserId","isPredelivered","isListed","deliveryType","hasUnsoldTickets","eventHasUnsoldTickets","hasBroadcastError","isAutoPricingEnabled","isPricedAboveZero","eventUnpricedStatus","autoPricingResultTypes","isSeatingUnmapped","isAdminHold","isDuplicate","lastPriceUpdateDates","lastPriceNoUpdateDates","isPricedByMarketplace","isPendingProof","purchaseCancellationDates","purchaseCancelledOnly","DefaultListingQuery","EmptyOnSaleEventQuery","onSaleDates","DefaultOnSaleEventQuery","EmptyPurchaseQuery","ticketGroupIds","purchaseMonths","paymentMethod","paymentStatus","totalCostHigh","totalCostLow","purchaseOrderState","paymentMethodId","paymentCurrencyCodes","isConsignment","DefaultPurchaseQuery","EmptyCommissionQuery","isCommissionEligible","commissionEligibilityDates","DefaultCommissionQuery","EmptyReportEntityWithTicketsQuery","EmptyReportV2SaleQuery","DefaultReportV2SaleQuery","EmptyReportV2ListingQuery","DefaultReportV2ListingQuery","EventUiSort","DateDesc","DateAsc","getEventUiSort","getEventSort","sort","getAppliedFilterCounts","currentFilter","initialFilter","ignoreKeys","initKeys","keys","initValue","curValue","isFilterApplied","currentValue","initialValue","getAppliedFilters","currentFilterQuery","initialFilterQuery","ignoreFilterIds","filtersGroups","initialKeys","filtersMap","filterGroup","filterItem","filterId","appliedFilters","filterQueryKeys","fId","MainFilterQueryParam","removeEntityIdsIfHasSearchId","copy","entityQuery","deleteDefaultFields","baseQuery","queryValueTransformToUrl","baseEntry","queryValueTransformFromUrlBase","mapToBaseQuery","queryValueTransformFromUrl","queryValue","getQueryFromUrl","urlSearchString","filterQueryParam","URLSearchParams","getUrlFilterQueryParam","baseSearchParams","searchParams","isFilterQueryParamEmpty","mainFilters","removeFilters","urlSearchParams","filtersKeyToRemove","searchFilterParams","mainFilter","filters","filterKey","getLastNDaysSaleQuery","today","lastNDays","getPurchaseOrderIdSaleQuery","getPurchaseOrderIdListingQuery","YesNoEnum","LastReviewedSinceDate","LastThreeDays","LastTwoWeeks","LastThirtyDays","TextFilterEnum","ToEventMappingStateFilter","FromEventMappingStateFilter","eventMappingStateFilter","ToYesNoEnum","FromYesNoEnum","yesNoEnumValue","isFilterUnchanged","emptyQuery","rest1","x1","x2","x3","x4","x5","x6","x7","x8","rest2","createFilterQueryContext","useFilterQueryContext","FilterQueryContextProvider","initialQuery","saveQueryInUrl","loadQueryFromUrl","viewModeSettingId","FilterQueryContext","useLocation","setSearchParams","useSearchParams","isQueryInitialized","setIsQueryInitialized","readQueryFromUrl","setReadQueryFromUrl","queryFromUrl","setQueryFromUrl","filterQuery","setFilterQuery","tempQuery","setTempQuery","handleFilterChange","constState","refConstState","tempQueryFromUrl","searchQuery","queryParamsToSet","delete","defaultViewModeUserSetting","isViewModeSettingLoading","timezoneOffsetMinsAccount","resetTempQuery","queryKeys","newTempQuery","SuggestionsContainer","SuggestionsHeading","SuggestionContainer","Suggestion","selectedDateRange","useSiteTimeZone","hideSuggestionTitle","handleClick","dateRange","presets","presetName","DateRangeTriggerContent","DateRangeTrigger","backgroundPrimaryActive","IconContainer","CustomDateRangeButton","DateErrorContainer","ul","DateRangePickerContainer","DateRangeSelector","startDatePlaceholder","endDatePlaceholder","dateDisplayFormat","retainEndDateOnFirstSelection","rangeColors","onChange","onBlur","useRelativePresets","onPreviewChange","isEndDateFixed","displayTextStyle","presetProps","currentLocale","showDatePicker","setShowDatePicker","setIsOpen","dateValue","setDateValue","code","dateErrors","setDateErrors","defaultDateRangeDisplayText","defaultFromlabel","defaultToLabel","dateErrorConfig","getFormattedDate","time","onDateRangePickerChange","newValue","onClear","onSuggestionClick","onSuggestionRelativeClick","getDisplayText","suggestionText","suggestionTextRelative","startZoned","endZoned","highlightDropBox","paddingTop","ReactDateRange","rangeSelectorEndDate","PosEnumSelect","valueOptionsContent","bind","o","PosTextField","onKeyUp","trimOnBlur","prefixDisplay","postfixDisplay","customOnBlur","TextField.Root","TextField.Input","getTextFieldState","SelectInputSearch","searchPlaceholder","onSearchTextApplied","searchInput","allowSearchAsInput","refInput","focus","currentTarget","SpinnerWrapper","centered","SpinnerContainer","SpinnerSVG","circleAnimation","keyframes","circleWrapperAnimation","SpinnerCircleWrapper","SpinnerCircleSVG","PosSpinner","counter","setCounter","currentShape","shapes","spinnerLogos","SpinnerLogos","DEFER_BUILD_INDEX_ITEMS_THRESHOLD","REVERSE_TOKENIZE_ITEM_THRESHOLD","FULL_TOKENIZE_ITEM_THRESHOLD","buildFlexSearchIndex","itemCount","Flexsearch","Index","tokenize","useFlexSearchIndex","flexSearchIndex","setFlexSearchIndex","debouncedBuildSearchIndex","EMPTY_CONTENT_DESIGNATOR","PosSelect","placeholderText","displayText","enableEmptySelection","contentProps","triggerContentClassName","useVirtualWindow","expectedItemSizeForVirtualWindow","valueOptionsAlwaysShow","valueOptionsDisabled","valueOptionsIcon","valueOptionsContentOverride","showClearButton","loading","sortMode","sortFn","searchable","fetchNextPage","hasNextPage","isFetchingNextPage","onSearchInputChange","showFullWidth","displayComponent","inputSearchRefKey","nanoid","scrollerRef","setSearchText","defaultOpen","isBuildingSearchIndex","onOpenChange","placeholderTextContent","displayTextContent","handleScrollerRef","existingValue","keysOfValueOptionsAlwaysShow","keysOfValueOptionsContent","useVirtuoso","selectItems","keysToRender","search","selectItemKeys","keyA","keyB","textA","textB","sortResult","numberA","parseFloat","numberB","isNaN","renderItem","HTMLElement","FilteredSelectItem","disabledReason","optionContent","targetText","disabledReasonText","StackedFilter","FilterComponents","isHorizontalLayout","FilterComponent","connector","marginLeft","PriceUpdatedFilterEnum","PriceUpdatedDate","PriceNotUpdatedDate","PriceUpdatedDateStackedFilter","setMode","setDateFilter","newQuery","PRICE_UPDATED_DATE_FILTER_TO_CID","d","maxWidth","SaleDateFilterEnum","HasSaleDate","NoSaleDate","SaleDateStackedFilter","SALES_DATE_FILTER_TO_CID","NOT_FOUND_INDEX","NO_ROW_SELECTED_INDEX","defaultShiftSelection","lastRow","rowIndex","groupIndex","tableRows","shiftRow","isCleanState","shiftKeySelection","useShiftKeySelection","allGroupsIds","shiftKeySelectionRef","selectionMode","setGroupItems","getGroupToggleState","toggleGroup","isShiftKeyPressed","setShiftKeySelection","clearShiftKeySelection","perPropsRef","refPerfProps","setShiftKeyRowSelectionState","groupId","gId","setShiftKeyGroupSelectionState","minIndex","maxIndex","isTopToBottomUserSelection","isSameGroupSelection","currentRowIndexSelection","activeGroupId","shouldSelectAllGroup","groupState","isGroupSelected","fromIndex","toIndex","groupStateInput","isNoGroupIdSet","NO_GROUP_ID","MultiSelectScope","AllGroups","SingleGroup","SingleItem","defaultValues","setSelectionMode","isAllSelected","setAllGroupsIds","getSelection","groupIds","isSingleGroupMultiSelect","getItemToggleState","getGroupSelectableGroupMetadata","setGroupStates","toggleSelectAll","totalItemsSelected","itemSelection","setSelectedCountLabel","selectedCountLabel","usingCustomSelectedCountLabel","setUsingCustomSelectedCountLabel","updateGroupFilteredIds","isHiddenCheckboxesFeatureEnabled","shouldHideCheckboxes","MultiSelectionContext","defaultMultiSelection","useMultiSelectionContext","MultiSelectionContextProvider","initialSelectionMode","forceSelectionMode","isFlattenedView","setShouldHideCheckboxes","setMultiSelection","flattenedIds","groupsArray","useCatalogMultiSelectionContext","group","consolidatedSelectionMode","totalItemsSelectedCount","totalItemsCount","itemCountsResult","selectionCount","totalCount","groupItemCount","selection","selectedCount","toggleGroupInternal","strGroupId","prevItem","newIsGroupSelected","filteredIds","toggledItems","acc","toggledWOGroupsCount","groupData","comboId","totalItemCount","relatedGroups","groups","newSelections","onSetSelectionMode","packNumericIds","unpackNumericIds","Number","PURCHASE_SINGLE_TIME_PERIOD_QUERY_KEY","PURCHASE_TIME_PERIOD_CONTAINER_QUERY_KEY","useGetAllPurchasesQuery","viewModeOverride","ignoreMaxCount","doNotQueryForPurchases","allEventIds","totalPurchaseCount","moddedFilterQuery","filterPurchaseOrders","purchaseOrders","po","poState","allPurchasesQuery","filterQueryWithEventIds","performerId","refetchInterval","allPurchasesFiltered","useGetTimePeriodPurchasesQuery","setSelectedIds","getDateValue","firstOfTimePeriod","firstOfMonth","purchasesQuery","sortedData","dateA","dateB","differenceInCalendarDays","newSelectedIds","firstItem","mappedData","PurchaseDataContext","timePeriodPurchasesQuery","purchaseCount","refreshData","onSelect","onSetActivePurchaseOrderCallback","setScrollToId","purchaseGroupTimePeriod","setPurchaseGroupTimePeriod","usePurchaseDataContext","PurchaseDataContextProvider","activeViewMode","scrollToId","targetId","forceSelect","poDate","targetTimePeriodIds","refetchQuery","refetch","targetTimePeriodId","refetchAll","failureReason","emptyContext","unfilteredFlattenedIds","CatalogMultiSelectionContext","transformGroupsArray","isPurchaseFlattenedView","monthData","unfilteredItemCount","CatalogMultiSelectionContextProvider","eventsTransformed","inputArray","inputObject","fromPairs","setFlattenedIDs","setUnfilteredFlattenedIDs","setGroupsArray","allItems","all","flattened","getFlattenedListingIds","tgId","newGroupsArray","useFilterQueryState","groupIdSuperSet","useTicketGroupIds","selectionState","isFlattenedViewWithNoGroupId","allEventMappingIds","filteredGroupIds","unpackedPurchaseIds","unpackedTicketGroupIds","packedId","unpackedIds","normalizedGroupIdsByMergedEvents","selectedViagogoVirtualIds","newIntId","newBigIntId","newGuidId","crypto","randomUUID","getRandomCentroids","dataset","sampleSize","vector","squaredEuclideanDistance","kmeans","maxIterations","initializeCentroids","prevCentroids","centroids","clusters","iterations","clusterVectors","updateCentroids","converged","centroid","vectors","vectorWithData","closestCentroidIndex","closestCentroid","prevDistance","distance","cluster","getMeanVector","meanVector","ListingGroupingTypesWithClusteringOptions","ListingGroupingTypesNotSupportingAdditionalGroupBys","getGroupByData","listingToGroupKey","prevKey","prevKeyPrefix","prevNamePrefix","nameContent","getNameContent","tc","availQty","unitCst","faceValue","getClusteringData","rowIdToRowOrdinalMap","flattenListingGroup","filterAndflattenListingGroup","groupFilter","getListingsForMergeListingGroupInput","viagogoMappingId","generateMergeListingGroupInputsForEvents","namePrefix","listingMarketplaceSettings","listingGroupItems","mappingId","desiredActiveListings","minActiveListings","maxActiveListings","targetPercentage","deprioritizedQuantities","marketplaceSettings","groupUndercutSetting","undAbsAmt","undRelAmt","actRankUndAbsAmt","actRankUndRelAmt","getAvailableGroupingTypes","prevGroupingTypes","listingGroupTypes","LISTING_GROUPING_TO_CID","getListingGroupsMap","groupBys","listingsForGrouping","canClusterByRows","listingGroupState","nonKmeansGrouping","groupBy","kmeansGrouping","numOfClusters","resultMap","sameSizeGrouping","numberOfBuckets","listingsPerBucket","ceil","bucketCounter","listingsInGroupCount","listingsInBucket","bucketOption","quantityMatches","quantity","desiredQuantities","temp","getQuantitiesOptions","q","sortGroupType","order","useInventoryEventBulkActionsState","affectedVisibleListingIds","isAllListingsSelected","StyledModal","Modal","CloseButton","RSModalHeader","RSModalBody","ModalBodyHeaderContainer","ModalBodyDataContainer","RSModalFooter","onClose","StyledModalHeader","Header","Body","Footer","clickOutsideToClose","backdrop","hasChildren","Children","commonModalProps","toggle","fullscreen","asJsxElement","Element","QUERIES_TO_KEEP_FOR_DEEPLINK","getDeepLinkIdFromUrl","queryParamName","queryParam","addDeepLinkUrlPart","deepLinkKey","deepLinkValue","navigate","origin","history","pushState","getUrlWithDeepLink","queriesToKeep","useRemoveDeepLinkUrlPart","useNavigate","hash","pathname","removeDeepLinkUrlPartsFromRelativeUrl","relativeUrl","deepLinkKeys","protocol","host","getPathFromMainRoute","AppRouteConfigs","view","getFullUrl","getCurrentViewPath","MenuItems","navigateToMainRoute","mainRouteAccess","startsWith","isInFullPageEventView","ModalContext","isModalOpen","setModal","updateModal","closeModal","ModalProvider","modalProps","setModalProps","removeDeepLinkUrlPart","handleCloseModal","forceClose","onCloseOverride","modal","trackViewEntityType","partial","onExit","DialogId","AutoPricingStrategy","BulkEditListingSettings","BulkUpdateAutoFulfill","BulkEditTags","BulkChangeFloorCeilingActions","BulkAddListingAdminHold","BulkEditMarketplacePrices","BulkEditListingPrice","BulkDeleteSeatSeavers","BulkEditSeatTraits","BulkEditBroadcastSettings","BulkRemoveHold","BulkChangeTicketTypeRule","BulkMarkAsFulfilled","BulkEditPurchaseSettings","BulkEditCommission","BulkChangeEvent","BulkEditMarketplaceSeating","BulkEditDeliveryType","BulkEditSalesSettings","BulkCancelPurchase","BulkRemovePredilivery","BulkUngroupListings","BulkBackfillDeliverySettings","BulkConvertPurchasePayments","BulkUpdateListingGroupSettings","BulkEditAutoPricingSettings","BulkUpdatePurchaseCurrencyCode","AddMarketplacePaymentLineToSale","BulkMarkSaleAsPaid","DialogContext","openDialog","useDialogContext","DialogProvider","dialogs","setDialogs","prevDialogs","dialog","useDialog","dialogId","DialogComponent","useUserHasAnyOfPermissions","getFormattedLocation","city","stateProvince","country","getFormattedBytesSize","numBytes","addSpace","UNITS","exponent","log10","toPrecision","decodeBase64","base64String","byteCharacters","atob","byteNumbers","byteArray","Uint8Array","usePurchaseVendorSelector","additionalOptionsPosition","availableVendors","dataSorted","availableVendorsOptions","posSelectProps","addOptionTexts","useTicketTypes","mappingsQuery","ticketTypes","mapping","CustomDeliveryIcon","randomizeInPlace","j","random","moveElements","array","splice","calculatePercentile","percentile","rank","lowerIndex","upperIndex","fraction","lowerValue","upperValue","percentileValue","getTicketTypeIcon","showIconTitle","getTicketTypeIcons","isPriorityBlocked","isBlocked","priority","getTicketTypeLabel","TICKET_TYPE_TO_CID","getDefaultTicketType","getDeliveryTypeIcon","topPriTicketType","sortPriorityOrders","backfillTicketTypePriorityOrders","ticketTypePriorities","tt","BLOCKED_PRIORITY","shiftTicketTypePriority","priorityOrderBefore","getTicketTypePriorityOptions","len","toSyncCenterFieldValues","ticketTypeRules","fieldValues","ticketTypePriorityOrders","ticketTypePriorityOrderMap","priorityOrder","blocked","priceFloor","markup","sellerFee","toSyncCenterSettings","settingsTicketTypeRules","setValueAsNumber","setValueAsDecimalNumber","TicketTypePriorityInput","onTicketTypeRulesChange","onOnlyThisChange","ticketTypePriorityOrdersNew","overrides","onResetAll","defaultTicketTypePriorityOrders","overridesForDeliveryType","onPriorityChange","priorityOrderAfter","ii","ticketTypesOrderedByPriority","numBlockedTicketTypes","isEmptyTicketTypesOverridesFromResponse","ticketTypePriorityOverrides","orderedTicketTypePriority","missingTicketTypePriority","uiTicketPriority","PURCHASE_BULK_UPDATE_GENERAL_SETTINGS_UPDATE_KEY","PURCHASE_BULK_UPDATE_COMMISSION_UPDATE_KEY","PURCHASE_BULK_UPDATE_TAGS_UPDATE_KEY","PURCHASE_BULK_UPDATE_INTERNAL_NOTES_UPDATE_KEY","PURCHASE_BULK_UPLOAD_PURCHASE_KEY","PURCHASE_BULK_CANCEL_UPDATE_KEY","PURCHASE_BULK_UPDATE_DELIVERY_TYPE_UPDATE_KEY","PURCHASE_BULK_UPDATE_SEAT_TRAITS_UPDATE_KEY","TICKET_GROUP_BULK_DELETE_UPDATE_KEY","PURCHASE_BULK_BACKFILL_DELIVERY_SETTINGS_KEY","PURCHASE_BULK_CONVERT_PAYMENTS_KEY","PURCHASE_BULK_MARK_AS_PAID_KEY","PURCHASE_BULK_UPDATE_PURCHASE_CURRENCY_CODE_KEY","DownloadButton","DnDFileUploaderLabel","SVGWrapper","SelectedFileWrapper","FileName","IconWrapper","SelectedFile","onRemove","preventDefaults","DnDFileUploader","multiple","acceptedFileTypes","maxFileSize","showSelectedFiles","useLabelV2Styles","onNewFilesSelected","setExternalContext","highlightDropBoxOnDragging","inputRef","errorMsg","setErrorMsg","isDragging","setIsDragging","files","setFiles","acceptProp","accept","callbacksRef","maxFileSizeErrorMsg","toFixed","onBtnClick","handleDrag","updateSelectedFiles","newFiles","prevFiles","handleDrop","dataTransfer","handleChange","onRemoveFile","selectFiles","dragging","textError","parseBulkEditMethodName","methodName","bulkActionType","useBulkEditHub","bulkEditAction","onBulkEditDone","bulkEditHub","progress","warnings","mainDialogOpened","stage","setStage","setPreview","setCurJob","setProgress","setErrors","setWarnings","setMainDialogOpened","retryableEntities","progressBeforeRetry","clearRetryStates","useBulkEditHubContext","initJob","BulkEditStage","Idle","action","downloadFile","isBase64","Blob","downloadFileFromBlob","downloadFileFromUrl","download","revokeObjectURL","createObjectURL","getFileHash","md5","arrayBuffer","BulkEditHeader","GettingPreview","RequestEventDetailsView","isRequestingEventDetails","setIsRequestingEventDetails","onAnswer","hasEventId","BulkUploadPurchaseDialog","uploadedFile","setUploadeFile","eventsExpansion","refreshCatalog","onBulkEditProgressDone","refetchQueries","ListingCatalogQueryKey","ListingCatalogMetricsQueryKey","onCancelDialog","setIsRefreshing","newProgress","closeMainDialogForPopover","doneProgress","finalErrors","hasBackgroundBulkEditFeature","HubConnectionState","Connected","hasBulkDownloadEventPromptFeature","isRefreshing","onUploadPurchaseFile","onDownloadTemplateClick","onDownloadTemplateClickNoPrompt","failureCount","bulkEditInProgress","LaunchBulkUploadPurchaseDialog","bulkUploadPurchaseDialog","onBulkUploadPurchase","PurchaseGlobalActionDropdown","showBulkUpload","actionsMsg","hasPurchaseUpdatePermission","getDeliveryTypeIcons","DeliveryTypeSelector","allowCustomDeliveryType","hasCustomDeliveryTypeFeature","canSetCustomDeliveryType","moderatedOptionsContent","DELIVERY_OPTIONS_TO_CID","SEARCHABLE_OPTIONS_THRESHOLD","usePurchasePaymentMethodSelector","paymentMethodOptions","paymentMethods","PurchasePaymentMethodSelector","SellerAccountContext","allUserInfos","allActiveUserInfos","getUserInfo","refetchUserInfos","useSellerAccountContext","SELLER_ACCOUNT_SELLER_USERS_QUERY_KEY","SellerAccountContextProvider","deactivatedText","hasDisplayDeactivatedUser","getQuery","resultsMap","isDeactivated","USE_VIRTUOSO_MIN_OPTIONS_COUNT","ToggleAllKeys","isToggleAllValue","PosMultiSelectOptions","contentHeight","selectedOptions","emptySelectionText","useVirtualWindowProp","showSelectedOptionsFirst","showSelectAllOption","includeSelectedInSearch","valueOptionsKeys","hasOptions","toggleKey","topOptions","limit","maxHeight","FilteredOptionItem","optionKey","optionValue","filterText","contentWrapper","FilteredContent","MIN_ITEMS_COUNT_TO_HIDE_SELECT_ALL","PosMultiSelect","leftIcon","closeAfterToggleAll","fullWidth","showSelectAllOptionProp","onSearchTextChange","valuesDisplayText","childrenAsTrigger","pluralDisplayFormatContentId","valueDisplay","singleValueContentDisplay","valueContentDisplay","mergeSelectedValue","isToggleAll","allValuesKeys","areValuesSelected","searchBox","SellerAccountEmployeeMultiSelector","unchanged","allActiveUserOptions","allowUnchanged","showEmail","useGetFulfillmentProviderSettings","fulfillmentProviderSettingsQuery","fulfillmentProviderSettings","FulfillmentProviderCard","logo","description","isSwitchChecked","setIsSwitchChecked","isChecked","originalState","TradedeskTransferLogo","TdcTransferLogo","TaciyonLogo","StubhubFulfillmentLogo","MapFulfillmentProviderToIcon","providerName","toLowerCase","providers","provider","fulfillmentProviderName","descriptionMessage","SellerAccountEmployeeSelector","isFulfillmentSection","allActiveValueOptionIcons","sellerUserId","sellerIdA","sellerIdB","isFulfillmentA","isFulfillmentB","aDisplayName","bDisplayName","getRenderedMessage","checked","indeterminate","labelPosition","small","PosFormField","showErrorsInline","doNotShowErrorDetails","errorsDiv","er","warningsDiv","formFieldContainer","EventDateDisplay","eventDateString","eventEndDateString","showEventDateTbd","eventDateFormat","eventSubDateFormat","numDays","PosLink","onEventNameClick","toProps","FailureMessage","SuccessMessage","WarningMessage","messageStyle","BlinkingWrapper","CircleWrapperAnimation","RotatingWrapper","WorkingMessage","EventMappingStateDisplay","eventMappingState","mappingRejectionReasonId","mappingRejectionReasonDescriptionDefault","requestStateText","EVENT_MAPPING_STATE_FILTER_TO_CID","eventMappingRejectionReason","MAPPING_REJECTION_REASON_ID_TO_CID","EventNameDisplay","showTitle","boldSubName","useBigStyle","VenueNameDisplay","venueName","venueLocation","EventInfo","showMappingState","showYear","eventNameOnly","showParkingPassIcon","eventGenre","eventNameLink","canLinkEventName","keepReturnUrlUnchanged","ConnectedEventInfo","eventInfoProps","eventNameNode","eventType","METRICS_PLACEHOLDER_DIMS","EventItemHeader","actions","headerMetrics","metrics","mapRejRsnId","afterContent","mapRejDftTxt","ListingMainMetrics","ticketsCount","ListingSubMetrics","totalUnsoldListPrice","totalNetProceeds","totalGrossMargin","MainMetrics","BulletPoint","addBulletPoint","MetricsDisplay","mainMetrics","subMetrics","subMetricBelow","ContentPlaceholder","isCircle","SUB_HEIGHT","MetricsDisplayPlaceholder","MetricsPlaceholderWrapper","GLYPH_WIDTHS","DEFAULT_GLYPH_WIDTH","MAX_TEXT_WIDTH","calcEstimatedFontScale","maxTextWidth","textWidth","letterSpacingOffset","MIN_VALUE","MAX_VALUE","CircleProgressBar","barWidth","radius","circumference","PI","relativePercent","sign","foregroundColor","borderError","backgroundBrandHoverLight","assignInlineVars","calc","multiply","Title","isCompact","Metric","showLoadingPlaceholders","FractionMetricText","numerator","shared","OriginalCircleProgressBar","PercentChangeMetricText","formattedCurrentValue","previousValue","percentageChangeValue","percentageNumberFormatter","absPercentageChange","PercentageChangeArrowIcon","ListingMainMetricsV2","unsoldTicketsCount","unsoldTicketsCountText","ListingSubMetricsV2","totalPandL","totalUnsoldCost","totalUnlistedQuantity","totalUnsoldCostText","pandLText","totalUnlistedQuantityText","UnlistedTicketsIcon","getMetricsDisplay","getInventorySummaryListingMetricsDisplayStrings","soldQty","totalSoldQuantity","tktQty","totalTicketQuantity","ttlListPrc","totalListPrice","netProcs","pandL","totalGrossProfit","quantityNumberFormat","notation","curCode","currencyNumberFormat","totalSoldPercentage","averageSalePrice","formattedTotalSoldQuantity","formattedTotalTicketQuantity","formattedTotalSoldPercentage","formattedTotalListPrice","formattedTotalNetProceeds","formattedTotalGrossMargin","formattedAverageSalePrice","getInventoryListingMetricsDisplayStrings","unsoldQty","totalUnsoldQuantity","listQty","totalListedQuantity","unlistQty","ttlCst","totalCost","unsoldCst","ttlUnsoldListPrc","getFractionDigits","BIG_NUMBER_THRESHOLD","getQuantityNumberFormat","getCurrencyNumberFormat","totalCostAmount","totalUnsoldCostAmount","totalUnsoldListPriceAmount","totalNetProceedsAmount","totalGrossProfitAmount","formattedTotalUnsoldQuantity","formattedTotalListedQuantity","formattedTotalUnlistedQuantity","formattedTotalCost","formattedTotalUnsoldCost","formattedTotalUnsoldListPrice","formattedTotalGrossProfit","getInventoryListingMetricsV2","displayTotalUnsoldCost","isLoss","isProfit","displayTotalGrossProfit","addMoneySameCurrency","removeDecimals","keepDecimalsForValuesLessThanOne","skipDisplay","dispFormat","addListingMetrics","metricA","metricB","addListingMoney","soldCst","addSaleMetrics","qtySold","saleUnfilled","marg","addTicketGroupMetrics","getInventoryListingMetrics","getSalesSaleMetrics","firstBulletPoint","secondBulletPoint","SaleMainMetrics","hasTotalNetProceedsPermissions","SaleHeaderMetrics","needFulfillment","SaleSubMetrics","margin","ticketsFulfilled","ticketsSold","hasCostMarginPermission","PurchaseEventItemHeader","numOfTicketGroups","numOfTickets","onAddTicketsForEvent","cost","removeMetrics","purchaseEventUrl","createPurchaseEventPageUrl","useTagsForEntityType","mainQueryKey","tagByEntityTypeQuery","tagWithValueByEntityTypeQuery","isTag","deleteMutation","tagsWithNoValue","t2","tagsMetadata","tagsMetadataNumeric","valueType","isError","mergeEntityTagsMetadata","tagsToUpdate","tagsToDelete","DivWithTitle","showTooltip","contentUnwrapped","whiteSpace","minWidth","mappedAligned","useUserGroups","userGroupClient","hasTeamManagementFeature","userGroupQuery","updateMutation","userGroupInput","createMutation","createUserGroup","userGroups","TagValueDisplay","tag","displayMode","DateDisplay","POSUserDisplay","UserGroupDisplay","userGroup","ug","VendorDisplay","UrlDisplay","absoluteUrl","PurchaseVendorSelector","UserGroupMultiSelector","userGroupsContentSelect","UserGroupSelector","DatePickerInput","fieldError","onDateChange","textFieldStyles","minDate","maxDate","newDate","Calendar","TIME_PICKER_CALLBACK_FORMAT","TimePickerInput","timeDisplayFormat","onTimeChange","newTime","tagFieldHasChanges","tags1","tags2","_tags1","tm","_tags2","t1","tagHasChanges","ToMarketplaceEnum","entry","TOTAL_VALUE_LENGTH_LIMIT","TagValueInput","isValidNewValue","setNewValue","disableBlur","inputFieldPosfix","tagTypeText","TAG_VALUE_TYPE_TO_CID","customOnBlurSelect","customOnBlurInput","tagValueDate","setTagValueDate","setFullYear","setMonth","setMinutes","getMinutes","backgroundBrand","borderColor","MARKET_PLACE_TO_CID","newId","BOOLEAN_OPTIONS_CONTENT","URL_REGEX_TAGS","checkMatchValueType","isInteger","TagValueInputCell","tagsCurrentEntity","setDisableBlur","duplicateMsg","valueTypeErrorMsg","hasDuplicate","existingTags","TagListItem","isEditing","onRowChange","singleValueMsg","dataTypeMsg","hovered","setHovered","metadataTitle","singleValueOnly","TagsPanelDisplayMode","tagsWithEmptyValue","tagsWithValue","onTagsUpdate","onTagValueChange","tagsEditing","setTagsEditing","onTagAdd","newTags","flexDirection","tagListItem","findLast","newTag","DropWrapper","onDragStart","onDragEnd","attributes","listeners","setNodeRef","transform","transition","useSortable","CSS","Translate","opacity","zIndex","EventIcon","ListingTableColumnId","TicketClassColor","AllInPrice","UndercutNewPrice","CompListingMinimumQuantity","CompListingExcludeFanInventory","CircuitBreakerMinCompListingCount","CircuitBreakerVelocity","CircuitBreakerVelocityHours","SeatingSeats","PurchaseCreatedBy","ListingTableFlattenedColumnId","ListingReportTableColumnId","EventStateProvince","SalePaymentState","PaymentMethodType","InternalNotes","InternalNotesPurchase","VendorOrderId","VendorAccountEmail","CancellationDatePurchase","ListingReportTableGroupingColumnId","PerformerName","TopLevelCategoryName","CountryName","CityName","LocalEventDateTime","IsSeatSaver","IsNoFulfill","PricerSellerUserId","ListingReportTableValueColumnId","UnitNetProceeds","UnitAllInPrice","PurchaseOrderId","PurchaseOrderDate","BuyerUserId","PurchaseOrderVendorName","ListingReportArrayAggregateColumnIds","ReportTypes","ReportTypesV2","InventoryV2","SaleV2","listingMetricsToReportMetricRequest","metric","isReportFilterOverriden","filterQueryToCompare","reportConfigFilterToCompare","addTimezoneOffsetToSaleReportConfig","reportNoOffset","addTimezoneOffsetToListingReportConfig","useReportConfigs","reportType","reportClient","reportConfigQuery","_reportConfigs","upsertMutation","isTemporary","reportId","_data","_error","upsertOverrideMutation","configOverride","originalReportConfig","schemaVersion","hasFilterOverride","hasMetricsOverride","newReportConfig","upsertReportOverride","upsertReportConfig","reportConfigsInternal","reportConfigs","getReportConfigNameForDuplicate","reportName","reportNames","defaultName","configInput","newConfig","castDraft","configToUpdate","initDraft","updatedDraft","produce","draft","ownerDisplayName","widgets","numberOfItemsPerPage","sellerUserIdsToShare","roleIdsToShare","viewableFilterItemIds","editableFilterItemIds","hiddenFilterItemIds","useGetMetricsInUse","listingReports","saleReports","listingColumns","saleColumns","metricsInUse","SPECIAL_CHAR_SET","DEFAULT_MAX_NUM_REPORTING_COLUMN","RESERVED_NAMES","CreateTagMetadataForm","mergedTagsMetadata","onSubmit","watch","handleSubmit","formState","useForm","hasTagTypesUserGroupFeature","specialCharsMsg","notAllowedMsg","maxNumReportingColumn","allowMultipleValues","isSubmitting","setIsSubmitting","validateTagInput","onSubmitHandler","tagTypesOptionsContent","willExceedReportingColumnLimit","newValueType","ConfirmDialog","bodyText","okText","cancelText","EditTagMetadataForm","mergedTagsMetadataWithNoValue","onDeleteSubmit","hasDeleteTagTypePermission","reportMsg","unselectReportConfirmDialog","deleteConfirmDialog","keyOptionsContent","r1","r2","re","isUsingTagWithNoValue","onDeleteSubmitHandler","exceedsReportingColumnLimit","existingTag","TagDraggableListItem","onRowStartEdit","onRowDelete","TagsPanelEditMode","onEditDone","isEditingTagMetadata","setIsEditingTagMetadata","isCreatingTag","setIsCreatingTag","existingTagsCurrentType","existingTagsCurrentTypeWithNoValue","hasCreateTagPermission","onDragEndHandler","active","over","activeIndex","sortable","overIndex","arrayMove","onTagDelete","onTagMetadataUpdate","tagMetadataUpdate","onTagMetadataDelete","existingTagsCurrentTypeWithNoValueMerged","TagsFormBodyV2","canCreateTagType","canEditTags","hasEveryOrdinal","tagsOrdinalFilled","isEditMode","setIsEditMode","onTagsUpdateHandler","tagsDeDup","editTagTypesLabel","LocalizationContext","currencyCache","getUiCurrency","sym","useLocalizationContext","LocalizationContextProvider","availableCurrenciesQuery","TableOverflowWrapper","CurrencyFilterMultiSelector","availableCurrenciesOptions","CurrencyFilterSelector","StyledContainer","StyledInput","Styledlabel","disable","PosCurrencyField","uiCurrency","isInputting","setIsInputting","fixedValue","numericalValue","onChangeHandler","onBlurHandler","fixedNum","FormTable","table","AddPurchasePaymentTable","form","control","resetField","getValues","getFieldState","register","fieldArray","fields","hasEnforcePurchasePaymentCurrencyFeature","field","required","fieldState","validate","fieldVal","valueAsNumber","payments","InputRowAmount","Divider","SwitchContainer","tabletBreakPoint","InputGrid","InputRow","FullWidthSelectionInputContainer","InputRowSide","AddPurchasePaymentTiles","FieldWrapper","GeneratePurchasePaymentsForm","occurrenceText","totalText","paymentAmount","paymentCount","occurrence","uniq","msg","useGeneratePurchasePaymentsForm","defaultCurrencyCode","paymentAmountType","AddPurchasePaymentDialog","onSave","genericDialogProps","isSinglePayment","setIsSinglePayment","getDefaultSinglePaymentStore","isPaid","getDefaultMultiplePaymentsStore","singlePaymentStore","setSinglePaymentStore","multiplePaymentsStore","setMultiplePaymentsStore","paymentsTableForm","paymentsTableFieldArray","useFieldArray","paymentsTableFormOnSubmit","payment","paymentDueDate","paymentId","convertedCurrencyCode","conversionDate","conversionUserId","generatePaymentsForm","generatePaymentsFormOnSubmit","amounts","dividePaymentAmount","reset","keepValues","lastPayment","totalAmount","perOccurrence","BackToModalButton","cancelTo","CancellableFormFooter","showDialogOnCancel","onBeforeClose","goToCancelView","CloseModalButton","Detail","detail","isStrong","isRightAligned","SectionWrapper","SectionContent","numOfColumns","DetailGroup","isDouble","AttrLabel","DetailText","DetailSection","extraContent","fullHeight","getListingNoteIcon","note","showTypeInfo","listingNoteTypeText","LISTING_NOTE_TYPE_TO_CID","listNoteText","listingNoteUntranslated","listingNoteText","iconProps","useListingNotesSelector","validListingNoteIds","hasAdditionalInfoFeature","availableNotes","ln","stubhubListingNoteId","listingNoteId","noteIcons","optionIcons","multiSelectorProps","ScrollableToolbar","PillItem","onPillHover","onPillLeave","onPillClick","onDelete","postfixItem","customPillContainer","useCondensedBorders","PillList","pills","condensed","onPillDeleted","flex","pill","MultiSelectDropBoxWithPills","pillsDirection","pillsFlexWrap","showPills","valueIcon","ListingNoteSelectionInput","listingNotes","hookMultiSelectorProps","listingNotesMap","onSelectionChanged","lnIds","newListingNotes","lnId","sellerAccountId","HorizontalTextList","texts","preIcon","prefix","maxTextsToShow","textCountToShow","maxTextsToShowOnHover","textCountToShowTitle","textToDisplay","titleTextToDisplay","useGetEventListingConstraints","eventListingConstraintsQuery","PosTextArea","TextArea.Root","TextArea.Area","AddInternalNoteModal","onInternalNotesChanged","toggleIsOpen","useToggle","setNote","AddAdminHoldNoteModal","useFormContext","shouldDirty","AddNoteDisplay","showVisibility","ListingNotesSection","allowEditListingNotes","onListingNotesChanged","isAddNoteModalOpen","toggleAddNoteModal","hasListingNotesAdditionalInfoFeature","MultiDetailSection","getConversionRate","numA","numbB","defaultCurrentCode","ConvertCurrencyDialog","currentUserId","fxText","convertedPaymentAmountMustBeGreaterThanZeroMsg","conversionRateMustBeGreaterThanZeroMsg","minValue","setValueAs","convertedAmount","isFinite","shouldValidate","convertedAmountAmount","EditPurchasePaymentDialog","PurchaseCostDialog","methods","PurchaseCostDialogBody","costType","costAmount","costDateError","costTypeError","amountError","newCostType","PURCHASE_COST_TYPE_TO_CID","rval","dateStr","useGetDefaultAutoGeneratedPaymentMethod","defaultAutoGeneratedPaymentMethodQuery","defaultAutoGeneratedPaymentMethod","useUserHasPurchasePermission","owned","canUpdate","useUserCanUpdatePurchase","useUserCanUpdatePurchaseTags","useUserCanUpdatePurchaseCommission","useUserCanLockPurchaseCommission","useUserCanUpdatePurchaseDeliveryType","useUserCanUpdatePurchaseCustomDeliveryType","useUserCanUpdatePurchaseSeatTraits","useUserCanUpdateListingTicketTypePriorityFromPurchase","posField","posChangedField","newP","oldP","getTicketGroupInputTotalCost","tg","getTicketGroupInputTotalTicketCost","deliveryCost","unitCost","numberOfTickets","getCosts","costs","totalTicketCost","totalShipping","getLongestConsecutiveNumber","longestNumber","currentNumber","charCode","fitsSeatIncrementType","seatFr","seatTo","increment","seatValue","getNextTicketBy","ticketNo","getNextTicket","lastChar","numPart","fromCharCode","selectEventInfoFromTicketGroups","ticketGroup","tickets","taxPaid","selectDistinctListingIds","ticket","formatSeatDisplay","SECTION_TYPES_GA","isSectionTypeGeneralAdmission","toSeating","seat","ticketIds","toEntityWithTicket","ticketCnt","PurchaseTicketTableContainer","PurchaseEventItemHeaderWrapper","ChangesIndicator","useClearShiftSelectionOnSortingChange","sortingState","generateShimmeringRows","numOfRows","numOfListingGroups","dataThemeAttributeName","DarkLegacyTheme","logToServer","clearIDBCache","clear","createIDBAsyncStorage","del","useNetworkState","offlineTimeoutMs","isOnline","setIsOnline","onLine","setOffline","setOnline","cancel","handleStatusChange","messages","allMessages","QueryClient","queryCache","QueryCache","reload","RootErrorPage","useRouteError","isRouteErrorResponse","stack","classList","ticketUtilTheme","remove","purpleTheme","darkTheme","_ThemeProvider","usePaginationSettings","numOfItems","currentPage","pageSize","disablePagination","initState","pagination","setPagination","pageIndex","prevState","ClockTrashIcon","getSeatDisplayText","compact","isSingleSeat","isSeatRange","SeatingInfo","showSectionPrefix","showSeatPrefix","showAdminHold","showOrgSeat","orgSeatFr","orgSeatTo","isSoldOut","justifyIconContent","showUnmappedSection","darkBackground","lightBackground","isWasted","hasSeats","hasOrgSeats","isOrgSingleSeat","showOrgSeatFr","showOrgSeatTo","isUnmappedSection","getServerSideOnlyMetricsQuery","getServerSideOnlyMetricsQueryV2","eventChangingFilter","dataChangingFilter","MAX_ENTITIES_IN_GROUP_FOR_LOAD","createCatalogMetricsContextV1","createCatalogMetricsContextV2","groupAndAggregateMetrics","listingMetrics","addMetrics","metricsByCurrency","lm","existing","getEventsToGetMetricsFor","datesUtc","ev1","ev2","date1","date2","compareDesc","compareAsc","CatalogMetricsContextV2Provider","getCatalogMetrics","isDetailed","CatalogMetricsContext","transformedQuery","hasCatalogV2Feature","setMetrics","lastRefetchTime","setLastRefetchTime","getEventIdsToGetMetrics","venId","maxRowVersions","eventsMissingMetrics","eventsWithdata","eventsDetailed","maxRowVersion","metricsQueryKey","metricsQuery","newMetrics","refreshMetrics","contextValues","eventDetailedMetrics","eventMetrics","performerMetrics","venueMetrics","CatalogMetricsContextV1Provider","addCatalogMetrics","groupsToGetMetricsFor","queries","idGroup","metricsQueriesFromHook","useQueries","metricsQueries","setMetricsQueries","getMergedMetricsRecord","metricsRecords","CatalogMetricsContextProvider","hasMetricsV2Feature","useCatalogMetricsContext","mapFiltersToFiltersState","appliedFilterIds","mandatoryFiltersToShow","selectedFilters","filterToolbarGroup","filterToolbarItem","useFilterFiltersByPermission","fi","requiredPermissions","TextFilter","setQuery","textContainsKey","textNotContainsKey","textEqualsKey","setRowFilter","CONTAINS_EQUALS_ENUM_FILTER_TO_CID","InternalNotesFilter","getInternalNotesLabel","entity","useMultipleInternalNotesFilter","labelContentId","useInternalNotesFilter","useCities","citiesWithStateProvinceQuery","citiesWithoutStateProvinceQuery","useStateProvinces","CityMultiSelector","stateProvincesQuery","citiesOptions","cities","stateProvinceId","sp","stateProvinceName","countryName","useKnownCountries","CountryMultiSelector","knownCountriesQuery","knownCountriesOptions","StateProvinceMultiSelector","stateProvincesOptions","stateProvinces","useLocationFilter","newCountryCodes","countryCodesSorted","orgCountryCodesSorted","newStateProvinceIds","stateProvinceIdsSorted","orgStateProvinceIdsSorted","newCityIds","cityIdsSorted","orgCityIdsSorted","RowFilter","SectionFilter","FilterSectionsContainer","FilterDialogBody","FilterDialogFooter","FilterDialogFooterMessage","FilterDialogFooterButtons","FilterDialogDisplaySection","FilterDialogDisplaySectionHeader","FilterDialogDisplaySectionContent","FilterDialogItemContainer","FilterDialogItemDiv","FilterDialog","onSubmitFilter","onSaveQuickFilter","filterAppliedMessage","hasFiltersApplied","filteredByPermissionsFilters","FilterToolbarContainer","FilterCount","CustomFilterPopoverContainer","CustomFilterPopoverTitle","CustomFilterItem","CustomFilterIconsContainer","PosSearchBox","onSearchChange","onEnterKeyPressed","focusOnMount","textFieldProps","inputText","setInputText","onInputChanged","onSearchTextChanged","endsWith","hasText","PosSelectableSearchBox","selectorProps","marginRight","RequestEventDialog","curLocale","onSaveHandler","eventDate","requestedEvent","currentDate","EventSearchInputBoxContainer","EventSearchItemDiv","EventSearchItemInfoContainer","EventSearchDropdownResultItemHeader","EventSearchResultItem","lastIndex","lastIndexOf","subnameIsVenue","PerformerSearchResultItem","VenueConfigSearchResultItem","VenueSearchResultItem","EventSearchDropdownResult","isSearching","maxNumOfResults","onSearchItemSelected","excludeSearch","venueConfigs","venueCfgs","resultItemList","EventSearchItem","onChecked","isSingleSelect","DEFAULT_EVENT_SEARCH_FILTER_QUERY","showParkingTickets","EventSearch","selectedEvents","eventsToSearchFrom","showEventsToSearchFromOnEmptySearch","onEventsSelect","searchTextPrefill","numEventsSelected","onDeleteNumEventsSelected","allowSearchByVenueConfig","searchPlaceHolder","tempFilterQuery","setTempFilterQuery","dateFilter","setIsAllSelected","filteredSearchEvents","eventWithData","previous","filterAppliedCounts","numEventsSelectedText","searchPlaceholderText","searchTextDebounced","setSearchTextDebounced","searchEventsQuery","setSearchEventQuery","eventSortQuery","setEventSortQuery","onSearchTextChangedDebounced","getStaticResult","eventResults","filteredEvents","valueOf","autoCompleteResultQuery","eventsToDisplay","seid","hasResult","requestEventDialog","onSaveRequestEvent","item1","item2","item3","openDropdown","isFetching","filterToolbarStyles","YES_NO_ENUM_FILTER_TO_CID","EVENT_SORT_TO_CID","innerHeight","BulkEditFooter","primaryEntityTypesAffected","onBeforeSubmit","submittButtonRef","onCloseContentIdOverride","onSubmitContentIdOverride","onRetryCancel","onCloseHandler","Execute","hasPrimaryAffectedIds","BulkChangeEventDialog","doNotUseBackgroundProgress","setEvent","onPreviewReceived","TicketGroupIntentionDialog","intention","TicketGroupIntentionDialogBody","salesCount","saveButtonContentId","setDeallocateSales","TICKET_GROUP_EDIT_REASON_TO_CID","LaunchChangeEvent","showIcon","useBulkChangeEventAction","onSuccess","changeEventNote","setChangeEventNote","deallocateSalesRef","ticketGroupIntentionDialog","openBulkChangeEventDialog","closeBulkChangeEventDialog","onSubmitChangeEvent","newSelectedEvent","supportBackgroundProcess","succeeded","onChangeEventClick","dropDown","TableCellDiv","overflowWrap","wrap","isResizeEnabled","useColumnResizingContext","textWrap","TableHeaderCellDiv","useCopyToClipboard","referenceIsCopied","setReferenceIsCopied","copyToClipboard","referenceId","clipboard","writeText","catch","resetReferenceIsCopiedState","useMapDeliveryTypesToString","deliveryTypesObj","deliveryTypes","delivType","topPriTktType","dt","LaunchDownloadUserDocuments","onDownload","onClickHandler","iconFill","PredeliveryActionsDropdown","onPredeliveryAction","triggerCmp","hasBarcodes","barcode","hasExternalIds","externalTicketId","hasTicketUrls","ticketUrl","hasETickets","eTicket","hasQRcodes","qrCode","selected","isSubRow","SeatInfoContainer","TableShimmeringDiv","NoData","coalesceUndefinedOnly","removeDuplicates","arr","compareNumber","numB","sortMoney","rowA","rowB","valueA","valueB","amtA","amtB","getNumericPrefix","sortByNumericPrefix","compareByNumericPrefix","strA","strB","cmpNumberResult","postfixA","postfixB","compareGeneric","sortGeneric","convertToComparableValue","strAsInt","sortListingSeating","original","sortSeatingForTable","sortListingSeatingSection","sortSeatingSection","sortPurchaseOrderTicketGroupSeating","rowATicketGroupToGetSeating","isTktGrp","ticketGroupItems","rowBTicketGroupToGetSeating","sortSeating","sortSalesSeating","sortSalesSeatingSection","sortSeatingSeats","sortSeatingSeatsForTable","seatFromA","seatFromB","seatFromAInt","seatFromBInt","sortPurchaseOrderSeatingSection","seatingA","seatingB","safeSortDateTime","timestampA","timestampB","GridActionType","getNextEditableListingRow","currentRow","currentIndex","isCompListing","sortLstingInGroup","ltGrpPrior","sortGroupedListing","sortMarketplacePaymentLineSeating","filterSeatingSectionFn","columnId","filterValue","filterSectionValues","getLeafRows","leafRows","leafRow","filterSeatTraitsFn","filterListingNoteIds","filterSeatRangeFn","filterMin","filterMax","seatFrNum","seatToNum","filterStringMultiSelect","filterValues","getReportValueTypeDisplayConfig","isNumeric","isCurrency","isBoolean","useGetListingAndSaleIds","holdId","TicketGroupStatusIndicator","intentions","unsavedActionText","originalTicketGroup","hasChanges","onTicketGroupIntentionSave","TICKET_GROUP_TABLE_COLUMNS_CONFIG","minSize","maxSize","accessorFn","cell","sortingFn","quantityText","showFromPurchaseAccordions","strDelivType","costText","expectedValue","enableSorting","hasMultiTicketGroupTableFeature","showFromAccordions","onAmendTickets","getPurchaseOrderDetailsModalConfigWithDeepLink","combineWithTicketGroupId","additionalData","editIntention","onTicketGroupAction","onCancelTickets","onExchangeTickets","onViewTicketGroup","combineWithTicketGroupIdSimple","canGetDocArts","uploadPredeliveryAction","amendActionData","getPurchaseOrderRelativeUrl","getModifierState","PAGE_SIZE","getRowId","originalRow","TicketGroupTable","highlightTicketGroupIds","onMount","onUnmount","entityCount","ticketGrpsCnt","tableStyle","tableHeadStyle","tableCellStyle","withOuterPadding","ticketsText","vendorOrderId","sorting","setSorting","groupSelection","rowSelection","rowItem","onRowSelectionChange","updater","columns","columnVisibility","onPaginationChange","onSortingChange","sortingUpdaterFn","newSortVal","functionalUpdate","RowComponent","highlight","PurchaseTicketTable","uniqueEvents","eventTicketGroups","tgFieldState","seatField","MAX_COMMISSIONERS","validateMaxCommissions","commissionPercentage","FormErrorKey","SetCommissionsForm","actionsRef","footerActions","disableForm","formValues","formErrors","formRootErrors","isFormValid","requiredText","minCommissionValueText","rules","maxCommissionersReached","activeUserIds","firstAvailableUserId","differenceWith","commissions","activeUserId","commission","buyerUserId","addCommissionAction","selectedUserId","otherFieldsWithSameUserId","isTouched","restField","changedValue","commissionValue","cleanValueToSet","isDirty","LockedIcon","UnlockedIcon","LockCommissions","isCommissionsLocked","onCommissionsLockChange","disabledLockButton","disabledUnlockButton","onCommissionsLockClick","CommissionSection","disableProp","readonly","showLockCommissionsButton","canLockUnlockCommission","selectedCommissionsCount","userHasLockCommissionsOnPoFeature","showAddCommission","h2","showOnMobile","WizardFooter","EmailPreviewContainer","EmailBodyWrapper","EmailPreviewTitle","StyledPurchaseWizardBody","BodySectionTitle","TicketsDetailRow","TicketDetailRowPaymentList","CheckboxContainer","addFlexGrow","FieldLabel","isCheckbox","HeaderFieldLabel","FieldError","FormRow","vertical","PurchaseDetailsDataTable","PurchaseDetailsDataTableCell","PurchaseDetailsDataTableFooter","PaymentStatusTextContainer","purchasePaymentStatus","isPaymentRefunded","isPaymentPastDueDate","PurchasePaymentStatusTextContainer","CostDetailsDataTable","PurchaseDetailsDataTableLabelCell","PurchaseDetailsDataTableValueCell","PurchaseDetailsDataTableValueFooter","CostDetailsTable","onEditCost","onAddNewCost","onRemoveCost","dividerClassName","costDetail","paddingLeft","DealContext","DealProvider","deal","defaultEdit","localDeal","setLocalDeal","isEditDeal","setIsEditDeal","updateLocalDealDetails","dealDetails","updateLocalDealConfigHurdle","dealConfigs","updatedConfigs","config","deleteLocalDealConfigHurdle","deletedPriority","seenPriorities","expectedPriorities","checkDealConfigHurdlePriorities","updateLocalDealConfigHurdlePriority","configs","priorityMap","indices","assignedPriorities","isValidDeal","dealFallbackConfig","validHurdles","vendorSplit","vendorCommission","splitValue","totalPurchaserSplit","purchaserCommissions","validFallbackHurdle","useDealContext","Collapsible","ExpandIconDefault","FoldIconDefault","Collapsible.Trigger","createDefaultDealCommission","DealConfigSplitCommissionVendorAccount","onChangeCommission","DealConfigSplitCommissionPurchasedBy","onDeleteCommission","changedUserId","commissionIndex","DealConfigHurdleSplit","onChangeVendorCommission","onAddNewCommission","totalHurdlePercentage","textAlign","DealFallbackSection","setOpen","isUserIdAlreadyUsed","existingCommission","removeIndex","updatedCommissions","PosCollapsible.Root","PosCollapsible.Trigger","PosCollapsible.Content","DealConfigHurdle","HurdleConfig","configSplitType","thresholdValue","numHurdles","priorityOptions","DEAL_CONFIG_TRESHOLD_SPLIT_DIRECTION_TO_CID","thresholdSplitDirection","createDefaultDealConfig","dealConfigHurdleId","DealConfigSection","dealConfig","DealDateRangeSection","dealStartDate","dealEndDate","currentEndDate","currentStartDate","DealSplitTypeSection","dealSplitType","DEAL_CONFIG_SPLIT_TYPE_TO_CID","DealTypeSection","dealType","createDefaultPODeal","dealId","dealConfigId","guaranteedAmountPaid","DealSectionInput","DealSectionContent","hasConsignmentDealFeature","dealField","DealSection","AccountSectionLabel","base","AccountSectionEmail","VendorSectionLabel","VendorSectionName","DeliverySection","onChangeClick","modalStyles","getUserDisplayName","userInfo","displayString","useGetUserInfos","userIds","getUserInfosQuery","userInfos","sellerUser","sellerDisplayName","deleteDate","UpdatedByBannerWrapper","ConvertCurrencyIcon","getPaymentMethodIcon","PaymentDetailsTable","onSetAsPaid","onEditPayment","onRemovePayment","onConvertCurrency","canConvertPaymentLines","convertedByUsersIds","updatedByBanner","visibility","PaymentStatusText","PurchaseMethodIcon","PurchaseMainDetails","allowPaymentEdits","onSecondaryAccountOpen","purchaseOrder","poId","additionalCosts","editMode","setEditMode","totalPaymentAmount","hasMarkPurchaseAsPaidFeature","insertFallbackPurchasePaymentMethod","onMarkPurchaseAsPaid","dftPayMethodId","existingPayments","newPayments","PurchaseMainDetailsBody","canEditCommission","costDialog","addPaymentDialog","editPaymentDialog","convertCurrencyDialog","currentCostModel","setCurrentCostModel","currentPayment","setCurrentPayment","secondaryVendor","secondaryVendorAccount","onSetPaymentPaid","newPaymentDate","onEditPaymentSave","existingPayment","onEditPaymentCancel","onAddNewCostSave","existingCost","onAddNewCostCancel","onAddNewPayment","onAddNewPaymentSave","onAddNewPaymentCancel","costId","newCosts","notes","onCancelConvertCurrency","onSaveConvertCurrency","updatedPayment","filteredPayments","pmtStat","PURCHASE_PAYMENT_STATUS_TO_CID","AddPurchasePaymentMethodDialog","PAYMENT_METHOD_TYPE_TO_CID","PurchasePaymentMethodSelectionInput","hideAdditionalOptions","addNewPaymentMethodContent","hookPosSelectProps","option","RadioLabelDescription","CancelPurchaseDialog","numOfSales","cancellationType","setCancellationType","isSecondScreen","setIsSecondScreen","onInternalSubmit","cancelPurchase","CancelPurchaseDialogModeRadioGroup","RestorePurchaseDialog","useSyncCenterSettings","useGetIsPurchaseIdsInUsedForVendorId","purchasingIdInUseQuery","Tabs.Root","orientation","Tabs.Trigger","rootClassName","Tabs.List","Tabs.Content","TabPanel","tabs","activeTabIndex","tabListProps","tabContentProps","activeTab","tab","onTabPanelKeyDown","setActiveTab","optionsLength","isLeftKey","isRightKey","nextIndex","HeaderContent","EntityInfoDiv","EntityIdNumberDiv","EventEntityHeader","ConnectedEventEntityHeader","useEventItemLoadingDisplay","loadingContentId","searchingContentId","errorContentId","activeId","loadingState","NotFoundWrapper","CancellableFormHeader","EMPTY_ACTIVITY_LOG_QUERY","includeUserOnly","actionTypes","auditActionTypes","TAB_ALL","ListingActivityLogTab","PrivateNotes","TAG_AUDIT_ACTION_TYPES","LISTING_ACTIVITY_LOG_TAB_TO_ACTION_TYPES","LISTING_ACTIVITY_LOG_TAB_TO_AUDIT_ACTION_TYPES","LISTING_ACTIVITY_LOG_TAB_TO_CID","SaleActivityLogTab","SALE_ACTIVITY_LOG_TAB_TO_ACTION_TYPES","SALE_ACTIVITY_LOG_TAB_TO_AUDIT_ACTION_TYPES","SALE_ACTIVITY_LOG_TAB_TO_CID","PurchaseOrderActivityLogTab","PURCHASE_ORDER_ACTIVITY_LOG_TAB_TO_ACTION_TYPES","PURCHASE_ORDER_ACTIVITY_LOG_TAB_TO_AUDIT_ACTION_TYPES","PURCHASE_ORDER_ACTIVITY_LOG_TO_CID","getActivityLogFilterByTab","isTagTab","getActivityLogTabValues","tabKey","cid","useGetActivityLogByFilter","activityLogFilterQuery","getAuditData","activityLogQuery","ActivityLogModal","ActivityLogModalContent","details","activityLogTagNameQuery","activityLogTopLevelFilter","activityLogDisplay","ActivityLogLaunchButtonIconSpan","LaunchActivityLog","activityLogUi","onLaunchDialog","verticalAlign","PurchaseCurrency","currencyChangeWarningDialog","newCurrencyCode","setNewCurrencyCode","isNewPurchase","onCurrencyChangeCancel","onCurrencyChangeOk","ticketGroupIntentions","PurchaseSellerAccountSelector","confirmChangeVendorAccountDialog","dialogRef","formPurchaseVendorAccount","localPurchaseVendorAccount","setLocalPurchaseVendorAccount","tempBuyerUserId","setTempBuyerUserId","vendorDefaultBuyerUserId","dftBuyerId","userBuyerId","onConfirmChangeVendorAccount","onCancelChangeVendorAccount","ShareButton","deepLinkQueryParam","isCopiedLocation","usePopup","linkCopiedDialog","isUrlCopied","setIsUrlCopied","showCopiedLabel","copiedLocation","sharedButtonSpan","usePurchaseVendorAccountSelector","paginateCount","purchaseVendorAccountEmail","vendorAccountIds","hasVendorId","debouncedSearchText","setDebouncedSearchText","debouncedSetSearchText","useInfiniteQuery","pageParam","vendorIds","getNextPageParam","lastPage","initialPageParam","placeholderData","previousData","purchaseVendorAccountQuery","sortedVendorAccounts","Map","pages","unionResult","va","availableVendorAccounts","availableVendorAccountsOptions","PurchaseVendorAccountSelectionInput","vendorFieldName","fieldName","currentVendorAccount","setCurrentVendorAccount","addVendorAccountText","optionsAlwaysShow","onAddNewVendorAccount","onSaveVendorAccount","onVendorAccountCancel","newAccount","ChevronAccordionIcon","PosAccordionTrigger","chevronPos","forwardedRef","PosAccordionContent","PurchaseVendorDeliveryOverrideInput","collapsible","PosAccordionRoot","PosAccordionItem","PurchaseVendorDeliveryOverrideInputContent","hasAutoFulfillSettingFeature","skipAutoFulfill","setSkipAutoFulfill","skipDeliveryOverride","setSkipDeliveryOverride","newD","newRules","PurchaseVendorDialog","PurchaseVendorDialogBody","useReducedEdit","nameError","isGlobal","vendorName","PurchaseVendorSelectionInput","addVendorText","currentVendor","setCurrentVendor","vendors","onAddNewVendor","tktTypeRules","vendAccCounts","onSaveVendor","onVendorCancel","newVendor","HeaderRightGroup","HeaderLeftGroup","HeaderVendorContainer","PurchaseOrderStateContainer","DeliverAlternativeAccountCheckboxWrapper","PurchaseVendorHeader","numOfListings","onToggleEditDetails","onGoToMessageThread","enableMarkAsPaid","hasCreatePermission","isAutoPoQualityControlled","purchaseDate","transferId","useGetUserInfosQuery","buyerUserInfo","qcState","vendorOrderIdPlaceholder","transferIdPlaceHolder","cancelVoidDialog","restorePurchaseDialog","isCancelled","isCancelledState","isDisabled","navigateUnsavedDialog","navigateUrl","setNavigateUrl","youHaveNoSalesMsg","youHaveNoListingsMsg","showSecondaryVendorInputs","setShowSecondaryVendorInputs","onViewUrlClick","viewSaleOnClick","viewInventoryOnClick","viewEntityButtons","goToNavigation","orderIdUsedWarningMessage","orderIdUsedErrorMessage","orderIdBlurred","setOrderIdBlurred","orderIdOnBlur","summaryWrapper","PURCHASE_ORDER_STATE_TO_CID","fieldText","QUALITY_CONTROL_STATE_TO_CID","PurchaseWizardFooter","onPreviousLabel","onPrevious","onNextLabel","onNext","additionalActions","onPreviousWrapper","BulkUpdateDeliveryOverrideDialog","skipTicketGroups","purchaseOrderQuery","onBulkUpdate","onSaveOverrideSettings","backfillDeliveryStrategyFeature","backfillDeliveryStrategyToSaleFeature","updateFulfillmentMode","setUpdateFulfillmentMode","UpdateFulfillmentMode","setUpdateSalesOfListings","hasBackfillDeliveryStrategyFeature","hasBackfillDeliveryStrategyToSaleFeature","onBulkEditSubmitHandler","submitButtonRef","BulkUpdateDeliveryOverrideDialogModeRadioGroup","textTransform","EmptyVendorAccountId","EmptyVendorAccountDetails","PurchaseVendorAccountDialog","finally","PurchaseVendorAccountDialogBody","hasVendorAccountDeliveryStrategyFeature","emailError","paymentMethodError","buyerUserIdError","vendorAccountName","encryptedEmailAddress","defaultPurchasePaymentMethodId","defaultBuyerUserId","updateDialog","openBulkUpdateDialog","closeBulkUpdateDialog","purchaseQuery","autoFulfillRemovedOrNotChanged","deliverySettingsRemovedOrNotChanged","EmailPurchaseOrderContext","setInboundEmailId","setClassificationType","setOrderId","setPartialPurchaseOrderKey","EmailPurchaseOrderContextProvider","partialPurchaseOrderKey","partialPurchaseOrderVendorFields","setPartialPurchaseOrderVendorFields","getOrCreateVendorAccount","toEmail","vendorAccountOverride","partialPurchaseOrderResult","partialPurchaseOrder","HTML_EMAIL_MAX_WIDTH","EmailRenderer","htmlBody","textBody","wrapperRef","wrapperWidth","EmailBody","inboundEmailBodyResult","isPaused","AlertWithSuppressionDialog","alerts","suppressWarning","setSuppressWarning","useAlertWithSuppressionDialog","useCancelTicketGroupDialog","lastTimeStamp","cancelTicketGroupSuppressionTimestamp","useManualPriceDisableAutoPricingDialog","manualPriceDisableAutoPricingTimestamp","useSuspiciousPriceChangeDialog","suspiciousPriceSuppressionTimestamp","InternationalComplianceDialog","reuseAnswer","setSaveAnswer","restrictions","setRestrictions","worksFor","setWorksFor","isSpeculativeListing","setIsSpeculativeListing","isSecondStep","setIsSecondStep","doNotAskAgainTimestamp","ticketRestrictions","useInternationalComplianceDialog","FieldLabelWrapper","FromToLabel","DividerIcon","DividerContainer","SecondaryVendorAccountDialog","SecondaryVendorAccountDialogBody","vendorAccountFrom","vendorAccountTo","queryVendor","hookVendorPosSelectProps","localVendorAccountTo","setLocalVendorAccountTo","localVendorTo","setLocalVendorTo","hookVendorAccountFromFilterSelectorProps","queryVendorAccount","hookVendorAccountToPosSelectProps","defaultDndFileUploaderContext","setDndFileUploaderContext","DndFileUploaderContext","useDndFilerUploaderContext","DndFilerUploaderContextProvider","dnDFileUploaderContext","setDnDFileUploaderContext","DndGlobalFileDrop","PurchaseTicketFlowTitle","currentGroupTicketsCount","currentGroupIndex","isSingleInputModeForMultiEvent","showSearch","eventStrId","PurchaseTicketGroupHeader","PurchaseTicketGroupPageAdditionalInput","setIsChecked","getMirrorSection","candidates","first","orderBy","directionalAngle","useCtrlPlusM","onToggleMirrors","venueMapInfo","useEventMapContext","hasVenueMapCtrlPlusMFeature","prevMarkedIds","setPrevMarkedIds","mirrors","mirrorsMutation","useList","zonedSections","onCtrlMClicked","mirrorSections","sectionIdsToAdd","sectionCandidates","mirror","idsToAdd","useKey","toSectionKey","getSectionId","getTicketClassId","resetSectionRowColors","sectionGroups","sectionGroup","sectionRows","useRowColor","sectionLabel","querySelector","sectionPath","reworkGroups","useRowMap","rowPaths","sectionPaths","sectionLables","ticketClassPaths","ticketClassLables","rowLablePaths","sectionToRows","ticketclassid","sectionKey","rowPath","sectionToLable","textElement","rowGroup","initializeGroups","useSvgMap","setVenueMapSvg","setSectionGroups","initializeSvg","removeAttribute","onInitializeContent","VenueMapV3Content","svgState","setSvgState","SvgInitializationState","svgNode","setSvgNode","innerHTML","VenueMapV3","useEffectOnce","EventVenueMap","selectedSectionIds","isMapLoading","hasSVGVenueMapV3Feature","selectedSectionData","shouldUseV3","hasRow","svgMapVer","focalPt","PurchaseTicketGroupVenueMap","useWatch","sectionIds","useTicketGroupListingNotes","listingConstraints","useDeliveryOverrideForNewTicketGroup","getQueryKey","item4","deliveryTypeDefault","ticketTypeRulesDefault","inHandAtDefault","inHandAt","hasDefaultValues","useSelectionPos","scrollContainerRef","virtualizer","rowHeight","selectionPos","setSelectionPos","prevFirstRect","prevLastRect","updatePosition","container","minRow","maxRow","minCol","colIndex","maxCol","renderedRange","calculateRange","firstCell","lastCell","startIndex","endIndex","containerRect","firstRect","lastRect","isCellInRange","cells","isPosField","calculateTicketCostUnitCost","currentData","colIds","useSpreadsheetCopyPaste","selectedCells","setSelectedCells","clipboardData","setClipboardData","isCopyActive","setIsCopyActive","copiedCells","setCopiedCells","useHotkeys","handleCopy","enableOnFormTags","handlePaste","numColumns","targetRow","targetCol","minCopiedRow","maxCopiedRow","minCopiedCol","maxCopiedCol","maxUpdatedRow","maxUpdatedCol","col","rowOffset","colOffset","pasteRow","pasteCol","pasteVerificationHandler","useSpreadsheetSelection","nonInteractiveColumns","isAnchorSelected","setIsAnchorSelected","anchorDragged","setAnchorDragged","lastEnteredCell","isShiftPressedRef","handleKeyDown","handleKeyUp","handleMouseUp","startRow","startCol","endRow","endCol","handleMouseDown","handleMouseEnter","lastCellPosition","SpreadsheetSelectionBox","classNames","selectionBoxPos","ReactDOM","createPortal","SortStatus","SortStatus2","ArrowType","ArrowType2","getNextSortStatus","allowUnsorted","SpreadsheetTableHeader","canSort","column","getCanSort","sortOrder","getIsSorted","UNSORTED","ASC","DESC","getSize","flexRender","columnDef","toggleSorting","PosFormFieldCell","border","SpreadsheetTdComponent","isInitialSelected","isCellSelected","isCellCopied","isSingleCellSelected","showAnchor","columnIndex","getIndex","backgroundClass","buttons","SpreadsheetTd","memo","SpreadsheetTable","parentRef","useReactTable","getCoreRowModel","getSortedRowModel","sortingFns","getRowModel","useVirtualizer","getScrollElement","estimateSize","overscan","getVirtualItems","prePadding","afterPadding","notUndefined","scrollMargin","getTotalSize","typedColumns","getAllColumns","copiedBoxPos","footerRow","getFooterGroups","numCols","overflowY","getHeaderGroups","headerGroup","virtualRow","getVisibleCells","tableRow","COLUMN_DEFAULT_SIZE_XS","COLUMN_DEFAULT_SIZE_ICON","COLUMN_DEFAULT_SIZE_SM","COLUMN_DEFAULT_SIZE_BASE","COLUMN_DEFAULT_SIZE_LG","COLUMN_DEFAULT_SIZE_L","COLUMN_DEFAULT_SIZE_XL","COLUMN_DEFAULT_SIZE_XXL","COLUMN_MIN_SIZE","COLUMN_MAX_SIZE","CurrencyCellComponent","currencyField","CurrencyCell","InputCellComponent","inputProps","inputType","hasError","InputCell","SpreadsheetCell","FooterAggregateCell","TicketGroupInputQuantityComponent","calculatedUnitCost","calculatedTotalCost","TicketGroupInputQuantity","TicketGroupInputDeliveryTypeComponent","deliveryTypeMapping","deliveryTypeMappingOverride","deliverTypeOptionsAlwaysShow","deliveryTypeValue","TicketGroupInputDeliveryType","RowSelector","filteredRows","nameToOrdinal","res","SectionSelector","TicketGroupInputRowSelectorComponent","rowValue","setRowForTickets","selectedRow","TicketGroupInputRowSelector","getIncrement","generateSeats","assignTicketGroupSeats","seatFrom","skipError","seats","seatFromNum","validateSeatRange","startOrdinal","ord","initialTickets","newTickets","lstOrd","toCharCode","origTicket","additionalTickets","seatSet","totalRange","extractSeatRange","localValue","seatRangeInput","convertSeatRange","TicketGroupInputSeatRangeComponent","launchSeatRangeDialog","useController","qty","ticketsHasSeats","setLocalValue","duplicateSeatErrorMsg","rawSeatFrom","rawSeatTo","SeatRangeModalButton","TicketGroupInputSeatRange","TicketGroupInputSeatTraitComponent","TicketGroupInputSeatTrait","TicketGroupInputVenueInputComponent","chooseSection","TicketGroupInputVenueInput","createDeliveryTypeMapping","useTicketGroupDeliveryTypes","useTicketGroupInputTableColumns","isTotalCostChecked","purchaseTicketGroupInputField","insert","columnHelper","createColumnHelper","costColumn","columnConfigs","accessor","faceValueCost","numRows","curRowValues","newRow","curRowKey","curRowValue","newRowValue","newTicketGroupId","VerticalDivider","SeatRangeInputModal","ticketRow","localTickets","setLocalTickets","hasFilledSeat","hasMissingSeat","handleSeatChange","updatedTickets","SeatRangeInfo","marginBottom","tempTickets","paddingBottom","marginTop","TicketGroupInputTableFooter","numOfAddRows","setNumOfAddRows","newRows","TicketGroupInputTableHeader","setIsTotalCostChecked","TicketGroupInputTable","purchaseOrderInfo","selectedSeatRangeRowIndex","setSelectedSeatRangeRowIndex","seatRangeDialog","ticketGroupColumnConfigs","deliveryOverrideDefaultIsLoading","hasDeliveryOverrideValues","vendAcc","number","desiredDelivType","inHandDate","PurchaseTicketGroupPage","onSubmitWrapper","onNextFromTicketGroupInputStep","onPrevFromTicketGroupInputStep","showPredeliverySection","PurchaseTicketGroupPageInternal","duplicateSeatMsg","inHandDateMustBeforeEventDateMsg","autoBroadcastRequireFaceValueMsg","formTicketGroups","validateTicketGroups","getDocumentPageUniqueId","ep","getETicketDocumentPageUniqueId","getDocumentPagesMap","docUploadInfos","getDocumentPageIdToTicketMap","ticketAssignments","ticketIndex","UploadETicketForm","entityWithTickets","pageNumber","pageUri","documentUri","UploadETicketsContent","renderContent","onComplete","onUploadDocuments","onUploadETickets","eTicketUploadInfos","setETicketUploadInfos","isFinalPreview","setIsFinalPreview","watchTickets","getIncompleteUploadInfos","infos","uploadInfo","ui","infoChanged","eTicketPages","allResults","emptyEntries","nonEmptyEntries","gcTime","validateTicketAssignment","onUploadClick","UploadETicketsInstructions","UploadETicketsSubInstructions","UploadETicketsThumbnailContainer","UploadETicketsThumbnailLoader","UploadETicketsThumbnailAssigned","UploadETicketsThumbnailAssignedMappedTo","UploadETicketsSeatingContainer","UploadETicketsSeatingPlaceholder","UploadETicketsSeat","PreviewTicket","hr","SeatLabel","ErrorMessage","ImageMagnifier","magnifierSize","magnifierBorderColor","allowOverflow","imageSrc","trackingEntityType","trackingEntityId","trackingDocumentId","trackingDocumentType","pdfViewerClassnames","toolbarSlot","ThemeContext","displayAsEmbed","setDisplayAsEmbed","hasPdfViewerToolbarFeature","getFilePluginInstance","getFilePlugin","toolbarPluginInstance","toolbarPlugin","selectionModePlugin","SelectionMode","Hand","renderDefaultToolbar","Toolbar","shouldTrackDocumentEntityAction","trackDownload","slot","Open","Print","SwitchTheme","EnterFullScreen","ShowPropertiesMenuItem","ShowProperties","viewerWrapper","Viewer","GlassMagnifier","DraggableSource","PosDraggable","draggableData","previewDragData","hideElementWhileDragging","draggableSource","dragContainerRef","dragRef","dragPreview","useDrag","pageRef","dragData","collect","monitor","handlerId","getHandlerId","getEmptyImage","captureDraggingState","DroppableContainer","isOver","hideBorder","PosCustomDragLayerContainer","attrs","currentOffsetX","currentOffsetY","DragHandles","rightHandle","bottomHandle","leftHandle","topHandle","HorizontalDraghandles","VerticalDraghandles","removeHoverEffect","PosDraggableIndicator","PosDroppable","onDrop","onOverClassnames","dropRef","useDrop","drop","canDrop","PosCustomDragLayer","currentOffset","useDragLayer","getSourceClientOffset","source","UploadETicketsSeatingSection","onDroppingToSeat","thumbUrl","documentUrl","onUnmappingFromSeat","assignment","wt","eTicketPage","UploadETicketsFinalPreviewBody","uploadETicketsBodyContainer","SingleFileUploadWithPreviewContainer","PageContainer","PageImageContainer","UploadFailure","SingleFileUploadWithPreview","filePages","previewWidth","previewHeight","onFileDeleted","isDeletable","onNewFileSelected","renderPreview","fp","UploadETicketsThumbnailSection","entitWithTickets","mappedETicketIds","onDroppingRemovingTicketFromSeat","onDroppingToThumbnails","sourcePage","destinationPage","destinationTicket","matchingPage","mappedToTicket","newUploadUIs","UploadETicketsSeatAssignmentBody","allPagesAvailable","autoAssignment","allPages","page","UploadETicketsSection","ticketGroupIndex","tb","docUploadInfo","onBack","ticketGroupPredeliveryBody","ticketGroupInputFooter","getPageToDocumentFileUploadInfoMap","documentFileUploadInfosMap","doc","documentFileUploadInfo","documentFileUpload","previewModalZIndex","ticketsAndSeatsZIndex","draggingWrapperZIndex","defaultUploadETicketsContext","pageUniqueIdToTicketMap","setPageUniqueIdToTicketMap","selectedUniquePageId","setSelectedUniquePageId","uniquePageId","hoverUniquePageId","setHoverUniquePageId","uniquePageIdToDocumentFileUploadInfoMap","setUniquePageIdToDocumentFileUploadInfoMap","selectPrevUnmappedTicket","selectNextUnmappedTicket","fromUniquePageId","UploadETicketsContext","useUploadETicketsContext","UploadETicketsContextProvider","selectNextTicket","uniquePageIds","selectedUniquePageIdIndex","nextKeysFromBeggingToCurrentIndex","reverse","nextKeysFromCurrentIndexToEnd","notMappedUniquePageId","pageIdToDocument","UploadETicketsDraggableSource","SeatInfo","isSmallSize","PageIcon","PaperTicketsIcon","PreviewInfo","mappedTicketInfo","useMobileStyle","PosKey","char","singleChar","charAt","PreviewModalNavigationFooter","isArrowLeftKeyPressed","isArrowRightKeyPressed","UploadETicketsDraggableOrigin","PreviewModal","TicketCard","ShowSearchPopover","NumberOfPages","GoToPreviousPage","GoToNextPage","CurrentPageInput","noop","UploadETicketsPreviewTicketModalBody","pageInfo","activeUniquePageId","pdfClassName","isSinglePageDocument","componentProps","onMouseEntersPage","onMouseLeavesPage","UploadETicketsPreviewTicketModal","previewModal","uploadETicketsStyles","ClearButton","MappedPageLabel","ticketInfo","MultiplePageDocumentPage","onRemoveMappedTicket","onPageClick","isDragElement","SinglePageDocumentPage","PageDragPreview","dragOrigin","itemType","getItemType","getClientOffset","isSingleDocumentPage","pointerEvents","background","MultipleDraggableDocumentPage","MultiplePageDocument","draggableMultiplePageDocumentProps","SingleDraggablePageDocument","UploadETicketsUploadingFile","UploadETicketsTicketsSection","removeTicketFromSeat","currentUploadedFileHashes","filesToUpload","dropFiles","ticketDocumentIndex","useOnElementResize","callback","resizeObserverEntries","setResizeObserverEntries","useLayoutEffect","useTimeoutFlag","msTimeout","hasTimedOut","setHasTimedOut","MappedSeat","seatInfo","onUnMapSeat","UnMappedSeat","highlightDrop","hasMappings","onClearAll","droppable","assignedTicket","ticketToUnassign","ticketIndexToUnassign","onWindowResize","watchedTickets","ticketsSectionPortalRef","hasRenderModalAnimation","firstPage","UploadETicketsSectionV2","UploadETicketsSectionSelector","withoutEmptyValues","isUniqueWithin","allValues","inclusive","expectedLength","filteredOutEmptyValues","checkDuplicateBarcodes","alreadyReportedUsedBarcodes","setAlreadyReportedUsedBarcodes","onDuplicateBarcode","onBeforeCheck","onAfterCheck","existingBarcodes","ticketId","checkBarcodeErrors","isBulkUpload","missingMsg","extraMsg","barcodesProvided","BulkUploadWrapper","InstructionsWrapper","BulkBarcodeInput","readOnly","onPreview","touchedFields","trimEnd","newBarcodes","idx","shouldTouch","barcodesError","SeatBarcodeInput","ticketBarcode","BarcodeInput","ManualBarcodeEntry","showErrors","setShowErrors","UploadBarcodesBody","isReadOnly","instructionContentId","bulkUpload","barcodesContentWrapper","UploadBarcodesForm","UploadBarcodesContent","onUpload","setReadOnly","barcodeAlreadyUsedWarning","UploadBarcodesSection","checkDuplicateExternalIds","alreadyReportedUsedExternalIds","setAlreadyReportedUsedExternalIds","onDuplicateExternalId","existingExternalIds","externalId","checkExternalIdErrors","externalIdsProvided","BulkExternalIdInput","newExternalIds","externalIdsError","BulkTicketUrlInput","newTicketUrls","ticketUrlsError","ManualExternalIdEntry","ticketExternalId","ExternalIdInput","SeatExternalIdInput","ManualTicketUrlEntry","ticketTicketUrl","TicketUrlInput","invalidUrlMsg","pattern","SeatTicketUrlInput","UploadExternalIdsBody","externalIdsContentWrapper","UploadExternalIdsForm","criteriaMode","UploadExternalIdsContent","externalIdAlreadyUsedWarning","UploadExternalIdsSection","checkDuplicateTicketUrls","alreadyReportedUsedTicketUrls","setAlreadyReportedUsedTicketUrls","onDuplicateTicketUrl","existingTicketUrls","checkTicketUrlErrors","ticketUrlsProvided","UploadTicketUrlsBody","ticketUrlsContentWrapper","UploadTicketUrlsForm","UploadTicketUrlsContent","ticketUrlAlreadyUsedWarning","UploadTicketUrlsSection","ticketGroupInput","PredeliverySection","SearchPurchasedEvents","ticketGroupFromPartialPurchase","searchTextPrefillForPartialPurchase","selectedEventIds","unselectedViagogoVirtualIds","newTicketGroups","startId","hasMultipleEventIds","firstEventId","PurchaseMultiTicketsFlow","avoidPrefill","ticketGroupFromPartialPurchaseOrder","eventSearchTextFromPartialPurchaseOrder","updatePredeliveryETicketArtifacts","EMPTY_EVENT_IDS","PurchaseMultiTicketsFlowBody","emailPreview","ticketGroupEditContext","eventRequiredMsg","hasUploadTicketFilesFlowV2","multiEventInputsDialog","singleInputModeForMultiEvent","setSingleInputModeForMultiEvent","isMultiEvent","curGroupIndex","setCurGroupIndex","groupsOfTicketGroup","noVenueCfgIdGroup","ticketGroupsMap","noCfgId","groupOfTicketGroups","noViagIdGroup","noViagId","startWithEventSearch","setShowPredeliverySection","curTicketGroups","ticketGroupsEventIds","currentFormTicketGroupIndex","newTgs","validateEventSelection","onPrevFromSearchEventsStep","onNextFromSearchEventsStep","tgs","isLastGroup","updatedTicketGroups","currTg","newTgsForEvent","newTgIndex","newTg","finalTgs","notUpdatedTgs","getFooterActions","finalTicketGroups","isPredeliverETicketsAction","predeliverETicketsDnd","overflowX","useGetEventFullInfo","activeEvent","cachedPerfomer","cachedVenue","SummaryWrapper","ListingInfoDisplay","entityInfoShareButtonIdNumberWrapper","entityText","getListingDetailsModalConfigWithDeepLink","useHasSaleDetailsMarketplaceTermsFeature","useUserHasSalePermission","useUserCanUpdateSale","useUserCanUpdateSaleTags","useUserCanFulfillSale","useUserCanViewFulfillmentArtifacts","canFulfill","CommentSection","commentNotes","cmt","PosPillVariant","Brand","LightGreen","Neutral","getVariantClassName","PosPill","getStateVariant","MarketplacePaymentStatePill","MARKETPLACE_SALE_PAYMENT_STATE_TO_CID","EMPTY_MARKETPLACE_PAYMENT_LINE","externalPaymentId","externalPaymentLineId","externalSaleId","isCredit","paymentLineType","receivedDate","MarketplacePaymentLineDialog","siteMarketplacePaymentLineInput","canSelectProceeds","disabledPaymentTypeInput","disabledAmountInput","isEditingPaymentLine","idOnMkp","paymentDateStr","isPrimaryPaymentLineType","MARKETPLACE_PAYMENT_LINE_TYPE_TO_CID","SetMarketplaceCharge","setMarketplaceActionsRef","setMarketplaceChargeDialog","currentMarketplacePaymentLine","setCurrentMarketplacePaymentLine","setCanSelectProceeds","marketplacePaymentLines","formMarketplacePaymentLineInput","updatedMktPaymentLines","mktPaymentLine","removeNewMarketplacePaymentLine","filteredMarketplacePaymentLines","addNewMarketplacePaymentLine","editNewMarketplacePaymentLine","marketplacePaymentLine","useGetMarketplacePaymentIdQueryParam","activeMarketplacePaymentId","DetailMessage","SolidIconContainer","useGetMarketplacePaymentById","PAYMENT_MONTHLY_CONTAINER_QUERY_KEY","PAYMENT_SINGLE_MONTH_QUERY_KEY","useGetMonthMarketplacePaymentsQuery","paymentsQuery","MarketplacePaymentDataContext","monthPaymentsQuery","useMarketplacePaymentDataContext","MarketplacePaymentDataContextProvider","GET_PAYMENT_LINES_WITH_SALES_QUERY_KEY","useGetMarketplacePaymentLinesWithSales","paymentLineQuery","useSingleMonthMarketplacePaymentsQuery","isExpanded","firstOfMonthPlainDateTime","PlainDateTime","lastOfMonthPlainDateTime","with","daysInMonth","hour","minute","second","millisecond","monthDateRange","filterDateStart","filterDateEnd","relativeDateStart","relativeDateEnd","singleMonthPaymentQuery","useGetCatalogBySaleIds","useGetMarketplacePaymentLineTableData","isLoadingMktPaymentLines","mktPaymentLinesError","marketplacePaymentData","isLoadingEventCatalog","eventCatalogError","viagEvId","AutomatiqLogo","marketplaceBackgroundAutomatiq","GoTicketsLogo","TicketEvolutionLogo","TicketNetworkLogo","logoAreaDimensions","logoDimensions","MarketplaceLogo","isViagogo","grayScaleColor","marketplaceEventInfo","dimensions","isInternationalEvent","onOpenInStubHubClicked","getStubhubEventWithPricingUrl","urlTemplate","urlEventId","eventIdOverride","mappedEventId","websiteEventId","MarketplacePaymentHeaderDetails","marketplaceSalePayment","hasSaleDetailsMarketplaceTermsFeature","extPmtId","pmtDate","mkpPmtTerm","MARKETPLACE_PAYMENT_TERM_TO_CID","mkp","MinRowsForUsingVirtuoso","PosEventsAccordionBodyHeight","DefaultBottomMargin","getVirtuosoTopListItemBounding","MIN_HEIGHT_FOR_VIRTUOSO_ACCORDION","useSetEventsAccordionMaxHeight","accordionHeaderRef","accordionBodyRef","eventsAccordionHeaderBounding","setEventsAccordionHeaderBounding","setStyle","eventAccordionHeaderBounding","expanded","virtuosoTopListItemBottom","eventsAccordionHeaderHeight","bodyMaxExpandedHeight","setProperty","bounding","headerClassName","PageSection","useSetTopListItemPosition","topItemListRef","virtuosoId","isScrollAtTop","virtuosoScrollY","virtuosoItemListSelector","updateVirtuosoListPaddingTop","topItemListEl","virtuosoItemListEl","offsetHeight","offsetTop","VirtuosoTopListItemWrapper","scrollY","topListItemBefore","EventListVirtuosoID","before","EventVirtualizedList","highlightedId","scrollToItemIndex","onItemsRendered","ItemComponent","getDividerText","eventSortOptions","tableActions","virtuosoRef","scrollRef","useScroll","groupCounts","dividerText","scrollToIndex","TopItemList","listItems","EventCheckbox","EventStatusToColor","StatusColor","EventStatus","eventStatusWrapper","eventStatusContent","eventColors","eventStateLabel","EVENT_STATUS_TO_CID","createInputPriceFocusContext","useInputPriceFocusContext","InputPriceFocusProvider","disabledFocusContexts","setDisabledFocusContexts","inputPriceFocusContext","setInputPriceFocusContext","onSetInputPriceFocusContext","useGetGroupingTitle","getMainDisplayFirstChar","getEventGroupingText","getDividerTextForSorting","EventItemCollapsible","HeaderComponent","BodyComponent","AfterHeaderComponent","usingVirtuoso","hasEventStatusDisplay","isAccordionOpen","hideBulkActions","eventStatus","EventsAccordion","getTableDividerText","MinScrollHeightToCollapse","collapsableRefProps","isCollapsedView","lastScrollState","CollapsableViewContext","setIsCollapsedView","onScroll","useCollapsableViewContext","CollapsableViewProvider","refProps","virtuosoScrollEvent","scrollState","lastScrollY","hasScrollDiff","isAtTop","useSingleTableShortcutSelection","isSideTable","inFullPageEventView","lastSelectedRowRefIndex","isCtrlKeyPressed","isCmdKeyPressed","isCtrlOrCmdKeyPressed","updateSelectionForRowAndSubRows","newIsSelected","newRowSelection","subRows","subRow","allowShiftClickSelection","ListingNotesDisplay","seatTraits","ListingDisplay","hideListingNotes","justifySeatingIconContent","listingGroup","hasIgnoreDupFeature","dupListingId","ignoreDup","getListingGroupItemCount","FAKE_SOLD_GROUP_ID","createFakeListingGroup","firstListingWithEvent","allListings","flat","insertBy","rowVer","ltGrpParentId","ltGrpActive","isFull","isDeleted","isUndeliv","viagEvMapId","maxDispQty","mkpListings","splitType","hideSeats","preDelivState","allInPrice","privNotes","poCreatedBys","CreateActiveSortTableColumnContext","setActiveSortTableColumn","useActiveSortTableColumnContext","ActiveSortTableColumnProvider","activeSortTableColumn","PurchasesTableColumnId","PaymentStatus","TotalPayment","TotalConvertedPayment","PaymentConversionRate","PurchaseTableColumnGroupId","SalesTableColumnId","QuantitySold","PaymentReferenceId","TotalPaymentsAmount","TotalConvertedPaymentsAmount","WastedQuantity","SalesTableFlattenedColumnId","SalesReportTableColumnId","MarketplaceSaleId","CommissionUser","CommissionPercent","CommissionShare","SalesReportTableGroupingColumnId","SaleStatusName","TicketTypeName","LastPaymentDate","FulfillerSellerUserId","MarketplacePaymentStateName","MarketplaceName","SalesReportTableValueColumnId","FORMAT_OPTION_TO_DISPLAY_MAP","generateFormatOptionDisplayString","localizedText","originalSeating","fullSeating","sectionOnly","fullEventInfo","shouldShowPercent","contentDisplayMap","currencyContent","displayContent","LISTING_TABLE_COLUMN_DEFAULT_PRECISION","LISTING_FLATTENED_TABLE_COLUMN_DEFAULT_PRECISION","SALE_TABLE_COLUMN_DEFAULT_PRECISION","SALE_FLATTENED_TABLE_COLUMN_DEFAULT_PRECISION","getDefaultFormatOption","isSeating","isEvent","isEnumWithIcon","PURCHASES_EVENT_TABLE_COLUMN_DEFAULT_PRECISION","SectionType","SalesReport","ListingsReport","ListingsFlattened","SalesFlattened","PurchaseEvent","SalesSideTable","InventorySideTable","PurchaseSideTable","MarketplacePaymentsTable","OnSaleEvents","SECTION_TYPE_TO_CUSTOM_COLUMN_SETTING","SECTION_TYPE_TO_PRECISION_SETTING","SECTION_TYPE_TO_COLUMN_EDITABILITY_SETTING","SECTION_TYPE_TO_ACTION_OUTBOX_ENTITY_TYPE","FormatOptionPillBase","onPointerDown","FormatOptionPillSelect","hasViewListingOriginalSeatingFeature","customColumns","columnConfig","getColumnConfigById","personalization","defaultFormatOption","selectedPrecision","setSelectedPrecision","addToOptions","formatOptions","standardOptions","FormatOptionPillContainer","flags","isSelectable","onPointerDownHandler","formatOptionPillBase","OnSaleEventsTableColumnId","RawPreSaleDate","ListingCount","UnitNetProceedsMin","UnitNetProceedsP25","UnitNetProceedsP50","VisitsLastHour","VisitsLastDay","VisitsLast3Days","VisitsLast7Days","TransactionsLastHour","TransactionsLastDay","TransactionsLast3Days","TransactionsLast7Days","Action","EventsTableColumnId","ListedAtp","EVENTS_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES","isConfigurable","isRequired","isHiddenByDefault","ON_SALE_EVENTS_TABLE_CUSTOM_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES","LISTING_MAIN_COLUMNS","LISTING_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES","requiredFeatures","isEditabilityConfigurable","LISTING_REPORT_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES","GROUP_BY_TO_PRIMARY_COLUMN_ID","NON_METRIC_LISTING_REPORT_TABLE_COLUMN_IDS","GROUP_BY_TO_VISIBLE_COLUMN_IDS","LISTING_TABLE_CUSTOM_COLUMN_PERSONALIZATION_CONFIG","MarketplacePaymentsTableColumnId","PAYMENTS_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES","PAYMENTS_TABLE_CUSTOM_COLUMN_PERSONALIZATION_CONFIG","PURCHASES_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES","visibleViewModes","PURCHASES_TABLE_CUSTOM_COLUMN_PERSONALIZATION_CONFIG","SALE_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES","SALE_REPORT_TABLE_COLUMN_PERSONALIZATION_CONFIG_OVERRIDES","NON_METRIC_SALES_REPORT_TABLE_COLUMN_IDS","getPersonalizationConfigOverrides","useColumnUserSetting","storedColumnNumberPrecisions","sectionSpecificDefaultPrecision","userDefinedPrecision","editableColumns","editable","isServerSetting","SEATING_SORTING_FN_NAME","listingSectionTypes","purchaseSectionTypes","salesSectionTypes","useSeatingColumnSorting","sortingWrapper","isSectionOnlyPrecision","seatingSortingFn","useSortListingTableSeatingColumn","hasSortListingsInGroupFeature","depth","FORMULA_DATA_ACCESSOR_PREFIX","fromExecutableFormula","executableFormula","editableFormula","tokens","parseExecutableFormula","identifier","toExecutableFormula","tokenizedFormula","FORMULA_OPERATORS_AND_NUMBERS_REGEXP_START","test","token","FORMULA_DISPLAY_ALLOWED_INSERT_CHARS","PLAIN_LITERAL_CHARSET_REGEXP","RegExp","parseExecutableFormulaV1","executableFormulaSliced","pos","posEnd","NULL_RETURN_STATEMENT_PLACEHOLDER","NULL_RETURN_STATEMENT_TEMPLATE","toNullReturnStatements","formula","statements","filterExecutableFormulaCharacters","filteredFormula","isInsideString","validateFormulaSingleStatement","transpiledCode","ts","parseEditableFormulaBase","returnFieldNameOnly","parsedTokenResult","editableFormulaSliced","leftPos","isPlainToken","rightPos","evaluateFormulaBase","nullReturnStatements","evaluator","eval","evaluate","tagKeyToFieldName","tagKey","editableFormulaToTokens","fieldOptionsReverse","matchingToken","LEFT_PARENTHESIS","RIGHT_PARENTHESIS","PLUS","MINUS","MULTIPLICATION","DIVISION","isOperator","isParenthesis","parseMathematicalTokenFromPlainToken","currentToken","evaluateMathematicalTokensAdditionSubtraction","tokenStack","previousToken","pop","nextToken","evaluateMathematicalTokensMultiplicationDivision","evaluateMathematicalTokens","tokensWithoutParentheses","poppedToken","tokensWithoutParenthesesTrimmed","getPersonalizationFlagsFromFormulaBase","mathTokens","mergedToken","parseMathematicalTokensFromFormulaBase","getTokenFromFieldName","tokenResult","parsedPlainTokens","ListingFormulaFields","availableQuantity","soldQuantity","ticketCount","soldCost","unsoldCost","soldProceeds","websiteFloor","websiteCeiling","listingToFormulaFields","tagFields","numericValue","procsFloor","procsCeil","getAllInPriceFromListPrice","compFloor","compCeil","FORMULA_FIELD_TO_COLUMN_ID","filterCustomColumnsForListing","tagsForEntityType","listingFormulaFields","LISTING_FORMULA_FIELDS_TO_CID","tagKeys","LISTING_FORMULA_TEST_DATA","findDependentListingTableColumnIds","fieldNames","evaluateFormula","createListingTestData","tagData","validateFormula","parseMathematicalTokensFromFormula","getPersonalizationFlagsFromFormula","ACTIVE_EVENT_IDS_QUERY_PARAM","ACTIVE_EVENT_IDS_2_QUERY_PARAM","TAB_EVENT_IDS_QUERY_PARAM","TAB_EVENT_IDS_2_QUERY_PARAM","TAB_EVENT_IDS_SEPARATOR","POS_EVENT_IDS_SEPARATOR","useCatchUpParams","activeEventIds","viagVirtualIds","activeViagVirtualId","posEventIdsList","eid","viagVirtualIdsList","numberOfEvents","selectedIndex","activePosEventIds","isCatchupMode","onPrevClick","onNextClick","EventSessionRole","Main","SidePanel","EventHubContext","hubConnection","onStartSession","onCancelSession","onSelectListing","onSectionsSelected","onUpdateListing","onUpdateInventoryTab","sessionRole","selectedListingId","selectedVenueMapSections","inventoryTab","useEventHubContext","EventHubContextProvider","hasEventMultiScreenFeature","setHubConnection","sessionId","setSelectedListingId","setInventoryTab","setSelectedVenueMapSections","Disconnected","Disconnecting","newHubConnection","HubConnectionBuilder","withUrl","withAutomaticReconnect","configureLogging","SignalRLogger","build","debug","connectionId","onclose","stop","invoke","onListingSelected","serverSessionId","onStopSession","onListingUpdated","fromRole","updated","onInventoryTabUpdated","onVenueMapSectionsUpdated","selectedSectionsJson","on","off","useManualPriceAdjustFloorOrCeilingDialog","manualPriceAdjustFloorOrCeilingTimestamp","ListingPricingForm","rowData","hasSectionalLoadDataFeature","hasAllowSeatScoreCompListingMode","createListingPricingInput","getListingDetailsUpdateInput","currentPageIndex","setPriceSettingValues","newForm","isSubmittingPricingSettings","compListingQuantityScoreAdjustmentEnabled","compListingQuantityScoreAdjustmentOverrideJson","compListingOnlyForSameZoneEnabled","compListingExcludeFanInventory","outlierMode","outlierStandardDeviations","outlierKthLowestLimit","outlierKthLowestLimitAbsoluteSpacing","outlierKthLowestLimitRelativeSpacing","circuitBreakerMinCompListingCount","circuitBreakerMaxDiscountVelocityPercent","circuitBreakerMaxDiscountVelocityTicksInHours","submitPriceChange","marketplacePriceUpdates","warningDialog","submitPricingSettingsChange","autoPriceFrequency","compListingQuantityFilters","compListingQuantityScoreAdjustmentOverrides","autoPricingDefaultQuantityFiltersJson","updatedListing","suspiciousPriceChangeHookProps","manualPriceDisableAutoPricingProps","manualPriceAdjustFloorCeilingProps","setAlerts","isAutoPrc","fieldEdited","newAlerts","isSuspiciousPriceChange","PosHotkeys","keyNames","onHotkeyActivated","preventDefaultBrowserActions","Hotkeys","keyName","MultiSelectAll","flattenedIdsOverride","flattenedIdsFromContext","isEnglishLanguage","selectedText","selectAllText","toggleGroupWithOverride","groupToggleState","selectAllTextHighlighted","bulKActionsHighlightLetter","checkboxStyles","AutoPriceResultDisplay","resultType","useWarningIcon","autoPricingResultStateContent","AUTO_PRICING_RESULT_TYPES_OPTIONS_TO_CID","contentText","autoPricingResultColor","AUTO_PRICING_RESULT_TYPES_OPTIONS_TO_COLOR","CheckCircleIcon","DeliveryTypeIconWrapper","addCheckIcon","DeliveryTypeTextWrapper","ListingDeliveryTypeDisplay","hasTicketTypeIconOverlay","strDeliveryTypes","shouldAddCheckIcon","CopyIcon2","SHOW_COPIED_ICON_TIME","CopyToClipboardV2","textToCopy","showingCopiedElement","setShowingCopiedElement","timeoutId","copyToClipboardDisplay","copyContentWrapper","hidden","successText","copyIcon","copyIconHover","showCopyIcon","useAllInPriceFromListPrice","stubHubMkpSettings","CustomColumnName","customColumnName","INVENTORY_BULK_UPDATE_LISTING_PRICES_UPDATE_KEY","INVENTORY_BULK_UPDATE_MARKETPLACE_PRICES_UPDATE_KEY","INVENTORY_BULK_UPDATE_PRICE_FLOOR_CEILING_UPDATE_KEY","INVENTORY_BULK_UPDATE_AUTOPRICING_SETTINGS_UPDATE_KEY","INVENTORY_BULK_UPDATE_LISTING_GROUP_SETTINGS_UPDATE_KEY","INVENTORY_BULK_UPDATE_GENERAL_SETTINGS_UPDATE_KEY","INVENTORY_BULK_UPDATE_ADMIN_HOLD_UPDATE_KEY","INVENTORY_BULK_BROADCAST_LISTINGS_KEY","INVENTORY_BULK_UPDATE_MARKETPLACE_SEATING_UPDATE_KEY","INVENTORY_BULK_UPDATE_COMMISSION_UPDATE_KEY","INVENTORY_BULK_UPDATE_TAGS_UPDATE_KEY","INVENTORY_BULK_UPDATE_INTERNAL_NOTES_UPDATE_KEY","INVENTORY_BULK_UPDATE_AUTOFULFILL_UPDATE_KEY","INVENTORY_BULK_CREATE_LISTING_GROUPS_KEY","INVENTORY_BULK_UPDATE_TICKET_TYPE_RULE_UPDATE_KEY","INVENTORY_BULK_UPDATE_DELIVERY_TYPE_UPDATE_KEY","INVENTORY_BULK_UPDATE_SEAT_TRAITS_UPDATE_KEY","INVENTORY_BULK_DELETE_SEAT_SAVERS_UPDATE_KEY","INVENTORY_BULK_REMOVE_PREDELIVERY_UPDATE_KEY","INVENTORY_BULK_UNGROUP_LISTINGS_UPDATE_KEY","INVENTORY_BULK_WASTE_TICKETS_KEY","OpenStubhubDropdownAction","DeliveryTypeRadioInput","hideCustomType","DatePickerPresets","DateSelector","defaultDate","defaultDateDisplayText","onDatePickerChange","selectorStyles","InHandDateInput","allowEmptySelection","customPresetNames","sellerAccountSettings","getDaysBeforeEvent","inputIndeces","hasSelectDeliveryStrategyInSeatSaverFeature","deliveryTypeField","deliveryTypeError","inHandDateField","inHandDateError","tktTypeRulesField","onDeliveryTypeChange","newDelType","onticketTypeRulesChange","newTicketTypeRules","onInHandDateChange","FormPage.Section","ListingSection","autoBroadcastCreatedListing","sellerOwnTickets","VenueRowInput","chooseRow","VenueSectionInput","selectionSelectorStyle","tableHeaderContent","eventListingConstraints","ticketClasses","stubHubMarketplace","mps","removeSection","curSections","seatings","newSections","selectWorstRow","exclude","idsToExclude","seatSaverSections","onAddSection","inputToDisplay","seatingsError","rowSorted","selectedTicketClassIds","onSectionChange","seatIndex","onQuantityChange","maxDisplayQuantity","onMaxQuantityChange","onListingNotesChange","onUnitNetProceedsChange","onWebsitePriceChange","getListPriceFromAllinPrice","onFaceValueChange","vs","inf","textBrandActive","seatingSection","headerCellContentId","gridHeader","sectionError","rowError","quantityError","proceedsError","websiteError","column0","unitNetProceeds","websitePrice","removeButton","addSectionButton","SeatSaverInput","viagogoEventIds","SeatSaverListingWizardBody","curEventGroupIndex","setCurEventGroupIndex","shouldGroupEventsByVenueId","setShouldGroupEventsByVenueId","showEventSearch","setShowEventSearch","setSelectedEvents","selectedVenues","setSelectedVenues","selectedPerformers","setSelectedPerformer","eventsGroups","eventsWithNoVenueConfig","eventsWithVenueConfig","eventsGroupByVenueConfigs","curList","formHasChanges","onEventSummaryClose","changedEvents","newEvents","unchangedEvents","selectedEvent","changedEvent","venChanged","perfChanged","onNextFromEventSearch","curInputs","newInputs","ci","SeatSaverListingWizard","LaunchAddSeatSaver","hasPermission","hasSeatSaverFeature","addSeatSaver","onToggleComapnionMode","clusterListingIds","sortedListingIds","clusterListingMergeSuggestionsByListingIdOverlap","mergeSuggestions","mergeSuggestionsByEventId","mergedSuggestions","suggestions","mergedSuggestion","useGetListingMergeSuggestionsByEvent","mergeSuggestionsQuery","MainLabel","useMergeGroupedListingDialog","mergedGroupListingTimestamp","MergeListingsSuggestionsDisplay","onMergeSuggestions","onMerge","listingsSelected","mergeSuggestionsGroupListingHookProps","onMergeHandler","MergeListingsBody","hasDefaultNotToMergeHoldListingsFeature","setExcludeHeldListings","hasAdminHoldListings","eligibleListings","eligible","ineligibilityCount","setIneligibilityCount","onListingIdsSelected","sectionDifMsg","rowDifMsg","deliveryDifMsg","groupedListingMsg","mismatchListingMsg","getListingIneiligibleReason","firstListing","getListingNotEligibleForSelection","selectedListings","listingsWithIneligibleReasons","ineligibleReason","newIneligibilityCount","mergeMismatchListingWarning","mergeSuggestionsListingIds","flattenedEligibleListings","useMergeGroupedListingAlertDialog","mergeGroupedListingHookProps","formData","AlertDialog","MergeListingsModal","MergeListingsModalContent","needToMergeTwoOrMoreListingsError","closeModalAfterMerge","formDataListingId","useGetListingMergeSuggestions","isEqualIgnoringOrder","MergeSuggestionsDisplay","listingCount","onSelectedChange","listingGroupMap","MergeSuggestionListingItem","hasShowSeatTraitOnMergeFeature","EventMergeSuggestionsAccordion","eventWithMergeSuggestion","onSuggestionsSelectedChange","selectedListingIds","partialSelected","mergeText","mergesText","flattenedListings","ms","lid","BulkMergeListingsModal","listingIdLists","BulkMergeListingsModalContent","mergeSuggestionsIsLoading","deselectAllText","eventsWithMergeSuggestions","viagogoEventIdsWithMergeSuggestions","listingIdsSet","allListingIds","mergeSuggestionCount","onSingleSuggestionSelectedChange","onEventSuggestionsSelectedChange","isEventPartialSelected","isEventSelected","eventAccordionProps","interimResult","hasSuggestions","LaunchMergeListings","InventoryEventActionDropdown","isEventPage","extraDropdownItems","hasUpdateListingInfoPermission","useBulkBroadcastActionsPermission","hasBroadcastPermission","hasSellerAccountAdminPermission","LaunchGroupListings","slideLeft","groupListings","InventoryGlobalActionDropdown","useListingGroupPricingSettings","listingGroupPricingSettings","resetListingPricingSettingsMutation","mergeListingGroupPricingSettingsMutation","onMergeListingGroupPricingSettings","onResetListingPricingSettings","loaded","useEventMarketplaceSettings","isUKEvent","eventMarketplaceSettings","mk","defaultListingMarketplaceSettings","marketplaceId","listingBroadcastStateId","SummaryRow","SummaryColumn","SummaryDateSection","SummaryDetailsSection","MarketPlaceDetailsWrapper","SummaryMainText","SummaryMainTextPinkAccent","VenueConfigSummary","eventSelected","eventsText","cachedPerformer","Handle","Slider","renderHandle","RadixSlider.Root","RadixSlider.Track","RadixSlider.Range","RadixSlider.Thumb","ToggleGroup","itemStyle","itemClassName","itemTransparent","rovingFocus","ToggleGroupRadix.Root","ToggleGroupRadix.Item","RestrictSelectionType","useAvailableAutopricingModes","fluent","hasSeatScores","hasParentListing","isGlobalEdit","deriveCompsFromVenueZoneConfig","hasAdvanceAutopricingModes","hasParentListingModeFeature","restrictSelectionTypes","RESTRICT_SELECTION_TYPE_TO_CID","defaultRestrictSelectionType","compListingModes","COMP_LISTING_MODE_TO_FLUENT_CID","COMP_LISTING_MODE_TO_CID","undercutModes","UNDERCUT_MODE_TO_FLUENT_CID","UNDERCUT_MODE_TO_CID","outlierModes","OUTLIER_MODE_TO_CID","compListingModesDisabled","undercutModesDisabled","outlierModesDisabled","useGetAccountAutoPricingSettings","mapToSelectedSectionSettings","sectionIdFilterFromZoneMap","includeBetterZones","useListingGroupAutoPricingSettings","setFormValue","hasAllowSeatScoreCompListingModeFeature","defaultCompListingMode","updateInput","resetListingAutoPricingSettings","compListingFloorError","compListingSelectedSectionError","undercutAbsoluteAmountError","undercutRelativeAmountError","compListingExcludeDefects","circuitBreakerRelativeCeiling","circuitBreakerRelativeFloor","eventPricingSettings","accountPricingSettings","onResetSettings","onResetAdvanceSettings","circuitBreakerSettings","undercutSettings","compListingSettings","outlierSettings","onUndercutChange","undercutModeNew","undercutAbsoluteAmountNew","undercutRelativeAmountNew","onCompListingChange","compListingModeNew","compListingFloorNew","compListingCeilingNew","compListingOnlyForSameZoneEnabledNew","compListingOnlyForSelectedSectionsEnabledNew","compListingQuantityScoreAdjustmentEnabledNew","compListingExcludeFanInventoryNew","compListingExcludeDefectsNew","compListingQuantityScoreAdjustmentOverrideJsonNew","compListingSelectedSectionSettingsNew","sanitizedCompListingOnlyForSameZoneEnabledNew","sanitizedCompListingOnlyForSelectedSectionsEnabledNew","onCircuitBreakerChange","circuitBreakerRelativeCeilingNew","circuitBreakerRelativeFloorNew","circuitBreakerMaxDiscountVelocityPercentNew","circuitBreakerMaxDiscountVelocityTicksInHoursNew","circuitBreakerMinCompListingCountNew","onOutlierChange","outlierModeNew","outlierStandardDeviationsNew","outlierKthLowestLimitNew","outlierKthLowestLimitRelativeSpacingNew","outlierKthLowestLimitAbsoluteSpacingNew","setAutoPricingDefaults","applySectionRowFilterCompListingChanges","newSectionIdFilter","onCompListingSectionIdFilterChange","newRowIdFilter","rowIdFilter","newSectionRowIdFilter","sectionRowIdFilter","rowIds","omitted","updatedSectionRowIdFilter","newRowId","onCompListingSectionZoneChange","sectionIdsToRemove","rowIdsToRemove","rowIdsToRemoveSet","listingForm","pricingSettingsInputs","setResetListingAutoPricingSettings","onCompListingModeChange","canAutoPrice","AdvancePricingSettings","outlierKthLowestStrategy","setKthLowestOutlierStrategy","activeConfigOverride","hasExcludeFanInventoryFeature","hasExcludeDefectsFeature","gridColumn","Slider.Root","STANDARD_DEVIATIONS_TO_CID","kthLowestInputField","inputInline","ROW_FILTER_MISSING","PENCIL_CHAR","RowIdFilterDropdown","focusedSectionIds","rowIdNum","FilterPillList","rowIdFilters","sectionRowIdFilters","applyRowFilterChanges","applySelectedSectionChanges","focusedSections","setFocusedSections","keysPressed","setKeysPressed","backfilledSections","sectionToScoredRows","rowOrdinal","tkClsId","isManualOverride","sanitized","venueRows","scoredRow","updateRowFilters","rowFilter","newRowIdFilters","newSectionRowIdFilters","matchingRow","sectionRowIds","sectionsMissingRowFilter","keyPressTimeout","ignoreElements","activeElement","prevKeys","updatedKeys","pillId","prevFocusedSections","newPill","filterSectionsPills","rowLookup","rowInfo","isFocusedPill","numeric","sensitivity","useUserHasListingPermission","useUserCanUpdateListing","useUserCanSetPrice","useUserCanUpdateListingTags","useUserCanBroadcast","useUserCanPredeliver","useUserCanViewPredelivery","canPredeliver","useUserCanSetDeliveryStrategy","useHasListingPricePermissions","isBulkEdit","canSetPrice","useListingAutoPricingSettings","hasDefaultFilterRowsFeature","skipAutoPricing","skipAdvancePricing","skipPriceProtection","groupPricingSettings","proposedFloor","MAX_SAFE_INTEGER","listingSeating","listingRow","flipOnSameSections","onSelectedSectionsChange","selectedRowIds","pickBy","showAutoPricingSettings","SectionFilterRowNudger","handleNudgeRow","isUp","sid","rid","nextOrdinal","nextRow","handleNudgeUp","handleNudgeDown","AutoPricingSectionRowIdFilter","hasSimplifiedPricingV2Feature","formSectionFilterIds","applyCompListingChanges","disabledSectionIds","info","isSectionDisabled","backgroundBrandSeatmap","onShiftSelect","selectedClassId","head","classSections","classSectionIds","onSingleSelect","selectedSectionsNew","onSectionSelected","SectionSelectDialog","initialSectionIds","selectedSectionsMutations","initialSections","useCompQuantitiesFilter","compQuantityScoreOverrideJson","parsedQuantityOverridesJson","quantitiesFilterOptions","getCompQuantitiesOptions","quantitiesFilterValue","selectedQuantities","onUpdateQuantitiesFilter","quantityOverrideJsonNew","useUndercutAmountSettings","undercutAbsoluteAmountMode","setUndercutAbsoluteAmountMode","undercutRelativeAmountMode","setUndercutRelativeAmountMode","newUAMode","newRAMode","AutoPricingSettingsSection","sectionSelectDialog","quantityFilter","restrictSelection","showCompListingSettingsDetails","showCompListingRestictSelectionDetails","selectedSectionsPills","isDealScoreMode","CoreSwitch","Slider.Handle","paddingRight","curAmountAbs","relativeValue","AutoPricingSettings","useAutoPricingSettingsFormContext","onOutlierSettingsChange","AutoPricingCompFloorAndCeilingInput","nullableCompListingFloor","nullableLCompListingCeiling","AutoPricingCompListingModeSelector","allowSeatScoreCompListingMode","hideWhenOnlyComparableZonesModeIsAvailable","setIsOnlyComparableZonesModeAvailable","initialCompListingMode","initialModeContentId","useSelector","quantitiesOptions","AutoPricingCompQuantitiesSelector","rootStyle","derivedCompListingQuantityFilters","selectedQuantitiesValues","selectedQuantitiesInts","handleOnChange","compListingQuantityFiltersNew","AutoPricingOutlierDetectionModeSelector","AutoPricingOutlierDetectionSettingsInput","KthLowestOutlierDetectionSettingsInput","StandardDeviationOutlierDetectionSettingsInput","useAutoPricingSettingsSelectedSections","venueMapSections","onRowIdFiltersChange","onSectionIdFiltersChange","setCompListingSelectedSectionSettings","AutoPricingSelectedSectionSettingsInput","AutoPricingUnderCutRelativeAndAbsoluteAmountsInput","onUnderCutChange","absUnderCutRelativeAmountNew","currentUnderCutRelativeAmountMode","absUnderCutAbsoluteAmountNew","currentUnderCutAbsoluteAmountMode","underCutRelativeAmountNew","underCutAbsoluteAmountNew","AutoPricingUnderCutRelativeAmountInput","undercutRelativeAmountModeNew","absUndercutRelativeAmountNew","AutoPricingUnderCutAbsoluteAmountInput","undercutAbsoluteAmountModeNew","absUndercutAbsoluteAmountNew","AutoPricingSettingsFormContent","hideCompListingQuantityFilters","hideUnderCutAmountInput","hideBaseAdvancedSettingElements","autoPricingSectionChildren","priceAgainstSectionChildren","pricingProtectionSectionChildren","advancedSettingsSectionChildren","AdvancedSettingsSection","PriceAgainstSection","isOnlyComparableZonesModeAvailable","PricingSetting","headerStyle","ListingGroupAutoPricingSettingsFormContent","outerWatch","outerSetValue","innerMethods","innerWatch","pricingSettingsInputsNew","ListingGroupAutoPricingSettingsFormContentWrapper","MarketplaceDisplay","marketplaceActive","onListingBroadcastToggle","alwaysShowAsDelisted","iconComponent","ListingBroadcastIcon","getListingBroadcastIcon","listingStatusCell","SimpleTable.Tr","SimpleTable.Td","getMarketplaceIdFromMarketplace","mp","mergeListingMarketplaceSettings","marketplace1","marketplace2","mergeWith","setting1","setting2","ListingGroupMarketplaceBroadcast","mergeListingGroupInputs","isBroadcasting","copied","mergedSettings","marketplacesSelected","includedIds","marketplaceToStateId","marketplaceToId","SimpleTable.Table","SimpleTable.Thead","SimpleTable.Th","SimpleTable.Tbody","GroupTemplateTable","template","onTemplateChange","allowDelete","assignNewPriority","newPriority","indexOfExisting","indexOfItem","renderHeaderContent","renderRowContent","newPriorityString","templateSeatingsData","main","SimpleTable","TableHead","TableBody","TableRow","SeatingSelectionTable","uniqueSeatings","groupTemplates","randomizePriority","noneStr","newGroupName","availableGroups","getGroupedListings","listingGroupsMap","updateGroupedListings","localGroupBy","newTemplates","onGroupingTypeChange","newGroupType","newNumOfClusters","gts","newGroupId","oldGroup","gt","GroupingTemplates","onGroupTemplateChange","onAddNewGroupTemplate","groupTemplateData","g1","g2","EmptySectionContent.Root","IconBulletList","grt","ShuffleIcon","AllowedSortingColumns","groupPrioritySort","idToSortingCriteria","quantityA","quantityB","deprioritizedA","deprioritizedB","groupColumnSort","newSorting","sortBySection","sortByRow","sortByUnsoldQty","unsoldA","unsoldB","desc","rowOrdinalA","rowOrdinalB","useGroupSortingCriteria","useMergeListingGroupInputForm","eventSettings","listingsInGroupInput","listingGroupNameError","onDeleteGroup","onSetValues","onRegister","useGroupItemTableOperations","sorted","enforedListings","onRandomizeRanks","sortedListings","removeListingFromInput","lx","onUpdateDeprioritizedQuantities","filteredItems","DeliveryTypeCell","dummySortingFn","getListingGroupTableConfig","deleteText","ListingGroupInputTable","hasUndercutByRankListingGroupFeature","getRowCanExpand","getSubRows","getExpandedRowModel","paginateExpandedRows","ListingGroupInput","mergeListingGroupInputIndex","hasGroupingDripFeature","inferredDeprioritizedQuantities","setUndercutAmount","undercutSetting","itemsSize","listingsInGroupMap","ltGrpUndercut","newValues","GroupingBucketOptions","setBucketOption","shouldShowBucketsOption","onBucketOptionChange","BUCKET_OPTIONS_TO_CID","prioritySort","criteriaA","criteriaB","matchesA","matchesB","ListingTableForGroups","eventIndex","hasBulkActionGroupListingsFeature","eventListings","hasListingGroupingMethodsFeature","eventMergeListingGroupInputs","availableGroupsSerialized","availableGroupsMemo","templateUndercutAbsoluteAmount","templateUndercutRelativeAmount","templateMinActiveListings","templateMaxActiveListings","templateTargetPercentage","onSortingListing","overrideQuantities","additionalInput","listingIdsToRemove","quantities","updatedListingGroupItems","gl","allSelectedListings","oldGroupIndex","mappedListings","groupingOrder","groupingValue","numberOfBucket","bucketType","groupingName","localGroupBys","nonEventGroupInputs","groupByIndex","newBucketOption","newGroupBys","gb","newMlgis","onResetAllGroups","otherGroups","renderGroupDripTemplate","eventListingsData","prevI","flattendListings","fl","TemplateTabKey","EventGroupings","onEventSelected","containerHeight","onAddNewGroup","groupingInputs","useFullySoldFilter","excludeFullySold","setExcludeFullySold","hasExcludeFullySoldInGroupFeature","fullySoldListingIds","hasFullySoldListings","sanitizedEvents","onToggleExcludeFullySold","clonedInputs","showExcludeFullySold","GroupListingsBody","GroupListingsModal","gi","absoluteRankPremium","relativeRankPremium","templateSettings","GroupListingsModalContent","hasIntelligibleAutoPricingSettingsFeature","updateExpandedListItems","hasAutoPricingGroupSettingsFeature","eventTabSelected","setEventTabSelected","GroupListingsTab","sev","formIsDone","setFormIsDone","inputFormData","updatedListings","filteredListingGroupInputs","groupInput","eventGroupingMethodsList","eventGroupingMethods","validateForErrors","applyTemplateConfirmDialog","applyThenSubmit","setApplyThenSubmit","isApplyingTemplate","setIsApplyingTemplate","onApplyTemplateToGroupings","prompt","seatingsMap","sectionRowKeys","rowIdKeys","newGroups","listingsInGroup","listingInputs","AddToGroupListingsModal","newListingGroupName","listingsToAdd","ListingGroupActions","isUngrouping","setIsUngrouping","ungroupConfirmDialog","onUngroupListings","ungroupedListings","ListingGroupStatusSummary","NotTableActionTypes","BroadcastActionTypes","ListingActionsCell","linkOnly","actionIsLoading","setActionIsLoading","allDisabled","ActionCellForListing","onViewClick","newTab","getListingDetailsDeepLinkUrl","getListingDetailsRelativeUrl","lockListingGroupFromEdits","lock","getListingGroupForListing","isLockedFromEdits","onSetListingActiveInGroup","getListingActionButtons","AllowedMarkeplaces","ActionCellForListingGroup","broadcastStatuses","MarketplaceStyleMap","reverseColor","MarketplaceActionCellForListingGroup","contentDelisted","contentListed","MarketplaceDot","DateCell","formattedDate","InHandDateDisplay","needsToFulfill","handleFulfillmentState","inhand","dateLocal","UTC","getSeconds","displayTooltip","alertIcon","getInHandDisplayData","inhandDateContainer","InHandCell","SHIMMERING_DIV_HEIGHT_SINGLE_LISTING","SHIMMERING_DIV_HEIGHT_LISTING_GROUP","useListingHasVenueMapInfo","hasAutoPricingUiGateFeature","hasVenueMapInfo","overrideSection","mapExists","AutoPricingToggleCell","AutoPricingToggleCellContent","listingSelection","isSubmittingRowIndex","isSubmittingPrice","fieldValue","fieldIsSubmitting","fieldHasChanged","submit","CompListingBoundsCell","formattedNumber","isSelectionMode","saveMsg","isAutoPricingDisabled","isCompListingAmountDisabled","PERSONALIZATION_DEFAULTS","EVENTS_TABLE_CUSTOM_COLUMN_PERSONALIZATION_CONFIG","LISTING_METRIC_TEST_DATA","liftPerc","listedATP","rvn","atp","mapFormulaFields","actualStr","expectedStr","liftPercentage","listedAtp","revenue","totalAtp","totalListedValue","totalSoldCost","findDependentEventsTableColumnIds","isCustomEventsColumn","filterCustomColumnsForListingReport","LISTING_REPORT_FORMULA_FIELDS_TO_CID","listingReportMetricsToFormulaFields","ttlWebPrc","soldProcs","listingReportMetrics","SALE_TABLE_CUSTOM_COLUMN_PERSONALIZATION_CONFIG","filterCustomColumnsForSale","saleFormulaFields","SALE_FORMULA_FIELDS_TO_CID","mapListingFormulaFields","ttlNetProcs","quantitySold","charges","credits","soldTicketCost","soldTktCost","evaluateFormulaSaleMetrics","chargs","creds","SALE_FORMULA_TEST_DATA","createSaleTestData","findDependentSaleTableColumnIds","getColumnPersonalization","matchingCustomColumn","matchingTag","personalizationDefaults","customColumnPersonalizationConfig","personalizationOverride","getPersonalizationFlagsFromFormulaListings","getPersonalizationFlagsFromFormulaListingsReport","getPersonalizationFlagsFromFormulaSales","ON_SALE_EVENTS_TABLE_COLUMNS_CONFIG","getPersonalizationFlagsFromFormulaEvents","personalizationFromMathToken","CustomNumericCell","hide","shimmeringDivHeight","TableCellDivV1","ListingPriceCell","otherField","onFocus","nextEditableListingId","price","otherPrice","priceIsSubmitting","priceHasChanged","findNextFocusIndex","newRowIndex","nextRowIndex","nextPageIndex","inputIsFocus","ctxEventId","ctxRowIndex","priceField","onBroadcastClick","onPriceFieldChange","handlePriceSubmit","select","scrollIntoView","behavior","block","inline","ListingProceedsFloorCell","isAllInPrice","cancelMsg","sanitizedValue","sanitizedPrice","PricingModeCell","pricingMode","DisplayIcon","modeContentId","modeContent","setIsExpanded","isPricingModeDisabled","canEdit","PricingModeCellContent","inheritText","inheritCompListingMode","inheritUndercutMode","compListingOptions","unshift","undercutOptions","CircuitBreakerMinCompListingCountCell","submittingField","isSubmittingField","onUpdateMinCoumpListingCount","CircuitBreakerVelocityCell","onUpdateVelocity","CircuitBreakerVelocityHoursCell","CompListingExcludeFanInventoryCell","onToggleExcludeFanInventory","CompListingMinQuantityCell","quantityFilterValue","safeParseJson","onMinQuantityUpdate","defaultQuantityOverridesJson","DefaultQuantityFilterOption","getMinQuantityOptions","OutlierModeCell","OutlierModeCellContent","onUpdateOutlierMode","OutlierFilteringCell","onUpdateOutlierFilter","OutlierLimitCell","onUpdateOutlierLimit","OutlierSpacingCell","setOutlierKthLowestStrategy","hasChange","onUpdateOutlierSpacing","UndercutAmountCell","isPremium","undercutAmountMode","setUndercutAmountMode","isUnderCutAmountDisabled","SECTION_TYPE","GroupListingsSortableFields","findParentRow","groupSortingWrapper","desiredSortingFn","hasGroupListingsSortingFeature","tagColumnDef","canSortGroup","loadedBySection","enableColumnFilter","dataIsLoaded","basic","customColumnDef","storedInventoryColumnNumberPrecisions","getListingTableColumnConfigs","hasGroup","hasCleanupWhiteSpaceFeature","showSelectAllCheckbox","enableResizing","getIsSelected","getCanSelectSubRows","getCanSelect","getIsAllSubRowsSelected","canSelect","selectionDisabledReason","ticketClassColor","LISTING_TABLE_COLUMN_ID_TO_CONTENT_ID","seatingText","isSectionOnly","filterFn","uniqueValueVariant","getCanExpand","getIsExpanded","toggleExpanded","cellId","hasSeatTraitsColumnFeature","useDroppable","listingGroupPriority","draggable","useDraggable","currentListingGroupId","dndProps","ltGroupName","node","isListingGroupLeader","adjustedListing","canExpand","titleText","manMaxDispQty","datetime","displayPrecision","nextEditableListing","getAllInPriceFromListPriceForListing","allInCeilingPrice","undMode","UndercutModeIcon","undNewPrice","allInMarketPrice","compMode","CompListingModeIcon","compQtyScrAdjJson","compExclFanInv","outMode","outlStdDev","outKthLowestLim","outKthLowestLimAbsSpc","cirBrMinCompCount","columnFilterVariant","autoPrcResult","lastPrcUpdOn","displayNamesFormatted","wastedQty","aQuantity","bQuantity","parentId","getParentRows","parentRows","rowsById","formatOptionOverrides","pr","poOrderId","wordBreak","poVendAccEmail","mkpVis","ListingTable","ungroupedListingCount","listingGroupCount","defaultSelectionMode","onItemSelectionsChanged","hideUnselectableListings","showUnselectableListingsOnly","showMainColumnsOnly","onVirtuosoTableScroll","getListingTicketClassColor","tableWithOuterPadding","useTableNavKeys","alwaysShowCheckbox","showSelectAllOnHeader","enableColumnFilters","listingText","isItemsLoading","hasSectionalLoadInListingTableFeature","hasTablePinActionColumnFeature","hasReorderListingInGroupFeature","selectionModeOverride","soldGroupName","isGroupSoldListingsEnabled","expandedState","setExpandedState","listingsMapped","ungroupedSoldListings","fakeListingGroup","storedInventoryColumnOrderSetting","defaultListingColumnsConfig","storedInventoryColumnsEnabledSetting","customListingColumns","customListingColumnsFiltered","allColumnConfigs","showCheckbox","displayedColumnsConfig","inventoryColumnOrder","getListingColumnConfigById","hasFeatureForColumn","filterColumnsByFeatures","onRowShiftSelect","seatingColumnSorting","columnPinning","onExpandedChange","_a","autoResetExpanded","enableRowSelection","enableMultiRowSelection","enableSubRowSelection","onRowWrapper","draggingListing","setDraggingListing","listingsToDrop","onDragListingStart","activeListing","onDragListingEnd","fromListingGroupId","toListingGroupId","activeListingId","onDropCompleted","targetListingGroup","allGroups","fromPriority","toPriority","fromPosition","toPosition","sanitizedListings","adminHoldExpiredOn","onRowSelect","onFilteredRowsChange","filteredItemIds","pointerSensor","useSensor","PointerSensor","activationConstraint","sensors","useSensors","inventoryEventDetailsTableCollapsed","listingTableNoVirtuosoWrapper","shiftSelect","LISTING_TABLE_FLATTENED_COLUMNS_CONFIG","Cell","storedInventoryFlattenedColumnNumberPrecisions","customPrecision","tableStyles","ListingTableFlattened","columnVisibilityOverride","disableSelection","hasNoDataLoad","storedInventoryFlattenedColumnOrderSetting","defaultListingFlattenedColumnsConfig","listingTableColumnConfigs","listingTableFlattenedColumnConfigs","columnConfig1","columnConfig2","TileWrapper","TileWrapperIndented","TileHeader","TileLeftLayout","TileRightLayout","ListingTilesContainer","DetailLabel","DetailValue","DetailUnitCostValue","TextAlign","Left","Right","ListingTile","indentLevel","subListings","isInputFocused","setIsInputFocused","toggleListingSelection","listingIdsToggled","lId","broadcastActions","otherActions","TileWrapperDiv","subListing","ListingTiles","tile","InventoryEventsBody","hasVirtuosoMinRows","MultiSelectCloseButton","MultiSelectActionBar","showHideOnSelection","isHidden","bulkActionsText","multiSelectAll","rootMobile","childrenWrapperMobile","rootDesktop","groupStyle","MultiSelectActionsContainer","useBulkActionsState","areBulkActionsEnabled","AddAdminHoldInput","onAdminHoldExpirationDateChange","onAdminHoldNotesChange","setTime","BulkAddListingAdminHoldDialog","setAdminHoldExpirationDate","setAdminHoldNotes","LaunchAddHold","useBulkAddHoldAction","openBulkAddListingAdminHold","closeBulkAddListingAdminHold","onSubmitAddHold","addHold","BulkEditBroadcastSettingsDialog","marketplaceBroadcastSelectionMode","marketplacesActive","setMarketplacesSelected","marketplacesToBroadcast","setMarketplacesToBroadcast","marketplacesToUnbroadcast","useBulkEditBroadcastSettingsAction","bulkBroadcastListingsKey","openBulkEditBroadcastSettingsDialog","closeBulkEditBroadcastSettingsDialog","openBulkEditUnbroadcastSettingsDialog","closeBulkEditUnbroadcastSettingsDialog","onSubmitEditBroadcastSettings","affectedListings","openBulkEditBroadcastSettingsDialogWithEvent","openBulkEditUnbroadcastSettingsDialogWithEvent","onBroadcastAllClick","onUnbroadcastAllClick","BulkRemoveAdminHoldDialog","LaunchRemoveHold","useBulkRemoveHoldAction","openBulkRemoveHoldDialog","closeBulkRemoveHoldDialog","removeHold","BulkUngroupListingsDialog","LaunchUngroupListings","useBulkUngroupListings","openBulkUngroupListingsDialog","closeBulkUngroupListingsDialog","BroadcastActions","bulkAddHold","bulkRemoveHold","bulkEditBroadcastSettings","BulkEditAdvancePricingSettings","BulkEditAutoPricingSettingsSection","BulkEditListingGroupSettingsMarketplaceBroadcast","BulkEditListingGroupSettingsDialogBody","BulkEditListingGroupSettingsInput","dontChangePlaceholder","getDefaultFormValues","rankPremiums","BulkEditListingGroupSettingsDialog","BulkEditListingGroupSettingsDialogContent","LaunchBulkEditListingGroupSettings","onlyListingGroupsSelected","useBulkEditListingGroupSettings","eventCurrency","selectedListingGroups","selectedListingGroupIds","openBulkEditDialog","closeBulkEditDialog","listingGroupListingIds","payload","autoPricingInputs","AddSectionGroupDialog","setFormValues","zone","area","PosDropdownAnimated","PosDropdownAnimatedItem","useAutoCompMapSectionHandler","onLaunchingDialog","setSectionSelected","setSelectedSectionIds","onResetSections","updatedSectionIds","onCtrlSelect","mirrorIds","AddToGroupDialog","groupOptions","selectedGroupId","setSelectedGroupId","LaunchAddToGroup","openAddToGroupDialog","closeAddToGroupDialog","listingGroups","GroupListingsState","Review","ListingGroupType","SplitZoneByType","RankPremiumType","GroupSortByType","SectionAsc","SectionDesc","RowAsc","RowDesc","UnsoldQuantityAsc","UnsoldQuantityDesc","UngroupedListingGroupId","RowDragHandleCell","usePreviewTableColumns","isUngroupedGroup","removeListing","onMoveListing","rankPremium","premiumValue","available","sold","BroadcastMarketplace","GroupBroadcastSettings","availableMarketplaceSettings","onToggleAllBroadcast","setting","allSelected","GroupTypeToCID","SettingsTitle","subtitle","RowRangesPrefix","ranges","editing","getLabelFromRowRange","lastRange","lastEditing","InputRowRanges","onRowRangesChange","rowInput","setRowInput","setEditing","inputError","setInputError","lastRowRange","rowRangeInputErrorMsg","onLeaveInput","onCutomRowRangeKeyDown","blur","activePlaceholder","baseColors","getRandomColor","createGetColor","sectionSectionGroupLookup","fromEntries","sectionSectionGroup","sectionGroupColor","mapOverlay","setMapOverlay","toggleZoneMap","viewZoneMapText","hideZoneMapText","buttonText","venueZoneConfigs","getDefaultRanges","BucketGroupingTypes","GroupingMethods","rowRangesText","addAnotherSplitText","primaryGroupBy","onPrimaryGroupTypeUpdate","onUpdateZoneMapRowRange","newGroupBy","primaryGroupOptions","cloned","groupBySubtitle","canAddSecondaryThenBy","canAddThirdThenBy","commonStyles","inputStyle","ThenGroupBy","groupLevel","onUpdateGroupBys","hasGroupListingsWithRangedQuantityCostFeature","onUpdateGroupBy","onUpdateGroupRanges","showBucketOption","GroupListingsSetting","defaultToOpen","ListingGroupsGenerator","getListingGroups","generateBaseZoneGroups","rowIdToSectionId","sectionToSectionGroup","keyBy","sectId","sectionListings","ticketClassName","sectionGroupAreaType","sectionGroupAreaName","splitByRanges","groupNamePrefix","splitByRowRanges","splitByQuantityRanges","splitByUnitCostRanges","splitWithGroupBy","splitByZone","splitBySection","splitByRow","splitByBucket","speculativeRowIds","rowIdToIndex","sortedRows","rangedListings","postfixNameFromRange","rowIdToZone","getGroupName","rowIdToSection","rowIdToName","sameSizeDivider","kMeansDivider","bucketSize","sanitizedBuckets","getListingClusterValue","prevName","subPrefix","stringSortWrapper","parsedA","parsedB","sortGroupListings","groupSort","groupListingIds","orderFactor","useSetListingGroupValue","setListingGroupValue","useLoadListingGroups","loadFromZoneMap","rowRanges","generator","secondaryGroup","groupUndercutSettings","groupSortBy","loadFromGroupBys","sortedItems","useEventListings","useGroupListingsAction","setState","primaryGroupType","onFooterNav","back","withGroupUndercustSettings","MoveListingGroupDialog","onMoveListingToGroup","canAddNewGroup","targetListingGroupId","setTargetListingGroupId","groupMode","setGroupMode","setNewGroupName","setGroups","onConfirm","targetGroup","newListingGroupId","idToListing","contentOptions","actionButton","readyToSubmit","DraggableRow","Transform","GroupListingPreviewTable","targetListingId","setTargetListingId","moveListingGroupDialog","listingIdToItem","onRemoveListingFromGroup","targetListing","idToGroup","toGroup","newItems","fromGroup","targetListingGroupItem","targetGroupItems","handleDragEnd","oldIndex","updateGroupItems","MouseSensor","KeyboardSensor","closestCenter","colSpan","isPlaceholder","verticalListSortingStrategy","RelativeAbsoluteGroupOptions","GroupListingsPreview","setRankPremium","onRankPremiumChange","premium","onPremiumValueChange","onUpdateDeprioritizeQuantities","GroupsPreview","selectedGroup","setSelectedGroup","ungroupedText","groupedListingIds","ungroupedListingGroup","enrichedGroups","firstGroup","OrderingMethods","sortingOptions","rankPremiumType","setRankPremiumType","undercutPremium","onRankPremiumTypeChange","premiumType","rankPremiumTips","GroupListingsV2","rowGroupSetting","GroupListingV2Content","LaunchGroupingWizard","LaunchMoveToGroup","eventListingGroups","GroupActions","hasMoveToGroupFeature","hasBulkEditsToListingGroupsFeature","hasGroupingWizardFeature","useBulkPricingActionsPermissions","hasEditPricingPermission","hasUpdateListingPermission","PRICE_CHANGE_MODE_OPTIONS","PriceChangeMode","BulkEditListingPriceDialog","increasePrice","priceChangeMode","setPriceChangeMode","changeValue","setChangeValue","isInputValid","newMode","LaunchChangeListingPrice","useBulkChangeListingPriceAction","bulkUpdateListingsPricesUpdateKey","onSubmitChangePriceByPercent","priceChangePercentage","priceChangeAbsolute","onChangePriceByPercentClick","useDeliveryInfoChangeDialog","deliveryInfoChangeSuppressionTimestamp","useMarketplaceHandledByProcessor","isMarketplaceHandledByProcessor","isSyncHandledByProcessor","useAnyMarketplaceHandledByProcessor","TransferTicketmasterBarcodesBody","instructionsContentId","viewOnly","ViewTransferTickets","goBack","TrasnferProofBody","saleDetails","transDest","transSrc","transferProofDocs","transferUrls","transferProofId","transferBarcodes","yourTickets","app","transferFrom","yourBuyer","transferTo","contact","tts","ImageProofContent","UrlProofContent","TransferIdProofContent","onUploadBarcodes","UploadBarcodesFormContent","modalDetails","BackButton","UploadETicketFormContent","artifactType","TicketArtifacts","ix","userDoc","UploadExternalIds","onUploadExternalIds","UploadExternalIdsFormContent","ViewExternalIds","onUploadTicketUrls","UploadTicketUrlsFormContent","ViewTicketUrls","getViewActionConfig","ViewActionModal","ViewTickets","notAvailableContent","viewTickets","TicketTypePrioritySection","externalDisabled","hasAutoFulfillFeature","isAnyHandledByProcessor","hasUpdateSalesOfListingsFeature","hasAnySales","deliveryInfoChangeHookProps","predeliveryArtifactTypes","availArtTypes","canSetDeliveryStrategy","canViewFulfillmentArtifacts","confirmUpdateSales","predeliveryArtifactType","ListingPriceInputInner","fieldToOtherRatio","onEnter","dontChange","ListingPriceInput","EconomicsSection","canChangePricer","onUnbroadcast","marketplaceListingID","thirdPartyMPs","sellerAccountDefaultMarkup","marketplacePrices","priceByMarketplace","allListPrices","smallestListPrice","largestListPrice","manualPriceAdjustFloorProps","manualPriceAdjustCeilingProps","rowsCount","inputRefsArray","createRef","focusedInputIndex","setFocusedInputIndex","getFloorAlerts","getCeilingAlerts","getAutoPriceAlerts","onPriceChanged","onPriceEdit","newPrice","priceByMarketplaceEnabled","newMarkup","handleEnter","nextInput","mpListPrice","ErrorIconMessage","messageContainer","DuplicateSeatDialogEntry","lastUpdateDate","isHovered","setIsHovered","textPrimaryLight","DuplicateSeatsSelectionDialog","duplicateListingInfo","activeListingInfo","onDuplicateListingClick","paddingBlockEnd","duplicateListingId","duplicateListingLastUpdateDate","LaunchDuplicateSeatsSelectionDialog","onLaunch","DuplicateListingSection","allowBroadcast","duplicateSeatHeader","EnableNativeSyncSection","hasEnableNativeSyncFeature","stubHubHandledByProcessor","enableNativeSync","UploadDocumentInput","uploadInstruction","setIsSaveDisabled","fileInfo","setFileInfo","failedUpload","onUploadDocument","docLink","ProofOfPurchaseUploadDilaog","onUploadProofOfPurchase","uploadDocs","uploadProofDocuments","LaunchProofOfPurchaseUploadDilaog","ProofOfPurchaseSection","pendingProofText","PENDING_PROOF_STATE_TO_CID","pendProofState","proofOfPurchaseDocs","getActivityLogChangeDisplay","activity","emptyContentPlaceholder","detailed","normalizedMessage","normalizeActivityLogMessage","newValueNormalized","normalizeActivityLogValue","ACTIVITY_LOG_STATE_TO_CID","oldValue","emptyPlaceholder","strippedValue","StubHubApiErrorFormat","normalizeErrorMessage","StubHubApiPropertiesToPosProperties","number_of_tickets","display_number_of_tickets","split_type","listing_note_ids","ticket_location_address_id","in_hand_at","ticket_type","face_value","extractMessage","normalizeErrorObject","errorObj","entityTypeNumberToEntityTypeEnum","ViewSeatsListBody","seeAvailableSeats","seeWastedSeats","seatsElements","getSeatDisplay","seatsElement","ViewSeatsListModal","LaunchViewAllSeats","viewComps","MAX_SEATS_DISPLAY","getSaleDetailsRelativeUrl","TicketsSection","manualMaxDisplayQuantity","availableSeats","ticketsAvailable","ticketsElement","soldSeats","onShownQuantityChange","changeEvent","validatedValue","useGetSectionRowFromVenueMapConfig","SPLIT_TYPE_TO_CID","newSplitType","newHideSeats","BulkEditMarketplacePricesDialog","BulkEditMarketplacePricesDialogContent","isListingDetailsInputChanged","LaunchUpdateMarketplacePrices","useBulkUpdateMarketplacePrices","openBulkEditMarketplaceDialog","closeBulkEditMarketplaceDialog","listingUpdate","useUserHasAutopricingFeature","getSettingsInputChanged","initial","settingsInput","changedFields","netProceedsFloorAdjustmentAmount","netProceedsFloorAdjustmentType","netProceedsFloorAdjustmentRelative","hasConflict","includeExistingSelectedSections","rowCompOffset","venueZoneMapName","getAutoPricingSettingsUpdateInput","accountCurrency","hasBulkEditPricingSettingsUpdateFeature","generateDefaultSettings","multiEvents","compSectionSettings","isCompForSameZone","isCompSelectedSections","compExclDefects","isCompQtyScrAdj","cirBrMaxDiscVelocPercent","cirBrMaxDiscVelocTicksInHrs","cirBrRelCeil","cirBrRelFloor","outKthLowestLimRelSpc","toSettingInput","toSettingInputFromArray","isUnique","allEqual","santizedPricingSettingsUpdateInput","useAutoPricingSettings","onUpdateNetProceedsFloorAdjustment","adjustmentAmount","PricingSettingStatus","isHeader","AutoPricingEnabledSetting","useAutoPricingEnabled","onUpdateAutoPricingEnabled","changed","fromDisplay","toDisplay","SettingsSubheader","PricingAdvancedSettings","outlierModeHasChange","onResetOutlierMode","standardDeviationsHasChange","onResetStandardDeviations","kthLowestOutlierHasChange","onResetKthLowestOutlier","circuitBreakerHasChange","onResetCircuitBreaker","useGetVenueZoneMapConfigInfo","venueMapZoneInfoQuery","useGetVenueZoneMapInfoOverrides","venueMapZoneInfoOverrideQuery","RowComp","ROW_COMP_SETTING_TO_CID","canUseZoneMap","overrideLookup","setOverrideLookup","defaultLookup","setDefaultLookup","venueZoneMapConfigInfoQuery","venueZoneMapConfigOverrideInfoQuery","selectedOverrideId","defaultConfig","defaultVenueZoneConfigType","venueNameFromQuery","venueMapZoneConfigs","VENUE_ZONE_CONFIG_TYPE_TO_CID","currentVenueName","onResetCompListingMode","selectedSectionsHasChange","onResetSelectedSections","onResetZoneMapOption","quantitiesFilterHasChange","onResetQuantitiesFilter","undercutAmountHasChange","onResetUndercutAmount","existingSectionsText","editSections","inactive","RelativeAbsoluteOptions","AboveBelowGroupOptions","FloorAdjustmentInput","isAbove","setIsAbove","onRelativeChange","onAboveChange","updatedIsAbove","isAbsolute","setIsAbsolute","onPriceFloorChange","netProceedsValueNew","onPriceCeilingChange","netProceedsFloorWebsite","netProceedsCeilingWebsite","floorOrCeilingHasChange","onResetPricingProtection","onRelativeSwitch","PRICING_FLOOR_CEIL_ADJUSTMENT_TYPE_TO_CID","useConfirmDialog","openConfirmDialog","closeConfirmDialog","useAutoPricingStrategies","autoPricingStrategiesQuery","autoPricingStrategiesUpdateMutation","autoPricingStrategiesDeleteMutation","collectionId","SimplifiedAutopricingGuidedPrice","isMarketListingsView","autopricingSettingsAvailable","AutoPricingStrategySection","listingHasParent","openAutoPricingStrategyDialog","closeAutoPricingStrategyDialog","AutoPricingStrategyDialog","selectedAutoPricingStrategyId","setSelectedAutoPricingStrategyId","strategyName","autoPricingStrategy","applyAutoPricingStrategy","onAutoPricingStrategyChange","isStrategyApplied","defaultValuesForStrategy","sectionContent","placeContent","onStrategyUpdated","strategyId","SimplifiedAutopricingSection","showSections","setShowSections","showSave","ListingNoteBadge","styledIcon","ComparableListingDisplayTooltip","listingPriceCalc","pricingAgainst","underCutChosenListingId","hasRelative","udrRel","udrRelPrm","hasAbsolute","udrAbs","udrAbsPrm","ComparableListingDisplay","isCurrentListing","isYourListing","isOutlier","isAnchor","isSelectedWithListingGroup","validPurchaseQuantities","hasShowIdFeature","hasYourListingInComps","hasIntelligiblePricePreviewFeature","hasListingGroupIntelligiblePricePreviewFeature","hasCondensedTabsFeature","hasCompListingDisplayUpdateFeature","shouldGrayOut","displayQuantity","quantitySplits","splits","listingNoteDefects","listingNotePerks","ConnectedComparableListingDisplay","formatter","FloorCeilingBarDisplay","displayType","floorCeilingPrice","DisplayType","FloorDisplay","YourAutopriceResultsDisplay","currentListing","anchorListing","formatterCurrent","formatterAnchor","CeilingDisplay","AutopricerDisplay","ComparableDisplay","ComparableListingItem","itemProps","calculateDealScore","ComparableListings","currentListings","comparableListings","floorPrice","ceilingPrice","showAutoPriceResults","firstCurrentListing","currentListingIds","floorPriceUICurrency","addFloorCeilingLine","cmpRes","dealScoreA","dealScoreB","hasCurrentListingAndAnchor","showCurrentWithAnchor","listingItems","floorPriceShown","ceilingPriceShown","mapListingToComparableListing","availableTickets","vldPurQty","ConnectedComparableListings","currentListingFromListingGroup","hasCondensedInventory","activeItemIndex","onCurrentKeyDownHandler","marketplaceListingIdsSet","stubHubMkpListings","mkpListingId","comparableListingsLoaded","compListing","isWithoutOutlier","isSellerCompListing","cmpFlr","cmpCeil","useAutoPricingPreview","listingInput","setQueryKey","priceCalcQuery","useVenueMapHandlers","filterSections","pricingPreview","classedSectionIds","filteredSeciontIds","QuickFloorInput","newNetProceedFloor","inputboxRef","onHandleEnterKey","curRef","FloatingToolbar","onToggleCollapsed","isCollapsed","QuickAtionShieldIcon","quickFloorCollapsed","setQuickFloorCollapsed","setIsCollapsed","quickFloorForm","collapsed","MapWithCompListingsPreview","compListingsFromListgingGroup","showSimplifiedSettings","isInModal","colorBand","hasQuickFloorToolbarFeature","sessionView","populateListingWithSeatScore","compListingsWithSeatScore","compListingSectionIds","sectionNames","union","SimplifiedAutopricingSectionV2","ListingCompsSpectrum","ListingCompsRangeMin","ListingCompsRangeMax","ListingCompsNumberRange","STEPS_PER_HALF","MAX_RATIO","MAX_RATIO_INCREMENT","MIN_RATIO","MIN_RATIO_INCREMENT","ROUNDING_DECIMAL_PLACES","getCompListingSpectrumIndex","comparablePrice","relativeRatio","useComparableListingsVenueMapColor","defaultCompListings","compListingsBySection","compListingsByRowId","defaultCompListingsBySection","defaultCompListingsByRowId","sellerListingsBySection","sellerListingsByRowId","avgOverallPrice","meanBy","money","hasSellerListings","selectedComplistings","avgCompPrice","hasCompListing","useCompListingDisabledSections","sectionsSameZone","rowScore","rowScoreFloor","rowScoreCeiling","useGetCompListings","selectedListingGroupId","hasGroupCompsFeature","compListingsQuery","shouldQueryListingGroupsQuery","compListingsGroupQuery","updatedFields","getListingDetailsPricingUpdates","priceUpdates","ListingDetailsModalSidePanelContext","onCloseSidePanel","onShowContent","useListingDetailsModalSidePanelContext","autoPricingResultType","ListingTab","getListingDataFieldsForTab","isStrategyEdit","useRestrictSelection","matchingSectionRow","sectionIdFilterNew","restrictSelectionType","setRestrictSelectionType","updateToSameZone","updateToSameSection","onRestrictSelectionTypeChange","isParentListingMode","hasAnyActiveRestrictionApplied","applied","restirctSelectionTypes","onLaunchSectionSelection","marketPrice","dontChangeText","floorError","ceilingError","turnOffSkipSetting","priceProtectionDisabled","adjustListPriceToBeWithinFloorAndCeiling","priceFloorMode","setPriceFloorMode","newV","AutoPricingSection","onSwitchToTab","hasAutoPricingUiGateRemovalFeature","showDetailedSettings","setShowDetailedSettings","AutoPricingStrategyDialogContent","openConfirmDeleteDialog","closeConfirmDeleteDialog","strategyInput","onStrategyDelete","AutoPricingStrategySetting","createStrategyText","detailContent","headerContent","settingContent","useOverflowX","isOverflowX","setIsOverflowX","hasOverflowX","ListingsCarouselCard","listingsCount","IndividualListingCard","valueLabelClassName","MyListingsCard","attrLabelClassName","MY_LISTINGS_KEY","DIVIDER_LINE_KEY","ListingsCarousel","selectedListing","setSelectedListing","CompListingsPreview","listingPriceCalculations","sellerCompListings","listingPriceCalculationsByListingId","record","selectedListingPriceCalculation","isComparableToSelectedListing","cl","sellerCompStubHubListingIds","isComparableListing","compStubHubListingIds","isOutlierListing","outlierStubHubListingIds","mapCompListingToComparableListing","currentCompListings","currentComparableListings","listingPriceCalcWithComps","useGetActiveVenueZoneMapSectionGroups","activeVenueZoneMapSectionGroupsQuery","sectionGroupsBySectionId","useEventVenueMapSectionHandler","onSectionIdsIncludedOrExcluded","excludeUpdatedSectionIds","newSelectedSectionIds","useBulkGetListingPriceCalculationsInEvent","autoPricingSettingsUpdates","compListingSetting","selectedSectionSettings","includeExistingSelectedSectionSettings","onlyForSelectedSectionsEnabled","quantityFilters","excludeFanInventory","excludeDefects","underCutSetting","underCutAbsoluteAmount","underCutRelativeAmount","outlierSetting","standardDeviations","outlierLimit","absoluteOutlierSpacing","relativeOutlierSpacing","absoluteAmount","relativeAdjustmentType","relativeAmount","relativePercentage","listingCalculationsQuery","bulkListingPriceCalculationResult","useBulkEditAutoPricingSettingsSidePanelEventMapProps","compListingsVenueMapColor","BulkEditAutoPricingSettingsSidePanel","show","eventVenueMapProps","PricingSettingsPreviewColumnId","Setting","SettingFrom","SettingTo","PricingSettingsPreviewColumns","include","booleanToText","defaultText","usePricingSettingsPreviewTable","updates","updateChangedFields","conflictText","overrideText","naText","sameZoneOrBetter","sameZone","sectionIdToName","defaultSelectedSections","updatedSectionedSections","venueMapName","betterZonesValue","PricingSettingsPreview","BulkEditAutoPricingSettingsDialog","BulkEditAutoPricingSettingsDialogContent","defaultInput","setChangedFileds","onUpdateChangedFields","BulkEditAutoPricingSettingsModalOrDialog","delayLoaded","setDelayLoaded","hasBulkEditAutoPricingPreviewFeature","showSidePanel","usePricingConfigFromEventIds","refetchOnMount","refetchOnReconnect","LaunchEditAutoPricingSettings","useBulkEditAutoPricingSettings","hasPricingSectionSettingsAcrossEventsFeature","distinctEventIds","eventIdsFromSelectedListings","pricingConfigFromEvents","sanitizedEvent","sharedConfigId","openBulkEditAutoPricingSettingsDialog","closeBulkEditAutoPricingSettingsDialog","onSubmitAutoPricingRework","LanguagePreference","Above_Below","Increase_Decrease","getRelativeAbsoluteOptions","absoluteUnit","getAboveBelowOptions","languagePreference","aboveText","belowText","BulkEditNumber","initAmount","showAbsolute","showApplyToAll","setAmount","setIsRelative","updatedRelative","onApplyToAll","throttle","trailing","FloorCeiling","BulkEditListingPricingFloorCeilingDialog","floorCeiling","marketPriceText","relativeToTarget","setRelativeToTarget","PRICING_FLOOR_CEIL_ADJUSTMENT_TYPE_TO_WARNING_CID","useBulkChangeFloorCeilingActions","openBulkChangeFloorCeilingDialog","closeBulkChangeFloorCeilingDialog","onSubmitChangeFloorCeilingCallback","adjustment","onChangeFloorCeilingClick","PricingActions","bulkUpdateListingPrice","bulkEditAutoPricingSettingsV2","bulkChangeFloorCeilingActions","activeQuery","InfoMessage","INIT_TICKET_TYPE_RULES","BulkChangeTicketTypeRuleDialog","hasBackfillTicketTypeOverrideToSaleFeature","setDeliveryType","setTicketTypeRules","LaunchChangeTicketTypeRule","useBulkChangeTicketTypeRuleAction","openBulkChangeTicketTypeRuleDialog","closeBulkChangeTicketTypeRuleDialog","updateSalesOfListing","useUpdatePurchasesPermissions","hasPurchaseUpdateCommissionPermission","hasPurchaseUpdateDeliveryTypePermission","hasPurchaseUpdateSeatTraitsPermission","hasUpdatePurchasesPermission","LaunchBulkEditCommission","BulkEditCommissionDialog","useBulkEditCommissionAction","openBulkEditCommissionDialog","closeBulkEditCommissionDialog","onLaunchAction","seatingAttributes","SeatingAttribute","BulkEditMarketplaceSeatingDialog","BulkEditMarketplaceSeatingDialogContent","textContentMap","onInputChangeHandler","attribute","formEntries","LaunchUpdateMarketplaceSeating","useBulkEditMarketplaceSeatingAction","openBulkEditMarketplaceSeatingDialog","closeBulkEditMarketplaceSeatingDialog","BulkRemovePredeliveryDialog","setRemoveBarcodes","setRemovePdfs","LaunchRemovePredelivery","useBulkRemovePredelivery","openBulkRemovePredeliveryDialog","closeBulkRemovePredeliveryDialog","useBulkUpdateAutoFulfillPermissions","hasEditAutoFulfillPermissions","LaunchBulkUpdateAutoFulfill","BulkUpdateAutoFulfillDialog","setIsNoFulfill","useBulkUpdateAutoFulfillAction","openBulkUpdateAutoFulfillDialog","closeBulkUpdateAutofulfillDialog","BulkEditDeliveryTypeDialog","infoMessage","showUpdateAssociatedSalesOption","LaunchBulkUpdateDeliveryType","hasSeatSaverPermission","useBulkUpdateDeliveryType","openBulkEditDeliveryTypeDialog","closeBulkEditDeliveryTypeDialog","tickeTypePriorities","_updateSalesOfListings","useBulkUpdateInternalNotesPermissions","hasEditInternalNotesPermissions","LaunchBulkUpdateInternalNotes","hasBulkUpdateInternalNotesFeature","BulkUpdateInternalNotesDialog","updateMode","setUpdateMode","setSearchString","setReplaceString","alertDialog","useBulkUpdateInternalNotesAction","openBulkUpdateInternalNotesDialog","closeBulkUpdateInternalNotesDialog","radioInfoMessageStyle","BulkEditSeatTraitsDialog","setAppendSeatTraits","setSeatTraits","LaunchBulkUpdateSeatTraits","useBulkUpdateSeatTraits","openBulkEditSeatTraitsDialog","closeBulkEditSeatTraitsDialog","LaunchBulkWasteTickets","BulkWasteTicketsDialog","useBulkWasteTicketsAction","openBulkWasteTicketsDialog","closeBulkWasteTicketsDialog","BulkDeleteSeatSaversDialog","LaunchDeleteSeatSavers","useBulkDeleteSeatSavers","openBulkDeleteSeatSavers","closeBulkDeleteSeatSavers","onSubmitDeleteSeatSavers","SettingsActions","hasExportInventoryFeature","bulkEditGeneralSettings","useBulkUpdateListingSettings","bulkUpdateAutoFulfill","bulkEditDeliverType","bulkEditSeatTraits","bulkChangeTicketTypeRule","bulkEditMarketplaceSeating","bulkEditCommissionAction","bulkWasteTicketsAction","useBulkEditTagsPermissions","hasEditTagsPermission","existingTagsMetadata","hasEditTagsPermissions","BulkEditTagsActionPermissionsHandler","BulkEditTagAction","BulkEditTagDialog","selectedTag","setSelectedTag","setTagValue","LaunchBulkEditTags","useBulkEditTagsAction","openBulkEditTagDialog","closeBulkEditTagDialog","onSubmitEditTags","listingClient","onChangeTagClick","editTagAction","TagsActions","InventoryEventBulkActions","mapCompListingToListing","prependTicketClassColorColumnForFirstTime","setInventoryColumnOrderSetting","setInventoryColumnsEnabledSetting","getGroupingLabelForString","getGroupLabelForDates","getGroupLabelForNumber","trunc","fromLabel","getGroupLabelForPercentNumber","EventDisplayCell","isSinglePerformerView","forceDisplayEventName","displayVenueOnly","formattedEventConnector","formattedEventSubName","createInventoryEventUrl","includeAllSearchParams","useEventV2","queryParamOverride","queryParamsToRemove","param","EventActionsCell","hasInventoryEventPageV2Feature","eventUrl","eventUrlV2","LocationDisplayCell","doNotShowVenue","VenueDisplayCell","QUANTITY_COLUMN_MIN_SIZE","QUANTITY_COLUMN_MAX_SIZE","COST_COLUMN_MIN_SIZE","COST_COLUMN_MAX_SIZE","DATE_COLUMN_MIN_SIZE","DATE_COLUMN_MAX_SIZE","EVENTS_TABLE_COLUMNS_CONFIG","getGroupingValue","EVENTS_TABLE_COLUMN_ID_TO_CONTENT_ID","priceUpdatedOn","AccessorReturnType","STRING","SELLER_USER_ID","PURCHASE_BUYER_INFOS","LinkCell","openInNewTab","SHIMMERING_DIV_HEIGHT_REPORT","TableHeader","SALE_REPORT_TABLE_COLUMN_ID_TO_CONTENT_ID","LISTING_REPORT_TABLE_COLUMN_ID_TO_CONTENT_ID","TextCell","CustomNumericFooterCell","sumValue","setSumValue","summaryData","loadData","newSumValue","getFilteredRowModel","columnValues","allNull","targetCurrencyCode","valuesByCurrencyCodeToConvert","columnValue","eventTagColumnDef","eventTags","LISTING_REPORT_TABLE_COLUMNS_CONFIG","holds","holdIds","poInfos","pmtStatuses","pmtMethods","poIds","purchaseIds","purchaseId","stringValueType","buyers","buyerInfos","buyerUserInfos","bi","buyerUser","averageBuyerCommissionPercentage","averageBuyerCommissionPercent","bui","poDates","cancDates","purchaseInfos","vendOrdIds","vendorAccs","mkpPmtState","pmtState","pmtStates","SALE_PAYMENT_STATE_TO_CID","valuesDeduped","fulfillerFormatted","listId","pricer","createdBys","AutomatiqSquareLogo","AxsSquareLogo","FaxExchangeSquareLogo","GametimeSquareLogo","GoTicketsSquareLogo","LyteSquareLogo","SeatGeekSquareLogo","StubHubSquareLogo","TicketEvolutionSquareLogo","TicketmasterSquareLogo","TicketNetworkSquareLogo","mixBlendMode","TickPickSquareLogo","VividSeatsSquareLogo","getMarketplaceSquareLogo","MarketplaceSquareLogo","ConvertPaymentAmount","convertPaymentAmountActionsRef","isSavingConversionRate","setIsSavingConversionRate","canConvertMarketplacePaymentLines","convertMarketplacePaymentDialog","refetchType","currencyConversionPayment","convertedPmtAmt","pmtAmt","showConvertPaymentAmountDialog","MarketplacePaymentOptions","MarketplacePaymentsActions","getMarketplacePaymentDetailsModalConfigWithDeepLink","SHIMMERING_DIV_HEIGHT_PAYMENTS","useMarketplacePaymentsTableColumnsConfig","datesMap","pmtRefId","stateTitle","credit","charge","proceedsAmt","proceeds","useDefaultPaymentsColumnConfig","paymentColumnConfig","getEventsColumnConfigById","SHIMMERING_DIV_HEIGHT_SINGLE_PURCHASE","CommissionsCell","usersIds","isLoadingUsers","usersMap","PurchaseActionsCell","getPurchaseOrderDeepLinkUrl","PurchaseIdCell","vendOrdId","getSeating","purchaseOrderTicketGroup","ticketGroupToGetSeating","PURCHASE_TABLE_COLUMNS_CONFIG","startOfMonthDate","styleOverrides","PURCHASE_TABLE_COLUMN_ID_TO_CONTENT_ID","rowSupportsAccordion","rawIdOnly","tktGrpCnt","pmtMethod","totalCst","totalPmt","totalConvertedPmt","pmtConvRate","formatConversionRate","buyerId","ticketGroupNavId","predeliveryActions","vendorAccountEmail","insertByUserId","displayUserName","multipleText","displayTitle","isMultEv","isValidTicketGroups","getEventDisplayName","firstTgEvent","firstTgPerf","firstTgVenue","firstTgEventDisplayName","performerDisplayName","firstTgPerformerDisplayName","ticketGroupItemHasPerformer","performerName","performerFullName","eventFullName","displayFullName","allEventsSameName","tgEv","isMultipleEvents","venueFullName","allEventsSameVenue","adjustedSeating","SALE_REPORT_TABLE_COLUMNS_ACCESSOR","saleDate","commssionShr","ttlOutsBal","categ","mkpSaleId","stringValues","pmtRcv","cancelDate","tktGrId","lastPmtOn","fulfillDate","DAY_IN_SECONDS","TIME_BUCKET_TOTAL_COLUMN_ID","timeBucketToDayString","timeBucket","daysText","timeBucketToColumnId","storedColumnNumberPrecision","arTimeBucketColumnDef","timeBucketWithData","timeBucketsWithData","timeBkt","displayValue","SALE_REPORT_TABLE_COLUMNS_CONFIG","dateEndOfWeek","saleStatusContentId","getSaleStatusDisplayContentId","statusContent","SaleStatusIcon","getSaleStatusIcon","ticketTypeIcon","fulfiller","commissioner","MerchantDisplay","SaleMarketplaceIdDisplay","uniqueIdLabel","ProceedsCell","ProceedsWrapper","ProceedsMargin","SHIMMERING_DIV_HEIGHT_SINGLE_SALE","SalesActionsCell","getSaleDetailsDeepLinkUrl","getSaleDetailsModalConfigWithDeepLink","mainActionTypes","NON_MAIN_SALE_ACTIONS","getSaleActionButton","SALE_TABLE_COLUMNS_CONFIG","SALE_TABLE_COLUMN_ID_TO_CONTENT_ID","hasWasteSaleFeature","hasSaleHasMarketplaceProblemFeature","hasMarketplaceProblem","mkpContrState","isFulfillVerMis","mkpFulfState","isExternal","poInsertBys","poVendOrdId","externalPoID","origBy","totalConvertedAmount","qtyWasted","SALE_TABLE_FLATTENED_COLUMNS_CONFIG","isFlattenedMode","ColumnListItem","highlighted","getContentIdForColumn","LISTING_TABLE_FLATTENED_COLUMN_ID_TO_CONTENT_ID","SALE_TABLE_FLATTENED_COLUMN_ID_TO_CONTENT_ID","PAYMENTS_TABLE_COLUMN_ID_TO_CONTENT_ID","ON_SALE_EVENT_TABLE_COLUMN_ID_CONTENT_ID","isCustomColumn","useColumnDisplayName","columnIds","displayNamesWithContentId","columnIdDisplayNameMapping","access","customColumn","displayNames","ColumnsSection","renderActions","highlightIndex","shouldHideItem","OperatorsIcon","CustomColumnInstruction","TableCustomColumnModal","columnToEditId","showInfo","setShowInfo","showMetricSelector","setShowMetricSelector","nameColumnPlaceholder","invalidFormulaMsg","columnWithSameNameExistsMsg","allPresetColumnsMap","allPresetColumnCid","allPresetColumnNames","actionOutboxEntityType","fieldOptionsPreset","findDependentListingTableColumnIdsListing","validateFormulaListing","validateFormulaListingReport","validateFormulaEvents","EVENTS_FORMULA_FIELDS_TO_CID","filteredFormulaFields","FORMULA_FIELD_TO_COLUMN_ID_LISTING","FORMULA_FIELD_TO_COLUMN_ID_LISTING_REPORT","FORMULA_FIELD_TO_COLUMN_ID_SALE","FORMULA_FIELD_TO_COLUMN_ID_EVENT","fieldOptions","fieldOptionsDisplay","autoCompleteOptions","customEventsColumns","customSaleColumns","customPurchaseColumns","customPaymentsColumns","customOnSaleEventColumns","formulaTokens","setFormulaTokens","formulaCaretPosition","setFormulaCaretPosition","tokenRefs","validateNewCustomColumn","allColumnNames","newCustomColumn","dependency","formulaTokensWithCaret","keyUpHandler","newTokens","tokenToAdd","tokenRowRange","tokenItem","tokenElement","lastInRow","metricToken","newCaretPosition","TableColumnsInput","requiredColumns","userColumnSelection","onUserColumnSelectionChange","userColumnSorting","onUserColumnSortingChange","userEditableColumns","onUserEditableColumnsChange","onCustomColumnsChange","reportingTags","enableConfigureEditability","showTicketClassColor","isCustomColumnModalOpen","toggleCustomColumnModal","customColumnToEditId","setCustomColumnToEditId","customColumnToDeleteId","setCustomColumnToDeleteId","highlightedItemIndex","setHighlightedItemIndex","deleteCustomColumnConfirmDialog","columnNumberPrecisionSettingId","setNumberPrecisionSetting","updateNumberPrecisionSetting","isTagColumn","moveColumnUnderLastEnabled","currentPosition","lastEnabledPosition","findLastIndex","newPosition","addColumn","removeColumn","cId","deleteCustomColumn","remainingColumns","editCustomColumn","renderColumnRowActions","isCustom","toggleColumn","FormatOptionPill","renderToggleButton","openAddColumnModal","hiddenItemIds","newColumns","ColumnSettingsModal","storedEventsColumnOrderSetting","defaultEventsColumnsConfig","setEventsColumnOrderSetting","setInventoryFlattenedColumnOrderSetting","storedInventorySideTableColumnsOrderSetting","setInventorySideTableColumnsOrderSetting","storedSaleColumnOrderSetting","defaultSalesColumnsConfig","setSaleColumnOrderSetting","storedSaleFlattenedColumnOrderSetting","defaultSalesFlattenedColumnsConfig","setSaleFlattenedColumnOrderSetting","storedSaleSideTableColumnOrderSetting","setSaleSideTableColumnOrderSetting","storedPurchaseColumnOrderSetting","defaultPurchasesColumnsConfig","setPurchaseColumnOrderSetting","storedPurchaseEventColumnOrderSetting","defaultPurchaseEventEnabledColumnsConfig","setPurchaseEventColumnOrderSetting","storedPurchaseSideTableColumnOrderSetting","setPurchaseSideTableColumnOrderSetting","defaultMarketplaceColumnsConfig","defaultMarketplacePaymentsColumnsId","storedMarketplacePaymentsTableColumnOrderSetting","setMarketplacePaymentsTableColumnOrderSetting","storedOnSaleEventsTableColumnOrderSetting","defaultOnSaleEventsColumnsConfig","setOnSaleEventsTableColumnOrderSetting","setColumnOrderSetting","storedEventsColumnsEnabledSetting","setEventsColumnsEnabledSetting","storedInventoryFlattenedColumnsEnabledSetting","setInventoryFlattenedColumnsEnabledSetting","storedInventorySideTableColumnsEnabledSetting","setInventorySideTableColumnsEnabledSetting","storedSaleColumnsEnabledSetting","setSaleColumnsEnabledSetting","storedSaleFlattenedColumnsEnabledSetting","setSaleFlattenedColumnsEnabledSetting","storedSaleSideTableColumnsEnabledSetting","setSaleSideTableColumnsEnabledSetting","storedPurchaseColumnsEnabledSetting","setPurchaseColumnsEnabledSetting","storedPurchaseEventColumnsEnabledSetting","setPurchaseEventColumnsEnabledSetting","storedPurchaseSideTableColumnsEnabledSetting","setPurchaseSideTableColumnsEnabledSetting","storedMarketplacePaymentsTableColumnsEnabledSetting","setMarketplacePaymentsTableColumnsEnabledSetting","storedOnSaleEventsTableColumnsEnabledSetting","setOnSaleEventsTableColumnsEnabledSetting","setColumnsEnabledSetting","setCustomEventsColumns","setCustomListingColumns","setCustomSaleColumns","setCustomPurchaseColumns","customMarketplacePaymentsColumns","setCustomMarketplacePaymentsColumns","setCustomOnSaleEvemtsColumns","setCustomColumns","customColumnsFiltered","presetColumns","presetColumnIds","filterColumns","columnList","activeTagNames","customColumnIds","storedColumnsEnabledSetting","storedColumnOrderSetting","storedColumnOrderSettingFiltered","allColumnIdsAvailable","existingColumnsOrderSetting","storedColumnEnabledSettingFiltered","editabilityId","setEditableColumns","setUserColumnSelection","setUserColumnSorting","setUserEditableColumns","userColumnIsDirty","setUserColumnIsDirty","newEnabledColumns","userColumnSortingFiltered","newSelection","newEditableColumns","SelectAllHotkeys","MultiEditCheckboxChecked","MultiEditCheckboxUnchecked","MultiSelectionToggle","isToggled","tooltipText","isEscKeyPressed","isToggleOn","tooltipTextHighlighted","toggleButton","MultiSelectionToggleGroup","onToggle","enableHotkey","onSelectMultipleClick","_keyName","_event","EventListingHeader","hasInventoryTileMetricV2Feature","getInventoryListingMetricsFn","onToggleGroup","searchParam","translateEventToInventoryAccordionItem","isInventoryEventDetailsPage","multiSelectCollapsed","multiselectEventPageDetails","InventoryEventsAccordion","isColumnModalOpen","toggleColumnModal","onColumnSettingButtonClickHandler","disabledPaginationStyles","tableCellStyles","SalesTable","hasViewProceeds","salesText","saleSelection","customSaleColumnsFiltered","saleColumnOrder","salesTableColumnsConfig","getSaleColumnConfigById","checkbox","SaleEventTileWrapper","SaleTilesContainer","OtherDetailsDiv","SaleTile","SaleTiles","EventSaleBody","SalesBulkActionsPermissions","useUpdateSalesSettingsPermissions","hasUpdateSalesSettingsPermission","hasSaleViewPermission","SALES_BULK_UPDATE_GENERAL_SETTINGS_UPDATE_KEY","SALES_BULK_UPDATE_COMMISSION_UPDATE_KEY","SALES_BULK_UPDATE_TAGS_UPDATE_KEY","SALES_BULK_UPDATE_INTERNAL_NOTES_UPDATE_KEY","SALES_BULK_UPDATE_AUTOFULFILL_UPDATE_KEY","SALES_BULK_UPDATE_MARK_AS_FULFILLED_UPDATE_KEY","SALES_BULK_MARK_SALE_AS_PAID_UPDATE_KEY","BulkMarkSaleAsPaidDialog","BulkMarkSaleAsPaidDialogContent","paymentReference","LaunchBulkMarkSaleAsPaid","useBulkMarkSaleAsPaid","openBulkMarkSaleAsDialog","closeBulkMarkSaleAsPaidDialog","markSaleAsPaidForm","PaymentCurrencyConversionSection","paymentAmountReceived","paymentCurrency","ChargeReasonSelector","chargeReason","saleLineItemChargeReason","SALE_LINE_ITEM_CHARGE_REASON_TO_CID","CreditReasonSelector","creditReason","saleLineItemCreditReason","SALE_LINE_ITEM_CREDIT_REASON_TO_CID","useHasPaymentsSectionsV2Feature","ChargeOrCreditReasonSelector","isChargeType","isCreditType","SaleLineItemModal","costDate","dueDate","remainingBalance","SaleLineItemModalBody","hasPaymentsSectionsV2Feature","itemNameText","amountText","useHasWasteSaleFeature","useShouldHideForWastedSale","isWastedSale","isWastageSale","NUM_OF_COLUMNS","NUM_OF_COLUMNS_MOBILE","SectionContentGridFormat","SectionContentGridMobileFormat","useGetModalGridFormat","PaymentSection","lineItems","onLineItemChange","hasEditSaleLineItemsFeature","hasHideSalePaymentReceivedFilterFeature","hideForWastedSale","setCurItem","totalProfitAmount","li","curItem","userHasSaleCancellationReason","SALE_CANCELLATION_REASON_CID","selectedCancellationReason","ALLOWED_TICKET_TYPE_CHANGE_SALE_STATUSES","canEditSale","hasFufillmentMismatchDisplay","InHandInfo","HoldExpirationInfo","holdExpiredOn","holdExpirationDateAsDate","holdExpirationDateString","saleIsHandledByProcessor","canChangeTicketType","cantChangeTicketTypeTooltip","newTicketType","ticketsStyles","phoneNumber","modalSection","FulfillmentSection","canChangeFulfiller","hasFulfillmentProvidersFeature","BulkEditSalesSettingsDialog","getSaleDetailsUpdateInput","BulkEditSalesSettingsDialogContent","hidePaymentCurrencyConversion","LaunchUpdateSalesSettings","useBulkUpdateSalesSettings","openBulkEditSalesSettingsDialog","closeBulkEditSalesSettingsDialog","useSalesBulkActionsState","affectedVisibleSaleIds","isAllSalesSelected","bulkBulkMarkAsPaid","setEditTagAction","LaunchBulkMarkAsFulfilled","hasMarkedAsFulfilled","SalesGlobalActionDropdown","BulkMarkAsFulfilledDialog","useBulkMarkAsFulfilledAction","openBulkMarkAsFulfilledDialog","closeBulkMarkAsFulfilledDialog","FulfillmentActions","bulkMarkAsFulfilled","anyMkpHandledByProcessor","SalesMonthlyBulkActions","ItemsCountDiv","FullPageEventAction","hasFullPageEventViewFeature","createSaleEventPageUrl","EventSaleHeader","translateEventToSaleAccordionItem","noPadding","multiActionToolBarNoHorizontalPadding","SalesEventsAccordion","SaleEventsEmpty","EmptySectionContent.SolidIconContainer","EmptySectionContent.Label","EmptySectionContent.DetailMessage","MarketplacePaymentLinesTableColumnId","useGetRemainingBalance","remainingAmount","saleLineItemsAmount","saleLineItem","shouldCount","SaleLineItemModalWrapper","recvDate","useGetSaleLineItemsBySaleId","SaleChargesTable","saleLineItemIndexesToDisplay","shouldDisplay","SaleLineItemRow","reasonContentId","reasonMsg","LinkMarketplacePaymentToSaleDialog","existingSaleLineItems","saleLineItemsToLink","canSubmit","LinkMarketplacePaymentToSaleAmountDisplay","useLinkMarketplacePaymentLineToSale","reject","UnlinkMarketplacePaymentLineToSaleDialog","refActions","onUnlinkSuccess","useGetSaleByAmbiguousIdWithCatalogData","SaleEventBox","lookupId","onSearchSaleChanged","SALES_STATUS_TO_CID","LinkMarketplacePaymentLineToSaleDialog","onLinkSuccess","existsSaleId","setExistsSaleId","posSaleIdToLink","setPosSaleIdToLink","LinkMarketplacePaymentLineToSale","MarketplacePaymentLinesActionsCell","linkActionsRef","unlinkActionsRef","hasAddMarketplaceChargeCreditToSaleFeature","addedToSaleMsg","userHasLinkPaymentLineFeature","canLinkPaymentLine","canUnlinkMarketplaceLine","canManuallyAddToSale","isAddedToSale","openRemoveFromSaleDialog","closeRemoveFromSaleDialog","openAddToSaleDialog","closeAddToSaleDialog","onRemoveFromSale","onSubmitAddToSale","dropdownItems","useMarketplacePaymentLinesTableColumnsConfig","extLineId","paymentLineId","paymentType","paymentLine","extSaleId","MarketplacePaymentLinesTable","tableData","paymentsTableColumnConfig","MarketplacePaymentsDetailsModalBody","isLoadingTableData","marketplacePayment","isLoadingMarketplacePayment","hasData","MarketplacePaymentsDetailsModal","MarketplacePaymentsDetails","getMarketplacePaymentRelativeUrl","MarketplacePaymentLines","canManageMarketplacePayment","setMarketplaceChargeActions","marketplacePaymentLinesFormFieldDirty","dirtyFields","formatDateCell","allMkpLinesHaveSameCurrency","currencies","saleMkpLines","mkpLines","line","mkpLinesTotal","exampleUiMoney","totalDisplay","mkPayment","MarketplacePaymentSection","hasMarketplacePaymentLinesDisplayFeature","hasManageMarketplacePaymentFeature","canViewMarketplacePaymentLines","marketplacePaymentTerm","PaymentSectionTable","onEditSaleLineItem","onDeleteSaleLineItem","onPaymentReceivedToggleClicked","onSaleLineItemPaymentReceivedToggleClicked","hidePartsForWastedSale","lastPaymentDate","originalProceeds","mkpSaleTtlNetProcs","getMarketplacePaymentId","proceedsPaymentLine","isCharge","lineTypeContentId","costWithSign","PaymentSectionV2","launchRemovePaymentReceivedDialog","closeRemovePaymentReceivedDialog","addSalePaymentDialog","onSetSaleLineItem","setPaymentReceivedFields","onRemovePaymentReceivedFields","onCreateSalePayment","existingMarketplacePaymentProceedsLine","lineItem","PaymentSectionSelector","TagsSection","canCreateTage","SaleDetailsActionKey","Refresh","UnwasteSale","SaleDetailsFooter","refreshTagMetadata","updateSaleMutation","onReload","formIsDirty","canAttemptManualForceFulfill","refreshAction","mainActionsStartingIndex","saleActionType","resolvedAction","mutate","mainActions","subActions","disableAutoSourcing","allowDisableAutoSourcing","CopyToClipboard","copyIconColor","showingCheckmarkIcon","setShowingCheckmarkIcon","LinkAndCopy","valueToCopy","linkChildren","copyIconSize","renderListing","ListingLinksDetail","originatedFromListingId","distinctListingIds","hasOriginatedListing","ticketGroupInfos","canRender","buyerUserIds","tkgInfo","tkInfo","OriginalListing","mkpSeating","SaleTicketsSection","PurchaseInfoSection","qualityControlState","insertByUser","SaleCommissionOverrideFormWrapper","SaleCommissionOverrideDialog","initialCommissions","shimmerHeight","CommissionsOverridesTable","onEditAction","usersQuery","CommissionsTable","purchaseOrderCommissions","poc","users","tkg","CommissionsSection","resetOverride","hasCommissions","ActionIcon","YourSaleSection","displayDate","SaleDetailsModalV2","SaleDetailsModalForm","SaleDetailsModalBody","hasSaleSkyboxNotesSectionFeature","hasSaleSeatsSoldAs","isDelete","indexExisting","saleEventUrl","comNotes","SaleDetailsModalConfig","SeatingAllocationInput","setAllPossibleSeatings","ticketsForAllocationQuery","possibleSeatings","possibleSeatingsConsecutive","nonConsecSeats","possibleSeatingsNonConsecutive","getIndexOf","recAlloc","newSeating","PossibleSeatingTableRow","hasMoreAllocations","recommended","tktsForAlloc","purchasedByUsers","purchasedBy","vendorNames","vendorAccountNames","vendorAccEmail","vendorAccName","seatNumbersDisplay","allSeatsHaveListingOrdinal","listingOrd","ticketOrd","vn","van","SeatingAllocationInputV1","SeatingSingleTicketAllocationInput","selectedSeatings","setSelectedSeatings","hasRemoveListingRestrictionFeature","seatingTickets","filteredPossibleSeating","handleToggleSeating","prevSelected","handleSelection","SeatingAllocationInputTab","SeatingAllocationInputV2","ConfirmSaleModal","ConfirmSaleModalContent","hasAllocatedSingleTicketFeature","showSectionRowChangeWarning","setShowSectionRowChangeWarning","createSeatingFromSelectedTickets","selectedTickets","sectionCounts","rowCounts","mostFrequentSection","maxBy","mostFrequentRow","sortedTickets","saleForm","skipAllocation","getPosManagedMarketplaceSaleInputFromSale","seation","updateSeatingValueFromSingleTicketSelection","SeatingAllocationWarning","LaunchConfirmSale","buttonProps","confirmSale","DeallocateButton","LaunchDeallocateSale","shouldAdminHold","setShouldAdminHold","onToggleAdminHold","offlineSaleUpdate","useBuyerSelector","availableBuyers","BuyerSection","buyerEmail","selectedBuyer","setSelectedBuyer","isEdit","buyerEmailError","orderIdError","buyer","statusAllowedChangeable","MarketplaceSaleInfoSection","saleDateError","currencyCodeError","totalNetProceedsError","allowChangingSaleStatus","allowedSaleStatus","saleStatusOptions","newStatus","newNotes","TicketSection","maxQuantity","isEditingExisting","quantitySoldError","seatFromError","seatToError","deliveryTypeToTicketTypesMap","ticketTypeOptions","seatFromToOptions","setSeatFromToOptions","seatFromOptions","setSeatFromOptions","setSeatTo","seatToOrdinal","canAllocateToNonConsecutiveSeats","isSeatingGA","getConsecutiveSeatingsForQuantity","maxAvailableQuantity","newSeatFromToOptions","seatFromOrdinals","newSeatFromOptions","seatFromTicket","seatFromOrdinal","ticketFrom","newSeatOrdinal","fromTick","toTick","ManagedMarketplaceSaleBody","saleLinkedListingIds","saleLinkedListingQuantityQuery","linkedListingAvailableQuantities","ManagedMarketplaceSale","getPosManagedMarketplaceSaleInputFromListing","ManagedSaleContent","entityIsLoading","saleFormValue","buyerName","buyerPhone","inhandDateMustBeforeEventDate","LaunchEditOfflineSale","editOfflineSale","LaunchExpireHold","LaunchMarkAsFulfilled","RejectButton","LaunchRejectSale","setSaleCancellationReason","LaunchResetFulfillment","ResetFulfillmentDialog","resetArtifacts","setResetArtifacts","ResetFulfillmentDialogBody","SaveArtifactType","LaunchResetFulfillmentV2","openResetFulfillment","closeResetFulfillment","LaunchResetFulfillmentButton","TurnOnSaleAutoFulfillDialog","onTurnOnAutoFulfill","ImageProofBody","ProofTypeSelectionBody","supportTicketmasterBarcodeTransfer","watchTransferType","has1TicketApiFeature","hasTransferWithoutProof","hasTransferWithoutProofFeature","TransferIdProofBody","transferProofIdErrpr","TransferTicketsRecipientBody","onCopy","recipientNameReferenceId","recipientEmailReferenceId","URLInputField","canRemove","allFields","requiredUrlMsg","dupeUrlMsg","UrlProofBody","allUrlInputs","allUrlsError","acceptanceUrlInputs","TransferTickets","TransferTicketsContent","hasTicketmasterEnabled","indexOfTM","ti","appId","transferType","eTicketUrlOnly","acceptanceUrls","TransferTicketsModal","currentBody","setCurrentBody","TransferTicketBody","atleastOneUrlRequired","anUploadedDocumentIsRequired","onTransferClicked","getBody","LocalModalFooter","LaunchTransferTickets","isSaleNoFulfill","openTurnOnSaleAutoFulfillDialog","closeTurnOnSaleAutoFulfillDialog","transferTickets","useUnwasteSale","UnwasteTicketsButton","LaunchUploadBarcodes","dropdownItemMode","uploadBarcodes","actionContentId","UploadETicketsV2","UploadETicketsSelector","LaunchUploadETickets","launchConfirmDialog","uploadETickets","onAttemptLaunchDialog","CancelledHoldIcon","FulfilledIcon","FulfillmentFailedIcon","HoldIcon","PendingAllocationIcon","PendingFulfillmentIcon","PendingRejectionIcon","ProcessingFulfillmentIcon","SaleCancelledIcon","deepLinkId","doTrackView","openOnStubHubMyAccount","clientConfig","inhandTextString","utcDate","fromUtcDate","minutes","differenceInMinutes","shorthandDifference","getMarketplaceSaleInputFromListing","filteredTickets","nextOrd","isValidSequence","sequenceLength","currentSeat","nextSeat","curOrdinal","nexOrdinal","marketplaceContractState","getSiteMarketplacePaymentLineInput","mkpLine","posPmtId","isCred","pmtAmtRcv","pmtCurcy","disAutoSource","commissionOverride","lastPmtDate","SaleInfoDisplay","proposedVenue","proposedPerformer","mainText","connectText","subText","SummaryDateDisplay","MarketPlaceDetails","EventDetails","PurchaseTicketsFlowEventHeader","CostSection","unitCostField","taxPaidField","expectedValueField","websitePriceField","faceValueCostField","unitCostError","faceValueCostError","costSelected","setCostSelected","CostType","setTotalCost","setFaceValue","setUnitCost","newUnitCost","costPerTicket","newExpectedValue","newWebsitePrice","canEditDeliveryType","canEditCustomDeliveryType","canEditTicketTypePriority","deliveryOptionField","inHandAtField","deliveryCostField","daysBeforeEventField","ticketTypeOverrideField","defaultDelivType","delivCst","isNewTicketGroup","deliveryOptionError","inHandAtError","deliveryTypeHasChanged","NewListingSection","SeatTraitsSelectionInput","listingNotesField","canSetSeatTraits","initialTicketGroup","ticketCountField","sectionField","sectionIdField","rowField","rowIdField","allocateSeatsField","seatIncrementTypeField","ticketCountError","seatErrors","seatError","allocSeats","startingOrdinal","prevTicket","getOrSetDefaultAllocateSeats","allocateSeats","increaseNone","increaseBy1Format","increaseBy2Format","increaseByValues","getOrSetDefaultSeatIncrementType","seatIncementType","setSeatsIncrement","setSeatValue","TicketGroupInputForm","hideHeader","TicketGroupInputBody","onHidePredeliverAction","scrollToTopOnTicketGroupChange","getElementsByClassName","PurchaseTicketsFlow","PurchaseTicketsFlowBody","hasPurchaseDeliveryFeature","curTicketGroup","validateTicketGroup","groupOfTickets","formTicketGroup","ftg","Steps","PurchaseVendorInfoStep","PurchaseWizardMainStep","TicketGroupInputStep","TicketGroupBlankInputStep","AddActions","TicketGroupInputSteps","PurchaseWizardBody","purchaseHasMergedListings","initialTicketGroupEditContext","initialTicketGroupEditReason","purchaseDetails","debouncedOrderId","setDebouncedOrderId","orderIdUsedErrorMsg","inhandDateMustBeforeEventDateMsg","currentStep","setCurrentStep","canCreate","absoluteReadOnly","removeEventIdQueryIfExists","onCloseModal","force","setTicketGroupEditContext","editInfo","ticketGroupActionParams","setTicketGroupActionParams","secondaryVendorAccountDialog","updateMergedListingDialog","ticketGroupCancelConfirmDialog","hasPurchasePaymentConversionFeature","purchaseDetailsForm","savePurchaseOrderId","INTERNAL_SERVER_ERROR","reloadWizard","ticketGroupsChanged","costsChanged","paymentsChanged","dealChanged","privateNotes","tgIntentionsMap","tgi","purchaseOrderDetails","onNextFromVendorInfoStep","validateVendorInfo","launchInternationalComplianceDialog","closeInternationalComplianceDialog","internationalComplianceDialogProps","internationalComplianceHookProps","onNextFromPurchaseWizardMainStep","handleTicketGroupEdit","tgContext","ticketGroupIdToRemove","onTicketGroupIntentionDialogSave","cleanTicketGroupContextFromDeepLink","isDisabledAbsolutely","onPurchaseTicketsFlowSubmit","editedTicketGroup","onPurchaseMultiTicketsFlowSubmit","targetEventId","onPurchaseTicketsFlowCancel","getTicketGroupsForEditing","existingTicketGroup","existingTgs","newTGNav","cancelTicketGroupHookProps","onTicketGroupActionAttempt","showConfirmationDialog","PurchaseWizard","idParam","ticketGroupEditReason","splitOutTicketGroupId","isFromAutoPo","PurchaseOrderDetailsForm","poInput","setPoInput","createPurchaseInput","toPurchaseOrderDetailsInput","tgMissingEvents","missingViagVirtualIds","smallCatalog","createDefaultValues","toPartialPurchaseOrderToPurchaseOrderDetailsInput","hasMergedListings","PurchaseWizardModalConfig","accountUserId","accountCurrencyCode","secVendAcc","secVendor","ticketGroupCount","isAutoPo","toTicketGroupInput","toDealInput","expectedVal","isFaceValueCost","isFaceVal","faceVal","webPrice","isNewDeal","rate","fromCurrency","toCurrency","eventSearchText","seatIncrementType","seatValues","incr","purchaseOrderDate","purchasingIdsInUseResult","isMultiTgTableFeature","uniqueSeats","ticketsWithSeats","isAtSingleTicketGroupInputLevel","seatingByEvents","eventKey","newSeat","CombinedTicketGroupSeparator","purchaseIdDeepLinkValue","ticketGroupSeparatorIndex","dataStr","indexOfTgBracket","indexOfTgBracketEnd","ticketGroupIdStr","getCatalogData","PURCHASE_USER_SETTINGS","purchaseQueryValueTransformToUrl","purchaseQueryValueTransformFromUrl","getCatalogDataExpanded","allTicketGroups","emptyResults","getUrl","buildMessage","notification","resolveContent","ACTION_OUTBOX_ENTITY_TYPE_TO_CID","fireNativeNotification","Notification","requestPermission","permission","notif","NOTIFICATION_TYPE_TO_CID","notificationType","onclick","Debug","NotificationsContext","notifications","notificationsIsLoading","notificationsIsInitialLoading","setNotificationFilter","noResultsForNotificationFilter","useNotificationsContext","NotificationsContextProvider","loadActiveNotifications","hasActiveNotificationsFeature","dismissedNotifications","addDismissedNotification","useSet","notificationFilter","getActiveNotificationsQuery","undismissedNotifications","createDateTime","filteredNotifications","getNotificationById","getNotificationsQueryDebounced","signalR","messageList","NotificationId","notificationState","BulkEditHubContext","getBulkEditMethodName","BulkEditHubContextProvider","curJob","setProgressBeforeRetry","errorsBeforeRetry","setErrorsBeforeRetry","setRetryableEntities","updateProgress","successCount","warningCount","successPercent","warningPercent","failurePercent","handler","setSuccessPercent","setStageWrapper","newStage","setCurJobWrapper","job","BulkEditErrorList","BulkEditPreviewListingDetails","bulkEditCountPreview","useGetPurchasesTableColumns","hideActionOnCheckbox","customPurchaseColumnsFiltered","purchaseColumnOrder","getPurchasesColumnConfigById","visibleInCurrentViewMode","usePurchaseTableData","getCatalogDataFromVirtualId","dataWithEvent","tgItem","getRowIdForPurchase","getRowIdForTicketGroup","usePurchaseTableSelection","PurchaseOrderTable","virtuosoItemSize","purchasesText","BulkEditPreviewPurchaseDetails","purchases","SalesTableFlattened","nonNullSales","saleTableFlattenedColumnsConfig","saleTableColumnsConfig","BulkEditPreviewSaleDetails","BulkEditPreviewTicketGroupDetails","NUM_OF_ITEMS_TO_FLAG_AS_TOO_LARGE","BulkEditPreviewDisplay","entityUpdatesPreview","setActiveTabIndex","isTooMany","allItemsCount","CountsByEntityDisplay","countsByEntity","entityContentId","ttlCnt","succCnt","warnCnt","failCnt","BulkEditProgressDisplay","skippedItemCount","idsAffected","BulkEditWarningList","w","BulkEditStatus","progressCountIsMax","progressPercentIsMax","getTitleForMethod","getPrimaryAffectedIds","et","useGetListingAutoPricingSettings","listingPricingSettings","hasCompListingQuantityFiltersChanges","ListingAutoPricingSettingsFormContent","autoPricingStrategySection","PricingProtectionSettings","allInFloor","allInCeiling","onPriceValueChange","valueName","ListingAutoPricingSettingsFormContentWrapper","hasParents","GeneralSettings","BulkEditListingSettingsDialog","BulkEditListingSettingsDialogContent","bulkEditMode","hasPurchaseUpdate","LaunchUpdateListingSettings","CommandOptionType","CommandMenu","setSearch","setSelectedIndex","onToggleSelectionModeClick","onSelectAllClick","bulkEditAutoPricingSettings","filteredCommandOptions","COMMAND_OPTION_TYPE_TO_CID","filteredSettingOptions","combinedOptions","handleOptionSelect","prevIndex","handleClickOutside","SettingTab","UserManagement_Users","UserManagement_Roles","UserManagement_Teams","PurchaseOrder","VendorManagement_Vendors","VendorManagement_Payments","SettingsTree","AdCampaignsTableColumnId","AdGroupsTableColumnId","CommissionReportTableGroupingColumnId","EventDateLocal","EventStateName","IsCommissionEligible","CommissionReportTableValueColumnId","ReportFilterEditability","DEFAULT_REPORT_FILTER_EDITABILITY","ReportPerformerVenueFilterItemId","PerformerIds","VenueIds","EVENT_GROUPING_TO_CID","ON_SALE_EVENT_VIEW_MODE_TO_CID","INVENTORY_VIEW_MODE_TO_CID","SALES_VIEW_MODE_TO_CID","PURCHASE_VIEW_MODE_TO_CID","PURCHASE_SORT_TO_CID","TIME_PERIOD_TO_CID","CONVERSATION_SORT_TO_CID","SETTINGS_VIEWS_TO_CONTENT_ID_MAP","ROLE_TO_CID","PERMISSION_ACCESS_AREA_TO_CID","PERMISSION_TO_CID","EVENT_TIME_FRAME_FILTER_TO_CID","TOP_LEVEL_CATEGORY_TO_CID","PARENT_CATEGORY_TO_CID","EVENT_PRICED_STATUS_TO_CID","YES_ENUM_FILTER_TO_CID","YES_NO_INVERTED_ENUM_FILTER_TO_CID","borderSuccess","LISTING_STATUS_TO_CID","LISTING_STATUS_WITH_ACTION_TO_CID","LISTING_REPORT_TABLE_GROUPING_COLUMN_ID_TO_CONTENT_ID","LISTING_REPORT_TABLE_VALUE_COLUMN_ID_TO_CONTENT_ID","SALES_REPORT_TABLE_GROUPING_COLUMN_ID_TO_CONTENT_ID","SALES_REPORT_TABLE_VALUE_COLUMN_ID_TO_CONTENT_ID","COMMISSION_REPORT_TABLE_GROUPING_COLUMN_ID_TO_CONTENT_ID","COMMISSION_REPORT_TABLE_VALUE_COLUMN_ID_TO_CONTENT_ID","SITE_THEME_OPTION_TO_CID_MAP","ADGROUPS_TABLE_COLUMN_ID_TO_CONTENT_ID","ADCAMPAIGNS_TABLE_COLUMN_ID_TO_CONTENT_ID","AUTO_PO_INBOUND_EMAIL_CLASSIFICATION_TYPE_TO_CID","INVENTORY_REPORT_WIDGETS_TO_CID","REPORT_INVENTORY_GROUP_BY_TO_CID","REPORT_SALE_GROUP_BY_TO_CID","REPORT_IS_SORT_DESCENDING_TO_CID","false","true","BROADCAST_ERROR_CODE_TO_CID","PAYMENT_METHOD_NAME_REGEX_TO_CONTENT_ID","REPORT_FILTER_EDITABILITY_TO_CID","REPORT_FILTER_EDITABILITY_TO_DESC_CID","VENUE_ZONE_SECTION_GROUP_AREA_TYPE_TO_CID","useVenueZoneMapIntegration","zoneConfigType","EventMapContext","mapConfigOverridesQuery","normalizeConfigOverrideWithUiScore","populateScoreForDisplay","venueMapMaxScoreRaw","normalizeScores","scoreOverride","EventMapContextProvider","doNotGetScoreOverrides","hasScaledSeatScoreFeature","mapInfo","mapConfigOverridesQueryWithUIScore","activeConfig","rowIdToOrdinal","sanitizedScores","useListingCanBeWasted","SaleWasteInfo","canBeWasted","ticketsToWaste","isFirst","onWastedSuccess","canBeWastedQuery","LaunchWasteUnsoldTickets","launchWasteUnsoldTickets","LaunchDeleteSeatSaver","onDeleteSeatSaver","ViewCompsBody","ViewCompsModal","LaunchViewComps","ListingDetailsFooter","navigateToWastedSale","mainAction","getListingDetailsAutoPricingInput","quantityScoreOverrideJson","defaultQuantityScoreOverrideJson","defaultCompListingOnlyForSelectedSectionsEnabled","useAutoPricingForm","onSubmitStart","onSubmitDone","listingSettingLoaded","groupSettingLoaded","accountSettingLoaded","autoPricingSectionForm","AdminHoldNotesSection","marketplaceListing","formIndex","setListingStatus","noListingQty","marketplaceSeatOverrides","overrideRow","overrideSeats","brdcstStatus","hasBroadcastErrors","disabledDueToPendingQC","pendingProofErrorMessage","hasUseSelectedRowIdFeature","listingStatusCID","santitizedStatus","errMsgs","errorMessages","errCodes","MarketplaceTable","marketplaceFailures","marketplaceListingStatus","setMarketplaceListingStatus","marketplaceFailuresByMarketplace","newStatuses","onSetMarketplaceListingStatus","newStatues","marketPlace","marketPlaces","canBroadcast","statusChecking","newListing","newMarketplaceStatuses","newMkpListings","mpListingStatus","isDisabledWithPriceCheck","useGetMarketplaceFailures","activities","setActivities","getBroadcastErrorsForListings","failureMessages","broadcastErrorMessages","MarketplaceBroadcastSection","setLoading","setIgnoreDup","handleIgnoreDuplicateClick","ListingDetailsBroadcastForm","useListingDetailsContext","broadcast","getListingDetailsBroadcastInput","overrideRowId","overrideSectionId","useBroadcastForm","broadcastSectionForm","KnownVendors","TicketmasterCa","Axs","Eventbrite","Livenation","BroadwayDotCom","Telecharge","Ticketon","Seetickets","Etix","Tixr","Festicket","Insomniac","DiceImport","MgmResorts","Tickeri","SmithCenterImport","Stubwire","Computicket","MARKETPLACE_TO_BACKGROUND_COLOR","marketplaceBackgroundStubhub","marketplaceBackgroundAxs","marketplaceBackgroundSeatgeek","marketplaceBackgroundVivid","marketplaceBackgroundTicketMaster","marketplaceBackgroundTickPick","marketplaceBackgroundOffline","marketplaceBackgroundFanXchange","marketplaceBackgroundGametime","marketplaceBackgroundTicketEvolution","marketplaceBackgroundTicketNetwork","MARKETPLACE_TO_TEXT_COLOR","marketplaceTextSeatgeek","marketplaceTextFanXchange","marketplaceTextAutomatiq","KNOWNVENDOR_TO_BACKGROUND_COLOR","marketplaceBackgroundTicketmasterCa","marketplaceBackgroundEventbrite","marketplaceBackgroundLivenation","marketplaceBackgroundBroadwayDotCom","marketplaceBackgroundTelecharge","marketplaceBackgroundTicketon","marketplaceBackgroundSeetickets","marketplaceBackgroundEtix","marketplaceBackgroundTixr","marketplaceBackgroundFesticket","marketplaceBackgroundInsomniac","marketplaceBackgroundDiceImport","marketplaceBackgroundMgmResorts","marketplaceBackgroundTickeri","marketplaceBackgroundSmithCenterImport","marketplaceBackgroundStubwire","marketplaceBackgroundComputicket","KNOWNVENDOR_TO_TEXT_COLOR","marketplaceTextEventbrite","marketplaceTextLivenation","marketplaceTextTicketon","marketplaceTextEtix","marketplaceTextFesticket","marketplaceTextMgmResorts","marketplaceTextTickeri","marketplaceTextStubwire","mapBrandNameToBackgroundcolor","marketplaceValue","knownVendorValue","mapBrandNameToTextcolor","marketplaceTextDefault","HistoricalPricingGraph","historicalPricingText","priceText","historicalPricingResult","marketplacesBroadcasted","dataAsTuples","massagedData","priceDate","marketplaceColor","marker","lineColor","visible","chart","zooming","xAxis","yAxis","legend","plotOptions","lineWidth","threshold","series","animation","chartComponentRef","Highcharts","HistoricalPricingGraphSection","ListingDetailsPricingForm","pricing","getListingDetailPricingInput","listPriceMarkup","isPriceByMkp","usePricingForm","pricingSectionForm","ListingDetailsTagsForm","getListingDetailTagsInput","useTagsForm","tagsSectionForm","NotesSection","userHasWasteSaleFeature","wastedTickets","wastedTicketsElements","ListingDetailsTicketsForm","getListingDetailsTicketsInput","hideSeatsFromMarketplace","useTicketsForm","ticketsSectionForm","useListingDetailsMethods","broadcastHasChanges","broadcastMethods","onSubmitBroadcast","onResetBroadcast","ticketsHasChanges","ticketsMethods","onSubmitTickets","onResetTickets","tagsHasChanges","tagsMethods","onSubmitTags","onResetTags","pricingHasChanges","pricingMethods","onSubmitPricing","onResetPricing","autoPricingHasChanges","autoPricingMethods","onSubmitAutoPricing","onResetAutoPricing","autoPricing","onSubmits","onResets","SectionSelectorPanel","AutoPricingSidePanel","metadata","useAutoPricingSidePanelContext","showComparables","showSectionSelector","sanitizedListingInput","AutoPricingSidePanelContext","updateMetadata","AutoPricingSidePanelContextProvider","setContentType","setMetadata","newContentType","newOnSelectedSectionsChange","newRest","ListingDetailsAutoPricingForm","onTabChange","ListingAutoPricingSettingsFormWrapper","ListingDetailsPurchaseForm","SalesDetailsSection","ticketsBySalesId","saleInfos","stat","saleTickets","linkStyle","ListingDetailsSalesForm","ticketsWithSales","wastedSales","saleInfo","nonWastedSales","ListingDetailsModalContext","ListingDetailsModalContextProvider","onSaveCompleted","onSaveStart","spinner","listingTabs","loadDataForTab","tabIndex","ListingDetailsModalV2","listingIsLoading","ListingDetailsModalWrapper","ListingDetailsModalContent","inventoryEventPageUrl","ListingDetailsModalConfig","PendingQCIcon","LaunchBroadcastListing","forTable","isNotListed","MarketplaceSection","marketplaceOptionsContent","MarketplaceSaleBody","MarketplaceSale","SaleContent","LaunchCreateMarketplaceSale","createOfflineSale","LaunchCreateOfflineSale","SplitListQuickOptionsContainer","SoldTicketContainer","SplitListingBody","ticketsByListingNumber","allowManualSplitSoldTickets","setAllowManualSplitSoldTickets","regenerateListingTicketIds","newListingsTickets","listingNumber","assignListingNumberToTicket","newListingNum","newNum","newListingNumber","SplitListingModal","sourceListingId","alwaysUnbroadcastListing","useOriginalTicketGroupInfoForNewListings","SplitListingModalContent","needToSplitToTwoOrMoreListingsError","listingNumberUsedError","listingNumberMap","LaunchSplitListing","splitListing","getSplitListingToOriginalInput","SplitListingToOriginalDialog","isDataLoading","splitListingInput","setSplitListingInput","newInput","ticketListingNumber","LaunchSplitListingToOriginal","hasSplitListingToOriginalFeature","AddAdminHoldDialog","LaunchUpdateAdminHold","isAddHold","adminHoldDialog","onAddHold","onRemoveHold","LaunchUploadExternalIds","uploadExternalIds","LaunchUploadTicketUrls","uploadTicketUrls","gi2","getListingUploadDropdownItems","barcodeAction","ticketUrlAction","externalIdAction","createEticketDropdown","eticketAction","qrCodeAction","actionElements","hasNoBroadcastActions","BROADCAST_STATE_TO_ICON","PENDING_QC_ICON","isUndeliverable","broadcastStatus","pendingProofState","isPendingQc","fallbackFee","allInRatio","listRatio","accountMarketplaces","fieldPrice","otherFieldPrice","otherToFieldRatio","newOtherValue","newListPrice","oldListPrice","isSuspiciousPriceChangeHelper","oldPrice","jsonString","ExpandedCallbackStatus","refreshEventForItems","CatalogDataContextV1","CatalogDataContextV2","CatalogDataContextV2Provider","onCatalogDataExpanded","transformEventData","disableAutoRefresh","expandedCallbackStatus","setExpandedCallbackStatus","onExpandedCallbackStatusUpdate","stringQueryKey","serverSideFilterQuery","countFilterQuery","setCatalogResults","eventsFullyLoaded","allEvents","eventIdsNeedingData","eventCountsMissingDataIds","customEventIds","catalogCountQueryKey","catalogDataQueryKey","shouldQueryCounts","shouldQueryEventData","mergeCatalogCounts","newResults","pricedListCnt","entityCnts","cnts","combine","eventQuery","countsQuery","newCatalogResults","cloneDeep","refetchIntervalLong","catalogQueries","catalogResultsFromHook","eventIdsToGetItemsFor","eventsToGetItemsFor","evCount","isTooManyItems","idArray","posId","realExpandedDataItemsQueryKey","shouldQueryExpandedItems","refreshInterval","onCatalogDataExpandedCallbackCheck","queryResults","queryIds","expandedItemsQueryOptions","queryWithExpandedItems","setEventsTransformed","newExpandedData","merge","newExpandedEvents","transformed","updatedListingsByEvent","setQueriesData","oldData","oldListingsByIds","newListings","oldListing","newListingIdsFlattened","originalListing","shouldKeep","qk","updateExpandedSaleItems","oldSalesByIds","newSales","oldSale","newSaleIds","originalSale","updateExpandedTicketGroupItems","updatedTgsByEvent","oldTgsByIds","oldTg","newTgIds","originalTg","catalogIdKey","oldItem","groupListingIndex","subGroup","listingIndex","oldItemInGroup","CatalogDataContextV1Provider","realQueryKey","shouldBeCachedNormally","setQueryWithExpandedItems","queryWithExpandedItemsFromHook","expandedEventsWithData","updatedCatalaogResult","CatalogDataContextProvider","ExportInventoryButton","textOnly","isButtonDisabled","onExportButtonClicked","ExportPurchasesButton","isEventView","ExportSalesButton","ReloadButton","TransferButton","UploadButton","rawOnSaleDate","rawPreSaleDate","unitNetProceedsUsdMin","unitNetProceedsUsdP25","unitNetProceedsUsdP50","eventVisits","lastHour","lastDay","lastThreeDays","lastSevenDays","eventTransactions","OnSaleEventActionsCell","op","tableColumns","tableColumnsConfig","customColumnDefListing","tagColumnDefListing","customColumnDefListingReport","tagColumnDefListingReport","customColumnDefSaleReport","tagColumnDefSaleReport","customColumnDefEvent","definition","dependentColumns","GROUP_BY_TO_VISIBLE_COLUMN_IDS_SALES","GROUP_BY_TO_PRIMARY_COLUMN_ID_SALES","GROUP_BY_TO_VISIBLE_COLUMN_IDS_LISTINGS","GROUP_BY_TO_PRIMARY_COLUMN_ID_LISTING","getListingFlattenedColumnConfigById","getListingReportColumnConfigById","getSaleFlattenedColumnConfigById","getSaleReportColumnConfigById","getOnSaleEventsColumnConfigById","DEFAULT_LISTING_FLATTENED_COLUMNS_FROM_LISTING_COLUMNS","DEFAULT_SALES_FLATTENED_COLUMNS_FROM_SALES_COLUMNS","getMarketplacePaymentColumnConfigById","createColumnResizingContext","USER_SETTING_TO_SECTION_TYPE","ColumnResizingContextProvider","userSettingId","ColumnResizingContext","isInitializedRef","serverCustomColumnWidths","setServerCustomColumnWidths","customColumnWidths","setCustomColumnWidths","debouncedSetServerColumnWidths","newWidth","onColumnSizingChange","updaterOrValue","Function","currentSize","updatedSize","newWidths","serverCustomColumnWidthsWithoutZeroValues","itemSizeDefault","getCommonPinningStyles","isPinned","getIsPinned","getStart","getAfter","PinnedCellGradient","wrapper","gradient","gradientDark","gradientLight","TableTd","isGrouping","cellRef","paddingLeftLargeDesktop","PosGroupingTableTd","tableTd","pinnedCell","PosGroupedVirtuosoGroup","GroupedVirtuosoGroup","PosVirtuosoTableRow","tableRowStyle","rowWrapper","rowProps","toggleSelected","PosGroupedVirtuosoItem","GroupedVirtuosoItem","itemIndex","getIconClass","arrow","UP","DOWN","SortButton","sortStatus","upArrowClass","downArrowClass","TableSortingIcon","SortButtonV2","TableFilterIcon","ColumnFilterButton","setIsPressed","useColumnFilter","canColumnFilter","getCanFilter","canMultiSelect","tableFlatRows","flatRows","columnFilterOptionsContent","uniqueValues","getFilterValue","isColumnFilterActive","setFilterValueWrapper","setFilterValue","setColumnFilterValue","ColumnRangeFilterInput","hasFilterValue","minText","maxText","newMinValue","newMaxValue","ColumnHeaderFilter","getSortStatus","ColumnHeader","headerRef","isColumnSorted","hasTableColumnFilterFeature","showSortIcon","getIsGrouped","getState","grouping","resetGrouping","toggleGrouping","getCanResize","getResizeHandler","onTouchStart","getIsResizing","HeaderActionWrapper","resizerWidth","IconWrapperV2","ColumnHeaderTh","th","LabelWrapper","showFilterIcon","HeaderContentWrapper","PAGE_SIZE_OPTIONS","PaginationFooter","tableWrapperRef","showPageSizeOptions","paginationWrapperRef","isPageIndexEmpty","setIsPageIndexEmpty","previousPageSize","setPageSize","displayedPageCountOptions","footerHeight","setPageIndex","getCanPreviousPage","previousPage","getPageCount","nextPage","getCanNextPage","PosGroupedVirtuosoList","GroupedVirtuosoList","headerGroups","tableHeaderCmp","PosGroupedVirtuosoScroller","GroupedVirtuosoScroller","scrollerWrapper","useGetVirtuosoGroups","groupedTableRows","rowGroups","rowHeaderGroups","allSingleRows","groupingId","localRowGroups","groupedVirtuosoComponents","Scroller","PosGroupedVirtuosoTable","itemsRendered","groupedContext","groupContentRenderer","rowsGroup","isFirstCell","groupRow","cellNoWrapStyle","groupRowFirstCell","groupValue","itemContentRenderer","globalIndex","setScrollerRef","renderedRows","groupedVirtuosoWrapper","useColumnVirtualizer","renderColumnHeader","renderCell","visibleColumns","getVisibleFlatColumns","columnVirtualizer","horizontal","virtualColumns","virtualPaddingLeft","virtualPaddingRight","renderHeaderRow","vc","h","visibleCells","PosVirtuosoTable","tableLayout","PosVirtuosoTableFooter","PosTableFooterSticky","useStickyFooter","PosVirtuosoTableHead","useTableHotkeys","onRowSelection","selectRow","setRowSelection","onArrowUp","getSelectedRowModel","selectedRows","parent","getParentRow","sanitizedId","onArrowDown","keydown","depths","parentDepth","virtuosoTableOverscan","virtuosoTableStyle","MIN_COLUMN_COUNT_TO_USE_VIRTUOSO","tableHeadCellStyle","resizeDisabled","usePaginationFooter","useDataGrouping","onVirtuosoEndReached","footerEl","roundBorders","disableColumnVirtualization","autoResetPageIndex","enableColumnResizing","columnResizeMode","getGroupedRowModel","getPaginationRowModel","getFacetedRowModel","getFacetedUniqueValues","filterFromLeafRows","filterFns","groupedColumnMode","columnSizing","hasFooterDef","renderRowCell","renderHeader","renderRowContentVirtualized","useColumnVirtualization","getVisibleLeafColumns","TableFoot","customProps","rowContent","removedContent","activityAdditionalInfoList","activityAdditionalInfoItem","ActivityLogDateCellDiv","ActivityLogDateCell","ActivityLogDateRangeCell","dateFrom","dateTo","toDateString","ACTIVITY_LOG_GROUPED_TABLE_COLUMNS_CONFIG","activityLogs","actionDate","sortState","firstDate","lastDate","actionTypeDisplay","initiatedBy","ACTIVITY_LOG_TABLE_COLUMNS_CONFIG","initiatedByImpersonated","ActivityLogTable","groupedActivityLogs","hasGroupedActivityLog","flatActivityLogData","flatActivityLogOptions","activityLog","triggerStyles","FiltersDropdown","selectedDropdownItems","onFilterSelected","searchDeferredValue","useDeferredValue","updateSearchText","filteredFilters","lowercaseSearchText","clearSearch","AddFilterButtonPlain","searchDropdownItem","filtersToolbarGroup","postfixIcon","dropdownGroupContainer","dropdownItemParentLabel","notFoundOption","FILTER_ITEM_WIDTH","FiltersListEmbedded","performerVenueFilter","embeddedResetButton","filterItemsToShow","dropdownFilterIds","dropdownFilter","reportFilterEditability","FilterToolbarListItemEmbedded","filterItemWrapper","filterItemLabel","FilterToolBarButtonWrapper","lineBreak","ReportFilterEditabilityDropdown","onEditabilityChange","handleEditabilityChange","editability","FiltersList","embeddedDisplayOnly","listView","FiltersListListView","FiltersListDefault","FilterToolbarGroupListItem","itemsToShow","filterGroupHeader","FilterToolbarListItem","onFilterRemoved","canBeRemoved","showEditabilityDropdown","onRemoveFilterHandler","filterDropdownItem","RemoveFilterButton","FilterDialogV2","nonHiddenFilterIds","appliedFilterIdsWithNonHidden","setSelectedFilters","clearAll","cleanSelectedFilters","dropdownItem","removedFilterDropdownItem","filtersToRemove","filterIdsToRemove","filteredDropdownItems","updatedSelectedFilters","filterQueryKeysToRemove","filterDropdownItems","FilterDialogV2Wrapper","FilterDialogV2Header","FilterDialogV2Body","FilterDialogV2Footer","saveFiltersButton","ToolbarButton","CustomFilterButton","quickFilters","onToggleQuickFilter","onMoveQuickFilter","onCreateCustomQuickFilter","onDeleteCustomQuickFilter","onUpdateCustomQuickFilter","isShown","SortableCustomFilterItem","isCustomFilter","onEdit","CustomFilterDialog","headerTitle","filterName","validateIsFilterUnique","nameText","notUniqueMsg","MobileFilterToolbar","FilterToolbar","allContentId","showAllButton","showCustomFilterButton","filterAppliedIds","alwaysShowAllFilters","customFilterButtonProps","customFilterDialog","currQuickFilterId","setCurrQuickFilterId","currQuickFilter","allFilter","mergedFilters","ActivityLogFilter","onCurrentFilterUpdated","allActionTypes","allUsers","availableUsers","availableActionTypesWithAudit","auditActionType","actionType","defaultFilter","ActivityLog","setFilter","allow","groupedData","currentGroup","sortedFilteredData","MAX_ADDITIONAL_INFO_LINES","ActivityLogDisplay","actionDateStr","initiatedByUser","entityUrl","timeAgo","additionalInfoKeys","actionTypeIntent","MenuContext","isMenuOpened","toggleIsMenuOpened","MenuContextProvider","useMenuState","useFetchLoginContext","loginErrorMessage","fetchLoginContext","useMainAccessibleRoute","mainAccessibleRoutes","ListingNotificationContext","useListingNotificationContext","ListingNotificationContextProvider","hasHandlingListingSignalRFeature","useRefreshListingOnNotification","debouncedSetActivePosEntity","setItemsIdsToRefresh","debouncedSetItemsIdsToRefresh","messageHandler","EntityId","RowVersion","EntityType","existingRowVer","newIds","SearchResultPickerDialog","resultItems","onResultItemPicked","onResultItemSearched","textSearch","setTextSearch","ri","HAS_RELEASE_NOTES_UNREAD_QUERY_KEY","useHasReleaseNotesUnread","canViewReleaseNotes","hasReleaseNotesUnread","useGetReleaseNoteHtml","releaseNoteHtmlByReleaseNoteId","setReleaseNoteHtmlByReleaseNoteId","releaseNoteIdsSorted","releaseNoteHtmlQuery","descriptionHtml","useReleaseNotes","releaseNoteIdsRead","unreadQueryKey","releaseNotesQuery","setReleaseNoteIdsReadMutation","releaseNoteInfos","setReleaseNoteIdsRead","noteIds","whatsNewTitle","releaseNotesText","isReleaseNoteRead","releaseNoteId","markReleaseNoteAsRead","releaseNotesSortedByType","newFeatures","releaseNote","releaseNoteType","bugFixes","activeReleaseNote","setActiveReleaseNote","htmlIsLoading","reportsStyles","UnreadDot","ProLogo","onLogoClicked","isDevelopment","newCobrandId","StarburstLogo","objectFit","SellerAccountInfoContainer","isCurrent","SellerAccountNameContainer","AccountTypeDiv","AccountNameDiv","ImpersonatedAccountNameDiv","SellerAccountBasicInfo","account","UserInfoDisplayContainer","ActiveAccountDisplay","ActiveUserDisplay","UserInfoDisplay","showUserName","fullUserName","impersonatorDisplayName","NavTitle","HeaderWrapperDiv","HeaderLeftAreaDiv","loggedIn","DropdownLabel","strong","DropdownDivider","MainNavTopBar","signInText","myAccountText","menuText","sellerAccounts","setSellerAccounts","isSellerAccountLoading","setIsSellerAccountLoading","hasKBFeature","canViewStubhubPayments","allowedRoutes","onSwitchAccountClicked","onSellerAccountPicked","hasManyAccounts","MainNavTopBarEmpty","MenuItem","MainMenu","toggleClose","menuItems","UserMenu","MyAccountMenuItem","userDisplayName","menuItem","Dropdown","filteredSellerAccounts","setFilteredSellerAccounts","onFilterSellerAccount","filtered","sa","releaseNoteOptionContainer","OPEN_MENU_MOUSE_EVENT","CLOSE_MENU_MOUSE_EVENT","MainNavSideBar","toggleMenu","delayedOpen","mainSideBarRef","useRefExpanded","handleOnMouseEnter","handleOnMouseLeave","hasHideNavAndFilterBarsFeature","sideBar","MessagesItem","MobileTopBar","NavBarContainer","BottomNavBarContainer","UnauthorizedAccessMessageContainer","BackSection","activeEventIds1","tabEventIds1","activeEventIds2","tabEventIds2","LayoutContentHeader","routeTitle","centerContent","rightContent","OFFLINE_TIMEOUT_MS","LayoutContent","bottomNavbarRef","bottomNavbarHeight","hasAccess","routeTitleDefault","version","Helmet","ACTIVITY_LOG_ITEM_COUNT","EmptyPlaceholder","EmptySectionContent.Error","activityLogResult","AdGroupsDataContext","adGroupsDataQuery","adGroupsData","useAdGroupsDataContext","AdGroupsDataContextProvider","adCampaignId","useGetAdGroupsDataQuery","ADGROUP_DATA_QUERY_KEY","AdPlatformCatalogDataContext","useAdPlatformCatalogDataContext","AdPlatformCatalogDataContextProvider","adPlatformCatalogDataQuery","useGetAdPlatformCatalogDataQuery","ADPLATFORMCATALOG_DATA_QUERY_KEY","adPlatformCatalogData","AdPlatformReportingContext","reportData","AdPlatformReportingContextProvider","aggType","SHIMMERING_DIV_HEIGHT_SINGLE_ADGROUPS","getAdGroupListingsUrl","includeSearchParams","AdGroupActionsCell","ADGROUPS_TABLE_COLUMNS_CONFIG","baseBid","maxBid","dailyBudget","eventDisplayText","adSpend","salesProceeds","bidModifier","useGetAdGroupsTableColumns","AdGroupsTable","adGroupEntities","adGroupsText","TopLevelCategoryMap","getTopLevelCategoryId","category","getTopLevelCategoryName","EmptySelectionKey","getListingDisplaytext","rowText","seatText","seatsText","seatDisplayText","AdGroupsFlattenedView","reportingErrorInfo","catalogData","getListingById","listingsByExternalId","listingExternalIdLookup","venueMapLookup","venueMapByEventId","ticketClassInfoLookupForMap","ticketClassInfoLookup","sectionInfoLookupForMap","sectionInfoLookup","rowInfoLookupForMap","rowInfoLookup","populateBaseProperties","adGroup","reportDataByAdGroupId","processExternalIds","bidModifiers","baseProperties","processRowInfos","rowAndSectionInfo","processTicketClassInfos","processSectionInfos","venueMapTicketClass","cssPostFix","processEvents","processLeafCategories","leafCategoryId","processTopLevelCategories","topLevelCategoryId","resolveAndFlattenAdGroups","adGroups","accPromise","adGroupRows","setAdGroupRows","createAdCampaignIdContext","AdCampaignIdProvider","setCampaignId","setAdCampaignId","AdCampaignIdContext","AdCampaignsDataContext","adCampaignsDataQuery","allCampaignData","AdCampaignsDataContextProvider","campaignDataQuery","useGetCampaignDataQuery","CAMPAIGN_DATA_QUERY_KEY","queryIdSearchParam","INVENTORY_USER_SETTINGS","getDefaultReturnUrl","queryParams","AdGroupEventSelector","filterCallback","BodySectionBody","AdGroupSelectError","EventSection","onSelectEvent","genreId","addEventDialog","onAddEventSave","onAddEventCancel","onAddEvent","contentNA","AddEventDialog","addEventForm","handleEventFilter","isCategoryOverrideMappingKey","categoryOverrideMappings","isCategoryIconManifestKey","categoryIconManifest","getCategoryIconFilename","categoryId","PerformerCategoryIcon","iconFilename","iconFilepath","getTopLevelCategoryIconFilepath","topLevelCategory","AdGroupGenreSelector","GenreSection","onSelectGenre","addGenreDialog","onAddGenreSave","onAddGenreCancel","onAddGenre","AddGenreDialog","addGenreForm","setGenre","AdGroupListingSelector","listingsData","addListingDialog","onAddListingSave","onAddListingCancel","onAddListing","listingDisplayText","enableButton","AddListingDialog","addListingForm","getListingsForEvent","getSectionsForEvent","sectionsData","setListing","AdGroupPerformerSelector","allPerformers","PerformerSection","onSelectPerformer","addPerformerDialog","onAddPerformerSave","onAddPerformerCancel","onAddPerformer","performerRef","AddPerformerDialog","addPerformerForm","setPerformer","tlc","AdGroupSectionSelector","SelectionBody","onSelectSeating","addSeatingDialog","onAddSeatingSave","onAddSeatingCancel","onAddSeating","AddSeatingDialog","addSeatingForm","setSeating","seatingId","AdGroupTicketClassSelector","ticketClassesData","TicketClassSection","onSelectTicketClass","addTicketClassDialog","onAddTicketClassSave","onAddTicketClassCancel","onAddTicketClass","AddTicketClassDialog","addTicketClassForm","setTicketClass","AdGroupCreateForm","AdGroupCreateModal","AdGroupCreateFormContent","curFormValues","adCampaignEntity","adGroupCreateInput","createAdGroupClientRequest","bidModifierValue","isManaged","baseKey","maxBidLessThanBaseBidMsg","dailyBudgetLessThanMaxBidMsg","validateForm","AdGroupCreateFormBody","namePlaceholder","setName","setBaseBid","setMaxBid","setDailyBudget","AdGroupCreateFormHierarchy","clearChildren","performerForEvent","parentTicketClass","parentSeating","AdGroupsToolbarDiv","FilterBarLeftSide","FilterBarRightSide","AdGroupsToolbar","SPONSOREDLISTINGS_USER_SETTINGS","AdCampaign","AdGroupsContent","errorInfoAdGroups","errorInfoCatalog","ExpandCollapsableContentButton","collapsableButton","AdGroupListingsFlattenedView","resolveListings","listingsArray","listingPromises","ticketClassPromises","filteredListings","sectionPromises","explicitEvents","eventsForVenues","matchedEvents","eventsForPerformer","eventsForGenre","listingsMapForEvents","processedListings","setProcessedListings","collapsedRow","AdGroupListings","useGetInboundEmailSellerGuidIds","MessagesAddSourceModal","guidsQuery","showCopiedText","setShowCopiedText","AddMessageSourceIcon","Tooltip.Provider","Tooltip.Root","Tooltip.Trigger","Tooltip.Content","Badge","BadgeWithCounts","EMAIL_NAV_PAGE_NAME_MAP","inbox","uncategorized","recentlyCategorized","EmailNavToolbar","pageName","uncategorizedEmailsCount","AccountDisabledNotification","notificationContainer","MerchantColorBadge","directOfflineContent","ConversationDataContext","getPurchaseOrderDetails","getSaleDetails","ConversationDataContextProvider","purchaseLookup","saleLookup","ConversationType","EMAIL_CLASSIFICATION_TYPE_TO_CONVERSATION_TYPE","convertEmailClassificationTypeToConversationType","convertConversationTypeToEmailClassificationTypes","conversationTypes","ConversationListItem","merchantName","conversationType","unread","inboundEmail","sellerSupportCase","setSubtitle","setContent","setListingNotes","merchant","setMerchant","supportCaseIdContent","orderIdContent","seatsContent","ticketsContent","fetchDisplayContent","miniCatalog","ConversationListItemDisplay","dateFormatter","dateStyle","timeStyle","EmailThreadItem","subject","receiveDate","fromEmailAddress","attachment","attachmentFileName","downloadUri","EmailThread","threadQuery","SellerSupportCaseDataContext","getSellerUserDetails","SellerSupportCaseDataContextProvider","userDetailsLookup","userDetails","AttachmentDisplay","attachmentInfo","showDelete","onDeleteClicked","isDownloadable","handleDownloadFile","downloadedFiles","requests","attachmentId","fileToDownload","AttachmentsPanel","SupportCaseNoteDisplay","createdByUserId","noteDate","setUserDetails","attachmentsInfo","setAttachmentsInfo","getUserDetails","fetchAttachmentMetadata","content_type","attachmentsResult","CONTENT_MAX_SIZE","SupportCaseReplyInput","sellerSupportCaseNotesIsLoading","onReply","windowHeight","useWindowSize","sendReply","onDeleteAttachment","attachmentToDelete","newAttachments","onUploadFileClick","attachmentsContent","att","SupportCaseBody","sellerSupportCaseNoteQuery","supportNoteData","supportNote","createByUserId","createDate","useGetSaleWithCatalogData","SwiperButton","dir","swiperRef","swiper","useSwiper","expandButton","slidePrev","slideNext","HotkeyDisplay","SidePanelPage","SaleEvent","createResizablePanelContext","useSidePanelContext","defaultSidePanelState","getSidePanelKey","sidePanelId","SIDE_PANEL_STORAGE_KEY","persistSidePanelState","sidePanelState","isFlyoverPanel","panel","getSidePanelState","stringifiedSidePanelState","SidePanelProvider","initialOpened","panelType","sidePanelType","loadedState","sidePanelWidthsSetting","hasSidePanelWidthsFeature","stateRef","setCollapsed","setHidden","sidePanelWidths","onUpdateSidePanelWidth","updatedWidths","useGetNoSelectedItemsLabel","useEventsAccordionSelectedLegend","singleElementLabel","multipleElementsLabel","eventText","selectedFromText","noItemsSelected","isAllGroupsMode","eventsCount","singleSelectedItems","selectedEventsLabel","selectedListingsLabel","SetInventoryEventAccordionSelectionCountLabel","listingsText","selectedLegend","SetInventoryMetricsSelectionCountLabel","eventsMap","selectedLabel","selectedEventsIds","useBulkEditBroadcastGlobalSettingsAction","eventToggleState","CatchUpAction","hasPricingCatchupFeature","onCatchUp","tabEventIds","activeEventId","catchUpEventUrl","bulkEditListingSettings","InventoryGlobalBulkActions","EventsTable","usePagination","detailedMetrics","singlePerformer","setGrouping","eventsColumnOrder","onRowSelectionChanged","onGroupingChange","enableGrouping","posTableHeadStyle","EventsTableWithInnerGrouping","columnSettingButton","highlightEvent","InventoryDetailedEventView","scrollToEventId","dayOfWeek","weekday","MetricGroup","metricGroup","metricValuePlaceholder","AverageTicketPriceDisplay","formattedTotalMetrics","MetricTile.Root","MetricTile.Title","MetricTile.Metric","SalesAndMarginDisplay","MetricTile.CircleProgressBar","TicketsListedAndSoldDisplay","MetricTile.FractionMetricText","useGeSummaryMetricsQuery","mergeCatalogMetrics","getCatalogSummaryMetrics","eventIdsToGetSummaryMetricsFor","metricsToSummarize","normalMetrics","evId","evMetrics","summaryMetricsQuery","prototype","summaryMetrics","useGetActiveAccountClientConfig","requestName","getActiveAccountClientConfig","newLogin","EVENT_DETAILED_METRICS_QUERY_KEY","filterInvisibleGroups","deepOverrideListing","dataToOverride","override","mergeCatalogListings","overrideById","getCatalogSectionalDataExpanded","listingQuery","curListings","overrideListings","resultMetrics","decimalDigits","getEventDetailedMetrics","listingQueryValueTransformFromUrl","listingQueryValueTransformToUrl","PerformerVenueDisplayContainer","GROUPING_METRICS_PLACEHOLDER_DIMS","PerformerVenueDisplay","onPerformerVenueClicked","metricsData","hideMetrics","displayMetrics","hasCategory","PerformerVenueFilterBarDiv","PerformerVenueFilterBar","groupingQuery","onGroupingQueryChanged","performerFilterEditability","venueFilterEditability","debouncedOnSearchChange","onSelectorChange","activeReportFilterId","activeEditability","activeValueOptionsContent","SelectedPerformerVenueContainer","SelectedPerformerVenueListContainer","SelectedPerformerVenueList","selectedPerformerVenues","mg","SelectedPerformerVenuesDivider","isOpened","clickable","upIcon","PerformerVenueList","updateTempQuery","defaultGroupingQuery","setGroupingQuery","debouncedGroupingQuery","setDebouncedGroupingQuery","debounceWrapper","selectedPerformerVenuesWithType","setSelectedPerformerVenuesWithType","selectedDividerIsVisibleInList","setSelectedDividerIsVisibleInList","selectedDividerButtonShouldBeVisible","setSelectedDividerButtonShouldBeVisible","showSelectedList","setShowSelectedList","updateSelectedPerformerVenues","newSelectedPerformerVenues","selectedPerformerVenuesOtherType","newFilterQuery","performerGroupings","venueGroupings","filterPerformerVenues","groupings","filteredGroups","curSelectedIds","newAllIds","updateSelectedIds","mg2","isMatchingSearch","sg","selectedPerformerVenuesMap","getNonEmptyPerformersAndVenues","perfs","getItemsToDisplay","unselected","indexOfDivider","onItemsRenderedHandler","showSelectedPerformerVenuesList","NoMatchingContent","BulkEditStatusPopoverContent","BulkEditStatusPopover","isPopoverOpen","setIsPopoverOpen","showSpinner","setShowSpinner","isDone","onRefreshDoneData","MultiSelectionToggleGlobal","onMultiSelectListingClick","useFiltersHelpers","ignoredKeys","allVisualFiltersIds","EventDateSelector","eventTimeFrame","timeFrameLabelRecord","allEventsLabel","onEventTimeFrameChanged","timeRange","isCustomDateRangeSelected","useDiscoveryFilters","eventFilter","cleanCustomFilters","useQuickFilters","quickFiltersStateSetting","customQuickFiltersSetting","defaultQuickFilters","useUserSetting","defaultQuickFiltersState","quickFiltersState","setQuickFiltersState","defaultCustomQuickFilters","_customQuickFilters","setCustomQuickFilters","customQuickFilters","processFilter","filterSortKeys","filterMap","NEGATIVE_INFINITY","originalIndex","POSITIVE_INFINITY","toggleQuickFilter","draftState","moveQuickFilter","overId","movedIds","createCustomQuickFilter","cleanData","deleteCustomQuickFilter","updateCustomQuickFilter","updatedFilter","QUICK_FILTER_SEARCH_PARAM_KEY","useQuickFilterSearchParam","useFilterToolbarQuickFilters","currentQuery","useQuickFiltersOptions","selectedQuickFilterId","setQuickFilterParam","resetQuickFilterParam","MetricViewIcon","EventEntitySearchBox","onIdLookup","onEventSearch","clearSearchEntity","placeholderContentId","disableSearchMode","OnSaleEventSearchBox","onSaleEventQuery","useDefaultOnSaleEventFilter","next7DaysRange","next30DaysRange","DISCOVERY_VIEW_MODE_TO_ICON","OnSaleEventFilterBar","filterToolbarProps","filterToolbar","useMergedTagFilters","includeEventTags","tagFilters","useTagFilters","eventTagFilters","useEventTagFilters","tagsFilterGroup","useStandalonePurchaseVendorAccountSelector","purchaseVendorAccountsMap","setPurchaseVendorAccountsMap","purchaseVendorQuery","noVendorIds","onPurchaseVendorAccountsListChange","purchaseVendorAccounts","pvaMap","pva","purchaseVendorAccount","purchaseVendorAccountsList","multiSelectOptions","purchaseVendorAccountsQuery","purchaseVendorAccountsByVendorIds","StandalonePurchaseVendorAccountsSelector","selectedPurchaseVendorAccounts","setSelectedPurchaseVendorAccounts","purchaseVendorAccountsMapWithSelected","selectedPurchaseVendorAccountEmails","allPurchaseVendorAccounts","emailAccounts","purchaseVendorAccountId","cleanEmailAccounts","cleanPurchaseVendorAccounts","purchaseVendorAccountEmails","cleanPurchaseVendorAccountIds","adaptPurchaseVendorAccountsToPurchaseVendorAccountsMap","MetricsIcon","useVendorAccessControlProvidersSelector","availableAccessControlProviders","VendorAccessControlProvidersSelector","usePurchaseInfoFilters","showCommissionerFilter","showMetricsIndicationOnFilters","isReportPage","hasFilterByCommissionUserFeature","vendorAccountQuery","metricsIconNote","PosEnumMultiSelect","EventSelector","hasNoEvent","useEventStateFilters","isChanged","useCommonEventFilters","showCatalogFilters","additionalFilters","hasCatalogFilters","locationFilters","eventStateFilters","hideCatalogFilters","purchaseMandatoryFiltersToShow","usePurchaseFilters","showConsignmentFilter","hasFilterByCurrencyCodeMultiFeature","hasFilterByCurrencyCodeFeature","hasFilterByPaymentCurrencyCodeMultiFeature","hasFilterPOByPaymentMethodIdFeature","internalNotesFilter","purchaseInfoFilters","tagsFilter","costHandle","newPaymentCurrencyCodes","newPurchaseOrderState","low","high","newCurrencyCodes","PurchaseGlobalActionsPermissionsWrapper","useDefaultPurchaseFilters","purchaseVendors","ticketmasterVendorId","TileViewIcon","PURCHASE_VIEW_MODE_TO_ICON","PurchaseOrderBasicInfo","purchaseOrderIdLabel","vendorLabel","vendorAccountNameLabel","purchaseDateLabel","PurchaseSearchBox","hasFullPageEventViewEntitySelection","searchId","setSearchId","searchResults","setSearchResults","isLoadingSearch","setIsLoadingSearch","onLookupById","idText","idNum","idStr","matchedIds","poInfo","PurchaseFilterBar","isAddSourceModalOpen","setIsAddSourceModalOpen","hasBulkEditInPurchaseEventFeature","hasNewSearchFeature","onCloseAddSourceModal","onAddPurchase","purchaseFilters","fromPosEventId","useDefaultSaleFilters","saleQuery","last30DaysPreset","SALE_VIEW_MODE_TO_ICON","SaleIdContainer","AttrValue","SaleBasicInfo","saleIdLabel","marketplaceLabel","SaleSearchBox","saleQuerySearchText","activeDeepLinkSaleId","SaleFilterBar","isSearchOnly","saleFilters","useSaleFilters","saleMandatoryFiltersToShow","MainFilterBar","sharedProps","TagValueFilterInput","noTagsMsg","selectedTagMetadata","noTagsExist","useEventLastReviewedFilters","MAX_NUMBER_OF_TICKETS_HELD","listingsMandatoryFiltersToShow","useListingFilters","isReportsPage","eventLastReviewedFilters","hasAutoFulfillSetting","autoPricingFilter","adminHoldFilter","seatingFilters","additionalEventFilters","filterEnumValue","eventFilters","notesFilters","purchaseInfoFiltersBase","ViewModeSelector","viewModeSettingsId","viewModeCidMap","viewModeIconMap","setViewModeUserSetting","debouncedOnViewModeChange","selectedViewMode","effectiveViewMode","ContainerStyledDiv","isHorizontal","ContentStyledDiv","shouldAnimateContent","MIN_PANEL_SIZE","MAX_PANEL_SIZE","ResizeEdge","North","South","East","West","ResizablePanel","initialSize","sidePanelPage","autoHide","minPanelSize","maxPanelSize","minPanelPercent","maxPanelPercent","defaultRatio","showExpandButton","disableAnimation","setDisabledAnimation","lastHandleRect","getMaxSize","parentBound","parentSize","setSize","getMinSize","updateSize","actualSize","actualContent","bound","proposedSize","defaultSize","onDrag","handleRect","deltaX","deltaY","delta","divider","DraggableCore","isHandleInFront","only","SidePanelButton","useDefaultListingFilter","next2WeeksRange","INVENTORY_VIEW_MODE_TO_ICON","ListingBasicInfo","listingIdLabel","ListingSearchBox","listingInfo","ListingFilterBar","FlyoverPanel","componentDidInit","setComponentInit","ModalHeaderContent","ExplorerLayout","leftPanelContent","leftPanelFlyover","rightPanelContent","rightPanelFlyover","initialSlide","mainRef","SwiperComponent","snapOnRelease","subPanel","createPurchaseSearchPageUrl","searchResultId","createSaleSearchPageUrl","createInventorySearchPageUrl","InventoryEventsExplorer","onPerformerVenueRendered","onEventsRendered","onAdvancePurchaseSearch","searchUrl","hasSectionalLoadInListingTable","getCatalogDataExpandedCallback","onCatalogDataExpandedCallback","ListingRouteBody","getActClientCfg","curEntity","activeClientCf","listingDetail","isSidePanelFlyover","InventoryEventSummaryMetrics","hasBlockInventorySummaryStatsFeature","selectedEntity","selectedPerformersCount","selectedVenuesCount","hideMobile","SummaryTile.Root","SummaryTile.Body","SummaryTile.Title","SummaryTile.Description","SummaryTile.MetricGroup","SummaryTile.Metric","useEventFlattedViewSelectedLegend","isNoGroupSelection","SetInventoryFlattenedViewSelectionCountLabel","InventoryFlattenedView","doNotShowToolbar","bulkToolbarContainer","InventoryEventListing","onInventoryEventExpanded","returningFromViagogoEventId","setReturningFromViagogoEventId","fromViagogoEventId","eventIdFromHash","listingItem","SetSalesEventAccordionSelectionCountLabel","saleText","SetSalesFlattenedViewSelectionCountLabel","SalesGlobalBulkActions","SubfilterContainer","SubfilterGroupItem","SubfilterGroup","useQuickSubfilters","quickSubfilters","currentQuickFilterId","filteredQuickSubfilters","SalesFlattenedView","SalesEventListing","onSalesEventExpanded","quickSubfiltersInit","todayPreset","last7DaysPreset","recentlySold","Subfilters","salesItems","saleItem","EventListing","SalesEventsExplorer","SALE_USER_SETTINGS","allSales","salesQueryValueTransformToUrl","salesKey","salesQueryValueTransformFromUrl","SaleContextProvider","SalesRouteBody","saleDetail","SaleSearchAccordionListContext","SaleSearchAccordionList","onSelectSale","SaleAccordionItemHeader","SaleAccordionItemBody","getClassificationTypeToCid","ClassifyEmail","onEmailClassified","orderIdInUseMessage","orderIdInUseSameVendorMessage","orderIdDoesNotExistMessage","orderIdDoesNotExistForVendorMessage","classificationTypeToCid","defaultClassificationType","resetEmailPurchaseOrderContext","watchedClassificationType","watchedPurchaseOrderVendorId","orderIdInUseQuery","orderIdUsedByPurchaseOrderIdsResult","classifyNewOrderAsExistingOrder","createNewOrderForExistingOrder","getClassifyEmailModalConfig","HOTKEY_LETTER_MAP","transfer","private","junk","ConversationHeaderDisplay","conversationTitle","showClassifyOptions","isDropdownOpen","setIsDropdownOpen","setCanReprocessEmail","showReprocessConfirmDialog","setShowReprocessConfirmDialog","canReprocess","onClassifyPurchase","onClassifySale","onClassifyTransfer","onClassifyPrivate","onClassifyJunk","onReprocessEmail","onConfirmReprocessEmail","userAgent","UAParser","hotkeyPrefixText","getOS","hasEntityId","menuContent","DropdownMenu.Item","DropdownMenu.Root","DropdownMenu.Trigger","ConversationMainPanel","useParams","sellerSupportCaseQuery","isMostRecent","inboundEmailQuery","inboundEmailIds","EmailHeaderDisplay","setMerchantName","eventInfos","setEventInfos","eventInfoMap","messageSaleDataQuery","saleCatalog","SupportCaseHeaderDisplay","generalMessageContent","displayEmail","setDisplayEmail","ConversationMainDisplay","NUM_TAKE","useClassifiedInboundEmails","inboundEmailsClassifiedQuery","flattenedData","inboundEmailsClassified","inboundEmailsTotalCount","defaultConversationFilter","CONVERSATION_FILTER_TYPES_MAP","support","getCategoryConversationTypes","createConversationSearchParam","ConversationFilter","supportCaseOnly","relative","UnreadFilter","allCount","unreadCount","isUnread","float","sellerSupportCaseToConversationData","supportCase","lastNoteDate","unreadNoteCount","inboundEmailToConversationData","ConversationSidePanel","activeInboundEmailId","activeSellerSupportCaseId","sellerSupportCases","sellerSupportCasesIsLoading","sellerSupportCasesIsError","filteredConversationTypes","classifiedEmailIsLoading","classifiedEmailIsError","conversationData","supportCasesMapped","inboundEmailsMapped","filteredDataByType","conversation","cmpResult","onConversationClicked","conversationInfo","PurchaseEmailDisplay","emailDate","orderDate","PurchaseOrderDetail","usePartialPurchaseOrderInboundEmails","EmailList","classifiedInboundEmailIds","useMatches","includeUnclassified","partialPurchaseOrderInboundEmail","parentMatch","MessagesExplorer","addClassifiedInboundEmailId","SEARCH_DELAY_MS","DEFAULT_QUERY","subjectSearchText","textBodySearchText","classificationTypeUpdateDateFrom","classificationTypeUpdateDateTo","RECENTLY_CATEGORIZED_CLASSIFICATION_TYPES","isPageNameHandle","handle","messagesText","searchForMessagePlaceholderText","setQueryDebounced","uncategorizedEmailsCountQuery","DocumentTree","onNodeClick","renderNode","elementProps","useGetHelpData","shouldQueryAvailableData","allAvailableData","getDataContent","tutorialItemId","allAvailableKbs","helpCenterText","treeContent","setTreeContent","displayContentIsLoading","setDisplayContentIsLoading","setDisplayContent","extractTitle","recursiveSearch","treeData","allTreeNodes","sortVal","tutorialItemType","allTreeNodesMap","tree","parentTutorialItemId","onDocumentClick","tutorialNode","treeHook","useTree","expandAllNodes","collapseAllNodes","contentHtml","ReleaseNoteDisplayDialog","onReleaseNotesRead","setActiveIndex","totalSlides","NewFeatureDisplay","alignLeft","BugFixesDisplay","releaseNotes","GET_RECENT_ACTIVITY_LOG_KEY","ACTIVITY_LOG_POLLING_INTERVAL","useLiveActivityLog","refetchIntervalInBackground","ActivitySection","activityLogId","MetricsSection","quickFilterId","NotificationDisplay","notificationIntent","onGoToEntity","onDismiss","NOTIFICATION_INTENT_MAP","ConnectedNotificationDisplay","entityTypeContent","getNotificationTypeContent","parsedContent","NotificationsSection","recentNotifications","IconAlarmAdd","defaultRecentSalesColumns","RecentSalesTable","PREVIOUS_DAYS_TO_PULL","NEW_ROW_ACTIVE_DURATION","RecentSalesSection","salesFilterQuery","previousValues","setNewRows","hasUnprocessedOrdersHoldingPenFeature","handleTabChange","isUnprocessedOrdFromPro","isInitial","isNewRow","hasViewSalesPermission","hasViewListingsPermission","hasNotificationsAccess","releaseNotesUnread","releaseNotesDialog","formattedMetrics","hasHomePageActivityLogFeature","MetricTilesSection","rn","StubHubListingsManualPricingContext","onQuantityFilterChanged","onSectionZoneFilterChanged","onSectionFilterChanged","onRowFiltersChanged","resetFilters","sectionIdFilters","hasActiveFilters","useStubHubListingManualPricingContext","StubHubListingManualPricingContextProvider","setQuantityFilter","setRowIdFilters","setSectionRowIdFilters","clearGroupItems","prevSections","sectionMap","prevFilters","newFilters","rowIdFiltersNew","sectionRowIdFiltersNew","quantityFilterNew","useEventLastReviewedDateTime","eventLastReviewedQuery","onUpdateLastReviewedDateTime","eventLastReviewed","isCompleted","loadEventLastReviewed","EventLastReviewedContext","onSettingVirtualIds","useEventLastReviewedContext","EventLastReviewedContextProvider","setEventLastReviewedLookup","setViagogoEventIds","queryData","virtualViaIds","existingIds","viewedAt","FadeAnimationDuration","GracePeriod","LoadingButton","animationStyle","setAnimationStyle","clearAnimation","timeout","useSellerEventNote","notesQuery","addNoteMutation","newNote","previousNotes","old","addNote","InventoryEventCatchUpPrevButton","prevButtonDisabled","InventoryEventCatchUpNextButton","nextButtonDisabled","InventoryEventCatchUpCard","isReviewed","InventoryEventCatchUpDropdown","cardProps","InventoryEvehtCatchUpDrodownItem","InventoryEventCatchUpBar","cardPropsOld","accordionItemProps","cardPropsNew","viagVirtIds","childElements","useEventSupplyMetrics","isOnSaleEvent","setTimePeriod","supplyMetricsQuery","supplyMetrics","onUpdateTimePeriod","useSellerEventMetrics","sellerPerformanceMetrics","useCrossSellerEventMetrics","eventPerformanceMetrics","useEventWebsiteMetrics","websiteMetrics","EventMetricsContext","ticketCountSeries","ticketPricesSeries","updateTimePeriod","performanceMetrics","marketShares","ticketPricePercentiles","EventMetricsProvider","isLoadingSupply","supplyTimePeriod","onUpdateSupplyTimePeriod","isLoadingPerformance","performanceTimePeriod","onUpdatePeroformanceTimePeriod","isLoadingWebsite","websiteTimePeriod","onUpdateWebsiteTimePeriod","eventMetricsMap","formattedProfitAndLoss","ticketQuantity","supplyData","ticketCountEntries","minEntries","p25Entries","p50Entries","p25","p50","p75","ticketsOnPlatform","supplyMetricsData","websiteMetricsData","performanceMetricsData","mktShares","useEventMetrics","HeatMapColorSteps","HeatMapColors","HeatMapColorForNoScore","normalizedScore","useHeatMapColor","HeaderWidgetContainer","SectionClearingPricePercentile","percentileLabel","percentileDisplayValue","EventSectionClearingPriceSectionDisplay","sectionClearingPricesBySectionId","prices","p01","p99","EventSectionClearingPricesTableColumnId","SectionName","P01","P75","P99","getMoneyCell","EVENT_SECTION_CLEARING_PRICES_TABLE_COLUMNS_CONFIG","EventSectionClearingPricesTable","sectionClearingPrices","sectionsText","reversedHeatMapColorsForALeftToRightLegend","EventSectionClearingPricesWidgetsContainer","sectionClearingPricesText","eventSectionClearingPrices","sectionScoreOverrides","filteredEventSectionClearingPrices","TimeSeriesLineChartUnit","getXAxisRelativeLabel","unit","diffInMilli","TimeSeriesLineChart","labelUnit","unitType","hourText","hoursText","dayText","weekText","weeksText","seriesData","formatXAxisLabel","diff","formatYAxisLabel","formatTooltip","tooltip","headerFormat","pointFormatter","dateTimeLabelFormats","gridLineColor","DashboardWidgetTile","EventSupplyWidget","measureRef","EventSupplyWidgetsContainer","supplyText","hasLastDaySupplyMetricsFeature","lastNinetyDays","timePeriodValueOptionsContent","capitalize","EventWebsiteMetricWidget","MaybePercentageChangeMetric","numberFormatOptions","MetricTile.PercentChangeMetricText","EventWebsiteMetricWidgetsContainer","rightNowText","last1HourText","last24HoursText","eventVisitors","visitorsInCheckout","totalTicketPriceInCheckout","DistributionPieChartWidget","distributions","spacingBottom","spacingTop","spacingRight","spacingLeft","layout","itemHoverStyle","textStrongHover","squareSymbol","symbolWidth","symbolRadius","pie","dataLabels","borderWidth","allowPointSelect","pointFormat","showInLegend","innerSize","TicketsListedAndSoldWidget","progressBarValue","progressBarLabel","SalesAndLiftWidget","TempAverageTicketPriceWidget","ZERO_STUBHUB_MARKETPLACE_SHARE","mktPlc","share","MarketShareDistributionChart","marketplaceSharesToRender","shares","SellerEventPerformanceMetricWidgetsBody","SellerEventPerformanceMetricWidgetsContainer","yourStatsText","allTimeText","last7DaysText","dashboardStyles","DashboardSection","showYourStats","InventoryEventDashboardSection","ApplyHeatMapToAllEventsDialog","onApplyToAllEvents","NEGATIVE_BACKGROUND_COLOR","NEGATIVE_FOREGROUND_COLOR","POSITIVE_BACKGROUND_COLOR","POSITIVE_FOREGROUND_COLOR","NEGATIVE_TEXT_COLOR","POSITIVE_TEXT_COLOR","DARKMODE_NEGATIVE_BACKGROUND_COLOR","DARKMODE_POSITIVE_BACKGROUND_COLOR","DARKMODE_POSITIVE_FOREGROUND_COLOR","RowRelativeScoreDisplay","rowRelativeScoreInfo","graphWidthPercentage","percentage","isBase","rowOrdinalFormatText","TEXT_COLOR","AXIS_COLOR","PATH_COLOR","INVALID_COLOR","isHitResultType","BezierGraphManager","minLabel","maxLabel","midLabel","fixedSegmentAmount","hideAxes","hideActionLabel","horizontalGraph","pathColor","deltaTransform","canManageControlPoints","handleSize","labelHeight","hitTestOptions","segments","handles","tolerance","scope","localPlotBounds","actionLabel","verticalAxisLabel","axes","verticalIntersector","plot","PaperScope","setup","Tool","Color","Path","Point","PointText","Rectangle","Segment","project","tool","currentStyle","fontFamily","rotation","strokeColor","selectedColor","strokeScaling","applyMatrix","prevMouseMoveEv","hitType","segment","startMouseDownPoint","startSegmentPoint","startSegmentHandleIn","startSegmentHandleOut","modifiers","setActionLabel","hitResult","hitTest","point","shift","isLast","handleIn","handleOut","localEvPoint","globalToLocal","smooth","next","clone","onMouseDrag","localStartMouseDownPoint","localDelta","subtract","pointDelta","newPoint","minX","maxX","isPathValid","onMouseUp","_ev","draw","getViewSize","viewSize","getSegments","calcScreenCoordOutput","firstSegment","lastSegment","intersections","getIntersections","calcOutput","drawActionLabel","setLabels","drawLabels","setPath","inputSegments","removeSegments","fullySelected","exportPath","serializedSegment","hasHandles","addMouseUpEventListener","removeMouseUpEventListener","isInside","getPlotBounds","bounds","drawAxes","drawPlot","plotBounds","horizontalAxisLabelY","matrix","translate","scale","rotate","BezierGraph","calcOutputRef","exportPathRef","onPathSetFromSegments","onResized","managerRef","viewportHeight","viewportWidth","manager","customEv","canvasRef","observer","MutationObserver","setRef","currentViewSize","GRAPH_WIDTH_PERCENTAGE","DEFAULT_ROW_GAP_PX","ROW_GAP_RATIO","INITIAL_ROW_SCORE_SEGMENTS","calcCoordinateForRow","rowDataToEdit","gapHeight","totalDivHeight","calcBoundsForRow","xMin","xMax","findRowIndexForX","getUpdatedRowData","calcScoreOutput","baseRowSegmentX","baseRowIdx","ChangeRowScoreBody","rowList","initialSegments","calcScoreOutputRef","exportScorePathRef","onUpdateRowScores","rowScoreFilter","rowScoreOverrideFilter","ChangeRowScoreBodyMultiSection","setRowDataToEdit","configPayload","setConfigPayload","initialSegmentsFromConfig","singleRowRef","newRowDataToEdit","configObj","scoreSegmentsBySection","activeRowIdsBySection","baseRowIdBySection","baseRowOrdinal","baseRowId","initializedRef","ChangeRowScoreBodySingleSection","isNumRowsChanged","setIsNumRowsChanged","graphSegments","segmentsConfig","findScoreOverrideByRowId","sortRowData","rowDataArr","ordinalAvailable","nameAvailable","ChangeRowScoreDialog","newConfigPayload","setNewConfigPayload","sectionScoreOverride","rowToScore","medianRowId","baseRowScore","rowScores","isBaseRow","existingRowScore","newSectionScoreOverrides","baseRow","baseOrdinal","ordinals","sanitizedOrdinal","baseRowPercentage","rowScoreOverrideToEdit","ChangeRowScoreDialogMultiSection","confirmDialog","maxRowNumber","eligibleRows","allRowData","configPayloadObj","selectedScoreSegments","common","baseRowIndex","sanitizedIndex","sectionNameWithEllipsis","maxSectionsToShow","AddSectionRowsDialog","onAddRows","onSubmitChange","onRowInputChange","onAddRow","SortableCell","isNew","CellItem","inlineStyles","transformOrigin","indexFromCellId","ordinalWithSuffix","num","remaining","hundreds","getRowColumns","maxRowCount","getSectionColumns","rowCount","unordered","SectionRowTableRow","SectionRowTable","onSwapCell","onSelectSections","canCustomRows","setActiveId","handleDragStart","activeCell","overCell","activeRow","overRow","handleDragCancel","rectSortingStrategy","sortSectionName","useTableData","idToSection","sectionToZoneId","setOverrides","enrichedOverrides","sectionToOverrides","minRowId","newOverrides","onSwapOrdinals","SectionRowTableDialog","onSectionRowChange","hasCustomVenueRowsFeature","addRowsDialog","maxLength","ChangeMultiSectionsScoresDialog","onSubmitSectionScoreChange","existingScores","changeRowScoreDialog","setScores","selectedSectionsMap","onRowSeatScoreChanged","minNumRowsSelectedSections","sanitizedSections","scoredRows","onChangeSingleSectionScore","onBulkChangeSectionScore","onRelativeChangeAllScore","percentageChange","absoluteChange","validScore","sanitizedScore","ChangeSectionScoreDialog","existingScore","setScore","getSurroundingSections","flexBasis","useEventHeatMapSectionHandler","setSurroundingSections","EventVenueHeatMap","changeSectionScoreDialog","changeMultiSectionsScoresDialog","currencyDisplay","onLaunchingSingleSectionDialog","onSectionSeatScoreChanged","onMultiSectionsSeatScoresChanged","newScores","notFoundSections","SeatMapCard","isInteractive","isSmall","DeleteHeatMapTemplateConfirmDialog","ROW_HEIGHT","ROW_GAP_HEIGHT","RelativeScoreGraph","RelativeScoreGraphRow","showRemoveButton","negativeWidth","positiveWidth","RelativeScoreGraphBezier","setSegments","totalHeight","centerToCenterHeight","ROW_COUNT","INITIAL_SEGMENTS","firstPointX","SeatScoreQuantityMultiplerGraph","setValues","EventAutoPricingSettingsFormContent","allowAutoPriceFrequency","eventWideAutoPricing","eventAutoPricingNew","AutoPricingFrequencyInput","useEventAutoPricingSettings","hasEventPricingPermission","CompListingSameQualitySettings","EventAutoPricingSettings","hasAnyScore","hasAutoPriceFrequencyFeature","EventPricingSeatMapBody","hasScoreSectionRowTableFeature","hasEditMapInListingTabFeature","hasIntelligibleAutoPricingFeature","sanitizedScoreModel","modeledSectionScores","eventScoreOverride","newModelName","sectionRowDialog","newOverride","onSavingSeatMap","allSections","sectionWithRowsWithOrdinal","scoreName","EventPricingSeatMap","EventPricingSeatMapFormBody","EventPricingSeatMapContent","refreshAutoPricingSettings","applyToAllEventsForConfig","setApplyToAllEventsForConfig","promises","oldId","SeatScoreConfigCard","importance","showChildren","onIncrementImportance","onDecrementImportance","body3","UploadSeatScoreModal","onUploadedFileChange","onCsvFileUploaded","modalHeaderStyles","INITIAL_ANGLE_SEGMENTS","INITIAL_DISTANCE_SEGMENTS","INITIAL_HEIGHT_SEGMENTS","EventSeatMapConfigBody","nearText","farText","lowText","highText","isAdvancedMode","setIsAdvancedMode","getAngleImportance","setAngleImportance","useGetSet","getDistanceImportance","setDistanceImportance","getHeightImportance","setHeightImportance","calcAngleOutputRef","calcDistanceOutputRef","calcHeightOutputRef","exportAnglePathRef","exportDistancePathRef","exportHeightPathRef","graphVariables","hasAngle","angle","maxAngle","hasDistance","dist","maxDistance","hasHeight","angleImportance","distanceImportance","heightImportance","templateOverrideScores","onCalculateSeatScores","calcAngleOutput","calcDistanceOutput","calcHeightOutput","sectionWithScoreOverrides","angleSegments","distanceSegments","heightSegments","isUploadSeatScoreModalOpen","setIsUploadSeatScoreModalOpen","setUploadedFile","configNameError","hasAnyPhysicalMetadata","EventSeatMapConfig","onSaveConfigOverride","EventSeatMapConfigContent","newConfigOverride","modalDetailsMaxHeight","GlobalConfigPayloadCard","updateDate","createDateFormatted","updateDateFormatted","GlobalConfigPayloadSelection","onConfigPayloadSelection","eventConfigScoreOverridesForEvent","sellerConfigPayloadsFromOtherVenueConfigs","NewHeatmapAvailableNotification","EventSeatMapSelection","fromTabView","EventSeatMapSelectionContent","launchSelectDialog","closeSelectDialog","selectDialogProps","selectedMapIdToDelete","setSelectedMapIdToDelete","selectedRecommendedMap","setSelectedRecommendedMap","performerVenueSpecific","venueSpecific","setEventSeatMapScoreOverrideMutation","deleteEventSeatMapScoreOverrideMutation","initialEventConfigScoreOverrideId","selectedEventConfigScoreOverrideId","setSelectedEventConfigScoreOverrideId","selectedConfig","onEditSeatMap","disabledButtons","InventoryEventEditMapSection","InventoryEventEditMapSectionBody","InventoryEventEditMapSectionContent","applyToAllDialog","useSellerAccountEventSettings","updateSellerAccountEventSettings","isMutationLoading","AutoFulfillCell","subMinutes","TicketTypePriorityPill","ticketTypePriority","blockedTxt","TicketTypePriorityCell","VendorCell","allVendorsText","availableVendorOptions","isAllVendorsSelectedInOtherRows","EventSettingForm","onDeleteSetting","hasNoChangeOrIsDeleteOnly","formValuesettings","formValueSetting","matchingSetting","InventoryEventFulfillmentSection","inventoryAccordionItem","numVendors","canAddNew","onCreateNewSetting","newSetting","newSettings","sectionStyles","borderTop","DefaultRefreshFrequency","TimeDistance","frequency","includeSeconds","timeDistance","setTimeDistance","updateAgo","InteractiveButton","DateTimeRefreshFrequency","LastReviewedDisplay","onUpdateLastReviewed","InventoryEventInfoSection","setSelectedListingIds","hasEventListingTableHotkeysFeature","isSelectionModeOn","DEFAULT_TOP_N_TRANSACTIONS","useGetMarketTransactionsForEvent","transactionsQuery","MARKET_TRANSACTIONS_TABLE_COLUMNS_CONFIG","quantityPurchased","sellerCurrencyCode","MarketTransactionsTable","marketTransactions","transactionsText","marketTransaction","InventoryEventTransactionsSection","toExperimentName","experiment","formatedStartDate","formatedEndDate","discountPercentage","CreateExperimentDialog","CreateExperimentDialogContent","onCreateExperiment","onUpdateExperiment","discount","minDiscountText","hasFlashSaleDiscountRestriction","hasBadDiscountValue","listingGroupOptions","useListingExperiments","listingExperimentQuery","createExperimentMutation","updateExperimentMutation","stopExperimentMutation","restartExperimentMutation","onStopExperiment","onRestartExperiment","experiments","StatusIcon","ExperimentStatus","ActionCell","onResumeExperiment","getTableColumnDefinitions","ListingExperimentTable","experimentsText","InventoryPricingABTestSection","createExperimentDialog","selectedExperiment","setSelectedExperiment","availableListingGroups","usedListingGroupIds","listingGroupName","exp","onCloseDialog","filterListingItemsBySectionRow","listingSectionId","ManualPricingSection","ownListings","ticketClassIdColorMap","colorMap","filterListingItemsBySectionRowWrapper","ownListingsMapped","lgi","ownListingsStubHubListingIds","compListingsMapped","useEventTags","tagsQuery","updateTags","SortableZoneAreaItem","VenueZoneSectionGroupDraggableList","customSectionGroups","sectionGroupName","sectionGroupAreaContentId","sortabledSectionGroups","sortedSectionGroups","customGroupsWithId","csg","sectionGroupRank","areaRank","ro","updatedRankOverrides","ssgId","newSectionSectionGroupLookup","ssg","sgRank","newCustomSectionGroups","VenueZoneSectionGroupList","SectionGroupPanel","useCustomRank","setUseCustomRank","addSectionGroupDialog","onAddSectionGroup","newCustomSectionGroup","VenueZoneSectionGroupDropdownList","selectedSectionSectionGroup","setSelectedSectionSectionGroup","selectedSectionGroup","ChangeZoneMapSectionGroupDialog","sectionIdMapping","VenueZoneMap","changeSectionGroupDialog","onSectionZoneChanged","newSectionSectionGroup","newSectionGroupIdMap","VenueZoneMapFooter","setSelectedOverrideId","selectedConfigType","setSelectedConfigType","setVenueZoneConfigTypeOverrideMutation","onVenueZoneMapClick","useVenueSectionRow","useSanitizedScoreModel","useModeledSectionScores","venueMapData","VenueZoneMapSubmitButton","setLocalName","setIsDirty","handleNameChange","hasVenueRowChanges","sectionSectionGroupsJson","saveAsNewMap","overrideName","InventoryEventVenueZoneMapSection","InventoryEventVenueZoneMapSectionBody","customRank","InventoryEventZoneMapSectionContent","useGetEventSellThroughRates","sellThroughRatesQuery","SellThroughRateGraphBody","actualText","todayText","strTargets","containerWidth","todayDate","sellThroughRates","timelineDate","sellThroughRate","sellThroughRatePercentage","dataMapped","sellThroughRatesSorted","sellThroughRatesExtrapolated","strItem","valueSuffix","valueDecimals","strTargetItem","dashStyle","symbol","plotLines","tickColor","spline","useSellerEventSellThroughRateTargets","sellThroughRateTargetsQuery","sellThroughRateTargetsMutation","SellThroughRateTargetInput","setIsEditing","formValue","onRowRemove","newStrTargets","onRowAdd","SellThroughRateTargetInputRow","SellThroughRateSection","defaultStrTargets","SellThroughRateSectionBody","TABS_NONE","TabWithStarIcon","onIconClick","defaultTab","tabType","iconHovered","setIconHovered","InventoryEventPageContent","hasPricingV2DemandDashboard","hasRecentTransactionsAccess","hasEventDeliveryStrategyFeature","hasPricingABTestFeature","hasEditMapInListingTab","defaultInventoryTabUserSetting","setDefaultInventoryTabUserSetting","defaultInventoryTabLoading","setDefaultTab","InventoryEventTabs","onSetDefaultTabClick","ManualPricing","InventoryHeaderAction","InventoryEventPageHeaderCondense","eventVenue","metricValue","rootWrapper","scrollDownButton","eventDateWrapper","eventInfoWrapper","metricValueWrapper","MarketplaceEventEditDialog","mkpEventInfos","newMkpEventInfos","MarketplaceEventEditDialogBody","activeMarketPlaceName","setActiveMarketPlaceName","onSaveClick","stripTrailingSlash","isUrl","handleEventOverrideChange","sanitizedString","eventOverrideId","urlComponents","eventIdx","productionIdx","eventsIdx","isSearchingEvent","mainDialogProps","eventSearchDialogProps","eventsSearchResults","eventSearchResult","useEventMapConfigMetadata","eventMapConfigQuery","NewEventMapBanner","openEventMapView","hasEventMapRibbonYoloFeature","firstTimeFeaturesViewed","configTypeContentId","selectedVenueMapConfigType","configTypeString","configTypeFormatted","defaultConfigType","showBanner","useUnmount","EventVenueMapContent","CollapsibleSettting","altTitle","EventMapDetailSimpleActionGroup","subHeader","EventVenueMapDetailsPanelFooter","EventVenueMapSelector","EventVenueMapDetailsPanel","eventMapText","zoneMapText","venueRowDataText","venueRowDataDescText","setAsDefaultText","setAsDefaultDescText","EventVenueMapModal","EventVenueMapBody","EventVenueMapPopup","inCondensedView","iconOnly","buttonRef","isExiting","setIsExiting","popupPosition","setPopupPosition","scrollX","selectedOverrideName","selectedVenueMapConfig","visibleMarketPlaces","InventoryEventPageHeader","eventPerformer","hasEventsEditPermission","hasCondensedPreviewTabsAndSingleListingFeature","marketplaceEventInfoQuery","viagogoEntityId","onEventIdsEditClick","marketPlaceLogos","minfo","onMkpClick","multiSelectToggle","inventoryEventDropdown","marketplaceEventEditDialog","SummaryTile.DateDisplay","columnGap","SidePanelTab","LISTINGS","SALES","NOTES","PURCHASES","EventMarketListingTitle","MarketListingHeader","keyboard","InventoryEventDetailContext","selectedTab","onTabClick","recenterMap","shouldReset","setShouldReset","compQuantityFilters","setCompQuantityFilters","splitChoices","useInventoryEventDetailContext","InventoryEventDetailContextProvider","setShouldRepaint","setSelectedTab","compListingsFiltered","stringQuantity","CompListingPrices","useVerticalView","determinPriceText","movePriceText","thenText","adjustPriceText","compListingPriceTextFirst","compListingPriceTextThen","OutlierSettings","showOutlierSettings","setShowOutlierSettings","ignoreListingsText","belowTheText","cheapestText","lowestLimitOptions","CheckPrice","percentDifference","absolutePercentDifference","isWithinThreshold","isBelow","PricingSettingAutoPriceFloorSettings","setPriceFloorText","medianListingPrice","ticketPrices","priceComparisonResult","RANK_PREMIUM_TO_SYMBOL_MAP","RankPremiumMode","PricingSettingAutoPriceRankPremiumSettings","addRankPremiumText","premiumMode","setPremiumMode","handleValueChange","clampedValue","rankPremiumValueInputWrapper","PricingSettingAutoPriceBody","isListingGroupForm","resetText","PricingSettingAutoPriceGroup","StatLabel","PricingSettingGroupHeader","flattenedListingGroup","listedQty","queuedQty","ListingDetailListingGroupHeader","shouldDetailsSideBySide","PricingSettingAutoPrice","PricingSettingAutoPriceListing","PricingSettingHeader","sanitizedSeatDisplay","PricingSettingManualPrice","setPriceText","setListPrice","listPriceNew","ListingDetailListingHeader","hasGroupSelectionFeature","ListingDetailPanel","listingWithUpdatedPrice","detailsRef","NoteSectionV2","setNewNote","handleKeyPress","prevNote","messagesStartRef","scrollToBottom","localDateString","sellerEventNoteId","NotesDetailPanel","EventTicketGroupBody","PurchaseOrderTableEventAccordionWrapper","PurchasesBulkActionsPermissions","usePurchaseTileBulkActionsState","allPurchasesSelected","BulkCancelPurchaseDialog","LaunchBulkCancelPurchase","hasBulkCancelVoidPurchaseFeature","useBulkCancelPurchase","openBulkCancelDialog","closeBulkCancelDialog","BulkDeleteTicketGroupDialog","LaunchBulkDeleteTicketGroup","hasBulkDeleteTicketGroupFeature","useBulkDeleteTicketGroup","openBulkDeleteTicketGroupDialog","closeBulkDeleteTicketGroupDialog","updatePurchaseOrders","ticketTypeOverride","bulkEditClient","LaunchBulkUpdatePurchaseCurrencyCode","BulkUpdatePurchaseCurrencyCodeDialog","BulkUpdatePurchaseCurrencyCodeDialogContent","setCurrencyCode","useBulkUpdatePurchaseCurrencyCode","openBulkUpdatePurchaseCurrencyCode","closeBulkMarkPurchaseAsPaidDialog","BulkEditPurchaseSettingsDialog","BulkEditPurchaseSettingsDialogContent","LaunchUpdatePurchaseSettings","useBulkUpdatePurchaseSettings","openBulkEditPurchaseSettingsDialog","closeBulkEditPurchaseSettingsDialog","purchaseInput","hasExportPurchasesFeature","bulkCancelPurchaseAction","bulkDeleteTicketGroupAction","bulkUpdatePurchaseCurrencyCode","bulkEditTags","BulkConvertPurchasePaymentDialog","setFromCurrencyCode","setToCurrencyCode","setConversionRate","uiCurrencyFrom","uiCurrencyTo","LaunchBulkConvertPurchasePayments","hasBulkConvertPaymentLinesFeature","useBulkConvertPurchasePaymentsAction","LaunchBulkMarkPurchaseAsPaid","BulkMarkPurchaseAsPaidDialog","BulkMarkPurchaseAsPaidDialogContent","useBulkMarkPurchaseAsPaid","openBulkMarkPurchaseAsPaidDialog","BulkEditAccountingActionPermissionsHandler","AccountingActions","bulkConvertPayments","bulkMarkPurchaseAsPaidAction","PurchasesTileBulkActions","AddPurchaseAction","addPurchase","PurchaseTileActionDropdown","showShadow","hasScrollBar","TotalCostDiv","PurchaseItemHeaderDateDisplay","EventTicketGroupHeader","totalCostText","translateEventToTicketGroupAccordionItem","TicketGroupsEventsAccordion","itemsIds","useAccordionItem","SwitchIcon","getSidePanelSwitchToUrl","queryString","SwitchToButton","onSwitchSection","switchContentId","SidePanelToolbar","filterBar","noData","viagEventId","hasFullPageEventViewSideTableBulkEdit","hasFullPageEventViewSideTableFilters","getEntityType","ALL_FILTER_ID","SidePanelFilters","setSelectedQuickFilterId","finalQuickFilters","PurchaseSideTableFilterBar","queryInput","purchasesAccordionItem","tgIds","hasSelectedEntities","PurchasesSideTable","PurchaseDetailPanel","listingIdFilterQuery","SaleSideTableFilterBar","filteredEventSales","salesAccordionItem","SaleDetailPanel","DetailPanelBody","renderBody","CondensedVenueMapQtyFilter","MapBody","CompPricingSettings","showAdvancedSettings","setShowAdvancedSettings","watchValues","toggleShowAdvancedSettings","SelectedListingMapStats","listingQtyText","ticketQtyText","p25Text","p50Text","stats","ticketPriceMin","ticketPriceP25","ticketPriceAvg","formatPrice","MapFooter","MapHeader","marketListingsText","notesText","enterCompanionModeText","InventoryEventDetail","listingFormMethods","listingGroupFormMethods","InventoryEventDetailContent","shouldUseVertical","InventoryEventPageSeatMapV2","showColorBand","VenueMapRightNowStats","setQuantityFilters","showFilter","MarketListingsForm","MarketListingsWithAutoPricing","setionIds","filteredSections","selectedListingFromListingGroupWithSeatScore","compsWithScore","compSections","ManualSectionRowIdFilter","selectedSectionChange","QUANTITY_OPTIONS","StubHubListingsWithManualPricing","compListingData","filterNames","allFilterRowIds","formFilterRowIds","filterRowIds","InventoryEventPageRightPanel","InventoryEventPage","InventoryEventContent","quickFilterSearchParams","intialActiveTab","isEventReviewedLoading","isEventNoteLoading","markAsReviewed","markedAsReviewed","onMarkAsReviewed","onSetInventoryTab","oldPosEventId","eids","actAccountCfg","locationState","InventoryEventPageRedirect","eventIdParam","useOnSaleEvents","eventOnly","shouldQueryForSearch","shouldQueryOnSaleEvents","onSaleEventsQuery","onSaleEvents","eventIdGroups","chunk","onSaleEventMetrics","useInventoryDashboardEvent","onSaleEventId","shouldLoadOnSaleEvent","hasEventDiscoveryPageFeature","InventoryEventV2","EntitySearchConfigDialog","searchConfig","EntitySearchConfigDialogBody","ownerUserId","isNotOwned","handleClose","saveCopy","EntitySearchConfigActions","activeSearchConfig","onSaveSearchResult","onDeleteSearchResult","saveSearchResultDlg","deleteConfirmDlg","saveCopyText","saveText","EntitySearchConfigsToolbar","setDisabled","setActiveSearchConfig","saveActiveSearchConfig","deleteActiveSearchConfig","getSearchConfigs","getSearchResult","userSearchConfigsQuery","accountSearchConfigsQuery","onSearchConfigClick","searchResult","otherConfigs","otherConfig","AddFilterDropdown","hideLabel","hideIcon","triggerVariant","triggerShape","triggerClassName","filtersListHeader","resetButton","addFilterButton","viewerMode","filterToolbarListContainerVertical","FiltersListLayout","filterContainer","buttonsContainer","filterContainerHorizontal","buttonsContainerRow","filtersListDirection","filterDisabled","showReportFilterEditabilityDropdown","filterItemLabelVertical","filterItemValueVertical","FilterToolbarEmbedded","addFilterDropdownProps","newSelectedFilters","hasNonMandatorySelectedFilters","addedNewFilter","selectedFilter","EntitySearchFilterBar","onSubmitFilterHandler","EntitySearchRefetcher","onRequeryForTheResult","lastFetchDate","useEntitySearch","saveSearchResult","newEntityIds","onSetActiveSearchConfig","newSearchConfig","lastResultEntityIds","setLastResultEntityIds","idsChanged","refetchData","customRefreshItems","InventorySearchFilterBar","InventorySearchToolbar","InventorySearchPage","useReadOnlyDb","getCatalogDataCallback","InventorySearchContent","searchTitle","hasColumnFilterSearchViewFeature","isCatalogDataLoading","dataIsLoading","includeAllUser","borderLight","LoginPage","reactRouterLocation","handleLoginContext","authorizationUrl","onLoggingInUser","defaultLoginContext","jsonError","LoginCallbackPage","setReturnUrl","onLoginCallback","LoginFailurePage","LogoutPage","handleLoginContextForLogout","authUrl","onLoggingOut","existingContext","notificationTypeSetMap","failures","autopricing","cancellations","notificationsTitle","EventDiscoveryContext","useEventDiscoveryContext","EventDiscoveryContextProvider","mergedEvents","metricsById","onSaleEvent","OnSaleEventTable","eventSelection","viewedEventIdsRef","allEventMetricsLoaded","viewedEventIds","renderedEventIds","OnSaleEventView","OnSaleEventTableWithInnerGrouping","DISCOVERY_USER_SETTINGS","OnSaleEvent","useGetMarketplaceDefaultColumnsConfig","useGetDisplayMarketplacePaymentsTableColumns","storedMarketplacePaymentsColumnOrderSetting","storedMarketplacePaymentsColumnsEnabledSetting","marketplacePaymentColumnOrder","marketplacePaymentsTableColumnsConfig","GroupedPaymentsAccordionBody","queryDate","GroupedPaymentsAccordionHeader","monthContainingMarketplacePayment","formattedAmount","GroupedPaymentsAccordion","MarketplacePaymentsTabContent","monthPayments","MarketplacePaymentDeeplinkListener","modalRefProps","useMarketplacePaymentsFilters","hasMarketplacePaymentFilterUnlinkedFeature","hasPaymentLineUnmappedToSale","hasPaymentLineUnmappedToSaleLineItem","MarketplacePaymentsFilterBar","marketplacePaymentsQuery","onQuickFilterSelect","MarketplacePaymentsToolbar","hasMarketplacePaymentsFiltersFeature","EmptyMarketplacePaymentQuery","DefaultMarketplacePaymentQuery","PaymentTab","CommissionPayment","marketplacePaymentQueryValueTransformToUrl","marketplacePaymentValueTransformFromUrl","paymentsTitle","EventPageTabs","isVisible","ListingSideTableFilterBar","getCatalogDataForListing","INVENTORY","HeaderTabs","SidePanelHeader","pageType","selectedEntityIds","saleIdsQuery","purchaseOrderIdsQuery","usePurchaseEventOverrides","updatePurchaseEventOverrides","OverrideSettingForm","PurchaseEventFulfillmentSection","purchaseOrderAccordionItem","disableBackfill","PurchaseEventInfoSection","selectedPurchaseOrderIds","setSelectedPurchaseOrderIds","EventPageHeaderBase","eventAccordionItem","extraActions","CollapsedView","PurchaseEventPageHeader","uppercasedMetric","PurchaseEventPage","PurchaseEventContent","PurchaseEventTabs","defaultPurchasesTabUserSetting","setDefaultPurchasesTabUserSetting","defaultPurchasesTabLoading","tabContent","useSingleTimePeriodPurchasesQuery","firstOfTimePeriodPlainDateTime","lastOfTimePeriodPlainDateTime","timePeriodDateRange","singleTimePeriodPurchaseQuery","PurchaseDateItemBody","PurchaseDateItemHeader","dateDisplay","onToggleMultiSelect","PurchaseDateAccordionMonthGroupItem","eventStyles","PurchasesVirtuosoID","PurchaseDatesAccordion","PurchasesGlobalBulkActions","SetPurchasesAccordionSelectionCountLabel","ticketGroupText","ticketGroupsText","fromText","eventWithDataMap","ticketGroupsCount","ticketGroupIdsSet","tckGroupId","eventsLabel","ticketsGroupLabel","SetPurchasesFlattenedViewSelectionCountLabel","purchaseText","noSelectedItemsLabel","SetPurchasesTimeViewSelectionCountLabel","purchasesCount","useColumnServerUserSettings","storedInventorySideTableColumnOrderSetting","setInventorySideTableColumnOrderSetting","storedPurchaseSideTableOrderSetting","setPurchaseSideTableOrderSetting","defaultPaymentsColumnsConfig","storedPaymentsTableOrderSetting","setPaymentsTableOrderSetting","storedOnSaleEventTableOrderSetting","setOnSaleEventTableOrderSetting","setCustomPaymentsColumns","customDiscoveryColumns","setCustomDiscoveryColumns","storedPaymentsTableColumnsEnabledSetting","setPaymentsTableColumnsEnabledSetting","storedDiscoveryTableColumnsEnabledSetting","setDiscoveryTableColumnsEnabledSetting","DropGroupWrapper","animateLayoutChanges","isSorting","wasDragging","PlaceholderColumnGroupListItem","ColumnGroupListItem","adaptColumnToGroups","ticketGroupColumns","adaptedColumns","firstTicketGroupColumnIndex","useAdaptedColumns","COLUMN_GROUPS","flattenColumns","columnGroup","renderColumnListItem","updatedItems","activeGroupIndex","updatedGroup","flattenedColumns","flatIndex","activeGroup","overGroup","PurchaseColumnSettingsModal","PurchaseFlattenedView","PurchaseToolbarDiv","PurchaseToolbar","tp","PurchasePage","transformedFilterQuery","PurchasesContent","purchasesTitle","onTicketGroupsEventExpanded","PosNoResultsFound","detailMessage","PurchaseSearchFilterBar","hasPurchaseCommissionFilterInSearchViewFeature","hasConsignmentFilterPurchaseSearchViewFeature","PurchaseSearchToolbar","PurchaseSearchPage","_1","_2","PurchaseSearchContent","purchaseSearchTitle","hasPurchasesResults","borderBottom","RedirectToStubHubUk","curSecond","setCurSecond","isMetricConfigurableByGroupBy","GroupBySelector","metricsFiltered","setNewGroupBy","changeGroupByConfirmDialog","filterColumnByGroupBy","isListingMetricConfigurableByGroupBy","isSaleMetricConfigurableByGroupBy","updateGroupBy","primaryColumnId","onTileClick","newGrpType","presetColumnIdsUnfiltered","presetColumnIdsBeforeChange","presetColumnIdsAfterChange","onChangeGroupByConfirm","TableColumnsDisplay","tableType","tagsMetadataEvent","tagsMetadataPurchase","itemsFiltered","activeEventTagNames","activePurchaseTagNames","PermissionsRequiringFeatures","SellerRoleContext","allSellerRoles","allSellerRolesForSelection","allPermissions","allPermissionsForSelection","getSellerRole","refetchSellerRoleInfos","useSellerRoleContext","SellerRoleContextProvider","showAutoPricerRole","rolesQuery","prefinedRole","roleContentId","roleText","roleDetails","permissionsQuery","permContentId","permText","allPermissionsFiltered","hasAllFeatures","ShareReportBody","roleIds","onRoleIdsChange","onSellerUserIdsChange","addUserAndGroupContent","valuesAggregated","isRole","keyOptions","onSelectionUpdated","newRoleIds","newSellerUserIds","removeRole","removeSellerUser","SharedPeopleListItem","roleInfo","textDisplay","isUser","ShareReportDialog","roleIdsShared","sellerUserIdsShared","setNewRoleIds","setNewSellerUserIds","InventoryMetricsSelectionInputModal","headerContentId","sortedColumnSelection","SalesMetricsSelectionInputModal","getEditability","reportFilterId","updateFilterItemIds","reportFilterIds","isNotIncluded","newHiddenFilterItemIds","newViewableFilterItemIds","newEditableFilterItemIds","ReportBuilderFilterInput","hidePerformerVenueFilter","ListingFilterInput","SaleFilterInput","formFilter","appliedFiltersRelativeToEmpty","filtersWithEditability","filterIds","PerformerVenuePopover","WidgetsSelectionInput","newWidgets","AdvancedSettingsId","ReportBuilderDialogBody","existingReports","duplicateNameMsg","numberOfItemsPerPageError","widgetsError","filtersError","metricsError","groupByError","isMetricModalOpen","toggleMetricModal","advancedSettingsExpandedItem","setAdvancedSettingsExpandedItem","metricDisplayNames","groupByOptions","sortByOptions","onSortByChange","onIsSortDescendingChange","activeExpandedItem","ReportBuilderDialog","report","getCatalogDataForSales","REPORT_CONFIG_V2_SCHEMA_VERSION","addTimezoneOffsetToCommissionReportConfig","useReportConfigsV2","aggregations","rowGroupings","commissionMandatoryFiltersToShow","useCommissionFilters","commissionFilters","listingsReportMandatoryFiltersToShow","PurchaseInfoFilterIdsToShow","useListingReportFilters","supportedPurchaseInfoFilters","saleReportMandatoryFiltersToShow","useSaleReportFilters","FILTERS_FIELD","ReportBuilderFilterInputV2","filterInputProps","CommissionFilterInput","ReportBuilderDialogBodyV2","existingInventoryReports","existingSaleReports","existingReportNames","defaultRequest","columnGroupings","FilterInput","FilterInputContextWrapper","reportFilter","ReportBuilderDialogV2","getHistorySnapshotTableColumnsConfig","accessorKey","createdDate","onDownloadClick","ReportHistoryTable","reportSnapshotInfos","reportHistoryText","useFetchReportSnapshotsInfo","ReportHistoryDialog","mapReportMetrics","reportMetrics","createReportMetricsContext","useReportMetricsContext","ReportMetricsContextProvider","getReportMetrics","reportMetricsRequested","applyMaxRowLimitByDefault","ReportMetricsContext","reportConfigMaxSizeOverride","setReportConfigMaxSizeOverride","hasMaxRowLimitFeature","maxResultSize","reportMetricsQuery","overrideMax","isAllReportMetricsLoaded","hasTimeout","hasUnknownError","reportSummary","summary","ListingReportTableColumnDefContext","ListingReportTableColumnDefContextProvider","listingTagIsLoading","eventTagIsLoading","purchaseTagIsLoading","customColumnIsLoading","useListingReportTableColumnDef","ReportsInventoryContextProvider","globalReportTypeId","isUsingFilterOverride","listingReportMetricsRequested","sortReportMetrics","sortByColumnConfig","aVal","bVal","mapReportMetricToUserIds","reportMetric","resolveSellerUserId","stringValueList","resolvePurchaseBuyerInfos","mapReportMetricToTableString","stringValue","getPdfPageSize","columnCount","getReportExportFileBasename","exportReport","tableHeader","tableFoot","jsPDF","autoTable","foot","save","aoa","workbook","book_new","worksheet","aoa_to_sheet","book_append_sheet","bookType","ReportsInventoryExport","reportExportOptions","onReportExported","reportToExport","serverSideExport","ReportsListingServerSideExportInner","downloadReport","ReportsInventoryClientSideExportInner","columnDisplayNames","reportMetricsMapped","userIdsInRow","onDataLoaded","isArAgingReport","metricsMapped","metricsByMarketplace","mapReportMetricsSummary","existingIndex","SaleReportTableColumnDefContext","SaleReportTableColumnDefContextProvider","saleTagIsLoading","displayedColumns","arAgingTimeBuckets","bucket","useSaleReportTableColumnDef","ReportsSaleContextProvider","ReportsSaleExport","ReportsSaleServerSideExportInner","ReportsSaleClientSideExportInner","timeBuckets","REPORTS_TABLE_COLUMNS_CONFIG","reportV2","canCreateReport","canUpdateReport","canUpdateOwnReports","canViewHistory","setReportExportOptions","isOwner","visibleActions","onReportAction","reportIdRedirect","DropdownMenu.Group","ReportsTable","reports","reportsV2","isGlobalSection","reportText","ReportsTableContainer","reportsV2Default","reportsV2Custom","reportsDefault","rv2","reportsCustom","DEFAULT_GROUP_BY_INVENTORY","DEFAULT_GROUP_BY_SALE","emptyReport","allowReaderEditMetrics","useReportV1Actions","currentReport","setCurrentReport","reportBuilderDialogInventory","reportBuilderDialogSale","shareDialog","deleteDialog","reportHistoryDialog","onAddNewReport","defaultMetrics","deleteReportConfigInventory","upsertReportConfigInventory","getReportConfigNameForDuplicateInventory","deleteReportConfigSale","upsertReportConfigSale","getReportConfigNameForDuplicateSale","invokeUpsertReport","onReportShareSubmit","updatedReport","onReportSaveSubmit","navUrl","isFromV1Page","onReportDelete","useReportConfigActionsV2","orderByAsc","getReportNavUrl","useReportV2Actions","reportBuilderDialog","isNewReport","isCreateNewReport","reportsTitle","hasReportV2BuilderFeature","hasReportSinglePagedV1V2Feature","onReportActionV1","currentReportV2","setCurrentReportV2","onAddNewReportV2","onReportSaveSubmitV2","onReportActionV2","onReportShareSubmitV2","onReportDeleteV2","reportBuilderDialogV2","deleteDialogV2","shareDialogV2","reportConfigV2","ReportsPage","reportConfigsInventory","reportInventoryLoading","reportConfigsSale","reportSaleLoading","reportsInventoryWithType","reportsSaleWithType","reportConfigsV2Inventory","reportV2InventoryLoading","reportConfigsV2Sale","reportV2SaleLoading","reportConfigsV2Commission","reportV2SaleCommission","reportsV2InventoryWithType","reportsV2SaleWithType","reportsV2CommissionWithType","createReportMetricsContextV2","useReportMetricsContextV2","ReportMetricsContextProviderV2","getReportMetricsSummary","isReportConfigEmpty","reportMetricsData","reportMetricsSummaryQuery","reportValueTypes","valueTypes","ReportsInventoryContextProviderV2","isExport","ReportsInventoryExportV2","queryWithCatalog","ReportsSaleContextProviderV2","ReportsSaleExportV2","REPORTS_TABLE_COLUMNS_CONFIG_V2","ReportsTableV2","ReportsTableContainerV2","hasCreateReportsPermission","ReportsPageV2","reportConfigsCommission","reportCommissionLoading","reportsCommissionWithType","reportV2AccessorFn","defaultColumnHelperAccessor","valueAsArray","valueAsMoney","yesNoEnum","COMMISSION_REPORT_SPECIAL_TABLE_COLUMNS_CONFIG","commissionReportTableColumnDef","specialConfig","CommissionReportTableColumnDefContext","CommissionReportTableColumnDefContextV2","columnName","useCommissionReportTableColumnDefV2","CommissionReportTableV2","ReportTableInternal","shimmeringDivCount","useReportPermissions","hasUpdateReportPermission","hasReportingV2Feature","hasViewReportPermissions","hasUpdateOwnReportPermission","isGlobalReport","canViewReport","hasAccessToReportingV2","ReportsFilterToolbarV2","debouncedUpsertReportConfig","ReportEditTableIcon","ReportsPageToolbarV2","isEditTable","setIsEditTable","hasCreateReportFeature","reportConfigWithTempQuery","onReportDuplicateSubmit","newReport","newReportId","DragHandleIcon","SortableMetricsOptionsListItem","MetricsOptionsListItem","MetricsInputDroppable","selectedValues","MetricsOptionsList","availableValues","groupByOptionsContent","ReportsTableEditorForm","ROWS_INPUT_KEY","VALUES_INPUT_KEY","OPTIONS_LIST_KEY","ReportsTableEditorContent","groupbyField","sortByField","metricsField","groupingOptions","valueOptions","allOptions","groupingOptionsSortedByContent","valueOptionsSortedByContent","setItems","findContainerKey","moveOver","overContainerKey","activeContainerKey","activeItems","overItems","recalculateReportColumns","newSortBy","onDragOver","closestCorners","ReportsTableEditor","ReportsPageLayout","reportTable","ReportsCommissionPage","ReportsCommissionContextProviderV2","ReportsCommission","ReportsCommissionContentV2","PosFloatingSpinner","ReportsMaxSizeMessage","onBypassLimit","CircleIcon","styleOverride","ReportGroupIcon","TimeoutIcon","TableStateWrapper","TableErrorStateHeader","ListingReportTable","ListingReportTableInternal","metricsHasTimeout","metricsHasError","performerCount","venueCount","eventCount","tableColumnIsLoading","ReportsFilterToolbar","setColumnModalOpen","upsertReportOverrideInventory","upsertReportOverrideSale","hasUpdateReportFeature","hasUpdateOwnReportFeature","reportConfigNew","onMetrisSelectionModalClose","filterChangeMessageContentId","ReportsInventoryPage","initSorting","WidgetSection","WidgetSectionContent","ReportsPageToolbar","ReportsInventory","ReportsInventoryContent","LISTING_REPORT_SPECIAL_TABLE_COLUMNS_CONFIG","listingReportV2TableColumnDef","ListingReportTableColumnDefContextProviderV2","useListingReportTableColumnDefV2","ListingReportTableV2","ReportsInventoryPageV2","ReportsInventoryV2","ReportsInventoryContentV2","SaleReportTable","SaleReportTableInternal","ReportsSalePage","reportSummaryMapped","ReportsSale","ReportsSaleContent","SALE_REPORT_SPECIAL_TABLE_COLUMNS_CONFIG","saleReportV2TableColumnDef","SaleReportTableColumnDefContextProviderV2","useSaleReportTableColumnDefV2","SaleReportTableV2","ReportsSalePageV2","ReportsSaleV2","ReportsSaleContentV2","SaleSearchFilterBar","SaleSearchToolbar","SaleSearch","SaleSearchPage","SaleSearchContent","SaleEventInfoSection","saleAccordionItem","selectedSaleIds","setSelectedSaleIds","SaleEventPageHeader","SaleEventPage","SaleEventContent","SaleEventTabs","defaultSalesTabUserSetting","setDefaultSalesTabUserSetting","defaultSalesTabLoading","settingsText","hasSiteVersionFeature","hasPurchaseSettingsTabFeature","hasCurrencyConversionSettingsTabFeature","hasAdminPermission","hasVendorAccountV2","hasAutoPricingTabFeature","hasVendorManagementPermission","isAuthorized","isPathActive","matchPath","hasPermissionsForActiveView","activePath","NavLink","useAutoCurrencyConversionSettings","autoCurrencyConversionSettings","CurrencySection","onDefaultCurrencyChange","ignoredCurrencyCodes","onIgnoredCurrencyCodesChange","onEnabledToggle","availableCurrenciesOptionsWithoutDefault","useCurrencyConversionOverrides","hasOverrideDailyFxRateFeature","getAllQuery","createCurrencyConversionOverride","currencyConversionOverrides","CurrencyConversionOverrideDialog","currencyConversionOverride","otherExistingCurrencyConversionOverrides","duplicateText","sameCurrencyCodeText","conversionRateGreaterThanZeroText","allText","contentIdToPresetRegexIdMap","presetRegexId","paymentMethodSelectProps","validateInput","conversionRateDate","dateInput","dateExisting","paymentMethodNameKnownRegexId","paymentMethodSelectValue","paymentMethodSelectOnChange","VendorTableContainer","CURRENCY_CONVERSION_OVERRIDE_TABLE_COLUMNS_CONFIG","purchasePaymentMethodName","onCurrencyConversionOverrideAction","CurrencyConversionOverridesTable","currencyConversionOverridesText","EMPTY_CURRENCY_CONVERSION_OVERRIDE_INPUT","CurrencyConversionOverridesTableContainer","currentCurrencyConversionOverride","setCurrentCurrencyConversionOverride","onAddNewCurrencyConversionOverride","onSaveCurrencyConversionOverride","onCurrencyConversionOverrideCancel","onCurrencyConversionOverrideDelete","SellerAccountSettingCurrencyConversionOverrides","hasDailyFxRateOverrideFeature","TimezoneSection","selectOptions","labelStyle","timezones","allTimezones","parseTimezone","useTimezoneSelect","onTimezoneChange","timezoneValue","timezone","timezoneOptions","hasPOSTimezoneFeature","userInformation","onZoomChange","onThemeChange","zoomOptions","english","useAutoPoRestrictionSettings","countryQueryKey","vendorQueryKey","countryRestrictionQuery","countryRestrictionMutation","vendorRestrictionQuery","vendorRestrictionMutation","sortCountryRestrictions","sortVendorRestrictions","isIncluded","getIncludeExcludeOptions","includeText","excludeText","IncludeExcludeOptions","AutoPoRestictionForm","includeExclude","setIncludeExclude","vendorQuery","vendorSelectProps","knownCountriesOption","formDefaultValues","newIncludeExclude","vendorRestrictionsForSumbit","includedCountryCodes","includedVendorIds","excludedVendorIds","onIncludedVendorChange","newVendorRestrictions","onExcludedVendorChange","onIncludedCountryChange","newCountryRestrictions","onIncludeExcludeChange","PurchaseOrderGeneralSettingForm","PurchaseOrderSettingsContent","AccountingSetting","isAutoAddCancelledProceed","isAutoAddCancelledProceedsEnabled","useGetAccessiblePurchasePaymentMethodsQuery","PurchasePaymentMethodDialog","PAYMENT_METHOD_TABLE_COLUMNS_CONFIG","purchasePaymentMethod","purchasePaymentActions","editPurchasePayment","deletePurchasePayment","PurchasePaymentMethodsTable","purchasePaymentMethods","onEditPaymentMethod","onDeletePaymentMethod","hasPurchasePaymentEditFeature","purchasePaymentMethodsText","PurchasePaymentMethodsTableContainer","paymentMethodsQuery","purchasePaymentMethodsImperativeRef","useNewStyles","currentPaymentMethod","setCurrentPaymentMethod","onAddNewPaymentMethod","onSavePaymentMethod","onPaymentMethodCancel","SellerAccountSettingPaymentMethods","purchasePaymentMethodsQuery","GET_ACCESSIBLE_VENDOR_ACCOUNTS_KEY","useGetAccessibleVendorAccountsQuery","purchaseOrderVendorIds","vendorIdSelected","GET_ACCESSIBLE_VENDORS_QUERY_KEY","useGetAccessibleVendorsQuery","getOverride","EMPTY_INFO_PLACEHOLDER","SellerAccountSettingVendorAccounts","vendorAccounts","refetchVendorAccounts","venderAccountDialog","onVendorAccountDelete","InfoEntry","SellerAccountSettingVendors","vendorsText","vendorsQuery","vendorAccountsQuery","vendorDialog","vendorVenueOptionsContent","newText","vendorData","vendorsData","onVendorDelete","vendorAccountsByVendorId","SellerAccountSettingBody","HeaderSection","muted","VendorContainer","SellerAccountSettingHeader","sellerAccountName","sortTicketTypePriority","sortTicketTypeWithPriority","mapTicketTypeWithPriorityList","TicketTypeOverrideInputForm","hasDisplayTicketOrderedByPriorityFeature","selectedTicketType","priorities","deliveryTypeContentId","ticketTypesOrdered","aPriority","bPriority","TicketTypeOverrideInputFormSingleTicketType","ticketTypeRulesNew","getDraftTicketTypeRules","InstructionsList","InstructionsListItem","handleResponse","useTradeDeskSendResetPasswordCodeMutation","useTradeDeskResetPasswordMutation","oldPassword","newPassword","genPassword","sellerAccountClient","resp","TradeDeskApiResetInstructions","marketplaceUserName","enterResetCodeFromEmailText","sendResetPasswordCodeMutation","resetPasswordMutation","resetCode","setResetCode","syncCenterStyles","MutationStatus","SyncCenterContent","syncCenterTitle","SyncCenterForm","onSaved","hasMarketplaceTermFeature","hasMarketplaceEnableDisableFeature","hasMarketplacePreventInitialBroadcastFeature","marketplaceEnableDisableConfirmDlg","newDefaultValues","noneTxt","getMarketplaceEnableDisable","enable","mkps","tokenVersion","mapToSellerRoleInput","MAX_ROLE_DETAILS_LENGTH","SellerPermissionDisplay","toggleSelect","permissionInfo","part","permissionContent","SellerPermissionSelectionSection","permissionInfosOfArea","permissionsOfArea","pa","onEnableAllForArea","checkAll","permissionsNotInArea","onTogglePermissionSelect","permissionsExcluding","SellerUserDisplay","onRemoveUserFromRole","newUserIds","uid","SellerRoleUsersSection","usersOfRole","onUserIdsChange","SellerRoleDetails","requiredTxt","selectedRoleTemplate","setSelectedRoleTemplate","detailsError","onRoleTemplateSelected","copyPermissions","setTabIndex","PermissionsTabContent","permissionErrors","LaunchDeleteRole","userCount","roles","onDeleteRole","SellerRoleModalFooter","SellerRoleModalBody","usersHasChanged","permissionErrorText","visiblePermissions","SellerRoleModal","userIdsOfRoles","getSellerRoleModalConfig","SHIMMERING_DIV_HEIGHT_SINGLE_ROW","ROLES_TABLE_COLUMNS_CONFIG","permissionsByAreas","permInfo","RolesTable","SellerUserListItem","TeamInput","AddTeamModal","AddTeamModalContent","AddTeamModalHeader","AddTeamModalFooter","onCreateSubmit","onCreateSubmitHandler","EditTeamModal","EditTeamModalContent","EditTeamModalHeader","EditTeamModalFooter","onUpdateSubmit","onUpdateSubmitHandler","TEAMS_TABLE_COLUMNS_CONFIG","onDeleteUserGroup","TeamsTable","teamsText","searchEntityLabel","AddUserModalHeader","AddUserModalFooter","stubhubLoginMsg","AddUserModal","AddUserModalContent","Label.Root","useGetFilteredUsers","hasUserSearchBar","userOptionsContent","userIdsMap","filterdUserIds","filteredUsers","EditUserModalHeader","EditUserModalFooter","deactivateUserText","activateUserText","deactivated","isCurrentUser","onActivateSubmit","userGroupIds","EditUserModal","EditUserModalContent","inactiveBadge","activeBadge","SellerPermissionDisplayModalBody","SellerPermissionDisplayModal","roleInfos","getSellerPermissionDisplayModalConfig","USERS_TABLE_COLUMNS_CONFIG","roleNames","onViewPermissionClick","onEditClick","UsersTable","isAddUserModalOpen","toggleAddUserModalOpen","UsersManagement","purchasePaymentMethodsRef","paymentsWrapper","useGetVendorIdFromUrl","GET_VENDOR_QUERY_KEY","useGetVendor","defaultRequestPage","useGetFilteredAccessibleVendorAccountsQuery","allVendorAccounts","setAllVendorAccounts","requestPage","setRequestPage","cleanSearchText","getVendorAccountsQuery","mergedVendors","loadNextVendorAccountsPage","nextRequestPage","updateVendorAccount","vendorAccountIndex","allVendorVendorAccountsUpdated","refreshSearch","useInvalidateGetVendorQuery","FilterVendorAccountsInput","useInvalidateGetAccessibleVendorsQuery","useAddVendorAccount","onVendorAccountSaved","onEditVendorAccount","useAddVendorAccountActions","onVendorAccountSavedProp","invalidateGetAccessibleVendorsQuery","VendorAccountsActions","vendorAccountsActionsRef","editVendorAccount","VendorAccountsActionsCell","vendorAccountWithActions","vendorAccountActions","VendorsAccountsTableColumnId","VENDORS_ACCOUNTS_TABLE_COLUMNS_CONFIG","showPassword","setShowPassword","tableWrapperStyle","VendorAccountsTable","purchaseVendorAccountWithActions","AddVendorAccount","addVendorAccount","vendorAccountsSerchText","setVendorAccountsSerchText","invalidateGetVendorQuery","vendorsPageHeaderWrapper","useAddVendor","onVendorSaved","onEditVendor","useAddVendorActions","VendorSummary","onVendorDeleted","vendorSummaryStyles","VendorDeliveryOverrideForm","VendorDetailsBodyContent","VendorDetailsModalHeader","vendorDetailsStyles","VendorDetailsModalBody","VendorDetailsModalConfig","getVendorDetailsModalConfigWithDeepLink","useOpenVendorDetailsModal","activeVendorId","openVendorDetailsModal","openVendorDetailsModalFromUrl","VendorActions","vendorActionsRef","editVendor","viewVendorDetails","addNewVendorAccount","AddVendorButton","onVendorAdded","VendorsPageHeader","disableSearch","VendorsTableColumnId","TotalAccounts","AccountType","VendorActionsCell","vendorWithActions","vendorActions","VENDORS_TABLE_COLUMNS_CONFIG","systemText","customText","VendorsTable","useGetFilteredVendors","vendorOptionsContent","vendorIdsMap","filteredVendorIds","filteredVendors","allVendors","vendorsWithActions","purchaseVendorActions","useAccountAutoPricingSettings","getAccountAutoPricingSettingsQuery","mergeAccountAutoPricingSettingsMutation","onMergeAccountAutoPricingSettings","accountAutoPricingSettings","AutoPricingCircuitBreakerMaxDiscountVelocityInput","exactMatchPosListingQuantities","greaterThanOrEqualToPosListingQuantity","AutoPricingDefaultCompQuantitiesInput","posListingQuantity","AutoPricingDefaultCompQuantitiesPackSelector","quantityFilterFieldPath","packLabelText","innerControl","autoPricingInputsNew","AutoPricingMinCompListingsSlider","AccountAutoPricingSettingsForm","disabledProp","VelocityCircuitBreakerSettings","restrictVelocityOfPriceUpdates","restrictVelocityOfPriceUpdatesNew","AccountAutoPricingSettings","defaultSignUpContext","hasSignedUp","isSignupSubmitted","setIsSignupSubmitted","hasCheckedSignUpRedirect","setHasCheckedSignUpRedirect","SignUpContext","useSignUpContext","SignUpContextProvider","setHasSignedUp","debouncedSetHasSignedUp","handleSetIsSignupSubmitted","ArrowRight","SubmitButton","submitButton","EmailForm","byLogo","Titles","InviteOnlyBanner","inviteOnlyBannerWrapper","SignUpPathname","allowedHostnames","isReachProDomain","hostname","isAllowedToSignUp","SignUpRedirect","SignUpValidator","loginContextLoaded","setLoginContextLoaded","video","signupVideo","signupPage","signupContent","signUpFooter","SHIMMERING_DIV_HEIGHT_SINGLE_ADCAMPAIGNS","getAdCampaignUrl","AdCampaignActionsCell","AdCampaignsDateCell","ADCAMPAIGNS_TABLE_COLUMNS_CONFIG","useGetAdCampaignsTableColumns","AdCampaignsTable","adCampaignEntities","adCampaignsText","AdCampaignCreateForm","AdCampaignCreateFormContent","adCampaignCreateInput","AdCampaignCreateModal","AdCampaignCreateFormBody","setBudget","AdCampaignsToolbarDiv","AdCampaignsToolbar","SponsoredListingsContent","sponsoredListingsTitle","AdCampaignsFlattenedView","campaignEntitiesWithMetrics","reportDataByAdCampaignId","PaymentsIcon","DocumentInfo","isReachProDomainActive","reachPropIco","reachLightIcon","reachDarkIcon","getTabId","tabId","useMeasurement","performance","memory","usedJSHeapSize","totalJSHeapSize","jsHeapSizeLimit","useMemoryTelemetry","getMeasurement","timerId","AppLayout","experimental_createPersister","storage","buster","maxAge","serialize","deserialize","PERSISTER_KEY_PREFIX","storageKey","queryHash","matchesFilter","matchQuery","storedData","persistedQuery","dataUpdatedAt","expired","busted","errorUpdatedAt","queryFnResult","createClient","persister","predicate","defaultOptions","structuralSharing","MainQueryClient","touchBackendOptions","enableMouseEvents","AppContent","TouchBackend","Worker","ReactQueryDevtools","sentryCreateBrowserRouter","createBrowserRouter","router","errorElement","loader","redirect","SettingsViews.MyAccount","SettingsViews.CurrencyConversion","SettingsViews.FulfillmentProviders","SettingsViews.PurchaseOrderSetting","SettingsViews.AccountingSetting","SettingsViews.UsersManagement","SettingsViews.Users","SettingsViews.Roles","SettingsViews.Teams","SettingsViews.VendorManagement","SettingsViews.Payments","SettingsViews.Vendors","SettingsViews.SyncCenter","SettingsViews.SellerAccount","SettingsViews.AccountAutoPricingSettings","initSentry","dsn","environment","release","integrations","useNavigationType","createRoutesFromChildren","matchRoutes","browserProfilingIntegration","t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EACE,yBACA8hF,sBACE+hF,GACAN,EAAiBniK,sBACnB,CACF,EACF,EAEF,CACEpB,EACAujK,EAAiBpiK,uBACjBoiK,EAAiBriK,aACjBqiK,EAAiBniK,sBAAsB,CAE3C,EAEM0iK,EAAsBjzN,yBACzBpuJ,IAWK,CACE,KAAA,CACJshX,mBAAAA,GACAC,oBAAAA,GACAC,sBAAAA,GACAC,qCAAAA,GACAC,6CAAAA,GACAC,6CAAAA,GACAC,kCAAAA,GACAC,6BAAAA,GACAC,kDAAAA,GACAC,sCAAAA,EACE/hX,EAAAA,GAEJ,GACEshX,KAAuB9qX,QACvB+qX,KAAwB/qX,QACxBgrX,KAA0BhrX,QAC1BirX,KAAyCjrX,QACzCkrX,KAAiDlrX,QACjDmrX,KAAiDnrX,QACjDorX,KAAsCprX,QACtCqrX,KAAiCrrX,QACjCsrX,KAAsDtrX,QACtDurX,KAA0CvrX,OAC1C,CACMwrX,MAAAA,GACJN,GACI,GACAD,GACAQ,GACJR,GACI,GACAC,GAENnkK,EACE,kBACA8hF,sBACEiiF,GACAP,EAAoBjjK,eACtB,CACF,EACAP,EACE,mBACA8hF,sBACEkiF,GACAR,EAAoBhjK,gBACtB,CACF,EACAR,EACE,qBACA8hF,sBACEmiF,GACAT,EAAoB/iK,kBACtB,CACF,EACAT,EACE,oCACA8hF,sBACE2iF,GACAjB,EAAoB/Y,iCACtB,CACF,EACAzqJ,EACE,4CACA8hF,sBACEqiF,GACAX,EAAoB9iK,yCACtB,CACF,EACAV,EACE,4CACA8hF,sBACE4iF,GACAlB,EAAoBjZ,yCACtB,CACF,EACAvqJ,EACE,iCACA8hF,sBACEuiF,GACAb,EAAoB9Y,8BACtB,CACF,EACA1qJ,EACE,4BACA8hF,sBACEwiF,GACAd,EAAoBT,yBACtB,CACF,EACA/iK,EACE,iDACA8hF,sBACEyiF,GACAf,EAAoBhZ,8CACtB,CACF,EACAxqJ,EACE,qCACA8hF,sBACEogF,6BAA6BsC,EAAqC,EAClEhB,EAAo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C,oBAAAA,GACAC,sBAAAA,GACAC,qCAAAA,GACAC,6CAAAA,GACAC,6CAAAA,GACAC,kCAAAA,GACAC,6BAAAA,GACAC,kDAAAA,GACAC,sCAAAA,EACE/hX,EAAAA,GAEJ,GACEshX,KAAuB9qX,QACvB+qX,KAAwB/qX,QACxBgrX,KAA0BhrX,QAC1BirX,KAAyCjrX,QACzCkrX,KAAiDlrX,QACjDmrX,KAAiDnrX,QACjDorX,KAAsCprX,QACtCqrX,KAAiCrrX,QACjCsrX,KAAsDtrX,QACtDurX,KAA0CvrX,OAC1C,CACMwrX,MAAAA,GACJN,GACI,GACAD,GACAQ,GACJR,GACI,GACAC,GACNnkK,EACE,kBACA8hF,sBACEiiF,GACAP,GAAoBjjK,eACtB,CACF,EACAP,EACE,mBACA8hF,sBACEkiF,GACAR,GAAoBhjK,gBACtB,CACF,EACAR,EACE,qBACA8hF,sBACEmiF,GACAT,GAAoB/iK,kBACtB,CACF,EACAT,EACE,oCACA8hF,sBACE2iF,GACAjB,GAAoB/Y,iCACtB,CACF,EACAzqJ,EACE,4CACA8hF,sBACE4iF,GACAlB,GAAoB9iK,yCACtB,CACF,EACAV,EACE,4CACA8hF,sBACEsiF,GACAZ,GAAoBjZ,yCACtB,CACF,EACAvqJ,EACE,iCACA8hF,sBACEuiF,GACAb,GAAoB9Y,8BACtB,CACF,EACA1qJ,EACE,4BACA8hF,sBACEwiF,GACAd,GAAoBT,yBACtB,CACF,EACA/iK,EACE,iDACA8hF,sBACEyiF,GACAf,GAAoBhZ,8CACtB,CACF,EAEAxqJ,EACE,6BACA8hF,sBACEz+E,wBACEkhK,EACF,EACAf,GAAoBhY,0BACtB,CACF,EACExrJ,EACE,qCACA8hF,sBACEogF,6BACEsC,EACF,EACAhB,GAAoB7iK,kCACtB,CACF,CACJ,CACF,EACA,CACEX,EACAwjK,GAAoBjjK,gBACpBijK,GAAoBhjK,iBACpBgjK,GAAoB/iK,mBACpB+iK,GAAoB/Y,kCACpB+Y,GAAoB9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